ntdll: Add more traces to raise_exception on ARM64.
[wine.git] / server / protocol.def
blob73e0868bedb306b3afe88265d230cad42413f99f
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 cpu_type_t;
140 /* context data */
141 typedef struct
143 cpu_type_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 { unsigned __int64 d[64]; unsigned int fpcr, fpsr; } arm64_regs;
176 } fp; /* selected by SERVER_CTX_FLOATING_POINT */
177 union
179 struct { unsigned int dr0, dr1, dr2, dr3, dr6, dr7; } i386_regs;
180 struct { unsigned __int64 dr0, dr1, dr2, dr3, dr6, dr7; } x86_64_regs;
181 struct { unsigned int dr[8]; } powerpc_regs;
182 struct { unsigned int bvr[8], bcr[8], wvr[1], wcr[1]; } arm_regs;
183 struct { unsigned __int64 bvr[8], wvr[2]; unsigned int bcr[8], wcr[2]; } arm64_regs;
184 } debug; /* selected by SERVER_CTX_DEBUG_REGISTERS */
185 union
187 unsigned char i386_regs[512];
188 } ext; /* selected by SERVER_CTX_EXTENDED_REGISTERS */
189 } context_t;
191 #define SERVER_CTX_CONTROL 0x01
192 #define SERVER_CTX_INTEGER 0x02
193 #define SERVER_CTX_SEGMENTS 0x04
194 #define SERVER_CTX_FLOATING_POINT 0x08
195 #define SERVER_CTX_DEBUG_REGISTERS 0x10
196 #define SERVER_CTX_EXTENDED_REGISTERS 0x20
198 /* structure used in sending an fd from client to server */
199 struct send_fd
201 thread_id_t tid; /* thread id */
202 int fd; /* file descriptor on client-side */
205 /* structure sent by the server on the wait fifo */
206 struct wake_up_reply
208 client_ptr_t cookie; /* magic cookie that was passed in select_request */
209 int signaled; /* wait result */
210 int __pad;
213 /* NT-style timeout, in 100ns units, negative means relative timeout */
214 typedef __int64 timeout_t;
215 #define TIMEOUT_INFINITE (((timeout_t)0x7fffffff) << 32 | 0xffffffff)
217 /* structure for process startup info */
218 typedef struct
220 unsigned int debug_flags;
221 unsigned int console_flags;
222 obj_handle_t console;
223 obj_handle_t hstdin;
224 obj_handle_t hstdout;
225 obj_handle_t hstderr;
226 unsigned int x;
227 unsigned int y;
228 unsigned int xsize;
229 unsigned int ysize;
230 unsigned int xchars;
231 unsigned int ychars;
232 unsigned int attribute;
233 unsigned int flags;
234 unsigned int show;
235 data_size_t curdir_len;
236 data_size_t dllpath_len;
237 data_size_t imagepath_len;
238 data_size_t cmdline_len;
239 data_size_t title_len;
240 data_size_t desktop_len;
241 data_size_t shellinfo_len;
242 data_size_t runtime_len;
243 /* VARARG(curdir,unicode_str,curdir_len); */
244 /* VARARG(dllpath,unicode_str,dllpath_len); */
245 /* VARARG(imagepath,unicode_str,imagepath_len); */
246 /* VARARG(cmdline,unicode_str,cmdline_len); */
247 /* VARARG(title,unicode_str,title_len); */
248 /* VARARG(desktop,unicode_str,desktop_len); */
249 /* VARARG(shellinfo,unicode_str,shellinfo_len); */
250 /* VARARG(runtime,unicode_str,runtime_len); */
251 } startup_info_t;
253 /* structure returned in the list of window properties */
254 typedef struct
256 atom_t atom; /* property atom */
257 int string; /* was atom a string originally? */
258 lparam_t data; /* data stored in property */
259 } property_data_t;
261 /* structure to specify window rectangles */
262 typedef struct
264 int left;
265 int top;
266 int right;
267 int bottom;
268 } rectangle_t;
270 /* structure for parameters of async I/O calls */
271 typedef struct
273 obj_handle_t handle; /* object to perform I/O on */
274 obj_handle_t event; /* event to signal when done */
275 client_ptr_t iosb; /* I/O status block in client addr space */
276 client_ptr_t user; /* opaque user data containing callback pointer and async-specific data */
277 client_ptr_t apc; /* user APC to call */
278 apc_param_t apc_context; /* user APC context or completion value */
279 } async_data_t;
281 /* structures for extra message data */
283 struct hw_msg_source
285 unsigned int device; /* source device (IMDT_* values) */
286 unsigned int origin; /* source origin (IMO_* values) */
289 struct hardware_msg_data
291 lparam_t info; /* extra info */
292 unsigned int hw_id; /* unique id */
293 unsigned int flags; /* hook flags */
294 struct hw_msg_source source; /* message source */
295 union
297 int type;
298 struct
300 int type; /* RIM_TYPEKEYBOARD */
301 unsigned int message; /* message generated by this rawinput event */
302 unsigned short vkey; /* virtual key code */
303 unsigned short scan; /* scan code */
304 } kbd;
305 struct
307 int type; /* RIM_TYPEMOUSE */
308 int x; /* x coordinate */
309 int y; /* y coordinate */
310 unsigned int data; /* mouse data */
311 } mouse;
312 } rawinput;
315 struct callback_msg_data
317 client_ptr_t callback; /* callback function */
318 lparam_t data; /* user data for callback */
319 lparam_t result; /* message result */
322 struct winevent_msg_data
324 user_handle_t hook; /* hook handle */
325 thread_id_t tid; /* thread id */
326 client_ptr_t hook_proc; /* hook proc address */
327 /* followed by module name if any */
330 typedef union
332 int type;
333 struct
335 int type; /* INPUT_KEYBOARD */
336 unsigned short vkey; /* virtual key code */
337 unsigned short scan; /* scan code */
338 unsigned int flags; /* event flags */
339 unsigned int time; /* event time */
340 lparam_t info; /* extra info */
341 } kbd;
342 struct
344 int type; /* INPUT_MOUSE */
345 int x; /* coordinates */
346 int y;
347 unsigned int data; /* mouse data */
348 unsigned int flags; /* event flags */
349 unsigned int time; /* event time */
350 lparam_t info; /* extra info */
351 } mouse;
352 struct
354 int type; /* INPUT_HARDWARE */
355 unsigned int msg; /* message code */
356 lparam_t lparam; /* message param */
357 } hw;
358 } hw_input_t;
360 typedef union
362 unsigned char bytes[1]; /* raw data for sent messages */
363 struct hardware_msg_data hardware;
364 struct callback_msg_data callback;
365 struct winevent_msg_data winevent;
366 } message_data_t;
368 /* structure for console char/attribute info */
369 typedef struct
371 WCHAR ch;
372 unsigned short attr;
373 } char_info_t;
375 /* structure returned in filesystem events */
376 struct filesystem_event
378 int action;
379 data_size_t len;
380 char name[1];
383 typedef struct
385 unsigned int low_part;
386 int high_part;
387 } luid_t;
389 #define MAX_ACL_LEN 65535
391 struct security_descriptor
393 unsigned int control; /* SE_ flags */
394 data_size_t owner_len;
395 data_size_t group_len;
396 data_size_t sacl_len;
397 data_size_t dacl_len;
398 /* VARARG(owner,SID); */
399 /* VARARG(group,SID); */
400 /* VARARG(sacl,ACL); */
401 /* VARARG(dacl,ACL); */
404 struct object_attributes
406 obj_handle_t rootdir; /* root directory */
407 unsigned int attributes; /* object attributes */
408 data_size_t sd_len; /* length of security_descriptor data. may be 0 */
409 data_size_t name_len; /* length of the name string. may be 0 */
410 /* VARARG(sd,security_descriptor); */
411 /* VARARG(name,unicode_str); */
414 struct token_groups
416 unsigned int count;
417 /* unsigned int attributes[count]; */
418 /* VARARG(sids,SID); */
421 enum select_op
423 SELECT_NONE,
424 SELECT_WAIT,
425 SELECT_WAIT_ALL,
426 SELECT_SIGNAL_AND_WAIT,
427 SELECT_KEYED_EVENT_WAIT,
428 SELECT_KEYED_EVENT_RELEASE
431 typedef union
433 enum select_op op;
434 struct
436 enum select_op op; /* SELECT_WAIT or SELECT_WAIT_ALL */
437 obj_handle_t handles[MAXIMUM_WAIT_OBJECTS];
438 } wait;
439 struct
441 enum select_op op; /* SELECT_SIGNAL_AND_WAIT */
442 obj_handle_t wait;
443 obj_handle_t signal; /* must be last in the structure so we can remove it on retries */
444 } signal_and_wait;
445 struct
447 enum select_op op; /* SELECT_KEYED_EVENT_WAIT or SELECT_KEYED_EVENT_RELEASE */
448 obj_handle_t handle;
449 client_ptr_t key;
450 } keyed_event;
451 } select_op_t;
453 enum apc_type
455 APC_NONE,
456 APC_USER,
457 APC_TIMER,
458 APC_ASYNC_IO,
459 APC_VIRTUAL_ALLOC,
460 APC_VIRTUAL_FREE,
461 APC_VIRTUAL_QUERY,
462 APC_VIRTUAL_PROTECT,
463 APC_VIRTUAL_FLUSH,
464 APC_VIRTUAL_LOCK,
465 APC_VIRTUAL_UNLOCK,
466 APC_MAP_VIEW,
467 APC_UNMAP_VIEW,
468 APC_CREATE_THREAD
471 typedef union
473 enum apc_type type;
474 struct
476 enum apc_type type; /* APC_USER */
477 int __pad;
478 client_ptr_t func; /* void (__stdcall *func)(ULONG_PTR,ULONG_PTR,ULONG_PTR); */
479 apc_param_t args[3]; /* arguments for user function */
480 } user;
481 struct
483 enum apc_type type; /* APC_TIMER */
484 int __pad;
485 client_ptr_t func; /* void (__stdcall *func)(void*, unsigned int, unsigned int); */
486 timeout_t time; /* absolute time of expiration */
487 client_ptr_t arg; /* user argument */
488 } timer;
489 struct
491 enum apc_type type; /* APC_ASYNC_IO */
492 unsigned int status; /* I/O status */
493 client_ptr_t user; /* user pointer */
494 client_ptr_t sb; /* status block */
495 } async_io;
496 struct
498 enum apc_type type; /* APC_VIRTUAL_ALLOC */
499 unsigned int op_type; /* type of operation */
500 client_ptr_t addr; /* requested address */
501 mem_size_t size; /* allocation size */
502 unsigned int zero_bits; /* allocation alignment */
503 unsigned int prot; /* memory protection flags */
504 } virtual_alloc;
505 struct
507 enum apc_type type; /* APC_VIRTUAL_FREE */
508 unsigned int op_type; /* type of operation */
509 client_ptr_t addr; /* requested address */
510 mem_size_t size; /* allocation size */
511 } virtual_free;
512 struct
514 enum apc_type type; /* APC_VIRTUAL_QUERY */
515 int __pad;
516 client_ptr_t addr; /* requested address */
517 } virtual_query;
518 struct
520 enum apc_type type; /* APC_VIRTUAL_PROTECT */
521 unsigned int prot; /* new protection flags */
522 client_ptr_t addr; /* requested address */
523 mem_size_t size; /* requested size */
524 } virtual_protect;
525 struct
527 enum apc_type type; /* APC_VIRTUAL_FLUSH */
528 int __pad;
529 client_ptr_t addr; /* requested address */
530 mem_size_t size; /* requested size */
531 } virtual_flush;
532 struct
534 enum apc_type type; /* APC_VIRTUAL_LOCK */
535 int __pad;
536 client_ptr_t addr; /* requested address */
537 mem_size_t size; /* requested size */
538 } virtual_lock;
539 struct
541 enum apc_type type; /* APC_VIRTUAL_UNLOCK */
542 int __pad;
543 client_ptr_t addr; /* requested address */
544 mem_size_t size; /* requested size */
545 } virtual_unlock;
546 struct
548 enum apc_type type; /* APC_MAP_VIEW */
549 obj_handle_t handle; /* mapping handle */
550 client_ptr_t addr; /* requested address */
551 mem_size_t size; /* allocation size */
552 file_pos_t offset; /* file offset */
553 unsigned int alloc_type;/* allocation type */
554 unsigned short zero_bits; /* allocation alignment */
555 unsigned short prot; /* memory protection flags */
556 } map_view;
557 struct
559 enum apc_type type; /* APC_UNMAP_VIEW */
560 int __pad;
561 client_ptr_t addr; /* view address */
562 } unmap_view;
563 struct
565 enum apc_type type; /* APC_CREATE_THREAD */
566 int suspend; /* suspended thread? */
567 client_ptr_t func; /* void (__stdcall *func)(void*); start function */
568 client_ptr_t arg; /* argument for start function */
569 mem_size_t reserve; /* reserve size for thread stack */
570 mem_size_t commit; /* commit size for thread stack */
571 } create_thread;
572 } apc_call_t;
574 typedef union
576 enum apc_type type;
577 struct
579 enum apc_type type; /* APC_ASYNC_IO */
580 unsigned int status; /* new status of async operation */
581 unsigned int total; /* bytes transferred */
582 } async_io;
583 struct
585 enum apc_type type; /* APC_VIRTUAL_ALLOC */
586 unsigned int status; /* status returned by call */
587 client_ptr_t addr; /* resulting address */
588 mem_size_t size; /* resulting size */
589 } virtual_alloc;
590 struct
592 enum apc_type type; /* APC_VIRTUAL_FREE */
593 unsigned int status; /* status returned by call */
594 client_ptr_t addr; /* resulting address */
595 mem_size_t size; /* resulting size */
596 } virtual_free;
597 struct
599 enum apc_type type; /* APC_VIRTUAL_QUERY */
600 unsigned int status; /* status returned by call */
601 client_ptr_t base; /* resulting base address */
602 client_ptr_t alloc_base;/* resulting allocation base */
603 mem_size_t size; /* resulting region size */
604 unsigned short state; /* resulting region state */
605 unsigned short prot; /* resulting region protection */
606 unsigned short alloc_prot;/* resulting allocation protection */
607 unsigned short alloc_type;/* resulting region allocation type */
608 } virtual_query;
609 struct
611 enum apc_type type; /* APC_VIRTUAL_PROTECT */
612 unsigned int status; /* status returned by call */
613 client_ptr_t addr; /* resulting address */
614 mem_size_t size; /* resulting size */
615 unsigned int prot; /* old protection flags */
616 } virtual_protect;
617 struct
619 enum apc_type type; /* APC_VIRTUAL_FLUSH */
620 unsigned int status; /* status returned by call */
621 client_ptr_t addr; /* resulting address */
622 mem_size_t size; /* resulting size */
623 } virtual_flush;
624 struct
626 enum apc_type type; /* APC_VIRTUAL_LOCK */
627 unsigned int status; /* status returned by call */
628 client_ptr_t addr; /* resulting address */
629 mem_size_t size; /* resulting size */
630 } virtual_lock;
631 struct
633 enum apc_type type; /* APC_VIRTUAL_UNLOCK */
634 unsigned int status; /* status returned by call */
635 client_ptr_t addr; /* resulting address */
636 mem_size_t size; /* resulting size */
637 } virtual_unlock;
638 struct
640 enum apc_type type; /* APC_MAP_VIEW */
641 unsigned int status; /* status returned by call */
642 client_ptr_t addr; /* resulting address */
643 mem_size_t size; /* resulting size */
644 } map_view;
645 struct
647 enum apc_type type; /* APC_MAP_VIEW */
648 unsigned int status; /* status returned by call */
649 } unmap_view;
650 struct
652 enum apc_type type; /* APC_CREATE_THREAD */
653 unsigned int status; /* status returned by call */
654 thread_id_t tid; /* thread id */
655 obj_handle_t handle; /* handle to new thread */
656 } create_thread;
657 } apc_result_t;
659 typedef union
661 unsigned int major; /* irp major function */
662 struct
664 unsigned int major; /* IRP_MJ_CREATE */
665 unsigned int access; /* access rights */
666 unsigned int sharing; /* sharing flags */
667 unsigned int options; /* file options */
668 client_ptr_t device; /* opaque ptr for the device */
669 } create;
670 struct
672 unsigned int major; /* IRP_MJ_CLOSE */
673 int __pad;
674 client_ptr_t file; /* opaque ptr for the file object */
675 } close;
676 struct
678 unsigned int major; /* IRP_MJ_READ */
679 unsigned int key; /* driver key */
680 client_ptr_t file; /* opaque ptr for the file object */
681 file_pos_t pos; /* file position */
682 } read;
683 struct
685 unsigned int major; /* IRP_MJ_WRITE */
686 unsigned int key; /* driver key */
687 client_ptr_t file; /* opaque ptr for the file object */
688 file_pos_t pos; /* file position */
689 } write;
690 struct
692 unsigned int major; /* IRP_MJ_FLUSH_BUFFERS */
693 int __pad;
694 client_ptr_t file; /* opaque ptr for the file object */
695 } flush;
696 struct
698 unsigned int major; /* IRP_MJ_DEVICE_CONTROL */
699 ioctl_code_t code; /* ioctl code */
700 client_ptr_t file; /* opaque ptr for the file object */
701 } ioctl;
702 } irp_params_t;
704 /* information about a PE image mapping, roughly equivalent to SECTION_IMAGE_INFORMATION */
705 typedef struct
707 client_ptr_t base;
708 client_ptr_t entry_point;
709 mem_size_t map_size;
710 mem_size_t stack_size;
711 mem_size_t stack_commit;
712 unsigned int zerobits;
713 unsigned int subsystem;
714 unsigned short subsystem_low;
715 unsigned short subsystem_high;
716 unsigned int gp;
717 unsigned short image_charact;
718 unsigned short dll_charact;
719 unsigned short machine;
720 unsigned char contains_code;
721 unsigned char image_flags;
722 unsigned int loader_flags;
723 unsigned int header_size;
724 unsigned int file_size;
725 unsigned int checksum;
726 cpu_type_t cpu;
727 } pe_image_info_t;
728 #define IMAGE_FLAGS_ComPlusNativeReady 0x01
729 #define IMAGE_FLAGS_ComPlusILOnly 0x02
730 #define IMAGE_FLAGS_ImageDynamicallyRelocated 0x04
731 #define IMAGE_FLAGS_ImageMappedFlat 0x08
732 #define IMAGE_FLAGS_BaseBelow4gb 0x10
734 struct rawinput_device
736 unsigned short usage_page;
737 unsigned short usage;
738 unsigned int flags;
739 user_handle_t target;
742 /****************************************************************/
743 /* Request declarations */
745 /* Create a new process from the context of the parent */
746 @REQ(new_process)
747 int inherit_all; /* inherit all handles from parent */
748 unsigned int create_flags; /* creation flags */
749 int socket_fd; /* file descriptor for process socket */
750 obj_handle_t exe_file; /* file handle for main exe */
751 unsigned int access; /* access rights for process object */
752 cpu_type_t cpu; /* CPU that the new process will use */
753 data_size_t info_size; /* size of startup info */
754 VARARG(objattr,object_attributes); /* object attributes */
755 VARARG(info,startup_info,info_size); /* startup information */
756 VARARG(env,unicode_str); /* environment for new process */
757 @REPLY
758 obj_handle_t info; /* new process info handle */
759 process_id_t pid; /* process id */
760 obj_handle_t handle; /* process handle (in the current process) */
761 @END
764 /* Execute a process, replacing the current one */
765 @REQ(exec_process)
766 int socket_fd; /* file descriptor for process socket */
767 obj_handle_t exe_file; /* file handle for main exe */
768 cpu_type_t cpu; /* CPU that the new process will use */
769 @END
772 /* Retrieve information about a newly started process */
773 @REQ(get_new_process_info)
774 obj_handle_t info; /* info handle returned from new_process_request */
775 @REPLY
776 int success; /* did the process start successfully? */
777 int exit_code; /* process exit code if failed */
778 @END
781 /* Create a new thread */
782 @REQ(new_thread)
783 obj_handle_t process; /* process in which to create thread */
784 unsigned int access; /* wanted access rights */
785 int suspend; /* new thread should be suspended on creation */
786 int request_fd; /* fd for request pipe */
787 VARARG(objattr,object_attributes); /* object attributes */
788 @REPLY
789 thread_id_t tid; /* thread id */
790 obj_handle_t handle; /* thread handle (in the current process) */
791 @END
794 /* Retrieve the new process startup info */
795 @REQ(get_startup_info)
796 @REPLY
797 data_size_t info_size; /* size of startup info */
798 VARARG(info,startup_info,info_size); /* startup information */
799 VARARG(env,unicode_str); /* environment */
800 @END
803 /* Signal the end of the process initialization */
804 @REQ(init_process_done)
805 int gui; /* is it a GUI process? */
806 mod_handle_t module; /* main module base address */
807 client_ptr_t ldt_copy; /* address of LDT copy (in thread address space) */
808 client_ptr_t entry; /* process entry point */
809 @REPLY
810 int suspend; /* is process suspended? */
811 @END
814 /* Initialize a thread; called from the child after fork()/clone() */
815 @REQ(init_thread)
816 int unix_pid; /* Unix pid of new thread */
817 int unix_tid; /* Unix tid of new thread */
818 int debug_level; /* new debug level */
819 client_ptr_t teb; /* TEB of new thread (in thread address space) */
820 client_ptr_t entry; /* entry point or PEB if initial thread (in thread address space) */
821 int reply_fd; /* fd for reply pipe */
822 int wait_fd; /* fd for blocking calls pipe */
823 cpu_type_t cpu; /* CPU that this thread is running on */
824 @REPLY
825 process_id_t pid; /* process id of the new thread's process */
826 thread_id_t tid; /* thread id of the new thread */
827 timeout_t server_start; /* server start time */
828 data_size_t info_size; /* total size of startup info */
829 int version; /* protocol version */
830 unsigned int all_cpus; /* bitset of supported CPUs */
831 int suspend; /* is thread suspended? */
832 @END
835 /* Terminate a process */
836 @REQ(terminate_process)
837 obj_handle_t handle; /* process handle to terminate */
838 int exit_code; /* process exit code */
839 @REPLY
840 int self; /* suicide? */
841 @END
844 /* Terminate a thread */
845 @REQ(terminate_thread)
846 obj_handle_t handle; /* thread handle to terminate */
847 int exit_code; /* thread exit code */
848 @REPLY
849 int self; /* suicide? */
850 int last; /* last thread in this process? */
851 @END
854 /* Retrieve information about a process */
855 @REQ(get_process_info)
856 obj_handle_t handle; /* process handle */
857 @REPLY
858 process_id_t pid; /* server process id */
859 process_id_t ppid; /* server process id of parent */
860 affinity_t affinity; /* process affinity mask */
861 client_ptr_t peb; /* PEB address in process address space */
862 timeout_t start_time; /* process start time */
863 timeout_t end_time; /* process end time */
864 int exit_code; /* process exit code */
865 int priority; /* priority class */
866 cpu_type_t cpu; /* CPU that this process is running on */
867 short int debugger_present; /* process is being debugged */
868 short int debug_children; /* inherit debugger to child processes */
869 @END
872 /* Retrieve information about a process memory usage */
873 @REQ(get_process_vm_counters)
874 obj_handle_t handle; /* process handle */
875 @REPLY
876 mem_size_t peak_virtual_size; /* peak virtual memory in bytes */
877 mem_size_t virtual_size; /* virtual memory in bytes */
878 mem_size_t peak_working_set_size; /* peak real memory in bytes */
879 mem_size_t working_set_size; /* real memory in bytes */
880 mem_size_t pagefile_usage; /* commit charge in bytes */
881 mem_size_t peak_pagefile_usage; /* peak commit charge in bytes */
882 @END
885 /* Set a process information */
886 @REQ(set_process_info)
887 obj_handle_t handle; /* process handle */
888 int mask; /* setting mask (see below) */
889 int priority; /* priority class */
890 affinity_t affinity; /* affinity mask */
891 @END
892 #define SET_PROCESS_INFO_PRIORITY 0x01
893 #define SET_PROCESS_INFO_AFFINITY 0x02
896 /* Retrieve information about a thread */
897 @REQ(get_thread_info)
898 obj_handle_t handle; /* thread handle */
899 thread_id_t tid_in; /* thread id (optional) */
900 @REPLY
901 process_id_t pid; /* server process id */
902 thread_id_t tid; /* server thread id */
903 client_ptr_t teb; /* thread teb pointer */
904 client_ptr_t entry_point; /* thread entry point */
905 affinity_t affinity; /* thread affinity mask */
906 int exit_code; /* thread exit code */
907 int priority; /* thread priority level */
908 int last; /* last thread in process */
909 @END
912 /* Retrieve information about thread times */
913 @REQ(get_thread_times)
914 obj_handle_t handle; /* thread handle */
915 @REPLY
916 timeout_t creation_time; /* thread creation time */
917 timeout_t exit_time; /* thread exit time */
918 @END
921 /* Set a thread information */
922 @REQ(set_thread_info)
923 obj_handle_t handle; /* thread handle */
924 int mask; /* setting mask (see below) */
925 int priority; /* priority class */
926 affinity_t affinity; /* affinity mask */
927 client_ptr_t entry_point; /* thread entry point */
928 obj_handle_t token; /* impersonation token */
929 @END
930 #define SET_THREAD_INFO_PRIORITY 0x01
931 #define SET_THREAD_INFO_AFFINITY 0x02
932 #define SET_THREAD_INFO_TOKEN 0x04
933 #define SET_THREAD_INFO_ENTRYPOINT 0x08
936 /* Retrieve information about a module */
937 @REQ(get_dll_info)
938 obj_handle_t handle; /* process handle */
939 mod_handle_t base_address; /* base address of module */
940 @REPLY
941 client_ptr_t entry_point;
942 data_size_t filename_len; /* buffer len in bytes required to store filename */
943 VARARG(filename,unicode_str); /* file name of module */
944 @END
947 /* Suspend a thread */
948 @REQ(suspend_thread)
949 obj_handle_t handle; /* thread handle */
950 @REPLY
951 int count; /* new suspend count */
952 @END
955 /* Resume a thread */
956 @REQ(resume_thread)
957 obj_handle_t handle; /* thread handle */
958 @REPLY
959 int count; /* new suspend count */
960 @END
963 /* Notify the server that a dll has been loaded */
964 @REQ(load_dll)
965 data_size_t dbg_offset; /* debug info offset */
966 mod_handle_t base; /* base address */
967 client_ptr_t name; /* ptr to ptr to name (in process addr space) */
968 data_size_t dbg_size; /* debug info size */
969 VARARG(filename,unicode_str); /* file name of dll */
970 @END
973 /* Notify the server that a dll is being unloaded */
974 @REQ(unload_dll)
975 mod_handle_t base; /* base address */
976 @END
979 /* Queue an APC for a thread or process */
980 @REQ(queue_apc)
981 obj_handle_t handle; /* thread or process handle */
982 apc_call_t call; /* call arguments */
983 @REPLY
984 obj_handle_t handle; /* APC handle */
985 int self; /* run APC in caller itself? */
986 @END
989 /* Get the result of an APC call */
990 @REQ(get_apc_result)
991 obj_handle_t handle; /* handle to the APC */
992 @REPLY
993 apc_result_t result; /* result of the APC */
994 @END
997 /* Close a handle for the current process */
998 @REQ(close_handle)
999 obj_handle_t handle; /* handle to close */
1000 @END
1003 /* Set a handle information */
1004 @REQ(set_handle_info)
1005 obj_handle_t handle; /* handle we are interested in */
1006 int flags; /* new handle flags */
1007 int mask; /* mask for flags to set */
1008 @REPLY
1009 int old_flags; /* old flag value */
1010 @END
1013 /* Duplicate a handle */
1014 @REQ(dup_handle)
1015 obj_handle_t src_process; /* src process handle */
1016 obj_handle_t src_handle; /* src handle to duplicate */
1017 obj_handle_t dst_process; /* dst process handle */
1018 unsigned int access; /* wanted access rights */
1019 unsigned int attributes; /* object attributes */
1020 unsigned int options; /* duplicate options (see below) */
1021 @REPLY
1022 obj_handle_t handle; /* duplicated handle in dst process */
1023 int self; /* is the source the current process? */
1024 int closed; /* whether the source handle has been closed */
1025 @END
1026 #define DUP_HANDLE_CLOSE_SOURCE DUPLICATE_CLOSE_SOURCE
1027 #define DUP_HANDLE_SAME_ACCESS DUPLICATE_SAME_ACCESS
1028 #define DUP_HANDLE_MAKE_GLOBAL 0x80000000 /* Not a Windows flag */
1031 /* Open a handle to a process */
1032 @REQ(open_process)
1033 process_id_t pid; /* process id to open */
1034 unsigned int access; /* wanted access rights */
1035 unsigned int attributes; /* object attributes */
1036 @REPLY
1037 obj_handle_t handle; /* handle to the process */
1038 @END
1041 /* Open a handle to a thread */
1042 @REQ(open_thread)
1043 thread_id_t tid; /* thread id to open */
1044 unsigned int access; /* wanted access rights */
1045 unsigned int attributes; /* object attributes */
1046 @REPLY
1047 obj_handle_t handle; /* handle to the thread */
1048 @END
1051 /* Wait for handles */
1052 @REQ(select)
1053 int flags; /* wait flags (see below) */
1054 client_ptr_t cookie; /* magic cookie to return to client */
1055 timeout_t timeout; /* timeout */
1056 obj_handle_t prev_apc; /* handle to previous APC */
1057 VARARG(result,apc_result); /* result of previous APC */
1058 VARARG(data,select_op); /* operation-specific data */
1059 @REPLY
1060 timeout_t timeout; /* timeout converted to absolute */
1061 apc_call_t call; /* APC call arguments */
1062 obj_handle_t apc_handle; /* handle to next APC */
1063 @END
1064 #define SELECT_ALERTABLE 1
1065 #define SELECT_INTERRUPTIBLE 2
1068 /* Create an event */
1069 @REQ(create_event)
1070 unsigned int access; /* wanted access rights */
1071 int manual_reset; /* manual reset event */
1072 int initial_state; /* initial state of the event */
1073 VARARG(objattr,object_attributes); /* object attributes */
1074 @REPLY
1075 obj_handle_t handle; /* handle to the event */
1076 @END
1078 /* Event operation */
1079 @REQ(event_op)
1080 obj_handle_t handle; /* handle to event */
1081 int op; /* event operation (see below) */
1082 @END
1083 enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT };
1085 @REQ(query_event)
1086 obj_handle_t handle; /* handle to event */
1087 @REPLY
1088 int manual_reset; /* manual reset event */
1089 int state; /* current state of the event */
1090 @END
1092 /* Open an event */
1093 @REQ(open_event)
1094 unsigned int access; /* wanted access rights */
1095 unsigned int attributes; /* object attributes */
1096 obj_handle_t rootdir; /* root directory */
1097 VARARG(name,unicode_str); /* object name */
1098 @REPLY
1099 obj_handle_t handle; /* handle to the event */
1100 @END
1103 /* Create a keyed event */
1104 @REQ(create_keyed_event)
1105 unsigned int access; /* wanted access rights */
1106 VARARG(objattr,object_attributes); /* object attributes */
1107 @REPLY
1108 obj_handle_t handle; /* handle to the event */
1109 @END
1111 /* Open a keyed event */
1112 @REQ(open_keyed_event)
1113 unsigned int access; /* wanted access rights */
1114 unsigned int attributes; /* object attributes */
1115 obj_handle_t rootdir; /* root directory */
1116 VARARG(name,unicode_str); /* object name */
1117 @REPLY
1118 obj_handle_t handle; /* handle to the event */
1119 @END
1122 /* Create a mutex */
1123 @REQ(create_mutex)
1124 unsigned int access; /* wanted access rights */
1125 int owned; /* initially owned? */
1126 VARARG(objattr,object_attributes); /* object attributes */
1127 @REPLY
1128 obj_handle_t handle; /* handle to the mutex */
1129 @END
1132 /* Release a mutex */
1133 @REQ(release_mutex)
1134 obj_handle_t handle; /* handle to the mutex */
1135 @REPLY
1136 unsigned int prev_count; /* value of internal counter, before release */
1137 @END
1140 /* Open a mutex */
1141 @REQ(open_mutex)
1142 unsigned int access; /* wanted access rights */
1143 unsigned int attributes; /* object attributes */
1144 obj_handle_t rootdir; /* root directory */
1145 VARARG(name,unicode_str); /* object name */
1146 @REPLY
1147 obj_handle_t handle; /* handle to the mutex */
1148 @END
1151 /* Query a mutex */
1152 @REQ(query_mutex)
1153 obj_handle_t handle; /* handle to mutex */
1154 @REPLY
1155 unsigned int count; /* current count of mutex */
1156 int owned; /* true if owned by current thread */
1157 int abandoned; /* true if abandoned */
1158 @END
1161 /* Create a semaphore */
1162 @REQ(create_semaphore)
1163 unsigned int access; /* wanted access rights */
1164 unsigned int initial; /* initial count */
1165 unsigned int max; /* maximum count */
1166 VARARG(objattr,object_attributes); /* object attributes */
1167 @REPLY
1168 obj_handle_t handle; /* handle to the semaphore */
1169 @END
1172 /* Release a semaphore */
1173 @REQ(release_semaphore)
1174 obj_handle_t handle; /* handle to the semaphore */
1175 unsigned int count; /* count to add to semaphore */
1176 @REPLY
1177 unsigned int prev_count; /* previous semaphore count */
1178 @END
1180 @REQ(query_semaphore)
1181 obj_handle_t handle; /* handle to the semaphore */
1182 @REPLY
1183 unsigned int current; /* current count */
1184 unsigned int max; /* maximum count */
1185 @END
1187 /* Open a semaphore */
1188 @REQ(open_semaphore)
1189 unsigned int access; /* wanted access rights */
1190 unsigned int attributes; /* object attributes */
1191 obj_handle_t rootdir; /* root directory */
1192 VARARG(name,unicode_str); /* object name */
1193 @REPLY
1194 obj_handle_t handle; /* handle to the semaphore */
1195 @END
1198 /* Create a file */
1199 @REQ(create_file)
1200 unsigned int access; /* wanted access rights */
1201 unsigned int sharing; /* sharing flags */
1202 int create; /* file create action */
1203 unsigned int options; /* file options */
1204 unsigned int attrs; /* file attributes for creation */
1205 VARARG(objattr,object_attributes); /* object attributes */
1206 VARARG(filename,string); /* file name */
1207 @REPLY
1208 obj_handle_t handle; /* handle to the file */
1209 @END
1212 /* Open a file object */
1213 @REQ(open_file_object)
1214 unsigned int access; /* wanted access rights */
1215 unsigned int attributes; /* open attributes */
1216 obj_handle_t rootdir; /* root directory */
1217 unsigned int sharing; /* sharing flags */
1218 unsigned int options; /* file options */
1219 VARARG(filename,unicode_str); /* file name */
1220 @REPLY
1221 obj_handle_t handle; /* handle to the file */
1222 @END
1225 /* Allocate a file handle for a Unix fd */
1226 @REQ(alloc_file_handle)
1227 unsigned int access; /* wanted access rights */
1228 unsigned int attributes; /* object attributes */
1229 int fd; /* file descriptor on the client side */
1230 @REPLY
1231 obj_handle_t handle; /* handle to the file */
1232 @END
1235 /* Get the Unix name from a file handle */
1236 @REQ(get_handle_unix_name)
1237 obj_handle_t handle; /* file handle */
1238 @REPLY
1239 data_size_t name_len; /* unix name length */
1240 VARARG(name,string); /* unix name */
1241 @END
1244 /* Get a Unix fd to access a file */
1245 @REQ(get_handle_fd)
1246 obj_handle_t handle; /* handle to the file */
1247 @REPLY
1248 int type; /* file type (see below) */
1249 int cacheable; /* can fd be cached in the client? */
1250 unsigned int access; /* file access rights */
1251 unsigned int options; /* file open options */
1252 @END
1253 enum server_fd_type
1255 FD_TYPE_INVALID, /* invalid file (no associated fd) */
1256 FD_TYPE_FILE, /* regular file */
1257 FD_TYPE_DIR, /* directory */
1258 FD_TYPE_SOCKET, /* socket */
1259 FD_TYPE_SERIAL, /* serial port */
1260 FD_TYPE_PIPE, /* named pipe */
1261 FD_TYPE_MAILSLOT, /* mailslot */
1262 FD_TYPE_CHAR, /* unspecified char device */
1263 FD_TYPE_DEVICE, /* Windows device file */
1264 FD_TYPE_NB_TYPES
1268 /* Retrieve (or allocate) the client-side directory cache entry */
1269 @REQ(get_directory_cache_entry)
1270 obj_handle_t handle; /* handle to the directory */
1271 @REPLY
1272 int entry; /* cache entry on the client side */
1273 VARARG(free,ints); /* entries that can be freed */
1274 @END
1277 /* Flush a file buffers */
1278 @REQ(flush)
1279 async_data_t async; /* async I/O parameters */
1280 @REPLY
1281 obj_handle_t event; /* event set when finished */
1282 @END
1284 /* Query file information */
1285 @REQ(get_file_info)
1286 obj_handle_t handle; /* handle to the file */
1287 unsigned int info_class; /* queried information class */
1288 @REPLY
1289 VARARG(data,bytes); /* file info data */
1290 @END
1292 /* Query volume information */
1293 @REQ(get_volume_info)
1294 obj_handle_t handle; /* handle to the file */
1295 unsigned int info_class; /* queried information class */
1296 @REPLY
1297 VARARG(data,bytes); /* volume info data */
1298 @END
1300 /* Lock a region of a file */
1301 @REQ(lock_file)
1302 obj_handle_t handle; /* handle to the file */
1303 file_pos_t offset; /* offset of start of lock */
1304 file_pos_t count; /* count of bytes to lock */
1305 int shared; /* shared or exclusive lock? */
1306 int wait; /* do we want to wait? */
1307 @REPLY
1308 obj_handle_t handle; /* handle to wait on */
1309 int overlapped; /* is it an overlapped I/O handle? */
1310 @END
1313 /* Unlock a region of a file */
1314 @REQ(unlock_file)
1315 obj_handle_t handle; /* handle to the file */
1316 file_pos_t offset; /* offset of start of unlock */
1317 file_pos_t count; /* count of bytes to unlock */
1318 @END
1321 /* Create a socket */
1322 @REQ(create_socket)
1323 unsigned int access; /* wanted access rights */
1324 unsigned int attributes; /* object attributes */
1325 int family; /* family, see socket manpage */
1326 int type; /* type, see socket manpage */
1327 int protocol; /* protocol, see socket manpage */
1328 unsigned int flags; /* socket flags */
1329 @REPLY
1330 obj_handle_t handle; /* handle to the new socket */
1331 @END
1334 /* Accept a socket */
1335 @REQ(accept_socket)
1336 obj_handle_t lhandle; /* handle to the listening socket */
1337 unsigned int access; /* wanted access rights */
1338 unsigned int attributes; /* object attributes */
1339 @REPLY
1340 obj_handle_t handle; /* handle to the new socket */
1341 @END
1344 /* Accept into an initialized socket */
1345 @REQ(accept_into_socket)
1346 obj_handle_t lhandle; /* handle to the listening socket */
1347 obj_handle_t ahandle; /* handle to the accepting socket */
1348 @END
1351 /* Set socket event parameters */
1352 @REQ(set_socket_event)
1353 obj_handle_t handle; /* handle to the socket */
1354 unsigned int mask; /* event mask */
1355 obj_handle_t event; /* event object */
1356 user_handle_t window; /* window to send the message to */
1357 unsigned int msg; /* message to send */
1358 @END
1361 /* Get socket event parameters */
1362 @REQ(get_socket_event)
1363 obj_handle_t handle; /* handle to the socket */
1364 int service; /* clear pending? */
1365 obj_handle_t c_event; /* event to clear */
1366 @REPLY
1367 unsigned int mask; /* event mask */
1368 unsigned int pmask; /* pending events */
1369 unsigned int state; /* status bits */
1370 VARARG(errors,ints); /* event errors */
1371 @END
1374 /* Get socket info */
1375 @REQ(get_socket_info)
1376 obj_handle_t handle; /* handle to the socket */
1377 @REPLY
1378 int family; /* family, see socket manpage */
1379 int type; /* type, see socket manpage */
1380 int protocol; /* protocol, see socket manpage */
1381 @END
1384 /* Re-enable pending socket events */
1385 @REQ(enable_socket_event)
1386 obj_handle_t handle; /* handle to the socket */
1387 unsigned int mask; /* events to re-enable */
1388 unsigned int sstate; /* status bits to set */
1389 unsigned int cstate; /* status bits to clear */
1390 @END
1392 @REQ(set_socket_deferred)
1393 obj_handle_t handle; /* handle to the socket */
1394 obj_handle_t deferred; /* handle to the socket for which accept() is deferred */
1395 @END
1397 /* Allocate a console (only used by a console renderer) */
1398 @REQ(alloc_console)
1399 unsigned int access; /* wanted access rights */
1400 unsigned int attributes; /* object attributes */
1401 process_id_t pid; /* pid of process which shall be attached to the console */
1402 int input_fd; /* if pid=-1 (bare console to current process), fd for input */
1403 @REPLY
1404 obj_handle_t handle_in; /* handle to console input */
1405 obj_handle_t event; /* handle to renderer events change notification */
1406 @END
1409 /* Free the console of the current process */
1410 @REQ(free_console)
1411 @END
1414 #define CONSOLE_RENDERER_NONE_EVENT 0x00
1415 #define CONSOLE_RENDERER_TITLE_EVENT 0x01
1416 #define CONSOLE_RENDERER_ACTIVE_SB_EVENT 0x02
1417 #define CONSOLE_RENDERER_SB_RESIZE_EVENT 0x03
1418 #define CONSOLE_RENDERER_UPDATE_EVENT 0x04
1419 #define CONSOLE_RENDERER_CURSOR_POS_EVENT 0x05
1420 #define CONSOLE_RENDERER_CURSOR_GEOM_EVENT 0x06
1421 #define CONSOLE_RENDERER_DISPLAY_EVENT 0x07
1422 #define CONSOLE_RENDERER_EXIT_EVENT 0x08
1423 struct console_renderer_event
1425 short event;
1426 union
1428 struct
1430 short top;
1431 short bottom;
1432 } update;
1433 struct
1435 short width;
1436 short height;
1437 } resize;
1438 struct
1440 short x;
1441 short y;
1442 } cursor_pos;
1443 struct
1445 short visible;
1446 short size;
1447 } cursor_geom;
1448 struct
1450 short left;
1451 short top;
1452 short width;
1453 short height;
1454 } display;
1455 } u;
1458 /* retrieve console events for the renderer */
1459 @REQ(get_console_renderer_events)
1460 obj_handle_t handle; /* handle to console input events */
1461 @REPLY
1462 VARARG(data,bytes); /* the various console_renderer_events */
1463 @END
1466 /* Open a handle to the process console */
1467 @REQ(open_console)
1468 obj_handle_t from; /* 0 (resp 1) input (resp output) of current process console */
1469 /* otherwise console_in handle to get active screen buffer? */
1470 unsigned int access; /* wanted access rights */
1471 unsigned int attributes; /* object attributes */
1472 int share; /* share mask (only for output handles) */
1473 @REPLY
1474 obj_handle_t handle; /* handle to the console */
1475 @END
1478 /* Attach to a other process's console */
1479 @REQ(attach_console)
1480 process_id_t pid; /* pid of attached console process */
1481 @REPLY
1482 obj_handle_t std_in; /* attached stdin */
1483 obj_handle_t std_out; /* attached stdout */
1484 obj_handle_t std_err; /* attached stderr */
1485 @END
1488 /* Get the input queue wait event */
1489 @REQ(get_console_wait_event)
1490 @REPLY
1491 obj_handle_t handle;
1492 @END
1494 /* Get a console mode (input or output) */
1495 @REQ(get_console_mode)
1496 obj_handle_t handle; /* handle to the console */
1497 @REPLY
1498 int mode; /* console mode */
1499 @END
1502 /* Set a console mode (input or output) */
1503 @REQ(set_console_mode)
1504 obj_handle_t handle; /* handle to the console */
1505 int mode; /* console mode */
1506 @END
1509 /* Set info about a console (input only) */
1510 @REQ(set_console_input_info)
1511 obj_handle_t handle; /* handle to console input, or 0 for process' console */
1512 int mask; /* setting mask (see below) */
1513 obj_handle_t active_sb; /* active screen buffer */
1514 int history_mode; /* whether we duplicate lines in history */
1515 int history_size; /* number of lines in history */
1516 int edition_mode; /* index to the edition mode flavors */
1517 int input_cp; /* console input codepage */
1518 int output_cp; /* console output codepage */
1519 user_handle_t win; /* console window if backend supports it */
1520 VARARG(title,unicode_str); /* console title */
1521 @END
1522 #define SET_CONSOLE_INPUT_INFO_ACTIVE_SB 0x01
1523 #define SET_CONSOLE_INPUT_INFO_TITLE 0x02
1524 #define SET_CONSOLE_INPUT_INFO_HISTORY_MODE 0x04
1525 #define SET_CONSOLE_INPUT_INFO_HISTORY_SIZE 0x08
1526 #define SET_CONSOLE_INPUT_INFO_EDITION_MODE 0x10
1527 #define SET_CONSOLE_INPUT_INFO_INPUT_CODEPAGE 0x20
1528 #define SET_CONSOLE_INPUT_INFO_OUTPUT_CODEPAGE 0x40
1529 #define SET_CONSOLE_INPUT_INFO_WIN 0x80
1532 /* Get info about a console (input only) */
1533 @REQ(get_console_input_info)
1534 obj_handle_t handle; /* handle to console input, or 0 for process' console */
1535 @REPLY
1536 int history_mode; /* whether we duplicate lines in history */
1537 int history_size; /* number of lines in history */
1538 int history_index; /* number of used lines in history */
1539 int edition_mode; /* index to the edition mode flavors */
1540 int input_cp; /* console input codepage */
1541 int output_cp; /* console output codepage */
1542 user_handle_t win; /* console window if backend supports it */
1543 VARARG(title,unicode_str); /* console title */
1544 @END
1547 /* appends a string to console's history */
1548 @REQ(append_console_input_history)
1549 obj_handle_t handle; /* handle to console input, or 0 for process' console */
1550 VARARG(line,unicode_str); /* line to add */
1551 @END
1554 /* appends a string to console's history */
1555 @REQ(get_console_input_history)
1556 obj_handle_t handle; /* handle to console input, or 0 for process' console */
1557 int index; /* index to get line from */
1558 @REPLY
1559 int total; /* total length of line in Unicode chars */
1560 VARARG(line,unicode_str); /* line to add */
1561 @END
1564 /* creates a new screen buffer on process' console */
1565 @REQ(create_console_output)
1566 obj_handle_t handle_in; /* handle to console input, or 0 for process' console */
1567 unsigned int access; /* wanted access rights */
1568 unsigned int attributes; /* object attributes */
1569 unsigned int share; /* sharing credentials */
1570 int fd; /* for bare consoles, fd the screen-buffer is attached to */
1571 @REPLY
1572 obj_handle_t handle_out; /* handle to the screen buffer */
1573 @END
1576 /* Set info about a console (output only) */
1577 @REQ(set_console_output_info)
1578 obj_handle_t handle; /* handle to the console */
1579 int mask; /* setting mask (see below) */
1580 short int cursor_size; /* size of cursor (percentage filled) */
1581 short int cursor_visible;/* cursor visibility flag */
1582 short int cursor_x; /* position of cursor (x, y) */
1583 short int cursor_y;
1584 short int width; /* width of the screen buffer */
1585 short int height; /* height of the screen buffer */
1586 short int attr; /* default fill attributes (screen colors) */
1587 short int popup_attr; /* pop-up color attributes */
1588 short int win_left; /* window actually displayed by renderer */
1589 short int win_top; /* the rect area is expressed within the */
1590 short int win_right; /* boundaries of the screen buffer */
1591 short int win_bottom;
1592 short int max_width; /* maximum size (width x height) for the window */
1593 short int max_height;
1594 short int font_width; /* font size (width x height) */
1595 short int font_height;
1596 VARARG(colors,uints); /* color table */
1597 @END
1598 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_GEOM 0x0001
1599 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_POS 0x0002
1600 #define SET_CONSOLE_OUTPUT_INFO_SIZE 0x0004
1601 #define SET_CONSOLE_OUTPUT_INFO_ATTR 0x0008
1602 #define SET_CONSOLE_OUTPUT_INFO_DISPLAY_WINDOW 0x0010
1603 #define SET_CONSOLE_OUTPUT_INFO_MAX_SIZE 0x0020
1604 #define SET_CONSOLE_OUTPUT_INFO_FONT 0x0040
1605 #define SET_CONSOLE_OUTPUT_INFO_COLORTABLE 0x0080
1606 #define SET_CONSOLE_OUTPUT_INFO_POPUP_ATTR 0x0100
1609 /* Get info about a console (output only) */
1610 @REQ(get_console_output_info)
1611 obj_handle_t handle; /* handle to the console */
1612 @REPLY
1613 short int cursor_size; /* size of cursor (percentage filled) */
1614 short int cursor_visible;/* cursor visibility flag */
1615 short int cursor_x; /* position of cursor (x, y) */
1616 short int cursor_y;
1617 short int width; /* width of the screen buffer */
1618 short int height; /* height of the screen buffer */
1619 short int attr; /* default fill attributes (screen colors) */
1620 short int popup_attr; /* pop-up color attributes */
1621 short int win_left; /* window actually displayed by renderer */
1622 short int win_top; /* the rect area is expressed within the */
1623 short int win_right; /* boundaries of the screen buffer */
1624 short int win_bottom;
1625 short int max_width; /* maximum size (width x height) for the window */
1626 short int max_height;
1627 short int font_width; /* font size (width x height) */
1628 short int font_height;
1629 VARARG(colors,uints); /* color table */
1630 @END
1632 /* Add input records to a console input queue */
1633 @REQ(write_console_input)
1634 obj_handle_t handle; /* handle to the console input */
1635 VARARG(rec,input_records); /* input records */
1636 @REPLY
1637 int written; /* number of records written */
1638 @END
1641 /* Fetch input records from a console input queue */
1642 @REQ(read_console_input)
1643 obj_handle_t handle; /* handle to the console input */
1644 int flush; /* flush the retrieved records from the queue? */
1645 @REPLY
1646 int read; /* number of records read */
1647 VARARG(rec,input_records); /* input records */
1648 @END
1651 /* write data (chars and/or attributes) in a screen buffer */
1652 @REQ(write_console_output)
1653 obj_handle_t handle; /* handle to the console output */
1654 int x; /* position where to start writing */
1655 int y;
1656 int mode; /* char info (see below) */
1657 int wrap; /* wrap around at end of line? */
1658 VARARG(data,bytes); /* info to write */
1659 @REPLY
1660 int written; /* number of char infos actually written */
1661 int width; /* width of screen buffer */
1662 int height; /* height of screen buffer */
1663 @END
1664 enum char_info_mode
1666 CHAR_INFO_MODE_TEXT, /* characters only */
1667 CHAR_INFO_MODE_ATTR, /* attributes only */
1668 CHAR_INFO_MODE_TEXTATTR, /* both characters and attributes */
1669 CHAR_INFO_MODE_TEXTSTDATTR /* characters but use standard attributes */
1673 /* fill a screen buffer with constant data (chars and/or attributes) */
1674 @REQ(fill_console_output)
1675 obj_handle_t handle; /* handle to the console output */
1676 int x; /* position where to start writing */
1677 int y;
1678 int mode; /* char info mode */
1679 int count; /* number to write */
1680 int wrap; /* wrap around at end of line? */
1681 char_info_t data; /* data to write */
1682 @REPLY
1683 int written; /* number of char infos actually written */
1684 @END
1687 /* read data (chars and/or attributes) from a screen buffer */
1688 @REQ(read_console_output)
1689 obj_handle_t handle; /* handle to the console output */
1690 int x; /* position (x,y) where to start reading */
1691 int y;
1692 int mode; /* char info mode */
1693 int wrap; /* wrap around at end of line? */
1694 @REPLY
1695 int width; /* width of screen buffer */
1696 int height; /* height of screen buffer */
1697 VARARG(data,bytes);
1698 @END
1701 /* move a rect (of data) in screen buffer content */
1702 @REQ(move_console_output)
1703 obj_handle_t handle; /* handle to the console output */
1704 short int x_src; /* position (x, y) of rect to start moving from */
1705 short int y_src;
1706 short int x_dst; /* position (x, y) of rect to move to */
1707 short int y_dst;
1708 short int w; /* size of the rect (width, height) to move */
1709 short int h;
1710 @END
1713 /* Sends a signal to a process group */
1714 @REQ(send_console_signal)
1715 int signal; /* the signal to send */
1716 process_id_t group_id; /* the group to send the signal to */
1717 @END
1720 /* enable directory change notifications */
1721 @REQ(read_directory_changes)
1722 unsigned int filter; /* notification filter */
1723 int subtree; /* watch the subtree? */
1724 int want_data; /* flag indicating whether change data should be collected */
1725 async_data_t async; /* async I/O parameters */
1726 @END
1729 @REQ(read_change)
1730 obj_handle_t handle;
1731 @REPLY
1732 VARARG(events,filesystem_event); /* collected filesystem events */
1733 @END
1736 /* Create a file mapping */
1737 @REQ(create_mapping)
1738 unsigned int access; /* wanted access rights */
1739 unsigned int flags; /* SEC_* flags */
1740 unsigned int file_access; /* file access rights */
1741 mem_size_t size; /* mapping size */
1742 obj_handle_t file_handle; /* file handle */
1743 VARARG(objattr,object_attributes); /* object attributes */
1744 @REPLY
1745 obj_handle_t handle; /* handle to the mapping */
1746 @END
1749 /* Open a mapping */
1750 @REQ(open_mapping)
1751 unsigned int access; /* wanted access rights */
1752 unsigned int attributes; /* object attributes */
1753 obj_handle_t rootdir; /* root directory */
1754 VARARG(name,unicode_str); /* object name */
1755 @REPLY
1756 obj_handle_t handle; /* handle to the mapping */
1757 @END
1760 /* Get information about a file mapping */
1761 @REQ(get_mapping_info)
1762 obj_handle_t handle; /* handle to the mapping */
1763 unsigned int access; /* wanted access rights */
1764 @REPLY
1765 mem_size_t size; /* mapping size */
1766 unsigned int flags; /* SEC_* flags */
1767 obj_handle_t shared_file; /* shared mapping file handle */
1768 VARARG(image,pe_image_info);/* image info for SEC_IMAGE mappings */
1769 @END
1772 /* Add a memory view in the current process */
1773 @REQ(map_view)
1774 obj_handle_t mapping; /* file mapping handle */
1775 unsigned int access; /* wanted access rights */
1776 client_ptr_t base; /* view base address (page-aligned) */
1777 mem_size_t size; /* view size */
1778 file_pos_t start; /* start offset in mapping */
1779 @END
1782 /* Unmap a memory view from the current process */
1783 @REQ(unmap_view)
1784 client_ptr_t base; /* view base address */
1785 @END
1788 /* Get a range of committed pages in a file mapping */
1789 @REQ(get_mapping_committed_range)
1790 client_ptr_t base; /* view base address */
1791 file_pos_t offset; /* starting offset (page-aligned, in bytes) */
1792 @REPLY
1793 mem_size_t size; /* size of range starting at offset (page-aligned, in bytes) */
1794 int committed; /* whether it is a committed range */
1795 @END
1798 /* Add a range to the committed pages in a file mapping */
1799 @REQ(add_mapping_committed_range)
1800 client_ptr_t base; /* view base address */
1801 file_pos_t offset; /* starting offset (page-aligned, in bytes) */
1802 mem_size_t size; /* size to set (page-aligned, in bytes) or 0 if only retrieving */
1803 @END
1806 /* Check if two memory maps are for the same file */
1807 @REQ(is_same_mapping)
1808 client_ptr_t base1; /* first view base address */
1809 client_ptr_t base2; /* second view base address */
1810 @END
1813 #define SNAP_PROCESS 0x00000001
1814 #define SNAP_THREAD 0x00000002
1815 /* Create a snapshot */
1816 @REQ(create_snapshot)
1817 unsigned int attributes; /* object attributes */
1818 unsigned int flags; /* snapshot flags (SNAP_*) */
1819 @REPLY
1820 obj_handle_t handle; /* handle to the snapshot */
1821 @END
1824 /* Get the next process from a snapshot */
1825 @REQ(next_process)
1826 obj_handle_t handle; /* handle to the snapshot */
1827 int reset; /* reset snapshot position? */
1828 @REPLY
1829 int count; /* process usage count */
1830 process_id_t pid; /* process id */
1831 process_id_t ppid; /* parent process id */
1832 int threads; /* number of threads */
1833 int priority; /* process priority */
1834 int handles; /* number of handles */
1835 int unix_pid; /* Unix pid */
1836 VARARG(filename,unicode_str); /* file name of main exe */
1837 @END
1840 /* Get the next thread from a snapshot */
1841 @REQ(next_thread)
1842 obj_handle_t handle; /* handle to the snapshot */
1843 int reset; /* reset snapshot position? */
1844 @REPLY
1845 int count; /* thread usage count */
1846 process_id_t pid; /* process id */
1847 thread_id_t tid; /* thread id */
1848 int base_pri; /* base priority */
1849 int delta_pri; /* delta priority */
1850 @END
1853 /* Wait for a debug event */
1854 @REQ(wait_debug_event)
1855 int get_handle; /* should we alloc a handle for waiting? */
1856 @REPLY
1857 process_id_t pid; /* process id */
1858 thread_id_t tid; /* thread id */
1859 obj_handle_t wait; /* wait handle if no event ready */
1860 VARARG(event,debug_event); /* debug event data */
1861 @END
1864 /* Queue an exception event */
1865 @REQ(queue_exception_event)
1866 int first; /* first chance exception? */
1867 unsigned int code; /* exception code */
1868 unsigned int flags; /* exception flags */
1869 client_ptr_t record; /* exception record */
1870 client_ptr_t address; /* exception address */
1871 data_size_t len; /* size of parameters */
1872 VARARG(params,uints64,len);/* exception parameters */
1873 VARARG(context,context); /* thread context */
1874 @REPLY
1875 obj_handle_t handle; /* handle to the queued event */
1876 @END
1879 /* Retrieve the status of an exception event */
1880 @REQ(get_exception_status)
1881 obj_handle_t handle; /* handle to the queued event */
1882 @REPLY
1883 VARARG(context,context); /* modified thread context */
1884 @END
1887 /* Continue a debug event */
1888 @REQ(continue_debug_event)
1889 process_id_t pid; /* process id to continue */
1890 thread_id_t tid; /* thread id to continue */
1891 int status; /* continuation status */
1892 @END
1895 /* Start/stop debugging an existing process */
1896 @REQ(debug_process)
1897 process_id_t pid; /* id of the process to debug */
1898 int attach; /* 1=attaching / 0=detaching from the process */
1899 @END
1902 /* Simulate a breakpoint in a process */
1903 @REQ(debug_break)
1904 obj_handle_t handle; /* process handle */
1905 @REPLY
1906 int self; /* was it the caller itself? */
1907 @END
1910 /* Set debugger kill on exit flag */
1911 @REQ(set_debugger_kill_on_exit)
1912 int kill_on_exit; /* 0=detach/1=kill debuggee when debugger dies */
1913 @END
1916 /* Read data from a process address space */
1917 @REQ(read_process_memory)
1918 obj_handle_t handle; /* process handle */
1919 client_ptr_t addr; /* addr to read from */
1920 @REPLY
1921 VARARG(data,bytes); /* result data */
1922 @END
1925 /* Write data to a process address space */
1926 @REQ(write_process_memory)
1927 obj_handle_t handle; /* process handle */
1928 client_ptr_t addr; /* addr to write to */
1929 VARARG(data,bytes); /* data to write */
1930 @END
1933 /* Create a registry key */
1934 @REQ(create_key)
1935 unsigned int access; /* desired access rights */
1936 unsigned int options; /* creation options */
1937 VARARG(objattr,object_attributes); /* object attributes */
1938 VARARG(class,unicode_str); /* class name */
1939 @REPLY
1940 obj_handle_t hkey; /* handle to the created key */
1941 int created; /* has it been newly created? */
1942 @END
1944 /* Open a registry key */
1945 @REQ(open_key)
1946 obj_handle_t parent; /* handle to the parent key */
1947 unsigned int access; /* desired access rights */
1948 unsigned int attributes; /* object attributes */
1949 VARARG(name,unicode_str); /* key name */
1950 @REPLY
1951 obj_handle_t hkey; /* handle to the open key */
1952 @END
1955 /* Delete a registry key */
1956 @REQ(delete_key)
1957 obj_handle_t hkey; /* handle to the key */
1958 @END
1961 /* Flush a registry key */
1962 @REQ(flush_key)
1963 obj_handle_t hkey; /* handle to the key */
1964 @END
1967 /* Enumerate registry subkeys */
1968 @REQ(enum_key)
1969 obj_handle_t hkey; /* handle to registry key */
1970 int index; /* index of subkey (or -1 for current key) */
1971 int info_class; /* requested information class */
1972 @REPLY
1973 int subkeys; /* number of subkeys */
1974 int max_subkey; /* longest subkey name */
1975 int max_class; /* longest class name */
1976 int values; /* number of values */
1977 int max_value; /* longest value name */
1978 int max_data; /* longest value data */
1979 timeout_t modif; /* last modification time */
1980 data_size_t total; /* total length needed for full name and class */
1981 data_size_t namelen; /* length of key name in bytes */
1982 VARARG(name,unicode_str,namelen); /* key name */
1983 VARARG(class,unicode_str); /* class name */
1984 @END
1987 /* Set a value of a registry key */
1988 @REQ(set_key_value)
1989 obj_handle_t hkey; /* handle to registry key */
1990 int type; /* value type */
1991 data_size_t namelen; /* length of value name in bytes */
1992 VARARG(name,unicode_str,namelen); /* value name */
1993 VARARG(data,bytes); /* value data */
1994 @END
1997 /* Retrieve the value of a registry key */
1998 @REQ(get_key_value)
1999 obj_handle_t hkey; /* handle to registry key */
2000 VARARG(name,unicode_str); /* value name */
2001 @REPLY
2002 int type; /* value type */
2003 data_size_t total; /* total length needed for data */
2004 VARARG(data,bytes); /* value data */
2005 @END
2008 /* Enumerate a value of a registry key */
2009 @REQ(enum_key_value)
2010 obj_handle_t hkey; /* handle to registry key */
2011 int index; /* value index */
2012 int info_class; /* requested information class */
2013 @REPLY
2014 int type; /* value type */
2015 data_size_t total; /* total length needed for full name and data */
2016 data_size_t namelen; /* length of value name in bytes */
2017 VARARG(name,unicode_str,namelen); /* value name */
2018 VARARG(data,bytes); /* value data */
2019 @END
2022 /* Delete a value of a registry key */
2023 @REQ(delete_key_value)
2024 obj_handle_t hkey; /* handle to registry key */
2025 VARARG(name,unicode_str); /* value name */
2026 @END
2029 /* Load a registry branch from a file */
2030 @REQ(load_registry)
2031 obj_handle_t file; /* file to load from */
2032 VARARG(objattr,object_attributes); /* object attributes */
2033 @END
2036 /* UnLoad a registry branch from a file */
2037 @REQ(unload_registry)
2038 obj_handle_t hkey; /* root key to unload to */
2039 @END
2042 /* Save a registry branch to a file */
2043 @REQ(save_registry)
2044 obj_handle_t hkey; /* key to save */
2045 obj_handle_t file; /* file to save to */
2046 @END
2049 /* Add a registry key change notification */
2050 @REQ(set_registry_notification)
2051 obj_handle_t hkey; /* key to watch for changes */
2052 obj_handle_t event; /* event to set */
2053 int subtree; /* should we watch the whole subtree? */
2054 unsigned int filter; /* things to watch */
2055 @END
2058 /* Create a waitable timer */
2059 @REQ(create_timer)
2060 unsigned int access; /* wanted access rights */
2061 int manual; /* manual reset */
2062 VARARG(objattr,object_attributes); /* object attributes */
2063 @REPLY
2064 obj_handle_t handle; /* handle to the timer */
2065 @END
2068 /* Open a waitable timer */
2069 @REQ(open_timer)
2070 unsigned int access; /* wanted access rights */
2071 unsigned int attributes; /* object attributes */
2072 obj_handle_t rootdir; /* root directory */
2073 VARARG(name,unicode_str); /* object name */
2074 @REPLY
2075 obj_handle_t handle; /* handle to the timer */
2076 @END
2078 /* Set a waitable timer */
2079 @REQ(set_timer)
2080 obj_handle_t handle; /* handle to the timer */
2081 timeout_t expire; /* next expiration absolute time */
2082 client_ptr_t callback; /* callback function */
2083 client_ptr_t arg; /* callback argument */
2084 int period; /* timer period in ms */
2085 @REPLY
2086 int signaled; /* was the timer signaled before this call ? */
2087 @END
2089 /* Cancel a waitable timer */
2090 @REQ(cancel_timer)
2091 obj_handle_t handle; /* handle to the timer */
2092 @REPLY
2093 int signaled; /* was the timer signaled before this calltime ? */
2094 @END
2096 /* Get information on a waitable timer */
2097 @REQ(get_timer_info)
2098 obj_handle_t handle; /* handle to the timer */
2099 @REPLY
2100 timeout_t when; /* absolute time when the timer next expires */
2101 int signaled; /* is the timer signaled? */
2102 @END
2105 /* Retrieve the current context of a thread */
2106 @REQ(get_thread_context)
2107 obj_handle_t handle; /* thread handle */
2108 unsigned int flags; /* context flags */
2109 int suspend; /* suspend the thread if needed */
2110 @REPLY
2111 int self; /* was it a handle to the current thread? */
2112 VARARG(context,context); /* thread context */
2113 @END
2116 /* Set the current context of a thread */
2117 @REQ(set_thread_context)
2118 obj_handle_t handle; /* thread handle */
2119 int suspend; /* suspend the thread if needed */
2120 VARARG(context,context); /* thread context */
2121 @REPLY
2122 int self; /* was it a handle to the current thread? */
2123 @END
2126 /* Fetch a selector entry for a thread */
2127 @REQ(get_selector_entry)
2128 obj_handle_t handle; /* thread handle */
2129 int entry; /* LDT entry */
2130 @REPLY
2131 unsigned int base; /* selector base */
2132 unsigned int limit; /* selector limit */
2133 unsigned char flags; /* selector flags */
2134 @END
2137 /* Add an atom */
2138 @REQ(add_atom)
2139 obj_handle_t table; /* which table to add atom to */
2140 VARARG(name,unicode_str); /* atom name */
2141 @REPLY
2142 atom_t atom; /* resulting atom */
2143 @END
2146 /* Delete an atom */
2147 @REQ(delete_atom)
2148 obj_handle_t table; /* which table to delete atom from */
2149 atom_t atom; /* atom handle */
2150 @END
2153 /* Find an atom */
2154 @REQ(find_atom)
2155 obj_handle_t table; /* which table to find atom from */
2156 VARARG(name,unicode_str); /* atom name */
2157 @REPLY
2158 atom_t atom; /* atom handle */
2159 @END
2162 /* Get information about an atom */
2163 @REQ(get_atom_information)
2164 obj_handle_t table; /* which table to find atom from */
2165 atom_t atom; /* atom handle */
2166 @REPLY
2167 int count; /* atom lock count */
2168 int pinned; /* whether the atom has been pinned */
2169 data_size_t total; /* actual length of atom name */
2170 VARARG(name,unicode_str); /* atom name */
2171 @END
2174 /* Set information about an atom */
2175 @REQ(set_atom_information)
2176 obj_handle_t table; /* which table to find atom from */
2177 atom_t atom; /* atom handle */
2178 int pinned; /* whether to bump atom information */
2179 @END
2182 /* Empty an atom table */
2183 @REQ(empty_atom_table)
2184 obj_handle_t table; /* which table to find atom from */
2185 int if_pinned; /* whether to delete pinned atoms */
2186 @END
2189 /* Init an atom table */
2190 @REQ(init_atom_table)
2191 int entries; /* number of entries (only for local) */
2192 @REPLY
2193 obj_handle_t table; /* handle to the atom table */
2194 @END
2197 /* Get the message queue of the current thread */
2198 @REQ(get_msg_queue)
2199 @REPLY
2200 obj_handle_t handle; /* handle to the queue */
2201 @END
2204 /* Set the file descriptor associated to the current thread queue */
2205 @REQ(set_queue_fd)
2206 obj_handle_t handle; /* handle to the file descriptor */
2207 @END
2210 /* Set the current message queue wakeup mask */
2211 @REQ(set_queue_mask)
2212 unsigned int wake_mask; /* wakeup bits mask */
2213 unsigned int changed_mask; /* changed bits mask */
2214 int skip_wait; /* will we skip waiting if signaled? */
2215 @REPLY
2216 unsigned int wake_bits; /* current wake bits */
2217 unsigned int changed_bits; /* current changed bits */
2218 @END
2221 /* Get the current message queue status */
2222 @REQ(get_queue_status)
2223 unsigned int clear_bits; /* should we clear the change bits? */
2224 @REPLY
2225 unsigned int wake_bits; /* wake bits */
2226 unsigned int changed_bits; /* changed bits since last time */
2227 @END
2230 /* Retrieve the process idle event */
2231 @REQ(get_process_idle_event)
2232 obj_handle_t handle; /* process handle */
2233 @REPLY
2234 obj_handle_t event; /* handle to idle event */
2235 @END
2238 /* Send a message to a thread queue */
2239 @REQ(send_message)
2240 thread_id_t id; /* thread id */
2241 int type; /* message type (see below) */
2242 int flags; /* message flags (see below) */
2243 user_handle_t win; /* window handle */
2244 unsigned int msg; /* message code */
2245 lparam_t wparam; /* parameters */
2246 lparam_t lparam; /* parameters */
2247 timeout_t timeout; /* timeout for reply */
2248 VARARG(data,message_data); /* message data for sent messages */
2249 @END
2251 @REQ(post_quit_message)
2252 int exit_code; /* exit code to return */
2253 @END
2255 enum message_type
2257 MSG_ASCII, /* Ascii message (from SendMessageA) */
2258 MSG_UNICODE, /* Unicode message (from SendMessageW) */
2259 MSG_NOTIFY, /* notify message (from SendNotifyMessageW), always Unicode */
2260 MSG_CALLBACK, /* callback message (from SendMessageCallbackW), always Unicode */
2261 MSG_CALLBACK_RESULT,/* result of a callback message */
2262 MSG_OTHER_PROCESS, /* sent from other process, may include vararg data, always Unicode */
2263 MSG_POSTED, /* posted message (from PostMessageW), always Unicode */
2264 MSG_HARDWARE, /* hardware message */
2265 MSG_WINEVENT, /* winevent message */
2266 MSG_HOOK_LL /* low-level hardware hook */
2268 #define SEND_MSG_ABORT_IF_HUNG 0x01
2271 /* Send a hardware message to a thread queue */
2272 @REQ(send_hardware_message)
2273 user_handle_t win; /* window handle */
2274 hw_input_t input; /* input data */
2275 unsigned int flags; /* flags (see below) */
2276 @REPLY
2277 int wait; /* do we need to wait for a reply? */
2278 int prev_x; /* previous cursor position */
2279 int prev_y;
2280 int new_x; /* new cursor position */
2281 int new_y;
2282 VARARG(keystate,bytes); /* global state array for all the keys */
2283 @END
2284 #define SEND_HWMSG_INJECTED 0x01
2287 /* Get a message from the current queue */
2288 @REQ(get_message)
2289 unsigned int flags; /* PM_* flags */
2290 user_handle_t get_win; /* window handle to get */
2291 unsigned int get_first; /* first message code to get */
2292 unsigned int get_last; /* last message code to get */
2293 unsigned int hw_id; /* id of the previous hardware message (or 0) */
2294 unsigned int wake_mask; /* wakeup bits mask */
2295 unsigned int changed_mask; /* changed bits mask */
2296 @REPLY
2297 user_handle_t win; /* window handle */
2298 unsigned int msg; /* message code */
2299 lparam_t wparam; /* parameters */
2300 lparam_t lparam; /* parameters */
2301 int type; /* message type */
2302 int x; /* message x position */
2303 int y; /* message y position */
2304 unsigned int time; /* message time */
2305 unsigned int active_hooks; /* active hooks bitmap */
2306 data_size_t total; /* total size of extra data */
2307 VARARG(data,message_data); /* message data for sent messages */
2308 @END
2311 /* Reply to a sent message */
2312 @REQ(reply_message)
2313 int remove; /* should we remove the message? */
2314 lparam_t result; /* message result */
2315 VARARG(data,bytes); /* message data for sent messages */
2316 @END
2319 /* Accept the current hardware message */
2320 @REQ(accept_hardware_message)
2321 unsigned int hw_id; /* id of the hardware message */
2322 int remove; /* should we remove the message? */
2323 @END
2326 /* Retrieve the reply for the last message sent */
2327 @REQ(get_message_reply)
2328 int cancel; /* cancel message if not ready? */
2329 @REPLY
2330 lparam_t result; /* message result */
2331 VARARG(data,bytes); /* message data for sent messages */
2332 @END
2335 /* Set a window timer */
2336 @REQ(set_win_timer)
2337 user_handle_t win; /* window handle */
2338 unsigned int msg; /* message to post */
2339 unsigned int rate; /* timer rate in ms */
2340 lparam_t id; /* timer id */
2341 lparam_t lparam; /* message lparam (callback proc) */
2342 @REPLY
2343 lparam_t id; /* timer id */
2344 @END
2347 /* Kill a window timer */
2348 @REQ(kill_win_timer)
2349 user_handle_t win; /* window handle */
2350 lparam_t id; /* timer id */
2351 unsigned int msg; /* message to post */
2352 @END
2355 /* check if the thread owning the window is hung */
2356 @REQ(is_window_hung)
2357 user_handle_t win; /* window handle */
2358 @REPLY
2359 int is_hung;
2360 @END
2363 /* Retrieve info about a serial port */
2364 @REQ(get_serial_info)
2365 obj_handle_t handle; /* handle to comm port */
2366 int flags;
2367 @REPLY
2368 unsigned int eventmask;
2369 unsigned int cookie;
2370 unsigned int pending_write;
2371 @END
2374 /* Set info about a serial port */
2375 @REQ(set_serial_info)
2376 obj_handle_t handle; /* handle to comm port */
2377 int flags; /* bitmask to set values (see below) */
2378 @END
2379 #define SERIALINFO_PENDING_WRITE 0x04
2380 #define SERIALINFO_PENDING_WAIT 0x08
2383 /* Create an async I/O */
2384 @REQ(register_async)
2385 int type; /* type of queue to look after */
2386 async_data_t async; /* async I/O parameters */
2387 int count; /* count - usually # of bytes to be read/written */
2388 @END
2389 #define ASYNC_TYPE_READ 0x01
2390 #define ASYNC_TYPE_WRITE 0x02
2391 #define ASYNC_TYPE_WAIT 0x03
2394 /* Cancel all async op on a fd */
2395 @REQ(cancel_async)
2396 obj_handle_t handle; /* handle to comm port, socket or file */
2397 client_ptr_t iosb; /* I/O status block (NULL=all) */
2398 int only_thread; /* cancel matching this thread */
2399 @END
2402 /* Retrieve results of an async */
2403 @REQ(get_async_result)
2404 client_ptr_t user_arg; /* user arg used to identify async */
2405 @REPLY
2406 data_size_t size; /* result size (input or output depending on the operation) */
2407 VARARG(out_data,bytes); /* iosb output data */
2408 @END
2411 /* Perform a read on a file object */
2412 @REQ(read)
2413 async_data_t async; /* async I/O parameters */
2414 file_pos_t pos; /* read position */
2415 @REPLY
2416 obj_handle_t wait; /* handle to wait on for blocking read */
2417 unsigned int options; /* device open options */
2418 VARARG(data,bytes); /* read data */
2419 @END
2422 /* Perform a write on a file object */
2423 @REQ(write)
2424 async_data_t async; /* async I/O parameters */
2425 file_pos_t pos; /* write position */
2426 VARARG(data,bytes); /* write data */
2427 @REPLY
2428 obj_handle_t wait; /* handle to wait on for blocking write */
2429 unsigned int options; /* device open options */
2430 data_size_t size; /* size written */
2431 @END
2434 /* Perform an ioctl on a file */
2435 @REQ(ioctl)
2436 ioctl_code_t code; /* ioctl code */
2437 async_data_t async; /* async I/O parameters */
2438 VARARG(in_data,bytes); /* ioctl input data */
2439 @REPLY
2440 obj_handle_t wait; /* handle to wait on for blocking ioctl */
2441 unsigned int options; /* device open options */
2442 VARARG(out_data,bytes); /* ioctl output data */
2443 @END
2446 /* Store results of an async irp */
2447 @REQ(set_irp_result)
2448 obj_handle_t handle; /* handle to the irp */
2449 unsigned int status; /* status of the irp */
2450 data_size_t size; /* result size (input or output depending on the operation) */
2451 client_ptr_t file_ptr; /* opaque pointer to the file object */
2452 VARARG(data,bytes); /* output data of the irp */
2453 @END
2456 /* Create a named pipe */
2457 @REQ(create_named_pipe)
2458 unsigned int access;
2459 unsigned int options;
2460 unsigned int sharing;
2461 unsigned int maxinstances;
2462 unsigned int outsize;
2463 unsigned int insize;
2464 timeout_t timeout;
2465 unsigned int flags;
2466 VARARG(objattr,object_attributes); /* object attributes */
2467 @REPLY
2468 obj_handle_t handle; /* handle to the pipe */
2469 @END
2471 /* flags in create_named_pipe and get_named_pipe_info */
2472 #define NAMED_PIPE_MESSAGE_STREAM_WRITE 0x0001
2473 #define NAMED_PIPE_MESSAGE_STREAM_READ 0x0002
2474 #define NAMED_PIPE_NONBLOCKING_MODE 0x0004
2475 #define NAMED_PIPE_SERVER_END 0x8000
2477 /* Set named pipe information by handle */
2478 @REQ(set_named_pipe_info)
2479 obj_handle_t handle;
2480 unsigned int flags;
2481 @END
2483 /* Create a window */
2484 @REQ(create_window)
2485 user_handle_t parent; /* parent window */
2486 user_handle_t owner; /* owner window */
2487 atom_t atom; /* class atom */
2488 mod_handle_t instance; /* module instance */
2489 int dpi; /* system DPI */
2490 int awareness; /* thread DPI awareness */
2491 VARARG(class,unicode_str); /* class name */
2492 @REPLY
2493 user_handle_t handle; /* created window */
2494 user_handle_t parent; /* full handle of parent */
2495 user_handle_t owner; /* full handle of owner */
2496 int extra; /* number of extra bytes */
2497 client_ptr_t class_ptr; /* pointer to class in client address space */
2498 int dpi; /* window DPI if not per-monitor aware */
2499 int awareness; /* window DPI awareness */
2500 @END
2503 /* Destroy a window */
2504 @REQ(destroy_window)
2505 user_handle_t handle; /* handle to the window */
2506 @END
2509 /* Retrieve the desktop window for the current thread */
2510 @REQ(get_desktop_window)
2511 int force; /* force creation if it doesn't exist */
2512 @REPLY
2513 user_handle_t top_window; /* handle to the desktop window */
2514 user_handle_t msg_window; /* handle to the top-level HWND_MESSAGE parent */
2515 @END
2518 /* Set a window owner */
2519 @REQ(set_window_owner)
2520 user_handle_t handle; /* handle to the window */
2521 user_handle_t owner; /* new owner */
2522 @REPLY
2523 user_handle_t full_owner; /* full handle of new owner */
2524 user_handle_t prev_owner; /* full handle of previous owner */
2525 @END
2528 /* Get information from a window handle */
2529 @REQ(get_window_info)
2530 user_handle_t handle; /* handle to the window */
2531 @REPLY
2532 user_handle_t full_handle; /* full 32-bit handle */
2533 user_handle_t last_active; /* last active popup */
2534 process_id_t pid; /* process owning the window */
2535 thread_id_t tid; /* thread owning the window */
2536 atom_t atom; /* class atom */
2537 int is_unicode; /* ANSI or unicode */
2538 int dpi; /* window DPI */
2539 int awareness; /* DPI awareness */
2540 @END
2543 /* Set some information in a window */
2544 @REQ(set_window_info)
2545 unsigned short flags; /* flags for fields to set (see below) */
2546 short int is_unicode; /* ANSI or unicode */
2547 user_handle_t handle; /* handle to the window */
2548 unsigned int style; /* window style */
2549 unsigned int ex_style; /* window extended style */
2550 unsigned int id; /* window id */
2551 mod_handle_t instance; /* creator instance */
2552 lparam_t user_data; /* user-specific data */
2553 int extra_offset; /* offset to set in extra bytes */
2554 data_size_t extra_size; /* size to set in extra bytes */
2555 lparam_t extra_value; /* value to set in extra bytes */
2556 @REPLY
2557 unsigned int old_style; /* old window style */
2558 unsigned int old_ex_style; /* old window extended style */
2559 mod_handle_t old_instance; /* old creator instance */
2560 lparam_t old_user_data; /* old user-specific data */
2561 lparam_t old_extra_value; /* old value in extra bytes */
2562 unsigned int old_id; /* old window id */
2563 @END
2564 #define SET_WIN_STYLE 0x01
2565 #define SET_WIN_EXSTYLE 0x02
2566 #define SET_WIN_ID 0x04
2567 #define SET_WIN_INSTANCE 0x08
2568 #define SET_WIN_USERDATA 0x10
2569 #define SET_WIN_EXTRA 0x20
2570 #define SET_WIN_UNICODE 0x40
2573 /* Set the parent of a window */
2574 @REQ(set_parent)
2575 user_handle_t handle; /* handle to the window */
2576 user_handle_t parent; /* handle to the parent */
2577 @REPLY
2578 user_handle_t old_parent; /* old parent window */
2579 user_handle_t full_parent; /* full handle of new parent */
2580 int dpi; /* new window DPI if not per-monitor aware */
2581 int awareness; /* new DPI awareness */
2582 @END
2585 /* Get a list of the window parents, up to the root of the tree */
2586 @REQ(get_window_parents)
2587 user_handle_t handle; /* handle to the window */
2588 @REPLY
2589 int count; /* total count of parents */
2590 VARARG(parents,user_handles); /* parent handles */
2591 @END
2594 /* Get a list of the window children */
2595 @REQ(get_window_children)
2596 obj_handle_t desktop; /* handle to desktop */
2597 user_handle_t parent; /* parent window */
2598 atom_t atom; /* class atom for the listed children */
2599 thread_id_t tid; /* thread owning the listed children */
2600 VARARG(class,unicode_str); /* class name */
2601 @REPLY
2602 int count; /* total count of children */
2603 VARARG(children,user_handles); /* children handles */
2604 @END
2607 /* Get a list of the window children that contain a given point */
2608 @REQ(get_window_children_from_point)
2609 user_handle_t parent; /* parent window */
2610 int x; /* point in parent coordinates */
2611 int y;
2612 int dpi; /* dpi for the point coordinates */
2613 @REPLY
2614 int count; /* total count of children */
2615 VARARG(children,user_handles); /* children handles */
2616 @END
2619 /* Get window tree information from a window handle */
2620 @REQ(get_window_tree)
2621 user_handle_t handle; /* handle to the window */
2622 @REPLY
2623 user_handle_t parent; /* parent window */
2624 user_handle_t owner; /* owner window */
2625 user_handle_t next_sibling; /* next sibling in Z-order */
2626 user_handle_t prev_sibling; /* prev sibling in Z-order */
2627 user_handle_t first_sibling; /* first sibling in Z-order */
2628 user_handle_t last_sibling; /* last sibling in Z-order */
2629 user_handle_t first_child; /* first child */
2630 user_handle_t last_child; /* last child */
2631 @END
2633 /* Set the position and Z order of a window */
2634 @REQ(set_window_pos)
2635 unsigned short swp_flags; /* SWP_* flags */
2636 unsigned short paint_flags; /* paint flags (see below) */
2637 user_handle_t handle; /* handle to the window */
2638 user_handle_t previous; /* previous window in Z order */
2639 rectangle_t window; /* window rectangle (in parent coords) */
2640 rectangle_t client; /* client rectangle (in parent coords) */
2641 VARARG(valid,rectangles); /* valid rectangles from WM_NCCALCSIZE (in parent coords) */
2642 @REPLY
2643 unsigned int new_style; /* new window style */
2644 unsigned int new_ex_style; /* new window extended style */
2645 user_handle_t surface_win; /* parent window that holds the surface */
2646 int needs_update; /* whether the surface region needs an update */
2647 @END
2648 #define SET_WINPOS_PAINT_SURFACE 0x01 /* window has a paintable surface */
2649 #define SET_WINPOS_PIXEL_FORMAT 0x02 /* window has a custom pixel format */
2651 /* Get the window and client rectangles of a window */
2652 @REQ(get_window_rectangles)
2653 user_handle_t handle; /* handle to the window */
2654 int relative; /* coords relative to (see below) */
2655 int dpi; /* DPI to map to, or zero for per-monitor DPI */
2656 @REPLY
2657 rectangle_t window; /* window rectangle */
2658 rectangle_t client; /* client rectangle */
2659 @END
2660 enum coords_relative
2662 COORDS_CLIENT, /* relative to client area */
2663 COORDS_WINDOW, /* relative to whole window area */
2664 COORDS_PARENT, /* relative to parent's client area */
2665 COORDS_SCREEN /* relative to screen origin */
2669 /* Get the window text */
2670 @REQ(get_window_text)
2671 user_handle_t handle; /* handle to the window */
2672 @REPLY
2673 data_size_t length; /* total length in WCHARs */
2674 VARARG(text,unicode_str); /* window text */
2675 @END
2678 /* Set the window text */
2679 @REQ(set_window_text)
2680 user_handle_t handle; /* handle to the window */
2681 VARARG(text,unicode_str); /* window text */
2682 @END
2685 /* Get the coordinates offset between two windows */
2686 @REQ(get_windows_offset)
2687 user_handle_t from; /* handle to the first window */
2688 user_handle_t to; /* handle to the second window */
2689 int dpi; /* DPI to map to, or zero for per-monitor DPI */
2690 @REPLY
2691 int x; /* x coordinate offset */
2692 int y; /* y coordinate offset */
2693 int mirror; /* whether to mirror the x coordinate */
2694 @END
2697 /* Get the visible region of a window */
2698 @REQ(get_visible_region)
2699 user_handle_t window; /* handle to the window */
2700 unsigned int flags; /* DCX flags */
2701 @REPLY
2702 user_handle_t top_win; /* top window to clip against */
2703 rectangle_t top_rect; /* top window visible rect with screen coords */
2704 rectangle_t win_rect; /* window rect in screen coords */
2705 unsigned int paint_flags; /* paint flags (from SET_WINPOS_* flags) */
2706 data_size_t total_size; /* total size of the resulting region */
2707 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2708 @END
2711 /* Get the visible surface region of a window */
2712 @REQ(get_surface_region)
2713 user_handle_t window; /* handle to the window */
2714 @REPLY
2715 rectangle_t visible_rect; /* window visible rect in screen coords */
2716 data_size_t total_size; /* total size of the resulting region */
2717 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2718 @END
2721 /* Get the window region */
2722 @REQ(get_window_region)
2723 user_handle_t window; /* handle to the window */
2724 @REPLY
2725 data_size_t total_size; /* total size of the resulting region */
2726 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2727 @END
2730 /* Set the window region */
2731 @REQ(set_window_region)
2732 user_handle_t window; /* handle to the window */
2733 int redraw; /* redraw the window? */
2734 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2735 @END
2738 /* Get the window update region */
2739 @REQ(get_update_region)
2740 user_handle_t window; /* handle to the window */
2741 user_handle_t from_child; /* child to start searching from */
2742 unsigned int flags; /* update flags (see below) */
2743 @REPLY
2744 user_handle_t child; /* child to repaint (or window itself) */
2745 unsigned int flags; /* resulting update flags (see below) */
2746 data_size_t total_size; /* total size of the resulting region */
2747 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2748 @END
2749 #define UPDATE_NONCLIENT 0x001 /* get region for repainting non-client area */
2750 #define UPDATE_ERASE 0x002 /* get region for erasing client area */
2751 #define UPDATE_PAINT 0x004 /* get region for painting client area */
2752 #define UPDATE_INTERNALPAINT 0x008 /* get region if internal paint is pending */
2753 #define UPDATE_ALLCHILDREN 0x010 /* force repaint of all children */
2754 #define UPDATE_NOCHILDREN 0x020 /* don't try to repaint any children */
2755 #define UPDATE_NOREGION 0x040 /* don't return a region, only the flags */
2756 #define UPDATE_DELAYED_ERASE 0x080 /* still needs erase after BeginPaint */
2757 #define UPDATE_CLIPCHILDREN 0x100 /* remove clipped children from the update region */
2760 /* Update the z order of a window so that a given rectangle is fully visible */
2761 @REQ(update_window_zorder)
2762 user_handle_t window; /* handle to the window */
2763 rectangle_t rect; /* rectangle that must be visible (in client coords) */
2764 @END
2767 /* Mark parts of a window as needing a redraw */
2768 @REQ(redraw_window)
2769 user_handle_t window; /* handle to the window */
2770 unsigned int flags; /* RDW_* flags */
2771 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2772 @END
2775 /* Set a window property */
2776 @REQ(set_window_property)
2777 user_handle_t window; /* handle to the window */
2778 lparam_t data; /* data to store */
2779 atom_t atom; /* property atom (if no name specified) */
2780 VARARG(name,unicode_str); /* property name */
2781 @END
2784 /* Remove a window property */
2785 @REQ(remove_window_property)
2786 user_handle_t window; /* handle to the window */
2787 atom_t atom; /* property atom (if no name specified) */
2788 VARARG(name,unicode_str); /* property name */
2789 @REPLY
2790 lparam_t data; /* data stored in property */
2791 @END
2794 /* Get a window property */
2795 @REQ(get_window_property)
2796 user_handle_t window; /* handle to the window */
2797 atom_t atom; /* property atom (if no name specified) */
2798 VARARG(name,unicode_str); /* property name */
2799 @REPLY
2800 lparam_t data; /* data stored in property */
2801 @END
2804 /* Get the list of properties of a window */
2805 @REQ(get_window_properties)
2806 user_handle_t window; /* handle to the window */
2807 @REPLY
2808 int total; /* total number of properties */
2809 VARARG(props,properties); /* list of properties */
2810 @END
2813 /* Create a window station */
2814 @REQ(create_winstation)
2815 unsigned int flags; /* window station flags */
2816 unsigned int access; /* wanted access rights */
2817 unsigned int attributes; /* object attributes */
2818 obj_handle_t rootdir; /* root directory */
2819 VARARG(name,unicode_str); /* object name */
2820 @REPLY
2821 obj_handle_t handle; /* handle to the window station */
2822 @END
2825 /* Open a handle to a window station */
2826 @REQ(open_winstation)
2827 unsigned int access; /* wanted access rights */
2828 unsigned int attributes; /* object attributes */
2829 obj_handle_t rootdir; /* root directory */
2830 VARARG(name,unicode_str); /* object name */
2831 @REPLY
2832 obj_handle_t handle; /* handle to the window station */
2833 @END
2836 /* Close a window station */
2837 @REQ(close_winstation)
2838 obj_handle_t handle; /* handle to the window station */
2839 @END
2842 /* Get the process current window station */
2843 @REQ(get_process_winstation)
2844 @REPLY
2845 obj_handle_t handle; /* handle to the window station */
2846 @END
2849 /* Set the process current window station */
2850 @REQ(set_process_winstation)
2851 obj_handle_t handle; /* handle to the window station */
2852 @END
2855 /* Enumerate window stations */
2856 @REQ(enum_winstation)
2857 unsigned int index; /* current index */
2858 @REPLY
2859 unsigned int next; /* next index */
2860 VARARG(name,unicode_str); /* window station name */
2861 @END
2864 /* Create a desktop */
2865 @REQ(create_desktop)
2866 unsigned int flags; /* desktop flags */
2867 unsigned int access; /* wanted access rights */
2868 unsigned int attributes; /* object attributes */
2869 VARARG(name,unicode_str); /* object name */
2870 @REPLY
2871 obj_handle_t handle; /* handle to the desktop */
2872 @END
2875 /* Open a handle to a desktop */
2876 @REQ(open_desktop)
2877 obj_handle_t winsta; /* window station to open (null allowed) */
2878 unsigned int flags; /* desktop flags */
2879 unsigned int access; /* wanted access rights */
2880 unsigned int attributes; /* object attributes */
2881 VARARG(name,unicode_str); /* object name */
2882 @REPLY
2883 obj_handle_t handle; /* handle to the desktop */
2884 @END
2887 /* Open a handle to current input desktop */
2888 @REQ(open_input_desktop)
2889 unsigned int flags; /* desktop flags */
2890 unsigned int access; /* wanted access rights */
2891 unsigned int attributes; /* object attributes */
2892 @REPLY
2893 obj_handle_t handle; /* handle to the desktop */
2894 @END
2897 /* Close a desktop */
2898 @REQ(close_desktop)
2899 obj_handle_t handle; /* handle to the desktop */
2900 @END
2903 /* Get the thread current desktop */
2904 @REQ(get_thread_desktop)
2905 thread_id_t tid; /* thread id */
2906 @REPLY
2907 obj_handle_t handle; /* handle to the desktop */
2908 @END
2911 /* Set the thread current desktop */
2912 @REQ(set_thread_desktop)
2913 obj_handle_t handle; /* handle to the desktop */
2914 @END
2917 /* Enumerate desktops */
2918 @REQ(enum_desktop)
2919 obj_handle_t winstation; /* handle to the window station */
2920 unsigned int index; /* current index */
2921 @REPLY
2922 unsigned int next; /* next index */
2923 VARARG(name,unicode_str); /* window station name */
2924 @END
2927 /* Get/set information about a user object (window station or desktop) */
2928 @REQ(set_user_object_info)
2929 obj_handle_t handle; /* handle to the object */
2930 unsigned int flags; /* information to set/get */
2931 unsigned int obj_flags; /* new object flags */
2932 @REPLY
2933 int is_desktop; /* is object a desktop? */
2934 unsigned int old_obj_flags; /* old object flags */
2935 VARARG(name,unicode_str); /* object name */
2936 @END
2937 #define SET_USER_OBJECT_SET_FLAGS 1
2938 #define SET_USER_OBJECT_GET_FULL_NAME 2
2941 /* Register a hotkey */
2942 @REQ(register_hotkey)
2943 user_handle_t window; /* handle to the window */
2944 int id; /* hotkey identifier */
2945 unsigned int flags; /* modifier keys */
2946 unsigned int vkey; /* virtual key code */
2947 @REPLY
2948 int replaced; /* did we replace an existing hotkey? */
2949 unsigned int flags; /* flags of replaced hotkey */
2950 unsigned int vkey; /* virtual key code of replaced hotkey */
2951 @END
2954 /* Unregister a hotkey */
2955 @REQ(unregister_hotkey)
2956 user_handle_t window; /* handle to the window */
2957 int id; /* hotkey identifier */
2958 @REPLY
2959 unsigned int flags; /* flags of removed hotkey */
2960 unsigned int vkey; /* virtual key code of removed hotkey */
2961 @END
2964 /* Attach (or detach) thread inputs */
2965 @REQ(attach_thread_input)
2966 thread_id_t tid_from; /* thread to be attached */
2967 thread_id_t tid_to; /* thread to which tid_from should be attached */
2968 int attach; /* is it an attach? */
2969 @END
2972 /* Get input data for a given thread */
2973 @REQ(get_thread_input)
2974 thread_id_t tid; /* id of thread */
2975 @REPLY
2976 user_handle_t focus; /* handle to the focus window */
2977 user_handle_t capture; /* handle to the capture window */
2978 user_handle_t active; /* handle to the active window */
2979 user_handle_t foreground; /* handle to the global foreground window */
2980 user_handle_t menu_owner; /* handle to the menu owner */
2981 user_handle_t move_size; /* handle to the moving/resizing window */
2982 user_handle_t caret; /* handle to the caret window */
2983 user_handle_t cursor; /* handle to the cursor */
2984 int show_count; /* cursor show count */
2985 rectangle_t rect; /* caret rectangle */
2986 @END
2989 /* Get the time of the last input event */
2990 @REQ(get_last_input_time)
2991 @REPLY
2992 unsigned int time;
2993 @END
2996 /* Retrieve queue keyboard state for a given thread */
2997 @REQ(get_key_state)
2998 thread_id_t tid; /* id of thread */
2999 int key; /* optional key code or -1 */
3000 @REPLY
3001 unsigned char state; /* state of specified key */
3002 VARARG(keystate,bytes); /* state array for all the keys */
3003 @END
3005 /* Set queue keyboard state for a given thread */
3006 @REQ(set_key_state)
3007 thread_id_t tid; /* id of thread */
3008 int async; /* whether to change the async state too */
3009 VARARG(keystate,bytes); /* state array for all the keys */
3010 @END
3012 /* Set the system foreground window */
3013 @REQ(set_foreground_window)
3014 user_handle_t handle; /* handle to the foreground window */
3015 @REPLY
3016 user_handle_t previous; /* handle to the previous foreground window */
3017 int send_msg_old; /* whether we have to send a msg to the old window */
3018 int send_msg_new; /* whether we have to send a msg to the new window */
3019 @END
3021 /* Set the current thread focus window */
3022 @REQ(set_focus_window)
3023 user_handle_t handle; /* handle to the focus window */
3024 @REPLY
3025 user_handle_t previous; /* handle to the previous focus window */
3026 @END
3028 /* Set the current thread active window */
3029 @REQ(set_active_window)
3030 user_handle_t handle; /* handle to the active window */
3031 @REPLY
3032 user_handle_t previous; /* handle to the previous active window */
3033 @END
3035 /* Set the current thread capture window */
3036 @REQ(set_capture_window)
3037 user_handle_t handle; /* handle to the capture window */
3038 unsigned int flags; /* capture flags (see below) */
3039 @REPLY
3040 user_handle_t previous; /* handle to the previous capture window */
3041 user_handle_t full_handle; /* full 32-bit handle of new capture window */
3042 @END
3043 #define CAPTURE_MENU 0x01 /* capture is for a menu */
3044 #define CAPTURE_MOVESIZE 0x02 /* capture is for moving/resizing */
3047 /* Set the current thread caret window */
3048 @REQ(set_caret_window)
3049 user_handle_t handle; /* handle to the caret window */
3050 int width; /* caret width */
3051 int height; /* caret height */
3052 @REPLY
3053 user_handle_t previous; /* handle to the previous caret window */
3054 rectangle_t old_rect; /* previous caret rectangle */
3055 int old_hide; /* previous hide count */
3056 int old_state; /* previous caret state (1=on, 0=off) */
3057 @END
3060 /* Set the current thread caret information */
3061 @REQ(set_caret_info)
3062 unsigned int flags; /* caret flags (see below) */
3063 user_handle_t handle; /* handle to the caret window */
3064 int x; /* caret x position */
3065 int y; /* caret y position */
3066 int hide; /* increment for hide count (can be negative to show it) */
3067 int state; /* caret state (see below) */
3068 @REPLY
3069 user_handle_t full_handle; /* handle to the current caret window */
3070 rectangle_t old_rect; /* previous caret rectangle */
3071 int old_hide; /* previous hide count */
3072 int old_state; /* previous caret state (1=on, 0=off) */
3073 @END
3074 #define SET_CARET_POS 0x01 /* set the caret position from x,y */
3075 #define SET_CARET_HIDE 0x02 /* increment the caret hide count */
3076 #define SET_CARET_STATE 0x04 /* set the caret on/off state */
3077 enum caret_state
3079 CARET_STATE_OFF, /* off */
3080 CARET_STATE_ON, /* on */
3081 CARET_STATE_TOGGLE, /* toggle current state */
3082 CARET_STATE_ON_IF_MOVED /* on if the position differs, unchanged otherwise */
3086 /* Set a window hook */
3087 @REQ(set_hook)
3088 int id; /* id of the hook */
3089 process_id_t pid; /* id of process to set the hook into */
3090 thread_id_t tid; /* id of thread to set the hook into */
3091 int event_min;
3092 int event_max;
3093 client_ptr_t proc; /* hook procedure */
3094 int flags;
3095 int unicode; /* is it a unicode hook? */
3096 VARARG(module,unicode_str); /* module name */
3097 @REPLY
3098 user_handle_t handle; /* handle to the hook */
3099 unsigned int active_hooks; /* active hooks bitmap */
3100 @END
3103 /* Remove a window hook */
3104 @REQ(remove_hook)
3105 user_handle_t handle; /* handle to the hook */
3106 client_ptr_t proc; /* hook procedure if handle is 0 */
3107 int id; /* id of the hook if handle is 0 */
3108 @REPLY
3109 unsigned int active_hooks; /* active hooks bitmap */
3110 @END
3113 /* Start calling a hook chain */
3114 @REQ(start_hook_chain)
3115 int id; /* id of the hook */
3116 int event; /* signalled event */
3117 user_handle_t window; /* handle to the event window */
3118 int object_id; /* object id for out of context winevent */
3119 int child_id; /* child id for out of context winevent */
3120 @REPLY
3121 user_handle_t handle; /* handle to the next hook */
3122 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
3123 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
3124 int unicode; /* is it a unicode hook? */
3125 client_ptr_t proc; /* hook procedure */
3126 unsigned int active_hooks; /* active hooks bitmap */
3127 VARARG(module,unicode_str); /* module name */
3128 @END
3131 /* Finished calling a hook chain */
3132 @REQ(finish_hook_chain)
3133 int id; /* id of the hook */
3134 @END
3137 /* Get the hook information */
3138 @REQ(get_hook_info)
3139 user_handle_t handle; /* handle to the current hook */
3140 int get_next; /* do we want info about current or next hook? */
3141 int event; /* signalled event */
3142 user_handle_t window; /* handle to the event window */
3143 int object_id; /* object id for out of context winevent */
3144 int child_id; /* child id for out of context winevent */
3145 @REPLY
3146 user_handle_t handle; /* handle to the hook */
3147 int id; /* id of the hook */
3148 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
3149 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
3150 client_ptr_t proc; /* hook procedure */
3151 int unicode; /* is it a unicode hook? */
3152 VARARG(module,unicode_str); /* module name */
3153 @END
3156 /* Create a window class */
3157 @REQ(create_class)
3158 int local; /* is it a local class? */
3159 atom_t atom; /* class atom */
3160 unsigned int style; /* class style */
3161 mod_handle_t instance; /* module instance */
3162 int extra; /* number of extra class bytes */
3163 int win_extra; /* number of window extra bytes */
3164 client_ptr_t client_ptr; /* pointer to class in client address space */
3165 data_size_t name_offset; /* base class name offset for specified atom */
3166 VARARG(name,unicode_str); /* class name */
3167 @REPLY
3168 atom_t atom; /* resulting class atom */
3169 @END
3172 /* Destroy a window class */
3173 @REQ(destroy_class)
3174 atom_t atom; /* class atom */
3175 mod_handle_t instance; /* module instance */
3176 VARARG(name,unicode_str); /* class name */
3177 @REPLY
3178 client_ptr_t client_ptr; /* pointer to class in client address space */
3179 @END
3182 /* Set some information in a class */
3183 @REQ(set_class_info)
3184 user_handle_t window; /* handle to the window */
3185 unsigned int flags; /* flags for info to set (see below) */
3186 atom_t atom; /* class atom */
3187 unsigned int style; /* class style */
3188 int win_extra; /* number of window extra bytes */
3189 mod_handle_t instance; /* module instance */
3190 int extra_offset; /* offset to set in extra bytes */
3191 data_size_t extra_size; /* size to set in extra bytes */
3192 lparam_t extra_value; /* value to set in extra bytes */
3193 @REPLY
3194 atom_t old_atom; /* previous class atom */
3195 atom_t base_atom; /* base class atom */
3196 mod_handle_t old_instance; /* previous module instance */
3197 lparam_t old_extra_value; /* old value in extra bytes */
3198 unsigned int old_style; /* previous class style */
3199 int old_extra; /* previous number of class extra bytes */
3200 int old_win_extra; /* previous number of window extra bytes */
3201 @END
3202 #define SET_CLASS_ATOM 0x0001
3203 #define SET_CLASS_STYLE 0x0002
3204 #define SET_CLASS_WINEXTRA 0x0004
3205 #define SET_CLASS_INSTANCE 0x0008
3206 #define SET_CLASS_EXTRA 0x0010
3209 /* Open the clipboard */
3210 @REQ(open_clipboard)
3211 user_handle_t window; /* clipboard window */
3212 @REPLY
3213 user_handle_t owner; /* current clipboard owner */
3214 @END
3217 /* Close the clipboard */
3218 @REQ(close_clipboard)
3219 @REPLY
3220 user_handle_t viewer; /* first clipboard viewer */
3221 user_handle_t owner; /* current clipboard owner */
3222 @END
3225 /* Empty the clipboard and grab ownership */
3226 @REQ(empty_clipboard)
3227 @END
3230 /* Add a data format to the clipboard */
3231 @REQ(set_clipboard_data)
3232 unsigned int format; /* clipboard format of the data */
3233 unsigned int lcid; /* locale id to use for synthesizing text formats */
3234 VARARG(data,bytes); /* data contents */
3235 @REPLY
3236 unsigned int seqno; /* sequence number for the set data */
3237 @END
3240 /* Fetch a data format from the clipboard */
3241 @REQ(get_clipboard_data)
3242 unsigned int format; /* clipboard format of the data */
3243 int render; /* will we try to render it if missing? */
3244 int cached; /* do we already have it in the client-side cache? */
3245 unsigned int seqno; /* sequence number for the data in the cache */
3246 @REPLY
3247 unsigned int from; /* for synthesized data, format to generate it from */
3248 user_handle_t owner; /* clipboard owner for delayed-rendered formats */
3249 unsigned int seqno; /* sequence number for the originally set data */
3250 data_size_t total; /* total data size */
3251 VARARG(data,bytes); /* data contents */
3252 @END
3255 /* Retrieve a list of available formats */
3256 @REQ(get_clipboard_formats)
3257 unsigned int format; /* specific format to query, return all if 0 */
3258 @REPLY
3259 unsigned int count; /* count of available formats */
3260 VARARG(formats,uints); /* array of available formats */
3261 @END
3264 /* Retrieve the next available format */
3265 @REQ(enum_clipboard_formats)
3266 unsigned int previous; /* previous format, or first if 0 */
3267 @REPLY
3268 unsigned int format; /* next format */
3269 @END
3272 /* Release ownership of the clipboard */
3273 @REQ(release_clipboard)
3274 user_handle_t owner; /* clipboard owner to release */
3275 @REPLY
3276 user_handle_t viewer; /* first clipboard viewer */
3277 user_handle_t owner; /* current clipboard owner */
3278 @END
3281 /* Get clipboard information */
3282 @REQ(get_clipboard_info)
3283 @REPLY
3284 user_handle_t window; /* clipboard window */
3285 user_handle_t owner; /* clipboard owner */
3286 user_handle_t viewer; /* clipboard viewer */
3287 unsigned int seqno; /* current sequence number */
3288 @END
3291 /* Set the clipboard viewer window */
3292 @REQ(set_clipboard_viewer)
3293 user_handle_t viewer; /* clipboard viewer */
3294 user_handle_t previous; /* if non-zero, check that this was the previous viewer */
3295 @REPLY
3296 user_handle_t old_viewer; /* previous clipboard viewer */
3297 user_handle_t owner; /* clipboard owner */
3298 @END
3301 /* Add a clipboard listener window */
3302 @REQ(add_clipboard_listener)
3303 user_handle_t window; /* clipboard listener window */
3304 @END
3307 /* Remove a clipboard listener window */
3308 @REQ(remove_clipboard_listener)
3309 user_handle_t window; /* clipboard listener window */
3310 @END
3313 /* Open a security token */
3314 @REQ(open_token)
3315 obj_handle_t handle; /* handle to the thread or process */
3316 unsigned int access; /* access rights to the new token */
3317 unsigned int attributes;/* object attributes */
3318 unsigned int flags; /* flags (see below) */
3319 @REPLY
3320 obj_handle_t token; /* handle to the token */
3321 @END
3322 #define OPEN_TOKEN_THREAD 1
3323 #define OPEN_TOKEN_AS_SELF 2
3326 /* Set/get the global windows */
3327 @REQ(set_global_windows)
3328 unsigned int flags; /* flags for fields to set (see below) */
3329 user_handle_t shell_window; /* handle to the new shell window */
3330 user_handle_t shell_listview; /* handle to the new shell listview window */
3331 user_handle_t progman_window; /* handle to the new program manager window */
3332 user_handle_t taskman_window; /* handle to the new task manager window */
3333 @REPLY
3334 user_handle_t old_shell_window; /* handle to the shell window */
3335 user_handle_t old_shell_listview; /* handle to the shell listview window */
3336 user_handle_t old_progman_window; /* handle to the new program manager window */
3337 user_handle_t old_taskman_window; /* handle to the new task manager window */
3338 @END
3339 #define SET_GLOBAL_SHELL_WINDOWS 0x01 /* set both main shell and listview windows */
3340 #define SET_GLOBAL_PROGMAN_WINDOW 0x02
3341 #define SET_GLOBAL_TASKMAN_WINDOW 0x04
3343 /* Adjust the privileges held by a token */
3344 @REQ(adjust_token_privileges)
3345 obj_handle_t handle; /* handle to the token */
3346 int disable_all; /* disable all privileges? */
3347 int get_modified_state; /* get modified privileges? */
3348 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to enable/disable/remove */
3349 @REPLY
3350 unsigned int len; /* total length in bytes required to store token privileges */
3351 VARARG(privileges,LUID_AND_ATTRIBUTES); /* modified privileges */
3352 @END
3354 /* Retrieves the set of privileges held by or available to a token */
3355 @REQ(get_token_privileges)
3356 obj_handle_t handle; /* handle to the token */
3357 @REPLY
3358 unsigned int len; /* total length in bytes required to store token privileges */
3359 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
3360 @END
3362 /* Check the token has the required privileges */
3363 @REQ(check_token_privileges)
3364 obj_handle_t handle; /* handle to the token */
3365 int all_required; /* are all the privileges required for the check to succeed? */
3366 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to check */
3367 @REPLY
3368 int has_privileges; /* does the token have the required privileges? */
3369 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
3370 @END
3372 @REQ(duplicate_token)
3373 obj_handle_t handle; /* handle to the token to duplicate */
3374 unsigned int access; /* access rights to the new token */
3375 int primary; /* is the new token to be a primary one? */
3376 int impersonation_level; /* impersonation level of the new token */
3377 VARARG(objattr,object_attributes); /* object attributes */
3378 @REPLY
3379 obj_handle_t new_handle; /* duplicated handle */
3380 @END
3382 @REQ(access_check)
3383 obj_handle_t handle; /* handle to the token */
3384 unsigned int desired_access; /* desired access to the object */
3385 unsigned int mapping_read; /* mapping from generic read to specific rights */
3386 unsigned int mapping_write; /* mapping from generic write to specific rights */
3387 unsigned int mapping_execute; /* mapping from generic execute to specific rights */
3388 unsigned int mapping_all; /* mapping from generic all to specific rights */
3389 VARARG(sd,security_descriptor); /* security descriptor to check */
3390 @REPLY
3391 unsigned int access_granted; /* access rights actually granted */
3392 unsigned int access_status; /* was access granted? */
3393 unsigned int privileges_len; /* length needed to store privileges */
3394 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges used during access check */
3395 @END
3397 @REQ(get_token_sid)
3398 obj_handle_t handle; /* handle to the token */
3399 unsigned int which_sid; /* which SID to retrieve from the token */
3400 @REPLY
3401 data_size_t sid_len; /* length needed to store sid */
3402 VARARG(sid,SID); /* the sid specified by which_sid from the token */
3403 @END
3405 @REQ(get_token_groups)
3406 obj_handle_t handle; /* handle to the token */
3407 @REPLY
3408 data_size_t user_len; /* length needed to store user */
3409 VARARG(user,token_groups); /* groups the token's user belongs to */
3410 @END
3412 @REQ(get_token_default_dacl)
3413 obj_handle_t handle; /* handle to the token */
3414 @REPLY
3415 data_size_t acl_len; /* length needed to store access control list */
3416 VARARG(acl,ACL); /* access control list */
3417 @END
3419 @REQ(set_token_default_dacl)
3420 obj_handle_t handle; /* handle to the token */
3421 VARARG(acl,ACL); /* default dacl to set */
3422 @END
3424 @REQ(set_security_object)
3425 obj_handle_t handle; /* handle to the object */
3426 unsigned int security_info; /* which parts of security descriptor to set */
3427 VARARG(sd,security_descriptor); /* security descriptor to set */
3428 @END
3430 @REQ(get_security_object)
3431 obj_handle_t handle; /* handle to the object */
3432 unsigned int security_info; /* which parts of security descriptor to get */
3433 @REPLY
3434 unsigned int sd_len; /* buffer size needed for sd */
3435 VARARG(sd,security_descriptor); /* retrieved security descriptor */
3436 @END
3439 struct handle_info
3441 process_id_t owner;
3442 obj_handle_t handle;
3443 unsigned int access;
3446 /* Return a list of all opened handles */
3447 @REQ(get_system_handles)
3448 @REPLY
3449 unsigned int count; /* number of handles */
3450 VARARG(data,handle_infos); /* array of handle_infos */
3451 @END
3454 /* Create a mailslot */
3455 @REQ(create_mailslot)
3456 unsigned int access; /* wanted access rights */
3457 timeout_t read_timeout;
3458 unsigned int max_msgsize;
3459 VARARG(objattr,object_attributes); /* object attributes */
3460 @REPLY
3461 obj_handle_t handle; /* handle to the mailslot */
3462 @END
3465 /* Set mailslot information */
3466 @REQ(set_mailslot_info)
3467 obj_handle_t handle; /* handle to the mailslot */
3468 timeout_t read_timeout;
3469 unsigned int flags;
3470 @REPLY
3471 timeout_t read_timeout;
3472 unsigned int max_msgsize;
3473 @END
3474 #define MAILSLOT_SET_READ_TIMEOUT 1
3477 /* Create a directory object */
3478 @REQ(create_directory)
3479 unsigned int access; /* access flags */
3480 VARARG(objattr,object_attributes); /* object attributes */
3481 @REPLY
3482 obj_handle_t handle; /* handle to the directory */
3483 @END
3486 /* Open a directory object */
3487 @REQ(open_directory)
3488 unsigned int access; /* access flags */
3489 unsigned int attributes; /* object attributes */
3490 obj_handle_t rootdir; /* root directory */
3491 VARARG(directory_name,unicode_str); /* Directory name */
3492 @REPLY
3493 obj_handle_t handle; /* handle to the directory */
3494 @END
3497 /* Get a directory entry by index */
3498 @REQ(get_directory_entry)
3499 obj_handle_t handle; /* handle to the directory */
3500 unsigned int index; /* entry index */
3501 @REPLY
3502 data_size_t name_len; /* length of the entry name in bytes */
3503 VARARG(name,unicode_str,name_len); /* entry name */
3504 VARARG(type,unicode_str); /* entry type */
3505 @END
3508 /* Create a symbolic link object */
3509 @REQ(create_symlink)
3510 unsigned int access; /* access flags */
3511 VARARG(objattr,object_attributes); /* object attributes */
3512 VARARG(target_name,unicode_str); /* target name */
3513 @REPLY
3514 obj_handle_t handle; /* handle to the symlink */
3515 @END
3518 /* Open a symbolic link object */
3519 @REQ(open_symlink)
3520 unsigned int access; /* access flags */
3521 unsigned int attributes; /* object attributes */
3522 obj_handle_t rootdir; /* root directory */
3523 VARARG(name,unicode_str); /* symlink name */
3524 @REPLY
3525 obj_handle_t handle; /* handle to the symlink */
3526 @END
3529 /* Query a symbolic link object */
3530 @REQ(query_symlink)
3531 obj_handle_t handle; /* handle to the symlink */
3532 @REPLY
3533 data_size_t total; /* total needed size for name */
3534 VARARG(target_name,unicode_str); /* target name */
3535 @END
3538 /* Query basic object information */
3539 @REQ(get_object_info)
3540 obj_handle_t handle; /* handle to the object */
3541 @REPLY
3542 unsigned int access; /* granted access mask */
3543 unsigned int ref_count; /* object ref count */
3544 unsigned int handle_count; /* object handle count */
3545 data_size_t total; /* total needed size for name */
3546 VARARG(name,unicode_str); /* object name */
3547 @END
3550 /* Query object type name information */
3551 @REQ(get_object_type)
3552 obj_handle_t handle; /* handle to the object */
3553 @REPLY
3554 data_size_t total; /* needed size for type name */
3555 VARARG(type,unicode_str); /* type name */
3556 @END
3559 /* Unlink a named object */
3560 @REQ(unlink_object)
3561 obj_handle_t handle; /* handle to the object */
3562 @END
3565 /* Query the impersonation level of an impersonation token */
3566 @REQ(get_token_impersonation_level)
3567 obj_handle_t handle; /* handle to the object */
3568 @REPLY
3569 int impersonation_level; /* impersonation level of the impersonation token */
3570 @END
3572 /* Allocate a locally-unique identifier */
3573 @REQ(allocate_locally_unique_id)
3574 @REPLY
3575 luid_t luid;
3576 @END
3579 /* Create a device manager */
3580 @REQ(create_device_manager)
3581 unsigned int access; /* wanted access rights */
3582 unsigned int attributes; /* object attributes */
3583 @REPLY
3584 obj_handle_t handle; /* handle to the device */
3585 @END
3588 /* Create a device */
3589 @REQ(create_device)
3590 unsigned int access; /* wanted access rights */
3591 unsigned int attributes; /* object attributes */
3592 obj_handle_t rootdir; /* root directory */
3593 client_ptr_t user_ptr; /* opaque ptr for use by client */
3594 obj_handle_t manager; /* device manager */
3595 VARARG(name,unicode_str); /* object name */
3596 @REPLY
3597 obj_handle_t handle; /* handle to the device */
3598 @END
3601 /* Delete a device */
3602 @REQ(delete_device)
3603 obj_handle_t handle; /* handle to the device */
3604 @END
3607 /* Retrieve the next pending device irp request */
3608 @REQ(get_next_device_request)
3609 obj_handle_t manager; /* handle to the device manager */
3610 obj_handle_t prev; /* handle to the previous irp */
3611 unsigned int status; /* status of the previous irp */
3612 @REPLY
3613 irp_params_t params; /* irp parameters */
3614 obj_handle_t next; /* handle to the next irp */
3615 process_id_t client_pid; /* pid of process calling irp */
3616 thread_id_t client_tid; /* tid of thread calling irp */
3617 data_size_t in_size; /* total needed input size */
3618 data_size_t out_size; /* needed output size */
3619 VARARG(next_data,bytes); /* input data of the next irp */
3620 @END
3623 /* Make the current process a system process */
3624 @REQ(make_process_system)
3625 @REPLY
3626 obj_handle_t event; /* event signaled when all user processes have exited */
3627 @END
3630 /* Get detailed fixed-size information about a token */
3631 @REQ(get_token_statistics)
3632 obj_handle_t handle; /* handle to the object */
3633 @REPLY
3634 luid_t token_id; /* locally-unique identifier of the token */
3635 luid_t modified_id; /* locally-unique identifier of the modified version of the token */
3636 int primary; /* is the token primary or impersonation? */
3637 int impersonation_level; /* level of impersonation */
3638 int group_count; /* the number of groups the token is a member of */
3639 int privilege_count; /* the number of privileges the token has */
3640 @END
3643 /* Create I/O completion port */
3644 @REQ(create_completion)
3645 unsigned int access; /* desired access to a port */
3646 unsigned int concurrent; /* max number of concurrent active threads */
3647 VARARG(objattr,object_attributes); /* object attributes */
3648 @REPLY
3649 obj_handle_t handle; /* port handle */
3650 @END
3653 /* Open I/O completion port */
3654 @REQ(open_completion)
3655 unsigned int access; /* desired access to a port */
3656 unsigned int attributes; /* object attributes */
3657 obj_handle_t rootdir; /* root directory */
3658 VARARG(filename,unicode_str); /* port name */
3659 @REPLY
3660 obj_handle_t handle; /* port handle */
3661 @END
3664 /* add completion to completion port */
3665 @REQ(add_completion)
3666 obj_handle_t handle; /* port handle */
3667 apc_param_t ckey; /* completion key */
3668 apc_param_t cvalue; /* completion value */
3669 apc_param_t information; /* IO_STATUS_BLOCK Information */
3670 unsigned int status; /* completion result */
3671 @END
3674 /* get completion from completion port queue */
3675 @REQ(remove_completion)
3676 obj_handle_t handle; /* port handle */
3677 @REPLY
3678 apc_param_t ckey; /* completion key */
3679 apc_param_t cvalue; /* completion value */
3680 apc_param_t information; /* IO_STATUS_BLOCK Information */
3681 unsigned int status; /* completion result */
3682 @END
3685 /* get completion queue depth */
3686 @REQ(query_completion)
3687 obj_handle_t handle; /* port handle */
3688 @REPLY
3689 unsigned int depth; /* completion queue depth */
3690 @END
3693 /* associate object with completion port */
3694 @REQ(set_completion_info)
3695 obj_handle_t handle; /* object handle */
3696 apc_param_t ckey; /* completion key */
3697 obj_handle_t chandle; /* port handle */
3698 @END
3701 /* check for associated completion and push msg */
3702 @REQ(add_fd_completion)
3703 obj_handle_t handle; /* async' object */
3704 apc_param_t cvalue; /* completion value */
3705 apc_param_t information; /* IO_STATUS_BLOCK Information */
3706 unsigned int status; /* completion status */
3707 int async; /* completion is an async result */
3708 @END
3711 /* set fd completion information */
3712 @REQ(set_fd_completion_mode)
3713 obj_handle_t handle; /* handle to a file or directory */
3714 unsigned int flags; /* completion notification flags */
3715 @END
3718 /* set fd disposition information */
3719 @REQ(set_fd_disp_info)
3720 obj_handle_t handle; /* handle to a file or directory */
3721 int unlink; /* whether to unlink file on close */
3722 @END
3725 /* set fd name information */
3726 @REQ(set_fd_name_info)
3727 obj_handle_t handle; /* handle to a file or directory */
3728 obj_handle_t rootdir; /* root directory */
3729 int link; /* link instead of renaming */
3730 VARARG(filename,string); /* new file name */
3731 @END
3734 /* Retrieve layered info for a window */
3735 @REQ(get_window_layered_info)
3736 user_handle_t handle; /* handle to the window */
3737 @REPLY
3738 unsigned int color_key; /* color key */
3739 unsigned int alpha; /* alpha (0..255) */
3740 unsigned int flags; /* LWA_* flags */
3741 @END
3744 /* Set layered info for a window */
3745 @REQ(set_window_layered_info)
3746 user_handle_t handle; /* handle to the window */
3747 unsigned int color_key; /* color key */
3748 unsigned int alpha; /* alpha (0..255) */
3749 unsigned int flags; /* LWA_* flags */
3750 @END
3753 /* Allocate an arbitrary user handle */
3754 @REQ(alloc_user_handle)
3755 @REPLY
3756 user_handle_t handle; /* allocated handle */
3757 @END
3760 /* Free an arbitrary user handle */
3761 @REQ(free_user_handle)
3762 user_handle_t handle; /* handle to free*/
3763 @END
3766 /* Set/get the current cursor */
3767 @REQ(set_cursor)
3768 unsigned int flags; /* flags for fields to set (see below) */
3769 user_handle_t handle; /* handle to the cursor */
3770 int show_count; /* show count increment/decrement */
3771 int x; /* cursor position */
3772 int y;
3773 rectangle_t clip; /* cursor clip rectangle */
3774 unsigned int clip_msg; /* message to post on cursor clip changes */
3775 @REPLY
3776 user_handle_t prev_handle; /* previous handle */
3777 int prev_count; /* previous show count */
3778 int prev_x; /* previous position */
3779 int prev_y;
3780 int new_x; /* new position */
3781 int new_y;
3782 rectangle_t new_clip; /* new clip rectangle */
3783 unsigned int last_change; /* time of last position change */
3784 @END
3785 #define SET_CURSOR_HANDLE 0x01
3786 #define SET_CURSOR_COUNT 0x02
3787 #define SET_CURSOR_POS 0x04
3788 #define SET_CURSOR_CLIP 0x08
3789 #define SET_CURSOR_NOCLIP 0x10
3792 /* Modify the list of registered rawinput devices */
3793 @REQ(update_rawinput_devices)
3794 VARARG(devices,rawinput_devices);
3795 @END
3798 /* Retrieve the suspended context of a thread */
3799 @REQ(get_suspend_context)
3800 @REPLY
3801 VARARG(context,context); /* thread context */
3802 @END
3805 /* Store the suspend context of a thread */
3806 @REQ(set_suspend_context)
3807 VARARG(context,context); /* thread context */
3808 @END
3811 /* Create a new job object */
3812 @REQ(create_job)
3813 unsigned int access; /* wanted access rights */
3814 VARARG(objattr,object_attributes); /* object attributes */
3815 @REPLY
3816 obj_handle_t handle; /* handle to the job */
3817 @END
3820 /* Open a job object */
3821 @REQ(open_job)
3822 unsigned int access; /* wanted access rights */
3823 unsigned int attributes; /* object attributes */
3824 obj_handle_t rootdir; /* root directory */
3825 VARARG(name,unicode_str); /* object name */
3826 @REPLY
3827 obj_handle_t handle; /* handle to the job */
3828 @END
3831 /* Assign a job object to a process */
3832 @REQ(assign_job)
3833 obj_handle_t job; /* handle to the job */
3834 obj_handle_t process; /* handle to the process */
3835 @END
3838 /* Check if a process is associated with a job */
3839 @REQ(process_in_job)
3840 obj_handle_t job; /* handle to the job */
3841 obj_handle_t process; /* handle to the process */
3842 @END
3845 /* Set limit flags on a job */
3846 @REQ(set_job_limits)
3847 obj_handle_t handle; /* handle to the job */
3848 unsigned int limit_flags; /* new limit flags */
3849 @END
3852 /* Set new completion port for a job */
3853 @REQ(set_job_completion_port)
3854 obj_handle_t job; /* handle to the job */
3855 obj_handle_t port; /* handle to the completion port */
3856 client_ptr_t key; /* key to send with completion messages */
3857 @END
3860 /* Terminate all processes associated with the job */
3861 @REQ(terminate_job)
3862 obj_handle_t handle; /* handle to the job */
3863 int status; /* process exit code */
3864 @END