标题:有个问题~~
只看楼主
yuhuidie36
Rank: 1
等 级:新手上路
帖 子:8
专家分:0
注 册:2007-11-13
 问题点数:0 回复次数:2 
有个问题~~
bool creatprocess(
LPCTSTR lpapplicationname,
LPTSTR lpcommandline,
LPSECURITY_ATTRIBUTES lpprocessattribute,
LPSECURITY_ATTRIBUTES lpthreadattributes,
bool blnherithandles,
DWORD dwcreationflags,
LPVOID llpenvironment,
LPCTSTR lpcurrentdirectory,
LPSTARTUPINFO lpstartupinfo,
LPPROCESS_INFORMATION lpprocessinformation);
DWORD WAITFORSINGLEOBJECT(HANDLE hhandle, DWORD dwmilliseconds);
bool CLOSEHANDLE(
HANDLE hobject
);
bool GETEXITCODEPROCESS(
HANDLE hprocess,
LPDWORD lpexitcode
);
#include<windows.h>
#include<stdio.h>
#define bufsize 1024
void main()
{
DWORD dwexitcode;
PROCESS_INFORMATION pi;
DWORD ret;
STARTUPINFO si={sizeof(si)};
ret=creatprocess(NULL,"calc.exe",NULL,NULL,FALSE,0,NULL,NULL,&si,&pi);
if(ret)
{
WAITFORSINGLEOBJECT(pi.hprocess,infinte);
CLOSEHANDLE(pi.hthread);
GETEXITCODEPROCESS(pi.hprocess,&dwexitcode);
CLSEHANDLE(pi.hprocess);
}
printf(\n进程结束退出码是%ld\n",ret);
}
执行后有错误,说是
error C2065: 'LPCTSTR' : undeclared identifier
error C2146: syntax error : missing ')' before identifier 'lpapplicationname'
帮忙找一下,实在是不知道咋回事!

[此贴子已经被作者于2007-11-13 10:45:29编辑过]

搜索更多相关主题的帖子: bool DWORD ATTRIBUTES LPCTSTR LPSECURITY 
2007-11-13 09:47
cl3922502
Rank: 1
等 级:新手上路
帖 子:22
专家分:0
注 册:2007-11-13
得分:0 
2007-11-13 10:53
yuhuidie36
Rank: 1
等 级:新手上路
帖 子:8
专家分:0
注 册:2007-11-13
得分:0 
晕!
2007-11-13 10:53



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-185689-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.110244 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved