ws2_32: Do not use SHUT_RD.
[wine.git] / server / protocol.def
blob6d8208b128bf58f34719f37da7c3c88cb12e0f79
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]; } ymm_high_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 } hid;
308 struct hardware_msg_data
310 lparam_t info; /* extra info */
311 unsigned int hw_id; /* unique id */
312 unsigned int flags; /* hook flags */
313 struct hw_msg_source source; /* message source */
314 union rawinput rawinput; /* rawinput message data */
317 struct callback_msg_data
319 client_ptr_t callback; /* callback function */
320 lparam_t data; /* user data for callback */
321 lparam_t result; /* message result */
324 struct winevent_msg_data
326 user_handle_t hook; /* hook handle */
327 thread_id_t tid; /* thread id */
328 client_ptr_t hook_proc; /* hook proc address */
329 /* followed by module name if any */
332 typedef union
334 int type;
335 struct
337 int type; /* INPUT_KEYBOARD */
338 unsigned short vkey; /* virtual key code */
339 unsigned short scan; /* scan code */
340 unsigned int flags; /* event flags */
341 unsigned int time; /* event time */
342 lparam_t info; /* extra info */
343 } kbd;
344 struct
346 int type; /* INPUT_MOUSE */
347 int x; /* coordinates */
348 int y;
349 unsigned int data; /* mouse data */
350 unsigned int flags; /* event flags */
351 unsigned int time; /* event time */
352 lparam_t info; /* extra info */
353 } mouse;
354 struct
356 int type; /* INPUT_HARDWARE */
357 unsigned int msg; /* message code */
358 lparam_t lparam; /* message param */
359 union rawinput rawinput;/* rawinput message data */
360 } hw;
361 } hw_input_t;
363 typedef union
365 unsigned char bytes[1]; /* raw data for sent messages */
366 struct hardware_msg_data hardware;
367 struct callback_msg_data callback;
368 struct winevent_msg_data winevent;
369 } message_data_t;
371 /* structure returned in filesystem events */
372 struct filesystem_event
374 int action;
375 data_size_t len;
376 char name[1];
379 typedef struct
381 unsigned int low_part;
382 int high_part;
383 } luid_t;
385 typedef struct
387 unsigned int read;
388 unsigned int write;
389 unsigned int exec;
390 unsigned int all;
391 } generic_map_t;
393 #define MAX_ACL_LEN 65535
395 struct security_descriptor
397 unsigned int control; /* SE_ flags */
398 data_size_t owner_len;
399 data_size_t group_len;
400 data_size_t sacl_len;
401 data_size_t dacl_len;
402 /* VARARG(owner,SID); */
403 /* VARARG(group,SID); */
404 /* VARARG(sacl,ACL); */
405 /* VARARG(dacl,ACL); */
408 struct object_attributes
410 obj_handle_t rootdir; /* root directory */
411 unsigned int attributes; /* object attributes */
412 data_size_t sd_len; /* length of security_descriptor data. may be 0 */
413 data_size_t name_len; /* length of the name string. may be 0 */
414 /* VARARG(sd,security_descriptor); */
415 /* VARARG(name,unicode_str); */
418 struct object_type_info
420 data_size_t name_len; /* length of the name string */
421 unsigned int index; /* type index in global table */
422 unsigned int obj_count; /* count of objects of this type */
423 unsigned int handle_count; /* count of handles of this type */
424 unsigned int obj_max; /* max count of objects of this type */
425 unsigned int handle_max; /* max count of handles of this type */
426 unsigned int valid_access; /* mask for valid access bits */
427 generic_map_t mapping; /* generic access mappings */
428 /* VARARG(name,unicode_str); */
431 struct token_groups
433 unsigned int count;
434 /* unsigned int attributes[count]; */
435 /* VARARG(sids,SID); */
438 enum select_op
440 SELECT_NONE,
441 SELECT_WAIT,
442 SELECT_WAIT_ALL,
443 SELECT_SIGNAL_AND_WAIT,
444 SELECT_KEYED_EVENT_WAIT,
445 SELECT_KEYED_EVENT_RELEASE
448 typedef union
450 enum select_op op;
451 struct
453 enum select_op op; /* SELECT_WAIT or SELECT_WAIT_ALL */
454 obj_handle_t handles[MAXIMUM_WAIT_OBJECTS];
455 } wait;
456 struct
458 enum select_op op; /* SELECT_SIGNAL_AND_WAIT */
459 obj_handle_t wait;
460 obj_handle_t signal; /* must be last in the structure so we can remove it on retries */
461 } signal_and_wait;
462 struct
464 enum select_op op; /* SELECT_KEYED_EVENT_WAIT or SELECT_KEYED_EVENT_RELEASE */
465 obj_handle_t handle;
466 client_ptr_t key;
467 } keyed_event;
468 } select_op_t;
470 enum apc_type
472 APC_NONE,
473 APC_USER,
474 APC_TIMER,
475 APC_ASYNC_IO,
476 APC_VIRTUAL_ALLOC,
477 APC_VIRTUAL_FREE,
478 APC_VIRTUAL_QUERY,
479 APC_VIRTUAL_PROTECT,
480 APC_VIRTUAL_FLUSH,
481 APC_VIRTUAL_LOCK,
482 APC_VIRTUAL_UNLOCK,
483 APC_MAP_VIEW,
484 APC_UNMAP_VIEW,
485 APC_CREATE_THREAD,
486 APC_DUP_HANDLE,
487 APC_BREAK_PROCESS
490 typedef union
492 enum apc_type type;
493 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;
500 struct
502 enum apc_type type; /* APC_TIMER */
503 int __pad;
504 client_ptr_t func; /* void (__stdcall *func)(void*, unsigned int, unsigned int); */
505 abstime_t time; /* time of expiration */
506 client_ptr_t arg; /* user argument */
507 } timer;
508 } user_apc_t;
510 typedef union
512 enum apc_type type;
513 user_apc_t user;
514 struct
516 enum apc_type type; /* APC_ASYNC_IO */
517 unsigned int status; /* I/O status */
518 client_ptr_t user; /* user pointer */
519 client_ptr_t sb; /* status block */
520 } async_io;
521 struct
523 enum apc_type type; /* APC_VIRTUAL_ALLOC */
524 unsigned int op_type; /* type of operation */
525 client_ptr_t addr; /* requested address */
526 mem_size_t size; /* allocation size */
527 mem_size_t zero_bits; /* number of zero high bits */
528 unsigned int prot; /* memory protection flags */
529 } virtual_alloc;
530 struct
532 enum apc_type type; /* APC_VIRTUAL_FREE */
533 unsigned int op_type; /* type of operation */
534 client_ptr_t addr; /* requested address */
535 mem_size_t size; /* allocation size */
536 } virtual_free;
537 struct
539 enum apc_type type; /* APC_VIRTUAL_QUERY */
540 int __pad;
541 client_ptr_t addr; /* requested address */
542 } virtual_query;
543 struct
545 enum apc_type type; /* APC_VIRTUAL_PROTECT */
546 unsigned int prot; /* new protection flags */
547 client_ptr_t addr; /* requested address */
548 mem_size_t size; /* requested size */
549 } virtual_protect;
550 struct
552 enum apc_type type; /* APC_VIRTUAL_FLUSH */
553 int __pad;
554 client_ptr_t addr; /* requested address */
555 mem_size_t size; /* requested size */
556 } virtual_flush;
557 struct
559 enum apc_type type; /* APC_VIRTUAL_LOCK */
560 int __pad;
561 client_ptr_t addr; /* requested address */
562 mem_size_t size; /* requested size */
563 } virtual_lock;
564 struct
566 enum apc_type type; /* APC_VIRTUAL_UNLOCK */
567 int __pad;
568 client_ptr_t addr; /* requested address */
569 mem_size_t size; /* requested size */
570 } virtual_unlock;
571 struct
573 enum apc_type type; /* APC_MAP_VIEW */
574 obj_handle_t handle; /* mapping handle */
575 client_ptr_t addr; /* requested address */
576 mem_size_t size; /* allocation size */
577 file_pos_t offset; /* file offset */
578 mem_size_t zero_bits; /* number of zero high bits */
579 unsigned int alloc_type; /* allocation type */
580 unsigned int prot; /* memory protection flags */
581 } map_view;
582 struct
584 enum apc_type type; /* APC_UNMAP_VIEW */
585 int __pad;
586 client_ptr_t addr; /* view address */
587 } unmap_view;
588 struct
590 enum apc_type type; /* APC_CREATE_THREAD */
591 unsigned int flags; /* creation flags */
592 client_ptr_t func; /* void (__stdcall *func)(void*); start function */
593 client_ptr_t arg; /* argument for start function */
594 mem_size_t zero_bits; /* number of zero high bits for thread stack */
595 mem_size_t reserve; /* reserve size for thread stack */
596 mem_size_t commit; /* commit size for thread stack */
597 } create_thread;
598 struct
600 enum apc_type type; /* APC_DUP_HANDLE */
601 obj_handle_t src_handle; /* src handle to duplicate */
602 obj_handle_t dst_process; /* dst process handle */
603 unsigned int access; /* wanted access rights */
604 unsigned int attributes; /* object attributes */
605 unsigned int options; /* duplicate options */
606 } dup_handle;
607 } apc_call_t;
609 typedef union
611 enum apc_type type;
612 struct
614 enum apc_type type; /* APC_ASYNC_IO */
615 unsigned int status; /* new status of async operation */
616 unsigned int total; /* bytes transferred */
617 } async_io;
618 struct
620 enum apc_type type; /* APC_VIRTUAL_ALLOC */
621 unsigned int status; /* status returned by call */
622 client_ptr_t addr; /* resulting address */
623 mem_size_t size; /* resulting size */
624 } virtual_alloc;
625 struct
627 enum apc_type type; /* APC_VIRTUAL_FREE */
628 unsigned int status; /* status returned by call */
629 client_ptr_t addr; /* resulting address */
630 mem_size_t size; /* resulting size */
631 } virtual_free;
632 struct
634 enum apc_type type; /* APC_VIRTUAL_QUERY */
635 unsigned int status; /* status returned by call */
636 client_ptr_t base; /* resulting base address */
637 client_ptr_t alloc_base;/* resulting allocation base */
638 mem_size_t size; /* resulting region size */
639 unsigned short state; /* resulting region state */
640 unsigned short prot; /* resulting region protection */
641 unsigned short alloc_prot;/* resulting allocation protection */
642 unsigned short alloc_type;/* resulting region allocation type */
643 } virtual_query;
644 struct
646 enum apc_type type; /* APC_VIRTUAL_PROTECT */
647 unsigned int status; /* status returned by call */
648 client_ptr_t addr; /* resulting address */
649 mem_size_t size; /* resulting size */
650 unsigned int prot; /* old protection flags */
651 } virtual_protect;
652 struct
654 enum apc_type type; /* APC_VIRTUAL_FLUSH */
655 unsigned int status; /* status returned by call */
656 client_ptr_t addr; /* resulting address */
657 mem_size_t size; /* resulting size */
658 } virtual_flush;
659 struct
661 enum apc_type type; /* APC_VIRTUAL_LOCK */
662 unsigned int status; /* status returned by call */
663 client_ptr_t addr; /* resulting address */
664 mem_size_t size; /* resulting size */
665 } virtual_lock;
666 struct
668 enum apc_type type; /* APC_VIRTUAL_UNLOCK */
669 unsigned int status; /* status returned by call */
670 client_ptr_t addr; /* resulting address */
671 mem_size_t size; /* resulting size */
672 } virtual_unlock;
673 struct
675 enum apc_type type; /* APC_MAP_VIEW */
676 unsigned int status; /* status returned by call */
677 client_ptr_t addr; /* resulting address */
678 mem_size_t size; /* resulting size */
679 } map_view;
680 struct
682 enum apc_type type; /* APC_UNMAP_VIEW */
683 unsigned int status; /* status returned by call */
684 } unmap_view;
685 struct
687 enum apc_type type; /* APC_CREATE_THREAD */
688 unsigned int status; /* status returned by call */
689 process_id_t pid; /* process id */
690 thread_id_t tid; /* thread id */
691 client_ptr_t teb; /* thread teb (in process address space) */
692 obj_handle_t handle; /* handle to new thread */
693 } create_thread;
694 struct
696 enum apc_type type; /* APC_DUP_HANDLE */
697 unsigned int status; /* status returned by call */
698 obj_handle_t handle; /* duplicated handle in dst process */
699 } dup_handle;
700 struct
702 enum apc_type type; /* APC_BREAK_PROCESS */
703 unsigned int status; /* status returned by call */
704 } break_process;
705 } apc_result_t;
707 enum irp_type
709 IRP_CALL_NONE,
710 IRP_CALL_CREATE,
711 IRP_CALL_CLOSE,
712 IRP_CALL_READ,
713 IRP_CALL_WRITE,
714 IRP_CALL_FLUSH,
715 IRP_CALL_IOCTL,
716 IRP_CALL_VOLUME,
717 IRP_CALL_FREE,
718 IRP_CALL_CANCEL
721 typedef union
723 enum irp_type type; /* irp call type */
724 struct
726 enum irp_type type; /* IRP_CALL_CREATE */
727 unsigned int access; /* access rights */
728 unsigned int sharing; /* sharing flags */
729 unsigned int options; /* file options */
730 client_ptr_t device; /* opaque ptr for the device */
731 obj_handle_t file; /* file handle */
732 } create;
733 struct
735 enum irp_type type; /* IRP_CALL_CLOSE */
736 int __pad;
737 client_ptr_t file; /* opaque ptr for the file object */
738 } close;
739 struct
741 enum irp_type type; /* IRP_CALL_READ */
742 unsigned int key; /* driver key */
743 data_size_t out_size; /* needed output size */
744 int __pad;
745 client_ptr_t file; /* opaque ptr for the file object */
746 file_pos_t pos; /* file position */
747 } read;
748 struct
750 enum irp_type type; /* IRP_CALL_WRITE */
751 unsigned int key; /* driver key */
752 client_ptr_t file; /* opaque ptr for the file object */
753 file_pos_t pos; /* file position */
754 } write;
755 struct
757 enum irp_type type; /* IRP_CALL_FLUSH */
758 int __pad;
759 client_ptr_t file; /* opaque ptr for the file object */
760 } flush;
761 struct
763 enum irp_type type; /* IRP_CALL_IOCTL */
764 ioctl_code_t code; /* ioctl code */
765 data_size_t out_size; /* needed output size */
766 int __pad;
767 client_ptr_t file; /* opaque ptr for the file object */
768 } ioctl;
769 struct
771 enum irp_type type; /* IRP_CALL_VOLUME */
772 unsigned int info_class;/* information class */
773 data_size_t out_size; /* needed output size */
774 int __pad;
775 client_ptr_t file; /* opaque ptr for the file object */
776 } volume;
777 struct
779 enum irp_type type; /* IRP_CALL_FREE */
780 int __pad;
781 client_ptr_t obj; /* opaque ptr for the freed object */
782 } free;
783 struct
785 enum irp_type type; /* IRP_CALL_CANCEL */
786 int __pad;
787 client_ptr_t irp; /* opaque ptr for canceled irp */
788 } cancel;
789 } irp_params_t;
791 /* information about a PE image mapping, roughly equivalent to SECTION_IMAGE_INFORMATION */
792 typedef struct
794 client_ptr_t base;
795 client_ptr_t entry_point;
796 mem_size_t map_size;
797 mem_size_t stack_size;
798 mem_size_t stack_commit;
799 unsigned int zerobits;
800 unsigned int subsystem;
801 unsigned short subsystem_minor;
802 unsigned short subsystem_major;
803 unsigned short osversion_major;
804 unsigned short osversion_minor;
805 unsigned short image_charact;
806 unsigned short dll_charact;
807 unsigned short machine;
808 unsigned char contains_code;
809 unsigned char image_flags;
810 unsigned int loader_flags;
811 unsigned int header_size;
812 unsigned int file_size;
813 unsigned int checksum;
814 unsigned int dbg_offset;
815 unsigned int dbg_size;
816 } pe_image_info_t;
817 #define IMAGE_FLAGS_ComPlusNativeReady 0x01
818 #define IMAGE_FLAGS_ComPlusILOnly 0x02
819 #define IMAGE_FLAGS_ImageDynamicallyRelocated 0x04
820 #define IMAGE_FLAGS_ImageMappedFlat 0x08
821 #define IMAGE_FLAGS_BaseBelow4gb 0x10
822 #define IMAGE_FLAGS_ComPlusPrefer32bit 0x20
823 #define IMAGE_FLAGS_WineBuiltin 0x40
824 #define IMAGE_FLAGS_WineFakeDll 0x80
826 struct rawinput_device
828 unsigned short usage_page;
829 unsigned short usage;
830 unsigned int flags;
831 user_handle_t target;
834 typedef struct
836 int x;
837 int y;
838 unsigned int time;
839 int __pad;
840 lparam_t info;
841 } cursor_pos_t;
843 /****************************************************************/
844 /* Request declarations */
846 /* Create a new process from the context of the parent */
847 @REQ(new_process)
848 obj_handle_t token; /* process token */
849 obj_handle_t debug; /* process debug object */
850 obj_handle_t parent_process; /* parent process */
851 unsigned int flags; /* process creation flags */
852 int socket_fd; /* file descriptor for process socket */
853 unsigned int access; /* access rights for process object */
854 unsigned short machine; /* architecture that the new process will use */
855 data_size_t info_size; /* size of startup info */
856 data_size_t handles_size; /* length of explicit handles list */
857 VARARG(objattr,object_attributes); /* object attributes */
858 VARARG(handles,uints,handles_size); /* handles list */
859 VARARG(info,startup_info,info_size); /* startup information */
860 VARARG(env,unicode_str); /* environment for new process */
861 @REPLY
862 obj_handle_t info; /* new process info handle */
863 process_id_t pid; /* process id */
864 obj_handle_t handle; /* process handle (in the current process) */
865 @END
868 /* Retrieve information about a newly started process */
869 @REQ(get_new_process_info)
870 obj_handle_t info; /* info handle returned from new_process_request */
871 @REPLY
872 int success; /* did the process start successfully? */
873 int exit_code; /* process exit code if failed */
874 @END
877 /* Create a new thread */
878 @REQ(new_thread)
879 obj_handle_t process; /* process in which to create thread */
880 unsigned int access; /* wanted access rights */
881 int suspend; /* new thread should be suspended on creation */
882 int request_fd; /* fd for request pipe */
883 VARARG(objattr,object_attributes); /* object attributes */
884 @REPLY
885 thread_id_t tid; /* thread id */
886 obj_handle_t handle; /* thread handle (in the current process) */
887 @END
890 /* Retrieve the new process startup info */
891 @REQ(get_startup_info)
892 @REPLY
893 data_size_t info_size; /* size of startup info */
894 VARARG(info,startup_info,info_size); /* startup information */
895 VARARG(env,unicode_str); /* environment */
896 @END
899 /* Signal the end of the process initialization */
900 @REQ(init_process_done)
901 client_ptr_t teb; /* TEB of new thread (in process address space) */
902 client_ptr_t peb; /* PEB of new process (in process address space) */
903 client_ptr_t ldt_copy; /* address of LDT copy (in process address space) */
904 @REPLY
905 client_ptr_t entry; /* process entry point */
906 int suspend; /* is process suspended? */
907 @END
910 /* Initialize the first thread of a new process */
911 @REQ(init_first_thread)
912 int unix_pid; /* Unix pid of new process */
913 int unix_tid; /* Unix tid of new thread */
914 int debug_level; /* new debug level */
915 int reply_fd; /* fd for reply pipe */
916 int wait_fd; /* fd for blocking calls pipe */
917 @REPLY
918 process_id_t pid; /* process id of the new thread's process */
919 thread_id_t tid; /* thread id of the new thread */
920 timeout_t server_start; /* server start time */
921 data_size_t info_size; /* total size of startup info */
922 VARARG(machines,ushorts); /* array of supported machines */
923 @END
926 /* Initialize a new thread; called from the child after pthread_create() */
927 @REQ(init_thread)
928 int unix_tid; /* Unix tid of new thread */
929 int reply_fd; /* fd for reply pipe */
930 int wait_fd; /* fd for blocking calls pipe */
931 client_ptr_t teb; /* TEB of new thread (in thread address space) */
932 client_ptr_t entry; /* entry point (in thread address space) */
933 @REPLY
934 process_id_t pid; /* process id of the new thread's process */
935 thread_id_t tid; /* thread id of the new thread */
936 int suspend; /* is thread suspended? */
937 @END
940 /* Terminate a process */
941 @REQ(terminate_process)
942 obj_handle_t handle; /* process handle to terminate */
943 int exit_code; /* process exit code */
944 @REPLY
945 int self; /* suicide? */
946 @END
949 /* Terminate a thread */
950 @REQ(terminate_thread)
951 obj_handle_t handle; /* thread handle to terminate */
952 int exit_code; /* thread exit code */
953 @REPLY
954 int self; /* suicide? */
955 @END
958 /* Retrieve information about a process */
959 @REQ(get_process_info)
960 obj_handle_t handle; /* process handle */
961 @REPLY
962 process_id_t pid; /* server process id */
963 process_id_t ppid; /* server process id of parent */
964 affinity_t affinity; /* process affinity mask */
965 client_ptr_t peb; /* PEB address in process address space */
966 timeout_t start_time; /* process start time */
967 timeout_t end_time; /* process end time */
968 int exit_code; /* process exit code */
969 int priority; /* priority class */
970 unsigned short machine; /* process architecture */
971 VARARG(image,pe_image_info); /* image info for main exe */
972 @END
975 /* Retrieve debug information about a process */
976 @REQ(get_process_debug_info)
977 obj_handle_t handle; /* process handle */
978 @REPLY
979 obj_handle_t debug; /* handle to debug port */
980 int debug_children; /* inherit debugger to child processes */
981 VARARG(image,pe_image_info); /* image info for main exe */
982 @END
985 /* Fetch the name of the process image */
986 @REQ(get_process_image_name)
987 obj_handle_t handle; /* process handle */
988 int win32; /* return a win32 filename? */
989 @REPLY
990 data_size_t len; /* len in bytes required to store filename */
991 VARARG(name,unicode_str); /* image name for main exe */
992 @END
995 /* Retrieve information about a process memory usage */
996 @REQ(get_process_vm_counters)
997 obj_handle_t handle; /* process handle */
998 @REPLY
999 mem_size_t peak_virtual_size; /* peak virtual memory in bytes */
1000 mem_size_t virtual_size; /* virtual memory in bytes */
1001 mem_size_t peak_working_set_size; /* peak real memory in bytes */
1002 mem_size_t working_set_size; /* real memory in bytes */
1003 mem_size_t pagefile_usage; /* commit charge in bytes */
1004 mem_size_t peak_pagefile_usage; /* peak commit charge in bytes */
1005 @END
1008 /* Set a process information */
1009 @REQ(set_process_info)
1010 obj_handle_t handle; /* process handle */
1011 int mask; /* setting mask (see below) */
1012 int priority; /* priority class */
1013 affinity_t affinity; /* affinity mask */
1014 @END
1015 #define SET_PROCESS_INFO_PRIORITY 0x01
1016 #define SET_PROCESS_INFO_AFFINITY 0x02
1019 /* Retrieve information about a thread */
1020 @REQ(get_thread_info)
1021 obj_handle_t handle; /* thread handle */
1022 unsigned int access; /* required access rights */
1023 @REPLY
1024 process_id_t pid; /* server process id */
1025 thread_id_t tid; /* server thread id */
1026 client_ptr_t teb; /* thread teb pointer */
1027 client_ptr_t entry_point; /* thread entry point */
1028 affinity_t affinity; /* thread affinity mask */
1029 int exit_code; /* thread exit code */
1030 int priority; /* thread priority level */
1031 int last; /* last thread in process */
1032 int suspend_count; /* thread suspend count */
1033 int dbg_hidden; /* thread hidden from debugger */
1034 data_size_t desc_len; /* description length in bytes */
1035 VARARG(desc,unicode_str); /* description string */
1036 @END
1039 /* Retrieve information about thread times */
1040 @REQ(get_thread_times)
1041 obj_handle_t handle; /* thread handle */
1042 @REPLY
1043 timeout_t creation_time; /* thread creation time */
1044 timeout_t exit_time; /* thread exit time */
1045 int unix_pid; /* thread native pid */
1046 int unix_tid; /* thread native pid */
1047 @END
1050 /* Set a thread information */
1051 @REQ(set_thread_info)
1052 obj_handle_t handle; /* thread handle */
1053 int mask; /* setting mask (see below) */
1054 int priority; /* priority class */
1055 affinity_t affinity; /* affinity mask */
1056 client_ptr_t entry_point; /* thread entry point */
1057 obj_handle_t token; /* impersonation token */
1058 VARARG(desc,unicode_str); /* description string */
1059 @END
1060 #define SET_THREAD_INFO_PRIORITY 0x01
1061 #define SET_THREAD_INFO_AFFINITY 0x02
1062 #define SET_THREAD_INFO_TOKEN 0x04
1063 #define SET_THREAD_INFO_ENTRYPOINT 0x08
1064 #define SET_THREAD_INFO_DESCRIPTION 0x10
1065 #define SET_THREAD_INFO_DBG_HIDDEN 0x20
1068 /* Suspend a thread */
1069 @REQ(suspend_thread)
1070 obj_handle_t handle; /* thread handle */
1071 @REPLY
1072 int count; /* new suspend count */
1073 @END
1076 /* Resume a thread */
1077 @REQ(resume_thread)
1078 obj_handle_t handle; /* thread handle */
1079 @REPLY
1080 int count; /* new suspend count */
1081 @END
1084 /* Queue an APC for a thread or process */
1085 @REQ(queue_apc)
1086 obj_handle_t handle; /* thread or process handle */
1087 apc_call_t call; /* call arguments */
1088 @REPLY
1089 obj_handle_t handle; /* APC handle */
1090 int self; /* run APC in caller itself? */
1091 @END
1094 /* Get the result of an APC call */
1095 @REQ(get_apc_result)
1096 obj_handle_t handle; /* handle to the APC */
1097 @REPLY
1098 apc_result_t result; /* result of the APC */
1099 @END
1102 /* Close a handle for the current process */
1103 @REQ(close_handle)
1104 obj_handle_t handle; /* handle to close */
1105 @END
1108 /* Set a handle information */
1109 @REQ(set_handle_info)
1110 obj_handle_t handle; /* handle we are interested in */
1111 int flags; /* new handle flags */
1112 int mask; /* mask for flags to set */
1113 @REPLY
1114 int old_flags; /* old flag value */
1115 @END
1118 /* Duplicate a handle */
1119 @REQ(dup_handle)
1120 obj_handle_t src_process; /* src process handle */
1121 obj_handle_t src_handle; /* src handle to duplicate */
1122 obj_handle_t dst_process; /* dst process handle */
1123 unsigned int access; /* wanted access rights */
1124 unsigned int attributes; /* object attributes */
1125 unsigned int options; /* duplicate options */
1126 @REPLY
1127 obj_handle_t handle; /* duplicated handle in dst process */
1128 @END
1131 /* Make an object temporary */
1132 @REQ(make_temporary)
1133 obj_handle_t handle; /* handle to the object */
1134 @END
1137 /* Open a handle to a process */
1138 @REQ(open_process)
1139 process_id_t pid; /* process id to open */
1140 unsigned int access; /* wanted access rights */
1141 unsigned int attributes; /* object attributes */
1142 @REPLY
1143 obj_handle_t handle; /* handle to the process */
1144 @END
1147 /* Open a handle to a thread */
1148 @REQ(open_thread)
1149 thread_id_t tid; /* thread id to open */
1150 unsigned int access; /* wanted access rights */
1151 unsigned int attributes; /* object attributes */
1152 @REPLY
1153 obj_handle_t handle; /* handle to the thread */
1154 @END
1157 /* Wait for handles */
1158 @REQ(select)
1159 int flags; /* wait flags (see below) */
1160 client_ptr_t cookie; /* magic cookie to return to client */
1161 abstime_t timeout; /* timeout */
1162 data_size_t size; /* size of select_op */
1163 obj_handle_t prev_apc; /* handle to previous APC */
1164 VARARG(result,apc_result); /* result of previous APC */
1165 VARARG(data,select_op,size); /* operation-specific data */
1166 VARARG(context,context); /* suspend context */
1167 @REPLY
1168 apc_call_t call; /* APC call arguments */
1169 obj_handle_t apc_handle; /* handle to next APC */
1170 VARARG(context,context); /* suspend context */
1171 @END
1172 #define SELECT_ALERTABLE 1
1173 #define SELECT_INTERRUPTIBLE 2
1176 /* Create an event */
1177 @REQ(create_event)
1178 unsigned int access; /* wanted access rights */
1179 int manual_reset; /* manual reset event */
1180 int initial_state; /* initial state of the event */
1181 VARARG(objattr,object_attributes); /* object attributes */
1182 @REPLY
1183 obj_handle_t handle; /* handle to the event */
1184 @END
1186 /* Event operation */
1187 @REQ(event_op)
1188 obj_handle_t handle; /* handle to event */
1189 int op; /* event operation (see below) */
1190 @REPLY
1191 int state; /* previous state */
1192 @END
1193 enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT };
1195 @REQ(query_event)
1196 obj_handle_t handle; /* handle to event */
1197 @REPLY
1198 int manual_reset; /* manual reset event */
1199 int state; /* current state of the event */
1200 @END
1202 /* Open an event */
1203 @REQ(open_event)
1204 unsigned int access; /* wanted access rights */
1205 unsigned int attributes; /* object attributes */
1206 obj_handle_t rootdir; /* root directory */
1207 VARARG(name,unicode_str); /* object name */
1208 @REPLY
1209 obj_handle_t handle; /* handle to the event */
1210 @END
1213 /* Create a keyed event */
1214 @REQ(create_keyed_event)
1215 unsigned int access; /* wanted access rights */
1216 VARARG(objattr,object_attributes); /* object attributes */
1217 @REPLY
1218 obj_handle_t handle; /* handle to the event */
1219 @END
1221 /* Open a keyed event */
1222 @REQ(open_keyed_event)
1223 unsigned int access; /* wanted access rights */
1224 unsigned int attributes; /* object attributes */
1225 obj_handle_t rootdir; /* root directory */
1226 VARARG(name,unicode_str); /* object name */
1227 @REPLY
1228 obj_handle_t handle; /* handle to the event */
1229 @END
1232 /* Create a mutex */
1233 @REQ(create_mutex)
1234 unsigned int access; /* wanted access rights */
1235 int owned; /* initially owned? */
1236 VARARG(objattr,object_attributes); /* object attributes */
1237 @REPLY
1238 obj_handle_t handle; /* handle to the mutex */
1239 @END
1242 /* Release a mutex */
1243 @REQ(release_mutex)
1244 obj_handle_t handle; /* handle to the mutex */
1245 @REPLY
1246 unsigned int prev_count; /* value of internal counter, before release */
1247 @END
1250 /* Open a mutex */
1251 @REQ(open_mutex)
1252 unsigned int access; /* wanted access rights */
1253 unsigned int attributes; /* object attributes */
1254 obj_handle_t rootdir; /* root directory */
1255 VARARG(name,unicode_str); /* object name */
1256 @REPLY
1257 obj_handle_t handle; /* handle to the mutex */
1258 @END
1261 /* Query a mutex */
1262 @REQ(query_mutex)
1263 obj_handle_t handle; /* handle to mutex */
1264 @REPLY
1265 unsigned int count; /* current count of mutex */
1266 int owned; /* true if owned by current thread */
1267 int abandoned; /* true if abandoned */
1268 @END
1271 /* Create a semaphore */
1272 @REQ(create_semaphore)
1273 unsigned int access; /* wanted access rights */
1274 unsigned int initial; /* initial count */
1275 unsigned int max; /* maximum count */
1276 VARARG(objattr,object_attributes); /* object attributes */
1277 @REPLY
1278 obj_handle_t handle; /* handle to the semaphore */
1279 @END
1282 /* Release a semaphore */
1283 @REQ(release_semaphore)
1284 obj_handle_t handle; /* handle to the semaphore */
1285 unsigned int count; /* count to add to semaphore */
1286 @REPLY
1287 unsigned int prev_count; /* previous semaphore count */
1288 @END
1290 @REQ(query_semaphore)
1291 obj_handle_t handle; /* handle to the semaphore */
1292 @REPLY
1293 unsigned int current; /* current count */
1294 unsigned int max; /* maximum count */
1295 @END
1297 /* Open a semaphore */
1298 @REQ(open_semaphore)
1299 unsigned int access; /* wanted access rights */
1300 unsigned int attributes; /* object attributes */
1301 obj_handle_t rootdir; /* root directory */
1302 VARARG(name,unicode_str); /* object name */
1303 @REPLY
1304 obj_handle_t handle; /* handle to the semaphore */
1305 @END
1308 /* Create a file */
1309 @REQ(create_file)
1310 unsigned int access; /* wanted access rights */
1311 unsigned int sharing; /* sharing flags */
1312 int create; /* file create action */
1313 unsigned int options; /* file options */
1314 unsigned int attrs; /* file attributes for creation */
1315 VARARG(objattr,object_attributes); /* object attributes */
1316 VARARG(filename,string); /* file name */
1317 @REPLY
1318 obj_handle_t handle; /* handle to the file */
1319 @END
1322 /* Open a file object */
1323 @REQ(open_file_object)
1324 unsigned int access; /* wanted access rights */
1325 unsigned int attributes; /* open attributes */
1326 obj_handle_t rootdir; /* root directory */
1327 unsigned int sharing; /* sharing flags */
1328 unsigned int options; /* file options */
1329 VARARG(filename,unicode_str); /* file name */
1330 @REPLY
1331 obj_handle_t handle; /* handle to the file */
1332 @END
1335 /* Allocate a file handle for a Unix fd */
1336 @REQ(alloc_file_handle)
1337 unsigned int access; /* wanted access rights */
1338 unsigned int attributes; /* object attributes */
1339 int fd; /* file descriptor on the client side */
1340 @REPLY
1341 obj_handle_t handle; /* handle to the file */
1342 @END
1345 /* Get the Unix name from a file handle */
1346 @REQ(get_handle_unix_name)
1347 obj_handle_t handle; /* file handle */
1348 @REPLY
1349 data_size_t name_len; /* unix name length */
1350 VARARG(name,string); /* unix name */
1351 @END
1354 /* Get a Unix fd to access a file */
1355 @REQ(get_handle_fd)
1356 obj_handle_t handle; /* handle to the file */
1357 @REPLY
1358 int type; /* file type (see below) */
1359 int cacheable; /* can fd be cached in the client? */
1360 unsigned int access; /* file access rights */
1361 unsigned int options; /* file open options */
1362 @END
1363 enum server_fd_type
1365 FD_TYPE_INVALID, /* invalid file (no associated fd) */
1366 FD_TYPE_FILE, /* regular file */
1367 FD_TYPE_DIR, /* directory */
1368 FD_TYPE_SOCKET, /* socket */
1369 FD_TYPE_SERIAL, /* serial port */
1370 FD_TYPE_PIPE, /* named pipe */
1371 FD_TYPE_MAILSLOT, /* mailslot */
1372 FD_TYPE_CHAR, /* unspecified char device */
1373 FD_TYPE_DEVICE, /* Windows device file */
1374 FD_TYPE_NB_TYPES
1378 /* Retrieve (or allocate) the client-side directory cache entry */
1379 @REQ(get_directory_cache_entry)
1380 obj_handle_t handle; /* handle to the directory */
1381 @REPLY
1382 int entry; /* cache entry on the client side */
1383 VARARG(free,ints); /* entries that can be freed */
1384 @END
1387 /* Flush a file buffers */
1388 @REQ(flush)
1389 async_data_t async; /* async I/O parameters */
1390 @REPLY
1391 obj_handle_t event; /* event set when finished */
1392 @END
1394 /* Query file information */
1395 @REQ(get_file_info)
1396 obj_handle_t handle; /* handle to the file */
1397 unsigned int info_class; /* queried information class */
1398 @REPLY
1399 VARARG(data,bytes); /* file info data */
1400 @END
1402 /* Query volume information */
1403 @REQ(get_volume_info)
1404 obj_handle_t handle; /* handle to the file */
1405 async_data_t async; /* async I/O parameters */
1406 unsigned int info_class; /* queried information class */
1407 @REPLY
1408 obj_handle_t wait; /* handle to wait on for blocking read */
1409 VARARG(data,bytes); /* volume info data */
1410 @END
1412 /* Lock a region of a file */
1413 @REQ(lock_file)
1414 obj_handle_t handle; /* handle to the file */
1415 file_pos_t offset; /* offset of start of lock */
1416 file_pos_t count; /* count of bytes to lock */
1417 int shared; /* shared or exclusive lock? */
1418 int wait; /* do we want to wait? */
1419 @REPLY
1420 obj_handle_t handle; /* handle to wait on */
1421 int overlapped; /* is it an overlapped I/O handle? */
1422 @END
1425 /* Unlock a region of a file */
1426 @REQ(unlock_file)
1427 obj_handle_t handle; /* handle to the file */
1428 file_pos_t offset; /* offset of start of unlock */
1429 file_pos_t count; /* count of bytes to unlock */
1430 @END
1433 /* Set socket event parameters */
1434 @REQ(set_socket_event)
1435 obj_handle_t handle; /* handle to the socket */
1436 unsigned int mask; /* event mask */
1437 obj_handle_t event; /* event object */
1438 user_handle_t window; /* window to send the message to */
1439 unsigned int msg; /* message to send */
1440 @END
1443 /* Get socket event parameters */
1444 @REQ(get_socket_event)
1445 obj_handle_t handle; /* handle to the socket */
1446 int service; /* clear pending? */
1447 obj_handle_t c_event; /* event to clear */
1448 @REPLY
1449 unsigned int mask; /* event mask */
1450 unsigned int pmask; /* pending events */
1451 unsigned int state; /* status bits */
1452 VARARG(errors,ints); /* event errors */
1453 @END
1456 /* Get socket info */
1457 @REQ(get_socket_info)
1458 obj_handle_t handle; /* handle to the socket */
1459 @REPLY
1460 int family; /* family, see socket manpage */
1461 int type; /* type, see socket manpage */
1462 int protocol; /* protocol, see socket manpage */
1463 @END
1466 /* Re-enable pending socket events */
1467 @REQ(enable_socket_event)
1468 obj_handle_t handle; /* handle to the socket */
1469 unsigned int mask; /* events to re-enable */
1470 unsigned int sstate; /* status bits to set */
1471 unsigned int cstate; /* status bits to clear */
1472 @END
1474 @REQ(set_socket_deferred)
1475 obj_handle_t handle; /* handle to the socket */
1476 obj_handle_t deferred; /* handle to the socket for which accept() is deferred */
1477 @END
1480 /* Retrieve the next pending console ioctl request */
1481 @REQ(get_next_console_request)
1482 obj_handle_t handle; /* console server handle */
1483 int signal; /* server signal state */
1484 int read; /* 1 if reporting result of blocked read ioctl */
1485 unsigned int status; /* status of previous ioctl */
1486 VARARG(out_data,bytes); /* out_data of previous ioctl */
1487 @REPLY
1488 unsigned int code; /* ioctl code */
1489 unsigned int output; /* output id or 0 for input */
1490 data_size_t out_size; /* ioctl output size */
1491 VARARG(in_data,bytes); /* ioctl in_data */
1492 @END
1495 /* enable directory change notifications */
1496 @REQ(read_directory_changes)
1497 unsigned int filter; /* notification filter */
1498 int subtree; /* watch the subtree? */
1499 int want_data; /* flag indicating whether change data should be collected */
1500 async_data_t async; /* async I/O parameters */
1501 @END
1504 @REQ(read_change)
1505 obj_handle_t handle;
1506 @REPLY
1507 VARARG(events,filesystem_event); /* collected filesystem events */
1508 @END
1511 /* Create a file mapping */
1512 @REQ(create_mapping)
1513 unsigned int access; /* wanted access rights */
1514 unsigned int flags; /* SEC_* flags */
1515 unsigned int file_access; /* file access rights */
1516 mem_size_t size; /* mapping size */
1517 obj_handle_t file_handle; /* file handle */
1518 VARARG(objattr,object_attributes); /* object attributes */
1519 @REPLY
1520 obj_handle_t handle; /* handle to the mapping */
1521 @END
1524 /* Open a mapping */
1525 @REQ(open_mapping)
1526 unsigned int access; /* wanted access rights */
1527 unsigned int attributes; /* object attributes */
1528 obj_handle_t rootdir; /* root directory */
1529 VARARG(name,unicode_str); /* object name */
1530 @REPLY
1531 obj_handle_t handle; /* handle to the mapping */
1532 @END
1535 /* Get information about a file mapping */
1536 @REQ(get_mapping_info)
1537 obj_handle_t handle; /* handle to the mapping */
1538 unsigned int access; /* wanted access rights */
1539 @REPLY
1540 mem_size_t size; /* mapping size */
1541 unsigned int flags; /* SEC_* flags */
1542 obj_handle_t shared_file; /* shared mapping file handle */
1543 data_size_t total; /* total required buffer size in bytes */
1544 VARARG(image,pe_image_info);/* image info for SEC_IMAGE mappings */
1545 VARARG(name,unicode_str); /* filename for SEC_IMAGE mappings */
1546 @END
1549 /* Add a memory view in the current process */
1550 @REQ(map_view)
1551 obj_handle_t mapping; /* file mapping handle, or 0 for .so builtin */
1552 unsigned int access; /* wanted access rights */
1553 client_ptr_t base; /* view base address (page-aligned) */
1554 mem_size_t size; /* view size */
1555 file_pos_t start; /* start offset in mapping */
1556 VARARG(image,pe_image_info);/* image info for .so builtins */
1557 VARARG(name,unicode_str); /* image filename for .so builtins */
1558 @END
1561 /* Unmap a memory view from the current process */
1562 @REQ(unmap_view)
1563 client_ptr_t base; /* view base address */
1564 @END
1567 /* Get a range of committed pages in a file mapping */
1568 @REQ(get_mapping_committed_range)
1569 client_ptr_t base; /* view base address */
1570 file_pos_t offset; /* starting offset (page-aligned, in bytes) */
1571 @REPLY
1572 mem_size_t size; /* size of range starting at offset (page-aligned, in bytes) */
1573 int committed; /* whether it is a committed range */
1574 @END
1577 /* Add a range to the committed pages in a file mapping */
1578 @REQ(add_mapping_committed_range)
1579 client_ptr_t base; /* view base address */
1580 file_pos_t offset; /* starting offset (page-aligned, in bytes) */
1581 mem_size_t size; /* size to set (page-aligned, in bytes) or 0 if only retrieving */
1582 @END
1585 /* Check if two memory maps are for the same file */
1586 @REQ(is_same_mapping)
1587 client_ptr_t base1; /* first view base address */
1588 client_ptr_t base2; /* second view base address */
1589 @END
1592 /* Get the filename of a mapping */
1593 @REQ(get_mapping_filename)
1594 obj_handle_t process; /* process handle */
1595 client_ptr_t addr; /* address inside mapped view (in process address space) */
1596 @REPLY
1597 data_size_t len; /* total filename length in bytes */
1598 VARARG(filename,unicode_str); /* filename in NT format */
1599 @END
1602 struct thread_info
1604 timeout_t start_time;
1605 thread_id_t tid;
1606 int base_priority;
1607 int current_priority;
1608 int unix_tid;
1611 struct process_info
1613 timeout_t start_time;
1614 data_size_t name_len;
1615 int thread_count;
1616 int priority;
1617 process_id_t pid;
1618 process_id_t parent_pid;
1619 int handle_count;
1620 int unix_pid;
1621 int __pad;
1622 /* VARARG(name,unicode_str,name_len); */
1623 /* VARARG(threads,struct thread_info,thread_count); */
1626 /* Get a list of processes and threads currently running */
1627 @REQ(list_processes)
1628 @REPLY
1629 data_size_t info_size;
1630 int process_count;
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 or context handle */
1893 unsigned int flags; /* context flags */
1894 @REPLY
1895 int self; /* was it a handle to the current thread? */
1896 obj_handle_t handle; /* pending context handle */
1897 VARARG(context,context); /* thread context */
1898 @END
1901 /* Set the current context of a thread */
1902 @REQ(set_thread_context)
1903 obj_handle_t handle; /* thread handle */
1904 VARARG(context,context); /* thread context */
1905 @REPLY
1906 int self; /* was it a handle to the current thread? */
1907 @END
1910 /* Fetch a selector entry for a thread */
1911 @REQ(get_selector_entry)
1912 obj_handle_t handle; /* thread handle */
1913 int entry; /* LDT entry */
1914 @REPLY
1915 unsigned int base; /* selector base */
1916 unsigned int limit; /* selector limit */
1917 unsigned char flags; /* selector flags */
1918 @END
1921 /* Add an atom */
1922 @REQ(add_atom)
1923 VARARG(name,unicode_str); /* atom name */
1924 @REPLY
1925 atom_t atom; /* resulting atom */
1926 @END
1929 /* Delete an atom */
1930 @REQ(delete_atom)
1931 atom_t atom; /* atom handle */
1932 @END
1935 /* Find an atom */
1936 @REQ(find_atom)
1937 VARARG(name,unicode_str); /* atom name */
1938 @REPLY
1939 atom_t atom; /* atom handle */
1940 @END
1943 /* Get information about an atom */
1944 @REQ(get_atom_information)
1945 atom_t atom; /* atom handle */
1946 @REPLY
1947 int count; /* atom lock count */
1948 int pinned; /* whether the atom has been pinned */
1949 data_size_t total; /* actual length of atom name */
1950 VARARG(name,unicode_str); /* atom name */
1951 @END
1954 /* Get the message queue of the current thread */
1955 @REQ(get_msg_queue)
1956 @REPLY
1957 obj_handle_t handle; /* handle to the queue */
1958 @END
1961 /* Set the file descriptor associated to the current thread queue */
1962 @REQ(set_queue_fd)
1963 obj_handle_t handle; /* handle to the file descriptor */
1964 @END
1967 /* Set the current message queue wakeup mask */
1968 @REQ(set_queue_mask)
1969 unsigned int wake_mask; /* wakeup bits mask */
1970 unsigned int changed_mask; /* changed bits mask */
1971 int skip_wait; /* will we skip waiting if signaled? */
1972 @REPLY
1973 unsigned int wake_bits; /* current wake bits */
1974 unsigned int changed_bits; /* current changed bits */
1975 @END
1978 /* Get the current message queue status */
1979 @REQ(get_queue_status)
1980 unsigned int clear_bits; /* should we clear the change bits? */
1981 @REPLY
1982 unsigned int wake_bits; /* wake bits */
1983 unsigned int changed_bits; /* changed bits since last time */
1984 @END
1987 /* Retrieve the process idle event */
1988 @REQ(get_process_idle_event)
1989 obj_handle_t handle; /* process handle */
1990 @REPLY
1991 obj_handle_t event; /* handle to idle event */
1992 @END
1995 /* Send a message to a thread queue */
1996 @REQ(send_message)
1997 thread_id_t id; /* thread id */
1998 int type; /* message type (see below) */
1999 int flags; /* message flags (see below) */
2000 user_handle_t win; /* window handle */
2001 unsigned int msg; /* message code */
2002 lparam_t wparam; /* parameters */
2003 lparam_t lparam; /* parameters */
2004 timeout_t timeout; /* timeout for reply */
2005 VARARG(data,message_data); /* message data for sent messages */
2006 @END
2008 @REQ(post_quit_message)
2009 int exit_code; /* exit code to return */
2010 @END
2012 enum message_type
2014 MSG_ASCII, /* Ascii message (from SendMessageA) */
2015 MSG_UNICODE, /* Unicode message (from SendMessageW) */
2016 MSG_NOTIFY, /* notify message (from SendNotifyMessageW), always Unicode */
2017 MSG_CALLBACK, /* callback message (from SendMessageCallbackW), always Unicode */
2018 MSG_CALLBACK_RESULT,/* result of a callback message */
2019 MSG_OTHER_PROCESS, /* sent from other process, may include vararg data, always Unicode */
2020 MSG_POSTED, /* posted message (from PostMessageW), always Unicode */
2021 MSG_HARDWARE, /* hardware message */
2022 MSG_WINEVENT, /* winevent message */
2023 MSG_HOOK_LL /* low-level hardware hook */
2025 #define SEND_MSG_ABORT_IF_HUNG 0x01
2028 /* Send a hardware message to a thread queue */
2029 @REQ(send_hardware_message)
2030 user_handle_t win; /* window handle */
2031 hw_input_t input; /* input data */
2032 unsigned int flags; /* flags (see below) */
2033 @REPLY
2034 int wait; /* do we need to wait for a reply? */
2035 int prev_x; /* previous cursor position */
2036 int prev_y;
2037 int new_x; /* new cursor position */
2038 int new_y;
2039 VARARG(keystate,bytes); /* global state array for all the keys */
2040 @END
2041 #define SEND_HWMSG_INJECTED 0x01
2044 /* Get a message from the current queue */
2045 @REQ(get_message)
2046 unsigned int flags; /* PM_* flags */
2047 user_handle_t get_win; /* window handle to get */
2048 unsigned int get_first; /* first message code to get */
2049 unsigned int get_last; /* last message code to get */
2050 unsigned int hw_id; /* id of the previous hardware message (or 0) */
2051 unsigned int wake_mask; /* wakeup bits mask */
2052 unsigned int changed_mask; /* changed bits mask */
2053 @REPLY
2054 user_handle_t win; /* window handle */
2055 unsigned int msg; /* message code */
2056 lparam_t wparam; /* parameters */
2057 lparam_t lparam; /* parameters */
2058 int type; /* message type */
2059 int x; /* message x position */
2060 int y; /* message y position */
2061 unsigned int time; /* message time */
2062 unsigned int active_hooks; /* active hooks bitmap */
2063 data_size_t total; /* total size of extra data */
2064 VARARG(data,message_data); /* message data for sent messages */
2065 @END
2068 /* Reply to a sent message */
2069 @REQ(reply_message)
2070 int remove; /* should we remove the message? */
2071 lparam_t result; /* message result */
2072 VARARG(data,bytes); /* message data for sent messages */
2073 @END
2076 /* Accept and remove the current hardware message */
2077 @REQ(accept_hardware_message)
2078 unsigned int hw_id; /* id of the hardware message */
2079 @END
2082 /* Retrieve the reply for the last message sent */
2083 @REQ(get_message_reply)
2084 int cancel; /* cancel message if not ready? */
2085 @REPLY
2086 lparam_t result; /* message result */
2087 VARARG(data,bytes); /* message data for sent messages */
2088 @END
2091 /* Set a window timer */
2092 @REQ(set_win_timer)
2093 user_handle_t win; /* window handle */
2094 unsigned int msg; /* message to post */
2095 unsigned int rate; /* timer rate in ms */
2096 lparam_t id; /* timer id */
2097 lparam_t lparam; /* message lparam (callback proc) */
2098 @REPLY
2099 lparam_t id; /* timer id */
2100 @END
2103 /* Kill a window timer */
2104 @REQ(kill_win_timer)
2105 user_handle_t win; /* window handle */
2106 lparam_t id; /* timer id */
2107 unsigned int msg; /* message to post */
2108 @END
2111 /* check if the thread owning the window is hung */
2112 @REQ(is_window_hung)
2113 user_handle_t win; /* window handle */
2114 @REPLY
2115 int is_hung;
2116 @END
2119 /* Retrieve info about a serial port */
2120 @REQ(get_serial_info)
2121 obj_handle_t handle; /* handle to comm port */
2122 int flags;
2123 @REPLY
2124 unsigned int eventmask;
2125 unsigned int cookie;
2126 unsigned int pending_write;
2127 @END
2130 /* Set info about a serial port */
2131 @REQ(set_serial_info)
2132 obj_handle_t handle; /* handle to comm port */
2133 int flags; /* bitmask to set values (see below) */
2134 @END
2135 #define SERIALINFO_PENDING_WRITE 0x04
2136 #define SERIALINFO_PENDING_WAIT 0x08
2139 /* Create an async I/O */
2140 @REQ(register_async)
2141 int type; /* type of queue to look after */
2142 async_data_t async; /* async I/O parameters */
2143 int count; /* count - usually # of bytes to be read/written */
2144 @END
2145 #define ASYNC_TYPE_READ 0x01
2146 #define ASYNC_TYPE_WRITE 0x02
2147 #define ASYNC_TYPE_WAIT 0x03
2150 /* Cancel all async op on a fd */
2151 @REQ(cancel_async)
2152 obj_handle_t handle; /* handle to comm port, socket or file */
2153 client_ptr_t iosb; /* I/O status block (NULL=all) */
2154 int only_thread; /* cancel matching this thread */
2155 @END
2158 /* Retrieve results of an async */
2159 @REQ(get_async_result)
2160 client_ptr_t user_arg; /* user arg used to identify async */
2161 @REPLY
2162 data_size_t size; /* result size (input or output depending on the operation) */
2163 VARARG(out_data,bytes); /* iosb output data */
2164 @END
2167 /* Perform a read on a file object */
2168 @REQ(read)
2169 async_data_t async; /* async I/O parameters */
2170 file_pos_t pos; /* read position */
2171 @REPLY
2172 obj_handle_t wait; /* handle to wait on for blocking read */
2173 unsigned int options; /* device open options */
2174 VARARG(data,bytes); /* read data */
2175 @END
2178 /* Perform a write on a file object */
2179 @REQ(write)
2180 async_data_t async; /* async I/O parameters */
2181 file_pos_t pos; /* write position */
2182 VARARG(data,bytes); /* write data */
2183 @REPLY
2184 obj_handle_t wait; /* handle to wait on for blocking write */
2185 unsigned int options; /* device open options */
2186 data_size_t size; /* size written */
2187 @END
2190 /* Perform an ioctl on a file */
2191 @REQ(ioctl)
2192 ioctl_code_t code; /* ioctl code */
2193 async_data_t async; /* async I/O parameters */
2194 VARARG(in_data,bytes); /* ioctl input data */
2195 @REPLY
2196 obj_handle_t wait; /* handle to wait on for blocking ioctl */
2197 unsigned int options; /* device open options */
2198 VARARG(out_data,bytes); /* ioctl output data */
2199 @END
2202 /* Store results of an async irp */
2203 @REQ(set_irp_result)
2204 obj_handle_t handle; /* handle to the irp */
2205 unsigned int status; /* status of the irp */
2206 data_size_t size; /* result size (input or output depending on the operation) */
2207 VARARG(data,bytes); /* output data of the irp */
2208 @END
2211 /* Create a named pipe */
2212 @REQ(create_named_pipe)
2213 unsigned int access;
2214 unsigned int options;
2215 unsigned int sharing;
2216 unsigned int maxinstances;
2217 unsigned int outsize;
2218 unsigned int insize;
2219 timeout_t timeout;
2220 unsigned int flags;
2221 VARARG(objattr,object_attributes); /* object attributes */
2222 @REPLY
2223 obj_handle_t handle; /* handle to the pipe */
2224 @END
2226 /* flags in create_named_pipe and get_named_pipe_info */
2227 #define NAMED_PIPE_MESSAGE_STREAM_WRITE 0x0001
2228 #define NAMED_PIPE_MESSAGE_STREAM_READ 0x0002
2229 #define NAMED_PIPE_NONBLOCKING_MODE 0x0004
2230 #define NAMED_PIPE_SERVER_END 0x8000
2232 /* Set named pipe information by handle */
2233 @REQ(set_named_pipe_info)
2234 obj_handle_t handle;
2235 unsigned int flags;
2236 @END
2238 /* Create a window */
2239 @REQ(create_window)
2240 user_handle_t parent; /* parent window */
2241 user_handle_t owner; /* owner window */
2242 atom_t atom; /* class atom */
2243 mod_handle_t instance; /* module instance */
2244 int dpi; /* system DPI */
2245 int awareness; /* thread DPI awareness */
2246 VARARG(class,unicode_str); /* class name */
2247 @REPLY
2248 user_handle_t handle; /* created window */
2249 user_handle_t parent; /* full handle of parent */
2250 user_handle_t owner; /* full handle of owner */
2251 int extra; /* number of extra bytes */
2252 client_ptr_t class_ptr; /* pointer to class in client address space */
2253 int dpi; /* window DPI if not per-monitor aware */
2254 int awareness; /* window DPI awareness */
2255 @END
2258 /* Destroy a window */
2259 @REQ(destroy_window)
2260 user_handle_t handle; /* handle to the window */
2261 @END
2264 /* Retrieve the desktop window for the current thread */
2265 @REQ(get_desktop_window)
2266 int force; /* force creation if it doesn't exist */
2267 @REPLY
2268 user_handle_t top_window; /* handle to the desktop window */
2269 user_handle_t msg_window; /* handle to the top-level HWND_MESSAGE parent */
2270 @END
2273 /* Set a window owner */
2274 @REQ(set_window_owner)
2275 user_handle_t handle; /* handle to the window */
2276 user_handle_t owner; /* new owner */
2277 @REPLY
2278 user_handle_t full_owner; /* full handle of new owner */
2279 user_handle_t prev_owner; /* full handle of previous owner */
2280 @END
2283 /* Get information from a window handle */
2284 @REQ(get_window_info)
2285 user_handle_t handle; /* handle to the window */
2286 @REPLY
2287 user_handle_t full_handle; /* full 32-bit handle */
2288 user_handle_t last_active; /* last active popup */
2289 process_id_t pid; /* process owning the window */
2290 thread_id_t tid; /* thread owning the window */
2291 atom_t atom; /* class atom */
2292 int is_unicode; /* ANSI or unicode */
2293 int dpi; /* window DPI */
2294 int awareness; /* DPI awareness */
2295 @END
2298 /* Set some information in a window */
2299 @REQ(set_window_info)
2300 unsigned short flags; /* flags for fields to set (see below) */
2301 short int is_unicode; /* ANSI or unicode */
2302 user_handle_t handle; /* handle to the window */
2303 unsigned int style; /* window style */
2304 unsigned int ex_style; /* window extended style */
2305 unsigned int id; /* window id */
2306 mod_handle_t instance; /* creator instance */
2307 lparam_t user_data; /* user-specific data */
2308 int extra_offset; /* offset to set in extra bytes */
2309 data_size_t extra_size; /* size to set in extra bytes */
2310 lparam_t extra_value; /* value to set in extra bytes */
2311 @REPLY
2312 unsigned int old_style; /* old window style */
2313 unsigned int old_ex_style; /* old window extended style */
2314 mod_handle_t old_instance; /* old creator instance */
2315 lparam_t old_user_data; /* old user-specific data */
2316 lparam_t old_extra_value; /* old value in extra bytes */
2317 unsigned int old_id; /* old window id */
2318 @END
2319 #define SET_WIN_STYLE 0x01
2320 #define SET_WIN_EXSTYLE 0x02
2321 #define SET_WIN_ID 0x04
2322 #define SET_WIN_INSTANCE 0x08
2323 #define SET_WIN_USERDATA 0x10
2324 #define SET_WIN_EXTRA 0x20
2325 #define SET_WIN_UNICODE 0x40
2328 /* Set the parent of a window */
2329 @REQ(set_parent)
2330 user_handle_t handle; /* handle to the window */
2331 user_handle_t parent; /* handle to the parent */
2332 @REPLY
2333 user_handle_t old_parent; /* old parent window */
2334 user_handle_t full_parent; /* full handle of new parent */
2335 int dpi; /* new window DPI if not per-monitor aware */
2336 int awareness; /* new DPI awareness */
2337 @END
2340 /* Get a list of the window parents, up to the root of the tree */
2341 @REQ(get_window_parents)
2342 user_handle_t handle; /* handle to the window */
2343 @REPLY
2344 int count; /* total count of parents */
2345 VARARG(parents,user_handles); /* parent handles */
2346 @END
2349 /* Get a list of the window children */
2350 @REQ(get_window_children)
2351 obj_handle_t desktop; /* handle to desktop */
2352 user_handle_t parent; /* parent window */
2353 atom_t atom; /* class atom for the listed children */
2354 thread_id_t tid; /* thread owning the listed children */
2355 VARARG(class,unicode_str); /* class name */
2356 @REPLY
2357 int count; /* total count of children */
2358 VARARG(children,user_handles); /* children handles */
2359 @END
2362 /* Get a list of the window children that contain a given point */
2363 @REQ(get_window_children_from_point)
2364 user_handle_t parent; /* parent window */
2365 int x; /* point in parent coordinates */
2366 int y;
2367 int dpi; /* dpi for the point coordinates */
2368 @REPLY
2369 int count; /* total count of children */
2370 VARARG(children,user_handles); /* children handles */
2371 @END
2374 /* Get window tree information from a window handle */
2375 @REQ(get_window_tree)
2376 user_handle_t handle; /* handle to the window */
2377 @REPLY
2378 user_handle_t parent; /* parent window */
2379 user_handle_t owner; /* owner window */
2380 user_handle_t next_sibling; /* next sibling in Z-order */
2381 user_handle_t prev_sibling; /* prev sibling in Z-order */
2382 user_handle_t first_sibling; /* first sibling in Z-order */
2383 user_handle_t last_sibling; /* last sibling in Z-order */
2384 user_handle_t first_child; /* first child */
2385 user_handle_t last_child; /* last child */
2386 @END
2388 /* Set the position and Z order of a window */
2389 @REQ(set_window_pos)
2390 unsigned short swp_flags; /* SWP_* flags */
2391 unsigned short paint_flags; /* paint flags (see below) */
2392 user_handle_t handle; /* handle to the window */
2393 user_handle_t previous; /* previous window in Z order */
2394 rectangle_t window; /* window rectangle (in parent coords) */
2395 rectangle_t client; /* client rectangle (in parent coords) */
2396 VARARG(valid,rectangles); /* valid rectangles from WM_NCCALCSIZE (in parent coords) */
2397 @REPLY
2398 unsigned int new_style; /* new window style */
2399 unsigned int new_ex_style; /* new window extended style */
2400 user_handle_t surface_win; /* parent window that holds the surface */
2401 int needs_update; /* whether the surface region needs an update */
2402 @END
2403 #define SET_WINPOS_PAINT_SURFACE 0x01 /* window has a paintable surface */
2404 #define SET_WINPOS_PIXEL_FORMAT 0x02 /* window has a custom pixel format */
2406 /* Get the window and client rectangles of a window */
2407 @REQ(get_window_rectangles)
2408 user_handle_t handle; /* handle to the window */
2409 int relative; /* coords relative to (see below) */
2410 int dpi; /* DPI to map to, or zero for per-monitor DPI */
2411 @REPLY
2412 rectangle_t window; /* window rectangle */
2413 rectangle_t client; /* client rectangle */
2414 @END
2415 enum coords_relative
2417 COORDS_CLIENT, /* relative to client area */
2418 COORDS_WINDOW, /* relative to whole window area */
2419 COORDS_PARENT, /* relative to parent's client area */
2420 COORDS_SCREEN /* relative to screen origin */
2424 /* Get the window text */
2425 @REQ(get_window_text)
2426 user_handle_t handle; /* handle to the window */
2427 @REPLY
2428 data_size_t length; /* total length in WCHARs */
2429 VARARG(text,unicode_str); /* window text */
2430 @END
2433 /* Set the window text */
2434 @REQ(set_window_text)
2435 user_handle_t handle; /* handle to the window */
2436 VARARG(text,unicode_str); /* window text */
2437 @END
2440 /* Get the coordinates offset between two windows */
2441 @REQ(get_windows_offset)
2442 user_handle_t from; /* handle to the first window */
2443 user_handle_t to; /* handle to the second window */
2444 int dpi; /* DPI to map to, or zero for per-monitor DPI */
2445 @REPLY
2446 int x; /* x coordinate offset */
2447 int y; /* y coordinate offset */
2448 int mirror; /* whether to mirror the x coordinate */
2449 @END
2452 /* Get the visible region of a window */
2453 @REQ(get_visible_region)
2454 user_handle_t window; /* handle to the window */
2455 unsigned int flags; /* DCX flags */
2456 @REPLY
2457 user_handle_t top_win; /* top window to clip against */
2458 rectangle_t top_rect; /* top window visible rect with screen coords */
2459 rectangle_t win_rect; /* window rect in screen coords */
2460 unsigned int paint_flags; /* paint flags (from SET_WINPOS_* flags) */
2461 data_size_t total_size; /* total size of the resulting region */
2462 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2463 @END
2466 /* Get the visible surface region of a window */
2467 @REQ(get_surface_region)
2468 user_handle_t window; /* handle to the window */
2469 @REPLY
2470 rectangle_t visible_rect; /* window visible rect in screen coords */
2471 data_size_t total_size; /* total size of the resulting region */
2472 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2473 @END
2476 /* Get the window region */
2477 @REQ(get_window_region)
2478 user_handle_t window; /* handle to the window */
2479 @REPLY
2480 data_size_t total_size; /* total size of the resulting region */
2481 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2482 @END
2485 /* Set the window region */
2486 @REQ(set_window_region)
2487 user_handle_t window; /* handle to the window */
2488 int redraw; /* redraw the window? */
2489 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2490 @END
2493 /* Get the window update region */
2494 @REQ(get_update_region)
2495 user_handle_t window; /* handle to the window */
2496 user_handle_t from_child; /* child to start searching from */
2497 unsigned int flags; /* update flags (see below) */
2498 @REPLY
2499 user_handle_t child; /* child to repaint (or window itself) */
2500 unsigned int flags; /* resulting update flags (see below) */
2501 data_size_t total_size; /* total size of the resulting region */
2502 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2503 @END
2504 #define UPDATE_NONCLIENT 0x001 /* get region for repainting non-client area */
2505 #define UPDATE_ERASE 0x002 /* get region for erasing client area */
2506 #define UPDATE_PAINT 0x004 /* get region for painting client area */
2507 #define UPDATE_INTERNALPAINT 0x008 /* get region if internal paint is pending */
2508 #define UPDATE_ALLCHILDREN 0x010 /* force repaint of all children */
2509 #define UPDATE_NOCHILDREN 0x020 /* don't try to repaint any children */
2510 #define UPDATE_NOREGION 0x040 /* don't return a region, only the flags */
2511 #define UPDATE_DELAYED_ERASE 0x080 /* still needs erase after BeginPaint */
2512 #define UPDATE_CLIPCHILDREN 0x100 /* remove clipped children from the update region */
2515 /* Update the z order of a window so that a given rectangle is fully visible */
2516 @REQ(update_window_zorder)
2517 user_handle_t window; /* handle to the window */
2518 rectangle_t rect; /* rectangle that must be visible (in client coords) */
2519 @END
2522 /* Mark parts of a window as needing a redraw */
2523 @REQ(redraw_window)
2524 user_handle_t window; /* handle to the window */
2525 unsigned int flags; /* RDW_* flags */
2526 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2527 @END
2530 /* Set a window property */
2531 @REQ(set_window_property)
2532 user_handle_t window; /* handle to the window */
2533 lparam_t data; /* data to store */
2534 atom_t atom; /* property atom (if no name specified) */
2535 VARARG(name,unicode_str); /* property name */
2536 @END
2539 /* Remove a window property */
2540 @REQ(remove_window_property)
2541 user_handle_t window; /* handle to the window */
2542 atom_t atom; /* property atom (if no name specified) */
2543 VARARG(name,unicode_str); /* property name */
2544 @REPLY
2545 lparam_t data; /* data stored in property */
2546 @END
2549 /* Get a window property */
2550 @REQ(get_window_property)
2551 user_handle_t window; /* handle to the window */
2552 atom_t atom; /* property atom (if no name specified) */
2553 VARARG(name,unicode_str); /* property name */
2554 @REPLY
2555 lparam_t data; /* data stored in property */
2556 @END
2559 /* Get the list of properties of a window */
2560 @REQ(get_window_properties)
2561 user_handle_t window; /* handle to the window */
2562 @REPLY
2563 int total; /* total number of properties */
2564 VARARG(props,properties); /* list of properties */
2565 @END
2568 /* Create a window station */
2569 @REQ(create_winstation)
2570 unsigned int flags; /* window station flags */
2571 unsigned int access; /* wanted access rights */
2572 unsigned int attributes; /* object attributes */
2573 obj_handle_t rootdir; /* root directory */
2574 VARARG(name,unicode_str); /* object name */
2575 @REPLY
2576 obj_handle_t handle; /* handle to the window station */
2577 @END
2580 /* Open a handle to a window station */
2581 @REQ(open_winstation)
2582 unsigned int access; /* wanted access rights */
2583 unsigned int attributes; /* object attributes */
2584 obj_handle_t rootdir; /* root directory */
2585 VARARG(name,unicode_str); /* object name */
2586 @REPLY
2587 obj_handle_t handle; /* handle to the window station */
2588 @END
2591 /* Close a window station */
2592 @REQ(close_winstation)
2593 obj_handle_t handle; /* handle to the window station */
2594 @END
2597 /* Get the process current window station */
2598 @REQ(get_process_winstation)
2599 @REPLY
2600 obj_handle_t handle; /* handle to the window station */
2601 @END
2604 /* Set the process current window station */
2605 @REQ(set_process_winstation)
2606 obj_handle_t handle; /* handle to the window station */
2607 @END
2610 /* Enumerate window stations */
2611 @REQ(enum_winstation)
2612 unsigned int index; /* current index */
2613 @REPLY
2614 unsigned int next; /* next index */
2615 VARARG(name,unicode_str); /* window station name */
2616 @END
2619 /* Create a desktop */
2620 @REQ(create_desktop)
2621 unsigned int flags; /* desktop flags */
2622 unsigned int access; /* wanted access rights */
2623 unsigned int attributes; /* object attributes */
2624 VARARG(name,unicode_str); /* object name */
2625 @REPLY
2626 obj_handle_t handle; /* handle to the desktop */
2627 @END
2630 /* Open a handle to a desktop */
2631 @REQ(open_desktop)
2632 obj_handle_t winsta; /* window station to open (null allowed) */
2633 unsigned int flags; /* desktop flags */
2634 unsigned int access; /* wanted access rights */
2635 unsigned int attributes; /* object attributes */
2636 VARARG(name,unicode_str); /* object name */
2637 @REPLY
2638 obj_handle_t handle; /* handle to the desktop */
2639 @END
2642 /* Open a handle to current input desktop */
2643 @REQ(open_input_desktop)
2644 unsigned int flags; /* desktop flags */
2645 unsigned int access; /* wanted access rights */
2646 unsigned int attributes; /* object attributes */
2647 @REPLY
2648 obj_handle_t handle; /* handle to the desktop */
2649 @END
2652 /* Close a desktop */
2653 @REQ(close_desktop)
2654 obj_handle_t handle; /* handle to the desktop */
2655 @END
2658 /* Get the thread current desktop */
2659 @REQ(get_thread_desktop)
2660 thread_id_t tid; /* thread id */
2661 @REPLY
2662 obj_handle_t handle; /* handle to the desktop */
2663 @END
2666 /* Set the thread current desktop */
2667 @REQ(set_thread_desktop)
2668 obj_handle_t handle; /* handle to the desktop */
2669 @END
2672 /* Enumerate desktops */
2673 @REQ(enum_desktop)
2674 obj_handle_t winstation; /* handle to the window station */
2675 unsigned int index; /* current index */
2676 @REPLY
2677 unsigned int next; /* next index */
2678 VARARG(name,unicode_str); /* window station name */
2679 @END
2682 /* Get/set information about a user object (window station or desktop) */
2683 @REQ(set_user_object_info)
2684 obj_handle_t handle; /* handle to the object */
2685 unsigned int flags; /* information to set/get */
2686 unsigned int obj_flags; /* new object flags */
2687 @REPLY
2688 int is_desktop; /* is object a desktop? */
2689 unsigned int old_obj_flags; /* old object flags */
2690 VARARG(name,unicode_str); /* object name */
2691 @END
2692 #define SET_USER_OBJECT_SET_FLAGS 1
2693 #define SET_USER_OBJECT_GET_FULL_NAME 2
2696 /* Register a hotkey */
2697 @REQ(register_hotkey)
2698 user_handle_t window; /* handle to the window */
2699 int id; /* hotkey identifier */
2700 unsigned int flags; /* modifier keys */
2701 unsigned int vkey; /* virtual key code */
2702 @REPLY
2703 int replaced; /* did we replace an existing hotkey? */
2704 unsigned int flags; /* flags of replaced hotkey */
2705 unsigned int vkey; /* virtual key code of replaced hotkey */
2706 @END
2709 /* Unregister a hotkey */
2710 @REQ(unregister_hotkey)
2711 user_handle_t window; /* handle to the window */
2712 int id; /* hotkey identifier */
2713 @REPLY
2714 unsigned int flags; /* flags of removed hotkey */
2715 unsigned int vkey; /* virtual key code of removed hotkey */
2716 @END
2719 /* Attach (or detach) thread inputs */
2720 @REQ(attach_thread_input)
2721 thread_id_t tid_from; /* thread to be attached */
2722 thread_id_t tid_to; /* thread to which tid_from should be attached */
2723 int attach; /* is it an attach? */
2724 @END
2727 /* Get input data for a given thread */
2728 @REQ(get_thread_input)
2729 thread_id_t tid; /* id of thread */
2730 @REPLY
2731 user_handle_t focus; /* handle to the focus window */
2732 user_handle_t capture; /* handle to the capture window */
2733 user_handle_t active; /* handle to the active window */
2734 user_handle_t foreground; /* handle to the global foreground window */
2735 user_handle_t menu_owner; /* handle to the menu owner */
2736 user_handle_t move_size; /* handle to the moving/resizing window */
2737 user_handle_t caret; /* handle to the caret window */
2738 user_handle_t cursor; /* handle to the cursor */
2739 int show_count; /* cursor show count */
2740 rectangle_t rect; /* caret rectangle */
2741 @END
2744 /* Get the time of the last input event */
2745 @REQ(get_last_input_time)
2746 @REPLY
2747 unsigned int time;
2748 @END
2751 /* Retrieve queue keyboard state for current thread or global async state */
2752 @REQ(get_key_state)
2753 int async; /* whether to query the async state */
2754 int key; /* optional key code or -1 */
2755 @REPLY
2756 unsigned char state; /* state of specified key */
2757 VARARG(keystate,bytes); /* state array for all the keys */
2758 @END
2760 /* Set queue keyboard state for current thread */
2761 @REQ(set_key_state)
2762 int async; /* whether to change the async state too */
2763 VARARG(keystate,bytes); /* state array for all the keys */
2764 @END
2766 /* Set the system foreground window */
2767 @REQ(set_foreground_window)
2768 user_handle_t handle; /* handle to the foreground window */
2769 @REPLY
2770 user_handle_t previous; /* handle to the previous foreground window */
2771 int send_msg_old; /* whether we have to send a msg to the old window */
2772 int send_msg_new; /* whether we have to send a msg to the new window */
2773 @END
2775 /* Set the current thread focus window */
2776 @REQ(set_focus_window)
2777 user_handle_t handle; /* handle to the focus window */
2778 @REPLY
2779 user_handle_t previous; /* handle to the previous focus window */
2780 @END
2782 /* Set the current thread active window */
2783 @REQ(set_active_window)
2784 user_handle_t handle; /* handle to the active window */
2785 @REPLY
2786 user_handle_t previous; /* handle to the previous active window */
2787 @END
2789 /* Set the current thread capture window */
2790 @REQ(set_capture_window)
2791 user_handle_t handle; /* handle to the capture window */
2792 unsigned int flags; /* capture flags (see below) */
2793 @REPLY
2794 user_handle_t previous; /* handle to the previous capture window */
2795 user_handle_t full_handle; /* full 32-bit handle of new capture window */
2796 @END
2797 #define CAPTURE_MENU 0x01 /* capture is for a menu */
2798 #define CAPTURE_MOVESIZE 0x02 /* capture is for moving/resizing */
2801 /* Set the current thread caret window */
2802 @REQ(set_caret_window)
2803 user_handle_t handle; /* handle to the caret window */
2804 int width; /* caret width */
2805 int height; /* caret height */
2806 @REPLY
2807 user_handle_t previous; /* handle to the previous caret window */
2808 rectangle_t old_rect; /* previous caret rectangle */
2809 int old_hide; /* previous hide count */
2810 int old_state; /* previous caret state (1=on, 0=off) */
2811 @END
2814 /* Set the current thread caret information */
2815 @REQ(set_caret_info)
2816 unsigned int flags; /* caret flags (see below) */
2817 user_handle_t handle; /* handle to the caret window */
2818 int x; /* caret x position */
2819 int y; /* caret y position */
2820 int hide; /* increment for hide count (can be negative to show it) */
2821 int state; /* caret state (see below) */
2822 @REPLY
2823 user_handle_t full_handle; /* handle to the current caret window */
2824 rectangle_t old_rect; /* previous caret rectangle */
2825 int old_hide; /* previous hide count */
2826 int old_state; /* previous caret state (1=on, 0=off) */
2827 @END
2828 #define SET_CARET_POS 0x01 /* set the caret position from x,y */
2829 #define SET_CARET_HIDE 0x02 /* increment the caret hide count */
2830 #define SET_CARET_STATE 0x04 /* set the caret on/off state */
2831 enum caret_state
2833 CARET_STATE_OFF, /* off */
2834 CARET_STATE_ON, /* on */
2835 CARET_STATE_TOGGLE, /* toggle current state */
2836 CARET_STATE_ON_IF_MOVED /* on if the position differs, unchanged otherwise */
2840 /* Set a window hook */
2841 @REQ(set_hook)
2842 int id; /* id of the hook */
2843 process_id_t pid; /* id of process to set the hook into */
2844 thread_id_t tid; /* id of thread to set the hook into */
2845 int event_min;
2846 int event_max;
2847 client_ptr_t proc; /* hook procedure */
2848 int flags;
2849 int unicode; /* is it a unicode hook? */
2850 VARARG(module,unicode_str); /* module name */
2851 @REPLY
2852 user_handle_t handle; /* handle to the hook */
2853 unsigned int active_hooks; /* active hooks bitmap */
2854 @END
2857 /* Remove a window hook */
2858 @REQ(remove_hook)
2859 user_handle_t handle; /* handle to the hook */
2860 client_ptr_t proc; /* hook procedure if handle is 0 */
2861 int id; /* id of the hook if handle is 0 */
2862 @REPLY
2863 unsigned int active_hooks; /* active hooks bitmap */
2864 @END
2867 /* Start calling a hook chain */
2868 @REQ(start_hook_chain)
2869 int id; /* id of the hook */
2870 int event; /* signalled event */
2871 user_handle_t window; /* handle to the event window */
2872 int object_id; /* object id for out of context winevent */
2873 int child_id; /* child id for out of context winevent */
2874 @REPLY
2875 user_handle_t handle; /* handle to the next hook */
2876 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2877 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2878 int unicode; /* is it a unicode hook? */
2879 client_ptr_t proc; /* hook procedure */
2880 unsigned int active_hooks; /* active hooks bitmap */
2881 VARARG(module,unicode_str); /* module name */
2882 @END
2885 /* Finished calling a hook chain */
2886 @REQ(finish_hook_chain)
2887 int id; /* id of the hook */
2888 @END
2891 /* Get the hook information */
2892 @REQ(get_hook_info)
2893 user_handle_t handle; /* handle to the current hook */
2894 int get_next; /* do we want info about current or next hook? */
2895 int event; /* signalled event */
2896 user_handle_t window; /* handle to the event window */
2897 int object_id; /* object id for out of context winevent */
2898 int child_id; /* child id for out of context winevent */
2899 @REPLY
2900 user_handle_t handle; /* handle to the hook */
2901 int id; /* id of the hook */
2902 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2903 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2904 client_ptr_t proc; /* hook procedure */
2905 int unicode; /* is it a unicode hook? */
2906 VARARG(module,unicode_str); /* module name */
2907 @END
2910 /* Create a window class */
2911 @REQ(create_class)
2912 int local; /* is it a local class? */
2913 atom_t atom; /* class atom */
2914 unsigned int style; /* class style */
2915 mod_handle_t instance; /* module instance */
2916 int extra; /* number of extra class bytes */
2917 int win_extra; /* number of window extra bytes */
2918 client_ptr_t client_ptr; /* pointer to class in client address space */
2919 data_size_t name_offset; /* base class name offset for specified atom */
2920 VARARG(name,unicode_str); /* class name */
2921 @REPLY
2922 atom_t atom; /* resulting class atom */
2923 @END
2926 /* Destroy a window class */
2927 @REQ(destroy_class)
2928 atom_t atom; /* class atom */
2929 mod_handle_t instance; /* module instance */
2930 VARARG(name,unicode_str); /* class name */
2931 @REPLY
2932 client_ptr_t client_ptr; /* pointer to class in client address space */
2933 @END
2936 /* Set some information in a class */
2937 @REQ(set_class_info)
2938 user_handle_t window; /* handle to the window */
2939 unsigned int flags; /* flags for info to set (see below) */
2940 atom_t atom; /* class atom */
2941 unsigned int style; /* class style */
2942 int win_extra; /* number of window extra bytes */
2943 mod_handle_t instance; /* module instance */
2944 int extra_offset; /* offset to set in extra bytes */
2945 data_size_t extra_size; /* size to set in extra bytes */
2946 lparam_t extra_value; /* value to set in extra bytes */
2947 @REPLY
2948 atom_t old_atom; /* previous class atom */
2949 atom_t base_atom; /* base class atom */
2950 mod_handle_t old_instance; /* previous module instance */
2951 lparam_t old_extra_value; /* old value in extra bytes */
2952 unsigned int old_style; /* previous class style */
2953 int old_extra; /* previous number of class extra bytes */
2954 int old_win_extra; /* previous number of window extra bytes */
2955 @END
2956 #define SET_CLASS_ATOM 0x0001
2957 #define SET_CLASS_STYLE 0x0002
2958 #define SET_CLASS_WINEXTRA 0x0004
2959 #define SET_CLASS_INSTANCE 0x0008
2960 #define SET_CLASS_EXTRA 0x0010
2963 /* Open the clipboard */
2964 @REQ(open_clipboard)
2965 user_handle_t window; /* clipboard window */
2966 @REPLY
2967 user_handle_t owner; /* current clipboard owner */
2968 @END
2971 /* Close the clipboard */
2972 @REQ(close_clipboard)
2973 @REPLY
2974 user_handle_t viewer; /* first clipboard viewer */
2975 user_handle_t owner; /* current clipboard owner */
2976 @END
2979 /* Empty the clipboard and grab ownership */
2980 @REQ(empty_clipboard)
2981 @END
2984 /* Add a data format to the clipboard */
2985 @REQ(set_clipboard_data)
2986 unsigned int format; /* clipboard format of the data */
2987 unsigned int lcid; /* locale id to use for synthesizing text formats */
2988 VARARG(data,bytes); /* data contents */
2989 @REPLY
2990 unsigned int seqno; /* sequence number for the set data */
2991 @END
2994 /* Fetch a data format from the clipboard */
2995 @REQ(get_clipboard_data)
2996 unsigned int format; /* clipboard format of the data */
2997 int render; /* will we try to render it if missing? */
2998 int cached; /* do we already have it in the client-side cache? */
2999 unsigned int seqno; /* sequence number for the data in the cache */
3000 @REPLY
3001 unsigned int from; /* for synthesized data, format to generate it from */
3002 user_handle_t owner; /* clipboard owner for delayed-rendered formats */
3003 unsigned int seqno; /* sequence number for the originally set data */
3004 data_size_t total; /* total data size */
3005 VARARG(data,bytes); /* data contents */
3006 @END
3009 /* Retrieve a list of available formats */
3010 @REQ(get_clipboard_formats)
3011 unsigned int format; /* specific format to query, return all if 0 */
3012 @REPLY
3013 unsigned int count; /* count of available formats */
3014 VARARG(formats,uints); /* array of available formats */
3015 @END
3018 /* Retrieve the next available format */
3019 @REQ(enum_clipboard_formats)
3020 unsigned int previous; /* previous format, or first if 0 */
3021 @REPLY
3022 unsigned int format; /* next format */
3023 @END
3026 /* Release ownership of the clipboard */
3027 @REQ(release_clipboard)
3028 user_handle_t owner; /* clipboard owner to release */
3029 @REPLY
3030 user_handle_t viewer; /* first clipboard viewer */
3031 user_handle_t owner; /* current clipboard owner */
3032 @END
3035 /* Get clipboard information */
3036 @REQ(get_clipboard_info)
3037 @REPLY
3038 user_handle_t window; /* clipboard window */
3039 user_handle_t owner; /* clipboard owner */
3040 user_handle_t viewer; /* clipboard viewer */
3041 unsigned int seqno; /* current sequence number */
3042 @END
3045 /* Set the clipboard viewer window */
3046 @REQ(set_clipboard_viewer)
3047 user_handle_t viewer; /* clipboard viewer */
3048 user_handle_t previous; /* if non-zero, check that this was the previous viewer */
3049 @REPLY
3050 user_handle_t old_viewer; /* previous clipboard viewer */
3051 user_handle_t owner; /* clipboard owner */
3052 @END
3055 /* Add a clipboard listener window */
3056 @REQ(add_clipboard_listener)
3057 user_handle_t window; /* clipboard listener window */
3058 @END
3061 /* Remove a clipboard listener window */
3062 @REQ(remove_clipboard_listener)
3063 user_handle_t window; /* clipboard listener window */
3064 @END
3067 /* Open a security token */
3068 @REQ(open_token)
3069 obj_handle_t handle; /* handle to the thread or process */
3070 unsigned int access; /* access rights to the new token */
3071 unsigned int attributes;/* object attributes */
3072 unsigned int flags; /* flags (see below) */
3073 @REPLY
3074 obj_handle_t token; /* handle to the token */
3075 @END
3076 #define OPEN_TOKEN_THREAD 1
3077 #define OPEN_TOKEN_AS_SELF 2
3080 /* Set/get the global windows */
3081 @REQ(set_global_windows)
3082 unsigned int flags; /* flags for fields to set (see below) */
3083 user_handle_t shell_window; /* handle to the new shell window */
3084 user_handle_t shell_listview; /* handle to the new shell listview window */
3085 user_handle_t progman_window; /* handle to the new program manager window */
3086 user_handle_t taskman_window; /* handle to the new task manager window */
3087 @REPLY
3088 user_handle_t old_shell_window; /* handle to the shell window */
3089 user_handle_t old_shell_listview; /* handle to the shell listview window */
3090 user_handle_t old_progman_window; /* handle to the new program manager window */
3091 user_handle_t old_taskman_window; /* handle to the new task manager window */
3092 @END
3093 #define SET_GLOBAL_SHELL_WINDOWS 0x01 /* set both main shell and listview windows */
3094 #define SET_GLOBAL_PROGMAN_WINDOW 0x02
3095 #define SET_GLOBAL_TASKMAN_WINDOW 0x04
3097 /* Adjust the privileges held by a token */
3098 @REQ(adjust_token_privileges)
3099 obj_handle_t handle; /* handle to the token */
3100 int disable_all; /* disable all privileges? */
3101 int get_modified_state; /* get modified privileges? */
3102 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to enable/disable/remove */
3103 @REPLY
3104 unsigned int len; /* total length in bytes required to store token privileges */
3105 VARARG(privileges,LUID_AND_ATTRIBUTES); /* modified privileges */
3106 @END
3108 /* Retrieves the set of privileges held by or available to a token */
3109 @REQ(get_token_privileges)
3110 obj_handle_t handle; /* handle to the token */
3111 @REPLY
3112 unsigned int len; /* total length in bytes required to store token privileges */
3113 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
3114 @END
3116 /* Check the token has the required privileges */
3117 @REQ(check_token_privileges)
3118 obj_handle_t handle; /* handle to the token */
3119 int all_required; /* are all the privileges required for the check to succeed? */
3120 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to check */
3121 @REPLY
3122 int has_privileges; /* does the token have the required privileges? */
3123 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
3124 @END
3126 @REQ(duplicate_token)
3127 obj_handle_t handle; /* handle to the token to duplicate */
3128 unsigned int access; /* access rights to the new token */
3129 int primary; /* is the new token to be a primary one? */
3130 int impersonation_level; /* impersonation level of the new token */
3131 VARARG(objattr,object_attributes); /* object attributes */
3132 @REPLY
3133 obj_handle_t new_handle; /* duplicated handle */
3134 @END
3136 @REQ(filter_token)
3137 obj_handle_t handle; /* handle to the token to duplicate */
3138 unsigned int flags; /* flags */
3139 data_size_t privileges_size; /* size of privileges */
3140 VARARG(privileges,LUID_AND_ATTRIBUTES,privileges_size); /* privileges to remove from new token */
3141 VARARG(disable_sids,SID); /* array of groups to remove from new token */
3142 @REPLY
3143 obj_handle_t new_handle; /* filtered handle */
3144 @END
3146 @REQ(access_check)
3147 obj_handle_t handle; /* handle to the token */
3148 unsigned int desired_access; /* desired access to the object */
3149 generic_map_t mapping; /* mapping to specific rights */
3150 VARARG(sd,security_descriptor); /* security descriptor to check */
3151 @REPLY
3152 unsigned int access_granted; /* access rights actually granted */
3153 unsigned int access_status; /* was access granted? */
3154 unsigned int privileges_len; /* length needed to store privileges */
3155 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges used during access check */
3156 @END
3158 @REQ(get_token_sid)
3159 obj_handle_t handle; /* handle to the token */
3160 unsigned int which_sid; /* which SID to retrieve from the token */
3161 @REPLY
3162 data_size_t sid_len; /* length needed to store sid */
3163 VARARG(sid,SID); /* the sid specified by which_sid from the token */
3164 @END
3166 @REQ(get_token_groups)
3167 obj_handle_t handle; /* handle to the token */
3168 @REPLY
3169 data_size_t user_len; /* length needed to store user */
3170 VARARG(user,token_groups); /* groups the token's user belongs to */
3171 @END
3173 @REQ(get_token_default_dacl)
3174 obj_handle_t handle; /* handle to the token */
3175 @REPLY
3176 data_size_t acl_len; /* length needed to store access control list */
3177 VARARG(acl,ACL); /* access control list */
3178 @END
3180 @REQ(set_token_default_dacl)
3181 obj_handle_t handle; /* handle to the token */
3182 VARARG(acl,ACL); /* default dacl to set */
3183 @END
3185 @REQ(set_security_object)
3186 obj_handle_t handle; /* handle to the object */
3187 unsigned int security_info; /* which parts of security descriptor to set */
3188 VARARG(sd,security_descriptor); /* security descriptor to set */
3189 @END
3191 @REQ(get_security_object)
3192 obj_handle_t handle; /* handle to the object */
3193 unsigned int security_info; /* which parts of security descriptor to get */
3194 @REPLY
3195 unsigned int sd_len; /* buffer size needed for sd */
3196 VARARG(sd,security_descriptor); /* retrieved security descriptor */
3197 @END
3200 struct handle_info
3202 process_id_t owner;
3203 obj_handle_t handle;
3204 unsigned int access;
3205 unsigned int attributes;
3206 unsigned int type;
3209 /* Return a list of all opened handles */
3210 @REQ(get_system_handles)
3211 @REPLY
3212 unsigned int count; /* number of handles */
3213 VARARG(data,handle_infos); /* array of handle_infos */
3214 @END
3217 /* Create a mailslot */
3218 @REQ(create_mailslot)
3219 unsigned int access; /* wanted access rights */
3220 timeout_t read_timeout;
3221 unsigned int max_msgsize;
3222 VARARG(objattr,object_attributes); /* object attributes */
3223 @REPLY
3224 obj_handle_t handle; /* handle to the mailslot */
3225 @END
3228 /* Set mailslot information */
3229 @REQ(set_mailslot_info)
3230 obj_handle_t handle; /* handle to the mailslot */
3231 timeout_t read_timeout;
3232 unsigned int flags;
3233 @REPLY
3234 timeout_t read_timeout;
3235 unsigned int max_msgsize;
3236 @END
3237 #define MAILSLOT_SET_READ_TIMEOUT 1
3240 /* Create a directory object */
3241 @REQ(create_directory)
3242 unsigned int access; /* access flags */
3243 VARARG(objattr,object_attributes); /* object attributes */
3244 @REPLY
3245 obj_handle_t handle; /* handle to the directory */
3246 @END
3249 /* Open a directory object */
3250 @REQ(open_directory)
3251 unsigned int access; /* access flags */
3252 unsigned int attributes; /* object attributes */
3253 obj_handle_t rootdir; /* root directory */
3254 VARARG(directory_name,unicode_str); /* Directory name */
3255 @REPLY
3256 obj_handle_t handle; /* handle to the directory */
3257 @END
3260 /* Get a directory entry by index */
3261 @REQ(get_directory_entry)
3262 obj_handle_t handle; /* handle to the directory */
3263 unsigned int index; /* entry index */
3264 @REPLY
3265 data_size_t name_len; /* length of the entry name in bytes */
3266 VARARG(name,unicode_str,name_len); /* entry name */
3267 VARARG(type,unicode_str); /* entry type */
3268 @END
3271 /* Create a symbolic link object */
3272 @REQ(create_symlink)
3273 unsigned int access; /* access flags */
3274 VARARG(objattr,object_attributes); /* object attributes */
3275 VARARG(target_name,unicode_str); /* target name */
3276 @REPLY
3277 obj_handle_t handle; /* handle to the symlink */
3278 @END
3281 /* Open a symbolic link object */
3282 @REQ(open_symlink)
3283 unsigned int access; /* access flags */
3284 unsigned int attributes; /* object attributes */
3285 obj_handle_t rootdir; /* root directory */
3286 VARARG(name,unicode_str); /* symlink name */
3287 @REPLY
3288 obj_handle_t handle; /* handle to the symlink */
3289 @END
3292 /* Query a symbolic link object */
3293 @REQ(query_symlink)
3294 obj_handle_t handle; /* handle to the symlink */
3295 @REPLY
3296 data_size_t total; /* total needed size for name */
3297 VARARG(target_name,unicode_str); /* target name */
3298 @END
3301 /* Query basic object information */
3302 @REQ(get_object_info)
3303 obj_handle_t handle; /* handle to the object */
3304 @REPLY
3305 unsigned int access; /* granted access mask */
3306 unsigned int ref_count; /* object ref count */
3307 unsigned int handle_count; /* object handle count */
3308 data_size_t total; /* total needed size for name */
3309 VARARG(name,unicode_str); /* object name */
3310 @END
3313 /* Query object type name information */
3314 @REQ(get_object_type)
3315 obj_handle_t handle; /* handle to the object */
3316 @REPLY
3317 VARARG(info,object_type_info); /* type information */
3318 @END
3321 /* Query type information for all types */
3322 @REQ(get_object_types)
3323 @REPLY
3324 int count; /* total count of object types */
3325 VARARG(info,object_types_info); /* type information */
3326 @END
3329 /* Allocate a locally-unique identifier */
3330 @REQ(allocate_locally_unique_id)
3331 @REPLY
3332 luid_t luid;
3333 @END
3336 /* Create a device manager */
3337 @REQ(create_device_manager)
3338 unsigned int access; /* wanted access rights */
3339 unsigned int attributes; /* object attributes */
3340 @REPLY
3341 obj_handle_t handle; /* handle to the device */
3342 @END
3345 /* Create a device */
3346 @REQ(create_device)
3347 obj_handle_t rootdir; /* root directory */
3348 client_ptr_t user_ptr; /* opaque ptr for use by client */
3349 obj_handle_t manager; /* device manager */
3350 VARARG(name,unicode_str); /* object name */
3351 @END
3354 /* Delete a device */
3355 @REQ(delete_device)
3356 obj_handle_t manager; /* handle to the device manager */
3357 client_ptr_t device; /* pointer to the device */
3358 @END
3361 /* Retrieve the next pending device irp request */
3362 @REQ(get_next_device_request)
3363 obj_handle_t manager; /* handle to the device manager */
3364 obj_handle_t prev; /* handle to the previous irp */
3365 unsigned int status; /* status of the previous irp */
3366 client_ptr_t user_ptr; /* user pointer of the previous irp */
3367 @REPLY
3368 irp_params_t params; /* irp parameters */
3369 obj_handle_t next; /* handle to the next irp */
3370 thread_id_t client_tid; /* tid of thread calling irp */
3371 client_ptr_t client_thread; /* pointer to thread object of calling irp */
3372 data_size_t in_size; /* total needed input size */
3373 VARARG(next_data,bytes); /* input data of the next irp */
3374 @END
3377 /* Get kernel pointer from server object */
3378 @REQ(get_kernel_object_ptr)
3379 obj_handle_t manager; /* handle to the device manager */
3380 obj_handle_t handle; /* object handle */
3381 @REPLY
3382 client_ptr_t user_ptr; /* kernel object pointer */
3383 @END
3386 /* Associate kernel pointer with server object */
3387 @REQ(set_kernel_object_ptr)
3388 obj_handle_t manager; /* handle to the device manager */
3389 obj_handle_t handle; /* object handle */
3390 client_ptr_t user_ptr; /* kernel object pointer */
3391 @END
3394 /* Grab server object reference from kernel object pointer */
3395 @REQ(grab_kernel_object)
3396 obj_handle_t manager; /* handle to the device manager */
3397 client_ptr_t user_ptr; /* kernel object pointer */
3398 @END
3401 /* Release server object reference from kernel object pointer */
3402 @REQ(release_kernel_object)
3403 obj_handle_t manager; /* handle to the device manager */
3404 client_ptr_t user_ptr; /* kernel object pointer */
3405 @END
3408 /* Get handle from kernel object pointer */
3409 @REQ(get_kernel_object_handle)
3410 obj_handle_t manager; /* handle to the device manager */
3411 client_ptr_t user_ptr; /* kernel object pointer */
3412 unsigned int access; /* wanted access rights */
3413 @REPLY
3414 obj_handle_t handle; /* kernel object handle */
3415 @END
3418 /* Make the current process a system process */
3419 @REQ(make_process_system)
3420 @REPLY
3421 obj_handle_t event; /* event signaled when all user processes have exited */
3422 @END
3425 /* Get detailed fixed-size information about a token */
3426 @REQ(get_token_info)
3427 obj_handle_t handle; /* handle to the object */
3428 @REPLY
3429 luid_t token_id; /* locally-unique identifier of the token */
3430 luid_t modified_id; /* locally-unique identifier of the modified version of the token */
3431 int primary; /* is the token primary or impersonation? */
3432 int impersonation_level; /* level of impersonation */
3433 int elevation; /* elevation type */
3434 int group_count; /* the number of groups the token is a member of */
3435 int privilege_count; /* the number of privileges the token has */
3436 @END
3439 /* Create a token which is an elevation counterpart to this token */
3440 @REQ(create_linked_token)
3441 obj_handle_t handle; /* handle to the token */
3442 @REPLY
3443 obj_handle_t linked; /* handle to the linked token */
3444 @END
3447 /* Create I/O completion port */
3448 @REQ(create_completion)
3449 unsigned int access; /* desired access to a port */
3450 unsigned int concurrent; /* max number of concurrent active threads */
3451 VARARG(objattr,object_attributes); /* object attributes */
3452 @REPLY
3453 obj_handle_t handle; /* port handle */
3454 @END
3457 /* Open I/O completion port */
3458 @REQ(open_completion)
3459 unsigned int access; /* desired access to a port */
3460 unsigned int attributes; /* object attributes */
3461 obj_handle_t rootdir; /* root directory */
3462 VARARG(filename,unicode_str); /* port name */
3463 @REPLY
3464 obj_handle_t handle; /* port handle */
3465 @END
3468 /* add completion to completion port */
3469 @REQ(add_completion)
3470 obj_handle_t handle; /* port handle */
3471 apc_param_t ckey; /* completion key */
3472 apc_param_t cvalue; /* completion value */
3473 apc_param_t information; /* IO_STATUS_BLOCK Information */
3474 unsigned int status; /* completion result */
3475 @END
3478 /* get completion from completion port queue */
3479 @REQ(remove_completion)
3480 obj_handle_t handle; /* port handle */
3481 @REPLY
3482 apc_param_t ckey; /* completion key */
3483 apc_param_t cvalue; /* completion value */
3484 apc_param_t information; /* IO_STATUS_BLOCK Information */
3485 unsigned int status; /* completion result */
3486 @END
3489 /* get completion queue depth */
3490 @REQ(query_completion)
3491 obj_handle_t handle; /* port handle */
3492 @REPLY
3493 unsigned int depth; /* completion queue depth */
3494 @END
3497 /* associate object with completion port */
3498 @REQ(set_completion_info)
3499 obj_handle_t handle; /* object handle */
3500 apc_param_t ckey; /* completion key */
3501 obj_handle_t chandle; /* port handle */
3502 @END
3505 /* check for associated completion and push msg */
3506 @REQ(add_fd_completion)
3507 obj_handle_t handle; /* async' object */
3508 apc_param_t cvalue; /* completion value */
3509 apc_param_t information; /* IO_STATUS_BLOCK Information */
3510 unsigned int status; /* completion status */
3511 int async; /* completion is an async result */
3512 @END
3515 /* set fd completion information */
3516 @REQ(set_fd_completion_mode)
3517 obj_handle_t handle; /* handle to a file or directory */
3518 unsigned int flags; /* completion notification flags */
3519 @END
3522 /* set fd disposition information */
3523 @REQ(set_fd_disp_info)
3524 obj_handle_t handle; /* handle to a file or directory */
3525 int unlink; /* whether to unlink file on close */
3526 @END
3529 /* set fd name information */
3530 @REQ(set_fd_name_info)
3531 obj_handle_t handle; /* handle to a file or directory */
3532 obj_handle_t rootdir; /* root directory */
3533 data_size_t namelen; /* length of NT name in bytes */
3534 int link; /* link instead of renaming */
3535 int replace; /* replace an existing file? */
3536 VARARG(name,unicode_str,namelen); /* NT name */
3537 VARARG(filename,string); /* new file name */
3538 @END
3541 /* Retrieve layered info for a window */
3542 @REQ(get_window_layered_info)
3543 user_handle_t handle; /* handle to the window */
3544 @REPLY
3545 unsigned int color_key; /* color key */
3546 unsigned int alpha; /* alpha (0..255) */
3547 unsigned int flags; /* LWA_* flags */
3548 @END
3551 /* Set layered info for a window */
3552 @REQ(set_window_layered_info)
3553 user_handle_t handle; /* handle to the window */
3554 unsigned int color_key; /* color key */
3555 unsigned int alpha; /* alpha (0..255) */
3556 unsigned int flags; /* LWA_* flags */
3557 @END
3560 /* Allocate an arbitrary user handle */
3561 @REQ(alloc_user_handle)
3562 @REPLY
3563 user_handle_t handle; /* allocated handle */
3564 @END
3567 /* Free an arbitrary user handle */
3568 @REQ(free_user_handle)
3569 user_handle_t handle; /* handle to free*/
3570 @END
3573 /* Set/get the current cursor */
3574 @REQ(set_cursor)
3575 unsigned int flags; /* flags for fields to set (see below) */
3576 user_handle_t handle; /* handle to the cursor */
3577 int show_count; /* show count increment/decrement */
3578 int x; /* cursor position */
3579 int y;
3580 rectangle_t clip; /* cursor clip rectangle */
3581 unsigned int clip_msg; /* message to post on cursor clip changes */
3582 @REPLY
3583 user_handle_t prev_handle; /* previous handle */
3584 int prev_count; /* previous show count */
3585 int prev_x; /* previous position */
3586 int prev_y;
3587 int new_x; /* new position */
3588 int new_y;
3589 rectangle_t new_clip; /* new clip rectangle */
3590 unsigned int last_change; /* time of last position change */
3591 @END
3592 #define SET_CURSOR_HANDLE 0x01
3593 #define SET_CURSOR_COUNT 0x02
3594 #define SET_CURSOR_POS 0x04
3595 #define SET_CURSOR_CLIP 0x08
3596 #define SET_CURSOR_NOCLIP 0x10
3598 /* Get the history of the 64 last cursor positions */
3599 @REQ(get_cursor_history)
3600 @REPLY
3601 VARARG(history,cursor_positions);
3602 @END
3605 /* Batch read rawinput message data */
3606 @REQ(get_rawinput_buffer)
3607 data_size_t rawinput_size; /* size of RAWINPUT structure */
3608 data_size_t buffer_size; /* size of output buffer */
3609 @REPLY
3610 data_size_t next_size; /* minimum size to get next message data */
3611 unsigned int count;
3612 VARARG(data,bytes);
3613 @END
3615 /* Modify the list of registered rawinput devices */
3616 @REQ(update_rawinput_devices)
3617 VARARG(devices,rawinput_devices);
3618 @END
3620 /* Retrieve the list of registered rawinput devices */
3621 @REQ(get_rawinput_devices)
3622 @REPLY
3623 unsigned int device_count;
3624 VARARG(devices,rawinput_devices);
3625 @END
3627 /* Create a new job object */
3628 @REQ(create_job)
3629 unsigned int access; /* wanted access rights */
3630 VARARG(objattr,object_attributes); /* object attributes */
3631 @REPLY
3632 obj_handle_t handle; /* handle to the job */
3633 @END
3636 /* Open a job object */
3637 @REQ(open_job)
3638 unsigned int access; /* wanted access rights */
3639 unsigned int attributes; /* object attributes */
3640 obj_handle_t rootdir; /* root directory */
3641 VARARG(name,unicode_str); /* object name */
3642 @REPLY
3643 obj_handle_t handle; /* handle to the job */
3644 @END
3647 /* Assign a job object to a process */
3648 @REQ(assign_job)
3649 obj_handle_t job; /* handle to the job */
3650 obj_handle_t process; /* handle to the process */
3651 @END
3654 /* Check if a process is associated with a job */
3655 @REQ(process_in_job)
3656 obj_handle_t job; /* handle to the job */
3657 obj_handle_t process; /* handle to the process */
3658 @END
3661 /* Set limit flags on a job */
3662 @REQ(set_job_limits)
3663 obj_handle_t handle; /* handle to the job */
3664 unsigned int limit_flags; /* new limit flags */
3665 @END
3668 /* Set new completion port for a job */
3669 @REQ(set_job_completion_port)
3670 obj_handle_t job; /* handle to the job */
3671 obj_handle_t port; /* handle to the completion port */
3672 client_ptr_t key; /* key to send with completion messages */
3673 @END
3676 /* Retrieve information about a job */
3677 @REQ(get_job_info)
3678 obj_handle_t handle; /* handle to the job */
3679 @REPLY
3680 int total_processes; /* total count of processes */
3681 int active_processes; /* count of running processes */
3682 @END
3685 /* Terminate all processes associated with the job */
3686 @REQ(terminate_job)
3687 obj_handle_t handle; /* handle to the job */
3688 int status; /* process exit code */
3689 @END
3692 /* Suspend a process */
3693 @REQ(suspend_process)
3694 obj_handle_t handle; /* process handle */
3695 @END
3698 /* Resume a process */
3699 @REQ(resume_process)
3700 obj_handle_t handle; /* process handle */
3701 @END
3704 /* Iterate thread list for process */
3705 @REQ(get_next_thread)
3706 obj_handle_t process; /* process handle */
3707 obj_handle_t last; /* thread handle to start with */
3708 unsigned int access; /* desired access for returned handle */
3709 unsigned int attributes; /* returned handle attributes */
3710 unsigned int flags; /* controls iteration direction */
3711 @REPLY
3712 obj_handle_t handle; /* next thread handle */
3713 @END