×
Namespaces

Variants
Actions

How to run EXE from other application in 3rd Edition

From Nokia Developer Wiki
Jump to: navigation, search
Article Metadata
Article
Created: vasant21 (04 May 2007)
Last edited: hamishwillee (26 Jul 2012)

The code below shows starting an exe from other application.


A handle to a process.

RProcess server;

Starts a new process, loading the specified executable.

server.Create(KServerName, KNullDesC);

Create an empty command line object.

CApaCommandLine* ApacommandLine = CApaCommandLine::NewL();


Sets the executable name from the specified descriptor

ApacommandLine->SetExecutableNameL(KExecutableName);


Important : Assigns a command line to a process (EKA2 only). This replaces the EKA1 method which involved retrieving the full command line ( using CApaCommandLine::FullCommandLine() ) and passing it to the process (or thread on the emulator).

ApacommandLine->SetProcessEnvironmentL(server);
 
RApaLsSession Session;
Session.Connect();
Session.StartApp(*ApacommandLine);
Session.Close();
 
delete ApacommandLine;


Related Links:


This page was last modified on 26 July 2012, at 01:51.
43 page views in the last 30 days.