start the console app from the UI app.
when the UI app is exit or crash, the console is still running.
how?
start the console app from the UI app.
when the UI app is exit or crash, the console is still running.
how?
Hi,
May this code will help you
Regards,Code:TBuf<50> KMyAppName = _L("MYEXE.EXE"); CompleteWithAppPath(KMyAppName); EikDll::StartExeL(KMyAppName);
Peter
Hi
Any way For 2nd edition the above code works fine for me.
and for 3rd edition i am using this code
Regards,Code:RProcess server; server.Create(_L("\\sys\\bin\\myexe.exe"), KNullDesC); server.Resume();
Peter
Code:TInt RunExeL( const TDesC& aExeName) { TPtrC exePtr; exePtr.Set(aExeName); if (exePtr != KNullDesC()) { RApaLsSession apaLsSession; TInt err = apaLsSession.Connect(); if (err != KErrNone) { return err; } else { CleanupClosePushL(apaLsSession); // push apaLsSession CApaCommandLine* cmd = CApaCommandLine::NewLC(); // push cmd cmd->SetExecutableNameL(exePtr); cmd->SetCommandL(EApaCommandOpen); err = apaLsSession.StartApp(*cmd); if (err != KErrNone) { return err } CleanupStack::PopAndDestroy(cmd); // pop cmd CleanupStack::PopAndDestroy(); // pop apaLsSession } } }
Did you Tried It must Not Exit.
RApaLsSession aSession;
aSession.Connect();
CApaCommandLine* aCmd = CApaCommandLine::NewL();
aCmd->SetExecutableNameL(_L("S60exe.exe"));
aCmd->SetCommandL( EApaCommandRunWithoutViews );
aSession.StartApp(*aCmd);
/*
aCmd->SetExecutableNameL(_L("myexe.exe"));
aCmd->SetCommandL( EApaCommandOpen );
aSession.StartApp(*aCmd);
*/
aSession.Close();
delete aCmd;
works.
thanks
Hi,
It doesn't need any special capability.
look at this thread for your clarification. http://newlc.com/topic-18599 and more over I have tried that in my application too.
Regards,
Peter