8 unsigned char Data4
[ 8 ];
15 #define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
17 { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } }
19 #define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
20 extern const GUID name
23 #define DEFINE_OLEGUID(name, l, w1, w2) \
24 DEFINE_GUID(name, l, w1, w2, 0xC0,0,0,0,0,0,0,0x46)
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
);
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_ */