basetyps.h 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  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. #ifndef _BASETYPS_H_
  6. #define _BASETYPS_H_
  7. #ifdef __cplusplus
  8. #define EXTERN_C extern "C"
  9. #else
  10. #define EXTERN_C extern
  11. #endif
  12. /* Keep in sync with winnt.h header. */
  13. #ifndef STDMETHODCALLTYPE
  14. #define STDMETHODCALLTYPE WINAPI
  15. #define STDMETHODVCALLTYPE __cdecl
  16. #define STDAPICALLTYPE WINAPI
  17. #define STDAPIVCALLTYPE __cdecl
  18. #define STDAPI EXTERN_C HRESULT STDAPICALLTYPE
  19. #define STDAPI_(type) EXTERN_C type STDAPICALLTYPE
  20. #define STDMETHODIMP HRESULT STDMETHODCALLTYPE
  21. #define STDMETHODIMP_(type) type STDMETHODCALLTYPE
  22. #define STDAPIV EXTERN_C HRESULT STDAPIVCALLTYPE
  23. #define STDAPIV_(type) EXTERN_C type STDAPIVCALLTYPE
  24. #define STDMETHODIMPV HRESULT STDMETHODVCALLTYPE
  25. #define STDMETHODIMPV_(type) type STDMETHODVCALLTYPE
  26. #endif
  27. #if defined (__cplusplus) && !defined (CINTERFACE)
  28. #ifdef COM_STDMETHOD_CAN_THROW
  29. #define COM_DECLSPEC_NOTHROW
  30. #else
  31. #define COM_DECLSPEC_NOTHROW DECLSPEC_NOTHROW
  32. #endif
  33. #define __STRUCT__ struct
  34. #ifndef __OBJC__
  35. #undef interface
  36. #define interface __STRUCT__
  37. #endif
  38. #define STDMETHOD(method) virtual COM_DECLSPEC_NOTHROW HRESULT STDMETHODCALLTYPE method
  39. #define STDMETHOD_(type, method) virtual COM_DECLSPEC_NOTHROW type STDMETHODCALLTYPE method
  40. #define STDMETHODV(method) virtual COM_DECLSPEC_NOTHROW HRESULT STDMETHODVCALLTYPE method
  41. #define STDMETHODV_(type, method) virtual COM_DECLSPEC_NOTHROW type STDMETHODVCALLTYPE method
  42. #define PURE = 0
  43. #define THIS_
  44. #define THIS void
  45. #define DECLARE_INTERFACE(iface) interface DECLSPEC_NOVTABLE iface
  46. #define DECLARE_INTERFACE_(iface, baseiface) interface DECLSPEC_NOVTABLE iface : public baseiface
  47. #else
  48. #ifndef __OBJC__
  49. #undef interface
  50. #define interface struct
  51. #endif
  52. #define STDMETHOD(method) HRESULT (STDMETHODCALLTYPE *method)
  53. #define STDMETHOD_(type, method) type (STDMETHODCALLTYPE *method)
  54. #define STDMETHODV(method) HRESULT (STDMETHODVCALLTYPE *method)
  55. #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 interface iface { const struct iface##Vtbl *lpVtbl; } iface; typedef const struct iface##Vtbl iface##Vtbl; const struct iface##Vtbl
  61. #else
  62. #define DECLARE_INTERFACE(iface) typedef interface iface { struct iface##Vtbl *lpVtbl; } iface; typedef struct iface##Vtbl iface##Vtbl; struct iface##Vtbl
  63. #endif
  64. #define DECLARE_INTERFACE_(iface, baseiface) DECLARE_INTERFACE (iface)
  65. #endif
  66. #define IFACEMETHOD(method) /*override*/ STDMETHOD (method)
  67. #define IFACEMETHOD_(type, method) /*override*/ STDMETHOD_(type, method)
  68. #define IFACEMETHODV(method) /*override*/ STDMETHODV (method)
  69. #define IFACEMETHODV_(type, method) /*override*/ STDMETHODV_(type, method)
  70. #include <guiddef.h>
  71. #ifndef _ERROR_STATUS_T_DEFINED
  72. #define _ERROR_STATUS_T_DEFINED
  73. typedef unsigned __LONG32 error_status_t;
  74. #endif
  75. #ifndef _WCHAR_T_DEFINED
  76. #define _WCHAR_T_DEFINED
  77. typedef unsigned short wchar_t;
  78. #endif
  79. #endif