qcap/vfwcapture: Call IMemInputPin::Receive() directly.
[wine.git] / server / protocol.def
blob566bc83bb2c027835b41ebff1c997ddac158b682
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 /* structure for process startup info */
218 typedef struct
220 unsigned int debug_flags;
221 unsigned int console_flags;
222 obj_handle_t console;
223 obj_handle_t hstdin;
224 obj_handle_t hstdout;
225 obj_handle_t hstderr;
226 unsigned int x;
227 unsigned int y;
228 unsigned int xsize;
229 unsigned int ysize;
230 unsigned int xchars;
231 unsigned int ychars;
232 unsigned int attribute;
233 unsigned int flags;
234 unsigned int show;
235 data_size_t curdir_len;
236 data_size_t dllpath_len;
237 data_size_t imagepath_len;
238 data_size_t cmdline_len;
239 data_size_t title_len;
240 data_size_t desktop_len;
241 data_size_t shellinfo_len;
242 data_size_t runtime_len;
243 /* VARARG(curdir,unicode_str,curdir_len); */
244 /* VARARG(dllpath,unicode_str,dllpath_len); */
245 /* VARARG(imagepath,unicode_str,imagepath_len); */
246 /* VARARG(cmdline,unicode_str,cmdline_len); */
247 /* VARARG(title,unicode_str,title_len); */
248 /* VARARG(desktop,unicode_str,desktop_len); */
249 /* VARARG(shellinfo,unicode_str,shellinfo_len); */
250 /* VARARG(runtime,unicode_str,runtime_len); */
251 } startup_info_t;
253 /* structure returned in the list of window properties */
254 typedef struct
256 atom_t atom; /* property atom */
257 int string; /* was atom a string originally? */
258 lparam_t data; /* data stored in property */
259 } property_data_t;
261 /* structure to specify window rectangles */
262 typedef struct
264 int left;
265 int top;
266 int right;
267 int bottom;
268 } rectangle_t;
270 /* structure for parameters of async I/O calls */
271 typedef struct
273 obj_handle_t handle; /* object to perform I/O on */
274 obj_handle_t event; /* event to signal when done */
275 client_ptr_t iosb; /* I/O status block in client addr space */
276 client_ptr_t user; /* opaque user data containing callback pointer and async-specific data */
277 client_ptr_t apc; /* user APC to call */
278 apc_param_t apc_context; /* user APC context or completion value */
279 } async_data_t;
281 /* structures for extra message data */
283 struct hw_msg_source
285 unsigned int device; /* source device (IMDT_* values) */
286 unsigned int origin; /* source origin (IMO_* values) */
289 struct hardware_msg_data
291 lparam_t info; /* extra info */
292 unsigned int hw_id; /* unique id */
293 unsigned int flags; /* hook flags */
294 struct hw_msg_source source; /* message source */
295 union
297 int type;
298 struct
300 int type; /* RIM_TYPEKEYBOARD */
301 unsigned int message; /* message generated by this rawinput event */
302 unsigned short vkey; /* virtual key code */
303 unsigned short scan; /* scan code */
304 } kbd;
305 struct
307 int type; /* RIM_TYPEMOUSE */
308 int x; /* x coordinate */
309 int y; /* y coordinate */
310 unsigned int data; /* mouse data */
311 } mouse;
312 } rawinput;
315 struct callback_msg_data
317 client_ptr_t callback; /* callback function */
318 lparam_t data; /* user data for callback */
319 lparam_t result; /* message result */
322 struct winevent_msg_data
324 user_handle_t hook; /* hook handle */
325 thread_id_t tid; /* thread id */
326 client_ptr_t hook_proc; /* hook proc address */
327 /* followed by module name if any */
330 typedef union
332 int type;
333 struct
335 int type; /* INPUT_KEYBOARD */
336 unsigned short vkey; /* virtual key code */
337 unsigned short scan; /* scan code */
338 unsigned int flags; /* event flags */
339 unsigned int time; /* event time */
340 lparam_t info; /* extra info */
341 } kbd;
342 struct
344 int type; /* INPUT_MOUSE */
345 int x; /* coordinates */
346 int y;
347 unsigned int data; /* mouse data */
348 unsigned int flags; /* event flags */
349 unsigned int time; /* event time */
350 lparam_t info; /* extra info */
351 } mouse;
352 struct
354 int type; /* INPUT_HARDWARE */
355 unsigned int msg; /* message code */
356 lparam_t lparam; /* message param */
357 } hw;
358 } hw_input_t;
360 typedef union
362 unsigned char bytes[1]; /* raw data for sent messages */
363 struct hardware_msg_data hardware;
364 struct callback_msg_data callback;
365 struct winevent_msg_data winevent;
366 } message_data_t;
368 /* structure for console char/attribute info */
369 typedef struct
371 WCHAR ch;
372 unsigned short attr;
373 } char_info_t;
375 /* structure returned in filesystem events */
376 struct filesystem_event
378 int action;
379 data_size_t len;
380 char name[1];
383 typedef struct
385 unsigned int low_part;
386 int high_part;
387 } luid_t;
389 #define MAX_ACL_LEN 65535
391 struct security_descriptor
393 unsigned int control; /* SE_ flags */
394 data_size_t owner_len;
395 data_size_t group_len;
396 data_size_t sacl_len;
397 data_size_t dacl_len;
398 /* VARARG(owner,SID); */
399 /* VARARG(group,SID); */
400 /* VARARG(sacl,ACL); */
401 /* VARARG(dacl,ACL); */
404 struct object_attributes
406 obj_handle_t rootdir; /* root directory */
407 unsigned int attributes; /* object attributes */
408 data_size_t sd_len; /* length of security_descriptor data. may be 0 */
409 data_size_t name_len; /* length of the name string. may be 0 */
410 /* VARARG(sd,security_descriptor); */
411 /* VARARG(name,unicode_str); */
414 struct token_groups
416 unsigned int count;
417 /* unsigned int attributes[count]; */
418 /* VARARG(sids,SID); */
421 enum select_op
423 SELECT_NONE,
424 SELECT_WAIT,
425 SELECT_WAIT_ALL,
426 SELECT_SIGNAL_AND_WAIT,
427 SELECT_KEYED_EVENT_WAIT,
428 SELECT_KEYED_EVENT_RELEASE
431 typedef union
433 enum select_op op;
434 struct
436 enum select_op op; /* SELECT_WAIT or SELECT_WAIT_ALL */
437 obj_handle_t handles[MAXIMUM_WAIT_OBJECTS];
438 } wait;
439 struct
441 enum select_op op; /* SELECT_SIGNAL_AND_WAIT */
442 obj_handle_t wait;
443 obj_handle_t signal; /* must be last in the structure so we can remove it on retries */
444 } signal_and_wait;
445 struct
447 enum select_op op; /* SELECT_KEYED_EVENT_WAIT or SELECT_KEYED_EVENT_RELEASE */
448 obj_handle_t handle;
449 client_ptr_t key;
450 } keyed_event;
451 } select_op_t;
453 enum apc_type
455 APC_NONE,
456 APC_USER,
457 APC_TIMER,
458 APC_ASYNC_IO,
459 APC_VIRTUAL_ALLOC,
460 APC_VIRTUAL_FREE,
461 APC_VIRTUAL_QUERY,
462 APC_VIRTUAL_PROTECT,
463 APC_VIRTUAL_FLUSH,
464 APC_VIRTUAL_LOCK,
465 APC_VIRTUAL_UNLOCK,
466 APC_MAP_VIEW,
467 APC_UNMAP_VIEW,
468 APC_CREATE_THREAD,
469 APC_BREAK_PROCESS
472 typedef union
474 enum apc_type type;
475 struct
477 enum apc_type type; /* APC_USER */
478 int __pad;
479 client_ptr_t func; /* void (__stdcall *func)(ULONG_PTR,ULONG_PTR,ULONG_PTR); */
480 apc_param_t args[3]; /* arguments for user function */
481 } user;
482 struct
484 enum apc_type type; /* APC_TIMER */
485 int __pad;
486 client_ptr_t func; /* void (__stdcall *func)(void*, unsigned int, unsigned int); */
487 timeout_t time; /* absolute time of expiration */
488 client_ptr_t arg; /* user argument */
489 } timer;
490 struct
492 enum apc_type type; /* APC_ASYNC_IO */
493 unsigned int status; /* I/O status */
494 client_ptr_t user; /* user pointer */
495 client_ptr_t sb; /* status block */
496 } async_io;
497 struct
499 enum apc_type type; /* APC_VIRTUAL_ALLOC */
500 unsigned int op_type; /* type of operation */
501 client_ptr_t addr; /* requested address */
502 mem_size_t size; /* allocation size */
503 unsigned int zero_bits_64; /* number of zero high bits */
504 unsigned int prot; /* memory protection flags */
505 } virtual_alloc;
506 struct
508 enum apc_type type; /* APC_VIRTUAL_FREE */
509 unsigned int op_type; /* type of operation */
510 client_ptr_t addr; /* requested address */
511 mem_size_t size; /* allocation size */
512 } virtual_free;
513 struct
515 enum apc_type type; /* APC_VIRTUAL_QUERY */
516 int __pad;
517 client_ptr_t addr; /* requested address */
518 } virtual_query;
519 struct
521 enum apc_type type; /* APC_VIRTUAL_PROTECT */
522 unsigned int prot; /* new protection flags */
523 client_ptr_t addr; /* requested address */
524 mem_size_t size; /* requested size */
525 } virtual_protect;
526 struct
528 enum apc_type type; /* APC_VIRTUAL_FLUSH */
529 int __pad;
530 client_ptr_t addr; /* requested address */
531 mem_size_t size; /* requested size */
532 } virtual_flush;
533 struct
535 enum apc_type type; /* APC_VIRTUAL_LOCK */
536 int __pad;
537 client_ptr_t addr; /* requested address */
538 mem_size_t size; /* requested size */
539 } virtual_lock;
540 struct
542 enum apc_type type; /* APC_VIRTUAL_UNLOCK */
543 int __pad;
544 client_ptr_t addr; /* requested address */
545 mem_size_t size; /* requested size */
546 } virtual_unlock;
547 struct
549 enum apc_type type; /* APC_MAP_VIEW */
550 obj_handle_t handle; /* mapping handle */
551 client_ptr_t addr; /* requested address */
552 mem_size_t size; /* allocation size */
553 file_pos_t offset; /* file offset */
554 unsigned int alloc_type; /* allocation type */
555 unsigned short zero_bits_64; /* number of zero high bits */
556 unsigned short prot; /* memory protection flags */
557 } map_view;
558 struct
560 enum apc_type type; /* APC_UNMAP_VIEW */
561 int __pad;
562 client_ptr_t addr; /* view address */
563 } unmap_view;
564 struct
566 enum apc_type type; /* APC_CREATE_THREAD */
567 int suspend; /* suspended thread? */
568 client_ptr_t func; /* void (__stdcall *func)(void*); start function */
569 client_ptr_t arg; /* argument for start function */
570 mem_size_t reserve; /* reserve size for thread stack */
571 mem_size_t commit; /* commit size for thread stack */
572 } create_thread;
573 } apc_call_t;
575 typedef union
577 enum apc_type type;
578 struct
580 enum apc_type type; /* APC_ASYNC_IO */
581 unsigned int status; /* new status of async operation */
582 unsigned int total; /* bytes transferred */
583 } async_io;
584 struct
586 enum apc_type type; /* APC_VIRTUAL_ALLOC */
587 unsigned int status; /* status returned by call */
588 client_ptr_t addr; /* resulting address */
589 mem_size_t size; /* resulting size */
590 } virtual_alloc;
591 struct
593 enum apc_type type; /* APC_VIRTUAL_FREE */
594 unsigned int status; /* status returned by call */
595 client_ptr_t addr; /* resulting address */
596 mem_size_t size; /* resulting size */
597 } virtual_free;
598 struct
600 enum apc_type type; /* APC_VIRTUAL_QUERY */
601 unsigned int status; /* status returned by call */
602 client_ptr_t base; /* resulting base address */
603 client_ptr_t alloc_base;/* resulting allocation base */
604 mem_size_t size; /* resulting region size */
605 unsigned short state; /* resulting region state */
606 unsigned short prot; /* resulting region protection */
607 unsigned short alloc_prot;/* resulting allocation protection */
608 unsigned short alloc_type;/* resulting region allocation type */
609 } virtual_query;
610 struct
612 enum apc_type type; /* APC_VIRTUAL_PROTECT */
613 unsigned int status; /* status returned by call */
614 client_ptr_t addr; /* resulting address */
615 mem_size_t size; /* resulting size */
616 unsigned int prot; /* old protection flags */
617 } virtual_protect;
618 struct
620 enum apc_type type; /* APC_VIRTUAL_FLUSH */
621 unsigned int status; /* status returned by call */
622 client_ptr_t addr; /* resulting address */
623 mem_size_t size; /* resulting size */
624 } virtual_flush;
625 struct
627 enum apc_type type; /* APC_VIRTUAL_LOCK */
628 unsigned int status; /* status returned by call */
629 client_ptr_t addr; /* resulting address */
630 mem_size_t size; /* resulting size */
631 } virtual_lock;
632 struct
634 enum apc_type type; /* APC_VIRTUAL_UNLOCK */
635 unsigned int status; /* status returned by call */
636 client_ptr_t addr; /* resulting address */
637 mem_size_t size; /* resulting size */
638 } virtual_unlock;
639 struct
641 enum apc_type type; /* APC_MAP_VIEW */
642 unsigned int status; /* status returned by call */
643 client_ptr_t addr; /* resulting address */
644 mem_size_t size; /* resulting size */
645 } map_view;
646 struct
648 enum apc_type type; /* APC_MAP_VIEW */
649 unsigned int status; /* status returned by call */
650 } unmap_view;
651 struct
653 enum apc_type type; /* APC_CREATE_THREAD */
654 unsigned int status; /* status returned by call */
655 thread_id_t tid; /* thread id */
656 obj_handle_t handle; /* handle to new thread */
657 } create_thread;
658 struct
660 enum apc_type type; /* APC_BREAK_PROCESS */
661 unsigned int status; /* status returned by call */
662 } break_process;
663 } apc_result_t;
665 enum irp_type
667 IRP_CALL_NONE,
668 IRP_CALL_CREATE,
669 IRP_CALL_CLOSE,
670 IRP_CALL_READ,
671 IRP_CALL_WRITE,
672 IRP_CALL_FLUSH,
673 IRP_CALL_IOCTL,
674 IRP_CALL_FREE,
675 IRP_CALL_CANCEL
678 typedef union
680 enum irp_type type; /* irp call type */
681 struct
683 enum irp_type type; /* IRP_CALL_CREATE */
684 unsigned int access; /* access rights */
685 unsigned int sharing; /* sharing flags */
686 unsigned int options; /* file options */
687 client_ptr_t device; /* opaque ptr for the device */
688 obj_handle_t file; /* file handle */
689 } create;
690 struct
692 enum irp_type type; /* IRP_CALL_CLOSE */
693 int __pad;
694 client_ptr_t file; /* opaque ptr for the file object */
695 } close;
696 struct
698 enum irp_type type; /* IRP_CALL_READ */
699 unsigned int key; /* driver key */
700 data_size_t out_size; /* needed output size */
701 int __pad;
702 client_ptr_t file; /* opaque ptr for the file object */
703 file_pos_t pos; /* file position */
704 } read;
705 struct
707 enum irp_type type; /* IRP_CALL_WRITE */
708 unsigned int key; /* driver key */
709 client_ptr_t file; /* opaque ptr for the file object */
710 file_pos_t pos; /* file position */
711 } write;
712 struct
714 enum irp_type type; /* IRP_CALL_FLUSH */
715 int __pad;
716 client_ptr_t file; /* opaque ptr for the file object */
717 } flush;
718 struct
720 enum irp_type type; /* IRP_CALL_IOCTL */
721 ioctl_code_t code; /* ioctl code */
722 data_size_t out_size; /* needed output size */
723 int __pad;
724 client_ptr_t file; /* opaque ptr for the file object */
725 } ioctl;
726 struct
728 enum irp_type type; /* IRP_CALL_FREE */
729 int __pad;
730 client_ptr_t obj; /* opaque ptr for the freed object */
731 } free;
732 struct
734 enum irp_type type; /* IRP_CALL_CANCEL */
735 int __pad;
736 client_ptr_t irp; /* opaque ptr for canceled irp */
737 } cancel;
738 } irp_params_t;
740 /* information about a PE image mapping, roughly equivalent to SECTION_IMAGE_INFORMATION */
741 typedef struct
743 client_ptr_t base;
744 client_ptr_t entry_point;
745 mem_size_t map_size;
746 mem_size_t stack_size;
747 mem_size_t stack_commit;
748 unsigned int zerobits;
749 unsigned int subsystem;
750 unsigned short subsystem_low;
751 unsigned short subsystem_high;
752 unsigned int gp;
753 unsigned short image_charact;
754 unsigned short dll_charact;
755 unsigned short machine;
756 unsigned char contains_code;
757 unsigned char image_flags;
758 unsigned int loader_flags;
759 unsigned int header_size;
760 unsigned int file_size;
761 unsigned int checksum;
762 client_cpu_t cpu;
763 int __pad;
764 } pe_image_info_t;
765 #define IMAGE_FLAGS_ComPlusNativeReady 0x01
766 #define IMAGE_FLAGS_ComPlusILOnly 0x02
767 #define IMAGE_FLAGS_ImageDynamicallyRelocated 0x04
768 #define IMAGE_FLAGS_ImageMappedFlat 0x08
769 #define IMAGE_FLAGS_BaseBelow4gb 0x10
770 #define IMAGE_FLAGS_WineBuiltin 0x40
771 #define IMAGE_FLAGS_WineFakeDll 0x80
773 struct rawinput_device
775 unsigned short usage_page;
776 unsigned short usage;
777 unsigned int flags;
778 user_handle_t target;
781 /****************************************************************/
782 /* Request declarations */
784 /* Create a new process from the context of the parent */
785 @REQ(new_process)
786 int inherit_all; /* inherit all handles from parent */
787 unsigned int create_flags; /* creation flags */
788 int socket_fd; /* file descriptor for process socket */
789 obj_handle_t exe_file; /* file handle for main exe */
790 unsigned int access; /* access rights for process object */
791 client_cpu_t cpu; /* CPU that the new process will use */
792 data_size_t info_size; /* size of startup info */
793 VARARG(objattr,object_attributes); /* object attributes */
794 VARARG(info,startup_info,info_size); /* startup information */
795 VARARG(env,unicode_str); /* environment for new process */
796 @REPLY
797 obj_handle_t info; /* new process info handle */
798 process_id_t pid; /* process id */
799 obj_handle_t handle; /* process handle (in the current process) */
800 @END
803 /* Execute a process, replacing the current one */
804 @REQ(exec_process)
805 int socket_fd; /* file descriptor for process socket */
806 client_cpu_t cpu; /* CPU that the new process will use */
807 @END
810 /* Retrieve information about a newly started process */
811 @REQ(get_new_process_info)
812 obj_handle_t info; /* info handle returned from new_process_request */
813 @REPLY
814 int success; /* did the process start successfully? */
815 int exit_code; /* process exit code if failed */
816 @END
819 /* Create a new thread */
820 @REQ(new_thread)
821 obj_handle_t process; /* process in which to create thread */
822 unsigned int access; /* wanted access rights */
823 int suspend; /* new thread should be suspended on creation */
824 int request_fd; /* fd for request pipe */
825 VARARG(objattr,object_attributes); /* object attributes */
826 @REPLY
827 thread_id_t tid; /* thread id */
828 obj_handle_t handle; /* thread handle (in the current process) */
829 @END
832 /* Retrieve the new process startup info */
833 @REQ(get_startup_info)
834 @REPLY
835 data_size_t info_size; /* size of startup info */
836 VARARG(info,startup_info,info_size); /* startup information */
837 VARARG(env,unicode_str); /* environment */
838 @END
841 /* Signal the end of the process initialization */
842 @REQ(init_process_done)
843 int gui; /* is it a GUI process? */
844 mod_handle_t module; /* main module base address */
845 client_ptr_t ldt_copy; /* address of LDT copy (in thread address space) */
846 client_ptr_t entry; /* process entry point */
847 @REPLY
848 int suspend; /* is process suspended? */
849 @END
852 /* Initialize a thread; called from the child after fork()/clone() */
853 @REQ(init_thread)
854 int unix_pid; /* Unix pid of new thread */
855 int unix_tid; /* Unix tid of new thread */
856 int debug_level; /* new debug level */
857 client_ptr_t teb; /* TEB of new thread (in thread address space) */
858 client_ptr_t entry; /* entry point or PEB if initial thread (in thread address space) */
859 int reply_fd; /* fd for reply pipe */
860 int wait_fd; /* fd for blocking calls pipe */
861 client_cpu_t cpu; /* CPU that this thread is running on */
862 @REPLY
863 process_id_t pid; /* process id of the new thread's process */
864 thread_id_t tid; /* thread id of the new thread */
865 timeout_t server_start; /* server start time */
866 data_size_t info_size; /* total size of startup info */
867 int version; /* protocol version */
868 unsigned int all_cpus; /* bitset of supported CPUs */
869 int suspend; /* is thread suspended? */
870 @END
873 /* Terminate a process */
874 @REQ(terminate_process)
875 obj_handle_t handle; /* process handle to terminate */
876 int exit_code; /* process exit code */
877 @REPLY
878 int self; /* suicide? */
879 @END
882 /* Terminate a thread */
883 @REQ(terminate_thread)
884 obj_handle_t handle; /* thread handle to terminate */
885 int exit_code; /* thread exit code */
886 @REPLY
887 int self; /* suicide? */
888 int last; /* last thread in this process? */
889 @END
892 /* Retrieve information about a process */
893 @REQ(get_process_info)
894 obj_handle_t handle; /* process handle */
895 @REPLY
896 process_id_t pid; /* server process id */
897 process_id_t ppid; /* server process id of parent */
898 affinity_t affinity; /* process affinity mask */
899 client_ptr_t peb; /* PEB address in process address space */
900 timeout_t start_time; /* process start time */
901 timeout_t end_time; /* process end time */
902 int exit_code; /* process exit code */
903 int priority; /* priority class */
904 client_cpu_t cpu; /* CPU that this process is running on */
905 short int debugger_present; /* process is being debugged */
906 short int debug_children; /* inherit debugger to child processes */
907 @END
910 /* Retrieve information about a process memory usage */
911 @REQ(get_process_vm_counters)
912 obj_handle_t handle; /* process handle */
913 @REPLY
914 mem_size_t peak_virtual_size; /* peak virtual memory in bytes */
915 mem_size_t virtual_size; /* virtual memory in bytes */
916 mem_size_t peak_working_set_size; /* peak real memory in bytes */
917 mem_size_t working_set_size; /* real memory in bytes */
918 mem_size_t pagefile_usage; /* commit charge in bytes */
919 mem_size_t peak_pagefile_usage; /* peak commit charge in bytes */
920 @END
923 /* Set a process information */
924 @REQ(set_process_info)
925 obj_handle_t handle; /* process handle */
926 int mask; /* setting mask (see below) */
927 int priority; /* priority class */
928 affinity_t affinity; /* affinity mask */
929 @END
930 #define SET_PROCESS_INFO_PRIORITY 0x01
931 #define SET_PROCESS_INFO_AFFINITY 0x02
934 /* Retrieve information about a thread */
935 @REQ(get_thread_info)
936 obj_handle_t handle; /* thread handle */
937 thread_id_t tid_in; /* thread id (optional) */
938 @REPLY
939 process_id_t pid; /* server process id */
940 thread_id_t tid; /* server thread id */
941 client_ptr_t teb; /* thread teb pointer */
942 client_ptr_t entry_point; /* thread entry point */
943 affinity_t affinity; /* thread affinity mask */
944 int exit_code; /* thread exit code */
945 int priority; /* thread priority level */
946 int last; /* last thread in process */
947 data_size_t desc_len; /* description length in bytes */
948 VARARG(desc,unicode_str); /* description string */
949 @END
952 /* Retrieve information about thread times */
953 @REQ(get_thread_times)
954 obj_handle_t handle; /* thread handle */
955 @REPLY
956 timeout_t creation_time; /* thread creation time */
957 timeout_t exit_time; /* thread exit time */
958 @END
961 /* Set a thread information */
962 @REQ(set_thread_info)
963 obj_handle_t handle; /* thread handle */
964 int mask; /* setting mask (see below) */
965 int priority; /* priority class */
966 affinity_t affinity; /* affinity mask */
967 client_ptr_t entry_point; /* thread entry point */
968 obj_handle_t token; /* impersonation token */
969 VARARG(desc,unicode_str); /* description string */
970 @END
971 #define SET_THREAD_INFO_PRIORITY 0x01
972 #define SET_THREAD_INFO_AFFINITY 0x02
973 #define SET_THREAD_INFO_TOKEN 0x04
974 #define SET_THREAD_INFO_ENTRYPOINT 0x08
975 #define SET_THREAD_INFO_DESCRIPTION 0x10
978 /* Retrieve information about a module */
979 @REQ(get_dll_info)
980 obj_handle_t handle; /* process handle */
981 mod_handle_t base_address; /* base address of module */
982 @REPLY
983 client_ptr_t entry_point;
984 data_size_t filename_len; /* buffer len in bytes required to store filename */
985 VARARG(filename,unicode_str); /* file name of module */
986 @END
989 /* Suspend a thread */
990 @REQ(suspend_thread)
991 obj_handle_t handle; /* thread handle */
992 @REPLY
993 int count; /* new suspend count */
994 @END
997 /* Resume a thread */
998 @REQ(resume_thread)
999 obj_handle_t handle; /* thread handle */
1000 @REPLY
1001 int count; /* new suspend count */
1002 @END
1005 /* Notify the server that a dll has been loaded */
1006 @REQ(load_dll)
1007 data_size_t dbg_offset; /* debug info offset */
1008 mod_handle_t base; /* base address */
1009 client_ptr_t name; /* ptr to ptr to name (in process addr space) */
1010 data_size_t dbg_size; /* debug info size */
1011 VARARG(filename,unicode_str); /* file name of dll */
1012 @END
1015 /* Notify the server that a dll is being unloaded */
1016 @REQ(unload_dll)
1017 mod_handle_t base; /* base address */
1018 @END
1021 /* Queue an APC for a thread or process */
1022 @REQ(queue_apc)
1023 obj_handle_t handle; /* thread or process handle */
1024 apc_call_t call; /* call arguments */
1025 @REPLY
1026 obj_handle_t handle; /* APC handle */
1027 int self; /* run APC in caller itself? */
1028 @END
1031 /* Get the result of an APC call */
1032 @REQ(get_apc_result)
1033 obj_handle_t handle; /* handle to the APC */
1034 @REPLY
1035 apc_result_t result; /* result of the APC */
1036 @END
1039 /* Close a handle for the current process */
1040 @REQ(close_handle)
1041 obj_handle_t handle; /* handle to close */
1042 @END
1045 /* Set a handle information */
1046 @REQ(set_handle_info)
1047 obj_handle_t handle; /* handle we are interested in */
1048 int flags; /* new handle flags */
1049 int mask; /* mask for flags to set */
1050 @REPLY
1051 int old_flags; /* old flag value */
1052 @END
1055 /* Duplicate a handle */
1056 @REQ(dup_handle)
1057 obj_handle_t src_process; /* src process handle */
1058 obj_handle_t src_handle; /* src handle to duplicate */
1059 obj_handle_t dst_process; /* dst process handle */
1060 unsigned int access; /* wanted access rights */
1061 unsigned int attributes; /* object attributes */
1062 unsigned int options; /* duplicate options (see below) */
1063 @REPLY
1064 obj_handle_t handle; /* duplicated handle in dst process */
1065 int self; /* is the source the current process? */
1066 int closed; /* whether the source handle has been closed */
1067 @END
1068 #define DUP_HANDLE_CLOSE_SOURCE DUPLICATE_CLOSE_SOURCE
1069 #define DUP_HANDLE_SAME_ACCESS DUPLICATE_SAME_ACCESS
1070 #define DUP_HANDLE_MAKE_GLOBAL 0x80000000 /* Not a Windows flag */
1073 /* Open a handle to a process */
1074 @REQ(open_process)
1075 process_id_t pid; /* process id to open */
1076 unsigned int access; /* wanted access rights */
1077 unsigned int attributes; /* object attributes */
1078 @REPLY
1079 obj_handle_t handle; /* handle to the process */
1080 @END
1083 /* Open a handle to a thread */
1084 @REQ(open_thread)
1085 thread_id_t tid; /* thread id to open */
1086 unsigned int access; /* wanted access rights */
1087 unsigned int attributes; /* object attributes */
1088 @REPLY
1089 obj_handle_t handle; /* handle to the thread */
1090 @END
1093 /* Wait for handles */
1094 @REQ(select)
1095 int flags; /* wait flags (see below) */
1096 client_ptr_t cookie; /* magic cookie to return to client */
1097 timeout_t timeout; /* timeout */
1098 obj_handle_t prev_apc; /* handle to previous APC */
1099 VARARG(result,apc_result); /* result of previous APC */
1100 VARARG(data,select_op); /* operation-specific data */
1101 @REPLY
1102 timeout_t timeout; /* timeout converted to absolute */
1103 apc_call_t call; /* APC call arguments */
1104 obj_handle_t apc_handle; /* handle to next APC */
1105 @END
1106 #define SELECT_ALERTABLE 1
1107 #define SELECT_INTERRUPTIBLE 2
1110 /* Create an event */
1111 @REQ(create_event)
1112 unsigned int access; /* wanted access rights */
1113 int manual_reset; /* manual reset event */
1114 int initial_state; /* initial state of the event */
1115 VARARG(objattr,object_attributes); /* object attributes */
1116 @REPLY
1117 obj_handle_t handle; /* handle to the event */
1118 @END
1120 /* Event operation */
1121 @REQ(event_op)
1122 obj_handle_t handle; /* handle to event */
1123 int op; /* event operation (see below) */
1124 @REPLY
1125 int state; /* previous state */
1126 @END
1127 enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT };
1129 @REQ(query_event)
1130 obj_handle_t handle; /* handle to event */
1131 @REPLY
1132 int manual_reset; /* manual reset event */
1133 int state; /* current state of the event */
1134 @END
1136 /* Open an event */
1137 @REQ(open_event)
1138 unsigned int access; /* wanted access rights */
1139 unsigned int attributes; /* object attributes */
1140 obj_handle_t rootdir; /* root directory */
1141 VARARG(name,unicode_str); /* object name */
1142 @REPLY
1143 obj_handle_t handle; /* handle to the event */
1144 @END
1147 /* Create a keyed event */
1148 @REQ(create_keyed_event)
1149 unsigned int access; /* wanted access rights */
1150 VARARG(objattr,object_attributes); /* object attributes */
1151 @REPLY
1152 obj_handle_t handle; /* handle to the event */
1153 @END
1155 /* Open a keyed event */
1156 @REQ(open_keyed_event)
1157 unsigned int access; /* wanted access rights */
1158 unsigned int attributes; /* object attributes */
1159 obj_handle_t rootdir; /* root directory */
1160 VARARG(name,unicode_str); /* object name */
1161 @REPLY
1162 obj_handle_t handle; /* handle to the event */
1163 @END
1166 /* Create a mutex */
1167 @REQ(create_mutex)
1168 unsigned int access; /* wanted access rights */
1169 int owned; /* initially owned? */
1170 VARARG(objattr,object_attributes); /* object attributes */
1171 @REPLY
1172 obj_handle_t handle; /* handle to the mutex */
1173 @END
1176 /* Release a mutex */
1177 @REQ(release_mutex)
1178 obj_handle_t handle; /* handle to the mutex */
1179 @REPLY
1180 unsigned int prev_count; /* value of internal counter, before release */
1181 @END
1184 /* Open a mutex */
1185 @REQ(open_mutex)
1186 unsigned int access; /* wanted access rights */
1187 unsigned int attributes; /* object attributes */
1188 obj_handle_t rootdir; /* root directory */
1189 VARARG(name,unicode_str); /* object name */
1190 @REPLY
1191 obj_handle_t handle; /* handle to the mutex */
1192 @END
1195 /* Query a mutex */
1196 @REQ(query_mutex)
1197 obj_handle_t handle; /* handle to mutex */
1198 @REPLY
1199 unsigned int count; /* current count of mutex */
1200 int owned; /* true if owned by current thread */
1201 int abandoned; /* true if abandoned */
1202 @END
1205 /* Create a semaphore */
1206 @REQ(create_semaphore)
1207 unsigned int access; /* wanted access rights */
1208 unsigned int initial; /* initial count */
1209 unsigned int max; /* maximum count */
1210 VARARG(objattr,object_attributes); /* object attributes */
1211 @REPLY
1212 obj_handle_t handle; /* handle to the semaphore */
1213 @END
1216 /* Release a semaphore */
1217 @REQ(release_semaphore)
1218 obj_handle_t handle; /* handle to the semaphore */
1219 unsigned int count; /* count to add to semaphore */
1220 @REPLY
1221 unsigned int prev_count; /* previous semaphore count */
1222 @END
1224 @REQ(query_semaphore)
1225 obj_handle_t handle; /* handle to the semaphore */
1226 @REPLY
1227 unsigned int current; /* current count */
1228 unsigned int max; /* maximum count */
1229 @END
1231 /* Open a semaphore */
1232 @REQ(open_semaphore)
1233 unsigned int access; /* wanted access rights */
1234 unsigned int attributes; /* object attributes */
1235 obj_handle_t rootdir; /* root directory */
1236 VARARG(name,unicode_str); /* object name */
1237 @REPLY
1238 obj_handle_t handle; /* handle to the semaphore */
1239 @END
1242 /* Create a file */
1243 @REQ(create_file)
1244 unsigned int access; /* wanted access rights */
1245 unsigned int sharing; /* sharing flags */
1246 int create; /* file create action */
1247 unsigned int options; /* file options */
1248 unsigned int attrs; /* file attributes for creation */
1249 VARARG(objattr,object_attributes); /* object attributes */
1250 VARARG(filename,string); /* file name */
1251 @REPLY
1252 obj_handle_t handle; /* handle to the file */
1253 @END
1256 /* Open a file object */
1257 @REQ(open_file_object)
1258 unsigned int access; /* wanted access rights */
1259 unsigned int attributes; /* open attributes */
1260 obj_handle_t rootdir; /* root directory */
1261 unsigned int sharing; /* sharing flags */
1262 unsigned int options; /* file options */
1263 VARARG(filename,unicode_str); /* file name */
1264 @REPLY
1265 obj_handle_t handle; /* handle to the file */
1266 @END
1269 /* Allocate a file handle for a Unix fd */
1270 @REQ(alloc_file_handle)
1271 unsigned int access; /* wanted access rights */
1272 unsigned int attributes; /* object attributes */
1273 int fd; /* file descriptor on the client side */
1274 @REPLY
1275 obj_handle_t handle; /* handle to the file */
1276 @END
1279 /* Get the Unix name from a file handle */
1280 @REQ(get_handle_unix_name)
1281 obj_handle_t handle; /* file handle */
1282 @REPLY
1283 data_size_t name_len; /* unix name length */
1284 VARARG(name,string); /* unix name */
1285 @END
1288 /* Get a Unix fd to access a file */
1289 @REQ(get_handle_fd)
1290 obj_handle_t handle; /* handle to the file */
1291 @REPLY
1292 int type; /* file type (see below) */
1293 int cacheable; /* can fd be cached in the client? */
1294 unsigned int access; /* file access rights */
1295 unsigned int options; /* file open options */
1296 @END
1297 enum server_fd_type
1299 FD_TYPE_INVALID, /* invalid file (no associated fd) */
1300 FD_TYPE_FILE, /* regular file */
1301 FD_TYPE_DIR, /* directory */
1302 FD_TYPE_SOCKET, /* socket */
1303 FD_TYPE_SERIAL, /* serial port */
1304 FD_TYPE_PIPE, /* named pipe */
1305 FD_TYPE_MAILSLOT, /* mailslot */
1306 FD_TYPE_CHAR, /* unspecified char device */
1307 FD_TYPE_DEVICE, /* Windows device file */
1308 FD_TYPE_NB_TYPES
1312 /* Retrieve (or allocate) the client-side directory cache entry */
1313 @REQ(get_directory_cache_entry)
1314 obj_handle_t handle; /* handle to the directory */
1315 @REPLY
1316 int entry; /* cache entry on the client side */
1317 VARARG(free,ints); /* entries that can be freed */
1318 @END
1321 /* Flush a file buffers */
1322 @REQ(flush)
1323 async_data_t async; /* async I/O parameters */
1324 @REPLY
1325 obj_handle_t event; /* event set when finished */
1326 @END
1328 /* Query file information */
1329 @REQ(get_file_info)
1330 obj_handle_t handle; /* handle to the file */
1331 unsigned int info_class; /* queried information class */
1332 @REPLY
1333 VARARG(data,bytes); /* file info data */
1334 @END
1336 /* Query volume information */
1337 @REQ(get_volume_info)
1338 obj_handle_t handle; /* handle to the file */
1339 unsigned int info_class; /* queried information class */
1340 @REPLY
1341 VARARG(data,bytes); /* volume info data */
1342 @END
1344 /* Lock a region of a file */
1345 @REQ(lock_file)
1346 obj_handle_t handle; /* handle to the file */
1347 file_pos_t offset; /* offset of start of lock */
1348 file_pos_t count; /* count of bytes to lock */
1349 int shared; /* shared or exclusive lock? */
1350 int wait; /* do we want to wait? */
1351 @REPLY
1352 obj_handle_t handle; /* handle to wait on */
1353 int overlapped; /* is it an overlapped I/O handle? */
1354 @END
1357 /* Unlock a region of a file */
1358 @REQ(unlock_file)
1359 obj_handle_t handle; /* handle to the file */
1360 file_pos_t offset; /* offset of start of unlock */
1361 file_pos_t count; /* count of bytes to unlock */
1362 @END
1365 /* Create a socket */
1366 @REQ(create_socket)
1367 unsigned int access; /* wanted access rights */
1368 unsigned int attributes; /* object attributes */
1369 int family; /* family, see socket manpage */
1370 int type; /* type, see socket manpage */
1371 int protocol; /* protocol, see socket manpage */
1372 unsigned int flags; /* socket flags */
1373 @REPLY
1374 obj_handle_t handle; /* handle to the new socket */
1375 @END
1378 /* Accept a socket */
1379 @REQ(accept_socket)
1380 obj_handle_t lhandle; /* handle to the listening socket */
1381 unsigned int access; /* wanted access rights */
1382 unsigned int attributes; /* object attributes */
1383 @REPLY
1384 obj_handle_t handle; /* handle to the new socket */
1385 @END
1388 /* Accept into an initialized socket */
1389 @REQ(accept_into_socket)
1390 obj_handle_t lhandle; /* handle to the listening socket */
1391 obj_handle_t ahandle; /* handle to the accepting socket */
1392 @END
1395 /* Set socket event parameters */
1396 @REQ(set_socket_event)
1397 obj_handle_t handle; /* handle to the socket */
1398 unsigned int mask; /* event mask */
1399 obj_handle_t event; /* event object */
1400 user_handle_t window; /* window to send the message to */
1401 unsigned int msg; /* message to send */
1402 @END
1405 /* Get socket event parameters */
1406 @REQ(get_socket_event)
1407 obj_handle_t handle; /* handle to the socket */
1408 int service; /* clear pending? */
1409 obj_handle_t c_event; /* event to clear */
1410 @REPLY
1411 unsigned int mask; /* event mask */
1412 unsigned int pmask; /* pending events */
1413 unsigned int state; /* status bits */
1414 VARARG(errors,ints); /* event errors */
1415 @END
1418 /* Get socket info */
1419 @REQ(get_socket_info)
1420 obj_handle_t handle; /* handle to the socket */
1421 @REPLY
1422 int family; /* family, see socket manpage */
1423 int type; /* type, see socket manpage */
1424 int protocol; /* protocol, see socket manpage */
1425 @END
1428 /* Re-enable pending socket events */
1429 @REQ(enable_socket_event)
1430 obj_handle_t handle; /* handle to the socket */
1431 unsigned int mask; /* events to re-enable */
1432 unsigned int sstate; /* status bits to set */
1433 unsigned int cstate; /* status bits to clear */
1434 @END
1436 @REQ(set_socket_deferred)
1437 obj_handle_t handle; /* handle to the socket */
1438 obj_handle_t deferred; /* handle to the socket for which accept() is deferred */
1439 @END
1441 /* Allocate a console (only used by a console renderer) */
1442 @REQ(alloc_console)
1443 unsigned int access; /* wanted access rights */
1444 unsigned int attributes; /* object attributes */
1445 process_id_t pid; /* pid of process which shall be attached to the console */
1446 int input_fd; /* if pid=-1 (bare console to current process), fd for input */
1447 @REPLY
1448 obj_handle_t handle_in; /* handle to console input */
1449 obj_handle_t event; /* handle to renderer events change notification */
1450 @END
1453 /* Free the console of the current process */
1454 @REQ(free_console)
1455 @END
1458 #define CONSOLE_RENDERER_NONE_EVENT 0x00
1459 #define CONSOLE_RENDERER_TITLE_EVENT 0x01
1460 #define CONSOLE_RENDERER_ACTIVE_SB_EVENT 0x02
1461 #define CONSOLE_RENDERER_SB_RESIZE_EVENT 0x03
1462 #define CONSOLE_RENDERER_UPDATE_EVENT 0x04
1463 #define CONSOLE_RENDERER_CURSOR_POS_EVENT 0x05
1464 #define CONSOLE_RENDERER_CURSOR_GEOM_EVENT 0x06
1465 #define CONSOLE_RENDERER_DISPLAY_EVENT 0x07
1466 #define CONSOLE_RENDERER_EXIT_EVENT 0x08
1467 struct console_renderer_event
1469 short event;
1470 union
1472 struct
1474 short top;
1475 short bottom;
1476 } update;
1477 struct
1479 short width;
1480 short height;
1481 } resize;
1482 struct
1484 short x;
1485 short y;
1486 } cursor_pos;
1487 struct
1489 short visible;
1490 short size;
1491 } cursor_geom;
1492 struct
1494 short left;
1495 short top;
1496 short width;
1497 short height;
1498 } display;
1499 } u;
1502 /* retrieve console events for the renderer */
1503 @REQ(get_console_renderer_events)
1504 obj_handle_t handle; /* handle to console input events */
1505 @REPLY
1506 VARARG(data,bytes); /* the various console_renderer_events */
1507 @END
1510 /* Open a handle to the process console */
1511 @REQ(open_console)
1512 obj_handle_t from; /* 0 (resp 1) input (resp output) of current process console */
1513 /* otherwise console_in handle to get active screen buffer? */
1514 unsigned int access; /* wanted access rights */
1515 unsigned int attributes; /* object attributes */
1516 int share; /* share mask (only for output handles) */
1517 @REPLY
1518 obj_handle_t handle; /* handle to the console */
1519 @END
1522 /* Attach to a other process's console */
1523 @REQ(attach_console)
1524 process_id_t pid; /* pid of attached console process */
1525 @REPLY
1526 obj_handle_t std_in; /* attached stdin */
1527 obj_handle_t std_out; /* attached stdout */
1528 obj_handle_t std_err; /* attached stderr */
1529 @END
1532 /* Get the input queue wait event */
1533 @REQ(get_console_wait_event)
1534 @REPLY
1535 obj_handle_t handle;
1536 @END
1538 /* Get a console mode (input or output) */
1539 @REQ(get_console_mode)
1540 obj_handle_t handle; /* handle to the console */
1541 @REPLY
1542 int mode; /* console mode */
1543 @END
1546 /* Set a console mode (input or output) */
1547 @REQ(set_console_mode)
1548 obj_handle_t handle; /* handle to the console */
1549 int mode; /* console mode */
1550 @END
1553 /* Set info about a console (input only) */
1554 @REQ(set_console_input_info)
1555 obj_handle_t handle; /* handle to console input, or 0 for process' console */
1556 int mask; /* setting mask (see below) */
1557 obj_handle_t active_sb; /* active screen buffer */
1558 int history_mode; /* whether we duplicate lines in history */
1559 int history_size; /* number of lines in history */
1560 int edition_mode; /* index to the edition mode flavors */
1561 int input_cp; /* console input codepage */
1562 int output_cp; /* console output codepage */
1563 user_handle_t win; /* console window if backend supports it */
1564 VARARG(title,unicode_str); /* console title */
1565 @END
1566 #define SET_CONSOLE_INPUT_INFO_ACTIVE_SB 0x01
1567 #define SET_CONSOLE_INPUT_INFO_TITLE 0x02
1568 #define SET_CONSOLE_INPUT_INFO_HISTORY_MODE 0x04
1569 #define SET_CONSOLE_INPUT_INFO_HISTORY_SIZE 0x08
1570 #define SET_CONSOLE_INPUT_INFO_EDITION_MODE 0x10
1571 #define SET_CONSOLE_INPUT_INFO_INPUT_CODEPAGE 0x20
1572 #define SET_CONSOLE_INPUT_INFO_OUTPUT_CODEPAGE 0x40
1573 #define SET_CONSOLE_INPUT_INFO_WIN 0x80
1576 /* Get info about a console (input only) */
1577 @REQ(get_console_input_info)
1578 obj_handle_t handle; /* handle to console input, or 0 for process' console */
1579 @REPLY
1580 int history_mode; /* whether we duplicate lines in history */
1581 int history_size; /* number of lines in history */
1582 int history_index; /* number of used lines in history */
1583 int edition_mode; /* index to the edition mode flavors */
1584 int input_cp; /* console input codepage */
1585 int output_cp; /* console output codepage */
1586 user_handle_t win; /* console window if backend supports it */
1587 VARARG(title,unicode_str); /* console title */
1588 @END
1591 /* appends a string to console's history */
1592 @REQ(append_console_input_history)
1593 obj_handle_t handle; /* handle to console input, or 0 for process' console */
1594 VARARG(line,unicode_str); /* line to add */
1595 @END
1598 /* appends a string to console's history */
1599 @REQ(get_console_input_history)
1600 obj_handle_t handle; /* handle to console input, or 0 for process' console */
1601 int index; /* index to get line from */
1602 @REPLY
1603 int total; /* total length of line in Unicode chars */
1604 VARARG(line,unicode_str); /* line to add */
1605 @END
1608 /* creates a new screen buffer on process' console */
1609 @REQ(create_console_output)
1610 obj_handle_t handle_in; /* handle to console input, or 0 for process' console */
1611 unsigned int access; /* wanted access rights */
1612 unsigned int attributes; /* object attributes */
1613 unsigned int share; /* sharing credentials */
1614 int fd; /* for bare consoles, fd the screen-buffer is attached to */
1615 @REPLY
1616 obj_handle_t handle_out; /* handle to the screen buffer */
1617 @END
1620 /* Set info about a console (output only) */
1621 @REQ(set_console_output_info)
1622 obj_handle_t handle; /* handle to the console */
1623 int mask; /* setting mask (see below) */
1624 short int cursor_size; /* size of cursor (percentage filled) */
1625 short int cursor_visible;/* cursor visibility flag */
1626 short int cursor_x; /* position of cursor (x, y) */
1627 short int cursor_y;
1628 short int width; /* width of the screen buffer */
1629 short int height; /* height of the screen buffer */
1630 short int attr; /* default fill attributes (screen colors) */
1631 short int popup_attr; /* pop-up color attributes */
1632 short int win_left; /* window actually displayed by renderer */
1633 short int win_top; /* the rect area is expressed within the */
1634 short int win_right; /* boundaries of the screen buffer */
1635 short int win_bottom;
1636 short int max_width; /* maximum size (width x height) for the window */
1637 short int max_height;
1638 short int font_width; /* font size (width x height) */
1639 short int font_height;
1640 short int font_weight; /* font weight */
1641 short int font_pitch_family; /* font pitch & family */
1642 VARARG(colors,uints,64); /* color table */
1643 VARARG(face_name,unicode_str); /* font face name */
1644 @END
1645 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_GEOM 0x0001
1646 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_POS 0x0002
1647 #define SET_CONSOLE_OUTPUT_INFO_SIZE 0x0004
1648 #define SET_CONSOLE_OUTPUT_INFO_ATTR 0x0008
1649 #define SET_CONSOLE_OUTPUT_INFO_DISPLAY_WINDOW 0x0010
1650 #define SET_CONSOLE_OUTPUT_INFO_MAX_SIZE 0x0020
1651 #define SET_CONSOLE_OUTPUT_INFO_FONT 0x0040
1652 #define SET_CONSOLE_OUTPUT_INFO_COLORTABLE 0x0080
1653 #define SET_CONSOLE_OUTPUT_INFO_POPUP_ATTR 0x0100
1656 /* Get info about a console (output only) */
1657 @REQ(get_console_output_info)
1658 obj_handle_t handle; /* handle to the console */
1659 @REPLY
1660 short int cursor_size; /* size of cursor (percentage filled) */
1661 short int cursor_visible;/* cursor visibility flag */
1662 short int cursor_x; /* position of cursor (x, y) */
1663 short int cursor_y;
1664 short int width; /* width of the screen buffer */
1665 short int height; /* height of the screen buffer */
1666 short int attr; /* default fill attributes (screen colors) */
1667 short int popup_attr; /* pop-up color attributes */
1668 short int win_left; /* window actually displayed by renderer */
1669 short int win_top; /* the rect area is expressed within the */
1670 short int win_right; /* boundaries of the screen buffer */
1671 short int win_bottom;
1672 short int max_width; /* maximum size (width x height) for the window */
1673 short int max_height;
1674 short int font_width; /* font size (width x height) */
1675 short int font_height;
1676 short int font_weight; /* font weight */
1677 short int font_pitch_family; /* font pitch & family */
1678 VARARG(colors,uints,64); /* color table */
1679 VARARG(face_name,unicode_str); /* font face name */
1680 @END
1682 /* Add input records to a console input queue */
1683 @REQ(write_console_input)
1684 obj_handle_t handle; /* handle to the console input */
1685 VARARG(rec,input_records); /* input records */
1686 @REPLY
1687 int written; /* number of records written */
1688 @END
1691 /* Fetch input records from a console input queue */
1692 @REQ(read_console_input)
1693 obj_handle_t handle; /* handle to the console input */
1694 int flush; /* flush the retrieved records from the queue? */
1695 @REPLY
1696 int read; /* number of records read */
1697 VARARG(rec,input_records); /* input records */
1698 @END
1701 /* write data (chars and/or attributes) in a screen buffer */
1702 @REQ(write_console_output)
1703 obj_handle_t handle; /* handle to the console output */
1704 int x; /* position where to start writing */
1705 int y;
1706 int mode; /* char info (see below) */
1707 int wrap; /* wrap around at end of line? */
1708 VARARG(data,bytes); /* info to write */
1709 @REPLY
1710 int written; /* number of char infos actually written */
1711 int width; /* width of screen buffer */
1712 int height; /* height of screen buffer */
1713 @END
1714 enum char_info_mode
1716 CHAR_INFO_MODE_TEXT, /* characters only */
1717 CHAR_INFO_MODE_ATTR, /* attributes only */
1718 CHAR_INFO_MODE_TEXTATTR, /* both characters and attributes */
1719 CHAR_INFO_MODE_TEXTSTDATTR /* characters but use standard attributes */
1723 /* fill a screen buffer with constant data (chars and/or attributes) */
1724 @REQ(fill_console_output)
1725 obj_handle_t handle; /* handle to the console output */
1726 int x; /* position where to start writing */
1727 int y;
1728 int mode; /* char info mode */
1729 int count; /* number to write */
1730 int wrap; /* wrap around at end of line? */
1731 char_info_t data; /* data to write */
1732 @REPLY
1733 int written; /* number of char infos actually written */
1734 @END
1737 /* read data (chars and/or attributes) from a screen buffer */
1738 @REQ(read_console_output)
1739 obj_handle_t handle; /* handle to the console output */
1740 int x; /* position (x,y) where to start reading */
1741 int y;
1742 int mode; /* char info mode */
1743 int wrap; /* wrap around at end of line? */
1744 @REPLY
1745 int width; /* width of screen buffer */
1746 int height; /* height of screen buffer */
1747 VARARG(data,bytes);
1748 @END
1751 /* move a rect (of data) in screen buffer content */
1752 @REQ(move_console_output)
1753 obj_handle_t handle; /* handle to the console output */
1754 short int x_src; /* position (x, y) of rect to start moving from */
1755 short int y_src;
1756 short int x_dst; /* position (x, y) of rect to move to */
1757 short int y_dst;
1758 short int w; /* size of the rect (width, height) to move */
1759 short int h;
1760 @END
1763 /* Sends a signal to a process group */
1764 @REQ(send_console_signal)
1765 int signal; /* the signal to send */
1766 process_id_t group_id; /* the group to send the signal to */
1767 @END
1770 /* enable directory change notifications */
1771 @REQ(read_directory_changes)
1772 unsigned int filter; /* notification filter */
1773 int subtree; /* watch the subtree? */
1774 int want_data; /* flag indicating whether change data should be collected */
1775 async_data_t async; /* async I/O parameters */
1776 @END
1779 @REQ(read_change)
1780 obj_handle_t handle;
1781 @REPLY
1782 VARARG(events,filesystem_event); /* collected filesystem events */
1783 @END
1786 /* Create a file mapping */
1787 @REQ(create_mapping)
1788 unsigned int access; /* wanted access rights */
1789 unsigned int flags; /* SEC_* flags */
1790 unsigned int file_access; /* file access rights */
1791 mem_size_t size; /* mapping size */
1792 obj_handle_t file_handle; /* file handle */
1793 VARARG(objattr,object_attributes); /* object attributes */
1794 @REPLY
1795 obj_handle_t handle; /* handle to the mapping */
1796 @END
1799 /* Open a mapping */
1800 @REQ(open_mapping)
1801 unsigned int access; /* wanted access rights */
1802 unsigned int attributes; /* object attributes */
1803 obj_handle_t rootdir; /* root directory */
1804 VARARG(name,unicode_str); /* object name */
1805 @REPLY
1806 obj_handle_t handle; /* handle to the mapping */
1807 @END
1810 /* Get information about a file mapping */
1811 @REQ(get_mapping_info)
1812 obj_handle_t handle; /* handle to the mapping */
1813 unsigned int access; /* wanted access rights */
1814 @REPLY
1815 mem_size_t size; /* mapping size */
1816 unsigned int flags; /* SEC_* flags */
1817 obj_handle_t shared_file; /* shared mapping file handle */
1818 VARARG(image,pe_image_info);/* image info for SEC_IMAGE mappings */
1819 @END
1822 /* Add a memory view in the current process */
1823 @REQ(map_view)
1824 obj_handle_t mapping; /* file mapping handle */
1825 unsigned int access; /* wanted access rights */
1826 client_ptr_t base; /* view base address (page-aligned) */
1827 mem_size_t size; /* view size */
1828 file_pos_t start; /* start offset in mapping */
1829 @END
1832 /* Unmap a memory view from the current process */
1833 @REQ(unmap_view)
1834 client_ptr_t base; /* view base address */
1835 @END
1838 /* Get a range of committed pages in a file mapping */
1839 @REQ(get_mapping_committed_range)
1840 client_ptr_t base; /* view base address */
1841 file_pos_t offset; /* starting offset (page-aligned, in bytes) */
1842 @REPLY
1843 mem_size_t size; /* size of range starting at offset (page-aligned, in bytes) */
1844 int committed; /* whether it is a committed range */
1845 @END
1848 /* Add a range to the committed pages in a file mapping */
1849 @REQ(add_mapping_committed_range)
1850 client_ptr_t base; /* view base address */
1851 file_pos_t offset; /* starting offset (page-aligned, in bytes) */
1852 mem_size_t size; /* size to set (page-aligned, in bytes) or 0 if only retrieving */
1853 @END
1856 /* Check if two memory maps are for the same file */
1857 @REQ(is_same_mapping)
1858 client_ptr_t base1; /* first view base address */
1859 client_ptr_t base2; /* second view base address */
1860 @END
1863 #define SNAP_PROCESS 0x00000001
1864 #define SNAP_THREAD 0x00000002
1865 /* Create a snapshot */
1866 @REQ(create_snapshot)
1867 unsigned int attributes; /* object attributes */
1868 unsigned int flags; /* snapshot flags (SNAP_*) */
1869 @REPLY
1870 obj_handle_t handle; /* handle to the snapshot */
1871 @END
1874 /* Get the next process from a snapshot */
1875 @REQ(next_process)
1876 obj_handle_t handle; /* handle to the snapshot */
1877 int reset; /* reset snapshot position? */
1878 @REPLY
1879 int count; /* process usage count */
1880 process_id_t pid; /* process id */
1881 process_id_t ppid; /* parent process id */
1882 int threads; /* number of threads */
1883 int priority; /* process priority */
1884 int handles; /* number of handles */
1885 int unix_pid; /* Unix pid */
1886 VARARG(filename,unicode_str); /* file name of main exe */
1887 @END
1890 /* Get the next thread from a snapshot */
1891 @REQ(next_thread)
1892 obj_handle_t handle; /* handle to the snapshot */
1893 int reset; /* reset snapshot position? */
1894 @REPLY
1895 int count; /* thread usage count */
1896 process_id_t pid; /* process id */
1897 thread_id_t tid; /* thread id */
1898 int base_pri; /* base priority */
1899 int delta_pri; /* delta priority */
1900 @END
1903 /* Wait for a debug event */
1904 @REQ(wait_debug_event)
1905 int get_handle; /* should we alloc a handle for waiting? */
1906 @REPLY
1907 process_id_t pid; /* process id */
1908 thread_id_t tid; /* thread id */
1909 obj_handle_t wait; /* wait handle if no event ready */
1910 VARARG(event,debug_event); /* debug event data */
1911 @END
1914 /* Queue an exception event */
1915 @REQ(queue_exception_event)
1916 int first; /* first chance exception? */
1917 unsigned int code; /* exception code */
1918 unsigned int flags; /* exception flags */
1919 client_ptr_t record; /* exception record */
1920 client_ptr_t address; /* exception address */
1921 data_size_t len; /* size of parameters */
1922 VARARG(params,uints64,len);/* exception parameters */
1923 VARARG(context,context); /* thread context */
1924 @REPLY
1925 obj_handle_t handle; /* handle to the queued event */
1926 @END
1929 /* Retrieve the status of an exception event */
1930 @REQ(get_exception_status)
1931 obj_handle_t handle; /* handle to the queued event */
1932 @REPLY
1933 VARARG(context,context); /* modified thread context */
1934 @END
1937 /* Continue a debug event */
1938 @REQ(continue_debug_event)
1939 process_id_t pid; /* process id to continue */
1940 thread_id_t tid; /* thread id to continue */
1941 int status; /* continuation status */
1942 @END
1945 /* Start/stop debugging an existing process */
1946 @REQ(debug_process)
1947 process_id_t pid; /* id of the process to debug */
1948 int attach; /* 1=attaching / 0=detaching from the process */
1949 @END
1952 /* Set debugger kill on exit flag */
1953 @REQ(set_debugger_kill_on_exit)
1954 int kill_on_exit; /* 0=detach/1=kill debuggee when debugger dies */
1955 @END
1958 /* Read data from a process address space */
1959 @REQ(read_process_memory)
1960 obj_handle_t handle; /* process handle */
1961 client_ptr_t addr; /* addr to read from */
1962 @REPLY
1963 VARARG(data,bytes); /* result data */
1964 @END
1967 /* Write data to a process address space */
1968 @REQ(write_process_memory)
1969 obj_handle_t handle; /* process handle */
1970 client_ptr_t addr; /* addr to write to */
1971 VARARG(data,bytes); /* data to write */
1972 @END
1975 /* Create a registry key */
1976 @REQ(create_key)
1977 unsigned int access; /* desired access rights */
1978 unsigned int options; /* creation options */
1979 VARARG(objattr,object_attributes); /* object attributes */
1980 VARARG(class,unicode_str); /* class name */
1981 @REPLY
1982 obj_handle_t hkey; /* handle to the created key */
1983 int created; /* has it been newly created? */
1984 @END
1986 /* Open a registry key */
1987 @REQ(open_key)
1988 obj_handle_t parent; /* handle to the parent key */
1989 unsigned int access; /* desired access rights */
1990 unsigned int attributes; /* object attributes */
1991 VARARG(name,unicode_str); /* key name */
1992 @REPLY
1993 obj_handle_t hkey; /* handle to the open key */
1994 @END
1997 /* Delete a registry key */
1998 @REQ(delete_key)
1999 obj_handle_t hkey; /* handle to the key */
2000 @END
2003 /* Flush a registry key */
2004 @REQ(flush_key)
2005 obj_handle_t hkey; /* handle to the key */
2006 @END
2009 /* Enumerate registry subkeys */
2010 @REQ(enum_key)
2011 obj_handle_t hkey; /* handle to registry key */
2012 int index; /* index of subkey (or -1 for current key) */
2013 int info_class; /* requested information class */
2014 @REPLY
2015 int subkeys; /* number of subkeys */
2016 int max_subkey; /* longest subkey name */
2017 int max_class; /* longest class name */
2018 int values; /* number of values */
2019 int max_value; /* longest value name */
2020 int max_data; /* longest value data */
2021 timeout_t modif; /* last modification time */
2022 data_size_t total; /* total length needed for full name and class */
2023 data_size_t namelen; /* length of key name in bytes */
2024 VARARG(name,unicode_str,namelen); /* key name */
2025 VARARG(class,unicode_str); /* class name */
2026 @END
2029 /* Set a value of a registry key */
2030 @REQ(set_key_value)
2031 obj_handle_t hkey; /* handle to registry key */
2032 int type; /* value type */
2033 data_size_t namelen; /* length of value name in bytes */
2034 VARARG(name,unicode_str,namelen); /* value name */
2035 VARARG(data,bytes); /* value data */
2036 @END
2039 /* Retrieve the value of a registry key */
2040 @REQ(get_key_value)
2041 obj_handle_t hkey; /* handle to registry key */
2042 VARARG(name,unicode_str); /* value name */
2043 @REPLY
2044 int type; /* value type */
2045 data_size_t total; /* total length needed for data */
2046 VARARG(data,bytes); /* value data */
2047 @END
2050 /* Enumerate a value of a registry key */
2051 @REQ(enum_key_value)
2052 obj_handle_t hkey; /* handle to registry key */
2053 int index; /* value index */
2054 int info_class; /* requested information class */
2055 @REPLY
2056 int type; /* value type */
2057 data_size_t total; /* total length needed for full name and data */
2058 data_size_t namelen; /* length of value name in bytes */
2059 VARARG(name,unicode_str,namelen); /* value name */
2060 VARARG(data,bytes); /* value data */
2061 @END
2064 /* Delete a value of a registry key */
2065 @REQ(delete_key_value)
2066 obj_handle_t hkey; /* handle to registry key */
2067 VARARG(name,unicode_str); /* value name */
2068 @END
2071 /* Load a registry branch from a file */
2072 @REQ(load_registry)
2073 obj_handle_t file; /* file to load from */
2074 VARARG(objattr,object_attributes); /* object attributes */
2075 @END
2078 /* UnLoad a registry branch from a file */
2079 @REQ(unload_registry)
2080 obj_handle_t hkey; /* root key to unload to */
2081 @END
2084 /* Save a registry branch to a file */
2085 @REQ(save_registry)
2086 obj_handle_t hkey; /* key to save */
2087 obj_handle_t file; /* file to save to */
2088 @END
2091 /* Add a registry key change notification */
2092 @REQ(set_registry_notification)
2093 obj_handle_t hkey; /* key to watch for changes */
2094 obj_handle_t event; /* event to set */
2095 int subtree; /* should we watch the whole subtree? */
2096 unsigned int filter; /* things to watch */
2097 @END
2100 /* Create a waitable timer */
2101 @REQ(create_timer)
2102 unsigned int access; /* wanted access rights */
2103 int manual; /* manual reset */
2104 VARARG(objattr,object_attributes); /* object attributes */
2105 @REPLY
2106 obj_handle_t handle; /* handle to the timer */
2107 @END
2110 /* Open a waitable timer */
2111 @REQ(open_timer)
2112 unsigned int access; /* wanted access rights */
2113 unsigned int attributes; /* object attributes */
2114 obj_handle_t rootdir; /* root directory */
2115 VARARG(name,unicode_str); /* object name */
2116 @REPLY
2117 obj_handle_t handle; /* handle to the timer */
2118 @END
2120 /* Set a waitable timer */
2121 @REQ(set_timer)
2122 obj_handle_t handle; /* handle to the timer */
2123 timeout_t expire; /* next expiration absolute time */
2124 client_ptr_t callback; /* callback function */
2125 client_ptr_t arg; /* callback argument */
2126 int period; /* timer period in ms */
2127 @REPLY
2128 int signaled; /* was the timer signaled before this call ? */
2129 @END
2131 /* Cancel a waitable timer */
2132 @REQ(cancel_timer)
2133 obj_handle_t handle; /* handle to the timer */
2134 @REPLY
2135 int signaled; /* was the timer signaled before this calltime ? */
2136 @END
2138 /* Get information on a waitable timer */
2139 @REQ(get_timer_info)
2140 obj_handle_t handle; /* handle to the timer */
2141 @REPLY
2142 timeout_t when; /* absolute time when the timer next expires */
2143 int signaled; /* is the timer signaled? */
2144 @END
2147 /* Retrieve the current context of a thread */
2148 @REQ(get_thread_context)
2149 obj_handle_t handle; /* thread handle */
2150 unsigned int flags; /* context flags */
2151 int suspend; /* suspend the thread if needed */
2152 @REPLY
2153 int self; /* was it a handle to the current thread? */
2154 VARARG(context,context); /* thread context */
2155 @END
2158 /* Set the current context of a thread */
2159 @REQ(set_thread_context)
2160 obj_handle_t handle; /* thread handle */
2161 int suspend; /* suspend the thread if needed */
2162 VARARG(context,context); /* thread context */
2163 @REPLY
2164 int self; /* was it a handle to the current thread? */
2165 @END
2168 /* Fetch a selector entry for a thread */
2169 @REQ(get_selector_entry)
2170 obj_handle_t handle; /* thread handle */
2171 int entry; /* LDT entry */
2172 @REPLY
2173 unsigned int base; /* selector base */
2174 unsigned int limit; /* selector limit */
2175 unsigned char flags; /* selector flags */
2176 @END
2179 /* Add an atom */
2180 @REQ(add_atom)
2181 obj_handle_t table; /* which table to add atom to */
2182 VARARG(name,unicode_str); /* atom name */
2183 @REPLY
2184 atom_t atom; /* resulting atom */
2185 @END
2188 /* Delete an atom */
2189 @REQ(delete_atom)
2190 obj_handle_t table; /* which table to delete atom from */
2191 atom_t atom; /* atom handle */
2192 @END
2195 /* Find an atom */
2196 @REQ(find_atom)
2197 obj_handle_t table; /* which table to find atom from */
2198 VARARG(name,unicode_str); /* atom name */
2199 @REPLY
2200 atom_t atom; /* atom handle */
2201 @END
2204 /* Get information about an atom */
2205 @REQ(get_atom_information)
2206 obj_handle_t table; /* which table to find atom from */
2207 atom_t atom; /* atom handle */
2208 @REPLY
2209 int count; /* atom lock count */
2210 int pinned; /* whether the atom has been pinned */
2211 data_size_t total; /* actual length of atom name */
2212 VARARG(name,unicode_str); /* atom name */
2213 @END
2216 /* Set information about an atom */
2217 @REQ(set_atom_information)
2218 obj_handle_t table; /* which table to find atom from */
2219 atom_t atom; /* atom handle */
2220 int pinned; /* whether to bump atom information */
2221 @END
2224 /* Empty an atom table */
2225 @REQ(empty_atom_table)
2226 obj_handle_t table; /* which table to find atom from */
2227 int if_pinned; /* whether to delete pinned atoms */
2228 @END
2231 /* Init an atom table */
2232 @REQ(init_atom_table)
2233 int entries; /* number of entries (only for local) */
2234 @REPLY
2235 obj_handle_t table; /* handle to the atom table */
2236 @END
2239 /* Get the message queue of the current thread */
2240 @REQ(get_msg_queue)
2241 @REPLY
2242 obj_handle_t handle; /* handle to the queue */
2243 @END
2246 /* Set the file descriptor associated to the current thread queue */
2247 @REQ(set_queue_fd)
2248 obj_handle_t handle; /* handle to the file descriptor */
2249 @END
2252 /* Set the current message queue wakeup mask */
2253 @REQ(set_queue_mask)
2254 unsigned int wake_mask; /* wakeup bits mask */
2255 unsigned int changed_mask; /* changed bits mask */
2256 int skip_wait; /* will we skip waiting if signaled? */
2257 @REPLY
2258 unsigned int wake_bits; /* current wake bits */
2259 unsigned int changed_bits; /* current changed bits */
2260 @END
2263 /* Get the current message queue status */
2264 @REQ(get_queue_status)
2265 unsigned int clear_bits; /* should we clear the change bits? */
2266 @REPLY
2267 unsigned int wake_bits; /* wake bits */
2268 unsigned int changed_bits; /* changed bits since last time */
2269 @END
2272 /* Retrieve the process idle event */
2273 @REQ(get_process_idle_event)
2274 obj_handle_t handle; /* process handle */
2275 @REPLY
2276 obj_handle_t event; /* handle to idle event */
2277 @END
2280 /* Send a message to a thread queue */
2281 @REQ(send_message)
2282 thread_id_t id; /* thread id */
2283 int type; /* message type (see below) */
2284 int flags; /* message flags (see below) */
2285 user_handle_t win; /* window handle */
2286 unsigned int msg; /* message code */
2287 lparam_t wparam; /* parameters */
2288 lparam_t lparam; /* parameters */
2289 timeout_t timeout; /* timeout for reply */
2290 VARARG(data,message_data); /* message data for sent messages */
2291 @END
2293 @REQ(post_quit_message)
2294 int exit_code; /* exit code to return */
2295 @END
2297 enum message_type
2299 MSG_ASCII, /* Ascii message (from SendMessageA) */
2300 MSG_UNICODE, /* Unicode message (from SendMessageW) */
2301 MSG_NOTIFY, /* notify message (from SendNotifyMessageW), always Unicode */
2302 MSG_CALLBACK, /* callback message (from SendMessageCallbackW), always Unicode */
2303 MSG_CALLBACK_RESULT,/* result of a callback message */
2304 MSG_OTHER_PROCESS, /* sent from other process, may include vararg data, always Unicode */
2305 MSG_POSTED, /* posted message (from PostMessageW), always Unicode */
2306 MSG_HARDWARE, /* hardware message */
2307 MSG_WINEVENT, /* winevent message */
2308 MSG_HOOK_LL /* low-level hardware hook */
2310 #define SEND_MSG_ABORT_IF_HUNG 0x01
2313 /* Send a hardware message to a thread queue */
2314 @REQ(send_hardware_message)
2315 user_handle_t win; /* window handle */
2316 hw_input_t input; /* input data */
2317 unsigned int flags; /* flags (see below) */
2318 @REPLY
2319 int wait; /* do we need to wait for a reply? */
2320 int prev_x; /* previous cursor position */
2321 int prev_y;
2322 int new_x; /* new cursor position */
2323 int new_y;
2324 VARARG(keystate,bytes); /* global state array for all the keys */
2325 @END
2326 #define SEND_HWMSG_INJECTED 0x01
2329 /* Get a message from the current queue */
2330 @REQ(get_message)
2331 unsigned int flags; /* PM_* flags */
2332 user_handle_t get_win; /* window handle to get */
2333 unsigned int get_first; /* first message code to get */
2334 unsigned int get_last; /* last message code to get */
2335 unsigned int hw_id; /* id of the previous hardware message (or 0) */
2336 unsigned int wake_mask; /* wakeup bits mask */
2337 unsigned int changed_mask; /* changed bits mask */
2338 @REPLY
2339 user_handle_t win; /* window handle */
2340 unsigned int msg; /* message code */
2341 lparam_t wparam; /* parameters */
2342 lparam_t lparam; /* parameters */
2343 int type; /* message type */
2344 int x; /* message x position */
2345 int y; /* message y position */
2346 unsigned int time; /* message time */
2347 unsigned int active_hooks; /* active hooks bitmap */
2348 data_size_t total; /* total size of extra data */
2349 VARARG(data,message_data); /* message data for sent messages */
2350 @END
2353 /* Reply to a sent message */
2354 @REQ(reply_message)
2355 int remove; /* should we remove the message? */
2356 lparam_t result; /* message result */
2357 VARARG(data,bytes); /* message data for sent messages */
2358 @END
2361 /* Accept the current hardware message */
2362 @REQ(accept_hardware_message)
2363 unsigned int hw_id; /* id of the hardware message */
2364 int remove; /* should we remove the message? */
2365 @END
2368 /* Retrieve the reply for the last message sent */
2369 @REQ(get_message_reply)
2370 int cancel; /* cancel message if not ready? */
2371 @REPLY
2372 lparam_t result; /* message result */
2373 VARARG(data,bytes); /* message data for sent messages */
2374 @END
2377 /* Set a window timer */
2378 @REQ(set_win_timer)
2379 user_handle_t win; /* window handle */
2380 unsigned int msg; /* message to post */
2381 unsigned int rate; /* timer rate in ms */
2382 lparam_t id; /* timer id */
2383 lparam_t lparam; /* message lparam (callback proc) */
2384 @REPLY
2385 lparam_t id; /* timer id */
2386 @END
2389 /* Kill a window timer */
2390 @REQ(kill_win_timer)
2391 user_handle_t win; /* window handle */
2392 lparam_t id; /* timer id */
2393 unsigned int msg; /* message to post */
2394 @END
2397 /* check if the thread owning the window is hung */
2398 @REQ(is_window_hung)
2399 user_handle_t win; /* window handle */
2400 @REPLY
2401 int is_hung;
2402 @END
2405 /* Retrieve info about a serial port */
2406 @REQ(get_serial_info)
2407 obj_handle_t handle; /* handle to comm port */
2408 int flags;
2409 @REPLY
2410 unsigned int eventmask;
2411 unsigned int cookie;
2412 unsigned int pending_write;
2413 @END
2416 /* Set info about a serial port */
2417 @REQ(set_serial_info)
2418 obj_handle_t handle; /* handle to comm port */
2419 int flags; /* bitmask to set values (see below) */
2420 @END
2421 #define SERIALINFO_PENDING_WRITE 0x04
2422 #define SERIALINFO_PENDING_WAIT 0x08
2425 /* Create an async I/O */
2426 @REQ(register_async)
2427 int type; /* type of queue to look after */
2428 async_data_t async; /* async I/O parameters */
2429 int count; /* count - usually # of bytes to be read/written */
2430 @END
2431 #define ASYNC_TYPE_READ 0x01
2432 #define ASYNC_TYPE_WRITE 0x02
2433 #define ASYNC_TYPE_WAIT 0x03
2436 /* Cancel all async op on a fd */
2437 @REQ(cancel_async)
2438 obj_handle_t handle; /* handle to comm port, socket or file */
2439 client_ptr_t iosb; /* I/O status block (NULL=all) */
2440 int only_thread; /* cancel matching this thread */
2441 @END
2444 /* Retrieve results of an async */
2445 @REQ(get_async_result)
2446 client_ptr_t user_arg; /* user arg used to identify async */
2447 @REPLY
2448 data_size_t size; /* result size (input or output depending on the operation) */
2449 VARARG(out_data,bytes); /* iosb output data */
2450 @END
2453 /* Perform a read on a file object */
2454 @REQ(read)
2455 async_data_t async; /* async I/O parameters */
2456 file_pos_t pos; /* read position */
2457 @REPLY
2458 obj_handle_t wait; /* handle to wait on for blocking read */
2459 unsigned int options; /* device open options */
2460 VARARG(data,bytes); /* read data */
2461 @END
2464 /* Perform a write on a file object */
2465 @REQ(write)
2466 async_data_t async; /* async I/O parameters */
2467 file_pos_t pos; /* write position */
2468 VARARG(data,bytes); /* write data */
2469 @REPLY
2470 obj_handle_t wait; /* handle to wait on for blocking write */
2471 unsigned int options; /* device open options */
2472 data_size_t size; /* size written */
2473 @END
2476 /* Perform an ioctl on a file */
2477 @REQ(ioctl)
2478 ioctl_code_t code; /* ioctl code */
2479 async_data_t async; /* async I/O parameters */
2480 VARARG(in_data,bytes); /* ioctl input data */
2481 @REPLY
2482 obj_handle_t wait; /* handle to wait on for blocking ioctl */
2483 unsigned int options; /* device open options */
2484 VARARG(out_data,bytes); /* ioctl output data */
2485 @END
2488 /* Store results of an async irp */
2489 @REQ(set_irp_result)
2490 obj_handle_t handle; /* handle to the irp */
2491 unsigned int status; /* status of the irp */
2492 data_size_t size; /* result size (input or output depending on the operation) */
2493 VARARG(data,bytes); /* output data of the irp */
2494 @END
2497 /* Create a named pipe */
2498 @REQ(create_named_pipe)
2499 unsigned int access;
2500 unsigned int options;
2501 unsigned int sharing;
2502 unsigned int maxinstances;
2503 unsigned int outsize;
2504 unsigned int insize;
2505 timeout_t timeout;
2506 unsigned int flags;
2507 VARARG(objattr,object_attributes); /* object attributes */
2508 @REPLY
2509 obj_handle_t handle; /* handle to the pipe */
2510 @END
2512 /* flags in create_named_pipe and get_named_pipe_info */
2513 #define NAMED_PIPE_MESSAGE_STREAM_WRITE 0x0001
2514 #define NAMED_PIPE_MESSAGE_STREAM_READ 0x0002
2515 #define NAMED_PIPE_NONBLOCKING_MODE 0x0004
2516 #define NAMED_PIPE_SERVER_END 0x8000
2518 /* Set named pipe information by handle */
2519 @REQ(set_named_pipe_info)
2520 obj_handle_t handle;
2521 unsigned int flags;
2522 @END
2524 /* Create a window */
2525 @REQ(create_window)
2526 user_handle_t parent; /* parent window */
2527 user_handle_t owner; /* owner window */
2528 atom_t atom; /* class atom */
2529 mod_handle_t instance; /* module instance */
2530 int dpi; /* system DPI */
2531 int awareness; /* thread DPI awareness */
2532 VARARG(class,unicode_str); /* class name */
2533 @REPLY
2534 user_handle_t handle; /* created window */
2535 user_handle_t parent; /* full handle of parent */
2536 user_handle_t owner; /* full handle of owner */
2537 int extra; /* number of extra bytes */
2538 client_ptr_t class_ptr; /* pointer to class in client address space */
2539 int dpi; /* window DPI if not per-monitor aware */
2540 int awareness; /* window DPI awareness */
2541 @END
2544 /* Destroy a window */
2545 @REQ(destroy_window)
2546 user_handle_t handle; /* handle to the window */
2547 @END
2550 /* Retrieve the desktop window for the current thread */
2551 @REQ(get_desktop_window)
2552 int force; /* force creation if it doesn't exist */
2553 @REPLY
2554 user_handle_t top_window; /* handle to the desktop window */
2555 user_handle_t msg_window; /* handle to the top-level HWND_MESSAGE parent */
2556 @END
2559 /* Set a window owner */
2560 @REQ(set_window_owner)
2561 user_handle_t handle; /* handle to the window */
2562 user_handle_t owner; /* new owner */
2563 @REPLY
2564 user_handle_t full_owner; /* full handle of new owner */
2565 user_handle_t prev_owner; /* full handle of previous owner */
2566 @END
2569 /* Get information from a window handle */
2570 @REQ(get_window_info)
2571 user_handle_t handle; /* handle to the window */
2572 @REPLY
2573 user_handle_t full_handle; /* full 32-bit handle */
2574 user_handle_t last_active; /* last active popup */
2575 process_id_t pid; /* process owning the window */
2576 thread_id_t tid; /* thread owning the window */
2577 atom_t atom; /* class atom */
2578 int is_unicode; /* ANSI or unicode */
2579 int dpi; /* window DPI */
2580 int awareness; /* DPI awareness */
2581 @END
2584 /* Set some information in a window */
2585 @REQ(set_window_info)
2586 unsigned short flags; /* flags for fields to set (see below) */
2587 short int is_unicode; /* ANSI or unicode */
2588 user_handle_t handle; /* handle to the window */
2589 unsigned int style; /* window style */
2590 unsigned int ex_style; /* window extended style */
2591 unsigned int id; /* window id */
2592 mod_handle_t instance; /* creator instance */
2593 lparam_t user_data; /* user-specific data */
2594 int extra_offset; /* offset to set in extra bytes */
2595 data_size_t extra_size; /* size to set in extra bytes */
2596 lparam_t extra_value; /* value to set in extra bytes */
2597 @REPLY
2598 unsigned int old_style; /* old window style */
2599 unsigned int old_ex_style; /* old window extended style */
2600 mod_handle_t old_instance; /* old creator instance */
2601 lparam_t old_user_data; /* old user-specific data */
2602 lparam_t old_extra_value; /* old value in extra bytes */
2603 unsigned int old_id; /* old window id */
2604 @END
2605 #define SET_WIN_STYLE 0x01
2606 #define SET_WIN_EXSTYLE 0x02
2607 #define SET_WIN_ID 0x04
2608 #define SET_WIN_INSTANCE 0x08
2609 #define SET_WIN_USERDATA 0x10
2610 #define SET_WIN_EXTRA 0x20
2611 #define SET_WIN_UNICODE 0x40
2614 /* Set the parent of a window */
2615 @REQ(set_parent)
2616 user_handle_t handle; /* handle to the window */
2617 user_handle_t parent; /* handle to the parent */
2618 @REPLY
2619 user_handle_t old_parent; /* old parent window */
2620 user_handle_t full_parent; /* full handle of new parent */
2621 int dpi; /* new window DPI if not per-monitor aware */
2622 int awareness; /* new DPI awareness */
2623 @END
2626 /* Get a list of the window parents, up to the root of the tree */
2627 @REQ(get_window_parents)
2628 user_handle_t handle; /* handle to the window */
2629 @REPLY
2630 int count; /* total count of parents */
2631 VARARG(parents,user_handles); /* parent handles */
2632 @END
2635 /* Get a list of the window children */
2636 @REQ(get_window_children)
2637 obj_handle_t desktop; /* handle to desktop */
2638 user_handle_t parent; /* parent window */
2639 atom_t atom; /* class atom for the listed children */
2640 thread_id_t tid; /* thread owning the listed children */
2641 VARARG(class,unicode_str); /* class name */
2642 @REPLY
2643 int count; /* total count of children */
2644 VARARG(children,user_handles); /* children handles */
2645 @END
2648 /* Get a list of the window children that contain a given point */
2649 @REQ(get_window_children_from_point)
2650 user_handle_t parent; /* parent window */
2651 int x; /* point in parent coordinates */
2652 int y;
2653 int dpi; /* dpi for the point coordinates */
2654 @REPLY
2655 int count; /* total count of children */
2656 VARARG(children,user_handles); /* children handles */
2657 @END
2660 /* Get window tree information from a window handle */
2661 @REQ(get_window_tree)
2662 user_handle_t handle; /* handle to the window */
2663 @REPLY
2664 user_handle_t parent; /* parent window */
2665 user_handle_t owner; /* owner window */
2666 user_handle_t next_sibling; /* next sibling in Z-order */
2667 user_handle_t prev_sibling; /* prev sibling in Z-order */
2668 user_handle_t first_sibling; /* first sibling in Z-order */
2669 user_handle_t last_sibling; /* last sibling in Z-order */
2670 user_handle_t first_child; /* first child */
2671 user_handle_t last_child; /* last child */
2672 @END
2674 /* Set the position and Z order of a window */
2675 @REQ(set_window_pos)
2676 unsigned short swp_flags; /* SWP_* flags */
2677 unsigned short paint_flags; /* paint flags (see below) */
2678 user_handle_t handle; /* handle to the window */
2679 user_handle_t previous; /* previous window in Z order */
2680 rectangle_t window; /* window rectangle (in parent coords) */
2681 rectangle_t client; /* client rectangle (in parent coords) */
2682 VARARG(valid,rectangles); /* valid rectangles from WM_NCCALCSIZE (in parent coords) */
2683 @REPLY
2684 unsigned int new_style; /* new window style */
2685 unsigned int new_ex_style; /* new window extended style */
2686 user_handle_t surface_win; /* parent window that holds the surface */
2687 int needs_update; /* whether the surface region needs an update */
2688 @END
2689 #define SET_WINPOS_PAINT_SURFACE 0x01 /* window has a paintable surface */
2690 #define SET_WINPOS_PIXEL_FORMAT 0x02 /* window has a custom pixel format */
2692 /* Get the window and client rectangles of a window */
2693 @REQ(get_window_rectangles)
2694 user_handle_t handle; /* handle to the window */
2695 int relative; /* coords relative to (see below) */
2696 int dpi; /* DPI to map to, or zero for per-monitor DPI */
2697 @REPLY
2698 rectangle_t window; /* window rectangle */
2699 rectangle_t client; /* client rectangle */
2700 @END
2701 enum coords_relative
2703 COORDS_CLIENT, /* relative to client area */
2704 COORDS_WINDOW, /* relative to whole window area */
2705 COORDS_PARENT, /* relative to parent's client area */
2706 COORDS_SCREEN /* relative to screen origin */
2710 /* Get the window text */
2711 @REQ(get_window_text)
2712 user_handle_t handle; /* handle to the window */
2713 @REPLY
2714 data_size_t length; /* total length in WCHARs */
2715 VARARG(text,unicode_str); /* window text */
2716 @END
2719 /* Set the window text */
2720 @REQ(set_window_text)
2721 user_handle_t handle; /* handle to the window */
2722 VARARG(text,unicode_str); /* window text */
2723 @END
2726 /* Get the coordinates offset between two windows */
2727 @REQ(get_windows_offset)
2728 user_handle_t from; /* handle to the first window */
2729 user_handle_t to; /* handle to the second window */
2730 int dpi; /* DPI to map to, or zero for per-monitor DPI */
2731 @REPLY
2732 int x; /* x coordinate offset */
2733 int y; /* y coordinate offset */
2734 int mirror; /* whether to mirror the x coordinate */
2735 @END
2738 /* Get the visible region of a window */
2739 @REQ(get_visible_region)
2740 user_handle_t window; /* handle to the window */
2741 unsigned int flags; /* DCX flags */
2742 @REPLY
2743 user_handle_t top_win; /* top window to clip against */
2744 rectangle_t top_rect; /* top window visible rect with screen coords */
2745 rectangle_t win_rect; /* window rect in screen coords */
2746 unsigned int paint_flags; /* paint flags (from SET_WINPOS_* flags) */
2747 data_size_t total_size; /* total size of the resulting region */
2748 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2749 @END
2752 /* Get the visible surface region of a window */
2753 @REQ(get_surface_region)
2754 user_handle_t window; /* handle to the window */
2755 @REPLY
2756 rectangle_t visible_rect; /* window visible rect in screen coords */
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 window region */
2763 @REQ(get_window_region)
2764 user_handle_t window; /* handle to the window */
2765 @REPLY
2766 data_size_t total_size; /* total size of the resulting region */
2767 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2768 @END
2771 /* Set the window region */
2772 @REQ(set_window_region)
2773 user_handle_t window; /* handle to the window */
2774 int redraw; /* redraw the window? */
2775 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2776 @END
2779 /* Get the window update region */
2780 @REQ(get_update_region)
2781 user_handle_t window; /* handle to the window */
2782 user_handle_t from_child; /* child to start searching from */
2783 unsigned int flags; /* update flags (see below) */
2784 @REPLY
2785 user_handle_t child; /* child to repaint (or window itself) */
2786 unsigned int flags; /* resulting update flags (see below) */
2787 data_size_t total_size; /* total size of the resulting region */
2788 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2789 @END
2790 #define UPDATE_NONCLIENT 0x001 /* get region for repainting non-client area */
2791 #define UPDATE_ERASE 0x002 /* get region for erasing client area */
2792 #define UPDATE_PAINT 0x004 /* get region for painting client area */
2793 #define UPDATE_INTERNALPAINT 0x008 /* get region if internal paint is pending */
2794 #define UPDATE_ALLCHILDREN 0x010 /* force repaint of all children */
2795 #define UPDATE_NOCHILDREN 0x020 /* don't try to repaint any children */
2796 #define UPDATE_NOREGION 0x040 /* don't return a region, only the flags */
2797 #define UPDATE_DELAYED_ERASE 0x080 /* still needs erase after BeginPaint */
2798 #define UPDATE_CLIPCHILDREN 0x100 /* remove clipped children from the update region */
2801 /* Update the z order of a window so that a given rectangle is fully visible */
2802 @REQ(update_window_zorder)
2803 user_handle_t window; /* handle to the window */
2804 rectangle_t rect; /* rectangle that must be visible (in client coords) */
2805 @END
2808 /* Mark parts of a window as needing a redraw */
2809 @REQ(redraw_window)
2810 user_handle_t window; /* handle to the window */
2811 unsigned int flags; /* RDW_* flags */
2812 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2813 @END
2816 /* Set a window property */
2817 @REQ(set_window_property)
2818 user_handle_t window; /* handle to the window */
2819 lparam_t data; /* data to store */
2820 atom_t atom; /* property atom (if no name specified) */
2821 VARARG(name,unicode_str); /* property name */
2822 @END
2825 /* Remove a window property */
2826 @REQ(remove_window_property)
2827 user_handle_t window; /* handle to the window */
2828 atom_t atom; /* property atom (if no name specified) */
2829 VARARG(name,unicode_str); /* property name */
2830 @REPLY
2831 lparam_t data; /* data stored in property */
2832 @END
2835 /* Get a window property */
2836 @REQ(get_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 the list of properties of a window */
2846 @REQ(get_window_properties)
2847 user_handle_t window; /* handle to the window */
2848 @REPLY
2849 int total; /* total number of properties */
2850 VARARG(props,properties); /* list of properties */
2851 @END
2854 /* Create a window station */
2855 @REQ(create_winstation)
2856 unsigned int flags; /* window station flags */
2857 unsigned int access; /* wanted access rights */
2858 unsigned int attributes; /* object attributes */
2859 obj_handle_t rootdir; /* root directory */
2860 VARARG(name,unicode_str); /* object name */
2861 @REPLY
2862 obj_handle_t handle; /* handle to the window station */
2863 @END
2866 /* Open a handle to a window station */
2867 @REQ(open_winstation)
2868 unsigned int access; /* wanted access rights */
2869 unsigned int attributes; /* object attributes */
2870 obj_handle_t rootdir; /* root directory */
2871 VARARG(name,unicode_str); /* object name */
2872 @REPLY
2873 obj_handle_t handle; /* handle to the window station */
2874 @END
2877 /* Close a window station */
2878 @REQ(close_winstation)
2879 obj_handle_t handle; /* handle to the window station */
2880 @END
2883 /* Get the process current window station */
2884 @REQ(get_process_winstation)
2885 @REPLY
2886 obj_handle_t handle; /* handle to the window station */
2887 @END
2890 /* Set the process current window station */
2891 @REQ(set_process_winstation)
2892 obj_handle_t handle; /* handle to the window station */
2893 @END
2896 /* Enumerate window stations */
2897 @REQ(enum_winstation)
2898 unsigned int index; /* current index */
2899 @REPLY
2900 unsigned int next; /* next index */
2901 VARARG(name,unicode_str); /* window station name */
2902 @END
2905 /* Create a desktop */
2906 @REQ(create_desktop)
2907 unsigned int flags; /* desktop flags */
2908 unsigned int access; /* wanted access rights */
2909 unsigned int attributes; /* object attributes */
2910 VARARG(name,unicode_str); /* object name */
2911 @REPLY
2912 obj_handle_t handle; /* handle to the desktop */
2913 @END
2916 /* Open a handle to a desktop */
2917 @REQ(open_desktop)
2918 obj_handle_t winsta; /* window station to open (null allowed) */
2919 unsigned int flags; /* desktop flags */
2920 unsigned int access; /* wanted access rights */
2921 unsigned int attributes; /* object attributes */
2922 VARARG(name,unicode_str); /* object name */
2923 @REPLY
2924 obj_handle_t handle; /* handle to the desktop */
2925 @END
2928 /* Open a handle to current input desktop */
2929 @REQ(open_input_desktop)
2930 unsigned int flags; /* desktop flags */
2931 unsigned int access; /* wanted access rights */
2932 unsigned int attributes; /* object attributes */
2933 @REPLY
2934 obj_handle_t handle; /* handle to the desktop */
2935 @END
2938 /* Close a desktop */
2939 @REQ(close_desktop)
2940 obj_handle_t handle; /* handle to the desktop */
2941 @END
2944 /* Get the thread current desktop */
2945 @REQ(get_thread_desktop)
2946 thread_id_t tid; /* thread id */
2947 @REPLY
2948 obj_handle_t handle; /* handle to the desktop */
2949 @END
2952 /* Set the thread current desktop */
2953 @REQ(set_thread_desktop)
2954 obj_handle_t handle; /* handle to the desktop */
2955 @END
2958 /* Enumerate desktops */
2959 @REQ(enum_desktop)
2960 obj_handle_t winstation; /* handle to the window station */
2961 unsigned int index; /* current index */
2962 @REPLY
2963 unsigned int next; /* next index */
2964 VARARG(name,unicode_str); /* window station name */
2965 @END
2968 /* Get/set information about a user object (window station or desktop) */
2969 @REQ(set_user_object_info)
2970 obj_handle_t handle; /* handle to the object */
2971 unsigned int flags; /* information to set/get */
2972 unsigned int obj_flags; /* new object flags */
2973 @REPLY
2974 int is_desktop; /* is object a desktop? */
2975 unsigned int old_obj_flags; /* old object flags */
2976 VARARG(name,unicode_str); /* object name */
2977 @END
2978 #define SET_USER_OBJECT_SET_FLAGS 1
2979 #define SET_USER_OBJECT_GET_FULL_NAME 2
2982 /* Register a hotkey */
2983 @REQ(register_hotkey)
2984 user_handle_t window; /* handle to the window */
2985 int id; /* hotkey identifier */
2986 unsigned int flags; /* modifier keys */
2987 unsigned int vkey; /* virtual key code */
2988 @REPLY
2989 int replaced; /* did we replace an existing hotkey? */
2990 unsigned int flags; /* flags of replaced hotkey */
2991 unsigned int vkey; /* virtual key code of replaced hotkey */
2992 @END
2995 /* Unregister a hotkey */
2996 @REQ(unregister_hotkey)
2997 user_handle_t window; /* handle to the window */
2998 int id; /* hotkey identifier */
2999 @REPLY
3000 unsigned int flags; /* flags of removed hotkey */
3001 unsigned int vkey; /* virtual key code of removed hotkey */
3002 @END
3005 /* Attach (or detach) thread inputs */
3006 @REQ(attach_thread_input)
3007 thread_id_t tid_from; /* thread to be attached */
3008 thread_id_t tid_to; /* thread to which tid_from should be attached */
3009 int attach; /* is it an attach? */
3010 @END
3013 /* Get input data for a given thread */
3014 @REQ(get_thread_input)
3015 thread_id_t tid; /* id of thread */
3016 @REPLY
3017 user_handle_t focus; /* handle to the focus window */
3018 user_handle_t capture; /* handle to the capture window */
3019 user_handle_t active; /* handle to the active window */
3020 user_handle_t foreground; /* handle to the global foreground window */
3021 user_handle_t menu_owner; /* handle to the menu owner */
3022 user_handle_t move_size; /* handle to the moving/resizing window */
3023 user_handle_t caret; /* handle to the caret window */
3024 user_handle_t cursor; /* handle to the cursor */
3025 int show_count; /* cursor show count */
3026 rectangle_t rect; /* caret rectangle */
3027 @END
3030 /* Get the time of the last input event */
3031 @REQ(get_last_input_time)
3032 @REPLY
3033 unsigned int time;
3034 @END
3037 /* Retrieve queue keyboard state for a given thread */
3038 @REQ(get_key_state)
3039 thread_id_t tid; /* id of thread */
3040 int key; /* optional key code or -1 */
3041 @REPLY
3042 unsigned char state; /* state of specified key */
3043 VARARG(keystate,bytes); /* state array for all the keys */
3044 @END
3046 /* Set queue keyboard state for a given thread */
3047 @REQ(set_key_state)
3048 thread_id_t tid; /* id of thread */
3049 int async; /* whether to change the async state too */
3050 VARARG(keystate,bytes); /* state array for all the keys */
3051 @END
3053 /* Set the system foreground window */
3054 @REQ(set_foreground_window)
3055 user_handle_t handle; /* handle to the foreground window */
3056 @REPLY
3057 user_handle_t previous; /* handle to the previous foreground window */
3058 int send_msg_old; /* whether we have to send a msg to the old window */
3059 int send_msg_new; /* whether we have to send a msg to the new window */
3060 @END
3062 /* Set the current thread focus window */
3063 @REQ(set_focus_window)
3064 user_handle_t handle; /* handle to the focus window */
3065 @REPLY
3066 user_handle_t previous; /* handle to the previous focus window */
3067 @END
3069 /* Set the current thread active window */
3070 @REQ(set_active_window)
3071 user_handle_t handle; /* handle to the active window */
3072 @REPLY
3073 user_handle_t previous; /* handle to the previous active window */
3074 @END
3076 /* Set the current thread capture window */
3077 @REQ(set_capture_window)
3078 user_handle_t handle; /* handle to the capture window */
3079 unsigned int flags; /* capture flags (see below) */
3080 @REPLY
3081 user_handle_t previous; /* handle to the previous capture window */
3082 user_handle_t full_handle; /* full 32-bit handle of new capture window */
3083 @END
3084 #define CAPTURE_MENU 0x01 /* capture is for a menu */
3085 #define CAPTURE_MOVESIZE 0x02 /* capture is for moving/resizing */
3088 /* Set the current thread caret window */
3089 @REQ(set_caret_window)
3090 user_handle_t handle; /* handle to the caret window */
3091 int width; /* caret width */
3092 int height; /* caret height */
3093 @REPLY
3094 user_handle_t previous; /* handle to the previous caret window */
3095 rectangle_t old_rect; /* previous caret rectangle */
3096 int old_hide; /* previous hide count */
3097 int old_state; /* previous caret state (1=on, 0=off) */
3098 @END
3101 /* Set the current thread caret information */
3102 @REQ(set_caret_info)
3103 unsigned int flags; /* caret flags (see below) */
3104 user_handle_t handle; /* handle to the caret window */
3105 int x; /* caret x position */
3106 int y; /* caret y position */
3107 int hide; /* increment for hide count (can be negative to show it) */
3108 int state; /* caret state (see below) */
3109 @REPLY
3110 user_handle_t full_handle; /* handle to the current caret window */
3111 rectangle_t old_rect; /* previous caret rectangle */
3112 int old_hide; /* previous hide count */
3113 int old_state; /* previous caret state (1=on, 0=off) */
3114 @END
3115 #define SET_CARET_POS 0x01 /* set the caret position from x,y */
3116 #define SET_CARET_HIDE 0x02 /* increment the caret hide count */
3117 #define SET_CARET_STATE 0x04 /* set the caret on/off state */
3118 enum caret_state
3120 CARET_STATE_OFF, /* off */
3121 CARET_STATE_ON, /* on */
3122 CARET_STATE_TOGGLE, /* toggle current state */
3123 CARET_STATE_ON_IF_MOVED /* on if the position differs, unchanged otherwise */
3127 /* Set a window hook */
3128 @REQ(set_hook)
3129 int id; /* id of the hook */
3130 process_id_t pid; /* id of process to set the hook into */
3131 thread_id_t tid; /* id of thread to set the hook into */
3132 int event_min;
3133 int event_max;
3134 client_ptr_t proc; /* hook procedure */
3135 int flags;
3136 int unicode; /* is it a unicode hook? */
3137 VARARG(module,unicode_str); /* module name */
3138 @REPLY
3139 user_handle_t handle; /* handle to the hook */
3140 unsigned int active_hooks; /* active hooks bitmap */
3141 @END
3144 /* Remove a window hook */
3145 @REQ(remove_hook)
3146 user_handle_t handle; /* handle to the hook */
3147 client_ptr_t proc; /* hook procedure if handle is 0 */
3148 int id; /* id of the hook if handle is 0 */
3149 @REPLY
3150 unsigned int active_hooks; /* active hooks bitmap */
3151 @END
3154 /* Start calling a hook chain */
3155 @REQ(start_hook_chain)
3156 int id; /* id of the hook */
3157 int event; /* signalled event */
3158 user_handle_t window; /* handle to the event window */
3159 int object_id; /* object id for out of context winevent */
3160 int child_id; /* child id for out of context winevent */
3161 @REPLY
3162 user_handle_t handle; /* handle to the next hook */
3163 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
3164 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
3165 int unicode; /* is it a unicode hook? */
3166 client_ptr_t proc; /* hook procedure */
3167 unsigned int active_hooks; /* active hooks bitmap */
3168 VARARG(module,unicode_str); /* module name */
3169 @END
3172 /* Finished calling a hook chain */
3173 @REQ(finish_hook_chain)
3174 int id; /* id of the hook */
3175 @END
3178 /* Get the hook information */
3179 @REQ(get_hook_info)
3180 user_handle_t handle; /* handle to the current hook */
3181 int get_next; /* do we want info about current or next hook? */
3182 int event; /* signalled event */
3183 user_handle_t window; /* handle to the event window */
3184 int object_id; /* object id for out of context winevent */
3185 int child_id; /* child id for out of context winevent */
3186 @REPLY
3187 user_handle_t handle; /* handle to the hook */
3188 int id; /* id of the hook */
3189 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
3190 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
3191 client_ptr_t proc; /* hook procedure */
3192 int unicode; /* is it a unicode hook? */
3193 VARARG(module,unicode_str); /* module name */
3194 @END
3197 /* Create a window class */
3198 @REQ(create_class)
3199 int local; /* is it a local class? */
3200 atom_t atom; /* class atom */
3201 unsigned int style; /* class style */
3202 mod_handle_t instance; /* module instance */
3203 int extra; /* number of extra class bytes */
3204 int win_extra; /* number of window extra bytes */
3205 client_ptr_t client_ptr; /* pointer to class in client address space */
3206 data_size_t name_offset; /* base class name offset for specified atom */
3207 VARARG(name,unicode_str); /* class name */
3208 @REPLY
3209 atom_t atom; /* resulting class atom */
3210 @END
3213 /* Destroy a window class */
3214 @REQ(destroy_class)
3215 atom_t atom; /* class atom */
3216 mod_handle_t instance; /* module instance */
3217 VARARG(name,unicode_str); /* class name */
3218 @REPLY
3219 client_ptr_t client_ptr; /* pointer to class in client address space */
3220 @END
3223 /* Set some information in a class */
3224 @REQ(set_class_info)
3225 user_handle_t window; /* handle to the window */
3226 unsigned int flags; /* flags for info to set (see below) */
3227 atom_t atom; /* class atom */
3228 unsigned int style; /* class style */
3229 int win_extra; /* number of window extra bytes */
3230 mod_handle_t instance; /* module instance */
3231 int extra_offset; /* offset to set in extra bytes */
3232 data_size_t extra_size; /* size to set in extra bytes */
3233 lparam_t extra_value; /* value to set in extra bytes */
3234 @REPLY
3235 atom_t old_atom; /* previous class atom */
3236 atom_t base_atom; /* base class atom */
3237 mod_handle_t old_instance; /* previous module instance */
3238 lparam_t old_extra_value; /* old value in extra bytes */
3239 unsigned int old_style; /* previous class style */
3240 int old_extra; /* previous number of class extra bytes */
3241 int old_win_extra; /* previous number of window extra bytes */
3242 @END
3243 #define SET_CLASS_ATOM 0x0001
3244 #define SET_CLASS_STYLE 0x0002
3245 #define SET_CLASS_WINEXTRA 0x0004
3246 #define SET_CLASS_INSTANCE 0x0008
3247 #define SET_CLASS_EXTRA 0x0010
3250 /* Open the clipboard */
3251 @REQ(open_clipboard)
3252 user_handle_t window; /* clipboard window */
3253 @REPLY
3254 user_handle_t owner; /* current clipboard owner */
3255 @END
3258 /* Close the clipboard */
3259 @REQ(close_clipboard)
3260 @REPLY
3261 user_handle_t viewer; /* first clipboard viewer */
3262 user_handle_t owner; /* current clipboard owner */
3263 @END
3266 /* Empty the clipboard and grab ownership */
3267 @REQ(empty_clipboard)
3268 @END
3271 /* Add a data format to the clipboard */
3272 @REQ(set_clipboard_data)
3273 unsigned int format; /* clipboard format of the data */
3274 unsigned int lcid; /* locale id to use for synthesizing text formats */
3275 VARARG(data,bytes); /* data contents */
3276 @REPLY
3277 unsigned int seqno; /* sequence number for the set data */
3278 @END
3281 /* Fetch a data format from the clipboard */
3282 @REQ(get_clipboard_data)
3283 unsigned int format; /* clipboard format of the data */
3284 int render; /* will we try to render it if missing? */
3285 int cached; /* do we already have it in the client-side cache? */
3286 unsigned int seqno; /* sequence number for the data in the cache */
3287 @REPLY
3288 unsigned int from; /* for synthesized data, format to generate it from */
3289 user_handle_t owner; /* clipboard owner for delayed-rendered formats */
3290 unsigned int seqno; /* sequence number for the originally set data */
3291 data_size_t total; /* total data size */
3292 VARARG(data,bytes); /* data contents */
3293 @END
3296 /* Retrieve a list of available formats */
3297 @REQ(get_clipboard_formats)
3298 unsigned int format; /* specific format to query, return all if 0 */
3299 @REPLY
3300 unsigned int count; /* count of available formats */
3301 VARARG(formats,uints); /* array of available formats */
3302 @END
3305 /* Retrieve the next available format */
3306 @REQ(enum_clipboard_formats)
3307 unsigned int previous; /* previous format, or first if 0 */
3308 @REPLY
3309 unsigned int format; /* next format */
3310 @END
3313 /* Release ownership of the clipboard */
3314 @REQ(release_clipboard)
3315 user_handle_t owner; /* clipboard owner to release */
3316 @REPLY
3317 user_handle_t viewer; /* first clipboard viewer */
3318 user_handle_t owner; /* current clipboard owner */
3319 @END
3322 /* Get clipboard information */
3323 @REQ(get_clipboard_info)
3324 @REPLY
3325 user_handle_t window; /* clipboard window */
3326 user_handle_t owner; /* clipboard owner */
3327 user_handle_t viewer; /* clipboard viewer */
3328 unsigned int seqno; /* current sequence number */
3329 @END
3332 /* Set the clipboard viewer window */
3333 @REQ(set_clipboard_viewer)
3334 user_handle_t viewer; /* clipboard viewer */
3335 user_handle_t previous; /* if non-zero, check that this was the previous viewer */
3336 @REPLY
3337 user_handle_t old_viewer; /* previous clipboard viewer */
3338 user_handle_t owner; /* clipboard owner */
3339 @END
3342 /* Add a clipboard listener window */
3343 @REQ(add_clipboard_listener)
3344 user_handle_t window; /* clipboard listener window */
3345 @END
3348 /* Remove a clipboard listener window */
3349 @REQ(remove_clipboard_listener)
3350 user_handle_t window; /* clipboard listener window */
3351 @END
3354 /* Open a security token */
3355 @REQ(open_token)
3356 obj_handle_t handle; /* handle to the thread or process */
3357 unsigned int access; /* access rights to the new token */
3358 unsigned int attributes;/* object attributes */
3359 unsigned int flags; /* flags (see below) */
3360 @REPLY
3361 obj_handle_t token; /* handle to the token */
3362 @END
3363 #define OPEN_TOKEN_THREAD 1
3364 #define OPEN_TOKEN_AS_SELF 2
3367 /* Set/get the global windows */
3368 @REQ(set_global_windows)
3369 unsigned int flags; /* flags for fields to set (see below) */
3370 user_handle_t shell_window; /* handle to the new shell window */
3371 user_handle_t shell_listview; /* handle to the new shell listview window */
3372 user_handle_t progman_window; /* handle to the new program manager window */
3373 user_handle_t taskman_window; /* handle to the new task manager window */
3374 @REPLY
3375 user_handle_t old_shell_window; /* handle to the shell window */
3376 user_handle_t old_shell_listview; /* handle to the shell listview window */
3377 user_handle_t old_progman_window; /* handle to the new program manager window */
3378 user_handle_t old_taskman_window; /* handle to the new task manager window */
3379 @END
3380 #define SET_GLOBAL_SHELL_WINDOWS 0x01 /* set both main shell and listview windows */
3381 #define SET_GLOBAL_PROGMAN_WINDOW 0x02
3382 #define SET_GLOBAL_TASKMAN_WINDOW 0x04
3384 /* Adjust the privileges held by a token */
3385 @REQ(adjust_token_privileges)
3386 obj_handle_t handle; /* handle to the token */
3387 int disable_all; /* disable all privileges? */
3388 int get_modified_state; /* get modified privileges? */
3389 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to enable/disable/remove */
3390 @REPLY
3391 unsigned int len; /* total length in bytes required to store token privileges */
3392 VARARG(privileges,LUID_AND_ATTRIBUTES); /* modified privileges */
3393 @END
3395 /* Retrieves the set of privileges held by or available to a token */
3396 @REQ(get_token_privileges)
3397 obj_handle_t handle; /* handle to the token */
3398 @REPLY
3399 unsigned int len; /* total length in bytes required to store token privileges */
3400 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
3401 @END
3403 /* Check the token has the required privileges */
3404 @REQ(check_token_privileges)
3405 obj_handle_t handle; /* handle to the token */
3406 int all_required; /* are all the privileges required for the check to succeed? */
3407 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to check */
3408 @REPLY
3409 int has_privileges; /* does the token have the required privileges? */
3410 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
3411 @END
3413 @REQ(duplicate_token)
3414 obj_handle_t handle; /* handle to the token to duplicate */
3415 unsigned int access; /* access rights to the new token */
3416 int primary; /* is the new token to be a primary one? */
3417 int impersonation_level; /* impersonation level of the new token */
3418 VARARG(objattr,object_attributes); /* object attributes */
3419 @REPLY
3420 obj_handle_t new_handle; /* duplicated handle */
3421 @END
3423 @REQ(access_check)
3424 obj_handle_t handle; /* handle to the token */
3425 unsigned int desired_access; /* desired access to the object */
3426 unsigned int mapping_read; /* mapping from generic read to specific rights */
3427 unsigned int mapping_write; /* mapping from generic write to specific rights */
3428 unsigned int mapping_execute; /* mapping from generic execute to specific rights */
3429 unsigned int mapping_all; /* mapping from generic all to specific rights */
3430 VARARG(sd,security_descriptor); /* security descriptor to check */
3431 @REPLY
3432 unsigned int access_granted; /* access rights actually granted */
3433 unsigned int access_status; /* was access granted? */
3434 unsigned int privileges_len; /* length needed to store privileges */
3435 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges used during access check */
3436 @END
3438 @REQ(get_token_sid)
3439 obj_handle_t handle; /* handle to the token */
3440 unsigned int which_sid; /* which SID to retrieve from the token */
3441 @REPLY
3442 data_size_t sid_len; /* length needed to store sid */
3443 VARARG(sid,SID); /* the sid specified by which_sid from the token */
3444 @END
3446 @REQ(get_token_groups)
3447 obj_handle_t handle; /* handle to the token */
3448 @REPLY
3449 data_size_t user_len; /* length needed to store user */
3450 VARARG(user,token_groups); /* groups the token's user belongs to */
3451 @END
3453 @REQ(get_token_default_dacl)
3454 obj_handle_t handle; /* handle to the token */
3455 @REPLY
3456 data_size_t acl_len; /* length needed to store access control list */
3457 VARARG(acl,ACL); /* access control list */
3458 @END
3460 @REQ(set_token_default_dacl)
3461 obj_handle_t handle; /* handle to the token */
3462 VARARG(acl,ACL); /* default dacl to set */
3463 @END
3465 @REQ(set_security_object)
3466 obj_handle_t handle; /* handle to the object */
3467 unsigned int security_info; /* which parts of security descriptor to set */
3468 VARARG(sd,security_descriptor); /* security descriptor to set */
3469 @END
3471 @REQ(get_security_object)
3472 obj_handle_t handle; /* handle to the object */
3473 unsigned int security_info; /* which parts of security descriptor to get */
3474 @REPLY
3475 unsigned int sd_len; /* buffer size needed for sd */
3476 VARARG(sd,security_descriptor); /* retrieved security descriptor */
3477 @END
3480 struct handle_info
3482 process_id_t owner;
3483 obj_handle_t handle;
3484 unsigned int access;
3487 /* Return a list of all opened handles */
3488 @REQ(get_system_handles)
3489 @REPLY
3490 unsigned int count; /* number of handles */
3491 VARARG(data,handle_infos); /* array of handle_infos */
3492 @END
3495 /* Create a mailslot */
3496 @REQ(create_mailslot)
3497 unsigned int access; /* wanted access rights */
3498 timeout_t read_timeout;
3499 unsigned int max_msgsize;
3500 VARARG(objattr,object_attributes); /* object attributes */
3501 @REPLY
3502 obj_handle_t handle; /* handle to the mailslot */
3503 @END
3506 /* Set mailslot information */
3507 @REQ(set_mailslot_info)
3508 obj_handle_t handle; /* handle to the mailslot */
3509 timeout_t read_timeout;
3510 unsigned int flags;
3511 @REPLY
3512 timeout_t read_timeout;
3513 unsigned int max_msgsize;
3514 @END
3515 #define MAILSLOT_SET_READ_TIMEOUT 1
3518 /* Create a directory object */
3519 @REQ(create_directory)
3520 unsigned int access; /* access flags */
3521 VARARG(objattr,object_attributes); /* object attributes */
3522 @REPLY
3523 obj_handle_t handle; /* handle to the directory */
3524 @END
3527 /* Open a directory object */
3528 @REQ(open_directory)
3529 unsigned int access; /* access flags */
3530 unsigned int attributes; /* object attributes */
3531 obj_handle_t rootdir; /* root directory */
3532 VARARG(directory_name,unicode_str); /* Directory name */
3533 @REPLY
3534 obj_handle_t handle; /* handle to the directory */
3535 @END
3538 /* Get a directory entry by index */
3539 @REQ(get_directory_entry)
3540 obj_handle_t handle; /* handle to the directory */
3541 unsigned int index; /* entry index */
3542 @REPLY
3543 data_size_t name_len; /* length of the entry name in bytes */
3544 VARARG(name,unicode_str,name_len); /* entry name */
3545 VARARG(type,unicode_str); /* entry type */
3546 @END
3549 /* Create a symbolic link object */
3550 @REQ(create_symlink)
3551 unsigned int access; /* access flags */
3552 VARARG(objattr,object_attributes); /* object attributes */
3553 VARARG(target_name,unicode_str); /* target name */
3554 @REPLY
3555 obj_handle_t handle; /* handle to the symlink */
3556 @END
3559 /* Open a symbolic link object */
3560 @REQ(open_symlink)
3561 unsigned int access; /* access flags */
3562 unsigned int attributes; /* object attributes */
3563 obj_handle_t rootdir; /* root directory */
3564 VARARG(name,unicode_str); /* symlink name */
3565 @REPLY
3566 obj_handle_t handle; /* handle to the symlink */
3567 @END
3570 /* Query a symbolic link object */
3571 @REQ(query_symlink)
3572 obj_handle_t handle; /* handle to the symlink */
3573 @REPLY
3574 data_size_t total; /* total needed size for name */
3575 VARARG(target_name,unicode_str); /* target name */
3576 @END
3579 /* Query basic object information */
3580 @REQ(get_object_info)
3581 obj_handle_t handle; /* handle to the object */
3582 @REPLY
3583 unsigned int access; /* granted access mask */
3584 unsigned int ref_count; /* object ref count */
3585 unsigned int handle_count; /* object handle count */
3586 data_size_t total; /* total needed size for name */
3587 VARARG(name,unicode_str); /* object name */
3588 @END
3591 /* Query object type name information */
3592 @REQ(get_object_type)
3593 obj_handle_t handle; /* handle to the object */
3594 @REPLY
3595 data_size_t total; /* needed size for type name */
3596 VARARG(type,unicode_str); /* type name */
3597 @END
3600 /* Unlink a named object */
3601 @REQ(unlink_object)
3602 obj_handle_t handle; /* handle to the object */
3603 @END
3606 /* Query the impersonation level of an impersonation token */
3607 @REQ(get_token_impersonation_level)
3608 obj_handle_t handle; /* handle to the object */
3609 @REPLY
3610 int impersonation_level; /* impersonation level of the impersonation token */
3611 @END
3613 /* Allocate a locally-unique identifier */
3614 @REQ(allocate_locally_unique_id)
3615 @REPLY
3616 luid_t luid;
3617 @END
3620 /* Create a device manager */
3621 @REQ(create_device_manager)
3622 unsigned int access; /* wanted access rights */
3623 unsigned int attributes; /* object attributes */
3624 @REPLY
3625 obj_handle_t handle; /* handle to the device */
3626 @END
3629 /* Create a device */
3630 @REQ(create_device)
3631 obj_handle_t rootdir; /* root directory */
3632 client_ptr_t user_ptr; /* opaque ptr for use by client */
3633 obj_handle_t manager; /* device manager */
3634 VARARG(name,unicode_str); /* object name */
3635 @END
3638 /* Delete a device */
3639 @REQ(delete_device)
3640 obj_handle_t manager; /* handle to the device manager */
3641 client_ptr_t device; /* pointer to the device */
3642 @END
3645 /* Retrieve the next pending device irp request */
3646 @REQ(get_next_device_request)
3647 obj_handle_t manager; /* handle to the device manager */
3648 obj_handle_t prev; /* handle to the previous irp */
3649 unsigned int status; /* status of the previous irp */
3650 client_ptr_t user_ptr; /* user pointer of the previous irp */
3651 @REPLY
3652 irp_params_t params; /* irp parameters */
3653 obj_handle_t next; /* handle to the next irp */
3654 thread_id_t client_tid; /* tid of thread calling irp */
3655 client_ptr_t client_thread; /* pointer to thread object of calling irp */
3656 data_size_t in_size; /* total needed input size */
3657 VARARG(next_data,bytes); /* input data of the next irp */
3658 @END
3661 /* Get kernel pointer from server object */
3662 @REQ(get_kernel_object_ptr)
3663 obj_handle_t manager; /* handle to the device manager */
3664 obj_handle_t handle; /* object handle */
3665 @REPLY
3666 client_ptr_t user_ptr; /* kernel object pointer */
3667 @END
3670 /* Associate kernel pointer with server object */
3671 @REQ(set_kernel_object_ptr)
3672 obj_handle_t manager; /* handle to the device manager */
3673 obj_handle_t handle; /* object handle */
3674 client_ptr_t user_ptr; /* kernel object pointer */
3675 @END
3678 /* Grab server object reference from kernel object pointer */
3679 @REQ(grab_kernel_object)
3680 obj_handle_t manager; /* handle to the device manager */
3681 client_ptr_t user_ptr; /* kernel object pointer */
3682 @END
3685 /* Release server object reference from kernel object pointer */
3686 @REQ(release_kernel_object)
3687 obj_handle_t manager; /* handle to the device manager */
3688 client_ptr_t user_ptr; /* kernel object pointer */
3689 @END
3692 /* Get handle from kernel object pointer */
3693 @REQ(get_kernel_object_handle)
3694 obj_handle_t manager; /* handle to the device manager */
3695 client_ptr_t user_ptr; /* kernel object pointer */
3696 unsigned int access; /* wanted access rights */
3697 @REPLY
3698 obj_handle_t handle; /* kernel object handle */
3699 @END
3702 /* Make the current process a system process */
3703 @REQ(make_process_system)
3704 @REPLY
3705 obj_handle_t event; /* event signaled when all user processes have exited */
3706 @END
3709 /* Get detailed fixed-size information about a token */
3710 @REQ(get_token_statistics)
3711 obj_handle_t handle; /* handle to the object */
3712 @REPLY
3713 luid_t token_id; /* locally-unique identifier of the token */
3714 luid_t modified_id; /* locally-unique identifier of the modified version of the token */
3715 int primary; /* is the token primary or impersonation? */
3716 int impersonation_level; /* level of impersonation */
3717 int group_count; /* the number of groups the token is a member of */
3718 int privilege_count; /* the number of privileges the token has */
3719 @END
3722 /* Create I/O completion port */
3723 @REQ(create_completion)
3724 unsigned int access; /* desired access to a port */
3725 unsigned int concurrent; /* max number of concurrent active threads */
3726 VARARG(objattr,object_attributes); /* object attributes */
3727 @REPLY
3728 obj_handle_t handle; /* port handle */
3729 @END
3732 /* Open I/O completion port */
3733 @REQ(open_completion)
3734 unsigned int access; /* desired access to a port */
3735 unsigned int attributes; /* object attributes */
3736 obj_handle_t rootdir; /* root directory */
3737 VARARG(filename,unicode_str); /* port name */
3738 @REPLY
3739 obj_handle_t handle; /* port handle */
3740 @END
3743 /* add completion to completion port */
3744 @REQ(add_completion)
3745 obj_handle_t handle; /* port handle */
3746 apc_param_t ckey; /* completion key */
3747 apc_param_t cvalue; /* completion value */
3748 apc_param_t information; /* IO_STATUS_BLOCK Information */
3749 unsigned int status; /* completion result */
3750 @END
3753 /* get completion from completion port queue */
3754 @REQ(remove_completion)
3755 obj_handle_t handle; /* port handle */
3756 @REPLY
3757 apc_param_t ckey; /* completion key */
3758 apc_param_t cvalue; /* completion value */
3759 apc_param_t information; /* IO_STATUS_BLOCK Information */
3760 unsigned int status; /* completion result */
3761 @END
3764 /* get completion queue depth */
3765 @REQ(query_completion)
3766 obj_handle_t handle; /* port handle */
3767 @REPLY
3768 unsigned int depth; /* completion queue depth */
3769 @END
3772 /* associate object with completion port */
3773 @REQ(set_completion_info)
3774 obj_handle_t handle; /* object handle */
3775 apc_param_t ckey; /* completion key */
3776 obj_handle_t chandle; /* port handle */
3777 @END
3780 /* check for associated completion and push msg */
3781 @REQ(add_fd_completion)
3782 obj_handle_t handle; /* async' object */
3783 apc_param_t cvalue; /* completion value */
3784 apc_param_t information; /* IO_STATUS_BLOCK Information */
3785 unsigned int status; /* completion status */
3786 int async; /* completion is an async result */
3787 @END
3790 /* set fd completion information */
3791 @REQ(set_fd_completion_mode)
3792 obj_handle_t handle; /* handle to a file or directory */
3793 unsigned int flags; /* completion notification flags */
3794 @END
3797 /* set fd disposition information */
3798 @REQ(set_fd_disp_info)
3799 obj_handle_t handle; /* handle to a file or directory */
3800 int unlink; /* whether to unlink file on close */
3801 @END
3804 /* set fd name information */
3805 @REQ(set_fd_name_info)
3806 obj_handle_t handle; /* handle to a file or directory */
3807 obj_handle_t rootdir; /* root directory */
3808 int link; /* link instead of renaming */
3809 VARARG(filename,string); /* new file name */
3810 @END
3813 /* Retrieve layered info for a window */
3814 @REQ(get_window_layered_info)
3815 user_handle_t handle; /* handle to the window */
3816 @REPLY
3817 unsigned int color_key; /* color key */
3818 unsigned int alpha; /* alpha (0..255) */
3819 unsigned int flags; /* LWA_* flags */
3820 @END
3823 /* Set layered info for a window */
3824 @REQ(set_window_layered_info)
3825 user_handle_t handle; /* handle to the window */
3826 unsigned int color_key; /* color key */
3827 unsigned int alpha; /* alpha (0..255) */
3828 unsigned int flags; /* LWA_* flags */
3829 @END
3832 /* Allocate an arbitrary user handle */
3833 @REQ(alloc_user_handle)
3834 @REPLY
3835 user_handle_t handle; /* allocated handle */
3836 @END
3839 /* Free an arbitrary user handle */
3840 @REQ(free_user_handle)
3841 user_handle_t handle; /* handle to free*/
3842 @END
3845 /* Set/get the current cursor */
3846 @REQ(set_cursor)
3847 unsigned int flags; /* flags for fields to set (see below) */
3848 user_handle_t handle; /* handle to the cursor */
3849 int show_count; /* show count increment/decrement */
3850 int x; /* cursor position */
3851 int y;
3852 rectangle_t clip; /* cursor clip rectangle */
3853 unsigned int clip_msg; /* message to post on cursor clip changes */
3854 @REPLY
3855 user_handle_t prev_handle; /* previous handle */
3856 int prev_count; /* previous show count */
3857 int prev_x; /* previous position */
3858 int prev_y;
3859 int new_x; /* new position */
3860 int new_y;
3861 rectangle_t new_clip; /* new clip rectangle */
3862 unsigned int last_change; /* time of last position change */
3863 @END
3864 #define SET_CURSOR_HANDLE 0x01
3865 #define SET_CURSOR_COUNT 0x02
3866 #define SET_CURSOR_POS 0x04
3867 #define SET_CURSOR_CLIP 0x08
3868 #define SET_CURSOR_NOCLIP 0x10
3871 /* Modify the list of registered rawinput devices */
3872 @REQ(update_rawinput_devices)
3873 VARARG(devices,rawinput_devices);
3874 @END
3877 /* Retrieve the suspended context of a thread */
3878 @REQ(get_suspend_context)
3879 @REPLY
3880 VARARG(context,context); /* thread context */
3881 @END
3884 /* Store the suspend context of a thread */
3885 @REQ(set_suspend_context)
3886 VARARG(context,context); /* thread context */
3887 @END
3890 /* Create a new job object */
3891 @REQ(create_job)
3892 unsigned int access; /* wanted access rights */
3893 VARARG(objattr,object_attributes); /* object attributes */
3894 @REPLY
3895 obj_handle_t handle; /* handle to the job */
3896 @END
3899 /* Open a job object */
3900 @REQ(open_job)
3901 unsigned int access; /* wanted access rights */
3902 unsigned int attributes; /* object attributes */
3903 obj_handle_t rootdir; /* root directory */
3904 VARARG(name,unicode_str); /* object name */
3905 @REPLY
3906 obj_handle_t handle; /* handle to the job */
3907 @END
3910 /* Assign a job object to a process */
3911 @REQ(assign_job)
3912 obj_handle_t job; /* handle to the job */
3913 obj_handle_t process; /* handle to the process */
3914 @END
3917 /* Check if a process is associated with a job */
3918 @REQ(process_in_job)
3919 obj_handle_t job; /* handle to the job */
3920 obj_handle_t process; /* handle to the process */
3921 @END
3924 /* Set limit flags on a job */
3925 @REQ(set_job_limits)
3926 obj_handle_t handle; /* handle to the job */
3927 unsigned int limit_flags; /* new limit flags */
3928 @END
3931 /* Set new completion port for a job */
3932 @REQ(set_job_completion_port)
3933 obj_handle_t job; /* handle to the job */
3934 obj_handle_t port; /* handle to the completion port */
3935 client_ptr_t key; /* key to send with completion messages */
3936 @END
3939 /* Terminate all processes associated with the job */
3940 @REQ(terminate_job)
3941 obj_handle_t handle; /* handle to the job */
3942 int status; /* process exit code */
3943 @END
3946 /* Suspend a process */
3947 @REQ(suspend_process)
3948 obj_handle_t handle; /* process handle */
3949 @END
3952 /* Resume a process */
3953 @REQ(resume_process)
3954 obj_handle_t handle; /* process handle */
3955 @END