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