[CONSRV]
[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 // CSR_SERVER_DLL_INIT(UserServerDllInitialization);
19
20 typedef enum _USERSRV_API_NUMBER
21 {
22 UserpExitWindowsEx = USERSRV_FIRST_API_NUMBER,
23 // UserpEndTask,
24 // UserpLogon,
25 UserpRegisterServicesProcess, // Not present in Win7
26 // UserpActivateDebugger,
27 // UserpGetThreadConsoleDesktop, // Not present in Win7
28 // UserpDeviceEvent,
29 UserpRegisterLogonProcess, // Not present in Win7
30 // UserpCreateSystemThreads,
31 // UserpRecordShutdownReason,
32 // UserpCancelShutdown, // Added in Vista
33 // UserpConsoleHandleOperation, // Added in Win7
34 // UserpGetSetShutdownBlockReason, // Added in Vista
35
36 /// HACK: ReactOS-specific
37 UserpRosSetLogonNotifyWindow,
38
39 UserpMaxApiNumber
40 } USERSRV_API_NUMBER, *PUSERSRV_API_NUMBER;
41
42
43 typedef struct
44 {
45 UINT Flags;
46 DWORD Reserved;
47 } CSRSS_EXIT_REACTOS, *PCSRSS_EXIT_REACTOS;
48
49 typedef struct
50 {
51 ULONG_PTR ProcessId;
52 } CSRSS_REGISTER_SERVICES_PROCESS, *PCSRSS_REGISTER_SERVICES_PROCESS;
53
54 typedef struct
55 {
56 ULONG_PTR ProcessId;
57 BOOL Register;
58 } CSRSS_REGISTER_LOGON_PROCESS, *PCSRSS_REGISTER_LOGON_PROCESS;
59
60 /// HACK: ReactOS-specific
61 typedef struct
62 {
63 HWND LogonNotifyWindow;
64 } CSRSS_SET_LOGON_NOTIFY_WINDOW, *PCSRSS_SET_LOGON_NOTIFY_WINDOW;
65
66
67 typedef struct _USER_API_MESSAGE
68 {
69 PORT_MESSAGE Header;
70
71 PCSR_CAPTURE_BUFFER CsrCaptureData;
72 CSR_API_NUMBER ApiNumber;
73 ULONG Status; // ReturnValue; // NTSTATUS Status
74 ULONG Reserved;
75 union
76 {
77 CSRSS_EXIT_REACTOS ExitReactosRequest;
78 CSRSS_REGISTER_SERVICES_PROCESS RegisterServicesProcessRequest;
79 CSRSS_REGISTER_LOGON_PROCESS RegisterLogonProcessRequest;
80
81 /// HACK: ReactOS-specific
82 CSRSS_SET_LOGON_NOTIFY_WINDOW SetLogonNotifyWindowRequest;
83 } Data;
84 } USER_API_MESSAGE, *PUSER_API_MESSAGE;
85
86 // Check that a USER_API_MESSAGE can hold in a CSR_API_MESSAGE.
87 CHECK_API_MSG_SIZE(USER_API_MESSAGE);
88
89 #endif // _WINMSG_H
90
91 /* EOF */