wined3d: Add helpers to retrieve shader constants from a wined3d_stateblock.
[wine.git] / server / protocol.def
blob919297c818c3badb6a3351524db642d677255aa0
1 /* -*- C -*-
3 * Wine server protocol definition
5 * Copyright (C) 2001 Alexandre Julliard
7 * This file is used by tools/make_requests to build the
8 * protocol structures in include/wine/server_protocol.h
10 * This library is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU Lesser General Public
12 * License as published by the Free Software Foundation; either
13 * version 2.1 of the License, or (at your option) any later version.
15 * This library is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 * Lesser General Public License for more details.
20 * You should have received a copy of the GNU Lesser General Public
21 * License along with this library; if not, write to the Free Software
22 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
25 @HEADER /* start of C declarations */
27 #include <stdarg.h>
28 #include <stdlib.h>
29 #include <time.h>
31 #include <windef.h>
32 #include <winbase.h>
34 typedef unsigned int obj_handle_t;
35 typedef unsigned int user_handle_t;
36 typedef unsigned int atom_t;
37 typedef unsigned int process_id_t;
38 typedef unsigned int thread_id_t;
39 typedef unsigned int data_size_t;
40 typedef unsigned int ioctl_code_t;
41 typedef unsigned __int64 lparam_t;
42 typedef unsigned __int64 apc_param_t;
43 typedef unsigned __int64 mem_size_t;
44 typedef unsigned __int64 file_pos_t;
45 typedef unsigned __int64 client_ptr_t;
46 typedef unsigned __int64 affinity_t;
47 typedef client_ptr_t mod_handle_t;
49 struct request_header
51 int req; /* request code */
52 data_size_t request_size; /* request variable part size */
53 data_size_t reply_size; /* reply variable part maximum size */
56 struct reply_header
58 unsigned int error; /* error result */
59 data_size_t reply_size; /* reply variable part size */
62 /* placeholder structure for the maximum allowed request size */
63 /* this is used to construct the generic_request union */
64 struct request_max_size
66 int pad[16]; /* the max request size is 16 ints */
69 #define FIRST_USER_HANDLE 0x0020 /* first possible value for low word of user handle */
70 #define LAST_USER_HANDLE 0xffef /* last possible value for low word of user handle */
73 /* debug event data */
74 typedef union
76 int code; /* event code */
77 struct
79 int code; /* DbgExceptionStateChange */
80 int first; /* first chance exception? */
81 unsigned int exc_code; /* exception code */
82 unsigned int flags; /* exception flags */
83 client_ptr_t record; /* exception record */
84 client_ptr_t address; /* exception address */
85 int nb_params; /* number of parameters */
86 int __pad;
87 client_ptr_t params[15]; /* parameters */
88 } exception;
89 struct
91 int code; /* DbgCreateThreadStateChange */
92 obj_handle_t handle; /* handle to the new thread */
93 client_ptr_t start; /* thread startup routine */
94 } create_thread;
95 struct
97 int code; /* DbgCreateProcessStateChange */
98 obj_handle_t file; /* handle to the process exe file */
99 obj_handle_t process; /* handle to the new process */
100 obj_handle_t thread; /* handle to the new thread */
101 mod_handle_t base; /* base of executable image */
102 int dbg_offset; /* offset of debug info in file */
103 int dbg_size; /* size of debug info */
104 client_ptr_t start; /* thread startup routine */
105 } create_process;
106 struct
108 int code; /* DbgExitThreadStateChange/DbgExitProcessStateChange */
109 int exit_code; /* thread or process exit code */
110 } exit;
111 struct
113 int code; /* DbgLoadDllStateChange */
114 obj_handle_t handle; /* file handle for the dll */
115 mod_handle_t base; /* base address of the dll */
116 int dbg_offset; /* offset of debug info in file */
117 int dbg_size; /* size of debug info */
118 client_ptr_t name; /* image name (optional) */
119 } load_dll;
120 struct
122 int code; /* DbgUnloadDllStateChange */
123 int __pad;
124 mod_handle_t base; /* base address of the dll */
125 } unload_dll;
126 } debug_event_t;
128 /* context data */
129 typedef struct
131 unsigned int machine; /* machine type */
132 unsigned int flags; /* SERVER_CTX_* flags */
133 union
135 struct { unsigned int eip, ebp, esp, eflags, cs, ss; } i386_regs;
136 struct { unsigned __int64 rip, rbp, rsp;
137 unsigned int cs, ss, flags, __pad; } x86_64_regs;
138 struct { unsigned int sp, lr, pc, cpsr; } arm_regs;
139 struct { unsigned __int64 sp, pc, pstate; } arm64_regs;
140 } ctl; /* selected by SERVER_CTX_CONTROL */
141 union
143 struct { unsigned int eax, ebx, ecx, edx, esi, edi; } i386_regs;
144 struct { unsigned __int64 rax,rbx, rcx, rdx, rsi, rdi,
145 r8, r9, r10, r11, r12, r13, r14, r15; } x86_64_regs;
146 struct { unsigned int r[13]; } arm_regs;
147 struct { unsigned __int64 x[31]; } arm64_regs;
148 } integer; /* selected by SERVER_CTX_INTEGER */
149 union
151 struct { unsigned int ds, es, fs, gs; } i386_regs;
152 struct { unsigned int ds, es, fs, gs; } x86_64_regs;
153 } seg; /* selected by SERVER_CTX_SEGMENTS */
154 union
156 struct { unsigned int ctrl, status, tag, err_off, err_sel, data_off, data_sel, cr0npx;
157 unsigned char regs[80]; } i386_regs;
158 struct { struct { unsigned __int64 low, high; } fpregs[32]; } x86_64_regs;
159 struct { unsigned __int64 d[32]; unsigned int fpscr; } arm_regs;
160 struct { struct { unsigned __int64 low, high; } q[32]; unsigned int fpcr, fpsr; } arm64_regs;
161 } fp; /* selected by SERVER_CTX_FLOATING_POINT */
162 union
164 struct { unsigned int dr0, dr1, dr2, dr3, dr6, dr7; } i386_regs;
165 struct { unsigned __int64 dr0, dr1, dr2, dr3, dr6, dr7; } x86_64_regs;
166 struct { unsigned int bvr[8], bcr[8], wvr[1], wcr[1]; } arm_regs;
167 struct { unsigned __int64 bvr[8], wvr[2]; unsigned int bcr[8], wcr[2]; } arm64_regs;
168 } debug; /* selected by SERVER_CTX_DEBUG_REGISTERS */
169 union
171 unsigned char i386_regs[512];
172 } ext; /* selected by SERVER_CTX_EXTENDED_REGISTERS */
173 union
175 struct { struct { unsigned __int64 low, high; } ymm_high[16]; } regs;
176 } ymm; /* selected by SERVER_CTX_YMM_REGISTERS */
177 } context_t;
179 #define SERVER_CTX_CONTROL 0x01
180 #define SERVER_CTX_INTEGER 0x02
181 #define SERVER_CTX_SEGMENTS 0x04
182 #define SERVER_CTX_FLOATING_POINT 0x08
183 #define SERVER_CTX_DEBUG_REGISTERS 0x10
184 #define SERVER_CTX_EXTENDED_REGISTERS 0x20
185 #define SERVER_CTX_YMM_REGISTERS 0x40
187 /* structure used in sending an fd from client to server */
188 struct send_fd
190 thread_id_t tid; /* thread id */
191 int fd; /* file descriptor on client-side */
194 /* structure sent by the server on the wait fifo */
195 struct wake_up_reply
197 client_ptr_t cookie; /* magic cookie that was passed in select_request */
198 int signaled; /* wait result */
199 int __pad;
202 /* NT-style timeout, in 100ns units, negative means relative timeout */
203 typedef __int64 timeout_t;
204 #define TIMEOUT_INFINITE (((timeout_t)0x7fffffff) << 32 | 0xffffffff)
206 /* absolute timeout, negative means that monotonic clock is used */
207 typedef __int64 abstime_t;
209 /* structure for process startup info */
210 typedef struct
212 unsigned int debug_flags;
213 unsigned int console_flags;
214 obj_handle_t console;
215 obj_handle_t hstdin;
216 obj_handle_t hstdout;
217 obj_handle_t hstderr;
218 unsigned int x;
219 unsigned int y;
220 unsigned int xsize;
221 unsigned int ysize;
222 unsigned int xchars;
223 unsigned int ychars;
224 unsigned int attribute;
225 unsigned int flags;
226 unsigned int show;
227 data_size_t curdir_len;
228 data_size_t dllpath_len;
229 data_size_t imagepath_len;
230 data_size_t cmdline_len;
231 data_size_t title_len;
232 data_size_t desktop_len;
233 data_size_t shellinfo_len;
234 data_size_t runtime_len;
235 /* VARARG(curdir,unicode_str,curdir_len); */
236 /* VARARG(dllpath,unicode_str,dllpath_len); */
237 /* VARARG(imagepath,unicode_str,imagepath_len); */
238 /* VARARG(cmdline,unicode_str,cmdline_len); */
239 /* VARARG(title,unicode_str,title_len); */
240 /* VARARG(desktop,unicode_str,desktop_len); */
241 /* VARARG(shellinfo,unicode_str,shellinfo_len); */
242 /* VARARG(runtime,unicode_str,runtime_len); */
243 } startup_info_t;
245 /* structure returned in the list of window properties */
246 typedef struct
248 atom_t atom; /* property atom */
249 int string; /* was atom a string originally? */
250 lparam_t data; /* data stored in property */
251 } property_data_t;
253 /* structure to specify window rectangles */
254 typedef struct
256 int left;
257 int top;
258 int right;
259 int bottom;
260 } rectangle_t;
262 /* structure for parameters of async I/O calls */
263 typedef struct
265 obj_handle_t handle; /* object to perform I/O on */
266 obj_handle_t event; /* event to signal when done */
267 client_ptr_t iosb; /* I/O status block in client addr space */
268 client_ptr_t user; /* opaque user data containing callback pointer and async-specific data */
269 client_ptr_t apc; /* user APC to call */
270 apc_param_t apc_context; /* user APC context or completion value */
271 } async_data_t;
273 /* structures for extra message data */
275 struct hw_msg_source
277 unsigned int device; /* source device (IMDT_* values) */
278 unsigned int origin; /* source origin (IMO_* values) */
281 union rawinput
283 int type;
284 struct
286 int type; /* RIM_TYPEKEYBOARD */
287 unsigned int message; /* message generated by this rawinput event */
288 unsigned short vkey; /* virtual key code */
289 unsigned short scan; /* scan code */
290 } kbd;
291 struct
293 int type; /* RIM_TYPEMOUSE */
294 int x; /* x coordinate */
295 int y; /* y coordinate */
296 unsigned int data; /* mouse data */
297 } mouse;
298 struct
300 int type; /* RIM_TYPEHID */
301 unsigned int device; /* rawinput device index */
302 unsigned int param; /* rawinput message param */
303 unsigned short usage_page;/* HID usage page */
304 unsigned short usage; /* HID usage */
305 unsigned int count; /* HID report count */
306 unsigned int length; /* HID report length */
307 } hid;
310 struct hardware_msg_data
312 lparam_t info; /* extra info */
313 data_size_t size; /* size of hardware message data */
314 int __pad;
315 unsigned int hw_id; /* unique id */
316 unsigned int flags; /* hook flags */
317 struct hw_msg_source source; /* message source */
318 union rawinput rawinput; /* rawinput message data */
321 struct callback_msg_data
323 client_ptr_t callback; /* callback function */
324 lparam_t data; /* user data for callback */
325 lparam_t result; /* message result */
328 struct winevent_msg_data
330 user_handle_t hook; /* hook handle */
331 thread_id_t tid; /* thread id */
332 client_ptr_t hook_proc; /* hook proc address */
333 /* followed by module name if any */
336 typedef union
338 int type;
339 struct
341 int type; /* INPUT_KEYBOARD */
342 unsigned short vkey; /* virtual key code */
343 unsigned short scan; /* scan code */
344 unsigned int flags; /* event flags */
345 unsigned int time; /* event time */
346 lparam_t info; /* extra info */
347 } kbd;
348 struct
350 int type; /* INPUT_MOUSE */
351 int x; /* coordinates */
352 int y;
353 unsigned int data; /* mouse data */
354 unsigned int flags; /* event flags */
355 unsigned int time; /* event time */
356 lparam_t info; /* extra info */
357 } mouse;
358 struct
360 int type; /* INPUT_HARDWARE */
361 unsigned int msg; /* message code */
362 lparam_t lparam; /* message param */
363 union rawinput rawinput;/* rawinput message data */
364 } hw;
365 } hw_input_t;
367 typedef union
369 unsigned char bytes[1]; /* raw data for sent messages */
370 struct hardware_msg_data hardware;
371 struct callback_msg_data callback;
372 struct winevent_msg_data winevent;
373 } message_data_t;
375 /* structure returned in filesystem events */
376 struct filesystem_event
378 int action;
379 data_size_t len;
380 char name[1];
383 struct luid
385 unsigned int low_part;
386 int high_part;
389 struct luid_attr
391 struct luid luid;
392 unsigned int attrs;
395 struct acl
397 unsigned char revision;
398 unsigned char pad1;
399 unsigned short size;
400 unsigned short count;
401 unsigned short pad2;
404 struct sid
406 unsigned char revision;
407 unsigned char sub_count;
408 unsigned char id_auth[6];
409 unsigned int sub_auth[15];
412 typedef struct
414 unsigned int read;
415 unsigned int write;
416 unsigned int exec;
417 unsigned int all;
418 } generic_map_t;
420 #define MAX_ACL_LEN 65535
422 struct security_descriptor
424 unsigned int control; /* SE_ flags */
425 data_size_t owner_len;
426 data_size_t group_len;
427 data_size_t sacl_len;
428 data_size_t dacl_len;
429 /* VARARG(owner,sid); */
430 /* VARARG(group,sid); */
431 /* VARARG(sacl,acl); */
432 /* VARARG(dacl,acl); */
435 struct object_attributes
437 obj_handle_t rootdir; /* root directory */
438 unsigned int attributes; /* object attributes */
439 data_size_t sd_len; /* length of security_descriptor data. may be 0 */
440 data_size_t name_len; /* length of the name string. may be 0 */
441 /* VARARG(sd,security_descriptor); */
442 /* VARARG(name,unicode_str); */
445 struct object_type_info
447 data_size_t name_len; /* length of the name string */
448 unsigned int index; /* type index in global table */
449 unsigned int obj_count; /* count of objects of this type */
450 unsigned int handle_count; /* count of handles of this type */
451 unsigned int obj_max; /* max count of objects of this type */
452 unsigned int handle_max; /* max count of handles of this type */
453 unsigned int valid_access; /* mask for valid access bits */
454 generic_map_t mapping; /* generic access mappings */
455 /* VARARG(name,unicode_str); */
458 enum select_op
460 SELECT_NONE,
461 SELECT_WAIT,
462 SELECT_WAIT_ALL,
463 SELECT_SIGNAL_AND_WAIT,
464 SELECT_KEYED_EVENT_WAIT,
465 SELECT_KEYED_EVENT_RELEASE
468 typedef union
470 enum select_op op;
471 struct
473 enum select_op op; /* SELECT_WAIT or SELECT_WAIT_ALL */
474 obj_handle_t handles[MAXIMUM_WAIT_OBJECTS];
475 int __pad;
476 } wait;
477 struct
479 enum select_op op; /* SELECT_SIGNAL_AND_WAIT */
480 obj_handle_t wait;
481 obj_handle_t signal; /* must be last in the structure so we can remove it on retries */
482 } signal_and_wait;
483 struct
485 enum select_op op; /* SELECT_KEYED_EVENT_WAIT or SELECT_KEYED_EVENT_RELEASE */
486 obj_handle_t handle;
487 client_ptr_t key;
488 } keyed_event;
489 } select_op_t;
491 enum apc_type
493 APC_NONE,
494 APC_USER,
495 APC_ASYNC_IO,
496 APC_VIRTUAL_ALLOC,
497 APC_VIRTUAL_ALLOC_EX,
498 APC_VIRTUAL_FREE,
499 APC_VIRTUAL_QUERY,
500 APC_VIRTUAL_PROTECT,
501 APC_VIRTUAL_FLUSH,
502 APC_VIRTUAL_LOCK,
503 APC_VIRTUAL_UNLOCK,
504 APC_MAP_VIEW,
505 APC_MAP_VIEW_EX,
506 APC_UNMAP_VIEW,
507 APC_CREATE_THREAD,
508 APC_DUP_HANDLE
511 typedef struct
513 enum apc_type type; /* APC_USER */
514 int __pad;
515 client_ptr_t func; /* void (__stdcall *func)(ULONG_PTR,ULONG_PTR,ULONG_PTR); */
516 apc_param_t args[3]; /* arguments for user function */
517 } user_apc_t;
519 typedef union
521 enum apc_type type;
522 user_apc_t user;
523 struct
525 enum apc_type type; /* APC_ASYNC_IO */
526 unsigned int status; /* I/O status */
527 client_ptr_t user; /* user pointer */
528 client_ptr_t sb; /* status block */
529 data_size_t result; /* result size */
530 } async_io;
531 struct
533 enum apc_type type; /* APC_VIRTUAL_ALLOC */
534 unsigned int op_type; /* type of operation */
535 client_ptr_t addr; /* requested address */
536 mem_size_t size; /* allocation size */
537 mem_size_t zero_bits; /* number of zero high bits */
538 unsigned int prot; /* memory protection flags */
539 } virtual_alloc;
540 struct
542 enum apc_type type; /* APC_VIRTUAL_ALLOC */
543 unsigned int op_type; /* type of operation */
544 client_ptr_t addr; /* requested address */
545 mem_size_t size; /* allocation size */
546 mem_size_t limit_low; /* allocation address limits */
547 mem_size_t limit_high;
548 mem_size_t align; /* allocation alignment */
549 unsigned int prot; /* memory protection flags */
550 unsigned int attributes; /* memory extended attributes */
551 } virtual_alloc_ex;
552 struct
554 enum apc_type type; /* APC_VIRTUAL_FREE */
555 unsigned int op_type; /* type of operation */
556 client_ptr_t addr; /* requested address */
557 mem_size_t size; /* allocation size */
558 } virtual_free;
559 struct
561 enum apc_type type; /* APC_VIRTUAL_QUERY */
562 int __pad;
563 client_ptr_t addr; /* requested address */
564 } virtual_query;
565 struct
567 enum apc_type type; /* APC_VIRTUAL_PROTECT */
568 unsigned int prot; /* new protection flags */
569 client_ptr_t addr; /* requested address */
570 mem_size_t size; /* requested size */
571 } virtual_protect;
572 struct
574 enum apc_type type; /* APC_VIRTUAL_FLUSH */
575 int __pad;
576 client_ptr_t addr; /* requested address */
577 mem_size_t size; /* requested size */
578 } virtual_flush;
579 struct
581 enum apc_type type; /* APC_VIRTUAL_LOCK */
582 int __pad;
583 client_ptr_t addr; /* requested address */
584 mem_size_t size; /* requested size */
585 } virtual_lock;
586 struct
588 enum apc_type type; /* APC_VIRTUAL_UNLOCK */
589 int __pad;
590 client_ptr_t addr; /* requested address */
591 mem_size_t size; /* requested size */
592 } virtual_unlock;
593 struct
595 enum apc_type type; /* APC_MAP_VIEW */
596 obj_handle_t handle; /* mapping handle */
597 client_ptr_t addr; /* requested address */
598 mem_size_t size; /* allocation size */
599 file_pos_t offset; /* file offset */
600 mem_size_t zero_bits; /* number of zero high bits */
601 unsigned int alloc_type; /* allocation type */
602 unsigned int prot; /* memory protection flags */
603 } map_view;
604 struct
606 enum apc_type type; /* APC_MAP_VIEW_EX */
607 obj_handle_t handle; /* mapping handle */
608 client_ptr_t addr; /* requested address */
609 mem_size_t size; /* allocation size */
610 file_pos_t offset; /* file offset */
611 mem_size_t limit_low; /* allocation address limits */
612 mem_size_t limit_high;
613 unsigned int alloc_type; /* allocation type */
614 unsigned int prot; /* memory protection flags */
615 unsigned short machine; /* requested machine for image mappings */
616 unsigned short __pad[3];
617 } map_view_ex;
618 struct
620 enum apc_type type; /* APC_UNMAP_VIEW */
621 unsigned int flags; /* unmap flags */
622 client_ptr_t addr; /* view address */
623 } unmap_view;
624 struct
626 enum apc_type type; /* APC_CREATE_THREAD */
627 unsigned int flags; /* creation flags */
628 client_ptr_t func; /* void (__stdcall *func)(void*); start function */
629 client_ptr_t arg; /* argument for start function */
630 mem_size_t zero_bits; /* number of zero high bits for thread stack */
631 mem_size_t reserve; /* reserve size for thread stack */
632 mem_size_t commit; /* commit size for thread stack */
633 } create_thread;
634 struct
636 enum apc_type type; /* APC_DUP_HANDLE */
637 obj_handle_t src_handle; /* src handle to duplicate */
638 obj_handle_t dst_process; /* dst process handle */
639 unsigned int access; /* wanted access rights */
640 unsigned int attributes; /* object attributes */
641 unsigned int options; /* duplicate options */
642 } dup_handle;
643 } apc_call_t;
645 typedef union
647 enum apc_type type;
648 struct
650 enum apc_type type; /* APC_ASYNC_IO */
651 unsigned int status; /* new status of async operation */
652 unsigned int total; /* bytes transferred */
653 } async_io;
654 struct
656 enum apc_type type; /* APC_VIRTUAL_ALLOC */
657 unsigned int status; /* status returned by call */
658 client_ptr_t addr; /* resulting address */
659 mem_size_t size; /* resulting size */
660 } virtual_alloc;
661 struct
663 enum apc_type type; /* APC_VIRTUAL_ALLOC_EX */
664 unsigned int status; /* status returned by call */
665 client_ptr_t addr; /* resulting address */
666 mem_size_t size; /* resulting size */
667 } virtual_alloc_ex;
668 struct
670 enum apc_type type; /* APC_VIRTUAL_FREE */
671 unsigned int status; /* status returned by call */
672 client_ptr_t addr; /* resulting address */
673 mem_size_t size; /* resulting size */
674 } virtual_free;
675 struct
677 enum apc_type type; /* APC_VIRTUAL_QUERY */
678 unsigned int status; /* status returned by call */
679 client_ptr_t base; /* resulting base address */
680 client_ptr_t alloc_base;/* resulting allocation base */
681 mem_size_t size; /* resulting region size */
682 unsigned short state; /* resulting region state */
683 unsigned short prot; /* resulting region protection */
684 unsigned short alloc_prot;/* resulting allocation protection */
685 unsigned short alloc_type;/* resulting region allocation type */
686 } virtual_query;
687 struct
689 enum apc_type type; /* APC_VIRTUAL_PROTECT */
690 unsigned int status; /* status returned by call */
691 client_ptr_t addr; /* resulting address */
692 mem_size_t size; /* resulting size */
693 unsigned int prot; /* old protection flags */
694 } virtual_protect;
695 struct
697 enum apc_type type; /* APC_VIRTUAL_FLUSH */
698 unsigned int status; /* status returned by call */
699 client_ptr_t addr; /* resulting address */
700 mem_size_t size; /* resulting size */
701 } virtual_flush;
702 struct
704 enum apc_type type; /* APC_VIRTUAL_LOCK */
705 unsigned int status; /* status returned by call */
706 client_ptr_t addr; /* resulting address */
707 mem_size_t size; /* resulting size */
708 } virtual_lock;
709 struct
711 enum apc_type type; /* APC_VIRTUAL_UNLOCK */
712 unsigned int status; /* status returned by call */
713 client_ptr_t addr; /* resulting address */
714 mem_size_t size; /* resulting size */
715 } virtual_unlock;
716 struct
718 enum apc_type type; /* APC_MAP_VIEW */
719 unsigned int status; /* status returned by call */
720 client_ptr_t addr; /* resulting address */
721 mem_size_t size; /* resulting size */
722 } map_view;
723 struct
725 enum apc_type type; /* APC_MAP_VIEW_EX */
726 unsigned int status; /* status returned by call */
727 client_ptr_t addr; /* resulting address */
728 mem_size_t size; /* resulting size */
729 } map_view_ex;
730 struct
732 enum apc_type type; /* APC_UNMAP_VIEW */
733 unsigned int status; /* status returned by call */
734 } unmap_view;
735 struct
737 enum apc_type type; /* APC_CREATE_THREAD */
738 unsigned int status; /* status returned by call */
739 process_id_t pid; /* process id */
740 thread_id_t tid; /* thread id */
741 client_ptr_t teb; /* thread teb (in process address space) */
742 obj_handle_t handle; /* handle to new thread */
743 } create_thread;
744 struct
746 enum apc_type type; /* APC_DUP_HANDLE */
747 unsigned int status; /* status returned by call */
748 obj_handle_t handle; /* duplicated handle in dst process */
749 } dup_handle;
750 struct
752 enum apc_type type; /* APC_BREAK_PROCESS */
753 unsigned int status; /* status returned by call */
754 } break_process;
755 } apc_result_t;
757 enum irp_type
759 IRP_CALL_NONE,
760 IRP_CALL_CREATE,
761 IRP_CALL_CLOSE,
762 IRP_CALL_READ,
763 IRP_CALL_WRITE,
764 IRP_CALL_FLUSH,
765 IRP_CALL_IOCTL,
766 IRP_CALL_VOLUME,
767 IRP_CALL_FREE,
768 IRP_CALL_CANCEL
771 typedef union
773 enum irp_type type; /* irp call type */
774 struct
776 enum irp_type type; /* IRP_CALL_CREATE */
777 unsigned int access; /* access rights */
778 unsigned int sharing; /* sharing flags */
779 unsigned int options; /* file options */
780 client_ptr_t device; /* opaque ptr for the device */
781 obj_handle_t file; /* file handle */
782 } create;
783 struct
785 enum irp_type type; /* IRP_CALL_CLOSE */
786 int __pad;
787 client_ptr_t file; /* opaque ptr for the file object */
788 } close;
789 struct
791 enum irp_type type; /* IRP_CALL_READ */
792 unsigned int key; /* driver key */
793 data_size_t out_size; /* needed output size */
794 int __pad;
795 client_ptr_t file; /* opaque ptr for the file object */
796 file_pos_t pos; /* file position */
797 } read;
798 struct
800 enum irp_type type; /* IRP_CALL_WRITE */
801 unsigned int key; /* driver key */
802 client_ptr_t file; /* opaque ptr for the file object */
803 file_pos_t pos; /* file position */
804 } write;
805 struct
807 enum irp_type type; /* IRP_CALL_FLUSH */
808 int __pad;
809 client_ptr_t file; /* opaque ptr for the file object */
810 } flush;
811 struct
813 enum irp_type type; /* IRP_CALL_IOCTL */
814 ioctl_code_t code; /* ioctl code */
815 data_size_t out_size; /* needed output size */
816 int __pad;
817 client_ptr_t file; /* opaque ptr for the file object */
818 } ioctl;
819 struct
821 enum irp_type type; /* IRP_CALL_VOLUME */
822 unsigned int info_class;/* information class */
823 data_size_t out_size; /* needed output size */
824 int __pad;
825 client_ptr_t file; /* opaque ptr for the file object */
826 } volume;
827 struct
829 enum irp_type type; /* IRP_CALL_FREE */
830 int __pad;
831 client_ptr_t obj; /* opaque ptr for the freed object */
832 } free;
833 struct
835 enum irp_type type; /* IRP_CALL_CANCEL */
836 int __pad;
837 client_ptr_t irp; /* opaque ptr for canceled irp */
838 } cancel;
839 } irp_params_t;
841 /* information about a PE image mapping, roughly equivalent to SECTION_IMAGE_INFORMATION */
842 typedef struct
844 client_ptr_t base;
845 mem_size_t stack_size;
846 mem_size_t stack_commit;
847 unsigned int entry_point;
848 unsigned int map_size;
849 unsigned int zerobits;
850 unsigned int subsystem;
851 unsigned short subsystem_minor;
852 unsigned short subsystem_major;
853 unsigned short osversion_major;
854 unsigned short osversion_minor;
855 unsigned short image_charact;
856 unsigned short dll_charact;
857 unsigned short machine;
858 unsigned char contains_code : 1;
859 unsigned char wine_builtin : 1;
860 unsigned char wine_fakedll : 1;
861 unsigned char image_flags;
862 unsigned int loader_flags;
863 unsigned int header_size;
864 unsigned int file_size;
865 unsigned int checksum;
866 unsigned int dbg_offset;
867 unsigned int dbg_size;
868 } pe_image_info_t;
869 #define IMAGE_FLAGS_ComPlusNativeReady 0x01
870 #define IMAGE_FLAGS_ComPlusILOnly 0x02
871 #define IMAGE_FLAGS_ImageDynamicallyRelocated 0x04
872 #define IMAGE_FLAGS_ImageMappedFlat 0x08
873 #define IMAGE_FLAGS_BaseBelow4gb 0x10
874 #define IMAGE_FLAGS_ComPlusPrefer32bit 0x20
876 struct rawinput_device
878 unsigned short usage_page;
879 unsigned short usage;
880 unsigned int flags;
881 user_handle_t target;
884 typedef struct
886 int x;
887 int y;
888 unsigned int time;
889 int __pad;
890 lparam_t info;
891 } cursor_pos_t;
893 /****************************************************************/
894 /* Request declarations */
896 /* Create a new process from the context of the parent */
897 @REQ(new_process)
898 obj_handle_t token; /* process token */
899 obj_handle_t debug; /* process debug object */
900 obj_handle_t parent_process; /* parent process */
901 unsigned int flags; /* process creation flags */
902 int socket_fd; /* file descriptor for process socket */
903 unsigned int access; /* access rights for process object */
904 unsigned short machine; /* architecture that the new process will use */
905 data_size_t info_size; /* size of startup info */
906 data_size_t handles_size; /* length of explicit handles list */
907 data_size_t jobs_size; /* length of jobs list */
908 VARARG(objattr,object_attributes); /* object attributes */
909 VARARG(handles,uints,handles_size); /* handles list */
910 VARARG(jobs,uints,jobs_size); /* jobs list */
911 VARARG(info,startup_info,info_size); /* startup information */
912 VARARG(env,unicode_str); /* environment for new process */
913 @REPLY
914 obj_handle_t info; /* new process info handle */
915 process_id_t pid; /* process id */
916 obj_handle_t handle; /* process handle (in the current process) */
917 @END
920 /* Retrieve information about a newly started process */
921 @REQ(get_new_process_info)
922 obj_handle_t info; /* info handle returned from new_process_request */
923 @REPLY
924 int success; /* did the process start successfully? */
925 int exit_code; /* process exit code if failed */
926 @END
929 /* Create a new thread */
930 @REQ(new_thread)
931 obj_handle_t process; /* process in which to create thread */
932 unsigned int access; /* wanted access rights */
933 unsigned int flags; /* thread creation flags */
934 int request_fd; /* fd for request pipe */
935 VARARG(objattr,object_attributes); /* object attributes */
936 @REPLY
937 thread_id_t tid; /* thread id */
938 obj_handle_t handle; /* thread handle (in the current process) */
939 @END
942 /* Retrieve the new process startup info */
943 @REQ(get_startup_info)
944 @REPLY
945 data_size_t info_size; /* size of startup info */
946 unsigned short machine; /* architecture for the new process */
947 VARARG(info,startup_info,info_size); /* startup information */
948 VARARG(env,unicode_str); /* environment */
949 @END
952 /* Signal the end of the process initialization */
953 @REQ(init_process_done)
954 client_ptr_t teb; /* TEB of new thread (in process address space) */
955 client_ptr_t peb; /* PEB of new process (in process address space) */
956 client_ptr_t ldt_copy; /* address of LDT copy (in process address space) */
957 @REPLY
958 client_ptr_t entry; /* process entry point */
959 int suspend; /* is process suspended? */
960 @END
963 /* Initialize the first thread of a new process */
964 @REQ(init_first_thread)
965 int unix_pid; /* Unix pid of new process */
966 int unix_tid; /* Unix tid of new thread */
967 int debug_level; /* new debug level */
968 int reply_fd; /* fd for reply pipe */
969 int wait_fd; /* fd for blocking calls pipe */
970 @REPLY
971 process_id_t pid; /* process id of the new thread's process */
972 thread_id_t tid; /* thread id of the new thread */
973 timeout_t server_start; /* server start time */
974 unsigned int session_id; /* process session id */
975 data_size_t info_size; /* total size of startup info */
976 VARARG(machines,ushorts); /* array of supported machines */
977 @END
980 /* Initialize a new thread; called from the child after pthread_create() */
981 @REQ(init_thread)
982 int unix_tid; /* Unix tid of new thread */
983 int reply_fd; /* fd for reply pipe */
984 int wait_fd; /* fd for blocking calls pipe */
985 client_ptr_t teb; /* TEB of new thread (in thread address space) */
986 client_ptr_t entry; /* entry point (in thread address space) */
987 @REPLY
988 int suspend; /* is thread suspended? */
989 @END
992 /* Terminate a process */
993 @REQ(terminate_process)
994 obj_handle_t handle; /* process handle to terminate */
995 int exit_code; /* process exit code */
996 @REPLY
997 int self; /* suicide? */
998 @END
1001 /* Terminate a thread */
1002 @REQ(terminate_thread)
1003 obj_handle_t handle; /* thread handle to terminate */
1004 int exit_code; /* thread exit code */
1005 @REPLY
1006 int self; /* suicide? */
1007 @END
1010 /* Retrieve information about a process */
1011 @REQ(get_process_info)
1012 obj_handle_t handle; /* process handle */
1013 @REPLY
1014 process_id_t pid; /* server process id */
1015 process_id_t ppid; /* server process id of parent */
1016 affinity_t affinity; /* process affinity mask */
1017 client_ptr_t peb; /* PEB address in process address space */
1018 timeout_t start_time; /* process start time */
1019 timeout_t end_time; /* process end time */
1020 unsigned int session_id; /* process session id */
1021 int exit_code; /* process exit code */
1022 int priority; /* priority class */
1023 unsigned short machine; /* process architecture */
1024 VARARG(image,pe_image_info); /* image info for main exe */
1025 @END
1028 /* Retrieve debug information about a process */
1029 @REQ(get_process_debug_info)
1030 obj_handle_t handle; /* process handle */
1031 @REPLY
1032 obj_handle_t debug; /* handle to debug port */
1033 int debug_children; /* inherit debugger to child processes */
1034 VARARG(image,pe_image_info); /* image info for main exe */
1035 @END
1038 /* Fetch the name of the process image */
1039 @REQ(get_process_image_name)
1040 obj_handle_t handle; /* process handle */
1041 int win32; /* return a win32 filename? */
1042 @REPLY
1043 data_size_t len; /* len in bytes required to store filename */
1044 VARARG(name,unicode_str); /* image name for main exe */
1045 @END
1048 /* Retrieve information about a process memory usage */
1049 @REQ(get_process_vm_counters)
1050 obj_handle_t handle; /* process handle */
1051 @REPLY
1052 mem_size_t peak_virtual_size; /* peak virtual memory in bytes */
1053 mem_size_t virtual_size; /* virtual memory in bytes */
1054 mem_size_t peak_working_set_size; /* peak real memory in bytes */
1055 mem_size_t working_set_size; /* real memory in bytes */
1056 mem_size_t pagefile_usage; /* commit charge in bytes */
1057 mem_size_t peak_pagefile_usage; /* peak commit charge in bytes */
1058 @END
1061 /* Set a process information */
1062 @REQ(set_process_info)
1063 obj_handle_t handle; /* process handle */
1064 int mask; /* setting mask (see below) */
1065 int priority; /* priority class */
1066 affinity_t affinity; /* affinity mask */
1067 @END
1068 #define SET_PROCESS_INFO_PRIORITY 0x01
1069 #define SET_PROCESS_INFO_AFFINITY 0x02
1072 /* Retrieve information about a thread */
1073 @REQ(get_thread_info)
1074 obj_handle_t handle; /* thread handle */
1075 unsigned int access; /* required access rights */
1076 @REPLY
1077 process_id_t pid; /* server process id */
1078 thread_id_t tid; /* server thread id */
1079 client_ptr_t teb; /* thread teb pointer */
1080 client_ptr_t entry_point; /* thread entry point */
1081 affinity_t affinity; /* thread affinity mask */
1082 int exit_code; /* thread exit code */
1083 int priority; /* thread priority level */
1084 int last; /* last thread in process */
1085 int suspend_count; /* thread suspend count */
1086 int dbg_hidden; /* thread hidden from debugger */
1087 data_size_t desc_len; /* description length in bytes */
1088 VARARG(desc,unicode_str); /* description string */
1089 @END
1092 /* Retrieve information about thread times */
1093 @REQ(get_thread_times)
1094 obj_handle_t handle; /* thread handle */
1095 @REPLY
1096 timeout_t creation_time; /* thread creation time */
1097 timeout_t exit_time; /* thread exit time */
1098 int unix_pid; /* thread native pid */
1099 int unix_tid; /* thread native pid */
1100 @END
1103 /* Set a thread information */
1104 @REQ(set_thread_info)
1105 obj_handle_t handle; /* thread handle */
1106 int mask; /* setting mask (see below) */
1107 int priority; /* priority class */
1108 affinity_t affinity; /* affinity mask */
1109 client_ptr_t entry_point; /* thread entry point */
1110 obj_handle_t token; /* impersonation token */
1111 VARARG(desc,unicode_str); /* description string */
1112 @END
1113 #define SET_THREAD_INFO_PRIORITY 0x01
1114 #define SET_THREAD_INFO_AFFINITY 0x02
1115 #define SET_THREAD_INFO_TOKEN 0x04
1116 #define SET_THREAD_INFO_ENTRYPOINT 0x08
1117 #define SET_THREAD_INFO_DESCRIPTION 0x10
1118 #define SET_THREAD_INFO_DBG_HIDDEN 0x20
1121 /* Suspend a thread */
1122 @REQ(suspend_thread)
1123 obj_handle_t handle; /* thread handle */
1124 @REPLY
1125 int count; /* new suspend count */
1126 @END
1129 /* Resume a thread */
1130 @REQ(resume_thread)
1131 obj_handle_t handle; /* thread handle */
1132 @REPLY
1133 int count; /* new suspend count */
1134 @END
1137 /* Queue an APC for a thread or process */
1138 @REQ(queue_apc)
1139 obj_handle_t handle; /* thread or process handle */
1140 VARARG(call,apc_call); /* call arguments */
1141 @REPLY
1142 obj_handle_t handle; /* APC handle */
1143 int self; /* run APC in caller itself? */
1144 @END
1147 /* Get the result of an APC call */
1148 @REQ(get_apc_result)
1149 obj_handle_t handle; /* handle to the APC */
1150 @REPLY
1151 apc_result_t result; /* result of the APC */
1152 @END
1155 /* Close a handle for the current process */
1156 @REQ(close_handle)
1157 obj_handle_t handle; /* handle to close */
1158 @END
1161 /* Set a handle information */
1162 @REQ(set_handle_info)
1163 obj_handle_t handle; /* handle we are interested in */
1164 int flags; /* new handle flags */
1165 int mask; /* mask for flags to set */
1166 @REPLY
1167 int old_flags; /* old flag value */
1168 @END
1171 /* Duplicate a handle */
1172 @REQ(dup_handle)
1173 obj_handle_t src_process; /* src process handle */
1174 obj_handle_t src_handle; /* src handle to duplicate */
1175 obj_handle_t dst_process; /* dst process handle */
1176 unsigned int access; /* wanted access rights */
1177 unsigned int attributes; /* object attributes */
1178 unsigned int options; /* duplicate options */
1179 @REPLY
1180 obj_handle_t handle; /* duplicated handle in dst process */
1181 @END
1184 /* Test if two handles refer to the same object */
1185 @REQ(compare_objects)
1186 obj_handle_t first; /* first object handle */
1187 obj_handle_t second; /* second object handle */
1188 @END
1191 /* Make an object temporary */
1192 @REQ(make_temporary)
1193 obj_handle_t handle; /* handle to the object */
1194 @END
1197 /* Open a handle to a process */
1198 @REQ(open_process)
1199 process_id_t pid; /* process id to open */
1200 unsigned int access; /* wanted access rights */
1201 unsigned int attributes; /* object attributes */
1202 @REPLY
1203 obj_handle_t handle; /* handle to the process */
1204 @END
1207 /* Open a handle to a thread */
1208 @REQ(open_thread)
1209 thread_id_t tid; /* thread id to open */
1210 unsigned int access; /* wanted access rights */
1211 unsigned int attributes; /* object attributes */
1212 @REPLY
1213 obj_handle_t handle; /* handle to the thread */
1214 @END
1217 /* Wait for handles */
1218 @REQ(select)
1219 int flags; /* wait flags (see below) */
1220 client_ptr_t cookie; /* magic cookie to return to client */
1221 abstime_t timeout; /* timeout */
1222 data_size_t size; /* size of select_op */
1223 obj_handle_t prev_apc; /* handle to previous APC */
1224 VARARG(result,apc_result); /* result of previous APC */
1225 VARARG(data,select_op,size); /* operation-specific data */
1226 VARARG(contexts,contexts); /* suspend context(s) */
1227 @REPLY
1228 obj_handle_t apc_handle; /* handle to next APC */
1229 int signaled; /* were the handles immediately signaled? */
1230 VARARG(call,apc_call); /* APC call arguments */
1231 VARARG(contexts,contexts); /* suspend context(s) */
1232 @END
1233 #define SELECT_ALERTABLE 1
1234 #define SELECT_INTERRUPTIBLE 2
1237 /* Create an event */
1238 @REQ(create_event)
1239 unsigned int access; /* wanted access rights */
1240 int manual_reset; /* manual reset event */
1241 int initial_state; /* initial state of the event */
1242 VARARG(objattr,object_attributes); /* object attributes */
1243 @REPLY
1244 obj_handle_t handle; /* handle to the event */
1245 @END
1247 /* Event operation */
1248 @REQ(event_op)
1249 obj_handle_t handle; /* handle to event */
1250 int op; /* event operation (see below) */
1251 @REPLY
1252 int state; /* previous state */
1253 @END
1254 enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT };
1256 @REQ(query_event)
1257 obj_handle_t handle; /* handle to event */
1258 @REPLY
1259 int manual_reset; /* manual reset event */
1260 int state; /* current state of the event */
1261 @END
1263 /* Open an event */
1264 @REQ(open_event)
1265 unsigned int access; /* wanted access rights */
1266 unsigned int attributes; /* object attributes */
1267 obj_handle_t rootdir; /* root directory */
1268 VARARG(name,unicode_str); /* object name */
1269 @REPLY
1270 obj_handle_t handle; /* handle to the event */
1271 @END
1274 /* Create a keyed event */
1275 @REQ(create_keyed_event)
1276 unsigned int access; /* wanted access rights */
1277 VARARG(objattr,object_attributes); /* object attributes */
1278 @REPLY
1279 obj_handle_t handle; /* handle to the event */
1280 @END
1282 /* Open a keyed event */
1283 @REQ(open_keyed_event)
1284 unsigned int access; /* wanted access rights */
1285 unsigned int attributes; /* object attributes */
1286 obj_handle_t rootdir; /* root directory */
1287 VARARG(name,unicode_str); /* object name */
1288 @REPLY
1289 obj_handle_t handle; /* handle to the event */
1290 @END
1293 /* Create a mutex */
1294 @REQ(create_mutex)
1295 unsigned int access; /* wanted access rights */
1296 int owned; /* initially owned? */
1297 VARARG(objattr,object_attributes); /* object attributes */
1298 @REPLY
1299 obj_handle_t handle; /* handle to the mutex */
1300 @END
1303 /* Release a mutex */
1304 @REQ(release_mutex)
1305 obj_handle_t handle; /* handle to the mutex */
1306 @REPLY
1307 unsigned int prev_count; /* value of internal counter, before release */
1308 @END
1311 /* Open a mutex */
1312 @REQ(open_mutex)
1313 unsigned int access; /* wanted access rights */
1314 unsigned int attributes; /* object attributes */
1315 obj_handle_t rootdir; /* root directory */
1316 VARARG(name,unicode_str); /* object name */
1317 @REPLY
1318 obj_handle_t handle; /* handle to the mutex */
1319 @END
1322 /* Query a mutex */
1323 @REQ(query_mutex)
1324 obj_handle_t handle; /* handle to mutex */
1325 @REPLY
1326 unsigned int count; /* current count of mutex */
1327 int owned; /* true if owned by current thread */
1328 int abandoned; /* true if abandoned */
1329 @END
1332 /* Create a semaphore */
1333 @REQ(create_semaphore)
1334 unsigned int access; /* wanted access rights */
1335 unsigned int initial; /* initial count */
1336 unsigned int max; /* maximum count */
1337 VARARG(objattr,object_attributes); /* object attributes */
1338 @REPLY
1339 obj_handle_t handle; /* handle to the semaphore */
1340 @END
1343 /* Release a semaphore */
1344 @REQ(release_semaphore)
1345 obj_handle_t handle; /* handle to the semaphore */
1346 unsigned int count; /* count to add to semaphore */
1347 @REPLY
1348 unsigned int prev_count; /* previous semaphore count */
1349 @END
1351 @REQ(query_semaphore)
1352 obj_handle_t handle; /* handle to the semaphore */
1353 @REPLY
1354 unsigned int current; /* current count */
1355 unsigned int max; /* maximum count */
1356 @END
1358 /* Open a semaphore */
1359 @REQ(open_semaphore)
1360 unsigned int access; /* wanted access rights */
1361 unsigned int attributes; /* object attributes */
1362 obj_handle_t rootdir; /* root directory */
1363 VARARG(name,unicode_str); /* object name */
1364 @REPLY
1365 obj_handle_t handle; /* handle to the semaphore */
1366 @END
1369 /* Create a file */
1370 @REQ(create_file)
1371 unsigned int access; /* wanted access rights */
1372 unsigned int sharing; /* sharing flags */
1373 int create; /* file create action */
1374 unsigned int options; /* file options */
1375 unsigned int attrs; /* file attributes for creation */
1376 VARARG(objattr,object_attributes); /* object attributes */
1377 VARARG(filename,string); /* file name */
1378 @REPLY
1379 obj_handle_t handle; /* handle to the file */
1380 @END
1383 /* Open a file object */
1384 @REQ(open_file_object)
1385 unsigned int access; /* wanted access rights */
1386 unsigned int attributes; /* open attributes */
1387 obj_handle_t rootdir; /* root directory */
1388 unsigned int sharing; /* sharing flags */
1389 unsigned int options; /* file options */
1390 VARARG(filename,unicode_str); /* file name */
1391 @REPLY
1392 obj_handle_t handle; /* handle to the file */
1393 @END
1396 /* Allocate a file handle for a Unix fd */
1397 @REQ(alloc_file_handle)
1398 unsigned int access; /* wanted access rights */
1399 unsigned int attributes; /* object attributes */
1400 int fd; /* file descriptor on the client side */
1401 @REPLY
1402 obj_handle_t handle; /* handle to the file */
1403 @END
1406 /* Get the Unix name from a file handle */
1407 @REQ(get_handle_unix_name)
1408 obj_handle_t handle; /* file handle */
1409 @REPLY
1410 data_size_t name_len; /* unix name length */
1411 VARARG(name,string); /* unix name */
1412 @END
1415 /* Get a Unix fd to access a file */
1416 @REQ(get_handle_fd)
1417 obj_handle_t handle; /* handle to the file */
1418 @REPLY
1419 int type; /* file type (see below) */
1420 int cacheable; /* can fd be cached in the client? */
1421 unsigned int access; /* file access rights */
1422 unsigned int options; /* file open options */
1423 @END
1424 enum server_fd_type
1426 FD_TYPE_INVALID, /* invalid file (no associated fd) */
1427 FD_TYPE_FILE, /* regular file */
1428 FD_TYPE_DIR, /* directory */
1429 FD_TYPE_SOCKET, /* socket */
1430 FD_TYPE_SERIAL, /* serial port */
1431 FD_TYPE_PIPE, /* named pipe */
1432 FD_TYPE_MAILSLOT, /* mailslot */
1433 FD_TYPE_CHAR, /* unspecified char device */
1434 FD_TYPE_DEVICE, /* Windows device file */
1435 FD_TYPE_NB_TYPES
1439 /* Retrieve (or allocate) the client-side directory cache entry */
1440 @REQ(get_directory_cache_entry)
1441 obj_handle_t handle; /* handle to the directory */
1442 @REPLY
1443 int entry; /* cache entry on the client side */
1444 VARARG(free,ints); /* entries that can be freed */
1445 @END
1448 /* Flush a file buffers */
1449 @REQ(flush)
1450 async_data_t async; /* async I/O parameters */
1451 @REPLY
1452 obj_handle_t event; /* event set when finished */
1453 @END
1455 /* Query file information */
1456 @REQ(get_file_info)
1457 obj_handle_t handle; /* handle to the file */
1458 unsigned int info_class; /* queried information class */
1459 @REPLY
1460 VARARG(data,bytes); /* file info data */
1461 @END
1463 /* Query volume information */
1464 @REQ(get_volume_info)
1465 obj_handle_t handle; /* handle to the file */
1466 async_data_t async; /* async I/O parameters */
1467 unsigned int info_class; /* queried information class */
1468 @REPLY
1469 obj_handle_t wait; /* handle to wait on for blocking read */
1470 VARARG(data,bytes); /* volume info data */
1471 @END
1473 /* Lock a region of a file */
1474 @REQ(lock_file)
1475 obj_handle_t handle; /* handle to the file */
1476 file_pos_t offset; /* offset of start of lock */
1477 file_pos_t count; /* count of bytes to lock */
1478 int shared; /* shared or exclusive lock? */
1479 int wait; /* do we want to wait? */
1480 @REPLY
1481 obj_handle_t handle; /* handle to wait on */
1482 int overlapped; /* is it an overlapped I/O handle? */
1483 @END
1486 /* Unlock a region of a file */
1487 @REQ(unlock_file)
1488 obj_handle_t handle; /* handle to the file */
1489 file_pos_t offset; /* offset of start of unlock */
1490 file_pos_t count; /* count of bytes to unlock */
1491 @END
1494 /* Perform a recv on a socket */
1495 @REQ(recv_socket)
1496 int oob; /* are we receiving OOB data? */
1497 async_data_t async; /* async I/O parameters */
1498 int force_async; /* Force asynchronous mode? */
1499 @REPLY
1500 obj_handle_t wait; /* handle to wait on for blocking recv */
1501 unsigned int options; /* device open options */
1502 int nonblocking; /* is socket non-blocking? */
1503 @END
1506 /* Perform a send on a socket */
1507 @REQ(send_socket)
1508 async_data_t async; /* async I/O parameters */
1509 int force_async; /* Force asynchronous mode? */
1510 @REPLY
1511 obj_handle_t wait; /* handle to wait on for blocking send */
1512 unsigned int options; /* device open options */
1513 int nonblocking; /* is socket non-blocking? */
1514 @END
1517 /* Get socket event flags */
1518 @REQ(socket_get_events)
1519 obj_handle_t handle; /* socket handle */
1520 obj_handle_t event; /* event to reset */
1521 @REPLY
1522 unsigned int flags; /* event mask */
1523 VARARG(status,uints); /* array of status codes */
1524 @END
1527 /* Store ICMP id for ICMP over datagram fixup */
1528 @REQ(socket_send_icmp_id)
1529 obj_handle_t handle; /* socket handle */
1530 unsigned short icmp_id; /* ICMP packet id */
1531 unsigned short icmp_seq; /* ICMP packed sequence */
1532 @REPLY
1533 @END
1536 /* Get ICMP id for ICMP over datagram fixup */
1537 @REQ(socket_get_icmp_id)
1538 obj_handle_t handle; /* socket handle */
1539 unsigned short icmp_seq; /* ICMP packed sequence */
1540 @REPLY
1541 unsigned short icmp_id; /* ICMP packet id */
1542 @END
1545 /* Retrieve the next pending console ioctl request */
1546 @REQ(get_next_console_request)
1547 obj_handle_t handle; /* console server handle */
1548 int signal; /* server signal state */
1549 int read; /* 1 if reporting result of blocked read ioctl */
1550 unsigned int status; /* status of previous ioctl */
1551 VARARG(out_data,bytes); /* out_data of previous ioctl */
1552 @REPLY
1553 unsigned int code; /* ioctl code */
1554 unsigned int output; /* output id or 0 for input */
1555 data_size_t out_size; /* ioctl output size */
1556 VARARG(in_data,bytes); /* ioctl in_data */
1557 @END
1560 /* enable directory change notifications */
1561 @REQ(read_directory_changes)
1562 unsigned int filter; /* notification filter */
1563 int subtree; /* watch the subtree? */
1564 int want_data; /* flag indicating whether change data should be collected */
1565 async_data_t async; /* async I/O parameters */
1566 @END
1569 @REQ(read_change)
1570 obj_handle_t handle;
1571 @REPLY
1572 VARARG(events,filesystem_event); /* collected filesystem events */
1573 @END
1576 /* Create a file mapping */
1577 @REQ(create_mapping)
1578 unsigned int access; /* wanted access rights */
1579 unsigned int flags; /* SEC_* flags */
1580 unsigned int file_access; /* file access rights */
1581 mem_size_t size; /* mapping size */
1582 obj_handle_t file_handle; /* file handle */
1583 VARARG(objattr,object_attributes); /* object attributes */
1584 @REPLY
1585 obj_handle_t handle; /* handle to the mapping */
1586 @END
1589 /* Open a mapping */
1590 @REQ(open_mapping)
1591 unsigned int access; /* wanted access rights */
1592 unsigned int attributes; /* object attributes */
1593 obj_handle_t rootdir; /* root directory */
1594 VARARG(name,unicode_str); /* object name */
1595 @REPLY
1596 obj_handle_t handle; /* handle to the mapping */
1597 @END
1600 /* Get information about a file mapping */
1601 @REQ(get_mapping_info)
1602 obj_handle_t handle; /* handle to the mapping */
1603 unsigned int access; /* wanted access rights */
1604 @REPLY
1605 mem_size_t size; /* mapping size */
1606 unsigned int flags; /* SEC_* flags */
1607 obj_handle_t shared_file; /* shared mapping file handle */
1608 data_size_t total; /* total required buffer size in bytes */
1609 VARARG(image,pe_image_info);/* image info for SEC_IMAGE mappings */
1610 VARARG(name,unicode_str); /* filename for SEC_IMAGE mappings */
1611 @END
1614 /* Add a memory view in the current process */
1615 @REQ(map_view)
1616 obj_handle_t mapping; /* file mapping handle */
1617 unsigned int access; /* wanted access rights */
1618 client_ptr_t base; /* view base address (page-aligned) */
1619 mem_size_t size; /* view size */
1620 file_pos_t start; /* start offset in mapping */
1621 @END
1624 /* Add a memory view for an image mapping in the current process */
1625 @REQ(map_image_view)
1626 obj_handle_t mapping; /* file mapping handle */
1627 client_ptr_t base; /* view base address (page-aligned) */
1628 mem_size_t size; /* view size */
1629 unsigned int entry; /* entry point in mapped view */
1630 unsigned short machine; /* machine in the mapped view */
1631 @END
1634 /* Add a memory view for a builtin dll in the current process */
1635 @REQ(map_builtin_view)
1636 VARARG(image,pe_image_info);/* image info */
1637 VARARG(name,unicode_str); /* image filename */
1638 @END
1641 /* Get information about a mapped image view */
1642 @REQ(get_image_view_info)
1643 obj_handle_t process; /* process handle */
1644 client_ptr_t addr; /* address inside mapped view (in process address space) */
1645 @REPLY
1646 client_ptr_t base; /* view base address */
1647 mem_size_t size; /* view size */
1648 @END
1651 /* Unmap a memory view from the current process */
1652 @REQ(unmap_view)
1653 client_ptr_t base; /* view base address */
1654 @END
1657 /* Get a range of committed pages in a file mapping */
1658 @REQ(get_mapping_committed_range)
1659 client_ptr_t base; /* view base address */
1660 file_pos_t offset; /* starting offset (page-aligned, in bytes) */
1661 @REPLY
1662 mem_size_t size; /* size of range starting at offset (page-aligned, in bytes) */
1663 int committed; /* whether it is a committed range */
1664 @END
1667 /* Add a range to the committed pages in a file mapping */
1668 @REQ(add_mapping_committed_range)
1669 client_ptr_t base; /* view base address */
1670 file_pos_t offset; /* starting offset (page-aligned, in bytes) */
1671 mem_size_t size; /* size to set (page-aligned, in bytes) or 0 if only retrieving */
1672 @END
1675 /* Check if two memory maps are for the same file */
1676 @REQ(is_same_mapping)
1677 client_ptr_t base1; /* first view base address */
1678 client_ptr_t base2; /* second view base address */
1679 @END
1682 /* Get the filename of a mapping */
1683 @REQ(get_mapping_filename)
1684 obj_handle_t process; /* process handle */
1685 client_ptr_t addr; /* address inside mapped view (in process address space) */
1686 @REPLY
1687 data_size_t len; /* total filename length in bytes */
1688 VARARG(filename,unicode_str); /* filename in NT format */
1689 @END
1692 struct thread_info
1694 timeout_t start_time;
1695 thread_id_t tid;
1696 int base_priority;
1697 int current_priority;
1698 int unix_tid;
1699 client_ptr_t teb;
1700 client_ptr_t entry_point;
1703 struct process_info
1705 timeout_t start_time;
1706 data_size_t name_len;
1707 int thread_count;
1708 int priority;
1709 process_id_t pid;
1710 process_id_t parent_pid;
1711 unsigned int session_id;
1712 int handle_count;
1713 int unix_pid;
1714 /* VARARG(name,unicode_str,name_len); */
1715 /* VARARG(threads,struct thread_info,thread_count); */
1718 /* Get a list of processes and threads currently running */
1719 @REQ(list_processes)
1720 @REPLY
1721 data_size_t info_size;
1722 int process_count;
1723 int total_thread_count;
1724 data_size_t total_name_len;
1725 VARARG(data,process_info,info_size);
1726 @END
1729 /* Create a debug object */
1730 @REQ(create_debug_obj)
1731 unsigned int access; /* wanted access rights */
1732 unsigned int flags; /* object flags */
1733 VARARG(objattr,object_attributes); /* object attributes */
1734 @REPLY
1735 obj_handle_t handle; /* handle to the debug object */
1736 @END
1739 /* Wait for a debug event */
1740 @REQ(wait_debug_event)
1741 obj_handle_t debug; /* debug object */
1742 @REPLY
1743 process_id_t pid; /* process id */
1744 thread_id_t tid; /* thread id */
1745 VARARG(event,debug_event); /* debug event data */
1746 @END
1749 /* Queue an exception event */
1750 @REQ(queue_exception_event)
1751 int first; /* first chance exception? */
1752 unsigned int code; /* exception code */
1753 unsigned int flags; /* exception flags */
1754 client_ptr_t record; /* exception record */
1755 client_ptr_t address; /* exception address */
1756 data_size_t len; /* size of parameters */
1757 VARARG(params,uints64,len);/* exception parameters */
1758 @REPLY
1759 obj_handle_t handle; /* handle to the queued event */
1760 @END
1763 /* Retrieve the status of an exception event */
1764 @REQ(get_exception_status)
1765 obj_handle_t handle; /* handle to the queued event */
1766 @END
1769 /* Continue a debug event */
1770 @REQ(continue_debug_event)
1771 obj_handle_t debug; /* debug object */
1772 process_id_t pid; /* process id to continue */
1773 thread_id_t tid; /* thread id to continue */
1774 unsigned int status; /* continuation status */
1775 @END
1778 /* Start or stop debugging an existing process */
1779 @REQ(debug_process)
1780 obj_handle_t handle; /* process handle */
1781 obj_handle_t debug; /* debug object to attach to the process */
1782 int attach; /* 1=attaching / 0=detaching from the process */
1783 @END
1786 /* Set debug object information */
1787 @REQ(set_debug_obj_info)
1788 obj_handle_t debug; /* debug object */
1789 unsigned int flags; /* object flags */
1790 @END
1793 /* Read data from a process address space */
1794 @REQ(read_process_memory)
1795 obj_handle_t handle; /* process handle */
1796 client_ptr_t addr; /* addr to read from */
1797 @REPLY
1798 VARARG(data,bytes); /* result data */
1799 @END
1802 /* Write data to a process address space */
1803 @REQ(write_process_memory)
1804 obj_handle_t handle; /* process handle */
1805 client_ptr_t addr; /* addr to write to */
1806 VARARG(data,bytes); /* data to write */
1807 @END
1810 /* Create a registry key */
1811 @REQ(create_key)
1812 unsigned int access; /* desired access rights */
1813 unsigned int options; /* creation options */
1814 VARARG(objattr,object_attributes); /* object attributes */
1815 VARARG(class,unicode_str); /* class name */
1816 @REPLY
1817 obj_handle_t hkey; /* handle to the created key */
1818 @END
1820 /* Open a registry key */
1821 @REQ(open_key)
1822 obj_handle_t parent; /* handle to the parent key */
1823 unsigned int access; /* desired access rights */
1824 unsigned int attributes; /* object attributes */
1825 VARARG(name,unicode_str); /* key name */
1826 @REPLY
1827 obj_handle_t hkey; /* handle to the open key */
1828 @END
1831 /* Delete a registry key */
1832 @REQ(delete_key)
1833 obj_handle_t hkey; /* handle to the key */
1834 @END
1837 /* Flush a registry key */
1838 @REQ(flush_key)
1839 obj_handle_t hkey; /* handle to the key */
1840 @END
1843 /* Enumerate registry subkeys */
1844 @REQ(enum_key)
1845 obj_handle_t hkey; /* handle to registry key */
1846 int index; /* index of subkey (or -1 for current key) */
1847 int info_class; /* requested information class */
1848 @REPLY
1849 int subkeys; /* number of subkeys */
1850 int max_subkey; /* longest subkey name */
1851 int max_class; /* longest class name */
1852 int values; /* number of values */
1853 int max_value; /* longest value name */
1854 int max_data; /* longest value data */
1855 timeout_t modif; /* last modification time */
1856 data_size_t total; /* total length needed for full name and class */
1857 data_size_t namelen; /* length of key name in bytes */
1858 VARARG(name,unicode_str,namelen); /* key name */
1859 VARARG(class,unicode_str); /* class name */
1860 @END
1863 /* Set a value of a registry key */
1864 @REQ(set_key_value)
1865 obj_handle_t hkey; /* handle to registry key */
1866 int type; /* value type */
1867 data_size_t namelen; /* length of value name in bytes */
1868 VARARG(name,unicode_str,namelen); /* value name */
1869 VARARG(data,bytes); /* value data */
1870 @END
1873 /* Retrieve the value of a registry key */
1874 @REQ(get_key_value)
1875 obj_handle_t hkey; /* handle to registry key */
1876 VARARG(name,unicode_str); /* value name */
1877 @REPLY
1878 int type; /* value type */
1879 data_size_t total; /* total length needed for data */
1880 VARARG(data,bytes); /* value data */
1881 @END
1884 /* Enumerate a value of a registry key */
1885 @REQ(enum_key_value)
1886 obj_handle_t hkey; /* handle to registry key */
1887 int index; /* value index */
1888 int info_class; /* requested information class */
1889 @REPLY
1890 int type; /* value type */
1891 data_size_t total; /* total length needed for full name and data */
1892 data_size_t namelen; /* length of value name in bytes */
1893 VARARG(name,unicode_str,namelen); /* value name */
1894 VARARG(data,bytes); /* value data */
1895 @END
1898 /* Delete a value of a registry key */
1899 @REQ(delete_key_value)
1900 obj_handle_t hkey; /* handle to registry key */
1901 VARARG(name,unicode_str); /* value name */
1902 @END
1905 /* Load a registry branch from a file */
1906 @REQ(load_registry)
1907 obj_handle_t file; /* file to load from */
1908 VARARG(objattr,object_attributes); /* object attributes */
1909 @END
1912 /* UnLoad a registry branch from a file */
1913 @REQ(unload_registry)
1914 obj_handle_t parent; /* handle to the parent key */
1915 unsigned int attributes; /* object attributes */
1916 VARARG(name,unicode_str); /* key name */
1917 @END
1920 /* Save a registry branch to a file */
1921 @REQ(save_registry)
1922 obj_handle_t hkey; /* key to save */
1923 obj_handle_t file; /* file to save to */
1924 @END
1927 /* Add a registry key change notification */
1928 @REQ(set_registry_notification)
1929 obj_handle_t hkey; /* key to watch for changes */
1930 obj_handle_t event; /* event to set */
1931 int subtree; /* should we watch the whole subtree? */
1932 unsigned int filter; /* things to watch */
1933 @END
1936 /* Rename a registry key */
1937 @REQ(rename_key)
1938 obj_handle_t hkey; /* handle to the key to be renamed */
1939 VARARG(name,unicode_str); /* new name */
1940 @END
1943 /* Create a waitable timer */
1944 @REQ(create_timer)
1945 unsigned int access; /* wanted access rights */
1946 int manual; /* manual reset */
1947 VARARG(objattr,object_attributes); /* object attributes */
1948 @REPLY
1949 obj_handle_t handle; /* handle to the timer */
1950 @END
1953 /* Open a waitable timer */
1954 @REQ(open_timer)
1955 unsigned int access; /* wanted access rights */
1956 unsigned int attributes; /* object attributes */
1957 obj_handle_t rootdir; /* root directory */
1958 VARARG(name,unicode_str); /* object name */
1959 @REPLY
1960 obj_handle_t handle; /* handle to the timer */
1961 @END
1963 /* Set a waitable timer */
1964 @REQ(set_timer)
1965 obj_handle_t handle; /* handle to the timer */
1966 timeout_t expire; /* next expiration absolute time */
1967 client_ptr_t callback; /* callback function */
1968 client_ptr_t arg; /* callback argument */
1969 int period; /* timer period in ms */
1970 @REPLY
1971 int signaled; /* was the timer signaled before this call ? */
1972 @END
1974 /* Cancel a waitable timer */
1975 @REQ(cancel_timer)
1976 obj_handle_t handle; /* handle to the timer */
1977 @REPLY
1978 int signaled; /* was the timer signaled before this calltime ? */
1979 @END
1981 /* Get information on a waitable timer */
1982 @REQ(get_timer_info)
1983 obj_handle_t handle; /* handle to the timer */
1984 @REPLY
1985 timeout_t when; /* absolute time when the timer next expires */
1986 int signaled; /* is the timer signaled? */
1987 @END
1990 /* Retrieve the current context of a thread */
1991 @REQ(get_thread_context)
1992 obj_handle_t handle; /* thread handle */
1993 obj_handle_t context; /* context handle */
1994 unsigned int flags; /* context flags */
1995 unsigned int native_flags; /* flags for native context if WoW present */
1996 unsigned short machine; /* context architecture */
1997 @REPLY
1998 int self; /* was it a handle to the current thread? */
1999 obj_handle_t handle; /* pending context handle */
2000 VARARG(contexts,contexts); /* thread context(s) */
2001 @END
2004 /* Set the current context of a thread */
2005 @REQ(set_thread_context)
2006 obj_handle_t handle; /* thread handle */
2007 unsigned int native_flags; /* flags for native context if WoW present */
2008 VARARG(contexts,contexts); /* thread context(s) */
2009 @REPLY
2010 int self; /* was it a handle to the current thread? */
2011 @END
2014 /* Fetch a selector entry for a thread */
2015 @REQ(get_selector_entry)
2016 obj_handle_t handle; /* thread handle */
2017 int entry; /* LDT entry */
2018 @REPLY
2019 unsigned int base; /* selector base */
2020 unsigned int limit; /* selector limit */
2021 unsigned char flags; /* selector flags */
2022 @END
2025 /* Add an atom */
2026 @REQ(add_atom)
2027 VARARG(name,unicode_str); /* atom name */
2028 @REPLY
2029 atom_t atom; /* resulting atom */
2030 @END
2033 /* Delete an atom */
2034 @REQ(delete_atom)
2035 atom_t atom; /* atom handle */
2036 @END
2039 /* Find an atom */
2040 @REQ(find_atom)
2041 VARARG(name,unicode_str); /* atom name */
2042 @REPLY
2043 atom_t atom; /* atom handle */
2044 @END
2047 /* Get information about an atom */
2048 @REQ(get_atom_information)
2049 atom_t atom; /* atom handle */
2050 @REPLY
2051 int count; /* atom lock count */
2052 int pinned; /* whether the atom has been pinned */
2053 data_size_t total; /* actual length of atom name */
2054 VARARG(name,unicode_str); /* atom name */
2055 @END
2058 /* Get the message queue of the current thread */
2059 @REQ(get_msg_queue)
2060 @REPLY
2061 obj_handle_t handle; /* handle to the queue */
2062 @END
2065 /* Set the file descriptor associated to the current thread queue */
2066 @REQ(set_queue_fd)
2067 obj_handle_t handle; /* handle to the file descriptor */
2068 @END
2071 /* Set the current message queue wakeup mask */
2072 @REQ(set_queue_mask)
2073 unsigned int wake_mask; /* wakeup bits mask */
2074 unsigned int changed_mask; /* changed bits mask */
2075 int skip_wait; /* will we skip waiting if signaled? */
2076 @REPLY
2077 unsigned int wake_bits; /* current wake bits */
2078 unsigned int changed_bits; /* current changed bits */
2079 @END
2082 /* Get the current message queue status */
2083 @REQ(get_queue_status)
2084 unsigned int clear_bits; /* should we clear the change bits? */
2085 @REPLY
2086 unsigned int wake_bits; /* wake bits */
2087 unsigned int changed_bits; /* changed bits since last time */
2088 @END
2091 /* Retrieve the process idle event */
2092 @REQ(get_process_idle_event)
2093 obj_handle_t handle; /* process handle */
2094 @REPLY
2095 obj_handle_t event; /* handle to idle event */
2096 @END
2099 /* Send a message to a thread queue */
2100 @REQ(send_message)
2101 thread_id_t id; /* thread id */
2102 int type; /* message type (see below) */
2103 int flags; /* message flags (see below) */
2104 user_handle_t win; /* window handle */
2105 unsigned int msg; /* message code */
2106 lparam_t wparam; /* parameters */
2107 lparam_t lparam; /* parameters */
2108 timeout_t timeout; /* timeout for reply */
2109 VARARG(data,message_data); /* message data for sent messages */
2110 @END
2112 @REQ(post_quit_message)
2113 int exit_code; /* exit code to return */
2114 @END
2116 enum message_type
2118 MSG_ASCII, /* Ascii message (from SendMessageA) */
2119 MSG_UNICODE, /* Unicode message (from SendMessageW) */
2120 MSG_NOTIFY, /* notify message (from SendNotifyMessageW), always Unicode */
2121 MSG_CALLBACK, /* callback message (from SendMessageCallbackW), always Unicode */
2122 MSG_CALLBACK_RESULT,/* result of a callback message */
2123 MSG_OTHER_PROCESS, /* sent from other process, may include vararg data, always Unicode */
2124 MSG_POSTED, /* posted message (from PostMessageW), always Unicode */
2125 MSG_HARDWARE, /* hardware message */
2126 MSG_WINEVENT, /* winevent message */
2127 MSG_HOOK_LL /* low-level hardware hook */
2129 #define SEND_MSG_ABORT_IF_HUNG 0x01
2132 /* Send a hardware message to a thread queue */
2133 @REQ(send_hardware_message)
2134 user_handle_t win; /* window handle */
2135 hw_input_t input; /* input data */
2136 unsigned int flags; /* flags (see below) */
2137 VARARG(report,bytes); /* HID report data */
2138 @REPLY
2139 int wait; /* do we need to wait for a reply? */
2140 int prev_x; /* previous cursor position */
2141 int prev_y;
2142 int new_x; /* new cursor position */
2143 int new_y;
2144 @END
2145 #define SEND_HWMSG_INJECTED 0x01
2148 /* Get a message from the current queue */
2149 @REQ(get_message)
2150 unsigned int flags; /* PM_* flags */
2151 user_handle_t get_win; /* window handle to get */
2152 unsigned int get_first; /* first message code to get */
2153 unsigned int get_last; /* last message code to get */
2154 unsigned int hw_id; /* id of the previous hardware message (or 0) */
2155 unsigned int wake_mask; /* wakeup bits mask */
2156 unsigned int changed_mask; /* changed bits mask */
2157 @REPLY
2158 user_handle_t win; /* window handle */
2159 unsigned int msg; /* message code */
2160 lparam_t wparam; /* parameters */
2161 lparam_t lparam; /* parameters */
2162 int type; /* message type */
2163 int x; /* message x position */
2164 int y; /* message y position */
2165 unsigned int time; /* message time */
2166 unsigned int active_hooks; /* active hooks bitmap */
2167 data_size_t total; /* total size of extra data */
2168 VARARG(data,message_data); /* message data for sent messages */
2169 @END
2172 /* Reply to a sent message */
2173 @REQ(reply_message)
2174 int remove; /* should we remove the message? */
2175 lparam_t result; /* message result */
2176 VARARG(data,bytes); /* message data for sent messages */
2177 @END
2180 /* Accept and remove the current hardware message */
2181 @REQ(accept_hardware_message)
2182 unsigned int hw_id; /* id of the hardware message */
2183 @END
2186 /* Retrieve the reply for the last message sent */
2187 @REQ(get_message_reply)
2188 int cancel; /* cancel message if not ready? */
2189 @REPLY
2190 lparam_t result; /* message result */
2191 VARARG(data,bytes); /* message data for sent messages */
2192 @END
2195 /* Set a window timer */
2196 @REQ(set_win_timer)
2197 user_handle_t win; /* window handle */
2198 unsigned int msg; /* message to post */
2199 unsigned int rate; /* timer rate in ms */
2200 lparam_t id; /* timer id */
2201 lparam_t lparam; /* message lparam (callback proc) */
2202 @REPLY
2203 lparam_t id; /* timer id */
2204 @END
2207 /* Kill a window timer */
2208 @REQ(kill_win_timer)
2209 user_handle_t win; /* window handle */
2210 lparam_t id; /* timer id */
2211 unsigned int msg; /* message to post */
2212 @END
2215 /* check if the thread owning the window is hung */
2216 @REQ(is_window_hung)
2217 user_handle_t win; /* window handle */
2218 @REPLY
2219 int is_hung;
2220 @END
2223 /* Retrieve info about a serial port */
2224 @REQ(get_serial_info)
2225 obj_handle_t handle; /* handle to comm port */
2226 int flags;
2227 @REPLY
2228 unsigned int eventmask;
2229 unsigned int cookie;
2230 unsigned int pending_write;
2231 @END
2234 /* Set info about a serial port */
2235 @REQ(set_serial_info)
2236 obj_handle_t handle; /* handle to comm port */
2237 int flags; /* bitmask to set values (see below) */
2238 @END
2239 #define SERIALINFO_PENDING_WRITE 0x04
2240 #define SERIALINFO_PENDING_WAIT 0x08
2242 /* Cancel all sync io on a thread */
2243 @REQ(cancel_sync)
2244 obj_handle_t handle; /* thread handle on which to cancel io */
2245 client_ptr_t iosb; /* I/O status block (NULL=all) */
2246 @END
2248 /* Create an async I/O */
2249 @REQ(register_async)
2250 int type; /* type of queue to look after */
2251 async_data_t async; /* async I/O parameters */
2252 int count; /* count - usually # of bytes to be read/written */
2253 @END
2254 #define ASYNC_TYPE_READ 0x01
2255 #define ASYNC_TYPE_WRITE 0x02
2256 #define ASYNC_TYPE_WAIT 0x03
2259 /* Cancel all async op on a fd */
2260 @REQ(cancel_async)
2261 obj_handle_t handle; /* handle to comm port, socket or file */
2262 client_ptr_t iosb; /* I/O status block (NULL=all) */
2263 int only_thread; /* cancel matching this thread */
2264 @END
2267 /* Retrieve results of an async */
2268 @REQ(get_async_result)
2269 client_ptr_t user_arg; /* user arg used to identify async */
2270 @REPLY
2271 VARARG(out_data,bytes); /* iosb output data */
2272 @END
2275 /* Notify direct completion of async and close the wait handle if not blocking */
2276 @REQ(set_async_direct_result)
2277 obj_handle_t handle; /* wait handle */
2278 apc_param_t information; /* IO_STATUS_BLOCK Information */
2279 unsigned int status; /* completion status */
2280 int mark_pending; /* set async to pending before completion? */
2281 @REPLY
2282 obj_handle_t handle; /* wait handle, or NULL if closed */
2283 @END
2286 /* Perform a read on a file object */
2287 @REQ(read)
2288 async_data_t async; /* async I/O parameters */
2289 file_pos_t pos; /* read position */
2290 @REPLY
2291 obj_handle_t wait; /* handle to wait on for blocking read */
2292 unsigned int options; /* device open options */
2293 VARARG(data,bytes); /* read data */
2294 @END
2297 /* Perform a write on a file object */
2298 @REQ(write)
2299 async_data_t async; /* async I/O parameters */
2300 file_pos_t pos; /* write position */
2301 VARARG(data,bytes); /* write data */
2302 @REPLY
2303 obj_handle_t wait; /* handle to wait on for blocking write */
2304 unsigned int options; /* device open options */
2305 data_size_t size; /* size written */
2306 @END
2309 /* Perform an ioctl on a file */
2310 @REQ(ioctl)
2311 ioctl_code_t code; /* ioctl code */
2312 async_data_t async; /* async I/O parameters */
2313 VARARG(in_data,bytes); /* ioctl input data */
2314 @REPLY
2315 obj_handle_t wait; /* handle to wait on for blocking ioctl */
2316 unsigned int options; /* device open options */
2317 VARARG(out_data,bytes); /* ioctl output data */
2318 @END
2321 /* Store results of an async irp */
2322 @REQ(set_irp_result)
2323 obj_handle_t handle; /* handle to the irp */
2324 unsigned int status; /* status of the irp */
2325 data_size_t size; /* result size (input or output depending on the operation) */
2326 VARARG(data,bytes); /* output data of the irp */
2327 @END
2330 /* Create a named pipe */
2331 @REQ(create_named_pipe)
2332 unsigned int access;
2333 unsigned int options;
2334 unsigned int sharing;
2335 unsigned int disposition;
2336 unsigned int maxinstances;
2337 unsigned int outsize;
2338 unsigned int insize;
2339 timeout_t timeout;
2340 unsigned int flags;
2341 VARARG(objattr,object_attributes); /* object attributes */
2342 @REPLY
2343 obj_handle_t handle; /* handle to the pipe */
2344 int created;
2345 @END
2347 /* flags in create_named_pipe and get_named_pipe_info */
2348 #define NAMED_PIPE_MESSAGE_STREAM_WRITE 0x0001
2349 #define NAMED_PIPE_MESSAGE_STREAM_READ 0x0002
2350 #define NAMED_PIPE_NONBLOCKING_MODE 0x0004
2351 #define NAMED_PIPE_SERVER_END 0x8000
2353 /* Set named pipe information by handle */
2354 @REQ(set_named_pipe_info)
2355 obj_handle_t handle;
2356 unsigned int flags;
2357 @END
2359 /* Create a window */
2360 @REQ(create_window)
2361 user_handle_t parent; /* parent window */
2362 user_handle_t owner; /* owner window */
2363 atom_t atom; /* class atom */
2364 mod_handle_t instance; /* module instance */
2365 int dpi; /* system DPI */
2366 int awareness; /* thread DPI awareness */
2367 unsigned int style; /* window style */
2368 unsigned int ex_style; /* window extended style */
2369 VARARG(class,unicode_str); /* class name */
2370 @REPLY
2371 user_handle_t handle; /* created window */
2372 user_handle_t parent; /* full handle of parent */
2373 user_handle_t owner; /* full handle of owner */
2374 int extra; /* number of extra bytes */
2375 client_ptr_t class_ptr; /* pointer to class in client address space */
2376 int dpi; /* window DPI if not per-monitor aware */
2377 int awareness; /* window DPI awareness */
2378 @END
2381 /* Destroy a window */
2382 @REQ(destroy_window)
2383 user_handle_t handle; /* handle to the window */
2384 @END
2387 /* Retrieve the desktop window for the current thread */
2388 @REQ(get_desktop_window)
2389 int force; /* force creation if it doesn't exist */
2390 @REPLY
2391 user_handle_t top_window; /* handle to the desktop window */
2392 user_handle_t msg_window; /* handle to the top-level HWND_MESSAGE parent */
2393 @END
2396 /* Set a window owner */
2397 @REQ(set_window_owner)
2398 user_handle_t handle; /* handle to the window */
2399 user_handle_t owner; /* new owner */
2400 @REPLY
2401 user_handle_t full_owner; /* full handle of new owner */
2402 user_handle_t prev_owner; /* full handle of previous owner */
2403 @END
2406 /* Get information from a window handle */
2407 @REQ(get_window_info)
2408 user_handle_t handle; /* handle to the window */
2409 @REPLY
2410 user_handle_t full_handle; /* full 32-bit handle */
2411 user_handle_t last_active; /* last active popup */
2412 process_id_t pid; /* process owning the window */
2413 thread_id_t tid; /* thread owning the window */
2414 atom_t atom; /* class atom */
2415 int is_unicode; /* ANSI or unicode */
2416 int dpi; /* window DPI */
2417 int awareness; /* DPI awareness */
2418 @END
2421 /* Set some information in a window */
2422 @REQ(set_window_info)
2423 unsigned short flags; /* flags for fields to set (see below) */
2424 short int is_unicode; /* ANSI or unicode */
2425 user_handle_t handle; /* handle to the window */
2426 unsigned int style; /* window style */
2427 unsigned int ex_style; /* window extended style */
2428 data_size_t extra_size; /* size to set in extra bytes */
2429 mod_handle_t instance; /* creator instance */
2430 lparam_t user_data; /* user-specific data */
2431 lparam_t extra_value; /* value to set in extra bytes or window id */
2432 int extra_offset; /* offset to set in extra bytes */
2433 @REPLY
2434 unsigned int old_style; /* old window style */
2435 unsigned int old_ex_style; /* old window extended style */
2436 mod_handle_t old_instance; /* old creator instance */
2437 lparam_t old_user_data; /* old user-specific data */
2438 lparam_t old_extra_value; /* old value in extra bytes */
2439 lparam_t old_id; /* old window id */
2440 @END
2441 #define SET_WIN_STYLE 0x01
2442 #define SET_WIN_EXSTYLE 0x02
2443 #define SET_WIN_ID 0x04
2444 #define SET_WIN_INSTANCE 0x08
2445 #define SET_WIN_USERDATA 0x10
2446 #define SET_WIN_EXTRA 0x20
2447 #define SET_WIN_UNICODE 0x40
2450 /* Set the parent of a window */
2451 @REQ(set_parent)
2452 user_handle_t handle; /* handle to the window */
2453 user_handle_t parent; /* handle to the parent */
2454 @REPLY
2455 user_handle_t old_parent; /* old parent window */
2456 user_handle_t full_parent; /* full handle of new parent */
2457 int dpi; /* new window DPI if not per-monitor aware */
2458 int awareness; /* new DPI awareness */
2459 @END
2462 /* Get a list of the window parents, up to the root of the tree */
2463 @REQ(get_window_parents)
2464 user_handle_t handle; /* handle to the window */
2465 @REPLY
2466 int count; /* total count of parents */
2467 VARARG(parents,user_handles); /* parent handles */
2468 @END
2471 /* Get a list of the window children */
2472 @REQ(get_window_children)
2473 obj_handle_t desktop; /* handle to desktop */
2474 user_handle_t parent; /* parent window */
2475 atom_t atom; /* class atom for the listed children */
2476 thread_id_t tid; /* thread owning the listed children */
2477 VARARG(class,unicode_str); /* class name */
2478 @REPLY
2479 int count; /* total count of children */
2480 VARARG(children,user_handles); /* children handles */
2481 @END
2484 /* Get a list of the window children that contain a given point */
2485 @REQ(get_window_children_from_point)
2486 user_handle_t parent; /* parent window */
2487 int x; /* point in parent coordinates */
2488 int y;
2489 int dpi; /* dpi for the point coordinates */
2490 @REPLY
2491 int count; /* total count of children */
2492 VARARG(children,user_handles); /* children handles */
2493 @END
2496 /* Get window tree information from a window handle */
2497 @REQ(get_window_tree)
2498 user_handle_t handle; /* handle to the window */
2499 @REPLY
2500 user_handle_t parent; /* parent window */
2501 user_handle_t owner; /* owner window */
2502 user_handle_t next_sibling; /* next sibling in Z-order */
2503 user_handle_t prev_sibling; /* prev sibling in Z-order */
2504 user_handle_t first_sibling; /* first sibling in Z-order */
2505 user_handle_t last_sibling; /* last sibling in Z-order */
2506 user_handle_t first_child; /* first child */
2507 user_handle_t last_child; /* last child */
2508 @END
2510 /* Set the position and Z order of a window */
2511 @REQ(set_window_pos)
2512 unsigned short swp_flags; /* SWP_* flags */
2513 unsigned short paint_flags; /* paint flags (see below) */
2514 user_handle_t handle; /* handle to the window */
2515 user_handle_t previous; /* previous window in Z order */
2516 rectangle_t window; /* window rectangle (in parent coords) */
2517 rectangle_t client; /* client rectangle (in parent coords) */
2518 VARARG(valid,rectangles); /* valid rectangles from WM_NCCALCSIZE (in parent coords) */
2519 @REPLY
2520 unsigned int new_style; /* new window style */
2521 unsigned int new_ex_style; /* new window extended style */
2522 user_handle_t surface_win; /* parent window that holds the surface */
2523 int needs_update; /* whether the surface region needs an update */
2524 @END
2525 #define SET_WINPOS_PAINT_SURFACE 0x01 /* window has a paintable surface */
2526 #define SET_WINPOS_PIXEL_FORMAT 0x02 /* window has a custom pixel format */
2528 /* Get the window and client rectangles of a window */
2529 @REQ(get_window_rectangles)
2530 user_handle_t handle; /* handle to the window */
2531 int relative; /* coords relative to (see below) */
2532 int dpi; /* DPI to map to, or zero for per-monitor DPI */
2533 @REPLY
2534 rectangle_t window; /* window rectangle */
2535 rectangle_t client; /* client rectangle */
2536 @END
2537 enum coords_relative
2539 COORDS_CLIENT, /* relative to client area */
2540 COORDS_WINDOW, /* relative to whole window area */
2541 COORDS_PARENT, /* relative to parent's client area */
2542 COORDS_SCREEN /* relative to screen origin */
2546 /* Get the window text */
2547 @REQ(get_window_text)
2548 user_handle_t handle; /* handle to the window */
2549 @REPLY
2550 data_size_t length; /* total length in WCHARs */
2551 VARARG(text,unicode_str); /* window text */
2552 @END
2555 /* Set the window text */
2556 @REQ(set_window_text)
2557 user_handle_t handle; /* handle to the window */
2558 VARARG(text,unicode_str); /* window text */
2559 @END
2562 /* Get the coordinates offset between two windows */
2563 @REQ(get_windows_offset)
2564 user_handle_t from; /* handle to the first window */
2565 user_handle_t to; /* handle to the second window */
2566 int dpi; /* DPI to map to, or zero for per-monitor DPI */
2567 @REPLY
2568 int x; /* x coordinate offset */
2569 int y; /* y coordinate offset */
2570 int mirror; /* whether to mirror the x coordinate */
2571 @END
2574 /* Get the visible region of a window */
2575 @REQ(get_visible_region)
2576 user_handle_t window; /* handle to the window */
2577 unsigned int flags; /* DCX flags */
2578 @REPLY
2579 user_handle_t top_win; /* top window to clip against */
2580 rectangle_t top_rect; /* top window visible rect with screen coords */
2581 rectangle_t win_rect; /* window rect in screen coords */
2582 unsigned int paint_flags; /* paint flags (from SET_WINPOS_* flags) */
2583 data_size_t total_size; /* total size of the resulting region */
2584 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2585 @END
2588 /* Get the visible surface region of a window */
2589 @REQ(get_surface_region)
2590 user_handle_t window; /* handle to the window */
2591 @REPLY
2592 rectangle_t visible_rect; /* window visible rect in screen coords */
2593 data_size_t total_size; /* total size of the resulting region */
2594 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2595 @END
2598 /* Get the window region */
2599 @REQ(get_window_region)
2600 user_handle_t window; /* handle to the window */
2601 @REPLY
2602 data_size_t total_size; /* total size of the resulting region */
2603 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2604 @END
2607 /* Set the window region */
2608 @REQ(set_window_region)
2609 user_handle_t window; /* handle to the window */
2610 int redraw; /* redraw the window? */
2611 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2612 @END
2615 /* Get the window update region */
2616 @REQ(get_update_region)
2617 user_handle_t window; /* handle to the window */
2618 user_handle_t from_child; /* child to start searching from */
2619 unsigned int flags; /* update flags (see below) */
2620 @REPLY
2621 user_handle_t child; /* child to repaint (or window itself) */
2622 unsigned int flags; /* resulting update flags (see below) */
2623 data_size_t total_size; /* total size of the resulting region */
2624 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2625 @END
2626 #define UPDATE_NONCLIENT 0x001 /* get region for repainting non-client area */
2627 #define UPDATE_ERASE 0x002 /* get region for erasing client area */
2628 #define UPDATE_PAINT 0x004 /* get region for painting client area */
2629 #define UPDATE_INTERNALPAINT 0x008 /* get region if internal paint is pending */
2630 #define UPDATE_ALLCHILDREN 0x010 /* force repaint of all children */
2631 #define UPDATE_NOCHILDREN 0x020 /* don't try to repaint any children */
2632 #define UPDATE_NOREGION 0x040 /* don't return a region, only the flags */
2633 #define UPDATE_DELAYED_ERASE 0x080 /* still needs erase after BeginPaint */
2634 #define UPDATE_CLIPCHILDREN 0x100 /* remove clipped children from the update region */
2637 /* Update the z order of a window so that a given rectangle is fully visible */
2638 @REQ(update_window_zorder)
2639 user_handle_t window; /* handle to the window */
2640 rectangle_t rect; /* rectangle that must be visible (in client coords) */
2641 @END
2644 /* Mark parts of a window as needing a redraw */
2645 @REQ(redraw_window)
2646 user_handle_t window; /* handle to the window */
2647 unsigned int flags; /* RDW_* flags */
2648 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2649 @END
2652 /* Set a window property */
2653 @REQ(set_window_property)
2654 user_handle_t window; /* handle to the window */
2655 lparam_t data; /* data to store */
2656 atom_t atom; /* property atom (if no name specified) */
2657 VARARG(name,unicode_str); /* property name */
2658 @END
2661 /* Remove a window property */
2662 @REQ(remove_window_property)
2663 user_handle_t window; /* handle to the window */
2664 atom_t atom; /* property atom (if no name specified) */
2665 VARARG(name,unicode_str); /* property name */
2666 @REPLY
2667 lparam_t data; /* data stored in property */
2668 @END
2671 /* Get a window property */
2672 @REQ(get_window_property)
2673 user_handle_t window; /* handle to the window */
2674 atom_t atom; /* property atom (if no name specified) */
2675 VARARG(name,unicode_str); /* property name */
2676 @REPLY
2677 lparam_t data; /* data stored in property */
2678 @END
2681 /* Get the list of properties of a window */
2682 @REQ(get_window_properties)
2683 user_handle_t window; /* handle to the window */
2684 @REPLY
2685 int total; /* total number of properties */
2686 VARARG(props,properties); /* list of properties */
2687 @END
2690 /* Create a window station */
2691 @REQ(create_winstation)
2692 unsigned int flags; /* window station flags */
2693 unsigned int access; /* wanted access rights */
2694 unsigned int attributes; /* object attributes */
2695 obj_handle_t rootdir; /* root directory */
2696 VARARG(name,unicode_str); /* object name */
2697 @REPLY
2698 obj_handle_t handle; /* handle to the window station */
2699 @END
2702 /* Open a handle to a window station */
2703 @REQ(open_winstation)
2704 unsigned int access; /* wanted access rights */
2705 unsigned int attributes; /* object attributes */
2706 obj_handle_t rootdir; /* root directory */
2707 VARARG(name,unicode_str); /* object name */
2708 @REPLY
2709 obj_handle_t handle; /* handle to the window station */
2710 @END
2713 /* Close a window station */
2714 @REQ(close_winstation)
2715 obj_handle_t handle; /* handle to the window station */
2716 @END
2719 /* Get the process current window station */
2720 @REQ(get_process_winstation)
2721 @REPLY
2722 obj_handle_t handle; /* handle to the window station */
2723 @END
2726 /* Set the process current window station */
2727 @REQ(set_process_winstation)
2728 obj_handle_t handle; /* handle to the window station */
2729 @END
2732 /* Enumerate window stations */
2733 @REQ(enum_winstation)
2734 unsigned int index; /* current index */
2735 @REPLY
2736 unsigned int next; /* next index */
2737 VARARG(name,unicode_str); /* window station name */
2738 @END
2741 /* Create a desktop */
2742 @REQ(create_desktop)
2743 unsigned int flags; /* desktop flags */
2744 unsigned int access; /* wanted access rights */
2745 unsigned int attributes; /* object attributes */
2746 VARARG(name,unicode_str); /* object name */
2747 @REPLY
2748 obj_handle_t handle; /* handle to the desktop */
2749 @END
2752 /* Open a handle to a desktop */
2753 @REQ(open_desktop)
2754 obj_handle_t winsta; /* window station to open (null allowed) */
2755 unsigned int flags; /* desktop flags */
2756 unsigned int access; /* wanted access rights */
2757 unsigned int attributes; /* object attributes */
2758 VARARG(name,unicode_str); /* object name */
2759 @REPLY
2760 obj_handle_t handle; /* handle to the desktop */
2761 @END
2764 /* Open a handle to current input desktop */
2765 @REQ(open_input_desktop)
2766 unsigned int flags; /* desktop flags */
2767 unsigned int access; /* wanted access rights */
2768 unsigned int attributes; /* object attributes */
2769 @REPLY
2770 obj_handle_t handle; /* handle to the desktop */
2771 @END
2774 /* Close a desktop */
2775 @REQ(close_desktop)
2776 obj_handle_t handle; /* handle to the desktop */
2777 @END
2780 /* Get the thread current desktop */
2781 @REQ(get_thread_desktop)
2782 thread_id_t tid; /* thread id */
2783 @REPLY
2784 obj_handle_t handle; /* handle to the desktop */
2785 @END
2788 /* Set the thread current desktop */
2789 @REQ(set_thread_desktop)
2790 obj_handle_t handle; /* handle to the desktop */
2791 @END
2794 /* Enumerate desktops */
2795 @REQ(enum_desktop)
2796 obj_handle_t winstation; /* handle to the window station */
2797 unsigned int index; /* current index */
2798 @REPLY
2799 unsigned int next; /* next index */
2800 VARARG(name,unicode_str); /* window station name */
2801 @END
2804 /* Get/set information about a user object (window station or desktop) */
2805 @REQ(set_user_object_info)
2806 obj_handle_t handle; /* handle to the object */
2807 unsigned int flags; /* information to set/get */
2808 unsigned int obj_flags; /* new object flags */
2809 @REPLY
2810 int is_desktop; /* is object a desktop? */
2811 unsigned int old_obj_flags; /* old object flags */
2812 VARARG(name,unicode_str); /* object name */
2813 @END
2814 #define SET_USER_OBJECT_SET_FLAGS 1
2815 #define SET_USER_OBJECT_GET_FULL_NAME 2
2818 /* Register a hotkey */
2819 @REQ(register_hotkey)
2820 user_handle_t window; /* handle to the window */
2821 int id; /* hotkey identifier */
2822 unsigned int flags; /* modifier keys */
2823 unsigned int vkey; /* virtual key code */
2824 @REPLY
2825 int replaced; /* did we replace an existing hotkey? */
2826 unsigned int flags; /* flags of replaced hotkey */
2827 unsigned int vkey; /* virtual key code of replaced hotkey */
2828 @END
2831 /* Unregister a hotkey */
2832 @REQ(unregister_hotkey)
2833 user_handle_t window; /* handle to the window */
2834 int id; /* hotkey identifier */
2835 @REPLY
2836 unsigned int flags; /* flags of removed hotkey */
2837 unsigned int vkey; /* virtual key code of removed hotkey */
2838 @END
2841 /* Attach (or detach) thread inputs */
2842 @REQ(attach_thread_input)
2843 thread_id_t tid_from; /* thread to be attached */
2844 thread_id_t tid_to; /* thread to which tid_from should be attached */
2845 int attach; /* is it an attach? */
2846 @END
2849 /* Get input data for a given thread */
2850 @REQ(get_thread_input)
2851 thread_id_t tid; /* id of thread */
2852 @REPLY
2853 user_handle_t focus; /* handle to the focus window */
2854 user_handle_t capture; /* handle to the capture window */
2855 user_handle_t active; /* handle to the active window */
2856 user_handle_t foreground; /* handle to the global foreground window */
2857 user_handle_t menu_owner; /* handle to the menu owner */
2858 user_handle_t move_size; /* handle to the moving/resizing window */
2859 user_handle_t caret; /* handle to the caret window */
2860 user_handle_t cursor; /* handle to the cursor */
2861 int show_count; /* cursor show count */
2862 rectangle_t rect; /* caret rectangle */
2863 @END
2866 /* Get the time of the last input event */
2867 @REQ(get_last_input_time)
2868 @REPLY
2869 unsigned int time;
2870 @END
2873 /* Retrieve queue keyboard state for current thread or global async state */
2874 @REQ(get_key_state)
2875 int async; /* whether to query the async state */
2876 int key; /* optional key code or -1 */
2877 @REPLY
2878 unsigned char state; /* state of specified key */
2879 VARARG(keystate,bytes); /* state array for all the keys */
2880 @END
2882 /* Set queue keyboard state for current thread */
2883 @REQ(set_key_state)
2884 int async; /* whether to change the async state too */
2885 VARARG(keystate,bytes); /* state array for all the keys */
2886 @END
2888 /* Set the system foreground window */
2889 @REQ(set_foreground_window)
2890 user_handle_t handle; /* handle to the foreground window */
2891 @REPLY
2892 user_handle_t previous; /* handle to the previous foreground window */
2893 int send_msg_old; /* whether we have to send a msg to the old window */
2894 int send_msg_new; /* whether we have to send a msg to the new window */
2895 @END
2897 /* Set the current thread focus window */
2898 @REQ(set_focus_window)
2899 user_handle_t handle; /* handle to the focus window */
2900 @REPLY
2901 user_handle_t previous; /* handle to the previous focus window */
2902 @END
2904 /* Set the current thread active window */
2905 @REQ(set_active_window)
2906 user_handle_t handle; /* handle to the active window */
2907 @REPLY
2908 user_handle_t previous; /* handle to the previous active window */
2909 @END
2911 /* Set the current thread capture window */
2912 @REQ(set_capture_window)
2913 user_handle_t handle; /* handle to the capture window */
2914 unsigned int flags; /* capture flags (see below) */
2915 @REPLY
2916 user_handle_t previous; /* handle to the previous capture window */
2917 user_handle_t full_handle; /* full 32-bit handle of new capture window */
2918 @END
2919 #define CAPTURE_MENU 0x01 /* capture is for a menu */
2920 #define CAPTURE_MOVESIZE 0x02 /* capture is for moving/resizing */
2923 /* Set the current thread caret window */
2924 @REQ(set_caret_window)
2925 user_handle_t handle; /* handle to the caret window */
2926 int width; /* caret width */
2927 int height; /* caret height */
2928 @REPLY
2929 user_handle_t previous; /* handle to the previous caret window */
2930 rectangle_t old_rect; /* previous caret rectangle */
2931 int old_hide; /* previous hide count */
2932 int old_state; /* previous caret state (1=on, 0=off) */
2933 @END
2936 /* Set the current thread caret information */
2937 @REQ(set_caret_info)
2938 unsigned int flags; /* caret flags (see below) */
2939 user_handle_t handle; /* handle to the caret window */
2940 int x; /* caret x position */
2941 int y; /* caret y position */
2942 int hide; /* increment for hide count (can be negative to show it) */
2943 int state; /* caret state (see below) */
2944 @REPLY
2945 user_handle_t full_handle; /* handle to the current caret window */
2946 rectangle_t old_rect; /* previous caret rectangle */
2947 int old_hide; /* previous hide count */
2948 int old_state; /* previous caret state (1=on, 0=off) */
2949 @END
2950 #define SET_CARET_POS 0x01 /* set the caret position from x,y */
2951 #define SET_CARET_HIDE 0x02 /* increment the caret hide count */
2952 #define SET_CARET_STATE 0x04 /* set the caret on/off state */
2953 enum caret_state
2955 CARET_STATE_OFF, /* off */
2956 CARET_STATE_ON, /* on */
2957 CARET_STATE_TOGGLE, /* toggle current state */
2958 CARET_STATE_ON_IF_MOVED /* on if the position differs, unchanged otherwise */
2962 /* Set a window hook */
2963 @REQ(set_hook)
2964 int id; /* id of the hook */
2965 process_id_t pid; /* id of process to set the hook into */
2966 thread_id_t tid; /* id of thread to set the hook into */
2967 int event_min;
2968 int event_max;
2969 client_ptr_t proc; /* hook procedure */
2970 int flags;
2971 int unicode; /* is it a unicode hook? */
2972 VARARG(module,unicode_str); /* module name */
2973 @REPLY
2974 user_handle_t handle; /* handle to the hook */
2975 unsigned int active_hooks; /* active hooks bitmap */
2976 @END
2979 /* Remove a window hook */
2980 @REQ(remove_hook)
2981 user_handle_t handle; /* handle to the hook */
2982 client_ptr_t proc; /* hook procedure if handle is 0 */
2983 int id; /* id of the hook if handle is 0 */
2984 @REPLY
2985 unsigned int active_hooks; /* active hooks bitmap */
2986 @END
2989 /* Start calling a hook chain */
2990 @REQ(start_hook_chain)
2991 int id; /* id of the hook */
2992 int event; /* signalled event */
2993 user_handle_t window; /* handle to the event window */
2994 int object_id; /* object id for out of context winevent */
2995 int child_id; /* child id for out of context winevent */
2996 @REPLY
2997 user_handle_t handle; /* handle to the next hook */
2998 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2999 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
3000 int unicode; /* is it a unicode hook? */
3001 client_ptr_t proc; /* hook procedure */
3002 unsigned int active_hooks; /* active hooks bitmap */
3003 VARARG(module,unicode_str); /* module name */
3004 @END
3007 /* Finished calling a hook chain */
3008 @REQ(finish_hook_chain)
3009 int id; /* id of the hook */
3010 @END
3013 /* Get the hook information */
3014 @REQ(get_hook_info)
3015 user_handle_t handle; /* handle to the current hook */
3016 int get_next; /* do we want info about current or next hook? */
3017 int event; /* signalled event */
3018 user_handle_t window; /* handle to the event window */
3019 int object_id; /* object id for out of context winevent */
3020 int child_id; /* child id for out of context winevent */
3021 @REPLY
3022 user_handle_t handle; /* handle to the hook */
3023 int id; /* id of the hook */
3024 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
3025 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
3026 client_ptr_t proc; /* hook procedure */
3027 int unicode; /* is it a unicode hook? */
3028 VARARG(module,unicode_str); /* module name */
3029 @END
3032 /* Create a window class */
3033 @REQ(create_class)
3034 int local; /* is it a local class? */
3035 atom_t atom; /* class atom */
3036 unsigned int style; /* class style */
3037 mod_handle_t instance; /* module instance */
3038 int extra; /* number of extra class bytes */
3039 int win_extra; /* number of window extra bytes */
3040 client_ptr_t client_ptr; /* pointer to class in client address space */
3041 data_size_t name_offset; /* base class name offset for specified atom */
3042 VARARG(name,unicode_str); /* class name */
3043 @REPLY
3044 atom_t atom; /* resulting class atom */
3045 @END
3048 /* Destroy a window class */
3049 @REQ(destroy_class)
3050 atom_t atom; /* class atom */
3051 mod_handle_t instance; /* module instance */
3052 VARARG(name,unicode_str); /* class name */
3053 @REPLY
3054 client_ptr_t client_ptr; /* pointer to class in client address space */
3055 @END
3058 /* Set some information in a class */
3059 @REQ(set_class_info)
3060 user_handle_t window; /* handle to the window */
3061 unsigned int flags; /* flags for info to set (see below) */
3062 atom_t atom; /* class atom */
3063 unsigned int style; /* class style */
3064 int win_extra; /* number of window extra bytes */
3065 mod_handle_t instance; /* module instance */
3066 int extra_offset; /* offset to set in extra bytes */
3067 data_size_t extra_size; /* size to set in extra bytes */
3068 lparam_t extra_value; /* value to set in extra bytes */
3069 @REPLY
3070 atom_t old_atom; /* previous class atom */
3071 atom_t base_atom; /* base class atom */
3072 mod_handle_t old_instance; /* previous module instance */
3073 lparam_t old_extra_value; /* old value in extra bytes */
3074 unsigned int old_style; /* previous class style */
3075 int old_extra; /* previous number of class extra bytes */
3076 int old_win_extra; /* previous number of window extra bytes */
3077 @END
3078 #define SET_CLASS_ATOM 0x0001
3079 #define SET_CLASS_STYLE 0x0002
3080 #define SET_CLASS_WINEXTRA 0x0004
3081 #define SET_CLASS_INSTANCE 0x0008
3082 #define SET_CLASS_EXTRA 0x0010
3085 /* Open the clipboard */
3086 @REQ(open_clipboard)
3087 user_handle_t window; /* clipboard window */
3088 @REPLY
3089 user_handle_t owner; /* current clipboard owner */
3090 @END
3093 /* Close the clipboard */
3094 @REQ(close_clipboard)
3095 @REPLY
3096 user_handle_t viewer; /* first clipboard viewer */
3097 user_handle_t owner; /* current clipboard owner */
3098 @END
3101 /* Empty the clipboard and grab ownership */
3102 @REQ(empty_clipboard)
3103 @END
3106 /* Add a data format to the clipboard */
3107 @REQ(set_clipboard_data)
3108 unsigned int format; /* clipboard format of the data */
3109 unsigned int lcid; /* locale id to use for synthesizing text formats */
3110 VARARG(data,bytes); /* data contents */
3111 @REPLY
3112 unsigned int seqno; /* sequence number for the set data */
3113 @END
3116 /* Fetch a data format from the clipboard */
3117 @REQ(get_clipboard_data)
3118 unsigned int format; /* clipboard format of the data */
3119 int render; /* will we try to render it if missing? */
3120 int cached; /* do we already have it in the client-side cache? */
3121 unsigned int seqno; /* sequence number for the data in the cache */
3122 @REPLY
3123 unsigned int from; /* for synthesized data, format to generate it from */
3124 user_handle_t owner; /* clipboard owner for delayed-rendered formats */
3125 unsigned int seqno; /* sequence number for the originally set data */
3126 data_size_t total; /* total data size */
3127 VARARG(data,bytes); /* data contents */
3128 @END
3131 /* Retrieve a list of available formats */
3132 @REQ(get_clipboard_formats)
3133 unsigned int format; /* specific format to query, return all if 0 */
3134 @REPLY
3135 unsigned int count; /* count of available formats */
3136 VARARG(formats,uints); /* array of available formats */
3137 @END
3140 /* Retrieve the next available format */
3141 @REQ(enum_clipboard_formats)
3142 unsigned int previous; /* previous format, or first if 0 */
3143 @REPLY
3144 unsigned int format; /* next format */
3145 @END
3148 /* Release ownership of the clipboard */
3149 @REQ(release_clipboard)
3150 user_handle_t owner; /* clipboard owner to release */
3151 @REPLY
3152 user_handle_t viewer; /* first clipboard viewer */
3153 user_handle_t owner; /* current clipboard owner */
3154 @END
3157 /* Get clipboard information */
3158 @REQ(get_clipboard_info)
3159 @REPLY
3160 user_handle_t window; /* clipboard window */
3161 user_handle_t owner; /* clipboard owner */
3162 user_handle_t viewer; /* clipboard viewer */
3163 unsigned int seqno; /* current sequence number */
3164 @END
3167 /* Set the clipboard viewer window */
3168 @REQ(set_clipboard_viewer)
3169 user_handle_t viewer; /* clipboard viewer */
3170 user_handle_t previous; /* if non-zero, check that this was the previous viewer */
3171 @REPLY
3172 user_handle_t old_viewer; /* previous clipboard viewer */
3173 user_handle_t owner; /* clipboard owner */
3174 @END
3177 /* Add a clipboard listener window */
3178 @REQ(add_clipboard_listener)
3179 user_handle_t window; /* clipboard listener window */
3180 @END
3183 /* Remove a clipboard listener window */
3184 @REQ(remove_clipboard_listener)
3185 user_handle_t window; /* clipboard listener window */
3186 @END
3189 /* Open a security token */
3190 @REQ(open_token)
3191 obj_handle_t handle; /* handle to the thread or process */
3192 unsigned int access; /* access rights to the new token */
3193 unsigned int attributes;/* object attributes */
3194 unsigned int flags; /* flags (see below) */
3195 @REPLY
3196 obj_handle_t token; /* handle to the token */
3197 @END
3198 #define OPEN_TOKEN_THREAD 1
3199 #define OPEN_TOKEN_AS_SELF 2
3202 /* Set/get the global windows */
3203 @REQ(set_global_windows)
3204 unsigned int flags; /* flags for fields to set (see below) */
3205 user_handle_t shell_window; /* handle to the new shell window */
3206 user_handle_t shell_listview; /* handle to the new shell listview window */
3207 user_handle_t progman_window; /* handle to the new program manager window */
3208 user_handle_t taskman_window; /* handle to the new task manager window */
3209 @REPLY
3210 user_handle_t old_shell_window; /* handle to the shell window */
3211 user_handle_t old_shell_listview; /* handle to the shell listview window */
3212 user_handle_t old_progman_window; /* handle to the new program manager window */
3213 user_handle_t old_taskman_window; /* handle to the new task manager window */
3214 @END
3215 #define SET_GLOBAL_SHELL_WINDOWS 0x01 /* set both main shell and listview windows */
3216 #define SET_GLOBAL_PROGMAN_WINDOW 0x02
3217 #define SET_GLOBAL_TASKMAN_WINDOW 0x04
3219 /* Adjust the privileges held by a token */
3220 @REQ(adjust_token_privileges)
3221 obj_handle_t handle; /* handle to the token */
3222 int disable_all; /* disable all privileges? */
3223 int get_modified_state; /* get modified privileges? */
3224 VARARG(privileges,luid_attr); /* privileges to enable/disable/remove */
3225 @REPLY
3226 unsigned int len; /* total length in bytes required to store token privileges */
3227 VARARG(privileges,luid_attr); /* modified privileges */
3228 @END
3230 /* Retrieves the set of privileges held by or available to a token */
3231 @REQ(get_token_privileges)
3232 obj_handle_t handle; /* handle to the token */
3233 @REPLY
3234 unsigned int len; /* total length in bytes required to store token privileges */
3235 VARARG(privileges,luid_attr); /* privileges held by or available to a token */
3236 @END
3238 /* Check the token has the required privileges */
3239 @REQ(check_token_privileges)
3240 obj_handle_t handle; /* handle to the token */
3241 int all_required; /* are all the privileges required for the check to succeed? */
3242 VARARG(privileges,luid_attr); /* privileges to check */
3243 @REPLY
3244 int has_privileges; /* does the token have the required privileges? */
3245 VARARG(privileges,luid_attr); /* privileges held by or available to a token */
3246 @END
3248 @REQ(duplicate_token)
3249 obj_handle_t handle; /* handle to the token to duplicate */
3250 unsigned int access; /* access rights to the new token */
3251 int primary; /* is the new token to be a primary one? */
3252 int impersonation_level; /* impersonation level of the new token */
3253 VARARG(objattr,object_attributes); /* object attributes */
3254 @REPLY
3255 obj_handle_t new_handle; /* duplicated handle */
3256 @END
3258 @REQ(filter_token)
3259 obj_handle_t handle; /* handle to the token to duplicate */
3260 unsigned int flags; /* flags */
3261 data_size_t privileges_size; /* size of privileges */
3262 VARARG(privileges,luid_attr,privileges_size); /* privileges to remove from new token */
3263 VARARG(disable_sids,sid); /* array of groups to remove from new token */
3264 @REPLY
3265 obj_handle_t new_handle; /* filtered handle */
3266 @END
3268 @REQ(access_check)
3269 obj_handle_t handle; /* handle to the token */
3270 unsigned int desired_access; /* desired access to the object */
3271 generic_map_t mapping; /* mapping to specific rights */
3272 VARARG(sd,security_descriptor); /* security descriptor to check */
3273 @REPLY
3274 unsigned int access_granted; /* access rights actually granted */
3275 unsigned int access_status; /* was access granted? */
3276 unsigned int privileges_len; /* length needed to store privileges */
3277 VARARG(privileges,luid_attr); /* privileges used during access check */
3278 @END
3280 @REQ(get_token_sid)
3281 obj_handle_t handle; /* handle to the token */
3282 unsigned int which_sid; /* which SID to retrieve from the token */
3283 @REPLY
3284 data_size_t sid_len; /* length needed to store sid */
3285 VARARG(sid,sid); /* the sid specified by which_sid from the token */
3286 @END
3288 @REQ(get_token_groups)
3289 obj_handle_t handle; /* handle to the token */
3290 unsigned int attr_mask; /* mask for wanted attributes */
3291 @REPLY
3292 data_size_t attr_len; /* length needed to store attrs */
3293 data_size_t sid_len; /* length needed to store sids */
3294 VARARG(attrs,uints,attr_len); /* group attributes */
3295 VARARG(sids,sids); /* group sids */
3296 @END
3298 @REQ(get_token_default_dacl)
3299 obj_handle_t handle; /* handle to the token */
3300 @REPLY
3301 data_size_t acl_len; /* length needed to store access control list */
3302 VARARG(acl,acl); /* access control list */
3303 @END
3305 @REQ(set_token_default_dacl)
3306 obj_handle_t handle; /* handle to the token */
3307 VARARG(acl,acl); /* default dacl to set */
3308 @END
3310 @REQ(set_security_object)
3311 obj_handle_t handle; /* handle to the object */
3312 unsigned int security_info; /* which parts of security descriptor to set */
3313 VARARG(sd,security_descriptor); /* security descriptor to set */
3314 @END
3316 @REQ(get_security_object)
3317 obj_handle_t handle; /* handle to the object */
3318 unsigned int security_info; /* which parts of security descriptor to get */
3319 @REPLY
3320 unsigned int sd_len; /* buffer size needed for sd */
3321 VARARG(sd,security_descriptor); /* retrieved security descriptor */
3322 @END
3325 struct handle_info
3327 process_id_t owner;
3328 obj_handle_t handle;
3329 unsigned int access;
3330 unsigned int attributes;
3331 unsigned int type;
3334 /* Return a list of all opened handles */
3335 @REQ(get_system_handles)
3336 @REPLY
3337 unsigned int count; /* number of handles */
3338 VARARG(data,handle_infos); /* array of handle_infos */
3339 @END
3342 /* Create a mailslot */
3343 @REQ(create_mailslot)
3344 unsigned int access; /* wanted access rights */
3345 timeout_t read_timeout;
3346 unsigned int max_msgsize;
3347 VARARG(objattr,object_attributes); /* object attributes */
3348 @REPLY
3349 obj_handle_t handle; /* handle to the mailslot */
3350 @END
3353 /* Set mailslot information */
3354 @REQ(set_mailslot_info)
3355 obj_handle_t handle; /* handle to the mailslot */
3356 timeout_t read_timeout;
3357 unsigned int flags;
3358 @REPLY
3359 timeout_t read_timeout;
3360 unsigned int max_msgsize;
3361 @END
3362 #define MAILSLOT_SET_READ_TIMEOUT 1
3365 /* Create a directory object */
3366 @REQ(create_directory)
3367 unsigned int access; /* access flags */
3368 VARARG(objattr,object_attributes); /* object attributes */
3369 @REPLY
3370 obj_handle_t handle; /* handle to the directory */
3371 @END
3374 /* Open a directory object */
3375 @REQ(open_directory)
3376 unsigned int access; /* access flags */
3377 unsigned int attributes; /* object attributes */
3378 obj_handle_t rootdir; /* root directory */
3379 VARARG(directory_name,unicode_str); /* Directory name */
3380 @REPLY
3381 obj_handle_t handle; /* handle to the directory */
3382 @END
3385 /* Get a directory entry by index */
3386 @REQ(get_directory_entry)
3387 obj_handle_t handle; /* handle to the directory */
3388 unsigned int index; /* entry index */
3389 @REPLY
3390 data_size_t total_len; /* total length needed for strings */
3391 data_size_t name_len; /* length of the entry name in bytes */
3392 VARARG(name,unicode_str,name_len); /* entry name */
3393 VARARG(type,unicode_str); /* entry type */
3394 @END
3397 /* Create a symbolic link object */
3398 @REQ(create_symlink)
3399 unsigned int access; /* access flags */
3400 VARARG(objattr,object_attributes); /* object attributes */
3401 VARARG(target_name,unicode_str); /* target name */
3402 @REPLY
3403 obj_handle_t handle; /* handle to the symlink */
3404 @END
3407 /* Open a symbolic link object */
3408 @REQ(open_symlink)
3409 unsigned int access; /* access flags */
3410 unsigned int attributes; /* object attributes */
3411 obj_handle_t rootdir; /* root directory */
3412 VARARG(name,unicode_str); /* symlink name */
3413 @REPLY
3414 obj_handle_t handle; /* handle to the symlink */
3415 @END
3418 /* Query a symbolic link object */
3419 @REQ(query_symlink)
3420 obj_handle_t handle; /* handle to the symlink */
3421 @REPLY
3422 data_size_t total; /* total needed size for name */
3423 VARARG(target_name,unicode_str); /* target name */
3424 @END
3427 /* Query basic object information */
3428 @REQ(get_object_info)
3429 obj_handle_t handle; /* handle to the object */
3430 @REPLY
3431 unsigned int access; /* granted access mask */
3432 unsigned int ref_count; /* object ref count */
3433 unsigned int handle_count; /* object handle count */
3434 @END
3437 /* Query the full name of an object */
3438 @REQ(get_object_name)
3439 obj_handle_t handle; /* handle to the object */
3440 @REPLY
3441 data_size_t total; /* total needed size for name */
3442 VARARG(name,unicode_str); /* object name */
3443 @END
3446 /* Query object type name information */
3447 @REQ(get_object_type)
3448 obj_handle_t handle; /* handle to the object */
3449 @REPLY
3450 VARARG(info,object_type_info); /* type information */
3451 @END
3454 /* Query type information for all types */
3455 @REQ(get_object_types)
3456 @REPLY
3457 int count; /* total count of object types */
3458 VARARG(info,object_types_info); /* type information */
3459 @END
3462 /* Allocate a locally-unique identifier */
3463 @REQ(allocate_locally_unique_id)
3464 @REPLY
3465 struct luid luid;
3466 @END
3469 /* Create a device manager */
3470 @REQ(create_device_manager)
3471 unsigned int access; /* wanted access rights */
3472 unsigned int attributes; /* object attributes */
3473 @REPLY
3474 obj_handle_t handle; /* handle to the device */
3475 @END
3478 /* Create a device */
3479 @REQ(create_device)
3480 obj_handle_t rootdir; /* root directory */
3481 client_ptr_t user_ptr; /* opaque ptr for use by client */
3482 obj_handle_t manager; /* device manager */
3483 VARARG(name,unicode_str); /* object name */
3484 @END
3487 /* Delete a device */
3488 @REQ(delete_device)
3489 obj_handle_t manager; /* handle to the device manager */
3490 client_ptr_t device; /* pointer to the device */
3491 @END
3494 /* Retrieve the next pending device irp request */
3495 @REQ(get_next_device_request)
3496 obj_handle_t manager; /* handle to the device manager */
3497 obj_handle_t prev; /* handle to the previous irp */
3498 unsigned int status; /* status of the previous irp */
3499 client_ptr_t user_ptr; /* user pointer of the previous irp */
3500 int pending; /* was the previous irp marked pending? */
3501 unsigned int iosb_status; /* IOSB status of the previous irp */
3502 data_size_t result; /* IOSB result of the previous irp */
3503 VARARG(data,bytes); /* output data of the previous irp */
3504 @REPLY
3505 irp_params_t params; /* irp parameters */
3506 obj_handle_t next; /* handle to the next irp */
3507 thread_id_t client_tid; /* tid of thread calling irp */
3508 client_ptr_t client_thread; /* pointer to thread object of calling irp */
3509 data_size_t in_size; /* total needed input size */
3510 VARARG(next_data,bytes); /* input data of the next irp */
3511 @END
3514 /* Get kernel pointer from server object */
3515 @REQ(get_kernel_object_ptr)
3516 obj_handle_t manager; /* handle to the device manager */
3517 obj_handle_t handle; /* object handle */
3518 @REPLY
3519 client_ptr_t user_ptr; /* kernel object pointer */
3520 @END
3523 /* Associate kernel pointer with server object */
3524 @REQ(set_kernel_object_ptr)
3525 obj_handle_t manager; /* handle to the device manager */
3526 obj_handle_t handle; /* object handle */
3527 client_ptr_t user_ptr; /* kernel object pointer */
3528 @END
3531 /* Grab server object reference from kernel object pointer */
3532 @REQ(grab_kernel_object)
3533 obj_handle_t manager; /* handle to the device manager */
3534 client_ptr_t user_ptr; /* kernel object pointer */
3535 @END
3538 /* Release server object reference from kernel object pointer */
3539 @REQ(release_kernel_object)
3540 obj_handle_t manager; /* handle to the device manager */
3541 client_ptr_t user_ptr; /* kernel object pointer */
3542 @END
3545 /* Get handle from kernel object pointer */
3546 @REQ(get_kernel_object_handle)
3547 obj_handle_t manager; /* handle to the device manager */
3548 client_ptr_t user_ptr; /* kernel object pointer */
3549 unsigned int access; /* wanted access rights */
3550 @REPLY
3551 obj_handle_t handle; /* kernel object handle */
3552 @END
3555 /* Make the current process a system process */
3556 @REQ(make_process_system)
3557 obj_handle_t handle; /* handle to the process */
3558 @REPLY
3559 obj_handle_t event; /* event signaled when all user processes have exited */
3560 @END
3563 /* Get detailed fixed-size information about a token */
3564 @REQ(get_token_info)
3565 obj_handle_t handle; /* handle to the object */
3566 @REPLY
3567 struct luid token_id; /* locally-unique identifier of the token */
3568 struct luid modified_id; /* locally-unique identifier of the modified version of the token */
3569 unsigned int session_id; /* token session id */
3570 int primary; /* is the token primary or impersonation? */
3571 int impersonation_level; /* level of impersonation */
3572 int elevation; /* elevation type */
3573 int group_count; /* the number of groups the token is a member of */
3574 int privilege_count; /* the number of privileges the token has */
3575 @END
3578 /* Create a token which is an elevation counterpart to this token */
3579 @REQ(create_linked_token)
3580 obj_handle_t handle; /* handle to the token */
3581 @REPLY
3582 obj_handle_t linked; /* handle to the linked token */
3583 @END
3586 /* Create I/O completion port */
3587 @REQ(create_completion)
3588 unsigned int access; /* desired access to a port */
3589 unsigned int concurrent; /* max number of concurrent active threads */
3590 VARARG(objattr,object_attributes); /* object attributes */
3591 @REPLY
3592 obj_handle_t handle; /* port handle */
3593 @END
3596 /* Open I/O completion port */
3597 @REQ(open_completion)
3598 unsigned int access; /* desired access to a port */
3599 unsigned int attributes; /* object attributes */
3600 obj_handle_t rootdir; /* root directory */
3601 VARARG(filename,unicode_str); /* port name */
3602 @REPLY
3603 obj_handle_t handle; /* port handle */
3604 @END
3607 /* add completion to completion port */
3608 @REQ(add_completion)
3609 obj_handle_t handle; /* port handle */
3610 apc_param_t ckey; /* completion key */
3611 apc_param_t cvalue; /* completion value */
3612 apc_param_t information; /* IO_STATUS_BLOCK Information */
3613 unsigned int status; /* completion result */
3614 @END
3617 /* get completion from completion port queue */
3618 @REQ(remove_completion)
3619 obj_handle_t handle; /* port handle */
3620 @REPLY
3621 apc_param_t ckey; /* completion key */
3622 apc_param_t cvalue; /* completion value */
3623 apc_param_t information; /* IO_STATUS_BLOCK Information */
3624 unsigned int status; /* completion result */
3625 @END
3628 /* get completion queue depth */
3629 @REQ(query_completion)
3630 obj_handle_t handle; /* port handle */
3631 @REPLY
3632 unsigned int depth; /* completion queue depth */
3633 @END
3636 /* associate object with completion port */
3637 @REQ(set_completion_info)
3638 obj_handle_t handle; /* object handle */
3639 apc_param_t ckey; /* completion key */
3640 obj_handle_t chandle; /* port handle */
3641 @END
3644 /* check for associated completion and push msg */
3645 @REQ(add_fd_completion)
3646 obj_handle_t handle; /* async' object */
3647 apc_param_t cvalue; /* completion value */
3648 apc_param_t information; /* IO_STATUS_BLOCK Information */
3649 unsigned int status; /* completion status */
3650 int async; /* completion is an async result */
3651 @END
3654 /* set fd completion information */
3655 @REQ(set_fd_completion_mode)
3656 obj_handle_t handle; /* handle to a file or directory */
3657 unsigned int flags; /* completion notification flags */
3658 @END
3661 /* set fd disposition information */
3662 @REQ(set_fd_disp_info)
3663 obj_handle_t handle; /* handle to a file or directory */
3664 unsigned int flags; /* what actions should be taken when deleting a file */
3665 @END
3668 /* set fd name information */
3669 @REQ(set_fd_name_info)
3670 obj_handle_t handle; /* handle to a file or directory */
3671 obj_handle_t rootdir; /* root directory */
3672 data_size_t namelen; /* length of NT name in bytes */
3673 int link; /* link instead of renaming */
3674 int replace; /* replace an existing file? */
3675 VARARG(name,unicode_str,namelen); /* NT name */
3676 VARARG(filename,string); /* new file name */
3677 @END
3680 /* set fd eof information */
3681 @REQ(set_fd_eof_info)
3682 obj_handle_t handle; /* handle to a file or directory */
3683 file_pos_t eof; /* offset of eof of file */
3684 @END
3687 /* Retrieve layered info for a window */
3688 @REQ(get_window_layered_info)
3689 user_handle_t handle; /* handle to the window */
3690 @REPLY
3691 unsigned int color_key; /* color key */
3692 unsigned int alpha; /* alpha (0..255) */
3693 unsigned int flags; /* LWA_* flags */
3694 @END
3697 /* Set layered info for a window */
3698 @REQ(set_window_layered_info)
3699 user_handle_t handle; /* handle to the window */
3700 unsigned int color_key; /* color key */
3701 unsigned int alpha; /* alpha (0..255) */
3702 unsigned int flags; /* LWA_* flags */
3703 @END
3706 /* Allocate an arbitrary user handle */
3707 @REQ(alloc_user_handle)
3708 @REPLY
3709 user_handle_t handle; /* allocated handle */
3710 @END
3713 /* Free an arbitrary user handle */
3714 @REQ(free_user_handle)
3715 user_handle_t handle; /* handle to free*/
3716 @END
3719 /* Set/get the current cursor */
3720 @REQ(set_cursor)
3721 unsigned int flags; /* flags for fields to set (see below) */
3722 user_handle_t handle; /* handle to the cursor */
3723 int show_count; /* show count increment/decrement */
3724 int x; /* cursor position */
3725 int y;
3726 rectangle_t clip; /* cursor clip rectangle */
3727 @REPLY
3728 user_handle_t prev_handle; /* previous handle */
3729 int prev_count; /* previous show count */
3730 int prev_x; /* previous position */
3731 int prev_y;
3732 int new_x; /* new position */
3733 int new_y;
3734 rectangle_t new_clip; /* new clip rectangle */
3735 unsigned int last_change; /* time of last position change */
3736 @END
3737 #define SET_CURSOR_HANDLE 0x01
3738 #define SET_CURSOR_COUNT 0x02
3739 #define SET_CURSOR_POS 0x04
3740 #define SET_CURSOR_CLIP 0x08
3741 #define SET_CURSOR_NOCLIP 0x10
3742 #define SET_CURSOR_FSCLIP 0x20
3744 /* Get the history of the 64 last cursor positions */
3745 @REQ(get_cursor_history)
3746 @REPLY
3747 VARARG(history,cursor_positions);
3748 @END
3751 /* Batch read rawinput message data */
3752 @REQ(get_rawinput_buffer)
3753 data_size_t rawinput_size; /* size of RAWINPUT structure */
3754 data_size_t buffer_size; /* size of output buffer */
3755 @REPLY
3756 data_size_t next_size; /* minimum size to get next message data */
3757 unsigned int count;
3758 VARARG(data,bytes);
3759 @END
3761 /* Modify the list of registered rawinput devices */
3762 @REQ(update_rawinput_devices)
3763 VARARG(devices,rawinput_devices);
3764 @END
3766 /* Create a new job object */
3767 @REQ(create_job)
3768 unsigned int access; /* wanted access rights */
3769 VARARG(objattr,object_attributes); /* object attributes */
3770 @REPLY
3771 obj_handle_t handle; /* handle to the job */
3772 @END
3775 /* Open a job object */
3776 @REQ(open_job)
3777 unsigned int access; /* wanted access rights */
3778 unsigned int attributes; /* object attributes */
3779 obj_handle_t rootdir; /* root directory */
3780 VARARG(name,unicode_str); /* object name */
3781 @REPLY
3782 obj_handle_t handle; /* handle to the job */
3783 @END
3786 /* Assign a job object to a process */
3787 @REQ(assign_job)
3788 obj_handle_t job; /* handle to the job */
3789 obj_handle_t process; /* handle to the process */
3790 @END
3793 /* Check if a process is associated with a job */
3794 @REQ(process_in_job)
3795 obj_handle_t job; /* handle to the job */
3796 obj_handle_t process; /* handle to the process */
3797 @END
3800 /* Set limit flags on a job */
3801 @REQ(set_job_limits)
3802 obj_handle_t handle; /* handle to the job */
3803 unsigned int limit_flags; /* new limit flags */
3804 @END
3807 /* Set new completion port for a job */
3808 @REQ(set_job_completion_port)
3809 obj_handle_t job; /* handle to the job */
3810 obj_handle_t port; /* handle to the completion port */
3811 client_ptr_t key; /* key to send with completion messages */
3812 @END
3815 /* Retrieve information about a job */
3816 @REQ(get_job_info)
3817 obj_handle_t handle; /* handle to the job */
3818 @REPLY
3819 int total_processes; /* total count of processes */
3820 int active_processes; /* count of running processes */
3821 VARARG(pids,uints); /* list of active pids */
3822 @END
3825 /* Terminate all processes associated with the job */
3826 @REQ(terminate_job)
3827 obj_handle_t handle; /* handle to the job */
3828 int status; /* process exit code */
3829 @END
3832 /* Suspend a process */
3833 @REQ(suspend_process)
3834 obj_handle_t handle; /* process handle */
3835 @END
3838 /* Resume a process */
3839 @REQ(resume_process)
3840 obj_handle_t handle; /* process handle */
3841 @END
3844 /* Iterate thread list for process */
3845 @REQ(get_next_thread)
3846 obj_handle_t process; /* process handle */
3847 obj_handle_t last; /* thread handle to start with */
3848 unsigned int access; /* desired access for returned handle */
3849 unsigned int attributes; /* returned handle attributes */
3850 unsigned int flags; /* controls iteration direction */
3851 @REPLY
3852 obj_handle_t handle; /* next thread handle */
3853 @END