码迷,mamicode.com
首页 > 其他好文 > 详细

CreateProcess

时间:2020-03-23 09:25:53      阅读:54      评论:0      收藏:0      [点我收藏+]

标签:argc   clu   amp   process   code   iostream   env   rtu   include   

#include "stdafx.h"
#include "windows.h"
#include "iostream.h"

void env()
{
    PROCESS_INFORMATION pi={0};
    STARTUPINFO si={0};
    si.cb=sizeof(si);

    CreateProcess("child.exe",NULL,NULL,NULL,FALSE,0,NULL,NULL,&si,&pi);
    cout<<"pi.dwProcessId:"<<pi.dwProcessId<<endl;
    cout<<"pi.dwThreadId:"<<pi.dwThreadId<<endl;
    cout<<"pi.hProcess:"<<pi.hProcess<<endl;
    cout<<"pi.hThread:"<<pi.hThread<<endl;

}

int main(int argc, char* argv[])
{
    env();
    return 0;
}

 

CreateProcess

标签:argc   clu   amp   process   code   iostream   env   rtu   include   

原文地址:https://www.cnblogs.com/butchert/p/12550021.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!