I think that it is a historical accident.
My theory is that the original Windows developers knew that the standard C type sizes depend on the compiler, that is, one compiler may have 16-bit integer and another a 32-bit integer. So they decided to make the Window API portable between different compilers using a series of typedefs: DWORD
is a 32 bit unsigned integer, no matter what compiler/architecture you are using. Naturally, nowadays you will use uint32_t
from
, but this wasn't available at that time.
Then, with the UNICODE thing, they got the TCHAR
vs. CHAR
vs. WCHAR
issue, but that's another story.
And, then it grew out of control and you get such nice things as typedef void VOID, *PVOID;
that are utterly nonsense.