类型:转载 责任编辑:asp.net 日期:2007/05/23
热门软件下载:
用VC7.0编译器,OS为2000或者XP,创建一个JOB对象
#include <windows.h>
int WINAPI WinMain(HINSTANCE hInstance,HINSTANCE,PSTR pszCmdLine,int)
{
CreateJobObject(NULL,NULL);
return 0;
}
为了简化起见,写成上面的程序,编译提示错误:“CreateJobObject”:未声明的标识符
但我在winbase.h中找到有这个文件的声明,MSDN中也未发现有什么特殊的设置,向各为请
教,到底哪里出了错?
windows.h中的WINVER宏值是0x0501
网友回答:
Look at <winbase.h> where the function is declared. It is protected by
condition compilation directives:
#if (_WIN32_WINNT >= 0x0500)
Define the symbol before you include <windows.h>