-
createprocess problem
Hi
I have problem ?
questions: borland C windows api called.
C:\\Documents and Settings\\user\\Desktop\\a.ppt running
Code:
#include <iostream.h>
#include <windows.h>
const int BUF_SIZE = 1024;
int main(int argc, char *argv[])
{
STARTUPINFO siStartupInfo;
PROCESS_INFORMATION piProcessInfo;
memset(&siStartupInfo, 0, sizeof(siStartupInfo));
memset(&piProcessInfo, 0, sizeof(piProcessInfo));
siStartupInfo.cb = sizeof(siStartupInfo);
if(CreateProcess("C:\\Documents and Settings\\user\\Desktop\\a.ppt ",
"a.ppt ",
0,
0,
FALSE,
CREATE_DEFAULT_ERROR_MODE,
0,
0,
&siStartupInfo,
&piProcessInfo) == FALSE)
return 0;
}
Where is the problem ?
-
Quote:
Where is the problem ?
You bumped an old thread which isn't allowed. Please take the time to read the forum guidelines which explain this and other points that will help you to get better advice for your programming problems.
I've moved your question here and posted this information here since, apparently, I'm unable to send you a private message.
**********
iostream.h is non-standard but your compiler might complain if you include the standard 'iostream' header - consider using a more recent compiler.
On failure of the CreateProcess function, use GetLastError to provide more information about that failure.