#include <stdio.h>
#include <stdarg.h>
#include <conio.h>
+#include <wchar.h>
-#include <windows.h>
+#define WIN32_NO_STATUS
+#include <windef.h>
+#include <winbase.h>
+#include <wingdi.h>
+#include <wincon.h>
+#include <winnls.h>
+#include <winreg.h>
+#include <winuser.h>
+#include <subsys/win/vdm.h>
-#include <debug.h>
-
-/* DEFINES ********************************************************************/
-
-#define TO_LINEAR(seg, off) (((seg) << 4) + (off))
-#define MAX_SEGMENT 0xFFFF
-#define MAX_OFFSET 0xFFFF
-#define MAX_ADDRESS TO_LINEAR(MAX_SEGMENT, MAX_OFFSET)
+#include <vddsvc.h>
-#define FAR_POINTER(x) \
- (PVOID)((ULONG_PTR)BaseAddress + TO_LINEAR(HIWORD(x), LOWORD(x)))
-
-#define SEG_OFF_TO_PTR(seg, off) \
- (PVOID)((ULONG_PTR)BaseAddress + TO_LINEAR((seg), (off)))
+#include <debug.h>
-#define STEPS_PER_CYCLE 256
+DWORD WINAPI SetLastConsoleEventActive(VOID);
/* FUNCTIONS ******************************************************************/
-extern LPVOID BaseAddress;
-extern BOOLEAN VdmRunning;
-extern LPCWSTR ExceptionName[];
+extern ULONG SessionId;
+extern HANDLE VdmTaskEvent;
VOID DisplayMessage(LPCWSTR Format, ...);