/** * Executable Entry Point * Top level always creates TRAP harness. * Calls MainL() inside the TRAP harness */ GLDEF_C TInt E32Main() { __UHEAP_MARK; CTrapCleanup* cleanup = CTrapCleanup::New(); if(cleanup == NULL) { return KErrNoMemory; } // Fix PDEF124952, set the priority EPriorityAbsoluteHigh. In this case, the timeout will // take effect even if the server executes with almost 100% CPU usage. RThread().SetPriority(EPriorityAbsoluteHigh); // End PDEF124952 // Check to see if the plugin wrapper around the GetSystemDrive is loadable // If yes, then instantiate the wrapper object and obtain the default system drive // Else, use the hardcoded default drive as c: TDriveName defaultSysDrive(KTEFLegacySysDrive); RLibrary pluginLibrary; CWrapperUtilsPlugin* plugin = TEFUtils::WrapperPluginNew(pluginLibrary); if (plugin!=NULL) { TDriveUnit driveUnit(plugin->GetSystemDrive()); defaultSysDrive.Copy(driveUnit.Name()); delete plugin; pluginLibrary.Close(); } TBool enableSysStart = ETrue; CTestExecuteIniData* iniData = NULL; TRAPD(err, iniData = CTestExecuteIniData::NewL(defaultSysDrive)); if (err == KErrNone) { // Extract all the key values within the object iniData->ExtractValuesFromIni(); iniData->GetKeyValueFromIni(KTEFSystemStarter, enableSysStart); } err = KErrNone; #if !(defined TEF_LITE) if (enableSysStart) { TRAP(err, StartSystemL()); __ASSERT_ALWAYS(!err, User::Panic(KTestExecuteName,err)); } #endif if (iniData != NULL) { delete iniData; } err = KErrNone; TRAP(err,MainL(defaultSysDrive)); __ASSERT_ALWAYS(!err, User::Panic(KTestExecuteName,err)); delete cleanup; __UHEAP_MARKEND; return KErrNone; }
GLDEF_C TInt E32Main() /** @return - Standard Epoc error code on process exit Secure variant only Process entry point. Called by client using RProcess API */ { __UHEAP_MARK; CTrapCleanup* cleanup = CTrapCleanup::New(); if (cleanup == NULL) { return KErrNoMemory; } TRAPD(err,MainL()) ; // This if statement is here just to shut up RVCT, which would otherwise warn // that err was set but never used if (err) { err = KErrNone; } delete cleanup; __UHEAP_MARKEND; return KErrNone; }
LOCAL_C void DoStartL() { CActiveScheduler* scheduler = new (ELeave) CActiveScheduler(); CleanupStack::PushL(scheduler); CActiveScheduler::Install(scheduler); MainL(); CleanupStack::PopAndDestroy(scheduler); }
/** * @return - Standard Epoc error code on process exit * Secure variant only * Process entry point. Called by client using RProcess Integ */ GLDEF_C TInt E32Main() { __UHEAP_MARK; CTrapCleanup* cleanup = CTrapCleanup::New(); if(cleanup == NULL) { return KErrNoMemory; } #if (defined TRAP_IGNORE) TRAP_IGNORE(MainL()); #else TRAPD(err,MainL()); #endif delete cleanup; __UHEAP_MARKEND; return KErrNone; }
// Once this function gets invoked, the S60 autostart system should // have seen to it that the system is already up and running. We may // not want to hurry with launching anything else, however, as the // system may still be somewhat busy right after (or in the later // stages of) boot. GLDEF_C TInt E32Main() { int errCode = 0; __UHEAP_MARK; WITH_CLEANUP_STACK_ERR(errCode, WITH_ACTIVE_SCHEDULER_ERR(errCode, TRAP(errCode, MainL()); );
/** * Server entry point * @return Standard Epoc error code on exit */ TInt main() { __UHEAP_MARK; TRAP_IGNORE(MainL()); __UHEAP_MARKEND; return KErrNone; }
// ----------------------------------------------------------------------------- // E32Main() // E32Main function of the executable. // ----------------------------------------------------------------------------- // GLDEF_C TInt E32Main() { CTrapCleanup* cleanupStack = CTrapCleanup::New(); TRAPD( error, MainL() ); __ASSERT_ALWAYS( !error, User::Panic( KPanicNote, error ) ); delete cleanupStack; return 0; }
// Cleanup stack harness GLDEF_C TInt E32Main() { __UHEAP_MARK; CTrapCleanup* cleanupStack = CTrapCleanup::New(); TRAPD(error, MainL()); __ASSERT_ALWAYS(!error, User::Panic(KTCacheDeletionProcess, error)); delete cleanupStack; __UHEAP_MARKEND; return 0; }
GLDEF_C TInt E32Main() { CTrapCleanup* cleanup = CTrapCleanup::New(); if(cleanup == NULL) { return KErrNoMemory; } TRAPD(err,MainL()); delete cleanup; return KErrNone; }
/** Main */ GLDEF_C TInt E32Main() { CTrapCleanup* cleanup=CTrapCleanup::New() ; // get clean-up stack TRAPD(r,MainL()); delete cleanup ; // destroy clean-up stack return r; }
GLDEF_C TInt E32Main() { CTrapCleanup* tc = CTrapCleanup::New(); if (!tc) { return KErrNoMemory; } TRAPD(err, MainL()); delete tc; return err; }
LOCAL_C void DoStartL() { // Create active scheduler (to run active objects) CActiveScheduler* scheduler = new (ELeave) CActiveScheduler(); CleanupStack::PushL(scheduler); CActiveScheduler::Install(scheduler); MainL(); // Delete active scheduler CleanupStack::PopAndDestroy(scheduler); }
GLDEF_C TInt E32Main() { CTrapCleanup* cleanUpStack=CTrapCleanup::New(); if(cleanUpStack==NULL) { return KErrNoMemory; } TRAP_IGNORE(MainL()) delete cleanUpStack; return(KErrNone); }
GLDEF_C TInt E32Main() { __UHEAP_MARK; CTrapCleanup* cleanup = CTrapCleanup::New(); TRAPD(mainError, MainL()); if (mainError != KErrNone) { RDebug::Printf("T_RemoveInvalidFontFile.exe failed with error %i", mainError); } delete cleanup; __UHEAP_MARKEND; return KErrNone; }
GLDEF_C TInt E32Main() /** * @return - Standard Epoc error code on process exit * Secure variant only * Process entry point. Called by client using RProcess API */ { __UHEAP_MARK; CTrapCleanup* cleanup = CTrapCleanup::New(); if(cleanup == NULL) { return KErrNoMemory; } #if (defined TRAP_IGNORE) TRAP_IGNORE(MainL()); #else TRAPD(err,MainL()); #endif delete cleanup; __UHEAP_MARKEND; return KErrNone; }
/** Secure variant only Process entry point. Called by client using RProcess API @return - Standard Epoc error code on process exit */ GLDEF_C TInt E32Main() { __UHEAP_MARK; CTrapCleanup* cleanup = CTrapCleanup::New(); if(cleanup == NULL) { return KErrNoMemory; } TRAPD(err,MainL()); delete cleanup; __UHEAP_MARKEND; return err; }
GLDEF_C TInt E32Main() /* * return standard error code on exit */ { CTrapCleanup* cleanup = CTrapCleanup::New(); if(cleanup == NULL) { return KErrNoMemory; } TRAP_IGNORE(MainL()); delete cleanup; return KErrNone; }
GLDEF_C TInt E32Main() /** * @return - Standard Epoc error code on exit */ { CTrapCleanup* cleanup = CTrapCleanup::New(); if(cleanup == NULL) { return KErrNoMemory; } TRAPD(err,MainL()); delete cleanup; return err; }
/** * Server entry point * @return Standard Epoc error code on exit */ TInt main() { __UHEAP_MARK; CTrapCleanup* cleanup = CTrapCleanup::New(); if(cleanup == NULL) { return KErrNoMemory; } TRAP_IGNORE(MainL()); delete cleanup; __UHEAP_MARKEND; return KErrNone; }
TInt E32Main() { TInt err = KErrNoMemory; CTrapCleanup* cleanupStack = CTrapCleanup::New(); if ( cleanupStack ) { TRAP( err, MainL() ); } delete cleanupStack; cleanupStack = NULL; return err; }
TInt E32Main() { __UHEAP_MARK; CTrapCleanup* cleanup = CTrapCleanup::New(); TInt err = KErrNoMemory; if(cleanup) { TRAP(err, MainL()); delete cleanup; } __UHEAP_MARKEND; return err; }
GLDEF_C TInt E32Main() { CTrapCleanup* cleanup = CTrapCleanup::New(); if(cleanup == NULL) { return KErrNoMemory; } TRAPD(err,err=MainL()); if (err != KErrNone) User::Panic(_L("StartUsb::E32Main - Panic"), err); delete cleanup; return err; }
GLDEF_C TInt E32Main() { // Create cleanup stack __UHEAP_MARK; CTrapCleanup* cleanup = CTrapCleanup::New(); // Run application code inside TRAP harness TInt err = KErrNone; TRAP(err, MainL()); delete cleanup; cleanup = NULL; __UHEAP_MARKEND; return err; }
// ----------------------------------------------------------------------------- // E32Main // Just an E32Main and a MainL() // ----------------------------------------------------------------------------- // GLDEF_C TInt E32Main() /** * @return - Standard Epoc error code on exit */ { CTrapCleanup* cleanup = CTrapCleanup::New(); if(!cleanup) { return KErrNoMemory; } TRAP_IGNORE(MainL()); delete cleanup; cleanup = NULL; return KErrNone; }
/** * Entry point to the application. * @return Error code. */ GLDEF_C TInt E32Main() { TInt err = KErrNone; CTrapCleanup* trapCleanup = CTrapCleanup::New(); if ( trapCleanup ) { TRAP( err, MainL() ); delete trapCleanup; } else { err = KErrNoMemory; } return err; }
TInt ThreadFunc (TAny* /*aParam*/) /** * @return - Server exit code * @param - unused * Server Thread function. Guts of the code in the MainL() function */ { CTrapCleanup* cleanup = CTrapCleanup::New(); if(!cleanup) { return KErrNoMemory; } TRAPD(err,MainL()); delete cleanup; return KErrNone; }
TInt E32Main() { __UHEAP_MARK; CTrapCleanup* cleanup = CTrapCleanup::New(); if(!cleanup) return KErrNoMemory; TRAPD(err, MainL()); if (err != KErrNone) User::Panic(_L("Testing failed: "), err); delete cleanup; __UHEAP_MARKEND; return 0; }
TInt E32Main() { // Create cleanup stack __UHEAP_MARK; CTrapCleanup* cleanup = CTrapCleanup::New(); // Run application code inside TRAP harness TRAPD(testError, MainL()); if (testError) { User::Panic(_L("Test failure"), testError); } delete cleanup; __UHEAP_MARKEND; return KErrNone; } //lint -e714 Suppress 'not referenced'
// Console harness void ConsoleMainL() { // Get a console console = Console::NewL(_L("Inetd"), TSize(KConsFullScreen, KConsFullScreen)); CleanupStack::PushL(console); // Call function MainL(); // Wait for key console->Printf(_L("[ press any key ]")); console->Getch(); // Get and ignore character // Finished with console CleanupStack::PopAndDestroy(console); // Console }
TInt E32Main() { __UHEAP_MARK; __SYSUTIL_TRACE("Entered sysutilsetup.exe E32Main."); CTrapCleanup* cleanup = CTrapCleanup::New(); TInt err = KErrNoMemory; if ( cleanup != NULL ) { TRAP( err, MainL() ); delete cleanup; } __SYSUTIL_TRACE("Leaving sysutilsetup.exe E32Main."); __UHEAP_MARKEND; return err; }