[PSDK]
[reactos.git] / include / psdk / basetyps.h
1 #ifndef _BASETYPS_H
2 #define _BASETYPS_H
3
4 #ifndef __OBJC__
5 # ifdef __cplusplus
6 # define EXTERN_C extern "C"
7 # else
8 # define EXTERN_C extern
9 # endif /* __cplusplus */
10 # ifndef _MSC_VER
11 # ifndef __int64
12 # define __int64 long long
13 # endif
14 # ifndef __int32
15 # define __int32 long
16 # endif
17 # ifndef __int16
18 # define __int16 int
19 # endif
20 # ifndef __int8
21 # define __int8 char
22 # endif
23 # endif
24 # ifndef __small
25 # define __small char
26 # endif
27 # ifndef __hyper
28 # define __hyper __int64
29 # endif
30 #endif
31
32 #define STDMETHODCALLTYPE __stdcall
33 #define STDMETHODVCALLTYPE __cdecl
34 #define STDAPICALLTYPE __stdcall
35 #define STDAPIVCALLTYPE __cdecl
36 #define STDAPI EXTERN_C HRESULT STDAPICALLTYPE
37 #define STDAPI_(t) EXTERN_C t STDAPICALLTYPE
38 #define STDMETHODIMP HRESULT STDMETHODCALLTYPE
39 #define STDMETHODIMP_(t) t STDMETHODCALLTYPE
40 #define STDAPIV EXTERN_C HRESULT STDAPIVCALLTYPE
41 #define STDAPIV_(t) EXTERN_C t STDAPIVCALLTYPE
42 #define STDMETHODIMPV HRESULT STDMETHODVCALLTYPE
43 #define STDMETHODIMPV_(t) t STDMETHODVCALLTYPE
44
45 #if defined(__cplusplus) && !defined(CINTERFACE)
46 # define interface struct
47 # define STDMETHOD(m) virtual HRESULT STDMETHODCALLTYPE m
48 # define STDMETHOD_(t,m) virtual t STDMETHODCALLTYPE m
49 # define PURE =0
50 # define THIS_
51 # define THIS void
52 # define DECLARE_INTERFACE(i) interface i
53 # define DECLARE_INTERFACE_(i,b) interface i : public b
54 #else
55 # define interface struct
56 # define STDMETHOD(m) HRESULT (STDMETHODCALLTYPE *m)
57 # define STDMETHOD_(t,m) t (STDMETHODCALLTYPE *m)
58 # define PURE
59 # define THIS_ INTERFACE *,
60 # define THIS INTERFACE *
61 # ifdef CONST_VTABLE
62 # define DECLARE_INTERFACE(i) \
63 typedef interface i { const struct i##Vtbl *lpVtbl; } i; \
64 typedef struct i##Vtbl i##Vtbl; \
65 struct i##Vtbl
66 # else
67 # define DECLARE_INTERFACE(i) \
68 typedef interface i { struct i##Vtbl *lpVtbl; } i; \
69 typedef struct i##Vtbl i##Vtbl; \
70 struct i##Vtbl
71 # endif
72 # define DECLARE_INTERFACE_(i,b) DECLARE_INTERFACE(i)
73 #endif
74
75 #include <guiddef.h>
76
77 #ifndef _ERROR_STATUS_T_DEFINED
78 #define _ERROR_STATUS_T_DEFINED
79 typedef unsigned long error_status_t;
80 #endif
81
82 #ifndef _WCHAR_T_DEFINED
83 typedef unsigned short wchar_t;
84 #define _WCHAR_T_DEFINED
85 #endif
86
87 #endif /* _BASETYPS_H_ */