Most of my coding has been on 32 bit Windows and there has been this subconscious assumption I’ve always made that I could safely cast any pointer to a
DWORD. I gotta change that now I guess though it’s tough to stop assuming my subconscious assumptions cause they are – well, subconscious assumptions (bad joke – yeah I know, I know, but I am in that sorta mood).
Luckily, if you turn on the /Wp64 compiler option, you’ll get a C4311 compiler warning if you attempt to do that. If you only intend to run your 32-bit programs in a 64-bit OS that supports 32-bit compatibility mode this is okay I guess, but if you want to take your code and recompile it using a 64-bit compiler in the near future, then it’d be best to turn on this /Wp64 option for all your current projects.