1 /* 2 * COPYRIGHT: See COPYING in the top level directory 3 * PROJECT: ReactOS User API Server DLL 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 /* The USERCONNECT structure is defined in win32ss/include/ntuser.h */ 39 #define _USERSRV_API_CONNECTINFO _USERCONNECT 40 #define USERSRV_API_CONNECTINFO USERCONNECT 41 #define PUSERSRV_API_CONNECTINFO PUSERCONNECT 42 43 #if defined(_M_IX86) 44 C_ASSERT(sizeof(USERSRV_API_CONNECTINFO) == 0x124); 45 #endif 46 47 48 typedef struct _USER_EXIT_REACTOS 49 { 50 DWORD LastError; 51 UINT Flags; 52 BOOL Success; 53 } USER_EXIT_REACTOS, *PUSER_EXIT_REACTOS; 54 55 typedef struct _USER_END_TASK 56 { 57 DWORD LastError; 58 HWND WndHandle; 59 BOOL Force; 60 BOOL Success; 61 } USER_END_TASK, *PUSER_END_TASK; 62 63 typedef struct _USER_LOGON 64 { 65 BOOL IsLogon; 66 } USER_LOGON, *PUSER_LOGON; 67 68 typedef struct _USER_GET_THREAD_CONSOLE_DESKTOP 69 { 70 ULONG_PTR ThreadId; 71 HDESK ConsoleDesktop; 72 } USER_GET_THREAD_CONSOLE_DESKTOP, *PUSER_GET_THREAD_CONSOLE_DESKTOP; 73 74 typedef struct _USER_REGISTER_SERVICES_PROCESS 75 { 76 ULONG_PTR ProcessId; 77 } USER_REGISTER_SERVICES_PROCESS, *PUSER_REGISTER_SERVICES_PROCESS; 78 79 typedef struct _USER_REGISTER_LOGON_PROCESS 80 { 81 ULONG_PTR ProcessId; 82 BOOL Register; 83 } USER_REGISTER_LOGON_PROCESS, *PUSER_REGISTER_LOGON_PROCESS; 84 85 typedef struct _USER_CREATE_SYSTEM_THREAD 86 { 87 BOOL bRemote; 88 } USER_CREATE_SYSTEM_THREAD, *PUSER_CREATE_SYSTEM_THREAD; 89 90 typedef struct _USER_DEVICE_EVENT_MSG { 91 HWND hwnd; 92 WPARAM wParam; 93 LPARAM lParam; 94 DWORD Data; 95 ULONG_PTR Result; 96 } USER_DEVICE_EVENT_MSG, *PUSER_DEVICE_EVENT_MSG; 97 98 typedef struct _USER_API_MESSAGE 99 { 100 PORT_MESSAGE Header; 101 102 PCSR_CAPTURE_BUFFER CsrCaptureData; 103 CSR_API_NUMBER ApiNumber; 104 NTSTATUS Status; 105 ULONG Reserved; 106 union 107 { 108 USER_EXIT_REACTOS ExitReactOSRequest; 109 USER_END_TASK EndTaskRequest; 110 USER_LOGON LogonRequest; 111 USER_GET_THREAD_CONSOLE_DESKTOP GetThreadConsoleDesktopRequest; 112 USER_REGISTER_SERVICES_PROCESS RegisterServicesProcessRequest; 113 USER_REGISTER_LOGON_PROCESS RegisterLogonProcessRequest; 114 USER_CREATE_SYSTEM_THREAD CreateSystemThreadRequest; 115 USER_DEVICE_EVENT_MSG DeviceEventMsg; 116 } Data; 117 } USER_API_MESSAGE, *PUSER_API_MESSAGE; 118 119 // Check that a USER_API_MESSAGE can hold in a CSR_API_MESSAGE. 120 CHECK_API_MSG_SIZE(USER_API_MESSAGE); 121 122 #endif // _WINMSG_H 123 124 /* EOF */ 125