VOID and INT typedef upper case macro assignment in winnt.h

Does anyone know why there is a top macro VOIDdefined in the header winnt.h?

To make things more confusing, VOIDit is a macro while CHAR, SHORT, INTand LONGare typedefs.

See related 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 VOID* pointerinstead VOID* pointer?

EDIT . Even more troubling is viewing people using Windows VOIDinstead of VOIDwhen programming today . You can also see it as part of MSDN documents, for example. http://msdn.microsoft.com/en-us/library/bb205867(v=vs.85).aspx

+6
2

, API Win32 , ( ), C. , , , , , ( , C, ).

VOID #define typedef, : typedef typedef void VOID;, C ( "" Microsoft C ) , .

+11

Windows API . . C.

, Windows API C . void. int, , int. short. API Windows , , , .

, . , void. , , , #define typedef .

+17

All Articles