The Windows API is old. Really old. Older than the official C standard old.
This means that, at the start, the Windows API had to deal with all kinds of ancient C compilers, with different levels of language support. Some might not support void
. Some might have an int
type that's not compatible with what windows thought was int
. Some might not understand short
. As a workaround, the Windows API provides upper-case portable equivalents that are aliased to whatever works for that particular compiler.
Of course, with modern compilers, things have settled down quite a bit. Everyone supports void
, for example. However, in order to maintain compatibility with old code that uses these upper-case macros, the #define
s and typedef
s have to remain.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…