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 */
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;
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 */
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 */
76 int code; /* event code */
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 */
87 client_ptr_t params[15]; /* parameters */
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 */
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? */
112 int code; /* EXIT_THREAD_DEBUG_EVENT/EXIT_PROCESS_DEBUG_EVENT */
113 int exit_code; /* thread or process exit code */
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? */
127 int code; /* UNLOAD_DLL_DEBUG_EVENT */
129 mod_handle_t base; /* base address of the dll */
133 int code; /* OUTPUT_DEBUG_STRING_EVENT */
134 data_size_t length; /* string length */
135 client_ptr_t string; /* string to display (in debugged process address space) */
139 int code; /* RIP_EVENT */
145 /* supported CPU types */
148 CPU_x86, CPU_x86_64, CPU_POWERPC, CPU_ARM, CPU_ARM64, CPU_SPARC
150 typedef int cpu_type_t;
155 cpu_type_t cpu; /* cpu type */
156 unsigned int flags; /* SERVER_CTX_* flags */
159 struct { unsigned int eip, ebp, esp, eflags, cs, ss; } i386_regs;
160 struct { unsigned __int64 rip, rbp, rsp;
161 unsigned int cs, ss, flags, __pad; } x86_64_regs;
162 struct { unsigned int iar, msr, ctr, lr, dar, dsisr, trap, __pad; } powerpc_regs;
163 struct { unsigned int sp, lr, pc, cpsr; } arm_regs;
164 struct { unsigned __int64 sp, pc, pstate; } arm64_regs;
165 struct { unsigned int psr, pc, npc, y, wim, tbr; } sparc_regs;
166 } ctl; /* selected by SERVER_CTX_CONTROL */
169 struct { unsigned int eax, ebx, ecx, edx, esi, edi; } i386_regs;
170 struct { unsigned __int64 rax,rbx, rcx, rdx, rsi, rdi,
171 r8, r9, r10, r11, r12, r13, r14, r15; } x86_64_regs;
172 struct { unsigned int gpr[32], cr, xer; } powerpc_regs;
173 struct { unsigned int r[13]; } arm_regs;
174 struct { unsigned __int64 x[31]; } arm64_regs;
175 struct { unsigned int g[8], o[8], l[8], i[8]; } sparc_regs;
176 } integer; /* selected by SERVER_CTX_INTEGER */
179 struct { unsigned int ds, es, fs, gs; } i386_regs;
180 struct { unsigned int ds, es, fs, gs; } x86_64_regs;
181 } seg; /* selected by SERVER_CTX_SEGMENTS */
184 struct { unsigned int ctrl, status, tag, err_off, err_sel, data_off, data_sel, cr0npx;
185 unsigned char regs[80]; } i386_regs;
186 struct { struct { unsigned __int64 low, high; } fpregs[32]; } x86_64_regs;
187 struct { double fpr[32], fpscr; } powerpc_regs;
188 } fp; /* selected by SERVER_CTX_FLOATING_POINT */
191 struct { unsigned int dr0, dr1, dr2, dr3, dr6, dr7; } i386_regs;
192 struct { unsigned __int64 dr0, dr1, dr2, dr3, dr6, dr7; } x86_64_regs;
193 struct { unsigned int dr[8]; } powerpc_regs;
194 } debug; /* selected by SERVER_CTX_DEBUG_REGISTERS */
197 unsigned char i386_regs[512];
198 } ext; /* selected by SERVER_CTX_EXTENDED_REGISTERS */
201 #define SERVER_CTX_CONTROL 0x01
202 #define SERVER_CTX_INTEGER 0x02
203 #define SERVER_CTX_SEGMENTS 0x04
204 #define SERVER_CTX_FLOATING_POINT 0x08
205 #define SERVER_CTX_DEBUG_REGISTERS 0x10
206 #define SERVER_CTX_EXTENDED_REGISTERS 0x20
208 /* structure used in sending an fd from client to server */
211 thread_id_t tid; /* thread id */
212 int fd; /* file descriptor on client-side */
215 /* structure sent by the server on the wait fifo */
218 client_ptr_t cookie; /* magic cookie that was passed in select_request */
219 int signaled; /* wait result */
223 /* NT-style timeout, in 100ns units, negative means relative timeout */
224 typedef __int64 timeout_t;
225 #define TIMEOUT_INFINITE (((timeout_t)0x7fffffff) << 32 | 0xffffffff)
227 /* structure for process startup info */
230 unsigned int debug_flags;
231 unsigned int console_flags;
232 obj_handle_t console;
234 obj_handle_t hstdout;
235 obj_handle_t hstderr;
242 unsigned int attribute;
245 data_size_t curdir_len;
246 data_size_t dllpath_len;
247 data_size_t imagepath_len;
248 data_size_t cmdline_len;
249 data_size_t title_len;
250 data_size_t desktop_len;
251 data_size_t shellinfo_len;
252 data_size_t runtime_len;
253 /* VARARG(curdir,unicode_str,curdir_len); */
254 /* VARARG(dllpath,unicode_str,dllpath_len); */
255 /* VARARG(imagepath,unicode_str,imagepath_len); */
256 /* VARARG(cmdline,unicode_str,cmdline_len); */
257 /* VARARG(title,unicode_str,title_len); */
258 /* VARARG(desktop,unicode_str,desktop_len); */
259 /* VARARG(shellinfo,unicode_str,shellinfo_len); */
260 /* VARARG(runtime,unicode_str,runtime_len); */
263 /* structure returned in the list of window properties */
266 atom_t atom; /* property atom */
267 int string; /* was atom a string originally? */
268 lparam_t data; /* data stored in property */
271 /* structure to specify window rectangles */
280 /* structure for parameters of async I/O calls */
283 obj_handle_t handle; /* object to perform I/O on */
284 obj_handle_t event; /* event to signal when done */
285 client_ptr_t callback; /* client-side callback to call upon end of async */
286 client_ptr_t iosb; /* I/O status block in client addr space */
287 client_ptr_t arg; /* opaque user data to pass to callback */
288 apc_param_t cvalue; /* completion value to use for completion events */
291 /* structures for extra message data */
293 struct hardware_msg_data
295 lparam_t info; /* extra info */
296 int x; /* x position */
297 int y; /* y position */
298 unsigned int hw_id; /* unique id */
299 unsigned int flags; /* hook flags */
305 int type; /* RIM_TYPEKEYBOARD */
306 unsigned int message; /* message generated by this rawinput event */
307 unsigned short vkey; /* virtual key code */
308 unsigned short scan; /* scan code */
312 int type; /* RIM_TYPEMOUSE */
313 int x; /* x coordinate */
314 int y; /* y coordinate */
315 unsigned int data; /* mouse data */
320 struct callback_msg_data
322 client_ptr_t callback; /* callback function */
323 lparam_t data; /* user data for callback */
324 lparam_t result; /* message result */
327 struct winevent_msg_data
329 user_handle_t hook; /* hook handle */
330 thread_id_t tid; /* thread id */
331 client_ptr_t hook_proc; /* hook proc address */
332 /* followed by module name if any */
340 int type; /* INPUT_KEYBOARD */
341 unsigned short vkey; /* virtual key code */
342 unsigned short scan; /* scan code */
343 unsigned int flags; /* event flags */
344 unsigned int time; /* event time */
345 lparam_t info; /* extra info */
349 int type; /* INPUT_MOUSE */
350 int x; /* coordinates */
352 unsigned int data; /* mouse data */
353 unsigned int flags; /* event flags */
354 unsigned int time; /* event time */
355 lparam_t info; /* extra info */
359 int type; /* INPUT_HARDWARE */
360 unsigned int msg; /* message code */
361 lparam_t lparam; /* message param */
367 unsigned char bytes[1]; /* raw data for sent messages */
368 struct hardware_msg_data hardware;
369 struct callback_msg_data callback;
370 struct winevent_msg_data winevent;
373 /* structure for console char/attribute info */
380 /* structure returned in filesystem events */
381 struct filesystem_event
390 unsigned int low_part;
394 #define MAX_ACL_LEN 65535
396 struct security_descriptor
398 unsigned int control; /* SE_ flags */
399 data_size_t owner_len;
400 data_size_t group_len;
401 data_size_t sacl_len;
402 data_size_t dacl_len;
403 /* VARARG(owner,SID); */
404 /* VARARG(group,SID); */
405 /* VARARG(sacl,ACL); */
406 /* VARARG(dacl,ACL); */
409 struct object_attributes
411 obj_handle_t rootdir; /* root directory */
412 data_size_t sd_len; /* length of security_descriptor data. may be 0 */
413 data_size_t name_len; /* length of the name string. may be 0 */
414 /* VARARG(sd,security_descriptor); */
415 /* VARARG(name,unicode_str); */
421 /* unsigned int attributes[count]; */
422 /* VARARG(sids,SID); */
448 enum apc_type type; /* APC_USER */
450 client_ptr_t func; /* void (__stdcall *func)(ULONG_PTR,ULONG_PTR,ULONG_PTR); */
451 apc_param_t args[3]; /* arguments for user function */
455 enum apc_type type; /* APC_TIMER */
457 client_ptr_t func; /* void (__stdcall *func)(void*, unsigned int, unsigned int); */
458 timeout_t time; /* absolute time of expiration */
459 client_ptr_t arg; /* user argument */
463 enum apc_type type; /* APC_ASYNC_IO */
464 unsigned int status; /* I/O status */
465 client_ptr_t func; /* unsigned int (*func)(void*, void*, unsigned int, void **); */
466 client_ptr_t user; /* user pointer */
467 client_ptr_t sb; /* status block */
471 enum apc_type type; /* APC_VIRTUAL_ALLOC */
472 unsigned int op_type; /* type of operation */
473 client_ptr_t addr; /* requested address */
474 mem_size_t size; /* allocation size */
475 unsigned int zero_bits; /* allocation alignment */
476 unsigned int prot; /* memory protection flags */
480 enum apc_type type; /* APC_VIRTUAL_FREE */
481 unsigned int op_type; /* type of operation */
482 client_ptr_t addr; /* requested address */
483 mem_size_t size; /* allocation size */
487 enum apc_type type; /* APC_VIRTUAL_QUERY */
489 client_ptr_t addr; /* requested address */
493 enum apc_type type; /* APC_VIRTUAL_PROTECT */
494 unsigned int prot; /* new protection flags */
495 client_ptr_t addr; /* requested address */
496 mem_size_t size; /* requested size */
500 enum apc_type type; /* APC_VIRTUAL_FLUSH */
502 client_ptr_t addr; /* requested address */
503 mem_size_t size; /* requested size */
507 enum apc_type type; /* APC_VIRTUAL_LOCK */
509 client_ptr_t addr; /* requested address */
510 mem_size_t size; /* requested size */
514 enum apc_type type; /* APC_VIRTUAL_UNLOCK */
516 client_ptr_t addr; /* requested address */
517 mem_size_t size; /* requested size */
521 enum apc_type type; /* APC_MAP_VIEW */
522 obj_handle_t handle; /* mapping handle */
523 client_ptr_t addr; /* requested address */
524 mem_size_t size; /* allocation size */
525 file_pos_t offset; /* file offset */
526 unsigned int alloc_type;/* allocation type */
527 unsigned short zero_bits; /* allocation alignment */
528 unsigned short prot; /* memory protection flags */
532 enum apc_type type; /* APC_UNMAP_VIEW */
534 client_ptr_t addr; /* view address */
538 enum apc_type type; /* APC_CREATE_THREAD */
539 int suspend; /* suspended thread? */
540 client_ptr_t func; /* void (__stdcall *func)(void*); start function */
541 client_ptr_t arg; /* argument for start function */
542 mem_size_t reserve; /* reserve size for thread stack */
543 mem_size_t commit; /* commit size for thread stack */
552 enum apc_type type; /* APC_ASYNC_IO */
553 unsigned int status; /* new status of async operation */
554 client_ptr_t apc; /* user APC to call */
555 unsigned int total; /* bytes transferred */
559 enum apc_type type; /* APC_VIRTUAL_ALLOC */
560 unsigned int status; /* status returned by call */
561 client_ptr_t addr; /* resulting address */
562 mem_size_t size; /* resulting size */
566 enum apc_type type; /* APC_VIRTUAL_FREE */
567 unsigned int status; /* status returned by call */
568 client_ptr_t addr; /* resulting address */
569 mem_size_t size; /* resulting size */
573 enum apc_type type; /* APC_VIRTUAL_QUERY */
574 unsigned int status; /* status returned by call */
575 client_ptr_t base; /* resulting base address */
576 client_ptr_t alloc_base;/* resulting allocation base */
577 mem_size_t size; /* resulting region size */
578 unsigned short state; /* resulting region state */
579 unsigned short prot; /* resulting region protection */
580 unsigned short alloc_prot;/* resulting allocation protection */
581 unsigned short alloc_type;/* resulting region allocation type */
585 enum apc_type type; /* APC_VIRTUAL_PROTECT */
586 unsigned int status; /* status returned by call */
587 client_ptr_t addr; /* resulting address */
588 mem_size_t size; /* resulting size */
589 unsigned int prot; /* old protection flags */
593 enum apc_type type; /* APC_VIRTUAL_FLUSH */
594 unsigned int status; /* status returned by call */
595 client_ptr_t addr; /* resulting address */
596 mem_size_t size; /* resulting size */
600 enum apc_type type; /* APC_VIRTUAL_LOCK */
601 unsigned int status; /* status returned by call */
602 client_ptr_t addr; /* resulting address */
603 mem_size_t size; /* resulting size */
607 enum apc_type type; /* APC_VIRTUAL_UNLOCK */
608 unsigned int status; /* status returned by call */
609 client_ptr_t addr; /* resulting address */
610 mem_size_t size; /* resulting size */
614 enum apc_type type; /* APC_MAP_VIEW */
615 unsigned int status; /* status returned by call */
616 client_ptr_t addr; /* resulting address */
617 mem_size_t size; /* resulting size */
621 enum apc_type type; /* APC_MAP_VIEW */
622 unsigned int status; /* status returned by call */
626 enum apc_type type; /* APC_CREATE_THREAD */
627 unsigned int status; /* status returned by call */
628 thread_id_t tid; /* thread id */
629 obj_handle_t handle; /* handle to new thread */
633 struct rawinput_device
635 unsigned short usage_page;
636 unsigned short usage;
638 user_handle_t target;
641 /****************************************************************/
642 /* Request declarations */
644 /* Create a new process from the context of the parent */
646 int inherit_all; /* inherit all handles from parent */
647 unsigned int create_flags; /* creation flags */
648 int socket_fd; /* file descriptor for process socket */
649 obj_handle_t exe_file; /* file handle for main exe */
650 unsigned int process_access; /* access rights for process object */
651 unsigned int process_attr; /* attributes for process object */
652 unsigned int thread_access; /* access rights for thread object */
653 unsigned int thread_attr; /* attributes for thread object */
654 data_size_t info_size; /* size of startup info */
655 VARARG(info,startup_info,info_size); /* startup information */
656 VARARG(env,unicode_str); /* environment for new process */
658 obj_handle_t info; /* new process info handle */
659 process_id_t pid; /* process id */
660 obj_handle_t phandle; /* process handle (in the current process) */
661 thread_id_t tid; /* thread id */
662 obj_handle_t thandle; /* thread handle (in the current process) */
666 /* Retrieve information about a newly started process */
667 @REQ(get_new_process_info)
668 obj_handle_t info; /* info handle returned from new_process_request */
670 int success; /* did the process start successfully? */
671 int exit_code; /* process exit code if failed */
675 /* Create a new thread from the context of the parent */
677 unsigned int access; /* wanted access rights */
678 unsigned int attributes; /* object attributes */
679 int suspend; /* new thread should be suspended on creation */
680 int request_fd; /* fd for request pipe */
682 thread_id_t tid; /* thread id */
683 obj_handle_t handle; /* thread handle (in the current process) */
687 /* Retrieve the new process startup info */
688 @REQ(get_startup_info)
690 obj_handle_t exe_file; /* file handle for main exe */
691 data_size_t info_size; /* size of startup info */
692 VARARG(info,startup_info,info_size); /* startup information */
693 VARARG(env,unicode_str); /* environment */
697 /* Signal the end of the process initialization */
698 @REQ(init_process_done)
699 int gui; /* is it a GUI process? */
700 mod_handle_t module; /* main module base address */
701 client_ptr_t ldt_copy; /* address of LDT copy (in thread address space) */
702 client_ptr_t entry; /* process entry point */
706 /* Initialize a thread; called from the child after fork()/clone() */
708 int unix_pid; /* Unix pid of new thread */
709 int unix_tid; /* Unix tid of new thread */
710 int debug_level; /* new debug level */
711 client_ptr_t teb; /* TEB of new thread (in thread address space) */
712 client_ptr_t entry; /* entry point or PEB if initial thread (in thread address space) */
713 int reply_fd; /* fd for reply pipe */
714 int wait_fd; /* fd for blocking calls pipe */
715 cpu_type_t cpu; /* CPU that this thread is running on */
717 process_id_t pid; /* process id of the new thread's process */
718 thread_id_t tid; /* thread id of the new thread */
719 timeout_t server_start; /* server start time */
720 data_size_t info_size; /* total size of startup info */
721 int version; /* protocol version */
722 unsigned int all_cpus; /* bitset of supported CPUs */
726 /* Terminate a process */
727 @REQ(terminate_process)
728 obj_handle_t handle; /* process handle to terminate */
729 int exit_code; /* process exit code */
731 int self; /* suicide? */
735 /* Terminate a thread */
736 @REQ(terminate_thread)
737 obj_handle_t handle; /* thread handle to terminate */
738 int exit_code; /* thread exit code */
740 int self; /* suicide? */
741 int last; /* last thread in this process? */
745 /* Retrieve information about a process */
746 @REQ(get_process_info)
747 obj_handle_t handle; /* process handle */
749 process_id_t pid; /* server process id */
750 process_id_t ppid; /* server process id of parent */
751 affinity_t affinity; /* process affinity mask */
752 client_ptr_t peb; /* PEB address in process address space */
753 timeout_t start_time; /* process start time */
754 timeout_t end_time; /* process end time */
755 int exit_code; /* process exit code */
756 int priority; /* priority class */
757 cpu_type_t cpu; /* CPU that this process is running on */
758 int debugger_present; /* process is being debugged */
762 /* Set a process information */
763 @REQ(set_process_info)
764 obj_handle_t handle; /* process handle */
765 int mask; /* setting mask (see below) */
766 int priority; /* priority class */
767 affinity_t affinity; /* affinity mask */
769 #define SET_PROCESS_INFO_PRIORITY 0x01
770 #define SET_PROCESS_INFO_AFFINITY 0x02
773 /* Retrieve information about a thread */
774 @REQ(get_thread_info)
775 obj_handle_t handle; /* thread handle */
776 thread_id_t tid_in; /* thread id (optional) */
778 process_id_t pid; /* server process id */
779 thread_id_t tid; /* server thread id */
780 client_ptr_t teb; /* thread teb pointer */
781 affinity_t affinity; /* thread affinity mask */
782 timeout_t creation_time; /* thread creation time */
783 timeout_t exit_time; /* thread exit time */
784 int exit_code; /* thread exit code */
785 int priority; /* thread priority level */
786 int last; /* last thread in process */
790 /* Set a thread information */
791 @REQ(set_thread_info)
792 obj_handle_t handle; /* thread handle */
793 int mask; /* setting mask (see below) */
794 int priority; /* priority class */
795 affinity_t affinity; /* affinity mask */
796 obj_handle_t token; /* impersonation token */
798 #define SET_THREAD_INFO_PRIORITY 0x01
799 #define SET_THREAD_INFO_AFFINITY 0x02
800 #define SET_THREAD_INFO_TOKEN 0x04
803 /* Retrieve information about a module */
805 obj_handle_t handle; /* process handle */
806 mod_handle_t base_address; /* base address of module */
808 client_ptr_t entry_point;
809 data_size_t size; /* module size */
810 data_size_t filename_len; /* buffer len in bytes required to store filename */
811 VARARG(filename,unicode_str); /* file name of module */
815 /* Suspend a thread */
817 obj_handle_t handle; /* thread handle */
819 int count; /* new suspend count */
823 /* Resume a thread */
825 obj_handle_t handle; /* thread handle */
827 int count; /* new suspend count */
831 /* Notify the server that a dll has been loaded */
833 obj_handle_t mapping; /* file mapping handle */
834 mod_handle_t base; /* base address */
835 client_ptr_t name; /* ptr to ptr to name (in process addr space) */
836 data_size_t size; /* dll size */
837 int dbg_offset; /* debug info offset */
838 int dbg_size; /* debug info size */
839 VARARG(filename,unicode_str); /* file name of dll */
843 /* Notify the server that a dll is being unloaded */
845 mod_handle_t base; /* base address */
849 /* Queue an APC for a thread or process */
851 obj_handle_t handle; /* thread or process handle */
852 apc_call_t call; /* call arguments */
854 obj_handle_t handle; /* APC handle */
855 int self; /* run APC in caller itself? */
859 /* Get the result of an APC call */
861 obj_handle_t handle; /* handle to the APC */
863 apc_result_t result; /* result of the APC */
867 /* Close a handle for the current process */
869 obj_handle_t handle; /* handle to close */
873 /* Set a handle information */
874 @REQ(set_handle_info)
875 obj_handle_t handle; /* handle we are interested in */
876 int flags; /* new handle flags */
877 int mask; /* mask for flags to set */
879 int old_flags; /* old flag value */
883 /* Duplicate a handle */
885 obj_handle_t src_process; /* src process handle */
886 obj_handle_t src_handle; /* src handle to duplicate */
887 obj_handle_t dst_process; /* dst process handle */
888 unsigned int access; /* wanted access rights */
889 unsigned int attributes; /* object attributes */
890 unsigned int options; /* duplicate options (see below) */
892 obj_handle_t handle; /* duplicated handle in dst process */
893 int self; /* is the source the current process? */
894 int closed; /* whether the source handle has been closed */
896 #define DUP_HANDLE_CLOSE_SOURCE DUPLICATE_CLOSE_SOURCE
897 #define DUP_HANDLE_SAME_ACCESS DUPLICATE_SAME_ACCESS
898 #define DUP_HANDLE_MAKE_GLOBAL 0x80000000 /* Not a Windows flag */
901 /* Open a handle to a process */
903 process_id_t pid; /* process id to open */
904 unsigned int access; /* wanted access rights */
905 unsigned int attributes; /* object attributes */
907 obj_handle_t handle; /* handle to the process */
911 /* Open a handle to a thread */
913 thread_id_t tid; /* thread id to open */
914 unsigned int access; /* wanted access rights */
915 unsigned int attributes; /* object attributes */
917 obj_handle_t handle; /* handle to the thread */
921 /* Wait for handles */
923 int flags; /* wait flags (see below) */
924 client_ptr_t cookie; /* magic cookie to return to client */
925 obj_handle_t signal; /* object to signal (0 if none) */
926 obj_handle_t prev_apc; /* handle to previous APC */
927 timeout_t timeout; /* timeout */
928 VARARG(result,apc_result); /* result of previous APC */
929 VARARG(handles,handles); /* handles to select on */
931 timeout_t timeout; /* timeout converted to absolute */
932 apc_call_t call; /* APC call arguments */
933 obj_handle_t apc_handle; /* handle to next APC */
936 #define SELECT_ALERTABLE 2
937 #define SELECT_INTERRUPTIBLE 4
940 /* Create an event */
942 unsigned int access; /* wanted access rights */
943 unsigned int attributes; /* object attributes */
944 int manual_reset; /* manual reset event */
945 int initial_state; /* initial state of the event */
946 VARARG(objattr,object_attributes); /* object attributes */
948 obj_handle_t handle; /* handle to the event */
951 /* Event operation */
953 obj_handle_t handle; /* handle to event */
954 int op; /* event operation (see below) */
956 enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT };
961 unsigned int access; /* wanted access rights */
962 unsigned int attributes; /* object attributes */
963 obj_handle_t rootdir; /* root directory */
964 VARARG(name,unicode_str); /* object name */
966 obj_handle_t handle; /* handle to the event */
972 unsigned int access; /* wanted access rights */
973 unsigned int attributes; /* object attributes */
974 int owned; /* initially owned? */
975 VARARG(objattr,object_attributes); /* object attributes */
977 obj_handle_t handle; /* handle to the mutex */
981 /* Release a mutex */
983 obj_handle_t handle; /* handle to the mutex */
985 unsigned int prev_count; /* value of internal counter, before release */
991 unsigned int access; /* wanted access rights */
992 unsigned int attributes; /* object attributes */
993 obj_handle_t rootdir; /* root directory */
994 VARARG(name,unicode_str); /* object name */
996 obj_handle_t handle; /* handle to the mutex */
1000 /* Create a semaphore */
1001 @REQ(create_semaphore)
1002 unsigned int access; /* wanted access rights */
1003 unsigned int attributes; /* object attributes */
1004 unsigned int initial; /* initial count */
1005 unsigned int max; /* maximum count */
1006 VARARG(objattr,object_attributes); /* object attributes */
1008 obj_handle_t handle; /* handle to the semaphore */
1012 /* Release a semaphore */
1013 @REQ(release_semaphore)
1014 obj_handle_t handle; /* handle to the semaphore */
1015 unsigned int count; /* count to add to semaphore */
1017 unsigned int prev_count; /* previous semaphore count */
1021 /* Open a semaphore */
1022 @REQ(open_semaphore)
1023 unsigned int access; /* wanted access rights */
1024 unsigned int attributes; /* object attributes */
1025 obj_handle_t rootdir; /* root directory */
1026 VARARG(name,unicode_str); /* object name */
1028 obj_handle_t handle; /* handle to the semaphore */
1034 unsigned int access; /* wanted access rights */
1035 unsigned int attributes; /* object attributes */
1036 unsigned int sharing; /* sharing flags */
1037 int create; /* file create action */
1038 unsigned int options; /* file options */
1039 unsigned int attrs; /* file attributes for creation */
1040 VARARG(objattr,object_attributes); /* object attributes */
1041 VARARG(filename,string); /* file name */
1043 obj_handle_t handle; /* handle to the file */
1047 /* Open a file object */
1048 @REQ(open_file_object)
1049 unsigned int access; /* wanted access rights */
1050 unsigned int attributes; /* open attributes */
1051 obj_handle_t rootdir; /* root directory */
1052 unsigned int sharing; /* sharing flags */
1053 unsigned int options; /* file options */
1054 VARARG(filename,unicode_str); /* file name */
1056 obj_handle_t handle; /* handle to the file */
1060 /* Allocate a file handle for a Unix fd */
1061 @REQ(alloc_file_handle)
1062 unsigned int access; /* wanted access rights */
1063 unsigned int attributes; /* object attributes */
1064 int fd; /* file descriptor on the client side */
1066 obj_handle_t handle; /* handle to the file */
1070 /* Get the Unix name from a file handle */
1071 @REQ(get_handle_unix_name)
1072 obj_handle_t handle; /* file handle */
1074 data_size_t name_len; /* unix name length */
1075 VARARG(name,string); /* unix name */
1079 /* Get a Unix fd to access a file */
1081 obj_handle_t handle; /* handle to the file */
1083 int type; /* file type (see below) */
1084 int cacheable; /* can fd be cached in the client? */
1085 unsigned int access; /* file access rights */
1086 unsigned int options; /* file open options */
1090 FD_TYPE_INVALID, /* invalid file (no associated fd) */
1091 FD_TYPE_FILE, /* regular file */
1092 FD_TYPE_DIR, /* directory */
1093 FD_TYPE_SOCKET, /* socket */
1094 FD_TYPE_SERIAL, /* serial port */
1095 FD_TYPE_PIPE, /* named pipe */
1096 FD_TYPE_MAILSLOT, /* mailslot */
1097 FD_TYPE_CHAR, /* unspecified char device */
1098 FD_TYPE_DEVICE, /* Windows device file */
1103 /* Flush a file buffers */
1105 obj_handle_t handle; /* handle to the file */
1107 obj_handle_t event; /* event set when finished */
1111 /* Lock a region of a file */
1113 obj_handle_t handle; /* handle to the file */
1114 file_pos_t offset; /* offset of start of lock */
1115 file_pos_t count; /* count of bytes to lock */
1116 int shared; /* shared or exclusive lock? */
1117 int wait; /* do we want to wait? */
1119 obj_handle_t handle; /* handle to wait on */
1120 int overlapped; /* is it an overlapped I/O handle? */
1124 /* Unlock a region of a file */
1126 obj_handle_t handle; /* handle to the file */
1127 file_pos_t offset; /* offset of start of unlock */
1128 file_pos_t count; /* count of bytes to unlock */
1132 /* Create a socket */
1134 unsigned int access; /* wanted access rights */
1135 unsigned int attributes; /* object attributes */
1136 int family; /* family, see socket manpage */
1137 int type; /* type, see socket manpage */
1138 int protocol; /* protocol, see socket manpage */
1139 unsigned int flags; /* socket flags */
1141 obj_handle_t handle; /* handle to the new socket */
1145 /* Accept a socket */
1147 obj_handle_t lhandle; /* handle to the listening socket */
1148 unsigned int access; /* wanted access rights */
1149 unsigned int attributes; /* object attributes */
1151 obj_handle_t handle; /* handle to the new socket */
1155 /* Accept into an initialized socket */
1156 @REQ(accept_into_socket)
1157 obj_handle_t lhandle; /* handle to the listening socket */
1158 obj_handle_t ahandle; /* handle to the accepting socket */
1162 /* Set socket event parameters */
1163 @REQ(set_socket_event)
1164 obj_handle_t handle; /* handle to the socket */
1165 unsigned int mask; /* event mask */
1166 obj_handle_t event; /* event object */
1167 user_handle_t window; /* window to send the message to */
1168 unsigned int msg; /* message to send */
1172 /* Get socket event parameters */
1173 @REQ(get_socket_event)
1174 obj_handle_t handle; /* handle to the socket */
1175 int service; /* clear pending? */
1176 obj_handle_t c_event; /* event to clear */
1178 unsigned int mask; /* event mask */
1179 unsigned int pmask; /* pending events */
1180 unsigned int state; /* status bits */
1181 VARARG(errors,ints); /* event errors */
1185 /* Re-enable pending socket events */
1186 @REQ(enable_socket_event)
1187 obj_handle_t handle; /* handle to the socket */
1188 unsigned int mask; /* events to re-enable */
1189 unsigned int sstate; /* status bits to set */
1190 unsigned int cstate; /* status bits to clear */
1193 @REQ(set_socket_deferred)
1194 obj_handle_t handle; /* handle to the socket */
1195 obj_handle_t deferred; /* handle to the socket for which accept() is deferred */
1198 /* Allocate a console (only used by a console renderer) */
1200 unsigned int access; /* wanted access rights */
1201 unsigned int attributes; /* object attributes */
1202 process_id_t pid; /* pid of process which shall be attached to the console */
1203 int input_fd; /* if pid=-1 (bare console to current process), fd for input */
1205 obj_handle_t handle_in; /* handle to console input */
1206 obj_handle_t event; /* handle to renderer events change notification */
1210 /* Free the console of the current process */
1215 #define CONSOLE_RENDERER_NONE_EVENT 0x00
1216 #define CONSOLE_RENDERER_TITLE_EVENT 0x01
1217 #define CONSOLE_RENDERER_ACTIVE_SB_EVENT 0x02
1218 #define CONSOLE_RENDERER_SB_RESIZE_EVENT 0x03
1219 #define CONSOLE_RENDERER_UPDATE_EVENT 0x04
1220 #define CONSOLE_RENDERER_CURSOR_POS_EVENT 0x05
1221 #define CONSOLE_RENDERER_CURSOR_GEOM_EVENT 0x06
1222 #define CONSOLE_RENDERER_DISPLAY_EVENT 0x07
1223 #define CONSOLE_RENDERER_EXIT_EVENT 0x08
1224 struct console_renderer_event
1259 /* retrieve console events for the renderer */
1260 @REQ(get_console_renderer_events)
1261 obj_handle_t handle; /* handle to console input events */
1263 VARARG(data,bytes); /* the various console_renderer_events */
1267 /* Open a handle to the process console */
1269 obj_handle_t from; /* 0 (resp 1) input (resp output) of current process console */
1270 /* otherwise console_in handle to get active screen buffer? */
1271 unsigned int access; /* wanted access rights */
1272 unsigned int attributes; /* object attributes */
1273 int share; /* share mask (only for output handles) */
1275 obj_handle_t handle; /* handle to the console */
1279 /* Get the input queue wait event */
1280 @REQ(get_console_wait_event)
1282 obj_handle_t handle;
1285 /* Get a console mode (input or output) */
1286 @REQ(get_console_mode)
1287 obj_handle_t handle; /* handle to the console */
1289 int mode; /* console mode */
1293 /* Set a console mode (input or output) */
1294 @REQ(set_console_mode)
1295 obj_handle_t handle; /* handle to the console */
1296 int mode; /* console mode */
1300 /* Set info about a console (input only) */
1301 @REQ(set_console_input_info)
1302 obj_handle_t handle; /* handle to console input, or 0 for process' console */
1303 int mask; /* setting mask (see below) */
1304 obj_handle_t active_sb; /* active screen buffer */
1305 int history_mode; /* whether we duplicate lines in history */
1306 int history_size; /* number of lines in history */
1307 int edition_mode; /* index to the edition mode flavors */
1308 int input_cp; /* console input codepage */
1309 int output_cp; /* console output codepage */
1310 user_handle_t win; /* console window if backend supports it */
1311 VARARG(title,unicode_str); /* console title */
1313 #define SET_CONSOLE_INPUT_INFO_ACTIVE_SB 0x01
1314 #define SET_CONSOLE_INPUT_INFO_TITLE 0x02
1315 #define SET_CONSOLE_INPUT_INFO_HISTORY_MODE 0x04
1316 #define SET_CONSOLE_INPUT_INFO_HISTORY_SIZE 0x08
1317 #define SET_CONSOLE_INPUT_INFO_EDITION_MODE 0x10
1318 #define SET_CONSOLE_INPUT_INFO_INPUT_CODEPAGE 0x20
1319 #define SET_CONSOLE_INPUT_INFO_OUTPUT_CODEPAGE 0x40
1320 #define SET_CONSOLE_INPUT_INFO_WIN 0x80
1323 /* Get info about a console (input only) */
1324 @REQ(get_console_input_info)
1325 obj_handle_t handle; /* handle to console input, or 0 for process' console */
1327 int history_mode; /* whether we duplicate lines in history */
1328 int history_size; /* number of lines in history */
1329 int history_index; /* number of used lines in history */
1330 int edition_mode; /* index to the edition mode flavors */
1331 int input_cp; /* console input codepage */
1332 int output_cp; /* console output codepage */
1333 user_handle_t win; /* console window if backend supports it */
1334 VARARG(title,unicode_str); /* console title */
1338 /* appends a string to console's history */
1339 @REQ(append_console_input_history)
1340 obj_handle_t handle; /* handle to console input, or 0 for process' console */
1341 VARARG(line,unicode_str); /* line to add */
1345 /* appends a string to console's history */
1346 @REQ(get_console_input_history)
1347 obj_handle_t handle; /* handle to console input, or 0 for process' console */
1348 int index; /* index to get line from */
1350 int total; /* total length of line in Unicode chars */
1351 VARARG(line,unicode_str); /* line to add */
1355 /* creates a new screen buffer on process' console */
1356 @REQ(create_console_output)
1357 obj_handle_t handle_in; /* handle to console input, or 0 for process' console */
1358 unsigned int access; /* wanted access rights */
1359 unsigned int attributes; /* object attributes */
1360 unsigned int share; /* sharing credentials */
1361 int fd; /* for bare consoles, fd the screen-buffer is attached to */
1363 obj_handle_t handle_out; /* handle to the screen buffer */
1367 /* Set info about a console (output only) */
1368 @REQ(set_console_output_info)
1369 obj_handle_t handle; /* handle to the console */
1370 int mask; /* setting mask (see below) */
1371 short int cursor_size; /* size of cursor (percentage filled) */
1372 short int cursor_visible;/* cursor visibility flag */
1373 short int cursor_x; /* position of cursor (x, y) */
1375 short int width; /* width of the screen buffer */
1376 short int height; /* height of the screen buffer */
1377 short int attr; /* default attribute */
1378 short int win_left; /* window actually displayed by renderer */
1379 short int win_top; /* the rect area is expressed within the */
1380 short int win_right; /* boundaries of the screen buffer */
1381 short int win_bottom;
1382 short int max_width; /* maximum size (width x height) for the window */
1383 short int max_height;
1385 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_GEOM 0x01
1386 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_POS 0x02
1387 #define SET_CONSOLE_OUTPUT_INFO_SIZE 0x04
1388 #define SET_CONSOLE_OUTPUT_INFO_ATTR 0x08
1389 #define SET_CONSOLE_OUTPUT_INFO_DISPLAY_WINDOW 0x10
1390 #define SET_CONSOLE_OUTPUT_INFO_MAX_SIZE 0x20
1393 /* Get info about a console (output only) */
1394 @REQ(get_console_output_info)
1395 obj_handle_t handle; /* handle to the console */
1397 short int cursor_size; /* size of cursor (percentage filled) */
1398 short int cursor_visible;/* cursor visibility flag */
1399 short int cursor_x; /* position of cursor (x, y) */
1401 short int width; /* width of the screen buffer */
1402 short int height; /* height of the screen buffer */
1403 short int attr; /* default attribute */
1404 short int win_left; /* window actually displayed by renderer */
1405 short int win_top; /* the rect area is expressed within the */
1406 short int win_right; /* boundaries of the screen buffer */
1407 short int win_bottom;
1408 short int max_width; /* maximum size (width x height) for the window */
1409 short int max_height;
1412 /* Add input records to a console input queue */
1413 @REQ(write_console_input)
1414 obj_handle_t handle; /* handle to the console input */
1415 VARARG(rec,input_records); /* input records */
1417 int written; /* number of records written */
1421 /* Fetch input records from a console input queue */
1422 @REQ(read_console_input)
1423 obj_handle_t handle; /* handle to the console input */
1424 int flush; /* flush the retrieved records from the queue? */
1426 int read; /* number of records read */
1427 VARARG(rec,input_records); /* input records */
1431 /* write data (chars and/or attributes) in a screen buffer */
1432 @REQ(write_console_output)
1433 obj_handle_t handle; /* handle to the console output */
1434 int x; /* position where to start writing */
1436 int mode; /* char info (see below) */
1437 int wrap; /* wrap around at end of line? */
1438 VARARG(data,bytes); /* info to write */
1440 int written; /* number of char infos actually written */
1441 int width; /* width of screen buffer */
1442 int height; /* height of screen buffer */
1446 CHAR_INFO_MODE_TEXT, /* characters only */
1447 CHAR_INFO_MODE_ATTR, /* attributes only */
1448 CHAR_INFO_MODE_TEXTATTR, /* both characters and attributes */
1449 CHAR_INFO_MODE_TEXTSTDATTR /* characters but use standard attributes */
1453 /* fill a screen buffer with constant data (chars and/or attributes) */
1454 @REQ(fill_console_output)
1455 obj_handle_t handle; /* handle to the console output */
1456 int x; /* position where to start writing */
1458 int mode; /* char info mode */
1459 int count; /* number to write */
1460 int wrap; /* wrap around at end of line? */
1461 char_info_t data; /* data to write */
1463 int written; /* number of char infos actually written */
1467 /* read data (chars and/or attributes) from a screen buffer */
1468 @REQ(read_console_output)
1469 obj_handle_t handle; /* handle to the console output */
1470 int x; /* position (x,y) where to start reading */
1472 int mode; /* char info mode */
1473 int wrap; /* wrap around at end of line? */
1475 int width; /* width of screen buffer */
1476 int height; /* height of screen buffer */
1481 /* move a rect (of data) in screen buffer content */
1482 @REQ(move_console_output)
1483 obj_handle_t handle; /* handle to the console output */
1484 short int x_src; /* position (x, y) of rect to start moving from */
1486 short int x_dst; /* position (x, y) of rect to move to */
1488 short int w; /* size of the rect (width, height) to move */
1493 /* Sends a signal to a process group */
1494 @REQ(send_console_signal)
1495 int signal; /* the signal to send */
1496 process_id_t group_id; /* the group to send the signal to */
1500 /* enable directory change notifications */
1501 @REQ(read_directory_changes)
1502 unsigned int filter; /* notification filter */
1503 int subtree; /* watch the subtree? */
1504 int want_data; /* flag indicating whether change data should be collected */
1505 async_data_t async; /* async I/O parameters */
1510 obj_handle_t handle;
1512 VARARG(events,filesystem_event); /* collected filesystem events */
1516 /* Create a file mapping */
1517 @REQ(create_mapping)
1518 unsigned int access; /* wanted access rights */
1519 unsigned int attributes; /* object attributes */
1520 unsigned int protect; /* protection flags (see below) */
1521 mem_size_t size; /* mapping size */
1522 obj_handle_t file_handle; /* file handle */
1523 VARARG(objattr,object_attributes); /* object attributes */
1525 obj_handle_t handle; /* handle to the mapping */
1527 /* per-page protection flags */
1528 #define VPROT_READ 0x01
1529 #define VPROT_WRITE 0x02
1530 #define VPROT_EXEC 0x04
1531 #define VPROT_WRITECOPY 0x08
1532 #define VPROT_GUARD 0x10
1533 #define VPROT_NOCACHE 0x20
1534 #define VPROT_COMMITTED 0x40
1535 #define VPROT_WRITEWATCH 0x80
1536 /* per-mapping protection flags */
1537 #define VPROT_IMAGE 0x0100 /* mapping for an exe image */
1538 #define VPROT_SYSTEM 0x0200 /* system view (underlying mmap not under our control) */
1539 #define VPROT_VALLOC 0x0400 /* allocated by VirtualAlloc */
1540 #define VPROT_NOEXEC 0x0800 /* don't force exec permission */
1543 /* Open a mapping */
1545 unsigned int access; /* wanted access rights */
1546 unsigned int attributes; /* object attributes */
1547 obj_handle_t rootdir; /* root directory */
1548 VARARG(name,unicode_str); /* object name */
1550 obj_handle_t handle; /* handle to the mapping */
1554 /* Get information about a file mapping */
1555 @REQ(get_mapping_info)
1556 obj_handle_t handle; /* handle to the mapping */
1557 unsigned int access; /* wanted access rights */
1559 mem_size_t size; /* mapping size */
1560 int protect; /* protection flags */
1561 int header_size; /* header size (for VPROT_IMAGE mapping) */
1562 client_ptr_t base; /* default base addr (for VPROT_IMAGE mapping) */
1563 obj_handle_t mapping; /* duplicate mapping handle unless removable */
1564 obj_handle_t shared_file; /* shared mapping file handle */
1568 /* Get a range of committed pages in a file mapping */
1569 @REQ(get_mapping_committed_range)
1570 obj_handle_t handle; /* handle to the mapping */
1571 file_pos_t offset; /* starting offset (page-aligned, in bytes) */
1573 mem_size_t size; /* size of range starting at offset (page-aligned, in bytes) */
1574 int committed; /* whether it is a committed range */
1578 /* Add a range to the committed pages in a file mapping */
1579 @REQ(add_mapping_committed_range)
1580 obj_handle_t handle; /* handle to the mapping */
1581 file_pos_t offset; /* starting offset (page-aligned, in bytes) */
1582 mem_size_t size; /* size to set (page-aligned, in bytes) or 0 if only retrieving */
1586 #define SNAP_PROCESS 0x00000001
1587 #define SNAP_THREAD 0x00000002
1588 /* Create a snapshot */
1589 @REQ(create_snapshot)
1590 unsigned int attributes; /* object attributes */
1591 unsigned int flags; /* snapshot flags (SNAP_*) */
1593 obj_handle_t handle; /* handle to the snapshot */
1597 /* Get the next process from a snapshot */
1599 obj_handle_t handle; /* handle to the snapshot */
1600 int reset; /* reset snapshot position? */
1602 int count; /* process usage count */
1603 process_id_t pid; /* process id */
1604 process_id_t ppid; /* parent process id */
1605 int threads; /* number of threads */
1606 int priority; /* process priority */
1607 int handles; /* number of handles */
1608 int unix_pid; /* Unix pid */
1609 VARARG(filename,unicode_str); /* file name of main exe */
1613 /* Get the next thread from a snapshot */
1615 obj_handle_t handle; /* handle to the snapshot */
1616 int reset; /* reset snapshot position? */
1618 int count; /* thread usage count */
1619 process_id_t pid; /* process id */
1620 thread_id_t tid; /* thread id */
1621 int base_pri; /* base priority */
1622 int delta_pri; /* delta priority */
1626 /* Wait for a debug event */
1627 @REQ(wait_debug_event)
1628 int get_handle; /* should we alloc a handle for waiting? */
1630 process_id_t pid; /* process id */
1631 thread_id_t tid; /* thread id */
1632 obj_handle_t wait; /* wait handle if no event ready */
1633 VARARG(event,debug_event); /* debug event data */
1637 /* Queue an exception event */
1638 @REQ(queue_exception_event)
1639 int first; /* first chance exception? */
1640 unsigned int code; /* exception code */
1641 unsigned int flags; /* exception flags */
1642 client_ptr_t record; /* exception record */
1643 client_ptr_t address; /* exception address */
1644 data_size_t len; /* size of parameters */
1645 VARARG(params,uints64,len);/* exception parameters */
1646 VARARG(context,context); /* thread context */
1648 obj_handle_t handle; /* handle to the queued event */
1652 /* Retrieve the status of an exception event */
1653 @REQ(get_exception_status)
1654 obj_handle_t handle; /* handle to the queued event */
1656 VARARG(context,context); /* modified thread context */
1660 /* Send an output string to the debugger */
1661 @REQ(output_debug_string)
1662 data_size_t length; /* string length */
1663 client_ptr_t string; /* string to display (in debugged process address space) */
1667 /* Continue a debug event */
1668 @REQ(continue_debug_event)
1669 process_id_t pid; /* process id to continue */
1670 thread_id_t tid; /* thread id to continue */
1671 int status; /* continuation status */
1675 /* Start/stop debugging an existing process */
1677 process_id_t pid; /* id of the process to debug */
1678 int attach; /* 1=attaching / 0=detaching from the process */
1682 /* Simulate a breakpoint in a process */
1684 obj_handle_t handle; /* process handle */
1686 int self; /* was it the caller itself? */
1690 /* Set debugger kill on exit flag */
1691 @REQ(set_debugger_kill_on_exit)
1692 int kill_on_exit; /* 0=detach/1=kill debuggee when debugger dies */
1696 /* Read data from a process address space */
1697 @REQ(read_process_memory)
1698 obj_handle_t handle; /* process handle */
1699 client_ptr_t addr; /* addr to read from */
1701 VARARG(data,bytes); /* result data */
1705 /* Write data to a process address space */
1706 @REQ(write_process_memory)
1707 obj_handle_t handle; /* process handle */
1708 client_ptr_t addr; /* addr to write to */
1709 VARARG(data,bytes); /* data to write */
1713 /* Create a registry key */
1715 obj_handle_t parent; /* handle to the parent key */
1716 unsigned int access; /* desired access rights */
1717 unsigned int attributes; /* object attributes */
1718 unsigned int options; /* creation options */
1719 data_size_t namelen; /* length of key name in bytes */
1720 VARARG(name,unicode_str,namelen); /* key name */
1721 VARARG(class,unicode_str); /* class name */
1723 obj_handle_t hkey; /* handle to the created key */
1724 int created; /* has it been newly created? */
1727 /* Open a registry key */
1729 obj_handle_t parent; /* handle to the parent key */
1730 unsigned int access; /* desired access rights */
1731 unsigned int attributes; /* object attributes */
1732 VARARG(name,unicode_str); /* key name */
1734 obj_handle_t hkey; /* handle to the open key */
1738 /* Delete a registry key */
1740 obj_handle_t hkey; /* handle to the key */
1744 /* Flush a registry key */
1746 obj_handle_t hkey; /* handle to the key */
1750 /* Enumerate registry subkeys */
1752 obj_handle_t hkey; /* handle to registry key */
1753 int index; /* index of subkey (or -1 for current key) */
1754 int info_class; /* requested information class */
1756 int subkeys; /* number of subkeys */
1757 int max_subkey; /* longest subkey name */
1758 int max_class; /* longest class name */
1759 int values; /* number of values */
1760 int max_value; /* longest value name */
1761 int max_data; /* longest value data */
1762 timeout_t modif; /* last modification time */
1763 data_size_t total; /* total length needed for full name and class */
1764 data_size_t namelen; /* length of key name in bytes */
1765 VARARG(name,unicode_str,namelen); /* key name */
1766 VARARG(class,unicode_str); /* class name */
1770 /* Set a value of a registry key */
1772 obj_handle_t hkey; /* handle to registry key */
1773 int type; /* value type */
1774 data_size_t namelen; /* length of value name in bytes */
1775 VARARG(name,unicode_str,namelen); /* value name */
1776 VARARG(data,bytes); /* value data */
1780 /* Retrieve the value of a registry key */
1782 obj_handle_t hkey; /* handle to registry key */
1783 VARARG(name,unicode_str); /* value name */
1785 int type; /* value type */
1786 data_size_t total; /* total length needed for data */
1787 VARARG(data,bytes); /* value data */
1791 /* Enumerate a value of a registry key */
1792 @REQ(enum_key_value)
1793 obj_handle_t hkey; /* handle to registry key */
1794 int index; /* value index */
1795 int info_class; /* requested information class */
1797 int type; /* value type */
1798 data_size_t total; /* total length needed for full name and data */
1799 data_size_t namelen; /* length of value name in bytes */
1800 VARARG(name,unicode_str,namelen); /* value name */
1801 VARARG(data,bytes); /* value data */
1805 /* Delete a value of a registry key */
1806 @REQ(delete_key_value)
1807 obj_handle_t hkey; /* handle to registry key */
1808 VARARG(name,unicode_str); /* value name */
1812 /* Load a registry branch from a file */
1814 obj_handle_t hkey; /* root key to load to */
1815 obj_handle_t file; /* file to load from */
1816 VARARG(name,unicode_str); /* subkey name */
1820 /* UnLoad a registry branch from a file */
1821 @REQ(unload_registry)
1822 obj_handle_t hkey; /* root key to unload to */
1826 /* Save a registry branch to a file */
1828 obj_handle_t hkey; /* key to save */
1829 obj_handle_t file; /* file to save to */
1833 /* Add a registry key change notification */
1834 @REQ(set_registry_notification)
1835 obj_handle_t hkey; /* key to watch for changes */
1836 obj_handle_t event; /* event to set */
1837 int subtree; /* should we watch the whole subtree? */
1838 unsigned int filter; /* things to watch */
1842 /* Create a waitable timer */
1844 unsigned int access; /* wanted access rights */
1845 unsigned int attributes; /* object attributes */
1846 obj_handle_t rootdir; /* root directory */
1847 int manual; /* manual reset */
1848 VARARG(name,unicode_str); /* object name */
1850 obj_handle_t handle; /* handle to the timer */
1854 /* Open a waitable timer */
1856 unsigned int access; /* wanted access rights */
1857 unsigned int attributes; /* object attributes */
1858 obj_handle_t rootdir; /* root directory */
1859 VARARG(name,unicode_str); /* object name */
1861 obj_handle_t handle; /* handle to the timer */
1864 /* Set a waitable timer */
1866 obj_handle_t handle; /* handle to the timer */
1867 timeout_t expire; /* next expiration absolute time */
1868 client_ptr_t callback; /* callback function */
1869 client_ptr_t arg; /* callback argument */
1870 int period; /* timer period in ms */
1872 int signaled; /* was the timer signaled before this call ? */
1875 /* Cancel a waitable timer */
1877 obj_handle_t handle; /* handle to the timer */
1879 int signaled; /* was the timer signaled before this calltime ? */
1882 /* Get information on a waitable timer */
1883 @REQ(get_timer_info)
1884 obj_handle_t handle; /* handle to the timer */
1886 timeout_t when; /* absolute time when the timer next expires */
1887 int signaled; /* is the timer signaled? */
1891 /* Retrieve the current context of a thread */
1892 @REQ(get_thread_context)
1893 obj_handle_t handle; /* thread handle */
1894 unsigned int flags; /* context flags */
1895 int suspend; /* suspend the thread if needed */
1897 int self; /* was it a handle to the current thread? */
1898 VARARG(context,context); /* thread context */
1902 /* Set the current context of a thread */
1903 @REQ(set_thread_context)
1904 obj_handle_t handle; /* thread handle */
1905 int suspend; /* suspend the thread if needed */
1906 VARARG(context,context); /* thread context */
1908 int self; /* was it a handle to the current thread? */
1912 /* Fetch a selector entry for a thread */
1913 @REQ(get_selector_entry)
1914 obj_handle_t handle; /* thread handle */
1915 int entry; /* LDT entry */
1917 unsigned int base; /* selector base */
1918 unsigned int limit; /* selector limit */
1919 unsigned char flags; /* selector flags */
1925 obj_handle_t table; /* which table to add atom to */
1926 VARARG(name,unicode_str); /* atom name */
1928 atom_t atom; /* resulting atom */
1932 /* Delete an atom */
1934 obj_handle_t table; /* which table to delete atom from */
1935 atom_t atom; /* atom handle */
1941 obj_handle_t table; /* which table to find atom from */
1942 VARARG(name,unicode_str); /* atom name */
1944 atom_t atom; /* atom handle */
1948 /* Get information about an atom */
1949 @REQ(get_atom_information)
1950 obj_handle_t table; /* which table to find atom from */
1951 atom_t atom; /* atom handle */
1953 int count; /* atom lock count */
1954 int pinned; /* whether the atom has been pinned */
1955 data_size_t total; /* actual length of atom name */
1956 VARARG(name,unicode_str); /* atom name */
1960 /* Set information about an atom */
1961 @REQ(set_atom_information)
1962 obj_handle_t table; /* which table to find atom from */
1963 atom_t atom; /* atom handle */
1964 int pinned; /* whether to bump atom information */
1968 /* Empty an atom table */
1969 @REQ(empty_atom_table)
1970 obj_handle_t table; /* which table to find atom from */
1971 int if_pinned; /* whether to delete pinned atoms */
1975 /* Init an atom table */
1976 @REQ(init_atom_table)
1977 int entries; /* number of entries (only for local) */
1979 obj_handle_t table; /* handle to the atom table */
1983 /* Get the message queue of the current thread */
1986 obj_handle_t handle; /* handle to the queue */
1990 /* Set the file descriptor associated to the current thread queue */
1992 obj_handle_t handle; /* handle to the file descriptor */
1996 /* Set the current message queue wakeup mask */
1997 @REQ(set_queue_mask)
1998 unsigned int wake_mask; /* wakeup bits mask */
1999 unsigned int changed_mask; /* changed bits mask */
2000 int skip_wait; /* will we skip waiting if signaled? */
2002 unsigned int wake_bits; /* current wake bits */
2003 unsigned int changed_bits; /* current changed bits */
2007 /* Get the current message queue status */
2008 @REQ(get_queue_status)
2009 int clear; /* should we clear the change bits? */
2011 unsigned int wake_bits; /* wake bits */
2012 unsigned int changed_bits; /* changed bits since last time */
2016 /* Retrieve the process idle event */
2017 @REQ(get_process_idle_event)
2018 obj_handle_t handle; /* process handle */
2020 obj_handle_t event; /* handle to idle event */
2024 /* Send a message to a thread queue */
2026 thread_id_t id; /* thread id */
2027 int type; /* message type (see below) */
2028 int flags; /* message flags (see below) */
2029 user_handle_t win; /* window handle */
2030 unsigned int msg; /* message code */
2031 lparam_t wparam; /* parameters */
2032 lparam_t lparam; /* parameters */
2033 timeout_t timeout; /* timeout for reply */
2034 VARARG(data,message_data); /* message data for sent messages */
2037 @REQ(post_quit_message)
2038 int exit_code; /* exit code to return */
2043 MSG_ASCII, /* Ascii message (from SendMessageA) */
2044 MSG_UNICODE, /* Unicode message (from SendMessageW) */
2045 MSG_NOTIFY, /* notify message (from SendNotifyMessageW), always Unicode */
2046 MSG_CALLBACK, /* callback message (from SendMessageCallbackW), always Unicode */
2047 MSG_CALLBACK_RESULT,/* result of a callback message */
2048 MSG_OTHER_PROCESS, /* sent from other process, may include vararg data, always Unicode */
2049 MSG_POSTED, /* posted message (from PostMessageW), always Unicode */
2050 MSG_HARDWARE, /* hardware message */
2051 MSG_WINEVENT, /* winevent message */
2052 MSG_HOOK_LL /* low-level hardware hook */
2054 #define SEND_MSG_ABORT_IF_HUNG 0x01
2057 /* Send a hardware message to a thread queue */
2058 @REQ(send_hardware_message)
2059 user_handle_t win; /* window handle */
2060 hw_input_t input; /* input data */
2061 unsigned int flags; /* flags (see below) */
2063 int wait; /* do we need to wait for a reply? */
2064 int prev_x; /* previous cursor position */
2066 int new_x; /* new cursor position */
2068 VARARG(keystate,bytes); /* global state array for all the keys */
2070 #define SEND_HWMSG_INJECTED 0x01
2073 /* Get a message from the current queue */
2075 unsigned int flags; /* PM_* flags */
2076 user_handle_t get_win; /* window handle to get */
2077 unsigned int get_first; /* first message code to get */
2078 unsigned int get_last; /* last message code to get */
2079 unsigned int hw_id; /* id of the previous hardware message (or 0) */
2080 unsigned int wake_mask; /* wakeup bits mask */
2081 unsigned int changed_mask; /* changed bits mask */
2083 user_handle_t win; /* window handle */
2084 unsigned int msg; /* message code */
2085 lparam_t wparam; /* parameters */
2086 lparam_t lparam; /* parameters */
2087 int type; /* message type */
2088 unsigned int time; /* message time */
2089 unsigned int active_hooks; /* active hooks bitmap */
2090 data_size_t total; /* total size of extra data */
2091 VARARG(data,message_data); /* message data for sent messages */
2095 /* Reply to a sent message */
2097 int remove; /* should we remove the message? */
2098 lparam_t result; /* message result */
2099 VARARG(data,bytes); /* message data for sent messages */
2103 /* Accept the current hardware message */
2104 @REQ(accept_hardware_message)
2105 unsigned int hw_id; /* id of the hardware message */
2106 int remove; /* should we remove the message? */
2107 user_handle_t new_win; /* new destination window for current message */
2111 /* Retrieve the reply for the last message sent */
2112 @REQ(get_message_reply)
2113 int cancel; /* cancel message if not ready? */
2115 lparam_t result; /* message result */
2116 VARARG(data,bytes); /* message data for sent messages */
2120 /* Set a window timer */
2122 user_handle_t win; /* window handle */
2123 unsigned int msg; /* message to post */
2124 unsigned int rate; /* timer rate in ms */
2125 lparam_t id; /* timer id */
2126 lparam_t lparam; /* message lparam (callback proc) */
2128 lparam_t id; /* timer id */
2132 /* Kill a window timer */
2133 @REQ(kill_win_timer)
2134 user_handle_t win; /* window handle */
2135 lparam_t id; /* timer id */
2136 unsigned int msg; /* message to post */
2140 /* check if the thread owning the window is hung */
2141 @REQ(is_window_hung)
2142 user_handle_t win; /* window handle */
2148 /* Retrieve info about a serial port */
2149 @REQ(get_serial_info)
2150 obj_handle_t handle; /* handle to comm port */
2152 unsigned int readinterval;
2153 unsigned int readconst;
2154 unsigned int readmult;
2155 unsigned int writeconst;
2156 unsigned int writemult;
2157 unsigned int eventmask;
2161 /* Set info about a serial port */
2162 @REQ(set_serial_info)
2163 obj_handle_t handle; /* handle to comm port */
2164 int flags; /* bitmask to set values (see below) */
2165 unsigned int readinterval;
2166 unsigned int readconst;
2167 unsigned int readmult;
2168 unsigned int writeconst;
2169 unsigned int writemult;
2170 unsigned int eventmask;
2172 #define SERIALINFO_SET_TIMEOUTS 0x01
2173 #define SERIALINFO_SET_MASK 0x02
2176 /* Create an async I/O */
2177 @REQ(register_async)
2178 int type; /* type of queue to look after */
2179 async_data_t async; /* async I/O parameters */
2180 int count; /* count - usually # of bytes to be read/written */
2182 #define ASYNC_TYPE_READ 0x01
2183 #define ASYNC_TYPE_WRITE 0x02
2184 #define ASYNC_TYPE_WAIT 0x03
2187 /* Cancel all async op on a fd */
2189 obj_handle_t handle; /* handle to comm port, socket or file */
2190 client_ptr_t iosb; /* I/O status block (NULL=all) */
2191 int only_thread; /* cancel matching this thread */
2195 /* Perform an ioctl on a file */
2197 ioctl_code_t code; /* ioctl code */
2198 async_data_t async; /* async I/O parameters */
2199 int blocking; /* whether it's a blocking ioctl */
2200 VARARG(in_data,bytes); /* ioctl input data */
2202 obj_handle_t wait; /* handle to wait on for blocking ioctl */
2203 unsigned int options; /* device open options */
2204 VARARG(out_data,bytes); /* ioctl output data */
2208 /* Retrieve results of an async ioctl */
2209 @REQ(get_ioctl_result)
2210 obj_handle_t handle; /* handle to the device */
2211 client_ptr_t user_arg; /* user arg used to identify the request */
2213 VARARG(out_data,bytes); /* ioctl output data */
2217 /* Create a named pipe */
2218 @REQ(create_named_pipe)
2219 unsigned int access;
2220 unsigned int attributes; /* object attributes */
2221 obj_handle_t rootdir; /* root directory */
2222 unsigned int options;
2223 unsigned int sharing;
2224 unsigned int maxinstances;
2225 unsigned int outsize;
2226 unsigned int insize;
2229 VARARG(name,unicode_str); /* pipe name */
2231 obj_handle_t handle; /* handle to the pipe */
2234 /* flags in create_named_pipe and get_named_pipe_info */
2235 #define NAMED_PIPE_MESSAGE_STREAM_WRITE 0x0001
2236 #define NAMED_PIPE_MESSAGE_STREAM_READ 0x0002
2237 #define NAMED_PIPE_NONBLOCKING_MODE 0x0004
2238 #define NAMED_PIPE_SERVER_END 0x8000
2241 @REQ(get_named_pipe_info)
2242 obj_handle_t handle;
2245 unsigned int sharing;
2246 unsigned int maxinstances;
2247 unsigned int instances;
2248 unsigned int outsize;
2249 unsigned int insize;
2253 /* Create a window */
2255 user_handle_t parent; /* parent window */
2256 user_handle_t owner; /* owner window */
2257 atom_t atom; /* class atom */
2258 mod_handle_t instance; /* module instance */
2259 VARARG(class,unicode_str); /* class name */
2261 user_handle_t handle; /* created window */
2262 user_handle_t parent; /* full handle of parent */
2263 user_handle_t owner; /* full handle of owner */
2264 int extra; /* number of extra bytes */
2265 client_ptr_t class_ptr; /* pointer to class in client address space */
2269 /* Destroy a window */
2270 @REQ(destroy_window)
2271 user_handle_t handle; /* handle to the window */
2275 /* Retrieve the desktop window for the current thread */
2276 @REQ(get_desktop_window)
2277 int force; /* force creation if it doesn't exist */
2279 user_handle_t top_window; /* handle to the desktop window */
2280 user_handle_t msg_window; /* handle to the top-level HWND_MESSAGE parent */
2284 /* Set a window owner */
2285 @REQ(set_window_owner)
2286 user_handle_t handle; /* handle to the window */
2287 user_handle_t owner; /* new owner */
2289 user_handle_t full_owner; /* full handle of new owner */
2290 user_handle_t prev_owner; /* full handle of previous owner */
2294 /* Get information from a window handle */
2295 @REQ(get_window_info)
2296 user_handle_t handle; /* handle to the window */
2298 user_handle_t full_handle; /* full 32-bit handle */
2299 user_handle_t last_active; /* last active popup */
2300 process_id_t pid; /* process owning the window */
2301 thread_id_t tid; /* thread owning the window */
2302 atom_t atom; /* class atom */
2303 int is_unicode; /* ANSI or unicode */
2307 /* Set some information in a window */
2308 @REQ(set_window_info)
2309 unsigned short flags; /* flags for fields to set (see below) */
2310 short int is_unicode; /* ANSI or unicode */
2311 user_handle_t handle; /* handle to the window */
2312 unsigned int style; /* window style */
2313 unsigned int ex_style; /* window extended style */
2314 unsigned int id; /* window id */
2315 mod_handle_t instance; /* creator instance */
2316 lparam_t user_data; /* user-specific data */
2317 int extra_offset; /* offset to set in extra bytes */
2318 data_size_t extra_size; /* size to set in extra bytes */
2319 lparam_t extra_value; /* value to set in extra bytes */
2321 unsigned int old_style; /* old window style */
2322 unsigned int old_ex_style; /* old window extended style */
2323 mod_handle_t old_instance; /* old creator instance */
2324 lparam_t old_user_data; /* old user-specific data */
2325 lparam_t old_extra_value; /* old value in extra bytes */
2326 unsigned int old_id; /* old window id */
2328 #define SET_WIN_STYLE 0x01
2329 #define SET_WIN_EXSTYLE 0x02
2330 #define SET_WIN_ID 0x04
2331 #define SET_WIN_INSTANCE 0x08
2332 #define SET_WIN_USERDATA 0x10
2333 #define SET_WIN_EXTRA 0x20
2334 #define SET_WIN_UNICODE 0x40
2337 /* Set the parent of a window */
2339 user_handle_t handle; /* handle to the window */
2340 user_handle_t parent; /* handle to the parent */
2342 user_handle_t old_parent; /* old parent window */
2343 user_handle_t full_parent; /* full handle of new parent */
2347 /* Get a list of the window parents, up to the root of the tree */
2348 @REQ(get_window_parents)
2349 user_handle_t handle; /* handle to the window */
2351 int count; /* total count of parents */
2352 VARARG(parents,user_handles); /* parent handles */
2356 /* Get a list of the window children */
2357 @REQ(get_window_children)
2358 obj_handle_t desktop; /* handle to desktop */
2359 user_handle_t parent; /* parent window */
2360 atom_t atom; /* class atom for the listed children */
2361 thread_id_t tid; /* thread owning the listed children */
2362 VARARG(class,unicode_str); /* class name */
2364 int count; /* total count of children */
2365 VARARG(children,user_handles); /* children handles */
2369 /* Get a list of the window children that contain a given point */
2370 @REQ(get_window_children_from_point)
2371 user_handle_t parent; /* parent window */
2372 int x; /* point in parent coordinates */
2375 int count; /* total count of children */
2376 VARARG(children,user_handles); /* children handles */
2380 /* Get window tree information from a window handle */
2381 @REQ(get_window_tree)
2382 user_handle_t handle; /* handle to the window */
2384 user_handle_t parent; /* parent window */
2385 user_handle_t owner; /* owner window */
2386 user_handle_t next_sibling; /* next sibling in Z-order */
2387 user_handle_t prev_sibling; /* prev sibling in Z-order */
2388 user_handle_t first_sibling; /* first sibling in Z-order */
2389 user_handle_t last_sibling; /* last sibling in Z-order */
2390 user_handle_t first_child; /* first child */
2391 user_handle_t last_child; /* last child */
2394 /* Set the position and Z order of a window */
2395 @REQ(set_window_pos)
2396 unsigned short swp_flags; /* SWP_* flags */
2397 unsigned short paint_flags; /* paint flags (see below) */
2398 user_handle_t handle; /* handle to the window */
2399 user_handle_t previous; /* previous window in Z order */
2400 rectangle_t window; /* window rectangle (in parent coords) */
2401 rectangle_t client; /* client rectangle (in parent coords) */
2402 VARARG(valid,rectangles); /* valid rectangles from WM_NCCALCSIZE (in parent coords) */
2404 unsigned int new_style; /* new window style */
2405 unsigned int new_ex_style; /* new window extended style */
2406 user_handle_t surface_win; /* window that needs a surface update */
2408 #define SET_WINPOS_PAINT_SURFACE 0x01 /* window has a paintable surface */
2409 #define SET_WINPOS_PIXEL_FORMAT 0x02 /* window has a custom pixel format */
2411 /* Get the window and client rectangles of a window */
2412 @REQ(get_window_rectangles)
2413 user_handle_t handle; /* handle to the window */
2414 int relative; /* coords relative to (see below) */
2416 rectangle_t window; /* window rectangle */
2417 rectangle_t visible; /* visible part of the window rectangle */
2418 rectangle_t client; /* client rectangle */
2420 enum coords_relative
2422 COORDS_CLIENT, /* relative to client area */
2423 COORDS_WINDOW, /* relative to whole window area */
2424 COORDS_PARENT, /* relative to parent's client area */
2425 COORDS_SCREEN /* relative to screen origin */
2429 /* Get the window text */
2430 @REQ(get_window_text)
2431 user_handle_t handle; /* handle to the window */
2433 VARARG(text,unicode_str); /* window text */
2437 /* Set the window text */
2438 @REQ(set_window_text)
2439 user_handle_t handle; /* handle to the window */
2440 VARARG(text,unicode_str); /* window text */
2444 /* Get the coordinates offset between two windows */
2445 @REQ(get_windows_offset)
2446 user_handle_t from; /* handle to the first window */
2447 user_handle_t to; /* handle to the second window */
2449 int x; /* x coordinate offset */
2450 int y; /* y coordinate offset */
2451 int mirror; /* whether to mirror the x coordinate */
2455 /* Get the visible region of a window */
2456 @REQ(get_visible_region)
2457 user_handle_t window; /* handle to the window */
2458 unsigned int flags; /* DCX flags */
2460 user_handle_t top_win; /* top window to clip against */
2461 rectangle_t top_rect; /* top window visible rect with screen coords */
2462 rectangle_t win_rect; /* window rect in screen coords */
2463 data_size_t total_size; /* total size of the resulting region */
2464 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2468 /* Get the visible surface region of a window */
2469 @REQ(get_surface_region)
2470 user_handle_t window; /* handle to the window */
2472 rectangle_t visible_rect; /* window visible rect in screen coords */
2473 data_size_t total_size; /* total size of the resulting region */
2474 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2478 /* Get the window region */
2479 @REQ(get_window_region)
2480 user_handle_t window; /* handle to the window */
2482 data_size_t total_size; /* total size of the resulting region */
2483 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2487 /* Set the window region */
2488 @REQ(set_window_region)
2489 user_handle_t window; /* handle to the window */
2490 int redraw; /* redraw the window? */
2491 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2495 /* Get the window update region */
2496 @REQ(get_update_region)
2497 user_handle_t window; /* handle to the window */
2498 user_handle_t from_child; /* child to start searching from */
2499 unsigned int flags; /* update flags (see below) */
2501 user_handle_t child; /* child to repaint (or window itself) */
2502 unsigned int flags; /* resulting update flags (see below) */
2503 data_size_t total_size; /* total size of the resulting region */
2504 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2506 #define UPDATE_NONCLIENT 0x01 /* get region for repainting non-client area */
2507 #define UPDATE_ERASE 0x02 /* get region for erasing client area */
2508 #define UPDATE_PAINT 0x04 /* get region for painting client area */
2509 #define UPDATE_INTERNALPAINT 0x08 /* get region if internal paint is pending */
2510 #define UPDATE_ALLCHILDREN 0x10 /* force repaint of all children */
2511 #define UPDATE_NOCHILDREN 0x20 /* don't try to repaint any children */
2512 #define UPDATE_NOREGION 0x40 /* don't return a region, only the flags */
2513 #define UPDATE_DELAYED_ERASE 0x80 /* still needs erase after BeginPaint */
2516 /* Update the z order of a window so that a given rectangle is fully visible */
2517 @REQ(update_window_zorder)
2518 user_handle_t window; /* handle to the window */
2519 rectangle_t rect; /* rectangle that must be visible (in client coords) */
2523 /* Mark parts of a window as needing a redraw */
2525 user_handle_t window; /* handle to the window */
2526 unsigned int flags; /* RDW_* flags */
2527 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2531 /* Set a window property */
2532 @REQ(set_window_property)
2533 user_handle_t window; /* handle to the window */
2534 lparam_t data; /* data to store */
2535 atom_t atom; /* property atom (if no name specified) */
2536 VARARG(name,unicode_str); /* property name */
2540 /* Remove a window property */
2541 @REQ(remove_window_property)
2542 user_handle_t window; /* handle to the window */
2543 atom_t atom; /* property atom (if no name specified) */
2544 VARARG(name,unicode_str); /* property name */
2546 lparam_t data; /* data stored in property */
2550 /* Get a window property */
2551 @REQ(get_window_property)
2552 user_handle_t window; /* handle to the window */
2553 atom_t atom; /* property atom (if no name specified) */
2554 VARARG(name,unicode_str); /* property name */
2556 lparam_t data; /* data stored in property */
2560 /* Get the list of properties of a window */
2561 @REQ(get_window_properties)
2562 user_handle_t window; /* handle to the window */
2564 int total; /* total number of properties */
2565 VARARG(props,properties); /* list of properties */
2569 /* Create a window station */
2570 @REQ(create_winstation)
2571 unsigned int flags; /* window station flags */
2572 unsigned int access; /* wanted access rights */
2573 unsigned int attributes; /* object attributes */
2574 VARARG(name,unicode_str); /* object name */
2576 obj_handle_t handle; /* handle to the window station */
2580 /* Open a handle to a window station */
2581 @REQ(open_winstation)
2582 unsigned int access; /* wanted access rights */
2583 unsigned int attributes; /* object attributes */
2584 VARARG(name,unicode_str); /* object name */
2586 obj_handle_t handle; /* handle to the window station */
2590 /* Close a window station */
2591 @REQ(close_winstation)
2592 obj_handle_t handle; /* handle to the window station */
2596 /* Get the process current window station */
2597 @REQ(get_process_winstation)
2599 obj_handle_t handle; /* handle to the window station */
2603 /* Set the process current window station */
2604 @REQ(set_process_winstation)
2605 obj_handle_t handle; /* handle to the window station */
2609 /* Enumerate window stations */
2610 @REQ(enum_winstation)
2611 unsigned int index; /* current index */
2613 unsigned int next; /* next index */
2614 VARARG(name,unicode_str); /* window station name */
2618 /* Create a desktop */
2619 @REQ(create_desktop)
2620 unsigned int flags; /* desktop flags */
2621 unsigned int access; /* wanted access rights */
2622 unsigned int attributes; /* object attributes */
2623 VARARG(name,unicode_str); /* object name */
2625 obj_handle_t handle; /* handle to the desktop */
2629 /* Open a handle to a desktop */
2631 obj_handle_t winsta; /* window station to open (null allowed) */
2632 unsigned int flags; /* desktop flags */
2633 unsigned int access; /* wanted access rights */
2634 unsigned int attributes; /* object attributes */
2635 VARARG(name,unicode_str); /* object name */
2637 obj_handle_t handle; /* handle to the desktop */
2641 /* Close a desktop */
2643 obj_handle_t handle; /* handle to the desktop */
2647 /* Get the thread current desktop */
2648 @REQ(get_thread_desktop)
2649 thread_id_t tid; /* thread id */
2651 obj_handle_t handle; /* handle to the desktop */
2655 /* Set the thread current desktop */
2656 @REQ(set_thread_desktop)
2657 obj_handle_t handle; /* handle to the desktop */
2661 /* Enumerate desktops */
2663 obj_handle_t winstation; /* handle to the window station */
2664 unsigned int index; /* current index */
2666 unsigned int next; /* next index */
2667 VARARG(name,unicode_str); /* window station name */
2671 /* Get/set information about a user object (window station or desktop) */
2672 @REQ(set_user_object_info)
2673 obj_handle_t handle; /* handle to the object */
2674 unsigned int flags; /* information to set */
2675 unsigned int obj_flags; /* new object flags */
2677 int is_desktop; /* is object a desktop? */
2678 unsigned int old_obj_flags; /* old object flags */
2679 VARARG(name,unicode_str); /* object name */
2681 #define SET_USER_OBJECT_FLAGS 1
2684 /* Register a hotkey */
2685 @REQ(register_hotkey)
2686 user_handle_t window; /* handle to the window */
2687 int id; /* hotkey identifier */
2688 unsigned int flags; /* modifier keys */
2689 unsigned int vkey; /* virtual key code */
2691 int replaced; /* did we replace an existing hotkey? */
2692 unsigned int flags; /* flags of replaced hotkey */
2693 unsigned int vkey; /* virtual key code of replaced hotkey */
2697 /* Unregister a hotkey */
2698 @REQ(unregister_hotkey)
2699 user_handle_t window; /* handle to the window */
2700 int id; /* hotkey identifier */
2702 unsigned int flags; /* flags of removed hotkey */
2703 unsigned int vkey; /* virtual key code of removed hotkey */
2707 /* Attach (or detach) thread inputs */
2708 @REQ(attach_thread_input)
2709 thread_id_t tid_from; /* thread to be attached */
2710 thread_id_t tid_to; /* thread to which tid_from should be attached */
2711 int attach; /* is it an attach? */
2715 /* Get input data for a given thread */
2716 @REQ(get_thread_input)
2717 thread_id_t tid; /* id of thread */
2719 user_handle_t focus; /* handle to the focus window */
2720 user_handle_t capture; /* handle to the capture window */
2721 user_handle_t active; /* handle to the active window */
2722 user_handle_t foreground; /* handle to the global foreground window */
2723 user_handle_t menu_owner; /* handle to the menu owner */
2724 user_handle_t move_size; /* handle to the moving/resizing window */
2725 user_handle_t caret; /* handle to the caret window */
2726 user_handle_t cursor; /* handle to the cursor */
2727 int show_count; /* cursor show count */
2728 rectangle_t rect; /* caret rectangle */
2732 /* Get the time of the last input event */
2733 @REQ(get_last_input_time)
2739 /* Retrieve queue keyboard state for a given thread */
2741 thread_id_t tid; /* id of thread */
2742 int key; /* optional key code or -1 */
2744 unsigned char state; /* state of specified key */
2745 VARARG(keystate,bytes); /* state array for all the keys */
2748 /* Set queue keyboard state for a given thread */
2750 thread_id_t tid; /* id of thread */
2751 int async; /* whether to change the async state too */
2752 VARARG(keystate,bytes); /* state array for all the keys */
2755 /* Set the system foreground window */
2756 @REQ(set_foreground_window)
2757 user_handle_t handle; /* handle to the foreground window */
2759 user_handle_t previous; /* handle to the previous foreground window */
2760 int send_msg_old; /* whether we have to send a msg to the old window */
2761 int send_msg_new; /* whether we have to send a msg to the new window */
2764 /* Set the current thread focus window */
2765 @REQ(set_focus_window)
2766 user_handle_t handle; /* handle to the focus window */
2768 user_handle_t previous; /* handle to the previous focus window */
2771 /* Set the current thread active window */
2772 @REQ(set_active_window)
2773 user_handle_t handle; /* handle to the active window */
2775 user_handle_t previous; /* handle to the previous active window */
2778 /* Set the current thread capture window */
2779 @REQ(set_capture_window)
2780 user_handle_t handle; /* handle to the capture window */
2781 unsigned int flags; /* capture flags (see below) */
2783 user_handle_t previous; /* handle to the previous capture window */
2784 user_handle_t full_handle; /* full 32-bit handle of new capture window */
2786 #define CAPTURE_MENU 0x01 /* capture is for a menu */
2787 #define CAPTURE_MOVESIZE 0x02 /* capture is for moving/resizing */
2790 /* Set the current thread caret window */
2791 @REQ(set_caret_window)
2792 user_handle_t handle; /* handle to the caret window */
2793 int width; /* caret width */
2794 int height; /* caret height */
2796 user_handle_t previous; /* handle to the previous caret window */
2797 rectangle_t old_rect; /* previous caret rectangle */
2798 int old_hide; /* previous hide count */
2799 int old_state; /* previous caret state (1=on, 0=off) */
2803 /* Set the current thread caret information */
2804 @REQ(set_caret_info)
2805 unsigned int flags; /* caret flags (see below) */
2806 user_handle_t handle; /* handle to the caret window */
2807 int x; /* caret x position */
2808 int y; /* caret y position */
2809 int hide; /* increment for hide count (can be negative to show it) */
2810 int state; /* caret state (1=on, 0=off, -1=toggle current state) */
2812 user_handle_t full_handle; /* handle to the current caret window */
2813 rectangle_t old_rect; /* previous caret rectangle */
2814 int old_hide; /* previous hide count */
2815 int old_state; /* previous caret state (1=on, 0=off) */
2817 #define SET_CARET_POS 0x01 /* set the caret position from x,y */
2818 #define SET_CARET_HIDE 0x02 /* increment the caret hide count */
2819 #define SET_CARET_STATE 0x04 /* set the caret on/off state */
2822 /* Set a window hook */
2824 int id; /* id of the hook */
2825 process_id_t pid; /* id of process to set the hook into */
2826 thread_id_t tid; /* id of thread to set the hook into */
2829 client_ptr_t proc; /* hook procedure */
2831 int unicode; /* is it a unicode hook? */
2832 VARARG(module,unicode_str); /* module name */
2834 user_handle_t handle; /* handle to the hook */
2835 unsigned int active_hooks; /* active hooks bitmap */
2839 /* Remove a window hook */
2841 user_handle_t handle; /* handle to the hook */
2842 client_ptr_t proc; /* hook procedure if handle is 0 */
2843 int id; /* id of the hook if handle is 0 */
2845 unsigned int active_hooks; /* active hooks bitmap */
2849 /* Start calling a hook chain */
2850 @REQ(start_hook_chain)
2851 int id; /* id of the hook */
2852 int event; /* signalled event */
2853 user_handle_t window; /* handle to the event window */
2854 int object_id; /* object id for out of context winevent */
2855 int child_id; /* child id for out of context winevent */
2857 user_handle_t handle; /* handle to the next hook */
2858 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2859 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2860 int unicode; /* is it a unicode hook? */
2861 client_ptr_t proc; /* hook procedure */
2862 unsigned int active_hooks; /* active hooks bitmap */
2863 VARARG(module,unicode_str); /* module name */
2867 /* Finished calling a hook chain */
2868 @REQ(finish_hook_chain)
2869 int id; /* id of the hook */
2873 /* Get the hook information */
2875 user_handle_t handle; /* handle to the current hook */
2876 int get_next; /* do we want info about current or next hook? */
2877 int event; /* signalled event */
2878 user_handle_t window; /* handle to the event window */
2879 int object_id; /* object id for out of context winevent */
2880 int child_id; /* child id for out of context winevent */
2882 user_handle_t handle; /* handle to the hook */
2883 int id; /* id of the hook */
2884 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2885 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2886 client_ptr_t proc; /* hook procedure */
2887 int unicode; /* is it a unicode hook? */
2888 VARARG(module,unicode_str); /* module name */
2892 /* Create a window class */
2894 int local; /* is it a local class? */
2895 atom_t atom; /* class atom */
2896 unsigned int style; /* class style */
2897 mod_handle_t instance; /* module instance */
2898 int extra; /* number of extra class bytes */
2899 int win_extra; /* number of window extra bytes */
2900 client_ptr_t client_ptr; /* pointer to class in client address space */
2901 VARARG(name,unicode_str); /* class name */
2903 atom_t atom; /* resulting class atom */
2907 /* Destroy a window class */
2909 atom_t atom; /* class atom */
2910 mod_handle_t instance; /* module instance */
2911 VARARG(name,unicode_str); /* class name */
2913 client_ptr_t client_ptr; /* pointer to class in client address space */
2917 /* Set some information in a class */
2918 @REQ(set_class_info)
2919 user_handle_t window; /* handle to the window */
2920 unsigned int flags; /* flags for info to set (see below) */
2921 atom_t atom; /* class atom */
2922 unsigned int style; /* class style */
2923 int win_extra; /* number of window extra bytes */
2924 mod_handle_t instance; /* module instance */
2925 int extra_offset; /* offset to set in extra bytes */
2926 data_size_t extra_size; /* size to set in extra bytes */
2927 lparam_t extra_value; /* value to set in extra bytes */
2929 atom_t old_atom; /* previous class atom */
2930 unsigned int old_style; /* previous class style */
2931 int old_extra; /* previous number of class extra bytes */
2932 int old_win_extra; /* previous number of window extra bytes */
2933 mod_handle_t old_instance; /* previous module instance */
2934 lparam_t old_extra_value; /* old value in extra bytes */
2936 #define SET_CLASS_ATOM 0x0001
2937 #define SET_CLASS_STYLE 0x0002
2938 #define SET_CLASS_WINEXTRA 0x0004
2939 #define SET_CLASS_INSTANCE 0x0008
2940 #define SET_CLASS_EXTRA 0x0010
2943 /* Set/get clipboard information */
2944 @REQ(set_clipboard_info)
2945 unsigned int flags; /* flags for fields to set (see below) */
2946 user_handle_t clipboard; /* clipboard window */
2947 user_handle_t owner; /* clipboard owner */
2948 user_handle_t viewer; /* first clipboard viewer */
2949 unsigned int seqno; /* change sequence number */
2951 unsigned int flags; /* status flags (see below) */
2952 user_handle_t old_clipboard; /* old clipboard window */
2953 user_handle_t old_owner; /* old clipboard owner */
2954 user_handle_t old_viewer; /* old clipboard viewer */
2955 unsigned int seqno; /* current sequence number */
2958 #define SET_CB_OPEN 0x001
2959 #define SET_CB_OWNER 0x002
2960 #define SET_CB_VIEWER 0x004
2961 #define SET_CB_SEQNO 0x008
2962 #define SET_CB_RELOWNER 0x010
2963 #define SET_CB_CLOSE 0x020
2964 #define CB_OPEN 0x040
2965 #define CB_OWNER 0x080
2966 #define CB_PROCESS 0x100
2969 /* Open a security token */
2971 obj_handle_t handle; /* handle to the thread or process */
2972 unsigned int access; /* access rights to the new token */
2973 unsigned int attributes;/* object attributes */
2974 unsigned int flags; /* flags (see below) */
2976 obj_handle_t token; /* handle to the token */
2978 #define OPEN_TOKEN_THREAD 1
2979 #define OPEN_TOKEN_AS_SELF 2
2982 /* Set/get the global windows */
2983 @REQ(set_global_windows)
2984 unsigned int flags; /* flags for fields to set (see below) */
2985 user_handle_t shell_window; /* handle to the new shell window */
2986 user_handle_t shell_listview; /* handle to the new shell listview window */
2987 user_handle_t progman_window; /* handle to the new program manager window */
2988 user_handle_t taskman_window; /* handle to the new task manager window */
2990 user_handle_t old_shell_window; /* handle to the shell window */
2991 user_handle_t old_shell_listview; /* handle to the shell listview window */
2992 user_handle_t old_progman_window; /* handle to the new program manager window */
2993 user_handle_t old_taskman_window; /* handle to the new task manager window */
2995 #define SET_GLOBAL_SHELL_WINDOWS 0x01 /* set both main shell and listview windows */
2996 #define SET_GLOBAL_PROGMAN_WINDOW 0x02
2997 #define SET_GLOBAL_TASKMAN_WINDOW 0x04
2999 /* Adjust the privileges held by a token */
3000 @REQ(adjust_token_privileges)
3001 obj_handle_t handle; /* handle to the token */
3002 int disable_all; /* disable all privileges? */
3003 int get_modified_state; /* get modified privileges? */
3004 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to enable/disable/remove */
3006 unsigned int len; /* total length in bytes required to store token privileges */
3007 VARARG(privileges,LUID_AND_ATTRIBUTES); /* modified privileges */
3010 /* Retrieves the set of privileges held by or available to a token */
3011 @REQ(get_token_privileges)
3012 obj_handle_t handle; /* handle to the token */
3014 unsigned int len; /* total length in bytes required to store token privileges */
3015 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
3018 /* Check the token has the required privileges */
3019 @REQ(check_token_privileges)
3020 obj_handle_t handle; /* handle to the token */
3021 int all_required; /* are all the privileges required for the check to succeed? */
3022 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to check */
3024 int has_privileges; /* does the token have the required privileges? */
3025 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
3028 @REQ(duplicate_token)
3029 obj_handle_t handle; /* handle to the token to duplicate */
3030 unsigned int access; /* access rights to the new token */
3031 unsigned int attributes; /* object attributes */
3032 int primary; /* is the new token to be a primary one? */
3033 int impersonation_level; /* impersonation level of the new token */
3035 obj_handle_t new_handle; /* duplicated handle */
3039 obj_handle_t handle; /* handle to the token */
3040 unsigned int desired_access; /* desired access to the object */
3041 unsigned int mapping_read; /* mapping from generic read to specific rights */
3042 unsigned int mapping_write; /* mapping from generic write to specific rights */
3043 unsigned int mapping_execute; /* mapping from generic execute to specific rights */
3044 unsigned int mapping_all; /* mapping from generic all to specific rights */
3045 VARARG(sd,security_descriptor); /* security descriptor to check */
3047 unsigned int access_granted; /* access rights actually granted */
3048 unsigned int access_status; /* was access granted? */
3049 unsigned int privileges_len; /* length needed to store privileges */
3050 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges used during access check */
3054 obj_handle_t handle; /* handle to the token */
3055 unsigned int which_sid; /* which SID to retrieve from the token */
3057 data_size_t sid_len; /* length needed to store sid */
3058 VARARG(sid,SID); /* the sid specified by which_sid from the token */
3061 @REQ(get_token_groups)
3062 obj_handle_t handle; /* handle to the token */
3064 data_size_t user_len; /* length needed to store user */
3065 VARARG(user,token_groups); /* groups the token's user belongs to */
3068 @REQ(get_token_default_dacl)
3069 obj_handle_t handle; /* handle to the token */
3071 data_size_t acl_len; /* length needed to store access control list */
3072 VARARG(acl,ACL); /* access control list */
3075 @REQ(set_token_default_dacl)
3076 obj_handle_t handle; /* handle to the token */
3077 VARARG(acl,ACL); /* default dacl to set */
3080 @REQ(set_security_object)
3081 obj_handle_t handle; /* handle to the object */
3082 unsigned int security_info; /* which parts of security descriptor to set */
3083 VARARG(sd,security_descriptor); /* security descriptor to set */
3086 @REQ(get_security_object)
3087 obj_handle_t handle; /* handle to the object */
3088 unsigned int security_info; /* which parts of security descriptor to get */
3090 unsigned int sd_len; /* buffer size needed for sd */
3091 VARARG(sd,security_descriptor); /* retrieved security descriptor */
3094 /* Create a mailslot */
3095 @REQ(create_mailslot)
3096 unsigned int access; /* wanted access rights */
3097 unsigned int attributes; /* object attributes */
3098 obj_handle_t rootdir; /* root directory */
3099 timeout_t read_timeout;
3100 unsigned int max_msgsize;
3101 VARARG(name,unicode_str); /* mailslot name */
3103 obj_handle_t handle; /* handle to the mailslot */
3107 /* Set mailslot information */
3108 @REQ(set_mailslot_info)
3109 obj_handle_t handle; /* handle to the mailslot */
3110 timeout_t read_timeout;
3113 timeout_t read_timeout;
3114 unsigned int max_msgsize;
3116 #define MAILSLOT_SET_READ_TIMEOUT 1
3119 /* Create a directory object */
3120 @REQ(create_directory)
3121 unsigned int access; /* access flags */
3122 unsigned int attributes; /* object attributes */
3123 obj_handle_t rootdir; /* root directory */
3124 VARARG(directory_name,unicode_str); /* Directory name */
3126 obj_handle_t handle; /* handle to the directory */
3130 /* Open a directory object */
3131 @REQ(open_directory)
3132 unsigned int access; /* access flags */
3133 unsigned int attributes; /* object attributes */
3134 obj_handle_t rootdir; /* root directory */
3135 VARARG(directory_name,unicode_str); /* Directory name */
3137 obj_handle_t handle; /* handle to the directory */
3141 /* Get a directory entry by index */
3142 @REQ(get_directory_entry)
3143 obj_handle_t handle; /* handle to the directory */
3144 unsigned int index; /* entry index */
3146 data_size_t name_len; /* length of the entry name in bytes */
3147 VARARG(name,unicode_str,name_len); /* entry name */
3148 VARARG(type,unicode_str); /* entry type */
3152 /* Create a symbolic link object */
3153 @REQ(create_symlink)
3154 unsigned int access; /* access flags */
3155 unsigned int attributes; /* object attributes */
3156 obj_handle_t rootdir; /* root directory */
3157 data_size_t name_len; /* length of the symlink name in bytes */
3158 VARARG(name,unicode_str,name_len); /* symlink name */
3159 VARARG(target_name,unicode_str); /* target name */
3161 obj_handle_t handle; /* handle to the symlink */
3165 /* Open a symbolic link object */
3167 unsigned int access; /* access flags */
3168 unsigned int attributes; /* object attributes */
3169 obj_handle_t rootdir; /* root directory */
3170 VARARG(name,unicode_str); /* symlink name */
3172 obj_handle_t handle; /* handle to the symlink */
3176 /* Query a symbolic link object */
3178 obj_handle_t handle; /* handle to the symlink */
3180 data_size_t total; /* total needed size for name */
3181 VARARG(target_name,unicode_str); /* target name */
3185 /* Query basic object information */
3186 @REQ(get_object_info)
3187 obj_handle_t handle; /* handle to the object */
3189 unsigned int access; /* granted access mask */
3190 unsigned int ref_count; /* object ref count */
3191 data_size_t total; /* total needed size for name */
3192 VARARG(name,unicode_str); /* object name */
3196 /* Unlink a named object */
3198 obj_handle_t handle; /* handle to the object */
3202 /* Query the impersonation level of an impersonation token */
3203 @REQ(get_token_impersonation_level)
3204 obj_handle_t handle; /* handle to the object */
3206 int impersonation_level; /* impersonation level of the impersonation token */
3209 /* Allocate a locally-unique identifier */
3210 @REQ(allocate_locally_unique_id)
3216 /* Create a device manager */
3217 @REQ(create_device_manager)
3218 unsigned int access; /* wanted access rights */
3219 unsigned int attributes; /* object attributes */
3221 obj_handle_t handle; /* handle to the device */
3225 /* Create a device */
3227 unsigned int access; /* wanted access rights */
3228 unsigned int attributes; /* object attributes */
3229 obj_handle_t rootdir; /* root directory */
3230 client_ptr_t user_ptr; /* opaque ptr for use by client */
3231 obj_handle_t manager; /* device manager */
3232 VARARG(name,unicode_str); /* object name */
3234 obj_handle_t handle; /* handle to the device */
3238 /* Delete a device */
3240 obj_handle_t handle; /* handle to the device */
3244 /* Retrieve the next pending device ioctl request */
3245 @REQ(get_next_device_request)
3246 obj_handle_t manager; /* handle to the device manager */
3247 obj_handle_t prev; /* handle to the previous ioctl */
3248 unsigned int status; /* status of the previous ioctl */
3249 VARARG(prev_data,bytes); /* output data of the previous ioctl */
3251 obj_handle_t next; /* handle to the next ioctl */
3252 ioctl_code_t code; /* ioctl code */
3253 client_ptr_t user_ptr; /* opaque ptr for the device */
3254 process_id_t client_pid; /* pid of process calling ioctl */
3255 thread_id_t client_tid; /* tid of thread calling ioctl */
3256 data_size_t in_size; /* total needed input size */
3257 data_size_t out_size; /* needed output size */
3258 VARARG(next_data,bytes); /* input data of the next ioctl */
3262 /* Make the current process a system process */
3263 @REQ(make_process_system)
3265 obj_handle_t event; /* event signaled when all user processes have exited */
3269 /* Get detailed fixed-size information about a token */
3270 @REQ(get_token_statistics)
3271 obj_handle_t handle; /* handle to the object */
3273 luid_t token_id; /* locally-unique identifier of the token */
3274 luid_t modified_id; /* locally-unique identifier of the modified version of the token */
3275 int primary; /* is the token primary or impersonation? */
3276 int impersonation_level; /* level of impersonation */
3277 int group_count; /* the number of groups the token is a member of */
3278 int privilege_count; /* the number of privileges the token has */
3282 /* Create I/O completion port */
3283 @REQ(create_completion)
3284 unsigned int access; /* desired access to a port */
3285 unsigned int attributes; /* object attributes */
3286 unsigned int concurrent; /* max number of concurrent active threads */
3287 obj_handle_t rootdir; /* root directory */
3288 VARARG(filename,string); /* port name */
3290 obj_handle_t handle; /* port handle */
3294 /* Open I/O completion port */
3295 @REQ(open_completion)
3296 unsigned int access; /* desired access to a port */
3297 unsigned int attributes; /* object attributes */
3298 obj_handle_t rootdir; /* root directory */
3299 VARARG(filename,string); /* port name */
3301 obj_handle_t handle; /* port handle */
3305 /* add completion to completion port */
3306 @REQ(add_completion)
3307 obj_handle_t handle; /* port handle */
3308 apc_param_t ckey; /* completion key */
3309 apc_param_t cvalue; /* completion value */
3310 unsigned int information; /* IO_STATUS_BLOCK Information */
3311 unsigned int status; /* completion result */
3315 /* get completion from completion port queue */
3316 @REQ(remove_completion)
3317 obj_handle_t handle; /* port handle */
3319 apc_param_t ckey; /* completion key */
3320 apc_param_t cvalue; /* completion value */
3321 unsigned int information; /* IO_STATUS_BLOCK Information */
3322 unsigned int status; /* completion result */
3326 /* get completion queue depth */
3327 @REQ(query_completion)
3328 obj_handle_t handle; /* port handle */
3330 unsigned int depth; /* completion queue depth */
3334 /* associate object with completion port */
3335 @REQ(set_completion_info)
3336 obj_handle_t handle; /* object handle */
3337 apc_param_t ckey; /* completion key */
3338 obj_handle_t chandle; /* port handle */
3342 /* check for associated completion and push msg */
3343 @REQ(add_fd_completion)
3344 obj_handle_t handle; /* async' object */
3345 apc_param_t cvalue; /* completion value */
3346 unsigned int status; /* completion status */
3347 unsigned int information; /* IO_STATUS_BLOCK Information */
3351 /* Retrieve layered info for a window */
3352 @REQ(get_window_layered_info)
3353 user_handle_t handle; /* handle to the window */
3355 unsigned int color_key; /* color key */
3356 unsigned int alpha; /* alpha (0..255) */
3357 unsigned int flags; /* LWA_* flags */
3361 /* Set layered info for a window */
3362 @REQ(set_window_layered_info)
3363 user_handle_t handle; /* handle to the window */
3364 unsigned int color_key; /* color key */
3365 unsigned int alpha; /* alpha (0..255) */
3366 unsigned int flags; /* LWA_* flags */
3370 /* Allocate an arbitrary user handle */
3371 @REQ(alloc_user_handle)
3373 user_handle_t handle; /* allocated handle */
3377 /* Free an arbitrary user handle */
3378 @REQ(free_user_handle)
3379 user_handle_t handle; /* handle to free*/
3383 /* Set/get the current cursor */
3385 unsigned int flags; /* flags for fields to set (see below) */
3386 user_handle_t handle; /* handle to the cursor */
3387 int show_count; /* show count increment/decrement */
3388 int x; /* cursor position */
3390 rectangle_t clip; /* cursor clip rectangle */
3391 unsigned int clip_msg; /* message to post on cursor clip changes */
3393 user_handle_t prev_handle; /* previous handle */
3394 int prev_count; /* previous show count */
3395 int prev_x; /* previous position */
3397 int new_x; /* new position */
3399 rectangle_t new_clip; /* new clip rectangle */
3400 unsigned int last_change; /* time of last position change */
3402 #define SET_CURSOR_HANDLE 0x01
3403 #define SET_CURSOR_COUNT 0x02
3404 #define SET_CURSOR_POS 0x04
3405 #define SET_CURSOR_CLIP 0x08
3406 #define SET_CURSOR_NOCLIP 0x10
3409 /* Modify the list of registered rawinput devices */
3410 @REQ(update_rawinput_devices)
3411 VARARG(devices,rawinput_devices);
3415 /* Retrieve the suspended context of a thread */
3416 @REQ(get_suspend_context)
3418 VARARG(context,context); /* thread context */
3422 /* Store the suspend context of a thread */
3423 @REQ(set_suspend_context)
3424 VARARG(context,context); /* thread context */