3,881
社区成员
发帖
与我相关
我的任务
分享
DWORD dwexitcode;
GetExitCodeProcess(m_hProcess,&dwexitcode);
printf("%d",dwexitcode);
//LPWSTR sting[256]; 这么写错误了,我们要的是字符数组,不是指针数组
TCHAR cmdline[256]; //string不适合做变量名,换成cmdline吧
LPWSTR string= {0}; //完全不明白为什么这么写?
LPWSTR string1= {0};
LPDWORD dwexitcode;
wsprintf(string,_T("p"));
wsprintf(string1,_T("F:\\calculator.exe %s"),p);
LPWSTR string[256] ; //定义为局部数组变量,函数结束自动释放
LPWSTR string1[256];
LPDWORD dwexitcode;
wsprintf(string,_T("p"));
wsprintf(string1,_T("F:\\calculator.exe %s"),p);
图片挂了。我重发
bool bsucess = CreateProcess(NULL,
string1,
NULL,
NULL,
FALSE,
0,
NULL,
NULL,
&si,
&pi);