|
-
August 5th, 1999, 06:02 PM
#1
IS IT POSSIBLE TO SEND PARAM????
Hi,
Is it possible to pass parameters to mfc application (dialog based) when it is invoked??. ie I have vc++ application APP1, using CreateProcess(...) launches another vc++ app(dialog based) APP2, How to gather the parameters sent from the CreateProcess() in the APP2.
Thanx
-
August 6th, 1999, 02:50 PM
#2
Re: IS IT POSSIBLE TO SEND PARAM????
You can do something like this in the program using createProcess:
char pathStr[MAXPATH] = "c:\myPath\myProgram.exe";
char commandLine[100] = "1 1 0";
CreateProcess(pathStr,
commandline,
NULL,
NULL,
FALSE,
NORMAL_PRIORITY_CLASS,
NULL,
NULL,
&suInfo,
&procInfo);
In the program that is being executed do something like this...
LPTSTR pCommandLine;
pCommandLine = GetCommandLine();
if(pCommandLine == NULL)
{
// error
}
-
August 7th, 1999, 06:31 PM
#3
Re: IS IT POSSIBLE TO SEND PARAM????
Thanx a lot. I got it working.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|