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_ALPHA, CPU_POWERPC, CPU_ARM, 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 __int64 fir;
163 unsigned int psr, __pad; } alpha_regs;
164 struct { unsigned int iar, msr, ctr, lr, dar, dsisr, trap, __pad; } powerpc_regs;
165 struct { unsigned int sp, lr, pc, cpsr; } arm_regs;
166 struct { unsigned int psr, pc, npc, y, wim, tbr; } sparc_regs;
167 } ctl; /* selected by SERVER_CTX_CONTROL */
170 struct { unsigned int eax, ebx, ecx, edx, esi, edi; } i386_regs;
171 struct { unsigned __int64 rax,rbx, rcx, rdx, rsi, rdi,
172 r8, r9, r10, r11, r12, r13, r14, r15; } x86_64_regs;
173 struct { unsigned __int64 v0, t0, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12,
174 s0, s1, s2, s3, s4, s5, s6, a0, a1, a2, a3, a4, a5, at; } alpha_regs;
175 struct { unsigned int gpr[32], cr, xer; } powerpc_regs;
176 struct { unsigned int r[13]; } arm_regs;
177 struct { unsigned int g[8], o[8], l[8], i[8]; } sparc_regs;
178 } integer; /* selected by SERVER_CTX_INTEGER */
181 struct { unsigned int ds, es, fs, gs; } i386_regs;
182 struct { unsigned int ds, es, fs, gs; } x86_64_regs;
183 } seg; /* selected by SERVER_CTX_SEGMENTS */
186 struct { unsigned int ctrl, status, tag, err_off, err_sel, data_off, data_sel, cr0npx;
187 unsigned char regs[80]; } i386_regs;
188 struct { struct { unsigned __int64 low, high; } fpregs[32]; } x86_64_regs;
189 struct { unsigned __int64 f[32], fpcr, softfpcr; } alpha_regs;
190 struct { double fpr[32], fpscr; } powerpc_regs;
191 } fp; /* selected by SERVER_CTX_FLOATING_POINT */
194 struct { unsigned int dr0, dr1, dr2, dr3, dr6, dr7; } i386_regs;
195 struct { unsigned __int64 dr0, dr1, dr2, dr3, dr6, dr7; } x86_64_regs;
196 struct { unsigned int dr[8]; } powerpc_regs;
197 } debug; /* selected by SERVER_CTX_DEBUG_REGISTERS */
200 unsigned char i386_regs[512];
201 } ext; /* selected by SERVER_CTX_EXTENDED_REGISTERS */
204 #define SERVER_CTX_CONTROL 0x01
205 #define SERVER_CTX_INTEGER 0x02
206 #define SERVER_CTX_SEGMENTS 0x04
207 #define SERVER_CTX_FLOATING_POINT 0x08
208 #define SERVER_CTX_DEBUG_REGISTERS 0x10
209 #define SERVER_CTX_EXTENDED_REGISTERS 0x20
211 /* structure used in sending an fd from client to server */
214 thread_id_t tid; /* thread id */
215 int fd; /* file descriptor on client-side */
218 /* structure sent by the server on the wait fifo */
221 client_ptr_t cookie; /* magic cookie that was passed in select_request */
222 int signaled; /* wait result */
226 /* NT-style timeout, in 100ns units, negative means relative timeout */
227 typedef __int64 timeout_t;
228 #define TIMEOUT_INFINITE (((timeout_t)0x7fffffff) << 32 | 0xffffffff)
230 /* structure for process startup info */
233 unsigned int debug_flags;
234 unsigned int console_flags;
235 obj_handle_t console;
237 obj_handle_t hstdout;
238 obj_handle_t hstderr;
245 unsigned int attribute;
248 data_size_t curdir_len;
249 data_size_t dllpath_len;
250 data_size_t imagepath_len;
251 data_size_t cmdline_len;
252 data_size_t title_len;
253 data_size_t desktop_len;
254 data_size_t shellinfo_len;
255 data_size_t runtime_len;
256 /* VARARG(curdir,unicode_str,curdir_len); */
257 /* VARARG(dllpath,unicode_str,dllpath_len); */
258 /* VARARG(imagepath,unicode_str,imagepath_len); */
259 /* VARARG(cmdline,unicode_str,cmdline_len); */
260 /* VARARG(title,unicode_str,title_len); */
261 /* VARARG(desktop,unicode_str,desktop_len); */
262 /* VARARG(shellinfo,unicode_str,shellinfo_len); */
263 /* VARARG(runtime,unicode_str,runtime_len); */
266 /* structure returned in the list of window properties */
269 atom_t atom; /* property atom */
270 int string; /* was atom a string originally? */
271 lparam_t data; /* data stored in property */
274 /* structure to specify window rectangles */
283 /* structure for parameters of async I/O calls */
286 obj_handle_t handle; /* object to perform I/O on */
287 obj_handle_t event; /* event to signal when done */
288 client_ptr_t callback; /* client-side callback to call upon end of async */
289 client_ptr_t iosb; /* I/O status block in client addr space */
290 client_ptr_t arg; /* opaque user data to pass to callback */
291 apc_param_t cvalue; /* completion value to use for completion events */
294 /* structures for extra message data */
296 struct hardware_msg_data
298 lparam_t info; /* extra info */
299 int x; /* x position */
300 int y; /* y position */
301 unsigned int hw_id; /* unique id */
305 struct callback_msg_data
307 client_ptr_t callback; /* callback function */
308 lparam_t data; /* user data for callback */
309 lparam_t result; /* message result */
312 struct winevent_msg_data
314 user_handle_t hook; /* hook handle */
315 thread_id_t tid; /* thread id */
316 client_ptr_t hook_proc; /* hook proc address */
317 /* followed by module name if any */
325 int type; /* INPUT_KEYBOARD */
326 unsigned short vkey; /* virtual key code */
327 unsigned short scan; /* scan code */
328 unsigned int flags; /* event flags */
329 unsigned int time; /* event time */
330 lparam_t info; /* extra info */
334 int type; /* INPUT_MOUSE */
335 int x; /* coordinates */
337 unsigned int data; /* mouse data */
338 unsigned int flags; /* event flags */
339 unsigned int time; /* event time */
340 lparam_t info; /* extra info */
344 int type; /* INPUT_HARDWARE */
345 unsigned int msg; /* message code */
346 lparam_t lparam; /* message param */
352 unsigned char bytes[1]; /* raw data for sent messages */
353 struct hardware_msg_data hardware;
354 struct callback_msg_data callback;
355 struct winevent_msg_data winevent;
358 /* structure for console char/attribute info */
365 /* structure returned in filesystem events */
366 struct filesystem_event
375 unsigned int low_part;
379 #define MAX_ACL_LEN 65535
381 struct security_descriptor
383 unsigned int control; /* SE_ flags */
384 data_size_t owner_len;
385 data_size_t group_len;
386 data_size_t sacl_len;
387 data_size_t dacl_len;
388 /* VARARG(owner,SID); */
389 /* VARARG(group,SID); */
390 /* VARARG(sacl,ACL); */
391 /* VARARG(dacl,ACL); */
394 struct object_attributes
396 obj_handle_t rootdir; /* root directory */
397 data_size_t sd_len; /* length of security_descriptor data. may be 0 */
398 data_size_t name_len; /* length of the name string. may be 0 */
399 /* VARARG(sd,security_descriptor); */
400 /* VARARG(name,unicode_str); */
406 /* unsigned int attributes[count]; */
407 /* VARARG(sids,SID); */
433 enum apc_type type; /* APC_USER */
435 client_ptr_t func; /* void (__stdcall *func)(ULONG_PTR,ULONG_PTR,ULONG_PTR); */
436 apc_param_t args[3]; /* arguments for user function */
440 enum apc_type type; /* APC_TIMER */
442 client_ptr_t func; /* void (__stdcall *func)(void*, unsigned int, unsigned int); */
443 timeout_t time; /* absolute time of expiration */
444 client_ptr_t arg; /* user argument */
448 enum apc_type type; /* APC_ASYNC_IO */
449 unsigned int status; /* I/O status */
450 client_ptr_t func; /* unsigned int (*func)(void*, void*, unsigned int, void **); */
451 client_ptr_t user; /* user pointer */
452 client_ptr_t sb; /* status block */
456 enum apc_type type; /* APC_VIRTUAL_ALLOC */
457 unsigned int op_type; /* type of operation */
458 client_ptr_t addr; /* requested address */
459 mem_size_t size; /* allocation size */
460 unsigned int zero_bits; /* allocation alignment */
461 unsigned int prot; /* memory protection flags */
465 enum apc_type type; /* APC_VIRTUAL_FREE */
466 unsigned int op_type; /* type of operation */
467 client_ptr_t addr; /* requested address */
468 mem_size_t size; /* allocation size */
472 enum apc_type type; /* APC_VIRTUAL_QUERY */
474 client_ptr_t addr; /* requested address */
478 enum apc_type type; /* APC_VIRTUAL_PROTECT */
479 unsigned int prot; /* new protection flags */
480 client_ptr_t addr; /* requested address */
481 mem_size_t size; /* requested size */
485 enum apc_type type; /* APC_VIRTUAL_FLUSH */
487 client_ptr_t addr; /* requested address */
488 mem_size_t size; /* requested size */
492 enum apc_type type; /* APC_VIRTUAL_LOCK */
494 client_ptr_t addr; /* requested address */
495 mem_size_t size; /* requested size */
499 enum apc_type type; /* APC_VIRTUAL_UNLOCK */
501 client_ptr_t addr; /* requested address */
502 mem_size_t size; /* requested size */
506 enum apc_type type; /* APC_MAP_VIEW */
507 obj_handle_t handle; /* mapping handle */
508 client_ptr_t addr; /* requested address */
509 mem_size_t size; /* allocation size */
510 file_pos_t offset; /* file offset */
511 unsigned int alloc_type;/* allocation type */
512 unsigned short zero_bits; /* allocation alignment */
513 unsigned short prot; /* memory protection flags */
517 enum apc_type type; /* APC_UNMAP_VIEW */
519 client_ptr_t addr; /* view address */
523 enum apc_type type; /* APC_CREATE_THREAD */
524 int suspend; /* suspended thread? */
525 client_ptr_t func; /* void (__stdcall *func)(void*); start function */
526 client_ptr_t arg; /* argument for start function */
527 mem_size_t reserve; /* reserve size for thread stack */
528 mem_size_t commit; /* commit size for thread stack */
537 enum apc_type type; /* APC_ASYNC_IO */
538 unsigned int status; /* new status of async operation */
539 client_ptr_t apc; /* user APC to call */
540 unsigned int total; /* bytes transferred */
544 enum apc_type type; /* APC_VIRTUAL_ALLOC */
545 unsigned int status; /* status returned by call */
546 client_ptr_t addr; /* resulting address */
547 mem_size_t size; /* resulting size */
551 enum apc_type type; /* APC_VIRTUAL_FREE */
552 unsigned int status; /* status returned by call */
553 client_ptr_t addr; /* resulting address */
554 mem_size_t size; /* resulting size */
558 enum apc_type type; /* APC_VIRTUAL_QUERY */
559 unsigned int status; /* status returned by call */
560 client_ptr_t base; /* resulting base address */
561 client_ptr_t alloc_base;/* resulting allocation base */
562 mem_size_t size; /* resulting region size */
563 unsigned short state; /* resulting region state */
564 unsigned short prot; /* resulting region protection */
565 unsigned short alloc_prot;/* resulting allocation protection */
566 unsigned short alloc_type;/* resulting region allocation type */
570 enum apc_type type; /* APC_VIRTUAL_PROTECT */
571 unsigned int status; /* status returned by call */
572 client_ptr_t addr; /* resulting address */
573 mem_size_t size; /* resulting size */
574 unsigned int prot; /* old protection flags */
578 enum apc_type type; /* APC_VIRTUAL_FLUSH */
579 unsigned int status; /* status returned by call */
580 client_ptr_t addr; /* resulting address */
581 mem_size_t size; /* resulting size */
585 enum apc_type type; /* APC_VIRTUAL_LOCK */
586 unsigned int status; /* status returned by call */
587 client_ptr_t addr; /* resulting address */
588 mem_size_t size; /* resulting size */
592 enum apc_type type; /* APC_VIRTUAL_UNLOCK */
593 unsigned int status; /* status returned by call */
594 client_ptr_t addr; /* resulting address */
595 mem_size_t size; /* resulting size */
599 enum apc_type type; /* APC_MAP_VIEW */
600 unsigned int status; /* status returned by call */
601 client_ptr_t addr; /* resulting address */
602 mem_size_t size; /* resulting size */
606 enum apc_type type; /* APC_MAP_VIEW */
607 unsigned int status; /* status returned by call */
611 enum apc_type type; /* APC_CREATE_THREAD */
612 unsigned int status; /* status returned by call */
613 thread_id_t tid; /* thread id */
614 obj_handle_t handle; /* handle to new thread */
618 /****************************************************************/
619 /* Request declarations */
621 /* Create a new process from the context of the parent */
623 int inherit_all; /* inherit all handles from parent */
624 unsigned int create_flags; /* creation flags */
625 int socket_fd; /* file descriptor for process socket */
626 obj_handle_t exe_file; /* file handle for main exe */
627 unsigned int process_access; /* access rights for process object */
628 unsigned int process_attr; /* attributes for process object */
629 unsigned int thread_access; /* access rights for thread object */
630 unsigned int thread_attr; /* attributes for thread object */
631 data_size_t info_size; /* size of startup info */
632 VARARG(info,startup_info,info_size); /* startup information */
633 VARARG(env,unicode_str); /* environment for new process */
635 obj_handle_t info; /* new process info handle */
636 process_id_t pid; /* process id */
637 obj_handle_t phandle; /* process handle (in the current process) */
638 thread_id_t tid; /* thread id */
639 obj_handle_t thandle; /* thread handle (in the current process) */
643 /* Retrieve information about a newly started process */
644 @REQ(get_new_process_info)
645 obj_handle_t info; /* info handle returned from new_process_request */
647 int success; /* did the process start successfully? */
648 int exit_code; /* process exit code if failed */
652 /* Create a new thread from the context of the parent */
654 unsigned int access; /* wanted access rights */
655 unsigned int attributes; /* object attributes */
656 int suspend; /* new thread should be suspended on creation */
657 int request_fd; /* fd for request pipe */
659 thread_id_t tid; /* thread id */
660 obj_handle_t handle; /* thread handle (in the current process) */
664 /* Retrieve the new process startup info */
665 @REQ(get_startup_info)
667 obj_handle_t exe_file; /* file handle for main exe */
668 data_size_t info_size; /* size of startup info */
669 VARARG(info,startup_info,info_size); /* startup information */
670 VARARG(env,unicode_str); /* environment */
674 /* Signal the end of the process initialization */
675 @REQ(init_process_done)
676 int gui; /* is it a GUI process? */
677 mod_handle_t module; /* main module base address */
678 client_ptr_t ldt_copy; /* address of LDT copy (in thread address space) */
679 client_ptr_t entry; /* process entry point */
683 /* Initialize a thread; called from the child after fork()/clone() */
685 int unix_pid; /* Unix pid of new thread */
686 int unix_tid; /* Unix tid of new thread */
687 int debug_level; /* new debug level */
688 client_ptr_t teb; /* TEB of new thread (in thread address space) */
689 client_ptr_t entry; /* entry point or PEB if initial thread (in thread address space) */
690 int reply_fd; /* fd for reply pipe */
691 int wait_fd; /* fd for blocking calls pipe */
692 cpu_type_t cpu; /* CPU that this thread is running on */
694 process_id_t pid; /* process id of the new thread's process */
695 thread_id_t tid; /* thread id of the new thread */
696 timeout_t server_start; /* server start time */
697 data_size_t info_size; /* total size of startup info */
698 int version; /* protocol version */
699 unsigned int all_cpus; /* bitset of supported CPUs */
703 /* Terminate a process */
704 @REQ(terminate_process)
705 obj_handle_t handle; /* process handle to terminate */
706 int exit_code; /* process exit code */
708 int self; /* suicide? */
712 /* Terminate a thread */
713 @REQ(terminate_thread)
714 obj_handle_t handle; /* thread handle to terminate */
715 int exit_code; /* thread exit code */
717 int self; /* suicide? */
718 int last; /* last thread in this process? */
722 /* Retrieve information about a process */
723 @REQ(get_process_info)
724 obj_handle_t handle; /* process handle */
726 process_id_t pid; /* server process id */
727 process_id_t ppid; /* server process id of parent */
728 affinity_t affinity; /* process affinity mask */
729 client_ptr_t peb; /* PEB address in process address space */
730 timeout_t start_time; /* process start time */
731 timeout_t end_time; /* process end time */
732 int exit_code; /* process exit code */
733 int priority; /* priority class */
734 cpu_type_t cpu; /* CPU that this process is running on */
735 int debugger_present; /* process is being debugged */
739 /* Set a process informations */
740 @REQ(set_process_info)
741 obj_handle_t handle; /* process handle */
742 int mask; /* setting mask (see below) */
743 int priority; /* priority class */
744 affinity_t affinity; /* affinity mask */
746 #define SET_PROCESS_INFO_PRIORITY 0x01
747 #define SET_PROCESS_INFO_AFFINITY 0x02
750 /* Retrieve information about a thread */
751 @REQ(get_thread_info)
752 obj_handle_t handle; /* thread handle */
753 thread_id_t tid_in; /* thread id (optional) */
755 process_id_t pid; /* server process id */
756 thread_id_t tid; /* server thread id */
757 client_ptr_t teb; /* thread teb pointer */
758 affinity_t affinity; /* thread affinity mask */
759 timeout_t creation_time; /* thread creation time */
760 timeout_t exit_time; /* thread exit time */
761 int exit_code; /* thread exit code */
762 int priority; /* thread priority level */
763 int last; /* last thread in process */
767 /* Set a thread informations */
768 @REQ(set_thread_info)
769 obj_handle_t handle; /* thread handle */
770 int mask; /* setting mask (see below) */
771 int priority; /* priority class */
772 affinity_t affinity; /* affinity mask */
773 obj_handle_t token; /* impersonation token */
775 #define SET_THREAD_INFO_PRIORITY 0x01
776 #define SET_THREAD_INFO_AFFINITY 0x02
777 #define SET_THREAD_INFO_TOKEN 0x04
780 /* Retrieve information about a module */
782 obj_handle_t handle; /* process handle */
783 mod_handle_t base_address; /* base address of module */
785 client_ptr_t entry_point;
786 data_size_t size; /* module size */
787 data_size_t filename_len; /* buffer len in bytes required to store filename */
788 VARARG(filename,unicode_str); /* file name of module */
792 /* Suspend a thread */
794 obj_handle_t handle; /* thread handle */
796 int count; /* new suspend count */
800 /* Resume a thread */
802 obj_handle_t handle; /* thread handle */
804 int count; /* new suspend count */
808 /* Notify the server that a dll has been loaded */
810 obj_handle_t handle; /* file handle */
811 mod_handle_t base; /* base address */
812 client_ptr_t name; /* ptr to ptr to name (in process addr space) */
813 data_size_t size; /* dll size */
814 int dbg_offset; /* debug info offset */
815 int dbg_size; /* debug info size */
816 VARARG(filename,unicode_str); /* file name of dll */
820 /* Notify the server that a dll is being unloaded */
822 mod_handle_t base; /* base address */
826 /* Queue an APC for a thread or process */
828 obj_handle_t handle; /* thread or process handle */
829 apc_call_t call; /* call arguments */
831 obj_handle_t handle; /* APC handle */
832 int self; /* run APC in caller itself? */
836 /* Get the result of an APC call */
838 obj_handle_t handle; /* handle to the APC */
840 apc_result_t result; /* result of the APC */
844 /* Close a handle for the current process */
846 obj_handle_t handle; /* handle to close */
850 /* Set a handle information */
851 @REQ(set_handle_info)
852 obj_handle_t handle; /* handle we are interested in */
853 int flags; /* new handle flags */
854 int mask; /* mask for flags to set */
856 int old_flags; /* old flag value */
860 /* Duplicate a handle */
862 obj_handle_t src_process; /* src process handle */
863 obj_handle_t src_handle; /* src handle to duplicate */
864 obj_handle_t dst_process; /* dst process handle */
865 unsigned int access; /* wanted access rights */
866 unsigned int attributes; /* object attributes */
867 unsigned int options; /* duplicate options (see below) */
869 obj_handle_t handle; /* duplicated handle in dst process */
870 int self; /* is the source the current process? */
871 int closed; /* whether the source handle has been closed */
873 #define DUP_HANDLE_CLOSE_SOURCE DUPLICATE_CLOSE_SOURCE
874 #define DUP_HANDLE_SAME_ACCESS DUPLICATE_SAME_ACCESS
875 #define DUP_HANDLE_MAKE_GLOBAL 0x80000000 /* Not a Windows flag */
878 /* Open a handle to a process */
880 process_id_t pid; /* process id to open */
881 unsigned int access; /* wanted access rights */
882 unsigned int attributes; /* object attributes */
884 obj_handle_t handle; /* handle to the process */
888 /* Open a handle to a thread */
890 thread_id_t tid; /* thread id to open */
891 unsigned int access; /* wanted access rights */
892 unsigned int attributes; /* object attributes */
894 obj_handle_t handle; /* handle to the thread */
898 /* Wait for handles */
900 int flags; /* wait flags (see below) */
901 client_ptr_t cookie; /* magic cookie to return to client */
902 obj_handle_t signal; /* object to signal (0 if none) */
903 obj_handle_t prev_apc; /* handle to previous APC */
904 timeout_t timeout; /* timeout */
905 VARARG(result,apc_result); /* result of previous APC */
906 VARARG(handles,handles); /* handles to select on */
908 timeout_t timeout; /* timeout converted to absolute */
909 apc_call_t call; /* APC call arguments */
910 obj_handle_t apc_handle; /* handle to next APC */
913 #define SELECT_ALERTABLE 2
914 #define SELECT_INTERRUPTIBLE 4
917 /* Create an event */
919 unsigned int access; /* wanted access rights */
920 unsigned int attributes; /* object attributes */
921 int manual_reset; /* manual reset event */
922 int initial_state; /* initial state of the event */
923 VARARG(objattr,object_attributes); /* object attributes */
925 obj_handle_t handle; /* handle to the event */
928 /* Event operation */
930 obj_handle_t handle; /* handle to event */
931 int op; /* event operation (see below) */
933 enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT };
938 unsigned int access; /* wanted access rights */
939 unsigned int attributes; /* object attributes */
940 obj_handle_t rootdir; /* root directory */
941 VARARG(name,unicode_str); /* object name */
943 obj_handle_t handle; /* handle to the event */
949 unsigned int access; /* wanted access rights */
950 unsigned int attributes; /* object attributes */
951 int owned; /* initially owned? */
952 VARARG(objattr,object_attributes); /* object attributes */
954 obj_handle_t handle; /* handle to the mutex */
958 /* Release a mutex */
960 obj_handle_t handle; /* handle to the mutex */
962 unsigned int prev_count; /* value of internal counter, before release */
968 unsigned int access; /* wanted access rights */
969 unsigned int attributes; /* object attributes */
970 obj_handle_t rootdir; /* root directory */
971 VARARG(name,unicode_str); /* object name */
973 obj_handle_t handle; /* handle to the mutex */
977 /* Create a semaphore */
978 @REQ(create_semaphore)
979 unsigned int access; /* wanted access rights */
980 unsigned int attributes; /* object attributes */
981 unsigned int initial; /* initial count */
982 unsigned int max; /* maximum count */
983 VARARG(objattr,object_attributes); /* object attributes */
985 obj_handle_t handle; /* handle to the semaphore */
989 /* Release a semaphore */
990 @REQ(release_semaphore)
991 obj_handle_t handle; /* handle to the semaphore */
992 unsigned int count; /* count to add to semaphore */
994 unsigned int prev_count; /* previous semaphore count */
998 /* Open a semaphore */
1000 unsigned int access; /* wanted access rights */
1001 unsigned int attributes; /* object attributes */
1002 obj_handle_t rootdir; /* root directory */
1003 VARARG(name,unicode_str); /* object name */
1005 obj_handle_t handle; /* handle to the semaphore */
1011 unsigned int access; /* wanted access rights */
1012 unsigned int attributes; /* object attributes */
1013 unsigned int sharing; /* sharing flags */
1014 int create; /* file create action */
1015 unsigned int options; /* file options */
1016 unsigned int attrs; /* file attributes for creation */
1017 VARARG(objattr,object_attributes); /* object attributes */
1018 VARARG(filename,string); /* file name */
1020 obj_handle_t handle; /* handle to the file */
1024 /* Open a file object */
1025 @REQ(open_file_object)
1026 unsigned int access; /* wanted access rights */
1027 unsigned int attributes; /* open attributes */
1028 obj_handle_t rootdir; /* root directory */
1029 unsigned int sharing; /* sharing flags */
1030 unsigned int options; /* file options */
1031 VARARG(filename,unicode_str); /* file name */
1033 obj_handle_t handle; /* handle to the file */
1037 /* Allocate a file handle for a Unix fd */
1038 @REQ(alloc_file_handle)
1039 unsigned int access; /* wanted access rights */
1040 unsigned int attributes; /* object attributes */
1041 int fd; /* file descriptor on the client side */
1043 obj_handle_t handle; /* handle to the file */
1047 /* Get the Unix name from a file handle */
1048 @REQ(get_handle_unix_name)
1049 obj_handle_t handle; /* file handle */
1051 data_size_t name_len; /* unix name length */
1052 VARARG(name,string); /* unix name */
1056 /* Get a Unix fd to access a file */
1058 obj_handle_t handle; /* handle to the file */
1060 int type; /* file type (see below) */
1061 int cacheable; /* can fd be cached in the client? */
1062 unsigned int access; /* file access rights */
1063 unsigned int options; /* file open options */
1067 FD_TYPE_INVALID, /* invalid file (no associated fd) */
1068 FD_TYPE_FILE, /* regular file */
1069 FD_TYPE_DIR, /* directory */
1070 FD_TYPE_SOCKET, /* socket */
1071 FD_TYPE_SERIAL, /* serial port */
1072 FD_TYPE_PIPE, /* named pipe */
1073 FD_TYPE_MAILSLOT, /* mailslot */
1074 FD_TYPE_CHAR, /* unspecified char device */
1075 FD_TYPE_DEVICE, /* Windows device file */
1080 /* Flush a file buffers */
1082 obj_handle_t handle; /* handle to the file */
1084 obj_handle_t event; /* event set when finished */
1088 /* Lock a region of a file */
1090 obj_handle_t handle; /* handle to the file */
1091 file_pos_t offset; /* offset of start of lock */
1092 file_pos_t count; /* count of bytes to lock */
1093 int shared; /* shared or exclusive lock? */
1094 int wait; /* do we want to wait? */
1096 obj_handle_t handle; /* handle to wait on */
1097 int overlapped; /* is it an overlapped I/O handle? */
1101 /* Unlock a region of a file */
1103 obj_handle_t handle; /* handle to the file */
1104 file_pos_t offset; /* offset of start of unlock */
1105 file_pos_t count; /* count of bytes to unlock */
1109 /* Create a socket */
1111 unsigned int access; /* wanted access rights */
1112 unsigned int attributes; /* object attributes */
1113 int family; /* family, see socket manpage */
1114 int type; /* type, see socket manpage */
1115 int protocol; /* protocol, see socket manpage */
1116 unsigned int flags; /* socket flags */
1118 obj_handle_t handle; /* handle to the new socket */
1122 /* Accept a socket */
1124 obj_handle_t lhandle; /* handle to the listening socket */
1125 unsigned int access; /* wanted access rights */
1126 unsigned int attributes; /* object attributes */
1128 obj_handle_t handle; /* handle to the new socket */
1132 /* Accept into an initialized socket */
1133 @REQ(accept_into_socket)
1134 obj_handle_t lhandle; /* handle to the listening socket */
1135 obj_handle_t ahandle; /* handle to the accepting socket */
1139 /* Set socket event parameters */
1140 @REQ(set_socket_event)
1141 obj_handle_t handle; /* handle to the socket */
1142 unsigned int mask; /* event mask */
1143 obj_handle_t event; /* event object */
1144 user_handle_t window; /* window to send the message to */
1145 unsigned int msg; /* message to send */
1149 /* Get socket event parameters */
1150 @REQ(get_socket_event)
1151 obj_handle_t handle; /* handle to the socket */
1152 int service; /* clear pending? */
1153 obj_handle_t c_event; /* event to clear */
1155 unsigned int mask; /* event mask */
1156 unsigned int pmask; /* pending events */
1157 unsigned int state; /* status bits */
1158 VARARG(errors,ints); /* event errors */
1162 /* Reenable pending socket events */
1163 @REQ(enable_socket_event)
1164 obj_handle_t handle; /* handle to the socket */
1165 unsigned int mask; /* events to re-enable */
1166 unsigned int sstate; /* status bits to set */
1167 unsigned int cstate; /* status bits to clear */
1170 @REQ(set_socket_deferred)
1171 obj_handle_t handle; /* handle to the socket */
1172 obj_handle_t deferred; /* handle to the socket for which accept() is deferred */
1175 /* Allocate a console (only used by a console renderer) */
1177 unsigned int access; /* wanted access rights */
1178 unsigned int attributes; /* object attributes */
1179 process_id_t pid; /* pid of process which shall be attached to the console */
1180 int input_fd; /* if pid=-1 (bare console to current process), fd for input */
1182 obj_handle_t handle_in; /* handle to console input */
1183 obj_handle_t event; /* handle to renderer events change notification */
1187 /* Free the console of the current process */
1192 #define CONSOLE_RENDERER_NONE_EVENT 0x00
1193 #define CONSOLE_RENDERER_TITLE_EVENT 0x01
1194 #define CONSOLE_RENDERER_ACTIVE_SB_EVENT 0x02
1195 #define CONSOLE_RENDERER_SB_RESIZE_EVENT 0x03
1196 #define CONSOLE_RENDERER_UPDATE_EVENT 0x04
1197 #define CONSOLE_RENDERER_CURSOR_POS_EVENT 0x05
1198 #define CONSOLE_RENDERER_CURSOR_GEOM_EVENT 0x06
1199 #define CONSOLE_RENDERER_DISPLAY_EVENT 0x07
1200 #define CONSOLE_RENDERER_EXIT_EVENT 0x08
1201 struct console_renderer_event
1236 /* retrieve console events for the renderer */
1237 @REQ(get_console_renderer_events)
1238 obj_handle_t handle; /* handle to console input events */
1240 VARARG(data,bytes); /* the various console_renderer_events */
1244 /* Open a handle to the process console */
1246 obj_handle_t from; /* 0 (resp 1) input (resp output) of current process console */
1247 /* otherwise console_in handle to get active screen buffer? */
1248 unsigned int access; /* wanted access rights */
1249 unsigned int attributes; /* object attributes */
1250 int share; /* share mask (only for output handles) */
1252 obj_handle_t handle; /* handle to the console */
1256 /* Get the input queue wait event */
1257 @REQ(get_console_wait_event)
1259 obj_handle_t handle;
1262 /* Get a console mode (input or output) */
1263 @REQ(get_console_mode)
1264 obj_handle_t handle; /* handle to the console */
1266 int mode; /* console mode */
1270 /* Set a console mode (input or output) */
1271 @REQ(set_console_mode)
1272 obj_handle_t handle; /* handle to the console */
1273 int mode; /* console mode */
1277 /* Set info about a console (input only) */
1278 @REQ(set_console_input_info)
1279 obj_handle_t handle; /* handle to console input, or 0 for process' console */
1280 int mask; /* setting mask (see below) */
1281 obj_handle_t active_sb; /* active screen buffer */
1282 int history_mode; /* whether we duplicate lines in history */
1283 int history_size; /* number of lines in history */
1284 int edition_mode; /* index to the edition mode flavors */
1285 int input_cp; /* console input codepage */
1286 int output_cp; /* console output codepage */
1287 user_handle_t win; /* console window if backend supports it */
1288 VARARG(title,unicode_str); /* console title */
1290 #define SET_CONSOLE_INPUT_INFO_ACTIVE_SB 0x01
1291 #define SET_CONSOLE_INPUT_INFO_TITLE 0x02
1292 #define SET_CONSOLE_INPUT_INFO_HISTORY_MODE 0x04
1293 #define SET_CONSOLE_INPUT_INFO_HISTORY_SIZE 0x08
1294 #define SET_CONSOLE_INPUT_INFO_EDITION_MODE 0x10
1295 #define SET_CONSOLE_INPUT_INFO_INPUT_CODEPAGE 0x20
1296 #define SET_CONSOLE_INPUT_INFO_OUTPUT_CODEPAGE 0x40
1297 #define SET_CONSOLE_INPUT_INFO_WIN 0x80
1300 /* Get info about a console (input only) */
1301 @REQ(get_console_input_info)
1302 obj_handle_t handle; /* handle to console input, or 0 for process' console */
1304 int history_mode; /* whether we duplicate lines in history */
1305 int history_size; /* number of lines in history */
1306 int history_index; /* number of used 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 */
1315 /* appends a string to console's history */
1316 @REQ(append_console_input_history)
1317 obj_handle_t handle; /* handle to console input, or 0 for process' console */
1318 VARARG(line,unicode_str); /* line to add */
1322 /* appends a string to console's history */
1323 @REQ(get_console_input_history)
1324 obj_handle_t handle; /* handle to console input, or 0 for process' console */
1325 int index; /* index to get line from */
1327 int total; /* total length of line in Unicode chars */
1328 VARARG(line,unicode_str); /* line to add */
1332 /* creates a new screen buffer on process' console */
1333 @REQ(create_console_output)
1334 obj_handle_t handle_in; /* handle to console input, or 0 for process' console */
1335 unsigned int access; /* wanted access rights */
1336 unsigned int attributes; /* object attributes */
1337 unsigned int share; /* sharing credentials */
1338 int fd; /* for bare consoles, fd the screen-buffer is attached to */
1340 obj_handle_t handle_out; /* handle to the screen buffer */
1344 /* Set info about a console (output only) */
1345 @REQ(set_console_output_info)
1346 obj_handle_t handle; /* handle to the console */
1347 int mask; /* setting mask (see below) */
1348 short int cursor_size; /* size of cursor (percentage filled) */
1349 short int cursor_visible;/* cursor visibility flag */
1350 short int cursor_x; /* position of cursor (x, y) */
1352 short int width; /* width of the screen buffer */
1353 short int height; /* height of the screen buffer */
1354 short int attr; /* default attribute */
1355 short int win_left; /* window actually displayed by renderer */
1356 short int win_top; /* the rect area is expressed withing the */
1357 short int win_right; /* boundaries of the screen buffer */
1358 short int win_bottom;
1359 short int max_width; /* maximum size (width x height) for the window */
1360 short int max_height;
1362 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_GEOM 0x01
1363 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_POS 0x02
1364 #define SET_CONSOLE_OUTPUT_INFO_SIZE 0x04
1365 #define SET_CONSOLE_OUTPUT_INFO_ATTR 0x08
1366 #define SET_CONSOLE_OUTPUT_INFO_DISPLAY_WINDOW 0x10
1367 #define SET_CONSOLE_OUTPUT_INFO_MAX_SIZE 0x20
1370 /* Get info about a console (output only) */
1371 @REQ(get_console_output_info)
1372 obj_handle_t handle; /* handle to the console */
1374 short int cursor_size; /* size of cursor (percentage filled) */
1375 short int cursor_visible;/* cursor visibility flag */
1376 short int cursor_x; /* position of cursor (x, y) */
1378 short int width; /* width of the screen buffer */
1379 short int height; /* height of the screen buffer */
1380 short int attr; /* default attribute */
1381 short int win_left; /* window actually displayed by renderer */
1382 short int win_top; /* the rect area is expressed withing the */
1383 short int win_right; /* boundaries of the screen buffer */
1384 short int win_bottom;
1385 short int max_width; /* maximum size (width x height) for the window */
1386 short int max_height;
1389 /* Add input records to a console input queue */
1390 @REQ(write_console_input)
1391 obj_handle_t handle; /* handle to the console input */
1392 VARARG(rec,input_records); /* input records */
1394 int written; /* number of records written */
1398 /* Fetch input records from a console input queue */
1399 @REQ(read_console_input)
1400 obj_handle_t handle; /* handle to the console input */
1401 int flush; /* flush the retrieved records from the queue? */
1403 int read; /* number of records read */
1404 VARARG(rec,input_records); /* input records */
1408 /* write data (chars and/or attributes) in a screen buffer */
1409 @REQ(write_console_output)
1410 obj_handle_t handle; /* handle to the console output */
1411 int x; /* position where to start writing */
1413 int mode; /* char info (see below) */
1414 int wrap; /* wrap around at end of line? */
1415 VARARG(data,bytes); /* info to write */
1417 int written; /* number of char infos actually written */
1418 int width; /* width of screen buffer */
1419 int height; /* height of screen buffer */
1423 CHAR_INFO_MODE_TEXT, /* characters only */
1424 CHAR_INFO_MODE_ATTR, /* attributes only */
1425 CHAR_INFO_MODE_TEXTATTR, /* both characters and attributes */
1426 CHAR_INFO_MODE_TEXTSTDATTR /* characters but use standard attributes */
1430 /* fill a screen buffer with constant data (chars and/or attributes) */
1431 @REQ(fill_console_output)
1432 obj_handle_t handle; /* handle to the console output */
1433 int x; /* position where to start writing */
1435 int mode; /* char info mode */
1436 int count; /* number to write */
1437 int wrap; /* wrap around at end of line? */
1438 char_info_t data; /* data to write */
1440 int written; /* number of char infos actually written */
1444 /* read data (chars and/or attributes) from a screen buffer */
1445 @REQ(read_console_output)
1446 obj_handle_t handle; /* handle to the console output */
1447 int x; /* position (x,y) where to start reading */
1449 int mode; /* char info mode */
1450 int wrap; /* wrap around at end of line? */
1452 int width; /* width of screen buffer */
1453 int height; /* height of screen buffer */
1458 /* move a rect (of data) in screen buffer content */
1459 @REQ(move_console_output)
1460 obj_handle_t handle; /* handle to the console output */
1461 short int x_src; /* position (x, y) of rect to start moving from */
1463 short int x_dst; /* position (x, y) of rect to move to */
1465 short int w; /* size of the rect (width, height) to move */
1470 /* Sends a signal to a process group */
1471 @REQ(send_console_signal)
1472 int signal; /* the signal to send */
1473 process_id_t group_id; /* the group to send the signal to */
1477 /* enable directory change notifications */
1478 @REQ(read_directory_changes)
1479 unsigned int filter; /* notification filter */
1480 int subtree; /* watch the subtree? */
1481 int want_data; /* flag indicating whether change data should be collected */
1482 async_data_t async; /* async I/O parameters */
1487 obj_handle_t handle;
1489 VARARG(events,filesystem_event); /* collected filesystem events */
1493 /* Create a file mapping */
1494 @REQ(create_mapping)
1495 unsigned int access; /* wanted access rights */
1496 unsigned int attributes; /* object attributes */
1497 unsigned int protect; /* protection flags (see below) */
1498 mem_size_t size; /* mapping size */
1499 obj_handle_t file_handle; /* file handle */
1500 VARARG(objattr,object_attributes); /* object attributes */
1502 obj_handle_t handle; /* handle to the mapping */
1504 /* per-page protection flags */
1505 #define VPROT_READ 0x01
1506 #define VPROT_WRITE 0x02
1507 #define VPROT_EXEC 0x04
1508 #define VPROT_WRITECOPY 0x08
1509 #define VPROT_GUARD 0x10
1510 #define VPROT_NOCACHE 0x20
1511 #define VPROT_COMMITTED 0x40
1512 #define VPROT_WRITEWATCH 0x80
1513 /* per-mapping protection flags */
1514 #define VPROT_IMAGE 0x0100 /* mapping for an exe image */
1515 #define VPROT_SYSTEM 0x0200 /* system view (underlying mmap not under our control) */
1516 #define VPROT_VALLOC 0x0400 /* allocated by VirtualAlloc */
1517 #define VPROT_NOEXEC 0x0800 /* don't force exec permission */
1520 /* Open a mapping */
1522 unsigned int access; /* wanted access rights */
1523 unsigned int attributes; /* object attributes */
1524 obj_handle_t rootdir; /* root directory */
1525 VARARG(name,unicode_str); /* object name */
1527 obj_handle_t handle; /* handle to the mapping */
1531 /* Get information about a file mapping */
1532 @REQ(get_mapping_info)
1533 obj_handle_t handle; /* handle to the mapping */
1534 unsigned int access; /* wanted access rights */
1536 mem_size_t size; /* mapping size */
1537 int protect; /* protection flags */
1538 int header_size; /* header size (for VPROT_IMAGE mapping) */
1539 client_ptr_t base; /* default base addr (for VPROT_IMAGE mapping) */
1540 obj_handle_t mapping; /* duplicate mapping handle unless removable */
1541 obj_handle_t shared_file; /* shared mapping file handle */
1545 /* Get a range of committed pages in a file mapping */
1546 @REQ(get_mapping_committed_range)
1547 obj_handle_t handle; /* handle to the mapping */
1548 file_pos_t offset; /* starting offset (page-aligned, in bytes) */
1550 mem_size_t size; /* size of range starting at offset (page-aligned, in bytes) */
1551 int committed; /* whether it is a committed range */
1555 /* Add a range to the committed pages in a file mapping */
1556 @REQ(add_mapping_committed_range)
1557 obj_handle_t handle; /* handle to the mapping */
1558 file_pos_t offset; /* starting offset (page-aligned, in bytes) */
1559 mem_size_t size; /* size to set (page-aligned, in bytes) or 0 if only retrieving */
1563 #define SNAP_PROCESS 0x00000001
1564 #define SNAP_THREAD 0x00000002
1565 /* Create a snapshot */
1566 @REQ(create_snapshot)
1567 unsigned int attributes; /* object attributes */
1568 unsigned int flags; /* snapshot flags (SNAP_*) */
1570 obj_handle_t handle; /* handle to the snapshot */
1574 /* Get the next process from a snapshot */
1576 obj_handle_t handle; /* handle to the snapshot */
1577 int reset; /* reset snapshot position? */
1579 int count; /* process usage count */
1580 process_id_t pid; /* process id */
1581 process_id_t ppid; /* parent process id */
1582 int threads; /* number of threads */
1583 int priority; /* process priority */
1584 int handles; /* number of handles */
1585 VARARG(filename,unicode_str); /* file name of main exe */
1589 /* Get the next thread from a snapshot */
1591 obj_handle_t handle; /* handle to the snapshot */
1592 int reset; /* reset snapshot position? */
1594 int count; /* thread usage count */
1595 process_id_t pid; /* process id */
1596 thread_id_t tid; /* thread id */
1597 int base_pri; /* base priority */
1598 int delta_pri; /* delta priority */
1602 /* Wait for a debug event */
1603 @REQ(wait_debug_event)
1604 int get_handle; /* should we alloc a handle for waiting? */
1606 process_id_t pid; /* process id */
1607 thread_id_t tid; /* thread id */
1608 obj_handle_t wait; /* wait handle if no event ready */
1609 VARARG(event,debug_event); /* debug event data */
1613 /* Queue an exception event */
1614 @REQ(queue_exception_event)
1615 int first; /* first chance exception? */
1616 unsigned int code; /* exception code */
1617 unsigned int flags; /* exception flags */
1618 client_ptr_t record; /* exception record */
1619 client_ptr_t address; /* exception address */
1620 data_size_t len; /* size of parameters */
1621 VARARG(params,uints64,len);/* exception parameters */
1622 VARARG(context,context); /* thread context */
1624 obj_handle_t handle; /* handle to the queued event */
1628 /* Retrieve the status of an exception event */
1629 @REQ(get_exception_status)
1630 obj_handle_t handle; /* handle to the queued event */
1632 VARARG(context,context); /* modified thread context */
1636 /* Send an output string to the debugger */
1637 @REQ(output_debug_string)
1638 data_size_t length; /* string length */
1639 client_ptr_t string; /* string to display (in debugged process address space) */
1643 /* Continue a debug event */
1644 @REQ(continue_debug_event)
1645 process_id_t pid; /* process id to continue */
1646 thread_id_t tid; /* thread id to continue */
1647 int status; /* continuation status */
1651 /* Start/stop debugging an existing process */
1653 process_id_t pid; /* id of the process to debug */
1654 int attach; /* 1=attaching / 0=detaching from the process */
1658 /* Simulate a breakpoint in a process */
1660 obj_handle_t handle; /* process handle */
1662 int self; /* was it the caller itself? */
1666 /* Set debugger kill on exit flag */
1667 @REQ(set_debugger_kill_on_exit)
1668 int kill_on_exit; /* 0=detach/1=kill debuggee when debugger dies */
1672 /* Read data from a process address space */
1673 @REQ(read_process_memory)
1674 obj_handle_t handle; /* process handle */
1675 client_ptr_t addr; /* addr to read from */
1677 VARARG(data,bytes); /* result data */
1681 /* Write data to a process address space */
1682 @REQ(write_process_memory)
1683 obj_handle_t handle; /* process handle */
1684 client_ptr_t addr; /* addr to write to */
1685 VARARG(data,bytes); /* data to write */
1689 /* Create a registry key */
1691 obj_handle_t parent; /* handle to the parent key */
1692 unsigned int access; /* desired access rights */
1693 unsigned int attributes; /* object attributes */
1694 unsigned int options; /* creation options */
1695 data_size_t namelen; /* length of key name in bytes */
1696 VARARG(name,unicode_str,namelen); /* key name */
1697 VARARG(class,unicode_str); /* class name */
1699 obj_handle_t hkey; /* handle to the created key */
1700 int created; /* has it been newly created? */
1703 /* Open a registry key */
1705 obj_handle_t parent; /* handle to the parent key */
1706 unsigned int access; /* desired access rights */
1707 unsigned int attributes; /* object attributes */
1708 VARARG(name,unicode_str); /* key name */
1710 obj_handle_t hkey; /* handle to the open key */
1714 /* Delete a registry key */
1716 obj_handle_t hkey; /* handle to the key */
1720 /* Flush a registry key */
1722 obj_handle_t hkey; /* handle to the key */
1726 /* Enumerate registry subkeys */
1728 obj_handle_t hkey; /* handle to registry key */
1729 int index; /* index of subkey (or -1 for current key) */
1730 int info_class; /* requested information class */
1732 int subkeys; /* number of subkeys */
1733 int max_subkey; /* longest subkey name */
1734 int max_class; /* longest class name */
1735 int values; /* number of values */
1736 int max_value; /* longest value name */
1737 int max_data; /* longest value data */
1738 timeout_t modif; /* last modification time */
1739 data_size_t total; /* total length needed for full name and class */
1740 data_size_t namelen; /* length of key name in bytes */
1741 VARARG(name,unicode_str,namelen); /* key name */
1742 VARARG(class,unicode_str); /* class name */
1746 /* Set a value of a registry key */
1748 obj_handle_t hkey; /* handle to registry key */
1749 int type; /* value type */
1750 data_size_t namelen; /* length of value name in bytes */
1751 VARARG(name,unicode_str,namelen); /* value name */
1752 VARARG(data,bytes); /* value data */
1756 /* Retrieve the value of a registry key */
1758 obj_handle_t hkey; /* handle to registry key */
1759 VARARG(name,unicode_str); /* value name */
1761 int type; /* value type */
1762 data_size_t total; /* total length needed for data */
1763 VARARG(data,bytes); /* value data */
1767 /* Enumerate a value of a registry key */
1768 @REQ(enum_key_value)
1769 obj_handle_t hkey; /* handle to registry key */
1770 int index; /* value index */
1771 int info_class; /* requested information class */
1773 int type; /* value type */
1774 data_size_t total; /* total length needed for full name and data */
1775 data_size_t namelen; /* length of value name in bytes */
1776 VARARG(name,unicode_str,namelen); /* value name */
1777 VARARG(data,bytes); /* value data */
1781 /* Delete a value of a registry key */
1782 @REQ(delete_key_value)
1783 obj_handle_t hkey; /* handle to registry key */
1784 VARARG(name,unicode_str); /* value name */
1788 /* Load a registry branch from a file */
1790 obj_handle_t hkey; /* root key to load to */
1791 obj_handle_t file; /* file to load from */
1792 VARARG(name,unicode_str); /* subkey name */
1796 /* UnLoad a registry branch from a file */
1797 @REQ(unload_registry)
1798 obj_handle_t hkey; /* root key to unload to */
1802 /* Save a registry branch to a file */
1804 obj_handle_t hkey; /* key to save */
1805 obj_handle_t file; /* file to save to */
1809 /* Add a registry key change notification */
1810 @REQ(set_registry_notification)
1811 obj_handle_t hkey; /* key to watch for changes */
1812 obj_handle_t event; /* event to set */
1813 int subtree; /* should we watch the whole subtree? */
1814 unsigned int filter; /* things to watch */
1818 /* Create a waitable timer */
1820 unsigned int access; /* wanted access rights */
1821 unsigned int attributes; /* object attributes */
1822 obj_handle_t rootdir; /* root directory */
1823 int manual; /* manual reset */
1824 VARARG(name,unicode_str); /* object name */
1826 obj_handle_t handle; /* handle to the timer */
1830 /* Open a waitable timer */
1832 unsigned int access; /* wanted access rights */
1833 unsigned int attributes; /* object attributes */
1834 obj_handle_t rootdir; /* root directory */
1835 VARARG(name,unicode_str); /* object name */
1837 obj_handle_t handle; /* handle to the timer */
1840 /* Set a waitable timer */
1842 obj_handle_t handle; /* handle to the timer */
1843 timeout_t expire; /* next expiration absolute time */
1844 client_ptr_t callback; /* callback function */
1845 client_ptr_t arg; /* callback argument */
1846 int period; /* timer period in ms */
1848 int signaled; /* was the timer signaled before this call ? */
1851 /* Cancel a waitable timer */
1853 obj_handle_t handle; /* handle to the timer */
1855 int signaled; /* was the timer signaled before this calltime ? */
1858 /* Get information on a waitable timer */
1859 @REQ(get_timer_info)
1860 obj_handle_t handle; /* handle to the timer */
1862 timeout_t when; /* absolute time when the timer next expires */
1863 int signaled; /* is the timer signaled? */
1867 /* Retrieve the current context of a thread */
1868 @REQ(get_thread_context)
1869 obj_handle_t handle; /* thread handle */
1870 unsigned int flags; /* context flags */
1871 int suspend; /* if getting context during suspend */
1873 int self; /* was it a handle to the current thread? */
1874 VARARG(context,context); /* thread context */
1878 /* Set the current context of a thread */
1879 @REQ(set_thread_context)
1880 obj_handle_t handle; /* thread handle */
1881 int suspend; /* if setting context during suspend */
1882 VARARG(context,context); /* thread context */
1884 int self; /* was it a handle to the current thread? */
1888 /* Fetch a selector entry for a thread */
1889 @REQ(get_selector_entry)
1890 obj_handle_t handle; /* thread handle */
1891 int entry; /* LDT entry */
1893 unsigned int base; /* selector base */
1894 unsigned int limit; /* selector limit */
1895 unsigned char flags; /* selector flags */
1901 obj_handle_t table; /* which table to add atom to */
1902 VARARG(name,unicode_str); /* atom name */
1904 atom_t atom; /* resulting atom */
1908 /* Delete an atom */
1910 obj_handle_t table; /* which table to delete atom from */
1911 atom_t atom; /* atom handle */
1917 obj_handle_t table; /* which table to find atom from */
1918 VARARG(name,unicode_str); /* atom name */
1920 atom_t atom; /* atom handle */
1924 /* Get information about an atom */
1925 @REQ(get_atom_information)
1926 obj_handle_t table; /* which table to find atom from */
1927 atom_t atom; /* atom handle */
1929 int count; /* atom lock count */
1930 int pinned; /* whether the atom has been pinned */
1931 data_size_t total; /* actual length of atom name */
1932 VARARG(name,unicode_str); /* atom name */
1936 /* Set information about an atom */
1937 @REQ(set_atom_information)
1938 obj_handle_t table; /* which table to find atom from */
1939 atom_t atom; /* atom handle */
1940 int pinned; /* whether to bump atom information */
1944 /* Empty an atom table */
1945 @REQ(empty_atom_table)
1946 obj_handle_t table; /* which table to find atom from */
1947 int if_pinned; /* whether to delete pinned atoms */
1951 /* Init an atom table */
1952 @REQ(init_atom_table)
1953 int entries; /* number of entries (only for local) */
1955 obj_handle_t table; /* handle to the atom table */
1959 /* Get the message queue of the current thread */
1962 obj_handle_t handle; /* handle to the queue */
1966 /* Set the file descriptor associated to the current thread queue */
1968 obj_handle_t handle; /* handle to the file descriptor */
1972 /* Set the current message queue wakeup mask */
1973 @REQ(set_queue_mask)
1974 unsigned int wake_mask; /* wakeup bits mask */
1975 unsigned int changed_mask; /* changed bits mask */
1976 int skip_wait; /* will we skip waiting if signaled? */
1978 unsigned int wake_bits; /* current wake bits */
1979 unsigned int changed_bits; /* current changed bits */
1983 /* Get the current message queue status */
1984 @REQ(get_queue_status)
1985 int clear; /* should we clear the change bits? */
1987 unsigned int wake_bits; /* wake bits */
1988 unsigned int changed_bits; /* changed bits since last time */
1992 /* Retrieve the process idle event */
1993 @REQ(get_process_idle_event)
1994 obj_handle_t handle; /* process handle */
1996 obj_handle_t event; /* handle to idle event */
2000 /* Send a message to a thread queue */
2002 thread_id_t id; /* thread id */
2003 int type; /* message type (see below) */
2004 int flags; /* message flags (see below) */
2005 user_handle_t win; /* window handle */
2006 unsigned int msg; /* message code */
2007 lparam_t wparam; /* parameters */
2008 lparam_t lparam; /* parameters */
2009 timeout_t timeout; /* timeout for reply */
2010 VARARG(data,message_data); /* message data for sent messages */
2013 @REQ(post_quit_message)
2014 int exit_code; /* exit code to return */
2019 MSG_ASCII, /* Ascii message (from SendMessageA) */
2020 MSG_UNICODE, /* Unicode message (from SendMessageW) */
2021 MSG_NOTIFY, /* notify message (from SendNotifyMessageW), always Unicode */
2022 MSG_CALLBACK, /* callback message (from SendMessageCallbackW), always Unicode */
2023 MSG_CALLBACK_RESULT,/* result of a callback message */
2024 MSG_OTHER_PROCESS, /* sent from other process, may include vararg data, always Unicode */
2025 MSG_POSTED, /* posted message (from PostMessageW), always Unicode */
2026 MSG_HARDWARE, /* hardware message */
2027 MSG_WINEVENT /* winevent message */
2029 #define SEND_MSG_ABORT_IF_HUNG 0x01
2032 /* Send a hardware message to a thread queue */
2033 @REQ(send_hardware_message)
2034 user_handle_t win; /* window handle */
2035 hw_input_t input; /* input data */
2036 unsigned int flags; /* flags (see below) */
2037 unsigned int msg; /* message code */
2039 #define SEND_HWMSG_INJECTED 0x01
2042 /* Get a message from the current queue */
2044 unsigned int flags; /* PM_* flags */
2045 user_handle_t get_win; /* window handle to get */
2046 unsigned int get_first; /* first message code to get */
2047 unsigned int get_last; /* last message code to get */
2048 unsigned int hw_id; /* id of the previous hardware message (or 0) */
2049 unsigned int wake_mask; /* wakeup bits mask */
2050 unsigned int changed_mask; /* changed bits mask */
2052 user_handle_t win; /* window handle */
2053 unsigned int msg; /* message code */
2054 lparam_t wparam; /* parameters */
2055 lparam_t lparam; /* parameters */
2056 int type; /* message type */
2057 unsigned int time; /* message time */
2058 unsigned int active_hooks; /* active hooks bitmap */
2059 data_size_t total; /* total size of extra data */
2060 VARARG(data,message_data); /* message data for sent messages */
2064 /* Reply to a sent message */
2066 int remove; /* should we remove the message? */
2067 lparam_t result; /* message result */
2068 VARARG(data,bytes); /* message data for sent messages */
2072 /* Accept the current hardware message */
2073 @REQ(accept_hardware_message)
2074 unsigned int hw_id; /* id of the hardware message */
2075 int remove; /* should we remove the message? */
2076 user_handle_t new_win; /* new destination window for current message */
2080 /* Retrieve the reply for the last message sent */
2081 @REQ(get_message_reply)
2082 int cancel; /* cancel message if not ready? */
2084 lparam_t result; /* message result */
2085 VARARG(data,bytes); /* message data for sent messages */
2089 /* Set a window timer */
2091 user_handle_t win; /* window handle */
2092 unsigned int msg; /* message to post */
2093 unsigned int rate; /* timer rate in ms */
2094 lparam_t id; /* timer id */
2095 lparam_t lparam; /* message lparam (callback proc) */
2097 lparam_t id; /* timer id */
2101 /* Kill a window timer */
2102 @REQ(kill_win_timer)
2103 user_handle_t win; /* window handle */
2104 lparam_t id; /* timer id */
2105 unsigned int msg; /* message to post */
2109 /* check if the thread owning the window is hung */
2110 @REQ(is_window_hung)
2111 user_handle_t win; /* window handle */
2117 /* Retrieve info about a serial port */
2118 @REQ(get_serial_info)
2119 obj_handle_t handle; /* handle to comm port */
2121 unsigned int readinterval;
2122 unsigned int readconst;
2123 unsigned int readmult;
2124 unsigned int writeconst;
2125 unsigned int writemult;
2126 unsigned int eventmask;
2130 /* Set info about a serial port */
2131 @REQ(set_serial_info)
2132 obj_handle_t handle; /* handle to comm port */
2133 int flags; /* bitmask to set values (see below) */
2134 unsigned int readinterval;
2135 unsigned int readconst;
2136 unsigned int readmult;
2137 unsigned int writeconst;
2138 unsigned int writemult;
2139 unsigned int eventmask;
2141 #define SERIALINFO_SET_TIMEOUTS 0x01
2142 #define SERIALINFO_SET_MASK 0x02
2145 /* Create an async I/O */
2146 @REQ(register_async)
2147 int type; /* type of queue to look after */
2148 async_data_t async; /* async I/O parameters */
2149 int count; /* count - usually # of bytes to be read/written */
2151 #define ASYNC_TYPE_READ 0x01
2152 #define ASYNC_TYPE_WRITE 0x02
2153 #define ASYNC_TYPE_WAIT 0x03
2156 /* Cancel all async op on a fd */
2158 obj_handle_t handle; /* handle to comm port, socket or file */
2159 client_ptr_t iosb; /* I/O status block (NULL=all) */
2160 int only_thread; /* cancel matching this thread */
2164 /* Perform an ioctl on a file */
2166 ioctl_code_t code; /* ioctl code */
2167 async_data_t async; /* async I/O parameters */
2168 int blocking; /* whether it's a blocking ioctl */
2169 VARARG(in_data,bytes); /* ioctl input data */
2171 obj_handle_t wait; /* handle to wait on for blocking ioctl */
2172 unsigned int options; /* device open options */
2173 VARARG(out_data,bytes); /* ioctl output data */
2177 /* Retrieve results of an async ioctl */
2178 @REQ(get_ioctl_result)
2179 obj_handle_t handle; /* handle to the device */
2180 client_ptr_t user_arg; /* user arg used to identify the request */
2182 VARARG(out_data,bytes); /* ioctl output data */
2186 /* Create a named pipe */
2187 @REQ(create_named_pipe)
2188 unsigned int access;
2189 unsigned int attributes; /* object attributes */
2190 obj_handle_t rootdir; /* root directory */
2191 unsigned int options;
2192 unsigned int maxinstances;
2193 unsigned int outsize;
2194 unsigned int insize;
2197 VARARG(name,unicode_str); /* pipe name */
2199 obj_handle_t handle; /* handle to the pipe */
2202 /* flags in create_named_pipe and get_named_pipe_info */
2203 #define NAMED_PIPE_MESSAGE_STREAM_WRITE 0x0001
2204 #define NAMED_PIPE_MESSAGE_STREAM_READ 0x0002
2205 #define NAMED_PIPE_NONBLOCKING_MODE 0x0004
2206 #define NAMED_PIPE_SERVER_END 0x8000
2209 @REQ(get_named_pipe_info)
2210 obj_handle_t handle;
2213 unsigned int maxinstances;
2214 unsigned int instances;
2215 unsigned int outsize;
2216 unsigned int insize;
2220 /* Create a window */
2222 user_handle_t parent; /* parent window */
2223 user_handle_t owner; /* owner window */
2224 atom_t atom; /* class atom */
2225 mod_handle_t instance; /* module instance */
2226 VARARG(class,unicode_str); /* class name */
2228 user_handle_t handle; /* created window */
2229 user_handle_t parent; /* full handle of parent */
2230 user_handle_t owner; /* full handle of owner */
2231 int extra; /* number of extra bytes */
2232 client_ptr_t class_ptr; /* pointer to class in client address space */
2236 /* Destroy a window */
2237 @REQ(destroy_window)
2238 user_handle_t handle; /* handle to the window */
2242 /* Retrieve the desktop window for the current thread */
2243 @REQ(get_desktop_window)
2244 int force; /* force creation if it doesn't exist */
2246 user_handle_t top_window; /* handle to the desktop window */
2247 user_handle_t msg_window; /* handle to the top-level HWND_MESSAGE parent */
2251 /* Set a window owner */
2252 @REQ(set_window_owner)
2253 user_handle_t handle; /* handle to the window */
2254 user_handle_t owner; /* new owner */
2256 user_handle_t full_owner; /* full handle of new owner */
2257 user_handle_t prev_owner; /* full handle of previous owner */
2261 /* Get information from a window handle */
2262 @REQ(get_window_info)
2263 user_handle_t handle; /* handle to the window */
2265 user_handle_t full_handle; /* full 32-bit handle */
2266 user_handle_t last_active; /* last active popup */
2267 process_id_t pid; /* process owning the window */
2268 thread_id_t tid; /* thread owning the window */
2269 atom_t atom; /* class atom */
2270 int is_unicode; /* ANSI or unicode */
2274 /* Set some information in a window */
2275 @REQ(set_window_info)
2276 unsigned short flags; /* flags for fields to set (see below) */
2277 short int is_unicode; /* ANSI or unicode */
2278 user_handle_t handle; /* handle to the window */
2279 unsigned int style; /* window style */
2280 unsigned int ex_style; /* window extended style */
2281 unsigned int id; /* window id */
2282 mod_handle_t instance; /* creator instance */
2283 lparam_t user_data; /* user-specific data */
2284 int extra_offset; /* offset to set in extra bytes */
2285 data_size_t extra_size; /* size to set in extra bytes */
2286 lparam_t extra_value; /* value to set in extra bytes */
2288 unsigned int old_style; /* old window style */
2289 unsigned int old_ex_style; /* old window extended style */
2290 mod_handle_t old_instance; /* old creator instance */
2291 lparam_t old_user_data; /* old user-specific data */
2292 lparam_t old_extra_value; /* old value in extra bytes */
2293 unsigned int old_id; /* old window id */
2295 #define SET_WIN_STYLE 0x01
2296 #define SET_WIN_EXSTYLE 0x02
2297 #define SET_WIN_ID 0x04
2298 #define SET_WIN_INSTANCE 0x08
2299 #define SET_WIN_USERDATA 0x10
2300 #define SET_WIN_EXTRA 0x20
2301 #define SET_WIN_UNICODE 0x40
2304 /* Set the parent of a window */
2306 user_handle_t handle; /* handle to the window */
2307 user_handle_t parent; /* handle to the parent */
2309 user_handle_t old_parent; /* old parent window */
2310 user_handle_t full_parent; /* full handle of new parent */
2314 /* Get a list of the window parents, up to the root of the tree */
2315 @REQ(get_window_parents)
2316 user_handle_t handle; /* handle to the window */
2318 int count; /* total count of parents */
2319 VARARG(parents,user_handles); /* parent handles */
2323 /* Get a list of the window children */
2324 @REQ(get_window_children)
2325 obj_handle_t desktop; /* handle to desktop */
2326 user_handle_t parent; /* parent window */
2327 atom_t atom; /* class atom for the listed children */
2328 thread_id_t tid; /* thread owning the listed children */
2329 VARARG(class,unicode_str); /* class name */
2331 int count; /* total count of children */
2332 VARARG(children,user_handles); /* children handles */
2336 /* Get a list of the window children that contain a given point */
2337 @REQ(get_window_children_from_point)
2338 user_handle_t parent; /* parent window */
2339 int x; /* point in parent coordinates */
2342 int count; /* total count of children */
2343 VARARG(children,user_handles); /* children handles */
2347 /* Get window tree information from a window handle */
2348 @REQ(get_window_tree)
2349 user_handle_t handle; /* handle to the window */
2351 user_handle_t parent; /* parent window */
2352 user_handle_t owner; /* owner window */
2353 user_handle_t next_sibling; /* next sibling in Z-order */
2354 user_handle_t prev_sibling; /* prev sibling in Z-order */
2355 user_handle_t first_sibling; /* first sibling in Z-order */
2356 user_handle_t last_sibling; /* last sibling in Z-order */
2357 user_handle_t first_child; /* first child */
2358 user_handle_t last_child; /* last child */
2361 /* Set the position and Z order of a window */
2362 @REQ(set_window_pos)
2363 unsigned int flags; /* SWP_* flags */
2364 user_handle_t handle; /* handle to the window */
2365 user_handle_t previous; /* previous window in Z order */
2366 rectangle_t window; /* window rectangle (in parent coords) */
2367 rectangle_t client; /* client rectangle (in parent coords) */
2368 VARARG(valid,rectangles); /* valid rectangles from WM_NCCALCSIZE (in parent coords) */
2370 unsigned int new_style; /* new window style */
2371 unsigned int new_ex_style; /* new window extended style */
2375 /* Get the window and client rectangles of a window */
2376 @REQ(get_window_rectangles)
2377 user_handle_t handle; /* handle to the window */
2378 int relative; /* coords relative to (see below) */
2380 rectangle_t window; /* window rectangle */
2381 rectangle_t visible; /* visible part of the window rectangle */
2382 rectangle_t client; /* client rectangle */
2384 enum coords_relative
2386 COORDS_CLIENT, /* relative to client area */
2387 COORDS_WINDOW, /* relative to whole window area */
2388 COORDS_PARENT, /* relative to parent's client area */
2389 COORDS_SCREEN /* relative to screen origin */
2393 /* Get the window text */
2394 @REQ(get_window_text)
2395 user_handle_t handle; /* handle to the window */
2397 VARARG(text,unicode_str); /* window text */
2401 /* Set the window text */
2402 @REQ(set_window_text)
2403 user_handle_t handle; /* handle to the window */
2404 VARARG(text,unicode_str); /* window text */
2408 /* Get the coordinates offset between two windows */
2409 @REQ(get_windows_offset)
2410 user_handle_t from; /* handle to the first window */
2411 user_handle_t to; /* handle to the second window */
2413 int x; /* x coordinate offset */
2414 int y; /* y coordinate offset */
2415 int mirror; /* whether to mirror the x coordinate */
2419 /* Get the visible region of a window */
2420 @REQ(get_visible_region)
2421 user_handle_t window; /* handle to the window */
2422 unsigned int flags; /* DCX flags */
2424 user_handle_t top_win; /* top window to clip against */
2425 rectangle_t top_rect; /* top window visible rect with screen coords */
2426 rectangle_t win_rect; /* window rect in screen coords */
2427 data_size_t total_size; /* total size of the resulting region */
2428 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2432 /* Get the window region */
2433 @REQ(get_window_region)
2434 user_handle_t window; /* handle to the window */
2436 data_size_t total_size; /* total size of the resulting region */
2437 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2441 /* Set the window region */
2442 @REQ(set_window_region)
2443 user_handle_t window; /* handle to the window */
2444 int redraw; /* redraw the window? */
2445 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2449 /* Get the window update region */
2450 @REQ(get_update_region)
2451 user_handle_t window; /* handle to the window */
2452 user_handle_t from_child; /* child to start searching from */
2453 unsigned int flags; /* update flags (see below) */
2455 user_handle_t child; /* child to repaint (or window itself) */
2456 unsigned int flags; /* resulting update flags (see below) */
2457 data_size_t total_size; /* total size of the resulting region */
2458 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2460 #define UPDATE_NONCLIENT 0x01 /* get region for repainting non-client area */
2461 #define UPDATE_ERASE 0x02 /* get region for erasing client area */
2462 #define UPDATE_PAINT 0x04 /* get region for painting client area */
2463 #define UPDATE_INTERNALPAINT 0x08 /* get region if internal paint is pending */
2464 #define UPDATE_ALLCHILDREN 0x10 /* force repaint of all children */
2465 #define UPDATE_NOCHILDREN 0x20 /* don't try to repaint any children */
2466 #define UPDATE_NOREGION 0x40 /* don't return a region, only the flags */
2467 #define UPDATE_DELAYED_ERASE 0x80 /* still needs erase after BeginPaint */
2470 /* Update the z order of a window so that a given rectangle is fully visible */
2471 @REQ(update_window_zorder)
2472 user_handle_t window; /* handle to the window */
2473 rectangle_t rect; /* rectangle that must be visible (in client coords) */
2477 /* Mark parts of a window as needing a redraw */
2479 user_handle_t window; /* handle to the window */
2480 unsigned int flags; /* RDW_* flags */
2481 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2485 /* Set a window property */
2486 @REQ(set_window_property)
2487 user_handle_t window; /* handle to the window */
2488 lparam_t data; /* data to store */
2489 atom_t atom; /* property atom (if no name specified) */
2490 VARARG(name,unicode_str); /* property name */
2494 /* Remove a window property */
2495 @REQ(remove_window_property)
2496 user_handle_t window; /* handle to the window */
2497 atom_t atom; /* property atom (if no name specified) */
2498 VARARG(name,unicode_str); /* property name */
2500 lparam_t data; /* data stored in property */
2504 /* Get a window property */
2505 @REQ(get_window_property)
2506 user_handle_t window; /* handle to the window */
2507 atom_t atom; /* property atom (if no name specified) */
2508 VARARG(name,unicode_str); /* property name */
2510 lparam_t data; /* data stored in property */
2514 /* Get the list of properties of a window */
2515 @REQ(get_window_properties)
2516 user_handle_t window; /* handle to the window */
2518 int total; /* total number of properties */
2519 VARARG(props,properties); /* list of properties */
2523 /* Create a window station */
2524 @REQ(create_winstation)
2525 unsigned int flags; /* window station flags */
2526 unsigned int access; /* wanted access rights */
2527 unsigned int attributes; /* object attributes */
2528 VARARG(name,unicode_str); /* object name */
2530 obj_handle_t handle; /* handle to the window station */
2534 /* Open a handle to a window station */
2535 @REQ(open_winstation)
2536 unsigned int access; /* wanted access rights */
2537 unsigned int attributes; /* object attributes */
2538 VARARG(name,unicode_str); /* object name */
2540 obj_handle_t handle; /* handle to the window station */
2544 /* Close a window station */
2545 @REQ(close_winstation)
2546 obj_handle_t handle; /* handle to the window station */
2550 /* Get the process current window station */
2551 @REQ(get_process_winstation)
2553 obj_handle_t handle; /* handle to the window station */
2557 /* Set the process current window station */
2558 @REQ(set_process_winstation)
2559 obj_handle_t handle; /* handle to the window station */
2563 /* Enumerate window stations */
2564 @REQ(enum_winstation)
2565 unsigned int index; /* current index */
2567 unsigned int next; /* next index */
2568 VARARG(name,unicode_str); /* window station name */
2572 /* Create a desktop */
2573 @REQ(create_desktop)
2574 unsigned int flags; /* desktop flags */
2575 unsigned int access; /* wanted access rights */
2576 unsigned int attributes; /* object attributes */
2577 VARARG(name,unicode_str); /* object name */
2579 obj_handle_t handle; /* handle to the desktop */
2583 /* Open a handle to a desktop */
2585 obj_handle_t winsta; /* window station to open (null allowed) */
2586 unsigned int flags; /* desktop flags */
2587 unsigned int access; /* wanted access rights */
2588 unsigned int attributes; /* object attributes */
2589 VARARG(name,unicode_str); /* object name */
2591 obj_handle_t handle; /* handle to the desktop */
2595 /* Close a desktop */
2597 obj_handle_t handle; /* handle to the desktop */
2601 /* Get the thread current desktop */
2602 @REQ(get_thread_desktop)
2603 thread_id_t tid; /* thread id */
2605 obj_handle_t handle; /* handle to the desktop */
2609 /* Set the thread current desktop */
2610 @REQ(set_thread_desktop)
2611 obj_handle_t handle; /* handle to the desktop */
2615 /* Enumerate desktops */
2617 obj_handle_t winstation; /* handle to the window station */
2618 unsigned int index; /* current index */
2620 unsigned int next; /* next index */
2621 VARARG(name,unicode_str); /* window station name */
2625 /* Get/set information about a user object (window station or desktop) */
2626 @REQ(set_user_object_info)
2627 obj_handle_t handle; /* handle to the object */
2628 unsigned int flags; /* information to set */
2629 unsigned int obj_flags; /* new object flags */
2631 int is_desktop; /* is object a desktop? */
2632 unsigned int old_obj_flags; /* old object flags */
2633 VARARG(name,unicode_str); /* object name */
2635 #define SET_USER_OBJECT_FLAGS 1
2638 /* Attach (or detach) thread inputs */
2639 @REQ(attach_thread_input)
2640 thread_id_t tid_from; /* thread to be attached */
2641 thread_id_t tid_to; /* thread to which tid_from should be attached */
2642 int attach; /* is it an attach? */
2646 /* Get input data for a given thread */
2647 @REQ(get_thread_input)
2648 thread_id_t tid; /* id of thread */
2650 user_handle_t focus; /* handle to the focus window */
2651 user_handle_t capture; /* handle to the capture window */
2652 user_handle_t active; /* handle to the active window */
2653 user_handle_t foreground; /* handle to the global foreground window */
2654 user_handle_t menu_owner; /* handle to the menu owner */
2655 user_handle_t move_size; /* handle to the moving/resizing window */
2656 user_handle_t caret; /* handle to the caret window */
2657 user_handle_t cursor; /* handle to the cursor */
2658 int show_count; /* cursor show count */
2659 rectangle_t rect; /* caret rectangle */
2663 /* Get the time of the last input event */
2664 @REQ(get_last_input_time)
2670 /* Retrieve queue keyboard state for a given thread */
2672 thread_id_t tid; /* id of thread */
2673 int key; /* optional key code or -1 */
2675 unsigned char state; /* state of specified key */
2676 VARARG(keystate,bytes); /* state array for all the keys */
2679 /* Set queue keyboard state for a given thread */
2681 thread_id_t tid; /* id of thread */
2682 VARARG(keystate,bytes); /* state array for all the keys */
2685 /* Set the system foreground window */
2686 @REQ(set_foreground_window)
2687 user_handle_t handle; /* handle to the foreground window */
2689 user_handle_t previous; /* handle to the previous foreground window */
2690 int send_msg_old; /* whether we have to send a msg to the old window */
2691 int send_msg_new; /* whether we have to send a msg to the new window */
2694 /* Set the current thread focus window */
2695 @REQ(set_focus_window)
2696 user_handle_t handle; /* handle to the focus window */
2698 user_handle_t previous; /* handle to the previous focus window */
2701 /* Set the current thread active window */
2702 @REQ(set_active_window)
2703 user_handle_t handle; /* handle to the active window */
2705 user_handle_t previous; /* handle to the previous active window */
2708 /* Set the current thread capture window */
2709 @REQ(set_capture_window)
2710 user_handle_t handle; /* handle to the capture window */
2711 unsigned int flags; /* capture flags (see below) */
2713 user_handle_t previous; /* handle to the previous capture window */
2714 user_handle_t full_handle; /* full 32-bit handle of new capture window */
2716 #define CAPTURE_MENU 0x01 /* capture is for a menu */
2717 #define CAPTURE_MOVESIZE 0x02 /* capture is for moving/resizing */
2720 /* Set the current thread caret window */
2721 @REQ(set_caret_window)
2722 user_handle_t handle; /* handle to the caret window */
2723 int width; /* caret width */
2724 int height; /* caret height */
2726 user_handle_t previous; /* handle to the previous caret window */
2727 rectangle_t old_rect; /* previous caret rectangle */
2728 int old_hide; /* previous hide count */
2729 int old_state; /* previous caret state (1=on, 0=off) */
2733 /* Set the current thread caret information */
2734 @REQ(set_caret_info)
2735 unsigned int flags; /* caret flags (see below) */
2736 user_handle_t handle; /* handle to the caret window */
2737 int x; /* caret x position */
2738 int y; /* caret y position */
2739 int hide; /* increment for hide count (can be negative to show it) */
2740 int state; /* caret state (1=on, 0=off, -1=toggle current state) */
2742 user_handle_t full_handle; /* handle to the current caret window */
2743 rectangle_t old_rect; /* previous caret rectangle */
2744 int old_hide; /* previous hide count */
2745 int old_state; /* previous caret state (1=on, 0=off) */
2747 #define SET_CARET_POS 0x01 /* set the caret position from x,y */
2748 #define SET_CARET_HIDE 0x02 /* increment the caret hide count */
2749 #define SET_CARET_STATE 0x04 /* set the caret on/off state */
2752 /* Set a window hook */
2754 int id; /* id of the hook */
2755 process_id_t pid; /* id of process to set the hook into */
2756 thread_id_t tid; /* id of thread to set the hook into */
2759 client_ptr_t proc; /* hook procedure */
2761 int unicode; /* is it a unicode hook? */
2762 VARARG(module,unicode_str); /* module name */
2764 user_handle_t handle; /* handle to the hook */
2765 unsigned int active_hooks; /* active hooks bitmap */
2769 /* Remove a window hook */
2771 user_handle_t handle; /* handle to the hook */
2772 client_ptr_t proc; /* hook procedure if handle is 0 */
2773 int id; /* id of the hook if handle is 0 */
2775 unsigned int active_hooks; /* active hooks bitmap */
2779 /* Start calling a hook chain */
2780 @REQ(start_hook_chain)
2781 int id; /* id of the hook */
2782 int event; /* signalled event */
2783 user_handle_t window; /* handle to the event window */
2784 int object_id; /* object id for out of context winevent */
2785 int child_id; /* child id for out of context winevent */
2787 user_handle_t handle; /* handle to the next hook */
2788 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2789 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2790 int unicode; /* is it a unicode hook? */
2791 client_ptr_t proc; /* hook procedure */
2792 unsigned int active_hooks; /* active hooks bitmap */
2793 VARARG(module,unicode_str); /* module name */
2797 /* Finished calling a hook chain */
2798 @REQ(finish_hook_chain)
2799 int id; /* id of the hook */
2803 /* Get the hook information */
2805 user_handle_t handle; /* handle to the current hook */
2806 int get_next; /* do we want info about current or next hook? */
2807 int event; /* signalled event */
2808 user_handle_t window; /* handle to the event window */
2809 int object_id; /* object id for out of context winevent */
2810 int child_id; /* child id for out of context winevent */
2812 user_handle_t handle; /* handle to the hook */
2813 int id; /* id of the hook */
2814 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2815 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2816 client_ptr_t proc; /* hook procedure */
2817 int unicode; /* is it a unicode hook? */
2818 VARARG(module,unicode_str); /* module name */
2822 /* Create a window class */
2824 int local; /* is it a local class? */
2825 atom_t atom; /* class atom */
2826 unsigned int style; /* class style */
2827 mod_handle_t instance; /* module instance */
2828 int extra; /* number of extra class bytes */
2829 int win_extra; /* number of window extra bytes */
2830 client_ptr_t client_ptr; /* pointer to class in client address space */
2831 VARARG(name,unicode_str); /* class name */
2833 atom_t atom; /* resulting class atom */
2837 /* Destroy a window class */
2839 atom_t atom; /* class atom */
2840 mod_handle_t instance; /* module instance */
2841 VARARG(name,unicode_str); /* class name */
2843 client_ptr_t client_ptr; /* pointer to class in client address space */
2847 /* Set some information in a class */
2848 @REQ(set_class_info)
2849 user_handle_t window; /* handle to the window */
2850 unsigned int flags; /* flags for info to set (see below) */
2851 atom_t atom; /* class atom */
2852 unsigned int style; /* class style */
2853 int win_extra; /* number of window extra bytes */
2854 mod_handle_t instance; /* module instance */
2855 int extra_offset; /* offset to set in extra bytes */
2856 data_size_t extra_size; /* size to set in extra bytes */
2857 lparam_t extra_value; /* value to set in extra bytes */
2859 atom_t old_atom; /* previous class atom */
2860 unsigned int old_style; /* previous class style */
2861 int old_extra; /* previous number of class extra bytes */
2862 int old_win_extra; /* previous number of window extra bytes */
2863 mod_handle_t old_instance; /* previous module instance */
2864 lparam_t old_extra_value; /* old value in extra bytes */
2866 #define SET_CLASS_ATOM 0x0001
2867 #define SET_CLASS_STYLE 0x0002
2868 #define SET_CLASS_WINEXTRA 0x0004
2869 #define SET_CLASS_INSTANCE 0x0008
2870 #define SET_CLASS_EXTRA 0x0010
2873 /* Set/get clipboard information */
2874 @REQ(set_clipboard_info)
2875 unsigned int flags; /* flags for fields to set (see below) */
2876 user_handle_t clipboard; /* clipboard window */
2877 user_handle_t owner; /* clipboard owner */
2878 user_handle_t viewer; /* first clipboard viewer */
2879 unsigned int seqno; /* change sequence number */
2881 unsigned int flags; /* status flags (see below) */
2882 user_handle_t old_clipboard; /* old clipboard window */
2883 user_handle_t old_owner; /* old clipboard owner */
2884 user_handle_t old_viewer; /* old clipboard viewer */
2885 unsigned int seqno; /* current sequence number */
2888 #define SET_CB_OPEN 0x001
2889 #define SET_CB_OWNER 0x002
2890 #define SET_CB_VIEWER 0x004
2891 #define SET_CB_SEQNO 0x008
2892 #define SET_CB_RELOWNER 0x010
2893 #define SET_CB_CLOSE 0x020
2894 #define CB_OPEN 0x040
2895 #define CB_OWNER 0x080
2896 #define CB_PROCESS 0x100
2899 /* Open a security token */
2901 obj_handle_t handle; /* handle to the thread or process */
2902 unsigned int access; /* access rights to the new token */
2903 unsigned int attributes;/* object attributes */
2904 unsigned int flags; /* flags (see below) */
2906 obj_handle_t token; /* handle to the token */
2908 #define OPEN_TOKEN_THREAD 1
2909 #define OPEN_TOKEN_AS_SELF 2
2912 /* Set/get the global windows */
2913 @REQ(set_global_windows)
2914 unsigned int flags; /* flags for fields to set (see below) */
2915 user_handle_t shell_window; /* handle to the new shell window */
2916 user_handle_t shell_listview; /* handle to the new shell listview window */
2917 user_handle_t progman_window; /* handle to the new program manager window */
2918 user_handle_t taskman_window; /* handle to the new task manager window */
2920 user_handle_t old_shell_window; /* handle to the shell window */
2921 user_handle_t old_shell_listview; /* handle to the shell listview window */
2922 user_handle_t old_progman_window; /* handle to the new program manager window */
2923 user_handle_t old_taskman_window; /* handle to the new task manager window */
2925 #define SET_GLOBAL_SHELL_WINDOWS 0x01 /* set both main shell and listview windows */
2926 #define SET_GLOBAL_PROGMAN_WINDOW 0x02
2927 #define SET_GLOBAL_TASKMAN_WINDOW 0x04
2929 /* Adjust the privileges held by a token */
2930 @REQ(adjust_token_privileges)
2931 obj_handle_t handle; /* handle to the token */
2932 int disable_all; /* disable all privileges? */
2933 int get_modified_state; /* get modified privileges? */
2934 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to enable/disable/remove */
2936 unsigned int len; /* total length in bytes required to store token privileges */
2937 VARARG(privileges,LUID_AND_ATTRIBUTES); /* modified privileges */
2940 /* Retrieves the set of privileges held by or available to a token */
2941 @REQ(get_token_privileges)
2942 obj_handle_t handle; /* handle to the token */
2944 unsigned int len; /* total length in bytes required to store token privileges */
2945 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
2948 /* Check the token has the required privileges */
2949 @REQ(check_token_privileges)
2950 obj_handle_t handle; /* handle to the token */
2951 int all_required; /* are all the privileges required for the check to succeed? */
2952 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to check */
2954 int has_privileges; /* does the token have the required privileges? */
2955 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
2958 @REQ(duplicate_token)
2959 obj_handle_t handle; /* handle to the token to duplicate */
2960 unsigned int access; /* access rights to the new token */
2961 unsigned int attributes; /* object attributes */
2962 int primary; /* is the new token to be a primary one? */
2963 int impersonation_level; /* impersonation level of the new token */
2965 obj_handle_t new_handle; /* duplicated handle */
2969 obj_handle_t handle; /* handle to the token */
2970 unsigned int desired_access; /* desired access to the object */
2971 unsigned int mapping_read; /* mapping from generic read to specific rights */
2972 unsigned int mapping_write; /* mapping from generic write to specific rights */
2973 unsigned int mapping_execute; /* mapping from generic execute to specific rights */
2974 unsigned int mapping_all; /* mapping from generic all to specific rights */
2975 VARARG(sd,security_descriptor); /* security descriptor to check */
2977 unsigned int access_granted; /* access rights actually granted */
2978 unsigned int access_status; /* was access granted? */
2979 unsigned int privileges_len; /* length needed to store privileges */
2980 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges used during access check */
2984 obj_handle_t handle; /* handle to the token */
2985 unsigned int which_sid; /* which SID to retrieve from the token */
2987 data_size_t sid_len; /* length needed to store sid */
2988 VARARG(sid,SID); /* the sid specified by which_sid from the token */
2991 @REQ(get_token_groups)
2992 obj_handle_t handle; /* handle to the token */
2994 data_size_t user_len; /* length needed to store user */
2995 VARARG(user,token_groups); /* groups the token's user belongs to */
2998 @REQ(get_token_default_dacl)
2999 obj_handle_t handle; /* handle to the token */
3001 data_size_t acl_len; /* length needed to store access control list */
3002 VARARG(acl,ACL); /* access control list */
3005 @REQ(set_token_default_dacl)
3006 obj_handle_t handle; /* handle to the token */
3007 VARARG(acl,ACL); /* default dacl to set */
3010 @REQ(set_security_object)
3011 obj_handle_t handle; /* handle to the object */
3012 unsigned int security_info; /* which parts of security descriptor to set */
3013 VARARG(sd,security_descriptor); /* security descriptor to set */
3016 @REQ(get_security_object)
3017 obj_handle_t handle; /* handle to the object */
3018 unsigned int security_info; /* which parts of security descriptor to get */
3020 unsigned int sd_len; /* buffer size needed for sd */
3021 VARARG(sd,security_descriptor); /* retrieved security descriptor */
3024 /* Create a mailslot */
3025 @REQ(create_mailslot)
3026 unsigned int access; /* wanted access rights */
3027 unsigned int attributes; /* object attributes */
3028 obj_handle_t rootdir; /* root directory */
3029 timeout_t read_timeout;
3030 unsigned int max_msgsize;
3031 VARARG(name,unicode_str); /* mailslot name */
3033 obj_handle_t handle; /* handle to the mailslot */
3037 /* Set mailslot information */
3038 @REQ(set_mailslot_info)
3039 obj_handle_t handle; /* handle to the mailslot */
3040 timeout_t read_timeout;
3043 timeout_t read_timeout;
3044 unsigned int max_msgsize;
3046 #define MAILSLOT_SET_READ_TIMEOUT 1
3049 /* Create a directory object */
3050 @REQ(create_directory)
3051 unsigned int access; /* access flags */
3052 unsigned int attributes; /* object attributes */
3053 obj_handle_t rootdir; /* root directory */
3054 VARARG(directory_name,unicode_str); /* Directory name */
3056 obj_handle_t handle; /* handle to the directory */
3060 /* Open a directory object */
3061 @REQ(open_directory)
3062 unsigned int access; /* access flags */
3063 unsigned int attributes; /* object attributes */
3064 obj_handle_t rootdir; /* root directory */
3065 VARARG(directory_name,unicode_str); /* Directory name */
3067 obj_handle_t handle; /* handle to the directory */
3071 /* Get a directory entry by index */
3072 @REQ(get_directory_entry)
3073 obj_handle_t handle; /* handle to the directory */
3074 unsigned int index; /* entry index */
3076 data_size_t name_len; /* length of the entry name in bytes */
3077 VARARG(name,unicode_str,name_len); /* entry name */
3078 VARARG(type,unicode_str); /* entry type */
3082 /* Create a symbolic link object */
3083 @REQ(create_symlink)
3084 unsigned int access; /* access flags */
3085 unsigned int attributes; /* object attributes */
3086 obj_handle_t rootdir; /* root directory */
3087 data_size_t name_len; /* length of the symlink name in bytes */
3088 VARARG(name,unicode_str,name_len); /* symlink name */
3089 VARARG(target_name,unicode_str); /* target name */
3091 obj_handle_t handle; /* handle to the symlink */
3095 /* Open a symbolic link object */
3097 unsigned int access; /* access flags */
3098 unsigned int attributes; /* object attributes */
3099 obj_handle_t rootdir; /* root directory */
3100 VARARG(name,unicode_str); /* symlink name */
3102 obj_handle_t handle; /* handle to the symlink */
3106 /* Query a symbolic link object */
3108 obj_handle_t handle; /* handle to the symlink */
3110 data_size_t total; /* total needed size for name */
3111 VARARG(target_name,unicode_str); /* target name */
3115 /* Query basic object information */
3116 @REQ(get_object_info)
3117 obj_handle_t handle; /* handle to the object */
3119 unsigned int access; /* granted access mask */
3120 unsigned int ref_count; /* object ref count */
3121 data_size_t total; /* total needed size for name */
3122 VARARG(name,unicode_str); /* object name */
3126 /* Unlink a named object */
3128 obj_handle_t handle; /* handle to the object */
3132 /* Query the impersonation level of an impersonation token */
3133 @REQ(get_token_impersonation_level)
3134 obj_handle_t handle; /* handle to the object */
3136 int impersonation_level; /* impersonation level of the impersonation token */
3139 /* Allocate a locally-unique identifier */
3140 @REQ(allocate_locally_unique_id)
3146 /* Create a device manager */
3147 @REQ(create_device_manager)
3148 unsigned int access; /* wanted access rights */
3149 unsigned int attributes; /* object attributes */
3151 obj_handle_t handle; /* handle to the device */
3155 /* Create a device */
3157 unsigned int access; /* wanted access rights */
3158 unsigned int attributes; /* object attributes */
3159 obj_handle_t rootdir; /* root directory */
3160 client_ptr_t user_ptr; /* opaque ptr for use by client */
3161 obj_handle_t manager; /* device manager */
3162 VARARG(name,unicode_str); /* object name */
3164 obj_handle_t handle; /* handle to the device */
3168 /* Delete a device */
3170 obj_handle_t handle; /* handle to the device */
3174 /* Retrieve the next pending device ioctl request */
3175 @REQ(get_next_device_request)
3176 obj_handle_t manager; /* handle to the device manager */
3177 obj_handle_t prev; /* handle to the previous ioctl */
3178 unsigned int status; /* status of the previous ioctl */
3179 VARARG(prev_data,bytes); /* output data of the previous ioctl */
3181 obj_handle_t next; /* handle to the next ioctl */
3182 ioctl_code_t code; /* ioctl code */
3183 client_ptr_t user_ptr; /* opaque ptr for the device */
3184 data_size_t in_size; /* total needed input size */
3185 data_size_t out_size; /* needed output size */
3186 VARARG(next_data,bytes); /* input data of the next ioctl */
3190 /* Make the current process a system process */
3191 @REQ(make_process_system)
3193 obj_handle_t event; /* event signaled when all user processes have exited */
3197 /* Get detailed fixed-size information about a token */
3198 @REQ(get_token_statistics)
3199 obj_handle_t handle; /* handle to the object */
3201 luid_t token_id; /* locally-unique identifier of the token */
3202 luid_t modified_id; /* locally-unique identifier of the modified version of the token */
3203 int primary; /* is the token primary or impersonation? */
3204 int impersonation_level; /* level of impersonation */
3205 int group_count; /* the number of groups the token is a member of */
3206 int privilege_count; /* the number of privileges the token has */
3210 /* Create I/O completion port */
3211 @REQ(create_completion)
3212 unsigned int access; /* desired access to a port */
3213 unsigned int attributes; /* object attributes */
3214 unsigned int concurrent; /* max number of concurrent active threads */
3215 obj_handle_t rootdir; /* root directory */
3216 VARARG(filename,string); /* port name */
3218 obj_handle_t handle; /* port handle */
3222 /* Open I/O completion port */
3223 @REQ(open_completion)
3224 unsigned int access; /* desired access to a port */
3225 unsigned int attributes; /* object attributes */
3226 obj_handle_t rootdir; /* root directory */
3227 VARARG(filename,string); /* port name */
3229 obj_handle_t handle; /* port handle */
3233 /* add completion to completion port */
3234 @REQ(add_completion)
3235 obj_handle_t handle; /* port handle */
3236 apc_param_t ckey; /* completion key */
3237 apc_param_t cvalue; /* completion value */
3238 unsigned int information; /* IO_STATUS_BLOCK Information */
3239 unsigned int status; /* completion result */
3243 /* get completion from completion port queue */
3244 @REQ(remove_completion)
3245 obj_handle_t handle; /* port handle */
3247 apc_param_t ckey; /* completion key */
3248 apc_param_t cvalue; /* completion value */
3249 unsigned int information; /* IO_STATUS_BLOCK Information */
3250 unsigned int status; /* completion result */
3254 /* get completion queue depth */
3255 @REQ(query_completion)
3256 obj_handle_t handle; /* port handle */
3258 unsigned int depth; /* completion queue depth */
3262 /* associate object with completion port */
3263 @REQ(set_completion_info)
3264 obj_handle_t handle; /* object handle */
3265 apc_param_t ckey; /* completion key */
3266 obj_handle_t chandle; /* port handle */
3270 /* check for associated completion and push msg */
3271 @REQ(add_fd_completion)
3272 obj_handle_t handle; /* async' object */
3273 apc_param_t cvalue; /* completion value */
3274 unsigned int status; /* completion status */
3275 unsigned int information; /* IO_STATUS_BLOCK Information */
3279 /* Retrieve layered info for a window */
3280 @REQ(get_window_layered_info)
3281 user_handle_t handle; /* handle to the window */
3283 unsigned int color_key; /* color key */
3284 unsigned int alpha; /* alpha (0..255) */
3285 unsigned int flags; /* LWA_* flags */
3289 /* Set layered info for a window */
3290 @REQ(set_window_layered_info)
3291 user_handle_t handle; /* handle to the window */
3292 unsigned int color_key; /* color key */
3293 unsigned int alpha; /* alpha (0..255) */
3294 unsigned int flags; /* LWA_* flags */
3298 /* Allocate an arbitrary user handle */
3299 @REQ(alloc_user_handle)
3301 user_handle_t handle; /* allocated handle */
3305 /* Free an arbitrary user handle */
3306 @REQ(free_user_handle)
3307 user_handle_t handle; /* handle to free*/
3311 /* Set/get the current cursor */
3313 unsigned int flags; /* flags for fields to set (see below) */
3314 user_handle_t handle; /* handle to the cursor */
3315 int show_count; /* show count increment/decrement */
3316 int x; /* cursor position */
3318 rectangle_t clip; /* cursor clip rectangle */
3320 user_handle_t prev_handle; /* previous handle */
3321 int prev_count; /* previous show count */
3322 int new_x; /* new position */
3324 rectangle_t new_clip; /* new clip rectangle */
3326 #define SET_CURSOR_HANDLE 0x01
3327 #define SET_CURSOR_COUNT 0x02
3328 #define SET_CURSOR_POS 0x04
3329 #define SET_CURSOR_CLIP 0x08