Remix.run Logo
Dwedit a day ago

To be fair, the C standard for types is pretty dreadful. How big is an int? A long? Want an integer type that matches the size of a pointer? <stdint.h> did fix a lot of the issues, but people targeting an early C version don't have this header available.

Windows type names have stayed mostly stable since Win32, but some of them are still misleading. DWORD, UINT and ULONG are all 32-bit unsigned integer types. But in C#, "ulong" is a 64-bit type despite having the same name, this leads to making mistakes when transcribing Win32 type names into C# code.

Windows came up with its type names before <stdint.h> existed, so you won't see any uint32_t in there, just DWORD.

fithisux a day ago | parent [-]

It make sense.