reg/tests: Use string literals instead of a char buffer for REG_MULTI_SZ tests.
[wine.git] / server / protocol.def
blob9361933d47c1bdb1990c6a9049142b900c8b0735
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 struct hardware_msg_data
283 lparam_t info; /* extra info */
284 unsigned int hw_id; /* unique id */
285 unsigned int flags; /* hook flags */
286 struct hw_msg_source source; /* message source */
287 union
289 int type;
290 struct
292 int type; /* RIM_TYPEKEYBOARD */
293 unsigned int message; /* message generated by this rawinput event */
294 unsigned short vkey; /* virtual key code */
295 unsigned short scan; /* scan code */
296 } kbd;
297 struct
299 int type; /* RIM_TYPEMOUSE */
300 int x; /* x coordinate */
301 int y; /* y coordinate */
302 unsigned int data; /* mouse data */
303 } mouse;
304 } rawinput;
307 struct callback_msg_data
309 client_ptr_t callback; /* callback function */
310 lparam_t data; /* user data for callback */
311 lparam_t result; /* message result */
314 struct winevent_msg_data
316 user_handle_t hook; /* hook handle */
317 thread_id_t tid; /* thread id */
318 client_ptr_t hook_proc; /* hook proc address */
319 /* followed by module name if any */
322 typedef union
324 int type;
325 struct
327 int type; /* INPUT_KEYBOARD */
328 unsigned short vkey; /* virtual key code */
329 unsigned short scan; /* scan code */
330 unsigned int flags; /* event flags */
331 unsigned int time; /* event time */
332 lparam_t info; /* extra info */
333 } kbd;
334 struct
336 int type; /* INPUT_MOUSE */
337 int x; /* coordinates */
338 int y;
339 unsigned int data; /* mouse data */
340 unsigned int flags; /* event flags */
341 unsigned int time; /* event time */
342 lparam_t info; /* extra info */
343 } mouse;
344 struct
346 int type; /* INPUT_HARDWARE */
347 unsigned int msg; /* message code */
348 lparam_t lparam; /* message param */
349 } hw;
350 } hw_input_t;
352 typedef union
354 unsigned char bytes[1]; /* raw data for sent messages */
355 struct hardware_msg_data hardware;
356 struct callback_msg_data callback;
357 struct winevent_msg_data winevent;
358 } message_data_t;
360 /* structure returned in filesystem events */
361 struct filesystem_event
363 int action;
364 data_size_t len;
365 char name[1];
368 typedef struct
370 unsigned int low_part;
371 int high_part;
372 } luid_t;
374 typedef struct
376 unsigned int read;
377 unsigned int write;
378 unsigned int exec;
379 unsigned int all;
380 } generic_map_t;
382 #define MAX_ACL_LEN 65535
384 struct security_descriptor
386 unsigned int control; /* SE_ flags */
387 data_size_t owner_len;
388 data_size_t group_len;
389 data_size_t sacl_len;
390 data_size_t dacl_len;
391 /* VARARG(owner,SID); */
392 /* VARARG(group,SID); */
393 /* VARARG(sacl,ACL); */
394 /* VARARG(dacl,ACL); */
397 struct object_attributes
399 obj_handle_t rootdir; /* root directory */
400 unsigned int attributes; /* object attributes */
401 data_size_t sd_len; /* length of security_descriptor data. may be 0 */
402 data_size_t name_len; /* length of the name string. may be 0 */
403 /* VARARG(sd,security_descriptor); */
404 /* VARARG(name,unicode_str); */
407 struct object_type_info
409 data_size_t name_len; /* length of the name string */
410 unsigned int index; /* type index in global table */
411 unsigned int obj_count; /* count of objects of this type */
412 unsigned int handle_count; /* count of handles of this type */
413 unsigned int obj_max; /* max count of objects of this type */
414 unsigned int handle_max; /* max count of handles of this type */
415 unsigned int valid_access; /* mask for valid access bits */
416 generic_map_t mapping; /* generic access mappings */
417 /* VARARG(name,unicode_str); */
420 struct token_groups
422 unsigned int count;
423 /* unsigned int attributes[count]; */
424 /* VARARG(sids,SID); */
427 enum select_op
429 SELECT_NONE,
430 SELECT_WAIT,
431 SELECT_WAIT_ALL,
432 SELECT_SIGNAL_AND_WAIT,
433 SELECT_KEYED_EVENT_WAIT,
434 SELECT_KEYED_EVENT_RELEASE
437 typedef union
439 enum select_op op;
440 struct
442 enum select_op op; /* SELECT_WAIT or SELECT_WAIT_ALL */
443 obj_handle_t handles[MAXIMUM_WAIT_OBJECTS];
444 } wait;
445 struct
447 enum select_op op; /* SELECT_SIGNAL_AND_WAIT */
448 obj_handle_t wait;
449 obj_handle_t signal; /* must be last in the structure so we can remove it on retries */
450 } signal_and_wait;
451 struct
453 enum select_op op; /* SELECT_KEYED_EVENT_WAIT or SELECT_KEYED_EVENT_RELEASE */
454 obj_handle_t handle;
455 client_ptr_t key;
456 } keyed_event;
457 } select_op_t;
459 enum apc_type
461 APC_NONE,
462 APC_USER,
463 APC_TIMER,
464 APC_ASYNC_IO,
465 APC_VIRTUAL_ALLOC,
466 APC_VIRTUAL_FREE,
467 APC_VIRTUAL_QUERY,
468 APC_VIRTUAL_PROTECT,
469 APC_VIRTUAL_FLUSH,
470 APC_VIRTUAL_LOCK,
471 APC_VIRTUAL_UNLOCK,
472 APC_MAP_VIEW,
473 APC_UNMAP_VIEW,
474 APC_CREATE_THREAD,
475 APC_DUP_HANDLE,
476 APC_BREAK_PROCESS
479 typedef union
481 enum apc_type type;
482 struct
484 enum apc_type type; /* APC_USER */
485 int __pad;
486 client_ptr_t func; /* void (__stdcall *func)(ULONG_PTR,ULONG_PTR,ULONG_PTR); */
487 apc_param_t args[3]; /* arguments for user function */
488 } user;
489 struct
491 enum apc_type type; /* APC_TIMER */
492 int __pad;
493 client_ptr_t func; /* void (__stdcall *func)(void*, unsigned int, unsigned int); */
494 abstime_t time; /* time of expiration */
495 client_ptr_t arg; /* user argument */
496 } timer;
497 } user_apc_t;
499 typedef union
501 enum apc_type type;
502 user_apc_t user;
503 struct
505 enum apc_type type; /* APC_ASYNC_IO */
506 unsigned int status; /* I/O status */
507 client_ptr_t user; /* user pointer */
508 client_ptr_t sb; /* status block */
509 } async_io;
510 struct
512 enum apc_type type; /* APC_VIRTUAL_ALLOC */
513 unsigned int op_type; /* type of operation */
514 client_ptr_t addr; /* requested address */
515 mem_size_t size; /* allocation size */
516 mem_size_t zero_bits; /* number of zero high bits */
517 unsigned int prot; /* memory protection flags */
518 } virtual_alloc;
519 struct
521 enum apc_type type; /* APC_VIRTUAL_FREE */
522 unsigned int op_type; /* type of operation */
523 client_ptr_t addr; /* requested address */
524 mem_size_t size; /* allocation size */
525 } virtual_free;
526 struct
528 enum apc_type type; /* APC_VIRTUAL_QUERY */
529 int __pad;
530 client_ptr_t addr; /* requested address */
531 } virtual_query;
532 struct
534 enum apc_type type; /* APC_VIRTUAL_PROTECT */
535 unsigned int prot; /* new protection flags */
536 client_ptr_t addr; /* requested address */
537 mem_size_t size; /* requested size */
538 } virtual_protect;
539 struct
541 enum apc_type type; /* APC_VIRTUAL_FLUSH */
542 int __pad;
543 client_ptr_t addr; /* requested address */
544 mem_size_t size; /* requested size */
545 } virtual_flush;
546 struct
548 enum apc_type type; /* APC_VIRTUAL_LOCK */
549 int __pad;
550 client_ptr_t addr; /* requested address */
551 mem_size_t size; /* requested size */
552 } virtual_lock;
553 struct
555 enum apc_type type; /* APC_VIRTUAL_UNLOCK */
556 int __pad;
557 client_ptr_t addr; /* requested address */
558 mem_size_t size; /* requested size */
559 } virtual_unlock;
560 struct
562 enum apc_type type; /* APC_MAP_VIEW */
563 obj_handle_t handle; /* mapping handle */
564 client_ptr_t addr; /* requested address */
565 mem_size_t size; /* allocation size */
566 file_pos_t offset; /* file offset */
567 mem_size_t zero_bits; /* number of zero high bits */
568 unsigned int alloc_type; /* allocation type */
569 unsigned int prot; /* memory protection flags */
570 } map_view;
571 struct
573 enum apc_type type; /* APC_UNMAP_VIEW */
574 int __pad;
575 client_ptr_t addr; /* view address */
576 } unmap_view;
577 struct
579 enum apc_type type; /* APC_CREATE_THREAD */
580 unsigned int flags; /* creation flags */
581 client_ptr_t func; /* void (__stdcall *func)(void*); start function */
582 client_ptr_t arg; /* argument for start function */
583 mem_size_t reserve; /* reserve size for thread stack */
584 mem_size_t commit; /* commit size for thread stack */
585 } create_thread;
586 struct
588 enum apc_type type; /* APC_DUP_HANDLE */
589 obj_handle_t src_handle; /* src handle to duplicate */
590 obj_handle_t dst_process; /* dst process handle */
591 unsigned int access; /* wanted access rights */
592 unsigned int attributes; /* object attributes */
593 unsigned int options; /* duplicate options */
594 } dup_handle;
595 } apc_call_t;
597 typedef union
599 enum apc_type type;
600 struct
602 enum apc_type type; /* APC_ASYNC_IO */
603 unsigned int status; /* new status of async operation */
604 unsigned int total; /* bytes transferred */
605 } async_io;
606 struct
608 enum apc_type type; /* APC_VIRTUAL_ALLOC */
609 unsigned int status; /* status returned by call */
610 client_ptr_t addr; /* resulting address */
611 mem_size_t size; /* resulting size */
612 } virtual_alloc;
613 struct
615 enum apc_type type; /* APC_VIRTUAL_FREE */
616 unsigned int status; /* status returned by call */
617 client_ptr_t addr; /* resulting address */
618 mem_size_t size; /* resulting size */
619 } virtual_free;
620 struct
622 enum apc_type type; /* APC_VIRTUAL_QUERY */
623 unsigned int status; /* status returned by call */
624 client_ptr_t base; /* resulting base address */
625 client_ptr_t alloc_base;/* resulting allocation base */
626 mem_size_t size; /* resulting region size */
627 unsigned short state; /* resulting region state */
628 unsigned short prot; /* resulting region protection */
629 unsigned short alloc_prot;/* resulting allocation protection */
630 unsigned short alloc_type;/* resulting region allocation type */
631 } virtual_query;
632 struct
634 enum apc_type type; /* APC_VIRTUAL_PROTECT */
635 unsigned int status; /* status returned by call */
636 client_ptr_t addr; /* resulting address */
637 mem_size_t size; /* resulting size */
638 unsigned int prot; /* old protection flags */
639 } virtual_protect;
640 struct
642 enum apc_type type; /* APC_VIRTUAL_FLUSH */
643 unsigned int status; /* status returned by call */
644 client_ptr_t addr; /* resulting address */
645 mem_size_t size; /* resulting size */
646 } virtual_flush;
647 struct
649 enum apc_type type; /* APC_VIRTUAL_LOCK */
650 unsigned int status; /* status returned by call */
651 client_ptr_t addr; /* resulting address */
652 mem_size_t size; /* resulting size */
653 } virtual_lock;
654 struct
656 enum apc_type type; /* APC_VIRTUAL_UNLOCK */
657 unsigned int status; /* status returned by call */
658 client_ptr_t addr; /* resulting address */
659 mem_size_t size; /* resulting size */
660 } virtual_unlock;
661 struct
663 enum apc_type type; /* APC_MAP_VIEW */
664 unsigned int status; /* status returned by call */
665 client_ptr_t addr; /* resulting address */
666 mem_size_t size; /* resulting size */
667 } map_view;
668 struct
670 enum apc_type type; /* APC_UNMAP_VIEW */
671 unsigned int status; /* status returned by call */
672 } unmap_view;
673 struct
675 enum apc_type type; /* APC_CREATE_THREAD */
676 unsigned int status; /* status returned by call */
677 process_id_t pid; /* process id */
678 thread_id_t tid; /* thread id */
679 client_ptr_t teb; /* thread teb (in process address space) */
680 obj_handle_t handle; /* handle to new thread */
681 } create_thread;
682 struct
684 enum apc_type type; /* APC_DUP_HANDLE */
685 unsigned int status; /* status returned by call */
686 obj_handle_t handle; /* duplicated handle in dst process */
687 } dup_handle;
688 struct
690 enum apc_type type; /* APC_BREAK_PROCESS */
691 unsigned int status; /* status returned by call */
692 } break_process;
693 } apc_result_t;
695 enum irp_type
697 IRP_CALL_NONE,
698 IRP_CALL_CREATE,
699 IRP_CALL_CLOSE,
700 IRP_CALL_READ,
701 IRP_CALL_WRITE,
702 IRP_CALL_FLUSH,
703 IRP_CALL_IOCTL,
704 IRP_CALL_VOLUME,
705 IRP_CALL_FREE,
706 IRP_CALL_CANCEL
709 typedef union
711 enum irp_type type; /* irp call type */
712 struct
714 enum irp_type type; /* IRP_CALL_CREATE */
715 unsigned int access; /* access rights */
716 unsigned int sharing; /* sharing flags */
717 unsigned int options; /* file options */
718 client_ptr_t device; /* opaque ptr for the device */
719 obj_handle_t file; /* file handle */
720 } create;
721 struct
723 enum irp_type type; /* IRP_CALL_CLOSE */
724 int __pad;
725 client_ptr_t file; /* opaque ptr for the file object */
726 } close;
727 struct
729 enum irp_type type; /* IRP_CALL_READ */
730 unsigned int key; /* driver key */
731 data_size_t out_size; /* needed output size */
732 int __pad;
733 client_ptr_t file; /* opaque ptr for the file object */
734 file_pos_t pos; /* file position */
735 } read;
736 struct
738 enum irp_type type; /* IRP_CALL_WRITE */
739 unsigned int key; /* driver key */
740 client_ptr_t file; /* opaque ptr for the file object */
741 file_pos_t pos; /* file position */
742 } write;
743 struct
745 enum irp_type type; /* IRP_CALL_FLUSH */
746 int __pad;
747 client_ptr_t file; /* opaque ptr for the file object */
748 } flush;
749 struct
751 enum irp_type type; /* IRP_CALL_IOCTL */
752 ioctl_code_t code; /* ioctl code */
753 data_size_t out_size; /* needed output size */
754 int __pad;
755 client_ptr_t file; /* opaque ptr for the file object */
756 } ioctl;
757 struct
759 enum irp_type type; /* IRP_CALL_VOLUME */
760 unsigned int info_class;/* information class */
761 data_size_t out_size; /* needed output size */
762 int __pad;
763 client_ptr_t file; /* opaque ptr for the file object */
764 } volume;
765 struct
767 enum irp_type type; /* IRP_CALL_FREE */
768 int __pad;
769 client_ptr_t obj; /* opaque ptr for the freed object */
770 } free;
771 struct
773 enum irp_type type; /* IRP_CALL_CANCEL */
774 int __pad;
775 client_ptr_t irp; /* opaque ptr for canceled irp */
776 } cancel;
777 } irp_params_t;
779 /* information about a PE image mapping, roughly equivalent to SECTION_IMAGE_INFORMATION */
780 typedef struct
782 client_ptr_t base;
783 client_ptr_t entry_point;
784 mem_size_t map_size;
785 mem_size_t stack_size;
786 mem_size_t stack_commit;
787 unsigned int zerobits;
788 unsigned int subsystem;
789 unsigned short subsystem_minor;
790 unsigned short subsystem_major;
791 unsigned short osversion_major;
792 unsigned short osversion_minor;
793 unsigned short image_charact;
794 unsigned short dll_charact;
795 unsigned short machine;
796 unsigned char contains_code;
797 unsigned char image_flags;
798 unsigned int loader_flags;
799 unsigned int header_size;
800 unsigned int file_size;
801 unsigned int checksum;
802 unsigned int dbg_offset;
803 unsigned int dbg_size;
804 } pe_image_info_t;
805 #define IMAGE_FLAGS_ComPlusNativeReady 0x01
806 #define IMAGE_FLAGS_ComPlusILOnly 0x02
807 #define IMAGE_FLAGS_ImageDynamicallyRelocated 0x04
808 #define IMAGE_FLAGS_ImageMappedFlat 0x08
809 #define IMAGE_FLAGS_BaseBelow4gb 0x10
810 #define IMAGE_FLAGS_ComPlusPrefer32bit 0x20
811 #define IMAGE_FLAGS_WineBuiltin 0x40
812 #define IMAGE_FLAGS_WineFakeDll 0x80
814 struct rawinput_device
816 unsigned short usage_page;
817 unsigned short usage;
818 unsigned int flags;
819 user_handle_t target;
822 typedef struct
824 int x;
825 int y;
826 unsigned int time;
827 int __pad;
828 lparam_t info;
829 } cursor_pos_t;
831 /****************************************************************/
832 /* Request declarations */
834 /* Create a new process from the context of the parent */
835 @REQ(new_process)
836 obj_handle_t token; /* process token */
837 obj_handle_t debug; /* process debug object */
838 obj_handle_t parent_process; /* parent process */
839 unsigned int flags; /* process creation flags */
840 int socket_fd; /* file descriptor for process socket */
841 unsigned int access; /* access rights for process object */
842 unsigned short machine; /* architecture that the new process will use */
843 data_size_t info_size; /* size of startup info */
844 data_size_t handles_size; /* length of explicit handles list */
845 VARARG(objattr,object_attributes); /* object attributes */
846 VARARG(handles,uints,handles_size); /* handles list */
847 VARARG(info,startup_info,info_size); /* startup information */
848 VARARG(env,unicode_str); /* environment for new process */
849 @REPLY
850 obj_handle_t info; /* new process info handle */
851 process_id_t pid; /* process id */
852 obj_handle_t handle; /* process handle (in the current process) */
853 @END
856 /* Retrieve information about a newly started process */
857 @REQ(get_new_process_info)
858 obj_handle_t info; /* info handle returned from new_process_request */
859 @REPLY
860 int success; /* did the process start successfully? */
861 int exit_code; /* process exit code if failed */
862 @END
865 /* Create a new thread */
866 @REQ(new_thread)
867 obj_handle_t process; /* process in which to create thread */
868 unsigned int access; /* wanted access rights */
869 int suspend; /* new thread should be suspended on creation */
870 int request_fd; /* fd for request pipe */
871 VARARG(objattr,object_attributes); /* object attributes */
872 @REPLY
873 thread_id_t tid; /* thread id */
874 obj_handle_t handle; /* thread handle (in the current process) */
875 @END
878 /* Retrieve the new process startup info */
879 @REQ(get_startup_info)
880 @REPLY
881 data_size_t info_size; /* size of startup info */
882 VARARG(info,startup_info,info_size); /* startup information */
883 VARARG(env,unicode_str); /* environment */
884 @END
887 /* Signal the end of the process initialization */
888 @REQ(init_process_done)
889 @REPLY
890 client_ptr_t entry; /* process entry point */
891 int suspend; /* is process suspended? */
892 @END
895 /* Initialize the first thread of a new process */
896 @REQ(init_first_thread)
897 int unix_pid; /* Unix pid of new process */
898 int unix_tid; /* Unix tid of new thread */
899 int debug_level; /* new debug level */
900 client_ptr_t teb; /* TEB of new thread (in process address space) */
901 client_ptr_t peb; /* PEB of new process (in process address space) */
902 client_ptr_t ldt_copy; /* address of LDT copy (in process address space) */
903 int reply_fd; /* fd for reply pipe */
904 int wait_fd; /* fd for blocking calls pipe */
905 @REPLY
906 process_id_t pid; /* process id of the new thread's process */
907 thread_id_t tid; /* thread id of the new thread */
908 timeout_t server_start; /* server start time */
909 data_size_t info_size; /* total size of startup info */
910 VARARG(machines,ushorts); /* array of supported machines */
911 @END
914 /* Initialize a new thread; called from the child after pthread_create() */
915 @REQ(init_thread)
916 int unix_tid; /* Unix tid of new thread */
917 int reply_fd; /* fd for reply pipe */
918 int wait_fd; /* fd for blocking calls pipe */
919 client_ptr_t teb; /* TEB of new thread (in thread address space) */
920 client_ptr_t entry; /* entry point (in thread address space) */
921 @REPLY
922 process_id_t pid; /* process id of the new thread's process */
923 thread_id_t tid; /* thread id of the new thread */
924 int suspend; /* is thread suspended? */
925 @END
928 /* Terminate a process */
929 @REQ(terminate_process)
930 obj_handle_t handle; /* process handle to terminate */
931 int exit_code; /* process exit code */
932 @REPLY
933 int self; /* suicide? */
934 @END
937 /* Terminate a thread */
938 @REQ(terminate_thread)
939 obj_handle_t handle; /* thread handle to terminate */
940 int exit_code; /* thread exit code */
941 @REPLY
942 int self; /* suicide? */
943 @END
946 /* Retrieve information about a process */
947 @REQ(get_process_info)
948 obj_handle_t handle; /* process handle */
949 @REPLY
950 process_id_t pid; /* server process id */
951 process_id_t ppid; /* server process id of parent */
952 affinity_t affinity; /* process affinity mask */
953 client_ptr_t peb; /* PEB address in process address space */
954 timeout_t start_time; /* process start time */
955 timeout_t end_time; /* process end time */
956 int exit_code; /* process exit code */
957 int priority; /* priority class */
958 unsigned short machine; /* process architecture */
959 VARARG(image,pe_image_info); /* image info for main exe */
960 @END
963 /* Retrieve debug information about a process */
964 @REQ(get_process_debug_info)
965 obj_handle_t handle; /* process handle */
966 @REPLY
967 obj_handle_t debug; /* handle to debug port */
968 int debug_children; /* inherit debugger to child processes */
969 VARARG(image,pe_image_info); /* image info for main exe */
970 @END
973 /* Fetch the name of the process image */
974 @REQ(get_process_image_name)
975 obj_handle_t handle; /* process handle */
976 int win32; /* return a win32 filename? */
977 @REPLY
978 data_size_t len; /* len in bytes required to store filename */
979 VARARG(name,unicode_str); /* image name for main exe */
980 @END
983 /* Retrieve information about a process memory usage */
984 @REQ(get_process_vm_counters)
985 obj_handle_t handle; /* process handle */
986 @REPLY
987 mem_size_t peak_virtual_size; /* peak virtual memory in bytes */
988 mem_size_t virtual_size; /* virtual memory in bytes */
989 mem_size_t peak_working_set_size; /* peak real memory in bytes */
990 mem_size_t working_set_size; /* real memory in bytes */
991 mem_size_t pagefile_usage; /* commit charge in bytes */
992 mem_size_t peak_pagefile_usage; /* peak commit charge in bytes */
993 @END
996 /* Set a process information */
997 @REQ(set_process_info)
998 obj_handle_t handle; /* process handle */
999 int mask; /* setting mask (see below) */
1000 int priority; /* priority class */
1001 affinity_t affinity; /* affinity mask */
1002 @END
1003 #define SET_PROCESS_INFO_PRIORITY 0x01
1004 #define SET_PROCESS_INFO_AFFINITY 0x02
1007 /* Retrieve information about a thread */
1008 @REQ(get_thread_info)
1009 obj_handle_t handle; /* thread handle */
1010 unsigned int access; /* required access rights */
1011 @REPLY
1012 process_id_t pid; /* server process id */
1013 thread_id_t tid; /* server thread id */
1014 client_ptr_t teb; /* thread teb pointer */
1015 client_ptr_t entry_point; /* thread entry point */
1016 affinity_t affinity; /* thread affinity mask */
1017 int exit_code; /* thread exit code */
1018 int priority; /* thread priority level */
1019 int last; /* last thread in process */
1020 int suspend_count; /* thread suspend count */
1021 int dbg_hidden; /* thread hidden from debugger */
1022 data_size_t desc_len; /* description length in bytes */
1023 VARARG(desc,unicode_str); /* description string */
1024 @END
1027 /* Retrieve information about thread times */
1028 @REQ(get_thread_times)
1029 obj_handle_t handle; /* thread handle */
1030 @REPLY
1031 timeout_t creation_time; /* thread creation time */
1032 timeout_t exit_time; /* thread exit time */
1033 int unix_pid; /* thread native pid */
1034 int unix_tid; /* thread native pid */
1035 @END
1038 /* Set a thread information */
1039 @REQ(set_thread_info)
1040 obj_handle_t handle; /* thread handle */
1041 int mask; /* setting mask (see below) */
1042 int priority; /* priority class */
1043 affinity_t affinity; /* affinity mask */
1044 client_ptr_t entry_point; /* thread entry point */
1045 obj_handle_t token; /* impersonation token */
1046 VARARG(desc,unicode_str); /* description string */
1047 @END
1048 #define SET_THREAD_INFO_PRIORITY 0x01
1049 #define SET_THREAD_INFO_AFFINITY 0x02
1050 #define SET_THREAD_INFO_TOKEN 0x04
1051 #define SET_THREAD_INFO_ENTRYPOINT 0x08
1052 #define SET_THREAD_INFO_DESCRIPTION 0x10
1053 #define SET_THREAD_INFO_DBG_HIDDEN 0x20
1056 /* Suspend a thread */
1057 @REQ(suspend_thread)
1058 obj_handle_t handle; /* thread handle */
1059 @REPLY
1060 int count; /* new suspend count */
1061 @END
1064 /* Resume a thread */
1065 @REQ(resume_thread)
1066 obj_handle_t handle; /* thread handle */
1067 @REPLY
1068 int count; /* new suspend count */
1069 @END
1072 /* Queue an APC for a thread or process */
1073 @REQ(queue_apc)
1074 obj_handle_t handle; /* thread or process handle */
1075 apc_call_t call; /* call arguments */
1076 @REPLY
1077 obj_handle_t handle; /* APC handle */
1078 int self; /* run APC in caller itself? */
1079 @END
1082 /* Get the result of an APC call */
1083 @REQ(get_apc_result)
1084 obj_handle_t handle; /* handle to the APC */
1085 @REPLY
1086 apc_result_t result; /* result of the APC */
1087 @END
1090 /* Close a handle for the current process */
1091 @REQ(close_handle)
1092 obj_handle_t handle; /* handle to close */
1093 @END
1096 /* Set a handle information */
1097 @REQ(set_handle_info)
1098 obj_handle_t handle; /* handle we are interested in */
1099 int flags; /* new handle flags */
1100 int mask; /* mask for flags to set */
1101 @REPLY
1102 int old_flags; /* old flag value */
1103 @END
1106 /* Duplicate a handle */
1107 @REQ(dup_handle)
1108 obj_handle_t src_process; /* src process handle */
1109 obj_handle_t src_handle; /* src handle to duplicate */
1110 obj_handle_t dst_process; /* dst process handle */
1111 unsigned int access; /* wanted access rights */
1112 unsigned int attributes; /* object attributes */
1113 unsigned int options; /* duplicate options */
1114 @REPLY
1115 obj_handle_t handle; /* duplicated handle in dst process */
1116 @END
1119 /* Make an object temporary */
1120 @REQ(make_temporary)
1121 obj_handle_t handle; /* handle to the object */
1122 @END
1125 /* Open a handle to a process */
1126 @REQ(open_process)
1127 process_id_t pid; /* process id to open */
1128 unsigned int access; /* wanted access rights */
1129 unsigned int attributes; /* object attributes */
1130 @REPLY
1131 obj_handle_t handle; /* handle to the process */
1132 @END
1135 /* Open a handle to a thread */
1136 @REQ(open_thread)
1137 thread_id_t tid; /* thread id to open */
1138 unsigned int access; /* wanted access rights */
1139 unsigned int attributes; /* object attributes */
1140 @REPLY
1141 obj_handle_t handle; /* handle to the thread */
1142 @END
1145 /* Wait for handles */
1146 @REQ(select)
1147 int flags; /* wait flags (see below) */
1148 client_ptr_t cookie; /* magic cookie to return to client */
1149 abstime_t timeout; /* timeout */
1150 data_size_t size; /* size of select_op */
1151 obj_handle_t prev_apc; /* handle to previous APC */
1152 VARARG(result,apc_result); /* result of previous APC */
1153 VARARG(data,select_op,size); /* operation-specific data */
1154 VARARG(context,context); /* suspend context */
1155 @REPLY
1156 apc_call_t call; /* APC call arguments */
1157 obj_handle_t apc_handle; /* handle to next APC */
1158 VARARG(context,context); /* suspend context */
1159 @END
1160 #define SELECT_ALERTABLE 1
1161 #define SELECT_INTERRUPTIBLE 2
1164 /* Create an event */
1165 @REQ(create_event)
1166 unsigned int access; /* wanted access rights */
1167 int manual_reset; /* manual reset event */
1168 int initial_state; /* initial state of the event */
1169 VARARG(objattr,object_attributes); /* object attributes */
1170 @REPLY
1171 obj_handle_t handle; /* handle to the event */
1172 @END
1174 /* Event operation */
1175 @REQ(event_op)
1176 obj_handle_t handle; /* handle to event */
1177 int op; /* event operation (see below) */
1178 @REPLY
1179 int state; /* previous state */
1180 @END
1181 enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT };
1183 @REQ(query_event)
1184 obj_handle_t handle; /* handle to event */
1185 @REPLY
1186 int manual_reset; /* manual reset event */
1187 int state; /* current state of the event */
1188 @END
1190 /* Open an event */
1191 @REQ(open_event)
1192 unsigned int access; /* wanted access rights */
1193 unsigned int attributes; /* object attributes */
1194 obj_handle_t rootdir; /* root directory */
1195 VARARG(name,unicode_str); /* object name */
1196 @REPLY
1197 obj_handle_t handle; /* handle to the event */
1198 @END
1201 /* Create a keyed event */
1202 @REQ(create_keyed_event)
1203 unsigned int access; /* wanted access rights */
1204 VARARG(objattr,object_attributes); /* object attributes */
1205 @REPLY
1206 obj_handle_t handle; /* handle to the event */
1207 @END
1209 /* Open a keyed event */
1210 @REQ(open_keyed_event)
1211 unsigned int access; /* wanted access rights */
1212 unsigned int attributes; /* object attributes */
1213 obj_handle_t rootdir; /* root directory */
1214 VARARG(name,unicode_str); /* object name */
1215 @REPLY
1216 obj_handle_t handle; /* handle to the event */
1217 @END
1220 /* Create a mutex */
1221 @REQ(create_mutex)
1222 unsigned int access; /* wanted access rights */
1223 int owned; /* initially owned? */
1224 VARARG(objattr,object_attributes); /* object attributes */
1225 @REPLY
1226 obj_handle_t handle; /* handle to the mutex */
1227 @END
1230 /* Release a mutex */
1231 @REQ(release_mutex)
1232 obj_handle_t handle; /* handle to the mutex */
1233 @REPLY
1234 unsigned int prev_count; /* value of internal counter, before release */
1235 @END
1238 /* Open a mutex */
1239 @REQ(open_mutex)
1240 unsigned int access; /* wanted access rights */
1241 unsigned int attributes; /* object attributes */
1242 obj_handle_t rootdir; /* root directory */
1243 VARARG(name,unicode_str); /* object name */
1244 @REPLY
1245 obj_handle_t handle; /* handle to the mutex */
1246 @END
1249 /* Query a mutex */
1250 @REQ(query_mutex)
1251 obj_handle_t handle; /* handle to mutex */
1252 @REPLY
1253 unsigned int count; /* current count of mutex */
1254 int owned; /* true if owned by current thread */
1255 int abandoned; /* true if abandoned */
1256 @END
1259 /* Create a semaphore */
1260 @REQ(create_semaphore)
1261 unsigned int access; /* wanted access rights */
1262 unsigned int initial; /* initial count */
1263 unsigned int max; /* maximum count */
1264 VARARG(objattr,object_attributes); /* object attributes */
1265 @REPLY
1266 obj_handle_t handle; /* handle to the semaphore */
1267 @END
1270 /* Release a semaphore */
1271 @REQ(release_semaphore)
1272 obj_handle_t handle; /* handle to the semaphore */
1273 unsigned int count; /* count to add to semaphore */
1274 @REPLY
1275 unsigned int prev_count; /* previous semaphore count */
1276 @END
1278 @REQ(query_semaphore)
1279 obj_handle_t handle; /* handle to the semaphore */
1280 @REPLY
1281 unsigned int current; /* current count */
1282 unsigned int max; /* maximum count */
1283 @END
1285 /* Open a semaphore */
1286 @REQ(open_semaphore)
1287 unsigned int access; /* wanted access rights */
1288 unsigned int attributes; /* object attributes */
1289 obj_handle_t rootdir; /* root directory */
1290 VARARG(name,unicode_str); /* object name */
1291 @REPLY
1292 obj_handle_t handle; /* handle to the semaphore */
1293 @END
1296 /* Create a file */
1297 @REQ(create_file)
1298 unsigned int access; /* wanted access rights */
1299 unsigned int sharing; /* sharing flags */
1300 int create; /* file create action */
1301 unsigned int options; /* file options */
1302 unsigned int attrs; /* file attributes for creation */
1303 VARARG(objattr,object_attributes); /* object attributes */
1304 VARARG(filename,string); /* file name */
1305 @REPLY
1306 obj_handle_t handle; /* handle to the file */
1307 @END
1310 /* Open a file object */
1311 @REQ(open_file_object)
1312 unsigned int access; /* wanted access rights */
1313 unsigned int attributes; /* open attributes */
1314 obj_handle_t rootdir; /* root directory */
1315 unsigned int sharing; /* sharing flags */
1316 unsigned int options; /* file options */
1317 VARARG(filename,unicode_str); /* file name */
1318 @REPLY
1319 obj_handle_t handle; /* handle to the file */
1320 @END
1323 /* Allocate a file handle for a Unix fd */
1324 @REQ(alloc_file_handle)
1325 unsigned int access; /* wanted access rights */
1326 unsigned int attributes; /* object attributes */
1327 int fd; /* file descriptor on the client side */
1328 @REPLY
1329 obj_handle_t handle; /* handle to the file */
1330 @END
1333 /* Get the Unix name from a file handle */
1334 @REQ(get_handle_unix_name)
1335 obj_handle_t handle; /* file handle */
1336 @REPLY
1337 data_size_t name_len; /* unix name length */
1338 VARARG(name,string); /* unix name */
1339 @END
1342 /* Get a Unix fd to access a file */
1343 @REQ(get_handle_fd)
1344 obj_handle_t handle; /* handle to the file */
1345 @REPLY
1346 int type; /* file type (see below) */
1347 int cacheable; /* can fd be cached in the client? */
1348 unsigned int access; /* file access rights */
1349 unsigned int options; /* file open options */
1350 @END
1351 enum server_fd_type
1353 FD_TYPE_INVALID, /* invalid file (no associated fd) */
1354 FD_TYPE_FILE, /* regular file */
1355 FD_TYPE_DIR, /* directory */
1356 FD_TYPE_SOCKET, /* socket */
1357 FD_TYPE_SERIAL, /* serial port */
1358 FD_TYPE_PIPE, /* named pipe */
1359 FD_TYPE_MAILSLOT, /* mailslot */
1360 FD_TYPE_CHAR, /* unspecified char device */
1361 FD_TYPE_DEVICE, /* Windows device file */
1362 FD_TYPE_NB_TYPES
1366 /* Retrieve (or allocate) the client-side directory cache entry */
1367 @REQ(get_directory_cache_entry)
1368 obj_handle_t handle; /* handle to the directory */
1369 @REPLY
1370 int entry; /* cache entry on the client side */
1371 VARARG(free,ints); /* entries that can be freed */
1372 @END
1375 /* Flush a file buffers */
1376 @REQ(flush)
1377 async_data_t async; /* async I/O parameters */
1378 @REPLY
1379 obj_handle_t event; /* event set when finished */
1380 @END
1382 /* Query file information */
1383 @REQ(get_file_info)
1384 obj_handle_t handle; /* handle to the file */
1385 unsigned int info_class; /* queried information class */
1386 @REPLY
1387 VARARG(data,bytes); /* file info data */
1388 @END
1390 /* Query volume information */
1391 @REQ(get_volume_info)
1392 obj_handle_t handle; /* handle to the file */
1393 async_data_t async; /* async I/O parameters */
1394 unsigned int info_class; /* queried information class */
1395 @REPLY
1396 obj_handle_t wait; /* handle to wait on for blocking read */
1397 VARARG(data,bytes); /* volume info data */
1398 @END
1400 /* Lock a region of a file */
1401 @REQ(lock_file)
1402 obj_handle_t handle; /* handle to the file */
1403 file_pos_t offset; /* offset of start of lock */
1404 file_pos_t count; /* count of bytes to lock */
1405 int shared; /* shared or exclusive lock? */
1406 int wait; /* do we want to wait? */
1407 @REPLY
1408 obj_handle_t handle; /* handle to wait on */
1409 int overlapped; /* is it an overlapped I/O handle? */
1410 @END
1413 /* Unlock a region of a file */
1414 @REQ(unlock_file)
1415 obj_handle_t handle; /* handle to the file */
1416 file_pos_t offset; /* offset of start of unlock */
1417 file_pos_t count; /* count of bytes to unlock */
1418 @END
1421 /* Set socket event parameters */
1422 @REQ(set_socket_event)
1423 obj_handle_t handle; /* handle to the socket */
1424 unsigned int mask; /* event mask */
1425 obj_handle_t event; /* event object */
1426 user_handle_t window; /* window to send the message to */
1427 unsigned int msg; /* message to send */
1428 @END
1431 /* Get socket event parameters */
1432 @REQ(get_socket_event)
1433 obj_handle_t handle; /* handle to the socket */
1434 int service; /* clear pending? */
1435 obj_handle_t c_event; /* event to clear */
1436 @REPLY
1437 unsigned int mask; /* event mask */
1438 unsigned int pmask; /* pending events */
1439 unsigned int state; /* status bits */
1440 VARARG(errors,ints); /* event errors */
1441 @END
1444 /* Get socket info */
1445 @REQ(get_socket_info)
1446 obj_handle_t handle; /* handle to the socket */
1447 @REPLY
1448 int family; /* family, see socket manpage */
1449 int type; /* type, see socket manpage */
1450 int protocol; /* protocol, see socket manpage */
1451 @END
1454 /* Re-enable pending socket events */
1455 @REQ(enable_socket_event)
1456 obj_handle_t handle; /* handle to the socket */
1457 unsigned int mask; /* events to re-enable */
1458 unsigned int sstate; /* status bits to set */
1459 unsigned int cstate; /* status bits to clear */
1460 @END
1462 @REQ(set_socket_deferred)
1463 obj_handle_t handle; /* handle to the socket */
1464 obj_handle_t deferred; /* handle to the socket for which accept() is deferred */
1465 @END
1468 /* Retrieve the next pending console ioctl request */
1469 @REQ(get_next_console_request)
1470 obj_handle_t handle; /* console server handle */
1471 int signal; /* server signal state */
1472 int read; /* 1 if reporting result of blocked read ioctl */
1473 unsigned int status; /* status of previous ioctl */
1474 VARARG(out_data,bytes); /* out_data of previous ioctl */
1475 @REPLY
1476 unsigned int code; /* ioctl code */
1477 unsigned int output; /* output id or 0 for input */
1478 data_size_t out_size; /* ioctl output size */
1479 VARARG(in_data,bytes); /* ioctl in_data */
1480 @END
1483 /* enable directory change notifications */
1484 @REQ(read_directory_changes)
1485 unsigned int filter; /* notification filter */
1486 int subtree; /* watch the subtree? */
1487 int want_data; /* flag indicating whether change data should be collected */
1488 async_data_t async; /* async I/O parameters */
1489 @END
1492 @REQ(read_change)
1493 obj_handle_t handle;
1494 @REPLY
1495 VARARG(events,filesystem_event); /* collected filesystem events */
1496 @END
1499 /* Create a file mapping */
1500 @REQ(create_mapping)
1501 unsigned int access; /* wanted access rights */
1502 unsigned int flags; /* SEC_* flags */
1503 unsigned int file_access; /* file access rights */
1504 mem_size_t size; /* mapping size */
1505 obj_handle_t file_handle; /* file handle */
1506 VARARG(objattr,object_attributes); /* object attributes */
1507 @REPLY
1508 obj_handle_t handle; /* handle to the mapping */
1509 @END
1512 /* Open a mapping */
1513 @REQ(open_mapping)
1514 unsigned int access; /* wanted access rights */
1515 unsigned int attributes; /* object attributes */
1516 obj_handle_t rootdir; /* root directory */
1517 VARARG(name,unicode_str); /* object name */
1518 @REPLY
1519 obj_handle_t handle; /* handle to the mapping */
1520 @END
1523 /* Get information about a file mapping */
1524 @REQ(get_mapping_info)
1525 obj_handle_t handle; /* handle to the mapping */
1526 unsigned int access; /* wanted access rights */
1527 @REPLY
1528 mem_size_t size; /* mapping size */
1529 unsigned int flags; /* SEC_* flags */
1530 obj_handle_t shared_file; /* shared mapping file handle */
1531 data_size_t total; /* total required buffer size in bytes */
1532 VARARG(image,pe_image_info);/* image info for SEC_IMAGE mappings */
1533 VARARG(name,unicode_str); /* filename for SEC_IMAGE mappings */
1534 @END
1537 /* Add a memory view in the current process */
1538 @REQ(map_view)
1539 obj_handle_t mapping; /* file mapping handle, or 0 for .so builtin */
1540 unsigned int access; /* wanted access rights */
1541 client_ptr_t base; /* view base address (page-aligned) */
1542 mem_size_t size; /* view size */
1543 file_pos_t start; /* start offset in mapping */
1544 VARARG(image,pe_image_info);/* image info for .so builtins */
1545 VARARG(name,unicode_str); /* image filename for .so builtins */
1546 @END
1549 /* Unmap a memory view from the current process */
1550 @REQ(unmap_view)
1551 client_ptr_t base; /* view base address */
1552 @END
1555 /* Get a range of committed pages in a file mapping */
1556 @REQ(get_mapping_committed_range)
1557 client_ptr_t base; /* view base address */
1558 file_pos_t offset; /* starting offset (page-aligned, in bytes) */
1559 @REPLY
1560 mem_size_t size; /* size of range starting at offset (page-aligned, in bytes) */
1561 int committed; /* whether it is a committed range */
1562 @END
1565 /* Add a range to the committed pages in a file mapping */
1566 @REQ(add_mapping_committed_range)
1567 client_ptr_t base; /* view base address */
1568 file_pos_t offset; /* starting offset (page-aligned, in bytes) */
1569 mem_size_t size; /* size to set (page-aligned, in bytes) or 0 if only retrieving */
1570 @END
1573 /* Check if two memory maps are for the same file */
1574 @REQ(is_same_mapping)
1575 client_ptr_t base1; /* first view base address */
1576 client_ptr_t base2; /* second view base address */
1577 @END
1580 /* Get the filename of a mapping */
1581 @REQ(get_mapping_filename)
1582 obj_handle_t process; /* process handle */
1583 client_ptr_t addr; /* address inside mapped view (in process address space) */
1584 @REPLY
1585 data_size_t len; /* total filename length in bytes */
1586 VARARG(filename,unicode_str); /* filename in NT format */
1587 @END
1590 struct thread_info
1592 timeout_t start_time;
1593 thread_id_t tid;
1594 int base_priority;
1595 int current_priority;
1596 int unix_tid;
1599 struct process_info
1601 timeout_t start_time;
1602 data_size_t name_len;
1603 int thread_count;
1604 int priority;
1605 process_id_t pid;
1606 process_id_t parent_pid;
1607 int handle_count;
1608 int unix_pid;
1609 int __pad;
1610 /* VARARG(name,unicode_str,name_len); */
1611 /* VARARG(threads,struct thread_info,thread_count); */
1614 /* Get a list of processes and threads currently running */
1615 @REQ(list_processes)
1616 @REPLY
1617 data_size_t info_size;
1618 int process_count;
1619 VARARG(data,process_info,info_size);
1620 @END
1623 /* Create a debug object */
1624 @REQ(create_debug_obj)
1625 unsigned int access; /* wanted access rights */
1626 unsigned int flags; /* object flags */
1627 VARARG(objattr,object_attributes); /* object attributes */
1628 @REPLY
1629 obj_handle_t handle; /* handle to the debug object */
1630 @END
1633 /* Wait for a debug event */
1634 @REQ(wait_debug_event)
1635 obj_handle_t debug; /* debug object */
1636 @REPLY
1637 process_id_t pid; /* process id */
1638 thread_id_t tid; /* thread id */
1639 VARARG(event,debug_event); /* debug event data */
1640 @END
1643 /* Queue an exception event */
1644 @REQ(queue_exception_event)
1645 int first; /* first chance exception? */
1646 unsigned int code; /* exception code */
1647 unsigned int flags; /* exception flags */
1648 client_ptr_t record; /* exception record */
1649 client_ptr_t address; /* exception address */
1650 data_size_t len; /* size of parameters */
1651 VARARG(params,uints64,len);/* exception parameters */
1652 @REPLY
1653 obj_handle_t handle; /* handle to the queued event */
1654 @END
1657 /* Retrieve the status of an exception event */
1658 @REQ(get_exception_status)
1659 obj_handle_t handle; /* handle to the queued event */
1660 @END
1663 /* Continue a debug event */
1664 @REQ(continue_debug_event)
1665 obj_handle_t debug; /* debug object */
1666 process_id_t pid; /* process id to continue */
1667 thread_id_t tid; /* thread id to continue */
1668 unsigned int status; /* continuation status */
1669 @END
1672 /* Start or stop debugging an existing process */
1673 @REQ(debug_process)
1674 obj_handle_t handle; /* process handle */
1675 obj_handle_t debug; /* debug object to attach to the process */
1676 int attach; /* 1=attaching / 0=detaching from the process */
1677 @END
1680 /* Set debug object information */
1681 @REQ(set_debug_obj_info)
1682 obj_handle_t debug; /* debug object */
1683 unsigned int flags; /* object flags */
1684 @END
1687 /* Read data from a process address space */
1688 @REQ(read_process_memory)
1689 obj_handle_t handle; /* process handle */
1690 client_ptr_t addr; /* addr to read from */
1691 @REPLY
1692 VARARG(data,bytes); /* result data */
1693 @END
1696 /* Write data to a process address space */
1697 @REQ(write_process_memory)
1698 obj_handle_t handle; /* process handle */
1699 client_ptr_t addr; /* addr to write to */
1700 VARARG(data,bytes); /* data to write */
1701 @END
1704 /* Create a registry key */
1705 @REQ(create_key)
1706 unsigned int access; /* desired access rights */
1707 unsigned int options; /* creation options */
1708 VARARG(objattr,object_attributes); /* object attributes */
1709 VARARG(class,unicode_str); /* class name */
1710 @REPLY
1711 obj_handle_t hkey; /* handle to the created key */
1712 int created; /* has it been newly created? */
1713 @END
1715 /* Open a registry key */
1716 @REQ(open_key)
1717 obj_handle_t parent; /* handle to the parent key */
1718 unsigned int access; /* desired access rights */
1719 unsigned int attributes; /* object attributes */
1720 VARARG(name,unicode_str); /* key name */
1721 @REPLY
1722 obj_handle_t hkey; /* handle to the open key */
1723 @END
1726 /* Delete a registry key */
1727 @REQ(delete_key)
1728 obj_handle_t hkey; /* handle to the key */
1729 @END
1732 /* Flush a registry key */
1733 @REQ(flush_key)
1734 obj_handle_t hkey; /* handle to the key */
1735 @END
1738 /* Enumerate registry subkeys */
1739 @REQ(enum_key)
1740 obj_handle_t hkey; /* handle to registry key */
1741 int index; /* index of subkey (or -1 for current key) */
1742 int info_class; /* requested information class */
1743 @REPLY
1744 int subkeys; /* number of subkeys */
1745 int max_subkey; /* longest subkey name */
1746 int max_class; /* longest class name */
1747 int values; /* number of values */
1748 int max_value; /* longest value name */
1749 int max_data; /* longest value data */
1750 timeout_t modif; /* last modification time */
1751 data_size_t total; /* total length needed for full name and class */
1752 data_size_t namelen; /* length of key name in bytes */
1753 VARARG(name,unicode_str,namelen); /* key name */
1754 VARARG(class,unicode_str); /* class name */
1755 @END
1758 /* Set a value of a registry key */
1759 @REQ(set_key_value)
1760 obj_handle_t hkey; /* handle to registry key */
1761 int type; /* value type */
1762 data_size_t namelen; /* length of value name in bytes */
1763 VARARG(name,unicode_str,namelen); /* value name */
1764 VARARG(data,bytes); /* value data */
1765 @END
1768 /* Retrieve the value of a registry key */
1769 @REQ(get_key_value)
1770 obj_handle_t hkey; /* handle to registry key */
1771 VARARG(name,unicode_str); /* value name */
1772 @REPLY
1773 int type; /* value type */
1774 data_size_t total; /* total length needed for data */
1775 VARARG(data,bytes); /* value data */
1776 @END
1779 /* Enumerate a value of a registry key */
1780 @REQ(enum_key_value)
1781 obj_handle_t hkey; /* handle to registry key */
1782 int index; /* value index */
1783 int info_class; /* requested information class */
1784 @REPLY
1785 int type; /* value type */
1786 data_size_t total; /* total length needed for full name and data */
1787 data_size_t namelen; /* length of value name in bytes */
1788 VARARG(name,unicode_str,namelen); /* value name */
1789 VARARG(data,bytes); /* value data */
1790 @END
1793 /* Delete a value of a registry key */
1794 @REQ(delete_key_value)
1795 obj_handle_t hkey; /* handle to registry key */
1796 VARARG(name,unicode_str); /* value name */
1797 @END
1800 /* Load a registry branch from a file */
1801 @REQ(load_registry)
1802 obj_handle_t file; /* file to load from */
1803 VARARG(objattr,object_attributes); /* object attributes */
1804 @END
1807 /* UnLoad a registry branch from a file */
1808 @REQ(unload_registry)
1809 obj_handle_t parent; /* handle to the parent key */
1810 unsigned int attributes; /* object attributes */
1811 VARARG(name,unicode_str); /* key name */
1812 @END
1815 /* Save a registry branch to a file */
1816 @REQ(save_registry)
1817 obj_handle_t hkey; /* key to save */
1818 obj_handle_t file; /* file to save to */
1819 @END
1822 /* Add a registry key change notification */
1823 @REQ(set_registry_notification)
1824 obj_handle_t hkey; /* key to watch for changes */
1825 obj_handle_t event; /* event to set */
1826 int subtree; /* should we watch the whole subtree? */
1827 unsigned int filter; /* things to watch */
1828 @END
1831 /* Create a waitable timer */
1832 @REQ(create_timer)
1833 unsigned int access; /* wanted access rights */
1834 int manual; /* manual reset */
1835 VARARG(objattr,object_attributes); /* object attributes */
1836 @REPLY
1837 obj_handle_t handle; /* handle to the timer */
1838 @END
1841 /* Open a waitable timer */
1842 @REQ(open_timer)
1843 unsigned int access; /* wanted access rights */
1844 unsigned int attributes; /* object attributes */
1845 obj_handle_t rootdir; /* root directory */
1846 VARARG(name,unicode_str); /* object name */
1847 @REPLY
1848 obj_handle_t handle; /* handle to the timer */
1849 @END
1851 /* Set a waitable timer */
1852 @REQ(set_timer)
1853 obj_handle_t handle; /* handle to the timer */
1854 timeout_t expire; /* next expiration absolute time */
1855 client_ptr_t callback; /* callback function */
1856 client_ptr_t arg; /* callback argument */
1857 int period; /* timer period in ms */
1858 @REPLY
1859 int signaled; /* was the timer signaled before this call ? */
1860 @END
1862 /* Cancel a waitable timer */
1863 @REQ(cancel_timer)
1864 obj_handle_t handle; /* handle to the timer */
1865 @REPLY
1866 int signaled; /* was the timer signaled before this calltime ? */
1867 @END
1869 /* Get information on a waitable timer */
1870 @REQ(get_timer_info)
1871 obj_handle_t handle; /* handle to the timer */
1872 @REPLY
1873 timeout_t when; /* absolute time when the timer next expires */
1874 int signaled; /* is the timer signaled? */
1875 @END
1878 /* Retrieve the current context of a thread */
1879 @REQ(get_thread_context)
1880 obj_handle_t handle; /* thread or context handle */
1881 unsigned int flags; /* context flags */
1882 @REPLY
1883 int self; /* was it a handle to the current thread? */
1884 obj_handle_t handle; /* pending context handle */
1885 VARARG(context,context); /* thread context */
1886 @END
1889 /* Set the current context of a thread */
1890 @REQ(set_thread_context)
1891 obj_handle_t handle; /* thread handle */
1892 VARARG(context,context); /* thread context */
1893 @REPLY
1894 int self; /* was it a handle to the current thread? */
1895 @END
1898 /* Fetch a selector entry for a thread */
1899 @REQ(get_selector_entry)
1900 obj_handle_t handle; /* thread handle */
1901 int entry; /* LDT entry */
1902 @REPLY
1903 unsigned int base; /* selector base */
1904 unsigned int limit; /* selector limit */
1905 unsigned char flags; /* selector flags */
1906 @END
1909 /* Add an atom */
1910 @REQ(add_atom)
1911 VARARG(name,unicode_str); /* atom name */
1912 @REPLY
1913 atom_t atom; /* resulting atom */
1914 @END
1917 /* Delete an atom */
1918 @REQ(delete_atom)
1919 atom_t atom; /* atom handle */
1920 @END
1923 /* Find an atom */
1924 @REQ(find_atom)
1925 VARARG(name,unicode_str); /* atom name */
1926 @REPLY
1927 atom_t atom; /* atom handle */
1928 @END
1931 /* Get information about an atom */
1932 @REQ(get_atom_information)
1933 atom_t atom; /* atom handle */
1934 @REPLY
1935 int count; /* atom lock count */
1936 int pinned; /* whether the atom has been pinned */
1937 data_size_t total; /* actual length of atom name */
1938 VARARG(name,unicode_str); /* atom name */
1939 @END
1942 /* Get the message queue of the current thread */
1943 @REQ(get_msg_queue)
1944 @REPLY
1945 obj_handle_t handle; /* handle to the queue */
1946 @END
1949 /* Set the file descriptor associated to the current thread queue */
1950 @REQ(set_queue_fd)
1951 obj_handle_t handle; /* handle to the file descriptor */
1952 @END
1955 /* Set the current message queue wakeup mask */
1956 @REQ(set_queue_mask)
1957 unsigned int wake_mask; /* wakeup bits mask */
1958 unsigned int changed_mask; /* changed bits mask */
1959 int skip_wait; /* will we skip waiting if signaled? */
1960 @REPLY
1961 unsigned int wake_bits; /* current wake bits */
1962 unsigned int changed_bits; /* current changed bits */
1963 @END
1966 /* Get the current message queue status */
1967 @REQ(get_queue_status)
1968 unsigned int clear_bits; /* should we clear the change bits? */
1969 @REPLY
1970 unsigned int wake_bits; /* wake bits */
1971 unsigned int changed_bits; /* changed bits since last time */
1972 @END
1975 /* Retrieve the process idle event */
1976 @REQ(get_process_idle_event)
1977 obj_handle_t handle; /* process handle */
1978 @REPLY
1979 obj_handle_t event; /* handle to idle event */
1980 @END
1983 /* Send a message to a thread queue */
1984 @REQ(send_message)
1985 thread_id_t id; /* thread id */
1986 int type; /* message type (see below) */
1987 int flags; /* message flags (see below) */
1988 user_handle_t win; /* window handle */
1989 unsigned int msg; /* message code */
1990 lparam_t wparam; /* parameters */
1991 lparam_t lparam; /* parameters */
1992 timeout_t timeout; /* timeout for reply */
1993 VARARG(data,message_data); /* message data for sent messages */
1994 @END
1996 @REQ(post_quit_message)
1997 int exit_code; /* exit code to return */
1998 @END
2000 enum message_type
2002 MSG_ASCII, /* Ascii message (from SendMessageA) */
2003 MSG_UNICODE, /* Unicode message (from SendMessageW) */
2004 MSG_NOTIFY, /* notify message (from SendNotifyMessageW), always Unicode */
2005 MSG_CALLBACK, /* callback message (from SendMessageCallbackW), always Unicode */
2006 MSG_CALLBACK_RESULT,/* result of a callback message */
2007 MSG_OTHER_PROCESS, /* sent from other process, may include vararg data, always Unicode */
2008 MSG_POSTED, /* posted message (from PostMessageW), always Unicode */
2009 MSG_HARDWARE, /* hardware message */
2010 MSG_WINEVENT, /* winevent message */
2011 MSG_HOOK_LL /* low-level hardware hook */
2013 #define SEND_MSG_ABORT_IF_HUNG 0x01
2016 /* Send a hardware message to a thread queue */
2017 @REQ(send_hardware_message)
2018 user_handle_t win; /* window handle */
2019 hw_input_t input; /* input data */
2020 unsigned int flags; /* flags (see below) */
2021 @REPLY
2022 int wait; /* do we need to wait for a reply? */
2023 int prev_x; /* previous cursor position */
2024 int prev_y;
2025 int new_x; /* new cursor position */
2026 int new_y;
2027 VARARG(keystate,bytes); /* global state array for all the keys */
2028 @END
2029 #define SEND_HWMSG_INJECTED 0x01
2032 /* Get a message from the current queue */
2033 @REQ(get_message)
2034 unsigned int flags; /* PM_* flags */
2035 user_handle_t get_win; /* window handle to get */
2036 unsigned int get_first; /* first message code to get */
2037 unsigned int get_last; /* last message code to get */
2038 unsigned int hw_id; /* id of the previous hardware message (or 0) */
2039 unsigned int wake_mask; /* wakeup bits mask */
2040 unsigned int changed_mask; /* changed bits mask */
2041 @REPLY
2042 user_handle_t win; /* window handle */
2043 unsigned int msg; /* message code */
2044 lparam_t wparam; /* parameters */
2045 lparam_t lparam; /* parameters */
2046 int type; /* message type */
2047 int x; /* message x position */
2048 int y; /* message y position */
2049 unsigned int time; /* message time */
2050 unsigned int active_hooks; /* active hooks bitmap */
2051 data_size_t total; /* total size of extra data */
2052 VARARG(data,message_data); /* message data for sent messages */
2053 @END
2056 /* Reply to a sent message */
2057 @REQ(reply_message)
2058 int remove; /* should we remove the message? */
2059 lparam_t result; /* message result */
2060 VARARG(data,bytes); /* message data for sent messages */
2061 @END
2064 /* Accept and remove the current hardware message */
2065 @REQ(accept_hardware_message)
2066 unsigned int hw_id; /* id of the hardware message */
2067 @END
2070 /* Retrieve the reply for the last message sent */
2071 @REQ(get_message_reply)
2072 int cancel; /* cancel message if not ready? */
2073 @REPLY
2074 lparam_t result; /* message result */
2075 VARARG(data,bytes); /* message data for sent messages */
2076 @END
2079 /* Set a window timer */
2080 @REQ(set_win_timer)
2081 user_handle_t win; /* window handle */
2082 unsigned int msg; /* message to post */
2083 unsigned int rate; /* timer rate in ms */
2084 lparam_t id; /* timer id */
2085 lparam_t lparam; /* message lparam (callback proc) */
2086 @REPLY
2087 lparam_t id; /* timer id */
2088 @END
2091 /* Kill a window timer */
2092 @REQ(kill_win_timer)
2093 user_handle_t win; /* window handle */
2094 lparam_t id; /* timer id */
2095 unsigned int msg; /* message to post */
2096 @END
2099 /* check if the thread owning the window is hung */
2100 @REQ(is_window_hung)
2101 user_handle_t win; /* window handle */
2102 @REPLY
2103 int is_hung;
2104 @END
2107 /* Retrieve info about a serial port */
2108 @REQ(get_serial_info)
2109 obj_handle_t handle; /* handle to comm port */
2110 int flags;
2111 @REPLY
2112 unsigned int eventmask;
2113 unsigned int cookie;
2114 unsigned int pending_write;
2115 @END
2118 /* Set info about a serial port */
2119 @REQ(set_serial_info)
2120 obj_handle_t handle; /* handle to comm port */
2121 int flags; /* bitmask to set values (see below) */
2122 @END
2123 #define SERIALINFO_PENDING_WRITE 0x04
2124 #define SERIALINFO_PENDING_WAIT 0x08
2127 /* Create an async I/O */
2128 @REQ(register_async)
2129 int type; /* type of queue to look after */
2130 async_data_t async; /* async I/O parameters */
2131 int count; /* count - usually # of bytes to be read/written */
2132 @END
2133 #define ASYNC_TYPE_READ 0x01
2134 #define ASYNC_TYPE_WRITE 0x02
2135 #define ASYNC_TYPE_WAIT 0x03
2138 /* Cancel all async op on a fd */
2139 @REQ(cancel_async)
2140 obj_handle_t handle; /* handle to comm port, socket or file */
2141 client_ptr_t iosb; /* I/O status block (NULL=all) */
2142 int only_thread; /* cancel matching this thread */
2143 @END
2146 /* Retrieve results of an async */
2147 @REQ(get_async_result)
2148 client_ptr_t user_arg; /* user arg used to identify async */
2149 @REPLY
2150 data_size_t size; /* result size (input or output depending on the operation) */
2151 VARARG(out_data,bytes); /* iosb output data */
2152 @END
2155 /* Perform a read on a file object */
2156 @REQ(read)
2157 async_data_t async; /* async I/O parameters */
2158 file_pos_t pos; /* read position */
2159 @REPLY
2160 obj_handle_t wait; /* handle to wait on for blocking read */
2161 unsigned int options; /* device open options */
2162 VARARG(data,bytes); /* read data */
2163 @END
2166 /* Perform a write on a file object */
2167 @REQ(write)
2168 async_data_t async; /* async I/O parameters */
2169 file_pos_t pos; /* write position */
2170 VARARG(data,bytes); /* write data */
2171 @REPLY
2172 obj_handle_t wait; /* handle to wait on for blocking write */
2173 unsigned int options; /* device open options */
2174 data_size_t size; /* size written */
2175 @END
2178 /* Perform an ioctl on a file */
2179 @REQ(ioctl)
2180 ioctl_code_t code; /* ioctl code */
2181 async_data_t async; /* async I/O parameters */
2182 VARARG(in_data,bytes); /* ioctl input data */
2183 @REPLY
2184 obj_handle_t wait; /* handle to wait on for blocking ioctl */
2185 unsigned int options; /* device open options */
2186 VARARG(out_data,bytes); /* ioctl output data */
2187 @END
2190 /* Store results of an async irp */
2191 @REQ(set_irp_result)
2192 obj_handle_t handle; /* handle to the irp */
2193 unsigned int status; /* status of the irp */
2194 data_size_t size; /* result size (input or output depending on the operation) */
2195 VARARG(data,bytes); /* output data of the irp */
2196 @END
2199 /* Create a named pipe */
2200 @REQ(create_named_pipe)
2201 unsigned int access;
2202 unsigned int options;
2203 unsigned int sharing;
2204 unsigned int maxinstances;
2205 unsigned int outsize;
2206 unsigned int insize;
2207 timeout_t timeout;
2208 unsigned int flags;
2209 VARARG(objattr,object_attributes); /* object attributes */
2210 @REPLY
2211 obj_handle_t handle; /* handle to the pipe */
2212 @END
2214 /* flags in create_named_pipe and get_named_pipe_info */
2215 #define NAMED_PIPE_MESSAGE_STREAM_WRITE 0x0001
2216 #define NAMED_PIPE_MESSAGE_STREAM_READ 0x0002
2217 #define NAMED_PIPE_NONBLOCKING_MODE 0x0004
2218 #define NAMED_PIPE_SERVER_END 0x8000
2220 /* Set named pipe information by handle */
2221 @REQ(set_named_pipe_info)
2222 obj_handle_t handle;
2223 unsigned int flags;
2224 @END
2226 /* Create a window */
2227 @REQ(create_window)
2228 user_handle_t parent; /* parent window */
2229 user_handle_t owner; /* owner window */
2230 atom_t atom; /* class atom */
2231 mod_handle_t instance; /* module instance */
2232 int dpi; /* system DPI */
2233 int awareness; /* thread DPI awareness */
2234 VARARG(class,unicode_str); /* class name */
2235 @REPLY
2236 user_handle_t handle; /* created window */
2237 user_handle_t parent; /* full handle of parent */
2238 user_handle_t owner; /* full handle of owner */
2239 int extra; /* number of extra bytes */
2240 client_ptr_t class_ptr; /* pointer to class in client address space */
2241 int dpi; /* window DPI if not per-monitor aware */
2242 int awareness; /* window DPI awareness */
2243 @END
2246 /* Destroy a window */
2247 @REQ(destroy_window)
2248 user_handle_t handle; /* handle to the window */
2249 @END
2252 /* Retrieve the desktop window for the current thread */
2253 @REQ(get_desktop_window)
2254 int force; /* force creation if it doesn't exist */
2255 @REPLY
2256 user_handle_t top_window; /* handle to the desktop window */
2257 user_handle_t msg_window; /* handle to the top-level HWND_MESSAGE parent */
2258 @END
2261 /* Set a window owner */
2262 @REQ(set_window_owner)
2263 user_handle_t handle; /* handle to the window */
2264 user_handle_t owner; /* new owner */
2265 @REPLY
2266 user_handle_t full_owner; /* full handle of new owner */
2267 user_handle_t prev_owner; /* full handle of previous owner */
2268 @END
2271 /* Get information from a window handle */
2272 @REQ(get_window_info)
2273 user_handle_t handle; /* handle to the window */
2274 @REPLY
2275 user_handle_t full_handle; /* full 32-bit handle */
2276 user_handle_t last_active; /* last active popup */
2277 process_id_t pid; /* process owning the window */
2278 thread_id_t tid; /* thread owning the window */
2279 atom_t atom; /* class atom */
2280 int is_unicode; /* ANSI or unicode */
2281 int dpi; /* window DPI */
2282 int awareness; /* DPI awareness */
2283 @END
2286 /* Set some information in a window */
2287 @REQ(set_window_info)
2288 unsigned short flags; /* flags for fields to set (see below) */
2289 short int is_unicode; /* ANSI or unicode */
2290 user_handle_t handle; /* handle to the window */
2291 unsigned int style; /* window style */
2292 unsigned int ex_style; /* window extended style */
2293 unsigned int id; /* window id */
2294 mod_handle_t instance; /* creator instance */
2295 lparam_t user_data; /* user-specific data */
2296 int extra_offset; /* offset to set in extra bytes */
2297 data_size_t extra_size; /* size to set in extra bytes */
2298 lparam_t extra_value; /* value to set in extra bytes */
2299 @REPLY
2300 unsigned int old_style; /* old window style */
2301 unsigned int old_ex_style; /* old window extended style */
2302 mod_handle_t old_instance; /* old creator instance */
2303 lparam_t old_user_data; /* old user-specific data */
2304 lparam_t old_extra_value; /* old value in extra bytes */
2305 unsigned int old_id; /* old window id */
2306 @END
2307 #define SET_WIN_STYLE 0x01
2308 #define SET_WIN_EXSTYLE 0x02
2309 #define SET_WIN_ID 0x04
2310 #define SET_WIN_INSTANCE 0x08
2311 #define SET_WIN_USERDATA 0x10
2312 #define SET_WIN_EXTRA 0x20
2313 #define SET_WIN_UNICODE 0x40
2316 /* Set the parent of a window */
2317 @REQ(set_parent)
2318 user_handle_t handle; /* handle to the window */
2319 user_handle_t parent; /* handle to the parent */
2320 @REPLY
2321 user_handle_t old_parent; /* old parent window */
2322 user_handle_t full_parent; /* full handle of new parent */
2323 int dpi; /* new window DPI if not per-monitor aware */
2324 int awareness; /* new DPI awareness */
2325 @END
2328 /* Get a list of the window parents, up to the root of the tree */
2329 @REQ(get_window_parents)
2330 user_handle_t handle; /* handle to the window */
2331 @REPLY
2332 int count; /* total count of parents */
2333 VARARG(parents,user_handles); /* parent handles */
2334 @END
2337 /* Get a list of the window children */
2338 @REQ(get_window_children)
2339 obj_handle_t desktop; /* handle to desktop */
2340 user_handle_t parent; /* parent window */
2341 atom_t atom; /* class atom for the listed children */
2342 thread_id_t tid; /* thread owning the listed children */
2343 VARARG(class,unicode_str); /* class name */
2344 @REPLY
2345 int count; /* total count of children */
2346 VARARG(children,user_handles); /* children handles */
2347 @END
2350 /* Get a list of the window children that contain a given point */
2351 @REQ(get_window_children_from_point)
2352 user_handle_t parent; /* parent window */
2353 int x; /* point in parent coordinates */
2354 int y;
2355 int dpi; /* dpi for the point coordinates */
2356 @REPLY
2357 int count; /* total count of children */
2358 VARARG(children,user_handles); /* children handles */
2359 @END
2362 /* Get window tree information from a window handle */
2363 @REQ(get_window_tree)
2364 user_handle_t handle; /* handle to the window */
2365 @REPLY
2366 user_handle_t parent; /* parent window */
2367 user_handle_t owner; /* owner window */
2368 user_handle_t next_sibling; /* next sibling in Z-order */
2369 user_handle_t prev_sibling; /* prev sibling in Z-order */
2370 user_handle_t first_sibling; /* first sibling in Z-order */
2371 user_handle_t last_sibling; /* last sibling in Z-order */
2372 user_handle_t first_child; /* first child */
2373 user_handle_t last_child; /* last child */
2374 @END
2376 /* Set the position and Z order of a window */
2377 @REQ(set_window_pos)
2378 unsigned short swp_flags; /* SWP_* flags */
2379 unsigned short paint_flags; /* paint flags (see below) */
2380 user_handle_t handle; /* handle to the window */
2381 user_handle_t previous; /* previous window in Z order */
2382 rectangle_t window; /* window rectangle (in parent coords) */
2383 rectangle_t client; /* client rectangle (in parent coords) */
2384 VARARG(valid,rectangles); /* valid rectangles from WM_NCCALCSIZE (in parent coords) */
2385 @REPLY
2386 unsigned int new_style; /* new window style */
2387 unsigned int new_ex_style; /* new window extended style */
2388 user_handle_t surface_win; /* parent window that holds the surface */
2389 int needs_update; /* whether the surface region needs an update */
2390 @END
2391 #define SET_WINPOS_PAINT_SURFACE 0x01 /* window has a paintable surface */
2392 #define SET_WINPOS_PIXEL_FORMAT 0x02 /* window has a custom pixel format */
2394 /* Get the window and client rectangles of a window */
2395 @REQ(get_window_rectangles)
2396 user_handle_t handle; /* handle to the window */
2397 int relative; /* coords relative to (see below) */
2398 int dpi; /* DPI to map to, or zero for per-monitor DPI */
2399 @REPLY
2400 rectangle_t window; /* window rectangle */
2401 rectangle_t client; /* client rectangle */
2402 @END
2403 enum coords_relative
2405 COORDS_CLIENT, /* relative to client area */
2406 COORDS_WINDOW, /* relative to whole window area */
2407 COORDS_PARENT, /* relative to parent's client area */
2408 COORDS_SCREEN /* relative to screen origin */
2412 /* Get the window text */
2413 @REQ(get_window_text)
2414 user_handle_t handle; /* handle to the window */
2415 @REPLY
2416 data_size_t length; /* total length in WCHARs */
2417 VARARG(text,unicode_str); /* window text */
2418 @END
2421 /* Set the window text */
2422 @REQ(set_window_text)
2423 user_handle_t handle; /* handle to the window */
2424 VARARG(text,unicode_str); /* window text */
2425 @END
2428 /* Get the coordinates offset between two windows */
2429 @REQ(get_windows_offset)
2430 user_handle_t from; /* handle to the first window */
2431 user_handle_t to; /* handle to the second window */
2432 int dpi; /* DPI to map to, or zero for per-monitor DPI */
2433 @REPLY
2434 int x; /* x coordinate offset */
2435 int y; /* y coordinate offset */
2436 int mirror; /* whether to mirror the x coordinate */
2437 @END
2440 /* Get the visible region of a window */
2441 @REQ(get_visible_region)
2442 user_handle_t window; /* handle to the window */
2443 unsigned int flags; /* DCX flags */
2444 @REPLY
2445 user_handle_t top_win; /* top window to clip against */
2446 rectangle_t top_rect; /* top window visible rect with screen coords */
2447 rectangle_t win_rect; /* window rect in screen coords */
2448 unsigned int paint_flags; /* paint flags (from SET_WINPOS_* flags) */
2449 data_size_t total_size; /* total size of the resulting region */
2450 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2451 @END
2454 /* Get the visible surface region of a window */
2455 @REQ(get_surface_region)
2456 user_handle_t window; /* handle to the window */
2457 @REPLY
2458 rectangle_t visible_rect; /* window visible rect in screen coords */
2459 data_size_t total_size; /* total size of the resulting region */
2460 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2461 @END
2464 /* Get the window region */
2465 @REQ(get_window_region)
2466 user_handle_t window; /* handle to the window */
2467 @REPLY
2468 data_size_t total_size; /* total size of the resulting region */
2469 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2470 @END
2473 /* Set the window region */
2474 @REQ(set_window_region)
2475 user_handle_t window; /* handle to the window */
2476 int redraw; /* redraw the window? */
2477 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2478 @END
2481 /* Get the window update region */
2482 @REQ(get_update_region)
2483 user_handle_t window; /* handle to the window */
2484 user_handle_t from_child; /* child to start searching from */
2485 unsigned int flags; /* update flags (see below) */
2486 @REPLY
2487 user_handle_t child; /* child to repaint (or window itself) */
2488 unsigned int flags; /* resulting update flags (see below) */
2489 data_size_t total_size; /* total size of the resulting region */
2490 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2491 @END
2492 #define UPDATE_NONCLIENT 0x001 /* get region for repainting non-client area */
2493 #define UPDATE_ERASE 0x002 /* get region for erasing client area */
2494 #define UPDATE_PAINT 0x004 /* get region for painting client area */
2495 #define UPDATE_INTERNALPAINT 0x008 /* get region if internal paint is pending */
2496 #define UPDATE_ALLCHILDREN 0x010 /* force repaint of all children */
2497 #define UPDATE_NOCHILDREN 0x020 /* don't try to repaint any children */
2498 #define UPDATE_NOREGION 0x040 /* don't return a region, only the flags */
2499 #define UPDATE_DELAYED_ERASE 0x080 /* still needs erase after BeginPaint */
2500 #define UPDATE_CLIPCHILDREN 0x100 /* remove clipped children from the update region */
2503 /* Update the z order of a window so that a given rectangle is fully visible */
2504 @REQ(update_window_zorder)
2505 user_handle_t window; /* handle to the window */
2506 rectangle_t rect; /* rectangle that must be visible (in client coords) */
2507 @END
2510 /* Mark parts of a window as needing a redraw */
2511 @REQ(redraw_window)
2512 user_handle_t window; /* handle to the window */
2513 unsigned int flags; /* RDW_* flags */
2514 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2515 @END
2518 /* Set a window property */
2519 @REQ(set_window_property)
2520 user_handle_t window; /* handle to the window */
2521 lparam_t data; /* data to store */
2522 atom_t atom; /* property atom (if no name specified) */
2523 VARARG(name,unicode_str); /* property name */
2524 @END
2527 /* Remove a window property */
2528 @REQ(remove_window_property)
2529 user_handle_t window; /* handle to the window */
2530 atom_t atom; /* property atom (if no name specified) */
2531 VARARG(name,unicode_str); /* property name */
2532 @REPLY
2533 lparam_t data; /* data stored in property */
2534 @END
2537 /* Get a window property */
2538 @REQ(get_window_property)
2539 user_handle_t window; /* handle to the window */
2540 atom_t atom; /* property atom (if no name specified) */
2541 VARARG(name,unicode_str); /* property name */
2542 @REPLY
2543 lparam_t data; /* data stored in property */
2544 @END
2547 /* Get the list of properties of a window */
2548 @REQ(get_window_properties)
2549 user_handle_t window; /* handle to the window */
2550 @REPLY
2551 int total; /* total number of properties */
2552 VARARG(props,properties); /* list of properties */
2553 @END
2556 /* Create a window station */
2557 @REQ(create_winstation)
2558 unsigned int flags; /* window station flags */
2559 unsigned int access; /* wanted access rights */
2560 unsigned int attributes; /* object attributes */
2561 obj_handle_t rootdir; /* root directory */
2562 VARARG(name,unicode_str); /* object name */
2563 @REPLY
2564 obj_handle_t handle; /* handle to the window station */
2565 @END
2568 /* Open a handle to a window station */
2569 @REQ(open_winstation)
2570 unsigned int access; /* wanted access rights */
2571 unsigned int attributes; /* object attributes */
2572 obj_handle_t rootdir; /* root directory */
2573 VARARG(name,unicode_str); /* object name */
2574 @REPLY
2575 obj_handle_t handle; /* handle to the window station */
2576 @END
2579 /* Close a window station */
2580 @REQ(close_winstation)
2581 obj_handle_t handle; /* handle to the window station */
2582 @END
2585 /* Get the process current window station */
2586 @REQ(get_process_winstation)
2587 @REPLY
2588 obj_handle_t handle; /* handle to the window station */
2589 @END
2592 /* Set the process current window station */
2593 @REQ(set_process_winstation)
2594 obj_handle_t handle; /* handle to the window station */
2595 @END
2598 /* Enumerate window stations */
2599 @REQ(enum_winstation)
2600 unsigned int index; /* current index */
2601 @REPLY
2602 unsigned int next; /* next index */
2603 VARARG(name,unicode_str); /* window station name */
2604 @END
2607 /* Create a desktop */
2608 @REQ(create_desktop)
2609 unsigned int flags; /* desktop flags */
2610 unsigned int access; /* wanted access rights */
2611 unsigned int attributes; /* object attributes */
2612 VARARG(name,unicode_str); /* object name */
2613 @REPLY
2614 obj_handle_t handle; /* handle to the desktop */
2615 @END
2618 /* Open a handle to a desktop */
2619 @REQ(open_desktop)
2620 obj_handle_t winsta; /* window station to open (null allowed) */
2621 unsigned int flags; /* desktop flags */
2622 unsigned int access; /* wanted access rights */
2623 unsigned int attributes; /* object attributes */
2624 VARARG(name,unicode_str); /* object name */
2625 @REPLY
2626 obj_handle_t handle; /* handle to the desktop */
2627 @END
2630 /* Open a handle to current input desktop */
2631 @REQ(open_input_desktop)
2632 unsigned int flags; /* desktop flags */
2633 unsigned int access; /* wanted access rights */
2634 unsigned int attributes; /* object attributes */
2635 @REPLY
2636 obj_handle_t handle; /* handle to the desktop */
2637 @END
2640 /* Close a desktop */
2641 @REQ(close_desktop)
2642 obj_handle_t handle; /* handle to the desktop */
2643 @END
2646 /* Get the thread current desktop */
2647 @REQ(get_thread_desktop)
2648 thread_id_t tid; /* thread id */
2649 @REPLY
2650 obj_handle_t handle; /* handle to the desktop */
2651 @END
2654 /* Set the thread current desktop */
2655 @REQ(set_thread_desktop)
2656 obj_handle_t handle; /* handle to the desktop */
2657 @END
2660 /* Enumerate desktops */
2661 @REQ(enum_desktop)
2662 obj_handle_t winstation; /* handle to the window station */
2663 unsigned int index; /* current index */
2664 @REPLY
2665 unsigned int next; /* next index */
2666 VARARG(name,unicode_str); /* window station name */
2667 @END
2670 /* Get/set information about a user object (window station or desktop) */
2671 @REQ(set_user_object_info)
2672 obj_handle_t handle; /* handle to the object */
2673 unsigned int flags; /* information to set/get */
2674 unsigned int obj_flags; /* new object flags */
2675 @REPLY
2676 int is_desktop; /* is object a desktop? */
2677 unsigned int old_obj_flags; /* old object flags */
2678 VARARG(name,unicode_str); /* object name */
2679 @END
2680 #define SET_USER_OBJECT_SET_FLAGS 1
2681 #define SET_USER_OBJECT_GET_FULL_NAME 2
2684 /* Register a hotkey */
2685 @REQ(register_hotkey)
2686 user_handle_t window; /* handle to the window */
2687 int id; /* hotkey identifier */
2688 unsigned int flags; /* modifier keys */
2689 unsigned int vkey; /* virtual key code */
2690 @REPLY
2691 int replaced; /* did we replace an existing hotkey? */
2692 unsigned int flags; /* flags of replaced hotkey */
2693 unsigned int vkey; /* virtual key code of replaced hotkey */
2694 @END
2697 /* Unregister a hotkey */
2698 @REQ(unregister_hotkey)
2699 user_handle_t window; /* handle to the window */
2700 int id; /* hotkey identifier */
2701 @REPLY
2702 unsigned int flags; /* flags of removed hotkey */
2703 unsigned int vkey; /* virtual key code of removed hotkey */
2704 @END
2707 /* Attach (or detach) thread inputs */
2708 @REQ(attach_thread_input)
2709 thread_id_t tid_from; /* thread to be attached */
2710 thread_id_t tid_to; /* thread to which tid_from should be attached */
2711 int attach; /* is it an attach? */
2712 @END
2715 /* Get input data for a given thread */
2716 @REQ(get_thread_input)
2717 thread_id_t tid; /* id of thread */
2718 @REPLY
2719 user_handle_t focus; /* handle to the focus window */
2720 user_handle_t capture; /* handle to the capture window */
2721 user_handle_t active; /* handle to the active window */
2722 user_handle_t foreground; /* handle to the global foreground window */
2723 user_handle_t menu_owner; /* handle to the menu owner */
2724 user_handle_t move_size; /* handle to the moving/resizing window */
2725 user_handle_t caret; /* handle to the caret window */
2726 user_handle_t cursor; /* handle to the cursor */
2727 int show_count; /* cursor show count */
2728 rectangle_t rect; /* caret rectangle */
2729 @END
2732 /* Get the time of the last input event */
2733 @REQ(get_last_input_time)
2734 @REPLY
2735 unsigned int time;
2736 @END
2739 /* Retrieve queue keyboard state for current thread or global async state */
2740 @REQ(get_key_state)
2741 int async; /* whether to query the async state */
2742 int key; /* optional key code or -1 */
2743 @REPLY
2744 unsigned char state; /* state of specified key */
2745 VARARG(keystate,bytes); /* state array for all the keys */
2746 @END
2748 /* Set queue keyboard state for current thread */
2749 @REQ(set_key_state)
2750 int async; /* whether to change the async state too */
2751 VARARG(keystate,bytes); /* state array for all the keys */
2752 @END
2754 /* Set the system foreground window */
2755 @REQ(set_foreground_window)
2756 user_handle_t handle; /* handle to the foreground window */
2757 @REPLY
2758 user_handle_t previous; /* handle to the previous foreground window */
2759 int send_msg_old; /* whether we have to send a msg to the old window */
2760 int send_msg_new; /* whether we have to send a msg to the new window */
2761 @END
2763 /* Set the current thread focus window */
2764 @REQ(set_focus_window)
2765 user_handle_t handle; /* handle to the focus window */
2766 @REPLY
2767 user_handle_t previous; /* handle to the previous focus window */
2768 @END
2770 /* Set the current thread active window */
2771 @REQ(set_active_window)
2772 user_handle_t handle; /* handle to the active window */
2773 @REPLY
2774 user_handle_t previous; /* handle to the previous active window */
2775 @END
2777 /* Set the current thread capture window */
2778 @REQ(set_capture_window)
2779 user_handle_t handle; /* handle to the capture window */
2780 unsigned int flags; /* capture flags (see below) */
2781 @REPLY
2782 user_handle_t previous; /* handle to the previous capture window */
2783 user_handle_t full_handle; /* full 32-bit handle of new capture window */
2784 @END
2785 #define CAPTURE_MENU 0x01 /* capture is for a menu */
2786 #define CAPTURE_MOVESIZE 0x02 /* capture is for moving/resizing */
2789 /* Set the current thread caret window */
2790 @REQ(set_caret_window)
2791 user_handle_t handle; /* handle to the caret window */
2792 int width; /* caret width */
2793 int height; /* caret height */
2794 @REPLY
2795 user_handle_t previous; /* handle to the previous caret window */
2796 rectangle_t old_rect; /* previous caret rectangle */
2797 int old_hide; /* previous hide count */
2798 int old_state; /* previous caret state (1=on, 0=off) */
2799 @END
2802 /* Set the current thread caret information */
2803 @REQ(set_caret_info)
2804 unsigned int flags; /* caret flags (see below) */
2805 user_handle_t handle; /* handle to the caret window */
2806 int x; /* caret x position */
2807 int y; /* caret y position */
2808 int hide; /* increment for hide count (can be negative to show it) */
2809 int state; /* caret state (see below) */
2810 @REPLY
2811 user_handle_t full_handle; /* handle to the current caret window */
2812 rectangle_t old_rect; /* previous caret rectangle */
2813 int old_hide; /* previous hide count */
2814 int old_state; /* previous caret state (1=on, 0=off) */
2815 @END
2816 #define SET_CARET_POS 0x01 /* set the caret position from x,y */
2817 #define SET_CARET_HIDE 0x02 /* increment the caret hide count */
2818 #define SET_CARET_STATE 0x04 /* set the caret on/off state */
2819 enum caret_state
2821 CARET_STATE_OFF, /* off */
2822 CARET_STATE_ON, /* on */
2823 CARET_STATE_TOGGLE, /* toggle current state */
2824 CARET_STATE_ON_IF_MOVED /* on if the position differs, unchanged otherwise */
2828 /* Set a window hook */
2829 @REQ(set_hook)
2830 int id; /* id of the hook */
2831 process_id_t pid; /* id of process to set the hook into */
2832 thread_id_t tid; /* id of thread to set the hook into */
2833 int event_min;
2834 int event_max;
2835 client_ptr_t proc; /* hook procedure */
2836 int flags;
2837 int unicode; /* is it a unicode hook? */
2838 VARARG(module,unicode_str); /* module name */
2839 @REPLY
2840 user_handle_t handle; /* handle to the hook */
2841 unsigned int active_hooks; /* active hooks bitmap */
2842 @END
2845 /* Remove a window hook */
2846 @REQ(remove_hook)
2847 user_handle_t handle; /* handle to the hook */
2848 client_ptr_t proc; /* hook procedure if handle is 0 */
2849 int id; /* id of the hook if handle is 0 */
2850 @REPLY
2851 unsigned int active_hooks; /* active hooks bitmap */
2852 @END
2855 /* Start calling a hook chain */
2856 @REQ(start_hook_chain)
2857 int id; /* id of the hook */
2858 int event; /* signalled event */
2859 user_handle_t window; /* handle to the event window */
2860 int object_id; /* object id for out of context winevent */
2861 int child_id; /* child id for out of context winevent */
2862 @REPLY
2863 user_handle_t handle; /* handle to the next hook */
2864 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2865 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2866 int unicode; /* is it a unicode hook? */
2867 client_ptr_t proc; /* hook procedure */
2868 unsigned int active_hooks; /* active hooks bitmap */
2869 VARARG(module,unicode_str); /* module name */
2870 @END
2873 /* Finished calling a hook chain */
2874 @REQ(finish_hook_chain)
2875 int id; /* id of the hook */
2876 @END
2879 /* Get the hook information */
2880 @REQ(get_hook_info)
2881 user_handle_t handle; /* handle to the current hook */
2882 int get_next; /* do we want info about current or next hook? */
2883 int event; /* signalled event */
2884 user_handle_t window; /* handle to the event window */
2885 int object_id; /* object id for out of context winevent */
2886 int child_id; /* child id for out of context winevent */
2887 @REPLY
2888 user_handle_t handle; /* handle to the hook */
2889 int id; /* id of the hook */
2890 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2891 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2892 client_ptr_t proc; /* hook procedure */
2893 int unicode; /* is it a unicode hook? */
2894 VARARG(module,unicode_str); /* module name */
2895 @END
2898 /* Create a window class */
2899 @REQ(create_class)
2900 int local; /* is it a local class? */
2901 atom_t atom; /* class atom */
2902 unsigned int style; /* class style */
2903 mod_handle_t instance; /* module instance */
2904 int extra; /* number of extra class bytes */
2905 int win_extra; /* number of window extra bytes */
2906 client_ptr_t client_ptr; /* pointer to class in client address space */
2907 data_size_t name_offset; /* base class name offset for specified atom */
2908 VARARG(name,unicode_str); /* class name */
2909 @REPLY
2910 atom_t atom; /* resulting class atom */
2911 @END
2914 /* Destroy a window class */
2915 @REQ(destroy_class)
2916 atom_t atom; /* class atom */
2917 mod_handle_t instance; /* module instance */
2918 VARARG(name,unicode_str); /* class name */
2919 @REPLY
2920 client_ptr_t client_ptr; /* pointer to class in client address space */
2921 @END
2924 /* Set some information in a class */
2925 @REQ(set_class_info)
2926 user_handle_t window; /* handle to the window */
2927 unsigned int flags; /* flags for info to set (see below) */
2928 atom_t atom; /* class atom */
2929 unsigned int style; /* class style */
2930 int win_extra; /* number of window extra bytes */
2931 mod_handle_t instance; /* module instance */
2932 int extra_offset; /* offset to set in extra bytes */
2933 data_size_t extra_size; /* size to set in extra bytes */
2934 lparam_t extra_value; /* value to set in extra bytes */
2935 @REPLY
2936 atom_t old_atom; /* previous class atom */
2937 atom_t base_atom; /* base class atom */
2938 mod_handle_t old_instance; /* previous module instance */
2939 lparam_t old_extra_value; /* old value in extra bytes */
2940 unsigned int old_style; /* previous class style */
2941 int old_extra; /* previous number of class extra bytes */
2942 int old_win_extra; /* previous number of window extra bytes */
2943 @END
2944 #define SET_CLASS_ATOM 0x0001
2945 #define SET_CLASS_STYLE 0x0002
2946 #define SET_CLASS_WINEXTRA 0x0004
2947 #define SET_CLASS_INSTANCE 0x0008
2948 #define SET_CLASS_EXTRA 0x0010
2951 /* Open the clipboard */
2952 @REQ(open_clipboard)
2953 user_handle_t window; /* clipboard window */
2954 @REPLY
2955 user_handle_t owner; /* current clipboard owner */
2956 @END
2959 /* Close the clipboard */
2960 @REQ(close_clipboard)
2961 @REPLY
2962 user_handle_t viewer; /* first clipboard viewer */
2963 user_handle_t owner; /* current clipboard owner */
2964 @END
2967 /* Empty the clipboard and grab ownership */
2968 @REQ(empty_clipboard)
2969 @END
2972 /* Add a data format to the clipboard */
2973 @REQ(set_clipboard_data)
2974 unsigned int format; /* clipboard format of the data */
2975 unsigned int lcid; /* locale id to use for synthesizing text formats */
2976 VARARG(data,bytes); /* data contents */
2977 @REPLY
2978 unsigned int seqno; /* sequence number for the set data */
2979 @END
2982 /* Fetch a data format from the clipboard */
2983 @REQ(get_clipboard_data)
2984 unsigned int format; /* clipboard format of the data */
2985 int render; /* will we try to render it if missing? */
2986 int cached; /* do we already have it in the client-side cache? */
2987 unsigned int seqno; /* sequence number for the data in the cache */
2988 @REPLY
2989 unsigned int from; /* for synthesized data, format to generate it from */
2990 user_handle_t owner; /* clipboard owner for delayed-rendered formats */
2991 unsigned int seqno; /* sequence number for the originally set data */
2992 data_size_t total; /* total data size */
2993 VARARG(data,bytes); /* data contents */
2994 @END
2997 /* Retrieve a list of available formats */
2998 @REQ(get_clipboard_formats)
2999 unsigned int format; /* specific format to query, return all if 0 */
3000 @REPLY
3001 unsigned int count; /* count of available formats */
3002 VARARG(formats,uints); /* array of available formats */
3003 @END
3006 /* Retrieve the next available format */
3007 @REQ(enum_clipboard_formats)
3008 unsigned int previous; /* previous format, or first if 0 */
3009 @REPLY
3010 unsigned int format; /* next format */
3011 @END
3014 /* Release ownership of the clipboard */
3015 @REQ(release_clipboard)
3016 user_handle_t owner; /* clipboard owner to release */
3017 @REPLY
3018 user_handle_t viewer; /* first clipboard viewer */
3019 user_handle_t owner; /* current clipboard owner */
3020 @END
3023 /* Get clipboard information */
3024 @REQ(get_clipboard_info)
3025 @REPLY
3026 user_handle_t window; /* clipboard window */
3027 user_handle_t owner; /* clipboard owner */
3028 user_handle_t viewer; /* clipboard viewer */
3029 unsigned int seqno; /* current sequence number */
3030 @END
3033 /* Set the clipboard viewer window */
3034 @REQ(set_clipboard_viewer)
3035 user_handle_t viewer; /* clipboard viewer */
3036 user_handle_t previous; /* if non-zero, check that this was the previous viewer */
3037 @REPLY
3038 user_handle_t old_viewer; /* previous clipboard viewer */
3039 user_handle_t owner; /* clipboard owner */
3040 @END
3043 /* Add a clipboard listener window */
3044 @REQ(add_clipboard_listener)
3045 user_handle_t window; /* clipboard listener window */
3046 @END
3049 /* Remove a clipboard listener window */
3050 @REQ(remove_clipboard_listener)
3051 user_handle_t window; /* clipboard listener window */
3052 @END
3055 /* Open a security token */
3056 @REQ(open_token)
3057 obj_handle_t handle; /* handle to the thread or process */
3058 unsigned int access; /* access rights to the new token */
3059 unsigned int attributes;/* object attributes */
3060 unsigned int flags; /* flags (see below) */
3061 @REPLY
3062 obj_handle_t token; /* handle to the token */
3063 @END
3064 #define OPEN_TOKEN_THREAD 1
3065 #define OPEN_TOKEN_AS_SELF 2
3068 /* Set/get the global windows */
3069 @REQ(set_global_windows)
3070 unsigned int flags; /* flags for fields to set (see below) */
3071 user_handle_t shell_window; /* handle to the new shell window */
3072 user_handle_t shell_listview; /* handle to the new shell listview window */
3073 user_handle_t progman_window; /* handle to the new program manager window */
3074 user_handle_t taskman_window; /* handle to the new task manager window */
3075 @REPLY
3076 user_handle_t old_shell_window; /* handle to the shell window */
3077 user_handle_t old_shell_listview; /* handle to the shell listview window */
3078 user_handle_t old_progman_window; /* handle to the new program manager window */
3079 user_handle_t old_taskman_window; /* handle to the new task manager window */
3080 @END
3081 #define SET_GLOBAL_SHELL_WINDOWS 0x01 /* set both main shell and listview windows */
3082 #define SET_GLOBAL_PROGMAN_WINDOW 0x02
3083 #define SET_GLOBAL_TASKMAN_WINDOW 0x04
3085 /* Adjust the privileges held by a token */
3086 @REQ(adjust_token_privileges)
3087 obj_handle_t handle; /* handle to the token */
3088 int disable_all; /* disable all privileges? */
3089 int get_modified_state; /* get modified privileges? */
3090 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to enable/disable/remove */
3091 @REPLY
3092 unsigned int len; /* total length in bytes required to store token privileges */
3093 VARARG(privileges,LUID_AND_ATTRIBUTES); /* modified privileges */
3094 @END
3096 /* Retrieves the set of privileges held by or available to a token */
3097 @REQ(get_token_privileges)
3098 obj_handle_t handle; /* handle to the token */
3099 @REPLY
3100 unsigned int len; /* total length in bytes required to store token privileges */
3101 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
3102 @END
3104 /* Check the token has the required privileges */
3105 @REQ(check_token_privileges)
3106 obj_handle_t handle; /* handle to the token */
3107 int all_required; /* are all the privileges required for the check to succeed? */
3108 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to check */
3109 @REPLY
3110 int has_privileges; /* does the token have the required privileges? */
3111 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
3112 @END
3114 @REQ(duplicate_token)
3115 obj_handle_t handle; /* handle to the token to duplicate */
3116 unsigned int access; /* access rights to the new token */
3117 int primary; /* is the new token to be a primary one? */
3118 int impersonation_level; /* impersonation level of the new token */
3119 VARARG(objattr,object_attributes); /* object attributes */
3120 @REPLY
3121 obj_handle_t new_handle; /* duplicated handle */
3122 @END
3124 @REQ(filter_token)
3125 obj_handle_t handle; /* handle to the token to duplicate */
3126 unsigned int flags; /* flags */
3127 data_size_t privileges_size; /* size of privileges */
3128 VARARG(privileges,LUID_AND_ATTRIBUTES,privileges_size); /* privileges to remove from new token */
3129 VARARG(disable_sids,SID); /* array of groups to remove from new token */
3130 @REPLY
3131 obj_handle_t new_handle; /* filtered handle */
3132 @END
3134 @REQ(access_check)
3135 obj_handle_t handle; /* handle to the token */
3136 unsigned int desired_access; /* desired access to the object */
3137 generic_map_t mapping; /* mapping to specific rights */
3138 VARARG(sd,security_descriptor); /* security descriptor to check */
3139 @REPLY
3140 unsigned int access_granted; /* access rights actually granted */
3141 unsigned int access_status; /* was access granted? */
3142 unsigned int privileges_len; /* length needed to store privileges */
3143 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges used during access check */
3144 @END
3146 @REQ(get_token_sid)
3147 obj_handle_t handle; /* handle to the token */
3148 unsigned int which_sid; /* which SID to retrieve from the token */
3149 @REPLY
3150 data_size_t sid_len; /* length needed to store sid */
3151 VARARG(sid,SID); /* the sid specified by which_sid from the token */
3152 @END
3154 @REQ(get_token_groups)
3155 obj_handle_t handle; /* handle to the token */
3156 @REPLY
3157 data_size_t user_len; /* length needed to store user */
3158 VARARG(user,token_groups); /* groups the token's user belongs to */
3159 @END
3161 @REQ(get_token_default_dacl)
3162 obj_handle_t handle; /* handle to the token */
3163 @REPLY
3164 data_size_t acl_len; /* length needed to store access control list */
3165 VARARG(acl,ACL); /* access control list */
3166 @END
3168 @REQ(set_token_default_dacl)
3169 obj_handle_t handle; /* handle to the token */
3170 VARARG(acl,ACL); /* default dacl to set */
3171 @END
3173 @REQ(set_security_object)
3174 obj_handle_t handle; /* handle to the object */
3175 unsigned int security_info; /* which parts of security descriptor to set */
3176 VARARG(sd,security_descriptor); /* security descriptor to set */
3177 @END
3179 @REQ(get_security_object)
3180 obj_handle_t handle; /* handle to the object */
3181 unsigned int security_info; /* which parts of security descriptor to get */
3182 @REPLY
3183 unsigned int sd_len; /* buffer size needed for sd */
3184 VARARG(sd,security_descriptor); /* retrieved security descriptor */
3185 @END
3188 struct handle_info
3190 process_id_t owner;
3191 obj_handle_t handle;
3192 unsigned int access;
3193 unsigned int attributes;
3194 unsigned int type;
3197 /* Return a list of all opened handles */
3198 @REQ(get_system_handles)
3199 @REPLY
3200 unsigned int count; /* number of handles */
3201 VARARG(data,handle_infos); /* array of handle_infos */
3202 @END
3205 /* Create a mailslot */
3206 @REQ(create_mailslot)
3207 unsigned int access; /* wanted access rights */
3208 timeout_t read_timeout;
3209 unsigned int max_msgsize;
3210 VARARG(objattr,object_attributes); /* object attributes */
3211 @REPLY
3212 obj_handle_t handle; /* handle to the mailslot */
3213 @END
3216 /* Set mailslot information */
3217 @REQ(set_mailslot_info)
3218 obj_handle_t handle; /* handle to the mailslot */
3219 timeout_t read_timeout;
3220 unsigned int flags;
3221 @REPLY
3222 timeout_t read_timeout;
3223 unsigned int max_msgsize;
3224 @END
3225 #define MAILSLOT_SET_READ_TIMEOUT 1
3228 /* Create a directory object */
3229 @REQ(create_directory)
3230 unsigned int access; /* access flags */
3231 VARARG(objattr,object_attributes); /* object attributes */
3232 @REPLY
3233 obj_handle_t handle; /* handle to the directory */
3234 @END
3237 /* Open a directory object */
3238 @REQ(open_directory)
3239 unsigned int access; /* access flags */
3240 unsigned int attributes; /* object attributes */
3241 obj_handle_t rootdir; /* root directory */
3242 VARARG(directory_name,unicode_str); /* Directory name */
3243 @REPLY
3244 obj_handle_t handle; /* handle to the directory */
3245 @END
3248 /* Get a directory entry by index */
3249 @REQ(get_directory_entry)
3250 obj_handle_t handle; /* handle to the directory */
3251 unsigned int index; /* entry index */
3252 @REPLY
3253 data_size_t name_len; /* length of the entry name in bytes */
3254 VARARG(name,unicode_str,name_len); /* entry name */
3255 VARARG(type,unicode_str); /* entry type */
3256 @END
3259 /* Create a symbolic link object */
3260 @REQ(create_symlink)
3261 unsigned int access; /* access flags */
3262 VARARG(objattr,object_attributes); /* object attributes */
3263 VARARG(target_name,unicode_str); /* target name */
3264 @REPLY
3265 obj_handle_t handle; /* handle to the symlink */
3266 @END
3269 /* Open a symbolic link object */
3270 @REQ(open_symlink)
3271 unsigned int access; /* access flags */
3272 unsigned int attributes; /* object attributes */
3273 obj_handle_t rootdir; /* root directory */
3274 VARARG(name,unicode_str); /* symlink name */
3275 @REPLY
3276 obj_handle_t handle; /* handle to the symlink */
3277 @END
3280 /* Query a symbolic link object */
3281 @REQ(query_symlink)
3282 obj_handle_t handle; /* handle to the symlink */
3283 @REPLY
3284 data_size_t total; /* total needed size for name */
3285 VARARG(target_name,unicode_str); /* target name */
3286 @END
3289 /* Query basic object information */
3290 @REQ(get_object_info)
3291 obj_handle_t handle; /* handle to the object */
3292 @REPLY
3293 unsigned int access; /* granted access mask */
3294 unsigned int ref_count; /* object ref count */
3295 unsigned int handle_count; /* object handle count */
3296 data_size_t total; /* total needed size for name */
3297 VARARG(name,unicode_str); /* object name */
3298 @END
3301 /* Query object type name information */
3302 @REQ(get_object_type)
3303 obj_handle_t handle; /* handle to the object */
3304 @REPLY
3305 VARARG(info,object_type_info); /* type information */
3306 @END
3309 /* Query type information for all types */
3310 @REQ(get_object_types)
3311 @REPLY
3312 int count; /* total count of object types */
3313 VARARG(info,object_types_info); /* type information */
3314 @END
3317 /* Allocate a locally-unique identifier */
3318 @REQ(allocate_locally_unique_id)
3319 @REPLY
3320 luid_t luid;
3321 @END
3324 /* Create a device manager */
3325 @REQ(create_device_manager)
3326 unsigned int access; /* wanted access rights */
3327 unsigned int attributes; /* object attributes */
3328 @REPLY
3329 obj_handle_t handle; /* handle to the device */
3330 @END
3333 /* Create a device */
3334 @REQ(create_device)
3335 obj_handle_t rootdir; /* root directory */
3336 client_ptr_t user_ptr; /* opaque ptr for use by client */
3337 obj_handle_t manager; /* device manager */
3338 VARARG(name,unicode_str); /* object name */
3339 @END
3342 /* Delete a device */
3343 @REQ(delete_device)
3344 obj_handle_t manager; /* handle to the device manager */
3345 client_ptr_t device; /* pointer to the device */
3346 @END
3349 /* Retrieve the next pending device irp request */
3350 @REQ(get_next_device_request)
3351 obj_handle_t manager; /* handle to the device manager */
3352 obj_handle_t prev; /* handle to the previous irp */
3353 unsigned int status; /* status of the previous irp */
3354 client_ptr_t user_ptr; /* user pointer of the previous irp */
3355 @REPLY
3356 irp_params_t params; /* irp parameters */
3357 obj_handle_t next; /* handle to the next irp */
3358 thread_id_t client_tid; /* tid of thread calling irp */
3359 client_ptr_t client_thread; /* pointer to thread object of calling irp */
3360 data_size_t in_size; /* total needed input size */
3361 VARARG(next_data,bytes); /* input data of the next irp */
3362 @END
3365 /* Get kernel pointer from server object */
3366 @REQ(get_kernel_object_ptr)
3367 obj_handle_t manager; /* handle to the device manager */
3368 obj_handle_t handle; /* object handle */
3369 @REPLY
3370 client_ptr_t user_ptr; /* kernel object pointer */
3371 @END
3374 /* Associate kernel pointer with server object */
3375 @REQ(set_kernel_object_ptr)
3376 obj_handle_t manager; /* handle to the device manager */
3377 obj_handle_t handle; /* object handle */
3378 client_ptr_t user_ptr; /* kernel object pointer */
3379 @END
3382 /* Grab server object reference from kernel object pointer */
3383 @REQ(grab_kernel_object)
3384 obj_handle_t manager; /* handle to the device manager */
3385 client_ptr_t user_ptr; /* kernel object pointer */
3386 @END
3389 /* Release server object reference from kernel object pointer */
3390 @REQ(release_kernel_object)
3391 obj_handle_t manager; /* handle to the device manager */
3392 client_ptr_t user_ptr; /* kernel object pointer */
3393 @END
3396 /* Get handle from kernel object pointer */
3397 @REQ(get_kernel_object_handle)
3398 obj_handle_t manager; /* handle to the device manager */
3399 client_ptr_t user_ptr; /* kernel object pointer */
3400 unsigned int access; /* wanted access rights */
3401 @REPLY
3402 obj_handle_t handle; /* kernel object handle */
3403 @END
3406 /* Make the current process a system process */
3407 @REQ(make_process_system)
3408 @REPLY
3409 obj_handle_t event; /* event signaled when all user processes have exited */
3410 @END
3413 /* Get detailed fixed-size information about a token */
3414 @REQ(get_token_info)
3415 obj_handle_t handle; /* handle to the object */
3416 @REPLY
3417 luid_t token_id; /* locally-unique identifier of the token */
3418 luid_t modified_id; /* locally-unique identifier of the modified version of the token */
3419 int primary; /* is the token primary or impersonation? */
3420 int impersonation_level; /* level of impersonation */
3421 int elevation; /* elevation type */
3422 int group_count; /* the number of groups the token is a member of */
3423 int privilege_count; /* the number of privileges the token has */
3424 @END
3427 /* Create a token which is an elevation counterpart to this token */
3428 @REQ(create_linked_token)
3429 obj_handle_t handle; /* handle to the token */
3430 @REPLY
3431 obj_handle_t linked; /* handle to the linked token */
3432 @END
3435 /* Create I/O completion port */
3436 @REQ(create_completion)
3437 unsigned int access; /* desired access to a port */
3438 unsigned int concurrent; /* max number of concurrent active threads */
3439 VARARG(objattr,object_attributes); /* object attributes */
3440 @REPLY
3441 obj_handle_t handle; /* port handle */
3442 @END
3445 /* Open I/O completion port */
3446 @REQ(open_completion)
3447 unsigned int access; /* desired access to a port */
3448 unsigned int attributes; /* object attributes */
3449 obj_handle_t rootdir; /* root directory */
3450 VARARG(filename,unicode_str); /* port name */
3451 @REPLY
3452 obj_handle_t handle; /* port handle */
3453 @END
3456 /* add completion to completion port */
3457 @REQ(add_completion)
3458 obj_handle_t handle; /* port handle */
3459 apc_param_t ckey; /* completion key */
3460 apc_param_t cvalue; /* completion value */
3461 apc_param_t information; /* IO_STATUS_BLOCK Information */
3462 unsigned int status; /* completion result */
3463 @END
3466 /* get completion from completion port queue */
3467 @REQ(remove_completion)
3468 obj_handle_t handle; /* port handle */
3469 @REPLY
3470 apc_param_t ckey; /* completion key */
3471 apc_param_t cvalue; /* completion value */
3472 apc_param_t information; /* IO_STATUS_BLOCK Information */
3473 unsigned int status; /* completion result */
3474 @END
3477 /* get completion queue depth */
3478 @REQ(query_completion)
3479 obj_handle_t handle; /* port handle */
3480 @REPLY
3481 unsigned int depth; /* completion queue depth */
3482 @END
3485 /* associate object with completion port */
3486 @REQ(set_completion_info)
3487 obj_handle_t handle; /* object handle */
3488 apc_param_t ckey; /* completion key */
3489 obj_handle_t chandle; /* port handle */
3490 @END
3493 /* check for associated completion and push msg */
3494 @REQ(add_fd_completion)
3495 obj_handle_t handle; /* async' object */
3496 apc_param_t cvalue; /* completion value */
3497 apc_param_t information; /* IO_STATUS_BLOCK Information */
3498 unsigned int status; /* completion status */
3499 int async; /* completion is an async result */
3500 @END
3503 /* set fd completion information */
3504 @REQ(set_fd_completion_mode)
3505 obj_handle_t handle; /* handle to a file or directory */
3506 unsigned int flags; /* completion notification flags */
3507 @END
3510 /* set fd disposition information */
3511 @REQ(set_fd_disp_info)
3512 obj_handle_t handle; /* handle to a file or directory */
3513 int unlink; /* whether to unlink file on close */
3514 @END
3517 /* set fd name information */
3518 @REQ(set_fd_name_info)
3519 obj_handle_t handle; /* handle to a file or directory */
3520 obj_handle_t rootdir; /* root directory */
3521 data_size_t namelen; /* length of NT name in bytes */
3522 int link; /* link instead of renaming */
3523 int replace; /* replace an existing file? */
3524 VARARG(name,unicode_str,namelen); /* NT name */
3525 VARARG(filename,string); /* new file name */
3526 @END
3529 /* Retrieve layered info for a window */
3530 @REQ(get_window_layered_info)
3531 user_handle_t handle; /* handle to the window */
3532 @REPLY
3533 unsigned int color_key; /* color key */
3534 unsigned int alpha; /* alpha (0..255) */
3535 unsigned int flags; /* LWA_* flags */
3536 @END
3539 /* Set layered info for a window */
3540 @REQ(set_window_layered_info)
3541 user_handle_t handle; /* handle to the window */
3542 unsigned int color_key; /* color key */
3543 unsigned int alpha; /* alpha (0..255) */
3544 unsigned int flags; /* LWA_* flags */
3545 @END
3548 /* Allocate an arbitrary user handle */
3549 @REQ(alloc_user_handle)
3550 @REPLY
3551 user_handle_t handle; /* allocated handle */
3552 @END
3555 /* Free an arbitrary user handle */
3556 @REQ(free_user_handle)
3557 user_handle_t handle; /* handle to free*/
3558 @END
3561 /* Set/get the current cursor */
3562 @REQ(set_cursor)
3563 unsigned int flags; /* flags for fields to set (see below) */
3564 user_handle_t handle; /* handle to the cursor */
3565 int show_count; /* show count increment/decrement */
3566 int x; /* cursor position */
3567 int y;
3568 rectangle_t clip; /* cursor clip rectangle */
3569 unsigned int clip_msg; /* message to post on cursor clip changes */
3570 @REPLY
3571 user_handle_t prev_handle; /* previous handle */
3572 int prev_count; /* previous show count */
3573 int prev_x; /* previous position */
3574 int prev_y;
3575 int new_x; /* new position */
3576 int new_y;
3577 rectangle_t new_clip; /* new clip rectangle */
3578 unsigned int last_change; /* time of last position change */
3579 @END
3580 #define SET_CURSOR_HANDLE 0x01
3581 #define SET_CURSOR_COUNT 0x02
3582 #define SET_CURSOR_POS 0x04
3583 #define SET_CURSOR_CLIP 0x08
3584 #define SET_CURSOR_NOCLIP 0x10
3586 /* Get the history of the 64 last cursor positions */
3587 @REQ(get_cursor_history)
3588 @REPLY
3589 VARARG(history,cursor_positions);
3590 @END
3593 /* Batch read rawinput message data */
3594 @REQ(get_rawinput_buffer)
3595 data_size_t rawinput_size; /* size of RAWINPUT structure */
3596 data_size_t buffer_size; /* size of output buffer */
3597 @REPLY
3598 data_size_t next_size; /* minimum size to get next message data */
3599 unsigned int count;
3600 VARARG(data,bytes);
3601 @END
3603 /* Modify the list of registered rawinput devices */
3604 @REQ(update_rawinput_devices)
3605 VARARG(devices,rawinput_devices);
3606 @END
3608 /* Retrieve the list of registered rawinput devices */
3609 @REQ(get_rawinput_devices)
3610 @REPLY
3611 unsigned int device_count;
3612 VARARG(devices,rawinput_devices);
3613 @END
3615 /* Create a new job object */
3616 @REQ(create_job)
3617 unsigned int access; /* wanted access rights */
3618 VARARG(objattr,object_attributes); /* object attributes */
3619 @REPLY
3620 obj_handle_t handle; /* handle to the job */
3621 @END
3624 /* Open a job object */
3625 @REQ(open_job)
3626 unsigned int access; /* wanted access rights */
3627 unsigned int attributes; /* object attributes */
3628 obj_handle_t rootdir; /* root directory */
3629 VARARG(name,unicode_str); /* object name */
3630 @REPLY
3631 obj_handle_t handle; /* handle to the job */
3632 @END
3635 /* Assign a job object to a process */
3636 @REQ(assign_job)
3637 obj_handle_t job; /* handle to the job */
3638 obj_handle_t process; /* handle to the process */
3639 @END
3642 /* Check if a process is associated with a job */
3643 @REQ(process_in_job)
3644 obj_handle_t job; /* handle to the job */
3645 obj_handle_t process; /* handle to the process */
3646 @END
3649 /* Set limit flags on a job */
3650 @REQ(set_job_limits)
3651 obj_handle_t handle; /* handle to the job */
3652 unsigned int limit_flags; /* new limit flags */
3653 @END
3656 /* Set new completion port for a job */
3657 @REQ(set_job_completion_port)
3658 obj_handle_t job; /* handle to the job */
3659 obj_handle_t port; /* handle to the completion port */
3660 client_ptr_t key; /* key to send with completion messages */
3661 @END
3664 /* Retrieve information about a job */
3665 @REQ(get_job_info)
3666 obj_handle_t handle; /* handle to the job */
3667 @REPLY
3668 int total_processes; /* total count of processes */
3669 int active_processes; /* count of running processes */
3670 @END
3673 /* Terminate all processes associated with the job */
3674 @REQ(terminate_job)
3675 obj_handle_t handle; /* handle to the job */
3676 int status; /* process exit code */
3677 @END
3680 /* Suspend a process */
3681 @REQ(suspend_process)
3682 obj_handle_t handle; /* process handle */
3683 @END
3686 /* Resume a process */
3687 @REQ(resume_process)
3688 obj_handle_t handle; /* process handle */
3689 @END
3692 /* Iterate thread list for process */
3693 @REQ(get_next_thread)
3694 obj_handle_t process; /* process handle */
3695 obj_handle_t last; /* thread handle to start with */
3696 unsigned int access; /* desired access for returned handle */
3697 unsigned int attributes; /* returned handle attributes */
3698 unsigned int flags; /* controls iteration direction */
3699 @REPLY
3700 obj_handle_t handle; /* next thread handle */
3701 @END