Moved DCX_* constants to winuser.h.
[wine/multimedia.git] / include / guiddef.h
blob9f1b7d89860cfab39c16744ef7a7cfdb9d158fab
1 #ifndef GUID_DEFINED
2 #define GUID_DEFINED
3 typedef struct _GUID
5 unsigned long Data1;
6 unsigned short Data2;
7 unsigned short Data3;
8 unsigned char Data4[ 8 ];
9 } GUID;
10 #endif
12 #undef DEFINE_GUID
14 #ifdef INITGUID
15 #define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
16 const GUID name = \
17 { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } }
18 #else
19 #define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
20 extern const GUID name
21 #endif
23 #define DEFINE_OLEGUID(name, l, w1, w2) \
24 DEFINE_GUID(name, l, w1, w2, 0xC0,0,0,0,0,0,0,0x46)
26 #ifndef _GUIDDEF_H_
27 #define _GUIDDEF_H_
29 typedef GUID *LPGUID;
30 typedef GUID CLSID,*LPCLSID;
31 typedef GUID IID,*LPIID;
32 typedef GUID FMTID,*LPFMTID;
34 #if defined(__cplusplus) && !defined(CINTERFACE)
35 #define REFGUID const GUID &
36 #define REFCLSID const CLSID &
37 #define REFIID const IID &
38 #define REFFMTID const FMTID &
39 #else /* !defined(__cplusplus) && !defined(CINTERFACE) */
40 #define REFGUID const GUID* const
41 #define REFCLSID const CLSID* const
42 #define REFIID const IID* const
43 #define REFFMTID const FMTID* const
44 #endif /* !defined(__cplusplus) && !defined(CINTERFACE) */
46 #if defined(__cplusplus) && !defined(CINTERFACE)
47 #define IsEqualGUID(rguid1, rguid2) (!memcmp(&(rguid1), &(rguid2), sizeof(GUID)))
48 #else /* defined(__cplusplus) && !defined(CINTERFACE) */
49 #define IsEqualGUID(rguid1, rguid2) (!memcmp(rguid1, rguid2, sizeof(GUID)))
50 #endif /* defined(__cplusplus) && !defined(CINTERFACE) */
51 #define IsEqualIID(riid1, riid2) IsEqualGUID(riid1, riid2)
52 #define IsEqualCLSID(rclsid1, rclsid2) IsEqualGUID(rclsid1, rclsid2)
54 #if defined(__cplusplus) && !defined(CINTERFACE)
55 inline bool operator==(const GUID& guidOne, const GUID& guidOther)
57 return !memcmp(&guidOne,&guidOther,sizeof(GUID));
59 inline bool operator!=(const GUID& guidOne, const GUID& guidOther)
61 return !(guidOne == guidOther);
63 #endif
65 extern const IID GUID_NULL;
66 #define IID_NULL GUID_NULL
67 #define CLSID_NULL GUID_NULL
68 #define FMTID_NULL GUID_NULL
70 #endif /* _GUIDDEF_H_ */