win64: use new headers from mingw
[tinycc/kirr.git] / win32 / include / winapi / basetyps.h
blob376665e79cb2c4288a48acb7b0afa7d500c5ecef
1 /**
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.
5 */
6 #if !defined(_BASETYPS_H_)
7 #define _BASETYPS_H_
9 #ifdef __cplusplus
10 #define EXTERN_C extern "C"
11 #else
12 #define EXTERN_C extern
13 #endif
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
40 #define PURE = 0
41 #define THIS_
42 #define THIS void
43 #define DECLARE_INTERFACE(iface) __STRUCT__ iface
44 #define DECLARE_INTERFACE_(iface,baseiface) __STRUCT__ iface : public baseiface
45 #else
47 #ifndef __OBJC__
48 #define interface struct
49 #endif
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)
56 #define PURE
57 #define THIS_ INTERFACE *This,
58 #define THIS INTERFACE *This
59 #ifdef CONST_VTABLE
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
64 #else
65 #define DECLARE_INTERFACE(iface) typedef struct iface { \
66 struct iface##Vtbl *lpVtbl; \
67 } iface; \
68 typedef struct iface##Vtbl iface##Vtbl; \
69 struct iface##Vtbl
70 #endif
71 #define DECLARE_INTERFACE_(iface,baseiface) DECLARE_INTERFACE(iface)
72 #endif
74 #include <guiddef.h>
76 #ifndef _ERROR_STATUS_T_DEFINED
77 #define _ERROR_STATUS_T_DEFINED
78 typedef unsigned long error_status_t;
79 #endif
81 #ifndef _WCHAR_T_DEFINED
82 typedef unsigned short wchar_t;
83 #define _WCHAR_T_DEFINED
84 #endif
85 #endif