2 * This file has no copyright assigned and is placed in the Public Domain.
3 * This file is part of the w64 mingw-runtime package.
4 * No warranty is given; refer to the file DISCLAIMER within this package.
6 #if !defined(_BASETYPS_H_)
10 #define EXTERN_C extern "C"
12 #define EXTERN_C extern
15 #define STDMETHODCALLTYPE WINAPI
16 #define STDMETHODVCALLTYPE __cdecl
18 #define STDAPICALLTYPE WINAPI
19 #define STDAPIVCALLTYPE __cdecl
21 #define STDAPI EXTERN_C HRESULT WINAPI
22 #define STDAPI_(type) EXTERN_C type WINAPI
24 #define STDMETHODIMP HRESULT WINAPI
25 #define STDMETHODIMP_(type) type WINAPI
27 #define STDAPIV EXTERN_C HRESULT STDAPIVCALLTYPE
28 #define STDAPIV_(type) EXTERN_C type STDAPIVCALLTYPE
30 #define STDMETHODIMPV HRESULT STDMETHODVCALLTYPE
31 #define STDMETHODIMPV_(type) type STDMETHODVCALLTYPE
33 #if defined(__cplusplus) && !defined(CINTERFACE)
35 #define __STRUCT__ struct
36 #define STDMETHOD(method) virtual HRESULT WINAPI method
37 #define STDMETHOD_(type,method) virtual type WINAPI method
38 #define STDMETHODV(method) virtual HRESULT STDMETHODVCALLTYPE method
39 #define STDMETHODV_(type,method) virtual type STDMETHODVCALLTYPE method
43 #define DECLARE_INTERFACE(iface) __STRUCT__ iface
44 #define DECLARE_INTERFACE_(iface,baseiface) __STRUCT__ iface : public baseiface
48 #define interface struct
51 #define STDMETHOD(method) HRESULT (WINAPI *method)
52 #define STDMETHOD_(type,method) type (WINAPI *method)
53 #define STDMETHODV(method) HRESULT (STDMETHODVCALLTYPE *method)
54 #define STDMETHODV_(type,method) type (STDMETHODVCALLTYPE *method)
57 #define THIS_ INTERFACE *This,
58 #define THIS INTERFACE *This
60 #define DECLARE_INTERFACE(iface) typedef struct iface { \
61 const struct iface##Vtbl *lpVtbl; } iface; \
62 typedef const struct iface##Vtbl iface##Vtbl; \
63 const struct iface##Vtbl
65 #define DECLARE_INTERFACE(iface) typedef struct iface { \
66 struct iface##Vtbl *lpVtbl; \
68 typedef struct iface##Vtbl iface##Vtbl; \
71 #define DECLARE_INTERFACE_(iface,baseiface) DECLARE_INTERFACE(iface)
76 #ifndef _ERROR_STATUS_T_DEFINED
77 #define _ERROR_STATUS_T_DEFINED
78 typedef unsigned long error_status_t
;
81 #ifndef _WCHAR_T_DEFINED
82 typedef unsigned short wchar_t;
83 #define _WCHAR_T_DEFINED