include: Add definition of ScriptPlaceOpenType().
[wine.git] / server / protocol.def
blob2be1658fca25e76ff01948c05b07fc46c2dbf689
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 struct luid
385 unsigned int low_part;
386 int high_part;
389 struct luid_attr
391 struct luid luid;
392 unsigned int attrs;
395 struct acl
397 unsigned char revision;
398 unsigned char pad1;
399 unsigned short size;
400 unsigned short count;
401 unsigned short pad2;
404 struct sid
406 unsigned char revision;
407 unsigned char sub_count;
408 unsigned char id_auth[6];
409 unsigned int sub_auth[15];
412 typedef struct
414 unsigned int read;
415 unsigned int write;
416 unsigned int exec;
417 unsigned int all;
418 } generic_map_t;
420 #define MAX_ACL_LEN 65535
422 struct security_descriptor
424 unsigned int control; /* SE_ flags */
425 data_size_t owner_len;
426 data_size_t group_len;
427 data_size_t sacl_len;
428 data_size_t dacl_len;
429 /* VARARG(owner,sid); */
430 /* VARARG(group,sid); */
431 /* VARARG(sacl,acl); */
432 /* VARARG(dacl,acl); */
435 struct object_attributes
437 obj_handle_t rootdir; /* root directory */
438 unsigned int attributes; /* object attributes */
439 data_size_t sd_len; /* length of security_descriptor data. may be 0 */
440 data_size_t name_len; /* length of the name string. may be 0 */
441 /* VARARG(sd,security_descriptor); */
442 /* VARARG(name,unicode_str); */
445 struct object_type_info
447 data_size_t name_len; /* length of the name string */
448 unsigned int index; /* type index in global table */
449 unsigned int obj_count; /* count of objects of this type */
450 unsigned int handle_count; /* count of handles of this type */
451 unsigned int obj_max; /* max count of objects of this type */
452 unsigned int handle_max; /* max count of handles of this type */
453 unsigned int valid_access; /* mask for valid access bits */
454 generic_map_t mapping; /* generic access mappings */
455 /* VARARG(name,unicode_str); */
458 enum select_op
460 SELECT_NONE,
461 SELECT_WAIT,
462 SELECT_WAIT_ALL,
463 SELECT_SIGNAL_AND_WAIT,
464 SELECT_KEYED_EVENT_WAIT,
465 SELECT_KEYED_EVENT_RELEASE
468 typedef union
470 enum select_op op;
471 struct
473 enum select_op op; /* SELECT_WAIT or SELECT_WAIT_ALL */
474 obj_handle_t handles[MAXIMUM_WAIT_OBJECTS];
475 } wait;
476 struct
478 enum select_op op; /* SELECT_SIGNAL_AND_WAIT */
479 obj_handle_t wait;
480 obj_handle_t signal; /* must be last in the structure so we can remove it on retries */
481 } signal_and_wait;
482 struct
484 enum select_op op; /* SELECT_KEYED_EVENT_WAIT or SELECT_KEYED_EVENT_RELEASE */
485 obj_handle_t handle;
486 client_ptr_t key;
487 } keyed_event;
488 } select_op_t;
490 enum apc_type
492 APC_NONE,
493 APC_USER,
494 APC_ASYNC_IO,
495 APC_VIRTUAL_ALLOC,
496 APC_VIRTUAL_FREE,
497 APC_VIRTUAL_QUERY,
498 APC_VIRTUAL_PROTECT,
499 APC_VIRTUAL_FLUSH,
500 APC_VIRTUAL_LOCK,
501 APC_VIRTUAL_UNLOCK,
502 APC_MAP_VIEW,
503 APC_UNMAP_VIEW,
504 APC_CREATE_THREAD,
505 APC_DUP_HANDLE
508 typedef struct
510 enum apc_type type; /* APC_USER */
511 int __pad;
512 client_ptr_t func; /* void (__stdcall *func)(ULONG_PTR,ULONG_PTR,ULONG_PTR); */
513 apc_param_t args[3]; /* arguments for user function */
514 } user_apc_t;
516 typedef union
518 enum apc_type type;
519 user_apc_t user;
520 struct
522 enum apc_type type; /* APC_ASYNC_IO */
523 unsigned int status; /* I/O status */
524 client_ptr_t user; /* user pointer */
525 client_ptr_t sb; /* status block */
526 data_size_t result; /* result size */
527 } async_io;
528 struct
530 enum apc_type type; /* APC_VIRTUAL_ALLOC */
531 unsigned int op_type; /* type of operation */
532 client_ptr_t addr; /* requested address */
533 mem_size_t size; /* allocation size */
534 mem_size_t zero_bits; /* number of zero high bits */
535 unsigned int prot; /* memory protection flags */
536 } virtual_alloc;
537 struct
539 enum apc_type type; /* APC_VIRTUAL_FREE */
540 unsigned int op_type; /* type of operation */
541 client_ptr_t addr; /* requested address */
542 mem_size_t size; /* allocation size */
543 } virtual_free;
544 struct
546 enum apc_type type; /* APC_VIRTUAL_QUERY */
547 int __pad;
548 client_ptr_t addr; /* requested address */
549 } virtual_query;
550 struct
552 enum apc_type type; /* APC_VIRTUAL_PROTECT */
553 unsigned int prot; /* new protection flags */
554 client_ptr_t addr; /* requested address */
555 mem_size_t size; /* requested size */
556 } virtual_protect;
557 struct
559 enum apc_type type; /* APC_VIRTUAL_FLUSH */
560 int __pad;
561 client_ptr_t addr; /* requested address */
562 mem_size_t size; /* requested size */
563 } virtual_flush;
564 struct
566 enum apc_type type; /* APC_VIRTUAL_LOCK */
567 int __pad;
568 client_ptr_t addr; /* requested address */
569 mem_size_t size; /* requested size */
570 } virtual_lock;
571 struct
573 enum apc_type type; /* APC_VIRTUAL_UNLOCK */
574 int __pad;
575 client_ptr_t addr; /* requested address */
576 mem_size_t size; /* requested size */
577 } virtual_unlock;
578 struct
580 enum apc_type type; /* APC_MAP_VIEW */
581 obj_handle_t handle; /* mapping handle */
582 client_ptr_t addr; /* requested address */
583 mem_size_t size; /* allocation size */
584 file_pos_t offset; /* file offset */
585 mem_size_t zero_bits; /* number of zero high bits */
586 unsigned int alloc_type; /* allocation type */
587 unsigned int prot; /* memory protection flags */
588 } map_view;
589 struct
591 enum apc_type type; /* APC_UNMAP_VIEW */
592 int __pad;
593 client_ptr_t addr; /* view address */
594 } unmap_view;
595 struct
597 enum apc_type type; /* APC_CREATE_THREAD */
598 unsigned int flags; /* creation flags */
599 client_ptr_t func; /* void (__stdcall *func)(void*); start function */
600 client_ptr_t arg; /* argument for start function */
601 mem_size_t zero_bits; /* number of zero high bits for thread stack */
602 mem_size_t reserve; /* reserve size for thread stack */
603 mem_size_t commit; /* commit size for thread stack */
604 } create_thread;
605 struct
607 enum apc_type type; /* APC_DUP_HANDLE */
608 obj_handle_t src_handle; /* src handle to duplicate */
609 obj_handle_t dst_process; /* dst process handle */
610 unsigned int access; /* wanted access rights */
611 unsigned int attributes; /* object attributes */
612 unsigned int options; /* duplicate options */
613 } dup_handle;
614 } apc_call_t;
616 typedef union
618 enum apc_type type;
619 struct
621 enum apc_type type; /* APC_ASYNC_IO */
622 unsigned int status; /* new status of async operation */
623 unsigned int total; /* bytes transferred */
624 } async_io;
625 struct
627 enum apc_type type; /* APC_VIRTUAL_ALLOC */
628 unsigned int status; /* status returned by call */
629 client_ptr_t addr; /* resulting address */
630 mem_size_t size; /* resulting size */
631 } virtual_alloc;
632 struct
634 enum apc_type type; /* APC_VIRTUAL_FREE */
635 unsigned int status; /* status returned by call */
636 client_ptr_t addr; /* resulting address */
637 mem_size_t size; /* resulting size */
638 } virtual_free;
639 struct
641 enum apc_type type; /* APC_VIRTUAL_QUERY */
642 unsigned int status; /* status returned by call */
643 client_ptr_t base; /* resulting base address */
644 client_ptr_t alloc_base;/* resulting allocation base */
645 mem_size_t size; /* resulting region size */
646 unsigned short state; /* resulting region state */
647 unsigned short prot; /* resulting region protection */
648 unsigned short alloc_prot;/* resulting allocation protection */
649 unsigned short alloc_type;/* resulting region allocation type */
650 } virtual_query;
651 struct
653 enum apc_type type; /* APC_VIRTUAL_PROTECT */
654 unsigned int status; /* status returned by call */
655 client_ptr_t addr; /* resulting address */
656 mem_size_t size; /* resulting size */
657 unsigned int prot; /* old protection flags */
658 } virtual_protect;
659 struct
661 enum apc_type type; /* APC_VIRTUAL_FLUSH */
662 unsigned int status; /* status returned by call */
663 client_ptr_t addr; /* resulting address */
664 mem_size_t size; /* resulting size */
665 } virtual_flush;
666 struct
668 enum apc_type type; /* APC_VIRTUAL_LOCK */
669 unsigned int status; /* status returned by call */
670 client_ptr_t addr; /* resulting address */
671 mem_size_t size; /* resulting size */
672 } virtual_lock;
673 struct
675 enum apc_type type; /* APC_VIRTUAL_UNLOCK */
676 unsigned int status; /* status returned by call */
677 client_ptr_t addr; /* resulting address */
678 mem_size_t size; /* resulting size */
679 } virtual_unlock;
680 struct
682 enum apc_type type; /* APC_MAP_VIEW */
683 unsigned int status; /* status returned by call */
684 client_ptr_t addr; /* resulting address */
685 mem_size_t size; /* resulting size */
686 } map_view;
687 struct
689 enum apc_type type; /* APC_UNMAP_VIEW */
690 unsigned int status; /* status returned by call */
691 } unmap_view;
692 struct
694 enum apc_type type; /* APC_CREATE_THREAD */
695 unsigned int status; /* status returned by call */
696 process_id_t pid; /* process id */
697 thread_id_t tid; /* thread id */
698 client_ptr_t teb; /* thread teb (in process address space) */
699 obj_handle_t handle; /* handle to new thread */
700 } create_thread;
701 struct
703 enum apc_type type; /* APC_DUP_HANDLE */
704 unsigned int status; /* status returned by call */
705 obj_handle_t handle; /* duplicated handle in dst process */
706 } dup_handle;
707 struct
709 enum apc_type type; /* APC_BREAK_PROCESS */
710 unsigned int status; /* status returned by call */
711 } break_process;
712 } apc_result_t;
714 enum irp_type
716 IRP_CALL_NONE,
717 IRP_CALL_CREATE,
718 IRP_CALL_CLOSE,
719 IRP_CALL_READ,
720 IRP_CALL_WRITE,
721 IRP_CALL_FLUSH,
722 IRP_CALL_IOCTL,
723 IRP_CALL_VOLUME,
724 IRP_CALL_FREE,
725 IRP_CALL_CANCEL
728 typedef union
730 enum irp_type type; /* irp call type */
731 struct
733 enum irp_type type; /* IRP_CALL_CREATE */
734 unsigned int access; /* access rights */
735 unsigned int sharing; /* sharing flags */
736 unsigned int options; /* file options */
737 client_ptr_t device; /* opaque ptr for the device */
738 obj_handle_t file; /* file handle */
739 } create;
740 struct
742 enum irp_type type; /* IRP_CALL_CLOSE */
743 int __pad;
744 client_ptr_t file; /* opaque ptr for the file object */
745 } close;
746 struct
748 enum irp_type type; /* IRP_CALL_READ */
749 unsigned int key; /* driver key */
750 data_size_t out_size; /* needed output size */
751 int __pad;
752 client_ptr_t file; /* opaque ptr for the file object */
753 file_pos_t pos; /* file position */
754 } read;
755 struct
757 enum irp_type type; /* IRP_CALL_WRITE */
758 unsigned int key; /* driver key */
759 client_ptr_t file; /* opaque ptr for the file object */
760 file_pos_t pos; /* file position */
761 } write;
762 struct
764 enum irp_type type; /* IRP_CALL_FLUSH */
765 int __pad;
766 client_ptr_t file; /* opaque ptr for the file object */
767 } flush;
768 struct
770 enum irp_type type; /* IRP_CALL_IOCTL */
771 ioctl_code_t code; /* ioctl code */
772 data_size_t out_size; /* needed output size */
773 int __pad;
774 client_ptr_t file; /* opaque ptr for the file object */
775 } ioctl;
776 struct
778 enum irp_type type; /* IRP_CALL_VOLUME */
779 unsigned int info_class;/* information class */
780 data_size_t out_size; /* needed output size */
781 int __pad;
782 client_ptr_t file; /* opaque ptr for the file object */
783 } volume;
784 struct
786 enum irp_type type; /* IRP_CALL_FREE */
787 int __pad;
788 client_ptr_t obj; /* opaque ptr for the freed object */
789 } free;
790 struct
792 enum irp_type type; /* IRP_CALL_CANCEL */
793 int __pad;
794 client_ptr_t irp; /* opaque ptr for canceled irp */
795 } cancel;
796 } irp_params_t;
798 /* information about a PE image mapping, roughly equivalent to SECTION_IMAGE_INFORMATION */
799 typedef struct
801 client_ptr_t base;
802 mem_size_t stack_size;
803 mem_size_t stack_commit;
804 unsigned int entry_point;
805 unsigned int map_size;
806 unsigned int zerobits;
807 unsigned int subsystem;
808 unsigned short subsystem_minor;
809 unsigned short subsystem_major;
810 unsigned short osversion_major;
811 unsigned short osversion_minor;
812 unsigned short image_charact;
813 unsigned short dll_charact;
814 unsigned short machine;
815 unsigned char contains_code;
816 unsigned char image_flags;
817 unsigned int loader_flags;
818 unsigned int header_size;
819 unsigned int file_size;
820 unsigned int checksum;
821 unsigned int dbg_offset;
822 unsigned int dbg_size;
823 } pe_image_info_t;
824 #define IMAGE_FLAGS_ComPlusNativeReady 0x01
825 #define IMAGE_FLAGS_ComPlusILOnly 0x02
826 #define IMAGE_FLAGS_ImageDynamicallyRelocated 0x04
827 #define IMAGE_FLAGS_ImageMappedFlat 0x08
828 #define IMAGE_FLAGS_BaseBelow4gb 0x10
829 #define IMAGE_FLAGS_ComPlusPrefer32bit 0x20
830 #define IMAGE_FLAGS_WineBuiltin 0x40
831 #define IMAGE_FLAGS_WineFakeDll 0x80
833 struct rawinput_device
835 unsigned short usage_page;
836 unsigned short usage;
837 unsigned int flags;
838 user_handle_t target;
841 typedef struct
843 int x;
844 int y;
845 unsigned int time;
846 int __pad;
847 lparam_t info;
848 } cursor_pos_t;
850 /****************************************************************/
851 /* Request declarations */
853 /* Create a new process from the context of the parent */
854 @REQ(new_process)
855 obj_handle_t token; /* process token */
856 obj_handle_t debug; /* process debug object */
857 obj_handle_t parent_process; /* parent process */
858 unsigned int flags; /* process creation flags */
859 int socket_fd; /* file descriptor for process socket */
860 unsigned int access; /* access rights for process object */
861 unsigned short machine; /* architecture that the new process will use */
862 data_size_t info_size; /* size of startup info */
863 data_size_t handles_size; /* length of explicit handles list */
864 data_size_t jobs_size; /* length of jobs list */
865 VARARG(objattr,object_attributes); /* object attributes */
866 VARARG(handles,uints,handles_size); /* handles list */
867 VARARG(jobs,uints,jobs_size); /* jobs list */
868 VARARG(info,startup_info,info_size); /* startup information */
869 VARARG(env,unicode_str); /* environment for new process */
870 @REPLY
871 obj_handle_t info; /* new process info handle */
872 process_id_t pid; /* process id */
873 obj_handle_t handle; /* process handle (in the current process) */
874 @END
877 /* Retrieve information about a newly started process */
878 @REQ(get_new_process_info)
879 obj_handle_t info; /* info handle returned from new_process_request */
880 @REPLY
881 int success; /* did the process start successfully? */
882 int exit_code; /* process exit code if failed */
883 @END
886 /* Create a new thread */
887 @REQ(new_thread)
888 obj_handle_t process; /* process in which to create thread */
889 unsigned int access; /* wanted access rights */
890 unsigned int flags; /* thread creation flags */
891 int request_fd; /* fd for request pipe */
892 VARARG(objattr,object_attributes); /* object attributes */
893 @REPLY
894 thread_id_t tid; /* thread id */
895 obj_handle_t handle; /* thread handle (in the current process) */
896 @END
899 /* Retrieve the new process startup info */
900 @REQ(get_startup_info)
901 @REPLY
902 data_size_t info_size; /* size of startup info */
903 VARARG(info,startup_info,info_size); /* startup information */
904 VARARG(env,unicode_str); /* environment */
905 @END
908 /* Signal the end of the process initialization */
909 @REQ(init_process_done)
910 client_ptr_t teb; /* TEB of new thread (in process address space) */
911 client_ptr_t peb; /* PEB of new process (in process address space) */
912 client_ptr_t ldt_copy; /* address of LDT copy (in process address space) */
913 @REPLY
914 client_ptr_t entry; /* process entry point */
915 int suspend; /* is process suspended? */
916 @END
919 /* Initialize the first thread of a new process */
920 @REQ(init_first_thread)
921 int unix_pid; /* Unix pid of new process */
922 int unix_tid; /* Unix tid of new thread */
923 int debug_level; /* new debug level */
924 int reply_fd; /* fd for reply pipe */
925 int wait_fd; /* fd for blocking calls pipe */
926 @REPLY
927 process_id_t pid; /* process id of the new thread's process */
928 thread_id_t tid; /* thread id of the new thread */
929 timeout_t server_start; /* server start time */
930 unsigned int session_id; /* process session id */
931 data_size_t info_size; /* total size of startup info */
932 VARARG(machines,ushorts); /* array of supported machines */
933 @END
936 /* Initialize a new thread; called from the child after pthread_create() */
937 @REQ(init_thread)
938 int unix_tid; /* Unix tid of new thread */
939 int reply_fd; /* fd for reply pipe */
940 int wait_fd; /* fd for blocking calls pipe */
941 client_ptr_t teb; /* TEB of new thread (in thread address space) */
942 client_ptr_t entry; /* entry point (in thread address space) */
943 @REPLY
944 int suspend; /* is thread suspended? */
945 @END
948 /* Terminate a process */
949 @REQ(terminate_process)
950 obj_handle_t handle; /* process handle to terminate */
951 int exit_code; /* process exit code */
952 @REPLY
953 int self; /* suicide? */
954 @END
957 /* Terminate a thread */
958 @REQ(terminate_thread)
959 obj_handle_t handle; /* thread handle to terminate */
960 int exit_code; /* thread exit code */
961 @REPLY
962 int self; /* suicide? */
963 @END
966 /* Retrieve information about a process */
967 @REQ(get_process_info)
968 obj_handle_t handle; /* process handle */
969 @REPLY
970 process_id_t pid; /* server process id */
971 process_id_t ppid; /* server process id of parent */
972 affinity_t affinity; /* process affinity mask */
973 client_ptr_t peb; /* PEB address in process address space */
974 timeout_t start_time; /* process start time */
975 timeout_t end_time; /* process end time */
976 unsigned int session_id; /* process session id */
977 int exit_code; /* process exit code */
978 int priority; /* priority class */
979 unsigned short machine; /* process architecture */
980 VARARG(image,pe_image_info); /* image info for main exe */
981 @END
984 /* Retrieve debug information about a process */
985 @REQ(get_process_debug_info)
986 obj_handle_t handle; /* process handle */
987 @REPLY
988 obj_handle_t debug; /* handle to debug port */
989 int debug_children; /* inherit debugger to child processes */
990 VARARG(image,pe_image_info); /* image info for main exe */
991 @END
994 /* Fetch the name of the process image */
995 @REQ(get_process_image_name)
996 obj_handle_t handle; /* process handle */
997 int win32; /* return a win32 filename? */
998 @REPLY
999 data_size_t len; /* len in bytes required to store filename */
1000 VARARG(name,unicode_str); /* image name for main exe */
1001 @END
1004 /* Retrieve information about a process memory usage */
1005 @REQ(get_process_vm_counters)
1006 obj_handle_t handle; /* process handle */
1007 @REPLY
1008 mem_size_t peak_virtual_size; /* peak virtual memory in bytes */
1009 mem_size_t virtual_size; /* virtual memory in bytes */
1010 mem_size_t peak_working_set_size; /* peak real memory in bytes */
1011 mem_size_t working_set_size; /* real memory in bytes */
1012 mem_size_t pagefile_usage; /* commit charge in bytes */
1013 mem_size_t peak_pagefile_usage; /* peak commit charge in bytes */
1014 @END
1017 /* Set a process information */
1018 @REQ(set_process_info)
1019 obj_handle_t handle; /* process handle */
1020 int mask; /* setting mask (see below) */
1021 int priority; /* priority class */
1022 affinity_t affinity; /* affinity mask */
1023 @END
1024 #define SET_PROCESS_INFO_PRIORITY 0x01
1025 #define SET_PROCESS_INFO_AFFINITY 0x02
1028 /* Retrieve information about a thread */
1029 @REQ(get_thread_info)
1030 obj_handle_t handle; /* thread handle */
1031 unsigned int access; /* required access rights */
1032 @REPLY
1033 process_id_t pid; /* server process id */
1034 thread_id_t tid; /* server thread id */
1035 client_ptr_t teb; /* thread teb pointer */
1036 client_ptr_t entry_point; /* thread entry point */
1037 affinity_t affinity; /* thread affinity mask */
1038 int exit_code; /* thread exit code */
1039 int priority; /* thread priority level */
1040 int last; /* last thread in process */
1041 int suspend_count; /* thread suspend count */
1042 int dbg_hidden; /* thread hidden from debugger */
1043 data_size_t desc_len; /* description length in bytes */
1044 VARARG(desc,unicode_str); /* description string */
1045 @END
1048 /* Retrieve information about thread times */
1049 @REQ(get_thread_times)
1050 obj_handle_t handle; /* thread handle */
1051 @REPLY
1052 timeout_t creation_time; /* thread creation time */
1053 timeout_t exit_time; /* thread exit time */
1054 int unix_pid; /* thread native pid */
1055 int unix_tid; /* thread native pid */
1056 @END
1059 /* Set a thread information */
1060 @REQ(set_thread_info)
1061 obj_handle_t handle; /* thread handle */
1062 int mask; /* setting mask (see below) */
1063 int priority; /* priority class */
1064 affinity_t affinity; /* affinity mask */
1065 client_ptr_t entry_point; /* thread entry point */
1066 obj_handle_t token; /* impersonation token */
1067 VARARG(desc,unicode_str); /* description string */
1068 @END
1069 #define SET_THREAD_INFO_PRIORITY 0x01
1070 #define SET_THREAD_INFO_AFFINITY 0x02
1071 #define SET_THREAD_INFO_TOKEN 0x04
1072 #define SET_THREAD_INFO_ENTRYPOINT 0x08
1073 #define SET_THREAD_INFO_DESCRIPTION 0x10
1074 #define SET_THREAD_INFO_DBG_HIDDEN 0x20
1077 /* Suspend a thread */
1078 @REQ(suspend_thread)
1079 obj_handle_t handle; /* thread handle */
1080 @REPLY
1081 int count; /* new suspend count */
1082 @END
1085 /* Resume a thread */
1086 @REQ(resume_thread)
1087 obj_handle_t handle; /* thread handle */
1088 @REPLY
1089 int count; /* new suspend count */
1090 @END
1093 /* Queue an APC for a thread or process */
1094 @REQ(queue_apc)
1095 obj_handle_t handle; /* thread or process handle */
1096 apc_call_t call; /* call arguments */
1097 @REPLY
1098 obj_handle_t handle; /* APC handle */
1099 int self; /* run APC in caller itself? */
1100 @END
1103 /* Get the result of an APC call */
1104 @REQ(get_apc_result)
1105 obj_handle_t handle; /* handle to the APC */
1106 @REPLY
1107 apc_result_t result; /* result of the APC */
1108 @END
1111 /* Close a handle for the current process */
1112 @REQ(close_handle)
1113 obj_handle_t handle; /* handle to close */
1114 @END
1117 /* Set a handle information */
1118 @REQ(set_handle_info)
1119 obj_handle_t handle; /* handle we are interested in */
1120 int flags; /* new handle flags */
1121 int mask; /* mask for flags to set */
1122 @REPLY
1123 int old_flags; /* old flag value */
1124 @END
1127 /* Duplicate a handle */
1128 @REQ(dup_handle)
1129 obj_handle_t src_process; /* src process handle */
1130 obj_handle_t src_handle; /* src handle to duplicate */
1131 obj_handle_t dst_process; /* dst process handle */
1132 unsigned int access; /* wanted access rights */
1133 unsigned int attributes; /* object attributes */
1134 unsigned int options; /* duplicate options */
1135 @REPLY
1136 obj_handle_t handle; /* duplicated handle in dst process */
1137 @END
1140 /* Test if two handles refer to the same object */
1141 @REQ(compare_objects)
1142 obj_handle_t first; /* first object handle */
1143 obj_handle_t second; /* second object handle */
1144 @END
1147 /* Make an object temporary */
1148 @REQ(make_temporary)
1149 obj_handle_t handle; /* handle to the object */
1150 @END
1153 /* Open a handle to a process */
1154 @REQ(open_process)
1155 process_id_t pid; /* process id to open */
1156 unsigned int access; /* wanted access rights */
1157 unsigned int attributes; /* object attributes */
1158 @REPLY
1159 obj_handle_t handle; /* handle to the process */
1160 @END
1163 /* Open a handle to a thread */
1164 @REQ(open_thread)
1165 thread_id_t tid; /* thread id to open */
1166 unsigned int access; /* wanted access rights */
1167 unsigned int attributes; /* object attributes */
1168 @REPLY
1169 obj_handle_t handle; /* handle to the thread */
1170 @END
1173 /* Wait for handles */
1174 @REQ(select)
1175 int flags; /* wait flags (see below) */
1176 client_ptr_t cookie; /* magic cookie to return to client */
1177 abstime_t timeout; /* timeout */
1178 data_size_t size; /* size of select_op */
1179 obj_handle_t prev_apc; /* handle to previous APC */
1180 VARARG(result,apc_result); /* result of previous APC */
1181 VARARG(data,select_op,size); /* operation-specific data */
1182 VARARG(contexts,contexts); /* suspend context(s) */
1183 @REPLY
1184 apc_call_t call; /* APC call arguments */
1185 obj_handle_t apc_handle; /* handle to next APC */
1186 int signaled; /* were the handles immediately signaled? */
1187 VARARG(contexts,contexts); /* suspend context(s) */
1188 @END
1189 #define SELECT_ALERTABLE 1
1190 #define SELECT_INTERRUPTIBLE 2
1193 /* Create an event */
1194 @REQ(create_event)
1195 unsigned int access; /* wanted access rights */
1196 int manual_reset; /* manual reset event */
1197 int initial_state; /* initial state of the event */
1198 VARARG(objattr,object_attributes); /* object attributes */
1199 @REPLY
1200 obj_handle_t handle; /* handle to the event */
1201 @END
1203 /* Event operation */
1204 @REQ(event_op)
1205 obj_handle_t handle; /* handle to event */
1206 int op; /* event operation (see below) */
1207 @REPLY
1208 int state; /* previous state */
1209 @END
1210 enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT };
1212 @REQ(query_event)
1213 obj_handle_t handle; /* handle to event */
1214 @REPLY
1215 int manual_reset; /* manual reset event */
1216 int state; /* current state of the event */
1217 @END
1219 /* Open an event */
1220 @REQ(open_event)
1221 unsigned int access; /* wanted access rights */
1222 unsigned int attributes; /* object attributes */
1223 obj_handle_t rootdir; /* root directory */
1224 VARARG(name,unicode_str); /* object name */
1225 @REPLY
1226 obj_handle_t handle; /* handle to the event */
1227 @END
1230 /* Create a keyed event */
1231 @REQ(create_keyed_event)
1232 unsigned int access; /* wanted access rights */
1233 VARARG(objattr,object_attributes); /* object attributes */
1234 @REPLY
1235 obj_handle_t handle; /* handle to the event */
1236 @END
1238 /* Open a keyed event */
1239 @REQ(open_keyed_event)
1240 unsigned int access; /* wanted access rights */
1241 unsigned int attributes; /* object attributes */
1242 obj_handle_t rootdir; /* root directory */
1243 VARARG(name,unicode_str); /* object name */
1244 @REPLY
1245 obj_handle_t handle; /* handle to the event */
1246 @END
1249 /* Create a mutex */
1250 @REQ(create_mutex)
1251 unsigned int access; /* wanted access rights */
1252 int owned; /* initially owned? */
1253 VARARG(objattr,object_attributes); /* object attributes */
1254 @REPLY
1255 obj_handle_t handle; /* handle to the mutex */
1256 @END
1259 /* Release a mutex */
1260 @REQ(release_mutex)
1261 obj_handle_t handle; /* handle to the mutex */
1262 @REPLY
1263 unsigned int prev_count; /* value of internal counter, before release */
1264 @END
1267 /* Open a mutex */
1268 @REQ(open_mutex)
1269 unsigned int access; /* wanted access rights */
1270 unsigned int attributes; /* object attributes */
1271 obj_handle_t rootdir; /* root directory */
1272 VARARG(name,unicode_str); /* object name */
1273 @REPLY
1274 obj_handle_t handle; /* handle to the mutex */
1275 @END
1278 /* Query a mutex */
1279 @REQ(query_mutex)
1280 obj_handle_t handle; /* handle to mutex */
1281 @REPLY
1282 unsigned int count; /* current count of mutex */
1283 int owned; /* true if owned by current thread */
1284 int abandoned; /* true if abandoned */
1285 @END
1288 /* Create a semaphore */
1289 @REQ(create_semaphore)
1290 unsigned int access; /* wanted access rights */
1291 unsigned int initial; /* initial count */
1292 unsigned int max; /* maximum count */
1293 VARARG(objattr,object_attributes); /* object attributes */
1294 @REPLY
1295 obj_handle_t handle; /* handle to the semaphore */
1296 @END
1299 /* Release a semaphore */
1300 @REQ(release_semaphore)
1301 obj_handle_t handle; /* handle to the semaphore */
1302 unsigned int count; /* count to add to semaphore */
1303 @REPLY
1304 unsigned int prev_count; /* previous semaphore count */
1305 @END
1307 @REQ(query_semaphore)
1308 obj_handle_t handle; /* handle to the semaphore */
1309 @REPLY
1310 unsigned int current; /* current count */
1311 unsigned int max; /* maximum count */
1312 @END
1314 /* Open a semaphore */
1315 @REQ(open_semaphore)
1316 unsigned int access; /* wanted access rights */
1317 unsigned int attributes; /* object attributes */
1318 obj_handle_t rootdir; /* root directory */
1319 VARARG(name,unicode_str); /* object name */
1320 @REPLY
1321 obj_handle_t handle; /* handle to the semaphore */
1322 @END
1325 /* Create a file */
1326 @REQ(create_file)
1327 unsigned int access; /* wanted access rights */
1328 unsigned int sharing; /* sharing flags */
1329 int create; /* file create action */
1330 unsigned int options; /* file options */
1331 unsigned int attrs; /* file attributes for creation */
1332 VARARG(objattr,object_attributes); /* object attributes */
1333 VARARG(filename,string); /* file name */
1334 @REPLY
1335 obj_handle_t handle; /* handle to the file */
1336 @END
1339 /* Open a file object */
1340 @REQ(open_file_object)
1341 unsigned int access; /* wanted access rights */
1342 unsigned int attributes; /* open attributes */
1343 obj_handle_t rootdir; /* root directory */
1344 unsigned int sharing; /* sharing flags */
1345 unsigned int options; /* file options */
1346 VARARG(filename,unicode_str); /* file name */
1347 @REPLY
1348 obj_handle_t handle; /* handle to the file */
1349 @END
1352 /* Allocate a file handle for a Unix fd */
1353 @REQ(alloc_file_handle)
1354 unsigned int access; /* wanted access rights */
1355 unsigned int attributes; /* object attributes */
1356 int fd; /* file descriptor on the client side */
1357 @REPLY
1358 obj_handle_t handle; /* handle to the file */
1359 @END
1362 /* Get the Unix name from a file handle */
1363 @REQ(get_handle_unix_name)
1364 obj_handle_t handle; /* file handle */
1365 @REPLY
1366 data_size_t name_len; /* unix name length */
1367 VARARG(name,string); /* unix name */
1368 @END
1371 /* Get a Unix fd to access a file */
1372 @REQ(get_handle_fd)
1373 obj_handle_t handle; /* handle to the file */
1374 @REPLY
1375 int type; /* file type (see below) */
1376 int cacheable; /* can fd be cached in the client? */
1377 unsigned int access; /* file access rights */
1378 unsigned int options; /* file open options */
1379 @END
1380 enum server_fd_type
1382 FD_TYPE_INVALID, /* invalid file (no associated fd) */
1383 FD_TYPE_FILE, /* regular file */
1384 FD_TYPE_DIR, /* directory */
1385 FD_TYPE_SOCKET, /* socket */
1386 FD_TYPE_SERIAL, /* serial port */
1387 FD_TYPE_PIPE, /* named pipe */
1388 FD_TYPE_MAILSLOT, /* mailslot */
1389 FD_TYPE_CHAR, /* unspecified char device */
1390 FD_TYPE_DEVICE, /* Windows device file */
1391 FD_TYPE_NB_TYPES
1395 /* Retrieve (or allocate) the client-side directory cache entry */
1396 @REQ(get_directory_cache_entry)
1397 obj_handle_t handle; /* handle to the directory */
1398 @REPLY
1399 int entry; /* cache entry on the client side */
1400 VARARG(free,ints); /* entries that can be freed */
1401 @END
1404 /* Flush a file buffers */
1405 @REQ(flush)
1406 async_data_t async; /* async I/O parameters */
1407 @REPLY
1408 obj_handle_t event; /* event set when finished */
1409 @END
1411 /* Query file information */
1412 @REQ(get_file_info)
1413 obj_handle_t handle; /* handle to the file */
1414 unsigned int info_class; /* queried information class */
1415 @REPLY
1416 VARARG(data,bytes); /* file info data */
1417 @END
1419 /* Query volume information */
1420 @REQ(get_volume_info)
1421 obj_handle_t handle; /* handle to the file */
1422 async_data_t async; /* async I/O parameters */
1423 unsigned int info_class; /* queried information class */
1424 @REPLY
1425 obj_handle_t wait; /* handle to wait on for blocking read */
1426 VARARG(data,bytes); /* volume info data */
1427 @END
1429 /* Lock a region of a file */
1430 @REQ(lock_file)
1431 obj_handle_t handle; /* handle to the file */
1432 file_pos_t offset; /* offset of start of lock */
1433 file_pos_t count; /* count of bytes to lock */
1434 int shared; /* shared or exclusive lock? */
1435 int wait; /* do we want to wait? */
1436 @REPLY
1437 obj_handle_t handle; /* handle to wait on */
1438 int overlapped; /* is it an overlapped I/O handle? */
1439 @END
1442 /* Unlock a region of a file */
1443 @REQ(unlock_file)
1444 obj_handle_t handle; /* handle to the file */
1445 file_pos_t offset; /* offset of start of unlock */
1446 file_pos_t count; /* count of bytes to unlock */
1447 @END
1450 /* Perform a recv on a socket */
1451 @REQ(recv_socket)
1452 int oob; /* are we receiving OOB data? */
1453 async_data_t async; /* async I/O parameters */
1454 int force_async; /* Force asynchronous mode? */
1455 @REPLY
1456 obj_handle_t wait; /* handle to wait on for blocking recv */
1457 unsigned int options; /* device open options */
1458 int nonblocking; /* is socket non-blocking? */
1459 @END
1462 /* Perform a send on a socket */
1463 @REQ(send_socket)
1464 async_data_t async; /* async I/O parameters */
1465 int force_async; /* Force asynchronous mode? */
1466 @REPLY
1467 obj_handle_t wait; /* handle to wait on for blocking send */
1468 unsigned int options; /* device open options */
1469 int nonblocking; /* is socket non-blocking? */
1470 @END
1473 /* Retrieve the next pending console ioctl request */
1474 @REQ(get_next_console_request)
1475 obj_handle_t handle; /* console server handle */
1476 int signal; /* server signal state */
1477 int read; /* 1 if reporting result of blocked read ioctl */
1478 unsigned int status; /* status of previous ioctl */
1479 VARARG(out_data,bytes); /* out_data of previous ioctl */
1480 @REPLY
1481 unsigned int code; /* ioctl code */
1482 unsigned int output; /* output id or 0 for input */
1483 data_size_t out_size; /* ioctl output size */
1484 VARARG(in_data,bytes); /* ioctl in_data */
1485 @END
1488 /* enable directory change notifications */
1489 @REQ(read_directory_changes)
1490 unsigned int filter; /* notification filter */
1491 int subtree; /* watch the subtree? */
1492 int want_data; /* flag indicating whether change data should be collected */
1493 async_data_t async; /* async I/O parameters */
1494 @END
1497 @REQ(read_change)
1498 obj_handle_t handle;
1499 @REPLY
1500 VARARG(events,filesystem_event); /* collected filesystem events */
1501 @END
1504 /* Create a file mapping */
1505 @REQ(create_mapping)
1506 unsigned int access; /* wanted access rights */
1507 unsigned int flags; /* SEC_* flags */
1508 unsigned int file_access; /* file access rights */
1509 mem_size_t size; /* mapping size */
1510 obj_handle_t file_handle; /* file handle */
1511 VARARG(objattr,object_attributes); /* object attributes */
1512 @REPLY
1513 obj_handle_t handle; /* handle to the mapping */
1514 @END
1517 /* Open a mapping */
1518 @REQ(open_mapping)
1519 unsigned int access; /* wanted access rights */
1520 unsigned int attributes; /* object attributes */
1521 obj_handle_t rootdir; /* root directory */
1522 VARARG(name,unicode_str); /* object name */
1523 @REPLY
1524 obj_handle_t handle; /* handle to the mapping */
1525 @END
1528 /* Get information about a file mapping */
1529 @REQ(get_mapping_info)
1530 obj_handle_t handle; /* handle to the mapping */
1531 unsigned int access; /* wanted access rights */
1532 @REPLY
1533 mem_size_t size; /* mapping size */
1534 unsigned int flags; /* SEC_* flags */
1535 obj_handle_t shared_file; /* shared mapping file handle */
1536 data_size_t total; /* total required buffer size in bytes */
1537 VARARG(image,pe_image_info);/* image info for SEC_IMAGE mappings */
1538 VARARG(name,unicode_str); /* filename for SEC_IMAGE mappings */
1539 @END
1542 /* Add a memory view in the current process */
1543 @REQ(map_view)
1544 obj_handle_t mapping; /* file mapping handle, or 0 for .so builtin */
1545 unsigned int access; /* wanted access rights */
1546 client_ptr_t base; /* view base address (page-aligned) */
1547 mem_size_t size; /* view size */
1548 file_pos_t start; /* start offset in mapping */
1549 VARARG(image,pe_image_info);/* image info for .so builtins */
1550 VARARG(name,unicode_str); /* image filename for .so builtins */
1551 @END
1554 /* Unmap a memory view from the current process */
1555 @REQ(unmap_view)
1556 client_ptr_t base; /* view base address */
1557 @END
1560 /* Get a range of committed pages in a file mapping */
1561 @REQ(get_mapping_committed_range)
1562 client_ptr_t base; /* view base address */
1563 file_pos_t offset; /* starting offset (page-aligned, in bytes) */
1564 @REPLY
1565 mem_size_t size; /* size of range starting at offset (page-aligned, in bytes) */
1566 int committed; /* whether it is a committed range */
1567 @END
1570 /* Add a range to the committed pages in a file mapping */
1571 @REQ(add_mapping_committed_range)
1572 client_ptr_t base; /* view base address */
1573 file_pos_t offset; /* starting offset (page-aligned, in bytes) */
1574 mem_size_t size; /* size to set (page-aligned, in bytes) or 0 if only retrieving */
1575 @END
1578 /* Check if two memory maps are for the same file */
1579 @REQ(is_same_mapping)
1580 client_ptr_t base1; /* first view base address */
1581 client_ptr_t base2; /* second view base address */
1582 @END
1585 /* Get the filename of a mapping */
1586 @REQ(get_mapping_filename)
1587 obj_handle_t process; /* process handle */
1588 client_ptr_t addr; /* address inside mapped view (in process address space) */
1589 @REPLY
1590 data_size_t len; /* total filename length in bytes */
1591 VARARG(filename,unicode_str); /* filename in NT format */
1592 @END
1595 struct thread_info
1597 timeout_t start_time;
1598 thread_id_t tid;
1599 int base_priority;
1600 int current_priority;
1601 int unix_tid;
1602 client_ptr_t teb;
1603 client_ptr_t entry_point;
1606 struct process_info
1608 timeout_t start_time;
1609 data_size_t name_len;
1610 int thread_count;
1611 int priority;
1612 process_id_t pid;
1613 process_id_t parent_pid;
1614 unsigned int session_id;
1615 int handle_count;
1616 int unix_pid;
1617 /* VARARG(name,unicode_str,name_len); */
1618 /* VARARG(threads,struct thread_info,thread_count); */
1621 /* Get a list of processes and threads currently running */
1622 @REQ(list_processes)
1623 @REPLY
1624 data_size_t info_size;
1625 int process_count;
1626 int total_thread_count;
1627 data_size_t total_name_len;
1628 VARARG(data,process_info,info_size);
1629 @END
1632 /* Create a debug object */
1633 @REQ(create_debug_obj)
1634 unsigned int access; /* wanted access rights */
1635 unsigned int flags; /* object flags */
1636 VARARG(objattr,object_attributes); /* object attributes */
1637 @REPLY
1638 obj_handle_t handle; /* handle to the debug object */
1639 @END
1642 /* Wait for a debug event */
1643 @REQ(wait_debug_event)
1644 obj_handle_t debug; /* debug object */
1645 @REPLY
1646 process_id_t pid; /* process id */
1647 thread_id_t tid; /* thread id */
1648 VARARG(event,debug_event); /* debug event data */
1649 @END
1652 /* Queue an exception event */
1653 @REQ(queue_exception_event)
1654 int first; /* first chance exception? */
1655 unsigned int code; /* exception code */
1656 unsigned int flags; /* exception flags */
1657 client_ptr_t record; /* exception record */
1658 client_ptr_t address; /* exception address */
1659 data_size_t len; /* size of parameters */
1660 VARARG(params,uints64,len);/* exception parameters */
1661 @REPLY
1662 obj_handle_t handle; /* handle to the queued event */
1663 @END
1666 /* Retrieve the status of an exception event */
1667 @REQ(get_exception_status)
1668 obj_handle_t handle; /* handle to the queued event */
1669 @END
1672 /* Continue a debug event */
1673 @REQ(continue_debug_event)
1674 obj_handle_t debug; /* debug object */
1675 process_id_t pid; /* process id to continue */
1676 thread_id_t tid; /* thread id to continue */
1677 unsigned int status; /* continuation status */
1678 @END
1681 /* Start or stop debugging an existing process */
1682 @REQ(debug_process)
1683 obj_handle_t handle; /* process handle */
1684 obj_handle_t debug; /* debug object to attach to the process */
1685 int attach; /* 1=attaching / 0=detaching from the process */
1686 @END
1689 /* Set debug object information */
1690 @REQ(set_debug_obj_info)
1691 obj_handle_t debug; /* debug object */
1692 unsigned int flags; /* object flags */
1693 @END
1696 /* Read data from a process address space */
1697 @REQ(read_process_memory)
1698 obj_handle_t handle; /* process handle */
1699 client_ptr_t addr; /* addr to read from */
1700 @REPLY
1701 VARARG(data,bytes); /* result data */
1702 @END
1705 /* Write data to a process address space */
1706 @REQ(write_process_memory)
1707 obj_handle_t handle; /* process handle */
1708 client_ptr_t addr; /* addr to write to */
1709 VARARG(data,bytes); /* data to write */
1710 @END
1713 /* Create a registry key */
1714 @REQ(create_key)
1715 unsigned int access; /* desired access rights */
1716 unsigned int options; /* creation options */
1717 VARARG(objattr,object_attributes); /* object attributes */
1718 VARARG(class,unicode_str); /* class name */
1719 @REPLY
1720 obj_handle_t hkey; /* handle to the created key */
1721 int created; /* has it been newly created? */
1722 @END
1724 /* Open a registry key */
1725 @REQ(open_key)
1726 obj_handle_t parent; /* handle to the parent key */
1727 unsigned int access; /* desired access rights */
1728 unsigned int attributes; /* object attributes */
1729 VARARG(name,unicode_str); /* key name */
1730 @REPLY
1731 obj_handle_t hkey; /* handle to the open key */
1732 @END
1735 /* Delete a registry key */
1736 @REQ(delete_key)
1737 obj_handle_t hkey; /* handle to the key */
1738 @END
1741 /* Flush a registry key */
1742 @REQ(flush_key)
1743 obj_handle_t hkey; /* handle to the key */
1744 @END
1747 /* Enumerate registry subkeys */
1748 @REQ(enum_key)
1749 obj_handle_t hkey; /* handle to registry key */
1750 int index; /* index of subkey (or -1 for current key) */
1751 int info_class; /* requested information class */
1752 @REPLY
1753 int subkeys; /* number of subkeys */
1754 int max_subkey; /* longest subkey name */
1755 int max_class; /* longest class name */
1756 int values; /* number of values */
1757 int max_value; /* longest value name */
1758 int max_data; /* longest value data */
1759 timeout_t modif; /* last modification time */
1760 data_size_t total; /* total length needed for full name and class */
1761 data_size_t namelen; /* length of key name in bytes */
1762 VARARG(name,unicode_str,namelen); /* key name */
1763 VARARG(class,unicode_str); /* class name */
1764 @END
1767 /* Set a value of a registry key */
1768 @REQ(set_key_value)
1769 obj_handle_t hkey; /* handle to registry key */
1770 int type; /* value type */
1771 data_size_t namelen; /* length of value name in bytes */
1772 VARARG(name,unicode_str,namelen); /* value name */
1773 VARARG(data,bytes); /* value data */
1774 @END
1777 /* Retrieve the value of a registry key */
1778 @REQ(get_key_value)
1779 obj_handle_t hkey; /* handle to registry key */
1780 VARARG(name,unicode_str); /* value name */
1781 @REPLY
1782 int type; /* value type */
1783 data_size_t total; /* total length needed for data */
1784 VARARG(data,bytes); /* value data */
1785 @END
1788 /* Enumerate a value of a registry key */
1789 @REQ(enum_key_value)
1790 obj_handle_t hkey; /* handle to registry key */
1791 int index; /* value index */
1792 int info_class; /* requested information class */
1793 @REPLY
1794 int type; /* value type */
1795 data_size_t total; /* total length needed for full name and data */
1796 data_size_t namelen; /* length of value name in bytes */
1797 VARARG(name,unicode_str,namelen); /* value name */
1798 VARARG(data,bytes); /* value data */
1799 @END
1802 /* Delete a value of a registry key */
1803 @REQ(delete_key_value)
1804 obj_handle_t hkey; /* handle to registry key */
1805 VARARG(name,unicode_str); /* value name */
1806 @END
1809 /* Load a registry branch from a file */
1810 @REQ(load_registry)
1811 obj_handle_t file; /* file to load from */
1812 VARARG(objattr,object_attributes); /* object attributes */
1813 @END
1816 /* UnLoad a registry branch from a file */
1817 @REQ(unload_registry)
1818 obj_handle_t parent; /* handle to the parent key */
1819 unsigned int attributes; /* object attributes */
1820 VARARG(name,unicode_str); /* key name */
1821 @END
1824 /* Save a registry branch to a file */
1825 @REQ(save_registry)
1826 obj_handle_t hkey; /* key to save */
1827 obj_handle_t file; /* file to save to */
1828 @END
1831 /* Add a registry key change notification */
1832 @REQ(set_registry_notification)
1833 obj_handle_t hkey; /* key to watch for changes */
1834 obj_handle_t event; /* event to set */
1835 int subtree; /* should we watch the whole subtree? */
1836 unsigned int filter; /* things to watch */
1837 @END
1840 /* Create a waitable timer */
1841 @REQ(create_timer)
1842 unsigned int access; /* wanted access rights */
1843 int manual; /* manual reset */
1844 VARARG(objattr,object_attributes); /* object attributes */
1845 @REPLY
1846 obj_handle_t handle; /* handle to the timer */
1847 @END
1850 /* Open a waitable timer */
1851 @REQ(open_timer)
1852 unsigned int access; /* wanted access rights */
1853 unsigned int attributes; /* object attributes */
1854 obj_handle_t rootdir; /* root directory */
1855 VARARG(name,unicode_str); /* object name */
1856 @REPLY
1857 obj_handle_t handle; /* handle to the timer */
1858 @END
1860 /* Set a waitable timer */
1861 @REQ(set_timer)
1862 obj_handle_t handle; /* handle to the timer */
1863 timeout_t expire; /* next expiration absolute time */
1864 client_ptr_t callback; /* callback function */
1865 client_ptr_t arg; /* callback argument */
1866 int period; /* timer period in ms */
1867 @REPLY
1868 int signaled; /* was the timer signaled before this call ? */
1869 @END
1871 /* Cancel a waitable timer */
1872 @REQ(cancel_timer)
1873 obj_handle_t handle; /* handle to the timer */
1874 @REPLY
1875 int signaled; /* was the timer signaled before this calltime ? */
1876 @END
1878 /* Get information on a waitable timer */
1879 @REQ(get_timer_info)
1880 obj_handle_t handle; /* handle to the timer */
1881 @REPLY
1882 timeout_t when; /* absolute time when the timer next expires */
1883 int signaled; /* is the timer signaled? */
1884 @END
1887 /* Retrieve the current context of a thread */
1888 @REQ(get_thread_context)
1889 obj_handle_t handle; /* thread handle */
1890 obj_handle_t context; /* context handle */
1891 unsigned int flags; /* context flags */
1892 unsigned short machine; /* context architecture */
1893 @REPLY
1894 int self; /* was it a handle to the current thread? */
1895 obj_handle_t handle; /* pending context handle */
1896 VARARG(contexts,contexts); /* thread context(s) */
1897 @END
1900 /* Set the current context of a thread */
1901 @REQ(set_thread_context)
1902 obj_handle_t handle; /* thread handle */
1903 VARARG(contexts,contexts); /* thread context(s) */
1904 @REPLY
1905 int self; /* was it a handle to the current thread? */
1906 @END
1909 /* Fetch a selector entry for a thread */
1910 @REQ(get_selector_entry)
1911 obj_handle_t handle; /* thread handle */
1912 int entry; /* LDT entry */
1913 @REPLY
1914 unsigned int base; /* selector base */
1915 unsigned int limit; /* selector limit */
1916 unsigned char flags; /* selector flags */
1917 @END
1920 /* Add an atom */
1921 @REQ(add_atom)
1922 VARARG(name,unicode_str); /* atom name */
1923 @REPLY
1924 atom_t atom; /* resulting atom */
1925 @END
1928 /* Delete an atom */
1929 @REQ(delete_atom)
1930 atom_t atom; /* atom handle */
1931 @END
1934 /* Find an atom */
1935 @REQ(find_atom)
1936 VARARG(name,unicode_str); /* atom name */
1937 @REPLY
1938 atom_t atom; /* atom handle */
1939 @END
1942 /* Get information about an atom */
1943 @REQ(get_atom_information)
1944 atom_t atom; /* atom handle */
1945 @REPLY
1946 int count; /* atom lock count */
1947 int pinned; /* whether the atom has been pinned */
1948 data_size_t total; /* actual length of atom name */
1949 VARARG(name,unicode_str); /* atom name */
1950 @END
1953 /* Get the message queue of the current thread */
1954 @REQ(get_msg_queue)
1955 @REPLY
1956 obj_handle_t handle; /* handle to the queue */
1957 @END
1960 /* Set the file descriptor associated to the current thread queue */
1961 @REQ(set_queue_fd)
1962 obj_handle_t handle; /* handle to the file descriptor */
1963 @END
1966 /* Set the current message queue wakeup mask */
1967 @REQ(set_queue_mask)
1968 unsigned int wake_mask; /* wakeup bits mask */
1969 unsigned int changed_mask; /* changed bits mask */
1970 int skip_wait; /* will we skip waiting if signaled? */
1971 @REPLY
1972 unsigned int wake_bits; /* current wake bits */
1973 unsigned int changed_bits; /* current changed bits */
1974 @END
1977 /* Get the current message queue status */
1978 @REQ(get_queue_status)
1979 unsigned int clear_bits; /* should we clear the change bits? */
1980 @REPLY
1981 unsigned int wake_bits; /* wake bits */
1982 unsigned int changed_bits; /* changed bits since last time */
1983 @END
1986 /* Retrieve the process idle event */
1987 @REQ(get_process_idle_event)
1988 obj_handle_t handle; /* process handle */
1989 @REPLY
1990 obj_handle_t event; /* handle to idle event */
1991 @END
1994 /* Send a message to a thread queue */
1995 @REQ(send_message)
1996 thread_id_t id; /* thread id */
1997 int type; /* message type (see below) */
1998 int flags; /* message flags (see below) */
1999 user_handle_t win; /* window handle */
2000 unsigned int msg; /* message code */
2001 lparam_t wparam; /* parameters */
2002 lparam_t lparam; /* parameters */
2003 timeout_t timeout; /* timeout for reply */
2004 VARARG(data,message_data); /* message data for sent messages */
2005 @END
2007 @REQ(post_quit_message)
2008 int exit_code; /* exit code to return */
2009 @END
2011 enum message_type
2013 MSG_ASCII, /* Ascii message (from SendMessageA) */
2014 MSG_UNICODE, /* Unicode message (from SendMessageW) */
2015 MSG_NOTIFY, /* notify message (from SendNotifyMessageW), always Unicode */
2016 MSG_CALLBACK, /* callback message (from SendMessageCallbackW), always Unicode */
2017 MSG_CALLBACK_RESULT,/* result of a callback message */
2018 MSG_OTHER_PROCESS, /* sent from other process, may include vararg data, always Unicode */
2019 MSG_POSTED, /* posted message (from PostMessageW), always Unicode */
2020 MSG_HARDWARE, /* hardware message */
2021 MSG_WINEVENT, /* winevent message */
2022 MSG_HOOK_LL /* low-level hardware hook */
2024 #define SEND_MSG_ABORT_IF_HUNG 0x01
2027 /* Send a hardware message to a thread queue */
2028 @REQ(send_hardware_message)
2029 user_handle_t win; /* window handle */
2030 hw_input_t input; /* input data */
2031 unsigned int flags; /* flags (see below) */
2032 VARARG(report,bytes); /* HID report data */
2033 @REPLY
2034 int wait; /* do we need to wait for a reply? */
2035 int prev_x; /* previous cursor position */
2036 int prev_y;
2037 int new_x; /* new cursor position */
2038 int new_y;
2039 VARARG(keystate,bytes); /* global state array for all the keys */
2040 @END
2041 #define SEND_HWMSG_INJECTED 0x01
2044 /* Get a message from the current queue */
2045 @REQ(get_message)
2046 unsigned int flags; /* PM_* flags */
2047 user_handle_t get_win; /* window handle to get */
2048 unsigned int get_first; /* first message code to get */
2049 unsigned int get_last; /* last message code to get */
2050 unsigned int hw_id; /* id of the previous hardware message (or 0) */
2051 unsigned int wake_mask; /* wakeup bits mask */
2052 unsigned int changed_mask; /* changed bits mask */
2053 @REPLY
2054 user_handle_t win; /* window handle */
2055 unsigned int msg; /* message code */
2056 lparam_t wparam; /* parameters */
2057 lparam_t lparam; /* parameters */
2058 int type; /* message type */
2059 int x; /* message x position */
2060 int y; /* message y position */
2061 unsigned int time; /* message time */
2062 unsigned int active_hooks; /* active hooks bitmap */
2063 data_size_t total; /* total size of extra data */
2064 VARARG(data,message_data); /* message data for sent messages */
2065 @END
2068 /* Reply to a sent message */
2069 @REQ(reply_message)
2070 int remove; /* should we remove the message? */
2071 lparam_t result; /* message result */
2072 VARARG(data,bytes); /* message data for sent messages */
2073 @END
2076 /* Accept and remove the current hardware message */
2077 @REQ(accept_hardware_message)
2078 unsigned int hw_id; /* id of the hardware message */
2079 @END
2082 /* Retrieve the reply for the last message sent */
2083 @REQ(get_message_reply)
2084 int cancel; /* cancel message if not ready? */
2085 @REPLY
2086 lparam_t result; /* message result */
2087 VARARG(data,bytes); /* message data for sent messages */
2088 @END
2091 /* Set a window timer */
2092 @REQ(set_win_timer)
2093 user_handle_t win; /* window handle */
2094 unsigned int msg; /* message to post */
2095 unsigned int rate; /* timer rate in ms */
2096 lparam_t id; /* timer id */
2097 lparam_t lparam; /* message lparam (callback proc) */
2098 @REPLY
2099 lparam_t id; /* timer id */
2100 @END
2103 /* Kill a window timer */
2104 @REQ(kill_win_timer)
2105 user_handle_t win; /* window handle */
2106 lparam_t id; /* timer id */
2107 unsigned int msg; /* message to post */
2108 @END
2111 /* check if the thread owning the window is hung */
2112 @REQ(is_window_hung)
2113 user_handle_t win; /* window handle */
2114 @REPLY
2115 int is_hung;
2116 @END
2119 /* Retrieve info about a serial port */
2120 @REQ(get_serial_info)
2121 obj_handle_t handle; /* handle to comm port */
2122 int flags;
2123 @REPLY
2124 unsigned int eventmask;
2125 unsigned int cookie;
2126 unsigned int pending_write;
2127 @END
2130 /* Set info about a serial port */
2131 @REQ(set_serial_info)
2132 obj_handle_t handle; /* handle to comm port */
2133 int flags; /* bitmask to set values (see below) */
2134 @END
2135 #define SERIALINFO_PENDING_WRITE 0x04
2136 #define SERIALINFO_PENDING_WAIT 0x08
2139 /* Create an async I/O */
2140 @REQ(register_async)
2141 int type; /* type of queue to look after */
2142 async_data_t async; /* async I/O parameters */
2143 int count; /* count - usually # of bytes to be read/written */
2144 @END
2145 #define ASYNC_TYPE_READ 0x01
2146 #define ASYNC_TYPE_WRITE 0x02
2147 #define ASYNC_TYPE_WAIT 0x03
2150 /* Cancel all async op on a fd */
2151 @REQ(cancel_async)
2152 obj_handle_t handle; /* handle to comm port, socket or file */
2153 client_ptr_t iosb; /* I/O status block (NULL=all) */
2154 int only_thread; /* cancel matching this thread */
2155 @END
2158 /* Retrieve results of an async */
2159 @REQ(get_async_result)
2160 client_ptr_t user_arg; /* user arg used to identify async */
2161 @REPLY
2162 VARARG(out_data,bytes); /* iosb output data */
2163 @END
2166 /* Notify direct completion of async and close the wait handle if not blocking */
2167 @REQ(set_async_direct_result)
2168 obj_handle_t handle; /* wait handle */
2169 apc_param_t information; /* IO_STATUS_BLOCK Information */
2170 unsigned int status; /* completion status */
2171 int mark_pending; /* set async to pending before completion? */
2172 @REPLY
2173 obj_handle_t handle; /* wait handle, or NULL if closed */
2174 @END
2177 /* Perform a read on a file object */
2178 @REQ(read)
2179 async_data_t async; /* async I/O parameters */
2180 file_pos_t pos; /* read position */
2181 @REPLY
2182 obj_handle_t wait; /* handle to wait on for blocking read */
2183 unsigned int options; /* device open options */
2184 VARARG(data,bytes); /* read data */
2185 @END
2188 /* Perform a write on a file object */
2189 @REQ(write)
2190 async_data_t async; /* async I/O parameters */
2191 file_pos_t pos; /* write position */
2192 VARARG(data,bytes); /* write data */
2193 @REPLY
2194 obj_handle_t wait; /* handle to wait on for blocking write */
2195 unsigned int options; /* device open options */
2196 data_size_t size; /* size written */
2197 @END
2200 /* Perform an ioctl on a file */
2201 @REQ(ioctl)
2202 ioctl_code_t code; /* ioctl code */
2203 async_data_t async; /* async I/O parameters */
2204 VARARG(in_data,bytes); /* ioctl input data */
2205 @REPLY
2206 obj_handle_t wait; /* handle to wait on for blocking ioctl */
2207 unsigned int options; /* device open options */
2208 VARARG(out_data,bytes); /* ioctl output data */
2209 @END
2212 /* Store results of an async irp */
2213 @REQ(set_irp_result)
2214 obj_handle_t handle; /* handle to the irp */
2215 unsigned int status; /* status of the irp */
2216 data_size_t size; /* result size (input or output depending on the operation) */
2217 VARARG(data,bytes); /* output data of the irp */
2218 @END
2221 /* Create a named pipe */
2222 @REQ(create_named_pipe)
2223 unsigned int access;
2224 unsigned int options;
2225 unsigned int sharing;
2226 unsigned int maxinstances;
2227 unsigned int outsize;
2228 unsigned int insize;
2229 timeout_t timeout;
2230 unsigned int flags;
2231 VARARG(objattr,object_attributes); /* object attributes */
2232 @REPLY
2233 obj_handle_t handle; /* handle to the pipe */
2234 @END
2236 /* flags in create_named_pipe and get_named_pipe_info */
2237 #define NAMED_PIPE_MESSAGE_STREAM_WRITE 0x0001
2238 #define NAMED_PIPE_MESSAGE_STREAM_READ 0x0002
2239 #define NAMED_PIPE_NONBLOCKING_MODE 0x0004
2240 #define NAMED_PIPE_SERVER_END 0x8000
2242 /* Set named pipe information by handle */
2243 @REQ(set_named_pipe_info)
2244 obj_handle_t handle;
2245 unsigned int flags;
2246 @END
2248 /* Create a window */
2249 @REQ(create_window)
2250 user_handle_t parent; /* parent window */
2251 user_handle_t owner; /* owner window */
2252 atom_t atom; /* class atom */
2253 mod_handle_t instance; /* module instance */
2254 int dpi; /* system DPI */
2255 int awareness; /* thread DPI awareness */
2256 unsigned int style; /* window style */
2257 unsigned int ex_style; /* window extended style */
2258 VARARG(class,unicode_str); /* class name */
2259 @REPLY
2260 user_handle_t handle; /* created window */
2261 user_handle_t parent; /* full handle of parent */
2262 user_handle_t owner; /* full handle of owner */
2263 int extra; /* number of extra bytes */
2264 client_ptr_t class_ptr; /* pointer to class in client address space */
2265 int dpi; /* window DPI if not per-monitor aware */
2266 int awareness; /* window DPI awareness */
2267 @END
2270 /* Destroy a window */
2271 @REQ(destroy_window)
2272 user_handle_t handle; /* handle to the window */
2273 @END
2276 /* Retrieve the desktop window for the current thread */
2277 @REQ(get_desktop_window)
2278 int force; /* force creation if it doesn't exist */
2279 @REPLY
2280 user_handle_t top_window; /* handle to the desktop window */
2281 user_handle_t msg_window; /* handle to the top-level HWND_MESSAGE parent */
2282 @END
2285 /* Set a window owner */
2286 @REQ(set_window_owner)
2287 user_handle_t handle; /* handle to the window */
2288 user_handle_t owner; /* new owner */
2289 @REPLY
2290 user_handle_t full_owner; /* full handle of new owner */
2291 user_handle_t prev_owner; /* full handle of previous owner */
2292 @END
2295 /* Get information from a window handle */
2296 @REQ(get_window_info)
2297 user_handle_t handle; /* handle to the window */
2298 @REPLY
2299 user_handle_t full_handle; /* full 32-bit handle */
2300 user_handle_t last_active; /* last active popup */
2301 process_id_t pid; /* process owning the window */
2302 thread_id_t tid; /* thread owning the window */
2303 atom_t atom; /* class atom */
2304 int is_unicode; /* ANSI or unicode */
2305 int dpi; /* window DPI */
2306 int awareness; /* DPI awareness */
2307 @END
2310 /* Set some information in a window */
2311 @REQ(set_window_info)
2312 unsigned short flags; /* flags for fields to set (see below) */
2313 short int is_unicode; /* ANSI or unicode */
2314 user_handle_t handle; /* handle to the window */
2315 unsigned int style; /* window style */
2316 unsigned int ex_style; /* window extended style */
2317 data_size_t extra_size; /* size to set in extra bytes */
2318 mod_handle_t instance; /* creator instance */
2319 lparam_t user_data; /* user-specific data */
2320 lparam_t extra_value; /* value to set in extra bytes or window id */
2321 int extra_offset; /* offset to set in extra bytes */
2322 @REPLY
2323 unsigned int old_style; /* old window style */
2324 unsigned int old_ex_style; /* old window extended style */
2325 mod_handle_t old_instance; /* old creator instance */
2326 lparam_t old_user_data; /* old user-specific data */
2327 lparam_t old_extra_value; /* old value in extra bytes */
2328 lparam_t old_id; /* old window id */
2329 @END
2330 #define SET_WIN_STYLE 0x01
2331 #define SET_WIN_EXSTYLE 0x02
2332 #define SET_WIN_ID 0x04
2333 #define SET_WIN_INSTANCE 0x08
2334 #define SET_WIN_USERDATA 0x10
2335 #define SET_WIN_EXTRA 0x20
2336 #define SET_WIN_UNICODE 0x40
2339 /* Set the parent of a window */
2340 @REQ(set_parent)
2341 user_handle_t handle; /* handle to the window */
2342 user_handle_t parent; /* handle to the parent */
2343 @REPLY
2344 user_handle_t old_parent; /* old parent window */
2345 user_handle_t full_parent; /* full handle of new parent */
2346 int dpi; /* new window DPI if not per-monitor aware */
2347 int awareness; /* new DPI awareness */
2348 @END
2351 /* Get a list of the window parents, up to the root of the tree */
2352 @REQ(get_window_parents)
2353 user_handle_t handle; /* handle to the window */
2354 @REPLY
2355 int count; /* total count of parents */
2356 VARARG(parents,user_handles); /* parent handles */
2357 @END
2360 /* Get a list of the window children */
2361 @REQ(get_window_children)
2362 obj_handle_t desktop; /* handle to desktop */
2363 user_handle_t parent; /* parent window */
2364 atom_t atom; /* class atom for the listed children */
2365 thread_id_t tid; /* thread owning the listed children */
2366 VARARG(class,unicode_str); /* class name */
2367 @REPLY
2368 int count; /* total count of children */
2369 VARARG(children,user_handles); /* children handles */
2370 @END
2373 /* Get a list of the window children that contain a given point */
2374 @REQ(get_window_children_from_point)
2375 user_handle_t parent; /* parent window */
2376 int x; /* point in parent coordinates */
2377 int y;
2378 int dpi; /* dpi for the point coordinates */
2379 @REPLY
2380 int count; /* total count of children */
2381 VARARG(children,user_handles); /* children handles */
2382 @END
2385 /* Get window tree information from a window handle */
2386 @REQ(get_window_tree)
2387 user_handle_t handle; /* handle to the window */
2388 @REPLY
2389 user_handle_t parent; /* parent window */
2390 user_handle_t owner; /* owner window */
2391 user_handle_t next_sibling; /* next sibling in Z-order */
2392 user_handle_t prev_sibling; /* prev sibling in Z-order */
2393 user_handle_t first_sibling; /* first sibling in Z-order */
2394 user_handle_t last_sibling; /* last sibling in Z-order */
2395 user_handle_t first_child; /* first child */
2396 user_handle_t last_child; /* last child */
2397 @END
2399 /* Set the position and Z order of a window */
2400 @REQ(set_window_pos)
2401 unsigned short swp_flags; /* SWP_* flags */
2402 unsigned short paint_flags; /* paint flags (see below) */
2403 user_handle_t handle; /* handle to the window */
2404 user_handle_t previous; /* previous window in Z order */
2405 rectangle_t window; /* window rectangle (in parent coords) */
2406 rectangle_t client; /* client rectangle (in parent coords) */
2407 VARARG(valid,rectangles); /* valid rectangles from WM_NCCALCSIZE (in parent coords) */
2408 @REPLY
2409 unsigned int new_style; /* new window style */
2410 unsigned int new_ex_style; /* new window extended style */
2411 user_handle_t surface_win; /* parent window that holds the surface */
2412 int needs_update; /* whether the surface region needs an update */
2413 @END
2414 #define SET_WINPOS_PAINT_SURFACE 0x01 /* window has a paintable surface */
2415 #define SET_WINPOS_PIXEL_FORMAT 0x02 /* window has a custom pixel format */
2417 /* Get the window and client rectangles of a window */
2418 @REQ(get_window_rectangles)
2419 user_handle_t handle; /* handle to the window */
2420 int relative; /* coords relative to (see below) */
2421 int dpi; /* DPI to map to, or zero for per-monitor DPI */
2422 @REPLY
2423 rectangle_t window; /* window rectangle */
2424 rectangle_t client; /* client rectangle */
2425 @END
2426 enum coords_relative
2428 COORDS_CLIENT, /* relative to client area */
2429 COORDS_WINDOW, /* relative to whole window area */
2430 COORDS_PARENT, /* relative to parent's client area */
2431 COORDS_SCREEN /* relative to screen origin */
2435 /* Get the window text */
2436 @REQ(get_window_text)
2437 user_handle_t handle; /* handle to the window */
2438 @REPLY
2439 data_size_t length; /* total length in WCHARs */
2440 VARARG(text,unicode_str); /* window text */
2441 @END
2444 /* Set the window text */
2445 @REQ(set_window_text)
2446 user_handle_t handle; /* handle to the window */
2447 VARARG(text,unicode_str); /* window text */
2448 @END
2451 /* Get the coordinates offset between two windows */
2452 @REQ(get_windows_offset)
2453 user_handle_t from; /* handle to the first window */
2454 user_handle_t to; /* handle to the second window */
2455 int dpi; /* DPI to map to, or zero for per-monitor DPI */
2456 @REPLY
2457 int x; /* x coordinate offset */
2458 int y; /* y coordinate offset */
2459 int mirror; /* whether to mirror the x coordinate */
2460 @END
2463 /* Get the visible region of a window */
2464 @REQ(get_visible_region)
2465 user_handle_t window; /* handle to the window */
2466 unsigned int flags; /* DCX flags */
2467 @REPLY
2468 user_handle_t top_win; /* top window to clip against */
2469 rectangle_t top_rect; /* top window visible rect with screen coords */
2470 rectangle_t win_rect; /* window rect in screen coords */
2471 unsigned int paint_flags; /* paint flags (from SET_WINPOS_* flags) */
2472 data_size_t total_size; /* total size of the resulting region */
2473 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2474 @END
2477 /* Get the visible surface region of a window */
2478 @REQ(get_surface_region)
2479 user_handle_t window; /* handle to the window */
2480 @REPLY
2481 rectangle_t visible_rect; /* window visible rect in screen coords */
2482 data_size_t total_size; /* total size of the resulting region */
2483 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2484 @END
2487 /* Get the window region */
2488 @REQ(get_window_region)
2489 user_handle_t window; /* handle to the window */
2490 @REPLY
2491 data_size_t total_size; /* total size of the resulting region */
2492 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2493 @END
2496 /* Set the window region */
2497 @REQ(set_window_region)
2498 user_handle_t window; /* handle to the window */
2499 int redraw; /* redraw the window? */
2500 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2501 @END
2504 /* Get the window update region */
2505 @REQ(get_update_region)
2506 user_handle_t window; /* handle to the window */
2507 user_handle_t from_child; /* child to start searching from */
2508 unsigned int flags; /* update flags (see below) */
2509 @REPLY
2510 user_handle_t child; /* child to repaint (or window itself) */
2511 unsigned int flags; /* resulting update flags (see below) */
2512 data_size_t total_size; /* total size of the resulting region */
2513 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2514 @END
2515 #define UPDATE_NONCLIENT 0x001 /* get region for repainting non-client area */
2516 #define UPDATE_ERASE 0x002 /* get region for erasing client area */
2517 #define UPDATE_PAINT 0x004 /* get region for painting client area */
2518 #define UPDATE_INTERNALPAINT 0x008 /* get region if internal paint is pending */
2519 #define UPDATE_ALLCHILDREN 0x010 /* force repaint of all children */
2520 #define UPDATE_NOCHILDREN 0x020 /* don't try to repaint any children */
2521 #define UPDATE_NOREGION 0x040 /* don't return a region, only the flags */
2522 #define UPDATE_DELAYED_ERASE 0x080 /* still needs erase after BeginPaint */
2523 #define UPDATE_CLIPCHILDREN 0x100 /* remove clipped children from the update region */
2526 /* Update the z order of a window so that a given rectangle is fully visible */
2527 @REQ(update_window_zorder)
2528 user_handle_t window; /* handle to the window */
2529 rectangle_t rect; /* rectangle that must be visible (in client coords) */
2530 @END
2533 /* Mark parts of a window as needing a redraw */
2534 @REQ(redraw_window)
2535 user_handle_t window; /* handle to the window */
2536 unsigned int flags; /* RDW_* flags */
2537 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2538 @END
2541 /* Set a window property */
2542 @REQ(set_window_property)
2543 user_handle_t window; /* handle to the window */
2544 lparam_t data; /* data to store */
2545 atom_t atom; /* property atom (if no name specified) */
2546 VARARG(name,unicode_str); /* property name */
2547 @END
2550 /* Remove a window property */
2551 @REQ(remove_window_property)
2552 user_handle_t window; /* handle to the window */
2553 atom_t atom; /* property atom (if no name specified) */
2554 VARARG(name,unicode_str); /* property name */
2555 @REPLY
2556 lparam_t data; /* data stored in property */
2557 @END
2560 /* Get a window property */
2561 @REQ(get_window_property)
2562 user_handle_t window; /* handle to the window */
2563 atom_t atom; /* property atom (if no name specified) */
2564 VARARG(name,unicode_str); /* property name */
2565 @REPLY
2566 lparam_t data; /* data stored in property */
2567 @END
2570 /* Get the list of properties of a window */
2571 @REQ(get_window_properties)
2572 user_handle_t window; /* handle to the window */
2573 @REPLY
2574 int total; /* total number of properties */
2575 VARARG(props,properties); /* list of properties */
2576 @END
2579 /* Create a window station */
2580 @REQ(create_winstation)
2581 unsigned int flags; /* window station flags */
2582 unsigned int access; /* wanted access rights */
2583 unsigned int attributes; /* object attributes */
2584 obj_handle_t rootdir; /* root directory */
2585 VARARG(name,unicode_str); /* object name */
2586 @REPLY
2587 obj_handle_t handle; /* handle to the window station */
2588 @END
2591 /* Open a handle to a window station */
2592 @REQ(open_winstation)
2593 unsigned int access; /* wanted access rights */
2594 unsigned int attributes; /* object attributes */
2595 obj_handle_t rootdir; /* root directory */
2596 VARARG(name,unicode_str); /* object name */
2597 @REPLY
2598 obj_handle_t handle; /* handle to the window station */
2599 @END
2602 /* Close a window station */
2603 @REQ(close_winstation)
2604 obj_handle_t handle; /* handle to the window station */
2605 @END
2608 /* Get the process current window station */
2609 @REQ(get_process_winstation)
2610 @REPLY
2611 obj_handle_t handle; /* handle to the window station */
2612 @END
2615 /* Set the process current window station */
2616 @REQ(set_process_winstation)
2617 obj_handle_t handle; /* handle to the window station */
2618 @END
2621 /* Enumerate window stations */
2622 @REQ(enum_winstation)
2623 unsigned int index; /* current index */
2624 @REPLY
2625 unsigned int next; /* next index */
2626 VARARG(name,unicode_str); /* window station name */
2627 @END
2630 /* Create a desktop */
2631 @REQ(create_desktop)
2632 unsigned int flags; /* desktop flags */
2633 unsigned int access; /* wanted access rights */
2634 unsigned int attributes; /* object attributes */
2635 VARARG(name,unicode_str); /* object name */
2636 @REPLY
2637 obj_handle_t handle; /* handle to the desktop */
2638 @END
2641 /* Open a handle to a desktop */
2642 @REQ(open_desktop)
2643 obj_handle_t winsta; /* window station to open (null allowed) */
2644 unsigned int flags; /* desktop flags */
2645 unsigned int access; /* wanted access rights */
2646 unsigned int attributes; /* object attributes */
2647 VARARG(name,unicode_str); /* object name */
2648 @REPLY
2649 obj_handle_t handle; /* handle to the desktop */
2650 @END
2653 /* Open a handle to current input desktop */
2654 @REQ(open_input_desktop)
2655 unsigned int flags; /* desktop flags */
2656 unsigned int access; /* wanted access rights */
2657 unsigned int attributes; /* object attributes */
2658 @REPLY
2659 obj_handle_t handle; /* handle to the desktop */
2660 @END
2663 /* Close a desktop */
2664 @REQ(close_desktop)
2665 obj_handle_t handle; /* handle to the desktop */
2666 @END
2669 /* Get the thread current desktop */
2670 @REQ(get_thread_desktop)
2671 thread_id_t tid; /* thread id */
2672 @REPLY
2673 obj_handle_t handle; /* handle to the desktop */
2674 @END
2677 /* Set the thread current desktop */
2678 @REQ(set_thread_desktop)
2679 obj_handle_t handle; /* handle to the desktop */
2680 @END
2683 /* Enumerate desktops */
2684 @REQ(enum_desktop)
2685 obj_handle_t winstation; /* handle to the window station */
2686 unsigned int index; /* current index */
2687 @REPLY
2688 unsigned int next; /* next index */
2689 VARARG(name,unicode_str); /* window station name */
2690 @END
2693 /* Get/set information about a user object (window station or desktop) */
2694 @REQ(set_user_object_info)
2695 obj_handle_t handle; /* handle to the object */
2696 unsigned int flags; /* information to set/get */
2697 unsigned int obj_flags; /* new object flags */
2698 @REPLY
2699 int is_desktop; /* is object a desktop? */
2700 unsigned int old_obj_flags; /* old object flags */
2701 VARARG(name,unicode_str); /* object name */
2702 @END
2703 #define SET_USER_OBJECT_SET_FLAGS 1
2704 #define SET_USER_OBJECT_GET_FULL_NAME 2
2707 /* Register a hotkey */
2708 @REQ(register_hotkey)
2709 user_handle_t window; /* handle to the window */
2710 int id; /* hotkey identifier */
2711 unsigned int flags; /* modifier keys */
2712 unsigned int vkey; /* virtual key code */
2713 @REPLY
2714 int replaced; /* did we replace an existing hotkey? */
2715 unsigned int flags; /* flags of replaced hotkey */
2716 unsigned int vkey; /* virtual key code of replaced hotkey */
2717 @END
2720 /* Unregister a hotkey */
2721 @REQ(unregister_hotkey)
2722 user_handle_t window; /* handle to the window */
2723 int id; /* hotkey identifier */
2724 @REPLY
2725 unsigned int flags; /* flags of removed hotkey */
2726 unsigned int vkey; /* virtual key code of removed hotkey */
2727 @END
2730 /* Attach (or detach) thread inputs */
2731 @REQ(attach_thread_input)
2732 thread_id_t tid_from; /* thread to be attached */
2733 thread_id_t tid_to; /* thread to which tid_from should be attached */
2734 int attach; /* is it an attach? */
2735 @END
2738 /* Get input data for a given thread */
2739 @REQ(get_thread_input)
2740 thread_id_t tid; /* id of thread */
2741 @REPLY
2742 user_handle_t focus; /* handle to the focus window */
2743 user_handle_t capture; /* handle to the capture window */
2744 user_handle_t active; /* handle to the active window */
2745 user_handle_t foreground; /* handle to the global foreground window */
2746 user_handle_t menu_owner; /* handle to the menu owner */
2747 user_handle_t move_size; /* handle to the moving/resizing window */
2748 user_handle_t caret; /* handle to the caret window */
2749 user_handle_t cursor; /* handle to the cursor */
2750 int show_count; /* cursor show count */
2751 rectangle_t rect; /* caret rectangle */
2752 @END
2755 /* Get the time of the last input event */
2756 @REQ(get_last_input_time)
2757 @REPLY
2758 unsigned int time;
2759 @END
2762 /* Retrieve queue keyboard state for current thread or global async state */
2763 @REQ(get_key_state)
2764 int async; /* whether to query the async state */
2765 int key; /* optional key code or -1 */
2766 @REPLY
2767 unsigned char state; /* state of specified key */
2768 VARARG(keystate,bytes); /* state array for all the keys */
2769 @END
2771 /* Set queue keyboard state for current thread */
2772 @REQ(set_key_state)
2773 int async; /* whether to change the async state too */
2774 VARARG(keystate,bytes); /* state array for all the keys */
2775 @END
2777 /* Set the system foreground window */
2778 @REQ(set_foreground_window)
2779 user_handle_t handle; /* handle to the foreground window */
2780 @REPLY
2781 user_handle_t previous; /* handle to the previous foreground window */
2782 int send_msg_old; /* whether we have to send a msg to the old window */
2783 int send_msg_new; /* whether we have to send a msg to the new window */
2784 @END
2786 /* Set the current thread focus window */
2787 @REQ(set_focus_window)
2788 user_handle_t handle; /* handle to the focus window */
2789 @REPLY
2790 user_handle_t previous; /* handle to the previous focus window */
2791 @END
2793 /* Set the current thread active window */
2794 @REQ(set_active_window)
2795 user_handle_t handle; /* handle to the active window */
2796 @REPLY
2797 user_handle_t previous; /* handle to the previous active window */
2798 @END
2800 /* Set the current thread capture window */
2801 @REQ(set_capture_window)
2802 user_handle_t handle; /* handle to the capture window */
2803 unsigned int flags; /* capture flags (see below) */
2804 @REPLY
2805 user_handle_t previous; /* handle to the previous capture window */
2806 user_handle_t full_handle; /* full 32-bit handle of new capture window */
2807 @END
2808 #define CAPTURE_MENU 0x01 /* capture is for a menu */
2809 #define CAPTURE_MOVESIZE 0x02 /* capture is for moving/resizing */
2812 /* Set the current thread caret window */
2813 @REQ(set_caret_window)
2814 user_handle_t handle; /* handle to the caret window */
2815 int width; /* caret width */
2816 int height; /* caret height */
2817 @REPLY
2818 user_handle_t previous; /* handle to the previous caret window */
2819 rectangle_t old_rect; /* previous caret rectangle */
2820 int old_hide; /* previous hide count */
2821 int old_state; /* previous caret state (1=on, 0=off) */
2822 @END
2825 /* Set the current thread caret information */
2826 @REQ(set_caret_info)
2827 unsigned int flags; /* caret flags (see below) */
2828 user_handle_t handle; /* handle to the caret window */
2829 int x; /* caret x position */
2830 int y; /* caret y position */
2831 int hide; /* increment for hide count (can be negative to show it) */
2832 int state; /* caret state (see below) */
2833 @REPLY
2834 user_handle_t full_handle; /* handle to the current caret window */
2835 rectangle_t old_rect; /* previous caret rectangle */
2836 int old_hide; /* previous hide count */
2837 int old_state; /* previous caret state (1=on, 0=off) */
2838 @END
2839 #define SET_CARET_POS 0x01 /* set the caret position from x,y */
2840 #define SET_CARET_HIDE 0x02 /* increment the caret hide count */
2841 #define SET_CARET_STATE 0x04 /* set the caret on/off state */
2842 enum caret_state
2844 CARET_STATE_OFF, /* off */
2845 CARET_STATE_ON, /* on */
2846 CARET_STATE_TOGGLE, /* toggle current state */
2847 CARET_STATE_ON_IF_MOVED /* on if the position differs, unchanged otherwise */
2851 /* Set a window hook */
2852 @REQ(set_hook)
2853 int id; /* id of the hook */
2854 process_id_t pid; /* id of process to set the hook into */
2855 thread_id_t tid; /* id of thread to set the hook into */
2856 int event_min;
2857 int event_max;
2858 client_ptr_t proc; /* hook procedure */
2859 int flags;
2860 int unicode; /* is it a unicode hook? */
2861 VARARG(module,unicode_str); /* module name */
2862 @REPLY
2863 user_handle_t handle; /* handle to the hook */
2864 unsigned int active_hooks; /* active hooks bitmap */
2865 @END
2868 /* Remove a window hook */
2869 @REQ(remove_hook)
2870 user_handle_t handle; /* handle to the hook */
2871 client_ptr_t proc; /* hook procedure if handle is 0 */
2872 int id; /* id of the hook if handle is 0 */
2873 @REPLY
2874 unsigned int active_hooks; /* active hooks bitmap */
2875 @END
2878 /* Start calling a hook chain */
2879 @REQ(start_hook_chain)
2880 int id; /* id of the hook */
2881 int event; /* signalled event */
2882 user_handle_t window; /* handle to the event window */
2883 int object_id; /* object id for out of context winevent */
2884 int child_id; /* child id for out of context winevent */
2885 @REPLY
2886 user_handle_t handle; /* handle to the next hook */
2887 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2888 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2889 int unicode; /* is it a unicode hook? */
2890 client_ptr_t proc; /* hook procedure */
2891 unsigned int active_hooks; /* active hooks bitmap */
2892 VARARG(module,unicode_str); /* module name */
2893 @END
2896 /* Finished calling a hook chain */
2897 @REQ(finish_hook_chain)
2898 int id; /* id of the hook */
2899 @END
2902 /* Get the hook information */
2903 @REQ(get_hook_info)
2904 user_handle_t handle; /* handle to the current hook */
2905 int get_next; /* do we want info about current or next hook? */
2906 int event; /* signalled event */
2907 user_handle_t window; /* handle to the event window */
2908 int object_id; /* object id for out of context winevent */
2909 int child_id; /* child id for out of context winevent */
2910 @REPLY
2911 user_handle_t handle; /* handle to the hook */
2912 int id; /* id of the hook */
2913 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2914 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2915 client_ptr_t proc; /* hook procedure */
2916 int unicode; /* is it a unicode hook? */
2917 VARARG(module,unicode_str); /* module name */
2918 @END
2921 /* Create a window class */
2922 @REQ(create_class)
2923 int local; /* is it a local class? */
2924 atom_t atom; /* class atom */
2925 unsigned int style; /* class style */
2926 mod_handle_t instance; /* module instance */
2927 int extra; /* number of extra class bytes */
2928 int win_extra; /* number of window extra bytes */
2929 client_ptr_t client_ptr; /* pointer to class in client address space */
2930 data_size_t name_offset; /* base class name offset for specified atom */
2931 VARARG(name,unicode_str); /* class name */
2932 @REPLY
2933 atom_t atom; /* resulting class atom */
2934 @END
2937 /* Destroy a window class */
2938 @REQ(destroy_class)
2939 atom_t atom; /* class atom */
2940 mod_handle_t instance; /* module instance */
2941 VARARG(name,unicode_str); /* class name */
2942 @REPLY
2943 client_ptr_t client_ptr; /* pointer to class in client address space */
2944 @END
2947 /* Set some information in a class */
2948 @REQ(set_class_info)
2949 user_handle_t window; /* handle to the window */
2950 unsigned int flags; /* flags for info to set (see below) */
2951 atom_t atom; /* class atom */
2952 unsigned int style; /* class style */
2953 int win_extra; /* number of window extra bytes */
2954 mod_handle_t instance; /* module instance */
2955 int extra_offset; /* offset to set in extra bytes */
2956 data_size_t extra_size; /* size to set in extra bytes */
2957 lparam_t extra_value; /* value to set in extra bytes */
2958 @REPLY
2959 atom_t old_atom; /* previous class atom */
2960 atom_t base_atom; /* base class atom */
2961 mod_handle_t old_instance; /* previous module instance */
2962 lparam_t old_extra_value; /* old value in extra bytes */
2963 unsigned int old_style; /* previous class style */
2964 int old_extra; /* previous number of class extra bytes */
2965 int old_win_extra; /* previous number of window extra bytes */
2966 @END
2967 #define SET_CLASS_ATOM 0x0001
2968 #define SET_CLASS_STYLE 0x0002
2969 #define SET_CLASS_WINEXTRA 0x0004
2970 #define SET_CLASS_INSTANCE 0x0008
2971 #define SET_CLASS_EXTRA 0x0010
2974 /* Open the clipboard */
2975 @REQ(open_clipboard)
2976 user_handle_t window; /* clipboard window */
2977 @REPLY
2978 user_handle_t owner; /* current clipboard owner */
2979 @END
2982 /* Close the clipboard */
2983 @REQ(close_clipboard)
2984 @REPLY
2985 user_handle_t viewer; /* first clipboard viewer */
2986 user_handle_t owner; /* current clipboard owner */
2987 @END
2990 /* Empty the clipboard and grab ownership */
2991 @REQ(empty_clipboard)
2992 @END
2995 /* Add a data format to the clipboard */
2996 @REQ(set_clipboard_data)
2997 unsigned int format; /* clipboard format of the data */
2998 unsigned int lcid; /* locale id to use for synthesizing text formats */
2999 VARARG(data,bytes); /* data contents */
3000 @REPLY
3001 unsigned int seqno; /* sequence number for the set data */
3002 @END
3005 /* Fetch a data format from the clipboard */
3006 @REQ(get_clipboard_data)
3007 unsigned int format; /* clipboard format of the data */
3008 int render; /* will we try to render it if missing? */
3009 int cached; /* do we already have it in the client-side cache? */
3010 unsigned int seqno; /* sequence number for the data in the cache */
3011 @REPLY
3012 unsigned int from; /* for synthesized data, format to generate it from */
3013 user_handle_t owner; /* clipboard owner for delayed-rendered formats */
3014 unsigned int seqno; /* sequence number for the originally set data */
3015 data_size_t total; /* total data size */
3016 VARARG(data,bytes); /* data contents */
3017 @END
3020 /* Retrieve a list of available formats */
3021 @REQ(get_clipboard_formats)
3022 unsigned int format; /* specific format to query, return all if 0 */
3023 @REPLY
3024 unsigned int count; /* count of available formats */
3025 VARARG(formats,uints); /* array of available formats */
3026 @END
3029 /* Retrieve the next available format */
3030 @REQ(enum_clipboard_formats)
3031 unsigned int previous; /* previous format, or first if 0 */
3032 @REPLY
3033 unsigned int format; /* next format */
3034 @END
3037 /* Release ownership of the clipboard */
3038 @REQ(release_clipboard)
3039 user_handle_t owner; /* clipboard owner to release */
3040 @REPLY
3041 user_handle_t viewer; /* first clipboard viewer */
3042 user_handle_t owner; /* current clipboard owner */
3043 @END
3046 /* Get clipboard information */
3047 @REQ(get_clipboard_info)
3048 @REPLY
3049 user_handle_t window; /* clipboard window */
3050 user_handle_t owner; /* clipboard owner */
3051 user_handle_t viewer; /* clipboard viewer */
3052 unsigned int seqno; /* current sequence number */
3053 @END
3056 /* Set the clipboard viewer window */
3057 @REQ(set_clipboard_viewer)
3058 user_handle_t viewer; /* clipboard viewer */
3059 user_handle_t previous; /* if non-zero, check that this was the previous viewer */
3060 @REPLY
3061 user_handle_t old_viewer; /* previous clipboard viewer */
3062 user_handle_t owner; /* clipboard owner */
3063 @END
3066 /* Add a clipboard listener window */
3067 @REQ(add_clipboard_listener)
3068 user_handle_t window; /* clipboard listener window */
3069 @END
3072 /* Remove a clipboard listener window */
3073 @REQ(remove_clipboard_listener)
3074 user_handle_t window; /* clipboard listener window */
3075 @END
3078 /* Open a security token */
3079 @REQ(open_token)
3080 obj_handle_t handle; /* handle to the thread or process */
3081 unsigned int access; /* access rights to the new token */
3082 unsigned int attributes;/* object attributes */
3083 unsigned int flags; /* flags (see below) */
3084 @REPLY
3085 obj_handle_t token; /* handle to the token */
3086 @END
3087 #define OPEN_TOKEN_THREAD 1
3088 #define OPEN_TOKEN_AS_SELF 2
3091 /* Set/get the global windows */
3092 @REQ(set_global_windows)
3093 unsigned int flags; /* flags for fields to set (see below) */
3094 user_handle_t shell_window; /* handle to the new shell window */
3095 user_handle_t shell_listview; /* handle to the new shell listview window */
3096 user_handle_t progman_window; /* handle to the new program manager window */
3097 user_handle_t taskman_window; /* handle to the new task manager window */
3098 @REPLY
3099 user_handle_t old_shell_window; /* handle to the shell window */
3100 user_handle_t old_shell_listview; /* handle to the shell listview window */
3101 user_handle_t old_progman_window; /* handle to the new program manager window */
3102 user_handle_t old_taskman_window; /* handle to the new task manager window */
3103 @END
3104 #define SET_GLOBAL_SHELL_WINDOWS 0x01 /* set both main shell and listview windows */
3105 #define SET_GLOBAL_PROGMAN_WINDOW 0x02
3106 #define SET_GLOBAL_TASKMAN_WINDOW 0x04
3108 /* Adjust the privileges held by a token */
3109 @REQ(adjust_token_privileges)
3110 obj_handle_t handle; /* handle to the token */
3111 int disable_all; /* disable all privileges? */
3112 int get_modified_state; /* get modified privileges? */
3113 VARARG(privileges,luid_attr); /* privileges to enable/disable/remove */
3114 @REPLY
3115 unsigned int len; /* total length in bytes required to store token privileges */
3116 VARARG(privileges,luid_attr); /* modified privileges */
3117 @END
3119 /* Retrieves the set of privileges held by or available to a token */
3120 @REQ(get_token_privileges)
3121 obj_handle_t handle; /* handle to the token */
3122 @REPLY
3123 unsigned int len; /* total length in bytes required to store token privileges */
3124 VARARG(privileges,luid_attr); /* privileges held by or available to a token */
3125 @END
3127 /* Check the token has the required privileges */
3128 @REQ(check_token_privileges)
3129 obj_handle_t handle; /* handle to the token */
3130 int all_required; /* are all the privileges required for the check to succeed? */
3131 VARARG(privileges,luid_attr); /* privileges to check */
3132 @REPLY
3133 int has_privileges; /* does the token have the required privileges? */
3134 VARARG(privileges,luid_attr); /* privileges held by or available to a token */
3135 @END
3137 @REQ(duplicate_token)
3138 obj_handle_t handle; /* handle to the token to duplicate */
3139 unsigned int access; /* access rights to the new token */
3140 int primary; /* is the new token to be a primary one? */
3141 int impersonation_level; /* impersonation level of the new token */
3142 VARARG(objattr,object_attributes); /* object attributes */
3143 @REPLY
3144 obj_handle_t new_handle; /* duplicated handle */
3145 @END
3147 @REQ(filter_token)
3148 obj_handle_t handle; /* handle to the token to duplicate */
3149 unsigned int flags; /* flags */
3150 data_size_t privileges_size; /* size of privileges */
3151 VARARG(privileges,luid_attr,privileges_size); /* privileges to remove from new token */
3152 VARARG(disable_sids,sid); /* array of groups to remove from new token */
3153 @REPLY
3154 obj_handle_t new_handle; /* filtered handle */
3155 @END
3157 @REQ(access_check)
3158 obj_handle_t handle; /* handle to the token */
3159 unsigned int desired_access; /* desired access to the object */
3160 generic_map_t mapping; /* mapping to specific rights */
3161 VARARG(sd,security_descriptor); /* security descriptor to check */
3162 @REPLY
3163 unsigned int access_granted; /* access rights actually granted */
3164 unsigned int access_status; /* was access granted? */
3165 unsigned int privileges_len; /* length needed to store privileges */
3166 VARARG(privileges,luid_attr); /* privileges used during access check */
3167 @END
3169 @REQ(get_token_sid)
3170 obj_handle_t handle; /* handle to the token */
3171 unsigned int which_sid; /* which SID to retrieve from the token */
3172 @REPLY
3173 data_size_t sid_len; /* length needed to store sid */
3174 VARARG(sid,sid); /* the sid specified by which_sid from the token */
3175 @END
3177 @REQ(get_token_groups)
3178 obj_handle_t handle; /* handle to the token */
3179 unsigned int attr_mask; /* mask for wanted attributes */
3180 @REPLY
3181 data_size_t attr_len; /* length needed to store attrs */
3182 data_size_t sid_len; /* length needed to store sids */
3183 VARARG(attrs,uints,attr_len); /* group attributes */
3184 VARARG(sids,sids); /* group sids */
3185 @END
3187 @REQ(get_token_default_dacl)
3188 obj_handle_t handle; /* handle to the token */
3189 @REPLY
3190 data_size_t acl_len; /* length needed to store access control list */
3191 VARARG(acl,acl); /* access control list */
3192 @END
3194 @REQ(set_token_default_dacl)
3195 obj_handle_t handle; /* handle to the token */
3196 VARARG(acl,acl); /* default dacl to set */
3197 @END
3199 @REQ(set_security_object)
3200 obj_handle_t handle; /* handle to the object */
3201 unsigned int security_info; /* which parts of security descriptor to set */
3202 VARARG(sd,security_descriptor); /* security descriptor to set */
3203 @END
3205 @REQ(get_security_object)
3206 obj_handle_t handle; /* handle to the object */
3207 unsigned int security_info; /* which parts of security descriptor to get */
3208 @REPLY
3209 unsigned int sd_len; /* buffer size needed for sd */
3210 VARARG(sd,security_descriptor); /* retrieved security descriptor */
3211 @END
3214 struct handle_info
3216 process_id_t owner;
3217 obj_handle_t handle;
3218 unsigned int access;
3219 unsigned int attributes;
3220 unsigned int type;
3223 /* Return a list of all opened handles */
3224 @REQ(get_system_handles)
3225 @REPLY
3226 unsigned int count; /* number of handles */
3227 VARARG(data,handle_infos); /* array of handle_infos */
3228 @END
3231 /* Create a mailslot */
3232 @REQ(create_mailslot)
3233 unsigned int access; /* wanted access rights */
3234 timeout_t read_timeout;
3235 unsigned int max_msgsize;
3236 VARARG(objattr,object_attributes); /* object attributes */
3237 @REPLY
3238 obj_handle_t handle; /* handle to the mailslot */
3239 @END
3242 /* Set mailslot information */
3243 @REQ(set_mailslot_info)
3244 obj_handle_t handle; /* handle to the mailslot */
3245 timeout_t read_timeout;
3246 unsigned int flags;
3247 @REPLY
3248 timeout_t read_timeout;
3249 unsigned int max_msgsize;
3250 @END
3251 #define MAILSLOT_SET_READ_TIMEOUT 1
3254 /* Create a directory object */
3255 @REQ(create_directory)
3256 unsigned int access; /* access flags */
3257 VARARG(objattr,object_attributes); /* object attributes */
3258 @REPLY
3259 obj_handle_t handle; /* handle to the directory */
3260 @END
3263 /* Open a directory object */
3264 @REQ(open_directory)
3265 unsigned int access; /* access flags */
3266 unsigned int attributes; /* object attributes */
3267 obj_handle_t rootdir; /* root directory */
3268 VARARG(directory_name,unicode_str); /* Directory name */
3269 @REPLY
3270 obj_handle_t handle; /* handle to the directory */
3271 @END
3274 /* Get a directory entry by index */
3275 @REQ(get_directory_entry)
3276 obj_handle_t handle; /* handle to the directory */
3277 unsigned int index; /* entry index */
3278 @REPLY
3279 data_size_t total_len; /* total length needed for strings */
3280 data_size_t name_len; /* length of the entry name in bytes */
3281 VARARG(name,unicode_str,name_len); /* entry name */
3282 VARARG(type,unicode_str); /* entry type */
3283 @END
3286 /* Create a symbolic link object */
3287 @REQ(create_symlink)
3288 unsigned int access; /* access flags */
3289 VARARG(objattr,object_attributes); /* object attributes */
3290 VARARG(target_name,unicode_str); /* target name */
3291 @REPLY
3292 obj_handle_t handle; /* handle to the symlink */
3293 @END
3296 /* Open a symbolic link object */
3297 @REQ(open_symlink)
3298 unsigned int access; /* access flags */
3299 unsigned int attributes; /* object attributes */
3300 obj_handle_t rootdir; /* root directory */
3301 VARARG(name,unicode_str); /* symlink name */
3302 @REPLY
3303 obj_handle_t handle; /* handle to the symlink */
3304 @END
3307 /* Query a symbolic link object */
3308 @REQ(query_symlink)
3309 obj_handle_t handle; /* handle to the symlink */
3310 @REPLY
3311 data_size_t total; /* total needed size for name */
3312 VARARG(target_name,unicode_str); /* target name */
3313 @END
3316 /* Query basic object information */
3317 @REQ(get_object_info)
3318 obj_handle_t handle; /* handle to the object */
3319 @REPLY
3320 unsigned int access; /* granted access mask */
3321 unsigned int ref_count; /* object ref count */
3322 unsigned int handle_count; /* object handle count */
3323 @END
3326 /* Query the full name of an object */
3327 @REQ(get_object_name)
3328 obj_handle_t handle; /* handle to the object */
3329 @REPLY
3330 data_size_t total; /* total needed size for name */
3331 VARARG(name,unicode_str); /* object name */
3332 @END
3335 /* Query object type name information */
3336 @REQ(get_object_type)
3337 obj_handle_t handle; /* handle to the object */
3338 @REPLY
3339 VARARG(info,object_type_info); /* type information */
3340 @END
3343 /* Query type information for all types */
3344 @REQ(get_object_types)
3345 @REPLY
3346 int count; /* total count of object types */
3347 VARARG(info,object_types_info); /* type information */
3348 @END
3351 /* Allocate a locally-unique identifier */
3352 @REQ(allocate_locally_unique_id)
3353 @REPLY
3354 struct luid luid;
3355 @END
3358 /* Create a device manager */
3359 @REQ(create_device_manager)
3360 unsigned int access; /* wanted access rights */
3361 unsigned int attributes; /* object attributes */
3362 @REPLY
3363 obj_handle_t handle; /* handle to the device */
3364 @END
3367 /* Create a device */
3368 @REQ(create_device)
3369 obj_handle_t rootdir; /* root directory */
3370 client_ptr_t user_ptr; /* opaque ptr for use by client */
3371 obj_handle_t manager; /* device manager */
3372 VARARG(name,unicode_str); /* object name */
3373 @END
3376 /* Delete a device */
3377 @REQ(delete_device)
3378 obj_handle_t manager; /* handle to the device manager */
3379 client_ptr_t device; /* pointer to the device */
3380 @END
3383 /* Retrieve the next pending device irp request */
3384 @REQ(get_next_device_request)
3385 obj_handle_t manager; /* handle to the device manager */
3386 obj_handle_t prev; /* handle to the previous irp */
3387 unsigned int status; /* status of the previous irp */
3388 client_ptr_t user_ptr; /* user pointer of the previous irp */
3389 int pending; /* was the previous irp marked pending? */
3390 unsigned int iosb_status; /* IOSB status of the previous irp */
3391 data_size_t result; /* IOSB result of the previous irp */
3392 VARARG(data,bytes); /* output data of the previous irp */
3393 @REPLY
3394 irp_params_t params; /* irp parameters */
3395 obj_handle_t next; /* handle to the next irp */
3396 thread_id_t client_tid; /* tid of thread calling irp */
3397 client_ptr_t client_thread; /* pointer to thread object of calling irp */
3398 data_size_t in_size; /* total needed input size */
3399 VARARG(next_data,bytes); /* input data of the next irp */
3400 @END
3403 /* Get kernel pointer from server object */
3404 @REQ(get_kernel_object_ptr)
3405 obj_handle_t manager; /* handle to the device manager */
3406 obj_handle_t handle; /* object handle */
3407 @REPLY
3408 client_ptr_t user_ptr; /* kernel object pointer */
3409 @END
3412 /* Associate kernel pointer with server object */
3413 @REQ(set_kernel_object_ptr)
3414 obj_handle_t manager; /* handle to the device manager */
3415 obj_handle_t handle; /* object handle */
3416 client_ptr_t user_ptr; /* kernel object pointer */
3417 @END
3420 /* Grab server object reference from kernel object pointer */
3421 @REQ(grab_kernel_object)
3422 obj_handle_t manager; /* handle to the device manager */
3423 client_ptr_t user_ptr; /* kernel object pointer */
3424 @END
3427 /* Release server object reference from kernel object pointer */
3428 @REQ(release_kernel_object)
3429 obj_handle_t manager; /* handle to the device manager */
3430 client_ptr_t user_ptr; /* kernel object pointer */
3431 @END
3434 /* Get handle from kernel object pointer */
3435 @REQ(get_kernel_object_handle)
3436 obj_handle_t manager; /* handle to the device manager */
3437 client_ptr_t user_ptr; /* kernel object pointer */
3438 unsigned int access; /* wanted access rights */
3439 @REPLY
3440 obj_handle_t handle; /* kernel object handle */
3441 @END
3444 /* Make the current process a system process */
3445 @REQ(make_process_system)
3446 obj_handle_t handle; /* handle to the process */
3447 @REPLY
3448 obj_handle_t event; /* event signaled when all user processes have exited */
3449 @END
3452 /* Get detailed fixed-size information about a token */
3453 @REQ(get_token_info)
3454 obj_handle_t handle; /* handle to the object */
3455 @REPLY
3456 struct luid token_id; /* locally-unique identifier of the token */
3457 struct luid modified_id; /* locally-unique identifier of the modified version of the token */
3458 unsigned int session_id; /* token session id */
3459 int primary; /* is the token primary or impersonation? */
3460 int impersonation_level; /* level of impersonation */
3461 int elevation; /* elevation type */
3462 int group_count; /* the number of groups the token is a member of */
3463 int privilege_count; /* the number of privileges the token has */
3464 @END
3467 /* Create a token which is an elevation counterpart to this token */
3468 @REQ(create_linked_token)
3469 obj_handle_t handle; /* handle to the token */
3470 @REPLY
3471 obj_handle_t linked; /* handle to the linked token */
3472 @END
3475 /* Create I/O completion port */
3476 @REQ(create_completion)
3477 unsigned int access; /* desired access to a port */
3478 unsigned int concurrent; /* max number of concurrent active threads */
3479 VARARG(objattr,object_attributes); /* object attributes */
3480 @REPLY
3481 obj_handle_t handle; /* port handle */
3482 @END
3485 /* Open I/O completion port */
3486 @REQ(open_completion)
3487 unsigned int access; /* desired access to a port */
3488 unsigned int attributes; /* object attributes */
3489 obj_handle_t rootdir; /* root directory */
3490 VARARG(filename,unicode_str); /* port name */
3491 @REPLY
3492 obj_handle_t handle; /* port handle */
3493 @END
3496 /* add completion to completion port */
3497 @REQ(add_completion)
3498 obj_handle_t handle; /* port handle */
3499 apc_param_t ckey; /* completion key */
3500 apc_param_t cvalue; /* completion value */
3501 apc_param_t information; /* IO_STATUS_BLOCK Information */
3502 unsigned int status; /* completion result */
3503 @END
3506 /* get completion from completion port queue */
3507 @REQ(remove_completion)
3508 obj_handle_t handle; /* port handle */
3509 @REPLY
3510 apc_param_t ckey; /* completion key */
3511 apc_param_t cvalue; /* completion value */
3512 apc_param_t information; /* IO_STATUS_BLOCK Information */
3513 unsigned int status; /* completion result */
3514 @END
3517 /* get completion queue depth */
3518 @REQ(query_completion)
3519 obj_handle_t handle; /* port handle */
3520 @REPLY
3521 unsigned int depth; /* completion queue depth */
3522 @END
3525 /* associate object with completion port */
3526 @REQ(set_completion_info)
3527 obj_handle_t handle; /* object handle */
3528 apc_param_t ckey; /* completion key */
3529 obj_handle_t chandle; /* port handle */
3530 @END
3533 /* check for associated completion and push msg */
3534 @REQ(add_fd_completion)
3535 obj_handle_t handle; /* async' object */
3536 apc_param_t cvalue; /* completion value */
3537 apc_param_t information; /* IO_STATUS_BLOCK Information */
3538 unsigned int status; /* completion status */
3539 int async; /* completion is an async result */
3540 @END
3543 /* set fd completion information */
3544 @REQ(set_fd_completion_mode)
3545 obj_handle_t handle; /* handle to a file or directory */
3546 unsigned int flags; /* completion notification flags */
3547 @END
3550 /* set fd disposition information */
3551 @REQ(set_fd_disp_info)
3552 obj_handle_t handle; /* handle to a file or directory */
3553 int unlink; /* whether to unlink file on close */
3554 @END
3557 /* set fd name information */
3558 @REQ(set_fd_name_info)
3559 obj_handle_t handle; /* handle to a file or directory */
3560 obj_handle_t rootdir; /* root directory */
3561 data_size_t namelen; /* length of NT name in bytes */
3562 int link; /* link instead of renaming */
3563 int replace; /* replace an existing file? */
3564 VARARG(name,unicode_str,namelen); /* NT name */
3565 VARARG(filename,string); /* new file name */
3566 @END
3569 /* set fd eof information */
3570 @REQ(set_fd_eof_info)
3571 obj_handle_t handle; /* handle to a file or directory */
3572 file_pos_t eof; /* offset of eof of file */
3573 @END
3576 /* Retrieve layered info for a window */
3577 @REQ(get_window_layered_info)
3578 user_handle_t handle; /* handle to the window */
3579 @REPLY
3580 unsigned int color_key; /* color key */
3581 unsigned int alpha; /* alpha (0..255) */
3582 unsigned int flags; /* LWA_* flags */
3583 @END
3586 /* Set layered info for a window */
3587 @REQ(set_window_layered_info)
3588 user_handle_t handle; /* handle to the window */
3589 unsigned int color_key; /* color key */
3590 unsigned int alpha; /* alpha (0..255) */
3591 unsigned int flags; /* LWA_* flags */
3592 @END
3595 /* Allocate an arbitrary user handle */
3596 @REQ(alloc_user_handle)
3597 @REPLY
3598 user_handle_t handle; /* allocated handle */
3599 @END
3602 /* Free an arbitrary user handle */
3603 @REQ(free_user_handle)
3604 user_handle_t handle; /* handle to free*/
3605 @END
3608 /* Set/get the current cursor */
3609 @REQ(set_cursor)
3610 unsigned int flags; /* flags for fields to set (see below) */
3611 user_handle_t handle; /* handle to the cursor */
3612 int show_count; /* show count increment/decrement */
3613 int x; /* cursor position */
3614 int y;
3615 rectangle_t clip; /* cursor clip rectangle */
3616 unsigned int clip_msg; /* message to post on cursor clip changes */
3617 @REPLY
3618 user_handle_t prev_handle; /* previous handle */
3619 int prev_count; /* previous show count */
3620 int prev_x; /* previous position */
3621 int prev_y;
3622 int new_x; /* new position */
3623 int new_y;
3624 rectangle_t new_clip; /* new clip rectangle */
3625 unsigned int last_change; /* time of last position change */
3626 @END
3627 #define SET_CURSOR_HANDLE 0x01
3628 #define SET_CURSOR_COUNT 0x02
3629 #define SET_CURSOR_POS 0x04
3630 #define SET_CURSOR_CLIP 0x08
3631 #define SET_CURSOR_NOCLIP 0x10
3633 /* Get the history of the 64 last cursor positions */
3634 @REQ(get_cursor_history)
3635 @REPLY
3636 VARARG(history,cursor_positions);
3637 @END
3640 /* Batch read rawinput message data */
3641 @REQ(get_rawinput_buffer)
3642 data_size_t rawinput_size; /* size of RAWINPUT structure */
3643 data_size_t buffer_size; /* size of output buffer */
3644 @REPLY
3645 data_size_t next_size; /* minimum size to get next message data */
3646 unsigned int count;
3647 VARARG(data,bytes);
3648 @END
3650 /* Modify the list of registered rawinput devices */
3651 @REQ(update_rawinput_devices)
3652 VARARG(devices,rawinput_devices);
3653 @END
3655 /* Retrieve the list of registered rawinput devices */
3656 @REQ(get_rawinput_devices)
3657 @REPLY
3658 unsigned int device_count;
3659 VARARG(devices,rawinput_devices);
3660 @END
3662 /* Create a new job object */
3663 @REQ(create_job)
3664 unsigned int access; /* wanted access rights */
3665 VARARG(objattr,object_attributes); /* object attributes */
3666 @REPLY
3667 obj_handle_t handle; /* handle to the job */
3668 @END
3671 /* Open a job object */
3672 @REQ(open_job)
3673 unsigned int access; /* wanted access rights */
3674 unsigned int attributes; /* object attributes */
3675 obj_handle_t rootdir; /* root directory */
3676 VARARG(name,unicode_str); /* object name */
3677 @REPLY
3678 obj_handle_t handle; /* handle to the job */
3679 @END
3682 /* Assign a job object to a process */
3683 @REQ(assign_job)
3684 obj_handle_t job; /* handle to the job */
3685 obj_handle_t process; /* handle to the process */
3686 @END
3689 /* Check if a process is associated with a job */
3690 @REQ(process_in_job)
3691 obj_handle_t job; /* handle to the job */
3692 obj_handle_t process; /* handle to the process */
3693 @END
3696 /* Set limit flags on a job */
3697 @REQ(set_job_limits)
3698 obj_handle_t handle; /* handle to the job */
3699 unsigned int limit_flags; /* new limit flags */
3700 @END
3703 /* Set new completion port for a job */
3704 @REQ(set_job_completion_port)
3705 obj_handle_t job; /* handle to the job */
3706 obj_handle_t port; /* handle to the completion port */
3707 client_ptr_t key; /* key to send with completion messages */
3708 @END
3711 /* Retrieve information about a job */
3712 @REQ(get_job_info)
3713 obj_handle_t handle; /* handle to the job */
3714 @REPLY
3715 int total_processes; /* total count of processes */
3716 int active_processes; /* count of running processes */
3717 VARARG(pids,uints); /* list of active pids */
3718 @END
3721 /* Terminate all processes associated with the job */
3722 @REQ(terminate_job)
3723 obj_handle_t handle; /* handle to the job */
3724 int status; /* process exit code */
3725 @END
3728 /* Suspend a process */
3729 @REQ(suspend_process)
3730 obj_handle_t handle; /* process handle */
3731 @END
3734 /* Resume a process */
3735 @REQ(resume_process)
3736 obj_handle_t handle; /* process handle */
3737 @END
3740 /* Iterate thread list for process */
3741 @REQ(get_next_thread)
3742 obj_handle_t process; /* process handle */
3743 obj_handle_t last; /* thread handle to start with */
3744 unsigned int access; /* desired access for returned handle */
3745 unsigned int attributes; /* returned handle attributes */
3746 unsigned int flags; /* controls iteration direction */
3747 @REPLY
3748 obj_handle_t handle; /* next thread handle */
3749 @END