3 * Wine server protocol definition
5 * Copyright (C
) 2001 Alexandre Julliard
7 * This file is used by tools
/make_requests to build the
8 * protocol structures in include
/wine
/server_protocol.h
10 * This library is free software
; you can redistribute it and
/or
11 * modify it under the terms of the GNU Lesser General Public
12 * License as published by the Free Software Foundation
; either
13 * version
2.1 of the License
, or (at your option
) any later version.
15 * This library is distributed in the hope that it will be useful
,
16 * but WITHOUT ANY WARRANTY
; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU
18 * Lesser General Public License for more details.
20 * You should have received a copy of the GNU Lesser General Public
21 * License along with this library
; if not
, write to the Free Software
22 * Foundation
, Inc.
, 59 Temple Place
, Suite
330, Boston
, MA
02111-1307 USA
25 @HEADER
/* start of C declarations
*/
36 int req
; /* request code
*/
37 size_t request_size
; /* request variable part size
*/
38 size_t reply_size
; /* reply variable part maximum size
*/
43 unsigned int error
; /* error result
*/
44 size_t reply_size
; /* reply variable part size
*/
47 /* placeholder structure for the maximum allowed request size
*/
48 /* this is used to construct the generic_request union
*/
49 struct request_max_size
51 int pad
[16]; /* the max request size is
16 ints
*/
54 typedef void
*obj_handle_t
;
55 typedef void
*user_handle_t
;
56 typedef unsigned short atom_t
;
57 typedef unsigned int process_id_t
;
58 typedef unsigned int thread_id_t
;
60 #define FIRST_USER_HANDLE
0x0020 /* first possible value for low word of user handle
*/
61 #define LAST_USER_HANDLE
0xffef /* last possible value for low word of user handle
*/
64 /* definitions of the event data depending on the event code
*/
65 struct debug_event_exception
67 EXCEPTION_RECORD record
; /* exception record
*/
68 int first
; /* first chance exception?
*/
70 struct debug_event_create_thread
72 obj_handle_t handle
; /* handle to the new thread
*/
73 void
*teb
; /* thread
teb (in debugged process address space
) */
74 void
*start
; /* thread startup routine
*/
76 struct debug_event_create_process
78 obj_handle_t file
; /* handle to the process exe file
*/
79 obj_handle_t process
; /* handle to the new process
*/
80 obj_handle_t thread
; /* handle to the new thread
*/
81 void
*base
; /* base of executable image
*/
82 int dbg_offset
; /* offset of debug info in file
*/
83 int dbg_size
; /* size of debug info
*/
84 void
*teb
; /* thread
teb (in debugged process address space
) */
85 void
*start
; /* thread startup routine
*/
86 void
*name
; /* image
name (optional
) */
87 int unicode
; /* is it Unicode?
*/
89 struct debug_event_exit
91 int exit_code
; /* thread or process exit code
*/
93 struct debug_event_load_dll
95 obj_handle_t handle
; /* file handle for the dll
*/
96 void
*base
; /* base address of the dll
*/
97 int dbg_offset
; /* offset of debug info in file
*/
98 int dbg_size
; /* size of debug info
*/
99 void
*name
; /* image
name (optional
) */
100 int unicode
; /* is it Unicode?
*/
102 struct debug_event_unload_dll
104 void
*base
; /* base address of the dll
*/
106 struct debug_event_output_string
108 void
*string
; /* string to
display (in debugged process address space
) */
109 int unicode
; /* is it Unicode?
*/
110 int length
; /* string length
*/
112 struct debug_event_rip_info
117 union debug_event_data
119 struct debug_event_exception exception
;
120 struct debug_event_create_thread create_thread
;
121 struct debug_event_create_process create_process
;
122 struct debug_event_exit exit
;
123 struct debug_event_load_dll load_dll
;
124 struct debug_event_unload_dll unload_dll
;
125 struct debug_event_output_string output_string
;
126 struct debug_event_rip_info rip_info
;
129 /* debug event data
*/
132 int code
; /* event code
*/
133 union debug_event_data info
; /* event information
*/
136 /* structure used in sending an fd from client to server
*/
139 thread_id_t tid
; /* thread id
*/
140 int fd
; /* file descriptor on client
-side
*/
143 /* structure sent by the server on the wait fifo
*/
146 void
*cookie
; /* magic cookie that was passed in select_request
*/
147 int signaled
; /* wait result
*/
150 /* structure for process startup info
*/
153 size_t size
; /* size of this structure
*/
154 size_t filename_len
; /* length of filename
*/
155 size_t cmdline_len
; /* length of cmd line
*/
156 size_t desktop_len
; /* length of desktop name
*/
157 size_t title_len
; /* length of title
*/
158 int x
; /* window position
*/
160 int cx
; /* window size
*/
162 int x_chars
; /* console size
*/
164 int attribute
; /* console attributes
*/
165 int cmd_show
; /* main window show mode
*/
166 unsigned int flags
; /* info flags
*/
167 /* char filename
[...
]; */
168 /* char cmdline
[...
]; */
169 /* char desktop
[...
]; */
170 /* char title
[...
]; */
173 /* structure for absolute timeouts
*/
176 int sec
; /* seconds since Unix epoch
*/
177 int usec
; /* microseconds
*/
180 /* structure returned in the list of window properties
*/
183 atom_t atom
; /* property atom
*/
184 short string
; /* was atom a string originally?
*/
185 obj_handle_t handle
; /* handle stored in property
*/
188 /* structure to specify window rectangles
*/
197 /* structure for console char
/attribute info
*/
204 /****************************************************************/
205 /* Request declarations
*/
207 /* Create a new process from the context of the parent
*/
209 int inherit_all
; /* inherit all handles from parent
*/
210 int create_flags
; /* creation flags
*/
211 int unix_pid
; /* Unix pid of new process
*/
212 obj_handle_t exe_file
; /* file handle for main exe
*/
213 obj_handle_t hstdin
; /* handle for stdin
*/
214 obj_handle_t hstdout
; /* handle for stdout
*/
215 obj_handle_t hstderr
; /* handle for stderr
*/
216 VARARG(info
,startup_info
); /* startup information
*/
218 obj_handle_t info
; /* new process info handle
*/
222 /* Retrieve information about a newly started process
*/
223 @
REQ(get_new_process_info
)
224 obj_handle_t info
; /* info handle returned from new_process_request
*/
225 int pinherit
; /* process handle inherit flag
*/
226 int tinherit
; /* thread handle inherit flag
*/
228 process_id_t pid
; /* process id
*/
229 obj_handle_t phandle
; /* process
handle (in the current process
) */
230 thread_id_t tid
; /* thread id
*/
231 obj_handle_t thandle
; /* thread
handle (in the current process
) */
232 int success
; /* did the process start successfully?
*/
236 /* Create a new thread from the context of the parent
*/
238 int suspend
; /* new thread should be suspended on creation
*/
239 int inherit
; /* inherit flag
*/
240 int request_fd
; /* fd for request pipe
*/
242 thread_id_t tid
; /* thread id
*/
243 obj_handle_t handle
; /* thread
handle (in the current process
) */
247 /* Signal that we are finished booting on the client side
*/
249 int debug_level
; /* new debug level
*/
253 /* Initialize a process
; called from the new process context
*/
255 void
* ldt_copy
; /* addr of LDT copy
*/
257 int create_flags
; /* creation flags
*/
258 unsigned int server_start
; /* server start
time (GetTickCount
) */
259 size_t info_size
; /* total size of startup info
*/
260 obj_handle_t exe_file
; /* file handle for main exe
*/
261 obj_handle_t hstdin
; /* handle for stdin
*/
262 obj_handle_t hstdout
; /* handle for stdout
*/
263 obj_handle_t hstderr
; /* handle for stderr
*/
267 /* Retrieve the new process startup info
*/
268 @
REQ(get_startup_info
)
270 VARARG(info
,startup_info
); /* startup information
*/
274 /* Signal the end of the process initialization
*/
275 @
REQ(init_process_done
)
276 void
* module
; /* main module base address
*/
277 size_t module_size
; /* main module size
*/
278 void
* entry
; /* process entry point
*/
279 void
* name
; /* ptr to ptr to
name (in process addr space
) */
280 obj_handle_t exe_file
; /* file handle for main exe
*/
281 int gui
; /* is it a GUI process?
*/
282 VARARG(filename
,unicode_str
); /* file name of main exe
*/
284 int debugged
; /* being debugged?
*/
288 /* Initialize a thread
; called from the child after
fork()/clone() */
290 int unix_pid
; /* Unix pid of new thread
*/
291 int unix_tid
; /* Unix tid of new thread
*/
292 void
* teb
; /* TEB of new
thread (in thread address space
) */
293 void
* entry
; /* thread entry
point (in thread address space
) */
294 int reply_fd
; /* fd for reply pipe
*/
295 int wait_fd
; /* fd for blocking calls pipe
*/
297 process_id_t pid
; /* process id of the new thread
's process */
298 thread_id_t tid; /* thread id of the new thread */
299 int boot; /* is this the boot thread? */
300 int version; /* protocol version */
304 /* Terminate a process */
305 @REQ(terminate_process)
306 obj_handle_t handle; /* process handle to terminate */
307 int exit_code; /* process exit code */
309 int self; /* suicide? */
313 /* Terminate a thread */
314 @REQ(terminate_thread)
315 obj_handle_t handle; /* thread handle to terminate */
316 int exit_code; /* thread exit code */
318 int self; /* suicide? */
319 int last; /* last thread in this process? */
323 /* Retrieve information about a process */
324 @REQ(get_process_info)
325 obj_handle_t handle; /* process handle */
327 process_id_t pid; /* server process id */
328 int debugged; /* debugged? */
329 int exit_code; /* process exit code */
330 int priority; /* priority class */
331 int process_affinity; /* process affinity mask */
332 int system_affinity; /* system affinity mask */
336 /* Set a process informations */
337 @REQ(set_process_info)
338 obj_handle_t handle; /* process handle */
339 int mask; /* setting mask (see below) */
340 int priority; /* priority class */
341 int affinity; /* affinity mask */
343 #define SET_PROCESS_INFO_PRIORITY 0x01
344 #define SET_PROCESS_INFO_AFFINITY 0x02
347 /* Retrieve information about a thread */
348 @REQ(get_thread_info)
349 obj_handle_t handle; /* thread handle */
350 thread_id_t tid_in; /* thread id (optional) */
352 process_id_t pid; /* server process id */
353 thread_id_t tid; /* server thread id */
354 void* teb; /* thread teb pointer */
355 int exit_code; /* thread exit code */
356 int priority; /* thread priority level */
357 int affinity; /* thread affinity mask */
358 time_t creation_time; /* thread creation time */
359 time_t exit_time; /* thread exit time */
363 /* Set a thread informations */
364 @REQ(set_thread_info)
365 obj_handle_t handle; /* thread handle */
366 int mask; /* setting mask (see below) */
367 int priority; /* priority class */
368 int affinity; /* affinity mask */
370 #define SET_THREAD_INFO_PRIORITY 0x01
371 #define SET_THREAD_INFO_AFFINITY 0x02
374 /* Retrieve information about a module */
376 obj_handle_t handle; /* process handle */
377 void* base_address; /* base address of module */
379 size_t size; /* module size */
381 VARARG(filename,unicode_str); /* file name of module */
385 /* Suspend a thread */
387 obj_handle_t handle; /* thread handle */
389 int count; /* new suspend count */
393 /* Resume a thread */
395 obj_handle_t handle; /* thread handle */
397 int count; /* new suspend count */
401 /* Notify the server that a dll has been loaded */
403 obj_handle_t handle; /* file handle */
404 void* base; /* base address */
405 size_t size; /* dll size */
406 int dbg_offset; /* debug info offset */
407 int dbg_size; /* debug info size */
408 void* name; /* ptr to ptr to name (in process addr space) */
409 VARARG(filename,unicode_str); /* file name of dll */
413 /* Notify the server that a dll is being unloaded */
415 void* base; /* base address */
419 /* Queue an APC for a thread */
421 obj_handle_t handle; /* thread handle */
422 int user; /* user or system apc? */
423 void* func; /* function to call */
424 void* arg1; /* params for function to call */
430 /* Get next APC to call */
432 int alertable; /* is thread alertable? */
434 void* func; /* function to call */
435 int type; /* function type */
436 void* arg1; /* function arguments */
440 enum apc_type { APC_NONE, APC_USER, APC_TIMER, APC_ASYNC, APC_ASYNC_IO };
443 /* Close a handle for the current process */
445 obj_handle_t handle; /* handle to close */
447 int fd; /* associated fd to close */
451 /* Set a handle information */
452 @REQ(set_handle_info)
453 obj_handle_t handle; /* handle we are interested in */
454 int flags; /* new handle flags */
455 int mask; /* mask for flags to set */
456 int fd; /* file descriptor or -1 */
458 int old_flags; /* old flag value */
459 int cur_fd; /* current file descriptor */
463 /* Duplicate a handle */
465 obj_handle_t src_process; /* src process handle */
466 obj_handle_t src_handle; /* src handle to duplicate */
467 obj_handle_t dst_process; /* dst process handle */
468 unsigned int access; /* wanted access rights */
469 int inherit; /* inherit flag */
470 int options; /* duplicate options (see below) */
472 obj_handle_t handle; /* duplicated handle in dst process */
473 int fd; /* associated fd to close */
475 #define DUP_HANDLE_CLOSE_SOURCE DUPLICATE_CLOSE_SOURCE
476 #define DUP_HANDLE_SAME_ACCESS DUPLICATE_SAME_ACCESS
477 #define DUP_HANDLE_MAKE_GLOBAL 0x80000000 /* Not a Windows flag */
480 /* Open a handle to a process */
482 process_id_t pid; /* process id to open */
483 unsigned int access; /* wanted access rights */
484 int inherit; /* inherit flag */
486 obj_handle_t handle; /* handle to the process */
490 /* Open a handle to a thread */
492 thread_id_t tid; /* thread id to open */
493 unsigned int access; /* wanted access rights */
494 int inherit; /* inherit flag */
496 obj_handle_t handle; /* handle to the thread */
500 /* Wait for handles */
502 int flags; /* wait flags (see below) */
503 void* cookie; /* magic cookie to return to client */
504 abs_time_t timeout; /* absolute timeout */
505 VARARG(handles,handles); /* handles to select on */
508 #define SELECT_ALERTABLE 2
509 #define SELECT_INTERRUPTIBLE 4
510 #define SELECT_TIMEOUT 8
513 /* Create an event */
515 int manual_reset; /* manual reset event */
516 int initial_state; /* initial state of the event */
517 int inherit; /* inherit flag */
518 VARARG(name,unicode_str); /* object name */
520 obj_handle_t handle; /* handle to the event */
523 /* Event operation */
525 obj_handle_t handle; /* handle to event */
526 int op; /* event operation (see below) */
528 enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT };
533 unsigned int access; /* wanted access rights */
534 int inherit; /* inherit flag */
535 VARARG(name,unicode_str); /* object name */
537 obj_handle_t handle; /* handle to the event */
543 int owned; /* initially owned? */
544 int inherit; /* inherit flag */
545 VARARG(name,unicode_str); /* object name */
547 obj_handle_t handle; /* handle to the mutex */
551 /* Release a mutex */
553 obj_handle_t handle; /* handle to the mutex */
559 unsigned int access; /* wanted access rights */
560 int inherit; /* inherit flag */
561 VARARG(name,unicode_str); /* object name */
563 obj_handle_t handle; /* handle to the mutex */
567 /* Create a semaphore */
568 @REQ(create_semaphore)
569 unsigned int initial; /* initial count */
570 unsigned int max; /* maximum count */
571 int inherit; /* inherit flag */
572 VARARG(name,unicode_str); /* object name */
574 obj_handle_t handle; /* handle to the semaphore */
578 /* Release a semaphore */
579 @REQ(release_semaphore)
580 obj_handle_t handle; /* handle to the semaphore */
581 unsigned int count; /* count to add to semaphore */
583 unsigned int prev_count; /* previous semaphore count */
587 /* Open a semaphore */
589 unsigned int access; /* wanted access rights */
590 int inherit; /* inherit flag */
591 VARARG(name,unicode_str); /* object name */
593 obj_handle_t handle; /* handle to the semaphore */
599 unsigned int access; /* wanted access rights */
600 int inherit; /* inherit flag */
601 unsigned int sharing; /* sharing flags */
602 int create; /* file create action */
603 unsigned int attrs; /* file attributes for creation */
604 int drive_type; /* type of drive the file is on */
605 VARARG(filename,string); /* file name */
607 obj_handle_t handle; /* handle to the file */
611 /* Allocate a file handle for a Unix fd */
612 @REQ(alloc_file_handle)
613 unsigned int access; /* wanted access rights */
614 int inherit; /* inherit flag */
615 int fd; /* file descriptor on the client side */
617 obj_handle_t handle; /* handle to the file */
621 /* Get a Unix fd to access a file */
623 obj_handle_t handle; /* handle to the file */
624 unsigned int access; /* wanted access rights */
626 int fd; /* file descriptor */
627 int type; /* the type of file (see below) */
628 int flags; /* file read/write flags (see below) */
637 #define FD_FLAG_OVERLAPPED 0x01
638 #define FD_FLAG_TIMEOUT 0x02
639 #define FD_FLAG_RECV_SHUTDOWN 0x04
640 #define FD_FLAG_SEND_SHUTDOWN 0x08
642 /* Set a file current position */
643 @REQ(set_file_pointer)
644 obj_handle_t handle; /* handle to the file */
645 int low; /* position low word */
646 int high; /* position high word */
647 int whence; /* whence to seek */
649 int new_low; /* new position low word */
650 int new_high; /* new position high word */
654 /* Truncate (or extend) a file */
656 obj_handle_t handle; /* handle to the file */
660 /* Set a file access and modification times */
662 obj_handle_t handle; /* handle to the file */
663 time_t access_time; /* last access time */
664 time_t write_time; /* last write time */
668 /* Flush a file buffers */
670 obj_handle_t handle; /* handle to the file */
672 obj_handle_t event; /* event set when finished */
676 /* Get information about a file */
678 obj_handle_t handle; /* handle to the file */
680 int type; /* file type */
681 int attr; /* file attributes */
682 time_t access_time; /* last access time */
683 time_t write_time; /* last write time */
684 time_t change_time; /* last change time */
685 int size_high; /* file size */
686 int size_low; /* file size */
687 int alloc_high; /* size used on disk */
688 int alloc_low; /* size used on disk */
689 int links; /* number of links */
690 int index_high; /* unique index */
691 int index_low; /* unique index */
692 unsigned int serial; /* volume serial number */
696 /* Lock a region of a file */
698 obj_handle_t handle; /* handle to the file */
699 unsigned int offset_low; /* offset of start of lock */
700 unsigned int offset_high; /* offset of start of lock */
701 unsigned int count_low; /* count of bytes to lock */
702 unsigned int count_high; /* count of bytes to lock */
703 int shared; /* shared or exclusive lock? */
704 int wait; /* do we want to wait? */
706 obj_handle_t handle; /* handle to wait on */
707 int overlapped; /* is it an overlapped I/O handle? */
711 /* Unlock a region of a file */
713 obj_handle_t handle; /* handle to the file */
714 unsigned int offset_low; /* offset of start of unlock */
715 unsigned int offset_high; /* offset of start of unlock */
716 unsigned int count_low; /* count of bytes to unlock */
717 unsigned int count_high; /* count of bytes to unlock */
721 /* Create a socket */
723 unsigned int access; /* wanted access rights */
724 int inherit; /* inherit flag */
725 int family; /* family, see socket manpage */
726 int type; /* type, see socket manpage */
727 int protocol; /* protocol, see socket manpage */
728 unsigned int flags; /* socket flags */
730 obj_handle_t handle; /* handle to the new socket */
734 /* Accept a socket */
736 obj_handle_t lhandle; /* handle to the listening socket */
737 unsigned int access; /* wanted access rights */
738 int inherit; /* inherit flag */
740 obj_handle_t handle; /* handle to the new socket */
744 /* Set socket event parameters */
745 @REQ(set_socket_event)
746 obj_handle_t handle; /* handle to the socket */
747 unsigned int mask; /* event mask */
748 obj_handle_t event; /* event object */
749 user_handle_t window; /* window to send the message to */
750 unsigned int msg; /* message to send */
754 /* Get socket event parameters */
755 @REQ(get_socket_event)
756 obj_handle_t handle; /* handle to the socket */
757 int service; /* clear pending? */
758 obj_handle_t c_event; /* event to clear */
760 unsigned int mask; /* event mask */
761 unsigned int pmask; /* pending events */
762 unsigned int state; /* status bits */
763 VARARG(errors,ints); /* event errors */
767 /* Reenable pending socket events */
768 @REQ(enable_socket_event)
769 obj_handle_t handle; /* handle to the socket */
770 unsigned int mask; /* events to re-enable */
771 unsigned int sstate; /* status bits to set */
772 unsigned int cstate; /* status bits to clear */
775 @REQ(set_socket_deferred)
776 obj_handle_t handle; /* handle to the socket */
777 obj_handle_t deferred; /* handle to the socket for which accept() is deferred */
780 /* Allocate a console (only used by a console renderer) */
782 unsigned int access; /* wanted access rights */
783 int inherit; /* inherit flag */
784 process_id_t pid; /* pid of process which shall be attached to the console */
786 obj_handle_t handle_in; /* handle to console input */
787 obj_handle_t event; /* handle to renderer events change notification */
791 /* Free the console of the current process */
796 #define CONSOLE_RENDERER_NONE_EVENT 0x00
797 #define CONSOLE_RENDERER_TITLE_EVENT 0x01
798 #define CONSOLE_RENDERER_ACTIVE_SB_EVENT 0x02
799 #define CONSOLE_RENDERER_SB_RESIZE_EVENT 0x03
800 #define CONSOLE_RENDERER_UPDATE_EVENT 0x04
801 #define CONSOLE_RENDERER_CURSOR_POS_EVENT 0x05
802 #define CONSOLE_RENDERER_CURSOR_GEOM_EVENT 0x06
803 #define CONSOLE_RENDERER_DISPLAY_EVENT 0x07
804 #define CONSOLE_RENDERER_EXIT_EVENT 0x08
805 struct console_renderer_event
840 /* retrieve console events for the renderer */
841 @REQ(get_console_renderer_events)
842 obj_handle_t handle; /* handle to console input events */
844 VARARG(data,bytes); /* the various console_renderer_events */
848 /* Open a handle to the process console */
850 int from; /* 0 (resp 1) input (resp output) of current process console */
851 /* otherwise console_in handle to get active screen buffer? */
852 unsigned int access; /* wanted access rights */
853 int inherit; /* inherit flag */
854 int share; /* share mask (only for output handles) */
856 obj_handle_t handle; /* handle to the console */
860 /* Get the input queue wait event */
861 @REQ(get_console_wait_event)
866 /* Get a console mode (input or output) */
867 @REQ(get_console_mode)
868 obj_handle_t handle; /* handle to the console */
870 int mode; /* console mode */
874 /* Set a console mode (input or output) */
875 @REQ(set_console_mode)
876 obj_handle_t handle; /* handle to the console */
877 int mode; /* console mode */
881 /* Set info about a console (input only) */
882 @REQ(set_console_input_info)
883 obj_handle_t handle; /* handle to console input, or 0 for process' console
*/
884 int mask
; /* setting
mask (see below
) */
885 obj_handle_t active_sb
; /* active screen buffer
*/
886 int history_mode
; /* whether we duplicate lines in history
*/
887 int history_size
; /* number of lines in history
*/
888 int edition_mode
; /* index to the edition mode flavors
*/
889 VARARG(title
,unicode_str
); /* console title
*/
891 #define SET_CONSOLE_INPUT_INFO_ACTIVE_SB
0x01
892 #define SET_CONSOLE_INPUT_INFO_TITLE
0x02
893 #define SET_CONSOLE_INPUT_INFO_HISTORY_MODE
0x04
894 #define SET_CONSOLE_INPUT_INFO_HISTORY_SIZE
0x08
895 #define SET_CONSOLE_INPUT_INFO_EDITION_MODE
0x10
898 /* Get info about a
console (input only
) */
899 @
REQ(get_console_input_info
)
900 obj_handle_t handle
; /* handle to console input
, or
0 for process
' console */
902 int history_mode; /* whether we duplicate lines in history */
903 int history_size; /* number of lines in history */
904 int history_index; /* number of used lines in history */
905 int edition_mode; /* index to the edition mode flavors */
906 VARARG(title,unicode_str); /* console title */
910 /* appends a string to console's history
*/
911 @
REQ(append_console_input_history
)
912 obj_handle_t handle
; /* handle to console input
, or
0 for process
' console */
913 VARARG(line,unicode_str); /* line to add */
917 /* appends a string to console's history
*/
918 @
REQ(get_console_input_history
)
919 obj_handle_t handle
; /* handle to console input
, or
0 for process
' console */
920 int index; /* index to get line from */
922 int total; /* total length of line in Unicode chars */
923 VARARG(line,unicode_str); /* line to add */
927 /* creates a new screen buffer on process' console
*/
928 @
REQ(create_console_output
)
929 obj_handle_t handle_in
; /* handle to console input
, or
0 for process
' console */
930 int access; /* wanted access rights */
931 int share; /* sharing credentials */
932 int inherit; /* inherit flag */
934 obj_handle_t handle_out; /* handle to the screen buffer */
938 /* Set info about a console (output only) */
939 @REQ(set_console_output_info)
940 obj_handle_t handle; /* handle to the console */
941 int mask; /* setting mask (see below) */
942 short int cursor_size; /* size of cursor (percentage filled) */
943 short int cursor_visible;/* cursor visibility flag */
944 short int cursor_x; /* position of cursor (x, y) */
946 short int width; /* width of the screen buffer */
947 short int height; /* height of the screen buffer */
948 short int attr; /* default attribute */
949 short int win_left; /* window actually displayed by renderer */
950 short int win_top; /* the rect area is expressed withing the */
951 short int win_right; /* boundaries of the screen buffer */
952 short int win_bottom;
953 short int max_width; /* maximum size (width x height) for the window */
954 short int max_height;
956 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_GEOM 0x01
957 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_POS 0x02
958 #define SET_CONSOLE_OUTPUT_INFO_SIZE 0x04
959 #define SET_CONSOLE_OUTPUT_INFO_ATTR 0x08
960 #define SET_CONSOLE_OUTPUT_INFO_DISPLAY_WINDOW 0x10
961 #define SET_CONSOLE_OUTPUT_INFO_MAX_SIZE 0x20
964 /* Get info about a console (output only) */
965 @REQ(get_console_output_info)
966 obj_handle_t handle; /* handle to the console */
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;
983 /* Add input records to a console input queue */
984 @REQ(write_console_input)
985 obj_handle_t handle; /* handle to the console input */
986 VARARG(rec,input_records); /* input records */
988 int written; /* number of records written */
992 /* Fetch input records from a console input queue */
993 @REQ(read_console_input)
994 obj_handle_t handle; /* handle to the console input */
995 int flush; /* flush the retrieved records from the queue? */
997 int read; /* number of records read */
998 VARARG(rec,input_records); /* input records */
1002 /* write data (chars and/or attributes) in a screen buffer */
1003 @REQ(write_console_output)
1004 obj_handle_t handle; /* handle to the console output */
1005 int x; /* position where to start writing */
1007 int mode; /* char info (see below) */
1008 int wrap; /* wrap around at end of line? */
1009 VARARG(data,bytes); /* info to write */
1011 int written; /* number of char infos actually written */
1012 int width; /* width of screen buffer */
1013 int height; /* height of screen buffer */
1017 CHAR_INFO_MODE_TEXT, /* characters only */
1018 CHAR_INFO_MODE_ATTR, /* attributes only */
1019 CHAR_INFO_MODE_TEXTATTR, /* both characters and attributes */
1020 CHAR_INFO_MODE_TEXTSTDATTR /* characters but use standard attributes */
1024 /* fill a screen buffer with constant data (chars and/or attributes) */
1025 @REQ(fill_console_output)
1026 obj_handle_t handle; /* handle to the console output */
1027 int x; /* position where to start writing */
1029 int mode; /* char info mode */
1030 int count; /* number to write */
1031 int wrap; /* wrap around at end of line? */
1032 char_info_t data; /* data to write */
1034 int written; /* number of char infos actually written */
1038 /* read data (chars and/or attributes) from a screen buffer */
1039 @REQ(read_console_output)
1040 obj_handle_t handle; /* handle to the console output */
1041 int x; /* position (x,y) where to start reading */
1043 int mode; /* char info mode */
1044 int wrap; /* wrap around at end of line? */
1046 int width; /* width of screen buffer */
1047 int height; /* height of screen buffer */
1052 /* move a rect (of data) in screen buffer content */
1053 @REQ(move_console_output)
1054 obj_handle_t handle; /* handle to the console output */
1055 short int x_src; /* position (x, y) of rect to start moving from */
1057 short int x_dst; /* position (x, y) of rect to move to */
1059 short int w; /* size of the rect (width, height) to move */
1064 /* Sends a signal to a process group */
1065 @REQ(send_console_signal)
1066 int signal; /* the signal to send */
1067 process_id_t group_id; /* the group to send the signal to */
1071 /* Create a change notification */
1072 @REQ(create_change_notification)
1073 obj_handle_t handle; /* handle to the directory */
1074 int subtree; /* watch all the subtree */
1075 unsigned int filter; /* notification filter */
1077 obj_handle_t handle; /* handle to the change notification */
1081 /* Move to the next change notification */
1082 @REQ(next_change_notification)
1083 obj_handle_t handle; /* handle to the change notification */
1086 /* Create a file mapping */
1087 @REQ(create_mapping)
1088 int size_high; /* mapping size */
1089 int size_low; /* mapping size */
1090 int protect; /* protection flags (see below) */
1091 unsigned int access; /* wanted access rights */
1092 int inherit; /* inherit flag */
1093 obj_handle_t file_handle; /* file handle */
1094 VARARG(name,unicode_str); /* object name */
1096 obj_handle_t handle; /* handle to the mapping */
1098 /* protection flags */
1099 #define VPROT_READ 0x01
1100 #define VPROT_WRITE 0x02
1101 #define VPROT_EXEC 0x04
1102 #define VPROT_WRITECOPY 0x08
1103 #define VPROT_GUARD 0x10
1104 #define VPROT_NOCACHE 0x20
1105 #define VPROT_COMMITTED 0x40
1106 #define VPROT_IMAGE 0x80
1109 /* Open a mapping */
1111 unsigned int access; /* wanted access rights */
1112 int inherit; /* inherit flag */
1113 VARARG(name,unicode_str); /* object name */
1115 obj_handle_t handle; /* handle to the mapping */
1119 /* Get information about a file mapping */
1120 @REQ(get_mapping_info)
1121 obj_handle_t handle; /* handle to the mapping */
1123 int size_high; /* mapping size */
1124 int size_low; /* mapping size */
1125 int protect; /* protection flags */
1126 int header_size; /* header size (for VPROT_IMAGE mapping) */
1127 void* base; /* default base addr (for VPROT_IMAGE mapping) */
1128 obj_handle_t shared_file; /* shared mapping file handle */
1129 int shared_size; /* shared mapping size */
1130 int drive_type; /* type of drive the file is on */
1134 /* Create a device */
1136 unsigned int access; /* wanted access rights */
1137 int inherit; /* inherit flag */
1138 int id; /* client private id */
1140 obj_handle_t handle; /* handle to the device */
1144 /* Retrieve the client private id for a device */
1146 obj_handle_t handle; /* handle to the device */
1148 int id; /* client private id */
1152 #define SNAP_HEAPLIST 0x00000001
1153 #define SNAP_PROCESS 0x00000002
1154 #define SNAP_THREAD 0x00000004
1155 #define SNAP_MODULE 0x00000008
1156 /* Create a snapshot */
1157 @REQ(create_snapshot)
1158 int inherit; /* inherit flag */
1159 int flags; /* snapshot flags (SNAP_*) */
1160 process_id_t pid; /* process id */
1162 obj_handle_t handle; /* handle to the snapshot */
1166 /* Get the next process from a snapshot */
1168 obj_handle_t handle; /* handle to the snapshot */
1169 int reset; /* reset snapshot position? */
1171 int count; /* process usage count */
1172 process_id_t pid; /* process id */
1173 process_id_t ppid; /* parent process id */
1174 void* heap; /* heap base */
1175 void* module; /* main module */
1176 int threads; /* number of threads */
1177 int priority; /* process priority */
1178 int handles; /* number of handles */
1179 VARARG(filename,unicode_str); /* file name of main exe */
1183 /* Get the next thread from a snapshot */
1185 obj_handle_t handle; /* handle to the snapshot */
1186 int reset; /* reset snapshot position? */
1188 int count; /* thread usage count */
1189 process_id_t pid; /* process id */
1190 thread_id_t tid; /* thread id */
1191 int base_pri; /* base priority */
1192 int delta_pri; /* delta priority */
1196 /* Get the next module from a snapshot */
1198 obj_handle_t handle; /* handle to the snapshot */
1199 int reset; /* reset snapshot position? */
1201 process_id_t pid; /* process id */
1202 void* base; /* module base address */
1203 size_t size; /* module size */
1204 VARARG(filename,unicode_str); /* file name of module */
1208 /* Wait for a debug event */
1209 @REQ(wait_debug_event)
1210 int get_handle; /* should we alloc a handle for waiting? */
1212 process_id_t pid; /* process id */
1213 thread_id_t tid; /* thread id */
1214 obj_handle_t wait; /* wait handle if no event ready */
1215 VARARG(event,debug_event); /* debug event data */
1219 /* Queue an exception event */
1220 @REQ(queue_exception_event)
1221 int first; /* first chance exception? */
1222 VARARG(record,exc_event); /* thread context followed by exception record */
1224 obj_handle_t handle; /* handle to the queued event */
1228 /* Retrieve the status of an exception event */
1229 @REQ(get_exception_status)
1230 obj_handle_t handle; /* handle to the queued event */
1232 int status; /* event continuation status */
1233 VARARG(context,context); /* modified thread context */
1237 /* Send an output string to the debugger */
1238 @REQ(output_debug_string)
1239 void* string; /* string to display (in debugged process address space) */
1240 int unicode; /* is it Unicode? */
1241 int length; /* string length */
1245 /* Continue a debug event */
1246 @REQ(continue_debug_event)
1247 process_id_t pid; /* process id to continue */
1248 thread_id_t tid; /* thread id to continue */
1249 int status; /* continuation status */
1253 /* Start/stop debugging an existing process */
1255 process_id_t pid; /* id of the process to debug */
1256 int attach; /* 1=attaching / 0=detaching from the process */
1260 /* Simulate a breakpoint in a process */
1262 obj_handle_t handle; /* process handle */
1264 int self; /* was it the caller itself? */
1268 /* Set debugger kill on exit flag */
1269 @REQ(set_debugger_kill_on_exit)
1270 int kill_on_exit; /* 0=detach/1=kill debuggee when debugger dies */
1274 /* Read data from a process address space */
1275 @REQ(read_process_memory)
1276 obj_handle_t handle; /* process handle */
1277 void* addr; /* addr to read from */
1279 VARARG(data,bytes); /* result data */
1283 /* Write data to a process address space */
1284 @REQ(write_process_memory)
1285 obj_handle_t handle; /* process handle */
1286 void* addr; /* addr to write to (must be int-aligned) */
1287 unsigned int first_mask; /* mask for first word */
1288 unsigned int last_mask; /* mask for last word */
1289 VARARG(data,bytes); /* data to write */
1293 /* Create a registry key */
1295 obj_handle_t parent; /* handle to the parent key */
1296 unsigned int access; /* desired access rights */
1297 unsigned int options; /* creation options */
1298 time_t modif; /* last modification time */
1299 size_t namelen; /* length of key name in bytes */
1300 VARARG(name,unicode_str,namelen); /* key name */
1301 VARARG(class,unicode_str); /* class name */
1303 obj_handle_t hkey; /* handle to the created key */
1304 int created; /* has it been newly created? */
1307 /* Open a registry key */
1309 obj_handle_t parent; /* handle to the parent key */
1310 unsigned int access; /* desired access rights */
1311 VARARG(name,unicode_str); /* key name */
1313 obj_handle_t hkey; /* handle to the open key */
1317 /* Delete a registry key */
1319 obj_handle_t hkey; /* handle to the key */
1323 /* Enumerate registry subkeys */
1325 obj_handle_t hkey; /* handle to registry key */
1326 int index; /* index of subkey (or -1 for current key) */
1327 int info_class; /* requested information class */
1329 int subkeys; /* number of subkeys */
1330 int max_subkey; /* longest subkey name */
1331 int max_class; /* longest class name */
1332 int values; /* number of values */
1333 int max_value; /* longest value name */
1334 int max_data; /* longest value data */
1335 time_t modif; /* last modification time */
1336 size_t total; /* total length needed for full name and class */
1337 size_t namelen; /* length of key name in bytes */
1338 VARARG(name,unicode_str,namelen); /* key name */
1339 VARARG(class,unicode_str); /* class name */
1343 /* Set a value of a registry key */
1345 obj_handle_t hkey; /* handle to registry key */
1346 int type; /* value type */
1347 size_t namelen; /* length of value name in bytes */
1348 VARARG(name,unicode_str,namelen); /* value name */
1349 VARARG(data,bytes); /* value data */
1353 /* Retrieve the value of a registry key */
1355 obj_handle_t hkey; /* handle to registry key */
1356 VARARG(name,unicode_str); /* value name */
1358 int type; /* value type */
1359 size_t total; /* total length needed for data */
1360 VARARG(data,bytes); /* value data */
1364 /* Enumerate a value of a registry key */
1365 @REQ(enum_key_value)
1366 obj_handle_t hkey; /* handle to registry key */
1367 int index; /* value index */
1368 int info_class; /* requested information class */
1370 int type; /* value type */
1371 size_t total; /* total length needed for full name and data */
1372 size_t namelen; /* length of value name in bytes */
1373 VARARG(name,unicode_str,namelen); /* value name */
1374 VARARG(data,bytes); /* value data */
1378 /* Delete a value of a registry key */
1379 @REQ(delete_key_value)
1380 obj_handle_t hkey; /* handle to registry key */
1381 VARARG(name,unicode_str); /* value name */
1385 /* Load a registry branch from a file */
1387 obj_handle_t hkey; /* root key to load to */
1388 obj_handle_t file; /* file to load from */
1389 VARARG(name,unicode_str); /* subkey name */
1393 /* UnLoad a registry branch from a file */
1394 @REQ(unload_registry)
1395 obj_handle_t hkey; /* root key to unload to */
1399 /* Save a registry branch to a file */
1401 obj_handle_t hkey; /* key to save */
1402 obj_handle_t file; /* file to save to */
1406 /* Save a registry branch at server exit */
1407 @REQ(save_registry_atexit)
1408 obj_handle_t hkey; /* key to save */
1409 VARARG(file,string); /* file to save to */
1413 /* Set the current and saving level for the registry */
1414 @REQ(set_registry_levels)
1415 int current; /* new current level */
1416 int saving; /* new saving level */
1417 int period; /* duration between periodic saves (milliseconds) */
1421 @REQ(set_registry_notification)
1422 obj_handle_t hkey; /* key to watch for changes */
1423 obj_handle_t event; /* event to set */
1424 int subtree; /* should we watch the whole subtree? */
1425 unsigned int filter; /* things to watch */
1429 /* Create a waitable timer */
1431 int inherit; /* inherit flag */
1432 int manual; /* manual reset */
1433 VARARG(name,unicode_str); /* object name */
1435 obj_handle_t handle; /* handle to the timer */
1439 /* Open a waitable timer */
1441 unsigned int access; /* wanted access rights */
1442 int inherit; /* inherit flag */
1443 VARARG(name,unicode_str); /* object name */
1445 obj_handle_t handle; /* handle to the timer */
1448 /* Set a waitable timer */
1450 obj_handle_t handle; /* handle to the timer */
1451 abs_time_t expire; /* next expiration absolute time */
1452 int period; /* timer period in ms */
1453 void* callback; /* callback function */
1454 void* arg; /* callback argument */
1456 int signaled; /* was the timer signaled before this call ? */
1459 /* Cancel a waitable timer */
1461 obj_handle_t handle; /* handle to the timer */
1463 int signaled; /* was the timer signaled before this calltime ? */
1467 /* Retrieve the current context of a thread */
1468 @REQ(get_thread_context)
1469 obj_handle_t handle; /* thread handle */
1470 unsigned int flags; /* context flags */
1472 VARARG(context,context); /* thread context */
1476 /* Set the current context of a thread */
1477 @REQ(set_thread_context)
1478 obj_handle_t handle; /* thread handle */
1479 unsigned int flags; /* context flags */
1480 VARARG(context,context); /* thread context */
1484 /* Fetch a selector entry for a thread */
1485 @REQ(get_selector_entry)
1486 obj_handle_t handle; /* thread handle */
1487 int entry; /* LDT entry */
1489 unsigned int base; /* selector base */
1490 unsigned int limit; /* selector limit */
1491 unsigned char flags; /* selector flags */
1497 int local; /* is atom in local process table? */
1498 VARARG(name,unicode_str); /* atom name */
1500 atom_t atom; /* resulting atom */
1504 /* Delete an atom */
1506 atom_t atom; /* atom handle */
1507 int local; /* is atom in local process table? */
1513 int local; /* is atom in local process table? */
1514 VARARG(name,unicode_str); /* atom name */
1516 atom_t atom; /* atom handle */
1520 /* Get an atom name */
1522 atom_t atom; /* atom handle */
1523 int local; /* is atom in local process table? */
1525 int count; /* atom lock count */
1526 VARARG(name,unicode_str); /* atom name */
1530 /* Init the process atom table */
1531 @REQ(init_atom_table)
1532 int entries; /* number of entries */
1536 /* Get the message queue of the current thread */
1539 obj_handle_t handle; /* handle to the queue */
1543 /* Set the current message queue wakeup mask */
1544 @REQ(set_queue_mask)
1545 unsigned int wake_mask; /* wakeup bits mask */
1546 unsigned int changed_mask; /* changed bits mask */
1547 int skip_wait; /* will we skip waiting if signaled? */
1549 unsigned int wake_bits; /* current wake bits */
1550 unsigned int changed_bits; /* current changed bits */
1554 /* Get the current message queue status */
1555 @REQ(get_queue_status)
1556 int clear; /* should we clear the change bits? */
1558 unsigned int wake_bits; /* wake bits */
1559 unsigned int changed_bits; /* changed bits since last time */
1563 /* Wait for a process to start waiting on input */
1564 @REQ(wait_input_idle)
1565 obj_handle_t handle; /* process handle */
1566 int timeout; /* timeout */
1568 obj_handle_t event; /* handle to idle event */
1572 /* Send a message to a thread queue */
1574 thread_id_t id; /* thread id */
1575 int type; /* message type (see below) */
1576 int flags; /* message flags (see below) */
1577 user_handle_t win; /* window handle */
1578 unsigned int msg; /* message code */
1579 unsigned int wparam; /* parameters */
1580 unsigned int lparam; /* parameters */
1581 int x; /* x position */
1582 int y; /* y position */
1583 unsigned int time; /* message time */
1584 unsigned int info; /* extra info */
1585 int timeout; /* timeout for reply */
1586 void* callback; /* callback address */
1587 VARARG(data,bytes); /* message data for sent messages */
1592 MSG_ASCII, /* Ascii message (from SendMessageA) */
1593 MSG_UNICODE, /* Unicode message (from SendMessageW) */
1594 MSG_NOTIFY, /* notify message (from SendNotifyMessageW), always Unicode */
1595 MSG_CALLBACK, /* callback message (from SendMessageCallbackW), always Unicode */
1596 MSG_CALLBACK_RESULT,/* result of a callback message */
1597 MSG_OTHER_PROCESS, /* sent from other process, may include vararg data, always Unicode */
1598 MSG_POSTED, /* posted message (from PostMessageW), always Unicode */
1599 MSG_HARDWARE /* hardware message */
1601 #define SEND_MSG_ABORT_IF_HUNG 0x01
1604 /* Get a message from the current queue */
1606 int flags; /* see below */
1607 user_handle_t get_win; /* window handle to get */
1608 unsigned int get_first; /* first message code to get */
1609 unsigned int get_last; /* last message code to get */
1611 int type; /* message type */
1612 user_handle_t win; /* window handle */
1613 unsigned int msg; /* message code */
1614 unsigned int wparam; /* parameters (callback function for MSG_CALLBACK_RESULT) */
1615 unsigned int lparam; /* parameters (result for MSG_CALLBACK_RESULT) */
1616 int x; /* x position */
1617 int y; /* y position */
1618 unsigned int time; /* message time */
1619 unsigned int info; /* extra info (callback argument for MSG_CALLBACK_RESULT) */
1620 size_t total; /* total size of extra data */
1621 VARARG(data,bytes); /* message data for sent messages */
1623 #define GET_MSG_REMOVE 1 /* remove the message */
1624 #define GET_MSG_SENT_ONLY 2 /* only get sent messages */
1626 /* Reply to a sent message */
1628 int type; /* type of original message */
1629 unsigned int result; /* message result */
1630 int remove; /* should we remove the message? */
1631 VARARG(data,bytes); /* message data for sent messages */
1635 /* Retrieve the reply for the last message sent */
1636 @REQ(get_message_reply)
1637 int cancel; /* cancel message if not ready? */
1639 unsigned int result; /* message result */
1640 VARARG(data,bytes); /* message data for sent messages */
1644 /* Set a window timer */
1646 user_handle_t win; /* window handle */
1647 unsigned int msg; /* message to post */
1648 unsigned int id; /* timer id */
1649 unsigned int rate; /* timer rate in ms */
1650 unsigned int lparam; /* message lparam (callback proc) */
1654 /* Kill a window timer */
1655 @REQ(kill_win_timer)
1656 user_handle_t win; /* window handle */
1657 unsigned int msg; /* message to post */
1658 unsigned int id; /* timer id */
1662 /* Open a serial port */
1664 unsigned int access; /* wanted access rights */
1665 int inherit; /* inherit flag */
1666 unsigned int attributes; /* eg. FILE_FLAG_OVERLAPPED */
1667 unsigned int sharing; /* sharing flags */
1668 VARARG(name,string); /* file name */
1670 obj_handle_t handle; /* handle to the port */
1674 /* Retrieve info about a serial port */
1675 @REQ(get_serial_info)
1676 obj_handle_t handle; /* handle to comm port */
1678 unsigned int readinterval;
1679 unsigned int readconst;
1680 unsigned int readmult;
1681 unsigned int writeconst;
1682 unsigned int writemult;
1683 unsigned int eventmask;
1684 unsigned int commerror;
1688 /* Set info about a serial port */
1689 @REQ(set_serial_info)
1690 obj_handle_t handle; /* handle to comm port */
1691 int flags; /* bitmask to set values (see below) */
1692 unsigned int readinterval;
1693 unsigned int readconst;
1694 unsigned int readmult;
1695 unsigned int writeconst;
1696 unsigned int writemult;
1697 unsigned int eventmask;
1698 unsigned int commerror;
1700 #define SERIALINFO_SET_TIMEOUTS 0x01
1701 #define SERIALINFO_SET_MASK 0x02
1702 #define SERIALINFO_SET_ERROR 0x04
1705 /* Create / reschedule an async I/O */
1706 @REQ(register_async)
1707 obj_handle_t handle; /* handle to comm port, socket or file */
1711 unsigned int status;
1713 #define ASYNC_TYPE_NONE 0x00
1714 #define ASYNC_TYPE_READ 0x01
1715 #define ASYNC_TYPE_WRITE 0x02
1716 #define ASYNC_TYPE_WAIT 0x03
1719 /* Create a named pipe */
1720 @REQ(create_named_pipe)
1721 unsigned int openmode;
1722 unsigned int pipemode;
1723 unsigned int maxinstances;
1724 unsigned int outsize;
1725 unsigned int insize;
1726 unsigned int timeout;
1727 VARARG(name,unicode_str); /* pipe name */
1729 obj_handle_t handle; /* handle to the pipe */
1733 /* Open an existing named pipe */
1734 @REQ(open_named_pipe)
1735 unsigned int access;
1736 int inherit; /* inherit flag */
1737 VARARG(name,unicode_str); /* pipe name */
1739 obj_handle_t handle; /* handle to the pipe */
1743 /* Connect to a named pipe */
1744 @REQ(connect_named_pipe)
1745 obj_handle_t handle;
1751 /* Wait for a named pipe */
1752 @REQ(wait_named_pipe)
1753 unsigned int timeout;
1756 VARARG(name,unicode_str); /* pipe name */
1760 /* Disconnect a named pipe */
1761 @REQ(disconnect_named_pipe)
1762 obj_handle_t handle;
1764 int fd; /* associated fd to close */
1768 @REQ(get_named_pipe_info)
1769 obj_handle_t handle;
1772 unsigned int maxinstances;
1773 unsigned int outsize;
1774 unsigned int insize;
1780 unsigned int tree_id;
1781 unsigned int user_id;
1782 unsigned int file_id;
1783 unsigned int dialect;
1785 obj_handle_t handle;
1790 obj_handle_t handle;
1792 unsigned int offset;
1794 unsigned int tree_id;
1795 unsigned int user_id;
1796 unsigned int dialect;
1797 unsigned int file_id;
1798 unsigned int offset;
1800 #define SMBINFO_SET_OFFSET 0x01
1803 /* Create a window */
1805 user_handle_t parent; /* parent window */
1806 user_handle_t owner; /* owner window */
1807 atom_t atom; /* class atom */
1809 user_handle_t handle; /* created window */
1813 /* Link a window into the tree */
1815 user_handle_t handle; /* handle to the window */
1816 user_handle_t parent; /* handle to the parent */
1817 user_handle_t previous; /* previous child in Z-order */
1819 user_handle_t full_parent; /* full handle of new parent */
1823 /* Destroy a window */
1824 @REQ(destroy_window)
1825 user_handle_t handle; /* handle to the window */
1829 /* Set a window owner */
1830 @REQ(set_window_owner)
1831 user_handle_t handle; /* handle to the window */
1832 user_handle_t owner; /* new owner */
1834 user_handle_t full_owner; /* full handle of new owner */
1835 user_handle_t prev_owner; /* full handle of previous owner */
1839 /* Get information from a window handle */
1840 @REQ(get_window_info)
1841 user_handle_t handle; /* handle to the window */
1843 user_handle_t full_handle; /* full 32-bit handle */
1844 user_handle_t last_active; /* last active popup */
1845 process_id_t pid; /* process owning the window */
1846 thread_id_t tid; /* thread owning the window */
1847 atom_t atom; /* class atom */
1851 /* Set some information in a window */
1852 @REQ(set_window_info)
1853 user_handle_t handle; /* handle to the window */
1854 unsigned int flags; /* flags for fields to set (see below) */
1855 unsigned int style; /* window style */
1856 unsigned int ex_style; /* window extended style */
1857 unsigned int id; /* window id */
1858 void* instance; /* creator instance */
1859 void* user_data; /* user-specific data */
1861 unsigned int old_style; /* old window style */
1862 unsigned int old_ex_style; /* old window extended style */
1863 unsigned int old_id; /* old window id */
1864 void* old_instance; /* old creator instance */
1865 void* old_user_data; /* old user-specific data */
1867 #define SET_WIN_STYLE 0x01
1868 #define SET_WIN_EXSTYLE 0x02
1869 #define SET_WIN_ID 0x04
1870 #define SET_WIN_INSTANCE 0x08
1871 #define SET_WIN_USERDATA 0x10
1874 /* Get a list of the window parents, up to the root of the tree */
1875 @REQ(get_window_parents)
1876 user_handle_t handle; /* handle to the window */
1878 int count; /* total count of parents */
1879 VARARG(parents,user_handles); /* parent handles */
1883 /* Get a list of the window children */
1884 @REQ(get_window_children)
1885 user_handle_t parent; /* parent window */
1886 atom_t atom; /* class atom for the listed children */
1887 thread_id_t tid; /* thread owning the listed children */
1889 int count; /* total count of children */
1890 VARARG(children,user_handles); /* children handles */
1894 /* Get window tree information from a window handle */
1895 @REQ(get_window_tree)
1896 user_handle_t handle; /* handle to the window */
1898 user_handle_t parent; /* parent window */
1899 user_handle_t owner; /* owner window */
1900 user_handle_t next_sibling; /* next sibling in Z-order */
1901 user_handle_t prev_sibling; /* prev sibling in Z-order */
1902 user_handle_t first_sibling; /* first sibling in Z-order */
1903 user_handle_t last_sibling; /* last sibling in Z-order */
1904 user_handle_t first_child; /* first child */
1905 user_handle_t last_child; /* last child */
1908 /* Set the window and client rectangles of a window */
1909 @REQ(set_window_rectangles)
1910 user_handle_t handle; /* handle to the window */
1911 rectangle_t window; /* window rectangle */
1912 rectangle_t client; /* client rectangle */
1916 /* Get the window and client rectangles of a window */
1917 @REQ(get_window_rectangles)
1918 user_handle_t handle; /* handle to the window */
1920 rectangle_t window; /* window rectangle */
1921 rectangle_t client; /* client rectangle */
1925 /* Get the window text */
1926 @REQ(get_window_text)
1927 user_handle_t handle; /* handle to the window */
1929 VARARG(text,unicode_str); /* window text */
1933 /* Set the window text */
1934 @REQ(set_window_text)
1935 user_handle_t handle; /* handle to the window */
1936 VARARG(text,unicode_str); /* window text */
1940 /* Increment the window paint count */
1941 @REQ(inc_window_paint_count)
1942 user_handle_t handle; /* handle to the window */
1943 int incr; /* increment (can be negative) */
1947 /* Get the coordinates offset between two windows */
1948 @REQ(get_windows_offset)
1949 user_handle_t from; /* handle to the first window */
1950 user_handle_t to; /* handle to the second window */
1952 int x; /* x coordinate offset */
1953 int y; /* y coordinate offset */
1957 /* Set a window property */
1958 @REQ(set_window_property)
1959 user_handle_t window; /* handle to the window */
1960 atom_t atom; /* property atom (high-word set if it was a string) */
1961 int string; /* was atom a string originally? */
1962 obj_handle_t handle; /* handle to store */
1966 /* Remove a window property */
1967 @REQ(remove_window_property)
1968 user_handle_t window; /* handle to the window */
1969 atom_t atom; /* property atom */
1971 obj_handle_t handle; /* handle stored in property */
1975 /* Get a window property */
1976 @REQ(get_window_property)
1977 user_handle_t window; /* handle to the window */
1978 atom_t atom; /* property atom */
1980 obj_handle_t handle; /* handle stored in property */
1984 /* Get the list of properties of a window */
1985 @REQ(get_window_properties)
1986 user_handle_t window; /* handle to the window */
1988 int total; /* total number of properties */
1989 VARARG(props,properties); /* list of properties */
1993 /* Attach (or detach) thread inputs */
1994 @REQ(attach_thread_input)
1995 thread_id_t tid_from; /* thread to be attached */
1996 thread_id_t tid_to; /* thread to which tid_from should be attached */
1997 int attach; /* is it an attach? */
2001 /* Get input data for a given thread */
2002 @REQ(get_thread_input)
2003 thread_id_t tid; /* id of thread */
2005 user_handle_t focus; /* handle to the focus window */
2006 user_handle_t capture; /* handle to the capture window */
2007 user_handle_t active; /* handle to the active window */
2008 user_handle_t foreground; /* handle to the global foreground window */
2009 user_handle_t menu_owner; /* handle to the menu owner */
2010 user_handle_t move_size; /* handle to the moving/resizing window */
2011 user_handle_t caret; /* handle to the caret window */
2012 rectangle_t rect; /* caret rectangle */
2015 /* Retrieve queue keyboard state for a given thread */
2017 thread_id_t tid; /* id of thread */
2018 int key; /* optional key code or -1 */
2020 unsigned char state; /* state of specified key */
2021 VARARG(keystate,bytes); /* state array for all the keys */
2024 /* Set queue keyboard state for a given thread */
2026 thread_id_t tid; /* id of thread */
2027 VARARG(keystate,bytes); /* state array for all the keys */
2030 /* Set the system foreground window */
2031 @REQ(set_foreground_window)
2032 user_handle_t handle; /* handle to the foreground window */
2034 user_handle_t previous; /* handle to the previous foreground window */
2035 int send_msg_old; /* whether we have to send a msg to the old window */
2036 int send_msg_new; /* whether we have to send a msg to the new window */
2039 /* Set the current thread focus window */
2040 @REQ(set_focus_window)
2041 user_handle_t handle; /* handle to the focus window */
2043 user_handle_t previous; /* handle to the previous focus window */
2046 /* Set the current thread active window */
2047 @REQ(set_active_window)
2048 user_handle_t handle; /* handle to the active window */
2050 user_handle_t previous; /* handle to the previous active window */
2053 /* Set the current thread capture window */
2054 @REQ(set_capture_window)
2055 user_handle_t handle; /* handle to the capture window */
2056 unsigned int flags; /* capture flags (see below) */
2058 user_handle_t previous; /* handle to the previous capture window */
2059 user_handle_t full_handle; /* full 32-bit handle of new capture window */
2061 #define CAPTURE_MENU 0x01 /* capture is for a menu */
2062 #define CAPTURE_MOVESIZE 0x02 /* capture is for moving/resizing */
2065 /* Set the current thread caret window */
2066 @REQ(set_caret_window)
2067 user_handle_t handle; /* handle to the caret window */
2068 int width; /* caret width */
2069 int height; /* caret height */
2071 user_handle_t previous; /* handle to the previous caret window */
2072 rectangle_t old_rect; /* previous caret rectangle */
2073 int old_hide; /* previous hide count */
2074 int old_state; /* previous caret state (1=on, 0=off) */
2078 /* Set the current thread caret information */
2079 @REQ(set_caret_info)
2080 unsigned int flags; /* caret flags (see below) */
2081 user_handle_t handle; /* handle to the caret window */
2082 int x; /* caret x position */
2083 int y; /* caret y position */
2084 int hide; /* increment for hide count (can be negative to show it) */
2085 int state; /* caret state (1=on, 0=off, -1=toggle current state) */
2087 user_handle_t full_handle; /* handle to the current caret window */
2088 rectangle_t old_rect; /* previous caret rectangle */
2089 int old_hide; /* previous hide count */
2090 int old_state; /* previous caret state (1=on, 0=off) */
2092 #define SET_CARET_POS 0x01 /* set the caret position from x,y */
2093 #define SET_CARET_HIDE 0x02 /* increment the caret hide count */
2094 #define SET_CARET_STATE 0x04 /* set the caret on/off state */
2097 /* Set a window hook */
2099 int id; /* id of the hook */
2100 thread_id_t tid; /* id of thread to set the hook into */
2101 void* proc; /* hook procedure */
2102 int unicode; /* is it a unicode hook? */
2103 VARARG(module,unicode_str); /* module name */
2105 user_handle_t handle; /* handle to the hook */
2109 /* Remove a window hook */
2111 user_handle_t handle; /* handle to the hook */
2112 int id; /* id of the hook if handle is 0 */
2113 void* proc; /* hook procedure if handle is 0 */
2117 /* Start calling a hook chain */
2118 @REQ(start_hook_chain)
2119 int id; /* id of the hook */
2121 user_handle_t handle; /* handle to the next hook */
2122 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2123 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2124 void* proc; /* hook procedure */
2125 int unicode; /* is it a unicode hook? */
2126 VARARG(module,unicode_str); /* module name */
2130 /* Finished calling a hook chain */
2131 @REQ(finish_hook_chain)
2132 int id; /* id of the hook */
2136 /* Get the next hook to call */
2138 user_handle_t handle; /* handle to the current hook */
2140 user_handle_t next; /* handle to the next hook */
2141 int id; /* id of the next hook */
2142 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2143 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2144 void* proc; /* next hook procedure */
2145 int prev_unicode; /* was the previous a unicode hook? */
2146 int next_unicode; /* is the next a unicode hook? */
2147 VARARG(module,unicode_str); /* module name */
2151 /* Set/get clipboard information */
2152 @REQ(set_clipboard_info)
2153 unsigned int flags; /* flags for fields to set (see below) */
2154 user_handle_t clipboard; /* clipboard window */
2155 user_handle_t owner; /* clipboard owner */
2156 user_handle_t viewer; /* first clipboard viewer */
2157 unsigned int seqno; /* change sequence number */
2159 unsigned int flags; /* status flags (see below) */
2160 user_handle_t old_clipboard; /* old clipboard window */
2161 user_handle_t old_owner; /* old clipboard owner */
2162 user_handle_t old_viewer; /* old clipboard viewer */
2163 unsigned int seqno; /* current sequence number */
2166 #define SET_CB_OPEN 0x001
2167 #define SET_CB_OWNER 0x002
2168 #define SET_CB_VIEWER 0x004
2169 #define SET_CB_SEQNO 0x008
2170 #define SET_CB_RELOWNER 0x010
2171 #define SET_CB_CLOSE 0x020
2172 #define CB_OPEN 0x040
2173 #define CB_OWNER 0x080
2176 /* Open a security token */
2178 obj_handle_t handle; /* handle to the thread or process */
2179 unsigned int flags; /* flags (see below) */
2181 obj_handle_t token; /* handle to the token */
2183 #define OPEN_TOKEN_THREAD 1
2184 #define OPEN_TOKEN_AS_SELF 2