Solution to a Class of Winnt Functions Use Problems Archive!

xiaoxiao2021-03-06  98

Copyfileex

Such functions may encounter the function that is clearly included in the header file but the compilation does not have, the display:

Error C2065: 'CopyFileEx': undeclared Identifiererror C2065: 'Copy_File_Restartable': undeclared Identifier

The solution is as follows:

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

Be sure to be before the header file

转载请注明原文地址:https://www.9cbs.com/read-95570.html

New Post(0)