mshtml: Use wide-char string literals.
[wine.git] / server / protocol.def
bloba3708f2070520b655a2d46bcc097a5a38e43dfdd
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; /* EXCEPTION_DEBUG_EVENT */
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; /* CREATE_THREAD_DEBUG_EVENT */
92 obj_handle_t handle; /* handle to the new thread */
93 client_ptr_t teb; /* thread teb (in debugged process address space) */
94 client_ptr_t start; /* thread startup routine */
95 } create_thread;
96 struct
98 int code; /* CREATE_PROCESS_DEBUG_EVENT */
99 obj_handle_t file; /* handle to the process exe file */
100 obj_handle_t process; /* handle to the new process */
101 obj_handle_t thread; /* handle to the new thread */
102 mod_handle_t base; /* base of executable image */
103 int dbg_offset; /* offset of debug info in file */
104 int dbg_size; /* size of debug info */
105 client_ptr_t teb; /* thread teb (in debugged process address space) */
106 client_ptr_t start; /* thread startup routine */
107 client_ptr_t name; /* image name (optional) */
108 int unicode; /* is it Unicode? */
109 } create_process;
110 struct
112 int code; /* EXIT_THREAD_DEBUG_EVENT/EXIT_PROCESS_DEBUG_EVENT */
113 int exit_code; /* thread or process exit code */
114 } exit;
115 struct
117 int code; /* LOAD_DLL_DEBUG_EVENT */
118 obj_handle_t handle; /* file handle for the dll */
119 mod_handle_t base; /* base address of the dll */
120 int dbg_offset; /* offset of debug info in file */
121 int dbg_size; /* size of debug info */
122 client_ptr_t name; /* image name (optional) */
123 int unicode; /* is it Unicode? */
124 } load_dll;
125 struct
127 int code; /* UNLOAD_DLL_DEBUG_EVENT */
128 int __pad;
129 mod_handle_t base; /* base address of the dll */
130 } unload_dll;
131 } debug_event_t;
133 /* supported CPU types */
134 enum cpu_type
136 CPU_x86, CPU_x86_64, CPU_POWERPC, CPU_ARM, CPU_ARM64
138 typedef int client_cpu_t;
140 /* context data */
141 typedef struct
143 client_cpu_t cpu; /* cpu type */
144 unsigned int flags; /* SERVER_CTX_* flags */
145 union
147 struct { unsigned int eip, ebp, esp, eflags, cs, ss; } i386_regs;
148 struct { unsigned __int64 rip, rbp, rsp;
149 unsigned int cs, ss, flags, __pad; } x86_64_regs;
150 struct { unsigned int iar, msr, ctr, lr, dar, dsisr, trap, __pad; } powerpc_regs;
151 struct { unsigned int sp, lr, pc, cpsr; } arm_regs;
152 struct { unsigned __int64 sp, pc, pstate; } arm64_regs;
153 } ctl; /* selected by SERVER_CTX_CONTROL */
154 union
156 struct { unsigned int eax, ebx, ecx, edx, esi, edi; } i386_regs;
157 struct { unsigned __int64 rax,rbx, rcx, rdx, rsi, rdi,
158 r8, r9, r10, r11, r12, r13, r14, r15; } x86_64_regs;
159 struct { unsigned int gpr[32], cr, xer; } powerpc_regs;
160 struct { unsigned int r[13]; } arm_regs;
161 struct { unsigned __int64 x[31]; } arm64_regs;
162 } integer; /* selected by SERVER_CTX_INTEGER */
163 union
165 struct { unsigned int ds, es, fs, gs; } i386_regs;
166 struct { unsigned int ds, es, fs, gs; } x86_64_regs;
167 } seg; /* selected by SERVER_CTX_SEGMENTS */
168 union
170 struct { unsigned int ctrl, status, tag, err_off, err_sel, data_off, data_sel, cr0npx;
171 unsigned char regs[80]; } i386_regs;
172 struct { struct { unsigned __int64 low, high; } fpregs[32]; } x86_64_regs;
173 struct { double fpr[32], fpscr; } powerpc_regs;
174 struct { unsigned __int64 d[32]; unsigned int fpscr; } arm_regs;
175 struct { struct { unsigned __int64 low, high; } q[32]; unsigned int fpcr, fpsr; } arm64_regs;
176 } fp; /* selected by SERVER_CTX_FLOATING_POINT */
177 union
179 struct { unsigned int dr0, dr1, dr2, dr3, dr6, dr7; } i386_regs;
180 struct { unsigned __int64 dr0, dr1, dr2, dr3, dr6, dr7; } x86_64_regs;
181 struct { unsigned int dr[8]; } powerpc_regs;
182 struct { unsigned int bvr[8], bcr[8], wvr[1], wcr[1]; } arm_regs;
183 struct { unsigned __int64 bvr[8], wvr[2]; unsigned int bcr[8], wcr[2]; } arm64_regs;
184 } debug; /* selected by SERVER_CTX_DEBUG_REGISTERS */
185 union
187 unsigned char i386_regs[512];
188 } ext; /* selected by SERVER_CTX_EXTENDED_REGISTERS */
189 union
191 struct { struct { unsigned __int64 low, high; } ymm_high[16]; } ymm_high_regs;
192 } ymm; /* selected by SERVER_CTX_YMM_REGISTERS */
193 } context_t;
195 #define SERVER_CTX_CONTROL 0x01
196 #define SERVER_CTX_INTEGER 0x02
197 #define SERVER_CTX_SEGMENTS 0x04
198 #define SERVER_CTX_FLOATING_POINT 0x08
199 #define SERVER_CTX_DEBUG_REGISTERS 0x10
200 #define SERVER_CTX_EXTENDED_REGISTERS 0x20
201 #define SERVER_CTX_YMM_REGISTERS 0x40
203 /* structure used in sending an fd from client to server */
204 struct send_fd
206 thread_id_t tid; /* thread id */
207 int fd; /* file descriptor on client-side */
210 /* structure sent by the server on the wait fifo */
211 struct wake_up_reply
213 client_ptr_t cookie; /* magic cookie that was passed in select_request */
214 int signaled; /* wait result */
215 int __pad;
218 /* NT-style timeout, in 100ns units, negative means relative timeout */
219 typedef __int64 timeout_t;
220 #define TIMEOUT_INFINITE (((timeout_t)0x7fffffff) << 32 | 0xffffffff)
222 /* absolute timeout, negative means that monotonic clock is used */
223 typedef __int64 abstime_t;
225 /* structure for process startup info */
226 typedef struct
228 unsigned int debug_flags;
229 unsigned int console_flags;
230 obj_handle_t console;
231 obj_handle_t hstdin;
232 obj_handle_t hstdout;
233 obj_handle_t hstderr;
234 unsigned int x;
235 unsigned int y;
236 unsigned int xsize;
237 unsigned int ysize;
238 unsigned int xchars;
239 unsigned int ychars;
240 unsigned int attribute;
241 unsigned int flags;
242 unsigned int show;
243 data_size_t curdir_len;
244 data_size_t dllpath_len;
245 data_size_t imagepath_len;
246 data_size_t cmdline_len;
247 data_size_t title_len;
248 data_size_t desktop_len;
249 data_size_t shellinfo_len;
250 data_size_t runtime_len;
251 /* VARARG(curdir,unicode_str,curdir_len); */
252 /* VARARG(dllpath,unicode_str,dllpath_len); */
253 /* VARARG(imagepath,unicode_str,imagepath_len); */
254 /* VARARG(cmdline,unicode_str,cmdline_len); */
255 /* VARARG(title,unicode_str,title_len); */
256 /* VARARG(desktop,unicode_str,desktop_len); */
257 /* VARARG(shellinfo,unicode_str,shellinfo_len); */
258 /* VARARG(runtime,unicode_str,runtime_len); */
259 } startup_info_t;
261 /* structure returned in the list of window properties */
262 typedef struct
264 atom_t atom; /* property atom */
265 int string; /* was atom a string originally? */
266 lparam_t data; /* data stored in property */
267 } property_data_t;
269 /* structure to specify window rectangles */
270 typedef struct
272 int left;
273 int top;
274 int right;
275 int bottom;
276 } rectangle_t;
278 /* structure for parameters of async I/O calls */
279 typedef struct
281 obj_handle_t handle; /* object to perform I/O on */
282 obj_handle_t event; /* event to signal when done */
283 client_ptr_t iosb; /* I/O status block in client addr space */
284 client_ptr_t user; /* opaque user data containing callback pointer and async-specific data */
285 client_ptr_t apc; /* user APC to call */
286 apc_param_t apc_context; /* user APC context or completion value */
287 } async_data_t;
289 /* structures for extra message data */
291 struct hw_msg_source
293 unsigned int device; /* source device (IMDT_* values) */
294 unsigned int origin; /* source origin (IMO_* values) */
297 struct hardware_msg_data
299 lparam_t info; /* extra info */
300 unsigned int hw_id; /* unique id */
301 unsigned int flags; /* hook flags */
302 struct hw_msg_source source; /* message source */
303 union
305 int type;
306 struct
308 int type; /* RIM_TYPEKEYBOARD */
309 unsigned int message; /* message generated by this rawinput event */
310 unsigned short vkey; /* virtual key code */
311 unsigned short scan; /* scan code */
312 } kbd;
313 struct
315 int type; /* RIM_TYPEMOUSE */
316 int x; /* x coordinate */
317 int y; /* y coordinate */
318 unsigned int data; /* mouse data */
319 } mouse;
320 } rawinput;
323 struct callback_msg_data
325 client_ptr_t callback; /* callback function */
326 lparam_t data; /* user data for callback */
327 lparam_t result; /* message result */
330 struct winevent_msg_data
332 user_handle_t hook; /* hook handle */
333 thread_id_t tid; /* thread id */
334 client_ptr_t hook_proc; /* hook proc address */
335 /* followed by module name if any */
338 typedef union
340 int type;
341 struct
343 int type; /* INPUT_KEYBOARD */
344 unsigned short vkey; /* virtual key code */
345 unsigned short scan; /* scan code */
346 unsigned int flags; /* event flags */
347 unsigned int time; /* event time */
348 lparam_t info; /* extra info */
349 } kbd;
350 struct
352 int type; /* INPUT_MOUSE */
353 int x; /* coordinates */
354 int y;
355 unsigned int data; /* mouse data */
356 unsigned int flags; /* event flags */
357 unsigned int time; /* event time */
358 lparam_t info; /* extra info */
359 } mouse;
360 struct
362 int type; /* INPUT_HARDWARE */
363 unsigned int msg; /* message code */
364 lparam_t lparam; /* message param */
365 } hw;
366 } hw_input_t;
368 typedef union
370 unsigned char bytes[1]; /* raw data for sent messages */
371 struct hardware_msg_data hardware;
372 struct callback_msg_data callback;
373 struct winevent_msg_data winevent;
374 } message_data_t;
376 /* structure returned in filesystem events */
377 struct filesystem_event
379 int action;
380 data_size_t len;
381 char name[1];
384 typedef struct
386 unsigned int low_part;
387 int high_part;
388 } luid_t;
390 #define MAX_ACL_LEN 65535
392 struct security_descriptor
394 unsigned int control; /* SE_ flags */
395 data_size_t owner_len;
396 data_size_t group_len;
397 data_size_t sacl_len;
398 data_size_t dacl_len;
399 /* VARARG(owner,SID); */
400 /* VARARG(group,SID); */
401 /* VARARG(sacl,ACL); */
402 /* VARARG(dacl,ACL); */
405 struct object_attributes
407 obj_handle_t rootdir; /* root directory */
408 unsigned int attributes; /* object attributes */
409 data_size_t sd_len; /* length of security_descriptor data. may be 0 */
410 data_size_t name_len; /* length of the name string. may be 0 */
411 /* VARARG(sd,security_descriptor); */
412 /* VARARG(name,unicode_str); */
415 struct token_groups
417 unsigned int count;
418 /* unsigned int attributes[count]; */
419 /* VARARG(sids,SID); */
422 enum select_op
424 SELECT_NONE,
425 SELECT_WAIT,
426 SELECT_WAIT_ALL,
427 SELECT_SIGNAL_AND_WAIT,
428 SELECT_KEYED_EVENT_WAIT,
429 SELECT_KEYED_EVENT_RELEASE
432 typedef union
434 enum select_op op;
435 struct
437 enum select_op op; /* SELECT_WAIT or SELECT_WAIT_ALL */
438 obj_handle_t handles[MAXIMUM_WAIT_OBJECTS];
439 } wait;
440 struct
442 enum select_op op; /* SELECT_SIGNAL_AND_WAIT */
443 obj_handle_t wait;
444 obj_handle_t signal; /* must be last in the structure so we can remove it on retries */
445 } signal_and_wait;
446 struct
448 enum select_op op; /* SELECT_KEYED_EVENT_WAIT or SELECT_KEYED_EVENT_RELEASE */
449 obj_handle_t handle;
450 client_ptr_t key;
451 } keyed_event;
452 } select_op_t;
454 enum apc_type
456 APC_NONE,
457 APC_USER,
458 APC_TIMER,
459 APC_ASYNC_IO,
460 APC_VIRTUAL_ALLOC,
461 APC_VIRTUAL_FREE,
462 APC_VIRTUAL_QUERY,
463 APC_VIRTUAL_PROTECT,
464 APC_VIRTUAL_FLUSH,
465 APC_VIRTUAL_LOCK,
466 APC_VIRTUAL_UNLOCK,
467 APC_MAP_VIEW,
468 APC_UNMAP_VIEW,
469 APC_CREATE_THREAD,
470 APC_BREAK_PROCESS
473 typedef union
475 enum apc_type type;
476 struct
478 enum apc_type type; /* APC_USER */
479 int __pad;
480 client_ptr_t func; /* void (__stdcall *func)(ULONG_PTR,ULONG_PTR,ULONG_PTR); */
481 apc_param_t args[3]; /* arguments for user function */
482 } user;
483 struct
485 enum apc_type type; /* APC_TIMER */
486 int __pad;
487 client_ptr_t func; /* void (__stdcall *func)(void*, unsigned int, unsigned int); */
488 abstime_t time; /* time of expiration */
489 client_ptr_t arg; /* user argument */
490 } timer;
491 } user_apc_t;
493 typedef union
495 enum apc_type type;
496 user_apc_t user;
497 struct
499 enum apc_type type; /* APC_ASYNC_IO */
500 unsigned int status; /* I/O status */
501 client_ptr_t user; /* user pointer */
502 client_ptr_t sb; /* status block */
503 } async_io;
504 struct
506 enum apc_type type; /* APC_VIRTUAL_ALLOC */
507 unsigned int op_type; /* type of operation */
508 client_ptr_t addr; /* requested address */
509 mem_size_t size; /* allocation size */
510 mem_size_t zero_bits; /* number of zero high bits */
511 unsigned int prot; /* memory protection flags */
512 } virtual_alloc;
513 struct
515 enum apc_type type; /* APC_VIRTUAL_FREE */
516 unsigned int op_type; /* type of operation */
517 client_ptr_t addr; /* requested address */
518 mem_size_t size; /* allocation size */
519 } virtual_free;
520 struct
522 enum apc_type type; /* APC_VIRTUAL_QUERY */
523 int __pad;
524 client_ptr_t addr; /* requested address */
525 } virtual_query;
526 struct
528 enum apc_type type; /* APC_VIRTUAL_PROTECT */
529 unsigned int prot; /* new protection flags */
530 client_ptr_t addr; /* requested address */
531 mem_size_t size; /* requested size */
532 } virtual_protect;
533 struct
535 enum apc_type type; /* APC_VIRTUAL_FLUSH */
536 int __pad;
537 client_ptr_t addr; /* requested address */
538 mem_size_t size; /* requested size */
539 } virtual_flush;
540 struct
542 enum apc_type type; /* APC_VIRTUAL_LOCK */
543 int __pad;
544 client_ptr_t addr; /* requested address */
545 mem_size_t size; /* requested size */
546 } virtual_lock;
547 struct
549 enum apc_type type; /* APC_VIRTUAL_UNLOCK */
550 int __pad;
551 client_ptr_t addr; /* requested address */
552 mem_size_t size; /* requested size */
553 } virtual_unlock;
554 struct
556 enum apc_type type; /* APC_MAP_VIEW */
557 obj_handle_t handle; /* mapping handle */
558 client_ptr_t addr; /* requested address */
559 mem_size_t size; /* allocation size */
560 file_pos_t offset; /* file offset */
561 mem_size_t zero_bits; /* number of zero high bits */
562 unsigned int alloc_type; /* allocation type */
563 unsigned int prot; /* memory protection flags */
564 } map_view;
565 struct
567 enum apc_type type; /* APC_UNMAP_VIEW */
568 int __pad;
569 client_ptr_t addr; /* view address */
570 } unmap_view;
571 struct
573 enum apc_type type; /* APC_CREATE_THREAD */
574 unsigned int flags; /* creation flags */
575 client_ptr_t func; /* void (__stdcall *func)(void*); start function */
576 client_ptr_t arg; /* argument for start function */
577 mem_size_t reserve; /* reserve size for thread stack */
578 mem_size_t commit; /* commit size for thread stack */
579 } create_thread;
580 } apc_call_t;
582 typedef union
584 enum apc_type type;
585 struct
587 enum apc_type type; /* APC_ASYNC_IO */
588 unsigned int status; /* new status of async operation */
589 unsigned int total; /* bytes transferred */
590 } async_io;
591 struct
593 enum apc_type type; /* APC_VIRTUAL_ALLOC */
594 unsigned int status; /* status returned by call */
595 client_ptr_t addr; /* resulting address */
596 mem_size_t size; /* resulting size */
597 } virtual_alloc;
598 struct
600 enum apc_type type; /* APC_VIRTUAL_FREE */
601 unsigned int status; /* status returned by call */
602 client_ptr_t addr; /* resulting address */
603 mem_size_t size; /* resulting size */
604 } virtual_free;
605 struct
607 enum apc_type type; /* APC_VIRTUAL_QUERY */
608 unsigned int status; /* status returned by call */
609 client_ptr_t base; /* resulting base address */
610 client_ptr_t alloc_base;/* resulting allocation base */
611 mem_size_t size; /* resulting region size */
612 unsigned short state; /* resulting region state */
613 unsigned short prot; /* resulting region protection */
614 unsigned short alloc_prot;/* resulting allocation protection */
615 unsigned short alloc_type;/* resulting region allocation type */
616 } virtual_query;
617 struct
619 enum apc_type type; /* APC_VIRTUAL_PROTECT */
620 unsigned int status; /* status returned by call */
621 client_ptr_t addr; /* resulting address */
622 mem_size_t size; /* resulting size */
623 unsigned int prot; /* old protection flags */
624 } virtual_protect;
625 struct
627 enum apc_type type; /* APC_VIRTUAL_FLUSH */
628 unsigned int status; /* status returned by call */
629 client_ptr_t addr; /* resulting address */
630 mem_size_t size; /* resulting size */
631 } virtual_flush;
632 struct
634 enum apc_type type; /* APC_VIRTUAL_LOCK */
635 unsigned int status; /* status returned by call */
636 client_ptr_t addr; /* resulting address */
637 mem_size_t size; /* resulting size */
638 } virtual_lock;
639 struct
641 enum apc_type type; /* APC_VIRTUAL_UNLOCK */
642 unsigned int status; /* status returned by call */
643 client_ptr_t addr; /* resulting address */
644 mem_size_t size; /* resulting size */
645 } virtual_unlock;
646 struct
648 enum apc_type type; /* APC_MAP_VIEW */
649 unsigned int status; /* status returned by call */
650 client_ptr_t addr; /* resulting address */
651 mem_size_t size; /* resulting size */
652 } map_view;
653 struct
655 enum apc_type type; /* APC_MAP_VIEW */
656 unsigned int status; /* status returned by call */
657 } unmap_view;
658 struct
660 enum apc_type type; /* APC_CREATE_THREAD */
661 unsigned int status; /* status returned by call */
662 process_id_t pid; /* process id */
663 thread_id_t tid; /* thread id */
664 client_ptr_t teb; /* thread teb (in process address space) */
665 obj_handle_t handle; /* handle to new thread */
666 } create_thread;
667 struct
669 enum apc_type type; /* APC_BREAK_PROCESS */
670 unsigned int status; /* status returned by call */
671 } break_process;
672 } apc_result_t;
674 enum irp_type
676 IRP_CALL_NONE,
677 IRP_CALL_CREATE,
678 IRP_CALL_CLOSE,
679 IRP_CALL_READ,
680 IRP_CALL_WRITE,
681 IRP_CALL_FLUSH,
682 IRP_CALL_IOCTL,
683 IRP_CALL_FREE,
684 IRP_CALL_CANCEL
687 typedef union
689 enum irp_type type; /* irp call type */
690 struct
692 enum irp_type type; /* IRP_CALL_CREATE */
693 unsigned int access; /* access rights */
694 unsigned int sharing; /* sharing flags */
695 unsigned int options; /* file options */
696 client_ptr_t device; /* opaque ptr for the device */
697 obj_handle_t file; /* file handle */
698 } create;
699 struct
701 enum irp_type type; /* IRP_CALL_CLOSE */
702 int __pad;
703 client_ptr_t file; /* opaque ptr for the file object */
704 } close;
705 struct
707 enum irp_type type; /* IRP_CALL_READ */
708 unsigned int key; /* driver key */
709 data_size_t out_size; /* needed output size */
710 int __pad;
711 client_ptr_t file; /* opaque ptr for the file object */
712 file_pos_t pos; /* file position */
713 } read;
714 struct
716 enum irp_type type; /* IRP_CALL_WRITE */
717 unsigned int key; /* driver key */
718 client_ptr_t file; /* opaque ptr for the file object */
719 file_pos_t pos; /* file position */
720 } write;
721 struct
723 enum irp_type type; /* IRP_CALL_FLUSH */
724 int __pad;
725 client_ptr_t file; /* opaque ptr for the file object */
726 } flush;
727 struct
729 enum irp_type type; /* IRP_CALL_IOCTL */
730 ioctl_code_t code; /* ioctl code */
731 data_size_t out_size; /* needed output size */
732 int __pad;
733 client_ptr_t file; /* opaque ptr for the file object */
734 } ioctl;
735 struct
737 enum irp_type type; /* IRP_CALL_FREE */
738 int __pad;
739 client_ptr_t obj; /* opaque ptr for the freed object */
740 } free;
741 struct
743 enum irp_type type; /* IRP_CALL_CANCEL */
744 int __pad;
745 client_ptr_t irp; /* opaque ptr for canceled irp */
746 } cancel;
747 } irp_params_t;
749 /* information about a PE image mapping, roughly equivalent to SECTION_IMAGE_INFORMATION */
750 typedef struct
752 client_ptr_t base;
753 client_ptr_t entry_point;
754 mem_size_t map_size;
755 mem_size_t stack_size;
756 mem_size_t stack_commit;
757 unsigned int zerobits;
758 unsigned int subsystem;
759 unsigned short subsystem_low;
760 unsigned short subsystem_high;
761 unsigned int gp;
762 unsigned short image_charact;
763 unsigned short dll_charact;
764 unsigned short machine;
765 unsigned char contains_code;
766 unsigned char image_flags;
767 unsigned int loader_flags;
768 unsigned int header_size;
769 unsigned int file_size;
770 unsigned int checksum;
771 client_cpu_t cpu;
772 int __pad;
773 } pe_image_info_t;
774 #define IMAGE_FLAGS_ComPlusNativeReady 0x01
775 #define IMAGE_FLAGS_ComPlusILOnly 0x02
776 #define IMAGE_FLAGS_ImageDynamicallyRelocated 0x04
777 #define IMAGE_FLAGS_ImageMappedFlat 0x08
778 #define IMAGE_FLAGS_BaseBelow4gb 0x10
779 #define IMAGE_FLAGS_WineBuiltin 0x40
780 #define IMAGE_FLAGS_WineFakeDll 0x80
782 struct rawinput_device
784 unsigned short usage_page;
785 unsigned short usage;
786 unsigned int flags;
787 user_handle_t target;
790 typedef struct
792 int x;
793 int y;
794 unsigned int time;
795 int __pad;
796 lparam_t info;
797 } cursor_pos_t;
799 /****************************************************************/
800 /* Request declarations */
802 /* Create a new process from the context of the parent */
803 @REQ(new_process)
804 obj_handle_t token; /* process token */
805 obj_handle_t parent_process; /* parent process */
806 int inherit_all; /* inherit all handles from parent */
807 unsigned int create_flags; /* creation flags */
808 int socket_fd; /* file descriptor for process socket */
809 obj_handle_t exe_file; /* file handle for main exe */
810 unsigned int access; /* access rights for process object */
811 client_cpu_t cpu; /* CPU that the new process will use */
812 data_size_t info_size; /* size of startup info */
813 data_size_t handles_size; /* length of explicit handles list */
814 VARARG(objattr,object_attributes); /* object attributes */
815 VARARG(handles,uints,handles_size); /* handles list */
816 VARARG(info,startup_info,info_size); /* startup information */
817 VARARG(env,unicode_str); /* environment for new process */
818 @REPLY
819 obj_handle_t info; /* new process info handle */
820 process_id_t pid; /* process id */
821 obj_handle_t handle; /* process handle (in the current process) */
822 @END
825 /* Execute a process, replacing the current one */
826 @REQ(exec_process)
827 int socket_fd; /* file descriptor for process socket */
828 client_cpu_t cpu; /* CPU that the new process will use */
829 @END
832 /* Retrieve information about a newly started process */
833 @REQ(get_new_process_info)
834 obj_handle_t info; /* info handle returned from new_process_request */
835 @REPLY
836 int success; /* did the process start successfully? */
837 int exit_code; /* process exit code if failed */
838 @END
841 /* Create a new thread */
842 @REQ(new_thread)
843 obj_handle_t process; /* process in which to create thread */
844 unsigned int access; /* wanted access rights */
845 int suspend; /* new thread should be suspended on creation */
846 int request_fd; /* fd for request pipe */
847 VARARG(objattr,object_attributes); /* object attributes */
848 @REPLY
849 thread_id_t tid; /* thread id */
850 obj_handle_t handle; /* thread handle (in the current process) */
851 @END
854 /* Retrieve the new process startup info */
855 @REQ(get_startup_info)
856 @REPLY
857 data_size_t info_size; /* size of startup info */
858 VARARG(info,startup_info,info_size); /* startup information */
859 VARARG(env,unicode_str); /* environment */
860 @END
863 /* Signal the end of the process initialization */
864 @REQ(init_process_done)
865 int gui; /* is it a GUI process? */
866 mod_handle_t module; /* main module base address */
867 client_ptr_t ldt_copy; /* address of LDT copy (in thread address space) */
868 client_ptr_t entry; /* process entry point */
869 @REPLY
870 int suspend; /* is process suspended? */
871 @END
874 /* Initialize a thread; called from the child after fork()/clone() */
875 @REQ(init_thread)
876 int unix_pid; /* Unix pid of new thread */
877 int unix_tid; /* Unix tid of new thread */
878 int debug_level; /* new debug level */
879 client_ptr_t teb; /* TEB of new thread (in thread address space) */
880 client_ptr_t entry; /* entry point or PEB if initial thread (in thread address space) */
881 int reply_fd; /* fd for reply pipe */
882 int wait_fd; /* fd for blocking calls pipe */
883 client_cpu_t cpu; /* CPU that this thread is running on */
884 @REPLY
885 process_id_t pid; /* process id of the new thread's process */
886 thread_id_t tid; /* thread id of the new thread */
887 timeout_t server_start; /* server start time */
888 data_size_t info_size; /* total size of startup info */
889 int version; /* protocol version */
890 unsigned int all_cpus; /* bitset of supported CPUs */
891 int suspend; /* is thread suspended? */
892 @END
895 /* Terminate a process */
896 @REQ(terminate_process)
897 obj_handle_t handle; /* process handle to terminate */
898 int exit_code; /* process exit code */
899 @REPLY
900 int self; /* suicide? */
901 @END
904 /* Terminate a thread */
905 @REQ(terminate_thread)
906 obj_handle_t handle; /* thread handle to terminate */
907 int exit_code; /* thread exit code */
908 @REPLY
909 int self; /* suicide? */
910 @END
913 /* Retrieve information about a process */
914 @REQ(get_process_info)
915 obj_handle_t handle; /* process handle */
916 @REPLY
917 process_id_t pid; /* server process id */
918 process_id_t ppid; /* server process id of parent */
919 affinity_t affinity; /* process affinity mask */
920 client_ptr_t peb; /* PEB address in process address space */
921 timeout_t start_time; /* process start time */
922 timeout_t end_time; /* process end time */
923 int exit_code; /* process exit code */
924 int priority; /* priority class */
925 client_cpu_t cpu; /* CPU that this process is running on */
926 short int debugger_present; /* process is being debugged */
927 short int debug_children; /* inherit debugger to child processes */
928 VARARG(image,pe_image_info); /* image info for main exe */
929 @END
932 /* Retrieve information about a process memory usage */
933 @REQ(get_process_vm_counters)
934 obj_handle_t handle; /* process handle */
935 @REPLY
936 mem_size_t peak_virtual_size; /* peak virtual memory in bytes */
937 mem_size_t virtual_size; /* virtual memory in bytes */
938 mem_size_t peak_working_set_size; /* peak real memory in bytes */
939 mem_size_t working_set_size; /* real memory in bytes */
940 mem_size_t pagefile_usage; /* commit charge in bytes */
941 mem_size_t peak_pagefile_usage; /* peak commit charge in bytes */
942 @END
945 /* Set a process information */
946 @REQ(set_process_info)
947 obj_handle_t handle; /* process handle */
948 int mask; /* setting mask (see below) */
949 int priority; /* priority class */
950 affinity_t affinity; /* affinity mask */
951 @END
952 #define SET_PROCESS_INFO_PRIORITY 0x01
953 #define SET_PROCESS_INFO_AFFINITY 0x02
956 /* Retrieve information about a thread */
957 @REQ(get_thread_info)
958 obj_handle_t handle; /* thread handle */
959 unsigned int access; /* required access rights */
960 @REPLY
961 process_id_t pid; /* server process id */
962 thread_id_t tid; /* server thread id */
963 client_ptr_t teb; /* thread teb pointer */
964 client_ptr_t entry_point; /* thread entry point */
965 affinity_t affinity; /* thread affinity mask */
966 int exit_code; /* thread exit code */
967 int priority; /* thread priority level */
968 int last; /* last thread in process */
969 int suspend_count; /* thread suspend count */
970 int dbg_hidden; /* thread hidden from debugger */
971 data_size_t desc_len; /* description length in bytes */
972 VARARG(desc,unicode_str); /* description string */
973 @END
976 /* Retrieve information about thread times */
977 @REQ(get_thread_times)
978 obj_handle_t handle; /* thread handle */
979 @REPLY
980 timeout_t creation_time; /* thread creation time */
981 timeout_t exit_time; /* thread exit time */
982 int unix_pid; /* thread native pid */
983 int unix_tid; /* thread native pid */
984 @END
987 /* Set a thread information */
988 @REQ(set_thread_info)
989 obj_handle_t handle; /* thread handle */
990 int mask; /* setting mask (see below) */
991 int priority; /* priority class */
992 affinity_t affinity; /* affinity mask */
993 client_ptr_t entry_point; /* thread entry point */
994 obj_handle_t token; /* impersonation token */
995 VARARG(desc,unicode_str); /* description string */
996 @END
997 #define SET_THREAD_INFO_PRIORITY 0x01
998 #define SET_THREAD_INFO_AFFINITY 0x02
999 #define SET_THREAD_INFO_TOKEN 0x04
1000 #define SET_THREAD_INFO_ENTRYPOINT 0x08
1001 #define SET_THREAD_INFO_DESCRIPTION 0x10
1002 #define SET_THREAD_INFO_DBG_HIDDEN 0x20
1005 /* Retrieve information about a module */
1006 @REQ(get_dll_info)
1007 obj_handle_t handle; /* process handle */
1008 mod_handle_t base_address; /* base address of module */
1009 @REPLY
1010 client_ptr_t entry_point;
1011 data_size_t filename_len; /* buffer len in bytes required to store filename */
1012 VARARG(filename,unicode_str); /* file name of module */
1013 @END
1016 /* Suspend a thread */
1017 @REQ(suspend_thread)
1018 obj_handle_t handle; /* thread handle */
1019 @REPLY
1020 int count; /* new suspend count */
1021 @END
1024 /* Resume a thread */
1025 @REQ(resume_thread)
1026 obj_handle_t handle; /* thread handle */
1027 @REPLY
1028 int count; /* new suspend count */
1029 @END
1032 /* Notify the server that a dll has been loaded */
1033 @REQ(load_dll)
1034 data_size_t dbg_offset; /* debug info offset */
1035 mod_handle_t base; /* base address */
1036 client_ptr_t name; /* ptr to ptr to name (in process addr space) */
1037 data_size_t dbg_size; /* debug info size */
1038 VARARG(filename,unicode_str); /* file name of dll */
1039 @END
1042 /* Notify the server that a dll is being unloaded */
1043 @REQ(unload_dll)
1044 mod_handle_t base; /* base address */
1045 @END
1048 /* Queue an APC for a thread or process */
1049 @REQ(queue_apc)
1050 obj_handle_t handle; /* thread or process handle */
1051 apc_call_t call; /* call arguments */
1052 @REPLY
1053 obj_handle_t handle; /* APC handle */
1054 int self; /* run APC in caller itself? */
1055 @END
1058 /* Get the result of an APC call */
1059 @REQ(get_apc_result)
1060 obj_handle_t handle; /* handle to the APC */
1061 @REPLY
1062 apc_result_t result; /* result of the APC */
1063 @END
1066 /* Close a handle for the current process */
1067 @REQ(close_handle)
1068 obj_handle_t handle; /* handle to close */
1069 @END
1072 /* Set a handle information */
1073 @REQ(set_handle_info)
1074 obj_handle_t handle; /* handle we are interested in */
1075 int flags; /* new handle flags */
1076 int mask; /* mask for flags to set */
1077 @REPLY
1078 int old_flags; /* old flag value */
1079 @END
1082 /* Duplicate a handle */
1083 @REQ(dup_handle)
1084 obj_handle_t src_process; /* src process handle */
1085 obj_handle_t src_handle; /* src handle to duplicate */
1086 obj_handle_t dst_process; /* dst process handle */
1087 unsigned int access; /* wanted access rights */
1088 unsigned int attributes; /* object attributes */
1089 unsigned int options; /* duplicate options (see below) */
1090 @REPLY
1091 obj_handle_t handle; /* duplicated handle in dst process */
1092 int self; /* is the source the current process? */
1093 int closed; /* whether the source handle has been closed */
1094 @END
1095 #define DUP_HANDLE_CLOSE_SOURCE DUPLICATE_CLOSE_SOURCE
1096 #define DUP_HANDLE_SAME_ACCESS DUPLICATE_SAME_ACCESS
1097 #define DUP_HANDLE_MAKE_GLOBAL 0x80000000 /* Not a Windows flag */
1100 /* Make an object temporary */
1101 @REQ(make_temporary)
1102 obj_handle_t handle; /* handle to the object */
1103 @END
1106 /* Open a handle to a process */
1107 @REQ(open_process)
1108 process_id_t pid; /* process id to open */
1109 unsigned int access; /* wanted access rights */
1110 unsigned int attributes; /* object attributes */
1111 @REPLY
1112 obj_handle_t handle; /* handle to the process */
1113 @END
1116 /* Open a handle to a thread */
1117 @REQ(open_thread)
1118 thread_id_t tid; /* thread id to open */
1119 unsigned int access; /* wanted access rights */
1120 unsigned int attributes; /* object attributes */
1121 @REPLY
1122 obj_handle_t handle; /* handle to the thread */
1123 @END
1126 /* Wait for handles */
1127 @REQ(select)
1128 int flags; /* wait flags (see below) */
1129 client_ptr_t cookie; /* magic cookie to return to client */
1130 abstime_t timeout; /* timeout */
1131 data_size_t size; /* size of select_op */
1132 obj_handle_t prev_apc; /* handle to previous APC */
1133 VARARG(result,apc_result); /* result of previous APC */
1134 VARARG(data,select_op,size); /* operation-specific data */
1135 VARARG(context,context); /* suspend context */
1136 @REPLY
1137 apc_call_t call; /* APC call arguments */
1138 obj_handle_t apc_handle; /* handle to next APC */
1139 VARARG(context,context); /* suspend context */
1140 @END
1141 #define SELECT_ALERTABLE 1
1142 #define SELECT_INTERRUPTIBLE 2
1145 /* Create an event */
1146 @REQ(create_event)
1147 unsigned int access; /* wanted access rights */
1148 int manual_reset; /* manual reset event */
1149 int initial_state; /* initial state of the event */
1150 VARARG(objattr,object_attributes); /* object attributes */
1151 @REPLY
1152 obj_handle_t handle; /* handle to the event */
1153 @END
1155 /* Event operation */
1156 @REQ(event_op)
1157 obj_handle_t handle; /* handle to event */
1158 int op; /* event operation (see below) */
1159 @REPLY
1160 int state; /* previous state */
1161 @END
1162 enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT };
1164 @REQ(query_event)
1165 obj_handle_t handle; /* handle to event */
1166 @REPLY
1167 int manual_reset; /* manual reset event */
1168 int state; /* current state of the event */
1169 @END
1171 /* Open an event */
1172 @REQ(open_event)
1173 unsigned int access; /* wanted access rights */
1174 unsigned int attributes; /* object attributes */
1175 obj_handle_t rootdir; /* root directory */
1176 VARARG(name,unicode_str); /* object name */
1177 @REPLY
1178 obj_handle_t handle; /* handle to the event */
1179 @END
1182 /* Create a keyed event */
1183 @REQ(create_keyed_event)
1184 unsigned int access; /* wanted access rights */
1185 VARARG(objattr,object_attributes); /* object attributes */
1186 @REPLY
1187 obj_handle_t handle; /* handle to the event */
1188 @END
1190 /* Open a keyed event */
1191 @REQ(open_keyed_event)
1192 unsigned int access; /* wanted access rights */
1193 unsigned int attributes; /* object attributes */
1194 obj_handle_t rootdir; /* root directory */
1195 VARARG(name,unicode_str); /* object name */
1196 @REPLY
1197 obj_handle_t handle; /* handle to the event */
1198 @END
1201 /* Create a mutex */
1202 @REQ(create_mutex)
1203 unsigned int access; /* wanted access rights */
1204 int owned; /* initially owned? */
1205 VARARG(objattr,object_attributes); /* object attributes */
1206 @REPLY
1207 obj_handle_t handle; /* handle to the mutex */
1208 @END
1211 /* Release a mutex */
1212 @REQ(release_mutex)
1213 obj_handle_t handle; /* handle to the mutex */
1214 @REPLY
1215 unsigned int prev_count; /* value of internal counter, before release */
1216 @END
1219 /* Open a mutex */
1220 @REQ(open_mutex)
1221 unsigned int access; /* wanted access rights */
1222 unsigned int attributes; /* object attributes */
1223 obj_handle_t rootdir; /* root directory */
1224 VARARG(name,unicode_str); /* object name */
1225 @REPLY
1226 obj_handle_t handle; /* handle to the mutex */
1227 @END
1230 /* Query a mutex */
1231 @REQ(query_mutex)
1232 obj_handle_t handle; /* handle to mutex */
1233 @REPLY
1234 unsigned int count; /* current count of mutex */
1235 int owned; /* true if owned by current thread */
1236 int abandoned; /* true if abandoned */
1237 @END
1240 /* Create a semaphore */
1241 @REQ(create_semaphore)
1242 unsigned int access; /* wanted access rights */
1243 unsigned int initial; /* initial count */
1244 unsigned int max; /* maximum count */
1245 VARARG(objattr,object_attributes); /* object attributes */
1246 @REPLY
1247 obj_handle_t handle; /* handle to the semaphore */
1248 @END
1251 /* Release a semaphore */
1252 @REQ(release_semaphore)
1253 obj_handle_t handle; /* handle to the semaphore */
1254 unsigned int count; /* count to add to semaphore */
1255 @REPLY
1256 unsigned int prev_count; /* previous semaphore count */
1257 @END
1259 @REQ(query_semaphore)
1260 obj_handle_t handle; /* handle to the semaphore */
1261 @REPLY
1262 unsigned int current; /* current count */
1263 unsigned int max; /* maximum count */
1264 @END
1266 /* Open a semaphore */
1267 @REQ(open_semaphore)
1268 unsigned int access; /* wanted access rights */
1269 unsigned int attributes; /* object attributes */
1270 obj_handle_t rootdir; /* root directory */
1271 VARARG(name,unicode_str); /* object name */
1272 @REPLY
1273 obj_handle_t handle; /* handle to the semaphore */
1274 @END
1277 /* Create a file */
1278 @REQ(create_file)
1279 unsigned int access; /* wanted access rights */
1280 unsigned int sharing; /* sharing flags */
1281 int create; /* file create action */
1282 unsigned int options; /* file options */
1283 unsigned int attrs; /* file attributes for creation */
1284 VARARG(objattr,object_attributes); /* object attributes */
1285 VARARG(filename,string); /* file name */
1286 @REPLY
1287 obj_handle_t handle; /* handle to the file */
1288 @END
1291 /* Open a file object */
1292 @REQ(open_file_object)
1293 unsigned int access; /* wanted access rights */
1294 unsigned int attributes; /* open attributes */
1295 obj_handle_t rootdir; /* root directory */
1296 unsigned int sharing; /* sharing flags */
1297 unsigned int options; /* file options */
1298 VARARG(filename,unicode_str); /* file name */
1299 @REPLY
1300 obj_handle_t handle; /* handle to the file */
1301 @END
1304 /* Allocate a file handle for a Unix fd */
1305 @REQ(alloc_file_handle)
1306 unsigned int access; /* wanted access rights */
1307 unsigned int attributes; /* object attributes */
1308 int fd; /* file descriptor on the client side */
1309 @REPLY
1310 obj_handle_t handle; /* handle to the file */
1311 @END
1314 /* Get the Unix name from a file handle */
1315 @REQ(get_handle_unix_name)
1316 obj_handle_t handle; /* file handle */
1317 @REPLY
1318 data_size_t name_len; /* unix name length */
1319 VARARG(name,string); /* unix name */
1320 @END
1323 /* Get a Unix fd to access a file */
1324 @REQ(get_handle_fd)
1325 obj_handle_t handle; /* handle to the file */
1326 @REPLY
1327 int type; /* file type (see below) */
1328 int cacheable; /* can fd be cached in the client? */
1329 unsigned int access; /* file access rights */
1330 unsigned int options; /* file open options */
1331 @END
1332 enum server_fd_type
1334 FD_TYPE_INVALID, /* invalid file (no associated fd) */
1335 FD_TYPE_FILE, /* regular file */
1336 FD_TYPE_DIR, /* directory */
1337 FD_TYPE_SOCKET, /* socket */
1338 FD_TYPE_SERIAL, /* serial port */
1339 FD_TYPE_PIPE, /* named pipe */
1340 FD_TYPE_MAILSLOT, /* mailslot */
1341 FD_TYPE_CHAR, /* unspecified char device */
1342 FD_TYPE_DEVICE, /* Windows device file */
1343 FD_TYPE_NB_TYPES
1347 /* Retrieve (or allocate) the client-side directory cache entry */
1348 @REQ(get_directory_cache_entry)
1349 obj_handle_t handle; /* handle to the directory */
1350 @REPLY
1351 int entry; /* cache entry on the client side */
1352 VARARG(free,ints); /* entries that can be freed */
1353 @END
1356 /* Flush a file buffers */
1357 @REQ(flush)
1358 async_data_t async; /* async I/O parameters */
1359 @REPLY
1360 obj_handle_t event; /* event set when finished */
1361 @END
1363 /* Query file information */
1364 @REQ(get_file_info)
1365 obj_handle_t handle; /* handle to the file */
1366 unsigned int info_class; /* queried information class */
1367 @REPLY
1368 VARARG(data,bytes); /* file info data */
1369 @END
1371 /* Query volume information */
1372 @REQ(get_volume_info)
1373 obj_handle_t handle; /* handle to the file */
1374 unsigned int info_class; /* queried information class */
1375 @REPLY
1376 VARARG(data,bytes); /* volume info data */
1377 @END
1379 /* Lock a region of a file */
1380 @REQ(lock_file)
1381 obj_handle_t handle; /* handle to the file */
1382 file_pos_t offset; /* offset of start of lock */
1383 file_pos_t count; /* count of bytes to lock */
1384 int shared; /* shared or exclusive lock? */
1385 int wait; /* do we want to wait? */
1386 @REPLY
1387 obj_handle_t handle; /* handle to wait on */
1388 int overlapped; /* is it an overlapped I/O handle? */
1389 @END
1392 /* Unlock a region of a file */
1393 @REQ(unlock_file)
1394 obj_handle_t handle; /* handle to the file */
1395 file_pos_t offset; /* offset of start of unlock */
1396 file_pos_t count; /* count of bytes to unlock */
1397 @END
1400 /* Set socket event parameters */
1401 @REQ(set_socket_event)
1402 obj_handle_t handle; /* handle to the socket */
1403 unsigned int mask; /* event mask */
1404 obj_handle_t event; /* event object */
1405 user_handle_t window; /* window to send the message to */
1406 unsigned int msg; /* message to send */
1407 @END
1410 /* Get socket event parameters */
1411 @REQ(get_socket_event)
1412 obj_handle_t handle; /* handle to the socket */
1413 int service; /* clear pending? */
1414 obj_handle_t c_event; /* event to clear */
1415 @REPLY
1416 unsigned int mask; /* event mask */
1417 unsigned int pmask; /* pending events */
1418 unsigned int state; /* status bits */
1419 VARARG(errors,ints); /* event errors */
1420 @END
1423 /* Get socket info */
1424 @REQ(get_socket_info)
1425 obj_handle_t handle; /* handle to the socket */
1426 @REPLY
1427 int family; /* family, see socket manpage */
1428 int type; /* type, see socket manpage */
1429 int protocol; /* protocol, see socket manpage */
1430 @END
1433 /* Re-enable pending socket events */
1434 @REQ(enable_socket_event)
1435 obj_handle_t handle; /* handle to the socket */
1436 unsigned int mask; /* events to re-enable */
1437 unsigned int sstate; /* status bits to set */
1438 unsigned int cstate; /* status bits to clear */
1439 @END
1441 @REQ(set_socket_deferred)
1442 obj_handle_t handle; /* handle to the socket */
1443 obj_handle_t deferred; /* handle to the socket for which accept() is deferred */
1444 @END
1447 /* Retrieve the next pending console ioctl request */
1448 @REQ(get_next_console_request)
1449 obj_handle_t handle; /* console server handle */
1450 int signal; /* server signal state */
1451 int read; /* 1 if reporting result of blocked read ioctl */
1452 unsigned int status; /* status of previous ioctl */
1453 VARARG(out_data,bytes); /* out_data of previous ioctl */
1454 @REPLY
1455 unsigned int code; /* ioctl code */
1456 unsigned int output; /* output id or 0 for input */
1457 data_size_t out_size; /* ioctl output size */
1458 VARARG(in_data,bytes); /* ioctl in_data */
1459 @END
1462 /* enable directory change notifications */
1463 @REQ(read_directory_changes)
1464 unsigned int filter; /* notification filter */
1465 int subtree; /* watch the subtree? */
1466 int want_data; /* flag indicating whether change data should be collected */
1467 async_data_t async; /* async I/O parameters */
1468 @END
1471 @REQ(read_change)
1472 obj_handle_t handle;
1473 @REPLY
1474 VARARG(events,filesystem_event); /* collected filesystem events */
1475 @END
1478 /* Create a file mapping */
1479 @REQ(create_mapping)
1480 unsigned int access; /* wanted access rights */
1481 unsigned int flags; /* SEC_* flags */
1482 unsigned int file_access; /* file access rights */
1483 mem_size_t size; /* mapping size */
1484 obj_handle_t file_handle; /* file handle */
1485 VARARG(objattr,object_attributes); /* object attributes */
1486 @REPLY
1487 obj_handle_t handle; /* handle to the mapping */
1488 @END
1491 /* Open a mapping */
1492 @REQ(open_mapping)
1493 unsigned int access; /* wanted access rights */
1494 unsigned int attributes; /* object attributes */
1495 obj_handle_t rootdir; /* root directory */
1496 VARARG(name,unicode_str); /* object name */
1497 @REPLY
1498 obj_handle_t handle; /* handle to the mapping */
1499 @END
1502 /* Get information about a file mapping */
1503 @REQ(get_mapping_info)
1504 obj_handle_t handle; /* handle to the mapping */
1505 unsigned int access; /* wanted access rights */
1506 @REPLY
1507 mem_size_t size; /* mapping size */
1508 unsigned int flags; /* SEC_* flags */
1509 obj_handle_t shared_file; /* shared mapping file handle */
1510 VARARG(image,pe_image_info);/* image info for SEC_IMAGE mappings */
1511 @END
1514 /* Add a memory view in the current process */
1515 @REQ(map_view)
1516 obj_handle_t mapping; /* file mapping handle */
1517 unsigned int access; /* wanted access rights */
1518 client_ptr_t base; /* view base address (page-aligned) */
1519 mem_size_t size; /* view size */
1520 file_pos_t start; /* start offset in mapping */
1521 @END
1524 /* Unmap a memory view from the current process */
1525 @REQ(unmap_view)
1526 client_ptr_t base; /* view base address */
1527 @END
1530 /* Get a range of committed pages in a file mapping */
1531 @REQ(get_mapping_committed_range)
1532 client_ptr_t base; /* view base address */
1533 file_pos_t offset; /* starting offset (page-aligned, in bytes) */
1534 @REPLY
1535 mem_size_t size; /* size of range starting at offset (page-aligned, in bytes) */
1536 int committed; /* whether it is a committed range */
1537 @END
1540 /* Add a range to the committed pages in a file mapping */
1541 @REQ(add_mapping_committed_range)
1542 client_ptr_t base; /* view base address */
1543 file_pos_t offset; /* starting offset (page-aligned, in bytes) */
1544 mem_size_t size; /* size to set (page-aligned, in bytes) or 0 if only retrieving */
1545 @END
1548 /* Check if two memory maps are for the same file */
1549 @REQ(is_same_mapping)
1550 client_ptr_t base1; /* first view base address */
1551 client_ptr_t base2; /* second view base address */
1552 @END
1555 struct thread_info
1557 timeout_t start_time;
1558 thread_id_t tid;
1559 int base_priority;
1560 int current_priority;
1561 int unix_tid;
1564 struct process_info
1566 timeout_t start_time;
1567 data_size_t name_len;
1568 int thread_count;
1569 int priority;
1570 process_id_t pid;
1571 process_id_t parent_pid;
1572 int handle_count;
1573 int unix_pid;
1574 int __pad;
1575 /* VARARG(name,unicode_str,name_len); */
1576 /* VARARG(threads,struct thread_info,thread_count); */
1579 /* Get a list of processes and threads currently running */
1580 @REQ(list_processes)
1581 @REPLY
1582 data_size_t info_size;
1583 int process_count;
1584 VARARG(data,process_info,info_size);
1585 @END
1588 /* Wait for a debug event */
1589 @REQ(wait_debug_event)
1590 int get_handle; /* should we alloc a handle for waiting? */
1591 @REPLY
1592 process_id_t pid; /* process id */
1593 thread_id_t tid; /* thread id */
1594 obj_handle_t wait; /* wait handle if no event ready */
1595 VARARG(event,debug_event); /* debug event data */
1596 @END
1599 /* Queue an exception event */
1600 @REQ(queue_exception_event)
1601 int first; /* first chance exception? */
1602 unsigned int code; /* exception code */
1603 unsigned int flags; /* exception flags */
1604 client_ptr_t record; /* exception record */
1605 client_ptr_t address; /* exception address */
1606 data_size_t len; /* size of parameters */
1607 VARARG(params,uints64,len);/* exception parameters */
1608 @REPLY
1609 obj_handle_t handle; /* handle to the queued event */
1610 @END
1613 /* Retrieve the status of an exception event */
1614 @REQ(get_exception_status)
1615 obj_handle_t handle; /* handle to the queued event */
1616 @END
1619 /* Continue a debug event */
1620 @REQ(continue_debug_event)
1621 process_id_t pid; /* process id to continue */
1622 thread_id_t tid; /* thread id to continue */
1623 int status; /* continuation status */
1624 @END
1627 /* Start/stop debugging an existing process */
1628 @REQ(debug_process)
1629 process_id_t pid; /* id of the process to debug */
1630 int attach; /* 1=attaching / 0=detaching from the process */
1631 @END
1634 /* Set debugger kill on exit flag */
1635 @REQ(set_debugger_kill_on_exit)
1636 int kill_on_exit; /* 0=detach/1=kill debuggee when debugger dies */
1637 @END
1640 /* Read data from a process address space */
1641 @REQ(read_process_memory)
1642 obj_handle_t handle; /* process handle */
1643 client_ptr_t addr; /* addr to read from */
1644 @REPLY
1645 VARARG(data,bytes); /* result data */
1646 @END
1649 /* Write data to a process address space */
1650 @REQ(write_process_memory)
1651 obj_handle_t handle; /* process handle */
1652 client_ptr_t addr; /* addr to write to */
1653 VARARG(data,bytes); /* data to write */
1654 @END
1657 /* Create a registry key */
1658 @REQ(create_key)
1659 unsigned int access; /* desired access rights */
1660 unsigned int options; /* creation options */
1661 VARARG(objattr,object_attributes); /* object attributes */
1662 VARARG(class,unicode_str); /* class name */
1663 @REPLY
1664 obj_handle_t hkey; /* handle to the created key */
1665 int created; /* has it been newly created? */
1666 @END
1668 /* Open a registry key */
1669 @REQ(open_key)
1670 obj_handle_t parent; /* handle to the parent key */
1671 unsigned int access; /* desired access rights */
1672 unsigned int attributes; /* object attributes */
1673 VARARG(name,unicode_str); /* key name */
1674 @REPLY
1675 obj_handle_t hkey; /* handle to the open key */
1676 @END
1679 /* Delete a registry key */
1680 @REQ(delete_key)
1681 obj_handle_t hkey; /* handle to the key */
1682 @END
1685 /* Flush a registry key */
1686 @REQ(flush_key)
1687 obj_handle_t hkey; /* handle to the key */
1688 @END
1691 /* Enumerate registry subkeys */
1692 @REQ(enum_key)
1693 obj_handle_t hkey; /* handle to registry key */
1694 int index; /* index of subkey (or -1 for current key) */
1695 int info_class; /* requested information class */
1696 @REPLY
1697 int subkeys; /* number of subkeys */
1698 int max_subkey; /* longest subkey name */
1699 int max_class; /* longest class name */
1700 int values; /* number of values */
1701 int max_value; /* longest value name */
1702 int max_data; /* longest value data */
1703 timeout_t modif; /* last modification time */
1704 data_size_t total; /* total length needed for full name and class */
1705 data_size_t namelen; /* length of key name in bytes */
1706 VARARG(name,unicode_str,namelen); /* key name */
1707 VARARG(class,unicode_str); /* class name */
1708 @END
1711 /* Set a value of a registry key */
1712 @REQ(set_key_value)
1713 obj_handle_t hkey; /* handle to registry key */
1714 int type; /* value type */
1715 data_size_t namelen; /* length of value name in bytes */
1716 VARARG(name,unicode_str,namelen); /* value name */
1717 VARARG(data,bytes); /* value data */
1718 @END
1721 /* Retrieve the value of a registry key */
1722 @REQ(get_key_value)
1723 obj_handle_t hkey; /* handle to registry key */
1724 VARARG(name,unicode_str); /* value name */
1725 @REPLY
1726 int type; /* value type */
1727 data_size_t total; /* total length needed for data */
1728 VARARG(data,bytes); /* value data */
1729 @END
1732 /* Enumerate a value of a registry key */
1733 @REQ(enum_key_value)
1734 obj_handle_t hkey; /* handle to registry key */
1735 int index; /* value index */
1736 int info_class; /* requested information class */
1737 @REPLY
1738 int type; /* value type */
1739 data_size_t total; /* total length needed for full name and data */
1740 data_size_t namelen; /* length of value name in bytes */
1741 VARARG(name,unicode_str,namelen); /* value name */
1742 VARARG(data,bytes); /* value data */
1743 @END
1746 /* Delete a value of a registry key */
1747 @REQ(delete_key_value)
1748 obj_handle_t hkey; /* handle to registry key */
1749 VARARG(name,unicode_str); /* value name */
1750 @END
1753 /* Load a registry branch from a file */
1754 @REQ(load_registry)
1755 obj_handle_t file; /* file to load from */
1756 VARARG(objattr,object_attributes); /* object attributes */
1757 @END
1760 /* UnLoad a registry branch from a file */
1761 @REQ(unload_registry)
1762 obj_handle_t hkey; /* root key to unload to */
1763 @END
1766 /* Save a registry branch to a file */
1767 @REQ(save_registry)
1768 obj_handle_t hkey; /* key to save */
1769 obj_handle_t file; /* file to save to */
1770 @END
1773 /* Add a registry key change notification */
1774 @REQ(set_registry_notification)
1775 obj_handle_t hkey; /* key to watch for changes */
1776 obj_handle_t event; /* event to set */
1777 int subtree; /* should we watch the whole subtree? */
1778 unsigned int filter; /* things to watch */
1779 @END
1782 /* Create a waitable timer */
1783 @REQ(create_timer)
1784 unsigned int access; /* wanted access rights */
1785 int manual; /* manual reset */
1786 VARARG(objattr,object_attributes); /* object attributes */
1787 @REPLY
1788 obj_handle_t handle; /* handle to the timer */
1789 @END
1792 /* Open a waitable timer */
1793 @REQ(open_timer)
1794 unsigned int access; /* wanted access rights */
1795 unsigned int attributes; /* object attributes */
1796 obj_handle_t rootdir; /* root directory */
1797 VARARG(name,unicode_str); /* object name */
1798 @REPLY
1799 obj_handle_t handle; /* handle to the timer */
1800 @END
1802 /* Set a waitable timer */
1803 @REQ(set_timer)
1804 obj_handle_t handle; /* handle to the timer */
1805 timeout_t expire; /* next expiration absolute time */
1806 client_ptr_t callback; /* callback function */
1807 client_ptr_t arg; /* callback argument */
1808 int period; /* timer period in ms */
1809 @REPLY
1810 int signaled; /* was the timer signaled before this call ? */
1811 @END
1813 /* Cancel a waitable timer */
1814 @REQ(cancel_timer)
1815 obj_handle_t handle; /* handle to the timer */
1816 @REPLY
1817 int signaled; /* was the timer signaled before this calltime ? */
1818 @END
1820 /* Get information on a waitable timer */
1821 @REQ(get_timer_info)
1822 obj_handle_t handle; /* handle to the timer */
1823 @REPLY
1824 timeout_t when; /* absolute time when the timer next expires */
1825 int signaled; /* is the timer signaled? */
1826 @END
1829 /* Retrieve the current context of a thread */
1830 @REQ(get_thread_context)
1831 obj_handle_t handle; /* thread or context handle */
1832 unsigned int flags; /* context flags */
1833 @REPLY
1834 int self; /* was it a handle to the current thread? */
1835 obj_handle_t handle; /* pending context handle */
1836 VARARG(context,context); /* thread context */
1837 @END
1840 /* Set the current context of a thread */
1841 @REQ(set_thread_context)
1842 obj_handle_t handle; /* thread handle */
1843 VARARG(context,context); /* thread context */
1844 @REPLY
1845 int self; /* was it a handle to the current thread? */
1846 @END
1849 /* Fetch a selector entry for a thread */
1850 @REQ(get_selector_entry)
1851 obj_handle_t handle; /* thread handle */
1852 int entry; /* LDT entry */
1853 @REPLY
1854 unsigned int base; /* selector base */
1855 unsigned int limit; /* selector limit */
1856 unsigned char flags; /* selector flags */
1857 @END
1860 /* Add an atom */
1861 @REQ(add_atom)
1862 obj_handle_t table; /* which table to add atom to */
1863 VARARG(name,unicode_str); /* atom name */
1864 @REPLY
1865 atom_t atom; /* resulting atom */
1866 @END
1869 /* Delete an atom */
1870 @REQ(delete_atom)
1871 obj_handle_t table; /* which table to delete atom from */
1872 atom_t atom; /* atom handle */
1873 @END
1876 /* Find an atom */
1877 @REQ(find_atom)
1878 obj_handle_t table; /* which table to find atom from */
1879 VARARG(name,unicode_str); /* atom name */
1880 @REPLY
1881 atom_t atom; /* atom handle */
1882 @END
1885 /* Get information about an atom */
1886 @REQ(get_atom_information)
1887 obj_handle_t table; /* which table to find atom from */
1888 atom_t atom; /* atom handle */
1889 @REPLY
1890 int count; /* atom lock count */
1891 int pinned; /* whether the atom has been pinned */
1892 data_size_t total; /* actual length of atom name */
1893 VARARG(name,unicode_str); /* atom name */
1894 @END
1897 /* Set information about an atom */
1898 @REQ(set_atom_information)
1899 obj_handle_t table; /* which table to find atom from */
1900 atom_t atom; /* atom handle */
1901 int pinned; /* whether to bump atom information */
1902 @END
1905 /* Empty an atom table */
1906 @REQ(empty_atom_table)
1907 obj_handle_t table; /* which table to find atom from */
1908 int if_pinned; /* whether to delete pinned atoms */
1909 @END
1912 /* Init an atom table */
1913 @REQ(init_atom_table)
1914 int entries; /* number of entries (only for local) */
1915 @REPLY
1916 obj_handle_t table; /* handle to the atom table */
1917 @END
1920 /* Get the message queue of the current thread */
1921 @REQ(get_msg_queue)
1922 @REPLY
1923 obj_handle_t handle; /* handle to the queue */
1924 @END
1927 /* Set the file descriptor associated to the current thread queue */
1928 @REQ(set_queue_fd)
1929 obj_handle_t handle; /* handle to the file descriptor */
1930 @END
1933 /* Set the current message queue wakeup mask */
1934 @REQ(set_queue_mask)
1935 unsigned int wake_mask; /* wakeup bits mask */
1936 unsigned int changed_mask; /* changed bits mask */
1937 int skip_wait; /* will we skip waiting if signaled? */
1938 @REPLY
1939 unsigned int wake_bits; /* current wake bits */
1940 unsigned int changed_bits; /* current changed bits */
1941 @END
1944 /* Get the current message queue status */
1945 @REQ(get_queue_status)
1946 unsigned int clear_bits; /* should we clear the change bits? */
1947 @REPLY
1948 unsigned int wake_bits; /* wake bits */
1949 unsigned int changed_bits; /* changed bits since last time */
1950 @END
1953 /* Retrieve the process idle event */
1954 @REQ(get_process_idle_event)
1955 obj_handle_t handle; /* process handle */
1956 @REPLY
1957 obj_handle_t event; /* handle to idle event */
1958 @END
1961 /* Send a message to a thread queue */
1962 @REQ(send_message)
1963 thread_id_t id; /* thread id */
1964 int type; /* message type (see below) */
1965 int flags; /* message flags (see below) */
1966 user_handle_t win; /* window handle */
1967 unsigned int msg; /* message code */
1968 lparam_t wparam; /* parameters */
1969 lparam_t lparam; /* parameters */
1970 timeout_t timeout; /* timeout for reply */
1971 VARARG(data,message_data); /* message data for sent messages */
1972 @END
1974 @REQ(post_quit_message)
1975 int exit_code; /* exit code to return */
1976 @END
1978 enum message_type
1980 MSG_ASCII, /* Ascii message (from SendMessageA) */
1981 MSG_UNICODE, /* Unicode message (from SendMessageW) */
1982 MSG_NOTIFY, /* notify message (from SendNotifyMessageW), always Unicode */
1983 MSG_CALLBACK, /* callback message (from SendMessageCallbackW), always Unicode */
1984 MSG_CALLBACK_RESULT,/* result of a callback message */
1985 MSG_OTHER_PROCESS, /* sent from other process, may include vararg data, always Unicode */
1986 MSG_POSTED, /* posted message (from PostMessageW), always Unicode */
1987 MSG_HARDWARE, /* hardware message */
1988 MSG_WINEVENT, /* winevent message */
1989 MSG_HOOK_LL /* low-level hardware hook */
1991 #define SEND_MSG_ABORT_IF_HUNG 0x01
1994 /* Send a hardware message to a thread queue */
1995 @REQ(send_hardware_message)
1996 user_handle_t win; /* window handle */
1997 hw_input_t input; /* input data */
1998 unsigned int flags; /* flags (see below) */
1999 @REPLY
2000 int wait; /* do we need to wait for a reply? */
2001 int prev_x; /* previous cursor position */
2002 int prev_y;
2003 int new_x; /* new cursor position */
2004 int new_y;
2005 VARARG(keystate,bytes); /* global state array for all the keys */
2006 @END
2007 #define SEND_HWMSG_INJECTED 0x01
2010 /* Get a message from the current queue */
2011 @REQ(get_message)
2012 unsigned int flags; /* PM_* flags */
2013 user_handle_t get_win; /* window handle to get */
2014 unsigned int get_first; /* first message code to get */
2015 unsigned int get_last; /* last message code to get */
2016 unsigned int hw_id; /* id of the previous hardware message (or 0) */
2017 unsigned int wake_mask; /* wakeup bits mask */
2018 unsigned int changed_mask; /* changed bits mask */
2019 @REPLY
2020 user_handle_t win; /* window handle */
2021 unsigned int msg; /* message code */
2022 lparam_t wparam; /* parameters */
2023 lparam_t lparam; /* parameters */
2024 int type; /* message type */
2025 int x; /* message x position */
2026 int y; /* message y position */
2027 unsigned int time; /* message time */
2028 unsigned int active_hooks; /* active hooks bitmap */
2029 data_size_t total; /* total size of extra data */
2030 VARARG(data,message_data); /* message data for sent messages */
2031 @END
2034 /* Reply to a sent message */
2035 @REQ(reply_message)
2036 int remove; /* should we remove the message? */
2037 lparam_t result; /* message result */
2038 VARARG(data,bytes); /* message data for sent messages */
2039 @END
2042 /* Accept and remove the current hardware message */
2043 @REQ(accept_hardware_message)
2044 unsigned int hw_id; /* id of the hardware message */
2045 @END
2048 /* Retrieve the reply for the last message sent */
2049 @REQ(get_message_reply)
2050 int cancel; /* cancel message if not ready? */
2051 @REPLY
2052 lparam_t result; /* message result */
2053 VARARG(data,bytes); /* message data for sent messages */
2054 @END
2057 /* Set a window timer */
2058 @REQ(set_win_timer)
2059 user_handle_t win; /* window handle */
2060 unsigned int msg; /* message to post */
2061 unsigned int rate; /* timer rate in ms */
2062 lparam_t id; /* timer id */
2063 lparam_t lparam; /* message lparam (callback proc) */
2064 @REPLY
2065 lparam_t id; /* timer id */
2066 @END
2069 /* Kill a window timer */
2070 @REQ(kill_win_timer)
2071 user_handle_t win; /* window handle */
2072 lparam_t id; /* timer id */
2073 unsigned int msg; /* message to post */
2074 @END
2077 /* check if the thread owning the window is hung */
2078 @REQ(is_window_hung)
2079 user_handle_t win; /* window handle */
2080 @REPLY
2081 int is_hung;
2082 @END
2085 /* Retrieve info about a serial port */
2086 @REQ(get_serial_info)
2087 obj_handle_t handle; /* handle to comm port */
2088 int flags;
2089 @REPLY
2090 unsigned int eventmask;
2091 unsigned int cookie;
2092 unsigned int pending_write;
2093 @END
2096 /* Set info about a serial port */
2097 @REQ(set_serial_info)
2098 obj_handle_t handle; /* handle to comm port */
2099 int flags; /* bitmask to set values (see below) */
2100 @END
2101 #define SERIALINFO_PENDING_WRITE 0x04
2102 #define SERIALINFO_PENDING_WAIT 0x08
2105 /* Create an async I/O */
2106 @REQ(register_async)
2107 int type; /* type of queue to look after */
2108 async_data_t async; /* async I/O parameters */
2109 int count; /* count - usually # of bytes to be read/written */
2110 @END
2111 #define ASYNC_TYPE_READ 0x01
2112 #define ASYNC_TYPE_WRITE 0x02
2113 #define ASYNC_TYPE_WAIT 0x03
2116 /* Cancel all async op on a fd */
2117 @REQ(cancel_async)
2118 obj_handle_t handle; /* handle to comm port, socket or file */
2119 client_ptr_t iosb; /* I/O status block (NULL=all) */
2120 int only_thread; /* cancel matching this thread */
2121 @END
2124 /* Retrieve results of an async */
2125 @REQ(get_async_result)
2126 client_ptr_t user_arg; /* user arg used to identify async */
2127 @REPLY
2128 data_size_t size; /* result size (input or output depending on the operation) */
2129 VARARG(out_data,bytes); /* iosb output data */
2130 @END
2133 /* Perform a read on a file object */
2134 @REQ(read)
2135 async_data_t async; /* async I/O parameters */
2136 file_pos_t pos; /* read position */
2137 @REPLY
2138 obj_handle_t wait; /* handle to wait on for blocking read */
2139 unsigned int options; /* device open options */
2140 VARARG(data,bytes); /* read data */
2141 @END
2144 /* Perform a write on a file object */
2145 @REQ(write)
2146 async_data_t async; /* async I/O parameters */
2147 file_pos_t pos; /* write position */
2148 VARARG(data,bytes); /* write data */
2149 @REPLY
2150 obj_handle_t wait; /* handle to wait on for blocking write */
2151 unsigned int options; /* device open options */
2152 data_size_t size; /* size written */
2153 @END
2156 /* Perform an ioctl on a file */
2157 @REQ(ioctl)
2158 ioctl_code_t code; /* ioctl code */
2159 async_data_t async; /* async I/O parameters */
2160 VARARG(in_data,bytes); /* ioctl input data */
2161 @REPLY
2162 obj_handle_t wait; /* handle to wait on for blocking ioctl */
2163 unsigned int options; /* device open options */
2164 VARARG(out_data,bytes); /* ioctl output data */
2165 @END
2168 /* Store results of an async irp */
2169 @REQ(set_irp_result)
2170 obj_handle_t handle; /* handle to the irp */
2171 unsigned int status; /* status of the irp */
2172 data_size_t size; /* result size (input or output depending on the operation) */
2173 VARARG(data,bytes); /* output data of the irp */
2174 @END
2177 /* Create a named pipe */
2178 @REQ(create_named_pipe)
2179 unsigned int access;
2180 unsigned int options;
2181 unsigned int sharing;
2182 unsigned int maxinstances;
2183 unsigned int outsize;
2184 unsigned int insize;
2185 timeout_t timeout;
2186 unsigned int flags;
2187 VARARG(objattr,object_attributes); /* object attributes */
2188 @REPLY
2189 obj_handle_t handle; /* handle to the pipe */
2190 @END
2192 /* flags in create_named_pipe and get_named_pipe_info */
2193 #define NAMED_PIPE_MESSAGE_STREAM_WRITE 0x0001
2194 #define NAMED_PIPE_MESSAGE_STREAM_READ 0x0002
2195 #define NAMED_PIPE_NONBLOCKING_MODE 0x0004
2196 #define NAMED_PIPE_SERVER_END 0x8000
2198 /* Set named pipe information by handle */
2199 @REQ(set_named_pipe_info)
2200 obj_handle_t handle;
2201 unsigned int flags;
2202 @END
2204 /* Create a window */
2205 @REQ(create_window)
2206 user_handle_t parent; /* parent window */
2207 user_handle_t owner; /* owner window */
2208 atom_t atom; /* class atom */
2209 mod_handle_t instance; /* module instance */
2210 int dpi; /* system DPI */
2211 int awareness; /* thread DPI awareness */
2212 VARARG(class,unicode_str); /* class name */
2213 @REPLY
2214 user_handle_t handle; /* created window */
2215 user_handle_t parent; /* full handle of parent */
2216 user_handle_t owner; /* full handle of owner */
2217 int extra; /* number of extra bytes */
2218 client_ptr_t class_ptr; /* pointer to class in client address space */
2219 int dpi; /* window DPI if not per-monitor aware */
2220 int awareness; /* window DPI awareness */
2221 @END
2224 /* Destroy a window */
2225 @REQ(destroy_window)
2226 user_handle_t handle; /* handle to the window */
2227 @END
2230 /* Retrieve the desktop window for the current thread */
2231 @REQ(get_desktop_window)
2232 int force; /* force creation if it doesn't exist */
2233 @REPLY
2234 user_handle_t top_window; /* handle to the desktop window */
2235 user_handle_t msg_window; /* handle to the top-level HWND_MESSAGE parent */
2236 @END
2239 /* Set a window owner */
2240 @REQ(set_window_owner)
2241 user_handle_t handle; /* handle to the window */
2242 user_handle_t owner; /* new owner */
2243 @REPLY
2244 user_handle_t full_owner; /* full handle of new owner */
2245 user_handle_t prev_owner; /* full handle of previous owner */
2246 @END
2249 /* Get information from a window handle */
2250 @REQ(get_window_info)
2251 user_handle_t handle; /* handle to the window */
2252 @REPLY
2253 user_handle_t full_handle; /* full 32-bit handle */
2254 user_handle_t last_active; /* last active popup */
2255 process_id_t pid; /* process owning the window */
2256 thread_id_t tid; /* thread owning the window */
2257 atom_t atom; /* class atom */
2258 int is_unicode; /* ANSI or unicode */
2259 int dpi; /* window DPI */
2260 int awareness; /* DPI awareness */
2261 @END
2264 /* Set some information in a window */
2265 @REQ(set_window_info)
2266 unsigned short flags; /* flags for fields to set (see below) */
2267 short int is_unicode; /* ANSI or unicode */
2268 user_handle_t handle; /* handle to the window */
2269 unsigned int style; /* window style */
2270 unsigned int ex_style; /* window extended style */
2271 unsigned int id; /* window id */
2272 mod_handle_t instance; /* creator instance */
2273 lparam_t user_data; /* user-specific data */
2274 int extra_offset; /* offset to set in extra bytes */
2275 data_size_t extra_size; /* size to set in extra bytes */
2276 lparam_t extra_value; /* value to set in extra bytes */
2277 @REPLY
2278 unsigned int old_style; /* old window style */
2279 unsigned int old_ex_style; /* old window extended style */
2280 mod_handle_t old_instance; /* old creator instance */
2281 lparam_t old_user_data; /* old user-specific data */
2282 lparam_t old_extra_value; /* old value in extra bytes */
2283 unsigned int old_id; /* old window id */
2284 @END
2285 #define SET_WIN_STYLE 0x01
2286 #define SET_WIN_EXSTYLE 0x02
2287 #define SET_WIN_ID 0x04
2288 #define SET_WIN_INSTANCE 0x08
2289 #define SET_WIN_USERDATA 0x10
2290 #define SET_WIN_EXTRA 0x20
2291 #define SET_WIN_UNICODE 0x40
2294 /* Set the parent of a window */
2295 @REQ(set_parent)
2296 user_handle_t handle; /* handle to the window */
2297 user_handle_t parent; /* handle to the parent */
2298 @REPLY
2299 user_handle_t old_parent; /* old parent window */
2300 user_handle_t full_parent; /* full handle of new parent */
2301 int dpi; /* new window DPI if not per-monitor aware */
2302 int awareness; /* new DPI awareness */
2303 @END
2306 /* Get a list of the window parents, up to the root of the tree */
2307 @REQ(get_window_parents)
2308 user_handle_t handle; /* handle to the window */
2309 @REPLY
2310 int count; /* total count of parents */
2311 VARARG(parents,user_handles); /* parent handles */
2312 @END
2315 /* Get a list of the window children */
2316 @REQ(get_window_children)
2317 obj_handle_t desktop; /* handle to desktop */
2318 user_handle_t parent; /* parent window */
2319 atom_t atom; /* class atom for the listed children */
2320 thread_id_t tid; /* thread owning the listed children */
2321 VARARG(class,unicode_str); /* class name */
2322 @REPLY
2323 int count; /* total count of children */
2324 VARARG(children,user_handles); /* children handles */
2325 @END
2328 /* Get a list of the window children that contain a given point */
2329 @REQ(get_window_children_from_point)
2330 user_handle_t parent; /* parent window */
2331 int x; /* point in parent coordinates */
2332 int y;
2333 int dpi; /* dpi for the point coordinates */
2334 @REPLY
2335 int count; /* total count of children */
2336 VARARG(children,user_handles); /* children handles */
2337 @END
2340 /* Get window tree information from a window handle */
2341 @REQ(get_window_tree)
2342 user_handle_t handle; /* handle to the window */
2343 @REPLY
2344 user_handle_t parent; /* parent window */
2345 user_handle_t owner; /* owner window */
2346 user_handle_t next_sibling; /* next sibling in Z-order */
2347 user_handle_t prev_sibling; /* prev sibling in Z-order */
2348 user_handle_t first_sibling; /* first sibling in Z-order */
2349 user_handle_t last_sibling; /* last sibling in Z-order */
2350 user_handle_t first_child; /* first child */
2351 user_handle_t last_child; /* last child */
2352 @END
2354 /* Set the position and Z order of a window */
2355 @REQ(set_window_pos)
2356 unsigned short swp_flags; /* SWP_* flags */
2357 unsigned short paint_flags; /* paint flags (see below) */
2358 user_handle_t handle; /* handle to the window */
2359 user_handle_t previous; /* previous window in Z order */
2360 rectangle_t window; /* window rectangle (in parent coords) */
2361 rectangle_t client; /* client rectangle (in parent coords) */
2362 VARARG(valid,rectangles); /* valid rectangles from WM_NCCALCSIZE (in parent coords) */
2363 @REPLY
2364 unsigned int new_style; /* new window style */
2365 unsigned int new_ex_style; /* new window extended style */
2366 user_handle_t surface_win; /* parent window that holds the surface */
2367 int needs_update; /* whether the surface region needs an update */
2368 @END
2369 #define SET_WINPOS_PAINT_SURFACE 0x01 /* window has a paintable surface */
2370 #define SET_WINPOS_PIXEL_FORMAT 0x02 /* window has a custom pixel format */
2372 /* Get the window and client rectangles of a window */
2373 @REQ(get_window_rectangles)
2374 user_handle_t handle; /* handle to the window */
2375 int relative; /* coords relative to (see below) */
2376 int dpi; /* DPI to map to, or zero for per-monitor DPI */
2377 @REPLY
2378 rectangle_t window; /* window rectangle */
2379 rectangle_t client; /* client rectangle */
2380 @END
2381 enum coords_relative
2383 COORDS_CLIENT, /* relative to client area */
2384 COORDS_WINDOW, /* relative to whole window area */
2385 COORDS_PARENT, /* relative to parent's client area */
2386 COORDS_SCREEN /* relative to screen origin */
2390 /* Get the window text */
2391 @REQ(get_window_text)
2392 user_handle_t handle; /* handle to the window */
2393 @REPLY
2394 data_size_t length; /* total length in WCHARs */
2395 VARARG(text,unicode_str); /* window text */
2396 @END
2399 /* Set the window text */
2400 @REQ(set_window_text)
2401 user_handle_t handle; /* handle to the window */
2402 VARARG(text,unicode_str); /* window text */
2403 @END
2406 /* Get the coordinates offset between two windows */
2407 @REQ(get_windows_offset)
2408 user_handle_t from; /* handle to the first window */
2409 user_handle_t to; /* handle to the second window */
2410 int dpi; /* DPI to map to, or zero for per-monitor DPI */
2411 @REPLY
2412 int x; /* x coordinate offset */
2413 int y; /* y coordinate offset */
2414 int mirror; /* whether to mirror the x coordinate */
2415 @END
2418 /* Get the visible region of a window */
2419 @REQ(get_visible_region)
2420 user_handle_t window; /* handle to the window */
2421 unsigned int flags; /* DCX flags */
2422 @REPLY
2423 user_handle_t top_win; /* top window to clip against */
2424 rectangle_t top_rect; /* top window visible rect with screen coords */
2425 rectangle_t win_rect; /* window rect in screen coords */
2426 unsigned int paint_flags; /* paint flags (from SET_WINPOS_* flags) */
2427 data_size_t total_size; /* total size of the resulting region */
2428 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2429 @END
2432 /* Get the visible surface region of a window */
2433 @REQ(get_surface_region)
2434 user_handle_t window; /* handle to the window */
2435 @REPLY
2436 rectangle_t visible_rect; /* window visible rect in screen coords */
2437 data_size_t total_size; /* total size of the resulting region */
2438 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2439 @END
2442 /* Get the window region */
2443 @REQ(get_window_region)
2444 user_handle_t window; /* handle to the window */
2445 @REPLY
2446 data_size_t total_size; /* total size of the resulting region */
2447 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2448 @END
2451 /* Set the window region */
2452 @REQ(set_window_region)
2453 user_handle_t window; /* handle to the window */
2454 int redraw; /* redraw the window? */
2455 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2456 @END
2459 /* Get the window update region */
2460 @REQ(get_update_region)
2461 user_handle_t window; /* handle to the window */
2462 user_handle_t from_child; /* child to start searching from */
2463 unsigned int flags; /* update flags (see below) */
2464 @REPLY
2465 user_handle_t child; /* child to repaint (or window itself) */
2466 unsigned int flags; /* resulting update flags (see below) */
2467 data_size_t total_size; /* total size of the resulting region */
2468 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2469 @END
2470 #define UPDATE_NONCLIENT 0x001 /* get region for repainting non-client area */
2471 #define UPDATE_ERASE 0x002 /* get region for erasing client area */
2472 #define UPDATE_PAINT 0x004 /* get region for painting client area */
2473 #define UPDATE_INTERNALPAINT 0x008 /* get region if internal paint is pending */
2474 #define UPDATE_ALLCHILDREN 0x010 /* force repaint of all children */
2475 #define UPDATE_NOCHILDREN 0x020 /* don't try to repaint any children */
2476 #define UPDATE_NOREGION 0x040 /* don't return a region, only the flags */
2477 #define UPDATE_DELAYED_ERASE 0x080 /* still needs erase after BeginPaint */
2478 #define UPDATE_CLIPCHILDREN 0x100 /* remove clipped children from the update region */
2481 /* Update the z order of a window so that a given rectangle is fully visible */
2482 @REQ(update_window_zorder)
2483 user_handle_t window; /* handle to the window */
2484 rectangle_t rect; /* rectangle that must be visible (in client coords) */
2485 @END
2488 /* Mark parts of a window as needing a redraw */
2489 @REQ(redraw_window)
2490 user_handle_t window; /* handle to the window */
2491 unsigned int flags; /* RDW_* flags */
2492 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2493 @END
2496 /* Set a window property */
2497 @REQ(set_window_property)
2498 user_handle_t window; /* handle to the window */
2499 lparam_t data; /* data to store */
2500 atom_t atom; /* property atom (if no name specified) */
2501 VARARG(name,unicode_str); /* property name */
2502 @END
2505 /* Remove a window property */
2506 @REQ(remove_window_property)
2507 user_handle_t window; /* handle to the window */
2508 atom_t atom; /* property atom (if no name specified) */
2509 VARARG(name,unicode_str); /* property name */
2510 @REPLY
2511 lparam_t data; /* data stored in property */
2512 @END
2515 /* Get a window property */
2516 @REQ(get_window_property)
2517 user_handle_t window; /* handle to the window */
2518 atom_t atom; /* property atom (if no name specified) */
2519 VARARG(name,unicode_str); /* property name */
2520 @REPLY
2521 lparam_t data; /* data stored in property */
2522 @END
2525 /* Get the list of properties of a window */
2526 @REQ(get_window_properties)
2527 user_handle_t window; /* handle to the window */
2528 @REPLY
2529 int total; /* total number of properties */
2530 VARARG(props,properties); /* list of properties */
2531 @END
2534 /* Create a window station */
2535 @REQ(create_winstation)
2536 unsigned int flags; /* window station flags */
2537 unsigned int access; /* wanted access rights */
2538 unsigned int attributes; /* object attributes */
2539 obj_handle_t rootdir; /* root directory */
2540 VARARG(name,unicode_str); /* object name */
2541 @REPLY
2542 obj_handle_t handle; /* handle to the window station */
2543 @END
2546 /* Open a handle to a window station */
2547 @REQ(open_winstation)
2548 unsigned int access; /* wanted access rights */
2549 unsigned int attributes; /* object attributes */
2550 obj_handle_t rootdir; /* root directory */
2551 VARARG(name,unicode_str); /* object name */
2552 @REPLY
2553 obj_handle_t handle; /* handle to the window station */
2554 @END
2557 /* Close a window station */
2558 @REQ(close_winstation)
2559 obj_handle_t handle; /* handle to the window station */
2560 @END
2563 /* Get the process current window station */
2564 @REQ(get_process_winstation)
2565 @REPLY
2566 obj_handle_t handle; /* handle to the window station */
2567 @END
2570 /* Set the process current window station */
2571 @REQ(set_process_winstation)
2572 obj_handle_t handle; /* handle to the window station */
2573 @END
2576 /* Enumerate window stations */
2577 @REQ(enum_winstation)
2578 unsigned int index; /* current index */
2579 @REPLY
2580 unsigned int next; /* next index */
2581 VARARG(name,unicode_str); /* window station name */
2582 @END
2585 /* Create a desktop */
2586 @REQ(create_desktop)
2587 unsigned int flags; /* desktop flags */
2588 unsigned int access; /* wanted access rights */
2589 unsigned int attributes; /* object attributes */
2590 VARARG(name,unicode_str); /* object name */
2591 @REPLY
2592 obj_handle_t handle; /* handle to the desktop */
2593 @END
2596 /* Open a handle to a desktop */
2597 @REQ(open_desktop)
2598 obj_handle_t winsta; /* window station to open (null allowed) */
2599 unsigned int flags; /* desktop flags */
2600 unsigned int access; /* wanted access rights */
2601 unsigned int attributes; /* object attributes */
2602 VARARG(name,unicode_str); /* object name */
2603 @REPLY
2604 obj_handle_t handle; /* handle to the desktop */
2605 @END
2608 /* Open a handle to current input desktop */
2609 @REQ(open_input_desktop)
2610 unsigned int flags; /* desktop flags */
2611 unsigned int access; /* wanted access rights */
2612 unsigned int attributes; /* object attributes */
2613 @REPLY
2614 obj_handle_t handle; /* handle to the desktop */
2615 @END
2618 /* Close a desktop */
2619 @REQ(close_desktop)
2620 obj_handle_t handle; /* handle to the desktop */
2621 @END
2624 /* Get the thread current desktop */
2625 @REQ(get_thread_desktop)
2626 thread_id_t tid; /* thread id */
2627 @REPLY
2628 obj_handle_t handle; /* handle to the desktop */
2629 @END
2632 /* Set the thread current desktop */
2633 @REQ(set_thread_desktop)
2634 obj_handle_t handle; /* handle to the desktop */
2635 @END
2638 /* Enumerate desktops */
2639 @REQ(enum_desktop)
2640 obj_handle_t winstation; /* handle to the window station */
2641 unsigned int index; /* current index */
2642 @REPLY
2643 unsigned int next; /* next index */
2644 VARARG(name,unicode_str); /* window station name */
2645 @END
2648 /* Get/set information about a user object (window station or desktop) */
2649 @REQ(set_user_object_info)
2650 obj_handle_t handle; /* handle to the object */
2651 unsigned int flags; /* information to set/get */
2652 unsigned int obj_flags; /* new object flags */
2653 @REPLY
2654 int is_desktop; /* is object a desktop? */
2655 unsigned int old_obj_flags; /* old object flags */
2656 VARARG(name,unicode_str); /* object name */
2657 @END
2658 #define SET_USER_OBJECT_SET_FLAGS 1
2659 #define SET_USER_OBJECT_GET_FULL_NAME 2
2662 /* Register a hotkey */
2663 @REQ(register_hotkey)
2664 user_handle_t window; /* handle to the window */
2665 int id; /* hotkey identifier */
2666 unsigned int flags; /* modifier keys */
2667 unsigned int vkey; /* virtual key code */
2668 @REPLY
2669 int replaced; /* did we replace an existing hotkey? */
2670 unsigned int flags; /* flags of replaced hotkey */
2671 unsigned int vkey; /* virtual key code of replaced hotkey */
2672 @END
2675 /* Unregister a hotkey */
2676 @REQ(unregister_hotkey)
2677 user_handle_t window; /* handle to the window */
2678 int id; /* hotkey identifier */
2679 @REPLY
2680 unsigned int flags; /* flags of removed hotkey */
2681 unsigned int vkey; /* virtual key code of removed hotkey */
2682 @END
2685 /* Attach (or detach) thread inputs */
2686 @REQ(attach_thread_input)
2687 thread_id_t tid_from; /* thread to be attached */
2688 thread_id_t tid_to; /* thread to which tid_from should be attached */
2689 int attach; /* is it an attach? */
2690 @END
2693 /* Get input data for a given thread */
2694 @REQ(get_thread_input)
2695 thread_id_t tid; /* id of thread */
2696 @REPLY
2697 user_handle_t focus; /* handle to the focus window */
2698 user_handle_t capture; /* handle to the capture window */
2699 user_handle_t active; /* handle to the active window */
2700 user_handle_t foreground; /* handle to the global foreground window */
2701 user_handle_t menu_owner; /* handle to the menu owner */
2702 user_handle_t move_size; /* handle to the moving/resizing window */
2703 user_handle_t caret; /* handle to the caret window */
2704 user_handle_t cursor; /* handle to the cursor */
2705 int show_count; /* cursor show count */
2706 rectangle_t rect; /* caret rectangle */
2707 @END
2710 /* Get the time of the last input event */
2711 @REQ(get_last_input_time)
2712 @REPLY
2713 unsigned int time;
2714 @END
2717 /* Retrieve queue keyboard state for a given thread */
2718 @REQ(get_key_state)
2719 thread_id_t tid; /* id of thread */
2720 int key; /* optional key code or -1 */
2721 @REPLY
2722 unsigned char state; /* state of specified key */
2723 VARARG(keystate,bytes); /* state array for all the keys */
2724 @END
2726 /* Set queue keyboard state for a given thread */
2727 @REQ(set_key_state)
2728 thread_id_t tid; /* id of thread */
2729 int async; /* whether to change the async state too */
2730 VARARG(keystate,bytes); /* state array for all the keys */
2731 @END
2733 /* Set the system foreground window */
2734 @REQ(set_foreground_window)
2735 user_handle_t handle; /* handle to the foreground window */
2736 @REPLY
2737 user_handle_t previous; /* handle to the previous foreground window */
2738 int send_msg_old; /* whether we have to send a msg to the old window */
2739 int send_msg_new; /* whether we have to send a msg to the new window */
2740 @END
2742 /* Set the current thread focus window */
2743 @REQ(set_focus_window)
2744 user_handle_t handle; /* handle to the focus window */
2745 @REPLY
2746 user_handle_t previous; /* handle to the previous focus window */
2747 @END
2749 /* Set the current thread active window */
2750 @REQ(set_active_window)
2751 user_handle_t handle; /* handle to the active window */
2752 @REPLY
2753 user_handle_t previous; /* handle to the previous active window */
2754 @END
2756 /* Set the current thread capture window */
2757 @REQ(set_capture_window)
2758 user_handle_t handle; /* handle to the capture window */
2759 unsigned int flags; /* capture flags (see below) */
2760 @REPLY
2761 user_handle_t previous; /* handle to the previous capture window */
2762 user_handle_t full_handle; /* full 32-bit handle of new capture window */
2763 @END
2764 #define CAPTURE_MENU 0x01 /* capture is for a menu */
2765 #define CAPTURE_MOVESIZE 0x02 /* capture is for moving/resizing */
2768 /* Set the current thread caret window */
2769 @REQ(set_caret_window)
2770 user_handle_t handle; /* handle to the caret window */
2771 int width; /* caret width */
2772 int height; /* caret height */
2773 @REPLY
2774 user_handle_t previous; /* handle to the previous caret window */
2775 rectangle_t old_rect; /* previous caret rectangle */
2776 int old_hide; /* previous hide count */
2777 int old_state; /* previous caret state (1=on, 0=off) */
2778 @END
2781 /* Set the current thread caret information */
2782 @REQ(set_caret_info)
2783 unsigned int flags; /* caret flags (see below) */
2784 user_handle_t handle; /* handle to the caret window */
2785 int x; /* caret x position */
2786 int y; /* caret y position */
2787 int hide; /* increment for hide count (can be negative to show it) */
2788 int state; /* caret state (see below) */
2789 @REPLY
2790 user_handle_t full_handle; /* handle to the current caret window */
2791 rectangle_t old_rect; /* previous caret rectangle */
2792 int old_hide; /* previous hide count */
2793 int old_state; /* previous caret state (1=on, 0=off) */
2794 @END
2795 #define SET_CARET_POS 0x01 /* set the caret position from x,y */
2796 #define SET_CARET_HIDE 0x02 /* increment the caret hide count */
2797 #define SET_CARET_STATE 0x04 /* set the caret on/off state */
2798 enum caret_state
2800 CARET_STATE_OFF, /* off */
2801 CARET_STATE_ON, /* on */
2802 CARET_STATE_TOGGLE, /* toggle current state */
2803 CARET_STATE_ON_IF_MOVED /* on if the position differs, unchanged otherwise */
2807 /* Set a window hook */
2808 @REQ(set_hook)
2809 int id; /* id of the hook */
2810 process_id_t pid; /* id of process to set the hook into */
2811 thread_id_t tid; /* id of thread to set the hook into */
2812 int event_min;
2813 int event_max;
2814 client_ptr_t proc; /* hook procedure */
2815 int flags;
2816 int unicode; /* is it a unicode hook? */
2817 VARARG(module,unicode_str); /* module name */
2818 @REPLY
2819 user_handle_t handle; /* handle to the hook */
2820 unsigned int active_hooks; /* active hooks bitmap */
2821 @END
2824 /* Remove a window hook */
2825 @REQ(remove_hook)
2826 user_handle_t handle; /* handle to the hook */
2827 client_ptr_t proc; /* hook procedure if handle is 0 */
2828 int id; /* id of the hook if handle is 0 */
2829 @REPLY
2830 unsigned int active_hooks; /* active hooks bitmap */
2831 @END
2834 /* Start calling a hook chain */
2835 @REQ(start_hook_chain)
2836 int id; /* id of the hook */
2837 int event; /* signalled event */
2838 user_handle_t window; /* handle to the event window */
2839 int object_id; /* object id for out of context winevent */
2840 int child_id; /* child id for out of context winevent */
2841 @REPLY
2842 user_handle_t handle; /* handle to the next hook */
2843 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2844 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2845 int unicode; /* is it a unicode hook? */
2846 client_ptr_t proc; /* hook procedure */
2847 unsigned int active_hooks; /* active hooks bitmap */
2848 VARARG(module,unicode_str); /* module name */
2849 @END
2852 /* Finished calling a hook chain */
2853 @REQ(finish_hook_chain)
2854 int id; /* id of the hook */
2855 @END
2858 /* Get the hook information */
2859 @REQ(get_hook_info)
2860 user_handle_t handle; /* handle to the current hook */
2861 int get_next; /* do we want info about current or next hook? */
2862 int event; /* signalled event */
2863 user_handle_t window; /* handle to the event window */
2864 int object_id; /* object id for out of context winevent */
2865 int child_id; /* child id for out of context winevent */
2866 @REPLY
2867 user_handle_t handle; /* handle to the hook */
2868 int id; /* id of the hook */
2869 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2870 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2871 client_ptr_t proc; /* hook procedure */
2872 int unicode; /* is it a unicode hook? */
2873 VARARG(module,unicode_str); /* module name */
2874 @END
2877 /* Create a window class */
2878 @REQ(create_class)
2879 int local; /* is it a local class? */
2880 atom_t atom; /* class atom */
2881 unsigned int style; /* class style */
2882 mod_handle_t instance; /* module instance */
2883 int extra; /* number of extra class bytes */
2884 int win_extra; /* number of window extra bytes */
2885 client_ptr_t client_ptr; /* pointer to class in client address space */
2886 data_size_t name_offset; /* base class name offset for specified atom */
2887 VARARG(name,unicode_str); /* class name */
2888 @REPLY
2889 atom_t atom; /* resulting class atom */
2890 @END
2893 /* Destroy a window class */
2894 @REQ(destroy_class)
2895 atom_t atom; /* class atom */
2896 mod_handle_t instance; /* module instance */
2897 VARARG(name,unicode_str); /* class name */
2898 @REPLY
2899 client_ptr_t client_ptr; /* pointer to class in client address space */
2900 @END
2903 /* Set some information in a class */
2904 @REQ(set_class_info)
2905 user_handle_t window; /* handle to the window */
2906 unsigned int flags; /* flags for info to set (see below) */
2907 atom_t atom; /* class atom */
2908 unsigned int style; /* class style */
2909 int win_extra; /* number of window extra bytes */
2910 mod_handle_t instance; /* module instance */
2911 int extra_offset; /* offset to set in extra bytes */
2912 data_size_t extra_size; /* size to set in extra bytes */
2913 lparam_t extra_value; /* value to set in extra bytes */
2914 @REPLY
2915 atom_t old_atom; /* previous class atom */
2916 atom_t base_atom; /* base class atom */
2917 mod_handle_t old_instance; /* previous module instance */
2918 lparam_t old_extra_value; /* old value in extra bytes */
2919 unsigned int old_style; /* previous class style */
2920 int old_extra; /* previous number of class extra bytes */
2921 int old_win_extra; /* previous number of window extra bytes */
2922 @END
2923 #define SET_CLASS_ATOM 0x0001
2924 #define SET_CLASS_STYLE 0x0002
2925 #define SET_CLASS_WINEXTRA 0x0004
2926 #define SET_CLASS_INSTANCE 0x0008
2927 #define SET_CLASS_EXTRA 0x0010
2930 /* Open the clipboard */
2931 @REQ(open_clipboard)
2932 user_handle_t window; /* clipboard window */
2933 @REPLY
2934 user_handle_t owner; /* current clipboard owner */
2935 @END
2938 /* Close the clipboard */
2939 @REQ(close_clipboard)
2940 @REPLY
2941 user_handle_t viewer; /* first clipboard viewer */
2942 user_handle_t owner; /* current clipboard owner */
2943 @END
2946 /* Empty the clipboard and grab ownership */
2947 @REQ(empty_clipboard)
2948 @END
2951 /* Add a data format to the clipboard */
2952 @REQ(set_clipboard_data)
2953 unsigned int format; /* clipboard format of the data */
2954 unsigned int lcid; /* locale id to use for synthesizing text formats */
2955 VARARG(data,bytes); /* data contents */
2956 @REPLY
2957 unsigned int seqno; /* sequence number for the set data */
2958 @END
2961 /* Fetch a data format from the clipboard */
2962 @REQ(get_clipboard_data)
2963 unsigned int format; /* clipboard format of the data */
2964 int render; /* will we try to render it if missing? */
2965 int cached; /* do we already have it in the client-side cache? */
2966 unsigned int seqno; /* sequence number for the data in the cache */
2967 @REPLY
2968 unsigned int from; /* for synthesized data, format to generate it from */
2969 user_handle_t owner; /* clipboard owner for delayed-rendered formats */
2970 unsigned int seqno; /* sequence number for the originally set data */
2971 data_size_t total; /* total data size */
2972 VARARG(data,bytes); /* data contents */
2973 @END
2976 /* Retrieve a list of available formats */
2977 @REQ(get_clipboard_formats)
2978 unsigned int format; /* specific format to query, return all if 0 */
2979 @REPLY
2980 unsigned int count; /* count of available formats */
2981 VARARG(formats,uints); /* array of available formats */
2982 @END
2985 /* Retrieve the next available format */
2986 @REQ(enum_clipboard_formats)
2987 unsigned int previous; /* previous format, or first if 0 */
2988 @REPLY
2989 unsigned int format; /* next format */
2990 @END
2993 /* Release ownership of the clipboard */
2994 @REQ(release_clipboard)
2995 user_handle_t owner; /* clipboard owner to release */
2996 @REPLY
2997 user_handle_t viewer; /* first clipboard viewer */
2998 user_handle_t owner; /* current clipboard owner */
2999 @END
3002 /* Get clipboard information */
3003 @REQ(get_clipboard_info)
3004 @REPLY
3005 user_handle_t window; /* clipboard window */
3006 user_handle_t owner; /* clipboard owner */
3007 user_handle_t viewer; /* clipboard viewer */
3008 unsigned int seqno; /* current sequence number */
3009 @END
3012 /* Set the clipboard viewer window */
3013 @REQ(set_clipboard_viewer)
3014 user_handle_t viewer; /* clipboard viewer */
3015 user_handle_t previous; /* if non-zero, check that this was the previous viewer */
3016 @REPLY
3017 user_handle_t old_viewer; /* previous clipboard viewer */
3018 user_handle_t owner; /* clipboard owner */
3019 @END
3022 /* Add a clipboard listener window */
3023 @REQ(add_clipboard_listener)
3024 user_handle_t window; /* clipboard listener window */
3025 @END
3028 /* Remove a clipboard listener window */
3029 @REQ(remove_clipboard_listener)
3030 user_handle_t window; /* clipboard listener window */
3031 @END
3034 /* Open a security token */
3035 @REQ(open_token)
3036 obj_handle_t handle; /* handle to the thread or process */
3037 unsigned int access; /* access rights to the new token */
3038 unsigned int attributes;/* object attributes */
3039 unsigned int flags; /* flags (see below) */
3040 @REPLY
3041 obj_handle_t token; /* handle to the token */
3042 @END
3043 #define OPEN_TOKEN_THREAD 1
3044 #define OPEN_TOKEN_AS_SELF 2
3047 /* Set/get the global windows */
3048 @REQ(set_global_windows)
3049 unsigned int flags; /* flags for fields to set (see below) */
3050 user_handle_t shell_window; /* handle to the new shell window */
3051 user_handle_t shell_listview; /* handle to the new shell listview window */
3052 user_handle_t progman_window; /* handle to the new program manager window */
3053 user_handle_t taskman_window; /* handle to the new task manager window */
3054 @REPLY
3055 user_handle_t old_shell_window; /* handle to the shell window */
3056 user_handle_t old_shell_listview; /* handle to the shell listview window */
3057 user_handle_t old_progman_window; /* handle to the new program manager window */
3058 user_handle_t old_taskman_window; /* handle to the new task manager window */
3059 @END
3060 #define SET_GLOBAL_SHELL_WINDOWS 0x01 /* set both main shell and listview windows */
3061 #define SET_GLOBAL_PROGMAN_WINDOW 0x02
3062 #define SET_GLOBAL_TASKMAN_WINDOW 0x04
3064 /* Adjust the privileges held by a token */
3065 @REQ(adjust_token_privileges)
3066 obj_handle_t handle; /* handle to the token */
3067 int disable_all; /* disable all privileges? */
3068 int get_modified_state; /* get modified privileges? */
3069 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to enable/disable/remove */
3070 @REPLY
3071 unsigned int len; /* total length in bytes required to store token privileges */
3072 VARARG(privileges,LUID_AND_ATTRIBUTES); /* modified privileges */
3073 @END
3075 /* Retrieves the set of privileges held by or available to a token */
3076 @REQ(get_token_privileges)
3077 obj_handle_t handle; /* handle to the token */
3078 @REPLY
3079 unsigned int len; /* total length in bytes required to store token privileges */
3080 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
3081 @END
3083 /* Check the token has the required privileges */
3084 @REQ(check_token_privileges)
3085 obj_handle_t handle; /* handle to the token */
3086 int all_required; /* are all the privileges required for the check to succeed? */
3087 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to check */
3088 @REPLY
3089 int has_privileges; /* does the token have the required privileges? */
3090 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
3091 @END
3093 @REQ(duplicate_token)
3094 obj_handle_t handle; /* handle to the token to duplicate */
3095 unsigned int access; /* access rights to the new token */
3096 int primary; /* is the new token to be a primary one? */
3097 int impersonation_level; /* impersonation level of the new token */
3098 VARARG(objattr,object_attributes); /* object attributes */
3099 @REPLY
3100 obj_handle_t new_handle; /* duplicated handle */
3101 @END
3103 @REQ(filter_token)
3104 obj_handle_t handle; /* handle to the token to duplicate */
3105 unsigned int flags; /* flags */
3106 data_size_t privileges_size; /* size of privileges */
3107 VARARG(privileges,LUID_AND_ATTRIBUTES,privileges_size); /* privileges to remove from new token */
3108 VARARG(disable_sids,SID); /* array of groups to remove from new token */
3109 @REPLY
3110 obj_handle_t new_handle; /* filtered handle */
3111 @END
3113 @REQ(access_check)
3114 obj_handle_t handle; /* handle to the token */
3115 unsigned int desired_access; /* desired access to the object */
3116 unsigned int mapping_read; /* mapping from generic read to specific rights */
3117 unsigned int mapping_write; /* mapping from generic write to specific rights */
3118 unsigned int mapping_execute; /* mapping from generic execute to specific rights */
3119 unsigned int mapping_all; /* mapping from generic all to specific rights */
3120 VARARG(sd,security_descriptor); /* security descriptor to check */
3121 @REPLY
3122 unsigned int access_granted; /* access rights actually granted */
3123 unsigned int access_status; /* was access granted? */
3124 unsigned int privileges_len; /* length needed to store privileges */
3125 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges used during access check */
3126 @END
3128 @REQ(get_token_sid)
3129 obj_handle_t handle; /* handle to the token */
3130 unsigned int which_sid; /* which SID to retrieve from the token */
3131 @REPLY
3132 data_size_t sid_len; /* length needed to store sid */
3133 VARARG(sid,SID); /* the sid specified by which_sid from the token */
3134 @END
3136 @REQ(get_token_groups)
3137 obj_handle_t handle; /* handle to the token */
3138 @REPLY
3139 data_size_t user_len; /* length needed to store user */
3140 VARARG(user,token_groups); /* groups the token's user belongs to */
3141 @END
3143 @REQ(get_token_default_dacl)
3144 obj_handle_t handle; /* handle to the token */
3145 @REPLY
3146 data_size_t acl_len; /* length needed to store access control list */
3147 VARARG(acl,ACL); /* access control list */
3148 @END
3150 @REQ(set_token_default_dacl)
3151 obj_handle_t handle; /* handle to the token */
3152 VARARG(acl,ACL); /* default dacl to set */
3153 @END
3155 @REQ(set_security_object)
3156 obj_handle_t handle; /* handle to the object */
3157 unsigned int security_info; /* which parts of security descriptor to set */
3158 VARARG(sd,security_descriptor); /* security descriptor to set */
3159 @END
3161 @REQ(get_security_object)
3162 obj_handle_t handle; /* handle to the object */
3163 unsigned int security_info; /* which parts of security descriptor to get */
3164 @REPLY
3165 unsigned int sd_len; /* buffer size needed for sd */
3166 VARARG(sd,security_descriptor); /* retrieved security descriptor */
3167 @END
3170 struct handle_info
3172 process_id_t owner;
3173 obj_handle_t handle;
3174 unsigned int access;
3177 /* Return a list of all opened handles */
3178 @REQ(get_system_handles)
3179 @REPLY
3180 unsigned int count; /* number of handles */
3181 VARARG(data,handle_infos); /* array of handle_infos */
3182 @END
3185 /* Create a mailslot */
3186 @REQ(create_mailslot)
3187 unsigned int access; /* wanted access rights */
3188 timeout_t read_timeout;
3189 unsigned int max_msgsize;
3190 VARARG(objattr,object_attributes); /* object attributes */
3191 @REPLY
3192 obj_handle_t handle; /* handle to the mailslot */
3193 @END
3196 /* Set mailslot information */
3197 @REQ(set_mailslot_info)
3198 obj_handle_t handle; /* handle to the mailslot */
3199 timeout_t read_timeout;
3200 unsigned int flags;
3201 @REPLY
3202 timeout_t read_timeout;
3203 unsigned int max_msgsize;
3204 @END
3205 #define MAILSLOT_SET_READ_TIMEOUT 1
3208 /* Create a directory object */
3209 @REQ(create_directory)
3210 unsigned int access; /* access flags */
3211 VARARG(objattr,object_attributes); /* object attributes */
3212 @REPLY
3213 obj_handle_t handle; /* handle to the directory */
3214 @END
3217 /* Open a directory object */
3218 @REQ(open_directory)
3219 unsigned int access; /* access flags */
3220 unsigned int attributes; /* object attributes */
3221 obj_handle_t rootdir; /* root directory */
3222 VARARG(directory_name,unicode_str); /* Directory name */
3223 @REPLY
3224 obj_handle_t handle; /* handle to the directory */
3225 @END
3228 /* Get a directory entry by index */
3229 @REQ(get_directory_entry)
3230 obj_handle_t handle; /* handle to the directory */
3231 unsigned int index; /* entry index */
3232 @REPLY
3233 data_size_t name_len; /* length of the entry name in bytes */
3234 VARARG(name,unicode_str,name_len); /* entry name */
3235 VARARG(type,unicode_str); /* entry type */
3236 @END
3239 /* Create a symbolic link object */
3240 @REQ(create_symlink)
3241 unsigned int access; /* access flags */
3242 VARARG(objattr,object_attributes); /* object attributes */
3243 VARARG(target_name,unicode_str); /* target name */
3244 @REPLY
3245 obj_handle_t handle; /* handle to the symlink */
3246 @END
3249 /* Open a symbolic link object */
3250 @REQ(open_symlink)
3251 unsigned int access; /* access flags */
3252 unsigned int attributes; /* object attributes */
3253 obj_handle_t rootdir; /* root directory */
3254 VARARG(name,unicode_str); /* symlink name */
3255 @REPLY
3256 obj_handle_t handle; /* handle to the symlink */
3257 @END
3260 /* Query a symbolic link object */
3261 @REQ(query_symlink)
3262 obj_handle_t handle; /* handle to the symlink */
3263 @REPLY
3264 data_size_t total; /* total needed size for name */
3265 VARARG(target_name,unicode_str); /* target name */
3266 @END
3269 /* Query basic object information */
3270 @REQ(get_object_info)
3271 obj_handle_t handle; /* handle to the object */
3272 @REPLY
3273 unsigned int access; /* granted access mask */
3274 unsigned int ref_count; /* object ref count */
3275 unsigned int handle_count; /* object handle count */
3276 data_size_t total; /* total needed size for name */
3277 VARARG(name,unicode_str); /* object name */
3278 @END
3281 /* Query object type name information */
3282 @REQ(get_object_type)
3283 obj_handle_t handle; /* handle to the object */
3284 @REPLY
3285 data_size_t total; /* needed size for type name */
3286 VARARG(type,unicode_str); /* type name */
3287 @END
3290 /* Query the impersonation level of an impersonation token */
3291 @REQ(get_token_impersonation_level)
3292 obj_handle_t handle; /* handle to the object */
3293 @REPLY
3294 int impersonation_level; /* impersonation level of the impersonation token */
3295 @END
3297 /* Allocate a locally-unique identifier */
3298 @REQ(allocate_locally_unique_id)
3299 @REPLY
3300 luid_t luid;
3301 @END
3304 /* Create a device manager */
3305 @REQ(create_device_manager)
3306 unsigned int access; /* wanted access rights */
3307 unsigned int attributes; /* object attributes */
3308 @REPLY
3309 obj_handle_t handle; /* handle to the device */
3310 @END
3313 /* Create a device */
3314 @REQ(create_device)
3315 obj_handle_t rootdir; /* root directory */
3316 client_ptr_t user_ptr; /* opaque ptr for use by client */
3317 obj_handle_t manager; /* device manager */
3318 VARARG(name,unicode_str); /* object name */
3319 @END
3322 /* Delete a device */
3323 @REQ(delete_device)
3324 obj_handle_t manager; /* handle to the device manager */
3325 client_ptr_t device; /* pointer to the device */
3326 @END
3329 /* Retrieve the next pending device irp request */
3330 @REQ(get_next_device_request)
3331 obj_handle_t manager; /* handle to the device manager */
3332 obj_handle_t prev; /* handle to the previous irp */
3333 unsigned int status; /* status of the previous irp */
3334 client_ptr_t user_ptr; /* user pointer of the previous irp */
3335 @REPLY
3336 irp_params_t params; /* irp parameters */
3337 obj_handle_t next; /* handle to the next irp */
3338 thread_id_t client_tid; /* tid of thread calling irp */
3339 client_ptr_t client_thread; /* pointer to thread object of calling irp */
3340 data_size_t in_size; /* total needed input size */
3341 VARARG(next_data,bytes); /* input data of the next irp */
3342 @END
3345 /* Get kernel pointer from server object */
3346 @REQ(get_kernel_object_ptr)
3347 obj_handle_t manager; /* handle to the device manager */
3348 obj_handle_t handle; /* object handle */
3349 @REPLY
3350 client_ptr_t user_ptr; /* kernel object pointer */
3351 @END
3354 /* Associate kernel pointer with server object */
3355 @REQ(set_kernel_object_ptr)
3356 obj_handle_t manager; /* handle to the device manager */
3357 obj_handle_t handle; /* object handle */
3358 client_ptr_t user_ptr; /* kernel object pointer */
3359 @END
3362 /* Grab server object reference from kernel object pointer */
3363 @REQ(grab_kernel_object)
3364 obj_handle_t manager; /* handle to the device manager */
3365 client_ptr_t user_ptr; /* kernel object pointer */
3366 @END
3369 /* Release server object reference from kernel object pointer */
3370 @REQ(release_kernel_object)
3371 obj_handle_t manager; /* handle to the device manager */
3372 client_ptr_t user_ptr; /* kernel object pointer */
3373 @END
3376 /* Get handle from kernel object pointer */
3377 @REQ(get_kernel_object_handle)
3378 obj_handle_t manager; /* handle to the device manager */
3379 client_ptr_t user_ptr; /* kernel object pointer */
3380 unsigned int access; /* wanted access rights */
3381 @REPLY
3382 obj_handle_t handle; /* kernel object handle */
3383 @END
3386 /* Make the current process a system process */
3387 @REQ(make_process_system)
3388 @REPLY
3389 obj_handle_t event; /* event signaled when all user processes have exited */
3390 @END
3393 /* Get detailed fixed-size information about a token */
3394 @REQ(get_token_statistics)
3395 obj_handle_t handle; /* handle to the object */
3396 @REPLY
3397 luid_t token_id; /* locally-unique identifier of the token */
3398 luid_t modified_id; /* locally-unique identifier of the modified version of the token */
3399 int primary; /* is the token primary or impersonation? */
3400 int impersonation_level; /* level of impersonation */
3401 int group_count; /* the number of groups the token is a member of */
3402 int privilege_count; /* the number of privileges the token has */
3403 @END
3406 /* Create I/O completion port */
3407 @REQ(create_completion)
3408 unsigned int access; /* desired access to a port */
3409 unsigned int concurrent; /* max number of concurrent active threads */
3410 VARARG(objattr,object_attributes); /* object attributes */
3411 @REPLY
3412 obj_handle_t handle; /* port handle */
3413 @END
3416 /* Open I/O completion port */
3417 @REQ(open_completion)
3418 unsigned int access; /* desired access to a port */
3419 unsigned int attributes; /* object attributes */
3420 obj_handle_t rootdir; /* root directory */
3421 VARARG(filename,unicode_str); /* port name */
3422 @REPLY
3423 obj_handle_t handle; /* port handle */
3424 @END
3427 /* add completion to completion port */
3428 @REQ(add_completion)
3429 obj_handle_t handle; /* port handle */
3430 apc_param_t ckey; /* completion key */
3431 apc_param_t cvalue; /* completion value */
3432 apc_param_t information; /* IO_STATUS_BLOCK Information */
3433 unsigned int status; /* completion result */
3434 @END
3437 /* get completion from completion port queue */
3438 @REQ(remove_completion)
3439 obj_handle_t handle; /* port handle */
3440 @REPLY
3441 apc_param_t ckey; /* completion key */
3442 apc_param_t cvalue; /* completion value */
3443 apc_param_t information; /* IO_STATUS_BLOCK Information */
3444 unsigned int status; /* completion result */
3445 @END
3448 /* get completion queue depth */
3449 @REQ(query_completion)
3450 obj_handle_t handle; /* port handle */
3451 @REPLY
3452 unsigned int depth; /* completion queue depth */
3453 @END
3456 /* associate object with completion port */
3457 @REQ(set_completion_info)
3458 obj_handle_t handle; /* object handle */
3459 apc_param_t ckey; /* completion key */
3460 obj_handle_t chandle; /* port handle */
3461 @END
3464 /* check for associated completion and push msg */
3465 @REQ(add_fd_completion)
3466 obj_handle_t handle; /* async' object */
3467 apc_param_t cvalue; /* completion value */
3468 apc_param_t information; /* IO_STATUS_BLOCK Information */
3469 unsigned int status; /* completion status */
3470 int async; /* completion is an async result */
3471 @END
3474 /* set fd completion information */
3475 @REQ(set_fd_completion_mode)
3476 obj_handle_t handle; /* handle to a file or directory */
3477 unsigned int flags; /* completion notification flags */
3478 @END
3481 /* set fd disposition information */
3482 @REQ(set_fd_disp_info)
3483 obj_handle_t handle; /* handle to a file or directory */
3484 int unlink; /* whether to unlink file on close */
3485 @END
3488 /* set fd name information */
3489 @REQ(set_fd_name_info)
3490 obj_handle_t handle; /* handle to a file or directory */
3491 obj_handle_t rootdir; /* root directory */
3492 int link; /* link instead of renaming */
3493 int replace; /* replace an existing file? */
3494 VARARG(filename,string); /* new file name */
3495 @END
3498 /* Retrieve layered info for a window */
3499 @REQ(get_window_layered_info)
3500 user_handle_t handle; /* handle to the window */
3501 @REPLY
3502 unsigned int color_key; /* color key */
3503 unsigned int alpha; /* alpha (0..255) */
3504 unsigned int flags; /* LWA_* flags */
3505 @END
3508 /* Set layered info for a window */
3509 @REQ(set_window_layered_info)
3510 user_handle_t handle; /* handle to the window */
3511 unsigned int color_key; /* color key */
3512 unsigned int alpha; /* alpha (0..255) */
3513 unsigned int flags; /* LWA_* flags */
3514 @END
3517 /* Allocate an arbitrary user handle */
3518 @REQ(alloc_user_handle)
3519 @REPLY
3520 user_handle_t handle; /* allocated handle */
3521 @END
3524 /* Free an arbitrary user handle */
3525 @REQ(free_user_handle)
3526 user_handle_t handle; /* handle to free*/
3527 @END
3530 /* Set/get the current cursor */
3531 @REQ(set_cursor)
3532 unsigned int flags; /* flags for fields to set (see below) */
3533 user_handle_t handle; /* handle to the cursor */
3534 int show_count; /* show count increment/decrement */
3535 int x; /* cursor position */
3536 int y;
3537 rectangle_t clip; /* cursor clip rectangle */
3538 unsigned int clip_msg; /* message to post on cursor clip changes */
3539 @REPLY
3540 user_handle_t prev_handle; /* previous handle */
3541 int prev_count; /* previous show count */
3542 int prev_x; /* previous position */
3543 int prev_y;
3544 int new_x; /* new position */
3545 int new_y;
3546 rectangle_t new_clip; /* new clip rectangle */
3547 unsigned int last_change; /* time of last position change */
3548 @END
3549 #define SET_CURSOR_HANDLE 0x01
3550 #define SET_CURSOR_COUNT 0x02
3551 #define SET_CURSOR_POS 0x04
3552 #define SET_CURSOR_CLIP 0x08
3553 #define SET_CURSOR_NOCLIP 0x10
3555 /* Get the history of the 64 last cursor positions */
3556 @REQ(get_cursor_history)
3557 @REPLY
3558 VARARG(history,cursor_positions);
3559 @END
3562 /* Batch read rawinput message data */
3563 @REQ(get_rawinput_buffer)
3564 data_size_t rawinput_size; /* size of RAWINPUT structure */
3565 data_size_t buffer_size; /* size of output buffer */
3566 @REPLY
3567 data_size_t next_size; /* minimum size to get next message data */
3568 unsigned int count;
3569 VARARG(data,bytes);
3570 @END
3572 /* Modify the list of registered rawinput devices */
3573 @REQ(update_rawinput_devices)
3574 VARARG(devices,rawinput_devices);
3575 @END
3577 /* Retrieve the list of registered rawinput devices */
3578 @REQ(get_rawinput_devices)
3579 @REPLY
3580 unsigned int device_count;
3581 VARARG(devices,rawinput_devices);
3582 @END
3584 /* Create a new job object */
3585 @REQ(create_job)
3586 unsigned int access; /* wanted access rights */
3587 VARARG(objattr,object_attributes); /* object attributes */
3588 @REPLY
3589 obj_handle_t handle; /* handle to the job */
3590 @END
3593 /* Open a job object */
3594 @REQ(open_job)
3595 unsigned int access; /* wanted access rights */
3596 unsigned int attributes; /* object attributes */
3597 obj_handle_t rootdir; /* root directory */
3598 VARARG(name,unicode_str); /* object name */
3599 @REPLY
3600 obj_handle_t handle; /* handle to the job */
3601 @END
3604 /* Assign a job object to a process */
3605 @REQ(assign_job)
3606 obj_handle_t job; /* handle to the job */
3607 obj_handle_t process; /* handle to the process */
3608 @END
3611 /* Check if a process is associated with a job */
3612 @REQ(process_in_job)
3613 obj_handle_t job; /* handle to the job */
3614 obj_handle_t process; /* handle to the process */
3615 @END
3618 /* Set limit flags on a job */
3619 @REQ(set_job_limits)
3620 obj_handle_t handle; /* handle to the job */
3621 unsigned int limit_flags; /* new limit flags */
3622 @END
3625 /* Set new completion port for a job */
3626 @REQ(set_job_completion_port)
3627 obj_handle_t job; /* handle to the job */
3628 obj_handle_t port; /* handle to the completion port */
3629 client_ptr_t key; /* key to send with completion messages */
3630 @END
3633 /* Retrieve information about a job */
3634 @REQ(get_job_info)
3635 obj_handle_t handle; /* handle to the job */
3636 @REPLY
3637 int total_processes; /* total count of processes */
3638 int active_processes; /* count of running processes */
3639 @END
3642 /* Terminate all processes associated with the job */
3643 @REQ(terminate_job)
3644 obj_handle_t handle; /* handle to the job */
3645 int status; /* process exit code */
3646 @END
3649 /* Suspend a process */
3650 @REQ(suspend_process)
3651 obj_handle_t handle; /* process handle */
3652 @END
3655 /* Resume a process */
3656 @REQ(resume_process)
3657 obj_handle_t handle; /* process handle */
3658 @END