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 enum apc_type { APC_NONE, APC_USER, APC_TIMER, APC_ASYNC_IO };
235 enum apc_type type; /* APC_USER */
236 void (__stdcall *func)(unsigned long,unsigned long,unsigned long);
237 unsigned long args[3]; /* arguments for user function */
241 enum apc_type type; /* APC_TIMER */
242 void (__stdcall *func)(void*, unsigned int, unsigned int);
243 abs_time_t time; /* absolute time of expiration */
244 void *arg; /* user argument */
248 enum apc_type type; /* APC_ASYNC_IO */
249 void (__stdcall *func)(void*, void*, unsigned int);
250 void *user; /* user pointer */
251 void *sb; /* status block */
252 unsigned int status; /* I/O status */
256 /****************************************************************/
257 /* Request declarations */
259 /* Create a new process from the context of the parent */
261 int inherit_all; /* inherit all handles from parent */
262 unsigned int create_flags; /* creation flags */
263 int socket_fd; /* file descriptor for process socket */
264 obj_handle_t exe_file; /* file handle for main exe */
265 obj_handle_t hstdin; /* handle for stdin */
266 obj_handle_t hstdout; /* handle for stdout */
267 obj_handle_t hstderr; /* handle for stderr */
268 unsigned int process_access; /* access rights for process object */
269 unsigned int process_attr; /* attributes for process object */
270 unsigned int thread_access; /* access rights for thread object */
271 unsigned int thread_attr; /* attributes for thread object */
272 VARARG(info,startup_info); /* startup information */
273 VARARG(env,unicode_str); /* environment for new process */
275 obj_handle_t info; /* new process info handle */
276 process_id_t pid; /* process id */
277 obj_handle_t phandle; /* process handle (in the current process) */
278 thread_id_t tid; /* thread id */
279 obj_handle_t thandle; /* thread handle (in the current process) */
283 /* Retrieve information about a newly started process */
284 @REQ(get_new_process_info)
285 obj_handle_t info; /* info handle returned from new_process_request */
287 int success; /* did the process start successfully? */
288 int exit_code; /* process exit code if failed */
292 /* Create a new thread from the context of the parent */
294 unsigned int access; /* wanted access rights */
295 unsigned int attributes; /* object attributes */
296 int suspend; /* new thread should be suspended on creation */
297 int request_fd; /* fd for request pipe */
299 thread_id_t tid; /* thread id */
300 obj_handle_t handle; /* thread handle (in the current process) */
304 /* Retrieve the new process startup info */
305 @REQ(get_startup_info)
307 obj_handle_t exe_file; /* file handle for main exe */
308 obj_handle_t hstdin; /* handle for stdin */
309 obj_handle_t hstdout; /* handle for stdout */
310 obj_handle_t hstderr; /* handle for stderr */
311 VARARG(info,startup_info); /* startup information */
312 VARARG(env,unicode_str); /* environment */
316 /* Signal the end of the process initialization */
317 @REQ(init_process_done)
318 void* module; /* main module base address */
319 void* entry; /* process entry point */
320 int gui; /* is it a GUI process? */
324 /* Initialize a thread; called from the child after fork()/clone() */
326 int unix_pid; /* Unix pid of new thread */
327 int unix_tid; /* Unix tid of new thread */
328 int debug_level; /* new debug level */
329 void* teb; /* TEB of new thread (in thread address space) */
330 void* peb; /* address of PEB (in thread address space) */
331 void* entry; /* thread entry point (in thread address space) */
332 void* ldt_copy; /* address of LDT copy (in thread address space) */
333 int reply_fd; /* fd for reply pipe */
334 int wait_fd; /* fd for blocking calls pipe */
336 process_id_t pid; /* process id of the new thread's process */
337 thread_id_t tid; /* thread id of the new thread */
338 data_size_t info_size; /* total size of startup info */
339 abs_time_t server_start; /* server start time */
340 int version; /* protocol version */
344 /* Terminate a process */
345 @REQ(terminate_process)
346 obj_handle_t handle; /* process handle to terminate */
347 int exit_code; /* process exit code */
349 int self; /* suicide? */
353 /* Terminate a thread */
354 @REQ(terminate_thread)
355 obj_handle_t handle; /* thread handle to terminate */
356 int exit_code; /* thread exit code */
358 int self; /* suicide? */
359 int last; /* last thread in this process? */
363 /* Retrieve information about a process */
364 @REQ(get_process_info)
365 obj_handle_t handle; /* process handle */
367 process_id_t pid; /* server process id */
368 process_id_t ppid; /* server process id of parent */
369 int exit_code; /* process exit code */
370 int priority; /* priority class */
371 int affinity; /* process affinity mask */
372 void* peb; /* PEB address in process address space */
373 abs_time_t start_time; /* process start time */
374 abs_time_t end_time; /* process end time */
378 /* Set a process informations */
379 @REQ(set_process_info)
380 obj_handle_t handle; /* process handle */
381 int mask; /* setting mask (see below) */
382 int priority; /* priority class */
383 int affinity; /* affinity mask */
385 #define SET_PROCESS_INFO_PRIORITY 0x01
386 #define SET_PROCESS_INFO_AFFINITY 0x02
389 /* Retrieve information about a thread */
390 @REQ(get_thread_info)
391 obj_handle_t handle; /* thread handle */
392 thread_id_t tid_in; /* thread id (optional) */
394 process_id_t pid; /* server process id */
395 thread_id_t tid; /* server thread id */
396 void* teb; /* thread teb pointer */
397 int exit_code; /* thread exit code */
398 int priority; /* thread priority level */
399 int affinity; /* thread affinity mask */
400 abs_time_t creation_time; /* thread creation time */
401 abs_time_t exit_time; /* thread exit time */
402 int last; /* last thread in process */
406 /* Set a thread informations */
407 @REQ(set_thread_info)
408 obj_handle_t handle; /* thread handle */
409 int mask; /* setting mask (see below) */
410 int priority; /* priority class */
411 int affinity; /* affinity mask */
412 obj_handle_t token; /* impersonation token */
414 #define SET_THREAD_INFO_PRIORITY 0x01
415 #define SET_THREAD_INFO_AFFINITY 0x02
416 #define SET_THREAD_INFO_TOKEN 0x04
419 /* Retrieve information about a module */
421 obj_handle_t handle; /* process handle */
422 void* base_address; /* base address of module */
424 size_t size; /* module size */
426 VARARG(filename,unicode_str); /* file name of module */
430 /* Suspend a thread */
432 obj_handle_t handle; /* thread handle */
434 int count; /* new suspend count */
438 /* Resume a thread */
440 obj_handle_t handle; /* thread handle */
442 int count; /* new suspend count */
446 /* Notify the server that a dll has been loaded */
448 obj_handle_t handle; /* file handle */
449 void* base; /* base address */
450 size_t size; /* dll size */
451 int dbg_offset; /* debug info offset */
452 int dbg_size; /* debug info size */
453 void* name; /* ptr to ptr to name (in process addr space) */
454 VARARG(filename,unicode_str); /* file name of dll */
458 /* Notify the server that a dll is being unloaded */
460 void* base; /* base address */
464 /* Queue an APC for a thread */
466 obj_handle_t handle; /* thread handle */
467 apc_call_t call; /* call arguments */
471 /* Get next APC to call */
473 int alertable; /* is thread alertable? */
474 obj_handle_t prev; /* handle to previous APC */
476 obj_handle_t handle; /* handle to APC */
477 apc_call_t call; /* call arguments */
481 /* Close a handle for the current process */
483 obj_handle_t handle; /* handle to close */
487 /* Set a handle information */
488 @REQ(set_handle_info)
489 obj_handle_t handle; /* handle we are interested in */
490 int flags; /* new handle flags */
491 int mask; /* mask for flags to set */
493 int old_flags; /* old flag value */
497 /* Duplicate a handle */
499 obj_handle_t src_process; /* src process handle */
500 obj_handle_t src_handle; /* src handle to duplicate */
501 obj_handle_t dst_process; /* dst process handle */
502 unsigned int access; /* wanted access rights */
503 unsigned int attributes; /* object attributes */
504 unsigned int options; /* duplicate options (see below) */
506 obj_handle_t handle; /* duplicated handle in dst process */
507 int closed; /* whether the source handle has been closed */
509 #define DUP_HANDLE_CLOSE_SOURCE DUPLICATE_CLOSE_SOURCE
510 #define DUP_HANDLE_SAME_ACCESS DUPLICATE_SAME_ACCESS
511 #define DUP_HANDLE_MAKE_GLOBAL 0x80000000 /* Not a Windows flag */
514 /* Open a handle to a process */
516 process_id_t pid; /* process id to open */
517 unsigned int access; /* wanted access rights */
518 unsigned int attributes; /* object attributes */
520 obj_handle_t handle; /* handle to the process */
524 /* Open a handle to a thread */
526 thread_id_t tid; /* thread id to open */
527 unsigned int access; /* wanted access rights */
528 unsigned int attributes; /* object attributes */
530 obj_handle_t handle; /* handle to the thread */
534 /* Wait for handles */
536 int flags; /* wait flags (see below) */
537 void* cookie; /* magic cookie to return to client */
538 obj_handle_t signal; /* object to signal (0 if none) */
539 abs_time_t timeout; /* absolute timeout */
540 VARARG(handles,handles); /* handles to select on */
543 #define SELECT_ALERTABLE 2
544 #define SELECT_INTERRUPTIBLE 4
545 #define SELECT_TIMEOUT 8
548 /* Create an event */
550 unsigned int access; /* wanted access rights */
551 unsigned int attributes; /* object attributes */
552 obj_handle_t rootdir; /* root directory */
553 int manual_reset; /* manual reset event */
554 int initial_state; /* initial state of the event */
555 VARARG(name,unicode_str); /* object name */
557 obj_handle_t handle; /* handle to the event */
560 /* Event operation */
562 obj_handle_t handle; /* handle to event */
563 int op; /* event operation (see below) */
565 enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT };
570 unsigned int access; /* wanted access rights */
571 unsigned int attributes; /* object attributes */
572 obj_handle_t rootdir; /* root directory */
573 VARARG(name,unicode_str); /* object name */
575 obj_handle_t handle; /* handle to the event */
581 unsigned int access; /* wanted access rights */
582 unsigned int attributes; /* object attributes */
583 obj_handle_t rootdir; /* root directory */
584 int owned; /* initially owned? */
585 VARARG(name,unicode_str); /* object name */
587 obj_handle_t handle; /* handle to the mutex */
591 /* Release a mutex */
593 obj_handle_t handle; /* handle to the mutex */
595 unsigned int prev_count; /* value of internal counter, before release */
601 unsigned int access; /* wanted access rights */
602 unsigned int attributes; /* object attributes */
603 obj_handle_t rootdir; /* root directory */
604 VARARG(name,unicode_str); /* object name */
606 obj_handle_t handle; /* handle to the mutex */
610 /* Create a semaphore */
611 @REQ(create_semaphore)
612 unsigned int access; /* wanted access rights */
613 unsigned int attributes; /* object attributes */
614 obj_handle_t rootdir; /* root directory */
615 unsigned int initial; /* initial count */
616 unsigned int max; /* maximum count */
617 VARARG(name,unicode_str); /* object name */
619 obj_handle_t handle; /* handle to the semaphore */
623 /* Release a semaphore */
624 @REQ(release_semaphore)
625 obj_handle_t handle; /* handle to the semaphore */
626 unsigned int count; /* count to add to semaphore */
628 unsigned int prev_count; /* previous semaphore count */
632 /* Open a semaphore */
634 unsigned int access; /* wanted access rights */
635 unsigned int attributes; /* object attributes */
636 obj_handle_t rootdir; /* root directory */
637 VARARG(name,unicode_str); /* object name */
639 obj_handle_t handle; /* handle to the semaphore */
645 unsigned int access; /* wanted access rights */
646 unsigned int attributes; /* object attributes */
647 unsigned int sharing; /* sharing flags */
648 int create; /* file create action */
649 unsigned int options; /* file options */
650 unsigned int attrs; /* file attributes for creation */
651 VARARG(filename,string); /* file name */
653 obj_handle_t handle; /* handle to the file */
657 /* Open a file object */
658 @REQ(open_file_object)
659 unsigned int access; /* wanted access rights */
660 unsigned int attributes; /* open attributes */
661 obj_handle_t rootdir; /* root directory */
662 unsigned int sharing; /* sharing flags */
663 VARARG(filename,unicode_str); /* file name */
665 obj_handle_t handle; /* handle to the file */
669 /* Allocate a file handle for a Unix fd */
670 @REQ(alloc_file_handle)
671 unsigned int access; /* wanted access rights */
672 unsigned int attributes; /* object attributes */
673 int fd; /* file descriptor on the client side */
675 obj_handle_t handle; /* handle to the file */
679 /* Get a Unix fd to access a file */
681 obj_handle_t handle; /* handle to the file */
682 unsigned int access; /* wanted access rights */
683 int cached; /* is it cached on the client already? */
685 int type; /* file type (see below) */
686 int flags; /* file read/write flags (see below) */
690 FD_TYPE_INVALID, /* invalid file (no associated fd) */
691 FD_TYPE_FILE, /* regular file */
692 FD_TYPE_DIR, /* directory */
693 FD_TYPE_SOCKET, /* socket */
694 FD_TYPE_SERIAL, /* serial port */
695 FD_TYPE_PIPE, /* named pipe */
696 FD_TYPE_MAILSLOT, /* mailslot */
697 FD_TYPE_DEVICE, /* Windows device file */
700 #define FD_FLAG_OVERLAPPED 0x01 /* fd opened in overlapped mode */
701 #define FD_FLAG_TIMEOUT 0x02 /* read/write is synchronous */
702 #define FD_FLAG_RECV_SHUTDOWN 0x04
703 #define FD_FLAG_SEND_SHUTDOWN 0x08
704 #define FD_FLAG_AVAILABLE 0x10 /* in overlap read/write operation,
705 * only handle available data (don't wait) */
706 #define FD_FLAG_REMOVABLE 0x20 /* is it on a removable device? */
708 /* Flush a file buffers */
710 obj_handle_t handle; /* handle to the file */
712 obj_handle_t event; /* event set when finished */
716 /* Lock a region of a file */
718 obj_handle_t handle; /* handle to the file */
719 unsigned int offset_low; /* offset of start of lock */
720 unsigned int offset_high; /* offset of start of lock */
721 unsigned int count_low; /* count of bytes to lock */
722 unsigned int count_high; /* count of bytes to lock */
723 int shared; /* shared or exclusive lock? */
724 int wait; /* do we want to wait? */
726 obj_handle_t handle; /* handle to wait on */
727 int overlapped; /* is it an overlapped I/O handle? */
731 /* Unlock a region of a file */
733 obj_handle_t handle; /* handle to the file */
734 unsigned int offset_low; /* offset of start of unlock */
735 unsigned int offset_high; /* offset of start of unlock */
736 unsigned int count_low; /* count of bytes to unlock */
737 unsigned int count_high; /* count of bytes to unlock */
741 /* Get ready to unmount a Unix device */
743 obj_handle_t handle; /* handle to a file on the device */
747 /* Create a socket */
749 unsigned int access; /* wanted access rights */
750 unsigned int attributes; /* object attributes */
751 int family; /* family, see socket manpage */
752 int type; /* type, see socket manpage */
753 int protocol; /* protocol, see socket manpage */
754 unsigned int flags; /* socket flags */
756 obj_handle_t handle; /* handle to the new socket */
760 /* Accept a socket */
762 obj_handle_t lhandle; /* handle to the listening socket */
763 unsigned int access; /* wanted access rights */
764 unsigned int attributes; /* object attributes */
766 obj_handle_t handle; /* handle to the new socket */
770 /* Set socket event parameters */
771 @REQ(set_socket_event)
772 obj_handle_t handle; /* handle to the socket */
773 unsigned int mask; /* event mask */
774 obj_handle_t event; /* event object */
775 user_handle_t window; /* window to send the message to */
776 unsigned int msg; /* message to send */
780 /* Get socket event parameters */
781 @REQ(get_socket_event)
782 obj_handle_t handle; /* handle to the socket */
783 int service; /* clear pending? */
784 obj_handle_t c_event; /* event to clear */
786 unsigned int mask; /* event mask */
787 unsigned int pmask; /* pending events */
788 unsigned int state; /* status bits */
789 VARARG(errors,ints); /* event errors */
793 /* Reenable pending socket events */
794 @REQ(enable_socket_event)
795 obj_handle_t handle; /* handle to the socket */
796 unsigned int mask; /* events to re-enable */
797 unsigned int sstate; /* status bits to set */
798 unsigned int cstate; /* status bits to clear */
801 @REQ(set_socket_deferred)
802 obj_handle_t handle; /* handle to the socket */
803 obj_handle_t deferred; /* handle to the socket for which accept() is deferred */
806 /* Allocate a console (only used by a console renderer) */
808 unsigned int access; /* wanted access rights */
809 unsigned int attributes; /* object attributes */
810 process_id_t pid; /* pid of process which shall be attached to the console */
812 obj_handle_t handle_in; /* handle to console input */
813 obj_handle_t event; /* handle to renderer events change notification */
817 /* Free the console of the current process */
822 #define CONSOLE_RENDERER_NONE_EVENT 0x00
823 #define CONSOLE_RENDERER_TITLE_EVENT 0x01
824 #define CONSOLE_RENDERER_ACTIVE_SB_EVENT 0x02
825 #define CONSOLE_RENDERER_SB_RESIZE_EVENT 0x03
826 #define CONSOLE_RENDERER_UPDATE_EVENT 0x04
827 #define CONSOLE_RENDERER_CURSOR_POS_EVENT 0x05
828 #define CONSOLE_RENDERER_CURSOR_GEOM_EVENT 0x06
829 #define CONSOLE_RENDERER_DISPLAY_EVENT 0x07
830 #define CONSOLE_RENDERER_EXIT_EVENT 0x08
831 struct console_renderer_event
866 /* retrieve console events for the renderer */
867 @REQ(get_console_renderer_events)
868 obj_handle_t handle; /* handle to console input events */
870 VARARG(data,bytes); /* the various console_renderer_events */
874 /* Open a handle to the process console */
876 obj_handle_t from; /* 0 (resp 1) input (resp output) of current process console */
877 /* otherwise console_in handle to get active screen buffer? */
878 unsigned int access; /* wanted access rights */
879 unsigned int attributes; /* object attributes */
880 int share; /* share mask (only for output handles) */
882 obj_handle_t handle; /* handle to the console */
886 /* Get the input queue wait event */
887 @REQ(get_console_wait_event)
892 /* Get a console mode (input or output) */
893 @REQ(get_console_mode)
894 obj_handle_t handle; /* handle to the console */
896 int mode; /* console mode */
900 /* Set a console mode (input or output) */
901 @REQ(set_console_mode)
902 obj_handle_t handle; /* handle to the console */
903 int mode; /* console mode */
907 /* Set info about a console (input only) */
908 @REQ(set_console_input_info)
909 obj_handle_t handle; /* handle to console input, or 0 for process' console */
910 int mask; /* setting mask (see below) */
911 obj_handle_t active_sb; /* active screen buffer */
912 int history_mode; /* whether we duplicate lines in history */
913 int history_size; /* number of lines in history */
914 int edition_mode; /* index to the edition mode flavors */
915 VARARG(title,unicode_str); /* console title */
917 #define SET_CONSOLE_INPUT_INFO_ACTIVE_SB 0x01
918 #define SET_CONSOLE_INPUT_INFO_TITLE 0x02
919 #define SET_CONSOLE_INPUT_INFO_HISTORY_MODE 0x04
920 #define SET_CONSOLE_INPUT_INFO_HISTORY_SIZE 0x08
921 #define SET_CONSOLE_INPUT_INFO_EDITION_MODE 0x10
924 /* Get info about a console (input only) */
925 @REQ(get_console_input_info)
926 obj_handle_t handle; /* handle to console input, or 0 for process' console */
928 int history_mode; /* whether we duplicate lines in history */
929 int history_size; /* number of lines in history */
930 int history_index; /* number of used lines in history */
931 int edition_mode; /* index to the edition mode flavors */
932 VARARG(title,unicode_str); /* console title */
936 /* appends a string to console's history */
937 @REQ(append_console_input_history)
938 obj_handle_t handle; /* handle to console input, or 0 for process' console */
939 VARARG(line,unicode_str); /* line to add */
943 /* appends a string to console's history */
944 @REQ(get_console_input_history)
945 obj_handle_t handle; /* handle to console input, or 0 for process' console */
946 int index; /* index to get line from */
948 int total; /* total length of line in Unicode chars */
949 VARARG(line,unicode_str); /* line to add */
953 /* creates a new screen buffer on process' console */
954 @REQ(create_console_output)
955 obj_handle_t handle_in; /* handle to console input, or 0 for process' console */
956 unsigned int access; /* wanted access rights */
957 unsigned int attributes; /* object attributes */
958 unsigned int share; /* sharing credentials */
960 obj_handle_t handle_out; /* handle to the screen buffer */
964 /* Set info about a console (output only) */
965 @REQ(set_console_output_info)
966 obj_handle_t handle; /* handle to the console */
967 int mask; /* setting mask (see below) */
968 short int cursor_size; /* size of cursor (percentage filled) */
969 short int cursor_visible;/* cursor visibility flag */
970 short int cursor_x; /* position of cursor (x, y) */
972 short int width; /* width of the screen buffer */
973 short int height; /* height of the screen buffer */
974 short int attr; /* default attribute */
975 short int win_left; /* window actually displayed by renderer */
976 short int win_top; /* the rect area is expressed withing the */
977 short int win_right; /* boundaries of the screen buffer */
978 short int win_bottom;
979 short int max_width; /* maximum size (width x height) for the window */
980 short int max_height;
982 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_GEOM 0x01
983 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_POS 0x02
984 #define SET_CONSOLE_OUTPUT_INFO_SIZE 0x04
985 #define SET_CONSOLE_OUTPUT_INFO_ATTR 0x08
986 #define SET_CONSOLE_OUTPUT_INFO_DISPLAY_WINDOW 0x10
987 #define SET_CONSOLE_OUTPUT_INFO_MAX_SIZE 0x20
990 /* Get info about a console (output only) */
991 @REQ(get_console_output_info)
992 obj_handle_t handle; /* handle to the console */
994 short int cursor_size; /* size of cursor (percentage filled) */
995 short int cursor_visible;/* cursor visibility flag */
996 short int cursor_x; /* position of cursor (x, y) */
998 short int width; /* width of the screen buffer */
999 short int height; /* height of the screen buffer */
1000 short int attr; /* default attribute */
1001 short int win_left; /* window actually displayed by renderer */
1002 short int win_top; /* the rect area is expressed withing the */
1003 short int win_right; /* boundaries of the screen buffer */
1004 short int win_bottom;
1005 short int max_width; /* maximum size (width x height) for the window */
1006 short int max_height;
1009 /* Add input records to a console input queue */
1010 @REQ(write_console_input)
1011 obj_handle_t handle; /* handle to the console input */
1012 VARARG(rec,input_records); /* input records */
1014 int written; /* number of records written */
1018 /* Fetch input records from a console input queue */
1019 @REQ(read_console_input)
1020 obj_handle_t handle; /* handle to the console input */
1021 int flush; /* flush the retrieved records from the queue? */
1023 int read; /* number of records read */
1024 VARARG(rec,input_records); /* input records */
1028 /* write data (chars and/or attributes) in a screen buffer */
1029 @REQ(write_console_output)
1030 obj_handle_t handle; /* handle to the console output */
1031 int x; /* position where to start writing */
1033 int mode; /* char info (see below) */
1034 int wrap; /* wrap around at end of line? */
1035 VARARG(data,bytes); /* info to write */
1037 int written; /* number of char infos actually written */
1038 int width; /* width of screen buffer */
1039 int height; /* height of screen buffer */
1043 CHAR_INFO_MODE_TEXT, /* characters only */
1044 CHAR_INFO_MODE_ATTR, /* attributes only */
1045 CHAR_INFO_MODE_TEXTATTR, /* both characters and attributes */
1046 CHAR_INFO_MODE_TEXTSTDATTR /* characters but use standard attributes */
1050 /* fill a screen buffer with constant data (chars and/or attributes) */
1051 @REQ(fill_console_output)
1052 obj_handle_t handle; /* handle to the console output */
1053 int x; /* position where to start writing */
1055 int mode; /* char info mode */
1056 int count; /* number to write */
1057 int wrap; /* wrap around at end of line? */
1058 char_info_t data; /* data to write */
1060 int written; /* number of char infos actually written */
1064 /* read data (chars and/or attributes) from a screen buffer */
1065 @REQ(read_console_output)
1066 obj_handle_t handle; /* handle to the console output */
1067 int x; /* position (x,y) where to start reading */
1069 int mode; /* char info mode */
1070 int wrap; /* wrap around at end of line? */
1072 int width; /* width of screen buffer */
1073 int height; /* height of screen buffer */
1078 /* move a rect (of data) in screen buffer content */
1079 @REQ(move_console_output)
1080 obj_handle_t handle; /* handle to the console output */
1081 short int x_src; /* position (x, y) of rect to start moving from */
1083 short int x_dst; /* position (x, y) of rect to move to */
1085 short int w; /* size of the rect (width, height) to move */
1090 /* Sends a signal to a process group */
1091 @REQ(send_console_signal)
1092 int signal; /* the signal to send */
1093 process_id_t group_id; /* the group to send the signal to */
1097 /* enable directory change notifications */
1098 @REQ(read_directory_changes)
1099 unsigned int filter; /* notification filter */
1100 obj_handle_t handle; /* handle to the directory */
1101 obj_handle_t event; /* handle to the event */
1102 int subtree; /* watch the subtree? */
1103 int want_data; /* flag indicating whether change data should be collected */
1104 void* io_apc; /* APC routine to queue upon end of async */
1105 void* io_sb; /* I/O status block (unique across all async on this handle) */
1106 void* io_user; /* data to pass back to caller */
1111 obj_handle_t handle;
1113 int action; /* type of change */
1114 VARARG(name,string); /* name of directory entry that changed */
1118 /* Create a file mapping */
1119 @REQ(create_mapping)
1120 unsigned int access; /* wanted access rights */
1121 unsigned int attributes; /* object attributes */
1122 obj_handle_t rootdir; /* root directory */
1123 int size_high; /* mapping size */
1124 int size_low; /* mapping size */
1125 int protect; /* protection flags (see below) */
1126 obj_handle_t file_handle; /* file handle */
1127 VARARG(name,unicode_str); /* object name */
1129 obj_handle_t handle; /* handle to the mapping */
1131 /* protection flags */
1132 #define VPROT_READ 0x01
1133 #define VPROT_WRITE 0x02
1134 #define VPROT_EXEC 0x04
1135 #define VPROT_WRITECOPY 0x08
1136 #define VPROT_GUARD 0x10
1137 #define VPROT_NOCACHE 0x20
1138 #define VPROT_COMMITTED 0x40
1139 #define VPROT_IMAGE 0x80
1142 /* Open a mapping */
1144 unsigned int access; /* wanted access rights */
1145 unsigned int attributes; /* object attributes */
1146 obj_handle_t rootdir; /* root directory */
1147 VARARG(name,unicode_str); /* object name */
1149 obj_handle_t handle; /* handle to the mapping */
1153 /* Get information about a file mapping */
1154 @REQ(get_mapping_info)
1155 obj_handle_t handle; /* handle to the mapping */
1157 int size_high; /* mapping size */
1158 int size_low; /* mapping size */
1159 int protect; /* protection flags */
1160 int header_size; /* header size (for VPROT_IMAGE mapping) */
1161 void* base; /* default base addr (for VPROT_IMAGE mapping) */
1162 obj_handle_t shared_file; /* shared mapping file handle */
1163 int shared_size; /* shared mapping size */
1167 #define SNAP_HEAPLIST 0x00000001
1168 #define SNAP_PROCESS 0x00000002
1169 #define SNAP_THREAD 0x00000004
1170 #define SNAP_MODULE 0x00000008
1171 /* Create a snapshot */
1172 @REQ(create_snapshot)
1173 unsigned int attributes; /* object attributes */
1174 int flags; /* snapshot flags (SNAP_*) */
1175 process_id_t pid; /* process id */
1177 obj_handle_t handle; /* handle to the snapshot */
1181 /* Get the next process from a snapshot */
1183 obj_handle_t handle; /* handle to the snapshot */
1184 int reset; /* reset snapshot position? */
1186 int count; /* process usage count */
1187 process_id_t pid; /* process id */
1188 process_id_t ppid; /* parent process id */
1189 void* heap; /* heap base */
1190 void* module; /* main module */
1191 int threads; /* number of threads */
1192 int priority; /* process priority */
1193 int handles; /* number of handles */
1194 VARARG(filename,unicode_str); /* file name of main exe */
1198 /* Get the next thread from a snapshot */
1200 obj_handle_t handle; /* handle to the snapshot */
1201 int reset; /* reset snapshot position? */
1203 int count; /* thread usage count */
1204 process_id_t pid; /* process id */
1205 thread_id_t tid; /* thread id */
1206 int base_pri; /* base priority */
1207 int delta_pri; /* delta priority */
1211 /* Get the next module from a snapshot */
1213 obj_handle_t handle; /* handle to the snapshot */
1214 int reset; /* reset snapshot position? */
1216 process_id_t pid; /* process id */
1217 void* base; /* module base address */
1218 size_t size; /* module size */
1219 VARARG(filename,unicode_str); /* file name of module */
1223 /* Wait for a debug event */
1224 @REQ(wait_debug_event)
1225 int get_handle; /* should we alloc a handle for waiting? */
1227 process_id_t pid; /* process id */
1228 thread_id_t tid; /* thread id */
1229 obj_handle_t wait; /* wait handle if no event ready */
1230 VARARG(event,debug_event); /* debug event data */
1234 /* Queue an exception event */
1235 @REQ(queue_exception_event)
1236 int first; /* first chance exception? */
1237 VARARG(record,exc_event); /* thread context followed by exception record */
1239 obj_handle_t handle; /* handle to the queued event */
1243 /* Retrieve the status of an exception event */
1244 @REQ(get_exception_status)
1245 obj_handle_t handle; /* handle to the queued event */
1247 VARARG(context,context); /* modified thread context */
1251 /* Send an output string to the debugger */
1252 @REQ(output_debug_string)
1253 void* string; /* string to display (in debugged process address space) */
1254 int unicode; /* is it Unicode? */
1255 int length; /* string length */
1259 /* Continue a debug event */
1260 @REQ(continue_debug_event)
1261 process_id_t pid; /* process id to continue */
1262 thread_id_t tid; /* thread id to continue */
1263 int status; /* continuation status */
1267 /* Start/stop debugging an existing process */
1269 process_id_t pid; /* id of the process to debug */
1270 int attach; /* 1=attaching / 0=detaching from the process */
1274 /* Simulate a breakpoint in a process */
1276 obj_handle_t handle; /* process handle */
1278 int self; /* was it the caller itself? */
1282 /* Set debugger kill on exit flag */
1283 @REQ(set_debugger_kill_on_exit)
1284 int kill_on_exit; /* 0=detach/1=kill debuggee when debugger dies */
1288 /* Read data from a process address space */
1289 @REQ(read_process_memory)
1290 obj_handle_t handle; /* process handle */
1291 void* addr; /* addr to read from */
1293 VARARG(data,bytes); /* result data */
1297 /* Write data to a process address space */
1298 @REQ(write_process_memory)
1299 obj_handle_t handle; /* process handle */
1300 void* addr; /* addr to write to */
1301 VARARG(data,bytes); /* data to write */
1305 /* Create a registry key */
1307 obj_handle_t parent; /* handle to the parent key */
1308 unsigned int access; /* desired access rights */
1309 unsigned int attributes; /* object attributes */
1310 unsigned int options; /* creation options */
1311 time_t modif; /* last modification time */
1312 data_size_t namelen; /* length of key name in bytes */
1313 VARARG(name,unicode_str,namelen); /* key name */
1314 VARARG(class,unicode_str); /* class name */
1316 obj_handle_t hkey; /* handle to the created key */
1317 int created; /* has it been newly created? */
1320 /* Open a registry key */
1322 obj_handle_t parent; /* handle to the parent key */
1323 unsigned int access; /* desired access rights */
1324 unsigned int attributes; /* object attributes */
1325 VARARG(name,unicode_str); /* key name */
1327 obj_handle_t hkey; /* handle to the open key */
1331 /* Delete a registry key */
1333 obj_handle_t hkey; /* handle to the key */
1337 /* Flush a registry key */
1339 obj_handle_t hkey; /* handle to the key */
1343 /* Enumerate registry subkeys */
1345 obj_handle_t hkey; /* handle to registry key */
1346 int index; /* index of subkey (or -1 for current key) */
1347 int info_class; /* requested information class */
1349 int subkeys; /* number of subkeys */
1350 int max_subkey; /* longest subkey name */
1351 int max_class; /* longest class name */
1352 int values; /* number of values */
1353 int max_value; /* longest value name */
1354 int max_data; /* longest value data */
1355 time_t modif; /* last modification time */
1356 data_size_t total; /* total length needed for full name and class */
1357 data_size_t namelen; /* length of key name in bytes */
1358 VARARG(name,unicode_str,namelen); /* key name */
1359 VARARG(class,unicode_str); /* class name */
1363 /* Set a value of a registry key */
1365 obj_handle_t hkey; /* handle to registry key */
1366 int type; /* value type */
1367 data_size_t namelen; /* length of value name in bytes */
1368 VARARG(name,unicode_str,namelen); /* value name */
1369 VARARG(data,bytes); /* value data */
1373 /* Retrieve the value of a registry key */
1375 obj_handle_t hkey; /* handle to registry key */
1376 VARARG(name,unicode_str); /* value name */
1378 int type; /* value type */
1379 data_size_t total; /* total length needed for data */
1380 VARARG(data,bytes); /* value data */
1384 /* Enumerate a value of a registry key */
1385 @REQ(enum_key_value)
1386 obj_handle_t hkey; /* handle to registry key */
1387 int index; /* value index */
1388 int info_class; /* requested information class */
1390 int type; /* value type */
1391 data_size_t total; /* total length needed for full name and data */
1392 data_size_t namelen; /* length of value name in bytes */
1393 VARARG(name,unicode_str,namelen); /* value name */
1394 VARARG(data,bytes); /* value data */
1398 /* Delete a value of a registry key */
1399 @REQ(delete_key_value)
1400 obj_handle_t hkey; /* handle to registry key */
1401 VARARG(name,unicode_str); /* value name */
1405 /* Load a registry branch from a file */
1407 obj_handle_t hkey; /* root key to load to */
1408 obj_handle_t file; /* file to load from */
1409 VARARG(name,unicode_str); /* subkey name */
1413 /* UnLoad a registry branch from a file */
1414 @REQ(unload_registry)
1415 obj_handle_t hkey; /* root key to unload to */
1419 /* Save a registry branch to a file */
1421 obj_handle_t hkey; /* key to save */
1422 obj_handle_t file; /* file to save to */
1426 /* Add a registry key change notification */
1427 @REQ(set_registry_notification)
1428 obj_handle_t hkey; /* key to watch for changes */
1429 obj_handle_t event; /* event to set */
1430 int subtree; /* should we watch the whole subtree? */
1431 unsigned int filter; /* things to watch */
1435 /* Create a waitable timer */
1437 unsigned int access; /* wanted access rights */
1438 unsigned int attributes; /* object attributes */
1439 obj_handle_t rootdir; /* root directory */
1440 int manual; /* manual reset */
1441 VARARG(name,unicode_str); /* object name */
1443 obj_handle_t handle; /* handle to the timer */
1447 /* Open a waitable timer */
1449 unsigned int access; /* wanted access rights */
1450 unsigned int attributes; /* object attributes */
1451 obj_handle_t rootdir; /* root directory */
1452 VARARG(name,unicode_str); /* object name */
1454 obj_handle_t handle; /* handle to the timer */
1457 /* Set a waitable timer */
1459 obj_handle_t handle; /* handle to the timer */
1460 abs_time_t expire; /* next expiration absolute time */
1461 int period; /* timer period in ms */
1462 void* callback; /* callback function */
1463 void* arg; /* callback argument */
1465 int signaled; /* was the timer signaled before this call ? */
1468 /* Cancel a waitable timer */
1470 obj_handle_t handle; /* handle to the timer */
1472 int signaled; /* was the timer signaled before this calltime ? */
1475 /* Get information on a waitable timer */
1476 @REQ(get_timer_info)
1477 obj_handle_t handle; /* handle to the timer */
1479 abs_time_t when; /* absolute time when the timer next expires */
1480 int signaled; /* is the timer signaled? */
1484 /* Retrieve the current context of a thread */
1485 @REQ(get_thread_context)
1486 obj_handle_t handle; /* thread handle */
1487 unsigned int flags; /* context flags */
1488 int suspend; /* if getting context during suspend */
1490 int self; /* was it a handle to the current thread? */
1491 VARARG(context,context); /* thread context */
1495 /* Set the current context of a thread */
1496 @REQ(set_thread_context)
1497 obj_handle_t handle; /* thread handle */
1498 unsigned int flags; /* context flags */
1499 int suspend; /* if setting context during suspend */
1500 VARARG(context,context); /* thread context */
1502 int self; /* was it a handle to the current thread? */
1506 /* Fetch a selector entry for a thread */
1507 @REQ(get_selector_entry)
1508 obj_handle_t handle; /* thread handle */
1509 int entry; /* LDT entry */
1511 unsigned int base; /* selector base */
1512 unsigned int limit; /* selector limit */
1513 unsigned char flags; /* selector flags */
1519 obj_handle_t table; /* which table to add atom to */
1520 VARARG(name,unicode_str); /* atom name */
1522 atom_t atom; /* resulting atom */
1526 /* Delete an atom */
1528 obj_handle_t table; /* which table to delete atom from */
1529 atom_t atom; /* atom handle */
1535 obj_handle_t table; /* which table to find atom from */
1536 VARARG(name,unicode_str); /* atom name */
1538 atom_t atom; /* atom handle */
1542 /* Get information about an atom */
1543 @REQ(get_atom_information)
1544 obj_handle_t table; /* which table to find atom from */
1545 atom_t atom; /* atom handle */
1547 int count; /* atom lock count */
1548 int pinned; /* whether the atom has been pinned */
1549 data_size_t total; /* actual length of atom name */
1550 VARARG(name,unicode_str); /* atom name */
1554 /* Set information about an atom */
1555 @REQ(set_atom_information)
1556 obj_handle_t table; /* which table to find atom from */
1557 atom_t atom; /* atom handle */
1558 int pinned; /* whether to bump atom information */
1562 /* Empty an atom table */
1563 @REQ(empty_atom_table)
1564 obj_handle_t table; /* which table to find atom from */
1565 int if_pinned; /* whether to delete pinned atoms */
1569 /* Init an atom table */
1570 @REQ(init_atom_table)
1571 int entries; /* number of entries (only for local) */
1573 obj_handle_t table; /* handle to the atom table */
1577 /* Get the message queue of the current thread */
1580 obj_handle_t handle; /* handle to the queue */
1584 /* Set the current message queue wakeup mask */
1585 @REQ(set_queue_mask)
1586 unsigned int wake_mask; /* wakeup bits mask */
1587 unsigned int changed_mask; /* changed bits mask */
1588 int skip_wait; /* will we skip waiting if signaled? */
1590 unsigned int wake_bits; /* current wake bits */
1591 unsigned int changed_bits; /* current changed bits */
1595 /* Get the current message queue status */
1596 @REQ(get_queue_status)
1597 int clear; /* should we clear the change bits? */
1599 unsigned int wake_bits; /* wake bits */
1600 unsigned int changed_bits; /* changed bits since last time */
1604 /* Retrieve the process idle event */
1605 @REQ(get_process_idle_event)
1606 obj_handle_t handle; /* process handle */
1608 obj_handle_t event; /* handle to idle event */
1612 /* Send a message to a thread queue */
1614 thread_id_t id; /* thread id */
1615 int type; /* message type (see below) */
1616 int flags; /* message flags (see below) */
1617 user_handle_t win; /* window handle */
1618 unsigned int msg; /* message code */
1619 unsigned long wparam; /* parameters */
1620 unsigned long lparam; /* parameters */
1621 int timeout; /* timeout for reply */
1622 VARARG(data,message_data); /* message data for sent messages */
1625 @REQ(post_quit_message)
1626 int exit_code; /* exit code to return */
1631 MSG_ASCII, /* Ascii message (from SendMessageA) */
1632 MSG_UNICODE, /* Unicode message (from SendMessageW) */
1633 MSG_NOTIFY, /* notify message (from SendNotifyMessageW), always Unicode */
1634 MSG_CALLBACK, /* callback message (from SendMessageCallbackW), always Unicode */
1635 MSG_CALLBACK_RESULT,/* result of a callback message */
1636 MSG_OTHER_PROCESS, /* sent from other process, may include vararg data, always Unicode */
1637 MSG_POSTED, /* posted message (from PostMessageW), always Unicode */
1638 MSG_HARDWARE, /* hardware message */
1639 MSG_WINEVENT /* winevent message */
1641 #define SEND_MSG_ABORT_IF_HUNG 0x01
1644 /* Send a hardware message to a thread queue */
1645 @REQ(send_hardware_message)
1646 thread_id_t id; /* thread id */
1647 user_handle_t win; /* window handle */
1648 unsigned int msg; /* message code */
1649 unsigned int time; /* message time */
1650 unsigned long wparam; /* parameters */
1651 unsigned long lparam; /* parameters */
1652 unsigned long info; /* extra info */
1653 int x; /* x position */
1654 int y; /* y position */
1658 /* Get a message from the current queue */
1660 int flags; /* see below */
1661 user_handle_t get_win; /* window handle to get */
1662 unsigned int get_first; /* first message code to get */
1663 unsigned int get_last; /* last message code to get */
1664 unsigned int hw_id; /* id of the previous hardware message (or 0) */
1666 user_handle_t win; /* window handle */
1667 int type; /* message type */
1668 unsigned int msg; /* message code */
1669 unsigned long wparam; /* parameters */
1670 unsigned long lparam; /* parameters */
1671 unsigned long info; /* extra info */
1672 int x; /* x position */
1673 int y; /* y position */
1674 unsigned int time; /* message time */
1675 unsigned int hw_id; /* id if hardware message */
1676 unsigned int active_hooks; /* active hooks bitmap */
1677 data_size_t total; /* total size of extra data */
1678 VARARG(data,message_data); /* message data for sent messages */
1680 #define GET_MSG_REMOVE 1 /* remove the message */
1681 #define GET_MSG_SENT_ONLY 2 /* only get sent messages */
1683 /* Reply to a sent message */
1685 unsigned int result; /* message result */
1686 int remove; /* should we remove the message? */
1687 VARARG(data,bytes); /* message data for sent messages */
1691 /* Accept the current hardware message */
1692 @REQ(accept_hardware_message)
1693 unsigned int hw_id; /* id of the hardware message */
1694 int remove; /* should we remove the message? */
1695 user_handle_t new_win; /* new destination window for current message */
1699 /* Retrieve the reply for the last message sent */
1700 @REQ(get_message_reply)
1701 int cancel; /* cancel message if not ready? */
1703 unsigned int result; /* message result */
1704 VARARG(data,bytes); /* message data for sent messages */
1708 /* Set a window timer */
1710 user_handle_t win; /* window handle */
1711 unsigned int msg; /* message to post */
1712 unsigned int rate; /* timer rate in ms */
1713 unsigned long id; /* timer id */
1714 unsigned long lparam; /* message lparam (callback proc) */
1716 unsigned long id; /* timer id */
1720 /* Kill a window timer */
1721 @REQ(kill_win_timer)
1722 user_handle_t win; /* window handle */
1723 unsigned int msg; /* message to post */
1724 unsigned long id; /* timer id */
1728 /* Retrieve info about a serial port */
1729 @REQ(get_serial_info)
1730 obj_handle_t handle; /* handle to comm port */
1732 unsigned int readinterval;
1733 unsigned int readconst;
1734 unsigned int readmult;
1735 unsigned int writeconst;
1736 unsigned int writemult;
1737 unsigned int eventmask;
1741 /* Set info about a serial port */
1742 @REQ(set_serial_info)
1743 obj_handle_t handle; /* handle to comm port */
1744 int flags; /* bitmask to set values (see below) */
1745 unsigned int readinterval;
1746 unsigned int readconst;
1747 unsigned int readmult;
1748 unsigned int writeconst;
1749 unsigned int writemult;
1750 unsigned int eventmask;
1752 #define SERIALINFO_SET_TIMEOUTS 0x01
1753 #define SERIALINFO_SET_MASK 0x02
1756 /* Create an async I/O */
1757 @REQ(register_async)
1758 obj_handle_t handle; /* handle to comm port, socket or file */
1759 int type; /* type of queue to look after */
1760 void* io_apc; /* APC routine to queue upon end of async */
1761 void* io_sb; /* I/O status block (unique across all async on this handle) */
1762 void* io_user; /* data to pass back to caller */
1763 int count; /* count - usually # of bytes to be read/written */
1765 #define ASYNC_TYPE_READ 0x01
1766 #define ASYNC_TYPE_WRITE 0x02
1767 #define ASYNC_TYPE_WAIT 0x03
1770 /* Cancel all async op on a fd */
1772 obj_handle_t handle; /* handle to comm port, socket or file */
1776 /* Create a named pipe */
1777 @REQ(create_named_pipe)
1778 unsigned int access;
1779 unsigned int attributes; /* object attributes */
1780 obj_handle_t rootdir; /* root directory */
1781 unsigned int options;
1783 unsigned int maxinstances;
1784 unsigned int outsize;
1785 unsigned int insize;
1786 unsigned int timeout;
1787 VARARG(name,unicode_str); /* pipe name */
1789 obj_handle_t handle; /* handle to the pipe */
1792 /* flags in create_named_pipe and get_named_pipe_info */
1793 #define NAMED_PIPE_MESSAGE_STREAM_WRITE 0x0001
1794 #define NAMED_PIPE_MESSAGE_STREAM_READ 0x0002
1795 #define NAMED_PIPE_NONBLOCKING_MODE 0x0004
1796 #define NAMED_PIPE_SERVER_END 0x8000
1798 /* Open an existing named pipe */
1799 @REQ(open_named_pipe)
1800 unsigned int access;
1801 unsigned int attributes; /* object attributes */
1802 obj_handle_t rootdir; /* root directory */
1803 unsigned int flags; /* file flags */
1804 VARARG(name,unicode_str); /* pipe name */
1806 obj_handle_t handle; /* handle to the pipe */
1810 /* Connect to a named pipe */
1811 @REQ(connect_named_pipe)
1812 obj_handle_t handle;
1818 /* Wait for a named pipe */
1819 @REQ(wait_named_pipe)
1820 obj_handle_t handle;
1821 unsigned int timeout;
1824 VARARG(name,unicode_str); /* pipe name */
1828 /* Disconnect a named pipe */
1829 @REQ(disconnect_named_pipe)
1830 obj_handle_t handle;
1834 @REQ(get_named_pipe_info)
1835 obj_handle_t handle;
1838 unsigned int maxinstances;
1839 unsigned int instances;
1840 unsigned int outsize;
1841 unsigned int insize;
1845 /* Create a window */
1847 user_handle_t parent; /* parent window */
1848 user_handle_t owner; /* owner window */
1849 atom_t atom; /* class atom */
1850 void* instance; /* module instance */
1852 user_handle_t handle; /* created window */
1853 user_handle_t parent; /* full handle of parent */
1854 user_handle_t owner; /* full handle of owner */
1855 int extra; /* number of extra bytes */
1856 void* class_ptr; /* pointer to class in client address space */
1860 /* Destroy a window */
1861 @REQ(destroy_window)
1862 user_handle_t handle; /* handle to the window */
1866 /* Retrieve the desktop window for the current thread */
1867 @REQ(get_desktop_window)
1868 int force; /* force creation if it doesn't exist */
1870 user_handle_t handle; /* handle to the desktop window */
1874 /* Set a window owner */
1875 @REQ(set_window_owner)
1876 user_handle_t handle; /* handle to the window */
1877 user_handle_t owner; /* new owner */
1879 user_handle_t full_owner; /* full handle of new owner */
1880 user_handle_t prev_owner; /* full handle of previous owner */
1884 /* Get information from a window handle */
1885 @REQ(get_window_info)
1886 user_handle_t handle; /* handle to the window */
1888 user_handle_t full_handle; /* full 32-bit handle */
1889 user_handle_t last_active; /* last active popup */
1890 process_id_t pid; /* process owning the window */
1891 thread_id_t tid; /* thread owning the window */
1892 atom_t atom; /* class atom */
1893 int is_unicode; /* ANSI or unicode */
1897 /* Set some information in a window */
1898 @REQ(set_window_info)
1899 unsigned int flags; /* flags for fields to set (see below) */
1900 user_handle_t handle; /* handle to the window */
1901 unsigned int style; /* window style */
1902 unsigned int ex_style; /* window extended style */
1903 unsigned int id; /* window id */
1904 int is_unicode; /* ANSI or unicode */
1905 void* instance; /* creator instance */
1906 unsigned long user_data; /* user-specific data */
1907 int extra_offset; /* offset to set in extra bytes */
1908 data_size_t extra_size; /* size to set in extra bytes */
1909 unsigned long extra_value; /* value to set in extra bytes */
1911 unsigned int old_style; /* old window style */
1912 unsigned int old_ex_style; /* old window extended style */
1913 unsigned int old_id; /* old window id */
1914 void* old_instance; /* old creator instance */
1915 unsigned long old_user_data; /* old user-specific data */
1916 unsigned long old_extra_value; /* old value in extra bytes */
1918 #define SET_WIN_STYLE 0x01
1919 #define SET_WIN_EXSTYLE 0x02
1920 #define SET_WIN_ID 0x04
1921 #define SET_WIN_INSTANCE 0x08
1922 #define SET_WIN_USERDATA 0x10
1923 #define SET_WIN_EXTRA 0x20
1924 #define SET_WIN_UNICODE 0x40
1927 /* Set the parent of a window */
1929 user_handle_t handle; /* handle to the window */
1930 user_handle_t parent; /* handle to the parent */
1932 user_handle_t old_parent; /* old parent window */
1933 user_handle_t full_parent; /* full handle of new parent */
1937 /* Get a list of the window parents, up to the root of the tree */
1938 @REQ(get_window_parents)
1939 user_handle_t handle; /* handle to the window */
1941 int count; /* total count of parents */
1942 VARARG(parents,user_handles); /* parent handles */
1946 /* Get a list of the window children */
1947 @REQ(get_window_children)
1948 user_handle_t parent; /* parent window */
1949 atom_t atom; /* class atom for the listed children */
1950 thread_id_t tid; /* thread owning the listed children */
1952 int count; /* total count of children */
1953 VARARG(children,user_handles); /* children handles */
1957 /* Get a list of the window children that contain a given point */
1958 @REQ(get_window_children_from_point)
1959 user_handle_t parent; /* parent window */
1960 int x; /* point in parent coordinates */
1963 int count; /* total count of children */
1964 VARARG(children,user_handles); /* children handles */
1968 /* Get window tree information from a window handle */
1969 @REQ(get_window_tree)
1970 user_handle_t handle; /* handle to the window */
1972 user_handle_t parent; /* parent window */
1973 user_handle_t owner; /* owner window */
1974 user_handle_t next_sibling; /* next sibling in Z-order */
1975 user_handle_t prev_sibling; /* prev sibling in Z-order */
1976 user_handle_t first_sibling; /* first sibling in Z-order */
1977 user_handle_t last_sibling; /* last sibling in Z-order */
1978 user_handle_t first_child; /* first child */
1979 user_handle_t last_child; /* last child */
1982 /* Set the position and Z order of a window */
1983 @REQ(set_window_pos)
1984 unsigned int flags; /* SWP_* flags */
1985 user_handle_t handle; /* handle to the window */
1986 user_handle_t previous; /* previous window in Z order */
1987 rectangle_t window; /* window rectangle */
1988 rectangle_t client; /* client rectangle */
1989 VARARG(valid,rectangles); /* valid rectangles from WM_NCCALCSIZE */
1991 unsigned int new_style; /* new window style */
1995 /* Get the window and client rectangles of a window */
1996 @REQ(get_window_rectangles)
1997 user_handle_t handle; /* handle to the window */
1999 rectangle_t window; /* window rectangle */
2000 rectangle_t visible; /* visible part of the window rectangle */
2001 rectangle_t client; /* client rectangle */
2005 /* Get the window text */
2006 @REQ(get_window_text)
2007 user_handle_t handle; /* handle to the window */
2009 VARARG(text,unicode_str); /* window text */
2013 /* Set the window text */
2014 @REQ(set_window_text)
2015 user_handle_t handle; /* handle to the window */
2016 VARARG(text,unicode_str); /* window text */
2020 /* Get the coordinates offset between two windows */
2021 @REQ(get_windows_offset)
2022 user_handle_t from; /* handle to the first window */
2023 user_handle_t to; /* handle to the second window */
2025 int x; /* x coordinate offset */
2026 int y; /* y coordinate offset */
2030 /* Get the visible region of a window */
2031 @REQ(get_visible_region)
2032 user_handle_t window; /* handle to the window */
2033 unsigned int flags; /* DCX flags */
2035 user_handle_t top_win; /* top window to clip against */
2036 rectangle_t top_rect; /* top window visible rect with screen coords */
2037 rectangle_t win_rect; /* window rect in screen coords */
2038 data_size_t total_size; /* total size of the resulting region */
2039 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2043 /* Get the window region */
2044 @REQ(get_window_region)
2045 user_handle_t window; /* handle to the window */
2047 data_size_t total_size; /* total size of the resulting region */
2048 VARARG(region,rectangles); /* list of rectangles for the region */
2052 /* Set the window region */
2053 @REQ(set_window_region)
2054 user_handle_t window; /* handle to the window */
2055 VARARG(region,rectangles); /* list of rectangles for the region */
2059 /* Get the window update region */
2060 @REQ(get_update_region)
2061 user_handle_t window; /* handle to the window */
2062 user_handle_t from_child; /* child to start searching from */
2063 unsigned int flags; /* update flags (see below) */
2065 user_handle_t child; /* child to repaint (or window itself) */
2066 unsigned int flags; /* resulting update flags (see below) */
2067 data_size_t total_size; /* total size of the resulting region */
2068 VARARG(region,rectangles); /* list of rectangles for the region */
2070 #define UPDATE_NONCLIENT 0x01 /* get region for repainting non-client area */
2071 #define UPDATE_ERASE 0x02 /* get region for erasing client area */
2072 #define UPDATE_PAINT 0x04 /* get region for painting client area */
2073 #define UPDATE_INTERNALPAINT 0x08 /* get region if internal paint is pending */
2074 #define UPDATE_ALLCHILDREN 0x10 /* force repaint of all children */
2075 #define UPDATE_NOCHILDREN 0x20 /* don't try to repaint any children */
2076 #define UPDATE_NOREGION 0x40 /* don't return a region, only the flags */
2079 /* Update the z order of a window so that a given rectangle is fully visible */
2080 @REQ(update_window_zorder)
2081 user_handle_t window; /* handle to the window */
2082 rectangle_t rect; /* rectangle that must be visible */
2086 /* Mark parts of a window as needing a redraw */
2088 user_handle_t window; /* handle to the window */
2089 unsigned int flags; /* RDW_* flags */
2090 VARARG(region,rectangles); /* list of rectangles for the region */
2094 /* Set a window property */
2095 @REQ(set_window_property)
2096 user_handle_t window; /* handle to the window */
2097 atom_t atom; /* property atom (if no name specified) */
2098 obj_handle_t handle; /* handle to store */
2099 VARARG(name,unicode_str); /* property name */
2103 /* Remove a window property */
2104 @REQ(remove_window_property)
2105 user_handle_t window; /* handle to the window */
2106 atom_t atom; /* property atom (if no name specified) */
2107 VARARG(name,unicode_str); /* property name */
2109 obj_handle_t handle; /* handle stored in property */
2113 /* Get a window property */
2114 @REQ(get_window_property)
2115 user_handle_t window; /* handle to the window */
2116 atom_t atom; /* property atom (if no name specified) */
2117 VARARG(name,unicode_str); /* property name */
2119 obj_handle_t handle; /* handle stored in property */
2123 /* Get the list of properties of a window */
2124 @REQ(get_window_properties)
2125 user_handle_t window; /* handle to the window */
2127 int total; /* total number of properties */
2128 VARARG(props,properties); /* list of properties */
2132 /* Create a window station */
2133 @REQ(create_winstation)
2134 unsigned int flags; /* window station flags */
2135 unsigned int access; /* wanted access rights */
2136 unsigned int attributes; /* object attributes */
2137 VARARG(name,unicode_str); /* object name */
2139 obj_handle_t handle; /* handle to the window station */
2143 /* Open a handle to a window station */
2144 @REQ(open_winstation)
2145 unsigned int access; /* wanted access rights */
2146 unsigned int attributes; /* object attributes */
2147 VARARG(name,unicode_str); /* object name */
2149 obj_handle_t handle; /* handle to the window station */
2153 /* Close a window station */
2154 @REQ(close_winstation)
2155 obj_handle_t handle; /* handle to the window station */
2159 /* Get the process current window station */
2160 @REQ(get_process_winstation)
2162 obj_handle_t handle; /* handle to the window station */
2166 /* Set the process current window station */
2167 @REQ(set_process_winstation)
2168 obj_handle_t handle; /* handle to the window station */
2172 /* Create a desktop */
2173 @REQ(create_desktop)
2174 unsigned int flags; /* desktop flags */
2175 unsigned int access; /* wanted access rights */
2176 unsigned int attributes; /* object attributes */
2177 VARARG(name,unicode_str); /* object name */
2179 obj_handle_t handle; /* handle to the desktop */
2183 /* Open a handle to a desktop */
2185 unsigned int flags; /* desktop flags */
2186 unsigned int access; /* wanted access rights */
2187 unsigned int attributes; /* object attributes */
2188 VARARG(name,unicode_str); /* object name */
2190 obj_handle_t handle; /* handle to the desktop */
2194 /* Close a desktop */
2196 obj_handle_t handle; /* handle to the desktop */
2200 /* Get the thread current desktop */
2201 @REQ(get_thread_desktop)
2202 thread_id_t tid; /* thread id */
2204 obj_handle_t handle; /* handle to the desktop */
2208 /* Set the thread current desktop */
2209 @REQ(set_thread_desktop)
2210 obj_handle_t handle; /* handle to the desktop */
2214 /* Get/set information about a user object (window station or desktop) */
2215 @REQ(set_user_object_info)
2216 obj_handle_t handle; /* handle to the object */
2217 unsigned int flags; /* information to set */
2218 unsigned int obj_flags; /* new object flags */
2220 int is_desktop; /* is object a desktop? */
2221 unsigned int old_obj_flags; /* old object flags */
2222 VARARG(name,unicode_str); /* object name */
2224 #define SET_USER_OBJECT_FLAGS 1
2227 /* Attach (or detach) thread inputs */
2228 @REQ(attach_thread_input)
2229 thread_id_t tid_from; /* thread to be attached */
2230 thread_id_t tid_to; /* thread to which tid_from should be attached */
2231 int attach; /* is it an attach? */
2235 /* Get input data for a given thread */
2236 @REQ(get_thread_input)
2237 thread_id_t tid; /* id of thread */
2239 user_handle_t focus; /* handle to the focus window */
2240 user_handle_t capture; /* handle to the capture window */
2241 user_handle_t active; /* handle to the active window */
2242 user_handle_t foreground; /* handle to the global foreground window */
2243 user_handle_t menu_owner; /* handle to the menu owner */
2244 user_handle_t move_size; /* handle to the moving/resizing window */
2245 user_handle_t caret; /* handle to the caret window */
2246 rectangle_t rect; /* caret rectangle */
2250 /* Get the time of the last input event */
2251 @REQ(get_last_input_time)
2257 /* Retrieve queue keyboard state for a given thread */
2259 thread_id_t tid; /* id of thread */
2260 int key; /* optional key code or -1 */
2262 unsigned char state; /* state of specified key */
2263 VARARG(keystate,bytes); /* state array for all the keys */
2266 /* Set queue keyboard state for a given thread */
2268 thread_id_t tid; /* id of thread */
2269 VARARG(keystate,bytes); /* state array for all the keys */
2272 /* Set the system foreground window */
2273 @REQ(set_foreground_window)
2274 user_handle_t handle; /* handle to the foreground window */
2276 user_handle_t previous; /* handle to the previous foreground window */
2277 int send_msg_old; /* whether we have to send a msg to the old window */
2278 int send_msg_new; /* whether we have to send a msg to the new window */
2281 /* Set the current thread focus window */
2282 @REQ(set_focus_window)
2283 user_handle_t handle; /* handle to the focus window */
2285 user_handle_t previous; /* handle to the previous focus window */
2288 /* Set the current thread active window */
2289 @REQ(set_active_window)
2290 user_handle_t handle; /* handle to the active window */
2292 user_handle_t previous; /* handle to the previous active window */
2295 /* Set the current thread capture window */
2296 @REQ(set_capture_window)
2297 user_handle_t handle; /* handle to the capture window */
2298 unsigned int flags; /* capture flags (see below) */
2300 user_handle_t previous; /* handle to the previous capture window */
2301 user_handle_t full_handle; /* full 32-bit handle of new capture window */
2303 #define CAPTURE_MENU 0x01 /* capture is for a menu */
2304 #define CAPTURE_MOVESIZE 0x02 /* capture is for moving/resizing */
2307 /* Set the current thread caret window */
2308 @REQ(set_caret_window)
2309 user_handle_t handle; /* handle to the caret window */
2310 int width; /* caret width */
2311 int height; /* caret height */
2313 user_handle_t previous; /* handle to the previous caret window */
2314 rectangle_t old_rect; /* previous caret rectangle */
2315 int old_hide; /* previous hide count */
2316 int old_state; /* previous caret state (1=on, 0=off) */
2320 /* Set the current thread caret information */
2321 @REQ(set_caret_info)
2322 unsigned int flags; /* caret flags (see below) */
2323 user_handle_t handle; /* handle to the caret window */
2324 int x; /* caret x position */
2325 int y; /* caret y position */
2326 int hide; /* increment for hide count (can be negative to show it) */
2327 int state; /* caret state (1=on, 0=off, -1=toggle current state) */
2329 user_handle_t full_handle; /* handle to the current caret window */
2330 rectangle_t old_rect; /* previous caret rectangle */
2331 int old_hide; /* previous hide count */
2332 int old_state; /* previous caret state (1=on, 0=off) */
2334 #define SET_CARET_POS 0x01 /* set the caret position from x,y */
2335 #define SET_CARET_HIDE 0x02 /* increment the caret hide count */
2336 #define SET_CARET_STATE 0x04 /* set the caret on/off state */
2339 /* Set a window hook */
2341 int id; /* id of the hook */
2342 process_id_t pid; /* id of process to set the hook into */
2343 thread_id_t tid; /* id of thread to set the hook into */
2347 void* proc; /* hook procedure */
2348 int unicode; /* is it a unicode hook? */
2349 VARARG(module,unicode_str); /* module name */
2351 user_handle_t handle; /* handle to the hook */
2352 unsigned int active_hooks; /* active hooks bitmap */
2356 /* Remove a window hook */
2358 user_handle_t handle; /* handle to the hook */
2359 int id; /* id of the hook if handle is 0 */
2360 void* proc; /* hook procedure if handle is 0 */
2362 unsigned int active_hooks; /* active hooks bitmap */
2366 /* Start calling a hook chain */
2367 @REQ(start_hook_chain)
2368 int id; /* id of the hook */
2369 int event; /* signalled event */
2370 user_handle_t window; /* handle to the event window */
2371 int object_id; /* object id for out of context winevent */
2372 int child_id; /* child id for out of context winevent */
2374 user_handle_t handle; /* handle to the next hook */
2375 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2376 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2377 void* proc; /* hook procedure */
2378 int unicode; /* is it a unicode hook? */
2379 unsigned int active_hooks; /* active hooks bitmap */
2380 VARARG(module,unicode_str); /* module name */
2384 /* Finished calling a hook chain */
2385 @REQ(finish_hook_chain)
2386 int id; /* id of the hook */
2390 /* Get the hook information */
2392 user_handle_t handle; /* handle to the current hook */
2393 int get_next; /* do we want info about current or next hook? */
2394 int event; /* signalled event */
2395 user_handle_t window; /* handle to the event window */
2396 int object_id; /* object id for out of context winevent */
2397 int child_id; /* child id for out of context winevent */
2399 user_handle_t handle; /* handle to the hook */
2400 int id; /* id of the hook */
2401 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2402 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2403 void* proc; /* hook procedure */
2404 int unicode; /* is it a unicode hook? */
2405 VARARG(module,unicode_str); /* module name */
2409 /* Create a window class */
2411 int local; /* is it a local class? */
2412 atom_t atom; /* class atom */
2413 unsigned int style; /* class style */
2414 void* instance; /* module instance */
2415 int extra; /* number of extra class bytes */
2416 int win_extra; /* number of window extra bytes */
2417 void* client_ptr; /* pointer to class in client address space */
2421 /* Destroy a window class */
2423 atom_t atom; /* class atom */
2424 void* instance; /* module instance */
2426 void* client_ptr; /* pointer to class in client address space */
2430 /* Set some information in a class */
2431 @REQ(set_class_info)
2432 user_handle_t window; /* handle to the window */
2433 unsigned int flags; /* flags for info to set (see below) */
2434 atom_t atom; /* class atom */
2435 unsigned int style; /* class style */
2436 int win_extra; /* number of window extra bytes */
2437 void* instance; /* module instance */
2438 int extra_offset; /* offset to set in extra bytes */
2439 data_size_t extra_size; /* size to set in extra bytes */
2440 unsigned long extra_value; /* value to set in extra bytes */
2442 atom_t old_atom; /* previous class atom */
2443 unsigned int old_style; /* previous class style */
2444 int old_extra; /* previous number of class extra bytes */
2445 int old_win_extra; /* previous number of window extra bytes */
2446 void* old_instance; /* previous module instance */
2447 unsigned long old_extra_value; /* old value in extra bytes */
2449 #define SET_CLASS_ATOM 0x0001
2450 #define SET_CLASS_STYLE 0x0002
2451 #define SET_CLASS_WINEXTRA 0x0004
2452 #define SET_CLASS_INSTANCE 0x0008
2453 #define SET_CLASS_EXTRA 0x0010
2456 /* Set/get clipboard information */
2457 @REQ(set_clipboard_info)
2458 unsigned int flags; /* flags for fields to set (see below) */
2459 user_handle_t clipboard; /* clipboard window */
2460 user_handle_t owner; /* clipboard owner */
2461 user_handle_t viewer; /* first clipboard viewer */
2462 unsigned int seqno; /* change sequence number */
2464 unsigned int flags; /* status flags (see below) */
2465 user_handle_t old_clipboard; /* old clipboard window */
2466 user_handle_t old_owner; /* old clipboard owner */
2467 user_handle_t old_viewer; /* old clipboard viewer */
2468 unsigned int seqno; /* current sequence number */
2471 #define SET_CB_OPEN 0x001
2472 #define SET_CB_OWNER 0x002
2473 #define SET_CB_VIEWER 0x004
2474 #define SET_CB_SEQNO 0x008
2475 #define SET_CB_RELOWNER 0x010
2476 #define SET_CB_CLOSE 0x020
2477 #define CB_OPEN 0x040
2478 #define CB_OWNER 0x080
2479 #define CB_PROCESS 0x100
2482 /* Open a security token */
2484 obj_handle_t handle; /* handle to the thread or process */
2485 unsigned int access; /* access rights to the new token */
2486 unsigned int attributes;/* object attributes */
2487 unsigned int flags; /* flags (see below) */
2489 obj_handle_t token; /* handle to the token */
2491 #define OPEN_TOKEN_THREAD 1
2492 #define OPEN_TOKEN_AS_SELF 2
2495 /* Set/get the global windows */
2496 @REQ(set_global_windows)
2497 unsigned int flags; /* flags for fields to set (see below) */
2498 user_handle_t shell_window; /* handle to the new shell window */
2499 user_handle_t shell_listview; /* handle to the new shell listview window */
2500 user_handle_t progman_window; /* handle to the new program manager window */
2501 user_handle_t taskman_window; /* handle to the new task manager window */
2503 user_handle_t old_shell_window; /* handle to the shell window */
2504 user_handle_t old_shell_listview; /* handle to the shell listview window */
2505 user_handle_t old_progman_window; /* handle to the new program manager window */
2506 user_handle_t old_taskman_window; /* handle to the new task manager window */
2508 #define SET_GLOBAL_SHELL_WINDOWS 0x01 /* set both main shell and listview windows */
2509 #define SET_GLOBAL_PROGMAN_WINDOW 0x02
2510 #define SET_GLOBAL_TASKMAN_WINDOW 0x04
2512 /* Adjust the privileges held by a token */
2513 @REQ(adjust_token_privileges)
2514 obj_handle_t handle; /* handle to the token */
2515 int disable_all; /* disable all privileges? */
2516 int get_modified_state; /* get modified privileges? */
2517 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to enable/disable/remove */
2519 unsigned int len; /* total length in bytes required to store token privileges */
2520 VARARG(privileges,LUID_AND_ATTRIBUTES); /* modified privileges */
2523 /* Retrieves the set of privileges held by or available to a token */
2524 @REQ(get_token_privileges)
2525 obj_handle_t handle; /* handle to the token */
2527 unsigned int len; /* total length in bytes required to store token privileges */
2528 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
2531 /* Check the token has the required privileges */
2532 @REQ(check_token_privileges)
2533 obj_handle_t handle; /* handle to the token */
2534 int all_required; /* are all the privileges required for the check to succeed? */
2535 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to check */
2537 int has_privileges; /* does the token have the required privileges? */
2538 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
2541 @REQ(duplicate_token)
2542 obj_handle_t handle; /* handle to the token to duplicate */
2543 unsigned int access; /* access rights to the new token */
2544 unsigned int attributes; /* object attributes */
2545 int primary; /* is the new token to be a primary one? */
2546 int impersonation_level; /* impersonation level of the new token */
2548 obj_handle_t new_handle; /* duplicated handle */
2552 obj_handle_t handle; /* handle to the token */
2553 unsigned int desired_access; /* desired access to the object */
2554 unsigned int mapping_read; /* mapping from generic read to specific rights */
2555 unsigned int mapping_write; /* mapping from generic write to specific rights */
2556 unsigned int mapping_execute; /* mapping from generic execute to specific rights */
2557 unsigned int mapping_all; /* mapping from generic all to specific rights */
2558 VARARG(sd,security_descriptor); /* security descriptor to check */
2560 unsigned int access_granted; /* access rights actually granted */
2561 unsigned int access_status; /* was access granted? */
2562 unsigned int privileges_len; /* length needed to store privileges */
2563 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges used during access check */
2566 @REQ(get_token_user)
2567 obj_handle_t handle; /* handle to the token */
2569 data_size_t user_len; /* length needed to store user */
2570 VARARG(user,SID); /* sid of the user the token represents */
2573 @REQ(get_token_groups)
2574 obj_handle_t handle; /* handle to the token */
2576 data_size_t user_len; /* length needed to store user */
2577 VARARG(user,token_groups); /* groups the token's user belongs to */
2580 /* Create a mailslot */
2581 @REQ(create_mailslot)
2582 unsigned int access; /* wanted access rights */
2583 unsigned int attributes; /* object attributes */
2584 obj_handle_t rootdir; /* root directory */
2585 unsigned int max_msgsize;
2587 VARARG(name,unicode_str); /* mailslot name */
2589 obj_handle_t handle; /* handle to the mailslot */
2593 /* Open an existing mailslot */
2595 unsigned int access;
2596 unsigned int attributes; /* object attributes */
2597 obj_handle_t rootdir; /* root directory */
2598 unsigned int sharing; /* sharing mode */
2599 VARARG(name,unicode_str); /* mailslot name */
2601 obj_handle_t handle; /* handle to the mailslot */
2605 /* Set mailslot information */
2606 @REQ(set_mailslot_info)
2607 obj_handle_t handle; /* handle to the mailslot */
2611 unsigned int max_msgsize;
2614 #define MAILSLOT_SET_READ_TIMEOUT 1
2617 /* Create a directory object */
2618 @REQ(create_directory)
2619 unsigned int access; /* access flags */
2620 unsigned int attributes; /* object attributes */
2621 obj_handle_t rootdir; /* root directory */
2622 VARARG(directory_name,unicode_str); /* Directory name */
2624 obj_handle_t handle; /* handle to the directory */
2628 /* Open a directory object */
2629 @REQ(open_directory)
2630 unsigned int access; /* access flags */
2631 unsigned int attributes; /* object attributes */
2632 obj_handle_t rootdir; /* root directory */
2633 VARARG(directory_name,unicode_str); /* Directory name */
2635 obj_handle_t handle; /* handle to the directory */
2639 /* Create a symbolic link object */
2640 @REQ(create_symlink)
2641 unsigned int access; /* access flags */
2642 unsigned int attributes; /* object attributes */
2643 obj_handle_t rootdir; /* root directory */
2644 data_size_t name_len; /* length of the symlink name in bytes */
2645 VARARG(name,unicode_str,name_len); /* symlink name */
2646 VARARG(target_name,unicode_str); /* target name */
2648 obj_handle_t handle; /* handle to the symlink */
2652 /* Open a symbolic link object */
2654 unsigned int access; /* access flags */
2655 unsigned int attributes; /* object attributes */
2656 obj_handle_t rootdir; /* root directory */
2657 VARARG(name,unicode_str); /* symlink name */
2659 obj_handle_t handle; /* handle to the symlink */
2663 /* Query a symbolic link object */
2665 obj_handle_t handle; /* handle to the symlink */
2667 VARARG(target_name,unicode_str); /* target name */