blob: f0490cbd3dcb1b2758d0f5ecf82704aff9b11cfd [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
22 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 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
34struct request_header
35{
Alexandre Julliard9caa71e2001-11-30 18:46:42 +000036 int req; /* request code */
37 size_t request_size; /* request variable part size */
38 size_t reply_size; /* reply variable part maximum size */
Alexandre Julliard37ec9272001-07-19 00:35:37 +000039};
40
41struct reply_header
42{
Alexandre Julliard9caa71e2001-11-30 18:46:42 +000043 unsigned int error; /* error result */
44 size_t reply_size; /* reply variable part size */
Alexandre Julliard37ec9272001-07-19 00:35:37 +000045};
46
47/* placeholder structure for the maximum allowed request size */
48/* this is used to construct the generic_request union */
49struct request_max_size
50{
51 int pad[16]; /* the max request size is 16 ints */
52};
53
Alexandre Julliardb1df3922002-10-21 23:43:04 +000054typedef void *obj_handle_t;
55typedef void *user_handle_t;
Alexandre Julliard23bb3712002-10-18 23:46:28 +000056typedef unsigned short atom_t;
Alexandre Julliard54f22872002-10-03 19:54:57 +000057typedef unsigned int process_id_t;
58typedef unsigned int thread_id_t;
Alexandre Julliard37ec9272001-07-19 00:35:37 +000059
Alexandre Julliard7695d692001-09-24 01:19:59 +000060#define FIRST_USER_HANDLE 0x0020 /* first possible value for low word of user handle */
61#define LAST_USER_HANDLE 0xffef /* last possible value for low word of user handle */
62
63
Alexandre Julliard37ec9272001-07-19 00:35:37 +000064/* definitions of the event data depending on the event code */
65struct debug_event_exception
66{
67 EXCEPTION_RECORD record; /* exception record */
68 int first; /* first chance exception? */
69};
70struct debug_event_create_thread
71{
Alexandre Julliard51885742002-05-30 20:12:58 +000072 obj_handle_t handle; /* handle to the new thread */
73 void *teb; /* thread teb (in debugged process address space) */
74 void *start; /* thread startup routine */
Alexandre Julliard37ec9272001-07-19 00:35:37 +000075};
76struct debug_event_create_process
77{
Alexandre Julliard51885742002-05-30 20:12:58 +000078 obj_handle_t file; /* handle to the process exe file */
79 obj_handle_t process; /* handle to the new process */
80 obj_handle_t thread; /* handle to the new thread */
81 void *base; /* base of executable image */
82 int dbg_offset; /* offset of debug info in file */
83 int dbg_size; /* size of debug info */
84 void *teb; /* thread teb (in debugged process address space) */
85 void *start; /* thread startup routine */
86 void *name; /* image name (optional) */
87 int unicode; /* is it Unicode? */
Alexandre Julliard37ec9272001-07-19 00:35:37 +000088};
89struct debug_event_exit
90{
Alexandre Julliard51885742002-05-30 20:12:58 +000091 int exit_code; /* thread or process exit code */
Alexandre Julliard37ec9272001-07-19 00:35:37 +000092};
93struct debug_event_load_dll
94{
Alexandre Julliard51885742002-05-30 20:12:58 +000095 obj_handle_t handle; /* file handle for the dll */
96 void *base; /* base address of the dll */
97 int dbg_offset; /* offset of debug info in file */
98 int dbg_size; /* size of debug info */
99 void *name; /* image name (optional) */
100 int unicode; /* is it Unicode? */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000101};
102struct debug_event_unload_dll
103{
104 void *base; /* base address of the dll */
105};
106struct debug_event_output_string
107{
108 void *string; /* string to display (in debugged process address space) */
109 int unicode; /* is it Unicode? */
110 int length; /* string length */
111};
112struct debug_event_rip_info
113{
114 int error; /* ??? */
115 int type; /* ??? */
116};
117union debug_event_data
118{
119 struct debug_event_exception exception;
120 struct debug_event_create_thread create_thread;
121 struct debug_event_create_process create_process;
122 struct debug_event_exit exit;
123 struct debug_event_load_dll load_dll;
124 struct debug_event_unload_dll unload_dll;
125 struct debug_event_output_string output_string;
126 struct debug_event_rip_info rip_info;
127};
128
129/* debug event data */
130typedef struct
131{
132 int code; /* event code */
133 union debug_event_data info; /* event information */
134} debug_event_t;
135
136/* structure used in sending an fd from client to server */
137struct send_fd
138{
Alexandre Julliard54f22872002-10-03 19:54:57 +0000139 thread_id_t tid; /* thread id */
140 int fd; /* file descriptor on client-side */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000141};
142
143/* structure sent by the server on the wait fifo */
144struct wake_up_reply
145{
146 void *cookie; /* magic cookie that was passed in select_request */
147 int signaled; /* wait result */
148};
149
Alexandre Julliard462172a2003-04-02 22:48:59 +0000150/* structure for absolute timeouts */
151typedef struct
152{
153 int sec; /* seconds since Unix epoch */
154 int usec; /* microseconds */
155} abs_time_t;
156
Alexandre Julliard7a2017d2001-10-12 19:10:26 +0000157/* structure returned in the list of window properties */
158typedef struct
159{
160 atom_t atom; /* property atom */
161 short string; /* was atom a string originally? */
Alexandre Julliard51885742002-05-30 20:12:58 +0000162 obj_handle_t handle; /* handle stored in property */
Alexandre Julliard7a2017d2001-10-12 19:10:26 +0000163} property_data_t;
164
Alexandre Julliard0d509652001-10-16 21:55:37 +0000165/* structure to specify window rectangles */
166typedef struct
167{
168 int left;
169 int top;
170 int right;
171 int bottom;
172} rectangle_t;
173
Alexandre Julliard9caa71e2001-11-30 18:46:42 +0000174/* structure for console char/attribute info */
175typedef struct
176{
177 WCHAR ch;
178 unsigned short attr;
179} char_info_t;
180
Robert Shearman7bff3542005-05-23 16:33:00 +0000181#define MAX_ACL_LEN 65535
182
183struct security_descriptor
184{
185 unsigned int control; /* SE_ flags */
186 size_t owner_len;
187 size_t group_len;
188 size_t sacl_len;
189 size_t dacl_len;
190 /* VARARGS(owner,SID); */
191 /* VARARGS(group,SID); */
192 /* VARARGS(sacl,ACL); */
193 /* VARARGS(dacl,ACL); */
194};
195
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000196/****************************************************************/
197/* Request declarations */
198
199/* Create a new process from the context of the parent */
200@REQ(new_process)
201 int inherit_all; /* inherit all handles from parent */
Alexandre Julliard01caa5e2005-07-12 20:27:09 +0000202 unsigned int create_flags; /* creation flags */
Alexandre Julliard77c8b1d2003-02-24 20:51:50 +0000203 int unix_pid; /* Unix pid of new process */
Alexandre Julliard51885742002-05-30 20:12:58 +0000204 obj_handle_t exe_file; /* file handle for main exe */
205 obj_handle_t hstdin; /* handle for stdin */
206 obj_handle_t hstdout; /* handle for stdout */
207 obj_handle_t hstderr; /* handle for stderr */
Alexandre Julliard6543a652002-03-29 18:28:56 +0000208 VARARG(info,startup_info); /* startup information */
Alexandre Julliardc4ec2102004-07-16 03:54:35 +0000209 VARARG(env,unicode_str); /* environment for new process */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000210@REPLY
Alexandre Julliard51885742002-05-30 20:12:58 +0000211 obj_handle_t info; /* new process info handle */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000212@END
213
214
215/* Retrieve information about a newly started process */
216@REQ(get_new_process_info)
Alexandre Julliard51885742002-05-30 20:12:58 +0000217 obj_handle_t info; /* info handle returned from new_process_request */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000218 int pinherit; /* process handle inherit flag */
219 int tinherit; /* thread handle inherit flag */
220@REPLY
Alexandre Julliard54f22872002-10-03 19:54:57 +0000221 process_id_t pid; /* process id */
Alexandre Julliard51885742002-05-30 20:12:58 +0000222 obj_handle_t phandle; /* process handle (in the current process) */
Alexandre Julliard54f22872002-10-03 19:54:57 +0000223 thread_id_t tid; /* thread id */
Alexandre Julliard51885742002-05-30 20:12:58 +0000224 obj_handle_t thandle; /* thread handle (in the current process) */
Alexandre Julliard9d802152002-05-24 21:20:27 +0000225 int success; /* did the process start successfully? */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000226@END
227
228
229/* Create a new thread from the context of the parent */
230@REQ(new_thread)
231 int suspend; /* new thread should be suspended on creation */
232 int inherit; /* inherit flag */
233 int request_fd; /* fd for request pipe */
234@REPLY
Alexandre Julliard54f22872002-10-03 19:54:57 +0000235 thread_id_t tid; /* thread id */
Alexandre Julliard51885742002-05-30 20:12:58 +0000236 obj_handle_t handle; /* thread handle (in the current process) */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000237@END
238
239
Alexandre Julliard6543a652002-03-29 18:28:56 +0000240/* Retrieve the new process startup info */
241@REQ(get_startup_info)
Alexandre Julliard6543a652002-03-29 18:28:56 +0000242@REPLY
Alexandre Julliard01caa5e2005-07-12 20:27:09 +0000243 unsigned int create_flags; /* creation flags */
244 obj_handle_t exe_file; /* file handle for main exe */
245 obj_handle_t hstdin; /* handle for stdin */
246 obj_handle_t hstdout; /* handle for stdout */
247 obj_handle_t hstderr; /* handle for stderr */
Alexandre Julliard6543a652002-03-29 18:28:56 +0000248 VARARG(info,startup_info); /* startup information */
Alexandre Julliardc4ec2102004-07-16 03:54:35 +0000249 VARARG(env,unicode_str); /* environment */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000250@END
251
252
253/* Signal the end of the process initialization */
254@REQ(init_process_done)
255 void* module; /* main module base address */
Alexandre Julliardaeb56602002-03-22 00:21:23 +0000256 size_t module_size; /* main module size */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000257 void* entry; /* process entry point */
258 void* name; /* ptr to ptr to name (in process addr space) */
Alexandre Julliard51885742002-05-30 20:12:58 +0000259 obj_handle_t exe_file; /* file handle for main exe */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000260 int gui; /* is it a GUI process? */
Alexandre Julliardc30cefb2003-09-30 01:04:19 +0000261 VARARG(filename,unicode_str); /* file name of main exe */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000262@END
263
264
265/* Initialize a thread; called from the child after fork()/clone() */
266@REQ(init_thread)
267 int unix_pid; /* Unix pid of new thread */
Alexandre Julliarda8497bd2003-03-22 21:00:09 +0000268 int unix_tid; /* Unix tid of new thread */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000269 void* teb; /* TEB of new thread (in thread address space) */
Alexandre Julliard0424f382005-07-13 12:12:43 +0000270 void* peb; /* address of PEB (in thread address space) */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000271 void* entry; /* thread entry point (in thread address space) */
Alexandre Julliard0424f382005-07-13 12:12:43 +0000272 void* ldt_copy; /* address of LDT copy (in thread address space) */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000273 int reply_fd; /* fd for reply pipe */
274 int wait_fd; /* fd for blocking calls pipe */
Alexandre Julliard0424f382005-07-13 12:12:43 +0000275 int debug_level; /* new debug level */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000276@REPLY
Alexandre Julliard54f22872002-10-03 19:54:57 +0000277 process_id_t pid; /* process id of the new thread's process */
278 thread_id_t tid; /* thread id of the new thread */
Alexandre Julliard11ad6a02005-07-13 19:43:35 +0000279 size_t info_size; /* total size of startup info */
Alexandre Julliard9ad56282005-07-14 10:32:46 +0000280 time_t server_start; /* server start time */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000281 int version; /* protocol version */
282@END
283
284
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000285/* Terminate a process */
286@REQ(terminate_process)
Alexandre Julliard51885742002-05-30 20:12:58 +0000287 obj_handle_t handle; /* process handle to terminate */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000288 int exit_code; /* process exit code */
289@REPLY
290 int self; /* suicide? */
291@END
292
293
294/* Terminate a thread */
295@REQ(terminate_thread)
Alexandre Julliard51885742002-05-30 20:12:58 +0000296 obj_handle_t handle; /* thread handle to terminate */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000297 int exit_code; /* thread exit code */
298@REPLY
299 int self; /* suicide? */
300 int last; /* last thread in this process? */
301@END
302
303
304/* Retrieve information about a process */
305@REQ(get_process_info)
Alexandre Julliard51885742002-05-30 20:12:58 +0000306 obj_handle_t handle; /* process handle */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000307@REPLY
Alexandre Julliard54f22872002-10-03 19:54:57 +0000308 process_id_t pid; /* server process id */
Eric Pouechb0fd2ad2004-06-14 17:02:00 +0000309 process_id_t ppid; /* server process id of parent */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000310 int exit_code; /* process exit code */
311 int priority; /* priority class */
Eric Pouechb09582a2005-09-27 10:52:10 +0000312 int affinity; /* process affinity mask */
Eric Pouechb0fd2ad2004-06-14 17:02:00 +0000313 void* peb; /* PEB address in process address space */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000314@END
315
316
317/* Set a process informations */
318@REQ(set_process_info)
Alexandre Julliard51885742002-05-30 20:12:58 +0000319 obj_handle_t handle; /* process handle */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000320 int mask; /* setting mask (see below) */
321 int priority; /* priority class */
322 int affinity; /* affinity mask */
323@END
324#define SET_PROCESS_INFO_PRIORITY 0x01
325#define SET_PROCESS_INFO_AFFINITY 0x02
326
327
328/* Retrieve information about a thread */
329@REQ(get_thread_info)
Ryan Cumming24f4ece2002-11-25 01:33:38 +0000330 obj_handle_t handle; /* thread handle */
331 thread_id_t tid_in; /* thread id (optional) */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000332@REPLY
Alexandre Julliard4f196ea2003-07-09 02:57:57 +0000333 process_id_t pid; /* server process id */
Ryan Cumming24f4ece2002-11-25 01:33:38 +0000334 thread_id_t tid; /* server thread id */
335 void* teb; /* thread teb pointer */
336 int exit_code; /* thread exit code */
337 int priority; /* thread priority level */
Alexandre Julliard4f196ea2003-07-09 02:57:57 +0000338 int affinity; /* thread affinity mask */
Ryan Cumming24f4ece2002-11-25 01:33:38 +0000339 time_t creation_time; /* thread creation time */
340 time_t exit_time; /* thread exit time */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000341@END
342
343
344/* Set a thread informations */
345@REQ(set_thread_info)
Alexandre Julliard51885742002-05-30 20:12:58 +0000346 obj_handle_t handle; /* thread handle */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000347 int mask; /* setting mask (see below) */
348 int priority; /* priority class */
349 int affinity; /* affinity mask */
Robert Shearman4bba2162005-06-20 13:18:38 +0000350 obj_handle_t token; /* impersonation token */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000351@END
352#define SET_THREAD_INFO_PRIORITY 0x01
353#define SET_THREAD_INFO_AFFINITY 0x02
Robert Shearman4bba2162005-06-20 13:18:38 +0000354#define SET_THREAD_INFO_TOKEN 0x04
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000355
356
Eric Pouech2359b572003-01-09 00:01:28 +0000357/* Retrieve information about a module */
358@REQ(get_dll_info)
359 obj_handle_t handle; /* process handle */
360 void* base_address; /* base address of module */
361@REPLY
362 size_t size; /* module size */
363 void* entry_point;
Alexandre Julliardc30cefb2003-09-30 01:04:19 +0000364 VARARG(filename,unicode_str); /* file name of module */
Eric Pouech2359b572003-01-09 00:01:28 +0000365@END
366
367
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000368/* Suspend a thread */
369@REQ(suspend_thread)
Alexandre Julliard51885742002-05-30 20:12:58 +0000370 obj_handle_t handle; /* thread handle */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000371@REPLY
372 int count; /* new suspend count */
373@END
374
375
376/* Resume a thread */
377@REQ(resume_thread)
Alexandre Julliard51885742002-05-30 20:12:58 +0000378 obj_handle_t handle; /* thread handle */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000379@REPLY
380 int count; /* new suspend count */
381@END
382
383
384/* Notify the server that a dll has been loaded */
385@REQ(load_dll)
Alexandre Julliard51885742002-05-30 20:12:58 +0000386 obj_handle_t handle; /* file handle */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000387 void* base; /* base address */
Alexandre Julliardaeb56602002-03-22 00:21:23 +0000388 size_t size; /* dll size */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000389 int dbg_offset; /* debug info offset */
390 int dbg_size; /* debug info size */
391 void* name; /* ptr to ptr to name (in process addr space) */
Alexandre Julliardc30cefb2003-09-30 01:04:19 +0000392 VARARG(filename,unicode_str); /* file name of dll */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000393@END
394
395
396/* Notify the server that a dll is being unloaded */
397@REQ(unload_dll)
398 void* base; /* base address */
399@END
400
401
402/* Queue an APC for a thread */
403@REQ(queue_apc)
Alexandre Julliard51885742002-05-30 20:12:58 +0000404 obj_handle_t handle; /* thread handle */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000405 int user; /* user or system apc? */
406 void* func; /* function to call */
Alexandre Julliard088bcf92003-04-04 22:26:34 +0000407 void* arg1; /* params for function to call */
408 void* arg2;
409 void* arg3;
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000410@END
411
412
413/* Get next APC to call */
414@REQ(get_apc)
415 int alertable; /* is thread alertable? */
416@REPLY
417 void* func; /* function to call */
418 int type; /* function type */
Alexandre Julliard088bcf92003-04-04 22:26:34 +0000419 void* arg1; /* function arguments */
420 void* arg2;
421 void* arg3;
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000422@END
Eric Pouech0a9f98b2005-04-18 15:38:44 +0000423enum apc_type { APC_NONE, APC_USER, APC_TIMER, APC_ASYNC_IO };
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000424
425
426/* Close a handle for the current process */
427@REQ(close_handle)
Alexandre Julliard51885742002-05-30 20:12:58 +0000428 obj_handle_t handle; /* handle to close */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000429@REPLY
430 int fd; /* associated fd to close */
431@END
432
433
434/* Set a handle information */
435@REQ(set_handle_info)
Alexandre Julliard51885742002-05-30 20:12:58 +0000436 obj_handle_t handle; /* handle we are interested in */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000437 int flags; /* new handle flags */
438 int mask; /* mask for flags to set */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000439@REPLY
440 int old_flags; /* old flag value */
Alexandre Julliard38502f72005-08-23 18:43:50 +0000441@END
442
443
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000444/* Duplicate a handle */
445@REQ(dup_handle)
Alexandre Julliard51885742002-05-30 20:12:58 +0000446 obj_handle_t src_process; /* src process handle */
447 obj_handle_t src_handle; /* src handle to duplicate */
448 obj_handle_t dst_process; /* dst process handle */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000449 unsigned int access; /* wanted access rights */
450 int inherit; /* inherit flag */
451 int options; /* duplicate options (see below) */
452@REPLY
Alexandre Julliard51885742002-05-30 20:12:58 +0000453 obj_handle_t handle; /* duplicated handle in dst process */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000454 int fd; /* associated fd to close */
455@END
456#define DUP_HANDLE_CLOSE_SOURCE DUPLICATE_CLOSE_SOURCE
457#define DUP_HANDLE_SAME_ACCESS DUPLICATE_SAME_ACCESS
458#define DUP_HANDLE_MAKE_GLOBAL 0x80000000 /* Not a Windows flag */
459
460
461/* Open a handle to a process */
462@REQ(open_process)
Alexandre Julliard54f22872002-10-03 19:54:57 +0000463 process_id_t pid; /* process id to open */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000464 unsigned int access; /* wanted access rights */
465 int inherit; /* inherit flag */
466@REPLY
Alexandre Julliard51885742002-05-30 20:12:58 +0000467 obj_handle_t handle; /* handle to the process */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000468@END
469
470
Chris Morgan417296c2002-04-02 00:49:05 +0000471/* Open a handle to a thread */
472@REQ(open_thread)
Alexandre Julliard54f22872002-10-03 19:54:57 +0000473 thread_id_t tid; /* thread id to open */
Chris Morgan417296c2002-04-02 00:49:05 +0000474 unsigned int access; /* wanted access rights */
475 int inherit; /* inherit flag */
476@REPLY
Alexandre Julliard51885742002-05-30 20:12:58 +0000477 obj_handle_t handle; /* handle to the thread */
Chris Morgan417296c2002-04-02 00:49:05 +0000478@END
479
480
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000481/* Wait for handles */
482@REQ(select)
483 int flags; /* wait flags (see below) */
484 void* cookie; /* magic cookie to return to client */
Mike McCormackf92fff62005-04-24 17:35:52 +0000485 obj_handle_t signal; /* object to signal (0 if none) */
Alexandre Julliard462172a2003-04-02 22:48:59 +0000486 abs_time_t timeout; /* absolute timeout */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000487 VARARG(handles,handles); /* handles to select on */
488@END
489#define SELECT_ALL 1
490#define SELECT_ALERTABLE 2
491#define SELECT_INTERRUPTIBLE 4
492#define SELECT_TIMEOUT 8
493
494
495/* Create an event */
496@REQ(create_event)
Eric Pouech44158dd2004-12-02 18:05:37 +0000497 unsigned int access; /* wanted access rights */
Vitaliy Margolena9960002005-10-27 18:30:37 +0000498 unsigned int attributes; /* object attributes */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000499 int manual_reset; /* manual reset event */
500 int initial_state; /* initial state of the event */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000501 VARARG(name,unicode_str); /* object name */
502@REPLY
Alexandre Julliard51885742002-05-30 20:12:58 +0000503 obj_handle_t handle; /* handle to the event */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000504@END
505
506/* Event operation */
507@REQ(event_op)
Alexandre Julliard51885742002-05-30 20:12:58 +0000508 obj_handle_t handle; /* handle to event */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000509 int op; /* event operation (see below) */
510@END
511enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT };
512
513
514/* Open an event */
515@REQ(open_event)
516 unsigned int access; /* wanted access rights */
Vitaliy Margolena9960002005-10-27 18:30:37 +0000517 unsigned int attributes; /* object attributes */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000518 VARARG(name,unicode_str); /* object name */
519@REPLY
Alexandre Julliard51885742002-05-30 20:12:58 +0000520 obj_handle_t handle; /* handle to the event */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000521@END
522
523
524/* Create a mutex */
525@REQ(create_mutex)
Eric Pouech44158dd2004-12-02 18:05:37 +0000526 unsigned int access; /* wanted access rights */
Vitaliy Margolena9960002005-10-27 18:30:37 +0000527 unsigned int attributes; /* object attributes */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000528 int owned; /* initially owned? */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000529 VARARG(name,unicode_str); /* object name */
530@REPLY
Alexandre Julliard51885742002-05-30 20:12:58 +0000531 obj_handle_t handle; /* handle to the mutex */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000532@END
533
534
535/* Release a mutex */
536@REQ(release_mutex)
Alexandre Julliard51885742002-05-30 20:12:58 +0000537 obj_handle_t handle; /* handle to the mutex */
Eric Pouech44158dd2004-12-02 18:05:37 +0000538@REPLY
539 unsigned int prev_count; /* value of internal counter, before release */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000540@END
541
542
543/* Open a mutex */
544@REQ(open_mutex)
545 unsigned int access; /* wanted access rights */
Vitaliy Margolena9960002005-10-27 18:30:37 +0000546 unsigned int attributes; /* object attributes */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000547 VARARG(name,unicode_str); /* object name */
548@REPLY
Alexandre Julliard51885742002-05-30 20:12:58 +0000549 obj_handle_t handle; /* handle to the mutex */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000550@END
551
552
553/* Create a semaphore */
554@REQ(create_semaphore)
Eric Pouech44158dd2004-12-02 18:05:37 +0000555 unsigned int access; /* wanted access rights */
Vitaliy Margolena9960002005-10-27 18:30:37 +0000556 unsigned int attributes; /* object attributes */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000557 unsigned int initial; /* initial count */
558 unsigned int max; /* maximum count */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000559 VARARG(name,unicode_str); /* object name */
560@REPLY
Alexandre Julliard51885742002-05-30 20:12:58 +0000561 obj_handle_t handle; /* handle to the semaphore */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000562@END
563
564
565/* Release a semaphore */
566@REQ(release_semaphore)
Alexandre Julliard51885742002-05-30 20:12:58 +0000567 obj_handle_t handle; /* handle to the semaphore */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000568 unsigned int count; /* count to add to semaphore */
569@REPLY
570 unsigned int prev_count; /* previous semaphore count */
571@END
572
573
574/* Open a semaphore */
575@REQ(open_semaphore)
576 unsigned int access; /* wanted access rights */
Vitaliy Margolena9960002005-10-27 18:30:37 +0000577 unsigned int attributes; /* object attributes */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000578 VARARG(name,unicode_str); /* object name */
579@REPLY
Alexandre Julliard51885742002-05-30 20:12:58 +0000580 obj_handle_t handle; /* handle to the semaphore */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000581@END
582
583
584/* Create a file */
585@REQ(create_file)
586 unsigned int access; /* wanted access rights */
587 int inherit; /* inherit flag */
588 unsigned int sharing; /* sharing flags */
589 int create; /* file create action */
Alexandre Julliard014099c2004-03-12 01:56:49 +0000590 unsigned int options; /* file options */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000591 unsigned int attrs; /* file attributes for creation */
592 VARARG(filename,string); /* file name */
593@REPLY
Alexandre Julliard51885742002-05-30 20:12:58 +0000594 obj_handle_t handle; /* handle to the file */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000595@END
596
597
598/* Allocate a file handle for a Unix fd */
599@REQ(alloc_file_handle)
600 unsigned int access; /* wanted access rights */
Eric Pouech0b83d4c2001-11-23 23:04:58 +0000601 int inherit; /* inherit flag */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000602 int fd; /* file descriptor on the client side */
603@REPLY
Alexandre Julliard51885742002-05-30 20:12:58 +0000604 obj_handle_t handle; /* handle to the file */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000605@END
606
607
608/* Get a Unix fd to access a file */
609@REQ(get_handle_fd)
Alexandre Julliard51885742002-05-30 20:12:58 +0000610 obj_handle_t handle; /* handle to the file */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000611 unsigned int access; /* wanted access rights */
612@REPLY
613 int fd; /* file descriptor */
Alexandre Julliardf62f6e82005-08-24 18:33:50 +0000614 int removable; /* is device removable? (-1 if unknown) */
Martin Wilck88cd32b2002-01-09 20:30:51 +0000615 int flags; /* file read/write flags (see below) */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000616@END
Eric Pouech1ffddb42004-08-17 23:37:55 +0000617#define FD_FLAG_OVERLAPPED 0x01 /* fd opened in overlapped mode */
618#define FD_FLAG_TIMEOUT 0x02 /* read/write is synchronous */
Martin Wilckbff7e692002-04-25 21:31:11 +0000619#define FD_FLAG_RECV_SHUTDOWN 0x04
620#define FD_FLAG_SEND_SHUTDOWN 0x08
Eric Pouech1ffddb42004-08-17 23:37:55 +0000621#define FD_FLAG_AVAILABLE 0x10 /* in overlap read/write operation,
622 * only handle available data (don't wait) */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000623
Alexandre Julliardf62f6e82005-08-24 18:33:50 +0000624/* Set the cached file descriptor of a handle */
625@REQ(set_handle_fd)
626 obj_handle_t handle; /* handle we are interested in */
627 int fd; /* file descriptor */
628 int removable; /* is device removable? (-1 if unknown) */
629@REPLY
630 int cur_fd; /* current file descriptor */
631@END
632
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000633
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000634/* Flush a file buffers */
635@REQ(flush_file)
Alexandre Julliard51885742002-05-30 20:12:58 +0000636 obj_handle_t handle; /* handle to the file */
Mike McCormackef8b9462003-05-15 04:22:45 +0000637@REPLY
638 obj_handle_t event; /* event set when finished */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000639@END
640
641
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000642/* Lock a region of a file */
643@REQ(lock_file)
Alexandre Julliard51885742002-05-30 20:12:58 +0000644 obj_handle_t handle; /* handle to the file */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000645 unsigned int offset_low; /* offset of start of lock */
646 unsigned int offset_high; /* offset of start of lock */
647 unsigned int count_low; /* count of bytes to lock */
648 unsigned int count_high; /* count of bytes to lock */
Alexandre Julliardce613492003-03-18 05:04:33 +0000649 int shared; /* shared or exclusive lock? */
650 int wait; /* do we want to wait? */
651@REPLY
652 obj_handle_t handle; /* handle to wait on */
653 int overlapped; /* is it an overlapped I/O handle? */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000654@END
655
656
657/* Unlock a region of a file */
658@REQ(unlock_file)
Alexandre Julliard51885742002-05-30 20:12:58 +0000659 obj_handle_t handle; /* handle to the file */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000660 unsigned int offset_low; /* offset of start of unlock */
661 unsigned int offset_high; /* offset of start of unlock */
662 unsigned int count_low; /* count of bytes to unlock */
663 unsigned int count_high; /* count of bytes to unlock */
664@END
665
666
Alexandre Julliard964815b2005-08-08 15:11:03 +0000667/* Get ready to unmount a Unix device */
668@REQ(unmount_device)
669 obj_handle_t handle; /* handle to a file on the device */
670@END
671
672
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000673/* Create a socket */
674@REQ(create_socket)
675 unsigned int access; /* wanted access rights */
676 int inherit; /* inherit flag */
677 int family; /* family, see socket manpage */
678 int type; /* type, see socket manpage */
679 int protocol; /* protocol, see socket manpage */
Martin Wilckaa477052002-01-09 21:16:24 +0000680 unsigned int flags; /* socket flags */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000681@REPLY
Alexandre Julliard51885742002-05-30 20:12:58 +0000682 obj_handle_t handle; /* handle to the new socket */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000683@END
684
685
686/* Accept a socket */
687@REQ(accept_socket)
Alexandre Julliard51885742002-05-30 20:12:58 +0000688 obj_handle_t lhandle; /* handle to the listening socket */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000689 unsigned int access; /* wanted access rights */
690 int inherit; /* inherit flag */
691@REPLY
Alexandre Julliard51885742002-05-30 20:12:58 +0000692 obj_handle_t handle; /* handle to the new socket */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000693@END
694
695
696/* Set socket event parameters */
697@REQ(set_socket_event)
Alexandre Julliard51885742002-05-30 20:12:58 +0000698 obj_handle_t handle; /* handle to the socket */
Alexandre Julliard81f2a732002-03-23 20:43:52 +0000699 unsigned int mask; /* event mask */
Alexandre Julliard51885742002-05-30 20:12:58 +0000700 obj_handle_t event; /* event object */
Alexandre Julliard81f2a732002-03-23 20:43:52 +0000701 user_handle_t window; /* window to send the message to */
702 unsigned int msg; /* message to send */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000703@END
704
705
706/* Get socket event parameters */
707@REQ(get_socket_event)
Alexandre Julliard51885742002-05-30 20:12:58 +0000708 obj_handle_t handle; /* handle to the socket */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000709 int service; /* clear pending? */
Alexandre Julliard51885742002-05-30 20:12:58 +0000710 obj_handle_t c_event; /* event to clear */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000711@REPLY
712 unsigned int mask; /* event mask */
713 unsigned int pmask; /* pending events */
714 unsigned int state; /* status bits */
715 VARARG(errors,ints); /* event errors */
716@END
717
718
719/* Reenable pending socket events */
720@REQ(enable_socket_event)
Alexandre Julliard51885742002-05-30 20:12:58 +0000721 obj_handle_t handle; /* handle to the socket */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000722 unsigned int mask; /* events to re-enable */
723 unsigned int sstate; /* status bits to set */
724 unsigned int cstate; /* status bits to clear */
725@END
726
Martin Wilckd15bf1c2002-04-23 22:03:42 +0000727@REQ(set_socket_deferred)
Alexandre Julliard51885742002-05-30 20:12:58 +0000728 obj_handle_t handle; /* handle to the socket */
729 obj_handle_t deferred; /* handle to the socket for which accept() is deferred */
Martin Wilckd15bf1c2002-04-23 22:03:42 +0000730@END
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000731
Eric Pouech0b83d4c2001-11-23 23:04:58 +0000732/* Allocate a console (only used by a console renderer) */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000733@REQ(alloc_console)
734 unsigned int access; /* wanted access rights */
735 int inherit; /* inherit flag */
Alexandre Julliard54f22872002-10-03 19:54:57 +0000736 process_id_t pid; /* pid of process which shall be attached to the console */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000737@REPLY
Alexandre Julliard51885742002-05-30 20:12:58 +0000738 obj_handle_t handle_in; /* handle to console input */
739 obj_handle_t event; /* handle to renderer events change notification */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000740@END
741
742
743/* Free the console of the current process */
744@REQ(free_console)
745@END
746
747
Eric Pouech0b83d4c2001-11-23 23:04:58 +0000748#define CONSOLE_RENDERER_NONE_EVENT 0x00
749#define CONSOLE_RENDERER_TITLE_EVENT 0x01
750#define CONSOLE_RENDERER_ACTIVE_SB_EVENT 0x02
751#define CONSOLE_RENDERER_SB_RESIZE_EVENT 0x03
752#define CONSOLE_RENDERER_UPDATE_EVENT 0x04
753#define CONSOLE_RENDERER_CURSOR_POS_EVENT 0x05
754#define CONSOLE_RENDERER_CURSOR_GEOM_EVENT 0x06
755#define CONSOLE_RENDERER_DISPLAY_EVENT 0x07
756#define CONSOLE_RENDERER_EXIT_EVENT 0x08
757struct console_renderer_event
758{
759 short event;
760 union
761 {
762 struct update
763 {
764 short top;
765 short bottom;
766 } update;
767 struct resize
768 {
769 short width;
770 short height;
771 } resize;
772 struct cursor_pos
773 {
774 short x;
775 short y;
776 } cursor_pos;
777 struct cursor_geom
778 {
779 short visible;
780 short size;
781 } cursor_geom;
782 struct display
783 {
784 short left;
785 short top;
786 short width;
787 short height;
788 } display;
789 } u;
790};
791
792/* retrieve console events for the renderer */
793@REQ(get_console_renderer_events)
Alexandre Julliard51885742002-05-30 20:12:58 +0000794 obj_handle_t handle; /* handle to console input events */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000795@REPLY
Eric Pouech0b83d4c2001-11-23 23:04:58 +0000796 VARARG(data,bytes); /* the various console_renderer_events */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000797@END
798
799
Eric Pouech0b83d4c2001-11-23 23:04:58 +0000800/* Open a handle to the process console */
801@REQ(open_console)
802 int from; /* 0 (resp 1) input (resp output) of current process console */
803 /* otherwise console_in handle to get active screen buffer? */
804 unsigned int access; /* wanted access rights */
805 int inherit; /* inherit flag */
806 int share; /* share mask (only for output handles) */
807@REPLY
Alexandre Julliard51885742002-05-30 20:12:58 +0000808 obj_handle_t handle; /* handle to the console */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000809@END
810
811
Eric Pouech412d37f2003-06-21 02:07:10 +0000812/* Get the input queue wait event */
813@REQ(get_console_wait_event)
814@REPLY
815 obj_handle_t handle;
816@END
817
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000818/* Get a console mode (input or output) */
819@REQ(get_console_mode)
Alexandre Julliard51885742002-05-30 20:12:58 +0000820 obj_handle_t handle; /* handle to the console */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000821@REPLY
822 int mode; /* console mode */
823@END
824
825
826/* Set a console mode (input or output) */
827@REQ(set_console_mode)
Alexandre Julliard51885742002-05-30 20:12:58 +0000828 obj_handle_t handle; /* handle to the console */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000829 int mode; /* console mode */
830@END
831
832
Eric Pouech0b83d4c2001-11-23 23:04:58 +0000833/* Set info about a console (input only) */
834@REQ(set_console_input_info)
Alexandre Julliard51885742002-05-30 20:12:58 +0000835 obj_handle_t handle; /* handle to console input, or 0 for process' console */
Eric Pouech0b83d4c2001-11-23 23:04:58 +0000836 int mask; /* setting mask (see below) */
Alexandre Julliard51885742002-05-30 20:12:58 +0000837 obj_handle_t active_sb; /* active screen buffer */
Eric Pouech0b83d4c2001-11-23 23:04:58 +0000838 int history_mode; /* whether we duplicate lines in history */
839 int history_size; /* number of lines in history */
Eric Pouechfa8b85a2003-01-09 06:01:32 +0000840 int edition_mode; /* index to the edition mode flavors */
Eric Pouech0b83d4c2001-11-23 23:04:58 +0000841 VARARG(title,unicode_str); /* console title */
842@END
843#define SET_CONSOLE_INPUT_INFO_ACTIVE_SB 0x01
844#define SET_CONSOLE_INPUT_INFO_TITLE 0x02
845#define SET_CONSOLE_INPUT_INFO_HISTORY_MODE 0x04
846#define SET_CONSOLE_INPUT_INFO_HISTORY_SIZE 0x08
Eric Pouechfa8b85a2003-01-09 06:01:32 +0000847#define SET_CONSOLE_INPUT_INFO_EDITION_MODE 0x10
Eric Pouech0b83d4c2001-11-23 23:04:58 +0000848
849
850/* Get info about a console (input only) */
851@REQ(get_console_input_info)
Alexandre Julliard51885742002-05-30 20:12:58 +0000852 obj_handle_t handle; /* handle to console input, or 0 for process' console */
Eric Pouech0b83d4c2001-11-23 23:04:58 +0000853@REPLY
854 int history_mode; /* whether we duplicate lines in history */
855 int history_size; /* number of lines in history */
856 int history_index; /* number of used lines in history */
Eric Pouechfa8b85a2003-01-09 06:01:32 +0000857 int edition_mode; /* index to the edition mode flavors */
Eric Pouech0b83d4c2001-11-23 23:04:58 +0000858 VARARG(title,unicode_str); /* console title */
859@END
860
861
862/* appends a string to console's history */
863@REQ(append_console_input_history)
Alexandre Julliard51885742002-05-30 20:12:58 +0000864 obj_handle_t handle; /* handle to console input, or 0 for process' console */
Eric Pouech0b83d4c2001-11-23 23:04:58 +0000865 VARARG(line,unicode_str); /* line to add */
866@END
867
868
869/* appends a string to console's history */
870@REQ(get_console_input_history)
Alexandre Julliard51885742002-05-30 20:12:58 +0000871 obj_handle_t handle; /* handle to console input, or 0 for process' console */
Eric Pouech0b83d4c2001-11-23 23:04:58 +0000872 int index; /* index to get line from */
873@REPLY
Alexandre Julliard9caa71e2001-11-30 18:46:42 +0000874 int total; /* total length of line in Unicode chars */
Eric Pouech0b83d4c2001-11-23 23:04:58 +0000875 VARARG(line,unicode_str); /* line to add */
876@END
877
878
879/* creates a new screen buffer on process' console */
880@REQ(create_console_output)
Alexandre Julliard51885742002-05-30 20:12:58 +0000881 obj_handle_t handle_in; /* handle to console input, or 0 for process' console */
Eric Pouech0b83d4c2001-11-23 23:04:58 +0000882 int access; /* wanted access rights */
883 int share; /* sharing credentials */
884 int inherit; /* inherit flag */
885@REPLY
Alexandre Julliard51885742002-05-30 20:12:58 +0000886 obj_handle_t handle_out; /* handle to the screen buffer */
Eric Pouech0b83d4c2001-11-23 23:04:58 +0000887@END
888
889
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000890/* Set info about a console (output only) */
Eric Pouech0b83d4c2001-11-23 23:04:58 +0000891@REQ(set_console_output_info)
Alexandre Julliard51885742002-05-30 20:12:58 +0000892 obj_handle_t handle; /* handle to the console */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000893 int mask; /* setting mask (see below) */
Eric Pouech0b83d4c2001-11-23 23:04:58 +0000894 short int cursor_size; /* size of cursor (percentage filled) */
895 short int cursor_visible;/* cursor visibility flag */
896 short int cursor_x; /* position of cursor (x, y) */
897 short int cursor_y;
898 short int width; /* width of the screen buffer */
899 short int height; /* height of the screen buffer */
900 short int attr; /* default attribute */
901 short int win_left; /* window actually displayed by renderer */
902 short int win_top; /* the rect area is expressed withing the */
903 short int win_right; /* boundaries of the screen buffer */
904 short int win_bottom;
905 short int max_width; /* maximum size (width x height) for the window */
906 short int max_height;
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000907@END
Eric Pouech0b83d4c2001-11-23 23:04:58 +0000908#define SET_CONSOLE_OUTPUT_INFO_CURSOR_GEOM 0x01
909#define SET_CONSOLE_OUTPUT_INFO_CURSOR_POS 0x02
910#define SET_CONSOLE_OUTPUT_INFO_SIZE 0x04
911#define SET_CONSOLE_OUTPUT_INFO_ATTR 0x08
912#define SET_CONSOLE_OUTPUT_INFO_DISPLAY_WINDOW 0x10
913#define SET_CONSOLE_OUTPUT_INFO_MAX_SIZE 0x20
914
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000915
916/* Get info about a console (output only) */
Eric Pouech0b83d4c2001-11-23 23:04:58 +0000917@REQ(get_console_output_info)
Alexandre Julliard51885742002-05-30 20:12:58 +0000918 obj_handle_t handle; /* handle to the console */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000919@REPLY
Eric Pouech0b83d4c2001-11-23 23:04:58 +0000920 short int cursor_size; /* size of cursor (percentage filled) */
921 short int cursor_visible;/* cursor visibility flag */
922 short int cursor_x; /* position of cursor (x, y) */
923 short int cursor_y;
924 short int width; /* width of the screen buffer */
925 short int height; /* height of the screen buffer */
926 short int attr; /* default attribute */
927 short int win_left; /* window actually displayed by renderer */
928 short int win_top; /* the rect area is expressed withing the */
929 short int win_right; /* boundaries of the screen buffer */
930 short int win_bottom;
931 short int max_width; /* maximum size (width x height) for the window */
932 short int max_height;
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000933@END
934
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000935/* Add input records to a console input queue */
936@REQ(write_console_input)
Alexandre Julliard51885742002-05-30 20:12:58 +0000937 obj_handle_t handle; /* handle to the console input */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000938 VARARG(rec,input_records); /* input records */
939@REPLY
940 int written; /* number of records written */
941@END
942
Eric Pouech0b83d4c2001-11-23 23:04:58 +0000943
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000944/* Fetch input records from a console input queue */
945@REQ(read_console_input)
Alexandre Julliard51885742002-05-30 20:12:58 +0000946 obj_handle_t handle; /* handle to the console input */
Alexandre Julliard37ec9272001-07-19 00:35:37 +0000947 int flush; /* flush the retrieved records from the queue? */
948@REPLY
949 int read; /* number of records read */
950 VARARG(rec,input_records); /* input records */
951@END
952
953
Eric Pouech0b83d4c2001-11-23 23:04:58 +0000954/* write data (chars and/or attributes) in a screen buffer */
955@REQ(write_console_output)
Alexandre Julliard51885742002-05-30 20:12:58 +0000956 obj_handle_t handle; /* handle to the console output */
Alexandre Julliard9caa71e2001-11-30 18:46:42 +0000957 int x; /* position where to start writing */
958 int y;
959 int mode; /* char info (see below) */
960 int wrap; /* wrap around at end of line? */
Eric Pouech0b83d4c2001-11-23 23:04:58 +0000961 VARARG(data,bytes); /* info to write */
962@REPLY
Alexandre Julliard9caa71e2001-11-30 18:46:42 +0000963 int written; /* number of char infos actually written */
964 int width; /* width of screen buffer */
965 int height; /* height of screen buffer */
Eric Pouech0b83d4c2001-11-23 23:04:58 +0000966@END
Alexandre Julliard9caa71e2001-11-30 18:46:42 +0000967enum char_info_mode
968{
969 CHAR_INFO_MODE_TEXT, /* characters only */
970 CHAR_INFO_MODE_ATTR, /* attributes only */
971 CHAR_INFO_MODE_TEXTATTR, /* both characters and attributes */
972 CHAR_INFO_MODE_TEXTSTDATTR /* characters but use standard attributes */
973};
Eric Pouech0b83d4c2001-11-23 23:04:58 +0000974
975
Alexandre Julliard9caa71e2001-11-30 18:46:42 +0000976/* fill a screen buffer with constant data (chars and/or attributes) */
977@REQ(fill_console_output)
Alexandre Julliard51885742002-05-30 20:12:58 +0000978 obj_handle_t handle; /* handle to the console output */
Alexandre Julliard9caa71e2001-11-30 18:46:42 +0000979 int x; /* position where to start writing */
980 int y;
981 int mode; /* char info mode */
982 int count; /* number to write */
983 int wrap; /* wrap around at end of line? */
984 char_info_t data; /* data to write */
Eric Pouech0b83d4c2001-11-23 23:04:58 +0000985@REPLY
Alexandre Julliard9caa71e2001-11-30 18:46:42 +0000986 int written; /* number of char infos actually written */
987@END
988
989
990/* read data (chars and/or attributes) from a screen buffer */
991@REQ(read_console_output)
Alexandre Julliard51885742002-05-30 20:12:58 +0000992 obj_handle_t handle; /* handle to the console output */
Alexandre Julliard9caa71e2001-11-30 18:46:42 +0000993 int x; /* position (x,y) where to start reading */
994 int y;
995 int mode; /* char info mode */
996 int wrap; /* wrap around at end of line? */
997@REPLY
998 int width; /* width of screen buffer */
999 int height; /* height of screen buffer */
Eric Pouech0b83d4c2001-11-23 23:04:58 +00001000 VARARG(data,bytes);
1001@END
1002
Eric Pouech93bfa0d2002-06-02 21:22:22 +00001003
Eric Pouech0b83d4c2001-11-23 23:04:58 +00001004/* move a rect (of data) in screen buffer content */
1005@REQ(move_console_output)
Alexandre Julliard51885742002-05-30 20:12:58 +00001006 obj_handle_t handle; /* handle to the console output */
Eric Pouech0b83d4c2001-11-23 23:04:58 +00001007 short int x_src; /* position (x, y) of rect to start moving from */
1008 short int y_src;
1009 short int x_dst; /* position (x, y) of rect to move to */
1010 short int y_dst;
1011 short int w; /* size of the rect (width, height) to move */
1012 short int h;
1013@END
1014
1015
Eric Pouech93bfa0d2002-06-02 21:22:22 +00001016/* Sends a signal to a process group */
1017@REQ(send_console_signal)
1018 int signal; /* the signal to send */
Alexandre Julliard54f22872002-10-03 19:54:57 +00001019 process_id_t group_id; /* the group to send the signal to */
Eric Pouech93bfa0d2002-06-02 21:22:22 +00001020@END
1021
1022
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001023/* Create a change notification */
1024@REQ(create_change_notification)
Alexandre Julliard3e588e32003-03-26 23:41:43 +00001025 obj_handle_t handle; /* handle to the directory */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001026 int subtree; /* watch all the subtree */
Alexandre Julliard3e588e32003-03-26 23:41:43 +00001027 unsigned int filter; /* notification filter */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001028@REPLY
Alexandre Julliard51885742002-05-30 20:12:58 +00001029 obj_handle_t handle; /* handle to the change notification */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001030@END
1031
1032
Alexandre Julliard3e588e32003-03-26 23:41:43 +00001033/* Move to the next change notification */
1034@REQ(next_change_notification)
1035 obj_handle_t handle; /* handle to the change notification */
1036@END
1037
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001038/* Create a file mapping */
1039@REQ(create_mapping)
Vitaliy Margolena9960002005-10-27 18:30:37 +00001040 unsigned int access; /* wanted access rights */
1041 unsigned int attributes; /* object attributes */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001042 int size_high; /* mapping size */
1043 int size_low; /* mapping size */
1044 int protect; /* protection flags (see below) */
Alexandre Julliard51885742002-05-30 20:12:58 +00001045 obj_handle_t file_handle; /* file handle */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001046 VARARG(name,unicode_str); /* object name */
1047@REPLY
Alexandre Julliard51885742002-05-30 20:12:58 +00001048 obj_handle_t handle; /* handle to the mapping */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001049@END
1050/* protection flags */
1051#define VPROT_READ 0x01
1052#define VPROT_WRITE 0x02
1053#define VPROT_EXEC 0x04
1054#define VPROT_WRITECOPY 0x08
1055#define VPROT_GUARD 0x10
1056#define VPROT_NOCACHE 0x20
1057#define VPROT_COMMITTED 0x40
1058#define VPROT_IMAGE 0x80
1059
1060
1061/* Open a mapping */
1062@REQ(open_mapping)
1063 unsigned int access; /* wanted access rights */
Vitaliy Margolena9960002005-10-27 18:30:37 +00001064 unsigned int attributes; /* object attributes */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001065 VARARG(name,unicode_str); /* object name */
1066@REPLY
Alexandre Julliard51885742002-05-30 20:12:58 +00001067 obj_handle_t handle; /* handle to the mapping */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001068@END
1069
1070
1071/* Get information about a file mapping */
1072@REQ(get_mapping_info)
Alexandre Julliard51885742002-05-30 20:12:58 +00001073 obj_handle_t handle; /* handle to the mapping */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001074@REPLY
1075 int size_high; /* mapping size */
1076 int size_low; /* mapping size */
1077 int protect; /* protection flags */
1078 int header_size; /* header size (for VPROT_IMAGE mapping) */
1079 void* base; /* default base addr (for VPROT_IMAGE mapping) */
Alexandre Julliard51885742002-05-30 20:12:58 +00001080 obj_handle_t shared_file; /* shared mapping file handle */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001081 int shared_size; /* shared mapping size */
1082@END
1083
1084
Eric Pouech2359b572003-01-09 00:01:28 +00001085#define SNAP_HEAPLIST 0x00000001
1086#define SNAP_PROCESS 0x00000002
1087#define SNAP_THREAD 0x00000004
1088#define SNAP_MODULE 0x00000008
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001089/* Create a snapshot */
1090@REQ(create_snapshot)
1091 int inherit; /* inherit flag */
Eric Pouech2359b572003-01-09 00:01:28 +00001092 int flags; /* snapshot flags (SNAP_*) */
Alexandre Julliard54f22872002-10-03 19:54:57 +00001093 process_id_t pid; /* process id */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001094@REPLY
Alexandre Julliard51885742002-05-30 20:12:58 +00001095 obj_handle_t handle; /* handle to the snapshot */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001096@END
1097
1098
1099/* Get the next process from a snapshot */
1100@REQ(next_process)
Alexandre Julliard51885742002-05-30 20:12:58 +00001101 obj_handle_t handle; /* handle to the snapshot */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001102 int reset; /* reset snapshot position? */
1103@REPLY
1104 int count; /* process usage count */
Alexandre Julliard54f22872002-10-03 19:54:57 +00001105 process_id_t pid; /* process id */
1106 process_id_t ppid; /* parent process id */
Alexandre Julliardaeb56602002-03-22 00:21:23 +00001107 void* heap; /* heap base */
1108 void* module; /* main module */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001109 int threads; /* number of threads */
1110 int priority; /* process priority */
Eric Pouech9fd54b22003-09-16 01:07:21 +00001111 int handles; /* number of handles */
Alexandre Julliardc30cefb2003-09-30 01:04:19 +00001112 VARARG(filename,unicode_str); /* file name of main exe */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001113@END
1114
1115
1116/* Get the next thread from a snapshot */
1117@REQ(next_thread)
Alexandre Julliard51885742002-05-30 20:12:58 +00001118 obj_handle_t handle; /* handle to the snapshot */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001119 int reset; /* reset snapshot position? */
1120@REPLY
1121 int count; /* thread usage count */
Alexandre Julliard54f22872002-10-03 19:54:57 +00001122 process_id_t pid; /* process id */
1123 thread_id_t tid; /* thread id */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001124 int base_pri; /* base priority */
1125 int delta_pri; /* delta priority */
1126@END
1127
1128
1129/* Get the next module from a snapshot */
1130@REQ(next_module)
Alexandre Julliard51885742002-05-30 20:12:58 +00001131 obj_handle_t handle; /* handle to the snapshot */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001132 int reset; /* reset snapshot position? */
1133@REPLY
Alexandre Julliard54f22872002-10-03 19:54:57 +00001134 process_id_t pid; /* process id */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001135 void* base; /* module base address */
Alexandre Julliardaeb56602002-03-22 00:21:23 +00001136 size_t size; /* module size */
Alexandre Julliardc30cefb2003-09-30 01:04:19 +00001137 VARARG(filename,unicode_str); /* file name of module */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001138@END
1139
1140
1141/* Wait for a debug event */
1142@REQ(wait_debug_event)
1143 int get_handle; /* should we alloc a handle for waiting? */
1144@REPLY
Alexandre Julliard54f22872002-10-03 19:54:57 +00001145 process_id_t pid; /* process id */
1146 thread_id_t tid; /* thread id */
Alexandre Julliard51885742002-05-30 20:12:58 +00001147 obj_handle_t wait; /* wait handle if no event ready */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001148 VARARG(event,debug_event); /* debug event data */
1149@END
1150
1151
1152/* Queue an exception event */
1153@REQ(queue_exception_event)
1154 int first; /* first chance exception? */
1155 VARARG(record,exc_event); /* thread context followed by exception record */
1156@REPLY
Alexandre Julliard51885742002-05-30 20:12:58 +00001157 obj_handle_t handle; /* handle to the queued event */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001158@END
1159
1160
1161/* Retrieve the status of an exception event */
1162@REQ(get_exception_status)
Alexandre Julliard51885742002-05-30 20:12:58 +00001163 obj_handle_t handle; /* handle to the queued event */
Alexandre Julliard9caa71e2001-11-30 18:46:42 +00001164@REPLY
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001165 int status; /* event continuation status */
1166 VARARG(context,context); /* modified thread context */
1167@END
1168
1169
1170/* Send an output string to the debugger */
1171@REQ(output_debug_string)
1172 void* string; /* string to display (in debugged process address space) */
1173 int unicode; /* is it Unicode? */
1174 int length; /* string length */
1175@END
1176
1177
1178/* Continue a debug event */
1179@REQ(continue_debug_event)
Alexandre Julliard54f22872002-10-03 19:54:57 +00001180 process_id_t pid; /* process id to continue */
1181 thread_id_t tid; /* thread id to continue */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001182 int status; /* continuation status */
1183@END
1184
1185
Eric Pouechfbccb382002-02-27 01:28:30 +00001186/* Start/stop debugging an existing process */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001187@REQ(debug_process)
Alexandre Julliard54f22872002-10-03 19:54:57 +00001188 process_id_t pid; /* id of the process to debug */
Eric Pouechfbccb382002-02-27 01:28:30 +00001189 int attach; /* 1=attaching / 0=detaching from the process */
1190@END
1191
1192
Alexandre Julliard3c4538c2002-02-27 01:55:02 +00001193/* Simulate a breakpoint in a process */
1194@REQ(debug_break)
Alexandre Julliard51885742002-05-30 20:12:58 +00001195 obj_handle_t handle; /* process handle */
Alexandre Julliard3c4538c2002-02-27 01:55:02 +00001196@REPLY
1197 int self; /* was it the caller itself? */
1198@END
1199
1200
Eric Pouechfbccb382002-02-27 01:28:30 +00001201/* Set debugger kill on exit flag */
1202@REQ(set_debugger_kill_on_exit)
1203 int kill_on_exit; /* 0=detach/1=kill debuggee when debugger dies */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001204@END
1205
1206
1207/* Read data from a process address space */
1208@REQ(read_process_memory)
Alexandre Julliard51885742002-05-30 20:12:58 +00001209 obj_handle_t handle; /* process handle */
Alexandre Julliard9caa71e2001-11-30 18:46:42 +00001210 void* addr; /* addr to read from */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001211@REPLY
1212 VARARG(data,bytes); /* result data */
1213@END
1214
1215
1216/* Write data to a process address space */
1217@REQ(write_process_memory)
Alexandre Julliard51885742002-05-30 20:12:58 +00001218 obj_handle_t handle; /* process handle */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001219 void* addr; /* addr to write to (must be int-aligned) */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001220 unsigned int first_mask; /* mask for first word */
1221 unsigned int last_mask; /* mask for last word */
Alexandre Julliard9caa71e2001-11-30 18:46:42 +00001222 VARARG(data,bytes); /* data to write */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001223@END
1224
1225
1226/* Create a registry key */
1227@REQ(create_key)
Alexandre Julliard51885742002-05-30 20:12:58 +00001228 obj_handle_t parent; /* handle to the parent key */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001229 unsigned int access; /* desired access rights */
1230 unsigned int options; /* creation options */
1231 time_t modif; /* last modification time */
Alexandre Julliard9caa71e2001-11-30 18:46:42 +00001232 size_t namelen; /* length of key name in bytes */
1233 VARARG(name,unicode_str,namelen); /* key name */
1234 VARARG(class,unicode_str); /* class name */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001235@REPLY
Alexandre Julliard51885742002-05-30 20:12:58 +00001236 obj_handle_t hkey; /* handle to the created key */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001237 int created; /* has it been newly created? */
1238@END
1239
1240/* Open a registry key */
1241@REQ(open_key)
Alexandre Julliard51885742002-05-30 20:12:58 +00001242 obj_handle_t parent; /* handle to the parent key */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001243 unsigned int access; /* desired access rights */
1244 VARARG(name,unicode_str); /* key name */
1245@REPLY
Alexandre Julliard51885742002-05-30 20:12:58 +00001246 obj_handle_t hkey; /* handle to the open key */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001247@END
1248
1249
1250/* Delete a registry key */
1251@REQ(delete_key)
Alexandre Julliard51885742002-05-30 20:12:58 +00001252 obj_handle_t hkey; /* handle to the key */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001253@END
1254
1255
Mike Hearn43cb03b2004-01-03 00:38:30 +00001256/* Flush a registry key */
1257@REQ(flush_key)
1258 obj_handle_t hkey; /* handle to the key */
1259@END
1260
1261
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001262/* Enumerate registry subkeys */
1263@REQ(enum_key)
Alexandre Julliard51885742002-05-30 20:12:58 +00001264 obj_handle_t hkey; /* handle to registry key */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001265 int index; /* index of subkey (or -1 for current key) */
Alexandre Julliard9caa71e2001-11-30 18:46:42 +00001266 int info_class; /* requested information class */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001267@REPLY
1268 int subkeys; /* number of subkeys */
1269 int max_subkey; /* longest subkey name */
1270 int max_class; /* longest class name */
1271 int values; /* number of values */
1272 int max_value; /* longest value name */
1273 int max_data; /* longest value data */
1274 time_t modif; /* last modification time */
Alexandre Julliard9caa71e2001-11-30 18:46:42 +00001275 size_t total; /* total length needed for full name and class */
1276 size_t namelen; /* length of key name in bytes */
1277 VARARG(name,unicode_str,namelen); /* key name */
1278 VARARG(class,unicode_str); /* class name */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001279@END
1280
1281
1282/* Set a value of a registry key */
1283@REQ(set_key_value)
Alexandre Julliard51885742002-05-30 20:12:58 +00001284 obj_handle_t hkey; /* handle to registry key */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001285 int type; /* value type */
Alexandre Julliard9caa71e2001-11-30 18:46:42 +00001286 size_t namelen; /* length of value name in bytes */
1287 VARARG(name,unicode_str,namelen); /* value name */
1288 VARARG(data,bytes); /* value data */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001289@END
1290
1291
1292/* Retrieve the value of a registry key */
1293@REQ(get_key_value)
Alexandre Julliard51885742002-05-30 20:12:58 +00001294 obj_handle_t hkey; /* handle to registry key */
Alexandre Julliard9caa71e2001-11-30 18:46:42 +00001295 VARARG(name,unicode_str); /* value name */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001296@REPLY
1297 int type; /* value type */
Alexandre Julliard9caa71e2001-11-30 18:46:42 +00001298 size_t total; /* total length needed for data */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001299 VARARG(data,bytes); /* value data */
1300@END
1301
1302
1303/* Enumerate a value of a registry key */
1304@REQ(enum_key_value)
Alexandre Julliard51885742002-05-30 20:12:58 +00001305 obj_handle_t hkey; /* handle to registry key */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001306 int index; /* value index */
Alexandre Julliard9caa71e2001-11-30 18:46:42 +00001307 int info_class; /* requested information class */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001308@REPLY
1309 int type; /* value type */
Alexandre Julliard9caa71e2001-11-30 18:46:42 +00001310 size_t total; /* total length needed for full name and data */
1311 size_t namelen; /* length of value name in bytes */
1312 VARARG(name,unicode_str,namelen); /* value name */
1313 VARARG(data,bytes); /* value data */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001314@END
1315
1316
1317/* Delete a value of a registry key */
1318@REQ(delete_key_value)
Alexandre Julliard51885742002-05-30 20:12:58 +00001319 obj_handle_t hkey; /* handle to registry key */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001320 VARARG(name,unicode_str); /* value name */
1321@END
1322
1323
1324/* Load a registry branch from a file */
1325@REQ(load_registry)
Alexandre Julliard51885742002-05-30 20:12:58 +00001326 obj_handle_t hkey; /* root key to load to */
1327 obj_handle_t file; /* file to load from */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001328 VARARG(name,unicode_str); /* subkey name */
1329@END
1330
1331
Mike McCormack5ac945c2003-08-19 03:08:17 +00001332/* UnLoad a registry branch from a file */
1333@REQ(unload_registry)
1334 obj_handle_t hkey; /* root key to unload to */
1335@END
1336
1337
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001338/* Save a registry branch to a file */
1339@REQ(save_registry)
Alexandre Julliard51885742002-05-30 20:12:58 +00001340 obj_handle_t hkey; /* key to save */
1341 obj_handle_t file; /* file to save to */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001342@END
1343
1344
Alexandre Julliardc07ce052004-05-07 04:13:21 +00001345/* Add a registry key change notification */
Mike McCormack11f4b442002-11-25 02:47:32 +00001346@REQ(set_registry_notification)
1347 obj_handle_t hkey; /* key to watch for changes */
1348 obj_handle_t event; /* event to set */
1349 int subtree; /* should we watch the whole subtree? */
1350 unsigned int filter; /* things to watch */
1351@END
1352
1353
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001354/* Create a waitable timer */
1355@REQ(create_timer)
Eric Pouech44158dd2004-12-02 18:05:37 +00001356 unsigned int access; /* wanted access rights */
Vitaliy Margolena9960002005-10-27 18:30:37 +00001357 unsigned int attributes; /* object attributes */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001358 int manual; /* manual reset */
1359 VARARG(name,unicode_str); /* object name */
1360@REPLY
Alexandre Julliard51885742002-05-30 20:12:58 +00001361 obj_handle_t handle; /* handle to the timer */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001362@END
1363
1364
1365/* Open a waitable timer */
1366@REQ(open_timer)
1367 unsigned int access; /* wanted access rights */
Vitaliy Margolena9960002005-10-27 18:30:37 +00001368 unsigned int attributes; /* object attributes */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001369 VARARG(name,unicode_str); /* object name */
1370@REPLY
Alexandre Julliard51885742002-05-30 20:12:58 +00001371 obj_handle_t handle; /* handle to the timer */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001372@END
1373
1374/* Set a waitable timer */
1375@REQ(set_timer)
Alexandre Julliard51885742002-05-30 20:12:58 +00001376 obj_handle_t handle; /* handle to the timer */
Alexandre Julliard462172a2003-04-02 22:48:59 +00001377 abs_time_t expire; /* next expiration absolute time */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001378 int period; /* timer period in ms */
1379 void* callback; /* callback function */
1380 void* arg; /* callback argument */
Eric Pouech4c591d42003-05-20 04:00:42 +00001381@REPLY
1382 int signaled; /* was the timer signaled before this call ? */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001383@END
1384
1385/* Cancel a waitable timer */
1386@REQ(cancel_timer)
Alexandre Julliard51885742002-05-30 20:12:58 +00001387 obj_handle_t handle; /* handle to the timer */
Eric Pouech4c591d42003-05-20 04:00:42 +00001388@REPLY
1389 int signaled; /* was the timer signaled before this calltime ? */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001390@END
1391
Robert Shearman7572b122004-12-13 21:10:58 +00001392/* Get information on a waitable timer */
1393@REQ(get_timer_info)
1394 obj_handle_t handle; /* handle to the timer */
1395@REPLY
1396 abs_time_t when; /* absolute time when the timer next expires */
1397 int signaled; /* is the timer signaled? */
1398@END
1399
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001400
1401/* Retrieve the current context of a thread */
1402@REQ(get_thread_context)
Alexandre Julliard51885742002-05-30 20:12:58 +00001403 obj_handle_t handle; /* thread handle */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001404 unsigned int flags; /* context flags */
1405@REPLY
1406 VARARG(context,context); /* thread context */
1407@END
1408
1409
1410/* Set the current context of a thread */
1411@REQ(set_thread_context)
Alexandre Julliard51885742002-05-30 20:12:58 +00001412 obj_handle_t handle; /* thread handle */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001413 unsigned int flags; /* context flags */
1414 VARARG(context,context); /* thread context */
1415@END
1416
1417
1418/* Fetch a selector entry for a thread */
1419@REQ(get_selector_entry)
Alexandre Julliard51885742002-05-30 20:12:58 +00001420 obj_handle_t handle; /* thread handle */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001421 int entry; /* LDT entry */
1422@REPLY
1423 unsigned int base; /* selector base */
1424 unsigned int limit; /* selector limit */
1425 unsigned char flags; /* selector flags */
1426@END
1427
1428
1429/* Add an atom */
1430@REQ(add_atom)
Eric Poueche6267362005-05-10 15:15:50 +00001431 obj_handle_t table; /* which table to add atom to */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001432 VARARG(name,unicode_str); /* atom name */
1433@REPLY
Alexandre Julliardd8a8c112001-10-12 18:45:29 +00001434 atom_t atom; /* resulting atom */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001435@END
1436
1437
1438/* Delete an atom */
1439@REQ(delete_atom)
Eric Poueche6267362005-05-10 15:15:50 +00001440 obj_handle_t table; /* which table to delete atom from */
Alexandre Julliardd8a8c112001-10-12 18:45:29 +00001441 atom_t atom; /* atom handle */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001442@END
1443
1444
1445/* Find an atom */
1446@REQ(find_atom)
Eric Poueche6267362005-05-10 15:15:50 +00001447 obj_handle_t table; /* which table to find atom from */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001448 VARARG(name,unicode_str); /* atom name */
1449@REPLY
Alexandre Julliardd8a8c112001-10-12 18:45:29 +00001450 atom_t atom; /* atom handle */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001451@END
1452
1453
Eric Poueche6267362005-05-10 15:15:50 +00001454/* Get information about an atom */
1455@REQ(get_atom_information)
1456 obj_handle_t table; /* which table to find atom from */
Alexandre Julliardd8a8c112001-10-12 18:45:29 +00001457 atom_t atom; /* atom handle */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001458@REPLY
1459 int count; /* atom lock count */
Eric Poueche6267362005-05-10 15:15:50 +00001460 int pinned; /* whether the atom has been pinned */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001461 VARARG(name,unicode_str); /* atom name */
1462@END
1463
1464
Eric Poueche6267362005-05-10 15:15:50 +00001465/* Set information about an atom */
1466@REQ(set_atom_information)
1467 obj_handle_t table; /* which table to find atom from */
1468 atom_t atom; /* atom handle */
1469 int pinned; /* whether to bump atom information */
1470@END
1471
1472
1473/* Empty an atom table */
1474@REQ(empty_atom_table)
1475 obj_handle_t table; /* which table to find atom from */
1476 int if_pinned; /* whether to delete pinned atoms */
1477@END
1478
1479
1480/* Init an atom table */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001481@REQ(init_atom_table)
Eric Poueche6267362005-05-10 15:15:50 +00001482 int entries; /* number of entries (only for local) */
1483@REPLY
1484 obj_handle_t table; /* handle to the atom table */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001485@END
1486
1487
1488/* Get the message queue of the current thread */
1489@REQ(get_msg_queue)
1490@REPLY
Alexandre Julliard51885742002-05-30 20:12:58 +00001491 obj_handle_t handle; /* handle to the queue */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001492@END
1493
1494
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001495/* Set the current message queue wakeup mask */
1496@REQ(set_queue_mask)
1497 unsigned int wake_mask; /* wakeup bits mask */
1498 unsigned int changed_mask; /* changed bits mask */
1499 int skip_wait; /* will we skip waiting if signaled? */
1500@REPLY
1501 unsigned int wake_bits; /* current wake bits */
1502 unsigned int changed_bits; /* current changed bits */
1503@END
1504
1505
1506/* Get the current message queue status */
1507@REQ(get_queue_status)
1508 int clear; /* should we clear the change bits? */
1509@REPLY
1510 unsigned int wake_bits; /* wake bits */
1511 unsigned int changed_bits; /* changed bits since last time */
1512@END
1513
1514
1515/* Wait for a process to start waiting on input */
1516@REQ(wait_input_idle)
Alexandre Julliard51885742002-05-30 20:12:58 +00001517 obj_handle_t handle; /* process handle */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001518 int timeout; /* timeout */
1519@REPLY
Alexandre Julliard51885742002-05-30 20:12:58 +00001520 obj_handle_t event; /* handle to idle event */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001521@END
1522
1523
1524/* Send a message to a thread queue */
1525@REQ(send_message)
Alexandre Julliard54f22872002-10-03 19:54:57 +00001526 thread_id_t id; /* thread id */
Alexandre Julliardd253c582001-08-07 19:19:08 +00001527 int type; /* message type (see below) */
Alexandre Julliard09029b22003-07-11 04:09:42 +00001528 int flags; /* message flags (see below) */
Alexandre Julliard1a66d222001-08-28 18:44:52 +00001529 user_handle_t win; /* window handle */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001530 unsigned int msg; /* message code */
1531 unsigned int wparam; /* parameters */
1532 unsigned int lparam; /* parameters */
Alexandre Julliardd253c582001-08-07 19:19:08 +00001533 int x; /* x position */
1534 int y; /* y position */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001535 unsigned int time; /* message time */
1536 unsigned int info; /* extra info */
Alexandre Julliardd253c582001-08-07 19:19:08 +00001537 int timeout; /* timeout for reply */
Alexandre Julliard039e1312003-07-26 20:36:43 +00001538 void* callback; /* callback address */
Alexandre Julliardd253c582001-08-07 19:19:08 +00001539 VARARG(data,bytes); /* message data for sent messages */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001540@END
Alexandre Julliardd253c582001-08-07 19:19:08 +00001541
1542enum message_type
1543{
1544 MSG_ASCII, /* Ascii message (from SendMessageA) */
1545 MSG_UNICODE, /* Unicode message (from SendMessageW) */
1546 MSG_NOTIFY, /* notify message (from SendNotifyMessageW), always Unicode */
1547 MSG_CALLBACK, /* callback message (from SendMessageCallbackW), always Unicode */
Alexandre Julliard039e1312003-07-26 20:36:43 +00001548 MSG_CALLBACK_RESULT,/* result of a callback message */
Alexandre Julliardd253c582001-08-07 19:19:08 +00001549 MSG_OTHER_PROCESS, /* sent from other process, may include vararg data, always Unicode */
1550 MSG_POSTED, /* posted message (from PostMessageW), always Unicode */
Dmitry Timoshkov6dba0a72005-02-03 16:40:20 +00001551 MSG_HARDWARE, /* hardware message */
1552 MSG_WINEVENT /* winevent message */
Alexandre Julliardd253c582001-08-07 19:19:08 +00001553};
Alexandre Julliard09029b22003-07-11 04:09:42 +00001554#define SEND_MSG_ABORT_IF_HUNG 0x01
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001555
1556
1557/* Get a message from the current queue */
1558@REQ(get_message)
1559 int flags; /* see below */
Alexandre Julliard1a66d222001-08-28 18:44:52 +00001560 user_handle_t get_win; /* window handle to get */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001561 unsigned int get_first; /* first message code to get */
1562 unsigned int get_last; /* last message code to get */
Alexandre Julliard3e2f2a52005-04-20 13:03:59 +00001563 unsigned int hw_id; /* id of the previous hardware message (or 0) */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001564@REPLY
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001565 int type; /* message type */
Alexandre Julliard1a66d222001-08-28 18:44:52 +00001566 user_handle_t win; /* window handle */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001567 unsigned int msg; /* message code */
Alexandre Julliard039e1312003-07-26 20:36:43 +00001568 unsigned int wparam; /* parameters (callback function for MSG_CALLBACK_RESULT) */
1569 unsigned int lparam; /* parameters (result for MSG_CALLBACK_RESULT) */
Alexandre Julliardd253c582001-08-07 19:19:08 +00001570 int x; /* x position */
1571 int y; /* y position */
Dmitry Timoshkov6dba0a72005-02-03 16:40:20 +00001572 user_handle_t hook; /* winevent hook handle */
1573 void* hook_proc; /* winevent hook proc address */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001574 unsigned int time; /* message time */
Alexandre Julliard039e1312003-07-26 20:36:43 +00001575 unsigned int info; /* extra info (callback argument for MSG_CALLBACK_RESULT) */
Alexandre Julliard3e2f2a52005-04-20 13:03:59 +00001576 unsigned int hw_id; /* id if hardware message */
Alexandre Julliard63342352005-05-11 13:03:15 +00001577 unsigned int active_hooks; /* active hooks bitmap */
Alexandre Julliard9caa71e2001-11-30 18:46:42 +00001578 size_t total; /* total size of extra data */
Alexandre Julliardd253c582001-08-07 19:19:08 +00001579 VARARG(data,bytes); /* message data for sent messages */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001580@END
1581#define GET_MSG_REMOVE 1 /* remove the message */
1582#define GET_MSG_SENT_ONLY 2 /* only get sent messages */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001583
1584/* Reply to a sent message */
1585@REQ(reply_message)
1586 unsigned int result; /* message result */
1587 int remove; /* should we remove the message? */
Alexandre Julliardd253c582001-08-07 19:19:08 +00001588 VARARG(data,bytes); /* message data for sent messages */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001589@END
1590
1591
Alexandre Julliard0bc83772005-03-23 10:33:17 +00001592/* Accept the current hardware message */
1593@REQ(accept_hardware_message)
Alexandre Julliard3e2f2a52005-04-20 13:03:59 +00001594 unsigned int hw_id; /* id of the hardware message */
Alexandre Julliard0bc83772005-03-23 10:33:17 +00001595 int remove; /* should we remove the message? */
1596 user_handle_t new_win; /* new destination window for current message */
1597@END
1598
1599
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001600/* Retrieve the reply for the last message sent */
1601@REQ(get_message_reply)
1602 int cancel; /* cancel message if not ready? */
1603@REPLY
1604 unsigned int result; /* message result */
Alexandre Julliardd253c582001-08-07 19:19:08 +00001605 VARARG(data,bytes); /* message data for sent messages */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001606@END
1607
1608
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001609/* Set a window timer */
1610@REQ(set_win_timer)
Alexandre Julliard1a66d222001-08-28 18:44:52 +00001611 user_handle_t win; /* window handle */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001612 unsigned int msg; /* message to post */
1613 unsigned int id; /* timer id */
1614 unsigned int rate; /* timer rate in ms */
1615 unsigned int lparam; /* message lparam (callback proc) */
Alexandre Julliardff986a52004-11-29 18:08:18 +00001616@REPLY
1617 unsigned int id; /* timer id */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001618@END
1619
1620
1621/* Kill a window timer */
1622@REQ(kill_win_timer)
Alexandre Julliard1a66d222001-08-28 18:44:52 +00001623 user_handle_t win; /* window handle */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001624 unsigned int msg; /* message to post */
1625 unsigned int id; /* timer id */
1626@END
1627
1628
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001629/* Retrieve info about a serial port */
1630@REQ(get_serial_info)
Alexandre Julliard51885742002-05-30 20:12:58 +00001631 obj_handle_t handle; /* handle to comm port */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001632@REPLY
1633 unsigned int readinterval;
1634 unsigned int readconst;
1635 unsigned int readmult;
1636 unsigned int writeconst;
1637 unsigned int writemult;
1638 unsigned int eventmask;
1639 unsigned int commerror;
1640@END
1641
1642
1643/* Set info about a serial port */
1644@REQ(set_serial_info)
Alexandre Julliard51885742002-05-30 20:12:58 +00001645 obj_handle_t handle; /* handle to comm port */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001646 int flags; /* bitmask to set values (see below) */
1647 unsigned int readinterval;
1648 unsigned int readconst;
1649 unsigned int readmult;
1650 unsigned int writeconst;
1651 unsigned int writemult;
1652 unsigned int eventmask;
1653 unsigned int commerror;
1654@END
1655#define SERIALINFO_SET_TIMEOUTS 0x01
1656#define SERIALINFO_SET_MASK 0x02
1657#define SERIALINFO_SET_ERROR 0x04
1658
1659
Eric Pouech46344472005-01-14 19:54:38 +00001660/* Create an async I/O */
Mike McCormack6f011c02001-12-20 00:07:05 +00001661@REQ(register_async)
Eric Pouech46344472005-01-14 19:54:38 +00001662 obj_handle_t handle; /* handle to comm port, socket or file */
1663 int type; /* type of queue to look after */
1664 void* io_apc; /* APC routine to queue upon end of async */
1665 void* io_sb; /* I/O status block (unique across all async on this handle) */
1666 void* io_user; /* data to pass back to caller */
1667 int count; /* count - usually # of bytes to be read/written */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001668@END
1669#define ASYNC_TYPE_READ 0x01
1670#define ASYNC_TYPE_WRITE 0x02
1671#define ASYNC_TYPE_WAIT 0x03
1672
1673
Eric Pouech46344472005-01-14 19:54:38 +00001674/* Cancel all async op on a fd */
1675@REQ(cancel_async)
1676 obj_handle_t handle; /* handle to comm port, socket or file */
1677@END
1678
1679
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001680/* Create a named pipe */
1681@REQ(create_named_pipe)
Eric Poueche21aa6a2005-09-26 11:02:45 +00001682 unsigned int access;
Vitaliy Margolena9960002005-10-27 18:30:37 +00001683 unsigned int attributes; /* object attributes */
Eric Pouech5a2591d2005-04-18 14:57:04 +00001684 unsigned int options;
1685 unsigned int flags;
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001686 unsigned int maxinstances;
1687 unsigned int outsize;
1688 unsigned int insize;
1689 unsigned int timeout;
Alexandre Julliard8ae57612001-12-31 22:26:51 +00001690 VARARG(name,unicode_str); /* pipe name */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001691@REPLY
Alexandre Julliard51885742002-05-30 20:12:58 +00001692 obj_handle_t handle; /* handle to the pipe */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001693@END
1694
Eric Pouech5a2591d2005-04-18 14:57:04 +00001695/* flags in create_named_pipe and get_named_pipe_info */
1696#define NAMED_PIPE_MESSAGE_STREAM_WRITE 0x0001
1697#define NAMED_PIPE_MESSAGE_STREAM_READ 0x0002
1698#define NAMED_PIPE_NONBLOCKING_MODE 0x0004
1699
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001700
1701/* Open an existing named pipe */
1702@REQ(open_named_pipe)
1703 unsigned int access;
Vitaliy Margolena9960002005-10-27 18:30:37 +00001704 unsigned int attributes; /* object attributes */
Robert Shearmane51dd362005-06-08 19:11:46 +00001705 unsigned int flags; /* file flags */
Alexandre Julliard8ae57612001-12-31 22:26:51 +00001706 VARARG(name,unicode_str); /* pipe name */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001707@REPLY
Alexandre Julliard51885742002-05-30 20:12:58 +00001708 obj_handle_t handle; /* handle to the pipe */
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001709@END
1710
1711
1712/* Connect to a named pipe */
1713@REQ(connect_named_pipe)
Alexandre Julliard51885742002-05-30 20:12:58 +00001714 obj_handle_t handle;
Ivan Leo Puotif0db7ab2005-09-06 14:09:42 +00001715 obj_handle_t event;
Mike McCormack309ed4e2001-11-07 20:14:45 +00001716 void* func;
Alexandre Julliard37ec9272001-07-19 00:35:37 +00001717@END
Mike McCormackbf554572001-08-23 23:29:20 +00001718
1719
1720/* Wait for a named pipe */
1721@REQ(wait_named_pipe)
1722 unsigned int timeout;
Mike McCormack309ed4e2001-11-07 20:14:45 +00001723 void* overlapped;
1724 void* func;
Alexandre Julliard8ae57612001-12-31 22:26:51 +00001725 VARARG(name,unicode_str); /* pipe name */
Mike McCormackbf554572001-08-23 23:29:20 +00001726@END
1727
1728
1729/* Disconnect a named pipe */
1730@REQ(disconnect_named_pipe)
Alexandre Julliard51885742002-05-30 20:12:58 +00001731 obj_handle_t handle;
Mike McCormackef8b9462003-05-15 04:22:45 +00001732@REPLY
1733 int fd; /* associated fd to close */
Mike McCormackbf554572001-08-23 23:29:20 +00001734@END
Mike McCormackf2e7ce72001-08-27 19:03:42 +00001735
Alexandre Julliard1a66d222001-08-28 18:44:52 +00001736
Mike McCormackf2e7ce72001-08-27 19:03:42 +00001737@REQ(get_named_pipe_info)
Alexandre Julliard51885742002-05-30 20:12:58 +00001738 obj_handle_t handle;
Mike McCormackf2e7ce72001-08-27 19:03:42 +00001739@REPLY
1740 unsigned int flags;
1741 unsigned int maxinstances;
1742 unsigned int outsize;
1743 unsigned int insize;
1744@END
1745
Alexandre Julliard1a66d222001-08-28 18:44:52 +00001746
Alexandre Julliard1a66d222001-08-28 18:44:52 +00001747/* Create a window */
1748@REQ(create_window)
Alexandre Julliarda09da0c2001-09-21 21:08:40 +00001749 user_handle_t parent; /* parent window */
1750 user_handle_t owner; /* owner window */
Alexandre Julliardd8a8c112001-10-12 18:45:29 +00001751 atom_t atom; /* class atom */
Alexandre Julliardbfce1512003-12-10 04:08:06 +00001752 void* instance; /* module instance */
Alexandre Julliard1a66d222001-08-28 18:44:52 +00001753@REPLY
Alexandre Julliarda09da0c2001-09-21 21:08:40 +00001754 user_handle_t handle; /* created window */
Alexandre Julliardbd13ab82003-12-11 05:34:53 +00001755 int extra; /* number of extra bytes */
1756 void* class_ptr; /* pointer to class in client address space */
Alexandre Julliard1a66d222001-08-28 18:44:52 +00001757@END
1758
1759
Alexandre Julliard1a66d222001-08-28 18:44:52 +00001760/* Destroy a window */
1761@REQ(destroy_window)
1762 user_handle_t handle; /* handle to the window */
1763@END
1764
1765
Alexandre Julliard8c518802005-07-08 11:37:40 +00001766/* Retrieve the desktop window for the current thread */
1767@REQ(get_desktop_window)
1768@REPLY
1769 user_handle_t handle; /* handle to the desktop window */
1770@END
1771
1772
Alexandre Julliardddc33172001-10-22 19:08:33 +00001773/* Set a window owner */
1774@REQ(set_window_owner)
1775 user_handle_t handle; /* handle to the window */
1776 user_handle_t owner; /* new owner */
1777@REPLY
1778 user_handle_t full_owner; /* full handle of new owner */
Alexandre Julliard7dafa612002-09-25 00:21:56 +00001779 user_handle_t prev_owner; /* full handle of previous owner */
Alexandre Julliardddc33172001-10-22 19:08:33 +00001780@END
1781
1782
Alexandre Julliard1a66d222001-08-28 18:44:52 +00001783/* Get information from a window handle */
1784@REQ(get_window_info)
1785 user_handle_t handle; /* handle to the window */
1786@REPLY
1787 user_handle_t full_handle; /* full 32-bit handle */
Alexandre Julliard5030bda2002-10-11 23:41:06 +00001788 user_handle_t last_active; /* last active popup */
Alexandre Julliard54f22872002-10-03 19:54:57 +00001789 process_id_t pid; /* process owning the window */
1790 thread_id_t tid; /* thread owning the window */
Alexandre Julliardddc33172001-10-22 19:08:33 +00001791 atom_t atom; /* class atom */
Dmitry Timoshkov86af38c2005-07-07 12:02:31 +00001792 int is_unicode; /* ANSI or unicode */
Alexandre Julliard1a66d222001-08-28 18:44:52 +00001793@END
Alexandre Julliarda09da0c2001-09-21 21:08:40 +00001794
1795
Alexandre Julliardddc33172001-10-22 19:08:33 +00001796/* Set some information in a window */
1797@REQ(set_window_info)
1798 user_handle_t handle; /* handle to the window */
1799 unsigned int flags; /* flags for fields to set (see below) */
1800 unsigned int style; /* window style */
1801 unsigned int ex_style; /* window extended style */
1802 unsigned int id; /* window id */
1803 void* instance; /* creator instance */
Dmitry Timoshkov86af38c2005-07-07 12:02:31 +00001804 int is_unicode; /* ANSI or unicode */
Alexandre Julliardddc33172001-10-22 19:08:33 +00001805 void* user_data; /* user-specific data */
Alexandre Julliard97903d22003-11-26 22:15:41 +00001806 int extra_offset; /* offset to set in extra bytes */
Alexandre Julliardebf12432003-12-10 01:34:51 +00001807 size_t extra_size; /* size to set in extra bytes */
Alexandre Julliard97903d22003-11-26 22:15:41 +00001808 unsigned int extra_value; /* value to set in extra bytes */
Alexandre Julliardddc33172001-10-22 19:08:33 +00001809@REPLY
1810 unsigned int old_style; /* old window style */
1811 unsigned int old_ex_style; /* old window extended style */
1812 unsigned int old_id; /* old window id */
1813 void* old_instance; /* old creator instance */
1814 void* old_user_data; /* old user-specific data */
Alexandre Julliard97903d22003-11-26 22:15:41 +00001815 unsigned int old_extra_value; /* old value in extra bytes */
Alexandre Julliardddc33172001-10-22 19:08:33 +00001816@END
1817#define SET_WIN_STYLE 0x01
1818#define SET_WIN_EXSTYLE 0x02
1819#define SET_WIN_ID 0x04
1820#define SET_WIN_INSTANCE 0x08
1821#define SET_WIN_USERDATA 0x10
Alexandre Julliardebf12432003-12-10 01:34:51 +00001822#define SET_WIN_EXTRA 0x20
Dmitry Timoshkov86af38c2005-07-07 12:02:31 +00001823#define SET_WIN_UNICODE 0x40
Alexandre Julliardddc33172001-10-22 19:08:33 +00001824
1825
Alexandre Julliard4d32a472005-03-25 10:38:56 +00001826/* Set the parent of a window */
1827@REQ(set_parent)
1828 user_handle_t handle; /* handle to the window */
1829 user_handle_t parent; /* handle to the parent */
1830@REPLY
1831 user_handle_t old_parent; /* old parent window */
1832 user_handle_t full_parent; /* full handle of new parent */
1833@END
1834
1835
Alexandre Julliarda09da0c2001-09-21 21:08:40 +00001836/* Get a list of the window parents, up to the root of the tree */
1837@REQ(get_window_parents)
1838 user_handle_t handle; /* handle to the window */
1839@REPLY
1840 int count; /* total count of parents */
1841 VARARG(parents,user_handles); /* parent handles */
1842@END
1843
1844
1845/* Get a list of the window children */
1846@REQ(get_window_children)
1847 user_handle_t parent; /* parent window */
Alexandre Julliardd8a8c112001-10-12 18:45:29 +00001848 atom_t atom; /* class atom for the listed children */
Alexandre Julliard54f22872002-10-03 19:54:57 +00001849 thread_id_t tid; /* thread owning the listed children */
Alexandre Julliarda09da0c2001-09-21 21:08:40 +00001850@REPLY
1851 int count; /* total count of children */
Alexandre Julliard7695d692001-09-24 01:19:59 +00001852 VARARG(children,user_handles); /* children handles */
Alexandre Julliarda09da0c2001-09-21 21:08:40 +00001853@END
1854
1855
Alexandre Julliard4616dcb2004-07-20 22:17:38 +00001856/* Get a list of the window children that contain a given point */
1857@REQ(get_window_children_from_point)
1858 user_handle_t parent; /* parent window */
1859 int x; /* point in parent coordinates */
1860 int y;
1861@REPLY
1862 int count; /* total count of children */
1863 VARARG(children,user_handles); /* children handles */
1864@END
1865
1866
Alexandre Julliarda09da0c2001-09-21 21:08:40 +00001867/* Get window tree information from a window handle */
1868@REQ(get_window_tree)
1869 user_handle_t handle; /* handle to the window */
1870@REPLY
1871 user_handle_t parent; /* parent window */
1872 user_handle_t owner; /* owner window */
1873 user_handle_t next_sibling; /* next sibling in Z-order */
1874 user_handle_t prev_sibling; /* prev sibling in Z-order */
1875 user_handle_t first_sibling; /* first sibling in Z-order */
1876 user_handle_t last_sibling; /* last sibling in Z-order */
1877 user_handle_t first_child; /* first child */
1878 user_handle_t last_child; /* last child */
1879@END
Alexandre Julliard7a2017d2001-10-12 19:10:26 +00001880
Alexandre Julliard5defa492004-12-07 17:31:53 +00001881/* Set the position and Z order of a window */
1882@REQ(set_window_pos)
Alexandre Julliard0d509652001-10-16 21:55:37 +00001883 user_handle_t handle; /* handle to the window */
Alexandre Julliard5defa492004-12-07 17:31:53 +00001884 user_handle_t previous; /* previous window in Z order */
1885 unsigned int flags; /* SWP_* flags */
Alexandre Julliard0d509652001-10-16 21:55:37 +00001886 rectangle_t window; /* window rectangle */
1887 rectangle_t client; /* client rectangle */
Alexandre Julliardae661da2005-02-03 13:40:12 +00001888 VARARG(valid,rectangles); /* valid rectangles from WM_NCCALCSIZE */
Alexandre Julliard5defa492004-12-07 17:31:53 +00001889@REPLY
1890 unsigned int new_style; /* new window style */
Alexandre Julliard0d509652001-10-16 21:55:37 +00001891@END
1892
1893
1894/* Get the window and client rectangles of a window */
1895@REQ(get_window_rectangles)
1896 user_handle_t handle; /* handle to the window */
1897@REPLY
1898 rectangle_t window; /* window rectangle */
Alexandre Julliardf7560902005-03-17 19:10:41 +00001899 rectangle_t visible; /* visible part of the window rectangle */
Alexandre Julliard0d509652001-10-16 21:55:37 +00001900 rectangle_t client; /* client rectangle */
1901@END
1902
1903
Alexandre Julliard805bdc52001-11-13 22:23:48 +00001904/* Get the window text */
1905@REQ(get_window_text)
1906 user_handle_t handle; /* handle to the window */
1907@REPLY
1908 VARARG(text,unicode_str); /* window text */
1909@END
1910
1911
1912/* Set the window text */
1913@REQ(set_window_text)
1914 user_handle_t handle; /* handle to the window */
1915 VARARG(text,unicode_str); /* window text */
1916@END
1917
1918
Alexandre Julliard0d509652001-10-16 21:55:37 +00001919/* Get the coordinates offset between two windows */
1920@REQ(get_windows_offset)
1921 user_handle_t from; /* handle to the first window */
1922 user_handle_t to; /* handle to the second window */
1923@REPLY
1924 int x; /* x coordinate offset */
1925 int y; /* y coordinate offset */
1926@END
1927
Alexandre Julliard7a2017d2001-10-12 19:10:26 +00001928
Alexandre Julliarde8d86b72004-06-23 20:44:58 +00001929/* Get the visible region of a window */
1930@REQ(get_visible_region)
1931 user_handle_t window; /* handle to the window */
Alexandre Julliarde8d86b72004-06-23 20:44:58 +00001932 unsigned int flags; /* DCX flags */
1933@REPLY
Alexandre Julliardbc75f2f2005-03-31 15:36:57 +00001934 user_handle_t top_win; /* top window to clip against */
1935 int top_org_x; /* top window visible rect origin in screen coords */
1936 int top_org_y;
1937 int win_org_x; /* window rect origin in screen coords */
1938 int win_org_y;
Alexandre Julliarde8d86b72004-06-23 20:44:58 +00001939 size_t total_size; /* total size of the resulting region */
Alexandre Julliardbc75f2f2005-03-31 15:36:57 +00001940 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
Alexandre Julliarde8d86b72004-06-23 20:44:58 +00001941@END
1942
1943
Alexandre Julliard618a7e52004-06-29 03:53:25 +00001944/* Get the window region */
1945@REQ(get_window_region)
1946 user_handle_t window; /* handle to the window */
1947@REPLY
1948 size_t total_size; /* total size of the resulting region */
1949 VARARG(region,rectangles); /* list of rectangles for the region */
1950@END
1951
1952
1953/* Set the window region */
1954@REQ(set_window_region)
1955 user_handle_t window; /* handle to the window */
1956 VARARG(region,rectangles); /* list of rectangles for the region */
1957@END
1958
1959
Alexandre Julliard5defa492004-12-07 17:31:53 +00001960/* Get the window update region */
1961@REQ(get_update_region)
1962 user_handle_t window; /* handle to the window */
Alexandre Julliarddb412aa2005-05-31 13:37:16 +00001963 user_handle_t from_child; /* child to start searching from */
Alexandre Julliard5defa492004-12-07 17:31:53 +00001964 unsigned int flags; /* update flags (see below) */
1965@REPLY
1966 user_handle_t child; /* child to repaint (or window itself) */
1967 unsigned int flags; /* resulting update flags (see below) */
1968 size_t total_size; /* total size of the resulting region */
1969 VARARG(region,rectangles); /* list of rectangles for the region */
1970@END
1971#define UPDATE_NONCLIENT 0x01 /* get region for repainting non-client area */
1972#define UPDATE_ERASE 0x02 /* get region for erasing client area */
1973#define UPDATE_PAINT 0x04 /* get region for painting client area */
1974#define UPDATE_INTERNALPAINT 0x08 /* get region if internal paint is pending */
1975#define UPDATE_ALLCHILDREN 0x10 /* force repaint of all children */
1976#define UPDATE_NOCHILDREN 0x20 /* don't try to repaint any children */
1977#define UPDATE_NOREGION 0x40 /* don't return a region, only the flags */
1978
1979
Alexandre Julliard5054c792005-03-21 12:37:00 +00001980/* Update the z order of a window so that a given rectangle is fully visible */
1981@REQ(update_window_zorder)
1982 user_handle_t window; /* handle to the window */
1983 rectangle_t rect; /* rectangle that must be visible */
1984@END
1985
1986
Alexandre Julliard5defa492004-12-07 17:31:53 +00001987/* Mark parts of a window as needing a redraw */
1988@REQ(redraw_window)
1989 user_handle_t window; /* handle to the window */
1990 unsigned int flags; /* RDW_* flags */
1991 VARARG(region,rectangles); /* list of rectangles for the region */
1992@END
1993
1994
Alexandre Julliard7a2017d2001-10-12 19:10:26 +00001995/* Set a window property */
1996@REQ(set_window_property)
1997 user_handle_t window; /* handle to the window */
Alexandre Julliard9e73cdd2005-05-11 19:01:10 +00001998 atom_t atom; /* property atom (if no name specified) */
Alexandre Julliard51885742002-05-30 20:12:58 +00001999 obj_handle_t handle; /* handle to store */
Alexandre Julliard9e73cdd2005-05-11 19:01:10 +00002000 VARARG(name,unicode_str); /* property name */
Alexandre Julliard7a2017d2001-10-12 19:10:26 +00002001@END
2002
2003
2004/* Remove a window property */
2005@REQ(remove_window_property)
2006 user_handle_t window; /* handle to the window */
Alexandre Julliard9e73cdd2005-05-11 19:01:10 +00002007 atom_t atom; /* property atom (if no name specified) */
2008 VARARG(name,unicode_str); /* property name */
Alexandre Julliard7a2017d2001-10-12 19:10:26 +00002009@REPLY
Alexandre Julliard51885742002-05-30 20:12:58 +00002010 obj_handle_t handle; /* handle stored in property */
Alexandre Julliard7a2017d2001-10-12 19:10:26 +00002011@END
2012
2013
2014/* Get a window property */
2015@REQ(get_window_property)
2016 user_handle_t window; /* handle to the window */
Alexandre Julliard9e73cdd2005-05-11 19:01:10 +00002017 atom_t atom; /* property atom (if no name specified) */
2018 VARARG(name,unicode_str); /* property name */
Alexandre Julliard7a2017d2001-10-12 19:10:26 +00002019@REPLY
Alexandre Julliard51885742002-05-30 20:12:58 +00002020 obj_handle_t handle; /* handle stored in property */
Alexandre Julliard7a2017d2001-10-12 19:10:26 +00002021@END
2022
2023
2024/* Get the list of properties of a window */
2025@REQ(get_window_properties)
2026 user_handle_t window; /* handle to the window */
2027@REPLY
Alexandre Julliard9caa71e2001-11-30 18:46:42 +00002028 int total; /* total number of properties */
Alexandre Julliard7a2017d2001-10-12 19:10:26 +00002029 VARARG(props,properties); /* list of properties */
2030@END
Alexandre Julliardab5063b2002-10-11 18:50:15 +00002031
2032
Alexandre Julliard1bf96e02005-06-08 18:44:50 +00002033/* Create a window station */
2034@REQ(create_winstation)
2035 unsigned int flags; /* window station flags */
2036 unsigned int access; /* wanted access rights */
2037 int inherit; /* inherit flag */
2038 VARARG(name,unicode_str); /* object name */
2039@REPLY
2040 obj_handle_t handle; /* handle to the window station */
2041@END
2042
2043
2044/* Open a handle to a window station */
2045@REQ(open_winstation)
2046 unsigned int access; /* wanted access rights */
2047 int inherit; /* inherit flag */
2048 VARARG(name,unicode_str); /* object name */
2049@REPLY
2050 obj_handle_t handle; /* handle to the window station */
2051@END
2052
2053
2054/* Close a window station */
2055@REQ(close_winstation)
2056 obj_handle_t handle; /* handle to the window station */
2057@END
2058
2059
2060/* Get the process current window station */
2061@REQ(get_process_winstation)
2062@REPLY
2063 obj_handle_t handle; /* handle to the window station */
2064@END
2065
2066
2067/* Set the process current window station */
2068@REQ(set_process_winstation)
2069 obj_handle_t handle; /* handle to the window station */
2070@END
2071
2072
2073/* Create a desktop */
2074@REQ(create_desktop)
2075 unsigned int flags; /* desktop flags */
2076 unsigned int access; /* wanted access rights */
2077 int inherit; /* inherit flag */
2078 VARARG(name,unicode_str); /* object name */
2079@REPLY
2080 obj_handle_t handle; /* handle to the desktop */
2081@END
2082
2083
2084/* Open a handle to a desktop */
2085@REQ(open_desktop)
2086 unsigned int flags; /* desktop flags */
2087 unsigned int access; /* wanted access rights */
2088 int inherit; /* inherit flag */
2089 VARARG(name,unicode_str); /* object name */
2090@REPLY
2091 obj_handle_t handle; /* handle to the desktop */
2092@END
2093
2094
2095/* Close a desktop */
2096@REQ(close_desktop)
2097 obj_handle_t handle; /* handle to the desktop */
2098@END
2099
2100
2101/* Get the thread current desktop */
2102@REQ(get_thread_desktop)
2103 thread_id_t tid; /* thread id */
2104@REPLY
2105 obj_handle_t handle; /* handle to the desktop */
2106@END
2107
2108
2109/* Set the thread current desktop */
2110@REQ(set_thread_desktop)
2111 obj_handle_t handle; /* handle to the desktop */
2112@END
2113
2114
2115/* Get/set information about a user object (window station or desktop) */
2116@REQ(set_user_object_info)
2117 obj_handle_t handle; /* handle to the object */
2118 unsigned int flags; /* information to set */
2119 unsigned int obj_flags; /* new object flags */
2120@REPLY
2121 int is_desktop; /* is object a desktop? */
2122 unsigned int old_obj_flags; /* old object flags */
2123 VARARG(name,unicode_str); /* object name */
2124@END
2125#define SET_USER_OBJECT_FLAGS 1
2126
2127
Alexandre Julliardab5063b2002-10-11 18:50:15 +00002128/* Attach (or detach) thread inputs */
2129@REQ(attach_thread_input)
2130 thread_id_t tid_from; /* thread to be attached */
2131 thread_id_t tid_to; /* thread to which tid_from should be attached */
2132 int attach; /* is it an attach? */
2133@END
2134
2135
2136/* Get input data for a given thread */
2137@REQ(get_thread_input)
2138 thread_id_t tid; /* id of thread */
2139@REPLY
2140 user_handle_t focus; /* handle to the focus window */
2141 user_handle_t capture; /* handle to the capture window */
2142 user_handle_t active; /* handle to the active window */
2143 user_handle_t foreground; /* handle to the global foreground window */
2144 user_handle_t menu_owner; /* handle to the menu owner */
2145 user_handle_t move_size; /* handle to the moving/resizing window */
2146 user_handle_t caret; /* handle to the caret window */
2147 rectangle_t rect; /* caret rectangle */
2148@END
Alexandre Julliard5030bda2002-10-11 23:41:06 +00002149
Mike McCormackabe70f72005-04-28 12:04:14 +00002150
2151/* Get the time of the last input event */
2152@REQ(get_last_input_time)
2153@REPLY
2154 unsigned int time;
2155@END
2156
2157
Alexandre Julliard8ba666f2003-01-08 19:56:31 +00002158/* Retrieve queue keyboard state for a given thread */
2159@REQ(get_key_state)
2160 thread_id_t tid; /* id of thread */
2161 int key; /* optional key code or -1 */
2162@REPLY
2163 unsigned char state; /* state of specified key */
2164 VARARG(keystate,bytes); /* state array for all the keys */
2165@END
2166
2167/* Set queue keyboard state for a given thread */
2168@REQ(set_key_state)
2169 thread_id_t tid; /* id of thread */
2170 VARARG(keystate,bytes); /* state array for all the keys */
2171@END
2172
Alexandre Julliard5030bda2002-10-11 23:41:06 +00002173/* Set the system foreground window */
2174@REQ(set_foreground_window)
2175 user_handle_t handle; /* handle to the foreground window */
2176@REPLY
2177 user_handle_t previous; /* handle to the previous foreground window */
2178 int send_msg_old; /* whether we have to send a msg to the old window */
2179 int send_msg_new; /* whether we have to send a msg to the new window */
2180@END
2181
2182/* Set the current thread focus window */
2183@REQ(set_focus_window)
2184 user_handle_t handle; /* handle to the focus window */
2185@REPLY
2186 user_handle_t previous; /* handle to the previous focus window */
2187@END
2188
2189/* Set the current thread active window */
2190@REQ(set_active_window)
2191 user_handle_t handle; /* handle to the active window */
2192@REPLY
2193 user_handle_t previous; /* handle to the previous active window */
2194@END
Alexandre Julliarda9e8f592002-10-12 01:24:37 +00002195
2196/* Set the current thread capture window */
2197@REQ(set_capture_window)
2198 user_handle_t handle; /* handle to the capture window */
2199 unsigned int flags; /* capture flags (see below) */
2200@REPLY
2201 user_handle_t previous; /* handle to the previous capture window */
2202 user_handle_t full_handle; /* full 32-bit handle of new capture window */
2203@END
2204#define CAPTURE_MENU 0x01 /* capture is for a menu */
2205#define CAPTURE_MOVESIZE 0x02 /* capture is for moving/resizing */
Alexandre Julliard11e35232002-10-17 01:24:33 +00002206
2207
2208/* Set the current thread caret window */
2209@REQ(set_caret_window)
2210 user_handle_t handle; /* handle to the caret window */
2211 int width; /* caret width */
2212 int height; /* caret height */
2213@REPLY
2214 user_handle_t previous; /* handle to the previous caret window */
2215 rectangle_t old_rect; /* previous caret rectangle */
2216 int old_hide; /* previous hide count */
2217 int old_state; /* previous caret state (1=on, 0=off) */
2218@END
2219
2220
2221/* Set the current thread caret information */
2222@REQ(set_caret_info)
2223 unsigned int flags; /* caret flags (see below) */
2224 user_handle_t handle; /* handle to the caret window */
2225 int x; /* caret x position */
2226 int y; /* caret y position */
2227 int hide; /* increment for hide count (can be negative to show it) */
2228 int state; /* caret state (1=on, 0=off, -1=toggle current state) */
2229@REPLY
2230 user_handle_t full_handle; /* handle to the current caret window */
2231 rectangle_t old_rect; /* previous caret rectangle */
2232 int old_hide; /* previous hide count */
2233 int old_state; /* previous caret state (1=on, 0=off) */
2234@END
2235#define SET_CARET_POS 0x01 /* set the caret position from x,y */
2236#define SET_CARET_HIDE 0x02 /* increment the caret hide count */
2237#define SET_CARET_STATE 0x04 /* set the caret on/off state */
Alexandre Julliard02861352002-10-29 00:41:42 +00002238
2239
2240/* Set a window hook */
2241@REQ(set_hook)
2242 int id; /* id of the hook */
Dmitry Timoshkov6dba0a72005-02-03 16:40:20 +00002243 process_id_t pid; /* id of process to set the hook into */
Alexandre Julliard02861352002-10-29 00:41:42 +00002244 thread_id_t tid; /* id of thread to set the hook into */
Dmitry Timoshkov6dba0a72005-02-03 16:40:20 +00002245 int event_min;
2246 int event_max;
2247 int flags;
Alexandre Julliard02861352002-10-29 00:41:42 +00002248 void* proc; /* hook procedure */
2249 int unicode; /* is it a unicode hook? */
Alexandre Julliard14e68ba2002-11-20 19:54:32 +00002250 VARARG(module,unicode_str); /* module name */
Alexandre Julliard02861352002-10-29 00:41:42 +00002251@REPLY
2252 user_handle_t handle; /* handle to the hook */
Alexandre Julliard63342352005-05-11 13:03:15 +00002253 unsigned int active_hooks; /* active hooks bitmap */
Alexandre Julliard02861352002-10-29 00:41:42 +00002254@END
2255
2256
2257/* Remove a window hook */
2258@REQ(remove_hook)
2259 user_handle_t handle; /* handle to the hook */
2260 int id; /* id of the hook if handle is 0 */
2261 void* proc; /* hook procedure if handle is 0 */
Alexandre Julliard63342352005-05-11 13:03:15 +00002262@REPLY
2263 unsigned int active_hooks; /* active hooks bitmap */
Alexandre Julliard02861352002-10-29 00:41:42 +00002264@END
2265
2266
2267/* Start calling a hook chain */
2268@REQ(start_hook_chain)
2269 int id; /* id of the hook */
Dmitry Timoshkov6dba0a72005-02-03 16:40:20 +00002270 int event; /* signalled event */
2271 user_handle_t window; /* handle to the event window */
2272 int object_id; /* object id for out of context winevent */
2273 int child_id; /* child id for out of context winevent */
Alexandre Julliard02861352002-10-29 00:41:42 +00002274@REPLY
2275 user_handle_t handle; /* handle to the next hook */
Alexandre Julliardca3ac8f2003-07-11 21:55:58 +00002276 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2277 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
Alexandre Julliard02861352002-10-29 00:41:42 +00002278 void* proc; /* hook procedure */
2279 int unicode; /* is it a unicode hook? */
Alexandre Julliard63342352005-05-11 13:03:15 +00002280 unsigned int active_hooks; /* active hooks bitmap */
Alexandre Julliard14e68ba2002-11-20 19:54:32 +00002281 VARARG(module,unicode_str); /* module name */
Alexandre Julliard02861352002-10-29 00:41:42 +00002282@END
2283
2284
2285/* Finished calling a hook chain */
2286@REQ(finish_hook_chain)
2287 int id; /* id of the hook */
2288@END
2289
2290
2291/* Get the next hook to call */
2292@REQ(get_next_hook)
2293 user_handle_t handle; /* handle to the current hook */
Dmitry Timoshkov6dba0a72005-02-03 16:40:20 +00002294 int event; /* signalled event */
2295 user_handle_t window; /* handle to the event window */
2296 int object_id; /* object id for out of context winevent */
2297 int child_id; /* child id for out of context winevent */
Alexandre Julliard02861352002-10-29 00:41:42 +00002298@REPLY
2299 user_handle_t next; /* handle to the next hook */
2300 int id; /* id of the next hook */
Alexandre Julliardca3ac8f2003-07-11 21:55:58 +00002301 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2302 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
Alexandre Julliard02861352002-10-29 00:41:42 +00002303 void* proc; /* next hook procedure */
2304 int prev_unicode; /* was the previous a unicode hook? */
2305 int next_unicode; /* is the next a unicode hook? */
Alexandre Julliard14e68ba2002-11-20 19:54:32 +00002306 VARARG(module,unicode_str); /* module name */
Alexandre Julliard02861352002-10-29 00:41:42 +00002307@END
Ulrich Czekallab2df5f92003-06-23 23:02:02 +00002308
2309
Alexandre Julliardbfce1512003-12-10 04:08:06 +00002310/* Create a window class */
2311@REQ(create_class)
2312 int local; /* is it a local class? */
2313 atom_t atom; /* class atom */
2314 unsigned int style; /* class style */
2315 void* instance; /* module instance */
2316 int extra; /* number of extra class bytes */
2317 int win_extra; /* number of window extra bytes */
Alexandre Julliardbd13ab82003-12-11 05:34:53 +00002318 void* client_ptr; /* pointer to class in client address space */
Alexandre Julliardbfce1512003-12-10 04:08:06 +00002319@END
2320
2321
2322/* Destroy a window class */
2323@REQ(destroy_class)
2324 atom_t atom; /* class atom */
2325 void* instance; /* module instance */
Alexandre Julliardbd13ab82003-12-11 05:34:53 +00002326@REPLY
2327 void* client_ptr; /* pointer to class in client address space */
Alexandre Julliardbfce1512003-12-10 04:08:06 +00002328@END
2329
2330
2331/* Set some information in a class */
2332@REQ(set_class_info)
2333 user_handle_t window; /* handle to the window */
2334 unsigned int flags; /* flags for info to set (see below) */
2335 atom_t atom; /* class atom */
2336 unsigned int style; /* class style */
2337 int win_extra; /* number of window extra bytes */
2338 void* instance; /* module instance */
2339 int extra_offset; /* offset to set in extra bytes */
2340 size_t extra_size; /* size to set in extra bytes */
2341 unsigned int extra_value; /* value to set in extra bytes */
2342@REPLY
2343 atom_t old_atom; /* previous class atom */
2344 unsigned int old_style; /* previous class style */
2345 int old_extra; /* previous number of class extra bytes */
2346 int old_win_extra; /* previous number of window extra bytes */
2347 void* old_instance; /* previous module instance */
2348 unsigned int old_extra_value; /* old value in extra bytes */
2349@END
2350#define SET_CLASS_ATOM 0x0001
2351#define SET_CLASS_STYLE 0x0002
2352#define SET_CLASS_WINEXTRA 0x0004
2353#define SET_CLASS_INSTANCE 0x0008
2354#define SET_CLASS_EXTRA 0x0010
2355
2356
Ulrich Czekallab2df5f92003-06-23 23:02:02 +00002357/* Set/get clipboard information */
2358@REQ(set_clipboard_info)
2359 unsigned int flags; /* flags for fields to set (see below) */
2360 user_handle_t clipboard; /* clipboard window */
2361 user_handle_t owner; /* clipboard owner */
2362 user_handle_t viewer; /* first clipboard viewer */
2363 unsigned int seqno; /* change sequence number */
2364@REPLY
2365 unsigned int flags; /* status flags (see below) */
2366 user_handle_t old_clipboard; /* old clipboard window */
2367 user_handle_t old_owner; /* old clipboard owner */
2368 user_handle_t old_viewer; /* old clipboard viewer */
2369 unsigned int seqno; /* current sequence number */
2370@END
2371
2372#define SET_CB_OPEN 0x001
2373#define SET_CB_OWNER 0x002
2374#define SET_CB_VIEWER 0x004
2375#define SET_CB_SEQNO 0x008
2376#define SET_CB_RELOWNER 0x010
2377#define SET_CB_CLOSE 0x020
2378#define CB_OPEN 0x040
2379#define CB_OWNER 0x080
Ulrich Czekalla50679092005-03-07 19:31:46 +00002380#define CB_PROCESS 0x100
Mike McCormack36cd6f52003-07-24 00:07:00 +00002381
2382
2383/* Open a security token */
2384@REQ(open_token)
2385 obj_handle_t handle; /* handle to the thread or process */
2386 unsigned int flags; /* flags (see below) */
2387@REPLY
2388 obj_handle_t token; /* handle to the token */
2389@END
2390#define OPEN_TOKEN_THREAD 1
2391#define OPEN_TOKEN_AS_SELF 2
Alexandre Julliard8d174d32003-10-07 03:40:23 +00002392
2393
2394/* Set/get the global windows */
2395@REQ(set_global_windows)
2396 unsigned int flags; /* flags for fields to set (see below) */
2397 user_handle_t shell_window; /* handle to the new shell window */
2398 user_handle_t shell_listview; /* handle to the new shell listview window */
2399 user_handle_t progman_window; /* handle to the new program manager window */
2400 user_handle_t taskman_window; /* handle to the new task manager window */
2401@REPLY
2402 user_handle_t old_shell_window; /* handle to the shell window */
2403 user_handle_t old_shell_listview; /* handle to the shell listview window */
2404 user_handle_t old_progman_window; /* handle to the new program manager window */
2405 user_handle_t old_taskman_window; /* handle to the new task manager window */
2406@END
2407#define SET_GLOBAL_SHELL_WINDOWS 0x01 /* set both main shell and listview windows */
2408#define SET_GLOBAL_PROGMAN_WINDOW 0x02
2409#define SET_GLOBAL_TASKMAN_WINDOW 0x04
Robert Shearmanb0f02b22005-02-11 11:52:06 +00002410
2411/* Adjust the privileges held by a token */
2412@REQ(adjust_token_privileges)
2413 obj_handle_t handle; /* handle to the token */
2414 int disable_all; /* disable all privileges? */
2415 int get_modified_state; /* get modified privileges? */
2416 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to enable/disable/remove */
2417@REPLY
2418 unsigned int len; /* total length in bytes required to store token privileges */
2419 VARARG(privileges,LUID_AND_ATTRIBUTES); /* modified privileges */
2420@END
2421
2422/* Retrieves the set of privileges held by or available to a token */
2423@REQ(get_token_privileges)
2424 obj_handle_t handle; /* handle to the token */
2425@REPLY
2426 unsigned int len; /* total length in bytes required to store token privileges */
2427 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
2428@END
2429
Robert Shearmand2ea92d2005-04-22 21:17:15 +00002430/* Check the token has the required privileges */
2431@REQ(check_token_privileges)
2432 obj_handle_t handle; /* handle to the token */
2433 int all_required; /* are all the privileges required for the check to succeed? */
2434 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to check */
2435@REPLY
2436 int has_privileges; /* does the token have the required privileges? */
2437 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
2438@END
2439
Robert Shearmanb0f02b22005-02-11 11:52:06 +00002440@REQ(duplicate_token)
2441 obj_handle_t handle; /* handle to the token to duplicate */
2442 unsigned int access; /* access rights to the new token */
2443 int inherit; /* inherit flag */
2444 int primary; /* is the new token to be a primary one? */
2445 int impersonation_level; /* impersonation level of the new token */
2446@REPLY
2447 obj_handle_t new_handle; /* duplicated handle */
2448@END
Mike McCormack2ab6a772005-03-30 19:02:15 +00002449
Robert Shearman4ad93412005-05-24 12:32:18 +00002450@REQ(access_check)
2451 obj_handle_t handle; /* handle to the token */
2452 unsigned int desired_access; /* desired access to the object */
2453 unsigned int mapping_read; /* mapping from generic read to specific rights */
2454 unsigned int mapping_write; /* mapping from generic write to specific rights */
2455 unsigned int mapping_execute; /* mapping from generic execute to specific rights */
2456 unsigned int mapping_all; /* mapping from generic all to specific rights */
2457 VARARG(sd,security_descriptor); /* security descriptor to check */
2458@REPLY
2459 unsigned int access_granted; /* access rights actually granted */
2460 unsigned int access_status; /* was access granted? */
2461 unsigned int privileges_len; /* length needed to store privileges */
2462 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges used during access check */
2463@END
Mike McCormack2ab6a772005-03-30 19:02:15 +00002464
Robert Shearman91eaea52005-07-18 13:22:55 +00002465@REQ(get_token_user)
2466 obj_handle_t handle; /* handle to the token */
2467@REPLY
2468 size_t user_len; /* length needed to store user */
2469 VARARG(user,SID); /* sid of the user the token represents */
2470@END
2471
Mike McCormack2ab6a772005-03-30 19:02:15 +00002472/* Create a mailslot */
2473@REQ(create_mailslot)
Vitaliy Margolena9960002005-10-27 18:30:37 +00002474 unsigned int access; /* wanted access rights */
2475 unsigned int attributes; /* object attributes */
Mike McCormack2ab6a772005-03-30 19:02:15 +00002476 unsigned int max_msgsize;
2477 unsigned int read_timeout;
Mike McCormack2ab6a772005-03-30 19:02:15 +00002478 VARARG(name,unicode_str); /* mailslot name */
2479@REPLY
2480 obj_handle_t handle; /* handle to the mailslot */
2481@END
2482
2483
2484/* Open an existing mailslot */
2485@REQ(open_mailslot)
2486 unsigned int access;
Vitaliy Margolena9960002005-10-27 18:30:37 +00002487 unsigned int attributes; /* object attributes */
Mike McCormack2ab6a772005-03-30 19:02:15 +00002488 unsigned int sharing; /* sharing mode */
2489 VARARG(name,unicode_str); /* mailslot name */
2490@REPLY
2491 obj_handle_t handle; /* handle to the mailslot */
2492@END
2493
2494
2495/* Set mailslot information */
2496@REQ(set_mailslot_info)
2497 obj_handle_t handle; /* handle to the mailslot */
2498 unsigned int flags;
2499 unsigned int read_timeout;
2500@REPLY
2501 unsigned int max_msgsize;
2502 unsigned int read_timeout;
2503 unsigned int msg_count;
2504 unsigned int next_msgsize;
2505@END
2506#define MAILSLOT_SET_READ_TIMEOUT 1