internal static int LOWORD(IntPtr value) { int int32 = ((int)value.ToInt64() & 0xFFFF); return (int32 > 32767) ? int32 - 65536 : int32; }