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