Yulia
asked on
CreateProcess function
I have an MFC application and I need
to run another process (wich is console application) from it, I have an Acces Violation error.
Here is the code
CreateProcess("S:\Version1 \TempContr ol\Debug\T empControl .exe", NULL, NULL, NULL, FALSE,
0,NULL,NULL,NULL, NULL)
Thanks
to run another process (wich is console application) from it, I have an Acces Violation error.
Here is the code
CreateProcess("S:\Version1
0,NULL,NULL,NULL, NULL)
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks Mike, just one little problem,
when I write a full psth for application:
"S:\Version1\TempControl\D ebug\TempC ontrol.exe "
the compiler doesn't like "\"
Thanks anyway
when I write a full psth for application:
"S:\Version1\TempControl\D
the compiler doesn't like "\"
Thanks anyway
Yulia ,try \\ ,\ is escape directive in C++
"S:\\Version1\\TempControl \\Debug\\T empControl .exe"
Regards
W.Yinan
"S:\\Version1\\TempControl
Regards
W.Yinan
Wyn's right,
you need double slashes in C/C++ because
as he says '\' is an escape character.
regards,
Mike.
you need double slashes in C/C++ because
as he says '\' is an escape character.
regards,
Mike.
ASKER
Thanks, it's working
// be nice and give NT back it's resources
CloseHandle(PI.hProcess);
CloseHandle(PI.hThread);
regards,
Mike.