Also, this isn’t what you asked, but it is something you should know anyway.
Do not cast pointers to “uint”, “unsigned int”, “unsigned long”, “int”, “long”, “__int32”, “u32”, “DWORD”, or any variation thereof.
Pointers are not 32 bits.
Pointers are not 64 bits.
Pointers are 32 bits on some architectures, 64 bits on others, and 16 bits in still others, so it doesn’t make sense to cast them to “uint” or any other type that is not always exactly the same size as a pointer.
The Windows® SDK exposes a type called UINT_PTR. Other platforms define uintptr_t (in <cstdint>).
They exist for a reason. Never cast pointers to “uint”.
Does this apply to all pointers, or just function pointers?
I thought that the pointer size is always 4 bytes on 32bit systems (8bytes on 64bit, all depending on the target build settings), but what you're saying is that this is wrong?