3 * Wine server protocol definition
5 * Copyright (C
) 2001 Alexandre Julliard
7 * This file is used by tools
/make_requests to build the
8 * protocol structures in include
/wine
/server_protocol.h
10 * This library is free software
; you can redistribute it and
/or
11 * modify it under the terms of the GNU Lesser General Public
12 * License as published by the Free Software Foundation
; either
13 * version
2.1 of the License
, or (at your option
) any later version.
15 * This library is distributed in the hope that it will be useful
,
16 * but WITHOUT ANY WARRANTY
; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU
18 * Lesser General Public License for more details.
20 * You should have received a copy of the GNU Lesser General Public
21 * License along with this library
; if not
, write to the Free Software
22 * Foundation
, Inc.
, 59 Temple Place
, Suite
330, Boston
, MA
02111-1307 USA
25 @HEADER
/* start of C declarations
*/
36 int req
; /* request code
*/
37 size_t request_size
; /* request variable part size
*/
38 size_t reply_size
; /* reply variable part maximum size
*/
43 unsigned int error
; /* error result
*/
44 size_t reply_size
; /* reply variable part size
*/
47 /* placeholder structure for the maximum allowed request size
*/
48 /* this is used to construct the generic_request union
*/
49 struct request_max_size
51 int pad
[16]; /* the max request size is
16 ints
*/
54 typedef void
*obj_handle_t
;
55 typedef void
*user_handle_t
;
56 typedef unsigned short atom_t
;
57 typedef unsigned int process_id_t
;
58 typedef unsigned int thread_id_t
;
60 #define FIRST_USER_HANDLE
0x0020 /* first possible value for low word of user handle
*/
61 #define LAST_USER_HANDLE
0xffef /* last possible value for low word of user handle
*/
64 /* definitions of the event data depending on the event code
*/
65 struct debug_event_exception
67 EXCEPTION_RECORD record
; /* exception record
*/
68 int first
; /* first chance exception?
*/
70 struct debug_event_create_thread
72 obj_handle_t handle
; /* handle to the new thread
*/
73 void
*teb
; /* thread
teb (in debugged process address space
) */
74 void
*start
; /* thread startup routine
*/
76 struct debug_event_create_process
78 obj_handle_t file
; /* handle to the process exe file
*/
79 obj_handle_t process
; /* handle to the new process
*/
80 obj_handle_t thread
; /* handle to the new thread
*/
81 void
*base
; /* base of executable image
*/
82 int dbg_offset
; /* offset of debug info in file
*/
83 int dbg_size
; /* size of debug info
*/
84 void
*teb
; /* thread
teb (in debugged process address space
) */
85 void
*start
; /* thread startup routine
*/
86 void
*name
; /* image
name (optional
) */
87 int unicode
; /* is it Unicode?
*/
89 struct debug_event_exit
91 int exit_code
; /* thread or process exit code
*/
93 struct debug_event_load_dll
95 obj_handle_t handle
; /* file handle for the dll
*/
96 void
*base
; /* base address of the dll
*/
97 int dbg_offset
; /* offset of debug info in file
*/
98 int dbg_size
; /* size of debug info
*/
99 void
*name
; /* image
name (optional
) */
100 int unicode
; /* is it Unicode?
*/
102 struct debug_event_unload_dll
104 void
*base
; /* base address of the dll
*/
106 struct debug_event_output_string
108 void
*string
; /* string to
display (in debugged process address space
) */
109 int unicode
; /* is it Unicode?
*/
110 int length
; /* string length
*/
112 struct debug_event_rip_info
117 union debug_event_data
119 struct debug_event_exception exception
;
120 struct debug_event_create_thread create_thread
;
121 struct debug_event_create_process create_process
;
122 struct debug_event_exit exit
;
123 struct debug_event_load_dll load_dll
;
124 struct debug_event_unload_dll unload_dll
;
125 struct debug_event_output_string output_string
;
126 struct debug_event_rip_info rip_info
;
129 /* debug event data
*/
132 int code
; /* event code
*/
133 union debug_event_data info
; /* event information
*/
136 /* structure used in sending an fd from client to server
*/
139 thread_id_t tid
; /* thread id
*/
140 int fd
; /* file descriptor on client
-side
*/
143 /* structure sent by the server on the wait fifo
*/
146 void
*cookie
; /* magic cookie that was passed in select_request
*/
147 int signaled
; /* wait result
*/
150 /* structure for absolute timeouts
*/
153 int sec
; /* seconds since Unix epoch
*/
154 int usec
; /* microseconds
*/
157 /* structure returned in the list of window properties
*/
160 atom_t atom
; /* property atom
*/
161 short string
; /* was atom a string originally?
*/
162 obj_handle_t handle
; /* handle stored in property
*/
165 /* structure to specify window rectangles
*/
174 /* structure for console char
/attribute info
*/
181 /****************************************************************/
182 /* Request declarations
*/
184 /* Create a new process from the context of the parent
*/
186 int inherit_all
; /* inherit all handles from parent
*/
187 int create_flags
; /* creation flags
*/
188 int unix_pid
; /* Unix pid of new process
*/
189 obj_handle_t exe_file
; /* file handle for main exe
*/
190 obj_handle_t hstdin
; /* handle for stdin
*/
191 obj_handle_t hstdout
; /* handle for stdout
*/
192 obj_handle_t hstderr
; /* handle for stderr
*/
193 VARARG(info
,startup_info
); /* startup information
*/
195 obj_handle_t info
; /* new process info handle
*/
199 /* Retrieve information about a newly started process
*/
200 @
REQ(get_new_process_info
)
201 obj_handle_t info
; /* info handle returned from new_process_request
*/
202 int pinherit
; /* process handle inherit flag
*/
203 int tinherit
; /* thread handle inherit flag
*/
205 process_id_t pid
; /* process id
*/
206 obj_handle_t phandle
; /* process
handle (in the current process
) */
207 thread_id_t tid
; /* thread id
*/
208 obj_handle_t thandle
; /* thread
handle (in the current process
) */
209 int success
; /* did the process start successfully?
*/
213 /* Create a new thread from the context of the parent
*/
215 int suspend
; /* new thread should be suspended on creation
*/
216 int inherit
; /* inherit flag
*/
217 int request_fd
; /* fd for request pipe
*/
219 thread_id_t tid
; /* thread id
*/
220 obj_handle_t handle
; /* thread
handle (in the current process
) */
224 /* Signal that we are finished booting on the client side
*/
226 int debug_level
; /* new debug level
*/
230 /* Initialize a process
; called from the new process context
*/
232 void
* peb
; /* addr of PEB
*/
233 void
* ldt_copy
; /* addr of LDT copy
*/
235 int create_flags
; /* creation flags
*/
236 unsigned int server_start
; /* server start
time (GetTickCount
) */
237 size_t info_size
; /* total size of startup info
*/
238 obj_handle_t exe_file
; /* file handle for main exe
*/
239 obj_handle_t hstdin
; /* handle for stdin
*/
240 obj_handle_t hstdout
; /* handle for stdout
*/
241 obj_handle_t hstderr
; /* handle for stderr
*/
245 /* Retrieve the new process startup info
*/
246 @
REQ(get_startup_info
)
248 VARARG(info
,startup_info
); /* startup information
*/
252 /* Signal the end of the process initialization
*/
253 @
REQ(init_process_done
)
254 void
* module
; /* main module base address
*/
255 size_t module_size
; /* main module size
*/
256 void
* entry
; /* process entry point
*/
257 void
* name
; /* ptr to ptr to
name (in process addr space
) */
258 obj_handle_t exe_file
; /* file handle for main exe
*/
259 int gui
; /* is it a GUI process?
*/
260 VARARG(filename
,unicode_str
); /* file name of main exe
*/
264 /* Initialize a thread
; called from the child after
fork()/clone() */
266 int unix_pid
; /* Unix pid of new thread
*/
267 int unix_tid
; /* Unix tid of new thread
*/
268 void
* teb
; /* TEB of new
thread (in thread address space
) */
269 void
* entry
; /* thread entry
point (in thread address space
) */
270 int reply_fd
; /* fd for reply pipe
*/
271 int wait_fd
; /* fd for blocking calls pipe
*/
273 process_id_t pid
; /* process id of the new thread
's process */
274 thread_id_t tid; /* thread id of the new thread */
275 int boot; /* is this the boot thread? */
276 int version; /* protocol version */
280 /* Terminate a process */
281 @REQ(terminate_process)
282 obj_handle_t handle; /* process handle to terminate */
283 int exit_code; /* process exit code */
285 int self; /* suicide? */
289 /* Terminate a thread */
290 @REQ(terminate_thread)
291 obj_handle_t handle; /* thread handle to terminate */
292 int exit_code; /* thread exit code */
294 int self; /* suicide? */
295 int last; /* last thread in this process? */
299 /* Retrieve information about a process */
300 @REQ(get_process_info)
301 obj_handle_t handle; /* process handle */
303 process_id_t pid; /* server process id */
304 int exit_code; /* process exit code */
305 int priority; /* priority class */
306 int process_affinity; /* process affinity mask */
307 int system_affinity; /* system affinity mask */
311 /* Set a process informations */
312 @REQ(set_process_info)
313 obj_handle_t handle; /* process handle */
314 int mask; /* setting mask (see below) */
315 int priority; /* priority class */
316 int affinity; /* affinity mask */
318 #define SET_PROCESS_INFO_PRIORITY 0x01
319 #define SET_PROCESS_INFO_AFFINITY 0x02
322 /* Retrieve information about a thread */
323 @REQ(get_thread_info)
324 obj_handle_t handle; /* thread handle */
325 thread_id_t tid_in; /* thread id (optional) */
327 process_id_t pid; /* server process id */
328 thread_id_t tid; /* server thread id */
329 void* teb; /* thread teb pointer */
330 int exit_code; /* thread exit code */
331 int priority; /* thread priority level */
332 int affinity; /* thread affinity mask */
333 time_t creation_time; /* thread creation time */
334 time_t exit_time; /* thread exit time */
338 /* Set a thread informations */
339 @REQ(set_thread_info)
340 obj_handle_t handle; /* thread handle */
341 int mask; /* setting mask (see below) */
342 int priority; /* priority class */
343 int affinity; /* affinity mask */
345 #define SET_THREAD_INFO_PRIORITY 0x01
346 #define SET_THREAD_INFO_AFFINITY 0x02
349 /* Retrieve information about a module */
351 obj_handle_t handle; /* process handle */
352 void* base_address; /* base address of module */
354 size_t size; /* module size */
356 VARARG(filename,unicode_str); /* file name of module */
360 /* Suspend a thread */
362 obj_handle_t handle; /* thread handle */
364 int count; /* new suspend count */
368 /* Resume a thread */
370 obj_handle_t handle; /* thread handle */
372 int count; /* new suspend count */
376 /* Notify the server that a dll has been loaded */
378 obj_handle_t handle; /* file handle */
379 void* base; /* base address */
380 size_t size; /* dll size */
381 int dbg_offset; /* debug info offset */
382 int dbg_size; /* debug info size */
383 void* name; /* ptr to ptr to name (in process addr space) */
384 VARARG(filename,unicode_str); /* file name of dll */
388 /* Notify the server that a dll is being unloaded */
390 void* base; /* base address */
394 /* Queue an APC for a thread */
396 obj_handle_t handle; /* thread handle */
397 int user; /* user or system apc? */
398 void* func; /* function to call */
399 void* arg1; /* params for function to call */
405 /* Get next APC to call */
407 int alertable; /* is thread alertable? */
409 void* func; /* function to call */
410 int type; /* function type */
411 void* arg1; /* function arguments */
415 enum apc_type { APC_NONE, APC_USER, APC_TIMER, APC_ASYNC, APC_ASYNC_IO };
418 /* Close a handle for the current process */
420 obj_handle_t handle; /* handle to close */
422 int fd; /* associated fd to close */
426 /* Set a handle information */
427 @REQ(set_handle_info)
428 obj_handle_t handle; /* handle we are interested in */
429 int flags; /* new handle flags */
430 int mask; /* mask for flags to set */
431 int fd; /* file descriptor or -1 */
433 int old_flags; /* old flag value */
434 int cur_fd; /* current file descriptor */
438 /* Duplicate a handle */
440 obj_handle_t src_process; /* src process handle */
441 obj_handle_t src_handle; /* src handle to duplicate */
442 obj_handle_t dst_process; /* dst process handle */
443 unsigned int access; /* wanted access rights */
444 int inherit; /* inherit flag */
445 int options; /* duplicate options (see below) */
447 obj_handle_t handle; /* duplicated handle in dst process */
448 int fd; /* associated fd to close */
450 #define DUP_HANDLE_CLOSE_SOURCE DUPLICATE_CLOSE_SOURCE
451 #define DUP_HANDLE_SAME_ACCESS DUPLICATE_SAME_ACCESS
452 #define DUP_HANDLE_MAKE_GLOBAL 0x80000000 /* Not a Windows flag */
455 /* Open a handle to a process */
457 process_id_t pid; /* process id to open */
458 unsigned int access; /* wanted access rights */
459 int inherit; /* inherit flag */
461 obj_handle_t handle; /* handle to the process */
465 /* Open a handle to a thread */
467 thread_id_t tid; /* thread id to open */
468 unsigned int access; /* wanted access rights */
469 int inherit; /* inherit flag */
471 obj_handle_t handle; /* handle to the thread */
475 /* Wait for handles */
477 int flags; /* wait flags (see below) */
478 void* cookie; /* magic cookie to return to client */
479 abs_time_t timeout; /* absolute timeout */
480 VARARG(handles,handles); /* handles to select on */
483 #define SELECT_ALERTABLE 2
484 #define SELECT_INTERRUPTIBLE 4
485 #define SELECT_TIMEOUT 8
488 /* Create an event */
490 int manual_reset; /* manual reset event */
491 int initial_state; /* initial state of the event */
492 int inherit; /* inherit flag */
493 VARARG(name,unicode_str); /* object name */
495 obj_handle_t handle; /* handle to the event */
498 /* Event operation */
500 obj_handle_t handle; /* handle to event */
501 int op; /* event operation (see below) */
503 enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT };
508 unsigned int access; /* wanted access rights */
509 int inherit; /* inherit flag */
510 VARARG(name,unicode_str); /* object name */
512 obj_handle_t handle; /* handle to the event */
518 int owned; /* initially owned? */
519 int inherit; /* inherit flag */
520 VARARG(name,unicode_str); /* object name */
522 obj_handle_t handle; /* handle to the mutex */
526 /* Release a mutex */
528 obj_handle_t handle; /* handle to the mutex */
534 unsigned int access; /* wanted access rights */
535 int inherit; /* inherit flag */
536 VARARG(name,unicode_str); /* object name */
538 obj_handle_t handle; /* handle to the mutex */
542 /* Create a semaphore */
543 @REQ(create_semaphore)
544 unsigned int initial; /* initial count */
545 unsigned int max; /* maximum count */
546 int inherit; /* inherit flag */
547 VARARG(name,unicode_str); /* object name */
549 obj_handle_t handle; /* handle to the semaphore */
553 /* Release a semaphore */
554 @REQ(release_semaphore)
555 obj_handle_t handle; /* handle to the semaphore */
556 unsigned int count; /* count to add to semaphore */
558 unsigned int prev_count; /* previous semaphore count */
562 /* Open a semaphore */
564 unsigned int access; /* wanted access rights */
565 int inherit; /* inherit flag */
566 VARARG(name,unicode_str); /* object name */
568 obj_handle_t handle; /* handle to the semaphore */
574 unsigned int access; /* wanted access rights */
575 int inherit; /* inherit flag */
576 unsigned int sharing; /* sharing flags */
577 int create; /* file create action */
578 unsigned int attrs; /* file attributes for creation */
579 int removable; /* is file on removable media? */
580 VARARG(filename,string); /* file name */
582 obj_handle_t handle; /* handle to the file */
586 /* Allocate a file handle for a Unix fd */
587 @REQ(alloc_file_handle)
588 unsigned int access; /* wanted access rights */
589 int inherit; /* inherit flag */
590 int fd; /* file descriptor on the client side */
592 obj_handle_t handle; /* handle to the file */
596 /* Get a Unix fd to access a file */
598 obj_handle_t handle; /* handle to the file */
599 unsigned int access; /* wanted access rights */
601 int fd; /* file descriptor */
602 int type; /* the type of file (see below) */
603 int flags; /* file read/write flags (see below) */
612 #define FD_FLAG_OVERLAPPED 0x01
613 #define FD_FLAG_TIMEOUT 0x02
614 #define FD_FLAG_RECV_SHUTDOWN 0x04
615 #define FD_FLAG_SEND_SHUTDOWN 0x08
617 /* Set a file current position */
618 @REQ(set_file_pointer)
619 obj_handle_t handle; /* handle to the file */
620 int low; /* position low word */
621 int high; /* position high word */
622 int whence; /* whence to seek */
624 int new_low; /* new position low word */
625 int new_high; /* new position high word */
629 /* Truncate (or extend) a file */
631 obj_handle_t handle; /* handle to the file */
635 /* Set a file access and modification times */
637 obj_handle_t handle; /* handle to the file */
638 time_t access_time; /* last access time */
639 time_t write_time; /* last write time */
643 /* Flush a file buffers */
645 obj_handle_t handle; /* handle to the file */
647 obj_handle_t event; /* event set when finished */
651 /* Get information about a file */
653 obj_handle_t handle; /* handle to the file */
655 int type; /* file type */
656 int attr; /* file attributes */
657 time_t access_time; /* last access time */
658 time_t write_time; /* last write time */
659 time_t change_time; /* last change time */
660 int size_high; /* file size */
661 int size_low; /* file size */
662 int alloc_high; /* size used on disk */
663 int alloc_low; /* size used on disk */
664 int links; /* number of links */
665 int index_high; /* unique index */
666 int index_low; /* unique index */
667 unsigned int serial; /* volume serial number */
671 /* Lock a region of a file */
673 obj_handle_t handle; /* handle to the file */
674 unsigned int offset_low; /* offset of start of lock */
675 unsigned int offset_high; /* offset of start of lock */
676 unsigned int count_low; /* count of bytes to lock */
677 unsigned int count_high; /* count of bytes to lock */
678 int shared; /* shared or exclusive lock? */
679 int wait; /* do we want to wait? */
681 obj_handle_t handle; /* handle to wait on */
682 int overlapped; /* is it an overlapped I/O handle? */
686 /* Unlock a region of a file */
688 obj_handle_t handle; /* handle to the file */
689 unsigned int offset_low; /* offset of start of unlock */
690 unsigned int offset_high; /* offset of start of unlock */
691 unsigned int count_low; /* count of bytes to unlock */
692 unsigned int count_high; /* count of bytes to unlock */
696 /* Create a socket */
698 unsigned int access; /* wanted access rights */
699 int inherit; /* inherit flag */
700 int family; /* family, see socket manpage */
701 int type; /* type, see socket manpage */
702 int protocol; /* protocol, see socket manpage */
703 unsigned int flags; /* socket flags */
705 obj_handle_t handle; /* handle to the new socket */
709 /* Accept a socket */
711 obj_handle_t lhandle; /* handle to the listening socket */
712 unsigned int access; /* wanted access rights */
713 int inherit; /* inherit flag */
715 obj_handle_t handle; /* handle to the new socket */
719 /* Set socket event parameters */
720 @REQ(set_socket_event)
721 obj_handle_t handle; /* handle to the socket */
722 unsigned int mask; /* event mask */
723 obj_handle_t event; /* event object */
724 user_handle_t window; /* window to send the message to */
725 unsigned int msg; /* message to send */
729 /* Get socket event parameters */
730 @REQ(get_socket_event)
731 obj_handle_t handle; /* handle to the socket */
732 int service; /* clear pending? */
733 obj_handle_t c_event; /* event to clear */
735 unsigned int mask; /* event mask */
736 unsigned int pmask; /* pending events */
737 unsigned int state; /* status bits */
738 VARARG(errors,ints); /* event errors */
742 /* Reenable pending socket events */
743 @REQ(enable_socket_event)
744 obj_handle_t handle; /* handle to the socket */
745 unsigned int mask; /* events to re-enable */
746 unsigned int sstate; /* status bits to set */
747 unsigned int cstate; /* status bits to clear */
750 @REQ(set_socket_deferred)
751 obj_handle_t handle; /* handle to the socket */
752 obj_handle_t deferred; /* handle to the socket for which accept() is deferred */
755 /* Allocate a console (only used by a console renderer) */
757 unsigned int access; /* wanted access rights */
758 int inherit; /* inherit flag */
759 process_id_t pid; /* pid of process which shall be attached to the console */
761 obj_handle_t handle_in; /* handle to console input */
762 obj_handle_t event; /* handle to renderer events change notification */
766 /* Free the console of the current process */
771 #define CONSOLE_RENDERER_NONE_EVENT 0x00
772 #define CONSOLE_RENDERER_TITLE_EVENT 0x01
773 #define CONSOLE_RENDERER_ACTIVE_SB_EVENT 0x02
774 #define CONSOLE_RENDERER_SB_RESIZE_EVENT 0x03
775 #define CONSOLE_RENDERER_UPDATE_EVENT 0x04
776 #define CONSOLE_RENDERER_CURSOR_POS_EVENT 0x05
777 #define CONSOLE_RENDERER_CURSOR_GEOM_EVENT 0x06
778 #define CONSOLE_RENDERER_DISPLAY_EVENT 0x07
779 #define CONSOLE_RENDERER_EXIT_EVENT 0x08
780 struct console_renderer_event
815 /* retrieve console events for the renderer */
816 @REQ(get_console_renderer_events)
817 obj_handle_t handle; /* handle to console input events */
819 VARARG(data,bytes); /* the various console_renderer_events */
823 /* Open a handle to the process console */
825 int from; /* 0 (resp 1) input (resp output) of current process console */
826 /* otherwise console_in handle to get active screen buffer? */
827 unsigned int access; /* wanted access rights */
828 int inherit; /* inherit flag */
829 int share; /* share mask (only for output handles) */
831 obj_handle_t handle; /* handle to the console */
835 /* Get the input queue wait event */
836 @REQ(get_console_wait_event)
841 /* Get a console mode (input or output) */
842 @REQ(get_console_mode)
843 obj_handle_t handle; /* handle to the console */
845 int mode; /* console mode */
849 /* Set a console mode (input or output) */
850 @REQ(set_console_mode)
851 obj_handle_t handle; /* handle to the console */
852 int mode; /* console mode */
856 /* Set info about a console (input only) */
857 @REQ(set_console_input_info)
858 obj_handle_t handle; /* handle to console input, or 0 for process' console
*/
859 int mask
; /* setting
mask (see below
) */
860 obj_handle_t active_sb
; /* active screen buffer
*/
861 int history_mode
; /* whether we duplicate lines in history
*/
862 int history_size
; /* number of lines in history
*/
863 int edition_mode
; /* index to the edition mode flavors
*/
864 VARARG(title
,unicode_str
); /* console title
*/
866 #define SET_CONSOLE_INPUT_INFO_ACTIVE_SB
0x01
867 #define SET_CONSOLE_INPUT_INFO_TITLE
0x02
868 #define SET_CONSOLE_INPUT_INFO_HISTORY_MODE
0x04
869 #define SET_CONSOLE_INPUT_INFO_HISTORY_SIZE
0x08
870 #define SET_CONSOLE_INPUT_INFO_EDITION_MODE
0x10
873 /* Get info about a
console (input only
) */
874 @
REQ(get_console_input_info
)
875 obj_handle_t handle
; /* handle to console input
, or
0 for process
' console */
877 int history_mode; /* whether we duplicate lines in history */
878 int history_size; /* number of lines in history */
879 int history_index; /* number of used lines in history */
880 int edition_mode; /* index to the edition mode flavors */
881 VARARG(title,unicode_str); /* console title */
885 /* appends a string to console's history
*/
886 @
REQ(append_console_input_history
)
887 obj_handle_t handle
; /* handle to console input
, or
0 for process
' console */
888 VARARG(line,unicode_str); /* line to add */
892 /* appends a string to console's history
*/
893 @
REQ(get_console_input_history
)
894 obj_handle_t handle
; /* handle to console input
, or
0 for process
' console */
895 int index; /* index to get line from */
897 int total; /* total length of line in Unicode chars */
898 VARARG(line,unicode_str); /* line to add */
902 /* creates a new screen buffer on process' console
*/
903 @
REQ(create_console_output
)
904 obj_handle_t handle_in
; /* handle to console input
, or
0 for process
' console */
905 int access; /* wanted access rights */
906 int share; /* sharing credentials */
907 int inherit; /* inherit flag */
909 obj_handle_t handle_out; /* handle to the screen buffer */
913 /* Set info about a console (output only) */
914 @REQ(set_console_output_info)
915 obj_handle_t handle; /* handle to the console */
916 int mask; /* setting mask (see below) */
917 short int cursor_size; /* size of cursor (percentage filled) */
918 short int cursor_visible;/* cursor visibility flag */
919 short int cursor_x; /* position of cursor (x, y) */
921 short int width; /* width of the screen buffer */
922 short int height; /* height of the screen buffer */
923 short int attr; /* default attribute */
924 short int win_left; /* window actually displayed by renderer */
925 short int win_top; /* the rect area is expressed withing the */
926 short int win_right; /* boundaries of the screen buffer */
927 short int win_bottom;
928 short int max_width; /* maximum size (width x height) for the window */
929 short int max_height;
931 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_GEOM 0x01
932 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_POS 0x02
933 #define SET_CONSOLE_OUTPUT_INFO_SIZE 0x04
934 #define SET_CONSOLE_OUTPUT_INFO_ATTR 0x08
935 #define SET_CONSOLE_OUTPUT_INFO_DISPLAY_WINDOW 0x10
936 #define SET_CONSOLE_OUTPUT_INFO_MAX_SIZE 0x20
939 /* Get info about a console (output only) */
940 @REQ(get_console_output_info)
941 obj_handle_t handle; /* handle to the console */
943 short int cursor_size; /* size of cursor (percentage filled) */
944 short int cursor_visible;/* cursor visibility flag */
945 short int cursor_x; /* position of cursor (x, y) */
947 short int width; /* width of the screen buffer */
948 short int height; /* height of the screen buffer */
949 short int attr; /* default attribute */
950 short int win_left; /* window actually displayed by renderer */
951 short int win_top; /* the rect area is expressed withing the */
952 short int win_right; /* boundaries of the screen buffer */
953 short int win_bottom;
954 short int max_width; /* maximum size (width x height) for the window */
955 short int max_height;
958 /* Add input records to a console input queue */
959 @REQ(write_console_input)
960 obj_handle_t handle; /* handle to the console input */
961 VARARG(rec,input_records); /* input records */
963 int written; /* number of records written */
967 /* Fetch input records from a console input queue */
968 @REQ(read_console_input)
969 obj_handle_t handle; /* handle to the console input */
970 int flush; /* flush the retrieved records from the queue? */
972 int read; /* number of records read */
973 VARARG(rec,input_records); /* input records */
977 /* write data (chars and/or attributes) in a screen buffer */
978 @REQ(write_console_output)
979 obj_handle_t handle; /* handle to the console output */
980 int x; /* position where to start writing */
982 int mode; /* char info (see below) */
983 int wrap; /* wrap around at end of line? */
984 VARARG(data,bytes); /* info to write */
986 int written; /* number of char infos actually written */
987 int width; /* width of screen buffer */
988 int height; /* height of screen buffer */
992 CHAR_INFO_MODE_TEXT, /* characters only */
993 CHAR_INFO_MODE_ATTR, /* attributes only */
994 CHAR_INFO_MODE_TEXTATTR, /* both characters and attributes */
995 CHAR_INFO_MODE_TEXTSTDATTR /* characters but use standard attributes */
999 /* fill a screen buffer with constant data (chars and/or attributes) */
1000 @REQ(fill_console_output)
1001 obj_handle_t handle; /* handle to the console output */
1002 int x; /* position where to start writing */
1004 int mode; /* char info mode */
1005 int count; /* number to write */
1006 int wrap; /* wrap around at end of line? */
1007 char_info_t data; /* data to write */
1009 int written; /* number of char infos actually written */
1013 /* read data (chars and/or attributes) from a screen buffer */
1014 @REQ(read_console_output)
1015 obj_handle_t handle; /* handle to the console output */
1016 int x; /* position (x,y) where to start reading */
1018 int mode; /* char info mode */
1019 int wrap; /* wrap around at end of line? */
1021 int width; /* width of screen buffer */
1022 int height; /* height of screen buffer */
1027 /* move a rect (of data) in screen buffer content */
1028 @REQ(move_console_output)
1029 obj_handle_t handle; /* handle to the console output */
1030 short int x_src; /* position (x, y) of rect to start moving from */
1032 short int x_dst; /* position (x, y) of rect to move to */
1034 short int w; /* size of the rect (width, height) to move */
1039 /* Sends a signal to a process group */
1040 @REQ(send_console_signal)
1041 int signal; /* the signal to send */
1042 process_id_t group_id; /* the group to send the signal to */
1046 /* Create a change notification */
1047 @REQ(create_change_notification)
1048 obj_handle_t handle; /* handle to the directory */
1049 int subtree; /* watch all the subtree */
1050 unsigned int filter; /* notification filter */
1052 obj_handle_t handle; /* handle to the change notification */
1056 /* Move to the next change notification */
1057 @REQ(next_change_notification)
1058 obj_handle_t handle; /* handle to the change notification */
1061 /* Create a file mapping */
1062 @REQ(create_mapping)
1063 int size_high; /* mapping size */
1064 int size_low; /* mapping size */
1065 int protect; /* protection flags (see below) */
1066 unsigned int access; /* wanted access rights */
1067 int inherit; /* inherit flag */
1068 obj_handle_t file_handle; /* file handle */
1069 VARARG(name,unicode_str); /* object name */
1071 obj_handle_t handle; /* handle to the mapping */
1073 /* protection flags */
1074 #define VPROT_READ 0x01
1075 #define VPROT_WRITE 0x02
1076 #define VPROT_EXEC 0x04
1077 #define VPROT_WRITECOPY 0x08
1078 #define VPROT_GUARD 0x10
1079 #define VPROT_NOCACHE 0x20
1080 #define VPROT_COMMITTED 0x40
1081 #define VPROT_IMAGE 0x80
1084 /* Open a mapping */
1086 unsigned int access; /* wanted access rights */
1087 int inherit; /* inherit flag */
1088 VARARG(name,unicode_str); /* object name */
1090 obj_handle_t handle; /* handle to the mapping */
1094 /* Get information about a file mapping */
1095 @REQ(get_mapping_info)
1096 obj_handle_t handle; /* handle to the mapping */
1098 int size_high; /* mapping size */
1099 int size_low; /* mapping size */
1100 int protect; /* protection flags */
1101 int header_size; /* header size (for VPROT_IMAGE mapping) */
1102 void* base; /* default base addr (for VPROT_IMAGE mapping) */
1103 obj_handle_t shared_file; /* shared mapping file handle */
1104 int shared_size; /* shared mapping size */
1105 int removable; /* is file on removable media? */
1109 /* Create a device */
1111 unsigned int access; /* wanted access rights */
1112 int inherit; /* inherit flag */
1113 int id; /* client private id */
1115 obj_handle_t handle; /* handle to the device */
1119 /* Retrieve the client private id for a device */
1121 obj_handle_t handle; /* handle to the device */
1123 int id; /* client private id */
1127 #define SNAP_HEAPLIST 0x00000001
1128 #define SNAP_PROCESS 0x00000002
1129 #define SNAP_THREAD 0x00000004
1130 #define SNAP_MODULE 0x00000008
1131 /* Create a snapshot */
1132 @REQ(create_snapshot)
1133 int inherit; /* inherit flag */
1134 int flags; /* snapshot flags (SNAP_*) */
1135 process_id_t pid; /* process id */
1137 obj_handle_t handle; /* handle to the snapshot */
1141 /* Get the next process from a snapshot */
1143 obj_handle_t handle; /* handle to the snapshot */
1144 int reset; /* reset snapshot position? */
1146 int count; /* process usage count */
1147 process_id_t pid; /* process id */
1148 process_id_t ppid; /* parent process id */
1149 void* heap; /* heap base */
1150 void* module; /* main module */
1151 int threads; /* number of threads */
1152 int priority; /* process priority */
1153 int handles; /* number of handles */
1154 VARARG(filename,unicode_str); /* file name of main exe */
1158 /* Get the next thread from a snapshot */
1160 obj_handle_t handle; /* handle to the snapshot */
1161 int reset; /* reset snapshot position? */
1163 int count; /* thread usage count */
1164 process_id_t pid; /* process id */
1165 thread_id_t tid; /* thread id */
1166 int base_pri; /* base priority */
1167 int delta_pri; /* delta priority */
1171 /* Get the next module from a snapshot */
1173 obj_handle_t handle; /* handle to the snapshot */
1174 int reset; /* reset snapshot position? */
1176 process_id_t pid; /* process id */
1177 void* base; /* module base address */
1178 size_t size; /* module size */
1179 VARARG(filename,unicode_str); /* file name of module */
1183 /* Wait for a debug event */
1184 @REQ(wait_debug_event)
1185 int get_handle; /* should we alloc a handle for waiting? */
1187 process_id_t pid; /* process id */
1188 thread_id_t tid; /* thread id */
1189 obj_handle_t wait; /* wait handle if no event ready */
1190 VARARG(event,debug_event); /* debug event data */
1194 /* Queue an exception event */
1195 @REQ(queue_exception_event)
1196 int first; /* first chance exception? */
1197 VARARG(record,exc_event); /* thread context followed by exception record */
1199 obj_handle_t handle; /* handle to the queued event */
1203 /* Retrieve the status of an exception event */
1204 @REQ(get_exception_status)
1205 obj_handle_t handle; /* handle to the queued event */
1207 int status; /* event continuation status */
1208 VARARG(context,context); /* modified thread context */
1212 /* Send an output string to the debugger */
1213 @REQ(output_debug_string)
1214 void* string; /* string to display (in debugged process address space) */
1215 int unicode; /* is it Unicode? */
1216 int length; /* string length */
1220 /* Continue a debug event */
1221 @REQ(continue_debug_event)
1222 process_id_t pid; /* process id to continue */
1223 thread_id_t tid; /* thread id to continue */
1224 int status; /* continuation status */
1228 /* Start/stop debugging an existing process */
1230 process_id_t pid; /* id of the process to debug */
1231 int attach; /* 1=attaching / 0=detaching from the process */
1235 /* Simulate a breakpoint in a process */
1237 obj_handle_t handle; /* process handle */
1239 int self; /* was it the caller itself? */
1243 /* Set debugger kill on exit flag */
1244 @REQ(set_debugger_kill_on_exit)
1245 int kill_on_exit; /* 0=detach/1=kill debuggee when debugger dies */
1249 /* Read data from a process address space */
1250 @REQ(read_process_memory)
1251 obj_handle_t handle; /* process handle */
1252 void* addr; /* addr to read from */
1254 VARARG(data,bytes); /* result data */
1258 /* Write data to a process address space */
1259 @REQ(write_process_memory)
1260 obj_handle_t handle; /* process handle */
1261 void* addr; /* addr to write to (must be int-aligned) */
1262 unsigned int first_mask; /* mask for first word */
1263 unsigned int last_mask; /* mask for last word */
1264 VARARG(data,bytes); /* data to write */
1268 /* Create a registry key */
1270 obj_handle_t parent; /* handle to the parent key */
1271 unsigned int access; /* desired access rights */
1272 unsigned int options; /* creation options */
1273 time_t modif; /* last modification time */
1274 size_t namelen; /* length of key name in bytes */
1275 VARARG(name,unicode_str,namelen); /* key name */
1276 VARARG(class,unicode_str); /* class name */
1278 obj_handle_t hkey; /* handle to the created key */
1279 int created; /* has it been newly created? */
1282 /* Open a registry key */
1284 obj_handle_t parent; /* handle to the parent key */
1285 unsigned int access; /* desired access rights */
1286 VARARG(name,unicode_str); /* key name */
1288 obj_handle_t hkey; /* handle to the open key */
1292 /* Delete a registry key */
1294 obj_handle_t hkey; /* handle to the key */
1298 /* Enumerate registry subkeys */
1300 obj_handle_t hkey; /* handle to registry key */
1301 int index; /* index of subkey (or -1 for current key) */
1302 int info_class; /* requested information class */
1304 int subkeys; /* number of subkeys */
1305 int max_subkey; /* longest subkey name */
1306 int max_class; /* longest class name */
1307 int values; /* number of values */
1308 int max_value; /* longest value name */
1309 int max_data; /* longest value data */
1310 time_t modif; /* last modification time */
1311 size_t total; /* total length needed for full name and class */
1312 size_t namelen; /* length of key name in bytes */
1313 VARARG(name,unicode_str,namelen); /* key name */
1314 VARARG(class,unicode_str); /* class name */
1318 /* Set a value of a registry key */
1320 obj_handle_t hkey; /* handle to registry key */
1321 int type; /* value type */
1322 size_t namelen; /* length of value name in bytes */
1323 VARARG(name,unicode_str,namelen); /* value name */
1324 VARARG(data,bytes); /* value data */
1328 /* Retrieve the value of a registry key */
1330 obj_handle_t hkey; /* handle to registry key */
1331 VARARG(name,unicode_str); /* value name */
1333 int type; /* value type */
1334 size_t total; /* total length needed for data */
1335 VARARG(data,bytes); /* value data */
1339 /* Enumerate a value of a registry key */
1340 @REQ(enum_key_value)
1341 obj_handle_t hkey; /* handle to registry key */
1342 int index; /* value index */
1343 int info_class; /* requested information class */
1345 int type; /* value type */
1346 size_t total; /* total length needed for full name and data */
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 /* Delete a value of a registry key */
1354 @REQ(delete_key_value)
1355 obj_handle_t hkey; /* handle to registry key */
1356 VARARG(name,unicode_str); /* value name */
1360 /* Load a registry branch from a file */
1362 obj_handle_t hkey; /* root key to load to */
1363 obj_handle_t file; /* file to load from */
1364 VARARG(name,unicode_str); /* subkey name */
1368 /* UnLoad a registry branch from a file */
1369 @REQ(unload_registry)
1370 obj_handle_t hkey; /* root key to unload to */
1374 /* Save a registry branch to a file */
1376 obj_handle_t hkey; /* key to save */
1377 obj_handle_t file; /* file to save to */
1381 /* Save a registry branch at server exit */
1382 @REQ(save_registry_atexit)
1383 obj_handle_t hkey; /* key to save */
1384 VARARG(file,string); /* file to save to */
1388 /* Set the current and saving level for the registry */
1389 @REQ(set_registry_levels)
1390 int current; /* new current level */
1391 int saving; /* new saving level */
1392 int period; /* duration between periodic saves (milliseconds) */
1396 @REQ(set_registry_notification)
1397 obj_handle_t hkey; /* key to watch for changes */
1398 obj_handle_t event; /* event to set */
1399 int subtree; /* should we watch the whole subtree? */
1400 unsigned int filter; /* things to watch */
1404 /* Create a waitable timer */
1406 int inherit; /* inherit flag */
1407 int manual; /* manual reset */
1408 VARARG(name,unicode_str); /* object name */
1410 obj_handle_t handle; /* handle to the timer */
1414 /* Open a waitable timer */
1416 unsigned int access; /* wanted access rights */
1417 int inherit; /* inherit flag */
1418 VARARG(name,unicode_str); /* object name */
1420 obj_handle_t handle; /* handle to the timer */
1423 /* Set a waitable timer */
1425 obj_handle_t handle; /* handle to the timer */
1426 abs_time_t expire; /* next expiration absolute time */
1427 int period; /* timer period in ms */
1428 void* callback; /* callback function */
1429 void* arg; /* callback argument */
1431 int signaled; /* was the timer signaled before this call ? */
1434 /* Cancel a waitable timer */
1436 obj_handle_t handle; /* handle to the timer */
1438 int signaled; /* was the timer signaled before this calltime ? */
1442 /* Retrieve the current context of a thread */
1443 @REQ(get_thread_context)
1444 obj_handle_t handle; /* thread handle */
1445 unsigned int flags; /* context flags */
1447 VARARG(context,context); /* thread context */
1451 /* Set the current context of a thread */
1452 @REQ(set_thread_context)
1453 obj_handle_t handle; /* thread handle */
1454 unsigned int flags; /* context flags */
1455 VARARG(context,context); /* thread context */
1459 /* Fetch a selector entry for a thread */
1460 @REQ(get_selector_entry)
1461 obj_handle_t handle; /* thread handle */
1462 int entry; /* LDT entry */
1464 unsigned int base; /* selector base */
1465 unsigned int limit; /* selector limit */
1466 unsigned char flags; /* selector flags */
1472 int local; /* is atom in local process table? */
1473 VARARG(name,unicode_str); /* atom name */
1475 atom_t atom; /* resulting atom */
1479 /* Delete an atom */
1481 atom_t atom; /* atom handle */
1482 int local; /* is atom in local process table? */
1488 int local; /* is atom in local process table? */
1489 VARARG(name,unicode_str); /* atom name */
1491 atom_t atom; /* atom handle */
1495 /* Get an atom name */
1497 atom_t atom; /* atom handle */
1498 int local; /* is atom in local process table? */
1500 int count; /* atom lock count */
1501 VARARG(name,unicode_str); /* atom name */
1505 /* Init the process atom table */
1506 @REQ(init_atom_table)
1507 int entries; /* number of entries */
1511 /* Get the message queue of the current thread */
1514 obj_handle_t handle; /* handle to the queue */
1518 /* Set the current message queue wakeup mask */
1519 @REQ(set_queue_mask)
1520 unsigned int wake_mask; /* wakeup bits mask */
1521 unsigned int changed_mask; /* changed bits mask */
1522 int skip_wait; /* will we skip waiting if signaled? */
1524 unsigned int wake_bits; /* current wake bits */
1525 unsigned int changed_bits; /* current changed bits */
1529 /* Get the current message queue status */
1530 @REQ(get_queue_status)
1531 int clear; /* should we clear the change bits? */
1533 unsigned int wake_bits; /* wake bits */
1534 unsigned int changed_bits; /* changed bits since last time */
1538 /* Wait for a process to start waiting on input */
1539 @REQ(wait_input_idle)
1540 obj_handle_t handle; /* process handle */
1541 int timeout; /* timeout */
1543 obj_handle_t event; /* handle to idle event */
1547 /* Send a message to a thread queue */
1549 thread_id_t id; /* thread id */
1550 int type; /* message type (see below) */
1551 int flags; /* message flags (see below) */
1552 user_handle_t win; /* window handle */
1553 unsigned int msg; /* message code */
1554 unsigned int wparam; /* parameters */
1555 unsigned int lparam; /* parameters */
1556 int x; /* x position */
1557 int y; /* y position */
1558 unsigned int time; /* message time */
1559 unsigned int info; /* extra info */
1560 int timeout; /* timeout for reply */
1561 void* callback; /* callback address */
1562 VARARG(data,bytes); /* message data for sent messages */
1567 MSG_ASCII, /* Ascii message (from SendMessageA) */
1568 MSG_UNICODE, /* Unicode message (from SendMessageW) */
1569 MSG_NOTIFY, /* notify message (from SendNotifyMessageW), always Unicode */
1570 MSG_CALLBACK, /* callback message (from SendMessageCallbackW), always Unicode */
1571 MSG_CALLBACK_RESULT,/* result of a callback message */
1572 MSG_OTHER_PROCESS, /* sent from other process, may include vararg data, always Unicode */
1573 MSG_POSTED, /* posted message (from PostMessageW), always Unicode */
1574 MSG_HARDWARE /* hardware message */
1576 #define SEND_MSG_ABORT_IF_HUNG 0x01
1579 /* Get a message from the current queue */
1581 int flags; /* see below */
1582 user_handle_t get_win; /* window handle to get */
1583 unsigned int get_first; /* first message code to get */
1584 unsigned int get_last; /* last message code to get */
1586 int type; /* message type */
1587 user_handle_t win; /* window handle */
1588 unsigned int msg; /* message code */
1589 unsigned int wparam; /* parameters (callback function for MSG_CALLBACK_RESULT) */
1590 unsigned int lparam; /* parameters (result for MSG_CALLBACK_RESULT) */
1591 int x; /* x position */
1592 int y; /* y position */
1593 unsigned int time; /* message time */
1594 unsigned int info; /* extra info (callback argument for MSG_CALLBACK_RESULT) */
1595 size_t total; /* total size of extra data */
1596 VARARG(data,bytes); /* message data for sent messages */
1598 #define GET_MSG_REMOVE 1 /* remove the message */
1599 #define GET_MSG_SENT_ONLY 2 /* only get sent messages */
1601 /* Reply to a sent message */
1603 int type; /* type of original message */
1604 unsigned int result; /* message result */
1605 int remove; /* should we remove the message? */
1606 VARARG(data,bytes); /* message data for sent messages */
1610 /* Retrieve the reply for the last message sent */
1611 @REQ(get_message_reply)
1612 int cancel; /* cancel message if not ready? */
1614 unsigned int result; /* message result */
1615 VARARG(data,bytes); /* message data for sent messages */
1619 /* Set a window timer */
1621 user_handle_t win; /* window handle */
1622 unsigned int msg; /* message to post */
1623 unsigned int id; /* timer id */
1624 unsigned int rate; /* timer rate in ms */
1625 unsigned int lparam; /* message lparam (callback proc) */
1629 /* Kill a window timer */
1630 @REQ(kill_win_timer)
1631 user_handle_t win; /* window handle */
1632 unsigned int msg; /* message to post */
1633 unsigned int id; /* timer id */
1637 /* Open a serial port */
1639 unsigned int access; /* wanted access rights */
1640 int inherit; /* inherit flag */
1641 unsigned int attributes; /* eg. FILE_FLAG_OVERLAPPED */
1642 unsigned int sharing; /* sharing flags */
1643 VARARG(name,string); /* file name */
1645 obj_handle_t handle; /* handle to the port */
1649 /* Retrieve info about a serial port */
1650 @REQ(get_serial_info)
1651 obj_handle_t handle; /* handle to comm port */
1653 unsigned int readinterval;
1654 unsigned int readconst;
1655 unsigned int readmult;
1656 unsigned int writeconst;
1657 unsigned int writemult;
1658 unsigned int eventmask;
1659 unsigned int commerror;
1663 /* Set info about a serial port */
1664 @REQ(set_serial_info)
1665 obj_handle_t handle; /* handle to comm port */
1666 int flags; /* bitmask to set values (see below) */
1667 unsigned int readinterval;
1668 unsigned int readconst;
1669 unsigned int readmult;
1670 unsigned int writeconst;
1671 unsigned int writemult;
1672 unsigned int eventmask;
1673 unsigned int commerror;
1675 #define SERIALINFO_SET_TIMEOUTS 0x01
1676 #define SERIALINFO_SET_MASK 0x02
1677 #define SERIALINFO_SET_ERROR 0x04
1680 /* Create / reschedule an async I/O */
1681 @REQ(register_async)
1682 obj_handle_t handle; /* handle to comm port, socket or file */
1686 unsigned int status;
1688 #define ASYNC_TYPE_NONE 0x00
1689 #define ASYNC_TYPE_READ 0x01
1690 #define ASYNC_TYPE_WRITE 0x02
1691 #define ASYNC_TYPE_WAIT 0x03
1694 /* Create a named pipe */
1695 @REQ(create_named_pipe)
1696 unsigned int openmode;
1697 unsigned int pipemode;
1698 unsigned int maxinstances;
1699 unsigned int outsize;
1700 unsigned int insize;
1701 unsigned int timeout;
1702 VARARG(name,unicode_str); /* pipe name */
1704 obj_handle_t handle; /* handle to the pipe */
1708 /* Open an existing named pipe */
1709 @REQ(open_named_pipe)
1710 unsigned int access;
1711 int inherit; /* inherit flag */
1712 VARARG(name,unicode_str); /* pipe name */
1714 obj_handle_t handle; /* handle to the pipe */
1718 /* Connect to a named pipe */
1719 @REQ(connect_named_pipe)
1720 obj_handle_t handle;
1726 /* Wait for a named pipe */
1727 @REQ(wait_named_pipe)
1728 unsigned int timeout;
1731 VARARG(name,unicode_str); /* pipe name */
1735 /* Disconnect a named pipe */
1736 @REQ(disconnect_named_pipe)
1737 obj_handle_t handle;
1739 int fd; /* associated fd to close */
1743 @REQ(get_named_pipe_info)
1744 obj_handle_t handle;
1747 unsigned int maxinstances;
1748 unsigned int outsize;
1749 unsigned int insize;
1755 unsigned int tree_id;
1756 unsigned int user_id;
1757 unsigned int file_id;
1758 unsigned int dialect;
1760 obj_handle_t handle;
1765 obj_handle_t handle;
1767 unsigned int offset;
1769 unsigned int tree_id;
1770 unsigned int user_id;
1771 unsigned int dialect;
1772 unsigned int file_id;
1773 unsigned int offset;
1775 #define SMBINFO_SET_OFFSET 0x01
1778 /* Create a window */
1780 user_handle_t parent; /* parent window */
1781 user_handle_t owner; /* owner window */
1782 atom_t atom; /* class atom */
1784 user_handle_t handle; /* created window */
1788 /* Link a window into the tree */
1790 user_handle_t handle; /* handle to the window */
1791 user_handle_t parent; /* handle to the parent */
1792 user_handle_t previous; /* previous child in Z-order */
1794 user_handle_t full_parent; /* full handle of new parent */
1798 /* Destroy a window */
1799 @REQ(destroy_window)
1800 user_handle_t handle; /* handle to the window */
1804 /* Set a window owner */
1805 @REQ(set_window_owner)
1806 user_handle_t handle; /* handle to the window */
1807 user_handle_t owner; /* new owner */
1809 user_handle_t full_owner; /* full handle of new owner */
1810 user_handle_t prev_owner; /* full handle of previous owner */
1814 /* Get information from a window handle */
1815 @REQ(get_window_info)
1816 user_handle_t handle; /* handle to the window */
1818 user_handle_t full_handle; /* full 32-bit handle */
1819 user_handle_t last_active; /* last active popup */
1820 process_id_t pid; /* process owning the window */
1821 thread_id_t tid; /* thread owning the window */
1822 atom_t atom; /* class atom */
1826 /* Set some information in a window */
1827 @REQ(set_window_info)
1828 user_handle_t handle; /* handle to the window */
1829 unsigned int flags; /* flags for fields to set (see below) */
1830 unsigned int style; /* window style */
1831 unsigned int ex_style; /* window extended style */
1832 unsigned int id; /* window id */
1833 void* instance; /* creator instance */
1834 void* user_data; /* user-specific data */
1836 unsigned int old_style; /* old window style */
1837 unsigned int old_ex_style; /* old window extended style */
1838 unsigned int old_id; /* old window id */
1839 void* old_instance; /* old creator instance */
1840 void* old_user_data; /* old user-specific data */
1842 #define SET_WIN_STYLE 0x01
1843 #define SET_WIN_EXSTYLE 0x02
1844 #define SET_WIN_ID 0x04
1845 #define SET_WIN_INSTANCE 0x08
1846 #define SET_WIN_USERDATA 0x10
1849 /* Get a list of the window parents, up to the root of the tree */
1850 @REQ(get_window_parents)
1851 user_handle_t handle; /* handle to the window */
1853 int count; /* total count of parents */
1854 VARARG(parents,user_handles); /* parent handles */
1858 /* Get a list of the window children */
1859 @REQ(get_window_children)
1860 user_handle_t parent; /* parent window */
1861 atom_t atom; /* class atom for the listed children */
1862 thread_id_t tid; /* thread owning the listed children */
1864 int count; /* total count of children */
1865 VARARG(children,user_handles); /* children handles */
1869 /* Get window tree information from a window handle */
1870 @REQ(get_window_tree)
1871 user_handle_t handle; /* handle to the window */
1873 user_handle_t parent; /* parent window */
1874 user_handle_t owner; /* owner window */
1875 user_handle_t next_sibling; /* next sibling in Z-order */
1876 user_handle_t prev_sibling; /* prev sibling in Z-order */
1877 user_handle_t first_sibling; /* first sibling in Z-order */
1878 user_handle_t last_sibling; /* last sibling in Z-order */
1879 user_handle_t first_child; /* first child */
1880 user_handle_t last_child; /* last child */
1883 /* Set the window and client rectangles of a window */
1884 @REQ(set_window_rectangles)
1885 user_handle_t handle; /* handle to the window */
1886 rectangle_t window; /* window rectangle */
1887 rectangle_t client; /* client rectangle */
1891 /* Get the window and client rectangles of a window */
1892 @REQ(get_window_rectangles)
1893 user_handle_t handle; /* handle to the window */
1895 rectangle_t window; /* window rectangle */
1896 rectangle_t client; /* client rectangle */
1900 /* Get the window text */
1901 @REQ(get_window_text)
1902 user_handle_t handle; /* handle to the window */
1904 VARARG(text,unicode_str); /* window text */
1908 /* Set the window text */
1909 @REQ(set_window_text)
1910 user_handle_t handle; /* handle to the window */
1911 VARARG(text,unicode_str); /* window text */
1915 /* Increment the window paint count */
1916 @REQ(inc_window_paint_count)
1917 user_handle_t handle; /* handle to the window */
1918 int incr; /* increment (can be negative) */
1922 /* Get the coordinates offset between two windows */
1923 @REQ(get_windows_offset)
1924 user_handle_t from; /* handle to the first window */
1925 user_handle_t to; /* handle to the second window */
1927 int x; /* x coordinate offset */
1928 int y; /* y coordinate offset */
1932 /* Set a window property */
1933 @REQ(set_window_property)
1934 user_handle_t window; /* handle to the window */
1935 atom_t atom; /* property atom (high-word set if it was a string) */
1936 int string; /* was atom a string originally? */
1937 obj_handle_t handle; /* handle to store */
1941 /* Remove a window property */
1942 @REQ(remove_window_property)
1943 user_handle_t window; /* handle to the window */
1944 atom_t atom; /* property atom */
1946 obj_handle_t handle; /* handle stored in property */
1950 /* Get a window property */
1951 @REQ(get_window_property)
1952 user_handle_t window; /* handle to the window */
1953 atom_t atom; /* property atom */
1955 obj_handle_t handle; /* handle stored in property */
1959 /* Get the list of properties of a window */
1960 @REQ(get_window_properties)
1961 user_handle_t window; /* handle to the window */
1963 int total; /* total number of properties */
1964 VARARG(props,properties); /* list of properties */
1968 /* Attach (or detach) thread inputs */
1969 @REQ(attach_thread_input)
1970 thread_id_t tid_from; /* thread to be attached */
1971 thread_id_t tid_to; /* thread to which tid_from should be attached */
1972 int attach; /* is it an attach? */
1976 /* Get input data for a given thread */
1977 @REQ(get_thread_input)
1978 thread_id_t tid; /* id of thread */
1980 user_handle_t focus; /* handle to the focus window */
1981 user_handle_t capture; /* handle to the capture window */
1982 user_handle_t active; /* handle to the active window */
1983 user_handle_t foreground; /* handle to the global foreground window */
1984 user_handle_t menu_owner; /* handle to the menu owner */
1985 user_handle_t move_size; /* handle to the moving/resizing window */
1986 user_handle_t caret; /* handle to the caret window */
1987 rectangle_t rect; /* caret rectangle */
1990 /* Retrieve queue keyboard state for a given thread */
1992 thread_id_t tid; /* id of thread */
1993 int key; /* optional key code or -1 */
1995 unsigned char state; /* state of specified key */
1996 VARARG(keystate,bytes); /* state array for all the keys */
1999 /* Set queue keyboard state for a given thread */
2001 thread_id_t tid; /* id of thread */
2002 VARARG(keystate,bytes); /* state array for all the keys */
2005 /* Set the system foreground window */
2006 @REQ(set_foreground_window)
2007 user_handle_t handle; /* handle to the foreground window */
2009 user_handle_t previous; /* handle to the previous foreground window */
2010 int send_msg_old; /* whether we have to send a msg to the old window */
2011 int send_msg_new; /* whether we have to send a msg to the new window */
2014 /* Set the current thread focus window */
2015 @REQ(set_focus_window)
2016 user_handle_t handle; /* handle to the focus window */
2018 user_handle_t previous; /* handle to the previous focus window */
2021 /* Set the current thread active window */
2022 @REQ(set_active_window)
2023 user_handle_t handle; /* handle to the active window */
2025 user_handle_t previous; /* handle to the previous active window */
2028 /* Set the current thread capture window */
2029 @REQ(set_capture_window)
2030 user_handle_t handle; /* handle to the capture window */
2031 unsigned int flags; /* capture flags (see below) */
2033 user_handle_t previous; /* handle to the previous capture window */
2034 user_handle_t full_handle; /* full 32-bit handle of new capture window */
2036 #define CAPTURE_MENU 0x01 /* capture is for a menu */
2037 #define CAPTURE_MOVESIZE 0x02 /* capture is for moving/resizing */
2040 /* Set the current thread caret window */
2041 @REQ(set_caret_window)
2042 user_handle_t handle; /* handle to the caret window */
2043 int width; /* caret width */
2044 int height; /* caret height */
2046 user_handle_t previous; /* handle to the previous caret window */
2047 rectangle_t old_rect; /* previous caret rectangle */
2048 int old_hide; /* previous hide count */
2049 int old_state; /* previous caret state (1=on, 0=off) */
2053 /* Set the current thread caret information */
2054 @REQ(set_caret_info)
2055 unsigned int flags; /* caret flags (see below) */
2056 user_handle_t handle; /* handle to the caret window */
2057 int x; /* caret x position */
2058 int y; /* caret y position */
2059 int hide; /* increment for hide count (can be negative to show it) */
2060 int state; /* caret state (1=on, 0=off, -1=toggle current state) */
2062 user_handle_t full_handle; /* handle to the current caret window */
2063 rectangle_t old_rect; /* previous caret rectangle */
2064 int old_hide; /* previous hide count */
2065 int old_state; /* previous caret state (1=on, 0=off) */
2067 #define SET_CARET_POS 0x01 /* set the caret position from x,y */
2068 #define SET_CARET_HIDE 0x02 /* increment the caret hide count */
2069 #define SET_CARET_STATE 0x04 /* set the caret on/off state */
2072 /* Set a window hook */
2074 int id; /* id of the hook */
2075 thread_id_t tid; /* id of thread to set the hook into */
2076 void* proc; /* hook procedure */
2077 int unicode; /* is it a unicode hook? */
2078 VARARG(module,unicode_str); /* module name */
2080 user_handle_t handle; /* handle to the hook */
2084 /* Remove a window hook */
2086 user_handle_t handle; /* handle to the hook */
2087 int id; /* id of the hook if handle is 0 */
2088 void* proc; /* hook procedure if handle is 0 */
2092 /* Start calling a hook chain */
2093 @REQ(start_hook_chain)
2094 int id; /* id of the hook */
2096 user_handle_t handle; /* handle to the next hook */
2097 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2098 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2099 void* proc; /* hook procedure */
2100 int unicode; /* is it a unicode hook? */
2101 VARARG(module,unicode_str); /* module name */
2105 /* Finished calling a hook chain */
2106 @REQ(finish_hook_chain)
2107 int id; /* id of the hook */
2111 /* Get the next hook to call */
2113 user_handle_t handle; /* handle to the current hook */
2115 user_handle_t next; /* handle to the next hook */
2116 int id; /* id of the next hook */
2117 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2118 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2119 void* proc; /* next hook procedure */
2120 int prev_unicode; /* was the previous a unicode hook? */
2121 int next_unicode; /* is the next a unicode hook? */
2122 VARARG(module,unicode_str); /* module name */
2126 /* Set/get clipboard information */
2127 @REQ(set_clipboard_info)
2128 unsigned int flags; /* flags for fields to set (see below) */
2129 user_handle_t clipboard; /* clipboard window */
2130 user_handle_t owner; /* clipboard owner */
2131 user_handle_t viewer; /* first clipboard viewer */
2132 unsigned int seqno; /* change sequence number */
2134 unsigned int flags; /* status flags (see below) */
2135 user_handle_t old_clipboard; /* old clipboard window */
2136 user_handle_t old_owner; /* old clipboard owner */
2137 user_handle_t old_viewer; /* old clipboard viewer */
2138 unsigned int seqno; /* current sequence number */
2141 #define SET_CB_OPEN 0x001
2142 #define SET_CB_OWNER 0x002
2143 #define SET_CB_VIEWER 0x004
2144 #define SET_CB_SEQNO 0x008
2145 #define SET_CB_RELOWNER 0x010
2146 #define SET_CB_CLOSE 0x020
2147 #define CB_OPEN 0x040
2148 #define CB_OWNER 0x080
2151 /* Open a security token */
2153 obj_handle_t handle; /* handle to the thread or process */
2154 unsigned int flags; /* flags (see below) */
2156 obj_handle_t token; /* handle to the token */
2158 #define OPEN_TOKEN_THREAD 1
2159 #define OPEN_TOKEN_AS_SELF 2
2162 /* Set/get the global windows */
2163 @REQ(set_global_windows)
2164 unsigned int flags; /* flags for fields to set (see below) */
2165 user_handle_t shell_window; /* handle to the new shell window */
2166 user_handle_t shell_listview; /* handle to the new shell listview window */
2167 user_handle_t progman_window; /* handle to the new program manager window */
2168 user_handle_t taskman_window; /* handle to the new task manager window */
2170 user_handle_t old_shell_window; /* handle to the shell window */
2171 user_handle_t old_shell_listview; /* handle to the shell listview window */
2172 user_handle_t old_progman_window; /* handle to the new program manager window */
2173 user_handle_t old_taskman_window; /* handle to the new task manager window */
2175 #define SET_GLOBAL_SHELL_WINDOWS 0x01 /* set both main shell and listview windows */
2176 #define SET_GLOBAL_PROGMAN_WINDOW 0x02
2177 #define SET_GLOBAL_TASKMAN_WINDOW 0x04