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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25 @HEADER /* start of C declarations */
36 int req; /* request code */
37 size_t request_size; /* request variable part size */
38 size_t reply_size; /* reply variable part maximum size */
43 unsigned int error; /* error result */
44 size_t reply_size; /* reply variable part size */
47 /* placeholder structure for the maximum allowed request size */
48 /* this is used to construct the generic_request union */
49 struct request_max_size
51 int pad[16]; /* the max request size is 16 ints */
54 typedef void *obj_handle_t;
55 typedef void *user_handle_t;
56 typedef unsigned short atom_t;
57 typedef unsigned int process_id_t;
58 typedef unsigned int thread_id_t;
60 #define FIRST_USER_HANDLE 0x0020 /* first possible value for low word of user handle */
61 #define LAST_USER_HANDLE 0xffef /* last possible value for low word of user handle */
64 /* definitions of the event data depending on the event code */
65 struct debug_event_exception
67 EXCEPTION_RECORD record; /* exception record */
68 int first; /* first chance exception? */
70 struct debug_event_create_thread
72 obj_handle_t handle; /* handle to the new thread */
73 void *teb; /* thread teb (in debugged process address space) */
74 void *start; /* thread startup routine */
76 struct debug_event_create_process
78 obj_handle_t file; /* handle to the process exe file */
79 obj_handle_t process; /* handle to the new process */
80 obj_handle_t thread; /* handle to the new thread */
81 void *base; /* base of executable image */
82 int dbg_offset; /* offset of debug info in file */
83 int dbg_size; /* size of debug info */
84 void *teb; /* thread teb (in debugged process address space) */
85 void *start; /* thread startup routine */
86 void *name; /* image name (optional) */
87 int unicode; /* is it Unicode? */
89 struct debug_event_exit
91 int exit_code; /* thread or process exit code */
93 struct debug_event_load_dll
95 obj_handle_t handle; /* file handle for the dll */
96 void *base; /* base address of the dll */
97 int dbg_offset; /* offset of debug info in file */
98 int dbg_size; /* size of debug info */
99 void *name; /* image name (optional) */
100 int unicode; /* is it Unicode? */
102 struct debug_event_unload_dll
104 void *base; /* base address of the dll */
106 struct debug_event_output_string
108 void *string; /* string to display (in debugged process address space) */
109 int unicode; /* is it Unicode? */
110 int length; /* string length */
112 struct debug_event_rip_info
117 union debug_event_data
119 struct debug_event_exception exception;
120 struct debug_event_create_thread create_thread;
121 struct debug_event_create_process create_process;
122 struct debug_event_exit exit;
123 struct debug_event_load_dll load_dll;
124 struct debug_event_unload_dll unload_dll;
125 struct debug_event_output_string output_string;
126 struct debug_event_rip_info rip_info;
129 /* debug event data */
132 int code; /* event code */
133 union debug_event_data info; /* event information */
136 /* structure used in sending an fd from client to server */
139 thread_id_t tid; /* thread id */
140 int fd; /* file descriptor on client-side */
143 /* structure sent by the server on the wait fifo */
146 void *cookie; /* magic cookie that was passed in select_request */
147 int signaled; /* wait result */
150 /* structure for absolute timeouts */
153 int sec; /* seconds since Unix epoch */
154 int usec; /* microseconds */
157 /* structure returned in the list of window properties */
160 atom_t atom; /* property atom */
161 short string; /* was atom a string originally? */
162 obj_handle_t handle; /* handle stored in property */
165 /* structure to specify window rectangles */
174 /* structure for console char/attribute info */
181 #define MAX_ACL_LEN 65535
183 struct security_descriptor
185 unsigned int control; /* SE_ flags */
190 /* VARARGS(owner,SID); */
191 /* VARARGS(group,SID); */
192 /* VARARGS(sacl,ACL); */
193 /* VARARGS(dacl,ACL); */
196 /****************************************************************/
197 /* Request declarations */
199 /* Create a new process from the context of the parent */
201 int inherit_all; /* inherit all handles from parent */
202 unsigned int create_flags; /* creation flags */
203 int unix_pid; /* Unix pid of new process */
204 obj_handle_t exe_file; /* file handle for main exe */
205 obj_handle_t hstdin; /* handle for stdin */
206 obj_handle_t hstdout; /* handle for stdout */
207 obj_handle_t hstderr; /* handle for stderr */
208 VARARG(info,startup_info); /* startup information */
209 VARARG(env,unicode_str); /* environment for new process */
211 obj_handle_t info; /* new process info handle */
215 /* Retrieve information about a newly started process */
216 @REQ(get_new_process_info)
217 obj_handle_t info; /* info handle returned from new_process_request */
218 unsigned int process_access; /* access rights for process object */
219 unsigned int process_attr; /* attributes for process object */
220 unsigned int thread_access; /* access rights for thread object */
221 unsigned int thread_attr; /* attributes for thread object */
223 process_id_t pid; /* process id */
224 obj_handle_t phandle; /* process handle (in the current process) */
225 thread_id_t tid; /* thread id */
226 obj_handle_t thandle; /* thread handle (in the current process) */
227 int success; /* did the process start successfully? */
231 /* Create a new thread from the context of the parent */
233 unsigned int access; /* wanted access rights */
234 unsigned int attributes; /* object attributes */
235 int suspend; /* new thread should be suspended on creation */
236 int request_fd; /* fd for request pipe */
238 thread_id_t tid; /* thread id */
239 obj_handle_t handle; /* thread handle (in the current process) */
243 /* Retrieve the new process startup info */
244 @REQ(get_startup_info)
246 obj_handle_t exe_file; /* file handle for main exe */
247 obj_handle_t hstdin; /* handle for stdin */
248 obj_handle_t hstdout; /* handle for stdout */
249 obj_handle_t hstderr; /* handle for stderr */
250 VARARG(info,startup_info); /* startup information */
251 VARARG(env,unicode_str); /* environment */
255 /* Signal the end of the process initialization */
256 @REQ(init_process_done)
257 void* module; /* main module base address */
258 size_t module_size; /* main module size */
259 void* entry; /* process entry point */
260 void* name; /* ptr to ptr to name (in process addr space) */
261 obj_handle_t exe_file; /* file handle for main exe */
262 int gui; /* is it a GUI process? */
263 VARARG(filename,unicode_str); /* file name of main exe */
267 /* Initialize a thread; called from the child after fork()/clone() */
269 int unix_pid; /* Unix pid of new thread */
270 int unix_tid; /* Unix tid of new thread */
271 void* teb; /* TEB of new thread (in thread address space) */
272 void* peb; /* address of PEB (in thread address space) */
273 void* entry; /* thread entry point (in thread address space) */
274 void* ldt_copy; /* address of LDT copy (in thread address space) */
275 int reply_fd; /* fd for reply pipe */
276 int wait_fd; /* fd for blocking calls pipe */
277 int debug_level; /* new debug level */
279 process_id_t pid; /* process id of the new thread's process */
280 thread_id_t tid; /* thread id of the new thread */
281 size_t info_size; /* total size of startup info */
282 time_t server_start; /* server start time */
283 int version; /* protocol version */
287 /* Terminate a process */
288 @REQ(terminate_process)
289 obj_handle_t handle; /* process handle to terminate */
290 int exit_code; /* process exit code */
292 int self; /* suicide? */
296 /* Terminate a thread */
297 @REQ(terminate_thread)
298 obj_handle_t handle; /* thread handle to terminate */
299 int exit_code; /* thread exit code */
301 int self; /* suicide? */
302 int last; /* last thread in this process? */
306 /* Retrieve information about a process */
307 @REQ(get_process_info)
308 obj_handle_t handle; /* process handle */
310 process_id_t pid; /* server process id */
311 process_id_t ppid; /* server process id of parent */
312 int exit_code; /* process exit code */
313 int priority; /* priority class */
314 int affinity; /* process affinity mask */
315 void* peb; /* PEB address in process address space */
319 /* Set a process informations */
320 @REQ(set_process_info)
321 obj_handle_t handle; /* process handle */
322 int mask; /* setting mask (see below) */
323 int priority; /* priority class */
324 int affinity; /* affinity mask */
326 #define SET_PROCESS_INFO_PRIORITY 0x01
327 #define SET_PROCESS_INFO_AFFINITY 0x02
330 /* Retrieve information about a thread */
331 @REQ(get_thread_info)
332 obj_handle_t handle; /* thread handle */
333 thread_id_t tid_in; /* thread id (optional) */
335 process_id_t pid; /* server process id */
336 thread_id_t tid; /* server thread id */
337 void* teb; /* thread teb pointer */
338 int exit_code; /* thread exit code */
339 int priority; /* thread priority level */
340 int affinity; /* thread affinity mask */
341 time_t creation_time; /* thread creation time */
342 time_t exit_time; /* thread exit time */
346 /* Set a thread informations */
347 @REQ(set_thread_info)
348 obj_handle_t handle; /* thread handle */
349 int mask; /* setting mask (see below) */
350 int priority; /* priority class */
351 int affinity; /* affinity mask */
352 obj_handle_t token; /* impersonation token */
354 #define SET_THREAD_INFO_PRIORITY 0x01
355 #define SET_THREAD_INFO_AFFINITY 0x02
356 #define SET_THREAD_INFO_TOKEN 0x04
359 /* Retrieve information about a module */
361 obj_handle_t handle; /* process handle */
362 void* base_address; /* base address of module */
364 size_t size; /* module size */
366 VARARG(filename,unicode_str); /* file name of module */
370 /* Suspend a thread */
372 obj_handle_t handle; /* thread handle */
374 int count; /* new suspend count */
378 /* Resume a thread */
380 obj_handle_t handle; /* thread handle */
382 int count; /* new suspend count */
386 /* Notify the server that a dll has been loaded */
388 obj_handle_t handle; /* file handle */
389 void* base; /* base address */
390 size_t size; /* dll size */
391 int dbg_offset; /* debug info offset */
392 int dbg_size; /* debug info size */
393 void* name; /* ptr to ptr to name (in process addr space) */
394 VARARG(filename,unicode_str); /* file name of dll */
398 /* Notify the server that a dll is being unloaded */
400 void* base; /* base address */
404 /* Queue an APC for a thread */
406 obj_handle_t handle; /* thread handle */
407 int user; /* user or system apc? */
408 void* func; /* function to call */
409 void* arg1; /* params for function to call */
415 /* Get next APC to call */
417 int alertable; /* is thread alertable? */
419 void* func; /* function to call */
420 int type; /* function type */
421 void* arg1; /* function arguments */
425 enum apc_type { APC_NONE, APC_USER, APC_TIMER, APC_ASYNC_IO };
428 /* Close a handle for the current process */
430 obj_handle_t handle; /* handle to close */
432 int fd; /* associated fd to close */
436 /* Set a handle information */
437 @REQ(set_handle_info)
438 obj_handle_t handle; /* handle we are interested in */
439 int flags; /* new handle flags */
440 int mask; /* mask for flags to set */
442 int old_flags; /* old flag value */
446 /* Duplicate a handle */
448 obj_handle_t src_process; /* src process handle */
449 obj_handle_t src_handle; /* src handle to duplicate */
450 obj_handle_t dst_process; /* dst process handle */
451 unsigned int access; /* wanted access rights */
452 unsigned int attributes; /* object attributes */
453 unsigned int options; /* duplicate options (see below) */
455 obj_handle_t handle; /* duplicated handle in dst process */
456 int fd; /* associated fd to close */
458 #define DUP_HANDLE_CLOSE_SOURCE DUPLICATE_CLOSE_SOURCE
459 #define DUP_HANDLE_SAME_ACCESS DUPLICATE_SAME_ACCESS
460 #define DUP_HANDLE_MAKE_GLOBAL 0x80000000 /* Not a Windows flag */
463 /* Open a handle to a process */
465 process_id_t pid; /* process id to open */
466 unsigned int access; /* wanted access rights */
467 unsigned int attributes; /* object attributes */
469 obj_handle_t handle; /* handle to the process */
473 /* Open a handle to a thread */
475 thread_id_t tid; /* thread id to open */
476 unsigned int access; /* wanted access rights */
477 unsigned int attributes; /* object attributes */
479 obj_handle_t handle; /* handle to the thread */
483 /* Wait for handles */
485 int flags; /* wait flags (see below) */
486 void* cookie; /* magic cookie to return to client */
487 obj_handle_t signal; /* object to signal (0 if none) */
488 abs_time_t timeout; /* absolute timeout */
489 VARARG(handles,handles); /* handles to select on */
492 #define SELECT_ALERTABLE 2
493 #define SELECT_INTERRUPTIBLE 4
494 #define SELECT_TIMEOUT 8
497 /* Create an event */
499 unsigned int access; /* wanted access rights */
500 unsigned int attributes; /* object attributes */
501 obj_handle_t rootdir; /* root directory */
502 int manual_reset; /* manual reset event */
503 int initial_state; /* initial state of the event */
504 VARARG(name,unicode_str); /* object name */
506 obj_handle_t handle; /* handle to the event */
509 /* Event operation */
511 obj_handle_t handle; /* handle to event */
512 int op; /* event operation (see below) */
514 enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT };
519 unsigned int access; /* wanted access rights */
520 unsigned int attributes; /* object attributes */
521 obj_handle_t rootdir; /* root directory */
522 VARARG(name,unicode_str); /* object name */
524 obj_handle_t handle; /* handle to the event */
530 unsigned int access; /* wanted access rights */
531 unsigned int attributes; /* object attributes */
532 obj_handle_t rootdir; /* root directory */
533 int owned; /* initially owned? */
534 VARARG(name,unicode_str); /* object name */
536 obj_handle_t handle; /* handle to the mutex */
540 /* Release a mutex */
542 obj_handle_t handle; /* handle to the mutex */
544 unsigned int prev_count; /* value of internal counter, before release */
550 unsigned int access; /* wanted access rights */
551 unsigned int attributes; /* object attributes */
552 obj_handle_t rootdir; /* root directory */
553 VARARG(name,unicode_str); /* object name */
555 obj_handle_t handle; /* handle to the mutex */
559 /* Create a semaphore */
560 @REQ(create_semaphore)
561 unsigned int access; /* wanted access rights */
562 unsigned int attributes; /* object attributes */
563 obj_handle_t rootdir; /* root directory */
564 unsigned int initial; /* initial count */
565 unsigned int max; /* maximum count */
566 VARARG(name,unicode_str); /* object name */
568 obj_handle_t handle; /* handle to the semaphore */
572 /* Release a semaphore */
573 @REQ(release_semaphore)
574 obj_handle_t handle; /* handle to the semaphore */
575 unsigned int count; /* count to add to semaphore */
577 unsigned int prev_count; /* previous semaphore count */
581 /* Open a semaphore */
583 unsigned int access; /* wanted access rights */
584 unsigned int attributes; /* object attributes */
585 obj_handle_t rootdir; /* root directory */
586 VARARG(name,unicode_str); /* object name */
588 obj_handle_t handle; /* handle to the semaphore */
594 unsigned int access; /* wanted access rights */
595 unsigned int attributes; /* object attributes */
596 unsigned int sharing; /* sharing flags */
597 int create; /* file create action */
598 unsigned int options; /* file options */
599 unsigned int attrs; /* file attributes for creation */
600 VARARG(filename,string); /* file name */
602 obj_handle_t handle; /* handle to the file */
606 /* Open a file object */
607 @REQ(open_file_object)
608 unsigned int access; /* wanted access rights */
609 unsigned int attributes; /* open attributes */
610 obj_handle_t rootdir; /* root directory */
611 unsigned int sharing; /* sharing flags */
612 VARARG(filename,unicode_str); /* file name */
614 obj_handle_t handle; /* handle to the file */
618 /* Allocate a file handle for a Unix fd */
619 @REQ(alloc_file_handle)
620 unsigned int access; /* wanted access rights */
621 unsigned int attributes; /* object attributes */
622 int fd; /* file descriptor on the client side */
624 obj_handle_t handle; /* handle to the file */
628 /* Get a Unix fd to access a file */
630 obj_handle_t handle; /* handle to the file */
631 unsigned int access; /* wanted access rights */
633 int fd; /* file descriptor */
634 int removable; /* is device removable? (-1 if unknown) */
635 int flags; /* file read/write flags (see below) */
637 #define FD_FLAG_OVERLAPPED 0x01 /* fd opened in overlapped mode */
638 #define FD_FLAG_TIMEOUT 0x02 /* read/write is synchronous */
639 #define FD_FLAG_RECV_SHUTDOWN 0x04
640 #define FD_FLAG_SEND_SHUTDOWN 0x08
641 #define FD_FLAG_AVAILABLE 0x10 /* in overlap read/write operation,
642 * only handle available data (don't wait) */
644 /* Set the cached file descriptor of a handle */
646 obj_handle_t handle; /* handle we are interested in */
647 int fd; /* file descriptor */
648 int removable; /* is device removable? (-1 if unknown) */
650 int cur_fd; /* current file descriptor */
654 /* Flush a file buffers */
656 obj_handle_t handle; /* handle to the file */
658 obj_handle_t event; /* event set when finished */
662 /* Lock a region of a file */
664 obj_handle_t handle; /* handle to the file */
665 unsigned int offset_low; /* offset of start of lock */
666 unsigned int offset_high; /* offset of start of lock */
667 unsigned int count_low; /* count of bytes to lock */
668 unsigned int count_high; /* count of bytes to lock */
669 int shared; /* shared or exclusive lock? */
670 int wait; /* do we want to wait? */
672 obj_handle_t handle; /* handle to wait on */
673 int overlapped; /* is it an overlapped I/O handle? */
677 /* Unlock a region of a file */
679 obj_handle_t handle; /* handle to the file */
680 unsigned int offset_low; /* offset of start of unlock */
681 unsigned int offset_high; /* offset of start of unlock */
682 unsigned int count_low; /* count of bytes to unlock */
683 unsigned int count_high; /* count of bytes to unlock */
687 /* Get ready to unmount a Unix device */
689 obj_handle_t handle; /* handle to a file on the device */
693 /* Create a socket */
695 unsigned int access; /* wanted access rights */
696 unsigned int attributes; /* object attributes */
697 int family; /* family, see socket manpage */
698 int type; /* type, see socket manpage */
699 int protocol; /* protocol, see socket manpage */
700 unsigned int flags; /* socket flags */
702 obj_handle_t handle; /* handle to the new socket */
706 /* Accept a socket */
708 obj_handle_t lhandle; /* handle to the listening socket */
709 unsigned int access; /* wanted access rights */
710 unsigned int attributes; /* object attributes */
712 obj_handle_t handle; /* handle to the new socket */
716 /* Set socket event parameters */
717 @REQ(set_socket_event)
718 obj_handle_t handle; /* handle to the socket */
719 unsigned int mask; /* event mask */
720 obj_handle_t event; /* event object */
721 user_handle_t window; /* window to send the message to */
722 unsigned int msg; /* message to send */
726 /* Get socket event parameters */
727 @REQ(get_socket_event)
728 obj_handle_t handle; /* handle to the socket */
729 int service; /* clear pending? */
730 obj_handle_t c_event; /* event to clear */
732 unsigned int mask; /* event mask */
733 unsigned int pmask; /* pending events */
734 unsigned int state; /* status bits */
735 VARARG(errors,ints); /* event errors */
739 /* Reenable pending socket events */
740 @REQ(enable_socket_event)
741 obj_handle_t handle; /* handle to the socket */
742 unsigned int mask; /* events to re-enable */
743 unsigned int sstate; /* status bits to set */
744 unsigned int cstate; /* status bits to clear */
747 @REQ(set_socket_deferred)
748 obj_handle_t handle; /* handle to the socket */
749 obj_handle_t deferred; /* handle to the socket for which accept() is deferred */
752 /* Allocate a console (only used by a console renderer) */
754 unsigned int access; /* wanted access rights */
755 unsigned int attributes; /* object attributes */
756 process_id_t pid; /* pid of process which shall be attached to the console */
758 obj_handle_t handle_in; /* handle to console input */
759 obj_handle_t event; /* handle to renderer events change notification */
763 /* Free the console of the current process */
768 #define CONSOLE_RENDERER_NONE_EVENT 0x00
769 #define CONSOLE_RENDERER_TITLE_EVENT 0x01
770 #define CONSOLE_RENDERER_ACTIVE_SB_EVENT 0x02
771 #define CONSOLE_RENDERER_SB_RESIZE_EVENT 0x03
772 #define CONSOLE_RENDERER_UPDATE_EVENT 0x04
773 #define CONSOLE_RENDERER_CURSOR_POS_EVENT 0x05
774 #define CONSOLE_RENDERER_CURSOR_GEOM_EVENT 0x06
775 #define CONSOLE_RENDERER_DISPLAY_EVENT 0x07
776 #define CONSOLE_RENDERER_EXIT_EVENT 0x08
777 struct console_renderer_event
812 /* retrieve console events for the renderer */
813 @REQ(get_console_renderer_events)
814 obj_handle_t handle; /* handle to console input events */
816 VARARG(data,bytes); /* the various console_renderer_events */
820 /* Open a handle to the process console */
822 int from; /* 0 (resp 1) input (resp output) of current process console */
823 /* otherwise console_in handle to get active screen buffer? */
824 unsigned int access; /* wanted access rights */
825 unsigned int attributes; /* object attributes */
826 int share; /* share mask (only for output handles) */
828 obj_handle_t handle; /* handle to the console */
832 /* Get the input queue wait event */
833 @REQ(get_console_wait_event)
838 /* Get a console mode (input or output) */
839 @REQ(get_console_mode)
840 obj_handle_t handle; /* handle to the console */
842 int mode; /* console mode */
846 /* Set a console mode (input or output) */
847 @REQ(set_console_mode)
848 obj_handle_t handle; /* handle to the console */
849 int mode; /* console mode */
853 /* Set info about a console (input only) */
854 @REQ(set_console_input_info)
855 obj_handle_t handle; /* handle to console input, or 0 for process' console */
856 int mask; /* setting mask (see below) */
857 obj_handle_t active_sb; /* active screen buffer */
858 int history_mode; /* whether we duplicate lines in history */
859 int history_size; /* number of lines in history */
860 int edition_mode; /* index to the edition mode flavors */
861 VARARG(title,unicode_str); /* console title */
863 #define SET_CONSOLE_INPUT_INFO_ACTIVE_SB 0x01
864 #define SET_CONSOLE_INPUT_INFO_TITLE 0x02
865 #define SET_CONSOLE_INPUT_INFO_HISTORY_MODE 0x04
866 #define SET_CONSOLE_INPUT_INFO_HISTORY_SIZE 0x08
867 #define SET_CONSOLE_INPUT_INFO_EDITION_MODE 0x10
870 /* Get info about a console (input only) */
871 @REQ(get_console_input_info)
872 obj_handle_t handle; /* handle to console input, or 0 for process' console */
874 int history_mode; /* whether we duplicate lines in history */
875 int history_size; /* number of lines in history */
876 int history_index; /* number of used lines in history */
877 int edition_mode; /* index to the edition mode flavors */
878 VARARG(title,unicode_str); /* console title */
882 /* appends a string to console's history */
883 @REQ(append_console_input_history)
884 obj_handle_t handle; /* handle to console input, or 0 for process' console */
885 VARARG(line,unicode_str); /* line to add */
889 /* appends a string to console's history */
890 @REQ(get_console_input_history)
891 obj_handle_t handle; /* handle to console input, or 0 for process' console */
892 int index; /* index to get line from */
894 int total; /* total length of line in Unicode chars */
895 VARARG(line,unicode_str); /* line to add */
899 /* creates a new screen buffer on process' console */
900 @REQ(create_console_output)
901 obj_handle_t handle_in; /* handle to console input, or 0 for process' console */
902 unsigned int access; /* wanted access rights */
903 unsigned int attributes; /* object attributes */
904 unsigned int share; /* sharing credentials */
906 obj_handle_t handle_out; /* handle to the screen buffer */
910 /* Set info about a console (output only) */
911 @REQ(set_console_output_info)
912 obj_handle_t handle; /* handle to the console */
913 int mask; /* setting mask (see below) */
914 short int cursor_size; /* size of cursor (percentage filled) */
915 short int cursor_visible;/* cursor visibility flag */
916 short int cursor_x; /* position of cursor (x, y) */
918 short int width; /* width of the screen buffer */
919 short int height; /* height of the screen buffer */
920 short int attr; /* default attribute */
921 short int win_left; /* window actually displayed by renderer */
922 short int win_top; /* the rect area is expressed withing the */
923 short int win_right; /* boundaries of the screen buffer */
924 short int win_bottom;
925 short int max_width; /* maximum size (width x height) for the window */
926 short int max_height;
928 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_GEOM 0x01
929 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_POS 0x02
930 #define SET_CONSOLE_OUTPUT_INFO_SIZE 0x04
931 #define SET_CONSOLE_OUTPUT_INFO_ATTR 0x08
932 #define SET_CONSOLE_OUTPUT_INFO_DISPLAY_WINDOW 0x10
933 #define SET_CONSOLE_OUTPUT_INFO_MAX_SIZE 0x20
936 /* Get info about a console (output only) */
937 @REQ(get_console_output_info)
938 obj_handle_t handle; /* handle to the console */
940 short int cursor_size; /* size of cursor (percentage filled) */
941 short int cursor_visible;/* cursor visibility flag */
942 short int cursor_x; /* position of cursor (x, y) */
944 short int width; /* width of the screen buffer */
945 short int height; /* height of the screen buffer */
946 short int attr; /* default attribute */
947 short int win_left; /* window actually displayed by renderer */
948 short int win_top; /* the rect area is expressed withing the */
949 short int win_right; /* boundaries of the screen buffer */
950 short int win_bottom;
951 short int max_width; /* maximum size (width x height) for the window */
952 short int max_height;
955 /* Add input records to a console input queue */
956 @REQ(write_console_input)
957 obj_handle_t handle; /* handle to the console input */
958 VARARG(rec,input_records); /* input records */
960 int written; /* number of records written */
964 /* Fetch input records from a console input queue */
965 @REQ(read_console_input)
966 obj_handle_t handle; /* handle to the console input */
967 int flush; /* flush the retrieved records from the queue? */
969 int read; /* number of records read */
970 VARARG(rec,input_records); /* input records */
974 /* write data (chars and/or attributes) in a screen buffer */
975 @REQ(write_console_output)
976 obj_handle_t handle; /* handle to the console output */
977 int x; /* position where to start writing */
979 int mode; /* char info (see below) */
980 int wrap; /* wrap around at end of line? */
981 VARARG(data,bytes); /* info to write */
983 int written; /* number of char infos actually written */
984 int width; /* width of screen buffer */
985 int height; /* height of screen buffer */
989 CHAR_INFO_MODE_TEXT, /* characters only */
990 CHAR_INFO_MODE_ATTR, /* attributes only */
991 CHAR_INFO_MODE_TEXTATTR, /* both characters and attributes */
992 CHAR_INFO_MODE_TEXTSTDATTR /* characters but use standard attributes */
996 /* fill a screen buffer with constant data (chars and/or attributes) */
997 @REQ(fill_console_output)
998 obj_handle_t handle; /* handle to the console output */
999 int x; /* position where to start writing */
1001 int mode; /* char info mode */
1002 int count; /* number to write */
1003 int wrap; /* wrap around at end of line? */
1004 char_info_t data; /* data to write */
1006 int written; /* number of char infos actually written */
1010 /* read data (chars and/or attributes) from a screen buffer */
1011 @REQ(read_console_output)
1012 obj_handle_t handle; /* handle to the console output */
1013 int x; /* position (x,y) where to start reading */
1015 int mode; /* char info mode */
1016 int wrap; /* wrap around at end of line? */
1018 int width; /* width of screen buffer */
1019 int height; /* height of screen buffer */
1024 /* move a rect (of data) in screen buffer content */
1025 @REQ(move_console_output)
1026 obj_handle_t handle; /* handle to the console output */
1027 short int x_src; /* position (x, y) of rect to start moving from */
1029 short int x_dst; /* position (x, y) of rect to move to */
1031 short int w; /* size of the rect (width, height) to move */
1036 /* Sends a signal to a process group */
1037 @REQ(send_console_signal)
1038 int signal; /* the signal to send */
1039 process_id_t group_id; /* the group to send the signal to */
1043 /* enable directory change notifications */
1044 @REQ(read_directory_changes)
1045 obj_handle_t handle; /* handle to the directory */
1046 obj_handle_t event; /* handle to the event */
1047 unsigned int filter; /* notification filter */
1051 /* Create a file mapping */
1052 @REQ(create_mapping)
1053 unsigned int access; /* wanted access rights */
1054 unsigned int attributes; /* object attributes */
1055 obj_handle_t rootdir; /* root directory */
1056 int size_high; /* mapping size */
1057 int size_low; /* mapping size */
1058 int protect; /* protection flags (see below) */
1059 obj_handle_t file_handle; /* file handle */
1060 VARARG(name,unicode_str); /* object name */
1062 obj_handle_t handle; /* handle to the mapping */
1064 /* protection flags */
1065 #define VPROT_READ 0x01
1066 #define VPROT_WRITE 0x02
1067 #define VPROT_EXEC 0x04
1068 #define VPROT_WRITECOPY 0x08
1069 #define VPROT_GUARD 0x10
1070 #define VPROT_NOCACHE 0x20
1071 #define VPROT_COMMITTED 0x40
1072 #define VPROT_IMAGE 0x80
1075 /* Open a mapping */
1077 unsigned int access; /* wanted access rights */
1078 unsigned int attributes; /* object attributes */
1079 obj_handle_t rootdir; /* root directory */
1080 VARARG(name,unicode_str); /* object name */
1082 obj_handle_t handle; /* handle to the mapping */
1086 /* Get information about a file mapping */
1087 @REQ(get_mapping_info)
1088 obj_handle_t handle; /* handle to the mapping */
1090 int size_high; /* mapping size */
1091 int size_low; /* mapping size */
1092 int protect; /* protection flags */
1093 int header_size; /* header size (for VPROT_IMAGE mapping) */
1094 void* base; /* default base addr (for VPROT_IMAGE mapping) */
1095 obj_handle_t shared_file; /* shared mapping file handle */
1096 int shared_size; /* shared mapping size */
1100 #define SNAP_HEAPLIST 0x00000001
1101 #define SNAP_PROCESS 0x00000002
1102 #define SNAP_THREAD 0x00000004
1103 #define SNAP_MODULE 0x00000008
1104 /* Create a snapshot */
1105 @REQ(create_snapshot)
1106 unsigned int attributes; /* object attributes */
1107 int flags; /* snapshot flags (SNAP_*) */
1108 process_id_t pid; /* process id */
1110 obj_handle_t handle; /* handle to the snapshot */
1114 /* Get the next process from a snapshot */
1116 obj_handle_t handle; /* handle to the snapshot */
1117 int reset; /* reset snapshot position? */
1119 int count; /* process usage count */
1120 process_id_t pid; /* process id */
1121 process_id_t ppid; /* parent process id */
1122 void* heap; /* heap base */
1123 void* module; /* main module */
1124 int threads; /* number of threads */
1125 int priority; /* process priority */
1126 int handles; /* number of handles */
1127 VARARG(filename,unicode_str); /* file name of main exe */
1131 /* Get the next thread from a snapshot */
1133 obj_handle_t handle; /* handle to the snapshot */
1134 int reset; /* reset snapshot position? */
1136 int count; /* thread usage count */
1137 process_id_t pid; /* process id */
1138 thread_id_t tid; /* thread id */
1139 int base_pri; /* base priority */
1140 int delta_pri; /* delta priority */
1144 /* Get the next module from a snapshot */
1146 obj_handle_t handle; /* handle to the snapshot */
1147 int reset; /* reset snapshot position? */
1149 process_id_t pid; /* process id */
1150 void* base; /* module base address */
1151 size_t size; /* module size */
1152 VARARG(filename,unicode_str); /* file name of module */
1156 /* Wait for a debug event */
1157 @REQ(wait_debug_event)
1158 int get_handle; /* should we alloc a handle for waiting? */
1160 process_id_t pid; /* process id */
1161 thread_id_t tid; /* thread id */
1162 obj_handle_t wait; /* wait handle if no event ready */
1163 VARARG(event,debug_event); /* debug event data */
1167 /* Queue an exception event */
1168 @REQ(queue_exception_event)
1169 int first; /* first chance exception? */
1170 VARARG(record,exc_event); /* thread context followed by exception record */
1172 obj_handle_t handle; /* handle to the queued event */
1176 /* Retrieve the status of an exception event */
1177 @REQ(get_exception_status)
1178 obj_handle_t handle; /* handle to the queued event */
1180 VARARG(context,context); /* modified thread context */
1184 /* Send an output string to the debugger */
1185 @REQ(output_debug_string)
1186 void* string; /* string to display (in debugged process address space) */
1187 int unicode; /* is it Unicode? */
1188 int length; /* string length */
1192 /* Continue a debug event */
1193 @REQ(continue_debug_event)
1194 process_id_t pid; /* process id to continue */
1195 thread_id_t tid; /* thread id to continue */
1196 int status; /* continuation status */
1200 /* Start/stop debugging an existing process */
1202 process_id_t pid; /* id of the process to debug */
1203 int attach; /* 1=attaching / 0=detaching from the process */
1207 /* Simulate a breakpoint in a process */
1209 obj_handle_t handle; /* process handle */
1211 int self; /* was it the caller itself? */
1215 /* Set debugger kill on exit flag */
1216 @REQ(set_debugger_kill_on_exit)
1217 int kill_on_exit; /* 0=detach/1=kill debuggee when debugger dies */
1221 /* Read data from a process address space */
1222 @REQ(read_process_memory)
1223 obj_handle_t handle; /* process handle */
1224 void* addr; /* addr to read from */
1226 VARARG(data,bytes); /* result data */
1230 /* Write data to a process address space */
1231 @REQ(write_process_memory)
1232 obj_handle_t handle; /* process handle */
1233 void* addr; /* addr to write to (must be int-aligned) */
1234 unsigned int first_mask; /* mask for first word */
1235 unsigned int last_mask; /* mask for last word */
1236 VARARG(data,bytes); /* data to write */
1240 /* Create a registry key */
1242 obj_handle_t parent; /* handle to the parent key */
1243 unsigned int access; /* desired access rights */
1244 unsigned int attributes; /* object attributes */
1245 unsigned int options; /* creation options */
1246 time_t modif; /* last modification time */
1247 size_t namelen; /* length of key name in bytes */
1248 VARARG(name,unicode_str,namelen); /* key name */
1249 VARARG(class,unicode_str); /* class name */
1251 obj_handle_t hkey; /* handle to the created key */
1252 int created; /* has it been newly created? */
1255 /* Open a registry key */
1257 obj_handle_t parent; /* handle to the parent key */
1258 unsigned int access; /* desired access rights */
1259 unsigned int attributes; /* object attributes */
1260 VARARG(name,unicode_str); /* key name */
1262 obj_handle_t hkey; /* handle to the open key */
1266 /* Delete a registry key */
1268 obj_handle_t hkey; /* handle to the key */
1272 /* Flush a registry key */
1274 obj_handle_t hkey; /* handle to the key */
1278 /* Enumerate registry subkeys */
1280 obj_handle_t hkey; /* handle to registry key */
1281 int index; /* index of subkey (or -1 for current key) */
1282 int info_class; /* requested information class */
1284 int subkeys; /* number of subkeys */
1285 int max_subkey; /* longest subkey name */
1286 int max_class; /* longest class name */
1287 int values; /* number of values */
1288 int max_value; /* longest value name */
1289 int max_data; /* longest value data */
1290 time_t modif; /* last modification time */
1291 size_t total; /* total length needed for full name and class */
1292 size_t namelen; /* length of key name in bytes */
1293 VARARG(name,unicode_str,namelen); /* key name */
1294 VARARG(class,unicode_str); /* class name */
1298 /* Set a value of a registry key */
1300 obj_handle_t hkey; /* handle to registry key */
1301 int type; /* value type */
1302 size_t namelen; /* length of value name in bytes */
1303 VARARG(name,unicode_str,namelen); /* value name */
1304 VARARG(data,bytes); /* value data */
1308 /* Retrieve the value of a registry key */
1310 obj_handle_t hkey; /* handle to registry key */
1311 VARARG(name,unicode_str); /* value name */
1313 int type; /* value type */
1314 size_t total; /* total length needed for data */
1315 VARARG(data,bytes); /* value data */
1319 /* Enumerate a value of a registry key */
1320 @REQ(enum_key_value)
1321 obj_handle_t hkey; /* handle to registry key */
1322 int index; /* value index */
1323 int info_class; /* requested information class */
1325 int type; /* value type */
1326 size_t total; /* total length needed for full name and data */
1327 size_t namelen; /* length of value name in bytes */
1328 VARARG(name,unicode_str,namelen); /* value name */
1329 VARARG(data,bytes); /* value data */
1333 /* Delete a value of a registry key */
1334 @REQ(delete_key_value)
1335 obj_handle_t hkey; /* handle to registry key */
1336 VARARG(name,unicode_str); /* value name */
1340 /* Load a registry branch from a file */
1342 obj_handle_t hkey; /* root key to load to */
1343 obj_handle_t file; /* file to load from */
1344 VARARG(name,unicode_str); /* subkey name */
1348 /* UnLoad a registry branch from a file */
1349 @REQ(unload_registry)
1350 obj_handle_t hkey; /* root key to unload to */
1354 /* Save a registry branch to a file */
1356 obj_handle_t hkey; /* key to save */
1357 obj_handle_t file; /* file to save to */
1361 /* Add a registry key change notification */
1362 @REQ(set_registry_notification)
1363 obj_handle_t hkey; /* key to watch for changes */
1364 obj_handle_t event; /* event to set */
1365 int subtree; /* should we watch the whole subtree? */
1366 unsigned int filter; /* things to watch */
1370 /* Create a waitable timer */
1372 unsigned int access; /* wanted access rights */
1373 unsigned int attributes; /* object attributes */
1374 obj_handle_t rootdir; /* root directory */
1375 int manual; /* manual reset */
1376 VARARG(name,unicode_str); /* object name */
1378 obj_handle_t handle; /* handle to the timer */
1382 /* Open a waitable timer */
1384 unsigned int access; /* wanted access rights */
1385 unsigned int attributes; /* object attributes */
1386 obj_handle_t rootdir; /* root directory */
1387 VARARG(name,unicode_str); /* object name */
1389 obj_handle_t handle; /* handle to the timer */
1392 /* Set a waitable timer */
1394 obj_handle_t handle; /* handle to the timer */
1395 abs_time_t expire; /* next expiration absolute time */
1396 int period; /* timer period in ms */
1397 void* callback; /* callback function */
1398 void* arg; /* callback argument */
1400 int signaled; /* was the timer signaled before this call ? */
1403 /* Cancel a waitable timer */
1405 obj_handle_t handle; /* handle to the timer */
1407 int signaled; /* was the timer signaled before this calltime ? */
1410 /* Get information on a waitable timer */
1411 @REQ(get_timer_info)
1412 obj_handle_t handle; /* handle to the timer */
1414 abs_time_t when; /* absolute time when the timer next expires */
1415 int signaled; /* is the timer signaled? */
1419 /* Retrieve the current context of a thread */
1420 @REQ(get_thread_context)
1421 obj_handle_t handle; /* thread handle */
1422 unsigned int flags; /* context flags */
1423 int suspend; /* if getting context during suspend */
1425 int self; /* was it a handle to the current thread? */
1426 VARARG(context,context); /* thread context */
1430 /* Set the current context of a thread */
1431 @REQ(set_thread_context)
1432 obj_handle_t handle; /* thread handle */
1433 unsigned int flags; /* context flags */
1434 int suspend; /* if setting context during suspend */
1435 VARARG(context,context); /* thread context */
1437 int self; /* was it a handle to the current thread? */
1441 /* Fetch a selector entry for a thread */
1442 @REQ(get_selector_entry)
1443 obj_handle_t handle; /* thread handle */
1444 int entry; /* LDT entry */
1446 unsigned int base; /* selector base */
1447 unsigned int limit; /* selector limit */
1448 unsigned char flags; /* selector flags */
1454 obj_handle_t table; /* which table to add atom to */
1455 VARARG(name,unicode_str); /* atom name */
1457 atom_t atom; /* resulting atom */
1461 /* Delete an atom */
1463 obj_handle_t table; /* which table to delete atom from */
1464 atom_t atom; /* atom handle */
1470 obj_handle_t table; /* which table to find atom from */
1471 VARARG(name,unicode_str); /* atom name */
1473 atom_t atom; /* atom handle */
1477 /* Get information about an atom */
1478 @REQ(get_atom_information)
1479 obj_handle_t table; /* which table to find atom from */
1480 atom_t atom; /* atom handle */
1482 int count; /* atom lock count */
1483 int pinned; /* whether the atom has been pinned */
1484 size_t total; /* actual length of atom name */
1485 VARARG(name,unicode_str); /* atom name */
1489 /* Set information about an atom */
1490 @REQ(set_atom_information)
1491 obj_handle_t table; /* which table to find atom from */
1492 atom_t atom; /* atom handle */
1493 int pinned; /* whether to bump atom information */
1497 /* Empty an atom table */
1498 @REQ(empty_atom_table)
1499 obj_handle_t table; /* which table to find atom from */
1500 int if_pinned; /* whether to delete pinned atoms */
1504 /* Init an atom table */
1505 @REQ(init_atom_table)
1506 int entries; /* number of entries (only for local) */
1508 obj_handle_t table; /* handle to the atom table */
1512 /* Get the message queue of the current thread */
1515 obj_handle_t handle; /* handle to the queue */
1519 /* Set the current message queue wakeup mask */
1520 @REQ(set_queue_mask)
1521 unsigned int wake_mask; /* wakeup bits mask */
1522 unsigned int changed_mask; /* changed bits mask */
1523 int skip_wait; /* will we skip waiting if signaled? */
1525 unsigned int wake_bits; /* current wake bits */
1526 unsigned int changed_bits; /* current changed bits */
1530 /* Get the current message queue status */
1531 @REQ(get_queue_status)
1532 int clear; /* should we clear the change bits? */
1534 unsigned int wake_bits; /* wake bits */
1535 unsigned int changed_bits; /* changed bits since last time */
1539 /* Wait for a process to start waiting on input */
1540 @REQ(wait_input_idle)
1541 obj_handle_t handle; /* process handle */
1542 int timeout; /* timeout */
1544 obj_handle_t event; /* handle to idle event */
1548 /* Send a message to a thread queue */
1550 thread_id_t id; /* thread id */
1551 int type; /* message type (see below) */
1552 int flags; /* message flags (see below) */
1553 user_handle_t win; /* window handle */
1554 unsigned int msg; /* message code */
1555 unsigned int wparam; /* parameters */
1556 unsigned int lparam; /* parameters */
1557 int x; /* x position */
1558 int y; /* y position */
1559 unsigned int time; /* message time */
1560 unsigned int info; /* extra info */
1561 int timeout; /* timeout for reply */
1562 void* callback; /* callback address */
1563 VARARG(data,bytes); /* message data for sent messages */
1566 @REQ(post_quit_message)
1567 int exit_code; /* exit code to return */
1572 MSG_ASCII, /* Ascii message (from SendMessageA) */
1573 MSG_UNICODE, /* Unicode message (from SendMessageW) */
1574 MSG_NOTIFY, /* notify message (from SendNotifyMessageW), always Unicode */
1575 MSG_CALLBACK, /* callback message (from SendMessageCallbackW), always Unicode */
1576 MSG_CALLBACK_RESULT,/* result of a callback message */
1577 MSG_OTHER_PROCESS, /* sent from other process, may include vararg data, always Unicode */
1578 MSG_POSTED, /* posted message (from PostMessageW), always Unicode */
1579 MSG_HARDWARE, /* hardware message */
1580 MSG_WINEVENT /* winevent message */
1582 #define SEND_MSG_ABORT_IF_HUNG 0x01
1585 /* Get a message from the current queue */
1587 int flags; /* see below */
1588 user_handle_t get_win; /* window handle to get */
1589 unsigned int get_first; /* first message code to get */
1590 unsigned int get_last; /* last message code to get */
1591 unsigned int hw_id; /* id of the previous hardware message (or 0) */
1593 int type; /* message type */
1594 user_handle_t win; /* window handle */
1595 unsigned int msg; /* message code */
1596 unsigned int wparam; /* parameters (callback function for MSG_CALLBACK_RESULT) */
1597 unsigned int lparam; /* parameters (result for MSG_CALLBACK_RESULT) */
1598 int x; /* x position */
1599 int y; /* y position */
1600 user_handle_t hook; /* winevent hook handle */
1601 void* hook_proc; /* winevent hook proc address */
1602 unsigned int time; /* message time */
1603 unsigned int info; /* extra info (callback argument for MSG_CALLBACK_RESULT) */
1604 unsigned int hw_id; /* id if hardware message */
1605 unsigned int active_hooks; /* active hooks bitmap */
1606 size_t total; /* total size of extra data */
1607 VARARG(data,bytes); /* message data for sent messages */
1609 #define GET_MSG_REMOVE 1 /* remove the message */
1610 #define GET_MSG_SENT_ONLY 2 /* only get sent messages */
1612 /* Reply to a sent message */
1614 unsigned int result; /* message result */
1615 int remove; /* should we remove the message? */
1616 VARARG(data,bytes); /* message data for sent messages */
1620 /* Accept the current hardware message */
1621 @REQ(accept_hardware_message)
1622 unsigned int hw_id; /* id of the hardware message */
1623 int remove; /* should we remove the message? */
1624 user_handle_t new_win; /* new destination window for current message */
1628 /* Retrieve the reply for the last message sent */
1629 @REQ(get_message_reply)
1630 int cancel; /* cancel message if not ready? */
1632 unsigned int result; /* message result */
1633 VARARG(data,bytes); /* message data for sent messages */
1637 /* Set a window timer */
1639 user_handle_t win; /* window handle */
1640 unsigned int msg; /* message to post */
1641 unsigned int id; /* timer id */
1642 unsigned int rate; /* timer rate in ms */
1643 unsigned int lparam; /* message lparam (callback proc) */
1645 unsigned int id; /* timer id */
1649 /* Kill a window timer */
1650 @REQ(kill_win_timer)
1651 user_handle_t win; /* window handle */
1652 unsigned int msg; /* message to post */
1653 unsigned int id; /* timer id */
1657 /* Retrieve info about a serial port */
1658 @REQ(get_serial_info)
1659 obj_handle_t handle; /* handle to comm port */
1661 unsigned int readinterval;
1662 unsigned int readconst;
1663 unsigned int readmult;
1664 unsigned int writeconst;
1665 unsigned int writemult;
1666 unsigned int eventmask;
1667 unsigned int commerror;
1671 /* Set info about a serial port */
1672 @REQ(set_serial_info)
1673 obj_handle_t handle; /* handle to comm port */
1674 int flags; /* bitmask to set values (see below) */
1675 unsigned int readinterval;
1676 unsigned int readconst;
1677 unsigned int readmult;
1678 unsigned int writeconst;
1679 unsigned int writemult;
1680 unsigned int eventmask;
1681 unsigned int commerror;
1683 #define SERIALINFO_SET_TIMEOUTS 0x01
1684 #define SERIALINFO_SET_MASK 0x02
1685 #define SERIALINFO_SET_ERROR 0x04
1688 /* Create an async I/O */
1689 @REQ(register_async)
1690 obj_handle_t handle; /* handle to comm port, socket or file */
1691 int type; /* type of queue to look after */
1692 void* io_apc; /* APC routine to queue upon end of async */
1693 void* io_sb; /* I/O status block (unique across all async on this handle) */
1694 void* io_user; /* data to pass back to caller */
1695 int count; /* count - usually # of bytes to be read/written */
1697 #define ASYNC_TYPE_READ 0x01
1698 #define ASYNC_TYPE_WRITE 0x02
1699 #define ASYNC_TYPE_WAIT 0x03
1702 /* Cancel all async op on a fd */
1704 obj_handle_t handle; /* handle to comm port, socket or file */
1708 /* Create a named pipe */
1709 @REQ(create_named_pipe)
1710 unsigned int access;
1711 unsigned int attributes; /* object attributes */
1712 obj_handle_t rootdir; /* root directory */
1713 unsigned int options;
1715 unsigned int maxinstances;
1716 unsigned int outsize;
1717 unsigned int insize;
1718 unsigned int timeout;
1719 VARARG(name,unicode_str); /* pipe name */
1721 obj_handle_t handle; /* handle to the pipe */
1724 /* flags in create_named_pipe and get_named_pipe_info */
1725 #define NAMED_PIPE_MESSAGE_STREAM_WRITE 0x0001
1726 #define NAMED_PIPE_MESSAGE_STREAM_READ 0x0002
1727 #define NAMED_PIPE_NONBLOCKING_MODE 0x0004
1730 /* Open an existing named pipe */
1731 @REQ(open_named_pipe)
1732 unsigned int access;
1733 unsigned int attributes; /* object attributes */
1734 obj_handle_t rootdir; /* root directory */
1735 unsigned int flags; /* file flags */
1736 VARARG(name,unicode_str); /* pipe name */
1738 obj_handle_t handle; /* handle to the pipe */
1742 /* Connect to a named pipe */
1743 @REQ(connect_named_pipe)
1744 obj_handle_t handle;
1750 /* Wait for a named pipe */
1751 @REQ(wait_named_pipe)
1752 obj_handle_t handle;
1753 unsigned int timeout;
1756 VARARG(name,unicode_str); /* pipe name */
1760 /* Disconnect a named pipe */
1761 @REQ(disconnect_named_pipe)
1762 obj_handle_t handle;
1764 int fd; /* associated fd to close */
1768 @REQ(get_named_pipe_info)
1769 obj_handle_t handle;
1772 unsigned int maxinstances;
1773 unsigned int outsize;
1774 unsigned int insize;
1778 /* Create a window */
1780 user_handle_t parent; /* parent window */
1781 user_handle_t owner; /* owner window */
1782 atom_t atom; /* class atom */
1783 void* instance; /* module instance */
1785 user_handle_t handle; /* created window */
1786 int extra; /* number of extra bytes */
1787 void* class_ptr; /* pointer to class in client address space */
1791 /* Destroy a window */
1792 @REQ(destroy_window)
1793 user_handle_t handle; /* handle to the window */
1797 /* Retrieve the desktop window for the current thread */
1798 @REQ(get_desktop_window)
1800 user_handle_t handle; /* handle to the desktop window */
1804 /* Set a window owner */
1805 @REQ(set_window_owner)
1806 user_handle_t handle; /* handle to the window */
1807 user_handle_t owner; /* new owner */
1809 user_handle_t full_owner; /* full handle of new owner */
1810 user_handle_t prev_owner; /* full handle of previous owner */
1814 /* Get information from a window handle */
1815 @REQ(get_window_info)
1816 user_handle_t handle; /* handle to the window */
1818 user_handle_t full_handle; /* full 32-bit handle */
1819 user_handle_t last_active; /* last active popup */
1820 process_id_t pid; /* process owning the window */
1821 thread_id_t tid; /* thread owning the window */
1822 atom_t atom; /* class atom */
1823 int is_unicode; /* ANSI or unicode */
1827 /* Set some information in a window */
1828 @REQ(set_window_info)
1829 user_handle_t handle; /* handle to the window */
1830 unsigned int flags; /* flags for fields to set (see below) */
1831 unsigned int style; /* window style */
1832 unsigned int ex_style; /* window extended style */
1833 unsigned int id; /* window id */
1834 void* instance; /* creator instance */
1835 int is_unicode; /* ANSI or unicode */
1836 void* user_data; /* user-specific data */
1837 int extra_offset; /* offset to set in extra bytes */
1838 size_t extra_size; /* size to set in extra bytes */
1839 unsigned int extra_value; /* value to set in extra bytes */
1841 unsigned int old_style; /* old window style */
1842 unsigned int old_ex_style; /* old window extended style */
1843 unsigned int old_id; /* old window id */
1844 void* old_instance; /* old creator instance */
1845 void* old_user_data; /* old user-specific data */
1846 unsigned int old_extra_value; /* old value in extra bytes */
1848 #define SET_WIN_STYLE 0x01
1849 #define SET_WIN_EXSTYLE 0x02
1850 #define SET_WIN_ID 0x04
1851 #define SET_WIN_INSTANCE 0x08
1852 #define SET_WIN_USERDATA 0x10
1853 #define SET_WIN_EXTRA 0x20
1854 #define SET_WIN_UNICODE 0x40
1857 /* Set the parent of a window */
1859 user_handle_t handle; /* handle to the window */
1860 user_handle_t parent; /* handle to the parent */
1862 user_handle_t old_parent; /* old parent window */
1863 user_handle_t full_parent; /* full handle of new parent */
1867 /* Get a list of the window parents, up to the root of the tree */
1868 @REQ(get_window_parents)
1869 user_handle_t handle; /* handle to the window */
1871 int count; /* total count of parents */
1872 VARARG(parents,user_handles); /* parent handles */
1876 /* Get a list of the window children */
1877 @REQ(get_window_children)
1878 user_handle_t parent; /* parent window */
1879 atom_t atom; /* class atom for the listed children */
1880 thread_id_t tid; /* thread owning the listed children */
1882 int count; /* total count of children */
1883 VARARG(children,user_handles); /* children handles */
1887 /* Get a list of the window children that contain a given point */
1888 @REQ(get_window_children_from_point)
1889 user_handle_t parent; /* parent window */
1890 int x; /* point in parent coordinates */
1893 int count; /* total count of children */
1894 VARARG(children,user_handles); /* children handles */
1898 /* Get window tree information from a window handle */
1899 @REQ(get_window_tree)
1900 user_handle_t handle; /* handle to the window */
1902 user_handle_t parent; /* parent window */
1903 user_handle_t owner; /* owner window */
1904 user_handle_t next_sibling; /* next sibling in Z-order */
1905 user_handle_t prev_sibling; /* prev sibling in Z-order */
1906 user_handle_t first_sibling; /* first sibling in Z-order */
1907 user_handle_t last_sibling; /* last sibling in Z-order */
1908 user_handle_t first_child; /* first child */
1909 user_handle_t last_child; /* last child */
1912 /* Set the position and Z order of a window */
1913 @REQ(set_window_pos)
1914 user_handle_t handle; /* handle to the window */
1915 user_handle_t previous; /* previous window in Z order */
1916 unsigned int flags; /* SWP_* flags */
1917 rectangle_t window; /* window rectangle */
1918 rectangle_t client; /* client rectangle */
1919 VARARG(valid,rectangles); /* valid rectangles from WM_NCCALCSIZE */
1921 unsigned int new_style; /* new window style */
1925 /* Get the window and client rectangles of a window */
1926 @REQ(get_window_rectangles)
1927 user_handle_t handle; /* handle to the window */
1929 rectangle_t window; /* window rectangle */
1930 rectangle_t visible; /* visible part of the window rectangle */
1931 rectangle_t client; /* client rectangle */
1935 /* Get the window text */
1936 @REQ(get_window_text)
1937 user_handle_t handle; /* handle to the window */
1939 VARARG(text,unicode_str); /* window text */
1943 /* Set the window text */
1944 @REQ(set_window_text)
1945 user_handle_t handle; /* handle to the window */
1946 VARARG(text,unicode_str); /* window text */
1950 /* Get the coordinates offset between two windows */
1951 @REQ(get_windows_offset)
1952 user_handle_t from; /* handle to the first window */
1953 user_handle_t to; /* handle to the second window */
1955 int x; /* x coordinate offset */
1956 int y; /* y coordinate offset */
1960 /* Get the visible region of a window */
1961 @REQ(get_visible_region)
1962 user_handle_t window; /* handle to the window */
1963 unsigned int flags; /* DCX flags */
1965 user_handle_t top_win; /* top window to clip against */
1966 int top_org_x; /* top window visible rect origin in screen coords */
1968 int win_org_x; /* window rect origin in screen coords */
1970 size_t total_size; /* total size of the resulting region */
1971 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
1975 /* Get the window region */
1976 @REQ(get_window_region)
1977 user_handle_t window; /* handle to the window */
1979 size_t total_size; /* total size of the resulting region */
1980 VARARG(region,rectangles); /* list of rectangles for the region */
1984 /* Set the window region */
1985 @REQ(set_window_region)
1986 user_handle_t window; /* handle to the window */
1987 VARARG(region,rectangles); /* list of rectangles for the region */
1991 /* Get the window update region */
1992 @REQ(get_update_region)
1993 user_handle_t window; /* handle to the window */
1994 user_handle_t from_child; /* child to start searching from */
1995 unsigned int flags; /* update flags (see below) */
1997 user_handle_t child; /* child to repaint (or window itself) */
1998 unsigned int flags; /* resulting update flags (see below) */
1999 size_t total_size; /* total size of the resulting region */
2000 VARARG(region,rectangles); /* list of rectangles for the region */
2002 #define UPDATE_NONCLIENT 0x01 /* get region for repainting non-client area */
2003 #define UPDATE_ERASE 0x02 /* get region for erasing client area */
2004 #define UPDATE_PAINT 0x04 /* get region for painting client area */
2005 #define UPDATE_INTERNALPAINT 0x08 /* get region if internal paint is pending */
2006 #define UPDATE_ALLCHILDREN 0x10 /* force repaint of all children */
2007 #define UPDATE_NOCHILDREN 0x20 /* don't try to repaint any children */
2008 #define UPDATE_NOREGION 0x40 /* don't return a region, only the flags */
2011 /* Update the z order of a window so that a given rectangle is fully visible */
2012 @REQ(update_window_zorder)
2013 user_handle_t window; /* handle to the window */
2014 rectangle_t rect; /* rectangle that must be visible */
2018 /* Mark parts of a window as needing a redraw */
2020 user_handle_t window; /* handle to the window */
2021 unsigned int flags; /* RDW_* flags */
2022 VARARG(region,rectangles); /* list of rectangles for the region */
2026 /* Set a window property */
2027 @REQ(set_window_property)
2028 user_handle_t window; /* handle to the window */
2029 atom_t atom; /* property atom (if no name specified) */
2030 obj_handle_t handle; /* handle to store */
2031 VARARG(name,unicode_str); /* property name */
2035 /* Remove a window property */
2036 @REQ(remove_window_property)
2037 user_handle_t window; /* handle to the window */
2038 atom_t atom; /* property atom (if no name specified) */
2039 VARARG(name,unicode_str); /* property name */
2041 obj_handle_t handle; /* handle stored in property */
2045 /* Get a window property */
2046 @REQ(get_window_property)
2047 user_handle_t window; /* handle to the window */
2048 atom_t atom; /* property atom (if no name specified) */
2049 VARARG(name,unicode_str); /* property name */
2051 obj_handle_t handle; /* handle stored in property */
2055 /* Get the list of properties of a window */
2056 @REQ(get_window_properties)
2057 user_handle_t window; /* handle to the window */
2059 int total; /* total number of properties */
2060 VARARG(props,properties); /* list of properties */
2064 /* Create a window station */
2065 @REQ(create_winstation)
2066 unsigned int flags; /* window station flags */
2067 unsigned int access; /* wanted access rights */
2068 unsigned int attributes; /* object attributes */
2069 VARARG(name,unicode_str); /* object name */
2071 obj_handle_t handle; /* handle to the window station */
2075 /* Open a handle to a window station */
2076 @REQ(open_winstation)
2077 unsigned int access; /* wanted access rights */
2078 unsigned int attributes; /* object attributes */
2079 VARARG(name,unicode_str); /* object name */
2081 obj_handle_t handle; /* handle to the window station */
2085 /* Close a window station */
2086 @REQ(close_winstation)
2087 obj_handle_t handle; /* handle to the window station */
2091 /* Get the process current window station */
2092 @REQ(get_process_winstation)
2094 obj_handle_t handle; /* handle to the window station */
2098 /* Set the process current window station */
2099 @REQ(set_process_winstation)
2100 obj_handle_t handle; /* handle to the window station */
2104 /* Create a desktop */
2105 @REQ(create_desktop)
2106 unsigned int flags; /* desktop flags */
2107 unsigned int access; /* wanted access rights */
2108 unsigned int attributes; /* object attributes */
2109 VARARG(name,unicode_str); /* object name */
2111 obj_handle_t handle; /* handle to the desktop */
2115 /* Open a handle to a desktop */
2117 unsigned int flags; /* desktop flags */
2118 unsigned int access; /* wanted access rights */
2119 unsigned int attributes; /* object attributes */
2120 VARARG(name,unicode_str); /* object name */
2122 obj_handle_t handle; /* handle to the desktop */
2126 /* Close a desktop */
2128 obj_handle_t handle; /* handle to the desktop */
2132 /* Get the thread current desktop */
2133 @REQ(get_thread_desktop)
2134 thread_id_t tid; /* thread id */
2136 obj_handle_t handle; /* handle to the desktop */
2140 /* Set the thread current desktop */
2141 @REQ(set_thread_desktop)
2142 obj_handle_t handle; /* handle to the desktop */
2146 /* Get/set information about a user object (window station or desktop) */
2147 @REQ(set_user_object_info)
2148 obj_handle_t handle; /* handle to the object */
2149 unsigned int flags; /* information to set */
2150 unsigned int obj_flags; /* new object flags */
2152 int is_desktop; /* is object a desktop? */
2153 unsigned int old_obj_flags; /* old object flags */
2154 VARARG(name,unicode_str); /* object name */
2156 #define SET_USER_OBJECT_FLAGS 1
2159 /* Attach (or detach) thread inputs */
2160 @REQ(attach_thread_input)
2161 thread_id_t tid_from; /* thread to be attached */
2162 thread_id_t tid_to; /* thread to which tid_from should be attached */
2163 int attach; /* is it an attach? */
2167 /* Get input data for a given thread */
2168 @REQ(get_thread_input)
2169 thread_id_t tid; /* id of thread */
2171 user_handle_t focus; /* handle to the focus window */
2172 user_handle_t capture; /* handle to the capture window */
2173 user_handle_t active; /* handle to the active window */
2174 user_handle_t foreground; /* handle to the global foreground window */
2175 user_handle_t menu_owner; /* handle to the menu owner */
2176 user_handle_t move_size; /* handle to the moving/resizing window */
2177 user_handle_t caret; /* handle to the caret window */
2178 rectangle_t rect; /* caret rectangle */
2182 /* Get the time of the last input event */
2183 @REQ(get_last_input_time)
2189 /* Retrieve queue keyboard state for a given thread */
2191 thread_id_t tid; /* id of thread */
2192 int key; /* optional key code or -1 */
2194 unsigned char state; /* state of specified key */
2195 VARARG(keystate,bytes); /* state array for all the keys */
2198 /* Set queue keyboard state for a given thread */
2200 thread_id_t tid; /* id of thread */
2201 VARARG(keystate,bytes); /* state array for all the keys */
2204 /* Set the system foreground window */
2205 @REQ(set_foreground_window)
2206 user_handle_t handle; /* handle to the foreground window */
2208 user_handle_t previous; /* handle to the previous foreground window */
2209 int send_msg_old; /* whether we have to send a msg to the old window */
2210 int send_msg_new; /* whether we have to send a msg to the new window */
2213 /* Set the current thread focus window */
2214 @REQ(set_focus_window)
2215 user_handle_t handle; /* handle to the focus window */
2217 user_handle_t previous; /* handle to the previous focus window */
2220 /* Set the current thread active window */
2221 @REQ(set_active_window)
2222 user_handle_t handle; /* handle to the active window */
2224 user_handle_t previous; /* handle to the previous active window */
2227 /* Set the current thread capture window */
2228 @REQ(set_capture_window)
2229 user_handle_t handle; /* handle to the capture window */
2230 unsigned int flags; /* capture flags (see below) */
2232 user_handle_t previous; /* handle to the previous capture window */
2233 user_handle_t full_handle; /* full 32-bit handle of new capture window */
2235 #define CAPTURE_MENU 0x01 /* capture is for a menu */
2236 #define CAPTURE_MOVESIZE 0x02 /* capture is for moving/resizing */
2239 /* Set the current thread caret window */
2240 @REQ(set_caret_window)
2241 user_handle_t handle; /* handle to the caret window */
2242 int width; /* caret width */
2243 int height; /* caret height */
2245 user_handle_t previous; /* handle to the previous caret window */
2246 rectangle_t old_rect; /* previous caret rectangle */
2247 int old_hide; /* previous hide count */
2248 int old_state; /* previous caret state (1=on, 0=off) */
2252 /* Set the current thread caret information */
2253 @REQ(set_caret_info)
2254 unsigned int flags; /* caret flags (see below) */
2255 user_handle_t handle; /* handle to the caret window */
2256 int x; /* caret x position */
2257 int y; /* caret y position */
2258 int hide; /* increment for hide count (can be negative to show it) */
2259 int state; /* caret state (1=on, 0=off, -1=toggle current state) */
2261 user_handle_t full_handle; /* handle to the current caret window */
2262 rectangle_t old_rect; /* previous caret rectangle */
2263 int old_hide; /* previous hide count */
2264 int old_state; /* previous caret state (1=on, 0=off) */
2266 #define SET_CARET_POS 0x01 /* set the caret position from x,y */
2267 #define SET_CARET_HIDE 0x02 /* increment the caret hide count */
2268 #define SET_CARET_STATE 0x04 /* set the caret on/off state */
2271 /* Set a window hook */
2273 int id; /* id of the hook */
2274 process_id_t pid; /* id of process to set the hook into */
2275 thread_id_t tid; /* id of thread to set the hook into */
2279 void* proc; /* hook procedure */
2280 int unicode; /* is it a unicode hook? */
2281 VARARG(module,unicode_str); /* module name */
2283 user_handle_t handle; /* handle to the hook */
2284 unsigned int active_hooks; /* active hooks bitmap */
2288 /* Remove a window hook */
2290 user_handle_t handle; /* handle to the hook */
2291 int id; /* id of the hook if handle is 0 */
2292 void* proc; /* hook procedure if handle is 0 */
2294 unsigned int active_hooks; /* active hooks bitmap */
2298 /* Start calling a hook chain */
2299 @REQ(start_hook_chain)
2300 int id; /* id of the hook */
2301 int event; /* signalled event */
2302 user_handle_t window; /* handle to the event window */
2303 int object_id; /* object id for out of context winevent */
2304 int child_id; /* child id for out of context winevent */
2306 user_handle_t handle; /* handle to the next hook */
2307 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2308 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2309 void* proc; /* hook procedure */
2310 int unicode; /* is it a unicode hook? */
2311 unsigned int active_hooks; /* active hooks bitmap */
2312 VARARG(module,unicode_str); /* module name */
2316 /* Finished calling a hook chain */
2317 @REQ(finish_hook_chain)
2318 int id; /* id of the hook */
2322 /* Get the next hook to call */
2324 user_handle_t handle; /* handle to the current hook */
2325 int event; /* signalled event */
2326 user_handle_t window; /* handle to the event window */
2327 int object_id; /* object id for out of context winevent */
2328 int child_id; /* child id for out of context winevent */
2330 user_handle_t next; /* handle to the next hook */
2331 int id; /* id of the next hook */
2332 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2333 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2334 void* proc; /* next hook procedure */
2335 int prev_unicode; /* was the previous a unicode hook? */
2336 int next_unicode; /* is the next a unicode hook? */
2337 VARARG(module,unicode_str); /* module name */
2341 /* Create a window class */
2343 int local; /* is it a local class? */
2344 atom_t atom; /* class atom */
2345 unsigned int style; /* class style */
2346 void* instance; /* module instance */
2347 int extra; /* number of extra class bytes */
2348 int win_extra; /* number of window extra bytes */
2349 void* client_ptr; /* pointer to class in client address space */
2353 /* Destroy a window class */
2355 atom_t atom; /* class atom */
2356 void* instance; /* module instance */
2358 void* client_ptr; /* pointer to class in client address space */
2362 /* Set some information in a class */
2363 @REQ(set_class_info)
2364 user_handle_t window; /* handle to the window */
2365 unsigned int flags; /* flags for info to set (see below) */
2366 atom_t atom; /* class atom */
2367 unsigned int style; /* class style */
2368 int win_extra; /* number of window extra bytes */
2369 void* instance; /* module instance */
2370 int extra_offset; /* offset to set in extra bytes */
2371 size_t extra_size; /* size to set in extra bytes */
2372 unsigned int extra_value; /* value to set in extra bytes */
2374 atom_t old_atom; /* previous class atom */
2375 unsigned int old_style; /* previous class style */
2376 int old_extra; /* previous number of class extra bytes */
2377 int old_win_extra; /* previous number of window extra bytes */
2378 void* old_instance; /* previous module instance */
2379 unsigned int old_extra_value; /* old value in extra bytes */
2381 #define SET_CLASS_ATOM 0x0001
2382 #define SET_CLASS_STYLE 0x0002
2383 #define SET_CLASS_WINEXTRA 0x0004
2384 #define SET_CLASS_INSTANCE 0x0008
2385 #define SET_CLASS_EXTRA 0x0010
2388 /* Set/get clipboard information */
2389 @REQ(set_clipboard_info)
2390 unsigned int flags; /* flags for fields to set (see below) */
2391 user_handle_t clipboard; /* clipboard window */
2392 user_handle_t owner; /* clipboard owner */
2393 user_handle_t viewer; /* first clipboard viewer */
2394 unsigned int seqno; /* change sequence number */
2396 unsigned int flags; /* status flags (see below) */
2397 user_handle_t old_clipboard; /* old clipboard window */
2398 user_handle_t old_owner; /* old clipboard owner */
2399 user_handle_t old_viewer; /* old clipboard viewer */
2400 unsigned int seqno; /* current sequence number */
2403 #define SET_CB_OPEN 0x001
2404 #define SET_CB_OWNER 0x002
2405 #define SET_CB_VIEWER 0x004
2406 #define SET_CB_SEQNO 0x008
2407 #define SET_CB_RELOWNER 0x010
2408 #define SET_CB_CLOSE 0x020
2409 #define CB_OPEN 0x040
2410 #define CB_OWNER 0x080
2411 #define CB_PROCESS 0x100
2414 /* Open a security token */
2416 obj_handle_t handle; /* handle to the thread or process */
2417 unsigned int access; /* access rights to the new token */
2418 unsigned int attributes;/* object attributes */
2419 unsigned int flags; /* flags (see below) */
2421 obj_handle_t token; /* handle to the token */
2423 #define OPEN_TOKEN_THREAD 1
2424 #define OPEN_TOKEN_AS_SELF 2
2427 /* Set/get the global windows */
2428 @REQ(set_global_windows)
2429 unsigned int flags; /* flags for fields to set (see below) */
2430 user_handle_t shell_window; /* handle to the new shell window */
2431 user_handle_t shell_listview; /* handle to the new shell listview window */
2432 user_handle_t progman_window; /* handle to the new program manager window */
2433 user_handle_t taskman_window; /* handle to the new task manager window */
2435 user_handle_t old_shell_window; /* handle to the shell window */
2436 user_handle_t old_shell_listview; /* handle to the shell listview window */
2437 user_handle_t old_progman_window; /* handle to the new program manager window */
2438 user_handle_t old_taskman_window; /* handle to the new task manager window */
2440 #define SET_GLOBAL_SHELL_WINDOWS 0x01 /* set both main shell and listview windows */
2441 #define SET_GLOBAL_PROGMAN_WINDOW 0x02
2442 #define SET_GLOBAL_TASKMAN_WINDOW 0x04
2444 /* Adjust the privileges held by a token */
2445 @REQ(adjust_token_privileges)
2446 obj_handle_t handle; /* handle to the token */
2447 int disable_all; /* disable all privileges? */
2448 int get_modified_state; /* get modified privileges? */
2449 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to enable/disable/remove */
2451 unsigned int len; /* total length in bytes required to store token privileges */
2452 VARARG(privileges,LUID_AND_ATTRIBUTES); /* modified privileges */
2455 /* Retrieves the set of privileges held by or available to a token */
2456 @REQ(get_token_privileges)
2457 obj_handle_t handle; /* handle to the token */
2459 unsigned int len; /* total length in bytes required to store token privileges */
2460 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
2463 /* Check the token has the required privileges */
2464 @REQ(check_token_privileges)
2465 obj_handle_t handle; /* handle to the token */
2466 int all_required; /* are all the privileges required for the check to succeed? */
2467 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to check */
2469 int has_privileges; /* does the token have the required privileges? */
2470 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
2473 @REQ(duplicate_token)
2474 obj_handle_t handle; /* handle to the token to duplicate */
2475 unsigned int access; /* access rights to the new token */
2476 unsigned int attributes; /* object attributes */
2477 int primary; /* is the new token to be a primary one? */
2478 int impersonation_level; /* impersonation level of the new token */
2480 obj_handle_t new_handle; /* duplicated handle */
2484 obj_handle_t handle; /* handle to the token */
2485 unsigned int desired_access; /* desired access to the object */
2486 unsigned int mapping_read; /* mapping from generic read to specific rights */
2487 unsigned int mapping_write; /* mapping from generic write to specific rights */
2488 unsigned int mapping_execute; /* mapping from generic execute to specific rights */
2489 unsigned int mapping_all; /* mapping from generic all to specific rights */
2490 VARARG(sd,security_descriptor); /* security descriptor to check */
2492 unsigned int access_granted; /* access rights actually granted */
2493 unsigned int access_status; /* was access granted? */
2494 unsigned int privileges_len; /* length needed to store privileges */
2495 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges used during access check */
2498 @REQ(get_token_user)
2499 obj_handle_t handle; /* handle to the token */
2501 size_t user_len; /* length needed to store user */
2502 VARARG(user,SID); /* sid of the user the token represents */
2505 /* Create a mailslot */
2506 @REQ(create_mailslot)
2507 unsigned int access; /* wanted access rights */
2508 unsigned int attributes; /* object attributes */
2509 obj_handle_t rootdir; /* root directory */
2510 unsigned int max_msgsize;
2512 VARARG(name,unicode_str); /* mailslot name */
2514 obj_handle_t handle; /* handle to the mailslot */
2518 /* Open an existing mailslot */
2520 unsigned int access;
2521 unsigned int attributes; /* object attributes */
2522 obj_handle_t rootdir; /* root directory */
2523 unsigned int sharing; /* sharing mode */
2524 VARARG(name,unicode_str); /* mailslot name */
2526 obj_handle_t handle; /* handle to the mailslot */
2530 /* Set mailslot information */
2531 @REQ(set_mailslot_info)
2532 obj_handle_t handle; /* handle to the mailslot */
2536 unsigned int max_msgsize;
2538 unsigned int msg_count;
2539 unsigned int next_msgsize;
2541 #define MAILSLOT_SET_READ_TIMEOUT 1
2544 /* Create a directory object */
2545 @REQ(create_directory)
2546 unsigned int access; /* access flags */
2547 unsigned int attributes; /* object attributes */
2548 obj_handle_t rootdir; /* root directory */
2549 VARARG(directory_name,unicode_str); /* Directory name */
2551 obj_handle_t handle; /* handle to the directory */
2555 /* Open a directory object */
2556 @REQ(open_directory)
2557 unsigned int access; /* access flags */
2558 unsigned int attributes; /* object attributes */
2559 obj_handle_t rootdir; /* root directory */
2560 VARARG(directory_name,unicode_str); /* Directory name */
2562 obj_handle_t handle; /* handle to the directory */
2566 /* Create a symbolic link object */
2567 @REQ(create_symlink)
2568 unsigned int access; /* access flags */
2569 unsigned int attributes; /* object attributes */
2570 obj_handle_t rootdir; /* root directory */
2571 size_t name_len; /* length of the symlink name in bytes */
2572 VARARG(name,unicode_str,name_len); /* symlink name */
2573 VARARG(target_name,unicode_str); /* target name */
2575 obj_handle_t handle; /* handle to the symlink */
2579 /* Open a symbolic link object */
2581 unsigned int access; /* access flags */
2582 unsigned int attributes; /* object attributes */
2583 obj_handle_t rootdir; /* root directory */
2584 VARARG(name,unicode_str); /* symlink name */
2586 obj_handle_t handle; /* handle to the symlink */
2590 /* Query a symbolic link object */
2592 obj_handle_t handle; /* handle to the symlink */
2594 VARARG(target_name,unicode_str); /* target name */