blob: f064838f7d65ebf7b2fec05ee588f6e2f4a03429 [file] [log] [blame]
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001/* -*- 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 Julliard0799c1a2002-03-09 23:29:33 +00009 *
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 Ernst360a3f92006-05-18 14:49:52 +020022 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
Alexandre Julliard37ec9272001-07-19 00:35:37 +000023 */
24
25@HEADER /* start of C declarations */
26
Alexandre Julliarde0b52702003-09-08 19:04:01 +000027#include <stdarg.h>
Alexandre Julliard37ec9272001-07-19 00:35:37 +000028#include <stdlib.h>
29#include <time.h>
Alexandre Julliarde0b52702003-09-08 19:04:01 +000030
31#include <windef.h>
32#include <winbase.h>
Alexandre Julliard37ec9272001-07-19 00:35:37 +000033
Alexandre Julliard0d3d4562008-12-08 16:04:20 +010034typedef unsigned int obj_handle_t;
Alexandre Julliardd7641072008-12-08 16:57:38 +010035typedef unsigned int user_handle_t;
Alexandre Julliard0f273c12006-07-26 10:43:25 +020036typedef unsigned short atom_t;
37typedef unsigned int process_id_t;
38typedef unsigned int thread_id_t;
39typedef unsigned int data_size_t;
Alexandre Julliard737148c2007-04-17 22:06:13 +020040typedef unsigned int ioctl_code_t;
Alexandre Julliard3cd817b2008-12-24 12:06:18 +010041typedef unsigned __int64 lparam_t;
Alexandre Julliarda6216ab2008-12-17 19:43:40 +010042typedef unsigned __int64 apc_param_t;
Alexandre Julliard401f4b72008-12-17 19:25:09 +010043typedef unsigned __int64 mem_size_t;
Alexandre Julliard235532c2007-10-10 14:06:25 +020044typedef unsigned __int64 file_pos_t;
Alexandre Julliardf2c4e092008-12-29 16:47:51 +010045typedef unsigned __int64 client_ptr_t;
Alexandre Julliardcb2788e2008-12-29 16:41:44 +010046typedef client_ptr_t mod_handle_t;
Alexandre Julliard0f273c12006-07-26 10:43:25 +020047
Alexandre Julliard37ec9272001-07-19 00:35:37 +000048struct request_header
49{
Alexandre Julliard9caa71e2001-11-30 18:46:42 +000050 int req; /* request code */
Alexandre Julliard0f273c12006-07-26 10:43:25 +020051 data_size_t request_size; /* request variable part size */
52 data_size_t reply_size; /* reply variable part maximum size */
Alexandre Julliard37ec9272001-07-19 00:35:37 +000053};
54
55struct reply_header
56{
Alexandre Julliard9caa71e2001-11-30 18:46:42 +000057 unsigned int error; /* error result */
Alexandre Julliard0f273c12006-07-26 10:43:25 +020058 data_size_t reply_size; /* reply variable part size */
Alexandre Julliard37ec9272001-07-19 00:35:37 +000059};
60
61/* placeholder structure for the maximum allowed request size */
62/* this is used to construct the generic_request union */
63struct request_max_size
64{
65 int pad[16]; /* the max request size is 16 ints */
66};
67
Alexandre Julliard7695d692001-09-24 01:19:59 +000068#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 Julliard37ec9272001-07-19 00:35:37 +000072/* definitions of the event data depending on the event code */
73struct debug_event_exception
74{
75 EXCEPTION_RECORD record; /* exception record */
76 int first; /* first chance exception? */
77};
78struct debug_event_create_thread
79{
Alexandre Julliard51885742002-05-30 20:12:58 +000080 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 Julliard37ec9272001-07-19 00:35:37 +000083};
84struct debug_event_create_process
85{
Alexandre Julliard51885742002-05-30 20:12:58 +000086 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 Julliardcb2788e2008-12-29 16:41:44 +010089 mod_handle_t base; /* base of executable image */
Alexandre Julliard51885742002-05-30 20:12:58 +000090 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 Julliard947976f2008-12-29 17:10:11 +010094 client_ptr_t name; /* image name (optional) */
Alexandre Julliard51885742002-05-30 20:12:58 +000095 int unicode; /* is it Unicode? */
Alexandre Julliard37ec9272001-07-19 00:35:37 +000096};
97struct debug_event_exit
98{
Alexandre Julliard51885742002-05-30 20:12:58 +000099 int exit_code; /* thread or process exit code */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000100};
101struct debug_event_load_dll
102{
Alexandre Julliard51885742002-05-30 20:12:58 +0000103 obj_handle_t handle; /* file handle for the dll */
Alexandre Julliardcb2788e2008-12-29 16:41:44 +0100104 mod_handle_t base; /* base address of the dll */
Alexandre Julliard51885742002-05-30 20:12:58 +0000105 int dbg_offset; /* offset of debug info in file */
106 int dbg_size; /* size of debug info */
Alexandre Julliard947976f2008-12-29 17:10:11 +0100107 client_ptr_t name; /* image name (optional) */
Alexandre Julliard51885742002-05-30 20:12:58 +0000108 int unicode; /* is it Unicode? */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000109};
110struct debug_event_unload_dll
111{
Alexandre Julliardcb2788e2008-12-29 16:41:44 +0100112 mod_handle_t base; /* base address of the dll */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000113};
114struct debug_event_output_string
115{
Alexandre Julliard93737d52008-12-29 17:12:20 +0100116 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 Julliard37ec9272001-07-19 00:35:37 +0000119};
120struct debug_event_rip_info
121{
122 int error; /* ??? */
123 int type; /* ??? */
124};
125union 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 */
138typedef 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 */
145struct send_fd
146{
Alexandre Julliard54f22872002-10-03 19:54:57 +0000147 thread_id_t tid; /* thread id */
148 int fd; /* file descriptor on client-side */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000149};
150
151/* structure sent by the server on the wait fifo */
152struct wake_up_reply
153{
Alexandre Julliard45c99192008-12-29 17:19:26 +0100154 client_ptr_t cookie; /* magic cookie that was passed in select_request */
155 int signaled; /* wait result */
Alexandre Julliard7560a892008-12-30 15:15:06 +0100156 int __pad;
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000157};
158
Alexandre Julliardaaf477f2007-04-17 20:08:59 +0200159/* NT-style timeout, in 100ns units, negative means relative timeout */
160typedef __int64 timeout_t;
161#define TIMEOUT_INFINITE (((timeout_t)0x7fffffff) << 32 | 0xffffffff)
Alexandre Julliard462172a2003-04-02 22:48:59 +0000162
Alexandre Julliard7a2017d2001-10-12 19:10:26 +0000163/* structure returned in the list of window properties */
164typedef struct
165{
166 atom_t atom; /* property atom */
167 short string; /* was atom a string originally? */
Alexandre Julliard517b2f62008-12-10 16:21:32 +0100168 lparam_t data; /* data stored in property */
Alexandre Julliard7a2017d2001-10-12 19:10:26 +0000169} property_data_t;
170
Alexandre Julliard0d509652001-10-16 21:55:37 +0000171/* structure to specify window rectangles */
172typedef struct
173{
174 int left;
175 int top;
176 int right;
177 int bottom;
178} rectangle_t;
179
Alexandre Julliard111610c2007-03-20 20:21:12 +0100180/* structure for parameters of async I/O calls */
181typedef struct
182{
Alexandre Julliarda7b3efd2008-12-26 12:17:20 +0100183 obj_handle_t handle; /* object to perform I/O on */
184 obj_handle_t event; /* event to signal when done */
Alexandre Julliard111610c2007-03-20 20:21:12 +0100185 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 Julliardc16eb8e2007-03-27 16:42:27 +0200188 void *apc; /* user apc to call */
Alexandre Julliarddc7f1702008-12-15 13:29:38 +0100189 apc_param_t cvalue; /* completion value to use for completion events */
Alexandre Julliard111610c2007-03-20 20:21:12 +0100190} async_data_t;
191
Alexandre Julliard59dc4562006-10-04 16:04:53 +0200192/* structures for extra message data */
Alexandre Julliard29a3ce92006-10-04 16:29:45 +0200193
Alexandre Julliardd1d7b9f2008-12-24 11:59:09 +0100194struct 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 Julliard29a3ce92006-10-04 16:29:45 +0200202struct callback_msg_data
203{
Alexandre Julliard42614762008-12-30 14:02:07 +0100204 client_ptr_t callback; /* callback function */
Alexandre Julliard31282b32008-12-10 16:01:50 +0100205 lparam_t data; /* user data for callback */
206 lparam_t result; /* message result */
Alexandre Julliard29a3ce92006-10-04 16:29:45 +0200207};
208
Alexandre Julliard59dc4562006-10-04 16:04:53 +0200209struct winevent_msg_data
210{
211 user_handle_t hook; /* hook handle */
212 thread_id_t tid; /* thread id */
Alexandre Julliardcc55fd32008-12-29 17:35:35 +0100213 client_ptr_t hook_proc; /* hook proc address */
Alexandre Julliard59dc4562006-10-04 16:04:53 +0200214 /* followed by module name if any */
215};
216
217typedef union
218{
219 unsigned char bytes[1]; /* raw data for sent messages */
Alexandre Julliard29a3ce92006-10-04 16:29:45 +0200220 struct callback_msg_data callback;
Alexandre Julliard59dc4562006-10-04 16:04:53 +0200221 struct winevent_msg_data winevent;
222} message_data_t;
223
Alexandre Julliard9caa71e2001-11-30 18:46:42 +0000224/* structure for console char/attribute info */
225typedef struct
226{
227 WCHAR ch;
228 unsigned short attr;
229} char_info_t;
230
Juan Langc2cb2962007-03-06 16:33:26 -0800231typedef struct
232{
233 unsigned int low_part;
234 int high_part;
235} luid_t;
236
Robert Shearman7bff3542005-05-23 16:33:00 +0000237#define MAX_ACL_LEN 65535
238
239struct security_descriptor
240{
241 unsigned int control; /* SE_ flags */
Alexandre Julliard0f273c12006-07-26 10:43:25 +0200242 data_size_t owner_len;
243 data_size_t group_len;
244 data_size_t sacl_len;
245 data_size_t dacl_len;
Rob Shearmandd9e3922007-10-24 16:04:42 +0100246 /* VARARG(owner,SID); */
247 /* VARARG(group,SID); */
248 /* VARARG(sacl,ACL); */
249 /* VARARG(dacl,ACL); */
250};
251
252struct 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 Shearmanf98556c2007-10-26 17:01:33 +0100256 data_size_t name_len; /* length of the name string. may be 0 */
Rob Shearmandd9e3922007-10-24 16:04:42 +0100257 /* VARARG(sd,security_descriptor); */
258 /* VARARG(name,unicode_str); */
Robert Shearman7bff3542005-05-23 16:33:00 +0000259};
260
Robert Shearman3396a662006-05-13 16:58:19 +0100261struct token_groups
262{
263 unsigned int count;
264 /* unsigned int attributes[count]; */
Rob Shearmandd9e3922007-10-24 16:04:42 +0100265 /* VARARG(sids,SID); */
Robert Shearman3396a662006-05-13 16:58:19 +0100266};
267
Alexandre Julliardfb40dc42007-01-15 22:24:40 +0100268enum apc_type
269{
270 APC_NONE,
271 APC_USER,
272 APC_TIMER,
273 APC_ASYNC_IO,
274 APC_VIRTUAL_ALLOC,
Alexandre Julliard3d002392007-01-15 22:28:42 +0100275 APC_VIRTUAL_FREE,
Alexandre Julliard1ea96802007-01-15 22:30:04 +0100276 APC_VIRTUAL_QUERY,
Alexandre Julliard5a1ad742007-01-15 22:31:07 +0100277 APC_VIRTUAL_PROTECT,
Alexandre Julliardc1222602007-01-16 09:50:08 +0100278 APC_VIRTUAL_FLUSH,
279 APC_VIRTUAL_LOCK,
Alexandre Julliard8025f792007-01-18 15:02:55 +0100280 APC_VIRTUAL_UNLOCK,
Alexandre Julliard02e2fa772007-01-18 15:17:51 +0100281 APC_MAP_VIEW,
282 APC_UNMAP_VIEW,
Alexandre Julliard8025f792007-01-18 15:02:55 +0100283 APC_CREATE_THREAD
Alexandre Julliardfb40dc42007-01-15 22:24:40 +0100284};
Alexandre Julliard5c8421d2007-01-04 13:40:09 +0100285
286typedef 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 Julliarddc7f1702008-12-15 13:29:38 +0100293 apc_param_t args[3]; /* arguments for user function */
Alexandre Julliard5c8421d2007-01-04 13:40:09 +0100294 } user;
295 struct
296 {
Alexandre Julliard9b92a592008-12-29 17:43:01 +0100297 enum apc_type type; /* APC_TIMER */
Alexandre Julliard838803c2008-12-30 15:05:38 +0100298 int __pad;
Alexandre Julliard9b92a592008-12-29 17:43:01 +0100299 client_ptr_t func; /* void (__stdcall *func)(void*, unsigned int, unsigned int); */
Alexandre Julliardaaf477f2007-04-17 20:08:59 +0200300 timeout_t time; /* absolute time of expiration */
Alexandre Julliard9b92a592008-12-29 17:43:01 +0100301 client_ptr_t arg; /* user argument */
Alexandre Julliard5c8421d2007-01-04 13:40:09 +0100302 } timer;
303 struct
304 {
305 enum apc_type type; /* APC_ASYNC_IO */
Alexandre Julliardf6fa72d2008-12-15 13:30:25 +0100306 unsigned int (*func)(void*, void*, unsigned int, unsigned int *);
Alexandre Julliard5c8421d2007-01-04 13:40:09 +0100307 void *user; /* user pointer */
308 void *sb; /* status block */
309 unsigned int status; /* I/O status */
310 } async_io;
Alexandre Julliardfb40dc42007-01-15 22:24:40 +0100311 struct
312 {
313 enum apc_type type; /* APC_VIRTUAL_ALLOC */
Alexandre Julliard838803c2008-12-30 15:05:38 +0100314 unsigned int op_type; /* type of operation */
315 client_ptr_t addr; /* requested address */
Alexandre Julliard992d3ce2008-12-17 19:24:33 +0100316 mem_size_t size; /* allocation size */
Alexandre Julliardfb40dc42007-01-15 22:24:40 +0100317 unsigned int zero_bits; /* allocation alignment */
Alexandre Julliardfb40dc42007-01-15 22:24:40 +0100318 unsigned int prot; /* memory protection flags */
319 } virtual_alloc;
320 struct
321 {
322 enum apc_type type; /* APC_VIRTUAL_FREE */
Alexandre Julliardfb40dc42007-01-15 22:24:40 +0100323 unsigned int op_type; /* type of operation */
Alexandre Julliard838803c2008-12-30 15:05:38 +0100324 client_ptr_t addr; /* requested address */
325 mem_size_t size; /* allocation size */
Alexandre Julliardfb40dc42007-01-15 22:24:40 +0100326 } virtual_free;
Alexandre Julliard3d002392007-01-15 22:28:42 +0100327 struct
328 {
329 enum apc_type type; /* APC_VIRTUAL_QUERY */
Alexandre Julliard838803c2008-12-30 15:05:38 +0100330 int __pad;
331 client_ptr_t addr; /* requested address */
Alexandre Julliard3d002392007-01-15 22:28:42 +0100332 } virtual_query;
Alexandre Julliard1ea96802007-01-15 22:30:04 +0100333 struct
334 {
335 enum apc_type type; /* APC_VIRTUAL_PROTECT */
Alexandre Julliard1ea96802007-01-15 22:30:04 +0100336 unsigned int prot; /* new protection flags */
Alexandre Julliard838803c2008-12-30 15:05:38 +0100337 client_ptr_t addr; /* requested address */
338 mem_size_t size; /* requested size */
Alexandre Julliard1ea96802007-01-15 22:30:04 +0100339 } virtual_protect;
Alexandre Julliard5a1ad742007-01-15 22:31:07 +0100340 struct
341 {
342 enum apc_type type; /* APC_VIRTUAL_FLUSH */
Alexandre Julliard838803c2008-12-30 15:05:38 +0100343 int __pad;
344 client_ptr_t addr; /* requested address */
Alexandre Julliard992d3ce2008-12-17 19:24:33 +0100345 mem_size_t size; /* requested size */
Alexandre Julliard5a1ad742007-01-15 22:31:07 +0100346 } virtual_flush;
Alexandre Julliardc1222602007-01-16 09:50:08 +0100347 struct
348 {
349 enum apc_type type; /* APC_VIRTUAL_LOCK */
Alexandre Julliard838803c2008-12-30 15:05:38 +0100350 int __pad;
351 client_ptr_t addr; /* requested address */
Alexandre Julliard992d3ce2008-12-17 19:24:33 +0100352 mem_size_t size; /* requested size */
Alexandre Julliardc1222602007-01-16 09:50:08 +0100353 } virtual_lock;
354 struct
355 {
356 enum apc_type type; /* APC_VIRTUAL_UNLOCK */
Alexandre Julliard838803c2008-12-30 15:05:38 +0100357 int __pad;
358 client_ptr_t addr; /* requested address */
Alexandre Julliard992d3ce2008-12-17 19:24:33 +0100359 mem_size_t size; /* requested size */
Alexandre Julliardc1222602007-01-16 09:50:08 +0100360 } virtual_unlock;
Alexandre Julliard8025f792007-01-18 15:02:55 +0100361 struct
362 {
Alexandre Julliard02e2fa772007-01-18 15:17:51 +0100363 enum apc_type type; /* APC_MAP_VIEW */
364 obj_handle_t handle; /* mapping handle */
Alexandre Julliard838803c2008-12-30 15:05:38 +0100365 client_ptr_t addr; /* requested address */
Alexandre Julliard992d3ce2008-12-17 19:24:33 +0100366 mem_size_t size; /* allocation size */
Alexandre Julliard235532c2007-10-10 14:06:25 +0200367 file_pos_t offset; /* file offset */
Alexandre Julliard02e2fa772007-01-18 15:17:51 +0100368 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 Julliard838803c2008-12-30 15:05:38 +0100375 int __pad;
376 client_ptr_t addr; /* view address */
Alexandre Julliard02e2fa772007-01-18 15:17:51 +0100377 } unmap_view;
378 struct
379 {
Alexandre Julliard8025f792007-01-18 15:02:55 +0100380 enum apc_type type; /* APC_CREATE_THREAD */
381 void (__stdcall *func)(void*); /* start function */
382 void *arg; /* argument for start function */
Alexandre Julliard992d3ce2008-12-17 19:24:33 +0100383 mem_size_t reserve; /* reserve size for thread stack */
384 mem_size_t commit; /* commit size for thread stack */
Alexandre Julliard8025f792007-01-18 15:02:55 +0100385 int suspend; /* suspended thread? */
386 } create_thread;
Alexandre Julliard5c8421d2007-01-04 13:40:09 +0100387} apc_call_t;
388
Alexandre Julliardfb40dc42007-01-15 22:24:40 +0100389typedef union
390{
391 enum apc_type type;
392 struct
393 {
Alexandre Julliard50975c82007-03-20 19:27:10 +0100394 enum apc_type type; /* APC_ASYNC_IO */
395 unsigned int status; /* new status of async operation */
Alexandre Julliardf6fa72d2008-12-15 13:30:25 +0100396 unsigned int total; /* bytes transferred */
Alexandre Julliard50975c82007-03-20 19:27:10 +0100397 } async_io;
398 struct
399 {
Alexandre Julliardfb40dc42007-01-15 22:24:40 +0100400 enum apc_type type; /* APC_VIRTUAL_ALLOC */
401 unsigned int status; /* status returned by call */
Alexandre Julliard838803c2008-12-30 15:05:38 +0100402 client_ptr_t addr; /* resulting address */
Alexandre Julliard992d3ce2008-12-17 19:24:33 +0100403 mem_size_t size; /* resulting size */
Alexandre Julliardfb40dc42007-01-15 22:24:40 +0100404 } virtual_alloc;
405 struct
406 {
407 enum apc_type type; /* APC_VIRTUAL_FREE */
408 unsigned int status; /* status returned by call */
Alexandre Julliard838803c2008-12-30 15:05:38 +0100409 client_ptr_t addr; /* resulting address */
Alexandre Julliard992d3ce2008-12-17 19:24:33 +0100410 mem_size_t size; /* resulting size */
Alexandre Julliardfb40dc42007-01-15 22:24:40 +0100411 } virtual_free;
Alexandre Julliard3d002392007-01-15 22:28:42 +0100412 struct
413 {
414 enum apc_type type; /* APC_VIRTUAL_QUERY */
415 unsigned int status; /* status returned by call */
Alexandre Julliard838803c2008-12-30 15:05:38 +0100416 client_ptr_t base; /* resulting base address */
417 client_ptr_t alloc_base;/* resulting allocation base */
Alexandre Julliard992d3ce2008-12-17 19:24:33 +0100418 mem_size_t size; /* resulting region size */
Alexandre Julliard3d002392007-01-15 22:28:42 +0100419 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 Julliard1ea96802007-01-15 22:30:04 +0100424 struct
425 {
426 enum apc_type type; /* APC_VIRTUAL_PROTECT */
427 unsigned int status; /* status returned by call */
Alexandre Julliard838803c2008-12-30 15:05:38 +0100428 client_ptr_t addr; /* resulting address */
Alexandre Julliard992d3ce2008-12-17 19:24:33 +0100429 mem_size_t size; /* resulting size */
Alexandre Julliard1ea96802007-01-15 22:30:04 +0100430 unsigned int prot; /* old protection flags */
431 } virtual_protect;
Alexandre Julliard5a1ad742007-01-15 22:31:07 +0100432 struct
433 {
434 enum apc_type type; /* APC_VIRTUAL_FLUSH */
435 unsigned int status; /* status returned by call */
Alexandre Julliard838803c2008-12-30 15:05:38 +0100436 client_ptr_t addr; /* resulting address */
Alexandre Julliard992d3ce2008-12-17 19:24:33 +0100437 mem_size_t size; /* resulting size */
Alexandre Julliard5a1ad742007-01-15 22:31:07 +0100438 } virtual_flush;
Alexandre Julliardc1222602007-01-16 09:50:08 +0100439 struct
440 {
441 enum apc_type type; /* APC_VIRTUAL_LOCK */
442 unsigned int status; /* status returned by call */
Alexandre Julliard838803c2008-12-30 15:05:38 +0100443 client_ptr_t addr; /* resulting address */
Alexandre Julliard992d3ce2008-12-17 19:24:33 +0100444 mem_size_t size; /* resulting size */
Alexandre Julliardc1222602007-01-16 09:50:08 +0100445 } virtual_lock;
446 struct
447 {
448 enum apc_type type; /* APC_VIRTUAL_UNLOCK */
449 unsigned int status; /* status returned by call */
Alexandre Julliard838803c2008-12-30 15:05:38 +0100450 client_ptr_t addr; /* resulting address */
Alexandre Julliard992d3ce2008-12-17 19:24:33 +0100451 mem_size_t size; /* resulting size */
Alexandre Julliardc1222602007-01-16 09:50:08 +0100452 } virtual_unlock;
Alexandre Julliard8025f792007-01-18 15:02:55 +0100453 struct
454 {
Alexandre Julliard02e2fa772007-01-18 15:17:51 +0100455 enum apc_type type; /* APC_MAP_VIEW */
456 unsigned int status; /* status returned by call */
Alexandre Julliard838803c2008-12-30 15:05:38 +0100457 client_ptr_t addr; /* resulting address */
Alexandre Julliard992d3ce2008-12-17 19:24:33 +0100458 mem_size_t size; /* resulting size */
Alexandre Julliard02e2fa772007-01-18 15:17:51 +0100459 } 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 Julliard8025f792007-01-18 15:02:55 +0100467 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 Julliardfb40dc42007-01-15 22:24:40 +0100472} apc_result_t;
473
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000474/****************************************************************/
475/* Request declarations */
476
477/* Create a new process from the context of the parent */
478@REQ(new_process)
Alexandre Julliardc316f0e2006-07-19 14:00:10 +0200479 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 Julliard37ec9272001-07-19 00:35:37 +0000492@REPLY
Alexandre Julliardc316f0e2006-07-19 14:00:10 +0200493 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 Julliard37ec9272001-07-19 00:35:37 +0000498@END
499
500
501/* Retrieve information about a newly started process */
502@REQ(get_new_process_info)
Alexandre Julliardf2d7dd62005-12-09 12:13:11 +0100503 obj_handle_t info; /* info handle returned from new_process_request */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000504@REPLY
Alexandre Julliard9d802152002-05-24 21:20:27 +0000505 int success; /* did the process start successfully? */
Alexandre Julliardc316f0e2006-07-19 14:00:10 +0200506 int exit_code; /* process exit code if failed */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000507@END
508
509
510/* Create a new thread from the context of the parent */
511@REQ(new_thread)
Alexandre Julliardf2d7dd62005-12-09 12:13:11 +0100512 unsigned int access; /* wanted access rights */
513 unsigned int attributes; /* object attributes */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000514 int suspend; /* new thread should be suspended on creation */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000515 int request_fd; /* fd for request pipe */
516@REPLY
Alexandre Julliard54f22872002-10-03 19:54:57 +0000517 thread_id_t tid; /* thread id */
Alexandre Julliard51885742002-05-30 20:12:58 +0000518 obj_handle_t handle; /* thread handle (in the current process) */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000519@END
520
521
Alexandre Julliard6543a652002-03-29 18:28:56 +0000522/* Retrieve the new process startup info */
523@REQ(get_startup_info)
Alexandre Julliard6543a652002-03-29 18:28:56 +0000524@REPLY
Alexandre Julliard01caa5e2005-07-12 20:27:09 +0000525 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 Julliard6543a652002-03-29 18:28:56 +0000529 VARARG(info,startup_info); /* startup information */
Alexandre Julliardc4ec2102004-07-16 03:54:35 +0000530 VARARG(env,unicode_str); /* environment */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000531@END
532
533
534/* Signal the end of the process initialization */
535@REQ(init_process_done)
Alexandre Julliardf2c4e092008-12-29 16:47:51 +0100536 int gui; /* is it a GUI process? */
Alexandre Julliardcb2788e2008-12-29 16:41:44 +0100537 mod_handle_t module; /* main module base address */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000538 void* entry; /* process entry point */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000539@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 Julliarda8497bd2003-03-22 21:00:09 +0000545 int unix_tid; /* Unix tid of new thread */
Alexandre Julliarde0dcf4f2006-10-04 21:41:32 +0200546 int debug_level; /* new debug level */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000547 void* teb; /* TEB of new thread (in thread address space) */
Alexandre Julliard0424f382005-07-13 12:12:43 +0000548 void* peb; /* address of PEB (in thread address space) */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000549 void* entry; /* thread entry point (in thread address space) */
Alexandre Julliard0424f382005-07-13 12:12:43 +0000550 void* ldt_copy; /* address of LDT copy (in thread address space) */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000551 int reply_fd; /* fd for reply pipe */
552 int wait_fd; /* fd for blocking calls pipe */
553@REPLY
Alexandre Julliard54f22872002-10-03 19:54:57 +0000554 process_id_t pid; /* process id of the new thread's process */
555 thread_id_t tid; /* thread id of the new thread */
Alexandre Julliard0f273c12006-07-26 10:43:25 +0200556 data_size_t info_size; /* total size of startup info */
Alexandre Julliardaaf477f2007-04-17 20:08:59 +0200557 timeout_t server_start; /* server start time */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000558 int version; /* protocol version */
559@END
560
561
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000562/* Terminate a process */
563@REQ(terminate_process)
Alexandre Julliard51885742002-05-30 20:12:58 +0000564 obj_handle_t handle; /* process handle to terminate */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000565 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 Julliard51885742002-05-30 20:12:58 +0000573 obj_handle_t handle; /* thread handle to terminate */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000574 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 Julliard51885742002-05-30 20:12:58 +0000583 obj_handle_t handle; /* process handle */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000584@REPLY
Alexandre Julliard54f22872002-10-03 19:54:57 +0000585 process_id_t pid; /* server process id */
Eric Pouechb0fd2ad2004-06-14 17:02:00 +0000586 process_id_t ppid; /* server process id of parent */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000587 int exit_code; /* process exit code */
588 int priority; /* priority class */
Alexandre Julliard3bf12b92008-01-16 21:02:04 +0100589 unsigned int affinity; /* process affinity mask */
Eric Pouechb0fd2ad2004-06-14 17:02:00 +0000590 void* peb; /* PEB address in process address space */
Alexandre Julliardaaf477f2007-04-17 20:08:59 +0200591 timeout_t start_time; /* process start time */
592 timeout_t end_time; /* process end time */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000593@END
594
595
596/* Set a process informations */
597@REQ(set_process_info)
Alexandre Julliard51885742002-05-30 20:12:58 +0000598 obj_handle_t handle; /* process handle */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000599 int mask; /* setting mask (see below) */
600 int priority; /* priority class */
Alexandre Julliard3bf12b92008-01-16 21:02:04 +0100601 unsigned int affinity; /* affinity mask */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000602@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 Cumming24f4ece2002-11-25 01:33:38 +0000609 obj_handle_t handle; /* thread handle */
610 thread_id_t tid_in; /* thread id (optional) */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000611@REPLY
Alexandre Julliard4f196ea2003-07-09 02:57:57 +0000612 process_id_t pid; /* server process id */
Ryan Cumming24f4ece2002-11-25 01:33:38 +0000613 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 Julliard3bf12b92008-01-16 21:02:04 +0100617 unsigned int affinity; /* thread affinity mask */
Alexandre Julliardaaf477f2007-04-17 20:08:59 +0200618 timeout_t creation_time; /* thread creation time */
619 timeout_t exit_time; /* thread exit time */
Eric Pouech8cb932e2006-10-01 08:17:27 +0200620 int last; /* last thread in process */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000621@END
622
623
624/* Set a thread informations */
625@REQ(set_thread_info)
Alexandre Julliard51885742002-05-30 20:12:58 +0000626 obj_handle_t handle; /* thread handle */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000627 int mask; /* setting mask (see below) */
628 int priority; /* priority class */
Alexandre Julliard3bf12b92008-01-16 21:02:04 +0100629 unsigned int affinity; /* affinity mask */
Robert Shearman4bba2162005-06-20 13:18:38 +0000630 obj_handle_t token; /* impersonation token */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000631@END
632#define SET_THREAD_INFO_PRIORITY 0x01
633#define SET_THREAD_INFO_AFFINITY 0x02
Robert Shearman4bba2162005-06-20 13:18:38 +0000634#define SET_THREAD_INFO_TOKEN 0x04
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000635
636
Eric Pouech2359b572003-01-09 00:01:28 +0000637/* Retrieve information about a module */
638@REQ(get_dll_info)
639 obj_handle_t handle; /* process handle */
Alexandre Julliardcb2788e2008-12-29 16:41:44 +0100640 mod_handle_t base_address; /* base address of module */
Eric Pouech2359b572003-01-09 00:01:28 +0000641@REPLY
Eric Pouech2359b572003-01-09 00:01:28 +0000642 void* entry_point;
Alexandre Julliard77cf8032008-12-09 11:50:05 +0100643 data_size_t size; /* module size */
Rob Shearmanbf2a35b2007-11-20 09:30:50 +0000644 data_size_t filename_len; /* buffer len in bytes required to store filename */
Alexandre Julliardc30cefb2003-09-30 01:04:19 +0000645 VARARG(filename,unicode_str); /* file name of module */
Eric Pouech2359b572003-01-09 00:01:28 +0000646@END
647
648
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000649/* Suspend a thread */
650@REQ(suspend_thread)
Alexandre Julliard51885742002-05-30 20:12:58 +0000651 obj_handle_t handle; /* thread handle */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000652@REPLY
653 int count; /* new suspend count */
654@END
655
656
657/* Resume a thread */
658@REQ(resume_thread)
Alexandre Julliard51885742002-05-30 20:12:58 +0000659 obj_handle_t handle; /* thread handle */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000660@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 Julliard51885742002-05-30 20:12:58 +0000667 obj_handle_t handle; /* file handle */
Alexandre Julliardcb2788e2008-12-29 16:41:44 +0100668 mod_handle_t base; /* base address */
Alexandre Julliard947976f2008-12-29 17:10:11 +0100669 client_ptr_t name; /* ptr to ptr to name (in process addr space) */
Alexandre Julliard77cf8032008-12-09 11:50:05 +0100670 data_size_t size; /* dll size */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000671 int dbg_offset; /* debug info offset */
672 int dbg_size; /* debug info size */
Alexandre Julliardc30cefb2003-09-30 01:04:19 +0000673 VARARG(filename,unicode_str); /* file name of dll */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000674@END
675
676
677/* Notify the server that a dll is being unloaded */
678@REQ(unload_dll)
Alexandre Julliardcb2788e2008-12-29 16:41:44 +0100679 mod_handle_t base; /* base address */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000680@END
681
682
Alexandre Julliard6ca1d1b2007-01-15 22:26:32 +0100683/* Queue an APC for a thread or process */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000684@REQ(queue_apc)
Alexandre Julliardb660aaa2008-12-26 12:19:41 +0100685 obj_handle_t handle; /* thread or process handle */
Alexandre Julliard5c8421d2007-01-04 13:40:09 +0100686 apc_call_t call; /* call arguments */
Alexandre Julliard6ca1d1b2007-01-15 22:26:32 +0100687@REPLY
688 obj_handle_t handle; /* APC handle */
Alexandre Julliardf3cb4f72007-01-18 15:41:05 +0100689 int self; /* run APC in caller itself? */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000690@END
691
692
Alexandre Julliardfb40dc42007-01-15 22:24:40 +0100693/* 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 Julliard37ec9272001-07-19 00:35:37 +0000701/* Close a handle for the current process */
702@REQ(close_handle)
Alexandre Julliard51885742002-05-30 20:12:58 +0000703 obj_handle_t handle; /* handle to close */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000704@END
705
706
707/* Set a handle information */
708@REQ(set_handle_info)
Alexandre Julliard51885742002-05-30 20:12:58 +0000709 obj_handle_t handle; /* handle we are interested in */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000710 int flags; /* new handle flags */
711 int mask; /* mask for flags to set */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000712@REPLY
713 int old_flags; /* old flag value */
Alexandre Julliard38502f72005-08-23 18:43:50 +0000714@END
715
716
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000717/* Duplicate a handle */
718@REQ(dup_handle)
Alexandre Julliard51885742002-05-30 20:12:58 +0000719 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 Julliard37ec9272001-07-19 00:35:37 +0000722 unsigned int access; /* wanted access rights */
Alexandre Julliard7b910f42005-12-09 12:21:35 +0100723 unsigned int attributes; /* object attributes */
724 unsigned int options; /* duplicate options (see below) */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000725@REPLY
Alexandre Julliard51885742002-05-30 20:12:58 +0000726 obj_handle_t handle; /* duplicated handle in dst process */
Alexandre Julliard34103542007-01-18 12:18:51 +0100727 int self; /* is the source the current process? */
Alexandre Julliard28418cc2006-11-02 20:48:19 +0100728 int closed; /* whether the source handle has been closed */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000729@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 Julliard54f22872002-10-03 19:54:57 +0000737 process_id_t pid; /* process id to open */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000738 unsigned int access; /* wanted access rights */
Alexandre Julliardf2d7dd62005-12-09 12:13:11 +0100739 unsigned int attributes; /* object attributes */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000740@REPLY
Alexandre Julliard51885742002-05-30 20:12:58 +0000741 obj_handle_t handle; /* handle to the process */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000742@END
743
744
Chris Morgan417296c2002-04-02 00:49:05 +0000745/* Open a handle to a thread */
746@REQ(open_thread)
Alexandre Julliard54f22872002-10-03 19:54:57 +0000747 thread_id_t tid; /* thread id to open */
Chris Morgan417296c2002-04-02 00:49:05 +0000748 unsigned int access; /* wanted access rights */
Alexandre Julliardf2d7dd62005-12-09 12:13:11 +0100749 unsigned int attributes; /* object attributes */
Chris Morgan417296c2002-04-02 00:49:05 +0000750@REPLY
Alexandre Julliard51885742002-05-30 20:12:58 +0000751 obj_handle_t handle; /* handle to the thread */
Chris Morgan417296c2002-04-02 00:49:05 +0000752@END
753
754
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000755/* Wait for handles */
756@REQ(select)
757 int flags; /* wait flags (see below) */
Alexandre Julliard45c99192008-12-29 17:19:26 +0100758 client_ptr_t cookie; /* magic cookie to return to client */
Mike McCormackf92fff62005-04-24 17:35:52 +0000759 obj_handle_t signal; /* object to signal (0 if none) */
Alexandre Julliardfec51172007-07-16 16:14:45 +0200760 obj_handle_t prev_apc; /* handle to previous APC */
Alexandre Julliardaaf477f2007-04-17 20:08:59 +0200761 timeout_t timeout; /* timeout */
Alexandre Julliardfec51172007-07-16 16:14:45 +0200762 VARARG(result,apc_result); /* result of previous APC */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000763 VARARG(handles,handles); /* handles to select on */
Alexandre Julliardaaf477f2007-04-17 20:08:59 +0200764@REPLY
765 timeout_t timeout; /* timeout converted to absolute */
Alexandre Julliardfec51172007-07-16 16:14:45 +0200766 apc_call_t call; /* APC call arguments */
Alexandre Julliard838803c2008-12-30 15:05:38 +0100767 obj_handle_t apc_handle; /* handle to next APC */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000768@END
769#define SELECT_ALL 1
770#define SELECT_ALERTABLE 2
771#define SELECT_INTERRUPTIBLE 4
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000772
773
774/* Create an event */
775@REQ(create_event)
Eric Pouech44158dd2004-12-02 18:05:37 +0000776 unsigned int access; /* wanted access rights */
Vitaliy Margolena9960002005-10-27 18:30:37 +0000777 unsigned int attributes; /* object attributes */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000778 int manual_reset; /* manual reset event */
779 int initial_state; /* initial state of the event */
Rob Shearmandd9e3922007-10-24 16:04:42 +0100780 VARARG(objattr,object_attributes); /* object attributes */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000781@REPLY
Alexandre Julliard51885742002-05-30 20:12:58 +0000782 obj_handle_t handle; /* handle to the event */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000783@END
784
785/* Event operation */
786@REQ(event_op)
Alexandre Julliard51885742002-05-30 20:12:58 +0000787 obj_handle_t handle; /* handle to event */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000788 int op; /* event operation (see below) */
789@END
790enum 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 Margolena9960002005-10-27 18:30:37 +0000796 unsigned int attributes; /* object attributes */
Vitaliy Margolenf676bc82005-12-02 15:55:48 +0100797 obj_handle_t rootdir; /* root directory */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000798 VARARG(name,unicode_str); /* object name */
799@REPLY
Alexandre Julliard51885742002-05-30 20:12:58 +0000800 obj_handle_t handle; /* handle to the event */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000801@END
802
803
804/* Create a mutex */
805@REQ(create_mutex)
Eric Pouech44158dd2004-12-02 18:05:37 +0000806 unsigned int access; /* wanted access rights */
Vitaliy Margolena9960002005-10-27 18:30:37 +0000807 unsigned int attributes; /* object attributes */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000808 int owned; /* initially owned? */
Rob Shearman1f863212007-10-25 15:43:05 +0100809 VARARG(objattr,object_attributes); /* object attributes */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000810@REPLY
Alexandre Julliard51885742002-05-30 20:12:58 +0000811 obj_handle_t handle; /* handle to the mutex */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000812@END
813
814
815/* Release a mutex */
816@REQ(release_mutex)
Alexandre Julliard51885742002-05-30 20:12:58 +0000817 obj_handle_t handle; /* handle to the mutex */
Eric Pouech44158dd2004-12-02 18:05:37 +0000818@REPLY
819 unsigned int prev_count; /* value of internal counter, before release */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000820@END
821
822
823/* Open a mutex */
824@REQ(open_mutex)
825 unsigned int access; /* wanted access rights */
Vitaliy Margolena9960002005-10-27 18:30:37 +0000826 unsigned int attributes; /* object attributes */
Vitaliy Margolenf676bc82005-12-02 15:55:48 +0100827 obj_handle_t rootdir; /* root directory */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000828 VARARG(name,unicode_str); /* object name */
829@REPLY
Alexandre Julliard51885742002-05-30 20:12:58 +0000830 obj_handle_t handle; /* handle to the mutex */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000831@END
832
833
834/* Create a semaphore */
835@REQ(create_semaphore)
Eric Pouech44158dd2004-12-02 18:05:37 +0000836 unsigned int access; /* wanted access rights */
Vitaliy Margolena9960002005-10-27 18:30:37 +0000837 unsigned int attributes; /* object attributes */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000838 unsigned int initial; /* initial count */
839 unsigned int max; /* maximum count */
Rob Shearmanb0e5fb42007-10-25 15:42:53 +0100840 VARARG(objattr,object_attributes); /* object attributes */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000841@REPLY
Alexandre Julliard51885742002-05-30 20:12:58 +0000842 obj_handle_t handle; /* handle to the semaphore */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000843@END
844
845
846/* Release a semaphore */
847@REQ(release_semaphore)
Alexandre Julliard51885742002-05-30 20:12:58 +0000848 obj_handle_t handle; /* handle to the semaphore */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000849 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 Margolena9960002005-10-27 18:30:37 +0000858 unsigned int attributes; /* object attributes */
Vitaliy Margolen5daae3d2005-12-02 16:01:17 +0100859 obj_handle_t rootdir; /* root directory */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000860 VARARG(name,unicode_str); /* object name */
861@REPLY
Alexandre Julliard51885742002-05-30 20:12:58 +0000862 obj_handle_t handle; /* handle to the semaphore */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000863@END
864
865
866/* Create a file */
867@REQ(create_file)
868 unsigned int access; /* wanted access rights */
Alexandre Julliard27b1aec2005-12-09 12:00:48 +0100869 unsigned int attributes; /* object attributes */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000870 unsigned int sharing; /* sharing flags */
871 int create; /* file create action */
Alexandre Julliard014099c2004-03-12 01:56:49 +0000872 unsigned int options; /* file options */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000873 unsigned int attrs; /* file attributes for creation */
Rob Shearman5f5df832007-10-26 17:02:16 +0100874 VARARG(objattr,object_attributes); /* object attributes */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000875 VARARG(filename,string); /* file name */
876@REPLY
Alexandre Julliard51885742002-05-30 20:12:58 +0000877 obj_handle_t handle; /* handle to the file */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000878@END
879
880
Alexandre Julliard67505c02005-12-12 14:27:45 +0100881/* 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 Julliard94655c82007-03-22 11:52:40 +0100887 unsigned int options; /* file options */
Alexandre Julliard67505c02005-12-12 14:27:45 +0100888 VARARG(filename,unicode_str); /* file name */
889@REPLY
890 obj_handle_t handle; /* handle to the file */
891@END
892
893
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000894/* Allocate a file handle for a Unix fd */
895@REQ(alloc_file_handle)
896 unsigned int access; /* wanted access rights */
Alexandre Julliard27b1aec2005-12-09 12:00:48 +0100897 unsigned int attributes; /* object attributes */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000898 int fd; /* file descriptor on the client side */
899@REPLY
Alexandre Julliard51885742002-05-30 20:12:58 +0000900 obj_handle_t handle; /* handle to the file */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000901@END
902
903
904/* Get a Unix fd to access a file */
905@REQ(get_handle_fd)
Alexandre Julliard51885742002-05-30 20:12:58 +0000906 obj_handle_t handle; /* handle to the file */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000907@REPLY
Alexandre Julliard89304272006-11-20 14:14:04 +0100908 int type; /* file type (see below) */
Alexandre Julliardd85121f2007-04-10 22:32:46 +0200909 int removable; /* is file removable? */
910 unsigned int access; /* file access rights */
911 unsigned int options; /* file open options */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000912@END
Alexandre Julliard89304272006-11-20 14:14:04 +0100913enum 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 Julliard133b8bc2007-04-23 15:13:22 +0200922 FD_TYPE_CHAR, /* unspecified char device */
Alexandre Julliard89304272006-11-20 14:14:04 +0100923 FD_TYPE_DEVICE, /* Windows device file */
924 FD_TYPE_NB_TYPES
925};
Alexandre Julliardd85121f2007-04-10 22:32:46 +0200926
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000927
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000928/* Flush a file buffers */
929@REQ(flush_file)
Alexandre Julliard51885742002-05-30 20:12:58 +0000930 obj_handle_t handle; /* handle to the file */
Mike McCormackef8b9462003-05-15 04:22:45 +0000931@REPLY
932 obj_handle_t event; /* event set when finished */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000933@END
934
935
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000936/* Lock a region of a file */
937@REQ(lock_file)
Alexandre Julliard51885742002-05-30 20:12:58 +0000938 obj_handle_t handle; /* handle to the file */
Alexandre Julliard235532c2007-10-10 14:06:25 +0200939 file_pos_t offset; /* offset of start of lock */
940 file_pos_t count; /* count of bytes to lock */
Alexandre Julliardce613492003-03-18 05:04:33 +0000941 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 Julliard37ec9272001-07-19 00:35:37 +0000946@END
947
948
949/* Unlock a region of a file */
950@REQ(unlock_file)
Alexandre Julliard51885742002-05-30 20:12:58 +0000951 obj_handle_t handle; /* handle to the file */
Alexandre Julliard235532c2007-10-10 14:06:25 +0200952 file_pos_t offset; /* offset of start of unlock */
953 file_pos_t count; /* count of bytes to unlock */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000954@END
955
956
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000957/* Create a socket */
958@REQ(create_socket)
959 unsigned int access; /* wanted access rights */
Alexandre Julliardbc303032005-12-09 11:58:55 +0100960 unsigned int attributes; /* object attributes */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000961 int family; /* family, see socket manpage */
962 int type; /* type, see socket manpage */
963 int protocol; /* protocol, see socket manpage */
Martin Wilckaa477052002-01-09 21:16:24 +0000964 unsigned int flags; /* socket flags */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000965@REPLY
Alexandre Julliard51885742002-05-30 20:12:58 +0000966 obj_handle_t handle; /* handle to the new socket */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000967@END
968
969
970/* Accept a socket */
971@REQ(accept_socket)
Alexandre Julliard51885742002-05-30 20:12:58 +0000972 obj_handle_t lhandle; /* handle to the listening socket */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000973 unsigned int access; /* wanted access rights */
Alexandre Julliardbc303032005-12-09 11:58:55 +0100974 unsigned int attributes; /* object attributes */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000975@REPLY
Alexandre Julliard51885742002-05-30 20:12:58 +0000976 obj_handle_t handle; /* handle to the new socket */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000977@END
978
979
980/* Set socket event parameters */
981@REQ(set_socket_event)
Alexandre Julliard51885742002-05-30 20:12:58 +0000982 obj_handle_t handle; /* handle to the socket */
Alexandre Julliard81f2a732002-03-23 20:43:52 +0000983 unsigned int mask; /* event mask */
Alexandre Julliard51885742002-05-30 20:12:58 +0000984 obj_handle_t event; /* event object */
Alexandre Julliard81f2a732002-03-23 20:43:52 +0000985 user_handle_t window; /* window to send the message to */
986 unsigned int msg; /* message to send */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000987@END
988
989
990/* Get socket event parameters */
991@REQ(get_socket_event)
Alexandre Julliard51885742002-05-30 20:12:58 +0000992 obj_handle_t handle; /* handle to the socket */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000993 int service; /* clear pending? */
Alexandre Julliard51885742002-05-30 20:12:58 +0000994 obj_handle_t c_event; /* event to clear */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000995@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 Julliard51885742002-05-30 20:12:58 +00001005 obj_handle_t handle; /* handle to the socket */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001006 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 Wilckd15bf1c2002-04-23 22:03:42 +00001011@REQ(set_socket_deferred)
Alexandre Julliard51885742002-05-30 20:12:58 +00001012 obj_handle_t handle; /* handle to the socket */
1013 obj_handle_t deferred; /* handle to the socket for which accept() is deferred */
Martin Wilckd15bf1c2002-04-23 22:03:42 +00001014@END
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001015
Eric Pouech0b83d4c2001-11-23 23:04:58 +00001016/* Allocate a console (only used by a console renderer) */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001017@REQ(alloc_console)
1018 unsigned int access; /* wanted access rights */
Alexandre Julliard7a096602005-12-09 12:05:20 +01001019 unsigned int attributes; /* object attributes */
Alexandre Julliard54f22872002-10-03 19:54:57 +00001020 process_id_t pid; /* pid of process which shall be attached to the console */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001021@REPLY
Alexandre Julliard51885742002-05-30 20:12:58 +00001022 obj_handle_t handle_in; /* handle to console input */
1023 obj_handle_t event; /* handle to renderer events change notification */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001024@END
1025
1026
1027/* Free the console of the current process */
1028@REQ(free_console)
1029@END
1030
1031
Eric Pouech0b83d4c2001-11-23 23:04:58 +00001032#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
1041struct 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 Julliard51885742002-05-30 20:12:58 +00001078 obj_handle_t handle; /* handle to console input events */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001079@REPLY
Eric Pouech0b83d4c2001-11-23 23:04:58 +00001080 VARARG(data,bytes); /* the various console_renderer_events */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001081@END
1082
1083
Eric Pouech0b83d4c2001-11-23 23:04:58 +00001084/* Open a handle to the process console */
1085@REQ(open_console)
Mike McCormackfac494c2006-06-07 18:33:46 +09001086 obj_handle_t from; /* 0 (resp 1) input (resp output) of current process console */
Eric Pouech0b83d4c2001-11-23 23:04:58 +00001087 /* otherwise console_in handle to get active screen buffer? */
1088 unsigned int access; /* wanted access rights */
Alexandre Julliard7a096602005-12-09 12:05:20 +01001089 unsigned int attributes; /* object attributes */
Eric Pouech0b83d4c2001-11-23 23:04:58 +00001090 int share; /* share mask (only for output handles) */
1091@REPLY
Alexandre Julliard51885742002-05-30 20:12:58 +00001092 obj_handle_t handle; /* handle to the console */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001093@END
1094
1095
Eric Pouech412d37f2003-06-21 02:07:10 +00001096/* Get the input queue wait event */
1097@REQ(get_console_wait_event)
1098@REPLY
1099 obj_handle_t handle;
1100@END
1101
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001102/* Get a console mode (input or output) */
1103@REQ(get_console_mode)
Alexandre Julliard51885742002-05-30 20:12:58 +00001104 obj_handle_t handle; /* handle to the console */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001105@REPLY
1106 int mode; /* console mode */
1107@END
1108
1109
1110/* Set a console mode (input or output) */
1111@REQ(set_console_mode)
Alexandre Julliard51885742002-05-30 20:12:58 +00001112 obj_handle_t handle; /* handle to the console */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001113 int mode; /* console mode */
1114@END
1115
1116
Eric Pouech0b83d4c2001-11-23 23:04:58 +00001117/* Set info about a console (input only) */
1118@REQ(set_console_input_info)
Kirill K. Smirnovf3e13172007-08-23 19:17:17 +04001119 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 Pouech0b83d4c2001-11-23 23:04:58 +00001129@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 Pouechfa8b85a2003-01-09 06:01:32 +00001134#define SET_CONSOLE_INPUT_INFO_EDITION_MODE 0x10
Kirill K. Smirnov9d746612007-05-10 21:19:47 +04001135#define SET_CONSOLE_INPUT_INFO_INPUT_CODEPAGE 0x20
1136#define SET_CONSOLE_INPUT_INFO_OUTPUT_CODEPAGE 0x40
Kirill K. Smirnovf3e13172007-08-23 19:17:17 +04001137#define SET_CONSOLE_INPUT_INFO_WIN 0x80
Eric Pouech0b83d4c2001-11-23 23:04:58 +00001138
1139
1140/* Get info about a console (input only) */
1141@REQ(get_console_input_info)
Kirill K. Smirnovf3e13172007-08-23 19:17:17 +04001142 obj_handle_t handle; /* handle to console input, or 0 for process' console */
Eric Pouech0b83d4c2001-11-23 23:04:58 +00001143@REPLY
Kirill K. Smirnovf3e13172007-08-23 19:17:17 +04001144 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 Pouech0b83d4c2001-11-23 23:04:58 +00001152@END
1153
1154
1155/* appends a string to console's history */
1156@REQ(append_console_input_history)
Alexandre Julliard51885742002-05-30 20:12:58 +00001157 obj_handle_t handle; /* handle to console input, or 0 for process' console */
Eric Pouech0b83d4c2001-11-23 23:04:58 +00001158 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 Julliard51885742002-05-30 20:12:58 +00001164 obj_handle_t handle; /* handle to console input, or 0 for process' console */
Eric Pouech0b83d4c2001-11-23 23:04:58 +00001165 int index; /* index to get line from */
1166@REPLY
Alexandre Julliard9caa71e2001-11-30 18:46:42 +00001167 int total; /* total length of line in Unicode chars */
Eric Pouech0b83d4c2001-11-23 23:04:58 +00001168 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 Julliard51885742002-05-30 20:12:58 +00001174 obj_handle_t handle_in; /* handle to console input, or 0 for process' console */
Alexandre Julliard7a096602005-12-09 12:05:20 +01001175 unsigned int access; /* wanted access rights */
1176 unsigned int attributes; /* object attributes */
1177 unsigned int share; /* sharing credentials */
Eric Pouech0b83d4c2001-11-23 23:04:58 +00001178@REPLY
Alexandre Julliard51885742002-05-30 20:12:58 +00001179 obj_handle_t handle_out; /* handle to the screen buffer */
Eric Pouech0b83d4c2001-11-23 23:04:58 +00001180@END
1181
1182
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001183/* Set info about a console (output only) */
Eric Pouech0b83d4c2001-11-23 23:04:58 +00001184@REQ(set_console_output_info)
Alexandre Julliard51885742002-05-30 20:12:58 +00001185 obj_handle_t handle; /* handle to the console */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001186 int mask; /* setting mask (see below) */
Eric Pouech0b83d4c2001-11-23 23:04:58 +00001187 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 Julliard37ec9272001-07-19 00:35:37 +00001200@END
Eric Pouech0b83d4c2001-11-23 23:04:58 +00001201#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 Julliard37ec9272001-07-19 00:35:37 +00001208
1209/* Get info about a console (output only) */
Eric Pouech0b83d4c2001-11-23 23:04:58 +00001210@REQ(get_console_output_info)
Alexandre Julliard51885742002-05-30 20:12:58 +00001211 obj_handle_t handle; /* handle to the console */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001212@REPLY
Eric Pouech0b83d4c2001-11-23 23:04:58 +00001213 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 Julliard37ec9272001-07-19 00:35:37 +00001226@END
1227
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001228/* Add input records to a console input queue */
1229@REQ(write_console_input)
Alexandre Julliard51885742002-05-30 20:12:58 +00001230 obj_handle_t handle; /* handle to the console input */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001231 VARARG(rec,input_records); /* input records */
1232@REPLY
1233 int written; /* number of records written */
1234@END
1235
Eric Pouech0b83d4c2001-11-23 23:04:58 +00001236
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001237/* Fetch input records from a console input queue */
1238@REQ(read_console_input)
Alexandre Julliard51885742002-05-30 20:12:58 +00001239 obj_handle_t handle; /* handle to the console input */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001240 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 Pouech0b83d4c2001-11-23 23:04:58 +00001247/* write data (chars and/or attributes) in a screen buffer */
1248@REQ(write_console_output)
Alexandre Julliard51885742002-05-30 20:12:58 +00001249 obj_handle_t handle; /* handle to the console output */
Alexandre Julliard9caa71e2001-11-30 18:46:42 +00001250 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 Pouech0b83d4c2001-11-23 23:04:58 +00001254 VARARG(data,bytes); /* info to write */
1255@REPLY
Alexandre Julliard9caa71e2001-11-30 18:46:42 +00001256 int written; /* number of char infos actually written */
1257 int width; /* width of screen buffer */
1258 int height; /* height of screen buffer */
Eric Pouech0b83d4c2001-11-23 23:04:58 +00001259@END
Alexandre Julliard9caa71e2001-11-30 18:46:42 +00001260enum 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 Pouech0b83d4c2001-11-23 23:04:58 +00001267
1268
Alexandre Julliard9caa71e2001-11-30 18:46:42 +00001269/* fill a screen buffer with constant data (chars and/or attributes) */
1270@REQ(fill_console_output)
Alexandre Julliard51885742002-05-30 20:12:58 +00001271 obj_handle_t handle; /* handle to the console output */
Alexandre Julliard9caa71e2001-11-30 18:46:42 +00001272 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 Pouech0b83d4c2001-11-23 23:04:58 +00001278@REPLY
Alexandre Julliard9caa71e2001-11-30 18:46:42 +00001279 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 Julliard51885742002-05-30 20:12:58 +00001285 obj_handle_t handle; /* handle to the console output */
Alexandre Julliard9caa71e2001-11-30 18:46:42 +00001286 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 Pouech0b83d4c2001-11-23 23:04:58 +00001293 VARARG(data,bytes);
1294@END
1295
Eric Pouech93bfa0d2002-06-02 21:22:22 +00001296
Eric Pouech0b83d4c2001-11-23 23:04:58 +00001297/* move a rect (of data) in screen buffer content */
1298@REQ(move_console_output)
Alexandre Julliard51885742002-05-30 20:12:58 +00001299 obj_handle_t handle; /* handle to the console output */
Eric Pouech0b83d4c2001-11-23 23:04:58 +00001300 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 Pouech93bfa0d2002-06-02 21:22:22 +00001309/* Sends a signal to a process group */
1310@REQ(send_console_signal)
1311 int signal; /* the signal to send */
Alexandre Julliard54f22872002-10-03 19:54:57 +00001312 process_id_t group_id; /* the group to send the signal to */
Eric Pouech93bfa0d2002-06-02 21:22:22 +00001313@END
1314
1315
Mike McCormack08351072006-01-27 12:13:56 +01001316/* enable directory change notifications */
1317@REQ(read_directory_changes)
Alexandre Julliarde0dcf4f2006-10-04 21:41:32 +02001318 unsigned int filter; /* notification filter */
Mike McCormacke4faabf2006-02-21 16:58:19 +09001319 int subtree; /* watch the subtree? */
Mike McCormack0790f952006-02-07 16:50:36 +01001320 int want_data; /* flag indicating whether change data should be collected */
Alexandre Julliard111610c2007-03-20 20:21:12 +01001321 async_data_t async; /* async I/O parameters */
Mike McCormack01932112006-02-06 11:58:55 +01001322@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 Julliard37ec9272001-07-19 00:35:37 +00001330@END
1331
1332
1333/* Create a file mapping */
1334@REQ(create_mapping)
Vitaliy Margolena9960002005-10-27 18:30:37 +00001335 unsigned int access; /* wanted access rights */
1336 unsigned int attributes; /* object attributes */
Alexandre Julliard29d97592008-12-17 19:25:49 +01001337 mem_size_t size; /* mapping size */
Alexandre Julliard0b0b6c32008-11-04 13:05:32 +01001338 unsigned int protect; /* protection flags (see below) */
Alexandre Julliard51885742002-05-30 20:12:58 +00001339 obj_handle_t file_handle; /* file handle */
Rob Shearman23df4532007-10-25 19:09:54 +01001340 VARARG(objattr,object_attributes); /* object attributes */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001341@REPLY
Alexandre Julliard51885742002-05-30 20:12:58 +00001342 obj_handle_t handle; /* handle to the mapping */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001343@END
Alexandre Julliard0b0b6c32008-11-04 13:05:32 +01001344/* per-page protection flags */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001345#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 Julliardaf8bb2e2008-11-25 12:07:35 +01001352#define VPROT_WRITEWATCH 0x80
Alexandre Julliard0b0b6c32008-11-04 13:05:32 +01001353/* 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 Julliard7e947872008-11-04 13:16:01 +01001357#define VPROT_NOEXEC 0x0800 /* don't force exec permission */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001358
1359
1360/* Open a mapping */
1361@REQ(open_mapping)
1362 unsigned int access; /* wanted access rights */
Vitaliy Margolena9960002005-10-27 18:30:37 +00001363 unsigned int attributes; /* object attributes */
Vitaliy Margolen348a3d92005-12-02 16:13:13 +01001364 obj_handle_t rootdir; /* root directory */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001365 VARARG(name,unicode_str); /* object name */
1366@REPLY
Alexandre Julliard51885742002-05-30 20:12:58 +00001367 obj_handle_t handle; /* handle to the mapping */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001368@END
1369
1370
1371/* Get information about a file mapping */
1372@REQ(get_mapping_info)
Alexandre Julliard51885742002-05-30 20:12:58 +00001373 obj_handle_t handle; /* handle to the mapping */
Alexandre Julliard5e2ed6b2008-11-05 20:32:32 +01001374 unsigned int access; /* wanted access rights */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001375@REPLY
Alexandre Julliard29d97592008-12-17 19:25:49 +01001376 mem_size_t size; /* mapping size */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001377 int protect; /* protection flags */
1378 int header_size; /* header size (for VPROT_IMAGE mapping) */
Alexandre Julliardd066a9a2008-12-30 14:18:21 +01001379 client_ptr_t base; /* default base addr (for VPROT_IMAGE mapping) */
Alexandre Julliard4cbe8672007-01-12 14:55:31 +01001380 obj_handle_t mapping; /* duplicate mapping handle unless removable */
Alexandre Julliard51885742002-05-30 20:12:58 +00001381 obj_handle_t shared_file; /* shared mapping file handle */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001382@END
1383
1384
Alexandre Julliardcdce50f2008-11-05 12:24:05 +01001385/* 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 Julliard29d97592008-12-17 19:25:49 +01001390 mem_size_t size; /* size of range starting at offset (page-aligned, in bytes) */
Alexandre Julliardcdce50f2008-11-05 12:24:05 +01001391 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 Julliard29d97592008-12-17 19:25:49 +01001399 mem_size_t size; /* size to set (page-aligned, in bytes) or 0 if only retrieving */
Alexandre Julliardcdce50f2008-11-05 12:24:05 +01001400@END
1401
1402
Alexandre Julliarddb6e4542008-12-09 11:49:37 +01001403#define SNAP_PROCESS 0x00000001
1404#define SNAP_THREAD 0x00000002
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001405/* Create a snapshot */
1406@REQ(create_snapshot)
Alexandre Julliardf11d0a32005-12-09 12:09:44 +01001407 unsigned int attributes; /* object attributes */
Alexandre Julliarddb6e4542008-12-09 11:49:37 +01001408 unsigned int flags; /* snapshot flags (SNAP_*) */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001409@REPLY
Alexandre Julliard51885742002-05-30 20:12:58 +00001410 obj_handle_t handle; /* handle to the snapshot */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001411@END
1412
1413
1414/* Get the next process from a snapshot */
1415@REQ(next_process)
Alexandre Julliard51885742002-05-30 20:12:58 +00001416 obj_handle_t handle; /* handle to the snapshot */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001417 int reset; /* reset snapshot position? */
1418@REPLY
1419 int count; /* process usage count */
Alexandre Julliard54f22872002-10-03 19:54:57 +00001420 process_id_t pid; /* process id */
1421 process_id_t ppid; /* parent process id */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001422 int threads; /* number of threads */
1423 int priority; /* process priority */
Eric Pouech9fd54b22003-09-16 01:07:21 +00001424 int handles; /* number of handles */
Alexandre Julliardc30cefb2003-09-30 01:04:19 +00001425 VARARG(filename,unicode_str); /* file name of main exe */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001426@END
1427
1428
1429/* Get the next thread from a snapshot */
1430@REQ(next_thread)
Alexandre Julliard51885742002-05-30 20:12:58 +00001431 obj_handle_t handle; /* handle to the snapshot */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001432 int reset; /* reset snapshot position? */
1433@REPLY
1434 int count; /* thread usage count */
Alexandre Julliard54f22872002-10-03 19:54:57 +00001435 process_id_t pid; /* process id */
1436 thread_id_t tid; /* thread id */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001437 int base_pri; /* base priority */
1438 int delta_pri; /* delta priority */
1439@END
1440
1441
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001442/* Wait for a debug event */
1443@REQ(wait_debug_event)
1444 int get_handle; /* should we alloc a handle for waiting? */
1445@REPLY
Alexandre Julliard54f22872002-10-03 19:54:57 +00001446 process_id_t pid; /* process id */
1447 thread_id_t tid; /* thread id */
Alexandre Julliard51885742002-05-30 20:12:58 +00001448 obj_handle_t wait; /* wait handle if no event ready */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001449 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 Julliard51885742002-05-30 20:12:58 +00001458 obj_handle_t handle; /* handle to the queued event */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001459@END
1460
1461
1462/* Retrieve the status of an exception event */
1463@REQ(get_exception_status)
Alexandre Julliard51885742002-05-30 20:12:58 +00001464 obj_handle_t handle; /* handle to the queued event */
Alexandre Julliard9caa71e2001-11-30 18:46:42 +00001465@REPLY
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001466 VARARG(context,context); /* modified thread context */
1467@END
1468
1469
1470/* Send an output string to the debugger */
1471@REQ(output_debug_string)
Alexandre Julliard93737d52008-12-29 17:12:20 +01001472 data_size_t length; /* string length */
1473 client_ptr_t string; /* string to display (in debugged process address space) */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001474 int unicode; /* is it Unicode? */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001475@END
1476
1477
1478/* Continue a debug event */
1479@REQ(continue_debug_event)
Alexandre Julliard54f22872002-10-03 19:54:57 +00001480 process_id_t pid; /* process id to continue */
1481 thread_id_t tid; /* thread id to continue */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001482 int status; /* continuation status */
1483@END
1484
1485
Eric Pouechfbccb382002-02-27 01:28:30 +00001486/* Start/stop debugging an existing process */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001487@REQ(debug_process)
Alexandre Julliard54f22872002-10-03 19:54:57 +00001488 process_id_t pid; /* id of the process to debug */
Eric Pouechfbccb382002-02-27 01:28:30 +00001489 int attach; /* 1=attaching / 0=detaching from the process */
1490@END
1491
1492
Alexandre Julliard3c4538c2002-02-27 01:55:02 +00001493/* Simulate a breakpoint in a process */
1494@REQ(debug_break)
Alexandre Julliard51885742002-05-30 20:12:58 +00001495 obj_handle_t handle; /* process handle */
Alexandre Julliard3c4538c2002-02-27 01:55:02 +00001496@REPLY
1497 int self; /* was it the caller itself? */
1498@END
1499
1500
Eric Pouechfbccb382002-02-27 01:28:30 +00001501/* 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 Julliard37ec9272001-07-19 00:35:37 +00001504@END
1505
1506
1507/* Read data from a process address space */
1508@REQ(read_process_memory)
Alexandre Julliard51885742002-05-30 20:12:58 +00001509 obj_handle_t handle; /* process handle */
Alexandre Julliard8e9c1562008-12-30 14:11:58 +01001510 client_ptr_t addr; /* addr to read from */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001511@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 Julliard51885742002-05-30 20:12:58 +00001518 obj_handle_t handle; /* process handle */
Alexandre Julliard8e9c1562008-12-30 14:11:58 +01001519 client_ptr_t addr; /* addr to write to */
Alexandre Julliard9caa71e2001-11-30 18:46:42 +00001520 VARARG(data,bytes); /* data to write */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001521@END
1522
1523
1524/* Create a registry key */
1525@REQ(create_key)
Alexandre Julliard51885742002-05-30 20:12:58 +00001526 obj_handle_t parent; /* handle to the parent key */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001527 unsigned int access; /* desired access rights */
Alexandre Julliard03b040c2005-12-09 14:52:04 +01001528 unsigned int attributes; /* object attributes */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001529 unsigned int options; /* creation options */
Alexandre Julliard0f273c12006-07-26 10:43:25 +02001530 data_size_t namelen; /* length of key name in bytes */
Alexandre Julliard9caa71e2001-11-30 18:46:42 +00001531 VARARG(name,unicode_str,namelen); /* key name */
1532 VARARG(class,unicode_str); /* class name */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001533@REPLY
Alexandre Julliard51885742002-05-30 20:12:58 +00001534 obj_handle_t hkey; /* handle to the created key */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001535 int created; /* has it been newly created? */
1536@END
1537
1538/* Open a registry key */
1539@REQ(open_key)
Alexandre Julliard51885742002-05-30 20:12:58 +00001540 obj_handle_t parent; /* handle to the parent key */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001541 unsigned int access; /* desired access rights */
Alexandre Julliard03b040c2005-12-09 14:52:04 +01001542 unsigned int attributes; /* object attributes */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001543 VARARG(name,unicode_str); /* key name */
1544@REPLY
Alexandre Julliard51885742002-05-30 20:12:58 +00001545 obj_handle_t hkey; /* handle to the open key */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001546@END
1547
1548
1549/* Delete a registry key */
1550@REQ(delete_key)
Alexandre Julliard51885742002-05-30 20:12:58 +00001551 obj_handle_t hkey; /* handle to the key */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001552@END
1553
1554
Mike Hearn43cb03b2004-01-03 00:38:30 +00001555/* Flush a registry key */
1556@REQ(flush_key)
1557 obj_handle_t hkey; /* handle to the key */
1558@END
1559
1560
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001561/* Enumerate registry subkeys */
1562@REQ(enum_key)
Alexandre Julliard51885742002-05-30 20:12:58 +00001563 obj_handle_t hkey; /* handle to registry key */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001564 int index; /* index of subkey (or -1 for current key) */
Alexandre Julliard9caa71e2001-11-30 18:46:42 +00001565 int info_class; /* requested information class */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001566@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 Julliard3343c402008-12-06 17:29:01 +01001573 timeout_t modif; /* last modification time */
Alexandre Julliard0f273c12006-07-26 10:43:25 +02001574 data_size_t total; /* total length needed for full name and class */
1575 data_size_t namelen; /* length of key name in bytes */
Alexandre Julliard9caa71e2001-11-30 18:46:42 +00001576 VARARG(name,unicode_str,namelen); /* key name */
1577 VARARG(class,unicode_str); /* class name */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001578@END
1579
1580
1581/* Set a value of a registry key */
1582@REQ(set_key_value)
Alexandre Julliard51885742002-05-30 20:12:58 +00001583 obj_handle_t hkey; /* handle to registry key */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001584 int type; /* value type */
Alexandre Julliard0f273c12006-07-26 10:43:25 +02001585 data_size_t namelen; /* length of value name in bytes */
Alexandre Julliard9caa71e2001-11-30 18:46:42 +00001586 VARARG(name,unicode_str,namelen); /* value name */
1587 VARARG(data,bytes); /* value data */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001588@END
1589
1590
1591/* Retrieve the value of a registry key */
1592@REQ(get_key_value)
Alexandre Julliard51885742002-05-30 20:12:58 +00001593 obj_handle_t hkey; /* handle to registry key */
Alexandre Julliard9caa71e2001-11-30 18:46:42 +00001594 VARARG(name,unicode_str); /* value name */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001595@REPLY
1596 int type; /* value type */
Alexandre Julliard0f273c12006-07-26 10:43:25 +02001597 data_size_t total; /* total length needed for data */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001598 VARARG(data,bytes); /* value data */
1599@END
1600
1601
1602/* Enumerate a value of a registry key */
1603@REQ(enum_key_value)
Alexandre Julliard51885742002-05-30 20:12:58 +00001604 obj_handle_t hkey; /* handle to registry key */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001605 int index; /* value index */
Alexandre Julliard9caa71e2001-11-30 18:46:42 +00001606 int info_class; /* requested information class */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001607@REPLY
1608 int type; /* value type */
Alexandre Julliard0f273c12006-07-26 10:43:25 +02001609 data_size_t total; /* total length needed for full name and data */
1610 data_size_t namelen; /* length of value name in bytes */
Alexandre Julliard9caa71e2001-11-30 18:46:42 +00001611 VARARG(name,unicode_str,namelen); /* value name */
1612 VARARG(data,bytes); /* value data */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001613@END
1614
1615
1616/* Delete a value of a registry key */
1617@REQ(delete_key_value)
Alexandre Julliard51885742002-05-30 20:12:58 +00001618 obj_handle_t hkey; /* handle to registry key */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001619 VARARG(name,unicode_str); /* value name */
1620@END
1621
1622
1623/* Load a registry branch from a file */
1624@REQ(load_registry)
Alexandre Julliard51885742002-05-30 20:12:58 +00001625 obj_handle_t hkey; /* root key to load to */
1626 obj_handle_t file; /* file to load from */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001627 VARARG(name,unicode_str); /* subkey name */
1628@END
1629
1630
Mike McCormack5ac945c2003-08-19 03:08:17 +00001631/* 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 Julliard37ec9272001-07-19 00:35:37 +00001637/* Save a registry branch to a file */
1638@REQ(save_registry)
Alexandre Julliard51885742002-05-30 20:12:58 +00001639 obj_handle_t hkey; /* key to save */
1640 obj_handle_t file; /* file to save to */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001641@END
1642
1643
Alexandre Julliardc07ce052004-05-07 04:13:21 +00001644/* Add a registry key change notification */
Mike McCormack11f4b442002-11-25 02:47:32 +00001645@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 Julliard37ec9272001-07-19 00:35:37 +00001653/* Create a waitable timer */
1654@REQ(create_timer)
Eric Pouech44158dd2004-12-02 18:05:37 +00001655 unsigned int access; /* wanted access rights */
Vitaliy Margolena9960002005-10-27 18:30:37 +00001656 unsigned int attributes; /* object attributes */
Vitaliy Margolen7c5cb7a2005-12-02 16:05:54 +01001657 obj_handle_t rootdir; /* root directory */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001658 int manual; /* manual reset */
1659 VARARG(name,unicode_str); /* object name */
1660@REPLY
Alexandre Julliard51885742002-05-30 20:12:58 +00001661 obj_handle_t handle; /* handle to the timer */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001662@END
1663
1664
1665/* Open a waitable timer */
1666@REQ(open_timer)
1667 unsigned int access; /* wanted access rights */
Vitaliy Margolena9960002005-10-27 18:30:37 +00001668 unsigned int attributes; /* object attributes */
Vitaliy Margolen7c5cb7a2005-12-02 16:05:54 +01001669 obj_handle_t rootdir; /* root directory */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001670 VARARG(name,unicode_str); /* object name */
1671@REPLY
Alexandre Julliard51885742002-05-30 20:12:58 +00001672 obj_handle_t handle; /* handle to the timer */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001673@END
1674
1675/* Set a waitable timer */
1676@REQ(set_timer)
Alexandre Julliard51885742002-05-30 20:12:58 +00001677 obj_handle_t handle; /* handle to the timer */
Alexandre Julliardaaf477f2007-04-17 20:08:59 +02001678 timeout_t expire; /* next expiration absolute time */
Alexandre Julliard9b92a592008-12-29 17:43:01 +01001679 client_ptr_t callback; /* callback function */
1680 client_ptr_t arg; /* callback argument */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001681 int period; /* timer period in ms */
Eric Pouech4c591d42003-05-20 04:00:42 +00001682@REPLY
1683 int signaled; /* was the timer signaled before this call ? */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001684@END
1685
1686/* Cancel a waitable timer */
1687@REQ(cancel_timer)
Alexandre Julliard51885742002-05-30 20:12:58 +00001688 obj_handle_t handle; /* handle to the timer */
Eric Pouech4c591d42003-05-20 04:00:42 +00001689@REPLY
1690 int signaled; /* was the timer signaled before this calltime ? */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001691@END
1692
Robert Shearman7572b122004-12-13 21:10:58 +00001693/* Get information on a waitable timer */
1694@REQ(get_timer_info)
1695 obj_handle_t handle; /* handle to the timer */
1696@REPLY
Alexandre Julliardaaf477f2007-04-17 20:08:59 +02001697 timeout_t when; /* absolute time when the timer next expires */
Robert Shearman7572b122004-12-13 21:10:58 +00001698 int signaled; /* is the timer signaled? */
1699@END
1700
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001701
1702/* Retrieve the current context of a thread */
1703@REQ(get_thread_context)
Alexandre Julliard51885742002-05-30 20:12:58 +00001704 obj_handle_t handle; /* thread handle */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001705 unsigned int flags; /* context flags */
Alexandre Julliard73c72392005-11-02 20:54:12 +00001706 int suspend; /* if getting context during suspend */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001707@REPLY
Alexandre Julliard2878d992006-01-13 13:58:14 +01001708 int self; /* was it a handle to the current thread? */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001709 VARARG(context,context); /* thread context */
1710@END
1711
1712
1713/* Set the current context of a thread */
1714@REQ(set_thread_context)
Alexandre Julliard51885742002-05-30 20:12:58 +00001715 obj_handle_t handle; /* thread handle */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001716 unsigned int flags; /* context flags */
Alexandre Julliard73c72392005-11-02 20:54:12 +00001717 int suspend; /* if setting context during suspend */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001718 VARARG(context,context); /* thread context */
Alexandre Julliard2654be02006-01-11 20:20:32 +01001719@REPLY
1720 int self; /* was it a handle to the current thread? */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001721@END
1722
1723
1724/* Fetch a selector entry for a thread */
1725@REQ(get_selector_entry)
Alexandre Julliard51885742002-05-30 20:12:58 +00001726 obj_handle_t handle; /* thread handle */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001727 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 Poueche6267362005-05-10 15:15:50 +00001737 obj_handle_t table; /* which table to add atom to */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001738 VARARG(name,unicode_str); /* atom name */
1739@REPLY
Alexandre Julliardd8a8c112001-10-12 18:45:29 +00001740 atom_t atom; /* resulting atom */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001741@END
1742
1743
1744/* Delete an atom */
1745@REQ(delete_atom)
Eric Poueche6267362005-05-10 15:15:50 +00001746 obj_handle_t table; /* which table to delete atom from */
Alexandre Julliardd8a8c112001-10-12 18:45:29 +00001747 atom_t atom; /* atom handle */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001748@END
1749
1750
1751/* Find an atom */
1752@REQ(find_atom)
Eric Poueche6267362005-05-10 15:15:50 +00001753 obj_handle_t table; /* which table to find atom from */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001754 VARARG(name,unicode_str); /* atom name */
1755@REPLY
Alexandre Julliardd8a8c112001-10-12 18:45:29 +00001756 atom_t atom; /* atom handle */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001757@END
1758
1759
Eric Poueche6267362005-05-10 15:15:50 +00001760/* Get information about an atom */
1761@REQ(get_atom_information)
1762 obj_handle_t table; /* which table to find atom from */
Alexandre Julliardd8a8c112001-10-12 18:45:29 +00001763 atom_t atom; /* atom handle */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001764@REPLY
1765 int count; /* atom lock count */
Eric Poueche6267362005-05-10 15:15:50 +00001766 int pinned; /* whether the atom has been pinned */
Alexandre Julliard0f273c12006-07-26 10:43:25 +02001767 data_size_t total; /* actual length of atom name */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001768 VARARG(name,unicode_str); /* atom name */
1769@END
1770
1771
Eric Poueche6267362005-05-10 15:15:50 +00001772/* 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 Julliard37ec9272001-07-19 00:35:37 +00001788@REQ(init_atom_table)
Eric Poueche6267362005-05-10 15:15:50 +00001789 int entries; /* number of entries (only for local) */
1790@REPLY
1791 obj_handle_t table; /* handle to the atom table */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001792@END
1793
1794
1795/* Get the message queue of the current thread */
1796@REQ(get_msg_queue)
1797@REPLY
Alexandre Julliard51885742002-05-30 20:12:58 +00001798 obj_handle_t handle; /* handle to the queue */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001799@END
1800
1801
Alexandre Julliard0cb29f42007-04-04 18:02:01 +02001802/* 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 Julliard37ec9272001-07-19 00:35:37 +00001808/* 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 Julliardce40ef12006-07-26 11:48:25 +02001828/* Retrieve the process idle event */
1829@REQ(get_process_idle_event)
Alexandre Julliard51885742002-05-30 20:12:58 +00001830 obj_handle_t handle; /* process handle */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001831@REPLY
Alexandre Julliard51885742002-05-30 20:12:58 +00001832 obj_handle_t event; /* handle to idle event */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001833@END
1834
1835
1836/* Send a message to a thread queue */
1837@REQ(send_message)
Alexandre Julliard54f22872002-10-03 19:54:57 +00001838 thread_id_t id; /* thread id */
Alexandre Julliardd253c582001-08-07 19:19:08 +00001839 int type; /* message type (see below) */
Alexandre Julliard09029b22003-07-11 04:09:42 +00001840 int flags; /* message flags (see below) */
Alexandre Julliard1a66d222001-08-28 18:44:52 +00001841 user_handle_t win; /* window handle */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001842 unsigned int msg; /* message code */
Alexandre Julliard31282b32008-12-10 16:01:50 +01001843 lparam_t wparam; /* parameters */
1844 lparam_t lparam; /* parameters */
Alexandre Julliardaaf477f2007-04-17 20:08:59 +02001845 timeout_t timeout; /* timeout for reply */
Alexandre Julliard3ad97982006-10-04 20:25:42 +02001846 VARARG(data,message_data); /* message data for sent messages */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001847@END
Alexandre Julliardd253c582001-08-07 19:19:08 +00001848
Robert Shearmana40ce392006-01-17 13:14:31 +01001849@REQ(post_quit_message)
1850 int exit_code; /* exit code to return */
1851@END
1852
Alexandre Julliardd253c582001-08-07 19:19:08 +00001853enum 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 Julliard039e1312003-07-26 20:36:43 +00001859 MSG_CALLBACK_RESULT,/* result of a callback message */
Alexandre Julliardd253c582001-08-07 19:19:08 +00001860 MSG_OTHER_PROCESS, /* sent from other process, may include vararg data, always Unicode */
1861 MSG_POSTED, /* posted message (from PostMessageW), always Unicode */
Dmitry Timoshkov6dba0a72005-02-03 16:40:20 +00001862 MSG_HARDWARE, /* hardware message */
1863 MSG_WINEVENT /* winevent message */
Alexandre Julliardd253c582001-08-07 19:19:08 +00001864};
Alexandre Julliard09029b22003-07-11 04:09:42 +00001865#define SEND_MSG_ABORT_IF_HUNG 0x01
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001866
1867
Alexandre Julliardd3b30962006-08-09 16:45:26 +02001868/* 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 Julliard31282b32008-12-10 16:01:50 +01001873 lparam_t wparam; /* parameters */
1874 lparam_t lparam; /* parameters */
1875 lparam_t info; /* extra info */
Alexandre Julliardd3b30962006-08-09 16:45:26 +02001876 int x; /* x position */
1877 int y; /* y position */
Alexandre Julliard3cd817b2008-12-24 12:06:18 +01001878 unsigned int time; /* message time */
Alexandre Julliardd3b30962006-08-09 16:45:26 +02001879@END
1880
1881
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001882/* Get a message from the current queue */
1883@REQ(get_message)
Alexandre Julliard89faee02007-02-21 15:21:05 +01001884 unsigned int flags; /* PM_* flags */
Alexandre Julliard1a66d222001-08-28 18:44:52 +00001885 user_handle_t get_win; /* window handle to get */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001886 unsigned int get_first; /* first message code to get */
1887 unsigned int get_last; /* last message code to get */
Alexandre Julliard3e2f2a52005-04-20 13:03:59 +00001888 unsigned int hw_id; /* id of the previous hardware message (or 0) */
Alexandre Julliard28965402007-08-29 18:13:13 +02001889 unsigned int wake_mask; /* wakeup bits mask */
1890 unsigned int changed_mask; /* changed bits mask */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001891@REPLY
Alexandre Julliard1a66d222001-08-28 18:44:52 +00001892 user_handle_t win; /* window handle */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001893 unsigned int msg; /* message code */
Alexandre Julliard31282b32008-12-10 16:01:50 +01001894 lparam_t wparam; /* parameters */
1895 lparam_t lparam; /* parameters */
Alexandre Julliardd1d7b9f2008-12-24 11:59:09 +01001896 int type; /* message type */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001897 unsigned int time; /* message time */
Alexandre Julliard63342352005-05-11 13:03:15 +00001898 unsigned int active_hooks; /* active hooks bitmap */
Alexandre Julliard0f273c12006-07-26 10:43:25 +02001899 data_size_t total; /* total size of extra data */
Alexandre Julliard59dc4562006-10-04 16:04:53 +02001900 VARARG(data,message_data); /* message data for sent messages */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001901@END
Alexandre Julliard89faee02007-02-21 15:21:05 +01001902
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001903
1904/* Reply to a sent message */
1905@REQ(reply_message)
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001906 int remove; /* should we remove the message? */
Alexandre Julliard3cd817b2008-12-24 12:06:18 +01001907 lparam_t result; /* message result */
Alexandre Julliardd253c582001-08-07 19:19:08 +00001908 VARARG(data,bytes); /* message data for sent messages */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001909@END
1910
1911
Alexandre Julliard0bc83772005-03-23 10:33:17 +00001912/* Accept the current hardware message */
1913@REQ(accept_hardware_message)
Alexandre Julliard3e2f2a52005-04-20 13:03:59 +00001914 unsigned int hw_id; /* id of the hardware message */
Alexandre Julliard0bc83772005-03-23 10:33:17 +00001915 int remove; /* should we remove the message? */
1916 user_handle_t new_win; /* new destination window for current message */
1917@END
1918
1919
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001920/* Retrieve the reply for the last message sent */
1921@REQ(get_message_reply)
1922 int cancel; /* cancel message if not ready? */
1923@REPLY
Alexandre Julliard31282b32008-12-10 16:01:50 +01001924 lparam_t result; /* message result */
Alexandre Julliardd253c582001-08-07 19:19:08 +00001925 VARARG(data,bytes); /* message data for sent messages */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001926@END
1927
1928
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001929/* Set a window timer */
1930@REQ(set_win_timer)
Alexandre Julliard1a66d222001-08-28 18:44:52 +00001931 user_handle_t win; /* window handle */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001932 unsigned int msg; /* message to post */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001933 unsigned int rate; /* timer rate in ms */
Alexandre Julliard31282b32008-12-10 16:01:50 +01001934 lparam_t id; /* timer id */
1935 lparam_t lparam; /* message lparam (callback proc) */
Alexandre Julliardff986a52004-11-29 18:08:18 +00001936@REPLY
Alexandre Julliard31282b32008-12-10 16:01:50 +01001937 lparam_t id; /* timer id */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001938@END
1939
1940
1941/* Kill a window timer */
1942@REQ(kill_win_timer)
Alexandre Julliard1a66d222001-08-28 18:44:52 +00001943 user_handle_t win; /* window handle */
Alexandre Julliard31282b32008-12-10 16:01:50 +01001944 lparam_t id; /* timer id */
Alexandre Julliard3cd817b2008-12-24 12:06:18 +01001945 unsigned int msg; /* message to post */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001946@END
1947
1948
Dmitry Timoshkove735e192007-12-28 10:59:13 +08001949/* 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 Julliard37ec9272001-07-19 00:35:37 +00001957/* Retrieve info about a serial port */
1958@REQ(get_serial_info)
Alexandre Julliard51885742002-05-30 20:12:58 +00001959 obj_handle_t handle; /* handle to comm port */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001960@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 Julliard37ec9272001-07-19 00:35:37 +00001967@END
1968
1969
1970/* Set info about a serial port */
1971@REQ(set_serial_info)
Alexandre Julliard51885742002-05-30 20:12:58 +00001972 obj_handle_t handle; /* handle to comm port */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001973 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 Julliard37ec9272001-07-19 00:35:37 +00001980@END
1981#define SERIALINFO_SET_TIMEOUTS 0x01
1982#define SERIALINFO_SET_MASK 0x02
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001983
1984
Eric Pouech46344472005-01-14 19:54:38 +00001985/* Create an async I/O */
Mike McCormack6f011c02001-12-20 00:07:05 +00001986@REQ(register_async)
Eric Pouech46344472005-01-14 19:54:38 +00001987 int type; /* type of queue to look after */
Eric Pouech46344472005-01-14 19:54:38 +00001988 int count; /* count - usually # of bytes to be read/written */
Alexandre Julliard111610c2007-03-20 20:21:12 +01001989 async_data_t async; /* async I/O parameters */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001990@END
1991#define ASYNC_TYPE_READ 0x01
1992#define ASYNC_TYPE_WRITE 0x02
1993#define ASYNC_TYPE_WAIT 0x03
1994
1995
Eric Pouech46344472005-01-14 19:54:38 +00001996/* 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 Julliard63571432007-04-16 14:45:03 +02002002/* Perform an ioctl on a file */
2003@REQ(ioctl)
Alexandre Julliard737148c2007-04-17 22:06:13 +02002004 ioctl_code_t code; /* ioctl code */
Alexandre Julliard63571432007-04-16 14:45:03 +02002005 async_data_t async; /* async I/O parameters */
2006 VARARG(in_data,bytes); /* ioctl input data */
2007@REPLY
Alexandre Julliardfd59e152007-05-03 17:43:18 +02002008 obj_handle_t wait; /* handle to wait on for blocking ioctl */
2009 unsigned int options; /* device open options */
Alexandre Julliard63571432007-04-16 14:45:03 +02002010 VARARG(out_data,bytes); /* ioctl output data */
2011@END
2012
2013
Alexandre Julliardaafcfe72007-05-08 20:45:44 +02002014/* 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 Julliard37ec9272001-07-19 00:35:37 +00002023/* Create a named pipe */
2024@REQ(create_named_pipe)
Eric Poueche21aa6a2005-09-26 11:02:45 +00002025 unsigned int access;
Vitaliy Margolena9960002005-10-27 18:30:37 +00002026 unsigned int attributes; /* object attributes */
Vitaliy Margolenbabfa792005-12-05 13:09:35 +01002027 obj_handle_t rootdir; /* root directory */
Eric Pouech5a2591d2005-04-18 14:57:04 +00002028 unsigned int options;
2029 unsigned int flags;
Alexandre Julliard37ec9272001-07-19 00:35:37 +00002030 unsigned int maxinstances;
2031 unsigned int outsize;
2032 unsigned int insize;
Alexandre Julliardaaf477f2007-04-17 20:08:59 +02002033 timeout_t timeout;
Alexandre Julliard8ae57612001-12-31 22:26:51 +00002034 VARARG(name,unicode_str); /* pipe name */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00002035@REPLY
Alexandre Julliard51885742002-05-30 20:12:58 +00002036 obj_handle_t handle; /* handle to the pipe */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00002037@END
2038
Eric Pouech5a2591d2005-04-18 14:57:04 +00002039/* 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 Pouech1d6e2592006-05-26 12:10:11 +02002043#define NAMED_PIPE_SERVER_END 0x8000
Alexandre Julliard37ec9272001-07-19 00:35:37 +00002044
Mike McCormackbf554572001-08-23 23:29:20 +00002045
Mike McCormackf2e7ce72001-08-27 19:03:42 +00002046@REQ(get_named_pipe_info)
Alexandre Julliard51885742002-05-30 20:12:58 +00002047 obj_handle_t handle;
Mike McCormackf2e7ce72001-08-27 19:03:42 +00002048@REPLY
2049 unsigned int flags;
2050 unsigned int maxinstances;
Eric Pouech1d6e2592006-05-26 12:10:11 +02002051 unsigned int instances;
Mike McCormackf2e7ce72001-08-27 19:03:42 +00002052 unsigned int outsize;
2053 unsigned int insize;
2054@END
2055
Alexandre Julliard1a66d222001-08-28 18:44:52 +00002056
Alexandre Julliard1a66d222001-08-28 18:44:52 +00002057/* Create a window */
2058@REQ(create_window)
Alexandre Julliarda09da0c2001-09-21 21:08:40 +00002059 user_handle_t parent; /* parent window */
2060 user_handle_t owner; /* owner window */
Alexandre Julliardd8a8c112001-10-12 18:45:29 +00002061 atom_t atom; /* class atom */
Alexandre Julliardcb2788e2008-12-29 16:41:44 +01002062 mod_handle_t instance; /* module instance */
Alexandre Julliard1fc461f2007-11-02 15:16:25 +01002063 VARARG(class,unicode_str); /* class name */
Alexandre Julliard1a66d222001-08-28 18:44:52 +00002064@REPLY
Alexandre Julliarda09da0c2001-09-21 21:08:40 +00002065 user_handle_t handle; /* created window */
Alexandre Julliard4be3d4c2006-03-06 15:00:37 +01002066 user_handle_t parent; /* full handle of parent */
2067 user_handle_t owner; /* full handle of owner */
Alexandre Julliardbd13ab82003-12-11 05:34:53 +00002068 int extra; /* number of extra bytes */
Alexandre Julliard0cd3ff62008-12-29 17:24:33 +01002069 client_ptr_t class_ptr; /* pointer to class in client address space */
Alexandre Julliard1a66d222001-08-28 18:44:52 +00002070@END
2071
2072
Alexandre Julliard1a66d222001-08-28 18:44:52 +00002073/* Destroy a window */
2074@REQ(destroy_window)
2075 user_handle_t handle; /* handle to the window */
2076@END
2077
2078
Alexandre Julliard8c518802005-07-08 11:37:40 +00002079/* Retrieve the desktop window for the current thread */
2080@REQ(get_desktop_window)
Alexandre Julliard1a4f6e52006-03-07 11:42:35 +01002081 int force; /* force creation if it doesn't exist */
Alexandre Julliard8c518802005-07-08 11:37:40 +00002082@REPLY
Alexandre Julliard6b36e212008-06-25 14:26:14 +02002083 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 Julliard8c518802005-07-08 11:37:40 +00002085@END
2086
2087
Alexandre Julliardddc33172001-10-22 19:08:33 +00002088/* 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 Julliard7dafa612002-09-25 00:21:56 +00002094 user_handle_t prev_owner; /* full handle of previous owner */
Alexandre Julliardddc33172001-10-22 19:08:33 +00002095@END
2096
2097
Alexandre Julliard1a66d222001-08-28 18:44:52 +00002098/* 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 Julliard5030bda2002-10-11 23:41:06 +00002103 user_handle_t last_active; /* last active popup */
Alexandre Julliard54f22872002-10-03 19:54:57 +00002104 process_id_t pid; /* process owning the window */
2105 thread_id_t tid; /* thread owning the window */
Alexandre Julliardddc33172001-10-22 19:08:33 +00002106 atom_t atom; /* class atom */
Alexandre Julliardf2c4e092008-12-29 16:47:51 +01002107 short int is_unicode; /* ANSI or unicode */
Alexandre Julliard1a66d222001-08-28 18:44:52 +00002108@END
Alexandre Julliarda09da0c2001-09-21 21:08:40 +00002109
2110
Alexandre Julliardddc33172001-10-22 19:08:33 +00002111/* Set some information in a window */
2112@REQ(set_window_info)
Alexandre Julliardf2c4e092008-12-29 16:47:51 +01002113 unsigned short flags; /* flags for fields to set (see below) */
2114 short int is_unicode; /* ANSI or unicode */
Alexandre Julliarde0dcf4f2006-10-04 21:41:32 +02002115 user_handle_t handle; /* handle to the window */
Alexandre Julliardddc33172001-10-22 19:08:33 +00002116 unsigned int style; /* window style */
2117 unsigned int ex_style; /* window extended style */
2118 unsigned int id; /* window id */
Alexandre Julliardcb2788e2008-12-29 16:41:44 +01002119 mod_handle_t instance; /* creator instance */
Alexandre Julliard31282b32008-12-10 16:01:50 +01002120 lparam_t user_data; /* user-specific data */
Alexandre Julliard97903d22003-11-26 22:15:41 +00002121 int extra_offset; /* offset to set in extra bytes */
Alexandre Julliard0f273c12006-07-26 10:43:25 +02002122 data_size_t extra_size; /* size to set in extra bytes */
Alexandre Julliard31282b32008-12-10 16:01:50 +01002123 lparam_t extra_value; /* value to set in extra bytes */
Alexandre Julliardddc33172001-10-22 19:08:33 +00002124@REPLY
2125 unsigned int old_style; /* old window style */
2126 unsigned int old_ex_style; /* old window extended style */
Alexandre Julliardcb2788e2008-12-29 16:41:44 +01002127 mod_handle_t old_instance; /* old creator instance */
Alexandre Julliard31282b32008-12-10 16:01:50 +01002128 lparam_t old_user_data; /* old user-specific data */
2129 lparam_t old_extra_value; /* old value in extra bytes */
Alexandre Julliardf2c4e092008-12-29 16:47:51 +01002130 unsigned int old_id; /* old window id */
Alexandre Julliardddc33172001-10-22 19:08:33 +00002131@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 Julliardebf12432003-12-10 01:34:51 +00002137#define SET_WIN_EXTRA 0x20
Dmitry Timoshkov86af38c2005-07-07 12:02:31 +00002138#define SET_WIN_UNICODE 0x40
Alexandre Julliardddc33172001-10-22 19:08:33 +00002139
2140
Alexandre Julliard4d32a472005-03-25 10:38:56 +00002141/* 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 Julliarda09da0c2001-09-21 21:08:40 +00002151/* 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 Julliard34fe91b2008-03-18 15:17:40 +01002162 obj_handle_t desktop; /* handle to desktop */
Alexandre Julliarda09da0c2001-09-21 21:08:40 +00002163 user_handle_t parent; /* parent window */
Alexandre Julliardd8a8c112001-10-12 18:45:29 +00002164 atom_t atom; /* class atom for the listed children */
Alexandre Julliard54f22872002-10-03 19:54:57 +00002165 thread_id_t tid; /* thread owning the listed children */
Alexandre Julliarda54a9902007-11-02 15:26:49 +01002166 VARARG(class,unicode_str); /* class name */
Alexandre Julliarda09da0c2001-09-21 21:08:40 +00002167@REPLY
2168 int count; /* total count of children */
Alexandre Julliard7695d692001-09-24 01:19:59 +00002169 VARARG(children,user_handles); /* children handles */
Alexandre Julliarda09da0c2001-09-21 21:08:40 +00002170@END
2171
2172
Alexandre Julliard4616dcb2004-07-20 22:17:38 +00002173/* 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 Julliarda09da0c2001-09-21 21:08:40 +00002184/* 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 Julliard7a2017d2001-10-12 19:10:26 +00002197
Alexandre Julliard5defa492004-12-07 17:31:53 +00002198/* Set the position and Z order of a window */
2199@REQ(set_window_pos)
Alexandre Julliarde0dcf4f2006-10-04 21:41:32 +02002200 unsigned int flags; /* SWP_* flags */
Alexandre Julliard0d509652001-10-16 21:55:37 +00002201 user_handle_t handle; /* handle to the window */
Alexandre Julliard5defa492004-12-07 17:31:53 +00002202 user_handle_t previous; /* previous window in Z order */
Alexandre Julliard0d509652001-10-16 21:55:37 +00002203 rectangle_t window; /* window rectangle */
2204 rectangle_t client; /* client rectangle */
Alexandre Julliardae661da2005-02-03 13:40:12 +00002205 VARARG(valid,rectangles); /* valid rectangles from WM_NCCALCSIZE */
Alexandre Julliard5defa492004-12-07 17:31:53 +00002206@REPLY
2207 unsigned int new_style; /* new window style */
Alexandre Julliard917f2882007-10-31 17:51:05 +01002208 unsigned int new_ex_style; /* new window extended style */
Alexandre Julliard0d509652001-10-16 21:55:37 +00002209@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 Julliardf7560902005-03-17 19:10:41 +00002217 rectangle_t visible; /* visible part of the window rectangle */
Alexandre Julliard0d509652001-10-16 21:55:37 +00002218 rectangle_t client; /* client rectangle */
2219@END
2220
2221
Alexandre Julliard805bdc52001-11-13 22:23:48 +00002222/* 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 Julliard0d509652001-10-16 21:55:37 +00002237/* 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 Julliard7a2017d2001-10-12 19:10:26 +00002246
Alexandre Julliarde8d86b72004-06-23 20:44:58 +00002247/* Get the visible region of a window */
2248@REQ(get_visible_region)
2249 user_handle_t window; /* handle to the window */
Alexandre Julliarde8d86b72004-06-23 20:44:58 +00002250 unsigned int flags; /* DCX flags */
2251@REPLY
Alexandre Julliardbc75f2f2005-03-31 15:36:57 +00002252 user_handle_t top_win; /* top window to clip against */
Ulrich Czekalla4bdf4342006-12-07 10:43:59 -05002253 rectangle_t top_rect; /* top window visible rect with screen coords */
2254 rectangle_t win_rect; /* window rect in screen coords */
Alexandre Julliard0f273c12006-07-26 10:43:25 +02002255 data_size_t total_size; /* total size of the resulting region */
Alexandre Julliardbc75f2f2005-03-31 15:36:57 +00002256 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
Alexandre Julliarde8d86b72004-06-23 20:44:58 +00002257@END
2258
2259
Alexandre Julliard618a7e52004-06-29 03:53:25 +00002260/* Get the window region */
2261@REQ(get_window_region)
2262 user_handle_t window; /* handle to the window */
2263@REPLY
Alexandre Julliard0f273c12006-07-26 10:43:25 +02002264 data_size_t total_size; /* total size of the resulting region */
Alexandre Julliard618a7e52004-06-29 03:53:25 +00002265 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 Julliard1767b452007-03-05 16:43:09 +01002272 int redraw; /* redraw the window? */
Alexandre Julliard618a7e52004-06-29 03:53:25 +00002273 VARARG(region,rectangles); /* list of rectangles for the region */
2274@END
2275
2276
Alexandre Julliard5defa492004-12-07 17:31:53 +00002277/* Get the window update region */
2278@REQ(get_update_region)
2279 user_handle_t window; /* handle to the window */
Alexandre Julliarddb412aa2005-05-31 13:37:16 +00002280 user_handle_t from_child; /* child to start searching from */
Alexandre Julliard5defa492004-12-07 17:31:53 +00002281 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 Julliard0f273c12006-07-26 10:43:25 +02002285 data_size_t total_size; /* total size of the resulting region */
Alexandre Julliard5defa492004-12-07 17:31:53 +00002286 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 Julliarddf13cee2007-08-27 16:41:08 +02002295#define UPDATE_DELAYED_ERASE 0x80 /* still needs erase after BeginPaint */
Alexandre Julliard5defa492004-12-07 17:31:53 +00002296
2297
Alexandre Julliard5054c792005-03-21 12:37:00 +00002298/* 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 Julliard5defa492004-12-07 17:31:53 +00002305/* 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 Julliard7a2017d2001-10-12 19:10:26 +00002313/* Set a window property */
2314@REQ(set_window_property)
2315 user_handle_t window; /* handle to the window */
Alexandre Julliard517b2f62008-12-10 16:21:32 +01002316 lparam_t data; /* data to store */
Alexandre Julliard3cd817b2008-12-24 12:06:18 +01002317 atom_t atom; /* property atom (if no name specified) */
Alexandre Julliard9e73cdd2005-05-11 19:01:10 +00002318 VARARG(name,unicode_str); /* property name */
Alexandre Julliard7a2017d2001-10-12 19:10:26 +00002319@END
2320
2321
2322/* Remove a window property */
2323@REQ(remove_window_property)
2324 user_handle_t window; /* handle to the window */
Alexandre Julliard9e73cdd2005-05-11 19:01:10 +00002325 atom_t atom; /* property atom (if no name specified) */
2326 VARARG(name,unicode_str); /* property name */
Alexandre Julliard7a2017d2001-10-12 19:10:26 +00002327@REPLY
Alexandre Julliard517b2f62008-12-10 16:21:32 +01002328 lparam_t data; /* data stored in property */
Alexandre Julliard7a2017d2001-10-12 19:10:26 +00002329@END
2330
2331
2332/* Get a window property */
2333@REQ(get_window_property)
2334 user_handle_t window; /* handle to the window */
Alexandre Julliard9e73cdd2005-05-11 19:01:10 +00002335 atom_t atom; /* property atom (if no name specified) */
2336 VARARG(name,unicode_str); /* property name */
Alexandre Julliard7a2017d2001-10-12 19:10:26 +00002337@REPLY
Alexandre Julliard517b2f62008-12-10 16:21:32 +01002338 lparam_t data; /* data stored in property */
Alexandre Julliard7a2017d2001-10-12 19:10:26 +00002339@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 Julliard9caa71e2001-11-30 18:46:42 +00002346 int total; /* total number of properties */
Alexandre Julliard7a2017d2001-10-12 19:10:26 +00002347 VARARG(props,properties); /* list of properties */
2348@END
Alexandre Julliardab5063b2002-10-11 18:50:15 +00002349
2350
Alexandre Julliard1bf96e02005-06-08 18:44:50 +00002351/* Create a window station */
2352@REQ(create_winstation)
2353 unsigned int flags; /* window station flags */
2354 unsigned int access; /* wanted access rights */
Vitaliy Margolen83ef91c2005-11-21 12:05:38 +00002355 unsigned int attributes; /* object attributes */
Alexandre Julliard1bf96e02005-06-08 18:44:50 +00002356 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 Margolen83ef91c2005-11-21 12:05:38 +00002365 unsigned int attributes; /* object attributes */
Alexandre Julliard1bf96e02005-06-08 18:44:50 +00002366 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 Julliardd30b5742007-12-05 16:45:32 +01002391/* 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 Julliard1bf96e02005-06-08 18:44:50 +00002400/* Create a desktop */
2401@REQ(create_desktop)
2402 unsigned int flags; /* desktop flags */
2403 unsigned int access; /* wanted access rights */
Vitaliy Margolen83ef91c2005-11-21 12:05:38 +00002404 unsigned int attributes; /* object attributes */
Alexandre Julliard1bf96e02005-06-08 18:44:50 +00002405 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 Lankhorst70a64952008-04-01 12:15:55 -07002413 obj_handle_t winsta; /* window station to open (null allowed) */
Alexandre Julliard1bf96e02005-06-08 18:44:50 +00002414 unsigned int flags; /* desktop flags */
2415 unsigned int access; /* wanted access rights */
Vitaliy Margolen83ef91c2005-11-21 12:05:38 +00002416 unsigned int attributes; /* object attributes */
Alexandre Julliard1bf96e02005-06-08 18:44:50 +00002417 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 Julliardd30b5742007-12-05 16:45:32 +01002443/* 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 Julliard1bf96e02005-06-08 18:44:50 +00002453/* 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 Julliardab5063b2002-10-11 18:50:15 +00002466/* 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 Julliard5030bda2002-10-11 23:41:06 +00002487
Mike McCormackabe70f72005-04-28 12:04:14 +00002488
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 Julliard8ba666f2003-01-08 19:56:31 +00002496/* 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 Julliard5030bda2002-10-11 23:41:06 +00002511/* 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 Julliarda9e8f592002-10-12 01:24:37 +00002533
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 Julliard11e35232002-10-17 01:24:33 +00002544
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 Julliard02861352002-10-29 00:41:42 +00002576
2577
2578/* Set a window hook */
2579@REQ(set_hook)
2580 int id; /* id of the hook */
Dmitry Timoshkov6dba0a72005-02-03 16:40:20 +00002581 process_id_t pid; /* id of process to set the hook into */
Alexandre Julliard02861352002-10-29 00:41:42 +00002582 thread_id_t tid; /* id of thread to set the hook into */
Dmitry Timoshkov6dba0a72005-02-03 16:40:20 +00002583 int event_min;
2584 int event_max;
Alexandre Julliardcc55fd32008-12-29 17:35:35 +01002585 client_ptr_t proc; /* hook procedure */
Dmitry Timoshkov6dba0a72005-02-03 16:40:20 +00002586 int flags;
Alexandre Julliard02861352002-10-29 00:41:42 +00002587 int unicode; /* is it a unicode hook? */
Alexandre Julliard14e68ba2002-11-20 19:54:32 +00002588 VARARG(module,unicode_str); /* module name */
Alexandre Julliard02861352002-10-29 00:41:42 +00002589@REPLY
2590 user_handle_t handle; /* handle to the hook */
Alexandre Julliard63342352005-05-11 13:03:15 +00002591 unsigned int active_hooks; /* active hooks bitmap */
Alexandre Julliard02861352002-10-29 00:41:42 +00002592@END
2593
2594
2595/* Remove a window hook */
2596@REQ(remove_hook)
2597 user_handle_t handle; /* handle to the hook */
Alexandre Julliardcc55fd32008-12-29 17:35:35 +01002598 client_ptr_t proc; /* hook procedure if handle is 0 */
Alexandre Julliard02861352002-10-29 00:41:42 +00002599 int id; /* id of the hook if handle is 0 */
Alexandre Julliard63342352005-05-11 13:03:15 +00002600@REPLY
2601 unsigned int active_hooks; /* active hooks bitmap */
Alexandre Julliard02861352002-10-29 00:41:42 +00002602@END
2603
2604
2605/* Start calling a hook chain */
2606@REQ(start_hook_chain)
2607 int id; /* id of the hook */
Dmitry Timoshkov6dba0a72005-02-03 16:40:20 +00002608 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 Julliard02861352002-10-29 00:41:42 +00002612@REPLY
2613 user_handle_t handle; /* handle to the next hook */
Alexandre Julliardca3ac8f2003-07-11 21:55:58 +00002614 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 Julliard02861352002-10-29 00:41:42 +00002616 int unicode; /* is it a unicode hook? */
Alexandre Julliardcc55fd32008-12-29 17:35:35 +01002617 client_ptr_t proc; /* hook procedure */
Alexandre Julliard63342352005-05-11 13:03:15 +00002618 unsigned int active_hooks; /* active hooks bitmap */
Alexandre Julliard14e68ba2002-11-20 19:54:32 +00002619 VARARG(module,unicode_str); /* module name */
Alexandre Julliard02861352002-10-29 00:41:42 +00002620@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 Julliard2f80fcd2006-10-05 14:05:48 +02002629/* Get the hook information */
2630@REQ(get_hook_info)
Alexandre Julliard02861352002-10-29 00:41:42 +00002631 user_handle_t handle; /* handle to the current hook */
Alexandre Julliard2f80fcd2006-10-05 14:05:48 +02002632 int get_next; /* do we want info about current or next hook? */
Dmitry Timoshkov6dba0a72005-02-03 16:40:20 +00002633 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 Julliard02861352002-10-29 00:41:42 +00002637@REPLY
Alexandre Julliard2f80fcd2006-10-05 14:05:48 +02002638 user_handle_t handle; /* handle to the hook */
2639 int id; /* id of the hook */
Alexandre Julliardca3ac8f2003-07-11 21:55:58 +00002640 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 Julliardcc55fd32008-12-29 17:35:35 +01002642 client_ptr_t proc; /* hook procedure */
Alexandre Julliard533f5192006-10-05 14:04:25 +02002643 int unicode; /* is it a unicode hook? */
Alexandre Julliard14e68ba2002-11-20 19:54:32 +00002644 VARARG(module,unicode_str); /* module name */
Alexandre Julliard02861352002-10-29 00:41:42 +00002645@END
Ulrich Czekallab2df5f92003-06-23 23:02:02 +00002646
2647
Alexandre Julliardbfce1512003-12-10 04:08:06 +00002648/* 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 Julliardcb2788e2008-12-29 16:41:44 +01002653 mod_handle_t instance; /* module instance */
Alexandre Julliardbfce1512003-12-10 04:08:06 +00002654 int extra; /* number of extra class bytes */
2655 int win_extra; /* number of window extra bytes */
Alexandre Julliard0cd3ff62008-12-29 17:24:33 +01002656 client_ptr_t client_ptr; /* pointer to class in client address space */
Alexandre Julliard0762d982007-11-01 13:02:01 +01002657 VARARG(name,unicode_str); /* class name */
2658@REPLY
2659 atom_t atom; /* resulting class atom */
Alexandre Julliardbfce1512003-12-10 04:08:06 +00002660@END
2661
2662
2663/* Destroy a window class */
2664@REQ(destroy_class)
2665 atom_t atom; /* class atom */
Alexandre Julliardcb2788e2008-12-29 16:41:44 +01002666 mod_handle_t instance; /* module instance */
Alexandre Julliardb9b940f2007-11-01 15:28:30 +01002667 VARARG(name,unicode_str); /* class name */
Alexandre Julliardbd13ab82003-12-11 05:34:53 +00002668@REPLY
Alexandre Julliard0cd3ff62008-12-29 17:24:33 +01002669 client_ptr_t client_ptr; /* pointer to class in client address space */
Alexandre Julliardbfce1512003-12-10 04:08:06 +00002670@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 Julliardcb2788e2008-12-29 16:41:44 +01002680 mod_handle_t instance; /* module instance */
Alexandre Julliardbfce1512003-12-10 04:08:06 +00002681 int extra_offset; /* offset to set in extra bytes */
Alexandre Julliard0f273c12006-07-26 10:43:25 +02002682 data_size_t extra_size; /* size to set in extra bytes */
Alexandre Julliard31282b32008-12-10 16:01:50 +01002683 lparam_t extra_value; /* value to set in extra bytes */
Alexandre Julliardbfce1512003-12-10 04:08:06 +00002684@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 Julliardcb2788e2008-12-29 16:41:44 +01002689 mod_handle_t old_instance; /* previous module instance */
Alexandre Julliard31282b32008-12-10 16:01:50 +01002690 lparam_t old_extra_value; /* old value in extra bytes */
Alexandre Julliardbfce1512003-12-10 04:08:06 +00002691@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 Czekallab2df5f92003-06-23 23:02:02 +00002699/* 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 Czekalla50679092005-03-07 19:31:46 +00002722#define CB_PROCESS 0x100
Mike McCormack36cd6f52003-07-24 00:07:00 +00002723
2724
2725/* Open a security token */
2726@REQ(open_token)
2727 obj_handle_t handle; /* handle to the thread or process */
Alexandre Julliard836d07c2005-12-09 12:17:19 +01002728 unsigned int access; /* access rights to the new token */
2729 unsigned int attributes;/* object attributes */
Mike McCormack36cd6f52003-07-24 00:07:00 +00002730 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 Julliard8d174d32003-10-07 03:40:23 +00002736
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 Shearmanb0f02b22005-02-11 11:52:06 +00002754
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 Shearmand2ea92d2005-04-22 21:17:15 +00002774/* 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 Shearmanb0f02b22005-02-11 11:52:06 +00002784@REQ(duplicate_token)
Alexandre Julliard836d07c2005-12-09 12:17:19 +01002785 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 Shearmanb0f02b22005-02-11 11:52:06 +00002789 int impersonation_level; /* impersonation level of the new token */
2790@REPLY
2791 obj_handle_t new_handle; /* duplicated handle */
2792@END
Mike McCormack2ab6a772005-03-30 19:02:15 +00002793
Robert Shearman4ad93412005-05-24 12:32:18 +00002794@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 McCormack2ab6a772005-03-30 19:02:15 +00002808
Robert Shearman91eaea52005-07-18 13:22:55 +00002809@REQ(get_token_user)
2810 obj_handle_t handle; /* handle to the token */
2811@REPLY
Alexandre Julliard0f273c12006-07-26 10:43:25 +02002812 data_size_t user_len; /* length needed to store user */
Robert Shearman91eaea52005-07-18 13:22:55 +00002813 VARARG(user,SID); /* sid of the user the token represents */
2814@END
2815
Robert Shearman3396a662006-05-13 16:58:19 +01002816@REQ(get_token_groups)
2817 obj_handle_t handle; /* handle to the token */
2818@REPLY
Alexandre Julliard0f273c12006-07-26 10:43:25 +02002819 data_size_t user_len; /* length needed to store user */
Robert Shearman3396a662006-05-13 16:58:19 +01002820 VARARG(user,token_groups); /* groups the token's user belongs to */
2821@END
2822
Vitaliy Margolenb0e9d7e2007-02-07 21:43:11 -07002823@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 Shearman5356bfd2007-10-02 15:55:13 +01002829@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 McCormack2ab6a772005-03-30 19:02:15 +00002837/* Create a mailslot */
2838@REQ(create_mailslot)
Vitaliy Margolena9960002005-10-27 18:30:37 +00002839 unsigned int access; /* wanted access rights */
2840 unsigned int attributes; /* object attributes */
Vitaliy Margolencf21d4d2005-12-05 13:30:26 +01002841 obj_handle_t rootdir; /* root directory */
Mike McCormack2ab6a772005-03-30 19:02:15 +00002842 unsigned int max_msgsize;
Alexandre Julliardaaf477f2007-04-17 20:08:59 +02002843 timeout_t read_timeout;
Mike McCormack2ab6a772005-03-30 19:02:15 +00002844 VARARG(name,unicode_str); /* mailslot name */
2845@REPLY
2846 obj_handle_t handle; /* handle to the mailslot */
2847@END
2848
2849
Mike McCormack2ab6a772005-03-30 19:02:15 +00002850/* Set mailslot information */
2851@REQ(set_mailslot_info)
2852 obj_handle_t handle; /* handle to the mailslot */
2853 unsigned int flags;
Alexandre Julliardaaf477f2007-04-17 20:08:59 +02002854 timeout_t read_timeout;
Mike McCormack2ab6a772005-03-30 19:02:15 +00002855@REPLY
2856 unsigned int max_msgsize;
Alexandre Julliardaaf477f2007-04-17 20:08:59 +02002857 timeout_t read_timeout;
Mike McCormack2ab6a772005-03-30 19:02:15 +00002858@END
2859#define MAILSLOT_SET_READ_TIMEOUT 1
Vitaliy Margolen3c6bdcc2005-11-29 17:21:05 +01002860
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 Margolen80444df2005-11-30 19:22:57 +01002882
2883
Alexandre Julliarda5e38b32007-12-05 16:57:41 +01002884/* 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 Julliard5c377882008-12-06 17:29:31 +01002889 data_size_t name_len; /* length of the entry name in bytes */
Alexandre Julliarda5e38b32007-12-05 16:57:41 +01002890 VARARG(name,unicode_str,name_len); /* entry name */
2891 VARARG(type,unicode_str); /* entry type */
2892@END
2893
2894
Vitaliy Margolen80444df2005-11-30 19:22:57 +01002895/* 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 Julliard0f273c12006-07-26 10:43:25 +02002900 data_size_t name_len; /* length of the symlink name in bytes */
Vitaliy Margolen80444df2005-11-30 19:22:57 +01002901 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 Margolenbae75022007-01-24 23:43:04 -07002925
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 Shearmand342d142007-02-21 17:10:45 +00002934
Alexandre Julliardba715792008-10-20 16:21:06 +02002935
2936/* Unlink a named object */
2937@REQ(unlink_object)
2938 obj_handle_t handle; /* handle to the object */
2939@END
2940
2941
Rob Shearmand342d142007-02-21 17:10:45 +00002942/* 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 Langc2cb2962007-03-06 16:33:26 -08002948
2949/* Allocate a locally-unique identifier */
2950@REQ(allocate_locally_unique_id)
2951@REPLY
2952 luid_t luid;
2953@END
Alexandre Julliardb43dc152007-05-08 20:28:37 +02002954
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 Julliard923310a2008-12-29 17:28:40 +01002971 client_ptr_t user_ptr; /* opaque ptr for use by client */
Alexandre Julliardb43dc152007-05-08 20:28:37 +02002972 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 Julliard78b75102007-05-08 20:40:26 +02002982
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 Julliard923310a2008-12-29 17:28:40 +01002993 client_ptr_t user_ptr; /* opaque ptr for the device */
Alexandre Julliard78b75102007-05-08 20:40:26 +02002994 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 Julliard156b2052007-06-06 20:33:13 +02002998
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 Shearman3f431a02007-09-13 16:47:56 +01003005
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 Turkin47758242007-09-18 00:00:45 +04003018
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 Julliarddc7f1702008-12-15 13:29:38 +01003046 apc_param_t ckey; /* completion key */
3047 apc_param_t cvalue; /* completion value */
Alexandre Julliardf6fa72d2008-12-15 13:30:25 +01003048 unsigned int information; /* IO_STATUS_BLOCK Information */
Andrey Turkin47758242007-09-18 00:00:45 +04003049 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 Julliarddc7f1702008-12-15 13:29:38 +01003057 apc_param_t ckey; /* completion key */
3058 apc_param_t cvalue; /* completion value */
Alexandre Julliardf6fa72d2008-12-15 13:30:25 +01003059 unsigned int information; /* IO_STATUS_BLOCK Information */
Andrey Turkin47758242007-09-18 00:00:45 +04003060 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 Turkind1a81552007-09-28 00:03:39 +04003070
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 Julliarddc7f1702008-12-15 13:29:38 +01003076 apc_param_t ckey; /* completion key */
Andrey Turkind1a81552007-09-28 00:03:39 +04003077@END
Andrey Turkin27cb7c72007-11-10 01:11:58 +03003078
3079
3080/* check for associated completion and push msg */
3081@REQ(add_fd_completion)
3082 obj_handle_t handle; /* async' object */
Alexandre Julliarddc7f1702008-12-15 13:29:38 +01003083 apc_param_t cvalue; /* completion value */
Andrey Turkin27cb7c72007-11-10 01:11:58 +03003084 unsigned int status; /* completion status */
Alexandre Julliardf6fa72d2008-12-15 13:30:25 +01003085 unsigned int information; /* IO_STATUS_BLOCK Information */
Andrey Turkin27cb7c72007-11-10 01:11:58 +03003086@END
Alexandre Julliard05b41812008-09-12 15:30:47 +02003087
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