Discussion Board
-
ThreadFunction
2006-04-06, 12:30
#1
Registered User
Hi All,
Kindly help me out with the following code as i am a little bit apprehensive whether i am following the right path.
TCallBack ThreadFunction(ThreadEntryPoint, this);
TInt res = iCnetThread.Create(_L("TempThread"),
ThreadFunction.iFunction,
4096*10,
RThread().Heap(),
ThreadFunction.iPtr);
Also definition for ThreadEntryPoint is.
TInt CCNetPlugin::ThreadEntryPoint(TAny* aParameters)
{
// Perform a long synchronous task e.g. a lengthy calculation
CCNetPlugin* pThis = (CCNetPlugin*)aParameters;
CTrapCleanup* cleanupStack = CTrapCleanup::New();
TRAPD(err, pThis->ProcessFile()); // Calling some function
delete cleanupStack;
cleanupStack = NULL;
return(KErrNone);
}
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules