Alexandre Julliard | 642d313 | 1998-07-12 19:29:36 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Wine server definitions |
| 3 | * |
| 4 | * Copyright (C) 1998 Alexandre Julliard |
| 5 | */ |
| 6 | |
| 7 | #ifndef __WINE_SERVER_H |
| 8 | #define __WINE_SERVER_H |
| 9 | |
Alexandre Julliard | 338e757 | 1998-12-27 15:28:54 +0000 | [diff] [blame] | 10 | #include <stdlib.h> |
| 11 | #include <time.h> |
Alexandre Julliard | 1d2ba52 | 1999-11-24 01:24:50 +0000 | [diff] [blame] | 12 | #include "winbase.h" |
Alexandre Julliard | 338e757 | 1998-12-27 15:28:54 +0000 | [diff] [blame] | 13 | |
Alexandre Julliard | 767e6f6 | 1998-08-09 12:47:43 +0000 | [diff] [blame] | 14 | /* Request structures */ |
Alexandre Julliard | 642d313 | 1998-07-12 19:29:36 +0000 | [diff] [blame] | 15 | |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 16 | /* Following are the definitions of all the client<->server */ |
| 17 | /* communication format; if you make any change in this file, */ |
| 18 | /* you must run tools/make_requests again. */ |
| 19 | |
| 20 | |
| 21 | /* These empty macros are used by tools/make_requests */ |
| 22 | /* to generate the request/reply tracing functions */ |
| 23 | #define IN /*nothing*/ |
| 24 | #define OUT /*nothing*/ |
Alexandre Julliard | 8611353 | 2000-08-29 03:54:30 +0000 | [diff] [blame] | 25 | #define VARARG(name,func) /*nothing*/ |
Alexandre Julliard | 642d313 | 1998-07-12 19:29:36 +0000 | [diff] [blame] | 26 | |
Alexandre Julliard | 8611353 | 2000-08-29 03:54:30 +0000 | [diff] [blame] | 27 | struct request_header |
| 28 | { |
| 29 | IN int req; /* request code */ |
| 30 | IN unsigned short fixed_size; /* size of the fixed part of the request */ |
| 31 | IN unsigned short var_size; /* size of the variable part of the request */ |
| 32 | OUT unsigned int error; /* error result */ |
| 33 | }; |
| 34 | #define REQUEST_HEADER struct request_header header |
| 35 | |
| 36 | |
| 37 | /* placeholder structure for the maximum allowed request size */ |
| 38 | /* this is used to construct the generic_request union */ |
| 39 | struct request_max_size |
| 40 | { |
| 41 | int pad[16]; /* the max request size is 16 ints */ |
| 42 | }; |
Alexandre Julliard | 767e6f6 | 1998-08-09 12:47:43 +0000 | [diff] [blame] | 43 | |
Alexandre Julliard | 9264300 | 2000-08-31 01:59:51 +0000 | [diff] [blame] | 44 | /* max size of the variable part of a request */ |
| 45 | #define REQUEST_MAX_VAR_SIZE 1024 |
| 46 | |
Alexandre Julliard | d7e85d6 | 1999-11-23 19:39:11 +0000 | [diff] [blame] | 47 | /* a path name for server requests (Unicode) */ |
| 48 | typedef WCHAR path_t[MAX_PATH+1]; |
| 49 | |
Alexandre Julliard | 3e2517c | 2000-01-20 18:59:03 +0000 | [diff] [blame] | 50 | |
| 51 | /* definitions of the event data depending on the event code */ |
| 52 | struct debug_event_exception |
| 53 | { |
Alexandre Julliard | ea0d028 | 2000-03-10 22:16:10 +0000 | [diff] [blame] | 54 | EXCEPTION_RECORD record; /* exception record */ |
| 55 | int first; /* first chance exception? */ |
Alexandre Julliard | 3e2517c | 2000-01-20 18:59:03 +0000 | [diff] [blame] | 56 | }; |
| 57 | struct debug_event_create_thread |
| 58 | { |
| 59 | int handle; /* handle to the new thread */ |
| 60 | void *teb; /* thread teb (in debugged process address space) */ |
| 61 | void *start; /* thread startup routine */ |
| 62 | }; |
| 63 | struct debug_event_create_process |
| 64 | { |
| 65 | int file; /* handle to the process exe file */ |
| 66 | int process; /* handle to the new process */ |
| 67 | int thread; /* handle to the new thread */ |
| 68 | void *base; /* base of executable image */ |
| 69 | int dbg_offset; /* offset of debug info in file */ |
| 70 | int dbg_size; /* size of debug info */ |
| 71 | void *teb; /* thread teb (in debugged process address space) */ |
| 72 | void *start; /* thread startup routine */ |
| 73 | void *name; /* image name (optional) */ |
| 74 | int unicode; /* is it Unicode? */ |
| 75 | }; |
| 76 | struct debug_event_exit |
| 77 | { |
| 78 | int exit_code; /* thread or process exit code */ |
| 79 | }; |
| 80 | struct debug_event_load_dll |
| 81 | { |
| 82 | int handle; /* file handle for the dll */ |
| 83 | void *base; /* base address of the dll */ |
| 84 | int dbg_offset; /* offset of debug info in file */ |
| 85 | int dbg_size; /* size of debug info */ |
| 86 | void *name; /* image name (optional) */ |
| 87 | int unicode; /* is it Unicode? */ |
| 88 | }; |
| 89 | struct debug_event_unload_dll |
| 90 | { |
| 91 | void *base; /* base address of the dll */ |
| 92 | }; |
| 93 | struct debug_event_output_string |
| 94 | { |
| 95 | void *string; /* string to display (in debugged process address space) */ |
| 96 | int unicode; /* is it Unicode? */ |
| 97 | int length; /* string length */ |
| 98 | }; |
| 99 | struct debug_event_rip_info |
| 100 | { |
| 101 | int error; /* ??? */ |
| 102 | int type; /* ??? */ |
| 103 | }; |
| 104 | union debug_event_data |
| 105 | { |
| 106 | struct debug_event_exception exception; |
| 107 | struct debug_event_create_thread create_thread; |
| 108 | struct debug_event_create_process create_process; |
| 109 | struct debug_event_exit exit; |
| 110 | struct debug_event_load_dll load_dll; |
| 111 | struct debug_event_unload_dll unload_dll; |
| 112 | struct debug_event_output_string output_string; |
| 113 | struct debug_event_rip_info rip_info; |
| 114 | }; |
| 115 | |
| 116 | /* debug event data */ |
| 117 | typedef struct |
| 118 | { |
| 119 | int code; /* event code */ |
| 120 | union debug_event_data info; /* event information */ |
| 121 | } debug_event_t; |
| 122 | |
| 123 | |
Alexandre Julliard | f692d44 | 1999-03-21 19:23:54 +0000 | [diff] [blame] | 124 | /* Create a new process from the context of the parent */ |
| 125 | struct new_process_request |
| 126 | { |
Alexandre Julliard | 8611353 | 2000-08-29 03:54:30 +0000 | [diff] [blame] | 127 | REQUEST_HEADER; /* request header */ |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 128 | IN int inherit_all; /* inherit all handles from parent */ |
| 129 | IN int create_flags; /* creation flags */ |
| 130 | IN int start_flags; /* flags from startup info */ |
Alexandre Julliard | 67a24c8 | 2000-02-18 21:54:32 +0000 | [diff] [blame] | 131 | IN int exe_file; /* file handle for main exe */ |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 132 | IN int hstdin; /* handle for stdin */ |
| 133 | IN int hstdout; /* handle for stdout */ |
| 134 | IN int hstderr; /* handle for stderr */ |
| 135 | IN int cmd_show; /* main window show mode */ |
Alexandre Julliard | 5b4f3e8 | 2000-05-01 16:24:22 +0000 | [diff] [blame] | 136 | IN int alloc_fd; /* create the fd pair right now? */ |
Alexandre Julliard | 9264300 | 2000-08-31 01:59:51 +0000 | [diff] [blame] | 137 | IN VARARG(filename,string); /* file name of main exe */ |
Alexandre Julliard | 5b4f3e8 | 2000-05-01 16:24:22 +0000 | [diff] [blame] | 138 | }; |
| 139 | |
| 140 | |
| 141 | /* Wait for the new process to start */ |
| 142 | struct wait_process_request |
| 143 | { |
Alexandre Julliard | 8611353 | 2000-08-29 03:54:30 +0000 | [diff] [blame] | 144 | REQUEST_HEADER; /* request header */ |
Alexandre Julliard | 5b4f3e8 | 2000-05-01 16:24:22 +0000 | [diff] [blame] | 145 | IN int pinherit; /* process handle inherit flag */ |
| 146 | IN int tinherit; /* thread handle inherit flag */ |
| 147 | IN int timeout; /* wait timeout */ |
| 148 | IN int cancel; /* cancel the process creation? */ |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 149 | OUT void* pid; /* process id */ |
Alexandre Julliard | 2fe5777 | 2000-01-25 01:40:27 +0000 | [diff] [blame] | 150 | OUT int phandle; /* process handle (in the current process) */ |
| 151 | OUT void* tid; /* thread id */ |
| 152 | OUT int thandle; /* thread handle (in the current process) */ |
Alexandre Julliard | 6a72dc5 | 2000-04-14 13:42:00 +0000 | [diff] [blame] | 153 | OUT int event; /* event handle to signal startup */ |
Alexandre Julliard | f692d44 | 1999-03-21 19:23:54 +0000 | [diff] [blame] | 154 | }; |
| 155 | |
| 156 | |
Alexandre Julliard | 767e6f6 | 1998-08-09 12:47:43 +0000 | [diff] [blame] | 157 | /* Create a new thread from the context of the parent */ |
Alexandre Julliard | 642d313 | 1998-07-12 19:29:36 +0000 | [diff] [blame] | 158 | struct new_thread_request |
| 159 | { |
Alexandre Julliard | 8611353 | 2000-08-29 03:54:30 +0000 | [diff] [blame] | 160 | REQUEST_HEADER; /* request header */ |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 161 | IN int suspend; /* new thread should be suspended on creation */ |
| 162 | IN int inherit; /* inherit flag */ |
| 163 | OUT void* tid; /* thread id */ |
| 164 | OUT int handle; /* thread handle (in the current process) */ |
Alexandre Julliard | 642d313 | 1998-07-12 19:29:36 +0000 | [diff] [blame] | 165 | }; |
| 166 | |
Alexandre Julliard | 767e6f6 | 1998-08-09 12:47:43 +0000 | [diff] [blame] | 167 | |
Alexandre Julliard | 2fe5777 | 2000-01-25 01:40:27 +0000 | [diff] [blame] | 168 | /* Signal that we are finished booting on the client side */ |
| 169 | struct boot_done_request |
Alexandre Julliard | 338e757 | 1998-12-27 15:28:54 +0000 | [diff] [blame] | 170 | { |
Alexandre Julliard | 8611353 | 2000-08-29 03:54:30 +0000 | [diff] [blame] | 171 | REQUEST_HEADER; /* request header */ |
Alexandre Julliard | 2fe5777 | 2000-01-25 01:40:27 +0000 | [diff] [blame] | 172 | IN int debug_level; /* new debug level */ |
Alexandre Julliard | 338e757 | 1998-12-27 15:28:54 +0000 | [diff] [blame] | 173 | }; |
| 174 | |
| 175 | |
Alexandre Julliard | f692d44 | 1999-03-21 19:23:54 +0000 | [diff] [blame] | 176 | /* Initialize a process; called from the new process context */ |
| 177 | struct init_process_request |
| 178 | { |
Alexandre Julliard | 8611353 | 2000-08-29 03:54:30 +0000 | [diff] [blame] | 179 | REQUEST_HEADER; /* request header */ |
Alexandre Julliard | 0a7c1f6 | 2000-01-27 02:54:17 +0000 | [diff] [blame] | 180 | IN void* ldt_copy; /* addr of LDT copy */ |
Alexandre Julliard | 5b4f3e8 | 2000-05-01 16:24:22 +0000 | [diff] [blame] | 181 | IN int ppid; /* parent Unix pid */ |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 182 | OUT int start_flags; /* flags from startup info */ |
Andreas Mohr | c941eff | 2000-09-22 22:37:56 +0000 | [diff] [blame] | 183 | OUT unsigned int server_start; /* server start time (GetTickCount) */ |
Alexandre Julliard | 67a24c8 | 2000-02-18 21:54:32 +0000 | [diff] [blame] | 184 | OUT int exe_file; /* file handle for main exe */ |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 185 | OUT int hstdin; /* handle for stdin */ |
| 186 | OUT int hstdout; /* handle for stdout */ |
| 187 | OUT int hstderr; /* handle for stderr */ |
| 188 | OUT int cmd_show; /* main window show mode */ |
Alexandre Julliard | 9264300 | 2000-08-31 01:59:51 +0000 | [diff] [blame] | 189 | OUT VARARG(filename,string); /* file name of main exe */ |
Alexandre Julliard | f692d44 | 1999-03-21 19:23:54 +0000 | [diff] [blame] | 190 | }; |
| 191 | |
| 192 | |
Alexandre Julliard | ec7bb23 | 1999-11-12 03:35:25 +0000 | [diff] [blame] | 193 | /* Signal the end of the process initialization */ |
| 194 | struct init_process_done_request |
| 195 | { |
Alexandre Julliard | 8611353 | 2000-08-29 03:54:30 +0000 | [diff] [blame] | 196 | REQUEST_HEADER; /* request header */ |
Alexandre Julliard | ff81d78 | 2000-03-08 12:01:30 +0000 | [diff] [blame] | 197 | IN void* module; /* main module base address */ |
| 198 | IN void* entry; /* process entry point */ |
Alexandre Julliard | a37dec0 | 2000-06-08 00:57:24 +0000 | [diff] [blame] | 199 | IN void* name; /* ptr to ptr to name (in process addr space) */ |
Alexandre Julliard | c5e433a | 2000-05-30 19:48:18 +0000 | [diff] [blame] | 200 | IN int gui; /* is it a GUI process? */ |
Alexandre Julliard | 00641d5 | 2000-03-08 16:41:37 +0000 | [diff] [blame] | 201 | OUT int debugged; /* being debugged? */ |
Alexandre Julliard | ec7bb23 | 1999-11-12 03:35:25 +0000 | [diff] [blame] | 202 | }; |
| 203 | |
| 204 | |
Alexandre Julliard | 767e6f6 | 1998-08-09 12:47:43 +0000 | [diff] [blame] | 205 | /* Initialize a thread; called from the child after fork()/clone() */ |
Alexandre Julliard | 642d313 | 1998-07-12 19:29:36 +0000 | [diff] [blame] | 206 | struct init_thread_request |
| 207 | { |
Alexandre Julliard | 8611353 | 2000-08-29 03:54:30 +0000 | [diff] [blame] | 208 | REQUEST_HEADER; /* request header */ |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 209 | IN int unix_pid; /* Unix pid of new thread */ |
| 210 | IN void* teb; /* TEB of new thread (in thread address space) */ |
Alexandre Julliard | ff81d78 | 2000-03-08 12:01:30 +0000 | [diff] [blame] | 211 | IN void* entry; /* thread entry point (in thread address space) */ |
Alexandre Julliard | 642d313 | 1998-07-12 19:29:36 +0000 | [diff] [blame] | 212 | }; |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 213 | |
| 214 | |
| 215 | /* Retrieve the thread buffer file descriptor */ |
| 216 | /* The reply to this request is the first thing a newly */ |
| 217 | /* created thread gets (without having to request it) */ |
| 218 | struct get_thread_buffer_request |
Alexandre Julliard | 875c4b3 | 1999-03-23 14:09:41 +0000 | [diff] [blame] | 219 | { |
Alexandre Julliard | 8611353 | 2000-08-29 03:54:30 +0000 | [diff] [blame] | 220 | REQUEST_HEADER; /* request header */ |
Alexandre Julliard | ff81d78 | 2000-03-08 12:01:30 +0000 | [diff] [blame] | 221 | OUT void* pid; /* process id of the new thread's process */ |
| 222 | OUT void* tid; /* thread id of the new thread */ |
| 223 | OUT int boot; /* is this the boot thread? */ |
Alexandre Julliard | 5fb5456 | 2000-03-08 22:01:02 +0000 | [diff] [blame] | 224 | OUT int version; /* protocol version */ |
Alexandre Julliard | 875c4b3 | 1999-03-23 14:09:41 +0000 | [diff] [blame] | 225 | }; |
Alexandre Julliard | 642d313 | 1998-07-12 19:29:36 +0000 | [diff] [blame] | 226 | |
Alexandre Julliard | 642d313 | 1998-07-12 19:29:36 +0000 | [diff] [blame] | 227 | |
Alexandre Julliard | 767e6f6 | 1998-08-09 12:47:43 +0000 | [diff] [blame] | 228 | /* Terminate a process */ |
| 229 | struct terminate_process_request |
| 230 | { |
Alexandre Julliard | 8611353 | 2000-08-29 03:54:30 +0000 | [diff] [blame] | 231 | REQUEST_HEADER; /* request header */ |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 232 | IN int handle; /* process handle to terminate */ |
| 233 | IN int exit_code; /* process exit code */ |
Alexandre Julliard | 12f29b5 | 2000-03-17 15:16:57 +0000 | [diff] [blame] | 234 | OUT int self; /* suicide? */ |
Alexandre Julliard | 767e6f6 | 1998-08-09 12:47:43 +0000 | [diff] [blame] | 235 | }; |
| 236 | |
| 237 | |
| 238 | /* Terminate a thread */ |
| 239 | struct terminate_thread_request |
| 240 | { |
Alexandre Julliard | 8611353 | 2000-08-29 03:54:30 +0000 | [diff] [blame] | 241 | REQUEST_HEADER; /* request header */ |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 242 | IN int handle; /* thread handle to terminate */ |
| 243 | IN int exit_code; /* thread exit code */ |
Alexandre Julliard | 12f29b5 | 2000-03-17 15:16:57 +0000 | [diff] [blame] | 244 | OUT int self; /* suicide? */ |
| 245 | OUT int last; /* last thread in this process? */ |
Alexandre Julliard | 767e6f6 | 1998-08-09 12:47:43 +0000 | [diff] [blame] | 246 | }; |
| 247 | |
| 248 | |
| 249 | /* Retrieve information about a process */ |
| 250 | struct get_process_info_request |
| 251 | { |
Alexandre Julliard | 8611353 | 2000-08-29 03:54:30 +0000 | [diff] [blame] | 252 | REQUEST_HEADER; /* request header */ |
Alexandre Julliard | 00641d5 | 2000-03-08 16:41:37 +0000 | [diff] [blame] | 253 | IN int handle; /* process handle */ |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 254 | OUT void* pid; /* server process id */ |
Alexandre Julliard | 00641d5 | 2000-03-08 16:41:37 +0000 | [diff] [blame] | 255 | OUT int debugged; /* debugged? */ |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 256 | OUT int exit_code; /* process exit code */ |
| 257 | OUT int priority; /* priority class */ |
| 258 | OUT int process_affinity; /* process affinity mask */ |
| 259 | OUT int system_affinity; /* system affinity mask */ |
Alexandre Julliard | 767e6f6 | 1998-08-09 12:47:43 +0000 | [diff] [blame] | 260 | }; |
| 261 | |
| 262 | |
Alexandre Julliard | 62a8b43 | 1999-01-19 17:48:23 +0000 | [diff] [blame] | 263 | /* Set a process informations */ |
| 264 | struct set_process_info_request |
| 265 | { |
Alexandre Julliard | 8611353 | 2000-08-29 03:54:30 +0000 | [diff] [blame] | 266 | REQUEST_HEADER; /* request header */ |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 267 | IN int handle; /* process handle */ |
| 268 | IN int mask; /* setting mask (see below) */ |
| 269 | IN int priority; /* priority class */ |
| 270 | IN int affinity; /* affinity mask */ |
Alexandre Julliard | 62a8b43 | 1999-01-19 17:48:23 +0000 | [diff] [blame] | 271 | }; |
| 272 | #define SET_PROCESS_INFO_PRIORITY 0x01 |
| 273 | #define SET_PROCESS_INFO_AFFINITY 0x02 |
| 274 | |
| 275 | |
Alexandre Julliard | 85ed45e | 1998-08-22 19:03:56 +0000 | [diff] [blame] | 276 | /* Retrieve information about a thread */ |
| 277 | struct get_thread_info_request |
| 278 | { |
Alexandre Julliard | 8611353 | 2000-08-29 03:54:30 +0000 | [diff] [blame] | 279 | REQUEST_HEADER; /* request header */ |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 280 | IN int handle; /* thread handle */ |
Alexandre Julliard | 9a0e28f | 2000-03-25 19:14:37 +0000 | [diff] [blame] | 281 | IN void* tid_in; /* thread id (optional) */ |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 282 | OUT void* tid; /* server thread id */ |
Alexandre Julliard | 9a0e28f | 2000-03-25 19:14:37 +0000 | [diff] [blame] | 283 | OUT void* teb; /* thread teb pointer */ |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 284 | OUT int exit_code; /* thread exit code */ |
| 285 | OUT int priority; /* thread priority level */ |
Alexandre Julliard | 62a8b43 | 1999-01-19 17:48:23 +0000 | [diff] [blame] | 286 | }; |
| 287 | |
| 288 | |
| 289 | /* Set a thread informations */ |
| 290 | struct set_thread_info_request |
| 291 | { |
Alexandre Julliard | 8611353 | 2000-08-29 03:54:30 +0000 | [diff] [blame] | 292 | REQUEST_HEADER; /* request header */ |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 293 | IN int handle; /* thread handle */ |
| 294 | IN int mask; /* setting mask (see below) */ |
| 295 | IN int priority; /* priority class */ |
| 296 | IN int affinity; /* affinity mask */ |
Alexandre Julliard | 62a8b43 | 1999-01-19 17:48:23 +0000 | [diff] [blame] | 297 | }; |
| 298 | #define SET_THREAD_INFO_PRIORITY 0x01 |
| 299 | #define SET_THREAD_INFO_AFFINITY 0x02 |
| 300 | |
| 301 | |
| 302 | /* Suspend a thread */ |
| 303 | struct suspend_thread_request |
| 304 | { |
Alexandre Julliard | 8611353 | 2000-08-29 03:54:30 +0000 | [diff] [blame] | 305 | REQUEST_HEADER; /* request header */ |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 306 | IN int handle; /* thread handle */ |
| 307 | OUT int count; /* new suspend count */ |
Alexandre Julliard | 62a8b43 | 1999-01-19 17:48:23 +0000 | [diff] [blame] | 308 | }; |
| 309 | |
| 310 | |
| 311 | /* Resume a thread */ |
| 312 | struct resume_thread_request |
| 313 | { |
Alexandre Julliard | 8611353 | 2000-08-29 03:54:30 +0000 | [diff] [blame] | 314 | REQUEST_HEADER; /* request header */ |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 315 | IN int handle; /* thread handle */ |
| 316 | OUT int count; /* new suspend count */ |
Alexandre Julliard | 62a8b43 | 1999-01-19 17:48:23 +0000 | [diff] [blame] | 317 | }; |
| 318 | |
| 319 | |
Alexandre Julliard | 05f0b71 | 2000-03-09 18:18:41 +0000 | [diff] [blame] | 320 | /* Notify the server that a dll has been loaded */ |
| 321 | struct load_dll_request |
Ulrich Weigand | 371fd75 | 1999-04-11 17:13:03 +0000 | [diff] [blame] | 322 | { |
Alexandre Julliard | 8611353 | 2000-08-29 03:54:30 +0000 | [diff] [blame] | 323 | REQUEST_HEADER; /* request header */ |
Alexandre Julliard | 05f0b71 | 2000-03-09 18:18:41 +0000 | [diff] [blame] | 324 | IN int handle; /* file handle */ |
| 325 | IN void* base; /* base address */ |
| 326 | IN int dbg_offset; /* debug info offset */ |
| 327 | IN int dbg_size; /* debug info size */ |
| 328 | IN void* name; /* ptr to ptr to name (in process addr space) */ |
Ulrich Weigand | 371fd75 | 1999-04-11 17:13:03 +0000 | [diff] [blame] | 329 | }; |
| 330 | |
Alexandre Julliard | 05f0b71 | 2000-03-09 18:18:41 +0000 | [diff] [blame] | 331 | |
| 332 | /* Notify the server that a dll is being unloaded */ |
| 333 | struct unload_dll_request |
| 334 | { |
Alexandre Julliard | 8611353 | 2000-08-29 03:54:30 +0000 | [diff] [blame] | 335 | REQUEST_HEADER; /* request header */ |
Alexandre Julliard | 05f0b71 | 2000-03-09 18:18:41 +0000 | [diff] [blame] | 336 | IN void* base; /* base address */ |
| 337 | }; |
Ulrich Weigand | 371fd75 | 1999-04-11 17:13:03 +0000 | [diff] [blame] | 338 | |
| 339 | |
Alexandre Julliard | 62a8b43 | 1999-01-19 17:48:23 +0000 | [diff] [blame] | 340 | /* Queue an APC for a thread */ |
| 341 | struct queue_apc_request |
| 342 | { |
Alexandre Julliard | 8611353 | 2000-08-29 03:54:30 +0000 | [diff] [blame] | 343 | REQUEST_HEADER; /* request header */ |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 344 | IN int handle; /* thread handle */ |
| 345 | IN void* func; /* function to call */ |
| 346 | IN void* param; /* param for function to call */ |
| 347 | }; |
| 348 | |
| 349 | |
Alexandre Julliard | ea1afce | 2000-08-22 20:08:37 +0000 | [diff] [blame] | 350 | /* Get next APC to call */ |
| 351 | struct get_apc_request |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 352 | { |
Alexandre Julliard | 8611353 | 2000-08-29 03:54:30 +0000 | [diff] [blame] | 353 | REQUEST_HEADER; /* request header */ |
Alexandre Julliard | ea1afce | 2000-08-22 20:08:37 +0000 | [diff] [blame] | 354 | OUT void* func; /* function to call */ |
| 355 | OUT int type; /* function type */ |
Alexandre Julliard | 9c2370b | 2000-08-30 00:00:48 +0000 | [diff] [blame] | 356 | OUT VARARG(args,ptrs); /* function arguments */ |
Alexandre Julliard | 85ed45e | 1998-08-22 19:03:56 +0000 | [diff] [blame] | 357 | }; |
Mike McCormack | 1eac191 | 2000-11-13 19:27:21 +0000 | [diff] [blame] | 358 | enum apc_type { APC_NONE, APC_USER, APC_TIMER, APC_ASYNC }; |
Alexandre Julliard | 85ed45e | 1998-08-22 19:03:56 +0000 | [diff] [blame] | 359 | |
| 360 | |
Alexandre Julliard | 767e6f6 | 1998-08-09 12:47:43 +0000 | [diff] [blame] | 361 | /* Close a handle for the current process */ |
| 362 | struct close_handle_request |
| 363 | { |
Alexandre Julliard | 8611353 | 2000-08-29 03:54:30 +0000 | [diff] [blame] | 364 | REQUEST_HEADER; /* request header */ |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 365 | IN int handle; /* handle to close */ |
Alexandre Julliard | 767e6f6 | 1998-08-09 12:47:43 +0000 | [diff] [blame] | 366 | }; |
| 367 | |
| 368 | |
Alexandre Julliard | 6d4ee73 | 1999-02-20 16:13:28 +0000 | [diff] [blame] | 369 | /* Get information about a handle */ |
| 370 | struct get_handle_info_request |
| 371 | { |
Alexandre Julliard | 8611353 | 2000-08-29 03:54:30 +0000 | [diff] [blame] | 372 | REQUEST_HEADER; /* request header */ |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 373 | IN int handle; /* handle we are interested in */ |
| 374 | OUT int flags; /* handle flags */ |
Alexandre Julliard | 6d4ee73 | 1999-02-20 16:13:28 +0000 | [diff] [blame] | 375 | }; |
| 376 | |
| 377 | |
| 378 | /* Set a handle information */ |
| 379 | struct set_handle_info_request |
| 380 | { |
Alexandre Julliard | 8611353 | 2000-08-29 03:54:30 +0000 | [diff] [blame] | 381 | REQUEST_HEADER; /* request header */ |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 382 | IN int handle; /* handle we are interested in */ |
| 383 | IN int flags; /* new handle flags */ |
| 384 | IN int mask; /* mask for flags to set */ |
Alexandre Julliard | 6d4ee73 | 1999-02-20 16:13:28 +0000 | [diff] [blame] | 385 | }; |
| 386 | |
| 387 | |
Alexandre Julliard | 767e6f6 | 1998-08-09 12:47:43 +0000 | [diff] [blame] | 388 | /* Duplicate a handle */ |
| 389 | struct dup_handle_request |
| 390 | { |
Alexandre Julliard | 8611353 | 2000-08-29 03:54:30 +0000 | [diff] [blame] | 391 | REQUEST_HEADER; /* request header */ |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 392 | IN int src_process; /* src process handle */ |
| 393 | IN int src_handle; /* src handle to duplicate */ |
| 394 | IN int dst_process; /* dst process handle */ |
| 395 | IN unsigned int access; /* wanted access rights */ |
| 396 | IN int inherit; /* inherit flag */ |
| 397 | IN int options; /* duplicate options (see below) */ |
| 398 | OUT int handle; /* duplicated handle in dst process */ |
Alexandre Julliard | 767e6f6 | 1998-08-09 12:47:43 +0000 | [diff] [blame] | 399 | }; |
Alexandre Julliard | 63cb0f8 | 1998-12-31 15:43:48 +0000 | [diff] [blame] | 400 | #define DUP_HANDLE_CLOSE_SOURCE DUPLICATE_CLOSE_SOURCE |
| 401 | #define DUP_HANDLE_SAME_ACCESS DUPLICATE_SAME_ACCESS |
| 402 | #define DUP_HANDLE_MAKE_GLOBAL 0x80000000 /* Not a Windows flag */ |
Alexandre Julliard | 767e6f6 | 1998-08-09 12:47:43 +0000 | [diff] [blame] | 403 | |
| 404 | |
| 405 | /* Open a handle to a process */ |
| 406 | struct open_process_request |
| 407 | { |
Alexandre Julliard | 8611353 | 2000-08-29 03:54:30 +0000 | [diff] [blame] | 408 | REQUEST_HEADER; /* request header */ |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 409 | IN void* pid; /* process id to open */ |
| 410 | IN unsigned int access; /* wanted access rights */ |
| 411 | IN int inherit; /* inherit flag */ |
| 412 | OUT int handle; /* handle to the process */ |
Alexandre Julliard | 767e6f6 | 1998-08-09 12:47:43 +0000 | [diff] [blame] | 413 | }; |
Alexandre Julliard | 642d313 | 1998-07-12 19:29:36 +0000 | [diff] [blame] | 414 | |
| 415 | |
Alexandre Julliard | 85ed45e | 1998-08-22 19:03:56 +0000 | [diff] [blame] | 416 | /* Wait for handles */ |
| 417 | struct select_request |
| 418 | { |
Alexandre Julliard | 8611353 | 2000-08-29 03:54:30 +0000 | [diff] [blame] | 419 | REQUEST_HEADER; /* request header */ |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 420 | IN int flags; /* wait flags (see below) */ |
| 421 | IN int timeout; /* timeout in ms */ |
| 422 | OUT int signaled; /* signaled handle */ |
Alexandre Julliard | 9c2370b | 2000-08-30 00:00:48 +0000 | [diff] [blame] | 423 | IN VARARG(handles,ints); /* handles to select on */ |
Alexandre Julliard | 85ed45e | 1998-08-22 19:03:56 +0000 | [diff] [blame] | 424 | }; |
| 425 | #define SELECT_ALL 1 |
Alexandre Julliard | a8b8d9c | 1999-01-01 16:59:27 +0000 | [diff] [blame] | 426 | #define SELECT_ALERTABLE 2 |
| 427 | #define SELECT_TIMEOUT 4 |
Alexandre Julliard | 85ed45e | 1998-08-22 19:03:56 +0000 | [diff] [blame] | 428 | |
Alexandre Julliard | d30dfd2 | 1998-09-27 18:28:36 +0000 | [diff] [blame] | 429 | |
| 430 | /* Create an event */ |
| 431 | struct create_event_request |
| 432 | { |
Alexandre Julliard | 8611353 | 2000-08-29 03:54:30 +0000 | [diff] [blame] | 433 | REQUEST_HEADER; /* request header */ |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 434 | IN int manual_reset; /* manual reset event */ |
| 435 | IN int initial_state; /* initial state of the event */ |
| 436 | IN int inherit; /* inherit flag */ |
| 437 | OUT int handle; /* handle to the event */ |
Alexandre Julliard | 9c2370b | 2000-08-30 00:00:48 +0000 | [diff] [blame] | 438 | IN VARARG(name,unicode_str); /* object name */ |
Alexandre Julliard | d30dfd2 | 1998-09-27 18:28:36 +0000 | [diff] [blame] | 439 | }; |
| 440 | |
| 441 | /* Event operation */ |
| 442 | struct event_op_request |
| 443 | { |
Alexandre Julliard | 8611353 | 2000-08-29 03:54:30 +0000 | [diff] [blame] | 444 | REQUEST_HEADER; /* request header */ |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 445 | IN int handle; /* handle to event */ |
| 446 | IN int op; /* event operation (see below) */ |
Alexandre Julliard | d30dfd2 | 1998-09-27 18:28:36 +0000 | [diff] [blame] | 447 | }; |
| 448 | enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT }; |
| 449 | |
| 450 | |
Alexandre Julliard | 43c190e | 1999-05-15 10:48:19 +0000 | [diff] [blame] | 451 | /* Open an event */ |
| 452 | struct open_event_request |
| 453 | { |
Alexandre Julliard | 8611353 | 2000-08-29 03:54:30 +0000 | [diff] [blame] | 454 | REQUEST_HEADER; /* request header */ |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 455 | IN unsigned int access; /* wanted access rights */ |
| 456 | IN int inherit; /* inherit flag */ |
| 457 | OUT int handle; /* handle to the event */ |
Alexandre Julliard | 9c2370b | 2000-08-30 00:00:48 +0000 | [diff] [blame] | 458 | IN VARARG(name,unicode_str); /* object name */ |
Alexandre Julliard | 43c190e | 1999-05-15 10:48:19 +0000 | [diff] [blame] | 459 | }; |
| 460 | |
| 461 | |
Alexandre Julliard | d30dfd2 | 1998-09-27 18:28:36 +0000 | [diff] [blame] | 462 | /* Create a mutex */ |
| 463 | struct create_mutex_request |
| 464 | { |
Alexandre Julliard | 8611353 | 2000-08-29 03:54:30 +0000 | [diff] [blame] | 465 | REQUEST_HEADER; /* request header */ |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 466 | IN int owned; /* initially owned? */ |
| 467 | IN int inherit; /* inherit flag */ |
| 468 | OUT int handle; /* handle to the mutex */ |
Alexandre Julliard | 9c2370b | 2000-08-30 00:00:48 +0000 | [diff] [blame] | 469 | IN VARARG(name,unicode_str); /* object name */ |
Alexandre Julliard | d30dfd2 | 1998-09-27 18:28:36 +0000 | [diff] [blame] | 470 | }; |
| 471 | |
| 472 | |
| 473 | /* Release a mutex */ |
| 474 | struct release_mutex_request |
| 475 | { |
Alexandre Julliard | 8611353 | 2000-08-29 03:54:30 +0000 | [diff] [blame] | 476 | REQUEST_HEADER; /* request header */ |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 477 | IN int handle; /* handle to the mutex */ |
Alexandre Julliard | d30dfd2 | 1998-09-27 18:28:36 +0000 | [diff] [blame] | 478 | }; |
| 479 | |
| 480 | |
Alexandre Julliard | 43c190e | 1999-05-15 10:48:19 +0000 | [diff] [blame] | 481 | /* Open a mutex */ |
| 482 | struct open_mutex_request |
| 483 | { |
Alexandre Julliard | 8611353 | 2000-08-29 03:54:30 +0000 | [diff] [blame] | 484 | REQUEST_HEADER; /* request header */ |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 485 | IN unsigned int access; /* wanted access rights */ |
| 486 | IN int inherit; /* inherit flag */ |
| 487 | OUT int handle; /* handle to the mutex */ |
Alexandre Julliard | 9c2370b | 2000-08-30 00:00:48 +0000 | [diff] [blame] | 488 | IN VARARG(name,unicode_str); /* object name */ |
Alexandre Julliard | 43c190e | 1999-05-15 10:48:19 +0000 | [diff] [blame] | 489 | }; |
| 490 | |
| 491 | |
Alexandre Julliard | d30dfd2 | 1998-09-27 18:28:36 +0000 | [diff] [blame] | 492 | /* Create a semaphore */ |
| 493 | struct create_semaphore_request |
| 494 | { |
Alexandre Julliard | 8611353 | 2000-08-29 03:54:30 +0000 | [diff] [blame] | 495 | REQUEST_HEADER; /* request header */ |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 496 | IN unsigned int initial; /* initial count */ |
| 497 | IN unsigned int max; /* maximum count */ |
| 498 | IN int inherit; /* inherit flag */ |
| 499 | OUT int handle; /* handle to the semaphore */ |
Alexandre Julliard | 9c2370b | 2000-08-30 00:00:48 +0000 | [diff] [blame] | 500 | IN VARARG(name,unicode_str); /* object name */ |
Alexandre Julliard | d30dfd2 | 1998-09-27 18:28:36 +0000 | [diff] [blame] | 501 | }; |
| 502 | |
| 503 | |
| 504 | /* Release a semaphore */ |
| 505 | struct release_semaphore_request |
| 506 | { |
Alexandre Julliard | 8611353 | 2000-08-29 03:54:30 +0000 | [diff] [blame] | 507 | REQUEST_HEADER; /* request header */ |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 508 | IN int handle; /* handle to the semaphore */ |
| 509 | IN unsigned int count; /* count to add to semaphore */ |
| 510 | OUT unsigned int prev_count; /* previous semaphore count */ |
Alexandre Julliard | d30dfd2 | 1998-09-27 18:28:36 +0000 | [diff] [blame] | 511 | }; |
| 512 | |
Alexandre Julliard | 338e757 | 1998-12-27 15:28:54 +0000 | [diff] [blame] | 513 | |
Alexandre Julliard | 43c190e | 1999-05-15 10:48:19 +0000 | [diff] [blame] | 514 | /* Open a semaphore */ |
| 515 | struct open_semaphore_request |
Alexandre Julliard | d30dfd2 | 1998-09-27 18:28:36 +0000 | [diff] [blame] | 516 | { |
Alexandre Julliard | 8611353 | 2000-08-29 03:54:30 +0000 | [diff] [blame] | 517 | REQUEST_HEADER; /* request header */ |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 518 | IN unsigned int access; /* wanted access rights */ |
| 519 | IN int inherit; /* inherit flag */ |
| 520 | OUT int handle; /* handle to the semaphore */ |
Alexandre Julliard | 9c2370b | 2000-08-30 00:00:48 +0000 | [diff] [blame] | 521 | IN VARARG(name,unicode_str); /* object name */ |
Alexandre Julliard | d30dfd2 | 1998-09-27 18:28:36 +0000 | [diff] [blame] | 522 | }; |
| 523 | |
| 524 | |
Alexandre Julliard | 338e757 | 1998-12-27 15:28:54 +0000 | [diff] [blame] | 525 | /* Create a file */ |
| 526 | struct create_file_request |
| 527 | { |
Alexandre Julliard | 8611353 | 2000-08-29 03:54:30 +0000 | [diff] [blame] | 528 | REQUEST_HEADER; /* request header */ |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 529 | IN unsigned int access; /* wanted access rights */ |
| 530 | IN int inherit; /* inherit flag */ |
| 531 | IN unsigned int sharing; /* sharing flags */ |
| 532 | IN int create; /* file create action */ |
| 533 | IN unsigned int attrs; /* file attributes for creation */ |
| 534 | OUT int handle; /* handle to the file */ |
Alexandre Julliard | 9264300 | 2000-08-31 01:59:51 +0000 | [diff] [blame] | 535 | IN VARARG(filename,string); /* file name */ |
Alexandre Julliard | 338e757 | 1998-12-27 15:28:54 +0000 | [diff] [blame] | 536 | }; |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 537 | |
| 538 | |
| 539 | /* Allocate a file handle for a Unix fd */ |
| 540 | struct alloc_file_handle_request |
Alexandre Julliard | 338e757 | 1998-12-27 15:28:54 +0000 | [diff] [blame] | 541 | { |
Alexandre Julliard | 8611353 | 2000-08-29 03:54:30 +0000 | [diff] [blame] | 542 | REQUEST_HEADER; /* request header */ |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 543 | IN unsigned int access; /* wanted access rights */ |
| 544 | OUT int handle; /* handle to the file */ |
Alexandre Julliard | 338e757 | 1998-12-27 15:28:54 +0000 | [diff] [blame] | 545 | }; |
| 546 | |
| 547 | |
Alexandre Julliard | aa0ebd0 | 1998-12-30 12:06:45 +0000 | [diff] [blame] | 548 | /* Get a Unix fd to read from a file */ |
| 549 | struct get_read_fd_request |
| 550 | { |
Alexandre Julliard | 8611353 | 2000-08-29 03:54:30 +0000 | [diff] [blame] | 551 | REQUEST_HEADER; /* request header */ |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 552 | IN int handle; /* handle to the file */ |
Alexandre Julliard | aa0ebd0 | 1998-12-30 12:06:45 +0000 | [diff] [blame] | 553 | }; |
| 554 | |
| 555 | |
| 556 | /* Get a Unix fd to write to a file */ |
| 557 | struct get_write_fd_request |
| 558 | { |
Alexandre Julliard | 8611353 | 2000-08-29 03:54:30 +0000 | [diff] [blame] | 559 | REQUEST_HEADER; /* request header */ |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 560 | IN int handle; /* handle to the file */ |
Alexandre Julliard | aa0ebd0 | 1998-12-30 12:06:45 +0000 | [diff] [blame] | 561 | }; |
| 562 | |
| 563 | |
| 564 | /* Set a file current position */ |
| 565 | struct set_file_pointer_request |
| 566 | { |
Alexandre Julliard | 8611353 | 2000-08-29 03:54:30 +0000 | [diff] [blame] | 567 | REQUEST_HEADER; /* request header */ |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 568 | IN int handle; /* handle to the file */ |
| 569 | IN int low; /* position low word */ |
| 570 | IN int high; /* position high word */ |
| 571 | IN int whence; /* whence to seek */ |
| 572 | OUT int new_low; /* new position low word */ |
| 573 | OUT int new_high; /* new position high word */ |
Alexandre Julliard | aa0ebd0 | 1998-12-30 12:06:45 +0000 | [diff] [blame] | 574 | }; |
| 575 | |
| 576 | |
| 577 | /* Truncate (or extend) a file */ |
| 578 | struct truncate_file_request |
| 579 | { |
Alexandre Julliard | 8611353 | 2000-08-29 03:54:30 +0000 | [diff] [blame] | 580 | REQUEST_HEADER; /* request header */ |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 581 | IN int handle; /* handle to the file */ |
Alexandre Julliard | aa0ebd0 | 1998-12-30 12:06:45 +0000 | [diff] [blame] | 582 | }; |
| 583 | |
| 584 | |
Alexandre Julliard | 0562539 | 1999-01-03 11:55:56 +0000 | [diff] [blame] | 585 | /* Set a file access and modification times */ |
| 586 | struct set_file_time_request |
| 587 | { |
Alexandre Julliard | 8611353 | 2000-08-29 03:54:30 +0000 | [diff] [blame] | 588 | REQUEST_HEADER; /* request header */ |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 589 | IN int handle; /* handle to the file */ |
| 590 | IN time_t access_time; /* last access time */ |
| 591 | IN time_t write_time; /* last write time */ |
Alexandre Julliard | 0562539 | 1999-01-03 11:55:56 +0000 | [diff] [blame] | 592 | }; |
| 593 | |
| 594 | |
Alexandre Julliard | aa0ebd0 | 1998-12-30 12:06:45 +0000 | [diff] [blame] | 595 | /* Flush a file buffers */ |
| 596 | struct flush_file_request |
| 597 | { |
Alexandre Julliard | 8611353 | 2000-08-29 03:54:30 +0000 | [diff] [blame] | 598 | REQUEST_HEADER; /* request header */ |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 599 | IN int handle; /* handle to the file */ |
Alexandre Julliard | aa0ebd0 | 1998-12-30 12:06:45 +0000 | [diff] [blame] | 600 | }; |
| 601 | |
| 602 | |
| 603 | /* Get information about a file */ |
Alexandre Julliard | 338e757 | 1998-12-27 15:28:54 +0000 | [diff] [blame] | 604 | struct get_file_info_request |
| 605 | { |
Alexandre Julliard | 8611353 | 2000-08-29 03:54:30 +0000 | [diff] [blame] | 606 | REQUEST_HEADER; /* request header */ |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 607 | IN int handle; /* handle to the file */ |
| 608 | OUT int type; /* file type */ |
| 609 | OUT int attr; /* file attributes */ |
| 610 | OUT time_t access_time; /* last access time */ |
| 611 | OUT time_t write_time; /* last write time */ |
| 612 | OUT int size_high; /* file size */ |
| 613 | OUT int size_low; /* file size */ |
| 614 | OUT int links; /* number of links */ |
| 615 | OUT int index_high; /* unique index */ |
| 616 | OUT int index_low; /* unique index */ |
| 617 | OUT unsigned int serial; /* volume serial number */ |
Alexandre Julliard | 338e757 | 1998-12-27 15:28:54 +0000 | [diff] [blame] | 618 | }; |
| 619 | |
Alexandre Julliard | aa0ebd0 | 1998-12-30 12:06:45 +0000 | [diff] [blame] | 620 | |
Alexandre Julliard | 62a8b43 | 1999-01-19 17:48:23 +0000 | [diff] [blame] | 621 | /* Lock a region of a file */ |
| 622 | struct lock_file_request |
| 623 | { |
Alexandre Julliard | 8611353 | 2000-08-29 03:54:30 +0000 | [diff] [blame] | 624 | REQUEST_HEADER; /* request header */ |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 625 | IN int handle; /* handle to the file */ |
| 626 | IN unsigned int offset_low; /* offset of start of lock */ |
| 627 | IN unsigned int offset_high; /* offset of start of lock */ |
| 628 | IN unsigned int count_low; /* count of bytes to lock */ |
| 629 | IN unsigned int count_high; /* count of bytes to lock */ |
Alexandre Julliard | 62a8b43 | 1999-01-19 17:48:23 +0000 | [diff] [blame] | 630 | }; |
| 631 | |
| 632 | |
| 633 | /* Unlock a region of a file */ |
| 634 | struct unlock_file_request |
| 635 | { |
Alexandre Julliard | 8611353 | 2000-08-29 03:54:30 +0000 | [diff] [blame] | 636 | REQUEST_HEADER; /* request header */ |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 637 | IN int handle; /* handle to the file */ |
| 638 | IN unsigned int offset_low; /* offset of start of unlock */ |
| 639 | IN unsigned int offset_high; /* offset of start of unlock */ |
| 640 | IN unsigned int count_low; /* count of bytes to unlock */ |
| 641 | IN unsigned int count_high; /* count of bytes to unlock */ |
Alexandre Julliard | 62a8b43 | 1999-01-19 17:48:23 +0000 | [diff] [blame] | 642 | }; |
| 643 | |
| 644 | |
Alexandre Julliard | aa0ebd0 | 1998-12-30 12:06:45 +0000 | [diff] [blame] | 645 | /* Create an anonymous pipe */ |
| 646 | struct create_pipe_request |
| 647 | { |
Alexandre Julliard | 8611353 | 2000-08-29 03:54:30 +0000 | [diff] [blame] | 648 | REQUEST_HEADER; /* request header */ |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 649 | IN int inherit; /* inherit flag */ |
| 650 | OUT int handle_read; /* handle to the read-side of the pipe */ |
| 651 | OUT int handle_write; /* handle to the write-side of the pipe */ |
Alexandre Julliard | aa0ebd0 | 1998-12-30 12:06:45 +0000 | [diff] [blame] | 652 | }; |
| 653 | |
| 654 | |
Ove Kaaven | 019211f | 1999-10-13 16:05:37 +0000 | [diff] [blame] | 655 | /* Create a socket */ |
| 656 | struct create_socket_request |
| 657 | { |
Alexandre Julliard | 8611353 | 2000-08-29 03:54:30 +0000 | [diff] [blame] | 658 | REQUEST_HEADER; /* request header */ |
Ove Kaaven | 019211f | 1999-10-13 16:05:37 +0000 | [diff] [blame] | 659 | IN unsigned int access; /* wanted access rights */ |
| 660 | IN int inherit; /* inherit flag */ |
| 661 | IN int family; /* family, see socket manpage */ |
| 662 | IN int type; /* type, see socket manpage */ |
| 663 | IN int protocol; /* protocol, see socket manpage */ |
| 664 | OUT int handle; /* handle to the new socket */ |
| 665 | }; |
| 666 | |
| 667 | |
| 668 | /* Accept a socket */ |
| 669 | struct accept_socket_request |
| 670 | { |
Alexandre Julliard | 8611353 | 2000-08-29 03:54:30 +0000 | [diff] [blame] | 671 | REQUEST_HEADER; /* request header */ |
Ove Kaaven | 019211f | 1999-10-13 16:05:37 +0000 | [diff] [blame] | 672 | IN int lhandle; /* handle to the listening socket */ |
| 673 | IN unsigned int access; /* wanted access rights */ |
| 674 | IN int inherit; /* inherit flag */ |
| 675 | OUT int handle; /* handle to the new socket */ |
| 676 | }; |
| 677 | |
| 678 | |
| 679 | /* Set socket event parameters */ |
| 680 | struct set_socket_event_request |
| 681 | { |
Alexandre Julliard | 8611353 | 2000-08-29 03:54:30 +0000 | [diff] [blame] | 682 | REQUEST_HEADER; /* request header */ |
Ove Kaaven | 019211f | 1999-10-13 16:05:37 +0000 | [diff] [blame] | 683 | IN int handle; /* handle to the socket */ |
| 684 | IN unsigned int mask; /* event mask */ |
| 685 | IN int event; /* event object */ |
| 686 | }; |
| 687 | |
| 688 | |
| 689 | /* Get socket event parameters */ |
| 690 | struct get_socket_event_request |
| 691 | { |
Alexandre Julliard | 8611353 | 2000-08-29 03:54:30 +0000 | [diff] [blame] | 692 | REQUEST_HEADER; /* request header */ |
Ove Kaaven | 019211f | 1999-10-13 16:05:37 +0000 | [diff] [blame] | 693 | IN int handle; /* handle to the socket */ |
| 694 | IN int service; /* clear pending? */ |
| 695 | IN int s_event; /* "expected" event object */ |
Ove Kaaven | cb98a6e | 2000-03-26 18:21:16 +0000 | [diff] [blame] | 696 | IN int c_event; /* event to clear */ |
Ove Kaaven | 019211f | 1999-10-13 16:05:37 +0000 | [diff] [blame] | 697 | OUT unsigned int mask; /* event mask */ |
| 698 | OUT unsigned int pmask; /* pending events */ |
| 699 | OUT unsigned int state; /* status bits */ |
Alexandre Julliard | 9264300 | 2000-08-31 01:59:51 +0000 | [diff] [blame] | 700 | OUT VARARG(errors,ints); /* event errors */ |
Ove Kaaven | 019211f | 1999-10-13 16:05:37 +0000 | [diff] [blame] | 701 | }; |
| 702 | |
| 703 | |
| 704 | /* Reenable pending socket events */ |
| 705 | struct enable_socket_event_request |
| 706 | { |
Alexandre Julliard | 8611353 | 2000-08-29 03:54:30 +0000 | [diff] [blame] | 707 | REQUEST_HEADER; /* request header */ |
Ove Kaaven | 019211f | 1999-10-13 16:05:37 +0000 | [diff] [blame] | 708 | IN int handle; /* handle to the socket */ |
| 709 | IN unsigned int mask; /* events to re-enable */ |
| 710 | IN unsigned int sstate; /* status bits to set */ |
| 711 | IN unsigned int cstate; /* status bits to clear */ |
| 712 | }; |
| 713 | |
| 714 | |
Alexandre Julliard | 62a8b43 | 1999-01-19 17:48:23 +0000 | [diff] [blame] | 715 | /* Allocate a console for the current process */ |
| 716 | struct alloc_console_request |
Alexandre Julliard | aa0ebd0 | 1998-12-30 12:06:45 +0000 | [diff] [blame] | 717 | { |
Alexandre Julliard | 8611353 | 2000-08-29 03:54:30 +0000 | [diff] [blame] | 718 | REQUEST_HEADER; /* request header */ |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 719 | IN unsigned int access; /* wanted access rights */ |
| 720 | IN int inherit; /* inherit flag */ |
| 721 | OUT int handle_in; /* handle to console input */ |
| 722 | OUT int handle_out; /* handle to console output */ |
Alexandre Julliard | 62a8b43 | 1999-01-19 17:48:23 +0000 | [diff] [blame] | 723 | }; |
| 724 | |
| 725 | |
| 726 | /* Free the console of the current process */ |
| 727 | struct free_console_request |
| 728 | { |
Alexandre Julliard | 8611353 | 2000-08-29 03:54:30 +0000 | [diff] [blame] | 729 | REQUEST_HEADER; /* request header */ |
Alexandre Julliard | 62a8b43 | 1999-01-19 17:48:23 +0000 | [diff] [blame] | 730 | }; |
| 731 | |
| 732 | |
| 733 | /* Open a handle to the process console */ |
| 734 | struct open_console_request |
| 735 | { |
Alexandre Julliard | 8611353 | 2000-08-29 03:54:30 +0000 | [diff] [blame] | 736 | REQUEST_HEADER; /* request header */ |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 737 | IN int output; /* input or output? */ |
| 738 | IN unsigned int access; /* wanted access rights */ |
| 739 | IN int inherit; /* inherit flag */ |
| 740 | OUT int handle; /* handle to the console */ |
Alexandre Julliard | aa0ebd0 | 1998-12-30 12:06:45 +0000 | [diff] [blame] | 741 | }; |
| 742 | |
| 743 | |
| 744 | /* Set a console file descriptor */ |
| 745 | struct set_console_fd_request |
| 746 | { |
Alexandre Julliard | 8611353 | 2000-08-29 03:54:30 +0000 | [diff] [blame] | 747 | REQUEST_HEADER; /* request header */ |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 748 | IN int handle; /* handle to the console */ |
| 749 | IN int file_handle; /* handle of file to use as file descriptor */ |
| 750 | IN int pid; /* pid of xterm (hack) */ |
Alexandre Julliard | 62a8b43 | 1999-01-19 17:48:23 +0000 | [diff] [blame] | 751 | }; |
| 752 | |
| 753 | |
| 754 | /* Get a console mode (input or output) */ |
| 755 | struct get_console_mode_request |
| 756 | { |
Alexandre Julliard | 8611353 | 2000-08-29 03:54:30 +0000 | [diff] [blame] | 757 | REQUEST_HEADER; /* request header */ |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 758 | IN int handle; /* handle to the console */ |
| 759 | OUT int mode; /* console mode */ |
Alexandre Julliard | 62a8b43 | 1999-01-19 17:48:23 +0000 | [diff] [blame] | 760 | }; |
| 761 | |
| 762 | |
| 763 | /* Set a console mode (input or output) */ |
| 764 | struct set_console_mode_request |
| 765 | { |
Alexandre Julliard | 8611353 | 2000-08-29 03:54:30 +0000 | [diff] [blame] | 766 | REQUEST_HEADER; /* request header */ |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 767 | IN int handle; /* handle to the console */ |
| 768 | IN int mode; /* console mode */ |
Alexandre Julliard | 62a8b43 | 1999-01-19 17:48:23 +0000 | [diff] [blame] | 769 | }; |
| 770 | |
| 771 | |
| 772 | /* Set info about a console (output only) */ |
| 773 | struct set_console_info_request |
| 774 | { |
Alexandre Julliard | 8611353 | 2000-08-29 03:54:30 +0000 | [diff] [blame] | 775 | REQUEST_HEADER; /* request header */ |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 776 | IN int handle; /* handle to the console */ |
| 777 | IN int mask; /* setting mask (see below) */ |
| 778 | IN int cursor_size; /* size of cursor (percentage filled) */ |
| 779 | IN int cursor_visible;/* cursor visibility flag */ |
Alexandre Julliard | 9264300 | 2000-08-31 01:59:51 +0000 | [diff] [blame] | 780 | IN VARARG(title,string); /* console title */ |
Alexandre Julliard | 62a8b43 | 1999-01-19 17:48:23 +0000 | [diff] [blame] | 781 | }; |
| 782 | #define SET_CONSOLE_INFO_CURSOR 0x01 |
| 783 | #define SET_CONSOLE_INFO_TITLE 0x02 |
| 784 | |
| 785 | /* Get info about a console (output only) */ |
| 786 | struct get_console_info_request |
| 787 | { |
Alexandre Julliard | 8611353 | 2000-08-29 03:54:30 +0000 | [diff] [blame] | 788 | REQUEST_HEADER; /* request header */ |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 789 | IN int handle; /* handle to the console */ |
| 790 | OUT int cursor_size; /* size of cursor (percentage filled) */ |
| 791 | OUT int cursor_visible;/* cursor visibility flag */ |
| 792 | OUT int pid; /* pid of xterm (hack) */ |
Alexandre Julliard | 9264300 | 2000-08-31 01:59:51 +0000 | [diff] [blame] | 793 | OUT VARARG(title,string); /* console title */ |
Alexandre Julliard | aa0ebd0 | 1998-12-30 12:06:45 +0000 | [diff] [blame] | 794 | }; |
| 795 | |
| 796 | |
Alexandre Julliard | 4b46112 | 1999-01-31 19:04:30 +0000 | [diff] [blame] | 797 | /* Add input records to a console input queue */ |
| 798 | struct write_console_input_request |
| 799 | { |
Alexandre Julliard | 8611353 | 2000-08-29 03:54:30 +0000 | [diff] [blame] | 800 | REQUEST_HEADER; /* request header */ |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 801 | IN int handle; /* handle to the console input */ |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 802 | OUT int written; /* number of records written */ |
Alexandre Julliard | 9264300 | 2000-08-31 01:59:51 +0000 | [diff] [blame] | 803 | IN VARARG(rec,input_records); /* input records */ |
Alexandre Julliard | 4b46112 | 1999-01-31 19:04:30 +0000 | [diff] [blame] | 804 | }; |
| 805 | |
| 806 | /* Fetch input records from a console input queue */ |
| 807 | struct read_console_input_request |
| 808 | { |
Alexandre Julliard | 8611353 | 2000-08-29 03:54:30 +0000 | [diff] [blame] | 809 | REQUEST_HEADER; /* request header */ |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 810 | IN int handle; /* handle to the console input */ |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 811 | IN int flush; /* flush the retrieved records from the queue? */ |
| 812 | OUT int read; /* number of records read */ |
Alexandre Julliard | 9264300 | 2000-08-31 01:59:51 +0000 | [diff] [blame] | 813 | OUT VARARG(rec,input_records); /* input records */ |
Alexandre Julliard | 4b46112 | 1999-01-31 19:04:30 +0000 | [diff] [blame] | 814 | }; |
| 815 | |
| 816 | |
Alexandre Julliard | a8b8d9c | 1999-01-01 16:59:27 +0000 | [diff] [blame] | 817 | /* Create a change notification */ |
Alexandre Julliard | 63cb0f8 | 1998-12-31 15:43:48 +0000 | [diff] [blame] | 818 | struct create_change_notification_request |
| 819 | { |
Alexandre Julliard | 8611353 | 2000-08-29 03:54:30 +0000 | [diff] [blame] | 820 | REQUEST_HEADER; /* request header */ |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 821 | IN int subtree; /* watch all the subtree */ |
| 822 | IN int filter; /* notification filter */ |
| 823 | OUT int handle; /* handle to the change notification */ |
Alexandre Julliard | 63cb0f8 | 1998-12-31 15:43:48 +0000 | [diff] [blame] | 824 | }; |
| 825 | |
| 826 | |
Alexandre Julliard | a8b8d9c | 1999-01-01 16:59:27 +0000 | [diff] [blame] | 827 | /* Create a file mapping */ |
| 828 | struct create_mapping_request |
| 829 | { |
Alexandre Julliard | 8611353 | 2000-08-29 03:54:30 +0000 | [diff] [blame] | 830 | REQUEST_HEADER; /* request header */ |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 831 | IN int size_high; /* mapping size */ |
| 832 | IN int size_low; /* mapping size */ |
| 833 | IN int protect; /* protection flags (see below) */ |
| 834 | IN int inherit; /* inherit flag */ |
| 835 | IN int file_handle; /* file handle */ |
| 836 | OUT int handle; /* handle to the mapping */ |
Alexandre Julliard | 9c2370b | 2000-08-30 00:00:48 +0000 | [diff] [blame] | 837 | IN VARARG(name,unicode_str); /* object name */ |
Alexandre Julliard | a8b8d9c | 1999-01-01 16:59:27 +0000 | [diff] [blame] | 838 | }; |
| 839 | /* protection flags */ |
| 840 | #define VPROT_READ 0x01 |
| 841 | #define VPROT_WRITE 0x02 |
| 842 | #define VPROT_EXEC 0x04 |
| 843 | #define VPROT_WRITECOPY 0x08 |
| 844 | #define VPROT_GUARD 0x10 |
| 845 | #define VPROT_NOCACHE 0x20 |
| 846 | #define VPROT_COMMITTED 0x40 |
Alexandre Julliard | c19e1a7 | 2000-08-14 20:20:01 +0000 | [diff] [blame] | 847 | #define VPROT_IMAGE 0x80 |
Alexandre Julliard | a8b8d9c | 1999-01-01 16:59:27 +0000 | [diff] [blame] | 848 | |
| 849 | |
Alexandre Julliard | 43c190e | 1999-05-15 10:48:19 +0000 | [diff] [blame] | 850 | /* Open a mapping */ |
| 851 | struct open_mapping_request |
| 852 | { |
Alexandre Julliard | 8611353 | 2000-08-29 03:54:30 +0000 | [diff] [blame] | 853 | REQUEST_HEADER; /* request header */ |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 854 | IN unsigned int access; /* wanted access rights */ |
| 855 | IN int inherit; /* inherit flag */ |
| 856 | OUT int handle; /* handle to the mapping */ |
Alexandre Julliard | 9c2370b | 2000-08-30 00:00:48 +0000 | [diff] [blame] | 857 | IN VARARG(name,unicode_str); /* object name */ |
Alexandre Julliard | 43c190e | 1999-05-15 10:48:19 +0000 | [diff] [blame] | 858 | }; |
| 859 | |
| 860 | |
Alexandre Julliard | a8b8d9c | 1999-01-01 16:59:27 +0000 | [diff] [blame] | 861 | /* Get information about a file mapping */ |
| 862 | struct get_mapping_info_request |
| 863 | { |
Alexandre Julliard | 8611353 | 2000-08-29 03:54:30 +0000 | [diff] [blame] | 864 | REQUEST_HEADER; /* request header */ |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 865 | IN int handle; /* handle to the mapping */ |
| 866 | OUT int size_high; /* mapping size */ |
| 867 | OUT int size_low; /* mapping size */ |
| 868 | OUT int protect; /* protection flags */ |
Alexandre Julliard | c19e1a7 | 2000-08-14 20:20:01 +0000 | [diff] [blame] | 869 | OUT int header_size; /* header size (for VPROT_IMAGE mapping) */ |
| 870 | OUT void* base; /* default base addr (for VPROT_IMAGE mapping) */ |
| 871 | OUT int shared_file; /* shared mapping file handle */ |
| 872 | OUT int shared_size; /* shared mapping size */ |
Alexandre Julliard | a8b8d9c | 1999-01-01 16:59:27 +0000 | [diff] [blame] | 873 | }; |
| 874 | |
| 875 | |
Alexandre Julliard | 62a8b43 | 1999-01-19 17:48:23 +0000 | [diff] [blame] | 876 | /* Create a device */ |
| 877 | struct create_device_request |
| 878 | { |
Alexandre Julliard | 8611353 | 2000-08-29 03:54:30 +0000 | [diff] [blame] | 879 | REQUEST_HEADER; /* request header */ |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 880 | IN unsigned int access; /* wanted access rights */ |
| 881 | IN int inherit; /* inherit flag */ |
| 882 | IN int id; /* client private id */ |
| 883 | OUT int handle; /* handle to the device */ |
Alexandre Julliard | 62a8b43 | 1999-01-19 17:48:23 +0000 | [diff] [blame] | 884 | }; |
| 885 | |
| 886 | |
Alexandre Julliard | fdc92ba | 1999-02-14 18:03:15 +0000 | [diff] [blame] | 887 | /* Create a snapshot */ |
| 888 | struct create_snapshot_request |
| 889 | { |
Alexandre Julliard | 8611353 | 2000-08-29 03:54:30 +0000 | [diff] [blame] | 890 | REQUEST_HEADER; /* request header */ |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 891 | IN int inherit; /* inherit flag */ |
| 892 | IN int flags; /* snapshot flags (TH32CS_*) */ |
Alexandre Julliard | 07d8446 | 2000-04-16 19:45:05 +0000 | [diff] [blame] | 893 | IN void* pid; /* process id */ |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 894 | OUT int handle; /* handle to the snapshot */ |
Alexandre Julliard | fdc92ba | 1999-02-14 18:03:15 +0000 | [diff] [blame] | 895 | }; |
| 896 | |
| 897 | |
| 898 | /* Get the next process from a snapshot */ |
| 899 | struct next_process_request |
| 900 | { |
Alexandre Julliard | 8611353 | 2000-08-29 03:54:30 +0000 | [diff] [blame] | 901 | REQUEST_HEADER; /* request header */ |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 902 | IN int handle; /* handle to the snapshot */ |
| 903 | IN int reset; /* reset snapshot position? */ |
Alexandre Julliard | 07d8446 | 2000-04-16 19:45:05 +0000 | [diff] [blame] | 904 | OUT int count; /* process usage count */ |
| 905 | OUT void* pid; /* process id */ |
| 906 | OUT int threads; /* number of threads */ |
| 907 | OUT int priority; /* process priority */ |
| 908 | }; |
| 909 | |
| 910 | |
| 911 | /* Get the next thread from a snapshot */ |
| 912 | struct next_thread_request |
| 913 | { |
Alexandre Julliard | 8611353 | 2000-08-29 03:54:30 +0000 | [diff] [blame] | 914 | REQUEST_HEADER; /* request header */ |
Alexandre Julliard | 07d8446 | 2000-04-16 19:45:05 +0000 | [diff] [blame] | 915 | IN int handle; /* handle to the snapshot */ |
| 916 | IN int reset; /* reset snapshot position? */ |
| 917 | OUT int count; /* thread usage count */ |
| 918 | OUT void* pid; /* process id */ |
| 919 | OUT void* tid; /* thread id */ |
| 920 | OUT int base_pri; /* base priority */ |
| 921 | OUT int delta_pri; /* delta priority */ |
| 922 | }; |
| 923 | |
| 924 | |
| 925 | /* Get the next module from a snapshot */ |
| 926 | struct next_module_request |
| 927 | { |
Alexandre Julliard | 8611353 | 2000-08-29 03:54:30 +0000 | [diff] [blame] | 928 | REQUEST_HEADER; /* request header */ |
Alexandre Julliard | 07d8446 | 2000-04-16 19:45:05 +0000 | [diff] [blame] | 929 | IN int handle; /* handle to the snapshot */ |
| 930 | IN int reset; /* reset snapshot position? */ |
| 931 | OUT void* pid; /* process id */ |
| 932 | OUT void* base; /* module base address */ |
Alexandre Julliard | fdc92ba | 1999-02-14 18:03:15 +0000 | [diff] [blame] | 933 | }; |
| 934 | |
| 935 | |
Alexandre Julliard | e712e07 | 1999-05-23 19:53:30 +0000 | [diff] [blame] | 936 | /* Wait for a debug event */ |
| 937 | struct wait_debug_event_request |
| 938 | { |
Alexandre Julliard | 8611353 | 2000-08-29 03:54:30 +0000 | [diff] [blame] | 939 | REQUEST_HEADER; /* request header */ |
Alexandre Julliard | 3e2517c | 2000-01-20 18:59:03 +0000 | [diff] [blame] | 940 | IN int timeout; /* timeout in ms */ |
| 941 | OUT void* pid; /* process id */ |
| 942 | OUT void* tid; /* thread id */ |
Alexandre Julliard | 9c2370b | 2000-08-30 00:00:48 +0000 | [diff] [blame] | 943 | OUT VARARG(event,debug_event); /* debug event data */ |
Alexandre Julliard | e712e07 | 1999-05-23 19:53:30 +0000 | [diff] [blame] | 944 | }; |
| 945 | |
| 946 | |
Alexandre Julliard | ea0d028 | 2000-03-10 22:16:10 +0000 | [diff] [blame] | 947 | /* Send an exception event */ |
| 948 | struct exception_event_request |
Alexandre Julliard | e712e07 | 1999-05-23 19:53:30 +0000 | [diff] [blame] | 949 | { |
Alexandre Julliard | 8611353 | 2000-08-29 03:54:30 +0000 | [diff] [blame] | 950 | REQUEST_HEADER; /* request header */ |
Alexandre Julliard | ea0d028 | 2000-03-10 22:16:10 +0000 | [diff] [blame] | 951 | IN int first; /* first chance exception? */ |
Alexandre Julliard | ea0d028 | 2000-03-10 22:16:10 +0000 | [diff] [blame] | 952 | OUT int status; /* event continuation status */ |
Alexandre Julliard | 9264300 | 2000-08-31 01:59:51 +0000 | [diff] [blame] | 953 | IN VARARG(record,exc_event); /* thread context followed by exception record */ |
| 954 | OUT VARARG(context,context); /* modified thread context */ |
Alexandre Julliard | ea0d028 | 2000-03-10 22:16:10 +0000 | [diff] [blame] | 955 | }; |
| 956 | |
| 957 | |
| 958 | /* Send an output string to the debugger */ |
| 959 | struct output_debug_string_request |
| 960 | { |
Alexandre Julliard | 8611353 | 2000-08-29 03:54:30 +0000 | [diff] [blame] | 961 | REQUEST_HEADER; /* request header */ |
Alexandre Julliard | ea0d028 | 2000-03-10 22:16:10 +0000 | [diff] [blame] | 962 | IN void* string; /* string to display (in debugged process address space) */ |
| 963 | IN int unicode; /* is it Unicode? */ |
| 964 | IN int length; /* string length */ |
Alexandre Julliard | e712e07 | 1999-05-23 19:53:30 +0000 | [diff] [blame] | 965 | }; |
| 966 | |
| 967 | |
| 968 | /* Continue a debug event */ |
| 969 | struct continue_debug_event_request |
| 970 | { |
Alexandre Julliard | 8611353 | 2000-08-29 03:54:30 +0000 | [diff] [blame] | 971 | REQUEST_HEADER; /* request header */ |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 972 | IN void* pid; /* process id to continue */ |
| 973 | IN void* tid; /* thread id to continue */ |
| 974 | IN int status; /* continuation status */ |
Alexandre Julliard | e712e07 | 1999-05-23 19:53:30 +0000 | [diff] [blame] | 975 | }; |
| 976 | |
| 977 | |
| 978 | /* Start debugging an existing process */ |
| 979 | struct debug_process_request |
| 980 | { |
Alexandre Julliard | 8611353 | 2000-08-29 03:54:30 +0000 | [diff] [blame] | 981 | REQUEST_HEADER; /* request header */ |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 982 | IN void* pid; /* id of the process to debug */ |
Alexandre Julliard | e712e07 | 1999-05-23 19:53:30 +0000 | [diff] [blame] | 983 | }; |
| 984 | |
| 985 | |
Alexandre Julliard | 8b8828f | 1999-11-12 21:39:14 +0000 | [diff] [blame] | 986 | /* Read data from a process address space */ |
| 987 | struct read_process_memory_request |
| 988 | { |
Alexandre Julliard | 8611353 | 2000-08-29 03:54:30 +0000 | [diff] [blame] | 989 | REQUEST_HEADER; /* request header */ |
Alexandre Julliard | 8b8828f | 1999-11-12 21:39:14 +0000 | [diff] [blame] | 990 | IN int handle; /* process handle */ |
| 991 | IN void* addr; /* addr to read from (must be int-aligned) */ |
| 992 | IN int len; /* number of ints to read */ |
Alexandre Julliard | 57f05e1 | 2000-10-15 00:40:25 +0000 | [diff] [blame] | 993 | OUT VARARG(data,bytes); /* result data */ |
Alexandre Julliard | 8b8828f | 1999-11-12 21:39:14 +0000 | [diff] [blame] | 994 | }; |
| 995 | |
| 996 | |
Alexandre Julliard | eef7025 | 1999-11-13 19:54:54 +0000 | [diff] [blame] | 997 | /* Write data to a process address space */ |
| 998 | struct write_process_memory_request |
| 999 | { |
Alexandre Julliard | 8611353 | 2000-08-29 03:54:30 +0000 | [diff] [blame] | 1000 | REQUEST_HEADER; /* request header */ |
Alexandre Julliard | eef7025 | 1999-11-13 19:54:54 +0000 | [diff] [blame] | 1001 | IN int handle; /* process handle */ |
| 1002 | IN void* addr; /* addr to write to (must be int-aligned) */ |
| 1003 | IN int len; /* number of ints to write */ |
| 1004 | IN unsigned int first_mask; /* mask for first word */ |
| 1005 | IN unsigned int last_mask; /* mask for last word */ |
Alexandre Julliard | 57f05e1 | 2000-10-15 00:40:25 +0000 | [diff] [blame] | 1006 | IN VARARG(data,bytes); /* result data */ |
Alexandre Julliard | eef7025 | 1999-11-13 19:54:54 +0000 | [diff] [blame] | 1007 | }; |
| 1008 | |
| 1009 | |
Alexandre Julliard | d7e85d6 | 1999-11-23 19:39:11 +0000 | [diff] [blame] | 1010 | /* Create a registry key */ |
| 1011 | struct create_key_request |
| 1012 | { |
Alexandre Julliard | 8611353 | 2000-08-29 03:54:30 +0000 | [diff] [blame] | 1013 | REQUEST_HEADER; /* request header */ |
Alexandre Julliard | d7e85d6 | 1999-11-23 19:39:11 +0000 | [diff] [blame] | 1014 | IN int parent; /* handle to the parent key */ |
| 1015 | IN unsigned int access; /* desired access rights */ |
| 1016 | IN unsigned int options; /* creation options */ |
| 1017 | IN time_t modif; /* last modification time */ |
| 1018 | OUT int hkey; /* handle to the created key */ |
| 1019 | OUT int created; /* has it been newly created? */ |
Alexandre Julliard | bcf393a | 2000-10-01 01:44:50 +0000 | [diff] [blame] | 1020 | IN VARARG(name,unicode_len_str); /* key name */ |
| 1021 | IN VARARG(class,unicode_str); /* class name */ |
Alexandre Julliard | d7e85d6 | 1999-11-23 19:39:11 +0000 | [diff] [blame] | 1022 | }; |
| 1023 | |
Alexandre Julliard | d7e85d6 | 1999-11-23 19:39:11 +0000 | [diff] [blame] | 1024 | /* Open a registry key */ |
| 1025 | struct open_key_request |
| 1026 | { |
Alexandre Julliard | 8611353 | 2000-08-29 03:54:30 +0000 | [diff] [blame] | 1027 | REQUEST_HEADER; /* request header */ |
Alexandre Julliard | d7e85d6 | 1999-11-23 19:39:11 +0000 | [diff] [blame] | 1028 | IN int parent; /* handle to the parent key */ |
| 1029 | IN unsigned int access; /* desired access rights */ |
| 1030 | OUT int hkey; /* handle to the open key */ |
Alexandre Julliard | bcf393a | 2000-10-01 01:44:50 +0000 | [diff] [blame] | 1031 | IN VARARG(name,unicode_str); /* key name */ |
Alexandre Julliard | d7e85d6 | 1999-11-23 19:39:11 +0000 | [diff] [blame] | 1032 | }; |
| 1033 | |
| 1034 | |
| 1035 | /* Delete a registry key */ |
| 1036 | struct delete_key_request |
| 1037 | { |
Alexandre Julliard | 8611353 | 2000-08-29 03:54:30 +0000 | [diff] [blame] | 1038 | REQUEST_HEADER; /* request header */ |
Alexandre Julliard | bcf393a | 2000-10-01 01:44:50 +0000 | [diff] [blame] | 1039 | IN int hkey; /* handle to the key */ |
Alexandre Julliard | d7e85d6 | 1999-11-23 19:39:11 +0000 | [diff] [blame] | 1040 | }; |
| 1041 | |
| 1042 | |
| 1043 | /* Enumerate registry subkeys */ |
| 1044 | struct enum_key_request |
| 1045 | { |
Alexandre Julliard | 8611353 | 2000-08-29 03:54:30 +0000 | [diff] [blame] | 1046 | REQUEST_HEADER; /* request header */ |
Alexandre Julliard | d7e85d6 | 1999-11-23 19:39:11 +0000 | [diff] [blame] | 1047 | IN int hkey; /* handle to registry key */ |
Alexandre Julliard | 454355e | 2000-10-02 03:46:58 +0000 | [diff] [blame] | 1048 | IN int index; /* index of subkey (or -1 for current key) */ |
| 1049 | IN int full; /* return the full info? */ |
Alexandre Julliard | d7e85d6 | 1999-11-23 19:39:11 +0000 | [diff] [blame] | 1050 | OUT int subkeys; /* number of subkeys */ |
| 1051 | OUT int max_subkey; /* longest subkey name */ |
| 1052 | OUT int max_class; /* longest class name */ |
| 1053 | OUT int values; /* number of values */ |
| 1054 | OUT int max_value; /* longest value name */ |
| 1055 | OUT int max_data; /* longest value data */ |
| 1056 | OUT time_t modif; /* last modification time */ |
Alexandre Julliard | 454355e | 2000-10-02 03:46:58 +0000 | [diff] [blame] | 1057 | OUT VARARG(name,unicode_len_str); /* key name */ |
| 1058 | OUT VARARG(class,unicode_str); /* class name */ |
Alexandre Julliard | d7e85d6 | 1999-11-23 19:39:11 +0000 | [diff] [blame] | 1059 | }; |
| 1060 | |
| 1061 | |
| 1062 | /* Set a value of a registry key */ |
| 1063 | struct set_key_value_request |
| 1064 | { |
Alexandre Julliard | 8611353 | 2000-08-29 03:54:30 +0000 | [diff] [blame] | 1065 | REQUEST_HEADER; /* request header */ |
Alexandre Julliard | d7e85d6 | 1999-11-23 19:39:11 +0000 | [diff] [blame] | 1066 | IN int hkey; /* handle to registry key */ |
| 1067 | IN int type; /* value type */ |
Alexandre Julliard | a01004d | 2000-05-14 22:57:57 +0000 | [diff] [blame] | 1068 | IN unsigned int total; /* total value len */ |
| 1069 | IN unsigned int offset; /* offset for setting data */ |
Alexandre Julliard | bcf393a | 2000-10-01 01:44:50 +0000 | [diff] [blame] | 1070 | IN VARARG(name,unicode_len_str); /* value name */ |
| 1071 | IN VARARG(data,bytes); /* value data */ |
Alexandre Julliard | d7e85d6 | 1999-11-23 19:39:11 +0000 | [diff] [blame] | 1072 | }; |
| 1073 | |
| 1074 | |
| 1075 | /* Retrieve the value of a registry key */ |
| 1076 | struct get_key_value_request |
| 1077 | { |
Alexandre Julliard | 8611353 | 2000-08-29 03:54:30 +0000 | [diff] [blame] | 1078 | REQUEST_HEADER; /* request header */ |
Alexandre Julliard | d7e85d6 | 1999-11-23 19:39:11 +0000 | [diff] [blame] | 1079 | IN int hkey; /* handle to registry key */ |
Alexandre Julliard | a01004d | 2000-05-14 22:57:57 +0000 | [diff] [blame] | 1080 | IN unsigned int offset; /* offset for getting data */ |
Alexandre Julliard | d7e85d6 | 1999-11-23 19:39:11 +0000 | [diff] [blame] | 1081 | OUT int type; /* value type */ |
| 1082 | OUT int len; /* value data len */ |
Alexandre Julliard | bcf393a | 2000-10-01 01:44:50 +0000 | [diff] [blame] | 1083 | IN VARARG(name,unicode_len_str); /* value name */ |
| 1084 | OUT VARARG(data,bytes); /* value data */ |
Alexandre Julliard | d7e85d6 | 1999-11-23 19:39:11 +0000 | [diff] [blame] | 1085 | }; |
| 1086 | |
| 1087 | |
| 1088 | /* Enumerate a value of a registry key */ |
| 1089 | struct enum_key_value_request |
| 1090 | { |
Alexandre Julliard | 8611353 | 2000-08-29 03:54:30 +0000 | [diff] [blame] | 1091 | REQUEST_HEADER; /* request header */ |
Alexandre Julliard | d7e85d6 | 1999-11-23 19:39:11 +0000 | [diff] [blame] | 1092 | IN int hkey; /* handle to registry key */ |
| 1093 | IN int index; /* value index */ |
Alexandre Julliard | a01004d | 2000-05-14 22:57:57 +0000 | [diff] [blame] | 1094 | IN unsigned int offset; /* offset for getting data */ |
Alexandre Julliard | d7e85d6 | 1999-11-23 19:39:11 +0000 | [diff] [blame] | 1095 | OUT int type; /* value type */ |
| 1096 | OUT int len; /* value data len */ |
| 1097 | OUT path_t name; /* value name */ |
| 1098 | OUT unsigned char data[1]; /* value data */ |
| 1099 | }; |
| 1100 | |
| 1101 | |
| 1102 | /* Delete a value of a registry key */ |
| 1103 | struct delete_key_value_request |
| 1104 | { |
Alexandre Julliard | 8611353 | 2000-08-29 03:54:30 +0000 | [diff] [blame] | 1105 | REQUEST_HEADER; /* request header */ |
Alexandre Julliard | d7e85d6 | 1999-11-23 19:39:11 +0000 | [diff] [blame] | 1106 | IN int hkey; /* handle to registry key */ |
Alexandre Julliard | bcf393a | 2000-10-01 01:44:50 +0000 | [diff] [blame] | 1107 | IN VARARG(name,unicode_str); /* value name */ |
Alexandre Julliard | d7e85d6 | 1999-11-23 19:39:11 +0000 | [diff] [blame] | 1108 | }; |
| 1109 | |
| 1110 | |
| 1111 | /* Load a registry branch from a file */ |
| 1112 | struct load_registry_request |
| 1113 | { |
Alexandre Julliard | 8611353 | 2000-08-29 03:54:30 +0000 | [diff] [blame] | 1114 | REQUEST_HEADER; /* request header */ |
Alexandre Julliard | d7e85d6 | 1999-11-23 19:39:11 +0000 | [diff] [blame] | 1115 | IN int hkey; /* root key to load to */ |
| 1116 | IN int file; /* file to load from */ |
Alexandre Julliard | 57f05e1 | 2000-10-15 00:40:25 +0000 | [diff] [blame] | 1117 | IN VARARG(name,unicode_str); /* subkey name */ |
Alexandre Julliard | d7e85d6 | 1999-11-23 19:39:11 +0000 | [diff] [blame] | 1118 | }; |
| 1119 | |
| 1120 | |
| 1121 | /* Save a registry branch to a file */ |
| 1122 | struct save_registry_request |
| 1123 | { |
Alexandre Julliard | 8611353 | 2000-08-29 03:54:30 +0000 | [diff] [blame] | 1124 | REQUEST_HEADER; /* request header */ |
Alexandre Julliard | d7e85d6 | 1999-11-23 19:39:11 +0000 | [diff] [blame] | 1125 | IN int hkey; /* key to save */ |
| 1126 | IN int file; /* file to save to */ |
| 1127 | }; |
| 1128 | |
| 1129 | |
Alexandre Julliard | c970904 | 2000-04-16 17:21:13 +0000 | [diff] [blame] | 1130 | /* Save a registry branch at server exit */ |
| 1131 | struct save_registry_atexit_request |
| 1132 | { |
Alexandre Julliard | 8611353 | 2000-08-29 03:54:30 +0000 | [diff] [blame] | 1133 | REQUEST_HEADER; /* request header */ |
Alexandre Julliard | c970904 | 2000-04-16 17:21:13 +0000 | [diff] [blame] | 1134 | IN int hkey; /* key to save */ |
Alexandre Julliard | 57f05e1 | 2000-10-15 00:40:25 +0000 | [diff] [blame] | 1135 | IN VARARG(file,string); /* file to save to */ |
Alexandre Julliard | c970904 | 2000-04-16 17:21:13 +0000 | [diff] [blame] | 1136 | }; |
| 1137 | |
| 1138 | |
Alexandre Julliard | d7e85d6 | 1999-11-23 19:39:11 +0000 | [diff] [blame] | 1139 | /* Set the current and saving level for the registry */ |
| 1140 | struct set_registry_levels_request |
| 1141 | { |
Alexandre Julliard | 8611353 | 2000-08-29 03:54:30 +0000 | [diff] [blame] | 1142 | REQUEST_HEADER; /* request header */ |
Alexandre Julliard | d7e85d6 | 1999-11-23 19:39:11 +0000 | [diff] [blame] | 1143 | IN int current; /* new current level */ |
| 1144 | IN int saving; /* new saving level */ |
Alexandre Julliard | c970904 | 2000-04-16 17:21:13 +0000 | [diff] [blame] | 1145 | IN int period; /* duration between periodic saves (milliseconds) */ |
Alexandre Julliard | d7e85d6 | 1999-11-23 19:39:11 +0000 | [diff] [blame] | 1146 | }; |
| 1147 | |
| 1148 | |
Alexandre Julliard | ad47a30 | 1999-11-29 01:58:35 +0000 | [diff] [blame] | 1149 | /* Create a waitable timer */ |
| 1150 | struct create_timer_request |
| 1151 | { |
Alexandre Julliard | 8611353 | 2000-08-29 03:54:30 +0000 | [diff] [blame] | 1152 | REQUEST_HEADER; /* request header */ |
Alexandre Julliard | ad47a30 | 1999-11-29 01:58:35 +0000 | [diff] [blame] | 1153 | IN int inherit; /* inherit flag */ |
| 1154 | IN int manual; /* manual reset */ |
| 1155 | OUT int handle; /* handle to the timer */ |
Alexandre Julliard | 9c2370b | 2000-08-30 00:00:48 +0000 | [diff] [blame] | 1156 | IN VARARG(name,unicode_str); /* object name */ |
Alexandre Julliard | ad47a30 | 1999-11-29 01:58:35 +0000 | [diff] [blame] | 1157 | }; |
| 1158 | |
| 1159 | |
| 1160 | /* Open a waitable timer */ |
| 1161 | struct open_timer_request |
| 1162 | { |
Alexandre Julliard | 8611353 | 2000-08-29 03:54:30 +0000 | [diff] [blame] | 1163 | REQUEST_HEADER; /* request header */ |
Alexandre Julliard | ad47a30 | 1999-11-29 01:58:35 +0000 | [diff] [blame] | 1164 | IN unsigned int access; /* wanted access rights */ |
| 1165 | IN int inherit; /* inherit flag */ |
| 1166 | OUT int handle; /* handle to the timer */ |
Alexandre Julliard | 9c2370b | 2000-08-30 00:00:48 +0000 | [diff] [blame] | 1167 | IN VARARG(name,unicode_str); /* object name */ |
Alexandre Julliard | ad47a30 | 1999-11-29 01:58:35 +0000 | [diff] [blame] | 1168 | }; |
| 1169 | |
| 1170 | /* Set a waitable timer */ |
| 1171 | struct set_timer_request |
| 1172 | { |
Alexandre Julliard | 8611353 | 2000-08-29 03:54:30 +0000 | [diff] [blame] | 1173 | REQUEST_HEADER; /* request header */ |
Alexandre Julliard | ad47a30 | 1999-11-29 01:58:35 +0000 | [diff] [blame] | 1174 | IN int handle; /* handle to the timer */ |
| 1175 | IN int sec; /* next expiration absolute time */ |
| 1176 | IN int usec; /* next expiration absolute time */ |
| 1177 | IN int period; /* timer period in ms */ |
| 1178 | IN void* callback; /* callback function */ |
| 1179 | IN void* arg; /* callback argument */ |
| 1180 | }; |
| 1181 | |
| 1182 | /* Cancel a waitable timer */ |
| 1183 | struct cancel_timer_request |
| 1184 | { |
Alexandre Julliard | 8611353 | 2000-08-29 03:54:30 +0000 | [diff] [blame] | 1185 | REQUEST_HEADER; /* request header */ |
Alexandre Julliard | ad47a30 | 1999-11-29 01:58:35 +0000 | [diff] [blame] | 1186 | IN int handle; /* handle to the timer */ |
| 1187 | }; |
| 1188 | |
| 1189 | |
Alexandre Julliard | 3e2517c | 2000-01-20 18:59:03 +0000 | [diff] [blame] | 1190 | /* Retrieve the current context of a thread */ |
| 1191 | struct get_thread_context_request |
| 1192 | { |
Alexandre Julliard | 8611353 | 2000-08-29 03:54:30 +0000 | [diff] [blame] | 1193 | REQUEST_HEADER; /* request header */ |
Alexandre Julliard | 3e2517c | 2000-01-20 18:59:03 +0000 | [diff] [blame] | 1194 | IN int handle; /* thread handle */ |
| 1195 | IN unsigned int flags; /* context flags */ |
Alexandre Julliard | 9264300 | 2000-08-31 01:59:51 +0000 | [diff] [blame] | 1196 | OUT VARARG(context,context); /* thread context */ |
Alexandre Julliard | 3e2517c | 2000-01-20 18:59:03 +0000 | [diff] [blame] | 1197 | }; |
| 1198 | |
| 1199 | |
| 1200 | /* Set the current context of a thread */ |
| 1201 | struct set_thread_context_request |
| 1202 | { |
Alexandre Julliard | 8611353 | 2000-08-29 03:54:30 +0000 | [diff] [blame] | 1203 | REQUEST_HEADER; /* request header */ |
Alexandre Julliard | 3e2517c | 2000-01-20 18:59:03 +0000 | [diff] [blame] | 1204 | IN int handle; /* thread handle */ |
| 1205 | IN unsigned int flags; /* context flags */ |
Alexandre Julliard | 9264300 | 2000-08-31 01:59:51 +0000 | [diff] [blame] | 1206 | IN VARARG(context,context); /* thread context */ |
Alexandre Julliard | 3e2517c | 2000-01-20 18:59:03 +0000 | [diff] [blame] | 1207 | }; |
| 1208 | |
| 1209 | |
Alexandre Julliard | 0a7c1f6 | 2000-01-27 02:54:17 +0000 | [diff] [blame] | 1210 | /* Fetch a selector entry for a thread */ |
| 1211 | struct get_selector_entry_request |
| 1212 | { |
Alexandre Julliard | 8611353 | 2000-08-29 03:54:30 +0000 | [diff] [blame] | 1213 | REQUEST_HEADER; /* request header */ |
Alexandre Julliard | 0a7c1f6 | 2000-01-27 02:54:17 +0000 | [diff] [blame] | 1214 | IN int handle; /* thread handle */ |
| 1215 | IN int entry; /* LDT entry */ |
| 1216 | OUT unsigned int base; /* selector base */ |
| 1217 | OUT unsigned int limit; /* selector limit */ |
| 1218 | OUT unsigned char flags; /* selector flags */ |
| 1219 | }; |
| 1220 | |
| 1221 | |
Turchanov Sergei | 43a27e3 | 2000-05-30 20:32:06 +0000 | [diff] [blame] | 1222 | /* Add an atom */ |
Alexandre Julliard | b849d79 | 2000-02-13 13:56:13 +0000 | [diff] [blame] | 1223 | struct add_atom_request |
| 1224 | { |
Alexandre Julliard | 8611353 | 2000-08-29 03:54:30 +0000 | [diff] [blame] | 1225 | REQUEST_HEADER; /* request header */ |
Turchanov Sergei | 43a27e3 | 2000-05-30 20:32:06 +0000 | [diff] [blame] | 1226 | IN int local; /* is atom in local process table? */ |
Alexandre Julliard | b849d79 | 2000-02-13 13:56:13 +0000 | [diff] [blame] | 1227 | OUT int atom; /* resulting atom */ |
Alexandre Julliard | 9c2370b | 2000-08-30 00:00:48 +0000 | [diff] [blame] | 1228 | IN VARARG(name,unicode_str); /* atom name */ |
Alexandre Julliard | b849d79 | 2000-02-13 13:56:13 +0000 | [diff] [blame] | 1229 | }; |
| 1230 | |
| 1231 | |
Turchanov Sergei | 43a27e3 | 2000-05-30 20:32:06 +0000 | [diff] [blame] | 1232 | /* Delete an atom */ |
Alexandre Julliard | b849d79 | 2000-02-13 13:56:13 +0000 | [diff] [blame] | 1233 | struct delete_atom_request |
| 1234 | { |
Alexandre Julliard | 8611353 | 2000-08-29 03:54:30 +0000 | [diff] [blame] | 1235 | REQUEST_HEADER; /* request header */ |
Alexandre Julliard | b849d79 | 2000-02-13 13:56:13 +0000 | [diff] [blame] | 1236 | IN int atom; /* atom handle */ |
Turchanov Sergei | 43a27e3 | 2000-05-30 20:32:06 +0000 | [diff] [blame] | 1237 | IN int local; /* is atom in local process table? */ |
Alexandre Julliard | b849d79 | 2000-02-13 13:56:13 +0000 | [diff] [blame] | 1238 | }; |
| 1239 | |
| 1240 | |
Turchanov Sergei | 43a27e3 | 2000-05-30 20:32:06 +0000 | [diff] [blame] | 1241 | /* Find an atom */ |
Alexandre Julliard | b849d79 | 2000-02-13 13:56:13 +0000 | [diff] [blame] | 1242 | struct find_atom_request |
| 1243 | { |
Alexandre Julliard | 8611353 | 2000-08-29 03:54:30 +0000 | [diff] [blame] | 1244 | REQUEST_HEADER; /* request header */ |
Turchanov Sergei | 43a27e3 | 2000-05-30 20:32:06 +0000 | [diff] [blame] | 1245 | IN int local; /* is atom in local process table? */ |
Alexandre Julliard | b849d79 | 2000-02-13 13:56:13 +0000 | [diff] [blame] | 1246 | OUT int atom; /* atom handle */ |
Alexandre Julliard | 9c2370b | 2000-08-30 00:00:48 +0000 | [diff] [blame] | 1247 | IN VARARG(name,unicode_str); /* atom name */ |
Alexandre Julliard | b849d79 | 2000-02-13 13:56:13 +0000 | [diff] [blame] | 1248 | }; |
| 1249 | |
| 1250 | |
Turchanov Sergei | 43a27e3 | 2000-05-30 20:32:06 +0000 | [diff] [blame] | 1251 | /* Get an atom name */ |
Alexandre Julliard | b849d79 | 2000-02-13 13:56:13 +0000 | [diff] [blame] | 1252 | struct get_atom_name_request |
| 1253 | { |
Alexandre Julliard | 8611353 | 2000-08-29 03:54:30 +0000 | [diff] [blame] | 1254 | REQUEST_HEADER; /* request header */ |
Alexandre Julliard | b849d79 | 2000-02-13 13:56:13 +0000 | [diff] [blame] | 1255 | IN int atom; /* atom handle */ |
Turchanov Sergei | 43a27e3 | 2000-05-30 20:32:06 +0000 | [diff] [blame] | 1256 | IN int local; /* is atom in local process table? */ |
Alexandre Julliard | b849d79 | 2000-02-13 13:56:13 +0000 | [diff] [blame] | 1257 | OUT int count; /* atom lock count */ |
Alexandre Julliard | 9c2370b | 2000-08-30 00:00:48 +0000 | [diff] [blame] | 1258 | OUT VARARG(name,unicode_str); /* atom name */ |
Alexandre Julliard | b849d79 | 2000-02-13 13:56:13 +0000 | [diff] [blame] | 1259 | }; |
| 1260 | |
Alexandre Julliard | c5e433a | 2000-05-30 19:48:18 +0000 | [diff] [blame] | 1261 | |
Turchanov Sergei | 43a27e3 | 2000-05-30 20:32:06 +0000 | [diff] [blame] | 1262 | /* Init the process atom table */ |
| 1263 | struct init_atom_table_request |
| 1264 | { |
Alexandre Julliard | 8611353 | 2000-08-29 03:54:30 +0000 | [diff] [blame] | 1265 | REQUEST_HEADER; /* request header */ |
Turchanov Sergei | 43a27e3 | 2000-05-30 20:32:06 +0000 | [diff] [blame] | 1266 | IN int entries; /* number of entries */ |
| 1267 | }; |
| 1268 | |
| 1269 | |
Alexandre Julliard | c5e433a | 2000-05-30 19:48:18 +0000 | [diff] [blame] | 1270 | /* Get the message queue of the current thread */ |
| 1271 | struct get_msg_queue_request |
| 1272 | { |
Alexandre Julliard | 8611353 | 2000-08-29 03:54:30 +0000 | [diff] [blame] | 1273 | REQUEST_HEADER; /* request header */ |
Alexandre Julliard | c5e433a | 2000-05-30 19:48:18 +0000 | [diff] [blame] | 1274 | OUT int handle; /* handle to the queue */ |
| 1275 | }; |
| 1276 | |
| 1277 | /* Wake up a message queue */ |
| 1278 | struct wake_queue_request |
| 1279 | { |
Alexandre Julliard | 8611353 | 2000-08-29 03:54:30 +0000 | [diff] [blame] | 1280 | REQUEST_HEADER; /* request header */ |
Alexandre Julliard | c5e433a | 2000-05-30 19:48:18 +0000 | [diff] [blame] | 1281 | IN int handle; /* handle to the queue */ |
| 1282 | IN unsigned int bits; /* wake bits */ |
| 1283 | }; |
| 1284 | |
| 1285 | /* Wait for a process to start waiting on input */ |
| 1286 | struct wait_input_idle_request |
| 1287 | { |
Alexandre Julliard | 8611353 | 2000-08-29 03:54:30 +0000 | [diff] [blame] | 1288 | REQUEST_HEADER; /* request header */ |
Alexandre Julliard | c5e433a | 2000-05-30 19:48:18 +0000 | [diff] [blame] | 1289 | IN int handle; /* process handle */ |
| 1290 | IN int timeout; /* timeout */ |
| 1291 | OUT int event; /* handle to idle event */ |
| 1292 | }; |
| 1293 | |
Mike McCormack | 44b5bf5 | 2000-09-07 18:39:51 +0000 | [diff] [blame] | 1294 | struct create_serial_request |
| 1295 | { |
| 1296 | REQUEST_HEADER; /* request header */ |
| 1297 | IN unsigned int access; /* wanted access rights */ |
| 1298 | IN int inherit; /* inherit flag */ |
| 1299 | IN unsigned int sharing; /* sharing flags */ |
| 1300 | OUT int handle; /* handle to the port */ |
Alexandre Julliard | 57f05e1 | 2000-10-15 00:40:25 +0000 | [diff] [blame] | 1301 | IN VARARG(name,string); /* file name */ |
Mike McCormack | 44b5bf5 | 2000-09-07 18:39:51 +0000 | [diff] [blame] | 1302 | }; |
Alexandre Julliard | c5e433a | 2000-05-30 19:48:18 +0000 | [diff] [blame] | 1303 | |
Mike McCormack | 654fcc7 | 2000-09-16 20:55:12 +0000 | [diff] [blame] | 1304 | struct get_serial_info_request |
| 1305 | { |
| 1306 | REQUEST_HEADER; /* request header */ |
| 1307 | IN int handle; /* handle to comm port */ |
| 1308 | OUT unsigned int readinterval; |
| 1309 | OUT unsigned int readconst; |
| 1310 | OUT unsigned int readmult; |
| 1311 | OUT unsigned int writeconst; |
| 1312 | OUT unsigned int writemult; |
| 1313 | OUT unsigned int eventmask; |
| 1314 | OUT unsigned int commerror; |
| 1315 | }; |
| 1316 | |
| 1317 | struct set_serial_info_request |
| 1318 | { |
| 1319 | REQUEST_HEADER; /* request header */ |
| 1320 | IN int handle; /* handle to comm port */ |
| 1321 | IN int flags; /* bitmask to set values (see below) */ |
| 1322 | IN unsigned int readinterval; |
| 1323 | IN unsigned int readconst; |
| 1324 | IN unsigned int readmult; |
| 1325 | IN unsigned int writeconst; |
| 1326 | IN unsigned int writemult; |
| 1327 | IN unsigned int eventmask; |
| 1328 | IN unsigned int commerror; |
| 1329 | }; |
| 1330 | #define SERIALINFO_SET_TIMEOUTS 0x01 |
| 1331 | #define SERIALINFO_SET_MASK 0x02 |
| 1332 | #define SERIALINFO_SET_ERROR 0x04 |
| 1333 | |
Mike McCormack | 1eac191 | 2000-11-13 19:27:21 +0000 | [diff] [blame] | 1334 | struct create_async_request |
| 1335 | { |
| 1336 | REQUEST_HEADER; /* request header */ |
| 1337 | IN int file_handle; /* handle to comm port */ |
| 1338 | IN void* overlapped; |
| 1339 | IN void* buffer; |
| 1340 | IN int count; |
| 1341 | IN void* func; |
| 1342 | IN int type; |
| 1343 | OUT int ov_handle; |
| 1344 | }; |
| 1345 | #define ASYNC_TYPE_READ 0x01 |
| 1346 | #define ASYNC_TYPE_WRITE 0x02 |
| 1347 | #define ASYNC_TYPE_WAIT 0x03 |
| 1348 | |
| 1349 | /* |
| 1350 | * Used by service thread to tell the server that the current |
| 1351 | * operation has completed |
| 1352 | */ |
| 1353 | struct async_result_request |
| 1354 | { |
| 1355 | REQUEST_HEADER; /* request header */ |
| 1356 | IN int ov_handle; |
| 1357 | IN int result; /* NT status code */ |
| 1358 | }; |
| 1359 | |
Alexandre Julliard | 5bc7808 | 1999-06-22 17:26:53 +0000 | [diff] [blame] | 1360 | /* Everything below this line is generated automatically by tools/make_requests */ |
| 1361 | /* ### make_requests begin ### */ |
| 1362 | |
| 1363 | enum request |
| 1364 | { |
| 1365 | REQ_NEW_PROCESS, |
Alexandre Julliard | 5b4f3e8 | 2000-05-01 16:24:22 +0000 | [diff] [blame] | 1366 | REQ_WAIT_PROCESS, |
Alexandre Julliard | 5bc7808 | 1999-06-22 17:26:53 +0000 | [diff] [blame] | 1367 | REQ_NEW_THREAD, |
Alexandre Julliard | 2fe5777 | 2000-01-25 01:40:27 +0000 | [diff] [blame] | 1368 | REQ_BOOT_DONE, |
Alexandre Julliard | 5bc7808 | 1999-06-22 17:26:53 +0000 | [diff] [blame] | 1369 | REQ_INIT_PROCESS, |
Alexandre Julliard | ec7bb23 | 1999-11-12 03:35:25 +0000 | [diff] [blame] | 1370 | REQ_INIT_PROCESS_DONE, |
Alexandre Julliard | 5bc7808 | 1999-06-22 17:26:53 +0000 | [diff] [blame] | 1371 | REQ_INIT_THREAD, |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 1372 | REQ_GET_THREAD_BUFFER, |
Alexandre Julliard | 5bc7808 | 1999-06-22 17:26:53 +0000 | [diff] [blame] | 1373 | REQ_TERMINATE_PROCESS, |
| 1374 | REQ_TERMINATE_THREAD, |
| 1375 | REQ_GET_PROCESS_INFO, |
| 1376 | REQ_SET_PROCESS_INFO, |
| 1377 | REQ_GET_THREAD_INFO, |
| 1378 | REQ_SET_THREAD_INFO, |
| 1379 | REQ_SUSPEND_THREAD, |
| 1380 | REQ_RESUME_THREAD, |
Alexandre Julliard | 05f0b71 | 2000-03-09 18:18:41 +0000 | [diff] [blame] | 1381 | REQ_LOAD_DLL, |
| 1382 | REQ_UNLOAD_DLL, |
Alexandre Julliard | 5bc7808 | 1999-06-22 17:26:53 +0000 | [diff] [blame] | 1383 | REQ_QUEUE_APC, |
Alexandre Julliard | ea1afce | 2000-08-22 20:08:37 +0000 | [diff] [blame] | 1384 | REQ_GET_APC, |
Alexandre Julliard | 5bc7808 | 1999-06-22 17:26:53 +0000 | [diff] [blame] | 1385 | REQ_CLOSE_HANDLE, |
| 1386 | REQ_GET_HANDLE_INFO, |
| 1387 | REQ_SET_HANDLE_INFO, |
| 1388 | REQ_DUP_HANDLE, |
| 1389 | REQ_OPEN_PROCESS, |
| 1390 | REQ_SELECT, |
| 1391 | REQ_CREATE_EVENT, |
| 1392 | REQ_EVENT_OP, |
| 1393 | REQ_OPEN_EVENT, |
| 1394 | REQ_CREATE_MUTEX, |
| 1395 | REQ_RELEASE_MUTEX, |
| 1396 | REQ_OPEN_MUTEX, |
| 1397 | REQ_CREATE_SEMAPHORE, |
| 1398 | REQ_RELEASE_SEMAPHORE, |
| 1399 | REQ_OPEN_SEMAPHORE, |
| 1400 | REQ_CREATE_FILE, |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 1401 | REQ_ALLOC_FILE_HANDLE, |
Alexandre Julliard | 5bc7808 | 1999-06-22 17:26:53 +0000 | [diff] [blame] | 1402 | REQ_GET_READ_FD, |
| 1403 | REQ_GET_WRITE_FD, |
| 1404 | REQ_SET_FILE_POINTER, |
| 1405 | REQ_TRUNCATE_FILE, |
| 1406 | REQ_SET_FILE_TIME, |
| 1407 | REQ_FLUSH_FILE, |
| 1408 | REQ_GET_FILE_INFO, |
| 1409 | REQ_LOCK_FILE, |
| 1410 | REQ_UNLOCK_FILE, |
| 1411 | REQ_CREATE_PIPE, |
Ove Kaaven | 019211f | 1999-10-13 16:05:37 +0000 | [diff] [blame] | 1412 | REQ_CREATE_SOCKET, |
| 1413 | REQ_ACCEPT_SOCKET, |
| 1414 | REQ_SET_SOCKET_EVENT, |
| 1415 | REQ_GET_SOCKET_EVENT, |
| 1416 | REQ_ENABLE_SOCKET_EVENT, |
Alexandre Julliard | 5bc7808 | 1999-06-22 17:26:53 +0000 | [diff] [blame] | 1417 | REQ_ALLOC_CONSOLE, |
| 1418 | REQ_FREE_CONSOLE, |
| 1419 | REQ_OPEN_CONSOLE, |
| 1420 | REQ_SET_CONSOLE_FD, |
| 1421 | REQ_GET_CONSOLE_MODE, |
| 1422 | REQ_SET_CONSOLE_MODE, |
| 1423 | REQ_SET_CONSOLE_INFO, |
| 1424 | REQ_GET_CONSOLE_INFO, |
| 1425 | REQ_WRITE_CONSOLE_INPUT, |
| 1426 | REQ_READ_CONSOLE_INPUT, |
| 1427 | REQ_CREATE_CHANGE_NOTIFICATION, |
| 1428 | REQ_CREATE_MAPPING, |
| 1429 | REQ_OPEN_MAPPING, |
| 1430 | REQ_GET_MAPPING_INFO, |
| 1431 | REQ_CREATE_DEVICE, |
| 1432 | REQ_CREATE_SNAPSHOT, |
| 1433 | REQ_NEXT_PROCESS, |
Alexandre Julliard | 07d8446 | 2000-04-16 19:45:05 +0000 | [diff] [blame] | 1434 | REQ_NEXT_THREAD, |
| 1435 | REQ_NEXT_MODULE, |
Alexandre Julliard | 5bc7808 | 1999-06-22 17:26:53 +0000 | [diff] [blame] | 1436 | REQ_WAIT_DEBUG_EVENT, |
Alexandre Julliard | ea0d028 | 2000-03-10 22:16:10 +0000 | [diff] [blame] | 1437 | REQ_EXCEPTION_EVENT, |
| 1438 | REQ_OUTPUT_DEBUG_STRING, |
Alexandre Julliard | 5bc7808 | 1999-06-22 17:26:53 +0000 | [diff] [blame] | 1439 | REQ_CONTINUE_DEBUG_EVENT, |
| 1440 | REQ_DEBUG_PROCESS, |
Alexandre Julliard | 8b8828f | 1999-11-12 21:39:14 +0000 | [diff] [blame] | 1441 | REQ_READ_PROCESS_MEMORY, |
Alexandre Julliard | eef7025 | 1999-11-13 19:54:54 +0000 | [diff] [blame] | 1442 | REQ_WRITE_PROCESS_MEMORY, |
Alexandre Julliard | d7e85d6 | 1999-11-23 19:39:11 +0000 | [diff] [blame] | 1443 | REQ_CREATE_KEY, |
| 1444 | REQ_OPEN_KEY, |
| 1445 | REQ_DELETE_KEY, |
Alexandre Julliard | d7e85d6 | 1999-11-23 19:39:11 +0000 | [diff] [blame] | 1446 | REQ_ENUM_KEY, |
Alexandre Julliard | d7e85d6 | 1999-11-23 19:39:11 +0000 | [diff] [blame] | 1447 | REQ_SET_KEY_VALUE, |
| 1448 | REQ_GET_KEY_VALUE, |
| 1449 | REQ_ENUM_KEY_VALUE, |
| 1450 | REQ_DELETE_KEY_VALUE, |
| 1451 | REQ_LOAD_REGISTRY, |
| 1452 | REQ_SAVE_REGISTRY, |
Alexandre Julliard | c970904 | 2000-04-16 17:21:13 +0000 | [diff] [blame] | 1453 | REQ_SAVE_REGISTRY_ATEXIT, |
Alexandre Julliard | d7e85d6 | 1999-11-23 19:39:11 +0000 | [diff] [blame] | 1454 | REQ_SET_REGISTRY_LEVELS, |
Alexandre Julliard | ad47a30 | 1999-11-29 01:58:35 +0000 | [diff] [blame] | 1455 | REQ_CREATE_TIMER, |
| 1456 | REQ_OPEN_TIMER, |
| 1457 | REQ_SET_TIMER, |
| 1458 | REQ_CANCEL_TIMER, |
Alexandre Julliard | 3e2517c | 2000-01-20 18:59:03 +0000 | [diff] [blame] | 1459 | REQ_GET_THREAD_CONTEXT, |
| 1460 | REQ_SET_THREAD_CONTEXT, |
Alexandre Julliard | 0a7c1f6 | 2000-01-27 02:54:17 +0000 | [diff] [blame] | 1461 | REQ_GET_SELECTOR_ENTRY, |
Alexandre Julliard | b849d79 | 2000-02-13 13:56:13 +0000 | [diff] [blame] | 1462 | REQ_ADD_ATOM, |
| 1463 | REQ_DELETE_ATOM, |
| 1464 | REQ_FIND_ATOM, |
| 1465 | REQ_GET_ATOM_NAME, |
Turchanov Sergei | 43a27e3 | 2000-05-30 20:32:06 +0000 | [diff] [blame] | 1466 | REQ_INIT_ATOM_TABLE, |
Alexandre Julliard | c5e433a | 2000-05-30 19:48:18 +0000 | [diff] [blame] | 1467 | REQ_GET_MSG_QUEUE, |
| 1468 | REQ_WAKE_QUEUE, |
| 1469 | REQ_WAIT_INPUT_IDLE, |
Mike McCormack | 44b5bf5 | 2000-09-07 18:39:51 +0000 | [diff] [blame] | 1470 | REQ_CREATE_SERIAL, |
Mike McCormack | 654fcc7 | 2000-09-16 20:55:12 +0000 | [diff] [blame] | 1471 | REQ_GET_SERIAL_INFO, |
| 1472 | REQ_SET_SERIAL_INFO, |
Mike McCormack | 1eac191 | 2000-11-13 19:27:21 +0000 | [diff] [blame] | 1473 | REQ_CREATE_ASYNC, |
| 1474 | REQ_ASYNC_RESULT, |
Alexandre Julliard | 5bc7808 | 1999-06-22 17:26:53 +0000 | [diff] [blame] | 1475 | REQ_NB_REQUESTS |
| 1476 | }; |
| 1477 | |
Alexandre Julliard | 8611353 | 2000-08-29 03:54:30 +0000 | [diff] [blame] | 1478 | union generic_request |
| 1479 | { |
| 1480 | struct request_max_size max_size; |
| 1481 | struct request_header header; |
| 1482 | struct new_process_request new_process; |
| 1483 | struct wait_process_request wait_process; |
| 1484 | struct new_thread_request new_thread; |
| 1485 | struct boot_done_request boot_done; |
| 1486 | struct init_process_request init_process; |
| 1487 | struct init_process_done_request init_process_done; |
| 1488 | struct init_thread_request init_thread; |
| 1489 | struct get_thread_buffer_request get_thread_buffer; |
| 1490 | struct terminate_process_request terminate_process; |
| 1491 | struct terminate_thread_request terminate_thread; |
| 1492 | struct get_process_info_request get_process_info; |
| 1493 | struct set_process_info_request set_process_info; |
| 1494 | struct get_thread_info_request get_thread_info; |
| 1495 | struct set_thread_info_request set_thread_info; |
| 1496 | struct suspend_thread_request suspend_thread; |
| 1497 | struct resume_thread_request resume_thread; |
| 1498 | struct load_dll_request load_dll; |
| 1499 | struct unload_dll_request unload_dll; |
| 1500 | struct queue_apc_request queue_apc; |
| 1501 | struct get_apc_request get_apc; |
| 1502 | struct close_handle_request close_handle; |
| 1503 | struct get_handle_info_request get_handle_info; |
| 1504 | struct set_handle_info_request set_handle_info; |
| 1505 | struct dup_handle_request dup_handle; |
| 1506 | struct open_process_request open_process; |
| 1507 | struct select_request select; |
| 1508 | struct create_event_request create_event; |
| 1509 | struct event_op_request event_op; |
| 1510 | struct open_event_request open_event; |
| 1511 | struct create_mutex_request create_mutex; |
| 1512 | struct release_mutex_request release_mutex; |
| 1513 | struct open_mutex_request open_mutex; |
| 1514 | struct create_semaphore_request create_semaphore; |
| 1515 | struct release_semaphore_request release_semaphore; |
| 1516 | struct open_semaphore_request open_semaphore; |
| 1517 | struct create_file_request create_file; |
| 1518 | struct alloc_file_handle_request alloc_file_handle; |
| 1519 | struct get_read_fd_request get_read_fd; |
| 1520 | struct get_write_fd_request get_write_fd; |
| 1521 | struct set_file_pointer_request set_file_pointer; |
| 1522 | struct truncate_file_request truncate_file; |
| 1523 | struct set_file_time_request set_file_time; |
| 1524 | struct flush_file_request flush_file; |
| 1525 | struct get_file_info_request get_file_info; |
| 1526 | struct lock_file_request lock_file; |
| 1527 | struct unlock_file_request unlock_file; |
| 1528 | struct create_pipe_request create_pipe; |
| 1529 | struct create_socket_request create_socket; |
| 1530 | struct accept_socket_request accept_socket; |
| 1531 | struct set_socket_event_request set_socket_event; |
| 1532 | struct get_socket_event_request get_socket_event; |
| 1533 | struct enable_socket_event_request enable_socket_event; |
| 1534 | struct alloc_console_request alloc_console; |
| 1535 | struct free_console_request free_console; |
| 1536 | struct open_console_request open_console; |
| 1537 | struct set_console_fd_request set_console_fd; |
| 1538 | struct get_console_mode_request get_console_mode; |
| 1539 | struct set_console_mode_request set_console_mode; |
| 1540 | struct set_console_info_request set_console_info; |
| 1541 | struct get_console_info_request get_console_info; |
| 1542 | struct write_console_input_request write_console_input; |
| 1543 | struct read_console_input_request read_console_input; |
| 1544 | struct create_change_notification_request create_change_notification; |
| 1545 | struct create_mapping_request create_mapping; |
| 1546 | struct open_mapping_request open_mapping; |
| 1547 | struct get_mapping_info_request get_mapping_info; |
| 1548 | struct create_device_request create_device; |
| 1549 | struct create_snapshot_request create_snapshot; |
| 1550 | struct next_process_request next_process; |
| 1551 | struct next_thread_request next_thread; |
| 1552 | struct next_module_request next_module; |
| 1553 | struct wait_debug_event_request wait_debug_event; |
| 1554 | struct exception_event_request exception_event; |
| 1555 | struct output_debug_string_request output_debug_string; |
| 1556 | struct continue_debug_event_request continue_debug_event; |
| 1557 | struct debug_process_request debug_process; |
| 1558 | struct read_process_memory_request read_process_memory; |
| 1559 | struct write_process_memory_request write_process_memory; |
| 1560 | struct create_key_request create_key; |
| 1561 | struct open_key_request open_key; |
| 1562 | struct delete_key_request delete_key; |
Alexandre Julliard | 8611353 | 2000-08-29 03:54:30 +0000 | [diff] [blame] | 1563 | struct enum_key_request enum_key; |
Alexandre Julliard | 8611353 | 2000-08-29 03:54:30 +0000 | [diff] [blame] | 1564 | struct set_key_value_request set_key_value; |
| 1565 | struct get_key_value_request get_key_value; |
| 1566 | struct enum_key_value_request enum_key_value; |
| 1567 | struct delete_key_value_request delete_key_value; |
| 1568 | struct load_registry_request load_registry; |
| 1569 | struct save_registry_request save_registry; |
| 1570 | struct save_registry_atexit_request save_registry_atexit; |
| 1571 | struct set_registry_levels_request set_registry_levels; |
| 1572 | struct create_timer_request create_timer; |
| 1573 | struct open_timer_request open_timer; |
| 1574 | struct set_timer_request set_timer; |
| 1575 | struct cancel_timer_request cancel_timer; |
| 1576 | struct get_thread_context_request get_thread_context; |
| 1577 | struct set_thread_context_request set_thread_context; |
| 1578 | struct get_selector_entry_request get_selector_entry; |
| 1579 | struct add_atom_request add_atom; |
| 1580 | struct delete_atom_request delete_atom; |
| 1581 | struct find_atom_request find_atom; |
| 1582 | struct get_atom_name_request get_atom_name; |
| 1583 | struct init_atom_table_request init_atom_table; |
| 1584 | struct get_msg_queue_request get_msg_queue; |
| 1585 | struct wake_queue_request wake_queue; |
| 1586 | struct wait_input_idle_request wait_input_idle; |
Mike McCormack | 44b5bf5 | 2000-09-07 18:39:51 +0000 | [diff] [blame] | 1587 | struct create_serial_request create_serial; |
Mike McCormack | 654fcc7 | 2000-09-16 20:55:12 +0000 | [diff] [blame] | 1588 | struct get_serial_info_request get_serial_info; |
| 1589 | struct set_serial_info_request set_serial_info; |
Mike McCormack | 1eac191 | 2000-11-13 19:27:21 +0000 | [diff] [blame] | 1590 | struct create_async_request create_async; |
| 1591 | struct async_result_request async_result; |
Alexandre Julliard | 8611353 | 2000-08-29 03:54:30 +0000 | [diff] [blame] | 1592 | }; |
| 1593 | |
Alexandre Julliard | 914406f | 2000-11-14 01:54:49 +0000 | [diff] [blame] | 1594 | #define SERVER_PROTOCOL_VERSION 28 |
Alexandre Julliard | 5fb5456 | 2000-03-08 22:01:02 +0000 | [diff] [blame] | 1595 | |
Alexandre Julliard | 5bc7808 | 1999-06-22 17:26:53 +0000 | [diff] [blame] | 1596 | /* ### make_requests end ### */ |
| 1597 | /* Everything above this line is generated automatically by tools/make_requests */ |
| 1598 | |
Alexandre Julliard | 8611353 | 2000-08-29 03:54:30 +0000 | [diff] [blame] | 1599 | #undef REQUEST_HEADER |
| 1600 | #undef VARARG |
| 1601 | |
| 1602 | /* format of the server buffer */ |
| 1603 | struct server_buffer_info |
| 1604 | { |
| 1605 | volatile unsigned int cur_req; /* offset of the current request */ |
| 1606 | volatile unsigned int cur_pos; /* first available position in buffer */ |
| 1607 | }; |
Alexandre Julliard | 43c190e | 1999-05-15 10:48:19 +0000 | [diff] [blame] | 1608 | |
Alexandre Julliard | 642d313 | 1998-07-12 19:29:36 +0000 | [diff] [blame] | 1609 | /* client-side functions */ |
| 1610 | |
| 1611 | #ifndef __WINE_SERVER__ |
Alexandre Julliard | d30dfd2 | 1998-09-27 18:28:36 +0000 | [diff] [blame] | 1612 | |
Alexandre Julliard | 5bc7808 | 1999-06-22 17:26:53 +0000 | [diff] [blame] | 1613 | #include "thread.h" |
Alexandre Julliard | cb1fc73 | 2000-01-24 21:58:06 +0000 | [diff] [blame] | 1614 | #include "ntddk.h" |
Alexandre Julliard | 8611353 | 2000-08-29 03:54:30 +0000 | [diff] [blame] | 1615 | #include "wine/exception.h" |
Alexandre Julliard | 5bc7808 | 1999-06-22 17:26:53 +0000 | [diff] [blame] | 1616 | |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 1617 | /* client communication functions */ |
| 1618 | |
Alexandre Julliard | af04ebe | 1999-11-21 21:02:06 +0000 | [diff] [blame] | 1619 | extern unsigned int server_call_noerr( enum request req ); |
| 1620 | extern unsigned int server_call_fd( enum request req, int fd_out, int *fd_in ); |
Alexandre Julliard | 12f29b5 | 2000-03-17 15:16:57 +0000 | [diff] [blame] | 1621 | extern void server_protocol_error( const char *err, ... ) WINE_NORETURN; |
Alexandre Julliard | 8611353 | 2000-08-29 03:54:30 +0000 | [diff] [blame] | 1622 | extern void *server_alloc_req( size_t fixed_size, size_t var_size ); |
Alexandre Julliard | de1d5ad | 2000-04-06 20:36:17 +0000 | [diff] [blame] | 1623 | extern const char *get_config_dir(void); |
Alexandre Julliard | af04ebe | 1999-11-21 21:02:06 +0000 | [diff] [blame] | 1624 | |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 1625 | /* get a pointer to the request buffer */ |
Francois Gouget | ae41e8c | 2000-06-11 20:07:58 +0000 | [diff] [blame] | 1626 | static inline void WINE_UNUSED *get_req_buffer(void) |
Alexandre Julliard | 5bc7808 | 1999-06-22 17:26:53 +0000 | [diff] [blame] | 1627 | { |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 1628 | return NtCurrentTeb()->buffer; |
Alexandre Julliard | 5bc7808 | 1999-06-22 17:26:53 +0000 | [diff] [blame] | 1629 | } |
| 1630 | |
Alexandre Julliard | ebe29ef | 1999-06-26 08:43:26 +0000 | [diff] [blame] | 1631 | /* maximum remaining size in the server buffer */ |
Lionel Ulmer | 3b8a724 | 1999-07-24 12:08:20 +0000 | [diff] [blame] | 1632 | static inline int WINE_UNUSED server_remaining( const void *ptr ) |
Alexandre Julliard | 5bc7808 | 1999-06-22 17:26:53 +0000 | [diff] [blame] | 1633 | { |
Alexandre Julliard | 8611353 | 2000-08-29 03:54:30 +0000 | [diff] [blame] | 1634 | return (char *)NtCurrentTeb()->buffer_info - (char *)ptr; |
Alexandre Julliard | 5bc7808 | 1999-06-22 17:26:53 +0000 | [diff] [blame] | 1635 | } |
| 1636 | |
Alexandre Julliard | af04ebe | 1999-11-21 21:02:06 +0000 | [diff] [blame] | 1637 | /* do a server call and set the last error code */ |
| 1638 | static inline int server_call( enum request req ) |
| 1639 | { |
| 1640 | unsigned int res = server_call_noerr( req ); |
Alexandre Julliard | cb1fc73 | 2000-01-24 21:58:06 +0000 | [diff] [blame] | 1641 | if (res) SetLastError( RtlNtStatusToDosError(res) ); |
Alexandre Julliard | af04ebe | 1999-11-21 21:02:06 +0000 | [diff] [blame] | 1642 | return res; |
| 1643 | } |
Alexandre Julliard | 5bc7808 | 1999-06-22 17:26:53 +0000 | [diff] [blame] | 1644 | |
Alexandre Julliard | d16319c | 1999-11-25 21:30:24 +0000 | [diff] [blame] | 1645 | /* copy a Unicode string to the server buffer */ |
| 1646 | static inline void server_strcpyW( WCHAR *dst, const WCHAR *src ) |
| 1647 | { |
| 1648 | if (src) |
| 1649 | { |
Alexandre Julliard | 8611353 | 2000-08-29 03:54:30 +0000 | [diff] [blame] | 1650 | WCHAR *end = (WCHAR *)NtCurrentTeb()->buffer_info - 1; |
Alexandre Julliard | d16319c | 1999-11-25 21:30:24 +0000 | [diff] [blame] | 1651 | while ((dst < end) && *src) *dst++ = *src++; |
| 1652 | } |
| 1653 | *dst = 0; |
| 1654 | } |
| 1655 | |
| 1656 | /* copy and convert an ASCII string to the server buffer */ |
| 1657 | static inline void server_strcpyAtoW( WCHAR *dst, const char *src ) |
| 1658 | { |
| 1659 | if (src) |
| 1660 | { |
Alexandre Julliard | 8611353 | 2000-08-29 03:54:30 +0000 | [diff] [blame] | 1661 | WCHAR *end = (WCHAR *)NtCurrentTeb()->buffer_info - 1; |
Alexandre Julliard | d16319c | 1999-11-25 21:30:24 +0000 | [diff] [blame] | 1662 | while ((dst < end) && *src) *dst++ = (WCHAR)(unsigned char)*src++; |
| 1663 | } |
| 1664 | *dst = 0; |
| 1665 | } |
| 1666 | |
Alexandre Julliard | 8611353 | 2000-08-29 03:54:30 +0000 | [diff] [blame] | 1667 | /* get a pointer to the variable part of the request */ |
Alexandre Julliard | 454355e | 2000-10-02 03:46:58 +0000 | [diff] [blame] | 1668 | inline static void *server_data_ptr( const void *req ) |
Alexandre Julliard | 8611353 | 2000-08-29 03:54:30 +0000 | [diff] [blame] | 1669 | { |
| 1670 | return (union generic_request *)req + 1; |
| 1671 | } |
| 1672 | |
Alexandre Julliard | 9c2370b | 2000-08-30 00:00:48 +0000 | [diff] [blame] | 1673 | /* get the size of the variable part of the request */ |
Alexandre Julliard | 454355e | 2000-10-02 03:46:58 +0000 | [diff] [blame] | 1674 | inline static size_t server_data_size( const void *req ) |
Alexandre Julliard | 9c2370b | 2000-08-30 00:00:48 +0000 | [diff] [blame] | 1675 | { |
| 1676 | return ((struct request_header *)req)->var_size; |
| 1677 | } |
| 1678 | |
Alexandre Julliard | 8611353 | 2000-08-29 03:54:30 +0000 | [diff] [blame] | 1679 | |
| 1680 | /* exception support for server calls */ |
| 1681 | |
| 1682 | extern DWORD server_exception_handler( PEXCEPTION_RECORD record, EXCEPTION_FRAME *frame, |
| 1683 | CONTEXT *context, EXCEPTION_FRAME **pdispatcher ); |
| 1684 | |
| 1685 | struct __server_exception_frame |
| 1686 | { |
| 1687 | EXCEPTION_FRAME frame; |
| 1688 | struct server_buffer_info info; /* saved buffer information */ |
| 1689 | }; |
| 1690 | |
| 1691 | #define SERVER_START_REQ \ |
| 1692 | do { \ |
| 1693 | struct __server_exception_frame __f; \ |
| 1694 | __f.frame.Handler = server_exception_handler; \ |
| 1695 | __f.info = *NtCurrentTeb()->buffer_info; \ |
| 1696 | __wine_push_frame( &__f.frame ); \ |
| 1697 | do { |
| 1698 | |
| 1699 | #define SERVER_END_REQ \ |
| 1700 | } while(0); \ |
| 1701 | *NtCurrentTeb()->buffer_info = __f.info; \ |
| 1702 | __wine_pop_frame( &__f.frame ); \ |
| 1703 | } while(0); |
| 1704 | |
Alexandre Julliard | f692d44 | 1999-03-21 19:23:54 +0000 | [diff] [blame] | 1705 | extern int CLIENT_InitServer(void); |
Alexandre Julliard | 2fe5777 | 2000-01-25 01:40:27 +0000 | [diff] [blame] | 1706 | extern int CLIENT_BootDone( int debug_level ); |
| 1707 | extern int CLIENT_IsBootThread(void); |
Alexandre Julliard | 642d313 | 1998-07-12 19:29:36 +0000 | [diff] [blame] | 1708 | extern int CLIENT_InitThread(void); |
Alexandre Julliard | 642d313 | 1998-07-12 19:29:36 +0000 | [diff] [blame] | 1709 | #endif /* __WINE_SERVER__ */ |
| 1710 | |
| 1711 | #endif /* __WINE_SERVER_H */ |