localspl: Add support for PRINTER_ATTRIBUTE_RAW_ONLY printer attribute.
[wine.git] / server / protocol.def
blobc857f72ce687a33c0fe255b748ac515f7048846b
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 } wait;
476 struct
478 enum select_op op; /* SELECT_SIGNAL_AND_WAIT */
479 obj_handle_t wait;
480 obj_handle_t signal; /* must be last in the structure so we can remove it on retries */
481 } signal_and_wait;
482 struct
484 enum select_op op; /* SELECT_KEYED_EVENT_WAIT or SELECT_KEYED_EVENT_RELEASE */
485 obj_handle_t handle;
486 client_ptr_t key;
487 } keyed_event;
488 } select_op_t;
490 enum apc_type
492 APC_NONE,
493 APC_USER,
494 APC_ASYNC_IO,
495 APC_VIRTUAL_ALLOC,
496 APC_VIRTUAL_ALLOC_EX,
497 APC_VIRTUAL_FREE,
498 APC_VIRTUAL_QUERY,
499 APC_VIRTUAL_PROTECT,
500 APC_VIRTUAL_FLUSH,
501 APC_VIRTUAL_LOCK,
502 APC_VIRTUAL_UNLOCK,
503 APC_MAP_VIEW,
504 APC_UNMAP_VIEW,
505 APC_CREATE_THREAD,
506 APC_DUP_HANDLE
509 typedef struct
511 enum apc_type type; /* APC_USER */
512 int __pad;
513 client_ptr_t func; /* void (__stdcall *func)(ULONG_PTR,ULONG_PTR,ULONG_PTR); */
514 apc_param_t args[3]; /* arguments for user function */
515 } user_apc_t;
517 typedef union
519 enum apc_type type;
520 user_apc_t user;
521 struct
523 enum apc_type type; /* APC_ASYNC_IO */
524 unsigned int status; /* I/O status */
525 client_ptr_t user; /* user pointer */
526 client_ptr_t sb; /* status block */
527 data_size_t result; /* result size */
528 } async_io;
529 struct
531 enum apc_type type; /* APC_VIRTUAL_ALLOC */
532 unsigned int op_type; /* type of operation */
533 client_ptr_t addr; /* requested address */
534 mem_size_t size; /* allocation size */
535 mem_size_t zero_bits; /* number of zero high bits */
536 unsigned int prot; /* memory protection flags */
537 } virtual_alloc;
538 struct
540 enum apc_type type; /* APC_VIRTUAL_ALLOC */
541 unsigned int op_type; /* type of operation */
542 client_ptr_t addr; /* requested address */
543 mem_size_t size; /* allocation size */
544 mem_size_t limit; /* allocation address limit */
545 mem_size_t align; /* allocation alignment */
546 unsigned int prot; /* memory protection flags */
547 } virtual_alloc_ex;
548 struct
550 enum apc_type type; /* APC_VIRTUAL_FREE */
551 unsigned int op_type; /* type of operation */
552 client_ptr_t addr; /* requested address */
553 mem_size_t size; /* allocation size */
554 } virtual_free;
555 struct
557 enum apc_type type; /* APC_VIRTUAL_QUERY */
558 int __pad;
559 client_ptr_t addr; /* requested address */
560 } virtual_query;
561 struct
563 enum apc_type type; /* APC_VIRTUAL_PROTECT */
564 unsigned int prot; /* new protection flags */
565 client_ptr_t addr; /* requested address */
566 mem_size_t size; /* requested size */
567 } virtual_protect;
568 struct
570 enum apc_type type; /* APC_VIRTUAL_FLUSH */
571 int __pad;
572 client_ptr_t addr; /* requested address */
573 mem_size_t size; /* requested size */
574 } virtual_flush;
575 struct
577 enum apc_type type; /* APC_VIRTUAL_LOCK */
578 int __pad;
579 client_ptr_t addr; /* requested address */
580 mem_size_t size; /* requested size */
581 } virtual_lock;
582 struct
584 enum apc_type type; /* APC_VIRTUAL_UNLOCK */
585 int __pad;
586 client_ptr_t addr; /* requested address */
587 mem_size_t size; /* requested size */
588 } virtual_unlock;
589 struct
591 enum apc_type type; /* APC_MAP_VIEW */
592 obj_handle_t handle; /* mapping handle */
593 client_ptr_t addr; /* requested address */
594 mem_size_t size; /* allocation size */
595 file_pos_t offset; /* file offset */
596 mem_size_t zero_bits; /* number of zero high bits */
597 unsigned int alloc_type; /* allocation type */
598 unsigned int prot; /* memory protection flags */
599 } map_view;
600 struct
602 enum apc_type type; /* APC_UNMAP_VIEW */
603 int __pad;
604 client_ptr_t addr; /* view address */
605 } unmap_view;
606 struct
608 enum apc_type type; /* APC_CREATE_THREAD */
609 unsigned int flags; /* creation flags */
610 client_ptr_t func; /* void (__stdcall *func)(void*); start function */
611 client_ptr_t arg; /* argument for start function */
612 mem_size_t zero_bits; /* number of zero high bits for thread stack */
613 mem_size_t reserve; /* reserve size for thread stack */
614 mem_size_t commit; /* commit size for thread stack */
615 } create_thread;
616 struct
618 enum apc_type type; /* APC_DUP_HANDLE */
619 obj_handle_t src_handle; /* src handle to duplicate */
620 obj_handle_t dst_process; /* dst process handle */
621 unsigned int access; /* wanted access rights */
622 unsigned int attributes; /* object attributes */
623 unsigned int options; /* duplicate options */
624 } dup_handle;
625 } apc_call_t;
627 typedef union
629 enum apc_type type;
630 struct
632 enum apc_type type; /* APC_ASYNC_IO */
633 unsigned int status; /* new status of async operation */
634 unsigned int total; /* bytes transferred */
635 } async_io;
636 struct
638 enum apc_type type; /* APC_VIRTUAL_ALLOC */
639 unsigned int status; /* status returned by call */
640 client_ptr_t addr; /* resulting address */
641 mem_size_t size; /* resulting size */
642 } virtual_alloc;
643 struct
645 enum apc_type type; /* APC_VIRTUAL_ALLOC */
646 unsigned int status; /* status returned by call */
647 client_ptr_t addr; /* resulting address */
648 mem_size_t size; /* resulting size */
649 } virtual_alloc_ex;
650 struct
652 enum apc_type type; /* APC_VIRTUAL_FREE */
653 unsigned int status; /* status returned by call */
654 client_ptr_t addr; /* resulting address */
655 mem_size_t size; /* resulting size */
656 } virtual_free;
657 struct
659 enum apc_type type; /* APC_VIRTUAL_QUERY */
660 unsigned int status; /* status returned by call */
661 client_ptr_t base; /* resulting base address */
662 client_ptr_t alloc_base;/* resulting allocation base */
663 mem_size_t size; /* resulting region size */
664 unsigned short state; /* resulting region state */
665 unsigned short prot; /* resulting region protection */
666 unsigned short alloc_prot;/* resulting allocation protection */
667 unsigned short alloc_type;/* resulting region allocation type */
668 } virtual_query;
669 struct
671 enum apc_type type; /* APC_VIRTUAL_PROTECT */
672 unsigned int status; /* status returned by call */
673 client_ptr_t addr; /* resulting address */
674 mem_size_t size; /* resulting size */
675 unsigned int prot; /* old protection flags */
676 } virtual_protect;
677 struct
679 enum apc_type type; /* APC_VIRTUAL_FLUSH */
680 unsigned int status; /* status returned by call */
681 client_ptr_t addr; /* resulting address */
682 mem_size_t size; /* resulting size */
683 } virtual_flush;
684 struct
686 enum apc_type type; /* APC_VIRTUAL_LOCK */
687 unsigned int status; /* status returned by call */
688 client_ptr_t addr; /* resulting address */
689 mem_size_t size; /* resulting size */
690 } virtual_lock;
691 struct
693 enum apc_type type; /* APC_VIRTUAL_UNLOCK */
694 unsigned int status; /* status returned by call */
695 client_ptr_t addr; /* resulting address */
696 mem_size_t size; /* resulting size */
697 } virtual_unlock;
698 struct
700 enum apc_type type; /* APC_MAP_VIEW */
701 unsigned int status; /* status returned by call */
702 client_ptr_t addr; /* resulting address */
703 mem_size_t size; /* resulting size */
704 } map_view;
705 struct
707 enum apc_type type; /* APC_UNMAP_VIEW */
708 unsigned int status; /* status returned by call */
709 } unmap_view;
710 struct
712 enum apc_type type; /* APC_CREATE_THREAD */
713 unsigned int status; /* status returned by call */
714 process_id_t pid; /* process id */
715 thread_id_t tid; /* thread id */
716 client_ptr_t teb; /* thread teb (in process address space) */
717 obj_handle_t handle; /* handle to new thread */
718 } create_thread;
719 struct
721 enum apc_type type; /* APC_DUP_HANDLE */
722 unsigned int status; /* status returned by call */
723 obj_handle_t handle; /* duplicated handle in dst process */
724 } dup_handle;
725 struct
727 enum apc_type type; /* APC_BREAK_PROCESS */
728 unsigned int status; /* status returned by call */
729 } break_process;
730 } apc_result_t;
732 enum irp_type
734 IRP_CALL_NONE,
735 IRP_CALL_CREATE,
736 IRP_CALL_CLOSE,
737 IRP_CALL_READ,
738 IRP_CALL_WRITE,
739 IRP_CALL_FLUSH,
740 IRP_CALL_IOCTL,
741 IRP_CALL_VOLUME,
742 IRP_CALL_FREE,
743 IRP_CALL_CANCEL
746 typedef union
748 enum irp_type type; /* irp call type */
749 struct
751 enum irp_type type; /* IRP_CALL_CREATE */
752 unsigned int access; /* access rights */
753 unsigned int sharing; /* sharing flags */
754 unsigned int options; /* file options */
755 client_ptr_t device; /* opaque ptr for the device */
756 obj_handle_t file; /* file handle */
757 } create;
758 struct
760 enum irp_type type; /* IRP_CALL_CLOSE */
761 int __pad;
762 client_ptr_t file; /* opaque ptr for the file object */
763 } close;
764 struct
766 enum irp_type type; /* IRP_CALL_READ */
767 unsigned int key; /* driver key */
768 data_size_t out_size; /* needed output size */
769 int __pad;
770 client_ptr_t file; /* opaque ptr for the file object */
771 file_pos_t pos; /* file position */
772 } read;
773 struct
775 enum irp_type type; /* IRP_CALL_WRITE */
776 unsigned int key; /* driver key */
777 client_ptr_t file; /* opaque ptr for the file object */
778 file_pos_t pos; /* file position */
779 } write;
780 struct
782 enum irp_type type; /* IRP_CALL_FLUSH */
783 int __pad;
784 client_ptr_t file; /* opaque ptr for the file object */
785 } flush;
786 struct
788 enum irp_type type; /* IRP_CALL_IOCTL */
789 ioctl_code_t code; /* ioctl code */
790 data_size_t out_size; /* needed output size */
791 int __pad;
792 client_ptr_t file; /* opaque ptr for the file object */
793 } ioctl;
794 struct
796 enum irp_type type; /* IRP_CALL_VOLUME */
797 unsigned int info_class;/* information class */
798 data_size_t out_size; /* needed output size */
799 int __pad;
800 client_ptr_t file; /* opaque ptr for the file object */
801 } volume;
802 struct
804 enum irp_type type; /* IRP_CALL_FREE */
805 int __pad;
806 client_ptr_t obj; /* opaque ptr for the freed object */
807 } free;
808 struct
810 enum irp_type type; /* IRP_CALL_CANCEL */
811 int __pad;
812 client_ptr_t irp; /* opaque ptr for canceled irp */
813 } cancel;
814 } irp_params_t;
816 /* information about a PE image mapping, roughly equivalent to SECTION_IMAGE_INFORMATION */
817 typedef struct
819 client_ptr_t base;
820 mem_size_t stack_size;
821 mem_size_t stack_commit;
822 unsigned int entry_point;
823 unsigned int map_size;
824 unsigned int zerobits;
825 unsigned int subsystem;
826 unsigned short subsystem_minor;
827 unsigned short subsystem_major;
828 unsigned short osversion_major;
829 unsigned short osversion_minor;
830 unsigned short image_charact;
831 unsigned short dll_charact;
832 unsigned short machine;
833 unsigned char contains_code;
834 unsigned char image_flags;
835 unsigned int loader_flags;
836 unsigned int header_size;
837 unsigned int file_size;
838 unsigned int checksum;
839 unsigned int dbg_offset;
840 unsigned int dbg_size;
841 } pe_image_info_t;
842 #define IMAGE_FLAGS_ComPlusNativeReady 0x01
843 #define IMAGE_FLAGS_ComPlusILOnly 0x02
844 #define IMAGE_FLAGS_ImageDynamicallyRelocated 0x04
845 #define IMAGE_FLAGS_ImageMappedFlat 0x08
846 #define IMAGE_FLAGS_BaseBelow4gb 0x10
847 #define IMAGE_FLAGS_ComPlusPrefer32bit 0x20
848 #define IMAGE_FLAGS_WineBuiltin 0x40
849 #define IMAGE_FLAGS_WineFakeDll 0x80
851 struct rawinput_device
853 unsigned short usage_page;
854 unsigned short usage;
855 unsigned int flags;
856 user_handle_t target;
859 typedef struct
861 int x;
862 int y;
863 unsigned int time;
864 int __pad;
865 lparam_t info;
866 } cursor_pos_t;
868 /****************************************************************/
869 /* Request declarations */
871 /* Create a new process from the context of the parent */
872 @REQ(new_process)
873 obj_handle_t token; /* process token */
874 obj_handle_t debug; /* process debug object */
875 obj_handle_t parent_process; /* parent process */
876 unsigned int flags; /* process creation flags */
877 int socket_fd; /* file descriptor for process socket */
878 unsigned int access; /* access rights for process object */
879 unsigned short machine; /* architecture that the new process will use */
880 data_size_t info_size; /* size of startup info */
881 data_size_t handles_size; /* length of explicit handles list */
882 data_size_t jobs_size; /* length of jobs list */
883 VARARG(objattr,object_attributes); /* object attributes */
884 VARARG(handles,uints,handles_size); /* handles list */
885 VARARG(jobs,uints,jobs_size); /* jobs list */
886 VARARG(info,startup_info,info_size); /* startup information */
887 VARARG(env,unicode_str); /* environment for new process */
888 @REPLY
889 obj_handle_t info; /* new process info handle */
890 process_id_t pid; /* process id */
891 obj_handle_t handle; /* process handle (in the current process) */
892 @END
895 /* Retrieve information about a newly started process */
896 @REQ(get_new_process_info)
897 obj_handle_t info; /* info handle returned from new_process_request */
898 @REPLY
899 int success; /* did the process start successfully? */
900 int exit_code; /* process exit code if failed */
901 @END
904 /* Create a new thread */
905 @REQ(new_thread)
906 obj_handle_t process; /* process in which to create thread */
907 unsigned int access; /* wanted access rights */
908 unsigned int flags; /* thread creation flags */
909 int request_fd; /* fd for request pipe */
910 VARARG(objattr,object_attributes); /* object attributes */
911 @REPLY
912 thread_id_t tid; /* thread id */
913 obj_handle_t handle; /* thread handle (in the current process) */
914 @END
917 /* Retrieve the new process startup info */
918 @REQ(get_startup_info)
919 @REPLY
920 data_size_t info_size; /* size of startup info */
921 VARARG(info,startup_info,info_size); /* startup information */
922 VARARG(env,unicode_str); /* environment */
923 @END
926 /* Signal the end of the process initialization */
927 @REQ(init_process_done)
928 client_ptr_t teb; /* TEB of new thread (in process address space) */
929 client_ptr_t peb; /* PEB of new process (in process address space) */
930 client_ptr_t ldt_copy; /* address of LDT copy (in process address space) */
931 @REPLY
932 client_ptr_t entry; /* process entry point */
933 int suspend; /* is process suspended? */
934 @END
937 /* Initialize the first thread of a new process */
938 @REQ(init_first_thread)
939 int unix_pid; /* Unix pid of new process */
940 int unix_tid; /* Unix tid of new thread */
941 int debug_level; /* new debug level */
942 int reply_fd; /* fd for reply pipe */
943 int wait_fd; /* fd for blocking calls pipe */
944 @REPLY
945 process_id_t pid; /* process id of the new thread's process */
946 thread_id_t tid; /* thread id of the new thread */
947 timeout_t server_start; /* server start time */
948 unsigned int session_id; /* process session id */
949 data_size_t info_size; /* total size of startup info */
950 VARARG(machines,ushorts); /* array of supported machines */
951 @END
954 /* Initialize a new thread; called from the child after pthread_create() */
955 @REQ(init_thread)
956 int unix_tid; /* Unix tid of new thread */
957 int reply_fd; /* fd for reply pipe */
958 int wait_fd; /* fd for blocking calls pipe */
959 client_ptr_t teb; /* TEB of new thread (in thread address space) */
960 client_ptr_t entry; /* entry point (in thread address space) */
961 @REPLY
962 int suspend; /* is thread suspended? */
963 @END
966 /* Terminate a process */
967 @REQ(terminate_process)
968 obj_handle_t handle; /* process handle to terminate */
969 int exit_code; /* process exit code */
970 @REPLY
971 int self; /* suicide? */
972 @END
975 /* Terminate a thread */
976 @REQ(terminate_thread)
977 obj_handle_t handle; /* thread handle to terminate */
978 int exit_code; /* thread exit code */
979 @REPLY
980 int self; /* suicide? */
981 @END
984 /* Retrieve information about a process */
985 @REQ(get_process_info)
986 obj_handle_t handle; /* process handle */
987 @REPLY
988 process_id_t pid; /* server process id */
989 process_id_t ppid; /* server process id of parent */
990 affinity_t affinity; /* process affinity mask */
991 client_ptr_t peb; /* PEB address in process address space */
992 timeout_t start_time; /* process start time */
993 timeout_t end_time; /* process end time */
994 unsigned int session_id; /* process session id */
995 int exit_code; /* process exit code */
996 int priority; /* priority class */
997 unsigned short machine; /* process architecture */
998 VARARG(image,pe_image_info); /* image info for main exe */
999 @END
1002 /* Retrieve debug information about a process */
1003 @REQ(get_process_debug_info)
1004 obj_handle_t handle; /* process handle */
1005 @REPLY
1006 obj_handle_t debug; /* handle to debug port */
1007 int debug_children; /* inherit debugger to child processes */
1008 VARARG(image,pe_image_info); /* image info for main exe */
1009 @END
1012 /* Fetch the name of the process image */
1013 @REQ(get_process_image_name)
1014 obj_handle_t handle; /* process handle */
1015 int win32; /* return a win32 filename? */
1016 @REPLY
1017 data_size_t len; /* len in bytes required to store filename */
1018 VARARG(name,unicode_str); /* image name for main exe */
1019 @END
1022 /* Retrieve information about a process memory usage */
1023 @REQ(get_process_vm_counters)
1024 obj_handle_t handle; /* process handle */
1025 @REPLY
1026 mem_size_t peak_virtual_size; /* peak virtual memory in bytes */
1027 mem_size_t virtual_size; /* virtual memory in bytes */
1028 mem_size_t peak_working_set_size; /* peak real memory in bytes */
1029 mem_size_t working_set_size; /* real memory in bytes */
1030 mem_size_t pagefile_usage; /* commit charge in bytes */
1031 mem_size_t peak_pagefile_usage; /* peak commit charge in bytes */
1032 @END
1035 /* Set a process information */
1036 @REQ(set_process_info)
1037 obj_handle_t handle; /* process handle */
1038 int mask; /* setting mask (see below) */
1039 int priority; /* priority class */
1040 affinity_t affinity; /* affinity mask */
1041 @END
1042 #define SET_PROCESS_INFO_PRIORITY 0x01
1043 #define SET_PROCESS_INFO_AFFINITY 0x02
1046 /* Retrieve information about a thread */
1047 @REQ(get_thread_info)
1048 obj_handle_t handle; /* thread handle */
1049 unsigned int access; /* required access rights */
1050 @REPLY
1051 process_id_t pid; /* server process id */
1052 thread_id_t tid; /* server thread id */
1053 client_ptr_t teb; /* thread teb pointer */
1054 client_ptr_t entry_point; /* thread entry point */
1055 affinity_t affinity; /* thread affinity mask */
1056 int exit_code; /* thread exit code */
1057 int priority; /* thread priority level */
1058 int last; /* last thread in process */
1059 int suspend_count; /* thread suspend count */
1060 int dbg_hidden; /* thread hidden from debugger */
1061 data_size_t desc_len; /* description length in bytes */
1062 VARARG(desc,unicode_str); /* description string */
1063 @END
1066 /* Retrieve information about thread times */
1067 @REQ(get_thread_times)
1068 obj_handle_t handle; /* thread handle */
1069 @REPLY
1070 timeout_t creation_time; /* thread creation time */
1071 timeout_t exit_time; /* thread exit time */
1072 int unix_pid; /* thread native pid */
1073 int unix_tid; /* thread native pid */
1074 @END
1077 /* Set a thread information */
1078 @REQ(set_thread_info)
1079 obj_handle_t handle; /* thread handle */
1080 int mask; /* setting mask (see below) */
1081 int priority; /* priority class */
1082 affinity_t affinity; /* affinity mask */
1083 client_ptr_t entry_point; /* thread entry point */
1084 obj_handle_t token; /* impersonation token */
1085 VARARG(desc,unicode_str); /* description string */
1086 @END
1087 #define SET_THREAD_INFO_PRIORITY 0x01
1088 #define SET_THREAD_INFO_AFFINITY 0x02
1089 #define SET_THREAD_INFO_TOKEN 0x04
1090 #define SET_THREAD_INFO_ENTRYPOINT 0x08
1091 #define SET_THREAD_INFO_DESCRIPTION 0x10
1092 #define SET_THREAD_INFO_DBG_HIDDEN 0x20
1095 /* Suspend a thread */
1096 @REQ(suspend_thread)
1097 obj_handle_t handle; /* thread handle */
1098 @REPLY
1099 int count; /* new suspend count */
1100 @END
1103 /* Resume a thread */
1104 @REQ(resume_thread)
1105 obj_handle_t handle; /* thread handle */
1106 @REPLY
1107 int count; /* new suspend count */
1108 @END
1111 /* Queue an APC for a thread or process */
1112 @REQ(queue_apc)
1113 obj_handle_t handle; /* thread or process handle */
1114 apc_call_t call; /* call arguments */
1115 @REPLY
1116 obj_handle_t handle; /* APC handle */
1117 int self; /* run APC in caller itself? */
1118 @END
1121 /* Get the result of an APC call */
1122 @REQ(get_apc_result)
1123 obj_handle_t handle; /* handle to the APC */
1124 @REPLY
1125 apc_result_t result; /* result of the APC */
1126 @END
1129 /* Close a handle for the current process */
1130 @REQ(close_handle)
1131 obj_handle_t handle; /* handle to close */
1132 @END
1135 /* Set a handle information */
1136 @REQ(set_handle_info)
1137 obj_handle_t handle; /* handle we are interested in */
1138 int flags; /* new handle flags */
1139 int mask; /* mask for flags to set */
1140 @REPLY
1141 int old_flags; /* old flag value */
1142 @END
1145 /* Duplicate a handle */
1146 @REQ(dup_handle)
1147 obj_handle_t src_process; /* src process handle */
1148 obj_handle_t src_handle; /* src handle to duplicate */
1149 obj_handle_t dst_process; /* dst process handle */
1150 unsigned int access; /* wanted access rights */
1151 unsigned int attributes; /* object attributes */
1152 unsigned int options; /* duplicate options */
1153 @REPLY
1154 obj_handle_t handle; /* duplicated handle in dst process */
1155 @END
1158 /* Test if two handles refer to the same object */
1159 @REQ(compare_objects)
1160 obj_handle_t first; /* first object handle */
1161 obj_handle_t second; /* second object handle */
1162 @END
1165 /* Make an object temporary */
1166 @REQ(make_temporary)
1167 obj_handle_t handle; /* handle to the object */
1168 @END
1171 /* Open a handle to a process */
1172 @REQ(open_process)
1173 process_id_t pid; /* process id to open */
1174 unsigned int access; /* wanted access rights */
1175 unsigned int attributes; /* object attributes */
1176 @REPLY
1177 obj_handle_t handle; /* handle to the process */
1178 @END
1181 /* Open a handle to a thread */
1182 @REQ(open_thread)
1183 thread_id_t tid; /* thread id to open */
1184 unsigned int access; /* wanted access rights */
1185 unsigned int attributes; /* object attributes */
1186 @REPLY
1187 obj_handle_t handle; /* handle to the thread */
1188 @END
1191 /* Wait for handles */
1192 @REQ(select)
1193 int flags; /* wait flags (see below) */
1194 client_ptr_t cookie; /* magic cookie to return to client */
1195 abstime_t timeout; /* timeout */
1196 data_size_t size; /* size of select_op */
1197 obj_handle_t prev_apc; /* handle to previous APC */
1198 VARARG(result,apc_result); /* result of previous APC */
1199 VARARG(data,select_op,size); /* operation-specific data */
1200 VARARG(contexts,contexts); /* suspend context(s) */
1201 @REPLY
1202 apc_call_t call; /* APC call arguments */
1203 obj_handle_t apc_handle; /* handle to next APC */
1204 int signaled; /* were the handles immediately signaled? */
1205 VARARG(contexts,contexts); /* suspend context(s) */
1206 @END
1207 #define SELECT_ALERTABLE 1
1208 #define SELECT_INTERRUPTIBLE 2
1211 /* Create an event */
1212 @REQ(create_event)
1213 unsigned int access; /* wanted access rights */
1214 int manual_reset; /* manual reset event */
1215 int initial_state; /* initial state of the event */
1216 VARARG(objattr,object_attributes); /* object attributes */
1217 @REPLY
1218 obj_handle_t handle; /* handle to the event */
1219 @END
1221 /* Event operation */
1222 @REQ(event_op)
1223 obj_handle_t handle; /* handle to event */
1224 int op; /* event operation (see below) */
1225 @REPLY
1226 int state; /* previous state */
1227 @END
1228 enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT };
1230 @REQ(query_event)
1231 obj_handle_t handle; /* handle to event */
1232 @REPLY
1233 int manual_reset; /* manual reset event */
1234 int state; /* current state of the event */
1235 @END
1237 /* Open an event */
1238 @REQ(open_event)
1239 unsigned int access; /* wanted access rights */
1240 unsigned int attributes; /* object attributes */
1241 obj_handle_t rootdir; /* root directory */
1242 VARARG(name,unicode_str); /* object name */
1243 @REPLY
1244 obj_handle_t handle; /* handle to the event */
1245 @END
1248 /* Create a keyed event */
1249 @REQ(create_keyed_event)
1250 unsigned int access; /* wanted access rights */
1251 VARARG(objattr,object_attributes); /* object attributes */
1252 @REPLY
1253 obj_handle_t handle; /* handle to the event */
1254 @END
1256 /* Open a keyed event */
1257 @REQ(open_keyed_event)
1258 unsigned int access; /* wanted access rights */
1259 unsigned int attributes; /* object attributes */
1260 obj_handle_t rootdir; /* root directory */
1261 VARARG(name,unicode_str); /* object name */
1262 @REPLY
1263 obj_handle_t handle; /* handle to the event */
1264 @END
1267 /* Create a mutex */
1268 @REQ(create_mutex)
1269 unsigned int access; /* wanted access rights */
1270 int owned; /* initially owned? */
1271 VARARG(objattr,object_attributes); /* object attributes */
1272 @REPLY
1273 obj_handle_t handle; /* handle to the mutex */
1274 @END
1277 /* Release a mutex */
1278 @REQ(release_mutex)
1279 obj_handle_t handle; /* handle to the mutex */
1280 @REPLY
1281 unsigned int prev_count; /* value of internal counter, before release */
1282 @END
1285 /* Open a mutex */
1286 @REQ(open_mutex)
1287 unsigned int access; /* wanted access rights */
1288 unsigned int attributes; /* object attributes */
1289 obj_handle_t rootdir; /* root directory */
1290 VARARG(name,unicode_str); /* object name */
1291 @REPLY
1292 obj_handle_t handle; /* handle to the mutex */
1293 @END
1296 /* Query a mutex */
1297 @REQ(query_mutex)
1298 obj_handle_t handle; /* handle to mutex */
1299 @REPLY
1300 unsigned int count; /* current count of mutex */
1301 int owned; /* true if owned by current thread */
1302 int abandoned; /* true if abandoned */
1303 @END
1306 /* Create a semaphore */
1307 @REQ(create_semaphore)
1308 unsigned int access; /* wanted access rights */
1309 unsigned int initial; /* initial count */
1310 unsigned int max; /* maximum count */
1311 VARARG(objattr,object_attributes); /* object attributes */
1312 @REPLY
1313 obj_handle_t handle; /* handle to the semaphore */
1314 @END
1317 /* Release a semaphore */
1318 @REQ(release_semaphore)
1319 obj_handle_t handle; /* handle to the semaphore */
1320 unsigned int count; /* count to add to semaphore */
1321 @REPLY
1322 unsigned int prev_count; /* previous semaphore count */
1323 @END
1325 @REQ(query_semaphore)
1326 obj_handle_t handle; /* handle to the semaphore */
1327 @REPLY
1328 unsigned int current; /* current count */
1329 unsigned int max; /* maximum count */
1330 @END
1332 /* Open a semaphore */
1333 @REQ(open_semaphore)
1334 unsigned int access; /* wanted access rights */
1335 unsigned int attributes; /* object attributes */
1336 obj_handle_t rootdir; /* root directory */
1337 VARARG(name,unicode_str); /* object name */
1338 @REPLY
1339 obj_handle_t handle; /* handle to the semaphore */
1340 @END
1343 /* Create a file */
1344 @REQ(create_file)
1345 unsigned int access; /* wanted access rights */
1346 unsigned int sharing; /* sharing flags */
1347 int create; /* file create action */
1348 unsigned int options; /* file options */
1349 unsigned int attrs; /* file attributes for creation */
1350 VARARG(objattr,object_attributes); /* object attributes */
1351 VARARG(filename,string); /* file name */
1352 @REPLY
1353 obj_handle_t handle; /* handle to the file */
1354 @END
1357 /* Open a file object */
1358 @REQ(open_file_object)
1359 unsigned int access; /* wanted access rights */
1360 unsigned int attributes; /* open attributes */
1361 obj_handle_t rootdir; /* root directory */
1362 unsigned int sharing; /* sharing flags */
1363 unsigned int options; /* file options */
1364 VARARG(filename,unicode_str); /* file name */
1365 @REPLY
1366 obj_handle_t handle; /* handle to the file */
1367 @END
1370 /* Allocate a file handle for a Unix fd */
1371 @REQ(alloc_file_handle)
1372 unsigned int access; /* wanted access rights */
1373 unsigned int attributes; /* object attributes */
1374 int fd; /* file descriptor on the client side */
1375 @REPLY
1376 obj_handle_t handle; /* handle to the file */
1377 @END
1380 /* Get the Unix name from a file handle */
1381 @REQ(get_handle_unix_name)
1382 obj_handle_t handle; /* file handle */
1383 @REPLY
1384 data_size_t name_len; /* unix name length */
1385 VARARG(name,string); /* unix name */
1386 @END
1389 /* Get a Unix fd to access a file */
1390 @REQ(get_handle_fd)
1391 obj_handle_t handle; /* handle to the file */
1392 @REPLY
1393 int type; /* file type (see below) */
1394 int cacheable; /* can fd be cached in the client? */
1395 unsigned int access; /* file access rights */
1396 unsigned int options; /* file open options */
1397 @END
1398 enum server_fd_type
1400 FD_TYPE_INVALID, /* invalid file (no associated fd) */
1401 FD_TYPE_FILE, /* regular file */
1402 FD_TYPE_DIR, /* directory */
1403 FD_TYPE_SOCKET, /* socket */
1404 FD_TYPE_SERIAL, /* serial port */
1405 FD_TYPE_PIPE, /* named pipe */
1406 FD_TYPE_MAILSLOT, /* mailslot */
1407 FD_TYPE_CHAR, /* unspecified char device */
1408 FD_TYPE_DEVICE, /* Windows device file */
1409 FD_TYPE_NB_TYPES
1413 /* Retrieve (or allocate) the client-side directory cache entry */
1414 @REQ(get_directory_cache_entry)
1415 obj_handle_t handle; /* handle to the directory */
1416 @REPLY
1417 int entry; /* cache entry on the client side */
1418 VARARG(free,ints); /* entries that can be freed */
1419 @END
1422 /* Flush a file buffers */
1423 @REQ(flush)
1424 async_data_t async; /* async I/O parameters */
1425 @REPLY
1426 obj_handle_t event; /* event set when finished */
1427 @END
1429 /* Query file information */
1430 @REQ(get_file_info)
1431 obj_handle_t handle; /* handle to the file */
1432 unsigned int info_class; /* queried information class */
1433 @REPLY
1434 VARARG(data,bytes); /* file info data */
1435 @END
1437 /* Query volume information */
1438 @REQ(get_volume_info)
1439 obj_handle_t handle; /* handle to the file */
1440 async_data_t async; /* async I/O parameters */
1441 unsigned int info_class; /* queried information class */
1442 @REPLY
1443 obj_handle_t wait; /* handle to wait on for blocking read */
1444 VARARG(data,bytes); /* volume info data */
1445 @END
1447 /* Lock a region of a file */
1448 @REQ(lock_file)
1449 obj_handle_t handle; /* handle to the file */
1450 file_pos_t offset; /* offset of start of lock */
1451 file_pos_t count; /* count of bytes to lock */
1452 int shared; /* shared or exclusive lock? */
1453 int wait; /* do we want to wait? */
1454 @REPLY
1455 obj_handle_t handle; /* handle to wait on */
1456 int overlapped; /* is it an overlapped I/O handle? */
1457 @END
1460 /* Unlock a region of a file */
1461 @REQ(unlock_file)
1462 obj_handle_t handle; /* handle to the file */
1463 file_pos_t offset; /* offset of start of unlock */
1464 file_pos_t count; /* count of bytes to unlock */
1465 @END
1468 /* Perform a recv on a socket */
1469 @REQ(recv_socket)
1470 int oob; /* are we receiving OOB data? */
1471 async_data_t async; /* async I/O parameters */
1472 int force_async; /* Force asynchronous mode? */
1473 @REPLY
1474 obj_handle_t wait; /* handle to wait on for blocking recv */
1475 unsigned int options; /* device open options */
1476 int nonblocking; /* is socket non-blocking? */
1477 @END
1480 /* Perform a send on a socket */
1481 @REQ(send_socket)
1482 async_data_t async; /* async I/O parameters */
1483 int force_async; /* Force asynchronous mode? */
1484 @REPLY
1485 obj_handle_t wait; /* handle to wait on for blocking send */
1486 unsigned int options; /* device open options */
1487 int nonblocking; /* is socket non-blocking? */
1488 @END
1491 /* Store ICMP id for ICMP over datagram fixup */
1492 @REQ(socket_send_icmp_id)
1493 obj_handle_t handle; /* socket handle */
1494 unsigned short icmp_id; /* ICMP packet id */
1495 unsigned short icmp_seq; /* ICMP packed sequence */
1496 @REPLY
1497 @END
1500 /* Get ICMP id for ICMP over datagram fixup */
1501 @REQ(socket_get_icmp_id)
1502 obj_handle_t handle; /* socket handle */
1503 unsigned short icmp_seq; /* ICMP packed sequence */
1504 @REPLY
1505 unsigned short icmp_id; /* ICMP packet id */
1506 @END
1509 /* Retrieve the next pending console ioctl request */
1510 @REQ(get_next_console_request)
1511 obj_handle_t handle; /* console server handle */
1512 int signal; /* server signal state */
1513 int read; /* 1 if reporting result of blocked read ioctl */
1514 unsigned int status; /* status of previous ioctl */
1515 VARARG(out_data,bytes); /* out_data of previous ioctl */
1516 @REPLY
1517 unsigned int code; /* ioctl code */
1518 unsigned int output; /* output id or 0 for input */
1519 data_size_t out_size; /* ioctl output size */
1520 VARARG(in_data,bytes); /* ioctl in_data */
1521 @END
1524 /* enable directory change notifications */
1525 @REQ(read_directory_changes)
1526 unsigned int filter; /* notification filter */
1527 int subtree; /* watch the subtree? */
1528 int want_data; /* flag indicating whether change data should be collected */
1529 async_data_t async; /* async I/O parameters */
1530 @END
1533 @REQ(read_change)
1534 obj_handle_t handle;
1535 @REPLY
1536 VARARG(events,filesystem_event); /* collected filesystem events */
1537 @END
1540 /* Create a file mapping */
1541 @REQ(create_mapping)
1542 unsigned int access; /* wanted access rights */
1543 unsigned int flags; /* SEC_* flags */
1544 unsigned int file_access; /* file access rights */
1545 mem_size_t size; /* mapping size */
1546 obj_handle_t file_handle; /* file handle */
1547 VARARG(objattr,object_attributes); /* object attributes */
1548 @REPLY
1549 obj_handle_t handle; /* handle to the mapping */
1550 @END
1553 /* Open a mapping */
1554 @REQ(open_mapping)
1555 unsigned int access; /* wanted access rights */
1556 unsigned int attributes; /* object attributes */
1557 obj_handle_t rootdir; /* root directory */
1558 VARARG(name,unicode_str); /* object name */
1559 @REPLY
1560 obj_handle_t handle; /* handle to the mapping */
1561 @END
1564 /* Get information about a file mapping */
1565 @REQ(get_mapping_info)
1566 obj_handle_t handle; /* handle to the mapping */
1567 unsigned int access; /* wanted access rights */
1568 @REPLY
1569 mem_size_t size; /* mapping size */
1570 unsigned int flags; /* SEC_* flags */
1571 obj_handle_t shared_file; /* shared mapping file handle */
1572 data_size_t total; /* total required buffer size in bytes */
1573 VARARG(image,pe_image_info);/* image info for SEC_IMAGE mappings */
1574 VARARG(name,unicode_str); /* filename for SEC_IMAGE mappings */
1575 @END
1578 /* Add a memory view in the current process */
1579 @REQ(map_view)
1580 obj_handle_t mapping; /* file mapping handle, or 0 for .so builtin */
1581 unsigned int access; /* wanted access rights */
1582 client_ptr_t base; /* view base address (page-aligned) */
1583 mem_size_t size; /* view size */
1584 file_pos_t start; /* start offset in mapping */
1585 VARARG(image,pe_image_info);/* image info for .so builtins */
1586 VARARG(name,unicode_str); /* image filename for .so builtins */
1587 @END
1590 /* Unmap a memory view from the current process */
1591 @REQ(unmap_view)
1592 client_ptr_t base; /* view base address */
1593 @END
1596 /* Get a range of committed pages in a file mapping */
1597 @REQ(get_mapping_committed_range)
1598 client_ptr_t base; /* view base address */
1599 file_pos_t offset; /* starting offset (page-aligned, in bytes) */
1600 @REPLY
1601 mem_size_t size; /* size of range starting at offset (page-aligned, in bytes) */
1602 int committed; /* whether it is a committed range */
1603 @END
1606 /* Add a range to the committed pages in a file mapping */
1607 @REQ(add_mapping_committed_range)
1608 client_ptr_t base; /* view base address */
1609 file_pos_t offset; /* starting offset (page-aligned, in bytes) */
1610 mem_size_t size; /* size to set (page-aligned, in bytes) or 0 if only retrieving */
1611 @END
1614 /* Check if two memory maps are for the same file */
1615 @REQ(is_same_mapping)
1616 client_ptr_t base1; /* first view base address */
1617 client_ptr_t base2; /* second view base address */
1618 @END
1621 /* Get the filename of a mapping */
1622 @REQ(get_mapping_filename)
1623 obj_handle_t process; /* process handle */
1624 client_ptr_t addr; /* address inside mapped view (in process address space) */
1625 @REPLY
1626 data_size_t len; /* total filename length in bytes */
1627 VARARG(filename,unicode_str); /* filename in NT format */
1628 @END
1631 struct thread_info
1633 timeout_t start_time;
1634 thread_id_t tid;
1635 int base_priority;
1636 int current_priority;
1637 int unix_tid;
1638 client_ptr_t teb;
1639 client_ptr_t entry_point;
1642 struct process_info
1644 timeout_t start_time;
1645 data_size_t name_len;
1646 int thread_count;
1647 int priority;
1648 process_id_t pid;
1649 process_id_t parent_pid;
1650 unsigned int session_id;
1651 int handle_count;
1652 int unix_pid;
1653 /* VARARG(name,unicode_str,name_len); */
1654 /* VARARG(threads,struct thread_info,thread_count); */
1657 /* Get a list of processes and threads currently running */
1658 @REQ(list_processes)
1659 @REPLY
1660 data_size_t info_size;
1661 int process_count;
1662 int total_thread_count;
1663 data_size_t total_name_len;
1664 VARARG(data,process_info,info_size);
1665 @END
1668 /* Create a debug object */
1669 @REQ(create_debug_obj)
1670 unsigned int access; /* wanted access rights */
1671 unsigned int flags; /* object flags */
1672 VARARG(objattr,object_attributes); /* object attributes */
1673 @REPLY
1674 obj_handle_t handle; /* handle to the debug object */
1675 @END
1678 /* Wait for a debug event */
1679 @REQ(wait_debug_event)
1680 obj_handle_t debug; /* debug object */
1681 @REPLY
1682 process_id_t pid; /* process id */
1683 thread_id_t tid; /* thread id */
1684 VARARG(event,debug_event); /* debug event data */
1685 @END
1688 /* Queue an exception event */
1689 @REQ(queue_exception_event)
1690 int first; /* first chance exception? */
1691 unsigned int code; /* exception code */
1692 unsigned int flags; /* exception flags */
1693 client_ptr_t record; /* exception record */
1694 client_ptr_t address; /* exception address */
1695 data_size_t len; /* size of parameters */
1696 VARARG(params,uints64,len);/* exception parameters */
1697 @REPLY
1698 obj_handle_t handle; /* handle to the queued event */
1699 @END
1702 /* Retrieve the status of an exception event */
1703 @REQ(get_exception_status)
1704 obj_handle_t handle; /* handle to the queued event */
1705 @END
1708 /* Continue a debug event */
1709 @REQ(continue_debug_event)
1710 obj_handle_t debug; /* debug object */
1711 process_id_t pid; /* process id to continue */
1712 thread_id_t tid; /* thread id to continue */
1713 unsigned int status; /* continuation status */
1714 @END
1717 /* Start or stop debugging an existing process */
1718 @REQ(debug_process)
1719 obj_handle_t handle; /* process handle */
1720 obj_handle_t debug; /* debug object to attach to the process */
1721 int attach; /* 1=attaching / 0=detaching from the process */
1722 @END
1725 /* Set debug object information */
1726 @REQ(set_debug_obj_info)
1727 obj_handle_t debug; /* debug object */
1728 unsigned int flags; /* object flags */
1729 @END
1732 /* Read data from a process address space */
1733 @REQ(read_process_memory)
1734 obj_handle_t handle; /* process handle */
1735 client_ptr_t addr; /* addr to read from */
1736 @REPLY
1737 VARARG(data,bytes); /* result data */
1738 @END
1741 /* Write data to a process address space */
1742 @REQ(write_process_memory)
1743 obj_handle_t handle; /* process handle */
1744 client_ptr_t addr; /* addr to write to */
1745 VARARG(data,bytes); /* data to write */
1746 @END
1749 /* Create a registry key */
1750 @REQ(create_key)
1751 unsigned int access; /* desired access rights */
1752 unsigned int options; /* creation options */
1753 VARARG(objattr,object_attributes); /* object attributes */
1754 VARARG(class,unicode_str); /* class name */
1755 @REPLY
1756 obj_handle_t hkey; /* handle to the created key */
1757 @END
1759 /* Open a registry key */
1760 @REQ(open_key)
1761 obj_handle_t parent; /* handle to the parent key */
1762 unsigned int access; /* desired access rights */
1763 unsigned int attributes; /* object attributes */
1764 VARARG(name,unicode_str); /* key name */
1765 @REPLY
1766 obj_handle_t hkey; /* handle to the open key */
1767 @END
1770 /* Delete a registry key */
1771 @REQ(delete_key)
1772 obj_handle_t hkey; /* handle to the key */
1773 @END
1776 /* Flush a registry key */
1777 @REQ(flush_key)
1778 obj_handle_t hkey; /* handle to the key */
1779 @END
1782 /* Enumerate registry subkeys */
1783 @REQ(enum_key)
1784 obj_handle_t hkey; /* handle to registry key */
1785 int index; /* index of subkey (or -1 for current key) */
1786 int info_class; /* requested information class */
1787 @REPLY
1788 int subkeys; /* number of subkeys */
1789 int max_subkey; /* longest subkey name */
1790 int max_class; /* longest class name */
1791 int values; /* number of values */
1792 int max_value; /* longest value name */
1793 int max_data; /* longest value data */
1794 timeout_t modif; /* last modification time */
1795 data_size_t total; /* total length needed for full name and class */
1796 data_size_t namelen; /* length of key name in bytes */
1797 VARARG(name,unicode_str,namelen); /* key name */
1798 VARARG(class,unicode_str); /* class name */
1799 @END
1802 /* Set a value of a registry key */
1803 @REQ(set_key_value)
1804 obj_handle_t hkey; /* handle to registry key */
1805 int type; /* value type */
1806 data_size_t namelen; /* length of value name in bytes */
1807 VARARG(name,unicode_str,namelen); /* value name */
1808 VARARG(data,bytes); /* value data */
1809 @END
1812 /* Retrieve the value of a registry key */
1813 @REQ(get_key_value)
1814 obj_handle_t hkey; /* handle to registry key */
1815 VARARG(name,unicode_str); /* value name */
1816 @REPLY
1817 int type; /* value type */
1818 data_size_t total; /* total length needed for data */
1819 VARARG(data,bytes); /* value data */
1820 @END
1823 /* Enumerate a value of a registry key */
1824 @REQ(enum_key_value)
1825 obj_handle_t hkey; /* handle to registry key */
1826 int index; /* value index */
1827 int info_class; /* requested information class */
1828 @REPLY
1829 int type; /* value type */
1830 data_size_t total; /* total length needed for full name and data */
1831 data_size_t namelen; /* length of value name in bytes */
1832 VARARG(name,unicode_str,namelen); /* value name */
1833 VARARG(data,bytes); /* value data */
1834 @END
1837 /* Delete a value of a registry key */
1838 @REQ(delete_key_value)
1839 obj_handle_t hkey; /* handle to registry key */
1840 VARARG(name,unicode_str); /* value name */
1841 @END
1844 /* Load a registry branch from a file */
1845 @REQ(load_registry)
1846 obj_handle_t file; /* file to load from */
1847 VARARG(objattr,object_attributes); /* object attributes */
1848 @END
1851 /* UnLoad a registry branch from a file */
1852 @REQ(unload_registry)
1853 obj_handle_t parent; /* handle to the parent key */
1854 unsigned int attributes; /* object attributes */
1855 VARARG(name,unicode_str); /* key name */
1856 @END
1859 /* Save a registry branch to a file */
1860 @REQ(save_registry)
1861 obj_handle_t hkey; /* key to save */
1862 obj_handle_t file; /* file to save to */
1863 @END
1866 /* Add a registry key change notification */
1867 @REQ(set_registry_notification)
1868 obj_handle_t hkey; /* key to watch for changes */
1869 obj_handle_t event; /* event to set */
1870 int subtree; /* should we watch the whole subtree? */
1871 unsigned int filter; /* things to watch */
1872 @END
1875 /* Rename a registry key */
1876 @REQ(rename_key)
1877 obj_handle_t hkey; /* handle to the key to be renamed */
1878 VARARG(name,unicode_str); /* new name */
1879 @END
1882 /* Create a waitable timer */
1883 @REQ(create_timer)
1884 unsigned int access; /* wanted access rights */
1885 int manual; /* manual reset */
1886 VARARG(objattr,object_attributes); /* object attributes */
1887 @REPLY
1888 obj_handle_t handle; /* handle to the timer */
1889 @END
1892 /* Open a waitable timer */
1893 @REQ(open_timer)
1894 unsigned int access; /* wanted access rights */
1895 unsigned int attributes; /* object attributes */
1896 obj_handle_t rootdir; /* root directory */
1897 VARARG(name,unicode_str); /* object name */
1898 @REPLY
1899 obj_handle_t handle; /* handle to the timer */
1900 @END
1902 /* Set a waitable timer */
1903 @REQ(set_timer)
1904 obj_handle_t handle; /* handle to the timer */
1905 timeout_t expire; /* next expiration absolute time */
1906 client_ptr_t callback; /* callback function */
1907 client_ptr_t arg; /* callback argument */
1908 int period; /* timer period in ms */
1909 @REPLY
1910 int signaled; /* was the timer signaled before this call ? */
1911 @END
1913 /* Cancel a waitable timer */
1914 @REQ(cancel_timer)
1915 obj_handle_t handle; /* handle to the timer */
1916 @REPLY
1917 int signaled; /* was the timer signaled before this calltime ? */
1918 @END
1920 /* Get information on a waitable timer */
1921 @REQ(get_timer_info)
1922 obj_handle_t handle; /* handle to the timer */
1923 @REPLY
1924 timeout_t when; /* absolute time when the timer next expires */
1925 int signaled; /* is the timer signaled? */
1926 @END
1929 /* Retrieve the current context of a thread */
1930 @REQ(get_thread_context)
1931 obj_handle_t handle; /* thread handle */
1932 obj_handle_t context; /* context handle */
1933 unsigned int flags; /* context flags */
1934 unsigned int native_flags; /* flags for native context if WoW present */
1935 unsigned short machine; /* context architecture */
1936 @REPLY
1937 int self; /* was it a handle to the current thread? */
1938 obj_handle_t handle; /* pending context handle */
1939 VARARG(contexts,contexts); /* thread context(s) */
1940 @END
1943 /* Set the current context of a thread */
1944 @REQ(set_thread_context)
1945 obj_handle_t handle; /* thread handle */
1946 unsigned int native_flags; /* flags for native context if WoW present */
1947 VARARG(contexts,contexts); /* thread context(s) */
1948 @REPLY
1949 int self; /* was it a handle to the current thread? */
1950 @END
1953 /* Fetch a selector entry for a thread */
1954 @REQ(get_selector_entry)
1955 obj_handle_t handle; /* thread handle */
1956 int entry; /* LDT entry */
1957 @REPLY
1958 unsigned int base; /* selector base */
1959 unsigned int limit; /* selector limit */
1960 unsigned char flags; /* selector flags */
1961 @END
1964 /* Add an atom */
1965 @REQ(add_atom)
1966 VARARG(name,unicode_str); /* atom name */
1967 @REPLY
1968 atom_t atom; /* resulting atom */
1969 @END
1972 /* Delete an atom */
1973 @REQ(delete_atom)
1974 atom_t atom; /* atom handle */
1975 @END
1978 /* Find an atom */
1979 @REQ(find_atom)
1980 VARARG(name,unicode_str); /* atom name */
1981 @REPLY
1982 atom_t atom; /* atom handle */
1983 @END
1986 /* Get information about an atom */
1987 @REQ(get_atom_information)
1988 atom_t atom; /* atom handle */
1989 @REPLY
1990 int count; /* atom lock count */
1991 int pinned; /* whether the atom has been pinned */
1992 data_size_t total; /* actual length of atom name */
1993 VARARG(name,unicode_str); /* atom name */
1994 @END
1997 /* Get the message queue of the current thread */
1998 @REQ(get_msg_queue)
1999 @REPLY
2000 obj_handle_t handle; /* handle to the queue */
2001 @END
2004 /* Set the file descriptor associated to the current thread queue */
2005 @REQ(set_queue_fd)
2006 obj_handle_t handle; /* handle to the file descriptor */
2007 @END
2010 /* Set the current message queue wakeup mask */
2011 @REQ(set_queue_mask)
2012 unsigned int wake_mask; /* wakeup bits mask */
2013 unsigned int changed_mask; /* changed bits mask */
2014 int skip_wait; /* will we skip waiting if signaled? */
2015 @REPLY
2016 unsigned int wake_bits; /* current wake bits */
2017 unsigned int changed_bits; /* current changed bits */
2018 @END
2021 /* Get the current message queue status */
2022 @REQ(get_queue_status)
2023 unsigned int clear_bits; /* should we clear the change bits? */
2024 @REPLY
2025 unsigned int wake_bits; /* wake bits */
2026 unsigned int changed_bits; /* changed bits since last time */
2027 @END
2030 /* Retrieve the process idle event */
2031 @REQ(get_process_idle_event)
2032 obj_handle_t handle; /* process handle */
2033 @REPLY
2034 obj_handle_t event; /* handle to idle event */
2035 @END
2038 /* Send a message to a thread queue */
2039 @REQ(send_message)
2040 thread_id_t id; /* thread id */
2041 int type; /* message type (see below) */
2042 int flags; /* message flags (see below) */
2043 user_handle_t win; /* window handle */
2044 unsigned int msg; /* message code */
2045 lparam_t wparam; /* parameters */
2046 lparam_t lparam; /* parameters */
2047 timeout_t timeout; /* timeout for reply */
2048 VARARG(data,message_data); /* message data for sent messages */
2049 @END
2051 @REQ(post_quit_message)
2052 int exit_code; /* exit code to return */
2053 @END
2055 enum message_type
2057 MSG_ASCII, /* Ascii message (from SendMessageA) */
2058 MSG_UNICODE, /* Unicode message (from SendMessageW) */
2059 MSG_NOTIFY, /* notify message (from SendNotifyMessageW), always Unicode */
2060 MSG_CALLBACK, /* callback message (from SendMessageCallbackW), always Unicode */
2061 MSG_CALLBACK_RESULT,/* result of a callback message */
2062 MSG_OTHER_PROCESS, /* sent from other process, may include vararg data, always Unicode */
2063 MSG_POSTED, /* posted message (from PostMessageW), always Unicode */
2064 MSG_HARDWARE, /* hardware message */
2065 MSG_WINEVENT, /* winevent message */
2066 MSG_HOOK_LL /* low-level hardware hook */
2068 #define SEND_MSG_ABORT_IF_HUNG 0x01
2071 /* Send a hardware message to a thread queue */
2072 @REQ(send_hardware_message)
2073 user_handle_t win; /* window handle */
2074 hw_input_t input; /* input data */
2075 unsigned int flags; /* flags (see below) */
2076 VARARG(report,bytes); /* HID report data */
2077 @REPLY
2078 int wait; /* do we need to wait for a reply? */
2079 int prev_x; /* previous cursor position */
2080 int prev_y;
2081 int new_x; /* new cursor position */
2082 int new_y;
2083 @END
2084 #define SEND_HWMSG_INJECTED 0x01
2087 /* Get a message from the current queue */
2088 @REQ(get_message)
2089 unsigned int flags; /* PM_* flags */
2090 user_handle_t get_win; /* window handle to get */
2091 unsigned int get_first; /* first message code to get */
2092 unsigned int get_last; /* last message code to get */
2093 unsigned int hw_id; /* id of the previous hardware message (or 0) */
2094 unsigned int wake_mask; /* wakeup bits mask */
2095 unsigned int changed_mask; /* changed bits mask */
2096 @REPLY
2097 user_handle_t win; /* window handle */
2098 unsigned int msg; /* message code */
2099 lparam_t wparam; /* parameters */
2100 lparam_t lparam; /* parameters */
2101 int type; /* message type */
2102 int x; /* message x position */
2103 int y; /* message y position */
2104 unsigned int time; /* message time */
2105 unsigned int active_hooks; /* active hooks bitmap */
2106 data_size_t total; /* total size of extra data */
2107 VARARG(data,message_data); /* message data for sent messages */
2108 @END
2111 /* Reply to a sent message */
2112 @REQ(reply_message)
2113 int remove; /* should we remove the message? */
2114 lparam_t result; /* message result */
2115 VARARG(data,bytes); /* message data for sent messages */
2116 @END
2119 /* Accept and remove the current hardware message */
2120 @REQ(accept_hardware_message)
2121 unsigned int hw_id; /* id of the hardware message */
2122 @END
2125 /* Retrieve the reply for the last message sent */
2126 @REQ(get_message_reply)
2127 int cancel; /* cancel message if not ready? */
2128 @REPLY
2129 lparam_t result; /* message result */
2130 VARARG(data,bytes); /* message data for sent messages */
2131 @END
2134 /* Set a window timer */
2135 @REQ(set_win_timer)
2136 user_handle_t win; /* window handle */
2137 unsigned int msg; /* message to post */
2138 unsigned int rate; /* timer rate in ms */
2139 lparam_t id; /* timer id */
2140 lparam_t lparam; /* message lparam (callback proc) */
2141 @REPLY
2142 lparam_t id; /* timer id */
2143 @END
2146 /* Kill a window timer */
2147 @REQ(kill_win_timer)
2148 user_handle_t win; /* window handle */
2149 lparam_t id; /* timer id */
2150 unsigned int msg; /* message to post */
2151 @END
2154 /* check if the thread owning the window is hung */
2155 @REQ(is_window_hung)
2156 user_handle_t win; /* window handle */
2157 @REPLY
2158 int is_hung;
2159 @END
2162 /* Retrieve info about a serial port */
2163 @REQ(get_serial_info)
2164 obj_handle_t handle; /* handle to comm port */
2165 int flags;
2166 @REPLY
2167 unsigned int eventmask;
2168 unsigned int cookie;
2169 unsigned int pending_write;
2170 @END
2173 /* Set info about a serial port */
2174 @REQ(set_serial_info)
2175 obj_handle_t handle; /* handle to comm port */
2176 int flags; /* bitmask to set values (see below) */
2177 @END
2178 #define SERIALINFO_PENDING_WRITE 0x04
2179 #define SERIALINFO_PENDING_WAIT 0x08
2181 /* Cancel all sync io on a thread */
2182 @REQ(cancel_sync)
2183 obj_handle_t handle; /* thread handle on which to cancel io */
2184 client_ptr_t iosb; /* I/O status block (NULL=all) */
2185 @END
2187 /* Create an async I/O */
2188 @REQ(register_async)
2189 int type; /* type of queue to look after */
2190 async_data_t async; /* async I/O parameters */
2191 int count; /* count - usually # of bytes to be read/written */
2192 @END
2193 #define ASYNC_TYPE_READ 0x01
2194 #define ASYNC_TYPE_WRITE 0x02
2195 #define ASYNC_TYPE_WAIT 0x03
2198 /* Cancel all async op on a fd */
2199 @REQ(cancel_async)
2200 obj_handle_t handle; /* handle to comm port, socket or file */
2201 client_ptr_t iosb; /* I/O status block (NULL=all) */
2202 int only_thread; /* cancel matching this thread */
2203 @END
2206 /* Retrieve results of an async */
2207 @REQ(get_async_result)
2208 client_ptr_t user_arg; /* user arg used to identify async */
2209 @REPLY
2210 VARARG(out_data,bytes); /* iosb output data */
2211 @END
2214 /* Notify direct completion of async and close the wait handle if not blocking */
2215 @REQ(set_async_direct_result)
2216 obj_handle_t handle; /* wait handle */
2217 apc_param_t information; /* IO_STATUS_BLOCK Information */
2218 unsigned int status; /* completion status */
2219 int mark_pending; /* set async to pending before completion? */
2220 @REPLY
2221 obj_handle_t handle; /* wait handle, or NULL if closed */
2222 @END
2225 /* Perform a read on a file object */
2226 @REQ(read)
2227 async_data_t async; /* async I/O parameters */
2228 file_pos_t pos; /* read position */
2229 @REPLY
2230 obj_handle_t wait; /* handle to wait on for blocking read */
2231 unsigned int options; /* device open options */
2232 VARARG(data,bytes); /* read data */
2233 @END
2236 /* Perform a write on a file object */
2237 @REQ(write)
2238 async_data_t async; /* async I/O parameters */
2239 file_pos_t pos; /* write position */
2240 VARARG(data,bytes); /* write data */
2241 @REPLY
2242 obj_handle_t wait; /* handle to wait on for blocking write */
2243 unsigned int options; /* device open options */
2244 data_size_t size; /* size written */
2245 @END
2248 /* Perform an ioctl on a file */
2249 @REQ(ioctl)
2250 ioctl_code_t code; /* ioctl code */
2251 async_data_t async; /* async I/O parameters */
2252 VARARG(in_data,bytes); /* ioctl input data */
2253 @REPLY
2254 obj_handle_t wait; /* handle to wait on for blocking ioctl */
2255 unsigned int options; /* device open options */
2256 VARARG(out_data,bytes); /* ioctl output data */
2257 @END
2260 /* Store results of an async irp */
2261 @REQ(set_irp_result)
2262 obj_handle_t handle; /* handle to the irp */
2263 unsigned int status; /* status of the irp */
2264 data_size_t size; /* result size (input or output depending on the operation) */
2265 VARARG(data,bytes); /* output data of the irp */
2266 @END
2269 /* Create a named pipe */
2270 @REQ(create_named_pipe)
2271 unsigned int access;
2272 unsigned int options;
2273 unsigned int sharing;
2274 unsigned int disposition;
2275 unsigned int maxinstances;
2276 unsigned int outsize;
2277 unsigned int insize;
2278 timeout_t timeout;
2279 unsigned int flags;
2280 VARARG(objattr,object_attributes); /* object attributes */
2281 @REPLY
2282 obj_handle_t handle; /* handle to the pipe */
2283 int created;
2284 @END
2286 /* flags in create_named_pipe and get_named_pipe_info */
2287 #define NAMED_PIPE_MESSAGE_STREAM_WRITE 0x0001
2288 #define NAMED_PIPE_MESSAGE_STREAM_READ 0x0002
2289 #define NAMED_PIPE_NONBLOCKING_MODE 0x0004
2290 #define NAMED_PIPE_SERVER_END 0x8000
2292 /* Set named pipe information by handle */
2293 @REQ(set_named_pipe_info)
2294 obj_handle_t handle;
2295 unsigned int flags;
2296 @END
2298 /* Create a window */
2299 @REQ(create_window)
2300 user_handle_t parent; /* parent window */
2301 user_handle_t owner; /* owner window */
2302 atom_t atom; /* class atom */
2303 mod_handle_t instance; /* module instance */
2304 int dpi; /* system DPI */
2305 int awareness; /* thread DPI awareness */
2306 unsigned int style; /* window style */
2307 unsigned int ex_style; /* window extended style */
2308 VARARG(class,unicode_str); /* class name */
2309 @REPLY
2310 user_handle_t handle; /* created window */
2311 user_handle_t parent; /* full handle of parent */
2312 user_handle_t owner; /* full handle of owner */
2313 int extra; /* number of extra bytes */
2314 client_ptr_t class_ptr; /* pointer to class in client address space */
2315 int dpi; /* window DPI if not per-monitor aware */
2316 int awareness; /* window DPI awareness */
2317 @END
2320 /* Destroy a window */
2321 @REQ(destroy_window)
2322 user_handle_t handle; /* handle to the window */
2323 @END
2326 /* Retrieve the desktop window for the current thread */
2327 @REQ(get_desktop_window)
2328 int force; /* force creation if it doesn't exist */
2329 @REPLY
2330 user_handle_t top_window; /* handle to the desktop window */
2331 user_handle_t msg_window; /* handle to the top-level HWND_MESSAGE parent */
2332 @END
2335 /* Set a window owner */
2336 @REQ(set_window_owner)
2337 user_handle_t handle; /* handle to the window */
2338 user_handle_t owner; /* new owner */
2339 @REPLY
2340 user_handle_t full_owner; /* full handle of new owner */
2341 user_handle_t prev_owner; /* full handle of previous owner */
2342 @END
2345 /* Get information from a window handle */
2346 @REQ(get_window_info)
2347 user_handle_t handle; /* handle to the window */
2348 @REPLY
2349 user_handle_t full_handle; /* full 32-bit handle */
2350 user_handle_t last_active; /* last active popup */
2351 process_id_t pid; /* process owning the window */
2352 thread_id_t tid; /* thread owning the window */
2353 atom_t atom; /* class atom */
2354 int is_unicode; /* ANSI or unicode */
2355 int dpi; /* window DPI */
2356 int awareness; /* DPI awareness */
2357 @END
2360 /* Set some information in a window */
2361 @REQ(set_window_info)
2362 unsigned short flags; /* flags for fields to set (see below) */
2363 short int is_unicode; /* ANSI or unicode */
2364 user_handle_t handle; /* handle to the window */
2365 unsigned int style; /* window style */
2366 unsigned int ex_style; /* window extended style */
2367 data_size_t extra_size; /* size to set in extra bytes */
2368 mod_handle_t instance; /* creator instance */
2369 lparam_t user_data; /* user-specific data */
2370 lparam_t extra_value; /* value to set in extra bytes or window id */
2371 int extra_offset; /* offset to set in extra bytes */
2372 @REPLY
2373 unsigned int old_style; /* old window style */
2374 unsigned int old_ex_style; /* old window extended style */
2375 mod_handle_t old_instance; /* old creator instance */
2376 lparam_t old_user_data; /* old user-specific data */
2377 lparam_t old_extra_value; /* old value in extra bytes */
2378 lparam_t old_id; /* old window id */
2379 @END
2380 #define SET_WIN_STYLE 0x01
2381 #define SET_WIN_EXSTYLE 0x02
2382 #define SET_WIN_ID 0x04
2383 #define SET_WIN_INSTANCE 0x08
2384 #define SET_WIN_USERDATA 0x10
2385 #define SET_WIN_EXTRA 0x20
2386 #define SET_WIN_UNICODE 0x40
2389 /* Set the parent of a window */
2390 @REQ(set_parent)
2391 user_handle_t handle; /* handle to the window */
2392 user_handle_t parent; /* handle to the parent */
2393 @REPLY
2394 user_handle_t old_parent; /* old parent window */
2395 user_handle_t full_parent; /* full handle of new parent */
2396 int dpi; /* new window DPI if not per-monitor aware */
2397 int awareness; /* new DPI awareness */
2398 @END
2401 /* Get a list of the window parents, up to the root of the tree */
2402 @REQ(get_window_parents)
2403 user_handle_t handle; /* handle to the window */
2404 @REPLY
2405 int count; /* total count of parents */
2406 VARARG(parents,user_handles); /* parent handles */
2407 @END
2410 /* Get a list of the window children */
2411 @REQ(get_window_children)
2412 obj_handle_t desktop; /* handle to desktop */
2413 user_handle_t parent; /* parent window */
2414 atom_t atom; /* class atom for the listed children */
2415 thread_id_t tid; /* thread owning the listed children */
2416 VARARG(class,unicode_str); /* class name */
2417 @REPLY
2418 int count; /* total count of children */
2419 VARARG(children,user_handles); /* children handles */
2420 @END
2423 /* Get a list of the window children that contain a given point */
2424 @REQ(get_window_children_from_point)
2425 user_handle_t parent; /* parent window */
2426 int x; /* point in parent coordinates */
2427 int y;
2428 int dpi; /* dpi for the point coordinates */
2429 @REPLY
2430 int count; /* total count of children */
2431 VARARG(children,user_handles); /* children handles */
2432 @END
2435 /* Get window tree information from a window handle */
2436 @REQ(get_window_tree)
2437 user_handle_t handle; /* handle to the window */
2438 @REPLY
2439 user_handle_t parent; /* parent window */
2440 user_handle_t owner; /* owner window */
2441 user_handle_t next_sibling; /* next sibling in Z-order */
2442 user_handle_t prev_sibling; /* prev sibling in Z-order */
2443 user_handle_t first_sibling; /* first sibling in Z-order */
2444 user_handle_t last_sibling; /* last sibling in Z-order */
2445 user_handle_t first_child; /* first child */
2446 user_handle_t last_child; /* last child */
2447 @END
2449 /* Set the position and Z order of a window */
2450 @REQ(set_window_pos)
2451 unsigned short swp_flags; /* SWP_* flags */
2452 unsigned short paint_flags; /* paint flags (see below) */
2453 user_handle_t handle; /* handle to the window */
2454 user_handle_t previous; /* previous window in Z order */
2455 rectangle_t window; /* window rectangle (in parent coords) */
2456 rectangle_t client; /* client rectangle (in parent coords) */
2457 VARARG(valid,rectangles); /* valid rectangles from WM_NCCALCSIZE (in parent coords) */
2458 @REPLY
2459 unsigned int new_style; /* new window style */
2460 unsigned int new_ex_style; /* new window extended style */
2461 user_handle_t surface_win; /* parent window that holds the surface */
2462 int needs_update; /* whether the surface region needs an update */
2463 @END
2464 #define SET_WINPOS_PAINT_SURFACE 0x01 /* window has a paintable surface */
2465 #define SET_WINPOS_PIXEL_FORMAT 0x02 /* window has a custom pixel format */
2467 /* Get the window and client rectangles of a window */
2468 @REQ(get_window_rectangles)
2469 user_handle_t handle; /* handle to the window */
2470 int relative; /* coords relative to (see below) */
2471 int dpi; /* DPI to map to, or zero for per-monitor DPI */
2472 @REPLY
2473 rectangle_t window; /* window rectangle */
2474 rectangle_t client; /* client rectangle */
2475 @END
2476 enum coords_relative
2478 COORDS_CLIENT, /* relative to client area */
2479 COORDS_WINDOW, /* relative to whole window area */
2480 COORDS_PARENT, /* relative to parent's client area */
2481 COORDS_SCREEN /* relative to screen origin */
2485 /* Get the window text */
2486 @REQ(get_window_text)
2487 user_handle_t handle; /* handle to the window */
2488 @REPLY
2489 data_size_t length; /* total length in WCHARs */
2490 VARARG(text,unicode_str); /* window text */
2491 @END
2494 /* Set the window text */
2495 @REQ(set_window_text)
2496 user_handle_t handle; /* handle to the window */
2497 VARARG(text,unicode_str); /* window text */
2498 @END
2501 /* Get the coordinates offset between two windows */
2502 @REQ(get_windows_offset)
2503 user_handle_t from; /* handle to the first window */
2504 user_handle_t to; /* handle to the second window */
2505 int dpi; /* DPI to map to, or zero for per-monitor DPI */
2506 @REPLY
2507 int x; /* x coordinate offset */
2508 int y; /* y coordinate offset */
2509 int mirror; /* whether to mirror the x coordinate */
2510 @END
2513 /* Get the visible region of a window */
2514 @REQ(get_visible_region)
2515 user_handle_t window; /* handle to the window */
2516 unsigned int flags; /* DCX flags */
2517 @REPLY
2518 user_handle_t top_win; /* top window to clip against */
2519 rectangle_t top_rect; /* top window visible rect with screen coords */
2520 rectangle_t win_rect; /* window rect in screen coords */
2521 unsigned int paint_flags; /* paint flags (from SET_WINPOS_* flags) */
2522 data_size_t total_size; /* total size of the resulting region */
2523 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2524 @END
2527 /* Get the visible surface region of a window */
2528 @REQ(get_surface_region)
2529 user_handle_t window; /* handle to the window */
2530 @REPLY
2531 rectangle_t visible_rect; /* window visible rect in screen coords */
2532 data_size_t total_size; /* total size of the resulting region */
2533 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2534 @END
2537 /* Get the window region */
2538 @REQ(get_window_region)
2539 user_handle_t window; /* handle to the window */
2540 @REPLY
2541 data_size_t total_size; /* total size of the resulting region */
2542 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2543 @END
2546 /* Set the window region */
2547 @REQ(set_window_region)
2548 user_handle_t window; /* handle to the window */
2549 int redraw; /* redraw the window? */
2550 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2551 @END
2554 /* Get the window update region */
2555 @REQ(get_update_region)
2556 user_handle_t window; /* handle to the window */
2557 user_handle_t from_child; /* child to start searching from */
2558 unsigned int flags; /* update flags (see below) */
2559 @REPLY
2560 user_handle_t child; /* child to repaint (or window itself) */
2561 unsigned int flags; /* resulting update flags (see below) */
2562 data_size_t total_size; /* total size of the resulting region */
2563 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2564 @END
2565 #define UPDATE_NONCLIENT 0x001 /* get region for repainting non-client area */
2566 #define UPDATE_ERASE 0x002 /* get region for erasing client area */
2567 #define UPDATE_PAINT 0x004 /* get region for painting client area */
2568 #define UPDATE_INTERNALPAINT 0x008 /* get region if internal paint is pending */
2569 #define UPDATE_ALLCHILDREN 0x010 /* force repaint of all children */
2570 #define UPDATE_NOCHILDREN 0x020 /* don't try to repaint any children */
2571 #define UPDATE_NOREGION 0x040 /* don't return a region, only the flags */
2572 #define UPDATE_DELAYED_ERASE 0x080 /* still needs erase after BeginPaint */
2573 #define UPDATE_CLIPCHILDREN 0x100 /* remove clipped children from the update region */
2576 /* Update the z order of a window so that a given rectangle is fully visible */
2577 @REQ(update_window_zorder)
2578 user_handle_t window; /* handle to the window */
2579 rectangle_t rect; /* rectangle that must be visible (in client coords) */
2580 @END
2583 /* Mark parts of a window as needing a redraw */
2584 @REQ(redraw_window)
2585 user_handle_t window; /* handle to the window */
2586 unsigned int flags; /* RDW_* flags */
2587 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2588 @END
2591 /* Set a window property */
2592 @REQ(set_window_property)
2593 user_handle_t window; /* handle to the window */
2594 lparam_t data; /* data to store */
2595 atom_t atom; /* property atom (if no name specified) */
2596 VARARG(name,unicode_str); /* property name */
2597 @END
2600 /* Remove a window property */
2601 @REQ(remove_window_property)
2602 user_handle_t window; /* handle to the window */
2603 atom_t atom; /* property atom (if no name specified) */
2604 VARARG(name,unicode_str); /* property name */
2605 @REPLY
2606 lparam_t data; /* data stored in property */
2607 @END
2610 /* Get a window property */
2611 @REQ(get_window_property)
2612 user_handle_t window; /* handle to the window */
2613 atom_t atom; /* property atom (if no name specified) */
2614 VARARG(name,unicode_str); /* property name */
2615 @REPLY
2616 lparam_t data; /* data stored in property */
2617 @END
2620 /* Get the list of properties of a window */
2621 @REQ(get_window_properties)
2622 user_handle_t window; /* handle to the window */
2623 @REPLY
2624 int total; /* total number of properties */
2625 VARARG(props,properties); /* list of properties */
2626 @END
2629 /* Create a window station */
2630 @REQ(create_winstation)
2631 unsigned int flags; /* window station flags */
2632 unsigned int access; /* wanted access rights */
2633 unsigned int attributes; /* object attributes */
2634 obj_handle_t rootdir; /* root directory */
2635 VARARG(name,unicode_str); /* object name */
2636 @REPLY
2637 obj_handle_t handle; /* handle to the window station */
2638 @END
2641 /* Open a handle to a window station */
2642 @REQ(open_winstation)
2643 unsigned int access; /* wanted access rights */
2644 unsigned int attributes; /* object attributes */
2645 obj_handle_t rootdir; /* root directory */
2646 VARARG(name,unicode_str); /* object name */
2647 @REPLY
2648 obj_handle_t handle; /* handle to the window station */
2649 @END
2652 /* Close a window station */
2653 @REQ(close_winstation)
2654 obj_handle_t handle; /* handle to the window station */
2655 @END
2658 /* Get the process current window station */
2659 @REQ(get_process_winstation)
2660 @REPLY
2661 obj_handle_t handle; /* handle to the window station */
2662 @END
2665 /* Set the process current window station */
2666 @REQ(set_process_winstation)
2667 obj_handle_t handle; /* handle to the window station */
2668 @END
2671 /* Enumerate window stations */
2672 @REQ(enum_winstation)
2673 unsigned int index; /* current index */
2674 @REPLY
2675 unsigned int next; /* next index */
2676 VARARG(name,unicode_str); /* window station name */
2677 @END
2680 /* Create a desktop */
2681 @REQ(create_desktop)
2682 unsigned int flags; /* desktop flags */
2683 unsigned int access; /* wanted access rights */
2684 unsigned int attributes; /* object attributes */
2685 VARARG(name,unicode_str); /* object name */
2686 @REPLY
2687 obj_handle_t handle; /* handle to the desktop */
2688 @END
2691 /* Open a handle to a desktop */
2692 @REQ(open_desktop)
2693 obj_handle_t winsta; /* window station to open (null allowed) */
2694 unsigned int flags; /* desktop flags */
2695 unsigned int access; /* wanted access rights */
2696 unsigned int attributes; /* object attributes */
2697 VARARG(name,unicode_str); /* object name */
2698 @REPLY
2699 obj_handle_t handle; /* handle to the desktop */
2700 @END
2703 /* Open a handle to current input desktop */
2704 @REQ(open_input_desktop)
2705 unsigned int flags; /* desktop flags */
2706 unsigned int access; /* wanted access rights */
2707 unsigned int attributes; /* object attributes */
2708 @REPLY
2709 obj_handle_t handle; /* handle to the desktop */
2710 @END
2713 /* Close a desktop */
2714 @REQ(close_desktop)
2715 obj_handle_t handle; /* handle to the desktop */
2716 @END
2719 /* Get the thread current desktop */
2720 @REQ(get_thread_desktop)
2721 thread_id_t tid; /* thread id */
2722 @REPLY
2723 obj_handle_t handle; /* handle to the desktop */
2724 @END
2727 /* Set the thread current desktop */
2728 @REQ(set_thread_desktop)
2729 obj_handle_t handle; /* handle to the desktop */
2730 @END
2733 /* Enumerate desktops */
2734 @REQ(enum_desktop)
2735 obj_handle_t winstation; /* handle to the window station */
2736 unsigned int index; /* current index */
2737 @REPLY
2738 unsigned int next; /* next index */
2739 VARARG(name,unicode_str); /* window station name */
2740 @END
2743 /* Get/set information about a user object (window station or desktop) */
2744 @REQ(set_user_object_info)
2745 obj_handle_t handle; /* handle to the object */
2746 unsigned int flags; /* information to set/get */
2747 unsigned int obj_flags; /* new object flags */
2748 @REPLY
2749 int is_desktop; /* is object a desktop? */
2750 unsigned int old_obj_flags; /* old object flags */
2751 VARARG(name,unicode_str); /* object name */
2752 @END
2753 #define SET_USER_OBJECT_SET_FLAGS 1
2754 #define SET_USER_OBJECT_GET_FULL_NAME 2
2757 /* Register a hotkey */
2758 @REQ(register_hotkey)
2759 user_handle_t window; /* handle to the window */
2760 int id; /* hotkey identifier */
2761 unsigned int flags; /* modifier keys */
2762 unsigned int vkey; /* virtual key code */
2763 @REPLY
2764 int replaced; /* did we replace an existing hotkey? */
2765 unsigned int flags; /* flags of replaced hotkey */
2766 unsigned int vkey; /* virtual key code of replaced hotkey */
2767 @END
2770 /* Unregister a hotkey */
2771 @REQ(unregister_hotkey)
2772 user_handle_t window; /* handle to the window */
2773 int id; /* hotkey identifier */
2774 @REPLY
2775 unsigned int flags; /* flags of removed hotkey */
2776 unsigned int vkey; /* virtual key code of removed hotkey */
2777 @END
2780 /* Attach (or detach) thread inputs */
2781 @REQ(attach_thread_input)
2782 thread_id_t tid_from; /* thread to be attached */
2783 thread_id_t tid_to; /* thread to which tid_from should be attached */
2784 int attach; /* is it an attach? */
2785 @END
2788 /* Get input data for a given thread */
2789 @REQ(get_thread_input)
2790 thread_id_t tid; /* id of thread */
2791 @REPLY
2792 user_handle_t focus; /* handle to the focus window */
2793 user_handle_t capture; /* handle to the capture window */
2794 user_handle_t active; /* handle to the active window */
2795 user_handle_t foreground; /* handle to the global foreground window */
2796 user_handle_t menu_owner; /* handle to the menu owner */
2797 user_handle_t move_size; /* handle to the moving/resizing window */
2798 user_handle_t caret; /* handle to the caret window */
2799 user_handle_t cursor; /* handle to the cursor */
2800 int show_count; /* cursor show count */
2801 rectangle_t rect; /* caret rectangle */
2802 @END
2805 /* Get the time of the last input event */
2806 @REQ(get_last_input_time)
2807 @REPLY
2808 unsigned int time;
2809 @END
2812 /* Retrieve queue keyboard state for current thread or global async state */
2813 @REQ(get_key_state)
2814 int async; /* whether to query the async state */
2815 int key; /* optional key code or -1 */
2816 @REPLY
2817 unsigned char state; /* state of specified key */
2818 VARARG(keystate,bytes); /* state array for all the keys */
2819 @END
2821 /* Set queue keyboard state for current thread */
2822 @REQ(set_key_state)
2823 int async; /* whether to change the async state too */
2824 VARARG(keystate,bytes); /* state array for all the keys */
2825 @END
2827 /* Set the system foreground window */
2828 @REQ(set_foreground_window)
2829 user_handle_t handle; /* handle to the foreground window */
2830 @REPLY
2831 user_handle_t previous; /* handle to the previous foreground window */
2832 int send_msg_old; /* whether we have to send a msg to the old window */
2833 int send_msg_new; /* whether we have to send a msg to the new window */
2834 @END
2836 /* Set the current thread focus window */
2837 @REQ(set_focus_window)
2838 user_handle_t handle; /* handle to the focus window */
2839 @REPLY
2840 user_handle_t previous; /* handle to the previous focus window */
2841 @END
2843 /* Set the current thread active window */
2844 @REQ(set_active_window)
2845 user_handle_t handle; /* handle to the active window */
2846 @REPLY
2847 user_handle_t previous; /* handle to the previous active window */
2848 @END
2850 /* Set the current thread capture window */
2851 @REQ(set_capture_window)
2852 user_handle_t handle; /* handle to the capture window */
2853 unsigned int flags; /* capture flags (see below) */
2854 @REPLY
2855 user_handle_t previous; /* handle to the previous capture window */
2856 user_handle_t full_handle; /* full 32-bit handle of new capture window */
2857 @END
2858 #define CAPTURE_MENU 0x01 /* capture is for a menu */
2859 #define CAPTURE_MOVESIZE 0x02 /* capture is for moving/resizing */
2862 /* Set the current thread caret window */
2863 @REQ(set_caret_window)
2864 user_handle_t handle; /* handle to the caret window */
2865 int width; /* caret width */
2866 int height; /* caret height */
2867 @REPLY
2868 user_handle_t previous; /* handle to the previous caret window */
2869 rectangle_t old_rect; /* previous caret rectangle */
2870 int old_hide; /* previous hide count */
2871 int old_state; /* previous caret state (1=on, 0=off) */
2872 @END
2875 /* Set the current thread caret information */
2876 @REQ(set_caret_info)
2877 unsigned int flags; /* caret flags (see below) */
2878 user_handle_t handle; /* handle to the caret window */
2879 int x; /* caret x position */
2880 int y; /* caret y position */
2881 int hide; /* increment for hide count (can be negative to show it) */
2882 int state; /* caret state (see below) */
2883 @REPLY
2884 user_handle_t full_handle; /* handle to the current caret window */
2885 rectangle_t old_rect; /* previous caret rectangle */
2886 int old_hide; /* previous hide count */
2887 int old_state; /* previous caret state (1=on, 0=off) */
2888 @END
2889 #define SET_CARET_POS 0x01 /* set the caret position from x,y */
2890 #define SET_CARET_HIDE 0x02 /* increment the caret hide count */
2891 #define SET_CARET_STATE 0x04 /* set the caret on/off state */
2892 enum caret_state
2894 CARET_STATE_OFF, /* off */
2895 CARET_STATE_ON, /* on */
2896 CARET_STATE_TOGGLE, /* toggle current state */
2897 CARET_STATE_ON_IF_MOVED /* on if the position differs, unchanged otherwise */
2901 /* Set a window hook */
2902 @REQ(set_hook)
2903 int id; /* id of the hook */
2904 process_id_t pid; /* id of process to set the hook into */
2905 thread_id_t tid; /* id of thread to set the hook into */
2906 int event_min;
2907 int event_max;
2908 client_ptr_t proc; /* hook procedure */
2909 int flags;
2910 int unicode; /* is it a unicode hook? */
2911 VARARG(module,unicode_str); /* module name */
2912 @REPLY
2913 user_handle_t handle; /* handle to the hook */
2914 unsigned int active_hooks; /* active hooks bitmap */
2915 @END
2918 /* Remove a window hook */
2919 @REQ(remove_hook)
2920 user_handle_t handle; /* handle to the hook */
2921 client_ptr_t proc; /* hook procedure if handle is 0 */
2922 int id; /* id of the hook if handle is 0 */
2923 @REPLY
2924 unsigned int active_hooks; /* active hooks bitmap */
2925 @END
2928 /* Start calling a hook chain */
2929 @REQ(start_hook_chain)
2930 int id; /* id of the hook */
2931 int event; /* signalled event */
2932 user_handle_t window; /* handle to the event window */
2933 int object_id; /* object id for out of context winevent */
2934 int child_id; /* child id for out of context winevent */
2935 @REPLY
2936 user_handle_t handle; /* handle to the next hook */
2937 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2938 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2939 int unicode; /* is it a unicode hook? */
2940 client_ptr_t proc; /* hook procedure */
2941 unsigned int active_hooks; /* active hooks bitmap */
2942 VARARG(module,unicode_str); /* module name */
2943 @END
2946 /* Finished calling a hook chain */
2947 @REQ(finish_hook_chain)
2948 int id; /* id of the hook */
2949 @END
2952 /* Get the hook information */
2953 @REQ(get_hook_info)
2954 user_handle_t handle; /* handle to the current hook */
2955 int get_next; /* do we want info about current or next hook? */
2956 int event; /* signalled event */
2957 user_handle_t window; /* handle to the event window */
2958 int object_id; /* object id for out of context winevent */
2959 int child_id; /* child id for out of context winevent */
2960 @REPLY
2961 user_handle_t handle; /* handle to the hook */
2962 int id; /* id of the hook */
2963 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2964 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2965 client_ptr_t proc; /* hook procedure */
2966 int unicode; /* is it a unicode hook? */
2967 VARARG(module,unicode_str); /* module name */
2968 @END
2971 /* Create a window class */
2972 @REQ(create_class)
2973 int local; /* is it a local class? */
2974 atom_t atom; /* class atom */
2975 unsigned int style; /* class style */
2976 mod_handle_t instance; /* module instance */
2977 int extra; /* number of extra class bytes */
2978 int win_extra; /* number of window extra bytes */
2979 client_ptr_t client_ptr; /* pointer to class in client address space */
2980 data_size_t name_offset; /* base class name offset for specified atom */
2981 VARARG(name,unicode_str); /* class name */
2982 @REPLY
2983 atom_t atom; /* resulting class atom */
2984 @END
2987 /* Destroy a window class */
2988 @REQ(destroy_class)
2989 atom_t atom; /* class atom */
2990 mod_handle_t instance; /* module instance */
2991 VARARG(name,unicode_str); /* class name */
2992 @REPLY
2993 client_ptr_t client_ptr; /* pointer to class in client address space */
2994 @END
2997 /* Set some information in a class */
2998 @REQ(set_class_info)
2999 user_handle_t window; /* handle to the window */
3000 unsigned int flags; /* flags for info to set (see below) */
3001 atom_t atom; /* class atom */
3002 unsigned int style; /* class style */
3003 int win_extra; /* number of window extra bytes */
3004 mod_handle_t instance; /* module instance */
3005 int extra_offset; /* offset to set in extra bytes */
3006 data_size_t extra_size; /* size to set in extra bytes */
3007 lparam_t extra_value; /* value to set in extra bytes */
3008 @REPLY
3009 atom_t old_atom; /* previous class atom */
3010 atom_t base_atom; /* base class atom */
3011 mod_handle_t old_instance; /* previous module instance */
3012 lparam_t old_extra_value; /* old value in extra bytes */
3013 unsigned int old_style; /* previous class style */
3014 int old_extra; /* previous number of class extra bytes */
3015 int old_win_extra; /* previous number of window extra bytes */
3016 @END
3017 #define SET_CLASS_ATOM 0x0001
3018 #define SET_CLASS_STYLE 0x0002
3019 #define SET_CLASS_WINEXTRA 0x0004
3020 #define SET_CLASS_INSTANCE 0x0008
3021 #define SET_CLASS_EXTRA 0x0010
3024 /* Open the clipboard */
3025 @REQ(open_clipboard)
3026 user_handle_t window; /* clipboard window */
3027 @REPLY
3028 user_handle_t owner; /* current clipboard owner */
3029 @END
3032 /* Close the clipboard */
3033 @REQ(close_clipboard)
3034 @REPLY
3035 user_handle_t viewer; /* first clipboard viewer */
3036 user_handle_t owner; /* current clipboard owner */
3037 @END
3040 /* Empty the clipboard and grab ownership */
3041 @REQ(empty_clipboard)
3042 @END
3045 /* Add a data format to the clipboard */
3046 @REQ(set_clipboard_data)
3047 unsigned int format; /* clipboard format of the data */
3048 unsigned int lcid; /* locale id to use for synthesizing text formats */
3049 VARARG(data,bytes); /* data contents */
3050 @REPLY
3051 unsigned int seqno; /* sequence number for the set data */
3052 @END
3055 /* Fetch a data format from the clipboard */
3056 @REQ(get_clipboard_data)
3057 unsigned int format; /* clipboard format of the data */
3058 int render; /* will we try to render it if missing? */
3059 int cached; /* do we already have it in the client-side cache? */
3060 unsigned int seqno; /* sequence number for the data in the cache */
3061 @REPLY
3062 unsigned int from; /* for synthesized data, format to generate it from */
3063 user_handle_t owner; /* clipboard owner for delayed-rendered formats */
3064 unsigned int seqno; /* sequence number for the originally set data */
3065 data_size_t total; /* total data size */
3066 VARARG(data,bytes); /* data contents */
3067 @END
3070 /* Retrieve a list of available formats */
3071 @REQ(get_clipboard_formats)
3072 unsigned int format; /* specific format to query, return all if 0 */
3073 @REPLY
3074 unsigned int count; /* count of available formats */
3075 VARARG(formats,uints); /* array of available formats */
3076 @END
3079 /* Retrieve the next available format */
3080 @REQ(enum_clipboard_formats)
3081 unsigned int previous; /* previous format, or first if 0 */
3082 @REPLY
3083 unsigned int format; /* next format */
3084 @END
3087 /* Release ownership of the clipboard */
3088 @REQ(release_clipboard)
3089 user_handle_t owner; /* clipboard owner to release */
3090 @REPLY
3091 user_handle_t viewer; /* first clipboard viewer */
3092 user_handle_t owner; /* current clipboard owner */
3093 @END
3096 /* Get clipboard information */
3097 @REQ(get_clipboard_info)
3098 @REPLY
3099 user_handle_t window; /* clipboard window */
3100 user_handle_t owner; /* clipboard owner */
3101 user_handle_t viewer; /* clipboard viewer */
3102 unsigned int seqno; /* current sequence number */
3103 @END
3106 /* Set the clipboard viewer window */
3107 @REQ(set_clipboard_viewer)
3108 user_handle_t viewer; /* clipboard viewer */
3109 user_handle_t previous; /* if non-zero, check that this was the previous viewer */
3110 @REPLY
3111 user_handle_t old_viewer; /* previous clipboard viewer */
3112 user_handle_t owner; /* clipboard owner */
3113 @END
3116 /* Add a clipboard listener window */
3117 @REQ(add_clipboard_listener)
3118 user_handle_t window; /* clipboard listener window */
3119 @END
3122 /* Remove a clipboard listener window */
3123 @REQ(remove_clipboard_listener)
3124 user_handle_t window; /* clipboard listener window */
3125 @END
3128 /* Open a security token */
3129 @REQ(open_token)
3130 obj_handle_t handle; /* handle to the thread or process */
3131 unsigned int access; /* access rights to the new token */
3132 unsigned int attributes;/* object attributes */
3133 unsigned int flags; /* flags (see below) */
3134 @REPLY
3135 obj_handle_t token; /* handle to the token */
3136 @END
3137 #define OPEN_TOKEN_THREAD 1
3138 #define OPEN_TOKEN_AS_SELF 2
3141 /* Set/get the global windows */
3142 @REQ(set_global_windows)
3143 unsigned int flags; /* flags for fields to set (see below) */
3144 user_handle_t shell_window; /* handle to the new shell window */
3145 user_handle_t shell_listview; /* handle to the new shell listview window */
3146 user_handle_t progman_window; /* handle to the new program manager window */
3147 user_handle_t taskman_window; /* handle to the new task manager window */
3148 @REPLY
3149 user_handle_t old_shell_window; /* handle to the shell window */
3150 user_handle_t old_shell_listview; /* handle to the shell listview window */
3151 user_handle_t old_progman_window; /* handle to the new program manager window */
3152 user_handle_t old_taskman_window; /* handle to the new task manager window */
3153 @END
3154 #define SET_GLOBAL_SHELL_WINDOWS 0x01 /* set both main shell and listview windows */
3155 #define SET_GLOBAL_PROGMAN_WINDOW 0x02
3156 #define SET_GLOBAL_TASKMAN_WINDOW 0x04
3158 /* Adjust the privileges held by a token */
3159 @REQ(adjust_token_privileges)
3160 obj_handle_t handle; /* handle to the token */
3161 int disable_all; /* disable all privileges? */
3162 int get_modified_state; /* get modified privileges? */
3163 VARARG(privileges,luid_attr); /* privileges to enable/disable/remove */
3164 @REPLY
3165 unsigned int len; /* total length in bytes required to store token privileges */
3166 VARARG(privileges,luid_attr); /* modified privileges */
3167 @END
3169 /* Retrieves the set of privileges held by or available to a token */
3170 @REQ(get_token_privileges)
3171 obj_handle_t handle; /* handle to the token */
3172 @REPLY
3173 unsigned int len; /* total length in bytes required to store token privileges */
3174 VARARG(privileges,luid_attr); /* privileges held by or available to a token */
3175 @END
3177 /* Check the token has the required privileges */
3178 @REQ(check_token_privileges)
3179 obj_handle_t handle; /* handle to the token */
3180 int all_required; /* are all the privileges required for the check to succeed? */
3181 VARARG(privileges,luid_attr); /* privileges to check */
3182 @REPLY
3183 int has_privileges; /* does the token have the required privileges? */
3184 VARARG(privileges,luid_attr); /* privileges held by or available to a token */
3185 @END
3187 @REQ(duplicate_token)
3188 obj_handle_t handle; /* handle to the token to duplicate */
3189 unsigned int access; /* access rights to the new token */
3190 int primary; /* is the new token to be a primary one? */
3191 int impersonation_level; /* impersonation level of the new token */
3192 VARARG(objattr,object_attributes); /* object attributes */
3193 @REPLY
3194 obj_handle_t new_handle; /* duplicated handle */
3195 @END
3197 @REQ(filter_token)
3198 obj_handle_t handle; /* handle to the token to duplicate */
3199 unsigned int flags; /* flags */
3200 data_size_t privileges_size; /* size of privileges */
3201 VARARG(privileges,luid_attr,privileges_size); /* privileges to remove from new token */
3202 VARARG(disable_sids,sid); /* array of groups to remove from new token */
3203 @REPLY
3204 obj_handle_t new_handle; /* filtered handle */
3205 @END
3207 @REQ(access_check)
3208 obj_handle_t handle; /* handle to the token */
3209 unsigned int desired_access; /* desired access to the object */
3210 generic_map_t mapping; /* mapping to specific rights */
3211 VARARG(sd,security_descriptor); /* security descriptor to check */
3212 @REPLY
3213 unsigned int access_granted; /* access rights actually granted */
3214 unsigned int access_status; /* was access granted? */
3215 unsigned int privileges_len; /* length needed to store privileges */
3216 VARARG(privileges,luid_attr); /* privileges used during access check */
3217 @END
3219 @REQ(get_token_sid)
3220 obj_handle_t handle; /* handle to the token */
3221 unsigned int which_sid; /* which SID to retrieve from the token */
3222 @REPLY
3223 data_size_t sid_len; /* length needed to store sid */
3224 VARARG(sid,sid); /* the sid specified by which_sid from the token */
3225 @END
3227 @REQ(get_token_groups)
3228 obj_handle_t handle; /* handle to the token */
3229 unsigned int attr_mask; /* mask for wanted attributes */
3230 @REPLY
3231 data_size_t attr_len; /* length needed to store attrs */
3232 data_size_t sid_len; /* length needed to store sids */
3233 VARARG(attrs,uints,attr_len); /* group attributes */
3234 VARARG(sids,sids); /* group sids */
3235 @END
3237 @REQ(get_token_default_dacl)
3238 obj_handle_t handle; /* handle to the token */
3239 @REPLY
3240 data_size_t acl_len; /* length needed to store access control list */
3241 VARARG(acl,acl); /* access control list */
3242 @END
3244 @REQ(set_token_default_dacl)
3245 obj_handle_t handle; /* handle to the token */
3246 VARARG(acl,acl); /* default dacl to set */
3247 @END
3249 @REQ(set_security_object)
3250 obj_handle_t handle; /* handle to the object */
3251 unsigned int security_info; /* which parts of security descriptor to set */
3252 VARARG(sd,security_descriptor); /* security descriptor to set */
3253 @END
3255 @REQ(get_security_object)
3256 obj_handle_t handle; /* handle to the object */
3257 unsigned int security_info; /* which parts of security descriptor to get */
3258 @REPLY
3259 unsigned int sd_len; /* buffer size needed for sd */
3260 VARARG(sd,security_descriptor); /* retrieved security descriptor */
3261 @END
3264 struct handle_info
3266 process_id_t owner;
3267 obj_handle_t handle;
3268 unsigned int access;
3269 unsigned int attributes;
3270 unsigned int type;
3273 /* Return a list of all opened handles */
3274 @REQ(get_system_handles)
3275 @REPLY
3276 unsigned int count; /* number of handles */
3277 VARARG(data,handle_infos); /* array of handle_infos */
3278 @END
3281 /* Create a mailslot */
3282 @REQ(create_mailslot)
3283 unsigned int access; /* wanted access rights */
3284 timeout_t read_timeout;
3285 unsigned int max_msgsize;
3286 VARARG(objattr,object_attributes); /* object attributes */
3287 @REPLY
3288 obj_handle_t handle; /* handle to the mailslot */
3289 @END
3292 /* Set mailslot information */
3293 @REQ(set_mailslot_info)
3294 obj_handle_t handle; /* handle to the mailslot */
3295 timeout_t read_timeout;
3296 unsigned int flags;
3297 @REPLY
3298 timeout_t read_timeout;
3299 unsigned int max_msgsize;
3300 @END
3301 #define MAILSLOT_SET_READ_TIMEOUT 1
3304 /* Create a directory object */
3305 @REQ(create_directory)
3306 unsigned int access; /* access flags */
3307 VARARG(objattr,object_attributes); /* object attributes */
3308 @REPLY
3309 obj_handle_t handle; /* handle to the directory */
3310 @END
3313 /* Open a directory object */
3314 @REQ(open_directory)
3315 unsigned int access; /* access flags */
3316 unsigned int attributes; /* object attributes */
3317 obj_handle_t rootdir; /* root directory */
3318 VARARG(directory_name,unicode_str); /* Directory name */
3319 @REPLY
3320 obj_handle_t handle; /* handle to the directory */
3321 @END
3324 /* Get a directory entry by index */
3325 @REQ(get_directory_entry)
3326 obj_handle_t handle; /* handle to the directory */
3327 unsigned int index; /* entry index */
3328 @REPLY
3329 data_size_t total_len; /* total length needed for strings */
3330 data_size_t name_len; /* length of the entry name in bytes */
3331 VARARG(name,unicode_str,name_len); /* entry name */
3332 VARARG(type,unicode_str); /* entry type */
3333 @END
3336 /* Create a symbolic link object */
3337 @REQ(create_symlink)
3338 unsigned int access; /* access flags */
3339 VARARG(objattr,object_attributes); /* object attributes */
3340 VARARG(target_name,unicode_str); /* target name */
3341 @REPLY
3342 obj_handle_t handle; /* handle to the symlink */
3343 @END
3346 /* Open a symbolic link object */
3347 @REQ(open_symlink)
3348 unsigned int access; /* access flags */
3349 unsigned int attributes; /* object attributes */
3350 obj_handle_t rootdir; /* root directory */
3351 VARARG(name,unicode_str); /* symlink name */
3352 @REPLY
3353 obj_handle_t handle; /* handle to the symlink */
3354 @END
3357 /* Query a symbolic link object */
3358 @REQ(query_symlink)
3359 obj_handle_t handle; /* handle to the symlink */
3360 @REPLY
3361 data_size_t total; /* total needed size for name */
3362 VARARG(target_name,unicode_str); /* target name */
3363 @END
3366 /* Query basic object information */
3367 @REQ(get_object_info)
3368 obj_handle_t handle; /* handle to the object */
3369 @REPLY
3370 unsigned int access; /* granted access mask */
3371 unsigned int ref_count; /* object ref count */
3372 unsigned int handle_count; /* object handle count */
3373 @END
3376 /* Query the full name of an object */
3377 @REQ(get_object_name)
3378 obj_handle_t handle; /* handle to the object */
3379 @REPLY
3380 data_size_t total; /* total needed size for name */
3381 VARARG(name,unicode_str); /* object name */
3382 @END
3385 /* Query object type name information */
3386 @REQ(get_object_type)
3387 obj_handle_t handle; /* handle to the object */
3388 @REPLY
3389 VARARG(info,object_type_info); /* type information */
3390 @END
3393 /* Query type information for all types */
3394 @REQ(get_object_types)
3395 @REPLY
3396 int count; /* total count of object types */
3397 VARARG(info,object_types_info); /* type information */
3398 @END
3401 /* Allocate a locally-unique identifier */
3402 @REQ(allocate_locally_unique_id)
3403 @REPLY
3404 struct luid luid;
3405 @END
3408 /* Create a device manager */
3409 @REQ(create_device_manager)
3410 unsigned int access; /* wanted access rights */
3411 unsigned int attributes; /* object attributes */
3412 @REPLY
3413 obj_handle_t handle; /* handle to the device */
3414 @END
3417 /* Create a device */
3418 @REQ(create_device)
3419 obj_handle_t rootdir; /* root directory */
3420 client_ptr_t user_ptr; /* opaque ptr for use by client */
3421 obj_handle_t manager; /* device manager */
3422 VARARG(name,unicode_str); /* object name */
3423 @END
3426 /* Delete a device */
3427 @REQ(delete_device)
3428 obj_handle_t manager; /* handle to the device manager */
3429 client_ptr_t device; /* pointer to the device */
3430 @END
3433 /* Retrieve the next pending device irp request */
3434 @REQ(get_next_device_request)
3435 obj_handle_t manager; /* handle to the device manager */
3436 obj_handle_t prev; /* handle to the previous irp */
3437 unsigned int status; /* status of the previous irp */
3438 client_ptr_t user_ptr; /* user pointer of the previous irp */
3439 int pending; /* was the previous irp marked pending? */
3440 unsigned int iosb_status; /* IOSB status of the previous irp */
3441 data_size_t result; /* IOSB result of the previous irp */
3442 VARARG(data,bytes); /* output data of the previous irp */
3443 @REPLY
3444 irp_params_t params; /* irp parameters */
3445 obj_handle_t next; /* handle to the next irp */
3446 thread_id_t client_tid; /* tid of thread calling irp */
3447 client_ptr_t client_thread; /* pointer to thread object of calling irp */
3448 data_size_t in_size; /* total needed input size */
3449 VARARG(next_data,bytes); /* input data of the next irp */
3450 @END
3453 /* Get kernel pointer from server object */
3454 @REQ(get_kernel_object_ptr)
3455 obj_handle_t manager; /* handle to the device manager */
3456 obj_handle_t handle; /* object handle */
3457 @REPLY
3458 client_ptr_t user_ptr; /* kernel object pointer */
3459 @END
3462 /* Associate kernel pointer with server object */
3463 @REQ(set_kernel_object_ptr)
3464 obj_handle_t manager; /* handle to the device manager */
3465 obj_handle_t handle; /* object handle */
3466 client_ptr_t user_ptr; /* kernel object pointer */
3467 @END
3470 /* Grab server object reference from kernel object pointer */
3471 @REQ(grab_kernel_object)
3472 obj_handle_t manager; /* handle to the device manager */
3473 client_ptr_t user_ptr; /* kernel object pointer */
3474 @END
3477 /* Release server object reference from kernel object pointer */
3478 @REQ(release_kernel_object)
3479 obj_handle_t manager; /* handle to the device manager */
3480 client_ptr_t user_ptr; /* kernel object pointer */
3481 @END
3484 /* Get handle from kernel object pointer */
3485 @REQ(get_kernel_object_handle)
3486 obj_handle_t manager; /* handle to the device manager */
3487 client_ptr_t user_ptr; /* kernel object pointer */
3488 unsigned int access; /* wanted access rights */
3489 @REPLY
3490 obj_handle_t handle; /* kernel object handle */
3491 @END
3494 /* Make the current process a system process */
3495 @REQ(make_process_system)
3496 obj_handle_t handle; /* handle to the process */
3497 @REPLY
3498 obj_handle_t event; /* event signaled when all user processes have exited */
3499 @END
3502 /* Get detailed fixed-size information about a token */
3503 @REQ(get_token_info)
3504 obj_handle_t handle; /* handle to the object */
3505 @REPLY
3506 struct luid token_id; /* locally-unique identifier of the token */
3507 struct luid modified_id; /* locally-unique identifier of the modified version of the token */
3508 unsigned int session_id; /* token session id */
3509 int primary; /* is the token primary or impersonation? */
3510 int impersonation_level; /* level of impersonation */
3511 int elevation; /* elevation type */
3512 int group_count; /* the number of groups the token is a member of */
3513 int privilege_count; /* the number of privileges the token has */
3514 @END
3517 /* Create a token which is an elevation counterpart to this token */
3518 @REQ(create_linked_token)
3519 obj_handle_t handle; /* handle to the token */
3520 @REPLY
3521 obj_handle_t linked; /* handle to the linked token */
3522 @END
3525 /* Create I/O completion port */
3526 @REQ(create_completion)
3527 unsigned int access; /* desired access to a port */
3528 unsigned int concurrent; /* max number of concurrent active threads */
3529 VARARG(objattr,object_attributes); /* object attributes */
3530 @REPLY
3531 obj_handle_t handle; /* port handle */
3532 @END
3535 /* Open I/O completion port */
3536 @REQ(open_completion)
3537 unsigned int access; /* desired access to a port */
3538 unsigned int attributes; /* object attributes */
3539 obj_handle_t rootdir; /* root directory */
3540 VARARG(filename,unicode_str); /* port name */
3541 @REPLY
3542 obj_handle_t handle; /* port handle */
3543 @END
3546 /* add completion to completion port */
3547 @REQ(add_completion)
3548 obj_handle_t handle; /* port handle */
3549 apc_param_t ckey; /* completion key */
3550 apc_param_t cvalue; /* completion value */
3551 apc_param_t information; /* IO_STATUS_BLOCK Information */
3552 unsigned int status; /* completion result */
3553 @END
3556 /* get completion from completion port queue */
3557 @REQ(remove_completion)
3558 obj_handle_t handle; /* port handle */
3559 @REPLY
3560 apc_param_t ckey; /* completion key */
3561 apc_param_t cvalue; /* completion value */
3562 apc_param_t information; /* IO_STATUS_BLOCK Information */
3563 unsigned int status; /* completion result */
3564 @END
3567 /* get completion queue depth */
3568 @REQ(query_completion)
3569 obj_handle_t handle; /* port handle */
3570 @REPLY
3571 unsigned int depth; /* completion queue depth */
3572 @END
3575 /* associate object with completion port */
3576 @REQ(set_completion_info)
3577 obj_handle_t handle; /* object handle */
3578 apc_param_t ckey; /* completion key */
3579 obj_handle_t chandle; /* port handle */
3580 @END
3583 /* check for associated completion and push msg */
3584 @REQ(add_fd_completion)
3585 obj_handle_t handle; /* async' object */
3586 apc_param_t cvalue; /* completion value */
3587 apc_param_t information; /* IO_STATUS_BLOCK Information */
3588 unsigned int status; /* completion status */
3589 int async; /* completion is an async result */
3590 @END
3593 /* set fd completion information */
3594 @REQ(set_fd_completion_mode)
3595 obj_handle_t handle; /* handle to a file or directory */
3596 unsigned int flags; /* completion notification flags */
3597 @END
3600 /* set fd disposition information */
3601 @REQ(set_fd_disp_info)
3602 obj_handle_t handle; /* handle to a file or directory */
3603 int unlink; /* whether to unlink file on close */
3604 @END
3607 /* set fd name information */
3608 @REQ(set_fd_name_info)
3609 obj_handle_t handle; /* handle to a file or directory */
3610 obj_handle_t rootdir; /* root directory */
3611 data_size_t namelen; /* length of NT name in bytes */
3612 int link; /* link instead of renaming */
3613 int replace; /* replace an existing file? */
3614 VARARG(name,unicode_str,namelen); /* NT name */
3615 VARARG(filename,string); /* new file name */
3616 @END
3619 /* set fd eof information */
3620 @REQ(set_fd_eof_info)
3621 obj_handle_t handle; /* handle to a file or directory */
3622 file_pos_t eof; /* offset of eof of file */
3623 @END
3626 /* Retrieve layered info for a window */
3627 @REQ(get_window_layered_info)
3628 user_handle_t handle; /* handle to the window */
3629 @REPLY
3630 unsigned int color_key; /* color key */
3631 unsigned int alpha; /* alpha (0..255) */
3632 unsigned int flags; /* LWA_* flags */
3633 @END
3636 /* Set layered info for a window */
3637 @REQ(set_window_layered_info)
3638 user_handle_t handle; /* handle to the window */
3639 unsigned int color_key; /* color key */
3640 unsigned int alpha; /* alpha (0..255) */
3641 unsigned int flags; /* LWA_* flags */
3642 @END
3645 /* Allocate an arbitrary user handle */
3646 @REQ(alloc_user_handle)
3647 @REPLY
3648 user_handle_t handle; /* allocated handle */
3649 @END
3652 /* Free an arbitrary user handle */
3653 @REQ(free_user_handle)
3654 user_handle_t handle; /* handle to free*/
3655 @END
3658 /* Set/get the current cursor */
3659 @REQ(set_cursor)
3660 unsigned int flags; /* flags for fields to set (see below) */
3661 user_handle_t handle; /* handle to the cursor */
3662 int show_count; /* show count increment/decrement */
3663 int x; /* cursor position */
3664 int y;
3665 rectangle_t clip; /* cursor clip rectangle */
3666 unsigned int clip_msg; /* message to post on cursor clip changes */
3667 @REPLY
3668 user_handle_t prev_handle; /* previous handle */
3669 int prev_count; /* previous show count */
3670 int prev_x; /* previous position */
3671 int prev_y;
3672 int new_x; /* new position */
3673 int new_y;
3674 rectangle_t new_clip; /* new clip rectangle */
3675 unsigned int last_change; /* time of last position change */
3676 @END
3677 #define SET_CURSOR_HANDLE 0x01
3678 #define SET_CURSOR_COUNT 0x02
3679 #define SET_CURSOR_POS 0x04
3680 #define SET_CURSOR_CLIP 0x08
3681 #define SET_CURSOR_NOCLIP 0x10
3683 /* Get the history of the 64 last cursor positions */
3684 @REQ(get_cursor_history)
3685 @REPLY
3686 VARARG(history,cursor_positions);
3687 @END
3690 /* Batch read rawinput message data */
3691 @REQ(get_rawinput_buffer)
3692 data_size_t rawinput_size; /* size of RAWINPUT structure */
3693 data_size_t buffer_size; /* size of output buffer */
3694 @REPLY
3695 data_size_t next_size; /* minimum size to get next message data */
3696 unsigned int count;
3697 VARARG(data,bytes);
3698 @END
3700 /* Modify the list of registered rawinput devices */
3701 @REQ(update_rawinput_devices)
3702 VARARG(devices,rawinput_devices);
3703 @END
3705 /* Create a new job object */
3706 @REQ(create_job)
3707 unsigned int access; /* wanted access rights */
3708 VARARG(objattr,object_attributes); /* object attributes */
3709 @REPLY
3710 obj_handle_t handle; /* handle to the job */
3711 @END
3714 /* Open a job object */
3715 @REQ(open_job)
3716 unsigned int access; /* wanted access rights */
3717 unsigned int attributes; /* object attributes */
3718 obj_handle_t rootdir; /* root directory */
3719 VARARG(name,unicode_str); /* object name */
3720 @REPLY
3721 obj_handle_t handle; /* handle to the job */
3722 @END
3725 /* Assign a job object to a process */
3726 @REQ(assign_job)
3727 obj_handle_t job; /* handle to the job */
3728 obj_handle_t process; /* handle to the process */
3729 @END
3732 /* Check if a process is associated with a job */
3733 @REQ(process_in_job)
3734 obj_handle_t job; /* handle to the job */
3735 obj_handle_t process; /* handle to the process */
3736 @END
3739 /* Set limit flags on a job */
3740 @REQ(set_job_limits)
3741 obj_handle_t handle; /* handle to the job */
3742 unsigned int limit_flags; /* new limit flags */
3743 @END
3746 /* Set new completion port for a job */
3747 @REQ(set_job_completion_port)
3748 obj_handle_t job; /* handle to the job */
3749 obj_handle_t port; /* handle to the completion port */
3750 client_ptr_t key; /* key to send with completion messages */
3751 @END
3754 /* Retrieve information about a job */
3755 @REQ(get_job_info)
3756 obj_handle_t handle; /* handle to the job */
3757 @REPLY
3758 int total_processes; /* total count of processes */
3759 int active_processes; /* count of running processes */
3760 VARARG(pids,uints); /* list of active pids */
3761 @END
3764 /* Terminate all processes associated with the job */
3765 @REQ(terminate_job)
3766 obj_handle_t handle; /* handle to the job */
3767 int status; /* process exit code */
3768 @END
3771 /* Suspend a process */
3772 @REQ(suspend_process)
3773 obj_handle_t handle; /* process handle */
3774 @END
3777 /* Resume a process */
3778 @REQ(resume_process)
3779 obj_handle_t handle; /* process handle */
3780 @END
3783 /* Iterate thread list for process */
3784 @REQ(get_next_thread)
3785 obj_handle_t process; /* process handle */
3786 obj_handle_t last; /* thread handle to start with */
3787 unsigned int access; /* desired access for returned handle */
3788 unsigned int attributes; /* returned handle attributes */
3789 unsigned int flags; /* controls iteration direction */
3790 @REPLY
3791 obj_handle_t handle; /* next thread handle */
3792 @END