Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 1 | /* -*- C -*- |
| 2 | * |
| 3 | * Wine server protocol definition |
| 4 | * |
| 5 | * Copyright (C) 2001 Alexandre Julliard |
| 6 | * |
| 7 | * This file is used by tools/make_requests to build the |
| 8 | * protocol structures in include/wine/server_protocol.h |
Alexandre Julliard | 0799c1a | 2002-03-09 23:29:33 +0000 | [diff] [blame] | 9 | * |
| 10 | * This library is free software; you can redistribute it and/or |
| 11 | * modify it under the terms of the GNU Lesser General Public |
| 12 | * License as published by the Free Software Foundation; either |
| 13 | * version 2.1 of the License, or (at your option) any later version. |
| 14 | * |
| 15 | * This library is distributed in the hope that it will be useful, |
| 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 18 | * Lesser General Public License for more details. |
| 19 | * |
| 20 | * You should have received a copy of the GNU Lesser General Public |
| 21 | * License along with this library; if not, write to the Free Software |
Jonathan Ernst | 360a3f9 | 2006-05-18 14:49:52 +0200 | [diff] [blame] | 22 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 23 | */ |
| 24 | |
| 25 | @HEADER /* start of C declarations */ |
| 26 | |
Alexandre Julliard | e0b5270 | 2003-09-08 19:04:01 +0000 | [diff] [blame] | 27 | #include <stdarg.h> |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 28 | #include <stdlib.h> |
| 29 | #include <time.h> |
Alexandre Julliard | e0b5270 | 2003-09-08 19:04:01 +0000 | [diff] [blame] | 30 | |
| 31 | #include <windef.h> |
| 32 | #include <winbase.h> |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 33 | |
Alexandre Julliard | 0f273c1 | 2006-07-26 10:43:25 +0200 | [diff] [blame] | 34 | typedef void *obj_handle_t; |
| 35 | typedef void *user_handle_t; |
| 36 | typedef unsigned short atom_t; |
| 37 | typedef unsigned int process_id_t; |
| 38 | typedef unsigned int thread_id_t; |
| 39 | typedef unsigned int data_size_t; |
Alexandre Julliard | 737148c | 2007-04-17 22:06:13 +0200 | [diff] [blame] | 40 | typedef unsigned int ioctl_code_t; |
Alexandre Julliard | 0f273c1 | 2006-07-26 10:43:25 +0200 | [diff] [blame] | 41 | |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 42 | struct request_header |
| 43 | { |
Alexandre Julliard | 9caa71e | 2001-11-30 18:46:42 +0000 | [diff] [blame] | 44 | int req; /* request code */ |
Alexandre Julliard | 0f273c1 | 2006-07-26 10:43:25 +0200 | [diff] [blame] | 45 | data_size_t request_size; /* request variable part size */ |
| 46 | data_size_t reply_size; /* reply variable part maximum size */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 47 | }; |
| 48 | |
| 49 | struct reply_header |
| 50 | { |
Alexandre Julliard | 9caa71e | 2001-11-30 18:46:42 +0000 | [diff] [blame] | 51 | unsigned int error; /* error result */ |
Alexandre Julliard | 0f273c1 | 2006-07-26 10:43:25 +0200 | [diff] [blame] | 52 | data_size_t reply_size; /* reply variable part size */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 53 | }; |
| 54 | |
| 55 | /* placeholder structure for the maximum allowed request size */ |
| 56 | /* this is used to construct the generic_request union */ |
| 57 | struct request_max_size |
| 58 | { |
| 59 | int pad[16]; /* the max request size is 16 ints */ |
| 60 | }; |
| 61 | |
Alexandre Julliard | 7695d69 | 2001-09-24 01:19:59 +0000 | [diff] [blame] | 62 | #define FIRST_USER_HANDLE 0x0020 /* first possible value for low word of user handle */ |
| 63 | #define LAST_USER_HANDLE 0xffef /* last possible value for low word of user handle */ |
| 64 | |
| 65 | |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 66 | /* definitions of the event data depending on the event code */ |
| 67 | struct debug_event_exception |
| 68 | { |
| 69 | EXCEPTION_RECORD record; /* exception record */ |
| 70 | int first; /* first chance exception? */ |
| 71 | }; |
| 72 | struct debug_event_create_thread |
| 73 | { |
Alexandre Julliard | 5188574 | 2002-05-30 20:12:58 +0000 | [diff] [blame] | 74 | obj_handle_t handle; /* handle to the new thread */ |
| 75 | void *teb; /* thread teb (in debugged process address space) */ |
| 76 | void *start; /* thread startup routine */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 77 | }; |
| 78 | struct debug_event_create_process |
| 79 | { |
Alexandre Julliard | 5188574 | 2002-05-30 20:12:58 +0000 | [diff] [blame] | 80 | obj_handle_t file; /* handle to the process exe file */ |
| 81 | obj_handle_t process; /* handle to the new process */ |
| 82 | obj_handle_t thread; /* handle to the new thread */ |
| 83 | void *base; /* base of executable image */ |
| 84 | int dbg_offset; /* offset of debug info in file */ |
| 85 | int dbg_size; /* size of debug info */ |
| 86 | void *teb; /* thread teb (in debugged process address space) */ |
| 87 | void *start; /* thread startup routine */ |
| 88 | void *name; /* image name (optional) */ |
| 89 | int unicode; /* is it Unicode? */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 90 | }; |
| 91 | struct debug_event_exit |
| 92 | { |
Alexandre Julliard | 5188574 | 2002-05-30 20:12:58 +0000 | [diff] [blame] | 93 | int exit_code; /* thread or process exit code */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 94 | }; |
| 95 | struct debug_event_load_dll |
| 96 | { |
Alexandre Julliard | 5188574 | 2002-05-30 20:12:58 +0000 | [diff] [blame] | 97 | obj_handle_t handle; /* file handle for the dll */ |
| 98 | void *base; /* base address of the dll */ |
| 99 | int dbg_offset; /* offset of debug info in file */ |
| 100 | int dbg_size; /* size of debug info */ |
| 101 | void *name; /* image name (optional) */ |
| 102 | int unicode; /* is it Unicode? */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 103 | }; |
| 104 | struct debug_event_unload_dll |
| 105 | { |
| 106 | void *base; /* base address of the dll */ |
| 107 | }; |
| 108 | struct debug_event_output_string |
| 109 | { |
| 110 | void *string; /* string to display (in debugged process address space) */ |
| 111 | int unicode; /* is it Unicode? */ |
| 112 | int length; /* string length */ |
| 113 | }; |
| 114 | struct debug_event_rip_info |
| 115 | { |
| 116 | int error; /* ??? */ |
| 117 | int type; /* ??? */ |
| 118 | }; |
| 119 | union debug_event_data |
| 120 | { |
| 121 | struct debug_event_exception exception; |
| 122 | struct debug_event_create_thread create_thread; |
| 123 | struct debug_event_create_process create_process; |
| 124 | struct debug_event_exit exit; |
| 125 | struct debug_event_load_dll load_dll; |
| 126 | struct debug_event_unload_dll unload_dll; |
| 127 | struct debug_event_output_string output_string; |
| 128 | struct debug_event_rip_info rip_info; |
| 129 | }; |
| 130 | |
| 131 | /* debug event data */ |
| 132 | typedef struct |
| 133 | { |
| 134 | int code; /* event code */ |
| 135 | union debug_event_data info; /* event information */ |
| 136 | } debug_event_t; |
| 137 | |
| 138 | /* structure used in sending an fd from client to server */ |
| 139 | struct send_fd |
| 140 | { |
Alexandre Julliard | 54f2287 | 2002-10-03 19:54:57 +0000 | [diff] [blame] | 141 | thread_id_t tid; /* thread id */ |
| 142 | int fd; /* file descriptor on client-side */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 143 | }; |
| 144 | |
| 145 | /* structure sent by the server on the wait fifo */ |
| 146 | struct wake_up_reply |
| 147 | { |
| 148 | void *cookie; /* magic cookie that was passed in select_request */ |
| 149 | int signaled; /* wait result */ |
| 150 | }; |
| 151 | |
Alexandre Julliard | aaf477f | 2007-04-17 20:08:59 +0200 | [diff] [blame] | 152 | /* NT-style timeout, in 100ns units, negative means relative timeout */ |
| 153 | typedef __int64 timeout_t; |
| 154 | #define TIMEOUT_INFINITE (((timeout_t)0x7fffffff) << 32 | 0xffffffff) |
Alexandre Julliard | 462172a | 2003-04-02 22:48:59 +0000 | [diff] [blame] | 155 | |
Alexandre Julliard | 7a2017d | 2001-10-12 19:10:26 +0000 | [diff] [blame] | 156 | /* structure returned in the list of window properties */ |
| 157 | typedef struct |
| 158 | { |
| 159 | atom_t atom; /* property atom */ |
| 160 | short string; /* was atom a string originally? */ |
Alexandre Julliard | 5188574 | 2002-05-30 20:12:58 +0000 | [diff] [blame] | 161 | obj_handle_t handle; /* handle stored in property */ |
Alexandre Julliard | 7a2017d | 2001-10-12 19:10:26 +0000 | [diff] [blame] | 162 | } property_data_t; |
| 163 | |
Alexandre Julliard | 0d50965 | 2001-10-16 21:55:37 +0000 | [diff] [blame] | 164 | /* structure to specify window rectangles */ |
| 165 | typedef struct |
| 166 | { |
| 167 | int left; |
| 168 | int top; |
| 169 | int right; |
| 170 | int bottom; |
| 171 | } rectangle_t; |
| 172 | |
Alexandre Julliard | 111610c | 2007-03-20 20:21:12 +0100 | [diff] [blame] | 173 | /* structure for parameters of async I/O calls */ |
| 174 | typedef struct |
| 175 | { |
| 176 | void *callback; /* client-side callback to call upon end of async */ |
| 177 | void *iosb; /* I/O status block in client addr space */ |
| 178 | void *arg; /* opaque user data to pass to callback */ |
Alexandre Julliard | c16eb8e | 2007-03-27 16:42:27 +0200 | [diff] [blame] | 179 | void *apc; /* user apc to call */ |
Alexandre Julliard | fa4679f | 2007-03-21 14:27:52 +0100 | [diff] [blame] | 180 | obj_handle_t event; /* event to signal when done */ |
Alexandre Julliard | 111610c | 2007-03-20 20:21:12 +0100 | [diff] [blame] | 181 | } async_data_t; |
| 182 | |
Alexandre Julliard | 59dc456 | 2006-10-04 16:04:53 +0200 | [diff] [blame] | 183 | /* structures for extra message data */ |
Alexandre Julliard | 29a3ce9 | 2006-10-04 16:29:45 +0200 | [diff] [blame] | 184 | |
| 185 | struct callback_msg_data |
| 186 | { |
| 187 | void *callback; /* callback function */ |
| 188 | unsigned long data; /* user data for callback */ |
| 189 | unsigned long result; /* message result */ |
| 190 | }; |
| 191 | |
Alexandre Julliard | 59dc456 | 2006-10-04 16:04:53 +0200 | [diff] [blame] | 192 | struct winevent_msg_data |
| 193 | { |
| 194 | user_handle_t hook; /* hook handle */ |
| 195 | thread_id_t tid; /* thread id */ |
| 196 | void *hook_proc; /* hook proc address */ |
| 197 | /* followed by module name if any */ |
| 198 | }; |
| 199 | |
| 200 | typedef union |
| 201 | { |
| 202 | unsigned char bytes[1]; /* raw data for sent messages */ |
Alexandre Julliard | 29a3ce9 | 2006-10-04 16:29:45 +0200 | [diff] [blame] | 203 | struct callback_msg_data callback; |
Alexandre Julliard | 59dc456 | 2006-10-04 16:04:53 +0200 | [diff] [blame] | 204 | struct winevent_msg_data winevent; |
| 205 | } message_data_t; |
| 206 | |
Alexandre Julliard | 9caa71e | 2001-11-30 18:46:42 +0000 | [diff] [blame] | 207 | /* structure for console char/attribute info */ |
| 208 | typedef struct |
| 209 | { |
| 210 | WCHAR ch; |
| 211 | unsigned short attr; |
| 212 | } char_info_t; |
| 213 | |
Juan Lang | c2cb296 | 2007-03-06 16:33:26 -0800 | [diff] [blame] | 214 | typedef struct |
| 215 | { |
| 216 | unsigned int low_part; |
| 217 | int high_part; |
| 218 | } luid_t; |
| 219 | |
Robert Shearman | 7bff354 | 2005-05-23 16:33:00 +0000 | [diff] [blame] | 220 | #define MAX_ACL_LEN 65535 |
| 221 | |
| 222 | struct security_descriptor |
| 223 | { |
| 224 | unsigned int control; /* SE_ flags */ |
Alexandre Julliard | 0f273c1 | 2006-07-26 10:43:25 +0200 | [diff] [blame] | 225 | data_size_t owner_len; |
| 226 | data_size_t group_len; |
| 227 | data_size_t sacl_len; |
| 228 | data_size_t dacl_len; |
Robert Shearman | 7bff354 | 2005-05-23 16:33:00 +0000 | [diff] [blame] | 229 | /* VARARGS(owner,SID); */ |
| 230 | /* VARARGS(group,SID); */ |
| 231 | /* VARARGS(sacl,ACL); */ |
| 232 | /* VARARGS(dacl,ACL); */ |
| 233 | }; |
| 234 | |
Robert Shearman | 3396a66 | 2006-05-13 16:58:19 +0100 | [diff] [blame] | 235 | struct token_groups |
| 236 | { |
| 237 | unsigned int count; |
| 238 | /* unsigned int attributes[count]; */ |
| 239 | /* VARARGS(sids,SID); */ |
| 240 | }; |
| 241 | |
Alexandre Julliard | fb40dc4 | 2007-01-15 22:24:40 +0100 | [diff] [blame] | 242 | enum apc_type |
| 243 | { |
| 244 | APC_NONE, |
| 245 | APC_USER, |
| 246 | APC_TIMER, |
| 247 | APC_ASYNC_IO, |
| 248 | APC_VIRTUAL_ALLOC, |
Alexandre Julliard | 3d00239 | 2007-01-15 22:28:42 +0100 | [diff] [blame] | 249 | APC_VIRTUAL_FREE, |
Alexandre Julliard | 1ea9680 | 2007-01-15 22:30:04 +0100 | [diff] [blame] | 250 | APC_VIRTUAL_QUERY, |
Alexandre Julliard | 5a1ad74 | 2007-01-15 22:31:07 +0100 | [diff] [blame] | 251 | APC_VIRTUAL_PROTECT, |
Alexandre Julliard | c122260 | 2007-01-16 09:50:08 +0100 | [diff] [blame] | 252 | APC_VIRTUAL_FLUSH, |
| 253 | APC_VIRTUAL_LOCK, |
Alexandre Julliard | 8025f79 | 2007-01-18 15:02:55 +0100 | [diff] [blame] | 254 | APC_VIRTUAL_UNLOCK, |
Alexandre Julliard | 02e2fa77 | 2007-01-18 15:17:51 +0100 | [diff] [blame] | 255 | APC_MAP_VIEW, |
| 256 | APC_UNMAP_VIEW, |
Alexandre Julliard | 8025f79 | 2007-01-18 15:02:55 +0100 | [diff] [blame] | 257 | APC_CREATE_THREAD |
Alexandre Julliard | fb40dc4 | 2007-01-15 22:24:40 +0100 | [diff] [blame] | 258 | }; |
Alexandre Julliard | 5c8421d | 2007-01-04 13:40:09 +0100 | [diff] [blame] | 259 | |
| 260 | typedef union |
| 261 | { |
| 262 | enum apc_type type; |
| 263 | struct |
| 264 | { |
| 265 | enum apc_type type; /* APC_USER */ |
| 266 | void (__stdcall *func)(unsigned long,unsigned long,unsigned long); |
| 267 | unsigned long args[3]; /* arguments for user function */ |
| 268 | } user; |
| 269 | struct |
| 270 | { |
| 271 | enum apc_type type; /* APC_TIMER */ |
| 272 | void (__stdcall *func)(void*, unsigned int, unsigned int); |
Alexandre Julliard | aaf477f | 2007-04-17 20:08:59 +0200 | [diff] [blame] | 273 | timeout_t time; /* absolute time of expiration */ |
Alexandre Julliard | 5c8421d | 2007-01-04 13:40:09 +0100 | [diff] [blame] | 274 | void *arg; /* user argument */ |
| 275 | } timer; |
| 276 | struct |
| 277 | { |
| 278 | enum apc_type type; /* APC_ASYNC_IO */ |
Alexandre Julliard | 72bff2e | 2007-04-10 17:07:27 +0200 | [diff] [blame] | 279 | unsigned int (*func)(void*, void*, unsigned int); |
Alexandre Julliard | 5c8421d | 2007-01-04 13:40:09 +0100 | [diff] [blame] | 280 | void *user; /* user pointer */ |
| 281 | void *sb; /* status block */ |
| 282 | unsigned int status; /* I/O status */ |
| 283 | } async_io; |
Alexandre Julliard | fb40dc4 | 2007-01-15 22:24:40 +0100 | [diff] [blame] | 284 | struct |
| 285 | { |
| 286 | enum apc_type type; /* APC_VIRTUAL_ALLOC */ |
| 287 | void *addr; /* requested address */ |
| 288 | unsigned long size; /* allocation size */ |
| 289 | unsigned int zero_bits; /* allocation alignment */ |
| 290 | unsigned int op_type; /* type of operation */ |
| 291 | unsigned int prot; /* memory protection flags */ |
| 292 | } virtual_alloc; |
| 293 | struct |
| 294 | { |
| 295 | enum apc_type type; /* APC_VIRTUAL_FREE */ |
| 296 | void *addr; /* requested address */ |
| 297 | unsigned long size; /* allocation size */ |
| 298 | unsigned int op_type; /* type of operation */ |
| 299 | } virtual_free; |
Alexandre Julliard | 3d00239 | 2007-01-15 22:28:42 +0100 | [diff] [blame] | 300 | struct |
| 301 | { |
| 302 | enum apc_type type; /* APC_VIRTUAL_QUERY */ |
| 303 | const void *addr; /* requested address */ |
| 304 | } virtual_query; |
Alexandre Julliard | 1ea9680 | 2007-01-15 22:30:04 +0100 | [diff] [blame] | 305 | struct |
| 306 | { |
| 307 | enum apc_type type; /* APC_VIRTUAL_PROTECT */ |
| 308 | void *addr; /* requested address */ |
| 309 | unsigned long size; /* requested address */ |
| 310 | unsigned int prot; /* new protection flags */ |
| 311 | } virtual_protect; |
Alexandre Julliard | 5a1ad74 | 2007-01-15 22:31:07 +0100 | [diff] [blame] | 312 | struct |
| 313 | { |
| 314 | enum apc_type type; /* APC_VIRTUAL_FLUSH */ |
| 315 | const void *addr; /* requested address */ |
| 316 | unsigned long size; /* requested address */ |
| 317 | } virtual_flush; |
Alexandre Julliard | c122260 | 2007-01-16 09:50:08 +0100 | [diff] [blame] | 318 | struct |
| 319 | { |
| 320 | enum apc_type type; /* APC_VIRTUAL_LOCK */ |
| 321 | void *addr; /* requested address */ |
| 322 | unsigned long size; /* requested address */ |
| 323 | } virtual_lock; |
| 324 | struct |
| 325 | { |
| 326 | enum apc_type type; /* APC_VIRTUAL_UNLOCK */ |
| 327 | void *addr; /* requested address */ |
| 328 | unsigned long size; /* requested address */ |
| 329 | } virtual_unlock; |
Alexandre Julliard | 8025f79 | 2007-01-18 15:02:55 +0100 | [diff] [blame] | 330 | struct |
| 331 | { |
Alexandre Julliard | 02e2fa77 | 2007-01-18 15:17:51 +0100 | [diff] [blame] | 332 | enum apc_type type; /* APC_MAP_VIEW */ |
| 333 | obj_handle_t handle; /* mapping handle */ |
| 334 | void *addr; /* requested address */ |
| 335 | unsigned long size; /* allocation size */ |
| 336 | unsigned int offset_low;/* file offset */ |
| 337 | unsigned int offset_high; |
| 338 | unsigned int zero_bits; /* allocation alignment */ |
| 339 | unsigned int alloc_type;/* allocation type */ |
| 340 | unsigned int prot; /* memory protection flags */ |
| 341 | } map_view; |
| 342 | struct |
| 343 | { |
| 344 | enum apc_type type; /* APC_UNMAP_VIEW */ |
| 345 | void *addr; /* view address */ |
| 346 | } unmap_view; |
| 347 | struct |
| 348 | { |
Alexandre Julliard | 8025f79 | 2007-01-18 15:02:55 +0100 | [diff] [blame] | 349 | enum apc_type type; /* APC_CREATE_THREAD */ |
| 350 | void (__stdcall *func)(void*); /* start function */ |
| 351 | void *arg; /* argument for start function */ |
| 352 | unsigned long reserve; /* reserve size for thread stack */ |
| 353 | unsigned long commit; /* commit size for thread stack */ |
| 354 | int suspend; /* suspended thread? */ |
| 355 | } create_thread; |
Alexandre Julliard | 5c8421d | 2007-01-04 13:40:09 +0100 | [diff] [blame] | 356 | } apc_call_t; |
| 357 | |
Alexandre Julliard | fb40dc4 | 2007-01-15 22:24:40 +0100 | [diff] [blame] | 358 | typedef union |
| 359 | { |
| 360 | enum apc_type type; |
| 361 | struct |
| 362 | { |
Alexandre Julliard | 50975c8 | 2007-03-20 19:27:10 +0100 | [diff] [blame] | 363 | enum apc_type type; /* APC_ASYNC_IO */ |
| 364 | unsigned int status; /* new status of async operation */ |
| 365 | } async_io; |
| 366 | struct |
| 367 | { |
Alexandre Julliard | fb40dc4 | 2007-01-15 22:24:40 +0100 | [diff] [blame] | 368 | enum apc_type type; /* APC_VIRTUAL_ALLOC */ |
| 369 | unsigned int status; /* status returned by call */ |
| 370 | void *addr; /* resulting address */ |
| 371 | unsigned long size; /* resulting size */ |
| 372 | } virtual_alloc; |
| 373 | struct |
| 374 | { |
| 375 | enum apc_type type; /* APC_VIRTUAL_FREE */ |
| 376 | unsigned int status; /* status returned by call */ |
| 377 | void *addr; /* resulting address */ |
| 378 | unsigned long size; /* resulting size */ |
| 379 | } virtual_free; |
Alexandre Julliard | 3d00239 | 2007-01-15 22:28:42 +0100 | [diff] [blame] | 380 | struct |
| 381 | { |
| 382 | enum apc_type type; /* APC_VIRTUAL_QUERY */ |
| 383 | unsigned int status; /* status returned by call */ |
| 384 | void *base; /* resulting base address */ |
| 385 | void *alloc_base;/* resulting allocation base */ |
| 386 | unsigned long size; /* resulting region size */ |
| 387 | unsigned int state; /* resulting region state */ |
| 388 | unsigned int prot; /* resulting region protection */ |
| 389 | unsigned int alloc_prot;/* resulting allocation protection */ |
| 390 | unsigned int alloc_type;/* resulting region allocation type */ |
| 391 | } virtual_query; |
Alexandre Julliard | 1ea9680 | 2007-01-15 22:30:04 +0100 | [diff] [blame] | 392 | struct |
| 393 | { |
| 394 | enum apc_type type; /* APC_VIRTUAL_PROTECT */ |
| 395 | unsigned int status; /* status returned by call */ |
| 396 | void *addr; /* resulting address */ |
| 397 | unsigned long size; /* resulting size */ |
| 398 | unsigned int prot; /* old protection flags */ |
| 399 | } virtual_protect; |
Alexandre Julliard | 5a1ad74 | 2007-01-15 22:31:07 +0100 | [diff] [blame] | 400 | struct |
| 401 | { |
| 402 | enum apc_type type; /* APC_VIRTUAL_FLUSH */ |
| 403 | unsigned int status; /* status returned by call */ |
| 404 | const void *addr; /* resulting address */ |
| 405 | unsigned long size; /* resulting size */ |
| 406 | } virtual_flush; |
Alexandre Julliard | c122260 | 2007-01-16 09:50:08 +0100 | [diff] [blame] | 407 | struct |
| 408 | { |
| 409 | enum apc_type type; /* APC_VIRTUAL_LOCK */ |
| 410 | unsigned int status; /* status returned by call */ |
| 411 | void *addr; /* resulting address */ |
| 412 | unsigned long size; /* resulting size */ |
| 413 | } virtual_lock; |
| 414 | struct |
| 415 | { |
| 416 | enum apc_type type; /* APC_VIRTUAL_UNLOCK */ |
| 417 | unsigned int status; /* status returned by call */ |
| 418 | void *addr; /* resulting address */ |
| 419 | unsigned long size; /* resulting size */ |
| 420 | } virtual_unlock; |
Alexandre Julliard | 8025f79 | 2007-01-18 15:02:55 +0100 | [diff] [blame] | 421 | struct |
| 422 | { |
Alexandre Julliard | 02e2fa77 | 2007-01-18 15:17:51 +0100 | [diff] [blame] | 423 | enum apc_type type; /* APC_MAP_VIEW */ |
| 424 | unsigned int status; /* status returned by call */ |
| 425 | void *addr; /* resulting address */ |
| 426 | unsigned long size; /* resulting size */ |
| 427 | } map_view; |
| 428 | struct |
| 429 | { |
| 430 | enum apc_type type; /* APC_MAP_VIEW */ |
| 431 | unsigned int status; /* status returned by call */ |
| 432 | } unmap_view; |
| 433 | struct |
| 434 | { |
Alexandre Julliard | 8025f79 | 2007-01-18 15:02:55 +0100 | [diff] [blame] | 435 | enum apc_type type; /* APC_CREATE_THREAD */ |
| 436 | unsigned int status; /* status returned by call */ |
| 437 | thread_id_t tid; /* thread id */ |
| 438 | obj_handle_t handle; /* handle to new thread */ |
| 439 | } create_thread; |
Alexandre Julliard | fb40dc4 | 2007-01-15 22:24:40 +0100 | [diff] [blame] | 440 | } apc_result_t; |
| 441 | |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 442 | /****************************************************************/ |
| 443 | /* Request declarations */ |
| 444 | |
| 445 | /* Create a new process from the context of the parent */ |
| 446 | @REQ(new_process) |
Alexandre Julliard | c316f0e | 2006-07-19 14:00:10 +0200 | [diff] [blame] | 447 | int inherit_all; /* inherit all handles from parent */ |
| 448 | unsigned int create_flags; /* creation flags */ |
| 449 | int socket_fd; /* file descriptor for process socket */ |
| 450 | obj_handle_t exe_file; /* file handle for main exe */ |
| 451 | obj_handle_t hstdin; /* handle for stdin */ |
| 452 | obj_handle_t hstdout; /* handle for stdout */ |
| 453 | obj_handle_t hstderr; /* handle for stderr */ |
| 454 | unsigned int process_access; /* access rights for process object */ |
| 455 | unsigned int process_attr; /* attributes for process object */ |
| 456 | unsigned int thread_access; /* access rights for thread object */ |
| 457 | unsigned int thread_attr; /* attributes for thread object */ |
| 458 | VARARG(info,startup_info); /* startup information */ |
| 459 | VARARG(env,unicode_str); /* environment for new process */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 460 | @REPLY |
Alexandre Julliard | c316f0e | 2006-07-19 14:00:10 +0200 | [diff] [blame] | 461 | obj_handle_t info; /* new process info handle */ |
| 462 | process_id_t pid; /* process id */ |
| 463 | obj_handle_t phandle; /* process handle (in the current process) */ |
| 464 | thread_id_t tid; /* thread id */ |
| 465 | obj_handle_t thandle; /* thread handle (in the current process) */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 466 | @END |
| 467 | |
| 468 | |
| 469 | /* Retrieve information about a newly started process */ |
| 470 | @REQ(get_new_process_info) |
Alexandre Julliard | f2d7dd6 | 2005-12-09 12:13:11 +0100 | [diff] [blame] | 471 | obj_handle_t info; /* info handle returned from new_process_request */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 472 | @REPLY |
Alexandre Julliard | 9d80215 | 2002-05-24 21:20:27 +0000 | [diff] [blame] | 473 | int success; /* did the process start successfully? */ |
Alexandre Julliard | c316f0e | 2006-07-19 14:00:10 +0200 | [diff] [blame] | 474 | int exit_code; /* process exit code if failed */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 475 | @END |
| 476 | |
| 477 | |
| 478 | /* Create a new thread from the context of the parent */ |
| 479 | @REQ(new_thread) |
Alexandre Julliard | f2d7dd6 | 2005-12-09 12:13:11 +0100 | [diff] [blame] | 480 | unsigned int access; /* wanted access rights */ |
| 481 | unsigned int attributes; /* object attributes */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 482 | int suspend; /* new thread should be suspended on creation */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 483 | int request_fd; /* fd for request pipe */ |
| 484 | @REPLY |
Alexandre Julliard | 54f2287 | 2002-10-03 19:54:57 +0000 | [diff] [blame] | 485 | thread_id_t tid; /* thread id */ |
Alexandre Julliard | 5188574 | 2002-05-30 20:12:58 +0000 | [diff] [blame] | 486 | obj_handle_t handle; /* thread handle (in the current process) */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 487 | @END |
| 488 | |
| 489 | |
Alexandre Julliard | 6543a65 | 2002-03-29 18:28:56 +0000 | [diff] [blame] | 490 | /* Retrieve the new process startup info */ |
| 491 | @REQ(get_startup_info) |
Alexandre Julliard | 6543a65 | 2002-03-29 18:28:56 +0000 | [diff] [blame] | 492 | @REPLY |
Alexandre Julliard | 01caa5e | 2005-07-12 20:27:09 +0000 | [diff] [blame] | 493 | obj_handle_t exe_file; /* file handle for main exe */ |
| 494 | obj_handle_t hstdin; /* handle for stdin */ |
| 495 | obj_handle_t hstdout; /* handle for stdout */ |
| 496 | obj_handle_t hstderr; /* handle for stderr */ |
Alexandre Julliard | 6543a65 | 2002-03-29 18:28:56 +0000 | [diff] [blame] | 497 | VARARG(info,startup_info); /* startup information */ |
Alexandre Julliard | c4ec210 | 2004-07-16 03:54:35 +0000 | [diff] [blame] | 498 | VARARG(env,unicode_str); /* environment */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 499 | @END |
| 500 | |
| 501 | |
| 502 | /* Signal the end of the process initialization */ |
| 503 | @REQ(init_process_done) |
| 504 | void* module; /* main module base address */ |
| 505 | void* entry; /* process entry point */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 506 | int gui; /* is it a GUI process? */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 507 | @END |
| 508 | |
| 509 | |
| 510 | /* Initialize a thread; called from the child after fork()/clone() */ |
| 511 | @REQ(init_thread) |
| 512 | int unix_pid; /* Unix pid of new thread */ |
Alexandre Julliard | a8497bd | 2003-03-22 21:00:09 +0000 | [diff] [blame] | 513 | int unix_tid; /* Unix tid of new thread */ |
Alexandre Julliard | e0dcf4f | 2006-10-04 21:41:32 +0200 | [diff] [blame] | 514 | int debug_level; /* new debug level */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 515 | void* teb; /* TEB of new thread (in thread address space) */ |
Alexandre Julliard | 0424f38 | 2005-07-13 12:12:43 +0000 | [diff] [blame] | 516 | void* peb; /* address of PEB (in thread address space) */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 517 | void* entry; /* thread entry point (in thread address space) */ |
Alexandre Julliard | 0424f38 | 2005-07-13 12:12:43 +0000 | [diff] [blame] | 518 | void* ldt_copy; /* address of LDT copy (in thread address space) */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 519 | int reply_fd; /* fd for reply pipe */ |
| 520 | int wait_fd; /* fd for blocking calls pipe */ |
| 521 | @REPLY |
Alexandre Julliard | 54f2287 | 2002-10-03 19:54:57 +0000 | [diff] [blame] | 522 | process_id_t pid; /* process id of the new thread's process */ |
| 523 | thread_id_t tid; /* thread id of the new thread */ |
Alexandre Julliard | 0f273c1 | 2006-07-26 10:43:25 +0200 | [diff] [blame] | 524 | data_size_t info_size; /* total size of startup info */ |
Alexandre Julliard | aaf477f | 2007-04-17 20:08:59 +0200 | [diff] [blame] | 525 | timeout_t server_start; /* server start time */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 526 | int version; /* protocol version */ |
| 527 | @END |
| 528 | |
| 529 | |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 530 | /* Terminate a process */ |
| 531 | @REQ(terminate_process) |
Alexandre Julliard | 5188574 | 2002-05-30 20:12:58 +0000 | [diff] [blame] | 532 | obj_handle_t handle; /* process handle to terminate */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 533 | int exit_code; /* process exit code */ |
| 534 | @REPLY |
| 535 | int self; /* suicide? */ |
| 536 | @END |
| 537 | |
| 538 | |
| 539 | /* Terminate a thread */ |
| 540 | @REQ(terminate_thread) |
Alexandre Julliard | 5188574 | 2002-05-30 20:12:58 +0000 | [diff] [blame] | 541 | obj_handle_t handle; /* thread handle to terminate */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 542 | int exit_code; /* thread exit code */ |
| 543 | @REPLY |
| 544 | int self; /* suicide? */ |
| 545 | int last; /* last thread in this process? */ |
| 546 | @END |
| 547 | |
| 548 | |
| 549 | /* Retrieve information about a process */ |
| 550 | @REQ(get_process_info) |
Alexandre Julliard | 5188574 | 2002-05-30 20:12:58 +0000 | [diff] [blame] | 551 | obj_handle_t handle; /* process handle */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 552 | @REPLY |
Alexandre Julliard | 54f2287 | 2002-10-03 19:54:57 +0000 | [diff] [blame] | 553 | process_id_t pid; /* server process id */ |
Eric Pouech | b0fd2ad | 2004-06-14 17:02:00 +0000 | [diff] [blame] | 554 | process_id_t ppid; /* server process id of parent */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 555 | int exit_code; /* process exit code */ |
| 556 | int priority; /* priority class */ |
Eric Pouech | b09582a | 2005-09-27 10:52:10 +0000 | [diff] [blame] | 557 | int affinity; /* process affinity mask */ |
Eric Pouech | b0fd2ad | 2004-06-14 17:02:00 +0000 | [diff] [blame] | 558 | void* peb; /* PEB address in process address space */ |
Alexandre Julliard | aaf477f | 2007-04-17 20:08:59 +0200 | [diff] [blame] | 559 | timeout_t start_time; /* process start time */ |
| 560 | timeout_t end_time; /* process end time */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 561 | @END |
| 562 | |
| 563 | |
| 564 | /* Set a process informations */ |
| 565 | @REQ(set_process_info) |
Alexandre Julliard | 5188574 | 2002-05-30 20:12:58 +0000 | [diff] [blame] | 566 | obj_handle_t handle; /* process handle */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 567 | int mask; /* setting mask (see below) */ |
| 568 | int priority; /* priority class */ |
| 569 | int affinity; /* affinity mask */ |
| 570 | @END |
| 571 | #define SET_PROCESS_INFO_PRIORITY 0x01 |
| 572 | #define SET_PROCESS_INFO_AFFINITY 0x02 |
| 573 | |
| 574 | |
| 575 | /* Retrieve information about a thread */ |
| 576 | @REQ(get_thread_info) |
Ryan Cumming | 24f4ece | 2002-11-25 01:33:38 +0000 | [diff] [blame] | 577 | obj_handle_t handle; /* thread handle */ |
| 578 | thread_id_t tid_in; /* thread id (optional) */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 579 | @REPLY |
Alexandre Julliard | 4f196ea | 2003-07-09 02:57:57 +0000 | [diff] [blame] | 580 | process_id_t pid; /* server process id */ |
Ryan Cumming | 24f4ece | 2002-11-25 01:33:38 +0000 | [diff] [blame] | 581 | thread_id_t tid; /* server thread id */ |
| 582 | void* teb; /* thread teb pointer */ |
| 583 | int exit_code; /* thread exit code */ |
| 584 | int priority; /* thread priority level */ |
Alexandre Julliard | 4f196ea | 2003-07-09 02:57:57 +0000 | [diff] [blame] | 585 | int affinity; /* thread affinity mask */ |
Alexandre Julliard | aaf477f | 2007-04-17 20:08:59 +0200 | [diff] [blame] | 586 | timeout_t creation_time; /* thread creation time */ |
| 587 | timeout_t exit_time; /* thread exit time */ |
Eric Pouech | 8cb932e | 2006-10-01 08:17:27 +0200 | [diff] [blame] | 588 | int last; /* last thread in process */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 589 | @END |
| 590 | |
| 591 | |
| 592 | /* Set a thread informations */ |
| 593 | @REQ(set_thread_info) |
Alexandre Julliard | 5188574 | 2002-05-30 20:12:58 +0000 | [diff] [blame] | 594 | obj_handle_t handle; /* thread handle */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 595 | int mask; /* setting mask (see below) */ |
| 596 | int priority; /* priority class */ |
| 597 | int affinity; /* affinity mask */ |
Robert Shearman | 4bba216 | 2005-06-20 13:18:38 +0000 | [diff] [blame] | 598 | obj_handle_t token; /* impersonation token */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 599 | @END |
| 600 | #define SET_THREAD_INFO_PRIORITY 0x01 |
| 601 | #define SET_THREAD_INFO_AFFINITY 0x02 |
Robert Shearman | 4bba216 | 2005-06-20 13:18:38 +0000 | [diff] [blame] | 602 | #define SET_THREAD_INFO_TOKEN 0x04 |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 603 | |
| 604 | |
Eric Pouech | 2359b57 | 2003-01-09 00:01:28 +0000 | [diff] [blame] | 605 | /* Retrieve information about a module */ |
| 606 | @REQ(get_dll_info) |
| 607 | obj_handle_t handle; /* process handle */ |
| 608 | void* base_address; /* base address of module */ |
| 609 | @REPLY |
| 610 | size_t size; /* module size */ |
| 611 | void* entry_point; |
Alexandre Julliard | c30cefb | 2003-09-30 01:04:19 +0000 | [diff] [blame] | 612 | VARARG(filename,unicode_str); /* file name of module */ |
Eric Pouech | 2359b57 | 2003-01-09 00:01:28 +0000 | [diff] [blame] | 613 | @END |
| 614 | |
| 615 | |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 616 | /* Suspend a thread */ |
| 617 | @REQ(suspend_thread) |
Alexandre Julliard | 5188574 | 2002-05-30 20:12:58 +0000 | [diff] [blame] | 618 | obj_handle_t handle; /* thread handle */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 619 | @REPLY |
| 620 | int count; /* new suspend count */ |
| 621 | @END |
| 622 | |
| 623 | |
| 624 | /* Resume a thread */ |
| 625 | @REQ(resume_thread) |
Alexandre Julliard | 5188574 | 2002-05-30 20:12:58 +0000 | [diff] [blame] | 626 | obj_handle_t handle; /* thread handle */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 627 | @REPLY |
| 628 | int count; /* new suspend count */ |
| 629 | @END |
| 630 | |
| 631 | |
| 632 | /* Notify the server that a dll has been loaded */ |
| 633 | @REQ(load_dll) |
Alexandre Julliard | 5188574 | 2002-05-30 20:12:58 +0000 | [diff] [blame] | 634 | obj_handle_t handle; /* file handle */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 635 | void* base; /* base address */ |
Alexandre Julliard | aeb5660 | 2002-03-22 00:21:23 +0000 | [diff] [blame] | 636 | size_t size; /* dll size */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 637 | int dbg_offset; /* debug info offset */ |
| 638 | int dbg_size; /* debug info size */ |
| 639 | void* name; /* ptr to ptr to name (in process addr space) */ |
Alexandre Julliard | c30cefb | 2003-09-30 01:04:19 +0000 | [diff] [blame] | 640 | VARARG(filename,unicode_str); /* file name of dll */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 641 | @END |
| 642 | |
| 643 | |
| 644 | /* Notify the server that a dll is being unloaded */ |
| 645 | @REQ(unload_dll) |
| 646 | void* base; /* base address */ |
| 647 | @END |
| 648 | |
| 649 | |
Alexandre Julliard | 6ca1d1b | 2007-01-15 22:26:32 +0100 | [diff] [blame] | 650 | /* Queue an APC for a thread or process */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 651 | @REQ(queue_apc) |
Alexandre Julliard | 6ca1d1b | 2007-01-15 22:26:32 +0100 | [diff] [blame] | 652 | obj_handle_t thread; /* thread handle */ |
| 653 | obj_handle_t process; /* process handle */ |
Alexandre Julliard | 5c8421d | 2007-01-04 13:40:09 +0100 | [diff] [blame] | 654 | apc_call_t call; /* call arguments */ |
Alexandre Julliard | 6ca1d1b | 2007-01-15 22:26:32 +0100 | [diff] [blame] | 655 | @REPLY |
| 656 | obj_handle_t handle; /* APC handle */ |
Alexandre Julliard | f3cb4f7 | 2007-01-18 15:41:05 +0100 | [diff] [blame] | 657 | int self; /* run APC in caller itself? */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 658 | @END |
| 659 | |
| 660 | |
| 661 | /* Get next APC to call */ |
| 662 | @REQ(get_apc) |
| 663 | int alertable; /* is thread alertable? */ |
Alexandre Julliard | 49b49c3 | 2007-01-04 13:17:53 +0100 | [diff] [blame] | 664 | obj_handle_t prev; /* handle to previous APC */ |
Alexandre Julliard | fb40dc4 | 2007-01-15 22:24:40 +0100 | [diff] [blame] | 665 | apc_result_t result; /* result of previous APC */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 666 | @REPLY |
Alexandre Julliard | 49b49c3 | 2007-01-04 13:17:53 +0100 | [diff] [blame] | 667 | obj_handle_t handle; /* handle to APC */ |
Alexandre Julliard | 5c8421d | 2007-01-04 13:40:09 +0100 | [diff] [blame] | 668 | apc_call_t call; /* call arguments */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 669 | @END |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 670 | |
| 671 | |
Alexandre Julliard | fb40dc4 | 2007-01-15 22:24:40 +0100 | [diff] [blame] | 672 | /* Get the result of an APC call */ |
| 673 | @REQ(get_apc_result) |
| 674 | obj_handle_t handle; /* handle to the APC */ |
| 675 | @REPLY |
| 676 | apc_result_t result; /* result of the APC */ |
| 677 | @END |
| 678 | |
| 679 | |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 680 | /* Close a handle for the current process */ |
| 681 | @REQ(close_handle) |
Alexandre Julliard | 5188574 | 2002-05-30 20:12:58 +0000 | [diff] [blame] | 682 | obj_handle_t handle; /* handle to close */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 683 | @END |
| 684 | |
| 685 | |
| 686 | /* Set a handle information */ |
| 687 | @REQ(set_handle_info) |
Alexandre Julliard | 5188574 | 2002-05-30 20:12:58 +0000 | [diff] [blame] | 688 | obj_handle_t handle; /* handle we are interested in */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 689 | int flags; /* new handle flags */ |
| 690 | int mask; /* mask for flags to set */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 691 | @REPLY |
| 692 | int old_flags; /* old flag value */ |
Alexandre Julliard | 38502f7 | 2005-08-23 18:43:50 +0000 | [diff] [blame] | 693 | @END |
| 694 | |
| 695 | |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 696 | /* Duplicate a handle */ |
| 697 | @REQ(dup_handle) |
Alexandre Julliard | 5188574 | 2002-05-30 20:12:58 +0000 | [diff] [blame] | 698 | obj_handle_t src_process; /* src process handle */ |
| 699 | obj_handle_t src_handle; /* src handle to duplicate */ |
| 700 | obj_handle_t dst_process; /* dst process handle */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 701 | unsigned int access; /* wanted access rights */ |
Alexandre Julliard | 7b910f4 | 2005-12-09 12:21:35 +0100 | [diff] [blame] | 702 | unsigned int attributes; /* object attributes */ |
| 703 | unsigned int options; /* duplicate options (see below) */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 704 | @REPLY |
Alexandre Julliard | 5188574 | 2002-05-30 20:12:58 +0000 | [diff] [blame] | 705 | obj_handle_t handle; /* duplicated handle in dst process */ |
Alexandre Julliard | 3410354 | 2007-01-18 12:18:51 +0100 | [diff] [blame] | 706 | int self; /* is the source the current process? */ |
Alexandre Julliard | 28418cc | 2006-11-02 20:48:19 +0100 | [diff] [blame] | 707 | int closed; /* whether the source handle has been closed */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 708 | @END |
| 709 | #define DUP_HANDLE_CLOSE_SOURCE DUPLICATE_CLOSE_SOURCE |
| 710 | #define DUP_HANDLE_SAME_ACCESS DUPLICATE_SAME_ACCESS |
| 711 | #define DUP_HANDLE_MAKE_GLOBAL 0x80000000 /* Not a Windows flag */ |
| 712 | |
| 713 | |
| 714 | /* Open a handle to a process */ |
| 715 | @REQ(open_process) |
Alexandre Julliard | 54f2287 | 2002-10-03 19:54:57 +0000 | [diff] [blame] | 716 | process_id_t pid; /* process id to open */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 717 | unsigned int access; /* wanted access rights */ |
Alexandre Julliard | f2d7dd6 | 2005-12-09 12:13:11 +0100 | [diff] [blame] | 718 | unsigned int attributes; /* object attributes */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 719 | @REPLY |
Alexandre Julliard | 5188574 | 2002-05-30 20:12:58 +0000 | [diff] [blame] | 720 | obj_handle_t handle; /* handle to the process */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 721 | @END |
| 722 | |
| 723 | |
Chris Morgan | 417296c | 2002-04-02 00:49:05 +0000 | [diff] [blame] | 724 | /* Open a handle to a thread */ |
| 725 | @REQ(open_thread) |
Alexandre Julliard | 54f2287 | 2002-10-03 19:54:57 +0000 | [diff] [blame] | 726 | thread_id_t tid; /* thread id to open */ |
Chris Morgan | 417296c | 2002-04-02 00:49:05 +0000 | [diff] [blame] | 727 | unsigned int access; /* wanted access rights */ |
Alexandre Julliard | f2d7dd6 | 2005-12-09 12:13:11 +0100 | [diff] [blame] | 728 | unsigned int attributes; /* object attributes */ |
Chris Morgan | 417296c | 2002-04-02 00:49:05 +0000 | [diff] [blame] | 729 | @REPLY |
Alexandre Julliard | 5188574 | 2002-05-30 20:12:58 +0000 | [diff] [blame] | 730 | obj_handle_t handle; /* handle to the thread */ |
Chris Morgan | 417296c | 2002-04-02 00:49:05 +0000 | [diff] [blame] | 731 | @END |
| 732 | |
| 733 | |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 734 | /* Wait for handles */ |
| 735 | @REQ(select) |
| 736 | int flags; /* wait flags (see below) */ |
| 737 | void* cookie; /* magic cookie to return to client */ |
Mike McCormack | f92fff6 | 2005-04-24 17:35:52 +0000 | [diff] [blame] | 738 | obj_handle_t signal; /* object to signal (0 if none) */ |
Alexandre Julliard | aaf477f | 2007-04-17 20:08:59 +0200 | [diff] [blame] | 739 | timeout_t timeout; /* timeout */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 740 | VARARG(handles,handles); /* handles to select on */ |
Alexandre Julliard | aaf477f | 2007-04-17 20:08:59 +0200 | [diff] [blame] | 741 | @REPLY |
| 742 | timeout_t timeout; /* timeout converted to absolute */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 743 | @END |
| 744 | #define SELECT_ALL 1 |
| 745 | #define SELECT_ALERTABLE 2 |
| 746 | #define SELECT_INTERRUPTIBLE 4 |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 747 | |
| 748 | |
| 749 | /* Create an event */ |
| 750 | @REQ(create_event) |
Eric Pouech | 44158dd | 2004-12-02 18:05:37 +0000 | [diff] [blame] | 751 | unsigned int access; /* wanted access rights */ |
Vitaliy Margolen | a996000 | 2005-10-27 18:30:37 +0000 | [diff] [blame] | 752 | unsigned int attributes; /* object attributes */ |
Vitaliy Margolen | f676bc8 | 2005-12-02 15:55:48 +0100 | [diff] [blame] | 753 | obj_handle_t rootdir; /* root directory */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 754 | int manual_reset; /* manual reset event */ |
| 755 | int initial_state; /* initial state of the event */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 756 | VARARG(name,unicode_str); /* object name */ |
| 757 | @REPLY |
Alexandre Julliard | 5188574 | 2002-05-30 20:12:58 +0000 | [diff] [blame] | 758 | obj_handle_t handle; /* handle to the event */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 759 | @END |
| 760 | |
| 761 | /* Event operation */ |
| 762 | @REQ(event_op) |
Alexandre Julliard | 5188574 | 2002-05-30 20:12:58 +0000 | [diff] [blame] | 763 | obj_handle_t handle; /* handle to event */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 764 | int op; /* event operation (see below) */ |
| 765 | @END |
| 766 | enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT }; |
| 767 | |
| 768 | |
| 769 | /* Open an event */ |
| 770 | @REQ(open_event) |
| 771 | unsigned int access; /* wanted access rights */ |
Vitaliy Margolen | a996000 | 2005-10-27 18:30:37 +0000 | [diff] [blame] | 772 | unsigned int attributes; /* object attributes */ |
Vitaliy Margolen | f676bc8 | 2005-12-02 15:55:48 +0100 | [diff] [blame] | 773 | obj_handle_t rootdir; /* root directory */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 774 | VARARG(name,unicode_str); /* object name */ |
| 775 | @REPLY |
Alexandre Julliard | 5188574 | 2002-05-30 20:12:58 +0000 | [diff] [blame] | 776 | obj_handle_t handle; /* handle to the event */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 777 | @END |
| 778 | |
| 779 | |
| 780 | /* Create a mutex */ |
| 781 | @REQ(create_mutex) |
Eric Pouech | 44158dd | 2004-12-02 18:05:37 +0000 | [diff] [blame] | 782 | unsigned int access; /* wanted access rights */ |
Vitaliy Margolen | a996000 | 2005-10-27 18:30:37 +0000 | [diff] [blame] | 783 | unsigned int attributes; /* object attributes */ |
Vitaliy Margolen | f676bc8 | 2005-12-02 15:55:48 +0100 | [diff] [blame] | 784 | obj_handle_t rootdir; /* root directory */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 785 | int owned; /* initially owned? */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 786 | VARARG(name,unicode_str); /* object name */ |
| 787 | @REPLY |
Alexandre Julliard | 5188574 | 2002-05-30 20:12:58 +0000 | [diff] [blame] | 788 | obj_handle_t handle; /* handle to the mutex */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 789 | @END |
| 790 | |
| 791 | |
| 792 | /* Release a mutex */ |
| 793 | @REQ(release_mutex) |
Alexandre Julliard | 5188574 | 2002-05-30 20:12:58 +0000 | [diff] [blame] | 794 | obj_handle_t handle; /* handle to the mutex */ |
Eric Pouech | 44158dd | 2004-12-02 18:05:37 +0000 | [diff] [blame] | 795 | @REPLY |
| 796 | unsigned int prev_count; /* value of internal counter, before release */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 797 | @END |
| 798 | |
| 799 | |
| 800 | /* Open a mutex */ |
| 801 | @REQ(open_mutex) |
| 802 | unsigned int access; /* wanted access rights */ |
Vitaliy Margolen | a996000 | 2005-10-27 18:30:37 +0000 | [diff] [blame] | 803 | unsigned int attributes; /* object attributes */ |
Vitaliy Margolen | f676bc8 | 2005-12-02 15:55:48 +0100 | [diff] [blame] | 804 | obj_handle_t rootdir; /* root directory */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 805 | VARARG(name,unicode_str); /* object name */ |
| 806 | @REPLY |
Alexandre Julliard | 5188574 | 2002-05-30 20:12:58 +0000 | [diff] [blame] | 807 | obj_handle_t handle; /* handle to the mutex */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 808 | @END |
| 809 | |
| 810 | |
| 811 | /* Create a semaphore */ |
| 812 | @REQ(create_semaphore) |
Eric Pouech | 44158dd | 2004-12-02 18:05:37 +0000 | [diff] [blame] | 813 | unsigned int access; /* wanted access rights */ |
Vitaliy Margolen | a996000 | 2005-10-27 18:30:37 +0000 | [diff] [blame] | 814 | unsigned int attributes; /* object attributes */ |
Vitaliy Margolen | 5daae3d | 2005-12-02 16:01:17 +0100 | [diff] [blame] | 815 | obj_handle_t rootdir; /* root directory */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 816 | unsigned int initial; /* initial count */ |
| 817 | unsigned int max; /* maximum count */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 818 | VARARG(name,unicode_str); /* object name */ |
| 819 | @REPLY |
Alexandre Julliard | 5188574 | 2002-05-30 20:12:58 +0000 | [diff] [blame] | 820 | obj_handle_t handle; /* handle to the semaphore */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 821 | @END |
| 822 | |
| 823 | |
| 824 | /* Release a semaphore */ |
| 825 | @REQ(release_semaphore) |
Alexandre Julliard | 5188574 | 2002-05-30 20:12:58 +0000 | [diff] [blame] | 826 | obj_handle_t handle; /* handle to the semaphore */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 827 | unsigned int count; /* count to add to semaphore */ |
| 828 | @REPLY |
| 829 | unsigned int prev_count; /* previous semaphore count */ |
| 830 | @END |
| 831 | |
| 832 | |
| 833 | /* Open a semaphore */ |
| 834 | @REQ(open_semaphore) |
| 835 | unsigned int access; /* wanted access rights */ |
Vitaliy Margolen | a996000 | 2005-10-27 18:30:37 +0000 | [diff] [blame] | 836 | unsigned int attributes; /* object attributes */ |
Vitaliy Margolen | 5daae3d | 2005-12-02 16:01:17 +0100 | [diff] [blame] | 837 | obj_handle_t rootdir; /* root directory */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 838 | VARARG(name,unicode_str); /* object name */ |
| 839 | @REPLY |
Alexandre Julliard | 5188574 | 2002-05-30 20:12:58 +0000 | [diff] [blame] | 840 | obj_handle_t handle; /* handle to the semaphore */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 841 | @END |
| 842 | |
| 843 | |
| 844 | /* Create a file */ |
| 845 | @REQ(create_file) |
| 846 | unsigned int access; /* wanted access rights */ |
Alexandre Julliard | 27b1aec | 2005-12-09 12:00:48 +0100 | [diff] [blame] | 847 | unsigned int attributes; /* object attributes */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 848 | unsigned int sharing; /* sharing flags */ |
| 849 | int create; /* file create action */ |
Alexandre Julliard | 014099c | 2004-03-12 01:56:49 +0000 | [diff] [blame] | 850 | unsigned int options; /* file options */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 851 | unsigned int attrs; /* file attributes for creation */ |
| 852 | VARARG(filename,string); /* file name */ |
| 853 | @REPLY |
Alexandre Julliard | 5188574 | 2002-05-30 20:12:58 +0000 | [diff] [blame] | 854 | obj_handle_t handle; /* handle to the file */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 855 | @END |
| 856 | |
| 857 | |
Alexandre Julliard | 67505c0 | 2005-12-12 14:27:45 +0100 | [diff] [blame] | 858 | /* Open a file object */ |
| 859 | @REQ(open_file_object) |
| 860 | unsigned int access; /* wanted access rights */ |
| 861 | unsigned int attributes; /* open attributes */ |
| 862 | obj_handle_t rootdir; /* root directory */ |
| 863 | unsigned int sharing; /* sharing flags */ |
Alexandre Julliard | 94655c8 | 2007-03-22 11:52:40 +0100 | [diff] [blame] | 864 | unsigned int options; /* file options */ |
Alexandre Julliard | 67505c0 | 2005-12-12 14:27:45 +0100 | [diff] [blame] | 865 | VARARG(filename,unicode_str); /* file name */ |
| 866 | @REPLY |
| 867 | obj_handle_t handle; /* handle to the file */ |
| 868 | @END |
| 869 | |
| 870 | |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 871 | /* Allocate a file handle for a Unix fd */ |
| 872 | @REQ(alloc_file_handle) |
| 873 | unsigned int access; /* wanted access rights */ |
Alexandre Julliard | 27b1aec | 2005-12-09 12:00:48 +0100 | [diff] [blame] | 874 | unsigned int attributes; /* object attributes */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 875 | int fd; /* file descriptor on the client side */ |
| 876 | @REPLY |
Alexandre Julliard | 5188574 | 2002-05-30 20:12:58 +0000 | [diff] [blame] | 877 | obj_handle_t handle; /* handle to the file */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 878 | @END |
| 879 | |
| 880 | |
| 881 | /* Get a Unix fd to access a file */ |
| 882 | @REQ(get_handle_fd) |
Alexandre Julliard | 5188574 | 2002-05-30 20:12:58 +0000 | [diff] [blame] | 883 | obj_handle_t handle; /* handle to the file */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 884 | @REPLY |
Alexandre Julliard | 8930427 | 2006-11-20 14:14:04 +0100 | [diff] [blame] | 885 | int type; /* file type (see below) */ |
Alexandre Julliard | d85121f | 2007-04-10 22:32:46 +0200 | [diff] [blame] | 886 | int removable; /* is file removable? */ |
| 887 | unsigned int access; /* file access rights */ |
| 888 | unsigned int options; /* file open options */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 889 | @END |
Alexandre Julliard | 8930427 | 2006-11-20 14:14:04 +0100 | [diff] [blame] | 890 | enum server_fd_type |
| 891 | { |
| 892 | FD_TYPE_INVALID, /* invalid file (no associated fd) */ |
| 893 | FD_TYPE_FILE, /* regular file */ |
| 894 | FD_TYPE_DIR, /* directory */ |
| 895 | FD_TYPE_SOCKET, /* socket */ |
| 896 | FD_TYPE_SERIAL, /* serial port */ |
| 897 | FD_TYPE_PIPE, /* named pipe */ |
| 898 | FD_TYPE_MAILSLOT, /* mailslot */ |
Alexandre Julliard | 133b8bc | 2007-04-23 15:13:22 +0200 | [diff] [blame] | 899 | FD_TYPE_CHAR, /* unspecified char device */ |
Alexandre Julliard | 8930427 | 2006-11-20 14:14:04 +0100 | [diff] [blame] | 900 | FD_TYPE_DEVICE, /* Windows device file */ |
| 901 | FD_TYPE_NB_TYPES |
| 902 | }; |
Alexandre Julliard | d85121f | 2007-04-10 22:32:46 +0200 | [diff] [blame] | 903 | |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 904 | |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 905 | /* Flush a file buffers */ |
| 906 | @REQ(flush_file) |
Alexandre Julliard | 5188574 | 2002-05-30 20:12:58 +0000 | [diff] [blame] | 907 | obj_handle_t handle; /* handle to the file */ |
Mike McCormack | ef8b946 | 2003-05-15 04:22:45 +0000 | [diff] [blame] | 908 | @REPLY |
| 909 | obj_handle_t event; /* event set when finished */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 910 | @END |
| 911 | |
| 912 | |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 913 | /* Lock a region of a file */ |
| 914 | @REQ(lock_file) |
Alexandre Julliard | 5188574 | 2002-05-30 20:12:58 +0000 | [diff] [blame] | 915 | obj_handle_t handle; /* handle to the file */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 916 | unsigned int offset_low; /* offset of start of lock */ |
| 917 | unsigned int offset_high; /* offset of start of lock */ |
| 918 | unsigned int count_low; /* count of bytes to lock */ |
| 919 | unsigned int count_high; /* count of bytes to lock */ |
Alexandre Julliard | ce61349 | 2003-03-18 05:04:33 +0000 | [diff] [blame] | 920 | int shared; /* shared or exclusive lock? */ |
| 921 | int wait; /* do we want to wait? */ |
| 922 | @REPLY |
| 923 | obj_handle_t handle; /* handle to wait on */ |
| 924 | int overlapped; /* is it an overlapped I/O handle? */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 925 | @END |
| 926 | |
| 927 | |
| 928 | /* Unlock a region of a file */ |
| 929 | @REQ(unlock_file) |
Alexandre Julliard | 5188574 | 2002-05-30 20:12:58 +0000 | [diff] [blame] | 930 | obj_handle_t handle; /* handle to the file */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 931 | unsigned int offset_low; /* offset of start of unlock */ |
| 932 | unsigned int offset_high; /* offset of start of unlock */ |
| 933 | unsigned int count_low; /* count of bytes to unlock */ |
| 934 | unsigned int count_high; /* count of bytes to unlock */ |
| 935 | @END |
| 936 | |
| 937 | |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 938 | /* Create a socket */ |
| 939 | @REQ(create_socket) |
| 940 | unsigned int access; /* wanted access rights */ |
Alexandre Julliard | bc30303 | 2005-12-09 11:58:55 +0100 | [diff] [blame] | 941 | unsigned int attributes; /* object attributes */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 942 | int family; /* family, see socket manpage */ |
| 943 | int type; /* type, see socket manpage */ |
| 944 | int protocol; /* protocol, see socket manpage */ |
Martin Wilck | aa47705 | 2002-01-09 21:16:24 +0000 | [diff] [blame] | 945 | unsigned int flags; /* socket flags */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 946 | @REPLY |
Alexandre Julliard | 5188574 | 2002-05-30 20:12:58 +0000 | [diff] [blame] | 947 | obj_handle_t handle; /* handle to the new socket */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 948 | @END |
| 949 | |
| 950 | |
| 951 | /* Accept a socket */ |
| 952 | @REQ(accept_socket) |
Alexandre Julliard | 5188574 | 2002-05-30 20:12:58 +0000 | [diff] [blame] | 953 | obj_handle_t lhandle; /* handle to the listening socket */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 954 | unsigned int access; /* wanted access rights */ |
Alexandre Julliard | bc30303 | 2005-12-09 11:58:55 +0100 | [diff] [blame] | 955 | unsigned int attributes; /* object attributes */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 956 | @REPLY |
Alexandre Julliard | 5188574 | 2002-05-30 20:12:58 +0000 | [diff] [blame] | 957 | obj_handle_t handle; /* handle to the new socket */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 958 | @END |
| 959 | |
| 960 | |
| 961 | /* Set socket event parameters */ |
| 962 | @REQ(set_socket_event) |
Alexandre Julliard | 5188574 | 2002-05-30 20:12:58 +0000 | [diff] [blame] | 963 | obj_handle_t handle; /* handle to the socket */ |
Alexandre Julliard | 81f2a73 | 2002-03-23 20:43:52 +0000 | [diff] [blame] | 964 | unsigned int mask; /* event mask */ |
Alexandre Julliard | 5188574 | 2002-05-30 20:12:58 +0000 | [diff] [blame] | 965 | obj_handle_t event; /* event object */ |
Alexandre Julliard | 81f2a73 | 2002-03-23 20:43:52 +0000 | [diff] [blame] | 966 | user_handle_t window; /* window to send the message to */ |
| 967 | unsigned int msg; /* message to send */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 968 | @END |
| 969 | |
| 970 | |
| 971 | /* Get socket event parameters */ |
| 972 | @REQ(get_socket_event) |
Alexandre Julliard | 5188574 | 2002-05-30 20:12:58 +0000 | [diff] [blame] | 973 | obj_handle_t handle; /* handle to the socket */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 974 | int service; /* clear pending? */ |
Alexandre Julliard | 5188574 | 2002-05-30 20:12:58 +0000 | [diff] [blame] | 975 | obj_handle_t c_event; /* event to clear */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 976 | @REPLY |
| 977 | unsigned int mask; /* event mask */ |
| 978 | unsigned int pmask; /* pending events */ |
| 979 | unsigned int state; /* status bits */ |
| 980 | VARARG(errors,ints); /* event errors */ |
| 981 | @END |
| 982 | |
| 983 | |
| 984 | /* Reenable pending socket events */ |
| 985 | @REQ(enable_socket_event) |
Alexandre Julliard | 5188574 | 2002-05-30 20:12:58 +0000 | [diff] [blame] | 986 | obj_handle_t handle; /* handle to the socket */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 987 | unsigned int mask; /* events to re-enable */ |
| 988 | unsigned int sstate; /* status bits to set */ |
| 989 | unsigned int cstate; /* status bits to clear */ |
| 990 | @END |
| 991 | |
Martin Wilck | d15bf1c | 2002-04-23 22:03:42 +0000 | [diff] [blame] | 992 | @REQ(set_socket_deferred) |
Alexandre Julliard | 5188574 | 2002-05-30 20:12:58 +0000 | [diff] [blame] | 993 | obj_handle_t handle; /* handle to the socket */ |
| 994 | obj_handle_t deferred; /* handle to the socket for which accept() is deferred */ |
Martin Wilck | d15bf1c | 2002-04-23 22:03:42 +0000 | [diff] [blame] | 995 | @END |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 996 | |
Eric Pouech | 0b83d4c | 2001-11-23 23:04:58 +0000 | [diff] [blame] | 997 | /* Allocate a console (only used by a console renderer) */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 998 | @REQ(alloc_console) |
| 999 | unsigned int access; /* wanted access rights */ |
Alexandre Julliard | 7a09660 | 2005-12-09 12:05:20 +0100 | [diff] [blame] | 1000 | unsigned int attributes; /* object attributes */ |
Alexandre Julliard | 54f2287 | 2002-10-03 19:54:57 +0000 | [diff] [blame] | 1001 | process_id_t pid; /* pid of process which shall be attached to the console */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 1002 | @REPLY |
Alexandre Julliard | 5188574 | 2002-05-30 20:12:58 +0000 | [diff] [blame] | 1003 | obj_handle_t handle_in; /* handle to console input */ |
| 1004 | obj_handle_t event; /* handle to renderer events change notification */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 1005 | @END |
| 1006 | |
| 1007 | |
| 1008 | /* Free the console of the current process */ |
| 1009 | @REQ(free_console) |
| 1010 | @END |
| 1011 | |
| 1012 | |
Eric Pouech | 0b83d4c | 2001-11-23 23:04:58 +0000 | [diff] [blame] | 1013 | #define CONSOLE_RENDERER_NONE_EVENT 0x00 |
| 1014 | #define CONSOLE_RENDERER_TITLE_EVENT 0x01 |
| 1015 | #define CONSOLE_RENDERER_ACTIVE_SB_EVENT 0x02 |
| 1016 | #define CONSOLE_RENDERER_SB_RESIZE_EVENT 0x03 |
| 1017 | #define CONSOLE_RENDERER_UPDATE_EVENT 0x04 |
| 1018 | #define CONSOLE_RENDERER_CURSOR_POS_EVENT 0x05 |
| 1019 | #define CONSOLE_RENDERER_CURSOR_GEOM_EVENT 0x06 |
| 1020 | #define CONSOLE_RENDERER_DISPLAY_EVENT 0x07 |
| 1021 | #define CONSOLE_RENDERER_EXIT_EVENT 0x08 |
| 1022 | struct console_renderer_event |
| 1023 | { |
| 1024 | short event; |
| 1025 | union |
| 1026 | { |
| 1027 | struct update |
| 1028 | { |
| 1029 | short top; |
| 1030 | short bottom; |
| 1031 | } update; |
| 1032 | struct resize |
| 1033 | { |
| 1034 | short width; |
| 1035 | short height; |
| 1036 | } resize; |
| 1037 | struct cursor_pos |
| 1038 | { |
| 1039 | short x; |
| 1040 | short y; |
| 1041 | } cursor_pos; |
| 1042 | struct cursor_geom |
| 1043 | { |
| 1044 | short visible; |
| 1045 | short size; |
| 1046 | } cursor_geom; |
| 1047 | struct display |
| 1048 | { |
| 1049 | short left; |
| 1050 | short top; |
| 1051 | short width; |
| 1052 | short height; |
| 1053 | } display; |
| 1054 | } u; |
| 1055 | }; |
| 1056 | |
| 1057 | /* retrieve console events for the renderer */ |
| 1058 | @REQ(get_console_renderer_events) |
Alexandre Julliard | 5188574 | 2002-05-30 20:12:58 +0000 | [diff] [blame] | 1059 | obj_handle_t handle; /* handle to console input events */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 1060 | @REPLY |
Eric Pouech | 0b83d4c | 2001-11-23 23:04:58 +0000 | [diff] [blame] | 1061 | VARARG(data,bytes); /* the various console_renderer_events */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 1062 | @END |
| 1063 | |
| 1064 | |
Eric Pouech | 0b83d4c | 2001-11-23 23:04:58 +0000 | [diff] [blame] | 1065 | /* Open a handle to the process console */ |
| 1066 | @REQ(open_console) |
Mike McCormack | fac494c | 2006-06-07 18:33:46 +0900 | [diff] [blame] | 1067 | obj_handle_t from; /* 0 (resp 1) input (resp output) of current process console */ |
Eric Pouech | 0b83d4c | 2001-11-23 23:04:58 +0000 | [diff] [blame] | 1068 | /* otherwise console_in handle to get active screen buffer? */ |
| 1069 | unsigned int access; /* wanted access rights */ |
Alexandre Julliard | 7a09660 | 2005-12-09 12:05:20 +0100 | [diff] [blame] | 1070 | unsigned int attributes; /* object attributes */ |
Eric Pouech | 0b83d4c | 2001-11-23 23:04:58 +0000 | [diff] [blame] | 1071 | int share; /* share mask (only for output handles) */ |
| 1072 | @REPLY |
Alexandre Julliard | 5188574 | 2002-05-30 20:12:58 +0000 | [diff] [blame] | 1073 | obj_handle_t handle; /* handle to the console */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 1074 | @END |
| 1075 | |
| 1076 | |
Eric Pouech | 412d37f | 2003-06-21 02:07:10 +0000 | [diff] [blame] | 1077 | /* Get the input queue wait event */ |
| 1078 | @REQ(get_console_wait_event) |
| 1079 | @REPLY |
| 1080 | obj_handle_t handle; |
| 1081 | @END |
| 1082 | |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 1083 | /* Get a console mode (input or output) */ |
| 1084 | @REQ(get_console_mode) |
Alexandre Julliard | 5188574 | 2002-05-30 20:12:58 +0000 | [diff] [blame] | 1085 | obj_handle_t handle; /* handle to the console */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 1086 | @REPLY |
| 1087 | int mode; /* console mode */ |
| 1088 | @END |
| 1089 | |
| 1090 | |
| 1091 | /* Set a console mode (input or output) */ |
| 1092 | @REQ(set_console_mode) |
Alexandre Julliard | 5188574 | 2002-05-30 20:12:58 +0000 | [diff] [blame] | 1093 | obj_handle_t handle; /* handle to the console */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 1094 | int mode; /* console mode */ |
| 1095 | @END |
| 1096 | |
| 1097 | |
Eric Pouech | 0b83d4c | 2001-11-23 23:04:58 +0000 | [diff] [blame] | 1098 | /* Set info about a console (input only) */ |
| 1099 | @REQ(set_console_input_info) |
Alexandre Julliard | 5188574 | 2002-05-30 20:12:58 +0000 | [diff] [blame] | 1100 | obj_handle_t handle; /* handle to console input, or 0 for process' console */ |
Eric Pouech | 0b83d4c | 2001-11-23 23:04:58 +0000 | [diff] [blame] | 1101 | int mask; /* setting mask (see below) */ |
Alexandre Julliard | 5188574 | 2002-05-30 20:12:58 +0000 | [diff] [blame] | 1102 | obj_handle_t active_sb; /* active screen buffer */ |
Eric Pouech | 0b83d4c | 2001-11-23 23:04:58 +0000 | [diff] [blame] | 1103 | int history_mode; /* whether we duplicate lines in history */ |
| 1104 | int history_size; /* number of lines in history */ |
Eric Pouech | fa8b85a | 2003-01-09 06:01:32 +0000 | [diff] [blame] | 1105 | int edition_mode; /* index to the edition mode flavors */ |
Kirill K. Smirnov | 9d74661 | 2007-05-10 21:19:47 +0400 | [diff] [blame] | 1106 | int input_cp; /* console input codepage */ |
| 1107 | int output_cp; /* console output codepage */ |
Eric Pouech | 0b83d4c | 2001-11-23 23:04:58 +0000 | [diff] [blame] | 1108 | VARARG(title,unicode_str); /* console title */ |
| 1109 | @END |
| 1110 | #define SET_CONSOLE_INPUT_INFO_ACTIVE_SB 0x01 |
| 1111 | #define SET_CONSOLE_INPUT_INFO_TITLE 0x02 |
| 1112 | #define SET_CONSOLE_INPUT_INFO_HISTORY_MODE 0x04 |
| 1113 | #define SET_CONSOLE_INPUT_INFO_HISTORY_SIZE 0x08 |
Eric Pouech | fa8b85a | 2003-01-09 06:01:32 +0000 | [diff] [blame] | 1114 | #define SET_CONSOLE_INPUT_INFO_EDITION_MODE 0x10 |
Kirill K. Smirnov | 9d74661 | 2007-05-10 21:19:47 +0400 | [diff] [blame] | 1115 | #define SET_CONSOLE_INPUT_INFO_INPUT_CODEPAGE 0x20 |
| 1116 | #define SET_CONSOLE_INPUT_INFO_OUTPUT_CODEPAGE 0x40 |
Eric Pouech | 0b83d4c | 2001-11-23 23:04:58 +0000 | [diff] [blame] | 1117 | |
| 1118 | |
| 1119 | /* Get info about a console (input only) */ |
| 1120 | @REQ(get_console_input_info) |
Alexandre Julliard | 5188574 | 2002-05-30 20:12:58 +0000 | [diff] [blame] | 1121 | obj_handle_t handle; /* handle to console input, or 0 for process' console */ |
Eric Pouech | 0b83d4c | 2001-11-23 23:04:58 +0000 | [diff] [blame] | 1122 | @REPLY |
| 1123 | int history_mode; /* whether we duplicate lines in history */ |
| 1124 | int history_size; /* number of lines in history */ |
| 1125 | int history_index; /* number of used lines in history */ |
Eric Pouech | fa8b85a | 2003-01-09 06:01:32 +0000 | [diff] [blame] | 1126 | int edition_mode; /* index to the edition mode flavors */ |
Kirill K. Smirnov | 9d74661 | 2007-05-10 21:19:47 +0400 | [diff] [blame] | 1127 | int input_cp; /* console input codepage */ |
| 1128 | int output_cp; /* console output codepage */ |
Eric Pouech | 0b83d4c | 2001-11-23 23:04:58 +0000 | [diff] [blame] | 1129 | VARARG(title,unicode_str); /* console title */ |
| 1130 | @END |
| 1131 | |
| 1132 | |
| 1133 | /* appends a string to console's history */ |
| 1134 | @REQ(append_console_input_history) |
Alexandre Julliard | 5188574 | 2002-05-30 20:12:58 +0000 | [diff] [blame] | 1135 | obj_handle_t handle; /* handle to console input, or 0 for process' console */ |
Eric Pouech | 0b83d4c | 2001-11-23 23:04:58 +0000 | [diff] [blame] | 1136 | VARARG(line,unicode_str); /* line to add */ |
| 1137 | @END |
| 1138 | |
| 1139 | |
| 1140 | /* appends a string to console's history */ |
| 1141 | @REQ(get_console_input_history) |
Alexandre Julliard | 5188574 | 2002-05-30 20:12:58 +0000 | [diff] [blame] | 1142 | obj_handle_t handle; /* handle to console input, or 0 for process' console */ |
Eric Pouech | 0b83d4c | 2001-11-23 23:04:58 +0000 | [diff] [blame] | 1143 | int index; /* index to get line from */ |
| 1144 | @REPLY |
Alexandre Julliard | 9caa71e | 2001-11-30 18:46:42 +0000 | [diff] [blame] | 1145 | int total; /* total length of line in Unicode chars */ |
Eric Pouech | 0b83d4c | 2001-11-23 23:04:58 +0000 | [diff] [blame] | 1146 | VARARG(line,unicode_str); /* line to add */ |
| 1147 | @END |
| 1148 | |
| 1149 | |
| 1150 | /* creates a new screen buffer on process' console */ |
| 1151 | @REQ(create_console_output) |
Alexandre Julliard | 5188574 | 2002-05-30 20:12:58 +0000 | [diff] [blame] | 1152 | obj_handle_t handle_in; /* handle to console input, or 0 for process' console */ |
Alexandre Julliard | 7a09660 | 2005-12-09 12:05:20 +0100 | [diff] [blame] | 1153 | unsigned int access; /* wanted access rights */ |
| 1154 | unsigned int attributes; /* object attributes */ |
| 1155 | unsigned int share; /* sharing credentials */ |
Eric Pouech | 0b83d4c | 2001-11-23 23:04:58 +0000 | [diff] [blame] | 1156 | @REPLY |
Alexandre Julliard | 5188574 | 2002-05-30 20:12:58 +0000 | [diff] [blame] | 1157 | obj_handle_t handle_out; /* handle to the screen buffer */ |
Eric Pouech | 0b83d4c | 2001-11-23 23:04:58 +0000 | [diff] [blame] | 1158 | @END |
| 1159 | |
| 1160 | |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 1161 | /* Set info about a console (output only) */ |
Eric Pouech | 0b83d4c | 2001-11-23 23:04:58 +0000 | [diff] [blame] | 1162 | @REQ(set_console_output_info) |
Alexandre Julliard | 5188574 | 2002-05-30 20:12:58 +0000 | [diff] [blame] | 1163 | obj_handle_t handle; /* handle to the console */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 1164 | int mask; /* setting mask (see below) */ |
Eric Pouech | 0b83d4c | 2001-11-23 23:04:58 +0000 | [diff] [blame] | 1165 | short int cursor_size; /* size of cursor (percentage filled) */ |
| 1166 | short int cursor_visible;/* cursor visibility flag */ |
| 1167 | short int cursor_x; /* position of cursor (x, y) */ |
| 1168 | short int cursor_y; |
| 1169 | short int width; /* width of the screen buffer */ |
| 1170 | short int height; /* height of the screen buffer */ |
| 1171 | short int attr; /* default attribute */ |
| 1172 | short int win_left; /* window actually displayed by renderer */ |
| 1173 | short int win_top; /* the rect area is expressed withing the */ |
| 1174 | short int win_right; /* boundaries of the screen buffer */ |
| 1175 | short int win_bottom; |
| 1176 | short int max_width; /* maximum size (width x height) for the window */ |
| 1177 | short int max_height; |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 1178 | @END |
Eric Pouech | 0b83d4c | 2001-11-23 23:04:58 +0000 | [diff] [blame] | 1179 | #define SET_CONSOLE_OUTPUT_INFO_CURSOR_GEOM 0x01 |
| 1180 | #define SET_CONSOLE_OUTPUT_INFO_CURSOR_POS 0x02 |
| 1181 | #define SET_CONSOLE_OUTPUT_INFO_SIZE 0x04 |
| 1182 | #define SET_CONSOLE_OUTPUT_INFO_ATTR 0x08 |
| 1183 | #define SET_CONSOLE_OUTPUT_INFO_DISPLAY_WINDOW 0x10 |
| 1184 | #define SET_CONSOLE_OUTPUT_INFO_MAX_SIZE 0x20 |
| 1185 | |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 1186 | |
| 1187 | /* Get info about a console (output only) */ |
Eric Pouech | 0b83d4c | 2001-11-23 23:04:58 +0000 | [diff] [blame] | 1188 | @REQ(get_console_output_info) |
Alexandre Julliard | 5188574 | 2002-05-30 20:12:58 +0000 | [diff] [blame] | 1189 | obj_handle_t handle; /* handle to the console */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 1190 | @REPLY |
Eric Pouech | 0b83d4c | 2001-11-23 23:04:58 +0000 | [diff] [blame] | 1191 | short int cursor_size; /* size of cursor (percentage filled) */ |
| 1192 | short int cursor_visible;/* cursor visibility flag */ |
| 1193 | short int cursor_x; /* position of cursor (x, y) */ |
| 1194 | short int cursor_y; |
| 1195 | short int width; /* width of the screen buffer */ |
| 1196 | short int height; /* height of the screen buffer */ |
| 1197 | short int attr; /* default attribute */ |
| 1198 | short int win_left; /* window actually displayed by renderer */ |
| 1199 | short int win_top; /* the rect area is expressed withing the */ |
| 1200 | short int win_right; /* boundaries of the screen buffer */ |
| 1201 | short int win_bottom; |
| 1202 | short int max_width; /* maximum size (width x height) for the window */ |
| 1203 | short int max_height; |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 1204 | @END |
| 1205 | |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 1206 | /* Add input records to a console input queue */ |
| 1207 | @REQ(write_console_input) |
Alexandre Julliard | 5188574 | 2002-05-30 20:12:58 +0000 | [diff] [blame] | 1208 | obj_handle_t handle; /* handle to the console input */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 1209 | VARARG(rec,input_records); /* input records */ |
| 1210 | @REPLY |
| 1211 | int written; /* number of records written */ |
| 1212 | @END |
| 1213 | |
Eric Pouech | 0b83d4c | 2001-11-23 23:04:58 +0000 | [diff] [blame] | 1214 | |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 1215 | /* Fetch input records from a console input queue */ |
| 1216 | @REQ(read_console_input) |
Alexandre Julliard | 5188574 | 2002-05-30 20:12:58 +0000 | [diff] [blame] | 1217 | obj_handle_t handle; /* handle to the console input */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 1218 | int flush; /* flush the retrieved records from the queue? */ |
| 1219 | @REPLY |
| 1220 | int read; /* number of records read */ |
| 1221 | VARARG(rec,input_records); /* input records */ |
| 1222 | @END |
| 1223 | |
| 1224 | |
Eric Pouech | 0b83d4c | 2001-11-23 23:04:58 +0000 | [diff] [blame] | 1225 | /* write data (chars and/or attributes) in a screen buffer */ |
| 1226 | @REQ(write_console_output) |
Alexandre Julliard | 5188574 | 2002-05-30 20:12:58 +0000 | [diff] [blame] | 1227 | obj_handle_t handle; /* handle to the console output */ |
Alexandre Julliard | 9caa71e | 2001-11-30 18:46:42 +0000 | [diff] [blame] | 1228 | int x; /* position where to start writing */ |
| 1229 | int y; |
| 1230 | int mode; /* char info (see below) */ |
| 1231 | int wrap; /* wrap around at end of line? */ |
Eric Pouech | 0b83d4c | 2001-11-23 23:04:58 +0000 | [diff] [blame] | 1232 | VARARG(data,bytes); /* info to write */ |
| 1233 | @REPLY |
Alexandre Julliard | 9caa71e | 2001-11-30 18:46:42 +0000 | [diff] [blame] | 1234 | int written; /* number of char infos actually written */ |
| 1235 | int width; /* width of screen buffer */ |
| 1236 | int height; /* height of screen buffer */ |
Eric Pouech | 0b83d4c | 2001-11-23 23:04:58 +0000 | [diff] [blame] | 1237 | @END |
Alexandre Julliard | 9caa71e | 2001-11-30 18:46:42 +0000 | [diff] [blame] | 1238 | enum char_info_mode |
| 1239 | { |
| 1240 | CHAR_INFO_MODE_TEXT, /* characters only */ |
| 1241 | CHAR_INFO_MODE_ATTR, /* attributes only */ |
| 1242 | CHAR_INFO_MODE_TEXTATTR, /* both characters and attributes */ |
| 1243 | CHAR_INFO_MODE_TEXTSTDATTR /* characters but use standard attributes */ |
| 1244 | }; |
Eric Pouech | 0b83d4c | 2001-11-23 23:04:58 +0000 | [diff] [blame] | 1245 | |
| 1246 | |
Alexandre Julliard | 9caa71e | 2001-11-30 18:46:42 +0000 | [diff] [blame] | 1247 | /* fill a screen buffer with constant data (chars and/or attributes) */ |
| 1248 | @REQ(fill_console_output) |
Alexandre Julliard | 5188574 | 2002-05-30 20:12:58 +0000 | [diff] [blame] | 1249 | obj_handle_t handle; /* handle to the console output */ |
Alexandre Julliard | 9caa71e | 2001-11-30 18:46:42 +0000 | [diff] [blame] | 1250 | int x; /* position where to start writing */ |
| 1251 | int y; |
| 1252 | int mode; /* char info mode */ |
| 1253 | int count; /* number to write */ |
| 1254 | int wrap; /* wrap around at end of line? */ |
| 1255 | char_info_t data; /* data to write */ |
Eric Pouech | 0b83d4c | 2001-11-23 23:04:58 +0000 | [diff] [blame] | 1256 | @REPLY |
Alexandre Julliard | 9caa71e | 2001-11-30 18:46:42 +0000 | [diff] [blame] | 1257 | int written; /* number of char infos actually written */ |
| 1258 | @END |
| 1259 | |
| 1260 | |
| 1261 | /* read data (chars and/or attributes) from a screen buffer */ |
| 1262 | @REQ(read_console_output) |
Alexandre Julliard | 5188574 | 2002-05-30 20:12:58 +0000 | [diff] [blame] | 1263 | obj_handle_t handle; /* handle to the console output */ |
Alexandre Julliard | 9caa71e | 2001-11-30 18:46:42 +0000 | [diff] [blame] | 1264 | int x; /* position (x,y) where to start reading */ |
| 1265 | int y; |
| 1266 | int mode; /* char info mode */ |
| 1267 | int wrap; /* wrap around at end of line? */ |
| 1268 | @REPLY |
| 1269 | int width; /* width of screen buffer */ |
| 1270 | int height; /* height of screen buffer */ |
Eric Pouech | 0b83d4c | 2001-11-23 23:04:58 +0000 | [diff] [blame] | 1271 | VARARG(data,bytes); |
| 1272 | @END |
| 1273 | |
Eric Pouech | 93bfa0d | 2002-06-02 21:22:22 +0000 | [diff] [blame] | 1274 | |
Eric Pouech | 0b83d4c | 2001-11-23 23:04:58 +0000 | [diff] [blame] | 1275 | /* move a rect (of data) in screen buffer content */ |
| 1276 | @REQ(move_console_output) |
Alexandre Julliard | 5188574 | 2002-05-30 20:12:58 +0000 | [diff] [blame] | 1277 | obj_handle_t handle; /* handle to the console output */ |
Eric Pouech | 0b83d4c | 2001-11-23 23:04:58 +0000 | [diff] [blame] | 1278 | short int x_src; /* position (x, y) of rect to start moving from */ |
| 1279 | short int y_src; |
| 1280 | short int x_dst; /* position (x, y) of rect to move to */ |
| 1281 | short int y_dst; |
| 1282 | short int w; /* size of the rect (width, height) to move */ |
| 1283 | short int h; |
| 1284 | @END |
| 1285 | |
| 1286 | |
Eric Pouech | 93bfa0d | 2002-06-02 21:22:22 +0000 | [diff] [blame] | 1287 | /* Sends a signal to a process group */ |
| 1288 | @REQ(send_console_signal) |
| 1289 | int signal; /* the signal to send */ |
Alexandre Julliard | 54f2287 | 2002-10-03 19:54:57 +0000 | [diff] [blame] | 1290 | process_id_t group_id; /* the group to send the signal to */ |
Eric Pouech | 93bfa0d | 2002-06-02 21:22:22 +0000 | [diff] [blame] | 1291 | @END |
| 1292 | |
| 1293 | |
Mike McCormack | 0835107 | 2006-01-27 12:13:56 +0100 | [diff] [blame] | 1294 | /* enable directory change notifications */ |
| 1295 | @REQ(read_directory_changes) |
Alexandre Julliard | e0dcf4f | 2006-10-04 21:41:32 +0200 | [diff] [blame] | 1296 | unsigned int filter; /* notification filter */ |
Alexandre Julliard | 3e588e3 | 2003-03-26 23:41:43 +0000 | [diff] [blame] | 1297 | obj_handle_t handle; /* handle to the directory */ |
Mike McCormack | e4faabf | 2006-02-21 16:58:19 +0900 | [diff] [blame] | 1298 | int subtree; /* watch the subtree? */ |
Mike McCormack | 0790f95 | 2006-02-07 16:50:36 +0100 | [diff] [blame] | 1299 | int want_data; /* flag indicating whether change data should be collected */ |
Alexandre Julliard | 111610c | 2007-03-20 20:21:12 +0100 | [diff] [blame] | 1300 | async_data_t async; /* async I/O parameters */ |
Mike McCormack | 0193211 | 2006-02-06 11:58:55 +0100 | [diff] [blame] | 1301 | @END |
| 1302 | |
| 1303 | |
| 1304 | @REQ(read_change) |
| 1305 | obj_handle_t handle; |
| 1306 | @REPLY |
| 1307 | int action; /* type of change */ |
| 1308 | VARARG(name,string); /* name of directory entry that changed */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 1309 | @END |
| 1310 | |
| 1311 | |
| 1312 | /* Create a file mapping */ |
| 1313 | @REQ(create_mapping) |
Vitaliy Margolen | a996000 | 2005-10-27 18:30:37 +0000 | [diff] [blame] | 1314 | unsigned int access; /* wanted access rights */ |
| 1315 | unsigned int attributes; /* object attributes */ |
Vitaliy Margolen | 348a3d9 | 2005-12-02 16:13:13 +0100 | [diff] [blame] | 1316 | obj_handle_t rootdir; /* root directory */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 1317 | int size_high; /* mapping size */ |
| 1318 | int size_low; /* mapping size */ |
| 1319 | int protect; /* protection flags (see below) */ |
Alexandre Julliard | 5188574 | 2002-05-30 20:12:58 +0000 | [diff] [blame] | 1320 | obj_handle_t file_handle; /* file handle */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 1321 | VARARG(name,unicode_str); /* object name */ |
| 1322 | @REPLY |
Alexandre Julliard | 5188574 | 2002-05-30 20:12:58 +0000 | [diff] [blame] | 1323 | obj_handle_t handle; /* handle to the mapping */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 1324 | @END |
| 1325 | /* protection flags */ |
| 1326 | #define VPROT_READ 0x01 |
| 1327 | #define VPROT_WRITE 0x02 |
| 1328 | #define VPROT_EXEC 0x04 |
| 1329 | #define VPROT_WRITECOPY 0x08 |
| 1330 | #define VPROT_GUARD 0x10 |
| 1331 | #define VPROT_NOCACHE 0x20 |
| 1332 | #define VPROT_COMMITTED 0x40 |
| 1333 | #define VPROT_IMAGE 0x80 |
| 1334 | |
| 1335 | |
| 1336 | /* Open a mapping */ |
| 1337 | @REQ(open_mapping) |
| 1338 | unsigned int access; /* wanted access rights */ |
Vitaliy Margolen | a996000 | 2005-10-27 18:30:37 +0000 | [diff] [blame] | 1339 | unsigned int attributes; /* object attributes */ |
Vitaliy Margolen | 348a3d9 | 2005-12-02 16:13:13 +0100 | [diff] [blame] | 1340 | obj_handle_t rootdir; /* root directory */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 1341 | VARARG(name,unicode_str); /* object name */ |
| 1342 | @REPLY |
Alexandre Julliard | 5188574 | 2002-05-30 20:12:58 +0000 | [diff] [blame] | 1343 | obj_handle_t handle; /* handle to the mapping */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 1344 | @END |
| 1345 | |
| 1346 | |
| 1347 | /* Get information about a file mapping */ |
| 1348 | @REQ(get_mapping_info) |
Alexandre Julliard | 5188574 | 2002-05-30 20:12:58 +0000 | [diff] [blame] | 1349 | obj_handle_t handle; /* handle to the mapping */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 1350 | @REPLY |
| 1351 | int size_high; /* mapping size */ |
| 1352 | int size_low; /* mapping size */ |
| 1353 | int protect; /* protection flags */ |
| 1354 | int header_size; /* header size (for VPROT_IMAGE mapping) */ |
| 1355 | void* base; /* default base addr (for VPROT_IMAGE mapping) */ |
Alexandre Julliard | 4cbe867 | 2007-01-12 14:55:31 +0100 | [diff] [blame] | 1356 | obj_handle_t mapping; /* duplicate mapping handle unless removable */ |
Alexandre Julliard | 5188574 | 2002-05-30 20:12:58 +0000 | [diff] [blame] | 1357 | obj_handle_t shared_file; /* shared mapping file handle */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 1358 | int shared_size; /* shared mapping size */ |
| 1359 | @END |
| 1360 | |
| 1361 | |
Eric Pouech | 2359b57 | 2003-01-09 00:01:28 +0000 | [diff] [blame] | 1362 | #define SNAP_HEAPLIST 0x00000001 |
| 1363 | #define SNAP_PROCESS 0x00000002 |
| 1364 | #define SNAP_THREAD 0x00000004 |
| 1365 | #define SNAP_MODULE 0x00000008 |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 1366 | /* Create a snapshot */ |
| 1367 | @REQ(create_snapshot) |
Alexandre Julliard | f11d0a3 | 2005-12-09 12:09:44 +0100 | [diff] [blame] | 1368 | unsigned int attributes; /* object attributes */ |
Eric Pouech | 2359b57 | 2003-01-09 00:01:28 +0000 | [diff] [blame] | 1369 | int flags; /* snapshot flags (SNAP_*) */ |
Alexandre Julliard | 54f2287 | 2002-10-03 19:54:57 +0000 | [diff] [blame] | 1370 | process_id_t pid; /* process id */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 1371 | @REPLY |
Alexandre Julliard | 5188574 | 2002-05-30 20:12:58 +0000 | [diff] [blame] | 1372 | obj_handle_t handle; /* handle to the snapshot */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 1373 | @END |
| 1374 | |
| 1375 | |
| 1376 | /* Get the next process from a snapshot */ |
| 1377 | @REQ(next_process) |
Alexandre Julliard | 5188574 | 2002-05-30 20:12:58 +0000 | [diff] [blame] | 1378 | obj_handle_t handle; /* handle to the snapshot */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 1379 | int reset; /* reset snapshot position? */ |
| 1380 | @REPLY |
| 1381 | int count; /* process usage count */ |
Alexandre Julliard | 54f2287 | 2002-10-03 19:54:57 +0000 | [diff] [blame] | 1382 | process_id_t pid; /* process id */ |
| 1383 | process_id_t ppid; /* parent process id */ |
Alexandre Julliard | aeb5660 | 2002-03-22 00:21:23 +0000 | [diff] [blame] | 1384 | void* heap; /* heap base */ |
| 1385 | void* module; /* main module */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 1386 | int threads; /* number of threads */ |
| 1387 | int priority; /* process priority */ |
Eric Pouech | 9fd54b2 | 2003-09-16 01:07:21 +0000 | [diff] [blame] | 1388 | int handles; /* number of handles */ |
Alexandre Julliard | c30cefb | 2003-09-30 01:04:19 +0000 | [diff] [blame] | 1389 | VARARG(filename,unicode_str); /* file name of main exe */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 1390 | @END |
| 1391 | |
| 1392 | |
| 1393 | /* Get the next thread from a snapshot */ |
| 1394 | @REQ(next_thread) |
Alexandre Julliard | 5188574 | 2002-05-30 20:12:58 +0000 | [diff] [blame] | 1395 | obj_handle_t handle; /* handle to the snapshot */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 1396 | int reset; /* reset snapshot position? */ |
| 1397 | @REPLY |
| 1398 | int count; /* thread usage count */ |
Alexandre Julliard | 54f2287 | 2002-10-03 19:54:57 +0000 | [diff] [blame] | 1399 | process_id_t pid; /* process id */ |
| 1400 | thread_id_t tid; /* thread id */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 1401 | int base_pri; /* base priority */ |
| 1402 | int delta_pri; /* delta priority */ |
| 1403 | @END |
| 1404 | |
| 1405 | |
| 1406 | /* Get the next module from a snapshot */ |
| 1407 | @REQ(next_module) |
Alexandre Julliard | 5188574 | 2002-05-30 20:12:58 +0000 | [diff] [blame] | 1408 | obj_handle_t handle; /* handle to the snapshot */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 1409 | int reset; /* reset snapshot position? */ |
| 1410 | @REPLY |
Alexandre Julliard | 54f2287 | 2002-10-03 19:54:57 +0000 | [diff] [blame] | 1411 | process_id_t pid; /* process id */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 1412 | void* base; /* module base address */ |
Alexandre Julliard | aeb5660 | 2002-03-22 00:21:23 +0000 | [diff] [blame] | 1413 | size_t size; /* module size */ |
Alexandre Julliard | c30cefb | 2003-09-30 01:04:19 +0000 | [diff] [blame] | 1414 | VARARG(filename,unicode_str); /* file name of module */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 1415 | @END |
| 1416 | |
| 1417 | |
| 1418 | /* Wait for a debug event */ |
| 1419 | @REQ(wait_debug_event) |
| 1420 | int get_handle; /* should we alloc a handle for waiting? */ |
| 1421 | @REPLY |
Alexandre Julliard | 54f2287 | 2002-10-03 19:54:57 +0000 | [diff] [blame] | 1422 | process_id_t pid; /* process id */ |
| 1423 | thread_id_t tid; /* thread id */ |
Alexandre Julliard | 5188574 | 2002-05-30 20:12:58 +0000 | [diff] [blame] | 1424 | obj_handle_t wait; /* wait handle if no event ready */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 1425 | VARARG(event,debug_event); /* debug event data */ |
| 1426 | @END |
| 1427 | |
| 1428 | |
| 1429 | /* Queue an exception event */ |
| 1430 | @REQ(queue_exception_event) |
| 1431 | int first; /* first chance exception? */ |
| 1432 | VARARG(record,exc_event); /* thread context followed by exception record */ |
| 1433 | @REPLY |
Alexandre Julliard | 5188574 | 2002-05-30 20:12:58 +0000 | [diff] [blame] | 1434 | obj_handle_t handle; /* handle to the queued event */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 1435 | @END |
| 1436 | |
| 1437 | |
| 1438 | /* Retrieve the status of an exception event */ |
| 1439 | @REQ(get_exception_status) |
Alexandre Julliard | 5188574 | 2002-05-30 20:12:58 +0000 | [diff] [blame] | 1440 | obj_handle_t handle; /* handle to the queued event */ |
Alexandre Julliard | 9caa71e | 2001-11-30 18:46:42 +0000 | [diff] [blame] | 1441 | @REPLY |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 1442 | VARARG(context,context); /* modified thread context */ |
| 1443 | @END |
| 1444 | |
| 1445 | |
| 1446 | /* Send an output string to the debugger */ |
| 1447 | @REQ(output_debug_string) |
| 1448 | void* string; /* string to display (in debugged process address space) */ |
| 1449 | int unicode; /* is it Unicode? */ |
| 1450 | int length; /* string length */ |
| 1451 | @END |
| 1452 | |
| 1453 | |
| 1454 | /* Continue a debug event */ |
| 1455 | @REQ(continue_debug_event) |
Alexandre Julliard | 54f2287 | 2002-10-03 19:54:57 +0000 | [diff] [blame] | 1456 | process_id_t pid; /* process id to continue */ |
| 1457 | thread_id_t tid; /* thread id to continue */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 1458 | int status; /* continuation status */ |
| 1459 | @END |
| 1460 | |
| 1461 | |
Eric Pouech | fbccb38 | 2002-02-27 01:28:30 +0000 | [diff] [blame] | 1462 | /* Start/stop debugging an existing process */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 1463 | @REQ(debug_process) |
Alexandre Julliard | 54f2287 | 2002-10-03 19:54:57 +0000 | [diff] [blame] | 1464 | process_id_t pid; /* id of the process to debug */ |
Eric Pouech | fbccb38 | 2002-02-27 01:28:30 +0000 | [diff] [blame] | 1465 | int attach; /* 1=attaching / 0=detaching from the process */ |
| 1466 | @END |
| 1467 | |
| 1468 | |
Alexandre Julliard | 3c4538c | 2002-02-27 01:55:02 +0000 | [diff] [blame] | 1469 | /* Simulate a breakpoint in a process */ |
| 1470 | @REQ(debug_break) |
Alexandre Julliard | 5188574 | 2002-05-30 20:12:58 +0000 | [diff] [blame] | 1471 | obj_handle_t handle; /* process handle */ |
Alexandre Julliard | 3c4538c | 2002-02-27 01:55:02 +0000 | [diff] [blame] | 1472 | @REPLY |
| 1473 | int self; /* was it the caller itself? */ |
| 1474 | @END |
| 1475 | |
| 1476 | |
Eric Pouech | fbccb38 | 2002-02-27 01:28:30 +0000 | [diff] [blame] | 1477 | /* Set debugger kill on exit flag */ |
| 1478 | @REQ(set_debugger_kill_on_exit) |
| 1479 | int kill_on_exit; /* 0=detach/1=kill debuggee when debugger dies */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 1480 | @END |
| 1481 | |
| 1482 | |
| 1483 | /* Read data from a process address space */ |
| 1484 | @REQ(read_process_memory) |
Alexandre Julliard | 5188574 | 2002-05-30 20:12:58 +0000 | [diff] [blame] | 1485 | obj_handle_t handle; /* process handle */ |
Alexandre Julliard | 9caa71e | 2001-11-30 18:46:42 +0000 | [diff] [blame] | 1486 | void* addr; /* addr to read from */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 1487 | @REPLY |
| 1488 | VARARG(data,bytes); /* result data */ |
| 1489 | @END |
| 1490 | |
| 1491 | |
| 1492 | /* Write data to a process address space */ |
| 1493 | @REQ(write_process_memory) |
Alexandre Julliard | 5188574 | 2002-05-30 20:12:58 +0000 | [diff] [blame] | 1494 | obj_handle_t handle; /* process handle */ |
Alexandre Julliard | 959bbf8 | 2006-04-07 18:41:58 +0200 | [diff] [blame] | 1495 | void* addr; /* addr to write to */ |
Alexandre Julliard | 9caa71e | 2001-11-30 18:46:42 +0000 | [diff] [blame] | 1496 | VARARG(data,bytes); /* data to write */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 1497 | @END |
| 1498 | |
| 1499 | |
| 1500 | /* Create a registry key */ |
| 1501 | @REQ(create_key) |
Alexandre Julliard | 5188574 | 2002-05-30 20:12:58 +0000 | [diff] [blame] | 1502 | obj_handle_t parent; /* handle to the parent key */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 1503 | unsigned int access; /* desired access rights */ |
Alexandre Julliard | 03b040c | 2005-12-09 14:52:04 +0100 | [diff] [blame] | 1504 | unsigned int attributes; /* object attributes */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 1505 | unsigned int options; /* creation options */ |
| 1506 | time_t modif; /* last modification time */ |
Alexandre Julliard | 0f273c1 | 2006-07-26 10:43:25 +0200 | [diff] [blame] | 1507 | data_size_t namelen; /* length of key name in bytes */ |
Alexandre Julliard | 9caa71e | 2001-11-30 18:46:42 +0000 | [diff] [blame] | 1508 | VARARG(name,unicode_str,namelen); /* key name */ |
| 1509 | VARARG(class,unicode_str); /* class name */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 1510 | @REPLY |
Alexandre Julliard | 5188574 | 2002-05-30 20:12:58 +0000 | [diff] [blame] | 1511 | obj_handle_t hkey; /* handle to the created key */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 1512 | int created; /* has it been newly created? */ |
| 1513 | @END |
| 1514 | |
| 1515 | /* Open a registry key */ |
| 1516 | @REQ(open_key) |
Alexandre Julliard | 5188574 | 2002-05-30 20:12:58 +0000 | [diff] [blame] | 1517 | obj_handle_t parent; /* handle to the parent key */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 1518 | unsigned int access; /* desired access rights */ |
Alexandre Julliard | 03b040c | 2005-12-09 14:52:04 +0100 | [diff] [blame] | 1519 | unsigned int attributes; /* object attributes */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 1520 | VARARG(name,unicode_str); /* key name */ |
| 1521 | @REPLY |
Alexandre Julliard | 5188574 | 2002-05-30 20:12:58 +0000 | [diff] [blame] | 1522 | obj_handle_t hkey; /* handle to the open key */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 1523 | @END |
| 1524 | |
| 1525 | |
| 1526 | /* Delete a registry key */ |
| 1527 | @REQ(delete_key) |
Alexandre Julliard | 5188574 | 2002-05-30 20:12:58 +0000 | [diff] [blame] | 1528 | obj_handle_t hkey; /* handle to the key */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 1529 | @END |
| 1530 | |
| 1531 | |
Mike Hearn | 43cb03b | 2004-01-03 00:38:30 +0000 | [diff] [blame] | 1532 | /* Flush a registry key */ |
| 1533 | @REQ(flush_key) |
| 1534 | obj_handle_t hkey; /* handle to the key */ |
| 1535 | @END |
| 1536 | |
| 1537 | |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 1538 | /* Enumerate registry subkeys */ |
| 1539 | @REQ(enum_key) |
Alexandre Julliard | 5188574 | 2002-05-30 20:12:58 +0000 | [diff] [blame] | 1540 | obj_handle_t hkey; /* handle to registry key */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 1541 | int index; /* index of subkey (or -1 for current key) */ |
Alexandre Julliard | 9caa71e | 2001-11-30 18:46:42 +0000 | [diff] [blame] | 1542 | int info_class; /* requested information class */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 1543 | @REPLY |
| 1544 | int subkeys; /* number of subkeys */ |
| 1545 | int max_subkey; /* longest subkey name */ |
| 1546 | int max_class; /* longest class name */ |
| 1547 | int values; /* number of values */ |
| 1548 | int max_value; /* longest value name */ |
| 1549 | int max_data; /* longest value data */ |
| 1550 | time_t modif; /* last modification time */ |
Alexandre Julliard | 0f273c1 | 2006-07-26 10:43:25 +0200 | [diff] [blame] | 1551 | data_size_t total; /* total length needed for full name and class */ |
| 1552 | data_size_t namelen; /* length of key name in bytes */ |
Alexandre Julliard | 9caa71e | 2001-11-30 18:46:42 +0000 | [diff] [blame] | 1553 | VARARG(name,unicode_str,namelen); /* key name */ |
| 1554 | VARARG(class,unicode_str); /* class name */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 1555 | @END |
| 1556 | |
| 1557 | |
| 1558 | /* Set a value of a registry key */ |
| 1559 | @REQ(set_key_value) |
Alexandre Julliard | 5188574 | 2002-05-30 20:12:58 +0000 | [diff] [blame] | 1560 | obj_handle_t hkey; /* handle to registry key */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 1561 | int type; /* value type */ |
Alexandre Julliard | 0f273c1 | 2006-07-26 10:43:25 +0200 | [diff] [blame] | 1562 | data_size_t namelen; /* length of value name in bytes */ |
Alexandre Julliard | 9caa71e | 2001-11-30 18:46:42 +0000 | [diff] [blame] | 1563 | VARARG(name,unicode_str,namelen); /* value name */ |
| 1564 | VARARG(data,bytes); /* value data */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 1565 | @END |
| 1566 | |
| 1567 | |
| 1568 | /* Retrieve the value of a registry key */ |
| 1569 | @REQ(get_key_value) |
Alexandre Julliard | 5188574 | 2002-05-30 20:12:58 +0000 | [diff] [blame] | 1570 | obj_handle_t hkey; /* handle to registry key */ |
Alexandre Julliard | 9caa71e | 2001-11-30 18:46:42 +0000 | [diff] [blame] | 1571 | VARARG(name,unicode_str); /* value name */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 1572 | @REPLY |
| 1573 | int type; /* value type */ |
Alexandre Julliard | 0f273c1 | 2006-07-26 10:43:25 +0200 | [diff] [blame] | 1574 | data_size_t total; /* total length needed for data */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 1575 | VARARG(data,bytes); /* value data */ |
| 1576 | @END |
| 1577 | |
| 1578 | |
| 1579 | /* Enumerate a value of a registry key */ |
| 1580 | @REQ(enum_key_value) |
Alexandre Julliard | 5188574 | 2002-05-30 20:12:58 +0000 | [diff] [blame] | 1581 | obj_handle_t hkey; /* handle to registry key */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 1582 | int index; /* value index */ |
Alexandre Julliard | 9caa71e | 2001-11-30 18:46:42 +0000 | [diff] [blame] | 1583 | int info_class; /* requested information class */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 1584 | @REPLY |
| 1585 | int type; /* value type */ |
Alexandre Julliard | 0f273c1 | 2006-07-26 10:43:25 +0200 | [diff] [blame] | 1586 | data_size_t total; /* total length needed for full name and data */ |
| 1587 | data_size_t namelen; /* length of value name in bytes */ |
Alexandre Julliard | 9caa71e | 2001-11-30 18:46:42 +0000 | [diff] [blame] | 1588 | VARARG(name,unicode_str,namelen); /* value name */ |
| 1589 | VARARG(data,bytes); /* value data */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 1590 | @END |
| 1591 | |
| 1592 | |
| 1593 | /* Delete a value of a registry key */ |
| 1594 | @REQ(delete_key_value) |
Alexandre Julliard | 5188574 | 2002-05-30 20:12:58 +0000 | [diff] [blame] | 1595 | obj_handle_t hkey; /* handle to registry key */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 1596 | VARARG(name,unicode_str); /* value name */ |
| 1597 | @END |
| 1598 | |
| 1599 | |
| 1600 | /* Load a registry branch from a file */ |
| 1601 | @REQ(load_registry) |
Alexandre Julliard | 5188574 | 2002-05-30 20:12:58 +0000 | [diff] [blame] | 1602 | obj_handle_t hkey; /* root key to load to */ |
| 1603 | obj_handle_t file; /* file to load from */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 1604 | VARARG(name,unicode_str); /* subkey name */ |
| 1605 | @END |
| 1606 | |
| 1607 | |
Mike McCormack | 5ac945c | 2003-08-19 03:08:17 +0000 | [diff] [blame] | 1608 | /* UnLoad a registry branch from a file */ |
| 1609 | @REQ(unload_registry) |
| 1610 | obj_handle_t hkey; /* root key to unload to */ |
| 1611 | @END |
| 1612 | |
| 1613 | |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 1614 | /* Save a registry branch to a file */ |
| 1615 | @REQ(save_registry) |
Alexandre Julliard | 5188574 | 2002-05-30 20:12:58 +0000 | [diff] [blame] | 1616 | obj_handle_t hkey; /* key to save */ |
| 1617 | obj_handle_t file; /* file to save to */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 1618 | @END |
| 1619 | |
| 1620 | |
Alexandre Julliard | c07ce05 | 2004-05-07 04:13:21 +0000 | [diff] [blame] | 1621 | /* Add a registry key change notification */ |
Mike McCormack | 11f4b44 | 2002-11-25 02:47:32 +0000 | [diff] [blame] | 1622 | @REQ(set_registry_notification) |
| 1623 | obj_handle_t hkey; /* key to watch for changes */ |
| 1624 | obj_handle_t event; /* event to set */ |
| 1625 | int subtree; /* should we watch the whole subtree? */ |
| 1626 | unsigned int filter; /* things to watch */ |
| 1627 | @END |
| 1628 | |
| 1629 | |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 1630 | /* Create a waitable timer */ |
| 1631 | @REQ(create_timer) |
Eric Pouech | 44158dd | 2004-12-02 18:05:37 +0000 | [diff] [blame] | 1632 | unsigned int access; /* wanted access rights */ |
Vitaliy Margolen | a996000 | 2005-10-27 18:30:37 +0000 | [diff] [blame] | 1633 | unsigned int attributes; /* object attributes */ |
Vitaliy Margolen | 7c5cb7a | 2005-12-02 16:05:54 +0100 | [diff] [blame] | 1634 | obj_handle_t rootdir; /* root directory */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 1635 | int manual; /* manual reset */ |
| 1636 | VARARG(name,unicode_str); /* object name */ |
| 1637 | @REPLY |
Alexandre Julliard | 5188574 | 2002-05-30 20:12:58 +0000 | [diff] [blame] | 1638 | obj_handle_t handle; /* handle to the timer */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 1639 | @END |
| 1640 | |
| 1641 | |
| 1642 | /* Open a waitable timer */ |
| 1643 | @REQ(open_timer) |
| 1644 | unsigned int access; /* wanted access rights */ |
Vitaliy Margolen | a996000 | 2005-10-27 18:30:37 +0000 | [diff] [blame] | 1645 | unsigned int attributes; /* object attributes */ |
Vitaliy Margolen | 7c5cb7a | 2005-12-02 16:05:54 +0100 | [diff] [blame] | 1646 | obj_handle_t rootdir; /* root directory */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 1647 | VARARG(name,unicode_str); /* object name */ |
| 1648 | @REPLY |
Alexandre Julliard | 5188574 | 2002-05-30 20:12:58 +0000 | [diff] [blame] | 1649 | obj_handle_t handle; /* handle to the timer */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 1650 | @END |
| 1651 | |
| 1652 | /* Set a waitable timer */ |
| 1653 | @REQ(set_timer) |
Alexandre Julliard | 5188574 | 2002-05-30 20:12:58 +0000 | [diff] [blame] | 1654 | obj_handle_t handle; /* handle to the timer */ |
Alexandre Julliard | aaf477f | 2007-04-17 20:08:59 +0200 | [diff] [blame] | 1655 | timeout_t expire; /* next expiration absolute time */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 1656 | int period; /* timer period in ms */ |
| 1657 | void* callback; /* callback function */ |
| 1658 | void* arg; /* callback argument */ |
Eric Pouech | 4c591d4 | 2003-05-20 04:00:42 +0000 | [diff] [blame] | 1659 | @REPLY |
| 1660 | int signaled; /* was the timer signaled before this call ? */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 1661 | @END |
| 1662 | |
| 1663 | /* Cancel a waitable timer */ |
| 1664 | @REQ(cancel_timer) |
Alexandre Julliard | 5188574 | 2002-05-30 20:12:58 +0000 | [diff] [blame] | 1665 | obj_handle_t handle; /* handle to the timer */ |
Eric Pouech | 4c591d4 | 2003-05-20 04:00:42 +0000 | [diff] [blame] | 1666 | @REPLY |
| 1667 | int signaled; /* was the timer signaled before this calltime ? */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 1668 | @END |
| 1669 | |
Robert Shearman | 7572b12 | 2004-12-13 21:10:58 +0000 | [diff] [blame] | 1670 | /* Get information on a waitable timer */ |
| 1671 | @REQ(get_timer_info) |
| 1672 | obj_handle_t handle; /* handle to the timer */ |
| 1673 | @REPLY |
Alexandre Julliard | aaf477f | 2007-04-17 20:08:59 +0200 | [diff] [blame] | 1674 | timeout_t when; /* absolute time when the timer next expires */ |
Robert Shearman | 7572b12 | 2004-12-13 21:10:58 +0000 | [diff] [blame] | 1675 | int signaled; /* is the timer signaled? */ |
| 1676 | @END |
| 1677 | |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 1678 | |
| 1679 | /* Retrieve the current context of a thread */ |
| 1680 | @REQ(get_thread_context) |
Alexandre Julliard | 5188574 | 2002-05-30 20:12:58 +0000 | [diff] [blame] | 1681 | obj_handle_t handle; /* thread handle */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 1682 | unsigned int flags; /* context flags */ |
Alexandre Julliard | 73c7239 | 2005-11-02 20:54:12 +0000 | [diff] [blame] | 1683 | int suspend; /* if getting context during suspend */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 1684 | @REPLY |
Alexandre Julliard | 2878d99 | 2006-01-13 13:58:14 +0100 | [diff] [blame] | 1685 | int self; /* was it a handle to the current thread? */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 1686 | VARARG(context,context); /* thread context */ |
| 1687 | @END |
| 1688 | |
| 1689 | |
| 1690 | /* Set the current context of a thread */ |
| 1691 | @REQ(set_thread_context) |
Alexandre Julliard | 5188574 | 2002-05-30 20:12:58 +0000 | [diff] [blame] | 1692 | obj_handle_t handle; /* thread handle */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 1693 | unsigned int flags; /* context flags */ |
Alexandre Julliard | 73c7239 | 2005-11-02 20:54:12 +0000 | [diff] [blame] | 1694 | int suspend; /* if setting context during suspend */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 1695 | VARARG(context,context); /* thread context */ |
Alexandre Julliard | 2654be0 | 2006-01-11 20:20:32 +0100 | [diff] [blame] | 1696 | @REPLY |
| 1697 | int self; /* was it a handle to the current thread? */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 1698 | @END |
| 1699 | |
| 1700 | |
| 1701 | /* Fetch a selector entry for a thread */ |
| 1702 | @REQ(get_selector_entry) |
Alexandre Julliard | 5188574 | 2002-05-30 20:12:58 +0000 | [diff] [blame] | 1703 | obj_handle_t handle; /* thread handle */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 1704 | int entry; /* LDT entry */ |
| 1705 | @REPLY |
| 1706 | unsigned int base; /* selector base */ |
| 1707 | unsigned int limit; /* selector limit */ |
| 1708 | unsigned char flags; /* selector flags */ |
| 1709 | @END |
| 1710 | |
| 1711 | |
| 1712 | /* Add an atom */ |
| 1713 | @REQ(add_atom) |
Eric Pouech | e626736 | 2005-05-10 15:15:50 +0000 | [diff] [blame] | 1714 | obj_handle_t table; /* which table to add atom to */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 1715 | VARARG(name,unicode_str); /* atom name */ |
| 1716 | @REPLY |
Alexandre Julliard | d8a8c11 | 2001-10-12 18:45:29 +0000 | [diff] [blame] | 1717 | atom_t atom; /* resulting atom */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 1718 | @END |
| 1719 | |
| 1720 | |
| 1721 | /* Delete an atom */ |
| 1722 | @REQ(delete_atom) |
Eric Pouech | e626736 | 2005-05-10 15:15:50 +0000 | [diff] [blame] | 1723 | obj_handle_t table; /* which table to delete atom from */ |
Alexandre Julliard | d8a8c11 | 2001-10-12 18:45:29 +0000 | [diff] [blame] | 1724 | atom_t atom; /* atom handle */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 1725 | @END |
| 1726 | |
| 1727 | |
| 1728 | /* Find an atom */ |
| 1729 | @REQ(find_atom) |
Eric Pouech | e626736 | 2005-05-10 15:15:50 +0000 | [diff] [blame] | 1730 | obj_handle_t table; /* which table to find atom from */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 1731 | VARARG(name,unicode_str); /* atom name */ |
| 1732 | @REPLY |
Alexandre Julliard | d8a8c11 | 2001-10-12 18:45:29 +0000 | [diff] [blame] | 1733 | atom_t atom; /* atom handle */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 1734 | @END |
| 1735 | |
| 1736 | |
Eric Pouech | e626736 | 2005-05-10 15:15:50 +0000 | [diff] [blame] | 1737 | /* Get information about an atom */ |
| 1738 | @REQ(get_atom_information) |
| 1739 | obj_handle_t table; /* which table to find atom from */ |
Alexandre Julliard | d8a8c11 | 2001-10-12 18:45:29 +0000 | [diff] [blame] | 1740 | atom_t atom; /* atom handle */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 1741 | @REPLY |
| 1742 | int count; /* atom lock count */ |
Eric Pouech | e626736 | 2005-05-10 15:15:50 +0000 | [diff] [blame] | 1743 | int pinned; /* whether the atom has been pinned */ |
Alexandre Julliard | 0f273c1 | 2006-07-26 10:43:25 +0200 | [diff] [blame] | 1744 | data_size_t total; /* actual length of atom name */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 1745 | VARARG(name,unicode_str); /* atom name */ |
| 1746 | @END |
| 1747 | |
| 1748 | |
Eric Pouech | e626736 | 2005-05-10 15:15:50 +0000 | [diff] [blame] | 1749 | /* Set information about an atom */ |
| 1750 | @REQ(set_atom_information) |
| 1751 | obj_handle_t table; /* which table to find atom from */ |
| 1752 | atom_t atom; /* atom handle */ |
| 1753 | int pinned; /* whether to bump atom information */ |
| 1754 | @END |
| 1755 | |
| 1756 | |
| 1757 | /* Empty an atom table */ |
| 1758 | @REQ(empty_atom_table) |
| 1759 | obj_handle_t table; /* which table to find atom from */ |
| 1760 | int if_pinned; /* whether to delete pinned atoms */ |
| 1761 | @END |
| 1762 | |
| 1763 | |
| 1764 | /* Init an atom table */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 1765 | @REQ(init_atom_table) |
Eric Pouech | e626736 | 2005-05-10 15:15:50 +0000 | [diff] [blame] | 1766 | int entries; /* number of entries (only for local) */ |
| 1767 | @REPLY |
| 1768 | obj_handle_t table; /* handle to the atom table */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 1769 | @END |
| 1770 | |
| 1771 | |
| 1772 | /* Get the message queue of the current thread */ |
| 1773 | @REQ(get_msg_queue) |
| 1774 | @REPLY |
Alexandre Julliard | 5188574 | 2002-05-30 20:12:58 +0000 | [diff] [blame] | 1775 | obj_handle_t handle; /* handle to the queue */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 1776 | @END |
| 1777 | |
| 1778 | |
Alexandre Julliard | 0cb29f4 | 2007-04-04 18:02:01 +0200 | [diff] [blame] | 1779 | /* Set the file descriptor associated to the current thread queue */ |
| 1780 | @REQ(set_queue_fd) |
| 1781 | obj_handle_t handle; /* handle to the file descriptor */ |
| 1782 | @END |
| 1783 | |
| 1784 | |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 1785 | /* Set the current message queue wakeup mask */ |
| 1786 | @REQ(set_queue_mask) |
| 1787 | unsigned int wake_mask; /* wakeup bits mask */ |
| 1788 | unsigned int changed_mask; /* changed bits mask */ |
| 1789 | int skip_wait; /* will we skip waiting if signaled? */ |
| 1790 | @REPLY |
| 1791 | unsigned int wake_bits; /* current wake bits */ |
| 1792 | unsigned int changed_bits; /* current changed bits */ |
| 1793 | @END |
| 1794 | |
| 1795 | |
| 1796 | /* Get the current message queue status */ |
| 1797 | @REQ(get_queue_status) |
| 1798 | int clear; /* should we clear the change bits? */ |
| 1799 | @REPLY |
| 1800 | unsigned int wake_bits; /* wake bits */ |
| 1801 | unsigned int changed_bits; /* changed bits since last time */ |
| 1802 | @END |
| 1803 | |
| 1804 | |
Alexandre Julliard | ce40ef1 | 2006-07-26 11:48:25 +0200 | [diff] [blame] | 1805 | /* Retrieve the process idle event */ |
| 1806 | @REQ(get_process_idle_event) |
Alexandre Julliard | 5188574 | 2002-05-30 20:12:58 +0000 | [diff] [blame] | 1807 | obj_handle_t handle; /* process handle */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 1808 | @REPLY |
Alexandre Julliard | 5188574 | 2002-05-30 20:12:58 +0000 | [diff] [blame] | 1809 | obj_handle_t event; /* handle to idle event */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 1810 | @END |
| 1811 | |
| 1812 | |
| 1813 | /* Send a message to a thread queue */ |
| 1814 | @REQ(send_message) |
Alexandre Julliard | 54f2287 | 2002-10-03 19:54:57 +0000 | [diff] [blame] | 1815 | thread_id_t id; /* thread id */ |
Alexandre Julliard | d253c58 | 2001-08-07 19:19:08 +0000 | [diff] [blame] | 1816 | int type; /* message type (see below) */ |
Alexandre Julliard | 09029b2 | 2003-07-11 04:09:42 +0000 | [diff] [blame] | 1817 | int flags; /* message flags (see below) */ |
Alexandre Julliard | 1a66d22 | 2001-08-28 18:44:52 +0000 | [diff] [blame] | 1818 | user_handle_t win; /* window handle */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 1819 | unsigned int msg; /* message code */ |
Mike McCormack | f386950 | 2006-06-07 18:33:09 +0900 | [diff] [blame] | 1820 | unsigned long wparam; /* parameters */ |
| 1821 | unsigned long lparam; /* parameters */ |
Alexandre Julliard | aaf477f | 2007-04-17 20:08:59 +0200 | [diff] [blame] | 1822 | timeout_t timeout; /* timeout for reply */ |
Alexandre Julliard | 3ad9798 | 2006-10-04 20:25:42 +0200 | [diff] [blame] | 1823 | VARARG(data,message_data); /* message data for sent messages */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 1824 | @END |
Alexandre Julliard | d253c58 | 2001-08-07 19:19:08 +0000 | [diff] [blame] | 1825 | |
Robert Shearman | a40ce39 | 2006-01-17 13:14:31 +0100 | [diff] [blame] | 1826 | @REQ(post_quit_message) |
| 1827 | int exit_code; /* exit code to return */ |
| 1828 | @END |
| 1829 | |
Alexandre Julliard | d253c58 | 2001-08-07 19:19:08 +0000 | [diff] [blame] | 1830 | enum message_type |
| 1831 | { |
| 1832 | MSG_ASCII, /* Ascii message (from SendMessageA) */ |
| 1833 | MSG_UNICODE, /* Unicode message (from SendMessageW) */ |
| 1834 | MSG_NOTIFY, /* notify message (from SendNotifyMessageW), always Unicode */ |
| 1835 | MSG_CALLBACK, /* callback message (from SendMessageCallbackW), always Unicode */ |
Alexandre Julliard | 039e131 | 2003-07-26 20:36:43 +0000 | [diff] [blame] | 1836 | MSG_CALLBACK_RESULT,/* result of a callback message */ |
Alexandre Julliard | d253c58 | 2001-08-07 19:19:08 +0000 | [diff] [blame] | 1837 | MSG_OTHER_PROCESS, /* sent from other process, may include vararg data, always Unicode */ |
| 1838 | MSG_POSTED, /* posted message (from PostMessageW), always Unicode */ |
Dmitry Timoshkov | 6dba0a7 | 2005-02-03 16:40:20 +0000 | [diff] [blame] | 1839 | MSG_HARDWARE, /* hardware message */ |
| 1840 | MSG_WINEVENT /* winevent message */ |
Alexandre Julliard | d253c58 | 2001-08-07 19:19:08 +0000 | [diff] [blame] | 1841 | }; |
Alexandre Julliard | 09029b2 | 2003-07-11 04:09:42 +0000 | [diff] [blame] | 1842 | #define SEND_MSG_ABORT_IF_HUNG 0x01 |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 1843 | |
| 1844 | |
Alexandre Julliard | d3b3096 | 2006-08-09 16:45:26 +0200 | [diff] [blame] | 1845 | /* Send a hardware message to a thread queue */ |
| 1846 | @REQ(send_hardware_message) |
| 1847 | thread_id_t id; /* thread id */ |
| 1848 | user_handle_t win; /* window handle */ |
| 1849 | unsigned int msg; /* message code */ |
Alexandre Julliard | e0dcf4f | 2006-10-04 21:41:32 +0200 | [diff] [blame] | 1850 | unsigned int time; /* message time */ |
Alexandre Julliard | d3b3096 | 2006-08-09 16:45:26 +0200 | [diff] [blame] | 1851 | unsigned long wparam; /* parameters */ |
| 1852 | unsigned long lparam; /* parameters */ |
Alexandre Julliard | 672bfc2 | 2006-08-09 17:10:14 +0200 | [diff] [blame] | 1853 | unsigned long info; /* extra info */ |
Alexandre Julliard | d3b3096 | 2006-08-09 16:45:26 +0200 | [diff] [blame] | 1854 | int x; /* x position */ |
| 1855 | int y; /* y position */ |
Alexandre Julliard | d3b3096 | 2006-08-09 16:45:26 +0200 | [diff] [blame] | 1856 | @END |
| 1857 | |
| 1858 | |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 1859 | /* Get a message from the current queue */ |
| 1860 | @REQ(get_message) |
Alexandre Julliard | 89faee0 | 2007-02-21 15:21:05 +0100 | [diff] [blame] | 1861 | unsigned int flags; /* PM_* flags */ |
Alexandre Julliard | 1a66d22 | 2001-08-28 18:44:52 +0000 | [diff] [blame] | 1862 | user_handle_t get_win; /* window handle to get */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 1863 | unsigned int get_first; /* first message code to get */ |
| 1864 | unsigned int get_last; /* last message code to get */ |
Alexandre Julliard | 3e2f2a5 | 2005-04-20 13:03:59 +0000 | [diff] [blame] | 1865 | unsigned int hw_id; /* id of the previous hardware message (or 0) */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 1866 | @REPLY |
Alexandre Julliard | 1a66d22 | 2001-08-28 18:44:52 +0000 | [diff] [blame] | 1867 | user_handle_t win; /* window handle */ |
Alexandre Julliard | e0dcf4f | 2006-10-04 21:41:32 +0200 | [diff] [blame] | 1868 | int type; /* message type */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 1869 | unsigned int msg; /* message code */ |
Alexandre Julliard | 29a3ce9 | 2006-10-04 16:29:45 +0200 | [diff] [blame] | 1870 | unsigned long wparam; /* parameters */ |
| 1871 | unsigned long lparam; /* parameters */ |
| 1872 | unsigned long info; /* extra info */ |
Alexandre Julliard | d253c58 | 2001-08-07 19:19:08 +0000 | [diff] [blame] | 1873 | int x; /* x position */ |
| 1874 | int y; /* y position */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 1875 | unsigned int time; /* message time */ |
Alexandre Julliard | 3e2f2a5 | 2005-04-20 13:03:59 +0000 | [diff] [blame] | 1876 | unsigned int hw_id; /* id if hardware message */ |
Alexandre Julliard | 6334235 | 2005-05-11 13:03:15 +0000 | [diff] [blame] | 1877 | unsigned int active_hooks; /* active hooks bitmap */ |
Alexandre Julliard | 0f273c1 | 2006-07-26 10:43:25 +0200 | [diff] [blame] | 1878 | data_size_t total; /* total size of extra data */ |
Alexandre Julliard | 59dc456 | 2006-10-04 16:04:53 +0200 | [diff] [blame] | 1879 | VARARG(data,message_data); /* message data for sent messages */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 1880 | @END |
Alexandre Julliard | 89faee0 | 2007-02-21 15:21:05 +0100 | [diff] [blame] | 1881 | |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 1882 | |
| 1883 | /* Reply to a sent message */ |
| 1884 | @REQ(reply_message) |
| 1885 | unsigned int result; /* message result */ |
| 1886 | int remove; /* should we remove the message? */ |
Alexandre Julliard | d253c58 | 2001-08-07 19:19:08 +0000 | [diff] [blame] | 1887 | VARARG(data,bytes); /* message data for sent messages */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 1888 | @END |
| 1889 | |
| 1890 | |
Alexandre Julliard | 0bc8377 | 2005-03-23 10:33:17 +0000 | [diff] [blame] | 1891 | /* Accept the current hardware message */ |
| 1892 | @REQ(accept_hardware_message) |
Alexandre Julliard | 3e2f2a5 | 2005-04-20 13:03:59 +0000 | [diff] [blame] | 1893 | unsigned int hw_id; /* id of the hardware message */ |
Alexandre Julliard | 0bc8377 | 2005-03-23 10:33:17 +0000 | [diff] [blame] | 1894 | int remove; /* should we remove the message? */ |
| 1895 | user_handle_t new_win; /* new destination window for current message */ |
| 1896 | @END |
| 1897 | |
| 1898 | |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 1899 | /* Retrieve the reply for the last message sent */ |
| 1900 | @REQ(get_message_reply) |
| 1901 | int cancel; /* cancel message if not ready? */ |
| 1902 | @REPLY |
| 1903 | unsigned int result; /* message result */ |
Alexandre Julliard | d253c58 | 2001-08-07 19:19:08 +0000 | [diff] [blame] | 1904 | VARARG(data,bytes); /* message data for sent messages */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 1905 | @END |
| 1906 | |
| 1907 | |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 1908 | /* Set a window timer */ |
| 1909 | @REQ(set_win_timer) |
Alexandre Julliard | 1a66d22 | 2001-08-28 18:44:52 +0000 | [diff] [blame] | 1910 | user_handle_t win; /* window handle */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 1911 | unsigned int msg; /* message to post */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 1912 | unsigned int rate; /* timer rate in ms */ |
Alexandre Julliard | 85f518a | 2006-10-16 17:03:44 +0200 | [diff] [blame] | 1913 | unsigned long id; /* timer id */ |
Mike McCormack | f386950 | 2006-06-07 18:33:09 +0900 | [diff] [blame] | 1914 | unsigned long lparam; /* message lparam (callback proc) */ |
Alexandre Julliard | ff986a5 | 2004-11-29 18:08:18 +0000 | [diff] [blame] | 1915 | @REPLY |
Alexandre Julliard | 85f518a | 2006-10-16 17:03:44 +0200 | [diff] [blame] | 1916 | unsigned long id; /* timer id */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 1917 | @END |
| 1918 | |
| 1919 | |
| 1920 | /* Kill a window timer */ |
| 1921 | @REQ(kill_win_timer) |
Alexandre Julliard | 1a66d22 | 2001-08-28 18:44:52 +0000 | [diff] [blame] | 1922 | user_handle_t win; /* window handle */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 1923 | unsigned int msg; /* message to post */ |
Alexandre Julliard | 85f518a | 2006-10-16 17:03:44 +0200 | [diff] [blame] | 1924 | unsigned long id; /* timer id */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 1925 | @END |
| 1926 | |
| 1927 | |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 1928 | /* Retrieve info about a serial port */ |
| 1929 | @REQ(get_serial_info) |
Alexandre Julliard | 5188574 | 2002-05-30 20:12:58 +0000 | [diff] [blame] | 1930 | obj_handle_t handle; /* handle to comm port */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 1931 | @REPLY |
| 1932 | unsigned int readinterval; |
| 1933 | unsigned int readconst; |
| 1934 | unsigned int readmult; |
| 1935 | unsigned int writeconst; |
| 1936 | unsigned int writemult; |
| 1937 | unsigned int eventmask; |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 1938 | @END |
| 1939 | |
| 1940 | |
| 1941 | /* Set info about a serial port */ |
| 1942 | @REQ(set_serial_info) |
Alexandre Julliard | 5188574 | 2002-05-30 20:12:58 +0000 | [diff] [blame] | 1943 | obj_handle_t handle; /* handle to comm port */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 1944 | int flags; /* bitmask to set values (see below) */ |
| 1945 | unsigned int readinterval; |
| 1946 | unsigned int readconst; |
| 1947 | unsigned int readmult; |
| 1948 | unsigned int writeconst; |
| 1949 | unsigned int writemult; |
| 1950 | unsigned int eventmask; |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 1951 | @END |
| 1952 | #define SERIALINFO_SET_TIMEOUTS 0x01 |
| 1953 | #define SERIALINFO_SET_MASK 0x02 |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 1954 | |
| 1955 | |
Eric Pouech | 4634447 | 2005-01-14 19:54:38 +0000 | [diff] [blame] | 1956 | /* Create an async I/O */ |
Mike McCormack | 6f011c0 | 2001-12-20 00:07:05 +0000 | [diff] [blame] | 1957 | @REQ(register_async) |
Eric Pouech | 4634447 | 2005-01-14 19:54:38 +0000 | [diff] [blame] | 1958 | obj_handle_t handle; /* handle to comm port, socket or file */ |
| 1959 | int type; /* type of queue to look after */ |
Eric Pouech | 4634447 | 2005-01-14 19:54:38 +0000 | [diff] [blame] | 1960 | int count; /* count - usually # of bytes to be read/written */ |
Alexandre Julliard | 111610c | 2007-03-20 20:21:12 +0100 | [diff] [blame] | 1961 | async_data_t async; /* async I/O parameters */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 1962 | @END |
| 1963 | #define ASYNC_TYPE_READ 0x01 |
| 1964 | #define ASYNC_TYPE_WRITE 0x02 |
| 1965 | #define ASYNC_TYPE_WAIT 0x03 |
| 1966 | |
| 1967 | |
Eric Pouech | 4634447 | 2005-01-14 19:54:38 +0000 | [diff] [blame] | 1968 | /* Cancel all async op on a fd */ |
| 1969 | @REQ(cancel_async) |
| 1970 | obj_handle_t handle; /* handle to comm port, socket or file */ |
| 1971 | @END |
| 1972 | |
| 1973 | |
Alexandre Julliard | 6357143 | 2007-04-16 14:45:03 +0200 | [diff] [blame] | 1974 | /* Perform an ioctl on a file */ |
| 1975 | @REQ(ioctl) |
| 1976 | obj_handle_t handle; /* handle to the device */ |
Alexandre Julliard | 737148c | 2007-04-17 22:06:13 +0200 | [diff] [blame] | 1977 | ioctl_code_t code; /* ioctl code */ |
Alexandre Julliard | 6357143 | 2007-04-16 14:45:03 +0200 | [diff] [blame] | 1978 | async_data_t async; /* async I/O parameters */ |
| 1979 | VARARG(in_data,bytes); /* ioctl input data */ |
| 1980 | @REPLY |
Alexandre Julliard | fd59e15 | 2007-05-03 17:43:18 +0200 | [diff] [blame] | 1981 | obj_handle_t wait; /* handle to wait on for blocking ioctl */ |
| 1982 | unsigned int options; /* device open options */ |
Alexandre Julliard | 6357143 | 2007-04-16 14:45:03 +0200 | [diff] [blame] | 1983 | VARARG(out_data,bytes); /* ioctl output data */ |
| 1984 | @END |
| 1985 | |
| 1986 | |
Alexandre Julliard | aafcfe7 | 2007-05-08 20:45:44 +0200 | [diff] [blame] | 1987 | /* Retrieve results of an async ioctl */ |
| 1988 | @REQ(get_ioctl_result) |
| 1989 | obj_handle_t handle; /* handle to the device */ |
| 1990 | void* user_arg; /* user arg used to identify the request */ |
| 1991 | @REPLY |
| 1992 | VARARG(out_data,bytes); /* ioctl output data */ |
| 1993 | @END |
| 1994 | |
| 1995 | |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 1996 | /* Create a named pipe */ |
| 1997 | @REQ(create_named_pipe) |
Eric Pouech | e21aa6a | 2005-09-26 11:02:45 +0000 | [diff] [blame] | 1998 | unsigned int access; |
Vitaliy Margolen | a996000 | 2005-10-27 18:30:37 +0000 | [diff] [blame] | 1999 | unsigned int attributes; /* object attributes */ |
Vitaliy Margolen | babfa79 | 2005-12-05 13:09:35 +0100 | [diff] [blame] | 2000 | obj_handle_t rootdir; /* root directory */ |
Eric Pouech | 5a2591d | 2005-04-18 14:57:04 +0000 | [diff] [blame] | 2001 | unsigned int options; |
| 2002 | unsigned int flags; |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 2003 | unsigned int maxinstances; |
| 2004 | unsigned int outsize; |
| 2005 | unsigned int insize; |
Alexandre Julliard | aaf477f | 2007-04-17 20:08:59 +0200 | [diff] [blame] | 2006 | timeout_t timeout; |
Alexandre Julliard | 8ae5761 | 2001-12-31 22:26:51 +0000 | [diff] [blame] | 2007 | VARARG(name,unicode_str); /* pipe name */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 2008 | @REPLY |
Alexandre Julliard | 5188574 | 2002-05-30 20:12:58 +0000 | [diff] [blame] | 2009 | obj_handle_t handle; /* handle to the pipe */ |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 2010 | @END |
| 2011 | |
Eric Pouech | 5a2591d | 2005-04-18 14:57:04 +0000 | [diff] [blame] | 2012 | /* flags in create_named_pipe and get_named_pipe_info */ |
| 2013 | #define NAMED_PIPE_MESSAGE_STREAM_WRITE 0x0001 |
| 2014 | #define NAMED_PIPE_MESSAGE_STREAM_READ 0x0002 |
| 2015 | #define NAMED_PIPE_NONBLOCKING_MODE 0x0004 |
Eric Pouech | 1d6e259 | 2006-05-26 12:10:11 +0200 | [diff] [blame] | 2016 | #define NAMED_PIPE_SERVER_END 0x8000 |
Alexandre Julliard | 37ec927 | 2001-07-19 00:35:37 +0000 | [diff] [blame] | 2017 | |
Mike McCormack | bf55457 | 2001-08-23 23:29:20 +0000 | [diff] [blame] | 2018 | |
Mike McCormack | f2e7ce7 | 2001-08-27 19:03:42 +0000 | [diff] [blame] | 2019 | @REQ(get_named_pipe_info) |
Alexandre Julliard | 5188574 | 2002-05-30 20:12:58 +0000 | [diff] [blame] | 2020 | obj_handle_t handle; |
Mike McCormack | f2e7ce7 | 2001-08-27 19:03:42 +0000 | [diff] [blame] | 2021 | @REPLY |
| 2022 | unsigned int flags; |
| 2023 | unsigned int maxinstances; |
Eric Pouech | 1d6e259 | 2006-05-26 12:10:11 +0200 | [diff] [blame] | 2024 | unsigned int instances; |
Mike McCormack | f2e7ce7 | 2001-08-27 19:03:42 +0000 | [diff] [blame] | 2025 | unsigned int outsize; |
| 2026 | unsigned int insize; |
| 2027 | @END |
| 2028 | |
Alexandre Julliard | 1a66d22 | 2001-08-28 18:44:52 +0000 | [diff] [blame] | 2029 | |
Alexandre Julliard | 1a66d22 | 2001-08-28 18:44:52 +0000 | [diff] [blame] | 2030 | /* Create a window */ |
| 2031 | @REQ(create_window) |
Alexandre Julliard | a09da0c | 2001-09-21 21:08:40 +0000 | [diff] [blame] | 2032 | user_handle_t parent; /* parent window */ |
| 2033 | user_handle_t owner; /* owner window */ |
Alexandre Julliard | d8a8c11 | 2001-10-12 18:45:29 +0000 | [diff] [blame] | 2034 | atom_t atom; /* class atom */ |
Alexandre Julliard | bfce151 | 2003-12-10 04:08:06 +0000 | [diff] [blame] | 2035 | void* instance; /* module instance */ |
Alexandre Julliard | 1a66d22 | 2001-08-28 18:44:52 +0000 | [diff] [blame] | 2036 | @REPLY |
Alexandre Julliard | a09da0c | 2001-09-21 21:08:40 +0000 | [diff] [blame] | 2037 | user_handle_t handle; /* created window */ |
Alexandre Julliard | 4be3d4c | 2006-03-06 15:00:37 +0100 | [diff] [blame] | 2038 | user_handle_t parent; /* full handle of parent */ |
| 2039 | user_handle_t owner; /* full handle of owner */ |
Alexandre Julliard | bd13ab8 | 2003-12-11 05:34:53 +0000 | [diff] [blame] | 2040 | int extra; /* number of extra bytes */ |
| 2041 | void* class_ptr; /* pointer to class in client address space */ |
Alexandre Julliard | 1a66d22 | 2001-08-28 18:44:52 +0000 | [diff] [blame] | 2042 | @END |
| 2043 | |
| 2044 | |
Alexandre Julliard | 1a66d22 | 2001-08-28 18:44:52 +0000 | [diff] [blame] | 2045 | /* Destroy a window */ |
| 2046 | @REQ(destroy_window) |
| 2047 | user_handle_t handle; /* handle to the window */ |
| 2048 | @END |
| 2049 | |
| 2050 | |
Alexandre Julliard | 8c51880 | 2005-07-08 11:37:40 +0000 | [diff] [blame] | 2051 | /* Retrieve the desktop window for the current thread */ |
| 2052 | @REQ(get_desktop_window) |
Alexandre Julliard | 1a4f6e5 | 2006-03-07 11:42:35 +0100 | [diff] [blame] | 2053 | int force; /* force creation if it doesn't exist */ |
Alexandre Julliard | 8c51880 | 2005-07-08 11:37:40 +0000 | [diff] [blame] | 2054 | @REPLY |
| 2055 | user_handle_t handle; /* handle to the desktop window */ |
| 2056 | @END |
| 2057 | |
| 2058 | |
Alexandre Julliard | ddc3317 | 2001-10-22 19:08:33 +0000 | [diff] [blame] | 2059 | /* Set a window owner */ |
| 2060 | @REQ(set_window_owner) |
| 2061 | user_handle_t handle; /* handle to the window */ |
| 2062 | user_handle_t owner; /* new owner */ |
| 2063 | @REPLY |
| 2064 | user_handle_t full_owner; /* full handle of new owner */ |
Alexandre Julliard | 7dafa61 | 2002-09-25 00:21:56 +0000 | [diff] [blame] | 2065 | user_handle_t prev_owner; /* full handle of previous owner */ |
Alexandre Julliard | ddc3317 | 2001-10-22 19:08:33 +0000 | [diff] [blame] | 2066 | @END |
| 2067 | |
| 2068 | |
Alexandre Julliard | 1a66d22 | 2001-08-28 18:44:52 +0000 | [diff] [blame] | 2069 | /* Get information from a window handle */ |
| 2070 | @REQ(get_window_info) |
| 2071 | user_handle_t handle; /* handle to the window */ |
| 2072 | @REPLY |
| 2073 | user_handle_t full_handle; /* full 32-bit handle */ |
Alexandre Julliard | 5030bda | 2002-10-11 23:41:06 +0000 | [diff] [blame] | 2074 | user_handle_t last_active; /* last active popup */ |
Alexandre Julliard | 54f2287 | 2002-10-03 19:54:57 +0000 | [diff] [blame] | 2075 | process_id_t pid; /* process owning the window */ |
| 2076 | thread_id_t tid; /* thread owning the window */ |
Alexandre Julliard | ddc3317 | 2001-10-22 19:08:33 +0000 | [diff] [blame] | 2077 | atom_t atom; /* class atom */ |
Dmitry Timoshkov | 86af38c | 2005-07-07 12:02:31 +0000 | [diff] [blame] | 2078 | int is_unicode; /* ANSI or unicode */ |
Alexandre Julliard | 1a66d22 | 2001-08-28 18:44:52 +0000 | [diff] [blame] | 2079 | @END |
Alexandre Julliard | a09da0c | 2001-09-21 21:08:40 +0000 | [diff] [blame] | 2080 | |
| 2081 | |
Alexandre Julliard | ddc3317 | 2001-10-22 19:08:33 +0000 | [diff] [blame] | 2082 | /* Set some information in a window */ |
| 2083 | @REQ(set_window_info) |
Alexandre Julliard | ddc3317 | 2001-10-22 19:08:33 +0000 | [diff] [blame] | 2084 | unsigned int flags; /* flags for fields to set (see below) */ |
Alexandre Julliard | e0dcf4f | 2006-10-04 21:41:32 +0200 | [diff] [blame] | 2085 | user_handle_t handle; /* handle to the window */ |
Alexandre Julliard | ddc3317 | 2001-10-22 19:08:33 +0000 | [diff] [blame] | 2086 | unsigned int style; /* window style */ |
| 2087 | unsigned int ex_style; /* window extended style */ |
| 2088 | unsigned int id; /* window id */ |
Dmitry Timoshkov | 86af38c | 2005-07-07 12:02:31 +0000 | [diff] [blame] | 2089 | int is_unicode; /* ANSI or unicode */ |
Alexandre Julliard | e0dcf4f | 2006-10-04 21:41:32 +0200 | [diff] [blame] | 2090 | void* instance; /* creator instance */ |
Alexandre Julliard | 81c1472 | 2006-10-04 21:49:11 +0200 | [diff] [blame] | 2091 | unsigned long user_data; /* user-specific data */ |
Alexandre Julliard | 97903d2 | 2003-11-26 22:15:41 +0000 | [diff] [blame] | 2092 | int extra_offset; /* offset to set in extra bytes */ |
Alexandre Julliard | 0f273c1 | 2006-07-26 10:43:25 +0200 | [diff] [blame] | 2093 | data_size_t extra_size; /* size to set in extra bytes */ |
Alexandre Julliard | 2c22996 | 2006-08-02 21:59:00 +0200 | [diff] [blame] | 2094 | unsigned long extra_value; /* value to set in extra bytes */ |
Alexandre Julliard | ddc3317 | 2001-10-22 19:08:33 +0000 | [diff] [blame] | 2095 | @REPLY |
| 2096 | unsigned int old_style; /* old window style */ |
| 2097 | unsigned int old_ex_style; /* old window extended style */ |
| 2098 | unsigned int old_id; /* old window id */ |
| 2099 | void* old_instance; /* old creator instance */ |
Alexandre Julliard | 81c1472 | 2006-10-04 21:49:11 +0200 | [diff] [blame] | 2100 | unsigned long old_user_data; /* old user-specific data */ |
Alexandre Julliard | 2c22996 | 2006-08-02 21:59:00 +0200 | [diff] [blame] | 2101 | unsigned long old_extra_value; /* old value in extra bytes */ |
Alexandre Julliard | ddc3317 | 2001-10-22 19:08:33 +0000 | [diff] [blame] | 2102 | @END |
| 2103 | #define SET_WIN_STYLE 0x01 |
| 2104 | #define SET_WIN_EXSTYLE 0x02 |
| 2105 | #define SET_WIN_ID 0x04 |
| 2106 | #define SET_WIN_INSTANCE 0x08 |
| 2107 | #define SET_WIN_USERDATA 0x10 |
Alexandre Julliard | ebf1243 | 2003-12-10 01:34:51 +0000 | [diff] [blame] | 2108 | #define SET_WIN_EXTRA 0x20 |
Dmitry Timoshkov | 86af38c | 2005-07-07 12:02:31 +0000 | [diff] [blame] | 2109 | #define SET_WIN_UNICODE 0x40 |
Alexandre Julliard | ddc3317 | 2001-10-22 19:08:33 +0000 | [diff] [blame] | 2110 | |
| 2111 | |
Alexandre Julliard | 4d32a47 | 2005-03-25 10:38:56 +0000 | [diff] [blame] | 2112 | /* Set the parent of a window */ |
| 2113 | @REQ(set_parent) |
| 2114 | user_handle_t handle; /* handle to the window */ |
| 2115 | user_handle_t parent; /* handle to the parent */ |
| 2116 | @REPLY |
| 2117 | user_handle_t old_parent; /* old parent window */ |
| 2118 | user_handle_t full_parent; /* full handle of new parent */ |
| 2119 | @END |
| 2120 | |
| 2121 | |
Alexandre Julliard | a09da0c | 2001-09-21 21:08:40 +0000 | [diff] [blame] | 2122 | /* Get a list of the window parents, up to the root of the tree */ |
| 2123 | @REQ(get_window_parents) |
| 2124 | user_handle_t handle; /* handle to the window */ |
| 2125 | @REPLY |
| 2126 | int count; /* total count of parents */ |
| 2127 | VARARG(parents,user_handles); /* parent handles */ |
| 2128 | @END |
| 2129 | |
| 2130 | |
| 2131 | /* Get a list of the window children */ |
| 2132 | @REQ(get_window_children) |
| 2133 | user_handle_t parent; /* parent window */ |
Alexandre Julliard | d8a8c11 | 2001-10-12 18:45:29 +0000 | [diff] [blame] | 2134 | atom_t atom; /* class atom for the listed children */ |
Alexandre Julliard | 54f2287 | 2002-10-03 19:54:57 +0000 | [diff] [blame] | 2135 | thread_id_t tid; /* thread owning the listed children */ |
Alexandre Julliard | a09da0c | 2001-09-21 21:08:40 +0000 | [diff] [blame] | 2136 | @REPLY |
| 2137 | int count; /* total count of children */ |
Alexandre Julliard | 7695d69 | 2001-09-24 01:19:59 +0000 | [diff] [blame] | 2138 | VARARG(children,user_handles); /* children handles */ |
Alexandre Julliard | a09da0c | 2001-09-21 21:08:40 +0000 | [diff] [blame] | 2139 | @END |
| 2140 | |
| 2141 | |
Alexandre Julliard | 4616dcb | 2004-07-20 22:17:38 +0000 | [diff] [blame] | 2142 | /* Get a list of the window children that contain a given point */ |
| 2143 | @REQ(get_window_children_from_point) |
| 2144 | user_handle_t parent; /* parent window */ |
| 2145 | int x; /* point in parent coordinates */ |
| 2146 | int y; |
| 2147 | @REPLY |
| 2148 | int count; /* total count of children */ |
| 2149 | VARARG(children,user_handles); /* children handles */ |
| 2150 | @END |
| 2151 | |
| 2152 | |
Alexandre Julliard | a09da0c | 2001-09-21 21:08:40 +0000 | [diff] [blame] | 2153 | /* Get window tree information from a window handle */ |
| 2154 | @REQ(get_window_tree) |
| 2155 | user_handle_t handle; /* handle to the window */ |
| 2156 | @REPLY |
| 2157 | user_handle_t parent; /* parent window */ |
| 2158 | user_handle_t owner; /* owner window */ |
| 2159 | user_handle_t next_sibling; /* next sibling in Z-order */ |
| 2160 | user_handle_t prev_sibling; /* prev sibling in Z-order */ |
| 2161 | user_handle_t first_sibling; /* first sibling in Z-order */ |
| 2162 | user_handle_t last_sibling; /* last sibling in Z-order */ |
| 2163 | user_handle_t first_child; /* first child */ |
| 2164 | user_handle_t last_child; /* last child */ |
| 2165 | @END |
Alexandre Julliard | 7a2017d | 2001-10-12 19:10:26 +0000 | [diff] [blame] | 2166 | |
Alexandre Julliard | 5defa49 | 2004-12-07 17:31:53 +0000 | [diff] [blame] | 2167 | /* Set the position and Z order of a window */ |
| 2168 | @REQ(set_window_pos) |
Alexandre Julliard | e0dcf4f | 2006-10-04 21:41:32 +0200 | [diff] [blame] | 2169 | unsigned int flags; /* SWP_* flags */ |
Alexandre Julliard | 0d50965 | 2001-10-16 21:55:37 +0000 | [diff] [blame] | 2170 | user_handle_t handle; /* handle to the window */ |
Alexandre Julliard | 5defa49 | 2004-12-07 17:31:53 +0000 | [diff] [blame] | 2171 | user_handle_t previous; /* previous window in Z order */ |
Alexandre Julliard | 0d50965 | 2001-10-16 21:55:37 +0000 | [diff] [blame] | 2172 | rectangle_t window; /* window rectangle */ |
| 2173 | rectangle_t client; /* client rectangle */ |
Alexandre Julliard | ae661da | 2005-02-03 13:40:12 +0000 | [diff] [blame] | 2174 | VARARG(valid,rectangles); /* valid rectangles from WM_NCCALCSIZE */ |
Alexandre Julliard | 5defa49 | 2004-12-07 17:31:53 +0000 | [diff] [blame] | 2175 | @REPLY |
| 2176 | unsigned int new_style; /* new window style */ |
Alexandre Julliard | 0d50965 | 2001-10-16 21:55:37 +0000 | [diff] [blame] | 2177 | @END |
| 2178 | |
| 2179 | |
| 2180 | /* Get the window and client rectangles of a window */ |
| 2181 | @REQ(get_window_rectangles) |
| 2182 | user_handle_t handle; /* handle to the window */ |
| 2183 | @REPLY |
| 2184 | rectangle_t window; /* window rectangle */ |
Alexandre Julliard | f756090 | 2005-03-17 19:10:41 +0000 | [diff] [blame] | 2185 | rectangle_t visible; /* visible part of the window rectangle */ |
Alexandre Julliard | 0d50965 | 2001-10-16 21:55:37 +0000 | [diff] [blame] | 2186 | rectangle_t client; /* client rectangle */ |
| 2187 | @END |
| 2188 | |
| 2189 | |
Alexandre Julliard | 805bdc5 | 2001-11-13 22:23:48 +0000 | [diff] [blame] | 2190 | /* Get the window text */ |
| 2191 | @REQ(get_window_text) |
| 2192 | user_handle_t handle; /* handle to the window */ |
| 2193 | @REPLY |
| 2194 | VARARG(text,unicode_str); /* window text */ |
| 2195 | @END |
| 2196 | |
| 2197 | |
| 2198 | /* Set the window text */ |
| 2199 | @REQ(set_window_text) |
| 2200 | user_handle_t handle; /* handle to the window */ |
| 2201 | VARARG(text,unicode_str); /* window text */ |
| 2202 | @END |
| 2203 | |
| 2204 | |
Alexandre Julliard | 0d50965 | 2001-10-16 21:55:37 +0000 | [diff] [blame] | 2205 | /* Get the coordinates offset between two windows */ |
| 2206 | @REQ(get_windows_offset) |
| 2207 | user_handle_t from; /* handle to the first window */ |
| 2208 | user_handle_t to; /* handle to the second window */ |
| 2209 | @REPLY |
| 2210 | int x; /* x coordinate offset */ |
| 2211 | int y; /* y coordinate offset */ |
| 2212 | @END |
| 2213 | |
Alexandre Julliard | 7a2017d | 2001-10-12 19:10:26 +0000 | [diff] [blame] | 2214 | |
Alexandre Julliard | e8d86b7 | 2004-06-23 20:44:58 +0000 | [diff] [blame] | 2215 | /* Get the visible region of a window */ |
| 2216 | @REQ(get_visible_region) |
| 2217 | user_handle_t window; /* handle to the window */ |
Alexandre Julliard | e8d86b7 | 2004-06-23 20:44:58 +0000 | [diff] [blame] | 2218 | unsigned int flags; /* DCX flags */ |
| 2219 | @REPLY |
Alexandre Julliard | bc75f2f | 2005-03-31 15:36:57 +0000 | [diff] [blame] | 2220 | user_handle_t top_win; /* top window to clip against */ |
Ulrich Czekalla | 4bdf434 | 2006-12-07 10:43:59 -0500 | [diff] [blame] | 2221 | rectangle_t top_rect; /* top window visible rect with screen coords */ |
| 2222 | rectangle_t win_rect; /* window rect in screen coords */ |
Alexandre Julliard | 0f273c1 | 2006-07-26 10:43:25 +0200 | [diff] [blame] | 2223 | data_size_t total_size; /* total size of the resulting region */ |
Alexandre Julliard | bc75f2f | 2005-03-31 15:36:57 +0000 | [diff] [blame] | 2224 | VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */ |
Alexandre Julliard | e8d86b7 | 2004-06-23 20:44:58 +0000 | [diff] [blame] | 2225 | @END |
| 2226 | |
| 2227 | |
Alexandre Julliard | 618a7e5 | 2004-06-29 03:53:25 +0000 | [diff] [blame] | 2228 | /* Get the window region */ |
| 2229 | @REQ(get_window_region) |
| 2230 | user_handle_t window; /* handle to the window */ |
| 2231 | @REPLY |
Alexandre Julliard | 0f273c1 | 2006-07-26 10:43:25 +0200 | [diff] [blame] | 2232 | data_size_t total_size; /* total size of the resulting region */ |
Alexandre Julliard | 618a7e5 | 2004-06-29 03:53:25 +0000 | [diff] [blame] | 2233 | VARARG(region,rectangles); /* list of rectangles for the region */ |
| 2234 | @END |
| 2235 | |
| 2236 | |
| 2237 | /* Set the window region */ |
| 2238 | @REQ(set_window_region) |
| 2239 | user_handle_t window; /* handle to the window */ |
Alexandre Julliard | 1767b45 | 2007-03-05 16:43:09 +0100 | [diff] [blame] | 2240 | int redraw; /* redraw the window? */ |
Alexandre Julliard | 618a7e5 | 2004-06-29 03:53:25 +0000 | [diff] [blame] | 2241 | VARARG(region,rectangles); /* list of rectangles for the region */ |
| 2242 | @END |
| 2243 | |
| 2244 | |
Alexandre Julliard | 5defa49 | 2004-12-07 17:31:53 +0000 | [diff] [blame] | 2245 | /* Get the window update region */ |
| 2246 | @REQ(get_update_region) |
| 2247 | user_handle_t window; /* handle to the window */ |
Alexandre Julliard | db412aa | 2005-05-31 13:37:16 +0000 | [diff] [blame] | 2248 | user_handle_t from_child; /* child to start searching from */ |
Alexandre Julliard | 5defa49 | 2004-12-07 17:31:53 +0000 | [diff] [blame] | 2249 | unsigned int flags; /* update flags (see below) */ |
| 2250 | @REPLY |
| 2251 | user_handle_t child; /* child to repaint (or window itself) */ |
| 2252 | unsigned int flags; /* resulting update flags (see below) */ |
Alexandre Julliard | 0f273c1 | 2006-07-26 10:43:25 +0200 | [diff] [blame] | 2253 | data_size_t total_size; /* total size of the resulting region */ |
Alexandre Julliard | 5defa49 | 2004-12-07 17:31:53 +0000 | [diff] [blame] | 2254 | VARARG(region,rectangles); /* list of rectangles for the region */ |
| 2255 | @END |
| 2256 | #define UPDATE_NONCLIENT 0x01 /* get region for repainting non-client area */ |
| 2257 | #define UPDATE_ERASE 0x02 /* get region for erasing client area */ |
| 2258 | #define UPDATE_PAINT 0x04 /* get region for painting client area */ |
| 2259 | #define UPDATE_INTERNALPAINT 0x08 /* get region if internal paint is pending */ |
| 2260 | #define UPDATE_ALLCHILDREN 0x10 /* force repaint of all children */ |
| 2261 | #define UPDATE_NOCHILDREN 0x20 /* don't try to repaint any children */ |
| 2262 | #define UPDATE_NOREGION 0x40 /* don't return a region, only the flags */ |
| 2263 | |
| 2264 | |
Alexandre Julliard | 5054c79 | 2005-03-21 12:37:00 +0000 | [diff] [blame] | 2265 | /* Update the z order of a window so that a given rectangle is fully visible */ |
| 2266 | @REQ(update_window_zorder) |
| 2267 | user_handle_t window; /* handle to the window */ |
| 2268 | rectangle_t rect; /* rectangle that must be visible */ |
| 2269 | @END |
| 2270 | |
| 2271 | |
Alexandre Julliard | 5defa49 | 2004-12-07 17:31:53 +0000 | [diff] [blame] | 2272 | /* Mark parts of a window as needing a redraw */ |
| 2273 | @REQ(redraw_window) |
| 2274 | user_handle_t window; /* handle to the window */ |
| 2275 | unsigned int flags; /* RDW_* flags */ |
| 2276 | VARARG(region,rectangles); /* list of rectangles for the region */ |
| 2277 | @END |
| 2278 | |
| 2279 | |
Alexandre Julliard | 7a2017d | 2001-10-12 19:10:26 +0000 | [diff] [blame] | 2280 | /* Set a window property */ |
| 2281 | @REQ(set_window_property) |
| 2282 | user_handle_t window; /* handle to the window */ |
Alexandre Julliard | 9e73cdd | 2005-05-11 19:01:10 +0000 | [diff] [blame] | 2283 | atom_t atom; /* property atom (if no name specified) */ |
Alexandre Julliard | 5188574 | 2002-05-30 20:12:58 +0000 | [diff] [blame] | 2284 | obj_handle_t handle; /* handle to store */ |
Alexandre Julliard | 9e73cdd | 2005-05-11 19:01:10 +0000 | [diff] [blame] | 2285 | VARARG(name,unicode_str); /* property name */ |
Alexandre Julliard | 7a2017d | 2001-10-12 19:10:26 +0000 | [diff] [blame] | 2286 | @END |
| 2287 | |
| 2288 | |
| 2289 | /* Remove a window property */ |
| 2290 | @REQ(remove_window_property) |
| 2291 | user_handle_t window; /* handle to the window */ |
Alexandre Julliard | 9e73cdd | 2005-05-11 19:01:10 +0000 | [diff] [blame] | 2292 | atom_t atom; /* property atom (if no name specified) */ |
| 2293 | VARARG(name,unicode_str); /* property name */ |
Alexandre Julliard | 7a2017d | 2001-10-12 19:10:26 +0000 | [diff] [blame] | 2294 | @REPLY |
Alexandre Julliard | 5188574 | 2002-05-30 20:12:58 +0000 | [diff] [blame] | 2295 | obj_handle_t handle; /* handle stored in property */ |
Alexandre Julliard | 7a2017d | 2001-10-12 19:10:26 +0000 | [diff] [blame] | 2296 | @END |
| 2297 | |
| 2298 | |
| 2299 | /* Get a window property */ |
| 2300 | @REQ(get_window_property) |
| 2301 | user_handle_t window; /* handle to the window */ |
Alexandre Julliard | 9e73cdd | 2005-05-11 19:01:10 +0000 | [diff] [blame] | 2302 | atom_t atom; /* property atom (if no name specified) */ |
| 2303 | VARARG(name,unicode_str); /* property name */ |
Alexandre Julliard | 7a2017d | 2001-10-12 19:10:26 +0000 | [diff] [blame] | 2304 | @REPLY |
Alexandre Julliard | 5188574 | 2002-05-30 20:12:58 +0000 | [diff] [blame] | 2305 | obj_handle_t handle; /* handle stored in property */ |
Alexandre Julliard | 7a2017d | 2001-10-12 19:10:26 +0000 | [diff] [blame] | 2306 | @END |
| 2307 | |
| 2308 | |
| 2309 | /* Get the list of properties of a window */ |
| 2310 | @REQ(get_window_properties) |
| 2311 | user_handle_t window; /* handle to the window */ |
| 2312 | @REPLY |
Alexandre Julliard | 9caa71e | 2001-11-30 18:46:42 +0000 | [diff] [blame] | 2313 | int total; /* total number of properties */ |
Alexandre Julliard | 7a2017d | 2001-10-12 19:10:26 +0000 | [diff] [blame] | 2314 | VARARG(props,properties); /* list of properties */ |
| 2315 | @END |
Alexandre Julliard | ab5063b | 2002-10-11 18:50:15 +0000 | [diff] [blame] | 2316 | |
| 2317 | |
Alexandre Julliard | 1bf96e0 | 2005-06-08 18:44:50 +0000 | [diff] [blame] | 2318 | /* Create a window station */ |
| 2319 | @REQ(create_winstation) |
| 2320 | unsigned int flags; /* window station flags */ |
| 2321 | unsigned int access; /* wanted access rights */ |
Vitaliy Margolen | 83ef91c | 2005-11-21 12:05:38 +0000 | [diff] [blame] | 2322 | unsigned int attributes; /* object attributes */ |
Alexandre Julliard | 1bf96e0 | 2005-06-08 18:44:50 +0000 | [diff] [blame] | 2323 | VARARG(name,unicode_str); /* object name */ |
| 2324 | @REPLY |
| 2325 | obj_handle_t handle; /* handle to the window station */ |
| 2326 | @END |
| 2327 | |
| 2328 | |
| 2329 | /* Open a handle to a window station */ |
| 2330 | @REQ(open_winstation) |
| 2331 | unsigned int access; /* wanted access rights */ |
Vitaliy Margolen | 83ef91c | 2005-11-21 12:05:38 +0000 | [diff] [blame] | 2332 | unsigned int attributes; /* object attributes */ |
Alexandre Julliard | 1bf96e0 | 2005-06-08 18:44:50 +0000 | [diff] [blame] | 2333 | VARARG(name,unicode_str); /* object name */ |
| 2334 | @REPLY |
| 2335 | obj_handle_t handle; /* handle to the window station */ |
| 2336 | @END |
| 2337 | |
| 2338 | |
| 2339 | /* Close a window station */ |
| 2340 | @REQ(close_winstation) |
| 2341 | obj_handle_t handle; /* handle to the window station */ |
| 2342 | @END |
| 2343 | |
| 2344 | |
| 2345 | /* Get the process current window station */ |
| 2346 | @REQ(get_process_winstation) |
| 2347 | @REPLY |
| 2348 | obj_handle_t handle; /* handle to the window station */ |
| 2349 | @END |
| 2350 | |
| 2351 | |
| 2352 | /* Set the process current window station */ |
| 2353 | @REQ(set_process_winstation) |
| 2354 | obj_handle_t handle; /* handle to the window station */ |
| 2355 | @END |
| 2356 | |
| 2357 | |
| 2358 | /* Create a desktop */ |
| 2359 | @REQ(create_desktop) |
| 2360 | unsigned int flags; /* desktop flags */ |
| 2361 | unsigned int access; /* wanted access rights */ |
Vitaliy Margolen | 83ef91c | 2005-11-21 12:05:38 +0000 | [diff] [blame] | 2362 | unsigned int attributes; /* object attributes */ |
Alexandre Julliard | 1bf96e0 | 2005-06-08 18:44:50 +0000 | [diff] [blame] | 2363 | VARARG(name,unicode_str); /* object name */ |
| 2364 | @REPLY |
| 2365 | obj_handle_t handle; /* handle to the desktop */ |
| 2366 | @END |
| 2367 | |
| 2368 | |
| 2369 | /* Open a handle to a desktop */ |
| 2370 | @REQ(open_desktop) |
| 2371 | unsigned int flags; /* desktop flags */ |
| 2372 | unsigned int access; /* wanted access rights */ |
Vitaliy Margolen | 83ef91c | 2005-11-21 12:05:38 +0000 | [diff] [blame] | 2373 | unsigned int attributes; /* object attributes */ |
Alexandre Julliard | 1bf96e0 | 2005-06-08 18:44:50 +0000 | [diff] [blame] | 2374 | VARARG(name,unicode_str); /* object name */ |
| 2375 | @REPLY |
| 2376 | obj_handle_t handle; /* handle to the desktop */ |
| 2377 | @END |
| 2378 | |
| 2379 | |
| 2380 | /* Close a desktop */ |
| 2381 | @REQ(close_desktop) |
| 2382 | obj_handle_t handle; /* handle to the desktop */ |
| 2383 | @END |
| 2384 | |
| 2385 | |
| 2386 | /* Get the thread current desktop */ |
| 2387 | @REQ(get_thread_desktop) |
| 2388 | thread_id_t tid; /* thread id */ |
| 2389 | @REPLY |
| 2390 | obj_handle_t handle; /* handle to the desktop */ |
| 2391 | @END |
| 2392 | |
| 2393 | |
| 2394 | /* Set the thread current desktop */ |
| 2395 | @REQ(set_thread_desktop) |
| 2396 | obj_handle_t handle; /* handle to the desktop */ |
| 2397 | @END |
| 2398 | |
| 2399 | |
| 2400 | /* Get/set information about a user object (window station or desktop) */ |
| 2401 | @REQ(set_user_object_info) |
| 2402 | obj_handle_t handle; /* handle to the object */ |
| 2403 | unsigned int flags; /* information to set */ |
| 2404 | unsigned int obj_flags; /* new object flags */ |
| 2405 | @REPLY |
| 2406 | int is_desktop; /* is object a desktop? */ |
| 2407 | unsigned int old_obj_flags; /* old object flags */ |
| 2408 | VARARG(name,unicode_str); /* object name */ |
| 2409 | @END |
| 2410 | #define SET_USER_OBJECT_FLAGS 1 |
| 2411 | |
| 2412 | |
Alexandre Julliard | ab5063b | 2002-10-11 18:50:15 +0000 | [diff] [blame] | 2413 | /* Attach (or detach) thread inputs */ |
| 2414 | @REQ(attach_thread_input) |
| 2415 | thread_id_t tid_from; /* thread to be attached */ |
| 2416 | thread_id_t tid_to; /* thread to which tid_from should be attached */ |
| 2417 | int attach; /* is it an attach? */ |
| 2418 | @END |
| 2419 | |
| 2420 | |
| 2421 | /* Get input data for a given thread */ |
| 2422 | @REQ(get_thread_input) |
| 2423 | thread_id_t tid; /* id of thread */ |
| 2424 | @REPLY |
| 2425 | user_handle_t focus; /* handle to the focus window */ |
| 2426 | user_handle_t capture; /* handle to the capture window */ |
| 2427 | user_handle_t active; /* handle to the active window */ |
| 2428 | user_handle_t foreground; /* handle to the global foreground window */ |
| 2429 | user_handle_t menu_owner; /* handle to the menu owner */ |
| 2430 | user_handle_t move_size; /* handle to the moving/resizing window */ |
| 2431 | user_handle_t caret; /* handle to the caret window */ |
| 2432 | rectangle_t rect; /* caret rectangle */ |
| 2433 | @END |
Alexandre Julliard | 5030bda | 2002-10-11 23:41:06 +0000 | [diff] [blame] | 2434 | |
Mike McCormack | abe70f7 | 2005-04-28 12:04:14 +0000 | [diff] [blame] | 2435 | |
| 2436 | /* Get the time of the last input event */ |
| 2437 | @REQ(get_last_input_time) |
| 2438 | @REPLY |
| 2439 | unsigned int time; |
| 2440 | @END |
| 2441 | |
| 2442 | |
Alexandre Julliard | 8ba666f | 2003-01-08 19:56:31 +0000 | [diff] [blame] | 2443 | /* Retrieve queue keyboard state for a given thread */ |
| 2444 | @REQ(get_key_state) |
| 2445 | thread_id_t tid; /* id of thread */ |
| 2446 | int key; /* optional key code or -1 */ |
| 2447 | @REPLY |
| 2448 | unsigned char state; /* state of specified key */ |
| 2449 | VARARG(keystate,bytes); /* state array for all the keys */ |
| 2450 | @END |
| 2451 | |
| 2452 | /* Set queue keyboard state for a given thread */ |
| 2453 | @REQ(set_key_state) |
| 2454 | thread_id_t tid; /* id of thread */ |
| 2455 | VARARG(keystate,bytes); /* state array for all the keys */ |
| 2456 | @END |
| 2457 | |
Alexandre Julliard | 5030bda | 2002-10-11 23:41:06 +0000 | [diff] [blame] | 2458 | /* Set the system foreground window */ |
| 2459 | @REQ(set_foreground_window) |
| 2460 | user_handle_t handle; /* handle to the foreground window */ |
| 2461 | @REPLY |
| 2462 | user_handle_t previous; /* handle to the previous foreground window */ |
| 2463 | int send_msg_old; /* whether we have to send a msg to the old window */ |
| 2464 | int send_msg_new; /* whether we have to send a msg to the new window */ |
| 2465 | @END |
| 2466 | |
| 2467 | /* Set the current thread focus window */ |
| 2468 | @REQ(set_focus_window) |
| 2469 | user_handle_t handle; /* handle to the focus window */ |
| 2470 | @REPLY |
| 2471 | user_handle_t previous; /* handle to the previous focus window */ |
| 2472 | @END |
| 2473 | |
| 2474 | /* Set the current thread active window */ |
| 2475 | @REQ(set_active_window) |
| 2476 | user_handle_t handle; /* handle to the active window */ |
| 2477 | @REPLY |
| 2478 | user_handle_t previous; /* handle to the previous active window */ |
| 2479 | @END |
Alexandre Julliard | a9e8f59 | 2002-10-12 01:24:37 +0000 | [diff] [blame] | 2480 | |
| 2481 | /* Set the current thread capture window */ |
| 2482 | @REQ(set_capture_window) |
| 2483 | user_handle_t handle; /* handle to the capture window */ |
| 2484 | unsigned int flags; /* capture flags (see below) */ |
| 2485 | @REPLY |
| 2486 | user_handle_t previous; /* handle to the previous capture window */ |
| 2487 | user_handle_t full_handle; /* full 32-bit handle of new capture window */ |
| 2488 | @END |
| 2489 | #define CAPTURE_MENU 0x01 /* capture is for a menu */ |
| 2490 | #define CAPTURE_MOVESIZE 0x02 /* capture is for moving/resizing */ |
Alexandre Julliard | 11e3523 | 2002-10-17 01:24:33 +0000 | [diff] [blame] | 2491 | |
| 2492 | |
| 2493 | /* Set the current thread caret window */ |
| 2494 | @REQ(set_caret_window) |
| 2495 | user_handle_t handle; /* handle to the caret window */ |
| 2496 | int width; /* caret width */ |
| 2497 | int height; /* caret height */ |
| 2498 | @REPLY |
| 2499 | user_handle_t previous; /* handle to the previous caret window */ |
| 2500 | rectangle_t old_rect; /* previous caret rectangle */ |
| 2501 | int old_hide; /* previous hide count */ |
| 2502 | int old_state; /* previous caret state (1=on, 0=off) */ |
| 2503 | @END |
| 2504 | |
| 2505 | |
| 2506 | /* Set the current thread caret information */ |
| 2507 | @REQ(set_caret_info) |
| 2508 | unsigned int flags; /* caret flags (see below) */ |
| 2509 | user_handle_t handle; /* handle to the caret window */ |
| 2510 | int x; /* caret x position */ |
| 2511 | int y; /* caret y position */ |
| 2512 | int hide; /* increment for hide count (can be negative to show it) */ |
| 2513 | int state; /* caret state (1=on, 0=off, -1=toggle current state) */ |
| 2514 | @REPLY |
| 2515 | user_handle_t full_handle; /* handle to the current caret window */ |
| 2516 | rectangle_t old_rect; /* previous caret rectangle */ |
| 2517 | int old_hide; /* previous hide count */ |
| 2518 | int old_state; /* previous caret state (1=on, 0=off) */ |
| 2519 | @END |
| 2520 | #define SET_CARET_POS 0x01 /* set the caret position from x,y */ |
| 2521 | #define SET_CARET_HIDE 0x02 /* increment the caret hide count */ |
| 2522 | #define SET_CARET_STATE 0x04 /* set the caret on/off state */ |
Alexandre Julliard | 0286135 | 2002-10-29 00:41:42 +0000 | [diff] [blame] | 2523 | |
| 2524 | |
| 2525 | /* Set a window hook */ |
| 2526 | @REQ(set_hook) |
| 2527 | int id; /* id of the hook */ |
Dmitry Timoshkov | 6dba0a7 | 2005-02-03 16:40:20 +0000 | [diff] [blame] | 2528 | process_id_t pid; /* id of process to set the hook into */ |
Alexandre Julliard | 0286135 | 2002-10-29 00:41:42 +0000 | [diff] [blame] | 2529 | thread_id_t tid; /* id of thread to set the hook into */ |
Dmitry Timoshkov | 6dba0a7 | 2005-02-03 16:40:20 +0000 | [diff] [blame] | 2530 | int event_min; |
| 2531 | int event_max; |
| 2532 | int flags; |
Alexandre Julliard | 0286135 | 2002-10-29 00:41:42 +0000 | [diff] [blame] | 2533 | void* proc; /* hook procedure */ |
| 2534 | int unicode; /* is it a unicode hook? */ |
Alexandre Julliard | 14e68ba | 2002-11-20 19:54:32 +0000 | [diff] [blame] | 2535 | VARARG(module,unicode_str); /* module name */ |
Alexandre Julliard | 0286135 | 2002-10-29 00:41:42 +0000 | [diff] [blame] | 2536 | @REPLY |
| 2537 | user_handle_t handle; /* handle to the hook */ |
Alexandre Julliard | 6334235 | 2005-05-11 13:03:15 +0000 | [diff] [blame] | 2538 | unsigned int active_hooks; /* active hooks bitmap */ |
Alexandre Julliard | 0286135 | 2002-10-29 00:41:42 +0000 | [diff] [blame] | 2539 | @END |
| 2540 | |
| 2541 | |
| 2542 | /* Remove a window hook */ |
| 2543 | @REQ(remove_hook) |
| 2544 | user_handle_t handle; /* handle to the hook */ |
| 2545 | int id; /* id of the hook if handle is 0 */ |
| 2546 | void* proc; /* hook procedure if handle is 0 */ |
Alexandre Julliard | 6334235 | 2005-05-11 13:03:15 +0000 | [diff] [blame] | 2547 | @REPLY |
| 2548 | unsigned int active_hooks; /* active hooks bitmap */ |
Alexandre Julliard | 0286135 | 2002-10-29 00:41:42 +0000 | [diff] [blame] | 2549 | @END |
| 2550 | |
| 2551 | |
| 2552 | /* Start calling a hook chain */ |
| 2553 | @REQ(start_hook_chain) |
| 2554 | int id; /* id of the hook */ |
Dmitry Timoshkov | 6dba0a7 | 2005-02-03 16:40:20 +0000 | [diff] [blame] | 2555 | int event; /* signalled event */ |
| 2556 | user_handle_t window; /* handle to the event window */ |
| 2557 | int object_id; /* object id for out of context winevent */ |
| 2558 | int child_id; /* child id for out of context winevent */ |
Alexandre Julliard | 0286135 | 2002-10-29 00:41:42 +0000 | [diff] [blame] | 2559 | @REPLY |
| 2560 | user_handle_t handle; /* handle to the next hook */ |
Alexandre Julliard | ca3ac8f | 2003-07-11 21:55:58 +0000 | [diff] [blame] | 2561 | process_id_t pid; /* process id for low-level keyboard/mouse hooks */ |
| 2562 | thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */ |
Alexandre Julliard | 0286135 | 2002-10-29 00:41:42 +0000 | [diff] [blame] | 2563 | void* proc; /* hook procedure */ |
| 2564 | int unicode; /* is it a unicode hook? */ |
Alexandre Julliard | 6334235 | 2005-05-11 13:03:15 +0000 | [diff] [blame] | 2565 | unsigned int active_hooks; /* active hooks bitmap */ |
Alexandre Julliard | 14e68ba | 2002-11-20 19:54:32 +0000 | [diff] [blame] | 2566 | VARARG(module,unicode_str); /* module name */ |
Alexandre Julliard | 0286135 | 2002-10-29 00:41:42 +0000 | [diff] [blame] | 2567 | @END |
| 2568 | |
| 2569 | |
| 2570 | /* Finished calling a hook chain */ |
| 2571 | @REQ(finish_hook_chain) |
| 2572 | int id; /* id of the hook */ |
| 2573 | @END |
| 2574 | |
| 2575 | |
Alexandre Julliard | 2f80fcd | 2006-10-05 14:05:48 +0200 | [diff] [blame] | 2576 | /* Get the hook information */ |
| 2577 | @REQ(get_hook_info) |
Alexandre Julliard | 0286135 | 2002-10-29 00:41:42 +0000 | [diff] [blame] | 2578 | user_handle_t handle; /* handle to the current hook */ |
Alexandre Julliard | 2f80fcd | 2006-10-05 14:05:48 +0200 | [diff] [blame] | 2579 | int get_next; /* do we want info about current or next hook? */ |
Dmitry Timoshkov | 6dba0a7 | 2005-02-03 16:40:20 +0000 | [diff] [blame] | 2580 | int event; /* signalled event */ |
| 2581 | user_handle_t window; /* handle to the event window */ |
| 2582 | int object_id; /* object id for out of context winevent */ |
| 2583 | int child_id; /* child id for out of context winevent */ |
Alexandre Julliard | 0286135 | 2002-10-29 00:41:42 +0000 | [diff] [blame] | 2584 | @REPLY |
Alexandre Julliard | 2f80fcd | 2006-10-05 14:05:48 +0200 | [diff] [blame] | 2585 | user_handle_t handle; /* handle to the hook */ |
| 2586 | int id; /* id of the hook */ |
Alexandre Julliard | ca3ac8f | 2003-07-11 21:55:58 +0000 | [diff] [blame] | 2587 | process_id_t pid; /* process id for low-level keyboard/mouse hooks */ |
| 2588 | thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */ |
Alexandre Julliard | 2f80fcd | 2006-10-05 14:05:48 +0200 | [diff] [blame] | 2589 | void* proc; /* hook procedure */ |
Alexandre Julliard | 533f519 | 2006-10-05 14:04:25 +0200 | [diff] [blame] | 2590 | int unicode; /* is it a unicode hook? */ |
Alexandre Julliard | 14e68ba | 2002-11-20 19:54:32 +0000 | [diff] [blame] | 2591 | VARARG(module,unicode_str); /* module name */ |
Alexandre Julliard | 0286135 | 2002-10-29 00:41:42 +0000 | [diff] [blame] | 2592 | @END |
Ulrich Czekalla | b2df5f9 | 2003-06-23 23:02:02 +0000 | [diff] [blame] | 2593 | |
| 2594 | |
Alexandre Julliard | bfce151 | 2003-12-10 04:08:06 +0000 | [diff] [blame] | 2595 | /* Create a window class */ |
| 2596 | @REQ(create_class) |
| 2597 | int local; /* is it a local class? */ |
| 2598 | atom_t atom; /* class atom */ |
| 2599 | unsigned int style; /* class style */ |
| 2600 | void* instance; /* module instance */ |
| 2601 | int extra; /* number of extra class bytes */ |
| 2602 | int win_extra; /* number of window extra bytes */ |
Alexandre Julliard | bd13ab8 | 2003-12-11 05:34:53 +0000 | [diff] [blame] | 2603 | void* client_ptr; /* pointer to class in client address space */ |
Alexandre Julliard | bfce151 | 2003-12-10 04:08:06 +0000 | [diff] [blame] | 2604 | @END |
| 2605 | |
| 2606 | |
| 2607 | /* Destroy a window class */ |
| 2608 | @REQ(destroy_class) |
| 2609 | atom_t atom; /* class atom */ |
| 2610 | void* instance; /* module instance */ |
Alexandre Julliard | bd13ab8 | 2003-12-11 05:34:53 +0000 | [diff] [blame] | 2611 | @REPLY |
| 2612 | void* client_ptr; /* pointer to class in client address space */ |
Alexandre Julliard | bfce151 | 2003-12-10 04:08:06 +0000 | [diff] [blame] | 2613 | @END |
| 2614 | |
| 2615 | |
| 2616 | /* Set some information in a class */ |
| 2617 | @REQ(set_class_info) |
| 2618 | user_handle_t window; /* handle to the window */ |
| 2619 | unsigned int flags; /* flags for info to set (see below) */ |
| 2620 | atom_t atom; /* class atom */ |
| 2621 | unsigned int style; /* class style */ |
| 2622 | int win_extra; /* number of window extra bytes */ |
| 2623 | void* instance; /* module instance */ |
| 2624 | int extra_offset; /* offset to set in extra bytes */ |
Alexandre Julliard | 0f273c1 | 2006-07-26 10:43:25 +0200 | [diff] [blame] | 2625 | data_size_t extra_size; /* size to set in extra bytes */ |
Ge van Geldorp | 54afeb0 | 2006-07-10 08:59:22 +0200 | [diff] [blame] | 2626 | unsigned long extra_value; /* value to set in extra bytes */ |
Alexandre Julliard | bfce151 | 2003-12-10 04:08:06 +0000 | [diff] [blame] | 2627 | @REPLY |
| 2628 | atom_t old_atom; /* previous class atom */ |
| 2629 | unsigned int old_style; /* previous class style */ |
| 2630 | int old_extra; /* previous number of class extra bytes */ |
| 2631 | int old_win_extra; /* previous number of window extra bytes */ |
| 2632 | void* old_instance; /* previous module instance */ |
Ge van Geldorp | 54afeb0 | 2006-07-10 08:59:22 +0200 | [diff] [blame] | 2633 | unsigned long old_extra_value; /* old value in extra bytes */ |
Alexandre Julliard | bfce151 | 2003-12-10 04:08:06 +0000 | [diff] [blame] | 2634 | @END |
| 2635 | #define SET_CLASS_ATOM 0x0001 |
| 2636 | #define SET_CLASS_STYLE 0x0002 |
| 2637 | #define SET_CLASS_WINEXTRA 0x0004 |
| 2638 | #define SET_CLASS_INSTANCE 0x0008 |
| 2639 | #define SET_CLASS_EXTRA 0x0010 |
| 2640 | |
| 2641 | |
Ulrich Czekalla | b2df5f9 | 2003-06-23 23:02:02 +0000 | [diff] [blame] | 2642 | /* Set/get clipboard information */ |
| 2643 | @REQ(set_clipboard_info) |
| 2644 | unsigned int flags; /* flags for fields to set (see below) */ |
| 2645 | user_handle_t clipboard; /* clipboard window */ |
| 2646 | user_handle_t owner; /* clipboard owner */ |
| 2647 | user_handle_t viewer; /* first clipboard viewer */ |
| 2648 | unsigned int seqno; /* change sequence number */ |
| 2649 | @REPLY |
| 2650 | unsigned int flags; /* status flags (see below) */ |
| 2651 | user_handle_t old_clipboard; /* old clipboard window */ |
| 2652 | user_handle_t old_owner; /* old clipboard owner */ |
| 2653 | user_handle_t old_viewer; /* old clipboard viewer */ |
| 2654 | unsigned int seqno; /* current sequence number */ |
| 2655 | @END |
| 2656 | |
| 2657 | #define SET_CB_OPEN 0x001 |
| 2658 | #define SET_CB_OWNER 0x002 |
| 2659 | #define SET_CB_VIEWER 0x004 |
| 2660 | #define SET_CB_SEQNO 0x008 |
| 2661 | #define SET_CB_RELOWNER 0x010 |
| 2662 | #define SET_CB_CLOSE 0x020 |
| 2663 | #define CB_OPEN 0x040 |
| 2664 | #define CB_OWNER 0x080 |
Ulrich Czekalla | 5067909 | 2005-03-07 19:31:46 +0000 | [diff] [blame] | 2665 | #define CB_PROCESS 0x100 |
Mike McCormack | 36cd6f5 | 2003-07-24 00:07:00 +0000 | [diff] [blame] | 2666 | |
| 2667 | |
| 2668 | /* Open a security token */ |
| 2669 | @REQ(open_token) |
| 2670 | obj_handle_t handle; /* handle to the thread or process */ |
Alexandre Julliard | 836d07c | 2005-12-09 12:17:19 +0100 | [diff] [blame] | 2671 | unsigned int access; /* access rights to the new token */ |
| 2672 | unsigned int attributes;/* object attributes */ |
Mike McCormack | 36cd6f5 | 2003-07-24 00:07:00 +0000 | [diff] [blame] | 2673 | unsigned int flags; /* flags (see below) */ |
| 2674 | @REPLY |
| 2675 | obj_handle_t token; /* handle to the token */ |
| 2676 | @END |
| 2677 | #define OPEN_TOKEN_THREAD 1 |
| 2678 | #define OPEN_TOKEN_AS_SELF 2 |
Alexandre Julliard | 8d174d3 | 2003-10-07 03:40:23 +0000 | [diff] [blame] | 2679 | |
| 2680 | |
| 2681 | /* Set/get the global windows */ |
| 2682 | @REQ(set_global_windows) |
| 2683 | unsigned int flags; /* flags for fields to set (see below) */ |
| 2684 | user_handle_t shell_window; /* handle to the new shell window */ |
| 2685 | user_handle_t shell_listview; /* handle to the new shell listview window */ |
| 2686 | user_handle_t progman_window; /* handle to the new program manager window */ |
| 2687 | user_handle_t taskman_window; /* handle to the new task manager window */ |
| 2688 | @REPLY |
| 2689 | user_handle_t old_shell_window; /* handle to the shell window */ |
| 2690 | user_handle_t old_shell_listview; /* handle to the shell listview window */ |
| 2691 | user_handle_t old_progman_window; /* handle to the new program manager window */ |
| 2692 | user_handle_t old_taskman_window; /* handle to the new task manager window */ |
| 2693 | @END |
| 2694 | #define SET_GLOBAL_SHELL_WINDOWS 0x01 /* set both main shell and listview windows */ |
| 2695 | #define SET_GLOBAL_PROGMAN_WINDOW 0x02 |
| 2696 | #define SET_GLOBAL_TASKMAN_WINDOW 0x04 |
Robert Shearman | b0f02b2 | 2005-02-11 11:52:06 +0000 | [diff] [blame] | 2697 | |
| 2698 | /* Adjust the privileges held by a token */ |
| 2699 | @REQ(adjust_token_privileges) |
| 2700 | obj_handle_t handle; /* handle to the token */ |
| 2701 | int disable_all; /* disable all privileges? */ |
| 2702 | int get_modified_state; /* get modified privileges? */ |
| 2703 | VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to enable/disable/remove */ |
| 2704 | @REPLY |
| 2705 | unsigned int len; /* total length in bytes required to store token privileges */ |
| 2706 | VARARG(privileges,LUID_AND_ATTRIBUTES); /* modified privileges */ |
| 2707 | @END |
| 2708 | |
| 2709 | /* Retrieves the set of privileges held by or available to a token */ |
| 2710 | @REQ(get_token_privileges) |
| 2711 | obj_handle_t handle; /* handle to the token */ |
| 2712 | @REPLY |
| 2713 | unsigned int len; /* total length in bytes required to store token privileges */ |
| 2714 | VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */ |
| 2715 | @END |
| 2716 | |
Robert Shearman | d2ea92d | 2005-04-22 21:17:15 +0000 | [diff] [blame] | 2717 | /* Check the token has the required privileges */ |
| 2718 | @REQ(check_token_privileges) |
| 2719 | obj_handle_t handle; /* handle to the token */ |
| 2720 | int all_required; /* are all the privileges required for the check to succeed? */ |
| 2721 | VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to check */ |
| 2722 | @REPLY |
| 2723 | int has_privileges; /* does the token have the required privileges? */ |
| 2724 | VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */ |
| 2725 | @END |
| 2726 | |
Robert Shearman | b0f02b2 | 2005-02-11 11:52:06 +0000 | [diff] [blame] | 2727 | @REQ(duplicate_token) |
Alexandre Julliard | 836d07c | 2005-12-09 12:17:19 +0100 | [diff] [blame] | 2728 | obj_handle_t handle; /* handle to the token to duplicate */ |
| 2729 | unsigned int access; /* access rights to the new token */ |
| 2730 | unsigned int attributes; /* object attributes */ |
| 2731 | int primary; /* is the new token to be a primary one? */ |
Robert Shearman | b0f02b2 | 2005-02-11 11:52:06 +0000 | [diff] [blame] | 2732 | int impersonation_level; /* impersonation level of the new token */ |
| 2733 | @REPLY |
| 2734 | obj_handle_t new_handle; /* duplicated handle */ |
| 2735 | @END |
Mike McCormack | 2ab6a77 | 2005-03-30 19:02:15 +0000 | [diff] [blame] | 2736 | |
Robert Shearman | 4ad9341 | 2005-05-24 12:32:18 +0000 | [diff] [blame] | 2737 | @REQ(access_check) |
| 2738 | obj_handle_t handle; /* handle to the token */ |
| 2739 | unsigned int desired_access; /* desired access to the object */ |
| 2740 | unsigned int mapping_read; /* mapping from generic read to specific rights */ |
| 2741 | unsigned int mapping_write; /* mapping from generic write to specific rights */ |
| 2742 | unsigned int mapping_execute; /* mapping from generic execute to specific rights */ |
| 2743 | unsigned int mapping_all; /* mapping from generic all to specific rights */ |
| 2744 | VARARG(sd,security_descriptor); /* security descriptor to check */ |
| 2745 | @REPLY |
| 2746 | unsigned int access_granted; /* access rights actually granted */ |
| 2747 | unsigned int access_status; /* was access granted? */ |
| 2748 | unsigned int privileges_len; /* length needed to store privileges */ |
| 2749 | VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges used during access check */ |
| 2750 | @END |
Mike McCormack | 2ab6a77 | 2005-03-30 19:02:15 +0000 | [diff] [blame] | 2751 | |
Robert Shearman | 91eaea5 | 2005-07-18 13:22:55 +0000 | [diff] [blame] | 2752 | @REQ(get_token_user) |
| 2753 | obj_handle_t handle; /* handle to the token */ |
| 2754 | @REPLY |
Alexandre Julliard | 0f273c1 | 2006-07-26 10:43:25 +0200 | [diff] [blame] | 2755 | data_size_t user_len; /* length needed to store user */ |
Robert Shearman | 91eaea5 | 2005-07-18 13:22:55 +0000 | [diff] [blame] | 2756 | VARARG(user,SID); /* sid of the user the token represents */ |
| 2757 | @END |
| 2758 | |
Robert Shearman | 3396a66 | 2006-05-13 16:58:19 +0100 | [diff] [blame] | 2759 | @REQ(get_token_groups) |
| 2760 | obj_handle_t handle; /* handle to the token */ |
| 2761 | @REPLY |
Alexandre Julliard | 0f273c1 | 2006-07-26 10:43:25 +0200 | [diff] [blame] | 2762 | data_size_t user_len; /* length needed to store user */ |
Robert Shearman | 3396a66 | 2006-05-13 16:58:19 +0100 | [diff] [blame] | 2763 | VARARG(user,token_groups); /* groups the token's user belongs to */ |
| 2764 | @END |
| 2765 | |
Vitaliy Margolen | b0e9d7e | 2007-02-07 21:43:11 -0700 | [diff] [blame] | 2766 | @REQ(set_security_object) |
| 2767 | obj_handle_t handle; /* handle to the object */ |
| 2768 | unsigned int security_info; /* which parts of security descriptor to set */ |
| 2769 | VARARG(sd,security_descriptor); /* security descriptor to set */ |
| 2770 | @END |
| 2771 | |
Mike McCormack | 2ab6a77 | 2005-03-30 19:02:15 +0000 | [diff] [blame] | 2772 | /* Create a mailslot */ |
| 2773 | @REQ(create_mailslot) |
Vitaliy Margolen | a996000 | 2005-10-27 18:30:37 +0000 | [diff] [blame] | 2774 | unsigned int access; /* wanted access rights */ |
| 2775 | unsigned int attributes; /* object attributes */ |
Vitaliy Margolen | cf21d4d | 2005-12-05 13:30:26 +0100 | [diff] [blame] | 2776 | obj_handle_t rootdir; /* root directory */ |
Mike McCormack | 2ab6a77 | 2005-03-30 19:02:15 +0000 | [diff] [blame] | 2777 | unsigned int max_msgsize; |
Alexandre Julliard | aaf477f | 2007-04-17 20:08:59 +0200 | [diff] [blame] | 2778 | timeout_t read_timeout; |
Mike McCormack | 2ab6a77 | 2005-03-30 19:02:15 +0000 | [diff] [blame] | 2779 | VARARG(name,unicode_str); /* mailslot name */ |
| 2780 | @REPLY |
| 2781 | obj_handle_t handle; /* handle to the mailslot */ |
| 2782 | @END |
| 2783 | |
| 2784 | |
Mike McCormack | 2ab6a77 | 2005-03-30 19:02:15 +0000 | [diff] [blame] | 2785 | /* Set mailslot information */ |
| 2786 | @REQ(set_mailslot_info) |
| 2787 | obj_handle_t handle; /* handle to the mailslot */ |
| 2788 | unsigned int flags; |
Alexandre Julliard | aaf477f | 2007-04-17 20:08:59 +0200 | [diff] [blame] | 2789 | timeout_t read_timeout; |
Mike McCormack | 2ab6a77 | 2005-03-30 19:02:15 +0000 | [diff] [blame] | 2790 | @REPLY |
| 2791 | unsigned int max_msgsize; |
Alexandre Julliard | aaf477f | 2007-04-17 20:08:59 +0200 | [diff] [blame] | 2792 | timeout_t read_timeout; |
Mike McCormack | 2ab6a77 | 2005-03-30 19:02:15 +0000 | [diff] [blame] | 2793 | @END |
| 2794 | #define MAILSLOT_SET_READ_TIMEOUT 1 |
Vitaliy Margolen | 3c6bdcc | 2005-11-29 17:21:05 +0100 | [diff] [blame] | 2795 | |
| 2796 | |
| 2797 | /* Create a directory object */ |
| 2798 | @REQ(create_directory) |
| 2799 | unsigned int access; /* access flags */ |
| 2800 | unsigned int attributes; /* object attributes */ |
| 2801 | obj_handle_t rootdir; /* root directory */ |
| 2802 | VARARG(directory_name,unicode_str); /* Directory name */ |
| 2803 | @REPLY |
| 2804 | obj_handle_t handle; /* handle to the directory */ |
| 2805 | @END |
| 2806 | |
| 2807 | |
| 2808 | /* Open a directory object */ |
| 2809 | @REQ(open_directory) |
| 2810 | unsigned int access; /* access flags */ |
| 2811 | unsigned int attributes; /* object attributes */ |
| 2812 | obj_handle_t rootdir; /* root directory */ |
| 2813 | VARARG(directory_name,unicode_str); /* Directory name */ |
| 2814 | @REPLY |
| 2815 | obj_handle_t handle; /* handle to the directory */ |
| 2816 | @END |
Vitaliy Margolen | 80444df | 2005-11-30 19:22:57 +0100 | [diff] [blame] | 2817 | |
| 2818 | |
| 2819 | /* Create a symbolic link object */ |
| 2820 | @REQ(create_symlink) |
| 2821 | unsigned int access; /* access flags */ |
| 2822 | unsigned int attributes; /* object attributes */ |
| 2823 | obj_handle_t rootdir; /* root directory */ |
Alexandre Julliard | 0f273c1 | 2006-07-26 10:43:25 +0200 | [diff] [blame] | 2824 | data_size_t name_len; /* length of the symlink name in bytes */ |
Vitaliy Margolen | 80444df | 2005-11-30 19:22:57 +0100 | [diff] [blame] | 2825 | VARARG(name,unicode_str,name_len); /* symlink name */ |
| 2826 | VARARG(target_name,unicode_str); /* target name */ |
| 2827 | @REPLY |
| 2828 | obj_handle_t handle; /* handle to the symlink */ |
| 2829 | @END |
| 2830 | |
| 2831 | |
| 2832 | /* Open a symbolic link object */ |
| 2833 | @REQ(open_symlink) |
| 2834 | unsigned int access; /* access flags */ |
| 2835 | unsigned int attributes; /* object attributes */ |
| 2836 | obj_handle_t rootdir; /* root directory */ |
| 2837 | VARARG(name,unicode_str); /* symlink name */ |
| 2838 | @REPLY |
| 2839 | obj_handle_t handle; /* handle to the symlink */ |
| 2840 | @END |
| 2841 | |
| 2842 | |
| 2843 | /* Query a symbolic link object */ |
| 2844 | @REQ(query_symlink) |
| 2845 | obj_handle_t handle; /* handle to the symlink */ |
| 2846 | @REPLY |
| 2847 | VARARG(target_name,unicode_str); /* target name */ |
| 2848 | @END |
Vitaliy Margolen | bae7502 | 2007-01-24 23:43:04 -0700 | [diff] [blame] | 2849 | |
| 2850 | |
| 2851 | /* Query basic object information */ |
| 2852 | @REQ(get_object_info) |
| 2853 | obj_handle_t handle; /* handle to the object */ |
| 2854 | @REPLY |
| 2855 | unsigned int access; /* granted access mask */ |
| 2856 | unsigned int ref_count; /* object ref count */ |
| 2857 | @END |
Rob Shearman | d342d14 | 2007-02-21 17:10:45 +0000 | [diff] [blame] | 2858 | |
| 2859 | /* Query the impersonation level of an impersonation token */ |
| 2860 | @REQ(get_token_impersonation_level) |
| 2861 | obj_handle_t handle; /* handle to the object */ |
| 2862 | @REPLY |
| 2863 | int impersonation_level; /* impersonation level of the impersonation token */ |
| 2864 | @END |
Juan Lang | c2cb296 | 2007-03-06 16:33:26 -0800 | [diff] [blame] | 2865 | |
| 2866 | /* Allocate a locally-unique identifier */ |
| 2867 | @REQ(allocate_locally_unique_id) |
| 2868 | @REPLY |
| 2869 | luid_t luid; |
| 2870 | @END |
Alexandre Julliard | b43dc15 | 2007-05-08 20:28:37 +0200 | [diff] [blame] | 2871 | |
| 2872 | |
| 2873 | /* Create a device manager */ |
| 2874 | @REQ(create_device_manager) |
| 2875 | unsigned int access; /* wanted access rights */ |
| 2876 | unsigned int attributes; /* object attributes */ |
| 2877 | @REPLY |
| 2878 | obj_handle_t handle; /* handle to the device */ |
| 2879 | @END |
| 2880 | |
| 2881 | |
| 2882 | /* Create a device */ |
| 2883 | @REQ(create_device) |
| 2884 | unsigned int access; /* wanted access rights */ |
| 2885 | unsigned int attributes; /* object attributes */ |
| 2886 | obj_handle_t rootdir; /* root directory */ |
| 2887 | obj_handle_t manager; /* device manager */ |
| 2888 | void* user_ptr; /* opaque ptr for use by client */ |
| 2889 | VARARG(name,unicode_str); /* object name */ |
| 2890 | @REPLY |
| 2891 | obj_handle_t handle; /* handle to the device */ |
| 2892 | @END |
| 2893 | |
| 2894 | |
| 2895 | /* Delete a device */ |
| 2896 | @REQ(delete_device) |
| 2897 | obj_handle_t handle; /* handle to the device */ |
| 2898 | @END |
Alexandre Julliard | 78b7510 | 2007-05-08 20:40:26 +0200 | [diff] [blame] | 2899 | |
| 2900 | |
| 2901 | /* Retrieve the next pending device ioctl request */ |
| 2902 | @REQ(get_next_device_request) |
| 2903 | obj_handle_t manager; /* handle to the device manager */ |
| 2904 | obj_handle_t prev; /* handle to the previous ioctl */ |
| 2905 | unsigned int status; /* status of the previous ioctl */ |
| 2906 | VARARG(prev_data,bytes); /* output data of the previous ioctl */ |
| 2907 | @REPLY |
| 2908 | obj_handle_t next; /* handle to the next ioctl */ |
| 2909 | ioctl_code_t code; /* ioctl code */ |
| 2910 | void* user_ptr; /* opaque ptr for the device */ |
| 2911 | data_size_t in_size; /* total needed input size */ |
| 2912 | data_size_t out_size; /* needed output size */ |
| 2913 | VARARG(next_data,bytes); /* input data of the next ioctl */ |
| 2914 | @END |
Alexandre Julliard | 156b205 | 2007-06-06 20:33:13 +0200 | [diff] [blame] | 2915 | |
| 2916 | |
| 2917 | /* Make the current process a system process */ |
| 2918 | @REQ(make_process_system) |
| 2919 | @REPLY |
| 2920 | obj_handle_t event; /* event signaled when all user processes have exited */ |
| 2921 | @END |