正在加载图片...
PROCESS CREATION IN WIN32 #include <stdio.h> #include <windows.h> int main(VOID) STARTUPINFO si; PROCESS_INFORMATION pi; /allocate merory ZeroMemory(si,sizeof(si)); si.cb sizeof(si); ZeroMemory(pi,sizeof(pi)); /create child process if (ICreateProcess(NULL,/use command line "C:\\WINDOWS\\system32\\mspaint.exe",/command line NULL,/don't inherit process handle NULL,/don't inherit thread handle FALSE,/disable handle inheritance 0,/no creation flags NULL,/use parent's environment block NULL,/use parent's existing directory 51, 卸i)) fprintf(stderr,"Create Process Failed"); return -1; /parent will vait for the child to complete WaitForSingleObject(pi.hProcess,INFINITE); printf("Child Complete"); /close handles CloseHandle(pi.hProcess); CloseHandle(pi.hThread);PROCESS CREATION IN WIN32
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有