欢迎访问:常州市武进区嘉泽中心小学网站 !今天是:
栏目列表
您现在的位置是:首页>>教师>>计算机技术>>程序设计>>杂项>>文章内容
一类WINNT函数使用问题的解决方法存档!
发布时间:2008-11-20   点击:   来源:本站原创   录入者:佚名
 

诸如CopyFileEx

这样的函数在使用的时候可能会碰到明明是包含在头文件里的函数但编译不过去,显示如下:

error C2065: 'CopyFileEx' : undeclared identifier
error C2065: 'COPY_FILE_RESTARTABLE' : undeclared identifier

解决方法如下:

For example, to use the features specifically marked for Windows 2000 in the header files, you need to explicitly define _WIN32_WINNT as 0x0500 or greater. You can define the symbols using the #define statement in each source file, or by specifying the /D_WIN32_WINNT=0x0500 compiler option supported by Visual C++.

#define    _WIN32_WINNT  0x0500

#include <windows.h>

一定要在头文件<windows.h>之前


附件:
    关闭窗口
    打印文档
    账号登录
    保持登录 忘记密码?
    账号与武进教师培训平台同步