3 ms·
> storing a pointer in a DWORD variable (very common on 32-bit Windows) Is it? I mean, if you're lucky it won't cause a compiler warning on x86, but the sane t
by TillE 11y ago
> storing a pointer in a DWORD variable (very common on 32-bit Windows)
Is it? I mean, if you're lucky it won't cause a compiler warning on x86, but the sane thing to do is to use the types which the API docs specify. Which would usually be things like LPVOID or HANDLE.
That's basically how I managed to port a service and several drivers to 64-bit Windows many years ago with almost no changes.
- acqq 11y agoAt the time the code was written the warnings you get now didn't exist. Then the 32-bit code worked, so nobody needed to change the it. Now with windows 8 they see it for the first time that it doesn't work. I know as I also worked on the huge codebase where the oldest pieces of the code were written around 1995.