Why does the Win32-API have so many custom types?
Posted
by sub
on Stack Overflow
See other posts from Stack Overflow
or by sub
Published on 2010-04-15T18:28:57Z
Indexed on
2010/04/15
18:33 UTC
Read the original article
Hit count: 153
win32
I'm new to the Win32 API and the many new types begin to confuse me.
Some functions take 1-2 ints
and 3 UINTS
as arguments.
- Why can't they just use ints? What are UINTS?
Then, there are those other types:
DWORD LPCWSTR LPBOOL
- Again, I think the "primitive" C types would be enough - why introduce 100 new types?
This one was a pain: WCHAR*
I had to iterate through it and push_back every character to an std::string as there wasn't another way to convert it to one. Horrible.
- Why
WCHAR
? Why reinvent the wheel? They could have just usedchar*
instead, or?
© Stack Overflow or respective owner