2 * macros.h: Useful macros
5 * Dick Porter (dick@ximian.com)
7 * (C) 2002 Ximian, Inc.
10 #ifndef _WAPI_MACROS_H_
11 #define _WAPI_MACROS_H_
15 #if defined(__native_client__)
16 #include <mono/metadata/nacl-stub.h>
19 #define MAKEWORD(low, high) ((guint16)(((guint8)(low)) | \
20 ((guint16)((guint8)(high))) << 8))
21 #define MAKELONG(low, high) ((guint32)(((guint16)(low)) | \
22 ((guint32)((guint16)(high))) << 16))
23 #define LOWORD(i32) ((guint16)((i32) & 0xFFFF))
24 #define HIWORD(i32) ((guint16)(((guint32)(i32) >> 16) & 0xFFFF))
25 #define LOBYTE(i16) ((guint8)((i16) & 0xFF))
26 #define HIBYTE(i16) ((guint8)(((guint16)(i16) >> 8) & 0xFF))
28 #endif /* _WAPI_MACROS_H_ */