1/**
2 * This file is part of the mingw-w64 runtime package.
3 * No warranty is given; refer to the file DISCLAIMER within this package.
4 */
5
6#ifndef _BASETYPS_H_
7#define _BASETYPS_H_
8
9#ifdef __cplusplus
10#define EXTERN_C extern "C"
11#else
12#define EXTERN_C extern
13#endif
14
15/* Keep in sync with winnt.h header.  */
16#ifndef STDMETHODCALLTYPE
17#define STDMETHODCALLTYPE WINAPI
18#define STDMETHODVCALLTYPE __cdecl
19#define STDAPICALLTYPE WINAPI
20#define STDAPIVCALLTYPE __cdecl
21
22#define STDAPI EXTERN_C HRESULT STDAPICALLTYPE
23#define STDAPI_(type) EXTERN_C type STDAPICALLTYPE
24
25#define STDMETHODIMP HRESULT STDMETHODCALLTYPE
26#define STDMETHODIMP_(type) type STDMETHODCALLTYPE
27
28#define STDAPIV EXTERN_C HRESULT STDAPIVCALLTYPE
29#define STDAPIV_(type) EXTERN_C type STDAPIVCALLTYPE
30
31#define STDMETHODIMPV HRESULT STDMETHODVCALLTYPE
32#define STDMETHODIMPV_(type) type STDMETHODVCALLTYPE
33#endif
34
35#if defined (__cplusplus) && !defined (CINTERFACE)
36
37#ifdef COM_STDMETHOD_CAN_THROW
38#define COM_DECLSPEC_NOTHROW
39#else
40#define COM_DECLSPEC_NOTHROW DECLSPEC_NOTHROW
41#endif
42
43#define __STRUCT__ struct
44#ifndef __OBJC__
45#undef interface
46#define interface __STRUCT__
47#endif
48#define STDMETHOD(method) virtual COM_DECLSPEC_NOTHROW HRESULT STDMETHODCALLTYPE method
49#define STDMETHOD_(type, method) virtual COM_DECLSPEC_NOTHROW type STDMETHODCALLTYPE method
50#define STDMETHODV(method) virtual COM_DECLSPEC_NOTHROW HRESULT STDMETHODVCALLTYPE method
51#define STDMETHODV_(type, method) virtual COM_DECLSPEC_NOTHROW type STDMETHODVCALLTYPE method
52#define PURE = 0
53#define THIS_
54#define THIS void
55#define DECLARE_INTERFACE(iface) interface DECLSPEC_NOVTABLE iface
56#define DECLARE_INTERFACE_(iface, baseiface) interface DECLSPEC_NOVTABLE iface : public baseiface
57#else
58
59#ifndef __OBJC__
60#undef interface
61#define interface struct
62#endif
63
64#define STDMETHOD(method) HRESULT (STDMETHODCALLTYPE *method)
65#define STDMETHOD_(type, method) type (STDMETHODCALLTYPE *method)
66#define STDMETHODV(method) HRESULT (STDMETHODVCALLTYPE *method)
67#define STDMETHODV_(type, method) type (STDMETHODVCALLTYPE *method)
68
69#define PURE
70#define THIS_ INTERFACE *This,
71#define THIS INTERFACE *This
72#ifdef CONST_VTABLE
73#define DECLARE_INTERFACE(iface) typedef interface iface { const struct iface##Vtbl *lpVtbl; } iface; typedef const struct iface##Vtbl iface##Vtbl; const struct iface##Vtbl
74#else
75#define DECLARE_INTERFACE(iface) typedef interface iface { struct iface##Vtbl *lpVtbl; } iface; typedef struct iface##Vtbl iface##Vtbl; struct iface##Vtbl
76#endif
77#define DECLARE_INTERFACE_(iface, baseiface) DECLARE_INTERFACE (iface)
78#endif
79
80#define IFACEMETHOD(method) /*override*/ STDMETHOD (method)
81#define IFACEMETHOD_(type, method) /*override*/ STDMETHOD_ (type, method)
82#define IFACEMETHODV(method) /*override*/ STDMETHODV (method)
83#define IFACEMETHODV_(type, method) /*override*/ STDMETHODV_ (type, method)
84
85#include <guiddef.h>
86
87#ifndef _ERROR_STATUS_T_DEFINED
88#define _ERROR_STATUS_T_DEFINED
89typedef unsigned __LONG32 error_status_t;
90#endif
91
92#ifndef _WCHAR_T_DEFINED
93#define _WCHAR_T_DEFINED
94typedef unsigned short wchar_t;
95#endif
96
97#endif
98