In my application , there are 2 menuitems corresponding to the different calls . One is call a panel which can process file I/O ,and the other uses "CreateProcess()" to launch another application .
If first time call CreateProcess() , it can launch application correctly , but once first time active the file I/O calling instead of activing it ,after close the file I/O panel ,then call the CreateProcess(), it always return zero . The CreateProcess() is coading as :
...
STARTUPINFO si ;
PROCESS_INFORMATION piProcess;
ZeroMemory(&si,sizeof(si));
si.cb = sizeof(si);
CreateProcess("Myfile.exe",my Comand line,NULL,NULL,FALSE,CREATE_DEFAULT_ERROR_MODE|DETACHED_PROCESS,NULL,my process location,&si,&piProcess);
...
Can any
one tell me what is wrong ? Thanks.
David