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