1b7c988a5af6e4f2912dbec8d0da32e18d5830e6
[reactos.git] / reactos / subsystems / mvdm / ntvdm / ntvdm.h
1 /*
2 * COPYRIGHT: GPL - See COPYING in the top level directory
3 * PROJECT: ReactOS Virtual DOS Machine
4 * FILE: 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 /* INCLUDES *******************************************************************/
13
14 #include <stdio.h>
15 #include <stdarg.h>
16 #include <wchar.h>
17
18 /* PSDK/NDK Headers */
19 #define WIN32_NO_STATUS
20 #include <windef.h>
21 #include <winbase.h>
22 #include <wingdi.h>
23 #include <wincon.h>
24 #include <winnls.h>
25 #include <winreg.h>
26 #include <winuser.h>
27 #include <subsys/win/vdm.h>
28
29 #include <vddsvc.h>
30
31 DWORD WINAPI SetLastConsoleEventActive(VOID);
32
33 #define NTOS_MODE_USER
34 #include <ndk/kefuncs.h>
35 #include <ndk/obfuncs.h>
36 #include <ndk/rtlfuncs.h>
37 #include <ndk/rtltypes.h>
38
39 /* PSEH for SEH Support */
40 #include <pseh/pseh2.h>
41
42 #include <debug.h>
43
44 /*
45 * Activate this line if you want to run NTVDM in standalone mode with:
46 * ntvdm.exe <program>
47 */
48 // #define STANDALONE
49
50 /*
51 * Activate this line for Win2k compliancy
52 */
53 // #define WIN2K_COMPLIANT
54
55 /* FUNCTIONS ******************************************************************/
56
57 #ifndef STANDALONE
58 extern BOOLEAN AcceptCommands;
59 extern HANDLE CommandThread;
60 extern ULONG SessionId;
61 #endif
62
63 extern HANDLE VdmTaskEvent;
64
65 // Command line of NTVDM
66 extern INT NtVdmArgc;
67 extern WCHAR** NtVdmArgv;
68
69
70 /*
71 * Interface functions
72 */
73 VOID DisplayMessage(LPCWSTR Format, ...);
74
75 /*static*/ VOID
76 CreateVdmMenu(HANDLE ConOutHandle);
77 /*static*/ VOID
78 DestroyVdmMenu(VOID);
79
80 BOOL ConsoleAttach(VOID);
81 VOID ConsoleDetach(VOID);
82 VOID MenuEventHandler(PMENU_EVENT_RECORD MenuEvent);
83 VOID FocusEventHandler(PFOCUS_EVENT_RECORD FocusEvent);
84
85 #endif // _NTVDM_H_
86
87 /* EOF */