f16e7799f58d0107b631a5f704d7d936d98dcacf
[reactos.git] / include / reactos / subsys / win / winmsg.h
1 /*
2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS Client/Server Runtime SubSystem
4 * FILE: include/reactos/subsys/win/winmsg.h
5 * PURPOSE: Public definitions for communication
6 * between User-Mode API Clients and Servers
7 * PROGRAMMERS: Hermes Belusca-Maito (hermes.belusca@sfr.fr)
8 */
9
10 #ifndef _WINMSG_H
11 #define _WINMSG_H
12
13 #pragma once
14
15 #define USERSRV_SERVERDLL_INDEX 3
16 #define USERSRV_FIRST_API_NUMBER 1024
17
18 // Windows Server 2003 table from http://j00ru.vexillium.org/csrss_list/api_list.html#Windows_2k3
19 typedef enum _USERSRV_API_NUMBER
20 {
21 UserpExitWindowsEx = USERSRV_FIRST_API_NUMBER,
22 // UserpEndTask,
23 // UserpLogon,
24 UserpRegisterServicesProcess, // Not present in Win7
25 // UserpActivateDebugger,
26 // UserpGetThreadConsoleDesktop, // Not present in Win7
27 // UserpDeviceEvent,
28 UserpRegisterLogonProcess, // Not present in Win7
29 // UserpCreateSystemThreads,
30 // UserpRecordShutdownReason,
31 // UserpCancelShutdown, // Added in Vista
32 // UserpConsoleHandleOperation, // Added in Win7
33 // UserpGetSetShutdownBlockReason, // Added in Vista
34
35 UserpMaxApiNumber
36 } USERSRV_API_NUMBER, *PUSERSRV_API_NUMBER;
37
38
39 typedef struct
40 {
41 UINT Flags;
42 DWORD Reserved;
43 } CSRSS_EXIT_REACTOS, *PCSRSS_EXIT_REACTOS;
44
45 typedef struct
46 {
47 ULONG_PTR ProcessId;
48 } CSRSS_REGISTER_SERVICES_PROCESS, *PCSRSS_REGISTER_SERVICES_PROCESS;
49
50 typedef struct
51 {
52 ULONG_PTR ProcessId;
53 BOOL Register;
54 } CSRSS_REGISTER_LOGON_PROCESS, *PCSRSS_REGISTER_LOGON_PROCESS;
55
56
57 typedef struct _USER_API_MESSAGE
58 {
59 PORT_MESSAGE Header;
60
61 PCSR_CAPTURE_BUFFER CsrCaptureData;
62 CSR_API_NUMBER ApiNumber;
63 NTSTATUS Status; // ReturnValue;
64 ULONG Reserved;
65 union
66 {
67 CSRSS_EXIT_REACTOS ExitReactosRequest;
68 CSRSS_REGISTER_SERVICES_PROCESS RegisterServicesProcessRequest;
69 CSRSS_REGISTER_LOGON_PROCESS RegisterLogonProcessRequest;
70 } Data;
71 } USER_API_MESSAGE, *PUSER_API_MESSAGE;
72
73 // Check that a USER_API_MESSAGE can hold in a CSR_API_MESSAGE.
74 CHECK_API_MSG_SIZE(USER_API_MESSAGE);
75
76 #endif // _WINMSG_H
77
78 /* EOF */