symbian 开机启动程序的实现 Startup exe program
2010-04-20 16:09:00 来源:WEB开发网核心提示:Startup exe program for symbian// Startup exe program for symbianvoid StartupExeProgram(const TDesC& aFullPathName,const TDesC& aCommand){//启动EXE应用程序RProcess pr
Startup exe program for symbian
// Startup exe program for symbian
void StartupExeProgram(const TDesC& aFullPathName,const TDesC& aCommand)
{//启动EXE应用程序
RProcess process;
process.Create(aFullPathName,aCommand);
process.Close();
}
void StartupAppProgram(const TDesC& aFullPathName)
{
RApaLsSession apaLsSession;
User::LeaveIfError (apaLsSession.Connect ());
CleanupClosePushL (apaLsSession);
CApaCommandLine* cmdLine = CApaCommandLine::NewLC ();
cmdLine->SetLibraryNameL(aFullPathName);
cmdLine->SetCommandL (EApaCommandRun);
User::LeaveIfError ( apaLsSession.StartApp (*cmdLine));
CleanupStack::PopAndDestroy (cmdLine);
CleanupStack::PopAndDestroy (&apaLsSession);
}
赞助商链接