コード例 #1
0
ファイル: WWCRT0.CPP プロジェクト: cdaffara/symbiandump-os2
GLDEF_C TInt E32Main()
	{     
	CTrapCleanup::New();

	RWin32Stream::StartServer();	// arrange for access to Win32 stdin/stdout/stderr
	SpawnPosixServerThread();	// arrange for multi-threaded operation

	int argc=0;
	wchar_t** wargv=0;
	wchar_t** wenvp=0;


	__crt0(argc,wargv,wenvp);			// get args & environment from somewhere

#ifndef EKA2
	// Cause the graphical Window Server to come into existence
	RSemaphore sem;
	sem.CreateGlobal(_L("WsExeSem"),0);
	RegisterWsExe(sem.FullName());
#endif

	int ret=wmain(argc, wargv, wenvp);		// go

	// no need to explicitly delete the cleanup stack here as all memory used by
	// the process will be released by RProcess::Terminate(), called from inside exit().

	exit(ret);	// to get atexit processing, eventually terminates this process

	return(KErrNone);
	}
コード例 #2
0
ファイル: TSTW32.CPP プロジェクト: cdaffara/symbiandump-os2
GLDEF_C TInt E32Main()
	{     
	CTrapCleanup* TheTrapCleanup=CTrapCleanup::New();

#ifdef USE_FULL_GRAPHICAL_ENVIRONMENT
	// Cause the Eikon environment to come into existence
	RSemaphore sem;
	sem.CreateGlobal(_L("WsExeSem"),0);
	RegisterWsExe(sem.FullName());

	DoTest();
	User::InfoPrint(_L("Test passed"));

	sem.Wait();	// continue running Eikon until that exits as well
#else
	DoTest();
	User::InfoPrint(_L("Test passed"));
#endif

	return(KErrNone);
	}