[BASESRV]
[reactos.git] / include / reactos / subsys / win / basemsg.h
1
2 #ifndef __BASEMSG_H__
3 #define __BASEMSG_H__
4
5 #pragma once
6
7 #define BASESRV_SERVERDLL_INDEX 1
8 #define BASESRV_FIRST_API_NUMBER 0
9
10 // Windows NT 4 table, adapted from http://j00ru.vexillium.org/csrss_list/api_list.html#Windows_NT
11 // It is for testing purposes. After that I will update it to 2k3 version and add stubs.
12 typedef enum _BASESRV_API_NUMBER
13 {
14 BasepCreateProcess = BASESRV_FIRST_API_NUMBER,
15 BasepCreateThread,
16 BasepGetTempFile,
17 BasepExitProcess,
18 // BasepDebugProcess,
19 // BasepCheckVDM,
20 // BasepUpdateVDMEntry,
21 // BasepGetNextVDMCommand,
22 // BasepExitVDM,
23 // BasepIsFirstVDM,
24 // BasepGetVDMExitCode,
25 // BasepSetReenterCount,
26 BasepSetProcessShutdownParam,
27 BasepGetProcessShutdownParam,
28 // BasepNlsSetUserInfo,
29 // BasepNlsSetMultipleUserInfo,
30 // BasepNlsCreateSortSection,
31 // BasepNlsPreserveSection,
32 // BasepSetVDMCurDirs,
33 // BasepGetVDMCurDirs,
34 // BasepBatNotification,
35 // BasepRegisterWowExec,
36 BasepSoundSentryNotification,
37 // BasepRefreshIniFileMapping,
38 BasepDefineDosDevice,
39
40 BasepMaxApiNumber
41 } BASESRV_API_NUMBER, *PBASESRV_API_NUMBER;
42
43 typedef struct _BASE_SXS_CREATEPROCESS_MSG
44 {
45 ULONG Flags;
46 ULONG ProcessParameterFlags;
47 HANDLE FileHandle;
48 UNICODE_STRING SxsWin32ExePath;
49 UNICODE_STRING SxsNtExePath;
50 SIZE_T OverrideManifestOffset;
51 ULONG OverrideManifestSize;
52 SIZE_T OverridePolicyOffset;
53 ULONG OverridePolicySize;
54 PVOID PEManifestAddress;
55 ULONG PEManifestSize;
56 UNICODE_STRING CultureFallbacks;
57 ULONG Unknown[7];
58 UNICODE_STRING AssemblyName;
59 } BASE_SXS_CREATEPROCESS_MSG, *PBASE_SXS_CREATEPROCESS_MSG;
60
61 typedef struct
62 {
63 //
64 // NT-type structure (BASE_CREATEPROCESS_MSG)
65 //
66 HANDLE ProcessHandle;
67 HANDLE ThreadHandle;
68 CLIENT_ID ClientId;
69 ULONG CreationFlags;
70 ULONG VdmBinaryType;
71 ULONG VdmTask;
72 HANDLE hVDM;
73 BASE_SXS_CREATEPROCESS_MSG Sxs;
74 PVOID PebAddressNative;
75 ULONG PebAddressWow64;
76 USHORT ProcessorArchitecture;
77
78 //
79 // ReactOS Data
80 //
81 BOOL bInheritHandles;
82 } BASE_CREATE_PROCESS, *PBASE_CREATE_PROCESS;
83
84 typedef struct
85 {
86 CLIENT_ID ClientId;
87 HANDLE ThreadHandle;
88 } BASE_CREATE_THREAD, *PBASE_CREATE_THREAD;
89
90 typedef struct
91 {
92 UINT uExitCode;
93 } BASE_EXIT_PROCESS, *PBASE_EXIT_PROCESS;
94
95 typedef struct
96 {
97 UINT UniqueID;
98 } BASE_GET_TEMP_FILE, *PBASE_GET_TEMP_FILE;
99
100 typedef struct
101 {
102 ULONG iTask;
103 HANDLE ConsoleHandle;
104 ULONG BinaryType;
105 HANDLE WaitObjectForParent;
106 HANDLE StdIn;
107 HANDLE StdOut;
108 HANDLE StdErr;
109 ULONG CodePage;
110 ULONG dwCreationFlags;
111 PCHAR CmdLine;
112 PCHAR appName;
113 PCHAR PifFile;
114 PCHAR CurDirectory;
115 PCHAR Env;
116 ULONG EnvLen;
117 PVOID StartupInfo;
118 PCHAR Desktop;
119 ULONG DesktopLen;
120 PCHAR Title;
121 ULONG TitleLen;
122 PCHAR Reserved;
123 ULONG ReservedLen;
124 USHORT CmdLen;
125 USHORT AppLen;
126 USHORT PifLen;
127 USHORT CurDirectoryLen;
128 USHORT CurDrive;
129 USHORT VDMState;
130 } BASE_CHECK_VDM, *PBASE_CHECK_VDM;
131
132 typedef struct
133 {
134 ULONG iTask;
135 ULONG BinaryType;
136 HANDLE ConsoleHandle;
137 HANDLE VDMProcessHandle;
138 HANDLE WaitObjectForParent;
139 USHORT EntryIndex;
140 USHORT VDMCreationState;
141 } BASE_UPDATE_VDM_ENTRY, *PBASE_UPDATE_VDM_ENTRY;
142
143 typedef struct
144 {
145 HANDLE ConsoleHandle;
146 HANDLE hParent;
147 ULONG ExitCode;
148 } BASE_GET_VDM_EXIT_CODE, *PBASE_GET_VDM_EXIT_CODE;
149
150 typedef struct
151 {
152 DWORD Level;
153 DWORD Flags;
154 } BASE_SET_PROCESS_SHUTDOWN_PARAMS, *PBASE_SET_PROCESS_SHUTDOWN_PARAMS;
155
156 typedef struct
157 {
158 DWORD Level;
159 DWORD Flags;
160 } BASE_GET_PROCESS_SHUTDOWN_PARAMS, *PBASE_GET_PROCESS_SHUTDOWN_PARAMS;
161
162 typedef struct
163 {
164 ULONG VideoMode;
165 } BASE_SOUND_SENTRY, *PBASE_SOUND_SENTRY;
166
167 typedef struct
168 {
169 UNICODE_STRING DeviceName;
170 UNICODE_STRING TargetName;
171 DWORD dwFlags;
172 } BASE_DEFINE_DOS_DEVICE, *PBASE_DEFINE_DOS_DEVICE;
173
174 typedef struct _BASE_API_MESSAGE
175 {
176 PORT_MESSAGE Header;
177
178 PCSR_CAPTURE_BUFFER CsrCaptureData;
179 CSR_API_NUMBER ApiNumber;
180 ULONG Status;
181 ULONG Reserved;
182 union
183 {
184 BASE_CREATE_PROCESS CreateProcessRequest;
185 BASE_CREATE_THREAD CreateThreadRequest;
186 BASE_EXIT_PROCESS ExitProcessRequest; // CSRSS_TERMINATE_PROCESS TerminateProcessRequest;
187 BASE_GET_TEMP_FILE GetTempFile;
188 BASE_CHECK_VDM CheckVdm;
189 BASE_UPDATE_VDM_ENTRY UpdateVdmEntry;
190 BASE_GET_VDM_EXIT_CODE GetVdmExitCode;
191 BASE_SET_PROCESS_SHUTDOWN_PARAMS SetShutdownParametersRequest; // CSRSS_SET_SHUTDOWN_PARAMETERS
192 BASE_GET_PROCESS_SHUTDOWN_PARAMS GetShutdownParametersRequest; // CSRSS_GET_SHUTDOWN_PARAMETERS
193 BASE_SOUND_SENTRY SoundSentryRequest;
194 BASE_DEFINE_DOS_DEVICE DefineDosDeviceRequest;
195 } Data;
196 } BASE_API_MESSAGE, *PBASE_API_MESSAGE;
197
198 #endif // __BASEMSG_H__
199
200 /* EOF */