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