Original Post
I recently switched from a really old sdk to the newest. Upon compiling I ran into some compiler errors. I tracked it down to a few macros that's declared in windef.h, i.e HIWORD, LOWORD etc. What MS did was to change: #define HIWORD(l) ((WORD)((DWORD)(l) >> 16)) to #define HIWORD(l) ((WORD)((DWORD_PTR)(l) >> 16)) Now my compiler complains that DWORD_PTR isn't an integral and hence it can't be shifted. I'm using a fairly recent compiler (Intel v8). What does the standard say about this? Should you be able to shift, and, or, xor pointers? I guess the change has something to do with 64-bit support. But it seems strange that MS did it in a way that created lot's of problems for many compilers. [Edited by - eq on March 2, 2007 7:49:44 AM]