widl: Add support for function parameter flags to SLTG typelib generator.
[wine.git] / server / protocol.def
blob55dda2d7636efa9731b497404ed652c8c0220451
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>
33 #include <ntuser.h>
35 typedef unsigned int obj_handle_t;
36 typedef unsigned int user_handle_t;
37 typedef unsigned int atom_t;
38 typedef unsigned int process_id_t;
39 typedef unsigned int thread_id_t;
40 typedef unsigned int data_size_t;
41 typedef unsigned int ioctl_code_t;
42 typedef unsigned __int64 lparam_t;
43 typedef unsigned __int64 apc_param_t;
44 typedef unsigned __int64 mem_size_t;
45 typedef unsigned __int64 file_pos_t;
46 typedef unsigned __int64 client_ptr_t;
47 typedef unsigned __int64 affinity_t;
48 typedef client_ptr_t mod_handle_t;
50 struct request_header
52 int req; /* request code */
53 data_size_t request_size; /* request variable part size */
54 data_size_t reply_size; /* reply variable part maximum size */
57 struct reply_header
59 unsigned int error; /* error result */
60 data_size_t reply_size; /* reply variable part size */
63 /* placeholder structure for the maximum allowed request size */
64 /* this is used to construct the generic_request union */
65 struct request_max_size
67 int pad[16]; /* the max request size is 16 ints */
70 #define FIRST_USER_HANDLE 0x0020 /* first possible value for low word of user handle */
71 #define LAST_USER_HANDLE 0xffef /* last possible value for low word of user handle */
74 /* debug event data */
75 typedef union
77 int code; /* event code */
78 struct
80 int code; /* DbgExceptionStateChange */
81 int first; /* first chance exception? */
82 unsigned int exc_code; /* exception code */
83 unsigned int flags; /* exception flags */
84 client_ptr_t record; /* exception record */
85 client_ptr_t address; /* exception address */
86 int nb_params; /* number of parameters */
87 int __pad;
88 client_ptr_t params[15]; /* parameters */
89 } exception;
90 struct
92 int code; /* DbgCreateThreadStateChange */
93 obj_handle_t handle; /* handle to the new thread */
94 client_ptr_t start; /* thread startup routine */
95 } create_thread;
96 struct
98 int code; /* DbgCreateProcessStateChange */
99 obj_handle_t file; /* handle to the process exe file */
100 obj_handle_t process; /* handle to the new process */
101 obj_handle_t thread; /* handle to the new thread */
102 mod_handle_t base; /* base of executable image */
103 int dbg_offset; /* offset of debug info in file */
104 int dbg_size; /* size of debug info */
105 client_ptr_t start; /* thread startup routine */
106 } create_process;
107 struct
109 int code; /* DbgExitThreadStateChange/DbgExitProcessStateChange */
110 int exit_code; /* thread or process exit code */
111 } exit;
112 struct
114 int code; /* DbgLoadDllStateChange */
115 obj_handle_t handle; /* file handle for the dll */
116 mod_handle_t base; /* base address of the dll */
117 int dbg_offset; /* offset of debug info in file */
118 int dbg_size; /* size of debug info */
119 client_ptr_t name; /* image name (optional) */
120 } load_dll;
121 struct
123 int code; /* DbgUnloadDllStateChange */
124 int __pad;
125 mod_handle_t base; /* base address of the dll */
126 } unload_dll;
127 } debug_event_t;
129 /* context data */
130 typedef struct
132 unsigned int machine; /* machine type */
133 unsigned int flags; /* SERVER_CTX_* flags */
134 union
136 struct { unsigned int eip, ebp, esp, eflags, cs, ss; } i386_regs;
137 struct { unsigned __int64 rip, rbp, rsp;
138 unsigned int cs, ss, flags, __pad; } x86_64_regs;
139 struct { unsigned int sp, lr, pc, cpsr; } arm_regs;
140 struct { unsigned __int64 sp, pc, pstate; } arm64_regs;
141 } ctl; /* selected by SERVER_CTX_CONTROL */
142 union
144 struct { unsigned int eax, ebx, ecx, edx, esi, edi; } i386_regs;
145 struct { unsigned __int64 rax,rbx, rcx, rdx, rsi, rdi,
146 r8, r9, r10, r11, r12, r13, r14, r15; } x86_64_regs;
147 struct { unsigned int r[13]; } arm_regs;
148 struct { unsigned __int64 x[31]; } arm64_regs;
149 } integer; /* selected by SERVER_CTX_INTEGER */
150 union
152 struct { unsigned int ds, es, fs, gs; } i386_regs;
153 struct { unsigned int ds, es, fs, gs; } x86_64_regs;
154 } seg; /* selected by SERVER_CTX_SEGMENTS */
155 union
157 struct { unsigned int ctrl, status, tag, err_off, err_sel, data_off, data_sel, cr0npx;
158 unsigned char regs[80]; } i386_regs;
159 struct { struct { unsigned __int64 low, high; } fpregs[32]; } x86_64_regs;
160 struct { unsigned __int64 d[32]; unsigned int fpscr; } arm_regs;
161 struct { struct { unsigned __int64 low, high; } q[32]; unsigned int fpcr, fpsr; } arm64_regs;
162 } fp; /* selected by SERVER_CTX_FLOATING_POINT */
163 union
165 struct { unsigned int dr0, dr1, dr2, dr3, dr6, dr7; } i386_regs;
166 struct { unsigned __int64 dr0, dr1, dr2, dr3, dr6, dr7; } x86_64_regs;
167 struct { unsigned int bvr[8], bcr[8], wvr[1], wcr[1]; } arm_regs;
168 struct { unsigned __int64 bvr[8], wvr[2]; unsigned int bcr[8], wcr[2]; } arm64_regs;
169 } debug; /* selected by SERVER_CTX_DEBUG_REGISTERS */
170 union
172 unsigned char i386_regs[512];
173 } ext; /* selected by SERVER_CTX_EXTENDED_REGISTERS */
174 union
176 struct { struct { unsigned __int64 low, high; } ymm_high[16]; } regs;
177 } ymm; /* selected by SERVER_CTX_YMM_REGISTERS */
178 } context_t;
180 #define SERVER_CTX_CONTROL 0x01
181 #define SERVER_CTX_INTEGER 0x02
182 #define SERVER_CTX_SEGMENTS 0x04
183 #define SERVER_CTX_FLOATING_POINT 0x08
184 #define SERVER_CTX_DEBUG_REGISTERS 0x10
185 #define SERVER_CTX_EXTENDED_REGISTERS 0x20
186 #define SERVER_CTX_YMM_REGISTERS 0x40
188 /* structure used in sending an fd from client to server */
189 struct send_fd
191 thread_id_t tid; /* thread id */
192 int fd; /* file descriptor on client-side */
195 /* structure sent by the server on the wait fifo */
196 struct wake_up_reply
198 client_ptr_t cookie; /* magic cookie that was passed in select_request */
199 int signaled; /* wait result */
200 int __pad;
203 /* NT-style timeout, in 100ns units, negative means relative timeout */
204 typedef __int64 timeout_t;
205 #define TIMEOUT_INFINITE (((timeout_t)0x7fffffff) << 32 | 0xffffffff)
207 /* absolute timeout, negative means that monotonic clock is used */
208 typedef __int64 abstime_t;
210 /* structure for process startup info */
211 typedef struct
213 unsigned int debug_flags;
214 unsigned int console_flags;
215 obj_handle_t console;
216 obj_handle_t hstdin;
217 obj_handle_t hstdout;
218 obj_handle_t hstderr;
219 unsigned int x;
220 unsigned int y;
221 unsigned int xsize;
222 unsigned int ysize;
223 unsigned int xchars;
224 unsigned int ychars;
225 unsigned int attribute;
226 unsigned int flags;
227 unsigned int show;
228 process_id_t process_group_id;
229 data_size_t curdir_len;
230 data_size_t dllpath_len;
231 data_size_t imagepath_len;
232 data_size_t cmdline_len;
233 data_size_t title_len;
234 data_size_t desktop_len;
235 data_size_t shellinfo_len;
236 data_size_t runtime_len;
237 /* VARARG(curdir,unicode_str,curdir_len); */
238 /* VARARG(dllpath,unicode_str,dllpath_len); */
239 /* VARARG(imagepath,unicode_str,imagepath_len); */
240 /* VARARG(cmdline,unicode_str,cmdline_len); */
241 /* VARARG(title,unicode_str,title_len); */
242 /* VARARG(desktop,unicode_str,desktop_len); */
243 /* VARARG(shellinfo,unicode_str,shellinfo_len); */
244 /* VARARG(runtime,unicode_str,runtime_len); */
245 } startup_info_t;
247 /* structure returned in the list of window properties */
248 typedef struct
250 atom_t atom; /* property atom */
251 int string; /* was atom a string originally? */
252 lparam_t data; /* data stored in property */
253 } property_data_t;
255 /* structure to specify window rectangles */
256 typedef struct
258 int left;
259 int top;
260 int right;
261 int bottom;
262 } rectangle_t;
264 /* structure for parameters of async I/O calls */
265 typedef struct
267 obj_handle_t handle; /* object to perform I/O on */
268 obj_handle_t event; /* event to signal when done */
269 client_ptr_t iosb; /* I/O status block in client addr space */
270 client_ptr_t user; /* opaque user data containing callback pointer and async-specific data */
271 client_ptr_t apc; /* user APC to call */
272 apc_param_t apc_context; /* user APC context or completion value */
273 } async_data_t;
275 /* structures for extra message data */
277 struct hw_msg_source
279 unsigned int device; /* source device (IMDT_* values) */
280 unsigned int origin; /* source origin (IMO_* values) */
283 struct rawinput
285 int type; /* rawinput data type (RIM_* values) */
286 unsigned int device; /* rawinput device pseudo-handle */
287 unsigned int wparam; /* wparam of the WM_INPUT* message */
288 unsigned int usage; /* HID device usage */
291 struct hardware_msg_data
293 lparam_t info; /* extra info */
294 data_size_t size; /* size of hardware message data */
295 int __pad;
296 unsigned int hw_id; /* unique id */
297 unsigned int flags; /* hook flags */
298 struct hw_msg_source source; /* message source */
299 struct rawinput rawinput; /* rawinput message data */
302 struct callback_msg_data
304 client_ptr_t callback; /* callback function */
305 lparam_t data; /* user data for callback */
306 lparam_t result; /* message result */
309 struct winevent_msg_data
311 user_handle_t hook; /* hook handle */
312 thread_id_t tid; /* thread id */
313 client_ptr_t hook_proc; /* hook proc address */
314 /* followed by module name if any */
317 typedef union
319 int type;
320 struct
322 int type; /* INPUT_KEYBOARD */
323 unsigned short vkey; /* virtual key code */
324 unsigned short scan; /* scan code */
325 unsigned int flags; /* event flags */
326 unsigned int time; /* event time */
327 lparam_t info; /* extra info */
328 } kbd;
329 struct
331 int type; /* INPUT_MOUSE */
332 int x; /* coordinates */
333 int y;
334 unsigned int data; /* mouse data */
335 unsigned int flags; /* event flags */
336 unsigned int time; /* event time */
337 lparam_t info; /* extra info */
338 } mouse;
339 struct
341 int type; /* INPUT_HARDWARE */
342 unsigned int msg; /* message code */
343 lparam_t wparam; /* parameters */
344 lparam_t lparam; /* parameters */
345 struct hid_input hid; /* defined in ntuser.h */
346 } hw;
347 } hw_input_t;
349 typedef union
351 unsigned char bytes[1]; /* raw data for sent messages */
352 struct hardware_msg_data hardware;
353 struct callback_msg_data callback;
354 struct winevent_msg_data winevent;
355 } message_data_t;
357 /* structure returned in filesystem events */
358 struct filesystem_event
360 int action;
361 data_size_t len;
362 char name[1];
365 struct luid
367 unsigned int low_part;
368 int high_part;
371 struct luid_attr
373 struct luid luid;
374 unsigned int attrs;
377 struct acl
379 unsigned char revision;
380 unsigned char pad1;
381 unsigned short size;
382 unsigned short count;
383 unsigned short pad2;
386 struct sid
388 unsigned char revision;
389 unsigned char sub_count;
390 unsigned char id_auth[6];
391 unsigned int sub_auth[15];
394 typedef struct
396 unsigned int read;
397 unsigned int write;
398 unsigned int exec;
399 unsigned int all;
400 } generic_map_t;
402 #define MAX_ACL_LEN 65535
404 struct security_descriptor
406 unsigned int control; /* SE_ flags */
407 data_size_t owner_len;
408 data_size_t group_len;
409 data_size_t sacl_len;
410 data_size_t dacl_len;
411 /* VARARG(owner,sid); */
412 /* VARARG(group,sid); */
413 /* VARARG(sacl,acl); */
414 /* VARARG(dacl,acl); */
417 struct object_attributes
419 obj_handle_t rootdir; /* root directory */
420 unsigned int attributes; /* object attributes */
421 data_size_t sd_len; /* length of security_descriptor data. may be 0 */
422 data_size_t name_len; /* length of the name string. may be 0 */
423 /* VARARG(sd,security_descriptor); */
424 /* VARARG(name,unicode_str); */
427 struct object_type_info
429 data_size_t name_len; /* length of the name string */
430 unsigned int index; /* type index in global table */
431 unsigned int obj_count; /* count of objects of this type */
432 unsigned int handle_count; /* count of handles of this type */
433 unsigned int obj_max; /* max count of objects of this type */
434 unsigned int handle_max; /* max count of handles of this type */
435 unsigned int valid_access; /* mask for valid access bits */
436 generic_map_t mapping; /* generic access mappings */
437 /* VARARG(name,unicode_str); */
440 enum select_op
442 SELECT_NONE,
443 SELECT_WAIT,
444 SELECT_WAIT_ALL,
445 SELECT_SIGNAL_AND_WAIT,
446 SELECT_KEYED_EVENT_WAIT,
447 SELECT_KEYED_EVENT_RELEASE
450 typedef union
452 enum select_op op;
453 struct
455 enum select_op op; /* SELECT_WAIT or SELECT_WAIT_ALL */
456 obj_handle_t handles[MAXIMUM_WAIT_OBJECTS];
457 int __pad;
458 } wait;
459 struct
461 enum select_op op; /* SELECT_SIGNAL_AND_WAIT */
462 obj_handle_t wait;
463 obj_handle_t signal; /* must be last in the structure so we can remove it on retries */
464 } signal_and_wait;
465 struct
467 enum select_op op; /* SELECT_KEYED_EVENT_WAIT or SELECT_KEYED_EVENT_RELEASE */
468 obj_handle_t handle;
469 client_ptr_t key;
470 } keyed_event;
471 } select_op_t;
473 enum apc_type
475 APC_NONE,
476 APC_USER,
477 APC_ASYNC_IO,
478 APC_VIRTUAL_ALLOC,
479 APC_VIRTUAL_ALLOC_EX,
480 APC_VIRTUAL_FREE,
481 APC_VIRTUAL_QUERY,
482 APC_VIRTUAL_PROTECT,
483 APC_VIRTUAL_FLUSH,
484 APC_VIRTUAL_LOCK,
485 APC_VIRTUAL_UNLOCK,
486 APC_MAP_VIEW,
487 APC_MAP_VIEW_EX,
488 APC_UNMAP_VIEW,
489 APC_CREATE_THREAD,
490 APC_DUP_HANDLE
493 typedef struct
495 enum apc_type type; /* APC_USER */
496 int __pad;
497 client_ptr_t func; /* void (__stdcall *func)(ULONG_PTR,ULONG_PTR,ULONG_PTR); */
498 apc_param_t args[3]; /* arguments for user function */
499 } user_apc_t;
501 typedef union
503 enum apc_type type;
504 user_apc_t user;
505 struct
507 enum apc_type type; /* APC_ASYNC_IO */
508 unsigned int status; /* I/O status */
509 client_ptr_t user; /* user pointer */
510 client_ptr_t sb; /* status block */
511 data_size_t result; /* result size */
512 } async_io;
513 struct
515 enum apc_type type; /* APC_VIRTUAL_ALLOC */
516 unsigned int op_type; /* type of operation */
517 client_ptr_t addr; /* requested address */
518 mem_size_t size; /* allocation size */
519 mem_size_t zero_bits; /* number of zero high bits */
520 unsigned int prot; /* memory protection flags */
521 } virtual_alloc;
522 struct
524 enum apc_type type; /* APC_VIRTUAL_ALLOC */
525 unsigned int op_type; /* type of operation */
526 client_ptr_t addr; /* requested address */
527 mem_size_t size; /* allocation size */
528 mem_size_t limit_low; /* allocation address limits */
529 mem_size_t limit_high;
530 mem_size_t align; /* allocation alignment */
531 unsigned int prot; /* memory protection flags */
532 unsigned int attributes; /* memory extended attributes */
533 } virtual_alloc_ex;
534 struct
536 enum apc_type type; /* APC_VIRTUAL_FREE */
537 unsigned int op_type; /* type of operation */
538 client_ptr_t addr; /* requested address */
539 mem_size_t size; /* allocation size */
540 } virtual_free;
541 struct
543 enum apc_type type; /* APC_VIRTUAL_QUERY */
544 int __pad;
545 client_ptr_t addr; /* requested address */
546 } virtual_query;
547 struct
549 enum apc_type type; /* APC_VIRTUAL_PROTECT */
550 unsigned int prot; /* new protection flags */
551 client_ptr_t addr; /* requested address */
552 mem_size_t size; /* requested size */
553 } virtual_protect;
554 struct
556 enum apc_type type; /* APC_VIRTUAL_FLUSH */
557 int __pad;
558 client_ptr_t addr; /* requested address */
559 mem_size_t size; /* requested size */
560 } virtual_flush;
561 struct
563 enum apc_type type; /* APC_VIRTUAL_LOCK */
564 int __pad;
565 client_ptr_t addr; /* requested address */
566 mem_size_t size; /* requested size */
567 } virtual_lock;
568 struct
570 enum apc_type type; /* APC_VIRTUAL_UNLOCK */
571 int __pad;
572 client_ptr_t addr; /* requested address */
573 mem_size_t size; /* requested size */
574 } virtual_unlock;
575 struct
577 enum apc_type type; /* APC_MAP_VIEW */
578 obj_handle_t handle; /* mapping handle */
579 client_ptr_t addr; /* requested address */
580 mem_size_t size; /* allocation size */
581 file_pos_t offset; /* file offset */
582 mem_size_t zero_bits; /* number of zero high bits */
583 unsigned int alloc_type; /* allocation type */
584 unsigned int prot; /* memory protection flags */
585 } map_view;
586 struct
588 enum apc_type type; /* APC_MAP_VIEW_EX */
589 obj_handle_t handle; /* mapping handle */
590 client_ptr_t addr; /* requested address */
591 mem_size_t size; /* allocation size */
592 file_pos_t offset; /* file offset */
593 mem_size_t limit_low; /* allocation address limits */
594 mem_size_t limit_high;
595 unsigned int alloc_type; /* allocation type */
596 unsigned int prot; /* memory protection flags */
597 unsigned short machine; /* requested machine for image mappings */
598 unsigned short __pad[3];
599 } map_view_ex;
600 struct
602 enum apc_type type; /* APC_UNMAP_VIEW */
603 unsigned int flags; /* unmap flags */
604 client_ptr_t addr; /* view address */
605 } unmap_view;
606 struct
608 enum apc_type type; /* APC_CREATE_THREAD */
609 unsigned int flags; /* creation flags */
610 client_ptr_t func; /* void (__stdcall *func)(void*); start function */
611 client_ptr_t arg; /* argument for start function */
612 mem_size_t zero_bits; /* number of zero high bits for thread stack */
613 mem_size_t reserve; /* reserve size for thread stack */
614 mem_size_t commit; /* commit size for thread stack */
615 } create_thread;
616 struct
618 enum apc_type type; /* APC_DUP_HANDLE */
619 obj_handle_t src_handle; /* src handle to duplicate */
620 obj_handle_t dst_process; /* dst process handle */
621 unsigned int access; /* wanted access rights */
622 unsigned int attributes; /* object attributes */
623 unsigned int options; /* duplicate options */
624 } dup_handle;
625 } apc_call_t;
627 typedef union
629 enum apc_type type;
630 struct
632 enum apc_type type; /* APC_ASYNC_IO */
633 unsigned int status; /* new status of async operation */
634 unsigned int total; /* bytes transferred */
635 } async_io;
636 struct
638 enum apc_type type; /* APC_VIRTUAL_ALLOC */
639 unsigned int status; /* status returned by call */
640 client_ptr_t addr; /* resulting address */
641 mem_size_t size; /* resulting size */
642 } virtual_alloc;
643 struct
645 enum apc_type type; /* APC_VIRTUAL_ALLOC_EX */
646 unsigned int status; /* status returned by call */
647 client_ptr_t addr; /* resulting address */
648 mem_size_t size; /* resulting size */
649 } virtual_alloc_ex;
650 struct
652 enum apc_type type; /* APC_VIRTUAL_FREE */
653 unsigned int status; /* status returned by call */
654 client_ptr_t addr; /* resulting address */
655 mem_size_t size; /* resulting size */
656 } virtual_free;
657 struct
659 enum apc_type type; /* APC_VIRTUAL_QUERY */
660 unsigned int status; /* status returned by call */
661 client_ptr_t base; /* resulting base address */
662 client_ptr_t alloc_base;/* resulting allocation base */
663 mem_size_t size; /* resulting region size */
664 unsigned short state; /* resulting region state */
665 unsigned short prot; /* resulting region protection */
666 unsigned short alloc_prot;/* resulting allocation protection */
667 unsigned short alloc_type;/* resulting region allocation type */
668 } virtual_query;
669 struct
671 enum apc_type type; /* APC_VIRTUAL_PROTECT */
672 unsigned int status; /* status returned by call */
673 client_ptr_t addr; /* resulting address */
674 mem_size_t size; /* resulting size */
675 unsigned int prot; /* old protection flags */
676 } virtual_protect;
677 struct
679 enum apc_type type; /* APC_VIRTUAL_FLUSH */
680 unsigned int status; /* status returned by call */
681 client_ptr_t addr; /* resulting address */
682 mem_size_t size; /* resulting size */
683 } virtual_flush;
684 struct
686 enum apc_type type; /* APC_VIRTUAL_LOCK */
687 unsigned int status; /* status returned by call */
688 client_ptr_t addr; /* resulting address */
689 mem_size_t size; /* resulting size */
690 } virtual_lock;
691 struct
693 enum apc_type type; /* APC_VIRTUAL_UNLOCK */
694 unsigned int status; /* status returned by call */
695 client_ptr_t addr; /* resulting address */
696 mem_size_t size; /* resulting size */
697 } virtual_unlock;
698 struct
700 enum apc_type type; /* APC_MAP_VIEW */
701 unsigned int status; /* status returned by call */
702 client_ptr_t addr; /* resulting address */
703 mem_size_t size; /* resulting size */
704 } map_view;
705 struct
707 enum apc_type type; /* APC_MAP_VIEW_EX */
708 unsigned int status; /* status returned by call */
709 client_ptr_t addr; /* resulting address */
710 mem_size_t size; /* resulting size */
711 } map_view_ex;
712 struct
714 enum apc_type type; /* APC_UNMAP_VIEW */
715 unsigned int status; /* status returned by call */
716 } unmap_view;
717 struct
719 enum apc_type type; /* APC_CREATE_THREAD */
720 unsigned int status; /* status returned by call */
721 process_id_t pid; /* process id */
722 thread_id_t tid; /* thread id */
723 client_ptr_t teb; /* thread teb (in process address space) */
724 obj_handle_t handle; /* handle to new thread */
725 } create_thread;
726 struct
728 enum apc_type type; /* APC_DUP_HANDLE */
729 unsigned int status; /* status returned by call */
730 obj_handle_t handle; /* duplicated handle in dst process */
731 } dup_handle;
732 struct
734 enum apc_type type; /* APC_BREAK_PROCESS */
735 unsigned int status; /* status returned by call */
736 } break_process;
737 } apc_result_t;
739 enum irp_type
741 IRP_CALL_NONE,
742 IRP_CALL_CREATE,
743 IRP_CALL_CLOSE,
744 IRP_CALL_READ,
745 IRP_CALL_WRITE,
746 IRP_CALL_FLUSH,
747 IRP_CALL_IOCTL,
748 IRP_CALL_VOLUME,
749 IRP_CALL_FREE,
750 IRP_CALL_CANCEL
753 typedef union
755 enum irp_type type; /* irp call type */
756 struct
758 enum irp_type type; /* IRP_CALL_CREATE */
759 unsigned int access; /* access rights */
760 unsigned int sharing; /* sharing flags */
761 unsigned int options; /* file options */
762 client_ptr_t device; /* opaque ptr for the device */
763 obj_handle_t file; /* file handle */
764 } create;
765 struct
767 enum irp_type type; /* IRP_CALL_CLOSE */
768 int __pad;
769 client_ptr_t file; /* opaque ptr for the file object */
770 } close;
771 struct
773 enum irp_type type; /* IRP_CALL_READ */
774 unsigned int key; /* driver key */
775 data_size_t out_size; /* needed output size */
776 int __pad;
777 client_ptr_t file; /* opaque ptr for the file object */
778 file_pos_t pos; /* file position */
779 } read;
780 struct
782 enum irp_type type; /* IRP_CALL_WRITE */
783 unsigned int key; /* driver key */
784 client_ptr_t file; /* opaque ptr for the file object */
785 file_pos_t pos; /* file position */
786 } write;
787 struct
789 enum irp_type type; /* IRP_CALL_FLUSH */
790 int __pad;
791 client_ptr_t file; /* opaque ptr for the file object */
792 } flush;
793 struct
795 enum irp_type type; /* IRP_CALL_IOCTL */
796 ioctl_code_t code; /* ioctl code */
797 data_size_t out_size; /* needed output size */
798 int __pad;
799 client_ptr_t file; /* opaque ptr for the file object */
800 } ioctl;
801 struct
803 enum irp_type type; /* IRP_CALL_VOLUME */
804 unsigned int info_class;/* information class */
805 data_size_t out_size; /* needed output size */
806 int __pad;
807 client_ptr_t file; /* opaque ptr for the file object */
808 } volume;
809 struct
811 enum irp_type type; /* IRP_CALL_FREE */
812 int __pad;
813 client_ptr_t obj; /* opaque ptr for the freed object */
814 } free;
815 struct
817 enum irp_type type; /* IRP_CALL_CANCEL */
818 int __pad;
819 client_ptr_t irp; /* opaque ptr for canceled irp */
820 } cancel;
821 } irp_params_t;
823 /* information about a PE image mapping, roughly equivalent to SECTION_IMAGE_INFORMATION */
824 typedef struct
826 client_ptr_t base;
827 client_ptr_t map_addr;
828 mem_size_t stack_size;
829 mem_size_t stack_commit;
830 unsigned int entry_point;
831 unsigned int map_size;
832 unsigned int zerobits;
833 unsigned int subsystem;
834 unsigned short subsystem_minor;
835 unsigned short subsystem_major;
836 unsigned short osversion_major;
837 unsigned short osversion_minor;
838 unsigned short image_charact;
839 unsigned short dll_charact;
840 unsigned short machine;
841 unsigned char contains_code : 1;
842 unsigned char wine_builtin : 1;
843 unsigned char wine_fakedll : 1;
844 unsigned char is_hybrid : 1;
845 unsigned char padding : 4;
846 unsigned char image_flags;
847 unsigned int loader_flags;
848 unsigned int header_size;
849 unsigned int file_size;
850 unsigned int checksum;
851 unsigned int dbg_offset;
852 unsigned int dbg_size;
853 } pe_image_info_t;
854 #define IMAGE_FLAGS_ComPlusNativeReady 0x01
855 #define IMAGE_FLAGS_ComPlusILOnly 0x02
856 #define IMAGE_FLAGS_ImageDynamicallyRelocated 0x04
857 #define IMAGE_FLAGS_ImageMappedFlat 0x08
858 #define IMAGE_FLAGS_BaseBelow4gb 0x10
859 #define IMAGE_FLAGS_ComPlusPrefer32bit 0x20
861 struct rawinput_device
863 unsigned int usage;
864 unsigned int flags;
865 user_handle_t target;
868 typedef struct
870 int x;
871 int y;
872 unsigned int time;
873 int __pad;
874 lparam_t info;
875 } cursor_pos_t;
877 /****************************************************************/
878 /* Request declarations */
880 /* Create a new process from the context of the parent */
881 @REQ(new_process)
882 obj_handle_t token; /* process token */
883 obj_handle_t debug; /* process debug object */
884 obj_handle_t parent_process; /* parent process */
885 unsigned int flags; /* process creation flags */
886 int socket_fd; /* file descriptor for process socket */
887 unsigned int access; /* access rights for process object */
888 unsigned short machine; /* architecture that the new process will use */
889 data_size_t info_size; /* size of startup info */
890 data_size_t handles_size; /* length of explicit handles list */
891 data_size_t jobs_size; /* length of jobs list */
892 VARARG(objattr,object_attributes); /* object attributes */
893 VARARG(handles,uints,handles_size); /* handles list */
894 VARARG(jobs,uints,jobs_size); /* jobs list */
895 VARARG(info,startup_info,info_size); /* startup information */
896 VARARG(env,unicode_str); /* environment for new process */
897 @REPLY
898 obj_handle_t info; /* new process info handle */
899 process_id_t pid; /* process id */
900 obj_handle_t handle; /* process handle (in the current process) */
901 @END
904 /* Retrieve information about a newly started process */
905 @REQ(get_new_process_info)
906 obj_handle_t info; /* info handle returned from new_process_request */
907 @REPLY
908 int success; /* did the process start successfully? */
909 int exit_code; /* process exit code if failed */
910 @END
913 /* Create a new thread */
914 @REQ(new_thread)
915 obj_handle_t process; /* process in which to create thread */
916 unsigned int access; /* wanted access rights */
917 unsigned int flags; /* thread creation flags */
918 int request_fd; /* fd for request pipe */
919 VARARG(objattr,object_attributes); /* object attributes */
920 @REPLY
921 thread_id_t tid; /* thread id */
922 obj_handle_t handle; /* thread handle (in the current process) */
923 @END
926 /* Retrieve the new process startup info */
927 @REQ(get_startup_info)
928 @REPLY
929 data_size_t info_size; /* size of startup info */
930 unsigned short machine; /* architecture for the new process */
931 VARARG(info,startup_info,info_size); /* startup information */
932 VARARG(env,unicode_str); /* environment */
933 @END
936 /* Signal the end of the process initialization */
937 @REQ(init_process_done)
938 client_ptr_t teb; /* TEB of new thread (in process address space) */
939 client_ptr_t peb; /* PEB of new process (in process address space) */
940 client_ptr_t ldt_copy; /* address of LDT copy (in process address space) */
941 @REPLY
942 int suspend; /* is process suspended? */
943 @END
946 /* Initialize the first thread of a new process */
947 @REQ(init_first_thread)
948 int unix_pid; /* Unix pid of new process */
949 int unix_tid; /* Unix tid of new thread */
950 int debug_level; /* new debug level */
951 int reply_fd; /* fd for reply pipe */
952 int wait_fd; /* fd for blocking calls pipe */
953 @REPLY
954 process_id_t pid; /* process id of the new thread's process */
955 thread_id_t tid; /* thread id of the new thread */
956 timeout_t server_start; /* server start time */
957 unsigned int session_id; /* process session id */
958 data_size_t info_size; /* total size of startup info */
959 VARARG(machines,ushorts); /* array of supported machines */
960 @END
963 /* Initialize a new thread; called from the child after pthread_create() */
964 @REQ(init_thread)
965 int unix_tid; /* Unix tid of new thread */
966 int reply_fd; /* fd for reply pipe */
967 int wait_fd; /* fd for blocking calls pipe */
968 client_ptr_t teb; /* TEB of new thread (in thread address space) */
969 client_ptr_t entry; /* entry point (in thread address space) */
970 @REPLY
971 int suspend; /* is thread suspended? */
972 @END
975 /* Terminate a process */
976 @REQ(terminate_process)
977 obj_handle_t handle; /* process handle to terminate */
978 int exit_code; /* process exit code */
979 @REPLY
980 int self; /* suicide? */
981 @END
984 /* Terminate a thread */
985 @REQ(terminate_thread)
986 obj_handle_t handle; /* thread handle to terminate */
987 int exit_code; /* thread exit code */
988 @REPLY
989 int self; /* suicide? */
990 @END
993 /* Retrieve information about a process */
994 @REQ(get_process_info)
995 obj_handle_t handle; /* process handle */
996 @REPLY
997 process_id_t pid; /* server process id */
998 process_id_t ppid; /* server process id of parent */
999 affinity_t affinity; /* process affinity mask */
1000 client_ptr_t peb; /* PEB address in process address space */
1001 timeout_t start_time; /* process start time */
1002 timeout_t end_time; /* process end time */
1003 unsigned int session_id; /* process session id */
1004 int exit_code; /* process exit code */
1005 int priority; /* priority class */
1006 unsigned short machine; /* process architecture */
1007 VARARG(image,pe_image_info); /* image info for main exe */
1008 @END
1011 /* Retrieve debug information about a process */
1012 @REQ(get_process_debug_info)
1013 obj_handle_t handle; /* process handle */
1014 @REPLY
1015 obj_handle_t debug; /* handle to debug port */
1016 int debug_children; /* inherit debugger to child processes */
1017 VARARG(image,pe_image_info); /* image info for main exe */
1018 @END
1021 /* Fetch the name of the process image */
1022 @REQ(get_process_image_name)
1023 obj_handle_t handle; /* process handle */
1024 int win32; /* return a win32 filename? */
1025 @REPLY
1026 data_size_t len; /* len in bytes required to store filename */
1027 VARARG(name,unicode_str); /* image name for main exe */
1028 @END
1031 /* Retrieve information about a process memory usage */
1032 @REQ(get_process_vm_counters)
1033 obj_handle_t handle; /* process handle */
1034 @REPLY
1035 mem_size_t peak_virtual_size; /* peak virtual memory in bytes */
1036 mem_size_t virtual_size; /* virtual memory in bytes */
1037 mem_size_t peak_working_set_size; /* peak real memory in bytes */
1038 mem_size_t working_set_size; /* real memory in bytes */
1039 mem_size_t pagefile_usage; /* commit charge in bytes */
1040 mem_size_t peak_pagefile_usage; /* peak commit charge in bytes */
1041 @END
1044 /* Set a process information */
1045 @REQ(set_process_info)
1046 obj_handle_t handle; /* process handle */
1047 int mask; /* setting mask (see below) */
1048 int priority; /* priority class */
1049 affinity_t affinity; /* affinity mask */
1050 obj_handle_t token; /* primary token */
1051 @END
1052 #define SET_PROCESS_INFO_PRIORITY 0x01
1053 #define SET_PROCESS_INFO_AFFINITY 0x02
1054 #define SET_PROCESS_INFO_TOKEN 0x04
1057 /* Retrieve information about a thread */
1058 @REQ(get_thread_info)
1059 obj_handle_t handle; /* thread handle */
1060 unsigned int access; /* required access rights */
1061 @REPLY
1062 process_id_t pid; /* server process id */
1063 thread_id_t tid; /* server thread id */
1064 client_ptr_t teb; /* thread teb pointer */
1065 client_ptr_t entry_point; /* thread entry point */
1066 affinity_t affinity; /* thread affinity mask */
1067 int exit_code; /* thread exit code */
1068 int priority; /* thread priority level */
1069 int last; /* last thread in process */
1070 int suspend_count; /* thread suspend count */
1071 unsigned int flags; /* GET_THREAD_INFO_FLAG_ flags */
1072 data_size_t desc_len; /* description length in bytes */
1073 VARARG(desc,unicode_str); /* description string */
1074 @END
1075 #define GET_THREAD_INFO_FLAG_DBG_HIDDEN 0x01
1076 #define GET_THREAD_INFO_FLAG_TERMINATED 0x02
1079 /* Retrieve information about thread times */
1080 @REQ(get_thread_times)
1081 obj_handle_t handle; /* thread handle */
1082 @REPLY
1083 timeout_t creation_time; /* thread creation time */
1084 timeout_t exit_time; /* thread exit time */
1085 int unix_pid; /* thread native pid */
1086 int unix_tid; /* thread native pid */
1087 @END
1090 /* Set a thread information */
1091 @REQ(set_thread_info)
1092 obj_handle_t handle; /* thread handle */
1093 int mask; /* setting mask (see below) */
1094 int priority; /* priority class */
1095 affinity_t affinity; /* affinity mask */
1096 client_ptr_t entry_point; /* thread entry point */
1097 obj_handle_t token; /* impersonation token */
1098 VARARG(desc,unicode_str); /* description string */
1099 @END
1100 #define SET_THREAD_INFO_PRIORITY 0x01
1101 #define SET_THREAD_INFO_AFFINITY 0x02
1102 #define SET_THREAD_INFO_TOKEN 0x04
1103 #define SET_THREAD_INFO_ENTRYPOINT 0x08
1104 #define SET_THREAD_INFO_DESCRIPTION 0x10
1105 #define SET_THREAD_INFO_DBG_HIDDEN 0x20
1108 /* Suspend a thread */
1109 @REQ(suspend_thread)
1110 obj_handle_t handle; /* thread handle */
1111 @REPLY
1112 int count; /* new suspend count */
1113 @END
1116 /* Resume a thread */
1117 @REQ(resume_thread)
1118 obj_handle_t handle; /* thread handle */
1119 @REPLY
1120 int count; /* new suspend count */
1121 @END
1124 /* Queue an APC for a thread or process */
1125 @REQ(queue_apc)
1126 obj_handle_t handle; /* thread or process handle */
1127 VARARG(call,apc_call); /* call arguments */
1128 @REPLY
1129 obj_handle_t handle; /* APC handle */
1130 int self; /* run APC in caller itself? */
1131 @END
1134 /* Get the result of an APC call */
1135 @REQ(get_apc_result)
1136 obj_handle_t handle; /* handle to the APC */
1137 @REPLY
1138 apc_result_t result; /* result of the APC */
1139 @END
1142 /* Close a handle for the current process */
1143 @REQ(close_handle)
1144 obj_handle_t handle; /* handle to close */
1145 @END
1148 /* Set a handle information */
1149 @REQ(set_handle_info)
1150 obj_handle_t handle; /* handle we are interested in */
1151 int flags; /* new handle flags */
1152 int mask; /* mask for flags to set */
1153 @REPLY
1154 int old_flags; /* old flag value */
1155 @END
1158 /* Duplicate a handle */
1159 @REQ(dup_handle)
1160 obj_handle_t src_process; /* src process handle */
1161 obj_handle_t src_handle; /* src handle to duplicate */
1162 obj_handle_t dst_process; /* dst process handle */
1163 unsigned int access; /* wanted access rights */
1164 unsigned int attributes; /* object attributes */
1165 unsigned int options; /* duplicate options */
1166 @REPLY
1167 obj_handle_t handle; /* duplicated handle in dst process */
1168 @END
1171 /* Test if two handles refer to the same object */
1172 @REQ(compare_objects)
1173 obj_handle_t first; /* first object handle */
1174 obj_handle_t second; /* second object handle */
1175 @END
1178 /* Make an object permanent or temporary */
1179 @REQ(set_object_permanence)
1180 obj_handle_t handle; /* handle to the object */
1181 int permanent; /* 1 to make permanent, 0 to make temporary */
1182 @END
1185 /* Open a handle to a process */
1186 @REQ(open_process)
1187 process_id_t pid; /* process id to open */
1188 unsigned int access; /* wanted access rights */
1189 unsigned int attributes; /* object attributes */
1190 @REPLY
1191 obj_handle_t handle; /* handle to the process */
1192 @END
1195 /* Open a handle to a thread */
1196 @REQ(open_thread)
1197 thread_id_t tid; /* thread id to open */
1198 unsigned int access; /* wanted access rights */
1199 unsigned int attributes; /* object attributes */
1200 @REPLY
1201 obj_handle_t handle; /* handle to the thread */
1202 @END
1205 /* Wait for handles */
1206 @REQ(select)
1207 int flags; /* wait flags (see below) */
1208 client_ptr_t cookie; /* magic cookie to return to client */
1209 abstime_t timeout; /* timeout */
1210 data_size_t size; /* size of select_op */
1211 obj_handle_t prev_apc; /* handle to previous APC */
1212 VARARG(result,apc_result); /* result of previous APC */
1213 VARARG(data,select_op,size); /* operation-specific data */
1214 VARARG(contexts,contexts); /* suspend context(s) */
1215 @REPLY
1216 obj_handle_t apc_handle; /* handle to next APC */
1217 int signaled; /* were the handles immediately signaled? */
1218 VARARG(call,apc_call); /* APC call arguments */
1219 VARARG(contexts,contexts); /* suspend context(s) */
1220 @END
1221 #define SELECT_ALERTABLE 1
1222 #define SELECT_INTERRUPTIBLE 2
1225 /* Create an event */
1226 @REQ(create_event)
1227 unsigned int access; /* wanted access rights */
1228 int manual_reset; /* manual reset event */
1229 int initial_state; /* initial state of the event */
1230 VARARG(objattr,object_attributes); /* object attributes */
1231 @REPLY
1232 obj_handle_t handle; /* handle to the event */
1233 @END
1235 /* Event operation */
1236 @REQ(event_op)
1237 obj_handle_t handle; /* handle to event */
1238 int op; /* event operation (see below) */
1239 @REPLY
1240 int state; /* previous state */
1241 @END
1242 enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT };
1244 @REQ(query_event)
1245 obj_handle_t handle; /* handle to event */
1246 @REPLY
1247 int manual_reset; /* manual reset event */
1248 int state; /* current state of the event */
1249 @END
1251 /* Open an event */
1252 @REQ(open_event)
1253 unsigned int access; /* wanted access rights */
1254 unsigned int attributes; /* object attributes */
1255 obj_handle_t rootdir; /* root directory */
1256 VARARG(name,unicode_str); /* object name */
1257 @REPLY
1258 obj_handle_t handle; /* handle to the event */
1259 @END
1262 /* Create a keyed event */
1263 @REQ(create_keyed_event)
1264 unsigned int access; /* wanted access rights */
1265 VARARG(objattr,object_attributes); /* object attributes */
1266 @REPLY
1267 obj_handle_t handle; /* handle to the event */
1268 @END
1270 /* Open a keyed event */
1271 @REQ(open_keyed_event)
1272 unsigned int access; /* wanted access rights */
1273 unsigned int attributes; /* object attributes */
1274 obj_handle_t rootdir; /* root directory */
1275 VARARG(name,unicode_str); /* object name */
1276 @REPLY
1277 obj_handle_t handle; /* handle to the event */
1278 @END
1281 /* Create a mutex */
1282 @REQ(create_mutex)
1283 unsigned int access; /* wanted access rights */
1284 int owned; /* initially owned? */
1285 VARARG(objattr,object_attributes); /* object attributes */
1286 @REPLY
1287 obj_handle_t handle; /* handle to the mutex */
1288 @END
1291 /* Release a mutex */
1292 @REQ(release_mutex)
1293 obj_handle_t handle; /* handle to the mutex */
1294 @REPLY
1295 unsigned int prev_count; /* value of internal counter, before release */
1296 @END
1299 /* Open a mutex */
1300 @REQ(open_mutex)
1301 unsigned int access; /* wanted access rights */
1302 unsigned int attributes; /* object attributes */
1303 obj_handle_t rootdir; /* root directory */
1304 VARARG(name,unicode_str); /* object name */
1305 @REPLY
1306 obj_handle_t handle; /* handle to the mutex */
1307 @END
1310 /* Query a mutex */
1311 @REQ(query_mutex)
1312 obj_handle_t handle; /* handle to mutex */
1313 @REPLY
1314 unsigned int count; /* current count of mutex */
1315 int owned; /* true if owned by current thread */
1316 int abandoned; /* true if abandoned */
1317 @END
1320 /* Create a semaphore */
1321 @REQ(create_semaphore)
1322 unsigned int access; /* wanted access rights */
1323 unsigned int initial; /* initial count */
1324 unsigned int max; /* maximum count */
1325 VARARG(objattr,object_attributes); /* object attributes */
1326 @REPLY
1327 obj_handle_t handle; /* handle to the semaphore */
1328 @END
1331 /* Release a semaphore */
1332 @REQ(release_semaphore)
1333 obj_handle_t handle; /* handle to the semaphore */
1334 unsigned int count; /* count to add to semaphore */
1335 @REPLY
1336 unsigned int prev_count; /* previous semaphore count */
1337 @END
1339 @REQ(query_semaphore)
1340 obj_handle_t handle; /* handle to the semaphore */
1341 @REPLY
1342 unsigned int current; /* current count */
1343 unsigned int max; /* maximum count */
1344 @END
1346 /* Open a semaphore */
1347 @REQ(open_semaphore)
1348 unsigned int access; /* wanted access rights */
1349 unsigned int attributes; /* object attributes */
1350 obj_handle_t rootdir; /* root directory */
1351 VARARG(name,unicode_str); /* object name */
1352 @REPLY
1353 obj_handle_t handle; /* handle to the semaphore */
1354 @END
1357 /* Create a file */
1358 @REQ(create_file)
1359 unsigned int access; /* wanted access rights */
1360 unsigned int sharing; /* sharing flags */
1361 int create; /* file create action */
1362 unsigned int options; /* file options */
1363 unsigned int attrs; /* file attributes for creation */
1364 VARARG(objattr,object_attributes); /* object attributes */
1365 VARARG(filename,string); /* file name */
1366 @REPLY
1367 obj_handle_t handle; /* handle to the file */
1368 @END
1371 /* Open a file object */
1372 @REQ(open_file_object)
1373 unsigned int access; /* wanted access rights */
1374 unsigned int attributes; /* open attributes */
1375 obj_handle_t rootdir; /* root directory */
1376 unsigned int sharing; /* sharing flags */
1377 unsigned int options; /* file options */
1378 VARARG(filename,unicode_str); /* file name */
1379 @REPLY
1380 obj_handle_t handle; /* handle to the file */
1381 @END
1384 /* Allocate a file handle for a Unix fd */
1385 @REQ(alloc_file_handle)
1386 unsigned int access; /* wanted access rights */
1387 unsigned int attributes; /* object attributes */
1388 int fd; /* file descriptor on the client side */
1389 @REPLY
1390 obj_handle_t handle; /* handle to the file */
1391 @END
1394 /* Get the Unix name from a file handle */
1395 @REQ(get_handle_unix_name)
1396 obj_handle_t handle; /* file handle */
1397 @REPLY
1398 data_size_t name_len; /* unix name length */
1399 VARARG(name,string); /* unix name */
1400 @END
1403 /* Get a Unix fd to access a file */
1404 @REQ(get_handle_fd)
1405 obj_handle_t handle; /* handle to the file */
1406 @REPLY
1407 int type; /* file type (see below) */
1408 int cacheable; /* can fd be cached in the client? */
1409 unsigned int access; /* file access rights */
1410 unsigned int options; /* file open options */
1411 @END
1412 enum server_fd_type
1414 FD_TYPE_INVALID, /* invalid file (no associated fd) */
1415 FD_TYPE_FILE, /* regular file */
1416 FD_TYPE_DIR, /* directory */
1417 FD_TYPE_SOCKET, /* socket */
1418 FD_TYPE_SERIAL, /* serial port */
1419 FD_TYPE_PIPE, /* named pipe */
1420 FD_TYPE_MAILSLOT, /* mailslot */
1421 FD_TYPE_CHAR, /* unspecified char device */
1422 FD_TYPE_DEVICE, /* Windows device file */
1423 FD_TYPE_NB_TYPES
1427 /* Retrieve (or allocate) the client-side directory cache entry */
1428 @REQ(get_directory_cache_entry)
1429 obj_handle_t handle; /* handle to the directory */
1430 @REPLY
1431 int entry; /* cache entry on the client side */
1432 VARARG(free,ints); /* entries that can be freed */
1433 @END
1436 /* Flush a file buffers */
1437 @REQ(flush)
1438 async_data_t async; /* async I/O parameters */
1439 @REPLY
1440 obj_handle_t event; /* event set when finished */
1441 @END
1443 /* Query file information */
1444 @REQ(get_file_info)
1445 obj_handle_t handle; /* handle to the file */
1446 unsigned int info_class; /* queried information class */
1447 @REPLY
1448 VARARG(data,bytes); /* file info data */
1449 @END
1451 /* Query volume information */
1452 @REQ(get_volume_info)
1453 obj_handle_t handle; /* handle to the file */
1454 async_data_t async; /* async I/O parameters */
1455 unsigned int info_class; /* queried information class */
1456 @REPLY
1457 obj_handle_t wait; /* handle to wait on for blocking read */
1458 VARARG(data,bytes); /* volume info data */
1459 @END
1461 /* Lock a region of a file */
1462 @REQ(lock_file)
1463 obj_handle_t handle; /* handle to the file */
1464 file_pos_t offset; /* offset of start of lock */
1465 file_pos_t count; /* count of bytes to lock */
1466 int shared; /* shared or exclusive lock? */
1467 int wait; /* do we want to wait? */
1468 @REPLY
1469 obj_handle_t handle; /* handle to wait on */
1470 int overlapped; /* is it an overlapped I/O handle? */
1471 @END
1474 /* Unlock a region of a file */
1475 @REQ(unlock_file)
1476 obj_handle_t handle; /* handle to the file */
1477 file_pos_t offset; /* offset of start of unlock */
1478 file_pos_t count; /* count of bytes to unlock */
1479 @END
1482 /* Perform a recv on a socket */
1483 @REQ(recv_socket)
1484 int oob; /* are we receiving OOB data? */
1485 async_data_t async; /* async I/O parameters */
1486 int force_async; /* Force asynchronous mode? */
1487 @REPLY
1488 obj_handle_t wait; /* handle to wait on for blocking recv */
1489 unsigned int options; /* device open options */
1490 int nonblocking; /* is socket non-blocking? */
1491 @END
1494 /* Perform a send on a socket */
1495 @REQ(send_socket)
1496 async_data_t async; /* async I/O parameters */
1497 int force_async; /* Force asynchronous mode? */
1498 @REPLY
1499 obj_handle_t wait; /* handle to wait on for blocking send */
1500 unsigned int options; /* device open options */
1501 int nonblocking; /* is socket non-blocking? */
1502 @END
1505 /* Get socket event flags */
1506 @REQ(socket_get_events)
1507 obj_handle_t handle; /* socket handle */
1508 obj_handle_t event; /* event to reset */
1509 @REPLY
1510 unsigned int flags; /* event mask */
1511 VARARG(status,uints); /* array of status codes */
1512 @END
1515 /* Store ICMP id for ICMP over datagram fixup */
1516 @REQ(socket_send_icmp_id)
1517 obj_handle_t handle; /* socket handle */
1518 unsigned short icmp_id; /* ICMP packet id */
1519 unsigned short icmp_seq; /* ICMP packed sequence */
1520 @REPLY
1521 @END
1524 /* Get ICMP id for ICMP over datagram fixup */
1525 @REQ(socket_get_icmp_id)
1526 obj_handle_t handle; /* socket handle */
1527 unsigned short icmp_seq; /* ICMP packed sequence */
1528 @REPLY
1529 unsigned short icmp_id; /* ICMP packet id */
1530 @END
1533 /* Retrieve the next pending console ioctl request */
1534 @REQ(get_next_console_request)
1535 obj_handle_t handle; /* console server handle */
1536 int signal; /* server signal state */
1537 int read; /* 1 if reporting result of blocked read ioctl */
1538 unsigned int status; /* status of previous ioctl */
1539 VARARG(out_data,bytes); /* out_data of previous ioctl */
1540 @REPLY
1541 unsigned int code; /* ioctl code */
1542 unsigned int output; /* output id or 0 for input */
1543 data_size_t out_size; /* ioctl output size */
1544 VARARG(in_data,bytes); /* ioctl in_data */
1545 @END
1548 /* enable directory change notifications */
1549 @REQ(read_directory_changes)
1550 unsigned int filter; /* notification filter */
1551 int subtree; /* watch the subtree? */
1552 int want_data; /* flag indicating whether change data should be collected */
1553 async_data_t async; /* async I/O parameters */
1554 @END
1557 @REQ(read_change)
1558 obj_handle_t handle;
1559 @REPLY
1560 VARARG(events,filesystem_event); /* collected filesystem events */
1561 @END
1564 /* Create a file mapping */
1565 @REQ(create_mapping)
1566 unsigned int access; /* wanted access rights */
1567 unsigned int flags; /* SEC_* flags */
1568 unsigned int file_access; /* file access rights */
1569 mem_size_t size; /* mapping size */
1570 obj_handle_t file_handle; /* file handle */
1571 VARARG(objattr,object_attributes); /* object attributes */
1572 @REPLY
1573 obj_handle_t handle; /* handle to the mapping */
1574 @END
1577 /* Open a mapping */
1578 @REQ(open_mapping)
1579 unsigned int access; /* wanted access rights */
1580 unsigned int attributes; /* object attributes */
1581 obj_handle_t rootdir; /* root directory */
1582 VARARG(name,unicode_str); /* object name */
1583 @REPLY
1584 obj_handle_t handle; /* handle to the mapping */
1585 @END
1588 /* Get information about a file mapping */
1589 @REQ(get_mapping_info)
1590 obj_handle_t handle; /* handle to the mapping */
1591 unsigned int access; /* wanted access rights */
1592 @REPLY
1593 mem_size_t size; /* mapping size */
1594 unsigned int flags; /* SEC_* flags */
1595 obj_handle_t shared_file; /* shared mapping file handle */
1596 data_size_t total; /* total required buffer size in bytes */
1597 VARARG(image,pe_image_info);/* image info for SEC_IMAGE mappings */
1598 VARARG(name,unicode_str); /* filename for SEC_IMAGE mappings */
1599 @END
1602 /* Get the address to use to map an image mapping */
1603 @REQ(get_image_map_address)
1604 obj_handle_t handle; /* handle to the mapping */
1605 @REPLY
1606 client_ptr_t addr; /* map address */
1607 @END
1610 /* Add a memory view in the current process */
1611 @REQ(map_view)
1612 obj_handle_t mapping; /* file mapping handle */
1613 unsigned int access; /* wanted access rights */
1614 client_ptr_t base; /* view base address (page-aligned) */
1615 mem_size_t size; /* view size */
1616 file_pos_t start; /* start offset in mapping */
1617 @END
1620 /* Add a memory view for an image mapping in the current process */
1621 @REQ(map_image_view)
1622 obj_handle_t mapping; /* file mapping handle */
1623 client_ptr_t base; /* view base address (page-aligned) */
1624 mem_size_t size; /* view size */
1625 unsigned int entry; /* entry point in mapped view */
1626 unsigned short machine; /* machine in the mapped view */
1627 @END
1630 /* Add a memory view for a builtin dll in the current process */
1631 @REQ(map_builtin_view)
1632 VARARG(image,pe_image_info);/* image info */
1633 VARARG(name,unicode_str); /* image filename */
1634 @END
1637 /* Get information about a mapped image view */
1638 @REQ(get_image_view_info)
1639 obj_handle_t process; /* process handle */
1640 client_ptr_t addr; /* address inside mapped view (in process address space) */
1641 @REPLY
1642 client_ptr_t base; /* view base address */
1643 mem_size_t size; /* view size */
1644 @END
1647 /* Unmap a memory view from the current process */
1648 @REQ(unmap_view)
1649 client_ptr_t base; /* view base address */
1650 @END
1653 /* Get a range of committed pages in a file mapping */
1654 @REQ(get_mapping_committed_range)
1655 client_ptr_t base; /* view base address */
1656 file_pos_t offset; /* starting offset (page-aligned, in bytes) */
1657 @REPLY
1658 mem_size_t size; /* size of range starting at offset (page-aligned, in bytes) */
1659 int committed; /* whether it is a committed range */
1660 @END
1663 /* Add a range to the committed pages in a file mapping */
1664 @REQ(add_mapping_committed_range)
1665 client_ptr_t base; /* view base address */
1666 file_pos_t offset; /* starting offset (page-aligned, in bytes) */
1667 mem_size_t size; /* size to set (page-aligned, in bytes) or 0 if only retrieving */
1668 @END
1671 /* Check if two memory maps are for the same file */
1672 @REQ(is_same_mapping)
1673 client_ptr_t base1; /* first view base address */
1674 client_ptr_t base2; /* second view base address */
1675 @END
1678 /* Get the filename of a mapping */
1679 @REQ(get_mapping_filename)
1680 obj_handle_t process; /* process handle */
1681 client_ptr_t addr; /* address inside mapped view (in process address space) */
1682 @REPLY
1683 data_size_t len; /* total filename length in bytes */
1684 VARARG(filename,unicode_str); /* filename in NT format */
1685 @END
1688 struct thread_info
1690 timeout_t start_time;
1691 thread_id_t tid;
1692 int base_priority;
1693 int current_priority;
1694 int unix_tid;
1695 client_ptr_t teb;
1696 client_ptr_t entry_point;
1699 struct process_info
1701 timeout_t start_time;
1702 data_size_t name_len;
1703 int thread_count;
1704 int priority;
1705 process_id_t pid;
1706 process_id_t parent_pid;
1707 unsigned int session_id;
1708 int handle_count;
1709 int unix_pid;
1710 /* VARARG(name,unicode_str,name_len); */
1711 /* VARARG(threads,struct thread_info,thread_count); */
1714 /* Get a list of processes and threads currently running */
1715 @REQ(list_processes)
1716 @REPLY
1717 data_size_t info_size;
1718 int process_count;
1719 int total_thread_count;
1720 data_size_t total_name_len;
1721 VARARG(data,process_info,info_size);
1722 @END
1725 /* Create a debug object */
1726 @REQ(create_debug_obj)
1727 unsigned int access; /* wanted access rights */
1728 unsigned int flags; /* object flags */
1729 VARARG(objattr,object_attributes); /* object attributes */
1730 @REPLY
1731 obj_handle_t handle; /* handle to the debug object */
1732 @END
1735 /* Wait for a debug event */
1736 @REQ(wait_debug_event)
1737 obj_handle_t debug; /* debug object */
1738 @REPLY
1739 process_id_t pid; /* process id */
1740 thread_id_t tid; /* thread id */
1741 VARARG(event,debug_event); /* debug event data */
1742 @END
1745 /* Queue an exception event */
1746 @REQ(queue_exception_event)
1747 int first; /* first chance exception? */
1748 unsigned int code; /* exception code */
1749 unsigned int flags; /* exception flags */
1750 client_ptr_t record; /* exception record */
1751 client_ptr_t address; /* exception address */
1752 data_size_t len; /* size of parameters */
1753 VARARG(params,uints64,len);/* exception parameters */
1754 @REPLY
1755 obj_handle_t handle; /* handle to the queued event */
1756 @END
1759 /* Retrieve the status of an exception event */
1760 @REQ(get_exception_status)
1761 obj_handle_t handle; /* handle to the queued event */
1762 @END
1765 /* Continue a debug event */
1766 @REQ(continue_debug_event)
1767 obj_handle_t debug; /* debug object */
1768 process_id_t pid; /* process id to continue */
1769 thread_id_t tid; /* thread id to continue */
1770 unsigned int status; /* continuation status */
1771 @END
1774 /* Start or stop debugging an existing process */
1775 @REQ(debug_process)
1776 obj_handle_t handle; /* process handle */
1777 obj_handle_t debug; /* debug object to attach to the process */
1778 int attach; /* 1=attaching / 0=detaching from the process */
1779 @END
1782 /* Set debug object information */
1783 @REQ(set_debug_obj_info)
1784 obj_handle_t debug; /* debug object */
1785 unsigned int flags; /* object flags */
1786 @END
1789 /* Read data from a process address space */
1790 @REQ(read_process_memory)
1791 obj_handle_t handle; /* process handle */
1792 client_ptr_t addr; /* addr to read from */
1793 @REPLY
1794 VARARG(data,bytes); /* result data */
1795 @END
1798 /* Write data to a process address space */
1799 @REQ(write_process_memory)
1800 obj_handle_t handle; /* process handle */
1801 client_ptr_t addr; /* addr to write to */
1802 VARARG(data,bytes); /* data to write */
1803 @END
1806 /* Create a registry key */
1807 @REQ(create_key)
1808 unsigned int access; /* desired access rights */
1809 unsigned int options; /* creation options */
1810 VARARG(objattr,object_attributes); /* object attributes */
1811 VARARG(class,unicode_str); /* class name */
1812 @REPLY
1813 obj_handle_t hkey; /* handle to the created key */
1814 @END
1816 /* Open a registry key */
1817 @REQ(open_key)
1818 obj_handle_t parent; /* handle to the parent key */
1819 unsigned int access; /* desired access rights */
1820 unsigned int attributes; /* object attributes */
1821 VARARG(name,unicode_str); /* key name */
1822 @REPLY
1823 obj_handle_t hkey; /* handle to the open key */
1824 @END
1827 /* Delete a registry key */
1828 @REQ(delete_key)
1829 obj_handle_t hkey; /* handle to the key */
1830 @END
1833 /* Flush a registry key */
1834 @REQ(flush_key)
1835 obj_handle_t hkey; /* handle to the key */
1836 @END
1839 /* Enumerate registry subkeys */
1840 @REQ(enum_key)
1841 obj_handle_t hkey; /* handle to registry key */
1842 int index; /* index of subkey (or -1 for current key) */
1843 int info_class; /* requested information class */
1844 @REPLY
1845 int subkeys; /* number of subkeys */
1846 int max_subkey; /* longest subkey name */
1847 int max_class; /* longest class name */
1848 int values; /* number of values */
1849 int max_value; /* longest value name */
1850 int max_data; /* longest value data */
1851 timeout_t modif; /* last modification time */
1852 data_size_t total; /* total length needed for full name and class */
1853 data_size_t namelen; /* length of key name in bytes */
1854 VARARG(name,unicode_str,namelen); /* key name */
1855 VARARG(class,unicode_str); /* class name */
1856 @END
1859 /* Set a value of a registry key */
1860 @REQ(set_key_value)
1861 obj_handle_t hkey; /* handle to registry key */
1862 int type; /* value type */
1863 data_size_t namelen; /* length of value name in bytes */
1864 VARARG(name,unicode_str,namelen); /* value name */
1865 VARARG(data,bytes); /* value data */
1866 @END
1869 /* Retrieve the value of a registry key */
1870 @REQ(get_key_value)
1871 obj_handle_t hkey; /* handle to registry key */
1872 VARARG(name,unicode_str); /* value name */
1873 @REPLY
1874 int type; /* value type */
1875 data_size_t total; /* total length needed for data */
1876 VARARG(data,bytes); /* value data */
1877 @END
1880 /* Enumerate a value of a registry key */
1881 @REQ(enum_key_value)
1882 obj_handle_t hkey; /* handle to registry key */
1883 int index; /* value index */
1884 int info_class; /* requested information class */
1885 @REPLY
1886 int type; /* value type */
1887 data_size_t total; /* total length needed for full name and data */
1888 data_size_t namelen; /* length of value name in bytes */
1889 VARARG(name,unicode_str,namelen); /* value name */
1890 VARARG(data,bytes); /* value data */
1891 @END
1894 /* Delete a value of a registry key */
1895 @REQ(delete_key_value)
1896 obj_handle_t hkey; /* handle to registry key */
1897 VARARG(name,unicode_str); /* value name */
1898 @END
1901 /* Load a registry branch from a file */
1902 @REQ(load_registry)
1903 obj_handle_t file; /* file to load from */
1904 VARARG(objattr,object_attributes); /* object attributes */
1905 @END
1908 /* UnLoad a registry branch from a file */
1909 @REQ(unload_registry)
1910 obj_handle_t parent; /* handle to the parent key */
1911 unsigned int attributes; /* object attributes */
1912 VARARG(name,unicode_str); /* key name */
1913 @END
1916 /* Save a registry branch to a file */
1917 @REQ(save_registry)
1918 obj_handle_t hkey; /* key to save */
1919 obj_handle_t file; /* file to save to */
1920 @END
1923 /* Add a registry key change notification */
1924 @REQ(set_registry_notification)
1925 obj_handle_t hkey; /* key to watch for changes */
1926 obj_handle_t event; /* event to set */
1927 int subtree; /* should we watch the whole subtree? */
1928 unsigned int filter; /* things to watch */
1929 @END
1932 /* Rename a registry key */
1933 @REQ(rename_key)
1934 obj_handle_t hkey; /* handle to the key to be renamed */
1935 VARARG(name,unicode_str); /* new name */
1936 @END
1939 /* Create a waitable timer */
1940 @REQ(create_timer)
1941 unsigned int access; /* wanted access rights */
1942 int manual; /* manual reset */
1943 VARARG(objattr,object_attributes); /* object attributes */
1944 @REPLY
1945 obj_handle_t handle; /* handle to the timer */
1946 @END
1949 /* Open a waitable timer */
1950 @REQ(open_timer)
1951 unsigned int access; /* wanted access rights */
1952 unsigned int attributes; /* object attributes */
1953 obj_handle_t rootdir; /* root directory */
1954 VARARG(name,unicode_str); /* object name */
1955 @REPLY
1956 obj_handle_t handle; /* handle to the timer */
1957 @END
1959 /* Set a waitable timer */
1960 @REQ(set_timer)
1961 obj_handle_t handle; /* handle to the timer */
1962 timeout_t expire; /* next expiration absolute time */
1963 client_ptr_t callback; /* callback function */
1964 client_ptr_t arg; /* callback argument */
1965 int period; /* timer period in ms */
1966 @REPLY
1967 int signaled; /* was the timer signaled before this call ? */
1968 @END
1970 /* Cancel a waitable timer */
1971 @REQ(cancel_timer)
1972 obj_handle_t handle; /* handle to the timer */
1973 @REPLY
1974 int signaled; /* was the timer signaled before this calltime ? */
1975 @END
1977 /* Get information on a waitable timer */
1978 @REQ(get_timer_info)
1979 obj_handle_t handle; /* handle to the timer */
1980 @REPLY
1981 timeout_t when; /* absolute time when the timer next expires */
1982 int signaled; /* is the timer signaled? */
1983 @END
1986 /* Retrieve the current context of a thread */
1987 @REQ(get_thread_context)
1988 obj_handle_t handle; /* thread handle */
1989 obj_handle_t context; /* context handle */
1990 unsigned int flags; /* context flags */
1991 unsigned int native_flags; /* flags for native context if WoW present */
1992 unsigned short machine; /* context architecture */
1993 @REPLY
1994 int self; /* was it a handle to the current thread? */
1995 obj_handle_t handle; /* pending context handle */
1996 VARARG(contexts,contexts); /* thread context(s) */
1997 @END
2000 /* Set the current context of a thread */
2001 @REQ(set_thread_context)
2002 obj_handle_t handle; /* thread handle */
2003 unsigned int native_flags; /* flags for native context if WoW present */
2004 VARARG(contexts,contexts); /* thread context(s) */
2005 @REPLY
2006 int self; /* was it a handle to the current thread? */
2007 @END
2010 /* Fetch a selector entry for a thread */
2011 @REQ(get_selector_entry)
2012 obj_handle_t handle; /* thread handle */
2013 int entry; /* LDT entry */
2014 @REPLY
2015 unsigned int base; /* selector base */
2016 unsigned int limit; /* selector limit */
2017 unsigned char flags; /* selector flags */
2018 @END
2021 /* Add an atom */
2022 @REQ(add_atom)
2023 VARARG(name,unicode_str); /* atom name */
2024 @REPLY
2025 atom_t atom; /* resulting atom */
2026 @END
2029 /* Delete an atom */
2030 @REQ(delete_atom)
2031 atom_t atom; /* atom handle */
2032 @END
2035 /* Find an atom */
2036 @REQ(find_atom)
2037 VARARG(name,unicode_str); /* atom name */
2038 @REPLY
2039 atom_t atom; /* atom handle */
2040 @END
2043 /* Get information about an atom */
2044 @REQ(get_atom_information)
2045 atom_t atom; /* atom handle */
2046 @REPLY
2047 int count; /* atom lock count */
2048 int pinned; /* whether the atom has been pinned */
2049 data_size_t total; /* actual length of atom name */
2050 VARARG(name,unicode_str); /* atom name */
2051 @END
2054 /* Get the message queue of the current thread */
2055 @REQ(get_msg_queue)
2056 @REPLY
2057 obj_handle_t handle; /* handle to the queue */
2058 @END
2061 /* Set the file descriptor associated to the current thread queue */
2062 @REQ(set_queue_fd)
2063 obj_handle_t handle; /* handle to the file descriptor */
2064 @END
2067 /* Set the current message queue wakeup mask */
2068 @REQ(set_queue_mask)
2069 unsigned int wake_mask; /* wakeup bits mask */
2070 unsigned int changed_mask; /* changed bits mask */
2071 int skip_wait; /* will we skip waiting if signaled? */
2072 @REPLY
2073 unsigned int wake_bits; /* current wake bits */
2074 unsigned int changed_bits; /* current changed bits */
2075 @END
2078 /* Get the current message queue status */
2079 @REQ(get_queue_status)
2080 unsigned int clear_bits; /* should we clear the change bits? */
2081 @REPLY
2082 unsigned int wake_bits; /* wake bits */
2083 unsigned int changed_bits; /* changed bits since last time */
2084 @END
2087 /* Retrieve the process idle event */
2088 @REQ(get_process_idle_event)
2089 obj_handle_t handle; /* process handle */
2090 @REPLY
2091 obj_handle_t event; /* handle to idle event */
2092 @END
2095 /* Send a message to a thread queue */
2096 @REQ(send_message)
2097 thread_id_t id; /* thread id */
2098 int type; /* message type (see below) */
2099 int flags; /* message flags (see below) */
2100 user_handle_t win; /* window handle */
2101 unsigned int msg; /* message code */
2102 lparam_t wparam; /* parameters */
2103 lparam_t lparam; /* parameters */
2104 timeout_t timeout; /* timeout for reply */
2105 VARARG(data,message_data); /* message data for sent messages */
2106 @END
2108 @REQ(post_quit_message)
2109 int exit_code; /* exit code to return */
2110 @END
2112 enum message_type
2114 MSG_ASCII, /* Ascii message (from SendMessageA) */
2115 MSG_UNICODE, /* Unicode message (from SendMessageW) */
2116 MSG_NOTIFY, /* notify message (from SendNotifyMessageW), always Unicode */
2117 MSG_CALLBACK, /* callback message (from SendMessageCallbackW), always Unicode */
2118 MSG_CALLBACK_RESULT,/* result of a callback message */
2119 MSG_OTHER_PROCESS, /* sent from other process, may include vararg data, always Unicode */
2120 MSG_POSTED, /* posted message (from PostMessageW), always Unicode */
2121 MSG_HARDWARE, /* hardware message */
2122 MSG_WINEVENT, /* winevent message */
2123 MSG_HOOK_LL /* low-level hardware hook */
2125 #define SEND_MSG_ABORT_IF_HUNG 0x01
2128 /* Send a hardware message to a thread queue */
2129 @REQ(send_hardware_message)
2130 user_handle_t win; /* window handle */
2131 hw_input_t input; /* input data */
2132 unsigned int flags; /* flags (see below) */
2133 VARARG(report,bytes); /* HID report data */
2134 @REPLY
2135 int wait; /* do we need to wait for a reply? */
2136 int prev_x; /* previous cursor position */
2137 int prev_y;
2138 int new_x; /* new cursor position */
2139 int new_y;
2140 @END
2141 #define SEND_HWMSG_INJECTED 0x01
2144 /* Get a message from the current queue */
2145 @REQ(get_message)
2146 unsigned int flags; /* PM_* flags */
2147 user_handle_t get_win; /* window handle to get */
2148 unsigned int get_first; /* first message code to get */
2149 unsigned int get_last; /* last message code to get */
2150 unsigned int hw_id; /* id of the previous hardware message (or 0) */
2151 unsigned int wake_mask; /* wakeup bits mask */
2152 unsigned int changed_mask; /* changed bits mask */
2153 unsigned int internal; /* get internal messages only */
2154 @REPLY
2155 user_handle_t win; /* window handle */
2156 unsigned int msg; /* message code */
2157 lparam_t wparam; /* parameters */
2158 lparam_t lparam; /* parameters */
2159 int type; /* message type */
2160 int x; /* message x position */
2161 int y; /* message y position */
2162 unsigned int time; /* message time */
2163 unsigned int active_hooks; /* active hooks bitmap */
2164 data_size_t total; /* total size of extra data */
2165 VARARG(data,message_data); /* message data for sent messages */
2166 @END
2169 /* Reply to a sent message */
2170 @REQ(reply_message)
2171 int remove; /* should we remove the message? */
2172 lparam_t result; /* message result */
2173 VARARG(data,bytes); /* message data for sent messages */
2174 @END
2177 /* Accept and remove the current hardware message */
2178 @REQ(accept_hardware_message)
2179 unsigned int hw_id; /* id of the hardware message */
2180 @END
2183 /* Retrieve the reply for the last message sent */
2184 @REQ(get_message_reply)
2185 int cancel; /* cancel message if not ready? */
2186 @REPLY
2187 lparam_t result; /* message result */
2188 VARARG(data,bytes); /* message data for sent messages */
2189 @END
2192 /* Set a window timer */
2193 @REQ(set_win_timer)
2194 user_handle_t win; /* window handle */
2195 unsigned int msg; /* message to post */
2196 unsigned int rate; /* timer rate in ms */
2197 lparam_t id; /* timer id */
2198 lparam_t lparam; /* message lparam (callback proc) */
2199 @REPLY
2200 lparam_t id; /* timer id */
2201 @END
2204 /* Kill a window timer */
2205 @REQ(kill_win_timer)
2206 user_handle_t win; /* window handle */
2207 lparam_t id; /* timer id */
2208 unsigned int msg; /* message to post */
2209 @END
2212 /* check if the thread owning the window is hung */
2213 @REQ(is_window_hung)
2214 user_handle_t win; /* window handle */
2215 @REPLY
2216 int is_hung;
2217 @END
2220 /* Retrieve info about a serial port */
2221 @REQ(get_serial_info)
2222 obj_handle_t handle; /* handle to comm port */
2223 int flags;
2224 @REPLY
2225 unsigned int eventmask;
2226 unsigned int cookie;
2227 unsigned int pending_write;
2228 @END
2231 /* Set info about a serial port */
2232 @REQ(set_serial_info)
2233 obj_handle_t handle; /* handle to comm port */
2234 int flags; /* bitmask to set values (see below) */
2235 @END
2236 #define SERIALINFO_PENDING_WRITE 0x04
2237 #define SERIALINFO_PENDING_WAIT 0x08
2239 /* Cancel all sync io on a thread */
2240 @REQ(cancel_sync)
2241 obj_handle_t handle; /* thread handle on which to cancel io */
2242 client_ptr_t iosb; /* I/O status block (NULL=all) */
2243 @END
2245 /* Create an async I/O */
2246 @REQ(register_async)
2247 int type; /* type of queue to look after */
2248 async_data_t async; /* async I/O parameters */
2249 int count; /* count - usually # of bytes to be read/written */
2250 @END
2251 #define ASYNC_TYPE_READ 0x01
2252 #define ASYNC_TYPE_WRITE 0x02
2253 #define ASYNC_TYPE_WAIT 0x03
2256 /* Cancel all async op on a fd */
2257 @REQ(cancel_async)
2258 obj_handle_t handle; /* handle to comm port, socket or file */
2259 client_ptr_t iosb; /* I/O status block (NULL=all) */
2260 int only_thread; /* cancel matching this thread */
2261 @END
2264 /* Retrieve results of an async */
2265 @REQ(get_async_result)
2266 client_ptr_t user_arg; /* user arg used to identify async */
2267 @REPLY
2268 VARARG(out_data,bytes); /* iosb output data */
2269 @END
2272 /* Notify direct completion of async and close the wait handle if not blocking */
2273 @REQ(set_async_direct_result)
2274 obj_handle_t handle; /* wait handle */
2275 apc_param_t information; /* IO_STATUS_BLOCK Information */
2276 unsigned int status; /* completion status */
2277 int mark_pending; /* set async to pending before completion? */
2278 @REPLY
2279 obj_handle_t handle; /* wait handle, or NULL if closed */
2280 @END
2283 /* Perform a read on a file object */
2284 @REQ(read)
2285 async_data_t async; /* async I/O parameters */
2286 file_pos_t pos; /* read position */
2287 @REPLY
2288 obj_handle_t wait; /* handle to wait on for blocking read */
2289 unsigned int options; /* device open options */
2290 VARARG(data,bytes); /* read data */
2291 @END
2294 /* Perform a write on a file object */
2295 @REQ(write)
2296 async_data_t async; /* async I/O parameters */
2297 file_pos_t pos; /* write position */
2298 VARARG(data,bytes); /* write data */
2299 @REPLY
2300 obj_handle_t wait; /* handle to wait on for blocking write */
2301 unsigned int options; /* device open options */
2302 data_size_t size; /* size written */
2303 @END
2306 /* Perform an ioctl on a file */
2307 @REQ(ioctl)
2308 ioctl_code_t code; /* ioctl code */
2309 async_data_t async; /* async I/O parameters */
2310 VARARG(in_data,bytes); /* ioctl input data */
2311 @REPLY
2312 obj_handle_t wait; /* handle to wait on for blocking ioctl */
2313 unsigned int options; /* device open options */
2314 VARARG(out_data,bytes); /* ioctl output data */
2315 @END
2318 /* Store results of an async irp */
2319 @REQ(set_irp_result)
2320 obj_handle_t handle; /* handle to the irp */
2321 unsigned int status; /* status of the irp */
2322 data_size_t size; /* result size (input or output depending on the operation) */
2323 VARARG(data,bytes); /* output data of the irp */
2324 @END
2327 /* Create a named pipe */
2328 @REQ(create_named_pipe)
2329 unsigned int access;
2330 unsigned int options;
2331 unsigned int sharing;
2332 unsigned int disposition;
2333 unsigned int maxinstances;
2334 unsigned int outsize;
2335 unsigned int insize;
2336 timeout_t timeout;
2337 unsigned int flags;
2338 VARARG(objattr,object_attributes); /* object attributes */
2339 @REPLY
2340 obj_handle_t handle; /* handle to the pipe */
2341 int created;
2342 @END
2344 /* flags in create_named_pipe and get_named_pipe_info */
2345 #define NAMED_PIPE_MESSAGE_STREAM_WRITE 0x0001
2346 #define NAMED_PIPE_MESSAGE_STREAM_READ 0x0002
2347 #define NAMED_PIPE_NONBLOCKING_MODE 0x0004
2348 #define NAMED_PIPE_SERVER_END 0x8000
2350 /* Set named pipe information by handle */
2351 @REQ(set_named_pipe_info)
2352 obj_handle_t handle;
2353 unsigned int flags;
2354 @END
2356 /* Create a window */
2357 @REQ(create_window)
2358 user_handle_t parent; /* parent window */
2359 user_handle_t owner; /* owner window */
2360 atom_t atom; /* class atom */
2361 mod_handle_t instance; /* module instance */
2362 int dpi; /* system DPI */
2363 int awareness; /* thread DPI awareness */
2364 unsigned int style; /* window style */
2365 unsigned int ex_style; /* window extended style */
2366 VARARG(class,unicode_str); /* class name */
2367 @REPLY
2368 user_handle_t handle; /* created window */
2369 user_handle_t parent; /* full handle of parent */
2370 user_handle_t owner; /* full handle of owner */
2371 int extra; /* number of extra bytes */
2372 client_ptr_t class_ptr; /* pointer to class in client address space */
2373 int dpi; /* window DPI if not per-monitor aware */
2374 int awareness; /* window DPI awareness */
2375 @END
2378 /* Destroy a window */
2379 @REQ(destroy_window)
2380 user_handle_t handle; /* handle to the window */
2381 @END
2384 /* Retrieve the desktop window for the current thread */
2385 @REQ(get_desktop_window)
2386 int force; /* force creation if it doesn't exist */
2387 @REPLY
2388 user_handle_t top_window; /* handle to the desktop window */
2389 user_handle_t msg_window; /* handle to the top-level HWND_MESSAGE parent */
2390 @END
2393 /* Set a window owner */
2394 @REQ(set_window_owner)
2395 user_handle_t handle; /* handle to the window */
2396 user_handle_t owner; /* new owner */
2397 @REPLY
2398 user_handle_t full_owner; /* full handle of new owner */
2399 user_handle_t prev_owner; /* full handle of previous owner */
2400 @END
2403 /* Get information from a window handle */
2404 @REQ(get_window_info)
2405 user_handle_t handle; /* handle to the window */
2406 @REPLY
2407 user_handle_t full_handle; /* full 32-bit handle */
2408 user_handle_t last_active; /* last active popup */
2409 process_id_t pid; /* process owning the window */
2410 thread_id_t tid; /* thread owning the window */
2411 atom_t atom; /* class atom */
2412 int is_unicode; /* ANSI or unicode */
2413 int dpi; /* window DPI */
2414 int awareness; /* DPI awareness */
2415 @END
2418 /* Set some information in a window */
2419 @REQ(set_window_info)
2420 unsigned short flags; /* flags for fields to set (see below) */
2421 short int is_unicode; /* ANSI or unicode */
2422 user_handle_t handle; /* handle to the window */
2423 unsigned int style; /* window style */
2424 unsigned int ex_style; /* window extended style */
2425 data_size_t extra_size; /* size to set in extra bytes */
2426 mod_handle_t instance; /* creator instance */
2427 lparam_t user_data; /* user-specific data */
2428 lparam_t extra_value; /* value to set in extra bytes or window id */
2429 int extra_offset; /* offset to set in extra bytes */
2430 @REPLY
2431 unsigned int old_style; /* old window style */
2432 unsigned int old_ex_style; /* old window extended style */
2433 mod_handle_t old_instance; /* old creator instance */
2434 lparam_t old_user_data; /* old user-specific data */
2435 lparam_t old_extra_value; /* old value in extra bytes */
2436 lparam_t old_id; /* old window id */
2437 @END
2438 #define SET_WIN_STYLE 0x01
2439 #define SET_WIN_EXSTYLE 0x02
2440 #define SET_WIN_ID 0x04
2441 #define SET_WIN_INSTANCE 0x08
2442 #define SET_WIN_USERDATA 0x10
2443 #define SET_WIN_EXTRA 0x20
2444 #define SET_WIN_UNICODE 0x40
2447 /* Set the parent of a window */
2448 @REQ(set_parent)
2449 user_handle_t handle; /* handle to the window */
2450 user_handle_t parent; /* handle to the parent */
2451 @REPLY
2452 user_handle_t old_parent; /* old parent window */
2453 user_handle_t full_parent; /* full handle of new parent */
2454 int dpi; /* new window DPI if not per-monitor aware */
2455 int awareness; /* new DPI awareness */
2456 @END
2459 /* Get a list of the window parents, up to the root of the tree */
2460 @REQ(get_window_parents)
2461 user_handle_t handle; /* handle to the window */
2462 @REPLY
2463 int count; /* total count of parents */
2464 VARARG(parents,user_handles); /* parent handles */
2465 @END
2468 /* Get a list of the window children */
2469 @REQ(get_window_children)
2470 obj_handle_t desktop; /* handle to desktop */
2471 user_handle_t parent; /* parent window */
2472 atom_t atom; /* class atom for the listed children */
2473 thread_id_t tid; /* thread owning the listed children */
2474 VARARG(class,unicode_str); /* class name */
2475 @REPLY
2476 int count; /* total count of children */
2477 VARARG(children,user_handles); /* children handles */
2478 @END
2481 /* Get a list of the window children that contain a given point */
2482 @REQ(get_window_children_from_point)
2483 user_handle_t parent; /* parent window */
2484 int x; /* point in parent coordinates */
2485 int y;
2486 int dpi; /* dpi for the point coordinates */
2487 @REPLY
2488 int count; /* total count of children */
2489 VARARG(children,user_handles); /* children handles */
2490 @END
2493 /* Get window tree information from a window handle */
2494 @REQ(get_window_tree)
2495 user_handle_t handle; /* handle to the window */
2496 @REPLY
2497 user_handle_t parent; /* parent window */
2498 user_handle_t owner; /* owner window */
2499 user_handle_t next_sibling; /* next sibling in Z-order */
2500 user_handle_t prev_sibling; /* prev sibling in Z-order */
2501 user_handle_t first_sibling; /* first sibling in Z-order */
2502 user_handle_t last_sibling; /* last sibling in Z-order */
2503 user_handle_t first_child; /* first child */
2504 user_handle_t last_child; /* last child */
2505 @END
2507 /* Set the position and Z order of a window */
2508 @REQ(set_window_pos)
2509 unsigned short swp_flags; /* SWP_* flags */
2510 unsigned short paint_flags; /* paint flags (see below) */
2511 user_handle_t handle; /* handle to the window */
2512 user_handle_t previous; /* previous window in Z order */
2513 rectangle_t window; /* window rectangle (in parent coords) */
2514 rectangle_t client; /* client rectangle (in parent coords) */
2515 VARARG(valid,rectangles); /* valid rectangles from WM_NCCALCSIZE (in parent coords) */
2516 @REPLY
2517 unsigned int new_style; /* new window style */
2518 unsigned int new_ex_style; /* new window extended style */
2519 user_handle_t surface_win; /* parent window that holds the surface */
2520 int needs_update; /* whether the surface region needs an update */
2521 @END
2522 #define SET_WINPOS_PAINT_SURFACE 0x01 /* window has a paintable surface */
2523 #define SET_WINPOS_PIXEL_FORMAT 0x02 /* window has a custom pixel format */
2525 /* Get the window and client rectangles of a window */
2526 @REQ(get_window_rectangles)
2527 user_handle_t handle; /* handle to the window */
2528 int relative; /* coords relative to (see below) */
2529 int dpi; /* DPI to map to, or zero for per-monitor DPI */
2530 @REPLY
2531 rectangle_t window; /* window rectangle */
2532 rectangle_t client; /* client rectangle */
2533 @END
2534 enum coords_relative
2536 COORDS_CLIENT, /* relative to client area */
2537 COORDS_WINDOW, /* relative to whole window area */
2538 COORDS_PARENT, /* relative to parent's client area */
2539 COORDS_SCREEN /* relative to screen origin */
2543 /* Get the window text */
2544 @REQ(get_window_text)
2545 user_handle_t handle; /* handle to the window */
2546 @REPLY
2547 data_size_t length; /* total length in WCHARs */
2548 VARARG(text,unicode_str); /* window text */
2549 @END
2552 /* Set the window text */
2553 @REQ(set_window_text)
2554 user_handle_t handle; /* handle to the window */
2555 VARARG(text,unicode_str); /* window text */
2556 @END
2559 /* Get the coordinates offset between two windows */
2560 @REQ(get_windows_offset)
2561 user_handle_t from; /* handle to the first window */
2562 user_handle_t to; /* handle to the second window */
2563 int dpi; /* DPI to map to, or zero for per-monitor DPI */
2564 @REPLY
2565 int x; /* x coordinate offset */
2566 int y; /* y coordinate offset */
2567 int mirror; /* whether to mirror the x coordinate */
2568 @END
2571 /* Get the visible region of a window */
2572 @REQ(get_visible_region)
2573 user_handle_t window; /* handle to the window */
2574 unsigned int flags; /* DCX flags */
2575 @REPLY
2576 user_handle_t top_win; /* top window to clip against */
2577 rectangle_t top_rect; /* top window visible rect with screen coords */
2578 rectangle_t win_rect; /* window rect in screen coords */
2579 unsigned int paint_flags; /* paint flags (from SET_WINPOS_* flags) */
2580 data_size_t total_size; /* total size of the resulting region */
2581 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2582 @END
2585 /* Get the visible surface region of a window */
2586 @REQ(get_surface_region)
2587 user_handle_t window; /* handle to the window */
2588 @REPLY
2589 rectangle_t visible_rect; /* window visible rect in screen coords */
2590 data_size_t total_size; /* total size of the resulting region */
2591 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2592 @END
2595 /* Get the window region */
2596 @REQ(get_window_region)
2597 user_handle_t window; /* handle to the window */
2598 @REPLY
2599 data_size_t total_size; /* total size of the resulting region */
2600 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2601 @END
2604 /* Set the window region */
2605 @REQ(set_window_region)
2606 user_handle_t window; /* handle to the window */
2607 int redraw; /* redraw the window? */
2608 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2609 @END
2612 /* Get the window update region */
2613 @REQ(get_update_region)
2614 user_handle_t window; /* handle to the window */
2615 user_handle_t from_child; /* child to start searching from */
2616 unsigned int flags; /* update flags (see below) */
2617 @REPLY
2618 user_handle_t child; /* child to repaint (or window itself) */
2619 unsigned int flags; /* resulting update flags (see below) */
2620 data_size_t total_size; /* total size of the resulting region */
2621 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2622 @END
2623 #define UPDATE_NONCLIENT 0x001 /* get region for repainting non-client area */
2624 #define UPDATE_ERASE 0x002 /* get region for erasing client area */
2625 #define UPDATE_PAINT 0x004 /* get region for painting client area */
2626 #define UPDATE_INTERNALPAINT 0x008 /* get region if internal paint is pending */
2627 #define UPDATE_ALLCHILDREN 0x010 /* force repaint of all children */
2628 #define UPDATE_NOCHILDREN 0x020 /* don't try to repaint any children */
2629 #define UPDATE_NOREGION 0x040 /* don't return a region, only the flags */
2630 #define UPDATE_DELAYED_ERASE 0x080 /* still needs erase after BeginPaint */
2631 #define UPDATE_CLIPCHILDREN 0x100 /* remove clipped children from the update region */
2634 /* Update the z order of a window so that a given rectangle is fully visible */
2635 @REQ(update_window_zorder)
2636 user_handle_t window; /* handle to the window */
2637 rectangle_t rect; /* rectangle that must be visible (in client coords) */
2638 @END
2641 /* Mark parts of a window as needing a redraw */
2642 @REQ(redraw_window)
2643 user_handle_t window; /* handle to the window */
2644 unsigned int flags; /* RDW_* flags */
2645 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2646 @END
2649 /* Set a window property */
2650 @REQ(set_window_property)
2651 user_handle_t window; /* handle to the window */
2652 lparam_t data; /* data to store */
2653 atom_t atom; /* property atom (if no name specified) */
2654 VARARG(name,unicode_str); /* property name */
2655 @END
2658 /* Remove a window property */
2659 @REQ(remove_window_property)
2660 user_handle_t window; /* handle to the window */
2661 atom_t atom; /* property atom (if no name specified) */
2662 VARARG(name,unicode_str); /* property name */
2663 @REPLY
2664 lparam_t data; /* data stored in property */
2665 @END
2668 /* Get a window property */
2669 @REQ(get_window_property)
2670 user_handle_t window; /* handle to the window */
2671 atom_t atom; /* property atom (if no name specified) */
2672 VARARG(name,unicode_str); /* property name */
2673 @REPLY
2674 lparam_t data; /* data stored in property */
2675 @END
2678 /* Get the list of properties of a window */
2679 @REQ(get_window_properties)
2680 user_handle_t window; /* handle to the window */
2681 @REPLY
2682 int total; /* total number of properties */
2683 VARARG(props,properties); /* list of properties */
2684 @END
2687 /* Create a window station */
2688 @REQ(create_winstation)
2689 unsigned int flags; /* window station flags */
2690 unsigned int access; /* wanted access rights */
2691 unsigned int attributes; /* object attributes */
2692 obj_handle_t rootdir; /* root directory */
2693 VARARG(name,unicode_str); /* object name */
2694 @REPLY
2695 obj_handle_t handle; /* handle to the window station */
2696 @END
2699 /* Open a handle to a window station */
2700 @REQ(open_winstation)
2701 unsigned int access; /* wanted access rights */
2702 unsigned int attributes; /* object attributes */
2703 obj_handle_t rootdir; /* root directory */
2704 VARARG(name,unicode_str); /* object name */
2705 @REPLY
2706 obj_handle_t handle; /* handle to the window station */
2707 @END
2710 /* Close a window station */
2711 @REQ(close_winstation)
2712 obj_handle_t handle; /* handle to the window station */
2713 @END
2716 /* Get the process current window station */
2717 @REQ(get_process_winstation)
2718 @REPLY
2719 obj_handle_t handle; /* handle to the window station */
2720 @END
2723 /* Set the process current window station */
2724 @REQ(set_process_winstation)
2725 obj_handle_t handle; /* handle to the window station */
2726 @END
2729 /* Enumerate window stations */
2730 @REQ(enum_winstation)
2731 unsigned int index; /* current index */
2732 @REPLY
2733 unsigned int next; /* next index */
2734 VARARG(name,unicode_str); /* window station name */
2735 @END
2738 /* Create a desktop */
2739 @REQ(create_desktop)
2740 unsigned int flags; /* desktop flags */
2741 unsigned int access; /* wanted access rights */
2742 unsigned int attributes; /* object attributes */
2743 VARARG(name,unicode_str); /* object name */
2744 @REPLY
2745 obj_handle_t handle; /* handle to the desktop */
2746 @END
2749 /* Open a handle to a desktop */
2750 @REQ(open_desktop)
2751 obj_handle_t winsta; /* window station to open (null allowed) */
2752 unsigned int flags; /* desktop flags */
2753 unsigned int access; /* wanted access rights */
2754 unsigned int attributes; /* object attributes */
2755 VARARG(name,unicode_str); /* object name */
2756 @REPLY
2757 obj_handle_t handle; /* handle to the desktop */
2758 @END
2761 /* Open a handle to current input desktop */
2762 @REQ(open_input_desktop)
2763 unsigned int flags; /* desktop flags */
2764 unsigned int access; /* wanted access rights */
2765 unsigned int attributes; /* object attributes */
2766 @REPLY
2767 obj_handle_t handle; /* handle to the desktop */
2768 @END
2771 /* Changes the current input desktop */
2772 @REQ(set_input_desktop)
2773 obj_handle_t handle; /* handle to the desktop */
2774 @END
2777 /* Close a desktop */
2778 @REQ(close_desktop)
2779 obj_handle_t handle; /* handle to the desktop */
2780 @END
2783 /* Get the thread current desktop */
2784 @REQ(get_thread_desktop)
2785 thread_id_t tid; /* thread id */
2786 @REPLY
2787 obj_handle_t handle; /* handle to the desktop */
2788 @END
2791 /* Set the thread current desktop */
2792 @REQ(set_thread_desktop)
2793 obj_handle_t handle; /* handle to the desktop */
2794 @END
2797 /* Enumerate desktops */
2798 @REQ(enum_desktop)
2799 obj_handle_t winstation; /* handle to the window station */
2800 unsigned int index; /* current index */
2801 @REPLY
2802 unsigned int next; /* next index */
2803 VARARG(name,unicode_str); /* window station name */
2804 @END
2807 /* Get/set information about a user object (window station or desktop) */
2808 @REQ(set_user_object_info)
2809 obj_handle_t handle; /* handle to the object */
2810 unsigned int flags; /* information to set/get */
2811 unsigned int obj_flags; /* new object flags */
2812 @REPLY
2813 int is_desktop; /* is object a desktop? */
2814 unsigned int old_obj_flags; /* old object flags */
2815 VARARG(name,unicode_str); /* object name */
2816 @END
2817 #define SET_USER_OBJECT_SET_FLAGS 1
2818 #define SET_USER_OBJECT_GET_FULL_NAME 2
2821 /* Register a hotkey */
2822 @REQ(register_hotkey)
2823 user_handle_t window; /* handle to the window */
2824 int id; /* hotkey identifier */
2825 unsigned int flags; /* modifier keys */
2826 unsigned int vkey; /* virtual key code */
2827 @REPLY
2828 int replaced; /* did we replace an existing hotkey? */
2829 unsigned int flags; /* flags of replaced hotkey */
2830 unsigned int vkey; /* virtual key code of replaced hotkey */
2831 @END
2834 /* Unregister a hotkey */
2835 @REQ(unregister_hotkey)
2836 user_handle_t window; /* handle to the window */
2837 int id; /* hotkey identifier */
2838 @REPLY
2839 unsigned int flags; /* flags of removed hotkey */
2840 unsigned int vkey; /* virtual key code of removed hotkey */
2841 @END
2844 /* Attach (or detach) thread inputs */
2845 @REQ(attach_thread_input)
2846 thread_id_t tid_from; /* thread to be attached */
2847 thread_id_t tid_to; /* thread to which tid_from should be attached */
2848 int attach; /* is it an attach? */
2849 @END
2852 /* Get input data for a given thread */
2853 @REQ(get_thread_input)
2854 thread_id_t tid; /* id of thread */
2855 @REPLY
2856 user_handle_t focus; /* handle to the focus window */
2857 user_handle_t capture; /* handle to the capture window */
2858 user_handle_t active; /* handle to the active window */
2859 user_handle_t foreground; /* handle to the global foreground window */
2860 user_handle_t menu_owner; /* handle to the menu owner */
2861 user_handle_t move_size; /* handle to the moving/resizing window */
2862 user_handle_t caret; /* handle to the caret window */
2863 user_handle_t cursor; /* handle to the cursor */
2864 int show_count; /* cursor show count */
2865 rectangle_t rect; /* caret rectangle */
2866 @END
2869 /* Get the time of the last input event */
2870 @REQ(get_last_input_time)
2871 @REPLY
2872 unsigned int time;
2873 @END
2876 /* Retrieve queue keyboard state for current thread or global async state */
2877 @REQ(get_key_state)
2878 int async; /* whether to query the async state */
2879 int key; /* optional key code or -1 */
2880 @REPLY
2881 unsigned char state; /* state of specified key */
2882 VARARG(keystate,bytes); /* state array for all the keys */
2883 @END
2885 /* Set queue keyboard state for current thread */
2886 @REQ(set_key_state)
2887 int async; /* whether to change the async state too */
2888 VARARG(keystate,bytes); /* state array for all the keys */
2889 @END
2891 /* Set the system foreground window */
2892 @REQ(set_foreground_window)
2893 user_handle_t handle; /* handle to the foreground window */
2894 @REPLY
2895 user_handle_t previous; /* handle to the previous foreground window */
2896 int send_msg_old; /* whether we have to send a msg to the old window */
2897 int send_msg_new; /* whether we have to send a msg to the new window */
2898 @END
2900 /* Set the current thread focus window */
2901 @REQ(set_focus_window)
2902 user_handle_t handle; /* handle to the focus window */
2903 @REPLY
2904 user_handle_t previous; /* handle to the previous focus window */
2905 @END
2907 /* Set the current thread active window */
2908 @REQ(set_active_window)
2909 user_handle_t handle; /* handle to the active window */
2910 @REPLY
2911 user_handle_t previous; /* handle to the previous active window */
2912 @END
2914 /* Set the current thread capture window */
2915 @REQ(set_capture_window)
2916 user_handle_t handle; /* handle to the capture window */
2917 unsigned int flags; /* capture flags (see below) */
2918 @REPLY
2919 user_handle_t previous; /* handle to the previous capture window */
2920 user_handle_t full_handle; /* full 32-bit handle of new capture window */
2921 @END
2922 #define CAPTURE_MENU 0x01 /* capture is for a menu */
2923 #define CAPTURE_MOVESIZE 0x02 /* capture is for moving/resizing */
2926 /* Set the current thread caret window */
2927 @REQ(set_caret_window)
2928 user_handle_t handle; /* handle to the caret window */
2929 int width; /* caret width */
2930 int height; /* caret height */
2931 @REPLY
2932 user_handle_t previous; /* handle to the previous caret window */
2933 rectangle_t old_rect; /* previous caret rectangle */
2934 int old_hide; /* previous hide count */
2935 int old_state; /* previous caret state (1=on, 0=off) */
2936 @END
2939 /* Set the current thread caret information */
2940 @REQ(set_caret_info)
2941 unsigned int flags; /* caret flags (see below) */
2942 user_handle_t handle; /* handle to the caret window */
2943 int x; /* caret x position */
2944 int y; /* caret y position */
2945 int hide; /* increment for hide count (can be negative to show it) */
2946 int state; /* caret state (see below) */
2947 @REPLY
2948 user_handle_t full_handle; /* handle to the current caret window */
2949 rectangle_t old_rect; /* previous caret rectangle */
2950 int old_hide; /* previous hide count */
2951 int old_state; /* previous caret state (1=on, 0=off) */
2952 @END
2953 #define SET_CARET_POS 0x01 /* set the caret position from x,y */
2954 #define SET_CARET_HIDE 0x02 /* increment the caret hide count */
2955 #define SET_CARET_STATE 0x04 /* set the caret on/off state */
2956 enum caret_state
2958 CARET_STATE_OFF, /* off */
2959 CARET_STATE_ON, /* on */
2960 CARET_STATE_TOGGLE, /* toggle current state */
2961 CARET_STATE_ON_IF_MOVED /* on if the position differs, unchanged otherwise */
2965 /* Set a window hook */
2966 @REQ(set_hook)
2967 int id; /* id of the hook */
2968 process_id_t pid; /* id of process to set the hook into */
2969 thread_id_t tid; /* id of thread to set the hook into */
2970 int event_min;
2971 int event_max;
2972 client_ptr_t proc; /* hook procedure */
2973 int flags;
2974 int unicode; /* is it a unicode hook? */
2975 VARARG(module,unicode_str); /* module name */
2976 @REPLY
2977 user_handle_t handle; /* handle to the hook */
2978 unsigned int active_hooks; /* active hooks bitmap */
2979 @END
2982 /* Remove a window hook */
2983 @REQ(remove_hook)
2984 user_handle_t handle; /* handle to the hook */
2985 client_ptr_t proc; /* hook procedure if handle is 0 */
2986 int id; /* id of the hook if handle is 0 */
2987 @REPLY
2988 unsigned int active_hooks; /* active hooks bitmap */
2989 @END
2992 /* Start calling a hook chain */
2993 @REQ(start_hook_chain)
2994 int id; /* id of the hook */
2995 int event; /* signalled event */
2996 user_handle_t window; /* handle to the event window */
2997 int object_id; /* object id for out of context winevent */
2998 int child_id; /* child id for out of context winevent */
2999 @REPLY
3000 user_handle_t handle; /* handle to the next hook */
3001 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
3002 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
3003 int unicode; /* is it a unicode hook? */
3004 client_ptr_t proc; /* hook procedure */
3005 unsigned int active_hooks; /* active hooks bitmap */
3006 VARARG(module,unicode_str); /* module name */
3007 @END
3010 /* Finished calling a hook chain */
3011 @REQ(finish_hook_chain)
3012 int id; /* id of the hook */
3013 @END
3016 /* Get the hook information */
3017 @REQ(get_hook_info)
3018 user_handle_t handle; /* handle to the current hook */
3019 int get_next; /* do we want info about current or next hook? */
3020 int event; /* signalled event */
3021 user_handle_t window; /* handle to the event window */
3022 int object_id; /* object id for out of context winevent */
3023 int child_id; /* child id for out of context winevent */
3024 @REPLY
3025 user_handle_t handle; /* handle to the hook */
3026 int id; /* id of the hook */
3027 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
3028 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
3029 client_ptr_t proc; /* hook procedure */
3030 int unicode; /* is it a unicode hook? */
3031 VARARG(module,unicode_str); /* module name */
3032 @END
3035 /* Create a window class */
3036 @REQ(create_class)
3037 int local; /* is it a local class? */
3038 atom_t atom; /* class atom */
3039 unsigned int style; /* class style */
3040 mod_handle_t instance; /* module instance */
3041 int extra; /* number of extra class bytes */
3042 int win_extra; /* number of window extra bytes */
3043 client_ptr_t client_ptr; /* pointer to class in client address space */
3044 data_size_t name_offset; /* base class name offset for specified atom */
3045 VARARG(name,unicode_str); /* class name */
3046 @REPLY
3047 atom_t atom; /* resulting class atom */
3048 @END
3051 /* Destroy a window class */
3052 @REQ(destroy_class)
3053 atom_t atom; /* class atom */
3054 mod_handle_t instance; /* module instance */
3055 VARARG(name,unicode_str); /* class name */
3056 @REPLY
3057 client_ptr_t client_ptr; /* pointer to class in client address space */
3058 @END
3061 /* Set some information in a class */
3062 @REQ(set_class_info)
3063 user_handle_t window; /* handle to the window */
3064 unsigned int flags; /* flags for info to set (see below) */
3065 atom_t atom; /* class atom */
3066 unsigned int style; /* class style */
3067 int win_extra; /* number of window extra bytes */
3068 mod_handle_t instance; /* module instance */
3069 int extra_offset; /* offset to set in extra bytes */
3070 data_size_t extra_size; /* size to set in extra bytes */
3071 lparam_t extra_value; /* value to set in extra bytes */
3072 @REPLY
3073 atom_t old_atom; /* previous class atom */
3074 atom_t base_atom; /* base class atom */
3075 mod_handle_t old_instance; /* previous module instance */
3076 lparam_t old_extra_value; /* old value in extra bytes */
3077 unsigned int old_style; /* previous class style */
3078 int old_extra; /* previous number of class extra bytes */
3079 int old_win_extra; /* previous number of window extra bytes */
3080 @END
3081 #define SET_CLASS_ATOM 0x0001
3082 #define SET_CLASS_STYLE 0x0002
3083 #define SET_CLASS_WINEXTRA 0x0004
3084 #define SET_CLASS_INSTANCE 0x0008
3085 #define SET_CLASS_EXTRA 0x0010
3088 /* Open the clipboard */
3089 @REQ(open_clipboard)
3090 user_handle_t window; /* clipboard window */
3091 @REPLY
3092 user_handle_t owner; /* current clipboard owner */
3093 @END
3096 /* Close the clipboard */
3097 @REQ(close_clipboard)
3098 @REPLY
3099 user_handle_t viewer; /* first clipboard viewer */
3100 user_handle_t owner; /* current clipboard owner */
3101 @END
3104 /* Empty the clipboard and grab ownership */
3105 @REQ(empty_clipboard)
3106 @END
3109 /* Add a data format to the clipboard */
3110 @REQ(set_clipboard_data)
3111 unsigned int format; /* clipboard format of the data */
3112 unsigned int lcid; /* locale id to use for synthesizing text formats */
3113 VARARG(data,bytes); /* data contents */
3114 @REPLY
3115 unsigned int seqno; /* sequence number for the set data */
3116 @END
3119 /* Fetch a data format from the clipboard */
3120 @REQ(get_clipboard_data)
3121 unsigned int format; /* clipboard format of the data */
3122 int render; /* will we try to render it if missing? */
3123 int cached; /* do we already have it in the client-side cache? */
3124 unsigned int seqno; /* sequence number for the data in the cache */
3125 @REPLY
3126 unsigned int from; /* for synthesized data, format to generate it from */
3127 user_handle_t owner; /* clipboard owner for delayed-rendered formats */
3128 unsigned int seqno; /* sequence number for the originally set data */
3129 data_size_t total; /* total data size */
3130 VARARG(data,bytes); /* data contents */
3131 @END
3134 /* Retrieve a list of available formats */
3135 @REQ(get_clipboard_formats)
3136 unsigned int format; /* specific format to query, return all if 0 */
3137 @REPLY
3138 unsigned int count; /* count of available formats */
3139 VARARG(formats,uints); /* array of available formats */
3140 @END
3143 /* Retrieve the next available format */
3144 @REQ(enum_clipboard_formats)
3145 unsigned int previous; /* previous format, or first if 0 */
3146 @REPLY
3147 unsigned int format; /* next format */
3148 @END
3151 /* Release ownership of the clipboard */
3152 @REQ(release_clipboard)
3153 user_handle_t owner; /* clipboard owner to release */
3154 @REPLY
3155 user_handle_t viewer; /* first clipboard viewer */
3156 user_handle_t owner; /* current clipboard owner */
3157 @END
3160 /* Get clipboard information */
3161 @REQ(get_clipboard_info)
3162 @REPLY
3163 user_handle_t window; /* clipboard window */
3164 user_handle_t owner; /* clipboard owner */
3165 user_handle_t viewer; /* clipboard viewer */
3166 unsigned int seqno; /* current sequence number */
3167 @END
3170 /* Set the clipboard viewer window */
3171 @REQ(set_clipboard_viewer)
3172 user_handle_t viewer; /* clipboard viewer */
3173 user_handle_t previous; /* if non-zero, check that this was the previous viewer */
3174 @REPLY
3175 user_handle_t old_viewer; /* previous clipboard viewer */
3176 user_handle_t owner; /* clipboard owner */
3177 @END
3180 /* Add a clipboard listener window */
3181 @REQ(add_clipboard_listener)
3182 user_handle_t window; /* clipboard listener window */
3183 @END
3186 /* Remove a clipboard listener window */
3187 @REQ(remove_clipboard_listener)
3188 user_handle_t window; /* clipboard listener window */
3189 @END
3192 /* Create a security token */
3193 @REQ(create_token)
3194 struct luid token_id;
3195 unsigned int access; /* access rights to the new token */
3196 int primary; /* is the new token to be a primary one? */
3197 int impersonation_level; /* impersonation level of the new token */
3198 abstime_t expire; /* expiration time */
3199 int group_count;
3200 int primary_group;
3201 int priv_count;
3202 /* VARARG(objattr,object_attributes); */
3203 /* VARARG(user,sid); */
3204 /* VARARG(groups,sid); */
3205 /* VARARG(privs,luid_attr); */
3206 /* VARARG(dacl,acl); */
3207 @REPLY
3208 obj_handle_t token; /* handle to the token */
3209 @END
3212 /* Open a security token */
3213 @REQ(open_token)
3214 obj_handle_t handle; /* handle to the thread or process */
3215 unsigned int access; /* access rights to the new token */
3216 unsigned int attributes;/* object attributes */
3217 unsigned int flags; /* flags (see below) */
3218 @REPLY
3219 obj_handle_t token; /* handle to the token */
3220 @END
3221 #define OPEN_TOKEN_THREAD 1
3222 #define OPEN_TOKEN_AS_SELF 2
3225 /* Set/get the global windows */
3226 @REQ(set_global_windows)
3227 unsigned int flags; /* flags for fields to set (see below) */
3228 user_handle_t shell_window; /* handle to the new shell window */
3229 user_handle_t shell_listview; /* handle to the new shell listview window */
3230 user_handle_t progman_window; /* handle to the new program manager window */
3231 user_handle_t taskman_window; /* handle to the new task manager window */
3232 @REPLY
3233 user_handle_t old_shell_window; /* handle to the shell window */
3234 user_handle_t old_shell_listview; /* handle to the shell listview window */
3235 user_handle_t old_progman_window; /* handle to the new program manager window */
3236 user_handle_t old_taskman_window; /* handle to the new task manager window */
3237 @END
3238 #define SET_GLOBAL_SHELL_WINDOWS 0x01 /* set both main shell and listview windows */
3239 #define SET_GLOBAL_PROGMAN_WINDOW 0x02
3240 #define SET_GLOBAL_TASKMAN_WINDOW 0x04
3242 /* Adjust the privileges held by a token */
3243 @REQ(adjust_token_privileges)
3244 obj_handle_t handle; /* handle to the token */
3245 int disable_all; /* disable all privileges? */
3246 int get_modified_state; /* get modified privileges? */
3247 VARARG(privileges,luid_attr); /* privileges to enable/disable/remove */
3248 @REPLY
3249 unsigned int len; /* total length in bytes required to store token privileges */
3250 VARARG(privileges,luid_attr); /* modified privileges */
3251 @END
3253 /* Retrieves the set of privileges held by or available to a token */
3254 @REQ(get_token_privileges)
3255 obj_handle_t handle; /* handle to the token */
3256 @REPLY
3257 unsigned int len; /* total length in bytes required to store token privileges */
3258 VARARG(privileges,luid_attr); /* privileges held by or available to a token */
3259 @END
3261 /* Check the token has the required privileges */
3262 @REQ(check_token_privileges)
3263 obj_handle_t handle; /* handle to the token */
3264 int all_required; /* are all the privileges required for the check to succeed? */
3265 VARARG(privileges,luid_attr); /* privileges to check */
3266 @REPLY
3267 int has_privileges; /* does the token have the required privileges? */
3268 VARARG(privileges,luid_attr); /* privileges held by or available to a token */
3269 @END
3271 @REQ(duplicate_token)
3272 obj_handle_t handle; /* handle to the token to duplicate */
3273 unsigned int access; /* access rights to the new token */
3274 int primary; /* is the new token to be a primary one? */
3275 int impersonation_level; /* impersonation level of the new token */
3276 VARARG(objattr,object_attributes); /* object attributes */
3277 @REPLY
3278 obj_handle_t new_handle; /* duplicated handle */
3279 @END
3281 @REQ(filter_token)
3282 obj_handle_t handle; /* handle to the token to duplicate */
3283 unsigned int flags; /* flags */
3284 data_size_t privileges_size; /* size of privileges */
3285 VARARG(privileges,luid_attr,privileges_size); /* privileges to remove from new token */
3286 VARARG(disable_sids,sid); /* array of groups to remove from new token */
3287 @REPLY
3288 obj_handle_t new_handle; /* filtered handle */
3289 @END
3291 @REQ(access_check)
3292 obj_handle_t handle; /* handle to the token */
3293 unsigned int desired_access; /* desired access to the object */
3294 generic_map_t mapping; /* mapping to specific rights */
3295 VARARG(sd,security_descriptor); /* security descriptor to check */
3296 @REPLY
3297 unsigned int access_granted; /* access rights actually granted */
3298 unsigned int access_status; /* was access granted? */
3299 unsigned int privileges_len; /* length needed to store privileges */
3300 VARARG(privileges,luid_attr); /* privileges used during access check */
3301 @END
3303 @REQ(get_token_sid)
3304 obj_handle_t handle; /* handle to the token */
3305 unsigned int which_sid; /* which SID to retrieve from the token */
3306 @REPLY
3307 data_size_t sid_len; /* length needed to store sid */
3308 VARARG(sid,sid); /* the sid specified by which_sid from the token */
3309 @END
3311 @REQ(get_token_groups)
3312 obj_handle_t handle; /* handle to the token */
3313 unsigned int attr_mask; /* mask for wanted attributes */
3314 @REPLY
3315 data_size_t attr_len; /* length needed to store attrs */
3316 data_size_t sid_len; /* length needed to store sids */
3317 VARARG(attrs,uints,attr_len); /* group attributes */
3318 VARARG(sids,sids); /* group sids */
3319 @END
3321 @REQ(get_token_default_dacl)
3322 obj_handle_t handle; /* handle to the token */
3323 @REPLY
3324 data_size_t acl_len; /* length needed to store access control list */
3325 VARARG(acl,acl); /* access control list */
3326 @END
3328 @REQ(set_token_default_dacl)
3329 obj_handle_t handle; /* handle to the token */
3330 VARARG(acl,acl); /* default dacl to set */
3331 @END
3333 @REQ(set_security_object)
3334 obj_handle_t handle; /* handle to the object */
3335 unsigned int security_info; /* which parts of security descriptor to set */
3336 VARARG(sd,security_descriptor); /* security descriptor to set */
3337 @END
3339 @REQ(get_security_object)
3340 obj_handle_t handle; /* handle to the object */
3341 unsigned int security_info; /* which parts of security descriptor to get */
3342 @REPLY
3343 unsigned int sd_len; /* buffer size needed for sd */
3344 VARARG(sd,security_descriptor); /* retrieved security descriptor */
3345 @END
3348 struct handle_info
3350 process_id_t owner;
3351 obj_handle_t handle;
3352 unsigned int access;
3353 unsigned int attributes;
3354 unsigned int type;
3357 /* Return a list of all opened handles */
3358 @REQ(get_system_handles)
3359 @REPLY
3360 unsigned int count; /* number of handles */
3361 VARARG(data,handle_infos); /* array of handle_infos */
3362 @END
3365 /* Create a mailslot */
3366 @REQ(create_mailslot)
3367 unsigned int access; /* wanted access rights */
3368 timeout_t read_timeout;
3369 unsigned int max_msgsize;
3370 VARARG(objattr,object_attributes); /* object attributes */
3371 @REPLY
3372 obj_handle_t handle; /* handle to the mailslot */
3373 @END
3376 /* Set mailslot information */
3377 @REQ(set_mailslot_info)
3378 obj_handle_t handle; /* handle to the mailslot */
3379 timeout_t read_timeout;
3380 unsigned int flags;
3381 @REPLY
3382 timeout_t read_timeout;
3383 unsigned int max_msgsize;
3384 @END
3385 #define MAILSLOT_SET_READ_TIMEOUT 1
3388 /* Create a directory object */
3389 @REQ(create_directory)
3390 unsigned int access; /* access flags */
3391 VARARG(objattr,object_attributes); /* object attributes */
3392 @REPLY
3393 obj_handle_t handle; /* handle to the directory */
3394 @END
3397 /* Open a directory object */
3398 @REQ(open_directory)
3399 unsigned int access; /* access flags */
3400 unsigned int attributes; /* object attributes */
3401 obj_handle_t rootdir; /* root directory */
3402 VARARG(directory_name,unicode_str); /* Directory name */
3403 @REPLY
3404 obj_handle_t handle; /* handle to the directory */
3405 @END
3408 /* Get a directory entry by index */
3409 @REQ(get_directory_entry)
3410 obj_handle_t handle; /* handle to the directory */
3411 unsigned int index; /* entry index */
3412 @REPLY
3413 data_size_t total_len; /* total length needed for strings */
3414 data_size_t name_len; /* length of the entry name in bytes */
3415 VARARG(name,unicode_str,name_len); /* entry name */
3416 VARARG(type,unicode_str); /* entry type */
3417 @END
3420 /* Create a symbolic link object */
3421 @REQ(create_symlink)
3422 unsigned int access; /* access flags */
3423 VARARG(objattr,object_attributes); /* object attributes */
3424 VARARG(target_name,unicode_str); /* target name */
3425 @REPLY
3426 obj_handle_t handle; /* handle to the symlink */
3427 @END
3430 /* Open a symbolic link object */
3431 @REQ(open_symlink)
3432 unsigned int access; /* access flags */
3433 unsigned int attributes; /* object attributes */
3434 obj_handle_t rootdir; /* root directory */
3435 VARARG(name,unicode_str); /* symlink name */
3436 @REPLY
3437 obj_handle_t handle; /* handle to the symlink */
3438 @END
3441 /* Query a symbolic link object */
3442 @REQ(query_symlink)
3443 obj_handle_t handle; /* handle to the symlink */
3444 @REPLY
3445 data_size_t total; /* total needed size for name */
3446 VARARG(target_name,unicode_str); /* target name */
3447 @END
3450 /* Query basic object information */
3451 @REQ(get_object_info)
3452 obj_handle_t handle; /* handle to the object */
3453 @REPLY
3454 unsigned int access; /* granted access mask */
3455 unsigned int ref_count; /* object ref count */
3456 unsigned int handle_count; /* object handle count */
3457 @END
3460 /* Query the full name of an object */
3461 @REQ(get_object_name)
3462 obj_handle_t handle; /* handle to the object */
3463 @REPLY
3464 data_size_t total; /* total needed size for name */
3465 VARARG(name,unicode_str); /* object name */
3466 @END
3469 /* Query object type name information */
3470 @REQ(get_object_type)
3471 obj_handle_t handle; /* handle to the object */
3472 @REPLY
3473 VARARG(info,object_type_info); /* type information */
3474 @END
3477 /* Query type information for all types */
3478 @REQ(get_object_types)
3479 @REPLY
3480 int count; /* total count of object types */
3481 VARARG(info,object_types_info); /* type information */
3482 @END
3485 /* Allocate a locally-unique identifier */
3486 @REQ(allocate_locally_unique_id)
3487 @REPLY
3488 struct luid luid;
3489 @END
3492 /* Create a device manager */
3493 @REQ(create_device_manager)
3494 unsigned int access; /* wanted access rights */
3495 unsigned int attributes; /* object attributes */
3496 @REPLY
3497 obj_handle_t handle; /* handle to the device */
3498 @END
3501 /* Create a device */
3502 @REQ(create_device)
3503 obj_handle_t rootdir; /* root directory */
3504 client_ptr_t user_ptr; /* opaque ptr for use by client */
3505 obj_handle_t manager; /* device manager */
3506 VARARG(name,unicode_str); /* object name */
3507 @END
3510 /* Delete a device */
3511 @REQ(delete_device)
3512 obj_handle_t manager; /* handle to the device manager */
3513 client_ptr_t device; /* pointer to the device */
3514 @END
3517 /* Retrieve the next pending device irp request */
3518 @REQ(get_next_device_request)
3519 obj_handle_t manager; /* handle to the device manager */
3520 obj_handle_t prev; /* handle to the previous irp */
3521 unsigned int status; /* status of the previous irp */
3522 client_ptr_t user_ptr; /* user pointer of the previous irp */
3523 int pending; /* was the previous irp marked pending? */
3524 unsigned int iosb_status; /* IOSB status of the previous irp */
3525 data_size_t result; /* IOSB result of the previous irp */
3526 VARARG(data,bytes); /* output data of the previous irp */
3527 @REPLY
3528 irp_params_t params; /* irp parameters */
3529 obj_handle_t next; /* handle to the next irp */
3530 thread_id_t client_tid; /* tid of thread calling irp */
3531 client_ptr_t client_thread; /* pointer to thread object of calling irp */
3532 data_size_t in_size; /* total needed input size */
3533 VARARG(next_data,bytes); /* input data of the next irp */
3534 @END
3537 /* Get kernel pointer from server object */
3538 @REQ(get_kernel_object_ptr)
3539 obj_handle_t manager; /* handle to the device manager */
3540 obj_handle_t handle; /* object handle */
3541 @REPLY
3542 client_ptr_t user_ptr; /* kernel object pointer */
3543 @END
3546 /* Associate kernel pointer with server object */
3547 @REQ(set_kernel_object_ptr)
3548 obj_handle_t manager; /* handle to the device manager */
3549 obj_handle_t handle; /* object handle */
3550 client_ptr_t user_ptr; /* kernel object pointer */
3551 @END
3554 /* Grab server object reference from kernel object pointer */
3555 @REQ(grab_kernel_object)
3556 obj_handle_t manager; /* handle to the device manager */
3557 client_ptr_t user_ptr; /* kernel object pointer */
3558 @END
3561 /* Release server object reference from kernel object pointer */
3562 @REQ(release_kernel_object)
3563 obj_handle_t manager; /* handle to the device manager */
3564 client_ptr_t user_ptr; /* kernel object pointer */
3565 @END
3568 /* Get handle from kernel object pointer */
3569 @REQ(get_kernel_object_handle)
3570 obj_handle_t manager; /* handle to the device manager */
3571 client_ptr_t user_ptr; /* kernel object pointer */
3572 unsigned int access; /* wanted access rights */
3573 @REPLY
3574 obj_handle_t handle; /* kernel object handle */
3575 @END
3578 /* Make the current process a system process */
3579 @REQ(make_process_system)
3580 obj_handle_t handle; /* handle to the process */
3581 @REPLY
3582 obj_handle_t event; /* event signaled when all user processes have exited */
3583 @END
3586 /* Get detailed fixed-size information about a token */
3587 @REQ(get_token_info)
3588 obj_handle_t handle; /* handle to the object */
3589 @REPLY
3590 struct luid token_id; /* locally-unique identifier of the token */
3591 struct luid modified_id; /* locally-unique identifier of the modified version of the token */
3592 unsigned int session_id; /* token session id */
3593 int primary; /* is the token primary or impersonation? */
3594 int impersonation_level; /* level of impersonation */
3595 int elevation; /* elevation type */
3596 int group_count; /* the number of groups the token is a member of */
3597 int privilege_count; /* the number of privileges the token has */
3598 @END
3601 /* Create a token which is an elevation counterpart to this token */
3602 @REQ(create_linked_token)
3603 obj_handle_t handle; /* handle to the token */
3604 @REPLY
3605 obj_handle_t linked; /* handle to the linked token */
3606 @END
3609 /* Create I/O completion port */
3610 @REQ(create_completion)
3611 unsigned int access; /* desired access to a port */
3612 unsigned int concurrent; /* max number of concurrent active threads */
3613 VARARG(objattr,object_attributes); /* object attributes */
3614 @REPLY
3615 obj_handle_t handle; /* port handle */
3616 @END
3619 /* Open I/O completion port */
3620 @REQ(open_completion)
3621 unsigned int access; /* desired access to a port */
3622 unsigned int attributes; /* object attributes */
3623 obj_handle_t rootdir; /* root directory */
3624 VARARG(filename,unicode_str); /* port name */
3625 @REPLY
3626 obj_handle_t handle; /* port handle */
3627 @END
3630 /* add completion to completion port */
3631 @REQ(add_completion)
3632 obj_handle_t handle; /* port handle */
3633 apc_param_t ckey; /* completion key */
3634 apc_param_t cvalue; /* completion value */
3635 apc_param_t information; /* IO_STATUS_BLOCK Information */
3636 unsigned int status; /* completion result */
3637 @END
3640 /* get completion from completion port queue */
3641 @REQ(remove_completion)
3642 obj_handle_t handle; /* port handle */
3643 @REPLY
3644 apc_param_t ckey; /* completion key */
3645 apc_param_t cvalue; /* completion value */
3646 apc_param_t information; /* IO_STATUS_BLOCK Information */
3647 unsigned int status; /* completion result */
3648 @END
3651 /* get completion queue depth */
3652 @REQ(query_completion)
3653 obj_handle_t handle; /* port handle */
3654 @REPLY
3655 unsigned int depth; /* completion queue depth */
3656 @END
3659 /* associate object with completion port */
3660 @REQ(set_completion_info)
3661 obj_handle_t handle; /* object handle */
3662 apc_param_t ckey; /* completion key */
3663 obj_handle_t chandle; /* port handle */
3664 @END
3667 /* check for associated completion and push msg */
3668 @REQ(add_fd_completion)
3669 obj_handle_t handle; /* async' object */
3670 apc_param_t cvalue; /* completion value */
3671 apc_param_t information; /* IO_STATUS_BLOCK Information */
3672 unsigned int status; /* completion status */
3673 int async; /* completion is an async result */
3674 @END
3677 /* set fd completion information */
3678 @REQ(set_fd_completion_mode)
3679 obj_handle_t handle; /* handle to a file or directory */
3680 unsigned int flags; /* completion notification flags */
3681 @END
3684 /* set fd disposition information */
3685 @REQ(set_fd_disp_info)
3686 obj_handle_t handle; /* handle to a file or directory */
3687 unsigned int flags; /* what actions should be taken when deleting a file */
3688 @END
3691 /* set fd name information */
3692 @REQ(set_fd_name_info)
3693 obj_handle_t handle; /* handle to a file or directory */
3694 obj_handle_t rootdir; /* root directory */
3695 data_size_t namelen; /* length of NT name in bytes */
3696 int link; /* link instead of renaming */
3697 unsigned int flags; /* FILE_RENAME_* flags */
3698 VARARG(name,unicode_str,namelen); /* NT name */
3699 VARARG(filename,string); /* new file name */
3700 @END
3703 /* set fd eof information */
3704 @REQ(set_fd_eof_info)
3705 obj_handle_t handle; /* handle to a file or directory */
3706 file_pos_t eof; /* offset of eof of file */
3707 @END
3710 /* Retrieve layered info for a window */
3711 @REQ(get_window_layered_info)
3712 user_handle_t handle; /* handle to the window */
3713 @REPLY
3714 unsigned int color_key; /* color key */
3715 unsigned int alpha; /* alpha (0..255) */
3716 unsigned int flags; /* LWA_* flags */
3717 @END
3720 /* Set layered info for a window */
3721 @REQ(set_window_layered_info)
3722 user_handle_t handle; /* handle to the window */
3723 unsigned int color_key; /* color key */
3724 unsigned int alpha; /* alpha (0..255) */
3725 unsigned int flags; /* LWA_* flags */
3726 @END
3729 /* Allocate an arbitrary user handle */
3730 @REQ(alloc_user_handle)
3731 @REPLY
3732 user_handle_t handle; /* allocated handle */
3733 @END
3736 /* Free an arbitrary user handle */
3737 @REQ(free_user_handle)
3738 user_handle_t handle; /* handle to free*/
3739 @END
3742 /* Set/get the current cursor */
3743 @REQ(set_cursor)
3744 unsigned int flags; /* flags for fields to set (see below) */
3745 user_handle_t handle; /* handle to the cursor */
3746 int show_count; /* show count increment/decrement */
3747 int x; /* cursor position */
3748 int y;
3749 rectangle_t clip; /* cursor clip rectangle */
3750 @REPLY
3751 user_handle_t prev_handle; /* previous handle */
3752 int prev_count; /* previous show count */
3753 int prev_x; /* previous position */
3754 int prev_y;
3755 int new_x; /* new position */
3756 int new_y;
3757 rectangle_t new_clip; /* new clip rectangle */
3758 unsigned int last_change; /* time of last position change */
3759 @END
3760 #define SET_CURSOR_HANDLE 0x01
3761 #define SET_CURSOR_COUNT 0x02
3762 #define SET_CURSOR_POS 0x04
3763 #define SET_CURSOR_CLIP 0x08
3764 #define SET_CURSOR_NOCLIP 0x10
3765 #define SET_CURSOR_FSCLIP 0x20
3767 /* Get the history of the 64 last cursor positions */
3768 @REQ(get_cursor_history)
3769 @REPLY
3770 VARARG(history,cursor_positions);
3771 @END
3774 /* Batch read rawinput message data */
3775 @REQ(get_rawinput_buffer)
3776 data_size_t header_size; /* size of RAWINPUTHEADER structure */
3777 int read_data; /* read the rawinput buffer data */
3778 @REPLY
3779 data_size_t next_size; /* minimum size to get next message data */
3780 unsigned int count;
3781 VARARG(data,bytes);
3782 @END
3784 /* Modify the list of registered rawinput devices */
3785 @REQ(update_rawinput_devices)
3786 VARARG(devices,rawinput_devices);
3787 @END
3789 /* Create a new job object */
3790 @REQ(create_job)
3791 unsigned int access; /* wanted access rights */
3792 VARARG(objattr,object_attributes); /* object attributes */
3793 @REPLY
3794 obj_handle_t handle; /* handle to the job */
3795 @END
3798 /* Open a job object */
3799 @REQ(open_job)
3800 unsigned int access; /* wanted access rights */
3801 unsigned int attributes; /* object attributes */
3802 obj_handle_t rootdir; /* root directory */
3803 VARARG(name,unicode_str); /* object name */
3804 @REPLY
3805 obj_handle_t handle; /* handle to the job */
3806 @END
3809 /* Assign a job object to a process */
3810 @REQ(assign_job)
3811 obj_handle_t job; /* handle to the job */
3812 obj_handle_t process; /* handle to the process */
3813 @END
3816 /* Check if a process is associated with a job */
3817 @REQ(process_in_job)
3818 obj_handle_t job; /* handle to the job */
3819 obj_handle_t process; /* handle to the process */
3820 @END
3823 /* Set limit flags on a job */
3824 @REQ(set_job_limits)
3825 obj_handle_t handle; /* handle to the job */
3826 unsigned int limit_flags; /* new limit flags */
3827 @END
3830 /* Set new completion port for a job */
3831 @REQ(set_job_completion_port)
3832 obj_handle_t job; /* handle to the job */
3833 obj_handle_t port; /* handle to the completion port */
3834 client_ptr_t key; /* key to send with completion messages */
3835 @END
3838 /* Retrieve information about a job */
3839 @REQ(get_job_info)
3840 obj_handle_t handle; /* handle to the job */
3841 @REPLY
3842 int total_processes; /* total count of processes */
3843 int active_processes; /* count of running processes */
3844 VARARG(pids,uints); /* list of active pids */
3845 @END
3848 /* Terminate all processes associated with the job */
3849 @REQ(terminate_job)
3850 obj_handle_t handle; /* handle to the job */
3851 int status; /* process exit code */
3852 @END
3855 /* Suspend a process */
3856 @REQ(suspend_process)
3857 obj_handle_t handle; /* process handle */
3858 @END
3861 /* Resume a process */
3862 @REQ(resume_process)
3863 obj_handle_t handle; /* process handle */
3864 @END
3867 /* Iterate thread list for process */
3868 @REQ(get_next_thread)
3869 obj_handle_t process; /* process handle */
3870 obj_handle_t last; /* thread handle to start with */
3871 unsigned int access; /* desired access for returned handle */
3872 unsigned int attributes; /* returned handle attributes */
3873 unsigned int flags; /* controls iteration direction */
3874 @REPLY
3875 obj_handle_t handle; /* next thread handle */
3876 @END