ntdll/unix: Use Pc instead of Rip in signal_arm64.
[wine.git] / server / protocol.def
bloba4b91b6ab62bb8d815f6bd8e50dc02eb054e0050
1 /* -*- C -*-
3 * Wine server protocol definition
5 * Copyright (C) 2001 Alexandre Julliard
7 * This file is used by tools/make_requests to build the
8 * protocol structures in include/wine/server_protocol.h
10 * This library is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU Lesser General Public
12 * License as published by the Free Software Foundation; either
13 * version 2.1 of the License, or (at your option) any later version.
15 * This library is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 * Lesser General Public License for more details.
20 * You should have received a copy of the GNU Lesser General Public
21 * License along with this library; if not, write to the Free Software
22 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
25 @HEADER /* start of C declarations */
27 #include <stdarg.h>
28 #include <stdlib.h>
29 #include <time.h>
31 #include <windef.h>
32 #include <winbase.h>
34 typedef unsigned int obj_handle_t;
35 typedef unsigned int user_handle_t;
36 typedef unsigned int atom_t;
37 typedef unsigned int process_id_t;
38 typedef unsigned int thread_id_t;
39 typedef unsigned int data_size_t;
40 typedef unsigned int ioctl_code_t;
41 typedef unsigned __int64 lparam_t;
42 typedef unsigned __int64 apc_param_t;
43 typedef unsigned __int64 mem_size_t;
44 typedef unsigned __int64 file_pos_t;
45 typedef unsigned __int64 client_ptr_t;
46 typedef unsigned __int64 affinity_t;
47 typedef client_ptr_t mod_handle_t;
49 struct request_header
51 int req; /* request code */
52 data_size_t request_size; /* request variable part size */
53 data_size_t reply_size; /* reply variable part maximum size */
56 struct reply_header
58 unsigned int error; /* error result */
59 data_size_t reply_size; /* reply variable part size */
62 /* placeholder structure for the maximum allowed request size */
63 /* this is used to construct the generic_request union */
64 struct request_max_size
66 int pad[16]; /* the max request size is 16 ints */
69 #define FIRST_USER_HANDLE 0x0020 /* first possible value for low word of user handle */
70 #define LAST_USER_HANDLE 0xffef /* last possible value for low word of user handle */
73 /* debug event data */
74 typedef union
76 int code; /* event code */
77 struct
79 int code; /* EXCEPTION_DEBUG_EVENT */
80 int first; /* first chance exception? */
81 unsigned int exc_code; /* exception code */
82 unsigned int flags; /* exception flags */
83 client_ptr_t record; /* exception record */
84 client_ptr_t address; /* exception address */
85 int nb_params; /* number of parameters */
86 int __pad;
87 client_ptr_t params[15]; /* parameters */
88 } exception;
89 struct
91 int code; /* CREATE_THREAD_DEBUG_EVENT */
92 obj_handle_t handle; /* handle to the new thread */
93 client_ptr_t teb; /* thread teb (in debugged process address space) */
94 client_ptr_t start; /* thread startup routine */
95 } create_thread;
96 struct
98 int code; /* CREATE_PROCESS_DEBUG_EVENT */
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 teb; /* thread teb (in debugged process address space) */
106 client_ptr_t start; /* thread startup routine */
107 client_ptr_t name; /* image name (optional) */
108 int unicode; /* is it Unicode? */
109 } create_process;
110 struct
112 int code; /* EXIT_THREAD_DEBUG_EVENT/EXIT_PROCESS_DEBUG_EVENT */
113 int exit_code; /* thread or process exit code */
114 } exit;
115 struct
117 int code; /* LOAD_DLL_DEBUG_EVENT */
118 obj_handle_t handle; /* file handle for the dll */
119 mod_handle_t base; /* base address of the dll */
120 int dbg_offset; /* offset of debug info in file */
121 int dbg_size; /* size of debug info */
122 client_ptr_t name; /* image name (optional) */
123 int unicode; /* is it Unicode? */
124 } load_dll;
125 struct
127 int code; /* UNLOAD_DLL_DEBUG_EVENT */
128 int __pad;
129 mod_handle_t base; /* base address of the dll */
130 } unload_dll;
131 } debug_event_t;
133 /* supported CPU types */
134 enum cpu_type
136 CPU_x86, CPU_x86_64, CPU_POWERPC, CPU_ARM, CPU_ARM64
138 typedef int client_cpu_t;
140 /* context data */
141 typedef struct
143 client_cpu_t cpu; /* cpu type */
144 unsigned int flags; /* SERVER_CTX_* flags */
145 union
147 struct { unsigned int eip, ebp, esp, eflags, cs, ss; } i386_regs;
148 struct { unsigned __int64 rip, rbp, rsp;
149 unsigned int cs, ss, flags, __pad; } x86_64_regs;
150 struct { unsigned int iar, msr, ctr, lr, dar, dsisr, trap, __pad; } powerpc_regs;
151 struct { unsigned int sp, lr, pc, cpsr; } arm_regs;
152 struct { unsigned __int64 sp, pc, pstate; } arm64_regs;
153 } ctl; /* selected by SERVER_CTX_CONTROL */
154 union
156 struct { unsigned int eax, ebx, ecx, edx, esi, edi; } i386_regs;
157 struct { unsigned __int64 rax,rbx, rcx, rdx, rsi, rdi,
158 r8, r9, r10, r11, r12, r13, r14, r15; } x86_64_regs;
159 struct { unsigned int gpr[32], cr, xer; } powerpc_regs;
160 struct { unsigned int r[13]; } arm_regs;
161 struct { unsigned __int64 x[31]; } arm64_regs;
162 } integer; /* selected by SERVER_CTX_INTEGER */
163 union
165 struct { unsigned int ds, es, fs, gs; } i386_regs;
166 struct { unsigned int ds, es, fs, gs; } x86_64_regs;
167 } seg; /* selected by SERVER_CTX_SEGMENTS */
168 union
170 struct { unsigned int ctrl, status, tag, err_off, err_sel, data_off, data_sel, cr0npx;
171 unsigned char regs[80]; } i386_regs;
172 struct { struct { unsigned __int64 low, high; } fpregs[32]; } x86_64_regs;
173 struct { double fpr[32], fpscr; } powerpc_regs;
174 struct { unsigned __int64 d[32]; unsigned int fpscr; } arm_regs;
175 struct { struct { unsigned __int64 low, high; } q[32]; unsigned int fpcr, fpsr; } arm64_regs;
176 } fp; /* selected by SERVER_CTX_FLOATING_POINT */
177 union
179 struct { unsigned int dr0, dr1, dr2, dr3, dr6, dr7; } i386_regs;
180 struct { unsigned __int64 dr0, dr1, dr2, dr3, dr6, dr7; } x86_64_regs;
181 struct { unsigned int dr[8]; } powerpc_regs;
182 struct { unsigned int bvr[8], bcr[8], wvr[1], wcr[1]; } arm_regs;
183 struct { unsigned __int64 bvr[8], wvr[2]; unsigned int bcr[8], wcr[2]; } arm64_regs;
184 } debug; /* selected by SERVER_CTX_DEBUG_REGISTERS */
185 union
187 unsigned char i386_regs[512];
188 } ext; /* selected by SERVER_CTX_EXTENDED_REGISTERS */
189 } context_t;
191 #define SERVER_CTX_CONTROL 0x01
192 #define SERVER_CTX_INTEGER 0x02
193 #define SERVER_CTX_SEGMENTS 0x04
194 #define SERVER_CTX_FLOATING_POINT 0x08
195 #define SERVER_CTX_DEBUG_REGISTERS 0x10
196 #define SERVER_CTX_EXTENDED_REGISTERS 0x20
198 /* structure used in sending an fd from client to server */
199 struct send_fd
201 thread_id_t tid; /* thread id */
202 int fd; /* file descriptor on client-side */
205 /* structure sent by the server on the wait fifo */
206 struct wake_up_reply
208 client_ptr_t cookie; /* magic cookie that was passed in select_request */
209 int signaled; /* wait result */
210 int __pad;
213 /* NT-style timeout, in 100ns units, negative means relative timeout */
214 typedef __int64 timeout_t;
215 #define TIMEOUT_INFINITE (((timeout_t)0x7fffffff) << 32 | 0xffffffff)
217 /* absolute timeout, negative means that monotonic clock is used */
218 typedef __int64 abstime_t;
220 /* structure for process startup info */
221 typedef struct
223 unsigned int debug_flags;
224 unsigned int console_flags;
225 obj_handle_t console;
226 obj_handle_t hstdin;
227 obj_handle_t hstdout;
228 obj_handle_t hstderr;
229 unsigned int x;
230 unsigned int y;
231 unsigned int xsize;
232 unsigned int ysize;
233 unsigned int xchars;
234 unsigned int ychars;
235 unsigned int attribute;
236 unsigned int flags;
237 unsigned int show;
238 data_size_t curdir_len;
239 data_size_t dllpath_len;
240 data_size_t imagepath_len;
241 data_size_t cmdline_len;
242 data_size_t title_len;
243 data_size_t desktop_len;
244 data_size_t shellinfo_len;
245 data_size_t runtime_len;
246 /* VARARG(curdir,unicode_str,curdir_len); */
247 /* VARARG(dllpath,unicode_str,dllpath_len); */
248 /* VARARG(imagepath,unicode_str,imagepath_len); */
249 /* VARARG(cmdline,unicode_str,cmdline_len); */
250 /* VARARG(title,unicode_str,title_len); */
251 /* VARARG(desktop,unicode_str,desktop_len); */
252 /* VARARG(shellinfo,unicode_str,shellinfo_len); */
253 /* VARARG(runtime,unicode_str,runtime_len); */
254 } startup_info_t;
256 /* structure returned in the list of window properties */
257 typedef struct
259 atom_t atom; /* property atom */
260 int string; /* was atom a string originally? */
261 lparam_t data; /* data stored in property */
262 } property_data_t;
264 /* structure to specify window rectangles */
265 typedef struct
267 int left;
268 int top;
269 int right;
270 int bottom;
271 } rectangle_t;
273 /* structure for parameters of async I/O calls */
274 typedef struct
276 obj_handle_t handle; /* object to perform I/O on */
277 obj_handle_t event; /* event to signal when done */
278 client_ptr_t iosb; /* I/O status block in client addr space */
279 client_ptr_t user; /* opaque user data containing callback pointer and async-specific data */
280 client_ptr_t apc; /* user APC to call */
281 apc_param_t apc_context; /* user APC context or completion value */
282 } async_data_t;
284 /* structures for extra message data */
286 struct hw_msg_source
288 unsigned int device; /* source device (IMDT_* values) */
289 unsigned int origin; /* source origin (IMO_* values) */
292 struct hardware_msg_data
294 lparam_t info; /* extra info */
295 unsigned int hw_id; /* unique id */
296 unsigned int flags; /* hook flags */
297 struct hw_msg_source source; /* message source */
298 union
300 int type;
301 struct
303 int type; /* RIM_TYPEKEYBOARD */
304 unsigned int message; /* message generated by this rawinput event */
305 unsigned short vkey; /* virtual key code */
306 unsigned short scan; /* scan code */
307 } kbd;
308 struct
310 int type; /* RIM_TYPEMOUSE */
311 int x; /* x coordinate */
312 int y; /* y coordinate */
313 unsigned int data; /* mouse data */
314 } mouse;
315 } rawinput;
318 struct callback_msg_data
320 client_ptr_t callback; /* callback function */
321 lparam_t data; /* user data for callback */
322 lparam_t result; /* message result */
325 struct winevent_msg_data
327 user_handle_t hook; /* hook handle */
328 thread_id_t tid; /* thread id */
329 client_ptr_t hook_proc; /* hook proc address */
330 /* followed by module name if any */
333 typedef union
335 int type;
336 struct
338 int type; /* INPUT_KEYBOARD */
339 unsigned short vkey; /* virtual key code */
340 unsigned short scan; /* scan code */
341 unsigned int flags; /* event flags */
342 unsigned int time; /* event time */
343 lparam_t info; /* extra info */
344 } kbd;
345 struct
347 int type; /* INPUT_MOUSE */
348 int x; /* coordinates */
349 int y;
350 unsigned int data; /* mouse data */
351 unsigned int flags; /* event flags */
352 unsigned int time; /* event time */
353 lparam_t info; /* extra info */
354 } mouse;
355 struct
357 int type; /* INPUT_HARDWARE */
358 unsigned int msg; /* message code */
359 lparam_t lparam; /* message param */
360 } hw;
361 } hw_input_t;
363 typedef union
365 unsigned char bytes[1]; /* raw data for sent messages */
366 struct hardware_msg_data hardware;
367 struct callback_msg_data callback;
368 struct winevent_msg_data winevent;
369 } message_data_t;
371 /* structure for console char/attribute info */
372 typedef struct
374 WCHAR ch;
375 unsigned short attr;
376 } char_info_t;
378 /* structure returned in filesystem events */
379 struct filesystem_event
381 int action;
382 data_size_t len;
383 char name[1];
386 typedef struct
388 unsigned int low_part;
389 int high_part;
390 } luid_t;
392 #define MAX_ACL_LEN 65535
394 struct security_descriptor
396 unsigned int control; /* SE_ flags */
397 data_size_t owner_len;
398 data_size_t group_len;
399 data_size_t sacl_len;
400 data_size_t dacl_len;
401 /* VARARG(owner,SID); */
402 /* VARARG(group,SID); */
403 /* VARARG(sacl,ACL); */
404 /* VARARG(dacl,ACL); */
407 struct object_attributes
409 obj_handle_t rootdir; /* root directory */
410 unsigned int attributes; /* object attributes */
411 data_size_t sd_len; /* length of security_descriptor data. may be 0 */
412 data_size_t name_len; /* length of the name string. may be 0 */
413 /* VARARG(sd,security_descriptor); */
414 /* VARARG(name,unicode_str); */
417 struct token_groups
419 unsigned int count;
420 /* unsigned int attributes[count]; */
421 /* VARARG(sids,SID); */
424 enum select_op
426 SELECT_NONE,
427 SELECT_WAIT,
428 SELECT_WAIT_ALL,
429 SELECT_SIGNAL_AND_WAIT,
430 SELECT_KEYED_EVENT_WAIT,
431 SELECT_KEYED_EVENT_RELEASE
434 typedef union
436 enum select_op op;
437 struct
439 enum select_op op; /* SELECT_WAIT or SELECT_WAIT_ALL */
440 obj_handle_t handles[MAXIMUM_WAIT_OBJECTS];
441 } wait;
442 struct
444 enum select_op op; /* SELECT_SIGNAL_AND_WAIT */
445 obj_handle_t wait;
446 obj_handle_t signal; /* must be last in the structure so we can remove it on retries */
447 } signal_and_wait;
448 struct
450 enum select_op op; /* SELECT_KEYED_EVENT_WAIT or SELECT_KEYED_EVENT_RELEASE */
451 obj_handle_t handle;
452 client_ptr_t key;
453 } keyed_event;
454 } select_op_t;
456 enum apc_type
458 APC_NONE,
459 APC_USER,
460 APC_TIMER,
461 APC_ASYNC_IO,
462 APC_VIRTUAL_ALLOC,
463 APC_VIRTUAL_FREE,
464 APC_VIRTUAL_QUERY,
465 APC_VIRTUAL_PROTECT,
466 APC_VIRTUAL_FLUSH,
467 APC_VIRTUAL_LOCK,
468 APC_VIRTUAL_UNLOCK,
469 APC_MAP_VIEW,
470 APC_UNMAP_VIEW,
471 APC_CREATE_THREAD,
472 APC_BREAK_PROCESS
475 typedef union
477 enum apc_type type;
478 struct
480 enum apc_type type; /* APC_USER */
481 int __pad;
482 client_ptr_t func; /* void (__stdcall *func)(ULONG_PTR,ULONG_PTR,ULONG_PTR); */
483 apc_param_t args[3]; /* arguments for user function */
484 } user;
485 struct
487 enum apc_type type; /* APC_TIMER */
488 int __pad;
489 client_ptr_t func; /* void (__stdcall *func)(void*, unsigned int, unsigned int); */
490 abstime_t time; /* time of expiration */
491 client_ptr_t arg; /* user argument */
492 } timer;
493 } user_apc_t;
495 typedef union
497 enum apc_type type;
498 user_apc_t user;
499 struct
501 enum apc_type type; /* APC_ASYNC_IO */
502 unsigned int status; /* I/O status */
503 client_ptr_t user; /* user pointer */
504 client_ptr_t sb; /* status block */
505 } async_io;
506 struct
508 enum apc_type type; /* APC_VIRTUAL_ALLOC */
509 unsigned int op_type; /* type of operation */
510 client_ptr_t addr; /* requested address */
511 mem_size_t size; /* allocation size */
512 mem_size_t zero_bits; /* number of zero high bits */
513 unsigned int prot; /* memory protection flags */
514 } virtual_alloc;
515 struct
517 enum apc_type type; /* APC_VIRTUAL_FREE */
518 unsigned int op_type; /* type of operation */
519 client_ptr_t addr; /* requested address */
520 mem_size_t size; /* allocation size */
521 } virtual_free;
522 struct
524 enum apc_type type; /* APC_VIRTUAL_QUERY */
525 int __pad;
526 client_ptr_t addr; /* requested address */
527 } virtual_query;
528 struct
530 enum apc_type type; /* APC_VIRTUAL_PROTECT */
531 unsigned int prot; /* new protection flags */
532 client_ptr_t addr; /* requested address */
533 mem_size_t size; /* requested size */
534 } virtual_protect;
535 struct
537 enum apc_type type; /* APC_VIRTUAL_FLUSH */
538 int __pad;
539 client_ptr_t addr; /* requested address */
540 mem_size_t size; /* requested size */
541 } virtual_flush;
542 struct
544 enum apc_type type; /* APC_VIRTUAL_LOCK */
545 int __pad;
546 client_ptr_t addr; /* requested address */
547 mem_size_t size; /* requested size */
548 } virtual_lock;
549 struct
551 enum apc_type type; /* APC_VIRTUAL_UNLOCK */
552 int __pad;
553 client_ptr_t addr; /* requested address */
554 mem_size_t size; /* requested size */
555 } virtual_unlock;
556 struct
558 enum apc_type type; /* APC_MAP_VIEW */
559 obj_handle_t handle; /* mapping handle */
560 client_ptr_t addr; /* requested address */
561 mem_size_t size; /* allocation size */
562 file_pos_t offset; /* file offset */
563 mem_size_t zero_bits; /* number of zero high bits */
564 unsigned int alloc_type; /* allocation type */
565 unsigned int prot; /* memory protection flags */
566 } map_view;
567 struct
569 enum apc_type type; /* APC_UNMAP_VIEW */
570 int __pad;
571 client_ptr_t addr; /* view address */
572 } unmap_view;
573 struct
575 enum apc_type type; /* APC_CREATE_THREAD */
576 unsigned int flags; /* creation flags */
577 client_ptr_t func; /* void (__stdcall *func)(void*); start function */
578 client_ptr_t arg; /* argument for start function */
579 mem_size_t reserve; /* reserve size for thread stack */
580 mem_size_t commit; /* commit size for thread stack */
581 } create_thread;
582 } apc_call_t;
584 typedef union
586 enum apc_type type;
587 struct
589 enum apc_type type; /* APC_ASYNC_IO */
590 unsigned int status; /* new status of async operation */
591 unsigned int total; /* bytes transferred */
592 } async_io;
593 struct
595 enum apc_type type; /* APC_VIRTUAL_ALLOC */
596 unsigned int status; /* status returned by call */
597 client_ptr_t addr; /* resulting address */
598 mem_size_t size; /* resulting size */
599 } virtual_alloc;
600 struct
602 enum apc_type type; /* APC_VIRTUAL_FREE */
603 unsigned int status; /* status returned by call */
604 client_ptr_t addr; /* resulting address */
605 mem_size_t size; /* resulting size */
606 } virtual_free;
607 struct
609 enum apc_type type; /* APC_VIRTUAL_QUERY */
610 unsigned int status; /* status returned by call */
611 client_ptr_t base; /* resulting base address */
612 client_ptr_t alloc_base;/* resulting allocation base */
613 mem_size_t size; /* resulting region size */
614 unsigned short state; /* resulting region state */
615 unsigned short prot; /* resulting region protection */
616 unsigned short alloc_prot;/* resulting allocation protection */
617 unsigned short alloc_type;/* resulting region allocation type */
618 } virtual_query;
619 struct
621 enum apc_type type; /* APC_VIRTUAL_PROTECT */
622 unsigned int status; /* status returned by call */
623 client_ptr_t addr; /* resulting address */
624 mem_size_t size; /* resulting size */
625 unsigned int prot; /* old protection flags */
626 } virtual_protect;
627 struct
629 enum apc_type type; /* APC_VIRTUAL_FLUSH */
630 unsigned int status; /* status returned by call */
631 client_ptr_t addr; /* resulting address */
632 mem_size_t size; /* resulting size */
633 } virtual_flush;
634 struct
636 enum apc_type type; /* APC_VIRTUAL_LOCK */
637 unsigned int status; /* status returned by call */
638 client_ptr_t addr; /* resulting address */
639 mem_size_t size; /* resulting size */
640 } virtual_lock;
641 struct
643 enum apc_type type; /* APC_VIRTUAL_UNLOCK */
644 unsigned int status; /* status returned by call */
645 client_ptr_t addr; /* resulting address */
646 mem_size_t size; /* resulting size */
647 } virtual_unlock;
648 struct
650 enum apc_type type; /* APC_MAP_VIEW */
651 unsigned int status; /* status returned by call */
652 client_ptr_t addr; /* resulting address */
653 mem_size_t size; /* resulting size */
654 } map_view;
655 struct
657 enum apc_type type; /* APC_MAP_VIEW */
658 unsigned int status; /* status returned by call */
659 } unmap_view;
660 struct
662 enum apc_type type; /* APC_CREATE_THREAD */
663 unsigned int status; /* status returned by call */
664 process_id_t pid; /* process id */
665 thread_id_t tid; /* thread id */
666 obj_handle_t handle; /* handle to new thread */
667 } create_thread;
668 struct
670 enum apc_type type; /* APC_BREAK_PROCESS */
671 unsigned int status; /* status returned by call */
672 } break_process;
673 } apc_result_t;
675 enum irp_type
677 IRP_CALL_NONE,
678 IRP_CALL_CREATE,
679 IRP_CALL_CLOSE,
680 IRP_CALL_READ,
681 IRP_CALL_WRITE,
682 IRP_CALL_FLUSH,
683 IRP_CALL_IOCTL,
684 IRP_CALL_FREE,
685 IRP_CALL_CANCEL
688 typedef union
690 enum irp_type type; /* irp call type */
691 struct
693 enum irp_type type; /* IRP_CALL_CREATE */
694 unsigned int access; /* access rights */
695 unsigned int sharing; /* sharing flags */
696 unsigned int options; /* file options */
697 client_ptr_t device; /* opaque ptr for the device */
698 obj_handle_t file; /* file handle */
699 } create;
700 struct
702 enum irp_type type; /* IRP_CALL_CLOSE */
703 int __pad;
704 client_ptr_t file; /* opaque ptr for the file object */
705 } close;
706 struct
708 enum irp_type type; /* IRP_CALL_READ */
709 unsigned int key; /* driver key */
710 data_size_t out_size; /* needed output size */
711 int __pad;
712 client_ptr_t file; /* opaque ptr for the file object */
713 file_pos_t pos; /* file position */
714 } read;
715 struct
717 enum irp_type type; /* IRP_CALL_WRITE */
718 unsigned int key; /* driver key */
719 client_ptr_t file; /* opaque ptr for the file object */
720 file_pos_t pos; /* file position */
721 } write;
722 struct
724 enum irp_type type; /* IRP_CALL_FLUSH */
725 int __pad;
726 client_ptr_t file; /* opaque ptr for the file object */
727 } flush;
728 struct
730 enum irp_type type; /* IRP_CALL_IOCTL */
731 ioctl_code_t code; /* ioctl code */
732 data_size_t out_size; /* needed output size */
733 int __pad;
734 client_ptr_t file; /* opaque ptr for the file object */
735 } ioctl;
736 struct
738 enum irp_type type; /* IRP_CALL_FREE */
739 int __pad;
740 client_ptr_t obj; /* opaque ptr for the freed object */
741 } free;
742 struct
744 enum irp_type type; /* IRP_CALL_CANCEL */
745 int __pad;
746 client_ptr_t irp; /* opaque ptr for canceled irp */
747 } cancel;
748 } irp_params_t;
750 /* information about a PE image mapping, roughly equivalent to SECTION_IMAGE_INFORMATION */
751 typedef struct
753 client_ptr_t base;
754 client_ptr_t entry_point;
755 mem_size_t map_size;
756 mem_size_t stack_size;
757 mem_size_t stack_commit;
758 unsigned int zerobits;
759 unsigned int subsystem;
760 unsigned short subsystem_low;
761 unsigned short subsystem_high;
762 unsigned int gp;
763 unsigned short image_charact;
764 unsigned short dll_charact;
765 unsigned short machine;
766 unsigned char contains_code;
767 unsigned char image_flags;
768 unsigned int loader_flags;
769 unsigned int header_size;
770 unsigned int file_size;
771 unsigned int checksum;
772 client_cpu_t cpu;
773 int __pad;
774 } pe_image_info_t;
775 #define IMAGE_FLAGS_ComPlusNativeReady 0x01
776 #define IMAGE_FLAGS_ComPlusILOnly 0x02
777 #define IMAGE_FLAGS_ImageDynamicallyRelocated 0x04
778 #define IMAGE_FLAGS_ImageMappedFlat 0x08
779 #define IMAGE_FLAGS_BaseBelow4gb 0x10
780 #define IMAGE_FLAGS_WineBuiltin 0x40
781 #define IMAGE_FLAGS_WineFakeDll 0x80
783 struct rawinput_device
785 unsigned short usage_page;
786 unsigned short usage;
787 unsigned int flags;
788 user_handle_t target;
791 /****************************************************************/
792 /* Request declarations */
794 /* Create a new process from the context of the parent */
795 @REQ(new_process)
796 obj_handle_t parent_process; /* parent process */
797 int inherit_all; /* inherit all handles from parent */
798 unsigned int create_flags; /* creation flags */
799 int socket_fd; /* file descriptor for process socket */
800 obj_handle_t exe_file; /* file handle for main exe */
801 unsigned int access; /* access rights for process object */
802 client_cpu_t cpu; /* CPU that the new process will use */
803 data_size_t info_size; /* size of startup info */
804 VARARG(objattr,object_attributes); /* object attributes */
805 VARARG(info,startup_info,info_size); /* startup information */
806 VARARG(env,unicode_str); /* environment for new process */
807 @REPLY
808 obj_handle_t info; /* new process info handle */
809 process_id_t pid; /* process id */
810 obj_handle_t handle; /* process handle (in the current process) */
811 @END
814 /* Execute a process, replacing the current one */
815 @REQ(exec_process)
816 int socket_fd; /* file descriptor for process socket */
817 client_cpu_t cpu; /* CPU that the new process will use */
818 @END
821 /* Retrieve information about a newly started process */
822 @REQ(get_new_process_info)
823 obj_handle_t info; /* info handle returned from new_process_request */
824 @REPLY
825 int success; /* did the process start successfully? */
826 int exit_code; /* process exit code if failed */
827 @END
830 /* Create a new thread */
831 @REQ(new_thread)
832 obj_handle_t process; /* process in which to create thread */
833 unsigned int access; /* wanted access rights */
834 int suspend; /* new thread should be suspended on creation */
835 int request_fd; /* fd for request pipe */
836 VARARG(objattr,object_attributes); /* object attributes */
837 @REPLY
838 thread_id_t tid; /* thread id */
839 obj_handle_t handle; /* thread handle (in the current process) */
840 @END
843 /* Retrieve the new process startup info */
844 @REQ(get_startup_info)
845 @REPLY
846 data_size_t info_size; /* size of startup info */
847 VARARG(info,startup_info,info_size); /* startup information */
848 VARARG(env,unicode_str); /* environment */
849 @END
852 /* Signal the end of the process initialization */
853 @REQ(init_process_done)
854 int gui; /* is it a GUI process? */
855 mod_handle_t module; /* main module base address */
856 client_ptr_t ldt_copy; /* address of LDT copy (in thread address space) */
857 client_ptr_t entry; /* process entry point */
858 @REPLY
859 int suspend; /* is process suspended? */
860 @END
863 /* Initialize a thread; called from the child after fork()/clone() */
864 @REQ(init_thread)
865 int unix_pid; /* Unix pid of new thread */
866 int unix_tid; /* Unix tid of new thread */
867 int debug_level; /* new debug level */
868 client_ptr_t teb; /* TEB of new thread (in thread address space) */
869 client_ptr_t entry; /* entry point or PEB if initial thread (in thread address space) */
870 int reply_fd; /* fd for reply pipe */
871 int wait_fd; /* fd for blocking calls pipe */
872 client_cpu_t cpu; /* CPU that this thread is running on */
873 @REPLY
874 process_id_t pid; /* process id of the new thread's process */
875 thread_id_t tid; /* thread id of the new thread */
876 timeout_t server_start; /* server start time */
877 data_size_t info_size; /* total size of startup info */
878 int version; /* protocol version */
879 unsigned int all_cpus; /* bitset of supported CPUs */
880 int suspend; /* is thread suspended? */
881 @END
884 /* Terminate a process */
885 @REQ(terminate_process)
886 obj_handle_t handle; /* process handle to terminate */
887 int exit_code; /* process exit code */
888 @REPLY
889 int self; /* suicide? */
890 @END
893 /* Terminate a thread */
894 @REQ(terminate_thread)
895 obj_handle_t handle; /* thread handle to terminate */
896 int exit_code; /* thread exit code */
897 @REPLY
898 int self; /* suicide? */
899 @END
902 /* Retrieve information about a process */
903 @REQ(get_process_info)
904 obj_handle_t handle; /* process handle */
905 @REPLY
906 process_id_t pid; /* server process id */
907 process_id_t ppid; /* server process id of parent */
908 affinity_t affinity; /* process affinity mask */
909 client_ptr_t peb; /* PEB address in process address space */
910 timeout_t start_time; /* process start time */
911 timeout_t end_time; /* process end time */
912 int exit_code; /* process exit code */
913 int priority; /* priority class */
914 client_cpu_t cpu; /* CPU that this process is running on */
915 short int debugger_present; /* process is being debugged */
916 short int debug_children; /* inherit debugger to child processes */
917 VARARG(image,pe_image_info); /* image info for main exe */
918 @END
921 /* Retrieve information about a process memory usage */
922 @REQ(get_process_vm_counters)
923 obj_handle_t handle; /* process handle */
924 @REPLY
925 mem_size_t peak_virtual_size; /* peak virtual memory in bytes */
926 mem_size_t virtual_size; /* virtual memory in bytes */
927 mem_size_t peak_working_set_size; /* peak real memory in bytes */
928 mem_size_t working_set_size; /* real memory in bytes */
929 mem_size_t pagefile_usage; /* commit charge in bytes */
930 mem_size_t peak_pagefile_usage; /* peak commit charge in bytes */
931 @END
934 /* Set a process information */
935 @REQ(set_process_info)
936 obj_handle_t handle; /* process handle */
937 int mask; /* setting mask (see below) */
938 int priority; /* priority class */
939 affinity_t affinity; /* affinity mask */
940 @END
941 #define SET_PROCESS_INFO_PRIORITY 0x01
942 #define SET_PROCESS_INFO_AFFINITY 0x02
945 /* Retrieve information about a thread */
946 @REQ(get_thread_info)
947 obj_handle_t handle; /* thread handle */
948 unsigned int access; /* required access rights */
949 @REPLY
950 process_id_t pid; /* server process id */
951 thread_id_t tid; /* server thread id */
952 client_ptr_t teb; /* thread teb pointer */
953 client_ptr_t entry_point; /* thread entry point */
954 affinity_t affinity; /* thread affinity mask */
955 int exit_code; /* thread exit code */
956 int priority; /* thread priority level */
957 int last; /* last thread in process */
958 int suspend_count; /* thread suspend count */
959 int dbg_hidden; /* thread hidden from debugger */
960 data_size_t desc_len; /* description length in bytes */
961 VARARG(desc,unicode_str); /* description string */
962 @END
965 /* Retrieve information about thread times */
966 @REQ(get_thread_times)
967 obj_handle_t handle; /* thread handle */
968 @REPLY
969 timeout_t creation_time; /* thread creation time */
970 timeout_t exit_time; /* thread exit time */
971 int unix_pid; /* thread native pid */
972 int unix_tid; /* thread native pid */
973 @END
976 /* Set a thread information */
977 @REQ(set_thread_info)
978 obj_handle_t handle; /* thread handle */
979 int mask; /* setting mask (see below) */
980 int priority; /* priority class */
981 affinity_t affinity; /* affinity mask */
982 client_ptr_t entry_point; /* thread entry point */
983 obj_handle_t token; /* impersonation token */
984 VARARG(desc,unicode_str); /* description string */
985 @END
986 #define SET_THREAD_INFO_PRIORITY 0x01
987 #define SET_THREAD_INFO_AFFINITY 0x02
988 #define SET_THREAD_INFO_TOKEN 0x04
989 #define SET_THREAD_INFO_ENTRYPOINT 0x08
990 #define SET_THREAD_INFO_DESCRIPTION 0x10
991 #define SET_THREAD_INFO_DBG_HIDDEN 0x20
994 /* Retrieve information about a module */
995 @REQ(get_dll_info)
996 obj_handle_t handle; /* process handle */
997 mod_handle_t base_address; /* base address of module */
998 @REPLY
999 client_ptr_t entry_point;
1000 data_size_t filename_len; /* buffer len in bytes required to store filename */
1001 VARARG(filename,unicode_str); /* file name of module */
1002 @END
1005 /* Suspend a thread */
1006 @REQ(suspend_thread)
1007 obj_handle_t handle; /* thread handle */
1008 @REPLY
1009 int count; /* new suspend count */
1010 @END
1013 /* Resume a thread */
1014 @REQ(resume_thread)
1015 obj_handle_t handle; /* thread handle */
1016 @REPLY
1017 int count; /* new suspend count */
1018 @END
1021 /* Notify the server that a dll has been loaded */
1022 @REQ(load_dll)
1023 data_size_t dbg_offset; /* debug info offset */
1024 mod_handle_t base; /* base address */
1025 client_ptr_t name; /* ptr to ptr to name (in process addr space) */
1026 data_size_t dbg_size; /* debug info size */
1027 VARARG(filename,unicode_str); /* file name of dll */
1028 @END
1031 /* Notify the server that a dll is being unloaded */
1032 @REQ(unload_dll)
1033 mod_handle_t base; /* base address */
1034 @END
1037 /* Queue an APC for a thread or process */
1038 @REQ(queue_apc)
1039 obj_handle_t handle; /* thread or process handle */
1040 apc_call_t call; /* call arguments */
1041 @REPLY
1042 obj_handle_t handle; /* APC handle */
1043 int self; /* run APC in caller itself? */
1044 @END
1047 /* Get the result of an APC call */
1048 @REQ(get_apc_result)
1049 obj_handle_t handle; /* handle to the APC */
1050 @REPLY
1051 apc_result_t result; /* result of the APC */
1052 @END
1055 /* Close a handle for the current process */
1056 @REQ(close_handle)
1057 obj_handle_t handle; /* handle to close */
1058 @END
1061 /* Set a handle information */
1062 @REQ(set_handle_info)
1063 obj_handle_t handle; /* handle we are interested in */
1064 int flags; /* new handle flags */
1065 int mask; /* mask for flags to set */
1066 @REPLY
1067 int old_flags; /* old flag value */
1068 @END
1071 /* Duplicate a handle */
1072 @REQ(dup_handle)
1073 obj_handle_t src_process; /* src process handle */
1074 obj_handle_t src_handle; /* src handle to duplicate */
1075 obj_handle_t dst_process; /* dst process handle */
1076 unsigned int access; /* wanted access rights */
1077 unsigned int attributes; /* object attributes */
1078 unsigned int options; /* duplicate options (see below) */
1079 @REPLY
1080 obj_handle_t handle; /* duplicated handle in dst process */
1081 int self; /* is the source the current process? */
1082 int closed; /* whether the source handle has been closed */
1083 @END
1084 #define DUP_HANDLE_CLOSE_SOURCE DUPLICATE_CLOSE_SOURCE
1085 #define DUP_HANDLE_SAME_ACCESS DUPLICATE_SAME_ACCESS
1086 #define DUP_HANDLE_MAKE_GLOBAL 0x80000000 /* Not a Windows flag */
1089 /* Open a handle to a process */
1090 @REQ(open_process)
1091 process_id_t pid; /* process id to open */
1092 unsigned int access; /* wanted access rights */
1093 unsigned int attributes; /* object attributes */
1094 @REPLY
1095 obj_handle_t handle; /* handle to the process */
1096 @END
1099 /* Open a handle to a thread */
1100 @REQ(open_thread)
1101 thread_id_t tid; /* thread id to open */
1102 unsigned int access; /* wanted access rights */
1103 unsigned int attributes; /* object attributes */
1104 @REPLY
1105 obj_handle_t handle; /* handle to the thread */
1106 @END
1109 /* Wait for handles */
1110 @REQ(select)
1111 int flags; /* wait flags (see below) */
1112 client_ptr_t cookie; /* magic cookie to return to client */
1113 abstime_t timeout; /* timeout */
1114 data_size_t size; /* size of select_op */
1115 obj_handle_t prev_apc; /* handle to previous APC */
1116 VARARG(result,apc_result); /* result of previous APC */
1117 VARARG(data,select_op,size); /* operation-specific data */
1118 VARARG(context,context); /* suspend context */
1119 @REPLY
1120 apc_call_t call; /* APC call arguments */
1121 obj_handle_t apc_handle; /* handle to next APC */
1122 VARARG(context,context); /* suspend context */
1123 @END
1124 #define SELECT_ALERTABLE 1
1125 #define SELECT_INTERRUPTIBLE 2
1128 /* Create an event */
1129 @REQ(create_event)
1130 unsigned int access; /* wanted access rights */
1131 int manual_reset; /* manual reset event */
1132 int initial_state; /* initial state of the event */
1133 VARARG(objattr,object_attributes); /* object attributes */
1134 @REPLY
1135 obj_handle_t handle; /* handle to the event */
1136 @END
1138 /* Event operation */
1139 @REQ(event_op)
1140 obj_handle_t handle; /* handle to event */
1141 int op; /* event operation (see below) */
1142 @REPLY
1143 int state; /* previous state */
1144 @END
1145 enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT };
1147 @REQ(query_event)
1148 obj_handle_t handle; /* handle to event */
1149 @REPLY
1150 int manual_reset; /* manual reset event */
1151 int state; /* current state of the event */
1152 @END
1154 /* Open an event */
1155 @REQ(open_event)
1156 unsigned int access; /* wanted access rights */
1157 unsigned int attributes; /* object attributes */
1158 obj_handle_t rootdir; /* root directory */
1159 VARARG(name,unicode_str); /* object name */
1160 @REPLY
1161 obj_handle_t handle; /* handle to the event */
1162 @END
1165 /* Create a keyed event */
1166 @REQ(create_keyed_event)
1167 unsigned int access; /* wanted access rights */
1168 VARARG(objattr,object_attributes); /* object attributes */
1169 @REPLY
1170 obj_handle_t handle; /* handle to the event */
1171 @END
1173 /* Open a keyed event */
1174 @REQ(open_keyed_event)
1175 unsigned int access; /* wanted access rights */
1176 unsigned int attributes; /* object attributes */
1177 obj_handle_t rootdir; /* root directory */
1178 VARARG(name,unicode_str); /* object name */
1179 @REPLY
1180 obj_handle_t handle; /* handle to the event */
1181 @END
1184 /* Create a mutex */
1185 @REQ(create_mutex)
1186 unsigned int access; /* wanted access rights */
1187 int owned; /* initially owned? */
1188 VARARG(objattr,object_attributes); /* object attributes */
1189 @REPLY
1190 obj_handle_t handle; /* handle to the mutex */
1191 @END
1194 /* Release a mutex */
1195 @REQ(release_mutex)
1196 obj_handle_t handle; /* handle to the mutex */
1197 @REPLY
1198 unsigned int prev_count; /* value of internal counter, before release */
1199 @END
1202 /* Open a mutex */
1203 @REQ(open_mutex)
1204 unsigned int access; /* wanted access rights */
1205 unsigned int attributes; /* object attributes */
1206 obj_handle_t rootdir; /* root directory */
1207 VARARG(name,unicode_str); /* object name */
1208 @REPLY
1209 obj_handle_t handle; /* handle to the mutex */
1210 @END
1213 /* Query a mutex */
1214 @REQ(query_mutex)
1215 obj_handle_t handle; /* handle to mutex */
1216 @REPLY
1217 unsigned int count; /* current count of mutex */
1218 int owned; /* true if owned by current thread */
1219 int abandoned; /* true if abandoned */
1220 @END
1223 /* Create a semaphore */
1224 @REQ(create_semaphore)
1225 unsigned int access; /* wanted access rights */
1226 unsigned int initial; /* initial count */
1227 unsigned int max; /* maximum count */
1228 VARARG(objattr,object_attributes); /* object attributes */
1229 @REPLY
1230 obj_handle_t handle; /* handle to the semaphore */
1231 @END
1234 /* Release a semaphore */
1235 @REQ(release_semaphore)
1236 obj_handle_t handle; /* handle to the semaphore */
1237 unsigned int count; /* count to add to semaphore */
1238 @REPLY
1239 unsigned int prev_count; /* previous semaphore count */
1240 @END
1242 @REQ(query_semaphore)
1243 obj_handle_t handle; /* handle to the semaphore */
1244 @REPLY
1245 unsigned int current; /* current count */
1246 unsigned int max; /* maximum count */
1247 @END
1249 /* Open a semaphore */
1250 @REQ(open_semaphore)
1251 unsigned int access; /* wanted access rights */
1252 unsigned int attributes; /* object attributes */
1253 obj_handle_t rootdir; /* root directory */
1254 VARARG(name,unicode_str); /* object name */
1255 @REPLY
1256 obj_handle_t handle; /* handle to the semaphore */
1257 @END
1260 /* Create a file */
1261 @REQ(create_file)
1262 unsigned int access; /* wanted access rights */
1263 unsigned int sharing; /* sharing flags */
1264 int create; /* file create action */
1265 unsigned int options; /* file options */
1266 unsigned int attrs; /* file attributes for creation */
1267 VARARG(objattr,object_attributes); /* object attributes */
1268 VARARG(filename,string); /* file name */
1269 @REPLY
1270 obj_handle_t handle; /* handle to the file */
1271 @END
1274 /* Open a file object */
1275 @REQ(open_file_object)
1276 unsigned int access; /* wanted access rights */
1277 unsigned int attributes; /* open attributes */
1278 obj_handle_t rootdir; /* root directory */
1279 unsigned int sharing; /* sharing flags */
1280 unsigned int options; /* file options */
1281 VARARG(filename,unicode_str); /* file name */
1282 @REPLY
1283 obj_handle_t handle; /* handle to the file */
1284 @END
1287 /* Allocate a file handle for a Unix fd */
1288 @REQ(alloc_file_handle)
1289 unsigned int access; /* wanted access rights */
1290 unsigned int attributes; /* object attributes */
1291 int fd; /* file descriptor on the client side */
1292 @REPLY
1293 obj_handle_t handle; /* handle to the file */
1294 @END
1297 /* Get the Unix name from a file handle */
1298 @REQ(get_handle_unix_name)
1299 obj_handle_t handle; /* file handle */
1300 @REPLY
1301 data_size_t name_len; /* unix name length */
1302 VARARG(name,string); /* unix name */
1303 @END
1306 /* Get a Unix fd to access a file */
1307 @REQ(get_handle_fd)
1308 obj_handle_t handle; /* handle to the file */
1309 @REPLY
1310 int type; /* file type (see below) */
1311 int cacheable; /* can fd be cached in the client? */
1312 unsigned int access; /* file access rights */
1313 unsigned int options; /* file open options */
1314 @END
1315 enum server_fd_type
1317 FD_TYPE_INVALID, /* invalid file (no associated fd) */
1318 FD_TYPE_FILE, /* regular file */
1319 FD_TYPE_DIR, /* directory */
1320 FD_TYPE_SOCKET, /* socket */
1321 FD_TYPE_SERIAL, /* serial port */
1322 FD_TYPE_PIPE, /* named pipe */
1323 FD_TYPE_MAILSLOT, /* mailslot */
1324 FD_TYPE_CHAR, /* unspecified char device */
1325 FD_TYPE_DEVICE, /* Windows device file */
1326 FD_TYPE_NB_TYPES
1330 /* Retrieve (or allocate) the client-side directory cache entry */
1331 @REQ(get_directory_cache_entry)
1332 obj_handle_t handle; /* handle to the directory */
1333 @REPLY
1334 int entry; /* cache entry on the client side */
1335 VARARG(free,ints); /* entries that can be freed */
1336 @END
1339 /* Flush a file buffers */
1340 @REQ(flush)
1341 async_data_t async; /* async I/O parameters */
1342 @REPLY
1343 obj_handle_t event; /* event set when finished */
1344 @END
1346 /* Query file information */
1347 @REQ(get_file_info)
1348 obj_handle_t handle; /* handle to the file */
1349 unsigned int info_class; /* queried information class */
1350 @REPLY
1351 VARARG(data,bytes); /* file info data */
1352 @END
1354 /* Query volume information */
1355 @REQ(get_volume_info)
1356 obj_handle_t handle; /* handle to the file */
1357 unsigned int info_class; /* queried information class */
1358 @REPLY
1359 VARARG(data,bytes); /* volume info data */
1360 @END
1362 /* Lock a region of a file */
1363 @REQ(lock_file)
1364 obj_handle_t handle; /* handle to the file */
1365 file_pos_t offset; /* offset of start of lock */
1366 file_pos_t count; /* count of bytes to lock */
1367 int shared; /* shared or exclusive lock? */
1368 int wait; /* do we want to wait? */
1369 @REPLY
1370 obj_handle_t handle; /* handle to wait on */
1371 int overlapped; /* is it an overlapped I/O handle? */
1372 @END
1375 /* Unlock a region of a file */
1376 @REQ(unlock_file)
1377 obj_handle_t handle; /* handle to the file */
1378 file_pos_t offset; /* offset of start of unlock */
1379 file_pos_t count; /* count of bytes to unlock */
1380 @END
1383 /* Create a socket */
1384 @REQ(create_socket)
1385 unsigned int access; /* wanted access rights */
1386 unsigned int attributes; /* object attributes */
1387 int family; /* family, see socket manpage */
1388 int type; /* type, see socket manpage */
1389 int protocol; /* protocol, see socket manpage */
1390 unsigned int flags; /* socket flags */
1391 @REPLY
1392 obj_handle_t handle; /* handle to the new socket */
1393 @END
1396 /* Accept a socket */
1397 @REQ(accept_socket)
1398 obj_handle_t lhandle; /* handle to the listening socket */
1399 unsigned int access; /* wanted access rights */
1400 unsigned int attributes; /* object attributes */
1401 @REPLY
1402 obj_handle_t handle; /* handle to the new socket */
1403 @END
1406 /* Accept into an initialized socket */
1407 @REQ(accept_into_socket)
1408 obj_handle_t lhandle; /* handle to the listening socket */
1409 obj_handle_t ahandle; /* handle to the accepting socket */
1410 @END
1413 /* Set socket event parameters */
1414 @REQ(set_socket_event)
1415 obj_handle_t handle; /* handle to the socket */
1416 unsigned int mask; /* event mask */
1417 obj_handle_t event; /* event object */
1418 user_handle_t window; /* window to send the message to */
1419 unsigned int msg; /* message to send */
1420 @END
1423 /* Get socket event parameters */
1424 @REQ(get_socket_event)
1425 obj_handle_t handle; /* handle to the socket */
1426 int service; /* clear pending? */
1427 obj_handle_t c_event; /* event to clear */
1428 @REPLY
1429 unsigned int mask; /* event mask */
1430 unsigned int pmask; /* pending events */
1431 unsigned int state; /* status bits */
1432 VARARG(errors,ints); /* event errors */
1433 @END
1436 /* Get socket info */
1437 @REQ(get_socket_info)
1438 obj_handle_t handle; /* handle to the socket */
1439 @REPLY
1440 int family; /* family, see socket manpage */
1441 int type; /* type, see socket manpage */
1442 int protocol; /* protocol, see socket manpage */
1443 @END
1446 /* Re-enable pending socket events */
1447 @REQ(enable_socket_event)
1448 obj_handle_t handle; /* handle to the socket */
1449 unsigned int mask; /* events to re-enable */
1450 unsigned int sstate; /* status bits to set */
1451 unsigned int cstate; /* status bits to clear */
1452 @END
1454 @REQ(set_socket_deferred)
1455 obj_handle_t handle; /* handle to the socket */
1456 obj_handle_t deferred; /* handle to the socket for which accept() is deferred */
1457 @END
1459 /* Allocate a console (only used by a console renderer) */
1460 @REQ(alloc_console)
1461 unsigned int access; /* wanted access rights */
1462 unsigned int attributes; /* object attributes */
1463 process_id_t pid; /* pid of process which shall be attached to the console */
1464 int input_fd; /* if pid=-1 (bare console to current process), fd for input */
1465 @REPLY
1466 obj_handle_t handle_in; /* handle to console input */
1467 obj_handle_t event; /* handle to renderer events change notification */
1468 @END
1471 /* Free the console of the current process */
1472 @REQ(free_console)
1473 @END
1476 #define CONSOLE_RENDERER_NONE_EVENT 0x00
1477 #define CONSOLE_RENDERER_TITLE_EVENT 0x01
1478 #define CONSOLE_RENDERER_ACTIVE_SB_EVENT 0x02
1479 #define CONSOLE_RENDERER_SB_RESIZE_EVENT 0x03
1480 #define CONSOLE_RENDERER_UPDATE_EVENT 0x04
1481 #define CONSOLE_RENDERER_CURSOR_POS_EVENT 0x05
1482 #define CONSOLE_RENDERER_CURSOR_GEOM_EVENT 0x06
1483 #define CONSOLE_RENDERER_DISPLAY_EVENT 0x07
1484 #define CONSOLE_RENDERER_EXIT_EVENT 0x08
1485 struct console_renderer_event
1487 short event;
1488 union
1490 struct
1492 short top;
1493 short bottom;
1494 } update;
1495 struct
1497 short width;
1498 short height;
1499 } resize;
1500 struct
1502 short x;
1503 short y;
1504 } cursor_pos;
1505 struct
1507 short visible;
1508 short size;
1509 } cursor_geom;
1510 struct
1512 short left;
1513 short top;
1514 short width;
1515 short height;
1516 } display;
1517 } u;
1520 /* retrieve console events for the renderer */
1521 @REQ(get_console_renderer_events)
1522 obj_handle_t handle; /* handle to console input events */
1523 @REPLY
1524 VARARG(data,bytes); /* the various console_renderer_events */
1525 @END
1528 /* Open a handle to the process console */
1529 @REQ(open_console)
1530 obj_handle_t from; /* console_in handle to get active screen buffer */
1531 unsigned int access; /* wanted access rights */
1532 unsigned int attributes; /* object attributes */
1533 int share; /* share mask (only for output handles) */
1534 @REPLY
1535 obj_handle_t handle; /* handle to the console */
1536 @END
1539 /* Attach to a other process's console */
1540 @REQ(attach_console)
1541 process_id_t pid; /* pid of attached console process */
1542 @REPLY
1543 obj_handle_t std_in; /* attached stdin */
1544 obj_handle_t std_out; /* attached stdout */
1545 obj_handle_t std_err; /* attached stderr */
1546 @END
1549 /* Get the input queue wait event */
1550 @REQ(get_console_wait_event)
1551 obj_handle_t handle; /* handle to the console */
1552 @REPLY
1553 obj_handle_t event;
1554 @END
1556 /* Get a console mode (input or output) */
1557 @REQ(get_console_mode)
1558 obj_handle_t handle; /* handle to the console */
1559 @REPLY
1560 int mode; /* console mode */
1561 @END
1564 /* Set a console mode (input or output) */
1565 @REQ(set_console_mode)
1566 obj_handle_t handle; /* handle to the console */
1567 int mode; /* console mode */
1568 @END
1571 /* Set info about a console (input only) */
1572 @REQ(set_console_input_info)
1573 obj_handle_t handle; /* handle to console input, or 0 for process' console */
1574 int mask; /* setting mask (see below) */
1575 obj_handle_t active_sb; /* active screen buffer */
1576 int history_mode; /* whether we duplicate lines in history */
1577 int history_size; /* number of lines in history */
1578 int edition_mode; /* index to the edition mode flavors */
1579 int input_cp; /* console input codepage */
1580 int output_cp; /* console output codepage */
1581 user_handle_t win; /* console window if backend supports it */
1582 VARARG(title,unicode_str); /* console title */
1583 @END
1584 #define SET_CONSOLE_INPUT_INFO_ACTIVE_SB 0x01
1585 #define SET_CONSOLE_INPUT_INFO_TITLE 0x02
1586 #define SET_CONSOLE_INPUT_INFO_HISTORY_MODE 0x04
1587 #define SET_CONSOLE_INPUT_INFO_HISTORY_SIZE 0x08
1588 #define SET_CONSOLE_INPUT_INFO_EDITION_MODE 0x10
1589 #define SET_CONSOLE_INPUT_INFO_INPUT_CODEPAGE 0x20
1590 #define SET_CONSOLE_INPUT_INFO_OUTPUT_CODEPAGE 0x40
1591 #define SET_CONSOLE_INPUT_INFO_WIN 0x80
1594 /* Get info about a console (input only) */
1595 @REQ(get_console_input_info)
1596 obj_handle_t handle; /* handle to console input, or 0 for process' console */
1597 @REPLY
1598 int history_mode; /* whether we duplicate lines in history */
1599 int history_size; /* number of lines in history */
1600 int history_index; /* number of used lines in history */
1601 int edition_mode; /* index to the edition mode flavors */
1602 int input_cp; /* console input codepage */
1603 int output_cp; /* console output codepage */
1604 user_handle_t win; /* console window if backend supports it */
1605 VARARG(title,unicode_str); /* console title */
1606 @END
1609 /* appends a string to console's history */
1610 @REQ(append_console_input_history)
1611 obj_handle_t handle; /* handle to console input, or 0 for process' console */
1612 VARARG(line,unicode_str); /* line to add */
1613 @END
1616 /* appends a string to console's history */
1617 @REQ(get_console_input_history)
1618 obj_handle_t handle; /* handle to console input, or 0 for process' console */
1619 int index; /* index to get line from */
1620 @REPLY
1621 int total; /* total length of line in Unicode chars */
1622 VARARG(line,unicode_str); /* line to add */
1623 @END
1626 /* creates a new screen buffer on process' console */
1627 @REQ(create_console_output)
1628 obj_handle_t handle_in; /* handle to console input, or 0 for process' console */
1629 unsigned int access; /* wanted access rights */
1630 unsigned int attributes; /* object attributes */
1631 unsigned int share; /* sharing credentials */
1632 int fd; /* for bare consoles, fd the screen-buffer is attached to */
1633 @REPLY
1634 obj_handle_t handle_out; /* handle to the screen buffer */
1635 @END
1638 /* Set info about a console (output only) */
1639 @REQ(set_console_output_info)
1640 obj_handle_t handle; /* handle to the console */
1641 int mask; /* setting mask (see below) */
1642 short int cursor_size; /* size of cursor (percentage filled) */
1643 short int cursor_visible;/* cursor visibility flag */
1644 short int cursor_x; /* position of cursor (x, y) */
1645 short int cursor_y;
1646 short int width; /* width of the screen buffer */
1647 short int height; /* height of the screen buffer */
1648 short int attr; /* default fill attributes (screen colors) */
1649 short int popup_attr; /* pop-up color attributes */
1650 short int win_left; /* window actually displayed by renderer */
1651 short int win_top; /* the rect area is expressed within the */
1652 short int win_right; /* boundaries of the screen buffer */
1653 short int win_bottom;
1654 short int max_width; /* maximum size (width x height) for the window */
1655 short int max_height;
1656 short int font_width; /* font size (width x height) */
1657 short int font_height;
1658 short int font_weight; /* font weight */
1659 short int font_pitch_family; /* font pitch & family */
1660 VARARG(colors,uints,64); /* color table */
1661 VARARG(face_name,unicode_str); /* font face name */
1662 @END
1663 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_GEOM 0x0001
1664 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_POS 0x0002
1665 #define SET_CONSOLE_OUTPUT_INFO_SIZE 0x0004
1666 #define SET_CONSOLE_OUTPUT_INFO_ATTR 0x0008
1667 #define SET_CONSOLE_OUTPUT_INFO_DISPLAY_WINDOW 0x0010
1668 #define SET_CONSOLE_OUTPUT_INFO_MAX_SIZE 0x0020
1669 #define SET_CONSOLE_OUTPUT_INFO_FONT 0x0040
1670 #define SET_CONSOLE_OUTPUT_INFO_COLORTABLE 0x0080
1671 #define SET_CONSOLE_OUTPUT_INFO_POPUP_ATTR 0x0100
1674 /* Get info about a console (output only) */
1675 @REQ(get_console_output_info)
1676 obj_handle_t handle; /* handle to the console */
1677 @REPLY
1678 short int cursor_size; /* size of cursor (percentage filled) */
1679 short int cursor_visible;/* cursor visibility flag */
1680 short int cursor_x; /* position of cursor (x, y) */
1681 short int cursor_y;
1682 short int width; /* width of the screen buffer */
1683 short int height; /* height of the screen buffer */
1684 short int attr; /* default fill attributes (screen colors) */
1685 short int popup_attr; /* pop-up color attributes */
1686 short int win_left; /* window actually displayed by renderer */
1687 short int win_top; /* the rect area is expressed within the */
1688 short int win_right; /* boundaries of the screen buffer */
1689 short int win_bottom;
1690 short int max_width; /* maximum size (width x height) for the window */
1691 short int max_height;
1692 short int font_width; /* font size (width x height) */
1693 short int font_height;
1694 short int font_weight; /* font weight */
1695 short int font_pitch_family; /* font pitch & family */
1696 VARARG(colors,uints,64); /* color table */
1697 VARARG(face_name,unicode_str); /* font face name */
1698 @END
1700 /* Add input records to a console input queue */
1701 @REQ(write_console_input)
1702 obj_handle_t handle; /* handle to the console input */
1703 VARARG(rec,input_records); /* input records */
1704 @REPLY
1705 int written; /* number of records written */
1706 @END
1709 /* Fetch input records from a console input queue */
1710 @REQ(read_console_input)
1711 obj_handle_t handle; /* handle to the console input */
1712 int flush; /* flush the retrieved records from the queue? */
1713 @REPLY
1714 int read; /* number of records read */
1715 VARARG(rec,input_records); /* input records */
1716 @END
1719 /* write data (chars and/or attributes) in a screen buffer */
1720 @REQ(write_console_output)
1721 obj_handle_t handle; /* handle to the console output */
1722 int x; /* position where to start writing */
1723 int y;
1724 int mode; /* char info (see below) */
1725 int wrap; /* wrap around at end of line? */
1726 VARARG(data,bytes); /* info to write */
1727 @REPLY
1728 int written; /* number of char infos actually written */
1729 int width; /* width of screen buffer */
1730 int height; /* height of screen buffer */
1731 @END
1732 enum char_info_mode
1734 CHAR_INFO_MODE_TEXT, /* characters only */
1735 CHAR_INFO_MODE_ATTR, /* attributes only */
1736 CHAR_INFO_MODE_TEXTATTR, /* both characters and attributes */
1737 CHAR_INFO_MODE_TEXTSTDATTR /* characters but use standard attributes */
1741 /* fill a screen buffer with constant data (chars and/or attributes) */
1742 @REQ(fill_console_output)
1743 obj_handle_t handle; /* handle to the console output */
1744 int x; /* position where to start writing */
1745 int y;
1746 int mode; /* char info mode */
1747 int count; /* number to write */
1748 int wrap; /* wrap around at end of line? */
1749 char_info_t data; /* data to write */
1750 @REPLY
1751 int written; /* number of char infos actually written */
1752 @END
1755 /* read data (chars and/or attributes) from a screen buffer */
1756 @REQ(read_console_output)
1757 obj_handle_t handle; /* handle to the console output */
1758 int x; /* position (x,y) where to start reading */
1759 int y;
1760 int mode; /* char info mode */
1761 int wrap; /* wrap around at end of line? */
1762 @REPLY
1763 int width; /* width of screen buffer */
1764 int height; /* height of screen buffer */
1765 VARARG(data,bytes);
1766 @END
1769 /* move a rect (of data) in screen buffer content */
1770 @REQ(move_console_output)
1771 obj_handle_t handle; /* handle to the console output */
1772 short int x_src; /* position (x, y) of rect to start moving from */
1773 short int y_src;
1774 short int x_dst; /* position (x, y) of rect to move to */
1775 short int y_dst;
1776 short int w; /* size of the rect (width, height) to move */
1777 short int h;
1778 @END
1781 /* Sends a signal to a process group */
1782 @REQ(send_console_signal)
1783 int signal; /* the signal to send */
1784 process_id_t group_id; /* the group to send the signal to */
1785 @END
1788 /* enable directory change notifications */
1789 @REQ(read_directory_changes)
1790 unsigned int filter; /* notification filter */
1791 int subtree; /* watch the subtree? */
1792 int want_data; /* flag indicating whether change data should be collected */
1793 async_data_t async; /* async I/O parameters */
1794 @END
1797 @REQ(read_change)
1798 obj_handle_t handle;
1799 @REPLY
1800 VARARG(events,filesystem_event); /* collected filesystem events */
1801 @END
1804 /* Create a file mapping */
1805 @REQ(create_mapping)
1806 unsigned int access; /* wanted access rights */
1807 unsigned int flags; /* SEC_* flags */
1808 unsigned int file_access; /* file access rights */
1809 mem_size_t size; /* mapping size */
1810 obj_handle_t file_handle; /* file handle */
1811 VARARG(objattr,object_attributes); /* object attributes */
1812 @REPLY
1813 obj_handle_t handle; /* handle to the mapping */
1814 @END
1817 /* Open a mapping */
1818 @REQ(open_mapping)
1819 unsigned int access; /* wanted access rights */
1820 unsigned int attributes; /* object attributes */
1821 obj_handle_t rootdir; /* root directory */
1822 VARARG(name,unicode_str); /* object name */
1823 @REPLY
1824 obj_handle_t handle; /* handle to the mapping */
1825 @END
1828 /* Get information about a file mapping */
1829 @REQ(get_mapping_info)
1830 obj_handle_t handle; /* handle to the mapping */
1831 unsigned int access; /* wanted access rights */
1832 @REPLY
1833 mem_size_t size; /* mapping size */
1834 unsigned int flags; /* SEC_* flags */
1835 obj_handle_t shared_file; /* shared mapping file handle */
1836 VARARG(image,pe_image_info);/* image info for SEC_IMAGE mappings */
1837 @END
1840 /* Add a memory view in the current process */
1841 @REQ(map_view)
1842 obj_handle_t mapping; /* file mapping handle */
1843 unsigned int access; /* wanted access rights */
1844 client_ptr_t base; /* view base address (page-aligned) */
1845 mem_size_t size; /* view size */
1846 file_pos_t start; /* start offset in mapping */
1847 @END
1850 /* Unmap a memory view from the current process */
1851 @REQ(unmap_view)
1852 client_ptr_t base; /* view base address */
1853 @END
1856 /* Get a range of committed pages in a file mapping */
1857 @REQ(get_mapping_committed_range)
1858 client_ptr_t base; /* view base address */
1859 file_pos_t offset; /* starting offset (page-aligned, in bytes) */
1860 @REPLY
1861 mem_size_t size; /* size of range starting at offset (page-aligned, in bytes) */
1862 int committed; /* whether it is a committed range */
1863 @END
1866 /* Add a range to the committed pages in a file mapping */
1867 @REQ(add_mapping_committed_range)
1868 client_ptr_t base; /* view base address */
1869 file_pos_t offset; /* starting offset (page-aligned, in bytes) */
1870 mem_size_t size; /* size to set (page-aligned, in bytes) or 0 if only retrieving */
1871 @END
1874 /* Check if two memory maps are for the same file */
1875 @REQ(is_same_mapping)
1876 client_ptr_t base1; /* first view base address */
1877 client_ptr_t base2; /* second view base address */
1878 @END
1881 #define SNAP_PROCESS 0x00000001
1882 #define SNAP_THREAD 0x00000002
1883 /* Create a snapshot */
1884 @REQ(create_snapshot)
1885 unsigned int attributes; /* object attributes */
1886 unsigned int flags; /* snapshot flags (SNAP_*) */
1887 @REPLY
1888 obj_handle_t handle; /* handle to the snapshot */
1889 @END
1892 /* Get the next process from a snapshot */
1893 @REQ(next_process)
1894 obj_handle_t handle; /* handle to the snapshot */
1895 int reset; /* reset snapshot position? */
1896 @REPLY
1897 int count; /* process usage count */
1898 process_id_t pid; /* process id */
1899 process_id_t ppid; /* parent process id */
1900 int threads; /* number of threads */
1901 int priority; /* process priority */
1902 int handles; /* number of handles */
1903 int unix_pid; /* Unix pid */
1904 VARARG(filename,unicode_str); /* file name of main exe */
1905 @END
1908 /* Get the next thread from a snapshot */
1909 @REQ(next_thread)
1910 obj_handle_t handle; /* handle to the snapshot */
1911 int reset; /* reset snapshot position? */
1912 @REPLY
1913 int count; /* thread usage count */
1914 process_id_t pid; /* process id */
1915 thread_id_t tid; /* thread id */
1916 int base_pri; /* base priority */
1917 int delta_pri; /* delta priority */
1918 int unix_tid; /* thread native pid */
1919 @END
1922 /* Wait for a debug event */
1923 @REQ(wait_debug_event)
1924 int get_handle; /* should we alloc a handle for waiting? */
1925 @REPLY
1926 process_id_t pid; /* process id */
1927 thread_id_t tid; /* thread id */
1928 obj_handle_t wait; /* wait handle if no event ready */
1929 VARARG(event,debug_event); /* debug event data */
1930 @END
1933 /* Queue an exception event */
1934 @REQ(queue_exception_event)
1935 int first; /* first chance exception? */
1936 unsigned int code; /* exception code */
1937 unsigned int flags; /* exception flags */
1938 client_ptr_t record; /* exception record */
1939 client_ptr_t address; /* exception address */
1940 data_size_t len; /* size of parameters */
1941 VARARG(params,uints64,len);/* exception parameters */
1942 @REPLY
1943 obj_handle_t handle; /* handle to the queued event */
1944 @END
1947 /* Retrieve the status of an exception event */
1948 @REQ(get_exception_status)
1949 obj_handle_t handle; /* handle to the queued event */
1950 @END
1953 /* Continue a debug event */
1954 @REQ(continue_debug_event)
1955 process_id_t pid; /* process id to continue */
1956 thread_id_t tid; /* thread id to continue */
1957 int status; /* continuation status */
1958 @END
1961 /* Start/stop debugging an existing process */
1962 @REQ(debug_process)
1963 process_id_t pid; /* id of the process to debug */
1964 int attach; /* 1=attaching / 0=detaching from the process */
1965 @END
1968 /* Set debugger kill on exit flag */
1969 @REQ(set_debugger_kill_on_exit)
1970 int kill_on_exit; /* 0=detach/1=kill debuggee when debugger dies */
1971 @END
1974 /* Read data from a process address space */
1975 @REQ(read_process_memory)
1976 obj_handle_t handle; /* process handle */
1977 client_ptr_t addr; /* addr to read from */
1978 @REPLY
1979 VARARG(data,bytes); /* result data */
1980 @END
1983 /* Write data to a process address space */
1984 @REQ(write_process_memory)
1985 obj_handle_t handle; /* process handle */
1986 client_ptr_t addr; /* addr to write to */
1987 VARARG(data,bytes); /* data to write */
1988 @END
1991 /* Create a registry key */
1992 @REQ(create_key)
1993 unsigned int access; /* desired access rights */
1994 unsigned int options; /* creation options */
1995 VARARG(objattr,object_attributes); /* object attributes */
1996 VARARG(class,unicode_str); /* class name */
1997 @REPLY
1998 obj_handle_t hkey; /* handle to the created key */
1999 int created; /* has it been newly created? */
2000 @END
2002 /* Open a registry key */
2003 @REQ(open_key)
2004 obj_handle_t parent; /* handle to the parent key */
2005 unsigned int access; /* desired access rights */
2006 unsigned int attributes; /* object attributes */
2007 VARARG(name,unicode_str); /* key name */
2008 @REPLY
2009 obj_handle_t hkey; /* handle to the open key */
2010 @END
2013 /* Delete a registry key */
2014 @REQ(delete_key)
2015 obj_handle_t hkey; /* handle to the key */
2016 @END
2019 /* Flush a registry key */
2020 @REQ(flush_key)
2021 obj_handle_t hkey; /* handle to the key */
2022 @END
2025 /* Enumerate registry subkeys */
2026 @REQ(enum_key)
2027 obj_handle_t hkey; /* handle to registry key */
2028 int index; /* index of subkey (or -1 for current key) */
2029 int info_class; /* requested information class */
2030 @REPLY
2031 int subkeys; /* number of subkeys */
2032 int max_subkey; /* longest subkey name */
2033 int max_class; /* longest class name */
2034 int values; /* number of values */
2035 int max_value; /* longest value name */
2036 int max_data; /* longest value data */
2037 timeout_t modif; /* last modification time */
2038 data_size_t total; /* total length needed for full name and class */
2039 data_size_t namelen; /* length of key name in bytes */
2040 VARARG(name,unicode_str,namelen); /* key name */
2041 VARARG(class,unicode_str); /* class name */
2042 @END
2045 /* Set a value of a registry key */
2046 @REQ(set_key_value)
2047 obj_handle_t hkey; /* handle to registry key */
2048 int type; /* value type */
2049 data_size_t namelen; /* length of value name in bytes */
2050 VARARG(name,unicode_str,namelen); /* value name */
2051 VARARG(data,bytes); /* value data */
2052 @END
2055 /* Retrieve the value of a registry key */
2056 @REQ(get_key_value)
2057 obj_handle_t hkey; /* handle to registry key */
2058 VARARG(name,unicode_str); /* value name */
2059 @REPLY
2060 int type; /* value type */
2061 data_size_t total; /* total length needed for data */
2062 VARARG(data,bytes); /* value data */
2063 @END
2066 /* Enumerate a value of a registry key */
2067 @REQ(enum_key_value)
2068 obj_handle_t hkey; /* handle to registry key */
2069 int index; /* value index */
2070 int info_class; /* requested information class */
2071 @REPLY
2072 int type; /* value type */
2073 data_size_t total; /* total length needed for full name and data */
2074 data_size_t namelen; /* length of value name in bytes */
2075 VARARG(name,unicode_str,namelen); /* value name */
2076 VARARG(data,bytes); /* value data */
2077 @END
2080 /* Delete a value of a registry key */
2081 @REQ(delete_key_value)
2082 obj_handle_t hkey; /* handle to registry key */
2083 VARARG(name,unicode_str); /* value name */
2084 @END
2087 /* Load a registry branch from a file */
2088 @REQ(load_registry)
2089 obj_handle_t file; /* file to load from */
2090 VARARG(objattr,object_attributes); /* object attributes */
2091 @END
2094 /* UnLoad a registry branch from a file */
2095 @REQ(unload_registry)
2096 obj_handle_t hkey; /* root key to unload to */
2097 @END
2100 /* Save a registry branch to a file */
2101 @REQ(save_registry)
2102 obj_handle_t hkey; /* key to save */
2103 obj_handle_t file; /* file to save to */
2104 @END
2107 /* Add a registry key change notification */
2108 @REQ(set_registry_notification)
2109 obj_handle_t hkey; /* key to watch for changes */
2110 obj_handle_t event; /* event to set */
2111 int subtree; /* should we watch the whole subtree? */
2112 unsigned int filter; /* things to watch */
2113 @END
2116 /* Create a waitable timer */
2117 @REQ(create_timer)
2118 unsigned int access; /* wanted access rights */
2119 int manual; /* manual reset */
2120 VARARG(objattr,object_attributes); /* object attributes */
2121 @REPLY
2122 obj_handle_t handle; /* handle to the timer */
2123 @END
2126 /* Open a waitable timer */
2127 @REQ(open_timer)
2128 unsigned int access; /* wanted access rights */
2129 unsigned int attributes; /* object attributes */
2130 obj_handle_t rootdir; /* root directory */
2131 VARARG(name,unicode_str); /* object name */
2132 @REPLY
2133 obj_handle_t handle; /* handle to the timer */
2134 @END
2136 /* Set a waitable timer */
2137 @REQ(set_timer)
2138 obj_handle_t handle; /* handle to the timer */
2139 timeout_t expire; /* next expiration absolute time */
2140 client_ptr_t callback; /* callback function */
2141 client_ptr_t arg; /* callback argument */
2142 int period; /* timer period in ms */
2143 @REPLY
2144 int signaled; /* was the timer signaled before this call ? */
2145 @END
2147 /* Cancel a waitable timer */
2148 @REQ(cancel_timer)
2149 obj_handle_t handle; /* handle to the timer */
2150 @REPLY
2151 int signaled; /* was the timer signaled before this calltime ? */
2152 @END
2154 /* Get information on a waitable timer */
2155 @REQ(get_timer_info)
2156 obj_handle_t handle; /* handle to the timer */
2157 @REPLY
2158 timeout_t when; /* absolute time when the timer next expires */
2159 int signaled; /* is the timer signaled? */
2160 @END
2163 /* Retrieve the current context of a thread */
2164 @REQ(get_thread_context)
2165 obj_handle_t handle; /* thread or context handle */
2166 unsigned int flags; /* context flags */
2167 @REPLY
2168 int self; /* was it a handle to the current thread? */
2169 obj_handle_t handle; /* pending context handle */
2170 VARARG(context,context); /* thread context */
2171 @END
2174 /* Set the current context of a thread */
2175 @REQ(set_thread_context)
2176 obj_handle_t handle; /* thread handle */
2177 VARARG(context,context); /* thread context */
2178 @REPLY
2179 int self; /* was it a handle to the current thread? */
2180 @END
2183 /* Fetch a selector entry for a thread */
2184 @REQ(get_selector_entry)
2185 obj_handle_t handle; /* thread handle */
2186 int entry; /* LDT entry */
2187 @REPLY
2188 unsigned int base; /* selector base */
2189 unsigned int limit; /* selector limit */
2190 unsigned char flags; /* selector flags */
2191 @END
2194 /* Add an atom */
2195 @REQ(add_atom)
2196 obj_handle_t table; /* which table to add atom to */
2197 VARARG(name,unicode_str); /* atom name */
2198 @REPLY
2199 atom_t atom; /* resulting atom */
2200 @END
2203 /* Delete an atom */
2204 @REQ(delete_atom)
2205 obj_handle_t table; /* which table to delete atom from */
2206 atom_t atom; /* atom handle */
2207 @END
2210 /* Find an atom */
2211 @REQ(find_atom)
2212 obj_handle_t table; /* which table to find atom from */
2213 VARARG(name,unicode_str); /* atom name */
2214 @REPLY
2215 atom_t atom; /* atom handle */
2216 @END
2219 /* Get information about an atom */
2220 @REQ(get_atom_information)
2221 obj_handle_t table; /* which table to find atom from */
2222 atom_t atom; /* atom handle */
2223 @REPLY
2224 int count; /* atom lock count */
2225 int pinned; /* whether the atom has been pinned */
2226 data_size_t total; /* actual length of atom name */
2227 VARARG(name,unicode_str); /* atom name */
2228 @END
2231 /* Set information about an atom */
2232 @REQ(set_atom_information)
2233 obj_handle_t table; /* which table to find atom from */
2234 atom_t atom; /* atom handle */
2235 int pinned; /* whether to bump atom information */
2236 @END
2239 /* Empty an atom table */
2240 @REQ(empty_atom_table)
2241 obj_handle_t table; /* which table to find atom from */
2242 int if_pinned; /* whether to delete pinned atoms */
2243 @END
2246 /* Init an atom table */
2247 @REQ(init_atom_table)
2248 int entries; /* number of entries (only for local) */
2249 @REPLY
2250 obj_handle_t table; /* handle to the atom table */
2251 @END
2254 /* Get the message queue of the current thread */
2255 @REQ(get_msg_queue)
2256 @REPLY
2257 obj_handle_t handle; /* handle to the queue */
2258 @END
2261 /* Set the file descriptor associated to the current thread queue */
2262 @REQ(set_queue_fd)
2263 obj_handle_t handle; /* handle to the file descriptor */
2264 @END
2267 /* Set the current message queue wakeup mask */
2268 @REQ(set_queue_mask)
2269 unsigned int wake_mask; /* wakeup bits mask */
2270 unsigned int changed_mask; /* changed bits mask */
2271 int skip_wait; /* will we skip waiting if signaled? */
2272 @REPLY
2273 unsigned int wake_bits; /* current wake bits */
2274 unsigned int changed_bits; /* current changed bits */
2275 @END
2278 /* Get the current message queue status */
2279 @REQ(get_queue_status)
2280 unsigned int clear_bits; /* should we clear the change bits? */
2281 @REPLY
2282 unsigned int wake_bits; /* wake bits */
2283 unsigned int changed_bits; /* changed bits since last time */
2284 @END
2287 /* Retrieve the process idle event */
2288 @REQ(get_process_idle_event)
2289 obj_handle_t handle; /* process handle */
2290 @REPLY
2291 obj_handle_t event; /* handle to idle event */
2292 @END
2295 /* Send a message to a thread queue */
2296 @REQ(send_message)
2297 thread_id_t id; /* thread id */
2298 int type; /* message type (see below) */
2299 int flags; /* message flags (see below) */
2300 user_handle_t win; /* window handle */
2301 unsigned int msg; /* message code */
2302 lparam_t wparam; /* parameters */
2303 lparam_t lparam; /* parameters */
2304 timeout_t timeout; /* timeout for reply */
2305 VARARG(data,message_data); /* message data for sent messages */
2306 @END
2308 @REQ(post_quit_message)
2309 int exit_code; /* exit code to return */
2310 @END
2312 enum message_type
2314 MSG_ASCII, /* Ascii message (from SendMessageA) */
2315 MSG_UNICODE, /* Unicode message (from SendMessageW) */
2316 MSG_NOTIFY, /* notify message (from SendNotifyMessageW), always Unicode */
2317 MSG_CALLBACK, /* callback message (from SendMessageCallbackW), always Unicode */
2318 MSG_CALLBACK_RESULT,/* result of a callback message */
2319 MSG_OTHER_PROCESS, /* sent from other process, may include vararg data, always Unicode */
2320 MSG_POSTED, /* posted message (from PostMessageW), always Unicode */
2321 MSG_HARDWARE, /* hardware message */
2322 MSG_WINEVENT, /* winevent message */
2323 MSG_HOOK_LL /* low-level hardware hook */
2325 #define SEND_MSG_ABORT_IF_HUNG 0x01
2328 /* Send a hardware message to a thread queue */
2329 @REQ(send_hardware_message)
2330 user_handle_t win; /* window handle */
2331 hw_input_t input; /* input data */
2332 unsigned int flags; /* flags (see below) */
2333 @REPLY
2334 int wait; /* do we need to wait for a reply? */
2335 int prev_x; /* previous cursor position */
2336 int prev_y;
2337 int new_x; /* new cursor position */
2338 int new_y;
2339 VARARG(keystate,bytes); /* global state array for all the keys */
2340 @END
2341 #define SEND_HWMSG_INJECTED 0x01
2344 /* Get a message from the current queue */
2345 @REQ(get_message)
2346 unsigned int flags; /* PM_* flags */
2347 user_handle_t get_win; /* window handle to get */
2348 unsigned int get_first; /* first message code to get */
2349 unsigned int get_last; /* last message code to get */
2350 unsigned int hw_id; /* id of the previous hardware message (or 0) */
2351 unsigned int wake_mask; /* wakeup bits mask */
2352 unsigned int changed_mask; /* changed bits mask */
2353 @REPLY
2354 user_handle_t win; /* window handle */
2355 unsigned int msg; /* message code */
2356 lparam_t wparam; /* parameters */
2357 lparam_t lparam; /* parameters */
2358 int type; /* message type */
2359 int x; /* message x position */
2360 int y; /* message y position */
2361 unsigned int time; /* message time */
2362 unsigned int active_hooks; /* active hooks bitmap */
2363 data_size_t total; /* total size of extra data */
2364 VARARG(data,message_data); /* message data for sent messages */
2365 @END
2368 /* Reply to a sent message */
2369 @REQ(reply_message)
2370 int remove; /* should we remove the message? */
2371 lparam_t result; /* message result */
2372 VARARG(data,bytes); /* message data for sent messages */
2373 @END
2376 /* Accept the current hardware message */
2377 @REQ(accept_hardware_message)
2378 unsigned int hw_id; /* id of the hardware message */
2379 int remove; /* should we remove the message? */
2380 @END
2383 /* Retrieve the reply for the last message sent */
2384 @REQ(get_message_reply)
2385 int cancel; /* cancel message if not ready? */
2386 @REPLY
2387 lparam_t result; /* message result */
2388 VARARG(data,bytes); /* message data for sent messages */
2389 @END
2392 /* Set a window timer */
2393 @REQ(set_win_timer)
2394 user_handle_t win; /* window handle */
2395 unsigned int msg; /* message to post */
2396 unsigned int rate; /* timer rate in ms */
2397 lparam_t id; /* timer id */
2398 lparam_t lparam; /* message lparam (callback proc) */
2399 @REPLY
2400 lparam_t id; /* timer id */
2401 @END
2404 /* Kill a window timer */
2405 @REQ(kill_win_timer)
2406 user_handle_t win; /* window handle */
2407 lparam_t id; /* timer id */
2408 unsigned int msg; /* message to post */
2409 @END
2412 /* check if the thread owning the window is hung */
2413 @REQ(is_window_hung)
2414 user_handle_t win; /* window handle */
2415 @REPLY
2416 int is_hung;
2417 @END
2420 /* Retrieve info about a serial port */
2421 @REQ(get_serial_info)
2422 obj_handle_t handle; /* handle to comm port */
2423 int flags;
2424 @REPLY
2425 unsigned int eventmask;
2426 unsigned int cookie;
2427 unsigned int pending_write;
2428 @END
2431 /* Set info about a serial port */
2432 @REQ(set_serial_info)
2433 obj_handle_t handle; /* handle to comm port */
2434 int flags; /* bitmask to set values (see below) */
2435 @END
2436 #define SERIALINFO_PENDING_WRITE 0x04
2437 #define SERIALINFO_PENDING_WAIT 0x08
2440 /* Create an async I/O */
2441 @REQ(register_async)
2442 int type; /* type of queue to look after */
2443 async_data_t async; /* async I/O parameters */
2444 int count; /* count - usually # of bytes to be read/written */
2445 @END
2446 #define ASYNC_TYPE_READ 0x01
2447 #define ASYNC_TYPE_WRITE 0x02
2448 #define ASYNC_TYPE_WAIT 0x03
2451 /* Cancel all async op on a fd */
2452 @REQ(cancel_async)
2453 obj_handle_t handle; /* handle to comm port, socket or file */
2454 client_ptr_t iosb; /* I/O status block (NULL=all) */
2455 int only_thread; /* cancel matching this thread */
2456 @END
2459 /* Retrieve results of an async */
2460 @REQ(get_async_result)
2461 client_ptr_t user_arg; /* user arg used to identify async */
2462 @REPLY
2463 data_size_t size; /* result size (input or output depending on the operation) */
2464 VARARG(out_data,bytes); /* iosb output data */
2465 @END
2468 /* Perform a read on a file object */
2469 @REQ(read)
2470 async_data_t async; /* async I/O parameters */
2471 file_pos_t pos; /* read position */
2472 @REPLY
2473 obj_handle_t wait; /* handle to wait on for blocking read */
2474 unsigned int options; /* device open options */
2475 VARARG(data,bytes); /* read data */
2476 @END
2479 /* Perform a write on a file object */
2480 @REQ(write)
2481 async_data_t async; /* async I/O parameters */
2482 file_pos_t pos; /* write position */
2483 VARARG(data,bytes); /* write data */
2484 @REPLY
2485 obj_handle_t wait; /* handle to wait on for blocking write */
2486 unsigned int options; /* device open options */
2487 data_size_t size; /* size written */
2488 @END
2491 /* Perform an ioctl on a file */
2492 @REQ(ioctl)
2493 ioctl_code_t code; /* ioctl code */
2494 async_data_t async; /* async I/O parameters */
2495 VARARG(in_data,bytes); /* ioctl input data */
2496 @REPLY
2497 obj_handle_t wait; /* handle to wait on for blocking ioctl */
2498 unsigned int options; /* device open options */
2499 VARARG(out_data,bytes); /* ioctl output data */
2500 @END
2503 /* Store results of an async irp */
2504 @REQ(set_irp_result)
2505 obj_handle_t handle; /* handle to the irp */
2506 unsigned int status; /* status of the irp */
2507 data_size_t size; /* result size (input or output depending on the operation) */
2508 VARARG(data,bytes); /* output data of the irp */
2509 @END
2512 /* Create a named pipe */
2513 @REQ(create_named_pipe)
2514 unsigned int access;
2515 unsigned int options;
2516 unsigned int sharing;
2517 unsigned int maxinstances;
2518 unsigned int outsize;
2519 unsigned int insize;
2520 timeout_t timeout;
2521 unsigned int flags;
2522 VARARG(objattr,object_attributes); /* object attributes */
2523 @REPLY
2524 obj_handle_t handle; /* handle to the pipe */
2525 @END
2527 /* flags in create_named_pipe and get_named_pipe_info */
2528 #define NAMED_PIPE_MESSAGE_STREAM_WRITE 0x0001
2529 #define NAMED_PIPE_MESSAGE_STREAM_READ 0x0002
2530 #define NAMED_PIPE_NONBLOCKING_MODE 0x0004
2531 #define NAMED_PIPE_SERVER_END 0x8000
2533 /* Set named pipe information by handle */
2534 @REQ(set_named_pipe_info)
2535 obj_handle_t handle;
2536 unsigned int flags;
2537 @END
2539 /* Create a window */
2540 @REQ(create_window)
2541 user_handle_t parent; /* parent window */
2542 user_handle_t owner; /* owner window */
2543 atom_t atom; /* class atom */
2544 mod_handle_t instance; /* module instance */
2545 int dpi; /* system DPI */
2546 int awareness; /* thread DPI awareness */
2547 VARARG(class,unicode_str); /* class name */
2548 @REPLY
2549 user_handle_t handle; /* created window */
2550 user_handle_t parent; /* full handle of parent */
2551 user_handle_t owner; /* full handle of owner */
2552 int extra; /* number of extra bytes */
2553 client_ptr_t class_ptr; /* pointer to class in client address space */
2554 int dpi; /* window DPI if not per-monitor aware */
2555 int awareness; /* window DPI awareness */
2556 @END
2559 /* Destroy a window */
2560 @REQ(destroy_window)
2561 user_handle_t handle; /* handle to the window */
2562 @END
2565 /* Retrieve the desktop window for the current thread */
2566 @REQ(get_desktop_window)
2567 int force; /* force creation if it doesn't exist */
2568 @REPLY
2569 user_handle_t top_window; /* handle to the desktop window */
2570 user_handle_t msg_window; /* handle to the top-level HWND_MESSAGE parent */
2571 @END
2574 /* Set a window owner */
2575 @REQ(set_window_owner)
2576 user_handle_t handle; /* handle to the window */
2577 user_handle_t owner; /* new owner */
2578 @REPLY
2579 user_handle_t full_owner; /* full handle of new owner */
2580 user_handle_t prev_owner; /* full handle of previous owner */
2581 @END
2584 /* Get information from a window handle */
2585 @REQ(get_window_info)
2586 user_handle_t handle; /* handle to the window */
2587 @REPLY
2588 user_handle_t full_handle; /* full 32-bit handle */
2589 user_handle_t last_active; /* last active popup */
2590 process_id_t pid; /* process owning the window */
2591 thread_id_t tid; /* thread owning the window */
2592 atom_t atom; /* class atom */
2593 int is_unicode; /* ANSI or unicode */
2594 int dpi; /* window DPI */
2595 int awareness; /* DPI awareness */
2596 @END
2599 /* Set some information in a window */
2600 @REQ(set_window_info)
2601 unsigned short flags; /* flags for fields to set (see below) */
2602 short int is_unicode; /* ANSI or unicode */
2603 user_handle_t handle; /* handle to the window */
2604 unsigned int style; /* window style */
2605 unsigned int ex_style; /* window extended style */
2606 unsigned int id; /* window id */
2607 mod_handle_t instance; /* creator instance */
2608 lparam_t user_data; /* user-specific data */
2609 int extra_offset; /* offset to set in extra bytes */
2610 data_size_t extra_size; /* size to set in extra bytes */
2611 lparam_t extra_value; /* value to set in extra bytes */
2612 @REPLY
2613 unsigned int old_style; /* old window style */
2614 unsigned int old_ex_style; /* old window extended style */
2615 mod_handle_t old_instance; /* old creator instance */
2616 lparam_t old_user_data; /* old user-specific data */
2617 lparam_t old_extra_value; /* old value in extra bytes */
2618 unsigned int old_id; /* old window id */
2619 @END
2620 #define SET_WIN_STYLE 0x01
2621 #define SET_WIN_EXSTYLE 0x02
2622 #define SET_WIN_ID 0x04
2623 #define SET_WIN_INSTANCE 0x08
2624 #define SET_WIN_USERDATA 0x10
2625 #define SET_WIN_EXTRA 0x20
2626 #define SET_WIN_UNICODE 0x40
2629 /* Set the parent of a window */
2630 @REQ(set_parent)
2631 user_handle_t handle; /* handle to the window */
2632 user_handle_t parent; /* handle to the parent */
2633 @REPLY
2634 user_handle_t old_parent; /* old parent window */
2635 user_handle_t full_parent; /* full handle of new parent */
2636 int dpi; /* new window DPI if not per-monitor aware */
2637 int awareness; /* new DPI awareness */
2638 @END
2641 /* Get a list of the window parents, up to the root of the tree */
2642 @REQ(get_window_parents)
2643 user_handle_t handle; /* handle to the window */
2644 @REPLY
2645 int count; /* total count of parents */
2646 VARARG(parents,user_handles); /* parent handles */
2647 @END
2650 /* Get a list of the window children */
2651 @REQ(get_window_children)
2652 obj_handle_t desktop; /* handle to desktop */
2653 user_handle_t parent; /* parent window */
2654 atom_t atom; /* class atom for the listed children */
2655 thread_id_t tid; /* thread owning the listed children */
2656 VARARG(class,unicode_str); /* class name */
2657 @REPLY
2658 int count; /* total count of children */
2659 VARARG(children,user_handles); /* children handles */
2660 @END
2663 /* Get a list of the window children that contain a given point */
2664 @REQ(get_window_children_from_point)
2665 user_handle_t parent; /* parent window */
2666 int x; /* point in parent coordinates */
2667 int y;
2668 int dpi; /* dpi for the point coordinates */
2669 @REPLY
2670 int count; /* total count of children */
2671 VARARG(children,user_handles); /* children handles */
2672 @END
2675 /* Get window tree information from a window handle */
2676 @REQ(get_window_tree)
2677 user_handle_t handle; /* handle to the window */
2678 @REPLY
2679 user_handle_t parent; /* parent window */
2680 user_handle_t owner; /* owner window */
2681 user_handle_t next_sibling; /* next sibling in Z-order */
2682 user_handle_t prev_sibling; /* prev sibling in Z-order */
2683 user_handle_t first_sibling; /* first sibling in Z-order */
2684 user_handle_t last_sibling; /* last sibling in Z-order */
2685 user_handle_t first_child; /* first child */
2686 user_handle_t last_child; /* last child */
2687 @END
2689 /* Set the position and Z order of a window */
2690 @REQ(set_window_pos)
2691 unsigned short swp_flags; /* SWP_* flags */
2692 unsigned short paint_flags; /* paint flags (see below) */
2693 user_handle_t handle; /* handle to the window */
2694 user_handle_t previous; /* previous window in Z order */
2695 rectangle_t window; /* window rectangle (in parent coords) */
2696 rectangle_t client; /* client rectangle (in parent coords) */
2697 VARARG(valid,rectangles); /* valid rectangles from WM_NCCALCSIZE (in parent coords) */
2698 @REPLY
2699 unsigned int new_style; /* new window style */
2700 unsigned int new_ex_style; /* new window extended style */
2701 user_handle_t surface_win; /* parent window that holds the surface */
2702 int needs_update; /* whether the surface region needs an update */
2703 @END
2704 #define SET_WINPOS_PAINT_SURFACE 0x01 /* window has a paintable surface */
2705 #define SET_WINPOS_PIXEL_FORMAT 0x02 /* window has a custom pixel format */
2707 /* Get the window and client rectangles of a window */
2708 @REQ(get_window_rectangles)
2709 user_handle_t handle; /* handle to the window */
2710 int relative; /* coords relative to (see below) */
2711 int dpi; /* DPI to map to, or zero for per-monitor DPI */
2712 @REPLY
2713 rectangle_t window; /* window rectangle */
2714 rectangle_t client; /* client rectangle */
2715 @END
2716 enum coords_relative
2718 COORDS_CLIENT, /* relative to client area */
2719 COORDS_WINDOW, /* relative to whole window area */
2720 COORDS_PARENT, /* relative to parent's client area */
2721 COORDS_SCREEN /* relative to screen origin */
2725 /* Get the window text */
2726 @REQ(get_window_text)
2727 user_handle_t handle; /* handle to the window */
2728 @REPLY
2729 data_size_t length; /* total length in WCHARs */
2730 VARARG(text,unicode_str); /* window text */
2731 @END
2734 /* Set the window text */
2735 @REQ(set_window_text)
2736 user_handle_t handle; /* handle to the window */
2737 VARARG(text,unicode_str); /* window text */
2738 @END
2741 /* Get the coordinates offset between two windows */
2742 @REQ(get_windows_offset)
2743 user_handle_t from; /* handle to the first window */
2744 user_handle_t to; /* handle to the second window */
2745 int dpi; /* DPI to map to, or zero for per-monitor DPI */
2746 @REPLY
2747 int x; /* x coordinate offset */
2748 int y; /* y coordinate offset */
2749 int mirror; /* whether to mirror the x coordinate */
2750 @END
2753 /* Get the visible region of a window */
2754 @REQ(get_visible_region)
2755 user_handle_t window; /* handle to the window */
2756 unsigned int flags; /* DCX flags */
2757 @REPLY
2758 user_handle_t top_win; /* top window to clip against */
2759 rectangle_t top_rect; /* top window visible rect with screen coords */
2760 rectangle_t win_rect; /* window rect in screen coords */
2761 unsigned int paint_flags; /* paint flags (from SET_WINPOS_* flags) */
2762 data_size_t total_size; /* total size of the resulting region */
2763 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2764 @END
2767 /* Get the visible surface region of a window */
2768 @REQ(get_surface_region)
2769 user_handle_t window; /* handle to the window */
2770 @REPLY
2771 rectangle_t visible_rect; /* window visible rect in screen coords */
2772 data_size_t total_size; /* total size of the resulting region */
2773 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2774 @END
2777 /* Get the window region */
2778 @REQ(get_window_region)
2779 user_handle_t window; /* handle to the window */
2780 @REPLY
2781 data_size_t total_size; /* total size of the resulting region */
2782 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2783 @END
2786 /* Set the window region */
2787 @REQ(set_window_region)
2788 user_handle_t window; /* handle to the window */
2789 int redraw; /* redraw the window? */
2790 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2791 @END
2794 /* Get the window update region */
2795 @REQ(get_update_region)
2796 user_handle_t window; /* handle to the window */
2797 user_handle_t from_child; /* child to start searching from */
2798 unsigned int flags; /* update flags (see below) */
2799 @REPLY
2800 user_handle_t child; /* child to repaint (or window itself) */
2801 unsigned int flags; /* resulting update flags (see below) */
2802 data_size_t total_size; /* total size of the resulting region */
2803 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2804 @END
2805 #define UPDATE_NONCLIENT 0x001 /* get region for repainting non-client area */
2806 #define UPDATE_ERASE 0x002 /* get region for erasing client area */
2807 #define UPDATE_PAINT 0x004 /* get region for painting client area */
2808 #define UPDATE_INTERNALPAINT 0x008 /* get region if internal paint is pending */
2809 #define UPDATE_ALLCHILDREN 0x010 /* force repaint of all children */
2810 #define UPDATE_NOCHILDREN 0x020 /* don't try to repaint any children */
2811 #define UPDATE_NOREGION 0x040 /* don't return a region, only the flags */
2812 #define UPDATE_DELAYED_ERASE 0x080 /* still needs erase after BeginPaint */
2813 #define UPDATE_CLIPCHILDREN 0x100 /* remove clipped children from the update region */
2816 /* Update the z order of a window so that a given rectangle is fully visible */
2817 @REQ(update_window_zorder)
2818 user_handle_t window; /* handle to the window */
2819 rectangle_t rect; /* rectangle that must be visible (in client coords) */
2820 @END
2823 /* Mark parts of a window as needing a redraw */
2824 @REQ(redraw_window)
2825 user_handle_t window; /* handle to the window */
2826 unsigned int flags; /* RDW_* flags */
2827 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2828 @END
2831 /* Set a window property */
2832 @REQ(set_window_property)
2833 user_handle_t window; /* handle to the window */
2834 lparam_t data; /* data to store */
2835 atom_t atom; /* property atom (if no name specified) */
2836 VARARG(name,unicode_str); /* property name */
2837 @END
2840 /* Remove a window property */
2841 @REQ(remove_window_property)
2842 user_handle_t window; /* handle to the window */
2843 atom_t atom; /* property atom (if no name specified) */
2844 VARARG(name,unicode_str); /* property name */
2845 @REPLY
2846 lparam_t data; /* data stored in property */
2847 @END
2850 /* Get a window property */
2851 @REQ(get_window_property)
2852 user_handle_t window; /* handle to the window */
2853 atom_t atom; /* property atom (if no name specified) */
2854 VARARG(name,unicode_str); /* property name */
2855 @REPLY
2856 lparam_t data; /* data stored in property */
2857 @END
2860 /* Get the list of properties of a window */
2861 @REQ(get_window_properties)
2862 user_handle_t window; /* handle to the window */
2863 @REPLY
2864 int total; /* total number of properties */
2865 VARARG(props,properties); /* list of properties */
2866 @END
2869 /* Create a window station */
2870 @REQ(create_winstation)
2871 unsigned int flags; /* window station flags */
2872 unsigned int access; /* wanted access rights */
2873 unsigned int attributes; /* object attributes */
2874 obj_handle_t rootdir; /* root directory */
2875 VARARG(name,unicode_str); /* object name */
2876 @REPLY
2877 obj_handle_t handle; /* handle to the window station */
2878 @END
2881 /* Open a handle to a window station */
2882 @REQ(open_winstation)
2883 unsigned int access; /* wanted access rights */
2884 unsigned int attributes; /* object attributes */
2885 obj_handle_t rootdir; /* root directory */
2886 VARARG(name,unicode_str); /* object name */
2887 @REPLY
2888 obj_handle_t handle; /* handle to the window station */
2889 @END
2892 /* Close a window station */
2893 @REQ(close_winstation)
2894 obj_handle_t handle; /* handle to the window station */
2895 @END
2898 /* Get the process current window station */
2899 @REQ(get_process_winstation)
2900 @REPLY
2901 obj_handle_t handle; /* handle to the window station */
2902 @END
2905 /* Set the process current window station */
2906 @REQ(set_process_winstation)
2907 obj_handle_t handle; /* handle to the window station */
2908 @END
2911 /* Enumerate window stations */
2912 @REQ(enum_winstation)
2913 unsigned int index; /* current index */
2914 @REPLY
2915 unsigned int next; /* next index */
2916 VARARG(name,unicode_str); /* window station name */
2917 @END
2920 /* Create a desktop */
2921 @REQ(create_desktop)
2922 unsigned int flags; /* desktop flags */
2923 unsigned int access; /* wanted access rights */
2924 unsigned int attributes; /* object attributes */
2925 VARARG(name,unicode_str); /* object name */
2926 @REPLY
2927 obj_handle_t handle; /* handle to the desktop */
2928 @END
2931 /* Open a handle to a desktop */
2932 @REQ(open_desktop)
2933 obj_handle_t winsta; /* window station to open (null allowed) */
2934 unsigned int flags; /* desktop flags */
2935 unsigned int access; /* wanted access rights */
2936 unsigned int attributes; /* object attributes */
2937 VARARG(name,unicode_str); /* object name */
2938 @REPLY
2939 obj_handle_t handle; /* handle to the desktop */
2940 @END
2943 /* Open a handle to current input desktop */
2944 @REQ(open_input_desktop)
2945 unsigned int flags; /* desktop flags */
2946 unsigned int access; /* wanted access rights */
2947 unsigned int attributes; /* object attributes */
2948 @REPLY
2949 obj_handle_t handle; /* handle to the desktop */
2950 @END
2953 /* Close a desktop */
2954 @REQ(close_desktop)
2955 obj_handle_t handle; /* handle to the desktop */
2956 @END
2959 /* Get the thread current desktop */
2960 @REQ(get_thread_desktop)
2961 thread_id_t tid; /* thread id */
2962 @REPLY
2963 obj_handle_t handle; /* handle to the desktop */
2964 @END
2967 /* Set the thread current desktop */
2968 @REQ(set_thread_desktop)
2969 obj_handle_t handle; /* handle to the desktop */
2970 @END
2973 /* Enumerate desktops */
2974 @REQ(enum_desktop)
2975 obj_handle_t winstation; /* handle to the window station */
2976 unsigned int index; /* current index */
2977 @REPLY
2978 unsigned int next; /* next index */
2979 VARARG(name,unicode_str); /* window station name */
2980 @END
2983 /* Get/set information about a user object (window station or desktop) */
2984 @REQ(set_user_object_info)
2985 obj_handle_t handle; /* handle to the object */
2986 unsigned int flags; /* information to set/get */
2987 unsigned int obj_flags; /* new object flags */
2988 @REPLY
2989 int is_desktop; /* is object a desktop? */
2990 unsigned int old_obj_flags; /* old object flags */
2991 VARARG(name,unicode_str); /* object name */
2992 @END
2993 #define SET_USER_OBJECT_SET_FLAGS 1
2994 #define SET_USER_OBJECT_GET_FULL_NAME 2
2997 /* Register a hotkey */
2998 @REQ(register_hotkey)
2999 user_handle_t window; /* handle to the window */
3000 int id; /* hotkey identifier */
3001 unsigned int flags; /* modifier keys */
3002 unsigned int vkey; /* virtual key code */
3003 @REPLY
3004 int replaced; /* did we replace an existing hotkey? */
3005 unsigned int flags; /* flags of replaced hotkey */
3006 unsigned int vkey; /* virtual key code of replaced hotkey */
3007 @END
3010 /* Unregister a hotkey */
3011 @REQ(unregister_hotkey)
3012 user_handle_t window; /* handle to the window */
3013 int id; /* hotkey identifier */
3014 @REPLY
3015 unsigned int flags; /* flags of removed hotkey */
3016 unsigned int vkey; /* virtual key code of removed hotkey */
3017 @END
3020 /* Attach (or detach) thread inputs */
3021 @REQ(attach_thread_input)
3022 thread_id_t tid_from; /* thread to be attached */
3023 thread_id_t tid_to; /* thread to which tid_from should be attached */
3024 int attach; /* is it an attach? */
3025 @END
3028 /* Get input data for a given thread */
3029 @REQ(get_thread_input)
3030 thread_id_t tid; /* id of thread */
3031 @REPLY
3032 user_handle_t focus; /* handle to the focus window */
3033 user_handle_t capture; /* handle to the capture window */
3034 user_handle_t active; /* handle to the active window */
3035 user_handle_t foreground; /* handle to the global foreground window */
3036 user_handle_t menu_owner; /* handle to the menu owner */
3037 user_handle_t move_size; /* handle to the moving/resizing window */
3038 user_handle_t caret; /* handle to the caret window */
3039 user_handle_t cursor; /* handle to the cursor */
3040 int show_count; /* cursor show count */
3041 rectangle_t rect; /* caret rectangle */
3042 @END
3045 /* Get the time of the last input event */
3046 @REQ(get_last_input_time)
3047 @REPLY
3048 unsigned int time;
3049 @END
3052 /* Retrieve queue keyboard state for a given thread */
3053 @REQ(get_key_state)
3054 thread_id_t tid; /* id of thread */
3055 int key; /* optional key code or -1 */
3056 @REPLY
3057 unsigned char state; /* state of specified key */
3058 VARARG(keystate,bytes); /* state array for all the keys */
3059 @END
3061 /* Set queue keyboard state for a given thread */
3062 @REQ(set_key_state)
3063 thread_id_t tid; /* id of thread */
3064 int async; /* whether to change the async state too */
3065 VARARG(keystate,bytes); /* state array for all the keys */
3066 @END
3068 /* Set the system foreground window */
3069 @REQ(set_foreground_window)
3070 user_handle_t handle; /* handle to the foreground window */
3071 @REPLY
3072 user_handle_t previous; /* handle to the previous foreground window */
3073 int send_msg_old; /* whether we have to send a msg to the old window */
3074 int send_msg_new; /* whether we have to send a msg to the new window */
3075 @END
3077 /* Set the current thread focus window */
3078 @REQ(set_focus_window)
3079 user_handle_t handle; /* handle to the focus window */
3080 @REPLY
3081 user_handle_t previous; /* handle to the previous focus window */
3082 @END
3084 /* Set the current thread active window */
3085 @REQ(set_active_window)
3086 user_handle_t handle; /* handle to the active window */
3087 @REPLY
3088 user_handle_t previous; /* handle to the previous active window */
3089 @END
3091 /* Set the current thread capture window */
3092 @REQ(set_capture_window)
3093 user_handle_t handle; /* handle to the capture window */
3094 unsigned int flags; /* capture flags (see below) */
3095 @REPLY
3096 user_handle_t previous; /* handle to the previous capture window */
3097 user_handle_t full_handle; /* full 32-bit handle of new capture window */
3098 @END
3099 #define CAPTURE_MENU 0x01 /* capture is for a menu */
3100 #define CAPTURE_MOVESIZE 0x02 /* capture is for moving/resizing */
3103 /* Set the current thread caret window */
3104 @REQ(set_caret_window)
3105 user_handle_t handle; /* handle to the caret window */
3106 int width; /* caret width */
3107 int height; /* caret height */
3108 @REPLY
3109 user_handle_t previous; /* handle to the previous caret window */
3110 rectangle_t old_rect; /* previous caret rectangle */
3111 int old_hide; /* previous hide count */
3112 int old_state; /* previous caret state (1=on, 0=off) */
3113 @END
3116 /* Set the current thread caret information */
3117 @REQ(set_caret_info)
3118 unsigned int flags; /* caret flags (see below) */
3119 user_handle_t handle; /* handle to the caret window */
3120 int x; /* caret x position */
3121 int y; /* caret y position */
3122 int hide; /* increment for hide count (can be negative to show it) */
3123 int state; /* caret state (see below) */
3124 @REPLY
3125 user_handle_t full_handle; /* handle to the current caret window */
3126 rectangle_t old_rect; /* previous caret rectangle */
3127 int old_hide; /* previous hide count */
3128 int old_state; /* previous caret state (1=on, 0=off) */
3129 @END
3130 #define SET_CARET_POS 0x01 /* set the caret position from x,y */
3131 #define SET_CARET_HIDE 0x02 /* increment the caret hide count */
3132 #define SET_CARET_STATE 0x04 /* set the caret on/off state */
3133 enum caret_state
3135 CARET_STATE_OFF, /* off */
3136 CARET_STATE_ON, /* on */
3137 CARET_STATE_TOGGLE, /* toggle current state */
3138 CARET_STATE_ON_IF_MOVED /* on if the position differs, unchanged otherwise */
3142 /* Set a window hook */
3143 @REQ(set_hook)
3144 int id; /* id of the hook */
3145 process_id_t pid; /* id of process to set the hook into */
3146 thread_id_t tid; /* id of thread to set the hook into */
3147 int event_min;
3148 int event_max;
3149 client_ptr_t proc; /* hook procedure */
3150 int flags;
3151 int unicode; /* is it a unicode hook? */
3152 VARARG(module,unicode_str); /* module name */
3153 @REPLY
3154 user_handle_t handle; /* handle to the hook */
3155 unsigned int active_hooks; /* active hooks bitmap */
3156 @END
3159 /* Remove a window hook */
3160 @REQ(remove_hook)
3161 user_handle_t handle; /* handle to the hook */
3162 client_ptr_t proc; /* hook procedure if handle is 0 */
3163 int id; /* id of the hook if handle is 0 */
3164 @REPLY
3165 unsigned int active_hooks; /* active hooks bitmap */
3166 @END
3169 /* Start calling a hook chain */
3170 @REQ(start_hook_chain)
3171 int id; /* id of the hook */
3172 int event; /* signalled event */
3173 user_handle_t window; /* handle to the event window */
3174 int object_id; /* object id for out of context winevent */
3175 int child_id; /* child id for out of context winevent */
3176 @REPLY
3177 user_handle_t handle; /* handle to the next hook */
3178 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
3179 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
3180 int unicode; /* is it a unicode hook? */
3181 client_ptr_t proc; /* hook procedure */
3182 unsigned int active_hooks; /* active hooks bitmap */
3183 VARARG(module,unicode_str); /* module name */
3184 @END
3187 /* Finished calling a hook chain */
3188 @REQ(finish_hook_chain)
3189 int id; /* id of the hook */
3190 @END
3193 /* Get the hook information */
3194 @REQ(get_hook_info)
3195 user_handle_t handle; /* handle to the current hook */
3196 int get_next; /* do we want info about current or next hook? */
3197 int event; /* signalled event */
3198 user_handle_t window; /* handle to the event window */
3199 int object_id; /* object id for out of context winevent */
3200 int child_id; /* child id for out of context winevent */
3201 @REPLY
3202 user_handle_t handle; /* handle to the hook */
3203 int id; /* id of the hook */
3204 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
3205 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
3206 client_ptr_t proc; /* hook procedure */
3207 int unicode; /* is it a unicode hook? */
3208 VARARG(module,unicode_str); /* module name */
3209 @END
3212 /* Create a window class */
3213 @REQ(create_class)
3214 int local; /* is it a local class? */
3215 atom_t atom; /* class atom */
3216 unsigned int style; /* class style */
3217 mod_handle_t instance; /* module instance */
3218 int extra; /* number of extra class bytes */
3219 int win_extra; /* number of window extra bytes */
3220 client_ptr_t client_ptr; /* pointer to class in client address space */
3221 data_size_t name_offset; /* base class name offset for specified atom */
3222 VARARG(name,unicode_str); /* class name */
3223 @REPLY
3224 atom_t atom; /* resulting class atom */
3225 @END
3228 /* Destroy a window class */
3229 @REQ(destroy_class)
3230 atom_t atom; /* class atom */
3231 mod_handle_t instance; /* module instance */
3232 VARARG(name,unicode_str); /* class name */
3233 @REPLY
3234 client_ptr_t client_ptr; /* pointer to class in client address space */
3235 @END
3238 /* Set some information in a class */
3239 @REQ(set_class_info)
3240 user_handle_t window; /* handle to the window */
3241 unsigned int flags; /* flags for info to set (see below) */
3242 atom_t atom; /* class atom */
3243 unsigned int style; /* class style */
3244 int win_extra; /* number of window extra bytes */
3245 mod_handle_t instance; /* module instance */
3246 int extra_offset; /* offset to set in extra bytes */
3247 data_size_t extra_size; /* size to set in extra bytes */
3248 lparam_t extra_value; /* value to set in extra bytes */
3249 @REPLY
3250 atom_t old_atom; /* previous class atom */
3251 atom_t base_atom; /* base class atom */
3252 mod_handle_t old_instance; /* previous module instance */
3253 lparam_t old_extra_value; /* old value in extra bytes */
3254 unsigned int old_style; /* previous class style */
3255 int old_extra; /* previous number of class extra bytes */
3256 int old_win_extra; /* previous number of window extra bytes */
3257 @END
3258 #define SET_CLASS_ATOM 0x0001
3259 #define SET_CLASS_STYLE 0x0002
3260 #define SET_CLASS_WINEXTRA 0x0004
3261 #define SET_CLASS_INSTANCE 0x0008
3262 #define SET_CLASS_EXTRA 0x0010
3265 /* Open the clipboard */
3266 @REQ(open_clipboard)
3267 user_handle_t window; /* clipboard window */
3268 @REPLY
3269 user_handle_t owner; /* current clipboard owner */
3270 @END
3273 /* Close the clipboard */
3274 @REQ(close_clipboard)
3275 @REPLY
3276 user_handle_t viewer; /* first clipboard viewer */
3277 user_handle_t owner; /* current clipboard owner */
3278 @END
3281 /* Empty the clipboard and grab ownership */
3282 @REQ(empty_clipboard)
3283 @END
3286 /* Add a data format to the clipboard */
3287 @REQ(set_clipboard_data)
3288 unsigned int format; /* clipboard format of the data */
3289 unsigned int lcid; /* locale id to use for synthesizing text formats */
3290 VARARG(data,bytes); /* data contents */
3291 @REPLY
3292 unsigned int seqno; /* sequence number for the set data */
3293 @END
3296 /* Fetch a data format from the clipboard */
3297 @REQ(get_clipboard_data)
3298 unsigned int format; /* clipboard format of the data */
3299 int render; /* will we try to render it if missing? */
3300 int cached; /* do we already have it in the client-side cache? */
3301 unsigned int seqno; /* sequence number for the data in the cache */
3302 @REPLY
3303 unsigned int from; /* for synthesized data, format to generate it from */
3304 user_handle_t owner; /* clipboard owner for delayed-rendered formats */
3305 unsigned int seqno; /* sequence number for the originally set data */
3306 data_size_t total; /* total data size */
3307 VARARG(data,bytes); /* data contents */
3308 @END
3311 /* Retrieve a list of available formats */
3312 @REQ(get_clipboard_formats)
3313 unsigned int format; /* specific format to query, return all if 0 */
3314 @REPLY
3315 unsigned int count; /* count of available formats */
3316 VARARG(formats,uints); /* array of available formats */
3317 @END
3320 /* Retrieve the next available format */
3321 @REQ(enum_clipboard_formats)
3322 unsigned int previous; /* previous format, or first if 0 */
3323 @REPLY
3324 unsigned int format; /* next format */
3325 @END
3328 /* Release ownership of the clipboard */
3329 @REQ(release_clipboard)
3330 user_handle_t owner; /* clipboard owner to release */
3331 @REPLY
3332 user_handle_t viewer; /* first clipboard viewer */
3333 user_handle_t owner; /* current clipboard owner */
3334 @END
3337 /* Get clipboard information */
3338 @REQ(get_clipboard_info)
3339 @REPLY
3340 user_handle_t window; /* clipboard window */
3341 user_handle_t owner; /* clipboard owner */
3342 user_handle_t viewer; /* clipboard viewer */
3343 unsigned int seqno; /* current sequence number */
3344 @END
3347 /* Set the clipboard viewer window */
3348 @REQ(set_clipboard_viewer)
3349 user_handle_t viewer; /* clipboard viewer */
3350 user_handle_t previous; /* if non-zero, check that this was the previous viewer */
3351 @REPLY
3352 user_handle_t old_viewer; /* previous clipboard viewer */
3353 user_handle_t owner; /* clipboard owner */
3354 @END
3357 /* Add a clipboard listener window */
3358 @REQ(add_clipboard_listener)
3359 user_handle_t window; /* clipboard listener window */
3360 @END
3363 /* Remove a clipboard listener window */
3364 @REQ(remove_clipboard_listener)
3365 user_handle_t window; /* clipboard listener window */
3366 @END
3369 /* Open a security token */
3370 @REQ(open_token)
3371 obj_handle_t handle; /* handle to the thread or process */
3372 unsigned int access; /* access rights to the new token */
3373 unsigned int attributes;/* object attributes */
3374 unsigned int flags; /* flags (see below) */
3375 @REPLY
3376 obj_handle_t token; /* handle to the token */
3377 @END
3378 #define OPEN_TOKEN_THREAD 1
3379 #define OPEN_TOKEN_AS_SELF 2
3382 /* Set/get the global windows */
3383 @REQ(set_global_windows)
3384 unsigned int flags; /* flags for fields to set (see below) */
3385 user_handle_t shell_window; /* handle to the new shell window */
3386 user_handle_t shell_listview; /* handle to the new shell listview window */
3387 user_handle_t progman_window; /* handle to the new program manager window */
3388 user_handle_t taskman_window; /* handle to the new task manager window */
3389 @REPLY
3390 user_handle_t old_shell_window; /* handle to the shell window */
3391 user_handle_t old_shell_listview; /* handle to the shell listview window */
3392 user_handle_t old_progman_window; /* handle to the new program manager window */
3393 user_handle_t old_taskman_window; /* handle to the new task manager window */
3394 @END
3395 #define SET_GLOBAL_SHELL_WINDOWS 0x01 /* set both main shell and listview windows */
3396 #define SET_GLOBAL_PROGMAN_WINDOW 0x02
3397 #define SET_GLOBAL_TASKMAN_WINDOW 0x04
3399 /* Adjust the privileges held by a token */
3400 @REQ(adjust_token_privileges)
3401 obj_handle_t handle; /* handle to the token */
3402 int disable_all; /* disable all privileges? */
3403 int get_modified_state; /* get modified privileges? */
3404 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to enable/disable/remove */
3405 @REPLY
3406 unsigned int len; /* total length in bytes required to store token privileges */
3407 VARARG(privileges,LUID_AND_ATTRIBUTES); /* modified privileges */
3408 @END
3410 /* Retrieves the set of privileges held by or available to a token */
3411 @REQ(get_token_privileges)
3412 obj_handle_t handle; /* handle to the token */
3413 @REPLY
3414 unsigned int len; /* total length in bytes required to store token privileges */
3415 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
3416 @END
3418 /* Check the token has the required privileges */
3419 @REQ(check_token_privileges)
3420 obj_handle_t handle; /* handle to the token */
3421 int all_required; /* are all the privileges required for the check to succeed? */
3422 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to check */
3423 @REPLY
3424 int has_privileges; /* does the token have the required privileges? */
3425 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
3426 @END
3428 @REQ(duplicate_token)
3429 obj_handle_t handle; /* handle to the token to duplicate */
3430 unsigned int access; /* access rights to the new token */
3431 int primary; /* is the new token to be a primary one? */
3432 int impersonation_level; /* impersonation level of the new token */
3433 VARARG(objattr,object_attributes); /* object attributes */
3434 @REPLY
3435 obj_handle_t new_handle; /* duplicated handle */
3436 @END
3438 @REQ(access_check)
3439 obj_handle_t handle; /* handle to the token */
3440 unsigned int desired_access; /* desired access to the object */
3441 unsigned int mapping_read; /* mapping from generic read to specific rights */
3442 unsigned int mapping_write; /* mapping from generic write to specific rights */
3443 unsigned int mapping_execute; /* mapping from generic execute to specific rights */
3444 unsigned int mapping_all; /* mapping from generic all to specific rights */
3445 VARARG(sd,security_descriptor); /* security descriptor to check */
3446 @REPLY
3447 unsigned int access_granted; /* access rights actually granted */
3448 unsigned int access_status; /* was access granted? */
3449 unsigned int privileges_len; /* length needed to store privileges */
3450 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges used during access check */
3451 @END
3453 @REQ(get_token_sid)
3454 obj_handle_t handle; /* handle to the token */
3455 unsigned int which_sid; /* which SID to retrieve from the token */
3456 @REPLY
3457 data_size_t sid_len; /* length needed to store sid */
3458 VARARG(sid,SID); /* the sid specified by which_sid from the token */
3459 @END
3461 @REQ(get_token_groups)
3462 obj_handle_t handle; /* handle to the token */
3463 @REPLY
3464 data_size_t user_len; /* length needed to store user */
3465 VARARG(user,token_groups); /* groups the token's user belongs to */
3466 @END
3468 @REQ(get_token_default_dacl)
3469 obj_handle_t handle; /* handle to the token */
3470 @REPLY
3471 data_size_t acl_len; /* length needed to store access control list */
3472 VARARG(acl,ACL); /* access control list */
3473 @END
3475 @REQ(set_token_default_dacl)
3476 obj_handle_t handle; /* handle to the token */
3477 VARARG(acl,ACL); /* default dacl to set */
3478 @END
3480 @REQ(set_security_object)
3481 obj_handle_t handle; /* handle to the object */
3482 unsigned int security_info; /* which parts of security descriptor to set */
3483 VARARG(sd,security_descriptor); /* security descriptor to set */
3484 @END
3486 @REQ(get_security_object)
3487 obj_handle_t handle; /* handle to the object */
3488 unsigned int security_info; /* which parts of security descriptor to get */
3489 @REPLY
3490 unsigned int sd_len; /* buffer size needed for sd */
3491 VARARG(sd,security_descriptor); /* retrieved security descriptor */
3492 @END
3495 struct handle_info
3497 process_id_t owner;
3498 obj_handle_t handle;
3499 unsigned int access;
3502 /* Return a list of all opened handles */
3503 @REQ(get_system_handles)
3504 @REPLY
3505 unsigned int count; /* number of handles */
3506 VARARG(data,handle_infos); /* array of handle_infos */
3507 @END
3510 /* Create a mailslot */
3511 @REQ(create_mailslot)
3512 unsigned int access; /* wanted access rights */
3513 timeout_t read_timeout;
3514 unsigned int max_msgsize;
3515 VARARG(objattr,object_attributes); /* object attributes */
3516 @REPLY
3517 obj_handle_t handle; /* handle to the mailslot */
3518 @END
3521 /* Set mailslot information */
3522 @REQ(set_mailslot_info)
3523 obj_handle_t handle; /* handle to the mailslot */
3524 timeout_t read_timeout;
3525 unsigned int flags;
3526 @REPLY
3527 timeout_t read_timeout;
3528 unsigned int max_msgsize;
3529 @END
3530 #define MAILSLOT_SET_READ_TIMEOUT 1
3533 /* Create a directory object */
3534 @REQ(create_directory)
3535 unsigned int access; /* access flags */
3536 VARARG(objattr,object_attributes); /* object attributes */
3537 @REPLY
3538 obj_handle_t handle; /* handle to the directory */
3539 @END
3542 /* Open a directory object */
3543 @REQ(open_directory)
3544 unsigned int access; /* access flags */
3545 unsigned int attributes; /* object attributes */
3546 obj_handle_t rootdir; /* root directory */
3547 VARARG(directory_name,unicode_str); /* Directory name */
3548 @REPLY
3549 obj_handle_t handle; /* handle to the directory */
3550 @END
3553 /* Get a directory entry by index */
3554 @REQ(get_directory_entry)
3555 obj_handle_t handle; /* handle to the directory */
3556 unsigned int index; /* entry index */
3557 @REPLY
3558 data_size_t name_len; /* length of the entry name in bytes */
3559 VARARG(name,unicode_str,name_len); /* entry name */
3560 VARARG(type,unicode_str); /* entry type */
3561 @END
3564 /* Create a symbolic link object */
3565 @REQ(create_symlink)
3566 unsigned int access; /* access flags */
3567 VARARG(objattr,object_attributes); /* object attributes */
3568 VARARG(target_name,unicode_str); /* target name */
3569 @REPLY
3570 obj_handle_t handle; /* handle to the symlink */
3571 @END
3574 /* Open a symbolic link object */
3575 @REQ(open_symlink)
3576 unsigned int access; /* access flags */
3577 unsigned int attributes; /* object attributes */
3578 obj_handle_t rootdir; /* root directory */
3579 VARARG(name,unicode_str); /* symlink name */
3580 @REPLY
3581 obj_handle_t handle; /* handle to the symlink */
3582 @END
3585 /* Query a symbolic link object */
3586 @REQ(query_symlink)
3587 obj_handle_t handle; /* handle to the symlink */
3588 @REPLY
3589 data_size_t total; /* total needed size for name */
3590 VARARG(target_name,unicode_str); /* target name */
3591 @END
3594 /* Query basic object information */
3595 @REQ(get_object_info)
3596 obj_handle_t handle; /* handle to the object */
3597 @REPLY
3598 unsigned int access; /* granted access mask */
3599 unsigned int ref_count; /* object ref count */
3600 unsigned int handle_count; /* object handle count */
3601 data_size_t total; /* total needed size for name */
3602 VARARG(name,unicode_str); /* object name */
3603 @END
3606 /* Query object type name information */
3607 @REQ(get_object_type)
3608 obj_handle_t handle; /* handle to the object */
3609 @REPLY
3610 data_size_t total; /* needed size for type name */
3611 VARARG(type,unicode_str); /* type name */
3612 @END
3615 /* Unlink a named object */
3616 @REQ(unlink_object)
3617 obj_handle_t handle; /* handle to the object */
3618 @END
3621 /* Query the impersonation level of an impersonation token */
3622 @REQ(get_token_impersonation_level)
3623 obj_handle_t handle; /* handle to the object */
3624 @REPLY
3625 int impersonation_level; /* impersonation level of the impersonation token */
3626 @END
3628 /* Allocate a locally-unique identifier */
3629 @REQ(allocate_locally_unique_id)
3630 @REPLY
3631 luid_t luid;
3632 @END
3635 /* Create a device manager */
3636 @REQ(create_device_manager)
3637 unsigned int access; /* wanted access rights */
3638 unsigned int attributes; /* object attributes */
3639 @REPLY
3640 obj_handle_t handle; /* handle to the device */
3641 @END
3644 /* Create a device */
3645 @REQ(create_device)
3646 obj_handle_t rootdir; /* root directory */
3647 client_ptr_t user_ptr; /* opaque ptr for use by client */
3648 obj_handle_t manager; /* device manager */
3649 VARARG(name,unicode_str); /* object name */
3650 @END
3653 /* Delete a device */
3654 @REQ(delete_device)
3655 obj_handle_t manager; /* handle to the device manager */
3656 client_ptr_t device; /* pointer to the device */
3657 @END
3660 /* Retrieve the next pending device irp request */
3661 @REQ(get_next_device_request)
3662 obj_handle_t manager; /* handle to the device manager */
3663 obj_handle_t prev; /* handle to the previous irp */
3664 unsigned int status; /* status of the previous irp */
3665 client_ptr_t user_ptr; /* user pointer of the previous irp */
3666 @REPLY
3667 irp_params_t params; /* irp parameters */
3668 obj_handle_t next; /* handle to the next irp */
3669 thread_id_t client_tid; /* tid of thread calling irp */
3670 client_ptr_t client_thread; /* pointer to thread object of calling irp */
3671 data_size_t in_size; /* total needed input size */
3672 VARARG(next_data,bytes); /* input data of the next irp */
3673 @END
3676 /* Get kernel pointer from server object */
3677 @REQ(get_kernel_object_ptr)
3678 obj_handle_t manager; /* handle to the device manager */
3679 obj_handle_t handle; /* object handle */
3680 @REPLY
3681 client_ptr_t user_ptr; /* kernel object pointer */
3682 @END
3685 /* Associate kernel pointer with server object */
3686 @REQ(set_kernel_object_ptr)
3687 obj_handle_t manager; /* handle to the device manager */
3688 obj_handle_t handle; /* object handle */
3689 client_ptr_t user_ptr; /* kernel object pointer */
3690 @END
3693 /* Grab server object reference from kernel object pointer */
3694 @REQ(grab_kernel_object)
3695 obj_handle_t manager; /* handle to the device manager */
3696 client_ptr_t user_ptr; /* kernel object pointer */
3697 @END
3700 /* Release server object reference from kernel object pointer */
3701 @REQ(release_kernel_object)
3702 obj_handle_t manager; /* handle to the device manager */
3703 client_ptr_t user_ptr; /* kernel object pointer */
3704 @END
3707 /* Get handle from kernel object pointer */
3708 @REQ(get_kernel_object_handle)
3709 obj_handle_t manager; /* handle to the device manager */
3710 client_ptr_t user_ptr; /* kernel object pointer */
3711 unsigned int access; /* wanted access rights */
3712 @REPLY
3713 obj_handle_t handle; /* kernel object handle */
3714 @END
3717 /* Make the current process a system process */
3718 @REQ(make_process_system)
3719 @REPLY
3720 obj_handle_t event; /* event signaled when all user processes have exited */
3721 @END
3724 /* Get detailed fixed-size information about a token */
3725 @REQ(get_token_statistics)
3726 obj_handle_t handle; /* handle to the object */
3727 @REPLY
3728 luid_t token_id; /* locally-unique identifier of the token */
3729 luid_t modified_id; /* locally-unique identifier of the modified version of the token */
3730 int primary; /* is the token primary or impersonation? */
3731 int impersonation_level; /* level of impersonation */
3732 int group_count; /* the number of groups the token is a member of */
3733 int privilege_count; /* the number of privileges the token has */
3734 @END
3737 /* Create I/O completion port */
3738 @REQ(create_completion)
3739 unsigned int access; /* desired access to a port */
3740 unsigned int concurrent; /* max number of concurrent active threads */
3741 VARARG(objattr,object_attributes); /* object attributes */
3742 @REPLY
3743 obj_handle_t handle; /* port handle */
3744 @END
3747 /* Open I/O completion port */
3748 @REQ(open_completion)
3749 unsigned int access; /* desired access to a port */
3750 unsigned int attributes; /* object attributes */
3751 obj_handle_t rootdir; /* root directory */
3752 VARARG(filename,unicode_str); /* port name */
3753 @REPLY
3754 obj_handle_t handle; /* port handle */
3755 @END
3758 /* add completion to completion port */
3759 @REQ(add_completion)
3760 obj_handle_t handle; /* port handle */
3761 apc_param_t ckey; /* completion key */
3762 apc_param_t cvalue; /* completion value */
3763 apc_param_t information; /* IO_STATUS_BLOCK Information */
3764 unsigned int status; /* completion result */
3765 @END
3768 /* get completion from completion port queue */
3769 @REQ(remove_completion)
3770 obj_handle_t handle; /* port handle */
3771 @REPLY
3772 apc_param_t ckey; /* completion key */
3773 apc_param_t cvalue; /* completion value */
3774 apc_param_t information; /* IO_STATUS_BLOCK Information */
3775 unsigned int status; /* completion result */
3776 @END
3779 /* get completion queue depth */
3780 @REQ(query_completion)
3781 obj_handle_t handle; /* port handle */
3782 @REPLY
3783 unsigned int depth; /* completion queue depth */
3784 @END
3787 /* associate object with completion port */
3788 @REQ(set_completion_info)
3789 obj_handle_t handle; /* object handle */
3790 apc_param_t ckey; /* completion key */
3791 obj_handle_t chandle; /* port handle */
3792 @END
3795 /* check for associated completion and push msg */
3796 @REQ(add_fd_completion)
3797 obj_handle_t handle; /* async' object */
3798 apc_param_t cvalue; /* completion value */
3799 apc_param_t information; /* IO_STATUS_BLOCK Information */
3800 unsigned int status; /* completion status */
3801 int async; /* completion is an async result */
3802 @END
3805 /* set fd completion information */
3806 @REQ(set_fd_completion_mode)
3807 obj_handle_t handle; /* handle to a file or directory */
3808 unsigned int flags; /* completion notification flags */
3809 @END
3812 /* set fd disposition information */
3813 @REQ(set_fd_disp_info)
3814 obj_handle_t handle; /* handle to a file or directory */
3815 int unlink; /* whether to unlink file on close */
3816 @END
3819 /* set fd name information */
3820 @REQ(set_fd_name_info)
3821 obj_handle_t handle; /* handle to a file or directory */
3822 obj_handle_t rootdir; /* root directory */
3823 int link; /* link instead of renaming */
3824 int replace; /* replace an existing file? */
3825 VARARG(filename,string); /* new file name */
3826 @END
3829 /* Retrieve layered info for a window */
3830 @REQ(get_window_layered_info)
3831 user_handle_t handle; /* handle to the window */
3832 @REPLY
3833 unsigned int color_key; /* color key */
3834 unsigned int alpha; /* alpha (0..255) */
3835 unsigned int flags; /* LWA_* flags */
3836 @END
3839 /* Set layered info for a window */
3840 @REQ(set_window_layered_info)
3841 user_handle_t handle; /* handle to the window */
3842 unsigned int color_key; /* color key */
3843 unsigned int alpha; /* alpha (0..255) */
3844 unsigned int flags; /* LWA_* flags */
3845 @END
3848 /* Allocate an arbitrary user handle */
3849 @REQ(alloc_user_handle)
3850 @REPLY
3851 user_handle_t handle; /* allocated handle */
3852 @END
3855 /* Free an arbitrary user handle */
3856 @REQ(free_user_handle)
3857 user_handle_t handle; /* handle to free*/
3858 @END
3861 /* Set/get the current cursor */
3862 @REQ(set_cursor)
3863 unsigned int flags; /* flags for fields to set (see below) */
3864 user_handle_t handle; /* handle to the cursor */
3865 int show_count; /* show count increment/decrement */
3866 int x; /* cursor position */
3867 int y;
3868 rectangle_t clip; /* cursor clip rectangle */
3869 unsigned int clip_msg; /* message to post on cursor clip changes */
3870 @REPLY
3871 user_handle_t prev_handle; /* previous handle */
3872 int prev_count; /* previous show count */
3873 int prev_x; /* previous position */
3874 int prev_y;
3875 int new_x; /* new position */
3876 int new_y;
3877 rectangle_t new_clip; /* new clip rectangle */
3878 unsigned int last_change; /* time of last position change */
3879 @END
3880 #define SET_CURSOR_HANDLE 0x01
3881 #define SET_CURSOR_COUNT 0x02
3882 #define SET_CURSOR_POS 0x04
3883 #define SET_CURSOR_CLIP 0x08
3884 #define SET_CURSOR_NOCLIP 0x10
3887 /* Modify the list of registered rawinput devices */
3888 @REQ(update_rawinput_devices)
3889 VARARG(devices,rawinput_devices);
3890 @END
3893 /* Create a new job object */
3894 @REQ(create_job)
3895 unsigned int access; /* wanted access rights */
3896 VARARG(objattr,object_attributes); /* object attributes */
3897 @REPLY
3898 obj_handle_t handle; /* handle to the job */
3899 @END
3902 /* Open a job object */
3903 @REQ(open_job)
3904 unsigned int access; /* wanted access rights */
3905 unsigned int attributes; /* object attributes */
3906 obj_handle_t rootdir; /* root directory */
3907 VARARG(name,unicode_str); /* object name */
3908 @REPLY
3909 obj_handle_t handle; /* handle to the job */
3910 @END
3913 /* Assign a job object to a process */
3914 @REQ(assign_job)
3915 obj_handle_t job; /* handle to the job */
3916 obj_handle_t process; /* handle to the process */
3917 @END
3920 /* Check if a process is associated with a job */
3921 @REQ(process_in_job)
3922 obj_handle_t job; /* handle to the job */
3923 obj_handle_t process; /* handle to the process */
3924 @END
3927 /* Set limit flags on a job */
3928 @REQ(set_job_limits)
3929 obj_handle_t handle; /* handle to the job */
3930 unsigned int limit_flags; /* new limit flags */
3931 @END
3934 /* Set new completion port for a job */
3935 @REQ(set_job_completion_port)
3936 obj_handle_t job; /* handle to the job */
3937 obj_handle_t port; /* handle to the completion port */
3938 client_ptr_t key; /* key to send with completion messages */
3939 @END
3942 /* Retrieve information about a job */
3943 @REQ(get_job_info)
3944 obj_handle_t handle; /* handle to the job */
3945 @REPLY
3946 int total_processes; /* total count of processes */
3947 int active_processes; /* count of running processes */
3948 @END
3951 /* Terminate all processes associated with the job */
3952 @REQ(terminate_job)
3953 obj_handle_t handle; /* handle to the job */
3954 int status; /* process exit code */
3955 @END
3958 /* Suspend a process */
3959 @REQ(suspend_process)
3960 obj_handle_t handle; /* process handle */
3961 @END
3964 /* Resume a process */
3965 @REQ(resume_process)
3966 obj_handle_t handle; /* process handle */
3967 @END