server: Also enforce the size of varargs data structures.
[wine.git] / server / protocol.def
blob90227fad66a850a487755a9096484519fc02dae1
1 /* -*- C -*-
3 * Wine server protocol definition
5 * Copyright (C) 2001 Alexandre Julliard
7 * This file is used by tools/make_requests to build the
8 * protocol structures in include/wine/server_protocol.h
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.
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.
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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
25 @HEADER /* start of C declarations */
27 #include <stdarg.h>
28 #include <stdlib.h>
29 #include <time.h>
31 #include <windef.h>
32 #include <winbase.h>
34 typedef unsigned int obj_handle_t;
35 typedef unsigned int user_handle_t;
36 typedef unsigned int atom_t;
37 typedef unsigned int process_id_t;
38 typedef unsigned int thread_id_t;
39 typedef unsigned int data_size_t;
40 typedef unsigned int ioctl_code_t;
41 typedef unsigned __int64 lparam_t;
42 typedef unsigned __int64 apc_param_t;
43 typedef unsigned __int64 mem_size_t;
44 typedef unsigned __int64 file_pos_t;
45 typedef unsigned __int64 client_ptr_t;
46 typedef unsigned __int64 affinity_t;
47 typedef client_ptr_t mod_handle_t;
49 struct request_header
51 int req; /* request code */
52 data_size_t request_size; /* request variable part size */
53 data_size_t reply_size; /* reply variable part maximum size */
56 struct reply_header
58 unsigned int error; /* error result */
59 data_size_t reply_size; /* reply variable part size */
62 /* placeholder structure for the maximum allowed request size */
63 /* this is used to construct the generic_request union */
64 struct request_max_size
66 int pad[16]; /* the max request size is 16 ints */
69 #define FIRST_USER_HANDLE 0x0020 /* first possible value for low word of user handle */
70 #define LAST_USER_HANDLE 0xffef /* last possible value for low word of user handle */
73 /* debug event data */
74 typedef union
76 int code; /* event code */
77 struct
79 int code; /* DbgExceptionStateChange */
80 int first; /* first chance exception? */
81 unsigned int exc_code; /* exception code */
82 unsigned int flags; /* exception flags */
83 client_ptr_t record; /* exception record */
84 client_ptr_t address; /* exception address */
85 int nb_params; /* number of parameters */
86 int __pad;
87 client_ptr_t params[15]; /* parameters */
88 } exception;
89 struct
91 int code; /* DbgCreateThreadStateChange */
92 obj_handle_t handle; /* handle to the new thread */
93 client_ptr_t start; /* thread startup routine */
94 } create_thread;
95 struct
97 int code; /* DbgCreateProcessStateChange */
98 obj_handle_t file; /* handle to the process exe file */
99 obj_handle_t process; /* handle to the new process */
100 obj_handle_t thread; /* handle to the new thread */
101 mod_handle_t base; /* base of executable image */
102 int dbg_offset; /* offset of debug info in file */
103 int dbg_size; /* size of debug info */
104 client_ptr_t start; /* thread startup routine */
105 } create_process;
106 struct
108 int code; /* DbgExitThreadStateChange/DbgExitProcessStateChange */
109 int exit_code; /* thread or process exit code */
110 } exit;
111 struct
113 int code; /* DbgLoadDllStateChange */
114 obj_handle_t handle; /* file handle for the dll */
115 mod_handle_t base; /* base address of the dll */
116 int dbg_offset; /* offset of debug info in file */
117 int dbg_size; /* size of debug info */
118 client_ptr_t name; /* image name (optional) */
119 } load_dll;
120 struct
122 int code; /* DbgUnloadDllStateChange */
123 int __pad;
124 mod_handle_t base; /* base address of the dll */
125 } unload_dll;
126 } debug_event_t;
128 /* context data */
129 typedef struct
131 unsigned int machine; /* machine type */
132 unsigned int flags; /* SERVER_CTX_* flags */
133 union
135 struct { unsigned int eip, ebp, esp, eflags, cs, ss; } i386_regs;
136 struct { unsigned __int64 rip, rbp, rsp;
137 unsigned int cs, ss, flags, __pad; } x86_64_regs;
138 struct { unsigned int sp, lr, pc, cpsr; } arm_regs;
139 struct { unsigned __int64 sp, pc, pstate; } arm64_regs;
140 } ctl; /* selected by SERVER_CTX_CONTROL */
141 union
143 struct { unsigned int eax, ebx, ecx, edx, esi, edi; } i386_regs;
144 struct { unsigned __int64 rax,rbx, rcx, rdx, rsi, rdi,
145 r8, r9, r10, r11, r12, r13, r14, r15; } x86_64_regs;
146 struct { unsigned int r[13]; } arm_regs;
147 struct { unsigned __int64 x[31]; } arm64_regs;
148 } integer; /* selected by SERVER_CTX_INTEGER */
149 union
151 struct { unsigned int ds, es, fs, gs; } i386_regs;
152 struct { unsigned int ds, es, fs, gs; } x86_64_regs;
153 } seg; /* selected by SERVER_CTX_SEGMENTS */
154 union
156 struct { unsigned int ctrl, status, tag, err_off, err_sel, data_off, data_sel, cr0npx;
157 unsigned char regs[80]; } i386_regs;
158 struct { struct { unsigned __int64 low, high; } fpregs[32]; } x86_64_regs;
159 struct { unsigned __int64 d[32]; unsigned int fpscr; } arm_regs;
160 struct { struct { unsigned __int64 low, high; } q[32]; unsigned int fpcr, fpsr; } arm64_regs;
161 } fp; /* selected by SERVER_CTX_FLOATING_POINT */
162 union
164 struct { unsigned int dr0, dr1, dr2, dr3, dr6, dr7; } i386_regs;
165 struct { unsigned __int64 dr0, dr1, dr2, dr3, dr6, dr7; } x86_64_regs;
166 struct { unsigned int bvr[8], bcr[8], wvr[1], wcr[1]; } arm_regs;
167 struct { unsigned __int64 bvr[8], wvr[2]; unsigned int bcr[8], wcr[2]; } arm64_regs;
168 } debug; /* selected by SERVER_CTX_DEBUG_REGISTERS */
169 union
171 unsigned char i386_regs[512];
172 } ext; /* selected by SERVER_CTX_EXTENDED_REGISTERS */
173 union
175 struct { struct { unsigned __int64 low, high; } ymm_high[16]; } regs;
176 } ymm; /* selected by SERVER_CTX_YMM_REGISTERS */
177 } context_t;
179 #define SERVER_CTX_CONTROL 0x01
180 #define SERVER_CTX_INTEGER 0x02
181 #define SERVER_CTX_SEGMENTS 0x04
182 #define SERVER_CTX_FLOATING_POINT 0x08
183 #define SERVER_CTX_DEBUG_REGISTERS 0x10
184 #define SERVER_CTX_EXTENDED_REGISTERS 0x20
185 #define SERVER_CTX_YMM_REGISTERS 0x40
187 /* structure used in sending an fd from client to server */
188 struct send_fd
190 thread_id_t tid; /* thread id */
191 int fd; /* file descriptor on client-side */
194 /* structure sent by the server on the wait fifo */
195 struct wake_up_reply
197 client_ptr_t cookie; /* magic cookie that was passed in select_request */
198 int signaled; /* wait result */
199 int __pad;
202 /* NT-style timeout, in 100ns units, negative means relative timeout */
203 typedef __int64 timeout_t;
204 #define TIMEOUT_INFINITE (((timeout_t)0x7fffffff) << 32 | 0xffffffff)
206 /* absolute timeout, negative means that monotonic clock is used */
207 typedef __int64 abstime_t;
209 /* structure for process startup info */
210 typedef struct
212 unsigned int debug_flags;
213 unsigned int console_flags;
214 obj_handle_t console;
215 obj_handle_t hstdin;
216 obj_handle_t hstdout;
217 obj_handle_t hstderr;
218 unsigned int x;
219 unsigned int y;
220 unsigned int xsize;
221 unsigned int ysize;
222 unsigned int xchars;
223 unsigned int ychars;
224 unsigned int attribute;
225 unsigned int flags;
226 unsigned int show;
227 data_size_t curdir_len;
228 data_size_t dllpath_len;
229 data_size_t imagepath_len;
230 data_size_t cmdline_len;
231 data_size_t title_len;
232 data_size_t desktop_len;
233 data_size_t shellinfo_len;
234 data_size_t runtime_len;
235 /* VARARG(curdir,unicode_str,curdir_len); */
236 /* VARARG(dllpath,unicode_str,dllpath_len); */
237 /* VARARG(imagepath,unicode_str,imagepath_len); */
238 /* VARARG(cmdline,unicode_str,cmdline_len); */
239 /* VARARG(title,unicode_str,title_len); */
240 /* VARARG(desktop,unicode_str,desktop_len); */
241 /* VARARG(shellinfo,unicode_str,shellinfo_len); */
242 /* VARARG(runtime,unicode_str,runtime_len); */
243 } startup_info_t;
245 /* structure returned in the list of window properties */
246 typedef struct
248 atom_t atom; /* property atom */
249 int string; /* was atom a string originally? */
250 lparam_t data; /* data stored in property */
251 } property_data_t;
253 /* structure to specify window rectangles */
254 typedef struct
256 int left;
257 int top;
258 int right;
259 int bottom;
260 } rectangle_t;
262 /* structure for parameters of async I/O calls */
263 typedef struct
265 obj_handle_t handle; /* object to perform I/O on */
266 obj_handle_t event; /* event to signal when done */
267 client_ptr_t iosb; /* I/O status block in client addr space */
268 client_ptr_t user; /* opaque user data containing callback pointer and async-specific data */
269 client_ptr_t apc; /* user APC to call */
270 apc_param_t apc_context; /* user APC context or completion value */
271 } async_data_t;
273 /* structures for extra message data */
275 struct hw_msg_source
277 unsigned int device; /* source device (IMDT_* values) */
278 unsigned int origin; /* source origin (IMO_* values) */
281 union rawinput
283 int type;
284 struct
286 int type; /* RIM_TYPEKEYBOARD */
287 unsigned int message; /* message generated by this rawinput event */
288 unsigned short vkey; /* virtual key code */
289 unsigned short scan; /* scan code */
290 } kbd;
291 struct
293 int type; /* RIM_TYPEMOUSE */
294 int x; /* x coordinate */
295 int y; /* y coordinate */
296 unsigned int data; /* mouse data */
297 } mouse;
298 struct
300 int type; /* RIM_TYPEHID */
301 unsigned int device; /* rawinput device index */
302 unsigned int param; /* rawinput message param */
303 unsigned short usage_page;/* HID usage page */
304 unsigned short usage; /* HID usage */
305 unsigned int count; /* HID report count */
306 unsigned int length; /* HID report length */
307 } hid;
310 struct hardware_msg_data
312 lparam_t info; /* extra info */
313 data_size_t size; /* size of hardware message data */
314 int __pad;
315 unsigned int hw_id; /* unique id */
316 unsigned int flags; /* hook flags */
317 struct hw_msg_source source; /* message source */
318 union rawinput rawinput; /* rawinput message data */
321 struct callback_msg_data
323 client_ptr_t callback; /* callback function */
324 lparam_t data; /* user data for callback */
325 lparam_t result; /* message result */
328 struct winevent_msg_data
330 user_handle_t hook; /* hook handle */
331 thread_id_t tid; /* thread id */
332 client_ptr_t hook_proc; /* hook proc address */
333 /* followed by module name if any */
336 typedef union
338 int type;
339 struct
341 int type; /* INPUT_KEYBOARD */
342 unsigned short vkey; /* virtual key code */
343 unsigned short scan; /* scan code */
344 unsigned int flags; /* event flags */
345 unsigned int time; /* event time */
346 lparam_t info; /* extra info */
347 } kbd;
348 struct
350 int type; /* INPUT_MOUSE */
351 int x; /* coordinates */
352 int y;
353 unsigned int data; /* mouse data */
354 unsigned int flags; /* event flags */
355 unsigned int time; /* event time */
356 lparam_t info; /* extra info */
357 } mouse;
358 struct
360 int type; /* INPUT_HARDWARE */
361 unsigned int msg; /* message code */
362 lparam_t lparam; /* message param */
363 union rawinput rawinput;/* rawinput message data */
364 } hw;
365 } hw_input_t;
367 typedef union
369 unsigned char bytes[1]; /* raw data for sent messages */
370 struct hardware_msg_data hardware;
371 struct callback_msg_data callback;
372 struct winevent_msg_data winevent;
373 } message_data_t;
375 /* structure returned in filesystem events */
376 struct filesystem_event
378 int action;
379 data_size_t len;
380 char name[1];
383 struct luid
385 unsigned int low_part;
386 int high_part;
389 struct luid_attr
391 struct luid luid;
392 unsigned int attrs;
395 struct acl
397 unsigned char revision;
398 unsigned char pad1;
399 unsigned short size;
400 unsigned short count;
401 unsigned short pad2;
404 struct sid
406 unsigned char revision;
407 unsigned char sub_count;
408 unsigned char id_auth[6];
409 unsigned int sub_auth[15];
412 typedef struct
414 unsigned int read;
415 unsigned int write;
416 unsigned int exec;
417 unsigned int all;
418 } generic_map_t;
420 #define MAX_ACL_LEN 65535
422 struct security_descriptor
424 unsigned int control; /* SE_ flags */
425 data_size_t owner_len;
426 data_size_t group_len;
427 data_size_t sacl_len;
428 data_size_t dacl_len;
429 /* VARARG(owner,sid); */
430 /* VARARG(group,sid); */
431 /* VARARG(sacl,acl); */
432 /* VARARG(dacl,acl); */
435 struct object_attributes
437 obj_handle_t rootdir; /* root directory */
438 unsigned int attributes; /* object attributes */
439 data_size_t sd_len; /* length of security_descriptor data. may be 0 */
440 data_size_t name_len; /* length of the name string. may be 0 */
441 /* VARARG(sd,security_descriptor); */
442 /* VARARG(name,unicode_str); */
445 struct object_type_info
447 data_size_t name_len; /* length of the name string */
448 unsigned int index; /* type index in global table */
449 unsigned int obj_count; /* count of objects of this type */
450 unsigned int handle_count; /* count of handles of this type */
451 unsigned int obj_max; /* max count of objects of this type */
452 unsigned int handle_max; /* max count of handles of this type */
453 unsigned int valid_access; /* mask for valid access bits */
454 generic_map_t mapping; /* generic access mappings */
455 /* VARARG(name,unicode_str); */
458 enum select_op
460 SELECT_NONE,
461 SELECT_WAIT,
462 SELECT_WAIT_ALL,
463 SELECT_SIGNAL_AND_WAIT,
464 SELECT_KEYED_EVENT_WAIT,
465 SELECT_KEYED_EVENT_RELEASE
468 typedef union
470 enum select_op op;
471 struct
473 enum select_op op; /* SELECT_WAIT or SELECT_WAIT_ALL */
474 obj_handle_t handles[MAXIMUM_WAIT_OBJECTS];
475 int __pad;
476 } wait;
477 struct
479 enum select_op op; /* SELECT_SIGNAL_AND_WAIT */
480 obj_handle_t wait;
481 obj_handle_t signal; /* must be last in the structure so we can remove it on retries */
482 } signal_and_wait;
483 struct
485 enum select_op op; /* SELECT_KEYED_EVENT_WAIT or SELECT_KEYED_EVENT_RELEASE */
486 obj_handle_t handle;
487 client_ptr_t key;
488 } keyed_event;
489 } select_op_t;
491 enum apc_type
493 APC_NONE,
494 APC_USER,
495 APC_ASYNC_IO,
496 APC_VIRTUAL_ALLOC,
497 APC_VIRTUAL_ALLOC_EX,
498 APC_VIRTUAL_FREE,
499 APC_VIRTUAL_QUERY,
500 APC_VIRTUAL_PROTECT,
501 APC_VIRTUAL_FLUSH,
502 APC_VIRTUAL_LOCK,
503 APC_VIRTUAL_UNLOCK,
504 APC_MAP_VIEW,
505 APC_MAP_VIEW_EX,
506 APC_UNMAP_VIEW,
507 APC_CREATE_THREAD,
508 APC_DUP_HANDLE
511 typedef struct
513 enum apc_type type; /* APC_USER */
514 int __pad;
515 client_ptr_t func; /* void (__stdcall *func)(ULONG_PTR,ULONG_PTR,ULONG_PTR); */
516 apc_param_t args[3]; /* arguments for user function */
517 } user_apc_t;
519 typedef union
521 enum apc_type type;
522 user_apc_t user;
523 struct
525 enum apc_type type; /* APC_ASYNC_IO */
526 unsigned int status; /* I/O status */
527 client_ptr_t user; /* user pointer */
528 client_ptr_t sb; /* status block */
529 data_size_t result; /* result size */
530 } async_io;
531 struct
533 enum apc_type type; /* APC_VIRTUAL_ALLOC */
534 unsigned int op_type; /* type of operation */
535 client_ptr_t addr; /* requested address */
536 mem_size_t size; /* allocation size */
537 mem_size_t zero_bits; /* number of zero high bits */
538 unsigned int prot; /* memory protection flags */
539 } virtual_alloc;
540 struct
542 enum apc_type type; /* APC_VIRTUAL_ALLOC */
543 unsigned int op_type; /* type of operation */
544 client_ptr_t addr; /* requested address */
545 mem_size_t size; /* allocation size */
546 mem_size_t limit; /* allocation address limit */
547 mem_size_t align; /* allocation alignment */
548 unsigned int prot; /* memory protection flags */
549 unsigned int attributes; /* memory extended attributes */
550 } virtual_alloc_ex;
551 struct
553 enum apc_type type; /* APC_VIRTUAL_FREE */
554 unsigned int op_type; /* type of operation */
555 client_ptr_t addr; /* requested address */
556 mem_size_t size; /* allocation size */
557 } virtual_free;
558 struct
560 enum apc_type type; /* APC_VIRTUAL_QUERY */
561 int __pad;
562 client_ptr_t addr; /* requested address */
563 } virtual_query;
564 struct
566 enum apc_type type; /* APC_VIRTUAL_PROTECT */
567 unsigned int prot; /* new protection flags */
568 client_ptr_t addr; /* requested address */
569 mem_size_t size; /* requested size */
570 } virtual_protect;
571 struct
573 enum apc_type type; /* APC_VIRTUAL_FLUSH */
574 int __pad;
575 client_ptr_t addr; /* requested address */
576 mem_size_t size; /* requested size */
577 } virtual_flush;
578 struct
580 enum apc_type type; /* APC_VIRTUAL_LOCK */
581 int __pad;
582 client_ptr_t addr; /* requested address */
583 mem_size_t size; /* requested size */
584 } virtual_lock;
585 struct
587 enum apc_type type; /* APC_VIRTUAL_UNLOCK */
588 int __pad;
589 client_ptr_t addr; /* requested address */
590 mem_size_t size; /* requested size */
591 } virtual_unlock;
592 struct
594 enum apc_type type; /* APC_MAP_VIEW */
595 obj_handle_t handle; /* mapping handle */
596 client_ptr_t addr; /* requested address */
597 mem_size_t size; /* allocation size */
598 file_pos_t offset; /* file offset */
599 mem_size_t zero_bits; /* number of zero high bits */
600 unsigned int alloc_type; /* allocation type */
601 unsigned int prot; /* memory protection flags */
602 } map_view;
603 struct
605 enum apc_type type; /* APC_MAP_VIEW_EX */
606 obj_handle_t handle; /* mapping handle */
607 client_ptr_t addr; /* requested address */
608 mem_size_t size; /* allocation size */
609 file_pos_t offset; /* file offset */
610 mem_size_t limit; /* allocation address limit */
611 unsigned int alloc_type; /* allocation type */
612 unsigned short prot; /* memory protection flags */
613 unsigned short machine; /* requested machine for image mappings */
614 } map_view_ex;
615 struct
617 enum apc_type type; /* APC_UNMAP_VIEW */
618 unsigned int flags; /* unmap flags */
619 client_ptr_t addr; /* view address */
620 } unmap_view;
621 struct
623 enum apc_type type; /* APC_CREATE_THREAD */
624 unsigned int flags; /* creation flags */
625 client_ptr_t func; /* void (__stdcall *func)(void*); start function */
626 client_ptr_t arg; /* argument for start function */
627 mem_size_t zero_bits; /* number of zero high bits for thread stack */
628 mem_size_t reserve; /* reserve size for thread stack */
629 mem_size_t commit; /* commit size for thread stack */
630 } create_thread;
631 struct
633 enum apc_type type; /* APC_DUP_HANDLE */
634 obj_handle_t src_handle; /* src handle to duplicate */
635 obj_handle_t dst_process; /* dst process handle */
636 unsigned int access; /* wanted access rights */
637 unsigned int attributes; /* object attributes */
638 unsigned int options; /* duplicate options */
639 } dup_handle;
640 } apc_call_t;
642 typedef union
644 enum apc_type type;
645 struct
647 enum apc_type type; /* APC_ASYNC_IO */
648 unsigned int status; /* new status of async operation */
649 unsigned int total; /* bytes transferred */
650 } async_io;
651 struct
653 enum apc_type type; /* APC_VIRTUAL_ALLOC */
654 unsigned int status; /* status returned by call */
655 client_ptr_t addr; /* resulting address */
656 mem_size_t size; /* resulting size */
657 } virtual_alloc;
658 struct
660 enum apc_type type; /* APC_VIRTUAL_ALLOC_EX */
661 unsigned int status; /* status returned by call */
662 client_ptr_t addr; /* resulting address */
663 mem_size_t size; /* resulting size */
664 } virtual_alloc_ex;
665 struct
667 enum apc_type type; /* APC_VIRTUAL_FREE */
668 unsigned int status; /* status returned by call */
669 client_ptr_t addr; /* resulting address */
670 mem_size_t size; /* resulting size */
671 } virtual_free;
672 struct
674 enum apc_type type; /* APC_VIRTUAL_QUERY */
675 unsigned int status; /* status returned by call */
676 client_ptr_t base; /* resulting base address */
677 client_ptr_t alloc_base;/* resulting allocation base */
678 mem_size_t size; /* resulting region size */
679 unsigned short state; /* resulting region state */
680 unsigned short prot; /* resulting region protection */
681 unsigned short alloc_prot;/* resulting allocation protection */
682 unsigned short alloc_type;/* resulting region allocation type */
683 } virtual_query;
684 struct
686 enum apc_type type; /* APC_VIRTUAL_PROTECT */
687 unsigned int status; /* status returned by call */
688 client_ptr_t addr; /* resulting address */
689 mem_size_t size; /* resulting size */
690 unsigned int prot; /* old protection flags */
691 } virtual_protect;
692 struct
694 enum apc_type type; /* APC_VIRTUAL_FLUSH */
695 unsigned int status; /* status returned by call */
696 client_ptr_t addr; /* resulting address */
697 mem_size_t size; /* resulting size */
698 } virtual_flush;
699 struct
701 enum apc_type type; /* APC_VIRTUAL_LOCK */
702 unsigned int status; /* status returned by call */
703 client_ptr_t addr; /* resulting address */
704 mem_size_t size; /* resulting size */
705 } virtual_lock;
706 struct
708 enum apc_type type; /* APC_VIRTUAL_UNLOCK */
709 unsigned int status; /* status returned by call */
710 client_ptr_t addr; /* resulting address */
711 mem_size_t size; /* resulting size */
712 } virtual_unlock;
713 struct
715 enum apc_type type; /* APC_MAP_VIEW */
716 unsigned int status; /* status returned by call */
717 client_ptr_t addr; /* resulting address */
718 mem_size_t size; /* resulting size */
719 } map_view;
720 struct
722 enum apc_type type; /* APC_MAP_VIEW_EX */
723 unsigned int status; /* status returned by call */
724 client_ptr_t addr; /* resulting address */
725 mem_size_t size; /* resulting size */
726 } map_view_ex;
727 struct
729 enum apc_type type; /* APC_UNMAP_VIEW */
730 unsigned int status; /* status returned by call */
731 } unmap_view;
732 struct
734 enum apc_type type; /* APC_CREATE_THREAD */
735 unsigned int status; /* status returned by call */
736 process_id_t pid; /* process id */
737 thread_id_t tid; /* thread id */
738 client_ptr_t teb; /* thread teb (in process address space) */
739 obj_handle_t handle; /* handle to new thread */
740 } create_thread;
741 struct
743 enum apc_type type; /* APC_DUP_HANDLE */
744 unsigned int status; /* status returned by call */
745 obj_handle_t handle; /* duplicated handle in dst process */
746 } dup_handle;
747 struct
749 enum apc_type type; /* APC_BREAK_PROCESS */
750 unsigned int status; /* status returned by call */
751 } break_process;
752 } apc_result_t;
754 enum irp_type
756 IRP_CALL_NONE,
757 IRP_CALL_CREATE,
758 IRP_CALL_CLOSE,
759 IRP_CALL_READ,
760 IRP_CALL_WRITE,
761 IRP_CALL_FLUSH,
762 IRP_CALL_IOCTL,
763 IRP_CALL_VOLUME,
764 IRP_CALL_FREE,
765 IRP_CALL_CANCEL
768 typedef union
770 enum irp_type type; /* irp call type */
771 struct
773 enum irp_type type; /* IRP_CALL_CREATE */
774 unsigned int access; /* access rights */
775 unsigned int sharing; /* sharing flags */
776 unsigned int options; /* file options */
777 client_ptr_t device; /* opaque ptr for the device */
778 obj_handle_t file; /* file handle */
779 } create;
780 struct
782 enum irp_type type; /* IRP_CALL_CLOSE */
783 int __pad;
784 client_ptr_t file; /* opaque ptr for the file object */
785 } close;
786 struct
788 enum irp_type type; /* IRP_CALL_READ */
789 unsigned int key; /* driver key */
790 data_size_t out_size; /* needed output size */
791 int __pad;
792 client_ptr_t file; /* opaque ptr for the file object */
793 file_pos_t pos; /* file position */
794 } read;
795 struct
797 enum irp_type type; /* IRP_CALL_WRITE */
798 unsigned int key; /* driver key */
799 client_ptr_t file; /* opaque ptr for the file object */
800 file_pos_t pos; /* file position */
801 } write;
802 struct
804 enum irp_type type; /* IRP_CALL_FLUSH */
805 int __pad;
806 client_ptr_t file; /* opaque ptr for the file object */
807 } flush;
808 struct
810 enum irp_type type; /* IRP_CALL_IOCTL */
811 ioctl_code_t code; /* ioctl code */
812 data_size_t out_size; /* needed output size */
813 int __pad;
814 client_ptr_t file; /* opaque ptr for the file object */
815 } ioctl;
816 struct
818 enum irp_type type; /* IRP_CALL_VOLUME */
819 unsigned int info_class;/* information class */
820 data_size_t out_size; /* needed output size */
821 int __pad;
822 client_ptr_t file; /* opaque ptr for the file object */
823 } volume;
824 struct
826 enum irp_type type; /* IRP_CALL_FREE */
827 int __pad;
828 client_ptr_t obj; /* opaque ptr for the freed object */
829 } free;
830 struct
832 enum irp_type type; /* IRP_CALL_CANCEL */
833 int __pad;
834 client_ptr_t irp; /* opaque ptr for canceled irp */
835 } cancel;
836 } irp_params_t;
838 /* information about a PE image mapping, roughly equivalent to SECTION_IMAGE_INFORMATION */
839 typedef struct
841 client_ptr_t base;
842 mem_size_t stack_size;
843 mem_size_t stack_commit;
844 unsigned int entry_point;
845 unsigned int map_size;
846 unsigned int zerobits;
847 unsigned int subsystem;
848 unsigned short subsystem_minor;
849 unsigned short subsystem_major;
850 unsigned short osversion_major;
851 unsigned short osversion_minor;
852 unsigned short image_charact;
853 unsigned short dll_charact;
854 unsigned short machine;
855 unsigned char contains_code : 1;
856 unsigned char wine_builtin : 1;
857 unsigned char wine_fakedll : 1;
858 unsigned char image_flags;
859 unsigned int loader_flags;
860 unsigned int header_size;
861 unsigned int file_size;
862 unsigned int checksum;
863 unsigned int dbg_offset;
864 unsigned int dbg_size;
865 } pe_image_info_t;
866 #define IMAGE_FLAGS_ComPlusNativeReady 0x01
867 #define IMAGE_FLAGS_ComPlusILOnly 0x02
868 #define IMAGE_FLAGS_ImageDynamicallyRelocated 0x04
869 #define IMAGE_FLAGS_ImageMappedFlat 0x08
870 #define IMAGE_FLAGS_BaseBelow4gb 0x10
871 #define IMAGE_FLAGS_ComPlusPrefer32bit 0x20
873 struct rawinput_device
875 unsigned short usage_page;
876 unsigned short usage;
877 unsigned int flags;
878 user_handle_t target;
881 typedef struct
883 int x;
884 int y;
885 unsigned int time;
886 int __pad;
887 lparam_t info;
888 } cursor_pos_t;
890 /****************************************************************/
891 /* Request declarations */
893 /* Create a new process from the context of the parent */
894 @REQ(new_process)
895 obj_handle_t token; /* process token */
896 obj_handle_t debug; /* process debug object */
897 obj_handle_t parent_process; /* parent process */
898 unsigned int flags; /* process creation flags */
899 int socket_fd; /* file descriptor for process socket */
900 unsigned int access; /* access rights for process object */
901 unsigned short machine; /* architecture that the new process will use */
902 data_size_t info_size; /* size of startup info */
903 data_size_t handles_size; /* length of explicit handles list */
904 data_size_t jobs_size; /* length of jobs list */
905 VARARG(objattr,object_attributes); /* object attributes */
906 VARARG(handles,uints,handles_size); /* handles list */
907 VARARG(jobs,uints,jobs_size); /* jobs list */
908 VARARG(info,startup_info,info_size); /* startup information */
909 VARARG(env,unicode_str); /* environment for new process */
910 @REPLY
911 obj_handle_t info; /* new process info handle */
912 process_id_t pid; /* process id */
913 obj_handle_t handle; /* process handle (in the current process) */
914 @END
917 /* Retrieve information about a newly started process */
918 @REQ(get_new_process_info)
919 obj_handle_t info; /* info handle returned from new_process_request */
920 @REPLY
921 int success; /* did the process start successfully? */
922 int exit_code; /* process exit code if failed */
923 @END
926 /* Create a new thread */
927 @REQ(new_thread)
928 obj_handle_t process; /* process in which to create thread */
929 unsigned int access; /* wanted access rights */
930 unsigned int flags; /* thread creation flags */
931 int request_fd; /* fd for request pipe */
932 VARARG(objattr,object_attributes); /* object attributes */
933 @REPLY
934 thread_id_t tid; /* thread id */
935 obj_handle_t handle; /* thread handle (in the current process) */
936 @END
939 /* Retrieve the new process startup info */
940 @REQ(get_startup_info)
941 @REPLY
942 data_size_t info_size; /* size of startup info */
943 unsigned short machine; /* architecture for the new process */
944 VARARG(info,startup_info,info_size); /* startup information */
945 VARARG(env,unicode_str); /* environment */
946 @END
949 /* Signal the end of the process initialization */
950 @REQ(init_process_done)
951 client_ptr_t teb; /* TEB of new thread (in process address space) */
952 client_ptr_t peb; /* PEB of new process (in process address space) */
953 client_ptr_t ldt_copy; /* address of LDT copy (in process address space) */
954 @REPLY
955 client_ptr_t entry; /* process entry point */
956 int suspend; /* is process suspended? */
957 @END
960 /* Initialize the first thread of a new process */
961 @REQ(init_first_thread)
962 int unix_pid; /* Unix pid of new process */
963 int unix_tid; /* Unix tid of new thread */
964 int debug_level; /* new debug level */
965 int reply_fd; /* fd for reply pipe */
966 int wait_fd; /* fd for blocking calls pipe */
967 @REPLY
968 process_id_t pid; /* process id of the new thread's process */
969 thread_id_t tid; /* thread id of the new thread */
970 timeout_t server_start; /* server start time */
971 unsigned int session_id; /* process session id */
972 data_size_t info_size; /* total size of startup info */
973 VARARG(machines,ushorts); /* array of supported machines */
974 @END
977 /* Initialize a new thread; called from the child after pthread_create() */
978 @REQ(init_thread)
979 int unix_tid; /* Unix tid of new thread */
980 int reply_fd; /* fd for reply pipe */
981 int wait_fd; /* fd for blocking calls pipe */
982 client_ptr_t teb; /* TEB of new thread (in thread address space) */
983 client_ptr_t entry; /* entry point (in thread address space) */
984 @REPLY
985 int suspend; /* is thread suspended? */
986 @END
989 /* Terminate a process */
990 @REQ(terminate_process)
991 obj_handle_t handle; /* process handle to terminate */
992 int exit_code; /* process exit code */
993 @REPLY
994 int self; /* suicide? */
995 @END
998 /* Terminate a thread */
999 @REQ(terminate_thread)
1000 obj_handle_t handle; /* thread handle to terminate */
1001 int exit_code; /* thread exit code */
1002 @REPLY
1003 int self; /* suicide? */
1004 @END
1007 /* Retrieve information about a process */
1008 @REQ(get_process_info)
1009 obj_handle_t handle; /* process handle */
1010 @REPLY
1011 process_id_t pid; /* server process id */
1012 process_id_t ppid; /* server process id of parent */
1013 affinity_t affinity; /* process affinity mask */
1014 client_ptr_t peb; /* PEB address in process address space */
1015 timeout_t start_time; /* process start time */
1016 timeout_t end_time; /* process end time */
1017 unsigned int session_id; /* process session id */
1018 int exit_code; /* process exit code */
1019 int priority; /* priority class */
1020 unsigned short machine; /* process architecture */
1021 VARARG(image,pe_image_info); /* image info for main exe */
1022 @END
1025 /* Retrieve debug information about a process */
1026 @REQ(get_process_debug_info)
1027 obj_handle_t handle; /* process handle */
1028 @REPLY
1029 obj_handle_t debug; /* handle to debug port */
1030 int debug_children; /* inherit debugger to child processes */
1031 VARARG(image,pe_image_info); /* image info for main exe */
1032 @END
1035 /* Fetch the name of the process image */
1036 @REQ(get_process_image_name)
1037 obj_handle_t handle; /* process handle */
1038 int win32; /* return a win32 filename? */
1039 @REPLY
1040 data_size_t len; /* len in bytes required to store filename */
1041 VARARG(name,unicode_str); /* image name for main exe */
1042 @END
1045 /* Retrieve information about a process memory usage */
1046 @REQ(get_process_vm_counters)
1047 obj_handle_t handle; /* process handle */
1048 @REPLY
1049 mem_size_t peak_virtual_size; /* peak virtual memory in bytes */
1050 mem_size_t virtual_size; /* virtual memory in bytes */
1051 mem_size_t peak_working_set_size; /* peak real memory in bytes */
1052 mem_size_t working_set_size; /* real memory in bytes */
1053 mem_size_t pagefile_usage; /* commit charge in bytes */
1054 mem_size_t peak_pagefile_usage; /* peak commit charge in bytes */
1055 @END
1058 /* Set a process information */
1059 @REQ(set_process_info)
1060 obj_handle_t handle; /* process handle */
1061 int mask; /* setting mask (see below) */
1062 int priority; /* priority class */
1063 affinity_t affinity; /* affinity mask */
1064 @END
1065 #define SET_PROCESS_INFO_PRIORITY 0x01
1066 #define SET_PROCESS_INFO_AFFINITY 0x02
1069 /* Retrieve information about a thread */
1070 @REQ(get_thread_info)
1071 obj_handle_t handle; /* thread handle */
1072 unsigned int access; /* required access rights */
1073 @REPLY
1074 process_id_t pid; /* server process id */
1075 thread_id_t tid; /* server thread id */
1076 client_ptr_t teb; /* thread teb pointer */
1077 client_ptr_t entry_point; /* thread entry point */
1078 affinity_t affinity; /* thread affinity mask */
1079 int exit_code; /* thread exit code */
1080 int priority; /* thread priority level */
1081 int last; /* last thread in process */
1082 int suspend_count; /* thread suspend count */
1083 int dbg_hidden; /* thread hidden from debugger */
1084 data_size_t desc_len; /* description length in bytes */
1085 VARARG(desc,unicode_str); /* description string */
1086 @END
1089 /* Retrieve information about thread times */
1090 @REQ(get_thread_times)
1091 obj_handle_t handle; /* thread handle */
1092 @REPLY
1093 timeout_t creation_time; /* thread creation time */
1094 timeout_t exit_time; /* thread exit time */
1095 int unix_pid; /* thread native pid */
1096 int unix_tid; /* thread native pid */
1097 @END
1100 /* Set a thread information */
1101 @REQ(set_thread_info)
1102 obj_handle_t handle; /* thread handle */
1103 int mask; /* setting mask (see below) */
1104 int priority; /* priority class */
1105 affinity_t affinity; /* affinity mask */
1106 client_ptr_t entry_point; /* thread entry point */
1107 obj_handle_t token; /* impersonation token */
1108 VARARG(desc,unicode_str); /* description string */
1109 @END
1110 #define SET_THREAD_INFO_PRIORITY 0x01
1111 #define SET_THREAD_INFO_AFFINITY 0x02
1112 #define SET_THREAD_INFO_TOKEN 0x04
1113 #define SET_THREAD_INFO_ENTRYPOINT 0x08
1114 #define SET_THREAD_INFO_DESCRIPTION 0x10
1115 #define SET_THREAD_INFO_DBG_HIDDEN 0x20
1118 /* Suspend a thread */
1119 @REQ(suspend_thread)
1120 obj_handle_t handle; /* thread handle */
1121 @REPLY
1122 int count; /* new suspend count */
1123 @END
1126 /* Resume a thread */
1127 @REQ(resume_thread)
1128 obj_handle_t handle; /* thread handle */
1129 @REPLY
1130 int count; /* new suspend count */
1131 @END
1134 /* Queue an APC for a thread or process */
1135 @REQ(queue_apc)
1136 obj_handle_t handle; /* thread or process handle */
1137 VARARG(call,apc_call); /* call arguments */
1138 @REPLY
1139 obj_handle_t handle; /* APC handle */
1140 int self; /* run APC in caller itself? */
1141 @END
1144 /* Get the result of an APC call */
1145 @REQ(get_apc_result)
1146 obj_handle_t handle; /* handle to the APC */
1147 @REPLY
1148 apc_result_t result; /* result of the APC */
1149 @END
1152 /* Close a handle for the current process */
1153 @REQ(close_handle)
1154 obj_handle_t handle; /* handle to close */
1155 @END
1158 /* Set a handle information */
1159 @REQ(set_handle_info)
1160 obj_handle_t handle; /* handle we are interested in */
1161 int flags; /* new handle flags */
1162 int mask; /* mask for flags to set */
1163 @REPLY
1164 int old_flags; /* old flag value */
1165 @END
1168 /* Duplicate a handle */
1169 @REQ(dup_handle)
1170 obj_handle_t src_process; /* src process handle */
1171 obj_handle_t src_handle; /* src handle to duplicate */
1172 obj_handle_t dst_process; /* dst process handle */
1173 unsigned int access; /* wanted access rights */
1174 unsigned int attributes; /* object attributes */
1175 unsigned int options; /* duplicate options */
1176 @REPLY
1177 obj_handle_t handle; /* duplicated handle in dst process */
1178 @END
1181 /* Test if two handles refer to the same object */
1182 @REQ(compare_objects)
1183 obj_handle_t first; /* first object handle */
1184 obj_handle_t second; /* second object handle */
1185 @END
1188 /* Make an object temporary */
1189 @REQ(make_temporary)
1190 obj_handle_t handle; /* handle to the object */
1191 @END
1194 /* Open a handle to a process */
1195 @REQ(open_process)
1196 process_id_t pid; /* process id to open */
1197 unsigned int access; /* wanted access rights */
1198 unsigned int attributes; /* object attributes */
1199 @REPLY
1200 obj_handle_t handle; /* handle to the process */
1201 @END
1204 /* Open a handle to a thread */
1205 @REQ(open_thread)
1206 thread_id_t tid; /* thread id to open */
1207 unsigned int access; /* wanted access rights */
1208 unsigned int attributes; /* object attributes */
1209 @REPLY
1210 obj_handle_t handle; /* handle to the thread */
1211 @END
1214 /* Wait for handles */
1215 @REQ(select)
1216 int flags; /* wait flags (see below) */
1217 client_ptr_t cookie; /* magic cookie to return to client */
1218 abstime_t timeout; /* timeout */
1219 data_size_t size; /* size of select_op */
1220 obj_handle_t prev_apc; /* handle to previous APC */
1221 VARARG(result,apc_result); /* result of previous APC */
1222 VARARG(data,select_op,size); /* operation-specific data */
1223 VARARG(contexts,contexts); /* suspend context(s) */
1224 @REPLY
1225 obj_handle_t apc_handle; /* handle to next APC */
1226 int signaled; /* were the handles immediately signaled? */
1227 VARARG(call,apc_call); /* APC call arguments */
1228 VARARG(contexts,contexts); /* suspend context(s) */
1229 @END
1230 #define SELECT_ALERTABLE 1
1231 #define SELECT_INTERRUPTIBLE 2
1234 /* Create an event */
1235 @REQ(create_event)
1236 unsigned int access; /* wanted access rights */
1237 int manual_reset; /* manual reset event */
1238 int initial_state; /* initial state of the event */
1239 VARARG(objattr,object_attributes); /* object attributes */
1240 @REPLY
1241 obj_handle_t handle; /* handle to the event */
1242 @END
1244 /* Event operation */
1245 @REQ(event_op)
1246 obj_handle_t handle; /* handle to event */
1247 int op; /* event operation (see below) */
1248 @REPLY
1249 int state; /* previous state */
1250 @END
1251 enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT };
1253 @REQ(query_event)
1254 obj_handle_t handle; /* handle to event */
1255 @REPLY
1256 int manual_reset; /* manual reset event */
1257 int state; /* current state of the event */
1258 @END
1260 /* Open an event */
1261 @REQ(open_event)
1262 unsigned int access; /* wanted access rights */
1263 unsigned int attributes; /* object attributes */
1264 obj_handle_t rootdir; /* root directory */
1265 VARARG(name,unicode_str); /* object name */
1266 @REPLY
1267 obj_handle_t handle; /* handle to the event */
1268 @END
1271 /* Create a keyed event */
1272 @REQ(create_keyed_event)
1273 unsigned int access; /* wanted access rights */
1274 VARARG(objattr,object_attributes); /* object attributes */
1275 @REPLY
1276 obj_handle_t handle; /* handle to the event */
1277 @END
1279 /* Open a keyed event */
1280 @REQ(open_keyed_event)
1281 unsigned int access; /* wanted access rights */
1282 unsigned int attributes; /* object attributes */
1283 obj_handle_t rootdir; /* root directory */
1284 VARARG(name,unicode_str); /* object name */
1285 @REPLY
1286 obj_handle_t handle; /* handle to the event */
1287 @END
1290 /* Create a mutex */
1291 @REQ(create_mutex)
1292 unsigned int access; /* wanted access rights */
1293 int owned; /* initially owned? */
1294 VARARG(objattr,object_attributes); /* object attributes */
1295 @REPLY
1296 obj_handle_t handle; /* handle to the mutex */
1297 @END
1300 /* Release a mutex */
1301 @REQ(release_mutex)
1302 obj_handle_t handle; /* handle to the mutex */
1303 @REPLY
1304 unsigned int prev_count; /* value of internal counter, before release */
1305 @END
1308 /* Open a mutex */
1309 @REQ(open_mutex)
1310 unsigned int access; /* wanted access rights */
1311 unsigned int attributes; /* object attributes */
1312 obj_handle_t rootdir; /* root directory */
1313 VARARG(name,unicode_str); /* object name */
1314 @REPLY
1315 obj_handle_t handle; /* handle to the mutex */
1316 @END
1319 /* Query a mutex */
1320 @REQ(query_mutex)
1321 obj_handle_t handle; /* handle to mutex */
1322 @REPLY
1323 unsigned int count; /* current count of mutex */
1324 int owned; /* true if owned by current thread */
1325 int abandoned; /* true if abandoned */
1326 @END
1329 /* Create a semaphore */
1330 @REQ(create_semaphore)
1331 unsigned int access; /* wanted access rights */
1332 unsigned int initial; /* initial count */
1333 unsigned int max; /* maximum count */
1334 VARARG(objattr,object_attributes); /* object attributes */
1335 @REPLY
1336 obj_handle_t handle; /* handle to the semaphore */
1337 @END
1340 /* Release a semaphore */
1341 @REQ(release_semaphore)
1342 obj_handle_t handle; /* handle to the semaphore */
1343 unsigned int count; /* count to add to semaphore */
1344 @REPLY
1345 unsigned int prev_count; /* previous semaphore count */
1346 @END
1348 @REQ(query_semaphore)
1349 obj_handle_t handle; /* handle to the semaphore */
1350 @REPLY
1351 unsigned int current; /* current count */
1352 unsigned int max; /* maximum count */
1353 @END
1355 /* Open a semaphore */
1356 @REQ(open_semaphore)
1357 unsigned int access; /* wanted access rights */
1358 unsigned int attributes; /* object attributes */
1359 obj_handle_t rootdir; /* root directory */
1360 VARARG(name,unicode_str); /* object name */
1361 @REPLY
1362 obj_handle_t handle; /* handle to the semaphore */
1363 @END
1366 /* Create a file */
1367 @REQ(create_file)
1368 unsigned int access; /* wanted access rights */
1369 unsigned int sharing; /* sharing flags */
1370 int create; /* file create action */
1371 unsigned int options; /* file options */
1372 unsigned int attrs; /* file attributes for creation */
1373 VARARG(objattr,object_attributes); /* object attributes */
1374 VARARG(filename,string); /* file name */
1375 @REPLY
1376 obj_handle_t handle; /* handle to the file */
1377 @END
1380 /* Open a file object */
1381 @REQ(open_file_object)
1382 unsigned int access; /* wanted access rights */
1383 unsigned int attributes; /* open attributes */
1384 obj_handle_t rootdir; /* root directory */
1385 unsigned int sharing; /* sharing flags */
1386 unsigned int options; /* file options */
1387 VARARG(filename,unicode_str); /* file name */
1388 @REPLY
1389 obj_handle_t handle; /* handle to the file */
1390 @END
1393 /* Allocate a file handle for a Unix fd */
1394 @REQ(alloc_file_handle)
1395 unsigned int access; /* wanted access rights */
1396 unsigned int attributes; /* object attributes */
1397 int fd; /* file descriptor on the client side */
1398 @REPLY
1399 obj_handle_t handle; /* handle to the file */
1400 @END
1403 /* Get the Unix name from a file handle */
1404 @REQ(get_handle_unix_name)
1405 obj_handle_t handle; /* file handle */
1406 @REPLY
1407 data_size_t name_len; /* unix name length */
1408 VARARG(name,string); /* unix name */
1409 @END
1412 /* Get a Unix fd to access a file */
1413 @REQ(get_handle_fd)
1414 obj_handle_t handle; /* handle to the file */
1415 @REPLY
1416 int type; /* file type (see below) */
1417 int cacheable; /* can fd be cached in the client? */
1418 unsigned int access; /* file access rights */
1419 unsigned int options; /* file open options */
1420 @END
1421 enum server_fd_type
1423 FD_TYPE_INVALID, /* invalid file (no associated fd) */
1424 FD_TYPE_FILE, /* regular file */
1425 FD_TYPE_DIR, /* directory */
1426 FD_TYPE_SOCKET, /* socket */
1427 FD_TYPE_SERIAL, /* serial port */
1428 FD_TYPE_PIPE, /* named pipe */
1429 FD_TYPE_MAILSLOT, /* mailslot */
1430 FD_TYPE_CHAR, /* unspecified char device */
1431 FD_TYPE_DEVICE, /* Windows device file */
1432 FD_TYPE_NB_TYPES
1436 /* Retrieve (or allocate) the client-side directory cache entry */
1437 @REQ(get_directory_cache_entry)
1438 obj_handle_t handle; /* handle to the directory */
1439 @REPLY
1440 int entry; /* cache entry on the client side */
1441 VARARG(free,ints); /* entries that can be freed */
1442 @END
1445 /* Flush a file buffers */
1446 @REQ(flush)
1447 async_data_t async; /* async I/O parameters */
1448 @REPLY
1449 obj_handle_t event; /* event set when finished */
1450 @END
1452 /* Query file information */
1453 @REQ(get_file_info)
1454 obj_handle_t handle; /* handle to the file */
1455 unsigned int info_class; /* queried information class */
1456 @REPLY
1457 VARARG(data,bytes); /* file info data */
1458 @END
1460 /* Query volume information */
1461 @REQ(get_volume_info)
1462 obj_handle_t handle; /* handle to the file */
1463 async_data_t async; /* async I/O parameters */
1464 unsigned int info_class; /* queried information class */
1465 @REPLY
1466 obj_handle_t wait; /* handle to wait on for blocking read */
1467 VARARG(data,bytes); /* volume info data */
1468 @END
1470 /* Lock a region of a file */
1471 @REQ(lock_file)
1472 obj_handle_t handle; /* handle to the file */
1473 file_pos_t offset; /* offset of start of lock */
1474 file_pos_t count; /* count of bytes to lock */
1475 int shared; /* shared or exclusive lock? */
1476 int wait; /* do we want to wait? */
1477 @REPLY
1478 obj_handle_t handle; /* handle to wait on */
1479 int overlapped; /* is it an overlapped I/O handle? */
1480 @END
1483 /* Unlock a region of a file */
1484 @REQ(unlock_file)
1485 obj_handle_t handle; /* handle to the file */
1486 file_pos_t offset; /* offset of start of unlock */
1487 file_pos_t count; /* count of bytes to unlock */
1488 @END
1491 /* Perform a recv on a socket */
1492 @REQ(recv_socket)
1493 int oob; /* are we receiving OOB data? */
1494 async_data_t async; /* async I/O parameters */
1495 int force_async; /* Force asynchronous mode? */
1496 @REPLY
1497 obj_handle_t wait; /* handle to wait on for blocking recv */
1498 unsigned int options; /* device open options */
1499 int nonblocking; /* is socket non-blocking? */
1500 @END
1503 /* Perform a send on a socket */
1504 @REQ(send_socket)
1505 async_data_t async; /* async I/O parameters */
1506 int force_async; /* Force asynchronous mode? */
1507 @REPLY
1508 obj_handle_t wait; /* handle to wait on for blocking send */
1509 unsigned int options; /* device open options */
1510 int nonblocking; /* is socket non-blocking? */
1511 @END
1514 /* Store ICMP id for ICMP over datagram fixup */
1515 @REQ(socket_send_icmp_id)
1516 obj_handle_t handle; /* socket handle */
1517 unsigned short icmp_id; /* ICMP packet id */
1518 unsigned short icmp_seq; /* ICMP packed sequence */
1519 @REPLY
1520 @END
1523 /* Get ICMP id for ICMP over datagram fixup */
1524 @REQ(socket_get_icmp_id)
1525 obj_handle_t handle; /* socket handle */
1526 unsigned short icmp_seq; /* ICMP packed sequence */
1527 @REPLY
1528 unsigned short icmp_id; /* ICMP packet id */
1529 @END
1532 /* Retrieve the next pending console ioctl request */
1533 @REQ(get_next_console_request)
1534 obj_handle_t handle; /* console server handle */
1535 int signal; /* server signal state */
1536 int read; /* 1 if reporting result of blocked read ioctl */
1537 unsigned int status; /* status of previous ioctl */
1538 VARARG(out_data,bytes); /* out_data of previous ioctl */
1539 @REPLY
1540 unsigned int code; /* ioctl code */
1541 unsigned int output; /* output id or 0 for input */
1542 data_size_t out_size; /* ioctl output size */
1543 VARARG(in_data,bytes); /* ioctl in_data */
1544 @END
1547 /* enable directory change notifications */
1548 @REQ(read_directory_changes)
1549 unsigned int filter; /* notification filter */
1550 int subtree; /* watch the subtree? */
1551 int want_data; /* flag indicating whether change data should be collected */
1552 async_data_t async; /* async I/O parameters */
1553 @END
1556 @REQ(read_change)
1557 obj_handle_t handle;
1558 @REPLY
1559 VARARG(events,filesystem_event); /* collected filesystem events */
1560 @END
1563 /* Create a file mapping */
1564 @REQ(create_mapping)
1565 unsigned int access; /* wanted access rights */
1566 unsigned int flags; /* SEC_* flags */
1567 unsigned int file_access; /* file access rights */
1568 mem_size_t size; /* mapping size */
1569 obj_handle_t file_handle; /* file handle */
1570 VARARG(objattr,object_attributes); /* object attributes */
1571 @REPLY
1572 obj_handle_t handle; /* handle to the mapping */
1573 @END
1576 /* Open a mapping */
1577 @REQ(open_mapping)
1578 unsigned int access; /* wanted access rights */
1579 unsigned int attributes; /* object attributes */
1580 obj_handle_t rootdir; /* root directory */
1581 VARARG(name,unicode_str); /* object name */
1582 @REPLY
1583 obj_handle_t handle; /* handle to the mapping */
1584 @END
1587 /* Get information about a file mapping */
1588 @REQ(get_mapping_info)
1589 obj_handle_t handle; /* handle to the mapping */
1590 unsigned int access; /* wanted access rights */
1591 @REPLY
1592 mem_size_t size; /* mapping size */
1593 unsigned int flags; /* SEC_* flags */
1594 obj_handle_t shared_file; /* shared mapping file handle */
1595 data_size_t total; /* total required buffer size in bytes */
1596 VARARG(image,pe_image_info);/* image info for SEC_IMAGE mappings */
1597 VARARG(name,unicode_str); /* filename for SEC_IMAGE mappings */
1598 @END
1601 /* Add a memory view in the current process */
1602 @REQ(map_view)
1603 obj_handle_t mapping; /* file mapping handle */
1604 unsigned int access; /* wanted access rights */
1605 client_ptr_t base; /* view base address (page-aligned) */
1606 mem_size_t size; /* view size */
1607 file_pos_t start; /* start offset in mapping */
1608 @END
1611 /* Add a memory view for an image mapping in the current process */
1612 @REQ(map_image_view)
1613 obj_handle_t mapping; /* file mapping handle */
1614 client_ptr_t base; /* view base address (page-aligned) */
1615 mem_size_t size; /* view size */
1616 unsigned int entry; /* entry point in mapped view */
1617 unsigned short machine; /* machine in the mapped view */
1618 @END
1621 /* Add a memory view for a builtin dll in the current process */
1622 @REQ(map_builtin_view)
1623 VARARG(image,pe_image_info);/* image info */
1624 VARARG(name,unicode_str); /* image filename */
1625 @END
1628 /* Unmap a memory view from the current process */
1629 @REQ(unmap_view)
1630 client_ptr_t base; /* view base address */
1631 @END
1634 /* Get a range of committed pages in a file mapping */
1635 @REQ(get_mapping_committed_range)
1636 client_ptr_t base; /* view base address */
1637 file_pos_t offset; /* starting offset (page-aligned, in bytes) */
1638 @REPLY
1639 mem_size_t size; /* size of range starting at offset (page-aligned, in bytes) */
1640 int committed; /* whether it is a committed range */
1641 @END
1644 /* Add a range to the committed pages in a file mapping */
1645 @REQ(add_mapping_committed_range)
1646 client_ptr_t base; /* view base address */
1647 file_pos_t offset; /* starting offset (page-aligned, in bytes) */
1648 mem_size_t size; /* size to set (page-aligned, in bytes) or 0 if only retrieving */
1649 @END
1652 /* Check if two memory maps are for the same file */
1653 @REQ(is_same_mapping)
1654 client_ptr_t base1; /* first view base address */
1655 client_ptr_t base2; /* second view base address */
1656 @END
1659 /* Get the filename of a mapping */
1660 @REQ(get_mapping_filename)
1661 obj_handle_t process; /* process handle */
1662 client_ptr_t addr; /* address inside mapped view (in process address space) */
1663 @REPLY
1664 data_size_t len; /* total filename length in bytes */
1665 VARARG(filename,unicode_str); /* filename in NT format */
1666 @END
1669 struct thread_info
1671 timeout_t start_time;
1672 thread_id_t tid;
1673 int base_priority;
1674 int current_priority;
1675 int unix_tid;
1676 client_ptr_t teb;
1677 client_ptr_t entry_point;
1680 struct process_info
1682 timeout_t start_time;
1683 data_size_t name_len;
1684 int thread_count;
1685 int priority;
1686 process_id_t pid;
1687 process_id_t parent_pid;
1688 unsigned int session_id;
1689 int handle_count;
1690 int unix_pid;
1691 /* VARARG(name,unicode_str,name_len); */
1692 /* VARARG(threads,struct thread_info,thread_count); */
1695 /* Get a list of processes and threads currently running */
1696 @REQ(list_processes)
1697 @REPLY
1698 data_size_t info_size;
1699 int process_count;
1700 int total_thread_count;
1701 data_size_t total_name_len;
1702 VARARG(data,process_info,info_size);
1703 @END
1706 /* Create a debug object */
1707 @REQ(create_debug_obj)
1708 unsigned int access; /* wanted access rights */
1709 unsigned int flags; /* object flags */
1710 VARARG(objattr,object_attributes); /* object attributes */
1711 @REPLY
1712 obj_handle_t handle; /* handle to the debug object */
1713 @END
1716 /* Wait for a debug event */
1717 @REQ(wait_debug_event)
1718 obj_handle_t debug; /* debug object */
1719 @REPLY
1720 process_id_t pid; /* process id */
1721 thread_id_t tid; /* thread id */
1722 VARARG(event,debug_event); /* debug event data */
1723 @END
1726 /* Queue an exception event */
1727 @REQ(queue_exception_event)
1728 int first; /* first chance exception? */
1729 unsigned int code; /* exception code */
1730 unsigned int flags; /* exception flags */
1731 client_ptr_t record; /* exception record */
1732 client_ptr_t address; /* exception address */
1733 data_size_t len; /* size of parameters */
1734 VARARG(params,uints64,len);/* exception parameters */
1735 @REPLY
1736 obj_handle_t handle; /* handle to the queued event */
1737 @END
1740 /* Retrieve the status of an exception event */
1741 @REQ(get_exception_status)
1742 obj_handle_t handle; /* handle to the queued event */
1743 @END
1746 /* Continue a debug event */
1747 @REQ(continue_debug_event)
1748 obj_handle_t debug; /* debug object */
1749 process_id_t pid; /* process id to continue */
1750 thread_id_t tid; /* thread id to continue */
1751 unsigned int status; /* continuation status */
1752 @END
1755 /* Start or stop debugging an existing process */
1756 @REQ(debug_process)
1757 obj_handle_t handle; /* process handle */
1758 obj_handle_t debug; /* debug object to attach to the process */
1759 int attach; /* 1=attaching / 0=detaching from the process */
1760 @END
1763 /* Set debug object information */
1764 @REQ(set_debug_obj_info)
1765 obj_handle_t debug; /* debug object */
1766 unsigned int flags; /* object flags */
1767 @END
1770 /* Read data from a process address space */
1771 @REQ(read_process_memory)
1772 obj_handle_t handle; /* process handle */
1773 client_ptr_t addr; /* addr to read from */
1774 @REPLY
1775 VARARG(data,bytes); /* result data */
1776 @END
1779 /* Write data to a process address space */
1780 @REQ(write_process_memory)
1781 obj_handle_t handle; /* process handle */
1782 client_ptr_t addr; /* addr to write to */
1783 VARARG(data,bytes); /* data to write */
1784 @END
1787 /* Create a registry key */
1788 @REQ(create_key)
1789 unsigned int access; /* desired access rights */
1790 unsigned int options; /* creation options */
1791 VARARG(objattr,object_attributes); /* object attributes */
1792 VARARG(class,unicode_str); /* class name */
1793 @REPLY
1794 obj_handle_t hkey; /* handle to the created key */
1795 @END
1797 /* Open a registry key */
1798 @REQ(open_key)
1799 obj_handle_t parent; /* handle to the parent key */
1800 unsigned int access; /* desired access rights */
1801 unsigned int attributes; /* object attributes */
1802 VARARG(name,unicode_str); /* key name */
1803 @REPLY
1804 obj_handle_t hkey; /* handle to the open key */
1805 @END
1808 /* Delete a registry key */
1809 @REQ(delete_key)
1810 obj_handle_t hkey; /* handle to the key */
1811 @END
1814 /* Flush a registry key */
1815 @REQ(flush_key)
1816 obj_handle_t hkey; /* handle to the key */
1817 @END
1820 /* Enumerate registry subkeys */
1821 @REQ(enum_key)
1822 obj_handle_t hkey; /* handle to registry key */
1823 int index; /* index of subkey (or -1 for current key) */
1824 int info_class; /* requested information class */
1825 @REPLY
1826 int subkeys; /* number of subkeys */
1827 int max_subkey; /* longest subkey name */
1828 int max_class; /* longest class name */
1829 int values; /* number of values */
1830 int max_value; /* longest value name */
1831 int max_data; /* longest value data */
1832 timeout_t modif; /* last modification time */
1833 data_size_t total; /* total length needed for full name and class */
1834 data_size_t namelen; /* length of key name in bytes */
1835 VARARG(name,unicode_str,namelen); /* key name */
1836 VARARG(class,unicode_str); /* class name */
1837 @END
1840 /* Set a value of a registry key */
1841 @REQ(set_key_value)
1842 obj_handle_t hkey; /* handle to registry key */
1843 int type; /* value type */
1844 data_size_t namelen; /* length of value name in bytes */
1845 VARARG(name,unicode_str,namelen); /* value name */
1846 VARARG(data,bytes); /* value data */
1847 @END
1850 /* Retrieve the value of a registry key */
1851 @REQ(get_key_value)
1852 obj_handle_t hkey; /* handle to registry key */
1853 VARARG(name,unicode_str); /* value name */
1854 @REPLY
1855 int type; /* value type */
1856 data_size_t total; /* total length needed for data */
1857 VARARG(data,bytes); /* value data */
1858 @END
1861 /* Enumerate a value of a registry key */
1862 @REQ(enum_key_value)
1863 obj_handle_t hkey; /* handle to registry key */
1864 int index; /* value index */
1865 int info_class; /* requested information class */
1866 @REPLY
1867 int type; /* value type */
1868 data_size_t total; /* total length needed for full name and data */
1869 data_size_t namelen; /* length of value name in bytes */
1870 VARARG(name,unicode_str,namelen); /* value name */
1871 VARARG(data,bytes); /* value data */
1872 @END
1875 /* Delete a value of a registry key */
1876 @REQ(delete_key_value)
1877 obj_handle_t hkey; /* handle to registry key */
1878 VARARG(name,unicode_str); /* value name */
1879 @END
1882 /* Load a registry branch from a file */
1883 @REQ(load_registry)
1884 obj_handle_t file; /* file to load from */
1885 VARARG(objattr,object_attributes); /* object attributes */
1886 @END
1889 /* UnLoad a registry branch from a file */
1890 @REQ(unload_registry)
1891 obj_handle_t parent; /* handle to the parent key */
1892 unsigned int attributes; /* object attributes */
1893 VARARG(name,unicode_str); /* key name */
1894 @END
1897 /* Save a registry branch to a file */
1898 @REQ(save_registry)
1899 obj_handle_t hkey; /* key to save */
1900 obj_handle_t file; /* file to save to */
1901 @END
1904 /* Add a registry key change notification */
1905 @REQ(set_registry_notification)
1906 obj_handle_t hkey; /* key to watch for changes */
1907 obj_handle_t event; /* event to set */
1908 int subtree; /* should we watch the whole subtree? */
1909 unsigned int filter; /* things to watch */
1910 @END
1913 /* Rename a registry key */
1914 @REQ(rename_key)
1915 obj_handle_t hkey; /* handle to the key to be renamed */
1916 VARARG(name,unicode_str); /* new name */
1917 @END
1920 /* Create a waitable timer */
1921 @REQ(create_timer)
1922 unsigned int access; /* wanted access rights */
1923 int manual; /* manual reset */
1924 VARARG(objattr,object_attributes); /* object attributes */
1925 @REPLY
1926 obj_handle_t handle; /* handle to the timer */
1927 @END
1930 /* Open a waitable timer */
1931 @REQ(open_timer)
1932 unsigned int access; /* wanted access rights */
1933 unsigned int attributes; /* object attributes */
1934 obj_handle_t rootdir; /* root directory */
1935 VARARG(name,unicode_str); /* object name */
1936 @REPLY
1937 obj_handle_t handle; /* handle to the timer */
1938 @END
1940 /* Set a waitable timer */
1941 @REQ(set_timer)
1942 obj_handle_t handle; /* handle to the timer */
1943 timeout_t expire; /* next expiration absolute time */
1944 client_ptr_t callback; /* callback function */
1945 client_ptr_t arg; /* callback argument */
1946 int period; /* timer period in ms */
1947 @REPLY
1948 int signaled; /* was the timer signaled before this call ? */
1949 @END
1951 /* Cancel a waitable timer */
1952 @REQ(cancel_timer)
1953 obj_handle_t handle; /* handle to the timer */
1954 @REPLY
1955 int signaled; /* was the timer signaled before this calltime ? */
1956 @END
1958 /* Get information on a waitable timer */
1959 @REQ(get_timer_info)
1960 obj_handle_t handle; /* handle to the timer */
1961 @REPLY
1962 timeout_t when; /* absolute time when the timer next expires */
1963 int signaled; /* is the timer signaled? */
1964 @END
1967 /* Retrieve the current context of a thread */
1968 @REQ(get_thread_context)
1969 obj_handle_t handle; /* thread handle */
1970 obj_handle_t context; /* context handle */
1971 unsigned int flags; /* context flags */
1972 unsigned int native_flags; /* flags for native context if WoW present */
1973 unsigned short machine; /* context architecture */
1974 @REPLY
1975 int self; /* was it a handle to the current thread? */
1976 obj_handle_t handle; /* pending context handle */
1977 VARARG(contexts,contexts); /* thread context(s) */
1978 @END
1981 /* Set the current context of a thread */
1982 @REQ(set_thread_context)
1983 obj_handle_t handle; /* thread handle */
1984 unsigned int native_flags; /* flags for native context if WoW present */
1985 VARARG(contexts,contexts); /* thread context(s) */
1986 @REPLY
1987 int self; /* was it a handle to the current thread? */
1988 @END
1991 /* Fetch a selector entry for a thread */
1992 @REQ(get_selector_entry)
1993 obj_handle_t handle; /* thread handle */
1994 int entry; /* LDT entry */
1995 @REPLY
1996 unsigned int base; /* selector base */
1997 unsigned int limit; /* selector limit */
1998 unsigned char flags; /* selector flags */
1999 @END
2002 /* Add an atom */
2003 @REQ(add_atom)
2004 VARARG(name,unicode_str); /* atom name */
2005 @REPLY
2006 atom_t atom; /* resulting atom */
2007 @END
2010 /* Delete an atom */
2011 @REQ(delete_atom)
2012 atom_t atom; /* atom handle */
2013 @END
2016 /* Find an atom */
2017 @REQ(find_atom)
2018 VARARG(name,unicode_str); /* atom name */
2019 @REPLY
2020 atom_t atom; /* atom handle */
2021 @END
2024 /* Get information about an atom */
2025 @REQ(get_atom_information)
2026 atom_t atom; /* atom handle */
2027 @REPLY
2028 int count; /* atom lock count */
2029 int pinned; /* whether the atom has been pinned */
2030 data_size_t total; /* actual length of atom name */
2031 VARARG(name,unicode_str); /* atom name */
2032 @END
2035 /* Get the message queue of the current thread */
2036 @REQ(get_msg_queue)
2037 @REPLY
2038 obj_handle_t handle; /* handle to the queue */
2039 @END
2042 /* Set the file descriptor associated to the current thread queue */
2043 @REQ(set_queue_fd)
2044 obj_handle_t handle; /* handle to the file descriptor */
2045 @END
2048 /* Set the current message queue wakeup mask */
2049 @REQ(set_queue_mask)
2050 unsigned int wake_mask; /* wakeup bits mask */
2051 unsigned int changed_mask; /* changed bits mask */
2052 int skip_wait; /* will we skip waiting if signaled? */
2053 @REPLY
2054 unsigned int wake_bits; /* current wake bits */
2055 unsigned int changed_bits; /* current changed bits */
2056 @END
2059 /* Get the current message queue status */
2060 @REQ(get_queue_status)
2061 unsigned int clear_bits; /* should we clear the change bits? */
2062 @REPLY
2063 unsigned int wake_bits; /* wake bits */
2064 unsigned int changed_bits; /* changed bits since last time */
2065 @END
2068 /* Retrieve the process idle event */
2069 @REQ(get_process_idle_event)
2070 obj_handle_t handle; /* process handle */
2071 @REPLY
2072 obj_handle_t event; /* handle to idle event */
2073 @END
2076 /* Send a message to a thread queue */
2077 @REQ(send_message)
2078 thread_id_t id; /* thread id */
2079 int type; /* message type (see below) */
2080 int flags; /* message flags (see below) */
2081 user_handle_t win; /* window handle */
2082 unsigned int msg; /* message code */
2083 lparam_t wparam; /* parameters */
2084 lparam_t lparam; /* parameters */
2085 timeout_t timeout; /* timeout for reply */
2086 VARARG(data,message_data); /* message data for sent messages */
2087 @END
2089 @REQ(post_quit_message)
2090 int exit_code; /* exit code to return */
2091 @END
2093 enum message_type
2095 MSG_ASCII, /* Ascii message (from SendMessageA) */
2096 MSG_UNICODE, /* Unicode message (from SendMessageW) */
2097 MSG_NOTIFY, /* notify message (from SendNotifyMessageW), always Unicode */
2098 MSG_CALLBACK, /* callback message (from SendMessageCallbackW), always Unicode */
2099 MSG_CALLBACK_RESULT,/* result of a callback message */
2100 MSG_OTHER_PROCESS, /* sent from other process, may include vararg data, always Unicode */
2101 MSG_POSTED, /* posted message (from PostMessageW), always Unicode */
2102 MSG_HARDWARE, /* hardware message */
2103 MSG_WINEVENT, /* winevent message */
2104 MSG_HOOK_LL /* low-level hardware hook */
2106 #define SEND_MSG_ABORT_IF_HUNG 0x01
2109 /* Send a hardware message to a thread queue */
2110 @REQ(send_hardware_message)
2111 user_handle_t win; /* window handle */
2112 hw_input_t input; /* input data */
2113 unsigned int flags; /* flags (see below) */
2114 VARARG(report,bytes); /* HID report data */
2115 @REPLY
2116 int wait; /* do we need to wait for a reply? */
2117 int prev_x; /* previous cursor position */
2118 int prev_y;
2119 int new_x; /* new cursor position */
2120 int new_y;
2121 @END
2122 #define SEND_HWMSG_INJECTED 0x01
2125 /* Get a message from the current queue */
2126 @REQ(get_message)
2127 unsigned int flags; /* PM_* flags */
2128 user_handle_t get_win; /* window handle to get */
2129 unsigned int get_first; /* first message code to get */
2130 unsigned int get_last; /* last message code to get */
2131 unsigned int hw_id; /* id of the previous hardware message (or 0) */
2132 unsigned int wake_mask; /* wakeup bits mask */
2133 unsigned int changed_mask; /* changed bits mask */
2134 @REPLY
2135 user_handle_t win; /* window handle */
2136 unsigned int msg; /* message code */
2137 lparam_t wparam; /* parameters */
2138 lparam_t lparam; /* parameters */
2139 int type; /* message type */
2140 int x; /* message x position */
2141 int y; /* message y position */
2142 unsigned int time; /* message time */
2143 unsigned int active_hooks; /* active hooks bitmap */
2144 data_size_t total; /* total size of extra data */
2145 VARARG(data,message_data); /* message data for sent messages */
2146 @END
2149 /* Reply to a sent message */
2150 @REQ(reply_message)
2151 int remove; /* should we remove the message? */
2152 lparam_t result; /* message result */
2153 VARARG(data,bytes); /* message data for sent messages */
2154 @END
2157 /* Accept and remove the current hardware message */
2158 @REQ(accept_hardware_message)
2159 unsigned int hw_id; /* id of the hardware message */
2160 @END
2163 /* Retrieve the reply for the last message sent */
2164 @REQ(get_message_reply)
2165 int cancel; /* cancel message if not ready? */
2166 @REPLY
2167 lparam_t result; /* message result */
2168 VARARG(data,bytes); /* message data for sent messages */
2169 @END
2172 /* Set a window timer */
2173 @REQ(set_win_timer)
2174 user_handle_t win; /* window handle */
2175 unsigned int msg; /* message to post */
2176 unsigned int rate; /* timer rate in ms */
2177 lparam_t id; /* timer id */
2178 lparam_t lparam; /* message lparam (callback proc) */
2179 @REPLY
2180 lparam_t id; /* timer id */
2181 @END
2184 /* Kill a window timer */
2185 @REQ(kill_win_timer)
2186 user_handle_t win; /* window handle */
2187 lparam_t id; /* timer id */
2188 unsigned int msg; /* message to post */
2189 @END
2192 /* check if the thread owning the window is hung */
2193 @REQ(is_window_hung)
2194 user_handle_t win; /* window handle */
2195 @REPLY
2196 int is_hung;
2197 @END
2200 /* Retrieve info about a serial port */
2201 @REQ(get_serial_info)
2202 obj_handle_t handle; /* handle to comm port */
2203 int flags;
2204 @REPLY
2205 unsigned int eventmask;
2206 unsigned int cookie;
2207 unsigned int pending_write;
2208 @END
2211 /* Set info about a serial port */
2212 @REQ(set_serial_info)
2213 obj_handle_t handle; /* handle to comm port */
2214 int flags; /* bitmask to set values (see below) */
2215 @END
2216 #define SERIALINFO_PENDING_WRITE 0x04
2217 #define SERIALINFO_PENDING_WAIT 0x08
2219 /* Cancel all sync io on a thread */
2220 @REQ(cancel_sync)
2221 obj_handle_t handle; /* thread handle on which to cancel io */
2222 client_ptr_t iosb; /* I/O status block (NULL=all) */
2223 @END
2225 /* Create an async I/O */
2226 @REQ(register_async)
2227 int type; /* type of queue to look after */
2228 async_data_t async; /* async I/O parameters */
2229 int count; /* count - usually # of bytes to be read/written */
2230 @END
2231 #define ASYNC_TYPE_READ 0x01
2232 #define ASYNC_TYPE_WRITE 0x02
2233 #define ASYNC_TYPE_WAIT 0x03
2236 /* Cancel all async op on a fd */
2237 @REQ(cancel_async)
2238 obj_handle_t handle; /* handle to comm port, socket or file */
2239 client_ptr_t iosb; /* I/O status block (NULL=all) */
2240 int only_thread; /* cancel matching this thread */
2241 @END
2244 /* Retrieve results of an async */
2245 @REQ(get_async_result)
2246 client_ptr_t user_arg; /* user arg used to identify async */
2247 @REPLY
2248 VARARG(out_data,bytes); /* iosb output data */
2249 @END
2252 /* Notify direct completion of async and close the wait handle if not blocking */
2253 @REQ(set_async_direct_result)
2254 obj_handle_t handle; /* wait handle */
2255 apc_param_t information; /* IO_STATUS_BLOCK Information */
2256 unsigned int status; /* completion status */
2257 int mark_pending; /* set async to pending before completion? */
2258 @REPLY
2259 obj_handle_t handle; /* wait handle, or NULL if closed */
2260 @END
2263 /* Perform a read on a file object */
2264 @REQ(read)
2265 async_data_t async; /* async I/O parameters */
2266 file_pos_t pos; /* read position */
2267 @REPLY
2268 obj_handle_t wait; /* handle to wait on for blocking read */
2269 unsigned int options; /* device open options */
2270 VARARG(data,bytes); /* read data */
2271 @END
2274 /* Perform a write on a file object */
2275 @REQ(write)
2276 async_data_t async; /* async I/O parameters */
2277 file_pos_t pos; /* write position */
2278 VARARG(data,bytes); /* write data */
2279 @REPLY
2280 obj_handle_t wait; /* handle to wait on for blocking write */
2281 unsigned int options; /* device open options */
2282 data_size_t size; /* size written */
2283 @END
2286 /* Perform an ioctl on a file */
2287 @REQ(ioctl)
2288 ioctl_code_t code; /* ioctl code */
2289 async_data_t async; /* async I/O parameters */
2290 VARARG(in_data,bytes); /* ioctl input data */
2291 @REPLY
2292 obj_handle_t wait; /* handle to wait on for blocking ioctl */
2293 unsigned int options; /* device open options */
2294 VARARG(out_data,bytes); /* ioctl output data */
2295 @END
2298 /* Store results of an async irp */
2299 @REQ(set_irp_result)
2300 obj_handle_t handle; /* handle to the irp */
2301 unsigned int status; /* status of the irp */
2302 data_size_t size; /* result size (input or output depending on the operation) */
2303 VARARG(data,bytes); /* output data of the irp */
2304 @END
2307 /* Create a named pipe */
2308 @REQ(create_named_pipe)
2309 unsigned int access;
2310 unsigned int options;
2311 unsigned int sharing;
2312 unsigned int disposition;
2313 unsigned int maxinstances;
2314 unsigned int outsize;
2315 unsigned int insize;
2316 timeout_t timeout;
2317 unsigned int flags;
2318 VARARG(objattr,object_attributes); /* object attributes */
2319 @REPLY
2320 obj_handle_t handle; /* handle to the pipe */
2321 int created;
2322 @END
2324 /* flags in create_named_pipe and get_named_pipe_info */
2325 #define NAMED_PIPE_MESSAGE_STREAM_WRITE 0x0001
2326 #define NAMED_PIPE_MESSAGE_STREAM_READ 0x0002
2327 #define NAMED_PIPE_NONBLOCKING_MODE 0x0004
2328 #define NAMED_PIPE_SERVER_END 0x8000
2330 /* Set named pipe information by handle */
2331 @REQ(set_named_pipe_info)
2332 obj_handle_t handle;
2333 unsigned int flags;
2334 @END
2336 /* Create a window */
2337 @REQ(create_window)
2338 user_handle_t parent; /* parent window */
2339 user_handle_t owner; /* owner window */
2340 atom_t atom; /* class atom */
2341 mod_handle_t instance; /* module instance */
2342 int dpi; /* system DPI */
2343 int awareness; /* thread DPI awareness */
2344 unsigned int style; /* window style */
2345 unsigned int ex_style; /* window extended style */
2346 VARARG(class,unicode_str); /* class name */
2347 @REPLY
2348 user_handle_t handle; /* created window */
2349 user_handle_t parent; /* full handle of parent */
2350 user_handle_t owner; /* full handle of owner */
2351 int extra; /* number of extra bytes */
2352 client_ptr_t class_ptr; /* pointer to class in client address space */
2353 int dpi; /* window DPI if not per-monitor aware */
2354 int awareness; /* window DPI awareness */
2355 @END
2358 /* Destroy a window */
2359 @REQ(destroy_window)
2360 user_handle_t handle; /* handle to the window */
2361 @END
2364 /* Retrieve the desktop window for the current thread */
2365 @REQ(get_desktop_window)
2366 int force; /* force creation if it doesn't exist */
2367 @REPLY
2368 user_handle_t top_window; /* handle to the desktop window */
2369 user_handle_t msg_window; /* handle to the top-level HWND_MESSAGE parent */
2370 @END
2373 /* Set a window owner */
2374 @REQ(set_window_owner)
2375 user_handle_t handle; /* handle to the window */
2376 user_handle_t owner; /* new owner */
2377 @REPLY
2378 user_handle_t full_owner; /* full handle of new owner */
2379 user_handle_t prev_owner; /* full handle of previous owner */
2380 @END
2383 /* Get information from a window handle */
2384 @REQ(get_window_info)
2385 user_handle_t handle; /* handle to the window */
2386 @REPLY
2387 user_handle_t full_handle; /* full 32-bit handle */
2388 user_handle_t last_active; /* last active popup */
2389 process_id_t pid; /* process owning the window */
2390 thread_id_t tid; /* thread owning the window */
2391 atom_t atom; /* class atom */
2392 int is_unicode; /* ANSI or unicode */
2393 int dpi; /* window DPI */
2394 int awareness; /* DPI awareness */
2395 @END
2398 /* Set some information in a window */
2399 @REQ(set_window_info)
2400 unsigned short flags; /* flags for fields to set (see below) */
2401 short int is_unicode; /* ANSI or unicode */
2402 user_handle_t handle; /* handle to the window */
2403 unsigned int style; /* window style */
2404 unsigned int ex_style; /* window extended style */
2405 data_size_t extra_size; /* size to set in extra bytes */
2406 mod_handle_t instance; /* creator instance */
2407 lparam_t user_data; /* user-specific data */
2408 lparam_t extra_value; /* value to set in extra bytes or window id */
2409 int extra_offset; /* offset to set in extra bytes */
2410 @REPLY
2411 unsigned int old_style; /* old window style */
2412 unsigned int old_ex_style; /* old window extended style */
2413 mod_handle_t old_instance; /* old creator instance */
2414 lparam_t old_user_data; /* old user-specific data */
2415 lparam_t old_extra_value; /* old value in extra bytes */
2416 lparam_t old_id; /* old window id */
2417 @END
2418 #define SET_WIN_STYLE 0x01
2419 #define SET_WIN_EXSTYLE 0x02
2420 #define SET_WIN_ID 0x04
2421 #define SET_WIN_INSTANCE 0x08
2422 #define SET_WIN_USERDATA 0x10
2423 #define SET_WIN_EXTRA 0x20
2424 #define SET_WIN_UNICODE 0x40
2427 /* Set the parent of a window */
2428 @REQ(set_parent)
2429 user_handle_t handle; /* handle to the window */
2430 user_handle_t parent; /* handle to the parent */
2431 @REPLY
2432 user_handle_t old_parent; /* old parent window */
2433 user_handle_t full_parent; /* full handle of new parent */
2434 int dpi; /* new window DPI if not per-monitor aware */
2435 int awareness; /* new DPI awareness */
2436 @END
2439 /* Get a list of the window parents, up to the root of the tree */
2440 @REQ(get_window_parents)
2441 user_handle_t handle; /* handle to the window */
2442 @REPLY
2443 int count; /* total count of parents */
2444 VARARG(parents,user_handles); /* parent handles */
2445 @END
2448 /* Get a list of the window children */
2449 @REQ(get_window_children)
2450 obj_handle_t desktop; /* handle to desktop */
2451 user_handle_t parent; /* parent window */
2452 atom_t atom; /* class atom for the listed children */
2453 thread_id_t tid; /* thread owning the listed children */
2454 VARARG(class,unicode_str); /* class name */
2455 @REPLY
2456 int count; /* total count of children */
2457 VARARG(children,user_handles); /* children handles */
2458 @END
2461 /* Get a list of the window children that contain a given point */
2462 @REQ(get_window_children_from_point)
2463 user_handle_t parent; /* parent window */
2464 int x; /* point in parent coordinates */
2465 int y;
2466 int dpi; /* dpi for the point coordinates */
2467 @REPLY
2468 int count; /* total count of children */
2469 VARARG(children,user_handles); /* children handles */
2470 @END
2473 /* Get window tree information from a window handle */
2474 @REQ(get_window_tree)
2475 user_handle_t handle; /* handle to the window */
2476 @REPLY
2477 user_handle_t parent; /* parent window */
2478 user_handle_t owner; /* owner window */
2479 user_handle_t next_sibling; /* next sibling in Z-order */
2480 user_handle_t prev_sibling; /* prev sibling in Z-order */
2481 user_handle_t first_sibling; /* first sibling in Z-order */
2482 user_handle_t last_sibling; /* last sibling in Z-order */
2483 user_handle_t first_child; /* first child */
2484 user_handle_t last_child; /* last child */
2485 @END
2487 /* Set the position and Z order of a window */
2488 @REQ(set_window_pos)
2489 unsigned short swp_flags; /* SWP_* flags */
2490 unsigned short paint_flags; /* paint flags (see below) */
2491 user_handle_t handle; /* handle to the window */
2492 user_handle_t previous; /* previous window in Z order */
2493 rectangle_t window; /* window rectangle (in parent coords) */
2494 rectangle_t client; /* client rectangle (in parent coords) */
2495 VARARG(valid,rectangles); /* valid rectangles from WM_NCCALCSIZE (in parent coords) */
2496 @REPLY
2497 unsigned int new_style; /* new window style */
2498 unsigned int new_ex_style; /* new window extended style */
2499 user_handle_t surface_win; /* parent window that holds the surface */
2500 int needs_update; /* whether the surface region needs an update */
2501 @END
2502 #define SET_WINPOS_PAINT_SURFACE 0x01 /* window has a paintable surface */
2503 #define SET_WINPOS_PIXEL_FORMAT 0x02 /* window has a custom pixel format */
2505 /* Get the window and client rectangles of a window */
2506 @REQ(get_window_rectangles)
2507 user_handle_t handle; /* handle to the window */
2508 int relative; /* coords relative to (see below) */
2509 int dpi; /* DPI to map to, or zero for per-monitor DPI */
2510 @REPLY
2511 rectangle_t window; /* window rectangle */
2512 rectangle_t client; /* client rectangle */
2513 @END
2514 enum coords_relative
2516 COORDS_CLIENT, /* relative to client area */
2517 COORDS_WINDOW, /* relative to whole window area */
2518 COORDS_PARENT, /* relative to parent's client area */
2519 COORDS_SCREEN /* relative to screen origin */
2523 /* Get the window text */
2524 @REQ(get_window_text)
2525 user_handle_t handle; /* handle to the window */
2526 @REPLY
2527 data_size_t length; /* total length in WCHARs */
2528 VARARG(text,unicode_str); /* window text */
2529 @END
2532 /* Set the window text */
2533 @REQ(set_window_text)
2534 user_handle_t handle; /* handle to the window */
2535 VARARG(text,unicode_str); /* window text */
2536 @END
2539 /* Get the coordinates offset between two windows */
2540 @REQ(get_windows_offset)
2541 user_handle_t from; /* handle to the first window */
2542 user_handle_t to; /* handle to the second window */
2543 int dpi; /* DPI to map to, or zero for per-monitor DPI */
2544 @REPLY
2545 int x; /* x coordinate offset */
2546 int y; /* y coordinate offset */
2547 int mirror; /* whether to mirror the x coordinate */
2548 @END
2551 /* Get the visible region of a window */
2552 @REQ(get_visible_region)
2553 user_handle_t window; /* handle to the window */
2554 unsigned int flags; /* DCX flags */
2555 @REPLY
2556 user_handle_t top_win; /* top window to clip against */
2557 rectangle_t top_rect; /* top window visible rect with screen coords */
2558 rectangle_t win_rect; /* window rect in screen coords */
2559 unsigned int paint_flags; /* paint flags (from SET_WINPOS_* flags) */
2560 data_size_t total_size; /* total size of the resulting region */
2561 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2562 @END
2565 /* Get the visible surface region of a window */
2566 @REQ(get_surface_region)
2567 user_handle_t window; /* handle to the window */
2568 @REPLY
2569 rectangle_t visible_rect; /* window visible rect in screen coords */
2570 data_size_t total_size; /* total size of the resulting region */
2571 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2572 @END
2575 /* Get the window region */
2576 @REQ(get_window_region)
2577 user_handle_t window; /* handle to the window */
2578 @REPLY
2579 data_size_t total_size; /* total size of the resulting region */
2580 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2581 @END
2584 /* Set the window region */
2585 @REQ(set_window_region)
2586 user_handle_t window; /* handle to the window */
2587 int redraw; /* redraw the window? */
2588 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2589 @END
2592 /* Get the window update region */
2593 @REQ(get_update_region)
2594 user_handle_t window; /* handle to the window */
2595 user_handle_t from_child; /* child to start searching from */
2596 unsigned int flags; /* update flags (see below) */
2597 @REPLY
2598 user_handle_t child; /* child to repaint (or window itself) */
2599 unsigned int flags; /* resulting update flags (see below) */
2600 data_size_t total_size; /* total size of the resulting region */
2601 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2602 @END
2603 #define UPDATE_NONCLIENT 0x001 /* get region for repainting non-client area */
2604 #define UPDATE_ERASE 0x002 /* get region for erasing client area */
2605 #define UPDATE_PAINT 0x004 /* get region for painting client area */
2606 #define UPDATE_INTERNALPAINT 0x008 /* get region if internal paint is pending */
2607 #define UPDATE_ALLCHILDREN 0x010 /* force repaint of all children */
2608 #define UPDATE_NOCHILDREN 0x020 /* don't try to repaint any children */
2609 #define UPDATE_NOREGION 0x040 /* don't return a region, only the flags */
2610 #define UPDATE_DELAYED_ERASE 0x080 /* still needs erase after BeginPaint */
2611 #define UPDATE_CLIPCHILDREN 0x100 /* remove clipped children from the update region */
2614 /* Update the z order of a window so that a given rectangle is fully visible */
2615 @REQ(update_window_zorder)
2616 user_handle_t window; /* handle to the window */
2617 rectangle_t rect; /* rectangle that must be visible (in client coords) */
2618 @END
2621 /* Mark parts of a window as needing a redraw */
2622 @REQ(redraw_window)
2623 user_handle_t window; /* handle to the window */
2624 unsigned int flags; /* RDW_* flags */
2625 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2626 @END
2629 /* Set a window property */
2630 @REQ(set_window_property)
2631 user_handle_t window; /* handle to the window */
2632 lparam_t data; /* data to store */
2633 atom_t atom; /* property atom (if no name specified) */
2634 VARARG(name,unicode_str); /* property name */
2635 @END
2638 /* Remove a window property */
2639 @REQ(remove_window_property)
2640 user_handle_t window; /* handle to the window */
2641 atom_t atom; /* property atom (if no name specified) */
2642 VARARG(name,unicode_str); /* property name */
2643 @REPLY
2644 lparam_t data; /* data stored in property */
2645 @END
2648 /* Get a window property */
2649 @REQ(get_window_property)
2650 user_handle_t window; /* handle to the window */
2651 atom_t atom; /* property atom (if no name specified) */
2652 VARARG(name,unicode_str); /* property name */
2653 @REPLY
2654 lparam_t data; /* data stored in property */
2655 @END
2658 /* Get the list of properties of a window */
2659 @REQ(get_window_properties)
2660 user_handle_t window; /* handle to the window */
2661 @REPLY
2662 int total; /* total number of properties */
2663 VARARG(props,properties); /* list of properties */
2664 @END
2667 /* Create a window station */
2668 @REQ(create_winstation)
2669 unsigned int flags; /* window station flags */
2670 unsigned int access; /* wanted access rights */
2671 unsigned int attributes; /* object attributes */
2672 obj_handle_t rootdir; /* root directory */
2673 VARARG(name,unicode_str); /* object name */
2674 @REPLY
2675 obj_handle_t handle; /* handle to the window station */
2676 @END
2679 /* Open a handle to a window station */
2680 @REQ(open_winstation)
2681 unsigned int access; /* wanted access rights */
2682 unsigned int attributes; /* object attributes */
2683 obj_handle_t rootdir; /* root directory */
2684 VARARG(name,unicode_str); /* object name */
2685 @REPLY
2686 obj_handle_t handle; /* handle to the window station */
2687 @END
2690 /* Close a window station */
2691 @REQ(close_winstation)
2692 obj_handle_t handle; /* handle to the window station */
2693 @END
2696 /* Get the process current window station */
2697 @REQ(get_process_winstation)
2698 @REPLY
2699 obj_handle_t handle; /* handle to the window station */
2700 @END
2703 /* Set the process current window station */
2704 @REQ(set_process_winstation)
2705 obj_handle_t handle; /* handle to the window station */
2706 @END
2709 /* Enumerate window stations */
2710 @REQ(enum_winstation)
2711 unsigned int index; /* current index */
2712 @REPLY
2713 unsigned int next; /* next index */
2714 VARARG(name,unicode_str); /* window station name */
2715 @END
2718 /* Create a desktop */
2719 @REQ(create_desktop)
2720 unsigned int flags; /* desktop flags */
2721 unsigned int access; /* wanted access rights */
2722 unsigned int attributes; /* object attributes */
2723 VARARG(name,unicode_str); /* object name */
2724 @REPLY
2725 obj_handle_t handle; /* handle to the desktop */
2726 @END
2729 /* Open a handle to a desktop */
2730 @REQ(open_desktop)
2731 obj_handle_t winsta; /* window station to open (null allowed) */
2732 unsigned int flags; /* desktop flags */
2733 unsigned int access; /* wanted access rights */
2734 unsigned int attributes; /* object attributes */
2735 VARARG(name,unicode_str); /* object name */
2736 @REPLY
2737 obj_handle_t handle; /* handle to the desktop */
2738 @END
2741 /* Open a handle to current input desktop */
2742 @REQ(open_input_desktop)
2743 unsigned int flags; /* desktop flags */
2744 unsigned int access; /* wanted access rights */
2745 unsigned int attributes; /* object attributes */
2746 @REPLY
2747 obj_handle_t handle; /* handle to the desktop */
2748 @END
2751 /* Close a desktop */
2752 @REQ(close_desktop)
2753 obj_handle_t handle; /* handle to the desktop */
2754 @END
2757 /* Get the thread current desktop */
2758 @REQ(get_thread_desktop)
2759 thread_id_t tid; /* thread id */
2760 @REPLY
2761 obj_handle_t handle; /* handle to the desktop */
2762 @END
2765 /* Set the thread current desktop */
2766 @REQ(set_thread_desktop)
2767 obj_handle_t handle; /* handle to the desktop */
2768 @END
2771 /* Enumerate desktops */
2772 @REQ(enum_desktop)
2773 obj_handle_t winstation; /* handle to the window station */
2774 unsigned int index; /* current index */
2775 @REPLY
2776 unsigned int next; /* next index */
2777 VARARG(name,unicode_str); /* window station name */
2778 @END
2781 /* Get/set information about a user object (window station or desktop) */
2782 @REQ(set_user_object_info)
2783 obj_handle_t handle; /* handle to the object */
2784 unsigned int flags; /* information to set/get */
2785 unsigned int obj_flags; /* new object flags */
2786 @REPLY
2787 int is_desktop; /* is object a desktop? */
2788 unsigned int old_obj_flags; /* old object flags */
2789 VARARG(name,unicode_str); /* object name */
2790 @END
2791 #define SET_USER_OBJECT_SET_FLAGS 1
2792 #define SET_USER_OBJECT_GET_FULL_NAME 2
2795 /* Register a hotkey */
2796 @REQ(register_hotkey)
2797 user_handle_t window; /* handle to the window */
2798 int id; /* hotkey identifier */
2799 unsigned int flags; /* modifier keys */
2800 unsigned int vkey; /* virtual key code */
2801 @REPLY
2802 int replaced; /* did we replace an existing hotkey? */
2803 unsigned int flags; /* flags of replaced hotkey */
2804 unsigned int vkey; /* virtual key code of replaced hotkey */
2805 @END
2808 /* Unregister a hotkey */
2809 @REQ(unregister_hotkey)
2810 user_handle_t window; /* handle to the window */
2811 int id; /* hotkey identifier */
2812 @REPLY
2813 unsigned int flags; /* flags of removed hotkey */
2814 unsigned int vkey; /* virtual key code of removed hotkey */
2815 @END
2818 /* Attach (or detach) thread inputs */
2819 @REQ(attach_thread_input)
2820 thread_id_t tid_from; /* thread to be attached */
2821 thread_id_t tid_to; /* thread to which tid_from should be attached */
2822 int attach; /* is it an attach? */
2823 @END
2826 /* Get input data for a given thread */
2827 @REQ(get_thread_input)
2828 thread_id_t tid; /* id of thread */
2829 @REPLY
2830 user_handle_t focus; /* handle to the focus window */
2831 user_handle_t capture; /* handle to the capture window */
2832 user_handle_t active; /* handle to the active window */
2833 user_handle_t foreground; /* handle to the global foreground window */
2834 user_handle_t menu_owner; /* handle to the menu owner */
2835 user_handle_t move_size; /* handle to the moving/resizing window */
2836 user_handle_t caret; /* handle to the caret window */
2837 user_handle_t cursor; /* handle to the cursor */
2838 int show_count; /* cursor show count */
2839 rectangle_t rect; /* caret rectangle */
2840 @END
2843 /* Get the time of the last input event */
2844 @REQ(get_last_input_time)
2845 @REPLY
2846 unsigned int time;
2847 @END
2850 /* Retrieve queue keyboard state for current thread or global async state */
2851 @REQ(get_key_state)
2852 int async; /* whether to query the async state */
2853 int key; /* optional key code or -1 */
2854 @REPLY
2855 unsigned char state; /* state of specified key */
2856 VARARG(keystate,bytes); /* state array for all the keys */
2857 @END
2859 /* Set queue keyboard state for current thread */
2860 @REQ(set_key_state)
2861 int async; /* whether to change the async state too */
2862 VARARG(keystate,bytes); /* state array for all the keys */
2863 @END
2865 /* Set the system foreground window */
2866 @REQ(set_foreground_window)
2867 user_handle_t handle; /* handle to the foreground window */
2868 @REPLY
2869 user_handle_t previous; /* handle to the previous foreground window */
2870 int send_msg_old; /* whether we have to send a msg to the old window */
2871 int send_msg_new; /* whether we have to send a msg to the new window */
2872 @END
2874 /* Set the current thread focus window */
2875 @REQ(set_focus_window)
2876 user_handle_t handle; /* handle to the focus window */
2877 @REPLY
2878 user_handle_t previous; /* handle to the previous focus window */
2879 @END
2881 /* Set the current thread active window */
2882 @REQ(set_active_window)
2883 user_handle_t handle; /* handle to the active window */
2884 @REPLY
2885 user_handle_t previous; /* handle to the previous active window */
2886 @END
2888 /* Set the current thread capture window */
2889 @REQ(set_capture_window)
2890 user_handle_t handle; /* handle to the capture window */
2891 unsigned int flags; /* capture flags (see below) */
2892 @REPLY
2893 user_handle_t previous; /* handle to the previous capture window */
2894 user_handle_t full_handle; /* full 32-bit handle of new capture window */
2895 @END
2896 #define CAPTURE_MENU 0x01 /* capture is for a menu */
2897 #define CAPTURE_MOVESIZE 0x02 /* capture is for moving/resizing */
2900 /* Set the current thread caret window */
2901 @REQ(set_caret_window)
2902 user_handle_t handle; /* handle to the caret window */
2903 int width; /* caret width */
2904 int height; /* caret height */
2905 @REPLY
2906 user_handle_t previous; /* handle to the previous caret window */
2907 rectangle_t old_rect; /* previous caret rectangle */
2908 int old_hide; /* previous hide count */
2909 int old_state; /* previous caret state (1=on, 0=off) */
2910 @END
2913 /* Set the current thread caret information */
2914 @REQ(set_caret_info)
2915 unsigned int flags; /* caret flags (see below) */
2916 user_handle_t handle; /* handle to the caret window */
2917 int x; /* caret x position */
2918 int y; /* caret y position */
2919 int hide; /* increment for hide count (can be negative to show it) */
2920 int state; /* caret state (see below) */
2921 @REPLY
2922 user_handle_t full_handle; /* handle to the current caret window */
2923 rectangle_t old_rect; /* previous caret rectangle */
2924 int old_hide; /* previous hide count */
2925 int old_state; /* previous caret state (1=on, 0=off) */
2926 @END
2927 #define SET_CARET_POS 0x01 /* set the caret position from x,y */
2928 #define SET_CARET_HIDE 0x02 /* increment the caret hide count */
2929 #define SET_CARET_STATE 0x04 /* set the caret on/off state */
2930 enum caret_state
2932 CARET_STATE_OFF, /* off */
2933 CARET_STATE_ON, /* on */
2934 CARET_STATE_TOGGLE, /* toggle current state */
2935 CARET_STATE_ON_IF_MOVED /* on if the position differs, unchanged otherwise */
2939 /* Set a window hook */
2940 @REQ(set_hook)
2941 int id; /* id of the hook */
2942 process_id_t pid; /* id of process to set the hook into */
2943 thread_id_t tid; /* id of thread to set the hook into */
2944 int event_min;
2945 int event_max;
2946 client_ptr_t proc; /* hook procedure */
2947 int flags;
2948 int unicode; /* is it a unicode hook? */
2949 VARARG(module,unicode_str); /* module name */
2950 @REPLY
2951 user_handle_t handle; /* handle to the hook */
2952 unsigned int active_hooks; /* active hooks bitmap */
2953 @END
2956 /* Remove a window hook */
2957 @REQ(remove_hook)
2958 user_handle_t handle; /* handle to the hook */
2959 client_ptr_t proc; /* hook procedure if handle is 0 */
2960 int id; /* id of the hook if handle is 0 */
2961 @REPLY
2962 unsigned int active_hooks; /* active hooks bitmap */
2963 @END
2966 /* Start calling a hook chain */
2967 @REQ(start_hook_chain)
2968 int id; /* id of the hook */
2969 int event; /* signalled event */
2970 user_handle_t window; /* handle to the event window */
2971 int object_id; /* object id for out of context winevent */
2972 int child_id; /* child id for out of context winevent */
2973 @REPLY
2974 user_handle_t handle; /* handle to the next hook */
2975 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2976 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2977 int unicode; /* is it a unicode hook? */
2978 client_ptr_t proc; /* hook procedure */
2979 unsigned int active_hooks; /* active hooks bitmap */
2980 VARARG(module,unicode_str); /* module name */
2981 @END
2984 /* Finished calling a hook chain */
2985 @REQ(finish_hook_chain)
2986 int id; /* id of the hook */
2987 @END
2990 /* Get the hook information */
2991 @REQ(get_hook_info)
2992 user_handle_t handle; /* handle to the current hook */
2993 int get_next; /* do we want info about current or next hook? */
2994 int event; /* signalled event */
2995 user_handle_t window; /* handle to the event window */
2996 int object_id; /* object id for out of context winevent */
2997 int child_id; /* child id for out of context winevent */
2998 @REPLY
2999 user_handle_t handle; /* handle to the hook */
3000 int id; /* id of the hook */
3001 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
3002 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
3003 client_ptr_t proc; /* hook procedure */
3004 int unicode; /* is it a unicode hook? */
3005 VARARG(module,unicode_str); /* module name */
3006 @END
3009 /* Create a window class */
3010 @REQ(create_class)
3011 int local; /* is it a local class? */
3012 atom_t atom; /* class atom */
3013 unsigned int style; /* class style */
3014 mod_handle_t instance; /* module instance */
3015 int extra; /* number of extra class bytes */
3016 int win_extra; /* number of window extra bytes */
3017 client_ptr_t client_ptr; /* pointer to class in client address space */
3018 data_size_t name_offset; /* base class name offset for specified atom */
3019 VARARG(name,unicode_str); /* class name */
3020 @REPLY
3021 atom_t atom; /* resulting class atom */
3022 @END
3025 /* Destroy a window class */
3026 @REQ(destroy_class)
3027 atom_t atom; /* class atom */
3028 mod_handle_t instance; /* module instance */
3029 VARARG(name,unicode_str); /* class name */
3030 @REPLY
3031 client_ptr_t client_ptr; /* pointer to class in client address space */
3032 @END
3035 /* Set some information in a class */
3036 @REQ(set_class_info)
3037 user_handle_t window; /* handle to the window */
3038 unsigned int flags; /* flags for info to set (see below) */
3039 atom_t atom; /* class atom */
3040 unsigned int style; /* class style */
3041 int win_extra; /* number of window extra bytes */
3042 mod_handle_t instance; /* module instance */
3043 int extra_offset; /* offset to set in extra bytes */
3044 data_size_t extra_size; /* size to set in extra bytes */
3045 lparam_t extra_value; /* value to set in extra bytes */
3046 @REPLY
3047 atom_t old_atom; /* previous class atom */
3048 atom_t base_atom; /* base class atom */
3049 mod_handle_t old_instance; /* previous module instance */
3050 lparam_t old_extra_value; /* old value in extra bytes */
3051 unsigned int old_style; /* previous class style */
3052 int old_extra; /* previous number of class extra bytes */
3053 int old_win_extra; /* previous number of window extra bytes */
3054 @END
3055 #define SET_CLASS_ATOM 0x0001
3056 #define SET_CLASS_STYLE 0x0002
3057 #define SET_CLASS_WINEXTRA 0x0004
3058 #define SET_CLASS_INSTANCE 0x0008
3059 #define SET_CLASS_EXTRA 0x0010
3062 /* Open the clipboard */
3063 @REQ(open_clipboard)
3064 user_handle_t window; /* clipboard window */
3065 @REPLY
3066 user_handle_t owner; /* current clipboard owner */
3067 @END
3070 /* Close the clipboard */
3071 @REQ(close_clipboard)
3072 @REPLY
3073 user_handle_t viewer; /* first clipboard viewer */
3074 user_handle_t owner; /* current clipboard owner */
3075 @END
3078 /* Empty the clipboard and grab ownership */
3079 @REQ(empty_clipboard)
3080 @END
3083 /* Add a data format to the clipboard */
3084 @REQ(set_clipboard_data)
3085 unsigned int format; /* clipboard format of the data */
3086 unsigned int lcid; /* locale id to use for synthesizing text formats */
3087 VARARG(data,bytes); /* data contents */
3088 @REPLY
3089 unsigned int seqno; /* sequence number for the set data */
3090 @END
3093 /* Fetch a data format from the clipboard */
3094 @REQ(get_clipboard_data)
3095 unsigned int format; /* clipboard format of the data */
3096 int render; /* will we try to render it if missing? */
3097 int cached; /* do we already have it in the client-side cache? */
3098 unsigned int seqno; /* sequence number for the data in the cache */
3099 @REPLY
3100 unsigned int from; /* for synthesized data, format to generate it from */
3101 user_handle_t owner; /* clipboard owner for delayed-rendered formats */
3102 unsigned int seqno; /* sequence number for the originally set data */
3103 data_size_t total; /* total data size */
3104 VARARG(data,bytes); /* data contents */
3105 @END
3108 /* Retrieve a list of available formats */
3109 @REQ(get_clipboard_formats)
3110 unsigned int format; /* specific format to query, return all if 0 */
3111 @REPLY
3112 unsigned int count; /* count of available formats */
3113 VARARG(formats,uints); /* array of available formats */
3114 @END
3117 /* Retrieve the next available format */
3118 @REQ(enum_clipboard_formats)
3119 unsigned int previous; /* previous format, or first if 0 */
3120 @REPLY
3121 unsigned int format; /* next format */
3122 @END
3125 /* Release ownership of the clipboard */
3126 @REQ(release_clipboard)
3127 user_handle_t owner; /* clipboard owner to release */
3128 @REPLY
3129 user_handle_t viewer; /* first clipboard viewer */
3130 user_handle_t owner; /* current clipboard owner */
3131 @END
3134 /* Get clipboard information */
3135 @REQ(get_clipboard_info)
3136 @REPLY
3137 user_handle_t window; /* clipboard window */
3138 user_handle_t owner; /* clipboard owner */
3139 user_handle_t viewer; /* clipboard viewer */
3140 unsigned int seqno; /* current sequence number */
3141 @END
3144 /* Set the clipboard viewer window */
3145 @REQ(set_clipboard_viewer)
3146 user_handle_t viewer; /* clipboard viewer */
3147 user_handle_t previous; /* if non-zero, check that this was the previous viewer */
3148 @REPLY
3149 user_handle_t old_viewer; /* previous clipboard viewer */
3150 user_handle_t owner; /* clipboard owner */
3151 @END
3154 /* Add a clipboard listener window */
3155 @REQ(add_clipboard_listener)
3156 user_handle_t window; /* clipboard listener window */
3157 @END
3160 /* Remove a clipboard listener window */
3161 @REQ(remove_clipboard_listener)
3162 user_handle_t window; /* clipboard listener window */
3163 @END
3166 /* Open a security token */
3167 @REQ(open_token)
3168 obj_handle_t handle; /* handle to the thread or process */
3169 unsigned int access; /* access rights to the new token */
3170 unsigned int attributes;/* object attributes */
3171 unsigned int flags; /* flags (see below) */
3172 @REPLY
3173 obj_handle_t token; /* handle to the token */
3174 @END
3175 #define OPEN_TOKEN_THREAD 1
3176 #define OPEN_TOKEN_AS_SELF 2
3179 /* Set/get the global windows */
3180 @REQ(set_global_windows)
3181 unsigned int flags; /* flags for fields to set (see below) */
3182 user_handle_t shell_window; /* handle to the new shell window */
3183 user_handle_t shell_listview; /* handle to the new shell listview window */
3184 user_handle_t progman_window; /* handle to the new program manager window */
3185 user_handle_t taskman_window; /* handle to the new task manager window */
3186 @REPLY
3187 user_handle_t old_shell_window; /* handle to the shell window */
3188 user_handle_t old_shell_listview; /* handle to the shell listview window */
3189 user_handle_t old_progman_window; /* handle to the new program manager window */
3190 user_handle_t old_taskman_window; /* handle to the new task manager window */
3191 @END
3192 #define SET_GLOBAL_SHELL_WINDOWS 0x01 /* set both main shell and listview windows */
3193 #define SET_GLOBAL_PROGMAN_WINDOW 0x02
3194 #define SET_GLOBAL_TASKMAN_WINDOW 0x04
3196 /* Adjust the privileges held by a token */
3197 @REQ(adjust_token_privileges)
3198 obj_handle_t handle; /* handle to the token */
3199 int disable_all; /* disable all privileges? */
3200 int get_modified_state; /* get modified privileges? */
3201 VARARG(privileges,luid_attr); /* privileges to enable/disable/remove */
3202 @REPLY
3203 unsigned int len; /* total length in bytes required to store token privileges */
3204 VARARG(privileges,luid_attr); /* modified privileges */
3205 @END
3207 /* Retrieves the set of privileges held by or available to a token */
3208 @REQ(get_token_privileges)
3209 obj_handle_t handle; /* handle to the token */
3210 @REPLY
3211 unsigned int len; /* total length in bytes required to store token privileges */
3212 VARARG(privileges,luid_attr); /* privileges held by or available to a token */
3213 @END
3215 /* Check the token has the required privileges */
3216 @REQ(check_token_privileges)
3217 obj_handle_t handle; /* handle to the token */
3218 int all_required; /* are all the privileges required for the check to succeed? */
3219 VARARG(privileges,luid_attr); /* privileges to check */
3220 @REPLY
3221 int has_privileges; /* does the token have the required privileges? */
3222 VARARG(privileges,luid_attr); /* privileges held by or available to a token */
3223 @END
3225 @REQ(duplicate_token)
3226 obj_handle_t handle; /* handle to the token to duplicate */
3227 unsigned int access; /* access rights to the new token */
3228 int primary; /* is the new token to be a primary one? */
3229 int impersonation_level; /* impersonation level of the new token */
3230 VARARG(objattr,object_attributes); /* object attributes */
3231 @REPLY
3232 obj_handle_t new_handle; /* duplicated handle */
3233 @END
3235 @REQ(filter_token)
3236 obj_handle_t handle; /* handle to the token to duplicate */
3237 unsigned int flags; /* flags */
3238 data_size_t privileges_size; /* size of privileges */
3239 VARARG(privileges,luid_attr,privileges_size); /* privileges to remove from new token */
3240 VARARG(disable_sids,sid); /* array of groups to remove from new token */
3241 @REPLY
3242 obj_handle_t new_handle; /* filtered handle */
3243 @END
3245 @REQ(access_check)
3246 obj_handle_t handle; /* handle to the token */
3247 unsigned int desired_access; /* desired access to the object */
3248 generic_map_t mapping; /* mapping to specific rights */
3249 VARARG(sd,security_descriptor); /* security descriptor to check */
3250 @REPLY
3251 unsigned int access_granted; /* access rights actually granted */
3252 unsigned int access_status; /* was access granted? */
3253 unsigned int privileges_len; /* length needed to store privileges */
3254 VARARG(privileges,luid_attr); /* privileges used during access check */
3255 @END
3257 @REQ(get_token_sid)
3258 obj_handle_t handle; /* handle to the token */
3259 unsigned int which_sid; /* which SID to retrieve from the token */
3260 @REPLY
3261 data_size_t sid_len; /* length needed to store sid */
3262 VARARG(sid,sid); /* the sid specified by which_sid from the token */
3263 @END
3265 @REQ(get_token_groups)
3266 obj_handle_t handle; /* handle to the token */
3267 unsigned int attr_mask; /* mask for wanted attributes */
3268 @REPLY
3269 data_size_t attr_len; /* length needed to store attrs */
3270 data_size_t sid_len; /* length needed to store sids */
3271 VARARG(attrs,uints,attr_len); /* group attributes */
3272 VARARG(sids,sids); /* group sids */
3273 @END
3275 @REQ(get_token_default_dacl)
3276 obj_handle_t handle; /* handle to the token */
3277 @REPLY
3278 data_size_t acl_len; /* length needed to store access control list */
3279 VARARG(acl,acl); /* access control list */
3280 @END
3282 @REQ(set_token_default_dacl)
3283 obj_handle_t handle; /* handle to the token */
3284 VARARG(acl,acl); /* default dacl to set */
3285 @END
3287 @REQ(set_security_object)
3288 obj_handle_t handle; /* handle to the object */
3289 unsigned int security_info; /* which parts of security descriptor to set */
3290 VARARG(sd,security_descriptor); /* security descriptor to set */
3291 @END
3293 @REQ(get_security_object)
3294 obj_handle_t handle; /* handle to the object */
3295 unsigned int security_info; /* which parts of security descriptor to get */
3296 @REPLY
3297 unsigned int sd_len; /* buffer size needed for sd */
3298 VARARG(sd,security_descriptor); /* retrieved security descriptor */
3299 @END
3302 struct handle_info
3304 process_id_t owner;
3305 obj_handle_t handle;
3306 unsigned int access;
3307 unsigned int attributes;
3308 unsigned int type;
3311 /* Return a list of all opened handles */
3312 @REQ(get_system_handles)
3313 @REPLY
3314 unsigned int count; /* number of handles */
3315 VARARG(data,handle_infos); /* array of handle_infos */
3316 @END
3319 /* Create a mailslot */
3320 @REQ(create_mailslot)
3321 unsigned int access; /* wanted access rights */
3322 timeout_t read_timeout;
3323 unsigned int max_msgsize;
3324 VARARG(objattr,object_attributes); /* object attributes */
3325 @REPLY
3326 obj_handle_t handle; /* handle to the mailslot */
3327 @END
3330 /* Set mailslot information */
3331 @REQ(set_mailslot_info)
3332 obj_handle_t handle; /* handle to the mailslot */
3333 timeout_t read_timeout;
3334 unsigned int flags;
3335 @REPLY
3336 timeout_t read_timeout;
3337 unsigned int max_msgsize;
3338 @END
3339 #define MAILSLOT_SET_READ_TIMEOUT 1
3342 /* Create a directory object */
3343 @REQ(create_directory)
3344 unsigned int access; /* access flags */
3345 VARARG(objattr,object_attributes); /* object attributes */
3346 @REPLY
3347 obj_handle_t handle; /* handle to the directory */
3348 @END
3351 /* Open a directory object */
3352 @REQ(open_directory)
3353 unsigned int access; /* access flags */
3354 unsigned int attributes; /* object attributes */
3355 obj_handle_t rootdir; /* root directory */
3356 VARARG(directory_name,unicode_str); /* Directory name */
3357 @REPLY
3358 obj_handle_t handle; /* handle to the directory */
3359 @END
3362 /* Get a directory entry by index */
3363 @REQ(get_directory_entry)
3364 obj_handle_t handle; /* handle to the directory */
3365 unsigned int index; /* entry index */
3366 @REPLY
3367 data_size_t total_len; /* total length needed for strings */
3368 data_size_t name_len; /* length of the entry name in bytes */
3369 VARARG(name,unicode_str,name_len); /* entry name */
3370 VARARG(type,unicode_str); /* entry type */
3371 @END
3374 /* Create a symbolic link object */
3375 @REQ(create_symlink)
3376 unsigned int access; /* access flags */
3377 VARARG(objattr,object_attributes); /* object attributes */
3378 VARARG(target_name,unicode_str); /* target name */
3379 @REPLY
3380 obj_handle_t handle; /* handle to the symlink */
3381 @END
3384 /* Open a symbolic link object */
3385 @REQ(open_symlink)
3386 unsigned int access; /* access flags */
3387 unsigned int attributes; /* object attributes */
3388 obj_handle_t rootdir; /* root directory */
3389 VARARG(name,unicode_str); /* symlink name */
3390 @REPLY
3391 obj_handle_t handle; /* handle to the symlink */
3392 @END
3395 /* Query a symbolic link object */
3396 @REQ(query_symlink)
3397 obj_handle_t handle; /* handle to the symlink */
3398 @REPLY
3399 data_size_t total; /* total needed size for name */
3400 VARARG(target_name,unicode_str); /* target name */
3401 @END
3404 /* Query basic object information */
3405 @REQ(get_object_info)
3406 obj_handle_t handle; /* handle to the object */
3407 @REPLY
3408 unsigned int access; /* granted access mask */
3409 unsigned int ref_count; /* object ref count */
3410 unsigned int handle_count; /* object handle count */
3411 @END
3414 /* Query the full name of an object */
3415 @REQ(get_object_name)
3416 obj_handle_t handle; /* handle to the object */
3417 @REPLY
3418 data_size_t total; /* total needed size for name */
3419 VARARG(name,unicode_str); /* object name */
3420 @END
3423 /* Query object type name information */
3424 @REQ(get_object_type)
3425 obj_handle_t handle; /* handle to the object */
3426 @REPLY
3427 VARARG(info,object_type_info); /* type information */
3428 @END
3431 /* Query type information for all types */
3432 @REQ(get_object_types)
3433 @REPLY
3434 int count; /* total count of object types */
3435 VARARG(info,object_types_info); /* type information */
3436 @END
3439 /* Allocate a locally-unique identifier */
3440 @REQ(allocate_locally_unique_id)
3441 @REPLY
3442 struct luid luid;
3443 @END
3446 /* Create a device manager */
3447 @REQ(create_device_manager)
3448 unsigned int access; /* wanted access rights */
3449 unsigned int attributes; /* object attributes */
3450 @REPLY
3451 obj_handle_t handle; /* handle to the device */
3452 @END
3455 /* Create a device */
3456 @REQ(create_device)
3457 obj_handle_t rootdir; /* root directory */
3458 client_ptr_t user_ptr; /* opaque ptr for use by client */
3459 obj_handle_t manager; /* device manager */
3460 VARARG(name,unicode_str); /* object name */
3461 @END
3464 /* Delete a device */
3465 @REQ(delete_device)
3466 obj_handle_t manager; /* handle to the device manager */
3467 client_ptr_t device; /* pointer to the device */
3468 @END
3471 /* Retrieve the next pending device irp request */
3472 @REQ(get_next_device_request)
3473 obj_handle_t manager; /* handle to the device manager */
3474 obj_handle_t prev; /* handle to the previous irp */
3475 unsigned int status; /* status of the previous irp */
3476 client_ptr_t user_ptr; /* user pointer of the previous irp */
3477 int pending; /* was the previous irp marked pending? */
3478 unsigned int iosb_status; /* IOSB status of the previous irp */
3479 data_size_t result; /* IOSB result of the previous irp */
3480 VARARG(data,bytes); /* output data of the previous irp */
3481 @REPLY
3482 irp_params_t params; /* irp parameters */
3483 obj_handle_t next; /* handle to the next irp */
3484 thread_id_t client_tid; /* tid of thread calling irp */
3485 client_ptr_t client_thread; /* pointer to thread object of calling irp */
3486 data_size_t in_size; /* total needed input size */
3487 VARARG(next_data,bytes); /* input data of the next irp */
3488 @END
3491 /* Get kernel pointer from server object */
3492 @REQ(get_kernel_object_ptr)
3493 obj_handle_t manager; /* handle to the device manager */
3494 obj_handle_t handle; /* object handle */
3495 @REPLY
3496 client_ptr_t user_ptr; /* kernel object pointer */
3497 @END
3500 /* Associate kernel pointer with server object */
3501 @REQ(set_kernel_object_ptr)
3502 obj_handle_t manager; /* handle to the device manager */
3503 obj_handle_t handle; /* object handle */
3504 client_ptr_t user_ptr; /* kernel object pointer */
3505 @END
3508 /* Grab server object reference from kernel object pointer */
3509 @REQ(grab_kernel_object)
3510 obj_handle_t manager; /* handle to the device manager */
3511 client_ptr_t user_ptr; /* kernel object pointer */
3512 @END
3515 /* Release server object reference from kernel object pointer */
3516 @REQ(release_kernel_object)
3517 obj_handle_t manager; /* handle to the device manager */
3518 client_ptr_t user_ptr; /* kernel object pointer */
3519 @END
3522 /* Get handle from kernel object pointer */
3523 @REQ(get_kernel_object_handle)
3524 obj_handle_t manager; /* handle to the device manager */
3525 client_ptr_t user_ptr; /* kernel object pointer */
3526 unsigned int access; /* wanted access rights */
3527 @REPLY
3528 obj_handle_t handle; /* kernel object handle */
3529 @END
3532 /* Make the current process a system process */
3533 @REQ(make_process_system)
3534 obj_handle_t handle; /* handle to the process */
3535 @REPLY
3536 obj_handle_t event; /* event signaled when all user processes have exited */
3537 @END
3540 /* Get detailed fixed-size information about a token */
3541 @REQ(get_token_info)
3542 obj_handle_t handle; /* handle to the object */
3543 @REPLY
3544 struct luid token_id; /* locally-unique identifier of the token */
3545 struct luid modified_id; /* locally-unique identifier of the modified version of the token */
3546 unsigned int session_id; /* token session id */
3547 int primary; /* is the token primary or impersonation? */
3548 int impersonation_level; /* level of impersonation */
3549 int elevation; /* elevation type */
3550 int group_count; /* the number of groups the token is a member of */
3551 int privilege_count; /* the number of privileges the token has */
3552 @END
3555 /* Create a token which is an elevation counterpart to this token */
3556 @REQ(create_linked_token)
3557 obj_handle_t handle; /* handle to the token */
3558 @REPLY
3559 obj_handle_t linked; /* handle to the linked token */
3560 @END
3563 /* Create I/O completion port */
3564 @REQ(create_completion)
3565 unsigned int access; /* desired access to a port */
3566 unsigned int concurrent; /* max number of concurrent active threads */
3567 VARARG(objattr,object_attributes); /* object attributes */
3568 @REPLY
3569 obj_handle_t handle; /* port handle */
3570 @END
3573 /* Open I/O completion port */
3574 @REQ(open_completion)
3575 unsigned int access; /* desired access to a port */
3576 unsigned int attributes; /* object attributes */
3577 obj_handle_t rootdir; /* root directory */
3578 VARARG(filename,unicode_str); /* port name */
3579 @REPLY
3580 obj_handle_t handle; /* port handle */
3581 @END
3584 /* add completion to completion port */
3585 @REQ(add_completion)
3586 obj_handle_t handle; /* port handle */
3587 apc_param_t ckey; /* completion key */
3588 apc_param_t cvalue; /* completion value */
3589 apc_param_t information; /* IO_STATUS_BLOCK Information */
3590 unsigned int status; /* completion result */
3591 @END
3594 /* get completion from completion port queue */
3595 @REQ(remove_completion)
3596 obj_handle_t handle; /* port handle */
3597 @REPLY
3598 apc_param_t ckey; /* completion key */
3599 apc_param_t cvalue; /* completion value */
3600 apc_param_t information; /* IO_STATUS_BLOCK Information */
3601 unsigned int status; /* completion result */
3602 @END
3605 /* get completion queue depth */
3606 @REQ(query_completion)
3607 obj_handle_t handle; /* port handle */
3608 @REPLY
3609 unsigned int depth; /* completion queue depth */
3610 @END
3613 /* associate object with completion port */
3614 @REQ(set_completion_info)
3615 obj_handle_t handle; /* object handle */
3616 apc_param_t ckey; /* completion key */
3617 obj_handle_t chandle; /* port handle */
3618 @END
3621 /* check for associated completion and push msg */
3622 @REQ(add_fd_completion)
3623 obj_handle_t handle; /* async' object */
3624 apc_param_t cvalue; /* completion value */
3625 apc_param_t information; /* IO_STATUS_BLOCK Information */
3626 unsigned int status; /* completion status */
3627 int async; /* completion is an async result */
3628 @END
3631 /* set fd completion information */
3632 @REQ(set_fd_completion_mode)
3633 obj_handle_t handle; /* handle to a file or directory */
3634 unsigned int flags; /* completion notification flags */
3635 @END
3638 /* set fd disposition information */
3639 @REQ(set_fd_disp_info)
3640 obj_handle_t handle; /* handle to a file or directory */
3641 int unlink; /* whether to unlink file on close */
3642 @END
3645 /* set fd name information */
3646 @REQ(set_fd_name_info)
3647 obj_handle_t handle; /* handle to a file or directory */
3648 obj_handle_t rootdir; /* root directory */
3649 data_size_t namelen; /* length of NT name in bytes */
3650 int link; /* link instead of renaming */
3651 int replace; /* replace an existing file? */
3652 VARARG(name,unicode_str,namelen); /* NT name */
3653 VARARG(filename,string); /* new file name */
3654 @END
3657 /* set fd eof information */
3658 @REQ(set_fd_eof_info)
3659 obj_handle_t handle; /* handle to a file or directory */
3660 file_pos_t eof; /* offset of eof of file */
3661 @END
3664 /* Retrieve layered info for a window */
3665 @REQ(get_window_layered_info)
3666 user_handle_t handle; /* handle to the window */
3667 @REPLY
3668 unsigned int color_key; /* color key */
3669 unsigned int alpha; /* alpha (0..255) */
3670 unsigned int flags; /* LWA_* flags */
3671 @END
3674 /* Set layered info for a window */
3675 @REQ(set_window_layered_info)
3676 user_handle_t handle; /* handle to the window */
3677 unsigned int color_key; /* color key */
3678 unsigned int alpha; /* alpha (0..255) */
3679 unsigned int flags; /* LWA_* flags */
3680 @END
3683 /* Allocate an arbitrary user handle */
3684 @REQ(alloc_user_handle)
3685 @REPLY
3686 user_handle_t handle; /* allocated handle */
3687 @END
3690 /* Free an arbitrary user handle */
3691 @REQ(free_user_handle)
3692 user_handle_t handle; /* handle to free*/
3693 @END
3696 /* Set/get the current cursor */
3697 @REQ(set_cursor)
3698 unsigned int flags; /* flags for fields to set (see below) */
3699 user_handle_t handle; /* handle to the cursor */
3700 int show_count; /* show count increment/decrement */
3701 int x; /* cursor position */
3702 int y;
3703 rectangle_t clip; /* cursor clip rectangle */
3704 @REPLY
3705 user_handle_t prev_handle; /* previous handle */
3706 int prev_count; /* previous show count */
3707 int prev_x; /* previous position */
3708 int prev_y;
3709 int new_x; /* new position */
3710 int new_y;
3711 rectangle_t new_clip; /* new clip rectangle */
3712 unsigned int last_change; /* time of last position change */
3713 @END
3714 #define SET_CURSOR_HANDLE 0x01
3715 #define SET_CURSOR_COUNT 0x02
3716 #define SET_CURSOR_POS 0x04
3717 #define SET_CURSOR_CLIP 0x08
3718 #define SET_CURSOR_NOCLIP 0x10
3720 /* Get the history of the 64 last cursor positions */
3721 @REQ(get_cursor_history)
3722 @REPLY
3723 VARARG(history,cursor_positions);
3724 @END
3727 /* Batch read rawinput message data */
3728 @REQ(get_rawinput_buffer)
3729 data_size_t rawinput_size; /* size of RAWINPUT structure */
3730 data_size_t buffer_size; /* size of output buffer */
3731 @REPLY
3732 data_size_t next_size; /* minimum size to get next message data */
3733 unsigned int count;
3734 VARARG(data,bytes);
3735 @END
3737 /* Modify the list of registered rawinput devices */
3738 @REQ(update_rawinput_devices)
3739 VARARG(devices,rawinput_devices);
3740 @END
3742 /* Create a new job object */
3743 @REQ(create_job)
3744 unsigned int access; /* wanted access rights */
3745 VARARG(objattr,object_attributes); /* object attributes */
3746 @REPLY
3747 obj_handle_t handle; /* handle to the job */
3748 @END
3751 /* Open a job object */
3752 @REQ(open_job)
3753 unsigned int access; /* wanted access rights */
3754 unsigned int attributes; /* object attributes */
3755 obj_handle_t rootdir; /* root directory */
3756 VARARG(name,unicode_str); /* object name */
3757 @REPLY
3758 obj_handle_t handle; /* handle to the job */
3759 @END
3762 /* Assign a job object to a process */
3763 @REQ(assign_job)
3764 obj_handle_t job; /* handle to the job */
3765 obj_handle_t process; /* handle to the process */
3766 @END
3769 /* Check if a process is associated with a job */
3770 @REQ(process_in_job)
3771 obj_handle_t job; /* handle to the job */
3772 obj_handle_t process; /* handle to the process */
3773 @END
3776 /* Set limit flags on a job */
3777 @REQ(set_job_limits)
3778 obj_handle_t handle; /* handle to the job */
3779 unsigned int limit_flags; /* new limit flags */
3780 @END
3783 /* Set new completion port for a job */
3784 @REQ(set_job_completion_port)
3785 obj_handle_t job; /* handle to the job */
3786 obj_handle_t port; /* handle to the completion port */
3787 client_ptr_t key; /* key to send with completion messages */
3788 @END
3791 /* Retrieve information about a job */
3792 @REQ(get_job_info)
3793 obj_handle_t handle; /* handle to the job */
3794 @REPLY
3795 int total_processes; /* total count of processes */
3796 int active_processes; /* count of running processes */
3797 VARARG(pids,uints); /* list of active pids */
3798 @END
3801 /* Terminate all processes associated with the job */
3802 @REQ(terminate_job)
3803 obj_handle_t handle; /* handle to the job */
3804 int status; /* process exit code */
3805 @END
3808 /* Suspend a process */
3809 @REQ(suspend_process)
3810 obj_handle_t handle; /* process handle */
3811 @END
3814 /* Resume a process */
3815 @REQ(resume_process)
3816 obj_handle_t handle; /* process handle */
3817 @END
3820 /* Iterate thread list for process */
3821 @REQ(get_next_thread)
3822 obj_handle_t process; /* process handle */
3823 obj_handle_t last; /* thread handle to start with */
3824 unsigned int access; /* desired access for returned handle */
3825 unsigned int attributes; /* returned handle attributes */
3826 unsigned int flags; /* controls iteration direction */
3827 @REPLY
3828 obj_handle_t handle; /* next thread handle */
3829 @END