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 |
|
238 // Create the thread for the server. |
227 // Create the thread for the server. |
239 res = aServerThread.Create(KMMRCServerName, |
228 res = aServerThread.Create(KMMRCServerName, |
240 CMMRCServer::ThreadFunction, |
229 CMMRCServer::ThreadFunction, |
241 KMMRCServerStackSize, |
230 KMMRCServerStackSize, |
242 KMMRCServerInitHeapSize, |
231 KMMRCServerInitHeapSize, |
243 KMMRCServerMaxHeapSize, |
232 KMMRCServerMaxHeapSize, |
244 NULL |
233 NULL |
245 ); |
234 ); |
246 #endif |
|
247 |
235 |
248 // The thread has been created OK so get it started - however |
236 // The thread has been created OK so get it started - however |
249 // we need to make sure that it has started before we continue. |
237 // we need to make sure that it has started before we continue. |
250 if (res==KErrNone) |
238 if (res==KErrNone) |
251 { |
239 { |