ReactOS 0.4.15-dev-7907-g95bf896
propkeydef.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2009 Maarten Lankhorst
3 *
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.
8 *
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.
13 *
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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
17 */
18
19#ifndef PID_FIRST_USABLE
20#define PID_FIRST_USABLE 2
21#endif
22
23#ifndef REFPROPERTYKEY
24#ifdef __cplusplus
25#define REFPROPERTYKEY const PROPERTYKEY &
26#else
27#define REFPROPERTYKEY const PROPERTYKEY * __MIDL_CONST
28#endif
29#endif
30
31#undef DEFINE_PROPERTYKEY
32
33#ifdef INITGUID
34#ifdef __cplusplus
35#define DEFINE_PROPERTYKEY(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8, pid) \
36 EXTERN_C const PROPERTYKEY DECLSPEC_SELECTANY name DECLSPEC_HIDDEN = \
37 { { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } }, pid }
38#else
39#define DEFINE_PROPERTYKEY(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8, pid) \
40 const PROPERTYKEY DECLSPEC_SELECTANY name DECLSPEC_HIDDEN = \
41 { { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } }, pid }
42#endif
43#else
44#define DEFINE_PROPERTYKEY(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8, pid) \
45 EXTERN_C const PROPERTYKEY name DECLSPEC_HIDDEN
46#endif
47
48#ifndef IsEqualPropertyKey
49#ifdef __cplusplus
50#define IsEqualPropertyKey(a,b) (((a).pid == (b).pid) && IsEqualIID((a).fmtid,(b).fmtid))
51#else
52#define IsEqualPropertyKey(a,b) (((a).pid == (b).pid) && IsEqualIID(&(a).fmtid,&(b).fmtid))
53#endif
54#endif
55
56#ifndef _PROPERTYKEY_EQUALITY_OPERATORS_
57#define _PROPERTYKEY_EQUALITY_OPERATORS_
58#ifdef __cplusplus
59extern "C++"
60{
61
62inline bool operator==(REFPROPERTYKEY guidOne, REFPROPERTYKEY guidOther)
63{
64 return IsEqualPropertyKey(guidOne, guidOther);
65}
66inline bool operator!=(REFPROPERTYKEY guidOne, REFPROPERTYKEY guidOther)
67{
68 return !(guidOne == guidOther);
69}
70
71}
72#endif
73#endif
bool _STLP_CALL operator!=(const allocator< _T1 > &, const allocator< _T2 > &) _STLP_NOTHROW
Definition: _alloc.h:384
#define IsEqualPropertyKey(a, b)
Definition: propkeydef.h:52
PROPERTYKEY * REFPROPERTYKEY
Definition: propsys.idl:34
bool operator==(const TKeyDef &t1, const TKeyDef &t2)
Definition: tkeydef.cpp:122