| 发表于:2007-06-21 19:56:321楼 得分:10 |
startupinfo si; process_information pi; zeromemory( &si, sizeof(si) ); si.cb = sizeof(si); zeromemory( &pi, sizeof(pi) ); // start the child process. if( !createprocess( null, // no module name (use command line). text( "mychildprocess "), // command line. null, // process handle not inheritable. null, // thread handle not inheritable. false, // set handle inheritance to false. 0, // no creation flags. null, // use parent 's environment block. null, // use parent 's starting directory. &si, // pointer to startupinfo structure. &pi ) // pointer to process_information structure. ) { printf( "createprocess failed (%d).\n ", getlasterror() ); return; } | | |
|