1 /* ----------------------------------------------------------------------------- 2 * windows.i 3 * 4 * SWIG library file to support types found in windows.h as well as Microsoft 5 * integral type extensions. The types are set for 32 bit Windows. 6 * ----------------------------------------------------------------------------- */ 7 8 // Support for non ISO (Windows) integral types 9 %apply unsigned char { unsigned __int8 }; 10 %apply const unsigned char& { const unsigned __int8& }; 11 12 %apply signed char { __int8 }; 13 %apply const signed char& { const __int8& }; 14 15 %apply unsigned short { unsigned __int16 }; 16 %apply const unsigned short& { const unsigned __int16& }; 17 18 %apply short { __int16 }; 19 %apply const short& { const __int16& }; 20 21 %apply unsigned int { unsigned __int32 }; 22 %apply const unsigned int& { const unsigned __int32& }; 23 24 %apply int { __int32 }; 25 %apply const int& { const __int32& }; 26 27 %apply unsigned long long { unsigned __int64 }; 28 %apply const unsigned long long& { const unsigned __int64& }; 29 30 %apply long long { __int64 }; 31 %apply const long long& { const __int64& }; 32 33 34 // Workaround Microsoft calling conventions 35 #define __cdecl 36 #define __fastcall 37 #define __far 38 #define __forceinline 39 #define __fortran 40 #define __inline 41 #define __pascal 42 #define __stdcall 43 #define __syscall 44 #define _cdecl 45 #define _fastcall 46 #define _inline 47 #define _pascal 48 #define _stdcall 49 #define WINAPI 50 #define __declspec(WINDOWS_EXTENDED_ATTRIBUTE) 51 52 #define __w64 53 54 // Types from windef.h 55 typedef unsigned long ULONG; 56 typedef ULONG *PULONG; 57 typedef unsigned short USHORT; 58 typedef USHORT *PUSHORT; 59 typedef unsigned char UCHAR; 60 typedef UCHAR *PUCHAR; 61 typedef char *PSZ; 62 typedef unsigned long DWORD; 63 typedef int BOOL; 64 typedef unsigned char BYTE; 65 typedef unsigned short WORD; 66 typedef float FLOAT; 67 typedef FLOAT *PFLOAT; 68 typedef BOOL *PBOOL; 69 typedef BOOL *LPBOOL; 70 typedef BYTE *PBYTE; 71 typedef BYTE *LPBYTE; 72 typedef int *PINT; 73 typedef int *LPINT; 74 typedef WORD *PWORD; 75 typedef WORD *LPWORD; 76 typedef long *LPLONG; 77 typedef DWORD *PDWORD; 78 typedef DWORD *LPDWORD; 79 typedef void *LPVOID; 80 typedef const void *LPCVOID; 81 typedef int INT; 82 typedef unsigned int UINT; 83 typedef unsigned int *PUINT; 84 85 // Types from basetsd.h 86 typedef signed char INT8, *PINT8; 87 typedef signed short INT16, *PINT16; 88 typedef signed int INT32, *PINT32; 89 typedef signed __int64 INT64, *PINT64; 90 typedef unsigned char UINT8, *PUINT8; 91 typedef unsigned short UINT16, *PUINT16; 92 typedef unsigned int UINT32, *PUINT32; 93 typedef unsigned __int64 UINT64, *PUINT64; 94 typedef signed int LONG32, *PLONG32; 95 typedef unsigned int ULONG32, *PULONG32; 96 typedef unsigned int DWORD32, *PDWORD32; 97 typedef __w64 int INT_PTR, *PINT_PTR; 98 typedef __w64 unsigned int UINT_PTR, *PUINT_PTR; 99 typedef __w64 long LONG_PTR, *PLONG_PTR; 100 typedef __w64 unsigned long ULONG_PTR, *PULONG_PTR; 101 typedef unsigned short UHALF_PTR, *PUHALF_PTR; 102 typedef short HALF_PTR, *PHALF_PTR; 103 typedef __w64 long SHANDLE_PTR; 104 typedef __w64 unsigned long HANDLE_PTR; 105 typedef ULONG_PTR SIZE_T, *PSIZE_T; 106 typedef LONG_PTR SSIZE_T, *PSSIZE_T; 107 typedef ULONG_PTR DWORD_PTR, *PDWORD_PTR; 108 typedef __int64 LONG64, *PLONG64; 109 typedef unsigned __int64 ULONG64, *PULONG64; 110 typedef unsigned __int64 DWORD64, *PDWORD64; 111 112 // Types from winnt.h 113 typedef void *PVOID; 114 typedef void *PVOID64; 115 typedef char CHAR; 116 typedef short SHORT; 117 typedef long LONG; 118 typedef CHAR *PCHAR; 119 typedef CHAR *LPCH, *PCH; 120 typedef const CHAR *LPCCH, *PCCH; 121 typedef CHAR *NPSTR; 122 typedef CHAR *LPSTR, *PSTR; 123 typedef const CHAR *LPCSTR, *PCSTR; 124 typedef char TCHAR, *PTCHAR; 125 typedef unsigned char TBYTE , *PTBYTE ; 126 typedef LPSTR LPTCH, PTCH; 127 typedef LPSTR PTSTR, LPTSTR, PUTSTR, LPUTSTR; 128 typedef LPCSTR PCTSTR, LPCTSTR, PCUTSTR, LPCUTSTR; 129 typedef SHORT *PSHORT; 130 typedef LONG *PLONG; 131 typedef void *HANDLE; 132 typedef HANDLE *PHANDLE; 133 typedef BYTE FCHAR; 134 typedef WORD FSHORT; 135 typedef DWORD FLONG; 136 typedef LONG HRESULT; 137 typedef char CCHAR; 138 typedef DWORD LCID; 139 typedef PDWORD PLCID; 140 typedef WORD LANGID; 141 typedef __int64 LONGLONG; 142 typedef unsigned __int64 ULONGLONG; 143 typedef LONGLONG *PLONGLONG; 144 typedef ULONGLONG *PULONGLONG; 145 typedef ULONGLONG DWORDLONG; 146 typedef DWORDLONG *PDWORDLONG; 147 typedef BYTE BOOLEAN; 148 typedef BOOLEAN *PBOOLEAN; 149 150