ntdll: Introduce wine_unix_call.
[wine.git] / server / protocol.def
blob8a68c9a5eb71d423cd3e1f0ed1dd98ee687cac43
1 /* -*- C -*-
3 * Wine server protocol definition
5 * Copyright (C) 2001 Alexandre Julliard
7 * This file is used by tools/make_requests to build the
8 * protocol structures in include/wine/server_protocol.h
10 * This library is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU Lesser General Public
12 * License as published by the Free Software Foundation; either
13 * version 2.1 of the License, or (at your option) any later version.
15 * This library is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 * Lesser General Public License for more details.
20 * You should have received a copy of the GNU Lesser General Public
21 * License along with this library; if not, write to the Free Software
22 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
25 @HEADER /* start of C declarations */
27 #include <stdarg.h>
28 #include <stdlib.h>
29 #include <time.h>
31 #include <windef.h>
32 #include <winbase.h>
34 typedef unsigned int obj_handle_t;
35 typedef unsigned int user_handle_t;
36 typedef unsigned int atom_t;
37 typedef unsigned int process_id_t;
38 typedef unsigned int thread_id_t;
39 typedef unsigned int data_size_t;
40 typedef unsigned int ioctl_code_t;
41 typedef unsigned __int64 lparam_t;
42 typedef unsigned __int64 apc_param_t;
43 typedef unsigned __int64 mem_size_t;
44 typedef unsigned __int64 file_pos_t;
45 typedef unsigned __int64 client_ptr_t;
46 typedef unsigned __int64 affinity_t;
47 typedef client_ptr_t mod_handle_t;
49 struct request_header
51 int req; /* request code */
52 data_size_t request_size; /* request variable part size */
53 data_size_t reply_size; /* reply variable part maximum size */
56 struct reply_header
58 unsigned int error; /* error result */
59 data_size_t reply_size; /* reply variable part size */
62 /* placeholder structure for the maximum allowed request size */
63 /* this is used to construct the generic_request union */
64 struct request_max_size
66 int pad[16]; /* the max request size is 16 ints */
69 #define FIRST_USER_HANDLE 0x0020 /* first possible value for low word of user handle */
70 #define LAST_USER_HANDLE 0xffef /* last possible value for low word of user handle */
73 /* debug event data */
74 typedef union
76 int code; /* event code */
77 struct
79 int code; /* DbgExceptionStateChange */
80 int first; /* first chance exception? */
81 unsigned int exc_code; /* exception code */
82 unsigned int flags; /* exception flags */
83 client_ptr_t record; /* exception record */
84 client_ptr_t address; /* exception address */
85 int nb_params; /* number of parameters */
86 int __pad;
87 client_ptr_t params[15]; /* parameters */
88 } exception;
89 struct
91 int code; /* DbgCreateThreadStateChange */
92 obj_handle_t handle; /* handle to the new thread */
93 client_ptr_t start; /* thread startup routine */
94 } create_thread;
95 struct
97 int code; /* DbgCreateProcessStateChange */
98 obj_handle_t file; /* handle to the process exe file */
99 obj_handle_t process; /* handle to the new process */
100 obj_handle_t thread; /* handle to the new thread */
101 mod_handle_t base; /* base of executable image */
102 int dbg_offset; /* offset of debug info in file */
103 int dbg_size; /* size of debug info */
104 client_ptr_t start; /* thread startup routine */
105 } create_process;
106 struct
108 int code; /* DbgExitThreadStateChange/DbgExitProcessStateChange */
109 int exit_code; /* thread or process exit code */
110 } exit;
111 struct
113 int code; /* DbgLoadDllStateChange */
114 obj_handle_t handle; /* file handle for the dll */
115 mod_handle_t base; /* base address of the dll */
116 int dbg_offset; /* offset of debug info in file */
117 int dbg_size; /* size of debug info */
118 client_ptr_t name; /* image name (optional) */
119 } load_dll;
120 struct
122 int code; /* DbgUnloadDllStateChange */
123 int __pad;
124 mod_handle_t base; /* base address of the dll */
125 } unload_dll;
126 } debug_event_t;
128 /* context data */
129 typedef struct
131 unsigned int machine; /* machine type */
132 unsigned int flags; /* SERVER_CTX_* flags */
133 union
135 struct { unsigned int eip, ebp, esp, eflags, cs, ss; } i386_regs;
136 struct { unsigned __int64 rip, rbp, rsp;
137 unsigned int cs, ss, flags, __pad; } x86_64_regs;
138 struct { unsigned int sp, lr, pc, cpsr; } arm_regs;
139 struct { unsigned __int64 sp, pc, pstate; } arm64_regs;
140 } ctl; /* selected by SERVER_CTX_CONTROL */
141 union
143 struct { unsigned int eax, ebx, ecx, edx, esi, edi; } i386_regs;
144 struct { unsigned __int64 rax,rbx, rcx, rdx, rsi, rdi,
145 r8, r9, r10, r11, r12, r13, r14, r15; } x86_64_regs;
146 struct { unsigned int r[13]; } arm_regs;
147 struct { unsigned __int64 x[31]; } arm64_regs;
148 } integer; /* selected by SERVER_CTX_INTEGER */
149 union
151 struct { unsigned int ds, es, fs, gs; } i386_regs;
152 struct { unsigned int ds, es, fs, gs; } x86_64_regs;
153 } seg; /* selected by SERVER_CTX_SEGMENTS */
154 union
156 struct { unsigned int ctrl, status, tag, err_off, err_sel, data_off, data_sel, cr0npx;
157 unsigned char regs[80]; } i386_regs;
158 struct { struct { unsigned __int64 low, high; } fpregs[32]; } x86_64_regs;
159 struct { unsigned __int64 d[32]; unsigned int fpscr; } arm_regs;
160 struct { struct { unsigned __int64 low, high; } q[32]; unsigned int fpcr, fpsr; } arm64_regs;
161 } fp; /* selected by SERVER_CTX_FLOATING_POINT */
162 union
164 struct { unsigned int dr0, dr1, dr2, dr3, dr6, dr7; } i386_regs;
165 struct { unsigned __int64 dr0, dr1, dr2, dr3, dr6, dr7; } x86_64_regs;
166 struct { unsigned int bvr[8], bcr[8], wvr[1], wcr[1]; } arm_regs;
167 struct { unsigned __int64 bvr[8], wvr[2]; unsigned int bcr[8], wcr[2]; } arm64_regs;
168 } debug; /* selected by SERVER_CTX_DEBUG_REGISTERS */
169 union
171 unsigned char i386_regs[512];
172 } ext; /* selected by SERVER_CTX_EXTENDED_REGISTERS */
173 union
175 struct { struct { unsigned __int64 low, high; } ymm_high[16]; } ymm_high_regs;
176 } ymm; /* selected by SERVER_CTX_YMM_REGISTERS */
177 } context_t;
179 #define SERVER_CTX_CONTROL 0x01
180 #define SERVER_CTX_INTEGER 0x02
181 #define SERVER_CTX_SEGMENTS 0x04
182 #define SERVER_CTX_FLOATING_POINT 0x08
183 #define SERVER_CTX_DEBUG_REGISTERS 0x10
184 #define SERVER_CTX_EXTENDED_REGISTERS 0x20
185 #define SERVER_CTX_YMM_REGISTERS 0x40
187 /* structure used in sending an fd from client to server */
188 struct send_fd
190 thread_id_t tid; /* thread id */
191 int fd; /* file descriptor on client-side */
194 /* structure sent by the server on the wait fifo */
195 struct wake_up_reply
197 client_ptr_t cookie; /* magic cookie that was passed in select_request */
198 int signaled; /* wait result */
199 int __pad;
202 /* NT-style timeout, in 100ns units, negative means relative timeout */
203 typedef __int64 timeout_t;
204 #define TIMEOUT_INFINITE (((timeout_t)0x7fffffff) << 32 | 0xffffffff)
206 /* absolute timeout, negative means that monotonic clock is used */
207 typedef __int64 abstime_t;
209 /* structure for process startup info */
210 typedef struct
212 unsigned int debug_flags;
213 unsigned int console_flags;
214 obj_handle_t console;
215 obj_handle_t hstdin;
216 obj_handle_t hstdout;
217 obj_handle_t hstderr;
218 unsigned int x;
219 unsigned int y;
220 unsigned int xsize;
221 unsigned int ysize;
222 unsigned int xchars;
223 unsigned int ychars;
224 unsigned int attribute;
225 unsigned int flags;
226 unsigned int show;
227 data_size_t curdir_len;
228 data_size_t dllpath_len;
229 data_size_t imagepath_len;
230 data_size_t cmdline_len;
231 data_size_t title_len;
232 data_size_t desktop_len;
233 data_size_t shellinfo_len;
234 data_size_t runtime_len;
235 /* VARARG(curdir,unicode_str,curdir_len); */
236 /* VARARG(dllpath,unicode_str,dllpath_len); */
237 /* VARARG(imagepath,unicode_str,imagepath_len); */
238 /* VARARG(cmdline,unicode_str,cmdline_len); */
239 /* VARARG(title,unicode_str,title_len); */
240 /* VARARG(desktop,unicode_str,desktop_len); */
241 /* VARARG(shellinfo,unicode_str,shellinfo_len); */
242 /* VARARG(runtime,unicode_str,runtime_len); */
243 } startup_info_t;
245 /* structure returned in the list of window properties */
246 typedef struct
248 atom_t atom; /* property atom */
249 int string; /* was atom a string originally? */
250 lparam_t data; /* data stored in property */
251 } property_data_t;
253 /* structure to specify window rectangles */
254 typedef struct
256 int left;
257 int top;
258 int right;
259 int bottom;
260 } rectangle_t;
262 /* structure for parameters of async I/O calls */
263 typedef struct
265 obj_handle_t handle; /* object to perform I/O on */
266 obj_handle_t event; /* event to signal when done */
267 client_ptr_t iosb; /* I/O status block in client addr space */
268 client_ptr_t user; /* opaque user data containing callback pointer and async-specific data */
269 client_ptr_t apc; /* user APC to call */
270 apc_param_t apc_context; /* user APC context or completion value */
271 } async_data_t;
273 /* structures for extra message data */
275 struct hw_msg_source
277 unsigned int device; /* source device (IMDT_* values) */
278 unsigned int origin; /* source origin (IMO_* values) */
281 union rawinput
283 int type;
284 struct
286 int type; /* RIM_TYPEKEYBOARD */
287 unsigned int message; /* message generated by this rawinput event */
288 unsigned short vkey; /* virtual key code */
289 unsigned short scan; /* scan code */
290 } kbd;
291 struct
293 int type; /* RIM_TYPEMOUSE */
294 int x; /* x coordinate */
295 int y; /* y coordinate */
296 unsigned int data; /* mouse data */
297 } mouse;
298 struct
300 int type; /* RIM_TYPEHID */
301 unsigned int device; /* rawinput device index */
302 unsigned int param; /* rawinput message param */
303 unsigned short usage_page;/* HID usage page */
304 unsigned short usage; /* HID usage */
305 unsigned int count; /* HID report count */
306 unsigned int length; /* HID report length */
307 } hid;
310 struct hardware_msg_data
312 lparam_t info; /* extra info */
313 data_size_t size; /* size of hardware message data */
314 int __pad;
315 unsigned int hw_id; /* unique id */
316 unsigned int flags; /* hook flags */
317 struct hw_msg_source source; /* message source */
318 union rawinput rawinput; /* rawinput message data */
321 struct callback_msg_data
323 client_ptr_t callback; /* callback function */
324 lparam_t data; /* user data for callback */
325 lparam_t result; /* message result */
328 struct winevent_msg_data
330 user_handle_t hook; /* hook handle */
331 thread_id_t tid; /* thread id */
332 client_ptr_t hook_proc; /* hook proc address */
333 /* followed by module name if any */
336 typedef union
338 int type;
339 struct
341 int type; /* INPUT_KEYBOARD */
342 unsigned short vkey; /* virtual key code */
343 unsigned short scan; /* scan code */
344 unsigned int flags; /* event flags */
345 unsigned int time; /* event time */
346 lparam_t info; /* extra info */
347 } kbd;
348 struct
350 int type; /* INPUT_MOUSE */
351 int x; /* coordinates */
352 int y;
353 unsigned int data; /* mouse data */
354 unsigned int flags; /* event flags */
355 unsigned int time; /* event time */
356 lparam_t info; /* extra info */
357 } mouse;
358 struct
360 int type; /* INPUT_HARDWARE */
361 unsigned int msg; /* message code */
362 lparam_t lparam; /* message param */
363 union rawinput rawinput;/* rawinput message data */
364 } hw;
365 } hw_input_t;
367 typedef union
369 unsigned char bytes[1]; /* raw data for sent messages */
370 struct hardware_msg_data hardware;
371 struct callback_msg_data callback;
372 struct winevent_msg_data winevent;
373 } message_data_t;
375 /* structure returned in filesystem events */
376 struct filesystem_event
378 int action;
379 data_size_t len;
380 char name[1];
383 typedef struct
385 unsigned int low_part;
386 int high_part;
387 } luid_t;
389 typedef struct
391 unsigned int read;
392 unsigned int write;
393 unsigned int exec;
394 unsigned int all;
395 } generic_map_t;
397 #define MAX_ACL_LEN 65535
399 struct security_descriptor
401 unsigned int control; /* SE_ flags */
402 data_size_t owner_len;
403 data_size_t group_len;
404 data_size_t sacl_len;
405 data_size_t dacl_len;
406 /* VARARG(owner,SID); */
407 /* VARARG(group,SID); */
408 /* VARARG(sacl,ACL); */
409 /* VARARG(dacl,ACL); */
412 struct object_attributes
414 obj_handle_t rootdir; /* root directory */
415 unsigned int attributes; /* object attributes */
416 data_size_t sd_len; /* length of security_descriptor data. may be 0 */
417 data_size_t name_len; /* length of the name string. may be 0 */
418 /* VARARG(sd,security_descriptor); */
419 /* VARARG(name,unicode_str); */
422 struct object_type_info
424 data_size_t name_len; /* length of the name string */
425 unsigned int index; /* type index in global table */
426 unsigned int obj_count; /* count of objects of this type */
427 unsigned int handle_count; /* count of handles of this type */
428 unsigned int obj_max; /* max count of objects of this type */
429 unsigned int handle_max; /* max count of handles of this type */
430 unsigned int valid_access; /* mask for valid access bits */
431 generic_map_t mapping; /* generic access mappings */
432 /* VARARG(name,unicode_str); */
435 struct token_groups
437 unsigned int count;
438 /* unsigned int attributes[count]; */
439 /* VARARG(sids,SID); */
442 enum select_op
444 SELECT_NONE,
445 SELECT_WAIT,
446 SELECT_WAIT_ALL,
447 SELECT_SIGNAL_AND_WAIT,
448 SELECT_KEYED_EVENT_WAIT,
449 SELECT_KEYED_EVENT_RELEASE
452 typedef union
454 enum select_op op;
455 struct
457 enum select_op op; /* SELECT_WAIT or SELECT_WAIT_ALL */
458 obj_handle_t handles[MAXIMUM_WAIT_OBJECTS];
459 } wait;
460 struct
462 enum select_op op; /* SELECT_SIGNAL_AND_WAIT */
463 obj_handle_t wait;
464 obj_handle_t signal; /* must be last in the structure so we can remove it on retries */
465 } signal_and_wait;
466 struct
468 enum select_op op; /* SELECT_KEYED_EVENT_WAIT or SELECT_KEYED_EVENT_RELEASE */
469 obj_handle_t handle;
470 client_ptr_t key;
471 } keyed_event;
472 } select_op_t;
474 enum apc_type
476 APC_NONE,
477 APC_USER,
478 APC_ASYNC_IO,
479 APC_VIRTUAL_ALLOC,
480 APC_VIRTUAL_FREE,
481 APC_VIRTUAL_QUERY,
482 APC_VIRTUAL_PROTECT,
483 APC_VIRTUAL_FLUSH,
484 APC_VIRTUAL_LOCK,
485 APC_VIRTUAL_UNLOCK,
486 APC_MAP_VIEW,
487 APC_UNMAP_VIEW,
488 APC_CREATE_THREAD,
489 APC_DUP_HANDLE,
490 APC_BREAK_PROCESS
493 typedef struct
495 enum apc_type type; /* APC_USER */
496 int __pad;
497 client_ptr_t func; /* void (__stdcall *func)(ULONG_PTR,ULONG_PTR,ULONG_PTR); */
498 apc_param_t args[3]; /* arguments for user function */
499 } user_apc_t;
501 typedef union
503 enum apc_type type;
504 user_apc_t user;
505 struct
507 enum apc_type type; /* APC_ASYNC_IO */
508 unsigned int status; /* I/O status */
509 client_ptr_t user; /* user pointer */
510 client_ptr_t sb; /* status block */
511 } async_io;
512 struct
514 enum apc_type type; /* APC_VIRTUAL_ALLOC */
515 unsigned int op_type; /* type of operation */
516 client_ptr_t addr; /* requested address */
517 mem_size_t size; /* allocation size */
518 mem_size_t zero_bits; /* number of zero high bits */
519 unsigned int prot; /* memory protection flags */
520 } virtual_alloc;
521 struct
523 enum apc_type type; /* APC_VIRTUAL_FREE */
524 unsigned int op_type; /* type of operation */
525 client_ptr_t addr; /* requested address */
526 mem_size_t size; /* allocation size */
527 } virtual_free;
528 struct
530 enum apc_type type; /* APC_VIRTUAL_QUERY */
531 int __pad;
532 client_ptr_t addr; /* requested address */
533 } virtual_query;
534 struct
536 enum apc_type type; /* APC_VIRTUAL_PROTECT */
537 unsigned int prot; /* new protection flags */
538 client_ptr_t addr; /* requested address */
539 mem_size_t size; /* requested size */
540 } virtual_protect;
541 struct
543 enum apc_type type; /* APC_VIRTUAL_FLUSH */
544 int __pad;
545 client_ptr_t addr; /* requested address */
546 mem_size_t size; /* requested size */
547 } virtual_flush;
548 struct
550 enum apc_type type; /* APC_VIRTUAL_LOCK */
551 int __pad;
552 client_ptr_t addr; /* requested address */
553 mem_size_t size; /* requested size */
554 } virtual_lock;
555 struct
557 enum apc_type type; /* APC_VIRTUAL_UNLOCK */
558 int __pad;
559 client_ptr_t addr; /* requested address */
560 mem_size_t size; /* requested size */
561 } virtual_unlock;
562 struct
564 enum apc_type type; /* APC_MAP_VIEW */
565 obj_handle_t handle; /* mapping handle */
566 client_ptr_t addr; /* requested address */
567 mem_size_t size; /* allocation size */
568 file_pos_t offset; /* file offset */
569 mem_size_t zero_bits; /* number of zero high bits */
570 unsigned int alloc_type; /* allocation type */
571 unsigned int prot; /* memory protection flags */
572 } map_view;
573 struct
575 enum apc_type type; /* APC_UNMAP_VIEW */
576 int __pad;
577 client_ptr_t addr; /* view address */
578 } unmap_view;
579 struct
581 enum apc_type type; /* APC_CREATE_THREAD */
582 unsigned int flags; /* creation flags */
583 client_ptr_t func; /* void (__stdcall *func)(void*); start function */
584 client_ptr_t arg; /* argument for start function */
585 mem_size_t zero_bits; /* number of zero high bits for thread stack */
586 mem_size_t reserve; /* reserve size for thread stack */
587 mem_size_t commit; /* commit size for thread stack */
588 } create_thread;
589 struct
591 enum apc_type type; /* APC_DUP_HANDLE */
592 obj_handle_t src_handle; /* src handle to duplicate */
593 obj_handle_t dst_process; /* dst process handle */
594 unsigned int access; /* wanted access rights */
595 unsigned int attributes; /* object attributes */
596 unsigned int options; /* duplicate options */
597 } dup_handle;
598 } apc_call_t;
600 typedef union
602 enum apc_type type;
603 struct
605 enum apc_type type; /* APC_ASYNC_IO */
606 unsigned int status; /* new status of async operation */
607 unsigned int total; /* bytes transferred */
608 } async_io;
609 struct
611 enum apc_type type; /* APC_VIRTUAL_ALLOC */
612 unsigned int status; /* status returned by call */
613 client_ptr_t addr; /* resulting address */
614 mem_size_t size; /* resulting size */
615 } virtual_alloc;
616 struct
618 enum apc_type type; /* APC_VIRTUAL_FREE */
619 unsigned int status; /* status returned by call */
620 client_ptr_t addr; /* resulting address */
621 mem_size_t size; /* resulting size */
622 } virtual_free;
623 struct
625 enum apc_type type; /* APC_VIRTUAL_QUERY */
626 unsigned int status; /* status returned by call */
627 client_ptr_t base; /* resulting base address */
628 client_ptr_t alloc_base;/* resulting allocation base */
629 mem_size_t size; /* resulting region size */
630 unsigned short state; /* resulting region state */
631 unsigned short prot; /* resulting region protection */
632 unsigned short alloc_prot;/* resulting allocation protection */
633 unsigned short alloc_type;/* resulting region allocation type */
634 } virtual_query;
635 struct
637 enum apc_type type; /* APC_VIRTUAL_PROTECT */
638 unsigned int status; /* status returned by call */
639 client_ptr_t addr; /* resulting address */
640 mem_size_t size; /* resulting size */
641 unsigned int prot; /* old protection flags */
642 } virtual_protect;
643 struct
645 enum apc_type type; /* APC_VIRTUAL_FLUSH */
646 unsigned int status; /* status returned by call */
647 client_ptr_t addr; /* resulting address */
648 mem_size_t size; /* resulting size */
649 } virtual_flush;
650 struct
652 enum apc_type type; /* APC_VIRTUAL_LOCK */
653 unsigned int status; /* status returned by call */
654 client_ptr_t addr; /* resulting address */
655 mem_size_t size; /* resulting size */
656 } virtual_lock;
657 struct
659 enum apc_type type; /* APC_VIRTUAL_UNLOCK */
660 unsigned int status; /* status returned by call */
661 client_ptr_t addr; /* resulting address */
662 mem_size_t size; /* resulting size */
663 } virtual_unlock;
664 struct
666 enum apc_type type; /* APC_MAP_VIEW */
667 unsigned int status; /* status returned by call */
668 client_ptr_t addr; /* resulting address */
669 mem_size_t size; /* resulting size */
670 } map_view;
671 struct
673 enum apc_type type; /* APC_UNMAP_VIEW */
674 unsigned int status; /* status returned by call */
675 } unmap_view;
676 struct
678 enum apc_type type; /* APC_CREATE_THREAD */
679 unsigned int status; /* status returned by call */
680 process_id_t pid; /* process id */
681 thread_id_t tid; /* thread id */
682 client_ptr_t teb; /* thread teb (in process address space) */
683 obj_handle_t handle; /* handle to new thread */
684 } create_thread;
685 struct
687 enum apc_type type; /* APC_DUP_HANDLE */
688 unsigned int status; /* status returned by call */
689 obj_handle_t handle; /* duplicated handle in dst process */
690 } dup_handle;
691 struct
693 enum apc_type type; /* APC_BREAK_PROCESS */
694 unsigned int status; /* status returned by call */
695 } break_process;
696 } apc_result_t;
698 enum irp_type
700 IRP_CALL_NONE,
701 IRP_CALL_CREATE,
702 IRP_CALL_CLOSE,
703 IRP_CALL_READ,
704 IRP_CALL_WRITE,
705 IRP_CALL_FLUSH,
706 IRP_CALL_IOCTL,
707 IRP_CALL_VOLUME,
708 IRP_CALL_FREE,
709 IRP_CALL_CANCEL
712 typedef union
714 enum irp_type type; /* irp call type */
715 struct
717 enum irp_type type; /* IRP_CALL_CREATE */
718 unsigned int access; /* access rights */
719 unsigned int sharing; /* sharing flags */
720 unsigned int options; /* file options */
721 client_ptr_t device; /* opaque ptr for the device */
722 obj_handle_t file; /* file handle */
723 } create;
724 struct
726 enum irp_type type; /* IRP_CALL_CLOSE */
727 int __pad;
728 client_ptr_t file; /* opaque ptr for the file object */
729 } close;
730 struct
732 enum irp_type type; /* IRP_CALL_READ */
733 unsigned int key; /* driver key */
734 data_size_t out_size; /* needed output size */
735 int __pad;
736 client_ptr_t file; /* opaque ptr for the file object */
737 file_pos_t pos; /* file position */
738 } read;
739 struct
741 enum irp_type type; /* IRP_CALL_WRITE */
742 unsigned int key; /* driver key */
743 client_ptr_t file; /* opaque ptr for the file object */
744 file_pos_t pos; /* file position */
745 } write;
746 struct
748 enum irp_type type; /* IRP_CALL_FLUSH */
749 int __pad;
750 client_ptr_t file; /* opaque ptr for the file object */
751 } flush;
752 struct
754 enum irp_type type; /* IRP_CALL_IOCTL */
755 ioctl_code_t code; /* ioctl code */
756 data_size_t out_size; /* needed output size */
757 int __pad;
758 client_ptr_t file; /* opaque ptr for the file object */
759 } ioctl;
760 struct
762 enum irp_type type; /* IRP_CALL_VOLUME */
763 unsigned int info_class;/* information class */
764 data_size_t out_size; /* needed output size */
765 int __pad;
766 client_ptr_t file; /* opaque ptr for the file object */
767 } volume;
768 struct
770 enum irp_type type; /* IRP_CALL_FREE */
771 int __pad;
772 client_ptr_t obj; /* opaque ptr for the freed object */
773 } free;
774 struct
776 enum irp_type type; /* IRP_CALL_CANCEL */
777 int __pad;
778 client_ptr_t irp; /* opaque ptr for canceled irp */
779 } cancel;
780 } irp_params_t;
782 /* information about a PE image mapping, roughly equivalent to SECTION_IMAGE_INFORMATION */
783 typedef struct
785 client_ptr_t base;
786 client_ptr_t entry_point;
787 mem_size_t map_size;
788 mem_size_t stack_size;
789 mem_size_t stack_commit;
790 unsigned int zerobits;
791 unsigned int subsystem;
792 unsigned short subsystem_minor;
793 unsigned short subsystem_major;
794 unsigned short osversion_major;
795 unsigned short osversion_minor;
796 unsigned short image_charact;
797 unsigned short dll_charact;
798 unsigned short machine;
799 unsigned char contains_code;
800 unsigned char image_flags;
801 unsigned int loader_flags;
802 unsigned int header_size;
803 unsigned int file_size;
804 unsigned int checksum;
805 unsigned int dbg_offset;
806 unsigned int dbg_size;
807 } pe_image_info_t;
808 #define IMAGE_FLAGS_ComPlusNativeReady 0x01
809 #define IMAGE_FLAGS_ComPlusILOnly 0x02
810 #define IMAGE_FLAGS_ImageDynamicallyRelocated 0x04
811 #define IMAGE_FLAGS_ImageMappedFlat 0x08
812 #define IMAGE_FLAGS_BaseBelow4gb 0x10
813 #define IMAGE_FLAGS_ComPlusPrefer32bit 0x20
814 #define IMAGE_FLAGS_WineBuiltin 0x40
815 #define IMAGE_FLAGS_WineFakeDll 0x80
817 struct rawinput_device
819 unsigned short usage_page;
820 unsigned short usage;
821 unsigned int flags;
822 user_handle_t target;
825 typedef struct
827 int x;
828 int y;
829 unsigned int time;
830 int __pad;
831 lparam_t info;
832 } cursor_pos_t;
834 /****************************************************************/
835 /* Request declarations */
837 /* Create a new process from the context of the parent */
838 @REQ(new_process)
839 obj_handle_t token; /* process token */
840 obj_handle_t debug; /* process debug object */
841 obj_handle_t parent_process; /* parent process */
842 unsigned int flags; /* process creation flags */
843 int socket_fd; /* file descriptor for process socket */
844 unsigned int access; /* access rights for process object */
845 unsigned short machine; /* architecture that the new process will use */
846 data_size_t info_size; /* size of startup info */
847 data_size_t handles_size; /* length of explicit handles list */
848 data_size_t jobs_size; /* length of jobs list */
849 VARARG(objattr,object_attributes); /* object attributes */
850 VARARG(handles,uints,handles_size); /* handles list */
851 VARARG(jobs,uints,jobs_size); /* jobs list */
852 VARARG(info,startup_info,info_size); /* startup information */
853 VARARG(env,unicode_str); /* environment for new process */
854 @REPLY
855 obj_handle_t info; /* new process info handle */
856 process_id_t pid; /* process id */
857 obj_handle_t handle; /* process handle (in the current process) */
858 @END
861 /* Retrieve information about a newly started process */
862 @REQ(get_new_process_info)
863 obj_handle_t info; /* info handle returned from new_process_request */
864 @REPLY
865 int success; /* did the process start successfully? */
866 int exit_code; /* process exit code if failed */
867 @END
870 /* Create a new thread */
871 @REQ(new_thread)
872 obj_handle_t process; /* process in which to create thread */
873 unsigned int access; /* wanted access rights */
874 int suspend; /* new thread should be suspended on creation */
875 int request_fd; /* fd for request pipe */
876 VARARG(objattr,object_attributes); /* object attributes */
877 @REPLY
878 thread_id_t tid; /* thread id */
879 obj_handle_t handle; /* thread handle (in the current process) */
880 @END
883 /* Retrieve the new process startup info */
884 @REQ(get_startup_info)
885 @REPLY
886 data_size_t info_size; /* size of startup info */
887 VARARG(info,startup_info,info_size); /* startup information */
888 VARARG(env,unicode_str); /* environment */
889 @END
892 /* Signal the end of the process initialization */
893 @REQ(init_process_done)
894 client_ptr_t teb; /* TEB of new thread (in process address space) */
895 client_ptr_t peb; /* PEB of new process (in process address space) */
896 client_ptr_t ldt_copy; /* address of LDT copy (in process address space) */
897 @REPLY
898 client_ptr_t entry; /* process entry point */
899 int suspend; /* is process suspended? */
900 @END
903 /* Initialize the first thread of a new process */
904 @REQ(init_first_thread)
905 int unix_pid; /* Unix pid of new process */
906 int unix_tid; /* Unix tid of new thread */
907 int debug_level; /* new debug level */
908 int reply_fd; /* fd for reply pipe */
909 int wait_fd; /* fd for blocking calls pipe */
910 @REPLY
911 process_id_t pid; /* process id of the new thread's process */
912 thread_id_t tid; /* thread id of the new thread */
913 timeout_t server_start; /* server start time */
914 data_size_t info_size; /* total size of startup info */
915 VARARG(machines,ushorts); /* array of supported machines */
916 @END
919 /* Initialize a new thread; called from the child after pthread_create() */
920 @REQ(init_thread)
921 int unix_tid; /* Unix tid of new thread */
922 int reply_fd; /* fd for reply pipe */
923 int wait_fd; /* fd for blocking calls pipe */
924 client_ptr_t teb; /* TEB of new thread (in thread address space) */
925 client_ptr_t entry; /* entry point (in thread address space) */
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 int suspend; /* is thread suspended? */
930 @END
933 /* Terminate a process */
934 @REQ(terminate_process)
935 obj_handle_t handle; /* process handle to terminate */
936 int exit_code; /* process exit code */
937 @REPLY
938 int self; /* suicide? */
939 @END
942 /* Terminate a thread */
943 @REQ(terminate_thread)
944 obj_handle_t handle; /* thread handle to terminate */
945 int exit_code; /* thread exit code */
946 @REPLY
947 int self; /* suicide? */
948 @END
951 /* Retrieve information about a process */
952 @REQ(get_process_info)
953 obj_handle_t handle; /* process handle */
954 @REPLY
955 process_id_t pid; /* server process id */
956 process_id_t ppid; /* server process id of parent */
957 affinity_t affinity; /* process affinity mask */
958 client_ptr_t peb; /* PEB address in process address space */
959 timeout_t start_time; /* process start time */
960 timeout_t end_time; /* process end time */
961 int exit_code; /* process exit code */
962 int priority; /* priority class */
963 unsigned short machine; /* process architecture */
964 VARARG(image,pe_image_info); /* image info for main exe */
965 @END
968 /* Retrieve debug information about a process */
969 @REQ(get_process_debug_info)
970 obj_handle_t handle; /* process handle */
971 @REPLY
972 obj_handle_t debug; /* handle to debug port */
973 int debug_children; /* inherit debugger to child processes */
974 VARARG(image,pe_image_info); /* image info for main exe */
975 @END
978 /* Fetch the name of the process image */
979 @REQ(get_process_image_name)
980 obj_handle_t handle; /* process handle */
981 int win32; /* return a win32 filename? */
982 @REPLY
983 data_size_t len; /* len in bytes required to store filename */
984 VARARG(name,unicode_str); /* image name for main exe */
985 @END
988 /* Retrieve information about a process memory usage */
989 @REQ(get_process_vm_counters)
990 obj_handle_t handle; /* process handle */
991 @REPLY
992 mem_size_t peak_virtual_size; /* peak virtual memory in bytes */
993 mem_size_t virtual_size; /* virtual memory in bytes */
994 mem_size_t peak_working_set_size; /* peak real memory in bytes */
995 mem_size_t working_set_size; /* real memory in bytes */
996 mem_size_t pagefile_usage; /* commit charge in bytes */
997 mem_size_t peak_pagefile_usage; /* peak commit charge in bytes */
998 @END
1001 /* Set a process information */
1002 @REQ(set_process_info)
1003 obj_handle_t handle; /* process handle */
1004 int mask; /* setting mask (see below) */
1005 int priority; /* priority class */
1006 affinity_t affinity; /* affinity mask */
1007 @END
1008 #define SET_PROCESS_INFO_PRIORITY 0x01
1009 #define SET_PROCESS_INFO_AFFINITY 0x02
1012 /* Retrieve information about a thread */
1013 @REQ(get_thread_info)
1014 obj_handle_t handle; /* thread handle */
1015 unsigned int access; /* required access rights */
1016 @REPLY
1017 process_id_t pid; /* server process id */
1018 thread_id_t tid; /* server thread id */
1019 client_ptr_t teb; /* thread teb pointer */
1020 client_ptr_t entry_point; /* thread entry point */
1021 affinity_t affinity; /* thread affinity mask */
1022 int exit_code; /* thread exit code */
1023 int priority; /* thread priority level */
1024 int last; /* last thread in process */
1025 int suspend_count; /* thread suspend count */
1026 int dbg_hidden; /* thread hidden from debugger */
1027 data_size_t desc_len; /* description length in bytes */
1028 VARARG(desc,unicode_str); /* description string */
1029 @END
1032 /* Retrieve information about thread times */
1033 @REQ(get_thread_times)
1034 obj_handle_t handle; /* thread handle */
1035 @REPLY
1036 timeout_t creation_time; /* thread creation time */
1037 timeout_t exit_time; /* thread exit time */
1038 int unix_pid; /* thread native pid */
1039 int unix_tid; /* thread native pid */
1040 @END
1043 /* Set a thread information */
1044 @REQ(set_thread_info)
1045 obj_handle_t handle; /* thread handle */
1046 int mask; /* setting mask (see below) */
1047 int priority; /* priority class */
1048 affinity_t affinity; /* affinity mask */
1049 client_ptr_t entry_point; /* thread entry point */
1050 obj_handle_t token; /* impersonation token */
1051 VARARG(desc,unicode_str); /* description string */
1052 @END
1053 #define SET_THREAD_INFO_PRIORITY 0x01
1054 #define SET_THREAD_INFO_AFFINITY 0x02
1055 #define SET_THREAD_INFO_TOKEN 0x04
1056 #define SET_THREAD_INFO_ENTRYPOINT 0x08
1057 #define SET_THREAD_INFO_DESCRIPTION 0x10
1058 #define SET_THREAD_INFO_DBG_HIDDEN 0x20
1061 /* Suspend a thread */
1062 @REQ(suspend_thread)
1063 obj_handle_t handle; /* thread handle */
1064 @REPLY
1065 int count; /* new suspend count */
1066 @END
1069 /* Resume a thread */
1070 @REQ(resume_thread)
1071 obj_handle_t handle; /* thread handle */
1072 @REPLY
1073 int count; /* new suspend count */
1074 @END
1077 /* Queue an APC for a thread or process */
1078 @REQ(queue_apc)
1079 obj_handle_t handle; /* thread or process handle */
1080 apc_call_t call; /* call arguments */
1081 @REPLY
1082 obj_handle_t handle; /* APC handle */
1083 int self; /* run APC in caller itself? */
1084 @END
1087 /* Get the result of an APC call */
1088 @REQ(get_apc_result)
1089 obj_handle_t handle; /* handle to the APC */
1090 @REPLY
1091 apc_result_t result; /* result of the APC */
1092 @END
1095 /* Close a handle for the current process */
1096 @REQ(close_handle)
1097 obj_handle_t handle; /* handle to close */
1098 @END
1101 /* Set a handle information */
1102 @REQ(set_handle_info)
1103 obj_handle_t handle; /* handle we are interested in */
1104 int flags; /* new handle flags */
1105 int mask; /* mask for flags to set */
1106 @REPLY
1107 int old_flags; /* old flag value */
1108 @END
1111 /* Duplicate a handle */
1112 @REQ(dup_handle)
1113 obj_handle_t src_process; /* src process handle */
1114 obj_handle_t src_handle; /* src handle to duplicate */
1115 obj_handle_t dst_process; /* dst process handle */
1116 unsigned int access; /* wanted access rights */
1117 unsigned int attributes; /* object attributes */
1118 unsigned int options; /* duplicate options */
1119 @REPLY
1120 obj_handle_t handle; /* duplicated handle in dst process */
1121 @END
1124 /* Make an object temporary */
1125 @REQ(make_temporary)
1126 obj_handle_t handle; /* handle to the object */
1127 @END
1130 /* Open a handle to a process */
1131 @REQ(open_process)
1132 process_id_t pid; /* process id to open */
1133 unsigned int access; /* wanted access rights */
1134 unsigned int attributes; /* object attributes */
1135 @REPLY
1136 obj_handle_t handle; /* handle to the process */
1137 @END
1140 /* Open a handle to a thread */
1141 @REQ(open_thread)
1142 thread_id_t tid; /* thread id to open */
1143 unsigned int access; /* wanted access rights */
1144 unsigned int attributes; /* object attributes */
1145 @REPLY
1146 obj_handle_t handle; /* handle to the thread */
1147 @END
1150 /* Wait for handles */
1151 @REQ(select)
1152 int flags; /* wait flags (see below) */
1153 client_ptr_t cookie; /* magic cookie to return to client */
1154 abstime_t timeout; /* timeout */
1155 data_size_t size; /* size of select_op */
1156 obj_handle_t prev_apc; /* handle to previous APC */
1157 VARARG(result,apc_result); /* result of previous APC */
1158 VARARG(data,select_op,size); /* operation-specific data */
1159 VARARG(context,context); /* suspend context */
1160 @REPLY
1161 apc_call_t call; /* APC call arguments */
1162 obj_handle_t apc_handle; /* handle to next APC */
1163 VARARG(context,context); /* suspend context */
1164 @END
1165 #define SELECT_ALERTABLE 1
1166 #define SELECT_INTERRUPTIBLE 2
1169 /* Create an event */
1170 @REQ(create_event)
1171 unsigned int access; /* wanted access rights */
1172 int manual_reset; /* manual reset event */
1173 int initial_state; /* initial state of the event */
1174 VARARG(objattr,object_attributes); /* object attributes */
1175 @REPLY
1176 obj_handle_t handle; /* handle to the event */
1177 @END
1179 /* Event operation */
1180 @REQ(event_op)
1181 obj_handle_t handle; /* handle to event */
1182 int op; /* event operation (see below) */
1183 @REPLY
1184 int state; /* previous state */
1185 @END
1186 enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT };
1188 @REQ(query_event)
1189 obj_handle_t handle; /* handle to event */
1190 @REPLY
1191 int manual_reset; /* manual reset event */
1192 int state; /* current state of the event */
1193 @END
1195 /* Open an event */
1196 @REQ(open_event)
1197 unsigned int access; /* wanted access rights */
1198 unsigned int attributes; /* object attributes */
1199 obj_handle_t rootdir; /* root directory */
1200 VARARG(name,unicode_str); /* object name */
1201 @REPLY
1202 obj_handle_t handle; /* handle to the event */
1203 @END
1206 /* Create a keyed event */
1207 @REQ(create_keyed_event)
1208 unsigned int access; /* wanted access rights */
1209 VARARG(objattr,object_attributes); /* object attributes */
1210 @REPLY
1211 obj_handle_t handle; /* handle to the event */
1212 @END
1214 /* Open a keyed event */
1215 @REQ(open_keyed_event)
1216 unsigned int access; /* wanted access rights */
1217 unsigned int attributes; /* object attributes */
1218 obj_handle_t rootdir; /* root directory */
1219 VARARG(name,unicode_str); /* object name */
1220 @REPLY
1221 obj_handle_t handle; /* handle to the event */
1222 @END
1225 /* Create a mutex */
1226 @REQ(create_mutex)
1227 unsigned int access; /* wanted access rights */
1228 int owned; /* initially owned? */
1229 VARARG(objattr,object_attributes); /* object attributes */
1230 @REPLY
1231 obj_handle_t handle; /* handle to the mutex */
1232 @END
1235 /* Release a mutex */
1236 @REQ(release_mutex)
1237 obj_handle_t handle; /* handle to the mutex */
1238 @REPLY
1239 unsigned int prev_count; /* value of internal counter, before release */
1240 @END
1243 /* Open a mutex */
1244 @REQ(open_mutex)
1245 unsigned int access; /* wanted access rights */
1246 unsigned int attributes; /* object attributes */
1247 obj_handle_t rootdir; /* root directory */
1248 VARARG(name,unicode_str); /* object name */
1249 @REPLY
1250 obj_handle_t handle; /* handle to the mutex */
1251 @END
1254 /* Query a mutex */
1255 @REQ(query_mutex)
1256 obj_handle_t handle; /* handle to mutex */
1257 @REPLY
1258 unsigned int count; /* current count of mutex */
1259 int owned; /* true if owned by current thread */
1260 int abandoned; /* true if abandoned */
1261 @END
1264 /* Create a semaphore */
1265 @REQ(create_semaphore)
1266 unsigned int access; /* wanted access rights */
1267 unsigned int initial; /* initial count */
1268 unsigned int max; /* maximum count */
1269 VARARG(objattr,object_attributes); /* object attributes */
1270 @REPLY
1271 obj_handle_t handle; /* handle to the semaphore */
1272 @END
1275 /* Release a semaphore */
1276 @REQ(release_semaphore)
1277 obj_handle_t handle; /* handle to the semaphore */
1278 unsigned int count; /* count to add to semaphore */
1279 @REPLY
1280 unsigned int prev_count; /* previous semaphore count */
1281 @END
1283 @REQ(query_semaphore)
1284 obj_handle_t handle; /* handle to the semaphore */
1285 @REPLY
1286 unsigned int current; /* current count */
1287 unsigned int max; /* maximum count */
1288 @END
1290 /* Open a semaphore */
1291 @REQ(open_semaphore)
1292 unsigned int access; /* wanted access rights */
1293 unsigned int attributes; /* object attributes */
1294 obj_handle_t rootdir; /* root directory */
1295 VARARG(name,unicode_str); /* object name */
1296 @REPLY
1297 obj_handle_t handle; /* handle to the semaphore */
1298 @END
1301 /* Create a file */
1302 @REQ(create_file)
1303 unsigned int access; /* wanted access rights */
1304 unsigned int sharing; /* sharing flags */
1305 int create; /* file create action */
1306 unsigned int options; /* file options */
1307 unsigned int attrs; /* file attributes for creation */
1308 VARARG(objattr,object_attributes); /* object attributes */
1309 VARARG(filename,string); /* file name */
1310 @REPLY
1311 obj_handle_t handle; /* handle to the file */
1312 @END
1315 /* Open a file object */
1316 @REQ(open_file_object)
1317 unsigned int access; /* wanted access rights */
1318 unsigned int attributes; /* open attributes */
1319 obj_handle_t rootdir; /* root directory */
1320 unsigned int sharing; /* sharing flags */
1321 unsigned int options; /* file options */
1322 VARARG(filename,unicode_str); /* file name */
1323 @REPLY
1324 obj_handle_t handle; /* handle to the file */
1325 @END
1328 /* Allocate a file handle for a Unix fd */
1329 @REQ(alloc_file_handle)
1330 unsigned int access; /* wanted access rights */
1331 unsigned int attributes; /* object attributes */
1332 int fd; /* file descriptor on the client side */
1333 @REPLY
1334 obj_handle_t handle; /* handle to the file */
1335 @END
1338 /* Get the Unix name from a file handle */
1339 @REQ(get_handle_unix_name)
1340 obj_handle_t handle; /* file handle */
1341 @REPLY
1342 data_size_t name_len; /* unix name length */
1343 VARARG(name,string); /* unix name */
1344 @END
1347 /* Get a Unix fd to access a file */
1348 @REQ(get_handle_fd)
1349 obj_handle_t handle; /* handle to the file */
1350 @REPLY
1351 int type; /* file type (see below) */
1352 int cacheable; /* can fd be cached in the client? */
1353 unsigned int access; /* file access rights */
1354 unsigned int options; /* file open options */
1355 @END
1356 enum server_fd_type
1358 FD_TYPE_INVALID, /* invalid file (no associated fd) */
1359 FD_TYPE_FILE, /* regular file */
1360 FD_TYPE_DIR, /* directory */
1361 FD_TYPE_SOCKET, /* socket */
1362 FD_TYPE_SERIAL, /* serial port */
1363 FD_TYPE_PIPE, /* named pipe */
1364 FD_TYPE_MAILSLOT, /* mailslot */
1365 FD_TYPE_CHAR, /* unspecified char device */
1366 FD_TYPE_DEVICE, /* Windows device file */
1367 FD_TYPE_NB_TYPES
1371 /* Retrieve (or allocate) the client-side directory cache entry */
1372 @REQ(get_directory_cache_entry)
1373 obj_handle_t handle; /* handle to the directory */
1374 @REPLY
1375 int entry; /* cache entry on the client side */
1376 VARARG(free,ints); /* entries that can be freed */
1377 @END
1380 /* Flush a file buffers */
1381 @REQ(flush)
1382 async_data_t async; /* async I/O parameters */
1383 @REPLY
1384 obj_handle_t event; /* event set when finished */
1385 @END
1387 /* Query file information */
1388 @REQ(get_file_info)
1389 obj_handle_t handle; /* handle to the file */
1390 unsigned int info_class; /* queried information class */
1391 @REPLY
1392 VARARG(data,bytes); /* file info data */
1393 @END
1395 /* Query volume information */
1396 @REQ(get_volume_info)
1397 obj_handle_t handle; /* handle to the file */
1398 async_data_t async; /* async I/O parameters */
1399 unsigned int info_class; /* queried information class */
1400 @REPLY
1401 obj_handle_t wait; /* handle to wait on for blocking read */
1402 VARARG(data,bytes); /* volume info data */
1403 @END
1405 /* Lock a region of a file */
1406 @REQ(lock_file)
1407 obj_handle_t handle; /* handle to the file */
1408 file_pos_t offset; /* offset of start of lock */
1409 file_pos_t count; /* count of bytes to lock */
1410 int shared; /* shared or exclusive lock? */
1411 int wait; /* do we want to wait? */
1412 @REPLY
1413 obj_handle_t handle; /* handle to wait on */
1414 int overlapped; /* is it an overlapped I/O handle? */
1415 @END
1418 /* Unlock a region of a file */
1419 @REQ(unlock_file)
1420 obj_handle_t handle; /* handle to the file */
1421 file_pos_t offset; /* offset of start of unlock */
1422 file_pos_t count; /* count of bytes to unlock */
1423 @END
1426 /* Set socket event parameters */
1427 @REQ(set_socket_event)
1428 obj_handle_t handle; /* handle to the socket */
1429 unsigned int mask; /* event mask */
1430 obj_handle_t event; /* event object */
1431 user_handle_t window; /* window to send the message to */
1432 unsigned int msg; /* message to send */
1433 @END
1436 /* Get socket event parameters */
1437 @REQ(get_socket_event)
1438 obj_handle_t handle; /* handle to the socket */
1439 int service; /* clear pending? */
1440 obj_handle_t c_event; /* event to clear */
1441 @REPLY
1442 unsigned int mask; /* event mask */
1443 unsigned int pmask; /* pending events */
1444 unsigned int state; /* status bits */
1445 VARARG(errors,ints); /* event errors */
1446 @END
1449 /* Get socket info */
1450 @REQ(get_socket_info)
1451 obj_handle_t handle; /* handle to the socket */
1452 @REPLY
1453 int family; /* family, see socket manpage */
1454 int type; /* type, see socket manpage */
1455 int protocol; /* protocol, see socket manpage */
1456 @END
1459 /* Re-enable pending socket events */
1460 @REQ(enable_socket_event)
1461 obj_handle_t handle; /* handle to the socket */
1462 unsigned int mask; /* events to re-enable */
1463 unsigned int sstate; /* status bits to set */
1464 unsigned int cstate; /* status bits to clear */
1465 @END
1467 @REQ(set_socket_deferred)
1468 obj_handle_t handle; /* handle to the socket */
1469 obj_handle_t deferred; /* handle to the socket for which accept() is deferred */
1470 @END
1473 /* Perform a recv on a socket */
1474 @REQ(recv_socket)
1475 int oob; /* are we receiving OOB data? */
1476 async_data_t async; /* async I/O parameters */
1477 unsigned int status; /* status of initial call */
1478 unsigned int total; /* number of bytes already read */
1479 @REPLY
1480 obj_handle_t wait; /* handle to wait on for blocking recv */
1481 unsigned int options; /* device open options */
1482 @END
1485 struct poll_socket_input
1487 obj_handle_t socket; /* socket handle */
1488 int flags; /* events to poll for */
1491 struct poll_socket_output
1493 int flags; /* events signaled */
1494 unsigned int status; /* socket status */
1497 /* Perform an async poll on a socket */
1498 @REQ(poll_socket)
1499 async_data_t async; /* async I/O parameters */
1500 timeout_t timeout; /* timeout */
1501 VARARG(sockets,poll_socket_input); /* list of sockets to poll */
1502 @REPLY
1503 obj_handle_t wait; /* handle to wait on for blocking poll */
1504 unsigned int options; /* file open options */
1505 VARARG(sockets,poll_socket_output); /* data returned */
1506 @END
1509 /* Perform a send on a socket */
1510 @REQ(send_socket)
1511 async_data_t async; /* async I/O parameters */
1512 unsigned int status; /* status of initial call */
1513 unsigned int total; /* number of bytes already sent */
1514 @REPLY
1515 obj_handle_t wait; /* handle to wait on for blocking send */
1516 unsigned int options; /* device open options */
1517 @END
1520 /* Retrieve the next pending console ioctl request */
1521 @REQ(get_next_console_request)
1522 obj_handle_t handle; /* console server handle */
1523 int signal; /* server signal state */
1524 int read; /* 1 if reporting result of blocked read ioctl */
1525 unsigned int status; /* status of previous ioctl */
1526 VARARG(out_data,bytes); /* out_data of previous ioctl */
1527 @REPLY
1528 unsigned int code; /* ioctl code */
1529 unsigned int output; /* output id or 0 for input */
1530 data_size_t out_size; /* ioctl output size */
1531 VARARG(in_data,bytes); /* ioctl in_data */
1532 @END
1535 /* enable directory change notifications */
1536 @REQ(read_directory_changes)
1537 unsigned int filter; /* notification filter */
1538 int subtree; /* watch the subtree? */
1539 int want_data; /* flag indicating whether change data should be collected */
1540 async_data_t async; /* async I/O parameters */
1541 @END
1544 @REQ(read_change)
1545 obj_handle_t handle;
1546 @REPLY
1547 VARARG(events,filesystem_event); /* collected filesystem events */
1548 @END
1551 /* Create a file mapping */
1552 @REQ(create_mapping)
1553 unsigned int access; /* wanted access rights */
1554 unsigned int flags; /* SEC_* flags */
1555 unsigned int file_access; /* file access rights */
1556 mem_size_t size; /* mapping size */
1557 obj_handle_t file_handle; /* file handle */
1558 VARARG(objattr,object_attributes); /* object attributes */
1559 @REPLY
1560 obj_handle_t handle; /* handle to the mapping */
1561 @END
1564 /* Open a mapping */
1565 @REQ(open_mapping)
1566 unsigned int access; /* wanted access rights */
1567 unsigned int attributes; /* object attributes */
1568 obj_handle_t rootdir; /* root directory */
1569 VARARG(name,unicode_str); /* object name */
1570 @REPLY
1571 obj_handle_t handle; /* handle to the mapping */
1572 @END
1575 /* Get information about a file mapping */
1576 @REQ(get_mapping_info)
1577 obj_handle_t handle; /* handle to the mapping */
1578 unsigned int access; /* wanted access rights */
1579 @REPLY
1580 mem_size_t size; /* mapping size */
1581 unsigned int flags; /* SEC_* flags */
1582 obj_handle_t shared_file; /* shared mapping file handle */
1583 data_size_t total; /* total required buffer size in bytes */
1584 VARARG(image,pe_image_info);/* image info for SEC_IMAGE mappings */
1585 VARARG(name,unicode_str); /* filename for SEC_IMAGE mappings */
1586 @END
1589 /* Add a memory view in the current process */
1590 @REQ(map_view)
1591 obj_handle_t mapping; /* file mapping handle, or 0 for .so builtin */
1592 unsigned int access; /* wanted access rights */
1593 client_ptr_t base; /* view base address (page-aligned) */
1594 mem_size_t size; /* view size */
1595 file_pos_t start; /* start offset in mapping */
1596 VARARG(image,pe_image_info);/* image info for .so builtins */
1597 VARARG(name,unicode_str); /* image filename for .so builtins */
1598 @END
1601 /* Unmap a memory view from the current process */
1602 @REQ(unmap_view)
1603 client_ptr_t base; /* view base address */
1604 @END
1607 /* Get a range of committed pages in a file mapping */
1608 @REQ(get_mapping_committed_range)
1609 client_ptr_t base; /* view base address */
1610 file_pos_t offset; /* starting offset (page-aligned, in bytes) */
1611 @REPLY
1612 mem_size_t size; /* size of range starting at offset (page-aligned, in bytes) */
1613 int committed; /* whether it is a committed range */
1614 @END
1617 /* Add a range to the committed pages in a file mapping */
1618 @REQ(add_mapping_committed_range)
1619 client_ptr_t base; /* view base address */
1620 file_pos_t offset; /* starting offset (page-aligned, in bytes) */
1621 mem_size_t size; /* size to set (page-aligned, in bytes) or 0 if only retrieving */
1622 @END
1625 /* Check if two memory maps are for the same file */
1626 @REQ(is_same_mapping)
1627 client_ptr_t base1; /* first view base address */
1628 client_ptr_t base2; /* second view base address */
1629 @END
1632 /* Get the filename of a mapping */
1633 @REQ(get_mapping_filename)
1634 obj_handle_t process; /* process handle */
1635 client_ptr_t addr; /* address inside mapped view (in process address space) */
1636 @REPLY
1637 data_size_t len; /* total filename length in bytes */
1638 VARARG(filename,unicode_str); /* filename in NT format */
1639 @END
1642 struct thread_info
1644 timeout_t start_time;
1645 thread_id_t tid;
1646 int base_priority;
1647 int current_priority;
1648 int unix_tid;
1651 struct process_info
1653 timeout_t start_time;
1654 data_size_t name_len;
1655 int thread_count;
1656 int priority;
1657 process_id_t pid;
1658 process_id_t parent_pid;
1659 int handle_count;
1660 int unix_pid;
1661 int __pad;
1662 /* VARARG(name,unicode_str,name_len); */
1663 /* VARARG(threads,struct thread_info,thread_count); */
1666 /* Get a list of processes and threads currently running */
1667 @REQ(list_processes)
1668 @REPLY
1669 data_size_t info_size;
1670 int process_count;
1671 VARARG(data,process_info,info_size);
1672 @END
1675 /* Create a debug object */
1676 @REQ(create_debug_obj)
1677 unsigned int access; /* wanted access rights */
1678 unsigned int flags; /* object flags */
1679 VARARG(objattr,object_attributes); /* object attributes */
1680 @REPLY
1681 obj_handle_t handle; /* handle to the debug object */
1682 @END
1685 /* Wait for a debug event */
1686 @REQ(wait_debug_event)
1687 obj_handle_t debug; /* debug object */
1688 @REPLY
1689 process_id_t pid; /* process id */
1690 thread_id_t tid; /* thread id */
1691 VARARG(event,debug_event); /* debug event data */
1692 @END
1695 /* Queue an exception event */
1696 @REQ(queue_exception_event)
1697 int first; /* first chance exception? */
1698 unsigned int code; /* exception code */
1699 unsigned int flags; /* exception flags */
1700 client_ptr_t record; /* exception record */
1701 client_ptr_t address; /* exception address */
1702 data_size_t len; /* size of parameters */
1703 VARARG(params,uints64,len);/* exception parameters */
1704 @REPLY
1705 obj_handle_t handle; /* handle to the queued event */
1706 @END
1709 /* Retrieve the status of an exception event */
1710 @REQ(get_exception_status)
1711 obj_handle_t handle; /* handle to the queued event */
1712 @END
1715 /* Continue a debug event */
1716 @REQ(continue_debug_event)
1717 obj_handle_t debug; /* debug object */
1718 process_id_t pid; /* process id to continue */
1719 thread_id_t tid; /* thread id to continue */
1720 unsigned int status; /* continuation status */
1721 @END
1724 /* Start or stop debugging an existing process */
1725 @REQ(debug_process)
1726 obj_handle_t handle; /* process handle */
1727 obj_handle_t debug; /* debug object to attach to the process */
1728 int attach; /* 1=attaching / 0=detaching from the process */
1729 @END
1732 /* Set debug object information */
1733 @REQ(set_debug_obj_info)
1734 obj_handle_t debug; /* debug object */
1735 unsigned int flags; /* object flags */
1736 @END
1739 /* Read data from a process address space */
1740 @REQ(read_process_memory)
1741 obj_handle_t handle; /* process handle */
1742 client_ptr_t addr; /* addr to read from */
1743 @REPLY
1744 VARARG(data,bytes); /* result data */
1745 @END
1748 /* Write data to a process address space */
1749 @REQ(write_process_memory)
1750 obj_handle_t handle; /* process handle */
1751 client_ptr_t addr; /* addr to write to */
1752 VARARG(data,bytes); /* data to write */
1753 @END
1756 /* Create a registry key */
1757 @REQ(create_key)
1758 unsigned int access; /* desired access rights */
1759 unsigned int options; /* creation options */
1760 VARARG(objattr,object_attributes); /* object attributes */
1761 VARARG(class,unicode_str); /* class name */
1762 @REPLY
1763 obj_handle_t hkey; /* handle to the created key */
1764 int created; /* has it been newly created? */
1765 @END
1767 /* Open a registry key */
1768 @REQ(open_key)
1769 obj_handle_t parent; /* handle to the parent key */
1770 unsigned int access; /* desired access rights */
1771 unsigned int attributes; /* object attributes */
1772 VARARG(name,unicode_str); /* key name */
1773 @REPLY
1774 obj_handle_t hkey; /* handle to the open key */
1775 @END
1778 /* Delete a registry key */
1779 @REQ(delete_key)
1780 obj_handle_t hkey; /* handle to the key */
1781 @END
1784 /* Flush a registry key */
1785 @REQ(flush_key)
1786 obj_handle_t hkey; /* handle to the key */
1787 @END
1790 /* Enumerate registry subkeys */
1791 @REQ(enum_key)
1792 obj_handle_t hkey; /* handle to registry key */
1793 int index; /* index of subkey (or -1 for current key) */
1794 int info_class; /* requested information class */
1795 @REPLY
1796 int subkeys; /* number of subkeys */
1797 int max_subkey; /* longest subkey name */
1798 int max_class; /* longest class name */
1799 int values; /* number of values */
1800 int max_value; /* longest value name */
1801 int max_data; /* longest value data */
1802 timeout_t modif; /* last modification time */
1803 data_size_t total; /* total length needed for full name and class */
1804 data_size_t namelen; /* length of key name in bytes */
1805 VARARG(name,unicode_str,namelen); /* key name */
1806 VARARG(class,unicode_str); /* class name */
1807 @END
1810 /* Set a value of a registry key */
1811 @REQ(set_key_value)
1812 obj_handle_t hkey; /* handle to registry key */
1813 int type; /* value type */
1814 data_size_t namelen; /* length of value name in bytes */
1815 VARARG(name,unicode_str,namelen); /* value name */
1816 VARARG(data,bytes); /* value data */
1817 @END
1820 /* Retrieve the value of a registry key */
1821 @REQ(get_key_value)
1822 obj_handle_t hkey; /* handle to registry key */
1823 VARARG(name,unicode_str); /* value name */
1824 @REPLY
1825 int type; /* value type */
1826 data_size_t total; /* total length needed for data */
1827 VARARG(data,bytes); /* value data */
1828 @END
1831 /* Enumerate a value of a registry key */
1832 @REQ(enum_key_value)
1833 obj_handle_t hkey; /* handle to registry key */
1834 int index; /* value index */
1835 int info_class; /* requested information class */
1836 @REPLY
1837 int type; /* value type */
1838 data_size_t total; /* total length needed for full name and data */
1839 data_size_t namelen; /* length of value name in bytes */
1840 VARARG(name,unicode_str,namelen); /* value name */
1841 VARARG(data,bytes); /* value data */
1842 @END
1845 /* Delete a value of a registry key */
1846 @REQ(delete_key_value)
1847 obj_handle_t hkey; /* handle to registry key */
1848 VARARG(name,unicode_str); /* value name */
1849 @END
1852 /* Load a registry branch from a file */
1853 @REQ(load_registry)
1854 obj_handle_t file; /* file to load from */
1855 VARARG(objattr,object_attributes); /* object attributes */
1856 @END
1859 /* UnLoad a registry branch from a file */
1860 @REQ(unload_registry)
1861 obj_handle_t parent; /* handle to the parent key */
1862 unsigned int attributes; /* object attributes */
1863 VARARG(name,unicode_str); /* key name */
1864 @END
1867 /* Save a registry branch to a file */
1868 @REQ(save_registry)
1869 obj_handle_t hkey; /* key to save */
1870 obj_handle_t file; /* file to save to */
1871 @END
1874 /* Add a registry key change notification */
1875 @REQ(set_registry_notification)
1876 obj_handle_t hkey; /* key to watch for changes */
1877 obj_handle_t event; /* event to set */
1878 int subtree; /* should we watch the whole subtree? */
1879 unsigned int filter; /* things to watch */
1880 @END
1883 /* Create a waitable timer */
1884 @REQ(create_timer)
1885 unsigned int access; /* wanted access rights */
1886 int manual; /* manual reset */
1887 VARARG(objattr,object_attributes); /* object attributes */
1888 @REPLY
1889 obj_handle_t handle; /* handle to the timer */
1890 @END
1893 /* Open a waitable timer */
1894 @REQ(open_timer)
1895 unsigned int access; /* wanted access rights */
1896 unsigned int attributes; /* object attributes */
1897 obj_handle_t rootdir; /* root directory */
1898 VARARG(name,unicode_str); /* object name */
1899 @REPLY
1900 obj_handle_t handle; /* handle to the timer */
1901 @END
1903 /* Set a waitable timer */
1904 @REQ(set_timer)
1905 obj_handle_t handle; /* handle to the timer */
1906 timeout_t expire; /* next expiration absolute time */
1907 client_ptr_t callback; /* callback function */
1908 client_ptr_t arg; /* callback argument */
1909 int period; /* timer period in ms */
1910 @REPLY
1911 int signaled; /* was the timer signaled before this call ? */
1912 @END
1914 /* Cancel a waitable timer */
1915 @REQ(cancel_timer)
1916 obj_handle_t handle; /* handle to the timer */
1917 @REPLY
1918 int signaled; /* was the timer signaled before this calltime ? */
1919 @END
1921 /* Get information on a waitable timer */
1922 @REQ(get_timer_info)
1923 obj_handle_t handle; /* handle to the timer */
1924 @REPLY
1925 timeout_t when; /* absolute time when the timer next expires */
1926 int signaled; /* is the timer signaled? */
1927 @END
1930 /* Retrieve the current context of a thread */
1931 @REQ(get_thread_context)
1932 obj_handle_t handle; /* thread or context handle */
1933 unsigned int flags; /* context flags */
1934 @REPLY
1935 int self; /* was it a handle to the current thread? */
1936 obj_handle_t handle; /* pending context handle */
1937 VARARG(context,context); /* thread context */
1938 @END
1941 /* Set the current context of a thread */
1942 @REQ(set_thread_context)
1943 obj_handle_t handle; /* thread handle */
1944 VARARG(context,context); /* thread context */
1945 @REPLY
1946 int self; /* was it a handle to the current thread? */
1947 @END
1950 /* Fetch a selector entry for a thread */
1951 @REQ(get_selector_entry)
1952 obj_handle_t handle; /* thread handle */
1953 int entry; /* LDT entry */
1954 @REPLY
1955 unsigned int base; /* selector base */
1956 unsigned int limit; /* selector limit */
1957 unsigned char flags; /* selector flags */
1958 @END
1961 /* Add an atom */
1962 @REQ(add_atom)
1963 VARARG(name,unicode_str); /* atom name */
1964 @REPLY
1965 atom_t atom; /* resulting atom */
1966 @END
1969 /* Delete an atom */
1970 @REQ(delete_atom)
1971 atom_t atom; /* atom handle */
1972 @END
1975 /* Find an atom */
1976 @REQ(find_atom)
1977 VARARG(name,unicode_str); /* atom name */
1978 @REPLY
1979 atom_t atom; /* atom handle */
1980 @END
1983 /* Get information about an atom */
1984 @REQ(get_atom_information)
1985 atom_t atom; /* atom handle */
1986 @REPLY
1987 int count; /* atom lock count */
1988 int pinned; /* whether the atom has been pinned */
1989 data_size_t total; /* actual length of atom name */
1990 VARARG(name,unicode_str); /* atom name */
1991 @END
1994 /* Get the message queue of the current thread */
1995 @REQ(get_msg_queue)
1996 @REPLY
1997 obj_handle_t handle; /* handle to the queue */
1998 @END
2001 /* Set the file descriptor associated to the current thread queue */
2002 @REQ(set_queue_fd)
2003 obj_handle_t handle; /* handle to the file descriptor */
2004 @END
2007 /* Set the current message queue wakeup mask */
2008 @REQ(set_queue_mask)
2009 unsigned int wake_mask; /* wakeup bits mask */
2010 unsigned int changed_mask; /* changed bits mask */
2011 int skip_wait; /* will we skip waiting if signaled? */
2012 @REPLY
2013 unsigned int wake_bits; /* current wake bits */
2014 unsigned int changed_bits; /* current changed bits */
2015 @END
2018 /* Get the current message queue status */
2019 @REQ(get_queue_status)
2020 unsigned int clear_bits; /* should we clear the change bits? */
2021 @REPLY
2022 unsigned int wake_bits; /* wake bits */
2023 unsigned int changed_bits; /* changed bits since last time */
2024 @END
2027 /* Retrieve the process idle event */
2028 @REQ(get_process_idle_event)
2029 obj_handle_t handle; /* process handle */
2030 @REPLY
2031 obj_handle_t event; /* handle to idle event */
2032 @END
2035 /* Send a message to a thread queue */
2036 @REQ(send_message)
2037 thread_id_t id; /* thread id */
2038 int type; /* message type (see below) */
2039 int flags; /* message flags (see below) */
2040 user_handle_t win; /* window handle */
2041 unsigned int msg; /* message code */
2042 lparam_t wparam; /* parameters */
2043 lparam_t lparam; /* parameters */
2044 timeout_t timeout; /* timeout for reply */
2045 VARARG(data,message_data); /* message data for sent messages */
2046 @END
2048 @REQ(post_quit_message)
2049 int exit_code; /* exit code to return */
2050 @END
2052 enum message_type
2054 MSG_ASCII, /* Ascii message (from SendMessageA) */
2055 MSG_UNICODE, /* Unicode message (from SendMessageW) */
2056 MSG_NOTIFY, /* notify message (from SendNotifyMessageW), always Unicode */
2057 MSG_CALLBACK, /* callback message (from SendMessageCallbackW), always Unicode */
2058 MSG_CALLBACK_RESULT,/* result of a callback message */
2059 MSG_OTHER_PROCESS, /* sent from other process, may include vararg data, always Unicode */
2060 MSG_POSTED, /* posted message (from PostMessageW), always Unicode */
2061 MSG_HARDWARE, /* hardware message */
2062 MSG_WINEVENT, /* winevent message */
2063 MSG_HOOK_LL /* low-level hardware hook */
2065 #define SEND_MSG_ABORT_IF_HUNG 0x01
2068 /* Send a hardware message to a thread queue */
2069 @REQ(send_hardware_message)
2070 user_handle_t win; /* window handle */
2071 hw_input_t input; /* input data */
2072 unsigned int flags; /* flags (see below) */
2073 VARARG(report,bytes); /* HID report data */
2074 @REPLY
2075 int wait; /* do we need to wait for a reply? */
2076 int prev_x; /* previous cursor position */
2077 int prev_y;
2078 int new_x; /* new cursor position */
2079 int new_y;
2080 VARARG(keystate,bytes); /* global state array for all the keys */
2081 @END
2082 #define SEND_HWMSG_INJECTED 0x01
2085 /* Get a message from the current queue */
2086 @REQ(get_message)
2087 unsigned int flags; /* PM_* flags */
2088 user_handle_t get_win; /* window handle to get */
2089 unsigned int get_first; /* first message code to get */
2090 unsigned int get_last; /* last message code to get */
2091 unsigned int hw_id; /* id of the previous hardware message (or 0) */
2092 unsigned int wake_mask; /* wakeup bits mask */
2093 unsigned int changed_mask; /* changed bits mask */
2094 @REPLY
2095 user_handle_t win; /* window handle */
2096 unsigned int msg; /* message code */
2097 lparam_t wparam; /* parameters */
2098 lparam_t lparam; /* parameters */
2099 int type; /* message type */
2100 int x; /* message x position */
2101 int y; /* message y position */
2102 unsigned int time; /* message time */
2103 unsigned int active_hooks; /* active hooks bitmap */
2104 data_size_t total; /* total size of extra data */
2105 VARARG(data,message_data); /* message data for sent messages */
2106 @END
2109 /* Reply to a sent message */
2110 @REQ(reply_message)
2111 int remove; /* should we remove the message? */
2112 lparam_t result; /* message result */
2113 VARARG(data,bytes); /* message data for sent messages */
2114 @END
2117 /* Accept and remove the current hardware message */
2118 @REQ(accept_hardware_message)
2119 unsigned int hw_id; /* id of the hardware message */
2120 @END
2123 /* Retrieve the reply for the last message sent */
2124 @REQ(get_message_reply)
2125 int cancel; /* cancel message if not ready? */
2126 @REPLY
2127 lparam_t result; /* message result */
2128 VARARG(data,bytes); /* message data for sent messages */
2129 @END
2132 /* Set a window timer */
2133 @REQ(set_win_timer)
2134 user_handle_t win; /* window handle */
2135 unsigned int msg; /* message to post */
2136 unsigned int rate; /* timer rate in ms */
2137 lparam_t id; /* timer id */
2138 lparam_t lparam; /* message lparam (callback proc) */
2139 @REPLY
2140 lparam_t id; /* timer id */
2141 @END
2144 /* Kill a window timer */
2145 @REQ(kill_win_timer)
2146 user_handle_t win; /* window handle */
2147 lparam_t id; /* timer id */
2148 unsigned int msg; /* message to post */
2149 @END
2152 /* check if the thread owning the window is hung */
2153 @REQ(is_window_hung)
2154 user_handle_t win; /* window handle */
2155 @REPLY
2156 int is_hung;
2157 @END
2160 /* Retrieve info about a serial port */
2161 @REQ(get_serial_info)
2162 obj_handle_t handle; /* handle to comm port */
2163 int flags;
2164 @REPLY
2165 unsigned int eventmask;
2166 unsigned int cookie;
2167 unsigned int pending_write;
2168 @END
2171 /* Set info about a serial port */
2172 @REQ(set_serial_info)
2173 obj_handle_t handle; /* handle to comm port */
2174 int flags; /* bitmask to set values (see below) */
2175 @END
2176 #define SERIALINFO_PENDING_WRITE 0x04
2177 #define SERIALINFO_PENDING_WAIT 0x08
2180 /* Create an async I/O */
2181 @REQ(register_async)
2182 int type; /* type of queue to look after */
2183 async_data_t async; /* async I/O parameters */
2184 int count; /* count - usually # of bytes to be read/written */
2185 @END
2186 #define ASYNC_TYPE_READ 0x01
2187 #define ASYNC_TYPE_WRITE 0x02
2188 #define ASYNC_TYPE_WAIT 0x03
2191 /* Cancel all async op on a fd */
2192 @REQ(cancel_async)
2193 obj_handle_t handle; /* handle to comm port, socket or file */
2194 client_ptr_t iosb; /* I/O status block (NULL=all) */
2195 int only_thread; /* cancel matching this thread */
2196 @END
2199 /* Retrieve results of an async */
2200 @REQ(get_async_result)
2201 client_ptr_t user_arg; /* user arg used to identify async */
2202 @REPLY
2203 data_size_t size; /* result size (input or output depending on the operation) */
2204 VARARG(out_data,bytes); /* iosb output data */
2205 @END
2208 /* Perform a read on a file object */
2209 @REQ(read)
2210 async_data_t async; /* async I/O parameters */
2211 file_pos_t pos; /* read position */
2212 @REPLY
2213 obj_handle_t wait; /* handle to wait on for blocking read */
2214 unsigned int options; /* device open options */
2215 VARARG(data,bytes); /* read data */
2216 @END
2219 /* Perform a write on a file object */
2220 @REQ(write)
2221 async_data_t async; /* async I/O parameters */
2222 file_pos_t pos; /* write position */
2223 VARARG(data,bytes); /* write data */
2224 @REPLY
2225 obj_handle_t wait; /* handle to wait on for blocking write */
2226 unsigned int options; /* device open options */
2227 data_size_t size; /* size written */
2228 @END
2231 /* Perform an ioctl on a file */
2232 @REQ(ioctl)
2233 ioctl_code_t code; /* ioctl code */
2234 async_data_t async; /* async I/O parameters */
2235 VARARG(in_data,bytes); /* ioctl input data */
2236 @REPLY
2237 obj_handle_t wait; /* handle to wait on for blocking ioctl */
2238 unsigned int options; /* device open options */
2239 VARARG(out_data,bytes); /* ioctl output data */
2240 @END
2243 /* Store results of an async irp */
2244 @REQ(set_irp_result)
2245 obj_handle_t handle; /* handle to the irp */
2246 unsigned int status; /* status of the irp */
2247 data_size_t size; /* result size (input or output depending on the operation) */
2248 VARARG(data,bytes); /* output data of the irp */
2249 @END
2252 /* Create a named pipe */
2253 @REQ(create_named_pipe)
2254 unsigned int access;
2255 unsigned int options;
2256 unsigned int sharing;
2257 unsigned int maxinstances;
2258 unsigned int outsize;
2259 unsigned int insize;
2260 timeout_t timeout;
2261 unsigned int flags;
2262 VARARG(objattr,object_attributes); /* object attributes */
2263 @REPLY
2264 obj_handle_t handle; /* handle to the pipe */
2265 @END
2267 /* flags in create_named_pipe and get_named_pipe_info */
2268 #define NAMED_PIPE_MESSAGE_STREAM_WRITE 0x0001
2269 #define NAMED_PIPE_MESSAGE_STREAM_READ 0x0002
2270 #define NAMED_PIPE_NONBLOCKING_MODE 0x0004
2271 #define NAMED_PIPE_SERVER_END 0x8000
2273 /* Set named pipe information by handle */
2274 @REQ(set_named_pipe_info)
2275 obj_handle_t handle;
2276 unsigned int flags;
2277 @END
2279 /* Create a window */
2280 @REQ(create_window)
2281 user_handle_t parent; /* parent window */
2282 user_handle_t owner; /* owner window */
2283 atom_t atom; /* class atom */
2284 mod_handle_t instance; /* module instance */
2285 int dpi; /* system DPI */
2286 int awareness; /* thread DPI awareness */
2287 VARARG(class,unicode_str); /* class name */
2288 @REPLY
2289 user_handle_t handle; /* created window */
2290 user_handle_t parent; /* full handle of parent */
2291 user_handle_t owner; /* full handle of owner */
2292 int extra; /* number of extra bytes */
2293 client_ptr_t class_ptr; /* pointer to class in client address space */
2294 int dpi; /* window DPI if not per-monitor aware */
2295 int awareness; /* window DPI awareness */
2296 @END
2299 /* Destroy a window */
2300 @REQ(destroy_window)
2301 user_handle_t handle; /* handle to the window */
2302 @END
2305 /* Retrieve the desktop window for the current thread */
2306 @REQ(get_desktop_window)
2307 int force; /* force creation if it doesn't exist */
2308 @REPLY
2309 user_handle_t top_window; /* handle to the desktop window */
2310 user_handle_t msg_window; /* handle to the top-level HWND_MESSAGE parent */
2311 @END
2314 /* Set a window owner */
2315 @REQ(set_window_owner)
2316 user_handle_t handle; /* handle to the window */
2317 user_handle_t owner; /* new owner */
2318 @REPLY
2319 user_handle_t full_owner; /* full handle of new owner */
2320 user_handle_t prev_owner; /* full handle of previous owner */
2321 @END
2324 /* Get information from a window handle */
2325 @REQ(get_window_info)
2326 user_handle_t handle; /* handle to the window */
2327 @REPLY
2328 user_handle_t full_handle; /* full 32-bit handle */
2329 user_handle_t last_active; /* last active popup */
2330 process_id_t pid; /* process owning the window */
2331 thread_id_t tid; /* thread owning the window */
2332 atom_t atom; /* class atom */
2333 int is_unicode; /* ANSI or unicode */
2334 int dpi; /* window DPI */
2335 int awareness; /* DPI awareness */
2336 @END
2339 /* Set some information in a window */
2340 @REQ(set_window_info)
2341 unsigned short flags; /* flags for fields to set (see below) */
2342 short int is_unicode; /* ANSI or unicode */
2343 user_handle_t handle; /* handle to the window */
2344 unsigned int style; /* window style */
2345 unsigned int ex_style; /* window extended style */
2346 unsigned int id; /* window id */
2347 mod_handle_t instance; /* creator instance */
2348 lparam_t user_data; /* user-specific data */
2349 int extra_offset; /* offset to set in extra bytes */
2350 data_size_t extra_size; /* size to set in extra bytes */
2351 lparam_t extra_value; /* value to set in extra bytes */
2352 @REPLY
2353 unsigned int old_style; /* old window style */
2354 unsigned int old_ex_style; /* old window extended style */
2355 mod_handle_t old_instance; /* old creator instance */
2356 lparam_t old_user_data; /* old user-specific data */
2357 lparam_t old_extra_value; /* old value in extra bytes */
2358 unsigned int old_id; /* old window id */
2359 @END
2360 #define SET_WIN_STYLE 0x01
2361 #define SET_WIN_EXSTYLE 0x02
2362 #define SET_WIN_ID 0x04
2363 #define SET_WIN_INSTANCE 0x08
2364 #define SET_WIN_USERDATA 0x10
2365 #define SET_WIN_EXTRA 0x20
2366 #define SET_WIN_UNICODE 0x40
2369 /* Set the parent of a window */
2370 @REQ(set_parent)
2371 user_handle_t handle; /* handle to the window */
2372 user_handle_t parent; /* handle to the parent */
2373 @REPLY
2374 user_handle_t old_parent; /* old parent window */
2375 user_handle_t full_parent; /* full handle of new parent */
2376 int dpi; /* new window DPI if not per-monitor aware */
2377 int awareness; /* new DPI awareness */
2378 @END
2381 /* Get a list of the window parents, up to the root of the tree */
2382 @REQ(get_window_parents)
2383 user_handle_t handle; /* handle to the window */
2384 @REPLY
2385 int count; /* total count of parents */
2386 VARARG(parents,user_handles); /* parent handles */
2387 @END
2390 /* Get a list of the window children */
2391 @REQ(get_window_children)
2392 obj_handle_t desktop; /* handle to desktop */
2393 user_handle_t parent; /* parent window */
2394 atom_t atom; /* class atom for the listed children */
2395 thread_id_t tid; /* thread owning the listed children */
2396 VARARG(class,unicode_str); /* class name */
2397 @REPLY
2398 int count; /* total count of children */
2399 VARARG(children,user_handles); /* children handles */
2400 @END
2403 /* Get a list of the window children that contain a given point */
2404 @REQ(get_window_children_from_point)
2405 user_handle_t parent; /* parent window */
2406 int x; /* point in parent coordinates */
2407 int y;
2408 int dpi; /* dpi for the point coordinates */
2409 @REPLY
2410 int count; /* total count of children */
2411 VARARG(children,user_handles); /* children handles */
2412 @END
2415 /* Get window tree information from a window handle */
2416 @REQ(get_window_tree)
2417 user_handle_t handle; /* handle to the window */
2418 @REPLY
2419 user_handle_t parent; /* parent window */
2420 user_handle_t owner; /* owner window */
2421 user_handle_t next_sibling; /* next sibling in Z-order */
2422 user_handle_t prev_sibling; /* prev sibling in Z-order */
2423 user_handle_t first_sibling; /* first sibling in Z-order */
2424 user_handle_t last_sibling; /* last sibling in Z-order */
2425 user_handle_t first_child; /* first child */
2426 user_handle_t last_child; /* last child */
2427 @END
2429 /* Set the position and Z order of a window */
2430 @REQ(set_window_pos)
2431 unsigned short swp_flags; /* SWP_* flags */
2432 unsigned short paint_flags; /* paint flags (see below) */
2433 user_handle_t handle; /* handle to the window */
2434 user_handle_t previous; /* previous window in Z order */
2435 rectangle_t window; /* window rectangle (in parent coords) */
2436 rectangle_t client; /* client rectangle (in parent coords) */
2437 VARARG(valid,rectangles); /* valid rectangles from WM_NCCALCSIZE (in parent coords) */
2438 @REPLY
2439 unsigned int new_style; /* new window style */
2440 unsigned int new_ex_style; /* new window extended style */
2441 user_handle_t surface_win; /* parent window that holds the surface */
2442 int needs_update; /* whether the surface region needs an update */
2443 @END
2444 #define SET_WINPOS_PAINT_SURFACE 0x01 /* window has a paintable surface */
2445 #define SET_WINPOS_PIXEL_FORMAT 0x02 /* window has a custom pixel format */
2447 /* Get the window and client rectangles of a window */
2448 @REQ(get_window_rectangles)
2449 user_handle_t handle; /* handle to the window */
2450 int relative; /* coords relative to (see below) */
2451 int dpi; /* DPI to map to, or zero for per-monitor DPI */
2452 @REPLY
2453 rectangle_t window; /* window rectangle */
2454 rectangle_t client; /* client rectangle */
2455 @END
2456 enum coords_relative
2458 COORDS_CLIENT, /* relative to client area */
2459 COORDS_WINDOW, /* relative to whole window area */
2460 COORDS_PARENT, /* relative to parent's client area */
2461 COORDS_SCREEN /* relative to screen origin */
2465 /* Get the window text */
2466 @REQ(get_window_text)
2467 user_handle_t handle; /* handle to the window */
2468 @REPLY
2469 data_size_t length; /* total length in WCHARs */
2470 VARARG(text,unicode_str); /* window text */
2471 @END
2474 /* Set the window text */
2475 @REQ(set_window_text)
2476 user_handle_t handle; /* handle to the window */
2477 VARARG(text,unicode_str); /* window text */
2478 @END
2481 /* Get the coordinates offset between two windows */
2482 @REQ(get_windows_offset)
2483 user_handle_t from; /* handle to the first window */
2484 user_handle_t to; /* handle to the second window */
2485 int dpi; /* DPI to map to, or zero for per-monitor DPI */
2486 @REPLY
2487 int x; /* x coordinate offset */
2488 int y; /* y coordinate offset */
2489 int mirror; /* whether to mirror the x coordinate */
2490 @END
2493 /* Get the visible region of a window */
2494 @REQ(get_visible_region)
2495 user_handle_t window; /* handle to the window */
2496 unsigned int flags; /* DCX flags */
2497 @REPLY
2498 user_handle_t top_win; /* top window to clip against */
2499 rectangle_t top_rect; /* top window visible rect with screen coords */
2500 rectangle_t win_rect; /* window rect in screen coords */
2501 unsigned int paint_flags; /* paint flags (from SET_WINPOS_* flags) */
2502 data_size_t total_size; /* total size of the resulting region */
2503 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2504 @END
2507 /* Get the visible surface region of a window */
2508 @REQ(get_surface_region)
2509 user_handle_t window; /* handle to the window */
2510 @REPLY
2511 rectangle_t visible_rect; /* window visible rect in screen coords */
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
2517 /* Get the window region */
2518 @REQ(get_window_region)
2519 user_handle_t window; /* handle to the window */
2520 @REPLY
2521 data_size_t total_size; /* total size of the resulting region */
2522 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2523 @END
2526 /* Set the window region */
2527 @REQ(set_window_region)
2528 user_handle_t window; /* handle to the window */
2529 int redraw; /* redraw the window? */
2530 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2531 @END
2534 /* Get the window update region */
2535 @REQ(get_update_region)
2536 user_handle_t window; /* handle to the window */
2537 user_handle_t from_child; /* child to start searching from */
2538 unsigned int flags; /* update flags (see below) */
2539 @REPLY
2540 user_handle_t child; /* child to repaint (or window itself) */
2541 unsigned int flags; /* resulting update flags (see below) */
2542 data_size_t total_size; /* total size of the resulting region */
2543 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2544 @END
2545 #define UPDATE_NONCLIENT 0x001 /* get region for repainting non-client area */
2546 #define UPDATE_ERASE 0x002 /* get region for erasing client area */
2547 #define UPDATE_PAINT 0x004 /* get region for painting client area */
2548 #define UPDATE_INTERNALPAINT 0x008 /* get region if internal paint is pending */
2549 #define UPDATE_ALLCHILDREN 0x010 /* force repaint of all children */
2550 #define UPDATE_NOCHILDREN 0x020 /* don't try to repaint any children */
2551 #define UPDATE_NOREGION 0x040 /* don't return a region, only the flags */
2552 #define UPDATE_DELAYED_ERASE 0x080 /* still needs erase after BeginPaint */
2553 #define UPDATE_CLIPCHILDREN 0x100 /* remove clipped children from the update region */
2556 /* Update the z order of a window so that a given rectangle is fully visible */
2557 @REQ(update_window_zorder)
2558 user_handle_t window; /* handle to the window */
2559 rectangle_t rect; /* rectangle that must be visible (in client coords) */
2560 @END
2563 /* Mark parts of a window as needing a redraw */
2564 @REQ(redraw_window)
2565 user_handle_t window; /* handle to the window */
2566 unsigned int flags; /* RDW_* flags */
2567 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2568 @END
2571 /* Set a window property */
2572 @REQ(set_window_property)
2573 user_handle_t window; /* handle to the window */
2574 lparam_t data; /* data to store */
2575 atom_t atom; /* property atom (if no name specified) */
2576 VARARG(name,unicode_str); /* property name */
2577 @END
2580 /* Remove a window property */
2581 @REQ(remove_window_property)
2582 user_handle_t window; /* handle to the window */
2583 atom_t atom; /* property atom (if no name specified) */
2584 VARARG(name,unicode_str); /* property name */
2585 @REPLY
2586 lparam_t data; /* data stored in property */
2587 @END
2590 /* Get a window property */
2591 @REQ(get_window_property)
2592 user_handle_t window; /* handle to the window */
2593 atom_t atom; /* property atom (if no name specified) */
2594 VARARG(name,unicode_str); /* property name */
2595 @REPLY
2596 lparam_t data; /* data stored in property */
2597 @END
2600 /* Get the list of properties of a window */
2601 @REQ(get_window_properties)
2602 user_handle_t window; /* handle to the window */
2603 @REPLY
2604 int total; /* total number of properties */
2605 VARARG(props,properties); /* list of properties */
2606 @END
2609 /* Create a window station */
2610 @REQ(create_winstation)
2611 unsigned int flags; /* window station flags */
2612 unsigned int access; /* wanted access rights */
2613 unsigned int attributes; /* object attributes */
2614 obj_handle_t rootdir; /* root directory */
2615 VARARG(name,unicode_str); /* object name */
2616 @REPLY
2617 obj_handle_t handle; /* handle to the window station */
2618 @END
2621 /* Open a handle to a window station */
2622 @REQ(open_winstation)
2623 unsigned int access; /* wanted access rights */
2624 unsigned int attributes; /* object attributes */
2625 obj_handle_t rootdir; /* root directory */
2626 VARARG(name,unicode_str); /* object name */
2627 @REPLY
2628 obj_handle_t handle; /* handle to the window station */
2629 @END
2632 /* Close a window station */
2633 @REQ(close_winstation)
2634 obj_handle_t handle; /* handle to the window station */
2635 @END
2638 /* Get the process current window station */
2639 @REQ(get_process_winstation)
2640 @REPLY
2641 obj_handle_t handle; /* handle to the window station */
2642 @END
2645 /* Set the process current window station */
2646 @REQ(set_process_winstation)
2647 obj_handle_t handle; /* handle to the window station */
2648 @END
2651 /* Enumerate window stations */
2652 @REQ(enum_winstation)
2653 unsigned int index; /* current index */
2654 @REPLY
2655 unsigned int next; /* next index */
2656 VARARG(name,unicode_str); /* window station name */
2657 @END
2660 /* Create a desktop */
2661 @REQ(create_desktop)
2662 unsigned int flags; /* desktop flags */
2663 unsigned int access; /* wanted access rights */
2664 unsigned int attributes; /* object attributes */
2665 VARARG(name,unicode_str); /* object name */
2666 @REPLY
2667 obj_handle_t handle; /* handle to the desktop */
2668 @END
2671 /* Open a handle to a desktop */
2672 @REQ(open_desktop)
2673 obj_handle_t winsta; /* window station to open (null allowed) */
2674 unsigned int flags; /* desktop flags */
2675 unsigned int access; /* wanted access rights */
2676 unsigned int attributes; /* object attributes */
2677 VARARG(name,unicode_str); /* object name */
2678 @REPLY
2679 obj_handle_t handle; /* handle to the desktop */
2680 @END
2683 /* Open a handle to current input desktop */
2684 @REQ(open_input_desktop)
2685 unsigned int flags; /* desktop flags */
2686 unsigned int access; /* wanted access rights */
2687 unsigned int attributes; /* object attributes */
2688 @REPLY
2689 obj_handle_t handle; /* handle to the desktop */
2690 @END
2693 /* Close a desktop */
2694 @REQ(close_desktop)
2695 obj_handle_t handle; /* handle to the desktop */
2696 @END
2699 /* Get the thread current desktop */
2700 @REQ(get_thread_desktop)
2701 thread_id_t tid; /* thread id */
2702 @REPLY
2703 obj_handle_t handle; /* handle to the desktop */
2704 @END
2707 /* Set the thread current desktop */
2708 @REQ(set_thread_desktop)
2709 obj_handle_t handle; /* handle to the desktop */
2710 @END
2713 /* Enumerate desktops */
2714 @REQ(enum_desktop)
2715 obj_handle_t winstation; /* handle to the window station */
2716 unsigned int index; /* current index */
2717 @REPLY
2718 unsigned int next; /* next index */
2719 VARARG(name,unicode_str); /* window station name */
2720 @END
2723 /* Get/set information about a user object (window station or desktop) */
2724 @REQ(set_user_object_info)
2725 obj_handle_t handle; /* handle to the object */
2726 unsigned int flags; /* information to set/get */
2727 unsigned int obj_flags; /* new object flags */
2728 @REPLY
2729 int is_desktop; /* is object a desktop? */
2730 unsigned int old_obj_flags; /* old object flags */
2731 VARARG(name,unicode_str); /* object name */
2732 @END
2733 #define SET_USER_OBJECT_SET_FLAGS 1
2734 #define SET_USER_OBJECT_GET_FULL_NAME 2
2737 /* Register a hotkey */
2738 @REQ(register_hotkey)
2739 user_handle_t window; /* handle to the window */
2740 int id; /* hotkey identifier */
2741 unsigned int flags; /* modifier keys */
2742 unsigned int vkey; /* virtual key code */
2743 @REPLY
2744 int replaced; /* did we replace an existing hotkey? */
2745 unsigned int flags; /* flags of replaced hotkey */
2746 unsigned int vkey; /* virtual key code of replaced hotkey */
2747 @END
2750 /* Unregister a hotkey */
2751 @REQ(unregister_hotkey)
2752 user_handle_t window; /* handle to the window */
2753 int id; /* hotkey identifier */
2754 @REPLY
2755 unsigned int flags; /* flags of removed hotkey */
2756 unsigned int vkey; /* virtual key code of removed hotkey */
2757 @END
2760 /* Attach (or detach) thread inputs */
2761 @REQ(attach_thread_input)
2762 thread_id_t tid_from; /* thread to be attached */
2763 thread_id_t tid_to; /* thread to which tid_from should be attached */
2764 int attach; /* is it an attach? */
2765 @END
2768 /* Get input data for a given thread */
2769 @REQ(get_thread_input)
2770 thread_id_t tid; /* id of thread */
2771 @REPLY
2772 user_handle_t focus; /* handle to the focus window */
2773 user_handle_t capture; /* handle to the capture window */
2774 user_handle_t active; /* handle to the active window */
2775 user_handle_t foreground; /* handle to the global foreground window */
2776 user_handle_t menu_owner; /* handle to the menu owner */
2777 user_handle_t move_size; /* handle to the moving/resizing window */
2778 user_handle_t caret; /* handle to the caret window */
2779 user_handle_t cursor; /* handle to the cursor */
2780 int show_count; /* cursor show count */
2781 rectangle_t rect; /* caret rectangle */
2782 @END
2785 /* Get the time of the last input event */
2786 @REQ(get_last_input_time)
2787 @REPLY
2788 unsigned int time;
2789 @END
2792 /* Retrieve queue keyboard state for current thread or global async state */
2793 @REQ(get_key_state)
2794 int async; /* whether to query the async state */
2795 int key; /* optional key code or -1 */
2796 @REPLY
2797 unsigned char state; /* state of specified key */
2798 VARARG(keystate,bytes); /* state array for all the keys */
2799 @END
2801 /* Set queue keyboard state for current thread */
2802 @REQ(set_key_state)
2803 int async; /* whether to change the async state too */
2804 VARARG(keystate,bytes); /* state array for all the keys */
2805 @END
2807 /* Set the system foreground window */
2808 @REQ(set_foreground_window)
2809 user_handle_t handle; /* handle to the foreground window */
2810 @REPLY
2811 user_handle_t previous; /* handle to the previous foreground window */
2812 int send_msg_old; /* whether we have to send a msg to the old window */
2813 int send_msg_new; /* whether we have to send a msg to the new window */
2814 @END
2816 /* Set the current thread focus window */
2817 @REQ(set_focus_window)
2818 user_handle_t handle; /* handle to the focus window */
2819 @REPLY
2820 user_handle_t previous; /* handle to the previous focus window */
2821 @END
2823 /* Set the current thread active window */
2824 @REQ(set_active_window)
2825 user_handle_t handle; /* handle to the active window */
2826 @REPLY
2827 user_handle_t previous; /* handle to the previous active window */
2828 @END
2830 /* Set the current thread capture window */
2831 @REQ(set_capture_window)
2832 user_handle_t handle; /* handle to the capture window */
2833 unsigned int flags; /* capture flags (see below) */
2834 @REPLY
2835 user_handle_t previous; /* handle to the previous capture window */
2836 user_handle_t full_handle; /* full 32-bit handle of new capture window */
2837 @END
2838 #define CAPTURE_MENU 0x01 /* capture is for a menu */
2839 #define CAPTURE_MOVESIZE 0x02 /* capture is for moving/resizing */
2842 /* Set the current thread caret window */
2843 @REQ(set_caret_window)
2844 user_handle_t handle; /* handle to the caret window */
2845 int width; /* caret width */
2846 int height; /* caret height */
2847 @REPLY
2848 user_handle_t previous; /* handle to the previous caret window */
2849 rectangle_t old_rect; /* previous caret rectangle */
2850 int old_hide; /* previous hide count */
2851 int old_state; /* previous caret state (1=on, 0=off) */
2852 @END
2855 /* Set the current thread caret information */
2856 @REQ(set_caret_info)
2857 unsigned int flags; /* caret flags (see below) */
2858 user_handle_t handle; /* handle to the caret window */
2859 int x; /* caret x position */
2860 int y; /* caret y position */
2861 int hide; /* increment for hide count (can be negative to show it) */
2862 int state; /* caret state (see below) */
2863 @REPLY
2864 user_handle_t full_handle; /* handle to the current caret window */
2865 rectangle_t old_rect; /* previous caret rectangle */
2866 int old_hide; /* previous hide count */
2867 int old_state; /* previous caret state (1=on, 0=off) */
2868 @END
2869 #define SET_CARET_POS 0x01 /* set the caret position from x,y */
2870 #define SET_CARET_HIDE 0x02 /* increment the caret hide count */
2871 #define SET_CARET_STATE 0x04 /* set the caret on/off state */
2872 enum caret_state
2874 CARET_STATE_OFF, /* off */
2875 CARET_STATE_ON, /* on */
2876 CARET_STATE_TOGGLE, /* toggle current state */
2877 CARET_STATE_ON_IF_MOVED /* on if the position differs, unchanged otherwise */
2881 /* Set a window hook */
2882 @REQ(set_hook)
2883 int id; /* id of the hook */
2884 process_id_t pid; /* id of process to set the hook into */
2885 thread_id_t tid; /* id of thread to set the hook into */
2886 int event_min;
2887 int event_max;
2888 client_ptr_t proc; /* hook procedure */
2889 int flags;
2890 int unicode; /* is it a unicode hook? */
2891 VARARG(module,unicode_str); /* module name */
2892 @REPLY
2893 user_handle_t handle; /* handle to the hook */
2894 unsigned int active_hooks; /* active hooks bitmap */
2895 @END
2898 /* Remove a window hook */
2899 @REQ(remove_hook)
2900 user_handle_t handle; /* handle to the hook */
2901 client_ptr_t proc; /* hook procedure if handle is 0 */
2902 int id; /* id of the hook if handle is 0 */
2903 @REPLY
2904 unsigned int active_hooks; /* active hooks bitmap */
2905 @END
2908 /* Start calling a hook chain */
2909 @REQ(start_hook_chain)
2910 int id; /* id of the hook */
2911 int event; /* signalled event */
2912 user_handle_t window; /* handle to the event window */
2913 int object_id; /* object id for out of context winevent */
2914 int child_id; /* child id for out of context winevent */
2915 @REPLY
2916 user_handle_t handle; /* handle to the next hook */
2917 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2918 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2919 int unicode; /* is it a unicode hook? */
2920 client_ptr_t proc; /* hook procedure */
2921 unsigned int active_hooks; /* active hooks bitmap */
2922 VARARG(module,unicode_str); /* module name */
2923 @END
2926 /* Finished calling a hook chain */
2927 @REQ(finish_hook_chain)
2928 int id; /* id of the hook */
2929 @END
2932 /* Get the hook information */
2933 @REQ(get_hook_info)
2934 user_handle_t handle; /* handle to the current hook */
2935 int get_next; /* do we want info about current or next hook? */
2936 int event; /* signalled event */
2937 user_handle_t window; /* handle to the event window */
2938 int object_id; /* object id for out of context winevent */
2939 int child_id; /* child id for out of context winevent */
2940 @REPLY
2941 user_handle_t handle; /* handle to the hook */
2942 int id; /* id of the hook */
2943 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2944 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2945 client_ptr_t proc; /* hook procedure */
2946 int unicode; /* is it a unicode hook? */
2947 VARARG(module,unicode_str); /* module name */
2948 @END
2951 /* Create a window class */
2952 @REQ(create_class)
2953 int local; /* is it a local class? */
2954 atom_t atom; /* class atom */
2955 unsigned int style; /* class style */
2956 mod_handle_t instance; /* module instance */
2957 int extra; /* number of extra class bytes */
2958 int win_extra; /* number of window extra bytes */
2959 client_ptr_t client_ptr; /* pointer to class in client address space */
2960 data_size_t name_offset; /* base class name offset for specified atom */
2961 VARARG(name,unicode_str); /* class name */
2962 @REPLY
2963 atom_t atom; /* resulting class atom */
2964 @END
2967 /* Destroy a window class */
2968 @REQ(destroy_class)
2969 atom_t atom; /* class atom */
2970 mod_handle_t instance; /* module instance */
2971 VARARG(name,unicode_str); /* class name */
2972 @REPLY
2973 client_ptr_t client_ptr; /* pointer to class in client address space */
2974 @END
2977 /* Set some information in a class */
2978 @REQ(set_class_info)
2979 user_handle_t window; /* handle to the window */
2980 unsigned int flags; /* flags for info to set (see below) */
2981 atom_t atom; /* class atom */
2982 unsigned int style; /* class style */
2983 int win_extra; /* number of window extra bytes */
2984 mod_handle_t instance; /* module instance */
2985 int extra_offset; /* offset to set in extra bytes */
2986 data_size_t extra_size; /* size to set in extra bytes */
2987 lparam_t extra_value; /* value to set in extra bytes */
2988 @REPLY
2989 atom_t old_atom; /* previous class atom */
2990 atom_t base_atom; /* base class atom */
2991 mod_handle_t old_instance; /* previous module instance */
2992 lparam_t old_extra_value; /* old value in extra bytes */
2993 unsigned int old_style; /* previous class style */
2994 int old_extra; /* previous number of class extra bytes */
2995 int old_win_extra; /* previous number of window extra bytes */
2996 @END
2997 #define SET_CLASS_ATOM 0x0001
2998 #define SET_CLASS_STYLE 0x0002
2999 #define SET_CLASS_WINEXTRA 0x0004
3000 #define SET_CLASS_INSTANCE 0x0008
3001 #define SET_CLASS_EXTRA 0x0010
3004 /* Open the clipboard */
3005 @REQ(open_clipboard)
3006 user_handle_t window; /* clipboard window */
3007 @REPLY
3008 user_handle_t owner; /* current clipboard owner */
3009 @END
3012 /* Close the clipboard */
3013 @REQ(close_clipboard)
3014 @REPLY
3015 user_handle_t viewer; /* first clipboard viewer */
3016 user_handle_t owner; /* current clipboard owner */
3017 @END
3020 /* Empty the clipboard and grab ownership */
3021 @REQ(empty_clipboard)
3022 @END
3025 /* Add a data format to the clipboard */
3026 @REQ(set_clipboard_data)
3027 unsigned int format; /* clipboard format of the data */
3028 unsigned int lcid; /* locale id to use for synthesizing text formats */
3029 VARARG(data,bytes); /* data contents */
3030 @REPLY
3031 unsigned int seqno; /* sequence number for the set data */
3032 @END
3035 /* Fetch a data format from the clipboard */
3036 @REQ(get_clipboard_data)
3037 unsigned int format; /* clipboard format of the data */
3038 int render; /* will we try to render it if missing? */
3039 int cached; /* do we already have it in the client-side cache? */
3040 unsigned int seqno; /* sequence number for the data in the cache */
3041 @REPLY
3042 unsigned int from; /* for synthesized data, format to generate it from */
3043 user_handle_t owner; /* clipboard owner for delayed-rendered formats */
3044 unsigned int seqno; /* sequence number for the originally set data */
3045 data_size_t total; /* total data size */
3046 VARARG(data,bytes); /* data contents */
3047 @END
3050 /* Retrieve a list of available formats */
3051 @REQ(get_clipboard_formats)
3052 unsigned int format; /* specific format to query, return all if 0 */
3053 @REPLY
3054 unsigned int count; /* count of available formats */
3055 VARARG(formats,uints); /* array of available formats */
3056 @END
3059 /* Retrieve the next available format */
3060 @REQ(enum_clipboard_formats)
3061 unsigned int previous; /* previous format, or first if 0 */
3062 @REPLY
3063 unsigned int format; /* next format */
3064 @END
3067 /* Release ownership of the clipboard */
3068 @REQ(release_clipboard)
3069 user_handle_t owner; /* clipboard owner to release */
3070 @REPLY
3071 user_handle_t viewer; /* first clipboard viewer */
3072 user_handle_t owner; /* current clipboard owner */
3073 @END
3076 /* Get clipboard information */
3077 @REQ(get_clipboard_info)
3078 @REPLY
3079 user_handle_t window; /* clipboard window */
3080 user_handle_t owner; /* clipboard owner */
3081 user_handle_t viewer; /* clipboard viewer */
3082 unsigned int seqno; /* current sequence number */
3083 @END
3086 /* Set the clipboard viewer window */
3087 @REQ(set_clipboard_viewer)
3088 user_handle_t viewer; /* clipboard viewer */
3089 user_handle_t previous; /* if non-zero, check that this was the previous viewer */
3090 @REPLY
3091 user_handle_t old_viewer; /* previous clipboard viewer */
3092 user_handle_t owner; /* clipboard owner */
3093 @END
3096 /* Add a clipboard listener window */
3097 @REQ(add_clipboard_listener)
3098 user_handle_t window; /* clipboard listener window */
3099 @END
3102 /* Remove a clipboard listener window */
3103 @REQ(remove_clipboard_listener)
3104 user_handle_t window; /* clipboard listener window */
3105 @END
3108 /* Open a security token */
3109 @REQ(open_token)
3110 obj_handle_t handle; /* handle to the thread or process */
3111 unsigned int access; /* access rights to the new token */
3112 unsigned int attributes;/* object attributes */
3113 unsigned int flags; /* flags (see below) */
3114 @REPLY
3115 obj_handle_t token; /* handle to the token */
3116 @END
3117 #define OPEN_TOKEN_THREAD 1
3118 #define OPEN_TOKEN_AS_SELF 2
3121 /* Set/get the global windows */
3122 @REQ(set_global_windows)
3123 unsigned int flags; /* flags for fields to set (see below) */
3124 user_handle_t shell_window; /* handle to the new shell window */
3125 user_handle_t shell_listview; /* handle to the new shell listview window */
3126 user_handle_t progman_window; /* handle to the new program manager window */
3127 user_handle_t taskman_window; /* handle to the new task manager window */
3128 @REPLY
3129 user_handle_t old_shell_window; /* handle to the shell window */
3130 user_handle_t old_shell_listview; /* handle to the shell listview window */
3131 user_handle_t old_progman_window; /* handle to the new program manager window */
3132 user_handle_t old_taskman_window; /* handle to the new task manager window */
3133 @END
3134 #define SET_GLOBAL_SHELL_WINDOWS 0x01 /* set both main shell and listview windows */
3135 #define SET_GLOBAL_PROGMAN_WINDOW 0x02
3136 #define SET_GLOBAL_TASKMAN_WINDOW 0x04
3138 /* Adjust the privileges held by a token */
3139 @REQ(adjust_token_privileges)
3140 obj_handle_t handle; /* handle to the token */
3141 int disable_all; /* disable all privileges? */
3142 int get_modified_state; /* get modified privileges? */
3143 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to enable/disable/remove */
3144 @REPLY
3145 unsigned int len; /* total length in bytes required to store token privileges */
3146 VARARG(privileges,LUID_AND_ATTRIBUTES); /* modified privileges */
3147 @END
3149 /* Retrieves the set of privileges held by or available to a token */
3150 @REQ(get_token_privileges)
3151 obj_handle_t handle; /* handle to the token */
3152 @REPLY
3153 unsigned int len; /* total length in bytes required to store token privileges */
3154 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
3155 @END
3157 /* Check the token has the required privileges */
3158 @REQ(check_token_privileges)
3159 obj_handle_t handle; /* handle to the token */
3160 int all_required; /* are all the privileges required for the check to succeed? */
3161 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to check */
3162 @REPLY
3163 int has_privileges; /* does the token have the required privileges? */
3164 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
3165 @END
3167 @REQ(duplicate_token)
3168 obj_handle_t handle; /* handle to the token to duplicate */
3169 unsigned int access; /* access rights to the new token */
3170 int primary; /* is the new token to be a primary one? */
3171 int impersonation_level; /* impersonation level of the new token */
3172 VARARG(objattr,object_attributes); /* object attributes */
3173 @REPLY
3174 obj_handle_t new_handle; /* duplicated handle */
3175 @END
3177 @REQ(filter_token)
3178 obj_handle_t handle; /* handle to the token to duplicate */
3179 unsigned int flags; /* flags */
3180 data_size_t privileges_size; /* size of privileges */
3181 VARARG(privileges,LUID_AND_ATTRIBUTES,privileges_size); /* privileges to remove from new token */
3182 VARARG(disable_sids,SID); /* array of groups to remove from new token */
3183 @REPLY
3184 obj_handle_t new_handle; /* filtered handle */
3185 @END
3187 @REQ(access_check)
3188 obj_handle_t handle; /* handle to the token */
3189 unsigned int desired_access; /* desired access to the object */
3190 generic_map_t mapping; /* mapping to specific rights */
3191 VARARG(sd,security_descriptor); /* security descriptor to check */
3192 @REPLY
3193 unsigned int access_granted; /* access rights actually granted */
3194 unsigned int access_status; /* was access granted? */
3195 unsigned int privileges_len; /* length needed to store privileges */
3196 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges used during access check */
3197 @END
3199 @REQ(get_token_sid)
3200 obj_handle_t handle; /* handle to the token */
3201 unsigned int which_sid; /* which SID to retrieve from the token */
3202 @REPLY
3203 data_size_t sid_len; /* length needed to store sid */
3204 VARARG(sid,SID); /* the sid specified by which_sid from the token */
3205 @END
3207 @REQ(get_token_groups)
3208 obj_handle_t handle; /* handle to the token */
3209 @REPLY
3210 data_size_t user_len; /* length needed to store user */
3211 VARARG(user,token_groups); /* groups the token's user belongs to */
3212 @END
3214 @REQ(get_token_default_dacl)
3215 obj_handle_t handle; /* handle to the token */
3216 @REPLY
3217 data_size_t acl_len; /* length needed to store access control list */
3218 VARARG(acl,ACL); /* access control list */
3219 @END
3221 @REQ(set_token_default_dacl)
3222 obj_handle_t handle; /* handle to the token */
3223 VARARG(acl,ACL); /* default dacl to set */
3224 @END
3226 @REQ(set_security_object)
3227 obj_handle_t handle; /* handle to the object */
3228 unsigned int security_info; /* which parts of security descriptor to set */
3229 VARARG(sd,security_descriptor); /* security descriptor to set */
3230 @END
3232 @REQ(get_security_object)
3233 obj_handle_t handle; /* handle to the object */
3234 unsigned int security_info; /* which parts of security descriptor to get */
3235 @REPLY
3236 unsigned int sd_len; /* buffer size needed for sd */
3237 VARARG(sd,security_descriptor); /* retrieved security descriptor */
3238 @END
3241 struct handle_info
3243 process_id_t owner;
3244 obj_handle_t handle;
3245 unsigned int access;
3246 unsigned int attributes;
3247 unsigned int type;
3250 /* Return a list of all opened handles */
3251 @REQ(get_system_handles)
3252 @REPLY
3253 unsigned int count; /* number of handles */
3254 VARARG(data,handle_infos); /* array of handle_infos */
3255 @END
3258 /* Create a mailslot */
3259 @REQ(create_mailslot)
3260 unsigned int access; /* wanted access rights */
3261 timeout_t read_timeout;
3262 unsigned int max_msgsize;
3263 VARARG(objattr,object_attributes); /* object attributes */
3264 @REPLY
3265 obj_handle_t handle; /* handle to the mailslot */
3266 @END
3269 /* Set mailslot information */
3270 @REQ(set_mailslot_info)
3271 obj_handle_t handle; /* handle to the mailslot */
3272 timeout_t read_timeout;
3273 unsigned int flags;
3274 @REPLY
3275 timeout_t read_timeout;
3276 unsigned int max_msgsize;
3277 @END
3278 #define MAILSLOT_SET_READ_TIMEOUT 1
3281 /* Create a directory object */
3282 @REQ(create_directory)
3283 unsigned int access; /* access flags */
3284 VARARG(objattr,object_attributes); /* object attributes */
3285 @REPLY
3286 obj_handle_t handle; /* handle to the directory */
3287 @END
3290 /* Open a directory object */
3291 @REQ(open_directory)
3292 unsigned int access; /* access flags */
3293 unsigned int attributes; /* object attributes */
3294 obj_handle_t rootdir; /* root directory */
3295 VARARG(directory_name,unicode_str); /* Directory name */
3296 @REPLY
3297 obj_handle_t handle; /* handle to the directory */
3298 @END
3301 /* Get a directory entry by index */
3302 @REQ(get_directory_entry)
3303 obj_handle_t handle; /* handle to the directory */
3304 unsigned int index; /* entry index */
3305 @REPLY
3306 data_size_t name_len; /* length of the entry name in bytes */
3307 VARARG(name,unicode_str,name_len); /* entry name */
3308 VARARG(type,unicode_str); /* entry type */
3309 @END
3312 /* Create a symbolic link object */
3313 @REQ(create_symlink)
3314 unsigned int access; /* access flags */
3315 VARARG(objattr,object_attributes); /* object attributes */
3316 VARARG(target_name,unicode_str); /* target name */
3317 @REPLY
3318 obj_handle_t handle; /* handle to the symlink */
3319 @END
3322 /* Open a symbolic link object */
3323 @REQ(open_symlink)
3324 unsigned int access; /* access flags */
3325 unsigned int attributes; /* object attributes */
3326 obj_handle_t rootdir; /* root directory */
3327 VARARG(name,unicode_str); /* symlink name */
3328 @REPLY
3329 obj_handle_t handle; /* handle to the symlink */
3330 @END
3333 /* Query a symbolic link object */
3334 @REQ(query_symlink)
3335 obj_handle_t handle; /* handle to the symlink */
3336 @REPLY
3337 data_size_t total; /* total needed size for name */
3338 VARARG(target_name,unicode_str); /* target name */
3339 @END
3342 /* Query basic object information */
3343 @REQ(get_object_info)
3344 obj_handle_t handle; /* handle to the object */
3345 @REPLY
3346 unsigned int access; /* granted access mask */
3347 unsigned int ref_count; /* object ref count */
3348 unsigned int handle_count; /* object handle count */
3349 data_size_t total; /* total needed size for name */
3350 VARARG(name,unicode_str); /* object name */
3351 @END
3354 /* Query object type name information */
3355 @REQ(get_object_type)
3356 obj_handle_t handle; /* handle to the object */
3357 @REPLY
3358 VARARG(info,object_type_info); /* type information */
3359 @END
3362 /* Query type information for all types */
3363 @REQ(get_object_types)
3364 @REPLY
3365 int count; /* total count of object types */
3366 VARARG(info,object_types_info); /* type information */
3367 @END
3370 /* Allocate a locally-unique identifier */
3371 @REQ(allocate_locally_unique_id)
3372 @REPLY
3373 luid_t luid;
3374 @END
3377 /* Create a device manager */
3378 @REQ(create_device_manager)
3379 unsigned int access; /* wanted access rights */
3380 unsigned int attributes; /* object attributes */
3381 @REPLY
3382 obj_handle_t handle; /* handle to the device */
3383 @END
3386 /* Create a device */
3387 @REQ(create_device)
3388 obj_handle_t rootdir; /* root directory */
3389 client_ptr_t user_ptr; /* opaque ptr for use by client */
3390 obj_handle_t manager; /* device manager */
3391 VARARG(name,unicode_str); /* object name */
3392 @END
3395 /* Delete a device */
3396 @REQ(delete_device)
3397 obj_handle_t manager; /* handle to the device manager */
3398 client_ptr_t device; /* pointer to the device */
3399 @END
3402 /* Retrieve the next pending device irp request */
3403 @REQ(get_next_device_request)
3404 obj_handle_t manager; /* handle to the device manager */
3405 obj_handle_t prev; /* handle to the previous irp */
3406 unsigned int status; /* status of the previous irp */
3407 client_ptr_t user_ptr; /* user pointer of the previous irp */
3408 @REPLY
3409 irp_params_t params; /* irp parameters */
3410 obj_handle_t next; /* handle to the next irp */
3411 thread_id_t client_tid; /* tid of thread calling irp */
3412 client_ptr_t client_thread; /* pointer to thread object of calling irp */
3413 data_size_t in_size; /* total needed input size */
3414 VARARG(next_data,bytes); /* input data of the next irp */
3415 @END
3418 /* Get kernel pointer from server object */
3419 @REQ(get_kernel_object_ptr)
3420 obj_handle_t manager; /* handle to the device manager */
3421 obj_handle_t handle; /* object handle */
3422 @REPLY
3423 client_ptr_t user_ptr; /* kernel object pointer */
3424 @END
3427 /* Associate kernel pointer with server object */
3428 @REQ(set_kernel_object_ptr)
3429 obj_handle_t manager; /* handle to the device manager */
3430 obj_handle_t handle; /* object handle */
3431 client_ptr_t user_ptr; /* kernel object pointer */
3432 @END
3435 /* Grab server object reference from kernel object pointer */
3436 @REQ(grab_kernel_object)
3437 obj_handle_t manager; /* handle to the device manager */
3438 client_ptr_t user_ptr; /* kernel object pointer */
3439 @END
3442 /* Release server object reference from kernel object pointer */
3443 @REQ(release_kernel_object)
3444 obj_handle_t manager; /* handle to the device manager */
3445 client_ptr_t user_ptr; /* kernel object pointer */
3446 @END
3449 /* Get handle from kernel object pointer */
3450 @REQ(get_kernel_object_handle)
3451 obj_handle_t manager; /* handle to the device manager */
3452 client_ptr_t user_ptr; /* kernel object pointer */
3453 unsigned int access; /* wanted access rights */
3454 @REPLY
3455 obj_handle_t handle; /* kernel object handle */
3456 @END
3459 /* Make the current process a system process */
3460 @REQ(make_process_system)
3461 obj_handle_t handle; /* handle to the process */
3462 @REPLY
3463 obj_handle_t event; /* event signaled when all user processes have exited */
3464 @END
3467 /* Get detailed fixed-size information about a token */
3468 @REQ(get_token_info)
3469 obj_handle_t handle; /* handle to the object */
3470 @REPLY
3471 luid_t token_id; /* locally-unique identifier of the token */
3472 luid_t modified_id; /* locally-unique identifier of the modified version of the token */
3473 int primary; /* is the token primary or impersonation? */
3474 int impersonation_level; /* level of impersonation */
3475 int elevation; /* elevation type */
3476 int group_count; /* the number of groups the token is a member of */
3477 int privilege_count; /* the number of privileges the token has */
3478 @END
3481 /* Create a token which is an elevation counterpart to this token */
3482 @REQ(create_linked_token)
3483 obj_handle_t handle; /* handle to the token */
3484 @REPLY
3485 obj_handle_t linked; /* handle to the linked token */
3486 @END
3489 /* Create I/O completion port */
3490 @REQ(create_completion)
3491 unsigned int access; /* desired access to a port */
3492 unsigned int concurrent; /* max number of concurrent active threads */
3493 VARARG(objattr,object_attributes); /* object attributes */
3494 @REPLY
3495 obj_handle_t handle; /* port handle */
3496 @END
3499 /* Open I/O completion port */
3500 @REQ(open_completion)
3501 unsigned int access; /* desired access to a port */
3502 unsigned int attributes; /* object attributes */
3503 obj_handle_t rootdir; /* root directory */
3504 VARARG(filename,unicode_str); /* port name */
3505 @REPLY
3506 obj_handle_t handle; /* port handle */
3507 @END
3510 /* add completion to completion port */
3511 @REQ(add_completion)
3512 obj_handle_t handle; /* port handle */
3513 apc_param_t ckey; /* completion key */
3514 apc_param_t cvalue; /* completion value */
3515 apc_param_t information; /* IO_STATUS_BLOCK Information */
3516 unsigned int status; /* completion result */
3517 @END
3520 /* get completion from completion port queue */
3521 @REQ(remove_completion)
3522 obj_handle_t handle; /* port handle */
3523 @REPLY
3524 apc_param_t ckey; /* completion key */
3525 apc_param_t cvalue; /* completion value */
3526 apc_param_t information; /* IO_STATUS_BLOCK Information */
3527 unsigned int status; /* completion result */
3528 @END
3531 /* get completion queue depth */
3532 @REQ(query_completion)
3533 obj_handle_t handle; /* port handle */
3534 @REPLY
3535 unsigned int depth; /* completion queue depth */
3536 @END
3539 /* associate object with completion port */
3540 @REQ(set_completion_info)
3541 obj_handle_t handle; /* object handle */
3542 apc_param_t ckey; /* completion key */
3543 obj_handle_t chandle; /* port handle */
3544 @END
3547 /* check for associated completion and push msg */
3548 @REQ(add_fd_completion)
3549 obj_handle_t handle; /* async' object */
3550 apc_param_t cvalue; /* completion value */
3551 apc_param_t information; /* IO_STATUS_BLOCK Information */
3552 unsigned int status; /* completion status */
3553 int async; /* completion is an async result */
3554 @END
3557 /* set fd completion information */
3558 @REQ(set_fd_completion_mode)
3559 obj_handle_t handle; /* handle to a file or directory */
3560 unsigned int flags; /* completion notification flags */
3561 @END
3564 /* set fd disposition information */
3565 @REQ(set_fd_disp_info)
3566 obj_handle_t handle; /* handle to a file or directory */
3567 int unlink; /* whether to unlink file on close */
3568 @END
3571 /* set fd name information */
3572 @REQ(set_fd_name_info)
3573 obj_handle_t handle; /* handle to a file or directory */
3574 obj_handle_t rootdir; /* root directory */
3575 data_size_t namelen; /* length of NT name in bytes */
3576 int link; /* link instead of renaming */
3577 int replace; /* replace an existing file? */
3578 VARARG(name,unicode_str,namelen); /* NT name */
3579 VARARG(filename,string); /* new file name */
3580 @END
3583 /* Retrieve layered info for a window */
3584 @REQ(get_window_layered_info)
3585 user_handle_t handle; /* handle to the window */
3586 @REPLY
3587 unsigned int color_key; /* color key */
3588 unsigned int alpha; /* alpha (0..255) */
3589 unsigned int flags; /* LWA_* flags */
3590 @END
3593 /* Set layered info for a window */
3594 @REQ(set_window_layered_info)
3595 user_handle_t handle; /* handle to the window */
3596 unsigned int color_key; /* color key */
3597 unsigned int alpha; /* alpha (0..255) */
3598 unsigned int flags; /* LWA_* flags */
3599 @END
3602 /* Allocate an arbitrary user handle */
3603 @REQ(alloc_user_handle)
3604 @REPLY
3605 user_handle_t handle; /* allocated handle */
3606 @END
3609 /* Free an arbitrary user handle */
3610 @REQ(free_user_handle)
3611 user_handle_t handle; /* handle to free*/
3612 @END
3615 /* Set/get the current cursor */
3616 @REQ(set_cursor)
3617 unsigned int flags; /* flags for fields to set (see below) */
3618 user_handle_t handle; /* handle to the cursor */
3619 int show_count; /* show count increment/decrement */
3620 int x; /* cursor position */
3621 int y;
3622 rectangle_t clip; /* cursor clip rectangle */
3623 unsigned int clip_msg; /* message to post on cursor clip changes */
3624 @REPLY
3625 user_handle_t prev_handle; /* previous handle */
3626 int prev_count; /* previous show count */
3627 int prev_x; /* previous position */
3628 int prev_y;
3629 int new_x; /* new position */
3630 int new_y;
3631 rectangle_t new_clip; /* new clip rectangle */
3632 unsigned int last_change; /* time of last position change */
3633 @END
3634 #define SET_CURSOR_HANDLE 0x01
3635 #define SET_CURSOR_COUNT 0x02
3636 #define SET_CURSOR_POS 0x04
3637 #define SET_CURSOR_CLIP 0x08
3638 #define SET_CURSOR_NOCLIP 0x10
3640 /* Get the history of the 64 last cursor positions */
3641 @REQ(get_cursor_history)
3642 @REPLY
3643 VARARG(history,cursor_positions);
3644 @END
3647 /* Batch read rawinput message data */
3648 @REQ(get_rawinput_buffer)
3649 data_size_t rawinput_size; /* size of RAWINPUT structure */
3650 data_size_t buffer_size; /* size of output buffer */
3651 @REPLY
3652 data_size_t next_size; /* minimum size to get next message data */
3653 unsigned int count;
3654 VARARG(data,bytes);
3655 @END
3657 /* Modify the list of registered rawinput devices */
3658 @REQ(update_rawinput_devices)
3659 VARARG(devices,rawinput_devices);
3660 @END
3662 /* Retrieve the list of registered rawinput devices */
3663 @REQ(get_rawinput_devices)
3664 @REPLY
3665 unsigned int device_count;
3666 VARARG(devices,rawinput_devices);
3667 @END
3669 /* Create a new job object */
3670 @REQ(create_job)
3671 unsigned int access; /* wanted access rights */
3672 VARARG(objattr,object_attributes); /* object attributes */
3673 @REPLY
3674 obj_handle_t handle; /* handle to the job */
3675 @END
3678 /* Open a job object */
3679 @REQ(open_job)
3680 unsigned int access; /* wanted access rights */
3681 unsigned int attributes; /* object attributes */
3682 obj_handle_t rootdir; /* root directory */
3683 VARARG(name,unicode_str); /* object name */
3684 @REPLY
3685 obj_handle_t handle; /* handle to the job */
3686 @END
3689 /* Assign a job object to a process */
3690 @REQ(assign_job)
3691 obj_handle_t job; /* handle to the job */
3692 obj_handle_t process; /* handle to the process */
3693 @END
3696 /* Check if a process is associated with a job */
3697 @REQ(process_in_job)
3698 obj_handle_t job; /* handle to the job */
3699 obj_handle_t process; /* handle to the process */
3700 @END
3703 /* Set limit flags on a job */
3704 @REQ(set_job_limits)
3705 obj_handle_t handle; /* handle to the job */
3706 unsigned int limit_flags; /* new limit flags */
3707 @END
3710 /* Set new completion port for a job */
3711 @REQ(set_job_completion_port)
3712 obj_handle_t job; /* handle to the job */
3713 obj_handle_t port; /* handle to the completion port */
3714 client_ptr_t key; /* key to send with completion messages */
3715 @END
3718 /* Retrieve information about a job */
3719 @REQ(get_job_info)
3720 obj_handle_t handle; /* handle to the job */
3721 @REPLY
3722 int total_processes; /* total count of processes */
3723 int active_processes; /* count of running processes */
3724 @END
3727 /* Terminate all processes associated with the job */
3728 @REQ(terminate_job)
3729 obj_handle_t handle; /* handle to the job */
3730 int status; /* process exit code */
3731 @END
3734 /* Suspend a process */
3735 @REQ(suspend_process)
3736 obj_handle_t handle; /* process handle */
3737 @END
3740 /* Resume a process */
3741 @REQ(resume_process)
3742 obj_handle_t handle; /* process handle */
3743 @END
3746 /* Iterate thread list for process */
3747 @REQ(get_next_thread)
3748 obj_handle_t process; /* process handle */
3749 obj_handle_t last; /* thread handle to start with */
3750 unsigned int access; /* desired access for returned handle */
3751 unsigned int attributes; /* returned handle attributes */
3752 unsigned int flags; /* controls iteration direction */
3753 @REPLY
3754 obj_handle_t handle; /* next thread handle */
3755 @END