how will pass argument in a launching exe.

Login to reply to this topic.
Tue, 2008-01-22 04:58
Joined: 2006-05-08
Forum posts: 79

hi dude,
i am able to launch exe through RProcess (Create()API), but i am not able to passing
argument. pls help me.

Thanks,
Sanjay Sad


Tue, 2008-01-22 10:18
Joined: 2005-04-13
Forum posts: 121
Re: how will pass argument in a launching exe.

Hi Sanjay,

Pass the data to be sent to the creating exe as aCommand in the API,
TInt Create(const TDesC &aFileName, const TDesC &aCommand, TOwnerType aType=EOwnerProcess);

In the created exe, it will come as command line arguments, that can be read using CCommandLineArguments.
If you are using PIPS, u can also read the same arguments argc and argv fashio too.


Jupitar

Tue, 2008-01-22 17:30
Joined: 2004-06-08
Forum posts: 148
Re: how will pass argument in a launching exe.

       
RApaLsSession appSession;
User::LeaveIfError(appSession.Connect());
CleanupClosePushL(appSession);
TUid uid;
uid.iUid = XXXXXXXXX ;//UID of your application
TApaAppInfo appInfo;
appSession.GetAppInfo(appInfo, uid);
CApaCommandLine* commandLine = CApaCommandLine::NewL();
CleanupStack::PushL(commandLine);
commandLine->SetExecutableNameL(appInfo.iFullName);
commandLine->SetTailEndL(aBuf);        //parameter
appSession.StartApp(*commandLine);
CleanupStack::PopAndDestroy(2);       

Hope it helps.

Wed, 2008-01-23 07:05
Joined: 2006-05-08
Forum posts: 79
Re: how will pass argument in a launching exe.

Thanks,thank u very much

  • Login to reply to this topic.