VirtualBox

source: vbox/trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/guiddef.h@ 33656

Last change on this file since 33656 was 33656, checked in by vboxsync, 14 years ago

*: rebrand Sun (L)GPL disclaimers

  • Property svn:eol-style set to native
File size: 4.1 KB
Line 
1/*
2 * Copyright (C) 2000 Alexandre Julliard
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/*
20 * Oracle LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
21 * other than GPL or LGPL is available it will apply instead, Oracle elects to use only
22 * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
23 * a choice of LGPL license versions is made available with the language indicating
24 * that LGPLv2 or any later version may be used, or where a choice of which version
25 * of the LGPL is applied is otherwise unspecified.
26 */
27
28#ifndef GUID_DEFINED
29#define GUID_DEFINED
30typedef struct _GUID
31{
32#ifdef _MSC_VER
33 unsigned long Data1;
34#else
35 unsigned int Data1;
36#endif
37 unsigned short Data2;
38 unsigned short Data3;
39 unsigned char Data4[ 8 ];
40} GUID;
41#endif
42
43#undef DEFINE_GUID
44
45#ifdef INITGUID
46#ifdef __cplusplus
47#define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
48 EXTERN_C const GUID name DECLSPEC_HIDDEN; \
49 EXTERN_C const GUID name = \
50 { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } }
51#else
52#define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
53 const GUID name DECLSPEC_HIDDEN; \
54 const GUID name = \
55 { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } }
56#endif
57#else
58#define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
59 EXTERN_C const GUID name DECLSPEC_HIDDEN
60#endif
61
62#define DEFINE_OLEGUID(name, l, w1, w2) \
63 DEFINE_GUID(name, l, w1, w2, 0xC0,0,0,0,0,0,0,0x46)
64
65#ifndef _GUIDDEF_H_
66#define _GUIDDEF_H_
67
68#ifndef __LPGUID_DEFINED__
69#define __LPGUID_DEFINED___
70typedef GUID *LPGUID;
71#endif
72
73#ifndef __LPCGUID_DEFINED__
74#define __LPCGUID_DEFINED__
75typedef const GUID *LPCGUID;
76#endif
77
78#ifndef __IID_DEFINED__
79#define __IID_DEFINED__
80
81typedef GUID IID,*LPIID;
82typedef GUID CLSID,*LPCLSID;
83typedef GUID FMTID,*LPFMTID;
84#define IsEqualIID(riid1, riid2) IsEqualGUID(riid1, riid2)
85#define IsEqualCLSID(rclsid1, rclsid2) IsEqualGUID(rclsid1, rclsid2)
86#define IsEqualFMTID(rfmtid1, rfmtid2) IsEqualGUID(rfmtid1, rfmtid2)
87#define IID_NULL GUID_NULL
88#define CLSID_NULL GUID_NULL
89#define FMTID_NULL GUID_NULL
90
91#ifdef __midl_proxy
92#define __MIDL_CONST
93#else
94#define __MIDL_CONST const
95#endif
96
97#endif /* ndef __IID_DEFINED__ */
98
99#if defined(__cplusplus) && !defined(CINTERFACE)
100#define REFGUID const GUID &
101#define REFCLSID const CLSID &
102#define REFIID const IID &
103#define REFFMTID const FMTID &
104#else /* !defined(__cplusplus) && !defined(CINTERFACE) */
105#define REFGUID const GUID* __MIDL_CONST
106#define REFCLSID const CLSID* __MIDL_CONST
107#define REFIID const IID* __MIDL_CONST
108#define REFFMTID const FMTID* __MIDL_CONST
109#endif /* !defined(__cplusplus) && !defined(CINTERFACE) */
110
111#if defined(__cplusplus) && !defined(CINTERFACE)
112#define IsEqualGUID(rguid1, rguid2) (!memcmp(&(rguid1), &(rguid2), sizeof(GUID)))
113#else /* defined(__cplusplus) && !defined(CINTERFACE) */
114#define IsEqualGUID(rguid1, rguid2) (!memcmp(rguid1, rguid2, sizeof(GUID)))
115#endif /* defined(__cplusplus) && !defined(CINTERFACE) */
116
117#if defined(__cplusplus) && !defined(CINTERFACE)
118#include <string.h>
119inline bool operator==(const GUID& guidOne, const GUID& guidOther)
120{
121 return !memcmp(&guidOne,&guidOther,sizeof(GUID));
122}
123inline bool operator!=(const GUID& guidOne, const GUID& guidOther)
124{
125 return !(guidOne == guidOther);
126}
127#endif
128
129extern const IID GUID_NULL;
130
131#endif /* _GUIDDEF_H_ */
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette