Since these types are defined by the typedef specifier, there is no single reliable method to check their presence in the SDK version being used with the help of the #ifdef directive at the preprocessing step. However, the maximum value for these types is defined through MAXULONG_PTR in the basetsd.h file and you may do the following:
#if !defined(MAXULONG_PTR) typedef DWORD DWORD_PTR; #endif
References
- Discussion at Stackoverflow.com. "How to detect if the Windows DWORD_PTR type is supported, using an ifdef?"
- MSDN Library. error C2065: 'DWORD_PTR' : undeclared identifier.
Комментариев нет:
Отправить комментарий