LOCAL_C TInt ThreadFunc(TAny*)
	{
	__UHEAP_MARK;
	CTrapCleanup* threadcleanup = CTrapCleanup::New();
	TRAPD(err, ThreadMainL());
	delete threadcleanup;
	__UHEAP_MARKEND;
	return err;
	}
Exemple #2
0
TInt CAppMain::EntryPoint(TAny* /*aNone*/){
  CTrapCleanup* cleanupStack=CTrapCleanup::New();
  if(!cleanupStack){
    PanicServer(ECreateTrapCleanup);
  }
  Log(_L("TInt CAppMain::EntryPoint() 1"));
  TRAPD(leave,ThreadMainL());
  if(leave){
    Log(_L("TInt CAppMain::EntryPoint() 2"));
    PanicServer(ESrvCreateServer);
  }

  delete cleanupStack;
  Log(_L("TInt CAppMain::EntryPoint() 3"));
  cleanupStack=NULL;
  return KErrNone;
}
Exemple #3
0
TInt CSharedQueueSrv::EntryPoint(TAny* /*aNone*/)
	{
	CTrapCleanup* cleanupStack = CTrapCleanup::New();
	if (!cleanupStack)
		{
		User::Panic(KSharedQueueSrvName, ESrvCreateTrapCleanup);
		}
	TRAPD(leave, ThreadMainL());
	if (leave)
		{
		User::Panic(KSharedQueueSrvName, ESrvCreateServer);
		}

	delete cleanupStack;
	cleanupStack = NULL;

	return KErrNone;
	}