#include <wchar.h>
#endif
+#if _WIN32_WINNT != 0x0600
#undef _WIN32_WINNT
-#define _WIN32_WINNT 0x0501 // For AddVectoredExceptionHandler
+#define _WIN32_WINNT 0x0501 // For AddVectoredExceptionHandler, WinXP support
+//#define _WIN32_WINNT 0x0600 // For CancelSynchronousIo
+#endif
#ifndef UNICODE
#define UNICODE
#define FACTOR_OS_STRING "windows"
-#define FACTOR_DLL NULL
-
// SSE traps raise these exception codes, which are defined in internal NT
// headers
// but not winbase.h
inline static void breakpoint() { DebugBreak(); }
-#define CODE_TO_FUNCTION_POINTER(code) (void) 0
-#define CODE_TO_FUNCTION_POINTER_CALLBACK(vm, code) (void) 0
+#define CODE_TO_FUNCTION_POINTER(code) (void)0
+#define CODE_TO_FUNCTION_POINTER_CALLBACK(vm, code) (void)0
#define FUNCTION_CODE_POINTER(ptr) ptr
#define FUNCTION_TOC_POINTER(ptr) ptr
+
+extern HANDLE boot_thread;
}