basetyps.h 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  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_
  8. #ifdef __cplusplus
  9. #define EXTERN_C extern "C"
  10. #else
  11. #define EXTERN_C extern
  12. #endif
  13. #define STDMETHODCALLTYPE WINAPI
  14. #define STDMETHODVCALLTYPE __cdecl
  15. #define STDAPICALLTYPE WINAPI
  16. #define STDAPIVCALLTYPE __cdecl
  17. #define STDAPI EXTERN_C HRESULT WINAPI
  18. #define STDAPI_(type) EXTERN_C type WINAPI
  19. #define STDMETHODIMP HRESULT WINAPI
  20. #define STDMETHODIMP_(type) type WINAPI
  21. #define STDAPIV EXTERN_C HRESULT STDAPIVCALLTYPE
  22. #define STDAPIV_(type) EXTERN_C type STDAPIVCALLTYPE
  23. #define STDMETHODIMPV HRESULT STDMETHODVCALLTYPE
  24. #define STDMETHODIMPV_(type) type STDMETHODVCALLTYPE
  25. #if defined(__cplusplus) && !defined(CINTERFACE)
  26. #define __STRUCT__ struct
  27. #define STDMETHOD(method) virtual HRESULT WINAPI method
  28. #define STDMETHOD_(type,method) virtual type WINAPI method
  29. #define STDMETHODV(method) virtual HRESULT STDMETHODVCALLTYPE method
  30. #define STDMETHODV_(type,method) virtual type STDMETHODVCALLTYPE method
  31. #define PURE = 0
  32. #define THIS_
  33. #define THIS void
  34. #define DECLARE_INTERFACE(iface) __STRUCT__ iface
  35. #define DECLARE_INTERFACE_(iface,baseiface) __STRUCT__ iface : public baseiface
  36. #else
  37. #ifndef __OBJC__
  38. #define interface struct
  39. #endif
  40. #define STDMETHOD(method) HRESULT (WINAPI *method)
  41. #define STDMETHOD_(type,method) type (WINAPI *method)
  42. #define STDMETHODV(method) HRESULT (STDMETHODVCALLTYPE *method)
  43. #define STDMETHODV_(type,method) type (STDMETHODVCALLTYPE *method)
  44. #define PURE
  45. #define THIS_ INTERFACE *This,
  46. #define THIS INTERFACE *This
  47. #ifdef CONST_VTABLE
  48. #define DECLARE_INTERFACE(iface) typedef struct iface { \
  49. const struct iface##Vtbl *lpVtbl; } iface; \
  50. typedef const struct iface##Vtbl iface##Vtbl; \
  51. const struct iface##Vtbl
  52. #else
  53. #define DECLARE_INTERFACE(iface) typedef struct iface { \
  54. struct iface##Vtbl *lpVtbl; \
  55. } iface; \
  56. typedef struct iface##Vtbl iface##Vtbl; \
  57. struct iface##Vtbl
  58. #endif
  59. #define DECLARE_INTERFACE_(iface,baseiface) DECLARE_INTERFACE(iface)
  60. #endif
  61. #include <guiddef.h>
  62. #ifndef _ERROR_STATUS_T_DEFINED
  63. #define _ERROR_STATUS_T_DEFINED
  64. typedef unsigned long error_status_t;
  65. #endif
  66. #ifndef _WCHAR_T_DEFINED
  67. typedef unsigned short wchar_t;
  68. #define _WCHAR_T_DEFINED
  69. #endif
  70. #endif