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);

}