2 * COPYRIGHT: GPL - See COPYING in the top level directory
3 * PROJECT: ReactOS Virtual DOS Machine
4 * FILE: subsystems/mvdm/ntvdm/ntvdm.h
5 * PURPOSE: Header file to define commonly used stuff
6 * PROGRAMMERS: Aleksandar Andrejevic <theflash AT sdf DOT lonestar DOT org>
12 /* BUILD CONFIGURATION ********************************************************/
15 * Activate this line if you want to run NTVDM in standalone mode with:
21 * Activate this line for Win2k compliancy
23 // #define WIN2K_COMPLIANT
26 * Activate this line if you want advanced hardcoded debug facilities
27 * (called interrupts, etc...), that may break PC-AT compatibility.
28 * USE AT YOUR OWN RISK! (disabled by default)
30 // #define ADVANCED_DEBUGGING
32 #ifdef ADVANCED_DEBUGGING
33 #define ADVANCED_DEBUGGING_LEVEL 1
37 /* INCLUDES *******************************************************************/
44 #define _countof(_Array) (sizeof(_Array) / sizeof(_Array[0]))
47 /* String widening macro */
52 /* PSDK/NDK Headers */
53 #define WIN32_NO_STATUS
63 #include <subsys/win/vdm.h>
65 // Do not include stuff that is only defined
66 // for backwards compatibility in nt_vdd.h
67 #define NO_NTVDD_COMPAT
70 DWORD WINAPI
SetLastConsoleEventActive(VOID
);
72 #define NTOS_MODE_USER
73 #include <ndk/kefuncs.h> // For NtQueryPerformanceCounter()
74 #include <ndk/rtlfuncs.h>
76 /* PSEH for SEH Support */
77 #include <pseh/pseh2.h>
79 #include <ntstrsafe.h>
82 /* VARIABLES ******************************************************************/
84 typedef struct _NTVDM_SETTINGS
86 ANSI_STRING BiosFileName
;
88 UNICODE_STRING FloppyDisks
[2];
89 UNICODE_STRING HardDisks
[4];
90 } NTVDM_SETTINGS
, *PNTVDM_SETTINGS
;
92 extern NTVDM_SETTINGS GlobalSettings
;
94 // Command line of NTVDM
96 extern WCHAR
** NtVdmArgv
;
98 /* Full directory where NTVDM resides, or the SystemRoot\System32 path */
99 extern WCHAR NtVdmPath
[MAX_PATH
];
100 extern ULONG NtVdmPathSize
; // Length without NULL terminator.
102 extern HWND hConsoleWnd
;
105 /* FUNCTIONS ******************************************************************/
108 * Interface functions
110 typedef VOID (*CHAR_PRINT
)(IN CHAR Character
);
111 VOID
DisplayMessage(IN LPCWSTR Format
, ...);
112 VOID
PrintMessageAnsi(IN CHAR_PRINT CharPrint
,
113 IN LPCSTR Format
, ...);
116 UpdateVdmMenuDisks(VOID
);
118 BOOL
ConsoleAttach(VOID
);
119 VOID
ConsoleDetach(VOID
);
120 VOID
ConsoleReattach(HANDLE ConOutHandle
);
121 BOOL
IsConsoleHandle(HANDLE hHandle
);
122 VOID
MenuEventHandler(PMENU_EVENT_RECORD MenuEvent
);
123 VOID
FocusEventHandler(PFOCUS_EVENT_RECORD FocusEvent
);