amstream: Implement MediaStreamFilter::SupportSeeking().
[wine.git] / server / protocol.def
blob632c996dc0e69e11264d7398d77a1c84f03c2ce2
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 int suspend; /* suspended thread? */
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 thread_id_t tid; /* thread id */
665 obj_handle_t handle; /* handle to new thread */
666 } create_thread;
667 struct
669 enum apc_type type; /* APC_BREAK_PROCESS */
670 unsigned int status; /* status returned by call */
671 } break_process;
672 } apc_result_t;
674 enum irp_type
676 IRP_CALL_NONE,
677 IRP_CALL_CREATE,
678 IRP_CALL_CLOSE,
679 IRP_CALL_READ,
680 IRP_CALL_WRITE,
681 IRP_CALL_FLUSH,
682 IRP_CALL_IOCTL,
683 IRP_CALL_FREE,
684 IRP_CALL_CANCEL
687 typedef union
689 enum irp_type type; /* irp call type */
690 struct
692 enum irp_type type; /* IRP_CALL_CREATE */
693 unsigned int access; /* access rights */
694 unsigned int sharing; /* sharing flags */
695 unsigned int options; /* file options */
696 client_ptr_t device; /* opaque ptr for the device */
697 obj_handle_t file; /* file handle */
698 } create;
699 struct
701 enum irp_type type; /* IRP_CALL_CLOSE */
702 int __pad;
703 client_ptr_t file; /* opaque ptr for the file object */
704 } close;
705 struct
707 enum irp_type type; /* IRP_CALL_READ */
708 unsigned int key; /* driver key */
709 data_size_t out_size; /* needed output size */
710 int __pad;
711 client_ptr_t file; /* opaque ptr for the file object */
712 file_pos_t pos; /* file position */
713 } read;
714 struct
716 enum irp_type type; /* IRP_CALL_WRITE */
717 unsigned int key; /* driver key */
718 client_ptr_t file; /* opaque ptr for the file object */
719 file_pos_t pos; /* file position */
720 } write;
721 struct
723 enum irp_type type; /* IRP_CALL_FLUSH */
724 int __pad;
725 client_ptr_t file; /* opaque ptr for the file object */
726 } flush;
727 struct
729 enum irp_type type; /* IRP_CALL_IOCTL */
730 ioctl_code_t code; /* ioctl code */
731 data_size_t out_size; /* needed output size */
732 int __pad;
733 client_ptr_t file; /* opaque ptr for the file object */
734 } ioctl;
735 struct
737 enum irp_type type; /* IRP_CALL_FREE */
738 int __pad;
739 client_ptr_t obj; /* opaque ptr for the freed object */
740 } free;
741 struct
743 enum irp_type type; /* IRP_CALL_CANCEL */
744 int __pad;
745 client_ptr_t irp; /* opaque ptr for canceled irp */
746 } cancel;
747 } irp_params_t;
749 /* information about a PE image mapping, roughly equivalent to SECTION_IMAGE_INFORMATION */
750 typedef struct
752 client_ptr_t base;
753 client_ptr_t entry_point;
754 mem_size_t map_size;
755 mem_size_t stack_size;
756 mem_size_t stack_commit;
757 unsigned int zerobits;
758 unsigned int subsystem;
759 unsigned short subsystem_low;
760 unsigned short subsystem_high;
761 unsigned int gp;
762 unsigned short image_charact;
763 unsigned short dll_charact;
764 unsigned short machine;
765 unsigned char contains_code;
766 unsigned char image_flags;
767 unsigned int loader_flags;
768 unsigned int header_size;
769 unsigned int file_size;
770 unsigned int checksum;
771 client_cpu_t cpu;
772 int __pad;
773 } pe_image_info_t;
774 #define IMAGE_FLAGS_ComPlusNativeReady 0x01
775 #define IMAGE_FLAGS_ComPlusILOnly 0x02
776 #define IMAGE_FLAGS_ImageDynamicallyRelocated 0x04
777 #define IMAGE_FLAGS_ImageMappedFlat 0x08
778 #define IMAGE_FLAGS_BaseBelow4gb 0x10
779 #define IMAGE_FLAGS_WineBuiltin 0x40
780 #define IMAGE_FLAGS_WineFakeDll 0x80
782 struct rawinput_device
784 unsigned short usage_page;
785 unsigned short usage;
786 unsigned int flags;
787 user_handle_t target;
790 /****************************************************************/
791 /* Request declarations */
793 /* Create a new process from the context of the parent */
794 @REQ(new_process)
795 obj_handle_t parent_process; /* parent process */
796 int inherit_all; /* inherit all handles from parent */
797 unsigned int create_flags; /* creation flags */
798 int socket_fd; /* file descriptor for process socket */
799 obj_handle_t exe_file; /* file handle for main exe */
800 unsigned int access; /* access rights for process object */
801 client_cpu_t cpu; /* CPU that the new process will use */
802 data_size_t info_size; /* size of startup info */
803 VARARG(objattr,object_attributes); /* object attributes */
804 VARARG(info,startup_info,info_size); /* startup information */
805 VARARG(env,unicode_str); /* environment for new process */
806 @REPLY
807 obj_handle_t info; /* new process info handle */
808 process_id_t pid; /* process id */
809 obj_handle_t handle; /* process handle (in the current process) */
810 @END
813 /* Execute a process, replacing the current one */
814 @REQ(exec_process)
815 int socket_fd; /* file descriptor for process socket */
816 client_cpu_t cpu; /* CPU that the new process will use */
817 @END
820 /* Retrieve information about a newly started process */
821 @REQ(get_new_process_info)
822 obj_handle_t info; /* info handle returned from new_process_request */
823 @REPLY
824 int success; /* did the process start successfully? */
825 int exit_code; /* process exit code if failed */
826 @END
829 /* Create a new thread */
830 @REQ(new_thread)
831 obj_handle_t process; /* process in which to create thread */
832 unsigned int access; /* wanted access rights */
833 int suspend; /* new thread should be suspended on creation */
834 int request_fd; /* fd for request pipe */
835 VARARG(objattr,object_attributes); /* object attributes */
836 @REPLY
837 thread_id_t tid; /* thread id */
838 obj_handle_t handle; /* thread handle (in the current process) */
839 @END
842 /* Retrieve the new process startup info */
843 @REQ(get_startup_info)
844 @REPLY
845 data_size_t info_size; /* size of startup info */
846 VARARG(info,startup_info,info_size); /* startup information */
847 VARARG(env,unicode_str); /* environment */
848 @END
851 /* Signal the end of the process initialization */
852 @REQ(init_process_done)
853 int gui; /* is it a GUI process? */
854 mod_handle_t module; /* main module base address */
855 client_ptr_t ldt_copy; /* address of LDT copy (in thread address space) */
856 client_ptr_t entry; /* process entry point */
857 @REPLY
858 int suspend; /* is process suspended? */
859 @END
862 /* Initialize a thread; called from the child after fork()/clone() */
863 @REQ(init_thread)
864 int unix_pid; /* Unix pid of new thread */
865 int unix_tid; /* Unix tid of new thread */
866 int debug_level; /* new debug level */
867 client_ptr_t teb; /* TEB of new thread (in thread address space) */
868 client_ptr_t entry; /* entry point or PEB if initial thread (in thread address space) */
869 int reply_fd; /* fd for reply pipe */
870 int wait_fd; /* fd for blocking calls pipe */
871 client_cpu_t cpu; /* CPU that this thread is running on */
872 @REPLY
873 process_id_t pid; /* process id of the new thread's process */
874 thread_id_t tid; /* thread id of the new thread */
875 timeout_t server_start; /* server start time */
876 data_size_t info_size; /* total size of startup info */
877 int version; /* protocol version */
878 unsigned int all_cpus; /* bitset of supported CPUs */
879 int suspend; /* is thread suspended? */
880 @END
883 /* Terminate a process */
884 @REQ(terminate_process)
885 obj_handle_t handle; /* process handle to terminate */
886 int exit_code; /* process exit code */
887 @REPLY
888 int self; /* suicide? */
889 @END
892 /* Terminate a thread */
893 @REQ(terminate_thread)
894 obj_handle_t handle; /* thread handle to terminate */
895 int exit_code; /* thread exit code */
896 @REPLY
897 int self; /* suicide? */
898 @END
901 /* Retrieve information about a process */
902 @REQ(get_process_info)
903 obj_handle_t handle; /* process handle */
904 @REPLY
905 process_id_t pid; /* server process id */
906 process_id_t ppid; /* server process id of parent */
907 affinity_t affinity; /* process affinity mask */
908 client_ptr_t peb; /* PEB address in process address space */
909 timeout_t start_time; /* process start time */
910 timeout_t end_time; /* process end time */
911 int exit_code; /* process exit code */
912 int priority; /* priority class */
913 client_cpu_t cpu; /* CPU that this process is running on */
914 short int debugger_present; /* process is being debugged */
915 short int debug_children; /* inherit debugger to child processes */
916 VARARG(image,pe_image_info); /* image info for main exe */
917 @END
920 /* Retrieve information about a process memory usage */
921 @REQ(get_process_vm_counters)
922 obj_handle_t handle; /* process handle */
923 @REPLY
924 mem_size_t peak_virtual_size; /* peak virtual memory in bytes */
925 mem_size_t virtual_size; /* virtual memory in bytes */
926 mem_size_t peak_working_set_size; /* peak real memory in bytes */
927 mem_size_t working_set_size; /* real memory in bytes */
928 mem_size_t pagefile_usage; /* commit charge in bytes */
929 mem_size_t peak_pagefile_usage; /* peak commit charge in bytes */
930 @END
933 /* Set a process information */
934 @REQ(set_process_info)
935 obj_handle_t handle; /* process handle */
936 int mask; /* setting mask (see below) */
937 int priority; /* priority class */
938 affinity_t affinity; /* affinity mask */
939 @END
940 #define SET_PROCESS_INFO_PRIORITY 0x01
941 #define SET_PROCESS_INFO_AFFINITY 0x02
944 /* Retrieve information about a thread */
945 @REQ(get_thread_info)
946 obj_handle_t handle; /* thread handle */
947 thread_id_t tid_in; /* thread id (optional) */
948 @REPLY
949 process_id_t pid; /* server process id */
950 thread_id_t tid; /* server thread id */
951 client_ptr_t teb; /* thread teb pointer */
952 client_ptr_t entry_point; /* thread entry point */
953 affinity_t affinity; /* thread affinity mask */
954 int exit_code; /* thread exit code */
955 int priority; /* thread priority level */
956 int last; /* last thread in process */
957 int suspend_count; /* thread suspend count */
958 data_size_t desc_len; /* description length in bytes */
959 VARARG(desc,unicode_str); /* description string */
960 @END
963 /* Retrieve information about thread times */
964 @REQ(get_thread_times)
965 obj_handle_t handle; /* thread handle */
966 @REPLY
967 timeout_t creation_time; /* thread creation time */
968 timeout_t exit_time; /* thread exit time */
969 @END
972 /* Set a thread information */
973 @REQ(set_thread_info)
974 obj_handle_t handle; /* thread handle */
975 int mask; /* setting mask (see below) */
976 int priority; /* priority class */
977 affinity_t affinity; /* affinity mask */
978 client_ptr_t entry_point; /* thread entry point */
979 obj_handle_t token; /* impersonation token */
980 VARARG(desc,unicode_str); /* description string */
981 @END
982 #define SET_THREAD_INFO_PRIORITY 0x01
983 #define SET_THREAD_INFO_AFFINITY 0x02
984 #define SET_THREAD_INFO_TOKEN 0x04
985 #define SET_THREAD_INFO_ENTRYPOINT 0x08
986 #define SET_THREAD_INFO_DESCRIPTION 0x10
989 /* Retrieve information about a module */
990 @REQ(get_dll_info)
991 obj_handle_t handle; /* process handle */
992 mod_handle_t base_address; /* base address of module */
993 @REPLY
994 client_ptr_t entry_point;
995 data_size_t filename_len; /* buffer len in bytes required to store filename */
996 VARARG(filename,unicode_str); /* file name of module */
997 @END
1000 /* Suspend a thread */
1001 @REQ(suspend_thread)
1002 obj_handle_t handle; /* thread handle */
1003 @REPLY
1004 int count; /* new suspend count */
1005 @END
1008 /* Resume a thread */
1009 @REQ(resume_thread)
1010 obj_handle_t handle; /* thread handle */
1011 @REPLY
1012 int count; /* new suspend count */
1013 @END
1016 /* Notify the server that a dll has been loaded */
1017 @REQ(load_dll)
1018 data_size_t dbg_offset; /* debug info offset */
1019 mod_handle_t base; /* base address */
1020 client_ptr_t name; /* ptr to ptr to name (in process addr space) */
1021 data_size_t dbg_size; /* debug info size */
1022 VARARG(filename,unicode_str); /* file name of dll */
1023 @END
1026 /* Notify the server that a dll is being unloaded */
1027 @REQ(unload_dll)
1028 mod_handle_t base; /* base address */
1029 @END
1032 /* Queue an APC for a thread or process */
1033 @REQ(queue_apc)
1034 obj_handle_t handle; /* thread or process handle */
1035 apc_call_t call; /* call arguments */
1036 @REPLY
1037 obj_handle_t handle; /* APC handle */
1038 int self; /* run APC in caller itself? */
1039 @END
1042 /* Get the result of an APC call */
1043 @REQ(get_apc_result)
1044 obj_handle_t handle; /* handle to the APC */
1045 @REPLY
1046 apc_result_t result; /* result of the APC */
1047 @END
1050 /* Close a handle for the current process */
1051 @REQ(close_handle)
1052 obj_handle_t handle; /* handle to close */
1053 @END
1056 /* Set a handle information */
1057 @REQ(set_handle_info)
1058 obj_handle_t handle; /* handle we are interested in */
1059 int flags; /* new handle flags */
1060 int mask; /* mask for flags to set */
1061 @REPLY
1062 int old_flags; /* old flag value */
1063 @END
1066 /* Duplicate a handle */
1067 @REQ(dup_handle)
1068 obj_handle_t src_process; /* src process handle */
1069 obj_handle_t src_handle; /* src handle to duplicate */
1070 obj_handle_t dst_process; /* dst process handle */
1071 unsigned int access; /* wanted access rights */
1072 unsigned int attributes; /* object attributes */
1073 unsigned int options; /* duplicate options (see below) */
1074 @REPLY
1075 obj_handle_t handle; /* duplicated handle in dst process */
1076 int self; /* is the source the current process? */
1077 int closed; /* whether the source handle has been closed */
1078 @END
1079 #define DUP_HANDLE_CLOSE_SOURCE DUPLICATE_CLOSE_SOURCE
1080 #define DUP_HANDLE_SAME_ACCESS DUPLICATE_SAME_ACCESS
1081 #define DUP_HANDLE_MAKE_GLOBAL 0x80000000 /* Not a Windows flag */
1084 /* Open a handle to a process */
1085 @REQ(open_process)
1086 process_id_t pid; /* process id to open */
1087 unsigned int access; /* wanted access rights */
1088 unsigned int attributes; /* object attributes */
1089 @REPLY
1090 obj_handle_t handle; /* handle to the process */
1091 @END
1094 /* Open a handle to a thread */
1095 @REQ(open_thread)
1096 thread_id_t tid; /* thread id to open */
1097 unsigned int access; /* wanted access rights */
1098 unsigned int attributes; /* object attributes */
1099 @REPLY
1100 obj_handle_t handle; /* handle to the thread */
1101 @END
1104 /* Wait for handles */
1105 @REQ(select)
1106 int flags; /* wait flags (see below) */
1107 client_ptr_t cookie; /* magic cookie to return to client */
1108 abstime_t timeout; /* timeout */
1109 data_size_t size; /* size of select_op */
1110 obj_handle_t prev_apc; /* handle to previous APC */
1111 VARARG(result,apc_result); /* result of previous APC */
1112 VARARG(data,select_op,size); /* operation-specific data */
1113 VARARG(context,context); /* suspend context */
1114 @REPLY
1115 apc_call_t call; /* APC call arguments */
1116 obj_handle_t apc_handle; /* handle to next APC */
1117 VARARG(context,context); /* suspend context */
1118 @END
1119 #define SELECT_ALERTABLE 1
1120 #define SELECT_INTERRUPTIBLE 2
1123 /* Create an event */
1124 @REQ(create_event)
1125 unsigned int access; /* wanted access rights */
1126 int manual_reset; /* manual reset event */
1127 int initial_state; /* initial state of the event */
1128 VARARG(objattr,object_attributes); /* object attributes */
1129 @REPLY
1130 obj_handle_t handle; /* handle to the event */
1131 @END
1133 /* Event operation */
1134 @REQ(event_op)
1135 obj_handle_t handle; /* handle to event */
1136 int op; /* event operation (see below) */
1137 @REPLY
1138 int state; /* previous state */
1139 @END
1140 enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT };
1142 @REQ(query_event)
1143 obj_handle_t handle; /* handle to event */
1144 @REPLY
1145 int manual_reset; /* manual reset event */
1146 int state; /* current state of the event */
1147 @END
1149 /* Open an event */
1150 @REQ(open_event)
1151 unsigned int access; /* wanted access rights */
1152 unsigned int attributes; /* object attributes */
1153 obj_handle_t rootdir; /* root directory */
1154 VARARG(name,unicode_str); /* object name */
1155 @REPLY
1156 obj_handle_t handle; /* handle to the event */
1157 @END
1160 /* Create a keyed event */
1161 @REQ(create_keyed_event)
1162 unsigned int access; /* wanted access rights */
1163 VARARG(objattr,object_attributes); /* object attributes */
1164 @REPLY
1165 obj_handle_t handle; /* handle to the event */
1166 @END
1168 /* Open a keyed event */
1169 @REQ(open_keyed_event)
1170 unsigned int access; /* wanted access rights */
1171 unsigned int attributes; /* object attributes */
1172 obj_handle_t rootdir; /* root directory */
1173 VARARG(name,unicode_str); /* object name */
1174 @REPLY
1175 obj_handle_t handle; /* handle to the event */
1176 @END
1179 /* Create a mutex */
1180 @REQ(create_mutex)
1181 unsigned int access; /* wanted access rights */
1182 int owned; /* initially owned? */
1183 VARARG(objattr,object_attributes); /* object attributes */
1184 @REPLY
1185 obj_handle_t handle; /* handle to the mutex */
1186 @END
1189 /* Release a mutex */
1190 @REQ(release_mutex)
1191 obj_handle_t handle; /* handle to the mutex */
1192 @REPLY
1193 unsigned int prev_count; /* value of internal counter, before release */
1194 @END
1197 /* Open a mutex */
1198 @REQ(open_mutex)
1199 unsigned int access; /* wanted access rights */
1200 unsigned int attributes; /* object attributes */
1201 obj_handle_t rootdir; /* root directory */
1202 VARARG(name,unicode_str); /* object name */
1203 @REPLY
1204 obj_handle_t handle; /* handle to the mutex */
1205 @END
1208 /* Query a mutex */
1209 @REQ(query_mutex)
1210 obj_handle_t handle; /* handle to mutex */
1211 @REPLY
1212 unsigned int count; /* current count of mutex */
1213 int owned; /* true if owned by current thread */
1214 int abandoned; /* true if abandoned */
1215 @END
1218 /* Create a semaphore */
1219 @REQ(create_semaphore)
1220 unsigned int access; /* wanted access rights */
1221 unsigned int initial; /* initial count */
1222 unsigned int max; /* maximum count */
1223 VARARG(objattr,object_attributes); /* object attributes */
1224 @REPLY
1225 obj_handle_t handle; /* handle to the semaphore */
1226 @END
1229 /* Release a semaphore */
1230 @REQ(release_semaphore)
1231 obj_handle_t handle; /* handle to the semaphore */
1232 unsigned int count; /* count to add to semaphore */
1233 @REPLY
1234 unsigned int prev_count; /* previous semaphore count */
1235 @END
1237 @REQ(query_semaphore)
1238 obj_handle_t handle; /* handle to the semaphore */
1239 @REPLY
1240 unsigned int current; /* current count */
1241 unsigned int max; /* maximum count */
1242 @END
1244 /* Open a semaphore */
1245 @REQ(open_semaphore)
1246 unsigned int access; /* wanted access rights */
1247 unsigned int attributes; /* object attributes */
1248 obj_handle_t rootdir; /* root directory */
1249 VARARG(name,unicode_str); /* object name */
1250 @REPLY
1251 obj_handle_t handle; /* handle to the semaphore */
1252 @END
1255 /* Create a file */
1256 @REQ(create_file)
1257 unsigned int access; /* wanted access rights */
1258 unsigned int sharing; /* sharing flags */
1259 int create; /* file create action */
1260 unsigned int options; /* file options */
1261 unsigned int attrs; /* file attributes for creation */
1262 VARARG(objattr,object_attributes); /* object attributes */
1263 VARARG(filename,string); /* file name */
1264 @REPLY
1265 obj_handle_t handle; /* handle to the file */
1266 @END
1269 /* Open a file object */
1270 @REQ(open_file_object)
1271 unsigned int access; /* wanted access rights */
1272 unsigned int attributes; /* open attributes */
1273 obj_handle_t rootdir; /* root directory */
1274 unsigned int sharing; /* sharing flags */
1275 unsigned int options; /* file options */
1276 VARARG(filename,unicode_str); /* file name */
1277 @REPLY
1278 obj_handle_t handle; /* handle to the file */
1279 @END
1282 /* Allocate a file handle for a Unix fd */
1283 @REQ(alloc_file_handle)
1284 unsigned int access; /* wanted access rights */
1285 unsigned int attributes; /* object attributes */
1286 int fd; /* file descriptor on the client side */
1287 @REPLY
1288 obj_handle_t handle; /* handle to the file */
1289 @END
1292 /* Get the Unix name from a file handle */
1293 @REQ(get_handle_unix_name)
1294 obj_handle_t handle; /* file handle */
1295 @REPLY
1296 data_size_t name_len; /* unix name length */
1297 VARARG(name,string); /* unix name */
1298 @END
1301 /* Get a Unix fd to access a file */
1302 @REQ(get_handle_fd)
1303 obj_handle_t handle; /* handle to the file */
1304 @REPLY
1305 int type; /* file type (see below) */
1306 int cacheable; /* can fd be cached in the client? */
1307 unsigned int access; /* file access rights */
1308 unsigned int options; /* file open options */
1309 @END
1310 enum server_fd_type
1312 FD_TYPE_INVALID, /* invalid file (no associated fd) */
1313 FD_TYPE_FILE, /* regular file */
1314 FD_TYPE_DIR, /* directory */
1315 FD_TYPE_SOCKET, /* socket */
1316 FD_TYPE_SERIAL, /* serial port */
1317 FD_TYPE_PIPE, /* named pipe */
1318 FD_TYPE_MAILSLOT, /* mailslot */
1319 FD_TYPE_CHAR, /* unspecified char device */
1320 FD_TYPE_DEVICE, /* Windows device file */
1321 FD_TYPE_NB_TYPES
1325 /* Retrieve (or allocate) the client-side directory cache entry */
1326 @REQ(get_directory_cache_entry)
1327 obj_handle_t handle; /* handle to the directory */
1328 @REPLY
1329 int entry; /* cache entry on the client side */
1330 VARARG(free,ints); /* entries that can be freed */
1331 @END
1334 /* Flush a file buffers */
1335 @REQ(flush)
1336 async_data_t async; /* async I/O parameters */
1337 @REPLY
1338 obj_handle_t event; /* event set when finished */
1339 @END
1341 /* Query file information */
1342 @REQ(get_file_info)
1343 obj_handle_t handle; /* handle to the file */
1344 unsigned int info_class; /* queried information class */
1345 @REPLY
1346 VARARG(data,bytes); /* file info data */
1347 @END
1349 /* Query volume information */
1350 @REQ(get_volume_info)
1351 obj_handle_t handle; /* handle to the file */
1352 unsigned int info_class; /* queried information class */
1353 @REPLY
1354 VARARG(data,bytes); /* volume info data */
1355 @END
1357 /* Lock a region of a file */
1358 @REQ(lock_file)
1359 obj_handle_t handle; /* handle to the file */
1360 file_pos_t offset; /* offset of start of lock */
1361 file_pos_t count; /* count of bytes to lock */
1362 int shared; /* shared or exclusive lock? */
1363 int wait; /* do we want to wait? */
1364 @REPLY
1365 obj_handle_t handle; /* handle to wait on */
1366 int overlapped; /* is it an overlapped I/O handle? */
1367 @END
1370 /* Unlock a region of a file */
1371 @REQ(unlock_file)
1372 obj_handle_t handle; /* handle to the file */
1373 file_pos_t offset; /* offset of start of unlock */
1374 file_pos_t count; /* count of bytes to unlock */
1375 @END
1378 /* Create a socket */
1379 @REQ(create_socket)
1380 unsigned int access; /* wanted access rights */
1381 unsigned int attributes; /* object attributes */
1382 int family; /* family, see socket manpage */
1383 int type; /* type, see socket manpage */
1384 int protocol; /* protocol, see socket manpage */
1385 unsigned int flags; /* socket flags */
1386 @REPLY
1387 obj_handle_t handle; /* handle to the new socket */
1388 @END
1391 /* Accept a socket */
1392 @REQ(accept_socket)
1393 obj_handle_t lhandle; /* handle to the listening socket */
1394 unsigned int access; /* wanted access rights */
1395 unsigned int attributes; /* object attributes */
1396 @REPLY
1397 obj_handle_t handle; /* handle to the new socket */
1398 @END
1401 /* Accept into an initialized socket */
1402 @REQ(accept_into_socket)
1403 obj_handle_t lhandle; /* handle to the listening socket */
1404 obj_handle_t ahandle; /* handle to the accepting socket */
1405 @END
1408 /* Set socket event parameters */
1409 @REQ(set_socket_event)
1410 obj_handle_t handle; /* handle to the socket */
1411 unsigned int mask; /* event mask */
1412 obj_handle_t event; /* event object */
1413 user_handle_t window; /* window to send the message to */
1414 unsigned int msg; /* message to send */
1415 @END
1418 /* Get socket event parameters */
1419 @REQ(get_socket_event)
1420 obj_handle_t handle; /* handle to the socket */
1421 int service; /* clear pending? */
1422 obj_handle_t c_event; /* event to clear */
1423 @REPLY
1424 unsigned int mask; /* event mask */
1425 unsigned int pmask; /* pending events */
1426 unsigned int state; /* status bits */
1427 VARARG(errors,ints); /* event errors */
1428 @END
1431 /* Get socket info */
1432 @REQ(get_socket_info)
1433 obj_handle_t handle; /* handle to the socket */
1434 @REPLY
1435 int family; /* family, see socket manpage */
1436 int type; /* type, see socket manpage */
1437 int protocol; /* protocol, see socket manpage */
1438 @END
1441 /* Re-enable pending socket events */
1442 @REQ(enable_socket_event)
1443 obj_handle_t handle; /* handle to the socket */
1444 unsigned int mask; /* events to re-enable */
1445 unsigned int sstate; /* status bits to set */
1446 unsigned int cstate; /* status bits to clear */
1447 @END
1449 @REQ(set_socket_deferred)
1450 obj_handle_t handle; /* handle to the socket */
1451 obj_handle_t deferred; /* handle to the socket for which accept() is deferred */
1452 @END
1454 /* Allocate a console (only used by a console renderer) */
1455 @REQ(alloc_console)
1456 unsigned int access; /* wanted access rights */
1457 unsigned int attributes; /* object attributes */
1458 process_id_t pid; /* pid of process which shall be attached to the console */
1459 int input_fd; /* if pid=-1 (bare console to current process), fd for input */
1460 @REPLY
1461 obj_handle_t handle_in; /* handle to console input */
1462 obj_handle_t event; /* handle to renderer events change notification */
1463 @END
1466 /* Free the console of the current process */
1467 @REQ(free_console)
1468 @END
1471 #define CONSOLE_RENDERER_NONE_EVENT 0x00
1472 #define CONSOLE_RENDERER_TITLE_EVENT 0x01
1473 #define CONSOLE_RENDERER_ACTIVE_SB_EVENT 0x02
1474 #define CONSOLE_RENDERER_SB_RESIZE_EVENT 0x03
1475 #define CONSOLE_RENDERER_UPDATE_EVENT 0x04
1476 #define CONSOLE_RENDERER_CURSOR_POS_EVENT 0x05
1477 #define CONSOLE_RENDERER_CURSOR_GEOM_EVENT 0x06
1478 #define CONSOLE_RENDERER_DISPLAY_EVENT 0x07
1479 #define CONSOLE_RENDERER_EXIT_EVENT 0x08
1480 struct console_renderer_event
1482 short event;
1483 union
1485 struct
1487 short top;
1488 short bottom;
1489 } update;
1490 struct
1492 short width;
1493 short height;
1494 } resize;
1495 struct
1497 short x;
1498 short y;
1499 } cursor_pos;
1500 struct
1502 short visible;
1503 short size;
1504 } cursor_geom;
1505 struct
1507 short left;
1508 short top;
1509 short width;
1510 short height;
1511 } display;
1512 } u;
1515 /* retrieve console events for the renderer */
1516 @REQ(get_console_renderer_events)
1517 obj_handle_t handle; /* handle to console input events */
1518 @REPLY
1519 VARARG(data,bytes); /* the various console_renderer_events */
1520 @END
1523 /* Open a handle to the process console */
1524 @REQ(open_console)
1525 obj_handle_t from; /* 0 (resp 1) input (resp output) of current process console */
1526 /* otherwise console_in handle to get active screen buffer? */
1527 unsigned int access; /* wanted access rights */
1528 unsigned int attributes; /* object attributes */
1529 int share; /* share mask (only for output handles) */
1530 @REPLY
1531 obj_handle_t handle; /* handle to the console */
1532 @END
1535 /* Attach to a other process's console */
1536 @REQ(attach_console)
1537 process_id_t pid; /* pid of attached console process */
1538 @REPLY
1539 obj_handle_t std_in; /* attached stdin */
1540 obj_handle_t std_out; /* attached stdout */
1541 obj_handle_t std_err; /* attached stderr */
1542 @END
1545 /* Get the input queue wait event */
1546 @REQ(get_console_wait_event)
1547 obj_handle_t handle; /* handle to the console */
1548 @REPLY
1549 obj_handle_t event;
1550 @END
1552 /* Get a console mode (input or output) */
1553 @REQ(get_console_mode)
1554 obj_handle_t handle; /* handle to the console */
1555 @REPLY
1556 int mode; /* console mode */
1557 @END
1560 /* Set a console mode (input or output) */
1561 @REQ(set_console_mode)
1562 obj_handle_t handle; /* handle to the console */
1563 int mode; /* console mode */
1564 @END
1567 /* Set info about a console (input only) */
1568 @REQ(set_console_input_info)
1569 obj_handle_t handle; /* handle to console input, or 0 for process' console */
1570 int mask; /* setting mask (see below) */
1571 obj_handle_t active_sb; /* active screen buffer */
1572 int history_mode; /* whether we duplicate lines in history */
1573 int history_size; /* number of lines in history */
1574 int edition_mode; /* index to the edition mode flavors */
1575 int input_cp; /* console input codepage */
1576 int output_cp; /* console output codepage */
1577 user_handle_t win; /* console window if backend supports it */
1578 VARARG(title,unicode_str); /* console title */
1579 @END
1580 #define SET_CONSOLE_INPUT_INFO_ACTIVE_SB 0x01
1581 #define SET_CONSOLE_INPUT_INFO_TITLE 0x02
1582 #define SET_CONSOLE_INPUT_INFO_HISTORY_MODE 0x04
1583 #define SET_CONSOLE_INPUT_INFO_HISTORY_SIZE 0x08
1584 #define SET_CONSOLE_INPUT_INFO_EDITION_MODE 0x10
1585 #define SET_CONSOLE_INPUT_INFO_INPUT_CODEPAGE 0x20
1586 #define SET_CONSOLE_INPUT_INFO_OUTPUT_CODEPAGE 0x40
1587 #define SET_CONSOLE_INPUT_INFO_WIN 0x80
1590 /* Get info about a console (input only) */
1591 @REQ(get_console_input_info)
1592 obj_handle_t handle; /* handle to console input, or 0 for process' console */
1593 @REPLY
1594 int history_mode; /* whether we duplicate lines in history */
1595 int history_size; /* number of lines in history */
1596 int history_index; /* number of used lines in history */
1597 int edition_mode; /* index to the edition mode flavors */
1598 int input_cp; /* console input codepage */
1599 int output_cp; /* console output codepage */
1600 user_handle_t win; /* console window if backend supports it */
1601 VARARG(title,unicode_str); /* console title */
1602 @END
1605 /* appends a string to console's history */
1606 @REQ(append_console_input_history)
1607 obj_handle_t handle; /* handle to console input, or 0 for process' console */
1608 VARARG(line,unicode_str); /* line to add */
1609 @END
1612 /* appends a string to console's history */
1613 @REQ(get_console_input_history)
1614 obj_handle_t handle; /* handle to console input, or 0 for process' console */
1615 int index; /* index to get line from */
1616 @REPLY
1617 int total; /* total length of line in Unicode chars */
1618 VARARG(line,unicode_str); /* line to add */
1619 @END
1622 /* creates a new screen buffer on process' console */
1623 @REQ(create_console_output)
1624 obj_handle_t handle_in; /* handle to console input, or 0 for process' console */
1625 unsigned int access; /* wanted access rights */
1626 unsigned int attributes; /* object attributes */
1627 unsigned int share; /* sharing credentials */
1628 int fd; /* for bare consoles, fd the screen-buffer is attached to */
1629 @REPLY
1630 obj_handle_t handle_out; /* handle to the screen buffer */
1631 @END
1634 /* Set info about a console (output only) */
1635 @REQ(set_console_output_info)
1636 obj_handle_t handle; /* handle to the console */
1637 int mask; /* setting mask (see below) */
1638 short int cursor_size; /* size of cursor (percentage filled) */
1639 short int cursor_visible;/* cursor visibility flag */
1640 short int cursor_x; /* position of cursor (x, y) */
1641 short int cursor_y;
1642 short int width; /* width of the screen buffer */
1643 short int height; /* height of the screen buffer */
1644 short int attr; /* default fill attributes (screen colors) */
1645 short int popup_attr; /* pop-up color attributes */
1646 short int win_left; /* window actually displayed by renderer */
1647 short int win_top; /* the rect area is expressed within the */
1648 short int win_right; /* boundaries of the screen buffer */
1649 short int win_bottom;
1650 short int max_width; /* maximum size (width x height) for the window */
1651 short int max_height;
1652 short int font_width; /* font size (width x height) */
1653 short int font_height;
1654 short int font_weight; /* font weight */
1655 short int font_pitch_family; /* font pitch & family */
1656 VARARG(colors,uints,64); /* color table */
1657 VARARG(face_name,unicode_str); /* font face name */
1658 @END
1659 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_GEOM 0x0001
1660 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_POS 0x0002
1661 #define SET_CONSOLE_OUTPUT_INFO_SIZE 0x0004
1662 #define SET_CONSOLE_OUTPUT_INFO_ATTR 0x0008
1663 #define SET_CONSOLE_OUTPUT_INFO_DISPLAY_WINDOW 0x0010
1664 #define SET_CONSOLE_OUTPUT_INFO_MAX_SIZE 0x0020
1665 #define SET_CONSOLE_OUTPUT_INFO_FONT 0x0040
1666 #define SET_CONSOLE_OUTPUT_INFO_COLORTABLE 0x0080
1667 #define SET_CONSOLE_OUTPUT_INFO_POPUP_ATTR 0x0100
1670 /* Get info about a console (output only) */
1671 @REQ(get_console_output_info)
1672 obj_handle_t handle; /* handle to the console */
1673 @REPLY
1674 short int cursor_size; /* size of cursor (percentage filled) */
1675 short int cursor_visible;/* cursor visibility flag */
1676 short int cursor_x; /* position of cursor (x, y) */
1677 short int cursor_y;
1678 short int width; /* width of the screen buffer */
1679 short int height; /* height of the screen buffer */
1680 short int attr; /* default fill attributes (screen colors) */
1681 short int popup_attr; /* pop-up color attributes */
1682 short int win_left; /* window actually displayed by renderer */
1683 short int win_top; /* the rect area is expressed within the */
1684 short int win_right; /* boundaries of the screen buffer */
1685 short int win_bottom;
1686 short int max_width; /* maximum size (width x height) for the window */
1687 short int max_height;
1688 short int font_width; /* font size (width x height) */
1689 short int font_height;
1690 short int font_weight; /* font weight */
1691 short int font_pitch_family; /* font pitch & family */
1692 VARARG(colors,uints,64); /* color table */
1693 VARARG(face_name,unicode_str); /* font face name */
1694 @END
1696 /* Add input records to a console input queue */
1697 @REQ(write_console_input)
1698 obj_handle_t handle; /* handle to the console input */
1699 VARARG(rec,input_records); /* input records */
1700 @REPLY
1701 int written; /* number of records written */
1702 @END
1705 /* Fetch input records from a console input queue */
1706 @REQ(read_console_input)
1707 obj_handle_t handle; /* handle to the console input */
1708 int flush; /* flush the retrieved records from the queue? */
1709 @REPLY
1710 int read; /* number of records read */
1711 VARARG(rec,input_records); /* input records */
1712 @END
1715 /* write data (chars and/or attributes) in a screen buffer */
1716 @REQ(write_console_output)
1717 obj_handle_t handle; /* handle to the console output */
1718 int x; /* position where to start writing */
1719 int y;
1720 int mode; /* char info (see below) */
1721 int wrap; /* wrap around at end of line? */
1722 VARARG(data,bytes); /* info to write */
1723 @REPLY
1724 int written; /* number of char infos actually written */
1725 int width; /* width of screen buffer */
1726 int height; /* height of screen buffer */
1727 @END
1728 enum char_info_mode
1730 CHAR_INFO_MODE_TEXT, /* characters only */
1731 CHAR_INFO_MODE_ATTR, /* attributes only */
1732 CHAR_INFO_MODE_TEXTATTR, /* both characters and attributes */
1733 CHAR_INFO_MODE_TEXTSTDATTR /* characters but use standard attributes */
1737 /* fill a screen buffer with constant data (chars and/or attributes) */
1738 @REQ(fill_console_output)
1739 obj_handle_t handle; /* handle to the console output */
1740 int x; /* position where to start writing */
1741 int y;
1742 int mode; /* char info mode */
1743 int count; /* number to write */
1744 int wrap; /* wrap around at end of line? */
1745 char_info_t data; /* data to write */
1746 @REPLY
1747 int written; /* number of char infos actually written */
1748 @END
1751 /* read data (chars and/or attributes) from a screen buffer */
1752 @REQ(read_console_output)
1753 obj_handle_t handle; /* handle to the console output */
1754 int x; /* position (x,y) where to start reading */
1755 int y;
1756 int mode; /* char info mode */
1757 int wrap; /* wrap around at end of line? */
1758 @REPLY
1759 int width; /* width of screen buffer */
1760 int height; /* height of screen buffer */
1761 VARARG(data,bytes);
1762 @END
1765 /* move a rect (of data) in screen buffer content */
1766 @REQ(move_console_output)
1767 obj_handle_t handle; /* handle to the console output */
1768 short int x_src; /* position (x, y) of rect to start moving from */
1769 short int y_src;
1770 short int x_dst; /* position (x, y) of rect to move to */
1771 short int y_dst;
1772 short int w; /* size of the rect (width, height) to move */
1773 short int h;
1774 @END
1777 /* Sends a signal to a process group */
1778 @REQ(send_console_signal)
1779 int signal; /* the signal to send */
1780 process_id_t group_id; /* the group to send the signal to */
1781 @END
1784 /* enable directory change notifications */
1785 @REQ(read_directory_changes)
1786 unsigned int filter; /* notification filter */
1787 int subtree; /* watch the subtree? */
1788 int want_data; /* flag indicating whether change data should be collected */
1789 async_data_t async; /* async I/O parameters */
1790 @END
1793 @REQ(read_change)
1794 obj_handle_t handle;
1795 @REPLY
1796 VARARG(events,filesystem_event); /* collected filesystem events */
1797 @END
1800 /* Create a file mapping */
1801 @REQ(create_mapping)
1802 unsigned int access; /* wanted access rights */
1803 unsigned int flags; /* SEC_* flags */
1804 unsigned int file_access; /* file access rights */
1805 mem_size_t size; /* mapping size */
1806 obj_handle_t file_handle; /* file handle */
1807 VARARG(objattr,object_attributes); /* object attributes */
1808 @REPLY
1809 obj_handle_t handle; /* handle to the mapping */
1810 @END
1813 /* Open a mapping */
1814 @REQ(open_mapping)
1815 unsigned int access; /* wanted access rights */
1816 unsigned int attributes; /* object attributes */
1817 obj_handle_t rootdir; /* root directory */
1818 VARARG(name,unicode_str); /* object name */
1819 @REPLY
1820 obj_handle_t handle; /* handle to the mapping */
1821 @END
1824 /* Get information about a file mapping */
1825 @REQ(get_mapping_info)
1826 obj_handle_t handle; /* handle to the mapping */
1827 unsigned int access; /* wanted access rights */
1828 @REPLY
1829 mem_size_t size; /* mapping size */
1830 unsigned int flags; /* SEC_* flags */
1831 obj_handle_t shared_file; /* shared mapping file handle */
1832 VARARG(image,pe_image_info);/* image info for SEC_IMAGE mappings */
1833 @END
1836 /* Add a memory view in the current process */
1837 @REQ(map_view)
1838 obj_handle_t mapping; /* file mapping handle */
1839 unsigned int access; /* wanted access rights */
1840 client_ptr_t base; /* view base address (page-aligned) */
1841 mem_size_t size; /* view size */
1842 file_pos_t start; /* start offset in mapping */
1843 @END
1846 /* Unmap a memory view from the current process */
1847 @REQ(unmap_view)
1848 client_ptr_t base; /* view base address */
1849 @END
1852 /* Get a range of committed pages in a file mapping */
1853 @REQ(get_mapping_committed_range)
1854 client_ptr_t base; /* view base address */
1855 file_pos_t offset; /* starting offset (page-aligned, in bytes) */
1856 @REPLY
1857 mem_size_t size; /* size of range starting at offset (page-aligned, in bytes) */
1858 int committed; /* whether it is a committed range */
1859 @END
1862 /* Add a range to the committed pages in a file mapping */
1863 @REQ(add_mapping_committed_range)
1864 client_ptr_t base; /* view base address */
1865 file_pos_t offset; /* starting offset (page-aligned, in bytes) */
1866 mem_size_t size; /* size to set (page-aligned, in bytes) or 0 if only retrieving */
1867 @END
1870 /* Check if two memory maps are for the same file */
1871 @REQ(is_same_mapping)
1872 client_ptr_t base1; /* first view base address */
1873 client_ptr_t base2; /* second view base address */
1874 @END
1877 #define SNAP_PROCESS 0x00000001
1878 #define SNAP_THREAD 0x00000002
1879 /* Create a snapshot */
1880 @REQ(create_snapshot)
1881 unsigned int attributes; /* object attributes */
1882 unsigned int flags; /* snapshot flags (SNAP_*) */
1883 @REPLY
1884 obj_handle_t handle; /* handle to the snapshot */
1885 @END
1888 /* Get the next process from a snapshot */
1889 @REQ(next_process)
1890 obj_handle_t handle; /* handle to the snapshot */
1891 int reset; /* reset snapshot position? */
1892 @REPLY
1893 int count; /* process usage count */
1894 process_id_t pid; /* process id */
1895 process_id_t ppid; /* parent process id */
1896 int threads; /* number of threads */
1897 int priority; /* process priority */
1898 int handles; /* number of handles */
1899 int unix_pid; /* Unix pid */
1900 VARARG(filename,unicode_str); /* file name of main exe */
1901 @END
1904 /* Get the next thread from a snapshot */
1905 @REQ(next_thread)
1906 obj_handle_t handle; /* handle to the snapshot */
1907 int reset; /* reset snapshot position? */
1908 @REPLY
1909 int count; /* thread usage count */
1910 process_id_t pid; /* process id */
1911 thread_id_t tid; /* thread id */
1912 int base_pri; /* base priority */
1913 int delta_pri; /* delta priority */
1914 @END
1917 /* Wait for a debug event */
1918 @REQ(wait_debug_event)
1919 int get_handle; /* should we alloc a handle for waiting? */
1920 @REPLY
1921 process_id_t pid; /* process id */
1922 thread_id_t tid; /* thread id */
1923 obj_handle_t wait; /* wait handle if no event ready */
1924 VARARG(event,debug_event); /* debug event data */
1925 @END
1928 /* Queue an exception event */
1929 @REQ(queue_exception_event)
1930 int first; /* first chance exception? */
1931 unsigned int code; /* exception code */
1932 unsigned int flags; /* exception flags */
1933 client_ptr_t record; /* exception record */
1934 client_ptr_t address; /* exception address */
1935 data_size_t len; /* size of parameters */
1936 VARARG(params,uints64,len);/* exception parameters */
1937 @REPLY
1938 obj_handle_t handle; /* handle to the queued event */
1939 @END
1942 /* Retrieve the status of an exception event */
1943 @REQ(get_exception_status)
1944 obj_handle_t handle; /* handle to the queued event */
1945 @END
1948 /* Continue a debug event */
1949 @REQ(continue_debug_event)
1950 process_id_t pid; /* process id to continue */
1951 thread_id_t tid; /* thread id to continue */
1952 int status; /* continuation status */
1953 @END
1956 /* Start/stop debugging an existing process */
1957 @REQ(debug_process)
1958 process_id_t pid; /* id of the process to debug */
1959 int attach; /* 1=attaching / 0=detaching from the process */
1960 @END
1963 /* Set debugger kill on exit flag */
1964 @REQ(set_debugger_kill_on_exit)
1965 int kill_on_exit; /* 0=detach/1=kill debuggee when debugger dies */
1966 @END
1969 /* Read data from a process address space */
1970 @REQ(read_process_memory)
1971 obj_handle_t handle; /* process handle */
1972 client_ptr_t addr; /* addr to read from */
1973 @REPLY
1974 VARARG(data,bytes); /* result data */
1975 @END
1978 /* Write data to a process address space */
1979 @REQ(write_process_memory)
1980 obj_handle_t handle; /* process handle */
1981 client_ptr_t addr; /* addr to write to */
1982 VARARG(data,bytes); /* data to write */
1983 @END
1986 /* Create a registry key */
1987 @REQ(create_key)
1988 unsigned int access; /* desired access rights */
1989 unsigned int options; /* creation options */
1990 VARARG(objattr,object_attributes); /* object attributes */
1991 VARARG(class,unicode_str); /* class name */
1992 @REPLY
1993 obj_handle_t hkey; /* handle to the created key */
1994 int created; /* has it been newly created? */
1995 @END
1997 /* Open a registry key */
1998 @REQ(open_key)
1999 obj_handle_t parent; /* handle to the parent key */
2000 unsigned int access; /* desired access rights */
2001 unsigned int attributes; /* object attributes */
2002 VARARG(name,unicode_str); /* key name */
2003 @REPLY
2004 obj_handle_t hkey; /* handle to the open key */
2005 @END
2008 /* Delete a registry key */
2009 @REQ(delete_key)
2010 obj_handle_t hkey; /* handle to the key */
2011 @END
2014 /* Flush a registry key */
2015 @REQ(flush_key)
2016 obj_handle_t hkey; /* handle to the key */
2017 @END
2020 /* Enumerate registry subkeys */
2021 @REQ(enum_key)
2022 obj_handle_t hkey; /* handle to registry key */
2023 int index; /* index of subkey (or -1 for current key) */
2024 int info_class; /* requested information class */
2025 @REPLY
2026 int subkeys; /* number of subkeys */
2027 int max_subkey; /* longest subkey name */
2028 int max_class; /* longest class name */
2029 int values; /* number of values */
2030 int max_value; /* longest value name */
2031 int max_data; /* longest value data */
2032 timeout_t modif; /* last modification time */
2033 data_size_t total; /* total length needed for full name and class */
2034 data_size_t namelen; /* length of key name in bytes */
2035 VARARG(name,unicode_str,namelen); /* key name */
2036 VARARG(class,unicode_str); /* class name */
2037 @END
2040 /* Set a value of a registry key */
2041 @REQ(set_key_value)
2042 obj_handle_t hkey; /* handle to registry key */
2043 int type; /* value type */
2044 data_size_t namelen; /* length of value name in bytes */
2045 VARARG(name,unicode_str,namelen); /* value name */
2046 VARARG(data,bytes); /* value data */
2047 @END
2050 /* Retrieve the value of a registry key */
2051 @REQ(get_key_value)
2052 obj_handle_t hkey; /* handle to registry key */
2053 VARARG(name,unicode_str); /* value name */
2054 @REPLY
2055 int type; /* value type */
2056 data_size_t total; /* total length needed for data */
2057 VARARG(data,bytes); /* value data */
2058 @END
2061 /* Enumerate a value of a registry key */
2062 @REQ(enum_key_value)
2063 obj_handle_t hkey; /* handle to registry key */
2064 int index; /* value index */
2065 int info_class; /* requested information class */
2066 @REPLY
2067 int type; /* value type */
2068 data_size_t total; /* total length needed for full name and data */
2069 data_size_t namelen; /* length of value name in bytes */
2070 VARARG(name,unicode_str,namelen); /* value name */
2071 VARARG(data,bytes); /* value data */
2072 @END
2075 /* Delete a value of a registry key */
2076 @REQ(delete_key_value)
2077 obj_handle_t hkey; /* handle to registry key */
2078 VARARG(name,unicode_str); /* value name */
2079 @END
2082 /* Load a registry branch from a file */
2083 @REQ(load_registry)
2084 obj_handle_t file; /* file to load from */
2085 VARARG(objattr,object_attributes); /* object attributes */
2086 @END
2089 /* UnLoad a registry branch from a file */
2090 @REQ(unload_registry)
2091 obj_handle_t hkey; /* root key to unload to */
2092 @END
2095 /* Save a registry branch to a file */
2096 @REQ(save_registry)
2097 obj_handle_t hkey; /* key to save */
2098 obj_handle_t file; /* file to save to */
2099 @END
2102 /* Add a registry key change notification */
2103 @REQ(set_registry_notification)
2104 obj_handle_t hkey; /* key to watch for changes */
2105 obj_handle_t event; /* event to set */
2106 int subtree; /* should we watch the whole subtree? */
2107 unsigned int filter; /* things to watch */
2108 @END
2111 /* Create a waitable timer */
2112 @REQ(create_timer)
2113 unsigned int access; /* wanted access rights */
2114 int manual; /* manual reset */
2115 VARARG(objattr,object_attributes); /* object attributes */
2116 @REPLY
2117 obj_handle_t handle; /* handle to the timer */
2118 @END
2121 /* Open a waitable timer */
2122 @REQ(open_timer)
2123 unsigned int access; /* wanted access rights */
2124 unsigned int attributes; /* object attributes */
2125 obj_handle_t rootdir; /* root directory */
2126 VARARG(name,unicode_str); /* object name */
2127 @REPLY
2128 obj_handle_t handle; /* handle to the timer */
2129 @END
2131 /* Set a waitable timer */
2132 @REQ(set_timer)
2133 obj_handle_t handle; /* handle to the timer */
2134 timeout_t expire; /* next expiration absolute time */
2135 client_ptr_t callback; /* callback function */
2136 client_ptr_t arg; /* callback argument */
2137 int period; /* timer period in ms */
2138 @REPLY
2139 int signaled; /* was the timer signaled before this call ? */
2140 @END
2142 /* Cancel a waitable timer */
2143 @REQ(cancel_timer)
2144 obj_handle_t handle; /* handle to the timer */
2145 @REPLY
2146 int signaled; /* was the timer signaled before this calltime ? */
2147 @END
2149 /* Get information on a waitable timer */
2150 @REQ(get_timer_info)
2151 obj_handle_t handle; /* handle to the timer */
2152 @REPLY
2153 timeout_t when; /* absolute time when the timer next expires */
2154 int signaled; /* is the timer signaled? */
2155 @END
2158 /* Retrieve the current context of a thread */
2159 @REQ(get_thread_context)
2160 obj_handle_t handle; /* thread or context handle */
2161 unsigned int flags; /* context flags */
2162 @REPLY
2163 int self; /* was it a handle to the current thread? */
2164 obj_handle_t handle; /* pending context handle */
2165 VARARG(context,context); /* thread context */
2166 @END
2169 /* Set the current context of a thread */
2170 @REQ(set_thread_context)
2171 obj_handle_t handle; /* thread handle */
2172 VARARG(context,context); /* thread context */
2173 @REPLY
2174 int self; /* was it a handle to the current thread? */
2175 @END
2178 /* Fetch a selector entry for a thread */
2179 @REQ(get_selector_entry)
2180 obj_handle_t handle; /* thread handle */
2181 int entry; /* LDT entry */
2182 @REPLY
2183 unsigned int base; /* selector base */
2184 unsigned int limit; /* selector limit */
2185 unsigned char flags; /* selector flags */
2186 @END
2189 /* Add an atom */
2190 @REQ(add_atom)
2191 obj_handle_t table; /* which table to add atom to */
2192 VARARG(name,unicode_str); /* atom name */
2193 @REPLY
2194 atom_t atom; /* resulting atom */
2195 @END
2198 /* Delete an atom */
2199 @REQ(delete_atom)
2200 obj_handle_t table; /* which table to delete atom from */
2201 atom_t atom; /* atom handle */
2202 @END
2205 /* Find an atom */
2206 @REQ(find_atom)
2207 obj_handle_t table; /* which table to find atom from */
2208 VARARG(name,unicode_str); /* atom name */
2209 @REPLY
2210 atom_t atom; /* atom handle */
2211 @END
2214 /* Get information about an atom */
2215 @REQ(get_atom_information)
2216 obj_handle_t table; /* which table to find atom from */
2217 atom_t atom; /* atom handle */
2218 @REPLY
2219 int count; /* atom lock count */
2220 int pinned; /* whether the atom has been pinned */
2221 data_size_t total; /* actual length of atom name */
2222 VARARG(name,unicode_str); /* atom name */
2223 @END
2226 /* Set information about an atom */
2227 @REQ(set_atom_information)
2228 obj_handle_t table; /* which table to find atom from */
2229 atom_t atom; /* atom handle */
2230 int pinned; /* whether to bump atom information */
2231 @END
2234 /* Empty an atom table */
2235 @REQ(empty_atom_table)
2236 obj_handle_t table; /* which table to find atom from */
2237 int if_pinned; /* whether to delete pinned atoms */
2238 @END
2241 /* Init an atom table */
2242 @REQ(init_atom_table)
2243 int entries; /* number of entries (only for local) */
2244 @REPLY
2245 obj_handle_t table; /* handle to the atom table */
2246 @END
2249 /* Get the message queue of the current thread */
2250 @REQ(get_msg_queue)
2251 @REPLY
2252 obj_handle_t handle; /* handle to the queue */
2253 @END
2256 /* Set the file descriptor associated to the current thread queue */
2257 @REQ(set_queue_fd)
2258 obj_handle_t handle; /* handle to the file descriptor */
2259 @END
2262 /* Set the current message queue wakeup mask */
2263 @REQ(set_queue_mask)
2264 unsigned int wake_mask; /* wakeup bits mask */
2265 unsigned int changed_mask; /* changed bits mask */
2266 int skip_wait; /* will we skip waiting if signaled? */
2267 @REPLY
2268 unsigned int wake_bits; /* current wake bits */
2269 unsigned int changed_bits; /* current changed bits */
2270 @END
2273 /* Get the current message queue status */
2274 @REQ(get_queue_status)
2275 unsigned int clear_bits; /* should we clear the change bits? */
2276 @REPLY
2277 unsigned int wake_bits; /* wake bits */
2278 unsigned int changed_bits; /* changed bits since last time */
2279 @END
2282 /* Retrieve the process idle event */
2283 @REQ(get_process_idle_event)
2284 obj_handle_t handle; /* process handle */
2285 @REPLY
2286 obj_handle_t event; /* handle to idle event */
2287 @END
2290 /* Send a message to a thread queue */
2291 @REQ(send_message)
2292 thread_id_t id; /* thread id */
2293 int type; /* message type (see below) */
2294 int flags; /* message flags (see below) */
2295 user_handle_t win; /* window handle */
2296 unsigned int msg; /* message code */
2297 lparam_t wparam; /* parameters */
2298 lparam_t lparam; /* parameters */
2299 timeout_t timeout; /* timeout for reply */
2300 VARARG(data,message_data); /* message data for sent messages */
2301 @END
2303 @REQ(post_quit_message)
2304 int exit_code; /* exit code to return */
2305 @END
2307 enum message_type
2309 MSG_ASCII, /* Ascii message (from SendMessageA) */
2310 MSG_UNICODE, /* Unicode message (from SendMessageW) */
2311 MSG_NOTIFY, /* notify message (from SendNotifyMessageW), always Unicode */
2312 MSG_CALLBACK, /* callback message (from SendMessageCallbackW), always Unicode */
2313 MSG_CALLBACK_RESULT,/* result of a callback message */
2314 MSG_OTHER_PROCESS, /* sent from other process, may include vararg data, always Unicode */
2315 MSG_POSTED, /* posted message (from PostMessageW), always Unicode */
2316 MSG_HARDWARE, /* hardware message */
2317 MSG_WINEVENT, /* winevent message */
2318 MSG_HOOK_LL /* low-level hardware hook */
2320 #define SEND_MSG_ABORT_IF_HUNG 0x01
2323 /* Send a hardware message to a thread queue */
2324 @REQ(send_hardware_message)
2325 user_handle_t win; /* window handle */
2326 hw_input_t input; /* input data */
2327 unsigned int flags; /* flags (see below) */
2328 @REPLY
2329 int wait; /* do we need to wait for a reply? */
2330 int prev_x; /* previous cursor position */
2331 int prev_y;
2332 int new_x; /* new cursor position */
2333 int new_y;
2334 VARARG(keystate,bytes); /* global state array for all the keys */
2335 @END
2336 #define SEND_HWMSG_INJECTED 0x01
2339 /* Get a message from the current queue */
2340 @REQ(get_message)
2341 unsigned int flags; /* PM_* flags */
2342 user_handle_t get_win; /* window handle to get */
2343 unsigned int get_first; /* first message code to get */
2344 unsigned int get_last; /* last message code to get */
2345 unsigned int hw_id; /* id of the previous hardware message (or 0) */
2346 unsigned int wake_mask; /* wakeup bits mask */
2347 unsigned int changed_mask; /* changed bits mask */
2348 @REPLY
2349 user_handle_t win; /* window handle */
2350 unsigned int msg; /* message code */
2351 lparam_t wparam; /* parameters */
2352 lparam_t lparam; /* parameters */
2353 int type; /* message type */
2354 int x; /* message x position */
2355 int y; /* message y position */
2356 unsigned int time; /* message time */
2357 unsigned int active_hooks; /* active hooks bitmap */
2358 data_size_t total; /* total size of extra data */
2359 VARARG(data,message_data); /* message data for sent messages */
2360 @END
2363 /* Reply to a sent message */
2364 @REQ(reply_message)
2365 int remove; /* should we remove the message? */
2366 lparam_t result; /* message result */
2367 VARARG(data,bytes); /* message data for sent messages */
2368 @END
2371 /* Accept the current hardware message */
2372 @REQ(accept_hardware_message)
2373 unsigned int hw_id; /* id of the hardware message */
2374 int remove; /* should we remove the message? */
2375 @END
2378 /* Retrieve the reply for the last message sent */
2379 @REQ(get_message_reply)
2380 int cancel; /* cancel message if not ready? */
2381 @REPLY
2382 lparam_t result; /* message result */
2383 VARARG(data,bytes); /* message data for sent messages */
2384 @END
2387 /* Set a window timer */
2388 @REQ(set_win_timer)
2389 user_handle_t win; /* window handle */
2390 unsigned int msg; /* message to post */
2391 unsigned int rate; /* timer rate in ms */
2392 lparam_t id; /* timer id */
2393 lparam_t lparam; /* message lparam (callback proc) */
2394 @REPLY
2395 lparam_t id; /* timer id */
2396 @END
2399 /* Kill a window timer */
2400 @REQ(kill_win_timer)
2401 user_handle_t win; /* window handle */
2402 lparam_t id; /* timer id */
2403 unsigned int msg; /* message to post */
2404 @END
2407 /* check if the thread owning the window is hung */
2408 @REQ(is_window_hung)
2409 user_handle_t win; /* window handle */
2410 @REPLY
2411 int is_hung;
2412 @END
2415 /* Retrieve info about a serial port */
2416 @REQ(get_serial_info)
2417 obj_handle_t handle; /* handle to comm port */
2418 int flags;
2419 @REPLY
2420 unsigned int eventmask;
2421 unsigned int cookie;
2422 unsigned int pending_write;
2423 @END
2426 /* Set info about a serial port */
2427 @REQ(set_serial_info)
2428 obj_handle_t handle; /* handle to comm port */
2429 int flags; /* bitmask to set values (see below) */
2430 @END
2431 #define SERIALINFO_PENDING_WRITE 0x04
2432 #define SERIALINFO_PENDING_WAIT 0x08
2435 /* Create an async I/O */
2436 @REQ(register_async)
2437 int type; /* type of queue to look after */
2438 async_data_t async; /* async I/O parameters */
2439 int count; /* count - usually # of bytes to be read/written */
2440 @END
2441 #define ASYNC_TYPE_READ 0x01
2442 #define ASYNC_TYPE_WRITE 0x02
2443 #define ASYNC_TYPE_WAIT 0x03
2446 /* Cancel all async op on a fd */
2447 @REQ(cancel_async)
2448 obj_handle_t handle; /* handle to comm port, socket or file */
2449 client_ptr_t iosb; /* I/O status block (NULL=all) */
2450 int only_thread; /* cancel matching this thread */
2451 @END
2454 /* Retrieve results of an async */
2455 @REQ(get_async_result)
2456 client_ptr_t user_arg; /* user arg used to identify async */
2457 @REPLY
2458 data_size_t size; /* result size (input or output depending on the operation) */
2459 VARARG(out_data,bytes); /* iosb output data */
2460 @END
2463 /* Perform a read on a file object */
2464 @REQ(read)
2465 async_data_t async; /* async I/O parameters */
2466 file_pos_t pos; /* read position */
2467 @REPLY
2468 obj_handle_t wait; /* handle to wait on for blocking read */
2469 unsigned int options; /* device open options */
2470 VARARG(data,bytes); /* read data */
2471 @END
2474 /* Perform a write on a file object */
2475 @REQ(write)
2476 async_data_t async; /* async I/O parameters */
2477 file_pos_t pos; /* write position */
2478 VARARG(data,bytes); /* write data */
2479 @REPLY
2480 obj_handle_t wait; /* handle to wait on for blocking write */
2481 unsigned int options; /* device open options */
2482 data_size_t size; /* size written */
2483 @END
2486 /* Perform an ioctl on a file */
2487 @REQ(ioctl)
2488 ioctl_code_t code; /* ioctl code */
2489 async_data_t async; /* async I/O parameters */
2490 VARARG(in_data,bytes); /* ioctl input data */
2491 @REPLY
2492 obj_handle_t wait; /* handle to wait on for blocking ioctl */
2493 unsigned int options; /* device open options */
2494 VARARG(out_data,bytes); /* ioctl output data */
2495 @END
2498 /* Store results of an async irp */
2499 @REQ(set_irp_result)
2500 obj_handle_t handle; /* handle to the irp */
2501 unsigned int status; /* status of the irp */
2502 data_size_t size; /* result size (input or output depending on the operation) */
2503 VARARG(data,bytes); /* output data of the irp */
2504 @END
2507 /* Create a named pipe */
2508 @REQ(create_named_pipe)
2509 unsigned int access;
2510 unsigned int options;
2511 unsigned int sharing;
2512 unsigned int maxinstances;
2513 unsigned int outsize;
2514 unsigned int insize;
2515 timeout_t timeout;
2516 unsigned int flags;
2517 VARARG(objattr,object_attributes); /* object attributes */
2518 @REPLY
2519 obj_handle_t handle; /* handle to the pipe */
2520 @END
2522 /* flags in create_named_pipe and get_named_pipe_info */
2523 #define NAMED_PIPE_MESSAGE_STREAM_WRITE 0x0001
2524 #define NAMED_PIPE_MESSAGE_STREAM_READ 0x0002
2525 #define NAMED_PIPE_NONBLOCKING_MODE 0x0004
2526 #define NAMED_PIPE_SERVER_END 0x8000
2528 /* Set named pipe information by handle */
2529 @REQ(set_named_pipe_info)
2530 obj_handle_t handle;
2531 unsigned int flags;
2532 @END
2534 /* Create a window */
2535 @REQ(create_window)
2536 user_handle_t parent; /* parent window */
2537 user_handle_t owner; /* owner window */
2538 atom_t atom; /* class atom */
2539 mod_handle_t instance; /* module instance */
2540 int dpi; /* system DPI */
2541 int awareness; /* thread DPI awareness */
2542 VARARG(class,unicode_str); /* class name */
2543 @REPLY
2544 user_handle_t handle; /* created window */
2545 user_handle_t parent; /* full handle of parent */
2546 user_handle_t owner; /* full handle of owner */
2547 int extra; /* number of extra bytes */
2548 client_ptr_t class_ptr; /* pointer to class in client address space */
2549 int dpi; /* window DPI if not per-monitor aware */
2550 int awareness; /* window DPI awareness */
2551 @END
2554 /* Destroy a window */
2555 @REQ(destroy_window)
2556 user_handle_t handle; /* handle to the window */
2557 @END
2560 /* Retrieve the desktop window for the current thread */
2561 @REQ(get_desktop_window)
2562 int force; /* force creation if it doesn't exist */
2563 @REPLY
2564 user_handle_t top_window; /* handle to the desktop window */
2565 user_handle_t msg_window; /* handle to the top-level HWND_MESSAGE parent */
2566 @END
2569 /* Set a window owner */
2570 @REQ(set_window_owner)
2571 user_handle_t handle; /* handle to the window */
2572 user_handle_t owner; /* new owner */
2573 @REPLY
2574 user_handle_t full_owner; /* full handle of new owner */
2575 user_handle_t prev_owner; /* full handle of previous owner */
2576 @END
2579 /* Get information from a window handle */
2580 @REQ(get_window_info)
2581 user_handle_t handle; /* handle to the window */
2582 @REPLY
2583 user_handle_t full_handle; /* full 32-bit handle */
2584 user_handle_t last_active; /* last active popup */
2585 process_id_t pid; /* process owning the window */
2586 thread_id_t tid; /* thread owning the window */
2587 atom_t atom; /* class atom */
2588 int is_unicode; /* ANSI or unicode */
2589 int dpi; /* window DPI */
2590 int awareness; /* DPI awareness */
2591 @END
2594 /* Set some information in a window */
2595 @REQ(set_window_info)
2596 unsigned short flags; /* flags for fields to set (see below) */
2597 short int is_unicode; /* ANSI or unicode */
2598 user_handle_t handle; /* handle to the window */
2599 unsigned int style; /* window style */
2600 unsigned int ex_style; /* window extended style */
2601 unsigned int id; /* window id */
2602 mod_handle_t instance; /* creator instance */
2603 lparam_t user_data; /* user-specific data */
2604 int extra_offset; /* offset to set in extra bytes */
2605 data_size_t extra_size; /* size to set in extra bytes */
2606 lparam_t extra_value; /* value to set in extra bytes */
2607 @REPLY
2608 unsigned int old_style; /* old window style */
2609 unsigned int old_ex_style; /* old window extended style */
2610 mod_handle_t old_instance; /* old creator instance */
2611 lparam_t old_user_data; /* old user-specific data */
2612 lparam_t old_extra_value; /* old value in extra bytes */
2613 unsigned int old_id; /* old window id */
2614 @END
2615 #define SET_WIN_STYLE 0x01
2616 #define SET_WIN_EXSTYLE 0x02
2617 #define SET_WIN_ID 0x04
2618 #define SET_WIN_INSTANCE 0x08
2619 #define SET_WIN_USERDATA 0x10
2620 #define SET_WIN_EXTRA 0x20
2621 #define SET_WIN_UNICODE 0x40
2624 /* Set the parent of a window */
2625 @REQ(set_parent)
2626 user_handle_t handle; /* handle to the window */
2627 user_handle_t parent; /* handle to the parent */
2628 @REPLY
2629 user_handle_t old_parent; /* old parent window */
2630 user_handle_t full_parent; /* full handle of new parent */
2631 int dpi; /* new window DPI if not per-monitor aware */
2632 int awareness; /* new DPI awareness */
2633 @END
2636 /* Get a list of the window parents, up to the root of the tree */
2637 @REQ(get_window_parents)
2638 user_handle_t handle; /* handle to the window */
2639 @REPLY
2640 int count; /* total count of parents */
2641 VARARG(parents,user_handles); /* parent handles */
2642 @END
2645 /* Get a list of the window children */
2646 @REQ(get_window_children)
2647 obj_handle_t desktop; /* handle to desktop */
2648 user_handle_t parent; /* parent window */
2649 atom_t atom; /* class atom for the listed children */
2650 thread_id_t tid; /* thread owning the listed children */
2651 VARARG(class,unicode_str); /* class name */
2652 @REPLY
2653 int count; /* total count of children */
2654 VARARG(children,user_handles); /* children handles */
2655 @END
2658 /* Get a list of the window children that contain a given point */
2659 @REQ(get_window_children_from_point)
2660 user_handle_t parent; /* parent window */
2661 int x; /* point in parent coordinates */
2662 int y;
2663 int dpi; /* dpi for the point coordinates */
2664 @REPLY
2665 int count; /* total count of children */
2666 VARARG(children,user_handles); /* children handles */
2667 @END
2670 /* Get window tree information from a window handle */
2671 @REQ(get_window_tree)
2672 user_handle_t handle; /* handle to the window */
2673 @REPLY
2674 user_handle_t parent; /* parent window */
2675 user_handle_t owner; /* owner window */
2676 user_handle_t next_sibling; /* next sibling in Z-order */
2677 user_handle_t prev_sibling; /* prev sibling in Z-order */
2678 user_handle_t first_sibling; /* first sibling in Z-order */
2679 user_handle_t last_sibling; /* last sibling in Z-order */
2680 user_handle_t first_child; /* first child */
2681 user_handle_t last_child; /* last child */
2682 @END
2684 /* Set the position and Z order of a window */
2685 @REQ(set_window_pos)
2686 unsigned short swp_flags; /* SWP_* flags */
2687 unsigned short paint_flags; /* paint flags (see below) */
2688 user_handle_t handle; /* handle to the window */
2689 user_handle_t previous; /* previous window in Z order */
2690 rectangle_t window; /* window rectangle (in parent coords) */
2691 rectangle_t client; /* client rectangle (in parent coords) */
2692 VARARG(valid,rectangles); /* valid rectangles from WM_NCCALCSIZE (in parent coords) */
2693 @REPLY
2694 unsigned int new_style; /* new window style */
2695 unsigned int new_ex_style; /* new window extended style */
2696 user_handle_t surface_win; /* parent window that holds the surface */
2697 int needs_update; /* whether the surface region needs an update */
2698 @END
2699 #define SET_WINPOS_PAINT_SURFACE 0x01 /* window has a paintable surface */
2700 #define SET_WINPOS_PIXEL_FORMAT 0x02 /* window has a custom pixel format */
2702 /* Get the window and client rectangles of a window */
2703 @REQ(get_window_rectangles)
2704 user_handle_t handle; /* handle to the window */
2705 int relative; /* coords relative to (see below) */
2706 int dpi; /* DPI to map to, or zero for per-monitor DPI */
2707 @REPLY
2708 rectangle_t window; /* window rectangle */
2709 rectangle_t client; /* client rectangle */
2710 @END
2711 enum coords_relative
2713 COORDS_CLIENT, /* relative to client area */
2714 COORDS_WINDOW, /* relative to whole window area */
2715 COORDS_PARENT, /* relative to parent's client area */
2716 COORDS_SCREEN /* relative to screen origin */
2720 /* Get the window text */
2721 @REQ(get_window_text)
2722 user_handle_t handle; /* handle to the window */
2723 @REPLY
2724 data_size_t length; /* total length in WCHARs */
2725 VARARG(text,unicode_str); /* window text */
2726 @END
2729 /* Set the window text */
2730 @REQ(set_window_text)
2731 user_handle_t handle; /* handle to the window */
2732 VARARG(text,unicode_str); /* window text */
2733 @END
2736 /* Get the coordinates offset between two windows */
2737 @REQ(get_windows_offset)
2738 user_handle_t from; /* handle to the first window */
2739 user_handle_t to; /* handle to the second window */
2740 int dpi; /* DPI to map to, or zero for per-monitor DPI */
2741 @REPLY
2742 int x; /* x coordinate offset */
2743 int y; /* y coordinate offset */
2744 int mirror; /* whether to mirror the x coordinate */
2745 @END
2748 /* Get the visible region of a window */
2749 @REQ(get_visible_region)
2750 user_handle_t window; /* handle to the window */
2751 unsigned int flags; /* DCX flags */
2752 @REPLY
2753 user_handle_t top_win; /* top window to clip against */
2754 rectangle_t top_rect; /* top window visible rect with screen coords */
2755 rectangle_t win_rect; /* window rect in screen coords */
2756 unsigned int paint_flags; /* paint flags (from SET_WINPOS_* flags) */
2757 data_size_t total_size; /* total size of the resulting region */
2758 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2759 @END
2762 /* Get the visible surface region of a window */
2763 @REQ(get_surface_region)
2764 user_handle_t window; /* handle to the window */
2765 @REPLY
2766 rectangle_t visible_rect; /* window visible rect in screen coords */
2767 data_size_t total_size; /* total size of the resulting region */
2768 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2769 @END
2772 /* Get the window region */
2773 @REQ(get_window_region)
2774 user_handle_t window; /* handle to the window */
2775 @REPLY
2776 data_size_t total_size; /* total size of the resulting region */
2777 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2778 @END
2781 /* Set the window region */
2782 @REQ(set_window_region)
2783 user_handle_t window; /* handle to the window */
2784 int redraw; /* redraw the window? */
2785 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2786 @END
2789 /* Get the window update region */
2790 @REQ(get_update_region)
2791 user_handle_t window; /* handle to the window */
2792 user_handle_t from_child; /* child to start searching from */
2793 unsigned int flags; /* update flags (see below) */
2794 @REPLY
2795 user_handle_t child; /* child to repaint (or window itself) */
2796 unsigned int flags; /* resulting update flags (see below) */
2797 data_size_t total_size; /* total size of the resulting region */
2798 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2799 @END
2800 #define UPDATE_NONCLIENT 0x001 /* get region for repainting non-client area */
2801 #define UPDATE_ERASE 0x002 /* get region for erasing client area */
2802 #define UPDATE_PAINT 0x004 /* get region for painting client area */
2803 #define UPDATE_INTERNALPAINT 0x008 /* get region if internal paint is pending */
2804 #define UPDATE_ALLCHILDREN 0x010 /* force repaint of all children */
2805 #define UPDATE_NOCHILDREN 0x020 /* don't try to repaint any children */
2806 #define UPDATE_NOREGION 0x040 /* don't return a region, only the flags */
2807 #define UPDATE_DELAYED_ERASE 0x080 /* still needs erase after BeginPaint */
2808 #define UPDATE_CLIPCHILDREN 0x100 /* remove clipped children from the update region */
2811 /* Update the z order of a window so that a given rectangle is fully visible */
2812 @REQ(update_window_zorder)
2813 user_handle_t window; /* handle to the window */
2814 rectangle_t rect; /* rectangle that must be visible (in client coords) */
2815 @END
2818 /* Mark parts of a window as needing a redraw */
2819 @REQ(redraw_window)
2820 user_handle_t window; /* handle to the window */
2821 unsigned int flags; /* RDW_* flags */
2822 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2823 @END
2826 /* Set a window property */
2827 @REQ(set_window_property)
2828 user_handle_t window; /* handle to the window */
2829 lparam_t data; /* data to store */
2830 atom_t atom; /* property atom (if no name specified) */
2831 VARARG(name,unicode_str); /* property name */
2832 @END
2835 /* Remove a window property */
2836 @REQ(remove_window_property)
2837 user_handle_t window; /* handle to the window */
2838 atom_t atom; /* property atom (if no name specified) */
2839 VARARG(name,unicode_str); /* property name */
2840 @REPLY
2841 lparam_t data; /* data stored in property */
2842 @END
2845 /* Get a window property */
2846 @REQ(get_window_property)
2847 user_handle_t window; /* handle to the window */
2848 atom_t atom; /* property atom (if no name specified) */
2849 VARARG(name,unicode_str); /* property name */
2850 @REPLY
2851 lparam_t data; /* data stored in property */
2852 @END
2855 /* Get the list of properties of a window */
2856 @REQ(get_window_properties)
2857 user_handle_t window; /* handle to the window */
2858 @REPLY
2859 int total; /* total number of properties */
2860 VARARG(props,properties); /* list of properties */
2861 @END
2864 /* Create a window station */
2865 @REQ(create_winstation)
2866 unsigned int flags; /* window station flags */
2867 unsigned int access; /* wanted access rights */
2868 unsigned int attributes; /* object attributes */
2869 obj_handle_t rootdir; /* root directory */
2870 VARARG(name,unicode_str); /* object name */
2871 @REPLY
2872 obj_handle_t handle; /* handle to the window station */
2873 @END
2876 /* Open a handle to a window station */
2877 @REQ(open_winstation)
2878 unsigned int access; /* wanted access rights */
2879 unsigned int attributes; /* object attributes */
2880 obj_handle_t rootdir; /* root directory */
2881 VARARG(name,unicode_str); /* object name */
2882 @REPLY
2883 obj_handle_t handle; /* handle to the window station */
2884 @END
2887 /* Close a window station */
2888 @REQ(close_winstation)
2889 obj_handle_t handle; /* handle to the window station */
2890 @END
2893 /* Get the process current window station */
2894 @REQ(get_process_winstation)
2895 @REPLY
2896 obj_handle_t handle; /* handle to the window station */
2897 @END
2900 /* Set the process current window station */
2901 @REQ(set_process_winstation)
2902 obj_handle_t handle; /* handle to the window station */
2903 @END
2906 /* Enumerate window stations */
2907 @REQ(enum_winstation)
2908 unsigned int index; /* current index */
2909 @REPLY
2910 unsigned int next; /* next index */
2911 VARARG(name,unicode_str); /* window station name */
2912 @END
2915 /* Create a desktop */
2916 @REQ(create_desktop)
2917 unsigned int flags; /* desktop flags */
2918 unsigned int access; /* wanted access rights */
2919 unsigned int attributes; /* object attributes */
2920 VARARG(name,unicode_str); /* object name */
2921 @REPLY
2922 obj_handle_t handle; /* handle to the desktop */
2923 @END
2926 /* Open a handle to a desktop */
2927 @REQ(open_desktop)
2928 obj_handle_t winsta; /* window station to open (null allowed) */
2929 unsigned int flags; /* desktop flags */
2930 unsigned int access; /* wanted access rights */
2931 unsigned int attributes; /* object attributes */
2932 VARARG(name,unicode_str); /* object name */
2933 @REPLY
2934 obj_handle_t handle; /* handle to the desktop */
2935 @END
2938 /* Open a handle to current input desktop */
2939 @REQ(open_input_desktop)
2940 unsigned int flags; /* desktop flags */
2941 unsigned int access; /* wanted access rights */
2942 unsigned int attributes; /* object attributes */
2943 @REPLY
2944 obj_handle_t handle; /* handle to the desktop */
2945 @END
2948 /* Close a desktop */
2949 @REQ(close_desktop)
2950 obj_handle_t handle; /* handle to the desktop */
2951 @END
2954 /* Get the thread current desktop */
2955 @REQ(get_thread_desktop)
2956 thread_id_t tid; /* thread id */
2957 @REPLY
2958 obj_handle_t handle; /* handle to the desktop */
2959 @END
2962 /* Set the thread current desktop */
2963 @REQ(set_thread_desktop)
2964 obj_handle_t handle; /* handle to the desktop */
2965 @END
2968 /* Enumerate desktops */
2969 @REQ(enum_desktop)
2970 obj_handle_t winstation; /* handle to the window station */
2971 unsigned int index; /* current index */
2972 @REPLY
2973 unsigned int next; /* next index */
2974 VARARG(name,unicode_str); /* window station name */
2975 @END
2978 /* Get/set information about a user object (window station or desktop) */
2979 @REQ(set_user_object_info)
2980 obj_handle_t handle; /* handle to the object */
2981 unsigned int flags; /* information to set/get */
2982 unsigned int obj_flags; /* new object flags */
2983 @REPLY
2984 int is_desktop; /* is object a desktop? */
2985 unsigned int old_obj_flags; /* old object flags */
2986 VARARG(name,unicode_str); /* object name */
2987 @END
2988 #define SET_USER_OBJECT_SET_FLAGS 1
2989 #define SET_USER_OBJECT_GET_FULL_NAME 2
2992 /* Register a hotkey */
2993 @REQ(register_hotkey)
2994 user_handle_t window; /* handle to the window */
2995 int id; /* hotkey identifier */
2996 unsigned int flags; /* modifier keys */
2997 unsigned int vkey; /* virtual key code */
2998 @REPLY
2999 int replaced; /* did we replace an existing hotkey? */
3000 unsigned int flags; /* flags of replaced hotkey */
3001 unsigned int vkey; /* virtual key code of replaced hotkey */
3002 @END
3005 /* Unregister a hotkey */
3006 @REQ(unregister_hotkey)
3007 user_handle_t window; /* handle to the window */
3008 int id; /* hotkey identifier */
3009 @REPLY
3010 unsigned int flags; /* flags of removed hotkey */
3011 unsigned int vkey; /* virtual key code of removed hotkey */
3012 @END
3015 /* Attach (or detach) thread inputs */
3016 @REQ(attach_thread_input)
3017 thread_id_t tid_from; /* thread to be attached */
3018 thread_id_t tid_to; /* thread to which tid_from should be attached */
3019 int attach; /* is it an attach? */
3020 @END
3023 /* Get input data for a given thread */
3024 @REQ(get_thread_input)
3025 thread_id_t tid; /* id of thread */
3026 @REPLY
3027 user_handle_t focus; /* handle to the focus window */
3028 user_handle_t capture; /* handle to the capture window */
3029 user_handle_t active; /* handle to the active window */
3030 user_handle_t foreground; /* handle to the global foreground window */
3031 user_handle_t menu_owner; /* handle to the menu owner */
3032 user_handle_t move_size; /* handle to the moving/resizing window */
3033 user_handle_t caret; /* handle to the caret window */
3034 user_handle_t cursor; /* handle to the cursor */
3035 int show_count; /* cursor show count */
3036 rectangle_t rect; /* caret rectangle */
3037 @END
3040 /* Get the time of the last input event */
3041 @REQ(get_last_input_time)
3042 @REPLY
3043 unsigned int time;
3044 @END
3047 /* Retrieve queue keyboard state for a given thread */
3048 @REQ(get_key_state)
3049 thread_id_t tid; /* id of thread */
3050 int key; /* optional key code or -1 */
3051 @REPLY
3052 unsigned char state; /* state of specified key */
3053 VARARG(keystate,bytes); /* state array for all the keys */
3054 @END
3056 /* Set queue keyboard state for a given thread */
3057 @REQ(set_key_state)
3058 thread_id_t tid; /* id of thread */
3059 int async; /* whether to change the async state too */
3060 VARARG(keystate,bytes); /* state array for all the keys */
3061 @END
3063 /* Set the system foreground window */
3064 @REQ(set_foreground_window)
3065 user_handle_t handle; /* handle to the foreground window */
3066 @REPLY
3067 user_handle_t previous; /* handle to the previous foreground window */
3068 int send_msg_old; /* whether we have to send a msg to the old window */
3069 int send_msg_new; /* whether we have to send a msg to the new window */
3070 @END
3072 /* Set the current thread focus window */
3073 @REQ(set_focus_window)
3074 user_handle_t handle; /* handle to the focus window */
3075 @REPLY
3076 user_handle_t previous; /* handle to the previous focus window */
3077 @END
3079 /* Set the current thread active window */
3080 @REQ(set_active_window)
3081 user_handle_t handle; /* handle to the active window */
3082 @REPLY
3083 user_handle_t previous; /* handle to the previous active window */
3084 @END
3086 /* Set the current thread capture window */
3087 @REQ(set_capture_window)
3088 user_handle_t handle; /* handle to the capture window */
3089 unsigned int flags; /* capture flags (see below) */
3090 @REPLY
3091 user_handle_t previous; /* handle to the previous capture window */
3092 user_handle_t full_handle; /* full 32-bit handle of new capture window */
3093 @END
3094 #define CAPTURE_MENU 0x01 /* capture is for a menu */
3095 #define CAPTURE_MOVESIZE 0x02 /* capture is for moving/resizing */
3098 /* Set the current thread caret window */
3099 @REQ(set_caret_window)
3100 user_handle_t handle; /* handle to the caret window */
3101 int width; /* caret width */
3102 int height; /* caret height */
3103 @REPLY
3104 user_handle_t previous; /* handle to the previous caret window */
3105 rectangle_t old_rect; /* previous caret rectangle */
3106 int old_hide; /* previous hide count */
3107 int old_state; /* previous caret state (1=on, 0=off) */
3108 @END
3111 /* Set the current thread caret information */
3112 @REQ(set_caret_info)
3113 unsigned int flags; /* caret flags (see below) */
3114 user_handle_t handle; /* handle to the caret window */
3115 int x; /* caret x position */
3116 int y; /* caret y position */
3117 int hide; /* increment for hide count (can be negative to show it) */
3118 int state; /* caret state (see below) */
3119 @REPLY
3120 user_handle_t full_handle; /* handle to the current caret window */
3121 rectangle_t old_rect; /* previous caret rectangle */
3122 int old_hide; /* previous hide count */
3123 int old_state; /* previous caret state (1=on, 0=off) */
3124 @END
3125 #define SET_CARET_POS 0x01 /* set the caret position from x,y */
3126 #define SET_CARET_HIDE 0x02 /* increment the caret hide count */
3127 #define SET_CARET_STATE 0x04 /* set the caret on/off state */
3128 enum caret_state
3130 CARET_STATE_OFF, /* off */
3131 CARET_STATE_ON, /* on */
3132 CARET_STATE_TOGGLE, /* toggle current state */
3133 CARET_STATE_ON_IF_MOVED /* on if the position differs, unchanged otherwise */
3137 /* Set a window hook */
3138 @REQ(set_hook)
3139 int id; /* id of the hook */
3140 process_id_t pid; /* id of process to set the hook into */
3141 thread_id_t tid; /* id of thread to set the hook into */
3142 int event_min;
3143 int event_max;
3144 client_ptr_t proc; /* hook procedure */
3145 int flags;
3146 int unicode; /* is it a unicode hook? */
3147 VARARG(module,unicode_str); /* module name */
3148 @REPLY
3149 user_handle_t handle; /* handle to the hook */
3150 unsigned int active_hooks; /* active hooks bitmap */
3151 @END
3154 /* Remove a window hook */
3155 @REQ(remove_hook)
3156 user_handle_t handle; /* handle to the hook */
3157 client_ptr_t proc; /* hook procedure if handle is 0 */
3158 int id; /* id of the hook if handle is 0 */
3159 @REPLY
3160 unsigned int active_hooks; /* active hooks bitmap */
3161 @END
3164 /* Start calling a hook chain */
3165 @REQ(start_hook_chain)
3166 int id; /* id of the hook */
3167 int event; /* signalled event */
3168 user_handle_t window; /* handle to the event window */
3169 int object_id; /* object id for out of context winevent */
3170 int child_id; /* child id for out of context winevent */
3171 @REPLY
3172 user_handle_t handle; /* handle to the next hook */
3173 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
3174 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
3175 int unicode; /* is it a unicode hook? */
3176 client_ptr_t proc; /* hook procedure */
3177 unsigned int active_hooks; /* active hooks bitmap */
3178 VARARG(module,unicode_str); /* module name */
3179 @END
3182 /* Finished calling a hook chain */
3183 @REQ(finish_hook_chain)
3184 int id; /* id of the hook */
3185 @END
3188 /* Get the hook information */
3189 @REQ(get_hook_info)
3190 user_handle_t handle; /* handle to the current hook */
3191 int get_next; /* do we want info about current or next hook? */
3192 int event; /* signalled event */
3193 user_handle_t window; /* handle to the event window */
3194 int object_id; /* object id for out of context winevent */
3195 int child_id; /* child id for out of context winevent */
3196 @REPLY
3197 user_handle_t handle; /* handle to the hook */
3198 int id; /* id of the hook */
3199 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
3200 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
3201 client_ptr_t proc; /* hook procedure */
3202 int unicode; /* is it a unicode hook? */
3203 VARARG(module,unicode_str); /* module name */
3204 @END
3207 /* Create a window class */
3208 @REQ(create_class)
3209 int local; /* is it a local class? */
3210 atom_t atom; /* class atom */
3211 unsigned int style; /* class style */
3212 mod_handle_t instance; /* module instance */
3213 int extra; /* number of extra class bytes */
3214 int win_extra; /* number of window extra bytes */
3215 client_ptr_t client_ptr; /* pointer to class in client address space */
3216 data_size_t name_offset; /* base class name offset for specified atom */
3217 VARARG(name,unicode_str); /* class name */
3218 @REPLY
3219 atom_t atom; /* resulting class atom */
3220 @END
3223 /* Destroy a window class */
3224 @REQ(destroy_class)
3225 atom_t atom; /* class atom */
3226 mod_handle_t instance; /* module instance */
3227 VARARG(name,unicode_str); /* class name */
3228 @REPLY
3229 client_ptr_t client_ptr; /* pointer to class in client address space */
3230 @END
3233 /* Set some information in a class */
3234 @REQ(set_class_info)
3235 user_handle_t window; /* handle to the window */
3236 unsigned int flags; /* flags for info to set (see below) */
3237 atom_t atom; /* class atom */
3238 unsigned int style; /* class style */
3239 int win_extra; /* number of window extra bytes */
3240 mod_handle_t instance; /* module instance */
3241 int extra_offset; /* offset to set in extra bytes */
3242 data_size_t extra_size; /* size to set in extra bytes */
3243 lparam_t extra_value; /* value to set in extra bytes */
3244 @REPLY
3245 atom_t old_atom; /* previous class atom */
3246 atom_t base_atom; /* base class atom */
3247 mod_handle_t old_instance; /* previous module instance */
3248 lparam_t old_extra_value; /* old value in extra bytes */
3249 unsigned int old_style; /* previous class style */
3250 int old_extra; /* previous number of class extra bytes */
3251 int old_win_extra; /* previous number of window extra bytes */
3252 @END
3253 #define SET_CLASS_ATOM 0x0001
3254 #define SET_CLASS_STYLE 0x0002
3255 #define SET_CLASS_WINEXTRA 0x0004
3256 #define SET_CLASS_INSTANCE 0x0008
3257 #define SET_CLASS_EXTRA 0x0010
3260 /* Open the clipboard */
3261 @REQ(open_clipboard)
3262 user_handle_t window; /* clipboard window */
3263 @REPLY
3264 user_handle_t owner; /* current clipboard owner */
3265 @END
3268 /* Close the clipboard */
3269 @REQ(close_clipboard)
3270 @REPLY
3271 user_handle_t viewer; /* first clipboard viewer */
3272 user_handle_t owner; /* current clipboard owner */
3273 @END
3276 /* Empty the clipboard and grab ownership */
3277 @REQ(empty_clipboard)
3278 @END
3281 /* Add a data format to the clipboard */
3282 @REQ(set_clipboard_data)
3283 unsigned int format; /* clipboard format of the data */
3284 unsigned int lcid; /* locale id to use for synthesizing text formats */
3285 VARARG(data,bytes); /* data contents */
3286 @REPLY
3287 unsigned int seqno; /* sequence number for the set data */
3288 @END
3291 /* Fetch a data format from the clipboard */
3292 @REQ(get_clipboard_data)
3293 unsigned int format; /* clipboard format of the data */
3294 int render; /* will we try to render it if missing? */
3295 int cached; /* do we already have it in the client-side cache? */
3296 unsigned int seqno; /* sequence number for the data in the cache */
3297 @REPLY
3298 unsigned int from; /* for synthesized data, format to generate it from */
3299 user_handle_t owner; /* clipboard owner for delayed-rendered formats */
3300 unsigned int seqno; /* sequence number for the originally set data */
3301 data_size_t total; /* total data size */
3302 VARARG(data,bytes); /* data contents */
3303 @END
3306 /* Retrieve a list of available formats */
3307 @REQ(get_clipboard_formats)
3308 unsigned int format; /* specific format to query, return all if 0 */
3309 @REPLY
3310 unsigned int count; /* count of available formats */
3311 VARARG(formats,uints); /* array of available formats */
3312 @END
3315 /* Retrieve the next available format */
3316 @REQ(enum_clipboard_formats)
3317 unsigned int previous; /* previous format, or first if 0 */
3318 @REPLY
3319 unsigned int format; /* next format */
3320 @END
3323 /* Release ownership of the clipboard */
3324 @REQ(release_clipboard)
3325 user_handle_t owner; /* clipboard owner to release */
3326 @REPLY
3327 user_handle_t viewer; /* first clipboard viewer */
3328 user_handle_t owner; /* current clipboard owner */
3329 @END
3332 /* Get clipboard information */
3333 @REQ(get_clipboard_info)
3334 @REPLY
3335 user_handle_t window; /* clipboard window */
3336 user_handle_t owner; /* clipboard owner */
3337 user_handle_t viewer; /* clipboard viewer */
3338 unsigned int seqno; /* current sequence number */
3339 @END
3342 /* Set the clipboard viewer window */
3343 @REQ(set_clipboard_viewer)
3344 user_handle_t viewer; /* clipboard viewer */
3345 user_handle_t previous; /* if non-zero, check that this was the previous viewer */
3346 @REPLY
3347 user_handle_t old_viewer; /* previous clipboard viewer */
3348 user_handle_t owner; /* clipboard owner */
3349 @END
3352 /* Add a clipboard listener window */
3353 @REQ(add_clipboard_listener)
3354 user_handle_t window; /* clipboard listener window */
3355 @END
3358 /* Remove a clipboard listener window */
3359 @REQ(remove_clipboard_listener)
3360 user_handle_t window; /* clipboard listener window */
3361 @END
3364 /* Open a security token */
3365 @REQ(open_token)
3366 obj_handle_t handle; /* handle to the thread or process */
3367 unsigned int access; /* access rights to the new token */
3368 unsigned int attributes;/* object attributes */
3369 unsigned int flags; /* flags (see below) */
3370 @REPLY
3371 obj_handle_t token; /* handle to the token */
3372 @END
3373 #define OPEN_TOKEN_THREAD 1
3374 #define OPEN_TOKEN_AS_SELF 2
3377 /* Set/get the global windows */
3378 @REQ(set_global_windows)
3379 unsigned int flags; /* flags for fields to set (see below) */
3380 user_handle_t shell_window; /* handle to the new shell window */
3381 user_handle_t shell_listview; /* handle to the new shell listview window */
3382 user_handle_t progman_window; /* handle to the new program manager window */
3383 user_handle_t taskman_window; /* handle to the new task manager window */
3384 @REPLY
3385 user_handle_t old_shell_window; /* handle to the shell window */
3386 user_handle_t old_shell_listview; /* handle to the shell listview window */
3387 user_handle_t old_progman_window; /* handle to the new program manager window */
3388 user_handle_t old_taskman_window; /* handle to the new task manager window */
3389 @END
3390 #define SET_GLOBAL_SHELL_WINDOWS 0x01 /* set both main shell and listview windows */
3391 #define SET_GLOBAL_PROGMAN_WINDOW 0x02
3392 #define SET_GLOBAL_TASKMAN_WINDOW 0x04
3394 /* Adjust the privileges held by a token */
3395 @REQ(adjust_token_privileges)
3396 obj_handle_t handle; /* handle to the token */
3397 int disable_all; /* disable all privileges? */
3398 int get_modified_state; /* get modified privileges? */
3399 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to enable/disable/remove */
3400 @REPLY
3401 unsigned int len; /* total length in bytes required to store token privileges */
3402 VARARG(privileges,LUID_AND_ATTRIBUTES); /* modified privileges */
3403 @END
3405 /* Retrieves the set of privileges held by or available to a token */
3406 @REQ(get_token_privileges)
3407 obj_handle_t handle; /* handle to the token */
3408 @REPLY
3409 unsigned int len; /* total length in bytes required to store token privileges */
3410 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
3411 @END
3413 /* Check the token has the required privileges */
3414 @REQ(check_token_privileges)
3415 obj_handle_t handle; /* handle to the token */
3416 int all_required; /* are all the privileges required for the check to succeed? */
3417 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to check */
3418 @REPLY
3419 int has_privileges; /* does the token have the required privileges? */
3420 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
3421 @END
3423 @REQ(duplicate_token)
3424 obj_handle_t handle; /* handle to the token to duplicate */
3425 unsigned int access; /* access rights to the new token */
3426 int primary; /* is the new token to be a primary one? */
3427 int impersonation_level; /* impersonation level of the new token */
3428 VARARG(objattr,object_attributes); /* object attributes */
3429 @REPLY
3430 obj_handle_t new_handle; /* duplicated handle */
3431 @END
3433 @REQ(access_check)
3434 obj_handle_t handle; /* handle to the token */
3435 unsigned int desired_access; /* desired access to the object */
3436 unsigned int mapping_read; /* mapping from generic read to specific rights */
3437 unsigned int mapping_write; /* mapping from generic write to specific rights */
3438 unsigned int mapping_execute; /* mapping from generic execute to specific rights */
3439 unsigned int mapping_all; /* mapping from generic all to specific rights */
3440 VARARG(sd,security_descriptor); /* security descriptor to check */
3441 @REPLY
3442 unsigned int access_granted; /* access rights actually granted */
3443 unsigned int access_status; /* was access granted? */
3444 unsigned int privileges_len; /* length needed to store privileges */
3445 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges used during access check */
3446 @END
3448 @REQ(get_token_sid)
3449 obj_handle_t handle; /* handle to the token */
3450 unsigned int which_sid; /* which SID to retrieve from the token */
3451 @REPLY
3452 data_size_t sid_len; /* length needed to store sid */
3453 VARARG(sid,SID); /* the sid specified by which_sid from the token */
3454 @END
3456 @REQ(get_token_groups)
3457 obj_handle_t handle; /* handle to the token */
3458 @REPLY
3459 data_size_t user_len; /* length needed to store user */
3460 VARARG(user,token_groups); /* groups the token's user belongs to */
3461 @END
3463 @REQ(get_token_default_dacl)
3464 obj_handle_t handle; /* handle to the token */
3465 @REPLY
3466 data_size_t acl_len; /* length needed to store access control list */
3467 VARARG(acl,ACL); /* access control list */
3468 @END
3470 @REQ(set_token_default_dacl)
3471 obj_handle_t handle; /* handle to the token */
3472 VARARG(acl,ACL); /* default dacl to set */
3473 @END
3475 @REQ(set_security_object)
3476 obj_handle_t handle; /* handle to the object */
3477 unsigned int security_info; /* which parts of security descriptor to set */
3478 VARARG(sd,security_descriptor); /* security descriptor to set */
3479 @END
3481 @REQ(get_security_object)
3482 obj_handle_t handle; /* handle to the object */
3483 unsigned int security_info; /* which parts of security descriptor to get */
3484 @REPLY
3485 unsigned int sd_len; /* buffer size needed for sd */
3486 VARARG(sd,security_descriptor); /* retrieved security descriptor */
3487 @END
3490 struct handle_info
3492 process_id_t owner;
3493 obj_handle_t handle;
3494 unsigned int access;
3497 /* Return a list of all opened handles */
3498 @REQ(get_system_handles)
3499 @REPLY
3500 unsigned int count; /* number of handles */
3501 VARARG(data,handle_infos); /* array of handle_infos */
3502 @END
3505 /* Create a mailslot */
3506 @REQ(create_mailslot)
3507 unsigned int access; /* wanted access rights */
3508 timeout_t read_timeout;
3509 unsigned int max_msgsize;
3510 VARARG(objattr,object_attributes); /* object attributes */
3511 @REPLY
3512 obj_handle_t handle; /* handle to the mailslot */
3513 @END
3516 /* Set mailslot information */
3517 @REQ(set_mailslot_info)
3518 obj_handle_t handle; /* handle to the mailslot */
3519 timeout_t read_timeout;
3520 unsigned int flags;
3521 @REPLY
3522 timeout_t read_timeout;
3523 unsigned int max_msgsize;
3524 @END
3525 #define MAILSLOT_SET_READ_TIMEOUT 1
3528 /* Create a directory object */
3529 @REQ(create_directory)
3530 unsigned int access; /* access flags */
3531 VARARG(objattr,object_attributes); /* object attributes */
3532 @REPLY
3533 obj_handle_t handle; /* handle to the directory */
3534 @END
3537 /* Open a directory object */
3538 @REQ(open_directory)
3539 unsigned int access; /* access flags */
3540 unsigned int attributes; /* object attributes */
3541 obj_handle_t rootdir; /* root directory */
3542 VARARG(directory_name,unicode_str); /* Directory name */
3543 @REPLY
3544 obj_handle_t handle; /* handle to the directory */
3545 @END
3548 /* Get a directory entry by index */
3549 @REQ(get_directory_entry)
3550 obj_handle_t handle; /* handle to the directory */
3551 unsigned int index; /* entry index */
3552 @REPLY
3553 data_size_t name_len; /* length of the entry name in bytes */
3554 VARARG(name,unicode_str,name_len); /* entry name */
3555 VARARG(type,unicode_str); /* entry type */
3556 @END
3559 /* Create a symbolic link object */
3560 @REQ(create_symlink)
3561 unsigned int access; /* access flags */
3562 VARARG(objattr,object_attributes); /* object attributes */
3563 VARARG(target_name,unicode_str); /* target name */
3564 @REPLY
3565 obj_handle_t handle; /* handle to the symlink */
3566 @END
3569 /* Open a symbolic link object */
3570 @REQ(open_symlink)
3571 unsigned int access; /* access flags */
3572 unsigned int attributes; /* object attributes */
3573 obj_handle_t rootdir; /* root directory */
3574 VARARG(name,unicode_str); /* symlink name */
3575 @REPLY
3576 obj_handle_t handle; /* handle to the symlink */
3577 @END
3580 /* Query a symbolic link object */
3581 @REQ(query_symlink)
3582 obj_handle_t handle; /* handle to the symlink */
3583 @REPLY
3584 data_size_t total; /* total needed size for name */
3585 VARARG(target_name,unicode_str); /* target name */
3586 @END
3589 /* Query basic object information */
3590 @REQ(get_object_info)
3591 obj_handle_t handle; /* handle to the object */
3592 @REPLY
3593 unsigned int access; /* granted access mask */
3594 unsigned int ref_count; /* object ref count */
3595 unsigned int handle_count; /* object handle count */
3596 data_size_t total; /* total needed size for name */
3597 VARARG(name,unicode_str); /* object name */
3598 @END
3601 /* Query object type name information */
3602 @REQ(get_object_type)
3603 obj_handle_t handle; /* handle to the object */
3604 @REPLY
3605 data_size_t total; /* needed size for type name */
3606 VARARG(type,unicode_str); /* type name */
3607 @END
3610 /* Unlink a named object */
3611 @REQ(unlink_object)
3612 obj_handle_t handle; /* handle to the object */
3613 @END
3616 /* Query the impersonation level of an impersonation token */
3617 @REQ(get_token_impersonation_level)
3618 obj_handle_t handle; /* handle to the object */
3619 @REPLY
3620 int impersonation_level; /* impersonation level of the impersonation token */
3621 @END
3623 /* Allocate a locally-unique identifier */
3624 @REQ(allocate_locally_unique_id)
3625 @REPLY
3626 luid_t luid;
3627 @END
3630 /* Create a device manager */
3631 @REQ(create_device_manager)
3632 unsigned int access; /* wanted access rights */
3633 unsigned int attributes; /* object attributes */
3634 @REPLY
3635 obj_handle_t handle; /* handle to the device */
3636 @END
3639 /* Create a device */
3640 @REQ(create_device)
3641 obj_handle_t rootdir; /* root directory */
3642 client_ptr_t user_ptr; /* opaque ptr for use by client */
3643 obj_handle_t manager; /* device manager */
3644 VARARG(name,unicode_str); /* object name */
3645 @END
3648 /* Delete a device */
3649 @REQ(delete_device)
3650 obj_handle_t manager; /* handle to the device manager */
3651 client_ptr_t device; /* pointer to the device */
3652 @END
3655 /* Retrieve the next pending device irp request */
3656 @REQ(get_next_device_request)
3657 obj_handle_t manager; /* handle to the device manager */
3658 obj_handle_t prev; /* handle to the previous irp */
3659 unsigned int status; /* status of the previous irp */
3660 client_ptr_t user_ptr; /* user pointer of the previous irp */
3661 @REPLY
3662 irp_params_t params; /* irp parameters */
3663 obj_handle_t next; /* handle to the next irp */
3664 thread_id_t client_tid; /* tid of thread calling irp */
3665 client_ptr_t client_thread; /* pointer to thread object of calling irp */
3666 data_size_t in_size; /* total needed input size */
3667 VARARG(next_data,bytes); /* input data of the next irp */
3668 @END
3671 /* Get kernel pointer from server object */
3672 @REQ(get_kernel_object_ptr)
3673 obj_handle_t manager; /* handle to the device manager */
3674 obj_handle_t handle; /* object handle */
3675 @REPLY
3676 client_ptr_t user_ptr; /* kernel object pointer */
3677 @END
3680 /* Associate kernel pointer with server object */
3681 @REQ(set_kernel_object_ptr)
3682 obj_handle_t manager; /* handle to the device manager */
3683 obj_handle_t handle; /* object handle */
3684 client_ptr_t user_ptr; /* kernel object pointer */
3685 @END
3688 /* Grab server object reference from kernel object pointer */
3689 @REQ(grab_kernel_object)
3690 obj_handle_t manager; /* handle to the device manager */
3691 client_ptr_t user_ptr; /* kernel object pointer */
3692 @END
3695 /* Release server object reference from kernel object pointer */
3696 @REQ(release_kernel_object)
3697 obj_handle_t manager; /* handle to the device manager */
3698 client_ptr_t user_ptr; /* kernel object pointer */
3699 @END
3702 /* Get handle from kernel object pointer */
3703 @REQ(get_kernel_object_handle)
3704 obj_handle_t manager; /* handle to the device manager */
3705 client_ptr_t user_ptr; /* kernel object pointer */
3706 unsigned int access; /* wanted access rights */
3707 @REPLY
3708 obj_handle_t handle; /* kernel object handle */
3709 @END
3712 /* Make the current process a system process */
3713 @REQ(make_process_system)
3714 @REPLY
3715 obj_handle_t event; /* event signaled when all user processes have exited */
3716 @END
3719 /* Get detailed fixed-size information about a token */
3720 @REQ(get_token_statistics)
3721 obj_handle_t handle; /* handle to the object */
3722 @REPLY
3723 luid_t token_id; /* locally-unique identifier of the token */
3724 luid_t modified_id; /* locally-unique identifier of the modified version of the token */
3725 int primary; /* is the token primary or impersonation? */
3726 int impersonation_level; /* level of impersonation */
3727 int group_count; /* the number of groups the token is a member of */
3728 int privilege_count; /* the number of privileges the token has */
3729 @END
3732 /* Create I/O completion port */
3733 @REQ(create_completion)
3734 unsigned int access; /* desired access to a port */
3735 unsigned int concurrent; /* max number of concurrent active threads */
3736 VARARG(objattr,object_attributes); /* object attributes */
3737 @REPLY
3738 obj_handle_t handle; /* port handle */
3739 @END
3742 /* Open I/O completion port */
3743 @REQ(open_completion)
3744 unsigned int access; /* desired access to a port */
3745 unsigned int attributes; /* object attributes */
3746 obj_handle_t rootdir; /* root directory */
3747 VARARG(filename,unicode_str); /* port name */
3748 @REPLY
3749 obj_handle_t handle; /* port handle */
3750 @END
3753 /* add completion to completion port */
3754 @REQ(add_completion)
3755 obj_handle_t handle; /* port handle */
3756 apc_param_t ckey; /* completion key */
3757 apc_param_t cvalue; /* completion value */
3758 apc_param_t information; /* IO_STATUS_BLOCK Information */
3759 unsigned int status; /* completion result */
3760 @END
3763 /* get completion from completion port queue */
3764 @REQ(remove_completion)
3765 obj_handle_t handle; /* port handle */
3766 @REPLY
3767 apc_param_t ckey; /* completion key */
3768 apc_param_t cvalue; /* completion value */
3769 apc_param_t information; /* IO_STATUS_BLOCK Information */
3770 unsigned int status; /* completion result */
3771 @END
3774 /* get completion queue depth */
3775 @REQ(query_completion)
3776 obj_handle_t handle; /* port handle */
3777 @REPLY
3778 unsigned int depth; /* completion queue depth */
3779 @END
3782 /* associate object with completion port */
3783 @REQ(set_completion_info)
3784 obj_handle_t handle; /* object handle */
3785 apc_param_t ckey; /* completion key */
3786 obj_handle_t chandle; /* port handle */
3787 @END
3790 /* check for associated completion and push msg */
3791 @REQ(add_fd_completion)
3792 obj_handle_t handle; /* async' object */
3793 apc_param_t cvalue; /* completion value */
3794 apc_param_t information; /* IO_STATUS_BLOCK Information */
3795 unsigned int status; /* completion status */
3796 int async; /* completion is an async result */
3797 @END
3800 /* set fd completion information */
3801 @REQ(set_fd_completion_mode)
3802 obj_handle_t handle; /* handle to a file or directory */
3803 unsigned int flags; /* completion notification flags */
3804 @END
3807 /* set fd disposition information */
3808 @REQ(set_fd_disp_info)
3809 obj_handle_t handle; /* handle to a file or directory */
3810 int unlink; /* whether to unlink file on close */
3811 @END
3814 /* set fd name information */
3815 @REQ(set_fd_name_info)
3816 obj_handle_t handle; /* handle to a file or directory */
3817 obj_handle_t rootdir; /* root directory */
3818 int link; /* link instead of renaming */
3819 int replace; /* replace an existing file? */
3820 VARARG(filename,string); /* new file name */
3821 @END
3824 /* Retrieve layered info for a window */
3825 @REQ(get_window_layered_info)
3826 user_handle_t handle; /* handle to the window */
3827 @REPLY
3828 unsigned int color_key; /* color key */
3829 unsigned int alpha; /* alpha (0..255) */
3830 unsigned int flags; /* LWA_* flags */
3831 @END
3834 /* Set layered info for a window */
3835 @REQ(set_window_layered_info)
3836 user_handle_t handle; /* handle to the window */
3837 unsigned int color_key; /* color key */
3838 unsigned int alpha; /* alpha (0..255) */
3839 unsigned int flags; /* LWA_* flags */
3840 @END
3843 /* Allocate an arbitrary user handle */
3844 @REQ(alloc_user_handle)
3845 @REPLY
3846 user_handle_t handle; /* allocated handle */
3847 @END
3850 /* Free an arbitrary user handle */
3851 @REQ(free_user_handle)
3852 user_handle_t handle; /* handle to free*/
3853 @END
3856 /* Set/get the current cursor */
3857 @REQ(set_cursor)
3858 unsigned int flags; /* flags for fields to set (see below) */
3859 user_handle_t handle; /* handle to the cursor */
3860 int show_count; /* show count increment/decrement */
3861 int x; /* cursor position */
3862 int y;
3863 rectangle_t clip; /* cursor clip rectangle */
3864 unsigned int clip_msg; /* message to post on cursor clip changes */
3865 @REPLY
3866 user_handle_t prev_handle; /* previous handle */
3867 int prev_count; /* previous show count */
3868 int prev_x; /* previous position */
3869 int prev_y;
3870 int new_x; /* new position */
3871 int new_y;
3872 rectangle_t new_clip; /* new clip rectangle */
3873 unsigned int last_change; /* time of last position change */
3874 @END
3875 #define SET_CURSOR_HANDLE 0x01
3876 #define SET_CURSOR_COUNT 0x02
3877 #define SET_CURSOR_POS 0x04
3878 #define SET_CURSOR_CLIP 0x08
3879 #define SET_CURSOR_NOCLIP 0x10
3882 /* Modify the list of registered rawinput devices */
3883 @REQ(update_rawinput_devices)
3884 VARARG(devices,rawinput_devices);
3885 @END
3888 /* Create a new job object */
3889 @REQ(create_job)
3890 unsigned int access; /* wanted access rights */
3891 VARARG(objattr,object_attributes); /* object attributes */
3892 @REPLY
3893 obj_handle_t handle; /* handle to the job */
3894 @END
3897 /* Open a job object */
3898 @REQ(open_job)
3899 unsigned int access; /* wanted access rights */
3900 unsigned int attributes; /* object attributes */
3901 obj_handle_t rootdir; /* root directory */
3902 VARARG(name,unicode_str); /* object name */
3903 @REPLY
3904 obj_handle_t handle; /* handle to the job */
3905 @END
3908 /* Assign a job object to a process */
3909 @REQ(assign_job)
3910 obj_handle_t job; /* handle to the job */
3911 obj_handle_t process; /* handle to the process */
3912 @END
3915 /* Check if a process is associated with a job */
3916 @REQ(process_in_job)
3917 obj_handle_t job; /* handle to the job */
3918 obj_handle_t process; /* handle to the process */
3919 @END
3922 /* Set limit flags on a job */
3923 @REQ(set_job_limits)
3924 obj_handle_t handle; /* handle to the job */
3925 unsigned int limit_flags; /* new limit flags */
3926 @END
3929 /* Set new completion port for a job */
3930 @REQ(set_job_completion_port)
3931 obj_handle_t job; /* handle to the job */
3932 obj_handle_t port; /* handle to the completion port */
3933 client_ptr_t key; /* key to send with completion messages */
3934 @END
3937 /* Terminate all processes associated with the job */
3938 @REQ(terminate_job)
3939 obj_handle_t handle; /* handle to the job */
3940 int status; /* process exit code */
3941 @END
3944 /* Suspend a process */
3945 @REQ(suspend_process)
3946 obj_handle_t handle; /* process handle */
3947 @END
3950 /* Resume a process */
3951 @REQ(resume_process)
3952 obj_handle_t handle; /* process handle */
3953 @END