Article ID: 102025
Article Last Modified on 11/1/2006
struct
{
WORD y;
WORD x;
} POS;
lparam = (DWORD) POS;
Basically, there is assumption in the code that Little Endian is being
used. The switching of the bytes is being assumed in the 'C'
structure. This is faster on Intel architecture, but will not work
with Big Endian.
#define BITMASK 0x0008This allows you to check if the 4th bit is a 1 if you AND it with another number. It also allows you to set the 4th bit by OR-ing it with another value. The problem comes when you OR or AND this with DWORD (Double Word) or anything other than a WORD size value. This causes strange things to happen and unexpected results. You might make assumptions about how it works with Little Endian, yet it won't work the same way with Big Endian. A large amount of code is already created with these assumptions built in.
Additional query words: prodnt uuh apple mips
Keywords: kbhardware KB102025