mshtml: Use Gecko attributes for getAttribute, setAttribute and removeAttribute imple...
[wine.git] / server / protocol.def
blob7c22faef7940623d24c82151d08d865b034f9c6b
1 /* -*- C -*-
3 * Wine server protocol definition
5 * Copyright (C) 2001 Alexandre Julliard
7 * This file is used by tools/make_requests to build the
8 * protocol structures in include/wine/server_protocol.h
10 * This library is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU Lesser General Public
12 * License as published by the Free Software Foundation; either
13 * version 2.1 of the License, or (at your option) any later version.
15 * This library is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 * Lesser General Public License for more details.
20 * You should have received a copy of the GNU Lesser General Public
21 * License along with this library; if not, write to the Free Software
22 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
25 @HEADER /* start of C declarations */
27 #include <stdarg.h>
28 #include <stdlib.h>
29 #include <time.h>
31 #include <windef.h>
32 #include <winbase.h>
34 typedef unsigned int obj_handle_t;
35 typedef unsigned int user_handle_t;
36 typedef unsigned int atom_t;
37 typedef unsigned int process_id_t;
38 typedef unsigned int thread_id_t;
39 typedef unsigned int data_size_t;
40 typedef unsigned int ioctl_code_t;
41 typedef unsigned __int64 lparam_t;
42 typedef unsigned __int64 apc_param_t;
43 typedef unsigned __int64 mem_size_t;
44 typedef unsigned __int64 file_pos_t;
45 typedef unsigned __int64 client_ptr_t;
46 typedef unsigned __int64 affinity_t;
47 typedef client_ptr_t mod_handle_t;
49 struct request_header
51 int req; /* request code */
52 data_size_t request_size; /* request variable part size */
53 data_size_t reply_size; /* reply variable part maximum size */
56 struct reply_header
58 unsigned int error; /* error result */
59 data_size_t reply_size; /* reply variable part size */
62 /* placeholder structure for the maximum allowed request size */
63 /* this is used to construct the generic_request union */
64 struct request_max_size
66 int pad[16]; /* the max request size is 16 ints */
69 #define FIRST_USER_HANDLE 0x0020 /* first possible value for low word of user handle */
70 #define LAST_USER_HANDLE 0xffef /* last possible value for low word of user handle */
73 /* debug event data */
74 typedef union
76 int code; /* event code */
77 struct
79 int code; /* DbgExceptionStateChange */
80 int first; /* first chance exception? */
81 unsigned int exc_code; /* exception code */
82 unsigned int flags; /* exception flags */
83 client_ptr_t record; /* exception record */
84 client_ptr_t address; /* exception address */
85 int nb_params; /* number of parameters */
86 int __pad;
87 client_ptr_t params[15]; /* parameters */
88 } exception;
89 struct
91 int code; /* DbgCreateThreadStateChange */
92 obj_handle_t handle; /* handle to the new thread */
93 client_ptr_t start; /* thread startup routine */
94 } create_thread;
95 struct
97 int code; /* DbgCreateProcessStateChange */
98 obj_handle_t file; /* handle to the process exe file */
99 obj_handle_t process; /* handle to the new process */
100 obj_handle_t thread; /* handle to the new thread */
101 mod_handle_t base; /* base of executable image */
102 int dbg_offset; /* offset of debug info in file */
103 int dbg_size; /* size of debug info */
104 client_ptr_t start; /* thread startup routine */
105 } create_process;
106 struct
108 int code; /* DbgExitThreadStateChange/DbgExitProcessStateChange */
109 int exit_code; /* thread or process exit code */
110 } exit;
111 struct
113 int code; /* DbgLoadDllStateChange */
114 obj_handle_t handle; /* file handle for the dll */
115 mod_handle_t base; /* base address of the dll */
116 int dbg_offset; /* offset of debug info in file */
117 int dbg_size; /* size of debug info */
118 client_ptr_t name; /* image name (optional) */
119 } load_dll;
120 struct
122 int code; /* DbgUnloadDllStateChange */
123 int __pad;
124 mod_handle_t base; /* base address of the dll */
125 } unload_dll;
126 } debug_event_t;
128 /* supported CPU types */
129 enum cpu_type
131 CPU_x86, CPU_x86_64, CPU_ARM, CPU_ARM64
133 typedef int client_cpu_t;
135 /* context data */
136 typedef struct
138 client_cpu_t cpu; /* cpu type */
139 unsigned int flags; /* SERVER_CTX_* flags */
140 union
142 struct { unsigned int eip, ebp, esp, eflags, cs, ss; } i386_regs;
143 struct { unsigned __int64 rip, rbp, rsp;
144 unsigned int cs, ss, flags, __pad; } x86_64_regs;
145 struct { unsigned int sp, lr, pc, cpsr; } arm_regs;
146 struct { unsigned __int64 sp, pc, pstate; } arm64_regs;
147 } ctl; /* selected by SERVER_CTX_CONTROL */
148 union
150 struct { unsigned int eax, ebx, ecx, edx, esi, edi; } i386_regs;
151 struct { unsigned __int64 rax,rbx, rcx, rdx, rsi, rdi,
152 r8, r9, r10, r11, r12, r13, r14, r15; } x86_64_regs;
153 struct { unsigned int r[13]; } arm_regs;
154 struct { unsigned __int64 x[31]; } arm64_regs;
155 } integer; /* selected by SERVER_CTX_INTEGER */
156 union
158 struct { unsigned int ds, es, fs, gs; } i386_regs;
159 struct { unsigned int ds, es, fs, gs; } x86_64_regs;
160 } seg; /* selected by SERVER_CTX_SEGMENTS */
161 union
163 struct { unsigned int ctrl, status, tag, err_off, err_sel, data_off, data_sel, cr0npx;
164 unsigned char regs[80]; } i386_regs;
165 struct { struct { unsigned __int64 low, high; } fpregs[32]; } x86_64_regs;
166 struct { unsigned __int64 d[32]; unsigned int fpscr; } arm_regs;
167 struct { struct { unsigned __int64 low, high; } q[32]; unsigned int fpcr, fpsr; } arm64_regs;
168 } fp; /* selected by SERVER_CTX_FLOATING_POINT */
169 union
171 struct { unsigned int dr0, dr1, dr2, dr3, dr6, dr7; } i386_regs;
172 struct { unsigned __int64 dr0, dr1, dr2, dr3, dr6, dr7; } x86_64_regs;
173 struct { unsigned int bvr[8], bcr[8], wvr[1], wcr[1]; } arm_regs;
174 struct { unsigned __int64 bvr[8], wvr[2]; unsigned int bcr[8], wcr[2]; } arm64_regs;
175 } debug; /* selected by SERVER_CTX_DEBUG_REGISTERS */
176 union
178 unsigned char i386_regs[512];
179 } ext; /* selected by SERVER_CTX_EXTENDED_REGISTERS */
180 union
182 struct { struct { unsigned __int64 low, high; } ymm_high[16]; } ymm_high_regs;
183 } ymm; /* selected by SERVER_CTX_YMM_REGISTERS */
184 } context_t;
186 #define SERVER_CTX_CONTROL 0x01
187 #define SERVER_CTX_INTEGER 0x02
188 #define SERVER_CTX_SEGMENTS 0x04
189 #define SERVER_CTX_FLOATING_POINT 0x08
190 #define SERVER_CTX_DEBUG_REGISTERS 0x10
191 #define SERVER_CTX_EXTENDED_REGISTERS 0x20
192 #define SERVER_CTX_YMM_REGISTERS 0x40
194 /* structure used in sending an fd from client to server */
195 struct send_fd
197 thread_id_t tid; /* thread id */
198 int fd; /* file descriptor on client-side */
201 /* structure sent by the server on the wait fifo */
202 struct wake_up_reply
204 client_ptr_t cookie; /* magic cookie that was passed in select_request */
205 int signaled; /* wait result */
206 int __pad;
209 /* NT-style timeout, in 100ns units, negative means relative timeout */
210 typedef __int64 timeout_t;
211 #define TIMEOUT_INFINITE (((timeout_t)0x7fffffff) << 32 | 0xffffffff)
213 /* absolute timeout, negative means that monotonic clock is used */
214 typedef __int64 abstime_t;
216 /* structure for process startup info */
217 typedef struct
219 unsigned int debug_flags;
220 unsigned int console_flags;
221 obj_handle_t console;
222 obj_handle_t hstdin;
223 obj_handle_t hstdout;
224 obj_handle_t hstderr;
225 unsigned int x;
226 unsigned int y;
227 unsigned int xsize;
228 unsigned int ysize;
229 unsigned int xchars;
230 unsigned int ychars;
231 unsigned int attribute;
232 unsigned int flags;
233 unsigned int show;
234 data_size_t curdir_len;
235 data_size_t dllpath_len;
236 data_size_t imagepath_len;
237 data_size_t cmdline_len;
238 data_size_t title_len;
239 data_size_t desktop_len;
240 data_size_t shellinfo_len;
241 data_size_t runtime_len;
242 /* VARARG(curdir,unicode_str,curdir_len); */
243 /* VARARG(dllpath,unicode_str,dllpath_len); */
244 /* VARARG(imagepath,unicode_str,imagepath_len); */
245 /* VARARG(cmdline,unicode_str,cmdline_len); */
246 /* VARARG(title,unicode_str,title_len); */
247 /* VARARG(desktop,unicode_str,desktop_len); */
248 /* VARARG(shellinfo,unicode_str,shellinfo_len); */
249 /* VARARG(runtime,unicode_str,runtime_len); */
250 } startup_info_t;
252 /* structure returned in the list of window properties */
253 typedef struct
255 atom_t atom; /* property atom */
256 int string; /* was atom a string originally? */
257 lparam_t data; /* data stored in property */
258 } property_data_t;
260 /* structure to specify window rectangles */
261 typedef struct
263 int left;
264 int top;
265 int right;
266 int bottom;
267 } rectangle_t;
269 /* structure for parameters of async I/O calls */
270 typedef struct
272 obj_handle_t handle; /* object to perform I/O on */
273 obj_handle_t event; /* event to signal when done */
274 client_ptr_t iosb; /* I/O status block in client addr space */
275 client_ptr_t user; /* opaque user data containing callback pointer and async-specific data */
276 client_ptr_t apc; /* user APC to call */
277 apc_param_t apc_context; /* user APC context or completion value */
278 } async_data_t;
280 /* structures for extra message data */
282 struct hw_msg_source
284 unsigned int device; /* source device (IMDT_* values) */
285 unsigned int origin; /* source origin (IMO_* values) */
288 struct hardware_msg_data
290 lparam_t info; /* extra info */
291 unsigned int hw_id; /* unique id */
292 unsigned int flags; /* hook flags */
293 struct hw_msg_source source; /* message source */
294 union
296 int type;
297 struct
299 int type; /* RIM_TYPEKEYBOARD */
300 unsigned int message; /* message generated by this rawinput event */
301 unsigned short vkey; /* virtual key code */
302 unsigned short scan; /* scan code */
303 } kbd;
304 struct
306 int type; /* RIM_TYPEMOUSE */
307 int x; /* x coordinate */
308 int y; /* y coordinate */
309 unsigned int data; /* mouse data */
310 } mouse;
311 } rawinput;
314 struct callback_msg_data
316 client_ptr_t callback; /* callback function */
317 lparam_t data; /* user data for callback */
318 lparam_t result; /* message result */
321 struct winevent_msg_data
323 user_handle_t hook; /* hook handle */
324 thread_id_t tid; /* thread id */
325 client_ptr_t hook_proc; /* hook proc address */
326 /* followed by module name if any */
329 typedef union
331 int type;
332 struct
334 int type; /* INPUT_KEYBOARD */
335 unsigned short vkey; /* virtual key code */
336 unsigned short scan; /* scan code */
337 unsigned int flags; /* event flags */
338 unsigned int time; /* event time */
339 lparam_t info; /* extra info */
340 } kbd;
341 struct
343 int type; /* INPUT_MOUSE */
344 int x; /* coordinates */
345 int y;
346 unsigned int data; /* mouse data */
347 unsigned int flags; /* event flags */
348 unsigned int time; /* event time */
349 lparam_t info; /* extra info */
350 } mouse;
351 struct
353 int type; /* INPUT_HARDWARE */
354 unsigned int msg; /* message code */
355 lparam_t lparam; /* message param */
356 } hw;
357 } hw_input_t;
359 typedef union
361 unsigned char bytes[1]; /* raw data for sent messages */
362 struct hardware_msg_data hardware;
363 struct callback_msg_data callback;
364 struct winevent_msg_data winevent;
365 } message_data_t;
367 /* structure returned in filesystem events */
368 struct filesystem_event
370 int action;
371 data_size_t len;
372 char name[1];
375 typedef struct
377 unsigned int low_part;
378 int high_part;
379 } luid_t;
381 typedef struct
383 unsigned int read;
384 unsigned int write;
385 unsigned int exec;
386 unsigned int all;
387 } generic_map_t;
389 #define MAX_ACL_LEN 65535
391 struct security_descriptor
393 unsigned int control; /* SE_ flags */
394 data_size_t owner_len;
395 data_size_t group_len;
396 data_size_t sacl_len;
397 data_size_t dacl_len;
398 /* VARARG(owner,SID); */
399 /* VARARG(group,SID); */
400 /* VARARG(sacl,ACL); */
401 /* VARARG(dacl,ACL); */
404 struct object_attributes
406 obj_handle_t rootdir; /* root directory */
407 unsigned int attributes; /* object attributes */
408 data_size_t sd_len; /* length of security_descriptor data. may be 0 */
409 data_size_t name_len; /* length of the name string. may be 0 */
410 /* VARARG(sd,security_descriptor); */
411 /* VARARG(name,unicode_str); */
414 struct object_type_info
416 data_size_t name_len; /* length of the name string */
417 unsigned int index; /* type index in global table */
418 unsigned int obj_count; /* count of objects of this type */
419 unsigned int handle_count; /* count of handles of this type */
420 unsigned int obj_max; /* max count of objects of this type */
421 unsigned int handle_max; /* max count of handles of this type */
422 unsigned int valid_access; /* mask for valid access bits */
423 generic_map_t mapping; /* generic access mappings */
424 /* VARARG(name,unicode_str); */
427 struct token_groups
429 unsigned int count;
430 /* unsigned int attributes[count]; */
431 /* VARARG(sids,SID); */
434 enum select_op
436 SELECT_NONE,
437 SELECT_WAIT,
438 SELECT_WAIT_ALL,
439 SELECT_SIGNAL_AND_WAIT,
440 SELECT_KEYED_EVENT_WAIT,
441 SELECT_KEYED_EVENT_RELEASE
444 typedef union
446 enum select_op op;
447 struct
449 enum select_op op; /* SELECT_WAIT or SELECT_WAIT_ALL */
450 obj_handle_t handles[MAXIMUM_WAIT_OBJECTS];
451 } wait;
452 struct
454 enum select_op op; /* SELECT_SIGNAL_AND_WAIT */
455 obj_handle_t wait;
456 obj_handle_t signal; /* must be last in the structure so we can remove it on retries */
457 } signal_and_wait;
458 struct
460 enum select_op op; /* SELECT_KEYED_EVENT_WAIT or SELECT_KEYED_EVENT_RELEASE */
461 obj_handle_t handle;
462 client_ptr_t key;
463 } keyed_event;
464 } select_op_t;
466 enum apc_type
468 APC_NONE,
469 APC_USER,
470 APC_TIMER,
471 APC_ASYNC_IO,
472 APC_VIRTUAL_ALLOC,
473 APC_VIRTUAL_FREE,
474 APC_VIRTUAL_QUERY,
475 APC_VIRTUAL_PROTECT,
476 APC_VIRTUAL_FLUSH,
477 APC_VIRTUAL_LOCK,
478 APC_VIRTUAL_UNLOCK,
479 APC_MAP_VIEW,
480 APC_UNMAP_VIEW,
481 APC_CREATE_THREAD,
482 APC_DUP_HANDLE,
483 APC_BREAK_PROCESS
486 typedef union
488 enum apc_type type;
489 struct
491 enum apc_type type; /* APC_USER */
492 int __pad;
493 client_ptr_t func; /* void (__stdcall *func)(ULONG_PTR,ULONG_PTR,ULONG_PTR); */
494 apc_param_t args[3]; /* arguments for user function */
495 } user;
496 struct
498 enum apc_type type; /* APC_TIMER */
499 int __pad;
500 client_ptr_t func; /* void (__stdcall *func)(void*, unsigned int, unsigned int); */
501 abstime_t time; /* time of expiration */
502 client_ptr_t arg; /* user argument */
503 } timer;
504 } user_apc_t;
506 typedef union
508 enum apc_type type;
509 user_apc_t user;
510 struct
512 enum apc_type type; /* APC_ASYNC_IO */
513 unsigned int status; /* I/O status */
514 client_ptr_t user; /* user pointer */
515 client_ptr_t sb; /* status block */
516 } async_io;
517 struct
519 enum apc_type type; /* APC_VIRTUAL_ALLOC */
520 unsigned int op_type; /* type of operation */
521 client_ptr_t addr; /* requested address */
522 mem_size_t size; /* allocation size */
523 mem_size_t zero_bits; /* number of zero high bits */
524 unsigned int prot; /* memory protection flags */
525 } virtual_alloc;
526 struct
528 enum apc_type type; /* APC_VIRTUAL_FREE */
529 unsigned int op_type; /* type of operation */
530 client_ptr_t addr; /* requested address */
531 mem_size_t size; /* allocation size */
532 } virtual_free;
533 struct
535 enum apc_type type; /* APC_VIRTUAL_QUERY */
536 int __pad;
537 client_ptr_t addr; /* requested address */
538 } virtual_query;
539 struct
541 enum apc_type type; /* APC_VIRTUAL_PROTECT */
542 unsigned int prot; /* new protection flags */
543 client_ptr_t addr; /* requested address */
544 mem_size_t size; /* requested size */
545 } virtual_protect;
546 struct
548 enum apc_type type; /* APC_VIRTUAL_FLUSH */
549 int __pad;
550 client_ptr_t addr; /* requested address */
551 mem_size_t size; /* requested size */
552 } virtual_flush;
553 struct
555 enum apc_type type; /* APC_VIRTUAL_LOCK */
556 int __pad;
557 client_ptr_t addr; /* requested address */
558 mem_size_t size; /* requested size */
559 } virtual_lock;
560 struct
562 enum apc_type type; /* APC_VIRTUAL_UNLOCK */
563 int __pad;
564 client_ptr_t addr; /* requested address */
565 mem_size_t size; /* requested size */
566 } virtual_unlock;
567 struct
569 enum apc_type type; /* APC_MAP_VIEW */
570 obj_handle_t handle; /* mapping handle */
571 client_ptr_t addr; /* requested address */
572 mem_size_t size; /* allocation size */
573 file_pos_t offset; /* file offset */
574 mem_size_t zero_bits; /* number of zero high bits */
575 unsigned int alloc_type; /* allocation type */
576 unsigned int prot; /* memory protection flags */
577 } map_view;
578 struct
580 enum apc_type type; /* APC_UNMAP_VIEW */
581 int __pad;
582 client_ptr_t addr; /* view address */
583 } unmap_view;
584 struct
586 enum apc_type type; /* APC_CREATE_THREAD */
587 unsigned int flags; /* creation flags */
588 client_ptr_t func; /* void (__stdcall *func)(void*); start function */
589 client_ptr_t arg; /* argument for start function */
590 mem_size_t reserve; /* reserve size for thread stack */
591 mem_size_t commit; /* commit size for thread stack */
592 } create_thread;
593 struct
595 enum apc_type type; /* APC_DUP_HANDLE */
596 obj_handle_t src_handle; /* src handle to duplicate */
597 obj_handle_t dst_process; /* dst process handle */
598 unsigned int access; /* wanted access rights */
599 unsigned int attributes; /* object attributes */
600 unsigned int options; /* duplicate options */
601 } dup_handle;
602 } apc_call_t;
604 typedef union
606 enum apc_type type;
607 struct
609 enum apc_type type; /* APC_ASYNC_IO */
610 unsigned int status; /* new status of async operation */
611 unsigned int total; /* bytes transferred */
612 } async_io;
613 struct
615 enum apc_type type; /* APC_VIRTUAL_ALLOC */
616 unsigned int status; /* status returned by call */
617 client_ptr_t addr; /* resulting address */
618 mem_size_t size; /* resulting size */
619 } virtual_alloc;
620 struct
622 enum apc_type type; /* APC_VIRTUAL_FREE */
623 unsigned int status; /* status returned by call */
624 client_ptr_t addr; /* resulting address */
625 mem_size_t size; /* resulting size */
626 } virtual_free;
627 struct
629 enum apc_type type; /* APC_VIRTUAL_QUERY */
630 unsigned int status; /* status returned by call */
631 client_ptr_t base; /* resulting base address */
632 client_ptr_t alloc_base;/* resulting allocation base */
633 mem_size_t size; /* resulting region size */
634 unsigned short state; /* resulting region state */
635 unsigned short prot; /* resulting region protection */
636 unsigned short alloc_prot;/* resulting allocation protection */
637 unsigned short alloc_type;/* resulting region allocation type */
638 } virtual_query;
639 struct
641 enum apc_type type; /* APC_VIRTUAL_PROTECT */
642 unsigned int status; /* status returned by call */
643 client_ptr_t addr; /* resulting address */
644 mem_size_t size; /* resulting size */
645 unsigned int prot; /* old protection flags */
646 } virtual_protect;
647 struct
649 enum apc_type type; /* APC_VIRTUAL_FLUSH */
650 unsigned int status; /* status returned by call */
651 client_ptr_t addr; /* resulting address */
652 mem_size_t size; /* resulting size */
653 } virtual_flush;
654 struct
656 enum apc_type type; /* APC_VIRTUAL_LOCK */
657 unsigned int status; /* status returned by call */
658 client_ptr_t addr; /* resulting address */
659 mem_size_t size; /* resulting size */
660 } virtual_lock;
661 struct
663 enum apc_type type; /* APC_VIRTUAL_UNLOCK */
664 unsigned int status; /* status returned by call */
665 client_ptr_t addr; /* resulting address */
666 mem_size_t size; /* resulting size */
667 } virtual_unlock;
668 struct
670 enum apc_type type; /* APC_MAP_VIEW */
671 unsigned int status; /* status returned by call */
672 client_ptr_t addr; /* resulting address */
673 mem_size_t size; /* resulting size */
674 } map_view;
675 struct
677 enum apc_type type; /* APC_UNMAP_VIEW */
678 unsigned int status; /* status returned by call */
679 } unmap_view;
680 struct
682 enum apc_type type; /* APC_CREATE_THREAD */
683 unsigned int status; /* status returned by call */
684 process_id_t pid; /* process id */
685 thread_id_t tid; /* thread id */
686 client_ptr_t teb; /* thread teb (in process address space) */
687 obj_handle_t handle; /* handle to new thread */
688 } create_thread;
689 struct
691 enum apc_type type; /* APC_DUP_HANDLE */
692 unsigned int status; /* status returned by call */
693 obj_handle_t handle; /* duplicated handle in dst process */
694 } dup_handle;
695 struct
697 enum apc_type type; /* APC_BREAK_PROCESS */
698 unsigned int status; /* status returned by call */
699 } break_process;
700 } apc_result_t;
702 enum irp_type
704 IRP_CALL_NONE,
705 IRP_CALL_CREATE,
706 IRP_CALL_CLOSE,
707 IRP_CALL_READ,
708 IRP_CALL_WRITE,
709 IRP_CALL_FLUSH,
710 IRP_CALL_IOCTL,
711 IRP_CALL_VOLUME,
712 IRP_CALL_FREE,
713 IRP_CALL_CANCEL
716 typedef union
718 enum irp_type type; /* irp call type */
719 struct
721 enum irp_type type; /* IRP_CALL_CREATE */
722 unsigned int access; /* access rights */
723 unsigned int sharing; /* sharing flags */
724 unsigned int options; /* file options */
725 client_ptr_t device; /* opaque ptr for the device */
726 obj_handle_t file; /* file handle */
727 } create;
728 struct
730 enum irp_type type; /* IRP_CALL_CLOSE */
731 int __pad;
732 client_ptr_t file; /* opaque ptr for the file object */
733 } close;
734 struct
736 enum irp_type type; /* IRP_CALL_READ */
737 unsigned int key; /* driver key */
738 data_size_t out_size; /* needed output size */
739 int __pad;
740 client_ptr_t file; /* opaque ptr for the file object */
741 file_pos_t pos; /* file position */
742 } read;
743 struct
745 enum irp_type type; /* IRP_CALL_WRITE */
746 unsigned int key; /* driver key */
747 client_ptr_t file; /* opaque ptr for the file object */
748 file_pos_t pos; /* file position */
749 } write;
750 struct
752 enum irp_type type; /* IRP_CALL_FLUSH */
753 int __pad;
754 client_ptr_t file; /* opaque ptr for the file object */
755 } flush;
756 struct
758 enum irp_type type; /* IRP_CALL_IOCTL */
759 ioctl_code_t code; /* ioctl code */
760 data_size_t out_size; /* needed output size */
761 int __pad;
762 client_ptr_t file; /* opaque ptr for the file object */
763 } ioctl;
764 struct
766 enum irp_type type; /* IRP_CALL_VOLUME */
767 unsigned int info_class;/* information class */
768 data_size_t out_size; /* needed output size */
769 int __pad;
770 client_ptr_t file; /* opaque ptr for the file object */
771 } volume;
772 struct
774 enum irp_type type; /* IRP_CALL_FREE */
775 int __pad;
776 client_ptr_t obj; /* opaque ptr for the freed object */
777 } free;
778 struct
780 enum irp_type type; /* IRP_CALL_CANCEL */
781 int __pad;
782 client_ptr_t irp; /* opaque ptr for canceled irp */
783 } cancel;
784 } irp_params_t;
786 /* information about a PE image mapping, roughly equivalent to SECTION_IMAGE_INFORMATION */
787 typedef struct
789 client_ptr_t base;
790 client_ptr_t entry_point;
791 mem_size_t map_size;
792 mem_size_t stack_size;
793 mem_size_t stack_commit;
794 unsigned int zerobits;
795 unsigned int subsystem;
796 unsigned short subsystem_minor;
797 unsigned short subsystem_major;
798 unsigned short osversion_major;
799 unsigned short osversion_minor;
800 unsigned short image_charact;
801 unsigned short dll_charact;
802 unsigned short machine;
803 unsigned char contains_code;
804 unsigned char image_flags;
805 unsigned int loader_flags;
806 unsigned int header_size;
807 unsigned int file_size;
808 unsigned int checksum;
809 unsigned int dbg_offset;
810 unsigned int dbg_size;
811 } pe_image_info_t;
812 #define IMAGE_FLAGS_ComPlusNativeReady 0x01
813 #define IMAGE_FLAGS_ComPlusILOnly 0x02
814 #define IMAGE_FLAGS_ImageDynamicallyRelocated 0x04
815 #define IMAGE_FLAGS_ImageMappedFlat 0x08
816 #define IMAGE_FLAGS_BaseBelow4gb 0x10
817 #define IMAGE_FLAGS_ComPlusPrefer32bit 0x20
818 #define IMAGE_FLAGS_WineBuiltin 0x40
819 #define IMAGE_FLAGS_WineFakeDll 0x80
821 struct rawinput_device
823 unsigned short usage_page;
824 unsigned short usage;
825 unsigned int flags;
826 user_handle_t target;
829 typedef struct
831 int x;
832 int y;
833 unsigned int time;
834 int __pad;
835 lparam_t info;
836 } cursor_pos_t;
838 /****************************************************************/
839 /* Request declarations */
841 /* Create a new process from the context of the parent */
842 @REQ(new_process)
843 obj_handle_t token; /* process token */
844 obj_handle_t debug; /* process debug object */
845 obj_handle_t parent_process; /* parent process */
846 unsigned int flags; /* process creation flags */
847 int socket_fd; /* file descriptor for process socket */
848 unsigned int access; /* access rights for process object */
849 client_cpu_t cpu; /* CPU that the new process will use */
850 data_size_t info_size; /* size of startup info */
851 data_size_t handles_size; /* length of explicit handles list */
852 VARARG(objattr,object_attributes); /* object attributes */
853 VARARG(handles,uints,handles_size); /* handles list */
854 VARARG(info,startup_info,info_size); /* startup information */
855 VARARG(env,unicode_str); /* environment for new process */
856 @REPLY
857 obj_handle_t info; /* new process info handle */
858 process_id_t pid; /* process id */
859 obj_handle_t handle; /* process handle (in the current process) */
860 @END
863 /* Retrieve information about a newly started process */
864 @REQ(get_new_process_info)
865 obj_handle_t info; /* info handle returned from new_process_request */
866 @REPLY
867 int success; /* did the process start successfully? */
868 int exit_code; /* process exit code if failed */
869 @END
872 /* Create a new thread */
873 @REQ(new_thread)
874 obj_handle_t process; /* process in which to create thread */
875 unsigned int access; /* wanted access rights */
876 int suspend; /* new thread should be suspended on creation */
877 int request_fd; /* fd for request pipe */
878 VARARG(objattr,object_attributes); /* object attributes */
879 @REPLY
880 thread_id_t tid; /* thread id */
881 obj_handle_t handle; /* thread handle (in the current process) */
882 @END
885 /* Retrieve the new process startup info */
886 @REQ(get_startup_info)
887 @REPLY
888 data_size_t info_size; /* size of startup info */
889 VARARG(info,startup_info,info_size); /* startup information */
890 VARARG(env,unicode_str); /* environment */
891 @END
894 /* Signal the end of the process initialization */
895 @REQ(init_process_done)
896 @REPLY
897 client_ptr_t entry; /* process entry point */
898 int suspend; /* is process suspended? */
899 @END
902 /* Initialize the first thread of a new process */
903 @REQ(init_first_thread)
904 int unix_pid; /* Unix pid of new process */
905 int unix_tid; /* Unix tid of new thread */
906 int debug_level; /* new debug level */
907 client_ptr_t teb; /* TEB of new thread (in process address space) */
908 client_ptr_t peb; /* PEB of new process (in process address space) */
909 client_ptr_t ldt_copy; /* address of LDT copy (in process address space) */
910 int reply_fd; /* fd for reply pipe */
911 int wait_fd; /* fd for blocking calls pipe */
912 client_cpu_t cpu; /* CPU that this thread is running on */
913 @REPLY
914 process_id_t pid; /* process id of the new thread's process */
915 thread_id_t tid; /* thread id of the new thread */
916 timeout_t server_start; /* server start time */
917 data_size_t info_size; /* total size of startup info */
918 VARARG(machines,ushorts); /* array of supported machines */
919 @END
922 /* Initialize a new thread; called from the child after pthread_create() */
923 @REQ(init_thread)
924 int unix_tid; /* Unix tid of new thread */
925 int reply_fd; /* fd for reply pipe */
926 int wait_fd; /* fd for blocking calls pipe */
927 client_ptr_t teb; /* TEB of new thread (in thread address space) */
928 client_ptr_t entry; /* entry point (in thread address space) */
929 @REPLY
930 process_id_t pid; /* process id of the new thread's process */
931 thread_id_t tid; /* thread id of the new thread */
932 int suspend; /* is thread suspended? */
933 @END
936 /* Terminate a process */
937 @REQ(terminate_process)
938 obj_handle_t handle; /* process handle to terminate */
939 int exit_code; /* process exit code */
940 @REPLY
941 int self; /* suicide? */
942 @END
945 /* Terminate a thread */
946 @REQ(terminate_thread)
947 obj_handle_t handle; /* thread handle to terminate */
948 int exit_code; /* thread exit code */
949 @REPLY
950 int self; /* suicide? */
951 @END
954 /* Retrieve information about a process */
955 @REQ(get_process_info)
956 obj_handle_t handle; /* process handle */
957 @REPLY
958 process_id_t pid; /* server process id */
959 process_id_t ppid; /* server process id of parent */
960 affinity_t affinity; /* process affinity mask */
961 client_ptr_t peb; /* PEB address in process address space */
962 timeout_t start_time; /* process start time */
963 timeout_t end_time; /* process end time */
964 int exit_code; /* process exit code */
965 int priority; /* priority class */
966 unsigned short machine; /* process architecture */
967 VARARG(image,pe_image_info); /* image info for main exe */
968 @END
971 /* Retrieve debug information about a process */
972 @REQ(get_process_debug_info)
973 obj_handle_t handle; /* process handle */
974 @REPLY
975 obj_handle_t debug; /* handle to debug port */
976 int debug_children; /* inherit debugger to child processes */
977 VARARG(image,pe_image_info); /* image info for main exe */
978 @END
981 /* Fetch the name of the process image */
982 @REQ(get_process_image_name)
983 obj_handle_t handle; /* process handle */
984 int win32; /* return a win32 filename? */
985 @REPLY
986 data_size_t len; /* len in bytes required to store filename */
987 VARARG(name,unicode_str); /* image name for main exe */
988 @END
991 /* Retrieve information about a process memory usage */
992 @REQ(get_process_vm_counters)
993 obj_handle_t handle; /* process handle */
994 @REPLY
995 mem_size_t peak_virtual_size; /* peak virtual memory in bytes */
996 mem_size_t virtual_size; /* virtual memory in bytes */
997 mem_size_t peak_working_set_size; /* peak real memory in bytes */
998 mem_size_t working_set_size; /* real memory in bytes */
999 mem_size_t pagefile_usage; /* commit charge in bytes */
1000 mem_size_t peak_pagefile_usage; /* peak commit charge in bytes */
1001 @END
1004 /* Set a process information */
1005 @REQ(set_process_info)
1006 obj_handle_t handle; /* process handle */
1007 int mask; /* setting mask (see below) */
1008 int priority; /* priority class */
1009 affinity_t affinity; /* affinity mask */
1010 @END
1011 #define SET_PROCESS_INFO_PRIORITY 0x01
1012 #define SET_PROCESS_INFO_AFFINITY 0x02
1015 /* Retrieve information about a thread */
1016 @REQ(get_thread_info)
1017 obj_handle_t handle; /* thread handle */
1018 unsigned int access; /* required access rights */
1019 @REPLY
1020 process_id_t pid; /* server process id */
1021 thread_id_t tid; /* server thread id */
1022 client_ptr_t teb; /* thread teb pointer */
1023 client_ptr_t entry_point; /* thread entry point */
1024 affinity_t affinity; /* thread affinity mask */
1025 int exit_code; /* thread exit code */
1026 int priority; /* thread priority level */
1027 int last; /* last thread in process */
1028 int suspend_count; /* thread suspend count */
1029 int dbg_hidden; /* thread hidden from debugger */
1030 data_size_t desc_len; /* description length in bytes */
1031 VARARG(desc,unicode_str); /* description string */
1032 @END
1035 /* Retrieve information about thread times */
1036 @REQ(get_thread_times)
1037 obj_handle_t handle; /* thread handle */
1038 @REPLY
1039 timeout_t creation_time; /* thread creation time */
1040 timeout_t exit_time; /* thread exit time */
1041 int unix_pid; /* thread native pid */
1042 int unix_tid; /* thread native pid */
1043 @END
1046 /* Set a thread information */
1047 @REQ(set_thread_info)
1048 obj_handle_t handle; /* thread handle */
1049 int mask; /* setting mask (see below) */
1050 int priority; /* priority class */
1051 affinity_t affinity; /* affinity mask */
1052 client_ptr_t entry_point; /* thread entry point */
1053 obj_handle_t token; /* impersonation token */
1054 VARARG(desc,unicode_str); /* description string */
1055 @END
1056 #define SET_THREAD_INFO_PRIORITY 0x01
1057 #define SET_THREAD_INFO_AFFINITY 0x02
1058 #define SET_THREAD_INFO_TOKEN 0x04
1059 #define SET_THREAD_INFO_ENTRYPOINT 0x08
1060 #define SET_THREAD_INFO_DESCRIPTION 0x10
1061 #define SET_THREAD_INFO_DBG_HIDDEN 0x20
1064 /* Suspend a thread */
1065 @REQ(suspend_thread)
1066 obj_handle_t handle; /* thread handle */
1067 @REPLY
1068 int count; /* new suspend count */
1069 @END
1072 /* Resume a thread */
1073 @REQ(resume_thread)
1074 obj_handle_t handle; /* thread handle */
1075 @REPLY
1076 int count; /* new suspend count */
1077 @END
1080 /* Queue an APC for a thread or process */
1081 @REQ(queue_apc)
1082 obj_handle_t handle; /* thread or process handle */
1083 apc_call_t call; /* call arguments */
1084 @REPLY
1085 obj_handle_t handle; /* APC handle */
1086 int self; /* run APC in caller itself? */
1087 @END
1090 /* Get the result of an APC call */
1091 @REQ(get_apc_result)
1092 obj_handle_t handle; /* handle to the APC */
1093 @REPLY
1094 apc_result_t result; /* result of the APC */
1095 @END
1098 /* Close a handle for the current process */
1099 @REQ(close_handle)
1100 obj_handle_t handle; /* handle to close */
1101 @END
1104 /* Set a handle information */
1105 @REQ(set_handle_info)
1106 obj_handle_t handle; /* handle we are interested in */
1107 int flags; /* new handle flags */
1108 int mask; /* mask for flags to set */
1109 @REPLY
1110 int old_flags; /* old flag value */
1111 @END
1114 /* Duplicate a handle */
1115 @REQ(dup_handle)
1116 obj_handle_t src_process; /* src process handle */
1117 obj_handle_t src_handle; /* src handle to duplicate */
1118 obj_handle_t dst_process; /* dst process handle */
1119 unsigned int access; /* wanted access rights */
1120 unsigned int attributes; /* object attributes */
1121 unsigned int options; /* duplicate options */
1122 @REPLY
1123 obj_handle_t handle; /* duplicated handle in dst process */
1124 @END
1127 /* Make an object temporary */
1128 @REQ(make_temporary)
1129 obj_handle_t handle; /* handle to the object */
1130 @END
1133 /* Open a handle to a process */
1134 @REQ(open_process)
1135 process_id_t pid; /* process id to open */
1136 unsigned int access; /* wanted access rights */
1137 unsigned int attributes; /* object attributes */
1138 @REPLY
1139 obj_handle_t handle; /* handle to the process */
1140 @END
1143 /* Open a handle to a thread */
1144 @REQ(open_thread)
1145 thread_id_t tid; /* thread id to open */
1146 unsigned int access; /* wanted access rights */
1147 unsigned int attributes; /* object attributes */
1148 @REPLY
1149 obj_handle_t handle; /* handle to the thread */
1150 @END
1153 /* Wait for handles */
1154 @REQ(select)
1155 int flags; /* wait flags (see below) */
1156 client_ptr_t cookie; /* magic cookie to return to client */
1157 abstime_t timeout; /* timeout */
1158 data_size_t size; /* size of select_op */
1159 obj_handle_t prev_apc; /* handle to previous APC */
1160 VARARG(result,apc_result); /* result of previous APC */
1161 VARARG(data,select_op,size); /* operation-specific data */
1162 VARARG(context,context); /* suspend context */
1163 @REPLY
1164 apc_call_t call; /* APC call arguments */
1165 obj_handle_t apc_handle; /* handle to next APC */
1166 VARARG(context,context); /* suspend context */
1167 @END
1168 #define SELECT_ALERTABLE 1
1169 #define SELECT_INTERRUPTIBLE 2
1172 /* Create an event */
1173 @REQ(create_event)
1174 unsigned int access; /* wanted access rights */
1175 int manual_reset; /* manual reset event */
1176 int initial_state; /* initial state of the event */
1177 VARARG(objattr,object_attributes); /* object attributes */
1178 @REPLY
1179 obj_handle_t handle; /* handle to the event */
1180 @END
1182 /* Event operation */
1183 @REQ(event_op)
1184 obj_handle_t handle; /* handle to event */
1185 int op; /* event operation (see below) */
1186 @REPLY
1187 int state; /* previous state */
1188 @END
1189 enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT };
1191 @REQ(query_event)
1192 obj_handle_t handle; /* handle to event */
1193 @REPLY
1194 int manual_reset; /* manual reset event */
1195 int state; /* current state of the event */
1196 @END
1198 /* Open an event */
1199 @REQ(open_event)
1200 unsigned int access; /* wanted access rights */
1201 unsigned int attributes; /* object attributes */
1202 obj_handle_t rootdir; /* root directory */
1203 VARARG(name,unicode_str); /* object name */
1204 @REPLY
1205 obj_handle_t handle; /* handle to the event */
1206 @END
1209 /* Create a keyed event */
1210 @REQ(create_keyed_event)
1211 unsigned int access; /* wanted access rights */
1212 VARARG(objattr,object_attributes); /* object attributes */
1213 @REPLY
1214 obj_handle_t handle; /* handle to the event */
1215 @END
1217 /* Open a keyed event */
1218 @REQ(open_keyed_event)
1219 unsigned int access; /* wanted access rights */
1220 unsigned int attributes; /* object attributes */
1221 obj_handle_t rootdir; /* root directory */
1222 VARARG(name,unicode_str); /* object name */
1223 @REPLY
1224 obj_handle_t handle; /* handle to the event */
1225 @END
1228 /* Create a mutex */
1229 @REQ(create_mutex)
1230 unsigned int access; /* wanted access rights */
1231 int owned; /* initially owned? */
1232 VARARG(objattr,object_attributes); /* object attributes */
1233 @REPLY
1234 obj_handle_t handle; /* handle to the mutex */
1235 @END
1238 /* Release a mutex */
1239 @REQ(release_mutex)
1240 obj_handle_t handle; /* handle to the mutex */
1241 @REPLY
1242 unsigned int prev_count; /* value of internal counter, before release */
1243 @END
1246 /* Open a mutex */
1247 @REQ(open_mutex)
1248 unsigned int access; /* wanted access rights */
1249 unsigned int attributes; /* object attributes */
1250 obj_handle_t rootdir; /* root directory */
1251 VARARG(name,unicode_str); /* object name */
1252 @REPLY
1253 obj_handle_t handle; /* handle to the mutex */
1254 @END
1257 /* Query a mutex */
1258 @REQ(query_mutex)
1259 obj_handle_t handle; /* handle to mutex */
1260 @REPLY
1261 unsigned int count; /* current count of mutex */
1262 int owned; /* true if owned by current thread */
1263 int abandoned; /* true if abandoned */
1264 @END
1267 /* Create a semaphore */
1268 @REQ(create_semaphore)
1269 unsigned int access; /* wanted access rights */
1270 unsigned int initial; /* initial count */
1271 unsigned int max; /* maximum count */
1272 VARARG(objattr,object_attributes); /* object attributes */
1273 @REPLY
1274 obj_handle_t handle; /* handle to the semaphore */
1275 @END
1278 /* Release a semaphore */
1279 @REQ(release_semaphore)
1280 obj_handle_t handle; /* handle to the semaphore */
1281 unsigned int count; /* count to add to semaphore */
1282 @REPLY
1283 unsigned int prev_count; /* previous semaphore count */
1284 @END
1286 @REQ(query_semaphore)
1287 obj_handle_t handle; /* handle to the semaphore */
1288 @REPLY
1289 unsigned int current; /* current count */
1290 unsigned int max; /* maximum count */
1291 @END
1293 /* Open a semaphore */
1294 @REQ(open_semaphore)
1295 unsigned int access; /* wanted access rights */
1296 unsigned int attributes; /* object attributes */
1297 obj_handle_t rootdir; /* root directory */
1298 VARARG(name,unicode_str); /* object name */
1299 @REPLY
1300 obj_handle_t handle; /* handle to the semaphore */
1301 @END
1304 /* Create a file */
1305 @REQ(create_file)
1306 unsigned int access; /* wanted access rights */
1307 unsigned int sharing; /* sharing flags */
1308 int create; /* file create action */
1309 unsigned int options; /* file options */
1310 unsigned int attrs; /* file attributes for creation */
1311 VARARG(objattr,object_attributes); /* object attributes */
1312 VARARG(filename,string); /* file name */
1313 @REPLY
1314 obj_handle_t handle; /* handle to the file */
1315 @END
1318 /* Open a file object */
1319 @REQ(open_file_object)
1320 unsigned int access; /* wanted access rights */
1321 unsigned int attributes; /* open attributes */
1322 obj_handle_t rootdir; /* root directory */
1323 unsigned int sharing; /* sharing flags */
1324 unsigned int options; /* file options */
1325 VARARG(filename,unicode_str); /* file name */
1326 @REPLY
1327 obj_handle_t handle; /* handle to the file */
1328 @END
1331 /* Allocate a file handle for a Unix fd */
1332 @REQ(alloc_file_handle)
1333 unsigned int access; /* wanted access rights */
1334 unsigned int attributes; /* object attributes */
1335 int fd; /* file descriptor on the client side */
1336 @REPLY
1337 obj_handle_t handle; /* handle to the file */
1338 @END
1341 /* Get the Unix name from a file handle */
1342 @REQ(get_handle_unix_name)
1343 obj_handle_t handle; /* file handle */
1344 @REPLY
1345 data_size_t name_len; /* unix name length */
1346 VARARG(name,string); /* unix name */
1347 @END
1350 /* Get a Unix fd to access a file */
1351 @REQ(get_handle_fd)
1352 obj_handle_t handle; /* handle to the file */
1353 @REPLY
1354 int type; /* file type (see below) */
1355 int cacheable; /* can fd be cached in the client? */
1356 unsigned int access; /* file access rights */
1357 unsigned int options; /* file open options */
1358 @END
1359 enum server_fd_type
1361 FD_TYPE_INVALID, /* invalid file (no associated fd) */
1362 FD_TYPE_FILE, /* regular file */
1363 FD_TYPE_DIR, /* directory */
1364 FD_TYPE_SOCKET, /* socket */
1365 FD_TYPE_SERIAL, /* serial port */
1366 FD_TYPE_PIPE, /* named pipe */
1367 FD_TYPE_MAILSLOT, /* mailslot */
1368 FD_TYPE_CHAR, /* unspecified char device */
1369 FD_TYPE_DEVICE, /* Windows device file */
1370 FD_TYPE_NB_TYPES
1374 /* Retrieve (or allocate) the client-side directory cache entry */
1375 @REQ(get_directory_cache_entry)
1376 obj_handle_t handle; /* handle to the directory */
1377 @REPLY
1378 int entry; /* cache entry on the client side */
1379 VARARG(free,ints); /* entries that can be freed */
1380 @END
1383 /* Flush a file buffers */
1384 @REQ(flush)
1385 async_data_t async; /* async I/O parameters */
1386 @REPLY
1387 obj_handle_t event; /* event set when finished */
1388 @END
1390 /* Query file information */
1391 @REQ(get_file_info)
1392 obj_handle_t handle; /* handle to the file */
1393 unsigned int info_class; /* queried information class */
1394 @REPLY
1395 VARARG(data,bytes); /* file info data */
1396 @END
1398 /* Query volume information */
1399 @REQ(get_volume_info)
1400 obj_handle_t handle; /* handle to the file */
1401 async_data_t async; /* async I/O parameters */
1402 unsigned int info_class; /* queried information class */
1403 @REPLY
1404 obj_handle_t wait; /* handle to wait on for blocking read */
1405 VARARG(data,bytes); /* volume info data */
1406 @END
1408 /* Lock a region of a file */
1409 @REQ(lock_file)
1410 obj_handle_t handle; /* handle to the file */
1411 file_pos_t offset; /* offset of start of lock */
1412 file_pos_t count; /* count of bytes to lock */
1413 int shared; /* shared or exclusive lock? */
1414 int wait; /* do we want to wait? */
1415 @REPLY
1416 obj_handle_t handle; /* handle to wait on */
1417 int overlapped; /* is it an overlapped I/O handle? */
1418 @END
1421 /* Unlock a region of a file */
1422 @REQ(unlock_file)
1423 obj_handle_t handle; /* handle to the file */
1424 file_pos_t offset; /* offset of start of unlock */
1425 file_pos_t count; /* count of bytes to unlock */
1426 @END
1429 /* Set socket event parameters */
1430 @REQ(set_socket_event)
1431 obj_handle_t handle; /* handle to the socket */
1432 unsigned int mask; /* event mask */
1433 obj_handle_t event; /* event object */
1434 user_handle_t window; /* window to send the message to */
1435 unsigned int msg; /* message to send */
1436 @END
1439 /* Get socket event parameters */
1440 @REQ(get_socket_event)
1441 obj_handle_t handle; /* handle to the socket */
1442 int service; /* clear pending? */
1443 obj_handle_t c_event; /* event to clear */
1444 @REPLY
1445 unsigned int mask; /* event mask */
1446 unsigned int pmask; /* pending events */
1447 unsigned int state; /* status bits */
1448 VARARG(errors,ints); /* event errors */
1449 @END
1452 /* Get socket info */
1453 @REQ(get_socket_info)
1454 obj_handle_t handle; /* handle to the socket */
1455 @REPLY
1456 int family; /* family, see socket manpage */
1457 int type; /* type, see socket manpage */
1458 int protocol; /* protocol, see socket manpage */
1459 @END
1462 /* Re-enable pending socket events */
1463 @REQ(enable_socket_event)
1464 obj_handle_t handle; /* handle to the socket */
1465 unsigned int mask; /* events to re-enable */
1466 unsigned int sstate; /* status bits to set */
1467 unsigned int cstate; /* status bits to clear */
1468 @END
1470 @REQ(set_socket_deferred)
1471 obj_handle_t handle; /* handle to the socket */
1472 obj_handle_t deferred; /* handle to the socket for which accept() is deferred */
1473 @END
1476 /* Retrieve the next pending console ioctl request */
1477 @REQ(get_next_console_request)
1478 obj_handle_t handle; /* console server handle */
1479 int signal; /* server signal state */
1480 int read; /* 1 if reporting result of blocked read ioctl */
1481 unsigned int status; /* status of previous ioctl */
1482 VARARG(out_data,bytes); /* out_data of previous ioctl */
1483 @REPLY
1484 unsigned int code; /* ioctl code */
1485 unsigned int output; /* output id or 0 for input */
1486 data_size_t out_size; /* ioctl output size */
1487 VARARG(in_data,bytes); /* ioctl in_data */
1488 @END
1491 /* enable directory change notifications */
1492 @REQ(read_directory_changes)
1493 unsigned int filter; /* notification filter */
1494 int subtree; /* watch the subtree? */
1495 int want_data; /* flag indicating whether change data should be collected */
1496 async_data_t async; /* async I/O parameters */
1497 @END
1500 @REQ(read_change)
1501 obj_handle_t handle;
1502 @REPLY
1503 VARARG(events,filesystem_event); /* collected filesystem events */
1504 @END
1507 /* Create a file mapping */
1508 @REQ(create_mapping)
1509 unsigned int access; /* wanted access rights */
1510 unsigned int flags; /* SEC_* flags */
1511 unsigned int file_access; /* file access rights */
1512 mem_size_t size; /* mapping size */
1513 obj_handle_t file_handle; /* file handle */
1514 VARARG(objattr,object_attributes); /* object attributes */
1515 @REPLY
1516 obj_handle_t handle; /* handle to the mapping */
1517 @END
1520 /* Open a mapping */
1521 @REQ(open_mapping)
1522 unsigned int access; /* wanted access rights */
1523 unsigned int attributes; /* object attributes */
1524 obj_handle_t rootdir; /* root directory */
1525 VARARG(name,unicode_str); /* object name */
1526 @REPLY
1527 obj_handle_t handle; /* handle to the mapping */
1528 @END
1531 /* Get information about a file mapping */
1532 @REQ(get_mapping_info)
1533 obj_handle_t handle; /* handle to the mapping */
1534 unsigned int access; /* wanted access rights */
1535 @REPLY
1536 mem_size_t size; /* mapping size */
1537 unsigned int flags; /* SEC_* flags */
1538 obj_handle_t shared_file; /* shared mapping file handle */
1539 data_size_t total; /* total required buffer size in bytes */
1540 VARARG(image,pe_image_info);/* image info for SEC_IMAGE mappings */
1541 VARARG(name,unicode_str); /* filename for SEC_IMAGE mappings */
1542 @END
1545 /* Add a memory view in the current process */
1546 @REQ(map_view)
1547 obj_handle_t mapping; /* file mapping handle, or 0 for .so builtin */
1548 unsigned int access; /* wanted access rights */
1549 client_ptr_t base; /* view base address (page-aligned) */
1550 mem_size_t size; /* view size */
1551 file_pos_t start; /* start offset in mapping */
1552 VARARG(image,pe_image_info);/* image info for .so builtins */
1553 VARARG(name,unicode_str); /* image filename for .so builtins */
1554 @END
1557 /* Unmap a memory view from the current process */
1558 @REQ(unmap_view)
1559 client_ptr_t base; /* view base address */
1560 @END
1563 /* Get a range of committed pages in a file mapping */
1564 @REQ(get_mapping_committed_range)
1565 client_ptr_t base; /* view base address */
1566 file_pos_t offset; /* starting offset (page-aligned, in bytes) */
1567 @REPLY
1568 mem_size_t size; /* size of range starting at offset (page-aligned, in bytes) */
1569 int committed; /* whether it is a committed range */
1570 @END
1573 /* Add a range to the committed pages in a file mapping */
1574 @REQ(add_mapping_committed_range)
1575 client_ptr_t base; /* view base address */
1576 file_pos_t offset; /* starting offset (page-aligned, in bytes) */
1577 mem_size_t size; /* size to set (page-aligned, in bytes) or 0 if only retrieving */
1578 @END
1581 /* Check if two memory maps are for the same file */
1582 @REQ(is_same_mapping)
1583 client_ptr_t base1; /* first view base address */
1584 client_ptr_t base2; /* second view base address */
1585 @END
1588 /* Get the filename of a mapping */
1589 @REQ(get_mapping_filename)
1590 obj_handle_t process; /* process handle */
1591 client_ptr_t addr; /* address inside mapped view (in process address space) */
1592 @REPLY
1593 data_size_t len; /* total filename length in bytes */
1594 VARARG(filename,unicode_str); /* filename in NT format */
1595 @END
1598 struct thread_info
1600 timeout_t start_time;
1601 thread_id_t tid;
1602 int base_priority;
1603 int current_priority;
1604 int unix_tid;
1607 struct process_info
1609 timeout_t start_time;
1610 data_size_t name_len;
1611 int thread_count;
1612 int priority;
1613 process_id_t pid;
1614 process_id_t parent_pid;
1615 int handle_count;
1616 int unix_pid;
1617 int __pad;
1618 /* VARARG(name,unicode_str,name_len); */
1619 /* VARARG(threads,struct thread_info,thread_count); */
1622 /* Get a list of processes and threads currently running */
1623 @REQ(list_processes)
1624 @REPLY
1625 data_size_t info_size;
1626 int process_count;
1627 VARARG(data,process_info,info_size);
1628 @END
1631 /* Create a debug object */
1632 @REQ(create_debug_obj)
1633 unsigned int access; /* wanted access rights */
1634 unsigned int flags; /* object flags */
1635 VARARG(objattr,object_attributes); /* object attributes */
1636 @REPLY
1637 obj_handle_t handle; /* handle to the debug object */
1638 @END
1641 /* Wait for a debug event */
1642 @REQ(wait_debug_event)
1643 obj_handle_t debug; /* debug object */
1644 @REPLY
1645 process_id_t pid; /* process id */
1646 thread_id_t tid; /* thread id */
1647 VARARG(event,debug_event); /* debug event data */
1648 @END
1651 /* Queue an exception event */
1652 @REQ(queue_exception_event)
1653 int first; /* first chance exception? */
1654 unsigned int code; /* exception code */
1655 unsigned int flags; /* exception flags */
1656 client_ptr_t record; /* exception record */
1657 client_ptr_t address; /* exception address */
1658 data_size_t len; /* size of parameters */
1659 VARARG(params,uints64,len);/* exception parameters */
1660 @REPLY
1661 obj_handle_t handle; /* handle to the queued event */
1662 @END
1665 /* Retrieve the status of an exception event */
1666 @REQ(get_exception_status)
1667 obj_handle_t handle; /* handle to the queued event */
1668 @END
1671 /* Continue a debug event */
1672 @REQ(continue_debug_event)
1673 obj_handle_t debug; /* debug object */
1674 process_id_t pid; /* process id to continue */
1675 thread_id_t tid; /* thread id to continue */
1676 unsigned int status; /* continuation status */
1677 @END
1680 /* Start or stop debugging an existing process */
1681 @REQ(debug_process)
1682 obj_handle_t handle; /* process handle */
1683 obj_handle_t debug; /* debug object to attach to the process */
1684 int attach; /* 1=attaching / 0=detaching from the process */
1685 @END
1688 /* Set debug object information */
1689 @REQ(set_debug_obj_info)
1690 obj_handle_t debug; /* debug object */
1691 unsigned int flags; /* object flags */
1692 @END
1695 /* Read data from a process address space */
1696 @REQ(read_process_memory)
1697 obj_handle_t handle; /* process handle */
1698 client_ptr_t addr; /* addr to read from */
1699 @REPLY
1700 VARARG(data,bytes); /* result data */
1701 @END
1704 /* Write data to a process address space */
1705 @REQ(write_process_memory)
1706 obj_handle_t handle; /* process handle */
1707 client_ptr_t addr; /* addr to write to */
1708 VARARG(data,bytes); /* data to write */
1709 @END
1712 /* Create a registry key */
1713 @REQ(create_key)
1714 unsigned int access; /* desired access rights */
1715 unsigned int options; /* creation options */
1716 VARARG(objattr,object_attributes); /* object attributes */
1717 VARARG(class,unicode_str); /* class name */
1718 @REPLY
1719 obj_handle_t hkey; /* handle to the created key */
1720 int created; /* has it been newly created? */
1721 @END
1723 /* Open a registry key */
1724 @REQ(open_key)
1725 obj_handle_t parent; /* handle to the parent key */
1726 unsigned int access; /* desired access rights */
1727 unsigned int attributes; /* object attributes */
1728 VARARG(name,unicode_str); /* key name */
1729 @REPLY
1730 obj_handle_t hkey; /* handle to the open key */
1731 @END
1734 /* Delete a registry key */
1735 @REQ(delete_key)
1736 obj_handle_t hkey; /* handle to the key */
1737 @END
1740 /* Flush a registry key */
1741 @REQ(flush_key)
1742 obj_handle_t hkey; /* handle to the key */
1743 @END
1746 /* Enumerate registry subkeys */
1747 @REQ(enum_key)
1748 obj_handle_t hkey; /* handle to registry key */
1749 int index; /* index of subkey (or -1 for current key) */
1750 int info_class; /* requested information class */
1751 @REPLY
1752 int subkeys; /* number of subkeys */
1753 int max_subkey; /* longest subkey name */
1754 int max_class; /* longest class name */
1755 int values; /* number of values */
1756 int max_value; /* longest value name */
1757 int max_data; /* longest value data */
1758 timeout_t modif; /* last modification time */
1759 data_size_t total; /* total length needed for full name and class */
1760 data_size_t namelen; /* length of key name in bytes */
1761 VARARG(name,unicode_str,namelen); /* key name */
1762 VARARG(class,unicode_str); /* class name */
1763 @END
1766 /* Set a value of a registry key */
1767 @REQ(set_key_value)
1768 obj_handle_t hkey; /* handle to registry key */
1769 int type; /* value type */
1770 data_size_t namelen; /* length of value name in bytes */
1771 VARARG(name,unicode_str,namelen); /* value name */
1772 VARARG(data,bytes); /* value data */
1773 @END
1776 /* Retrieve the value of a registry key */
1777 @REQ(get_key_value)
1778 obj_handle_t hkey; /* handle to registry key */
1779 VARARG(name,unicode_str); /* value name */
1780 @REPLY
1781 int type; /* value type */
1782 data_size_t total; /* total length needed for data */
1783 VARARG(data,bytes); /* value data */
1784 @END
1787 /* Enumerate a value of a registry key */
1788 @REQ(enum_key_value)
1789 obj_handle_t hkey; /* handle to registry key */
1790 int index; /* value index */
1791 int info_class; /* requested information class */
1792 @REPLY
1793 int type; /* value type */
1794 data_size_t total; /* total length needed for full name and data */
1795 data_size_t namelen; /* length of value name in bytes */
1796 VARARG(name,unicode_str,namelen); /* value name */
1797 VARARG(data,bytes); /* value data */
1798 @END
1801 /* Delete a value of a registry key */
1802 @REQ(delete_key_value)
1803 obj_handle_t hkey; /* handle to registry key */
1804 VARARG(name,unicode_str); /* value name */
1805 @END
1808 /* Load a registry branch from a file */
1809 @REQ(load_registry)
1810 obj_handle_t file; /* file to load from */
1811 VARARG(objattr,object_attributes); /* object attributes */
1812 @END
1815 /* UnLoad a registry branch from a file */
1816 @REQ(unload_registry)
1817 obj_handle_t parent; /* handle to the parent key */
1818 unsigned int attributes; /* object attributes */
1819 VARARG(name,unicode_str); /* key name */
1820 @END
1823 /* Save a registry branch to a file */
1824 @REQ(save_registry)
1825 obj_handle_t hkey; /* key to save */
1826 obj_handle_t file; /* file to save to */
1827 @END
1830 /* Add a registry key change notification */
1831 @REQ(set_registry_notification)
1832 obj_handle_t hkey; /* key to watch for changes */
1833 obj_handle_t event; /* event to set */
1834 int subtree; /* should we watch the whole subtree? */
1835 unsigned int filter; /* things to watch */
1836 @END
1839 /* Create a waitable timer */
1840 @REQ(create_timer)
1841 unsigned int access; /* wanted access rights */
1842 int manual; /* manual reset */
1843 VARARG(objattr,object_attributes); /* object attributes */
1844 @REPLY
1845 obj_handle_t handle; /* handle to the timer */
1846 @END
1849 /* Open a waitable timer */
1850 @REQ(open_timer)
1851 unsigned int access; /* wanted access rights */
1852 unsigned int attributes; /* object attributes */
1853 obj_handle_t rootdir; /* root directory */
1854 VARARG(name,unicode_str); /* object name */
1855 @REPLY
1856 obj_handle_t handle; /* handle to the timer */
1857 @END
1859 /* Set a waitable timer */
1860 @REQ(set_timer)
1861 obj_handle_t handle; /* handle to the timer */
1862 timeout_t expire; /* next expiration absolute time */
1863 client_ptr_t callback; /* callback function */
1864 client_ptr_t arg; /* callback argument */
1865 int period; /* timer period in ms */
1866 @REPLY
1867 int signaled; /* was the timer signaled before this call ? */
1868 @END
1870 /* Cancel a waitable timer */
1871 @REQ(cancel_timer)
1872 obj_handle_t handle; /* handle to the timer */
1873 @REPLY
1874 int signaled; /* was the timer signaled before this calltime ? */
1875 @END
1877 /* Get information on a waitable timer */
1878 @REQ(get_timer_info)
1879 obj_handle_t handle; /* handle to the timer */
1880 @REPLY
1881 timeout_t when; /* absolute time when the timer next expires */
1882 int signaled; /* is the timer signaled? */
1883 @END
1886 /* Retrieve the current context of a thread */
1887 @REQ(get_thread_context)
1888 obj_handle_t handle; /* thread or context handle */
1889 unsigned int flags; /* context flags */
1890 @REPLY
1891 int self; /* was it a handle to the current thread? */
1892 obj_handle_t handle; /* pending context handle */
1893 VARARG(context,context); /* thread context */
1894 @END
1897 /* Set the current context of a thread */
1898 @REQ(set_thread_context)
1899 obj_handle_t handle; /* thread handle */
1900 VARARG(context,context); /* thread context */
1901 @REPLY
1902 int self; /* was it a handle to the current thread? */
1903 @END
1906 /* Fetch a selector entry for a thread */
1907 @REQ(get_selector_entry)
1908 obj_handle_t handle; /* thread handle */
1909 int entry; /* LDT entry */
1910 @REPLY
1911 unsigned int base; /* selector base */
1912 unsigned int limit; /* selector limit */
1913 unsigned char flags; /* selector flags */
1914 @END
1917 /* Add an atom */
1918 @REQ(add_atom)
1919 VARARG(name,unicode_str); /* atom name */
1920 @REPLY
1921 atom_t atom; /* resulting atom */
1922 @END
1925 /* Delete an atom */
1926 @REQ(delete_atom)
1927 atom_t atom; /* atom handle */
1928 @END
1931 /* Find an atom */
1932 @REQ(find_atom)
1933 VARARG(name,unicode_str); /* atom name */
1934 @REPLY
1935 atom_t atom; /* atom handle */
1936 @END
1939 /* Get information about an atom */
1940 @REQ(get_atom_information)
1941 atom_t atom; /* atom handle */
1942 @REPLY
1943 int count; /* atom lock count */
1944 int pinned; /* whether the atom has been pinned */
1945 data_size_t total; /* actual length of atom name */
1946 VARARG(name,unicode_str); /* atom name */
1947 @END
1950 /* Get the message queue of the current thread */
1951 @REQ(get_msg_queue)
1952 @REPLY
1953 obj_handle_t handle; /* handle to the queue */
1954 @END
1957 /* Set the file descriptor associated to the current thread queue */
1958 @REQ(set_queue_fd)
1959 obj_handle_t handle; /* handle to the file descriptor */
1960 @END
1963 /* Set the current message queue wakeup mask */
1964 @REQ(set_queue_mask)
1965 unsigned int wake_mask; /* wakeup bits mask */
1966 unsigned int changed_mask; /* changed bits mask */
1967 int skip_wait; /* will we skip waiting if signaled? */
1968 @REPLY
1969 unsigned int wake_bits; /* current wake bits */
1970 unsigned int changed_bits; /* current changed bits */
1971 @END
1974 /* Get the current message queue status */
1975 @REQ(get_queue_status)
1976 unsigned int clear_bits; /* should we clear the change bits? */
1977 @REPLY
1978 unsigned int wake_bits; /* wake bits */
1979 unsigned int changed_bits; /* changed bits since last time */
1980 @END
1983 /* Retrieve the process idle event */
1984 @REQ(get_process_idle_event)
1985 obj_handle_t handle; /* process handle */
1986 @REPLY
1987 obj_handle_t event; /* handle to idle event */
1988 @END
1991 /* Send a message to a thread queue */
1992 @REQ(send_message)
1993 thread_id_t id; /* thread id */
1994 int type; /* message type (see below) */
1995 int flags; /* message flags (see below) */
1996 user_handle_t win; /* window handle */
1997 unsigned int msg; /* message code */
1998 lparam_t wparam; /* parameters */
1999 lparam_t lparam; /* parameters */
2000 timeout_t timeout; /* timeout for reply */
2001 VARARG(data,message_data); /* message data for sent messages */
2002 @END
2004 @REQ(post_quit_message)
2005 int exit_code; /* exit code to return */
2006 @END
2008 enum message_type
2010 MSG_ASCII, /* Ascii message (from SendMessageA) */
2011 MSG_UNICODE, /* Unicode message (from SendMessageW) */
2012 MSG_NOTIFY, /* notify message (from SendNotifyMessageW), always Unicode */
2013 MSG_CALLBACK, /* callback message (from SendMessageCallbackW), always Unicode */
2014 MSG_CALLBACK_RESULT,/* result of a callback message */
2015 MSG_OTHER_PROCESS, /* sent from other process, may include vararg data, always Unicode */
2016 MSG_POSTED, /* posted message (from PostMessageW), always Unicode */
2017 MSG_HARDWARE, /* hardware message */
2018 MSG_WINEVENT, /* winevent message */
2019 MSG_HOOK_LL /* low-level hardware hook */
2021 #define SEND_MSG_ABORT_IF_HUNG 0x01
2024 /* Send a hardware message to a thread queue */
2025 @REQ(send_hardware_message)
2026 user_handle_t win; /* window handle */
2027 hw_input_t input; /* input data */
2028 unsigned int flags; /* flags (see below) */
2029 @REPLY
2030 int wait; /* do we need to wait for a reply? */
2031 int prev_x; /* previous cursor position */
2032 int prev_y;
2033 int new_x; /* new cursor position */
2034 int new_y;
2035 VARARG(keystate,bytes); /* global state array for all the keys */
2036 @END
2037 #define SEND_HWMSG_INJECTED 0x01
2040 /* Get a message from the current queue */
2041 @REQ(get_message)
2042 unsigned int flags; /* PM_* flags */
2043 user_handle_t get_win; /* window handle to get */
2044 unsigned int get_first; /* first message code to get */
2045 unsigned int get_last; /* last message code to get */
2046 unsigned int hw_id; /* id of the previous hardware message (or 0) */
2047 unsigned int wake_mask; /* wakeup bits mask */
2048 unsigned int changed_mask; /* changed bits mask */
2049 @REPLY
2050 user_handle_t win; /* window handle */
2051 unsigned int msg; /* message code */
2052 lparam_t wparam; /* parameters */
2053 lparam_t lparam; /* parameters */
2054 int type; /* message type */
2055 int x; /* message x position */
2056 int y; /* message y position */
2057 unsigned int time; /* message time */
2058 unsigned int active_hooks; /* active hooks bitmap */
2059 data_size_t total; /* total size of extra data */
2060 VARARG(data,message_data); /* message data for sent messages */
2061 @END
2064 /* Reply to a sent message */
2065 @REQ(reply_message)
2066 int remove; /* should we remove the message? */
2067 lparam_t result; /* message result */
2068 VARARG(data,bytes); /* message data for sent messages */
2069 @END
2072 /* Accept and remove the current hardware message */
2073 @REQ(accept_hardware_message)
2074 unsigned int hw_id; /* id of the hardware message */
2075 @END
2078 /* Retrieve the reply for the last message sent */
2079 @REQ(get_message_reply)
2080 int cancel; /* cancel message if not ready? */
2081 @REPLY
2082 lparam_t result; /* message result */
2083 VARARG(data,bytes); /* message data for sent messages */
2084 @END
2087 /* Set a window timer */
2088 @REQ(set_win_timer)
2089 user_handle_t win; /* window handle */
2090 unsigned int msg; /* message to post */
2091 unsigned int rate; /* timer rate in ms */
2092 lparam_t id; /* timer id */
2093 lparam_t lparam; /* message lparam (callback proc) */
2094 @REPLY
2095 lparam_t id; /* timer id */
2096 @END
2099 /* Kill a window timer */
2100 @REQ(kill_win_timer)
2101 user_handle_t win; /* window handle */
2102 lparam_t id; /* timer id */
2103 unsigned int msg; /* message to post */
2104 @END
2107 /* check if the thread owning the window is hung */
2108 @REQ(is_window_hung)
2109 user_handle_t win; /* window handle */
2110 @REPLY
2111 int is_hung;
2112 @END
2115 /* Retrieve info about a serial port */
2116 @REQ(get_serial_info)
2117 obj_handle_t handle; /* handle to comm port */
2118 int flags;
2119 @REPLY
2120 unsigned int eventmask;
2121 unsigned int cookie;
2122 unsigned int pending_write;
2123 @END
2126 /* Set info about a serial port */
2127 @REQ(set_serial_info)
2128 obj_handle_t handle; /* handle to comm port */
2129 int flags; /* bitmask to set values (see below) */
2130 @END
2131 #define SERIALINFO_PENDING_WRITE 0x04
2132 #define SERIALINFO_PENDING_WAIT 0x08
2135 /* Create an async I/O */
2136 @REQ(register_async)
2137 int type; /* type of queue to look after */
2138 async_data_t async; /* async I/O parameters */
2139 int count; /* count - usually # of bytes to be read/written */
2140 @END
2141 #define ASYNC_TYPE_READ 0x01
2142 #define ASYNC_TYPE_WRITE 0x02
2143 #define ASYNC_TYPE_WAIT 0x03
2146 /* Cancel all async op on a fd */
2147 @REQ(cancel_async)
2148 obj_handle_t handle; /* handle to comm port, socket or file */
2149 client_ptr_t iosb; /* I/O status block (NULL=all) */
2150 int only_thread; /* cancel matching this thread */
2151 @END
2154 /* Retrieve results of an async */
2155 @REQ(get_async_result)
2156 client_ptr_t user_arg; /* user arg used to identify async */
2157 @REPLY
2158 data_size_t size; /* result size (input or output depending on the operation) */
2159 VARARG(out_data,bytes); /* iosb output data */
2160 @END
2163 /* Perform a read on a file object */
2164 @REQ(read)
2165 async_data_t async; /* async I/O parameters */
2166 file_pos_t pos; /* read position */
2167 @REPLY
2168 obj_handle_t wait; /* handle to wait on for blocking read */
2169 unsigned int options; /* device open options */
2170 VARARG(data,bytes); /* read data */
2171 @END
2174 /* Perform a write on a file object */
2175 @REQ(write)
2176 async_data_t async; /* async I/O parameters */
2177 file_pos_t pos; /* write position */
2178 VARARG(data,bytes); /* write data */
2179 @REPLY
2180 obj_handle_t wait; /* handle to wait on for blocking write */
2181 unsigned int options; /* device open options */
2182 data_size_t size; /* size written */
2183 @END
2186 /* Perform an ioctl on a file */
2187 @REQ(ioctl)
2188 ioctl_code_t code; /* ioctl code */
2189 async_data_t async; /* async I/O parameters */
2190 VARARG(in_data,bytes); /* ioctl input data */
2191 @REPLY
2192 obj_handle_t wait; /* handle to wait on for blocking ioctl */
2193 unsigned int options; /* device open options */
2194 VARARG(out_data,bytes); /* ioctl output data */
2195 @END
2198 /* Store results of an async irp */
2199 @REQ(set_irp_result)
2200 obj_handle_t handle; /* handle to the irp */
2201 unsigned int status; /* status of the irp */
2202 data_size_t size; /* result size (input or output depending on the operation) */
2203 VARARG(data,bytes); /* output data of the irp */
2204 @END
2207 /* Create a named pipe */
2208 @REQ(create_named_pipe)
2209 unsigned int access;
2210 unsigned int options;
2211 unsigned int sharing;
2212 unsigned int maxinstances;
2213 unsigned int outsize;
2214 unsigned int insize;
2215 timeout_t timeout;
2216 unsigned int flags;
2217 VARARG(objattr,object_attributes); /* object attributes */
2218 @REPLY
2219 obj_handle_t handle; /* handle to the pipe */
2220 @END
2222 /* flags in create_named_pipe and get_named_pipe_info */
2223 #define NAMED_PIPE_MESSAGE_STREAM_WRITE 0x0001
2224 #define NAMED_PIPE_MESSAGE_STREAM_READ 0x0002
2225 #define NAMED_PIPE_NONBLOCKING_MODE 0x0004
2226 #define NAMED_PIPE_SERVER_END 0x8000
2228 /* Set named pipe information by handle */
2229 @REQ(set_named_pipe_info)
2230 obj_handle_t handle;
2231 unsigned int flags;
2232 @END
2234 /* Create a window */
2235 @REQ(create_window)
2236 user_handle_t parent; /* parent window */
2237 user_handle_t owner; /* owner window */
2238 atom_t atom; /* class atom */
2239 mod_handle_t instance; /* module instance */
2240 int dpi; /* system DPI */
2241 int awareness; /* thread DPI awareness */
2242 VARARG(class,unicode_str); /* class name */
2243 @REPLY
2244 user_handle_t handle; /* created window */
2245 user_handle_t parent; /* full handle of parent */
2246 user_handle_t owner; /* full handle of owner */
2247 int extra; /* number of extra bytes */
2248 client_ptr_t class_ptr; /* pointer to class in client address space */
2249 int dpi; /* window DPI if not per-monitor aware */
2250 int awareness; /* window DPI awareness */
2251 @END
2254 /* Destroy a window */
2255 @REQ(destroy_window)
2256 user_handle_t handle; /* handle to the window */
2257 @END
2260 /* Retrieve the desktop window for the current thread */
2261 @REQ(get_desktop_window)
2262 int force; /* force creation if it doesn't exist */
2263 @REPLY
2264 user_handle_t top_window; /* handle to the desktop window */
2265 user_handle_t msg_window; /* handle to the top-level HWND_MESSAGE parent */
2266 @END
2269 /* Set a window owner */
2270 @REQ(set_window_owner)
2271 user_handle_t handle; /* handle to the window */
2272 user_handle_t owner; /* new owner */
2273 @REPLY
2274 user_handle_t full_owner; /* full handle of new owner */
2275 user_handle_t prev_owner; /* full handle of previous owner */
2276 @END
2279 /* Get information from a window handle */
2280 @REQ(get_window_info)
2281 user_handle_t handle; /* handle to the window */
2282 @REPLY
2283 user_handle_t full_handle; /* full 32-bit handle */
2284 user_handle_t last_active; /* last active popup */
2285 process_id_t pid; /* process owning the window */
2286 thread_id_t tid; /* thread owning the window */
2287 atom_t atom; /* class atom */
2288 int is_unicode; /* ANSI or unicode */
2289 int dpi; /* window DPI */
2290 int awareness; /* DPI awareness */
2291 @END
2294 /* Set some information in a window */
2295 @REQ(set_window_info)
2296 unsigned short flags; /* flags for fields to set (see below) */
2297 short int is_unicode; /* ANSI or unicode */
2298 user_handle_t handle; /* handle to the window */
2299 unsigned int style; /* window style */
2300 unsigned int ex_style; /* window extended style */
2301 unsigned int id; /* window id */
2302 mod_handle_t instance; /* creator instance */
2303 lparam_t user_data; /* user-specific data */
2304 int extra_offset; /* offset to set in extra bytes */
2305 data_size_t extra_size; /* size to set in extra bytes */
2306 lparam_t extra_value; /* value to set in extra bytes */
2307 @REPLY
2308 unsigned int old_style; /* old window style */
2309 unsigned int old_ex_style; /* old window extended style */
2310 mod_handle_t old_instance; /* old creator instance */
2311 lparam_t old_user_data; /* old user-specific data */
2312 lparam_t old_extra_value; /* old value in extra bytes */
2313 unsigned int old_id; /* old window id */
2314 @END
2315 #define SET_WIN_STYLE 0x01
2316 #define SET_WIN_EXSTYLE 0x02
2317 #define SET_WIN_ID 0x04
2318 #define SET_WIN_INSTANCE 0x08
2319 #define SET_WIN_USERDATA 0x10
2320 #define SET_WIN_EXTRA 0x20
2321 #define SET_WIN_UNICODE 0x40
2324 /* Set the parent of a window */
2325 @REQ(set_parent)
2326 user_handle_t handle; /* handle to the window */
2327 user_handle_t parent; /* handle to the parent */
2328 @REPLY
2329 user_handle_t old_parent; /* old parent window */
2330 user_handle_t full_parent; /* full handle of new parent */
2331 int dpi; /* new window DPI if not per-monitor aware */
2332 int awareness; /* new DPI awareness */
2333 @END
2336 /* Get a list of the window parents, up to the root of the tree */
2337 @REQ(get_window_parents)
2338 user_handle_t handle; /* handle to the window */
2339 @REPLY
2340 int count; /* total count of parents */
2341 VARARG(parents,user_handles); /* parent handles */
2342 @END
2345 /* Get a list of the window children */
2346 @REQ(get_window_children)
2347 obj_handle_t desktop; /* handle to desktop */
2348 user_handle_t parent; /* parent window */
2349 atom_t atom; /* class atom for the listed children */
2350 thread_id_t tid; /* thread owning the listed children */
2351 VARARG(class,unicode_str); /* class name */
2352 @REPLY
2353 int count; /* total count of children */
2354 VARARG(children,user_handles); /* children handles */
2355 @END
2358 /* Get a list of the window children that contain a given point */
2359 @REQ(get_window_children_from_point)
2360 user_handle_t parent; /* parent window */
2361 int x; /* point in parent coordinates */
2362 int y;
2363 int dpi; /* dpi for the point coordinates */
2364 @REPLY
2365 int count; /* total count of children */
2366 VARARG(children,user_handles); /* children handles */
2367 @END
2370 /* Get window tree information from a window handle */
2371 @REQ(get_window_tree)
2372 user_handle_t handle; /* handle to the window */
2373 @REPLY
2374 user_handle_t parent; /* parent window */
2375 user_handle_t owner; /* owner window */
2376 user_handle_t next_sibling; /* next sibling in Z-order */
2377 user_handle_t prev_sibling; /* prev sibling in Z-order */
2378 user_handle_t first_sibling; /* first sibling in Z-order */
2379 user_handle_t last_sibling; /* last sibling in Z-order */
2380 user_handle_t first_child; /* first child */
2381 user_handle_t last_child; /* last child */
2382 @END
2384 /* Set the position and Z order of a window */
2385 @REQ(set_window_pos)
2386 unsigned short swp_flags; /* SWP_* flags */
2387 unsigned short paint_flags; /* paint flags (see below) */
2388 user_handle_t handle; /* handle to the window */
2389 user_handle_t previous; /* previous window in Z order */
2390 rectangle_t window; /* window rectangle (in parent coords) */
2391 rectangle_t client; /* client rectangle (in parent coords) */
2392 VARARG(valid,rectangles); /* valid rectangles from WM_NCCALCSIZE (in parent coords) */
2393 @REPLY
2394 unsigned int new_style; /* new window style */
2395 unsigned int new_ex_style; /* new window extended style */
2396 user_handle_t surface_win; /* parent window that holds the surface */
2397 int needs_update; /* whether the surface region needs an update */
2398 @END
2399 #define SET_WINPOS_PAINT_SURFACE 0x01 /* window has a paintable surface */
2400 #define SET_WINPOS_PIXEL_FORMAT 0x02 /* window has a custom pixel format */
2402 /* Get the window and client rectangles of a window */
2403 @REQ(get_window_rectangles)
2404 user_handle_t handle; /* handle to the window */
2405 int relative; /* coords relative to (see below) */
2406 int dpi; /* DPI to map to, or zero for per-monitor DPI */
2407 @REPLY
2408 rectangle_t window; /* window rectangle */
2409 rectangle_t client; /* client rectangle */
2410 @END
2411 enum coords_relative
2413 COORDS_CLIENT, /* relative to client area */
2414 COORDS_WINDOW, /* relative to whole window area */
2415 COORDS_PARENT, /* relative to parent's client area */
2416 COORDS_SCREEN /* relative to screen origin */
2420 /* Get the window text */
2421 @REQ(get_window_text)
2422 user_handle_t handle; /* handle to the window */
2423 @REPLY
2424 data_size_t length; /* total length in WCHARs */
2425 VARARG(text,unicode_str); /* window text */
2426 @END
2429 /* Set the window text */
2430 @REQ(set_window_text)
2431 user_handle_t handle; /* handle to the window */
2432 VARARG(text,unicode_str); /* window text */
2433 @END
2436 /* Get the coordinates offset between two windows */
2437 @REQ(get_windows_offset)
2438 user_handle_t from; /* handle to the first window */
2439 user_handle_t to; /* handle to the second window */
2440 int dpi; /* DPI to map to, or zero for per-monitor DPI */
2441 @REPLY
2442 int x; /* x coordinate offset */
2443 int y; /* y coordinate offset */
2444 int mirror; /* whether to mirror the x coordinate */
2445 @END
2448 /* Get the visible region of a window */
2449 @REQ(get_visible_region)
2450 user_handle_t window; /* handle to the window */
2451 unsigned int flags; /* DCX flags */
2452 @REPLY
2453 user_handle_t top_win; /* top window to clip against */
2454 rectangle_t top_rect; /* top window visible rect with screen coords */
2455 rectangle_t win_rect; /* window rect in screen coords */
2456 unsigned int paint_flags; /* paint flags (from SET_WINPOS_* flags) */
2457 data_size_t total_size; /* total size of the resulting region */
2458 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2459 @END
2462 /* Get the visible surface region of a window */
2463 @REQ(get_surface_region)
2464 user_handle_t window; /* handle to the window */
2465 @REPLY
2466 rectangle_t visible_rect; /* window visible rect in screen coords */
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
2472 /* Get the window region */
2473 @REQ(get_window_region)
2474 user_handle_t window; /* handle to the window */
2475 @REPLY
2476 data_size_t total_size; /* total size of the resulting region */
2477 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2478 @END
2481 /* Set the window region */
2482 @REQ(set_window_region)
2483 user_handle_t window; /* handle to the window */
2484 int redraw; /* redraw the window? */
2485 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2486 @END
2489 /* Get the window update region */
2490 @REQ(get_update_region)
2491 user_handle_t window; /* handle to the window */
2492 user_handle_t from_child; /* child to start searching from */
2493 unsigned int flags; /* update flags (see below) */
2494 @REPLY
2495 user_handle_t child; /* child to repaint (or window itself) */
2496 unsigned int flags; /* resulting update flags (see below) */
2497 data_size_t total_size; /* total size of the resulting region */
2498 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2499 @END
2500 #define UPDATE_NONCLIENT 0x001 /* get region for repainting non-client area */
2501 #define UPDATE_ERASE 0x002 /* get region for erasing client area */
2502 #define UPDATE_PAINT 0x004 /* get region for painting client area */
2503 #define UPDATE_INTERNALPAINT 0x008 /* get region if internal paint is pending */
2504 #define UPDATE_ALLCHILDREN 0x010 /* force repaint of all children */
2505 #define UPDATE_NOCHILDREN 0x020 /* don't try to repaint any children */
2506 #define UPDATE_NOREGION 0x040 /* don't return a region, only the flags */
2507 #define UPDATE_DELAYED_ERASE 0x080 /* still needs erase after BeginPaint */
2508 #define UPDATE_CLIPCHILDREN 0x100 /* remove clipped children from the update region */
2511 /* Update the z order of a window so that a given rectangle is fully visible */
2512 @REQ(update_window_zorder)
2513 user_handle_t window; /* handle to the window */
2514 rectangle_t rect; /* rectangle that must be visible (in client coords) */
2515 @END
2518 /* Mark parts of a window as needing a redraw */
2519 @REQ(redraw_window)
2520 user_handle_t window; /* handle to the window */
2521 unsigned int flags; /* RDW_* flags */
2522 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2523 @END
2526 /* Set a window property */
2527 @REQ(set_window_property)
2528 user_handle_t window; /* handle to the window */
2529 lparam_t data; /* data to store */
2530 atom_t atom; /* property atom (if no name specified) */
2531 VARARG(name,unicode_str); /* property name */
2532 @END
2535 /* Remove a window property */
2536 @REQ(remove_window_property)
2537 user_handle_t window; /* handle to the window */
2538 atom_t atom; /* property atom (if no name specified) */
2539 VARARG(name,unicode_str); /* property name */
2540 @REPLY
2541 lparam_t data; /* data stored in property */
2542 @END
2545 /* Get a window property */
2546 @REQ(get_window_property)
2547 user_handle_t window; /* handle to the window */
2548 atom_t atom; /* property atom (if no name specified) */
2549 VARARG(name,unicode_str); /* property name */
2550 @REPLY
2551 lparam_t data; /* data stored in property */
2552 @END
2555 /* Get the list of properties of a window */
2556 @REQ(get_window_properties)
2557 user_handle_t window; /* handle to the window */
2558 @REPLY
2559 int total; /* total number of properties */
2560 VARARG(props,properties); /* list of properties */
2561 @END
2564 /* Create a window station */
2565 @REQ(create_winstation)
2566 unsigned int flags; /* window station flags */
2567 unsigned int access; /* wanted access rights */
2568 unsigned int attributes; /* object attributes */
2569 obj_handle_t rootdir; /* root directory */
2570 VARARG(name,unicode_str); /* object name */
2571 @REPLY
2572 obj_handle_t handle; /* handle to the window station */
2573 @END
2576 /* Open a handle to a window station */
2577 @REQ(open_winstation)
2578 unsigned int access; /* wanted access rights */
2579 unsigned int attributes; /* object attributes */
2580 obj_handle_t rootdir; /* root directory */
2581 VARARG(name,unicode_str); /* object name */
2582 @REPLY
2583 obj_handle_t handle; /* handle to the window station */
2584 @END
2587 /* Close a window station */
2588 @REQ(close_winstation)
2589 obj_handle_t handle; /* handle to the window station */
2590 @END
2593 /* Get the process current window station */
2594 @REQ(get_process_winstation)
2595 @REPLY
2596 obj_handle_t handle; /* handle to the window station */
2597 @END
2600 /* Set the process current window station */
2601 @REQ(set_process_winstation)
2602 obj_handle_t handle; /* handle to the window station */
2603 @END
2606 /* Enumerate window stations */
2607 @REQ(enum_winstation)
2608 unsigned int index; /* current index */
2609 @REPLY
2610 unsigned int next; /* next index */
2611 VARARG(name,unicode_str); /* window station name */
2612 @END
2615 /* Create a desktop */
2616 @REQ(create_desktop)
2617 unsigned int flags; /* desktop flags */
2618 unsigned int access; /* wanted access rights */
2619 unsigned int attributes; /* object attributes */
2620 VARARG(name,unicode_str); /* object name */
2621 @REPLY
2622 obj_handle_t handle; /* handle to the desktop */
2623 @END
2626 /* Open a handle to a desktop */
2627 @REQ(open_desktop)
2628 obj_handle_t winsta; /* window station to open (null allowed) */
2629 unsigned int flags; /* desktop flags */
2630 unsigned int access; /* wanted access rights */
2631 unsigned int attributes; /* object attributes */
2632 VARARG(name,unicode_str); /* object name */
2633 @REPLY
2634 obj_handle_t handle; /* handle to the desktop */
2635 @END
2638 /* Open a handle to current input desktop */
2639 @REQ(open_input_desktop)
2640 unsigned int flags; /* desktop flags */
2641 unsigned int access; /* wanted access rights */
2642 unsigned int attributes; /* object attributes */
2643 @REPLY
2644 obj_handle_t handle; /* handle to the desktop */
2645 @END
2648 /* Close a desktop */
2649 @REQ(close_desktop)
2650 obj_handle_t handle; /* handle to the desktop */
2651 @END
2654 /* Get the thread current desktop */
2655 @REQ(get_thread_desktop)
2656 thread_id_t tid; /* thread id */
2657 @REPLY
2658 obj_handle_t handle; /* handle to the desktop */
2659 @END
2662 /* Set the thread current desktop */
2663 @REQ(set_thread_desktop)
2664 obj_handle_t handle; /* handle to the desktop */
2665 @END
2668 /* Enumerate desktops */
2669 @REQ(enum_desktop)
2670 obj_handle_t winstation; /* handle to the window station */
2671 unsigned int index; /* current index */
2672 @REPLY
2673 unsigned int next; /* next index */
2674 VARARG(name,unicode_str); /* window station name */
2675 @END
2678 /* Get/set information about a user object (window station or desktop) */
2679 @REQ(set_user_object_info)
2680 obj_handle_t handle; /* handle to the object */
2681 unsigned int flags; /* information to set/get */
2682 unsigned int obj_flags; /* new object flags */
2683 @REPLY
2684 int is_desktop; /* is object a desktop? */
2685 unsigned int old_obj_flags; /* old object flags */
2686 VARARG(name,unicode_str); /* object name */
2687 @END
2688 #define SET_USER_OBJECT_SET_FLAGS 1
2689 #define SET_USER_OBJECT_GET_FULL_NAME 2
2692 /* Register a hotkey */
2693 @REQ(register_hotkey)
2694 user_handle_t window; /* handle to the window */
2695 int id; /* hotkey identifier */
2696 unsigned int flags; /* modifier keys */
2697 unsigned int vkey; /* virtual key code */
2698 @REPLY
2699 int replaced; /* did we replace an existing hotkey? */
2700 unsigned int flags; /* flags of replaced hotkey */
2701 unsigned int vkey; /* virtual key code of replaced hotkey */
2702 @END
2705 /* Unregister a hotkey */
2706 @REQ(unregister_hotkey)
2707 user_handle_t window; /* handle to the window */
2708 int id; /* hotkey identifier */
2709 @REPLY
2710 unsigned int flags; /* flags of removed hotkey */
2711 unsigned int vkey; /* virtual key code of removed hotkey */
2712 @END
2715 /* Attach (or detach) thread inputs */
2716 @REQ(attach_thread_input)
2717 thread_id_t tid_from; /* thread to be attached */
2718 thread_id_t tid_to; /* thread to which tid_from should be attached */
2719 int attach; /* is it an attach? */
2720 @END
2723 /* Get input data for a given thread */
2724 @REQ(get_thread_input)
2725 thread_id_t tid; /* id of thread */
2726 @REPLY
2727 user_handle_t focus; /* handle to the focus window */
2728 user_handle_t capture; /* handle to the capture window */
2729 user_handle_t active; /* handle to the active window */
2730 user_handle_t foreground; /* handle to the global foreground window */
2731 user_handle_t menu_owner; /* handle to the menu owner */
2732 user_handle_t move_size; /* handle to the moving/resizing window */
2733 user_handle_t caret; /* handle to the caret window */
2734 user_handle_t cursor; /* handle to the cursor */
2735 int show_count; /* cursor show count */
2736 rectangle_t rect; /* caret rectangle */
2737 @END
2740 /* Get the time of the last input event */
2741 @REQ(get_last_input_time)
2742 @REPLY
2743 unsigned int time;
2744 @END
2747 /* Retrieve queue keyboard state for current thread or global async state */
2748 @REQ(get_key_state)
2749 int async; /* whether to query the async state */
2750 int key; /* optional key code or -1 */
2751 @REPLY
2752 unsigned char state; /* state of specified key */
2753 VARARG(keystate,bytes); /* state array for all the keys */
2754 @END
2756 /* Set queue keyboard state for current thread */
2757 @REQ(set_key_state)
2758 int async; /* whether to change the async state too */
2759 VARARG(keystate,bytes); /* state array for all the keys */
2760 @END
2762 /* Set the system foreground window */
2763 @REQ(set_foreground_window)
2764 user_handle_t handle; /* handle to the foreground window */
2765 @REPLY
2766 user_handle_t previous; /* handle to the previous foreground window */
2767 int send_msg_old; /* whether we have to send a msg to the old window */
2768 int send_msg_new; /* whether we have to send a msg to the new window */
2769 @END
2771 /* Set the current thread focus window */
2772 @REQ(set_focus_window)
2773 user_handle_t handle; /* handle to the focus window */
2774 @REPLY
2775 user_handle_t previous; /* handle to the previous focus window */
2776 @END
2778 /* Set the current thread active window */
2779 @REQ(set_active_window)
2780 user_handle_t handle; /* handle to the active window */
2781 @REPLY
2782 user_handle_t previous; /* handle to the previous active window */
2783 @END
2785 /* Set the current thread capture window */
2786 @REQ(set_capture_window)
2787 user_handle_t handle; /* handle to the capture window */
2788 unsigned int flags; /* capture flags (see below) */
2789 @REPLY
2790 user_handle_t previous; /* handle to the previous capture window */
2791 user_handle_t full_handle; /* full 32-bit handle of new capture window */
2792 @END
2793 #define CAPTURE_MENU 0x01 /* capture is for a menu */
2794 #define CAPTURE_MOVESIZE 0x02 /* capture is for moving/resizing */
2797 /* Set the current thread caret window */
2798 @REQ(set_caret_window)
2799 user_handle_t handle; /* handle to the caret window */
2800 int width; /* caret width */
2801 int height; /* caret height */
2802 @REPLY
2803 user_handle_t previous; /* handle to the previous caret window */
2804 rectangle_t old_rect; /* previous caret rectangle */
2805 int old_hide; /* previous hide count */
2806 int old_state; /* previous caret state (1=on, 0=off) */
2807 @END
2810 /* Set the current thread caret information */
2811 @REQ(set_caret_info)
2812 unsigned int flags; /* caret flags (see below) */
2813 user_handle_t handle; /* handle to the caret window */
2814 int x; /* caret x position */
2815 int y; /* caret y position */
2816 int hide; /* increment for hide count (can be negative to show it) */
2817 int state; /* caret state (see below) */
2818 @REPLY
2819 user_handle_t full_handle; /* handle to the current caret window */
2820 rectangle_t old_rect; /* previous caret rectangle */
2821 int old_hide; /* previous hide count */
2822 int old_state; /* previous caret state (1=on, 0=off) */
2823 @END
2824 #define SET_CARET_POS 0x01 /* set the caret position from x,y */
2825 #define SET_CARET_HIDE 0x02 /* increment the caret hide count */
2826 #define SET_CARET_STATE 0x04 /* set the caret on/off state */
2827 enum caret_state
2829 CARET_STATE_OFF, /* off */
2830 CARET_STATE_ON, /* on */
2831 CARET_STATE_TOGGLE, /* toggle current state */
2832 CARET_STATE_ON_IF_MOVED /* on if the position differs, unchanged otherwise */
2836 /* Set a window hook */
2837 @REQ(set_hook)
2838 int id; /* id of the hook */
2839 process_id_t pid; /* id of process to set the hook into */
2840 thread_id_t tid; /* id of thread to set the hook into */
2841 int event_min;
2842 int event_max;
2843 client_ptr_t proc; /* hook procedure */
2844 int flags;
2845 int unicode; /* is it a unicode hook? */
2846 VARARG(module,unicode_str); /* module name */
2847 @REPLY
2848 user_handle_t handle; /* handle to the hook */
2849 unsigned int active_hooks; /* active hooks bitmap */
2850 @END
2853 /* Remove a window hook */
2854 @REQ(remove_hook)
2855 user_handle_t handle; /* handle to the hook */
2856 client_ptr_t proc; /* hook procedure if handle is 0 */
2857 int id; /* id of the hook if handle is 0 */
2858 @REPLY
2859 unsigned int active_hooks; /* active hooks bitmap */
2860 @END
2863 /* Start calling a hook chain */
2864 @REQ(start_hook_chain)
2865 int id; /* id of the hook */
2866 int event; /* signalled event */
2867 user_handle_t window; /* handle to the event window */
2868 int object_id; /* object id for out of context winevent */
2869 int child_id; /* child id for out of context winevent */
2870 @REPLY
2871 user_handle_t handle; /* handle to the next hook */
2872 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2873 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2874 int unicode; /* is it a unicode hook? */
2875 client_ptr_t proc; /* hook procedure */
2876 unsigned int active_hooks; /* active hooks bitmap */
2877 VARARG(module,unicode_str); /* module name */
2878 @END
2881 /* Finished calling a hook chain */
2882 @REQ(finish_hook_chain)
2883 int id; /* id of the hook */
2884 @END
2887 /* Get the hook information */
2888 @REQ(get_hook_info)
2889 user_handle_t handle; /* handle to the current hook */
2890 int get_next; /* do we want info about current or next hook? */
2891 int event; /* signalled event */
2892 user_handle_t window; /* handle to the event window */
2893 int object_id; /* object id for out of context winevent */
2894 int child_id; /* child id for out of context winevent */
2895 @REPLY
2896 user_handle_t handle; /* handle to the hook */
2897 int id; /* id of the hook */
2898 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2899 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2900 client_ptr_t proc; /* hook procedure */
2901 int unicode; /* is it a unicode hook? */
2902 VARARG(module,unicode_str); /* module name */
2903 @END
2906 /* Create a window class */
2907 @REQ(create_class)
2908 int local; /* is it a local class? */
2909 atom_t atom; /* class atom */
2910 unsigned int style; /* class style */
2911 mod_handle_t instance; /* module instance */
2912 int extra; /* number of extra class bytes */
2913 int win_extra; /* number of window extra bytes */
2914 client_ptr_t client_ptr; /* pointer to class in client address space */
2915 data_size_t name_offset; /* base class name offset for specified atom */
2916 VARARG(name,unicode_str); /* class name */
2917 @REPLY
2918 atom_t atom; /* resulting class atom */
2919 @END
2922 /* Destroy a window class */
2923 @REQ(destroy_class)
2924 atom_t atom; /* class atom */
2925 mod_handle_t instance; /* module instance */
2926 VARARG(name,unicode_str); /* class name */
2927 @REPLY
2928 client_ptr_t client_ptr; /* pointer to class in client address space */
2929 @END
2932 /* Set some information in a class */
2933 @REQ(set_class_info)
2934 user_handle_t window; /* handle to the window */
2935 unsigned int flags; /* flags for info to set (see below) */
2936 atom_t atom; /* class atom */
2937 unsigned int style; /* class style */
2938 int win_extra; /* number of window extra bytes */
2939 mod_handle_t instance; /* module instance */
2940 int extra_offset; /* offset to set in extra bytes */
2941 data_size_t extra_size; /* size to set in extra bytes */
2942 lparam_t extra_value; /* value to set in extra bytes */
2943 @REPLY
2944 atom_t old_atom; /* previous class atom */
2945 atom_t base_atom; /* base class atom */
2946 mod_handle_t old_instance; /* previous module instance */
2947 lparam_t old_extra_value; /* old value in extra bytes */
2948 unsigned int old_style; /* previous class style */
2949 int old_extra; /* previous number of class extra bytes */
2950 int old_win_extra; /* previous number of window extra bytes */
2951 @END
2952 #define SET_CLASS_ATOM 0x0001
2953 #define SET_CLASS_STYLE 0x0002
2954 #define SET_CLASS_WINEXTRA 0x0004
2955 #define SET_CLASS_INSTANCE 0x0008
2956 #define SET_CLASS_EXTRA 0x0010
2959 /* Open the clipboard */
2960 @REQ(open_clipboard)
2961 user_handle_t window; /* clipboard window */
2962 @REPLY
2963 user_handle_t owner; /* current clipboard owner */
2964 @END
2967 /* Close the clipboard */
2968 @REQ(close_clipboard)
2969 @REPLY
2970 user_handle_t viewer; /* first clipboard viewer */
2971 user_handle_t owner; /* current clipboard owner */
2972 @END
2975 /* Empty the clipboard and grab ownership */
2976 @REQ(empty_clipboard)
2977 @END
2980 /* Add a data format to the clipboard */
2981 @REQ(set_clipboard_data)
2982 unsigned int format; /* clipboard format of the data */
2983 unsigned int lcid; /* locale id to use for synthesizing text formats */
2984 VARARG(data,bytes); /* data contents */
2985 @REPLY
2986 unsigned int seqno; /* sequence number for the set data */
2987 @END
2990 /* Fetch a data format from the clipboard */
2991 @REQ(get_clipboard_data)
2992 unsigned int format; /* clipboard format of the data */
2993 int render; /* will we try to render it if missing? */
2994 int cached; /* do we already have it in the client-side cache? */
2995 unsigned int seqno; /* sequence number for the data in the cache */
2996 @REPLY
2997 unsigned int from; /* for synthesized data, format to generate it from */
2998 user_handle_t owner; /* clipboard owner for delayed-rendered formats */
2999 unsigned int seqno; /* sequence number for the originally set data */
3000 data_size_t total; /* total data size */
3001 VARARG(data,bytes); /* data contents */
3002 @END
3005 /* Retrieve a list of available formats */
3006 @REQ(get_clipboard_formats)
3007 unsigned int format; /* specific format to query, return all if 0 */
3008 @REPLY
3009 unsigned int count; /* count of available formats */
3010 VARARG(formats,uints); /* array of available formats */
3011 @END
3014 /* Retrieve the next available format */
3015 @REQ(enum_clipboard_formats)
3016 unsigned int previous; /* previous format, or first if 0 */
3017 @REPLY
3018 unsigned int format; /* next format */
3019 @END
3022 /* Release ownership of the clipboard */
3023 @REQ(release_clipboard)
3024 user_handle_t owner; /* clipboard owner to release */
3025 @REPLY
3026 user_handle_t viewer; /* first clipboard viewer */
3027 user_handle_t owner; /* current clipboard owner */
3028 @END
3031 /* Get clipboard information */
3032 @REQ(get_clipboard_info)
3033 @REPLY
3034 user_handle_t window; /* clipboard window */
3035 user_handle_t owner; /* clipboard owner */
3036 user_handle_t viewer; /* clipboard viewer */
3037 unsigned int seqno; /* current sequence number */
3038 @END
3041 /* Set the clipboard viewer window */
3042 @REQ(set_clipboard_viewer)
3043 user_handle_t viewer; /* clipboard viewer */
3044 user_handle_t previous; /* if non-zero, check that this was the previous viewer */
3045 @REPLY
3046 user_handle_t old_viewer; /* previous clipboard viewer */
3047 user_handle_t owner; /* clipboard owner */
3048 @END
3051 /* Add a clipboard listener window */
3052 @REQ(add_clipboard_listener)
3053 user_handle_t window; /* clipboard listener window */
3054 @END
3057 /* Remove a clipboard listener window */
3058 @REQ(remove_clipboard_listener)
3059 user_handle_t window; /* clipboard listener window */
3060 @END
3063 /* Open a security token */
3064 @REQ(open_token)
3065 obj_handle_t handle; /* handle to the thread or process */
3066 unsigned int access; /* access rights to the new token */
3067 unsigned int attributes;/* object attributes */
3068 unsigned int flags; /* flags (see below) */
3069 @REPLY
3070 obj_handle_t token; /* handle to the token */
3071 @END
3072 #define OPEN_TOKEN_THREAD 1
3073 #define OPEN_TOKEN_AS_SELF 2
3076 /* Set/get the global windows */
3077 @REQ(set_global_windows)
3078 unsigned int flags; /* flags for fields to set (see below) */
3079 user_handle_t shell_window; /* handle to the new shell window */
3080 user_handle_t shell_listview; /* handle to the new shell listview window */
3081 user_handle_t progman_window; /* handle to the new program manager window */
3082 user_handle_t taskman_window; /* handle to the new task manager window */
3083 @REPLY
3084 user_handle_t old_shell_window; /* handle to the shell window */
3085 user_handle_t old_shell_listview; /* handle to the shell listview window */
3086 user_handle_t old_progman_window; /* handle to the new program manager window */
3087 user_handle_t old_taskman_window; /* handle to the new task manager window */
3088 @END
3089 #define SET_GLOBAL_SHELL_WINDOWS 0x01 /* set both main shell and listview windows */
3090 #define SET_GLOBAL_PROGMAN_WINDOW 0x02
3091 #define SET_GLOBAL_TASKMAN_WINDOW 0x04
3093 /* Adjust the privileges held by a token */
3094 @REQ(adjust_token_privileges)
3095 obj_handle_t handle; /* handle to the token */
3096 int disable_all; /* disable all privileges? */
3097 int get_modified_state; /* get modified privileges? */
3098 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to enable/disable/remove */
3099 @REPLY
3100 unsigned int len; /* total length in bytes required to store token privileges */
3101 VARARG(privileges,LUID_AND_ATTRIBUTES); /* modified privileges */
3102 @END
3104 /* Retrieves the set of privileges held by or available to a token */
3105 @REQ(get_token_privileges)
3106 obj_handle_t handle; /* handle to the token */
3107 @REPLY
3108 unsigned int len; /* total length in bytes required to store token privileges */
3109 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
3110 @END
3112 /* Check the token has the required privileges */
3113 @REQ(check_token_privileges)
3114 obj_handle_t handle; /* handle to the token */
3115 int all_required; /* are all the privileges required for the check to succeed? */
3116 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to check */
3117 @REPLY
3118 int has_privileges; /* does the token have the required privileges? */
3119 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
3120 @END
3122 @REQ(duplicate_token)
3123 obj_handle_t handle; /* handle to the token to duplicate */
3124 unsigned int access; /* access rights to the new token */
3125 int primary; /* is the new token to be a primary one? */
3126 int impersonation_level; /* impersonation level of the new token */
3127 VARARG(objattr,object_attributes); /* object attributes */
3128 @REPLY
3129 obj_handle_t new_handle; /* duplicated handle */
3130 @END
3132 @REQ(filter_token)
3133 obj_handle_t handle; /* handle to the token to duplicate */
3134 unsigned int flags; /* flags */
3135 data_size_t privileges_size; /* size of privileges */
3136 VARARG(privileges,LUID_AND_ATTRIBUTES,privileges_size); /* privileges to remove from new token */
3137 VARARG(disable_sids,SID); /* array of groups to remove from new token */
3138 @REPLY
3139 obj_handle_t new_handle; /* filtered handle */
3140 @END
3142 @REQ(access_check)
3143 obj_handle_t handle; /* handle to the token */
3144 unsigned int desired_access; /* desired access to the object */
3145 generic_map_t mapping; /* mapping to specific rights */
3146 VARARG(sd,security_descriptor); /* security descriptor to check */
3147 @REPLY
3148 unsigned int access_granted; /* access rights actually granted */
3149 unsigned int access_status; /* was access granted? */
3150 unsigned int privileges_len; /* length needed to store privileges */
3151 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges used during access check */
3152 @END
3154 @REQ(get_token_sid)
3155 obj_handle_t handle; /* handle to the token */
3156 unsigned int which_sid; /* which SID to retrieve from the token */
3157 @REPLY
3158 data_size_t sid_len; /* length needed to store sid */
3159 VARARG(sid,SID); /* the sid specified by which_sid from the token */
3160 @END
3162 @REQ(get_token_groups)
3163 obj_handle_t handle; /* handle to the token */
3164 @REPLY
3165 data_size_t user_len; /* length needed to store user */
3166 VARARG(user,token_groups); /* groups the token's user belongs to */
3167 @END
3169 @REQ(get_token_default_dacl)
3170 obj_handle_t handle; /* handle to the token */
3171 @REPLY
3172 data_size_t acl_len; /* length needed to store access control list */
3173 VARARG(acl,ACL); /* access control list */
3174 @END
3176 @REQ(set_token_default_dacl)
3177 obj_handle_t handle; /* handle to the token */
3178 VARARG(acl,ACL); /* default dacl to set */
3179 @END
3181 @REQ(set_security_object)
3182 obj_handle_t handle; /* handle to the object */
3183 unsigned int security_info; /* which parts of security descriptor to set */
3184 VARARG(sd,security_descriptor); /* security descriptor to set */
3185 @END
3187 @REQ(get_security_object)
3188 obj_handle_t handle; /* handle to the object */
3189 unsigned int security_info; /* which parts of security descriptor to get */
3190 @REPLY
3191 unsigned int sd_len; /* buffer size needed for sd */
3192 VARARG(sd,security_descriptor); /* retrieved security descriptor */
3193 @END
3196 struct handle_info
3198 process_id_t owner;
3199 obj_handle_t handle;
3200 unsigned int access;
3201 unsigned int attributes;
3202 unsigned int type;
3205 /* Return a list of all opened handles */
3206 @REQ(get_system_handles)
3207 @REPLY
3208 unsigned int count; /* number of handles */
3209 VARARG(data,handle_infos); /* array of handle_infos */
3210 @END
3213 /* Create a mailslot */
3214 @REQ(create_mailslot)
3215 unsigned int access; /* wanted access rights */
3216 timeout_t read_timeout;
3217 unsigned int max_msgsize;
3218 VARARG(objattr,object_attributes); /* object attributes */
3219 @REPLY
3220 obj_handle_t handle; /* handle to the mailslot */
3221 @END
3224 /* Set mailslot information */
3225 @REQ(set_mailslot_info)
3226 obj_handle_t handle; /* handle to the mailslot */
3227 timeout_t read_timeout;
3228 unsigned int flags;
3229 @REPLY
3230 timeout_t read_timeout;
3231 unsigned int max_msgsize;
3232 @END
3233 #define MAILSLOT_SET_READ_TIMEOUT 1
3236 /* Create a directory object */
3237 @REQ(create_directory)
3238 unsigned int access; /* access flags */
3239 VARARG(objattr,object_attributes); /* object attributes */
3240 @REPLY
3241 obj_handle_t handle; /* handle to the directory */
3242 @END
3245 /* Open a directory object */
3246 @REQ(open_directory)
3247 unsigned int access; /* access flags */
3248 unsigned int attributes; /* object attributes */
3249 obj_handle_t rootdir; /* root directory */
3250 VARARG(directory_name,unicode_str); /* Directory name */
3251 @REPLY
3252 obj_handle_t handle; /* handle to the directory */
3253 @END
3256 /* Get a directory entry by index */
3257 @REQ(get_directory_entry)
3258 obj_handle_t handle; /* handle to the directory */
3259 unsigned int index; /* entry index */
3260 @REPLY
3261 data_size_t name_len; /* length of the entry name in bytes */
3262 VARARG(name,unicode_str,name_len); /* entry name */
3263 VARARG(type,unicode_str); /* entry type */
3264 @END
3267 /* Create a symbolic link object */
3268 @REQ(create_symlink)
3269 unsigned int access; /* access flags */
3270 VARARG(objattr,object_attributes); /* object attributes */
3271 VARARG(target_name,unicode_str); /* target name */
3272 @REPLY
3273 obj_handle_t handle; /* handle to the symlink */
3274 @END
3277 /* Open a symbolic link object */
3278 @REQ(open_symlink)
3279 unsigned int access; /* access flags */
3280 unsigned int attributes; /* object attributes */
3281 obj_handle_t rootdir; /* root directory */
3282 VARARG(name,unicode_str); /* symlink name */
3283 @REPLY
3284 obj_handle_t handle; /* handle to the symlink */
3285 @END
3288 /* Query a symbolic link object */
3289 @REQ(query_symlink)
3290 obj_handle_t handle; /* handle to the symlink */
3291 @REPLY
3292 data_size_t total; /* total needed size for name */
3293 VARARG(target_name,unicode_str); /* target name */
3294 @END
3297 /* Query basic object information */
3298 @REQ(get_object_info)
3299 obj_handle_t handle; /* handle to the object */
3300 @REPLY
3301 unsigned int access; /* granted access mask */
3302 unsigned int ref_count; /* object ref count */
3303 unsigned int handle_count; /* object handle count */
3304 data_size_t total; /* total needed size for name */
3305 VARARG(name,unicode_str); /* object name */
3306 @END
3309 /* Query object type name information */
3310 @REQ(get_object_type)
3311 obj_handle_t handle; /* handle to the object */
3312 @REPLY
3313 VARARG(info,object_type_info); /* type information */
3314 @END
3317 /* Query type information for all types */
3318 @REQ(get_object_types)
3319 @REPLY
3320 int count; /* total count of object types */
3321 VARARG(info,object_types_info); /* type information */
3322 @END
3325 /* Allocate a locally-unique identifier */
3326 @REQ(allocate_locally_unique_id)
3327 @REPLY
3328 luid_t luid;
3329 @END
3332 /* Create a device manager */
3333 @REQ(create_device_manager)
3334 unsigned int access; /* wanted access rights */
3335 unsigned int attributes; /* object attributes */
3336 @REPLY
3337 obj_handle_t handle; /* handle to the device */
3338 @END
3341 /* Create a device */
3342 @REQ(create_device)
3343 obj_handle_t rootdir; /* root directory */
3344 client_ptr_t user_ptr; /* opaque ptr for use by client */
3345 obj_handle_t manager; /* device manager */
3346 VARARG(name,unicode_str); /* object name */
3347 @END
3350 /* Delete a device */
3351 @REQ(delete_device)
3352 obj_handle_t manager; /* handle to the device manager */
3353 client_ptr_t device; /* pointer to the device */
3354 @END
3357 /* Retrieve the next pending device irp request */
3358 @REQ(get_next_device_request)
3359 obj_handle_t manager; /* handle to the device manager */
3360 obj_handle_t prev; /* handle to the previous irp */
3361 unsigned int status; /* status of the previous irp */
3362 client_ptr_t user_ptr; /* user pointer of the previous irp */
3363 @REPLY
3364 irp_params_t params; /* irp parameters */
3365 obj_handle_t next; /* handle to the next irp */
3366 thread_id_t client_tid; /* tid of thread calling irp */
3367 client_ptr_t client_thread; /* pointer to thread object of calling irp */
3368 data_size_t in_size; /* total needed input size */
3369 VARARG(next_data,bytes); /* input data of the next irp */
3370 @END
3373 /* Get kernel pointer from server object */
3374 @REQ(get_kernel_object_ptr)
3375 obj_handle_t manager; /* handle to the device manager */
3376 obj_handle_t handle; /* object handle */
3377 @REPLY
3378 client_ptr_t user_ptr; /* kernel object pointer */
3379 @END
3382 /* Associate kernel pointer with server object */
3383 @REQ(set_kernel_object_ptr)
3384 obj_handle_t manager; /* handle to the device manager */
3385 obj_handle_t handle; /* object handle */
3386 client_ptr_t user_ptr; /* kernel object pointer */
3387 @END
3390 /* Grab server object reference from kernel object pointer */
3391 @REQ(grab_kernel_object)
3392 obj_handle_t manager; /* handle to the device manager */
3393 client_ptr_t user_ptr; /* kernel object pointer */
3394 @END
3397 /* Release server object reference from kernel object pointer */
3398 @REQ(release_kernel_object)
3399 obj_handle_t manager; /* handle to the device manager */
3400 client_ptr_t user_ptr; /* kernel object pointer */
3401 @END
3404 /* Get handle from kernel object pointer */
3405 @REQ(get_kernel_object_handle)
3406 obj_handle_t manager; /* handle to the device manager */
3407 client_ptr_t user_ptr; /* kernel object pointer */
3408 unsigned int access; /* wanted access rights */
3409 @REPLY
3410 obj_handle_t handle; /* kernel object handle */
3411 @END
3414 /* Make the current process a system process */
3415 @REQ(make_process_system)
3416 @REPLY
3417 obj_handle_t event; /* event signaled when all user processes have exited */
3418 @END
3421 /* Get detailed fixed-size information about a token */
3422 @REQ(get_token_info)
3423 obj_handle_t handle; /* handle to the object */
3424 @REPLY
3425 luid_t token_id; /* locally-unique identifier of the token */
3426 luid_t modified_id; /* locally-unique identifier of the modified version of the token */
3427 int primary; /* is the token primary or impersonation? */
3428 int impersonation_level; /* level of impersonation */
3429 int elevation; /* elevation type */
3430 int group_count; /* the number of groups the token is a member of */
3431 int privilege_count; /* the number of privileges the token has */
3432 @END
3435 /* Create a token which is an elevation counterpart to this token */
3436 @REQ(create_linked_token)
3437 obj_handle_t handle; /* handle to the token */
3438 @REPLY
3439 obj_handle_t linked; /* handle to the linked token */
3440 @END
3443 /* Create I/O completion port */
3444 @REQ(create_completion)
3445 unsigned int access; /* desired access to a port */
3446 unsigned int concurrent; /* max number of concurrent active threads */
3447 VARARG(objattr,object_attributes); /* object attributes */
3448 @REPLY
3449 obj_handle_t handle; /* port handle */
3450 @END
3453 /* Open I/O completion port */
3454 @REQ(open_completion)
3455 unsigned int access; /* desired access to a port */
3456 unsigned int attributes; /* object attributes */
3457 obj_handle_t rootdir; /* root directory */
3458 VARARG(filename,unicode_str); /* port name */
3459 @REPLY
3460 obj_handle_t handle; /* port handle */
3461 @END
3464 /* add completion to completion port */
3465 @REQ(add_completion)
3466 obj_handle_t handle; /* port handle */
3467 apc_param_t ckey; /* completion key */
3468 apc_param_t cvalue; /* completion value */
3469 apc_param_t information; /* IO_STATUS_BLOCK Information */
3470 unsigned int status; /* completion result */
3471 @END
3474 /* get completion from completion port queue */
3475 @REQ(remove_completion)
3476 obj_handle_t handle; /* port handle */
3477 @REPLY
3478 apc_param_t ckey; /* completion key */
3479 apc_param_t cvalue; /* completion value */
3480 apc_param_t information; /* IO_STATUS_BLOCK Information */
3481 unsigned int status; /* completion result */
3482 @END
3485 /* get completion queue depth */
3486 @REQ(query_completion)
3487 obj_handle_t handle; /* port handle */
3488 @REPLY
3489 unsigned int depth; /* completion queue depth */
3490 @END
3493 /* associate object with completion port */
3494 @REQ(set_completion_info)
3495 obj_handle_t handle; /* object handle */
3496 apc_param_t ckey; /* completion key */
3497 obj_handle_t chandle; /* port handle */
3498 @END
3501 /* check for associated completion and push msg */
3502 @REQ(add_fd_completion)
3503 obj_handle_t handle; /* async' object */
3504 apc_param_t cvalue; /* completion value */
3505 apc_param_t information; /* IO_STATUS_BLOCK Information */
3506 unsigned int status; /* completion status */
3507 int async; /* completion is an async result */
3508 @END
3511 /* set fd completion information */
3512 @REQ(set_fd_completion_mode)
3513 obj_handle_t handle; /* handle to a file or directory */
3514 unsigned int flags; /* completion notification flags */
3515 @END
3518 /* set fd disposition information */
3519 @REQ(set_fd_disp_info)
3520 obj_handle_t handle; /* handle to a file or directory */
3521 int unlink; /* whether to unlink file on close */
3522 @END
3525 /* set fd name information */
3526 @REQ(set_fd_name_info)
3527 obj_handle_t handle; /* handle to a file or directory */
3528 obj_handle_t rootdir; /* root directory */
3529 data_size_t namelen; /* length of NT name in bytes */
3530 int link; /* link instead of renaming */
3531 int replace; /* replace an existing file? */
3532 VARARG(name,unicode_str,namelen); /* NT name */
3533 VARARG(filename,string); /* new file name */
3534 @END
3537 /* Retrieve layered info for a window */
3538 @REQ(get_window_layered_info)
3539 user_handle_t handle; /* handle to the window */
3540 @REPLY
3541 unsigned int color_key; /* color key */
3542 unsigned int alpha; /* alpha (0..255) */
3543 unsigned int flags; /* LWA_* flags */
3544 @END
3547 /* Set layered info for a window */
3548 @REQ(set_window_layered_info)
3549 user_handle_t handle; /* handle to the window */
3550 unsigned int color_key; /* color key */
3551 unsigned int alpha; /* alpha (0..255) */
3552 unsigned int flags; /* LWA_* flags */
3553 @END
3556 /* Allocate an arbitrary user handle */
3557 @REQ(alloc_user_handle)
3558 @REPLY
3559 user_handle_t handle; /* allocated handle */
3560 @END
3563 /* Free an arbitrary user handle */
3564 @REQ(free_user_handle)
3565 user_handle_t handle; /* handle to free*/
3566 @END
3569 /* Set/get the current cursor */
3570 @REQ(set_cursor)
3571 unsigned int flags; /* flags for fields to set (see below) */
3572 user_handle_t handle; /* handle to the cursor */
3573 int show_count; /* show count increment/decrement */
3574 int x; /* cursor position */
3575 int y;
3576 rectangle_t clip; /* cursor clip rectangle */
3577 unsigned int clip_msg; /* message to post on cursor clip changes */
3578 @REPLY
3579 user_handle_t prev_handle; /* previous handle */
3580 int prev_count; /* previous show count */
3581 int prev_x; /* previous position */
3582 int prev_y;
3583 int new_x; /* new position */
3584 int new_y;
3585 rectangle_t new_clip; /* new clip rectangle */
3586 unsigned int last_change; /* time of last position change */
3587 @END
3588 #define SET_CURSOR_HANDLE 0x01
3589 #define SET_CURSOR_COUNT 0x02
3590 #define SET_CURSOR_POS 0x04
3591 #define SET_CURSOR_CLIP 0x08
3592 #define SET_CURSOR_NOCLIP 0x10
3594 /* Get the history of the 64 last cursor positions */
3595 @REQ(get_cursor_history)
3596 @REPLY
3597 VARARG(history,cursor_positions);
3598 @END
3601 /* Batch read rawinput message data */
3602 @REQ(get_rawinput_buffer)
3603 data_size_t rawinput_size; /* size of RAWINPUT structure */
3604 data_size_t buffer_size; /* size of output buffer */
3605 @REPLY
3606 data_size_t next_size; /* minimum size to get next message data */
3607 unsigned int count;
3608 VARARG(data,bytes);
3609 @END
3611 /* Modify the list of registered rawinput devices */
3612 @REQ(update_rawinput_devices)
3613 VARARG(devices,rawinput_devices);
3614 @END
3616 /* Retrieve the list of registered rawinput devices */
3617 @REQ(get_rawinput_devices)
3618 @REPLY
3619 unsigned int device_count;
3620 VARARG(devices,rawinput_devices);
3621 @END
3623 /* Create a new job object */
3624 @REQ(create_job)
3625 unsigned int access; /* wanted access rights */
3626 VARARG(objattr,object_attributes); /* object attributes */
3627 @REPLY
3628 obj_handle_t handle; /* handle to the job */
3629 @END
3632 /* Open a job object */
3633 @REQ(open_job)
3634 unsigned int access; /* wanted access rights */
3635 unsigned int attributes; /* object attributes */
3636 obj_handle_t rootdir; /* root directory */
3637 VARARG(name,unicode_str); /* object name */
3638 @REPLY
3639 obj_handle_t handle; /* handle to the job */
3640 @END
3643 /* Assign a job object to a process */
3644 @REQ(assign_job)
3645 obj_handle_t job; /* handle to the job */
3646 obj_handle_t process; /* handle to the process */
3647 @END
3650 /* Check if a process is associated with a job */
3651 @REQ(process_in_job)
3652 obj_handle_t job; /* handle to the job */
3653 obj_handle_t process; /* handle to the process */
3654 @END
3657 /* Set limit flags on a job */
3658 @REQ(set_job_limits)
3659 obj_handle_t handle; /* handle to the job */
3660 unsigned int limit_flags; /* new limit flags */
3661 @END
3664 /* Set new completion port for a job */
3665 @REQ(set_job_completion_port)
3666 obj_handle_t job; /* handle to the job */
3667 obj_handle_t port; /* handle to the completion port */
3668 client_ptr_t key; /* key to send with completion messages */
3669 @END
3672 /* Retrieve information about a job */
3673 @REQ(get_job_info)
3674 obj_handle_t handle; /* handle to the job */
3675 @REPLY
3676 int total_processes; /* total count of processes */
3677 int active_processes; /* count of running processes */
3678 @END
3681 /* Terminate all processes associated with the job */
3682 @REQ(terminate_job)
3683 obj_handle_t handle; /* handle to the job */
3684 int status; /* process exit code */
3685 @END
3688 /* Suspend a process */
3689 @REQ(suspend_process)
3690 obj_handle_t handle; /* process handle */
3691 @END
3694 /* Resume a process */
3695 @REQ(resume_process)
3696 obj_handle_t handle; /* process handle */
3697 @END