quartz: Delay import ddraw.
[wine.git] / server / protocol.def
blob5d60e7fcda3e81a11a86004a79cef265904a2b9a
1 /* -*- C -*-
3 * Wine server protocol definition
5 * Copyright (C) 2001 Alexandre Julliard
7 * This file is used by tools/make_requests to build the
8 * protocol structures in include/wine/server_protocol.h
10 * This library is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU Lesser General Public
12 * License as published by the Free Software Foundation; either
13 * version 2.1 of the License, or (at your option) any later version.
15 * This library is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 * Lesser General Public License for more details.
20 * You should have received a copy of the GNU Lesser General Public
21 * License along with this library; if not, write to the Free Software
22 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
25 @HEADER /* start of C declarations */
27 #include <stdarg.h>
28 #include <stdlib.h>
29 #include <time.h>
31 #include <windef.h>
32 #include <winbase.h>
34 typedef unsigned int obj_handle_t;
35 typedef unsigned int user_handle_t;
36 typedef unsigned int atom_t;
37 typedef unsigned int process_id_t;
38 typedef unsigned int thread_id_t;
39 typedef unsigned int data_size_t;
40 typedef unsigned int ioctl_code_t;
41 typedef unsigned __int64 lparam_t;
42 typedef unsigned __int64 apc_param_t;
43 typedef unsigned __int64 mem_size_t;
44 typedef unsigned __int64 file_pos_t;
45 typedef unsigned __int64 client_ptr_t;
46 typedef unsigned __int64 affinity_t;
47 typedef client_ptr_t mod_handle_t;
49 struct request_header
51 int req; /* request code */
52 data_size_t request_size; /* request variable part size */
53 data_size_t reply_size; /* reply variable part maximum size */
56 struct reply_header
58 unsigned int error; /* error result */
59 data_size_t reply_size; /* reply variable part size */
62 /* placeholder structure for the maximum allowed request size */
63 /* this is used to construct the generic_request union */
64 struct request_max_size
66 int pad[16]; /* the max request size is 16 ints */
69 #define FIRST_USER_HANDLE 0x0020 /* first possible value for low word of user handle */
70 #define LAST_USER_HANDLE 0xffef /* last possible value for low word of user handle */
73 /* debug event data */
74 typedef union
76 int code; /* event code */
77 struct
79 int code; /* DbgExceptionStateChange */
80 int first; /* first chance exception? */
81 unsigned int exc_code; /* exception code */
82 unsigned int flags; /* exception flags */
83 client_ptr_t record; /* exception record */
84 client_ptr_t address; /* exception address */
85 int nb_params; /* number of parameters */
86 int __pad;
87 client_ptr_t params[15]; /* parameters */
88 } exception;
89 struct
91 int code; /* DbgCreateThreadStateChange */
92 obj_handle_t handle; /* handle to the new thread */
93 client_ptr_t start; /* thread startup routine */
94 } create_thread;
95 struct
97 int code; /* DbgCreateProcessStateChange */
98 obj_handle_t file; /* handle to the process exe file */
99 obj_handle_t process; /* handle to the new process */
100 obj_handle_t thread; /* handle to the new thread */
101 mod_handle_t base; /* base of executable image */
102 int dbg_offset; /* offset of debug info in file */
103 int dbg_size; /* size of debug info */
104 client_ptr_t start; /* thread startup routine */
105 } create_process;
106 struct
108 int code; /* DbgExitThreadStateChange/DbgExitProcessStateChange */
109 int exit_code; /* thread or process exit code */
110 } exit;
111 struct
113 int code; /* DbgLoadDllStateChange */
114 obj_handle_t handle; /* file handle for the dll */
115 mod_handle_t base; /* base address of the dll */
116 int dbg_offset; /* offset of debug info in file */
117 int dbg_size; /* size of debug info */
118 client_ptr_t name; /* image name (optional) */
119 } load_dll;
120 struct
122 int code; /* DbgUnloadDllStateChange */
123 int __pad;
124 mod_handle_t base; /* base address of the dll */
125 } unload_dll;
126 } debug_event_t;
128 /* context data */
129 typedef struct
131 unsigned int machine; /* machine type */
132 unsigned int flags; /* SERVER_CTX_* flags */
133 union
135 struct { unsigned int eip, ebp, esp, eflags, cs, ss; } i386_regs;
136 struct { unsigned __int64 rip, rbp, rsp;
137 unsigned int cs, ss, flags, __pad; } x86_64_regs;
138 struct { unsigned int sp, lr, pc, cpsr; } arm_regs;
139 struct { unsigned __int64 sp, pc, pstate; } arm64_regs;
140 } ctl; /* selected by SERVER_CTX_CONTROL */
141 union
143 struct { unsigned int eax, ebx, ecx, edx, esi, edi; } i386_regs;
144 struct { unsigned __int64 rax,rbx, rcx, rdx, rsi, rdi,
145 r8, r9, r10, r11, r12, r13, r14, r15; } x86_64_regs;
146 struct { unsigned int r[13]; } arm_regs;
147 struct { unsigned __int64 x[31]; } arm64_regs;
148 } integer; /* selected by SERVER_CTX_INTEGER */
149 union
151 struct { unsigned int ds, es, fs, gs; } i386_regs;
152 struct { unsigned int ds, es, fs, gs; } x86_64_regs;
153 } seg; /* selected by SERVER_CTX_SEGMENTS */
154 union
156 struct { unsigned int ctrl, status, tag, err_off, err_sel, data_off, data_sel, cr0npx;
157 unsigned char regs[80]; } i386_regs;
158 struct { struct { unsigned __int64 low, high; } fpregs[32]; } x86_64_regs;
159 struct { unsigned __int64 d[32]; unsigned int fpscr; } arm_regs;
160 struct { struct { unsigned __int64 low, high; } q[32]; unsigned int fpcr, fpsr; } arm64_regs;
161 } fp; /* selected by SERVER_CTX_FLOATING_POINT */
162 union
164 struct { unsigned int dr0, dr1, dr2, dr3, dr6, dr7; } i386_regs;
165 struct { unsigned __int64 dr0, dr1, dr2, dr3, dr6, dr7; } x86_64_regs;
166 struct { unsigned int bvr[8], bcr[8], wvr[1], wcr[1]; } arm_regs;
167 struct { unsigned __int64 bvr[8], wvr[2]; unsigned int bcr[8], wcr[2]; } arm64_regs;
168 } debug; /* selected by SERVER_CTX_DEBUG_REGISTERS */
169 union
171 unsigned char i386_regs[512];
172 } ext; /* selected by SERVER_CTX_EXTENDED_REGISTERS */
173 union
175 struct { struct { unsigned __int64 low, high; } ymm_high[16]; } regs;
176 } ymm; /* selected by SERVER_CTX_YMM_REGISTERS */
177 } context_t;
179 #define SERVER_CTX_CONTROL 0x01
180 #define SERVER_CTX_INTEGER 0x02
181 #define SERVER_CTX_SEGMENTS 0x04
182 #define SERVER_CTX_FLOATING_POINT 0x08
183 #define SERVER_CTX_DEBUG_REGISTERS 0x10
184 #define SERVER_CTX_EXTENDED_REGISTERS 0x20
185 #define SERVER_CTX_YMM_REGISTERS 0x40
187 /* structure used in sending an fd from client to server */
188 struct send_fd
190 thread_id_t tid; /* thread id */
191 int fd; /* file descriptor on client-side */
194 /* structure sent by the server on the wait fifo */
195 struct wake_up_reply
197 client_ptr_t cookie; /* magic cookie that was passed in select_request */
198 int signaled; /* wait result */
199 int __pad;
202 /* NT-style timeout, in 100ns units, negative means relative timeout */
203 typedef __int64 timeout_t;
204 #define TIMEOUT_INFINITE (((timeout_t)0x7fffffff) << 32 | 0xffffffff)
206 /* absolute timeout, negative means that monotonic clock is used */
207 typedef __int64 abstime_t;
209 /* structure for process startup info */
210 typedef struct
212 unsigned int debug_flags;
213 unsigned int console_flags;
214 obj_handle_t console;
215 obj_handle_t hstdin;
216 obj_handle_t hstdout;
217 obj_handle_t hstderr;
218 unsigned int x;
219 unsigned int y;
220 unsigned int xsize;
221 unsigned int ysize;
222 unsigned int xchars;
223 unsigned int ychars;
224 unsigned int attribute;
225 unsigned int flags;
226 unsigned int show;
227 process_id_t process_group_id;
228 data_size_t curdir_len;
229 data_size_t dllpath_len;
230 data_size_t imagepath_len;
231 data_size_t cmdline_len;
232 data_size_t title_len;
233 data_size_t desktop_len;
234 data_size_t shellinfo_len;
235 data_size_t runtime_len;
236 /* VARARG(curdir,unicode_str,curdir_len); */
237 /* VARARG(dllpath,unicode_str,dllpath_len); */
238 /* VARARG(imagepath,unicode_str,imagepath_len); */
239 /* VARARG(cmdline,unicode_str,cmdline_len); */
240 /* VARARG(title,unicode_str,title_len); */
241 /* VARARG(desktop,unicode_str,desktop_len); */
242 /* VARARG(shellinfo,unicode_str,shellinfo_len); */
243 /* VARARG(runtime,unicode_str,runtime_len); */
244 } startup_info_t;
246 /* structure returned in the list of window properties */
247 typedef struct
249 atom_t atom; /* property atom */
250 int string; /* was atom a string originally? */
251 lparam_t data; /* data stored in property */
252 } property_data_t;
254 /* structure to specify window rectangles */
255 typedef struct
257 int left;
258 int top;
259 int right;
260 int bottom;
261 } rectangle_t;
263 /* structure for parameters of async I/O calls */
264 typedef struct
266 obj_handle_t handle; /* object to perform I/O on */
267 obj_handle_t event; /* event to signal when done */
268 client_ptr_t iosb; /* I/O status block in client addr space */
269 client_ptr_t user; /* opaque user data containing callback pointer and async-specific data */
270 client_ptr_t apc; /* user APC to call */
271 apc_param_t apc_context; /* user APC context or completion value */
272 } async_data_t;
274 /* structures for extra message data */
276 struct hw_msg_source
278 unsigned int device; /* source device (IMDT_* values) */
279 unsigned int origin; /* source origin (IMO_* values) */
282 union rawinput
284 int type;
285 struct
287 int type; /* RIM_TYPEKEYBOARD */
288 unsigned int message; /* message generated by this rawinput event */
289 unsigned short vkey; /* virtual key code */
290 unsigned short scan; /* scan code */
291 } kbd;
292 struct
294 int type; /* RIM_TYPEMOUSE */
295 int x; /* x coordinate */
296 int y; /* y coordinate */
297 unsigned int data; /* mouse data */
298 } mouse;
299 struct
301 int type; /* RIM_TYPEHID */
302 unsigned int device; /* rawinput device index */
303 unsigned int param; /* rawinput message param */
304 unsigned short usage_page;/* HID usage page */
305 unsigned short usage; /* HID usage */
306 unsigned int count; /* HID report count */
307 unsigned int length; /* HID report length */
308 } hid;
311 struct hardware_msg_data
313 lparam_t info; /* extra info */
314 data_size_t size; /* size of hardware message data */
315 int __pad;
316 unsigned int hw_id; /* unique id */
317 unsigned int flags; /* hook flags */
318 struct hw_msg_source source; /* message source */
319 union rawinput rawinput; /* rawinput message data */
322 struct callback_msg_data
324 client_ptr_t callback; /* callback function */
325 lparam_t data; /* user data for callback */
326 lparam_t result; /* message result */
329 struct winevent_msg_data
331 user_handle_t hook; /* hook handle */
332 thread_id_t tid; /* thread id */
333 client_ptr_t hook_proc; /* hook proc address */
334 /* followed by module name if any */
337 typedef union
339 int type;
340 struct
342 int type; /* INPUT_KEYBOARD */
343 unsigned short vkey; /* virtual key code */
344 unsigned short scan; /* scan code */
345 unsigned int flags; /* event flags */
346 unsigned int time; /* event time */
347 lparam_t info; /* extra info */
348 } kbd;
349 struct
351 int type; /* INPUT_MOUSE */
352 int x; /* coordinates */
353 int y;
354 unsigned int data; /* mouse data */
355 unsigned int flags; /* event flags */
356 unsigned int time; /* event time */
357 lparam_t info; /* extra info */
358 } mouse;
359 struct
361 int type; /* INPUT_HARDWARE */
362 unsigned int msg; /* message code */
363 lparam_t lparam; /* message param */
364 union rawinput rawinput;/* rawinput message data */
365 } hw;
366 } hw_input_t;
368 typedef union
370 unsigned char bytes[1]; /* raw data for sent messages */
371 struct hardware_msg_data hardware;
372 struct callback_msg_data callback;
373 struct winevent_msg_data winevent;
374 } message_data_t;
376 /* structure returned in filesystem events */
377 struct filesystem_event
379 int action;
380 data_size_t len;
381 char name[1];
384 struct luid
386 unsigned int low_part;
387 int high_part;
390 struct luid_attr
392 struct luid luid;
393 unsigned int attrs;
396 struct acl
398 unsigned char revision;
399 unsigned char pad1;
400 unsigned short size;
401 unsigned short count;
402 unsigned short pad2;
405 struct sid
407 unsigned char revision;
408 unsigned char sub_count;
409 unsigned char id_auth[6];
410 unsigned int sub_auth[15];
413 typedef struct
415 unsigned int read;
416 unsigned int write;
417 unsigned int exec;
418 unsigned int all;
419 } generic_map_t;
421 #define MAX_ACL_LEN 65535
423 struct security_descriptor
425 unsigned int control; /* SE_ flags */
426 data_size_t owner_len;
427 data_size_t group_len;
428 data_size_t sacl_len;
429 data_size_t dacl_len;
430 /* VARARG(owner,sid); */
431 /* VARARG(group,sid); */
432 /* VARARG(sacl,acl); */
433 /* VARARG(dacl,acl); */
436 struct object_attributes
438 obj_handle_t rootdir; /* root directory */
439 unsigned int attributes; /* object attributes */
440 data_size_t sd_len; /* length of security_descriptor data. may be 0 */
441 data_size_t name_len; /* length of the name string. may be 0 */
442 /* VARARG(sd,security_descriptor); */
443 /* VARARG(name,unicode_str); */
446 struct object_type_info
448 data_size_t name_len; /* length of the name string */
449 unsigned int index; /* type index in global table */
450 unsigned int obj_count; /* count of objects of this type */
451 unsigned int handle_count; /* count of handles of this type */
452 unsigned int obj_max; /* max count of objects of this type */
453 unsigned int handle_max; /* max count of handles of this type */
454 unsigned int valid_access; /* mask for valid access bits */
455 generic_map_t mapping; /* generic access mappings */
456 /* VARARG(name,unicode_str); */
459 enum select_op
461 SELECT_NONE,
462 SELECT_WAIT,
463 SELECT_WAIT_ALL,
464 SELECT_SIGNAL_AND_WAIT,
465 SELECT_KEYED_EVENT_WAIT,
466 SELECT_KEYED_EVENT_RELEASE
469 typedef union
471 enum select_op op;
472 struct
474 enum select_op op; /* SELECT_WAIT or SELECT_WAIT_ALL */
475 obj_handle_t handles[MAXIMUM_WAIT_OBJECTS];
476 int __pad;
477 } wait;
478 struct
480 enum select_op op; /* SELECT_SIGNAL_AND_WAIT */
481 obj_handle_t wait;
482 obj_handle_t signal; /* must be last in the structure so we can remove it on retries */
483 } signal_and_wait;
484 struct
486 enum select_op op; /* SELECT_KEYED_EVENT_WAIT or SELECT_KEYED_EVENT_RELEASE */
487 obj_handle_t handle;
488 client_ptr_t key;
489 } keyed_event;
490 } select_op_t;
492 enum apc_type
494 APC_NONE,
495 APC_USER,
496 APC_ASYNC_IO,
497 APC_VIRTUAL_ALLOC,
498 APC_VIRTUAL_ALLOC_EX,
499 APC_VIRTUAL_FREE,
500 APC_VIRTUAL_QUERY,
501 APC_VIRTUAL_PROTECT,
502 APC_VIRTUAL_FLUSH,
503 APC_VIRTUAL_LOCK,
504 APC_VIRTUAL_UNLOCK,
505 APC_MAP_VIEW,
506 APC_MAP_VIEW_EX,
507 APC_UNMAP_VIEW,
508 APC_CREATE_THREAD,
509 APC_DUP_HANDLE
512 typedef struct
514 enum apc_type type; /* APC_USER */
515 int __pad;
516 client_ptr_t func; /* void (__stdcall *func)(ULONG_PTR,ULONG_PTR,ULONG_PTR); */
517 apc_param_t args[3]; /* arguments for user function */
518 } user_apc_t;
520 typedef union
522 enum apc_type type;
523 user_apc_t user;
524 struct
526 enum apc_type type; /* APC_ASYNC_IO */
527 unsigned int status; /* I/O status */
528 client_ptr_t user; /* user pointer */
529 client_ptr_t sb; /* status block */
530 data_size_t result; /* result size */
531 } async_io;
532 struct
534 enum apc_type type; /* APC_VIRTUAL_ALLOC */
535 unsigned int op_type; /* type of operation */
536 client_ptr_t addr; /* requested address */
537 mem_size_t size; /* allocation size */
538 mem_size_t zero_bits; /* number of zero high bits */
539 unsigned int prot; /* memory protection flags */
540 } virtual_alloc;
541 struct
543 enum apc_type type; /* APC_VIRTUAL_ALLOC */
544 unsigned int op_type; /* type of operation */
545 client_ptr_t addr; /* requested address */
546 mem_size_t size; /* allocation size */
547 mem_size_t limit_low; /* allocation address limits */
548 mem_size_t limit_high;
549 mem_size_t align; /* allocation alignment */
550 unsigned int prot; /* memory protection flags */
551 unsigned int attributes; /* memory extended attributes */
552 } virtual_alloc_ex;
553 struct
555 enum apc_type type; /* APC_VIRTUAL_FREE */
556 unsigned int op_type; /* type of operation */
557 client_ptr_t addr; /* requested address */
558 mem_size_t size; /* allocation size */
559 } virtual_free;
560 struct
562 enum apc_type type; /* APC_VIRTUAL_QUERY */
563 int __pad;
564 client_ptr_t addr; /* requested address */
565 } virtual_query;
566 struct
568 enum apc_type type; /* APC_VIRTUAL_PROTECT */
569 unsigned int prot; /* new protection flags */
570 client_ptr_t addr; /* requested address */
571 mem_size_t size; /* requested size */
572 } virtual_protect;
573 struct
575 enum apc_type type; /* APC_VIRTUAL_FLUSH */
576 int __pad;
577 client_ptr_t addr; /* requested address */
578 mem_size_t size; /* requested size */
579 } virtual_flush;
580 struct
582 enum apc_type type; /* APC_VIRTUAL_LOCK */
583 int __pad;
584 client_ptr_t addr; /* requested address */
585 mem_size_t size; /* requested size */
586 } virtual_lock;
587 struct
589 enum apc_type type; /* APC_VIRTUAL_UNLOCK */
590 int __pad;
591 client_ptr_t addr; /* requested address */
592 mem_size_t size; /* requested size */
593 } virtual_unlock;
594 struct
596 enum apc_type type; /* APC_MAP_VIEW */
597 obj_handle_t handle; /* mapping handle */
598 client_ptr_t addr; /* requested address */
599 mem_size_t size; /* allocation size */
600 file_pos_t offset; /* file offset */
601 mem_size_t zero_bits; /* number of zero high bits */
602 unsigned int alloc_type; /* allocation type */
603 unsigned int prot; /* memory protection flags */
604 } map_view;
605 struct
607 enum apc_type type; /* APC_MAP_VIEW_EX */
608 obj_handle_t handle; /* mapping handle */
609 client_ptr_t addr; /* requested address */
610 mem_size_t size; /* allocation size */
611 file_pos_t offset; /* file offset */
612 mem_size_t limit_low; /* allocation address limits */
613 mem_size_t limit_high;
614 unsigned int alloc_type; /* allocation type */
615 unsigned int prot; /* memory protection flags */
616 unsigned short machine; /* requested machine for image mappings */
617 unsigned short __pad[3];
618 } map_view_ex;
619 struct
621 enum apc_type type; /* APC_UNMAP_VIEW */
622 unsigned int flags; /* unmap flags */
623 client_ptr_t addr; /* view address */
624 } unmap_view;
625 struct
627 enum apc_type type; /* APC_CREATE_THREAD */
628 unsigned int flags; /* creation flags */
629 client_ptr_t func; /* void (__stdcall *func)(void*); start function */
630 client_ptr_t arg; /* argument for start function */
631 mem_size_t zero_bits; /* number of zero high bits for thread stack */
632 mem_size_t reserve; /* reserve size for thread stack */
633 mem_size_t commit; /* commit size for thread stack */
634 } create_thread;
635 struct
637 enum apc_type type; /* APC_DUP_HANDLE */
638 obj_handle_t src_handle; /* src handle to duplicate */
639 obj_handle_t dst_process; /* dst process handle */
640 unsigned int access; /* wanted access rights */
641 unsigned int attributes; /* object attributes */
642 unsigned int options; /* duplicate options */
643 } dup_handle;
644 } apc_call_t;
646 typedef union
648 enum apc_type type;
649 struct
651 enum apc_type type; /* APC_ASYNC_IO */
652 unsigned int status; /* new status of async operation */
653 unsigned int total; /* bytes transferred */
654 } async_io;
655 struct
657 enum apc_type type; /* APC_VIRTUAL_ALLOC */
658 unsigned int status; /* status returned by call */
659 client_ptr_t addr; /* resulting address */
660 mem_size_t size; /* resulting size */
661 } virtual_alloc;
662 struct
664 enum apc_type type; /* APC_VIRTUAL_ALLOC_EX */
665 unsigned int status; /* status returned by call */
666 client_ptr_t addr; /* resulting address */
667 mem_size_t size; /* resulting size */
668 } virtual_alloc_ex;
669 struct
671 enum apc_type type; /* APC_VIRTUAL_FREE */
672 unsigned int status; /* status returned by call */
673 client_ptr_t addr; /* resulting address */
674 mem_size_t size; /* resulting size */
675 } virtual_free;
676 struct
678 enum apc_type type; /* APC_VIRTUAL_QUERY */
679 unsigned int status; /* status returned by call */
680 client_ptr_t base; /* resulting base address */
681 client_ptr_t alloc_base;/* resulting allocation base */
682 mem_size_t size; /* resulting region size */
683 unsigned short state; /* resulting region state */
684 unsigned short prot; /* resulting region protection */
685 unsigned short alloc_prot;/* resulting allocation protection */
686 unsigned short alloc_type;/* resulting region allocation type */
687 } virtual_query;
688 struct
690 enum apc_type type; /* APC_VIRTUAL_PROTECT */
691 unsigned int status; /* status returned by call */
692 client_ptr_t addr; /* resulting address */
693 mem_size_t size; /* resulting size */
694 unsigned int prot; /* old protection flags */
695 } virtual_protect;
696 struct
698 enum apc_type type; /* APC_VIRTUAL_FLUSH */
699 unsigned int status; /* status returned by call */
700 client_ptr_t addr; /* resulting address */
701 mem_size_t size; /* resulting size */
702 } virtual_flush;
703 struct
705 enum apc_type type; /* APC_VIRTUAL_LOCK */
706 unsigned int status; /* status returned by call */
707 client_ptr_t addr; /* resulting address */
708 mem_size_t size; /* resulting size */
709 } virtual_lock;
710 struct
712 enum apc_type type; /* APC_VIRTUAL_UNLOCK */
713 unsigned int status; /* status returned by call */
714 client_ptr_t addr; /* resulting address */
715 mem_size_t size; /* resulting size */
716 } virtual_unlock;
717 struct
719 enum apc_type type; /* APC_MAP_VIEW */
720 unsigned int status; /* status returned by call */
721 client_ptr_t addr; /* resulting address */
722 mem_size_t size; /* resulting size */
723 } map_view;
724 struct
726 enum apc_type type; /* APC_MAP_VIEW_EX */
727 unsigned int status; /* status returned by call */
728 client_ptr_t addr; /* resulting address */
729 mem_size_t size; /* resulting size */
730 } map_view_ex;
731 struct
733 enum apc_type type; /* APC_UNMAP_VIEW */
734 unsigned int status; /* status returned by call */
735 } unmap_view;
736 struct
738 enum apc_type type; /* APC_CREATE_THREAD */
739 unsigned int status; /* status returned by call */
740 process_id_t pid; /* process id */
741 thread_id_t tid; /* thread id */
742 client_ptr_t teb; /* thread teb (in process address space) */
743 obj_handle_t handle; /* handle to new thread */
744 } create_thread;
745 struct
747 enum apc_type type; /* APC_DUP_HANDLE */
748 unsigned int status; /* status returned by call */
749 obj_handle_t handle; /* duplicated handle in dst process */
750 } dup_handle;
751 struct
753 enum apc_type type; /* APC_BREAK_PROCESS */
754 unsigned int status; /* status returned by call */
755 } break_process;
756 } apc_result_t;
758 enum irp_type
760 IRP_CALL_NONE,
761 IRP_CALL_CREATE,
762 IRP_CALL_CLOSE,
763 IRP_CALL_READ,
764 IRP_CALL_WRITE,
765 IRP_CALL_FLUSH,
766 IRP_CALL_IOCTL,
767 IRP_CALL_VOLUME,
768 IRP_CALL_FREE,
769 IRP_CALL_CANCEL
772 typedef union
774 enum irp_type type; /* irp call type */
775 struct
777 enum irp_type type; /* IRP_CALL_CREATE */
778 unsigned int access; /* access rights */
779 unsigned int sharing; /* sharing flags */
780 unsigned int options; /* file options */
781 client_ptr_t device; /* opaque ptr for the device */
782 obj_handle_t file; /* file handle */
783 } create;
784 struct
786 enum irp_type type; /* IRP_CALL_CLOSE */
787 int __pad;
788 client_ptr_t file; /* opaque ptr for the file object */
789 } close;
790 struct
792 enum irp_type type; /* IRP_CALL_READ */
793 unsigned int key; /* driver key */
794 data_size_t out_size; /* needed output size */
795 int __pad;
796 client_ptr_t file; /* opaque ptr for the file object */
797 file_pos_t pos; /* file position */
798 } read;
799 struct
801 enum irp_type type; /* IRP_CALL_WRITE */
802 unsigned int key; /* driver key */
803 client_ptr_t file; /* opaque ptr for the file object */
804 file_pos_t pos; /* file position */
805 } write;
806 struct
808 enum irp_type type; /* IRP_CALL_FLUSH */
809 int __pad;
810 client_ptr_t file; /* opaque ptr for the file object */
811 } flush;
812 struct
814 enum irp_type type; /* IRP_CALL_IOCTL */
815 ioctl_code_t code; /* ioctl code */
816 data_size_t out_size; /* needed output size */
817 int __pad;
818 client_ptr_t file; /* opaque ptr for the file object */
819 } ioctl;
820 struct
822 enum irp_type type; /* IRP_CALL_VOLUME */
823 unsigned int info_class;/* information class */
824 data_size_t out_size; /* needed output size */
825 int __pad;
826 client_ptr_t file; /* opaque ptr for the file object */
827 } volume;
828 struct
830 enum irp_type type; /* IRP_CALL_FREE */
831 int __pad;
832 client_ptr_t obj; /* opaque ptr for the freed object */
833 } free;
834 struct
836 enum irp_type type; /* IRP_CALL_CANCEL */
837 int __pad;
838 client_ptr_t irp; /* opaque ptr for canceled irp */
839 } cancel;
840 } irp_params_t;
842 /* information about a PE image mapping, roughly equivalent to SECTION_IMAGE_INFORMATION */
843 typedef struct
845 client_ptr_t base;
846 client_ptr_t map_addr;
847 mem_size_t stack_size;
848 mem_size_t stack_commit;
849 unsigned int entry_point;
850 unsigned int map_size;
851 unsigned int zerobits;
852 unsigned int subsystem;
853 unsigned short subsystem_minor;
854 unsigned short subsystem_major;
855 unsigned short osversion_major;
856 unsigned short osversion_minor;
857 unsigned short image_charact;
858 unsigned short dll_charact;
859 unsigned short machine;
860 unsigned char contains_code : 1;
861 unsigned char wine_builtin : 1;
862 unsigned char wine_fakedll : 1;
863 unsigned char padding : 5;
864 unsigned char image_flags;
865 unsigned int loader_flags;
866 unsigned int header_size;
867 unsigned int file_size;
868 unsigned int checksum;
869 unsigned int dbg_offset;
870 unsigned int dbg_size;
871 } pe_image_info_t;
872 #define IMAGE_FLAGS_ComPlusNativeReady 0x01
873 #define IMAGE_FLAGS_ComPlusILOnly 0x02
874 #define IMAGE_FLAGS_ImageDynamicallyRelocated 0x04
875 #define IMAGE_FLAGS_ImageMappedFlat 0x08
876 #define IMAGE_FLAGS_BaseBelow4gb 0x10
877 #define IMAGE_FLAGS_ComPlusPrefer32bit 0x20
879 struct rawinput_device
881 unsigned short usage_page;
882 unsigned short usage;
883 unsigned int flags;
884 user_handle_t target;
887 typedef struct
889 int x;
890 int y;
891 unsigned int time;
892 int __pad;
893 lparam_t info;
894 } cursor_pos_t;
896 /****************************************************************/
897 /* Request declarations */
899 /* Create a new process from the context of the parent */
900 @REQ(new_process)
901 obj_handle_t token; /* process token */
902 obj_handle_t debug; /* process debug object */
903 obj_handle_t parent_process; /* parent process */
904 unsigned int flags; /* process creation flags */
905 int socket_fd; /* file descriptor for process socket */
906 unsigned int access; /* access rights for process object */
907 unsigned short machine; /* architecture that the new process will use */
908 data_size_t info_size; /* size of startup info */
909 data_size_t handles_size; /* length of explicit handles list */
910 data_size_t jobs_size; /* length of jobs list */
911 VARARG(objattr,object_attributes); /* object attributes */
912 VARARG(handles,uints,handles_size); /* handles list */
913 VARARG(jobs,uints,jobs_size); /* jobs list */
914 VARARG(info,startup_info,info_size); /* startup information */
915 VARARG(env,unicode_str); /* environment for new process */
916 @REPLY
917 obj_handle_t info; /* new process info handle */
918 process_id_t pid; /* process id */
919 obj_handle_t handle; /* process handle (in the current process) */
920 @END
923 /* Retrieve information about a newly started process */
924 @REQ(get_new_process_info)
925 obj_handle_t info; /* info handle returned from new_process_request */
926 @REPLY
927 int success; /* did the process start successfully? */
928 int exit_code; /* process exit code if failed */
929 @END
932 /* Create a new thread */
933 @REQ(new_thread)
934 obj_handle_t process; /* process in which to create thread */
935 unsigned int access; /* wanted access rights */
936 unsigned int flags; /* thread creation flags */
937 int request_fd; /* fd for request pipe */
938 VARARG(objattr,object_attributes); /* object attributes */
939 @REPLY
940 thread_id_t tid; /* thread id */
941 obj_handle_t handle; /* thread handle (in the current process) */
942 @END
945 /* Retrieve the new process startup info */
946 @REQ(get_startup_info)
947 @REPLY
948 data_size_t info_size; /* size of startup info */
949 unsigned short machine; /* architecture for the new process */
950 VARARG(info,startup_info,info_size); /* startup information */
951 VARARG(env,unicode_str); /* environment */
952 @END
955 /* Signal the end of the process initialization */
956 @REQ(init_process_done)
957 client_ptr_t teb; /* TEB of new thread (in process address space) */
958 client_ptr_t peb; /* PEB of new process (in process address space) */
959 client_ptr_t ldt_copy; /* address of LDT copy (in process address space) */
960 @REPLY
961 client_ptr_t entry; /* process entry point */
962 int suspend; /* is process suspended? */
963 @END
966 /* Initialize the first thread of a new process */
967 @REQ(init_first_thread)
968 int unix_pid; /* Unix pid of new process */
969 int unix_tid; /* Unix tid of new thread */
970 int debug_level; /* new debug level */
971 int reply_fd; /* fd for reply pipe */
972 int wait_fd; /* fd for blocking calls pipe */
973 @REPLY
974 process_id_t pid; /* process id of the new thread's process */
975 thread_id_t tid; /* thread id of the new thread */
976 timeout_t server_start; /* server start time */
977 unsigned int session_id; /* process session id */
978 data_size_t info_size; /* total size of startup info */
979 VARARG(machines,ushorts); /* array of supported machines */
980 @END
983 /* Initialize a new thread; called from the child after pthread_create() */
984 @REQ(init_thread)
985 int unix_tid; /* Unix tid of new thread */
986 int reply_fd; /* fd for reply pipe */
987 int wait_fd; /* fd for blocking calls pipe */
988 client_ptr_t teb; /* TEB of new thread (in thread address space) */
989 client_ptr_t entry; /* entry point (in thread address space) */
990 @REPLY
991 int suspend; /* is thread suspended? */
992 @END
995 /* Terminate a process */
996 @REQ(terminate_process)
997 obj_handle_t handle; /* process handle to terminate */
998 int exit_code; /* process exit code */
999 @REPLY
1000 int self; /* suicide? */
1001 @END
1004 /* Terminate a thread */
1005 @REQ(terminate_thread)
1006 obj_handle_t handle; /* thread handle to terminate */
1007 int exit_code; /* thread exit code */
1008 @REPLY
1009 int self; /* suicide? */
1010 @END
1013 /* Retrieve information about a process */
1014 @REQ(get_process_info)
1015 obj_handle_t handle; /* process handle */
1016 @REPLY
1017 process_id_t pid; /* server process id */
1018 process_id_t ppid; /* server process id of parent */
1019 affinity_t affinity; /* process affinity mask */
1020 client_ptr_t peb; /* PEB address in process address space */
1021 timeout_t start_time; /* process start time */
1022 timeout_t end_time; /* process end time */
1023 unsigned int session_id; /* process session id */
1024 int exit_code; /* process exit code */
1025 int priority; /* priority class */
1026 unsigned short machine; /* process architecture */
1027 VARARG(image,pe_image_info); /* image info for main exe */
1028 @END
1031 /* Retrieve debug information about a process */
1032 @REQ(get_process_debug_info)
1033 obj_handle_t handle; /* process handle */
1034 @REPLY
1035 obj_handle_t debug; /* handle to debug port */
1036 int debug_children; /* inherit debugger to child processes */
1037 VARARG(image,pe_image_info); /* image info for main exe */
1038 @END
1041 /* Fetch the name of the process image */
1042 @REQ(get_process_image_name)
1043 obj_handle_t handle; /* process handle */
1044 int win32; /* return a win32 filename? */
1045 @REPLY
1046 data_size_t len; /* len in bytes required to store filename */
1047 VARARG(name,unicode_str); /* image name for main exe */
1048 @END
1051 /* Retrieve information about a process memory usage */
1052 @REQ(get_process_vm_counters)
1053 obj_handle_t handle; /* process handle */
1054 @REPLY
1055 mem_size_t peak_virtual_size; /* peak virtual memory in bytes */
1056 mem_size_t virtual_size; /* virtual memory in bytes */
1057 mem_size_t peak_working_set_size; /* peak real memory in bytes */
1058 mem_size_t working_set_size; /* real memory in bytes */
1059 mem_size_t pagefile_usage; /* commit charge in bytes */
1060 mem_size_t peak_pagefile_usage; /* peak commit charge in bytes */
1061 @END
1064 /* Set a process information */
1065 @REQ(set_process_info)
1066 obj_handle_t handle; /* process handle */
1067 int mask; /* setting mask (see below) */
1068 int priority; /* priority class */
1069 affinity_t affinity; /* affinity mask */
1070 @END
1071 #define SET_PROCESS_INFO_PRIORITY 0x01
1072 #define SET_PROCESS_INFO_AFFINITY 0x02
1075 /* Retrieve information about a thread */
1076 @REQ(get_thread_info)
1077 obj_handle_t handle; /* thread handle */
1078 unsigned int access; /* required access rights */
1079 @REPLY
1080 process_id_t pid; /* server process id */
1081 thread_id_t tid; /* server thread id */
1082 client_ptr_t teb; /* thread teb pointer */
1083 client_ptr_t entry_point; /* thread entry point */
1084 affinity_t affinity; /* thread affinity mask */
1085 int exit_code; /* thread exit code */
1086 int priority; /* thread priority level */
1087 int last; /* last thread in process */
1088 int suspend_count; /* thread suspend count */
1089 unsigned int flags; /* GET_THREAD_INFO_FLAG_ flags */
1090 data_size_t desc_len; /* description length in bytes */
1091 VARARG(desc,unicode_str); /* description string */
1092 @END
1093 #define GET_THREAD_INFO_FLAG_DBG_HIDDEN 0x01
1094 #define GET_THREAD_INFO_FLAG_TERMINATED 0x02
1097 /* Retrieve information about thread times */
1098 @REQ(get_thread_times)
1099 obj_handle_t handle; /* thread handle */
1100 @REPLY
1101 timeout_t creation_time; /* thread creation time */
1102 timeout_t exit_time; /* thread exit time */
1103 int unix_pid; /* thread native pid */
1104 int unix_tid; /* thread native pid */
1105 @END
1108 /* Set a thread information */
1109 @REQ(set_thread_info)
1110 obj_handle_t handle; /* thread handle */
1111 int mask; /* setting mask (see below) */
1112 int priority; /* priority class */
1113 affinity_t affinity; /* affinity mask */
1114 client_ptr_t entry_point; /* thread entry point */
1115 obj_handle_t token; /* impersonation token */
1116 VARARG(desc,unicode_str); /* description string */
1117 @END
1118 #define SET_THREAD_INFO_PRIORITY 0x01
1119 #define SET_THREAD_INFO_AFFINITY 0x02
1120 #define SET_THREAD_INFO_TOKEN 0x04
1121 #define SET_THREAD_INFO_ENTRYPOINT 0x08
1122 #define SET_THREAD_INFO_DESCRIPTION 0x10
1123 #define SET_THREAD_INFO_DBG_HIDDEN 0x20
1126 /* Suspend a thread */
1127 @REQ(suspend_thread)
1128 obj_handle_t handle; /* thread handle */
1129 @REPLY
1130 int count; /* new suspend count */
1131 @END
1134 /* Resume a thread */
1135 @REQ(resume_thread)
1136 obj_handle_t handle; /* thread handle */
1137 @REPLY
1138 int count; /* new suspend count */
1139 @END
1142 /* Queue an APC for a thread or process */
1143 @REQ(queue_apc)
1144 obj_handle_t handle; /* thread or process handle */
1145 VARARG(call,apc_call); /* call arguments */
1146 @REPLY
1147 obj_handle_t handle; /* APC handle */
1148 int self; /* run APC in caller itself? */
1149 @END
1152 /* Get the result of an APC call */
1153 @REQ(get_apc_result)
1154 obj_handle_t handle; /* handle to the APC */
1155 @REPLY
1156 apc_result_t result; /* result of the APC */
1157 @END
1160 /* Close a handle for the current process */
1161 @REQ(close_handle)
1162 obj_handle_t handle; /* handle to close */
1163 @END
1166 /* Set a handle information */
1167 @REQ(set_handle_info)
1168 obj_handle_t handle; /* handle we are interested in */
1169 int flags; /* new handle flags */
1170 int mask; /* mask for flags to set */
1171 @REPLY
1172 int old_flags; /* old flag value */
1173 @END
1176 /* Duplicate a handle */
1177 @REQ(dup_handle)
1178 obj_handle_t src_process; /* src process handle */
1179 obj_handle_t src_handle; /* src handle to duplicate */
1180 obj_handle_t dst_process; /* dst process handle */
1181 unsigned int access; /* wanted access rights */
1182 unsigned int attributes; /* object attributes */
1183 unsigned int options; /* duplicate options */
1184 @REPLY
1185 obj_handle_t handle; /* duplicated handle in dst process */
1186 @END
1189 /* Test if two handles refer to the same object */
1190 @REQ(compare_objects)
1191 obj_handle_t first; /* first object handle */
1192 obj_handle_t second; /* second object handle */
1193 @END
1196 /* Make an object temporary */
1197 @REQ(make_temporary)
1198 obj_handle_t handle; /* handle to the object */
1199 @END
1202 /* Open a handle to a process */
1203 @REQ(open_process)
1204 process_id_t pid; /* process id to open */
1205 unsigned int access; /* wanted access rights */
1206 unsigned int attributes; /* object attributes */
1207 @REPLY
1208 obj_handle_t handle; /* handle to the process */
1209 @END
1212 /* Open a handle to a thread */
1213 @REQ(open_thread)
1214 thread_id_t tid; /* thread id to open */
1215 unsigned int access; /* wanted access rights */
1216 unsigned int attributes; /* object attributes */
1217 @REPLY
1218 obj_handle_t handle; /* handle to the thread */
1219 @END
1222 /* Wait for handles */
1223 @REQ(select)
1224 int flags; /* wait flags (see below) */
1225 client_ptr_t cookie; /* magic cookie to return to client */
1226 abstime_t timeout; /* timeout */
1227 data_size_t size; /* size of select_op */
1228 obj_handle_t prev_apc; /* handle to previous APC */
1229 VARARG(result,apc_result); /* result of previous APC */
1230 VARARG(data,select_op,size); /* operation-specific data */
1231 VARARG(contexts,contexts); /* suspend context(s) */
1232 @REPLY
1233 obj_handle_t apc_handle; /* handle to next APC */
1234 int signaled; /* were the handles immediately signaled? */
1235 VARARG(call,apc_call); /* APC call arguments */
1236 VARARG(contexts,contexts); /* suspend context(s) */
1237 @END
1238 #define SELECT_ALERTABLE 1
1239 #define SELECT_INTERRUPTIBLE 2
1242 /* Create an event */
1243 @REQ(create_event)
1244 unsigned int access; /* wanted access rights */
1245 int manual_reset; /* manual reset event */
1246 int initial_state; /* initial state of the event */
1247 VARARG(objattr,object_attributes); /* object attributes */
1248 @REPLY
1249 obj_handle_t handle; /* handle to the event */
1250 @END
1252 /* Event operation */
1253 @REQ(event_op)
1254 obj_handle_t handle; /* handle to event */
1255 int op; /* event operation (see below) */
1256 @REPLY
1257 int state; /* previous state */
1258 @END
1259 enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT };
1261 @REQ(query_event)
1262 obj_handle_t handle; /* handle to event */
1263 @REPLY
1264 int manual_reset; /* manual reset event */
1265 int state; /* current state of the event */
1266 @END
1268 /* Open an event */
1269 @REQ(open_event)
1270 unsigned int access; /* wanted access rights */
1271 unsigned int attributes; /* object attributes */
1272 obj_handle_t rootdir; /* root directory */
1273 VARARG(name,unicode_str); /* object name */
1274 @REPLY
1275 obj_handle_t handle; /* handle to the event */
1276 @END
1279 /* Create a keyed event */
1280 @REQ(create_keyed_event)
1281 unsigned int access; /* wanted access rights */
1282 VARARG(objattr,object_attributes); /* object attributes */
1283 @REPLY
1284 obj_handle_t handle; /* handle to the event */
1285 @END
1287 /* Open a keyed event */
1288 @REQ(open_keyed_event)
1289 unsigned int access; /* wanted access rights */
1290 unsigned int attributes; /* object attributes */
1291 obj_handle_t rootdir; /* root directory */
1292 VARARG(name,unicode_str); /* object name */
1293 @REPLY
1294 obj_handle_t handle; /* handle to the event */
1295 @END
1298 /* Create a mutex */
1299 @REQ(create_mutex)
1300 unsigned int access; /* wanted access rights */
1301 int owned; /* initially owned? */
1302 VARARG(objattr,object_attributes); /* object attributes */
1303 @REPLY
1304 obj_handle_t handle; /* handle to the mutex */
1305 @END
1308 /* Release a mutex */
1309 @REQ(release_mutex)
1310 obj_handle_t handle; /* handle to the mutex */
1311 @REPLY
1312 unsigned int prev_count; /* value of internal counter, before release */
1313 @END
1316 /* Open a mutex */
1317 @REQ(open_mutex)
1318 unsigned int access; /* wanted access rights */
1319 unsigned int attributes; /* object attributes */
1320 obj_handle_t rootdir; /* root directory */
1321 VARARG(name,unicode_str); /* object name */
1322 @REPLY
1323 obj_handle_t handle; /* handle to the mutex */
1324 @END
1327 /* Query a mutex */
1328 @REQ(query_mutex)
1329 obj_handle_t handle; /* handle to mutex */
1330 @REPLY
1331 unsigned int count; /* current count of mutex */
1332 int owned; /* true if owned by current thread */
1333 int abandoned; /* true if abandoned */
1334 @END
1337 /* Create a semaphore */
1338 @REQ(create_semaphore)
1339 unsigned int access; /* wanted access rights */
1340 unsigned int initial; /* initial count */
1341 unsigned int max; /* maximum count */
1342 VARARG(objattr,object_attributes); /* object attributes */
1343 @REPLY
1344 obj_handle_t handle; /* handle to the semaphore */
1345 @END
1348 /* Release a semaphore */
1349 @REQ(release_semaphore)
1350 obj_handle_t handle; /* handle to the semaphore */
1351 unsigned int count; /* count to add to semaphore */
1352 @REPLY
1353 unsigned int prev_count; /* previous semaphore count */
1354 @END
1356 @REQ(query_semaphore)
1357 obj_handle_t handle; /* handle to the semaphore */
1358 @REPLY
1359 unsigned int current; /* current count */
1360 unsigned int max; /* maximum count */
1361 @END
1363 /* Open a semaphore */
1364 @REQ(open_semaphore)
1365 unsigned int access; /* wanted access rights */
1366 unsigned int attributes; /* object attributes */
1367 obj_handle_t rootdir; /* root directory */
1368 VARARG(name,unicode_str); /* object name */
1369 @REPLY
1370 obj_handle_t handle; /* handle to the semaphore */
1371 @END
1374 /* Create a file */
1375 @REQ(create_file)
1376 unsigned int access; /* wanted access rights */
1377 unsigned int sharing; /* sharing flags */
1378 int create; /* file create action */
1379 unsigned int options; /* file options */
1380 unsigned int attrs; /* file attributes for creation */
1381 VARARG(objattr,object_attributes); /* object attributes */
1382 VARARG(filename,string); /* file name */
1383 @REPLY
1384 obj_handle_t handle; /* handle to the file */
1385 @END
1388 /* Open a file object */
1389 @REQ(open_file_object)
1390 unsigned int access; /* wanted access rights */
1391 unsigned int attributes; /* open attributes */
1392 obj_handle_t rootdir; /* root directory */
1393 unsigned int sharing; /* sharing flags */
1394 unsigned int options; /* file options */
1395 VARARG(filename,unicode_str); /* file name */
1396 @REPLY
1397 obj_handle_t handle; /* handle to the file */
1398 @END
1401 /* Allocate a file handle for a Unix fd */
1402 @REQ(alloc_file_handle)
1403 unsigned int access; /* wanted access rights */
1404 unsigned int attributes; /* object attributes */
1405 int fd; /* file descriptor on the client side */
1406 @REPLY
1407 obj_handle_t handle; /* handle to the file */
1408 @END
1411 /* Get the Unix name from a file handle */
1412 @REQ(get_handle_unix_name)
1413 obj_handle_t handle; /* file handle */
1414 @REPLY
1415 data_size_t name_len; /* unix name length */
1416 VARARG(name,string); /* unix name */
1417 @END
1420 /* Get a Unix fd to access a file */
1421 @REQ(get_handle_fd)
1422 obj_handle_t handle; /* handle to the file */
1423 @REPLY
1424 int type; /* file type (see below) */
1425 int cacheable; /* can fd be cached in the client? */
1426 unsigned int access; /* file access rights */
1427 unsigned int options; /* file open options */
1428 @END
1429 enum server_fd_type
1431 FD_TYPE_INVALID, /* invalid file (no associated fd) */
1432 FD_TYPE_FILE, /* regular file */
1433 FD_TYPE_DIR, /* directory */
1434 FD_TYPE_SOCKET, /* socket */
1435 FD_TYPE_SERIAL, /* serial port */
1436 FD_TYPE_PIPE, /* named pipe */
1437 FD_TYPE_MAILSLOT, /* mailslot */
1438 FD_TYPE_CHAR, /* unspecified char device */
1439 FD_TYPE_DEVICE, /* Windows device file */
1440 FD_TYPE_NB_TYPES
1444 /* Retrieve (or allocate) the client-side directory cache entry */
1445 @REQ(get_directory_cache_entry)
1446 obj_handle_t handle; /* handle to the directory */
1447 @REPLY
1448 int entry; /* cache entry on the client side */
1449 VARARG(free,ints); /* entries that can be freed */
1450 @END
1453 /* Flush a file buffers */
1454 @REQ(flush)
1455 async_data_t async; /* async I/O parameters */
1456 @REPLY
1457 obj_handle_t event; /* event set when finished */
1458 @END
1460 /* Query file information */
1461 @REQ(get_file_info)
1462 obj_handle_t handle; /* handle to the file */
1463 unsigned int info_class; /* queried information class */
1464 @REPLY
1465 VARARG(data,bytes); /* file info data */
1466 @END
1468 /* Query volume information */
1469 @REQ(get_volume_info)
1470 obj_handle_t handle; /* handle to the file */
1471 async_data_t async; /* async I/O parameters */
1472 unsigned int info_class; /* queried information class */
1473 @REPLY
1474 obj_handle_t wait; /* handle to wait on for blocking read */
1475 VARARG(data,bytes); /* volume info data */
1476 @END
1478 /* Lock a region of a file */
1479 @REQ(lock_file)
1480 obj_handle_t handle; /* handle to the file */
1481 file_pos_t offset; /* offset of start of lock */
1482 file_pos_t count; /* count of bytes to lock */
1483 int shared; /* shared or exclusive lock? */
1484 int wait; /* do we want to wait? */
1485 @REPLY
1486 obj_handle_t handle; /* handle to wait on */
1487 int overlapped; /* is it an overlapped I/O handle? */
1488 @END
1491 /* Unlock a region of a file */
1492 @REQ(unlock_file)
1493 obj_handle_t handle; /* handle to the file */
1494 file_pos_t offset; /* offset of start of unlock */
1495 file_pos_t count; /* count of bytes to unlock */
1496 @END
1499 /* Perform a recv on a socket */
1500 @REQ(recv_socket)
1501 int oob; /* are we receiving OOB data? */
1502 async_data_t async; /* async I/O parameters */
1503 int force_async; /* Force asynchronous mode? */
1504 @REPLY
1505 obj_handle_t wait; /* handle to wait on for blocking recv */
1506 unsigned int options; /* device open options */
1507 int nonblocking; /* is socket non-blocking? */
1508 @END
1511 /* Perform a send on a socket */
1512 @REQ(send_socket)
1513 async_data_t async; /* async I/O parameters */
1514 int force_async; /* Force asynchronous mode? */
1515 @REPLY
1516 obj_handle_t wait; /* handle to wait on for blocking send */
1517 unsigned int options; /* device open options */
1518 int nonblocking; /* is socket non-blocking? */
1519 @END
1522 /* Get socket event flags */
1523 @REQ(socket_get_events)
1524 obj_handle_t handle; /* socket handle */
1525 obj_handle_t event; /* event to reset */
1526 @REPLY
1527 unsigned int flags; /* event mask */
1528 VARARG(status,uints); /* array of status codes */
1529 @END
1532 /* Store ICMP id for ICMP over datagram fixup */
1533 @REQ(socket_send_icmp_id)
1534 obj_handle_t handle; /* socket handle */
1535 unsigned short icmp_id; /* ICMP packet id */
1536 unsigned short icmp_seq; /* ICMP packed sequence */
1537 @REPLY
1538 @END
1541 /* Get ICMP id for ICMP over datagram fixup */
1542 @REQ(socket_get_icmp_id)
1543 obj_handle_t handle; /* socket handle */
1544 unsigned short icmp_seq; /* ICMP packed sequence */
1545 @REPLY
1546 unsigned short icmp_id; /* ICMP packet id */
1547 @END
1550 /* Retrieve the next pending console ioctl request */
1551 @REQ(get_next_console_request)
1552 obj_handle_t handle; /* console server handle */
1553 int signal; /* server signal state */
1554 int read; /* 1 if reporting result of blocked read ioctl */
1555 unsigned int status; /* status of previous ioctl */
1556 VARARG(out_data,bytes); /* out_data of previous ioctl */
1557 @REPLY
1558 unsigned int code; /* ioctl code */
1559 unsigned int output; /* output id or 0 for input */
1560 data_size_t out_size; /* ioctl output size */
1561 VARARG(in_data,bytes); /* ioctl in_data */
1562 @END
1565 /* enable directory change notifications */
1566 @REQ(read_directory_changes)
1567 unsigned int filter; /* notification filter */
1568 int subtree; /* watch the subtree? */
1569 int want_data; /* flag indicating whether change data should be collected */
1570 async_data_t async; /* async I/O parameters */
1571 @END
1574 @REQ(read_change)
1575 obj_handle_t handle;
1576 @REPLY
1577 VARARG(events,filesystem_event); /* collected filesystem events */
1578 @END
1581 /* Create a file mapping */
1582 @REQ(create_mapping)
1583 unsigned int access; /* wanted access rights */
1584 unsigned int flags; /* SEC_* flags */
1585 unsigned int file_access; /* file access rights */
1586 mem_size_t size; /* mapping size */
1587 obj_handle_t file_handle; /* file handle */
1588 VARARG(objattr,object_attributes); /* object attributes */
1589 @REPLY
1590 obj_handle_t handle; /* handle to the mapping */
1591 @END
1594 /* Open a mapping */
1595 @REQ(open_mapping)
1596 unsigned int access; /* wanted access rights */
1597 unsigned int attributes; /* object attributes */
1598 obj_handle_t rootdir; /* root directory */
1599 VARARG(name,unicode_str); /* object name */
1600 @REPLY
1601 obj_handle_t handle; /* handle to the mapping */
1602 @END
1605 /* Get information about a file mapping */
1606 @REQ(get_mapping_info)
1607 obj_handle_t handle; /* handle to the mapping */
1608 unsigned int access; /* wanted access rights */
1609 @REPLY
1610 mem_size_t size; /* mapping size */
1611 unsigned int flags; /* SEC_* flags */
1612 obj_handle_t shared_file; /* shared mapping file handle */
1613 data_size_t total; /* total required buffer size in bytes */
1614 VARARG(image,pe_image_info);/* image info for SEC_IMAGE mappings */
1615 VARARG(name,unicode_str); /* filename for SEC_IMAGE mappings */
1616 @END
1619 /* Get the address to use to map an image mapping */
1620 @REQ(get_image_map_address)
1621 obj_handle_t handle; /* handle to the mapping */
1622 @REPLY
1623 client_ptr_t addr; /* map address */
1624 @END
1627 /* Add a memory view in the current process */
1628 @REQ(map_view)
1629 obj_handle_t mapping; /* file mapping handle */
1630 unsigned int access; /* wanted access rights */
1631 client_ptr_t base; /* view base address (page-aligned) */
1632 mem_size_t size; /* view size */
1633 file_pos_t start; /* start offset in mapping */
1634 @END
1637 /* Add a memory view for an image mapping in the current process */
1638 @REQ(map_image_view)
1639 obj_handle_t mapping; /* file mapping handle */
1640 client_ptr_t base; /* view base address (page-aligned) */
1641 mem_size_t size; /* view size */
1642 unsigned int entry; /* entry point in mapped view */
1643 unsigned short machine; /* machine in the mapped view */
1644 @END
1647 /* Add a memory view for a builtin dll in the current process */
1648 @REQ(map_builtin_view)
1649 VARARG(image,pe_image_info);/* image info */
1650 VARARG(name,unicode_str); /* image filename */
1651 @END
1654 /* Get information about a mapped image view */
1655 @REQ(get_image_view_info)
1656 obj_handle_t process; /* process handle */
1657 client_ptr_t addr; /* address inside mapped view (in process address space) */
1658 @REPLY
1659 client_ptr_t base; /* view base address */
1660 mem_size_t size; /* view size */
1661 @END
1664 /* Unmap a memory view from the current process */
1665 @REQ(unmap_view)
1666 client_ptr_t base; /* view base address */
1667 @END
1670 /* Get a range of committed pages in a file mapping */
1671 @REQ(get_mapping_committed_range)
1672 client_ptr_t base; /* view base address */
1673 file_pos_t offset; /* starting offset (page-aligned, in bytes) */
1674 @REPLY
1675 mem_size_t size; /* size of range starting at offset (page-aligned, in bytes) */
1676 int committed; /* whether it is a committed range */
1677 @END
1680 /* Add a range to the committed pages in a file mapping */
1681 @REQ(add_mapping_committed_range)
1682 client_ptr_t base; /* view base address */
1683 file_pos_t offset; /* starting offset (page-aligned, in bytes) */
1684 mem_size_t size; /* size to set (page-aligned, in bytes) or 0 if only retrieving */
1685 @END
1688 /* Check if two memory maps are for the same file */
1689 @REQ(is_same_mapping)
1690 client_ptr_t base1; /* first view base address */
1691 client_ptr_t base2; /* second view base address */
1692 @END
1695 /* Get the filename of a mapping */
1696 @REQ(get_mapping_filename)
1697 obj_handle_t process; /* process handle */
1698 client_ptr_t addr; /* address inside mapped view (in process address space) */
1699 @REPLY
1700 data_size_t len; /* total filename length in bytes */
1701 VARARG(filename,unicode_str); /* filename in NT format */
1702 @END
1705 struct thread_info
1707 timeout_t start_time;
1708 thread_id_t tid;
1709 int base_priority;
1710 int current_priority;
1711 int unix_tid;
1712 client_ptr_t teb;
1713 client_ptr_t entry_point;
1716 struct process_info
1718 timeout_t start_time;
1719 data_size_t name_len;
1720 int thread_count;
1721 int priority;
1722 process_id_t pid;
1723 process_id_t parent_pid;
1724 unsigned int session_id;
1725 int handle_count;
1726 int unix_pid;
1727 /* VARARG(name,unicode_str,name_len); */
1728 /* VARARG(threads,struct thread_info,thread_count); */
1731 /* Get a list of processes and threads currently running */
1732 @REQ(list_processes)
1733 @REPLY
1734 data_size_t info_size;
1735 int process_count;
1736 int total_thread_count;
1737 data_size_t total_name_len;
1738 VARARG(data,process_info,info_size);
1739 @END
1742 /* Create a debug object */
1743 @REQ(create_debug_obj)
1744 unsigned int access; /* wanted access rights */
1745 unsigned int flags; /* object flags */
1746 VARARG(objattr,object_attributes); /* object attributes */
1747 @REPLY
1748 obj_handle_t handle; /* handle to the debug object */
1749 @END
1752 /* Wait for a debug event */
1753 @REQ(wait_debug_event)
1754 obj_handle_t debug; /* debug object */
1755 @REPLY
1756 process_id_t pid; /* process id */
1757 thread_id_t tid; /* thread id */
1758 VARARG(event,debug_event); /* debug event data */
1759 @END
1762 /* Queue an exception event */
1763 @REQ(queue_exception_event)
1764 int first; /* first chance exception? */
1765 unsigned int code; /* exception code */
1766 unsigned int flags; /* exception flags */
1767 client_ptr_t record; /* exception record */
1768 client_ptr_t address; /* exception address */
1769 data_size_t len; /* size of parameters */
1770 VARARG(params,uints64,len);/* exception parameters */
1771 @REPLY
1772 obj_handle_t handle; /* handle to the queued event */
1773 @END
1776 /* Retrieve the status of an exception event */
1777 @REQ(get_exception_status)
1778 obj_handle_t handle; /* handle to the queued event */
1779 @END
1782 /* Continue a debug event */
1783 @REQ(continue_debug_event)
1784 obj_handle_t debug; /* debug object */
1785 process_id_t pid; /* process id to continue */
1786 thread_id_t tid; /* thread id to continue */
1787 unsigned int status; /* continuation status */
1788 @END
1791 /* Start or stop debugging an existing process */
1792 @REQ(debug_process)
1793 obj_handle_t handle; /* process handle */
1794 obj_handle_t debug; /* debug object to attach to the process */
1795 int attach; /* 1=attaching / 0=detaching from the process */
1796 @END
1799 /* Set debug object information */
1800 @REQ(set_debug_obj_info)
1801 obj_handle_t debug; /* debug object */
1802 unsigned int flags; /* object flags */
1803 @END
1806 /* Read data from a process address space */
1807 @REQ(read_process_memory)
1808 obj_handle_t handle; /* process handle */
1809 client_ptr_t addr; /* addr to read from */
1810 @REPLY
1811 VARARG(data,bytes); /* result data */
1812 @END
1815 /* Write data to a process address space */
1816 @REQ(write_process_memory)
1817 obj_handle_t handle; /* process handle */
1818 client_ptr_t addr; /* addr to write to */
1819 VARARG(data,bytes); /* data to write */
1820 @END
1823 /* Create a registry key */
1824 @REQ(create_key)
1825 unsigned int access; /* desired access rights */
1826 unsigned int options; /* creation options */
1827 VARARG(objattr,object_attributes); /* object attributes */
1828 VARARG(class,unicode_str); /* class name */
1829 @REPLY
1830 obj_handle_t hkey; /* handle to the created key */
1831 @END
1833 /* Open a registry key */
1834 @REQ(open_key)
1835 obj_handle_t parent; /* handle to the parent key */
1836 unsigned int access; /* desired access rights */
1837 unsigned int attributes; /* object attributes */
1838 VARARG(name,unicode_str); /* key name */
1839 @REPLY
1840 obj_handle_t hkey; /* handle to the open key */
1841 @END
1844 /* Delete a registry key */
1845 @REQ(delete_key)
1846 obj_handle_t hkey; /* handle to the key */
1847 @END
1850 /* Flush a registry key */
1851 @REQ(flush_key)
1852 obj_handle_t hkey; /* handle to the key */
1853 @END
1856 /* Enumerate registry subkeys */
1857 @REQ(enum_key)
1858 obj_handle_t hkey; /* handle to registry key */
1859 int index; /* index of subkey (or -1 for current key) */
1860 int info_class; /* requested information class */
1861 @REPLY
1862 int subkeys; /* number of subkeys */
1863 int max_subkey; /* longest subkey name */
1864 int max_class; /* longest class name */
1865 int values; /* number of values */
1866 int max_value; /* longest value name */
1867 int max_data; /* longest value data */
1868 timeout_t modif; /* last modification time */
1869 data_size_t total; /* total length needed for full name and class */
1870 data_size_t namelen; /* length of key name in bytes */
1871 VARARG(name,unicode_str,namelen); /* key name */
1872 VARARG(class,unicode_str); /* class name */
1873 @END
1876 /* Set a value of a registry key */
1877 @REQ(set_key_value)
1878 obj_handle_t hkey; /* handle to registry key */
1879 int type; /* value type */
1880 data_size_t namelen; /* length of value name in bytes */
1881 VARARG(name,unicode_str,namelen); /* value name */
1882 VARARG(data,bytes); /* value data */
1883 @END
1886 /* Retrieve the value of a registry key */
1887 @REQ(get_key_value)
1888 obj_handle_t hkey; /* handle to registry key */
1889 VARARG(name,unicode_str); /* value name */
1890 @REPLY
1891 int type; /* value type */
1892 data_size_t total; /* total length needed for data */
1893 VARARG(data,bytes); /* value data */
1894 @END
1897 /* Enumerate a value of a registry key */
1898 @REQ(enum_key_value)
1899 obj_handle_t hkey; /* handle to registry key */
1900 int index; /* value index */
1901 int info_class; /* requested information class */
1902 @REPLY
1903 int type; /* value type */
1904 data_size_t total; /* total length needed for full name and data */
1905 data_size_t namelen; /* length of value name in bytes */
1906 VARARG(name,unicode_str,namelen); /* value name */
1907 VARARG(data,bytes); /* value data */
1908 @END
1911 /* Delete a value of a registry key */
1912 @REQ(delete_key_value)
1913 obj_handle_t hkey; /* handle to registry key */
1914 VARARG(name,unicode_str); /* value name */
1915 @END
1918 /* Load a registry branch from a file */
1919 @REQ(load_registry)
1920 obj_handle_t file; /* file to load from */
1921 VARARG(objattr,object_attributes); /* object attributes */
1922 @END
1925 /* UnLoad a registry branch from a file */
1926 @REQ(unload_registry)
1927 obj_handle_t parent; /* handle to the parent key */
1928 unsigned int attributes; /* object attributes */
1929 VARARG(name,unicode_str); /* key name */
1930 @END
1933 /* Save a registry branch to a file */
1934 @REQ(save_registry)
1935 obj_handle_t hkey; /* key to save */
1936 obj_handle_t file; /* file to save to */
1937 @END
1940 /* Add a registry key change notification */
1941 @REQ(set_registry_notification)
1942 obj_handle_t hkey; /* key to watch for changes */
1943 obj_handle_t event; /* event to set */
1944 int subtree; /* should we watch the whole subtree? */
1945 unsigned int filter; /* things to watch */
1946 @END
1949 /* Rename a registry key */
1950 @REQ(rename_key)
1951 obj_handle_t hkey; /* handle to the key to be renamed */
1952 VARARG(name,unicode_str); /* new name */
1953 @END
1956 /* Create a waitable timer */
1957 @REQ(create_timer)
1958 unsigned int access; /* wanted access rights */
1959 int manual; /* manual reset */
1960 VARARG(objattr,object_attributes); /* object attributes */
1961 @REPLY
1962 obj_handle_t handle; /* handle to the timer */
1963 @END
1966 /* Open a waitable timer */
1967 @REQ(open_timer)
1968 unsigned int access; /* wanted access rights */
1969 unsigned int attributes; /* object attributes */
1970 obj_handle_t rootdir; /* root directory */
1971 VARARG(name,unicode_str); /* object name */
1972 @REPLY
1973 obj_handle_t handle; /* handle to the timer */
1974 @END
1976 /* Set a waitable timer */
1977 @REQ(set_timer)
1978 obj_handle_t handle; /* handle to the timer */
1979 timeout_t expire; /* next expiration absolute time */
1980 client_ptr_t callback; /* callback function */
1981 client_ptr_t arg; /* callback argument */
1982 int period; /* timer period in ms */
1983 @REPLY
1984 int signaled; /* was the timer signaled before this call ? */
1985 @END
1987 /* Cancel a waitable timer */
1988 @REQ(cancel_timer)
1989 obj_handle_t handle; /* handle to the timer */
1990 @REPLY
1991 int signaled; /* was the timer signaled before this calltime ? */
1992 @END
1994 /* Get information on a waitable timer */
1995 @REQ(get_timer_info)
1996 obj_handle_t handle; /* handle to the timer */
1997 @REPLY
1998 timeout_t when; /* absolute time when the timer next expires */
1999 int signaled; /* is the timer signaled? */
2000 @END
2003 /* Retrieve the current context of a thread */
2004 @REQ(get_thread_context)
2005 obj_handle_t handle; /* thread handle */
2006 obj_handle_t context; /* context handle */
2007 unsigned int flags; /* context flags */
2008 unsigned int native_flags; /* flags for native context if WoW present */
2009 unsigned short machine; /* context architecture */
2010 @REPLY
2011 int self; /* was it a handle to the current thread? */
2012 obj_handle_t handle; /* pending context handle */
2013 VARARG(contexts,contexts); /* thread context(s) */
2014 @END
2017 /* Set the current context of a thread */
2018 @REQ(set_thread_context)
2019 obj_handle_t handle; /* thread handle */
2020 unsigned int native_flags; /* flags for native context if WoW present */
2021 VARARG(contexts,contexts); /* thread context(s) */
2022 @REPLY
2023 int self; /* was it a handle to the current thread? */
2024 @END
2027 /* Fetch a selector entry for a thread */
2028 @REQ(get_selector_entry)
2029 obj_handle_t handle; /* thread handle */
2030 int entry; /* LDT entry */
2031 @REPLY
2032 unsigned int base; /* selector base */
2033 unsigned int limit; /* selector limit */
2034 unsigned char flags; /* selector flags */
2035 @END
2038 /* Add an atom */
2039 @REQ(add_atom)
2040 VARARG(name,unicode_str); /* atom name */
2041 @REPLY
2042 atom_t atom; /* resulting atom */
2043 @END
2046 /* Delete an atom */
2047 @REQ(delete_atom)
2048 atom_t atom; /* atom handle */
2049 @END
2052 /* Find an atom */
2053 @REQ(find_atom)
2054 VARARG(name,unicode_str); /* atom name */
2055 @REPLY
2056 atom_t atom; /* atom handle */
2057 @END
2060 /* Get information about an atom */
2061 @REQ(get_atom_information)
2062 atom_t atom; /* atom handle */
2063 @REPLY
2064 int count; /* atom lock count */
2065 int pinned; /* whether the atom has been pinned */
2066 data_size_t total; /* actual length of atom name */
2067 VARARG(name,unicode_str); /* atom name */
2068 @END
2071 /* Get the message queue of the current thread */
2072 @REQ(get_msg_queue)
2073 @REPLY
2074 obj_handle_t handle; /* handle to the queue */
2075 @END
2078 /* Set the file descriptor associated to the current thread queue */
2079 @REQ(set_queue_fd)
2080 obj_handle_t handle; /* handle to the file descriptor */
2081 @END
2084 /* Set the current message queue wakeup mask */
2085 @REQ(set_queue_mask)
2086 unsigned int wake_mask; /* wakeup bits mask */
2087 unsigned int changed_mask; /* changed bits mask */
2088 int skip_wait; /* will we skip waiting if signaled? */
2089 @REPLY
2090 unsigned int wake_bits; /* current wake bits */
2091 unsigned int changed_bits; /* current changed bits */
2092 @END
2095 /* Get the current message queue status */
2096 @REQ(get_queue_status)
2097 unsigned int clear_bits; /* should we clear the change bits? */
2098 @REPLY
2099 unsigned int wake_bits; /* wake bits */
2100 unsigned int changed_bits; /* changed bits since last time */
2101 @END
2104 /* Retrieve the process idle event */
2105 @REQ(get_process_idle_event)
2106 obj_handle_t handle; /* process handle */
2107 @REPLY
2108 obj_handle_t event; /* handle to idle event */
2109 @END
2112 /* Send a message to a thread queue */
2113 @REQ(send_message)
2114 thread_id_t id; /* thread id */
2115 int type; /* message type (see below) */
2116 int flags; /* message flags (see below) */
2117 user_handle_t win; /* window handle */
2118 unsigned int msg; /* message code */
2119 lparam_t wparam; /* parameters */
2120 lparam_t lparam; /* parameters */
2121 timeout_t timeout; /* timeout for reply */
2122 VARARG(data,message_data); /* message data for sent messages */
2123 @END
2125 @REQ(post_quit_message)
2126 int exit_code; /* exit code to return */
2127 @END
2129 enum message_type
2131 MSG_ASCII, /* Ascii message (from SendMessageA) */
2132 MSG_UNICODE, /* Unicode message (from SendMessageW) */
2133 MSG_NOTIFY, /* notify message (from SendNotifyMessageW), always Unicode */
2134 MSG_CALLBACK, /* callback message (from SendMessageCallbackW), always Unicode */
2135 MSG_CALLBACK_RESULT,/* result of a callback message */
2136 MSG_OTHER_PROCESS, /* sent from other process, may include vararg data, always Unicode */
2137 MSG_POSTED, /* posted message (from PostMessageW), always Unicode */
2138 MSG_HARDWARE, /* hardware message */
2139 MSG_WINEVENT, /* winevent message */
2140 MSG_HOOK_LL /* low-level hardware hook */
2142 #define SEND_MSG_ABORT_IF_HUNG 0x01
2145 /* Send a hardware message to a thread queue */
2146 @REQ(send_hardware_message)
2147 user_handle_t win; /* window handle */
2148 hw_input_t input; /* input data */
2149 unsigned int flags; /* flags (see below) */
2150 VARARG(report,bytes); /* HID report data */
2151 @REPLY
2152 int wait; /* do we need to wait for a reply? */
2153 int prev_x; /* previous cursor position */
2154 int prev_y;
2155 int new_x; /* new cursor position */
2156 int new_y;
2157 @END
2158 #define SEND_HWMSG_INJECTED 0x01
2161 /* Get a message from the current queue */
2162 @REQ(get_message)
2163 unsigned int flags; /* PM_* flags */
2164 user_handle_t get_win; /* window handle to get */
2165 unsigned int get_first; /* first message code to get */
2166 unsigned int get_last; /* last message code to get */
2167 unsigned int hw_id; /* id of the previous hardware message (or 0) */
2168 unsigned int wake_mask; /* wakeup bits mask */
2169 unsigned int changed_mask; /* changed bits mask */
2170 @REPLY
2171 user_handle_t win; /* window handle */
2172 unsigned int msg; /* message code */
2173 lparam_t wparam; /* parameters */
2174 lparam_t lparam; /* parameters */
2175 int type; /* message type */
2176 int x; /* message x position */
2177 int y; /* message y position */
2178 unsigned int time; /* message time */
2179 unsigned int active_hooks; /* active hooks bitmap */
2180 data_size_t total; /* total size of extra data */
2181 VARARG(data,message_data); /* message data for sent messages */
2182 @END
2185 /* Reply to a sent message */
2186 @REQ(reply_message)
2187 int remove; /* should we remove the message? */
2188 lparam_t result; /* message result */
2189 VARARG(data,bytes); /* message data for sent messages */
2190 @END
2193 /* Accept and remove the current hardware message */
2194 @REQ(accept_hardware_message)
2195 unsigned int hw_id; /* id of the hardware message */
2196 @END
2199 /* Retrieve the reply for the last message sent */
2200 @REQ(get_message_reply)
2201 int cancel; /* cancel message if not ready? */
2202 @REPLY
2203 lparam_t result; /* message result */
2204 VARARG(data,bytes); /* message data for sent messages */
2205 @END
2208 /* Set a window timer */
2209 @REQ(set_win_timer)
2210 user_handle_t win; /* window handle */
2211 unsigned int msg; /* message to post */
2212 unsigned int rate; /* timer rate in ms */
2213 lparam_t id; /* timer id */
2214 lparam_t lparam; /* message lparam (callback proc) */
2215 @REPLY
2216 lparam_t id; /* timer id */
2217 @END
2220 /* Kill a window timer */
2221 @REQ(kill_win_timer)
2222 user_handle_t win; /* window handle */
2223 lparam_t id; /* timer id */
2224 unsigned int msg; /* message to post */
2225 @END
2228 /* check if the thread owning the window is hung */
2229 @REQ(is_window_hung)
2230 user_handle_t win; /* window handle */
2231 @REPLY
2232 int is_hung;
2233 @END
2236 /* Retrieve info about a serial port */
2237 @REQ(get_serial_info)
2238 obj_handle_t handle; /* handle to comm port */
2239 int flags;
2240 @REPLY
2241 unsigned int eventmask;
2242 unsigned int cookie;
2243 unsigned int pending_write;
2244 @END
2247 /* Set info about a serial port */
2248 @REQ(set_serial_info)
2249 obj_handle_t handle; /* handle to comm port */
2250 int flags; /* bitmask to set values (see below) */
2251 @END
2252 #define SERIALINFO_PENDING_WRITE 0x04
2253 #define SERIALINFO_PENDING_WAIT 0x08
2255 /* Cancel all sync io on a thread */
2256 @REQ(cancel_sync)
2257 obj_handle_t handle; /* thread handle on which to cancel io */
2258 client_ptr_t iosb; /* I/O status block (NULL=all) */
2259 @END
2261 /* Create an async I/O */
2262 @REQ(register_async)
2263 int type; /* type of queue to look after */
2264 async_data_t async; /* async I/O parameters */
2265 int count; /* count - usually # of bytes to be read/written */
2266 @END
2267 #define ASYNC_TYPE_READ 0x01
2268 #define ASYNC_TYPE_WRITE 0x02
2269 #define ASYNC_TYPE_WAIT 0x03
2272 /* Cancel all async op on a fd */
2273 @REQ(cancel_async)
2274 obj_handle_t handle; /* handle to comm port, socket or file */
2275 client_ptr_t iosb; /* I/O status block (NULL=all) */
2276 int only_thread; /* cancel matching this thread */
2277 @END
2280 /* Retrieve results of an async */
2281 @REQ(get_async_result)
2282 client_ptr_t user_arg; /* user arg used to identify async */
2283 @REPLY
2284 VARARG(out_data,bytes); /* iosb output data */
2285 @END
2288 /* Notify direct completion of async and close the wait handle if not blocking */
2289 @REQ(set_async_direct_result)
2290 obj_handle_t handle; /* wait handle */
2291 apc_param_t information; /* IO_STATUS_BLOCK Information */
2292 unsigned int status; /* completion status */
2293 int mark_pending; /* set async to pending before completion? */
2294 @REPLY
2295 obj_handle_t handle; /* wait handle, or NULL if closed */
2296 @END
2299 /* Perform a read on a file object */
2300 @REQ(read)
2301 async_data_t async; /* async I/O parameters */
2302 file_pos_t pos; /* read position */
2303 @REPLY
2304 obj_handle_t wait; /* handle to wait on for blocking read */
2305 unsigned int options; /* device open options */
2306 VARARG(data,bytes); /* read data */
2307 @END
2310 /* Perform a write on a file object */
2311 @REQ(write)
2312 async_data_t async; /* async I/O parameters */
2313 file_pos_t pos; /* write position */
2314 VARARG(data,bytes); /* write data */
2315 @REPLY
2316 obj_handle_t wait; /* handle to wait on for blocking write */
2317 unsigned int options; /* device open options */
2318 data_size_t size; /* size written */
2319 @END
2322 /* Perform an ioctl on a file */
2323 @REQ(ioctl)
2324 ioctl_code_t code; /* ioctl code */
2325 async_data_t async; /* async I/O parameters */
2326 VARARG(in_data,bytes); /* ioctl input data */
2327 @REPLY
2328 obj_handle_t wait; /* handle to wait on for blocking ioctl */
2329 unsigned int options; /* device open options */
2330 VARARG(out_data,bytes); /* ioctl output data */
2331 @END
2334 /* Store results of an async irp */
2335 @REQ(set_irp_result)
2336 obj_handle_t handle; /* handle to the irp */
2337 unsigned int status; /* status of the irp */
2338 data_size_t size; /* result size (input or output depending on the operation) */
2339 VARARG(data,bytes); /* output data of the irp */
2340 @END
2343 /* Create a named pipe */
2344 @REQ(create_named_pipe)
2345 unsigned int access;
2346 unsigned int options;
2347 unsigned int sharing;
2348 unsigned int disposition;
2349 unsigned int maxinstances;
2350 unsigned int outsize;
2351 unsigned int insize;
2352 timeout_t timeout;
2353 unsigned int flags;
2354 VARARG(objattr,object_attributes); /* object attributes */
2355 @REPLY
2356 obj_handle_t handle; /* handle to the pipe */
2357 int created;
2358 @END
2360 /* flags in create_named_pipe and get_named_pipe_info */
2361 #define NAMED_PIPE_MESSAGE_STREAM_WRITE 0x0001
2362 #define NAMED_PIPE_MESSAGE_STREAM_READ 0x0002
2363 #define NAMED_PIPE_NONBLOCKING_MODE 0x0004
2364 #define NAMED_PIPE_SERVER_END 0x8000
2366 /* Set named pipe information by handle */
2367 @REQ(set_named_pipe_info)
2368 obj_handle_t handle;
2369 unsigned int flags;
2370 @END
2372 /* Create a window */
2373 @REQ(create_window)
2374 user_handle_t parent; /* parent window */
2375 user_handle_t owner; /* owner window */
2376 atom_t atom; /* class atom */
2377 mod_handle_t instance; /* module instance */
2378 int dpi; /* system DPI */
2379 int awareness; /* thread DPI awareness */
2380 unsigned int style; /* window style */
2381 unsigned int ex_style; /* window extended style */
2382 VARARG(class,unicode_str); /* class name */
2383 @REPLY
2384 user_handle_t handle; /* created window */
2385 user_handle_t parent; /* full handle of parent */
2386 user_handle_t owner; /* full handle of owner */
2387 int extra; /* number of extra bytes */
2388 client_ptr_t class_ptr; /* pointer to class in client address space */
2389 int dpi; /* window DPI if not per-monitor aware */
2390 int awareness; /* window DPI awareness */
2391 @END
2394 /* Destroy a window */
2395 @REQ(destroy_window)
2396 user_handle_t handle; /* handle to the window */
2397 @END
2400 /* Retrieve the desktop window for the current thread */
2401 @REQ(get_desktop_window)
2402 int force; /* force creation if it doesn't exist */
2403 @REPLY
2404 user_handle_t top_window; /* handle to the desktop window */
2405 user_handle_t msg_window; /* handle to the top-level HWND_MESSAGE parent */
2406 @END
2409 /* Set a window owner */
2410 @REQ(set_window_owner)
2411 user_handle_t handle; /* handle to the window */
2412 user_handle_t owner; /* new owner */
2413 @REPLY
2414 user_handle_t full_owner; /* full handle of new owner */
2415 user_handle_t prev_owner; /* full handle of previous owner */
2416 @END
2419 /* Get information from a window handle */
2420 @REQ(get_window_info)
2421 user_handle_t handle; /* handle to the window */
2422 @REPLY
2423 user_handle_t full_handle; /* full 32-bit handle */
2424 user_handle_t last_active; /* last active popup */
2425 process_id_t pid; /* process owning the window */
2426 thread_id_t tid; /* thread owning the window */
2427 atom_t atom; /* class atom */
2428 int is_unicode; /* ANSI or unicode */
2429 int dpi; /* window DPI */
2430 int awareness; /* DPI awareness */
2431 @END
2434 /* Set some information in a window */
2435 @REQ(set_window_info)
2436 unsigned short flags; /* flags for fields to set (see below) */
2437 short int is_unicode; /* ANSI or unicode */
2438 user_handle_t handle; /* handle to the window */
2439 unsigned int style; /* window style */
2440 unsigned int ex_style; /* window extended style */
2441 data_size_t extra_size; /* size to set in extra bytes */
2442 mod_handle_t instance; /* creator instance */
2443 lparam_t user_data; /* user-specific data */
2444 lparam_t extra_value; /* value to set in extra bytes or window id */
2445 int extra_offset; /* offset to set in extra bytes */
2446 @REPLY
2447 unsigned int old_style; /* old window style */
2448 unsigned int old_ex_style; /* old window extended style */
2449 mod_handle_t old_instance; /* old creator instance */
2450 lparam_t old_user_data; /* old user-specific data */
2451 lparam_t old_extra_value; /* old value in extra bytes */
2452 lparam_t old_id; /* old window id */
2453 @END
2454 #define SET_WIN_STYLE 0x01
2455 #define SET_WIN_EXSTYLE 0x02
2456 #define SET_WIN_ID 0x04
2457 #define SET_WIN_INSTANCE 0x08
2458 #define SET_WIN_USERDATA 0x10
2459 #define SET_WIN_EXTRA 0x20
2460 #define SET_WIN_UNICODE 0x40
2463 /* Set the parent of a window */
2464 @REQ(set_parent)
2465 user_handle_t handle; /* handle to the window */
2466 user_handle_t parent; /* handle to the parent */
2467 @REPLY
2468 user_handle_t old_parent; /* old parent window */
2469 user_handle_t full_parent; /* full handle of new parent */
2470 int dpi; /* new window DPI if not per-monitor aware */
2471 int awareness; /* new DPI awareness */
2472 @END
2475 /* Get a list of the window parents, up to the root of the tree */
2476 @REQ(get_window_parents)
2477 user_handle_t handle; /* handle to the window */
2478 @REPLY
2479 int count; /* total count of parents */
2480 VARARG(parents,user_handles); /* parent handles */
2481 @END
2484 /* Get a list of the window children */
2485 @REQ(get_window_children)
2486 obj_handle_t desktop; /* handle to desktop */
2487 user_handle_t parent; /* parent window */
2488 atom_t atom; /* class atom for the listed children */
2489 thread_id_t tid; /* thread owning the listed children */
2490 VARARG(class,unicode_str); /* class name */
2491 @REPLY
2492 int count; /* total count of children */
2493 VARARG(children,user_handles); /* children handles */
2494 @END
2497 /* Get a list of the window children that contain a given point */
2498 @REQ(get_window_children_from_point)
2499 user_handle_t parent; /* parent window */
2500 int x; /* point in parent coordinates */
2501 int y;
2502 int dpi; /* dpi for the point coordinates */
2503 @REPLY
2504 int count; /* total count of children */
2505 VARARG(children,user_handles); /* children handles */
2506 @END
2509 /* Get window tree information from a window handle */
2510 @REQ(get_window_tree)
2511 user_handle_t handle; /* handle to the window */
2512 @REPLY
2513 user_handle_t parent; /* parent window */
2514 user_handle_t owner; /* owner window */
2515 user_handle_t next_sibling; /* next sibling in Z-order */
2516 user_handle_t prev_sibling; /* prev sibling in Z-order */
2517 user_handle_t first_sibling; /* first sibling in Z-order */
2518 user_handle_t last_sibling; /* last sibling in Z-order */
2519 user_handle_t first_child; /* first child */
2520 user_handle_t last_child; /* last child */
2521 @END
2523 /* Set the position and Z order of a window */
2524 @REQ(set_window_pos)
2525 unsigned short swp_flags; /* SWP_* flags */
2526 unsigned short paint_flags; /* paint flags (see below) */
2527 user_handle_t handle; /* handle to the window */
2528 user_handle_t previous; /* previous window in Z order */
2529 rectangle_t window; /* window rectangle (in parent coords) */
2530 rectangle_t client; /* client rectangle (in parent coords) */
2531 VARARG(valid,rectangles); /* valid rectangles from WM_NCCALCSIZE (in parent coords) */
2532 @REPLY
2533 unsigned int new_style; /* new window style */
2534 unsigned int new_ex_style; /* new window extended style */
2535 user_handle_t surface_win; /* parent window that holds the surface */
2536 int needs_update; /* whether the surface region needs an update */
2537 @END
2538 #define SET_WINPOS_PAINT_SURFACE 0x01 /* window has a paintable surface */
2539 #define SET_WINPOS_PIXEL_FORMAT 0x02 /* window has a custom pixel format */
2541 /* Get the window and client rectangles of a window */
2542 @REQ(get_window_rectangles)
2543 user_handle_t handle; /* handle to the window */
2544 int relative; /* coords relative to (see below) */
2545 int dpi; /* DPI to map to, or zero for per-monitor DPI */
2546 @REPLY
2547 rectangle_t window; /* window rectangle */
2548 rectangle_t client; /* client rectangle */
2549 @END
2550 enum coords_relative
2552 COORDS_CLIENT, /* relative to client area */
2553 COORDS_WINDOW, /* relative to whole window area */
2554 COORDS_PARENT, /* relative to parent's client area */
2555 COORDS_SCREEN /* relative to screen origin */
2559 /* Get the window text */
2560 @REQ(get_window_text)
2561 user_handle_t handle; /* handle to the window */
2562 @REPLY
2563 data_size_t length; /* total length in WCHARs */
2564 VARARG(text,unicode_str); /* window text */
2565 @END
2568 /* Set the window text */
2569 @REQ(set_window_text)
2570 user_handle_t handle; /* handle to the window */
2571 VARARG(text,unicode_str); /* window text */
2572 @END
2575 /* Get the coordinates offset between two windows */
2576 @REQ(get_windows_offset)
2577 user_handle_t from; /* handle to the first window */
2578 user_handle_t to; /* handle to the second window */
2579 int dpi; /* DPI to map to, or zero for per-monitor DPI */
2580 @REPLY
2581 int x; /* x coordinate offset */
2582 int y; /* y coordinate offset */
2583 int mirror; /* whether to mirror the x coordinate */
2584 @END
2587 /* Get the visible region of a window */
2588 @REQ(get_visible_region)
2589 user_handle_t window; /* handle to the window */
2590 unsigned int flags; /* DCX flags */
2591 @REPLY
2592 user_handle_t top_win; /* top window to clip against */
2593 rectangle_t top_rect; /* top window visible rect with screen coords */
2594 rectangle_t win_rect; /* window rect in screen coords */
2595 unsigned int paint_flags; /* paint flags (from SET_WINPOS_* flags) */
2596 data_size_t total_size; /* total size of the resulting region */
2597 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2598 @END
2601 /* Get the visible surface region of a window */
2602 @REQ(get_surface_region)
2603 user_handle_t window; /* handle to the window */
2604 @REPLY
2605 rectangle_t visible_rect; /* window visible rect in screen coords */
2606 data_size_t total_size; /* total size of the resulting region */
2607 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2608 @END
2611 /* Get the window region */
2612 @REQ(get_window_region)
2613 user_handle_t window; /* handle to the window */
2614 @REPLY
2615 data_size_t total_size; /* total size of the resulting region */
2616 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2617 @END
2620 /* Set the window region */
2621 @REQ(set_window_region)
2622 user_handle_t window; /* handle to the window */
2623 int redraw; /* redraw the window? */
2624 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2625 @END
2628 /* Get the window update region */
2629 @REQ(get_update_region)
2630 user_handle_t window; /* handle to the window */
2631 user_handle_t from_child; /* child to start searching from */
2632 unsigned int flags; /* update flags (see below) */
2633 @REPLY
2634 user_handle_t child; /* child to repaint (or window itself) */
2635 unsigned int flags; /* resulting update flags (see below) */
2636 data_size_t total_size; /* total size of the resulting region */
2637 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2638 @END
2639 #define UPDATE_NONCLIENT 0x001 /* get region for repainting non-client area */
2640 #define UPDATE_ERASE 0x002 /* get region for erasing client area */
2641 #define UPDATE_PAINT 0x004 /* get region for painting client area */
2642 #define UPDATE_INTERNALPAINT 0x008 /* get region if internal paint is pending */
2643 #define UPDATE_ALLCHILDREN 0x010 /* force repaint of all children */
2644 #define UPDATE_NOCHILDREN 0x020 /* don't try to repaint any children */
2645 #define UPDATE_NOREGION 0x040 /* don't return a region, only the flags */
2646 #define UPDATE_DELAYED_ERASE 0x080 /* still needs erase after BeginPaint */
2647 #define UPDATE_CLIPCHILDREN 0x100 /* remove clipped children from the update region */
2650 /* Update the z order of a window so that a given rectangle is fully visible */
2651 @REQ(update_window_zorder)
2652 user_handle_t window; /* handle to the window */
2653 rectangle_t rect; /* rectangle that must be visible (in client coords) */
2654 @END
2657 /* Mark parts of a window as needing a redraw */
2658 @REQ(redraw_window)
2659 user_handle_t window; /* handle to the window */
2660 unsigned int flags; /* RDW_* flags */
2661 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2662 @END
2665 /* Set a window property */
2666 @REQ(set_window_property)
2667 user_handle_t window; /* handle to the window */
2668 lparam_t data; /* data to store */
2669 atom_t atom; /* property atom (if no name specified) */
2670 VARARG(name,unicode_str); /* property name */
2671 @END
2674 /* Remove a window property */
2675 @REQ(remove_window_property)
2676 user_handle_t window; /* handle to the window */
2677 atom_t atom; /* property atom (if no name specified) */
2678 VARARG(name,unicode_str); /* property name */
2679 @REPLY
2680 lparam_t data; /* data stored in property */
2681 @END
2684 /* Get a window property */
2685 @REQ(get_window_property)
2686 user_handle_t window; /* handle to the window */
2687 atom_t atom; /* property atom (if no name specified) */
2688 VARARG(name,unicode_str); /* property name */
2689 @REPLY
2690 lparam_t data; /* data stored in property */
2691 @END
2694 /* Get the list of properties of a window */
2695 @REQ(get_window_properties)
2696 user_handle_t window; /* handle to the window */
2697 @REPLY
2698 int total; /* total number of properties */
2699 VARARG(props,properties); /* list of properties */
2700 @END
2703 /* Create a window station */
2704 @REQ(create_winstation)
2705 unsigned int flags; /* window station flags */
2706 unsigned int access; /* wanted access rights */
2707 unsigned int attributes; /* object attributes */
2708 obj_handle_t rootdir; /* root directory */
2709 VARARG(name,unicode_str); /* object name */
2710 @REPLY
2711 obj_handle_t handle; /* handle to the window station */
2712 @END
2715 /* Open a handle to a window station */
2716 @REQ(open_winstation)
2717 unsigned int access; /* wanted access rights */
2718 unsigned int attributes; /* object attributes */
2719 obj_handle_t rootdir; /* root directory */
2720 VARARG(name,unicode_str); /* object name */
2721 @REPLY
2722 obj_handle_t handle; /* handle to the window station */
2723 @END
2726 /* Close a window station */
2727 @REQ(close_winstation)
2728 obj_handle_t handle; /* handle to the window station */
2729 @END
2732 /* Get the process current window station */
2733 @REQ(get_process_winstation)
2734 @REPLY
2735 obj_handle_t handle; /* handle to the window station */
2736 @END
2739 /* Set the process current window station */
2740 @REQ(set_process_winstation)
2741 obj_handle_t handle; /* handle to the window station */
2742 @END
2745 /* Enumerate window stations */
2746 @REQ(enum_winstation)
2747 unsigned int index; /* current index */
2748 @REPLY
2749 unsigned int next; /* next index */
2750 VARARG(name,unicode_str); /* window station name */
2751 @END
2754 /* Create a desktop */
2755 @REQ(create_desktop)
2756 unsigned int flags; /* desktop flags */
2757 unsigned int access; /* wanted access rights */
2758 unsigned int attributes; /* object attributes */
2759 VARARG(name,unicode_str); /* object name */
2760 @REPLY
2761 obj_handle_t handle; /* handle to the desktop */
2762 @END
2765 /* Open a handle to a desktop */
2766 @REQ(open_desktop)
2767 obj_handle_t winsta; /* window station to open (null allowed) */
2768 unsigned int flags; /* desktop flags */
2769 unsigned int access; /* wanted access rights */
2770 unsigned int attributes; /* object attributes */
2771 VARARG(name,unicode_str); /* object name */
2772 @REPLY
2773 obj_handle_t handle; /* handle to the desktop */
2774 @END
2777 /* Open a handle to current input desktop */
2778 @REQ(open_input_desktop)
2779 unsigned int flags; /* desktop flags */
2780 unsigned int access; /* wanted access rights */
2781 unsigned int attributes; /* object attributes */
2782 @REPLY
2783 obj_handle_t handle; /* handle to the desktop */
2784 @END
2787 /* Close a desktop */
2788 @REQ(close_desktop)
2789 obj_handle_t handle; /* handle to the desktop */
2790 @END
2793 /* Get the thread current desktop */
2794 @REQ(get_thread_desktop)
2795 thread_id_t tid; /* thread id */
2796 @REPLY
2797 obj_handle_t handle; /* handle to the desktop */
2798 @END
2801 /* Set the thread current desktop */
2802 @REQ(set_thread_desktop)
2803 obj_handle_t handle; /* handle to the desktop */
2804 @END
2807 /* Enumerate desktops */
2808 @REQ(enum_desktop)
2809 obj_handle_t winstation; /* handle to the window station */
2810 unsigned int index; /* current index */
2811 @REPLY
2812 unsigned int next; /* next index */
2813 VARARG(name,unicode_str); /* window station name */
2814 @END
2817 /* Get/set information about a user object (window station or desktop) */
2818 @REQ(set_user_object_info)
2819 obj_handle_t handle; /* handle to the object */
2820 unsigned int flags; /* information to set/get */
2821 unsigned int obj_flags; /* new object flags */
2822 @REPLY
2823 int is_desktop; /* is object a desktop? */
2824 unsigned int old_obj_flags; /* old object flags */
2825 VARARG(name,unicode_str); /* object name */
2826 @END
2827 #define SET_USER_OBJECT_SET_FLAGS 1
2828 #define SET_USER_OBJECT_GET_FULL_NAME 2
2831 /* Register a hotkey */
2832 @REQ(register_hotkey)
2833 user_handle_t window; /* handle to the window */
2834 int id; /* hotkey identifier */
2835 unsigned int flags; /* modifier keys */
2836 unsigned int vkey; /* virtual key code */
2837 @REPLY
2838 int replaced; /* did we replace an existing hotkey? */
2839 unsigned int flags; /* flags of replaced hotkey */
2840 unsigned int vkey; /* virtual key code of replaced hotkey */
2841 @END
2844 /* Unregister a hotkey */
2845 @REQ(unregister_hotkey)
2846 user_handle_t window; /* handle to the window */
2847 int id; /* hotkey identifier */
2848 @REPLY
2849 unsigned int flags; /* flags of removed hotkey */
2850 unsigned int vkey; /* virtual key code of removed hotkey */
2851 @END
2854 /* Attach (or detach) thread inputs */
2855 @REQ(attach_thread_input)
2856 thread_id_t tid_from; /* thread to be attached */
2857 thread_id_t tid_to; /* thread to which tid_from should be attached */
2858 int attach; /* is it an attach? */
2859 @END
2862 /* Get input data for a given thread */
2863 @REQ(get_thread_input)
2864 thread_id_t tid; /* id of thread */
2865 @REPLY
2866 user_handle_t focus; /* handle to the focus window */
2867 user_handle_t capture; /* handle to the capture window */
2868 user_handle_t active; /* handle to the active window */
2869 user_handle_t foreground; /* handle to the global foreground window */
2870 user_handle_t menu_owner; /* handle to the menu owner */
2871 user_handle_t move_size; /* handle to the moving/resizing window */
2872 user_handle_t caret; /* handle to the caret window */
2873 user_handle_t cursor; /* handle to the cursor */
2874 int show_count; /* cursor show count */
2875 rectangle_t rect; /* caret rectangle */
2876 @END
2879 /* Get the time of the last input event */
2880 @REQ(get_last_input_time)
2881 @REPLY
2882 unsigned int time;
2883 @END
2886 /* Retrieve queue keyboard state for current thread or global async state */
2887 @REQ(get_key_state)
2888 int async; /* whether to query the async state */
2889 int key; /* optional key code or -1 */
2890 @REPLY
2891 unsigned char state; /* state of specified key */
2892 VARARG(keystate,bytes); /* state array for all the keys */
2893 @END
2895 /* Set queue keyboard state for current thread */
2896 @REQ(set_key_state)
2897 int async; /* whether to change the async state too */
2898 VARARG(keystate,bytes); /* state array for all the keys */
2899 @END
2901 /* Set the system foreground window */
2902 @REQ(set_foreground_window)
2903 user_handle_t handle; /* handle to the foreground window */
2904 @REPLY
2905 user_handle_t previous; /* handle to the previous foreground window */
2906 int send_msg_old; /* whether we have to send a msg to the old window */
2907 int send_msg_new; /* whether we have to send a msg to the new window */
2908 @END
2910 /* Set the current thread focus window */
2911 @REQ(set_focus_window)
2912 user_handle_t handle; /* handle to the focus window */
2913 @REPLY
2914 user_handle_t previous; /* handle to the previous focus window */
2915 @END
2917 /* Set the current thread active window */
2918 @REQ(set_active_window)
2919 user_handle_t handle; /* handle to the active window */
2920 @REPLY
2921 user_handle_t previous; /* handle to the previous active window */
2922 @END
2924 /* Set the current thread capture window */
2925 @REQ(set_capture_window)
2926 user_handle_t handle; /* handle to the capture window */
2927 unsigned int flags; /* capture flags (see below) */
2928 @REPLY
2929 user_handle_t previous; /* handle to the previous capture window */
2930 user_handle_t full_handle; /* full 32-bit handle of new capture window */
2931 @END
2932 #define CAPTURE_MENU 0x01 /* capture is for a menu */
2933 #define CAPTURE_MOVESIZE 0x02 /* capture is for moving/resizing */
2936 /* Set the current thread caret window */
2937 @REQ(set_caret_window)
2938 user_handle_t handle; /* handle to the caret window */
2939 int width; /* caret width */
2940 int height; /* caret height */
2941 @REPLY
2942 user_handle_t previous; /* handle to the previous caret window */
2943 rectangle_t old_rect; /* previous caret rectangle */
2944 int old_hide; /* previous hide count */
2945 int old_state; /* previous caret state (1=on, 0=off) */
2946 @END
2949 /* Set the current thread caret information */
2950 @REQ(set_caret_info)
2951 unsigned int flags; /* caret flags (see below) */
2952 user_handle_t handle; /* handle to the caret window */
2953 int x; /* caret x position */
2954 int y; /* caret y position */
2955 int hide; /* increment for hide count (can be negative to show it) */
2956 int state; /* caret state (see below) */
2957 @REPLY
2958 user_handle_t full_handle; /* handle to the current caret window */
2959 rectangle_t old_rect; /* previous caret rectangle */
2960 int old_hide; /* previous hide count */
2961 int old_state; /* previous caret state (1=on, 0=off) */
2962 @END
2963 #define SET_CARET_POS 0x01 /* set the caret position from x,y */
2964 #define SET_CARET_HIDE 0x02 /* increment the caret hide count */
2965 #define SET_CARET_STATE 0x04 /* set the caret on/off state */
2966 enum caret_state
2968 CARET_STATE_OFF, /* off */
2969 CARET_STATE_ON, /* on */
2970 CARET_STATE_TOGGLE, /* toggle current state */
2971 CARET_STATE_ON_IF_MOVED /* on if the position differs, unchanged otherwise */
2975 /* Set a window hook */
2976 @REQ(set_hook)
2977 int id; /* id of the hook */
2978 process_id_t pid; /* id of process to set the hook into */
2979 thread_id_t tid; /* id of thread to set the hook into */
2980 int event_min;
2981 int event_max;
2982 client_ptr_t proc; /* hook procedure */
2983 int flags;
2984 int unicode; /* is it a unicode hook? */
2985 VARARG(module,unicode_str); /* module name */
2986 @REPLY
2987 user_handle_t handle; /* handle to the hook */
2988 unsigned int active_hooks; /* active hooks bitmap */
2989 @END
2992 /* Remove a window hook */
2993 @REQ(remove_hook)
2994 user_handle_t handle; /* handle to the hook */
2995 client_ptr_t proc; /* hook procedure if handle is 0 */
2996 int id; /* id of the hook if handle is 0 */
2997 @REPLY
2998 unsigned int active_hooks; /* active hooks bitmap */
2999 @END
3002 /* Start calling a hook chain */
3003 @REQ(start_hook_chain)
3004 int id; /* id of the hook */
3005 int event; /* signalled event */
3006 user_handle_t window; /* handle to the event window */
3007 int object_id; /* object id for out of context winevent */
3008 int child_id; /* child id for out of context winevent */
3009 @REPLY
3010 user_handle_t handle; /* handle to the next hook */
3011 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
3012 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
3013 int unicode; /* is it a unicode hook? */
3014 client_ptr_t proc; /* hook procedure */
3015 unsigned int active_hooks; /* active hooks bitmap */
3016 VARARG(module,unicode_str); /* module name */
3017 @END
3020 /* Finished calling a hook chain */
3021 @REQ(finish_hook_chain)
3022 int id; /* id of the hook */
3023 @END
3026 /* Get the hook information */
3027 @REQ(get_hook_info)
3028 user_handle_t handle; /* handle to the current hook */
3029 int get_next; /* do we want info about current or next hook? */
3030 int event; /* signalled event */
3031 user_handle_t window; /* handle to the event window */
3032 int object_id; /* object id for out of context winevent */
3033 int child_id; /* child id for out of context winevent */
3034 @REPLY
3035 user_handle_t handle; /* handle to the hook */
3036 int id; /* id of the hook */
3037 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
3038 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
3039 client_ptr_t proc; /* hook procedure */
3040 int unicode; /* is it a unicode hook? */
3041 VARARG(module,unicode_str); /* module name */
3042 @END
3045 /* Create a window class */
3046 @REQ(create_class)
3047 int local; /* is it a local class? */
3048 atom_t atom; /* class atom */
3049 unsigned int style; /* class style */
3050 mod_handle_t instance; /* module instance */
3051 int extra; /* number of extra class bytes */
3052 int win_extra; /* number of window extra bytes */
3053 client_ptr_t client_ptr; /* pointer to class in client address space */
3054 data_size_t name_offset; /* base class name offset for specified atom */
3055 VARARG(name,unicode_str); /* class name */
3056 @REPLY
3057 atom_t atom; /* resulting class atom */
3058 @END
3061 /* Destroy a window class */
3062 @REQ(destroy_class)
3063 atom_t atom; /* class atom */
3064 mod_handle_t instance; /* module instance */
3065 VARARG(name,unicode_str); /* class name */
3066 @REPLY
3067 client_ptr_t client_ptr; /* pointer to class in client address space */
3068 @END
3071 /* Set some information in a class */
3072 @REQ(set_class_info)
3073 user_handle_t window; /* handle to the window */
3074 unsigned int flags; /* flags for info to set (see below) */
3075 atom_t atom; /* class atom */
3076 unsigned int style; /* class style */
3077 int win_extra; /* number of window extra bytes */
3078 mod_handle_t instance; /* module instance */
3079 int extra_offset; /* offset to set in extra bytes */
3080 data_size_t extra_size; /* size to set in extra bytes */
3081 lparam_t extra_value; /* value to set in extra bytes */
3082 @REPLY
3083 atom_t old_atom; /* previous class atom */
3084 atom_t base_atom; /* base class atom */
3085 mod_handle_t old_instance; /* previous module instance */
3086 lparam_t old_extra_value; /* old value in extra bytes */
3087 unsigned int old_style; /* previous class style */
3088 int old_extra; /* previous number of class extra bytes */
3089 int old_win_extra; /* previous number of window extra bytes */
3090 @END
3091 #define SET_CLASS_ATOM 0x0001
3092 #define SET_CLASS_STYLE 0x0002
3093 #define SET_CLASS_WINEXTRA 0x0004
3094 #define SET_CLASS_INSTANCE 0x0008
3095 #define SET_CLASS_EXTRA 0x0010
3098 /* Open the clipboard */
3099 @REQ(open_clipboard)
3100 user_handle_t window; /* clipboard window */
3101 @REPLY
3102 user_handle_t owner; /* current clipboard owner */
3103 @END
3106 /* Close the clipboard */
3107 @REQ(close_clipboard)
3108 @REPLY
3109 user_handle_t viewer; /* first clipboard viewer */
3110 user_handle_t owner; /* current clipboard owner */
3111 @END
3114 /* Empty the clipboard and grab ownership */
3115 @REQ(empty_clipboard)
3116 @END
3119 /* Add a data format to the clipboard */
3120 @REQ(set_clipboard_data)
3121 unsigned int format; /* clipboard format of the data */
3122 unsigned int lcid; /* locale id to use for synthesizing text formats */
3123 VARARG(data,bytes); /* data contents */
3124 @REPLY
3125 unsigned int seqno; /* sequence number for the set data */
3126 @END
3129 /* Fetch a data format from the clipboard */
3130 @REQ(get_clipboard_data)
3131 unsigned int format; /* clipboard format of the data */
3132 int render; /* will we try to render it if missing? */
3133 int cached; /* do we already have it in the client-side cache? */
3134 unsigned int seqno; /* sequence number for the data in the cache */
3135 @REPLY
3136 unsigned int from; /* for synthesized data, format to generate it from */
3137 user_handle_t owner; /* clipboard owner for delayed-rendered formats */
3138 unsigned int seqno; /* sequence number for the originally set data */
3139 data_size_t total; /* total data size */
3140 VARARG(data,bytes); /* data contents */
3141 @END
3144 /* Retrieve a list of available formats */
3145 @REQ(get_clipboard_formats)
3146 unsigned int format; /* specific format to query, return all if 0 */
3147 @REPLY
3148 unsigned int count; /* count of available formats */
3149 VARARG(formats,uints); /* array of available formats */
3150 @END
3153 /* Retrieve the next available format */
3154 @REQ(enum_clipboard_formats)
3155 unsigned int previous; /* previous format, or first if 0 */
3156 @REPLY
3157 unsigned int format; /* next format */
3158 @END
3161 /* Release ownership of the clipboard */
3162 @REQ(release_clipboard)
3163 user_handle_t owner; /* clipboard owner to release */
3164 @REPLY
3165 user_handle_t viewer; /* first clipboard viewer */
3166 user_handle_t owner; /* current clipboard owner */
3167 @END
3170 /* Get clipboard information */
3171 @REQ(get_clipboard_info)
3172 @REPLY
3173 user_handle_t window; /* clipboard window */
3174 user_handle_t owner; /* clipboard owner */
3175 user_handle_t viewer; /* clipboard viewer */
3176 unsigned int seqno; /* current sequence number */
3177 @END
3180 /* Set the clipboard viewer window */
3181 @REQ(set_clipboard_viewer)
3182 user_handle_t viewer; /* clipboard viewer */
3183 user_handle_t previous; /* if non-zero, check that this was the previous viewer */
3184 @REPLY
3185 user_handle_t old_viewer; /* previous clipboard viewer */
3186 user_handle_t owner; /* clipboard owner */
3187 @END
3190 /* Add a clipboard listener window */
3191 @REQ(add_clipboard_listener)
3192 user_handle_t window; /* clipboard listener window */
3193 @END
3196 /* Remove a clipboard listener window */
3197 @REQ(remove_clipboard_listener)
3198 user_handle_t window; /* clipboard listener window */
3199 @END
3202 /* Create a security token */
3203 @REQ(create_token)
3204 struct luid token_id;
3205 unsigned int access; /* access rights to the new token */
3206 int primary; /* is the new token to be a primary one? */
3207 int impersonation_level; /* impersonation level of the new token */
3208 abstime_t expire; /* expiration time */
3209 int group_count;
3210 int primary_group;
3211 int priv_count;
3212 /* VARARG(objattr,object_attributes); */
3213 /* VARARG(user,sid); */
3214 /* VARARG(groups,sid); */
3215 /* VARARG(privs,luid_attr); */
3216 /* VARARG(dacl,acl); */
3217 @REPLY
3218 obj_handle_t token; /* handle to the token */
3219 @END
3222 /* Open a security token */
3223 @REQ(open_token)
3224 obj_handle_t handle; /* handle to the thread or process */
3225 unsigned int access; /* access rights to the new token */
3226 unsigned int attributes;/* object attributes */
3227 unsigned int flags; /* flags (see below) */
3228 @REPLY
3229 obj_handle_t token; /* handle to the token */
3230 @END
3231 #define OPEN_TOKEN_THREAD 1
3232 #define OPEN_TOKEN_AS_SELF 2
3235 /* Set/get the global windows */
3236 @REQ(set_global_windows)
3237 unsigned int flags; /* flags for fields to set (see below) */
3238 user_handle_t shell_window; /* handle to the new shell window */
3239 user_handle_t shell_listview; /* handle to the new shell listview window */
3240 user_handle_t progman_window; /* handle to the new program manager window */
3241 user_handle_t taskman_window; /* handle to the new task manager window */
3242 @REPLY
3243 user_handle_t old_shell_window; /* handle to the shell window */
3244 user_handle_t old_shell_listview; /* handle to the shell listview window */
3245 user_handle_t old_progman_window; /* handle to the new program manager window */
3246 user_handle_t old_taskman_window; /* handle to the new task manager window */
3247 @END
3248 #define SET_GLOBAL_SHELL_WINDOWS 0x01 /* set both main shell and listview windows */
3249 #define SET_GLOBAL_PROGMAN_WINDOW 0x02
3250 #define SET_GLOBAL_TASKMAN_WINDOW 0x04
3252 /* Adjust the privileges held by a token */
3253 @REQ(adjust_token_privileges)
3254 obj_handle_t handle; /* handle to the token */
3255 int disable_all; /* disable all privileges? */
3256 int get_modified_state; /* get modified privileges? */
3257 VARARG(privileges,luid_attr); /* privileges to enable/disable/remove */
3258 @REPLY
3259 unsigned int len; /* total length in bytes required to store token privileges */
3260 VARARG(privileges,luid_attr); /* modified privileges */
3261 @END
3263 /* Retrieves the set of privileges held by or available to a token */
3264 @REQ(get_token_privileges)
3265 obj_handle_t handle; /* handle to the token */
3266 @REPLY
3267 unsigned int len; /* total length in bytes required to store token privileges */
3268 VARARG(privileges,luid_attr); /* privileges held by or available to a token */
3269 @END
3271 /* Check the token has the required privileges */
3272 @REQ(check_token_privileges)
3273 obj_handle_t handle; /* handle to the token */
3274 int all_required; /* are all the privileges required for the check to succeed? */
3275 VARARG(privileges,luid_attr); /* privileges to check */
3276 @REPLY
3277 int has_privileges; /* does the token have the required privileges? */
3278 VARARG(privileges,luid_attr); /* privileges held by or available to a token */
3279 @END
3281 @REQ(duplicate_token)
3282 obj_handle_t handle; /* handle to the token to duplicate */
3283 unsigned int access; /* access rights to the new token */
3284 int primary; /* is the new token to be a primary one? */
3285 int impersonation_level; /* impersonation level of the new token */
3286 VARARG(objattr,object_attributes); /* object attributes */
3287 @REPLY
3288 obj_handle_t new_handle; /* duplicated handle */
3289 @END
3291 @REQ(filter_token)
3292 obj_handle_t handle; /* handle to the token to duplicate */
3293 unsigned int flags; /* flags */
3294 data_size_t privileges_size; /* size of privileges */
3295 VARARG(privileges,luid_attr,privileges_size); /* privileges to remove from new token */
3296 VARARG(disable_sids,sid); /* array of groups to remove from new token */
3297 @REPLY
3298 obj_handle_t new_handle; /* filtered handle */
3299 @END
3301 @REQ(access_check)
3302 obj_handle_t handle; /* handle to the token */
3303 unsigned int desired_access; /* desired access to the object */
3304 generic_map_t mapping; /* mapping to specific rights */
3305 VARARG(sd,security_descriptor); /* security descriptor to check */
3306 @REPLY
3307 unsigned int access_granted; /* access rights actually granted */
3308 unsigned int access_status; /* was access granted? */
3309 unsigned int privileges_len; /* length needed to store privileges */
3310 VARARG(privileges,luid_attr); /* privileges used during access check */
3311 @END
3313 @REQ(get_token_sid)
3314 obj_handle_t handle; /* handle to the token */
3315 unsigned int which_sid; /* which SID to retrieve from the token */
3316 @REPLY
3317 data_size_t sid_len; /* length needed to store sid */
3318 VARARG(sid,sid); /* the sid specified by which_sid from the token */
3319 @END
3321 @REQ(get_token_groups)
3322 obj_handle_t handle; /* handle to the token */
3323 unsigned int attr_mask; /* mask for wanted attributes */
3324 @REPLY
3325 data_size_t attr_len; /* length needed to store attrs */
3326 data_size_t sid_len; /* length needed to store sids */
3327 VARARG(attrs,uints,attr_len); /* group attributes */
3328 VARARG(sids,sids); /* group sids */
3329 @END
3331 @REQ(get_token_default_dacl)
3332 obj_handle_t handle; /* handle to the token */
3333 @REPLY
3334 data_size_t acl_len; /* length needed to store access control list */
3335 VARARG(acl,acl); /* access control list */
3336 @END
3338 @REQ(set_token_default_dacl)
3339 obj_handle_t handle; /* handle to the token */
3340 VARARG(acl,acl); /* default dacl to set */
3341 @END
3343 @REQ(set_security_object)
3344 obj_handle_t handle; /* handle to the object */
3345 unsigned int security_info; /* which parts of security descriptor to set */
3346 VARARG(sd,security_descriptor); /* security descriptor to set */
3347 @END
3349 @REQ(get_security_object)
3350 obj_handle_t handle; /* handle to the object */
3351 unsigned int security_info; /* which parts of security descriptor to get */
3352 @REPLY
3353 unsigned int sd_len; /* buffer size needed for sd */
3354 VARARG(sd,security_descriptor); /* retrieved security descriptor */
3355 @END
3358 struct handle_info
3360 process_id_t owner;
3361 obj_handle_t handle;
3362 unsigned int access;
3363 unsigned int attributes;
3364 unsigned int type;
3367 /* Return a list of all opened handles */
3368 @REQ(get_system_handles)
3369 @REPLY
3370 unsigned int count; /* number of handles */
3371 VARARG(data,handle_infos); /* array of handle_infos */
3372 @END
3375 /* Create a mailslot */
3376 @REQ(create_mailslot)
3377 unsigned int access; /* wanted access rights */
3378 timeout_t read_timeout;
3379 unsigned int max_msgsize;
3380 VARARG(objattr,object_attributes); /* object attributes */
3381 @REPLY
3382 obj_handle_t handle; /* handle to the mailslot */
3383 @END
3386 /* Set mailslot information */
3387 @REQ(set_mailslot_info)
3388 obj_handle_t handle; /* handle to the mailslot */
3389 timeout_t read_timeout;
3390 unsigned int flags;
3391 @REPLY
3392 timeout_t read_timeout;
3393 unsigned int max_msgsize;
3394 @END
3395 #define MAILSLOT_SET_READ_TIMEOUT 1
3398 /* Create a directory object */
3399 @REQ(create_directory)
3400 unsigned int access; /* access flags */
3401 VARARG(objattr,object_attributes); /* object attributes */
3402 @REPLY
3403 obj_handle_t handle; /* handle to the directory */
3404 @END
3407 /* Open a directory object */
3408 @REQ(open_directory)
3409 unsigned int access; /* access flags */
3410 unsigned int attributes; /* object attributes */
3411 obj_handle_t rootdir; /* root directory */
3412 VARARG(directory_name,unicode_str); /* Directory name */
3413 @REPLY
3414 obj_handle_t handle; /* handle to the directory */
3415 @END
3418 /* Get a directory entry by index */
3419 @REQ(get_directory_entry)
3420 obj_handle_t handle; /* handle to the directory */
3421 unsigned int index; /* entry index */
3422 @REPLY
3423 data_size_t total_len; /* total length needed for strings */
3424 data_size_t name_len; /* length of the entry name in bytes */
3425 VARARG(name,unicode_str,name_len); /* entry name */
3426 VARARG(type,unicode_str); /* entry type */
3427 @END
3430 /* Create a symbolic link object */
3431 @REQ(create_symlink)
3432 unsigned int access; /* access flags */
3433 VARARG(objattr,object_attributes); /* object attributes */
3434 VARARG(target_name,unicode_str); /* target name */
3435 @REPLY
3436 obj_handle_t handle; /* handle to the symlink */
3437 @END
3440 /* Open a symbolic link object */
3441 @REQ(open_symlink)
3442 unsigned int access; /* access flags */
3443 unsigned int attributes; /* object attributes */
3444 obj_handle_t rootdir; /* root directory */
3445 VARARG(name,unicode_str); /* symlink name */
3446 @REPLY
3447 obj_handle_t handle; /* handle to the symlink */
3448 @END
3451 /* Query a symbolic link object */
3452 @REQ(query_symlink)
3453 obj_handle_t handle; /* handle to the symlink */
3454 @REPLY
3455 data_size_t total; /* total needed size for name */
3456 VARARG(target_name,unicode_str); /* target name */
3457 @END
3460 /* Query basic object information */
3461 @REQ(get_object_info)
3462 obj_handle_t handle; /* handle to the object */
3463 @REPLY
3464 unsigned int access; /* granted access mask */
3465 unsigned int ref_count; /* object ref count */
3466 unsigned int handle_count; /* object handle count */
3467 @END
3470 /* Query the full name of an object */
3471 @REQ(get_object_name)
3472 obj_handle_t handle; /* handle to the object */
3473 @REPLY
3474 data_size_t total; /* total needed size for name */
3475 VARARG(name,unicode_str); /* object name */
3476 @END
3479 /* Query object type name information */
3480 @REQ(get_object_type)
3481 obj_handle_t handle; /* handle to the object */
3482 @REPLY
3483 VARARG(info,object_type_info); /* type information */
3484 @END
3487 /* Query type information for all types */
3488 @REQ(get_object_types)
3489 @REPLY
3490 int count; /* total count of object types */
3491 VARARG(info,object_types_info); /* type information */
3492 @END
3495 /* Allocate a locally-unique identifier */
3496 @REQ(allocate_locally_unique_id)
3497 @REPLY
3498 struct luid luid;
3499 @END
3502 /* Create a device manager */
3503 @REQ(create_device_manager)
3504 unsigned int access; /* wanted access rights */
3505 unsigned int attributes; /* object attributes */
3506 @REPLY
3507 obj_handle_t handle; /* handle to the device */
3508 @END
3511 /* Create a device */
3512 @REQ(create_device)
3513 obj_handle_t rootdir; /* root directory */
3514 client_ptr_t user_ptr; /* opaque ptr for use by client */
3515 obj_handle_t manager; /* device manager */
3516 VARARG(name,unicode_str); /* object name */
3517 @END
3520 /* Delete a device */
3521 @REQ(delete_device)
3522 obj_handle_t manager; /* handle to the device manager */
3523 client_ptr_t device; /* pointer to the device */
3524 @END
3527 /* Retrieve the next pending device irp request */
3528 @REQ(get_next_device_request)
3529 obj_handle_t manager; /* handle to the device manager */
3530 obj_handle_t prev; /* handle to the previous irp */
3531 unsigned int status; /* status of the previous irp */
3532 client_ptr_t user_ptr; /* user pointer of the previous irp */
3533 int pending; /* was the previous irp marked pending? */
3534 unsigned int iosb_status; /* IOSB status of the previous irp */
3535 data_size_t result; /* IOSB result of the previous irp */
3536 VARARG(data,bytes); /* output data of the previous irp */
3537 @REPLY
3538 irp_params_t params; /* irp parameters */
3539 obj_handle_t next; /* handle to the next irp */
3540 thread_id_t client_tid; /* tid of thread calling irp */
3541 client_ptr_t client_thread; /* pointer to thread object of calling irp */
3542 data_size_t in_size; /* total needed input size */
3543 VARARG(next_data,bytes); /* input data of the next irp */
3544 @END
3547 /* Get kernel pointer from server object */
3548 @REQ(get_kernel_object_ptr)
3549 obj_handle_t manager; /* handle to the device manager */
3550 obj_handle_t handle; /* object handle */
3551 @REPLY
3552 client_ptr_t user_ptr; /* kernel object pointer */
3553 @END
3556 /* Associate kernel pointer with server object */
3557 @REQ(set_kernel_object_ptr)
3558 obj_handle_t manager; /* handle to the device manager */
3559 obj_handle_t handle; /* object handle */
3560 client_ptr_t user_ptr; /* kernel object pointer */
3561 @END
3564 /* Grab server object reference from kernel object pointer */
3565 @REQ(grab_kernel_object)
3566 obj_handle_t manager; /* handle to the device manager */
3567 client_ptr_t user_ptr; /* kernel object pointer */
3568 @END
3571 /* Release server object reference from kernel object pointer */
3572 @REQ(release_kernel_object)
3573 obj_handle_t manager; /* handle to the device manager */
3574 client_ptr_t user_ptr; /* kernel object pointer */
3575 @END
3578 /* Get handle from kernel object pointer */
3579 @REQ(get_kernel_object_handle)
3580 obj_handle_t manager; /* handle to the device manager */
3581 client_ptr_t user_ptr; /* kernel object pointer */
3582 unsigned int access; /* wanted access rights */
3583 @REPLY
3584 obj_handle_t handle; /* kernel object handle */
3585 @END
3588 /* Make the current process a system process */
3589 @REQ(make_process_system)
3590 obj_handle_t handle; /* handle to the process */
3591 @REPLY
3592 obj_handle_t event; /* event signaled when all user processes have exited */
3593 @END
3596 /* Get detailed fixed-size information about a token */
3597 @REQ(get_token_info)
3598 obj_handle_t handle; /* handle to the object */
3599 @REPLY
3600 struct luid token_id; /* locally-unique identifier of the token */
3601 struct luid modified_id; /* locally-unique identifier of the modified version of the token */
3602 unsigned int session_id; /* token session id */
3603 int primary; /* is the token primary or impersonation? */
3604 int impersonation_level; /* level of impersonation */
3605 int elevation; /* elevation type */
3606 int group_count; /* the number of groups the token is a member of */
3607 int privilege_count; /* the number of privileges the token has */
3608 @END
3611 /* Create a token which is an elevation counterpart to this token */
3612 @REQ(create_linked_token)
3613 obj_handle_t handle; /* handle to the token */
3614 @REPLY
3615 obj_handle_t linked; /* handle to the linked token */
3616 @END
3619 /* Create I/O completion port */
3620 @REQ(create_completion)
3621 unsigned int access; /* desired access to a port */
3622 unsigned int concurrent; /* max number of concurrent active threads */
3623 VARARG(objattr,object_attributes); /* object attributes */
3624 @REPLY
3625 obj_handle_t handle; /* port handle */
3626 @END
3629 /* Open I/O completion port */
3630 @REQ(open_completion)
3631 unsigned int access; /* desired access to a port */
3632 unsigned int attributes; /* object attributes */
3633 obj_handle_t rootdir; /* root directory */
3634 VARARG(filename,unicode_str); /* port name */
3635 @REPLY
3636 obj_handle_t handle; /* port handle */
3637 @END
3640 /* add completion to completion port */
3641 @REQ(add_completion)
3642 obj_handle_t handle; /* port handle */
3643 apc_param_t ckey; /* completion key */
3644 apc_param_t cvalue; /* completion value */
3645 apc_param_t information; /* IO_STATUS_BLOCK Information */
3646 unsigned int status; /* completion result */
3647 @END
3650 /* get completion from completion port queue */
3651 @REQ(remove_completion)
3652 obj_handle_t handle; /* port handle */
3653 @REPLY
3654 apc_param_t ckey; /* completion key */
3655 apc_param_t cvalue; /* completion value */
3656 apc_param_t information; /* IO_STATUS_BLOCK Information */
3657 unsigned int status; /* completion result */
3658 @END
3661 /* get completion queue depth */
3662 @REQ(query_completion)
3663 obj_handle_t handle; /* port handle */
3664 @REPLY
3665 unsigned int depth; /* completion queue depth */
3666 @END
3669 /* associate object with completion port */
3670 @REQ(set_completion_info)
3671 obj_handle_t handle; /* object handle */
3672 apc_param_t ckey; /* completion key */
3673 obj_handle_t chandle; /* port handle */
3674 @END
3677 /* check for associated completion and push msg */
3678 @REQ(add_fd_completion)
3679 obj_handle_t handle; /* async' object */
3680 apc_param_t cvalue; /* completion value */
3681 apc_param_t information; /* IO_STATUS_BLOCK Information */
3682 unsigned int status; /* completion status */
3683 int async; /* completion is an async result */
3684 @END
3687 /* set fd completion information */
3688 @REQ(set_fd_completion_mode)
3689 obj_handle_t handle; /* handle to a file or directory */
3690 unsigned int flags; /* completion notification flags */
3691 @END
3694 /* set fd disposition information */
3695 @REQ(set_fd_disp_info)
3696 obj_handle_t handle; /* handle to a file or directory */
3697 unsigned int flags; /* what actions should be taken when deleting a file */
3698 @END
3701 /* set fd name information */
3702 @REQ(set_fd_name_info)
3703 obj_handle_t handle; /* handle to a file or directory */
3704 obj_handle_t rootdir; /* root directory */
3705 data_size_t namelen; /* length of NT name in bytes */
3706 int link; /* link instead of renaming */
3707 unsigned int flags; /* FILE_RENAME_* flags */
3708 VARARG(name,unicode_str,namelen); /* NT name */
3709 VARARG(filename,string); /* new file name */
3710 @END
3713 /* set fd eof information */
3714 @REQ(set_fd_eof_info)
3715 obj_handle_t handle; /* handle to a file or directory */
3716 file_pos_t eof; /* offset of eof of file */
3717 @END
3720 /* Retrieve layered info for a window */
3721 @REQ(get_window_layered_info)
3722 user_handle_t handle; /* handle to the window */
3723 @REPLY
3724 unsigned int color_key; /* color key */
3725 unsigned int alpha; /* alpha (0..255) */
3726 unsigned int flags; /* LWA_* flags */
3727 @END
3730 /* Set layered info for a window */
3731 @REQ(set_window_layered_info)
3732 user_handle_t handle; /* handle to the window */
3733 unsigned int color_key; /* color key */
3734 unsigned int alpha; /* alpha (0..255) */
3735 unsigned int flags; /* LWA_* flags */
3736 @END
3739 /* Allocate an arbitrary user handle */
3740 @REQ(alloc_user_handle)
3741 @REPLY
3742 user_handle_t handle; /* allocated handle */
3743 @END
3746 /* Free an arbitrary user handle */
3747 @REQ(free_user_handle)
3748 user_handle_t handle; /* handle to free*/
3749 @END
3752 /* Set/get the current cursor */
3753 @REQ(set_cursor)
3754 unsigned int flags; /* flags for fields to set (see below) */
3755 user_handle_t handle; /* handle to the cursor */
3756 int show_count; /* show count increment/decrement */
3757 int x; /* cursor position */
3758 int y;
3759 rectangle_t clip; /* cursor clip rectangle */
3760 @REPLY
3761 user_handle_t prev_handle; /* previous handle */
3762 int prev_count; /* previous show count */
3763 int prev_x; /* previous position */
3764 int prev_y;
3765 int new_x; /* new position */
3766 int new_y;
3767 rectangle_t new_clip; /* new clip rectangle */
3768 unsigned int last_change; /* time of last position change */
3769 @END
3770 #define SET_CURSOR_HANDLE 0x01
3771 #define SET_CURSOR_COUNT 0x02
3772 #define SET_CURSOR_POS 0x04
3773 #define SET_CURSOR_CLIP 0x08
3774 #define SET_CURSOR_NOCLIP 0x10
3775 #define SET_CURSOR_FSCLIP 0x20
3777 /* Get the history of the 64 last cursor positions */
3778 @REQ(get_cursor_history)
3779 @REPLY
3780 VARARG(history,cursor_positions);
3781 @END
3784 /* Batch read rawinput message data */
3785 @REQ(get_rawinput_buffer)
3786 data_size_t rawinput_size; /* size of RAWINPUT structure */
3787 data_size_t buffer_size; /* size of output buffer */
3788 @REPLY
3789 data_size_t next_size; /* minimum size to get next message data */
3790 unsigned int count;
3791 VARARG(data,bytes);
3792 @END
3794 /* Modify the list of registered rawinput devices */
3795 @REQ(update_rawinput_devices)
3796 VARARG(devices,rawinput_devices);
3797 @END
3799 /* Create a new job object */
3800 @REQ(create_job)
3801 unsigned int access; /* wanted access rights */
3802 VARARG(objattr,object_attributes); /* object attributes */
3803 @REPLY
3804 obj_handle_t handle; /* handle to the job */
3805 @END
3808 /* Open a job object */
3809 @REQ(open_job)
3810 unsigned int access; /* wanted access rights */
3811 unsigned int attributes; /* object attributes */
3812 obj_handle_t rootdir; /* root directory */
3813 VARARG(name,unicode_str); /* object name */
3814 @REPLY
3815 obj_handle_t handle; /* handle to the job */
3816 @END
3819 /* Assign a job object to a process */
3820 @REQ(assign_job)
3821 obj_handle_t job; /* handle to the job */
3822 obj_handle_t process; /* handle to the process */
3823 @END
3826 /* Check if a process is associated with a job */
3827 @REQ(process_in_job)
3828 obj_handle_t job; /* handle to the job */
3829 obj_handle_t process; /* handle to the process */
3830 @END
3833 /* Set limit flags on a job */
3834 @REQ(set_job_limits)
3835 obj_handle_t handle; /* handle to the job */
3836 unsigned int limit_flags; /* new limit flags */
3837 @END
3840 /* Set new completion port for a job */
3841 @REQ(set_job_completion_port)
3842 obj_handle_t job; /* handle to the job */
3843 obj_handle_t port; /* handle to the completion port */
3844 client_ptr_t key; /* key to send with completion messages */
3845 @END
3848 /* Retrieve information about a job */
3849 @REQ(get_job_info)
3850 obj_handle_t handle; /* handle to the job */
3851 @REPLY
3852 int total_processes; /* total count of processes */
3853 int active_processes; /* count of running processes */
3854 VARARG(pids,uints); /* list of active pids */
3855 @END
3858 /* Terminate all processes associated with the job */
3859 @REQ(terminate_job)
3860 obj_handle_t handle; /* handle to the job */
3861 int status; /* process exit code */
3862 @END
3865 /* Suspend a process */
3866 @REQ(suspend_process)
3867 obj_handle_t handle; /* process handle */
3868 @END
3871 /* Resume a process */
3872 @REQ(resume_process)
3873 obj_handle_t handle; /* process handle */
3874 @END
3877 /* Iterate thread list for process */
3878 @REQ(get_next_thread)
3879 obj_handle_t process; /* process handle */
3880 obj_handle_t last; /* thread handle to start with */
3881 unsigned int access; /* desired access for returned handle */
3882 unsigned int attributes; /* returned handle attributes */
3883 unsigned int flags; /* controls iteration direction */
3884 @REPLY
3885 obj_handle_t handle; /* next thread handle */
3886 @END