编译时出现这个错误'CREATE_DISK' : undeclared identifier,可是对于CREATE_DISK我已经添加头文件windows.h了,问题究竟出在哪儿呢?最后一问,才知道是没有宏定义
WINNT 版本号之类
如果 那个 头文件 里 定义了 某些 定义 在 指定版本号里 的 ,就不能用
如:IOCTL_DISK_CREATE_DISK control code
Requirements
Minimum supported client
Windows XP [desktop apps only]
Minimum supported server
Windows Server 2003 [desktop apps only]
Header
WinIoCtl.h (include Windows.h)
Minimum supported client
Windows XP [desktop apps only]
Minimum supported server
Windows Server 2003 [desktop apps only]
Header
WinIoCtl.h (include Windows.h)
应该在调用该函数的文件的顶部加入以下语句:
#define _WIN32_WINNT 0x0500
#define _CRT_SECURE_NO_WARNINGS