b08cfb3aa74198a20d24731f4a7220d485de0b53
[reactos.git] / dll / win32 / kernel32 / include / vdm.h
1 /*
2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS System Libraries
4 * FILE: dll/win32/kernel32/include/vdm.h
5 * PURPOSE: Virtual DOS Machines (VDM) Support Definitions
6 * PROGRAMMERS: Alex Ionescu (alex.ionescu@reactos.org)
7 */
8
9 #pragma once
10
11 /* CONSTANTS ******************************************************************/
12
13 typedef enum _VDM_ENTRY_CODE
14 {
15 VdmEntryUndo,
16 VdmEntryUpdateProcess,
17 VdmEntryUpdateControlCHandler
18 } VDM_ENTRY_CODE;
19
20 //
21 // Undo States
22 //
23 #define VDM_UNDO_PARTIAL 0x01
24 #define VDM_UNDO_FULL 0x02
25 #define VDM_UNDO_REUSE 0x04
26 #define VDM_UNDO_COMPLETED 0x08
27
28 //
29 // Binary Types to share with VDM
30 //
31 #define BINARY_TYPE_EXE 0x01
32 #define BINARY_TYPE_COM 0x02
33 #define BINARY_TYPE_PIF 0x03
34 #define BINARY_TYPE_DOS 0x10
35 #define BINARY_TYPE_SEPARATE_WOW 0x20
36 #define BINARY_TYPE_WOW 0x40
37 #define BINARY_TYPE_WOW_EX 0x80
38
39 //
40 // VDM States
41 //
42 #define VDM_NOT_LOADED 0x01
43 #define VDM_NOT_READY 0x02
44 #define VDM_READY 0x04
45
46
47 /* FUNCTION PROTOTYPES ********************************************************/
48
49 BOOL
50 NTAPI
51 BaseDestroyVDMEnvironment(
52 IN PANSI_STRING AnsiEnv,
53 IN PUNICODE_STRING UnicodeEnv
54 );
55
56 BOOL
57 WINAPI
58 BaseGetVdmConfigInfo(
59 IN LPCWSTR CommandLineReserved,
60 IN ULONG DosSeqId,
61 IN ULONG BinaryType,
62 IN PUNICODE_STRING CmdLineString,
63 OUT PULONG VdmSize
64 );
65
66 BOOL
67 NTAPI
68 BaseCreateVDMEnvironment(
69 IN PWCHAR lpEnvironment,
70 IN PANSI_STRING AnsiEnv,
71 IN PUNICODE_STRING UnicodeEnv
72 );
73
74 BOOL
75 WINAPI
76 BaseUpdateVDMEntry(
77 IN ULONG UpdateIndex,
78 IN OUT PHANDLE WaitHandle,
79 IN ULONG IndexInfo,
80 IN ULONG BinaryType
81 );
82
83 BOOL
84 WINAPI
85 BaseCheckForVDM(
86 IN HANDLE ProcessHandle,
87 OUT LPDWORD ExitCode
88 );
89
90 BOOL
91 WINAPI
92 BaseCheckVDM(
93 IN ULONG BinaryType,
94 IN PCWCH ApplicationName,
95 IN PCWCH CommandLine,
96 IN PCWCH CurrentDirectory,
97 IN PANSI_STRING AnsiEnvironment,
98 IN PCSR_API_MESSAGE ApiMessage,
99 IN OUT PULONG iTask,
100 IN DWORD CreationFlags,
101 IN LPSTARTUPINFOW StartupInfo,
102 IN HANDLE hUserToken OPTIONAL
103 );
104
105 /* EOF */