1 2 #ifndef _WINDEF_ 3 typedef unsigned short wchar_t; 4 typedef unsigned long DWORD, ULONG; 5 typedef void* PVOID; 6 #define __int64 long long 7 #ifdef _WIN64 8 typedef unsigned long long ULONG_PTR; 9 #else 10 typedef unsigned long ULONG_PTR; 11 #endif 12 13 #define EXCEPTION_MAXIMUM_PARAMETERS 15 14 typedef struct _EXCEPTION_RECORD { 15 DWORD ExceptionCode; 16 DWORD ExceptionFlags; 17 struct _EXCEPTION_RECORD* ExceptionRecord; 18 PVOID ExceptionAddress; 19 DWORD NumberParameters; 20 ULONG_PTR ExceptionInformation[EXCEPTION_MAXIMUM_PARAMETERS]; 21 } EXCEPTION_RECORD, * PEXCEPTION_RECORD; 22 23 #define EXCEPTION_NONCONTINUABLE 0x01 24 25 #endif 26 27 #ifndef PRIx64 28 #define PRIx64 "I64x" 29 #endif 30 31 #define EXCEPTION_WINE_STUB 0x80000100 32 #define EH_NONCONTINUABLE 0x01 33 34 /* __int128 is not supported on x86, so use a custom type */ 35 typedef struct 36 { 37 __int64 lower; 38 __int64 upper; 39 } MyInt128; 40 41 void 42 __stdcall 43 RtlRaiseException( 44 PEXCEPTION_RECORD ExceptionRecord 45 ); 46 47 ULONG 48 __cdecl 49 DbgPrint( 50 const char* Format, 51 ... 52 ); 53 54 #define __wine_spec_unimplemented_stub(module, function) \ 55 { \ 56 EXCEPTION_RECORD ExceptionRecord = {0}; \ 57 ExceptionRecord.ExceptionRecord = 0; \ 58 ExceptionRecord.ExceptionCode = EXCEPTION_WINE_STUB; \ 59 ExceptionRecord.ExceptionFlags = EXCEPTION_NONCONTINUABLE; \ 60 ExceptionRecord.ExceptionInformation[0] = (ULONG_PTR)module; \ 61 ExceptionRecord.ExceptionInformation[1] = (ULONG_PTR)function; \ 62 ExceptionRecord.NumberParameters = 2; \ 63 RtlRaiseException(&ExceptionRecord); \ 64 } 65