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_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 psr, pc, npc, y, wim, tbr; } sparc_regs;
166 } ctl; /* selected by SERVER_CTX_CONTROL */
169 struct { unsigned int eax, ebx, ecx, edx, esi, edi; } i386_regs;
170 struct { unsigned __int64 rax,rbx, rcx, rdx, rsi, rdi,
171 r8, r9, r10, r11, r12, r13, r14, r15; } x86_64_regs;
172 struct { unsigned __int64 v0, t0, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12,
173 s0, s1, s2, s3, s4, s5, s6, a0, a1, a2, a3, a4, a5, at; } alpha_regs;
174 struct { unsigned int gpr[32], cr, xer; } powerpc_regs;
175 struct { unsigned int g[8], o[8], l[8], i[8]; } sparc_regs;
176 } integer; /* selected by SERVER_CTX_INTEGER */
179 struct { unsigned int ds, es, fs, gs; } i386_regs;
180 struct { unsigned int ds, es, fs, gs; } x86_64_regs;
181 } seg; /* selected by SERVER_CTX_SEGMENTS */
184 struct { unsigned int ctrl, status, tag, err_off, err_sel, data_off, data_sel, cr0npx;
185 unsigned char regs[80]; } i386_regs;
186 struct { struct { unsigned __int64 low, high; } fpregs[32]; } x86_64_regs;
187 struct { unsigned __int64 f[32], fpcr, softfpcr; } alpha_regs;
188 struct { double fpr[32], fpscr; } powerpc_regs;
189 } fp; /* selected by SERVER_CTX_FLOATING_POINT */
192 struct { unsigned int dr0, dr1, dr2, dr3, dr6, dr7; } i386_regs;
193 struct { unsigned __int64 dr0, dr1, dr2, dr3, dr6, dr7; } x86_64_regs;
194 struct { unsigned int dr[8]; } powerpc_regs;
195 } debug; /* selected by SERVER_CTX_DEBUG_REGISTERS */
198 unsigned char i386_regs[512];
199 } ext; /* selected by SERVER_CTX_EXTENDED_REGISTERS */
202 #define SERVER_CTX_CONTROL 0x01
203 #define SERVER_CTX_INTEGER 0x02
204 #define SERVER_CTX_SEGMENTS 0x04
205 #define SERVER_CTX_FLOATING_POINT 0x08
206 #define SERVER_CTX_DEBUG_REGISTERS 0x10
207 #define SERVER_CTX_EXTENDED_REGISTERS 0x20
209 /* structure used in sending an fd from client to server */
212 thread_id_t tid; /* thread id */
213 int fd; /* file descriptor on client-side */
216 /* structure sent by the server on the wait fifo */
219 client_ptr_t cookie; /* magic cookie that was passed in select_request */
220 int signaled; /* wait result */
224 /* NT-style timeout, in 100ns units, negative means relative timeout */
225 typedef __int64 timeout_t;
226 #define TIMEOUT_INFINITE (((timeout_t)0x7fffffff) << 32 | 0xffffffff)
228 /* structure for process startup info */
231 unsigned int debug_flags;
232 unsigned int console_flags;
233 obj_handle_t console;
235 obj_handle_t hstdout;
236 obj_handle_t hstderr;
243 unsigned int attribute;
246 data_size_t curdir_len;
247 data_size_t dllpath_len;
248 data_size_t imagepath_len;
249 data_size_t cmdline_len;
250 data_size_t title_len;
251 data_size_t desktop_len;
252 data_size_t shellinfo_len;
253 data_size_t runtime_len;
254 /* VARARG(curdir,unicode_str,curdir_len); */
255 /* VARARG(dllpath,unicode_str,dllpath_len); */
256 /* VARARG(imagepath,unicode_str,imagepath_len); */
257 /* VARARG(cmdline,unicode_str,cmdline_len); */
258 /* VARARG(title,unicode_str,title_len); */
259 /* VARARG(desktop,unicode_str,desktop_len); */
260 /* VARARG(shellinfo,unicode_str,shellinfo_len); */
261 /* VARARG(runtime,unicode_str,runtime_len); */
264 /* structure returned in the list of window properties */
267 atom_t atom; /* property atom */
268 int string; /* was atom a string originally? */
269 lparam_t data; /* data stored in property */
272 /* structure to specify window rectangles */
281 /* structure for parameters of async I/O calls */
284 obj_handle_t handle; /* object to perform I/O on */
285 obj_handle_t event; /* event to signal when done */
286 client_ptr_t callback; /* client-side callback to call upon end of async */
287 client_ptr_t iosb; /* I/O status block in client addr space */
288 client_ptr_t arg; /* opaque user data to pass to callback */
289 apc_param_t cvalue; /* completion value to use for completion events */
292 /* structures for extra message data */
294 struct hardware_msg_data
296 lparam_t info; /* extra info */
297 int x; /* x position */
298 int y; /* y position */
299 unsigned int hw_id; /* unique id */
303 struct callback_msg_data
305 client_ptr_t callback; /* callback function */
306 lparam_t data; /* user data for callback */
307 lparam_t result; /* message result */
310 struct winevent_msg_data
312 user_handle_t hook; /* hook handle */
313 thread_id_t tid; /* thread id */
314 client_ptr_t hook_proc; /* hook proc address */
315 /* followed by module name if any */
320 unsigned char bytes[1]; /* raw data for sent messages */
321 struct hardware_msg_data hardware;
322 struct callback_msg_data callback;
323 struct winevent_msg_data winevent;
326 /* structure for console char/attribute info */
335 unsigned int low_part;
339 #define MAX_ACL_LEN 65535
341 struct security_descriptor
343 unsigned int control; /* SE_ flags */
344 data_size_t owner_len;
345 data_size_t group_len;
346 data_size_t sacl_len;
347 data_size_t dacl_len;
348 /* VARARG(owner,SID); */
349 /* VARARG(group,SID); */
350 /* VARARG(sacl,ACL); */
351 /* VARARG(dacl,ACL); */
354 struct object_attributes
356 obj_handle_t rootdir; /* root directory */
357 data_size_t sd_len; /* length of security_descriptor data. may be 0 */
358 data_size_t name_len; /* length of the name string. may be 0 */
359 /* VARARG(sd,security_descriptor); */
360 /* VARARG(name,unicode_str); */
366 /* unsigned int attributes[count]; */
367 /* VARARG(sids,SID); */
393 enum apc_type type; /* APC_USER */
395 client_ptr_t func; /* void (__stdcall *func)(ULONG_PTR,ULONG_PTR,ULONG_PTR); */
396 apc_param_t args[3]; /* arguments for user function */
400 enum apc_type type; /* APC_TIMER */
402 client_ptr_t func; /* void (__stdcall *func)(void*, unsigned int, unsigned int); */
403 timeout_t time; /* absolute time of expiration */
404 client_ptr_t arg; /* user argument */
408 enum apc_type type; /* APC_ASYNC_IO */
409 unsigned int status; /* I/O status */
410 client_ptr_t func; /* unsigned int (*func)(void*, void*, unsigned int, void **); */
411 client_ptr_t user; /* user pointer */
412 client_ptr_t sb; /* status block */
416 enum apc_type type; /* APC_VIRTUAL_ALLOC */
417 unsigned int op_type; /* type of operation */
418 client_ptr_t addr; /* requested address */
419 mem_size_t size; /* allocation size */
420 unsigned int zero_bits; /* allocation alignment */
421 unsigned int prot; /* memory protection flags */
425 enum apc_type type; /* APC_VIRTUAL_FREE */
426 unsigned int op_type; /* type of operation */
427 client_ptr_t addr; /* requested address */
428 mem_size_t size; /* allocation size */
432 enum apc_type type; /* APC_VIRTUAL_QUERY */
434 client_ptr_t addr; /* requested address */
438 enum apc_type type; /* APC_VIRTUAL_PROTECT */
439 unsigned int prot; /* new protection flags */
440 client_ptr_t addr; /* requested address */
441 mem_size_t size; /* requested size */
445 enum apc_type type; /* APC_VIRTUAL_FLUSH */
447 client_ptr_t addr; /* requested address */
448 mem_size_t size; /* requested size */
452 enum apc_type type; /* APC_VIRTUAL_LOCK */
454 client_ptr_t addr; /* requested address */
455 mem_size_t size; /* requested size */
459 enum apc_type type; /* APC_VIRTUAL_UNLOCK */
461 client_ptr_t addr; /* requested address */
462 mem_size_t size; /* requested size */
466 enum apc_type type; /* APC_MAP_VIEW */
467 obj_handle_t handle; /* mapping handle */
468 client_ptr_t addr; /* requested address */
469 mem_size_t size; /* allocation size */
470 file_pos_t offset; /* file offset */
471 unsigned int alloc_type;/* allocation type */
472 unsigned short zero_bits; /* allocation alignment */
473 unsigned short prot; /* memory protection flags */
477 enum apc_type type; /* APC_UNMAP_VIEW */
479 client_ptr_t addr; /* view address */
483 enum apc_type type; /* APC_CREATE_THREAD */
484 int suspend; /* suspended thread? */
485 client_ptr_t func; /* void (__stdcall *func)(void*); start function */
486 client_ptr_t arg; /* argument for start function */
487 mem_size_t reserve; /* reserve size for thread stack */
488 mem_size_t commit; /* commit size for thread stack */
497 enum apc_type type; /* APC_ASYNC_IO */
498 unsigned int status; /* new status of async operation */
499 client_ptr_t apc; /* user APC to call */
500 unsigned int total; /* bytes transferred */
504 enum apc_type type; /* APC_VIRTUAL_ALLOC */
505 unsigned int status; /* status returned by call */
506 client_ptr_t addr; /* resulting address */
507 mem_size_t size; /* resulting size */
511 enum apc_type type; /* APC_VIRTUAL_FREE */
512 unsigned int status; /* status returned by call */
513 client_ptr_t addr; /* resulting address */
514 mem_size_t size; /* resulting size */
518 enum apc_type type; /* APC_VIRTUAL_QUERY */
519 unsigned int status; /* status returned by call */
520 client_ptr_t base; /* resulting base address */
521 client_ptr_t alloc_base;/* resulting allocation base */
522 mem_size_t size; /* resulting region size */
523 unsigned short state; /* resulting region state */
524 unsigned short prot; /* resulting region protection */
525 unsigned short alloc_prot;/* resulting allocation protection */
526 unsigned short alloc_type;/* resulting region allocation type */
530 enum apc_type type; /* APC_VIRTUAL_PROTECT */
531 unsigned int status; /* status returned by call */
532 client_ptr_t addr; /* resulting address */
533 mem_size_t size; /* resulting size */
534 unsigned int prot; /* old protection flags */
538 enum apc_type type; /* APC_VIRTUAL_FLUSH */
539 unsigned int status; /* status returned by call */
540 client_ptr_t addr; /* resulting address */
541 mem_size_t size; /* resulting size */
545 enum apc_type type; /* APC_VIRTUAL_LOCK */
546 unsigned int status; /* status returned by call */
547 client_ptr_t addr; /* resulting address */
548 mem_size_t size; /* resulting size */
552 enum apc_type type; /* APC_VIRTUAL_UNLOCK */
553 unsigned int status; /* status returned by call */
554 client_ptr_t addr; /* resulting address */
555 mem_size_t size; /* resulting size */
559 enum apc_type type; /* APC_MAP_VIEW */
560 unsigned int status; /* status returned by call */
561 client_ptr_t addr; /* resulting address */
562 mem_size_t size; /* resulting size */
566 enum apc_type type; /* APC_MAP_VIEW */
567 unsigned int status; /* status returned by call */
571 enum apc_type type; /* APC_CREATE_THREAD */
572 unsigned int status; /* status returned by call */
573 thread_id_t tid; /* thread id */
574 obj_handle_t handle; /* handle to new thread */
578 /****************************************************************/
579 /* Request declarations */
581 /* Create a new process from the context of the parent */
583 int inherit_all; /* inherit all handles from parent */
584 unsigned int create_flags; /* creation flags */
585 int socket_fd; /* file descriptor for process socket */
586 obj_handle_t exe_file; /* file handle for main exe */
587 unsigned int process_access; /* access rights for process object */
588 unsigned int process_attr; /* attributes for process object */
589 unsigned int thread_access; /* access rights for thread object */
590 unsigned int thread_attr; /* attributes for thread object */
591 data_size_t info_size; /* size of startup info */
592 VARARG(info,startup_info,info_size); /* startup information */
593 VARARG(env,unicode_str); /* environment for new process */
595 obj_handle_t info; /* new process info handle */
596 process_id_t pid; /* process id */
597 obj_handle_t phandle; /* process handle (in the current process) */
598 thread_id_t tid; /* thread id */
599 obj_handle_t thandle; /* thread handle (in the current process) */
603 /* Retrieve information about a newly started process */
604 @REQ(get_new_process_info)
605 obj_handle_t info; /* info handle returned from new_process_request */
607 int success; /* did the process start successfully? */
608 int exit_code; /* process exit code if failed */
612 /* Create a new thread from the context of the parent */
614 unsigned int access; /* wanted access rights */
615 unsigned int attributes; /* object attributes */
616 int suspend; /* new thread should be suspended on creation */
617 int request_fd; /* fd for request pipe */
619 thread_id_t tid; /* thread id */
620 obj_handle_t handle; /* thread handle (in the current process) */
624 /* Retrieve the new process startup info */
625 @REQ(get_startup_info)
627 obj_handle_t exe_file; /* file handle for main exe */
628 data_size_t info_size; /* size of startup info */
629 VARARG(info,startup_info,info_size); /* startup information */
630 VARARG(env,unicode_str); /* environment */
634 /* Signal the end of the process initialization */
635 @REQ(init_process_done)
636 int gui; /* is it a GUI process? */
637 mod_handle_t module; /* main module base address */
638 client_ptr_t ldt_copy; /* address of LDT copy (in thread address space) */
639 client_ptr_t entry; /* process entry point */
643 /* Initialize a thread; called from the child after fork()/clone() */
645 int unix_pid; /* Unix pid of new thread */
646 int unix_tid; /* Unix tid of new thread */
647 int debug_level; /* new debug level */
648 client_ptr_t teb; /* TEB of new thread (in thread address space) */
649 client_ptr_t entry; /* entry point or PEB if initial thread (in thread address space) */
650 int reply_fd; /* fd for reply pipe */
651 int wait_fd; /* fd for blocking calls pipe */
652 cpu_type_t cpu; /* CPU that this thread is running on */
654 process_id_t pid; /* process id of the new thread's process */
655 thread_id_t tid; /* thread id of the new thread */
656 timeout_t server_start; /* server start time */
657 data_size_t info_size; /* total size of startup info */
658 int version; /* protocol version */
659 unsigned int all_cpus; /* bitset of supported CPUs */
663 /* Terminate a process */
664 @REQ(terminate_process)
665 obj_handle_t handle; /* process handle to terminate */
666 int exit_code; /* process exit code */
668 int self; /* suicide? */
672 /* Terminate a thread */
673 @REQ(terminate_thread)
674 obj_handle_t handle; /* thread handle to terminate */
675 int exit_code; /* thread exit code */
677 int self; /* suicide? */
678 int last; /* last thread in this process? */
682 /* Retrieve information about a process */
683 @REQ(get_process_info)
684 obj_handle_t handle; /* process handle */
686 process_id_t pid; /* server process id */
687 process_id_t ppid; /* server process id of parent */
688 affinity_t affinity; /* process affinity mask */
689 client_ptr_t peb; /* PEB address in process address space */
690 timeout_t start_time; /* process start time */
691 timeout_t end_time; /* process end time */
692 int exit_code; /* process exit code */
693 int priority; /* priority class */
694 cpu_type_t cpu; /* CPU that this process is running on */
695 int debugger_present; /* process is being debugged */
699 /* Set a process informations */
700 @REQ(set_process_info)
701 obj_handle_t handle; /* process handle */
702 int mask; /* setting mask (see below) */
703 int priority; /* priority class */
704 affinity_t affinity; /* affinity mask */
706 #define SET_PROCESS_INFO_PRIORITY 0x01
707 #define SET_PROCESS_INFO_AFFINITY 0x02
710 /* Retrieve information about a thread */
711 @REQ(get_thread_info)
712 obj_handle_t handle; /* thread handle */
713 thread_id_t tid_in; /* thread id (optional) */
715 process_id_t pid; /* server process id */
716 thread_id_t tid; /* server thread id */
717 client_ptr_t teb; /* thread teb pointer */
718 affinity_t affinity; /* thread affinity mask */
719 timeout_t creation_time; /* thread creation time */
720 timeout_t exit_time; /* thread exit time */
721 int exit_code; /* thread exit code */
722 int priority; /* thread priority level */
723 int last; /* last thread in process */
727 /* Set a thread informations */
728 @REQ(set_thread_info)
729 obj_handle_t handle; /* thread handle */
730 int mask; /* setting mask (see below) */
731 int priority; /* priority class */
732 affinity_t affinity; /* affinity mask */
733 obj_handle_t token; /* impersonation token */
735 #define SET_THREAD_INFO_PRIORITY 0x01
736 #define SET_THREAD_INFO_AFFINITY 0x02
737 #define SET_THREAD_INFO_TOKEN 0x04
740 /* Retrieve information about a module */
742 obj_handle_t handle; /* process handle */
743 mod_handle_t base_address; /* base address of module */
745 client_ptr_t entry_point;
746 data_size_t size; /* module size */
747 data_size_t filename_len; /* buffer len in bytes required to store filename */
748 VARARG(filename,unicode_str); /* file name of module */
752 /* Suspend a thread */
754 obj_handle_t handle; /* thread handle */
756 int count; /* new suspend count */
760 /* Resume a thread */
762 obj_handle_t handle; /* thread handle */
764 int count; /* new suspend count */
768 /* Notify the server that a dll has been loaded */
770 obj_handle_t handle; /* file handle */
771 mod_handle_t base; /* base address */
772 client_ptr_t name; /* ptr to ptr to name (in process addr space) */
773 data_size_t size; /* dll size */
774 int dbg_offset; /* debug info offset */
775 int dbg_size; /* debug info size */
776 VARARG(filename,unicode_str); /* file name of dll */
780 /* Notify the server that a dll is being unloaded */
782 mod_handle_t base; /* base address */
786 /* Queue an APC for a thread or process */
788 obj_handle_t handle; /* thread or process handle */
789 apc_call_t call; /* call arguments */
791 obj_handle_t handle; /* APC handle */
792 int self; /* run APC in caller itself? */
796 /* Get the result of an APC call */
798 obj_handle_t handle; /* handle to the APC */
800 apc_result_t result; /* result of the APC */
804 /* Close a handle for the current process */
806 obj_handle_t handle; /* handle to close */
810 /* Set a handle information */
811 @REQ(set_handle_info)
812 obj_handle_t handle; /* handle we are interested in */
813 int flags; /* new handle flags */
814 int mask; /* mask for flags to set */
816 int old_flags; /* old flag value */
820 /* Duplicate a handle */
822 obj_handle_t src_process; /* src process handle */
823 obj_handle_t src_handle; /* src handle to duplicate */
824 obj_handle_t dst_process; /* dst process handle */
825 unsigned int access; /* wanted access rights */
826 unsigned int attributes; /* object attributes */
827 unsigned int options; /* duplicate options (see below) */
829 obj_handle_t handle; /* duplicated handle in dst process */
830 int self; /* is the source the current process? */
831 int closed; /* whether the source handle has been closed */
833 #define DUP_HANDLE_CLOSE_SOURCE DUPLICATE_CLOSE_SOURCE
834 #define DUP_HANDLE_SAME_ACCESS DUPLICATE_SAME_ACCESS
835 #define DUP_HANDLE_MAKE_GLOBAL 0x80000000 /* Not a Windows flag */
838 /* Open a handle to a process */
840 process_id_t pid; /* process id to open */
841 unsigned int access; /* wanted access rights */
842 unsigned int attributes; /* object attributes */
844 obj_handle_t handle; /* handle to the process */
848 /* Open a handle to a thread */
850 thread_id_t tid; /* thread id to open */
851 unsigned int access; /* wanted access rights */
852 unsigned int attributes; /* object attributes */
854 obj_handle_t handle; /* handle to the thread */
858 /* Wait for handles */
860 int flags; /* wait flags (see below) */
861 client_ptr_t cookie; /* magic cookie to return to client */
862 obj_handle_t signal; /* object to signal (0 if none) */
863 obj_handle_t prev_apc; /* handle to previous APC */
864 timeout_t timeout; /* timeout */
865 VARARG(result,apc_result); /* result of previous APC */
866 VARARG(handles,handles); /* handles to select on */
868 timeout_t timeout; /* timeout converted to absolute */
869 apc_call_t call; /* APC call arguments */
870 obj_handle_t apc_handle; /* handle to next APC */
873 #define SELECT_ALERTABLE 2
874 #define SELECT_INTERRUPTIBLE 4
877 /* Create an event */
879 unsigned int access; /* wanted access rights */
880 unsigned int attributes; /* object attributes */
881 int manual_reset; /* manual reset event */
882 int initial_state; /* initial state of the event */
883 VARARG(objattr,object_attributes); /* object attributes */
885 obj_handle_t handle; /* handle to the event */
888 /* Event operation */
890 obj_handle_t handle; /* handle to event */
891 int op; /* event operation (see below) */
893 enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT };
898 unsigned int access; /* wanted access rights */
899 unsigned int attributes; /* object attributes */
900 obj_handle_t rootdir; /* root directory */
901 VARARG(name,unicode_str); /* object name */
903 obj_handle_t handle; /* handle to the event */
909 unsigned int access; /* wanted access rights */
910 unsigned int attributes; /* object attributes */
911 int owned; /* initially owned? */
912 VARARG(objattr,object_attributes); /* object attributes */
914 obj_handle_t handle; /* handle to the mutex */
918 /* Release a mutex */
920 obj_handle_t handle; /* handle to the mutex */
922 unsigned int prev_count; /* value of internal counter, before release */
928 unsigned int access; /* wanted access rights */
929 unsigned int attributes; /* object attributes */
930 obj_handle_t rootdir; /* root directory */
931 VARARG(name,unicode_str); /* object name */
933 obj_handle_t handle; /* handle to the mutex */
937 /* Create a semaphore */
938 @REQ(create_semaphore)
939 unsigned int access; /* wanted access rights */
940 unsigned int attributes; /* object attributes */
941 unsigned int initial; /* initial count */
942 unsigned int max; /* maximum count */
943 VARARG(objattr,object_attributes); /* object attributes */
945 obj_handle_t handle; /* handle to the semaphore */
949 /* Release a semaphore */
950 @REQ(release_semaphore)
951 obj_handle_t handle; /* handle to the semaphore */
952 unsigned int count; /* count to add to semaphore */
954 unsigned int prev_count; /* previous semaphore count */
958 /* Open a semaphore */
960 unsigned int access; /* wanted access rights */
961 unsigned int attributes; /* object attributes */
962 obj_handle_t rootdir; /* root directory */
963 VARARG(name,unicode_str); /* object name */
965 obj_handle_t handle; /* handle to the semaphore */
971 unsigned int access; /* wanted access rights */
972 unsigned int attributes; /* object attributes */
973 unsigned int sharing; /* sharing flags */
974 int create; /* file create action */
975 unsigned int options; /* file options */
976 unsigned int attrs; /* file attributes for creation */
977 VARARG(objattr,object_attributes); /* object attributes */
978 VARARG(filename,string); /* file name */
980 obj_handle_t handle; /* handle to the file */
984 /* Open a file object */
985 @REQ(open_file_object)
986 unsigned int access; /* wanted access rights */
987 unsigned int attributes; /* open attributes */
988 obj_handle_t rootdir; /* root directory */
989 unsigned int sharing; /* sharing flags */
990 unsigned int options; /* file options */
991 VARARG(filename,unicode_str); /* file name */
993 obj_handle_t handle; /* handle to the file */
997 /* Allocate a file handle for a Unix fd */
998 @REQ(alloc_file_handle)
999 unsigned int access; /* wanted access rights */
1000 unsigned int attributes; /* object attributes */
1001 int fd; /* file descriptor on the client side */
1003 obj_handle_t handle; /* handle to the file */
1007 /* Get the Unix name from a file handle */
1008 @REQ(get_handle_unix_name)
1009 obj_handle_t handle; /* file handle */
1011 data_size_t name_len; /* unix name length */
1012 VARARG(name,string); /* unix name */
1016 /* Get a Unix fd to access a file */
1018 obj_handle_t handle; /* handle to the file */
1020 int type; /* file type (see below) */
1021 int cacheable; /* can fd be cached in the client? */
1022 unsigned int access; /* file access rights */
1023 unsigned int options; /* file open options */
1027 FD_TYPE_INVALID, /* invalid file (no associated fd) */
1028 FD_TYPE_FILE, /* regular file */
1029 FD_TYPE_DIR, /* directory */
1030 FD_TYPE_SOCKET, /* socket */
1031 FD_TYPE_SERIAL, /* serial port */
1032 FD_TYPE_PIPE, /* named pipe */
1033 FD_TYPE_MAILSLOT, /* mailslot */
1034 FD_TYPE_CHAR, /* unspecified char device */
1035 FD_TYPE_DEVICE, /* Windows device file */
1040 /* Flush a file buffers */
1042 obj_handle_t handle; /* handle to the file */
1044 obj_handle_t event; /* event set when finished */
1048 /* Lock a region of a file */
1050 obj_handle_t handle; /* handle to the file */
1051 file_pos_t offset; /* offset of start of lock */
1052 file_pos_t count; /* count of bytes to lock */
1053 int shared; /* shared or exclusive lock? */
1054 int wait; /* do we want to wait? */
1056 obj_handle_t handle; /* handle to wait on */
1057 int overlapped; /* is it an overlapped I/O handle? */
1061 /* Unlock a region of a file */
1063 obj_handle_t handle; /* handle to the file */
1064 file_pos_t offset; /* offset of start of unlock */
1065 file_pos_t count; /* count of bytes to unlock */
1069 /* Create a socket */
1071 unsigned int access; /* wanted access rights */
1072 unsigned int attributes; /* object attributes */
1073 int family; /* family, see socket manpage */
1074 int type; /* type, see socket manpage */
1075 int protocol; /* protocol, see socket manpage */
1076 unsigned int flags; /* socket flags */
1078 obj_handle_t handle; /* handle to the new socket */
1082 /* Accept a socket */
1084 obj_handle_t lhandle; /* handle to the listening socket */
1085 unsigned int access; /* wanted access rights */
1086 unsigned int attributes; /* object attributes */
1088 obj_handle_t handle; /* handle to the new socket */
1092 /* Accept into an initialized socket */
1093 @REQ(accept_into_socket)
1094 obj_handle_t lhandle; /* handle to the listening socket */
1095 obj_handle_t ahandle; /* handle to the accepting socket */
1099 /* Set socket event parameters */
1100 @REQ(set_socket_event)
1101 obj_handle_t handle; /* handle to the socket */
1102 unsigned int mask; /* event mask */
1103 obj_handle_t event; /* event object */
1104 user_handle_t window; /* window to send the message to */
1105 unsigned int msg; /* message to send */
1109 /* Get socket event parameters */
1110 @REQ(get_socket_event)
1111 obj_handle_t handle; /* handle to the socket */
1112 int service; /* clear pending? */
1113 obj_handle_t c_event; /* event to clear */
1115 unsigned int mask; /* event mask */
1116 unsigned int pmask; /* pending events */
1117 unsigned int state; /* status bits */
1118 VARARG(errors,ints); /* event errors */
1122 /* Reenable pending socket events */
1123 @REQ(enable_socket_event)
1124 obj_handle_t handle; /* handle to the socket */
1125 unsigned int mask; /* events to re-enable */
1126 unsigned int sstate; /* status bits to set */
1127 unsigned int cstate; /* status bits to clear */
1130 @REQ(set_socket_deferred)
1131 obj_handle_t handle; /* handle to the socket */
1132 obj_handle_t deferred; /* handle to the socket for which accept() is deferred */
1135 /* Allocate a console (only used by a console renderer) */
1137 unsigned int access; /* wanted access rights */
1138 unsigned int attributes; /* object attributes */
1139 process_id_t pid; /* pid of process which shall be attached to the console */
1140 int input_fd; /* if pid=-1 (bare console to current process), fd for input */
1142 obj_handle_t handle_in; /* handle to console input */
1143 obj_handle_t event; /* handle to renderer events change notification */
1147 /* Free the console of the current process */
1152 #define CONSOLE_RENDERER_NONE_EVENT 0x00
1153 #define CONSOLE_RENDERER_TITLE_EVENT 0x01
1154 #define CONSOLE_RENDERER_ACTIVE_SB_EVENT 0x02
1155 #define CONSOLE_RENDERER_SB_RESIZE_EVENT 0x03
1156 #define CONSOLE_RENDERER_UPDATE_EVENT 0x04
1157 #define CONSOLE_RENDERER_CURSOR_POS_EVENT 0x05
1158 #define CONSOLE_RENDERER_CURSOR_GEOM_EVENT 0x06
1159 #define CONSOLE_RENDERER_DISPLAY_EVENT 0x07
1160 #define CONSOLE_RENDERER_EXIT_EVENT 0x08
1161 struct console_renderer_event
1196 /* retrieve console events for the renderer */
1197 @REQ(get_console_renderer_events)
1198 obj_handle_t handle; /* handle to console input events */
1200 VARARG(data,bytes); /* the various console_renderer_events */
1204 /* Open a handle to the process console */
1206 obj_handle_t from; /* 0 (resp 1) input (resp output) of current process console */
1207 /* otherwise console_in handle to get active screen buffer? */
1208 unsigned int access; /* wanted access rights */
1209 unsigned int attributes; /* object attributes */
1210 int share; /* share mask (only for output handles) */
1212 obj_handle_t handle; /* handle to the console */
1216 /* Get the input queue wait event */
1217 @REQ(get_console_wait_event)
1219 obj_handle_t handle;
1222 /* Get a console mode (input or output) */
1223 @REQ(get_console_mode)
1224 obj_handle_t handle; /* handle to the console */
1226 int mode; /* console mode */
1230 /* Set a console mode (input or output) */
1231 @REQ(set_console_mode)
1232 obj_handle_t handle; /* handle to the console */
1233 int mode; /* console mode */
1237 /* Set info about a console (input only) */
1238 @REQ(set_console_input_info)
1239 obj_handle_t handle; /* handle to console input, or 0 for process' console */
1240 int mask; /* setting mask (see below) */
1241 obj_handle_t active_sb; /* active screen buffer */
1242 int history_mode; /* whether we duplicate lines in history */
1243 int history_size; /* number of lines in history */
1244 int edition_mode; /* index to the edition mode flavors */
1245 int input_cp; /* console input codepage */
1246 int output_cp; /* console output codepage */
1247 user_handle_t win; /* console window if backend supports it */
1248 VARARG(title,unicode_str); /* console title */
1250 #define SET_CONSOLE_INPUT_INFO_ACTIVE_SB 0x01
1251 #define SET_CONSOLE_INPUT_INFO_TITLE 0x02
1252 #define SET_CONSOLE_INPUT_INFO_HISTORY_MODE 0x04
1253 #define SET_CONSOLE_INPUT_INFO_HISTORY_SIZE 0x08
1254 #define SET_CONSOLE_INPUT_INFO_EDITION_MODE 0x10
1255 #define SET_CONSOLE_INPUT_INFO_INPUT_CODEPAGE 0x20
1256 #define SET_CONSOLE_INPUT_INFO_OUTPUT_CODEPAGE 0x40
1257 #define SET_CONSOLE_INPUT_INFO_WIN 0x80
1260 /* Get info about a console (input only) */
1261 @REQ(get_console_input_info)
1262 obj_handle_t handle; /* handle to console input, or 0 for process' console */
1264 int history_mode; /* whether we duplicate lines in history */
1265 int history_size; /* number of lines in history */
1266 int history_index; /* number of used lines in history */
1267 int edition_mode; /* index to the edition mode flavors */
1268 int input_cp; /* console input codepage */
1269 int output_cp; /* console output codepage */
1270 user_handle_t win; /* console window if backend supports it */
1271 VARARG(title,unicode_str); /* console title */
1275 /* appends a string to console's history */
1276 @REQ(append_console_input_history)
1277 obj_handle_t handle; /* handle to console input, or 0 for process' console */
1278 VARARG(line,unicode_str); /* line to add */
1282 /* appends a string to console's history */
1283 @REQ(get_console_input_history)
1284 obj_handle_t handle; /* handle to console input, or 0 for process' console */
1285 int index; /* index to get line from */
1287 int total; /* total length of line in Unicode chars */
1288 VARARG(line,unicode_str); /* line to add */
1292 /* creates a new screen buffer on process' console */
1293 @REQ(create_console_output)
1294 obj_handle_t handle_in; /* handle to console input, or 0 for process' console */
1295 unsigned int access; /* wanted access rights */
1296 unsigned int attributes; /* object attributes */
1297 unsigned int share; /* sharing credentials */
1299 obj_handle_t handle_out; /* handle to the screen buffer */
1303 /* Set info about a console (output only) */
1304 @REQ(set_console_output_info)
1305 obj_handle_t handle; /* handle to the console */
1306 int mask; /* setting mask (see below) */
1307 short int cursor_size; /* size of cursor (percentage filled) */
1308 short int cursor_visible;/* cursor visibility flag */
1309 short int cursor_x; /* position of cursor (x, y) */
1311 short int width; /* width of the screen buffer */
1312 short int height; /* height of the screen buffer */
1313 short int attr; /* default attribute */
1314 short int win_left; /* window actually displayed by renderer */
1315 short int win_top; /* the rect area is expressed withing the */
1316 short int win_right; /* boundaries of the screen buffer */
1317 short int win_bottom;
1318 short int max_width; /* maximum size (width x height) for the window */
1319 short int max_height;
1321 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_GEOM 0x01
1322 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_POS 0x02
1323 #define SET_CONSOLE_OUTPUT_INFO_SIZE 0x04
1324 #define SET_CONSOLE_OUTPUT_INFO_ATTR 0x08
1325 #define SET_CONSOLE_OUTPUT_INFO_DISPLAY_WINDOW 0x10
1326 #define SET_CONSOLE_OUTPUT_INFO_MAX_SIZE 0x20
1329 /* Get info about a console (output only) */
1330 @REQ(get_console_output_info)
1331 obj_handle_t handle; /* handle to the console */
1333 short int cursor_size; /* size of cursor (percentage filled) */
1334 short int cursor_visible;/* cursor visibility flag */
1335 short int cursor_x; /* position of cursor (x, y) */
1337 short int width; /* width of the screen buffer */
1338 short int height; /* height of the screen buffer */
1339 short int attr; /* default attribute */
1340 short int win_left; /* window actually displayed by renderer */
1341 short int win_top; /* the rect area is expressed withing the */
1342 short int win_right; /* boundaries of the screen buffer */
1343 short int win_bottom;
1344 short int max_width; /* maximum size (width x height) for the window */
1345 short int max_height;
1348 /* Add input records to a console input queue */
1349 @REQ(write_console_input)
1350 obj_handle_t handle; /* handle to the console input */
1351 VARARG(rec,input_records); /* input records */
1353 int written; /* number of records written */
1357 /* Fetch input records from a console input queue */
1358 @REQ(read_console_input)
1359 obj_handle_t handle; /* handle to the console input */
1360 int flush; /* flush the retrieved records from the queue? */
1362 int read; /* number of records read */
1363 VARARG(rec,input_records); /* input records */
1367 /* write data (chars and/or attributes) in a screen buffer */
1368 @REQ(write_console_output)
1369 obj_handle_t handle; /* handle to the console output */
1370 int x; /* position where to start writing */
1372 int mode; /* char info (see below) */
1373 int wrap; /* wrap around at end of line? */
1374 VARARG(data,bytes); /* info to write */
1376 int written; /* number of char infos actually written */
1377 int width; /* width of screen buffer */
1378 int height; /* height of screen buffer */
1382 CHAR_INFO_MODE_TEXT, /* characters only */
1383 CHAR_INFO_MODE_ATTR, /* attributes only */
1384 CHAR_INFO_MODE_TEXTATTR, /* both characters and attributes */
1385 CHAR_INFO_MODE_TEXTSTDATTR /* characters but use standard attributes */
1389 /* fill a screen buffer with constant data (chars and/or attributes) */
1390 @REQ(fill_console_output)
1391 obj_handle_t handle; /* handle to the console output */
1392 int x; /* position where to start writing */
1394 int mode; /* char info mode */
1395 int count; /* number to write */
1396 int wrap; /* wrap around at end of line? */
1397 char_info_t data; /* data to write */
1399 int written; /* number of char infos actually written */
1403 /* read data (chars and/or attributes) from a screen buffer */
1404 @REQ(read_console_output)
1405 obj_handle_t handle; /* handle to the console output */
1406 int x; /* position (x,y) where to start reading */
1408 int mode; /* char info mode */
1409 int wrap; /* wrap around at end of line? */
1411 int width; /* width of screen buffer */
1412 int height; /* height of screen buffer */
1417 /* move a rect (of data) in screen buffer content */
1418 @REQ(move_console_output)
1419 obj_handle_t handle; /* handle to the console output */
1420 short int x_src; /* position (x, y) of rect to start moving from */
1422 short int x_dst; /* position (x, y) of rect to move to */
1424 short int w; /* size of the rect (width, height) to move */
1429 /* Sends a signal to a process group */
1430 @REQ(send_console_signal)
1431 int signal; /* the signal to send */
1432 process_id_t group_id; /* the group to send the signal to */
1436 /* enable directory change notifications */
1437 @REQ(read_directory_changes)
1438 unsigned int filter; /* notification filter */
1439 int subtree; /* watch the subtree? */
1440 int want_data; /* flag indicating whether change data should be collected */
1441 async_data_t async; /* async I/O parameters */
1446 obj_handle_t handle;
1448 int action; /* type of change */
1449 VARARG(name,string); /* name of directory entry that changed */
1453 /* Create a file mapping */
1454 @REQ(create_mapping)
1455 unsigned int access; /* wanted access rights */
1456 unsigned int attributes; /* object attributes */
1457 unsigned int protect; /* protection flags (see below) */
1458 mem_size_t size; /* mapping size */
1459 obj_handle_t file_handle; /* file handle */
1460 VARARG(objattr,object_attributes); /* object attributes */
1462 obj_handle_t handle; /* handle to the mapping */
1464 /* per-page protection flags */
1465 #define VPROT_READ 0x01
1466 #define VPROT_WRITE 0x02
1467 #define VPROT_EXEC 0x04
1468 #define VPROT_WRITECOPY 0x08
1469 #define VPROT_GUARD 0x10
1470 #define VPROT_NOCACHE 0x20
1471 #define VPROT_COMMITTED 0x40
1472 #define VPROT_WRITEWATCH 0x80
1473 /* per-mapping protection flags */
1474 #define VPROT_IMAGE 0x0100 /* mapping for an exe image */
1475 #define VPROT_SYSTEM 0x0200 /* system view (underlying mmap not under our control) */
1476 #define VPROT_VALLOC 0x0400 /* allocated by VirtualAlloc */
1477 #define VPROT_NOEXEC 0x0800 /* don't force exec permission */
1480 /* Open a mapping */
1482 unsigned int access; /* wanted access rights */
1483 unsigned int attributes; /* object attributes */
1484 obj_handle_t rootdir; /* root directory */
1485 VARARG(name,unicode_str); /* object name */
1487 obj_handle_t handle; /* handle to the mapping */
1491 /* Get information about a file mapping */
1492 @REQ(get_mapping_info)
1493 obj_handle_t handle; /* handle to the mapping */
1494 unsigned int access; /* wanted access rights */
1496 mem_size_t size; /* mapping size */
1497 int protect; /* protection flags */
1498 int header_size; /* header size (for VPROT_IMAGE mapping) */
1499 client_ptr_t base; /* default base addr (for VPROT_IMAGE mapping) */
1500 obj_handle_t mapping; /* duplicate mapping handle unless removable */
1501 obj_handle_t shared_file; /* shared mapping file handle */
1505 /* Get a range of committed pages in a file mapping */
1506 @REQ(get_mapping_committed_range)
1507 obj_handle_t handle; /* handle to the mapping */
1508 file_pos_t offset; /* starting offset (page-aligned, in bytes) */
1510 mem_size_t size; /* size of range starting at offset (page-aligned, in bytes) */
1511 int committed; /* whether it is a committed range */
1515 /* Add a range to the committed pages in a file mapping */
1516 @REQ(add_mapping_committed_range)
1517 obj_handle_t handle; /* handle to the mapping */
1518 file_pos_t offset; /* starting offset (page-aligned, in bytes) */
1519 mem_size_t size; /* size to set (page-aligned, in bytes) or 0 if only retrieving */
1523 #define SNAP_PROCESS 0x00000001
1524 #define SNAP_THREAD 0x00000002
1525 /* Create a snapshot */
1526 @REQ(create_snapshot)
1527 unsigned int attributes; /* object attributes */
1528 unsigned int flags; /* snapshot flags (SNAP_*) */
1530 obj_handle_t handle; /* handle to the snapshot */
1534 /* Get the next process from a snapshot */
1536 obj_handle_t handle; /* handle to the snapshot */
1537 int reset; /* reset snapshot position? */
1539 int count; /* process usage count */
1540 process_id_t pid; /* process id */
1541 process_id_t ppid; /* parent process id */
1542 int threads; /* number of threads */
1543 int priority; /* process priority */
1544 int handles; /* number of handles */
1545 VARARG(filename,unicode_str); /* file name of main exe */
1549 /* Get the next thread from a snapshot */
1551 obj_handle_t handle; /* handle to the snapshot */
1552 int reset; /* reset snapshot position? */
1554 int count; /* thread usage count */
1555 process_id_t pid; /* process id */
1556 thread_id_t tid; /* thread id */
1557 int base_pri; /* base priority */
1558 int delta_pri; /* delta priority */
1562 /* Wait for a debug event */
1563 @REQ(wait_debug_event)
1564 int get_handle; /* should we alloc a handle for waiting? */
1566 process_id_t pid; /* process id */
1567 thread_id_t tid; /* thread id */
1568 obj_handle_t wait; /* wait handle if no event ready */
1569 VARARG(event,debug_event); /* debug event data */
1573 /* Queue an exception event */
1574 @REQ(queue_exception_event)
1575 int first; /* first chance exception? */
1576 unsigned int code; /* exception code */
1577 unsigned int flags; /* exception flags */
1578 client_ptr_t record; /* exception record */
1579 client_ptr_t address; /* exception address */
1580 data_size_t len; /* size of parameters */
1581 VARARG(params,uints64,len);/* exception parameters */
1582 VARARG(context,context); /* thread context */
1584 obj_handle_t handle; /* handle to the queued event */
1588 /* Retrieve the status of an exception event */
1589 @REQ(get_exception_status)
1590 obj_handle_t handle; /* handle to the queued event */
1592 VARARG(context,context); /* modified thread context */
1596 /* Send an output string to the debugger */
1597 @REQ(output_debug_string)
1598 data_size_t length; /* string length */
1599 client_ptr_t string; /* string to display (in debugged process address space) */
1603 /* Continue a debug event */
1604 @REQ(continue_debug_event)
1605 process_id_t pid; /* process id to continue */
1606 thread_id_t tid; /* thread id to continue */
1607 int status; /* continuation status */
1611 /* Start/stop debugging an existing process */
1613 process_id_t pid; /* id of the process to debug */
1614 int attach; /* 1=attaching / 0=detaching from the process */
1618 /* Simulate a breakpoint in a process */
1620 obj_handle_t handle; /* process handle */
1622 int self; /* was it the caller itself? */
1626 /* Set debugger kill on exit flag */
1627 @REQ(set_debugger_kill_on_exit)
1628 int kill_on_exit; /* 0=detach/1=kill debuggee when debugger dies */
1632 /* Read data from a process address space */
1633 @REQ(read_process_memory)
1634 obj_handle_t handle; /* process handle */
1635 client_ptr_t addr; /* addr to read from */
1637 VARARG(data,bytes); /* result data */
1641 /* Write data to a process address space */
1642 @REQ(write_process_memory)
1643 obj_handle_t handle; /* process handle */
1644 client_ptr_t addr; /* addr to write to */
1645 VARARG(data,bytes); /* data to write */
1649 /* Create a registry key */
1651 obj_handle_t parent; /* handle to the parent key */
1652 unsigned int access; /* desired access rights */
1653 unsigned int attributes; /* object attributes */
1654 unsigned int options; /* creation options */
1655 data_size_t namelen; /* length of key name in bytes */
1656 VARARG(name,unicode_str,namelen); /* key name */
1657 VARARG(class,unicode_str); /* class name */
1659 obj_handle_t hkey; /* handle to the created key */
1660 int created; /* has it been newly created? */
1663 /* Open a registry key */
1665 obj_handle_t parent; /* handle to the parent key */
1666 unsigned int access; /* desired access rights */
1667 unsigned int attributes; /* object attributes */
1668 VARARG(name,unicode_str); /* key name */
1670 obj_handle_t hkey; /* handle to the open key */
1674 /* Delete a registry key */
1676 obj_handle_t hkey; /* handle to the key */
1680 /* Flush a registry key */
1682 obj_handle_t hkey; /* handle to the key */
1686 /* Enumerate registry subkeys */
1688 obj_handle_t hkey; /* handle to registry key */
1689 int index; /* index of subkey (or -1 for current key) */
1690 int info_class; /* requested information class */
1692 int subkeys; /* number of subkeys */
1693 int max_subkey; /* longest subkey name */
1694 int max_class; /* longest class name */
1695 int values; /* number of values */
1696 int max_value; /* longest value name */
1697 int max_data; /* longest value data */
1698 timeout_t modif; /* last modification time */
1699 data_size_t total; /* total length needed for full name and class */
1700 data_size_t namelen; /* length of key name in bytes */
1701 VARARG(name,unicode_str,namelen); /* key name */
1702 VARARG(class,unicode_str); /* class name */
1706 /* Set a value of a registry key */
1708 obj_handle_t hkey; /* handle to registry key */
1709 int type; /* value type */
1710 data_size_t namelen; /* length of value name in bytes */
1711 VARARG(name,unicode_str,namelen); /* value name */
1712 VARARG(data,bytes); /* value data */
1716 /* Retrieve the value of a registry key */
1718 obj_handle_t hkey; /* handle to registry key */
1719 VARARG(name,unicode_str); /* value name */
1721 int type; /* value type */
1722 data_size_t total; /* total length needed for data */
1723 VARARG(data,bytes); /* value data */
1727 /* Enumerate a value of a registry key */
1728 @REQ(enum_key_value)
1729 obj_handle_t hkey; /* handle to registry key */
1730 int index; /* value index */
1731 int info_class; /* requested information class */
1733 int type; /* value type */
1734 data_size_t total; /* total length needed for full name and data */
1735 data_size_t namelen; /* length of value name in bytes */
1736 VARARG(name,unicode_str,namelen); /* value name */
1737 VARARG(data,bytes); /* value data */
1741 /* Delete a value of a registry key */
1742 @REQ(delete_key_value)
1743 obj_handle_t hkey; /* handle to registry key */
1744 VARARG(name,unicode_str); /* value name */
1748 /* Load a registry branch from a file */
1750 obj_handle_t hkey; /* root key to load to */
1751 obj_handle_t file; /* file to load from */
1752 VARARG(name,unicode_str); /* subkey name */
1756 /* UnLoad a registry branch from a file */
1757 @REQ(unload_registry)
1758 obj_handle_t hkey; /* root key to unload to */
1762 /* Save a registry branch to a file */
1764 obj_handle_t hkey; /* key to save */
1765 obj_handle_t file; /* file to save to */
1769 /* Add a registry key change notification */
1770 @REQ(set_registry_notification)
1771 obj_handle_t hkey; /* key to watch for changes */
1772 obj_handle_t event; /* event to set */
1773 int subtree; /* should we watch the whole subtree? */
1774 unsigned int filter; /* things to watch */
1778 /* Create a waitable timer */
1780 unsigned int access; /* wanted access rights */
1781 unsigned int attributes; /* object attributes */
1782 obj_handle_t rootdir; /* root directory */
1783 int manual; /* manual reset */
1784 VARARG(name,unicode_str); /* object name */
1786 obj_handle_t handle; /* handle to the timer */
1790 /* Open a waitable timer */
1792 unsigned int access; /* wanted access rights */
1793 unsigned int attributes; /* object attributes */
1794 obj_handle_t rootdir; /* root directory */
1795 VARARG(name,unicode_str); /* object name */
1797 obj_handle_t handle; /* handle to the timer */
1800 /* Set a waitable timer */
1802 obj_handle_t handle; /* handle to the timer */
1803 timeout_t expire; /* next expiration absolute time */
1804 client_ptr_t callback; /* callback function */
1805 client_ptr_t arg; /* callback argument */
1806 int period; /* timer period in ms */
1808 int signaled; /* was the timer signaled before this call ? */
1811 /* Cancel a waitable timer */
1813 obj_handle_t handle; /* handle to the timer */
1815 int signaled; /* was the timer signaled before this calltime ? */
1818 /* Get information on a waitable timer */
1819 @REQ(get_timer_info)
1820 obj_handle_t handle; /* handle to the timer */
1822 timeout_t when; /* absolute time when the timer next expires */
1823 int signaled; /* is the timer signaled? */
1827 /* Retrieve the current context of a thread */
1828 @REQ(get_thread_context)
1829 obj_handle_t handle; /* thread handle */
1830 unsigned int flags; /* context flags */
1831 int suspend; /* if getting context during suspend */
1833 int self; /* was it a handle to the current thread? */
1834 VARARG(context,context); /* thread context */
1838 /* Set the current context of a thread */
1839 @REQ(set_thread_context)
1840 obj_handle_t handle; /* thread handle */
1841 int suspend; /* if setting context during suspend */
1842 VARARG(context,context); /* thread context */
1844 int self; /* was it a handle to the current thread? */
1848 /* Fetch a selector entry for a thread */
1849 @REQ(get_selector_entry)
1850 obj_handle_t handle; /* thread handle */
1851 int entry; /* LDT entry */
1853 unsigned int base; /* selector base */
1854 unsigned int limit; /* selector limit */
1855 unsigned char flags; /* selector flags */
1861 obj_handle_t table; /* which table to add atom to */
1862 VARARG(name,unicode_str); /* atom name */
1864 atom_t atom; /* resulting atom */
1868 /* Delete an atom */
1870 obj_handle_t table; /* which table to delete atom from */
1871 atom_t atom; /* atom handle */
1877 obj_handle_t table; /* which table to find atom from */
1878 VARARG(name,unicode_str); /* atom name */
1880 atom_t atom; /* atom handle */
1884 /* Get information about an atom */
1885 @REQ(get_atom_information)
1886 obj_handle_t table; /* which table to find atom from */
1887 atom_t atom; /* atom handle */
1889 int count; /* atom lock count */
1890 int pinned; /* whether the atom has been pinned */
1891 data_size_t total; /* actual length of atom name */
1892 VARARG(name,unicode_str); /* atom name */
1896 /* Set information about an atom */
1897 @REQ(set_atom_information)
1898 obj_handle_t table; /* which table to find atom from */
1899 atom_t atom; /* atom handle */
1900 int pinned; /* whether to bump atom information */
1904 /* Empty an atom table */
1905 @REQ(empty_atom_table)
1906 obj_handle_t table; /* which table to find atom from */
1907 int if_pinned; /* whether to delete pinned atoms */
1911 /* Init an atom table */
1912 @REQ(init_atom_table)
1913 int entries; /* number of entries (only for local) */
1915 obj_handle_t table; /* handle to the atom table */
1919 /* Get the message queue of the current thread */
1922 obj_handle_t handle; /* handle to the queue */
1926 /* Set the file descriptor associated to the current thread queue */
1928 obj_handle_t handle; /* handle to the file descriptor */
1932 /* Set the current message queue wakeup mask */
1933 @REQ(set_queue_mask)
1934 unsigned int wake_mask; /* wakeup bits mask */
1935 unsigned int changed_mask; /* changed bits mask */
1936 int skip_wait; /* will we skip waiting if signaled? */
1938 unsigned int wake_bits; /* current wake bits */
1939 unsigned int changed_bits; /* current changed bits */
1943 /* Get the current message queue status */
1944 @REQ(get_queue_status)
1945 int clear; /* should we clear the change bits? */
1947 unsigned int wake_bits; /* wake bits */
1948 unsigned int changed_bits; /* changed bits since last time */
1952 /* Retrieve the process idle event */
1953 @REQ(get_process_idle_event)
1954 obj_handle_t handle; /* process handle */
1956 obj_handle_t event; /* handle to idle event */
1960 /* Send a message to a thread queue */
1962 thread_id_t id; /* thread id */
1963 int type; /* message type (see below) */
1964 int flags; /* message flags (see below) */
1965 user_handle_t win; /* window handle */
1966 unsigned int msg; /* message code */
1967 lparam_t wparam; /* parameters */
1968 lparam_t lparam; /* parameters */
1969 timeout_t timeout; /* timeout for reply */
1970 VARARG(data,message_data); /* message data for sent messages */
1973 @REQ(post_quit_message)
1974 int exit_code; /* exit code to return */
1979 MSG_ASCII, /* Ascii message (from SendMessageA) */
1980 MSG_UNICODE, /* Unicode message (from SendMessageW) */
1981 MSG_NOTIFY, /* notify message (from SendNotifyMessageW), always Unicode */
1982 MSG_CALLBACK, /* callback message (from SendMessageCallbackW), always Unicode */
1983 MSG_CALLBACK_RESULT,/* result of a callback message */
1984 MSG_OTHER_PROCESS, /* sent from other process, may include vararg data, always Unicode */
1985 MSG_POSTED, /* posted message (from PostMessageW), always Unicode */
1986 MSG_HARDWARE, /* hardware message */
1987 MSG_WINEVENT /* winevent message */
1989 #define SEND_MSG_ABORT_IF_HUNG 0x01
1992 /* Send a hardware message to a thread queue */
1993 @REQ(send_hardware_message)
1994 thread_id_t id; /* thread id */
1995 user_handle_t win; /* window handle */
1996 unsigned int msg; /* message code */
1997 lparam_t wparam; /* parameters */
1998 lparam_t lparam; /* parameters */
1999 lparam_t info; /* extra info */
2000 int x; /* x position */
2001 int y; /* y position */
2002 unsigned int time; /* message time */
2004 user_handle_t cursor; /* current cursor for the target thread input */
2005 int count; /* current cursor count */
2009 /* Get a message from the current queue */
2011 unsigned int flags; /* PM_* flags */
2012 user_handle_t get_win; /* window handle to get */
2013 unsigned int get_first; /* first message code to get */
2014 unsigned int get_last; /* last message code to get */
2015 unsigned int hw_id; /* id of the previous hardware message (or 0) */
2016 unsigned int wake_mask; /* wakeup bits mask */
2017 unsigned int changed_mask; /* changed bits mask */
2019 user_handle_t win; /* window handle */
2020 unsigned int msg; /* message code */
2021 lparam_t wparam; /* parameters */
2022 lparam_t lparam; /* parameters */
2023 int type; /* message type */
2024 unsigned int time; /* message time */
2025 unsigned int active_hooks; /* active hooks bitmap */
2026 data_size_t total; /* total size of extra data */
2027 VARARG(data,message_data); /* message data for sent messages */
2031 /* Reply to a sent message */
2033 int remove; /* should we remove the message? */
2034 lparam_t result; /* message result */
2035 VARARG(data,bytes); /* message data for sent messages */
2039 /* Accept the current hardware message */
2040 @REQ(accept_hardware_message)
2041 unsigned int hw_id; /* id of the hardware message */
2042 int remove; /* should we remove the message? */
2043 user_handle_t new_win; /* new destination window for current message */
2047 /* Retrieve the reply for the last message sent */
2048 @REQ(get_message_reply)
2049 int cancel; /* cancel message if not ready? */
2051 lparam_t result; /* message result */
2052 VARARG(data,bytes); /* message data for sent messages */
2056 /* Set a window timer */
2058 user_handle_t win; /* window handle */
2059 unsigned int msg; /* message to post */
2060 unsigned int rate; /* timer rate in ms */
2061 lparam_t id; /* timer id */
2062 lparam_t lparam; /* message lparam (callback proc) */
2064 lparam_t id; /* timer id */
2068 /* Kill a window timer */
2069 @REQ(kill_win_timer)
2070 user_handle_t win; /* window handle */
2071 lparam_t id; /* timer id */
2072 unsigned int msg; /* message to post */
2076 /* check if the thread owning the window is hung */
2077 @REQ(is_window_hung)
2078 user_handle_t win; /* window handle */
2084 /* Retrieve info about a serial port */
2085 @REQ(get_serial_info)
2086 obj_handle_t handle; /* handle to comm port */
2088 unsigned int readinterval;
2089 unsigned int readconst;
2090 unsigned int readmult;
2091 unsigned int writeconst;
2092 unsigned int writemult;
2093 unsigned int eventmask;
2097 /* Set info about a serial port */
2098 @REQ(set_serial_info)
2099 obj_handle_t handle; /* handle to comm port */
2100 int flags; /* bitmask to set values (see below) */
2101 unsigned int readinterval;
2102 unsigned int readconst;
2103 unsigned int readmult;
2104 unsigned int writeconst;
2105 unsigned int writemult;
2106 unsigned int eventmask;
2108 #define SERIALINFO_SET_TIMEOUTS 0x01
2109 #define SERIALINFO_SET_MASK 0x02
2112 /* Create an async I/O */
2113 @REQ(register_async)
2114 int type; /* type of queue to look after */
2115 async_data_t async; /* async I/O parameters */
2116 int count; /* count - usually # of bytes to be read/written */
2118 #define ASYNC_TYPE_READ 0x01
2119 #define ASYNC_TYPE_WRITE 0x02
2120 #define ASYNC_TYPE_WAIT 0x03
2123 /* Cancel all async op on a fd */
2125 obj_handle_t handle; /* handle to comm port, socket or file */
2126 client_ptr_t iosb; /* I/O status block (NULL=all) */
2127 int only_thread; /* cancel matching this thread */
2131 /* Perform an ioctl on a file */
2133 ioctl_code_t code; /* ioctl code */
2134 async_data_t async; /* async I/O parameters */
2135 int blocking; /* whether it's a blocking ioctl */
2136 VARARG(in_data,bytes); /* ioctl input data */
2138 obj_handle_t wait; /* handle to wait on for blocking ioctl */
2139 unsigned int options; /* device open options */
2140 VARARG(out_data,bytes); /* ioctl output data */
2144 /* Retrieve results of an async ioctl */
2145 @REQ(get_ioctl_result)
2146 obj_handle_t handle; /* handle to the device */
2147 client_ptr_t user_arg; /* user arg used to identify the request */
2149 VARARG(out_data,bytes); /* ioctl output data */
2153 /* Create a named pipe */
2154 @REQ(create_named_pipe)
2155 unsigned int access;
2156 unsigned int attributes; /* object attributes */
2157 obj_handle_t rootdir; /* root directory */
2158 unsigned int options;
2159 unsigned int maxinstances;
2160 unsigned int outsize;
2161 unsigned int insize;
2164 VARARG(name,unicode_str); /* pipe name */
2166 obj_handle_t handle; /* handle to the pipe */
2169 /* flags in create_named_pipe and get_named_pipe_info */
2170 #define NAMED_PIPE_MESSAGE_STREAM_WRITE 0x0001
2171 #define NAMED_PIPE_MESSAGE_STREAM_READ 0x0002
2172 #define NAMED_PIPE_NONBLOCKING_MODE 0x0004
2173 #define NAMED_PIPE_SERVER_END 0x8000
2176 @REQ(get_named_pipe_info)
2177 obj_handle_t handle;
2180 unsigned int maxinstances;
2181 unsigned int instances;
2182 unsigned int outsize;
2183 unsigned int insize;
2187 /* Create a window */
2189 user_handle_t parent; /* parent window */
2190 user_handle_t owner; /* owner window */
2191 atom_t atom; /* class atom */
2192 mod_handle_t instance; /* module instance */
2193 VARARG(class,unicode_str); /* class name */
2195 user_handle_t handle; /* created window */
2196 user_handle_t parent; /* full handle of parent */
2197 user_handle_t owner; /* full handle of owner */
2198 int extra; /* number of extra bytes */
2199 client_ptr_t class_ptr; /* pointer to class in client address space */
2203 /* Destroy a window */
2204 @REQ(destroy_window)
2205 user_handle_t handle; /* handle to the window */
2209 /* Retrieve the desktop window for the current thread */
2210 @REQ(get_desktop_window)
2211 int force; /* force creation if it doesn't exist */
2213 user_handle_t top_window; /* handle to the desktop window */
2214 user_handle_t msg_window; /* handle to the top-level HWND_MESSAGE parent */
2218 /* Set a window owner */
2219 @REQ(set_window_owner)
2220 user_handle_t handle; /* handle to the window */
2221 user_handle_t owner; /* new owner */
2223 user_handle_t full_owner; /* full handle of new owner */
2224 user_handle_t prev_owner; /* full handle of previous owner */
2228 /* Get information from a window handle */
2229 @REQ(get_window_info)
2230 user_handle_t handle; /* handle to the window */
2232 user_handle_t full_handle; /* full 32-bit handle */
2233 user_handle_t last_active; /* last active popup */
2234 process_id_t pid; /* process owning the window */
2235 thread_id_t tid; /* thread owning the window */
2236 atom_t atom; /* class atom */
2237 int is_unicode; /* ANSI or unicode */
2241 /* Set some information in a window */
2242 @REQ(set_window_info)
2243 unsigned short flags; /* flags for fields to set (see below) */
2244 short int is_unicode; /* ANSI or unicode */
2245 user_handle_t handle; /* handle to the window */
2246 unsigned int style; /* window style */
2247 unsigned int ex_style; /* window extended style */
2248 unsigned int id; /* window id */
2249 mod_handle_t instance; /* creator instance */
2250 lparam_t user_data; /* user-specific data */
2251 int extra_offset; /* offset to set in extra bytes */
2252 data_size_t extra_size; /* size to set in extra bytes */
2253 lparam_t extra_value; /* value to set in extra bytes */
2255 unsigned int old_style; /* old window style */
2256 unsigned int old_ex_style; /* old window extended style */
2257 mod_handle_t old_instance; /* old creator instance */
2258 lparam_t old_user_data; /* old user-specific data */
2259 lparam_t old_extra_value; /* old value in extra bytes */
2260 unsigned int old_id; /* old window id */
2262 #define SET_WIN_STYLE 0x01
2263 #define SET_WIN_EXSTYLE 0x02
2264 #define SET_WIN_ID 0x04
2265 #define SET_WIN_INSTANCE 0x08
2266 #define SET_WIN_USERDATA 0x10
2267 #define SET_WIN_EXTRA 0x20
2268 #define SET_WIN_UNICODE 0x40
2271 /* Set the parent of a window */
2273 user_handle_t handle; /* handle to the window */
2274 user_handle_t parent; /* handle to the parent */
2276 user_handle_t old_parent; /* old parent window */
2277 user_handle_t full_parent; /* full handle of new parent */
2281 /* Get a list of the window parents, up to the root of the tree */
2282 @REQ(get_window_parents)
2283 user_handle_t handle; /* handle to the window */
2285 int count; /* total count of parents */
2286 VARARG(parents,user_handles); /* parent handles */
2290 /* Get a list of the window children */
2291 @REQ(get_window_children)
2292 obj_handle_t desktop; /* handle to desktop */
2293 user_handle_t parent; /* parent window */
2294 atom_t atom; /* class atom for the listed children */
2295 thread_id_t tid; /* thread owning the listed children */
2296 VARARG(class,unicode_str); /* class name */
2298 int count; /* total count of children */
2299 VARARG(children,user_handles); /* children handles */
2303 /* Get a list of the window children that contain a given point */
2304 @REQ(get_window_children_from_point)
2305 user_handle_t parent; /* parent window */
2306 int x; /* point in parent coordinates */
2309 int count; /* total count of children */
2310 VARARG(children,user_handles); /* children handles */
2314 /* Get window tree information from a window handle */
2315 @REQ(get_window_tree)
2316 user_handle_t handle; /* handle to the window */
2318 user_handle_t parent; /* parent window */
2319 user_handle_t owner; /* owner window */
2320 user_handle_t next_sibling; /* next sibling in Z-order */
2321 user_handle_t prev_sibling; /* prev sibling in Z-order */
2322 user_handle_t first_sibling; /* first sibling in Z-order */
2323 user_handle_t last_sibling; /* last sibling in Z-order */
2324 user_handle_t first_child; /* first child */
2325 user_handle_t last_child; /* last child */
2328 /* Set the position and Z order of a window */
2329 @REQ(set_window_pos)
2330 unsigned int flags; /* SWP_* flags */
2331 user_handle_t handle; /* handle to the window */
2332 user_handle_t previous; /* previous window in Z order */
2333 rectangle_t window; /* window rectangle */
2334 rectangle_t client; /* client rectangle */
2335 VARARG(valid,rectangles); /* valid rectangles from WM_NCCALCSIZE */
2337 unsigned int new_style; /* new window style */
2338 unsigned int new_ex_style; /* new window extended style */
2342 /* Get the window and client rectangles of a window */
2343 @REQ(get_window_rectangles)
2344 user_handle_t handle; /* handle to the window */
2346 rectangle_t window; /* window rectangle */
2347 rectangle_t visible; /* visible part of the window rectangle */
2348 rectangle_t client; /* client rectangle */
2352 /* Get the window text */
2353 @REQ(get_window_text)
2354 user_handle_t handle; /* handle to the window */
2356 VARARG(text,unicode_str); /* window text */
2360 /* Set the window text */
2361 @REQ(set_window_text)
2362 user_handle_t handle; /* handle to the window */
2363 VARARG(text,unicode_str); /* window text */
2367 /* Get the coordinates offset between two windows */
2368 @REQ(get_windows_offset)
2369 user_handle_t from; /* handle to the first window */
2370 user_handle_t to; /* handle to the second window */
2372 int x; /* x coordinate offset */
2373 int y; /* y coordinate offset */
2377 /* Get the visible region of a window */
2378 @REQ(get_visible_region)
2379 user_handle_t window; /* handle to the window */
2380 unsigned int flags; /* DCX flags */
2382 user_handle_t top_win; /* top window to clip against */
2383 rectangle_t top_rect; /* top window visible rect with screen coords */
2384 rectangle_t win_rect; /* window rect in screen coords */
2385 data_size_t total_size; /* total size of the resulting region */
2386 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2390 /* Get the window region */
2391 @REQ(get_window_region)
2392 user_handle_t window; /* handle to the window */
2394 data_size_t total_size; /* total size of the resulting region */
2395 VARARG(region,rectangles); /* list of rectangles for the region */
2399 /* Set the window region */
2400 @REQ(set_window_region)
2401 user_handle_t window; /* handle to the window */
2402 int redraw; /* redraw the window? */
2403 VARARG(region,rectangles); /* list of rectangles for the region */
2407 /* Get the window update region */
2408 @REQ(get_update_region)
2409 user_handle_t window; /* handle to the window */
2410 user_handle_t from_child; /* child to start searching from */
2411 unsigned int flags; /* update flags (see below) */
2413 user_handle_t child; /* child to repaint (or window itself) */
2414 unsigned int flags; /* resulting update flags (see below) */
2415 data_size_t total_size; /* total size of the resulting region */
2416 VARARG(region,rectangles); /* list of rectangles for the region */
2418 #define UPDATE_NONCLIENT 0x01 /* get region for repainting non-client area */
2419 #define UPDATE_ERASE 0x02 /* get region for erasing client area */
2420 #define UPDATE_PAINT 0x04 /* get region for painting client area */
2421 #define UPDATE_INTERNALPAINT 0x08 /* get region if internal paint is pending */
2422 #define UPDATE_ALLCHILDREN 0x10 /* force repaint of all children */
2423 #define UPDATE_NOCHILDREN 0x20 /* don't try to repaint any children */
2424 #define UPDATE_NOREGION 0x40 /* don't return a region, only the flags */
2425 #define UPDATE_DELAYED_ERASE 0x80 /* still needs erase after BeginPaint */
2428 /* Update the z order of a window so that a given rectangle is fully visible */
2429 @REQ(update_window_zorder)
2430 user_handle_t window; /* handle to the window */
2431 rectangle_t rect; /* rectangle that must be visible */
2435 /* Mark parts of a window as needing a redraw */
2437 user_handle_t window; /* handle to the window */
2438 unsigned int flags; /* RDW_* flags */
2439 VARARG(region,rectangles); /* list of rectangles for the region */
2443 /* Set a window property */
2444 @REQ(set_window_property)
2445 user_handle_t window; /* handle to the window */
2446 lparam_t data; /* data to store */
2447 atom_t atom; /* property atom (if no name specified) */
2448 VARARG(name,unicode_str); /* property name */
2452 /* Remove a window property */
2453 @REQ(remove_window_property)
2454 user_handle_t window; /* handle to the window */
2455 atom_t atom; /* property atom (if no name specified) */
2456 VARARG(name,unicode_str); /* property name */
2458 lparam_t data; /* data stored in property */
2462 /* Get a window property */
2463 @REQ(get_window_property)
2464 user_handle_t window; /* handle to the window */
2465 atom_t atom; /* property atom (if no name specified) */
2466 VARARG(name,unicode_str); /* property name */
2468 lparam_t data; /* data stored in property */
2472 /* Get the list of properties of a window */
2473 @REQ(get_window_properties)
2474 user_handle_t window; /* handle to the window */
2476 int total; /* total number of properties */
2477 VARARG(props,properties); /* list of properties */
2481 /* Create a window station */
2482 @REQ(create_winstation)
2483 unsigned int flags; /* window station flags */
2484 unsigned int access; /* wanted access rights */
2485 unsigned int attributes; /* object attributes */
2486 VARARG(name,unicode_str); /* object name */
2488 obj_handle_t handle; /* handle to the window station */
2492 /* Open a handle to a window station */
2493 @REQ(open_winstation)
2494 unsigned int access; /* wanted access rights */
2495 unsigned int attributes; /* object attributes */
2496 VARARG(name,unicode_str); /* object name */
2498 obj_handle_t handle; /* handle to the window station */
2502 /* Close a window station */
2503 @REQ(close_winstation)
2504 obj_handle_t handle; /* handle to the window station */
2508 /* Get the process current window station */
2509 @REQ(get_process_winstation)
2511 obj_handle_t handle; /* handle to the window station */
2515 /* Set the process current window station */
2516 @REQ(set_process_winstation)
2517 obj_handle_t handle; /* handle to the window station */
2521 /* Enumerate window stations */
2522 @REQ(enum_winstation)
2523 unsigned int index; /* current index */
2525 unsigned int next; /* next index */
2526 VARARG(name,unicode_str); /* window station name */
2530 /* Create a desktop */
2531 @REQ(create_desktop)
2532 unsigned int flags; /* desktop flags */
2533 unsigned int access; /* wanted access rights */
2534 unsigned int attributes; /* object attributes */
2535 VARARG(name,unicode_str); /* object name */
2537 obj_handle_t handle; /* handle to the desktop */
2541 /* Open a handle to a desktop */
2543 obj_handle_t winsta; /* window station to open (null allowed) */
2544 unsigned int flags; /* desktop flags */
2545 unsigned int access; /* wanted access rights */
2546 unsigned int attributes; /* object attributes */
2547 VARARG(name,unicode_str); /* object name */
2549 obj_handle_t handle; /* handle to the desktop */
2553 /* Close a desktop */
2555 obj_handle_t handle; /* handle to the desktop */
2559 /* Get the thread current desktop */
2560 @REQ(get_thread_desktop)
2561 thread_id_t tid; /* thread id */
2563 obj_handle_t handle; /* handle to the desktop */
2567 /* Set the thread current desktop */
2568 @REQ(set_thread_desktop)
2569 obj_handle_t handle; /* handle to the desktop */
2573 /* Enumerate desktops */
2575 obj_handle_t winstation; /* handle to the window station */
2576 unsigned int index; /* current index */
2578 unsigned int next; /* next index */
2579 VARARG(name,unicode_str); /* window station name */
2583 /* Get/set information about a user object (window station or desktop) */
2584 @REQ(set_user_object_info)
2585 obj_handle_t handle; /* handle to the object */
2586 unsigned int flags; /* information to set */
2587 unsigned int obj_flags; /* new object flags */
2589 int is_desktop; /* is object a desktop? */
2590 unsigned int old_obj_flags; /* old object flags */
2591 VARARG(name,unicode_str); /* object name */
2593 #define SET_USER_OBJECT_FLAGS 1
2596 /* Attach (or detach) thread inputs */
2597 @REQ(attach_thread_input)
2598 thread_id_t tid_from; /* thread to be attached */
2599 thread_id_t tid_to; /* thread to which tid_from should be attached */
2600 int attach; /* is it an attach? */
2604 /* Get input data for a given thread */
2605 @REQ(get_thread_input)
2606 thread_id_t tid; /* id of thread */
2608 user_handle_t focus; /* handle to the focus window */
2609 user_handle_t capture; /* handle to the capture window */
2610 user_handle_t active; /* handle to the active window */
2611 user_handle_t foreground; /* handle to the global foreground window */
2612 user_handle_t menu_owner; /* handle to the menu owner */
2613 user_handle_t move_size; /* handle to the moving/resizing window */
2614 user_handle_t caret; /* handle to the caret window */
2615 user_handle_t cursor; /* handle to the cursor */
2616 int show_count; /* cursor show count */
2617 rectangle_t rect; /* caret rectangle */
2621 /* Get the time of the last input event */
2622 @REQ(get_last_input_time)
2628 /* Retrieve queue keyboard state for a given thread */
2630 thread_id_t tid; /* id of thread */
2631 int key; /* optional key code or -1 */
2633 unsigned char state; /* state of specified key */
2634 VARARG(keystate,bytes); /* state array for all the keys */
2637 /* Set queue keyboard state for a given thread */
2639 thread_id_t tid; /* id of thread */
2640 VARARG(keystate,bytes); /* state array for all the keys */
2643 /* Set the system foreground window */
2644 @REQ(set_foreground_window)
2645 user_handle_t handle; /* handle to the foreground window */
2647 user_handle_t previous; /* handle to the previous foreground window */
2648 int send_msg_old; /* whether we have to send a msg to the old window */
2649 int send_msg_new; /* whether we have to send a msg to the new window */
2652 /* Set the current thread focus window */
2653 @REQ(set_focus_window)
2654 user_handle_t handle; /* handle to the focus window */
2656 user_handle_t previous; /* handle to the previous focus window */
2659 /* Set the current thread active window */
2660 @REQ(set_active_window)
2661 user_handle_t handle; /* handle to the active window */
2663 user_handle_t previous; /* handle to the previous active window */
2666 /* Set the current thread capture window */
2667 @REQ(set_capture_window)
2668 user_handle_t handle; /* handle to the capture window */
2669 unsigned int flags; /* capture flags (see below) */
2671 user_handle_t previous; /* handle to the previous capture window */
2672 user_handle_t full_handle; /* full 32-bit handle of new capture window */
2674 #define CAPTURE_MENU 0x01 /* capture is for a menu */
2675 #define CAPTURE_MOVESIZE 0x02 /* capture is for moving/resizing */
2678 /* Set the current thread caret window */
2679 @REQ(set_caret_window)
2680 user_handle_t handle; /* handle to the caret window */
2681 int width; /* caret width */
2682 int height; /* caret height */
2684 user_handle_t previous; /* handle to the previous caret window */
2685 rectangle_t old_rect; /* previous caret rectangle */
2686 int old_hide; /* previous hide count */
2687 int old_state; /* previous caret state (1=on, 0=off) */
2691 /* Set the current thread caret information */
2692 @REQ(set_caret_info)
2693 unsigned int flags; /* caret flags (see below) */
2694 user_handle_t handle; /* handle to the caret window */
2695 int x; /* caret x position */
2696 int y; /* caret y position */
2697 int hide; /* increment for hide count (can be negative to show it) */
2698 int state; /* caret state (1=on, 0=off, -1=toggle current state) */
2700 user_handle_t full_handle; /* handle to the current caret window */
2701 rectangle_t old_rect; /* previous caret rectangle */
2702 int old_hide; /* previous hide count */
2703 int old_state; /* previous caret state (1=on, 0=off) */
2705 #define SET_CARET_POS 0x01 /* set the caret position from x,y */
2706 #define SET_CARET_HIDE 0x02 /* increment the caret hide count */
2707 #define SET_CARET_STATE 0x04 /* set the caret on/off state */
2710 /* Set a window hook */
2712 int id; /* id of the hook */
2713 process_id_t pid; /* id of process to set the hook into */
2714 thread_id_t tid; /* id of thread to set the hook into */
2717 client_ptr_t proc; /* hook procedure */
2719 int unicode; /* is it a unicode hook? */
2720 VARARG(module,unicode_str); /* module name */
2722 user_handle_t handle; /* handle to the hook */
2723 unsigned int active_hooks; /* active hooks bitmap */
2727 /* Remove a window hook */
2729 user_handle_t handle; /* handle to the hook */
2730 client_ptr_t proc; /* hook procedure if handle is 0 */
2731 int id; /* id of the hook if handle is 0 */
2733 unsigned int active_hooks; /* active hooks bitmap */
2737 /* Start calling a hook chain */
2738 @REQ(start_hook_chain)
2739 int id; /* id of the hook */
2740 int event; /* signalled event */
2741 user_handle_t window; /* handle to the event window */
2742 int object_id; /* object id for out of context winevent */
2743 int child_id; /* child id for out of context winevent */
2745 user_handle_t handle; /* handle to the next hook */
2746 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2747 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2748 int unicode; /* is it a unicode hook? */
2749 client_ptr_t proc; /* hook procedure */
2750 unsigned int active_hooks; /* active hooks bitmap */
2751 VARARG(module,unicode_str); /* module name */
2755 /* Finished calling a hook chain */
2756 @REQ(finish_hook_chain)
2757 int id; /* id of the hook */
2761 /* Get the hook information */
2763 user_handle_t handle; /* handle to the current hook */
2764 int get_next; /* do we want info about current or next hook? */
2765 int event; /* signalled event */
2766 user_handle_t window; /* handle to the event window */
2767 int object_id; /* object id for out of context winevent */
2768 int child_id; /* child id for out of context winevent */
2770 user_handle_t handle; /* handle to the hook */
2771 int id; /* id of the hook */
2772 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2773 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2774 client_ptr_t proc; /* hook procedure */
2775 int unicode; /* is it a unicode hook? */
2776 VARARG(module,unicode_str); /* module name */
2780 /* Create a window class */
2782 int local; /* is it a local class? */
2783 atom_t atom; /* class atom */
2784 unsigned int style; /* class style */
2785 mod_handle_t instance; /* module instance */
2786 int extra; /* number of extra class bytes */
2787 int win_extra; /* number of window extra bytes */
2788 client_ptr_t client_ptr; /* pointer to class in client address space */
2789 VARARG(name,unicode_str); /* class name */
2791 atom_t atom; /* resulting class atom */
2795 /* Destroy a window class */
2797 atom_t atom; /* class atom */
2798 mod_handle_t instance; /* module instance */
2799 VARARG(name,unicode_str); /* class name */
2801 client_ptr_t client_ptr; /* pointer to class in client address space */
2805 /* Set some information in a class */
2806 @REQ(set_class_info)
2807 user_handle_t window; /* handle to the window */
2808 unsigned int flags; /* flags for info to set (see below) */
2809 atom_t atom; /* class atom */
2810 unsigned int style; /* class style */
2811 int win_extra; /* number of window extra bytes */
2812 mod_handle_t instance; /* module instance */
2813 int extra_offset; /* offset to set in extra bytes */
2814 data_size_t extra_size; /* size to set in extra bytes */
2815 lparam_t extra_value; /* value to set in extra bytes */
2817 atom_t old_atom; /* previous class atom */
2818 unsigned int old_style; /* previous class style */
2819 int old_extra; /* previous number of class extra bytes */
2820 int old_win_extra; /* previous number of window extra bytes */
2821 mod_handle_t old_instance; /* previous module instance */
2822 lparam_t old_extra_value; /* old value in extra bytes */
2824 #define SET_CLASS_ATOM 0x0001
2825 #define SET_CLASS_STYLE 0x0002
2826 #define SET_CLASS_WINEXTRA 0x0004
2827 #define SET_CLASS_INSTANCE 0x0008
2828 #define SET_CLASS_EXTRA 0x0010
2831 /* Set/get clipboard information */
2832 @REQ(set_clipboard_info)
2833 unsigned int flags; /* flags for fields to set (see below) */
2834 user_handle_t clipboard; /* clipboard window */
2835 user_handle_t owner; /* clipboard owner */
2836 user_handle_t viewer; /* first clipboard viewer */
2837 unsigned int seqno; /* change sequence number */
2839 unsigned int flags; /* status flags (see below) */
2840 user_handle_t old_clipboard; /* old clipboard window */
2841 user_handle_t old_owner; /* old clipboard owner */
2842 user_handle_t old_viewer; /* old clipboard viewer */
2843 unsigned int seqno; /* current sequence number */
2846 #define SET_CB_OPEN 0x001
2847 #define SET_CB_OWNER 0x002
2848 #define SET_CB_VIEWER 0x004
2849 #define SET_CB_SEQNO 0x008
2850 #define SET_CB_RELOWNER 0x010
2851 #define SET_CB_CLOSE 0x020
2852 #define CB_OPEN 0x040
2853 #define CB_OWNER 0x080
2854 #define CB_PROCESS 0x100
2857 /* Open a security token */
2859 obj_handle_t handle; /* handle to the thread or process */
2860 unsigned int access; /* access rights to the new token */
2861 unsigned int attributes;/* object attributes */
2862 unsigned int flags; /* flags (see below) */
2864 obj_handle_t token; /* handle to the token */
2866 #define OPEN_TOKEN_THREAD 1
2867 #define OPEN_TOKEN_AS_SELF 2
2870 /* Set/get the global windows */
2871 @REQ(set_global_windows)
2872 unsigned int flags; /* flags for fields to set (see below) */
2873 user_handle_t shell_window; /* handle to the new shell window */
2874 user_handle_t shell_listview; /* handle to the new shell listview window */
2875 user_handle_t progman_window; /* handle to the new program manager window */
2876 user_handle_t taskman_window; /* handle to the new task manager window */
2878 user_handle_t old_shell_window; /* handle to the shell window */
2879 user_handle_t old_shell_listview; /* handle to the shell listview window */
2880 user_handle_t old_progman_window; /* handle to the new program manager window */
2881 user_handle_t old_taskman_window; /* handle to the new task manager window */
2883 #define SET_GLOBAL_SHELL_WINDOWS 0x01 /* set both main shell and listview windows */
2884 #define SET_GLOBAL_PROGMAN_WINDOW 0x02
2885 #define SET_GLOBAL_TASKMAN_WINDOW 0x04
2887 /* Adjust the privileges held by a token */
2888 @REQ(adjust_token_privileges)
2889 obj_handle_t handle; /* handle to the token */
2890 int disable_all; /* disable all privileges? */
2891 int get_modified_state; /* get modified privileges? */
2892 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to enable/disable/remove */
2894 unsigned int len; /* total length in bytes required to store token privileges */
2895 VARARG(privileges,LUID_AND_ATTRIBUTES); /* modified privileges */
2898 /* Retrieves the set of privileges held by or available to a token */
2899 @REQ(get_token_privileges)
2900 obj_handle_t handle; /* handle to the token */
2902 unsigned int len; /* total length in bytes required to store token privileges */
2903 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
2906 /* Check the token has the required privileges */
2907 @REQ(check_token_privileges)
2908 obj_handle_t handle; /* handle to the token */
2909 int all_required; /* are all the privileges required for the check to succeed? */
2910 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to check */
2912 int has_privileges; /* does the token have the required privileges? */
2913 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
2916 @REQ(duplicate_token)
2917 obj_handle_t handle; /* handle to the token to duplicate */
2918 unsigned int access; /* access rights to the new token */
2919 unsigned int attributes; /* object attributes */
2920 int primary; /* is the new token to be a primary one? */
2921 int impersonation_level; /* impersonation level of the new token */
2923 obj_handle_t new_handle; /* duplicated handle */
2927 obj_handle_t handle; /* handle to the token */
2928 unsigned int desired_access; /* desired access to the object */
2929 unsigned int mapping_read; /* mapping from generic read to specific rights */
2930 unsigned int mapping_write; /* mapping from generic write to specific rights */
2931 unsigned int mapping_execute; /* mapping from generic execute to specific rights */
2932 unsigned int mapping_all; /* mapping from generic all to specific rights */
2933 VARARG(sd,security_descriptor); /* security descriptor to check */
2935 unsigned int access_granted; /* access rights actually granted */
2936 unsigned int access_status; /* was access granted? */
2937 unsigned int privileges_len; /* length needed to store privileges */
2938 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges used during access check */
2942 obj_handle_t handle; /* handle to the token */
2943 unsigned int which_sid; /* which SID to retrieve from the token */
2945 data_size_t sid_len; /* length needed to store sid */
2946 VARARG(sid,SID); /* the sid specified by which_sid from the token */
2949 @REQ(get_token_groups)
2950 obj_handle_t handle; /* handle to the token */
2952 data_size_t user_len; /* length needed to store user */
2953 VARARG(user,token_groups); /* groups the token's user belongs to */
2956 @REQ(get_token_default_dacl)
2957 obj_handle_t handle; /* handle to the token */
2959 data_size_t acl_len; /* length needed to store access control list */
2960 VARARG(acl,ACL); /* access control list */
2963 @REQ(set_token_default_dacl)
2964 obj_handle_t handle; /* handle to the token */
2965 VARARG(acl,ACL); /* default dacl to set */
2968 @REQ(set_security_object)
2969 obj_handle_t handle; /* handle to the object */
2970 unsigned int security_info; /* which parts of security descriptor to set */
2971 VARARG(sd,security_descriptor); /* security descriptor to set */
2974 @REQ(get_security_object)
2975 obj_handle_t handle; /* handle to the object */
2976 unsigned int security_info; /* which parts of security descriptor to get */
2978 unsigned int sd_len; /* buffer size needed for sd */
2979 VARARG(sd,security_descriptor); /* retrieved security descriptor */
2982 /* Create a mailslot */
2983 @REQ(create_mailslot)
2984 unsigned int access; /* wanted access rights */
2985 unsigned int attributes; /* object attributes */
2986 obj_handle_t rootdir; /* root directory */
2987 timeout_t read_timeout;
2988 unsigned int max_msgsize;
2989 VARARG(name,unicode_str); /* mailslot name */
2991 obj_handle_t handle; /* handle to the mailslot */
2995 /* Set mailslot information */
2996 @REQ(set_mailslot_info)
2997 obj_handle_t handle; /* handle to the mailslot */
2998 timeout_t read_timeout;
3001 timeout_t read_timeout;
3002 unsigned int max_msgsize;
3004 #define MAILSLOT_SET_READ_TIMEOUT 1
3007 /* Create a directory object */
3008 @REQ(create_directory)
3009 unsigned int access; /* access flags */
3010 unsigned int attributes; /* object attributes */
3011 obj_handle_t rootdir; /* root directory */
3012 VARARG(directory_name,unicode_str); /* Directory name */
3014 obj_handle_t handle; /* handle to the directory */
3018 /* Open a directory object */
3019 @REQ(open_directory)
3020 unsigned int access; /* access flags */
3021 unsigned int attributes; /* object attributes */
3022 obj_handle_t rootdir; /* root directory */
3023 VARARG(directory_name,unicode_str); /* Directory name */
3025 obj_handle_t handle; /* handle to the directory */
3029 /* Get a directory entry by index */
3030 @REQ(get_directory_entry)
3031 obj_handle_t handle; /* handle to the directory */
3032 unsigned int index; /* entry index */
3034 data_size_t name_len; /* length of the entry name in bytes */
3035 VARARG(name,unicode_str,name_len); /* entry name */
3036 VARARG(type,unicode_str); /* entry type */
3040 /* Create a symbolic link object */
3041 @REQ(create_symlink)
3042 unsigned int access; /* access flags */
3043 unsigned int attributes; /* object attributes */
3044 obj_handle_t rootdir; /* root directory */
3045 data_size_t name_len; /* length of the symlink name in bytes */
3046 VARARG(name,unicode_str,name_len); /* symlink name */
3047 VARARG(target_name,unicode_str); /* target name */
3049 obj_handle_t handle; /* handle to the symlink */
3053 /* Open a symbolic link object */
3055 unsigned int access; /* access flags */
3056 unsigned int attributes; /* object attributes */
3057 obj_handle_t rootdir; /* root directory */
3058 VARARG(name,unicode_str); /* symlink name */
3060 obj_handle_t handle; /* handle to the symlink */
3064 /* Query a symbolic link object */
3066 obj_handle_t handle; /* handle to the symlink */
3068 data_size_t total; /* total needed size for name */
3069 VARARG(target_name,unicode_str); /* target name */
3073 /* Query basic object information */
3074 @REQ(get_object_info)
3075 obj_handle_t handle; /* handle to the object */
3077 unsigned int access; /* granted access mask */
3078 unsigned int ref_count; /* object ref count */
3079 data_size_t total; /* total needed size for name */
3080 VARARG(name,unicode_str); /* object name */
3084 /* Unlink a named object */
3086 obj_handle_t handle; /* handle to the object */
3090 /* Query the impersonation level of an impersonation token */
3091 @REQ(get_token_impersonation_level)
3092 obj_handle_t handle; /* handle to the object */
3094 int impersonation_level; /* impersonation level of the impersonation token */
3097 /* Allocate a locally-unique identifier */
3098 @REQ(allocate_locally_unique_id)
3104 /* Create a device manager */
3105 @REQ(create_device_manager)
3106 unsigned int access; /* wanted access rights */
3107 unsigned int attributes; /* object attributes */
3109 obj_handle_t handle; /* handle to the device */
3113 /* Create a device */
3115 unsigned int access; /* wanted access rights */
3116 unsigned int attributes; /* object attributes */
3117 obj_handle_t rootdir; /* root directory */
3118 client_ptr_t user_ptr; /* opaque ptr for use by client */
3119 obj_handle_t manager; /* device manager */
3120 VARARG(name,unicode_str); /* object name */
3122 obj_handle_t handle; /* handle to the device */
3126 /* Delete a device */
3128 obj_handle_t handle; /* handle to the device */
3132 /* Retrieve the next pending device ioctl request */
3133 @REQ(get_next_device_request)
3134 obj_handle_t manager; /* handle to the device manager */
3135 obj_handle_t prev; /* handle to the previous ioctl */
3136 unsigned int status; /* status of the previous ioctl */
3137 VARARG(prev_data,bytes); /* output data of the previous ioctl */
3139 obj_handle_t next; /* handle to the next ioctl */
3140 ioctl_code_t code; /* ioctl code */
3141 client_ptr_t user_ptr; /* opaque ptr for the device */
3142 data_size_t in_size; /* total needed input size */
3143 data_size_t out_size; /* needed output size */
3144 VARARG(next_data,bytes); /* input data of the next ioctl */
3148 /* Make the current process a system process */
3149 @REQ(make_process_system)
3151 obj_handle_t event; /* event signaled when all user processes have exited */
3155 /* Get detailed fixed-size information about a token */
3156 @REQ(get_token_statistics)
3157 obj_handle_t handle; /* handle to the object */
3159 luid_t token_id; /* locally-unique identifier of the token */
3160 luid_t modified_id; /* locally-unique identifier of the modified version of the token */
3161 int primary; /* is the token primary or impersonation? */
3162 int impersonation_level; /* level of impersonation */
3163 int group_count; /* the number of groups the token is a member of */
3164 int privilege_count; /* the number of privileges the token has */
3168 /* Create I/O completion port */
3169 @REQ(create_completion)
3170 unsigned int access; /* desired access to a port */
3171 unsigned int attributes; /* object attributes */
3172 unsigned int concurrent; /* max number of concurrent active threads */
3173 obj_handle_t rootdir; /* root directory */
3174 VARARG(filename,string); /* port name */
3176 obj_handle_t handle; /* port handle */
3180 /* Open I/O completion port */
3181 @REQ(open_completion)
3182 unsigned int access; /* desired access to a port */
3183 unsigned int attributes; /* object attributes */
3184 obj_handle_t rootdir; /* root directory */
3185 VARARG(filename,string); /* port name */
3187 obj_handle_t handle; /* port handle */
3191 /* add completion to completion port */
3192 @REQ(add_completion)
3193 obj_handle_t handle; /* port handle */
3194 apc_param_t ckey; /* completion key */
3195 apc_param_t cvalue; /* completion value */
3196 unsigned int information; /* IO_STATUS_BLOCK Information */
3197 unsigned int status; /* completion result */
3201 /* get completion from completion port queue */
3202 @REQ(remove_completion)
3203 obj_handle_t handle; /* port handle */
3205 apc_param_t ckey; /* completion key */
3206 apc_param_t cvalue; /* completion value */
3207 unsigned int information; /* IO_STATUS_BLOCK Information */
3208 unsigned int status; /* completion result */
3212 /* get completion queue depth */
3213 @REQ(query_completion)
3214 obj_handle_t handle; /* port handle */
3216 unsigned int depth; /* completion queue depth */
3220 /* associate object with completion port */
3221 @REQ(set_completion_info)
3222 obj_handle_t handle; /* object handle */
3223 apc_param_t ckey; /* completion key */
3224 obj_handle_t chandle; /* port handle */
3228 /* check for associated completion and push msg */
3229 @REQ(add_fd_completion)
3230 obj_handle_t handle; /* async' object */
3231 apc_param_t cvalue; /* completion value */
3232 unsigned int status; /* completion status */
3233 unsigned int information; /* IO_STATUS_BLOCK Information */
3237 /* Retrieve layered info for a window */
3238 @REQ(get_window_layered_info)
3239 user_handle_t handle; /* handle to the window */
3241 unsigned int color_key; /* color key */
3242 unsigned int alpha; /* alpha (0..255) */
3243 unsigned int flags; /* LWA_* flags */
3247 /* Set layered info for a window */
3248 @REQ(set_window_layered_info)
3249 user_handle_t handle; /* handle to the window */
3250 unsigned int color_key; /* color key */
3251 unsigned int alpha; /* alpha (0..255) */
3252 unsigned int flags; /* LWA_* flags */
3256 /* Allocate an arbitrary user handle */
3257 @REQ(alloc_user_handle)
3259 user_handle_t handle; /* allocated handle */
3263 /* Free an arbitrary user handle */
3264 @REQ(free_user_handle)
3265 user_handle_t handle; /* handle to free*/
3269 /* Set/get the current cursor */
3271 unsigned int flags; /* flags for fields to set (see below) */
3272 user_handle_t handle; /* handle to the cursor */
3273 int show_count; /* show count increment/decrement */
3275 user_handle_t prev_handle; /* previous handle */
3276 int prev_count; /* previous show count */
3278 #define SET_CURSOR_HANDLE 0x01
3279 #define SET_CURSOR_COUNT 0x02