3 * Wine server protocol definition
5 * Copyright (C) 2001 Alexandre Julliard
7 * This file is used by tools/make_requests to build the
8 * protocol structures in include/wine/server_protocol.h
10 * This library is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU Lesser General Public
12 * License as published by the Free Software Foundation; either
13 * version 2.1 of the License, or (at your option) any later version.
15 * This library is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 * Lesser General Public License for more details.
20 * You should have received a copy of the GNU Lesser General Public
21 * License along with this library; if not, write to the Free Software
22 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
25 @HEADER /* start of C declarations */
34 typedef void *obj_handle_t;
35 typedef void *user_handle_t;
36 typedef unsigned short atom_t;
37 typedef unsigned int process_id_t;
38 typedef unsigned int thread_id_t;
39 typedef unsigned int data_size_t;
43 int req; /* request code */
44 data_size_t request_size; /* request variable part size */
45 data_size_t reply_size; /* reply variable part maximum size */
50 unsigned int error; /* error result */
51 data_size_t reply_size; /* reply variable part size */
54 /* placeholder structure for the maximum allowed request size */
55 /* this is used to construct the generic_request union */
56 struct request_max_size
58 int pad[16]; /* the max request size is 16 ints */
61 #define FIRST_USER_HANDLE 0x0020 /* first possible value for low word of user handle */
62 #define LAST_USER_HANDLE 0xffef /* last possible value for low word of user handle */
65 /* definitions of the event data depending on the event code */
66 struct debug_event_exception
68 EXCEPTION_RECORD record; /* exception record */
69 int first; /* first chance exception? */
71 struct debug_event_create_thread
73 obj_handle_t handle; /* handle to the new thread */
74 void *teb; /* thread teb (in debugged process address space) */
75 void *start; /* thread startup routine */
77 struct debug_event_create_process
79 obj_handle_t file; /* handle to the process exe file */
80 obj_handle_t process; /* handle to the new process */
81 obj_handle_t thread; /* handle to the new thread */
82 void *base; /* base of executable image */
83 int dbg_offset; /* offset of debug info in file */
84 int dbg_size; /* size of debug info */
85 void *teb; /* thread teb (in debugged process address space) */
86 void *start; /* thread startup routine */
87 void *name; /* image name (optional) */
88 int unicode; /* is it Unicode? */
90 struct debug_event_exit
92 int exit_code; /* thread or process exit code */
94 struct debug_event_load_dll
96 obj_handle_t handle; /* file handle for the dll */
97 void *base; /* base address of the dll */
98 int dbg_offset; /* offset of debug info in file */
99 int dbg_size; /* size of debug info */
100 void *name; /* image name (optional) */
101 int unicode; /* is it Unicode? */
103 struct debug_event_unload_dll
105 void *base; /* base address of the dll */
107 struct debug_event_output_string
109 void *string; /* string to display (in debugged process address space) */
110 int unicode; /* is it Unicode? */
111 int length; /* string length */
113 struct debug_event_rip_info
118 union debug_event_data
120 struct debug_event_exception exception;
121 struct debug_event_create_thread create_thread;
122 struct debug_event_create_process create_process;
123 struct debug_event_exit exit;
124 struct debug_event_load_dll load_dll;
125 struct debug_event_unload_dll unload_dll;
126 struct debug_event_output_string output_string;
127 struct debug_event_rip_info rip_info;
130 /* debug event data */
133 int code; /* event code */
134 union debug_event_data info; /* event information */
137 /* structure used in sending an fd from client to server */
140 thread_id_t tid; /* thread id */
141 int fd; /* file descriptor on client-side */
144 /* structure sent by the server on the wait fifo */
147 void *cookie; /* magic cookie that was passed in select_request */
148 int signaled; /* wait result */
151 /* structure for absolute timeouts */
154 int sec; /* seconds since Unix epoch */
155 int usec; /* microseconds */
158 /* structure returned in the list of window properties */
161 atom_t atom; /* property atom */
162 short string; /* was atom a string originally? */
163 obj_handle_t handle; /* handle stored in property */
166 /* structure to specify window rectangles */
175 /* structures for extra message data */
177 struct callback_msg_data
179 void *callback; /* callback function */
180 unsigned long data; /* user data for callback */
181 unsigned long result; /* message result */
184 struct winevent_msg_data
186 user_handle_t hook; /* hook handle */
187 thread_id_t tid; /* thread id */
188 void *hook_proc; /* hook proc address */
189 /* followed by module name if any */
194 unsigned char bytes[1]; /* raw data for sent messages */
195 struct callback_msg_data callback;
196 struct winevent_msg_data winevent;
199 /* structure for console char/attribute info */
206 #define MAX_ACL_LEN 65535
208 struct security_descriptor
210 unsigned int control; /* SE_ flags */
211 data_size_t owner_len;
212 data_size_t group_len;
213 data_size_t sacl_len;
214 data_size_t dacl_len;
215 /* VARARGS(owner,SID); */
216 /* VARARGS(group,SID); */
217 /* VARARGS(sacl,ACL); */
218 /* VARARGS(dacl,ACL); */
224 /* unsigned int attributes[count]; */
225 /* VARARGS(sids,SID); */
228 /****************************************************************/
229 /* Request declarations */
231 /* Create a new process from the context of the parent */
233 int inherit_all; /* inherit all handles from parent */
234 unsigned int create_flags; /* creation flags */
235 int socket_fd; /* file descriptor for process socket */
236 obj_handle_t exe_file; /* file handle for main exe */
237 obj_handle_t hstdin; /* handle for stdin */
238 obj_handle_t hstdout; /* handle for stdout */
239 obj_handle_t hstderr; /* handle for stderr */
240 unsigned int process_access; /* access rights for process object */
241 unsigned int process_attr; /* attributes for process object */
242 unsigned int thread_access; /* access rights for thread object */
243 unsigned int thread_attr; /* attributes for thread object */
244 VARARG(info,startup_info); /* startup information */
245 VARARG(env,unicode_str); /* environment for new process */
247 obj_handle_t info; /* new process info handle */
248 process_id_t pid; /* process id */
249 obj_handle_t phandle; /* process handle (in the current process) */
250 thread_id_t tid; /* thread id */
251 obj_handle_t thandle; /* thread handle (in the current process) */
255 /* Retrieve information about a newly started process */
256 @REQ(get_new_process_info)
257 obj_handle_t info; /* info handle returned from new_process_request */
259 int success; /* did the process start successfully? */
260 int exit_code; /* process exit code if failed */
264 /* Create a new thread from the context of the parent */
266 unsigned int access; /* wanted access rights */
267 unsigned int attributes; /* object attributes */
268 int suspend; /* new thread should be suspended on creation */
269 int request_fd; /* fd for request pipe */
271 thread_id_t tid; /* thread id */
272 obj_handle_t handle; /* thread handle (in the current process) */
276 /* Retrieve the new process startup info */
277 @REQ(get_startup_info)
279 obj_handle_t exe_file; /* file handle for main exe */
280 obj_handle_t hstdin; /* handle for stdin */
281 obj_handle_t hstdout; /* handle for stdout */
282 obj_handle_t hstderr; /* handle for stderr */
283 VARARG(info,startup_info); /* startup information */
284 VARARG(env,unicode_str); /* environment */
288 /* Signal the end of the process initialization */
289 @REQ(init_process_done)
290 void* module; /* main module base address */
291 void* entry; /* process entry point */
292 int gui; /* is it a GUI process? */
296 /* Initialize a thread; called from the child after fork()/clone() */
298 int unix_pid; /* Unix pid of new thread */
299 int unix_tid; /* Unix tid of new thread */
300 int debug_level; /* new debug level */
301 void* teb; /* TEB of new thread (in thread address space) */
302 void* peb; /* address of PEB (in thread address space) */
303 void* entry; /* thread entry point (in thread address space) */
304 void* ldt_copy; /* address of LDT copy (in thread address space) */
305 int reply_fd; /* fd for reply pipe */
306 int wait_fd; /* fd for blocking calls pipe */
308 process_id_t pid; /* process id of the new thread's process */
309 thread_id_t tid; /* thread id of the new thread */
310 data_size_t info_size; /* total size of startup info */
311 abs_time_t server_start; /* server start time */
312 int version; /* protocol version */
316 /* Terminate a process */
317 @REQ(terminate_process)
318 obj_handle_t handle; /* process handle to terminate */
319 int exit_code; /* process exit code */
321 int self; /* suicide? */
325 /* Terminate a thread */
326 @REQ(terminate_thread)
327 obj_handle_t handle; /* thread handle to terminate */
328 int exit_code; /* thread exit code */
330 int self; /* suicide? */
331 int last; /* last thread in this process? */
335 /* Retrieve information about a process */
336 @REQ(get_process_info)
337 obj_handle_t handle; /* process handle */
339 process_id_t pid; /* server process id */
340 process_id_t ppid; /* server process id of parent */
341 int exit_code; /* process exit code */
342 int priority; /* priority class */
343 int affinity; /* process affinity mask */
344 void* peb; /* PEB address in process address space */
345 abs_time_t start_time; /* process start time */
346 abs_time_t end_time; /* process end time */
350 /* Set a process informations */
351 @REQ(set_process_info)
352 obj_handle_t handle; /* process handle */
353 int mask; /* setting mask (see below) */
354 int priority; /* priority class */
355 int affinity; /* affinity mask */
357 #define SET_PROCESS_INFO_PRIORITY 0x01
358 #define SET_PROCESS_INFO_AFFINITY 0x02
361 /* Retrieve information about a thread */
362 @REQ(get_thread_info)
363 obj_handle_t handle; /* thread handle */
364 thread_id_t tid_in; /* thread id (optional) */
366 process_id_t pid; /* server process id */
367 thread_id_t tid; /* server thread id */
368 void* teb; /* thread teb pointer */
369 int exit_code; /* thread exit code */
370 int priority; /* thread priority level */
371 int affinity; /* thread affinity mask */
372 abs_time_t creation_time; /* thread creation time */
373 abs_time_t exit_time; /* thread exit time */
374 int last; /* last thread in process */
378 /* Set a thread informations */
379 @REQ(set_thread_info)
380 obj_handle_t handle; /* thread handle */
381 int mask; /* setting mask (see below) */
382 int priority; /* priority class */
383 int affinity; /* affinity mask */
384 obj_handle_t token; /* impersonation token */
386 #define SET_THREAD_INFO_PRIORITY 0x01
387 #define SET_THREAD_INFO_AFFINITY 0x02
388 #define SET_THREAD_INFO_TOKEN 0x04
391 /* Retrieve information about a module */
393 obj_handle_t handle; /* process handle */
394 void* base_address; /* base address of module */
396 size_t size; /* module size */
398 VARARG(filename,unicode_str); /* file name of module */
402 /* Suspend a thread */
404 obj_handle_t handle; /* thread handle */
406 int count; /* new suspend count */
410 /* Resume a thread */
412 obj_handle_t handle; /* thread handle */
414 int count; /* new suspend count */
418 /* Notify the server that a dll has been loaded */
420 obj_handle_t handle; /* file handle */
421 void* base; /* base address */
422 size_t size; /* dll size */
423 int dbg_offset; /* debug info offset */
424 int dbg_size; /* debug info size */
425 void* name; /* ptr to ptr to name (in process addr space) */
426 VARARG(filename,unicode_str); /* file name of dll */
430 /* Notify the server that a dll is being unloaded */
432 void* base; /* base address */
436 /* Queue an APC for a thread */
438 obj_handle_t handle; /* thread handle */
439 int user; /* user or system apc? */
440 void* func; /* function to call */
441 void* arg1; /* params for function to call */
447 /* Get next APC to call */
449 int alertable; /* is thread alertable? */
451 void* func; /* function to call */
452 int type; /* function type */
453 void* arg1; /* function arguments */
457 enum apc_type { APC_NONE, APC_USER, APC_TIMER, APC_ASYNC_IO };
460 /* Close a handle for the current process */
462 obj_handle_t handle; /* handle to close */
466 /* Set a handle information */
467 @REQ(set_handle_info)
468 obj_handle_t handle; /* handle we are interested in */
469 int flags; /* new handle flags */
470 int mask; /* mask for flags to set */
472 int old_flags; /* old flag value */
476 /* Duplicate a handle */
478 obj_handle_t src_process; /* src process handle */
479 obj_handle_t src_handle; /* src handle to duplicate */
480 obj_handle_t dst_process; /* dst process handle */
481 unsigned int access; /* wanted access rights */
482 unsigned int attributes; /* object attributes */
483 unsigned int options; /* duplicate options (see below) */
485 obj_handle_t handle; /* duplicated handle in dst process */
486 int closed; /* whether the source handle has been closed */
488 #define DUP_HANDLE_CLOSE_SOURCE DUPLICATE_CLOSE_SOURCE
489 #define DUP_HANDLE_SAME_ACCESS DUPLICATE_SAME_ACCESS
490 #define DUP_HANDLE_MAKE_GLOBAL 0x80000000 /* Not a Windows flag */
493 /* Open a handle to a process */
495 process_id_t pid; /* process id to open */
496 unsigned int access; /* wanted access rights */
497 unsigned int attributes; /* object attributes */
499 obj_handle_t handle; /* handle to the process */
503 /* Open a handle to a thread */
505 thread_id_t tid; /* thread id to open */
506 unsigned int access; /* wanted access rights */
507 unsigned int attributes; /* object attributes */
509 obj_handle_t handle; /* handle to the thread */
513 /* Wait for handles */
515 int flags; /* wait flags (see below) */
516 void* cookie; /* magic cookie to return to client */
517 obj_handle_t signal; /* object to signal (0 if none) */
518 abs_time_t timeout; /* absolute timeout */
519 VARARG(handles,handles); /* handles to select on */
522 #define SELECT_ALERTABLE 2
523 #define SELECT_INTERRUPTIBLE 4
524 #define SELECT_TIMEOUT 8
527 /* Create an event */
529 unsigned int access; /* wanted access rights */
530 unsigned int attributes; /* object attributes */
531 obj_handle_t rootdir; /* root directory */
532 int manual_reset; /* manual reset event */
533 int initial_state; /* initial state of the event */
534 VARARG(name,unicode_str); /* object name */
536 obj_handle_t handle; /* handle to the event */
539 /* Event operation */
541 obj_handle_t handle; /* handle to event */
542 int op; /* event operation (see below) */
544 enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT };
549 unsigned int access; /* wanted access rights */
550 unsigned int attributes; /* object attributes */
551 obj_handle_t rootdir; /* root directory */
552 VARARG(name,unicode_str); /* object name */
554 obj_handle_t handle; /* handle to the event */
560 unsigned int access; /* wanted access rights */
561 unsigned int attributes; /* object attributes */
562 obj_handle_t rootdir; /* root directory */
563 int owned; /* initially owned? */
564 VARARG(name,unicode_str); /* object name */
566 obj_handle_t handle; /* handle to the mutex */
570 /* Release a mutex */
572 obj_handle_t handle; /* handle to the mutex */
574 unsigned int prev_count; /* value of internal counter, before release */
580 unsigned int access; /* wanted access rights */
581 unsigned int attributes; /* object attributes */
582 obj_handle_t rootdir; /* root directory */
583 VARARG(name,unicode_str); /* object name */
585 obj_handle_t handle; /* handle to the mutex */
589 /* Create a semaphore */
590 @REQ(create_semaphore)
591 unsigned int access; /* wanted access rights */
592 unsigned int attributes; /* object attributes */
593 obj_handle_t rootdir; /* root directory */
594 unsigned int initial; /* initial count */
595 unsigned int max; /* maximum count */
596 VARARG(name,unicode_str); /* object name */
598 obj_handle_t handle; /* handle to the semaphore */
602 /* Release a semaphore */
603 @REQ(release_semaphore)
604 obj_handle_t handle; /* handle to the semaphore */
605 unsigned int count; /* count to add to semaphore */
607 unsigned int prev_count; /* previous semaphore count */
611 /* Open a semaphore */
613 unsigned int access; /* wanted access rights */
614 unsigned int attributes; /* object attributes */
615 obj_handle_t rootdir; /* root directory */
616 VARARG(name,unicode_str); /* object name */
618 obj_handle_t handle; /* handle to the semaphore */
624 unsigned int access; /* wanted access rights */
625 unsigned int attributes; /* object attributes */
626 unsigned int sharing; /* sharing flags */
627 int create; /* file create action */
628 unsigned int options; /* file options */
629 unsigned int attrs; /* file attributes for creation */
630 VARARG(filename,string); /* file name */
632 obj_handle_t handle; /* handle to the file */
636 /* Open a file object */
637 @REQ(open_file_object)
638 unsigned int access; /* wanted access rights */
639 unsigned int attributes; /* open attributes */
640 obj_handle_t rootdir; /* root directory */
641 unsigned int sharing; /* sharing flags */
642 VARARG(filename,unicode_str); /* file name */
644 obj_handle_t handle; /* handle to the file */
648 /* Allocate a file handle for a Unix fd */
649 @REQ(alloc_file_handle)
650 unsigned int access; /* wanted access rights */
651 unsigned int attributes; /* object attributes */
652 int fd; /* file descriptor on the client side */
654 obj_handle_t handle; /* handle to the file */
658 /* Get a Unix fd to access a file */
660 obj_handle_t handle; /* handle to the file */
661 unsigned int access; /* wanted access rights */
662 int cached; /* is it cached on the client already? */
664 int type; /* file type (see below) */
665 int flags; /* file read/write flags (see below) */
669 FD_TYPE_INVALID, /* invalid file (no associated fd) */
670 FD_TYPE_FILE, /* regular file */
671 FD_TYPE_DIR, /* directory */
672 FD_TYPE_SOCKET, /* socket */
673 FD_TYPE_SERIAL, /* serial port */
674 FD_TYPE_PIPE, /* named pipe */
675 FD_TYPE_MAILSLOT, /* mailslot */
676 FD_TYPE_DEVICE, /* Windows device file */
679 #define FD_FLAG_OVERLAPPED 0x01 /* fd opened in overlapped mode */
680 #define FD_FLAG_TIMEOUT 0x02 /* read/write is synchronous */
681 #define FD_FLAG_RECV_SHUTDOWN 0x04
682 #define FD_FLAG_SEND_SHUTDOWN 0x08
683 #define FD_FLAG_AVAILABLE 0x10 /* in overlap read/write operation,
684 * only handle available data (don't wait) */
685 #define FD_FLAG_REMOVABLE 0x20 /* is it on a removable device? */
687 /* Flush a file buffers */
689 obj_handle_t handle; /* handle to the file */
691 obj_handle_t event; /* event set when finished */
695 /* Lock a region of a file */
697 obj_handle_t handle; /* handle to the file */
698 unsigned int offset_low; /* offset of start of lock */
699 unsigned int offset_high; /* offset of start of lock */
700 unsigned int count_low; /* count of bytes to lock */
701 unsigned int count_high; /* count of bytes to lock */
702 int shared; /* shared or exclusive lock? */
703 int wait; /* do we want to wait? */
705 obj_handle_t handle; /* handle to wait on */
706 int overlapped; /* is it an overlapped I/O handle? */
710 /* Unlock a region of a file */
712 obj_handle_t handle; /* handle to the file */
713 unsigned int offset_low; /* offset of start of unlock */
714 unsigned int offset_high; /* offset of start of unlock */
715 unsigned int count_low; /* count of bytes to unlock */
716 unsigned int count_high; /* count of bytes to unlock */
720 /* Get ready to unmount a Unix device */
722 obj_handle_t handle; /* handle to a file on the device */
726 /* Create a socket */
728 unsigned int access; /* wanted access rights */
729 unsigned int attributes; /* object attributes */
730 int family; /* family, see socket manpage */
731 int type; /* type, see socket manpage */
732 int protocol; /* protocol, see socket manpage */
733 unsigned int flags; /* socket flags */
735 obj_handle_t handle; /* handle to the new socket */
739 /* Accept a socket */
741 obj_handle_t lhandle; /* handle to the listening socket */
742 unsigned int access; /* wanted access rights */
743 unsigned int attributes; /* object attributes */
745 obj_handle_t handle; /* handle to the new socket */
749 /* Set socket event parameters */
750 @REQ(set_socket_event)
751 obj_handle_t handle; /* handle to the socket */
752 unsigned int mask; /* event mask */
753 obj_handle_t event; /* event object */
754 user_handle_t window; /* window to send the message to */
755 unsigned int msg; /* message to send */
759 /* Get socket event parameters */
760 @REQ(get_socket_event)
761 obj_handle_t handle; /* handle to the socket */
762 int service; /* clear pending? */
763 obj_handle_t c_event; /* event to clear */
765 unsigned int mask; /* event mask */
766 unsigned int pmask; /* pending events */
767 unsigned int state; /* status bits */
768 VARARG(errors,ints); /* event errors */
772 /* Reenable pending socket events */
773 @REQ(enable_socket_event)
774 obj_handle_t handle; /* handle to the socket */
775 unsigned int mask; /* events to re-enable */
776 unsigned int sstate; /* status bits to set */
777 unsigned int cstate; /* status bits to clear */
780 @REQ(set_socket_deferred)
781 obj_handle_t handle; /* handle to the socket */
782 obj_handle_t deferred; /* handle to the socket for which accept() is deferred */
785 /* Allocate a console (only used by a console renderer) */
787 unsigned int access; /* wanted access rights */
788 unsigned int attributes; /* object attributes */
789 process_id_t pid; /* pid of process which shall be attached to the console */
791 obj_handle_t handle_in; /* handle to console input */
792 obj_handle_t event; /* handle to renderer events change notification */
796 /* Free the console of the current process */
801 #define CONSOLE_RENDERER_NONE_EVENT 0x00
802 #define CONSOLE_RENDERER_TITLE_EVENT 0x01
803 #define CONSOLE_RENDERER_ACTIVE_SB_EVENT 0x02
804 #define CONSOLE_RENDERER_SB_RESIZE_EVENT 0x03
805 #define CONSOLE_RENDERER_UPDATE_EVENT 0x04
806 #define CONSOLE_RENDERER_CURSOR_POS_EVENT 0x05
807 #define CONSOLE_RENDERER_CURSOR_GEOM_EVENT 0x06
808 #define CONSOLE_RENDERER_DISPLAY_EVENT 0x07
809 #define CONSOLE_RENDERER_EXIT_EVENT 0x08
810 struct console_renderer_event
845 /* retrieve console events for the renderer */
846 @REQ(get_console_renderer_events)
847 obj_handle_t handle; /* handle to console input events */
849 VARARG(data,bytes); /* the various console_renderer_events */
853 /* Open a handle to the process console */
855 obj_handle_t from; /* 0 (resp 1) input (resp output) of current process console */
856 /* otherwise console_in handle to get active screen buffer? */
857 unsigned int access; /* wanted access rights */
858 unsigned int attributes; /* object attributes */
859 int share; /* share mask (only for output handles) */
861 obj_handle_t handle; /* handle to the console */
865 /* Get the input queue wait event */
866 @REQ(get_console_wait_event)
871 /* Get a console mode (input or output) */
872 @REQ(get_console_mode)
873 obj_handle_t handle; /* handle to the console */
875 int mode; /* console mode */
879 /* Set a console mode (input or output) */
880 @REQ(set_console_mode)
881 obj_handle_t handle; /* handle to the console */
882 int mode; /* console mode */
886 /* Set info about a console (input only) */
887 @REQ(set_console_input_info)
888 obj_handle_t handle; /* handle to console input, or 0 for process' console */
889 int mask; /* setting mask (see below) */
890 obj_handle_t active_sb; /* active screen buffer */
891 int history_mode; /* whether we duplicate lines in history */
892 int history_size; /* number of lines in history */
893 int edition_mode; /* index to the edition mode flavors */
894 VARARG(title,unicode_str); /* console title */
896 #define SET_CONSOLE_INPUT_INFO_ACTIVE_SB 0x01
897 #define SET_CONSOLE_INPUT_INFO_TITLE 0x02
898 #define SET_CONSOLE_INPUT_INFO_HISTORY_MODE 0x04
899 #define SET_CONSOLE_INPUT_INFO_HISTORY_SIZE 0x08
900 #define SET_CONSOLE_INPUT_INFO_EDITION_MODE 0x10
903 /* Get info about a console (input only) */
904 @REQ(get_console_input_info)
905 obj_handle_t handle; /* handle to console input, or 0 for process' console */
907 int history_mode; /* whether we duplicate lines in history */
908 int history_size; /* number of lines in history */
909 int history_index; /* number of used lines in history */
910 int edition_mode; /* index to the edition mode flavors */
911 VARARG(title,unicode_str); /* console title */
915 /* appends a string to console's history */
916 @REQ(append_console_input_history)
917 obj_handle_t handle; /* handle to console input, or 0 for process' console */
918 VARARG(line,unicode_str); /* line to add */
922 /* appends a string to console's history */
923 @REQ(get_console_input_history)
924 obj_handle_t handle; /* handle to console input, or 0 for process' console */
925 int index; /* index to get line from */
927 int total; /* total length of line in Unicode chars */
928 VARARG(line,unicode_str); /* line to add */
932 /* creates a new screen buffer on process' console */
933 @REQ(create_console_output)
934 obj_handle_t handle_in; /* handle to console input, or 0 for process' console */
935 unsigned int access; /* wanted access rights */
936 unsigned int attributes; /* object attributes */
937 unsigned int share; /* sharing credentials */
939 obj_handle_t handle_out; /* handle to the screen buffer */
943 /* Set info about a console (output only) */
944 @REQ(set_console_output_info)
945 obj_handle_t handle; /* handle to the console */
946 int mask; /* setting mask (see below) */
947 short int cursor_size; /* size of cursor (percentage filled) */
948 short int cursor_visible;/* cursor visibility flag */
949 short int cursor_x; /* position of cursor (x, y) */
951 short int width; /* width of the screen buffer */
952 short int height; /* height of the screen buffer */
953 short int attr; /* default attribute */
954 short int win_left; /* window actually displayed by renderer */
955 short int win_top; /* the rect area is expressed withing the */
956 short int win_right; /* boundaries of the screen buffer */
957 short int win_bottom;
958 short int max_width; /* maximum size (width x height) for the window */
959 short int max_height;
961 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_GEOM 0x01
962 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_POS 0x02
963 #define SET_CONSOLE_OUTPUT_INFO_SIZE 0x04
964 #define SET_CONSOLE_OUTPUT_INFO_ATTR 0x08
965 #define SET_CONSOLE_OUTPUT_INFO_DISPLAY_WINDOW 0x10
966 #define SET_CONSOLE_OUTPUT_INFO_MAX_SIZE 0x20
969 /* Get info about a console (output only) */
970 @REQ(get_console_output_info)
971 obj_handle_t handle; /* handle to the console */
973 short int cursor_size; /* size of cursor (percentage filled) */
974 short int cursor_visible;/* cursor visibility flag */
975 short int cursor_x; /* position of cursor (x, y) */
977 short int width; /* width of the screen buffer */
978 short int height; /* height of the screen buffer */
979 short int attr; /* default attribute */
980 short int win_left; /* window actually displayed by renderer */
981 short int win_top; /* the rect area is expressed withing the */
982 short int win_right; /* boundaries of the screen buffer */
983 short int win_bottom;
984 short int max_width; /* maximum size (width x height) for the window */
985 short int max_height;
988 /* Add input records to a console input queue */
989 @REQ(write_console_input)
990 obj_handle_t handle; /* handle to the console input */
991 VARARG(rec,input_records); /* input records */
993 int written; /* number of records written */
997 /* Fetch input records from a console input queue */
998 @REQ(read_console_input)
999 obj_handle_t handle; /* handle to the console input */
1000 int flush; /* flush the retrieved records from the queue? */
1002 int read; /* number of records read */
1003 VARARG(rec,input_records); /* input records */
1007 /* write data (chars and/or attributes) in a screen buffer */
1008 @REQ(write_console_output)
1009 obj_handle_t handle; /* handle to the console output */
1010 int x; /* position where to start writing */
1012 int mode; /* char info (see below) */
1013 int wrap; /* wrap around at end of line? */
1014 VARARG(data,bytes); /* info to write */
1016 int written; /* number of char infos actually written */
1017 int width; /* width of screen buffer */
1018 int height; /* height of screen buffer */
1022 CHAR_INFO_MODE_TEXT, /* characters only */
1023 CHAR_INFO_MODE_ATTR, /* attributes only */
1024 CHAR_INFO_MODE_TEXTATTR, /* both characters and attributes */
1025 CHAR_INFO_MODE_TEXTSTDATTR /* characters but use standard attributes */
1029 /* fill a screen buffer with constant data (chars and/or attributes) */
1030 @REQ(fill_console_output)
1031 obj_handle_t handle; /* handle to the console output */
1032 int x; /* position where to start writing */
1034 int mode; /* char info mode */
1035 int count; /* number to write */
1036 int wrap; /* wrap around at end of line? */
1037 char_info_t data; /* data to write */
1039 int written; /* number of char infos actually written */
1043 /* read data (chars and/or attributes) from a screen buffer */
1044 @REQ(read_console_output)
1045 obj_handle_t handle; /* handle to the console output */
1046 int x; /* position (x,y) where to start reading */
1048 int mode; /* char info mode */
1049 int wrap; /* wrap around at end of line? */
1051 int width; /* width of screen buffer */
1052 int height; /* height of screen buffer */
1057 /* move a rect (of data) in screen buffer content */
1058 @REQ(move_console_output)
1059 obj_handle_t handle; /* handle to the console output */
1060 short int x_src; /* position (x, y) of rect to start moving from */
1062 short int x_dst; /* position (x, y) of rect to move to */
1064 short int w; /* size of the rect (width, height) to move */
1069 /* Sends a signal to a process group */
1070 @REQ(send_console_signal)
1071 int signal; /* the signal to send */
1072 process_id_t group_id; /* the group to send the signal to */
1076 /* enable directory change notifications */
1077 @REQ(read_directory_changes)
1078 unsigned int filter; /* notification filter */
1079 obj_handle_t handle; /* handle to the directory */
1080 obj_handle_t event; /* handle to the event */
1081 int subtree; /* watch the subtree? */
1082 int want_data; /* flag indicating whether change data should be collected */
1083 void* io_apc; /* APC routine to queue upon end of async */
1084 void* io_sb; /* I/O status block (unique across all async on this handle) */
1085 void* io_user; /* data to pass back to caller */
1090 obj_handle_t handle;
1092 int action; /* type of change */
1093 VARARG(name,string); /* name of directory entry that changed */
1097 /* Create a file mapping */
1098 @REQ(create_mapping)
1099 unsigned int access; /* wanted access rights */
1100 unsigned int attributes; /* object attributes */
1101 obj_handle_t rootdir; /* root directory */
1102 int size_high; /* mapping size */
1103 int size_low; /* mapping size */
1104 int protect; /* protection flags (see below) */
1105 obj_handle_t file_handle; /* file handle */
1106 VARARG(name,unicode_str); /* object name */
1108 obj_handle_t handle; /* handle to the mapping */
1110 /* protection flags */
1111 #define VPROT_READ 0x01
1112 #define VPROT_WRITE 0x02
1113 #define VPROT_EXEC 0x04
1114 #define VPROT_WRITECOPY 0x08
1115 #define VPROT_GUARD 0x10
1116 #define VPROT_NOCACHE 0x20
1117 #define VPROT_COMMITTED 0x40
1118 #define VPROT_IMAGE 0x80
1121 /* Open a mapping */
1123 unsigned int access; /* wanted access rights */
1124 unsigned int attributes; /* object attributes */
1125 obj_handle_t rootdir; /* root directory */
1126 VARARG(name,unicode_str); /* object name */
1128 obj_handle_t handle; /* handle to the mapping */
1132 /* Get information about a file mapping */
1133 @REQ(get_mapping_info)
1134 obj_handle_t handle; /* handle to the mapping */
1136 int size_high; /* mapping size */
1137 int size_low; /* mapping size */
1138 int protect; /* protection flags */
1139 int header_size; /* header size (for VPROT_IMAGE mapping) */
1140 void* base; /* default base addr (for VPROT_IMAGE mapping) */
1141 obj_handle_t shared_file; /* shared mapping file handle */
1142 int shared_size; /* shared mapping size */
1146 #define SNAP_HEAPLIST 0x00000001
1147 #define SNAP_PROCESS 0x00000002
1148 #define SNAP_THREAD 0x00000004
1149 #define SNAP_MODULE 0x00000008
1150 /* Create a snapshot */
1151 @REQ(create_snapshot)
1152 unsigned int attributes; /* object attributes */
1153 int flags; /* snapshot flags (SNAP_*) */
1154 process_id_t pid; /* process id */
1156 obj_handle_t handle; /* handle to the snapshot */
1160 /* Get the next process from a snapshot */
1162 obj_handle_t handle; /* handle to the snapshot */
1163 int reset; /* reset snapshot position? */
1165 int count; /* process usage count */
1166 process_id_t pid; /* process id */
1167 process_id_t ppid; /* parent process id */
1168 void* heap; /* heap base */
1169 void* module; /* main module */
1170 int threads; /* number of threads */
1171 int priority; /* process priority */
1172 int handles; /* number of handles */
1173 VARARG(filename,unicode_str); /* file name of main exe */
1177 /* Get the next thread from a snapshot */
1179 obj_handle_t handle; /* handle to the snapshot */
1180 int reset; /* reset snapshot position? */
1182 int count; /* thread usage count */
1183 process_id_t pid; /* process id */
1184 thread_id_t tid; /* thread id */
1185 int base_pri; /* base priority */
1186 int delta_pri; /* delta priority */
1190 /* Get the next module from a snapshot */
1192 obj_handle_t handle; /* handle to the snapshot */
1193 int reset; /* reset snapshot position? */
1195 process_id_t pid; /* process id */
1196 void* base; /* module base address */
1197 size_t size; /* module size */
1198 VARARG(filename,unicode_str); /* file name of module */
1202 /* Wait for a debug event */
1203 @REQ(wait_debug_event)
1204 int get_handle; /* should we alloc a handle for waiting? */
1206 process_id_t pid; /* process id */
1207 thread_id_t tid; /* thread id */
1208 obj_handle_t wait; /* wait handle if no event ready */
1209 VARARG(event,debug_event); /* debug event data */
1213 /* Queue an exception event */
1214 @REQ(queue_exception_event)
1215 int first; /* first chance exception? */
1216 VARARG(record,exc_event); /* thread context followed by exception record */
1218 obj_handle_t handle; /* handle to the queued event */
1222 /* Retrieve the status of an exception event */
1223 @REQ(get_exception_status)
1224 obj_handle_t handle; /* handle to the queued event */
1226 VARARG(context,context); /* modified thread context */
1230 /* Send an output string to the debugger */
1231 @REQ(output_debug_string)
1232 void* string; /* string to display (in debugged process address space) */
1233 int unicode; /* is it Unicode? */
1234 int length; /* string length */
1238 /* Continue a debug event */
1239 @REQ(continue_debug_event)
1240 process_id_t pid; /* process id to continue */
1241 thread_id_t tid; /* thread id to continue */
1242 int status; /* continuation status */
1246 /* Start/stop debugging an existing process */
1248 process_id_t pid; /* id of the process to debug */
1249 int attach; /* 1=attaching / 0=detaching from the process */
1253 /* Simulate a breakpoint in a process */
1255 obj_handle_t handle; /* process handle */
1257 int self; /* was it the caller itself? */
1261 /* Set debugger kill on exit flag */
1262 @REQ(set_debugger_kill_on_exit)
1263 int kill_on_exit; /* 0=detach/1=kill debuggee when debugger dies */
1267 /* Read data from a process address space */
1268 @REQ(read_process_memory)
1269 obj_handle_t handle; /* process handle */
1270 void* addr; /* addr to read from */
1272 VARARG(data,bytes); /* result data */
1276 /* Write data to a process address space */
1277 @REQ(write_process_memory)
1278 obj_handle_t handle; /* process handle */
1279 void* addr; /* addr to write to */
1280 VARARG(data,bytes); /* data to write */
1284 /* Create a registry key */
1286 obj_handle_t parent; /* handle to the parent key */
1287 unsigned int access; /* desired access rights */
1288 unsigned int attributes; /* object attributes */
1289 unsigned int options; /* creation options */
1290 time_t modif; /* last modification time */
1291 data_size_t namelen; /* length of key name in bytes */
1292 VARARG(name,unicode_str,namelen); /* key name */
1293 VARARG(class,unicode_str); /* class name */
1295 obj_handle_t hkey; /* handle to the created key */
1296 int created; /* has it been newly created? */
1299 /* Open a registry key */
1301 obj_handle_t parent; /* handle to the parent key */
1302 unsigned int access; /* desired access rights */
1303 unsigned int attributes; /* object attributes */
1304 VARARG(name,unicode_str); /* key name */
1306 obj_handle_t hkey; /* handle to the open key */
1310 /* Delete a registry key */
1312 obj_handle_t hkey; /* handle to the key */
1316 /* Flush a registry key */
1318 obj_handle_t hkey; /* handle to the key */
1322 /* Enumerate registry subkeys */
1324 obj_handle_t hkey; /* handle to registry key */
1325 int index; /* index of subkey (or -1 for current key) */
1326 int info_class; /* requested information class */
1328 int subkeys; /* number of subkeys */
1329 int max_subkey; /* longest subkey name */
1330 int max_class; /* longest class name */
1331 int values; /* number of values */
1332 int max_value; /* longest value name */
1333 int max_data; /* longest value data */
1334 time_t modif; /* last modification time */
1335 data_size_t total; /* total length needed for full name and class */
1336 data_size_t namelen; /* length of key name in bytes */
1337 VARARG(name,unicode_str,namelen); /* key name */
1338 VARARG(class,unicode_str); /* class name */
1342 /* Set a value of a registry key */
1344 obj_handle_t hkey; /* handle to registry key */
1345 int type; /* value type */
1346 data_size_t namelen; /* length of value name in bytes */
1347 VARARG(name,unicode_str,namelen); /* value name */
1348 VARARG(data,bytes); /* value data */
1352 /* Retrieve the value of a registry key */
1354 obj_handle_t hkey; /* handle to registry key */
1355 VARARG(name,unicode_str); /* value name */
1357 int type; /* value type */
1358 data_size_t total; /* total length needed for data */
1359 VARARG(data,bytes); /* value data */
1363 /* Enumerate a value of a registry key */
1364 @REQ(enum_key_value)
1365 obj_handle_t hkey; /* handle to registry key */
1366 int index; /* value index */
1367 int info_class; /* requested information class */
1369 int type; /* value type */
1370 data_size_t total; /* total length needed for full name and data */
1371 data_size_t namelen; /* length of value name in bytes */
1372 VARARG(name,unicode_str,namelen); /* value name */
1373 VARARG(data,bytes); /* value data */
1377 /* Delete a value of a registry key */
1378 @REQ(delete_key_value)
1379 obj_handle_t hkey; /* handle to registry key */
1380 VARARG(name,unicode_str); /* value name */
1384 /* Load a registry branch from a file */
1386 obj_handle_t hkey; /* root key to load to */
1387 obj_handle_t file; /* file to load from */
1388 VARARG(name,unicode_str); /* subkey name */
1392 /* UnLoad a registry branch from a file */
1393 @REQ(unload_registry)
1394 obj_handle_t hkey; /* root key to unload to */
1398 /* Save a registry branch to a file */
1400 obj_handle_t hkey; /* key to save */
1401 obj_handle_t file; /* file to save to */
1405 /* Add a registry key change notification */
1406 @REQ(set_registry_notification)
1407 obj_handle_t hkey; /* key to watch for changes */
1408 obj_handle_t event; /* event to set */
1409 int subtree; /* should we watch the whole subtree? */
1410 unsigned int filter; /* things to watch */
1414 /* Create a waitable timer */
1416 unsigned int access; /* wanted access rights */
1417 unsigned int attributes; /* object attributes */
1418 obj_handle_t rootdir; /* root directory */
1419 int manual; /* manual reset */
1420 VARARG(name,unicode_str); /* object name */
1422 obj_handle_t handle; /* handle to the timer */
1426 /* Open a waitable timer */
1428 unsigned int access; /* wanted access rights */
1429 unsigned int attributes; /* object attributes */
1430 obj_handle_t rootdir; /* root directory */
1431 VARARG(name,unicode_str); /* object name */
1433 obj_handle_t handle; /* handle to the timer */
1436 /* Set a waitable timer */
1438 obj_handle_t handle; /* handle to the timer */
1439 abs_time_t expire; /* next expiration absolute time */
1440 int period; /* timer period in ms */
1441 void* callback; /* callback function */
1442 void* arg; /* callback argument */
1444 int signaled; /* was the timer signaled before this call ? */
1447 /* Cancel a waitable timer */
1449 obj_handle_t handle; /* handle to the timer */
1451 int signaled; /* was the timer signaled before this calltime ? */
1454 /* Get information on a waitable timer */
1455 @REQ(get_timer_info)
1456 obj_handle_t handle; /* handle to the timer */
1458 abs_time_t when; /* absolute time when the timer next expires */
1459 int signaled; /* is the timer signaled? */
1463 /* Retrieve the current context of a thread */
1464 @REQ(get_thread_context)
1465 obj_handle_t handle; /* thread handle */
1466 unsigned int flags; /* context flags */
1467 int suspend; /* if getting context during suspend */
1469 int self; /* was it a handle to the current thread? */
1470 VARARG(context,context); /* thread context */
1474 /* Set the current context of a thread */
1475 @REQ(set_thread_context)
1476 obj_handle_t handle; /* thread handle */
1477 unsigned int flags; /* context flags */
1478 int suspend; /* if setting context during suspend */
1479 VARARG(context,context); /* thread context */
1481 int self; /* was it a handle to the current thread? */
1485 /* Fetch a selector entry for a thread */
1486 @REQ(get_selector_entry)
1487 obj_handle_t handle; /* thread handle */
1488 int entry; /* LDT entry */
1490 unsigned int base; /* selector base */
1491 unsigned int limit; /* selector limit */
1492 unsigned char flags; /* selector flags */
1498 obj_handle_t table; /* which table to add atom to */
1499 VARARG(name,unicode_str); /* atom name */
1501 atom_t atom; /* resulting atom */
1505 /* Delete an atom */
1507 obj_handle_t table; /* which table to delete atom from */
1508 atom_t atom; /* atom handle */
1514 obj_handle_t table; /* which table to find atom from */
1515 VARARG(name,unicode_str); /* atom name */
1517 atom_t atom; /* atom handle */
1521 /* Get information about an atom */
1522 @REQ(get_atom_information)
1523 obj_handle_t table; /* which table to find atom from */
1524 atom_t atom; /* atom handle */
1526 int count; /* atom lock count */
1527 int pinned; /* whether the atom has been pinned */
1528 data_size_t total; /* actual length of atom name */
1529 VARARG(name,unicode_str); /* atom name */
1533 /* Set information about an atom */
1534 @REQ(set_atom_information)
1535 obj_handle_t table; /* which table to find atom from */
1536 atom_t atom; /* atom handle */
1537 int pinned; /* whether to bump atom information */
1541 /* Empty an atom table */
1542 @REQ(empty_atom_table)
1543 obj_handle_t table; /* which table to find atom from */
1544 int if_pinned; /* whether to delete pinned atoms */
1548 /* Init an atom table */
1549 @REQ(init_atom_table)
1550 int entries; /* number of entries (only for local) */
1552 obj_handle_t table; /* handle to the atom table */
1556 /* Get the message queue of the current thread */
1559 obj_handle_t handle; /* handle to the queue */
1563 /* Set the current message queue wakeup mask */
1564 @REQ(set_queue_mask)
1565 unsigned int wake_mask; /* wakeup bits mask */
1566 unsigned int changed_mask; /* changed bits mask */
1567 int skip_wait; /* will we skip waiting if signaled? */
1569 unsigned int wake_bits; /* current wake bits */
1570 unsigned int changed_bits; /* current changed bits */
1574 /* Get the current message queue status */
1575 @REQ(get_queue_status)
1576 int clear; /* should we clear the change bits? */
1578 unsigned int wake_bits; /* wake bits */
1579 unsigned int changed_bits; /* changed bits since last time */
1583 /* Retrieve the process idle event */
1584 @REQ(get_process_idle_event)
1585 obj_handle_t handle; /* process handle */
1587 obj_handle_t event; /* handle to idle event */
1591 /* Send a message to a thread queue */
1593 thread_id_t id; /* thread id */
1594 int type; /* message type (see below) */
1595 int flags; /* message flags (see below) */
1596 user_handle_t win; /* window handle */
1597 unsigned int msg; /* message code */
1598 unsigned long wparam; /* parameters */
1599 unsigned long lparam; /* parameters */
1600 int timeout; /* timeout for reply */
1601 VARARG(data,message_data); /* message data for sent messages */
1604 @REQ(post_quit_message)
1605 int exit_code; /* exit code to return */
1610 MSG_ASCII, /* Ascii message (from SendMessageA) */
1611 MSG_UNICODE, /* Unicode message (from SendMessageW) */
1612 MSG_NOTIFY, /* notify message (from SendNotifyMessageW), always Unicode */
1613 MSG_CALLBACK, /* callback message (from SendMessageCallbackW), always Unicode */
1614 MSG_CALLBACK_RESULT,/* result of a callback message */
1615 MSG_OTHER_PROCESS, /* sent from other process, may include vararg data, always Unicode */
1616 MSG_POSTED, /* posted message (from PostMessageW), always Unicode */
1617 MSG_HARDWARE, /* hardware message */
1618 MSG_WINEVENT /* winevent message */
1620 #define SEND_MSG_ABORT_IF_HUNG 0x01
1623 /* Send a hardware message to a thread queue */
1624 @REQ(send_hardware_message)
1625 thread_id_t id; /* thread id */
1626 user_handle_t win; /* window handle */
1627 unsigned int msg; /* message code */
1628 unsigned int time; /* message time */
1629 unsigned long wparam; /* parameters */
1630 unsigned long lparam; /* parameters */
1631 unsigned long info; /* extra info */
1632 int x; /* x position */
1633 int y; /* y position */
1637 /* Get a message from the current queue */
1639 int flags; /* see below */
1640 user_handle_t get_win; /* window handle to get */
1641 unsigned int get_first; /* first message code to get */
1642 unsigned int get_last; /* last message code to get */
1643 unsigned int hw_id; /* id of the previous hardware message (or 0) */
1645 user_handle_t win; /* window handle */
1646 int type; /* message type */
1647 unsigned int msg; /* message code */
1648 unsigned long wparam; /* parameters */
1649 unsigned long lparam; /* parameters */
1650 unsigned long info; /* extra info */
1651 int x; /* x position */
1652 int y; /* y position */
1653 unsigned int time; /* message time */
1654 unsigned int hw_id; /* id if hardware message */
1655 unsigned int active_hooks; /* active hooks bitmap */
1656 data_size_t total; /* total size of extra data */
1657 VARARG(data,message_data); /* message data for sent messages */
1659 #define GET_MSG_REMOVE 1 /* remove the message */
1660 #define GET_MSG_SENT_ONLY 2 /* only get sent messages */
1662 /* Reply to a sent message */
1664 unsigned int result; /* message result */
1665 int remove; /* should we remove the message? */
1666 VARARG(data,bytes); /* message data for sent messages */
1670 /* Accept the current hardware message */
1671 @REQ(accept_hardware_message)
1672 unsigned int hw_id; /* id of the hardware message */
1673 int remove; /* should we remove the message? */
1674 user_handle_t new_win; /* new destination window for current message */
1678 /* Retrieve the reply for the last message sent */
1679 @REQ(get_message_reply)
1680 int cancel; /* cancel message if not ready? */
1682 unsigned int result; /* message result */
1683 VARARG(data,bytes); /* message data for sent messages */
1687 /* Set a window timer */
1689 user_handle_t win; /* window handle */
1690 unsigned int msg; /* message to post */
1691 unsigned int rate; /* timer rate in ms */
1692 unsigned long id; /* timer id */
1693 unsigned long lparam; /* message lparam (callback proc) */
1695 unsigned long id; /* timer id */
1699 /* Kill a window timer */
1700 @REQ(kill_win_timer)
1701 user_handle_t win; /* window handle */
1702 unsigned int msg; /* message to post */
1703 unsigned long id; /* timer id */
1707 /* Retrieve info about a serial port */
1708 @REQ(get_serial_info)
1709 obj_handle_t handle; /* handle to comm port */
1711 unsigned int readinterval;
1712 unsigned int readconst;
1713 unsigned int readmult;
1714 unsigned int writeconst;
1715 unsigned int writemult;
1716 unsigned int eventmask;
1720 /* Set info about a serial port */
1721 @REQ(set_serial_info)
1722 obj_handle_t handle; /* handle to comm port */
1723 int flags; /* bitmask to set values (see below) */
1724 unsigned int readinterval;
1725 unsigned int readconst;
1726 unsigned int readmult;
1727 unsigned int writeconst;
1728 unsigned int writemult;
1729 unsigned int eventmask;
1731 #define SERIALINFO_SET_TIMEOUTS 0x01
1732 #define SERIALINFO_SET_MASK 0x02
1735 /* Create an async I/O */
1736 @REQ(register_async)
1737 obj_handle_t handle; /* handle to comm port, socket or file */
1738 int type; /* type of queue to look after */
1739 void* io_apc; /* APC routine to queue upon end of async */
1740 void* io_sb; /* I/O status block (unique across all async on this handle) */
1741 void* io_user; /* data to pass back to caller */
1742 int count; /* count - usually # of bytes to be read/written */
1744 #define ASYNC_TYPE_READ 0x01
1745 #define ASYNC_TYPE_WRITE 0x02
1746 #define ASYNC_TYPE_WAIT 0x03
1749 /* Cancel all async op on a fd */
1751 obj_handle_t handle; /* handle to comm port, socket or file */
1755 /* Create a named pipe */
1756 @REQ(create_named_pipe)
1757 unsigned int access;
1758 unsigned int attributes; /* object attributes */
1759 obj_handle_t rootdir; /* root directory */
1760 unsigned int options;
1762 unsigned int maxinstances;
1763 unsigned int outsize;
1764 unsigned int insize;
1765 unsigned int timeout;
1766 VARARG(name,unicode_str); /* pipe name */
1768 obj_handle_t handle; /* handle to the pipe */
1771 /* flags in create_named_pipe and get_named_pipe_info */
1772 #define NAMED_PIPE_MESSAGE_STREAM_WRITE 0x0001
1773 #define NAMED_PIPE_MESSAGE_STREAM_READ 0x0002
1774 #define NAMED_PIPE_NONBLOCKING_MODE 0x0004
1775 #define NAMED_PIPE_SERVER_END 0x8000
1777 /* Open an existing named pipe */
1778 @REQ(open_named_pipe)
1779 unsigned int access;
1780 unsigned int attributes; /* object attributes */
1781 obj_handle_t rootdir; /* root directory */
1782 unsigned int flags; /* file flags */
1783 VARARG(name,unicode_str); /* pipe name */
1785 obj_handle_t handle; /* handle to the pipe */
1789 /* Connect to a named pipe */
1790 @REQ(connect_named_pipe)
1791 obj_handle_t handle;
1797 /* Wait for a named pipe */
1798 @REQ(wait_named_pipe)
1799 obj_handle_t handle;
1800 unsigned int timeout;
1803 VARARG(name,unicode_str); /* pipe name */
1807 /* Disconnect a named pipe */
1808 @REQ(disconnect_named_pipe)
1809 obj_handle_t handle;
1813 @REQ(get_named_pipe_info)
1814 obj_handle_t handle;
1817 unsigned int maxinstances;
1818 unsigned int instances;
1819 unsigned int outsize;
1820 unsigned int insize;
1824 /* Create a window */
1826 user_handle_t parent; /* parent window */
1827 user_handle_t owner; /* owner window */
1828 atom_t atom; /* class atom */
1829 void* instance; /* module instance */
1831 user_handle_t handle; /* created window */
1832 user_handle_t parent; /* full handle of parent */
1833 user_handle_t owner; /* full handle of owner */
1834 int extra; /* number of extra bytes */
1835 void* class_ptr; /* pointer to class in client address space */
1839 /* Destroy a window */
1840 @REQ(destroy_window)
1841 user_handle_t handle; /* handle to the window */
1845 /* Retrieve the desktop window for the current thread */
1846 @REQ(get_desktop_window)
1847 int force; /* force creation if it doesn't exist */
1849 user_handle_t handle; /* handle to the desktop window */
1853 /* Set a window owner */
1854 @REQ(set_window_owner)
1855 user_handle_t handle; /* handle to the window */
1856 user_handle_t owner; /* new owner */
1858 user_handle_t full_owner; /* full handle of new owner */
1859 user_handle_t prev_owner; /* full handle of previous owner */
1863 /* Get information from a window handle */
1864 @REQ(get_window_info)
1865 user_handle_t handle; /* handle to the window */
1867 user_handle_t full_handle; /* full 32-bit handle */
1868 user_handle_t last_active; /* last active popup */
1869 process_id_t pid; /* process owning the window */
1870 thread_id_t tid; /* thread owning the window */
1871 atom_t atom; /* class atom */
1872 int is_unicode; /* ANSI or unicode */
1876 /* Set some information in a window */
1877 @REQ(set_window_info)
1878 unsigned int flags; /* flags for fields to set (see below) */
1879 user_handle_t handle; /* handle to the window */
1880 unsigned int style; /* window style */
1881 unsigned int ex_style; /* window extended style */
1882 unsigned int id; /* window id */
1883 int is_unicode; /* ANSI or unicode */
1884 void* instance; /* creator instance */
1885 unsigned long user_data; /* user-specific data */
1886 int extra_offset; /* offset to set in extra bytes */
1887 data_size_t extra_size; /* size to set in extra bytes */
1888 unsigned long extra_value; /* value to set in extra bytes */
1890 unsigned int old_style; /* old window style */
1891 unsigned int old_ex_style; /* old window extended style */
1892 unsigned int old_id; /* old window id */
1893 void* old_instance; /* old creator instance */
1894 unsigned long old_user_data; /* old user-specific data */
1895 unsigned long old_extra_value; /* old value in extra bytes */
1897 #define SET_WIN_STYLE 0x01
1898 #define SET_WIN_EXSTYLE 0x02
1899 #define SET_WIN_ID 0x04
1900 #define SET_WIN_INSTANCE 0x08
1901 #define SET_WIN_USERDATA 0x10
1902 #define SET_WIN_EXTRA 0x20
1903 #define SET_WIN_UNICODE 0x40
1906 /* Set the parent of a window */
1908 user_handle_t handle; /* handle to the window */
1909 user_handle_t parent; /* handle to the parent */
1911 user_handle_t old_parent; /* old parent window */
1912 user_handle_t full_parent; /* full handle of new parent */
1916 /* Get a list of the window parents, up to the root of the tree */
1917 @REQ(get_window_parents)
1918 user_handle_t handle; /* handle to the window */
1920 int count; /* total count of parents */
1921 VARARG(parents,user_handles); /* parent handles */
1925 /* Get a list of the window children */
1926 @REQ(get_window_children)
1927 user_handle_t parent; /* parent window */
1928 atom_t atom; /* class atom for the listed children */
1929 thread_id_t tid; /* thread owning the listed children */
1931 int count; /* total count of children */
1932 VARARG(children,user_handles); /* children handles */
1936 /* Get a list of the window children that contain a given point */
1937 @REQ(get_window_children_from_point)
1938 user_handle_t parent; /* parent window */
1939 int x; /* point in parent coordinates */
1942 int count; /* total count of children */
1943 VARARG(children,user_handles); /* children handles */
1947 /* Get window tree information from a window handle */
1948 @REQ(get_window_tree)
1949 user_handle_t handle; /* handle to the window */
1951 user_handle_t parent; /* parent window */
1952 user_handle_t owner; /* owner window */
1953 user_handle_t next_sibling; /* next sibling in Z-order */
1954 user_handle_t prev_sibling; /* prev sibling in Z-order */
1955 user_handle_t first_sibling; /* first sibling in Z-order */
1956 user_handle_t last_sibling; /* last sibling in Z-order */
1957 user_handle_t first_child; /* first child */
1958 user_handle_t last_child; /* last child */
1961 /* Set the position and Z order of a window */
1962 @REQ(set_window_pos)
1963 unsigned int flags; /* SWP_* flags */
1964 user_handle_t handle; /* handle to the window */
1965 user_handle_t previous; /* previous window in Z order */
1966 rectangle_t window; /* window rectangle */
1967 rectangle_t client; /* client rectangle */
1968 VARARG(valid,rectangles); /* valid rectangles from WM_NCCALCSIZE */
1970 unsigned int new_style; /* new window style */
1974 /* Get the window and client rectangles of a window */
1975 @REQ(get_window_rectangles)
1976 user_handle_t handle; /* handle to the window */
1978 rectangle_t window; /* window rectangle */
1979 rectangle_t visible; /* visible part of the window rectangle */
1980 rectangle_t client; /* client rectangle */
1984 /* Get the window text */
1985 @REQ(get_window_text)
1986 user_handle_t handle; /* handle to the window */
1988 VARARG(text,unicode_str); /* window text */
1992 /* Set the window text */
1993 @REQ(set_window_text)
1994 user_handle_t handle; /* handle to the window */
1995 VARARG(text,unicode_str); /* window text */
1999 /* Get the coordinates offset between two windows */
2000 @REQ(get_windows_offset)
2001 user_handle_t from; /* handle to the first window */
2002 user_handle_t to; /* handle to the second window */
2004 int x; /* x coordinate offset */
2005 int y; /* y coordinate offset */
2009 /* Get the visible region of a window */
2010 @REQ(get_visible_region)
2011 user_handle_t window; /* handle to the window */
2012 unsigned int flags; /* DCX flags */
2014 user_handle_t top_win; /* top window to clip against */
2015 rectangle_t top_rect; /* top window visible rect with screen coords */
2016 rectangle_t win_rect; /* window rect in screen coords */
2017 data_size_t total_size; /* total size of the resulting region */
2018 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2022 /* Get the window region */
2023 @REQ(get_window_region)
2024 user_handle_t window; /* handle to the window */
2026 data_size_t total_size; /* total size of the resulting region */
2027 VARARG(region,rectangles); /* list of rectangles for the region */
2031 /* Set the window region */
2032 @REQ(set_window_region)
2033 user_handle_t window; /* handle to the window */
2034 VARARG(region,rectangles); /* list of rectangles for the region */
2038 /* Get the window update region */
2039 @REQ(get_update_region)
2040 user_handle_t window; /* handle to the window */
2041 user_handle_t from_child; /* child to start searching from */
2042 unsigned int flags; /* update flags (see below) */
2044 user_handle_t child; /* child to repaint (or window itself) */
2045 unsigned int flags; /* resulting update flags (see below) */
2046 data_size_t total_size; /* total size of the resulting region */
2047 VARARG(region,rectangles); /* list of rectangles for the region */
2049 #define UPDATE_NONCLIENT 0x01 /* get region for repainting non-client area */
2050 #define UPDATE_ERASE 0x02 /* get region for erasing client area */
2051 #define UPDATE_PAINT 0x04 /* get region for painting client area */
2052 #define UPDATE_INTERNALPAINT 0x08 /* get region if internal paint is pending */
2053 #define UPDATE_ALLCHILDREN 0x10 /* force repaint of all children */
2054 #define UPDATE_NOCHILDREN 0x20 /* don't try to repaint any children */
2055 #define UPDATE_NOREGION 0x40 /* don't return a region, only the flags */
2058 /* Update the z order of a window so that a given rectangle is fully visible */
2059 @REQ(update_window_zorder)
2060 user_handle_t window; /* handle to the window */
2061 rectangle_t rect; /* rectangle that must be visible */
2065 /* Mark parts of a window as needing a redraw */
2067 user_handle_t window; /* handle to the window */
2068 unsigned int flags; /* RDW_* flags */
2069 VARARG(region,rectangles); /* list of rectangles for the region */
2073 /* Set a window property */
2074 @REQ(set_window_property)
2075 user_handle_t window; /* handle to the window */
2076 atom_t atom; /* property atom (if no name specified) */
2077 obj_handle_t handle; /* handle to store */
2078 VARARG(name,unicode_str); /* property name */
2082 /* Remove a window property */
2083 @REQ(remove_window_property)
2084 user_handle_t window; /* handle to the window */
2085 atom_t atom; /* property atom (if no name specified) */
2086 VARARG(name,unicode_str); /* property name */
2088 obj_handle_t handle; /* handle stored in property */
2092 /* Get a window property */
2093 @REQ(get_window_property)
2094 user_handle_t window; /* handle to the window */
2095 atom_t atom; /* property atom (if no name specified) */
2096 VARARG(name,unicode_str); /* property name */
2098 obj_handle_t handle; /* handle stored in property */
2102 /* Get the list of properties of a window */
2103 @REQ(get_window_properties)
2104 user_handle_t window; /* handle to the window */
2106 int total; /* total number of properties */
2107 VARARG(props,properties); /* list of properties */
2111 /* Create a window station */
2112 @REQ(create_winstation)
2113 unsigned int flags; /* window station flags */
2114 unsigned int access; /* wanted access rights */
2115 unsigned int attributes; /* object attributes */
2116 VARARG(name,unicode_str); /* object name */
2118 obj_handle_t handle; /* handle to the window station */
2122 /* Open a handle to a window station */
2123 @REQ(open_winstation)
2124 unsigned int access; /* wanted access rights */
2125 unsigned int attributes; /* object attributes */
2126 VARARG(name,unicode_str); /* object name */
2128 obj_handle_t handle; /* handle to the window station */
2132 /* Close a window station */
2133 @REQ(close_winstation)
2134 obj_handle_t handle; /* handle to the window station */
2138 /* Get the process current window station */
2139 @REQ(get_process_winstation)
2141 obj_handle_t handle; /* handle to the window station */
2145 /* Set the process current window station */
2146 @REQ(set_process_winstation)
2147 obj_handle_t handle; /* handle to the window station */
2151 /* Create a desktop */
2152 @REQ(create_desktop)
2153 unsigned int flags; /* desktop flags */
2154 unsigned int access; /* wanted access rights */
2155 unsigned int attributes; /* object attributes */
2156 VARARG(name,unicode_str); /* object name */
2158 obj_handle_t handle; /* handle to the desktop */
2162 /* Open a handle to a desktop */
2164 unsigned int flags; /* desktop flags */
2165 unsigned int access; /* wanted access rights */
2166 unsigned int attributes; /* object attributes */
2167 VARARG(name,unicode_str); /* object name */
2169 obj_handle_t handle; /* handle to the desktop */
2173 /* Close a desktop */
2175 obj_handle_t handle; /* handle to the desktop */
2179 /* Get the thread current desktop */
2180 @REQ(get_thread_desktop)
2181 thread_id_t tid; /* thread id */
2183 obj_handle_t handle; /* handle to the desktop */
2187 /* Set the thread current desktop */
2188 @REQ(set_thread_desktop)
2189 obj_handle_t handle; /* handle to the desktop */
2193 /* Get/set information about a user object (window station or desktop) */
2194 @REQ(set_user_object_info)
2195 obj_handle_t handle; /* handle to the object */
2196 unsigned int flags; /* information to set */
2197 unsigned int obj_flags; /* new object flags */
2199 int is_desktop; /* is object a desktop? */
2200 unsigned int old_obj_flags; /* old object flags */
2201 VARARG(name,unicode_str); /* object name */
2203 #define SET_USER_OBJECT_FLAGS 1
2206 /* Attach (or detach) thread inputs */
2207 @REQ(attach_thread_input)
2208 thread_id_t tid_from; /* thread to be attached */
2209 thread_id_t tid_to; /* thread to which tid_from should be attached */
2210 int attach; /* is it an attach? */
2214 /* Get input data for a given thread */
2215 @REQ(get_thread_input)
2216 thread_id_t tid; /* id of thread */
2218 user_handle_t focus; /* handle to the focus window */
2219 user_handle_t capture; /* handle to the capture window */
2220 user_handle_t active; /* handle to the active window */
2221 user_handle_t foreground; /* handle to the global foreground window */
2222 user_handle_t menu_owner; /* handle to the menu owner */
2223 user_handle_t move_size; /* handle to the moving/resizing window */
2224 user_handle_t caret; /* handle to the caret window */
2225 rectangle_t rect; /* caret rectangle */
2229 /* Get the time of the last input event */
2230 @REQ(get_last_input_time)
2236 /* Retrieve queue keyboard state for a given thread */
2238 thread_id_t tid; /* id of thread */
2239 int key; /* optional key code or -1 */
2241 unsigned char state; /* state of specified key */
2242 VARARG(keystate,bytes); /* state array for all the keys */
2245 /* Set queue keyboard state for a given thread */
2247 thread_id_t tid; /* id of thread */
2248 VARARG(keystate,bytes); /* state array for all the keys */
2251 /* Set the system foreground window */
2252 @REQ(set_foreground_window)
2253 user_handle_t handle; /* handle to the foreground window */
2255 user_handle_t previous; /* handle to the previous foreground window */
2256 int send_msg_old; /* whether we have to send a msg to the old window */
2257 int send_msg_new; /* whether we have to send a msg to the new window */
2260 /* Set the current thread focus window */
2261 @REQ(set_focus_window)
2262 user_handle_t handle; /* handle to the focus window */
2264 user_handle_t previous; /* handle to the previous focus window */
2267 /* Set the current thread active window */
2268 @REQ(set_active_window)
2269 user_handle_t handle; /* handle to the active window */
2271 user_handle_t previous; /* handle to the previous active window */
2274 /* Set the current thread capture window */
2275 @REQ(set_capture_window)
2276 user_handle_t handle; /* handle to the capture window */
2277 unsigned int flags; /* capture flags (see below) */
2279 user_handle_t previous; /* handle to the previous capture window */
2280 user_handle_t full_handle; /* full 32-bit handle of new capture window */
2282 #define CAPTURE_MENU 0x01 /* capture is for a menu */
2283 #define CAPTURE_MOVESIZE 0x02 /* capture is for moving/resizing */
2286 /* Set the current thread caret window */
2287 @REQ(set_caret_window)
2288 user_handle_t handle; /* handle to the caret window */
2289 int width; /* caret width */
2290 int height; /* caret height */
2292 user_handle_t previous; /* handle to the previous caret window */
2293 rectangle_t old_rect; /* previous caret rectangle */
2294 int old_hide; /* previous hide count */
2295 int old_state; /* previous caret state (1=on, 0=off) */
2299 /* Set the current thread caret information */
2300 @REQ(set_caret_info)
2301 unsigned int flags; /* caret flags (see below) */
2302 user_handle_t handle; /* handle to the caret window */
2303 int x; /* caret x position */
2304 int y; /* caret y position */
2305 int hide; /* increment for hide count (can be negative to show it) */
2306 int state; /* caret state (1=on, 0=off, -1=toggle current state) */
2308 user_handle_t full_handle; /* handle to the current caret window */
2309 rectangle_t old_rect; /* previous caret rectangle */
2310 int old_hide; /* previous hide count */
2311 int old_state; /* previous caret state (1=on, 0=off) */
2313 #define SET_CARET_POS 0x01 /* set the caret position from x,y */
2314 #define SET_CARET_HIDE 0x02 /* increment the caret hide count */
2315 #define SET_CARET_STATE 0x04 /* set the caret on/off state */
2318 /* Set a window hook */
2320 int id; /* id of the hook */
2321 process_id_t pid; /* id of process to set the hook into */
2322 thread_id_t tid; /* id of thread to set the hook into */
2326 void* proc; /* hook procedure */
2327 int unicode; /* is it a unicode hook? */
2328 VARARG(module,unicode_str); /* module name */
2330 user_handle_t handle; /* handle to the hook */
2331 unsigned int active_hooks; /* active hooks bitmap */
2335 /* Remove a window hook */
2337 user_handle_t handle; /* handle to the hook */
2338 int id; /* id of the hook if handle is 0 */
2339 void* proc; /* hook procedure if handle is 0 */
2341 unsigned int active_hooks; /* active hooks bitmap */
2345 /* Start calling a hook chain */
2346 @REQ(start_hook_chain)
2347 int id; /* id of the hook */
2348 int event; /* signalled event */
2349 user_handle_t window; /* handle to the event window */
2350 int object_id; /* object id for out of context winevent */
2351 int child_id; /* child id for out of context winevent */
2353 user_handle_t handle; /* handle to the next hook */
2354 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2355 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2356 void* proc; /* hook procedure */
2357 int unicode; /* is it a unicode hook? */
2358 unsigned int active_hooks; /* active hooks bitmap */
2359 VARARG(module,unicode_str); /* module name */
2363 /* Finished calling a hook chain */
2364 @REQ(finish_hook_chain)
2365 int id; /* id of the hook */
2369 /* Get the hook information */
2371 user_handle_t handle; /* handle to the current hook */
2372 int get_next; /* do we want info about current or next hook? */
2373 int event; /* signalled event */
2374 user_handle_t window; /* handle to the event window */
2375 int object_id; /* object id for out of context winevent */
2376 int child_id; /* child id for out of context winevent */
2378 user_handle_t handle; /* handle to the hook */
2379 int id; /* id of the hook */
2380 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2381 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2382 void* proc; /* hook procedure */
2383 int unicode; /* is it a unicode hook? */
2384 VARARG(module,unicode_str); /* module name */
2388 /* Create a window class */
2390 int local; /* is it a local class? */
2391 atom_t atom; /* class atom */
2392 unsigned int style; /* class style */
2393 void* instance; /* module instance */
2394 int extra; /* number of extra class bytes */
2395 int win_extra; /* number of window extra bytes */
2396 void* client_ptr; /* pointer to class in client address space */
2400 /* Destroy a window class */
2402 atom_t atom; /* class atom */
2403 void* instance; /* module instance */
2405 void* client_ptr; /* pointer to class in client address space */
2409 /* Set some information in a class */
2410 @REQ(set_class_info)
2411 user_handle_t window; /* handle to the window */
2412 unsigned int flags; /* flags for info to set (see below) */
2413 atom_t atom; /* class atom */
2414 unsigned int style; /* class style */
2415 int win_extra; /* number of window extra bytes */
2416 void* instance; /* module instance */
2417 int extra_offset; /* offset to set in extra bytes */
2418 data_size_t extra_size; /* size to set in extra bytes */
2419 unsigned long extra_value; /* value to set in extra bytes */
2421 atom_t old_atom; /* previous class atom */
2422 unsigned int old_style; /* previous class style */
2423 int old_extra; /* previous number of class extra bytes */
2424 int old_win_extra; /* previous number of window extra bytes */
2425 void* old_instance; /* previous module instance */
2426 unsigned long old_extra_value; /* old value in extra bytes */
2428 #define SET_CLASS_ATOM 0x0001
2429 #define SET_CLASS_STYLE 0x0002
2430 #define SET_CLASS_WINEXTRA 0x0004
2431 #define SET_CLASS_INSTANCE 0x0008
2432 #define SET_CLASS_EXTRA 0x0010
2435 /* Set/get clipboard information */
2436 @REQ(set_clipboard_info)
2437 unsigned int flags; /* flags for fields to set (see below) */
2438 user_handle_t clipboard; /* clipboard window */
2439 user_handle_t owner; /* clipboard owner */
2440 user_handle_t viewer; /* first clipboard viewer */
2441 unsigned int seqno; /* change sequence number */
2443 unsigned int flags; /* status flags (see below) */
2444 user_handle_t old_clipboard; /* old clipboard window */
2445 user_handle_t old_owner; /* old clipboard owner */
2446 user_handle_t old_viewer; /* old clipboard viewer */
2447 unsigned int seqno; /* current sequence number */
2450 #define SET_CB_OPEN 0x001
2451 #define SET_CB_OWNER 0x002
2452 #define SET_CB_VIEWER 0x004
2453 #define SET_CB_SEQNO 0x008
2454 #define SET_CB_RELOWNER 0x010
2455 #define SET_CB_CLOSE 0x020
2456 #define CB_OPEN 0x040
2457 #define CB_OWNER 0x080
2458 #define CB_PROCESS 0x100
2461 /* Open a security token */
2463 obj_handle_t handle; /* handle to the thread or process */
2464 unsigned int access; /* access rights to the new token */
2465 unsigned int attributes;/* object attributes */
2466 unsigned int flags; /* flags (see below) */
2468 obj_handle_t token; /* handle to the token */
2470 #define OPEN_TOKEN_THREAD 1
2471 #define OPEN_TOKEN_AS_SELF 2
2474 /* Set/get the global windows */
2475 @REQ(set_global_windows)
2476 unsigned int flags; /* flags for fields to set (see below) */
2477 user_handle_t shell_window; /* handle to the new shell window */
2478 user_handle_t shell_listview; /* handle to the new shell listview window */
2479 user_handle_t progman_window; /* handle to the new program manager window */
2480 user_handle_t taskman_window; /* handle to the new task manager window */
2482 user_handle_t old_shell_window; /* handle to the shell window */
2483 user_handle_t old_shell_listview; /* handle to the shell listview window */
2484 user_handle_t old_progman_window; /* handle to the new program manager window */
2485 user_handle_t old_taskman_window; /* handle to the new task manager window */
2487 #define SET_GLOBAL_SHELL_WINDOWS 0x01 /* set both main shell and listview windows */
2488 #define SET_GLOBAL_PROGMAN_WINDOW 0x02
2489 #define SET_GLOBAL_TASKMAN_WINDOW 0x04
2491 /* Adjust the privileges held by a token */
2492 @REQ(adjust_token_privileges)
2493 obj_handle_t handle; /* handle to the token */
2494 int disable_all; /* disable all privileges? */
2495 int get_modified_state; /* get modified privileges? */
2496 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to enable/disable/remove */
2498 unsigned int len; /* total length in bytes required to store token privileges */
2499 VARARG(privileges,LUID_AND_ATTRIBUTES); /* modified privileges */
2502 /* Retrieves the set of privileges held by or available to a token */
2503 @REQ(get_token_privileges)
2504 obj_handle_t handle; /* handle to the token */
2506 unsigned int len; /* total length in bytes required to store token privileges */
2507 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
2510 /* Check the token has the required privileges */
2511 @REQ(check_token_privileges)
2512 obj_handle_t handle; /* handle to the token */
2513 int all_required; /* are all the privileges required for the check to succeed? */
2514 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to check */
2516 int has_privileges; /* does the token have the required privileges? */
2517 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
2520 @REQ(duplicate_token)
2521 obj_handle_t handle; /* handle to the token to duplicate */
2522 unsigned int access; /* access rights to the new token */
2523 unsigned int attributes; /* object attributes */
2524 int primary; /* is the new token to be a primary one? */
2525 int impersonation_level; /* impersonation level of the new token */
2527 obj_handle_t new_handle; /* duplicated handle */
2531 obj_handle_t handle; /* handle to the token */
2532 unsigned int desired_access; /* desired access to the object */
2533 unsigned int mapping_read; /* mapping from generic read to specific rights */
2534 unsigned int mapping_write; /* mapping from generic write to specific rights */
2535 unsigned int mapping_execute; /* mapping from generic execute to specific rights */
2536 unsigned int mapping_all; /* mapping from generic all to specific rights */
2537 VARARG(sd,security_descriptor); /* security descriptor to check */
2539 unsigned int access_granted; /* access rights actually granted */
2540 unsigned int access_status; /* was access granted? */
2541 unsigned int privileges_len; /* length needed to store privileges */
2542 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges used during access check */
2545 @REQ(get_token_user)
2546 obj_handle_t handle; /* handle to the token */
2548 data_size_t user_len; /* length needed to store user */
2549 VARARG(user,SID); /* sid of the user the token represents */
2552 @REQ(get_token_groups)
2553 obj_handle_t handle; /* handle to the token */
2555 data_size_t user_len; /* length needed to store user */
2556 VARARG(user,token_groups); /* groups the token's user belongs to */
2559 /* Create a mailslot */
2560 @REQ(create_mailslot)
2561 unsigned int access; /* wanted access rights */
2562 unsigned int attributes; /* object attributes */
2563 obj_handle_t rootdir; /* root directory */
2564 unsigned int max_msgsize;
2566 VARARG(name,unicode_str); /* mailslot name */
2568 obj_handle_t handle; /* handle to the mailslot */
2572 /* Open an existing mailslot */
2574 unsigned int access;
2575 unsigned int attributes; /* object attributes */
2576 obj_handle_t rootdir; /* root directory */
2577 unsigned int sharing; /* sharing mode */
2578 VARARG(name,unicode_str); /* mailslot name */
2580 obj_handle_t handle; /* handle to the mailslot */
2584 /* Set mailslot information */
2585 @REQ(set_mailslot_info)
2586 obj_handle_t handle; /* handle to the mailslot */
2590 unsigned int max_msgsize;
2593 #define MAILSLOT_SET_READ_TIMEOUT 1
2596 /* Create a directory object */
2597 @REQ(create_directory)
2598 unsigned int access; /* access flags */
2599 unsigned int attributes; /* object attributes */
2600 obj_handle_t rootdir; /* root directory */
2601 VARARG(directory_name,unicode_str); /* Directory name */
2603 obj_handle_t handle; /* handle to the directory */
2607 /* Open a directory object */
2608 @REQ(open_directory)
2609 unsigned int access; /* access flags */
2610 unsigned int attributes; /* object attributes */
2611 obj_handle_t rootdir; /* root directory */
2612 VARARG(directory_name,unicode_str); /* Directory name */
2614 obj_handle_t handle; /* handle to the directory */
2618 /* Create a symbolic link object */
2619 @REQ(create_symlink)
2620 unsigned int access; /* access flags */
2621 unsigned int attributes; /* object attributes */
2622 obj_handle_t rootdir; /* root directory */
2623 data_size_t name_len; /* length of the symlink name in bytes */
2624 VARARG(name,unicode_str,name_len); /* symlink name */
2625 VARARG(target_name,unicode_str); /* target name */
2627 obj_handle_t handle; /* handle to the symlink */
2631 /* Open a symbolic link object */
2633 unsigned int access; /* access flags */
2634 unsigned int attributes; /* object attributes */
2635 obj_handle_t rootdir; /* root directory */
2636 VARARG(name,unicode_str); /* symlink name */
2638 obj_handle_t handle; /* handle to the symlink */
2642 /* Query a symbolic link object */
2644 obj_handle_t handle; /* handle to the symlink */
2646 VARARG(target_name,unicode_str); /* target name */