222 TFullName name; |
222 TFullName name; |
223 |
223 |
224 // Need to check that the server exists. |
224 // Need to check that the server exists. |
225 if ( findCountServer.Next(name) != KErrNone ) |
225 if ( findCountServer.Next(name) != KErrNone ) |
226 { |
226 { |
|
227 #if (defined (__WINS__) || defined (__WINSCW__) ) |
|
228 // Create the thread for the server. Don't allocate a separate |
|
229 // heap but use client thread's heap instead. This saves memory |
|
230 // space in the single process model used in the emulator. |
|
231 res = aServerThread.Create(KMMRCServerName, |
|
232 CMMRCServer::ThreadFunction, |
|
233 KMMRCServerStackSize, |
|
234 NULL, |
|
235 NULL |
|
236 ); |
|
237 #else |
227 // Create the thread for the server. |
238 // Create the thread for the server. |
228 res = aServerThread.Create(KMMRCServerName, |
239 res = aServerThread.Create(KMMRCServerName, |
229 CMMRCServer::ThreadFunction, |
240 CMMRCServer::ThreadFunction, |
230 KMMRCServerStackSize, |
241 KMMRCServerStackSize, |
231 KMMRCServerInitHeapSize, |
242 KMMRCServerInitHeapSize, |
232 KMMRCServerMaxHeapSize, |
243 KMMRCServerMaxHeapSize, |
233 NULL |
244 NULL |
234 ); |
245 ); |
|
246 #endif |
235 |
247 |
236 // The thread has been created OK so get it started - however |
248 // The thread has been created OK so get it started - however |
237 // we need to make sure that it has started before we continue. |
249 // we need to make sure that it has started before we continue. |
238 if (res==KErrNone) |
250 if (res==KErrNone) |
239 { |
251 { |