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 short 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 client_ptr_t mod_handle_t;
50 int req; /* request code */
51 data_size_t request_size; /* request variable part size */
52 data_size_t reply_size; /* reply variable part maximum size */
57 unsigned int error; /* error result */
58 data_size_t reply_size; /* reply variable part size */
61 /* placeholder structure for the maximum allowed request size */
62 /* this is used to construct the generic_request union */
63 struct request_max_size
65 int pad[16]; /* the max request size is 16 ints */
68 #define FIRST_USER_HANDLE 0x0020 /* first possible value for low word of user handle */
69 #define LAST_USER_HANDLE 0xffef /* last possible value for low word of user handle */
72 /* definitions of the event data depending on the event code */
73 struct debug_event_exception
75 EXCEPTION_RECORD record; /* exception record */
76 int first; /* first chance exception? */
78 struct debug_event_create_thread
80 obj_handle_t handle; /* handle to the new thread */
81 void *teb; /* thread teb (in debugged process address space) */
82 void *start; /* thread startup routine */
84 struct debug_event_create_process
86 obj_handle_t file; /* handle to the process exe file */
87 obj_handle_t process; /* handle to the new process */
88 obj_handle_t thread; /* handle to the new thread */
89 mod_handle_t base; /* base of executable image */
90 int dbg_offset; /* offset of debug info in file */
91 int dbg_size; /* size of debug info */
92 void *teb; /* thread teb (in debugged process address space) */
93 void *start; /* thread startup routine */
94 client_ptr_t name; /* image name (optional) */
95 int unicode; /* is it Unicode? */
97 struct debug_event_exit
99 int exit_code; /* thread or process exit code */
101 struct debug_event_load_dll
103 obj_handle_t handle; /* file handle for the dll */
104 mod_handle_t base; /* base address of the dll */
105 int dbg_offset; /* offset of debug info in file */
106 int dbg_size; /* size of debug info */
107 client_ptr_t name; /* image name (optional) */
108 int unicode; /* is it Unicode? */
110 struct debug_event_unload_dll
112 mod_handle_t base; /* base address of the dll */
114 struct debug_event_output_string
116 void *string; /* string to display (in debugged process address space) */
117 int unicode; /* is it Unicode? */
118 int length; /* string length */
120 struct debug_event_rip_info
125 union debug_event_data
127 struct debug_event_exception exception;
128 struct debug_event_create_thread create_thread;
129 struct debug_event_create_process create_process;
130 struct debug_event_exit exit;
131 struct debug_event_load_dll load_dll;
132 struct debug_event_unload_dll unload_dll;
133 struct debug_event_output_string output_string;
134 struct debug_event_rip_info rip_info;
137 /* debug event data */
140 int code; /* event code */
141 union debug_event_data info; /* event information */
144 /* structure used in sending an fd from client to server */
147 thread_id_t tid; /* thread id */
148 int fd; /* file descriptor on client-side */
151 /* structure sent by the server on the wait fifo */
154 void *cookie; /* magic cookie that was passed in select_request */
155 int signaled; /* wait result */
158 /* NT-style timeout, in 100ns units, negative means relative timeout */
159 typedef __int64 timeout_t;
160 #define TIMEOUT_INFINITE (((timeout_t)0x7fffffff) << 32 | 0xffffffff)
162 /* structure returned in the list of window properties */
165 atom_t atom; /* property atom */
166 short string; /* was atom a string originally? */
167 lparam_t data; /* data stored in property */
170 /* structure to specify window rectangles */
179 /* structure for parameters of async I/O calls */
182 obj_handle_t handle; /* object to perform I/O on */
183 obj_handle_t event; /* event to signal when done */
184 void *callback; /* client-side callback to call upon end of async */
185 void *iosb; /* I/O status block in client addr space */
186 void *arg; /* opaque user data to pass to callback */
187 void *apc; /* user apc to call */
188 apc_param_t cvalue; /* completion value to use for completion events */
191 /* structures for extra message data */
193 struct hardware_msg_data
195 lparam_t info; /* extra info */
196 int x; /* x position */
197 int y; /* y position */
198 unsigned int hw_id; /* unique id */
201 struct callback_msg_data
203 void *callback; /* callback function */
204 lparam_t data; /* user data for callback */
205 lparam_t result; /* message result */
208 struct winevent_msg_data
210 user_handle_t hook; /* hook handle */
211 thread_id_t tid; /* thread id */
212 void *hook_proc; /* hook proc address */
213 /* followed by module name if any */
218 unsigned char bytes[1]; /* raw data for sent messages */
219 struct callback_msg_data callback;
220 struct winevent_msg_data winevent;
223 /* structure for console char/attribute info */
232 unsigned int low_part;
236 #define MAX_ACL_LEN 65535
238 struct security_descriptor
240 unsigned int control; /* SE_ flags */
241 data_size_t owner_len;
242 data_size_t group_len;
243 data_size_t sacl_len;
244 data_size_t dacl_len;
245 /* VARARG(owner,SID); */
246 /* VARARG(group,SID); */
247 /* VARARG(sacl,ACL); */
248 /* VARARG(dacl,ACL); */
251 struct object_attributes
253 obj_handle_t rootdir; /* root directory */
254 data_size_t sd_len; /* length of security_descriptor data. may be 0 */
255 data_size_t name_len; /* length of the name string. may be 0 */
256 /* VARARG(sd,security_descriptor); */
257 /* VARARG(name,unicode_str); */
263 /* unsigned int attributes[count]; */
264 /* VARARG(sids,SID); */
290 enum apc_type type; /* APC_USER */
291 void (__stdcall *func)(unsigned long,unsigned long,unsigned long);
292 apc_param_t args[3]; /* arguments for user function */
296 enum apc_type type; /* APC_TIMER */
297 void (__stdcall *func)(void*, unsigned int, unsigned int);
298 timeout_t time; /* absolute time of expiration */
299 void *arg; /* user argument */
303 enum apc_type type; /* APC_ASYNC_IO */
304 unsigned int (*func)(void*, void*, unsigned int, unsigned int *);
305 void *user; /* user pointer */
306 void *sb; /* status block */
307 unsigned int status; /* I/O status */
311 enum apc_type type; /* APC_VIRTUAL_ALLOC */
312 void *addr; /* requested address */
313 mem_size_t size; /* allocation size */
314 unsigned int zero_bits; /* allocation alignment */
315 unsigned int op_type; /* type of operation */
316 unsigned int prot; /* memory protection flags */
320 enum apc_type type; /* APC_VIRTUAL_FREE */
321 void *addr; /* requested address */
322 mem_size_t size; /* allocation size */
323 unsigned int op_type; /* type of operation */
327 enum apc_type type; /* APC_VIRTUAL_QUERY */
328 const void *addr; /* requested address */
332 enum apc_type type; /* APC_VIRTUAL_PROTECT */
333 void *addr; /* requested address */
334 mem_size_t size; /* requested size */
335 unsigned int prot; /* new protection flags */
339 enum apc_type type; /* APC_VIRTUAL_FLUSH */
340 const void *addr; /* requested address */
341 mem_size_t size; /* requested size */
345 enum apc_type type; /* APC_VIRTUAL_LOCK */
346 void *addr; /* requested address */
347 mem_size_t size; /* requested size */
351 enum apc_type type; /* APC_VIRTUAL_UNLOCK */
352 void *addr; /* requested address */
353 mem_size_t size; /* requested size */
357 enum apc_type type; /* APC_MAP_VIEW */
358 obj_handle_t handle; /* mapping handle */
359 void *addr; /* requested address */
360 mem_size_t size; /* allocation size */
361 file_pos_t offset; /* file offset */
362 unsigned int zero_bits; /* allocation alignment */
363 unsigned int alloc_type;/* allocation type */
364 unsigned int prot; /* memory protection flags */
368 enum apc_type type; /* APC_UNMAP_VIEW */
369 void *addr; /* view address */
373 enum apc_type type; /* APC_CREATE_THREAD */
374 void (__stdcall *func)(void*); /* start function */
375 void *arg; /* argument for start function */
376 mem_size_t reserve; /* reserve size for thread stack */
377 mem_size_t commit; /* commit size for thread stack */
378 int suspend; /* suspended thread? */
387 enum apc_type type; /* APC_ASYNC_IO */
388 unsigned int status; /* new status of async operation */
389 unsigned int total; /* bytes transferred */
393 enum apc_type type; /* APC_VIRTUAL_ALLOC */
394 unsigned int status; /* status returned by call */
395 void *addr; /* resulting address */
396 mem_size_t size; /* resulting size */
400 enum apc_type type; /* APC_VIRTUAL_FREE */
401 unsigned int status; /* status returned by call */
402 void *addr; /* resulting address */
403 mem_size_t size; /* resulting size */
407 enum apc_type type; /* APC_VIRTUAL_QUERY */
408 unsigned int status; /* status returned by call */
409 void *base; /* resulting base address */
410 void *alloc_base;/* resulting allocation base */
411 mem_size_t size; /* resulting region size */
412 unsigned int state; /* resulting region state */
413 unsigned int prot; /* resulting region protection */
414 unsigned int alloc_prot;/* resulting allocation protection */
415 unsigned int alloc_type;/* resulting region allocation type */
419 enum apc_type type; /* APC_VIRTUAL_PROTECT */
420 unsigned int status; /* status returned by call */
421 void *addr; /* resulting address */
422 mem_size_t size; /* resulting size */
423 unsigned int prot; /* old protection flags */
427 enum apc_type type; /* APC_VIRTUAL_FLUSH */
428 unsigned int status; /* status returned by call */
429 const void *addr; /* resulting address */
430 mem_size_t size; /* resulting size */
434 enum apc_type type; /* APC_VIRTUAL_LOCK */
435 unsigned int status; /* status returned by call */
436 void *addr; /* resulting address */
437 mem_size_t size; /* resulting size */
441 enum apc_type type; /* APC_VIRTUAL_UNLOCK */
442 unsigned int status; /* status returned by call */
443 void *addr; /* resulting address */
444 mem_size_t size; /* resulting size */
448 enum apc_type type; /* APC_MAP_VIEW */
449 unsigned int status; /* status returned by call */
450 void *addr; /* resulting address */
451 mem_size_t size; /* resulting size */
455 enum apc_type type; /* APC_MAP_VIEW */
456 unsigned int status; /* status returned by call */
460 enum apc_type type; /* APC_CREATE_THREAD */
461 unsigned int status; /* status returned by call */
462 thread_id_t tid; /* thread id */
463 obj_handle_t handle; /* handle to new thread */
467 /****************************************************************/
468 /* Request declarations */
470 /* Create a new process from the context of the parent */
472 int inherit_all; /* inherit all handles from parent */
473 unsigned int create_flags; /* creation flags */
474 int socket_fd; /* file descriptor for process socket */
475 obj_handle_t exe_file; /* file handle for main exe */
476 obj_handle_t hstdin; /* handle for stdin */
477 obj_handle_t hstdout; /* handle for stdout */
478 obj_handle_t hstderr; /* handle for stderr */
479 unsigned int process_access; /* access rights for process object */
480 unsigned int process_attr; /* attributes for process object */
481 unsigned int thread_access; /* access rights for thread object */
482 unsigned int thread_attr; /* attributes for thread object */
483 VARARG(info,startup_info); /* startup information */
484 VARARG(env,unicode_str); /* environment for new process */
486 obj_handle_t info; /* new process info handle */
487 process_id_t pid; /* process id */
488 obj_handle_t phandle; /* process handle (in the current process) */
489 thread_id_t tid; /* thread id */
490 obj_handle_t thandle; /* thread handle (in the current process) */
494 /* Retrieve information about a newly started process */
495 @REQ(get_new_process_info)
496 obj_handle_t info; /* info handle returned from new_process_request */
498 int success; /* did the process start successfully? */
499 int exit_code; /* process exit code if failed */
503 /* Create a new thread from the context of the parent */
505 unsigned int access; /* wanted access rights */
506 unsigned int attributes; /* object attributes */
507 int suspend; /* new thread should be suspended on creation */
508 int request_fd; /* fd for request pipe */
510 thread_id_t tid; /* thread id */
511 obj_handle_t handle; /* thread handle (in the current process) */
515 /* Retrieve the new process startup info */
516 @REQ(get_startup_info)
518 obj_handle_t exe_file; /* file handle for main exe */
519 obj_handle_t hstdin; /* handle for stdin */
520 obj_handle_t hstdout; /* handle for stdout */
521 obj_handle_t hstderr; /* handle for stderr */
522 VARARG(info,startup_info); /* startup information */
523 VARARG(env,unicode_str); /* environment */
527 /* Signal the end of the process initialization */
528 @REQ(init_process_done)
529 int gui; /* is it a GUI process? */
530 mod_handle_t module; /* main module base address */
531 void* entry; /* process entry point */
535 /* Initialize a thread; called from the child after fork()/clone() */
537 int unix_pid; /* Unix pid of new thread */
538 int unix_tid; /* Unix tid of new thread */
539 int debug_level; /* new debug level */
540 void* teb; /* TEB of new thread (in thread address space) */
541 void* peb; /* address of PEB (in thread address space) */
542 void* entry; /* thread entry point (in thread address space) */
543 void* ldt_copy; /* address of LDT copy (in thread address space) */
544 int reply_fd; /* fd for reply pipe */
545 int wait_fd; /* fd for blocking calls pipe */
547 process_id_t pid; /* process id of the new thread's process */
548 thread_id_t tid; /* thread id of the new thread */
549 data_size_t info_size; /* total size of startup info */
550 timeout_t server_start; /* server start time */
551 int version; /* protocol version */
555 /* Terminate a process */
556 @REQ(terminate_process)
557 obj_handle_t handle; /* process handle to terminate */
558 int exit_code; /* process exit code */
560 int self; /* suicide? */
564 /* Terminate a thread */
565 @REQ(terminate_thread)
566 obj_handle_t handle; /* thread handle to terminate */
567 int exit_code; /* thread exit code */
569 int self; /* suicide? */
570 int last; /* last thread in this process? */
574 /* Retrieve information about a process */
575 @REQ(get_process_info)
576 obj_handle_t handle; /* process handle */
578 process_id_t pid; /* server process id */
579 process_id_t ppid; /* server process id of parent */
580 int exit_code; /* process exit code */
581 int priority; /* priority class */
582 unsigned int affinity; /* process affinity mask */
583 void* peb; /* PEB address in process address space */
584 timeout_t start_time; /* process start time */
585 timeout_t end_time; /* process end time */
589 /* Set a process informations */
590 @REQ(set_process_info)
591 obj_handle_t handle; /* process handle */
592 int mask; /* setting mask (see below) */
593 int priority; /* priority class */
594 unsigned int affinity; /* affinity mask */
596 #define SET_PROCESS_INFO_PRIORITY 0x01
597 #define SET_PROCESS_INFO_AFFINITY 0x02
600 /* Retrieve information about a thread */
601 @REQ(get_thread_info)
602 obj_handle_t handle; /* thread handle */
603 thread_id_t tid_in; /* thread id (optional) */
605 process_id_t pid; /* server process id */
606 thread_id_t tid; /* server thread id */
607 void* teb; /* thread teb pointer */
608 int exit_code; /* thread exit code */
609 int priority; /* thread priority level */
610 unsigned int affinity; /* thread affinity mask */
611 timeout_t creation_time; /* thread creation time */
612 timeout_t exit_time; /* thread exit time */
613 int last; /* last thread in process */
617 /* Set a thread informations */
618 @REQ(set_thread_info)
619 obj_handle_t handle; /* thread handle */
620 int mask; /* setting mask (see below) */
621 int priority; /* priority class */
622 unsigned int affinity; /* affinity mask */
623 obj_handle_t token; /* impersonation token */
625 #define SET_THREAD_INFO_PRIORITY 0x01
626 #define SET_THREAD_INFO_AFFINITY 0x02
627 #define SET_THREAD_INFO_TOKEN 0x04
630 /* Retrieve information about a module */
632 obj_handle_t handle; /* process handle */
633 mod_handle_t base_address; /* base address of module */
636 data_size_t size; /* module size */
637 data_size_t filename_len; /* buffer len in bytes required to store filename */
638 VARARG(filename,unicode_str); /* file name of module */
642 /* Suspend a thread */
644 obj_handle_t handle; /* thread handle */
646 int count; /* new suspend count */
650 /* Resume a thread */
652 obj_handle_t handle; /* thread handle */
654 int count; /* new suspend count */
658 /* Notify the server that a dll has been loaded */
660 obj_handle_t handle; /* file handle */
661 mod_handle_t base; /* base address */
662 client_ptr_t name; /* ptr to ptr to name (in process addr space) */
663 data_size_t size; /* dll size */
664 int dbg_offset; /* debug info offset */
665 int dbg_size; /* debug info size */
666 VARARG(filename,unicode_str); /* file name of dll */
670 /* Notify the server that a dll is being unloaded */
672 mod_handle_t base; /* base address */
676 /* Queue an APC for a thread or process */
678 obj_handle_t handle; /* thread or process handle */
679 apc_call_t call; /* call arguments */
681 obj_handle_t handle; /* APC handle */
682 int self; /* run APC in caller itself? */
686 /* Get the result of an APC call */
688 obj_handle_t handle; /* handle to the APC */
690 apc_result_t result; /* result of the APC */
694 /* Close a handle for the current process */
696 obj_handle_t handle; /* handle to close */
700 /* Set a handle information */
701 @REQ(set_handle_info)
702 obj_handle_t handle; /* handle we are interested in */
703 int flags; /* new handle flags */
704 int mask; /* mask for flags to set */
706 int old_flags; /* old flag value */
710 /* Duplicate a handle */
712 obj_handle_t src_process; /* src process handle */
713 obj_handle_t src_handle; /* src handle to duplicate */
714 obj_handle_t dst_process; /* dst process handle */
715 unsigned int access; /* wanted access rights */
716 unsigned int attributes; /* object attributes */
717 unsigned int options; /* duplicate options (see below) */
719 obj_handle_t handle; /* duplicated handle in dst process */
720 int self; /* is the source the current process? */
721 int closed; /* whether the source handle has been closed */
723 #define DUP_HANDLE_CLOSE_SOURCE DUPLICATE_CLOSE_SOURCE
724 #define DUP_HANDLE_SAME_ACCESS DUPLICATE_SAME_ACCESS
725 #define DUP_HANDLE_MAKE_GLOBAL 0x80000000 /* Not a Windows flag */
728 /* Open a handle to a process */
730 process_id_t pid; /* process id to open */
731 unsigned int access; /* wanted access rights */
732 unsigned int attributes; /* object attributes */
734 obj_handle_t handle; /* handle to the process */
738 /* Open a handle to a thread */
740 thread_id_t tid; /* thread id to open */
741 unsigned int access; /* wanted access rights */
742 unsigned int attributes; /* object attributes */
744 obj_handle_t handle; /* handle to the thread */
748 /* Wait for handles */
750 int flags; /* wait flags (see below) */
751 void* cookie; /* magic cookie to return to client */
752 obj_handle_t signal; /* object to signal (0 if none) */
753 obj_handle_t prev_apc; /* handle to previous APC */
754 timeout_t timeout; /* timeout */
755 VARARG(result,apc_result); /* result of previous APC */
756 VARARG(handles,handles); /* handles to select on */
758 obj_handle_t apc_handle; /* handle to next APC */
759 timeout_t timeout; /* timeout converted to absolute */
760 apc_call_t call; /* APC call arguments */
763 #define SELECT_ALERTABLE 2
764 #define SELECT_INTERRUPTIBLE 4
767 /* Create an event */
769 unsigned int access; /* wanted access rights */
770 unsigned int attributes; /* object attributes */
771 int manual_reset; /* manual reset event */
772 int initial_state; /* initial state of the event */
773 VARARG(objattr,object_attributes); /* object attributes */
775 obj_handle_t handle; /* handle to the event */
778 /* Event operation */
780 obj_handle_t handle; /* handle to event */
781 int op; /* event operation (see below) */
783 enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT };
788 unsigned int access; /* wanted access rights */
789 unsigned int attributes; /* object attributes */
790 obj_handle_t rootdir; /* root directory */
791 VARARG(name,unicode_str); /* object name */
793 obj_handle_t handle; /* handle to the event */
799 unsigned int access; /* wanted access rights */
800 unsigned int attributes; /* object attributes */
801 int owned; /* initially owned? */
802 VARARG(objattr,object_attributes); /* object attributes */
804 obj_handle_t handle; /* handle to the mutex */
808 /* Release a mutex */
810 obj_handle_t handle; /* handle to the mutex */
812 unsigned int prev_count; /* value of internal counter, before release */
818 unsigned int access; /* wanted access rights */
819 unsigned int attributes; /* object attributes */
820 obj_handle_t rootdir; /* root directory */
821 VARARG(name,unicode_str); /* object name */
823 obj_handle_t handle; /* handle to the mutex */
827 /* Create a semaphore */
828 @REQ(create_semaphore)
829 unsigned int access; /* wanted access rights */
830 unsigned int attributes; /* object attributes */
831 unsigned int initial; /* initial count */
832 unsigned int max; /* maximum count */
833 VARARG(objattr,object_attributes); /* object attributes */
835 obj_handle_t handle; /* handle to the semaphore */
839 /* Release a semaphore */
840 @REQ(release_semaphore)
841 obj_handle_t handle; /* handle to the semaphore */
842 unsigned int count; /* count to add to semaphore */
844 unsigned int prev_count; /* previous semaphore count */
848 /* Open a semaphore */
850 unsigned int access; /* wanted access rights */
851 unsigned int attributes; /* object attributes */
852 obj_handle_t rootdir; /* root directory */
853 VARARG(name,unicode_str); /* object name */
855 obj_handle_t handle; /* handle to the semaphore */
861 unsigned int access; /* wanted access rights */
862 unsigned int attributes; /* object attributes */
863 unsigned int sharing; /* sharing flags */
864 int create; /* file create action */
865 unsigned int options; /* file options */
866 unsigned int attrs; /* file attributes for creation */
867 VARARG(objattr,object_attributes); /* object attributes */
868 VARARG(filename,string); /* file name */
870 obj_handle_t handle; /* handle to the file */
874 /* Open a file object */
875 @REQ(open_file_object)
876 unsigned int access; /* wanted access rights */
877 unsigned int attributes; /* open attributes */
878 obj_handle_t rootdir; /* root directory */
879 unsigned int sharing; /* sharing flags */
880 unsigned int options; /* file options */
881 VARARG(filename,unicode_str); /* file name */
883 obj_handle_t handle; /* handle to the file */
887 /* Allocate a file handle for a Unix fd */
888 @REQ(alloc_file_handle)
889 unsigned int access; /* wanted access rights */
890 unsigned int attributes; /* object attributes */
891 int fd; /* file descriptor on the client side */
893 obj_handle_t handle; /* handle to the file */
897 /* Get a Unix fd to access a file */
899 obj_handle_t handle; /* handle to the file */
901 int type; /* file type (see below) */
902 int removable; /* is file removable? */
903 unsigned int access; /* file access rights */
904 unsigned int options; /* file open options */
908 FD_TYPE_INVALID, /* invalid file (no associated fd) */
909 FD_TYPE_FILE, /* regular file */
910 FD_TYPE_DIR, /* directory */
911 FD_TYPE_SOCKET, /* socket */
912 FD_TYPE_SERIAL, /* serial port */
913 FD_TYPE_PIPE, /* named pipe */
914 FD_TYPE_MAILSLOT, /* mailslot */
915 FD_TYPE_CHAR, /* unspecified char device */
916 FD_TYPE_DEVICE, /* Windows device file */
921 /* Flush a file buffers */
923 obj_handle_t handle; /* handle to the file */
925 obj_handle_t event; /* event set when finished */
929 /* Lock a region of a file */
931 obj_handle_t handle; /* handle to the file */
932 file_pos_t offset; /* offset of start of lock */
933 file_pos_t count; /* count of bytes to lock */
934 int shared; /* shared or exclusive lock? */
935 int wait; /* do we want to wait? */
937 obj_handle_t handle; /* handle to wait on */
938 int overlapped; /* is it an overlapped I/O handle? */
942 /* Unlock a region of a file */
944 obj_handle_t handle; /* handle to the file */
945 file_pos_t offset; /* offset of start of unlock */
946 file_pos_t count; /* count of bytes to unlock */
950 /* Create a socket */
952 unsigned int access; /* wanted access rights */
953 unsigned int attributes; /* object attributes */
954 int family; /* family, see socket manpage */
955 int type; /* type, see socket manpage */
956 int protocol; /* protocol, see socket manpage */
957 unsigned int flags; /* socket flags */
959 obj_handle_t handle; /* handle to the new socket */
963 /* Accept a socket */
965 obj_handle_t lhandle; /* handle to the listening socket */
966 unsigned int access; /* wanted access rights */
967 unsigned int attributes; /* object attributes */
969 obj_handle_t handle; /* handle to the new socket */
973 /* Set socket event parameters */
974 @REQ(set_socket_event)
975 obj_handle_t handle; /* handle to the socket */
976 unsigned int mask; /* event mask */
977 obj_handle_t event; /* event object */
978 user_handle_t window; /* window to send the message to */
979 unsigned int msg; /* message to send */
983 /* Get socket event parameters */
984 @REQ(get_socket_event)
985 obj_handle_t handle; /* handle to the socket */
986 int service; /* clear pending? */
987 obj_handle_t c_event; /* event to clear */
989 unsigned int mask; /* event mask */
990 unsigned int pmask; /* pending events */
991 unsigned int state; /* status bits */
992 VARARG(errors,ints); /* event errors */
996 /* Reenable pending socket events */
997 @REQ(enable_socket_event)
998 obj_handle_t handle; /* handle to the socket */
999 unsigned int mask; /* events to re-enable */
1000 unsigned int sstate; /* status bits to set */
1001 unsigned int cstate; /* status bits to clear */
1004 @REQ(set_socket_deferred)
1005 obj_handle_t handle; /* handle to the socket */
1006 obj_handle_t deferred; /* handle to the socket for which accept() is deferred */
1009 /* Allocate a console (only used by a console renderer) */
1011 unsigned int access; /* wanted access rights */
1012 unsigned int attributes; /* object attributes */
1013 process_id_t pid; /* pid of process which shall be attached to the console */
1015 obj_handle_t handle_in; /* handle to console input */
1016 obj_handle_t event; /* handle to renderer events change notification */
1020 /* Free the console of the current process */
1025 #define CONSOLE_RENDERER_NONE_EVENT 0x00
1026 #define CONSOLE_RENDERER_TITLE_EVENT 0x01
1027 #define CONSOLE_RENDERER_ACTIVE_SB_EVENT 0x02
1028 #define CONSOLE_RENDERER_SB_RESIZE_EVENT 0x03
1029 #define CONSOLE_RENDERER_UPDATE_EVENT 0x04
1030 #define CONSOLE_RENDERER_CURSOR_POS_EVENT 0x05
1031 #define CONSOLE_RENDERER_CURSOR_GEOM_EVENT 0x06
1032 #define CONSOLE_RENDERER_DISPLAY_EVENT 0x07
1033 #define CONSOLE_RENDERER_EXIT_EVENT 0x08
1034 struct console_renderer_event
1069 /* retrieve console events for the renderer */
1070 @REQ(get_console_renderer_events)
1071 obj_handle_t handle; /* handle to console input events */
1073 VARARG(data,bytes); /* the various console_renderer_events */
1077 /* Open a handle to the process console */
1079 obj_handle_t from; /* 0 (resp 1) input (resp output) of current process console */
1080 /* otherwise console_in handle to get active screen buffer? */
1081 unsigned int access; /* wanted access rights */
1082 unsigned int attributes; /* object attributes */
1083 int share; /* share mask (only for output handles) */
1085 obj_handle_t handle; /* handle to the console */
1089 /* Get the input queue wait event */
1090 @REQ(get_console_wait_event)
1092 obj_handle_t handle;
1095 /* Get a console mode (input or output) */
1096 @REQ(get_console_mode)
1097 obj_handle_t handle; /* handle to the console */
1099 int mode; /* console mode */
1103 /* Set a console mode (input or output) */
1104 @REQ(set_console_mode)
1105 obj_handle_t handle; /* handle to the console */
1106 int mode; /* console mode */
1110 /* Set info about a console (input only) */
1111 @REQ(set_console_input_info)
1112 obj_handle_t handle; /* handle to console input, or 0 for process' console */
1113 int mask; /* setting mask (see below) */
1114 obj_handle_t active_sb; /* active screen buffer */
1115 int history_mode; /* whether we duplicate lines in history */
1116 int history_size; /* number of lines in history */
1117 int edition_mode; /* index to the edition mode flavors */
1118 int input_cp; /* console input codepage */
1119 int output_cp; /* console output codepage */
1120 user_handle_t win; /* console window if backend supports it */
1121 VARARG(title,unicode_str); /* console title */
1123 #define SET_CONSOLE_INPUT_INFO_ACTIVE_SB 0x01
1124 #define SET_CONSOLE_INPUT_INFO_TITLE 0x02
1125 #define SET_CONSOLE_INPUT_INFO_HISTORY_MODE 0x04
1126 #define SET_CONSOLE_INPUT_INFO_HISTORY_SIZE 0x08
1127 #define SET_CONSOLE_INPUT_INFO_EDITION_MODE 0x10
1128 #define SET_CONSOLE_INPUT_INFO_INPUT_CODEPAGE 0x20
1129 #define SET_CONSOLE_INPUT_INFO_OUTPUT_CODEPAGE 0x40
1130 #define SET_CONSOLE_INPUT_INFO_WIN 0x80
1133 /* Get info about a console (input only) */
1134 @REQ(get_console_input_info)
1135 obj_handle_t handle; /* handle to console input, or 0 for process' console */
1137 int history_mode; /* whether we duplicate lines in history */
1138 int history_size; /* number of lines in history */
1139 int history_index; /* number of used lines in history */
1140 int edition_mode; /* index to the edition mode flavors */
1141 int input_cp; /* console input codepage */
1142 int output_cp; /* console output codepage */
1143 user_handle_t win; /* console window if backend supports it */
1144 VARARG(title,unicode_str); /* console title */
1148 /* appends a string to console's history */
1149 @REQ(append_console_input_history)
1150 obj_handle_t handle; /* handle to console input, or 0 for process' console */
1151 VARARG(line,unicode_str); /* line to add */
1155 /* appends a string to console's history */
1156 @REQ(get_console_input_history)
1157 obj_handle_t handle; /* handle to console input, or 0 for process' console */
1158 int index; /* index to get line from */
1160 int total; /* total length of line in Unicode chars */
1161 VARARG(line,unicode_str); /* line to add */
1165 /* creates a new screen buffer on process' console */
1166 @REQ(create_console_output)
1167 obj_handle_t handle_in; /* handle to console input, or 0 for process' console */
1168 unsigned int access; /* wanted access rights */
1169 unsigned int attributes; /* object attributes */
1170 unsigned int share; /* sharing credentials */
1172 obj_handle_t handle_out; /* handle to the screen buffer */
1176 /* Set info about a console (output only) */
1177 @REQ(set_console_output_info)
1178 obj_handle_t handle; /* handle to the console */
1179 int mask; /* setting mask (see below) */
1180 short int cursor_size; /* size of cursor (percentage filled) */
1181 short int cursor_visible;/* cursor visibility flag */
1182 short int cursor_x; /* position of cursor (x, y) */
1184 short int width; /* width of the screen buffer */
1185 short int height; /* height of the screen buffer */
1186 short int attr; /* default attribute */
1187 short int win_left; /* window actually displayed by renderer */
1188 short int win_top; /* the rect area is expressed withing the */
1189 short int win_right; /* boundaries of the screen buffer */
1190 short int win_bottom;
1191 short int max_width; /* maximum size (width x height) for the window */
1192 short int max_height;
1194 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_GEOM 0x01
1195 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_POS 0x02
1196 #define SET_CONSOLE_OUTPUT_INFO_SIZE 0x04
1197 #define SET_CONSOLE_OUTPUT_INFO_ATTR 0x08
1198 #define SET_CONSOLE_OUTPUT_INFO_DISPLAY_WINDOW 0x10
1199 #define SET_CONSOLE_OUTPUT_INFO_MAX_SIZE 0x20
1202 /* Get info about a console (output only) */
1203 @REQ(get_console_output_info)
1204 obj_handle_t handle; /* handle to the console */
1206 short int cursor_size; /* size of cursor (percentage filled) */
1207 short int cursor_visible;/* cursor visibility flag */
1208 short int cursor_x; /* position of cursor (x, y) */
1210 short int width; /* width of the screen buffer */
1211 short int height; /* height of the screen buffer */
1212 short int attr; /* default attribute */
1213 short int win_left; /* window actually displayed by renderer */
1214 short int win_top; /* the rect area is expressed withing the */
1215 short int win_right; /* boundaries of the screen buffer */
1216 short int win_bottom;
1217 short int max_width; /* maximum size (width x height) for the window */
1218 short int max_height;
1221 /* Add input records to a console input queue */
1222 @REQ(write_console_input)
1223 obj_handle_t handle; /* handle to the console input */
1224 VARARG(rec,input_records); /* input records */
1226 int written; /* number of records written */
1230 /* Fetch input records from a console input queue */
1231 @REQ(read_console_input)
1232 obj_handle_t handle; /* handle to the console input */
1233 int flush; /* flush the retrieved records from the queue? */
1235 int read; /* number of records read */
1236 VARARG(rec,input_records); /* input records */
1240 /* write data (chars and/or attributes) in a screen buffer */
1241 @REQ(write_console_output)
1242 obj_handle_t handle; /* handle to the console output */
1243 int x; /* position where to start writing */
1245 int mode; /* char info (see below) */
1246 int wrap; /* wrap around at end of line? */
1247 VARARG(data,bytes); /* info to write */
1249 int written; /* number of char infos actually written */
1250 int width; /* width of screen buffer */
1251 int height; /* height of screen buffer */
1255 CHAR_INFO_MODE_TEXT, /* characters only */
1256 CHAR_INFO_MODE_ATTR, /* attributes only */
1257 CHAR_INFO_MODE_TEXTATTR, /* both characters and attributes */
1258 CHAR_INFO_MODE_TEXTSTDATTR /* characters but use standard attributes */
1262 /* fill a screen buffer with constant data (chars and/or attributes) */
1263 @REQ(fill_console_output)
1264 obj_handle_t handle; /* handle to the console output */
1265 int x; /* position where to start writing */
1267 int mode; /* char info mode */
1268 int count; /* number to write */
1269 int wrap; /* wrap around at end of line? */
1270 char_info_t data; /* data to write */
1272 int written; /* number of char infos actually written */
1276 /* read data (chars and/or attributes) from a screen buffer */
1277 @REQ(read_console_output)
1278 obj_handle_t handle; /* handle to the console output */
1279 int x; /* position (x,y) where to start reading */
1281 int mode; /* char info mode */
1282 int wrap; /* wrap around at end of line? */
1284 int width; /* width of screen buffer */
1285 int height; /* height of screen buffer */
1290 /* move a rect (of data) in screen buffer content */
1291 @REQ(move_console_output)
1292 obj_handle_t handle; /* handle to the console output */
1293 short int x_src; /* position (x, y) of rect to start moving from */
1295 short int x_dst; /* position (x, y) of rect to move to */
1297 short int w; /* size of the rect (width, height) to move */
1302 /* Sends a signal to a process group */
1303 @REQ(send_console_signal)
1304 int signal; /* the signal to send */
1305 process_id_t group_id; /* the group to send the signal to */
1309 /* enable directory change notifications */
1310 @REQ(read_directory_changes)
1311 unsigned int filter; /* notification filter */
1312 int subtree; /* watch the subtree? */
1313 int want_data; /* flag indicating whether change data should be collected */
1314 async_data_t async; /* async I/O parameters */
1319 obj_handle_t handle;
1321 int action; /* type of change */
1322 VARARG(name,string); /* name of directory entry that changed */
1326 /* Create a file mapping */
1327 @REQ(create_mapping)
1328 unsigned int access; /* wanted access rights */
1329 unsigned int attributes; /* object attributes */
1330 mem_size_t size; /* mapping size */
1331 unsigned int protect; /* protection flags (see below) */
1332 obj_handle_t file_handle; /* file handle */
1333 VARARG(objattr,object_attributes); /* object attributes */
1335 obj_handle_t handle; /* handle to the mapping */
1337 /* per-page protection flags */
1338 #define VPROT_READ 0x01
1339 #define VPROT_WRITE 0x02
1340 #define VPROT_EXEC 0x04
1341 #define VPROT_WRITECOPY 0x08
1342 #define VPROT_GUARD 0x10
1343 #define VPROT_NOCACHE 0x20
1344 #define VPROT_COMMITTED 0x40
1345 #define VPROT_WRITEWATCH 0x80
1346 /* per-mapping protection flags */
1347 #define VPROT_IMAGE 0x0100 /* mapping for an exe image */
1348 #define VPROT_SYSTEM 0x0200 /* system view (underlying mmap not under our control) */
1349 #define VPROT_VALLOC 0x0400 /* allocated by VirtualAlloc */
1350 #define VPROT_NOEXEC 0x0800 /* don't force exec permission */
1353 /* Open a mapping */
1355 unsigned int access; /* wanted access rights */
1356 unsigned int attributes; /* object attributes */
1357 obj_handle_t rootdir; /* root directory */
1358 VARARG(name,unicode_str); /* object name */
1360 obj_handle_t handle; /* handle to the mapping */
1364 /* Get information about a file mapping */
1365 @REQ(get_mapping_info)
1366 obj_handle_t handle; /* handle to the mapping */
1367 unsigned int access; /* wanted access rights */
1369 mem_size_t size; /* mapping size */
1370 int protect; /* protection flags */
1371 int header_size; /* header size (for VPROT_IMAGE mapping) */
1372 void* base; /* default base addr (for VPROT_IMAGE mapping) */
1373 obj_handle_t mapping; /* duplicate mapping handle unless removable */
1374 obj_handle_t shared_file; /* shared mapping file handle */
1378 /* Get a range of committed pages in a file mapping */
1379 @REQ(get_mapping_committed_range)
1380 obj_handle_t handle; /* handle to the mapping */
1381 file_pos_t offset; /* starting offset (page-aligned, in bytes) */
1383 mem_size_t size; /* size of range starting at offset (page-aligned, in bytes) */
1384 int committed; /* whether it is a committed range */
1388 /* Add a range to the committed pages in a file mapping */
1389 @REQ(add_mapping_committed_range)
1390 obj_handle_t handle; /* handle to the mapping */
1391 file_pos_t offset; /* starting offset (page-aligned, in bytes) */
1392 mem_size_t size; /* size to set (page-aligned, in bytes) or 0 if only retrieving */
1396 #define SNAP_PROCESS 0x00000001
1397 #define SNAP_THREAD 0x00000002
1398 /* Create a snapshot */
1399 @REQ(create_snapshot)
1400 unsigned int attributes; /* object attributes */
1401 unsigned int flags; /* snapshot flags (SNAP_*) */
1403 obj_handle_t handle; /* handle to the snapshot */
1407 /* Get the next process from a snapshot */
1409 obj_handle_t handle; /* handle to the snapshot */
1410 int reset; /* reset snapshot position? */
1412 int count; /* process usage count */
1413 process_id_t pid; /* process id */
1414 process_id_t ppid; /* parent process id */
1415 int threads; /* number of threads */
1416 int priority; /* process priority */
1417 int handles; /* number of handles */
1418 VARARG(filename,unicode_str); /* file name of main exe */
1422 /* Get the next thread from a snapshot */
1424 obj_handle_t handle; /* handle to the snapshot */
1425 int reset; /* reset snapshot position? */
1427 int count; /* thread usage count */
1428 process_id_t pid; /* process id */
1429 thread_id_t tid; /* thread id */
1430 int base_pri; /* base priority */
1431 int delta_pri; /* delta priority */
1435 /* Wait for a debug event */
1436 @REQ(wait_debug_event)
1437 int get_handle; /* should we alloc a handle for waiting? */
1439 process_id_t pid; /* process id */
1440 thread_id_t tid; /* thread id */
1441 obj_handle_t wait; /* wait handle if no event ready */
1442 VARARG(event,debug_event); /* debug event data */
1446 /* Queue an exception event */
1447 @REQ(queue_exception_event)
1448 int first; /* first chance exception? */
1449 VARARG(record,exc_event); /* thread context followed by exception record */
1451 obj_handle_t handle; /* handle to the queued event */
1455 /* Retrieve the status of an exception event */
1456 @REQ(get_exception_status)
1457 obj_handle_t handle; /* handle to the queued event */
1459 VARARG(context,context); /* modified thread context */
1463 /* Send an output string to the debugger */
1464 @REQ(output_debug_string)
1465 void* string; /* string to display (in debugged process address space) */
1466 int unicode; /* is it Unicode? */
1467 int length; /* string length */
1471 /* Continue a debug event */
1472 @REQ(continue_debug_event)
1473 process_id_t pid; /* process id to continue */
1474 thread_id_t tid; /* thread id to continue */
1475 int status; /* continuation status */
1479 /* Start/stop debugging an existing process */
1481 process_id_t pid; /* id of the process to debug */
1482 int attach; /* 1=attaching / 0=detaching from the process */
1486 /* Simulate a breakpoint in a process */
1488 obj_handle_t handle; /* process handle */
1490 int self; /* was it the caller itself? */
1494 /* Set debugger kill on exit flag */
1495 @REQ(set_debugger_kill_on_exit)
1496 int kill_on_exit; /* 0=detach/1=kill debuggee when debugger dies */
1500 /* Read data from a process address space */
1501 @REQ(read_process_memory)
1502 obj_handle_t handle; /* process handle */
1503 void* addr; /* addr to read from */
1505 VARARG(data,bytes); /* result data */
1509 /* Write data to a process address space */
1510 @REQ(write_process_memory)
1511 obj_handle_t handle; /* process handle */
1512 void* addr; /* addr to write to */
1513 VARARG(data,bytes); /* data to write */
1517 /* Create a registry key */
1519 obj_handle_t parent; /* handle to the parent key */
1520 unsigned int access; /* desired access rights */
1521 unsigned int attributes; /* object attributes */
1522 unsigned int options; /* creation options */
1523 data_size_t namelen; /* length of key name in bytes */
1524 VARARG(name,unicode_str,namelen); /* key name */
1525 VARARG(class,unicode_str); /* class name */
1527 obj_handle_t hkey; /* handle to the created key */
1528 int created; /* has it been newly created? */
1531 /* Open a registry key */
1533 obj_handle_t parent; /* handle to the parent key */
1534 unsigned int access; /* desired access rights */
1535 unsigned int attributes; /* object attributes */
1536 VARARG(name,unicode_str); /* key name */
1538 obj_handle_t hkey; /* handle to the open key */
1542 /* Delete a registry key */
1544 obj_handle_t hkey; /* handle to the key */
1548 /* Flush a registry key */
1550 obj_handle_t hkey; /* handle to the key */
1554 /* Enumerate registry subkeys */
1556 obj_handle_t hkey; /* handle to registry key */
1557 int index; /* index of subkey (or -1 for current key) */
1558 int info_class; /* requested information class */
1560 int subkeys; /* number of subkeys */
1561 int max_subkey; /* longest subkey name */
1562 int max_class; /* longest class name */
1563 int values; /* number of values */
1564 int max_value; /* longest value name */
1565 int max_data; /* longest value data */
1566 timeout_t modif; /* last modification time */
1567 data_size_t total; /* total length needed for full name and class */
1568 data_size_t namelen; /* length of key name in bytes */
1569 VARARG(name,unicode_str,namelen); /* key name */
1570 VARARG(class,unicode_str); /* class name */
1574 /* Set a value of a registry key */
1576 obj_handle_t hkey; /* handle to registry key */
1577 int type; /* value type */
1578 data_size_t namelen; /* length of value name in bytes */
1579 VARARG(name,unicode_str,namelen); /* value name */
1580 VARARG(data,bytes); /* value data */
1584 /* Retrieve the value of a registry key */
1586 obj_handle_t hkey; /* handle to registry key */
1587 VARARG(name,unicode_str); /* value name */
1589 int type; /* value type */
1590 data_size_t total; /* total length needed for data */
1591 VARARG(data,bytes); /* value data */
1595 /* Enumerate a value of a registry key */
1596 @REQ(enum_key_value)
1597 obj_handle_t hkey; /* handle to registry key */
1598 int index; /* value index */
1599 int info_class; /* requested information class */
1601 int type; /* value type */
1602 data_size_t total; /* total length needed for full name and data */
1603 data_size_t namelen; /* length of value name in bytes */
1604 VARARG(name,unicode_str,namelen); /* value name */
1605 VARARG(data,bytes); /* value data */
1609 /* Delete a value of a registry key */
1610 @REQ(delete_key_value)
1611 obj_handle_t hkey; /* handle to registry key */
1612 VARARG(name,unicode_str); /* value name */
1616 /* Load a registry branch from a file */
1618 obj_handle_t hkey; /* root key to load to */
1619 obj_handle_t file; /* file to load from */
1620 VARARG(name,unicode_str); /* subkey name */
1624 /* UnLoad a registry branch from a file */
1625 @REQ(unload_registry)
1626 obj_handle_t hkey; /* root key to unload to */
1630 /* Save a registry branch to a file */
1632 obj_handle_t hkey; /* key to save */
1633 obj_handle_t file; /* file to save to */
1637 /* Add a registry key change notification */
1638 @REQ(set_registry_notification)
1639 obj_handle_t hkey; /* key to watch for changes */
1640 obj_handle_t event; /* event to set */
1641 int subtree; /* should we watch the whole subtree? */
1642 unsigned int filter; /* things to watch */
1646 /* Create a waitable timer */
1648 unsigned int access; /* wanted access rights */
1649 unsigned int attributes; /* object attributes */
1650 obj_handle_t rootdir; /* root directory */
1651 int manual; /* manual reset */
1652 VARARG(name,unicode_str); /* object name */
1654 obj_handle_t handle; /* handle to the timer */
1658 /* Open a waitable timer */
1660 unsigned int access; /* wanted access rights */
1661 unsigned int attributes; /* object attributes */
1662 obj_handle_t rootdir; /* root directory */
1663 VARARG(name,unicode_str); /* object name */
1665 obj_handle_t handle; /* handle to the timer */
1668 /* Set a waitable timer */
1670 obj_handle_t handle; /* handle to the timer */
1671 timeout_t expire; /* next expiration absolute time */
1672 int period; /* timer period in ms */
1673 void* callback; /* callback function */
1674 void* arg; /* callback argument */
1676 int signaled; /* was the timer signaled before this call ? */
1679 /* Cancel a waitable timer */
1681 obj_handle_t handle; /* handle to the timer */
1683 int signaled; /* was the timer signaled before this calltime ? */
1686 /* Get information on a waitable timer */
1687 @REQ(get_timer_info)
1688 obj_handle_t handle; /* handle to the timer */
1690 timeout_t when; /* absolute time when the timer next expires */
1691 int signaled; /* is the timer signaled? */
1695 /* Retrieve the current context of a thread */
1696 @REQ(get_thread_context)
1697 obj_handle_t handle; /* thread handle */
1698 unsigned int flags; /* context flags */
1699 int suspend; /* if getting context during suspend */
1701 int self; /* was it a handle to the current thread? */
1702 VARARG(context,context); /* thread context */
1706 /* Set the current context of a thread */
1707 @REQ(set_thread_context)
1708 obj_handle_t handle; /* thread handle */
1709 unsigned int flags; /* context flags */
1710 int suspend; /* if setting context during suspend */
1711 VARARG(context,context); /* thread context */
1713 int self; /* was it a handle to the current thread? */
1717 /* Fetch a selector entry for a thread */
1718 @REQ(get_selector_entry)
1719 obj_handle_t handle; /* thread handle */
1720 int entry; /* LDT entry */
1722 unsigned int base; /* selector base */
1723 unsigned int limit; /* selector limit */
1724 unsigned char flags; /* selector flags */
1730 obj_handle_t table; /* which table to add atom to */
1731 VARARG(name,unicode_str); /* atom name */
1733 atom_t atom; /* resulting atom */
1737 /* Delete an atom */
1739 obj_handle_t table; /* which table to delete atom from */
1740 atom_t atom; /* atom handle */
1746 obj_handle_t table; /* which table to find atom from */
1747 VARARG(name,unicode_str); /* atom name */
1749 atom_t atom; /* atom handle */
1753 /* Get information about an atom */
1754 @REQ(get_atom_information)
1755 obj_handle_t table; /* which table to find atom from */
1756 atom_t atom; /* atom handle */
1758 int count; /* atom lock count */
1759 int pinned; /* whether the atom has been pinned */
1760 data_size_t total; /* actual length of atom name */
1761 VARARG(name,unicode_str); /* atom name */
1765 /* Set information about an atom */
1766 @REQ(set_atom_information)
1767 obj_handle_t table; /* which table to find atom from */
1768 atom_t atom; /* atom handle */
1769 int pinned; /* whether to bump atom information */
1773 /* Empty an atom table */
1774 @REQ(empty_atom_table)
1775 obj_handle_t table; /* which table to find atom from */
1776 int if_pinned; /* whether to delete pinned atoms */
1780 /* Init an atom table */
1781 @REQ(init_atom_table)
1782 int entries; /* number of entries (only for local) */
1784 obj_handle_t table; /* handle to the atom table */
1788 /* Get the message queue of the current thread */
1791 obj_handle_t handle; /* handle to the queue */
1795 /* Set the file descriptor associated to the current thread queue */
1797 obj_handle_t handle; /* handle to the file descriptor */
1801 /* Set the current message queue wakeup mask */
1802 @REQ(set_queue_mask)
1803 unsigned int wake_mask; /* wakeup bits mask */
1804 unsigned int changed_mask; /* changed bits mask */
1805 int skip_wait; /* will we skip waiting if signaled? */
1807 unsigned int wake_bits; /* current wake bits */
1808 unsigned int changed_bits; /* current changed bits */
1812 /* Get the current message queue status */
1813 @REQ(get_queue_status)
1814 int clear; /* should we clear the change bits? */
1816 unsigned int wake_bits; /* wake bits */
1817 unsigned int changed_bits; /* changed bits since last time */
1821 /* Retrieve the process idle event */
1822 @REQ(get_process_idle_event)
1823 obj_handle_t handle; /* process handle */
1825 obj_handle_t event; /* handle to idle event */
1829 /* Send a message to a thread queue */
1831 thread_id_t id; /* thread id */
1832 int type; /* message type (see below) */
1833 int flags; /* message flags (see below) */
1834 user_handle_t win; /* window handle */
1835 unsigned int msg; /* message code */
1836 lparam_t wparam; /* parameters */
1837 lparam_t lparam; /* parameters */
1838 timeout_t timeout; /* timeout for reply */
1839 VARARG(data,message_data); /* message data for sent messages */
1842 @REQ(post_quit_message)
1843 int exit_code; /* exit code to return */
1848 MSG_ASCII, /* Ascii message (from SendMessageA) */
1849 MSG_UNICODE, /* Unicode message (from SendMessageW) */
1850 MSG_NOTIFY, /* notify message (from SendNotifyMessageW), always Unicode */
1851 MSG_CALLBACK, /* callback message (from SendMessageCallbackW), always Unicode */
1852 MSG_CALLBACK_RESULT,/* result of a callback message */
1853 MSG_OTHER_PROCESS, /* sent from other process, may include vararg data, always Unicode */
1854 MSG_POSTED, /* posted message (from PostMessageW), always Unicode */
1855 MSG_HARDWARE, /* hardware message */
1856 MSG_WINEVENT /* winevent message */
1858 #define SEND_MSG_ABORT_IF_HUNG 0x01
1861 /* Send a hardware message to a thread queue */
1862 @REQ(send_hardware_message)
1863 thread_id_t id; /* thread id */
1864 user_handle_t win; /* window handle */
1865 unsigned int msg; /* message code */
1866 lparam_t wparam; /* parameters */
1867 lparam_t lparam; /* parameters */
1868 lparam_t info; /* extra info */
1869 int x; /* x position */
1870 int y; /* y position */
1871 unsigned int time; /* message time */
1875 /* Get a message from the current queue */
1877 unsigned int flags; /* PM_* flags */
1878 user_handle_t get_win; /* window handle to get */
1879 unsigned int get_first; /* first message code to get */
1880 unsigned int get_last; /* last message code to get */
1881 unsigned int hw_id; /* id of the previous hardware message (or 0) */
1882 unsigned int wake_mask; /* wakeup bits mask */
1883 unsigned int changed_mask; /* changed bits mask */
1885 user_handle_t win; /* window handle */
1886 unsigned int msg; /* message code */
1887 lparam_t wparam; /* parameters */
1888 lparam_t lparam; /* parameters */
1889 int type; /* message type */
1890 unsigned int time; /* message time */
1891 unsigned int active_hooks; /* active hooks bitmap */
1892 data_size_t total; /* total size of extra data */
1893 VARARG(data,message_data); /* message data for sent messages */
1897 /* Reply to a sent message */
1899 int remove; /* should we remove the message? */
1900 lparam_t result; /* message result */
1901 VARARG(data,bytes); /* message data for sent messages */
1905 /* Accept the current hardware message */
1906 @REQ(accept_hardware_message)
1907 unsigned int hw_id; /* id of the hardware message */
1908 int remove; /* should we remove the message? */
1909 user_handle_t new_win; /* new destination window for current message */
1913 /* Retrieve the reply for the last message sent */
1914 @REQ(get_message_reply)
1915 int cancel; /* cancel message if not ready? */
1917 lparam_t result; /* message result */
1918 VARARG(data,bytes); /* message data for sent messages */
1922 /* Set a window timer */
1924 user_handle_t win; /* window handle */
1925 unsigned int msg; /* message to post */
1926 unsigned int rate; /* timer rate in ms */
1927 lparam_t id; /* timer id */
1928 lparam_t lparam; /* message lparam (callback proc) */
1930 lparam_t id; /* timer id */
1934 /* Kill a window timer */
1935 @REQ(kill_win_timer)
1936 user_handle_t win; /* window handle */
1937 lparam_t id; /* timer id */
1938 unsigned int msg; /* message to post */
1942 /* check if the thread owning the window is hung */
1943 @REQ(is_window_hung)
1944 user_handle_t win; /* window handle */
1950 /* Retrieve info about a serial port */
1951 @REQ(get_serial_info)
1952 obj_handle_t handle; /* handle to comm port */
1954 unsigned int readinterval;
1955 unsigned int readconst;
1956 unsigned int readmult;
1957 unsigned int writeconst;
1958 unsigned int writemult;
1959 unsigned int eventmask;
1963 /* Set info about a serial port */
1964 @REQ(set_serial_info)
1965 obj_handle_t handle; /* handle to comm port */
1966 int flags; /* bitmask to set values (see below) */
1967 unsigned int readinterval;
1968 unsigned int readconst;
1969 unsigned int readmult;
1970 unsigned int writeconst;
1971 unsigned int writemult;
1972 unsigned int eventmask;
1974 #define SERIALINFO_SET_TIMEOUTS 0x01
1975 #define SERIALINFO_SET_MASK 0x02
1978 /* Create an async I/O */
1979 @REQ(register_async)
1980 int type; /* type of queue to look after */
1981 int count; /* count - usually # of bytes to be read/written */
1982 async_data_t async; /* async I/O parameters */
1984 #define ASYNC_TYPE_READ 0x01
1985 #define ASYNC_TYPE_WRITE 0x02
1986 #define ASYNC_TYPE_WAIT 0x03
1989 /* Cancel all async op on a fd */
1991 obj_handle_t handle; /* handle to comm port, socket or file */
1995 /* Perform an ioctl on a file */
1997 ioctl_code_t code; /* ioctl code */
1998 async_data_t async; /* async I/O parameters */
1999 VARARG(in_data,bytes); /* ioctl input data */
2001 obj_handle_t wait; /* handle to wait on for blocking ioctl */
2002 unsigned int options; /* device open options */
2003 VARARG(out_data,bytes); /* ioctl output data */
2007 /* Retrieve results of an async ioctl */
2008 @REQ(get_ioctl_result)
2009 obj_handle_t handle; /* handle to the device */
2010 void* user_arg; /* user arg used to identify the request */
2012 VARARG(out_data,bytes); /* ioctl output data */
2016 /* Create a named pipe */
2017 @REQ(create_named_pipe)
2018 unsigned int access;
2019 unsigned int attributes; /* object attributes */
2020 obj_handle_t rootdir; /* root directory */
2021 unsigned int options;
2023 unsigned int maxinstances;
2024 unsigned int outsize;
2025 unsigned int insize;
2027 VARARG(name,unicode_str); /* pipe name */
2029 obj_handle_t handle; /* handle to the pipe */
2032 /* flags in create_named_pipe and get_named_pipe_info */
2033 #define NAMED_PIPE_MESSAGE_STREAM_WRITE 0x0001
2034 #define NAMED_PIPE_MESSAGE_STREAM_READ 0x0002
2035 #define NAMED_PIPE_NONBLOCKING_MODE 0x0004
2036 #define NAMED_PIPE_SERVER_END 0x8000
2039 @REQ(get_named_pipe_info)
2040 obj_handle_t handle;
2043 unsigned int maxinstances;
2044 unsigned int instances;
2045 unsigned int outsize;
2046 unsigned int insize;
2050 /* Create a window */
2052 user_handle_t parent; /* parent window */
2053 user_handle_t owner; /* owner window */
2054 atom_t atom; /* class atom */
2055 mod_handle_t instance; /* module instance */
2056 VARARG(class,unicode_str); /* class name */
2058 user_handle_t handle; /* created window */
2059 user_handle_t parent; /* full handle of parent */
2060 user_handle_t owner; /* full handle of owner */
2061 int extra; /* number of extra bytes */
2062 void* class_ptr; /* pointer to class in client address space */
2066 /* Destroy a window */
2067 @REQ(destroy_window)
2068 user_handle_t handle; /* handle to the window */
2072 /* Retrieve the desktop window for the current thread */
2073 @REQ(get_desktop_window)
2074 int force; /* force creation if it doesn't exist */
2076 user_handle_t top_window; /* handle to the desktop window */
2077 user_handle_t msg_window; /* handle to the top-level HWND_MESSAGE parent */
2081 /* Set a window owner */
2082 @REQ(set_window_owner)
2083 user_handle_t handle; /* handle to the window */
2084 user_handle_t owner; /* new owner */
2086 user_handle_t full_owner; /* full handle of new owner */
2087 user_handle_t prev_owner; /* full handle of previous owner */
2091 /* Get information from a window handle */
2092 @REQ(get_window_info)
2093 user_handle_t handle; /* handle to the window */
2095 user_handle_t full_handle; /* full 32-bit handle */
2096 user_handle_t last_active; /* last active popup */
2097 process_id_t pid; /* process owning the window */
2098 thread_id_t tid; /* thread owning the window */
2099 atom_t atom; /* class atom */
2100 short int is_unicode; /* ANSI or unicode */
2104 /* Set some information in a window */
2105 @REQ(set_window_info)
2106 unsigned short flags; /* flags for fields to set (see below) */
2107 short int is_unicode; /* ANSI or unicode */
2108 user_handle_t handle; /* handle to the window */
2109 unsigned int style; /* window style */
2110 unsigned int ex_style; /* window extended style */
2111 unsigned int id; /* window id */
2112 mod_handle_t instance; /* creator instance */
2113 lparam_t user_data; /* user-specific data */
2114 int extra_offset; /* offset to set in extra bytes */
2115 data_size_t extra_size; /* size to set in extra bytes */
2116 lparam_t extra_value; /* value to set in extra bytes */
2118 unsigned int old_style; /* old window style */
2119 unsigned int old_ex_style; /* old window extended style */
2120 mod_handle_t old_instance; /* old creator instance */
2121 lparam_t old_user_data; /* old user-specific data */
2122 lparam_t old_extra_value; /* old value in extra bytes */
2123 unsigned int old_id; /* old window id */
2125 #define SET_WIN_STYLE 0x01
2126 #define SET_WIN_EXSTYLE 0x02
2127 #define SET_WIN_ID 0x04
2128 #define SET_WIN_INSTANCE 0x08
2129 #define SET_WIN_USERDATA 0x10
2130 #define SET_WIN_EXTRA 0x20
2131 #define SET_WIN_UNICODE 0x40
2134 /* Set the parent of a window */
2136 user_handle_t handle; /* handle to the window */
2137 user_handle_t parent; /* handle to the parent */
2139 user_handle_t old_parent; /* old parent window */
2140 user_handle_t full_parent; /* full handle of new parent */
2144 /* Get a list of the window parents, up to the root of the tree */
2145 @REQ(get_window_parents)
2146 user_handle_t handle; /* handle to the window */
2148 int count; /* total count of parents */
2149 VARARG(parents,user_handles); /* parent handles */
2153 /* Get a list of the window children */
2154 @REQ(get_window_children)
2155 obj_handle_t desktop; /* handle to desktop */
2156 user_handle_t parent; /* parent window */
2157 atom_t atom; /* class atom for the listed children */
2158 thread_id_t tid; /* thread owning the listed children */
2159 VARARG(class,unicode_str); /* class name */
2161 int count; /* total count of children */
2162 VARARG(children,user_handles); /* children handles */
2166 /* Get a list of the window children that contain a given point */
2167 @REQ(get_window_children_from_point)
2168 user_handle_t parent; /* parent window */
2169 int x; /* point in parent coordinates */
2172 int count; /* total count of children */
2173 VARARG(children,user_handles); /* children handles */
2177 /* Get window tree information from a window handle */
2178 @REQ(get_window_tree)
2179 user_handle_t handle; /* handle to the window */
2181 user_handle_t parent; /* parent window */
2182 user_handle_t owner; /* owner window */
2183 user_handle_t next_sibling; /* next sibling in Z-order */
2184 user_handle_t prev_sibling; /* prev sibling in Z-order */
2185 user_handle_t first_sibling; /* first sibling in Z-order */
2186 user_handle_t last_sibling; /* last sibling in Z-order */
2187 user_handle_t first_child; /* first child */
2188 user_handle_t last_child; /* last child */
2191 /* Set the position and Z order of a window */
2192 @REQ(set_window_pos)
2193 unsigned int flags; /* SWP_* flags */
2194 user_handle_t handle; /* handle to the window */
2195 user_handle_t previous; /* previous window in Z order */
2196 rectangle_t window; /* window rectangle */
2197 rectangle_t client; /* client rectangle */
2198 VARARG(valid,rectangles); /* valid rectangles from WM_NCCALCSIZE */
2200 unsigned int new_style; /* new window style */
2201 unsigned int new_ex_style; /* new window extended style */
2205 /* Get the window and client rectangles of a window */
2206 @REQ(get_window_rectangles)
2207 user_handle_t handle; /* handle to the window */
2209 rectangle_t window; /* window rectangle */
2210 rectangle_t visible; /* visible part of the window rectangle */
2211 rectangle_t client; /* client rectangle */
2215 /* Get the window text */
2216 @REQ(get_window_text)
2217 user_handle_t handle; /* handle to the window */
2219 VARARG(text,unicode_str); /* window text */
2223 /* Set the window text */
2224 @REQ(set_window_text)
2225 user_handle_t handle; /* handle to the window */
2226 VARARG(text,unicode_str); /* window text */
2230 /* Get the coordinates offset between two windows */
2231 @REQ(get_windows_offset)
2232 user_handle_t from; /* handle to the first window */
2233 user_handle_t to; /* handle to the second window */
2235 int x; /* x coordinate offset */
2236 int y; /* y coordinate offset */
2240 /* Get the visible region of a window */
2241 @REQ(get_visible_region)
2242 user_handle_t window; /* handle to the window */
2243 unsigned int flags; /* DCX flags */
2245 user_handle_t top_win; /* top window to clip against */
2246 rectangle_t top_rect; /* top window visible rect with screen coords */
2247 rectangle_t win_rect; /* window rect in screen coords */
2248 data_size_t total_size; /* total size of the resulting region */
2249 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2253 /* Get the window region */
2254 @REQ(get_window_region)
2255 user_handle_t window; /* handle to the window */
2257 data_size_t total_size; /* total size of the resulting region */
2258 VARARG(region,rectangles); /* list of rectangles for the region */
2262 /* Set the window region */
2263 @REQ(set_window_region)
2264 user_handle_t window; /* handle to the window */
2265 int redraw; /* redraw the window? */
2266 VARARG(region,rectangles); /* list of rectangles for the region */
2270 /* Get the window update region */
2271 @REQ(get_update_region)
2272 user_handle_t window; /* handle to the window */
2273 user_handle_t from_child; /* child to start searching from */
2274 unsigned int flags; /* update flags (see below) */
2276 user_handle_t child; /* child to repaint (or window itself) */
2277 unsigned int flags; /* resulting update flags (see below) */
2278 data_size_t total_size; /* total size of the resulting region */
2279 VARARG(region,rectangles); /* list of rectangles for the region */
2281 #define UPDATE_NONCLIENT 0x01 /* get region for repainting non-client area */
2282 #define UPDATE_ERASE 0x02 /* get region for erasing client area */
2283 #define UPDATE_PAINT 0x04 /* get region for painting client area */
2284 #define UPDATE_INTERNALPAINT 0x08 /* get region if internal paint is pending */
2285 #define UPDATE_ALLCHILDREN 0x10 /* force repaint of all children */
2286 #define UPDATE_NOCHILDREN 0x20 /* don't try to repaint any children */
2287 #define UPDATE_NOREGION 0x40 /* don't return a region, only the flags */
2288 #define UPDATE_DELAYED_ERASE 0x80 /* still needs erase after BeginPaint */
2291 /* Update the z order of a window so that a given rectangle is fully visible */
2292 @REQ(update_window_zorder)
2293 user_handle_t window; /* handle to the window */
2294 rectangle_t rect; /* rectangle that must be visible */
2298 /* Mark parts of a window as needing a redraw */
2300 user_handle_t window; /* handle to the window */
2301 unsigned int flags; /* RDW_* flags */
2302 VARARG(region,rectangles); /* list of rectangles for the region */
2306 /* Set a window property */
2307 @REQ(set_window_property)
2308 user_handle_t window; /* handle to the window */
2309 lparam_t data; /* data to store */
2310 atom_t atom; /* property atom (if no name specified) */
2311 VARARG(name,unicode_str); /* property name */
2315 /* Remove a window property */
2316 @REQ(remove_window_property)
2317 user_handle_t window; /* handle to the window */
2318 atom_t atom; /* property atom (if no name specified) */
2319 VARARG(name,unicode_str); /* property name */
2321 lparam_t data; /* data stored in property */
2325 /* Get a window property */
2326 @REQ(get_window_property)
2327 user_handle_t window; /* handle to the window */
2328 atom_t atom; /* property atom (if no name specified) */
2329 VARARG(name,unicode_str); /* property name */
2331 lparam_t data; /* data stored in property */
2335 /* Get the list of properties of a window */
2336 @REQ(get_window_properties)
2337 user_handle_t window; /* handle to the window */
2339 int total; /* total number of properties */
2340 VARARG(props,properties); /* list of properties */
2344 /* Create a window station */
2345 @REQ(create_winstation)
2346 unsigned int flags; /* window station flags */
2347 unsigned int access; /* wanted access rights */
2348 unsigned int attributes; /* object attributes */
2349 VARARG(name,unicode_str); /* object name */
2351 obj_handle_t handle; /* handle to the window station */
2355 /* Open a handle to a window station */
2356 @REQ(open_winstation)
2357 unsigned int access; /* wanted access rights */
2358 unsigned int attributes; /* object attributes */
2359 VARARG(name,unicode_str); /* object name */
2361 obj_handle_t handle; /* handle to the window station */
2365 /* Close a window station */
2366 @REQ(close_winstation)
2367 obj_handle_t handle; /* handle to the window station */
2371 /* Get the process current window station */
2372 @REQ(get_process_winstation)
2374 obj_handle_t handle; /* handle to the window station */
2378 /* Set the process current window station */
2379 @REQ(set_process_winstation)
2380 obj_handle_t handle; /* handle to the window station */
2384 /* Enumerate window stations */
2385 @REQ(enum_winstation)
2386 unsigned int index; /* current index */
2388 unsigned int next; /* next index */
2389 VARARG(name,unicode_str); /* window station name */
2393 /* Create a desktop */
2394 @REQ(create_desktop)
2395 unsigned int flags; /* desktop flags */
2396 unsigned int access; /* wanted access rights */
2397 unsigned int attributes; /* object attributes */
2398 VARARG(name,unicode_str); /* object name */
2400 obj_handle_t handle; /* handle to the desktop */
2404 /* Open a handle to a desktop */
2406 obj_handle_t winsta; /* window station to open (null allowed) */
2407 unsigned int flags; /* desktop flags */
2408 unsigned int access; /* wanted access rights */
2409 unsigned int attributes; /* object attributes */
2410 VARARG(name,unicode_str); /* object name */
2412 obj_handle_t handle; /* handle to the desktop */
2416 /* Close a desktop */
2418 obj_handle_t handle; /* handle to the desktop */
2422 /* Get the thread current desktop */
2423 @REQ(get_thread_desktop)
2424 thread_id_t tid; /* thread id */
2426 obj_handle_t handle; /* handle to the desktop */
2430 /* Set the thread current desktop */
2431 @REQ(set_thread_desktop)
2432 obj_handle_t handle; /* handle to the desktop */
2436 /* Enumerate desktops */
2438 obj_handle_t winstation; /* handle to the window station */
2439 unsigned int index; /* current index */
2441 unsigned int next; /* next index */
2442 VARARG(name,unicode_str); /* window station name */
2446 /* Get/set information about a user object (window station or desktop) */
2447 @REQ(set_user_object_info)
2448 obj_handle_t handle; /* handle to the object */
2449 unsigned int flags; /* information to set */
2450 unsigned int obj_flags; /* new object flags */
2452 int is_desktop; /* is object a desktop? */
2453 unsigned int old_obj_flags; /* old object flags */
2454 VARARG(name,unicode_str); /* object name */
2456 #define SET_USER_OBJECT_FLAGS 1
2459 /* Attach (or detach) thread inputs */
2460 @REQ(attach_thread_input)
2461 thread_id_t tid_from; /* thread to be attached */
2462 thread_id_t tid_to; /* thread to which tid_from should be attached */
2463 int attach; /* is it an attach? */
2467 /* Get input data for a given thread */
2468 @REQ(get_thread_input)
2469 thread_id_t tid; /* id of thread */
2471 user_handle_t focus; /* handle to the focus window */
2472 user_handle_t capture; /* handle to the capture window */
2473 user_handle_t active; /* handle to the active window */
2474 user_handle_t foreground; /* handle to the global foreground window */
2475 user_handle_t menu_owner; /* handle to the menu owner */
2476 user_handle_t move_size; /* handle to the moving/resizing window */
2477 user_handle_t caret; /* handle to the caret window */
2478 rectangle_t rect; /* caret rectangle */
2482 /* Get the time of the last input event */
2483 @REQ(get_last_input_time)
2489 /* Retrieve queue keyboard state for a given thread */
2491 thread_id_t tid; /* id of thread */
2492 int key; /* optional key code or -1 */
2494 unsigned char state; /* state of specified key */
2495 VARARG(keystate,bytes); /* state array for all the keys */
2498 /* Set queue keyboard state for a given thread */
2500 thread_id_t tid; /* id of thread */
2501 VARARG(keystate,bytes); /* state array for all the keys */
2504 /* Set the system foreground window */
2505 @REQ(set_foreground_window)
2506 user_handle_t handle; /* handle to the foreground window */
2508 user_handle_t previous; /* handle to the previous foreground window */
2509 int send_msg_old; /* whether we have to send a msg to the old window */
2510 int send_msg_new; /* whether we have to send a msg to the new window */
2513 /* Set the current thread focus window */
2514 @REQ(set_focus_window)
2515 user_handle_t handle; /* handle to the focus window */
2517 user_handle_t previous; /* handle to the previous focus window */
2520 /* Set the current thread active window */
2521 @REQ(set_active_window)
2522 user_handle_t handle; /* handle to the active window */
2524 user_handle_t previous; /* handle to the previous active window */
2527 /* Set the current thread capture window */
2528 @REQ(set_capture_window)
2529 user_handle_t handle; /* handle to the capture window */
2530 unsigned int flags; /* capture flags (see below) */
2532 user_handle_t previous; /* handle to the previous capture window */
2533 user_handle_t full_handle; /* full 32-bit handle of new capture window */
2535 #define CAPTURE_MENU 0x01 /* capture is for a menu */
2536 #define CAPTURE_MOVESIZE 0x02 /* capture is for moving/resizing */
2539 /* Set the current thread caret window */
2540 @REQ(set_caret_window)
2541 user_handle_t handle; /* handle to the caret window */
2542 int width; /* caret width */
2543 int height; /* caret height */
2545 user_handle_t previous; /* handle to the previous caret window */
2546 rectangle_t old_rect; /* previous caret rectangle */
2547 int old_hide; /* previous hide count */
2548 int old_state; /* previous caret state (1=on, 0=off) */
2552 /* Set the current thread caret information */
2553 @REQ(set_caret_info)
2554 unsigned int flags; /* caret flags (see below) */
2555 user_handle_t handle; /* handle to the caret window */
2556 int x; /* caret x position */
2557 int y; /* caret y position */
2558 int hide; /* increment for hide count (can be negative to show it) */
2559 int state; /* caret state (1=on, 0=off, -1=toggle current state) */
2561 user_handle_t full_handle; /* handle to the current caret window */
2562 rectangle_t old_rect; /* previous caret rectangle */
2563 int old_hide; /* previous hide count */
2564 int old_state; /* previous caret state (1=on, 0=off) */
2566 #define SET_CARET_POS 0x01 /* set the caret position from x,y */
2567 #define SET_CARET_HIDE 0x02 /* increment the caret hide count */
2568 #define SET_CARET_STATE 0x04 /* set the caret on/off state */
2571 /* Set a window hook */
2573 int id; /* id of the hook */
2574 process_id_t pid; /* id of process to set the hook into */
2575 thread_id_t tid; /* id of thread to set the hook into */
2579 void* proc; /* hook procedure */
2580 int unicode; /* is it a unicode hook? */
2581 VARARG(module,unicode_str); /* module name */
2583 user_handle_t handle; /* handle to the hook */
2584 unsigned int active_hooks; /* active hooks bitmap */
2588 /* Remove a window hook */
2590 user_handle_t handle; /* handle to the hook */
2591 int id; /* id of the hook if handle is 0 */
2592 void* proc; /* hook procedure if handle is 0 */
2594 unsigned int active_hooks; /* active hooks bitmap */
2598 /* Start calling a hook chain */
2599 @REQ(start_hook_chain)
2600 int id; /* id of the hook */
2601 int event; /* signalled event */
2602 user_handle_t window; /* handle to the event window */
2603 int object_id; /* object id for out of context winevent */
2604 int child_id; /* child id for out of context winevent */
2606 user_handle_t handle; /* handle to the next hook */
2607 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2608 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2609 void* proc; /* hook procedure */
2610 int unicode; /* is it a unicode hook? */
2611 unsigned int active_hooks; /* active hooks bitmap */
2612 VARARG(module,unicode_str); /* module name */
2616 /* Finished calling a hook chain */
2617 @REQ(finish_hook_chain)
2618 int id; /* id of the hook */
2622 /* Get the hook information */
2624 user_handle_t handle; /* handle to the current hook */
2625 int get_next; /* do we want info about current or next hook? */
2626 int event; /* signalled event */
2627 user_handle_t window; /* handle to the event window */
2628 int object_id; /* object id for out of context winevent */
2629 int child_id; /* child id for out of context winevent */
2631 user_handle_t handle; /* handle to the hook */
2632 int id; /* id of the hook */
2633 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2634 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2635 void* proc; /* hook procedure */
2636 int unicode; /* is it a unicode hook? */
2637 VARARG(module,unicode_str); /* module name */
2641 /* Create a window class */
2643 int local; /* is it a local class? */
2644 atom_t atom; /* class atom */
2645 unsigned int style; /* class style */
2646 mod_handle_t instance; /* module instance */
2647 int extra; /* number of extra class bytes */
2648 int win_extra; /* number of window extra bytes */
2649 void* client_ptr; /* pointer to class in client address space */
2650 VARARG(name,unicode_str); /* class name */
2652 atom_t atom; /* resulting class atom */
2656 /* Destroy a window class */
2658 atom_t atom; /* class atom */
2659 mod_handle_t instance; /* module instance */
2660 VARARG(name,unicode_str); /* class name */
2662 void* client_ptr; /* pointer to class in client address space */
2666 /* Set some information in a class */
2667 @REQ(set_class_info)
2668 user_handle_t window; /* handle to the window */
2669 unsigned int flags; /* flags for info to set (see below) */
2670 atom_t atom; /* class atom */
2671 unsigned int style; /* class style */
2672 int win_extra; /* number of window extra bytes */
2673 mod_handle_t instance; /* module instance */
2674 int extra_offset; /* offset to set in extra bytes */
2675 data_size_t extra_size; /* size to set in extra bytes */
2676 lparam_t extra_value; /* value to set in extra bytes */
2678 atom_t old_atom; /* previous class atom */
2679 unsigned int old_style; /* previous class style */
2680 int old_extra; /* previous number of class extra bytes */
2681 int old_win_extra; /* previous number of window extra bytes */
2682 mod_handle_t old_instance; /* previous module instance */
2683 lparam_t old_extra_value; /* old value in extra bytes */
2685 #define SET_CLASS_ATOM 0x0001
2686 #define SET_CLASS_STYLE 0x0002
2687 #define SET_CLASS_WINEXTRA 0x0004
2688 #define SET_CLASS_INSTANCE 0x0008
2689 #define SET_CLASS_EXTRA 0x0010
2692 /* Set/get clipboard information */
2693 @REQ(set_clipboard_info)
2694 unsigned int flags; /* flags for fields to set (see below) */
2695 user_handle_t clipboard; /* clipboard window */
2696 user_handle_t owner; /* clipboard owner */
2697 user_handle_t viewer; /* first clipboard viewer */
2698 unsigned int seqno; /* change sequence number */
2700 unsigned int flags; /* status flags (see below) */
2701 user_handle_t old_clipboard; /* old clipboard window */
2702 user_handle_t old_owner; /* old clipboard owner */
2703 user_handle_t old_viewer; /* old clipboard viewer */
2704 unsigned int seqno; /* current sequence number */
2707 #define SET_CB_OPEN 0x001
2708 #define SET_CB_OWNER 0x002
2709 #define SET_CB_VIEWER 0x004
2710 #define SET_CB_SEQNO 0x008
2711 #define SET_CB_RELOWNER 0x010
2712 #define SET_CB_CLOSE 0x020
2713 #define CB_OPEN 0x040
2714 #define CB_OWNER 0x080
2715 #define CB_PROCESS 0x100
2718 /* Open a security token */
2720 obj_handle_t handle; /* handle to the thread or process */
2721 unsigned int access; /* access rights to the new token */
2722 unsigned int attributes;/* object attributes */
2723 unsigned int flags; /* flags (see below) */
2725 obj_handle_t token; /* handle to the token */
2727 #define OPEN_TOKEN_THREAD 1
2728 #define OPEN_TOKEN_AS_SELF 2
2731 /* Set/get the global windows */
2732 @REQ(set_global_windows)
2733 unsigned int flags; /* flags for fields to set (see below) */
2734 user_handle_t shell_window; /* handle to the new shell window */
2735 user_handle_t shell_listview; /* handle to the new shell listview window */
2736 user_handle_t progman_window; /* handle to the new program manager window */
2737 user_handle_t taskman_window; /* handle to the new task manager window */
2739 user_handle_t old_shell_window; /* handle to the shell window */
2740 user_handle_t old_shell_listview; /* handle to the shell listview window */
2741 user_handle_t old_progman_window; /* handle to the new program manager window */
2742 user_handle_t old_taskman_window; /* handle to the new task manager window */
2744 #define SET_GLOBAL_SHELL_WINDOWS 0x01 /* set both main shell and listview windows */
2745 #define SET_GLOBAL_PROGMAN_WINDOW 0x02
2746 #define SET_GLOBAL_TASKMAN_WINDOW 0x04
2748 /* Adjust the privileges held by a token */
2749 @REQ(adjust_token_privileges)
2750 obj_handle_t handle; /* handle to the token */
2751 int disable_all; /* disable all privileges? */
2752 int get_modified_state; /* get modified privileges? */
2753 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to enable/disable/remove */
2755 unsigned int len; /* total length in bytes required to store token privileges */
2756 VARARG(privileges,LUID_AND_ATTRIBUTES); /* modified privileges */
2759 /* Retrieves the set of privileges held by or available to a token */
2760 @REQ(get_token_privileges)
2761 obj_handle_t handle; /* handle to the token */
2763 unsigned int len; /* total length in bytes required to store token privileges */
2764 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
2767 /* Check the token has the required privileges */
2768 @REQ(check_token_privileges)
2769 obj_handle_t handle; /* handle to the token */
2770 int all_required; /* are all the privileges required for the check to succeed? */
2771 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to check */
2773 int has_privileges; /* does the token have the required privileges? */
2774 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
2777 @REQ(duplicate_token)
2778 obj_handle_t handle; /* handle to the token to duplicate */
2779 unsigned int access; /* access rights to the new token */
2780 unsigned int attributes; /* object attributes */
2781 int primary; /* is the new token to be a primary one? */
2782 int impersonation_level; /* impersonation level of the new token */
2784 obj_handle_t new_handle; /* duplicated handle */
2788 obj_handle_t handle; /* handle to the token */
2789 unsigned int desired_access; /* desired access to the object */
2790 unsigned int mapping_read; /* mapping from generic read to specific rights */
2791 unsigned int mapping_write; /* mapping from generic write to specific rights */
2792 unsigned int mapping_execute; /* mapping from generic execute to specific rights */
2793 unsigned int mapping_all; /* mapping from generic all to specific rights */
2794 VARARG(sd,security_descriptor); /* security descriptor to check */
2796 unsigned int access_granted; /* access rights actually granted */
2797 unsigned int access_status; /* was access granted? */
2798 unsigned int privileges_len; /* length needed to store privileges */
2799 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges used during access check */
2802 @REQ(get_token_user)
2803 obj_handle_t handle; /* handle to the token */
2805 data_size_t user_len; /* length needed to store user */
2806 VARARG(user,SID); /* sid of the user the token represents */
2809 @REQ(get_token_groups)
2810 obj_handle_t handle; /* handle to the token */
2812 data_size_t user_len; /* length needed to store user */
2813 VARARG(user,token_groups); /* groups the token's user belongs to */
2816 @REQ(set_security_object)
2817 obj_handle_t handle; /* handle to the object */
2818 unsigned int security_info; /* which parts of security descriptor to set */
2819 VARARG(sd,security_descriptor); /* security descriptor to set */
2822 @REQ(get_security_object)
2823 obj_handle_t handle; /* handle to the object */
2824 unsigned int security_info; /* which parts of security descriptor to get */
2826 unsigned int sd_len; /* buffer size needed for sd */
2827 VARARG(sd,security_descriptor); /* retrieved security descriptor */
2830 /* Create a mailslot */
2831 @REQ(create_mailslot)
2832 unsigned int access; /* wanted access rights */
2833 unsigned int attributes; /* object attributes */
2834 obj_handle_t rootdir; /* root directory */
2835 unsigned int max_msgsize;
2836 timeout_t read_timeout;
2837 VARARG(name,unicode_str); /* mailslot name */
2839 obj_handle_t handle; /* handle to the mailslot */
2843 /* Set mailslot information */
2844 @REQ(set_mailslot_info)
2845 obj_handle_t handle; /* handle to the mailslot */
2847 timeout_t read_timeout;
2849 unsigned int max_msgsize;
2850 timeout_t read_timeout;
2852 #define MAILSLOT_SET_READ_TIMEOUT 1
2855 /* Create a directory object */
2856 @REQ(create_directory)
2857 unsigned int access; /* access flags */
2858 unsigned int attributes; /* object attributes */
2859 obj_handle_t rootdir; /* root directory */
2860 VARARG(directory_name,unicode_str); /* Directory name */
2862 obj_handle_t handle; /* handle to the directory */
2866 /* Open a directory object */
2867 @REQ(open_directory)
2868 unsigned int access; /* access flags */
2869 unsigned int attributes; /* object attributes */
2870 obj_handle_t rootdir; /* root directory */
2871 VARARG(directory_name,unicode_str); /* Directory name */
2873 obj_handle_t handle; /* handle to the directory */
2877 /* Get a directory entry by index */
2878 @REQ(get_directory_entry)
2879 obj_handle_t handle; /* handle to the directory */
2880 unsigned int index; /* entry index */
2882 data_size_t name_len; /* length of the entry name in bytes */
2883 VARARG(name,unicode_str,name_len); /* entry name */
2884 VARARG(type,unicode_str); /* entry type */
2888 /* Create a symbolic link object */
2889 @REQ(create_symlink)
2890 unsigned int access; /* access flags */
2891 unsigned int attributes; /* object attributes */
2892 obj_handle_t rootdir; /* root directory */
2893 data_size_t name_len; /* length of the symlink name in bytes */
2894 VARARG(name,unicode_str,name_len); /* symlink name */
2895 VARARG(target_name,unicode_str); /* target name */
2897 obj_handle_t handle; /* handle to the symlink */
2901 /* Open a symbolic link object */
2903 unsigned int access; /* access flags */
2904 unsigned int attributes; /* object attributes */
2905 obj_handle_t rootdir; /* root directory */
2906 VARARG(name,unicode_str); /* symlink name */
2908 obj_handle_t handle; /* handle to the symlink */
2912 /* Query a symbolic link object */
2914 obj_handle_t handle; /* handle to the symlink */
2916 VARARG(target_name,unicode_str); /* target name */
2920 /* Query basic object information */
2921 @REQ(get_object_info)
2922 obj_handle_t handle; /* handle to the object */
2924 unsigned int access; /* granted access mask */
2925 unsigned int ref_count; /* object ref count */
2929 /* Unlink a named object */
2931 obj_handle_t handle; /* handle to the object */
2935 /* Query the impersonation level of an impersonation token */
2936 @REQ(get_token_impersonation_level)
2937 obj_handle_t handle; /* handle to the object */
2939 int impersonation_level; /* impersonation level of the impersonation token */
2942 /* Allocate a locally-unique identifier */
2943 @REQ(allocate_locally_unique_id)
2949 /* Create a device manager */
2950 @REQ(create_device_manager)
2951 unsigned int access; /* wanted access rights */
2952 unsigned int attributes; /* object attributes */
2954 obj_handle_t handle; /* handle to the device */
2958 /* Create a device */
2960 unsigned int access; /* wanted access rights */
2961 unsigned int attributes; /* object attributes */
2962 obj_handle_t rootdir; /* root directory */
2963 obj_handle_t manager; /* device manager */
2964 void* user_ptr; /* opaque ptr for use by client */
2965 VARARG(name,unicode_str); /* object name */
2967 obj_handle_t handle; /* handle to the device */
2971 /* Delete a device */
2973 obj_handle_t handle; /* handle to the device */
2977 /* Retrieve the next pending device ioctl request */
2978 @REQ(get_next_device_request)
2979 obj_handle_t manager; /* handle to the device manager */
2980 obj_handle_t prev; /* handle to the previous ioctl */
2981 unsigned int status; /* status of the previous ioctl */
2982 VARARG(prev_data,bytes); /* output data of the previous ioctl */
2984 obj_handle_t next; /* handle to the next ioctl */
2985 ioctl_code_t code; /* ioctl code */
2986 void* user_ptr; /* opaque ptr for the device */
2987 data_size_t in_size; /* total needed input size */
2988 data_size_t out_size; /* needed output size */
2989 VARARG(next_data,bytes); /* input data of the next ioctl */
2993 /* Make the current process a system process */
2994 @REQ(make_process_system)
2996 obj_handle_t event; /* event signaled when all user processes have exited */
3000 /* Get detailed fixed-size information about a token */
3001 @REQ(get_token_statistics)
3002 obj_handle_t handle; /* handle to the object */
3004 luid_t token_id; /* locally-unique identifier of the token */
3005 luid_t modified_id; /* locally-unique identifier of the modified version of the token */
3006 int primary; /* is the token primary or impersonation? */
3007 int impersonation_level; /* level of impersonation */
3008 int group_count; /* the number of groups the token is a member of */
3009 int privilege_count; /* the number of privileges the token has */
3013 /* Create I/O completion port */
3014 @REQ(create_completion)
3015 unsigned int access; /* desired access to a port */
3016 unsigned int attributes; /* object attributes */
3017 unsigned int concurrent; /* max number of concurrent active threads */
3018 obj_handle_t rootdir; /* root directory */
3019 VARARG(filename,string); /* port name */
3021 obj_handle_t handle; /* port handle */
3025 /* Open I/O completion port */
3026 @REQ(open_completion)
3027 unsigned int access; /* desired access to a port */
3028 unsigned int attributes; /* object attributes */
3029 obj_handle_t rootdir; /* root directory */
3030 VARARG(filename,string); /* port name */
3032 obj_handle_t handle; /* port handle */
3036 /* add completion to completion port */
3037 @REQ(add_completion)
3038 obj_handle_t handle; /* port handle */
3039 apc_param_t ckey; /* completion key */
3040 apc_param_t cvalue; /* completion value */
3041 unsigned int information; /* IO_STATUS_BLOCK Information */
3042 unsigned int status; /* completion result */
3046 /* get completion from completion port queue */
3047 @REQ(remove_completion)
3048 obj_handle_t handle; /* port handle */
3050 apc_param_t ckey; /* completion key */
3051 apc_param_t cvalue; /* completion value */
3052 unsigned int information; /* IO_STATUS_BLOCK Information */
3053 unsigned int status; /* completion result */
3057 /* get completion queue depth */
3058 @REQ(query_completion)
3059 obj_handle_t handle; /* port handle */
3061 unsigned int depth; /* completion queue depth */
3065 /* associate object with completion port */
3066 @REQ(set_completion_info)
3067 obj_handle_t handle; /* object handle */
3068 obj_handle_t chandle; /* port handle */
3069 apc_param_t ckey; /* completion key */
3073 /* check for associated completion and push msg */
3074 @REQ(add_fd_completion)
3075 obj_handle_t handle; /* async' object */
3076 apc_param_t cvalue; /* completion value */
3077 unsigned int status; /* completion status */
3078 unsigned int information; /* IO_STATUS_BLOCK Information */
3082 /* Retrieve layered info for a window */
3083 @REQ(get_window_layered_info)
3084 user_handle_t handle; /* handle to the window */
3086 unsigned int color_key; /* color key */
3087 unsigned int alpha; /* alpha (0..255) */
3088 unsigned int flags; /* LWA_* flags */
3092 /* Set layered info for a window */
3093 @REQ(set_window_layered_info)
3094 user_handle_t handle; /* handle to the window */
3095 unsigned int color_key; /* color key */
3096 unsigned int alpha; /* alpha (0..255) */
3097 unsigned int flags; /* LWA_* flags */