本文整理汇总了C++中MainL函数的典型用法代码示例。如果您正苦于以下问题:C++ MainL函数的具体用法?C++ MainL怎么用?C++ MainL使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了MainL函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: E32Main
/**
* 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;
}
示例2: E32Main
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;
}
示例3: DoStartL
LOCAL_C void DoStartL()
{
CActiveScheduler* scheduler = new (ELeave) CActiveScheduler();
CleanupStack::PushL(scheduler);
CActiveScheduler::Install(scheduler);
MainL();
CleanupStack::PopAndDestroy(scheduler);
}
示例4: E32Main
/**
* @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;
}
示例5: E32Main
// 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());
);
示例6: main
/**
* Server entry point
* @return Standard Epoc error code on exit
*/
TInt main()
{
__UHEAP_MARK;
TRAP_IGNORE(MainL());
__UHEAP_MARKEND;
return KErrNone;
}
示例7: E32Main
// -----------------------------------------------------------------------------
// 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;
}
示例8: E32Main
// 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;
}
示例9: E32Main
GLDEF_C TInt E32Main()
{
CTrapCleanup* cleanup = CTrapCleanup::New();
if(cleanup == NULL)
{
return KErrNoMemory;
}
TRAPD(err,MainL());
delete cleanup;
return KErrNone;
}
示例10: E32Main
/**
Main
*/
GLDEF_C TInt E32Main()
{
CTrapCleanup* cleanup=CTrapCleanup::New() ; // get clean-up stack
TRAPD(r,MainL());
delete cleanup ; // destroy clean-up stack
return r;
}
示例11: E32Main
GLDEF_C TInt E32Main()
{
CTrapCleanup* tc = CTrapCleanup::New();
if (!tc)
{
return KErrNoMemory;
}
TRAPD(err, MainL());
delete tc;
return err;
}
示例12: DoStartL
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);
}
示例13: E32Main
GLDEF_C TInt E32Main()
{
CTrapCleanup* cleanUpStack=CTrapCleanup::New();
if(cleanUpStack==NULL)
{
return KErrNoMemory;
}
TRAP_IGNORE(MainL())
delete cleanUpStack;
return(KErrNone);
}
示例14: E32Main
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;
}
示例15: E32Main
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;
}