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 *******************************************************************/
43 /* PSDK/NDK Headers */
44 #define WIN32_NO_STATUS
54 #include <subsys/win/vdm.h>
56 // Do not include stuff that is only defined
57 // for backwards compatibility in nt_vdd.h
58 #define NO_NTVDD_COMPAT
61 DWORD WINAPI
SetLastConsoleEventActive(VOID
);
63 #define NTOS_MODE_USER
64 #include <ndk/kefuncs.h> // For NtQueryPerformanceCounter()
65 #include <ndk/rtlfuncs.h>
67 /* PSEH for SEH Support */
68 #include <pseh/pseh2.h>
71 /* VARIABLES ******************************************************************/
73 typedef struct _NTVDM_SETTINGS
75 ANSI_STRING BiosFileName
;
77 UNICODE_STRING FloppyDisks
[2];
78 UNICODE_STRING HardDisks
[4];
79 } NTVDM_SETTINGS
, *PNTVDM_SETTINGS
;
81 extern NTVDM_SETTINGS GlobalSettings
;
83 // Command line of NTVDM
85 extern WCHAR
** NtVdmArgv
;
87 extern HWND hConsoleWnd
;
90 /* FUNCTIONS ******************************************************************/
95 typedef VOID (*CHAR_PRINT
)(IN CHAR Character
);
96 VOID
DisplayMessage(IN LPCWSTR Format
, ...);
97 VOID
PrintMessageAnsi(IN CHAR_PRINT CharPrint
,
98 IN LPCSTR Format
, ...);
101 UpdateVdmMenuDisks(VOID
);
103 BOOL
ConsoleAttach(VOID
);
104 VOID
ConsoleDetach(VOID
);
105 VOID
ConsoleReattach(HANDLE ConOutHandle
);
106 BOOL
IsConsoleHandle(HANDLE hHandle
);
107 VOID
MenuEventHandler(PMENU_EVENT_RECORD MenuEvent
);
108 VOID
FocusEventHandler(PFOCUS_EVENT_RECORD FocusEvent
);