在 Windows 编程中使用 DWORD
,但是不包含 Windows.h
的方法
包含 intsafe.h
、concrt.h
、WinDef.h
或 minwindef.h
四者之一就可以。我不知道为什么微软会在这么多文件里定义 DWORD
。
注意,这些头文件的适用场合不同,而且已知:
intsafe.h
是 Windows Shell 使用的头文件。Windows.h
和WinDef.h
有冲突;Windows.h
和minwindef.h
也有冲突;concrt.h
是用于 Windows C++ 并行编程的头文件;
参考网址:Windows Data Types