[NTUSER] Rewrite NtUserUnloadKeyboardLayout (#4613)
[reactos.git] / subsystems / win / basesrv / vdm.h
1 /*
2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS Base API Server DLL
4 * FILE: subsystems/win/basesrv/vdm.h
5 * PURPOSE: VDM Definitions
6 * PROGRAMMERS: Aleksandar Andrejevic <theflash AT sdf DOT lonestar DOT org>
7 */
8
9 #ifndef __VDM_H__
10 #define __VDM_H__
11
12 #include <win/vdm.h>
13
14 /* DEFINITIONS ****************************************************************/
15
16 #define VDM_POLICY_KEY_NAME L"Software\\Policies\\Microsoft\\Windows\\AppCompat"
17 #define VDM_DISALLOWED_VALUE_NAME L"VDMDisallowed"
18
19 typedef struct _VDM_CONSOLE_RECORD
20 {
21 LIST_ENTRY Entry;
22 HANDLE ConsoleHandle;
23 HANDLE ProcessHandle;
24 HANDLE ServerEvent;
25 HANDLE ClientEvent;
26 ULONG ProcessId;
27 ULONG ReenterCount;
28 PCHAR CurrentDirs;
29 ULONG CurDirsLength;
30 ULONG SessionId;
31 LIST_ENTRY DosListHead;
32 } VDM_CONSOLE_RECORD, *PVDM_CONSOLE_RECORD;
33
34 typedef struct _VDM_DOS_RECORD
35 {
36 LIST_ENTRY Entry;
37 USHORT State;
38 ULONG ExitCode;
39 HANDLE ServerEvent;
40 HANDLE ClientEvent;
41 PVDM_COMMAND_INFO CommandInfo;
42 } VDM_DOS_RECORD, *PVDM_DOS_RECORD;
43
44 /* FUNCTIONS ******************************************************************/
45
46 NTSTATUS BaseSrvGetConsoleRecord(HANDLE ConsoleHandle, PVDM_CONSOLE_RECORD *Record);
47 NTSTATUS GetConsoleRecordBySessionId(ULONG TaskId, PVDM_CONSOLE_RECORD *Record);
48
49 BOOLEAN BaseSrvIsVdmAllowed(VOID);
50 VOID BaseInitializeVDM(VOID);
51 VOID BaseSrvCleanupVDMResources(IN PCSR_PROCESS CsrProcess);
52
53 #endif // __VDM_H__