gdi32/tests: Test substituted face family name.
[wine.git] / server / protocol.def
blob6a25db0326fb87d523ff9e58c9ac6406f243b1a2
1 /* -*- C -*-
3 * Wine server protocol definition
5 * Copyright (C) 2001 Alexandre Julliard
7 * This file is used by tools/make_requests to build the
8 * protocol structures in include/wine/server_protocol.h
10 * This library is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU Lesser General Public
12 * License as published by the Free Software Foundation; either
13 * version 2.1 of the License, or (at your option) any later version.
15 * This library is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 * Lesser General Public License for more details.
20 * You should have received a copy of the GNU Lesser General Public
21 * License along with this library; if not, write to the Free Software
22 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
25 @HEADER /* start of C declarations */
27 #include <stdarg.h>
28 #include <stdlib.h>
29 #include <time.h>
31 #include <windef.h>
32 #include <winbase.h>
34 typedef unsigned int obj_handle_t;
35 typedef unsigned int user_handle_t;
36 typedef unsigned int atom_t;
37 typedef unsigned int process_id_t;
38 typedef unsigned int thread_id_t;
39 typedef unsigned int data_size_t;
40 typedef unsigned int ioctl_code_t;
41 typedef unsigned __int64 lparam_t;
42 typedef unsigned __int64 apc_param_t;
43 typedef unsigned __int64 mem_size_t;
44 typedef unsigned __int64 file_pos_t;
45 typedef unsigned __int64 client_ptr_t;
46 typedef unsigned __int64 affinity_t;
47 typedef client_ptr_t mod_handle_t;
49 struct request_header
51 int req; /* request code */
52 data_size_t request_size; /* request variable part size */
53 data_size_t reply_size; /* reply variable part maximum size */
56 struct reply_header
58 unsigned int error; /* error result */
59 data_size_t reply_size; /* reply variable part size */
62 /* placeholder structure for the maximum allowed request size */
63 /* this is used to construct the generic_request union */
64 struct request_max_size
66 int pad[16]; /* the max request size is 16 ints */
69 #define FIRST_USER_HANDLE 0x0020 /* first possible value for low word of user handle */
70 #define LAST_USER_HANDLE 0xffef /* last possible value for low word of user handle */
73 /* debug event data */
74 typedef union
76 int code; /* event code */
77 struct
79 int code; /* DbgExceptionStateChange */
80 int first; /* first chance exception? */
81 unsigned int exc_code; /* exception code */
82 unsigned int flags; /* exception flags */
83 client_ptr_t record; /* exception record */
84 client_ptr_t address; /* exception address */
85 int nb_params; /* number of parameters */
86 int __pad;
87 client_ptr_t params[15]; /* parameters */
88 } exception;
89 struct
91 int code; /* DbgCreateThreadStateChange */
92 obj_handle_t handle; /* handle to the new thread */
93 client_ptr_t start; /* thread startup routine */
94 } create_thread;
95 struct
97 int code; /* DbgCreateProcessStateChange */
98 obj_handle_t file; /* handle to the process exe file */
99 obj_handle_t process; /* handle to the new process */
100 obj_handle_t thread; /* handle to the new thread */
101 mod_handle_t base; /* base of executable image */
102 int dbg_offset; /* offset of debug info in file */
103 int dbg_size; /* size of debug info */
104 client_ptr_t start; /* thread startup routine */
105 } create_process;
106 struct
108 int code; /* DbgExitThreadStateChange/DbgExitProcessStateChange */
109 int exit_code; /* thread or process exit code */
110 } exit;
111 struct
113 int code; /* DbgLoadDllStateChange */
114 obj_handle_t handle; /* file handle for the dll */
115 mod_handle_t base; /* base address of the dll */
116 int dbg_offset; /* offset of debug info in file */
117 int dbg_size; /* size of debug info */
118 client_ptr_t name; /* image name (optional) */
119 } load_dll;
120 struct
122 int code; /* DbgUnloadDllStateChange */
123 int __pad;
124 mod_handle_t base; /* base address of the dll */
125 } unload_dll;
126 } debug_event_t;
128 /* context data */
129 typedef struct
131 unsigned int machine; /* machine type */
132 unsigned int flags; /* SERVER_CTX_* flags */
133 union
135 struct { unsigned int eip, ebp, esp, eflags, cs, ss; } i386_regs;
136 struct { unsigned __int64 rip, rbp, rsp;
137 unsigned int cs, ss, flags, __pad; } x86_64_regs;
138 struct { unsigned int sp, lr, pc, cpsr; } arm_regs;
139 struct { unsigned __int64 sp, pc, pstate; } arm64_regs;
140 } ctl; /* selected by SERVER_CTX_CONTROL */
141 union
143 struct { unsigned int eax, ebx, ecx, edx, esi, edi; } i386_regs;
144 struct { unsigned __int64 rax,rbx, rcx, rdx, rsi, rdi,
145 r8, r9, r10, r11, r12, r13, r14, r15; } x86_64_regs;
146 struct { unsigned int r[13]; } arm_regs;
147 struct { unsigned __int64 x[31]; } arm64_regs;
148 } integer; /* selected by SERVER_CTX_INTEGER */
149 union
151 struct { unsigned int ds, es, fs, gs; } i386_regs;
152 struct { unsigned int ds, es, fs, gs; } x86_64_regs;
153 } seg; /* selected by SERVER_CTX_SEGMENTS */
154 union
156 struct { unsigned int ctrl, status, tag, err_off, err_sel, data_off, data_sel, cr0npx;
157 unsigned char regs[80]; } i386_regs;
158 struct { struct { unsigned __int64 low, high; } fpregs[32]; } x86_64_regs;
159 struct { unsigned __int64 d[32]; unsigned int fpscr; } arm_regs;
160 struct { struct { unsigned __int64 low, high; } q[32]; unsigned int fpcr, fpsr; } arm64_regs;
161 } fp; /* selected by SERVER_CTX_FLOATING_POINT */
162 union
164 struct { unsigned int dr0, dr1, dr2, dr3, dr6, dr7; } i386_regs;
165 struct { unsigned __int64 dr0, dr1, dr2, dr3, dr6, dr7; } x86_64_regs;
166 struct { unsigned int bvr[8], bcr[8], wvr[1], wcr[1]; } arm_regs;
167 struct { unsigned __int64 bvr[8], wvr[2]; unsigned int bcr[8], wcr[2]; } arm64_regs;
168 } debug; /* selected by SERVER_CTX_DEBUG_REGISTERS */
169 union
171 unsigned char i386_regs[512];
172 } ext; /* selected by SERVER_CTX_EXTENDED_REGISTERS */
173 union
175 struct { struct { unsigned __int64 low, high; } ymm_high[16]; } regs;
176 } ymm; /* selected by SERVER_CTX_YMM_REGISTERS */
177 } context_t;
179 #define SERVER_CTX_CONTROL 0x01
180 #define SERVER_CTX_INTEGER 0x02
181 #define SERVER_CTX_SEGMENTS 0x04
182 #define SERVER_CTX_FLOATING_POINT 0x08
183 #define SERVER_CTX_DEBUG_REGISTERS 0x10
184 #define SERVER_CTX_EXTENDED_REGISTERS 0x20
185 #define SERVER_CTX_YMM_REGISTERS 0x40
187 /* structure used in sending an fd from client to server */
188 struct send_fd
190 thread_id_t tid; /* thread id */
191 int fd; /* file descriptor on client-side */
194 /* structure sent by the server on the wait fifo */
195 struct wake_up_reply
197 client_ptr_t cookie; /* magic cookie that was passed in select_request */
198 int signaled; /* wait result */
199 int __pad;
202 /* NT-style timeout, in 100ns units, negative means relative timeout */
203 typedef __int64 timeout_t;
204 #define TIMEOUT_INFINITE (((timeout_t)0x7fffffff) << 32 | 0xffffffff)
206 /* absolute timeout, negative means that monotonic clock is used */
207 typedef __int64 abstime_t;
209 /* structure for process startup info */
210 typedef struct
212 unsigned int debug_flags;
213 unsigned int console_flags;
214 obj_handle_t console;
215 obj_handle_t hstdin;
216 obj_handle_t hstdout;
217 obj_handle_t hstderr;
218 unsigned int x;
219 unsigned int y;
220 unsigned int xsize;
221 unsigned int ysize;
222 unsigned int xchars;
223 unsigned int ychars;
224 unsigned int attribute;
225 unsigned int flags;
226 unsigned int show;
227 data_size_t curdir_len;
228 data_size_t dllpath_len;
229 data_size_t imagepath_len;
230 data_size_t cmdline_len;
231 data_size_t title_len;
232 data_size_t desktop_len;
233 data_size_t shellinfo_len;
234 data_size_t runtime_len;
235 /* VARARG(curdir,unicode_str,curdir_len); */
236 /* VARARG(dllpath,unicode_str,dllpath_len); */
237 /* VARARG(imagepath,unicode_str,imagepath_len); */
238 /* VARARG(cmdline,unicode_str,cmdline_len); */
239 /* VARARG(title,unicode_str,title_len); */
240 /* VARARG(desktop,unicode_str,desktop_len); */
241 /* VARARG(shellinfo,unicode_str,shellinfo_len); */
242 /* VARARG(runtime,unicode_str,runtime_len); */
243 } startup_info_t;
245 /* structure returned in the list of window properties */
246 typedef struct
248 atom_t atom; /* property atom */
249 int string; /* was atom a string originally? */
250 lparam_t data; /* data stored in property */
251 } property_data_t;
253 /* structure to specify window rectangles */
254 typedef struct
256 int left;
257 int top;
258 int right;
259 int bottom;
260 } rectangle_t;
262 /* structure for parameters of async I/O calls */
263 typedef struct
265 obj_handle_t handle; /* object to perform I/O on */
266 obj_handle_t event; /* event to signal when done */
267 client_ptr_t iosb; /* I/O status block in client addr space */
268 client_ptr_t user; /* opaque user data containing callback pointer and async-specific data */
269 client_ptr_t apc; /* user APC to call */
270 apc_param_t apc_context; /* user APC context or completion value */
271 } async_data_t;
273 /* structures for extra message data */
275 struct hw_msg_source
277 unsigned int device; /* source device (IMDT_* values) */
278 unsigned int origin; /* source origin (IMO_* values) */
281 union rawinput
283 int type;
284 struct
286 int type; /* RIM_TYPEKEYBOARD */
287 unsigned int message; /* message generated by this rawinput event */
288 unsigned short vkey; /* virtual key code */
289 unsigned short scan; /* scan code */
290 } kbd;
291 struct
293 int type; /* RIM_TYPEMOUSE */
294 int x; /* x coordinate */
295 int y; /* y coordinate */
296 unsigned int data; /* mouse data */
297 } mouse;
298 struct
300 int type; /* RIM_TYPEHID */
301 unsigned int device; /* rawinput device index */
302 unsigned int param; /* rawinput message param */
303 unsigned short usage_page;/* HID usage page */
304 unsigned short usage; /* HID usage */
305 unsigned int count; /* HID report count */
306 unsigned int length; /* HID report length */
307 } hid;
310 struct hardware_msg_data
312 lparam_t info; /* extra info */
313 data_size_t size; /* size of hardware message data */
314 int __pad;
315 unsigned int hw_id; /* unique id */
316 unsigned int flags; /* hook flags */
317 struct hw_msg_source source; /* message source */
318 union rawinput rawinput; /* rawinput message data */
321 struct callback_msg_data
323 client_ptr_t callback; /* callback function */
324 lparam_t data; /* user data for callback */
325 lparam_t result; /* message result */
328 struct winevent_msg_data
330 user_handle_t hook; /* hook handle */
331 thread_id_t tid; /* thread id */
332 client_ptr_t hook_proc; /* hook proc address */
333 /* followed by module name if any */
336 typedef union
338 int type;
339 struct
341 int type; /* INPUT_KEYBOARD */
342 unsigned short vkey; /* virtual key code */
343 unsigned short scan; /* scan code */
344 unsigned int flags; /* event flags */
345 unsigned int time; /* event time */
346 lparam_t info; /* extra info */
347 } kbd;
348 struct
350 int type; /* INPUT_MOUSE */
351 int x; /* coordinates */
352 int y;
353 unsigned int data; /* mouse data */
354 unsigned int flags; /* event flags */
355 unsigned int time; /* event time */
356 lparam_t info; /* extra info */
357 } mouse;
358 struct
360 int type; /* INPUT_HARDWARE */
361 unsigned int msg; /* message code */
362 lparam_t lparam; /* message param */
363 union rawinput rawinput;/* rawinput message data */
364 } hw;
365 } hw_input_t;
367 typedef union
369 unsigned char bytes[1]; /* raw data for sent messages */
370 struct hardware_msg_data hardware;
371 struct callback_msg_data callback;
372 struct winevent_msg_data winevent;
373 } message_data_t;
375 /* structure returned in filesystem events */
376 struct filesystem_event
378 int action;
379 data_size_t len;
380 char name[1];
383 typedef struct
385 unsigned int low_part;
386 int high_part;
387 } luid_t;
389 typedef struct
391 unsigned int read;
392 unsigned int write;
393 unsigned int exec;
394 unsigned int all;
395 } generic_map_t;
397 #define MAX_ACL_LEN 65535
399 struct security_descriptor
401 unsigned int control; /* SE_ flags */
402 data_size_t owner_len;
403 data_size_t group_len;
404 data_size_t sacl_len;
405 data_size_t dacl_len;
406 /* VARARG(owner,SID); */
407 /* VARARG(group,SID); */
408 /* VARARG(sacl,ACL); */
409 /* VARARG(dacl,ACL); */
412 struct object_attributes
414 obj_handle_t rootdir; /* root directory */
415 unsigned int attributes; /* object attributes */
416 data_size_t sd_len; /* length of security_descriptor data. may be 0 */
417 data_size_t name_len; /* length of the name string. may be 0 */
418 /* VARARG(sd,security_descriptor); */
419 /* VARARG(name,unicode_str); */
422 struct object_type_info
424 data_size_t name_len; /* length of the name string */
425 unsigned int index; /* type index in global table */
426 unsigned int obj_count; /* count of objects of this type */
427 unsigned int handle_count; /* count of handles of this type */
428 unsigned int obj_max; /* max count of objects of this type */
429 unsigned int handle_max; /* max count of handles of this type */
430 unsigned int valid_access; /* mask for valid access bits */
431 generic_map_t mapping; /* generic access mappings */
432 /* VARARG(name,unicode_str); */
435 struct token_groups
437 unsigned int count;
438 /* unsigned int attributes[count]; */
439 /* VARARG(sids,SID); */
442 enum select_op
444 SELECT_NONE,
445 SELECT_WAIT,
446 SELECT_WAIT_ALL,
447 SELECT_SIGNAL_AND_WAIT,
448 SELECT_KEYED_EVENT_WAIT,
449 SELECT_KEYED_EVENT_RELEASE
452 typedef union
454 enum select_op op;
455 struct
457 enum select_op op; /* SELECT_WAIT or SELECT_WAIT_ALL */
458 obj_handle_t handles[MAXIMUM_WAIT_OBJECTS];
459 } wait;
460 struct
462 enum select_op op; /* SELECT_SIGNAL_AND_WAIT */
463 obj_handle_t wait;
464 obj_handle_t signal; /* must be last in the structure so we can remove it on retries */
465 } signal_and_wait;
466 struct
468 enum select_op op; /* SELECT_KEYED_EVENT_WAIT or SELECT_KEYED_EVENT_RELEASE */
469 obj_handle_t handle;
470 client_ptr_t key;
471 } keyed_event;
472 } select_op_t;
474 enum apc_type
476 APC_NONE,
477 APC_USER,
478 APC_ASYNC_IO,
479 APC_VIRTUAL_ALLOC,
480 APC_VIRTUAL_FREE,
481 APC_VIRTUAL_QUERY,
482 APC_VIRTUAL_PROTECT,
483 APC_VIRTUAL_FLUSH,
484 APC_VIRTUAL_LOCK,
485 APC_VIRTUAL_UNLOCK,
486 APC_MAP_VIEW,
487 APC_UNMAP_VIEW,
488 APC_CREATE_THREAD,
489 APC_DUP_HANDLE,
490 APC_BREAK_PROCESS
493 typedef struct
495 enum apc_type type; /* APC_USER */
496 int __pad;
497 client_ptr_t func; /* void (__stdcall *func)(ULONG_PTR,ULONG_PTR,ULONG_PTR); */
498 apc_param_t args[3]; /* arguments for user function */
499 } user_apc_t;
501 typedef union
503 enum apc_type type;
504 user_apc_t user;
505 struct
507 enum apc_type type; /* APC_ASYNC_IO */
508 unsigned int status; /* I/O status */
509 client_ptr_t user; /* user pointer */
510 client_ptr_t sb; /* status block */
511 data_size_t result; /* result size */
512 } async_io;
513 struct
515 enum apc_type type; /* APC_VIRTUAL_ALLOC */
516 unsigned int op_type; /* type of operation */
517 client_ptr_t addr; /* requested address */
518 mem_size_t size; /* allocation size */
519 mem_size_t zero_bits; /* number of zero high bits */
520 unsigned int prot; /* memory protection flags */
521 } virtual_alloc;
522 struct
524 enum apc_type type; /* APC_VIRTUAL_FREE */
525 unsigned int op_type; /* type of operation */
526 client_ptr_t addr; /* requested address */
527 mem_size_t size; /* allocation size */
528 } virtual_free;
529 struct
531 enum apc_type type; /* APC_VIRTUAL_QUERY */
532 int __pad;
533 client_ptr_t addr; /* requested address */
534 } virtual_query;
535 struct
537 enum apc_type type; /* APC_VIRTUAL_PROTECT */
538 unsigned int prot; /* new protection flags */
539 client_ptr_t addr; /* requested address */
540 mem_size_t size; /* requested size */
541 } virtual_protect;
542 struct
544 enum apc_type type; /* APC_VIRTUAL_FLUSH */
545 int __pad;
546 client_ptr_t addr; /* requested address */
547 mem_size_t size; /* requested size */
548 } virtual_flush;
549 struct
551 enum apc_type type; /* APC_VIRTUAL_LOCK */
552 int __pad;
553 client_ptr_t addr; /* requested address */
554 mem_size_t size; /* requested size */
555 } virtual_lock;
556 struct
558 enum apc_type type; /* APC_VIRTUAL_UNLOCK */
559 int __pad;
560 client_ptr_t addr; /* requested address */
561 mem_size_t size; /* requested size */
562 } virtual_unlock;
563 struct
565 enum apc_type type; /* APC_MAP_VIEW */
566 obj_handle_t handle; /* mapping handle */
567 client_ptr_t addr; /* requested address */
568 mem_size_t size; /* allocation size */
569 file_pos_t offset; /* file offset */
570 mem_size_t zero_bits; /* number of zero high bits */
571 unsigned int alloc_type; /* allocation type */
572 unsigned int prot; /* memory protection flags */
573 } map_view;
574 struct
576 enum apc_type type; /* APC_UNMAP_VIEW */
577 int __pad;
578 client_ptr_t addr; /* view address */
579 } unmap_view;
580 struct
582 enum apc_type type; /* APC_CREATE_THREAD */
583 unsigned int flags; /* creation flags */
584 client_ptr_t func; /* void (__stdcall *func)(void*); start function */
585 client_ptr_t arg; /* argument for start function */
586 mem_size_t zero_bits; /* number of zero high bits for thread stack */
587 mem_size_t reserve; /* reserve size for thread stack */
588 mem_size_t commit; /* commit size for thread stack */
589 } create_thread;
590 struct
592 enum apc_type type; /* APC_DUP_HANDLE */
593 obj_handle_t src_handle; /* src handle to duplicate */
594 obj_handle_t dst_process; /* dst process handle */
595 unsigned int access; /* wanted access rights */
596 unsigned int attributes; /* object attributes */
597 unsigned int options; /* duplicate options */
598 } dup_handle;
599 } apc_call_t;
601 typedef union
603 enum apc_type type;
604 struct
606 enum apc_type type; /* APC_ASYNC_IO */
607 unsigned int status; /* new status of async operation */
608 unsigned int total; /* bytes transferred */
609 } async_io;
610 struct
612 enum apc_type type; /* APC_VIRTUAL_ALLOC */
613 unsigned int status; /* status returned by call */
614 client_ptr_t addr; /* resulting address */
615 mem_size_t size; /* resulting size */
616 } virtual_alloc;
617 struct
619 enum apc_type type; /* APC_VIRTUAL_FREE */
620 unsigned int status; /* status returned by call */
621 client_ptr_t addr; /* resulting address */
622 mem_size_t size; /* resulting size */
623 } virtual_free;
624 struct
626 enum apc_type type; /* APC_VIRTUAL_QUERY */
627 unsigned int status; /* status returned by call */
628 client_ptr_t base; /* resulting base address */
629 client_ptr_t alloc_base;/* resulting allocation base */
630 mem_size_t size; /* resulting region size */
631 unsigned short state; /* resulting region state */
632 unsigned short prot; /* resulting region protection */
633 unsigned short alloc_prot;/* resulting allocation protection */
634 unsigned short alloc_type;/* resulting region allocation type */
635 } virtual_query;
636 struct
638 enum apc_type type; /* APC_VIRTUAL_PROTECT */
639 unsigned int status; /* status returned by call */
640 client_ptr_t addr; /* resulting address */
641 mem_size_t size; /* resulting size */
642 unsigned int prot; /* old protection flags */
643 } virtual_protect;
644 struct
646 enum apc_type type; /* APC_VIRTUAL_FLUSH */
647 unsigned int status; /* status returned by call */
648 client_ptr_t addr; /* resulting address */
649 mem_size_t size; /* resulting size */
650 } virtual_flush;
651 struct
653 enum apc_type type; /* APC_VIRTUAL_LOCK */
654 unsigned int status; /* status returned by call */
655 client_ptr_t addr; /* resulting address */
656 mem_size_t size; /* resulting size */
657 } virtual_lock;
658 struct
660 enum apc_type type; /* APC_VIRTUAL_UNLOCK */
661 unsigned int status; /* status returned by call */
662 client_ptr_t addr; /* resulting address */
663 mem_size_t size; /* resulting size */
664 } virtual_unlock;
665 struct
667 enum apc_type type; /* APC_MAP_VIEW */
668 unsigned int status; /* status returned by call */
669 client_ptr_t addr; /* resulting address */
670 mem_size_t size; /* resulting size */
671 } map_view;
672 struct
674 enum apc_type type; /* APC_UNMAP_VIEW */
675 unsigned int status; /* status returned by call */
676 } unmap_view;
677 struct
679 enum apc_type type; /* APC_CREATE_THREAD */
680 unsigned int status; /* status returned by call */
681 process_id_t pid; /* process id */
682 thread_id_t tid; /* thread id */
683 client_ptr_t teb; /* thread teb (in process address space) */
684 obj_handle_t handle; /* handle to new thread */
685 } create_thread;
686 struct
688 enum apc_type type; /* APC_DUP_HANDLE */
689 unsigned int status; /* status returned by call */
690 obj_handle_t handle; /* duplicated handle in dst process */
691 } dup_handle;
692 struct
694 enum apc_type type; /* APC_BREAK_PROCESS */
695 unsigned int status; /* status returned by call */
696 } break_process;
697 } apc_result_t;
699 enum irp_type
701 IRP_CALL_NONE,
702 IRP_CALL_CREATE,
703 IRP_CALL_CLOSE,
704 IRP_CALL_READ,
705 IRP_CALL_WRITE,
706 IRP_CALL_FLUSH,
707 IRP_CALL_IOCTL,
708 IRP_CALL_VOLUME,
709 IRP_CALL_FREE,
710 IRP_CALL_CANCEL
713 typedef union
715 enum irp_type type; /* irp call type */
716 struct
718 enum irp_type type; /* IRP_CALL_CREATE */
719 unsigned int access; /* access rights */
720 unsigned int sharing; /* sharing flags */
721 unsigned int options; /* file options */
722 client_ptr_t device; /* opaque ptr for the device */
723 obj_handle_t file; /* file handle */
724 } create;
725 struct
727 enum irp_type type; /* IRP_CALL_CLOSE */
728 int __pad;
729 client_ptr_t file; /* opaque ptr for the file object */
730 } close;
731 struct
733 enum irp_type type; /* IRP_CALL_READ */
734 unsigned int key; /* driver key */
735 data_size_t out_size; /* needed output size */
736 int __pad;
737 client_ptr_t file; /* opaque ptr for the file object */
738 file_pos_t pos; /* file position */
739 } read;
740 struct
742 enum irp_type type; /* IRP_CALL_WRITE */
743 unsigned int key; /* driver key */
744 client_ptr_t file; /* opaque ptr for the file object */
745 file_pos_t pos; /* file position */
746 } write;
747 struct
749 enum irp_type type; /* IRP_CALL_FLUSH */
750 int __pad;
751 client_ptr_t file; /* opaque ptr for the file object */
752 } flush;
753 struct
755 enum irp_type type; /* IRP_CALL_IOCTL */
756 ioctl_code_t code; /* ioctl code */
757 data_size_t out_size; /* needed output size */
758 int __pad;
759 client_ptr_t file; /* opaque ptr for the file object */
760 } ioctl;
761 struct
763 enum irp_type type; /* IRP_CALL_VOLUME */
764 unsigned int info_class;/* information class */
765 data_size_t out_size; /* needed output size */
766 int __pad;
767 client_ptr_t file; /* opaque ptr for the file object */
768 } volume;
769 struct
771 enum irp_type type; /* IRP_CALL_FREE */
772 int __pad;
773 client_ptr_t obj; /* opaque ptr for the freed object */
774 } free;
775 struct
777 enum irp_type type; /* IRP_CALL_CANCEL */
778 int __pad;
779 client_ptr_t irp; /* opaque ptr for canceled irp */
780 } cancel;
781 } irp_params_t;
783 /* information about a PE image mapping, roughly equivalent to SECTION_IMAGE_INFORMATION */
784 typedef struct
786 client_ptr_t base;
787 mem_size_t stack_size;
788 mem_size_t stack_commit;
789 unsigned int entry_point;
790 unsigned int map_size;
791 unsigned int zerobits;
792 unsigned int subsystem;
793 unsigned short subsystem_minor;
794 unsigned short subsystem_major;
795 unsigned short osversion_major;
796 unsigned short osversion_minor;
797 unsigned short image_charact;
798 unsigned short dll_charact;
799 unsigned short machine;
800 unsigned char contains_code;
801 unsigned char image_flags;
802 unsigned int loader_flags;
803 unsigned int header_size;
804 unsigned int file_size;
805 unsigned int checksum;
806 unsigned int dbg_offset;
807 unsigned int dbg_size;
808 } pe_image_info_t;
809 #define IMAGE_FLAGS_ComPlusNativeReady 0x01
810 #define IMAGE_FLAGS_ComPlusILOnly 0x02
811 #define IMAGE_FLAGS_ImageDynamicallyRelocated 0x04
812 #define IMAGE_FLAGS_ImageMappedFlat 0x08
813 #define IMAGE_FLAGS_BaseBelow4gb 0x10
814 #define IMAGE_FLAGS_ComPlusPrefer32bit 0x20
815 #define IMAGE_FLAGS_WineBuiltin 0x40
816 #define IMAGE_FLAGS_WineFakeDll 0x80
818 struct rawinput_device
820 unsigned short usage_page;
821 unsigned short usage;
822 unsigned int flags;
823 user_handle_t target;
826 typedef struct
828 int x;
829 int y;
830 unsigned int time;
831 int __pad;
832 lparam_t info;
833 } cursor_pos_t;
835 /****************************************************************/
836 /* Request declarations */
838 /* Create a new process from the context of the parent */
839 @REQ(new_process)
840 obj_handle_t token; /* process token */
841 obj_handle_t debug; /* process debug object */
842 obj_handle_t parent_process; /* parent process */
843 unsigned int flags; /* process creation flags */
844 int socket_fd; /* file descriptor for process socket */
845 unsigned int access; /* access rights for process object */
846 unsigned short machine; /* architecture that the new process will use */
847 data_size_t info_size; /* size of startup info */
848 data_size_t handles_size; /* length of explicit handles list */
849 data_size_t jobs_size; /* length of jobs list */
850 VARARG(objattr,object_attributes); /* object attributes */
851 VARARG(handles,uints,handles_size); /* handles list */
852 VARARG(jobs,uints,jobs_size); /* jobs list */
853 VARARG(info,startup_info,info_size); /* startup information */
854 VARARG(env,unicode_str); /* environment for new process */
855 @REPLY
856 obj_handle_t info; /* new process info handle */
857 process_id_t pid; /* process id */
858 obj_handle_t handle; /* process handle (in the current process) */
859 @END
862 /* Retrieve information about a newly started process */
863 @REQ(get_new_process_info)
864 obj_handle_t info; /* info handle returned from new_process_request */
865 @REPLY
866 int success; /* did the process start successfully? */
867 int exit_code; /* process exit code if failed */
868 @END
871 /* Create a new thread */
872 @REQ(new_thread)
873 obj_handle_t process; /* process in which to create thread */
874 unsigned int access; /* wanted access rights */
875 int suspend; /* new thread should be suspended on creation */
876 int request_fd; /* fd for request pipe */
877 VARARG(objattr,object_attributes); /* object attributes */
878 @REPLY
879 thread_id_t tid; /* thread id */
880 obj_handle_t handle; /* thread handle (in the current process) */
881 @END
884 /* Retrieve the new process startup info */
885 @REQ(get_startup_info)
886 @REPLY
887 data_size_t info_size; /* size of startup info */
888 VARARG(info,startup_info,info_size); /* startup information */
889 VARARG(env,unicode_str); /* environment */
890 @END
893 /* Signal the end of the process initialization */
894 @REQ(init_process_done)
895 client_ptr_t teb; /* TEB of new thread (in process address space) */
896 client_ptr_t peb; /* PEB of new process (in process address space) */
897 client_ptr_t ldt_copy; /* address of LDT copy (in process address space) */
898 @REPLY
899 client_ptr_t entry; /* process entry point */
900 int suspend; /* is process suspended? */
901 @END
904 /* Initialize the first thread of a new process */
905 @REQ(init_first_thread)
906 int unix_pid; /* Unix pid of new process */
907 int unix_tid; /* Unix tid of new thread */
908 int debug_level; /* new debug level */
909 int reply_fd; /* fd for reply pipe */
910 int wait_fd; /* fd for blocking calls pipe */
911 @REPLY
912 process_id_t pid; /* process id of the new thread's process */
913 thread_id_t tid; /* thread id of the new thread */
914 timeout_t server_start; /* server start time */
915 unsigned int session_id; /* process session id */
916 data_size_t info_size; /* total size of startup info */
917 VARARG(machines,ushorts); /* array of supported machines */
918 @END
921 /* Initialize a new thread; called from the child after pthread_create() */
922 @REQ(init_thread)
923 int unix_tid; /* Unix tid of new thread */
924 int reply_fd; /* fd for reply pipe */
925 int wait_fd; /* fd for blocking calls pipe */
926 client_ptr_t teb; /* TEB of new thread (in thread address space) */
927 client_ptr_t entry; /* entry point (in thread address space) */
928 @REPLY
929 int suspend; /* is thread suspended? */
930 @END
933 /* Terminate a process */
934 @REQ(terminate_process)
935 obj_handle_t handle; /* process handle to terminate */
936 int exit_code; /* process exit code */
937 @REPLY
938 int self; /* suicide? */
939 @END
942 /* Terminate a thread */
943 @REQ(terminate_thread)
944 obj_handle_t handle; /* thread handle to terminate */
945 int exit_code; /* thread exit code */
946 @REPLY
947 int self; /* suicide? */
948 @END
951 /* Retrieve information about a process */
952 @REQ(get_process_info)
953 obj_handle_t handle; /* process handle */
954 @REPLY
955 process_id_t pid; /* server process id */
956 process_id_t ppid; /* server process id of parent */
957 affinity_t affinity; /* process affinity mask */
958 client_ptr_t peb; /* PEB address in process address space */
959 timeout_t start_time; /* process start time */
960 timeout_t end_time; /* process end time */
961 unsigned int session_id; /* process session id */
962 int exit_code; /* process exit code */
963 int priority; /* priority class */
964 unsigned short machine; /* process architecture */
965 VARARG(image,pe_image_info); /* image info for main exe */
966 @END
969 /* Retrieve debug information about a process */
970 @REQ(get_process_debug_info)
971 obj_handle_t handle; /* process handle */
972 @REPLY
973 obj_handle_t debug; /* handle to debug port */
974 int debug_children; /* inherit debugger to child processes */
975 VARARG(image,pe_image_info); /* image info for main exe */
976 @END
979 /* Fetch the name of the process image */
980 @REQ(get_process_image_name)
981 obj_handle_t handle; /* process handle */
982 int win32; /* return a win32 filename? */
983 @REPLY
984 data_size_t len; /* len in bytes required to store filename */
985 VARARG(name,unicode_str); /* image name for main exe */
986 @END
989 /* Retrieve information about a process memory usage */
990 @REQ(get_process_vm_counters)
991 obj_handle_t handle; /* process handle */
992 @REPLY
993 mem_size_t peak_virtual_size; /* peak virtual memory in bytes */
994 mem_size_t virtual_size; /* virtual memory in bytes */
995 mem_size_t peak_working_set_size; /* peak real memory in bytes */
996 mem_size_t working_set_size; /* real memory in bytes */
997 mem_size_t pagefile_usage; /* commit charge in bytes */
998 mem_size_t peak_pagefile_usage; /* peak commit charge in bytes */
999 @END
1002 /* Set a process information */
1003 @REQ(set_process_info)
1004 obj_handle_t handle; /* process handle */
1005 int mask; /* setting mask (see below) */
1006 int priority; /* priority class */
1007 affinity_t affinity; /* affinity mask */
1008 @END
1009 #define SET_PROCESS_INFO_PRIORITY 0x01
1010 #define SET_PROCESS_INFO_AFFINITY 0x02
1013 /* Retrieve information about a thread */
1014 @REQ(get_thread_info)
1015 obj_handle_t handle; /* thread handle */
1016 unsigned int access; /* required access rights */
1017 @REPLY
1018 process_id_t pid; /* server process id */
1019 thread_id_t tid; /* server thread id */
1020 client_ptr_t teb; /* thread teb pointer */
1021 client_ptr_t entry_point; /* thread entry point */
1022 affinity_t affinity; /* thread affinity mask */
1023 int exit_code; /* thread exit code */
1024 int priority; /* thread priority level */
1025 int last; /* last thread in process */
1026 int suspend_count; /* thread suspend count */
1027 int dbg_hidden; /* thread hidden from debugger */
1028 data_size_t desc_len; /* description length in bytes */
1029 VARARG(desc,unicode_str); /* description string */
1030 @END
1033 /* Retrieve information about thread times */
1034 @REQ(get_thread_times)
1035 obj_handle_t handle; /* thread handle */
1036 @REPLY
1037 timeout_t creation_time; /* thread creation time */
1038 timeout_t exit_time; /* thread exit time */
1039 int unix_pid; /* thread native pid */
1040 int unix_tid; /* thread native pid */
1041 @END
1044 /* Set a thread information */
1045 @REQ(set_thread_info)
1046 obj_handle_t handle; /* thread handle */
1047 int mask; /* setting mask (see below) */
1048 int priority; /* priority class */
1049 affinity_t affinity; /* affinity mask */
1050 client_ptr_t entry_point; /* thread entry point */
1051 obj_handle_t token; /* impersonation token */
1052 VARARG(desc,unicode_str); /* description string */
1053 @END
1054 #define SET_THREAD_INFO_PRIORITY 0x01
1055 #define SET_THREAD_INFO_AFFINITY 0x02
1056 #define SET_THREAD_INFO_TOKEN 0x04
1057 #define SET_THREAD_INFO_ENTRYPOINT 0x08
1058 #define SET_THREAD_INFO_DESCRIPTION 0x10
1059 #define SET_THREAD_INFO_DBG_HIDDEN 0x20
1062 /* Suspend a thread */
1063 @REQ(suspend_thread)
1064 obj_handle_t handle; /* thread handle */
1065 @REPLY
1066 int count; /* new suspend count */
1067 @END
1070 /* Resume a thread */
1071 @REQ(resume_thread)
1072 obj_handle_t handle; /* thread handle */
1073 @REPLY
1074 int count; /* new suspend count */
1075 @END
1078 /* Queue an APC for a thread or process */
1079 @REQ(queue_apc)
1080 obj_handle_t handle; /* thread or process handle */
1081 apc_call_t call; /* call arguments */
1082 @REPLY
1083 obj_handle_t handle; /* APC handle */
1084 int self; /* run APC in caller itself? */
1085 @END
1088 /* Get the result of an APC call */
1089 @REQ(get_apc_result)
1090 obj_handle_t handle; /* handle to the APC */
1091 @REPLY
1092 apc_result_t result; /* result of the APC */
1093 @END
1096 /* Close a handle for the current process */
1097 @REQ(close_handle)
1098 obj_handle_t handle; /* handle to close */
1099 @END
1102 /* Set a handle information */
1103 @REQ(set_handle_info)
1104 obj_handle_t handle; /* handle we are interested in */
1105 int flags; /* new handle flags */
1106 int mask; /* mask for flags to set */
1107 @REPLY
1108 int old_flags; /* old flag value */
1109 @END
1112 /* Duplicate a handle */
1113 @REQ(dup_handle)
1114 obj_handle_t src_process; /* src process handle */
1115 obj_handle_t src_handle; /* src handle to duplicate */
1116 obj_handle_t dst_process; /* dst process handle */
1117 unsigned int access; /* wanted access rights */
1118 unsigned int attributes; /* object attributes */
1119 unsigned int options; /* duplicate options */
1120 @REPLY
1121 obj_handle_t handle; /* duplicated handle in dst process */
1122 @END
1125 /* Make an object temporary */
1126 @REQ(make_temporary)
1127 obj_handle_t handle; /* handle to the object */
1128 @END
1131 /* Open a handle to a process */
1132 @REQ(open_process)
1133 process_id_t pid; /* process id to open */
1134 unsigned int access; /* wanted access rights */
1135 unsigned int attributes; /* object attributes */
1136 @REPLY
1137 obj_handle_t handle; /* handle to the process */
1138 @END
1141 /* Open a handle to a thread */
1142 @REQ(open_thread)
1143 thread_id_t tid; /* thread id to open */
1144 unsigned int access; /* wanted access rights */
1145 unsigned int attributes; /* object attributes */
1146 @REPLY
1147 obj_handle_t handle; /* handle to the thread */
1148 @END
1151 /* Wait for handles */
1152 @REQ(select)
1153 int flags; /* wait flags (see below) */
1154 client_ptr_t cookie; /* magic cookie to return to client */
1155 abstime_t timeout; /* timeout */
1156 data_size_t size; /* size of select_op */
1157 obj_handle_t prev_apc; /* handle to previous APC */
1158 VARARG(result,apc_result); /* result of previous APC */
1159 VARARG(data,select_op,size); /* operation-specific data */
1160 VARARG(contexts,contexts); /* suspend context(s) */
1161 @REPLY
1162 apc_call_t call; /* APC call arguments */
1163 obj_handle_t apc_handle; /* handle to next APC */
1164 int signaled; /* were the handles immediately signaled? */
1165 VARARG(contexts,contexts); /* suspend context(s) */
1166 @END
1167 #define SELECT_ALERTABLE 1
1168 #define SELECT_INTERRUPTIBLE 2
1171 /* Create an event */
1172 @REQ(create_event)
1173 unsigned int access; /* wanted access rights */
1174 int manual_reset; /* manual reset event */
1175 int initial_state; /* initial state of the event */
1176 VARARG(objattr,object_attributes); /* object attributes */
1177 @REPLY
1178 obj_handle_t handle; /* handle to the event */
1179 @END
1181 /* Event operation */
1182 @REQ(event_op)
1183 obj_handle_t handle; /* handle to event */
1184 int op; /* event operation (see below) */
1185 @REPLY
1186 int state; /* previous state */
1187 @END
1188 enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT };
1190 @REQ(query_event)
1191 obj_handle_t handle; /* handle to event */
1192 @REPLY
1193 int manual_reset; /* manual reset event */
1194 int state; /* current state of the event */
1195 @END
1197 /* Open an event */
1198 @REQ(open_event)
1199 unsigned int access; /* wanted access rights */
1200 unsigned int attributes; /* object attributes */
1201 obj_handle_t rootdir; /* root directory */
1202 VARARG(name,unicode_str); /* object name */
1203 @REPLY
1204 obj_handle_t handle; /* handle to the event */
1205 @END
1208 /* Create a keyed event */
1209 @REQ(create_keyed_event)
1210 unsigned int access; /* wanted access rights */
1211 VARARG(objattr,object_attributes); /* object attributes */
1212 @REPLY
1213 obj_handle_t handle; /* handle to the event */
1214 @END
1216 /* Open a keyed event */
1217 @REQ(open_keyed_event)
1218 unsigned int access; /* wanted access rights */
1219 unsigned int attributes; /* object attributes */
1220 obj_handle_t rootdir; /* root directory */
1221 VARARG(name,unicode_str); /* object name */
1222 @REPLY
1223 obj_handle_t handle; /* handle to the event */
1224 @END
1227 /* Create a mutex */
1228 @REQ(create_mutex)
1229 unsigned int access; /* wanted access rights */
1230 int owned; /* initially owned? */
1231 VARARG(objattr,object_attributes); /* object attributes */
1232 @REPLY
1233 obj_handle_t handle; /* handle to the mutex */
1234 @END
1237 /* Release a mutex */
1238 @REQ(release_mutex)
1239 obj_handle_t handle; /* handle to the mutex */
1240 @REPLY
1241 unsigned int prev_count; /* value of internal counter, before release */
1242 @END
1245 /* Open a mutex */
1246 @REQ(open_mutex)
1247 unsigned int access; /* wanted access rights */
1248 unsigned int attributes; /* object attributes */
1249 obj_handle_t rootdir; /* root directory */
1250 VARARG(name,unicode_str); /* object name */
1251 @REPLY
1252 obj_handle_t handle; /* handle to the mutex */
1253 @END
1256 /* Query a mutex */
1257 @REQ(query_mutex)
1258 obj_handle_t handle; /* handle to mutex */
1259 @REPLY
1260 unsigned int count; /* current count of mutex */
1261 int owned; /* true if owned by current thread */
1262 int abandoned; /* true if abandoned */
1263 @END
1266 /* Create a semaphore */
1267 @REQ(create_semaphore)
1268 unsigned int access; /* wanted access rights */
1269 unsigned int initial; /* initial count */
1270 unsigned int max; /* maximum count */
1271 VARARG(objattr,object_attributes); /* object attributes */
1272 @REPLY
1273 obj_handle_t handle; /* handle to the semaphore */
1274 @END
1277 /* Release a semaphore */
1278 @REQ(release_semaphore)
1279 obj_handle_t handle; /* handle to the semaphore */
1280 unsigned int count; /* count to add to semaphore */
1281 @REPLY
1282 unsigned int prev_count; /* previous semaphore count */
1283 @END
1285 @REQ(query_semaphore)
1286 obj_handle_t handle; /* handle to the semaphore */
1287 @REPLY
1288 unsigned int current; /* current count */
1289 unsigned int max; /* maximum count */
1290 @END
1292 /* Open a semaphore */
1293 @REQ(open_semaphore)
1294 unsigned int access; /* wanted access rights */
1295 unsigned int attributes; /* object attributes */
1296 obj_handle_t rootdir; /* root directory */
1297 VARARG(name,unicode_str); /* object name */
1298 @REPLY
1299 obj_handle_t handle; /* handle to the semaphore */
1300 @END
1303 /* Create a file */
1304 @REQ(create_file)
1305 unsigned int access; /* wanted access rights */
1306 unsigned int sharing; /* sharing flags */
1307 int create; /* file create action */
1308 unsigned int options; /* file options */
1309 unsigned int attrs; /* file attributes for creation */
1310 VARARG(objattr,object_attributes); /* object attributes */
1311 VARARG(filename,string); /* file name */
1312 @REPLY
1313 obj_handle_t handle; /* handle to the file */
1314 @END
1317 /* Open a file object */
1318 @REQ(open_file_object)
1319 unsigned int access; /* wanted access rights */
1320 unsigned int attributes; /* open attributes */
1321 obj_handle_t rootdir; /* root directory */
1322 unsigned int sharing; /* sharing flags */
1323 unsigned int options; /* file options */
1324 VARARG(filename,unicode_str); /* file name */
1325 @REPLY
1326 obj_handle_t handle; /* handle to the file */
1327 @END
1330 /* Allocate a file handle for a Unix fd */
1331 @REQ(alloc_file_handle)
1332 unsigned int access; /* wanted access rights */
1333 unsigned int attributes; /* object attributes */
1334 int fd; /* file descriptor on the client side */
1335 @REPLY
1336 obj_handle_t handle; /* handle to the file */
1337 @END
1340 /* Get the Unix name from a file handle */
1341 @REQ(get_handle_unix_name)
1342 obj_handle_t handle; /* file handle */
1343 @REPLY
1344 data_size_t name_len; /* unix name length */
1345 VARARG(name,string); /* unix name */
1346 @END
1349 /* Get a Unix fd to access a file */
1350 @REQ(get_handle_fd)
1351 obj_handle_t handle; /* handle to the file */
1352 @REPLY
1353 int type; /* file type (see below) */
1354 int cacheable; /* can fd be cached in the client? */
1355 unsigned int access; /* file access rights */
1356 unsigned int options; /* file open options */
1357 @END
1358 enum server_fd_type
1360 FD_TYPE_INVALID, /* invalid file (no associated fd) */
1361 FD_TYPE_FILE, /* regular file */
1362 FD_TYPE_DIR, /* directory */
1363 FD_TYPE_SOCKET, /* socket */
1364 FD_TYPE_SERIAL, /* serial port */
1365 FD_TYPE_PIPE, /* named pipe */
1366 FD_TYPE_MAILSLOT, /* mailslot */
1367 FD_TYPE_CHAR, /* unspecified char device */
1368 FD_TYPE_DEVICE, /* Windows device file */
1369 FD_TYPE_NB_TYPES
1373 /* Retrieve (or allocate) the client-side directory cache entry */
1374 @REQ(get_directory_cache_entry)
1375 obj_handle_t handle; /* handle to the directory */
1376 @REPLY
1377 int entry; /* cache entry on the client side */
1378 VARARG(free,ints); /* entries that can be freed */
1379 @END
1382 /* Flush a file buffers */
1383 @REQ(flush)
1384 async_data_t async; /* async I/O parameters */
1385 @REPLY
1386 obj_handle_t event; /* event set when finished */
1387 @END
1389 /* Query file information */
1390 @REQ(get_file_info)
1391 obj_handle_t handle; /* handle to the file */
1392 unsigned int info_class; /* queried information class */
1393 @REPLY
1394 VARARG(data,bytes); /* file info data */
1395 @END
1397 /* Query volume information */
1398 @REQ(get_volume_info)
1399 obj_handle_t handle; /* handle to the file */
1400 async_data_t async; /* async I/O parameters */
1401 unsigned int info_class; /* queried information class */
1402 @REPLY
1403 obj_handle_t wait; /* handle to wait on for blocking read */
1404 VARARG(data,bytes); /* volume info data */
1405 @END
1407 /* Lock a region of a file */
1408 @REQ(lock_file)
1409 obj_handle_t handle; /* handle to the file */
1410 file_pos_t offset; /* offset of start of lock */
1411 file_pos_t count; /* count of bytes to lock */
1412 int shared; /* shared or exclusive lock? */
1413 int wait; /* do we want to wait? */
1414 @REPLY
1415 obj_handle_t handle; /* handle to wait on */
1416 int overlapped; /* is it an overlapped I/O handle? */
1417 @END
1420 /* Unlock a region of a file */
1421 @REQ(unlock_file)
1422 obj_handle_t handle; /* handle to the file */
1423 file_pos_t offset; /* offset of start of unlock */
1424 file_pos_t count; /* count of bytes to unlock */
1425 @END
1428 /* Perform a recv on a socket */
1429 @REQ(recv_socket)
1430 int oob; /* are we receiving OOB data? */
1431 async_data_t async; /* async I/O parameters */
1432 unsigned int status; /* status of initial call */
1433 unsigned int total; /* number of bytes already read */
1434 @REPLY
1435 obj_handle_t wait; /* handle to wait on for blocking recv */
1436 unsigned int options; /* device open options */
1437 @END
1440 struct poll_socket_input
1442 obj_handle_t socket; /* socket handle */
1443 int flags; /* events to poll for */
1446 struct poll_socket_output
1448 int flags; /* events signaled */
1449 unsigned int status; /* socket status */
1452 /* Perform an async poll on a socket */
1453 @REQ(poll_socket)
1454 int exclusive; /* is the poll exclusive? */
1455 async_data_t async; /* async I/O parameters */
1456 timeout_t timeout; /* timeout */
1457 VARARG(sockets,poll_socket_input); /* list of sockets to poll */
1458 @REPLY
1459 obj_handle_t wait; /* handle to wait on for blocking poll */
1460 unsigned int options; /* file open options */
1461 VARARG(sockets,poll_socket_output); /* data returned */
1462 @END
1465 /* Perform a send on a socket */
1466 @REQ(send_socket)
1467 async_data_t async; /* async I/O parameters */
1468 unsigned int status; /* status of initial call */
1469 unsigned int total; /* number of bytes already sent */
1470 @REPLY
1471 obj_handle_t wait; /* handle to wait on for blocking send */
1472 unsigned int options; /* device open options */
1473 @END
1476 /* Retrieve the next pending console ioctl request */
1477 @REQ(get_next_console_request)
1478 obj_handle_t handle; /* console server handle */
1479 int signal; /* server signal state */
1480 int read; /* 1 if reporting result of blocked read ioctl */
1481 unsigned int status; /* status of previous ioctl */
1482 VARARG(out_data,bytes); /* out_data of previous ioctl */
1483 @REPLY
1484 unsigned int code; /* ioctl code */
1485 unsigned int output; /* output id or 0 for input */
1486 data_size_t out_size; /* ioctl output size */
1487 VARARG(in_data,bytes); /* ioctl in_data */
1488 @END
1491 /* enable directory change notifications */
1492 @REQ(read_directory_changes)
1493 unsigned int filter; /* notification filter */
1494 int subtree; /* watch the subtree? */
1495 int want_data; /* flag indicating whether change data should be collected */
1496 async_data_t async; /* async I/O parameters */
1497 @END
1500 @REQ(read_change)
1501 obj_handle_t handle;
1502 @REPLY
1503 VARARG(events,filesystem_event); /* collected filesystem events */
1504 @END
1507 /* Create a file mapping */
1508 @REQ(create_mapping)
1509 unsigned int access; /* wanted access rights */
1510 unsigned int flags; /* SEC_* flags */
1511 unsigned int file_access; /* file access rights */
1512 mem_size_t size; /* mapping size */
1513 obj_handle_t file_handle; /* file handle */
1514 VARARG(objattr,object_attributes); /* object attributes */
1515 @REPLY
1516 obj_handle_t handle; /* handle to the mapping */
1517 @END
1520 /* Open a mapping */
1521 @REQ(open_mapping)
1522 unsigned int access; /* wanted access rights */
1523 unsigned int attributes; /* object attributes */
1524 obj_handle_t rootdir; /* root directory */
1525 VARARG(name,unicode_str); /* object name */
1526 @REPLY
1527 obj_handle_t handle; /* handle to the mapping */
1528 @END
1531 /* Get information about a file mapping */
1532 @REQ(get_mapping_info)
1533 obj_handle_t handle; /* handle to the mapping */
1534 unsigned int access; /* wanted access rights */
1535 @REPLY
1536 mem_size_t size; /* mapping size */
1537 unsigned int flags; /* SEC_* flags */
1538 obj_handle_t shared_file; /* shared mapping file handle */
1539 data_size_t total; /* total required buffer size in bytes */
1540 VARARG(image,pe_image_info);/* image info for SEC_IMAGE mappings */
1541 VARARG(name,unicode_str); /* filename for SEC_IMAGE mappings */
1542 @END
1545 /* Add a memory view in the current process */
1546 @REQ(map_view)
1547 obj_handle_t mapping; /* file mapping handle, or 0 for .so builtin */
1548 unsigned int access; /* wanted access rights */
1549 client_ptr_t base; /* view base address (page-aligned) */
1550 mem_size_t size; /* view size */
1551 file_pos_t start; /* start offset in mapping */
1552 VARARG(image,pe_image_info);/* image info for .so builtins */
1553 VARARG(name,unicode_str); /* image filename for .so builtins */
1554 @END
1557 /* Unmap a memory view from the current process */
1558 @REQ(unmap_view)
1559 client_ptr_t base; /* view base address */
1560 @END
1563 /* Get a range of committed pages in a file mapping */
1564 @REQ(get_mapping_committed_range)
1565 client_ptr_t base; /* view base address */
1566 file_pos_t offset; /* starting offset (page-aligned, in bytes) */
1567 @REPLY
1568 mem_size_t size; /* size of range starting at offset (page-aligned, in bytes) */
1569 int committed; /* whether it is a committed range */
1570 @END
1573 /* Add a range to the committed pages in a file mapping */
1574 @REQ(add_mapping_committed_range)
1575 client_ptr_t base; /* view base address */
1576 file_pos_t offset; /* starting offset (page-aligned, in bytes) */
1577 mem_size_t size; /* size to set (page-aligned, in bytes) or 0 if only retrieving */
1578 @END
1581 /* Check if two memory maps are for the same file */
1582 @REQ(is_same_mapping)
1583 client_ptr_t base1; /* first view base address */
1584 client_ptr_t base2; /* second view base address */
1585 @END
1588 /* Get the filename of a mapping */
1589 @REQ(get_mapping_filename)
1590 obj_handle_t process; /* process handle */
1591 client_ptr_t addr; /* address inside mapped view (in process address space) */
1592 @REPLY
1593 data_size_t len; /* total filename length in bytes */
1594 VARARG(filename,unicode_str); /* filename in NT format */
1595 @END
1598 struct thread_info
1600 timeout_t start_time;
1601 thread_id_t tid;
1602 int base_priority;
1603 int current_priority;
1604 int unix_tid;
1605 client_ptr_t teb;
1606 client_ptr_t entry_point;
1609 struct process_info
1611 timeout_t start_time;
1612 data_size_t name_len;
1613 int thread_count;
1614 int priority;
1615 process_id_t pid;
1616 process_id_t parent_pid;
1617 unsigned int session_id;
1618 int handle_count;
1619 int unix_pid;
1620 /* VARARG(name,unicode_str,name_len); */
1621 /* VARARG(threads,struct thread_info,thread_count); */
1624 /* Get a list of processes and threads currently running */
1625 @REQ(list_processes)
1626 @REPLY
1627 data_size_t info_size;
1628 int process_count;
1629 int total_thread_count;
1630 data_size_t total_name_len;
1631 VARARG(data,process_info,info_size);
1632 @END
1635 /* Create a debug object */
1636 @REQ(create_debug_obj)
1637 unsigned int access; /* wanted access rights */
1638 unsigned int flags; /* object flags */
1639 VARARG(objattr,object_attributes); /* object attributes */
1640 @REPLY
1641 obj_handle_t handle; /* handle to the debug object */
1642 @END
1645 /* Wait for a debug event */
1646 @REQ(wait_debug_event)
1647 obj_handle_t debug; /* debug object */
1648 @REPLY
1649 process_id_t pid; /* process id */
1650 thread_id_t tid; /* thread id */
1651 VARARG(event,debug_event); /* debug event data */
1652 @END
1655 /* Queue an exception event */
1656 @REQ(queue_exception_event)
1657 int first; /* first chance exception? */
1658 unsigned int code; /* exception code */
1659 unsigned int flags; /* exception flags */
1660 client_ptr_t record; /* exception record */
1661 client_ptr_t address; /* exception address */
1662 data_size_t len; /* size of parameters */
1663 VARARG(params,uints64,len);/* exception parameters */
1664 @REPLY
1665 obj_handle_t handle; /* handle to the queued event */
1666 @END
1669 /* Retrieve the status of an exception event */
1670 @REQ(get_exception_status)
1671 obj_handle_t handle; /* handle to the queued event */
1672 @END
1675 /* Continue a debug event */
1676 @REQ(continue_debug_event)
1677 obj_handle_t debug; /* debug object */
1678 process_id_t pid; /* process id to continue */
1679 thread_id_t tid; /* thread id to continue */
1680 unsigned int status; /* continuation status */
1681 @END
1684 /* Start or stop debugging an existing process */
1685 @REQ(debug_process)
1686 obj_handle_t handle; /* process handle */
1687 obj_handle_t debug; /* debug object to attach to the process */
1688 int attach; /* 1=attaching / 0=detaching from the process */
1689 @END
1692 /* Set debug object information */
1693 @REQ(set_debug_obj_info)
1694 obj_handle_t debug; /* debug object */
1695 unsigned int flags; /* object flags */
1696 @END
1699 /* Read data from a process address space */
1700 @REQ(read_process_memory)
1701 obj_handle_t handle; /* process handle */
1702 client_ptr_t addr; /* addr to read from */
1703 @REPLY
1704 VARARG(data,bytes); /* result data */
1705 @END
1708 /* Write data to a process address space */
1709 @REQ(write_process_memory)
1710 obj_handle_t handle; /* process handle */
1711 client_ptr_t addr; /* addr to write to */
1712 VARARG(data,bytes); /* data to write */
1713 @END
1716 /* Create a registry key */
1717 @REQ(create_key)
1718 unsigned int access; /* desired access rights */
1719 unsigned int options; /* creation options */
1720 VARARG(objattr,object_attributes); /* object attributes */
1721 VARARG(class,unicode_str); /* class name */
1722 @REPLY
1723 obj_handle_t hkey; /* handle to the created key */
1724 int created; /* has it been newly created? */
1725 @END
1727 /* Open a registry key */
1728 @REQ(open_key)
1729 obj_handle_t parent; /* handle to the parent key */
1730 unsigned int access; /* desired access rights */
1731 unsigned int attributes; /* object attributes */
1732 VARARG(name,unicode_str); /* key name */
1733 @REPLY
1734 obj_handle_t hkey; /* handle to the open key */
1735 @END
1738 /* Delete a registry key */
1739 @REQ(delete_key)
1740 obj_handle_t hkey; /* handle to the key */
1741 @END
1744 /* Flush a registry key */
1745 @REQ(flush_key)
1746 obj_handle_t hkey; /* handle to the key */
1747 @END
1750 /* Enumerate registry subkeys */
1751 @REQ(enum_key)
1752 obj_handle_t hkey; /* handle to registry key */
1753 int index; /* index of subkey (or -1 for current key) */
1754 int info_class; /* requested information class */
1755 @REPLY
1756 int subkeys; /* number of subkeys */
1757 int max_subkey; /* longest subkey name */
1758 int max_class; /* longest class name */
1759 int values; /* number of values */
1760 int max_value; /* longest value name */
1761 int max_data; /* longest value data */
1762 timeout_t modif; /* last modification time */
1763 data_size_t total; /* total length needed for full name and class */
1764 data_size_t namelen; /* length of key name in bytes */
1765 VARARG(name,unicode_str,namelen); /* key name */
1766 VARARG(class,unicode_str); /* class name */
1767 @END
1770 /* Set a value of a registry key */
1771 @REQ(set_key_value)
1772 obj_handle_t hkey; /* handle to registry key */
1773 int type; /* value type */
1774 data_size_t namelen; /* length of value name in bytes */
1775 VARARG(name,unicode_str,namelen); /* value name */
1776 VARARG(data,bytes); /* value data */
1777 @END
1780 /* Retrieve the value of a registry key */
1781 @REQ(get_key_value)
1782 obj_handle_t hkey; /* handle to registry key */
1783 VARARG(name,unicode_str); /* value name */
1784 @REPLY
1785 int type; /* value type */
1786 data_size_t total; /* total length needed for data */
1787 VARARG(data,bytes); /* value data */
1788 @END
1791 /* Enumerate a value of a registry key */
1792 @REQ(enum_key_value)
1793 obj_handle_t hkey; /* handle to registry key */
1794 int index; /* value index */
1795 int info_class; /* requested information class */
1796 @REPLY
1797 int type; /* value type */
1798 data_size_t total; /* total length needed for full name and data */
1799 data_size_t namelen; /* length of value name in bytes */
1800 VARARG(name,unicode_str,namelen); /* value name */
1801 VARARG(data,bytes); /* value data */
1802 @END
1805 /* Delete a value of a registry key */
1806 @REQ(delete_key_value)
1807 obj_handle_t hkey; /* handle to registry key */
1808 VARARG(name,unicode_str); /* value name */
1809 @END
1812 /* Load a registry branch from a file */
1813 @REQ(load_registry)
1814 obj_handle_t file; /* file to load from */
1815 VARARG(objattr,object_attributes); /* object attributes */
1816 @END
1819 /* UnLoad a registry branch from a file */
1820 @REQ(unload_registry)
1821 obj_handle_t parent; /* handle to the parent key */
1822 unsigned int attributes; /* object attributes */
1823 VARARG(name,unicode_str); /* key name */
1824 @END
1827 /* Save a registry branch to a file */
1828 @REQ(save_registry)
1829 obj_handle_t hkey; /* key to save */
1830 obj_handle_t file; /* file to save to */
1831 @END
1834 /* Add a registry key change notification */
1835 @REQ(set_registry_notification)
1836 obj_handle_t hkey; /* key to watch for changes */
1837 obj_handle_t event; /* event to set */
1838 int subtree; /* should we watch the whole subtree? */
1839 unsigned int filter; /* things to watch */
1840 @END
1843 /* Create a waitable timer */
1844 @REQ(create_timer)
1845 unsigned int access; /* wanted access rights */
1846 int manual; /* manual reset */
1847 VARARG(objattr,object_attributes); /* object attributes */
1848 @REPLY
1849 obj_handle_t handle; /* handle to the timer */
1850 @END
1853 /* Open a waitable timer */
1854 @REQ(open_timer)
1855 unsigned int access; /* wanted access rights */
1856 unsigned int attributes; /* object attributes */
1857 obj_handle_t rootdir; /* root directory */
1858 VARARG(name,unicode_str); /* object name */
1859 @REPLY
1860 obj_handle_t handle; /* handle to the timer */
1861 @END
1863 /* Set a waitable timer */
1864 @REQ(set_timer)
1865 obj_handle_t handle; /* handle to the timer */
1866 timeout_t expire; /* next expiration absolute time */
1867 client_ptr_t callback; /* callback function */
1868 client_ptr_t arg; /* callback argument */
1869 int period; /* timer period in ms */
1870 @REPLY
1871 int signaled; /* was the timer signaled before this call ? */
1872 @END
1874 /* Cancel a waitable timer */
1875 @REQ(cancel_timer)
1876 obj_handle_t handle; /* handle to the timer */
1877 @REPLY
1878 int signaled; /* was the timer signaled before this calltime ? */
1879 @END
1881 /* Get information on a waitable timer */
1882 @REQ(get_timer_info)
1883 obj_handle_t handle; /* handle to the timer */
1884 @REPLY
1885 timeout_t when; /* absolute time when the timer next expires */
1886 int signaled; /* is the timer signaled? */
1887 @END
1890 /* Retrieve the current context of a thread */
1891 @REQ(get_thread_context)
1892 obj_handle_t handle; /* thread handle */
1893 obj_handle_t context; /* context handle */
1894 unsigned int flags; /* context flags */
1895 unsigned short machine; /* context architecture */
1896 @REPLY
1897 int self; /* was it a handle to the current thread? */
1898 obj_handle_t handle; /* pending context handle */
1899 VARARG(contexts,contexts); /* thread context(s) */
1900 @END
1903 /* Set the current context of a thread */
1904 @REQ(set_thread_context)
1905 obj_handle_t handle; /* thread handle */
1906 VARARG(contexts,contexts); /* thread context(s) */
1907 @REPLY
1908 int self; /* was it a handle to the current thread? */
1909 @END
1912 /* Fetch a selector entry for a thread */
1913 @REQ(get_selector_entry)
1914 obj_handle_t handle; /* thread handle */
1915 int entry; /* LDT entry */
1916 @REPLY
1917 unsigned int base; /* selector base */
1918 unsigned int limit; /* selector limit */
1919 unsigned char flags; /* selector flags */
1920 @END
1923 /* Add an atom */
1924 @REQ(add_atom)
1925 VARARG(name,unicode_str); /* atom name */
1926 @REPLY
1927 atom_t atom; /* resulting atom */
1928 @END
1931 /* Delete an atom */
1932 @REQ(delete_atom)
1933 atom_t atom; /* atom handle */
1934 @END
1937 /* Find an atom */
1938 @REQ(find_atom)
1939 VARARG(name,unicode_str); /* atom name */
1940 @REPLY
1941 atom_t atom; /* atom handle */
1942 @END
1945 /* Get information about an atom */
1946 @REQ(get_atom_information)
1947 atom_t atom; /* atom handle */
1948 @REPLY
1949 int count; /* atom lock count */
1950 int pinned; /* whether the atom has been pinned */
1951 data_size_t total; /* actual length of atom name */
1952 VARARG(name,unicode_str); /* atom name */
1953 @END
1956 /* Get the message queue of the current thread */
1957 @REQ(get_msg_queue)
1958 @REPLY
1959 obj_handle_t handle; /* handle to the queue */
1960 @END
1963 /* Set the file descriptor associated to the current thread queue */
1964 @REQ(set_queue_fd)
1965 obj_handle_t handle; /* handle to the file descriptor */
1966 @END
1969 /* Set the current message queue wakeup mask */
1970 @REQ(set_queue_mask)
1971 unsigned int wake_mask; /* wakeup bits mask */
1972 unsigned int changed_mask; /* changed bits mask */
1973 int skip_wait; /* will we skip waiting if signaled? */
1974 @REPLY
1975 unsigned int wake_bits; /* current wake bits */
1976 unsigned int changed_bits; /* current changed bits */
1977 @END
1980 /* Get the current message queue status */
1981 @REQ(get_queue_status)
1982 unsigned int clear_bits; /* should we clear the change bits? */
1983 @REPLY
1984 unsigned int wake_bits; /* wake bits */
1985 unsigned int changed_bits; /* changed bits since last time */
1986 @END
1989 /* Retrieve the process idle event */
1990 @REQ(get_process_idle_event)
1991 obj_handle_t handle; /* process handle */
1992 @REPLY
1993 obj_handle_t event; /* handle to idle event */
1994 @END
1997 /* Send a message to a thread queue */
1998 @REQ(send_message)
1999 thread_id_t id; /* thread id */
2000 int type; /* message type (see below) */
2001 int flags; /* message flags (see below) */
2002 user_handle_t win; /* window handle */
2003 unsigned int msg; /* message code */
2004 lparam_t wparam; /* parameters */
2005 lparam_t lparam; /* parameters */
2006 timeout_t timeout; /* timeout for reply */
2007 VARARG(data,message_data); /* message data for sent messages */
2008 @END
2010 @REQ(post_quit_message)
2011 int exit_code; /* exit code to return */
2012 @END
2014 enum message_type
2016 MSG_ASCII, /* Ascii message (from SendMessageA) */
2017 MSG_UNICODE, /* Unicode message (from SendMessageW) */
2018 MSG_NOTIFY, /* notify message (from SendNotifyMessageW), always Unicode */
2019 MSG_CALLBACK, /* callback message (from SendMessageCallbackW), always Unicode */
2020 MSG_CALLBACK_RESULT,/* result of a callback message */
2021 MSG_OTHER_PROCESS, /* sent from other process, may include vararg data, always Unicode */
2022 MSG_POSTED, /* posted message (from PostMessageW), always Unicode */
2023 MSG_HARDWARE, /* hardware message */
2024 MSG_WINEVENT, /* winevent message */
2025 MSG_HOOK_LL /* low-level hardware hook */
2027 #define SEND_MSG_ABORT_IF_HUNG 0x01
2030 /* Send a hardware message to a thread queue */
2031 @REQ(send_hardware_message)
2032 user_handle_t win; /* window handle */
2033 hw_input_t input; /* input data */
2034 unsigned int flags; /* flags (see below) */
2035 VARARG(report,bytes); /* HID report data */
2036 @REPLY
2037 int wait; /* do we need to wait for a reply? */
2038 int prev_x; /* previous cursor position */
2039 int prev_y;
2040 int new_x; /* new cursor position */
2041 int new_y;
2042 VARARG(keystate,bytes); /* global state array for all the keys */
2043 @END
2044 #define SEND_HWMSG_INJECTED 0x01
2047 /* Get a message from the current queue */
2048 @REQ(get_message)
2049 unsigned int flags; /* PM_* flags */
2050 user_handle_t get_win; /* window handle to get */
2051 unsigned int get_first; /* first message code to get */
2052 unsigned int get_last; /* last message code to get */
2053 unsigned int hw_id; /* id of the previous hardware message (or 0) */
2054 unsigned int wake_mask; /* wakeup bits mask */
2055 unsigned int changed_mask; /* changed bits mask */
2056 @REPLY
2057 user_handle_t win; /* window handle */
2058 unsigned int msg; /* message code */
2059 lparam_t wparam; /* parameters */
2060 lparam_t lparam; /* parameters */
2061 int type; /* message type */
2062 int x; /* message x position */
2063 int y; /* message y position */
2064 unsigned int time; /* message time */
2065 unsigned int active_hooks; /* active hooks bitmap */
2066 data_size_t total; /* total size of extra data */
2067 VARARG(data,message_data); /* message data for sent messages */
2068 @END
2071 /* Reply to a sent message */
2072 @REQ(reply_message)
2073 int remove; /* should we remove the message? */
2074 lparam_t result; /* message result */
2075 VARARG(data,bytes); /* message data for sent messages */
2076 @END
2079 /* Accept and remove the current hardware message */
2080 @REQ(accept_hardware_message)
2081 unsigned int hw_id; /* id of the hardware message */
2082 @END
2085 /* Retrieve the reply for the last message sent */
2086 @REQ(get_message_reply)
2087 int cancel; /* cancel message if not ready? */
2088 @REPLY
2089 lparam_t result; /* message result */
2090 VARARG(data,bytes); /* message data for sent messages */
2091 @END
2094 /* Set a window timer */
2095 @REQ(set_win_timer)
2096 user_handle_t win; /* window handle */
2097 unsigned int msg; /* message to post */
2098 unsigned int rate; /* timer rate in ms */
2099 lparam_t id; /* timer id */
2100 lparam_t lparam; /* message lparam (callback proc) */
2101 @REPLY
2102 lparam_t id; /* timer id */
2103 @END
2106 /* Kill a window timer */
2107 @REQ(kill_win_timer)
2108 user_handle_t win; /* window handle */
2109 lparam_t id; /* timer id */
2110 unsigned int msg; /* message to post */
2111 @END
2114 /* check if the thread owning the window is hung */
2115 @REQ(is_window_hung)
2116 user_handle_t win; /* window handle */
2117 @REPLY
2118 int is_hung;
2119 @END
2122 /* Retrieve info about a serial port */
2123 @REQ(get_serial_info)
2124 obj_handle_t handle; /* handle to comm port */
2125 int flags;
2126 @REPLY
2127 unsigned int eventmask;
2128 unsigned int cookie;
2129 unsigned int pending_write;
2130 @END
2133 /* Set info about a serial port */
2134 @REQ(set_serial_info)
2135 obj_handle_t handle; /* handle to comm port */
2136 int flags; /* bitmask to set values (see below) */
2137 @END
2138 #define SERIALINFO_PENDING_WRITE 0x04
2139 #define SERIALINFO_PENDING_WAIT 0x08
2142 /* Create an async I/O */
2143 @REQ(register_async)
2144 int type; /* type of queue to look after */
2145 async_data_t async; /* async I/O parameters */
2146 int count; /* count - usually # of bytes to be read/written */
2147 @END
2148 #define ASYNC_TYPE_READ 0x01
2149 #define ASYNC_TYPE_WRITE 0x02
2150 #define ASYNC_TYPE_WAIT 0x03
2153 /* Cancel all async op on a fd */
2154 @REQ(cancel_async)
2155 obj_handle_t handle; /* handle to comm port, socket or file */
2156 client_ptr_t iosb; /* I/O status block (NULL=all) */
2157 int only_thread; /* cancel matching this thread */
2158 @END
2161 /* Retrieve results of an async */
2162 @REQ(get_async_result)
2163 client_ptr_t user_arg; /* user arg used to identify async */
2164 @REPLY
2165 VARARG(out_data,bytes); /* iosb output data */
2166 @END
2169 /* Perform a read on a file object */
2170 @REQ(read)
2171 async_data_t async; /* async I/O parameters */
2172 file_pos_t pos; /* read position */
2173 @REPLY
2174 obj_handle_t wait; /* handle to wait on for blocking read */
2175 unsigned int options; /* device open options */
2176 VARARG(data,bytes); /* read data */
2177 @END
2180 /* Perform a write on a file object */
2181 @REQ(write)
2182 async_data_t async; /* async I/O parameters */
2183 file_pos_t pos; /* write position */
2184 VARARG(data,bytes); /* write data */
2185 @REPLY
2186 obj_handle_t wait; /* handle to wait on for blocking write */
2187 unsigned int options; /* device open options */
2188 data_size_t size; /* size written */
2189 @END
2192 /* Perform an ioctl on a file */
2193 @REQ(ioctl)
2194 ioctl_code_t code; /* ioctl code */
2195 async_data_t async; /* async I/O parameters */
2196 VARARG(in_data,bytes); /* ioctl input data */
2197 @REPLY
2198 obj_handle_t wait; /* handle to wait on for blocking ioctl */
2199 unsigned int options; /* device open options */
2200 VARARG(out_data,bytes); /* ioctl output data */
2201 @END
2204 /* Store results of an async irp */
2205 @REQ(set_irp_result)
2206 obj_handle_t handle; /* handle to the irp */
2207 unsigned int status; /* status of the irp */
2208 data_size_t size; /* result size (input or output depending on the operation) */
2209 VARARG(data,bytes); /* output data of the irp */
2210 @END
2213 /* Create a named pipe */
2214 @REQ(create_named_pipe)
2215 unsigned int access;
2216 unsigned int options;
2217 unsigned int sharing;
2218 unsigned int maxinstances;
2219 unsigned int outsize;
2220 unsigned int insize;
2221 timeout_t timeout;
2222 unsigned int flags;
2223 VARARG(objattr,object_attributes); /* object attributes */
2224 @REPLY
2225 obj_handle_t handle; /* handle to the pipe */
2226 @END
2228 /* flags in create_named_pipe and get_named_pipe_info */
2229 #define NAMED_PIPE_MESSAGE_STREAM_WRITE 0x0001
2230 #define NAMED_PIPE_MESSAGE_STREAM_READ 0x0002
2231 #define NAMED_PIPE_NONBLOCKING_MODE 0x0004
2232 #define NAMED_PIPE_SERVER_END 0x8000
2234 /* Set named pipe information by handle */
2235 @REQ(set_named_pipe_info)
2236 obj_handle_t handle;
2237 unsigned int flags;
2238 @END
2240 /* Create a window */
2241 @REQ(create_window)
2242 user_handle_t parent; /* parent window */
2243 user_handle_t owner; /* owner window */
2244 atom_t atom; /* class atom */
2245 mod_handle_t instance; /* module instance */
2246 int dpi; /* system DPI */
2247 int awareness; /* thread DPI awareness */
2248 unsigned int style; /* window style */
2249 unsigned int ex_style; /* window extended style */
2250 VARARG(class,unicode_str); /* class name */
2251 @REPLY
2252 user_handle_t handle; /* created window */
2253 user_handle_t parent; /* full handle of parent */
2254 user_handle_t owner; /* full handle of owner */
2255 int extra; /* number of extra bytes */
2256 client_ptr_t class_ptr; /* pointer to class in client address space */
2257 int dpi; /* window DPI if not per-monitor aware */
2258 int awareness; /* window DPI awareness */
2259 @END
2262 /* Destroy a window */
2263 @REQ(destroy_window)
2264 user_handle_t handle; /* handle to the window */
2265 @END
2268 /* Retrieve the desktop window for the current thread */
2269 @REQ(get_desktop_window)
2270 int force; /* force creation if it doesn't exist */
2271 @REPLY
2272 user_handle_t top_window; /* handle to the desktop window */
2273 user_handle_t msg_window; /* handle to the top-level HWND_MESSAGE parent */
2274 @END
2277 /* Set a window owner */
2278 @REQ(set_window_owner)
2279 user_handle_t handle; /* handle to the window */
2280 user_handle_t owner; /* new owner */
2281 @REPLY
2282 user_handle_t full_owner; /* full handle of new owner */
2283 user_handle_t prev_owner; /* full handle of previous owner */
2284 @END
2287 /* Get information from a window handle */
2288 @REQ(get_window_info)
2289 user_handle_t handle; /* handle to the window */
2290 @REPLY
2291 user_handle_t full_handle; /* full 32-bit handle */
2292 user_handle_t last_active; /* last active popup */
2293 process_id_t pid; /* process owning the window */
2294 thread_id_t tid; /* thread owning the window */
2295 atom_t atom; /* class atom */
2296 int is_unicode; /* ANSI or unicode */
2297 int dpi; /* window DPI */
2298 int awareness; /* DPI awareness */
2299 @END
2302 /* Set some information in a window */
2303 @REQ(set_window_info)
2304 unsigned short flags; /* flags for fields to set (see below) */
2305 short int is_unicode; /* ANSI or unicode */
2306 user_handle_t handle; /* handle to the window */
2307 unsigned int style; /* window style */
2308 unsigned int ex_style; /* window extended style */
2309 unsigned int id; /* window id */
2310 mod_handle_t instance; /* creator instance */
2311 lparam_t user_data; /* user-specific data */
2312 int extra_offset; /* offset to set in extra bytes */
2313 data_size_t extra_size; /* size to set in extra bytes */
2314 lparam_t extra_value; /* value to set in extra bytes */
2315 @REPLY
2316 unsigned int old_style; /* old window style */
2317 unsigned int old_ex_style; /* old window extended style */
2318 mod_handle_t old_instance; /* old creator instance */
2319 lparam_t old_user_data; /* old user-specific data */
2320 lparam_t old_extra_value; /* old value in extra bytes */
2321 unsigned int old_id; /* old window id */
2322 @END
2323 #define SET_WIN_STYLE 0x01
2324 #define SET_WIN_EXSTYLE 0x02
2325 #define SET_WIN_ID 0x04
2326 #define SET_WIN_INSTANCE 0x08
2327 #define SET_WIN_USERDATA 0x10
2328 #define SET_WIN_EXTRA 0x20
2329 #define SET_WIN_UNICODE 0x40
2332 /* Set the parent of a window */
2333 @REQ(set_parent)
2334 user_handle_t handle; /* handle to the window */
2335 user_handle_t parent; /* handle to the parent */
2336 @REPLY
2337 user_handle_t old_parent; /* old parent window */
2338 user_handle_t full_parent; /* full handle of new parent */
2339 int dpi; /* new window DPI if not per-monitor aware */
2340 int awareness; /* new DPI awareness */
2341 @END
2344 /* Get a list of the window parents, up to the root of the tree */
2345 @REQ(get_window_parents)
2346 user_handle_t handle; /* handle to the window */
2347 @REPLY
2348 int count; /* total count of parents */
2349 VARARG(parents,user_handles); /* parent handles */
2350 @END
2353 /* Get a list of the window children */
2354 @REQ(get_window_children)
2355 obj_handle_t desktop; /* handle to desktop */
2356 user_handle_t parent; /* parent window */
2357 atom_t atom; /* class atom for the listed children */
2358 thread_id_t tid; /* thread owning the listed children */
2359 VARARG(class,unicode_str); /* class name */
2360 @REPLY
2361 int count; /* total count of children */
2362 VARARG(children,user_handles); /* children handles */
2363 @END
2366 /* Get a list of the window children that contain a given point */
2367 @REQ(get_window_children_from_point)
2368 user_handle_t parent; /* parent window */
2369 int x; /* point in parent coordinates */
2370 int y;
2371 int dpi; /* dpi for the point coordinates */
2372 @REPLY
2373 int count; /* total count of children */
2374 VARARG(children,user_handles); /* children handles */
2375 @END
2378 /* Get window tree information from a window handle */
2379 @REQ(get_window_tree)
2380 user_handle_t handle; /* handle to the window */
2381 @REPLY
2382 user_handle_t parent; /* parent window */
2383 user_handle_t owner; /* owner window */
2384 user_handle_t next_sibling; /* next sibling in Z-order */
2385 user_handle_t prev_sibling; /* prev sibling in Z-order */
2386 user_handle_t first_sibling; /* first sibling in Z-order */
2387 user_handle_t last_sibling; /* last sibling in Z-order */
2388 user_handle_t first_child; /* first child */
2389 user_handle_t last_child; /* last child */
2390 @END
2392 /* Set the position and Z order of a window */
2393 @REQ(set_window_pos)
2394 unsigned short swp_flags; /* SWP_* flags */
2395 unsigned short paint_flags; /* paint flags (see below) */
2396 user_handle_t handle; /* handle to the window */
2397 user_handle_t previous; /* previous window in Z order */
2398 rectangle_t window; /* window rectangle (in parent coords) */
2399 rectangle_t client; /* client rectangle (in parent coords) */
2400 VARARG(valid,rectangles); /* valid rectangles from WM_NCCALCSIZE (in parent coords) */
2401 @REPLY
2402 unsigned int new_style; /* new window style */
2403 unsigned int new_ex_style; /* new window extended style */
2404 user_handle_t surface_win; /* parent window that holds the surface */
2405 int needs_update; /* whether the surface region needs an update */
2406 @END
2407 #define SET_WINPOS_PAINT_SURFACE 0x01 /* window has a paintable surface */
2408 #define SET_WINPOS_PIXEL_FORMAT 0x02 /* window has a custom pixel format */
2410 /* Get the window and client rectangles of a window */
2411 @REQ(get_window_rectangles)
2412 user_handle_t handle; /* handle to the window */
2413 int relative; /* coords relative to (see below) */
2414 int dpi; /* DPI to map to, or zero for per-monitor DPI */
2415 @REPLY
2416 rectangle_t window; /* window rectangle */
2417 rectangle_t client; /* client rectangle */
2418 @END
2419 enum coords_relative
2421 COORDS_CLIENT, /* relative to client area */
2422 COORDS_WINDOW, /* relative to whole window area */
2423 COORDS_PARENT, /* relative to parent's client area */
2424 COORDS_SCREEN /* relative to screen origin */
2428 /* Get the window text */
2429 @REQ(get_window_text)
2430 user_handle_t handle; /* handle to the window */
2431 @REPLY
2432 data_size_t length; /* total length in WCHARs */
2433 VARARG(text,unicode_str); /* window text */
2434 @END
2437 /* Set the window text */
2438 @REQ(set_window_text)
2439 user_handle_t handle; /* handle to the window */
2440 VARARG(text,unicode_str); /* window text */
2441 @END
2444 /* Get the coordinates offset between two windows */
2445 @REQ(get_windows_offset)
2446 user_handle_t from; /* handle to the first window */
2447 user_handle_t to; /* handle to the second window */
2448 int dpi; /* DPI to map to, or zero for per-monitor DPI */
2449 @REPLY
2450 int x; /* x coordinate offset */
2451 int y; /* y coordinate offset */
2452 int mirror; /* whether to mirror the x coordinate */
2453 @END
2456 /* Get the visible region of a window */
2457 @REQ(get_visible_region)
2458 user_handle_t window; /* handle to the window */
2459 unsigned int flags; /* DCX flags */
2460 @REPLY
2461 user_handle_t top_win; /* top window to clip against */
2462 rectangle_t top_rect; /* top window visible rect with screen coords */
2463 rectangle_t win_rect; /* window rect in screen coords */
2464 unsigned int paint_flags; /* paint flags (from SET_WINPOS_* flags) */
2465 data_size_t total_size; /* total size of the resulting region */
2466 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2467 @END
2470 /* Get the visible surface region of a window */
2471 @REQ(get_surface_region)
2472 user_handle_t window; /* handle to the window */
2473 @REPLY
2474 rectangle_t visible_rect; /* window visible rect in screen coords */
2475 data_size_t total_size; /* total size of the resulting region */
2476 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2477 @END
2480 /* Get the window region */
2481 @REQ(get_window_region)
2482 user_handle_t window; /* handle to the window */
2483 @REPLY
2484 data_size_t total_size; /* total size of the resulting region */
2485 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2486 @END
2489 /* Set the window region */
2490 @REQ(set_window_region)
2491 user_handle_t window; /* handle to the window */
2492 int redraw; /* redraw the window? */
2493 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2494 @END
2497 /* Get the window update region */
2498 @REQ(get_update_region)
2499 user_handle_t window; /* handle to the window */
2500 user_handle_t from_child; /* child to start searching from */
2501 unsigned int flags; /* update flags (see below) */
2502 @REPLY
2503 user_handle_t child; /* child to repaint (or window itself) */
2504 unsigned int flags; /* resulting update flags (see below) */
2505 data_size_t total_size; /* total size of the resulting region */
2506 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2507 @END
2508 #define UPDATE_NONCLIENT 0x001 /* get region for repainting non-client area */
2509 #define UPDATE_ERASE 0x002 /* get region for erasing client area */
2510 #define UPDATE_PAINT 0x004 /* get region for painting client area */
2511 #define UPDATE_INTERNALPAINT 0x008 /* get region if internal paint is pending */
2512 #define UPDATE_ALLCHILDREN 0x010 /* force repaint of all children */
2513 #define UPDATE_NOCHILDREN 0x020 /* don't try to repaint any children */
2514 #define UPDATE_NOREGION 0x040 /* don't return a region, only the flags */
2515 #define UPDATE_DELAYED_ERASE 0x080 /* still needs erase after BeginPaint */
2516 #define UPDATE_CLIPCHILDREN 0x100 /* remove clipped children from the update region */
2519 /* Update the z order of a window so that a given rectangle is fully visible */
2520 @REQ(update_window_zorder)
2521 user_handle_t window; /* handle to the window */
2522 rectangle_t rect; /* rectangle that must be visible (in client coords) */
2523 @END
2526 /* Mark parts of a window as needing a redraw */
2527 @REQ(redraw_window)
2528 user_handle_t window; /* handle to the window */
2529 unsigned int flags; /* RDW_* flags */
2530 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2531 @END
2534 /* Set a window property */
2535 @REQ(set_window_property)
2536 user_handle_t window; /* handle to the window */
2537 lparam_t data; /* data to store */
2538 atom_t atom; /* property atom (if no name specified) */
2539 VARARG(name,unicode_str); /* property name */
2540 @END
2543 /* Remove a window property */
2544 @REQ(remove_window_property)
2545 user_handle_t window; /* handle to the window */
2546 atom_t atom; /* property atom (if no name specified) */
2547 VARARG(name,unicode_str); /* property name */
2548 @REPLY
2549 lparam_t data; /* data stored in property */
2550 @END
2553 /* Get a window property */
2554 @REQ(get_window_property)
2555 user_handle_t window; /* handle to the window */
2556 atom_t atom; /* property atom (if no name specified) */
2557 VARARG(name,unicode_str); /* property name */
2558 @REPLY
2559 lparam_t data; /* data stored in property */
2560 @END
2563 /* Get the list of properties of a window */
2564 @REQ(get_window_properties)
2565 user_handle_t window; /* handle to the window */
2566 @REPLY
2567 int total; /* total number of properties */
2568 VARARG(props,properties); /* list of properties */
2569 @END
2572 /* Create a window station */
2573 @REQ(create_winstation)
2574 unsigned int flags; /* window station flags */
2575 unsigned int access; /* wanted access rights */
2576 unsigned int attributes; /* object attributes */
2577 obj_handle_t rootdir; /* root directory */
2578 VARARG(name,unicode_str); /* object name */
2579 @REPLY
2580 obj_handle_t handle; /* handle to the window station */
2581 @END
2584 /* Open a handle to a window station */
2585 @REQ(open_winstation)
2586 unsigned int access; /* wanted access rights */
2587 unsigned int attributes; /* object attributes */
2588 obj_handle_t rootdir; /* root directory */
2589 VARARG(name,unicode_str); /* object name */
2590 @REPLY
2591 obj_handle_t handle; /* handle to the window station */
2592 @END
2595 /* Close a window station */
2596 @REQ(close_winstation)
2597 obj_handle_t handle; /* handle to the window station */
2598 @END
2601 /* Get the process current window station */
2602 @REQ(get_process_winstation)
2603 @REPLY
2604 obj_handle_t handle; /* handle to the window station */
2605 @END
2608 /* Set the process current window station */
2609 @REQ(set_process_winstation)
2610 obj_handle_t handle; /* handle to the window station */
2611 @END
2614 /* Enumerate window stations */
2615 @REQ(enum_winstation)
2616 unsigned int index; /* current index */
2617 @REPLY
2618 unsigned int next; /* next index */
2619 VARARG(name,unicode_str); /* window station name */
2620 @END
2623 /* Create a desktop */
2624 @REQ(create_desktop)
2625 unsigned int flags; /* desktop flags */
2626 unsigned int access; /* wanted access rights */
2627 unsigned int attributes; /* object attributes */
2628 VARARG(name,unicode_str); /* object name */
2629 @REPLY
2630 obj_handle_t handle; /* handle to the desktop */
2631 @END
2634 /* Open a handle to a desktop */
2635 @REQ(open_desktop)
2636 obj_handle_t winsta; /* window station to open (null allowed) */
2637 unsigned int flags; /* desktop flags */
2638 unsigned int access; /* wanted access rights */
2639 unsigned int attributes; /* object attributes */
2640 VARARG(name,unicode_str); /* object name */
2641 @REPLY
2642 obj_handle_t handle; /* handle to the desktop */
2643 @END
2646 /* Open a handle to current input desktop */
2647 @REQ(open_input_desktop)
2648 unsigned int flags; /* desktop flags */
2649 unsigned int access; /* wanted access rights */
2650 unsigned int attributes; /* object attributes */
2651 @REPLY
2652 obj_handle_t handle; /* handle to the desktop */
2653 @END
2656 /* Close a desktop */
2657 @REQ(close_desktop)
2658 obj_handle_t handle; /* handle to the desktop */
2659 @END
2662 /* Get the thread current desktop */
2663 @REQ(get_thread_desktop)
2664 thread_id_t tid; /* thread id */
2665 @REPLY
2666 obj_handle_t handle; /* handle to the desktop */
2667 @END
2670 /* Set the thread current desktop */
2671 @REQ(set_thread_desktop)
2672 obj_handle_t handle; /* handle to the desktop */
2673 @END
2676 /* Enumerate desktops */
2677 @REQ(enum_desktop)
2678 obj_handle_t winstation; /* handle to the window station */
2679 unsigned int index; /* current index */
2680 @REPLY
2681 unsigned int next; /* next index */
2682 VARARG(name,unicode_str); /* window station name */
2683 @END
2686 /* Get/set information about a user object (window station or desktop) */
2687 @REQ(set_user_object_info)
2688 obj_handle_t handle; /* handle to the object */
2689 unsigned int flags; /* information to set/get */
2690 unsigned int obj_flags; /* new object flags */
2691 @REPLY
2692 int is_desktop; /* is object a desktop? */
2693 unsigned int old_obj_flags; /* old object flags */
2694 VARARG(name,unicode_str); /* object name */
2695 @END
2696 #define SET_USER_OBJECT_SET_FLAGS 1
2697 #define SET_USER_OBJECT_GET_FULL_NAME 2
2700 /* Register a hotkey */
2701 @REQ(register_hotkey)
2702 user_handle_t window; /* handle to the window */
2703 int id; /* hotkey identifier */
2704 unsigned int flags; /* modifier keys */
2705 unsigned int vkey; /* virtual key code */
2706 @REPLY
2707 int replaced; /* did we replace an existing hotkey? */
2708 unsigned int flags; /* flags of replaced hotkey */
2709 unsigned int vkey; /* virtual key code of replaced hotkey */
2710 @END
2713 /* Unregister a hotkey */
2714 @REQ(unregister_hotkey)
2715 user_handle_t window; /* handle to the window */
2716 int id; /* hotkey identifier */
2717 @REPLY
2718 unsigned int flags; /* flags of removed hotkey */
2719 unsigned int vkey; /* virtual key code of removed hotkey */
2720 @END
2723 /* Attach (or detach) thread inputs */
2724 @REQ(attach_thread_input)
2725 thread_id_t tid_from; /* thread to be attached */
2726 thread_id_t tid_to; /* thread to which tid_from should be attached */
2727 int attach; /* is it an attach? */
2728 @END
2731 /* Get input data for a given thread */
2732 @REQ(get_thread_input)
2733 thread_id_t tid; /* id of thread */
2734 @REPLY
2735 user_handle_t focus; /* handle to the focus window */
2736 user_handle_t capture; /* handle to the capture window */
2737 user_handle_t active; /* handle to the active window */
2738 user_handle_t foreground; /* handle to the global foreground window */
2739 user_handle_t menu_owner; /* handle to the menu owner */
2740 user_handle_t move_size; /* handle to the moving/resizing window */
2741 user_handle_t caret; /* handle to the caret window */
2742 user_handle_t cursor; /* handle to the cursor */
2743 int show_count; /* cursor show count */
2744 rectangle_t rect; /* caret rectangle */
2745 @END
2748 /* Get the time of the last input event */
2749 @REQ(get_last_input_time)
2750 @REPLY
2751 unsigned int time;
2752 @END
2755 /* Retrieve queue keyboard state for current thread or global async state */
2756 @REQ(get_key_state)
2757 int async; /* whether to query the async state */
2758 int key; /* optional key code or -1 */
2759 @REPLY
2760 unsigned char state; /* state of specified key */
2761 VARARG(keystate,bytes); /* state array for all the keys */
2762 @END
2764 /* Set queue keyboard state for current thread */
2765 @REQ(set_key_state)
2766 int async; /* whether to change the async state too */
2767 VARARG(keystate,bytes); /* state array for all the keys */
2768 @END
2770 /* Set the system foreground window */
2771 @REQ(set_foreground_window)
2772 user_handle_t handle; /* handle to the foreground window */
2773 @REPLY
2774 user_handle_t previous; /* handle to the previous foreground window */
2775 int send_msg_old; /* whether we have to send a msg to the old window */
2776 int send_msg_new; /* whether we have to send a msg to the new window */
2777 @END
2779 /* Set the current thread focus window */
2780 @REQ(set_focus_window)
2781 user_handle_t handle; /* handle to the focus window */
2782 @REPLY
2783 user_handle_t previous; /* handle to the previous focus window */
2784 @END
2786 /* Set the current thread active window */
2787 @REQ(set_active_window)
2788 user_handle_t handle; /* handle to the active window */
2789 @REPLY
2790 user_handle_t previous; /* handle to the previous active window */
2791 @END
2793 /* Set the current thread capture window */
2794 @REQ(set_capture_window)
2795 user_handle_t handle; /* handle to the capture window */
2796 unsigned int flags; /* capture flags (see below) */
2797 @REPLY
2798 user_handle_t previous; /* handle to the previous capture window */
2799 user_handle_t full_handle; /* full 32-bit handle of new capture window */
2800 @END
2801 #define CAPTURE_MENU 0x01 /* capture is for a menu */
2802 #define CAPTURE_MOVESIZE 0x02 /* capture is for moving/resizing */
2805 /* Set the current thread caret window */
2806 @REQ(set_caret_window)
2807 user_handle_t handle; /* handle to the caret window */
2808 int width; /* caret width */
2809 int height; /* caret height */
2810 @REPLY
2811 user_handle_t previous; /* handle to the previous caret window */
2812 rectangle_t old_rect; /* previous caret rectangle */
2813 int old_hide; /* previous hide count */
2814 int old_state; /* previous caret state (1=on, 0=off) */
2815 @END
2818 /* Set the current thread caret information */
2819 @REQ(set_caret_info)
2820 unsigned int flags; /* caret flags (see below) */
2821 user_handle_t handle; /* handle to the caret window */
2822 int x; /* caret x position */
2823 int y; /* caret y position */
2824 int hide; /* increment for hide count (can be negative to show it) */
2825 int state; /* caret state (see below) */
2826 @REPLY
2827 user_handle_t full_handle; /* handle to the current caret window */
2828 rectangle_t old_rect; /* previous caret rectangle */
2829 int old_hide; /* previous hide count */
2830 int old_state; /* previous caret state (1=on, 0=off) */
2831 @END
2832 #define SET_CARET_POS 0x01 /* set the caret position from x,y */
2833 #define SET_CARET_HIDE 0x02 /* increment the caret hide count */
2834 #define SET_CARET_STATE 0x04 /* set the caret on/off state */
2835 enum caret_state
2837 CARET_STATE_OFF, /* off */
2838 CARET_STATE_ON, /* on */
2839 CARET_STATE_TOGGLE, /* toggle current state */
2840 CARET_STATE_ON_IF_MOVED /* on if the position differs, unchanged otherwise */
2844 /* Set a window hook */
2845 @REQ(set_hook)
2846 int id; /* id of the hook */
2847 process_id_t pid; /* id of process to set the hook into */
2848 thread_id_t tid; /* id of thread to set the hook into */
2849 int event_min;
2850 int event_max;
2851 client_ptr_t proc; /* hook procedure */
2852 int flags;
2853 int unicode; /* is it a unicode hook? */
2854 VARARG(module,unicode_str); /* module name */
2855 @REPLY
2856 user_handle_t handle; /* handle to the hook */
2857 unsigned int active_hooks; /* active hooks bitmap */
2858 @END
2861 /* Remove a window hook */
2862 @REQ(remove_hook)
2863 user_handle_t handle; /* handle to the hook */
2864 client_ptr_t proc; /* hook procedure if handle is 0 */
2865 int id; /* id of the hook if handle is 0 */
2866 @REPLY
2867 unsigned int active_hooks; /* active hooks bitmap */
2868 @END
2871 /* Start calling a hook chain */
2872 @REQ(start_hook_chain)
2873 int id; /* id of the hook */
2874 int event; /* signalled event */
2875 user_handle_t window; /* handle to the event window */
2876 int object_id; /* object id for out of context winevent */
2877 int child_id; /* child id for out of context winevent */
2878 @REPLY
2879 user_handle_t handle; /* handle to the next hook */
2880 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2881 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2882 int unicode; /* is it a unicode hook? */
2883 client_ptr_t proc; /* hook procedure */
2884 unsigned int active_hooks; /* active hooks bitmap */
2885 VARARG(module,unicode_str); /* module name */
2886 @END
2889 /* Finished calling a hook chain */
2890 @REQ(finish_hook_chain)
2891 int id; /* id of the hook */
2892 @END
2895 /* Get the hook information */
2896 @REQ(get_hook_info)
2897 user_handle_t handle; /* handle to the current hook */
2898 int get_next; /* do we want info about current or next hook? */
2899 int event; /* signalled event */
2900 user_handle_t window; /* handle to the event window */
2901 int object_id; /* object id for out of context winevent */
2902 int child_id; /* child id for out of context winevent */
2903 @REPLY
2904 user_handle_t handle; /* handle to the hook */
2905 int id; /* id of the hook */
2906 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2907 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2908 client_ptr_t proc; /* hook procedure */
2909 int unicode; /* is it a unicode hook? */
2910 VARARG(module,unicode_str); /* module name */
2911 @END
2914 /* Create a window class */
2915 @REQ(create_class)
2916 int local; /* is it a local class? */
2917 atom_t atom; /* class atom */
2918 unsigned int style; /* class style */
2919 mod_handle_t instance; /* module instance */
2920 int extra; /* number of extra class bytes */
2921 int win_extra; /* number of window extra bytes */
2922 client_ptr_t client_ptr; /* pointer to class in client address space */
2923 data_size_t name_offset; /* base class name offset for specified atom */
2924 VARARG(name,unicode_str); /* class name */
2925 @REPLY
2926 atom_t atom; /* resulting class atom */
2927 @END
2930 /* Destroy a window class */
2931 @REQ(destroy_class)
2932 atom_t atom; /* class atom */
2933 mod_handle_t instance; /* module instance */
2934 VARARG(name,unicode_str); /* class name */
2935 @REPLY
2936 client_ptr_t client_ptr; /* pointer to class in client address space */
2937 @END
2940 /* Set some information in a class */
2941 @REQ(set_class_info)
2942 user_handle_t window; /* handle to the window */
2943 unsigned int flags; /* flags for info to set (see below) */
2944 atom_t atom; /* class atom */
2945 unsigned int style; /* class style */
2946 int win_extra; /* number of window extra bytes */
2947 mod_handle_t instance; /* module instance */
2948 int extra_offset; /* offset to set in extra bytes */
2949 data_size_t extra_size; /* size to set in extra bytes */
2950 lparam_t extra_value; /* value to set in extra bytes */
2951 @REPLY
2952 atom_t old_atom; /* previous class atom */
2953 atom_t base_atom; /* base class atom */
2954 mod_handle_t old_instance; /* previous module instance */
2955 lparam_t old_extra_value; /* old value in extra bytes */
2956 unsigned int old_style; /* previous class style */
2957 int old_extra; /* previous number of class extra bytes */
2958 int old_win_extra; /* previous number of window extra bytes */
2959 @END
2960 #define SET_CLASS_ATOM 0x0001
2961 #define SET_CLASS_STYLE 0x0002
2962 #define SET_CLASS_WINEXTRA 0x0004
2963 #define SET_CLASS_INSTANCE 0x0008
2964 #define SET_CLASS_EXTRA 0x0010
2967 /* Open the clipboard */
2968 @REQ(open_clipboard)
2969 user_handle_t window; /* clipboard window */
2970 @REPLY
2971 user_handle_t owner; /* current clipboard owner */
2972 @END
2975 /* Close the clipboard */
2976 @REQ(close_clipboard)
2977 @REPLY
2978 user_handle_t viewer; /* first clipboard viewer */
2979 user_handle_t owner; /* current clipboard owner */
2980 @END
2983 /* Empty the clipboard and grab ownership */
2984 @REQ(empty_clipboard)
2985 @END
2988 /* Add a data format to the clipboard */
2989 @REQ(set_clipboard_data)
2990 unsigned int format; /* clipboard format of the data */
2991 unsigned int lcid; /* locale id to use for synthesizing text formats */
2992 VARARG(data,bytes); /* data contents */
2993 @REPLY
2994 unsigned int seqno; /* sequence number for the set data */
2995 @END
2998 /* Fetch a data format from the clipboard */
2999 @REQ(get_clipboard_data)
3000 unsigned int format; /* clipboard format of the data */
3001 int render; /* will we try to render it if missing? */
3002 int cached; /* do we already have it in the client-side cache? */
3003 unsigned int seqno; /* sequence number for the data in the cache */
3004 @REPLY
3005 unsigned int from; /* for synthesized data, format to generate it from */
3006 user_handle_t owner; /* clipboard owner for delayed-rendered formats */
3007 unsigned int seqno; /* sequence number for the originally set data */
3008 data_size_t total; /* total data size */
3009 VARARG(data,bytes); /* data contents */
3010 @END
3013 /* Retrieve a list of available formats */
3014 @REQ(get_clipboard_formats)
3015 unsigned int format; /* specific format to query, return all if 0 */
3016 @REPLY
3017 unsigned int count; /* count of available formats */
3018 VARARG(formats,uints); /* array of available formats */
3019 @END
3022 /* Retrieve the next available format */
3023 @REQ(enum_clipboard_formats)
3024 unsigned int previous; /* previous format, or first if 0 */
3025 @REPLY
3026 unsigned int format; /* next format */
3027 @END
3030 /* Release ownership of the clipboard */
3031 @REQ(release_clipboard)
3032 user_handle_t owner; /* clipboard owner to release */
3033 @REPLY
3034 user_handle_t viewer; /* first clipboard viewer */
3035 user_handle_t owner; /* current clipboard owner */
3036 @END
3039 /* Get clipboard information */
3040 @REQ(get_clipboard_info)
3041 @REPLY
3042 user_handle_t window; /* clipboard window */
3043 user_handle_t owner; /* clipboard owner */
3044 user_handle_t viewer; /* clipboard viewer */
3045 unsigned int seqno; /* current sequence number */
3046 @END
3049 /* Set the clipboard viewer window */
3050 @REQ(set_clipboard_viewer)
3051 user_handle_t viewer; /* clipboard viewer */
3052 user_handle_t previous; /* if non-zero, check that this was the previous viewer */
3053 @REPLY
3054 user_handle_t old_viewer; /* previous clipboard viewer */
3055 user_handle_t owner; /* clipboard owner */
3056 @END
3059 /* Add a clipboard listener window */
3060 @REQ(add_clipboard_listener)
3061 user_handle_t window; /* clipboard listener window */
3062 @END
3065 /* Remove a clipboard listener window */
3066 @REQ(remove_clipboard_listener)
3067 user_handle_t window; /* clipboard listener window */
3068 @END
3071 /* Open a security token */
3072 @REQ(open_token)
3073 obj_handle_t handle; /* handle to the thread or process */
3074 unsigned int access; /* access rights to the new token */
3075 unsigned int attributes;/* object attributes */
3076 unsigned int flags; /* flags (see below) */
3077 @REPLY
3078 obj_handle_t token; /* handle to the token */
3079 @END
3080 #define OPEN_TOKEN_THREAD 1
3081 #define OPEN_TOKEN_AS_SELF 2
3084 /* Set/get the global windows */
3085 @REQ(set_global_windows)
3086 unsigned int flags; /* flags for fields to set (see below) */
3087 user_handle_t shell_window; /* handle to the new shell window */
3088 user_handle_t shell_listview; /* handle to the new shell listview window */
3089 user_handle_t progman_window; /* handle to the new program manager window */
3090 user_handle_t taskman_window; /* handle to the new task manager window */
3091 @REPLY
3092 user_handle_t old_shell_window; /* handle to the shell window */
3093 user_handle_t old_shell_listview; /* handle to the shell listview window */
3094 user_handle_t old_progman_window; /* handle to the new program manager window */
3095 user_handle_t old_taskman_window; /* handle to the new task manager window */
3096 @END
3097 #define SET_GLOBAL_SHELL_WINDOWS 0x01 /* set both main shell and listview windows */
3098 #define SET_GLOBAL_PROGMAN_WINDOW 0x02
3099 #define SET_GLOBAL_TASKMAN_WINDOW 0x04
3101 /* Adjust the privileges held by a token */
3102 @REQ(adjust_token_privileges)
3103 obj_handle_t handle; /* handle to the token */
3104 int disable_all; /* disable all privileges? */
3105 int get_modified_state; /* get modified privileges? */
3106 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to enable/disable/remove */
3107 @REPLY
3108 unsigned int len; /* total length in bytes required to store token privileges */
3109 VARARG(privileges,LUID_AND_ATTRIBUTES); /* modified privileges */
3110 @END
3112 /* Retrieves the set of privileges held by or available to a token */
3113 @REQ(get_token_privileges)
3114 obj_handle_t handle; /* handle to the token */
3115 @REPLY
3116 unsigned int len; /* total length in bytes required to store token privileges */
3117 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
3118 @END
3120 /* Check the token has the required privileges */
3121 @REQ(check_token_privileges)
3122 obj_handle_t handle; /* handle to the token */
3123 int all_required; /* are all the privileges required for the check to succeed? */
3124 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to check */
3125 @REPLY
3126 int has_privileges; /* does the token have the required privileges? */
3127 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
3128 @END
3130 @REQ(duplicate_token)
3131 obj_handle_t handle; /* handle to the token to duplicate */
3132 unsigned int access; /* access rights to the new token */
3133 int primary; /* is the new token to be a primary one? */
3134 int impersonation_level; /* impersonation level of the new token */
3135 VARARG(objattr,object_attributes); /* object attributes */
3136 @REPLY
3137 obj_handle_t new_handle; /* duplicated handle */
3138 @END
3140 @REQ(filter_token)
3141 obj_handle_t handle; /* handle to the token to duplicate */
3142 unsigned int flags; /* flags */
3143 data_size_t privileges_size; /* size of privileges */
3144 VARARG(privileges,LUID_AND_ATTRIBUTES,privileges_size); /* privileges to remove from new token */
3145 VARARG(disable_sids,SID); /* array of groups to remove from new token */
3146 @REPLY
3147 obj_handle_t new_handle; /* filtered handle */
3148 @END
3150 @REQ(access_check)
3151 obj_handle_t handle; /* handle to the token */
3152 unsigned int desired_access; /* desired access to the object */
3153 generic_map_t mapping; /* mapping to specific rights */
3154 VARARG(sd,security_descriptor); /* security descriptor to check */
3155 @REPLY
3156 unsigned int access_granted; /* access rights actually granted */
3157 unsigned int access_status; /* was access granted? */
3158 unsigned int privileges_len; /* length needed to store privileges */
3159 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges used during access check */
3160 @END
3162 @REQ(get_token_sid)
3163 obj_handle_t handle; /* handle to the token */
3164 unsigned int which_sid; /* which SID to retrieve from the token */
3165 @REPLY
3166 data_size_t sid_len; /* length needed to store sid */
3167 VARARG(sid,SID); /* the sid specified by which_sid from the token */
3168 @END
3170 @REQ(get_token_groups)
3171 obj_handle_t handle; /* handle to the token */
3172 @REPLY
3173 data_size_t user_len; /* length needed to store user */
3174 VARARG(user,token_groups); /* groups the token's user belongs to */
3175 @END
3177 @REQ(get_token_default_dacl)
3178 obj_handle_t handle; /* handle to the token */
3179 @REPLY
3180 data_size_t acl_len; /* length needed to store access control list */
3181 VARARG(acl,ACL); /* access control list */
3182 @END
3184 @REQ(set_token_default_dacl)
3185 obj_handle_t handle; /* handle to the token */
3186 VARARG(acl,ACL); /* default dacl to set */
3187 @END
3189 @REQ(set_security_object)
3190 obj_handle_t handle; /* handle to the object */
3191 unsigned int security_info; /* which parts of security descriptor to set */
3192 VARARG(sd,security_descriptor); /* security descriptor to set */
3193 @END
3195 @REQ(get_security_object)
3196 obj_handle_t handle; /* handle to the object */
3197 unsigned int security_info; /* which parts of security descriptor to get */
3198 @REPLY
3199 unsigned int sd_len; /* buffer size needed for sd */
3200 VARARG(sd,security_descriptor); /* retrieved security descriptor */
3201 @END
3204 struct handle_info
3206 process_id_t owner;
3207 obj_handle_t handle;
3208 unsigned int access;
3209 unsigned int attributes;
3210 unsigned int type;
3213 /* Return a list of all opened handles */
3214 @REQ(get_system_handles)
3215 @REPLY
3216 unsigned int count; /* number of handles */
3217 VARARG(data,handle_infos); /* array of handle_infos */
3218 @END
3221 /* Create a mailslot */
3222 @REQ(create_mailslot)
3223 unsigned int access; /* wanted access rights */
3224 timeout_t read_timeout;
3225 unsigned int max_msgsize;
3226 VARARG(objattr,object_attributes); /* object attributes */
3227 @REPLY
3228 obj_handle_t handle; /* handle to the mailslot */
3229 @END
3232 /* Set mailslot information */
3233 @REQ(set_mailslot_info)
3234 obj_handle_t handle; /* handle to the mailslot */
3235 timeout_t read_timeout;
3236 unsigned int flags;
3237 @REPLY
3238 timeout_t read_timeout;
3239 unsigned int max_msgsize;
3240 @END
3241 #define MAILSLOT_SET_READ_TIMEOUT 1
3244 /* Create a directory object */
3245 @REQ(create_directory)
3246 unsigned int access; /* access flags */
3247 VARARG(objattr,object_attributes); /* object attributes */
3248 @REPLY
3249 obj_handle_t handle; /* handle to the directory */
3250 @END
3253 /* Open a directory object */
3254 @REQ(open_directory)
3255 unsigned int access; /* access flags */
3256 unsigned int attributes; /* object attributes */
3257 obj_handle_t rootdir; /* root directory */
3258 VARARG(directory_name,unicode_str); /* Directory name */
3259 @REPLY
3260 obj_handle_t handle; /* handle to the directory */
3261 @END
3264 /* Get a directory entry by index */
3265 @REQ(get_directory_entry)
3266 obj_handle_t handle; /* handle to the directory */
3267 unsigned int index; /* entry index */
3268 @REPLY
3269 data_size_t name_len; /* length of the entry name in bytes */
3270 VARARG(name,unicode_str,name_len); /* entry name */
3271 VARARG(type,unicode_str); /* entry type */
3272 @END
3275 /* Create a symbolic link object */
3276 @REQ(create_symlink)
3277 unsigned int access; /* access flags */
3278 VARARG(objattr,object_attributes); /* object attributes */
3279 VARARG(target_name,unicode_str); /* target name */
3280 @REPLY
3281 obj_handle_t handle; /* handle to the symlink */
3282 @END
3285 /* Open a symbolic link object */
3286 @REQ(open_symlink)
3287 unsigned int access; /* access flags */
3288 unsigned int attributes; /* object attributes */
3289 obj_handle_t rootdir; /* root directory */
3290 VARARG(name,unicode_str); /* symlink name */
3291 @REPLY
3292 obj_handle_t handle; /* handle to the symlink */
3293 @END
3296 /* Query a symbolic link object */
3297 @REQ(query_symlink)
3298 obj_handle_t handle; /* handle to the symlink */
3299 @REPLY
3300 data_size_t total; /* total needed size for name */
3301 VARARG(target_name,unicode_str); /* target name */
3302 @END
3305 /* Query basic object information */
3306 @REQ(get_object_info)
3307 obj_handle_t handle; /* handle to the object */
3308 @REPLY
3309 unsigned int access; /* granted access mask */
3310 unsigned int ref_count; /* object ref count */
3311 unsigned int handle_count; /* object handle count */
3312 @END
3315 /* Query the full name of an object */
3316 @REQ(get_object_name)
3317 obj_handle_t handle; /* handle to the object */
3318 @REPLY
3319 data_size_t total; /* total needed size for name */
3320 VARARG(name,unicode_str); /* object name */
3321 @END
3324 /* Query object type name information */
3325 @REQ(get_object_type)
3326 obj_handle_t handle; /* handle to the object */
3327 @REPLY
3328 VARARG(info,object_type_info); /* type information */
3329 @END
3332 /* Query type information for all types */
3333 @REQ(get_object_types)
3334 @REPLY
3335 int count; /* total count of object types */
3336 VARARG(info,object_types_info); /* type information */
3337 @END
3340 /* Allocate a locally-unique identifier */
3341 @REQ(allocate_locally_unique_id)
3342 @REPLY
3343 luid_t luid;
3344 @END
3347 /* Create a device manager */
3348 @REQ(create_device_manager)
3349 unsigned int access; /* wanted access rights */
3350 unsigned int attributes; /* object attributes */
3351 @REPLY
3352 obj_handle_t handle; /* handle to the device */
3353 @END
3356 /* Create a device */
3357 @REQ(create_device)
3358 obj_handle_t rootdir; /* root directory */
3359 client_ptr_t user_ptr; /* opaque ptr for use by client */
3360 obj_handle_t manager; /* device manager */
3361 VARARG(name,unicode_str); /* object name */
3362 @END
3365 /* Delete a device */
3366 @REQ(delete_device)
3367 obj_handle_t manager; /* handle to the device manager */
3368 client_ptr_t device; /* pointer to the device */
3369 @END
3372 /* Retrieve the next pending device irp request */
3373 @REQ(get_next_device_request)
3374 obj_handle_t manager; /* handle to the device manager */
3375 obj_handle_t prev; /* handle to the previous irp */
3376 unsigned int status; /* status of the previous irp */
3377 client_ptr_t user_ptr; /* user pointer of the previous irp */
3378 int pending; /* was the previous irp marked pending? */
3379 unsigned int iosb_status; /* IOSB status of the previous irp */
3380 data_size_t result; /* IOSB result of the previous irp */
3381 VARARG(data,bytes); /* output data of the previous irp */
3382 @REPLY
3383 irp_params_t params; /* irp parameters */
3384 obj_handle_t next; /* handle to the next irp */
3385 thread_id_t client_tid; /* tid of thread calling irp */
3386 client_ptr_t client_thread; /* pointer to thread object of calling irp */
3387 data_size_t in_size; /* total needed input size */
3388 VARARG(next_data,bytes); /* input data of the next irp */
3389 @END
3392 /* Get kernel pointer from server object */
3393 @REQ(get_kernel_object_ptr)
3394 obj_handle_t manager; /* handle to the device manager */
3395 obj_handle_t handle; /* object handle */
3396 @REPLY
3397 client_ptr_t user_ptr; /* kernel object pointer */
3398 @END
3401 /* Associate kernel pointer with server object */
3402 @REQ(set_kernel_object_ptr)
3403 obj_handle_t manager; /* handle to the device manager */
3404 obj_handle_t handle; /* object handle */
3405 client_ptr_t user_ptr; /* kernel object pointer */
3406 @END
3409 /* Grab server object reference from kernel object pointer */
3410 @REQ(grab_kernel_object)
3411 obj_handle_t manager; /* handle to the device manager */
3412 client_ptr_t user_ptr; /* kernel object pointer */
3413 @END
3416 /* Release server object reference from kernel object pointer */
3417 @REQ(release_kernel_object)
3418 obj_handle_t manager; /* handle to the device manager */
3419 client_ptr_t user_ptr; /* kernel object pointer */
3420 @END
3423 /* Get handle from kernel object pointer */
3424 @REQ(get_kernel_object_handle)
3425 obj_handle_t manager; /* handle to the device manager */
3426 client_ptr_t user_ptr; /* kernel object pointer */
3427 unsigned int access; /* wanted access rights */
3428 @REPLY
3429 obj_handle_t handle; /* kernel object handle */
3430 @END
3433 /* Make the current process a system process */
3434 @REQ(make_process_system)
3435 obj_handle_t handle; /* handle to the process */
3436 @REPLY
3437 obj_handle_t event; /* event signaled when all user processes have exited */
3438 @END
3441 /* Get detailed fixed-size information about a token */
3442 @REQ(get_token_info)
3443 obj_handle_t handle; /* handle to the object */
3444 @REPLY
3445 luid_t token_id; /* locally-unique identifier of the token */
3446 luid_t modified_id; /* locally-unique identifier of the modified version of the token */
3447 unsigned int session_id; /* token session id */
3448 int primary; /* is the token primary or impersonation? */
3449 int impersonation_level; /* level of impersonation */
3450 int elevation; /* elevation type */
3451 int group_count; /* the number of groups the token is a member of */
3452 int privilege_count; /* the number of privileges the token has */
3453 @END
3456 /* Create a token which is an elevation counterpart to this token */
3457 @REQ(create_linked_token)
3458 obj_handle_t handle; /* handle to the token */
3459 @REPLY
3460 obj_handle_t linked; /* handle to the linked token */
3461 @END
3464 /* Create I/O completion port */
3465 @REQ(create_completion)
3466 unsigned int access; /* desired access to a port */
3467 unsigned int concurrent; /* max number of concurrent active threads */
3468 VARARG(objattr,object_attributes); /* object attributes */
3469 @REPLY
3470 obj_handle_t handle; /* port handle */
3471 @END
3474 /* Open I/O completion port */
3475 @REQ(open_completion)
3476 unsigned int access; /* desired access to a port */
3477 unsigned int attributes; /* object attributes */
3478 obj_handle_t rootdir; /* root directory */
3479 VARARG(filename,unicode_str); /* port name */
3480 @REPLY
3481 obj_handle_t handle; /* port handle */
3482 @END
3485 /* add completion to completion port */
3486 @REQ(add_completion)
3487 obj_handle_t handle; /* port handle */
3488 apc_param_t ckey; /* completion key */
3489 apc_param_t cvalue; /* completion value */
3490 apc_param_t information; /* IO_STATUS_BLOCK Information */
3491 unsigned int status; /* completion result */
3492 @END
3495 /* get completion from completion port queue */
3496 @REQ(remove_completion)
3497 obj_handle_t handle; /* port handle */
3498 @REPLY
3499 apc_param_t ckey; /* completion key */
3500 apc_param_t cvalue; /* completion value */
3501 apc_param_t information; /* IO_STATUS_BLOCK Information */
3502 unsigned int status; /* completion result */
3503 @END
3506 /* get completion queue depth */
3507 @REQ(query_completion)
3508 obj_handle_t handle; /* port handle */
3509 @REPLY
3510 unsigned int depth; /* completion queue depth */
3511 @END
3514 /* associate object with completion port */
3515 @REQ(set_completion_info)
3516 obj_handle_t handle; /* object handle */
3517 apc_param_t ckey; /* completion key */
3518 obj_handle_t chandle; /* port handle */
3519 @END
3522 /* check for associated completion and push msg */
3523 @REQ(add_fd_completion)
3524 obj_handle_t handle; /* async' object */
3525 apc_param_t cvalue; /* completion value */
3526 apc_param_t information; /* IO_STATUS_BLOCK Information */
3527 unsigned int status; /* completion status */
3528 int async; /* completion is an async result */
3529 @END
3532 /* set fd completion information */
3533 @REQ(set_fd_completion_mode)
3534 obj_handle_t handle; /* handle to a file or directory */
3535 unsigned int flags; /* completion notification flags */
3536 @END
3539 /* set fd disposition information */
3540 @REQ(set_fd_disp_info)
3541 obj_handle_t handle; /* handle to a file or directory */
3542 int unlink; /* whether to unlink file on close */
3543 @END
3546 /* set fd name information */
3547 @REQ(set_fd_name_info)
3548 obj_handle_t handle; /* handle to a file or directory */
3549 obj_handle_t rootdir; /* root directory */
3550 data_size_t namelen; /* length of NT name in bytes */
3551 int link; /* link instead of renaming */
3552 int replace; /* replace an existing file? */
3553 VARARG(name,unicode_str,namelen); /* NT name */
3554 VARARG(filename,string); /* new file name */
3555 @END
3558 /* set fd eof information */
3559 @REQ(set_fd_eof_info)
3560 obj_handle_t handle; /* handle to a file or directory */
3561 file_pos_t eof; /* offset of eof of file */
3562 @END
3565 /* Retrieve layered info for a window */
3566 @REQ(get_window_layered_info)
3567 user_handle_t handle; /* handle to the window */
3568 @REPLY
3569 unsigned int color_key; /* color key */
3570 unsigned int alpha; /* alpha (0..255) */
3571 unsigned int flags; /* LWA_* flags */
3572 @END
3575 /* Set layered info for a window */
3576 @REQ(set_window_layered_info)
3577 user_handle_t handle; /* handle to the window */
3578 unsigned int color_key; /* color key */
3579 unsigned int alpha; /* alpha (0..255) */
3580 unsigned int flags; /* LWA_* flags */
3581 @END
3584 /* Allocate an arbitrary user handle */
3585 @REQ(alloc_user_handle)
3586 @REPLY
3587 user_handle_t handle; /* allocated handle */
3588 @END
3591 /* Free an arbitrary user handle */
3592 @REQ(free_user_handle)
3593 user_handle_t handle; /* handle to free*/
3594 @END
3597 /* Set/get the current cursor */
3598 @REQ(set_cursor)
3599 unsigned int flags; /* flags for fields to set (see below) */
3600 user_handle_t handle; /* handle to the cursor */
3601 int show_count; /* show count increment/decrement */
3602 int x; /* cursor position */
3603 int y;
3604 rectangle_t clip; /* cursor clip rectangle */
3605 unsigned int clip_msg; /* message to post on cursor clip changes */
3606 @REPLY
3607 user_handle_t prev_handle; /* previous handle */
3608 int prev_count; /* previous show count */
3609 int prev_x; /* previous position */
3610 int prev_y;
3611 int new_x; /* new position */
3612 int new_y;
3613 rectangle_t new_clip; /* new clip rectangle */
3614 unsigned int last_change; /* time of last position change */
3615 @END
3616 #define SET_CURSOR_HANDLE 0x01
3617 #define SET_CURSOR_COUNT 0x02
3618 #define SET_CURSOR_POS 0x04
3619 #define SET_CURSOR_CLIP 0x08
3620 #define SET_CURSOR_NOCLIP 0x10
3622 /* Get the history of the 64 last cursor positions */
3623 @REQ(get_cursor_history)
3624 @REPLY
3625 VARARG(history,cursor_positions);
3626 @END
3629 /* Batch read rawinput message data */
3630 @REQ(get_rawinput_buffer)
3631 data_size_t rawinput_size; /* size of RAWINPUT structure */
3632 data_size_t buffer_size; /* size of output buffer */
3633 @REPLY
3634 data_size_t next_size; /* minimum size to get next message data */
3635 unsigned int count;
3636 VARARG(data,bytes);
3637 @END
3639 /* Modify the list of registered rawinput devices */
3640 @REQ(update_rawinput_devices)
3641 VARARG(devices,rawinput_devices);
3642 @END
3644 /* Retrieve the list of registered rawinput devices */
3645 @REQ(get_rawinput_devices)
3646 @REPLY
3647 unsigned int device_count;
3648 VARARG(devices,rawinput_devices);
3649 @END
3651 /* Create a new job object */
3652 @REQ(create_job)
3653 unsigned int access; /* wanted access rights */
3654 VARARG(objattr,object_attributes); /* object attributes */
3655 @REPLY
3656 obj_handle_t handle; /* handle to the job */
3657 @END
3660 /* Open a job object */
3661 @REQ(open_job)
3662 unsigned int access; /* wanted access rights */
3663 unsigned int attributes; /* object attributes */
3664 obj_handle_t rootdir; /* root directory */
3665 VARARG(name,unicode_str); /* object name */
3666 @REPLY
3667 obj_handle_t handle; /* handle to the job */
3668 @END
3671 /* Assign a job object to a process */
3672 @REQ(assign_job)
3673 obj_handle_t job; /* handle to the job */
3674 obj_handle_t process; /* handle to the process */
3675 @END
3678 /* Check if a process is associated with a job */
3679 @REQ(process_in_job)
3680 obj_handle_t job; /* handle to the job */
3681 obj_handle_t process; /* handle to the process */
3682 @END
3685 /* Set limit flags on a job */
3686 @REQ(set_job_limits)
3687 obj_handle_t handle; /* handle to the job */
3688 unsigned int limit_flags; /* new limit flags */
3689 @END
3692 /* Set new completion port for a job */
3693 @REQ(set_job_completion_port)
3694 obj_handle_t job; /* handle to the job */
3695 obj_handle_t port; /* handle to the completion port */
3696 client_ptr_t key; /* key to send with completion messages */
3697 @END
3700 /* Retrieve information about a job */
3701 @REQ(get_job_info)
3702 obj_handle_t handle; /* handle to the job */
3703 @REPLY
3704 int total_processes; /* total count of processes */
3705 int active_processes; /* count of running processes */
3706 VARARG(pids,uints); /* list of active pids */
3707 @END
3710 /* Terminate all processes associated with the job */
3711 @REQ(terminate_job)
3712 obj_handle_t handle; /* handle to the job */
3713 int status; /* process exit code */
3714 @END
3717 /* Suspend a process */
3718 @REQ(suspend_process)
3719 obj_handle_t handle; /* process handle */
3720 @END
3723 /* Resume a process */
3724 @REQ(resume_process)
3725 obj_handle_t handle; /* process handle */
3726 @END
3729 /* Iterate thread list for process */
3730 @REQ(get_next_thread)
3731 obj_handle_t process; /* process handle */
3732 obj_handle_t last; /* thread handle to start with */
3733 unsigned int access; /* desired access for returned handle */
3734 unsigned int attributes; /* returned handle attributes */
3735 unsigned int flags; /* controls iteration direction */
3736 @REPLY
3737 obj_handle_t handle; /* next thread handle */
3738 @END