2b006c06c39552a74240a1d9cab057c6acd7a7ca
[reactos.git] / subsystems / mvdm / ntvdm / ntvdm.h
1 /*
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>
7 */
8
9 #ifndef _NTVDM_H_
10 #define _NTVDM_H_
11
12 /* BUILD CONFIGURATION ********************************************************/
13
14 /*
15 * Activate this line if you want to run NTVDM in standalone mode with:
16 * ntvdm.exe <program>
17 */
18 // #define STANDALONE
19
20 /*
21 * Activate this line for Win2k compliancy
22 */
23 // #define WIN2K_COMPLIANT
24
25 /*
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)
29 */
30 // #define ADVANCED_DEBUGGING
31
32 #ifdef ADVANCED_DEBUGGING
33 #define ADVANCED_DEBUGGING_LEVEL 1
34 #endif
35
36
37 /* INCLUDES *******************************************************************/
38
39 #include <stdio.h>
40 #include <stdarg.h>
41 #include <wchar.h>
42
43 /* PSDK/NDK Headers */
44 #define WIN32_NO_STATUS
45 #include <windef.h>
46 #include <winbase.h>
47 #include <wingdi.h>
48 #include <wincon.h>
49 #include <winnls.h>
50 #include <winreg.h>
51 #include <winuser.h>
52 #include <commdlg.h>
53
54 #include <subsys/win/vdm.h>
55
56 // Do not include stuff that is only defined
57 // for backwards compatibility in nt_vdd.h
58 #define NO_NTVDD_COMPAT
59 #include <vddsvc.h>
60
61 DWORD WINAPI SetLastConsoleEventActive(VOID);
62
63 #define NTOS_MODE_USER
64 #include <ndk/kefuncs.h> // For NtQueryPerformanceCounter()
65 #include <ndk/rtlfuncs.h>
66
67 /* PSEH for SEH Support */
68 #include <pseh/pseh2.h>
69
70
71 /* VARIABLES ******************************************************************/
72
73 typedef struct _NTVDM_SETTINGS
74 {
75 ANSI_STRING BiosFileName;
76 ANSI_STRING RomFiles;
77 UNICODE_STRING FloppyDisks[2];
78 UNICODE_STRING HardDisks[4];
79 } NTVDM_SETTINGS, *PNTVDM_SETTINGS;
80
81 extern NTVDM_SETTINGS GlobalSettings;
82
83 // Command line of NTVDM
84 extern INT NtVdmArgc;
85 extern WCHAR** NtVdmArgv;
86
87 extern HWND hConsoleWnd;
88
89
90 /* FUNCTIONS ******************************************************************/
91
92 /*
93 * Interface functions
94 */
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, ...);
99
100 /*static*/ VOID
101 UpdateVdmMenuDisks(VOID);
102
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);
109
110 #endif // _NTVDM_H_
111
112 /* EOF */