Here's a little gem of wisdom that I wish other coders and developers would figure out:
Pointer Values != DWORDs
Reinterpreting them to DWORDs causes no end to problems. Yes, on a 32-bit platform, they're DWORDs. On a 16-bit or 8-bit, they're not- they can either be DWORDs or WORDs depending on architechture. On a 64-bit machine, they're QWORDs. If you want to make a handle, in other words, an opaque pointer, declare a typedef for void * and go to town. If you're recycling something that was intended for use with DWORDs or INT32s to handle indexing or tracking pointers, you might want to take the time to think about and re-think your design to use the right data types.
These are the same silly things that I saw with migrating DOS applications to Windows. It's the same silly things I saw with migrating Win16 to Win32 applications.
It's so easy to write code in a manner to avoid this stuff, I guess that I'm amazed that I keep finding gems like this in modern code.