I've a problem with my following code:
int main(int argc, char **argv) {
PROCESS_INFORMATION pi;
STARTUPINFO si;
printf("Process %d reporting for duty
",GetCurrentProcessId());
GetStartupInfo(&si);
CreateProcess(NULL,"notepad.exe", NULL,NULL,FALSE,DETACHED_PROCESS, NULL,NULL, &si, &pi);
printf("New Process ID: %d
",pi.dwProcessId);
return(0);
}
And on the runing time,I ran this while debuggin and it crashes on the CreateProcess method,with this error message:" Unhandled exception at 0x7c82f29c in Tests.exe: 0xC0000005: Access violation writing location 0x00415760."
What does it means???
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…