2 * Copyright (C) 2000 Alexandre Julliard
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
26 unsigned char Data4
[ 8 ];
33 #define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
35 { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } }
37 #define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
38 extern const GUID name;
45 typedef GUID CLSID
,*LPCLSID
;
46 typedef GUID IID
,*LPIID
;
47 typedef GUID FMTID
,*LPFMTID
;
50 #if defined(__cplusplus) && !defined(CINTERFACE)
51 #define REFGUID const GUID &
52 #define REFCLSID const CLSID &
53 #define REFIID const IID &
54 #define REFFMTID const FMTID &
55 #else /* !defined(__cplusplus) && !defined(CINTERFACE) */
56 #define REFGUID const GUID* const
57 #define REFCLSID const CLSID* const
58 #define REFIID const IID* const
59 #define REFFMTID const FMTID* const
60 #endif /* !defined(__cplusplus) && !defined(CINTERFACE) */
63 #if defined(__cplusplus) && !defined(CINTERFACE)
64 #define IsEqualGUID(rguid1, rguid2) (!memcmp(&(rguid1), &(rguid2), sizeof(GUID)))
65 #else /* defined(__cplusplus) && !defined(CINTERFACE) */
66 #define IsEqualGUID(rguid1, rguid2) (!memcmp(rguid1, rguid2, sizeof(GUID)))
67 #endif /* defined(__cplusplus) && !defined(CINTERFACE) */
69 #if defined(__cplusplus) && !defined(CINTERFACE)
71 inline bool operator==(const GUID
& guidOne
, const GUID
& guidOther
)
73 return !memcmp(&guidOne
,&guidOther
,sizeof(GUID
));
75 inline bool operator!=(const GUID
& guidOne
, const GUID
& guidOther
)
77 return !(guidOne
== guidOther
);
81 extern const IID GUID_NULL
;
82 #define IID_NULL GUID_NULL
83 #define CLSID_NULL GUID_NULL
84 #define FMTID_NULL GUID_NULL
86 #endif /* _GUIDDEF_H_ */