Recent changes

2013-04-14 2013-04-02 2013-02-17 2013-01-29 2013-01-20 2013-01-18 2012-12-08 2012-11-06 2012-09-04 2012-08-02

CreateProcess

Processを作る。WIN32API。

example

<pre> #include <windows.h> #include <stdio.h>

int main(void) {

   // プロセス起動
   PROCESS_INFORMATION ProcInfo;
   STARTUPINFO         StartupInfo;
   memset(&StartupInfo, 0x00, sizeof(STARTUPINFO));
   StartupInfo.cb = sizeof(STARTUPINFO);
   
   BOOL ret;
   ret = ::CreateProcess(  NULL,
                           "notepad.exe",
                           NULL,
                           NULL,
                           TRUE,
                           0,
                           NULL,
                           NULL,
                           &StartupInfo,
                           &ProcInfo  );
   if( ret != TRUE ){
       printf("起動失敗");
       return 0;
   }
   CloseHandle(ProcInfo.hProcess);

} </pre>

関連リンク