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