wined3d: Move struct wined3d_sampler_gl to wined3d_gl.h.
[wine.git] / server / protocol.def
blob68008f8a02bc32073b57ac264baced57de11afa7
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 process_id_t process_group_id;
228 data_size_t curdir_len;
229 data_size_t dllpath_len;
230 data_size_t imagepath_len;
231 data_size_t cmdline_len;
232 data_size_t title_len;
233 data_size_t desktop_len;
234 data_size_t shellinfo_len;
235 data_size_t runtime_len;
236 /* VARARG(curdir,unicode_str,curdir_len); */
237 /* VARARG(dllpath,unicode_str,dllpath_len); */
238 /* VARARG(imagepath,unicode_str,imagepath_len); */
239 /* VARARG(cmdline,unicode_str,cmdline_len); */
240 /* VARARG(title,unicode_str,title_len); */
241 /* VARARG(desktop,unicode_str,desktop_len); */
242 /* VARARG(shellinfo,unicode_str,shellinfo_len); */
243 /* VARARG(runtime,unicode_str,runtime_len); */
244 } startup_info_t;
246 /* structure returned in the list of window properties */
247 typedef struct
249 atom_t atom; /* property atom */
250 int string; /* was atom a string originally? */
251 lparam_t data; /* data stored in property */
252 } property_data_t;
254 /* structure to specify window rectangles */
255 typedef struct
257 int left;
258 int top;
259 int right;
260 int bottom;
261 } rectangle_t;
263 /* structure for parameters of async I/O calls */
264 typedef struct
266 obj_handle_t handle; /* object to perform I/O on */
267 obj_handle_t event; /* event to signal when done */
268 client_ptr_t iosb; /* I/O status block in client addr space */
269 client_ptr_t user; /* opaque user data containing callback pointer and async-specific data */
270 client_ptr_t apc; /* user APC to call */
271 apc_param_t apc_context; /* user APC context or completion value */
272 } async_data_t;
274 /* structures for extra message data */
276 struct hw_msg_source
278 unsigned int device; /* source device (IMDT_* values) */
279 unsigned int origin; /* source origin (IMO_* values) */
282 union rawinput
284 int type;
285 struct
287 int type; /* RIM_TYPEKEYBOARD */
288 unsigned int message; /* message generated by this rawinput event */
289 unsigned short vkey; /* virtual key code */
290 unsigned short scan; /* scan code */
291 } kbd;
292 struct
294 int type; /* RIM_TYPEMOUSE */
295 int x; /* x coordinate */
296 int y; /* y coordinate */
297 unsigned int data; /* mouse data */
298 } mouse;
299 struct
301 int type; /* RIM_TYPEHID */
302 unsigned int device; /* rawinput device index */
303 unsigned int param; /* rawinput message param */
304 unsigned short usage_page;/* HID usage page */
305 unsigned short usage; /* HID usage */
306 unsigned int count; /* HID report count */
307 unsigned int length; /* HID report length */
308 } hid;
311 struct hardware_msg_data
313 lparam_t info; /* extra info */
314 data_size_t size; /* size of hardware message data */
315 int __pad;
316 unsigned int hw_id; /* unique id */
317 unsigned int flags; /* hook flags */
318 struct hw_msg_source source; /* message source */
319 union rawinput rawinput; /* rawinput message data */
322 struct callback_msg_data
324 client_ptr_t callback; /* callback function */
325 lparam_t data; /* user data for callback */
326 lparam_t result; /* message result */
329 struct winevent_msg_data
331 user_handle_t hook; /* hook handle */
332 thread_id_t tid; /* thread id */
333 client_ptr_t hook_proc; /* hook proc address */
334 /* followed by module name if any */
337 typedef union
339 int type;
340 struct
342 int type; /* INPUT_KEYBOARD */
343 unsigned short vkey; /* virtual key code */
344 unsigned short scan; /* scan code */
345 unsigned int flags; /* event flags */
346 unsigned int time; /* event time */
347 lparam_t info; /* extra info */
348 } kbd;
349 struct
351 int type; /* INPUT_MOUSE */
352 int x; /* coordinates */
353 int y;
354 unsigned int data; /* mouse data */
355 unsigned int flags; /* event flags */
356 unsigned int time; /* event time */
357 lparam_t info; /* extra info */
358 } mouse;
359 struct
361 int type; /* INPUT_HARDWARE */
362 unsigned int msg; /* message code */
363 lparam_t lparam; /* message param */
364 union rawinput rawinput;/* rawinput message data */
365 } hw;
366 } hw_input_t;
368 typedef union
370 unsigned char bytes[1]; /* raw data for sent messages */
371 struct hardware_msg_data hardware;
372 struct callback_msg_data callback;
373 struct winevent_msg_data winevent;
374 } message_data_t;
376 /* structure returned in filesystem events */
377 struct filesystem_event
379 int action;
380 data_size_t len;
381 char name[1];
384 struct luid
386 unsigned int low_part;
387 int high_part;
390 struct luid_attr
392 struct luid luid;
393 unsigned int attrs;
396 struct acl
398 unsigned char revision;
399 unsigned char pad1;
400 unsigned short size;
401 unsigned short count;
402 unsigned short pad2;
405 struct sid
407 unsigned char revision;
408 unsigned char sub_count;
409 unsigned char id_auth[6];
410 unsigned int sub_auth[15];
413 typedef struct
415 unsigned int read;
416 unsigned int write;
417 unsigned int exec;
418 unsigned int all;
419 } generic_map_t;
421 #define MAX_ACL_LEN 65535
423 struct security_descriptor
425 unsigned int control; /* SE_ flags */
426 data_size_t owner_len;
427 data_size_t group_len;
428 data_size_t sacl_len;
429 data_size_t dacl_len;
430 /* VARARG(owner,sid); */
431 /* VARARG(group,sid); */
432 /* VARARG(sacl,acl); */
433 /* VARARG(dacl,acl); */
436 struct object_attributes
438 obj_handle_t rootdir; /* root directory */
439 unsigned int attributes; /* object attributes */
440 data_size_t sd_len; /* length of security_descriptor data. may be 0 */
441 data_size_t name_len; /* length of the name string. may be 0 */
442 /* VARARG(sd,security_descriptor); */
443 /* VARARG(name,unicode_str); */
446 struct object_type_info
448 data_size_t name_len; /* length of the name string */
449 unsigned int index; /* type index in global table */
450 unsigned int obj_count; /* count of objects of this type */
451 unsigned int handle_count; /* count of handles of this type */
452 unsigned int obj_max; /* max count of objects of this type */
453 unsigned int handle_max; /* max count of handles of this type */
454 unsigned int valid_access; /* mask for valid access bits */
455 generic_map_t mapping; /* generic access mappings */
456 /* VARARG(name,unicode_str); */
459 enum select_op
461 SELECT_NONE,
462 SELECT_WAIT,
463 SELECT_WAIT_ALL,
464 SELECT_SIGNAL_AND_WAIT,
465 SELECT_KEYED_EVENT_WAIT,
466 SELECT_KEYED_EVENT_RELEASE
469 typedef union
471 enum select_op op;
472 struct
474 enum select_op op; /* SELECT_WAIT or SELECT_WAIT_ALL */
475 obj_handle_t handles[MAXIMUM_WAIT_OBJECTS];
476 int __pad;
477 } wait;
478 struct
480 enum select_op op; /* SELECT_SIGNAL_AND_WAIT */
481 obj_handle_t wait;
482 obj_handle_t signal; /* must be last in the structure so we can remove it on retries */
483 } signal_and_wait;
484 struct
486 enum select_op op; /* SELECT_KEYED_EVENT_WAIT or SELECT_KEYED_EVENT_RELEASE */
487 obj_handle_t handle;
488 client_ptr_t key;
489 } keyed_event;
490 } select_op_t;
492 enum apc_type
494 APC_NONE,
495 APC_USER,
496 APC_ASYNC_IO,
497 APC_VIRTUAL_ALLOC,
498 APC_VIRTUAL_ALLOC_EX,
499 APC_VIRTUAL_FREE,
500 APC_VIRTUAL_QUERY,
501 APC_VIRTUAL_PROTECT,
502 APC_VIRTUAL_FLUSH,
503 APC_VIRTUAL_LOCK,
504 APC_VIRTUAL_UNLOCK,
505 APC_MAP_VIEW,
506 APC_MAP_VIEW_EX,
507 APC_UNMAP_VIEW,
508 APC_CREATE_THREAD,
509 APC_DUP_HANDLE
512 typedef struct
514 enum apc_type type; /* APC_USER */
515 int __pad;
516 client_ptr_t func; /* void (__stdcall *func)(ULONG_PTR,ULONG_PTR,ULONG_PTR); */
517 apc_param_t args[3]; /* arguments for user function */
518 } user_apc_t;
520 typedef union
522 enum apc_type type;
523 user_apc_t user;
524 struct
526 enum apc_type type; /* APC_ASYNC_IO */
527 unsigned int status; /* I/O status */
528 client_ptr_t user; /* user pointer */
529 client_ptr_t sb; /* status block */
530 data_size_t result; /* result size */
531 } async_io;
532 struct
534 enum apc_type type; /* APC_VIRTUAL_ALLOC */
535 unsigned int op_type; /* type of operation */
536 client_ptr_t addr; /* requested address */
537 mem_size_t size; /* allocation size */
538 mem_size_t zero_bits; /* number of zero high bits */
539 unsigned int prot; /* memory protection flags */
540 } virtual_alloc;
541 struct
543 enum apc_type type; /* APC_VIRTUAL_ALLOC */
544 unsigned int op_type; /* type of operation */
545 client_ptr_t addr; /* requested address */
546 mem_size_t size; /* allocation size */
547 mem_size_t limit_low; /* allocation address limits */
548 mem_size_t limit_high;
549 mem_size_t align; /* allocation alignment */
550 unsigned int prot; /* memory protection flags */
551 unsigned int attributes; /* memory extended attributes */
552 } virtual_alloc_ex;
553 struct
555 enum apc_type type; /* APC_VIRTUAL_FREE */
556 unsigned int op_type; /* type of operation */
557 client_ptr_t addr; /* requested address */
558 mem_size_t size; /* allocation size */
559 } virtual_free;
560 struct
562 enum apc_type type; /* APC_VIRTUAL_QUERY */
563 int __pad;
564 client_ptr_t addr; /* requested address */
565 } virtual_query;
566 struct
568 enum apc_type type; /* APC_VIRTUAL_PROTECT */
569 unsigned int prot; /* new protection flags */
570 client_ptr_t addr; /* requested address */
571 mem_size_t size; /* requested size */
572 } virtual_protect;
573 struct
575 enum apc_type type; /* APC_VIRTUAL_FLUSH */
576 int __pad;
577 client_ptr_t addr; /* requested address */
578 mem_size_t size; /* requested size */
579 } virtual_flush;
580 struct
582 enum apc_type type; /* APC_VIRTUAL_LOCK */
583 int __pad;
584 client_ptr_t addr; /* requested address */
585 mem_size_t size; /* requested size */
586 } virtual_lock;
587 struct
589 enum apc_type type; /* APC_VIRTUAL_UNLOCK */
590 int __pad;
591 client_ptr_t addr; /* requested address */
592 mem_size_t size; /* requested size */
593 } virtual_unlock;
594 struct
596 enum apc_type type; /* APC_MAP_VIEW */
597 obj_handle_t handle; /* mapping handle */
598 client_ptr_t addr; /* requested address */
599 mem_size_t size; /* allocation size */
600 file_pos_t offset; /* file offset */
601 mem_size_t zero_bits; /* number of zero high bits */
602 unsigned int alloc_type; /* allocation type */
603 unsigned int prot; /* memory protection flags */
604 } map_view;
605 struct
607 enum apc_type type; /* APC_MAP_VIEW_EX */
608 obj_handle_t handle; /* mapping handle */
609 client_ptr_t addr; /* requested address */
610 mem_size_t size; /* allocation size */
611 file_pos_t offset; /* file offset */
612 mem_size_t limit_low; /* allocation address limits */
613 mem_size_t limit_high;
614 unsigned int alloc_type; /* allocation type */
615 unsigned int prot; /* memory protection flags */
616 unsigned short machine; /* requested machine for image mappings */
617 unsigned short __pad[3];
618 } map_view_ex;
619 struct
621 enum apc_type type; /* APC_UNMAP_VIEW */
622 unsigned int flags; /* unmap flags */
623 client_ptr_t addr; /* view address */
624 } unmap_view;
625 struct
627 enum apc_type type; /* APC_CREATE_THREAD */
628 unsigned int flags; /* creation flags */
629 client_ptr_t func; /* void (__stdcall *func)(void*); start function */
630 client_ptr_t arg; /* argument for start function */
631 mem_size_t zero_bits; /* number of zero high bits for thread stack */
632 mem_size_t reserve; /* reserve size for thread stack */
633 mem_size_t commit; /* commit size for thread stack */
634 } create_thread;
635 struct
637 enum apc_type type; /* APC_DUP_HANDLE */
638 obj_handle_t src_handle; /* src handle to duplicate */
639 obj_handle_t dst_process; /* dst process handle */
640 unsigned int access; /* wanted access rights */
641 unsigned int attributes; /* object attributes */
642 unsigned int options; /* duplicate options */
643 } dup_handle;
644 } apc_call_t;
646 typedef union
648 enum apc_type type;
649 struct
651 enum apc_type type; /* APC_ASYNC_IO */
652 unsigned int status; /* new status of async operation */
653 unsigned int total; /* bytes transferred */
654 } async_io;
655 struct
657 enum apc_type type; /* APC_VIRTUAL_ALLOC */
658 unsigned int status; /* status returned by call */
659 client_ptr_t addr; /* resulting address */
660 mem_size_t size; /* resulting size */
661 } virtual_alloc;
662 struct
664 enum apc_type type; /* APC_VIRTUAL_ALLOC_EX */
665 unsigned int status; /* status returned by call */
666 client_ptr_t addr; /* resulting address */
667 mem_size_t size; /* resulting size */
668 } virtual_alloc_ex;
669 struct
671 enum apc_type type; /* APC_VIRTUAL_FREE */
672 unsigned int status; /* status returned by call */
673 client_ptr_t addr; /* resulting address */
674 mem_size_t size; /* resulting size */
675 } virtual_free;
676 struct
678 enum apc_type type; /* APC_VIRTUAL_QUERY */
679 unsigned int status; /* status returned by call */
680 client_ptr_t base; /* resulting base address */
681 client_ptr_t alloc_base;/* resulting allocation base */
682 mem_size_t size; /* resulting region size */
683 unsigned short state; /* resulting region state */
684 unsigned short prot; /* resulting region protection */
685 unsigned short alloc_prot;/* resulting allocation protection */
686 unsigned short alloc_type;/* resulting region allocation type */
687 } virtual_query;
688 struct
690 enum apc_type type; /* APC_VIRTUAL_PROTECT */
691 unsigned int status; /* status returned by call */
692 client_ptr_t addr; /* resulting address */
693 mem_size_t size; /* resulting size */
694 unsigned int prot; /* old protection flags */
695 } virtual_protect;
696 struct
698 enum apc_type type; /* APC_VIRTUAL_FLUSH */
699 unsigned int status; /* status returned by call */
700 client_ptr_t addr; /* resulting address */
701 mem_size_t size; /* resulting size */
702 } virtual_flush;
703 struct
705 enum apc_type type; /* APC_VIRTUAL_LOCK */
706 unsigned int status; /* status returned by call */
707 client_ptr_t addr; /* resulting address */
708 mem_size_t size; /* resulting size */
709 } virtual_lock;
710 struct
712 enum apc_type type; /* APC_VIRTUAL_UNLOCK */
713 unsigned int status; /* status returned by call */
714 client_ptr_t addr; /* resulting address */
715 mem_size_t size; /* resulting size */
716 } virtual_unlock;
717 struct
719 enum apc_type type; /* APC_MAP_VIEW */
720 unsigned int status; /* status returned by call */
721 client_ptr_t addr; /* resulting address */
722 mem_size_t size; /* resulting size */
723 } map_view;
724 struct
726 enum apc_type type; /* APC_MAP_VIEW_EX */
727 unsigned int status; /* status returned by call */
728 client_ptr_t addr; /* resulting address */
729 mem_size_t size; /* resulting size */
730 } map_view_ex;
731 struct
733 enum apc_type type; /* APC_UNMAP_VIEW */
734 unsigned int status; /* status returned by call */
735 } unmap_view;
736 struct
738 enum apc_type type; /* APC_CREATE_THREAD */
739 unsigned int status; /* status returned by call */
740 process_id_t pid; /* process id */
741 thread_id_t tid; /* thread id */
742 client_ptr_t teb; /* thread teb (in process address space) */
743 obj_handle_t handle; /* handle to new thread */
744 } create_thread;
745 struct
747 enum apc_type type; /* APC_DUP_HANDLE */
748 unsigned int status; /* status returned by call */
749 obj_handle_t handle; /* duplicated handle in dst process */
750 } dup_handle;
751 struct
753 enum apc_type type; /* APC_BREAK_PROCESS */
754 unsigned int status; /* status returned by call */
755 } break_process;
756 } apc_result_t;
758 enum irp_type
760 IRP_CALL_NONE,
761 IRP_CALL_CREATE,
762 IRP_CALL_CLOSE,
763 IRP_CALL_READ,
764 IRP_CALL_WRITE,
765 IRP_CALL_FLUSH,
766 IRP_CALL_IOCTL,
767 IRP_CALL_VOLUME,
768 IRP_CALL_FREE,
769 IRP_CALL_CANCEL
772 typedef union
774 enum irp_type type; /* irp call type */
775 struct
777 enum irp_type type; /* IRP_CALL_CREATE */
778 unsigned int access; /* access rights */
779 unsigned int sharing; /* sharing flags */
780 unsigned int options; /* file options */
781 client_ptr_t device; /* opaque ptr for the device */
782 obj_handle_t file; /* file handle */
783 } create;
784 struct
786 enum irp_type type; /* IRP_CALL_CLOSE */
787 int __pad;
788 client_ptr_t file; /* opaque ptr for the file object */
789 } close;
790 struct
792 enum irp_type type; /* IRP_CALL_READ */
793 unsigned int key; /* driver key */
794 data_size_t out_size; /* needed output size */
795 int __pad;
796 client_ptr_t file; /* opaque ptr for the file object */
797 file_pos_t pos; /* file position */
798 } read;
799 struct
801 enum irp_type type; /* IRP_CALL_WRITE */
802 unsigned int key; /* driver key */
803 client_ptr_t file; /* opaque ptr for the file object */
804 file_pos_t pos; /* file position */
805 } write;
806 struct
808 enum irp_type type; /* IRP_CALL_FLUSH */
809 int __pad;
810 client_ptr_t file; /* opaque ptr for the file object */
811 } flush;
812 struct
814 enum irp_type type; /* IRP_CALL_IOCTL */
815 ioctl_code_t code; /* ioctl code */
816 data_size_t out_size; /* needed output size */
817 int __pad;
818 client_ptr_t file; /* opaque ptr for the file object */
819 } ioctl;
820 struct
822 enum irp_type type; /* IRP_CALL_VOLUME */
823 unsigned int info_class;/* information class */
824 data_size_t out_size; /* needed output size */
825 int __pad;
826 client_ptr_t file; /* opaque ptr for the file object */
827 } volume;
828 struct
830 enum irp_type type; /* IRP_CALL_FREE */
831 int __pad;
832 client_ptr_t obj; /* opaque ptr for the freed object */
833 } free;
834 struct
836 enum irp_type type; /* IRP_CALL_CANCEL */
837 int __pad;
838 client_ptr_t irp; /* opaque ptr for canceled irp */
839 } cancel;
840 } irp_params_t;
842 /* information about a PE image mapping, roughly equivalent to SECTION_IMAGE_INFORMATION */
843 typedef struct
845 client_ptr_t base;
846 mem_size_t stack_size;
847 mem_size_t stack_commit;
848 unsigned int entry_point;
849 unsigned int map_size;
850 unsigned int zerobits;
851 unsigned int subsystem;
852 unsigned short subsystem_minor;
853 unsigned short subsystem_major;
854 unsigned short osversion_major;
855 unsigned short osversion_minor;
856 unsigned short image_charact;
857 unsigned short dll_charact;
858 unsigned short machine;
859 unsigned char contains_code : 1;
860 unsigned char wine_builtin : 1;
861 unsigned char wine_fakedll : 1;
862 unsigned char image_flags;
863 unsigned int loader_flags;
864 unsigned int header_size;
865 unsigned int file_size;
866 unsigned int checksum;
867 unsigned int dbg_offset;
868 unsigned int dbg_size;
869 } pe_image_info_t;
870 #define IMAGE_FLAGS_ComPlusNativeReady 0x01
871 #define IMAGE_FLAGS_ComPlusILOnly 0x02
872 #define IMAGE_FLAGS_ImageDynamicallyRelocated 0x04
873 #define IMAGE_FLAGS_ImageMappedFlat 0x08
874 #define IMAGE_FLAGS_BaseBelow4gb 0x10
875 #define IMAGE_FLAGS_ComPlusPrefer32bit 0x20
877 struct rawinput_device
879 unsigned short usage_page;
880 unsigned short usage;
881 unsigned int flags;
882 user_handle_t target;
885 typedef struct
887 int x;
888 int y;
889 unsigned int time;
890 int __pad;
891 lparam_t info;
892 } cursor_pos_t;
894 /****************************************************************/
895 /* Request declarations */
897 /* Create a new process from the context of the parent */
898 @REQ(new_process)
899 obj_handle_t token; /* process token */
900 obj_handle_t debug; /* process debug object */
901 obj_handle_t parent_process; /* parent process */
902 unsigned int flags; /* process creation flags */
903 int socket_fd; /* file descriptor for process socket */
904 unsigned int access; /* access rights for process object */
905 unsigned short machine; /* architecture that the new process will use */
906 data_size_t info_size; /* size of startup info */
907 data_size_t handles_size; /* length of explicit handles list */
908 data_size_t jobs_size; /* length of jobs list */
909 VARARG(objattr,object_attributes); /* object attributes */
910 VARARG(handles,uints,handles_size); /* handles list */
911 VARARG(jobs,uints,jobs_size); /* jobs list */
912 VARARG(info,startup_info,info_size); /* startup information */
913 VARARG(env,unicode_str); /* environment for new process */
914 @REPLY
915 obj_handle_t info; /* new process info handle */
916 process_id_t pid; /* process id */
917 obj_handle_t handle; /* process handle (in the current process) */
918 @END
921 /* Retrieve information about a newly started process */
922 @REQ(get_new_process_info)
923 obj_handle_t info; /* info handle returned from new_process_request */
924 @REPLY
925 int success; /* did the process start successfully? */
926 int exit_code; /* process exit code if failed */
927 @END
930 /* Create a new thread */
931 @REQ(new_thread)
932 obj_handle_t process; /* process in which to create thread */
933 unsigned int access; /* wanted access rights */
934 unsigned int flags; /* thread creation flags */
935 int request_fd; /* fd for request pipe */
936 VARARG(objattr,object_attributes); /* object attributes */
937 @REPLY
938 thread_id_t tid; /* thread id */
939 obj_handle_t handle; /* thread handle (in the current process) */
940 @END
943 /* Retrieve the new process startup info */
944 @REQ(get_startup_info)
945 @REPLY
946 data_size_t info_size; /* size of startup info */
947 unsigned short machine; /* architecture for the new process */
948 VARARG(info,startup_info,info_size); /* startup information */
949 VARARG(env,unicode_str); /* environment */
950 @END
953 /* Signal the end of the process initialization */
954 @REQ(init_process_done)
955 client_ptr_t teb; /* TEB of new thread (in process address space) */
956 client_ptr_t peb; /* PEB of new process (in process address space) */
957 client_ptr_t ldt_copy; /* address of LDT copy (in process address space) */
958 @REPLY
959 client_ptr_t entry; /* process entry point */
960 int suspend; /* is process suspended? */
961 @END
964 /* Initialize the first thread of a new process */
965 @REQ(init_first_thread)
966 int unix_pid; /* Unix pid of new process */
967 int unix_tid; /* Unix tid of new thread */
968 int debug_level; /* new debug level */
969 int reply_fd; /* fd for reply pipe */
970 int wait_fd; /* fd for blocking calls pipe */
971 @REPLY
972 process_id_t pid; /* process id of the new thread's process */
973 thread_id_t tid; /* thread id of the new thread */
974 timeout_t server_start; /* server start time */
975 unsigned int session_id; /* process session id */
976 data_size_t info_size; /* total size of startup info */
977 VARARG(machines,ushorts); /* array of supported machines */
978 @END
981 /* Initialize a new thread; called from the child after pthread_create() */
982 @REQ(init_thread)
983 int unix_tid; /* Unix tid of new thread */
984 int reply_fd; /* fd for reply pipe */
985 int wait_fd; /* fd for blocking calls pipe */
986 client_ptr_t teb; /* TEB of new thread (in thread address space) */
987 client_ptr_t entry; /* entry point (in thread address space) */
988 @REPLY
989 int suspend; /* is thread suspended? */
990 @END
993 /* Terminate a process */
994 @REQ(terminate_process)
995 obj_handle_t handle; /* process handle to terminate */
996 int exit_code; /* process exit code */
997 @REPLY
998 int self; /* suicide? */
999 @END
1002 /* Terminate a thread */
1003 @REQ(terminate_thread)
1004 obj_handle_t handle; /* thread handle to terminate */
1005 int exit_code; /* thread exit code */
1006 @REPLY
1007 int self; /* suicide? */
1008 @END
1011 /* Retrieve information about a process */
1012 @REQ(get_process_info)
1013 obj_handle_t handle; /* process handle */
1014 @REPLY
1015 process_id_t pid; /* server process id */
1016 process_id_t ppid; /* server process id of parent */
1017 affinity_t affinity; /* process affinity mask */
1018 client_ptr_t peb; /* PEB address in process address space */
1019 timeout_t start_time; /* process start time */
1020 timeout_t end_time; /* process end time */
1021 unsigned int session_id; /* process session id */
1022 int exit_code; /* process exit code */
1023 int priority; /* priority class */
1024 unsigned short machine; /* process architecture */
1025 VARARG(image,pe_image_info); /* image info for main exe */
1026 @END
1029 /* Retrieve debug information about a process */
1030 @REQ(get_process_debug_info)
1031 obj_handle_t handle; /* process handle */
1032 @REPLY
1033 obj_handle_t debug; /* handle to debug port */
1034 int debug_children; /* inherit debugger to child processes */
1035 VARARG(image,pe_image_info); /* image info for main exe */
1036 @END
1039 /* Fetch the name of the process image */
1040 @REQ(get_process_image_name)
1041 obj_handle_t handle; /* process handle */
1042 int win32; /* return a win32 filename? */
1043 @REPLY
1044 data_size_t len; /* len in bytes required to store filename */
1045 VARARG(name,unicode_str); /* image name for main exe */
1046 @END
1049 /* Retrieve information about a process memory usage */
1050 @REQ(get_process_vm_counters)
1051 obj_handle_t handle; /* process handle */
1052 @REPLY
1053 mem_size_t peak_virtual_size; /* peak virtual memory in bytes */
1054 mem_size_t virtual_size; /* virtual memory in bytes */
1055 mem_size_t peak_working_set_size; /* peak real memory in bytes */
1056 mem_size_t working_set_size; /* real memory in bytes */
1057 mem_size_t pagefile_usage; /* commit charge in bytes */
1058 mem_size_t peak_pagefile_usage; /* peak commit charge in bytes */
1059 @END
1062 /* Set a process information */
1063 @REQ(set_process_info)
1064 obj_handle_t handle; /* process handle */
1065 int mask; /* setting mask (see below) */
1066 int priority; /* priority class */
1067 affinity_t affinity; /* affinity mask */
1068 @END
1069 #define SET_PROCESS_INFO_PRIORITY 0x01
1070 #define SET_PROCESS_INFO_AFFINITY 0x02
1073 /* Retrieve information about a thread */
1074 @REQ(get_thread_info)
1075 obj_handle_t handle; /* thread handle */
1076 unsigned int access; /* required access rights */
1077 @REPLY
1078 process_id_t pid; /* server process id */
1079 thread_id_t tid; /* server thread id */
1080 client_ptr_t teb; /* thread teb pointer */
1081 client_ptr_t entry_point; /* thread entry point */
1082 affinity_t affinity; /* thread affinity mask */
1083 int exit_code; /* thread exit code */
1084 int priority; /* thread priority level */
1085 int last; /* last thread in process */
1086 int suspend_count; /* thread suspend count */
1087 int dbg_hidden; /* thread hidden from debugger */
1088 data_size_t desc_len; /* description length in bytes */
1089 VARARG(desc,unicode_str); /* description string */
1090 @END
1093 /* Retrieve information about thread times */
1094 @REQ(get_thread_times)
1095 obj_handle_t handle; /* thread handle */
1096 @REPLY
1097 timeout_t creation_time; /* thread creation time */
1098 timeout_t exit_time; /* thread exit time */
1099 int unix_pid; /* thread native pid */
1100 int unix_tid; /* thread native pid */
1101 @END
1104 /* Set a thread information */
1105 @REQ(set_thread_info)
1106 obj_handle_t handle; /* thread handle */
1107 int mask; /* setting mask (see below) */
1108 int priority; /* priority class */
1109 affinity_t affinity; /* affinity mask */
1110 client_ptr_t entry_point; /* thread entry point */
1111 obj_handle_t token; /* impersonation token */
1112 VARARG(desc,unicode_str); /* description string */
1113 @END
1114 #define SET_THREAD_INFO_PRIORITY 0x01
1115 #define SET_THREAD_INFO_AFFINITY 0x02
1116 #define SET_THREAD_INFO_TOKEN 0x04
1117 #define SET_THREAD_INFO_ENTRYPOINT 0x08
1118 #define SET_THREAD_INFO_DESCRIPTION 0x10
1119 #define SET_THREAD_INFO_DBG_HIDDEN 0x20
1122 /* Suspend a thread */
1123 @REQ(suspend_thread)
1124 obj_handle_t handle; /* thread handle */
1125 @REPLY
1126 int count; /* new suspend count */
1127 @END
1130 /* Resume a thread */
1131 @REQ(resume_thread)
1132 obj_handle_t handle; /* thread handle */
1133 @REPLY
1134 int count; /* new suspend count */
1135 @END
1138 /* Queue an APC for a thread or process */
1139 @REQ(queue_apc)
1140 obj_handle_t handle; /* thread or process handle */
1141 VARARG(call,apc_call); /* call arguments */
1142 @REPLY
1143 obj_handle_t handle; /* APC handle */
1144 int self; /* run APC in caller itself? */
1145 @END
1148 /* Get the result of an APC call */
1149 @REQ(get_apc_result)
1150 obj_handle_t handle; /* handle to the APC */
1151 @REPLY
1152 apc_result_t result; /* result of the APC */
1153 @END
1156 /* Close a handle for the current process */
1157 @REQ(close_handle)
1158 obj_handle_t handle; /* handle to close */
1159 @END
1162 /* Set a handle information */
1163 @REQ(set_handle_info)
1164 obj_handle_t handle; /* handle we are interested in */
1165 int flags; /* new handle flags */
1166 int mask; /* mask for flags to set */
1167 @REPLY
1168 int old_flags; /* old flag value */
1169 @END
1172 /* Duplicate a handle */
1173 @REQ(dup_handle)
1174 obj_handle_t src_process; /* src process handle */
1175 obj_handle_t src_handle; /* src handle to duplicate */
1176 obj_handle_t dst_process; /* dst process handle */
1177 unsigned int access; /* wanted access rights */
1178 unsigned int attributes; /* object attributes */
1179 unsigned int options; /* duplicate options */
1180 @REPLY
1181 obj_handle_t handle; /* duplicated handle in dst process */
1182 @END
1185 /* Test if two handles refer to the same object */
1186 @REQ(compare_objects)
1187 obj_handle_t first; /* first object handle */
1188 obj_handle_t second; /* second object handle */
1189 @END
1192 /* Make an object temporary */
1193 @REQ(make_temporary)
1194 obj_handle_t handle; /* handle to the object */
1195 @END
1198 /* Open a handle to a process */
1199 @REQ(open_process)
1200 process_id_t pid; /* process id to open */
1201 unsigned int access; /* wanted access rights */
1202 unsigned int attributes; /* object attributes */
1203 @REPLY
1204 obj_handle_t handle; /* handle to the process */
1205 @END
1208 /* Open a handle to a thread */
1209 @REQ(open_thread)
1210 thread_id_t tid; /* thread id to open */
1211 unsigned int access; /* wanted access rights */
1212 unsigned int attributes; /* object attributes */
1213 @REPLY
1214 obj_handle_t handle; /* handle to the thread */
1215 @END
1218 /* Wait for handles */
1219 @REQ(select)
1220 int flags; /* wait flags (see below) */
1221 client_ptr_t cookie; /* magic cookie to return to client */
1222 abstime_t timeout; /* timeout */
1223 data_size_t size; /* size of select_op */
1224 obj_handle_t prev_apc; /* handle to previous APC */
1225 VARARG(result,apc_result); /* result of previous APC */
1226 VARARG(data,select_op,size); /* operation-specific data */
1227 VARARG(contexts,contexts); /* suspend context(s) */
1228 @REPLY
1229 obj_handle_t apc_handle; /* handle to next APC */
1230 int signaled; /* were the handles immediately signaled? */
1231 VARARG(call,apc_call); /* APC call arguments */
1232 VARARG(contexts,contexts); /* suspend context(s) */
1233 @END
1234 #define SELECT_ALERTABLE 1
1235 #define SELECT_INTERRUPTIBLE 2
1238 /* Create an event */
1239 @REQ(create_event)
1240 unsigned int access; /* wanted access rights */
1241 int manual_reset; /* manual reset event */
1242 int initial_state; /* initial state of the event */
1243 VARARG(objattr,object_attributes); /* object attributes */
1244 @REPLY
1245 obj_handle_t handle; /* handle to the event */
1246 @END
1248 /* Event operation */
1249 @REQ(event_op)
1250 obj_handle_t handle; /* handle to event */
1251 int op; /* event operation (see below) */
1252 @REPLY
1253 int state; /* previous state */
1254 @END
1255 enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT };
1257 @REQ(query_event)
1258 obj_handle_t handle; /* handle to event */
1259 @REPLY
1260 int manual_reset; /* manual reset event */
1261 int state; /* current state of the event */
1262 @END
1264 /* Open an event */
1265 @REQ(open_event)
1266 unsigned int access; /* wanted access rights */
1267 unsigned int attributes; /* object attributes */
1268 obj_handle_t rootdir; /* root directory */
1269 VARARG(name,unicode_str); /* object name */
1270 @REPLY
1271 obj_handle_t handle; /* handle to the event */
1272 @END
1275 /* Create a keyed event */
1276 @REQ(create_keyed_event)
1277 unsigned int access; /* wanted access rights */
1278 VARARG(objattr,object_attributes); /* object attributes */
1279 @REPLY
1280 obj_handle_t handle; /* handle to the event */
1281 @END
1283 /* Open a keyed event */
1284 @REQ(open_keyed_event)
1285 unsigned int access; /* wanted access rights */
1286 unsigned int attributes; /* object attributes */
1287 obj_handle_t rootdir; /* root directory */
1288 VARARG(name,unicode_str); /* object name */
1289 @REPLY
1290 obj_handle_t handle; /* handle to the event */
1291 @END
1294 /* Create a mutex */
1295 @REQ(create_mutex)
1296 unsigned int access; /* wanted access rights */
1297 int owned; /* initially owned? */
1298 VARARG(objattr,object_attributes); /* object attributes */
1299 @REPLY
1300 obj_handle_t handle; /* handle to the mutex */
1301 @END
1304 /* Release a mutex */
1305 @REQ(release_mutex)
1306 obj_handle_t handle; /* handle to the mutex */
1307 @REPLY
1308 unsigned int prev_count; /* value of internal counter, before release */
1309 @END
1312 /* Open a mutex */
1313 @REQ(open_mutex)
1314 unsigned int access; /* wanted access rights */
1315 unsigned int attributes; /* object attributes */
1316 obj_handle_t rootdir; /* root directory */
1317 VARARG(name,unicode_str); /* object name */
1318 @REPLY
1319 obj_handle_t handle; /* handle to the mutex */
1320 @END
1323 /* Query a mutex */
1324 @REQ(query_mutex)
1325 obj_handle_t handle; /* handle to mutex */
1326 @REPLY
1327 unsigned int count; /* current count of mutex */
1328 int owned; /* true if owned by current thread */
1329 int abandoned; /* true if abandoned */
1330 @END
1333 /* Create a semaphore */
1334 @REQ(create_semaphore)
1335 unsigned int access; /* wanted access rights */
1336 unsigned int initial; /* initial count */
1337 unsigned int max; /* maximum count */
1338 VARARG(objattr,object_attributes); /* object attributes */
1339 @REPLY
1340 obj_handle_t handle; /* handle to the semaphore */
1341 @END
1344 /* Release a semaphore */
1345 @REQ(release_semaphore)
1346 obj_handle_t handle; /* handle to the semaphore */
1347 unsigned int count; /* count to add to semaphore */
1348 @REPLY
1349 unsigned int prev_count; /* previous semaphore count */
1350 @END
1352 @REQ(query_semaphore)
1353 obj_handle_t handle; /* handle to the semaphore */
1354 @REPLY
1355 unsigned int current; /* current count */
1356 unsigned int max; /* maximum count */
1357 @END
1359 /* Open a semaphore */
1360 @REQ(open_semaphore)
1361 unsigned int access; /* wanted access rights */
1362 unsigned int attributes; /* object attributes */
1363 obj_handle_t rootdir; /* root directory */
1364 VARARG(name,unicode_str); /* object name */
1365 @REPLY
1366 obj_handle_t handle; /* handle to the semaphore */
1367 @END
1370 /* Create a file */
1371 @REQ(create_file)
1372 unsigned int access; /* wanted access rights */
1373 unsigned int sharing; /* sharing flags */
1374 int create; /* file create action */
1375 unsigned int options; /* file options */
1376 unsigned int attrs; /* file attributes for creation */
1377 VARARG(objattr,object_attributes); /* object attributes */
1378 VARARG(filename,string); /* file name */
1379 @REPLY
1380 obj_handle_t handle; /* handle to the file */
1381 @END
1384 /* Open a file object */
1385 @REQ(open_file_object)
1386 unsigned int access; /* wanted access rights */
1387 unsigned int attributes; /* open attributes */
1388 obj_handle_t rootdir; /* root directory */
1389 unsigned int sharing; /* sharing flags */
1390 unsigned int options; /* file options */
1391 VARARG(filename,unicode_str); /* file name */
1392 @REPLY
1393 obj_handle_t handle; /* handle to the file */
1394 @END
1397 /* Allocate a file handle for a Unix fd */
1398 @REQ(alloc_file_handle)
1399 unsigned int access; /* wanted access rights */
1400 unsigned int attributes; /* object attributes */
1401 int fd; /* file descriptor on the client side */
1402 @REPLY
1403 obj_handle_t handle; /* handle to the file */
1404 @END
1407 /* Get the Unix name from a file handle */
1408 @REQ(get_handle_unix_name)
1409 obj_handle_t handle; /* file handle */
1410 @REPLY
1411 data_size_t name_len; /* unix name length */
1412 VARARG(name,string); /* unix name */
1413 @END
1416 /* Get a Unix fd to access a file */
1417 @REQ(get_handle_fd)
1418 obj_handle_t handle; /* handle to the file */
1419 @REPLY
1420 int type; /* file type (see below) */
1421 int cacheable; /* can fd be cached in the client? */
1422 unsigned int access; /* file access rights */
1423 unsigned int options; /* file open options */
1424 @END
1425 enum server_fd_type
1427 FD_TYPE_INVALID, /* invalid file (no associated fd) */
1428 FD_TYPE_FILE, /* regular file */
1429 FD_TYPE_DIR, /* directory */
1430 FD_TYPE_SOCKET, /* socket */
1431 FD_TYPE_SERIAL, /* serial port */
1432 FD_TYPE_PIPE, /* named pipe */
1433 FD_TYPE_MAILSLOT, /* mailslot */
1434 FD_TYPE_CHAR, /* unspecified char device */
1435 FD_TYPE_DEVICE, /* Windows device file */
1436 FD_TYPE_NB_TYPES
1440 /* Retrieve (or allocate) the client-side directory cache entry */
1441 @REQ(get_directory_cache_entry)
1442 obj_handle_t handle; /* handle to the directory */
1443 @REPLY
1444 int entry; /* cache entry on the client side */
1445 VARARG(free,ints); /* entries that can be freed */
1446 @END
1449 /* Flush a file buffers */
1450 @REQ(flush)
1451 async_data_t async; /* async I/O parameters */
1452 @REPLY
1453 obj_handle_t event; /* event set when finished */
1454 @END
1456 /* Query file information */
1457 @REQ(get_file_info)
1458 obj_handle_t handle; /* handle to the file */
1459 unsigned int info_class; /* queried information class */
1460 @REPLY
1461 VARARG(data,bytes); /* file info data */
1462 @END
1464 /* Query volume information */
1465 @REQ(get_volume_info)
1466 obj_handle_t handle; /* handle to the file */
1467 async_data_t async; /* async I/O parameters */
1468 unsigned int info_class; /* queried information class */
1469 @REPLY
1470 obj_handle_t wait; /* handle to wait on for blocking read */
1471 VARARG(data,bytes); /* volume info data */
1472 @END
1474 /* Lock a region of a file */
1475 @REQ(lock_file)
1476 obj_handle_t handle; /* handle to the file */
1477 file_pos_t offset; /* offset of start of lock */
1478 file_pos_t count; /* count of bytes to lock */
1479 int shared; /* shared or exclusive lock? */
1480 int wait; /* do we want to wait? */
1481 @REPLY
1482 obj_handle_t handle; /* handle to wait on */
1483 int overlapped; /* is it an overlapped I/O handle? */
1484 @END
1487 /* Unlock a region of a file */
1488 @REQ(unlock_file)
1489 obj_handle_t handle; /* handle to the file */
1490 file_pos_t offset; /* offset of start of unlock */
1491 file_pos_t count; /* count of bytes to unlock */
1492 @END
1495 /* Perform a recv on a socket */
1496 @REQ(recv_socket)
1497 int oob; /* are we receiving OOB data? */
1498 async_data_t async; /* async I/O parameters */
1499 int force_async; /* Force asynchronous mode? */
1500 @REPLY
1501 obj_handle_t wait; /* handle to wait on for blocking recv */
1502 unsigned int options; /* device open options */
1503 int nonblocking; /* is socket non-blocking? */
1504 @END
1507 /* Perform a send on a socket */
1508 @REQ(send_socket)
1509 async_data_t async; /* async I/O parameters */
1510 int force_async; /* Force asynchronous mode? */
1511 @REPLY
1512 obj_handle_t wait; /* handle to wait on for blocking send */
1513 unsigned int options; /* device open options */
1514 int nonblocking; /* is socket non-blocking? */
1515 @END
1518 /* Get socket event flags */
1519 @REQ(socket_get_events)
1520 obj_handle_t handle; /* socket handle */
1521 obj_handle_t event; /* event to reset */
1522 @REPLY
1523 unsigned int flags; /* event mask */
1524 VARARG(status,uints); /* array of status codes */
1525 @END
1528 /* Store ICMP id for ICMP over datagram fixup */
1529 @REQ(socket_send_icmp_id)
1530 obj_handle_t handle; /* socket handle */
1531 unsigned short icmp_id; /* ICMP packet id */
1532 unsigned short icmp_seq; /* ICMP packed sequence */
1533 @REPLY
1534 @END
1537 /* Get ICMP id for ICMP over datagram fixup */
1538 @REQ(socket_get_icmp_id)
1539 obj_handle_t handle; /* socket handle */
1540 unsigned short icmp_seq; /* ICMP packed sequence */
1541 @REPLY
1542 unsigned short icmp_id; /* ICMP packet id */
1543 @END
1546 /* Retrieve the next pending console ioctl request */
1547 @REQ(get_next_console_request)
1548 obj_handle_t handle; /* console server handle */
1549 int signal; /* server signal state */
1550 int read; /* 1 if reporting result of blocked read ioctl */
1551 unsigned int status; /* status of previous ioctl */
1552 VARARG(out_data,bytes); /* out_data of previous ioctl */
1553 @REPLY
1554 unsigned int code; /* ioctl code */
1555 unsigned int output; /* output id or 0 for input */
1556 data_size_t out_size; /* ioctl output size */
1557 VARARG(in_data,bytes); /* ioctl in_data */
1558 @END
1561 /* enable directory change notifications */
1562 @REQ(read_directory_changes)
1563 unsigned int filter; /* notification filter */
1564 int subtree; /* watch the subtree? */
1565 int want_data; /* flag indicating whether change data should be collected */
1566 async_data_t async; /* async I/O parameters */
1567 @END
1570 @REQ(read_change)
1571 obj_handle_t handle;
1572 @REPLY
1573 VARARG(events,filesystem_event); /* collected filesystem events */
1574 @END
1577 /* Create a file mapping */
1578 @REQ(create_mapping)
1579 unsigned int access; /* wanted access rights */
1580 unsigned int flags; /* SEC_* flags */
1581 unsigned int file_access; /* file access rights */
1582 mem_size_t size; /* mapping size */
1583 obj_handle_t file_handle; /* file handle */
1584 VARARG(objattr,object_attributes); /* object attributes */
1585 @REPLY
1586 obj_handle_t handle; /* handle to the mapping */
1587 @END
1590 /* Open a mapping */
1591 @REQ(open_mapping)
1592 unsigned int access; /* wanted access rights */
1593 unsigned int attributes; /* object attributes */
1594 obj_handle_t rootdir; /* root directory */
1595 VARARG(name,unicode_str); /* object name */
1596 @REPLY
1597 obj_handle_t handle; /* handle to the mapping */
1598 @END
1601 /* Get information about a file mapping */
1602 @REQ(get_mapping_info)
1603 obj_handle_t handle; /* handle to the mapping */
1604 unsigned int access; /* wanted access rights */
1605 @REPLY
1606 mem_size_t size; /* mapping size */
1607 unsigned int flags; /* SEC_* flags */
1608 obj_handle_t shared_file; /* shared mapping file handle */
1609 data_size_t total; /* total required buffer size in bytes */
1610 VARARG(image,pe_image_info);/* image info for SEC_IMAGE mappings */
1611 VARARG(name,unicode_str); /* filename for SEC_IMAGE mappings */
1612 @END
1615 /* Add a memory view in the current process */
1616 @REQ(map_view)
1617 obj_handle_t mapping; /* file mapping handle */
1618 unsigned int access; /* wanted access rights */
1619 client_ptr_t base; /* view base address (page-aligned) */
1620 mem_size_t size; /* view size */
1621 file_pos_t start; /* start offset in mapping */
1622 @END
1625 /* Add a memory view for an image mapping in the current process */
1626 @REQ(map_image_view)
1627 obj_handle_t mapping; /* file mapping handle */
1628 client_ptr_t base; /* view base address (page-aligned) */
1629 mem_size_t size; /* view size */
1630 unsigned int entry; /* entry point in mapped view */
1631 unsigned short machine; /* machine in the mapped view */
1632 @END
1635 /* Add a memory view for a builtin dll in the current process */
1636 @REQ(map_builtin_view)
1637 VARARG(image,pe_image_info);/* image info */
1638 VARARG(name,unicode_str); /* image filename */
1639 @END
1642 /* Get information about a mapped image view */
1643 @REQ(get_image_view_info)
1644 obj_handle_t process; /* process handle */
1645 client_ptr_t addr; /* address inside mapped view (in process address space) */
1646 @REPLY
1647 client_ptr_t base; /* view base address */
1648 mem_size_t size; /* view size */
1649 @END
1652 /* Unmap a memory view from the current process */
1653 @REQ(unmap_view)
1654 client_ptr_t base; /* view base address */
1655 @END
1658 /* Get a range of committed pages in a file mapping */
1659 @REQ(get_mapping_committed_range)
1660 client_ptr_t base; /* view base address */
1661 file_pos_t offset; /* starting offset (page-aligned, in bytes) */
1662 @REPLY
1663 mem_size_t size; /* size of range starting at offset (page-aligned, in bytes) */
1664 int committed; /* whether it is a committed range */
1665 @END
1668 /* Add a range to the committed pages in a file mapping */
1669 @REQ(add_mapping_committed_range)
1670 client_ptr_t base; /* view base address */
1671 file_pos_t offset; /* starting offset (page-aligned, in bytes) */
1672 mem_size_t size; /* size to set (page-aligned, in bytes) or 0 if only retrieving */
1673 @END
1676 /* Check if two memory maps are for the same file */
1677 @REQ(is_same_mapping)
1678 client_ptr_t base1; /* first view base address */
1679 client_ptr_t base2; /* second view base address */
1680 @END
1683 /* Get the filename of a mapping */
1684 @REQ(get_mapping_filename)
1685 obj_handle_t process; /* process handle */
1686 client_ptr_t addr; /* address inside mapped view (in process address space) */
1687 @REPLY
1688 data_size_t len; /* total filename length in bytes */
1689 VARARG(filename,unicode_str); /* filename in NT format */
1690 @END
1693 struct thread_info
1695 timeout_t start_time;
1696 thread_id_t tid;
1697 int base_priority;
1698 int current_priority;
1699 int unix_tid;
1700 client_ptr_t teb;
1701 client_ptr_t entry_point;
1704 struct process_info
1706 timeout_t start_time;
1707 data_size_t name_len;
1708 int thread_count;
1709 int priority;
1710 process_id_t pid;
1711 process_id_t parent_pid;
1712 unsigned int session_id;
1713 int handle_count;
1714 int unix_pid;
1715 /* VARARG(name,unicode_str,name_len); */
1716 /* VARARG(threads,struct thread_info,thread_count); */
1719 /* Get a list of processes and threads currently running */
1720 @REQ(list_processes)
1721 @REPLY
1722 data_size_t info_size;
1723 int process_count;
1724 int total_thread_count;
1725 data_size_t total_name_len;
1726 VARARG(data,process_info,info_size);
1727 @END
1730 /* Create a debug object */
1731 @REQ(create_debug_obj)
1732 unsigned int access; /* wanted access rights */
1733 unsigned int flags; /* object flags */
1734 VARARG(objattr,object_attributes); /* object attributes */
1735 @REPLY
1736 obj_handle_t handle; /* handle to the debug object */
1737 @END
1740 /* Wait for a debug event */
1741 @REQ(wait_debug_event)
1742 obj_handle_t debug; /* debug object */
1743 @REPLY
1744 process_id_t pid; /* process id */
1745 thread_id_t tid; /* thread id */
1746 VARARG(event,debug_event); /* debug event data */
1747 @END
1750 /* Queue an exception event */
1751 @REQ(queue_exception_event)
1752 int first; /* first chance exception? */
1753 unsigned int code; /* exception code */
1754 unsigned int flags; /* exception flags */
1755 client_ptr_t record; /* exception record */
1756 client_ptr_t address; /* exception address */
1757 data_size_t len; /* size of parameters */
1758 VARARG(params,uints64,len);/* exception parameters */
1759 @REPLY
1760 obj_handle_t handle; /* handle to the queued event */
1761 @END
1764 /* Retrieve the status of an exception event */
1765 @REQ(get_exception_status)
1766 obj_handle_t handle; /* handle to the queued event */
1767 @END
1770 /* Continue a debug event */
1771 @REQ(continue_debug_event)
1772 obj_handle_t debug; /* debug object */
1773 process_id_t pid; /* process id to continue */
1774 thread_id_t tid; /* thread id to continue */
1775 unsigned int status; /* continuation status */
1776 @END
1779 /* Start or stop debugging an existing process */
1780 @REQ(debug_process)
1781 obj_handle_t handle; /* process handle */
1782 obj_handle_t debug; /* debug object to attach to the process */
1783 int attach; /* 1=attaching / 0=detaching from the process */
1784 @END
1787 /* Set debug object information */
1788 @REQ(set_debug_obj_info)
1789 obj_handle_t debug; /* debug object */
1790 unsigned int flags; /* object flags */
1791 @END
1794 /* Read data from a process address space */
1795 @REQ(read_process_memory)
1796 obj_handle_t handle; /* process handle */
1797 client_ptr_t addr; /* addr to read from */
1798 @REPLY
1799 VARARG(data,bytes); /* result data */
1800 @END
1803 /* Write data to a process address space */
1804 @REQ(write_process_memory)
1805 obj_handle_t handle; /* process handle */
1806 client_ptr_t addr; /* addr to write to */
1807 VARARG(data,bytes); /* data to write */
1808 @END
1811 /* Create a registry key */
1812 @REQ(create_key)
1813 unsigned int access; /* desired access rights */
1814 unsigned int options; /* creation options */
1815 VARARG(objattr,object_attributes); /* object attributes */
1816 VARARG(class,unicode_str); /* class name */
1817 @REPLY
1818 obj_handle_t hkey; /* handle to the created key */
1819 @END
1821 /* Open a registry key */
1822 @REQ(open_key)
1823 obj_handle_t parent; /* handle to the parent key */
1824 unsigned int access; /* desired access rights */
1825 unsigned int attributes; /* object attributes */
1826 VARARG(name,unicode_str); /* key name */
1827 @REPLY
1828 obj_handle_t hkey; /* handle to the open key */
1829 @END
1832 /* Delete a registry key */
1833 @REQ(delete_key)
1834 obj_handle_t hkey; /* handle to the key */
1835 @END
1838 /* Flush a registry key */
1839 @REQ(flush_key)
1840 obj_handle_t hkey; /* handle to the key */
1841 @END
1844 /* Enumerate registry subkeys */
1845 @REQ(enum_key)
1846 obj_handle_t hkey; /* handle to registry key */
1847 int index; /* index of subkey (or -1 for current key) */
1848 int info_class; /* requested information class */
1849 @REPLY
1850 int subkeys; /* number of subkeys */
1851 int max_subkey; /* longest subkey name */
1852 int max_class; /* longest class name */
1853 int values; /* number of values */
1854 int max_value; /* longest value name */
1855 int max_data; /* longest value data */
1856 timeout_t modif; /* last modification time */
1857 data_size_t total; /* total length needed for full name and class */
1858 data_size_t namelen; /* length of key name in bytes */
1859 VARARG(name,unicode_str,namelen); /* key name */
1860 VARARG(class,unicode_str); /* class name */
1861 @END
1864 /* Set a value of a registry key */
1865 @REQ(set_key_value)
1866 obj_handle_t hkey; /* handle to registry key */
1867 int type; /* value type */
1868 data_size_t namelen; /* length of value name in bytes */
1869 VARARG(name,unicode_str,namelen); /* value name */
1870 VARARG(data,bytes); /* value data */
1871 @END
1874 /* Retrieve the value of a registry key */
1875 @REQ(get_key_value)
1876 obj_handle_t hkey; /* handle to registry key */
1877 VARARG(name,unicode_str); /* value name */
1878 @REPLY
1879 int type; /* value type */
1880 data_size_t total; /* total length needed for data */
1881 VARARG(data,bytes); /* value data */
1882 @END
1885 /* Enumerate a value of a registry key */
1886 @REQ(enum_key_value)
1887 obj_handle_t hkey; /* handle to registry key */
1888 int index; /* value index */
1889 int info_class; /* requested information class */
1890 @REPLY
1891 int type; /* value type */
1892 data_size_t total; /* total length needed for full name and data */
1893 data_size_t namelen; /* length of value name in bytes */
1894 VARARG(name,unicode_str,namelen); /* value name */
1895 VARARG(data,bytes); /* value data */
1896 @END
1899 /* Delete a value of a registry key */
1900 @REQ(delete_key_value)
1901 obj_handle_t hkey; /* handle to registry key */
1902 VARARG(name,unicode_str); /* value name */
1903 @END
1906 /* Load a registry branch from a file */
1907 @REQ(load_registry)
1908 obj_handle_t file; /* file to load from */
1909 VARARG(objattr,object_attributes); /* object attributes */
1910 @END
1913 /* UnLoad a registry branch from a file */
1914 @REQ(unload_registry)
1915 obj_handle_t parent; /* handle to the parent key */
1916 unsigned int attributes; /* object attributes */
1917 VARARG(name,unicode_str); /* key name */
1918 @END
1921 /* Save a registry branch to a file */
1922 @REQ(save_registry)
1923 obj_handle_t hkey; /* key to save */
1924 obj_handle_t file; /* file to save to */
1925 @END
1928 /* Add a registry key change notification */
1929 @REQ(set_registry_notification)
1930 obj_handle_t hkey; /* key to watch for changes */
1931 obj_handle_t event; /* event to set */
1932 int subtree; /* should we watch the whole subtree? */
1933 unsigned int filter; /* things to watch */
1934 @END
1937 /* Rename a registry key */
1938 @REQ(rename_key)
1939 obj_handle_t hkey; /* handle to the key to be renamed */
1940 VARARG(name,unicode_str); /* new name */
1941 @END
1944 /* Create a waitable timer */
1945 @REQ(create_timer)
1946 unsigned int access; /* wanted access rights */
1947 int manual; /* manual reset */
1948 VARARG(objattr,object_attributes); /* object attributes */
1949 @REPLY
1950 obj_handle_t handle; /* handle to the timer */
1951 @END
1954 /* Open a waitable timer */
1955 @REQ(open_timer)
1956 unsigned int access; /* wanted access rights */
1957 unsigned int attributes; /* object attributes */
1958 obj_handle_t rootdir; /* root directory */
1959 VARARG(name,unicode_str); /* object name */
1960 @REPLY
1961 obj_handle_t handle; /* handle to the timer */
1962 @END
1964 /* Set a waitable timer */
1965 @REQ(set_timer)
1966 obj_handle_t handle; /* handle to the timer */
1967 timeout_t expire; /* next expiration absolute time */
1968 client_ptr_t callback; /* callback function */
1969 client_ptr_t arg; /* callback argument */
1970 int period; /* timer period in ms */
1971 @REPLY
1972 int signaled; /* was the timer signaled before this call ? */
1973 @END
1975 /* Cancel a waitable timer */
1976 @REQ(cancel_timer)
1977 obj_handle_t handle; /* handle to the timer */
1978 @REPLY
1979 int signaled; /* was the timer signaled before this calltime ? */
1980 @END
1982 /* Get information on a waitable timer */
1983 @REQ(get_timer_info)
1984 obj_handle_t handle; /* handle to the timer */
1985 @REPLY
1986 timeout_t when; /* absolute time when the timer next expires */
1987 int signaled; /* is the timer signaled? */
1988 @END
1991 /* Retrieve the current context of a thread */
1992 @REQ(get_thread_context)
1993 obj_handle_t handle; /* thread handle */
1994 obj_handle_t context; /* context handle */
1995 unsigned int flags; /* context flags */
1996 unsigned int native_flags; /* flags for native context if WoW present */
1997 unsigned short machine; /* context architecture */
1998 @REPLY
1999 int self; /* was it a handle to the current thread? */
2000 obj_handle_t handle; /* pending context handle */
2001 VARARG(contexts,contexts); /* thread context(s) */
2002 @END
2005 /* Set the current context of a thread */
2006 @REQ(set_thread_context)
2007 obj_handle_t handle; /* thread handle */
2008 unsigned int native_flags; /* flags for native context if WoW present */
2009 VARARG(contexts,contexts); /* thread context(s) */
2010 @REPLY
2011 int self; /* was it a handle to the current thread? */
2012 @END
2015 /* Fetch a selector entry for a thread */
2016 @REQ(get_selector_entry)
2017 obj_handle_t handle; /* thread handle */
2018 int entry; /* LDT entry */
2019 @REPLY
2020 unsigned int base; /* selector base */
2021 unsigned int limit; /* selector limit */
2022 unsigned char flags; /* selector flags */
2023 @END
2026 /* Add an atom */
2027 @REQ(add_atom)
2028 VARARG(name,unicode_str); /* atom name */
2029 @REPLY
2030 atom_t atom; /* resulting atom */
2031 @END
2034 /* Delete an atom */
2035 @REQ(delete_atom)
2036 atom_t atom; /* atom handle */
2037 @END
2040 /* Find an atom */
2041 @REQ(find_atom)
2042 VARARG(name,unicode_str); /* atom name */
2043 @REPLY
2044 atom_t atom; /* atom handle */
2045 @END
2048 /* Get information about an atom */
2049 @REQ(get_atom_information)
2050 atom_t atom; /* atom handle */
2051 @REPLY
2052 int count; /* atom lock count */
2053 int pinned; /* whether the atom has been pinned */
2054 data_size_t total; /* actual length of atom name */
2055 VARARG(name,unicode_str); /* atom name */
2056 @END
2059 /* Get the message queue of the current thread */
2060 @REQ(get_msg_queue)
2061 @REPLY
2062 obj_handle_t handle; /* handle to the queue */
2063 @END
2066 /* Set the file descriptor associated to the current thread queue */
2067 @REQ(set_queue_fd)
2068 obj_handle_t handle; /* handle to the file descriptor */
2069 @END
2072 /* Set the current message queue wakeup mask */
2073 @REQ(set_queue_mask)
2074 unsigned int wake_mask; /* wakeup bits mask */
2075 unsigned int changed_mask; /* changed bits mask */
2076 int skip_wait; /* will we skip waiting if signaled? */
2077 @REPLY
2078 unsigned int wake_bits; /* current wake bits */
2079 unsigned int changed_bits; /* current changed bits */
2080 @END
2083 /* Get the current message queue status */
2084 @REQ(get_queue_status)
2085 unsigned int clear_bits; /* should we clear the change bits? */
2086 @REPLY
2087 unsigned int wake_bits; /* wake bits */
2088 unsigned int changed_bits; /* changed bits since last time */
2089 @END
2092 /* Retrieve the process idle event */
2093 @REQ(get_process_idle_event)
2094 obj_handle_t handle; /* process handle */
2095 @REPLY
2096 obj_handle_t event; /* handle to idle event */
2097 @END
2100 /* Send a message to a thread queue */
2101 @REQ(send_message)
2102 thread_id_t id; /* thread id */
2103 int type; /* message type (see below) */
2104 int flags; /* message flags (see below) */
2105 user_handle_t win; /* window handle */
2106 unsigned int msg; /* message code */
2107 lparam_t wparam; /* parameters */
2108 lparam_t lparam; /* parameters */
2109 timeout_t timeout; /* timeout for reply */
2110 VARARG(data,message_data); /* message data for sent messages */
2111 @END
2113 @REQ(post_quit_message)
2114 int exit_code; /* exit code to return */
2115 @END
2117 enum message_type
2119 MSG_ASCII, /* Ascii message (from SendMessageA) */
2120 MSG_UNICODE, /* Unicode message (from SendMessageW) */
2121 MSG_NOTIFY, /* notify message (from SendNotifyMessageW), always Unicode */
2122 MSG_CALLBACK, /* callback message (from SendMessageCallbackW), always Unicode */
2123 MSG_CALLBACK_RESULT,/* result of a callback message */
2124 MSG_OTHER_PROCESS, /* sent from other process, may include vararg data, always Unicode */
2125 MSG_POSTED, /* posted message (from PostMessageW), always Unicode */
2126 MSG_HARDWARE, /* hardware message */
2127 MSG_WINEVENT, /* winevent message */
2128 MSG_HOOK_LL /* low-level hardware hook */
2130 #define SEND_MSG_ABORT_IF_HUNG 0x01
2133 /* Send a hardware message to a thread queue */
2134 @REQ(send_hardware_message)
2135 user_handle_t win; /* window handle */
2136 hw_input_t input; /* input data */
2137 unsigned int flags; /* flags (see below) */
2138 VARARG(report,bytes); /* HID report data */
2139 @REPLY
2140 int wait; /* do we need to wait for a reply? */
2141 int prev_x; /* previous cursor position */
2142 int prev_y;
2143 int new_x; /* new cursor position */
2144 int new_y;
2145 @END
2146 #define SEND_HWMSG_INJECTED 0x01
2149 /* Get a message from the current queue */
2150 @REQ(get_message)
2151 unsigned int flags; /* PM_* flags */
2152 user_handle_t get_win; /* window handle to get */
2153 unsigned int get_first; /* first message code to get */
2154 unsigned int get_last; /* last message code to get */
2155 unsigned int hw_id; /* id of the previous hardware message (or 0) */
2156 unsigned int wake_mask; /* wakeup bits mask */
2157 unsigned int changed_mask; /* changed bits mask */
2158 @REPLY
2159 user_handle_t win; /* window handle */
2160 unsigned int msg; /* message code */
2161 lparam_t wparam; /* parameters */
2162 lparam_t lparam; /* parameters */
2163 int type; /* message type */
2164 int x; /* message x position */
2165 int y; /* message y position */
2166 unsigned int time; /* message time */
2167 unsigned int active_hooks; /* active hooks bitmap */
2168 data_size_t total; /* total size of extra data */
2169 VARARG(data,message_data); /* message data for sent messages */
2170 @END
2173 /* Reply to a sent message */
2174 @REQ(reply_message)
2175 int remove; /* should we remove the message? */
2176 lparam_t result; /* message result */
2177 VARARG(data,bytes); /* message data for sent messages */
2178 @END
2181 /* Accept and remove the current hardware message */
2182 @REQ(accept_hardware_message)
2183 unsigned int hw_id; /* id of the hardware message */
2184 @END
2187 /* Retrieve the reply for the last message sent */
2188 @REQ(get_message_reply)
2189 int cancel; /* cancel message if not ready? */
2190 @REPLY
2191 lparam_t result; /* message result */
2192 VARARG(data,bytes); /* message data for sent messages */
2193 @END
2196 /* Set a window timer */
2197 @REQ(set_win_timer)
2198 user_handle_t win; /* window handle */
2199 unsigned int msg; /* message to post */
2200 unsigned int rate; /* timer rate in ms */
2201 lparam_t id; /* timer id */
2202 lparam_t lparam; /* message lparam (callback proc) */
2203 @REPLY
2204 lparam_t id; /* timer id */
2205 @END
2208 /* Kill a window timer */
2209 @REQ(kill_win_timer)
2210 user_handle_t win; /* window handle */
2211 lparam_t id; /* timer id */
2212 unsigned int msg; /* message to post */
2213 @END
2216 /* check if the thread owning the window is hung */
2217 @REQ(is_window_hung)
2218 user_handle_t win; /* window handle */
2219 @REPLY
2220 int is_hung;
2221 @END
2224 /* Retrieve info about a serial port */
2225 @REQ(get_serial_info)
2226 obj_handle_t handle; /* handle to comm port */
2227 int flags;
2228 @REPLY
2229 unsigned int eventmask;
2230 unsigned int cookie;
2231 unsigned int pending_write;
2232 @END
2235 /* Set info about a serial port */
2236 @REQ(set_serial_info)
2237 obj_handle_t handle; /* handle to comm port */
2238 int flags; /* bitmask to set values (see below) */
2239 @END
2240 #define SERIALINFO_PENDING_WRITE 0x04
2241 #define SERIALINFO_PENDING_WAIT 0x08
2243 /* Cancel all sync io on a thread */
2244 @REQ(cancel_sync)
2245 obj_handle_t handle; /* thread handle on which to cancel io */
2246 client_ptr_t iosb; /* I/O status block (NULL=all) */
2247 @END
2249 /* Create an async I/O */
2250 @REQ(register_async)
2251 int type; /* type of queue to look after */
2252 async_data_t async; /* async I/O parameters */
2253 int count; /* count - usually # of bytes to be read/written */
2254 @END
2255 #define ASYNC_TYPE_READ 0x01
2256 #define ASYNC_TYPE_WRITE 0x02
2257 #define ASYNC_TYPE_WAIT 0x03
2260 /* Cancel all async op on a fd */
2261 @REQ(cancel_async)
2262 obj_handle_t handle; /* handle to comm port, socket or file */
2263 client_ptr_t iosb; /* I/O status block (NULL=all) */
2264 int only_thread; /* cancel matching this thread */
2265 @END
2268 /* Retrieve results of an async */
2269 @REQ(get_async_result)
2270 client_ptr_t user_arg; /* user arg used to identify async */
2271 @REPLY
2272 VARARG(out_data,bytes); /* iosb output data */
2273 @END
2276 /* Notify direct completion of async and close the wait handle if not blocking */
2277 @REQ(set_async_direct_result)
2278 obj_handle_t handle; /* wait handle */
2279 apc_param_t information; /* IO_STATUS_BLOCK Information */
2280 unsigned int status; /* completion status */
2281 int mark_pending; /* set async to pending before completion? */
2282 @REPLY
2283 obj_handle_t handle; /* wait handle, or NULL if closed */
2284 @END
2287 /* Perform a read on a file object */
2288 @REQ(read)
2289 async_data_t async; /* async I/O parameters */
2290 file_pos_t pos; /* read position */
2291 @REPLY
2292 obj_handle_t wait; /* handle to wait on for blocking read */
2293 unsigned int options; /* device open options */
2294 VARARG(data,bytes); /* read data */
2295 @END
2298 /* Perform a write on a file object */
2299 @REQ(write)
2300 async_data_t async; /* async I/O parameters */
2301 file_pos_t pos; /* write position */
2302 VARARG(data,bytes); /* write data */
2303 @REPLY
2304 obj_handle_t wait; /* handle to wait on for blocking write */
2305 unsigned int options; /* device open options */
2306 data_size_t size; /* size written */
2307 @END
2310 /* Perform an ioctl on a file */
2311 @REQ(ioctl)
2312 ioctl_code_t code; /* ioctl code */
2313 async_data_t async; /* async I/O parameters */
2314 VARARG(in_data,bytes); /* ioctl input data */
2315 @REPLY
2316 obj_handle_t wait; /* handle to wait on for blocking ioctl */
2317 unsigned int options; /* device open options */
2318 VARARG(out_data,bytes); /* ioctl output data */
2319 @END
2322 /* Store results of an async irp */
2323 @REQ(set_irp_result)
2324 obj_handle_t handle; /* handle to the irp */
2325 unsigned int status; /* status of the irp */
2326 data_size_t size; /* result size (input or output depending on the operation) */
2327 VARARG(data,bytes); /* output data of the irp */
2328 @END
2331 /* Create a named pipe */
2332 @REQ(create_named_pipe)
2333 unsigned int access;
2334 unsigned int options;
2335 unsigned int sharing;
2336 unsigned int disposition;
2337 unsigned int maxinstances;
2338 unsigned int outsize;
2339 unsigned int insize;
2340 timeout_t timeout;
2341 unsigned int flags;
2342 VARARG(objattr,object_attributes); /* object attributes */
2343 @REPLY
2344 obj_handle_t handle; /* handle to the pipe */
2345 int created;
2346 @END
2348 /* flags in create_named_pipe and get_named_pipe_info */
2349 #define NAMED_PIPE_MESSAGE_STREAM_WRITE 0x0001
2350 #define NAMED_PIPE_MESSAGE_STREAM_READ 0x0002
2351 #define NAMED_PIPE_NONBLOCKING_MODE 0x0004
2352 #define NAMED_PIPE_SERVER_END 0x8000
2354 /* Set named pipe information by handle */
2355 @REQ(set_named_pipe_info)
2356 obj_handle_t handle;
2357 unsigned int flags;
2358 @END
2360 /* Create a window */
2361 @REQ(create_window)
2362 user_handle_t parent; /* parent window */
2363 user_handle_t owner; /* owner window */
2364 atom_t atom; /* class atom */
2365 mod_handle_t instance; /* module instance */
2366 int dpi; /* system DPI */
2367 int awareness; /* thread DPI awareness */
2368 unsigned int style; /* window style */
2369 unsigned int ex_style; /* window extended style */
2370 VARARG(class,unicode_str); /* class name */
2371 @REPLY
2372 user_handle_t handle; /* created window */
2373 user_handle_t parent; /* full handle of parent */
2374 user_handle_t owner; /* full handle of owner */
2375 int extra; /* number of extra bytes */
2376 client_ptr_t class_ptr; /* pointer to class in client address space */
2377 int dpi; /* window DPI if not per-monitor aware */
2378 int awareness; /* window DPI awareness */
2379 @END
2382 /* Destroy a window */
2383 @REQ(destroy_window)
2384 user_handle_t handle; /* handle to the window */
2385 @END
2388 /* Retrieve the desktop window for the current thread */
2389 @REQ(get_desktop_window)
2390 int force; /* force creation if it doesn't exist */
2391 @REPLY
2392 user_handle_t top_window; /* handle to the desktop window */
2393 user_handle_t msg_window; /* handle to the top-level HWND_MESSAGE parent */
2394 @END
2397 /* Set a window owner */
2398 @REQ(set_window_owner)
2399 user_handle_t handle; /* handle to the window */
2400 user_handle_t owner; /* new owner */
2401 @REPLY
2402 user_handle_t full_owner; /* full handle of new owner */
2403 user_handle_t prev_owner; /* full handle of previous owner */
2404 @END
2407 /* Get information from a window handle */
2408 @REQ(get_window_info)
2409 user_handle_t handle; /* handle to the window */
2410 @REPLY
2411 user_handle_t full_handle; /* full 32-bit handle */
2412 user_handle_t last_active; /* last active popup */
2413 process_id_t pid; /* process owning the window */
2414 thread_id_t tid; /* thread owning the window */
2415 atom_t atom; /* class atom */
2416 int is_unicode; /* ANSI or unicode */
2417 int dpi; /* window DPI */
2418 int awareness; /* DPI awareness */
2419 @END
2422 /* Set some information in a window */
2423 @REQ(set_window_info)
2424 unsigned short flags; /* flags for fields to set (see below) */
2425 short int is_unicode; /* ANSI or unicode */
2426 user_handle_t handle; /* handle to the window */
2427 unsigned int style; /* window style */
2428 unsigned int ex_style; /* window extended style */
2429 data_size_t extra_size; /* size to set in extra bytes */
2430 mod_handle_t instance; /* creator instance */
2431 lparam_t user_data; /* user-specific data */
2432 lparam_t extra_value; /* value to set in extra bytes or window id */
2433 int extra_offset; /* offset to set in extra bytes */
2434 @REPLY
2435 unsigned int old_style; /* old window style */
2436 unsigned int old_ex_style; /* old window extended style */
2437 mod_handle_t old_instance; /* old creator instance */
2438 lparam_t old_user_data; /* old user-specific data */
2439 lparam_t old_extra_value; /* old value in extra bytes */
2440 lparam_t old_id; /* old window id */
2441 @END
2442 #define SET_WIN_STYLE 0x01
2443 #define SET_WIN_EXSTYLE 0x02
2444 #define SET_WIN_ID 0x04
2445 #define SET_WIN_INSTANCE 0x08
2446 #define SET_WIN_USERDATA 0x10
2447 #define SET_WIN_EXTRA 0x20
2448 #define SET_WIN_UNICODE 0x40
2451 /* Set the parent of a window */
2452 @REQ(set_parent)
2453 user_handle_t handle; /* handle to the window */
2454 user_handle_t parent; /* handle to the parent */
2455 @REPLY
2456 user_handle_t old_parent; /* old parent window */
2457 user_handle_t full_parent; /* full handle of new parent */
2458 int dpi; /* new window DPI if not per-monitor aware */
2459 int awareness; /* new DPI awareness */
2460 @END
2463 /* Get a list of the window parents, up to the root of the tree */
2464 @REQ(get_window_parents)
2465 user_handle_t handle; /* handle to the window */
2466 @REPLY
2467 int count; /* total count of parents */
2468 VARARG(parents,user_handles); /* parent handles */
2469 @END
2472 /* Get a list of the window children */
2473 @REQ(get_window_children)
2474 obj_handle_t desktop; /* handle to desktop */
2475 user_handle_t parent; /* parent window */
2476 atom_t atom; /* class atom for the listed children */
2477 thread_id_t tid; /* thread owning the listed children */
2478 VARARG(class,unicode_str); /* class name */
2479 @REPLY
2480 int count; /* total count of children */
2481 VARARG(children,user_handles); /* children handles */
2482 @END
2485 /* Get a list of the window children that contain a given point */
2486 @REQ(get_window_children_from_point)
2487 user_handle_t parent; /* parent window */
2488 int x; /* point in parent coordinates */
2489 int y;
2490 int dpi; /* dpi for the point coordinates */
2491 @REPLY
2492 int count; /* total count of children */
2493 VARARG(children,user_handles); /* children handles */
2494 @END
2497 /* Get window tree information from a window handle */
2498 @REQ(get_window_tree)
2499 user_handle_t handle; /* handle to the window */
2500 @REPLY
2501 user_handle_t parent; /* parent window */
2502 user_handle_t owner; /* owner window */
2503 user_handle_t next_sibling; /* next sibling in Z-order */
2504 user_handle_t prev_sibling; /* prev sibling in Z-order */
2505 user_handle_t first_sibling; /* first sibling in Z-order */
2506 user_handle_t last_sibling; /* last sibling in Z-order */
2507 user_handle_t first_child; /* first child */
2508 user_handle_t last_child; /* last child */
2509 @END
2511 /* Set the position and Z order of a window */
2512 @REQ(set_window_pos)
2513 unsigned short swp_flags; /* SWP_* flags */
2514 unsigned short paint_flags; /* paint flags (see below) */
2515 user_handle_t handle; /* handle to the window */
2516 user_handle_t previous; /* previous window in Z order */
2517 rectangle_t window; /* window rectangle (in parent coords) */
2518 rectangle_t client; /* client rectangle (in parent coords) */
2519 VARARG(valid,rectangles); /* valid rectangles from WM_NCCALCSIZE (in parent coords) */
2520 @REPLY
2521 unsigned int new_style; /* new window style */
2522 unsigned int new_ex_style; /* new window extended style */
2523 user_handle_t surface_win; /* parent window that holds the surface */
2524 int needs_update; /* whether the surface region needs an update */
2525 @END
2526 #define SET_WINPOS_PAINT_SURFACE 0x01 /* window has a paintable surface */
2527 #define SET_WINPOS_PIXEL_FORMAT 0x02 /* window has a custom pixel format */
2529 /* Get the window and client rectangles of a window */
2530 @REQ(get_window_rectangles)
2531 user_handle_t handle; /* handle to the window */
2532 int relative; /* coords relative to (see below) */
2533 int dpi; /* DPI to map to, or zero for per-monitor DPI */
2534 @REPLY
2535 rectangle_t window; /* window rectangle */
2536 rectangle_t client; /* client rectangle */
2537 @END
2538 enum coords_relative
2540 COORDS_CLIENT, /* relative to client area */
2541 COORDS_WINDOW, /* relative to whole window area */
2542 COORDS_PARENT, /* relative to parent's client area */
2543 COORDS_SCREEN /* relative to screen origin */
2547 /* Get the window text */
2548 @REQ(get_window_text)
2549 user_handle_t handle; /* handle to the window */
2550 @REPLY
2551 data_size_t length; /* total length in WCHARs */
2552 VARARG(text,unicode_str); /* window text */
2553 @END
2556 /* Set the window text */
2557 @REQ(set_window_text)
2558 user_handle_t handle; /* handle to the window */
2559 VARARG(text,unicode_str); /* window text */
2560 @END
2563 /* Get the coordinates offset between two windows */
2564 @REQ(get_windows_offset)
2565 user_handle_t from; /* handle to the first window */
2566 user_handle_t to; /* handle to the second window */
2567 int dpi; /* DPI to map to, or zero for per-monitor DPI */
2568 @REPLY
2569 int x; /* x coordinate offset */
2570 int y; /* y coordinate offset */
2571 int mirror; /* whether to mirror the x coordinate */
2572 @END
2575 /* Get the visible region of a window */
2576 @REQ(get_visible_region)
2577 user_handle_t window; /* handle to the window */
2578 unsigned int flags; /* DCX flags */
2579 @REPLY
2580 user_handle_t top_win; /* top window to clip against */
2581 rectangle_t top_rect; /* top window visible rect with screen coords */
2582 rectangle_t win_rect; /* window rect in screen coords */
2583 unsigned int paint_flags; /* paint flags (from SET_WINPOS_* flags) */
2584 data_size_t total_size; /* total size of the resulting region */
2585 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2586 @END
2589 /* Get the visible surface region of a window */
2590 @REQ(get_surface_region)
2591 user_handle_t window; /* handle to the window */
2592 @REPLY
2593 rectangle_t visible_rect; /* window visible rect in screen coords */
2594 data_size_t total_size; /* total size of the resulting region */
2595 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2596 @END
2599 /* Get the window region */
2600 @REQ(get_window_region)
2601 user_handle_t window; /* handle to the window */
2602 @REPLY
2603 data_size_t total_size; /* total size of the resulting region */
2604 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2605 @END
2608 /* Set the window region */
2609 @REQ(set_window_region)
2610 user_handle_t window; /* handle to the window */
2611 int redraw; /* redraw the window? */
2612 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2613 @END
2616 /* Get the window update region */
2617 @REQ(get_update_region)
2618 user_handle_t window; /* handle to the window */
2619 user_handle_t from_child; /* child to start searching from */
2620 unsigned int flags; /* update flags (see below) */
2621 @REPLY
2622 user_handle_t child; /* child to repaint (or window itself) */
2623 unsigned int flags; /* resulting update flags (see below) */
2624 data_size_t total_size; /* total size of the resulting region */
2625 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2626 @END
2627 #define UPDATE_NONCLIENT 0x001 /* get region for repainting non-client area */
2628 #define UPDATE_ERASE 0x002 /* get region for erasing client area */
2629 #define UPDATE_PAINT 0x004 /* get region for painting client area */
2630 #define UPDATE_INTERNALPAINT 0x008 /* get region if internal paint is pending */
2631 #define UPDATE_ALLCHILDREN 0x010 /* force repaint of all children */
2632 #define UPDATE_NOCHILDREN 0x020 /* don't try to repaint any children */
2633 #define UPDATE_NOREGION 0x040 /* don't return a region, only the flags */
2634 #define UPDATE_DELAYED_ERASE 0x080 /* still needs erase after BeginPaint */
2635 #define UPDATE_CLIPCHILDREN 0x100 /* remove clipped children from the update region */
2638 /* Update the z order of a window so that a given rectangle is fully visible */
2639 @REQ(update_window_zorder)
2640 user_handle_t window; /* handle to the window */
2641 rectangle_t rect; /* rectangle that must be visible (in client coords) */
2642 @END
2645 /* Mark parts of a window as needing a redraw */
2646 @REQ(redraw_window)
2647 user_handle_t window; /* handle to the window */
2648 unsigned int flags; /* RDW_* flags */
2649 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2650 @END
2653 /* Set a window property */
2654 @REQ(set_window_property)
2655 user_handle_t window; /* handle to the window */
2656 lparam_t data; /* data to store */
2657 atom_t atom; /* property atom (if no name specified) */
2658 VARARG(name,unicode_str); /* property name */
2659 @END
2662 /* Remove a window property */
2663 @REQ(remove_window_property)
2664 user_handle_t window; /* handle to the window */
2665 atom_t atom; /* property atom (if no name specified) */
2666 VARARG(name,unicode_str); /* property name */
2667 @REPLY
2668 lparam_t data; /* data stored in property */
2669 @END
2672 /* Get a window property */
2673 @REQ(get_window_property)
2674 user_handle_t window; /* handle to the window */
2675 atom_t atom; /* property atom (if no name specified) */
2676 VARARG(name,unicode_str); /* property name */
2677 @REPLY
2678 lparam_t data; /* data stored in property */
2679 @END
2682 /* Get the list of properties of a window */
2683 @REQ(get_window_properties)
2684 user_handle_t window; /* handle to the window */
2685 @REPLY
2686 int total; /* total number of properties */
2687 VARARG(props,properties); /* list of properties */
2688 @END
2691 /* Create a window station */
2692 @REQ(create_winstation)
2693 unsigned int flags; /* window station flags */
2694 unsigned int access; /* wanted access rights */
2695 unsigned int attributes; /* object attributes */
2696 obj_handle_t rootdir; /* root directory */
2697 VARARG(name,unicode_str); /* object name */
2698 @REPLY
2699 obj_handle_t handle; /* handle to the window station */
2700 @END
2703 /* Open a handle to a window station */
2704 @REQ(open_winstation)
2705 unsigned int access; /* wanted access rights */
2706 unsigned int attributes; /* object attributes */
2707 obj_handle_t rootdir; /* root directory */
2708 VARARG(name,unicode_str); /* object name */
2709 @REPLY
2710 obj_handle_t handle; /* handle to the window station */
2711 @END
2714 /* Close a window station */
2715 @REQ(close_winstation)
2716 obj_handle_t handle; /* handle to the window station */
2717 @END
2720 /* Get the process current window station */
2721 @REQ(get_process_winstation)
2722 @REPLY
2723 obj_handle_t handle; /* handle to the window station */
2724 @END
2727 /* Set the process current window station */
2728 @REQ(set_process_winstation)
2729 obj_handle_t handle; /* handle to the window station */
2730 @END
2733 /* Enumerate window stations */
2734 @REQ(enum_winstation)
2735 unsigned int index; /* current index */
2736 @REPLY
2737 unsigned int next; /* next index */
2738 VARARG(name,unicode_str); /* window station name */
2739 @END
2742 /* Create a desktop */
2743 @REQ(create_desktop)
2744 unsigned int flags; /* desktop flags */
2745 unsigned int access; /* wanted access rights */
2746 unsigned int attributes; /* object attributes */
2747 VARARG(name,unicode_str); /* object name */
2748 @REPLY
2749 obj_handle_t handle; /* handle to the desktop */
2750 @END
2753 /* Open a handle to a desktop */
2754 @REQ(open_desktop)
2755 obj_handle_t winsta; /* window station to open (null allowed) */
2756 unsigned int flags; /* desktop flags */
2757 unsigned int access; /* wanted access rights */
2758 unsigned int attributes; /* object attributes */
2759 VARARG(name,unicode_str); /* object name */
2760 @REPLY
2761 obj_handle_t handle; /* handle to the desktop */
2762 @END
2765 /* Open a handle to current input desktop */
2766 @REQ(open_input_desktop)
2767 unsigned int flags; /* desktop flags */
2768 unsigned int access; /* wanted access rights */
2769 unsigned int attributes; /* object attributes */
2770 @REPLY
2771 obj_handle_t handle; /* handle to the desktop */
2772 @END
2775 /* Close a desktop */
2776 @REQ(close_desktop)
2777 obj_handle_t handle; /* handle to the desktop */
2778 @END
2781 /* Get the thread current desktop */
2782 @REQ(get_thread_desktop)
2783 thread_id_t tid; /* thread id */
2784 @REPLY
2785 obj_handle_t handle; /* handle to the desktop */
2786 @END
2789 /* Set the thread current desktop */
2790 @REQ(set_thread_desktop)
2791 obj_handle_t handle; /* handle to the desktop */
2792 @END
2795 /* Enumerate desktops */
2796 @REQ(enum_desktop)
2797 obj_handle_t winstation; /* handle to the window station */
2798 unsigned int index; /* current index */
2799 @REPLY
2800 unsigned int next; /* next index */
2801 VARARG(name,unicode_str); /* window station name */
2802 @END
2805 /* Get/set information about a user object (window station or desktop) */
2806 @REQ(set_user_object_info)
2807 obj_handle_t handle; /* handle to the object */
2808 unsigned int flags; /* information to set/get */
2809 unsigned int obj_flags; /* new object flags */
2810 @REPLY
2811 int is_desktop; /* is object a desktop? */
2812 unsigned int old_obj_flags; /* old object flags */
2813 VARARG(name,unicode_str); /* object name */
2814 @END
2815 #define SET_USER_OBJECT_SET_FLAGS 1
2816 #define SET_USER_OBJECT_GET_FULL_NAME 2
2819 /* Register a hotkey */
2820 @REQ(register_hotkey)
2821 user_handle_t window; /* handle to the window */
2822 int id; /* hotkey identifier */
2823 unsigned int flags; /* modifier keys */
2824 unsigned int vkey; /* virtual key code */
2825 @REPLY
2826 int replaced; /* did we replace an existing hotkey? */
2827 unsigned int flags; /* flags of replaced hotkey */
2828 unsigned int vkey; /* virtual key code of replaced hotkey */
2829 @END
2832 /* Unregister a hotkey */
2833 @REQ(unregister_hotkey)
2834 user_handle_t window; /* handle to the window */
2835 int id; /* hotkey identifier */
2836 @REPLY
2837 unsigned int flags; /* flags of removed hotkey */
2838 unsigned int vkey; /* virtual key code of removed hotkey */
2839 @END
2842 /* Attach (or detach) thread inputs */
2843 @REQ(attach_thread_input)
2844 thread_id_t tid_from; /* thread to be attached */
2845 thread_id_t tid_to; /* thread to which tid_from should be attached */
2846 int attach; /* is it an attach? */
2847 @END
2850 /* Get input data for a given thread */
2851 @REQ(get_thread_input)
2852 thread_id_t tid; /* id of thread */
2853 @REPLY
2854 user_handle_t focus; /* handle to the focus window */
2855 user_handle_t capture; /* handle to the capture window */
2856 user_handle_t active; /* handle to the active window */
2857 user_handle_t foreground; /* handle to the global foreground window */
2858 user_handle_t menu_owner; /* handle to the menu owner */
2859 user_handle_t move_size; /* handle to the moving/resizing window */
2860 user_handle_t caret; /* handle to the caret window */
2861 user_handle_t cursor; /* handle to the cursor */
2862 int show_count; /* cursor show count */
2863 rectangle_t rect; /* caret rectangle */
2864 @END
2867 /* Get the time of the last input event */
2868 @REQ(get_last_input_time)
2869 @REPLY
2870 unsigned int time;
2871 @END
2874 /* Retrieve queue keyboard state for current thread or global async state */
2875 @REQ(get_key_state)
2876 int async; /* whether to query the async state */
2877 int key; /* optional key code or -1 */
2878 @REPLY
2879 unsigned char state; /* state of specified key */
2880 VARARG(keystate,bytes); /* state array for all the keys */
2881 @END
2883 /* Set queue keyboard state for current thread */
2884 @REQ(set_key_state)
2885 int async; /* whether to change the async state too */
2886 VARARG(keystate,bytes); /* state array for all the keys */
2887 @END
2889 /* Set the system foreground window */
2890 @REQ(set_foreground_window)
2891 user_handle_t handle; /* handle to the foreground window */
2892 @REPLY
2893 user_handle_t previous; /* handle to the previous foreground window */
2894 int send_msg_old; /* whether we have to send a msg to the old window */
2895 int send_msg_new; /* whether we have to send a msg to the new window */
2896 @END
2898 /* Set the current thread focus window */
2899 @REQ(set_focus_window)
2900 user_handle_t handle; /* handle to the focus window */
2901 @REPLY
2902 user_handle_t previous; /* handle to the previous focus window */
2903 @END
2905 /* Set the current thread active window */
2906 @REQ(set_active_window)
2907 user_handle_t handle; /* handle to the active window */
2908 @REPLY
2909 user_handle_t previous; /* handle to the previous active window */
2910 @END
2912 /* Set the current thread capture window */
2913 @REQ(set_capture_window)
2914 user_handle_t handle; /* handle to the capture window */
2915 unsigned int flags; /* capture flags (see below) */
2916 @REPLY
2917 user_handle_t previous; /* handle to the previous capture window */
2918 user_handle_t full_handle; /* full 32-bit handle of new capture window */
2919 @END
2920 #define CAPTURE_MENU 0x01 /* capture is for a menu */
2921 #define CAPTURE_MOVESIZE 0x02 /* capture is for moving/resizing */
2924 /* Set the current thread caret window */
2925 @REQ(set_caret_window)
2926 user_handle_t handle; /* handle to the caret window */
2927 int width; /* caret width */
2928 int height; /* caret height */
2929 @REPLY
2930 user_handle_t previous; /* handle to the previous caret window */
2931 rectangle_t old_rect; /* previous caret rectangle */
2932 int old_hide; /* previous hide count */
2933 int old_state; /* previous caret state (1=on, 0=off) */
2934 @END
2937 /* Set the current thread caret information */
2938 @REQ(set_caret_info)
2939 unsigned int flags; /* caret flags (see below) */
2940 user_handle_t handle; /* handle to the caret window */
2941 int x; /* caret x position */
2942 int y; /* caret y position */
2943 int hide; /* increment for hide count (can be negative to show it) */
2944 int state; /* caret state (see below) */
2945 @REPLY
2946 user_handle_t full_handle; /* handle to the current caret window */
2947 rectangle_t old_rect; /* previous caret rectangle */
2948 int old_hide; /* previous hide count */
2949 int old_state; /* previous caret state (1=on, 0=off) */
2950 @END
2951 #define SET_CARET_POS 0x01 /* set the caret position from x,y */
2952 #define SET_CARET_HIDE 0x02 /* increment the caret hide count */
2953 #define SET_CARET_STATE 0x04 /* set the caret on/off state */
2954 enum caret_state
2956 CARET_STATE_OFF, /* off */
2957 CARET_STATE_ON, /* on */
2958 CARET_STATE_TOGGLE, /* toggle current state */
2959 CARET_STATE_ON_IF_MOVED /* on if the position differs, unchanged otherwise */
2963 /* Set a window hook */
2964 @REQ(set_hook)
2965 int id; /* id of the hook */
2966 process_id_t pid; /* id of process to set the hook into */
2967 thread_id_t tid; /* id of thread to set the hook into */
2968 int event_min;
2969 int event_max;
2970 client_ptr_t proc; /* hook procedure */
2971 int flags;
2972 int unicode; /* is it a unicode hook? */
2973 VARARG(module,unicode_str); /* module name */
2974 @REPLY
2975 user_handle_t handle; /* handle to the hook */
2976 unsigned int active_hooks; /* active hooks bitmap */
2977 @END
2980 /* Remove a window hook */
2981 @REQ(remove_hook)
2982 user_handle_t handle; /* handle to the hook */
2983 client_ptr_t proc; /* hook procedure if handle is 0 */
2984 int id; /* id of the hook if handle is 0 */
2985 @REPLY
2986 unsigned int active_hooks; /* active hooks bitmap */
2987 @END
2990 /* Start calling a hook chain */
2991 @REQ(start_hook_chain)
2992 int id; /* id of the hook */
2993 int event; /* signalled event */
2994 user_handle_t window; /* handle to the event window */
2995 int object_id; /* object id for out of context winevent */
2996 int child_id; /* child id for out of context winevent */
2997 @REPLY
2998 user_handle_t handle; /* handle to the next hook */
2999 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
3000 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
3001 int unicode; /* is it a unicode hook? */
3002 client_ptr_t proc; /* hook procedure */
3003 unsigned int active_hooks; /* active hooks bitmap */
3004 VARARG(module,unicode_str); /* module name */
3005 @END
3008 /* Finished calling a hook chain */
3009 @REQ(finish_hook_chain)
3010 int id; /* id of the hook */
3011 @END
3014 /* Get the hook information */
3015 @REQ(get_hook_info)
3016 user_handle_t handle; /* handle to the current hook */
3017 int get_next; /* do we want info about current or next hook? */
3018 int event; /* signalled event */
3019 user_handle_t window; /* handle to the event window */
3020 int object_id; /* object id for out of context winevent */
3021 int child_id; /* child id for out of context winevent */
3022 @REPLY
3023 user_handle_t handle; /* handle to the hook */
3024 int id; /* id of the hook */
3025 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
3026 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
3027 client_ptr_t proc; /* hook procedure */
3028 int unicode; /* is it a unicode hook? */
3029 VARARG(module,unicode_str); /* module name */
3030 @END
3033 /* Create a window class */
3034 @REQ(create_class)
3035 int local; /* is it a local class? */
3036 atom_t atom; /* class atom */
3037 unsigned int style; /* class style */
3038 mod_handle_t instance; /* module instance */
3039 int extra; /* number of extra class bytes */
3040 int win_extra; /* number of window extra bytes */
3041 client_ptr_t client_ptr; /* pointer to class in client address space */
3042 data_size_t name_offset; /* base class name offset for specified atom */
3043 VARARG(name,unicode_str); /* class name */
3044 @REPLY
3045 atom_t atom; /* resulting class atom */
3046 @END
3049 /* Destroy a window class */
3050 @REQ(destroy_class)
3051 atom_t atom; /* class atom */
3052 mod_handle_t instance; /* module instance */
3053 VARARG(name,unicode_str); /* class name */
3054 @REPLY
3055 client_ptr_t client_ptr; /* pointer to class in client address space */
3056 @END
3059 /* Set some information in a class */
3060 @REQ(set_class_info)
3061 user_handle_t window; /* handle to the window */
3062 unsigned int flags; /* flags for info to set (see below) */
3063 atom_t atom; /* class atom */
3064 unsigned int style; /* class style */
3065 int win_extra; /* number of window extra bytes */
3066 mod_handle_t instance; /* module instance */
3067 int extra_offset; /* offset to set in extra bytes */
3068 data_size_t extra_size; /* size to set in extra bytes */
3069 lparam_t extra_value; /* value to set in extra bytes */
3070 @REPLY
3071 atom_t old_atom; /* previous class atom */
3072 atom_t base_atom; /* base class atom */
3073 mod_handle_t old_instance; /* previous module instance */
3074 lparam_t old_extra_value; /* old value in extra bytes */
3075 unsigned int old_style; /* previous class style */
3076 int old_extra; /* previous number of class extra bytes */
3077 int old_win_extra; /* previous number of window extra bytes */
3078 @END
3079 #define SET_CLASS_ATOM 0x0001
3080 #define SET_CLASS_STYLE 0x0002
3081 #define SET_CLASS_WINEXTRA 0x0004
3082 #define SET_CLASS_INSTANCE 0x0008
3083 #define SET_CLASS_EXTRA 0x0010
3086 /* Open the clipboard */
3087 @REQ(open_clipboard)
3088 user_handle_t window; /* clipboard window */
3089 @REPLY
3090 user_handle_t owner; /* current clipboard owner */
3091 @END
3094 /* Close the clipboard */
3095 @REQ(close_clipboard)
3096 @REPLY
3097 user_handle_t viewer; /* first clipboard viewer */
3098 user_handle_t owner; /* current clipboard owner */
3099 @END
3102 /* Empty the clipboard and grab ownership */
3103 @REQ(empty_clipboard)
3104 @END
3107 /* Add a data format to the clipboard */
3108 @REQ(set_clipboard_data)
3109 unsigned int format; /* clipboard format of the data */
3110 unsigned int lcid; /* locale id to use for synthesizing text formats */
3111 VARARG(data,bytes); /* data contents */
3112 @REPLY
3113 unsigned int seqno; /* sequence number for the set data */
3114 @END
3117 /* Fetch a data format from the clipboard */
3118 @REQ(get_clipboard_data)
3119 unsigned int format; /* clipboard format of the data */
3120 int render; /* will we try to render it if missing? */
3121 int cached; /* do we already have it in the client-side cache? */
3122 unsigned int seqno; /* sequence number for the data in the cache */
3123 @REPLY
3124 unsigned int from; /* for synthesized data, format to generate it from */
3125 user_handle_t owner; /* clipboard owner for delayed-rendered formats */
3126 unsigned int seqno; /* sequence number for the originally set data */
3127 data_size_t total; /* total data size */
3128 VARARG(data,bytes); /* data contents */
3129 @END
3132 /* Retrieve a list of available formats */
3133 @REQ(get_clipboard_formats)
3134 unsigned int format; /* specific format to query, return all if 0 */
3135 @REPLY
3136 unsigned int count; /* count of available formats */
3137 VARARG(formats,uints); /* array of available formats */
3138 @END
3141 /* Retrieve the next available format */
3142 @REQ(enum_clipboard_formats)
3143 unsigned int previous; /* previous format, or first if 0 */
3144 @REPLY
3145 unsigned int format; /* next format */
3146 @END
3149 /* Release ownership of the clipboard */
3150 @REQ(release_clipboard)
3151 user_handle_t owner; /* clipboard owner to release */
3152 @REPLY
3153 user_handle_t viewer; /* first clipboard viewer */
3154 user_handle_t owner; /* current clipboard owner */
3155 @END
3158 /* Get clipboard information */
3159 @REQ(get_clipboard_info)
3160 @REPLY
3161 user_handle_t window; /* clipboard window */
3162 user_handle_t owner; /* clipboard owner */
3163 user_handle_t viewer; /* clipboard viewer */
3164 unsigned int seqno; /* current sequence number */
3165 @END
3168 /* Set the clipboard viewer window */
3169 @REQ(set_clipboard_viewer)
3170 user_handle_t viewer; /* clipboard viewer */
3171 user_handle_t previous; /* if non-zero, check that this was the previous viewer */
3172 @REPLY
3173 user_handle_t old_viewer; /* previous clipboard viewer */
3174 user_handle_t owner; /* clipboard owner */
3175 @END
3178 /* Add a clipboard listener window */
3179 @REQ(add_clipboard_listener)
3180 user_handle_t window; /* clipboard listener window */
3181 @END
3184 /* Remove a clipboard listener window */
3185 @REQ(remove_clipboard_listener)
3186 user_handle_t window; /* clipboard listener window */
3187 @END
3190 /* Open a security token */
3191 @REQ(open_token)
3192 obj_handle_t handle; /* handle to the thread or process */
3193 unsigned int access; /* access rights to the new token */
3194 unsigned int attributes;/* object attributes */
3195 unsigned int flags; /* flags (see below) */
3196 @REPLY
3197 obj_handle_t token; /* handle to the token */
3198 @END
3199 #define OPEN_TOKEN_THREAD 1
3200 #define OPEN_TOKEN_AS_SELF 2
3203 /* Set/get the global windows */
3204 @REQ(set_global_windows)
3205 unsigned int flags; /* flags for fields to set (see below) */
3206 user_handle_t shell_window; /* handle to the new shell window */
3207 user_handle_t shell_listview; /* handle to the new shell listview window */
3208 user_handle_t progman_window; /* handle to the new program manager window */
3209 user_handle_t taskman_window; /* handle to the new task manager window */
3210 @REPLY
3211 user_handle_t old_shell_window; /* handle to the shell window */
3212 user_handle_t old_shell_listview; /* handle to the shell listview window */
3213 user_handle_t old_progman_window; /* handle to the new program manager window */
3214 user_handle_t old_taskman_window; /* handle to the new task manager window */
3215 @END
3216 #define SET_GLOBAL_SHELL_WINDOWS 0x01 /* set both main shell and listview windows */
3217 #define SET_GLOBAL_PROGMAN_WINDOW 0x02
3218 #define SET_GLOBAL_TASKMAN_WINDOW 0x04
3220 /* Adjust the privileges held by a token */
3221 @REQ(adjust_token_privileges)
3222 obj_handle_t handle; /* handle to the token */
3223 int disable_all; /* disable all privileges? */
3224 int get_modified_state; /* get modified privileges? */
3225 VARARG(privileges,luid_attr); /* privileges to enable/disable/remove */
3226 @REPLY
3227 unsigned int len; /* total length in bytes required to store token privileges */
3228 VARARG(privileges,luid_attr); /* modified privileges */
3229 @END
3231 /* Retrieves the set of privileges held by or available to a token */
3232 @REQ(get_token_privileges)
3233 obj_handle_t handle; /* handle to the token */
3234 @REPLY
3235 unsigned int len; /* total length in bytes required to store token privileges */
3236 VARARG(privileges,luid_attr); /* privileges held by or available to a token */
3237 @END
3239 /* Check the token has the required privileges */
3240 @REQ(check_token_privileges)
3241 obj_handle_t handle; /* handle to the token */
3242 int all_required; /* are all the privileges required for the check to succeed? */
3243 VARARG(privileges,luid_attr); /* privileges to check */
3244 @REPLY
3245 int has_privileges; /* does the token have the required privileges? */
3246 VARARG(privileges,luid_attr); /* privileges held by or available to a token */
3247 @END
3249 @REQ(duplicate_token)
3250 obj_handle_t handle; /* handle to the token to duplicate */
3251 unsigned int access; /* access rights to the new token */
3252 int primary; /* is the new token to be a primary one? */
3253 int impersonation_level; /* impersonation level of the new token */
3254 VARARG(objattr,object_attributes); /* object attributes */
3255 @REPLY
3256 obj_handle_t new_handle; /* duplicated handle */
3257 @END
3259 @REQ(filter_token)
3260 obj_handle_t handle; /* handle to the token to duplicate */
3261 unsigned int flags; /* flags */
3262 data_size_t privileges_size; /* size of privileges */
3263 VARARG(privileges,luid_attr,privileges_size); /* privileges to remove from new token */
3264 VARARG(disable_sids,sid); /* array of groups to remove from new token */
3265 @REPLY
3266 obj_handle_t new_handle; /* filtered handle */
3267 @END
3269 @REQ(access_check)
3270 obj_handle_t handle; /* handle to the token */
3271 unsigned int desired_access; /* desired access to the object */
3272 generic_map_t mapping; /* mapping to specific rights */
3273 VARARG(sd,security_descriptor); /* security descriptor to check */
3274 @REPLY
3275 unsigned int access_granted; /* access rights actually granted */
3276 unsigned int access_status; /* was access granted? */
3277 unsigned int privileges_len; /* length needed to store privileges */
3278 VARARG(privileges,luid_attr); /* privileges used during access check */
3279 @END
3281 @REQ(get_token_sid)
3282 obj_handle_t handle; /* handle to the token */
3283 unsigned int which_sid; /* which SID to retrieve from the token */
3284 @REPLY
3285 data_size_t sid_len; /* length needed to store sid */
3286 VARARG(sid,sid); /* the sid specified by which_sid from the token */
3287 @END
3289 @REQ(get_token_groups)
3290 obj_handle_t handle; /* handle to the token */
3291 unsigned int attr_mask; /* mask for wanted attributes */
3292 @REPLY
3293 data_size_t attr_len; /* length needed to store attrs */
3294 data_size_t sid_len; /* length needed to store sids */
3295 VARARG(attrs,uints,attr_len); /* group attributes */
3296 VARARG(sids,sids); /* group sids */
3297 @END
3299 @REQ(get_token_default_dacl)
3300 obj_handle_t handle; /* handle to the token */
3301 @REPLY
3302 data_size_t acl_len; /* length needed to store access control list */
3303 VARARG(acl,acl); /* access control list */
3304 @END
3306 @REQ(set_token_default_dacl)
3307 obj_handle_t handle; /* handle to the token */
3308 VARARG(acl,acl); /* default dacl to set */
3309 @END
3311 @REQ(set_security_object)
3312 obj_handle_t handle; /* handle to the object */
3313 unsigned int security_info; /* which parts of security descriptor to set */
3314 VARARG(sd,security_descriptor); /* security descriptor to set */
3315 @END
3317 @REQ(get_security_object)
3318 obj_handle_t handle; /* handle to the object */
3319 unsigned int security_info; /* which parts of security descriptor to get */
3320 @REPLY
3321 unsigned int sd_len; /* buffer size needed for sd */
3322 VARARG(sd,security_descriptor); /* retrieved security descriptor */
3323 @END
3326 struct handle_info
3328 process_id_t owner;
3329 obj_handle_t handle;
3330 unsigned int access;
3331 unsigned int attributes;
3332 unsigned int type;
3335 /* Return a list of all opened handles */
3336 @REQ(get_system_handles)
3337 @REPLY
3338 unsigned int count; /* number of handles */
3339 VARARG(data,handle_infos); /* array of handle_infos */
3340 @END
3343 /* Create a mailslot */
3344 @REQ(create_mailslot)
3345 unsigned int access; /* wanted access rights */
3346 timeout_t read_timeout;
3347 unsigned int max_msgsize;
3348 VARARG(objattr,object_attributes); /* object attributes */
3349 @REPLY
3350 obj_handle_t handle; /* handle to the mailslot */
3351 @END
3354 /* Set mailslot information */
3355 @REQ(set_mailslot_info)
3356 obj_handle_t handle; /* handle to the mailslot */
3357 timeout_t read_timeout;
3358 unsigned int flags;
3359 @REPLY
3360 timeout_t read_timeout;
3361 unsigned int max_msgsize;
3362 @END
3363 #define MAILSLOT_SET_READ_TIMEOUT 1
3366 /* Create a directory object */
3367 @REQ(create_directory)
3368 unsigned int access; /* access flags */
3369 VARARG(objattr,object_attributes); /* object attributes */
3370 @REPLY
3371 obj_handle_t handle; /* handle to the directory */
3372 @END
3375 /* Open a directory object */
3376 @REQ(open_directory)
3377 unsigned int access; /* access flags */
3378 unsigned int attributes; /* object attributes */
3379 obj_handle_t rootdir; /* root directory */
3380 VARARG(directory_name,unicode_str); /* Directory name */
3381 @REPLY
3382 obj_handle_t handle; /* handle to the directory */
3383 @END
3386 /* Get a directory entry by index */
3387 @REQ(get_directory_entry)
3388 obj_handle_t handle; /* handle to the directory */
3389 unsigned int index; /* entry index */
3390 @REPLY
3391 data_size_t total_len; /* total length needed for strings */
3392 data_size_t name_len; /* length of the entry name in bytes */
3393 VARARG(name,unicode_str,name_len); /* entry name */
3394 VARARG(type,unicode_str); /* entry type */
3395 @END
3398 /* Create a symbolic link object */
3399 @REQ(create_symlink)
3400 unsigned int access; /* access flags */
3401 VARARG(objattr,object_attributes); /* object attributes */
3402 VARARG(target_name,unicode_str); /* target name */
3403 @REPLY
3404 obj_handle_t handle; /* handle to the symlink */
3405 @END
3408 /* Open a symbolic link object */
3409 @REQ(open_symlink)
3410 unsigned int access; /* access flags */
3411 unsigned int attributes; /* object attributes */
3412 obj_handle_t rootdir; /* root directory */
3413 VARARG(name,unicode_str); /* symlink name */
3414 @REPLY
3415 obj_handle_t handle; /* handle to the symlink */
3416 @END
3419 /* Query a symbolic link object */
3420 @REQ(query_symlink)
3421 obj_handle_t handle; /* handle to the symlink */
3422 @REPLY
3423 data_size_t total; /* total needed size for name */
3424 VARARG(target_name,unicode_str); /* target name */
3425 @END
3428 /* Query basic object information */
3429 @REQ(get_object_info)
3430 obj_handle_t handle; /* handle to the object */
3431 @REPLY
3432 unsigned int access; /* granted access mask */
3433 unsigned int ref_count; /* object ref count */
3434 unsigned int handle_count; /* object handle count */
3435 @END
3438 /* Query the full name of an object */
3439 @REQ(get_object_name)
3440 obj_handle_t handle; /* handle to the object */
3441 @REPLY
3442 data_size_t total; /* total needed size for name */
3443 VARARG(name,unicode_str); /* object name */
3444 @END
3447 /* Query object type name information */
3448 @REQ(get_object_type)
3449 obj_handle_t handle; /* handle to the object */
3450 @REPLY
3451 VARARG(info,object_type_info); /* type information */
3452 @END
3455 /* Query type information for all types */
3456 @REQ(get_object_types)
3457 @REPLY
3458 int count; /* total count of object types */
3459 VARARG(info,object_types_info); /* type information */
3460 @END
3463 /* Allocate a locally-unique identifier */
3464 @REQ(allocate_locally_unique_id)
3465 @REPLY
3466 struct luid luid;
3467 @END
3470 /* Create a device manager */
3471 @REQ(create_device_manager)
3472 unsigned int access; /* wanted access rights */
3473 unsigned int attributes; /* object attributes */
3474 @REPLY
3475 obj_handle_t handle; /* handle to the device */
3476 @END
3479 /* Create a device */
3480 @REQ(create_device)
3481 obj_handle_t rootdir; /* root directory */
3482 client_ptr_t user_ptr; /* opaque ptr for use by client */
3483 obj_handle_t manager; /* device manager */
3484 VARARG(name,unicode_str); /* object name */
3485 @END
3488 /* Delete a device */
3489 @REQ(delete_device)
3490 obj_handle_t manager; /* handle to the device manager */
3491 client_ptr_t device; /* pointer to the device */
3492 @END
3495 /* Retrieve the next pending device irp request */
3496 @REQ(get_next_device_request)
3497 obj_handle_t manager; /* handle to the device manager */
3498 obj_handle_t prev; /* handle to the previous irp */
3499 unsigned int status; /* status of the previous irp */
3500 client_ptr_t user_ptr; /* user pointer of the previous irp */
3501 int pending; /* was the previous irp marked pending? */
3502 unsigned int iosb_status; /* IOSB status of the previous irp */
3503 data_size_t result; /* IOSB result of the previous irp */
3504 VARARG(data,bytes); /* output data of the previous irp */
3505 @REPLY
3506 irp_params_t params; /* irp parameters */
3507 obj_handle_t next; /* handle to the next irp */
3508 thread_id_t client_tid; /* tid of thread calling irp */
3509 client_ptr_t client_thread; /* pointer to thread object of calling irp */
3510 data_size_t in_size; /* total needed input size */
3511 VARARG(next_data,bytes); /* input data of the next irp */
3512 @END
3515 /* Get kernel pointer from server object */
3516 @REQ(get_kernel_object_ptr)
3517 obj_handle_t manager; /* handle to the device manager */
3518 obj_handle_t handle; /* object handle */
3519 @REPLY
3520 client_ptr_t user_ptr; /* kernel object pointer */
3521 @END
3524 /* Associate kernel pointer with server object */
3525 @REQ(set_kernel_object_ptr)
3526 obj_handle_t manager; /* handle to the device manager */
3527 obj_handle_t handle; /* object handle */
3528 client_ptr_t user_ptr; /* kernel object pointer */
3529 @END
3532 /* Grab server object reference from kernel object pointer */
3533 @REQ(grab_kernel_object)
3534 obj_handle_t manager; /* handle to the device manager */
3535 client_ptr_t user_ptr; /* kernel object pointer */
3536 @END
3539 /* Release server object reference from kernel object pointer */
3540 @REQ(release_kernel_object)
3541 obj_handle_t manager; /* handle to the device manager */
3542 client_ptr_t user_ptr; /* kernel object pointer */
3543 @END
3546 /* Get handle from kernel object pointer */
3547 @REQ(get_kernel_object_handle)
3548 obj_handle_t manager; /* handle to the device manager */
3549 client_ptr_t user_ptr; /* kernel object pointer */
3550 unsigned int access; /* wanted access rights */
3551 @REPLY
3552 obj_handle_t handle; /* kernel object handle */
3553 @END
3556 /* Make the current process a system process */
3557 @REQ(make_process_system)
3558 obj_handle_t handle; /* handle to the process */
3559 @REPLY
3560 obj_handle_t event; /* event signaled when all user processes have exited */
3561 @END
3564 /* Get detailed fixed-size information about a token */
3565 @REQ(get_token_info)
3566 obj_handle_t handle; /* handle to the object */
3567 @REPLY
3568 struct luid token_id; /* locally-unique identifier of the token */
3569 struct luid modified_id; /* locally-unique identifier of the modified version of the token */
3570 unsigned int session_id; /* token session id */
3571 int primary; /* is the token primary or impersonation? */
3572 int impersonation_level; /* level of impersonation */
3573 int elevation; /* elevation type */
3574 int group_count; /* the number of groups the token is a member of */
3575 int privilege_count; /* the number of privileges the token has */
3576 @END
3579 /* Create a token which is an elevation counterpart to this token */
3580 @REQ(create_linked_token)
3581 obj_handle_t handle; /* handle to the token */
3582 @REPLY
3583 obj_handle_t linked; /* handle to the linked token */
3584 @END
3587 /* Create I/O completion port */
3588 @REQ(create_completion)
3589 unsigned int access; /* desired access to a port */
3590 unsigned int concurrent; /* max number of concurrent active threads */
3591 VARARG(objattr,object_attributes); /* object attributes */
3592 @REPLY
3593 obj_handle_t handle; /* port handle */
3594 @END
3597 /* Open I/O completion port */
3598 @REQ(open_completion)
3599 unsigned int access; /* desired access to a port */
3600 unsigned int attributes; /* object attributes */
3601 obj_handle_t rootdir; /* root directory */
3602 VARARG(filename,unicode_str); /* port name */
3603 @REPLY
3604 obj_handle_t handle; /* port handle */
3605 @END
3608 /* add completion to completion port */
3609 @REQ(add_completion)
3610 obj_handle_t handle; /* port handle */
3611 apc_param_t ckey; /* completion key */
3612 apc_param_t cvalue; /* completion value */
3613 apc_param_t information; /* IO_STATUS_BLOCK Information */
3614 unsigned int status; /* completion result */
3615 @END
3618 /* get completion from completion port queue */
3619 @REQ(remove_completion)
3620 obj_handle_t handle; /* port handle */
3621 @REPLY
3622 apc_param_t ckey; /* completion key */
3623 apc_param_t cvalue; /* completion value */
3624 apc_param_t information; /* IO_STATUS_BLOCK Information */
3625 unsigned int status; /* completion result */
3626 @END
3629 /* get completion queue depth */
3630 @REQ(query_completion)
3631 obj_handle_t handle; /* port handle */
3632 @REPLY
3633 unsigned int depth; /* completion queue depth */
3634 @END
3637 /* associate object with completion port */
3638 @REQ(set_completion_info)
3639 obj_handle_t handle; /* object handle */
3640 apc_param_t ckey; /* completion key */
3641 obj_handle_t chandle; /* port handle */
3642 @END
3645 /* check for associated completion and push msg */
3646 @REQ(add_fd_completion)
3647 obj_handle_t handle; /* async' object */
3648 apc_param_t cvalue; /* completion value */
3649 apc_param_t information; /* IO_STATUS_BLOCK Information */
3650 unsigned int status; /* completion status */
3651 int async; /* completion is an async result */
3652 @END
3655 /* set fd completion information */
3656 @REQ(set_fd_completion_mode)
3657 obj_handle_t handle; /* handle to a file or directory */
3658 unsigned int flags; /* completion notification flags */
3659 @END
3662 /* set fd disposition information */
3663 @REQ(set_fd_disp_info)
3664 obj_handle_t handle; /* handle to a file or directory */
3665 unsigned int flags; /* what actions should be taken when deleting a file */
3666 @END
3669 /* set fd name information */
3670 @REQ(set_fd_name_info)
3671 obj_handle_t handle; /* handle to a file or directory */
3672 obj_handle_t rootdir; /* root directory */
3673 data_size_t namelen; /* length of NT name in bytes */
3674 int link; /* link instead of renaming */
3675 int replace; /* replace an existing file? */
3676 VARARG(name,unicode_str,namelen); /* NT name */
3677 VARARG(filename,string); /* new file name */
3678 @END
3681 /* set fd eof information */
3682 @REQ(set_fd_eof_info)
3683 obj_handle_t handle; /* handle to a file or directory */
3684 file_pos_t eof; /* offset of eof of file */
3685 @END
3688 /* Retrieve layered info for a window */
3689 @REQ(get_window_layered_info)
3690 user_handle_t handle; /* handle to the window */
3691 @REPLY
3692 unsigned int color_key; /* color key */
3693 unsigned int alpha; /* alpha (0..255) */
3694 unsigned int flags; /* LWA_* flags */
3695 @END
3698 /* Set layered info for a window */
3699 @REQ(set_window_layered_info)
3700 user_handle_t handle; /* handle to the window */
3701 unsigned int color_key; /* color key */
3702 unsigned int alpha; /* alpha (0..255) */
3703 unsigned int flags; /* LWA_* flags */
3704 @END
3707 /* Allocate an arbitrary user handle */
3708 @REQ(alloc_user_handle)
3709 @REPLY
3710 user_handle_t handle; /* allocated handle */
3711 @END
3714 /* Free an arbitrary user handle */
3715 @REQ(free_user_handle)
3716 user_handle_t handle; /* handle to free*/
3717 @END
3720 /* Set/get the current cursor */
3721 @REQ(set_cursor)
3722 unsigned int flags; /* flags for fields to set (see below) */
3723 user_handle_t handle; /* handle to the cursor */
3724 int show_count; /* show count increment/decrement */
3725 int x; /* cursor position */
3726 int y;
3727 rectangle_t clip; /* cursor clip rectangle */
3728 @REPLY
3729 user_handle_t prev_handle; /* previous handle */
3730 int prev_count; /* previous show count */
3731 int prev_x; /* previous position */
3732 int prev_y;
3733 int new_x; /* new position */
3734 int new_y;
3735 rectangle_t new_clip; /* new clip rectangle */
3736 unsigned int last_change; /* time of last position change */
3737 @END
3738 #define SET_CURSOR_HANDLE 0x01
3739 #define SET_CURSOR_COUNT 0x02
3740 #define SET_CURSOR_POS 0x04
3741 #define SET_CURSOR_CLIP 0x08
3742 #define SET_CURSOR_NOCLIP 0x10
3743 #define SET_CURSOR_FSCLIP 0x20
3745 /* Get the history of the 64 last cursor positions */
3746 @REQ(get_cursor_history)
3747 @REPLY
3748 VARARG(history,cursor_positions);
3749 @END
3752 /* Batch read rawinput message data */
3753 @REQ(get_rawinput_buffer)
3754 data_size_t rawinput_size; /* size of RAWINPUT structure */
3755 data_size_t buffer_size; /* size of output buffer */
3756 @REPLY
3757 data_size_t next_size; /* minimum size to get next message data */
3758 unsigned int count;
3759 VARARG(data,bytes);
3760 @END
3762 /* Modify the list of registered rawinput devices */
3763 @REQ(update_rawinput_devices)
3764 VARARG(devices,rawinput_devices);
3765 @END
3767 /* Create a new job object */
3768 @REQ(create_job)
3769 unsigned int access; /* wanted access rights */
3770 VARARG(objattr,object_attributes); /* object attributes */
3771 @REPLY
3772 obj_handle_t handle; /* handle to the job */
3773 @END
3776 /* Open a job object */
3777 @REQ(open_job)
3778 unsigned int access; /* wanted access rights */
3779 unsigned int attributes; /* object attributes */
3780 obj_handle_t rootdir; /* root directory */
3781 VARARG(name,unicode_str); /* object name */
3782 @REPLY
3783 obj_handle_t handle; /* handle to the job */
3784 @END
3787 /* Assign a job object to a process */
3788 @REQ(assign_job)
3789 obj_handle_t job; /* handle to the job */
3790 obj_handle_t process; /* handle to the process */
3791 @END
3794 /* Check if a process is associated with a job */
3795 @REQ(process_in_job)
3796 obj_handle_t job; /* handle to the job */
3797 obj_handle_t process; /* handle to the process */
3798 @END
3801 /* Set limit flags on a job */
3802 @REQ(set_job_limits)
3803 obj_handle_t handle; /* handle to the job */
3804 unsigned int limit_flags; /* new limit flags */
3805 @END
3808 /* Set new completion port for a job */
3809 @REQ(set_job_completion_port)
3810 obj_handle_t job; /* handle to the job */
3811 obj_handle_t port; /* handle to the completion port */
3812 client_ptr_t key; /* key to send with completion messages */
3813 @END
3816 /* Retrieve information about a job */
3817 @REQ(get_job_info)
3818 obj_handle_t handle; /* handle to the job */
3819 @REPLY
3820 int total_processes; /* total count of processes */
3821 int active_processes; /* count of running processes */
3822 VARARG(pids,uints); /* list of active pids */
3823 @END
3826 /* Terminate all processes associated with the job */
3827 @REQ(terminate_job)
3828 obj_handle_t handle; /* handle to the job */
3829 int status; /* process exit code */
3830 @END
3833 /* Suspend a process */
3834 @REQ(suspend_process)
3835 obj_handle_t handle; /* process handle */
3836 @END
3839 /* Resume a process */
3840 @REQ(resume_process)
3841 obj_handle_t handle; /* process handle */
3842 @END
3845 /* Iterate thread list for process */
3846 @REQ(get_next_thread)
3847 obj_handle_t process; /* process handle */
3848 obj_handle_t last; /* thread handle to start with */
3849 unsigned int access; /* desired access for returned handle */
3850 unsigned int attributes; /* returned handle attributes */
3851 unsigned int flags; /* controls iteration direction */
3852 @REPLY
3853 obj_handle_t handle; /* next thread handle */
3854 @END