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); */
199 /* unsigned int attributes[count]; */
200 /* VARARGS(sids,SID); */
203 /****************************************************************/
204 /* Request declarations */
206 /* Create a new process from the context of the parent */
208 int inherit_all; /* inherit all handles from parent */
209 unsigned int create_flags; /* creation flags */
210 int unix_pid; /* Unix pid of new process */
211 obj_handle_t exe_file; /* file handle for main exe */
212 obj_handle_t hstdin; /* handle for stdin */
213 obj_handle_t hstdout; /* handle for stdout */
214 obj_handle_t hstderr; /* handle for stderr */
215 VARARG(info,startup_info); /* startup information */
216 VARARG(env,unicode_str); /* environment for new process */
218 obj_handle_t info; /* new process info handle */
222 /* Retrieve information about a newly started process */
223 @REQ(get_new_process_info)
224 obj_handle_t info; /* info handle returned from new_process_request */
225 unsigned int process_access; /* access rights for process object */
226 unsigned int process_attr; /* attributes for process object */
227 unsigned int thread_access; /* access rights for thread object */
228 unsigned int thread_attr; /* attributes for thread object */
230 process_id_t pid; /* process id */
231 obj_handle_t phandle; /* process handle (in the current process) */
232 thread_id_t tid; /* thread id */
233 obj_handle_t thandle; /* thread handle (in the current process) */
234 int success; /* did the process start successfully? */
238 /* Create a new thread from the context of the parent */
240 unsigned int access; /* wanted access rights */
241 unsigned int attributes; /* object attributes */
242 int suspend; /* new thread should be suspended on creation */
243 int request_fd; /* fd for request pipe */
245 thread_id_t tid; /* thread id */
246 obj_handle_t handle; /* thread handle (in the current process) */
250 /* Retrieve the new process startup info */
251 @REQ(get_startup_info)
253 obj_handle_t exe_file; /* file handle for main exe */
254 obj_handle_t hstdin; /* handle for stdin */
255 obj_handle_t hstdout; /* handle for stdout */
256 obj_handle_t hstderr; /* handle for stderr */
257 VARARG(info,startup_info); /* startup information */
258 VARARG(env,unicode_str); /* environment */
262 /* Signal the end of the process initialization */
263 @REQ(init_process_done)
264 void* module; /* main module base address */
265 void* entry; /* process entry point */
266 int gui; /* is it a GUI process? */
270 /* Initialize a thread; called from the child after fork()/clone() */
272 int unix_pid; /* Unix pid of new thread */
273 int unix_tid; /* Unix tid of new thread */
274 void* teb; /* TEB of new thread (in thread address space) */
275 void* peb; /* address of PEB (in thread address space) */
276 void* entry; /* thread entry point (in thread address space) */
277 void* ldt_copy; /* address of LDT copy (in thread address space) */
278 int reply_fd; /* fd for reply pipe */
279 int wait_fd; /* fd for blocking calls pipe */
280 int debug_level; /* new debug level */
282 process_id_t pid; /* process id of the new thread's process */
283 thread_id_t tid; /* thread id of the new thread */
284 size_t info_size; /* total size of startup info */
285 time_t server_start; /* server start time */
286 int version; /* protocol version */
290 /* Terminate a process */
291 @REQ(terminate_process)
292 obj_handle_t handle; /* process handle to terminate */
293 int exit_code; /* process exit code */
295 int self; /* suicide? */
299 /* Terminate a thread */
300 @REQ(terminate_thread)
301 obj_handle_t handle; /* thread handle to terminate */
302 int exit_code; /* thread exit code */
304 int self; /* suicide? */
305 int last; /* last thread in this process? */
309 /* Retrieve information about a process */
310 @REQ(get_process_info)
311 obj_handle_t handle; /* process handle */
313 process_id_t pid; /* server process id */
314 process_id_t ppid; /* server process id of parent */
315 int exit_code; /* process exit code */
316 int priority; /* priority class */
317 int affinity; /* process affinity mask */
318 void* peb; /* PEB address in process address space */
322 /* Set a process informations */
323 @REQ(set_process_info)
324 obj_handle_t handle; /* process handle */
325 int mask; /* setting mask (see below) */
326 int priority; /* priority class */
327 int affinity; /* affinity mask */
329 #define SET_PROCESS_INFO_PRIORITY 0x01
330 #define SET_PROCESS_INFO_AFFINITY 0x02
333 /* Retrieve information about a thread */
334 @REQ(get_thread_info)
335 obj_handle_t handle; /* thread handle */
336 thread_id_t tid_in; /* thread id (optional) */
338 process_id_t pid; /* server process id */
339 thread_id_t tid; /* server thread id */
340 void* teb; /* thread teb pointer */
341 int exit_code; /* thread exit code */
342 int priority; /* thread priority level */
343 int affinity; /* thread affinity mask */
344 time_t creation_time; /* thread creation time */
345 time_t exit_time; /* thread exit time */
349 /* Set a thread informations */
350 @REQ(set_thread_info)
351 obj_handle_t handle; /* thread handle */
352 int mask; /* setting mask (see below) */
353 int priority; /* priority class */
354 int affinity; /* affinity mask */
355 obj_handle_t token; /* impersonation token */
357 #define SET_THREAD_INFO_PRIORITY 0x01
358 #define SET_THREAD_INFO_AFFINITY 0x02
359 #define SET_THREAD_INFO_TOKEN 0x04
362 /* Retrieve information about a module */
364 obj_handle_t handle; /* process handle */
365 void* base_address; /* base address of module */
367 size_t size; /* module size */
369 VARARG(filename,unicode_str); /* file name of module */
373 /* Suspend a thread */
375 obj_handle_t handle; /* thread handle */
377 int count; /* new suspend count */
381 /* Resume a thread */
383 obj_handle_t handle; /* thread handle */
385 int count; /* new suspend count */
389 /* Notify the server that a dll has been loaded */
391 obj_handle_t handle; /* file handle */
392 void* base; /* base address */
393 size_t size; /* dll size */
394 int dbg_offset; /* debug info offset */
395 int dbg_size; /* debug info size */
396 void* name; /* ptr to ptr to name (in process addr space) */
397 VARARG(filename,unicode_str); /* file name of dll */
401 /* Notify the server that a dll is being unloaded */
403 void* base; /* base address */
407 /* Queue an APC for a thread */
409 obj_handle_t handle; /* thread handle */
410 int user; /* user or system apc? */
411 void* func; /* function to call */
412 void* arg1; /* params for function to call */
418 /* Get next APC to call */
420 int alertable; /* is thread alertable? */
422 void* func; /* function to call */
423 int type; /* function type */
424 void* arg1; /* function arguments */
428 enum apc_type { APC_NONE, APC_USER, APC_TIMER, APC_ASYNC_IO };
431 /* Close a handle for the current process */
433 obj_handle_t handle; /* handle to close */
435 int fd; /* associated fd to close */
439 /* Set a handle information */
440 @REQ(set_handle_info)
441 obj_handle_t handle; /* handle we are interested in */
442 int flags; /* new handle flags */
443 int mask; /* mask for flags to set */
445 int old_flags; /* old flag value */
449 /* Duplicate a handle */
451 obj_handle_t src_process; /* src process handle */
452 obj_handle_t src_handle; /* src handle to duplicate */
453 obj_handle_t dst_process; /* dst process handle */
454 unsigned int access; /* wanted access rights */
455 unsigned int attributes; /* object attributes */
456 unsigned int options; /* duplicate options (see below) */
458 obj_handle_t handle; /* duplicated handle in dst process */
459 int fd; /* associated fd to close */
461 #define DUP_HANDLE_CLOSE_SOURCE DUPLICATE_CLOSE_SOURCE
462 #define DUP_HANDLE_SAME_ACCESS DUPLICATE_SAME_ACCESS
463 #define DUP_HANDLE_MAKE_GLOBAL 0x80000000 /* Not a Windows flag */
466 /* Open a handle to a process */
468 process_id_t pid; /* process id to open */
469 unsigned int access; /* wanted access rights */
470 unsigned int attributes; /* object attributes */
472 obj_handle_t handle; /* handle to the process */
476 /* Open a handle to a thread */
478 thread_id_t tid; /* thread id to open */
479 unsigned int access; /* wanted access rights */
480 unsigned int attributes; /* object attributes */
482 obj_handle_t handle; /* handle to the thread */
486 /* Wait for handles */
488 int flags; /* wait flags (see below) */
489 void* cookie; /* magic cookie to return to client */
490 obj_handle_t signal; /* object to signal (0 if none) */
491 abs_time_t timeout; /* absolute timeout */
492 VARARG(handles,handles); /* handles to select on */
495 #define SELECT_ALERTABLE 2
496 #define SELECT_INTERRUPTIBLE 4
497 #define SELECT_TIMEOUT 8
500 /* Create an event */
502 unsigned int access; /* wanted access rights */
503 unsigned int attributes; /* object attributes */
504 obj_handle_t rootdir; /* root directory */
505 int manual_reset; /* manual reset event */
506 int initial_state; /* initial state of the event */
507 VARARG(name,unicode_str); /* object name */
509 obj_handle_t handle; /* handle to the event */
512 /* Event operation */
514 obj_handle_t handle; /* handle to event */
515 int op; /* event operation (see below) */
517 enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT };
522 unsigned int access; /* wanted access rights */
523 unsigned int attributes; /* object attributes */
524 obj_handle_t rootdir; /* root directory */
525 VARARG(name,unicode_str); /* object name */
527 obj_handle_t handle; /* handle to the event */
533 unsigned int access; /* wanted access rights */
534 unsigned int attributes; /* object attributes */
535 obj_handle_t rootdir; /* root directory */
536 int owned; /* initially owned? */
537 VARARG(name,unicode_str); /* object name */
539 obj_handle_t handle; /* handle to the mutex */
543 /* Release a mutex */
545 obj_handle_t handle; /* handle to the mutex */
547 unsigned int prev_count; /* value of internal counter, before release */
553 unsigned int access; /* wanted access rights */
554 unsigned int attributes; /* object attributes */
555 obj_handle_t rootdir; /* root directory */
556 VARARG(name,unicode_str); /* object name */
558 obj_handle_t handle; /* handle to the mutex */
562 /* Create a semaphore */
563 @REQ(create_semaphore)
564 unsigned int access; /* wanted access rights */
565 unsigned int attributes; /* object attributes */
566 obj_handle_t rootdir; /* root directory */
567 unsigned int initial; /* initial count */
568 unsigned int max; /* maximum count */
569 VARARG(name,unicode_str); /* object name */
571 obj_handle_t handle; /* handle to the semaphore */
575 /* Release a semaphore */
576 @REQ(release_semaphore)
577 obj_handle_t handle; /* handle to the semaphore */
578 unsigned int count; /* count to add to semaphore */
580 unsigned int prev_count; /* previous semaphore count */
584 /* Open a semaphore */
586 unsigned int access; /* wanted access rights */
587 unsigned int attributes; /* object attributes */
588 obj_handle_t rootdir; /* root directory */
589 VARARG(name,unicode_str); /* object name */
591 obj_handle_t handle; /* handle to the semaphore */
597 unsigned int access; /* wanted access rights */
598 unsigned int attributes; /* object attributes */
599 unsigned int sharing; /* sharing flags */
600 int create; /* file create action */
601 unsigned int options; /* file options */
602 unsigned int attrs; /* file attributes for creation */
603 VARARG(filename,string); /* file name */
605 obj_handle_t handle; /* handle to the file */
609 /* Open a file object */
610 @REQ(open_file_object)
611 unsigned int access; /* wanted access rights */
612 unsigned int attributes; /* open attributes */
613 obj_handle_t rootdir; /* root directory */
614 unsigned int sharing; /* sharing flags */
615 VARARG(filename,unicode_str); /* file name */
617 obj_handle_t handle; /* handle to the file */
621 /* Allocate a file handle for a Unix fd */
622 @REQ(alloc_file_handle)
623 unsigned int access; /* wanted access rights */
624 unsigned int attributes; /* object attributes */
625 int fd; /* file descriptor on the client side */
627 obj_handle_t handle; /* handle to the file */
631 /* Get a Unix fd to access a file */
633 obj_handle_t handle; /* handle to the file */
634 unsigned int access; /* wanted access rights */
636 int fd; /* file descriptor */
637 int removable; /* is device removable? (-1 if unknown) */
638 int flags; /* file read/write flags (see below) */
640 #define FD_FLAG_OVERLAPPED 0x01 /* fd opened in overlapped mode */
641 #define FD_FLAG_TIMEOUT 0x02 /* read/write is synchronous */
642 #define FD_FLAG_RECV_SHUTDOWN 0x04
643 #define FD_FLAG_SEND_SHUTDOWN 0x08
644 #define FD_FLAG_AVAILABLE 0x10 /* in overlap read/write operation,
645 * only handle available data (don't wait) */
647 /* Set the cached file descriptor of a handle */
649 obj_handle_t handle; /* handle we are interested in */
650 int fd; /* file descriptor */
651 int removable; /* is device removable? (-1 if unknown) */
653 int cur_fd; /* current file descriptor */
657 /* Flush a file buffers */
659 obj_handle_t handle; /* handle to the file */
661 obj_handle_t event; /* event set when finished */
665 /* Lock a region of a file */
667 obj_handle_t handle; /* handle to the file */
668 unsigned int offset_low; /* offset of start of lock */
669 unsigned int offset_high; /* offset of start of lock */
670 unsigned int count_low; /* count of bytes to lock */
671 unsigned int count_high; /* count of bytes to lock */
672 int shared; /* shared or exclusive lock? */
673 int wait; /* do we want to wait? */
675 obj_handle_t handle; /* handle to wait on */
676 int overlapped; /* is it an overlapped I/O handle? */
680 /* Unlock a region of a file */
682 obj_handle_t handle; /* handle to the file */
683 unsigned int offset_low; /* offset of start of unlock */
684 unsigned int offset_high; /* offset of start of unlock */
685 unsigned int count_low; /* count of bytes to unlock */
686 unsigned int count_high; /* count of bytes to unlock */
690 /* Get ready to unmount a Unix device */
692 obj_handle_t handle; /* handle to a file on the device */
696 /* Create a socket */
698 unsigned int access; /* wanted access rights */
699 unsigned int attributes; /* object attributes */
700 int family; /* family, see socket manpage */
701 int type; /* type, see socket manpage */
702 int protocol; /* protocol, see socket manpage */
703 unsigned int flags; /* socket flags */
705 obj_handle_t handle; /* handle to the new socket */
709 /* Accept a socket */
711 obj_handle_t lhandle; /* handle to the listening socket */
712 unsigned int access; /* wanted access rights */
713 unsigned int attributes; /* object attributes */
715 obj_handle_t handle; /* handle to the new socket */
719 /* Set socket event parameters */
720 @REQ(set_socket_event)
721 obj_handle_t handle; /* handle to the socket */
722 unsigned int mask; /* event mask */
723 obj_handle_t event; /* event object */
724 user_handle_t window; /* window to send the message to */
725 unsigned int msg; /* message to send */
729 /* Get socket event parameters */
730 @REQ(get_socket_event)
731 obj_handle_t handle; /* handle to the socket */
732 int service; /* clear pending? */
733 obj_handle_t c_event; /* event to clear */
735 unsigned int mask; /* event mask */
736 unsigned int pmask; /* pending events */
737 unsigned int state; /* status bits */
738 VARARG(errors,ints); /* event errors */
742 /* Reenable pending socket events */
743 @REQ(enable_socket_event)
744 obj_handle_t handle; /* handle to the socket */
745 unsigned int mask; /* events to re-enable */
746 unsigned int sstate; /* status bits to set */
747 unsigned int cstate; /* status bits to clear */
750 @REQ(set_socket_deferred)
751 obj_handle_t handle; /* handle to the socket */
752 obj_handle_t deferred; /* handle to the socket for which accept() is deferred */
755 /* Allocate a console (only used by a console renderer) */
757 unsigned int access; /* wanted access rights */
758 unsigned int attributes; /* object attributes */
759 process_id_t pid; /* pid of process which shall be attached to the console */
761 obj_handle_t handle_in; /* handle to console input */
762 obj_handle_t event; /* handle to renderer events change notification */
766 /* Free the console of the current process */
771 #define CONSOLE_RENDERER_NONE_EVENT 0x00
772 #define CONSOLE_RENDERER_TITLE_EVENT 0x01
773 #define CONSOLE_RENDERER_ACTIVE_SB_EVENT 0x02
774 #define CONSOLE_RENDERER_SB_RESIZE_EVENT 0x03
775 #define CONSOLE_RENDERER_UPDATE_EVENT 0x04
776 #define CONSOLE_RENDERER_CURSOR_POS_EVENT 0x05
777 #define CONSOLE_RENDERER_CURSOR_GEOM_EVENT 0x06
778 #define CONSOLE_RENDERER_DISPLAY_EVENT 0x07
779 #define CONSOLE_RENDERER_EXIT_EVENT 0x08
780 struct console_renderer_event
815 /* retrieve console events for the renderer */
816 @REQ(get_console_renderer_events)
817 obj_handle_t handle; /* handle to console input events */
819 VARARG(data,bytes); /* the various console_renderer_events */
823 /* Open a handle to the process console */
825 int from; /* 0 (resp 1) input (resp output) of current process console */
826 /* otherwise console_in handle to get active screen buffer? */
827 unsigned int access; /* wanted access rights */
828 unsigned int attributes; /* object attributes */
829 int share; /* share mask (only for output handles) */
831 obj_handle_t handle; /* handle to the console */
835 /* Get the input queue wait event */
836 @REQ(get_console_wait_event)
841 /* Get a console mode (input or output) */
842 @REQ(get_console_mode)
843 obj_handle_t handle; /* handle to the console */
845 int mode; /* console mode */
849 /* Set a console mode (input or output) */
850 @REQ(set_console_mode)
851 obj_handle_t handle; /* handle to the console */
852 int mode; /* console mode */
856 /* Set info about a console (input only) */
857 @REQ(set_console_input_info)
858 obj_handle_t handle; /* handle to console input, or 0 for process' console */
859 int mask; /* setting mask (see below) */
860 obj_handle_t active_sb; /* active screen buffer */
861 int history_mode; /* whether we duplicate lines in history */
862 int history_size; /* number of lines in history */
863 int edition_mode; /* index to the edition mode flavors */
864 VARARG(title,unicode_str); /* console title */
866 #define SET_CONSOLE_INPUT_INFO_ACTIVE_SB 0x01
867 #define SET_CONSOLE_INPUT_INFO_TITLE 0x02
868 #define SET_CONSOLE_INPUT_INFO_HISTORY_MODE 0x04
869 #define SET_CONSOLE_INPUT_INFO_HISTORY_SIZE 0x08
870 #define SET_CONSOLE_INPUT_INFO_EDITION_MODE 0x10
873 /* Get info about a console (input only) */
874 @REQ(get_console_input_info)
875 obj_handle_t handle; /* handle to console input, or 0 for process' console */
877 int history_mode; /* whether we duplicate lines in history */
878 int history_size; /* number of lines in history */
879 int history_index; /* number of used lines in history */
880 int edition_mode; /* index to the edition mode flavors */
881 VARARG(title,unicode_str); /* console title */
885 /* appends a string to console's history */
886 @REQ(append_console_input_history)
887 obj_handle_t handle; /* handle to console input, or 0 for process' console */
888 VARARG(line,unicode_str); /* line to add */
892 /* appends a string to console's history */
893 @REQ(get_console_input_history)
894 obj_handle_t handle; /* handle to console input, or 0 for process' console */
895 int index; /* index to get line from */
897 int total; /* total length of line in Unicode chars */
898 VARARG(line,unicode_str); /* line to add */
902 /* creates a new screen buffer on process' console */
903 @REQ(create_console_output)
904 obj_handle_t handle_in; /* handle to console input, or 0 for process' console */
905 unsigned int access; /* wanted access rights */
906 unsigned int attributes; /* object attributes */
907 unsigned int share; /* sharing credentials */
909 obj_handle_t handle_out; /* handle to the screen buffer */
913 /* Set info about a console (output only) */
914 @REQ(set_console_output_info)
915 obj_handle_t handle; /* handle to the console */
916 int mask; /* setting mask (see below) */
917 short int cursor_size; /* size of cursor (percentage filled) */
918 short int cursor_visible;/* cursor visibility flag */
919 short int cursor_x; /* position of cursor (x, y) */
921 short int width; /* width of the screen buffer */
922 short int height; /* height of the screen buffer */
923 short int attr; /* default attribute */
924 short int win_left; /* window actually displayed by renderer */
925 short int win_top; /* the rect area is expressed withing the */
926 short int win_right; /* boundaries of the screen buffer */
927 short int win_bottom;
928 short int max_width; /* maximum size (width x height) for the window */
929 short int max_height;
931 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_GEOM 0x01
932 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_POS 0x02
933 #define SET_CONSOLE_OUTPUT_INFO_SIZE 0x04
934 #define SET_CONSOLE_OUTPUT_INFO_ATTR 0x08
935 #define SET_CONSOLE_OUTPUT_INFO_DISPLAY_WINDOW 0x10
936 #define SET_CONSOLE_OUTPUT_INFO_MAX_SIZE 0x20
939 /* Get info about a console (output only) */
940 @REQ(get_console_output_info)
941 obj_handle_t handle; /* handle to the console */
943 short int cursor_size; /* size of cursor (percentage filled) */
944 short int cursor_visible;/* cursor visibility flag */
945 short int cursor_x; /* position of cursor (x, y) */
947 short int width; /* width of the screen buffer */
948 short int height; /* height of the screen buffer */
949 short int attr; /* default attribute */
950 short int win_left; /* window actually displayed by renderer */
951 short int win_top; /* the rect area is expressed withing the */
952 short int win_right; /* boundaries of the screen buffer */
953 short int win_bottom;
954 short int max_width; /* maximum size (width x height) for the window */
955 short int max_height;
958 /* Add input records to a console input queue */
959 @REQ(write_console_input)
960 obj_handle_t handle; /* handle to the console input */
961 VARARG(rec,input_records); /* input records */
963 int written; /* number of records written */
967 /* Fetch input records from a console input queue */
968 @REQ(read_console_input)
969 obj_handle_t handle; /* handle to the console input */
970 int flush; /* flush the retrieved records from the queue? */
972 int read; /* number of records read */
973 VARARG(rec,input_records); /* input records */
977 /* write data (chars and/or attributes) in a screen buffer */
978 @REQ(write_console_output)
979 obj_handle_t handle; /* handle to the console output */
980 int x; /* position where to start writing */
982 int mode; /* char info (see below) */
983 int wrap; /* wrap around at end of line? */
984 VARARG(data,bytes); /* info to write */
986 int written; /* number of char infos actually written */
987 int width; /* width of screen buffer */
988 int height; /* height of screen buffer */
992 CHAR_INFO_MODE_TEXT, /* characters only */
993 CHAR_INFO_MODE_ATTR, /* attributes only */
994 CHAR_INFO_MODE_TEXTATTR, /* both characters and attributes */
995 CHAR_INFO_MODE_TEXTSTDATTR /* characters but use standard attributes */
999 /* fill a screen buffer with constant data (chars and/or attributes) */
1000 @REQ(fill_console_output)
1001 obj_handle_t handle; /* handle to the console output */
1002 int x; /* position where to start writing */
1004 int mode; /* char info mode */
1005 int count; /* number to write */
1006 int wrap; /* wrap around at end of line? */
1007 char_info_t data; /* data to write */
1009 int written; /* number of char infos actually written */
1013 /* read data (chars and/or attributes) from a screen buffer */
1014 @REQ(read_console_output)
1015 obj_handle_t handle; /* handle to the console output */
1016 int x; /* position (x,y) where to start reading */
1018 int mode; /* char info mode */
1019 int wrap; /* wrap around at end of line? */
1021 int width; /* width of screen buffer */
1022 int height; /* height of screen buffer */
1027 /* move a rect (of data) in screen buffer content */
1028 @REQ(move_console_output)
1029 obj_handle_t handle; /* handle to the console output */
1030 short int x_src; /* position (x, y) of rect to start moving from */
1032 short int x_dst; /* position (x, y) of rect to move to */
1034 short int w; /* size of the rect (width, height) to move */
1039 /* Sends a signal to a process group */
1040 @REQ(send_console_signal)
1041 int signal; /* the signal to send */
1042 process_id_t group_id; /* the group to send the signal to */
1046 /* enable directory change notifications */
1047 @REQ(read_directory_changes)
1048 obj_handle_t handle; /* handle to the directory */
1049 obj_handle_t event; /* handle to the event */
1050 unsigned int filter; /* notification filter */
1051 int subtree; /* watch the subtree? */
1052 int want_data; /* flag indicating whether change data should be collected */
1053 void* io_apc; /* APC routine to queue upon end of async */
1054 void* io_sb; /* I/O status block (unique across all async on this handle) */
1055 void* io_user; /* data to pass back to caller */
1060 obj_handle_t handle;
1062 int action; /* type of change */
1063 VARARG(name,string); /* name of directory entry that changed */
1067 /* Create a file mapping */
1068 @REQ(create_mapping)
1069 unsigned int access; /* wanted access rights */
1070 unsigned int attributes; /* object attributes */
1071 obj_handle_t rootdir; /* root directory */
1072 int size_high; /* mapping size */
1073 int size_low; /* mapping size */
1074 int protect; /* protection flags (see below) */
1075 obj_handle_t file_handle; /* file handle */
1076 VARARG(name,unicode_str); /* object name */
1078 obj_handle_t handle; /* handle to the mapping */
1080 /* protection flags */
1081 #define VPROT_READ 0x01
1082 #define VPROT_WRITE 0x02
1083 #define VPROT_EXEC 0x04
1084 #define VPROT_WRITECOPY 0x08
1085 #define VPROT_GUARD 0x10
1086 #define VPROT_NOCACHE 0x20
1087 #define VPROT_COMMITTED 0x40
1088 #define VPROT_IMAGE 0x80
1091 /* Open a mapping */
1093 unsigned int access; /* wanted access rights */
1094 unsigned int attributes; /* object attributes */
1095 obj_handle_t rootdir; /* root directory */
1096 VARARG(name,unicode_str); /* object name */
1098 obj_handle_t handle; /* handle to the mapping */
1102 /* Get information about a file mapping */
1103 @REQ(get_mapping_info)
1104 obj_handle_t handle; /* handle to the mapping */
1106 int size_high; /* mapping size */
1107 int size_low; /* mapping size */
1108 int protect; /* protection flags */
1109 int header_size; /* header size (for VPROT_IMAGE mapping) */
1110 void* base; /* default base addr (for VPROT_IMAGE mapping) */
1111 obj_handle_t shared_file; /* shared mapping file handle */
1112 int shared_size; /* shared mapping size */
1116 #define SNAP_HEAPLIST 0x00000001
1117 #define SNAP_PROCESS 0x00000002
1118 #define SNAP_THREAD 0x00000004
1119 #define SNAP_MODULE 0x00000008
1120 /* Create a snapshot */
1121 @REQ(create_snapshot)
1122 unsigned int attributes; /* object attributes */
1123 int flags; /* snapshot flags (SNAP_*) */
1124 process_id_t pid; /* process id */
1126 obj_handle_t handle; /* handle to the snapshot */
1130 /* Get the next process from a snapshot */
1132 obj_handle_t handle; /* handle to the snapshot */
1133 int reset; /* reset snapshot position? */
1135 int count; /* process usage count */
1136 process_id_t pid; /* process id */
1137 process_id_t ppid; /* parent process id */
1138 void* heap; /* heap base */
1139 void* module; /* main module */
1140 int threads; /* number of threads */
1141 int priority; /* process priority */
1142 int handles; /* number of handles */
1143 VARARG(filename,unicode_str); /* file name of main exe */
1147 /* Get the next thread from a snapshot */
1149 obj_handle_t handle; /* handle to the snapshot */
1150 int reset; /* reset snapshot position? */
1152 int count; /* thread usage count */
1153 process_id_t pid; /* process id */
1154 thread_id_t tid; /* thread id */
1155 int base_pri; /* base priority */
1156 int delta_pri; /* delta priority */
1160 /* Get the next module from a snapshot */
1162 obj_handle_t handle; /* handle to the snapshot */
1163 int reset; /* reset snapshot position? */
1165 process_id_t pid; /* process id */
1166 void* base; /* module base address */
1167 size_t size; /* module size */
1168 VARARG(filename,unicode_str); /* file name of module */
1172 /* Wait for a debug event */
1173 @REQ(wait_debug_event)
1174 int get_handle; /* should we alloc a handle for waiting? */
1176 process_id_t pid; /* process id */
1177 thread_id_t tid; /* thread id */
1178 obj_handle_t wait; /* wait handle if no event ready */
1179 VARARG(event,debug_event); /* debug event data */
1183 /* Queue an exception event */
1184 @REQ(queue_exception_event)
1185 int first; /* first chance exception? */
1186 VARARG(record,exc_event); /* thread context followed by exception record */
1188 obj_handle_t handle; /* handle to the queued event */
1192 /* Retrieve the status of an exception event */
1193 @REQ(get_exception_status)
1194 obj_handle_t handle; /* handle to the queued event */
1196 VARARG(context,context); /* modified thread context */
1200 /* Send an output string to the debugger */
1201 @REQ(output_debug_string)
1202 void* string; /* string to display (in debugged process address space) */
1203 int unicode; /* is it Unicode? */
1204 int length; /* string length */
1208 /* Continue a debug event */
1209 @REQ(continue_debug_event)
1210 process_id_t pid; /* process id to continue */
1211 thread_id_t tid; /* thread id to continue */
1212 int status; /* continuation status */
1216 /* Start/stop debugging an existing process */
1218 process_id_t pid; /* id of the process to debug */
1219 int attach; /* 1=attaching / 0=detaching from the process */
1223 /* Simulate a breakpoint in a process */
1225 obj_handle_t handle; /* process handle */
1227 int self; /* was it the caller itself? */
1231 /* Set debugger kill on exit flag */
1232 @REQ(set_debugger_kill_on_exit)
1233 int kill_on_exit; /* 0=detach/1=kill debuggee when debugger dies */
1237 /* Read data from a process address space */
1238 @REQ(read_process_memory)
1239 obj_handle_t handle; /* process handle */
1240 void* addr; /* addr to read from */
1242 VARARG(data,bytes); /* result data */
1246 /* Write data to a process address space */
1247 @REQ(write_process_memory)
1248 obj_handle_t handle; /* process handle */
1249 void* addr; /* addr to write to */
1250 VARARG(data,bytes); /* data to write */
1254 /* Create a registry key */
1256 obj_handle_t parent; /* handle to the parent key */
1257 unsigned int access; /* desired access rights */
1258 unsigned int attributes; /* object attributes */
1259 unsigned int options; /* creation options */
1260 time_t modif; /* last modification time */
1261 size_t namelen; /* length of key name in bytes */
1262 VARARG(name,unicode_str,namelen); /* key name */
1263 VARARG(class,unicode_str); /* class name */
1265 obj_handle_t hkey; /* handle to the created key */
1266 int created; /* has it been newly created? */
1269 /* Open a registry key */
1271 obj_handle_t parent; /* handle to the parent key */
1272 unsigned int access; /* desired access rights */
1273 unsigned int attributes; /* object attributes */
1274 VARARG(name,unicode_str); /* key name */
1276 obj_handle_t hkey; /* handle to the open key */
1280 /* Delete a registry key */
1282 obj_handle_t hkey; /* handle to the key */
1286 /* Flush a registry key */
1288 obj_handle_t hkey; /* handle to the key */
1292 /* Enumerate registry subkeys */
1294 obj_handle_t hkey; /* handle to registry key */
1295 int index; /* index of subkey (or -1 for current key) */
1296 int info_class; /* requested information class */
1298 int subkeys; /* number of subkeys */
1299 int max_subkey; /* longest subkey name */
1300 int max_class; /* longest class name */
1301 int values; /* number of values */
1302 int max_value; /* longest value name */
1303 int max_data; /* longest value data */
1304 time_t modif; /* last modification time */
1305 size_t total; /* total length needed for full name and class */
1306 size_t namelen; /* length of key name in bytes */
1307 VARARG(name,unicode_str,namelen); /* key name */
1308 VARARG(class,unicode_str); /* class name */
1312 /* Set a value of a registry key */
1314 obj_handle_t hkey; /* handle to registry key */
1315 int type; /* value type */
1316 size_t namelen; /* length of value name in bytes */
1317 VARARG(name,unicode_str,namelen); /* value name */
1318 VARARG(data,bytes); /* value data */
1322 /* Retrieve the value of a registry key */
1324 obj_handle_t hkey; /* handle to registry key */
1325 VARARG(name,unicode_str); /* value name */
1327 int type; /* value type */
1328 size_t total; /* total length needed for data */
1329 VARARG(data,bytes); /* value data */
1333 /* Enumerate a value of a registry key */
1334 @REQ(enum_key_value)
1335 obj_handle_t hkey; /* handle to registry key */
1336 int index; /* value index */
1337 int info_class; /* requested information class */
1339 int type; /* value type */
1340 size_t total; /* total length needed for full name and data */
1341 size_t namelen; /* length of value name in bytes */
1342 VARARG(name,unicode_str,namelen); /* value name */
1343 VARARG(data,bytes); /* value data */
1347 /* Delete a value of a registry key */
1348 @REQ(delete_key_value)
1349 obj_handle_t hkey; /* handle to registry key */
1350 VARARG(name,unicode_str); /* value name */
1354 /* Load a registry branch from a file */
1356 obj_handle_t hkey; /* root key to load to */
1357 obj_handle_t file; /* file to load from */
1358 VARARG(name,unicode_str); /* subkey name */
1362 /* UnLoad a registry branch from a file */
1363 @REQ(unload_registry)
1364 obj_handle_t hkey; /* root key to unload to */
1368 /* Save a registry branch to a file */
1370 obj_handle_t hkey; /* key to save */
1371 obj_handle_t file; /* file to save to */
1375 /* Add a registry key change notification */
1376 @REQ(set_registry_notification)
1377 obj_handle_t hkey; /* key to watch for changes */
1378 obj_handle_t event; /* event to set */
1379 int subtree; /* should we watch the whole subtree? */
1380 unsigned int filter; /* things to watch */
1384 /* Create a waitable timer */
1386 unsigned int access; /* wanted access rights */
1387 unsigned int attributes; /* object attributes */
1388 obj_handle_t rootdir; /* root directory */
1389 int manual; /* manual reset */
1390 VARARG(name,unicode_str); /* object name */
1392 obj_handle_t handle; /* handle to the timer */
1396 /* Open a waitable timer */
1398 unsigned int access; /* wanted access rights */
1399 unsigned int attributes; /* object attributes */
1400 obj_handle_t rootdir; /* root directory */
1401 VARARG(name,unicode_str); /* object name */
1403 obj_handle_t handle; /* handle to the timer */
1406 /* Set a waitable timer */
1408 obj_handle_t handle; /* handle to the timer */
1409 abs_time_t expire; /* next expiration absolute time */
1410 int period; /* timer period in ms */
1411 void* callback; /* callback function */
1412 void* arg; /* callback argument */
1414 int signaled; /* was the timer signaled before this call ? */
1417 /* Cancel a waitable timer */
1419 obj_handle_t handle; /* handle to the timer */
1421 int signaled; /* was the timer signaled before this calltime ? */
1424 /* Get information on a waitable timer */
1425 @REQ(get_timer_info)
1426 obj_handle_t handle; /* handle to the timer */
1428 abs_time_t when; /* absolute time when the timer next expires */
1429 int signaled; /* is the timer signaled? */
1433 /* Retrieve the current context of a thread */
1434 @REQ(get_thread_context)
1435 obj_handle_t handle; /* thread handle */
1436 unsigned int flags; /* context flags */
1437 int suspend; /* if getting context during suspend */
1439 int self; /* was it a handle to the current thread? */
1440 VARARG(context,context); /* thread context */
1444 /* Set the current context of a thread */
1445 @REQ(set_thread_context)
1446 obj_handle_t handle; /* thread handle */
1447 unsigned int flags; /* context flags */
1448 int suspend; /* if setting context during suspend */
1449 VARARG(context,context); /* thread context */
1451 int self; /* was it a handle to the current thread? */
1455 /* Fetch a selector entry for a thread */
1456 @REQ(get_selector_entry)
1457 obj_handle_t handle; /* thread handle */
1458 int entry; /* LDT entry */
1460 unsigned int base; /* selector base */
1461 unsigned int limit; /* selector limit */
1462 unsigned char flags; /* selector flags */
1468 obj_handle_t table; /* which table to add atom to */
1469 VARARG(name,unicode_str); /* atom name */
1471 atom_t atom; /* resulting atom */
1475 /* Delete an atom */
1477 obj_handle_t table; /* which table to delete atom from */
1478 atom_t atom; /* atom handle */
1484 obj_handle_t table; /* which table to find atom from */
1485 VARARG(name,unicode_str); /* atom name */
1487 atom_t atom; /* atom handle */
1491 /* Get information about an atom */
1492 @REQ(get_atom_information)
1493 obj_handle_t table; /* which table to find atom from */
1494 atom_t atom; /* atom handle */
1496 int count; /* atom lock count */
1497 int pinned; /* whether the atom has been pinned */
1498 size_t total; /* actual length of atom name */
1499 VARARG(name,unicode_str); /* atom name */
1503 /* Set information about an atom */
1504 @REQ(set_atom_information)
1505 obj_handle_t table; /* which table to find atom from */
1506 atom_t atom; /* atom handle */
1507 int pinned; /* whether to bump atom information */
1511 /* Empty an atom table */
1512 @REQ(empty_atom_table)
1513 obj_handle_t table; /* which table to find atom from */
1514 int if_pinned; /* whether to delete pinned atoms */
1518 /* Init an atom table */
1519 @REQ(init_atom_table)
1520 int entries; /* number of entries (only for local) */
1522 obj_handle_t table; /* handle to the atom table */
1526 /* Get the message queue of the current thread */
1529 obj_handle_t handle; /* handle to the queue */
1533 /* Set the current message queue wakeup mask */
1534 @REQ(set_queue_mask)
1535 unsigned int wake_mask; /* wakeup bits mask */
1536 unsigned int changed_mask; /* changed bits mask */
1537 int skip_wait; /* will we skip waiting if signaled? */
1539 unsigned int wake_bits; /* current wake bits */
1540 unsigned int changed_bits; /* current changed bits */
1544 /* Get the current message queue status */
1545 @REQ(get_queue_status)
1546 int clear; /* should we clear the change bits? */
1548 unsigned int wake_bits; /* wake bits */
1549 unsigned int changed_bits; /* changed bits since last time */
1553 /* Wait for a process to start waiting on input */
1554 @REQ(wait_input_idle)
1555 obj_handle_t handle; /* process handle */
1556 int timeout; /* timeout */
1558 obj_handle_t event; /* handle to idle event */
1562 /* Send a message to a thread queue */
1564 thread_id_t id; /* thread id */
1565 int type; /* message type (see below) */
1566 int flags; /* message flags (see below) */
1567 user_handle_t win; /* window handle */
1568 unsigned int msg; /* message code */
1569 unsigned int wparam; /* parameters */
1570 unsigned int lparam; /* parameters */
1571 int x; /* x position */
1572 int y; /* y position */
1573 unsigned int time; /* message time */
1574 unsigned int info; /* extra info */
1575 int timeout; /* timeout for reply */
1576 void* callback; /* callback address */
1577 VARARG(data,bytes); /* message data for sent messages */
1580 @REQ(post_quit_message)
1581 int exit_code; /* exit code to return */
1586 MSG_ASCII, /* Ascii message (from SendMessageA) */
1587 MSG_UNICODE, /* Unicode message (from SendMessageW) */
1588 MSG_NOTIFY, /* notify message (from SendNotifyMessageW), always Unicode */
1589 MSG_CALLBACK, /* callback message (from SendMessageCallbackW), always Unicode */
1590 MSG_CALLBACK_RESULT,/* result of a callback message */
1591 MSG_OTHER_PROCESS, /* sent from other process, may include vararg data, always Unicode */
1592 MSG_POSTED, /* posted message (from PostMessageW), always Unicode */
1593 MSG_HARDWARE, /* hardware message */
1594 MSG_WINEVENT /* winevent message */
1596 #define SEND_MSG_ABORT_IF_HUNG 0x01
1599 /* Get a message from the current queue */
1601 int flags; /* see below */
1602 user_handle_t get_win; /* window handle to get */
1603 unsigned int get_first; /* first message code to get */
1604 unsigned int get_last; /* last message code to get */
1605 unsigned int hw_id; /* id of the previous hardware message (or 0) */
1607 int type; /* message type */
1608 user_handle_t win; /* window handle */
1609 unsigned int msg; /* message code */
1610 unsigned int wparam; /* parameters (callback function for MSG_CALLBACK_RESULT) */
1611 unsigned int lparam; /* parameters (result for MSG_CALLBACK_RESULT) */
1612 int x; /* x position */
1613 int y; /* y position */
1614 user_handle_t hook; /* winevent hook handle */
1615 void* hook_proc; /* winevent hook proc address */
1616 unsigned int time; /* message time */
1617 unsigned int info; /* extra info (callback argument for MSG_CALLBACK_RESULT) */
1618 unsigned int hw_id; /* id if hardware message */
1619 unsigned int active_hooks; /* active hooks bitmap */
1620 size_t total; /* total size of extra data */
1621 VARARG(data,bytes); /* message data for sent messages */
1623 #define GET_MSG_REMOVE 1 /* remove the message */
1624 #define GET_MSG_SENT_ONLY 2 /* only get sent messages */
1626 /* Reply to a sent message */
1628 unsigned int result; /* message result */
1629 int remove; /* should we remove the message? */
1630 VARARG(data,bytes); /* message data for sent messages */
1634 /* Accept the current hardware message */
1635 @REQ(accept_hardware_message)
1636 unsigned int hw_id; /* id of the hardware message */
1637 int remove; /* should we remove the message? */
1638 user_handle_t new_win; /* new destination window for current message */
1642 /* Retrieve the reply for the last message sent */
1643 @REQ(get_message_reply)
1644 int cancel; /* cancel message if not ready? */
1646 unsigned int result; /* message result */
1647 VARARG(data,bytes); /* message data for sent messages */
1651 /* Set a window timer */
1653 user_handle_t win; /* window handle */
1654 unsigned int msg; /* message to post */
1655 unsigned int id; /* timer id */
1656 unsigned int rate; /* timer rate in ms */
1657 unsigned int lparam; /* message lparam (callback proc) */
1659 unsigned int id; /* timer id */
1663 /* Kill a window timer */
1664 @REQ(kill_win_timer)
1665 user_handle_t win; /* window handle */
1666 unsigned int msg; /* message to post */
1667 unsigned int id; /* timer id */
1671 /* Retrieve info about a serial port */
1672 @REQ(get_serial_info)
1673 obj_handle_t handle; /* handle to comm port */
1675 unsigned int readinterval;
1676 unsigned int readconst;
1677 unsigned int readmult;
1678 unsigned int writeconst;
1679 unsigned int writemult;
1680 unsigned int eventmask;
1684 /* Set info about a serial port */
1685 @REQ(set_serial_info)
1686 obj_handle_t handle; /* handle to comm port */
1687 int flags; /* bitmask to set values (see below) */
1688 unsigned int readinterval;
1689 unsigned int readconst;
1690 unsigned int readmult;
1691 unsigned int writeconst;
1692 unsigned int writemult;
1693 unsigned int eventmask;
1695 #define SERIALINFO_SET_TIMEOUTS 0x01
1696 #define SERIALINFO_SET_MASK 0x02
1699 /* Create an async I/O */
1700 @REQ(register_async)
1701 obj_handle_t handle; /* handle to comm port, socket or file */
1702 int type; /* type of queue to look after */
1703 void* io_apc; /* APC routine to queue upon end of async */
1704 void* io_sb; /* I/O status block (unique across all async on this handle) */
1705 void* io_user; /* data to pass back to caller */
1706 int count; /* count - usually # of bytes to be read/written */
1708 #define ASYNC_TYPE_READ 0x01
1709 #define ASYNC_TYPE_WRITE 0x02
1710 #define ASYNC_TYPE_WAIT 0x03
1713 /* Cancel all async op on a fd */
1715 obj_handle_t handle; /* handle to comm port, socket or file */
1719 /* Create a named pipe */
1720 @REQ(create_named_pipe)
1721 unsigned int access;
1722 unsigned int attributes; /* object attributes */
1723 obj_handle_t rootdir; /* root directory */
1724 unsigned int options;
1726 unsigned int maxinstances;
1727 unsigned int outsize;
1728 unsigned int insize;
1729 unsigned int timeout;
1730 VARARG(name,unicode_str); /* pipe name */
1732 obj_handle_t handle; /* handle to the pipe */
1735 /* flags in create_named_pipe and get_named_pipe_info */
1736 #define NAMED_PIPE_MESSAGE_STREAM_WRITE 0x0001
1737 #define NAMED_PIPE_MESSAGE_STREAM_READ 0x0002
1738 #define NAMED_PIPE_NONBLOCKING_MODE 0x0004
1741 /* Open an existing named pipe */
1742 @REQ(open_named_pipe)
1743 unsigned int access;
1744 unsigned int attributes; /* object attributes */
1745 obj_handle_t rootdir; /* root directory */
1746 unsigned int flags; /* file flags */
1747 VARARG(name,unicode_str); /* pipe name */
1749 obj_handle_t handle; /* handle to the pipe */
1753 /* Connect to a named pipe */
1754 @REQ(connect_named_pipe)
1755 obj_handle_t handle;
1761 /* Wait for a named pipe */
1762 @REQ(wait_named_pipe)
1763 obj_handle_t handle;
1764 unsigned int timeout;
1767 VARARG(name,unicode_str); /* pipe name */
1771 /* Disconnect a named pipe */
1772 @REQ(disconnect_named_pipe)
1773 obj_handle_t handle;
1775 int fd; /* associated fd to close */
1779 @REQ(get_named_pipe_info)
1780 obj_handle_t handle;
1783 unsigned int maxinstances;
1784 unsigned int outsize;
1785 unsigned int insize;
1789 /* Create a window */
1791 user_handle_t parent; /* parent window */
1792 user_handle_t owner; /* owner window */
1793 atom_t atom; /* class atom */
1794 void* instance; /* module instance */
1796 user_handle_t handle; /* created window */
1797 user_handle_t parent; /* full handle of parent */
1798 user_handle_t owner; /* full handle of owner */
1799 int extra; /* number of extra bytes */
1800 void* class_ptr; /* pointer to class in client address space */
1804 /* Destroy a window */
1805 @REQ(destroy_window)
1806 user_handle_t handle; /* handle to the window */
1810 /* Retrieve the desktop window for the current thread */
1811 @REQ(get_desktop_window)
1812 int force; /* force creation if it doesn't exist */
1814 user_handle_t handle; /* handle to the desktop window */
1818 /* Set a window owner */
1819 @REQ(set_window_owner)
1820 user_handle_t handle; /* handle to the window */
1821 user_handle_t owner; /* new owner */
1823 user_handle_t full_owner; /* full handle of new owner */
1824 user_handle_t prev_owner; /* full handle of previous owner */
1828 /* Get information from a window handle */
1829 @REQ(get_window_info)
1830 user_handle_t handle; /* handle to the window */
1832 user_handle_t full_handle; /* full 32-bit handle */
1833 user_handle_t last_active; /* last active popup */
1834 process_id_t pid; /* process owning the window */
1835 thread_id_t tid; /* thread owning the window */
1836 atom_t atom; /* class atom */
1837 int is_unicode; /* ANSI or unicode */
1841 /* Set some information in a window */
1842 @REQ(set_window_info)
1843 user_handle_t handle; /* handle to the window */
1844 unsigned int flags; /* flags for fields to set (see below) */
1845 unsigned int style; /* window style */
1846 unsigned int ex_style; /* window extended style */
1847 unsigned int id; /* window id */
1848 void* instance; /* creator instance */
1849 int is_unicode; /* ANSI or unicode */
1850 void* user_data; /* user-specific data */
1851 int extra_offset; /* offset to set in extra bytes */
1852 size_t extra_size; /* size to set in extra bytes */
1853 unsigned int extra_value; /* value to set in extra bytes */
1855 unsigned int old_style; /* old window style */
1856 unsigned int old_ex_style; /* old window extended style */
1857 unsigned int old_id; /* old window id */
1858 void* old_instance; /* old creator instance */
1859 void* old_user_data; /* old user-specific data */
1860 unsigned int old_extra_value; /* old value in extra bytes */
1862 #define SET_WIN_STYLE 0x01
1863 #define SET_WIN_EXSTYLE 0x02
1864 #define SET_WIN_ID 0x04
1865 #define SET_WIN_INSTANCE 0x08
1866 #define SET_WIN_USERDATA 0x10
1867 #define SET_WIN_EXTRA 0x20
1868 #define SET_WIN_UNICODE 0x40
1871 /* Set the parent of a window */
1873 user_handle_t handle; /* handle to the window */
1874 user_handle_t parent; /* handle to the parent */
1876 user_handle_t old_parent; /* old parent window */
1877 user_handle_t full_parent; /* full handle of new parent */
1881 /* Get a list of the window parents, up to the root of the tree */
1882 @REQ(get_window_parents)
1883 user_handle_t handle; /* handle to the window */
1885 int count; /* total count of parents */
1886 VARARG(parents,user_handles); /* parent handles */
1890 /* Get a list of the window children */
1891 @REQ(get_window_children)
1892 user_handle_t parent; /* parent window */
1893 atom_t atom; /* class atom for the listed children */
1894 thread_id_t tid; /* thread owning the listed children */
1896 int count; /* total count of children */
1897 VARARG(children,user_handles); /* children handles */
1901 /* Get a list of the window children that contain a given point */
1902 @REQ(get_window_children_from_point)
1903 user_handle_t parent; /* parent window */
1904 int x; /* point in parent coordinates */
1907 int count; /* total count of children */
1908 VARARG(children,user_handles); /* children handles */
1912 /* Get window tree information from a window handle */
1913 @REQ(get_window_tree)
1914 user_handle_t handle; /* handle to the window */
1916 user_handle_t parent; /* parent window */
1917 user_handle_t owner; /* owner window */
1918 user_handle_t next_sibling; /* next sibling in Z-order */
1919 user_handle_t prev_sibling; /* prev sibling in Z-order */
1920 user_handle_t first_sibling; /* first sibling in Z-order */
1921 user_handle_t last_sibling; /* last sibling in Z-order */
1922 user_handle_t first_child; /* first child */
1923 user_handle_t last_child; /* last child */
1926 /* Set the position and Z order of a window */
1927 @REQ(set_window_pos)
1928 user_handle_t handle; /* handle to the window */
1929 user_handle_t previous; /* previous window in Z order */
1930 unsigned int flags; /* SWP_* flags */
1931 rectangle_t window; /* window rectangle */
1932 rectangle_t client; /* client rectangle */
1933 VARARG(valid,rectangles); /* valid rectangles from WM_NCCALCSIZE */
1935 unsigned int new_style; /* new window style */
1939 /* Get the window and client rectangles of a window */
1940 @REQ(get_window_rectangles)
1941 user_handle_t handle; /* handle to the window */
1943 rectangle_t window; /* window rectangle */
1944 rectangle_t visible; /* visible part of the window rectangle */
1945 rectangle_t client; /* client rectangle */
1949 /* Get the window text */
1950 @REQ(get_window_text)
1951 user_handle_t handle; /* handle to the window */
1953 VARARG(text,unicode_str); /* window text */
1957 /* Set the window text */
1958 @REQ(set_window_text)
1959 user_handle_t handle; /* handle to the window */
1960 VARARG(text,unicode_str); /* window text */
1964 /* Get the coordinates offset between two windows */
1965 @REQ(get_windows_offset)
1966 user_handle_t from; /* handle to the first window */
1967 user_handle_t to; /* handle to the second window */
1969 int x; /* x coordinate offset */
1970 int y; /* y coordinate offset */
1974 /* Get the visible region of a window */
1975 @REQ(get_visible_region)
1976 user_handle_t window; /* handle to the window */
1977 unsigned int flags; /* DCX flags */
1979 user_handle_t top_win; /* top window to clip against */
1980 int top_org_x; /* top window visible rect origin in screen coords */
1982 int win_org_x; /* window rect origin in screen coords */
1984 size_t total_size; /* total size of the resulting region */
1985 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
1989 /* Get the window region */
1990 @REQ(get_window_region)
1991 user_handle_t window; /* handle to the window */
1993 size_t total_size; /* total size of the resulting region */
1994 VARARG(region,rectangles); /* list of rectangles for the region */
1998 /* Set the window region */
1999 @REQ(set_window_region)
2000 user_handle_t window; /* handle to the window */
2001 VARARG(region,rectangles); /* list of rectangles for the region */
2005 /* Get the window update region */
2006 @REQ(get_update_region)
2007 user_handle_t window; /* handle to the window */
2008 user_handle_t from_child; /* child to start searching from */
2009 unsigned int flags; /* update flags (see below) */
2011 user_handle_t child; /* child to repaint (or window itself) */
2012 unsigned int flags; /* resulting update flags (see below) */
2013 size_t total_size; /* total size of the resulting region */
2014 VARARG(region,rectangles); /* list of rectangles for the region */
2016 #define UPDATE_NONCLIENT 0x01 /* get region for repainting non-client area */
2017 #define UPDATE_ERASE 0x02 /* get region for erasing client area */
2018 #define UPDATE_PAINT 0x04 /* get region for painting client area */
2019 #define UPDATE_INTERNALPAINT 0x08 /* get region if internal paint is pending */
2020 #define UPDATE_ALLCHILDREN 0x10 /* force repaint of all children */
2021 #define UPDATE_NOCHILDREN 0x20 /* don't try to repaint any children */
2022 #define UPDATE_NOREGION 0x40 /* don't return a region, only the flags */
2025 /* Update the z order of a window so that a given rectangle is fully visible */
2026 @REQ(update_window_zorder)
2027 user_handle_t window; /* handle to the window */
2028 rectangle_t rect; /* rectangle that must be visible */
2032 /* Mark parts of a window as needing a redraw */
2034 user_handle_t window; /* handle to the window */
2035 unsigned int flags; /* RDW_* flags */
2036 VARARG(region,rectangles); /* list of rectangles for the region */
2040 /* Set a window property */
2041 @REQ(set_window_property)
2042 user_handle_t window; /* handle to the window */
2043 atom_t atom; /* property atom (if no name specified) */
2044 obj_handle_t handle; /* handle to store */
2045 VARARG(name,unicode_str); /* property name */
2049 /* Remove a window property */
2050 @REQ(remove_window_property)
2051 user_handle_t window; /* handle to the window */
2052 atom_t atom; /* property atom (if no name specified) */
2053 VARARG(name,unicode_str); /* property name */
2055 obj_handle_t handle; /* handle stored in property */
2059 /* Get a window property */
2060 @REQ(get_window_property)
2061 user_handle_t window; /* handle to the window */
2062 atom_t atom; /* property atom (if no name specified) */
2063 VARARG(name,unicode_str); /* property name */
2065 obj_handle_t handle; /* handle stored in property */
2069 /* Get the list of properties of a window */
2070 @REQ(get_window_properties)
2071 user_handle_t window; /* handle to the window */
2073 int total; /* total number of properties */
2074 VARARG(props,properties); /* list of properties */
2078 /* Create a window station */
2079 @REQ(create_winstation)
2080 unsigned int flags; /* window station flags */
2081 unsigned int access; /* wanted access rights */
2082 unsigned int attributes; /* object attributes */
2083 VARARG(name,unicode_str); /* object name */
2085 obj_handle_t handle; /* handle to the window station */
2089 /* Open a handle to a window station */
2090 @REQ(open_winstation)
2091 unsigned int access; /* wanted access rights */
2092 unsigned int attributes; /* object attributes */
2093 VARARG(name,unicode_str); /* object name */
2095 obj_handle_t handle; /* handle to the window station */
2099 /* Close a window station */
2100 @REQ(close_winstation)
2101 obj_handle_t handle; /* handle to the window station */
2105 /* Get the process current window station */
2106 @REQ(get_process_winstation)
2108 obj_handle_t handle; /* handle to the window station */
2112 /* Set the process current window station */
2113 @REQ(set_process_winstation)
2114 obj_handle_t handle; /* handle to the window station */
2118 /* Create a desktop */
2119 @REQ(create_desktop)
2120 unsigned int flags; /* desktop flags */
2121 unsigned int access; /* wanted access rights */
2122 unsigned int attributes; /* object attributes */
2123 VARARG(name,unicode_str); /* object name */
2125 obj_handle_t handle; /* handle to the desktop */
2129 /* Open a handle to a desktop */
2131 unsigned int flags; /* desktop flags */
2132 unsigned int access; /* wanted access rights */
2133 unsigned int attributes; /* object attributes */
2134 VARARG(name,unicode_str); /* object name */
2136 obj_handle_t handle; /* handle to the desktop */
2140 /* Close a desktop */
2142 obj_handle_t handle; /* handle to the desktop */
2146 /* Get the thread current desktop */
2147 @REQ(get_thread_desktop)
2148 thread_id_t tid; /* thread id */
2150 obj_handle_t handle; /* handle to the desktop */
2154 /* Set the thread current desktop */
2155 @REQ(set_thread_desktop)
2156 obj_handle_t handle; /* handle to the desktop */
2160 /* Get/set information about a user object (window station or desktop) */
2161 @REQ(set_user_object_info)
2162 obj_handle_t handle; /* handle to the object */
2163 unsigned int flags; /* information to set */
2164 unsigned int obj_flags; /* new object flags */
2166 int is_desktop; /* is object a desktop? */
2167 unsigned int old_obj_flags; /* old object flags */
2168 VARARG(name,unicode_str); /* object name */
2170 #define SET_USER_OBJECT_FLAGS 1
2173 /* Attach (or detach) thread inputs */
2174 @REQ(attach_thread_input)
2175 thread_id_t tid_from; /* thread to be attached */
2176 thread_id_t tid_to; /* thread to which tid_from should be attached */
2177 int attach; /* is it an attach? */
2181 /* Get input data for a given thread */
2182 @REQ(get_thread_input)
2183 thread_id_t tid; /* id of thread */
2185 user_handle_t focus; /* handle to the focus window */
2186 user_handle_t capture; /* handle to the capture window */
2187 user_handle_t active; /* handle to the active window */
2188 user_handle_t foreground; /* handle to the global foreground window */
2189 user_handle_t menu_owner; /* handle to the menu owner */
2190 user_handle_t move_size; /* handle to the moving/resizing window */
2191 user_handle_t caret; /* handle to the caret window */
2192 rectangle_t rect; /* caret rectangle */
2196 /* Get the time of the last input event */
2197 @REQ(get_last_input_time)
2203 /* Retrieve queue keyboard state for a given thread */
2205 thread_id_t tid; /* id of thread */
2206 int key; /* optional key code or -1 */
2208 unsigned char state; /* state of specified key */
2209 VARARG(keystate,bytes); /* state array for all the keys */
2212 /* Set queue keyboard state for a given thread */
2214 thread_id_t tid; /* id of thread */
2215 VARARG(keystate,bytes); /* state array for all the keys */
2218 /* Set the system foreground window */
2219 @REQ(set_foreground_window)
2220 user_handle_t handle; /* handle to the foreground window */
2222 user_handle_t previous; /* handle to the previous foreground window */
2223 int send_msg_old; /* whether we have to send a msg to the old window */
2224 int send_msg_new; /* whether we have to send a msg to the new window */
2227 /* Set the current thread focus window */
2228 @REQ(set_focus_window)
2229 user_handle_t handle; /* handle to the focus window */
2231 user_handle_t previous; /* handle to the previous focus window */
2234 /* Set the current thread active window */
2235 @REQ(set_active_window)
2236 user_handle_t handle; /* handle to the active window */
2238 user_handle_t previous; /* handle to the previous active window */
2241 /* Set the current thread capture window */
2242 @REQ(set_capture_window)
2243 user_handle_t handle; /* handle to the capture window */
2244 unsigned int flags; /* capture flags (see below) */
2246 user_handle_t previous; /* handle to the previous capture window */
2247 user_handle_t full_handle; /* full 32-bit handle of new capture window */
2249 #define CAPTURE_MENU 0x01 /* capture is for a menu */
2250 #define CAPTURE_MOVESIZE 0x02 /* capture is for moving/resizing */
2253 /* Set the current thread caret window */
2254 @REQ(set_caret_window)
2255 user_handle_t handle; /* handle to the caret window */
2256 int width; /* caret width */
2257 int height; /* caret height */
2259 user_handle_t previous; /* handle to the previous caret window */
2260 rectangle_t old_rect; /* previous caret rectangle */
2261 int old_hide; /* previous hide count */
2262 int old_state; /* previous caret state (1=on, 0=off) */
2266 /* Set the current thread caret information */
2267 @REQ(set_caret_info)
2268 unsigned int flags; /* caret flags (see below) */
2269 user_handle_t handle; /* handle to the caret window */
2270 int x; /* caret x position */
2271 int y; /* caret y position */
2272 int hide; /* increment for hide count (can be negative to show it) */
2273 int state; /* caret state (1=on, 0=off, -1=toggle current state) */
2275 user_handle_t full_handle; /* handle to the current caret window */
2276 rectangle_t old_rect; /* previous caret rectangle */
2277 int old_hide; /* previous hide count */
2278 int old_state; /* previous caret state (1=on, 0=off) */
2280 #define SET_CARET_POS 0x01 /* set the caret position from x,y */
2281 #define SET_CARET_HIDE 0x02 /* increment the caret hide count */
2282 #define SET_CARET_STATE 0x04 /* set the caret on/off state */
2285 /* Set a window hook */
2287 int id; /* id of the hook */
2288 process_id_t pid; /* id of process to set the hook into */
2289 thread_id_t tid; /* id of thread to set the hook into */
2293 void* proc; /* hook procedure */
2294 int unicode; /* is it a unicode hook? */
2295 VARARG(module,unicode_str); /* module name */
2297 user_handle_t handle; /* handle to the hook */
2298 unsigned int active_hooks; /* active hooks bitmap */
2302 /* Remove a window hook */
2304 user_handle_t handle; /* handle to the hook */
2305 int id; /* id of the hook if handle is 0 */
2306 void* proc; /* hook procedure if handle is 0 */
2308 unsigned int active_hooks; /* active hooks bitmap */
2312 /* Start calling a hook chain */
2313 @REQ(start_hook_chain)
2314 int id; /* id of the hook */
2315 int event; /* signalled event */
2316 user_handle_t window; /* handle to the event window */
2317 int object_id; /* object id for out of context winevent */
2318 int child_id; /* child id for out of context winevent */
2320 user_handle_t handle; /* handle to the next hook */
2321 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2322 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2323 void* proc; /* hook procedure */
2324 int unicode; /* is it a unicode hook? */
2325 unsigned int active_hooks; /* active hooks bitmap */
2326 VARARG(module,unicode_str); /* module name */
2330 /* Finished calling a hook chain */
2331 @REQ(finish_hook_chain)
2332 int id; /* id of the hook */
2336 /* Get the next hook to call */
2338 user_handle_t handle; /* handle to the current hook */
2339 int event; /* signalled event */
2340 user_handle_t window; /* handle to the event window */
2341 int object_id; /* object id for out of context winevent */
2342 int child_id; /* child id for out of context winevent */
2344 user_handle_t next; /* handle to the next hook */
2345 int id; /* id of the next hook */
2346 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2347 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2348 void* proc; /* next hook procedure */
2349 int prev_unicode; /* was the previous a unicode hook? */
2350 int next_unicode; /* is the next a unicode hook? */
2351 VARARG(module,unicode_str); /* module name */
2355 /* Create a window class */
2357 int local; /* is it a local class? */
2358 atom_t atom; /* class atom */
2359 unsigned int style; /* class style */
2360 void* instance; /* module instance */
2361 int extra; /* number of extra class bytes */
2362 int win_extra; /* number of window extra bytes */
2363 void* client_ptr; /* pointer to class in client address space */
2367 /* Destroy a window class */
2369 atom_t atom; /* class atom */
2370 void* instance; /* module instance */
2372 void* client_ptr; /* pointer to class in client address space */
2376 /* Set some information in a class */
2377 @REQ(set_class_info)
2378 user_handle_t window; /* handle to the window */
2379 unsigned int flags; /* flags for info to set (see below) */
2380 atom_t atom; /* class atom */
2381 unsigned int style; /* class style */
2382 int win_extra; /* number of window extra bytes */
2383 void* instance; /* module instance */
2384 int extra_offset; /* offset to set in extra bytes */
2385 size_t extra_size; /* size to set in extra bytes */
2386 unsigned int extra_value; /* value to set in extra bytes */
2388 atom_t old_atom; /* previous class atom */
2389 unsigned int old_style; /* previous class style */
2390 int old_extra; /* previous number of class extra bytes */
2391 int old_win_extra; /* previous number of window extra bytes */
2392 void* old_instance; /* previous module instance */
2393 unsigned int old_extra_value; /* old value in extra bytes */
2395 #define SET_CLASS_ATOM 0x0001
2396 #define SET_CLASS_STYLE 0x0002
2397 #define SET_CLASS_WINEXTRA 0x0004
2398 #define SET_CLASS_INSTANCE 0x0008
2399 #define SET_CLASS_EXTRA 0x0010
2402 /* Set/get clipboard information */
2403 @REQ(set_clipboard_info)
2404 unsigned int flags; /* flags for fields to set (see below) */
2405 user_handle_t clipboard; /* clipboard window */
2406 user_handle_t owner; /* clipboard owner */
2407 user_handle_t viewer; /* first clipboard viewer */
2408 unsigned int seqno; /* change sequence number */
2410 unsigned int flags; /* status flags (see below) */
2411 user_handle_t old_clipboard; /* old clipboard window */
2412 user_handle_t old_owner; /* old clipboard owner */
2413 user_handle_t old_viewer; /* old clipboard viewer */
2414 unsigned int seqno; /* current sequence number */
2417 #define SET_CB_OPEN 0x001
2418 #define SET_CB_OWNER 0x002
2419 #define SET_CB_VIEWER 0x004
2420 #define SET_CB_SEQNO 0x008
2421 #define SET_CB_RELOWNER 0x010
2422 #define SET_CB_CLOSE 0x020
2423 #define CB_OPEN 0x040
2424 #define CB_OWNER 0x080
2425 #define CB_PROCESS 0x100
2428 /* Open a security token */
2430 obj_handle_t handle; /* handle to the thread or process */
2431 unsigned int access; /* access rights to the new token */
2432 unsigned int attributes;/* object attributes */
2433 unsigned int flags; /* flags (see below) */
2435 obj_handle_t token; /* handle to the token */
2437 #define OPEN_TOKEN_THREAD 1
2438 #define OPEN_TOKEN_AS_SELF 2
2441 /* Set/get the global windows */
2442 @REQ(set_global_windows)
2443 unsigned int flags; /* flags for fields to set (see below) */
2444 user_handle_t shell_window; /* handle to the new shell window */
2445 user_handle_t shell_listview; /* handle to the new shell listview window */
2446 user_handle_t progman_window; /* handle to the new program manager window */
2447 user_handle_t taskman_window; /* handle to the new task manager window */
2449 user_handle_t old_shell_window; /* handle to the shell window */
2450 user_handle_t old_shell_listview; /* handle to the shell listview window */
2451 user_handle_t old_progman_window; /* handle to the new program manager window */
2452 user_handle_t old_taskman_window; /* handle to the new task manager window */
2454 #define SET_GLOBAL_SHELL_WINDOWS 0x01 /* set both main shell and listview windows */
2455 #define SET_GLOBAL_PROGMAN_WINDOW 0x02
2456 #define SET_GLOBAL_TASKMAN_WINDOW 0x04
2458 /* Adjust the privileges held by a token */
2459 @REQ(adjust_token_privileges)
2460 obj_handle_t handle; /* handle to the token */
2461 int disable_all; /* disable all privileges? */
2462 int get_modified_state; /* get modified privileges? */
2463 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to enable/disable/remove */
2465 unsigned int len; /* total length in bytes required to store token privileges */
2466 VARARG(privileges,LUID_AND_ATTRIBUTES); /* modified privileges */
2469 /* Retrieves the set of privileges held by or available to a token */
2470 @REQ(get_token_privileges)
2471 obj_handle_t handle; /* handle to the token */
2473 unsigned int len; /* total length in bytes required to store token privileges */
2474 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
2477 /* Check the token has the required privileges */
2478 @REQ(check_token_privileges)
2479 obj_handle_t handle; /* handle to the token */
2480 int all_required; /* are all the privileges required for the check to succeed? */
2481 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to check */
2483 int has_privileges; /* does the token have the required privileges? */
2484 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
2487 @REQ(duplicate_token)
2488 obj_handle_t handle; /* handle to the token to duplicate */
2489 unsigned int access; /* access rights to the new token */
2490 unsigned int attributes; /* object attributes */
2491 int primary; /* is the new token to be a primary one? */
2492 int impersonation_level; /* impersonation level of the new token */
2494 obj_handle_t new_handle; /* duplicated handle */
2498 obj_handle_t handle; /* handle to the token */
2499 unsigned int desired_access; /* desired access to the object */
2500 unsigned int mapping_read; /* mapping from generic read to specific rights */
2501 unsigned int mapping_write; /* mapping from generic write to specific rights */
2502 unsigned int mapping_execute; /* mapping from generic execute to specific rights */
2503 unsigned int mapping_all; /* mapping from generic all to specific rights */
2504 VARARG(sd,security_descriptor); /* security descriptor to check */
2506 unsigned int access_granted; /* access rights actually granted */
2507 unsigned int access_status; /* was access granted? */
2508 unsigned int privileges_len; /* length needed to store privileges */
2509 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges used during access check */
2512 @REQ(get_token_user)
2513 obj_handle_t handle; /* handle to the token */
2515 size_t user_len; /* length needed to store user */
2516 VARARG(user,SID); /* sid of the user the token represents */
2519 @REQ(get_token_groups)
2520 obj_handle_t handle; /* handle to the token */
2522 size_t user_len; /* length needed to store user */
2523 VARARG(user,token_groups); /* groups the token's user belongs to */
2526 /* Create a mailslot */
2527 @REQ(create_mailslot)
2528 unsigned int access; /* wanted access rights */
2529 unsigned int attributes; /* object attributes */
2530 obj_handle_t rootdir; /* root directory */
2531 unsigned int max_msgsize;
2533 VARARG(name,unicode_str); /* mailslot name */
2535 obj_handle_t handle; /* handle to the mailslot */
2539 /* Open an existing mailslot */
2541 unsigned int access;
2542 unsigned int attributes; /* object attributes */
2543 obj_handle_t rootdir; /* root directory */
2544 unsigned int sharing; /* sharing mode */
2545 VARARG(name,unicode_str); /* mailslot name */
2547 obj_handle_t handle; /* handle to the mailslot */
2551 /* Set mailslot information */
2552 @REQ(set_mailslot_info)
2553 obj_handle_t handle; /* handle to the mailslot */
2557 unsigned int max_msgsize;
2559 unsigned int msg_count;
2560 unsigned int next_msgsize;
2562 #define MAILSLOT_SET_READ_TIMEOUT 1
2565 /* Create a directory object */
2566 @REQ(create_directory)
2567 unsigned int access; /* access flags */
2568 unsigned int attributes; /* object attributes */
2569 obj_handle_t rootdir; /* root directory */
2570 VARARG(directory_name,unicode_str); /* Directory name */
2572 obj_handle_t handle; /* handle to the directory */
2576 /* Open a directory object */
2577 @REQ(open_directory)
2578 unsigned int access; /* access flags */
2579 unsigned int attributes; /* object attributes */
2580 obj_handle_t rootdir; /* root directory */
2581 VARARG(directory_name,unicode_str); /* Directory name */
2583 obj_handle_t handle; /* handle to the directory */
2587 /* Create a symbolic link object */
2588 @REQ(create_symlink)
2589 unsigned int access; /* access flags */
2590 unsigned int attributes; /* object attributes */
2591 obj_handle_t rootdir; /* root directory */
2592 size_t name_len; /* length of the symlink name in bytes */
2593 VARARG(name,unicode_str,name_len); /* symlink name */
2594 VARARG(target_name,unicode_str); /* target name */
2596 obj_handle_t handle; /* handle to the symlink */
2600 /* Open a symbolic link object */
2602 unsigned int access; /* access flags */
2603 unsigned int attributes; /* object attributes */
2604 obj_handle_t rootdir; /* root directory */
2605 VARARG(name,unicode_str); /* symlink name */
2607 obj_handle_t handle; /* handle to the symlink */
2611 /* Query a symbolic link object */
2613 obj_handle_t handle; /* handle to the symlink */
2615 VARARG(target_name,unicode_str); /* target name */