Hi all ..
Can someone enlighten me why on this earth is this code giving out the
error.
const char *Path = "\"C:\\winnt\\system32\\cscript.exe\"";
ZeroMemory( &si, sizeof(si) );
si.cb = sizeof(si);
si.dwFlags = STARTF_RUNFULLSCREEN;
ZeroMemory( &pi, sizeof(pi) );
// Start the child process.
if( !CreateProcess(NULL,
TEXT(Path),
NULL,
NULL,
FALSE,
CREATE_NEW_CONSOLE,
NULL,
NULL,
&si,
&pi ))
{
printf( "CreateProcess failed (%d).\n", GetLastError() );
return;
}
But when i pass the same path, hardcoded into the function,
createprocess, it compiles fine. What am i doing wrong ??
Thanks for your time !!
Prakash437