wineps.drv: Return default resolution if PPD doesn't provide the list of supported...
[wine.git] / server / protocol.def
blob13aea96e796b161e8781fc72481d35a03df6c90c
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>
33 #include <ntuser.h>
35 typedef unsigned int obj_handle_t;
36 typedef unsigned int user_handle_t;
37 typedef unsigned int atom_t;
38 typedef unsigned int process_id_t;
39 typedef unsigned int thread_id_t;
40 typedef unsigned int data_size_t;
41 typedef unsigned int ioctl_code_t;
42 typedef unsigned __int64 lparam_t;
43 typedef unsigned __int64 apc_param_t;
44 typedef unsigned __int64 mem_size_t;
45 typedef unsigned __int64 file_pos_t;
46 typedef unsigned __int64 client_ptr_t;
47 typedef unsigned __int64 affinity_t;
48 typedef client_ptr_t mod_handle_t;
50 struct request_header
52 int req; /* request code */
53 data_size_t request_size; /* request variable part size */
54 data_size_t reply_size; /* reply variable part maximum size */
57 struct reply_header
59 unsigned int error; /* error result */
60 data_size_t reply_size; /* reply variable part size */
63 /* placeholder structure for the maximum allowed request size */
64 /* this is used to construct the generic_request union */
65 struct request_max_size
67 int pad[16]; /* the max request size is 16 ints */
70 #define FIRST_USER_HANDLE 0x0020 /* first possible value for low word of user handle */
71 #define LAST_USER_HANDLE 0xffef /* last possible value for low word of user handle */
74 /* debug event data */
75 typedef union
77 int code; /* event code */
78 struct
80 int code; /* DbgExceptionStateChange */
81 int first; /* first chance exception? */
82 unsigned int exc_code; /* exception code */
83 unsigned int flags; /* exception flags */
84 client_ptr_t record; /* exception record */
85 client_ptr_t address; /* exception address */
86 int nb_params; /* number of parameters */
87 int __pad;
88 client_ptr_t params[15]; /* parameters */
89 } exception;
90 struct
92 int code; /* DbgCreateThreadStateChange */
93 obj_handle_t handle; /* handle to the new thread */
94 client_ptr_t start; /* thread startup routine */
95 } create_thread;
96 struct
98 int code; /* DbgCreateProcessStateChange */
99 obj_handle_t file; /* handle to the process exe file */
100 obj_handle_t process; /* handle to the new process */
101 obj_handle_t thread; /* handle to the new thread */
102 mod_handle_t base; /* base of executable image */
103 int dbg_offset; /* offset of debug info in file */
104 int dbg_size; /* size of debug info */
105 client_ptr_t start; /* thread startup routine */
106 } create_process;
107 struct
109 int code; /* DbgExitThreadStateChange/DbgExitProcessStateChange */
110 int exit_code; /* thread or process exit code */
111 } exit;
112 struct
114 int code; /* DbgLoadDllStateChange */
115 obj_handle_t handle; /* file handle for the dll */
116 mod_handle_t base; /* base address of the dll */
117 int dbg_offset; /* offset of debug info in file */
118 int dbg_size; /* size of debug info */
119 client_ptr_t name; /* image name (optional) */
120 } load_dll;
121 struct
123 int code; /* DbgUnloadDllStateChange */
124 int __pad;
125 mod_handle_t base; /* base address of the dll */
126 } unload_dll;
127 } debug_event_t;
129 /* context data */
130 typedef struct
132 unsigned int machine; /* machine type */
133 unsigned int flags; /* SERVER_CTX_* flags */
134 union
136 struct { unsigned int eip, ebp, esp, eflags, cs, ss; } i386_regs;
137 struct { unsigned __int64 rip, rbp, rsp;
138 unsigned int cs, ss, flags, __pad; } x86_64_regs;
139 struct { unsigned int sp, lr, pc, cpsr; } arm_regs;
140 struct { unsigned __int64 sp, pc, pstate; } arm64_regs;
141 } ctl; /* selected by SERVER_CTX_CONTROL */
142 union
144 struct { unsigned int eax, ebx, ecx, edx, esi, edi; } i386_regs;
145 struct { unsigned __int64 rax,rbx, rcx, rdx, rsi, rdi,
146 r8, r9, r10, r11, r12, r13, r14, r15; } x86_64_regs;
147 struct { unsigned int r[13]; } arm_regs;
148 struct { unsigned __int64 x[31]; } arm64_regs;
149 } integer; /* selected by SERVER_CTX_INTEGER */
150 union
152 struct { unsigned int ds, es, fs, gs; } i386_regs;
153 struct { unsigned int ds, es, fs, gs; } x86_64_regs;
154 } seg; /* selected by SERVER_CTX_SEGMENTS */
155 union
157 struct { unsigned int ctrl, status, tag, err_off, err_sel, data_off, data_sel, cr0npx;
158 unsigned char regs[80]; } i386_regs;
159 struct { struct { unsigned __int64 low, high; } fpregs[32]; } x86_64_regs;
160 struct { unsigned __int64 d[32]; unsigned int fpscr; } arm_regs;
161 struct { struct { unsigned __int64 low, high; } q[32]; unsigned int fpcr, fpsr; } arm64_regs;
162 } fp; /* selected by SERVER_CTX_FLOATING_POINT */
163 union
165 struct { unsigned int dr0, dr1, dr2, dr3, dr6, dr7; } i386_regs;
166 struct { unsigned __int64 dr0, dr1, dr2, dr3, dr6, dr7; } x86_64_regs;
167 struct { unsigned int bvr[8], bcr[8], wvr[1], wcr[1]; } arm_regs;
168 struct { unsigned __int64 bvr[8], wvr[2]; unsigned int bcr[8], wcr[2]; } arm64_regs;
169 } debug; /* selected by SERVER_CTX_DEBUG_REGISTERS */
170 union
172 unsigned char i386_regs[512];
173 } ext; /* selected by SERVER_CTX_EXTENDED_REGISTERS */
174 union
176 struct { struct { unsigned __int64 low, high; } ymm_high[16]; } regs;
177 } ymm; /* selected by SERVER_CTX_YMM_REGISTERS */
178 } context_t;
180 #define SERVER_CTX_CONTROL 0x01
181 #define SERVER_CTX_INTEGER 0x02
182 #define SERVER_CTX_SEGMENTS 0x04
183 #define SERVER_CTX_FLOATING_POINT 0x08
184 #define SERVER_CTX_DEBUG_REGISTERS 0x10
185 #define SERVER_CTX_EXTENDED_REGISTERS 0x20
186 #define SERVER_CTX_YMM_REGISTERS 0x40
188 /* structure used in sending an fd from client to server */
189 struct send_fd
191 thread_id_t tid; /* thread id */
192 int fd; /* file descriptor on client-side */
195 /* structure sent by the server on the wait fifo */
196 struct wake_up_reply
198 client_ptr_t cookie; /* magic cookie that was passed in select_request */
199 int signaled; /* wait result */
200 int __pad;
203 /* NT-style timeout, in 100ns units, negative means relative timeout */
204 typedef __int64 timeout_t;
205 #define TIMEOUT_INFINITE (((timeout_t)0x7fffffff) << 32 | 0xffffffff)
207 /* absolute timeout, negative means that monotonic clock is used */
208 typedef __int64 abstime_t;
210 /* structure for process startup info */
211 typedef struct
213 unsigned int debug_flags;
214 unsigned int console_flags;
215 obj_handle_t console;
216 obj_handle_t hstdin;
217 obj_handle_t hstdout;
218 obj_handle_t hstderr;
219 unsigned int x;
220 unsigned int y;
221 unsigned int xsize;
222 unsigned int ysize;
223 unsigned int xchars;
224 unsigned int ychars;
225 unsigned int attribute;
226 unsigned int flags;
227 unsigned int show;
228 process_id_t process_group_id;
229 data_size_t curdir_len;
230 data_size_t dllpath_len;
231 data_size_t imagepath_len;
232 data_size_t cmdline_len;
233 data_size_t title_len;
234 data_size_t desktop_len;
235 data_size_t shellinfo_len;
236 data_size_t runtime_len;
237 /* VARARG(curdir,unicode_str,curdir_len); */
238 /* VARARG(dllpath,unicode_str,dllpath_len); */
239 /* VARARG(imagepath,unicode_str,imagepath_len); */
240 /* VARARG(cmdline,unicode_str,cmdline_len); */
241 /* VARARG(title,unicode_str,title_len); */
242 /* VARARG(desktop,unicode_str,desktop_len); */
243 /* VARARG(shellinfo,unicode_str,shellinfo_len); */
244 /* VARARG(runtime,unicode_str,runtime_len); */
245 } startup_info_t;
247 /* structure returned in the list of window properties */
248 typedef struct
250 atom_t atom; /* property atom */
251 int string; /* was atom a string originally? */
252 lparam_t data; /* data stored in property */
253 } property_data_t;
255 /* structure to specify window rectangles */
256 typedef struct
258 int left;
259 int top;
260 int right;
261 int bottom;
262 } rectangle_t;
264 /* structure for parameters of async I/O calls */
265 typedef struct
267 obj_handle_t handle; /* object to perform I/O on */
268 obj_handle_t event; /* event to signal when done */
269 client_ptr_t iosb; /* I/O status block in client addr space */
270 client_ptr_t user; /* opaque user data containing callback pointer and async-specific data */
271 client_ptr_t apc; /* user APC to call */
272 apc_param_t apc_context; /* user APC context or completion value */
273 } async_data_t;
275 /* structures for extra message data */
277 struct hw_msg_source
279 unsigned int device; /* source device (IMDT_* values) */
280 unsigned int origin; /* source origin (IMO_* values) */
283 struct rawinput
285 int type; /* rawinput data type (RIM_* values) */
286 unsigned int device; /* rawinput device pseudo-handle */
287 unsigned int wparam; /* wparam of the WM_INPUT* message */
288 unsigned int usage; /* HID device usage */
291 struct hardware_msg_data
293 lparam_t info; /* extra info */
294 data_size_t size; /* size of hardware message data */
295 int __pad;
296 unsigned int hw_id; /* unique id */
297 unsigned int flags; /* hook flags */
298 struct hw_msg_source source; /* message source */
299 struct rawinput rawinput; /* rawinput message data */
302 struct callback_msg_data
304 client_ptr_t callback; /* callback function */
305 lparam_t data; /* user data for callback */
306 lparam_t result; /* message result */
309 struct winevent_msg_data
311 user_handle_t hook; /* hook handle */
312 thread_id_t tid; /* thread id */
313 client_ptr_t hook_proc; /* hook proc address */
314 /* followed by module name if any */
317 typedef union
319 int type;
320 struct
322 int type; /* INPUT_KEYBOARD */
323 unsigned short vkey; /* virtual key code */
324 unsigned short scan; /* scan code */
325 unsigned int flags; /* event flags */
326 unsigned int time; /* event time */
327 lparam_t info; /* extra info */
328 } kbd;
329 struct
331 int type; /* INPUT_MOUSE */
332 int x; /* coordinates */
333 int y;
334 unsigned int data; /* mouse data */
335 unsigned int flags; /* event flags */
336 unsigned int time; /* event time */
337 lparam_t info; /* extra info */
338 } mouse;
339 struct
341 int type; /* INPUT_HARDWARE */
342 unsigned int msg; /* message code */
343 lparam_t wparam; /* parameters */
344 lparam_t lparam; /* parameters */
345 struct hid_input hid; /* defined in ntuser.h */
346 } hw;
347 } hw_input_t;
349 typedef union
351 unsigned char bytes[1]; /* raw data for sent messages */
352 struct hardware_msg_data hardware;
353 struct callback_msg_data callback;
354 struct winevent_msg_data winevent;
355 } message_data_t;
357 /* structure returned in filesystem events */
358 struct filesystem_event
360 int action;
361 data_size_t len;
362 char name[1];
365 struct luid
367 unsigned int low_part;
368 int high_part;
371 struct luid_attr
373 struct luid luid;
374 unsigned int attrs;
377 struct acl
379 unsigned char revision;
380 unsigned char pad1;
381 unsigned short size;
382 unsigned short count;
383 unsigned short pad2;
386 struct sid
388 unsigned char revision;
389 unsigned char sub_count;
390 unsigned char id_auth[6];
391 unsigned int sub_auth[15];
394 typedef struct
396 unsigned int read;
397 unsigned int write;
398 unsigned int exec;
399 unsigned int all;
400 } generic_map_t;
402 #define MAX_ACL_LEN 65535
404 struct security_descriptor
406 unsigned int control; /* SE_ flags */
407 data_size_t owner_len;
408 data_size_t group_len;
409 data_size_t sacl_len;
410 data_size_t dacl_len;
411 /* VARARG(owner,sid); */
412 /* VARARG(group,sid); */
413 /* VARARG(sacl,acl); */
414 /* VARARG(dacl,acl); */
417 struct object_attributes
419 obj_handle_t rootdir; /* root directory */
420 unsigned int attributes; /* object attributes */
421 data_size_t sd_len; /* length of security_descriptor data. may be 0 */
422 data_size_t name_len; /* length of the name string. may be 0 */
423 /* VARARG(sd,security_descriptor); */
424 /* VARARG(name,unicode_str); */
427 struct object_type_info
429 data_size_t name_len; /* length of the name string */
430 unsigned int index; /* type index in global table */
431 unsigned int obj_count; /* count of objects of this type */
432 unsigned int handle_count; /* count of handles of this type */
433 unsigned int obj_max; /* max count of objects of this type */
434 unsigned int handle_max; /* max count of handles of this type */
435 unsigned int valid_access; /* mask for valid access bits */
436 generic_map_t mapping; /* generic access mappings */
437 /* VARARG(name,unicode_str); */
440 enum select_op
442 SELECT_NONE,
443 SELECT_WAIT,
444 SELECT_WAIT_ALL,
445 SELECT_SIGNAL_AND_WAIT,
446 SELECT_KEYED_EVENT_WAIT,
447 SELECT_KEYED_EVENT_RELEASE
450 typedef union
452 enum select_op op;
453 struct
455 enum select_op op; /* SELECT_WAIT or SELECT_WAIT_ALL */
456 obj_handle_t handles[MAXIMUM_WAIT_OBJECTS];
457 int __pad;
458 } wait;
459 struct
461 enum select_op op; /* SELECT_SIGNAL_AND_WAIT */
462 obj_handle_t wait;
463 obj_handle_t signal; /* must be last in the structure so we can remove it on retries */
464 } signal_and_wait;
465 struct
467 enum select_op op; /* SELECT_KEYED_EVENT_WAIT or SELECT_KEYED_EVENT_RELEASE */
468 obj_handle_t handle;
469 client_ptr_t key;
470 } keyed_event;
471 } select_op_t;
473 enum apc_type
475 APC_NONE,
476 APC_USER,
477 APC_ASYNC_IO,
478 APC_VIRTUAL_ALLOC,
479 APC_VIRTUAL_ALLOC_EX,
480 APC_VIRTUAL_FREE,
481 APC_VIRTUAL_QUERY,
482 APC_VIRTUAL_PROTECT,
483 APC_VIRTUAL_FLUSH,
484 APC_VIRTUAL_LOCK,
485 APC_VIRTUAL_UNLOCK,
486 APC_MAP_VIEW,
487 APC_MAP_VIEW_EX,
488 APC_UNMAP_VIEW,
489 APC_CREATE_THREAD,
490 APC_DUP_HANDLE
493 typedef struct
495 enum apc_type type; /* APC_USER */
496 int __pad;
497 client_ptr_t func; /* void (__stdcall *func)(ULONG_PTR,ULONG_PTR,ULONG_PTR); */
498 apc_param_t args[3]; /* arguments for user function */
499 } user_apc_t;
501 typedef union
503 enum apc_type type;
504 user_apc_t user;
505 struct
507 enum apc_type type; /* APC_ASYNC_IO */
508 unsigned int status; /* I/O status */
509 client_ptr_t user; /* user pointer */
510 client_ptr_t sb; /* status block */
511 data_size_t result; /* result size */
512 } async_io;
513 struct
515 enum apc_type type; /* APC_VIRTUAL_ALLOC */
516 unsigned int op_type; /* type of operation */
517 client_ptr_t addr; /* requested address */
518 mem_size_t size; /* allocation size */
519 mem_size_t zero_bits; /* number of zero high bits */
520 unsigned int prot; /* memory protection flags */
521 } virtual_alloc;
522 struct
524 enum apc_type type; /* APC_VIRTUAL_ALLOC */
525 unsigned int op_type; /* type of operation */
526 client_ptr_t addr; /* requested address */
527 mem_size_t size; /* allocation size */
528 mem_size_t limit_low; /* allocation address limits */
529 mem_size_t limit_high;
530 mem_size_t align; /* allocation alignment */
531 unsigned int prot; /* memory protection flags */
532 unsigned int attributes; /* memory extended attributes */
533 } virtual_alloc_ex;
534 struct
536 enum apc_type type; /* APC_VIRTUAL_FREE */
537 unsigned int op_type; /* type of operation */
538 client_ptr_t addr; /* requested address */
539 mem_size_t size; /* allocation size */
540 } virtual_free;
541 struct
543 enum apc_type type; /* APC_VIRTUAL_QUERY */
544 int __pad;
545 client_ptr_t addr; /* requested address */
546 } virtual_query;
547 struct
549 enum apc_type type; /* APC_VIRTUAL_PROTECT */
550 unsigned int prot; /* new protection flags */
551 client_ptr_t addr; /* requested address */
552 mem_size_t size; /* requested size */
553 } virtual_protect;
554 struct
556 enum apc_type type; /* APC_VIRTUAL_FLUSH */
557 int __pad;
558 client_ptr_t addr; /* requested address */
559 mem_size_t size; /* requested size */
560 } virtual_flush;
561 struct
563 enum apc_type type; /* APC_VIRTUAL_LOCK */
564 int __pad;
565 client_ptr_t addr; /* requested address */
566 mem_size_t size; /* requested size */
567 } virtual_lock;
568 struct
570 enum apc_type type; /* APC_VIRTUAL_UNLOCK */
571 int __pad;
572 client_ptr_t addr; /* requested address */
573 mem_size_t size; /* requested size */
574 } virtual_unlock;
575 struct
577 enum apc_type type; /* APC_MAP_VIEW */
578 obj_handle_t handle; /* mapping handle */
579 client_ptr_t addr; /* requested address */
580 mem_size_t size; /* allocation size */
581 file_pos_t offset; /* file offset */
582 mem_size_t zero_bits; /* number of zero high bits */
583 unsigned int alloc_type; /* allocation type */
584 unsigned int prot; /* memory protection flags */
585 } map_view;
586 struct
588 enum apc_type type; /* APC_MAP_VIEW_EX */
589 obj_handle_t handle; /* mapping handle */
590 client_ptr_t addr; /* requested address */
591 mem_size_t size; /* allocation size */
592 file_pos_t offset; /* file offset */
593 mem_size_t limit_low; /* allocation address limits */
594 mem_size_t limit_high;
595 unsigned int alloc_type; /* allocation type */
596 unsigned int prot; /* memory protection flags */
597 unsigned short machine; /* requested machine for image mappings */
598 unsigned short __pad[3];
599 } map_view_ex;
600 struct
602 enum apc_type type; /* APC_UNMAP_VIEW */
603 unsigned int flags; /* unmap flags */
604 client_ptr_t addr; /* view address */
605 } unmap_view;
606 struct
608 enum apc_type type; /* APC_CREATE_THREAD */
609 unsigned int flags; /* creation flags */
610 client_ptr_t func; /* void (__stdcall *func)(void*); start function */
611 client_ptr_t arg; /* argument for start function */
612 mem_size_t zero_bits; /* number of zero high bits for thread stack */
613 mem_size_t reserve; /* reserve size for thread stack */
614 mem_size_t commit; /* commit size for thread stack */
615 } create_thread;
616 struct
618 enum apc_type type; /* APC_DUP_HANDLE */
619 obj_handle_t src_handle; /* src handle to duplicate */
620 obj_handle_t dst_process; /* dst process handle */
621 unsigned int access; /* wanted access rights */
622 unsigned int attributes; /* object attributes */
623 unsigned int options; /* duplicate options */
624 } dup_handle;
625 } apc_call_t;
627 typedef union
629 enum apc_type type;
630 struct
632 enum apc_type type; /* APC_ASYNC_IO */
633 unsigned int status; /* new status of async operation */
634 unsigned int total; /* bytes transferred */
635 } async_io;
636 struct
638 enum apc_type type; /* APC_VIRTUAL_ALLOC */
639 unsigned int status; /* status returned by call */
640 client_ptr_t addr; /* resulting address */
641 mem_size_t size; /* resulting size */
642 } virtual_alloc;
643 struct
645 enum apc_type type; /* APC_VIRTUAL_ALLOC_EX */
646 unsigned int status; /* status returned by call */
647 client_ptr_t addr; /* resulting address */
648 mem_size_t size; /* resulting size */
649 } virtual_alloc_ex;
650 struct
652 enum apc_type type; /* APC_VIRTUAL_FREE */
653 unsigned int status; /* status returned by call */
654 client_ptr_t addr; /* resulting address */
655 mem_size_t size; /* resulting size */
656 } virtual_free;
657 struct
659 enum apc_type type; /* APC_VIRTUAL_QUERY */
660 unsigned int status; /* status returned by call */
661 client_ptr_t base; /* resulting base address */
662 client_ptr_t alloc_base;/* resulting allocation base */
663 mem_size_t size; /* resulting region size */
664 unsigned short state; /* resulting region state */
665 unsigned short prot; /* resulting region protection */
666 unsigned short alloc_prot;/* resulting allocation protection */
667 unsigned short alloc_type;/* resulting region allocation type */
668 } virtual_query;
669 struct
671 enum apc_type type; /* APC_VIRTUAL_PROTECT */
672 unsigned int status; /* status returned by call */
673 client_ptr_t addr; /* resulting address */
674 mem_size_t size; /* resulting size */
675 unsigned int prot; /* old protection flags */
676 } virtual_protect;
677 struct
679 enum apc_type type; /* APC_VIRTUAL_FLUSH */
680 unsigned int status; /* status returned by call */
681 client_ptr_t addr; /* resulting address */
682 mem_size_t size; /* resulting size */
683 } virtual_flush;
684 struct
686 enum apc_type type; /* APC_VIRTUAL_LOCK */
687 unsigned int status; /* status returned by call */
688 client_ptr_t addr; /* resulting address */
689 mem_size_t size; /* resulting size */
690 } virtual_lock;
691 struct
693 enum apc_type type; /* APC_VIRTUAL_UNLOCK */
694 unsigned int status; /* status returned by call */
695 client_ptr_t addr; /* resulting address */
696 mem_size_t size; /* resulting size */
697 } virtual_unlock;
698 struct
700 enum apc_type type; /* APC_MAP_VIEW */
701 unsigned int status; /* status returned by call */
702 client_ptr_t addr; /* resulting address */
703 mem_size_t size; /* resulting size */
704 } map_view;
705 struct
707 enum apc_type type; /* APC_MAP_VIEW_EX */
708 unsigned int status; /* status returned by call */
709 client_ptr_t addr; /* resulting address */
710 mem_size_t size; /* resulting size */
711 } map_view_ex;
712 struct
714 enum apc_type type; /* APC_UNMAP_VIEW */
715 unsigned int status; /* status returned by call */
716 } unmap_view;
717 struct
719 enum apc_type type; /* APC_CREATE_THREAD */
720 unsigned int status; /* status returned by call */
721 process_id_t pid; /* process id */
722 thread_id_t tid; /* thread id */
723 client_ptr_t teb; /* thread teb (in process address space) */
724 obj_handle_t handle; /* handle to new thread */
725 } create_thread;
726 struct
728 enum apc_type type; /* APC_DUP_HANDLE */
729 unsigned int status; /* status returned by call */
730 obj_handle_t handle; /* duplicated handle in dst process */
731 } dup_handle;
732 struct
734 enum apc_type type; /* APC_BREAK_PROCESS */
735 unsigned int status; /* status returned by call */
736 } break_process;
737 } apc_result_t;
739 enum irp_type
741 IRP_CALL_NONE,
742 IRP_CALL_CREATE,
743 IRP_CALL_CLOSE,
744 IRP_CALL_READ,
745 IRP_CALL_WRITE,
746 IRP_CALL_FLUSH,
747 IRP_CALL_IOCTL,
748 IRP_CALL_VOLUME,
749 IRP_CALL_FREE,
750 IRP_CALL_CANCEL
753 typedef union
755 enum irp_type type; /* irp call type */
756 struct
758 enum irp_type type; /* IRP_CALL_CREATE */
759 unsigned int access; /* access rights */
760 unsigned int sharing; /* sharing flags */
761 unsigned int options; /* file options */
762 client_ptr_t device; /* opaque ptr for the device */
763 obj_handle_t file; /* file handle */
764 } create;
765 struct
767 enum irp_type type; /* IRP_CALL_CLOSE */
768 int __pad;
769 client_ptr_t file; /* opaque ptr for the file object */
770 } close;
771 struct
773 enum irp_type type; /* IRP_CALL_READ */
774 unsigned int key; /* driver key */
775 data_size_t out_size; /* needed output size */
776 int __pad;
777 client_ptr_t file; /* opaque ptr for the file object */
778 file_pos_t pos; /* file position */
779 } read;
780 struct
782 enum irp_type type; /* IRP_CALL_WRITE */
783 unsigned int key; /* driver key */
784 client_ptr_t file; /* opaque ptr for the file object */
785 file_pos_t pos; /* file position */
786 } write;
787 struct
789 enum irp_type type; /* IRP_CALL_FLUSH */
790 int __pad;
791 client_ptr_t file; /* opaque ptr for the file object */
792 } flush;
793 struct
795 enum irp_type type; /* IRP_CALL_IOCTL */
796 ioctl_code_t code; /* ioctl code */
797 data_size_t out_size; /* needed output size */
798 int __pad;
799 client_ptr_t file; /* opaque ptr for the file object */
800 } ioctl;
801 struct
803 enum irp_type type; /* IRP_CALL_VOLUME */
804 unsigned int info_class;/* information class */
805 data_size_t out_size; /* needed output size */
806 int __pad;
807 client_ptr_t file; /* opaque ptr for the file object */
808 } volume;
809 struct
811 enum irp_type type; /* IRP_CALL_FREE */
812 int __pad;
813 client_ptr_t obj; /* opaque ptr for the freed object */
814 } free;
815 struct
817 enum irp_type type; /* IRP_CALL_CANCEL */
818 int __pad;
819 client_ptr_t irp; /* opaque ptr for canceled irp */
820 } cancel;
821 } irp_params_t;
823 /* information about a PE image mapping, roughly equivalent to SECTION_IMAGE_INFORMATION */
824 typedef struct
826 client_ptr_t base;
827 client_ptr_t map_addr;
828 mem_size_t stack_size;
829 mem_size_t stack_commit;
830 unsigned int entry_point;
831 unsigned int map_size;
832 unsigned int zerobits;
833 unsigned int subsystem;
834 unsigned short subsystem_minor;
835 unsigned short subsystem_major;
836 unsigned short osversion_major;
837 unsigned short osversion_minor;
838 unsigned short image_charact;
839 unsigned short dll_charact;
840 unsigned short machine;
841 unsigned char contains_code : 1;
842 unsigned char wine_builtin : 1;
843 unsigned char wine_fakedll : 1;
844 unsigned char is_hybrid : 1;
845 unsigned char padding : 4;
846 unsigned char image_flags;
847 unsigned int loader_flags;
848 unsigned int header_size;
849 unsigned int file_size;
850 unsigned int checksum;
851 unsigned int dbg_offset;
852 unsigned int dbg_size;
853 } pe_image_info_t;
854 #define IMAGE_FLAGS_ComPlusNativeReady 0x01
855 #define IMAGE_FLAGS_ComPlusILOnly 0x02
856 #define IMAGE_FLAGS_ImageDynamicallyRelocated 0x04
857 #define IMAGE_FLAGS_ImageMappedFlat 0x08
858 #define IMAGE_FLAGS_BaseBelow4gb 0x10
859 #define IMAGE_FLAGS_ComPlusPrefer32bit 0x20
861 struct rawinput_device
863 unsigned int usage;
864 unsigned int flags;
865 user_handle_t target;
868 typedef struct
870 int x;
871 int y;
872 unsigned int time;
873 int __pad;
874 lparam_t info;
875 } cursor_pos_t;
877 /****************************************************************/
878 /* Request declarations */
880 /* Create a new process from the context of the parent */
881 @REQ(new_process)
882 obj_handle_t token; /* process token */
883 obj_handle_t debug; /* process debug object */
884 obj_handle_t parent_process; /* parent process */
885 unsigned int flags; /* process creation flags */
886 int socket_fd; /* file descriptor for process socket */
887 unsigned int access; /* access rights for process object */
888 unsigned short machine; /* architecture that the new process will use */
889 data_size_t info_size; /* size of startup info */
890 data_size_t handles_size; /* length of explicit handles list */
891 data_size_t jobs_size; /* length of jobs list */
892 VARARG(objattr,object_attributes); /* object attributes */
893 VARARG(handles,uints,handles_size); /* handles list */
894 VARARG(jobs,uints,jobs_size); /* jobs list */
895 VARARG(info,startup_info,info_size); /* startup information */
896 VARARG(env,unicode_str); /* environment for new process */
897 @REPLY
898 obj_handle_t info; /* new process info handle */
899 process_id_t pid; /* process id */
900 obj_handle_t handle; /* process handle (in the current process) */
901 @END
904 /* Retrieve information about a newly started process */
905 @REQ(get_new_process_info)
906 obj_handle_t info; /* info handle returned from new_process_request */
907 @REPLY
908 int success; /* did the process start successfully? */
909 int exit_code; /* process exit code if failed */
910 @END
913 /* Create a new thread */
914 @REQ(new_thread)
915 obj_handle_t process; /* process in which to create thread */
916 unsigned int access; /* wanted access rights */
917 unsigned int flags; /* thread creation flags */
918 int request_fd; /* fd for request pipe */
919 VARARG(objattr,object_attributes); /* object attributes */
920 @REPLY
921 thread_id_t tid; /* thread id */
922 obj_handle_t handle; /* thread handle (in the current process) */
923 @END
926 /* Retrieve the new process startup info */
927 @REQ(get_startup_info)
928 @REPLY
929 data_size_t info_size; /* size of startup info */
930 unsigned short machine; /* architecture for the new process */
931 VARARG(info,startup_info,info_size); /* startup information */
932 VARARG(env,unicode_str); /* environment */
933 @END
936 /* Signal the end of the process initialization */
937 @REQ(init_process_done)
938 client_ptr_t teb; /* TEB of new thread (in process address space) */
939 client_ptr_t peb; /* PEB of new process (in process address space) */
940 client_ptr_t ldt_copy; /* address of LDT copy (in process address space) */
941 @REPLY
942 int suspend; /* is process suspended? */
943 @END
946 /* Initialize the first thread of a new process */
947 @REQ(init_first_thread)
948 int unix_pid; /* Unix pid of new process */
949 int unix_tid; /* Unix tid of new thread */
950 int debug_level; /* new debug level */
951 int reply_fd; /* fd for reply pipe */
952 int wait_fd; /* fd for blocking calls pipe */
953 @REPLY
954 process_id_t pid; /* process id of the new thread's process */
955 thread_id_t tid; /* thread id of the new thread */
956 timeout_t server_start; /* server start time */
957 unsigned int session_id; /* process session id */
958 data_size_t info_size; /* total size of startup info */
959 VARARG(machines,ushorts); /* array of supported machines */
960 @END
963 /* Initialize a new thread; called from the child after pthread_create() */
964 @REQ(init_thread)
965 int unix_tid; /* Unix tid of new thread */
966 int reply_fd; /* fd for reply pipe */
967 int wait_fd; /* fd for blocking calls pipe */
968 client_ptr_t teb; /* TEB of new thread (in thread address space) */
969 client_ptr_t entry; /* entry point (in thread address space) */
970 @REPLY
971 int suspend; /* is thread suspended? */
972 @END
975 /* Terminate a process */
976 @REQ(terminate_process)
977 obj_handle_t handle; /* process handle to terminate */
978 int exit_code; /* process exit code */
979 @REPLY
980 int self; /* suicide? */
981 @END
984 /* Terminate a thread */
985 @REQ(terminate_thread)
986 obj_handle_t handle; /* thread handle to terminate */
987 int exit_code; /* thread exit code */
988 @REPLY
989 int self; /* suicide? */
990 @END
993 /* Retrieve information about a process */
994 @REQ(get_process_info)
995 obj_handle_t handle; /* process handle */
996 @REPLY
997 process_id_t pid; /* server process id */
998 process_id_t ppid; /* server process id of parent */
999 affinity_t affinity; /* process affinity mask */
1000 client_ptr_t peb; /* PEB address in process address space */
1001 timeout_t start_time; /* process start time */
1002 timeout_t end_time; /* process end time */
1003 unsigned int session_id; /* process session id */
1004 int exit_code; /* process exit code */
1005 int priority; /* priority class */
1006 unsigned short machine; /* process architecture */
1007 VARARG(image,pe_image_info); /* image info for main exe */
1008 @END
1011 /* Retrieve debug information about a process */
1012 @REQ(get_process_debug_info)
1013 obj_handle_t handle; /* process handle */
1014 @REPLY
1015 obj_handle_t debug; /* handle to debug port */
1016 int debug_children; /* inherit debugger to child processes */
1017 VARARG(image,pe_image_info); /* image info for main exe */
1018 @END
1021 /* Fetch the name of the process image */
1022 @REQ(get_process_image_name)
1023 obj_handle_t handle; /* process handle */
1024 int win32; /* return a win32 filename? */
1025 @REPLY
1026 data_size_t len; /* len in bytes required to store filename */
1027 VARARG(name,unicode_str); /* image name for main exe */
1028 @END
1031 /* Retrieve information about a process memory usage */
1032 @REQ(get_process_vm_counters)
1033 obj_handle_t handle; /* process handle */
1034 @REPLY
1035 mem_size_t peak_virtual_size; /* peak virtual memory in bytes */
1036 mem_size_t virtual_size; /* virtual memory in bytes */
1037 mem_size_t peak_working_set_size; /* peak real memory in bytes */
1038 mem_size_t working_set_size; /* real memory in bytes */
1039 mem_size_t pagefile_usage; /* commit charge in bytes */
1040 mem_size_t peak_pagefile_usage; /* peak commit charge in bytes */
1041 @END
1044 /* Set a process information */
1045 @REQ(set_process_info)
1046 obj_handle_t handle; /* process handle */
1047 int mask; /* setting mask (see below) */
1048 int priority; /* priority class */
1049 affinity_t affinity; /* affinity mask */
1050 obj_handle_t token; /* primary token */
1051 @END
1052 #define SET_PROCESS_INFO_PRIORITY 0x01
1053 #define SET_PROCESS_INFO_AFFINITY 0x02
1054 #define SET_PROCESS_INFO_TOKEN 0x04
1057 /* Retrieve information about a thread */
1058 @REQ(get_thread_info)
1059 obj_handle_t handle; /* thread handle */
1060 unsigned int access; /* required access rights */
1061 @REPLY
1062 process_id_t pid; /* server process id */
1063 thread_id_t tid; /* server thread id */
1064 client_ptr_t teb; /* thread teb pointer */
1065 client_ptr_t entry_point; /* thread entry point */
1066 affinity_t affinity; /* thread affinity mask */
1067 int exit_code; /* thread exit code */
1068 int priority; /* thread priority level */
1069 int last; /* last thread in process */
1070 int suspend_count; /* thread suspend count */
1071 unsigned int flags; /* GET_THREAD_INFO_FLAG_ flags */
1072 data_size_t desc_len; /* description length in bytes */
1073 VARARG(desc,unicode_str); /* description string */
1074 @END
1075 #define GET_THREAD_INFO_FLAG_DBG_HIDDEN 0x01
1076 #define GET_THREAD_INFO_FLAG_TERMINATED 0x02
1079 /* Retrieve information about thread times */
1080 @REQ(get_thread_times)
1081 obj_handle_t handle; /* thread handle */
1082 @REPLY
1083 timeout_t creation_time; /* thread creation time */
1084 timeout_t exit_time; /* thread exit time */
1085 int unix_pid; /* thread native pid */
1086 int unix_tid; /* thread native pid */
1087 @END
1090 /* Set a thread information */
1091 @REQ(set_thread_info)
1092 obj_handle_t handle; /* thread handle */
1093 int mask; /* setting mask (see below) */
1094 int priority; /* priority class */
1095 affinity_t affinity; /* affinity mask */
1096 client_ptr_t entry_point; /* thread entry point */
1097 obj_handle_t token; /* impersonation token */
1098 VARARG(desc,unicode_str); /* description string */
1099 @END
1100 #define SET_THREAD_INFO_PRIORITY 0x01
1101 #define SET_THREAD_INFO_AFFINITY 0x02
1102 #define SET_THREAD_INFO_TOKEN 0x04
1103 #define SET_THREAD_INFO_ENTRYPOINT 0x08
1104 #define SET_THREAD_INFO_DESCRIPTION 0x10
1105 #define SET_THREAD_INFO_DBG_HIDDEN 0x20
1108 /* Suspend a thread */
1109 @REQ(suspend_thread)
1110 obj_handle_t handle; /* thread handle */
1111 @REPLY
1112 int count; /* new suspend count */
1113 @END
1116 /* Resume a thread */
1117 @REQ(resume_thread)
1118 obj_handle_t handle; /* thread handle */
1119 @REPLY
1120 int count; /* new suspend count */
1121 @END
1124 /* Queue an APC for a thread or process */
1125 @REQ(queue_apc)
1126 obj_handle_t handle; /* thread or process handle */
1127 VARARG(call,apc_call); /* call arguments */
1128 @REPLY
1129 obj_handle_t handle; /* APC handle */
1130 int self; /* run APC in caller itself? */
1131 @END
1134 /* Get the result of an APC call */
1135 @REQ(get_apc_result)
1136 obj_handle_t handle; /* handle to the APC */
1137 @REPLY
1138 apc_result_t result; /* result of the APC */
1139 @END
1142 /* Close a handle for the current process */
1143 @REQ(close_handle)
1144 obj_handle_t handle; /* handle to close */
1145 @END
1148 /* Set a handle information */
1149 @REQ(set_handle_info)
1150 obj_handle_t handle; /* handle we are interested in */
1151 int flags; /* new handle flags */
1152 int mask; /* mask for flags to set */
1153 @REPLY
1154 int old_flags; /* old flag value */
1155 @END
1158 /* Duplicate a handle */
1159 @REQ(dup_handle)
1160 obj_handle_t src_process; /* src process handle */
1161 obj_handle_t src_handle; /* src handle to duplicate */
1162 obj_handle_t dst_process; /* dst process handle */
1163 unsigned int access; /* wanted access rights */
1164 unsigned int attributes; /* object attributes */
1165 unsigned int options; /* duplicate options */
1166 @REPLY
1167 obj_handle_t handle; /* duplicated handle in dst process */
1168 @END
1171 /* Test if two handles refer to the same object */
1172 @REQ(compare_objects)
1173 obj_handle_t first; /* first object handle */
1174 obj_handle_t second; /* second object handle */
1175 @END
1178 /* Make an object temporary */
1179 @REQ(make_temporary)
1180 obj_handle_t handle; /* handle to the object */
1181 @END
1184 /* Open a handle to a process */
1185 @REQ(open_process)
1186 process_id_t pid; /* process id to open */
1187 unsigned int access; /* wanted access rights */
1188 unsigned int attributes; /* object attributes */
1189 @REPLY
1190 obj_handle_t handle; /* handle to the process */
1191 @END
1194 /* Open a handle to a thread */
1195 @REQ(open_thread)
1196 thread_id_t tid; /* thread id to open */
1197 unsigned int access; /* wanted access rights */
1198 unsigned int attributes; /* object attributes */
1199 @REPLY
1200 obj_handle_t handle; /* handle to the thread */
1201 @END
1204 /* Wait for handles */
1205 @REQ(select)
1206 int flags; /* wait flags (see below) */
1207 client_ptr_t cookie; /* magic cookie to return to client */
1208 abstime_t timeout; /* timeout */
1209 data_size_t size; /* size of select_op */
1210 obj_handle_t prev_apc; /* handle to previous APC */
1211 VARARG(result,apc_result); /* result of previous APC */
1212 VARARG(data,select_op,size); /* operation-specific data */
1213 VARARG(contexts,contexts); /* suspend context(s) */
1214 @REPLY
1215 obj_handle_t apc_handle; /* handle to next APC */
1216 int signaled; /* were the handles immediately signaled? */
1217 VARARG(call,apc_call); /* APC call arguments */
1218 VARARG(contexts,contexts); /* suspend context(s) */
1219 @END
1220 #define SELECT_ALERTABLE 1
1221 #define SELECT_INTERRUPTIBLE 2
1224 /* Create an event */
1225 @REQ(create_event)
1226 unsigned int access; /* wanted access rights */
1227 int manual_reset; /* manual reset event */
1228 int initial_state; /* initial state of the event */
1229 VARARG(objattr,object_attributes); /* object attributes */
1230 @REPLY
1231 obj_handle_t handle; /* handle to the event */
1232 @END
1234 /* Event operation */
1235 @REQ(event_op)
1236 obj_handle_t handle; /* handle to event */
1237 int op; /* event operation (see below) */
1238 @REPLY
1239 int state; /* previous state */
1240 @END
1241 enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT };
1243 @REQ(query_event)
1244 obj_handle_t handle; /* handle to event */
1245 @REPLY
1246 int manual_reset; /* manual reset event */
1247 int state; /* current state of the event */
1248 @END
1250 /* Open an event */
1251 @REQ(open_event)
1252 unsigned int access; /* wanted access rights */
1253 unsigned int attributes; /* object attributes */
1254 obj_handle_t rootdir; /* root directory */
1255 VARARG(name,unicode_str); /* object name */
1256 @REPLY
1257 obj_handle_t handle; /* handle to the event */
1258 @END
1261 /* Create a keyed event */
1262 @REQ(create_keyed_event)
1263 unsigned int access; /* wanted access rights */
1264 VARARG(objattr,object_attributes); /* object attributes */
1265 @REPLY
1266 obj_handle_t handle; /* handle to the event */
1267 @END
1269 /* Open a keyed event */
1270 @REQ(open_keyed_event)
1271 unsigned int access; /* wanted access rights */
1272 unsigned int attributes; /* object attributes */
1273 obj_handle_t rootdir; /* root directory */
1274 VARARG(name,unicode_str); /* object name */
1275 @REPLY
1276 obj_handle_t handle; /* handle to the event */
1277 @END
1280 /* Create a mutex */
1281 @REQ(create_mutex)
1282 unsigned int access; /* wanted access rights */
1283 int owned; /* initially owned? */
1284 VARARG(objattr,object_attributes); /* object attributes */
1285 @REPLY
1286 obj_handle_t handle; /* handle to the mutex */
1287 @END
1290 /* Release a mutex */
1291 @REQ(release_mutex)
1292 obj_handle_t handle; /* handle to the mutex */
1293 @REPLY
1294 unsigned int prev_count; /* value of internal counter, before release */
1295 @END
1298 /* Open a mutex */
1299 @REQ(open_mutex)
1300 unsigned int access; /* wanted access rights */
1301 unsigned int attributes; /* object attributes */
1302 obj_handle_t rootdir; /* root directory */
1303 VARARG(name,unicode_str); /* object name */
1304 @REPLY
1305 obj_handle_t handle; /* handle to the mutex */
1306 @END
1309 /* Query a mutex */
1310 @REQ(query_mutex)
1311 obj_handle_t handle; /* handle to mutex */
1312 @REPLY
1313 unsigned int count; /* current count of mutex */
1314 int owned; /* true if owned by current thread */
1315 int abandoned; /* true if abandoned */
1316 @END
1319 /* Create a semaphore */
1320 @REQ(create_semaphore)
1321 unsigned int access; /* wanted access rights */
1322 unsigned int initial; /* initial count */
1323 unsigned int max; /* maximum count */
1324 VARARG(objattr,object_attributes); /* object attributes */
1325 @REPLY
1326 obj_handle_t handle; /* handle to the semaphore */
1327 @END
1330 /* Release a semaphore */
1331 @REQ(release_semaphore)
1332 obj_handle_t handle; /* handle to the semaphore */
1333 unsigned int count; /* count to add to semaphore */
1334 @REPLY
1335 unsigned int prev_count; /* previous semaphore count */
1336 @END
1338 @REQ(query_semaphore)
1339 obj_handle_t handle; /* handle to the semaphore */
1340 @REPLY
1341 unsigned int current; /* current count */
1342 unsigned int max; /* maximum count */
1343 @END
1345 /* Open a semaphore */
1346 @REQ(open_semaphore)
1347 unsigned int access; /* wanted access rights */
1348 unsigned int attributes; /* object attributes */
1349 obj_handle_t rootdir; /* root directory */
1350 VARARG(name,unicode_str); /* object name */
1351 @REPLY
1352 obj_handle_t handle; /* handle to the semaphore */
1353 @END
1356 /* Create a file */
1357 @REQ(create_file)
1358 unsigned int access; /* wanted access rights */
1359 unsigned int sharing; /* sharing flags */
1360 int create; /* file create action */
1361 unsigned int options; /* file options */
1362 unsigned int attrs; /* file attributes for creation */
1363 VARARG(objattr,object_attributes); /* object attributes */
1364 VARARG(filename,string); /* file name */
1365 @REPLY
1366 obj_handle_t handle; /* handle to the file */
1367 @END
1370 /* Open a file object */
1371 @REQ(open_file_object)
1372 unsigned int access; /* wanted access rights */
1373 unsigned int attributes; /* open attributes */
1374 obj_handle_t rootdir; /* root directory */
1375 unsigned int sharing; /* sharing flags */
1376 unsigned int options; /* file options */
1377 VARARG(filename,unicode_str); /* file name */
1378 @REPLY
1379 obj_handle_t handle; /* handle to the file */
1380 @END
1383 /* Allocate a file handle for a Unix fd */
1384 @REQ(alloc_file_handle)
1385 unsigned int access; /* wanted access rights */
1386 unsigned int attributes; /* object attributes */
1387 int fd; /* file descriptor on the client side */
1388 @REPLY
1389 obj_handle_t handle; /* handle to the file */
1390 @END
1393 /* Get the Unix name from a file handle */
1394 @REQ(get_handle_unix_name)
1395 obj_handle_t handle; /* file handle */
1396 @REPLY
1397 data_size_t name_len; /* unix name length */
1398 VARARG(name,string); /* unix name */
1399 @END
1402 /* Get a Unix fd to access a file */
1403 @REQ(get_handle_fd)
1404 obj_handle_t handle; /* handle to the file */
1405 @REPLY
1406 int type; /* file type (see below) */
1407 int cacheable; /* can fd be cached in the client? */
1408 unsigned int access; /* file access rights */
1409 unsigned int options; /* file open options */
1410 @END
1411 enum server_fd_type
1413 FD_TYPE_INVALID, /* invalid file (no associated fd) */
1414 FD_TYPE_FILE, /* regular file */
1415 FD_TYPE_DIR, /* directory */
1416 FD_TYPE_SOCKET, /* socket */
1417 FD_TYPE_SERIAL, /* serial port */
1418 FD_TYPE_PIPE, /* named pipe */
1419 FD_TYPE_MAILSLOT, /* mailslot */
1420 FD_TYPE_CHAR, /* unspecified char device */
1421 FD_TYPE_DEVICE, /* Windows device file */
1422 FD_TYPE_NB_TYPES
1426 /* Retrieve (or allocate) the client-side directory cache entry */
1427 @REQ(get_directory_cache_entry)
1428 obj_handle_t handle; /* handle to the directory */
1429 @REPLY
1430 int entry; /* cache entry on the client side */
1431 VARARG(free,ints); /* entries that can be freed */
1432 @END
1435 /* Flush a file buffers */
1436 @REQ(flush)
1437 async_data_t async; /* async I/O parameters */
1438 @REPLY
1439 obj_handle_t event; /* event set when finished */
1440 @END
1442 /* Query file information */
1443 @REQ(get_file_info)
1444 obj_handle_t handle; /* handle to the file */
1445 unsigned int info_class; /* queried information class */
1446 @REPLY
1447 VARARG(data,bytes); /* file info data */
1448 @END
1450 /* Query volume information */
1451 @REQ(get_volume_info)
1452 obj_handle_t handle; /* handle to the file */
1453 async_data_t async; /* async I/O parameters */
1454 unsigned int info_class; /* queried information class */
1455 @REPLY
1456 obj_handle_t wait; /* handle to wait on for blocking read */
1457 VARARG(data,bytes); /* volume info data */
1458 @END
1460 /* Lock a region of a file */
1461 @REQ(lock_file)
1462 obj_handle_t handle; /* handle to the file */
1463 file_pos_t offset; /* offset of start of lock */
1464 file_pos_t count; /* count of bytes to lock */
1465 int shared; /* shared or exclusive lock? */
1466 int wait; /* do we want to wait? */
1467 @REPLY
1468 obj_handle_t handle; /* handle to wait on */
1469 int overlapped; /* is it an overlapped I/O handle? */
1470 @END
1473 /* Unlock a region of a file */
1474 @REQ(unlock_file)
1475 obj_handle_t handle; /* handle to the file */
1476 file_pos_t offset; /* offset of start of unlock */
1477 file_pos_t count; /* count of bytes to unlock */
1478 @END
1481 /* Perform a recv on a socket */
1482 @REQ(recv_socket)
1483 int oob; /* are we receiving OOB data? */
1484 async_data_t async; /* async I/O parameters */
1485 int force_async; /* Force asynchronous mode? */
1486 @REPLY
1487 obj_handle_t wait; /* handle to wait on for blocking recv */
1488 unsigned int options; /* device open options */
1489 int nonblocking; /* is socket non-blocking? */
1490 @END
1493 /* Perform a send on a socket */
1494 @REQ(send_socket)
1495 async_data_t async; /* async I/O parameters */
1496 int force_async; /* Force asynchronous mode? */
1497 @REPLY
1498 obj_handle_t wait; /* handle to wait on for blocking send */
1499 unsigned int options; /* device open options */
1500 int nonblocking; /* is socket non-blocking? */
1501 @END
1504 /* Get socket event flags */
1505 @REQ(socket_get_events)
1506 obj_handle_t handle; /* socket handle */
1507 obj_handle_t event; /* event to reset */
1508 @REPLY
1509 unsigned int flags; /* event mask */
1510 VARARG(status,uints); /* array of status codes */
1511 @END
1514 /* Store ICMP id for ICMP over datagram fixup */
1515 @REQ(socket_send_icmp_id)
1516 obj_handle_t handle; /* socket handle */
1517 unsigned short icmp_id; /* ICMP packet id */
1518 unsigned short icmp_seq; /* ICMP packed sequence */
1519 @REPLY
1520 @END
1523 /* Get ICMP id for ICMP over datagram fixup */
1524 @REQ(socket_get_icmp_id)
1525 obj_handle_t handle; /* socket handle */
1526 unsigned short icmp_seq; /* ICMP packed sequence */
1527 @REPLY
1528 unsigned short icmp_id; /* ICMP packet id */
1529 @END
1532 /* Retrieve the next pending console ioctl request */
1533 @REQ(get_next_console_request)
1534 obj_handle_t handle; /* console server handle */
1535 int signal; /* server signal state */
1536 int read; /* 1 if reporting result of blocked read ioctl */
1537 unsigned int status; /* status of previous ioctl */
1538 VARARG(out_data,bytes); /* out_data of previous ioctl */
1539 @REPLY
1540 unsigned int code; /* ioctl code */
1541 unsigned int output; /* output id or 0 for input */
1542 data_size_t out_size; /* ioctl output size */
1543 VARARG(in_data,bytes); /* ioctl in_data */
1544 @END
1547 /* enable directory change notifications */
1548 @REQ(read_directory_changes)
1549 unsigned int filter; /* notification filter */
1550 int subtree; /* watch the subtree? */
1551 int want_data; /* flag indicating whether change data should be collected */
1552 async_data_t async; /* async I/O parameters */
1553 @END
1556 @REQ(read_change)
1557 obj_handle_t handle;
1558 @REPLY
1559 VARARG(events,filesystem_event); /* collected filesystem events */
1560 @END
1563 /* Create a file mapping */
1564 @REQ(create_mapping)
1565 unsigned int access; /* wanted access rights */
1566 unsigned int flags; /* SEC_* flags */
1567 unsigned int file_access; /* file access rights */
1568 mem_size_t size; /* mapping size */
1569 obj_handle_t file_handle; /* file handle */
1570 VARARG(objattr,object_attributes); /* object attributes */
1571 @REPLY
1572 obj_handle_t handle; /* handle to the mapping */
1573 @END
1576 /* Open a mapping */
1577 @REQ(open_mapping)
1578 unsigned int access; /* wanted access rights */
1579 unsigned int attributes; /* object attributes */
1580 obj_handle_t rootdir; /* root directory */
1581 VARARG(name,unicode_str); /* object name */
1582 @REPLY
1583 obj_handle_t handle; /* handle to the mapping */
1584 @END
1587 /* Get information about a file mapping */
1588 @REQ(get_mapping_info)
1589 obj_handle_t handle; /* handle to the mapping */
1590 unsigned int access; /* wanted access rights */
1591 @REPLY
1592 mem_size_t size; /* mapping size */
1593 unsigned int flags; /* SEC_* flags */
1594 obj_handle_t shared_file; /* shared mapping file handle */
1595 data_size_t total; /* total required buffer size in bytes */
1596 VARARG(image,pe_image_info);/* image info for SEC_IMAGE mappings */
1597 VARARG(name,unicode_str); /* filename for SEC_IMAGE mappings */
1598 @END
1601 /* Get the address to use to map an image mapping */
1602 @REQ(get_image_map_address)
1603 obj_handle_t handle; /* handle to the mapping */
1604 @REPLY
1605 client_ptr_t addr; /* map address */
1606 @END
1609 /* Add a memory view in the current process */
1610 @REQ(map_view)
1611 obj_handle_t mapping; /* file mapping handle */
1612 unsigned int access; /* wanted access rights */
1613 client_ptr_t base; /* view base address (page-aligned) */
1614 mem_size_t size; /* view size */
1615 file_pos_t start; /* start offset in mapping */
1616 @END
1619 /* Add a memory view for an image mapping in the current process */
1620 @REQ(map_image_view)
1621 obj_handle_t mapping; /* file mapping handle */
1622 client_ptr_t base; /* view base address (page-aligned) */
1623 mem_size_t size; /* view size */
1624 unsigned int entry; /* entry point in mapped view */
1625 unsigned short machine; /* machine in the mapped view */
1626 @END
1629 /* Add a memory view for a builtin dll in the current process */
1630 @REQ(map_builtin_view)
1631 VARARG(image,pe_image_info);/* image info */
1632 VARARG(name,unicode_str); /* image filename */
1633 @END
1636 /* Get information about a mapped image view */
1637 @REQ(get_image_view_info)
1638 obj_handle_t process; /* process handle */
1639 client_ptr_t addr; /* address inside mapped view (in process address space) */
1640 @REPLY
1641 client_ptr_t base; /* view base address */
1642 mem_size_t size; /* view size */
1643 @END
1646 /* Unmap a memory view from the current process */
1647 @REQ(unmap_view)
1648 client_ptr_t base; /* view base address */
1649 @END
1652 /* Get a range of committed pages in a file mapping */
1653 @REQ(get_mapping_committed_range)
1654 client_ptr_t base; /* view base address */
1655 file_pos_t offset; /* starting offset (page-aligned, in bytes) */
1656 @REPLY
1657 mem_size_t size; /* size of range starting at offset (page-aligned, in bytes) */
1658 int committed; /* whether it is a committed range */
1659 @END
1662 /* Add a range to the committed pages in a file mapping */
1663 @REQ(add_mapping_committed_range)
1664 client_ptr_t base; /* view base address */
1665 file_pos_t offset; /* starting offset (page-aligned, in bytes) */
1666 mem_size_t size; /* size to set (page-aligned, in bytes) or 0 if only retrieving */
1667 @END
1670 /* Check if two memory maps are for the same file */
1671 @REQ(is_same_mapping)
1672 client_ptr_t base1; /* first view base address */
1673 client_ptr_t base2; /* second view base address */
1674 @END
1677 /* Get the filename of a mapping */
1678 @REQ(get_mapping_filename)
1679 obj_handle_t process; /* process handle */
1680 client_ptr_t addr; /* address inside mapped view (in process address space) */
1681 @REPLY
1682 data_size_t len; /* total filename length in bytes */
1683 VARARG(filename,unicode_str); /* filename in NT format */
1684 @END
1687 struct thread_info
1689 timeout_t start_time;
1690 thread_id_t tid;
1691 int base_priority;
1692 int current_priority;
1693 int unix_tid;
1694 client_ptr_t teb;
1695 client_ptr_t entry_point;
1698 struct process_info
1700 timeout_t start_time;
1701 data_size_t name_len;
1702 int thread_count;
1703 int priority;
1704 process_id_t pid;
1705 process_id_t parent_pid;
1706 unsigned int session_id;
1707 int handle_count;
1708 int unix_pid;
1709 /* VARARG(name,unicode_str,name_len); */
1710 /* VARARG(threads,struct thread_info,thread_count); */
1713 /* Get a list of processes and threads currently running */
1714 @REQ(list_processes)
1715 @REPLY
1716 data_size_t info_size;
1717 int process_count;
1718 int total_thread_count;
1719 data_size_t total_name_len;
1720 VARARG(data,process_info,info_size);
1721 @END
1724 /* Create a debug object */
1725 @REQ(create_debug_obj)
1726 unsigned int access; /* wanted access rights */
1727 unsigned int flags; /* object flags */
1728 VARARG(objattr,object_attributes); /* object attributes */
1729 @REPLY
1730 obj_handle_t handle; /* handle to the debug object */
1731 @END
1734 /* Wait for a debug event */
1735 @REQ(wait_debug_event)
1736 obj_handle_t debug; /* debug object */
1737 @REPLY
1738 process_id_t pid; /* process id */
1739 thread_id_t tid; /* thread id */
1740 VARARG(event,debug_event); /* debug event data */
1741 @END
1744 /* Queue an exception event */
1745 @REQ(queue_exception_event)
1746 int first; /* first chance exception? */
1747 unsigned int code; /* exception code */
1748 unsigned int flags; /* exception flags */
1749 client_ptr_t record; /* exception record */
1750 client_ptr_t address; /* exception address */
1751 data_size_t len; /* size of parameters */
1752 VARARG(params,uints64,len);/* exception parameters */
1753 @REPLY
1754 obj_handle_t handle; /* handle to the queued event */
1755 @END
1758 /* Retrieve the status of an exception event */
1759 @REQ(get_exception_status)
1760 obj_handle_t handle; /* handle to the queued event */
1761 @END
1764 /* Continue a debug event */
1765 @REQ(continue_debug_event)
1766 obj_handle_t debug; /* debug object */
1767 process_id_t pid; /* process id to continue */
1768 thread_id_t tid; /* thread id to continue */
1769 unsigned int status; /* continuation status */
1770 @END
1773 /* Start or stop debugging an existing process */
1774 @REQ(debug_process)
1775 obj_handle_t handle; /* process handle */
1776 obj_handle_t debug; /* debug object to attach to the process */
1777 int attach; /* 1=attaching / 0=detaching from the process */
1778 @END
1781 /* Set debug object information */
1782 @REQ(set_debug_obj_info)
1783 obj_handle_t debug; /* debug object */
1784 unsigned int flags; /* object flags */
1785 @END
1788 /* Read data from a process address space */
1789 @REQ(read_process_memory)
1790 obj_handle_t handle; /* process handle */
1791 client_ptr_t addr; /* addr to read from */
1792 @REPLY
1793 VARARG(data,bytes); /* result data */
1794 @END
1797 /* Write data to a process address space */
1798 @REQ(write_process_memory)
1799 obj_handle_t handle; /* process handle */
1800 client_ptr_t addr; /* addr to write to */
1801 VARARG(data,bytes); /* data to write */
1802 @END
1805 /* Create a registry key */
1806 @REQ(create_key)
1807 unsigned int access; /* desired access rights */
1808 unsigned int options; /* creation options */
1809 VARARG(objattr,object_attributes); /* object attributes */
1810 VARARG(class,unicode_str); /* class name */
1811 @REPLY
1812 obj_handle_t hkey; /* handle to the created key */
1813 @END
1815 /* Open a registry key */
1816 @REQ(open_key)
1817 obj_handle_t parent; /* handle to the parent key */
1818 unsigned int access; /* desired access rights */
1819 unsigned int attributes; /* object attributes */
1820 VARARG(name,unicode_str); /* key name */
1821 @REPLY
1822 obj_handle_t hkey; /* handle to the open key */
1823 @END
1826 /* Delete a registry key */
1827 @REQ(delete_key)
1828 obj_handle_t hkey; /* handle to the key */
1829 @END
1832 /* Flush a registry key */
1833 @REQ(flush_key)
1834 obj_handle_t hkey; /* handle to the key */
1835 @END
1838 /* Enumerate registry subkeys */
1839 @REQ(enum_key)
1840 obj_handle_t hkey; /* handle to registry key */
1841 int index; /* index of subkey (or -1 for current key) */
1842 int info_class; /* requested information class */
1843 @REPLY
1844 int subkeys; /* number of subkeys */
1845 int max_subkey; /* longest subkey name */
1846 int max_class; /* longest class name */
1847 int values; /* number of values */
1848 int max_value; /* longest value name */
1849 int max_data; /* longest value data */
1850 timeout_t modif; /* last modification time */
1851 data_size_t total; /* total length needed for full name and class */
1852 data_size_t namelen; /* length of key name in bytes */
1853 VARARG(name,unicode_str,namelen); /* key name */
1854 VARARG(class,unicode_str); /* class name */
1855 @END
1858 /* Set a value of a registry key */
1859 @REQ(set_key_value)
1860 obj_handle_t hkey; /* handle to registry key */
1861 int type; /* value type */
1862 data_size_t namelen; /* length of value name in bytes */
1863 VARARG(name,unicode_str,namelen); /* value name */
1864 VARARG(data,bytes); /* value data */
1865 @END
1868 /* Retrieve the value of a registry key */
1869 @REQ(get_key_value)
1870 obj_handle_t hkey; /* handle to registry key */
1871 VARARG(name,unicode_str); /* value name */
1872 @REPLY
1873 int type; /* value type */
1874 data_size_t total; /* total length needed for data */
1875 VARARG(data,bytes); /* value data */
1876 @END
1879 /* Enumerate a value of a registry key */
1880 @REQ(enum_key_value)
1881 obj_handle_t hkey; /* handle to registry key */
1882 int index; /* value index */
1883 int info_class; /* requested information class */
1884 @REPLY
1885 int type; /* value type */
1886 data_size_t total; /* total length needed for full name and data */
1887 data_size_t namelen; /* length of value name in bytes */
1888 VARARG(name,unicode_str,namelen); /* value name */
1889 VARARG(data,bytes); /* value data */
1890 @END
1893 /* Delete a value of a registry key */
1894 @REQ(delete_key_value)
1895 obj_handle_t hkey; /* handle to registry key */
1896 VARARG(name,unicode_str); /* value name */
1897 @END
1900 /* Load a registry branch from a file */
1901 @REQ(load_registry)
1902 obj_handle_t file; /* file to load from */
1903 VARARG(objattr,object_attributes); /* object attributes */
1904 @END
1907 /* UnLoad a registry branch from a file */
1908 @REQ(unload_registry)
1909 obj_handle_t parent; /* handle to the parent key */
1910 unsigned int attributes; /* object attributes */
1911 VARARG(name,unicode_str); /* key name */
1912 @END
1915 /* Save a registry branch to a file */
1916 @REQ(save_registry)
1917 obj_handle_t hkey; /* key to save */
1918 obj_handle_t file; /* file to save to */
1919 @END
1922 /* Add a registry key change notification */
1923 @REQ(set_registry_notification)
1924 obj_handle_t hkey; /* key to watch for changes */
1925 obj_handle_t event; /* event to set */
1926 int subtree; /* should we watch the whole subtree? */
1927 unsigned int filter; /* things to watch */
1928 @END
1931 /* Rename a registry key */
1932 @REQ(rename_key)
1933 obj_handle_t hkey; /* handle to the key to be renamed */
1934 VARARG(name,unicode_str); /* new name */
1935 @END
1938 /* Create a waitable timer */
1939 @REQ(create_timer)
1940 unsigned int access; /* wanted access rights */
1941 int manual; /* manual reset */
1942 VARARG(objattr,object_attributes); /* object attributes */
1943 @REPLY
1944 obj_handle_t handle; /* handle to the timer */
1945 @END
1948 /* Open a waitable timer */
1949 @REQ(open_timer)
1950 unsigned int access; /* wanted access rights */
1951 unsigned int attributes; /* object attributes */
1952 obj_handle_t rootdir; /* root directory */
1953 VARARG(name,unicode_str); /* object name */
1954 @REPLY
1955 obj_handle_t handle; /* handle to the timer */
1956 @END
1958 /* Set a waitable timer */
1959 @REQ(set_timer)
1960 obj_handle_t handle; /* handle to the timer */
1961 timeout_t expire; /* next expiration absolute time */
1962 client_ptr_t callback; /* callback function */
1963 client_ptr_t arg; /* callback argument */
1964 int period; /* timer period in ms */
1965 @REPLY
1966 int signaled; /* was the timer signaled before this call ? */
1967 @END
1969 /* Cancel a waitable timer */
1970 @REQ(cancel_timer)
1971 obj_handle_t handle; /* handle to the timer */
1972 @REPLY
1973 int signaled; /* was the timer signaled before this calltime ? */
1974 @END
1976 /* Get information on a waitable timer */
1977 @REQ(get_timer_info)
1978 obj_handle_t handle; /* handle to the timer */
1979 @REPLY
1980 timeout_t when; /* absolute time when the timer next expires */
1981 int signaled; /* is the timer signaled? */
1982 @END
1985 /* Retrieve the current context of a thread */
1986 @REQ(get_thread_context)
1987 obj_handle_t handle; /* thread handle */
1988 obj_handle_t context; /* context handle */
1989 unsigned int flags; /* context flags */
1990 unsigned int native_flags; /* flags for native context if WoW present */
1991 unsigned short machine; /* context architecture */
1992 @REPLY
1993 int self; /* was it a handle to the current thread? */
1994 obj_handle_t handle; /* pending context handle */
1995 VARARG(contexts,contexts); /* thread context(s) */
1996 @END
1999 /* Set the current context of a thread */
2000 @REQ(set_thread_context)
2001 obj_handle_t handle; /* thread handle */
2002 unsigned int native_flags; /* flags for native context if WoW present */
2003 VARARG(contexts,contexts); /* thread context(s) */
2004 @REPLY
2005 int self; /* was it a handle to the current thread? */
2006 @END
2009 /* Fetch a selector entry for a thread */
2010 @REQ(get_selector_entry)
2011 obj_handle_t handle; /* thread handle */
2012 int entry; /* LDT entry */
2013 @REPLY
2014 unsigned int base; /* selector base */
2015 unsigned int limit; /* selector limit */
2016 unsigned char flags; /* selector flags */
2017 @END
2020 /* Add an atom */
2021 @REQ(add_atom)
2022 VARARG(name,unicode_str); /* atom name */
2023 @REPLY
2024 atom_t atom; /* resulting atom */
2025 @END
2028 /* Delete an atom */
2029 @REQ(delete_atom)
2030 atom_t atom; /* atom handle */
2031 @END
2034 /* Find an atom */
2035 @REQ(find_atom)
2036 VARARG(name,unicode_str); /* atom name */
2037 @REPLY
2038 atom_t atom; /* atom handle */
2039 @END
2042 /* Get information about an atom */
2043 @REQ(get_atom_information)
2044 atom_t atom; /* atom handle */
2045 @REPLY
2046 int count; /* atom lock count */
2047 int pinned; /* whether the atom has been pinned */
2048 data_size_t total; /* actual length of atom name */
2049 VARARG(name,unicode_str); /* atom name */
2050 @END
2053 /* Get the message queue of the current thread */
2054 @REQ(get_msg_queue)
2055 @REPLY
2056 obj_handle_t handle; /* handle to the queue */
2057 @END
2060 /* Set the file descriptor associated to the current thread queue */
2061 @REQ(set_queue_fd)
2062 obj_handle_t handle; /* handle to the file descriptor */
2063 @END
2066 /* Set the current message queue wakeup mask */
2067 @REQ(set_queue_mask)
2068 unsigned int wake_mask; /* wakeup bits mask */
2069 unsigned int changed_mask; /* changed bits mask */
2070 int skip_wait; /* will we skip waiting if signaled? */
2071 @REPLY
2072 unsigned int wake_bits; /* current wake bits */
2073 unsigned int changed_bits; /* current changed bits */
2074 @END
2077 /* Get the current message queue status */
2078 @REQ(get_queue_status)
2079 unsigned int clear_bits; /* should we clear the change bits? */
2080 @REPLY
2081 unsigned int wake_bits; /* wake bits */
2082 unsigned int changed_bits; /* changed bits since last time */
2083 @END
2086 /* Retrieve the process idle event */
2087 @REQ(get_process_idle_event)
2088 obj_handle_t handle; /* process handle */
2089 @REPLY
2090 obj_handle_t event; /* handle to idle event */
2091 @END
2094 /* Send a message to a thread queue */
2095 @REQ(send_message)
2096 thread_id_t id; /* thread id */
2097 int type; /* message type (see below) */
2098 int flags; /* message flags (see below) */
2099 user_handle_t win; /* window handle */
2100 unsigned int msg; /* message code */
2101 lparam_t wparam; /* parameters */
2102 lparam_t lparam; /* parameters */
2103 timeout_t timeout; /* timeout for reply */
2104 VARARG(data,message_data); /* message data for sent messages */
2105 @END
2107 @REQ(post_quit_message)
2108 int exit_code; /* exit code to return */
2109 @END
2111 enum message_type
2113 MSG_ASCII, /* Ascii message (from SendMessageA) */
2114 MSG_UNICODE, /* Unicode message (from SendMessageW) */
2115 MSG_NOTIFY, /* notify message (from SendNotifyMessageW), always Unicode */
2116 MSG_CALLBACK, /* callback message (from SendMessageCallbackW), always Unicode */
2117 MSG_CALLBACK_RESULT,/* result of a callback message */
2118 MSG_OTHER_PROCESS, /* sent from other process, may include vararg data, always Unicode */
2119 MSG_POSTED, /* posted message (from PostMessageW), always Unicode */
2120 MSG_HARDWARE, /* hardware message */
2121 MSG_WINEVENT, /* winevent message */
2122 MSG_HOOK_LL /* low-level hardware hook */
2124 #define SEND_MSG_ABORT_IF_HUNG 0x01
2127 /* Send a hardware message to a thread queue */
2128 @REQ(send_hardware_message)
2129 user_handle_t win; /* window handle */
2130 hw_input_t input; /* input data */
2131 unsigned int flags; /* flags (see below) */
2132 VARARG(report,bytes); /* HID report data */
2133 @REPLY
2134 int wait; /* do we need to wait for a reply? */
2135 int prev_x; /* previous cursor position */
2136 int prev_y;
2137 int new_x; /* new cursor position */
2138 int new_y;
2139 @END
2140 #define SEND_HWMSG_INJECTED 0x01
2143 /* Get a message from the current queue */
2144 @REQ(get_message)
2145 unsigned int flags; /* PM_* flags */
2146 user_handle_t get_win; /* window handle to get */
2147 unsigned int get_first; /* first message code to get */
2148 unsigned int get_last; /* last message code to get */
2149 unsigned int hw_id; /* id of the previous hardware message (or 0) */
2150 unsigned int wake_mask; /* wakeup bits mask */
2151 unsigned int changed_mask; /* changed bits mask */
2152 @REPLY
2153 user_handle_t win; /* window handle */
2154 unsigned int msg; /* message code */
2155 lparam_t wparam; /* parameters */
2156 lparam_t lparam; /* parameters */
2157 int type; /* message type */
2158 int x; /* message x position */
2159 int y; /* message y position */
2160 unsigned int time; /* message time */
2161 unsigned int active_hooks; /* active hooks bitmap */
2162 data_size_t total; /* total size of extra data */
2163 VARARG(data,message_data); /* message data for sent messages */
2164 @END
2167 /* Reply to a sent message */
2168 @REQ(reply_message)
2169 int remove; /* should we remove the message? */
2170 lparam_t result; /* message result */
2171 VARARG(data,bytes); /* message data for sent messages */
2172 @END
2175 /* Accept and remove the current hardware message */
2176 @REQ(accept_hardware_message)
2177 unsigned int hw_id; /* id of the hardware message */
2178 @END
2181 /* Retrieve the reply for the last message sent */
2182 @REQ(get_message_reply)
2183 int cancel; /* cancel message if not ready? */
2184 @REPLY
2185 lparam_t result; /* message result */
2186 VARARG(data,bytes); /* message data for sent messages */
2187 @END
2190 /* Set a window timer */
2191 @REQ(set_win_timer)
2192 user_handle_t win; /* window handle */
2193 unsigned int msg; /* message to post */
2194 unsigned int rate; /* timer rate in ms */
2195 lparam_t id; /* timer id */
2196 lparam_t lparam; /* message lparam (callback proc) */
2197 @REPLY
2198 lparam_t id; /* timer id */
2199 @END
2202 /* Kill a window timer */
2203 @REQ(kill_win_timer)
2204 user_handle_t win; /* window handle */
2205 lparam_t id; /* timer id */
2206 unsigned int msg; /* message to post */
2207 @END
2210 /* check if the thread owning the window is hung */
2211 @REQ(is_window_hung)
2212 user_handle_t win; /* window handle */
2213 @REPLY
2214 int is_hung;
2215 @END
2218 /* Retrieve info about a serial port */
2219 @REQ(get_serial_info)
2220 obj_handle_t handle; /* handle to comm port */
2221 int flags;
2222 @REPLY
2223 unsigned int eventmask;
2224 unsigned int cookie;
2225 unsigned int pending_write;
2226 @END
2229 /* Set info about a serial port */
2230 @REQ(set_serial_info)
2231 obj_handle_t handle; /* handle to comm port */
2232 int flags; /* bitmask to set values (see below) */
2233 @END
2234 #define SERIALINFO_PENDING_WRITE 0x04
2235 #define SERIALINFO_PENDING_WAIT 0x08
2237 /* Cancel all sync io on a thread */
2238 @REQ(cancel_sync)
2239 obj_handle_t handle; /* thread handle on which to cancel io */
2240 client_ptr_t iosb; /* I/O status block (NULL=all) */
2241 @END
2243 /* Create an async I/O */
2244 @REQ(register_async)
2245 int type; /* type of queue to look after */
2246 async_data_t async; /* async I/O parameters */
2247 int count; /* count - usually # of bytes to be read/written */
2248 @END
2249 #define ASYNC_TYPE_READ 0x01
2250 #define ASYNC_TYPE_WRITE 0x02
2251 #define ASYNC_TYPE_WAIT 0x03
2254 /* Cancel all async op on a fd */
2255 @REQ(cancel_async)
2256 obj_handle_t handle; /* handle to comm port, socket or file */
2257 client_ptr_t iosb; /* I/O status block (NULL=all) */
2258 int only_thread; /* cancel matching this thread */
2259 @END
2262 /* Retrieve results of an async */
2263 @REQ(get_async_result)
2264 client_ptr_t user_arg; /* user arg used to identify async */
2265 @REPLY
2266 VARARG(out_data,bytes); /* iosb output data */
2267 @END
2270 /* Notify direct completion of async and close the wait handle if not blocking */
2271 @REQ(set_async_direct_result)
2272 obj_handle_t handle; /* wait handle */
2273 apc_param_t information; /* IO_STATUS_BLOCK Information */
2274 unsigned int status; /* completion status */
2275 int mark_pending; /* set async to pending before completion? */
2276 @REPLY
2277 obj_handle_t handle; /* wait handle, or NULL if closed */
2278 @END
2281 /* Perform a read on a file object */
2282 @REQ(read)
2283 async_data_t async; /* async I/O parameters */
2284 file_pos_t pos; /* read position */
2285 @REPLY
2286 obj_handle_t wait; /* handle to wait on for blocking read */
2287 unsigned int options; /* device open options */
2288 VARARG(data,bytes); /* read data */
2289 @END
2292 /* Perform a write on a file object */
2293 @REQ(write)
2294 async_data_t async; /* async I/O parameters */
2295 file_pos_t pos; /* write position */
2296 VARARG(data,bytes); /* write data */
2297 @REPLY
2298 obj_handle_t wait; /* handle to wait on for blocking write */
2299 unsigned int options; /* device open options */
2300 data_size_t size; /* size written */
2301 @END
2304 /* Perform an ioctl on a file */
2305 @REQ(ioctl)
2306 ioctl_code_t code; /* ioctl code */
2307 async_data_t async; /* async I/O parameters */
2308 VARARG(in_data,bytes); /* ioctl input data */
2309 @REPLY
2310 obj_handle_t wait; /* handle to wait on for blocking ioctl */
2311 unsigned int options; /* device open options */
2312 VARARG(out_data,bytes); /* ioctl output data */
2313 @END
2316 /* Store results of an async irp */
2317 @REQ(set_irp_result)
2318 obj_handle_t handle; /* handle to the irp */
2319 unsigned int status; /* status of the irp */
2320 data_size_t size; /* result size (input or output depending on the operation) */
2321 VARARG(data,bytes); /* output data of the irp */
2322 @END
2325 /* Create a named pipe */
2326 @REQ(create_named_pipe)
2327 unsigned int access;
2328 unsigned int options;
2329 unsigned int sharing;
2330 unsigned int disposition;
2331 unsigned int maxinstances;
2332 unsigned int outsize;
2333 unsigned int insize;
2334 timeout_t timeout;
2335 unsigned int flags;
2336 VARARG(objattr,object_attributes); /* object attributes */
2337 @REPLY
2338 obj_handle_t handle; /* handle to the pipe */
2339 int created;
2340 @END
2342 /* flags in create_named_pipe and get_named_pipe_info */
2343 #define NAMED_PIPE_MESSAGE_STREAM_WRITE 0x0001
2344 #define NAMED_PIPE_MESSAGE_STREAM_READ 0x0002
2345 #define NAMED_PIPE_NONBLOCKING_MODE 0x0004
2346 #define NAMED_PIPE_SERVER_END 0x8000
2348 /* Set named pipe information by handle */
2349 @REQ(set_named_pipe_info)
2350 obj_handle_t handle;
2351 unsigned int flags;
2352 @END
2354 /* Create a window */
2355 @REQ(create_window)
2356 user_handle_t parent; /* parent window */
2357 user_handle_t owner; /* owner window */
2358 atom_t atom; /* class atom */
2359 mod_handle_t instance; /* module instance */
2360 int dpi; /* system DPI */
2361 int awareness; /* thread DPI awareness */
2362 unsigned int style; /* window style */
2363 unsigned int ex_style; /* window extended style */
2364 VARARG(class,unicode_str); /* class name */
2365 @REPLY
2366 user_handle_t handle; /* created window */
2367 user_handle_t parent; /* full handle of parent */
2368 user_handle_t owner; /* full handle of owner */
2369 int extra; /* number of extra bytes */
2370 client_ptr_t class_ptr; /* pointer to class in client address space */
2371 int dpi; /* window DPI if not per-monitor aware */
2372 int awareness; /* window DPI awareness */
2373 @END
2376 /* Destroy a window */
2377 @REQ(destroy_window)
2378 user_handle_t handle; /* handle to the window */
2379 @END
2382 /* Retrieve the desktop window for the current thread */
2383 @REQ(get_desktop_window)
2384 int force; /* force creation if it doesn't exist */
2385 @REPLY
2386 user_handle_t top_window; /* handle to the desktop window */
2387 user_handle_t msg_window; /* handle to the top-level HWND_MESSAGE parent */
2388 @END
2391 /* Set a window owner */
2392 @REQ(set_window_owner)
2393 user_handle_t handle; /* handle to the window */
2394 user_handle_t owner; /* new owner */
2395 @REPLY
2396 user_handle_t full_owner; /* full handle of new owner */
2397 user_handle_t prev_owner; /* full handle of previous owner */
2398 @END
2401 /* Get information from a window handle */
2402 @REQ(get_window_info)
2403 user_handle_t handle; /* handle to the window */
2404 @REPLY
2405 user_handle_t full_handle; /* full 32-bit handle */
2406 user_handle_t last_active; /* last active popup */
2407 process_id_t pid; /* process owning the window */
2408 thread_id_t tid; /* thread owning the window */
2409 atom_t atom; /* class atom */
2410 int is_unicode; /* ANSI or unicode */
2411 int dpi; /* window DPI */
2412 int awareness; /* DPI awareness */
2413 @END
2416 /* Set some information in a window */
2417 @REQ(set_window_info)
2418 unsigned short flags; /* flags for fields to set (see below) */
2419 short int is_unicode; /* ANSI or unicode */
2420 user_handle_t handle; /* handle to the window */
2421 unsigned int style; /* window style */
2422 unsigned int ex_style; /* window extended style */
2423 data_size_t extra_size; /* size to set in extra bytes */
2424 mod_handle_t instance; /* creator instance */
2425 lparam_t user_data; /* user-specific data */
2426 lparam_t extra_value; /* value to set in extra bytes or window id */
2427 int extra_offset; /* offset to set in extra bytes */
2428 @REPLY
2429 unsigned int old_style; /* old window style */
2430 unsigned int old_ex_style; /* old window extended style */
2431 mod_handle_t old_instance; /* old creator instance */
2432 lparam_t old_user_data; /* old user-specific data */
2433 lparam_t old_extra_value; /* old value in extra bytes */
2434 lparam_t old_id; /* old window id */
2435 @END
2436 #define SET_WIN_STYLE 0x01
2437 #define SET_WIN_EXSTYLE 0x02
2438 #define SET_WIN_ID 0x04
2439 #define SET_WIN_INSTANCE 0x08
2440 #define SET_WIN_USERDATA 0x10
2441 #define SET_WIN_EXTRA 0x20
2442 #define SET_WIN_UNICODE 0x40
2445 /* Set the parent of a window */
2446 @REQ(set_parent)
2447 user_handle_t handle; /* handle to the window */
2448 user_handle_t parent; /* handle to the parent */
2449 @REPLY
2450 user_handle_t old_parent; /* old parent window */
2451 user_handle_t full_parent; /* full handle of new parent */
2452 int dpi; /* new window DPI if not per-monitor aware */
2453 int awareness; /* new DPI awareness */
2454 @END
2457 /* Get a list of the window parents, up to the root of the tree */
2458 @REQ(get_window_parents)
2459 user_handle_t handle; /* handle to the window */
2460 @REPLY
2461 int count; /* total count of parents */
2462 VARARG(parents,user_handles); /* parent handles */
2463 @END
2466 /* Get a list of the window children */
2467 @REQ(get_window_children)
2468 obj_handle_t desktop; /* handle to desktop */
2469 user_handle_t parent; /* parent window */
2470 atom_t atom; /* class atom for the listed children */
2471 thread_id_t tid; /* thread owning the listed children */
2472 VARARG(class,unicode_str); /* class name */
2473 @REPLY
2474 int count; /* total count of children */
2475 VARARG(children,user_handles); /* children handles */
2476 @END
2479 /* Get a list of the window children that contain a given point */
2480 @REQ(get_window_children_from_point)
2481 user_handle_t parent; /* parent window */
2482 int x; /* point in parent coordinates */
2483 int y;
2484 int dpi; /* dpi for the point coordinates */
2485 @REPLY
2486 int count; /* total count of children */
2487 VARARG(children,user_handles); /* children handles */
2488 @END
2491 /* Get window tree information from a window handle */
2492 @REQ(get_window_tree)
2493 user_handle_t handle; /* handle to the window */
2494 @REPLY
2495 user_handle_t parent; /* parent window */
2496 user_handle_t owner; /* owner window */
2497 user_handle_t next_sibling; /* next sibling in Z-order */
2498 user_handle_t prev_sibling; /* prev sibling in Z-order */
2499 user_handle_t first_sibling; /* first sibling in Z-order */
2500 user_handle_t last_sibling; /* last sibling in Z-order */
2501 user_handle_t first_child; /* first child */
2502 user_handle_t last_child; /* last child */
2503 @END
2505 /* Set the position and Z order of a window */
2506 @REQ(set_window_pos)
2507 unsigned short swp_flags; /* SWP_* flags */
2508 unsigned short paint_flags; /* paint flags (see below) */
2509 user_handle_t handle; /* handle to the window */
2510 user_handle_t previous; /* previous window in Z order */
2511 rectangle_t window; /* window rectangle (in parent coords) */
2512 rectangle_t client; /* client rectangle (in parent coords) */
2513 VARARG(valid,rectangles); /* valid rectangles from WM_NCCALCSIZE (in parent coords) */
2514 @REPLY
2515 unsigned int new_style; /* new window style */
2516 unsigned int new_ex_style; /* new window extended style */
2517 user_handle_t surface_win; /* parent window that holds the surface */
2518 int needs_update; /* whether the surface region needs an update */
2519 @END
2520 #define SET_WINPOS_PAINT_SURFACE 0x01 /* window has a paintable surface */
2521 #define SET_WINPOS_PIXEL_FORMAT 0x02 /* window has a custom pixel format */
2523 /* Get the window and client rectangles of a window */
2524 @REQ(get_window_rectangles)
2525 user_handle_t handle; /* handle to the window */
2526 int relative; /* coords relative to (see below) */
2527 int dpi; /* DPI to map to, or zero for per-monitor DPI */
2528 @REPLY
2529 rectangle_t window; /* window rectangle */
2530 rectangle_t client; /* client rectangle */
2531 @END
2532 enum coords_relative
2534 COORDS_CLIENT, /* relative to client area */
2535 COORDS_WINDOW, /* relative to whole window area */
2536 COORDS_PARENT, /* relative to parent's client area */
2537 COORDS_SCREEN /* relative to screen origin */
2541 /* Get the window text */
2542 @REQ(get_window_text)
2543 user_handle_t handle; /* handle to the window */
2544 @REPLY
2545 data_size_t length; /* total length in WCHARs */
2546 VARARG(text,unicode_str); /* window text */
2547 @END
2550 /* Set the window text */
2551 @REQ(set_window_text)
2552 user_handle_t handle; /* handle to the window */
2553 VARARG(text,unicode_str); /* window text */
2554 @END
2557 /* Get the coordinates offset between two windows */
2558 @REQ(get_windows_offset)
2559 user_handle_t from; /* handle to the first window */
2560 user_handle_t to; /* handle to the second window */
2561 int dpi; /* DPI to map to, or zero for per-monitor DPI */
2562 @REPLY
2563 int x; /* x coordinate offset */
2564 int y; /* y coordinate offset */
2565 int mirror; /* whether to mirror the x coordinate */
2566 @END
2569 /* Get the visible region of a window */
2570 @REQ(get_visible_region)
2571 user_handle_t window; /* handle to the window */
2572 unsigned int flags; /* DCX flags */
2573 @REPLY
2574 user_handle_t top_win; /* top window to clip against */
2575 rectangle_t top_rect; /* top window visible rect with screen coords */
2576 rectangle_t win_rect; /* window rect in screen coords */
2577 unsigned int paint_flags; /* paint flags (from SET_WINPOS_* flags) */
2578 data_size_t total_size; /* total size of the resulting region */
2579 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2580 @END
2583 /* Get the visible surface region of a window */
2584 @REQ(get_surface_region)
2585 user_handle_t window; /* handle to the window */
2586 @REPLY
2587 rectangle_t visible_rect; /* window visible rect in screen coords */
2588 data_size_t total_size; /* total size of the resulting region */
2589 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2590 @END
2593 /* Get the window region */
2594 @REQ(get_window_region)
2595 user_handle_t window; /* handle to the window */
2596 @REPLY
2597 data_size_t total_size; /* total size of the resulting region */
2598 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2599 @END
2602 /* Set the window region */
2603 @REQ(set_window_region)
2604 user_handle_t window; /* handle to the window */
2605 int redraw; /* redraw the window? */
2606 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2607 @END
2610 /* Get the window update region */
2611 @REQ(get_update_region)
2612 user_handle_t window; /* handle to the window */
2613 user_handle_t from_child; /* child to start searching from */
2614 unsigned int flags; /* update flags (see below) */
2615 @REPLY
2616 user_handle_t child; /* child to repaint (or window itself) */
2617 unsigned int flags; /* resulting update flags (see below) */
2618 data_size_t total_size; /* total size of the resulting region */
2619 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2620 @END
2621 #define UPDATE_NONCLIENT 0x001 /* get region for repainting non-client area */
2622 #define UPDATE_ERASE 0x002 /* get region for erasing client area */
2623 #define UPDATE_PAINT 0x004 /* get region for painting client area */
2624 #define UPDATE_INTERNALPAINT 0x008 /* get region if internal paint is pending */
2625 #define UPDATE_ALLCHILDREN 0x010 /* force repaint of all children */
2626 #define UPDATE_NOCHILDREN 0x020 /* don't try to repaint any children */
2627 #define UPDATE_NOREGION 0x040 /* don't return a region, only the flags */
2628 #define UPDATE_DELAYED_ERASE 0x080 /* still needs erase after BeginPaint */
2629 #define UPDATE_CLIPCHILDREN 0x100 /* remove clipped children from the update region */
2632 /* Update the z order of a window so that a given rectangle is fully visible */
2633 @REQ(update_window_zorder)
2634 user_handle_t window; /* handle to the window */
2635 rectangle_t rect; /* rectangle that must be visible (in client coords) */
2636 @END
2639 /* Mark parts of a window as needing a redraw */
2640 @REQ(redraw_window)
2641 user_handle_t window; /* handle to the window */
2642 unsigned int flags; /* RDW_* flags */
2643 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2644 @END
2647 /* Set a window property */
2648 @REQ(set_window_property)
2649 user_handle_t window; /* handle to the window */
2650 lparam_t data; /* data to store */
2651 atom_t atom; /* property atom (if no name specified) */
2652 VARARG(name,unicode_str); /* property name */
2653 @END
2656 /* Remove a window property */
2657 @REQ(remove_window_property)
2658 user_handle_t window; /* handle to the window */
2659 atom_t atom; /* property atom (if no name specified) */
2660 VARARG(name,unicode_str); /* property name */
2661 @REPLY
2662 lparam_t data; /* data stored in property */
2663 @END
2666 /* Get a window property */
2667 @REQ(get_window_property)
2668 user_handle_t window; /* handle to the window */
2669 atom_t atom; /* property atom (if no name specified) */
2670 VARARG(name,unicode_str); /* property name */
2671 @REPLY
2672 lparam_t data; /* data stored in property */
2673 @END
2676 /* Get the list of properties of a window */
2677 @REQ(get_window_properties)
2678 user_handle_t window; /* handle to the window */
2679 @REPLY
2680 int total; /* total number of properties */
2681 VARARG(props,properties); /* list of properties */
2682 @END
2685 /* Create a window station */
2686 @REQ(create_winstation)
2687 unsigned int flags; /* window station flags */
2688 unsigned int access; /* wanted access rights */
2689 unsigned int attributes; /* object attributes */
2690 obj_handle_t rootdir; /* root directory */
2691 VARARG(name,unicode_str); /* object name */
2692 @REPLY
2693 obj_handle_t handle; /* handle to the window station */
2694 @END
2697 /* Open a handle to a window station */
2698 @REQ(open_winstation)
2699 unsigned int access; /* wanted access rights */
2700 unsigned int attributes; /* object attributes */
2701 obj_handle_t rootdir; /* root directory */
2702 VARARG(name,unicode_str); /* object name */
2703 @REPLY
2704 obj_handle_t handle; /* handle to the window station */
2705 @END
2708 /* Close a window station */
2709 @REQ(close_winstation)
2710 obj_handle_t handle; /* handle to the window station */
2711 @END
2714 /* Get the process current window station */
2715 @REQ(get_process_winstation)
2716 @REPLY
2717 obj_handle_t handle; /* handle to the window station */
2718 @END
2721 /* Set the process current window station */
2722 @REQ(set_process_winstation)
2723 obj_handle_t handle; /* handle to the window station */
2724 @END
2727 /* Enumerate window stations */
2728 @REQ(enum_winstation)
2729 unsigned int index; /* current index */
2730 @REPLY
2731 unsigned int next; /* next index */
2732 VARARG(name,unicode_str); /* window station name */
2733 @END
2736 /* Create a desktop */
2737 @REQ(create_desktop)
2738 unsigned int flags; /* desktop flags */
2739 unsigned int access; /* wanted access rights */
2740 unsigned int attributes; /* object attributes */
2741 VARARG(name,unicode_str); /* object name */
2742 @REPLY
2743 obj_handle_t handle; /* handle to the desktop */
2744 @END
2747 /* Open a handle to a desktop */
2748 @REQ(open_desktop)
2749 obj_handle_t winsta; /* window station to open (null allowed) */
2750 unsigned int flags; /* desktop flags */
2751 unsigned int access; /* wanted access rights */
2752 unsigned int attributes; /* object attributes */
2753 VARARG(name,unicode_str); /* object name */
2754 @REPLY
2755 obj_handle_t handle; /* handle to the desktop */
2756 @END
2759 /* Open a handle to current input desktop */
2760 @REQ(open_input_desktop)
2761 unsigned int flags; /* desktop flags */
2762 unsigned int access; /* wanted access rights */
2763 unsigned int attributes; /* object attributes */
2764 @REPLY
2765 obj_handle_t handle; /* handle to the desktop */
2766 @END
2769 /* Changes the current input desktop */
2770 @REQ(set_input_desktop)
2771 obj_handle_t handle; /* handle to the desktop */
2772 @END
2775 /* Close a desktop */
2776 @REQ(close_desktop)
2777 obj_handle_t handle; /* handle to the desktop */
2778 @END
2781 /* Get the thread current desktop */
2782 @REQ(get_thread_desktop)
2783 thread_id_t tid; /* thread id */
2784 @REPLY
2785 obj_handle_t handle; /* handle to the desktop */
2786 @END
2789 /* Set the thread current desktop */
2790 @REQ(set_thread_desktop)
2791 obj_handle_t handle; /* handle to the desktop */
2792 @END
2795 /* Enumerate desktops */
2796 @REQ(enum_desktop)
2797 obj_handle_t winstation; /* handle to the window station */
2798 unsigned int index; /* current index */
2799 @REPLY
2800 unsigned int next; /* next index */
2801 VARARG(name,unicode_str); /* window station name */
2802 @END
2805 /* Get/set information about a user object (window station or desktop) */
2806 @REQ(set_user_object_info)
2807 obj_handle_t handle; /* handle to the object */
2808 unsigned int flags; /* information to set/get */
2809 unsigned int obj_flags; /* new object flags */
2810 @REPLY
2811 int is_desktop; /* is object a desktop? */
2812 unsigned int old_obj_flags; /* old object flags */
2813 VARARG(name,unicode_str); /* object name */
2814 @END
2815 #define SET_USER_OBJECT_SET_FLAGS 1
2816 #define SET_USER_OBJECT_GET_FULL_NAME 2
2819 /* Register a hotkey */
2820 @REQ(register_hotkey)
2821 user_handle_t window; /* handle to the window */
2822 int id; /* hotkey identifier */
2823 unsigned int flags; /* modifier keys */
2824 unsigned int vkey; /* virtual key code */
2825 @REPLY
2826 int replaced; /* did we replace an existing hotkey? */
2827 unsigned int flags; /* flags of replaced hotkey */
2828 unsigned int vkey; /* virtual key code of replaced hotkey */
2829 @END
2832 /* Unregister a hotkey */
2833 @REQ(unregister_hotkey)
2834 user_handle_t window; /* handle to the window */
2835 int id; /* hotkey identifier */
2836 @REPLY
2837 unsigned int flags; /* flags of removed hotkey */
2838 unsigned int vkey; /* virtual key code of removed hotkey */
2839 @END
2842 /* Attach (or detach) thread inputs */
2843 @REQ(attach_thread_input)
2844 thread_id_t tid_from; /* thread to be attached */
2845 thread_id_t tid_to; /* thread to which tid_from should be attached */
2846 int attach; /* is it an attach? */
2847 @END
2850 /* Get input data for a given thread */
2851 @REQ(get_thread_input)
2852 thread_id_t tid; /* id of thread */
2853 @REPLY
2854 user_handle_t focus; /* handle to the focus window */
2855 user_handle_t capture; /* handle to the capture window */
2856 user_handle_t active; /* handle to the active window */
2857 user_handle_t foreground; /* handle to the global foreground window */
2858 user_handle_t menu_owner; /* handle to the menu owner */
2859 user_handle_t move_size; /* handle to the moving/resizing window */
2860 user_handle_t caret; /* handle to the caret window */
2861 user_handle_t cursor; /* handle to the cursor */
2862 int show_count; /* cursor show count */
2863 rectangle_t rect; /* caret rectangle */
2864 @END
2867 /* Get the time of the last input event */
2868 @REQ(get_last_input_time)
2869 @REPLY
2870 unsigned int time;
2871 @END
2874 /* Retrieve queue keyboard state for current thread or global async state */
2875 @REQ(get_key_state)
2876 int async; /* whether to query the async state */
2877 int key; /* optional key code or -1 */
2878 @REPLY
2879 unsigned char state; /* state of specified key */
2880 VARARG(keystate,bytes); /* state array for all the keys */
2881 @END
2883 /* Set queue keyboard state for current thread */
2884 @REQ(set_key_state)
2885 int async; /* whether to change the async state too */
2886 VARARG(keystate,bytes); /* state array for all the keys */
2887 @END
2889 /* Set the system foreground window */
2890 @REQ(set_foreground_window)
2891 user_handle_t handle; /* handle to the foreground window */
2892 @REPLY
2893 user_handle_t previous; /* handle to the previous foreground window */
2894 int send_msg_old; /* whether we have to send a msg to the old window */
2895 int send_msg_new; /* whether we have to send a msg to the new window */
2896 @END
2898 /* Set the current thread focus window */
2899 @REQ(set_focus_window)
2900 user_handle_t handle; /* handle to the focus window */
2901 @REPLY
2902 user_handle_t previous; /* handle to the previous focus window */
2903 @END
2905 /* Set the current thread active window */
2906 @REQ(set_active_window)
2907 user_handle_t handle; /* handle to the active window */
2908 @REPLY
2909 user_handle_t previous; /* handle to the previous active window */
2910 @END
2912 /* Set the current thread capture window */
2913 @REQ(set_capture_window)
2914 user_handle_t handle; /* handle to the capture window */
2915 unsigned int flags; /* capture flags (see below) */
2916 @REPLY
2917 user_handle_t previous; /* handle to the previous capture window */
2918 user_handle_t full_handle; /* full 32-bit handle of new capture window */
2919 @END
2920 #define CAPTURE_MENU 0x01 /* capture is for a menu */
2921 #define CAPTURE_MOVESIZE 0x02 /* capture is for moving/resizing */
2924 /* Set the current thread caret window */
2925 @REQ(set_caret_window)
2926 user_handle_t handle; /* handle to the caret window */
2927 int width; /* caret width */
2928 int height; /* caret height */
2929 @REPLY
2930 user_handle_t previous; /* handle to the previous caret window */
2931 rectangle_t old_rect; /* previous caret rectangle */
2932 int old_hide; /* previous hide count */
2933 int old_state; /* previous caret state (1=on, 0=off) */
2934 @END
2937 /* Set the current thread caret information */
2938 @REQ(set_caret_info)
2939 unsigned int flags; /* caret flags (see below) */
2940 user_handle_t handle; /* handle to the caret window */
2941 int x; /* caret x position */
2942 int y; /* caret y position */
2943 int hide; /* increment for hide count (can be negative to show it) */
2944 int state; /* caret state (see below) */
2945 @REPLY
2946 user_handle_t full_handle; /* handle to the current caret window */
2947 rectangle_t old_rect; /* previous caret rectangle */
2948 int old_hide; /* previous hide count */
2949 int old_state; /* previous caret state (1=on, 0=off) */
2950 @END
2951 #define SET_CARET_POS 0x01 /* set the caret position from x,y */
2952 #define SET_CARET_HIDE 0x02 /* increment the caret hide count */
2953 #define SET_CARET_STATE 0x04 /* set the caret on/off state */
2954 enum caret_state
2956 CARET_STATE_OFF, /* off */
2957 CARET_STATE_ON, /* on */
2958 CARET_STATE_TOGGLE, /* toggle current state */
2959 CARET_STATE_ON_IF_MOVED /* on if the position differs, unchanged otherwise */
2963 /* Set a window hook */
2964 @REQ(set_hook)
2965 int id; /* id of the hook */
2966 process_id_t pid; /* id of process to set the hook into */
2967 thread_id_t tid; /* id of thread to set the hook into */
2968 int event_min;
2969 int event_max;
2970 client_ptr_t proc; /* hook procedure */
2971 int flags;
2972 int unicode; /* is it a unicode hook? */
2973 VARARG(module,unicode_str); /* module name */
2974 @REPLY
2975 user_handle_t handle; /* handle to the hook */
2976 unsigned int active_hooks; /* active hooks bitmap */
2977 @END
2980 /* Remove a window hook */
2981 @REQ(remove_hook)
2982 user_handle_t handle; /* handle to the hook */
2983 client_ptr_t proc; /* hook procedure if handle is 0 */
2984 int id; /* id of the hook if handle is 0 */
2985 @REPLY
2986 unsigned int active_hooks; /* active hooks bitmap */
2987 @END
2990 /* Start calling a hook chain */
2991 @REQ(start_hook_chain)
2992 int id; /* id of the hook */
2993 int event; /* signalled event */
2994 user_handle_t window; /* handle to the event window */
2995 int object_id; /* object id for out of context winevent */
2996 int child_id; /* child id for out of context winevent */
2997 @REPLY
2998 user_handle_t handle; /* handle to the next hook */
2999 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
3000 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
3001 int unicode; /* is it a unicode hook? */
3002 client_ptr_t proc; /* hook procedure */
3003 unsigned int active_hooks; /* active hooks bitmap */
3004 VARARG(module,unicode_str); /* module name */
3005 @END
3008 /* Finished calling a hook chain */
3009 @REQ(finish_hook_chain)
3010 int id; /* id of the hook */
3011 @END
3014 /* Get the hook information */
3015 @REQ(get_hook_info)
3016 user_handle_t handle; /* handle to the current hook */
3017 int get_next; /* do we want info about current or next hook? */
3018 int event; /* signalled event */
3019 user_handle_t window; /* handle to the event window */
3020 int object_id; /* object id for out of context winevent */
3021 int child_id; /* child id for out of context winevent */
3022 @REPLY
3023 user_handle_t handle; /* handle to the hook */
3024 int id; /* id of the hook */
3025 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
3026 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
3027 client_ptr_t proc; /* hook procedure */
3028 int unicode; /* is it a unicode hook? */
3029 VARARG(module,unicode_str); /* module name */
3030 @END
3033 /* Create a window class */
3034 @REQ(create_class)
3035 int local; /* is it a local class? */
3036 atom_t atom; /* class atom */
3037 unsigned int style; /* class style */
3038 mod_handle_t instance; /* module instance */
3039 int extra; /* number of extra class bytes */
3040 int win_extra; /* number of window extra bytes */
3041 client_ptr_t client_ptr; /* pointer to class in client address space */
3042 data_size_t name_offset; /* base class name offset for specified atom */
3043 VARARG(name,unicode_str); /* class name */
3044 @REPLY
3045 atom_t atom; /* resulting class atom */
3046 @END
3049 /* Destroy a window class */
3050 @REQ(destroy_class)
3051 atom_t atom; /* class atom */
3052 mod_handle_t instance; /* module instance */
3053 VARARG(name,unicode_str); /* class name */
3054 @REPLY
3055 client_ptr_t client_ptr; /* pointer to class in client address space */
3056 @END
3059 /* Set some information in a class */
3060 @REQ(set_class_info)
3061 user_handle_t window; /* handle to the window */
3062 unsigned int flags; /* flags for info to set (see below) */
3063 atom_t atom; /* class atom */
3064 unsigned int style; /* class style */
3065 int win_extra; /* number of window extra bytes */
3066 mod_handle_t instance; /* module instance */
3067 int extra_offset; /* offset to set in extra bytes */
3068 data_size_t extra_size; /* size to set in extra bytes */
3069 lparam_t extra_value; /* value to set in extra bytes */
3070 @REPLY
3071 atom_t old_atom; /* previous class atom */
3072 atom_t base_atom; /* base class atom */
3073 mod_handle_t old_instance; /* previous module instance */
3074 lparam_t old_extra_value; /* old value in extra bytes */
3075 unsigned int old_style; /* previous class style */
3076 int old_extra; /* previous number of class extra bytes */
3077 int old_win_extra; /* previous number of window extra bytes */
3078 @END
3079 #define SET_CLASS_ATOM 0x0001
3080 #define SET_CLASS_STYLE 0x0002
3081 #define SET_CLASS_WINEXTRA 0x0004
3082 #define SET_CLASS_INSTANCE 0x0008
3083 #define SET_CLASS_EXTRA 0x0010
3086 /* Open the clipboard */
3087 @REQ(open_clipboard)
3088 user_handle_t window; /* clipboard window */
3089 @REPLY
3090 user_handle_t owner; /* current clipboard owner */
3091 @END
3094 /* Close the clipboard */
3095 @REQ(close_clipboard)
3096 @REPLY
3097 user_handle_t viewer; /* first clipboard viewer */
3098 user_handle_t owner; /* current clipboard owner */
3099 @END
3102 /* Empty the clipboard and grab ownership */
3103 @REQ(empty_clipboard)
3104 @END
3107 /* Add a data format to the clipboard */
3108 @REQ(set_clipboard_data)
3109 unsigned int format; /* clipboard format of the data */
3110 unsigned int lcid; /* locale id to use for synthesizing text formats */
3111 VARARG(data,bytes); /* data contents */
3112 @REPLY
3113 unsigned int seqno; /* sequence number for the set data */
3114 @END
3117 /* Fetch a data format from the clipboard */
3118 @REQ(get_clipboard_data)
3119 unsigned int format; /* clipboard format of the data */
3120 int render; /* will we try to render it if missing? */
3121 int cached; /* do we already have it in the client-side cache? */
3122 unsigned int seqno; /* sequence number for the data in the cache */
3123 @REPLY
3124 unsigned int from; /* for synthesized data, format to generate it from */
3125 user_handle_t owner; /* clipboard owner for delayed-rendered formats */
3126 unsigned int seqno; /* sequence number for the originally set data */
3127 data_size_t total; /* total data size */
3128 VARARG(data,bytes); /* data contents */
3129 @END
3132 /* Retrieve a list of available formats */
3133 @REQ(get_clipboard_formats)
3134 unsigned int format; /* specific format to query, return all if 0 */
3135 @REPLY
3136 unsigned int count; /* count of available formats */
3137 VARARG(formats,uints); /* array of available formats */
3138 @END
3141 /* Retrieve the next available format */
3142 @REQ(enum_clipboard_formats)
3143 unsigned int previous; /* previous format, or first if 0 */
3144 @REPLY
3145 unsigned int format; /* next format */
3146 @END
3149 /* Release ownership of the clipboard */
3150 @REQ(release_clipboard)
3151 user_handle_t owner; /* clipboard owner to release */
3152 @REPLY
3153 user_handle_t viewer; /* first clipboard viewer */
3154 user_handle_t owner; /* current clipboard owner */
3155 @END
3158 /* Get clipboard information */
3159 @REQ(get_clipboard_info)
3160 @REPLY
3161 user_handle_t window; /* clipboard window */
3162 user_handle_t owner; /* clipboard owner */
3163 user_handle_t viewer; /* clipboard viewer */
3164 unsigned int seqno; /* current sequence number */
3165 @END
3168 /* Set the clipboard viewer window */
3169 @REQ(set_clipboard_viewer)
3170 user_handle_t viewer; /* clipboard viewer */
3171 user_handle_t previous; /* if non-zero, check that this was the previous viewer */
3172 @REPLY
3173 user_handle_t old_viewer; /* previous clipboard viewer */
3174 user_handle_t owner; /* clipboard owner */
3175 @END
3178 /* Add a clipboard listener window */
3179 @REQ(add_clipboard_listener)
3180 user_handle_t window; /* clipboard listener window */
3181 @END
3184 /* Remove a clipboard listener window */
3185 @REQ(remove_clipboard_listener)
3186 user_handle_t window; /* clipboard listener window */
3187 @END
3190 /* Create a security token */
3191 @REQ(create_token)
3192 struct luid token_id;
3193 unsigned int access; /* access rights to the new token */
3194 int primary; /* is the new token to be a primary one? */
3195 int impersonation_level; /* impersonation level of the new token */
3196 abstime_t expire; /* expiration time */
3197 int group_count;
3198 int primary_group;
3199 int priv_count;
3200 /* VARARG(objattr,object_attributes); */
3201 /* VARARG(user,sid); */
3202 /* VARARG(groups,sid); */
3203 /* VARARG(privs,luid_attr); */
3204 /* VARARG(dacl,acl); */
3205 @REPLY
3206 obj_handle_t token; /* handle to the token */
3207 @END
3210 /* Open a security token */
3211 @REQ(open_token)
3212 obj_handle_t handle; /* handle to the thread or process */
3213 unsigned int access; /* access rights to the new token */
3214 unsigned int attributes;/* object attributes */
3215 unsigned int flags; /* flags (see below) */
3216 @REPLY
3217 obj_handle_t token; /* handle to the token */
3218 @END
3219 #define OPEN_TOKEN_THREAD 1
3220 #define OPEN_TOKEN_AS_SELF 2
3223 /* Set/get the global windows */
3224 @REQ(set_global_windows)
3225 unsigned int flags; /* flags for fields to set (see below) */
3226 user_handle_t shell_window; /* handle to the new shell window */
3227 user_handle_t shell_listview; /* handle to the new shell listview window */
3228 user_handle_t progman_window; /* handle to the new program manager window */
3229 user_handle_t taskman_window; /* handle to the new task manager window */
3230 @REPLY
3231 user_handle_t old_shell_window; /* handle to the shell window */
3232 user_handle_t old_shell_listview; /* handle to the shell listview window */
3233 user_handle_t old_progman_window; /* handle to the new program manager window */
3234 user_handle_t old_taskman_window; /* handle to the new task manager window */
3235 @END
3236 #define SET_GLOBAL_SHELL_WINDOWS 0x01 /* set both main shell and listview windows */
3237 #define SET_GLOBAL_PROGMAN_WINDOW 0x02
3238 #define SET_GLOBAL_TASKMAN_WINDOW 0x04
3240 /* Adjust the privileges held by a token */
3241 @REQ(adjust_token_privileges)
3242 obj_handle_t handle; /* handle to the token */
3243 int disable_all; /* disable all privileges? */
3244 int get_modified_state; /* get modified privileges? */
3245 VARARG(privileges,luid_attr); /* privileges to enable/disable/remove */
3246 @REPLY
3247 unsigned int len; /* total length in bytes required to store token privileges */
3248 VARARG(privileges,luid_attr); /* modified privileges */
3249 @END
3251 /* Retrieves the set of privileges held by or available to a token */
3252 @REQ(get_token_privileges)
3253 obj_handle_t handle; /* handle to the token */
3254 @REPLY
3255 unsigned int len; /* total length in bytes required to store token privileges */
3256 VARARG(privileges,luid_attr); /* privileges held by or available to a token */
3257 @END
3259 /* Check the token has the required privileges */
3260 @REQ(check_token_privileges)
3261 obj_handle_t handle; /* handle to the token */
3262 int all_required; /* are all the privileges required for the check to succeed? */
3263 VARARG(privileges,luid_attr); /* privileges to check */
3264 @REPLY
3265 int has_privileges; /* does the token have the required privileges? */
3266 VARARG(privileges,luid_attr); /* privileges held by or available to a token */
3267 @END
3269 @REQ(duplicate_token)
3270 obj_handle_t handle; /* handle to the token to duplicate */
3271 unsigned int access; /* access rights to the new token */
3272 int primary; /* is the new token to be a primary one? */
3273 int impersonation_level; /* impersonation level of the new token */
3274 VARARG(objattr,object_attributes); /* object attributes */
3275 @REPLY
3276 obj_handle_t new_handle; /* duplicated handle */
3277 @END
3279 @REQ(filter_token)
3280 obj_handle_t handle; /* handle to the token to duplicate */
3281 unsigned int flags; /* flags */
3282 data_size_t privileges_size; /* size of privileges */
3283 VARARG(privileges,luid_attr,privileges_size); /* privileges to remove from new token */
3284 VARARG(disable_sids,sid); /* array of groups to remove from new token */
3285 @REPLY
3286 obj_handle_t new_handle; /* filtered handle */
3287 @END
3289 @REQ(access_check)
3290 obj_handle_t handle; /* handle to the token */
3291 unsigned int desired_access; /* desired access to the object */
3292 generic_map_t mapping; /* mapping to specific rights */
3293 VARARG(sd,security_descriptor); /* security descriptor to check */
3294 @REPLY
3295 unsigned int access_granted; /* access rights actually granted */
3296 unsigned int access_status; /* was access granted? */
3297 unsigned int privileges_len; /* length needed to store privileges */
3298 VARARG(privileges,luid_attr); /* privileges used during access check */
3299 @END
3301 @REQ(get_token_sid)
3302 obj_handle_t handle; /* handle to the token */
3303 unsigned int which_sid; /* which SID to retrieve from the token */
3304 @REPLY
3305 data_size_t sid_len; /* length needed to store sid */
3306 VARARG(sid,sid); /* the sid specified by which_sid from the token */
3307 @END
3309 @REQ(get_token_groups)
3310 obj_handle_t handle; /* handle to the token */
3311 unsigned int attr_mask; /* mask for wanted attributes */
3312 @REPLY
3313 data_size_t attr_len; /* length needed to store attrs */
3314 data_size_t sid_len; /* length needed to store sids */
3315 VARARG(attrs,uints,attr_len); /* group attributes */
3316 VARARG(sids,sids); /* group sids */
3317 @END
3319 @REQ(get_token_default_dacl)
3320 obj_handle_t handle; /* handle to the token */
3321 @REPLY
3322 data_size_t acl_len; /* length needed to store access control list */
3323 VARARG(acl,acl); /* access control list */
3324 @END
3326 @REQ(set_token_default_dacl)
3327 obj_handle_t handle; /* handle to the token */
3328 VARARG(acl,acl); /* default dacl to set */
3329 @END
3331 @REQ(set_security_object)
3332 obj_handle_t handle; /* handle to the object */
3333 unsigned int security_info; /* which parts of security descriptor to set */
3334 VARARG(sd,security_descriptor); /* security descriptor to set */
3335 @END
3337 @REQ(get_security_object)
3338 obj_handle_t handle; /* handle to the object */
3339 unsigned int security_info; /* which parts of security descriptor to get */
3340 @REPLY
3341 unsigned int sd_len; /* buffer size needed for sd */
3342 VARARG(sd,security_descriptor); /* retrieved security descriptor */
3343 @END
3346 struct handle_info
3348 process_id_t owner;
3349 obj_handle_t handle;
3350 unsigned int access;
3351 unsigned int attributes;
3352 unsigned int type;
3355 /* Return a list of all opened handles */
3356 @REQ(get_system_handles)
3357 @REPLY
3358 unsigned int count; /* number of handles */
3359 VARARG(data,handle_infos); /* array of handle_infos */
3360 @END
3363 /* Create a mailslot */
3364 @REQ(create_mailslot)
3365 unsigned int access; /* wanted access rights */
3366 timeout_t read_timeout;
3367 unsigned int max_msgsize;
3368 VARARG(objattr,object_attributes); /* object attributes */
3369 @REPLY
3370 obj_handle_t handle; /* handle to the mailslot */
3371 @END
3374 /* Set mailslot information */
3375 @REQ(set_mailslot_info)
3376 obj_handle_t handle; /* handle to the mailslot */
3377 timeout_t read_timeout;
3378 unsigned int flags;
3379 @REPLY
3380 timeout_t read_timeout;
3381 unsigned int max_msgsize;
3382 @END
3383 #define MAILSLOT_SET_READ_TIMEOUT 1
3386 /* Create a directory object */
3387 @REQ(create_directory)
3388 unsigned int access; /* access flags */
3389 VARARG(objattr,object_attributes); /* object attributes */
3390 @REPLY
3391 obj_handle_t handle; /* handle to the directory */
3392 @END
3395 /* Open a directory object */
3396 @REQ(open_directory)
3397 unsigned int access; /* access flags */
3398 unsigned int attributes; /* object attributes */
3399 obj_handle_t rootdir; /* root directory */
3400 VARARG(directory_name,unicode_str); /* Directory name */
3401 @REPLY
3402 obj_handle_t handle; /* handle to the directory */
3403 @END
3406 /* Get a directory entry by index */
3407 @REQ(get_directory_entry)
3408 obj_handle_t handle; /* handle to the directory */
3409 unsigned int index; /* entry index */
3410 @REPLY
3411 data_size_t total_len; /* total length needed for strings */
3412 data_size_t name_len; /* length of the entry name in bytes */
3413 VARARG(name,unicode_str,name_len); /* entry name */
3414 VARARG(type,unicode_str); /* entry type */
3415 @END
3418 /* Create a symbolic link object */
3419 @REQ(create_symlink)
3420 unsigned int access; /* access flags */
3421 VARARG(objattr,object_attributes); /* object attributes */
3422 VARARG(target_name,unicode_str); /* target name */
3423 @REPLY
3424 obj_handle_t handle; /* handle to the symlink */
3425 @END
3428 /* Open a symbolic link object */
3429 @REQ(open_symlink)
3430 unsigned int access; /* access flags */
3431 unsigned int attributes; /* object attributes */
3432 obj_handle_t rootdir; /* root directory */
3433 VARARG(name,unicode_str); /* symlink name */
3434 @REPLY
3435 obj_handle_t handle; /* handle to the symlink */
3436 @END
3439 /* Query a symbolic link object */
3440 @REQ(query_symlink)
3441 obj_handle_t handle; /* handle to the symlink */
3442 @REPLY
3443 data_size_t total; /* total needed size for name */
3444 VARARG(target_name,unicode_str); /* target name */
3445 @END
3448 /* Query basic object information */
3449 @REQ(get_object_info)
3450 obj_handle_t handle; /* handle to the object */
3451 @REPLY
3452 unsigned int access; /* granted access mask */
3453 unsigned int ref_count; /* object ref count */
3454 unsigned int handle_count; /* object handle count */
3455 @END
3458 /* Query the full name of an object */
3459 @REQ(get_object_name)
3460 obj_handle_t handle; /* handle to the object */
3461 @REPLY
3462 data_size_t total; /* total needed size for name */
3463 VARARG(name,unicode_str); /* object name */
3464 @END
3467 /* Query object type name information */
3468 @REQ(get_object_type)
3469 obj_handle_t handle; /* handle to the object */
3470 @REPLY
3471 VARARG(info,object_type_info); /* type information */
3472 @END
3475 /* Query type information for all types */
3476 @REQ(get_object_types)
3477 @REPLY
3478 int count; /* total count of object types */
3479 VARARG(info,object_types_info); /* type information */
3480 @END
3483 /* Allocate a locally-unique identifier */
3484 @REQ(allocate_locally_unique_id)
3485 @REPLY
3486 struct luid luid;
3487 @END
3490 /* Create a device manager */
3491 @REQ(create_device_manager)
3492 unsigned int access; /* wanted access rights */
3493 unsigned int attributes; /* object attributes */
3494 @REPLY
3495 obj_handle_t handle; /* handle to the device */
3496 @END
3499 /* Create a device */
3500 @REQ(create_device)
3501 obj_handle_t rootdir; /* root directory */
3502 client_ptr_t user_ptr; /* opaque ptr for use by client */
3503 obj_handle_t manager; /* device manager */
3504 VARARG(name,unicode_str); /* object name */
3505 @END
3508 /* Delete a device */
3509 @REQ(delete_device)
3510 obj_handle_t manager; /* handle to the device manager */
3511 client_ptr_t device; /* pointer to the device */
3512 @END
3515 /* Retrieve the next pending device irp request */
3516 @REQ(get_next_device_request)
3517 obj_handle_t manager; /* handle to the device manager */
3518 obj_handle_t prev; /* handle to the previous irp */
3519 unsigned int status; /* status of the previous irp */
3520 client_ptr_t user_ptr; /* user pointer of the previous irp */
3521 int pending; /* was the previous irp marked pending? */
3522 unsigned int iosb_status; /* IOSB status of the previous irp */
3523 data_size_t result; /* IOSB result of the previous irp */
3524 VARARG(data,bytes); /* output data of the previous irp */
3525 @REPLY
3526 irp_params_t params; /* irp parameters */
3527 obj_handle_t next; /* handle to the next irp */
3528 thread_id_t client_tid; /* tid of thread calling irp */
3529 client_ptr_t client_thread; /* pointer to thread object of calling irp */
3530 data_size_t in_size; /* total needed input size */
3531 VARARG(next_data,bytes); /* input data of the next irp */
3532 @END
3535 /* Get kernel pointer from server object */
3536 @REQ(get_kernel_object_ptr)
3537 obj_handle_t manager; /* handle to the device manager */
3538 obj_handle_t handle; /* object handle */
3539 @REPLY
3540 client_ptr_t user_ptr; /* kernel object pointer */
3541 @END
3544 /* Associate kernel pointer with server object */
3545 @REQ(set_kernel_object_ptr)
3546 obj_handle_t manager; /* handle to the device manager */
3547 obj_handle_t handle; /* object handle */
3548 client_ptr_t user_ptr; /* kernel object pointer */
3549 @END
3552 /* Grab server object reference from kernel object pointer */
3553 @REQ(grab_kernel_object)
3554 obj_handle_t manager; /* handle to the device manager */
3555 client_ptr_t user_ptr; /* kernel object pointer */
3556 @END
3559 /* Release server object reference from kernel object pointer */
3560 @REQ(release_kernel_object)
3561 obj_handle_t manager; /* handle to the device manager */
3562 client_ptr_t user_ptr; /* kernel object pointer */
3563 @END
3566 /* Get handle from kernel object pointer */
3567 @REQ(get_kernel_object_handle)
3568 obj_handle_t manager; /* handle to the device manager */
3569 client_ptr_t user_ptr; /* kernel object pointer */
3570 unsigned int access; /* wanted access rights */
3571 @REPLY
3572 obj_handle_t handle; /* kernel object handle */
3573 @END
3576 /* Make the current process a system process */
3577 @REQ(make_process_system)
3578 obj_handle_t handle; /* handle to the process */
3579 @REPLY
3580 obj_handle_t event; /* event signaled when all user processes have exited */
3581 @END
3584 /* Get detailed fixed-size information about a token */
3585 @REQ(get_token_info)
3586 obj_handle_t handle; /* handle to the object */
3587 @REPLY
3588 struct luid token_id; /* locally-unique identifier of the token */
3589 struct luid modified_id; /* locally-unique identifier of the modified version of the token */
3590 unsigned int session_id; /* token session id */
3591 int primary; /* is the token primary or impersonation? */
3592 int impersonation_level; /* level of impersonation */
3593 int elevation; /* elevation type */
3594 int group_count; /* the number of groups the token is a member of */
3595 int privilege_count; /* the number of privileges the token has */
3596 @END
3599 /* Create a token which is an elevation counterpart to this token */
3600 @REQ(create_linked_token)
3601 obj_handle_t handle; /* handle to the token */
3602 @REPLY
3603 obj_handle_t linked; /* handle to the linked token */
3604 @END
3607 /* Create I/O completion port */
3608 @REQ(create_completion)
3609 unsigned int access; /* desired access to a port */
3610 unsigned int concurrent; /* max number of concurrent active threads */
3611 VARARG(objattr,object_attributes); /* object attributes */
3612 @REPLY
3613 obj_handle_t handle; /* port handle */
3614 @END
3617 /* Open I/O completion port */
3618 @REQ(open_completion)
3619 unsigned int access; /* desired access to a port */
3620 unsigned int attributes; /* object attributes */
3621 obj_handle_t rootdir; /* root directory */
3622 VARARG(filename,unicode_str); /* port name */
3623 @REPLY
3624 obj_handle_t handle; /* port handle */
3625 @END
3628 /* add completion to completion port */
3629 @REQ(add_completion)
3630 obj_handle_t handle; /* port handle */
3631 apc_param_t ckey; /* completion key */
3632 apc_param_t cvalue; /* completion value */
3633 apc_param_t information; /* IO_STATUS_BLOCK Information */
3634 unsigned int status; /* completion result */
3635 @END
3638 /* get completion from completion port queue */
3639 @REQ(remove_completion)
3640 obj_handle_t handle; /* port handle */
3641 @REPLY
3642 apc_param_t ckey; /* completion key */
3643 apc_param_t cvalue; /* completion value */
3644 apc_param_t information; /* IO_STATUS_BLOCK Information */
3645 unsigned int status; /* completion result */
3646 @END
3649 /* get completion queue depth */
3650 @REQ(query_completion)
3651 obj_handle_t handle; /* port handle */
3652 @REPLY
3653 unsigned int depth; /* completion queue depth */
3654 @END
3657 /* associate object with completion port */
3658 @REQ(set_completion_info)
3659 obj_handle_t handle; /* object handle */
3660 apc_param_t ckey; /* completion key */
3661 obj_handle_t chandle; /* port handle */
3662 @END
3665 /* check for associated completion and push msg */
3666 @REQ(add_fd_completion)
3667 obj_handle_t handle; /* async' object */
3668 apc_param_t cvalue; /* completion value */
3669 apc_param_t information; /* IO_STATUS_BLOCK Information */
3670 unsigned int status; /* completion status */
3671 int async; /* completion is an async result */
3672 @END
3675 /* set fd completion information */
3676 @REQ(set_fd_completion_mode)
3677 obj_handle_t handle; /* handle to a file or directory */
3678 unsigned int flags; /* completion notification flags */
3679 @END
3682 /* set fd disposition information */
3683 @REQ(set_fd_disp_info)
3684 obj_handle_t handle; /* handle to a file or directory */
3685 unsigned int flags; /* what actions should be taken when deleting a file */
3686 @END
3689 /* set fd name information */
3690 @REQ(set_fd_name_info)
3691 obj_handle_t handle; /* handle to a file or directory */
3692 obj_handle_t rootdir; /* root directory */
3693 data_size_t namelen; /* length of NT name in bytes */
3694 int link; /* link instead of renaming */
3695 unsigned int flags; /* FILE_RENAME_* flags */
3696 VARARG(name,unicode_str,namelen); /* NT name */
3697 VARARG(filename,string); /* new file name */
3698 @END
3701 /* set fd eof information */
3702 @REQ(set_fd_eof_info)
3703 obj_handle_t handle; /* handle to a file or directory */
3704 file_pos_t eof; /* offset of eof of file */
3705 @END
3708 /* Retrieve layered info for a window */
3709 @REQ(get_window_layered_info)
3710 user_handle_t handle; /* handle to the window */
3711 @REPLY
3712 unsigned int color_key; /* color key */
3713 unsigned int alpha; /* alpha (0..255) */
3714 unsigned int flags; /* LWA_* flags */
3715 @END
3718 /* Set layered info for a window */
3719 @REQ(set_window_layered_info)
3720 user_handle_t handle; /* handle to the window */
3721 unsigned int color_key; /* color key */
3722 unsigned int alpha; /* alpha (0..255) */
3723 unsigned int flags; /* LWA_* flags */
3724 @END
3727 /* Allocate an arbitrary user handle */
3728 @REQ(alloc_user_handle)
3729 @REPLY
3730 user_handle_t handle; /* allocated handle */
3731 @END
3734 /* Free an arbitrary user handle */
3735 @REQ(free_user_handle)
3736 user_handle_t handle; /* handle to free*/
3737 @END
3740 /* Set/get the current cursor */
3741 @REQ(set_cursor)
3742 unsigned int flags; /* flags for fields to set (see below) */
3743 user_handle_t handle; /* handle to the cursor */
3744 int show_count; /* show count increment/decrement */
3745 int x; /* cursor position */
3746 int y;
3747 rectangle_t clip; /* cursor clip rectangle */
3748 @REPLY
3749 user_handle_t prev_handle; /* previous handle */
3750 int prev_count; /* previous show count */
3751 int prev_x; /* previous position */
3752 int prev_y;
3753 int new_x; /* new position */
3754 int new_y;
3755 rectangle_t new_clip; /* new clip rectangle */
3756 unsigned int last_change; /* time of last position change */
3757 @END
3758 #define SET_CURSOR_HANDLE 0x01
3759 #define SET_CURSOR_COUNT 0x02
3760 #define SET_CURSOR_POS 0x04
3761 #define SET_CURSOR_CLIP 0x08
3762 #define SET_CURSOR_NOCLIP 0x10
3763 #define SET_CURSOR_FSCLIP 0x20
3765 /* Get the history of the 64 last cursor positions */
3766 @REQ(get_cursor_history)
3767 @REPLY
3768 VARARG(history,cursor_positions);
3769 @END
3772 /* Batch read rawinput message data */
3773 @REQ(get_rawinput_buffer)
3774 data_size_t header_size; /* size of RAWINPUTHEADER structure */
3775 int read_data; /* read the rawinput buffer data */
3776 @REPLY
3777 data_size_t next_size; /* minimum size to get next message data */
3778 unsigned int count;
3779 VARARG(data,bytes);
3780 @END
3782 /* Modify the list of registered rawinput devices */
3783 @REQ(update_rawinput_devices)
3784 VARARG(devices,rawinput_devices);
3785 @END
3787 /* Create a new job object */
3788 @REQ(create_job)
3789 unsigned int access; /* wanted access rights */
3790 VARARG(objattr,object_attributes); /* object attributes */
3791 @REPLY
3792 obj_handle_t handle; /* handle to the job */
3793 @END
3796 /* Open a job object */
3797 @REQ(open_job)
3798 unsigned int access; /* wanted access rights */
3799 unsigned int attributes; /* object attributes */
3800 obj_handle_t rootdir; /* root directory */
3801 VARARG(name,unicode_str); /* object name */
3802 @REPLY
3803 obj_handle_t handle; /* handle to the job */
3804 @END
3807 /* Assign a job object to a process */
3808 @REQ(assign_job)
3809 obj_handle_t job; /* handle to the job */
3810 obj_handle_t process; /* handle to the process */
3811 @END
3814 /* Check if a process is associated with a job */
3815 @REQ(process_in_job)
3816 obj_handle_t job; /* handle to the job */
3817 obj_handle_t process; /* handle to the process */
3818 @END
3821 /* Set limit flags on a job */
3822 @REQ(set_job_limits)
3823 obj_handle_t handle; /* handle to the job */
3824 unsigned int limit_flags; /* new limit flags */
3825 @END
3828 /* Set new completion port for a job */
3829 @REQ(set_job_completion_port)
3830 obj_handle_t job; /* handle to the job */
3831 obj_handle_t port; /* handle to the completion port */
3832 client_ptr_t key; /* key to send with completion messages */
3833 @END
3836 /* Retrieve information about a job */
3837 @REQ(get_job_info)
3838 obj_handle_t handle; /* handle to the job */
3839 @REPLY
3840 int total_processes; /* total count of processes */
3841 int active_processes; /* count of running processes */
3842 VARARG(pids,uints); /* list of active pids */
3843 @END
3846 /* Terminate all processes associated with the job */
3847 @REQ(terminate_job)
3848 obj_handle_t handle; /* handle to the job */
3849 int status; /* process exit code */
3850 @END
3853 /* Suspend a process */
3854 @REQ(suspend_process)
3855 obj_handle_t handle; /* process handle */
3856 @END
3859 /* Resume a process */
3860 @REQ(resume_process)
3861 obj_handle_t handle; /* process handle */
3862 @END
3865 /* Iterate thread list for process */
3866 @REQ(get_next_thread)
3867 obj_handle_t process; /* process handle */
3868 obj_handle_t last; /* thread handle to start with */
3869 unsigned int access; /* desired access for returned handle */
3870 unsigned int attributes; /* returned handle attributes */
3871 unsigned int flags; /* controls iteration direction */
3872 @REPLY
3873 obj_handle_t handle; /* next thread handle */
3874 @END