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