Compile error in 'winbase.h'

Are you including <winbase.h> directly?

You shouldn't - it expects to have some things defined/declared before it's processed. Specifically in this case the identifier ULONG_PTR which is declared as a typedef in intsafe.h.

Include <windows.h>.


If your code is fine, and there is no missing semicolons before #include "winbase.h" then it should be a missing include before winbase.h (or one of the files that includes it).


You are probably missing a ; immediate before the #include <windows.h> line in your code. Alternatively, there is some identifier-like text preceding the include file line.

int ABC
#include <windows.h>