Commit bf1fff08 authored by Robert Shearman's avatar Robert Shearman Committed by Alexandre Julliard

include: Make guiddef.h defines match PSDK.

Protect LPGUID typedef by __LPGUID_DEFINED__ being defined. Protect LPCLSID and LPFMTID typedefs, IsEqualGUID, IsEqualIID, IsEqualCLSID, IID_NULL, CLSID_NULL and FMTID_NULL defines by __IID_DEFINED__ being defined.
parent 44691723
......@@ -27,11 +27,6 @@ typedef struct _GUID
} GUID;
#endif
#ifndef __LPCGUID_DEFINED__
#define __LPCGUID_DEFINED__
typedef const GUID *LPCGUID;
#endif
#undef DEFINE_GUID
#ifdef INITGUID
......@@ -55,13 +50,28 @@ typedef const GUID *LPCGUID;
#ifndef _GUIDDEF_H_
#define _GUIDDEF_H_
#ifndef __LPGUID_DEFINED__
#define __LPGUID_DEFINED___
typedef GUID *LPGUID;
typedef GUID CLSID,*LPCLSID;
#endif
#ifndef __LPCGUID_DEFINED__
#define __LPCGUID_DEFINED__
typedef const GUID *LPCGUID;
#endif
#ifndef __IID_DEFINED__
#define __IID_DEFINED__
typedef GUID IID,*LPIID;
#endif /* ndef __IID_DEFINED__ */
typedef GUID CLSID,*LPCLSID;
typedef GUID FMTID,*LPFMTID;
#define IsEqualIID(riid1, riid2) IsEqualGUID(riid1, riid2)
#define IsEqualCLSID(rclsid1, rclsid2) IsEqualGUID(rclsid1, rclsid2)
#define IsEqualFMTID(rfmtid1, rfmtid2) IsEqualGUID(rfmtid1, rfmtid2)
#define IID_NULL GUID_NULL
#define CLSID_NULL GUID_NULL
#define FMTID_NULL GUID_NULL
#ifdef __midl_proxy
#define __MIDL_CONST
......@@ -69,6 +79,8 @@ typedef GUID FMTID,*LPFMTID;
#define __MIDL_CONST const
#endif
#endif /* ndef __IID_DEFINED__ */
#if defined(__cplusplus) && !defined(CINTERFACE)
#define REFGUID const GUID &
#define REFCLSID const CLSID &
......@@ -86,8 +98,6 @@ typedef GUID FMTID,*LPFMTID;
#else /* defined(__cplusplus) && !defined(CINTERFACE) */
#define IsEqualGUID(rguid1, rguid2) (!memcmp(rguid1, rguid2, sizeof(GUID)))
#endif /* defined(__cplusplus) && !defined(CINTERFACE) */
#define IsEqualIID(riid1, riid2) IsEqualGUID(riid1, riid2)
#define IsEqualCLSID(rclsid1, rclsid2) IsEqualGUID(rclsid1, rclsid2)
#if defined(__cplusplus) && !defined(CINTERFACE)
#include <string.h>
......@@ -102,8 +112,5 @@ inline bool operator!=(const GUID& guidOne, const GUID& guidOther)
#endif
extern const IID GUID_NULL;
#define IID_NULL GUID_NULL
#define CLSID_NULL GUID_NULL
#define FMTID_NULL GUID_NULL
#endif /* _GUIDDEF_H_ */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment