how can i create process on C/C++ using win apis??? i used CreateProcess but it didnt worked... is there any alternative function when im using c/c++ importing win apis?thanks....
this is the code:
CreateProcess(NewProcess, NewProcess, NULL, NULL, NULL, 0x10, NULL, NULL, p1, p2);
the last 2 params are pointers to defined struct.
I also used this func w/ the same params in assembly and it worked perfectly, but wen in use it in C/C++, it generates an error: "failed to initialize application". the NewProcess actually runs and terminated imidiately after displaying such msg.
thanks...
If both the application name and the command line arguments are non-NULL, the null-terminated string pointed to by the application name argument specifies the module to execute, and the null-terminated string pointed to by the command line argument specifies the command line.
You have both these arguments specified and identical - are you sure this is correct for your call ?
That being correct I would have a closer look at your flags parameter.
As an example :
void foo()
{
STARTUPINFO si;
PROCESS_INFORMATION pi;
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.