ReactOS 0.4.15-dev-8138-g1e75ea8
ntvdm.h
Go to the documentation of this file.
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#ifndef _countof
44#define _countof(_Array) (sizeof(_Array) / sizeof(_Array[0]))
45#endif
46
47/* String widening macro */
48#define __L(x) L ## x
49#define _L(x) __L(x)
50#define L(x) _L(x)
51
52/* PSDK/NDK Headers */
53#define WIN32_NO_STATUS
54#include <windef.h>
55#include <winbase.h>
56#include <wingdi.h>
57#include <wincon.h>
58#include <winnls.h>
59#include <winreg.h>
60#include <winuser.h>
61#include <commdlg.h>
62
63#include <subsys/win/vdm.h>
64
65// Do not include stuff that is only defined
66// for backwards compatibility in nt_vdd.h
67#define NO_NTVDD_COMPAT
68#include <vddsvc.h>
69
71
72#define NTOS_MODE_USER
73#include <ndk/kefuncs.h> // For NtQueryPerformanceCounter()
74#include <ndk/rtlfuncs.h>
75
76/* PSEH for SEH Support */
77#include <pseh/pseh2.h>
78
79#include <ntstrsafe.h>
80
81
82/* VARIABLES ******************************************************************/
83
84typedef struct _NTVDM_SETTINGS
85{
91
93
94// Command line of NTVDM
95extern INT NtVdmArgc;
96extern WCHAR** NtVdmArgv;
97
98/* Full directory where NTVDM resides, or the SystemRoot\System32 path */
100extern ULONG NtVdmPathSize; // Length without NULL terminator.
101
102extern HWND hConsoleWnd;
103
104
105/* FUNCTIONS ******************************************************************/
106
107/*
108 * Interface functions
109 */
110typedef VOID (*CHAR_PRINT)(IN CHAR Character);
113 IN LPCSTR Format, ...);
114
115/*static*/ VOID
117
120VOID ConsoleReattach(HANDLE ConOutHandle);
124
125#endif // _NTVDM_H_
126
127/* EOF */
#define VOID
Definition: acefi.h:82
#define MAX_PATH
Definition: compat.h:34
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
INT NtVdmArgc
Definition: ntvdm.c:31
WCHAR NtVdmPath[MAX_PATH]
Definition: ntvdm.c:35
VOID UpdateVdmMenuDisks(VOID)
Definition: console.c:146
BOOL ConsoleAttach(VOID)
Definition: console.c:398
struct _NTVDM_SETTINGS * PNTVDM_SETTINGS
struct _NTVDM_SETTINGS NTVDM_SETTINGS
VOID PrintMessageAnsi(IN CHAR_PRINT CharPrint, IN LPCSTR Format,...)
Definition: ntvdm.c:416
DWORD WINAPI SetLastConsoleEventActive(VOID)
Definition: console.c:3279
ULONG NtVdmPathSize
Definition: ntvdm.c:36
HWND hConsoleWnd
Definition: console.c:20
VOID MenuEventHandler(PMENU_EVENT_RECORD MenuEvent)
Definition: console.c:527
VOID FocusEventHandler(PFOCUS_EVENT_RECORD FocusEvent)
Definition: console.c:600
VOID(* CHAR_PRINT)(IN CHAR Character)
Definition: ntvdm.h:110
VOID ConsoleDetach(VOID)
Definition: console.c:424
VOID ConsoleReattach(HANDLE ConOutHandle)
Definition: console.c:435
WCHAR ** NtVdmArgv
Definition: ntvdm.c:32
NTVDM_SETTINGS GlobalSettings
Definition: ntvdm.c:28
VOID DisplayMessage(IN LPCWSTR Format,...)
Definition: ntvdm.c:360
#define IsConsoleHandle(h)
Definition: console.h:14
UNICODE_STRING HardDisks[4]
Definition: ntvdm.h:89
UNICODE_STRING FloppyDisks[2]
Definition: ntvdm.h:88
ANSI_STRING RomFiles
Definition: ntvdm.h:87
ANSI_STRING BiosFileName
Definition: ntvdm.h:86
int32_t INT
Definition: typedefs.h:58
#define IN
Definition: typedefs.h:39
uint32_t ULONG
Definition: typedefs.h:59
#define WINAPI
Definition: msvc.h:6
const char * LPCSTR
Definition: xmlstorage.h:183
__wchar_t WCHAR
Definition: xmlstorage.h:180
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
char CHAR
Definition: xmlstorage.h:175