Anyone any clue as to why there is an uppercase VOID macro defined in the winnt.h header?
To make matters more confusing, VOID is a macro, whereas CHAR, SHORT, INT, and LONG are typedefs.
See the relevant excerpt from winnt.h:
#ifndef VOID
#define VOID void
typedef char CHAR;
typedef short SHORT;
typedef long LONG;
#if !defined(MIDL_PASS)
typedef int INT;
#endif
#endif
A historical reason perhaps for doing VOID* pointer instead of void* pointer?
EDIT: What is even more troubling is to see people using VOID instead of void when doing Windows programming today. You can also see it as part of MSDN docs, e.g. http://msdn.microsoft.com/en-us/library/bb205867(v=vs.85).aspx
The original reason is that the Win32 API was originally supposed to be language independent, so they made up their own names (following their naming convention), and then provided a C implementation of that. In reality, much of what they defined tends to be ignored by most people using other languages (and largely even by people using C, for that matter).
As far as why
VOIDis a#defineinstead of atypedef, that’s pretty simple: the requiredtypedefwould betypedef void VOID;, but C (as “defined” by Microsoft’s C compilers from that time) simply doesn’t allow that, so they use a macro instead.