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
*/
194 VARARG(env
,unicode_str
); /* environment for new process
*/
196 obj_handle_t info
; /* new process info handle
*/
200 /* Retrieve information about a newly started process
*/
201 @
REQ(get_new_process_info
)
202 obj_handle_t info
; /* info handle returned from new_process_request
*/
203 int pinherit
; /* process handle inherit flag
*/
204 int tinherit
; /* thread handle inherit flag
*/
206 process_id_t pid
; /* process id
*/
207 obj_handle_t phandle
; /* process
handle (in the current process
) */
208 thread_id_t tid
; /* thread id
*/
209 obj_handle_t thandle
; /* thread
handle (in the current process
) */
210 int success
; /* did the process start successfully?
*/
214 /* Create a new thread from the context of the parent
*/
216 int suspend
; /* new thread should be suspended on creation
*/
217 int inherit
; /* inherit flag
*/
218 int request_fd
; /* fd for request pipe
*/
220 thread_id_t tid
; /* thread id
*/
221 obj_handle_t handle
; /* thread
handle (in the current process
) */
225 /* Signal that we are finished booting on the client side
*/
227 int debug_level
; /* new debug level
*/
231 /* Initialize a process
; called from the new process context
*/
233 void
* peb
; /* addr of PEB
*/
234 void
* ldt_copy
; /* addr of LDT copy
*/
236 int create_flags
; /* creation flags
*/
237 unsigned int server_start
; /* server start
time (GetTickCount
) */
238 size_t info_size
; /* total size of startup info
*/
239 obj_handle_t exe_file
; /* file handle for main exe
*/
240 obj_handle_t hstdin
; /* handle for stdin
*/
241 obj_handle_t hstdout
; /* handle for stdout
*/
242 obj_handle_t hstderr
; /* handle for stderr
*/
246 /* Retrieve the new process startup info
*/
247 @
REQ(get_startup_info
)
249 VARARG(info
,startup_info
); /* startup information
*/
250 VARARG(env
,unicode_str
); /* environment
*/
254 /* Signal the end of the process initialization
*/
255 @
REQ(init_process_done
)
256 void
* module
; /* main module base address
*/
257 size_t module_size
; /* main module size
*/
258 void
* entry
; /* process entry point
*/
259 void
* name
; /* ptr to ptr to
name (in process addr space
) */
260 obj_handle_t exe_file
; /* file handle for main exe
*/
261 int gui
; /* is it a GUI process?
*/
262 VARARG(filename
,unicode_str
); /* file name of main exe
*/
266 /* Initialize a thread
; called from the child after
fork()/clone() */
268 int unix_pid
; /* Unix pid of new thread
*/
269 int unix_tid
; /* Unix tid of new thread
*/
270 void
* teb
; /* TEB of new
thread (in thread address space
) */
271 void
* entry
; /* thread entry
point (in thread address space
) */
272 int reply_fd
; /* fd for reply pipe
*/
273 int wait_fd
; /* fd for blocking calls pipe
*/
275 process_id_t pid
; /* process id of the new thread
's process */
276 thread_id_t tid; /* thread id of the new thread */
277 int boot; /* is this the boot thread? */
278 int version; /* protocol version */
282 /* Terminate a process */
283 @REQ(terminate_process)
284 obj_handle_t handle; /* process handle to terminate */
285 int exit_code; /* process exit code */
287 int self; /* suicide? */
291 /* Terminate a thread */
292 @REQ(terminate_thread)
293 obj_handle_t handle; /* thread handle to terminate */
294 int exit_code; /* thread exit code */
296 int self; /* suicide? */
297 int last; /* last thread in this process? */
301 /* Retrieve information about a process */
302 @REQ(get_process_info)
303 obj_handle_t handle; /* process handle */
305 process_id_t pid; /* server process id */
306 process_id_t ppid; /* server process id of parent */
307 int exit_code; /* process exit code */
308 int priority; /* priority class */
309 int process_affinity; /* process affinity mask */
310 int system_affinity; /* system affinity mask */
311 void* peb; /* PEB address in process address space */
315 /* Set a process informations */
316 @REQ(set_process_info)
317 obj_handle_t handle; /* process handle */
318 int mask; /* setting mask (see below) */
319 int priority; /* priority class */
320 int affinity; /* affinity mask */
322 #define SET_PROCESS_INFO_PRIORITY 0x01
323 #define SET_PROCESS_INFO_AFFINITY 0x02
326 /* Retrieve information about a thread */
327 @REQ(get_thread_info)
328 obj_handle_t handle; /* thread handle */
329 thread_id_t tid_in; /* thread id (optional) */
331 process_id_t pid; /* server process id */
332 thread_id_t tid; /* server thread id */
333 void* teb; /* thread teb pointer */
334 int exit_code; /* thread exit code */
335 int priority; /* thread priority level */
336 int affinity; /* thread affinity mask */
337 time_t creation_time; /* thread creation time */
338 time_t exit_time; /* thread exit time */
342 /* Set a thread informations */
343 @REQ(set_thread_info)
344 obj_handle_t handle; /* thread handle */
345 int mask; /* setting mask (see below) */
346 int priority; /* priority class */
347 int affinity; /* affinity mask */
349 #define SET_THREAD_INFO_PRIORITY 0x01
350 #define SET_THREAD_INFO_AFFINITY 0x02
353 /* Retrieve information about a module */
355 obj_handle_t handle; /* process handle */
356 void* base_address; /* base address of module */
358 size_t size; /* module size */
360 VARARG(filename,unicode_str); /* file name of module */
364 /* Suspend a thread */
366 obj_handle_t handle; /* thread handle */
368 int count; /* new suspend count */
372 /* Resume a thread */
374 obj_handle_t handle; /* thread handle */
376 int count; /* new suspend count */
380 /* Notify the server that a dll has been loaded */
382 obj_handle_t handle; /* file handle */
383 void* base; /* base address */
384 size_t size; /* dll size */
385 int dbg_offset; /* debug info offset */
386 int dbg_size; /* debug info size */
387 void* name; /* ptr to ptr to name (in process addr space) */
388 VARARG(filename,unicode_str); /* file name of dll */
392 /* Notify the server that a dll is being unloaded */
394 void* base; /* base address */
398 /* Queue an APC for a thread */
400 obj_handle_t handle; /* thread handle */
401 int user; /* user or system apc? */
402 void* func; /* function to call */
403 void* arg1; /* params for function to call */
409 /* Get next APC to call */
411 int alertable; /* is thread alertable? */
413 void* func; /* function to call */
414 int type; /* function type */
415 void* arg1; /* function arguments */
419 enum apc_type { APC_NONE, APC_USER, APC_TIMER, APC_ASYNC, APC_ASYNC_IO };
422 /* Close a handle for the current process */
424 obj_handle_t handle; /* handle to close */
426 int fd; /* associated fd to close */
430 /* Set a handle information */
431 @REQ(set_handle_info)
432 obj_handle_t handle; /* handle we are interested in */
433 int flags; /* new handle flags */
434 int mask; /* mask for flags to set */
435 int fd; /* file descriptor or -1 */
437 int old_flags; /* old flag value */
438 int cur_fd; /* current file descriptor */
442 /* Duplicate a handle */
444 obj_handle_t src_process; /* src process handle */
445 obj_handle_t src_handle; /* src handle to duplicate */
446 obj_handle_t dst_process; /* dst process handle */
447 unsigned int access; /* wanted access rights */
448 int inherit; /* inherit flag */
449 int options; /* duplicate options (see below) */
451 obj_handle_t handle; /* duplicated handle in dst process */
452 int fd; /* associated fd to close */
454 #define DUP_HANDLE_CLOSE_SOURCE DUPLICATE_CLOSE_SOURCE
455 #define DUP_HANDLE_SAME_ACCESS DUPLICATE_SAME_ACCESS
456 #define DUP_HANDLE_MAKE_GLOBAL 0x80000000 /* Not a Windows flag */
459 /* Open a handle to a process */
461 process_id_t pid; /* process id to open */
462 unsigned int access; /* wanted access rights */
463 int inherit; /* inherit flag */
465 obj_handle_t handle; /* handle to the process */
469 /* Open a handle to a thread */
471 thread_id_t tid; /* thread id to open */
472 unsigned int access; /* wanted access rights */
473 int inherit; /* inherit flag */
475 obj_handle_t handle; /* handle to the thread */
479 /* Wait for handles */
481 int flags; /* wait flags (see below) */
482 void* cookie; /* magic cookie to return to client */
483 abs_time_t timeout; /* absolute timeout */
484 VARARG(handles,handles); /* handles to select on */
487 #define SELECT_ALERTABLE 2
488 #define SELECT_INTERRUPTIBLE 4
489 #define SELECT_TIMEOUT 8
492 /* Create an event */
494 int manual_reset; /* manual reset event */
495 int initial_state; /* initial state of the event */
496 int inherit; /* inherit flag */
497 VARARG(name,unicode_str); /* object name */
499 obj_handle_t handle; /* handle to the event */
502 /* Event operation */
504 obj_handle_t handle; /* handle to event */
505 int op; /* event operation (see below) */
507 enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT };
512 unsigned int access; /* wanted access rights */
513 int inherit; /* inherit flag */
514 VARARG(name,unicode_str); /* object name */
516 obj_handle_t handle; /* handle to the event */
522 int owned; /* initially owned? */
523 int inherit; /* inherit flag */
524 VARARG(name,unicode_str); /* object name */
526 obj_handle_t handle; /* handle to the mutex */
530 /* Release a mutex */
532 obj_handle_t handle; /* handle to the mutex */
538 unsigned int access; /* wanted access rights */
539 int inherit; /* inherit flag */
540 VARARG(name,unicode_str); /* object name */
542 obj_handle_t handle; /* handle to the mutex */
546 /* Create a semaphore */
547 @REQ(create_semaphore)
548 unsigned int initial; /* initial count */
549 unsigned int max; /* maximum count */
550 int inherit; /* inherit flag */
551 VARARG(name,unicode_str); /* object name */
553 obj_handle_t handle; /* handle to the semaphore */
557 /* Release a semaphore */
558 @REQ(release_semaphore)
559 obj_handle_t handle; /* handle to the semaphore */
560 unsigned int count; /* count to add to semaphore */
562 unsigned int prev_count; /* previous semaphore count */
566 /* Open a semaphore */
568 unsigned int access; /* wanted access rights */
569 int inherit; /* inherit flag */
570 VARARG(name,unicode_str); /* object name */
572 obj_handle_t handle; /* handle to the semaphore */
578 unsigned int access; /* wanted access rights */
579 int inherit; /* inherit flag */
580 unsigned int sharing; /* sharing flags */
581 int create; /* file create action */
582 unsigned int options; /* file options */
583 unsigned int attrs; /* file attributes for creation */
584 VARARG(filename,string); /* file name */
586 obj_handle_t handle; /* handle to the file */
590 /* Allocate a file handle for a Unix fd */
591 @REQ(alloc_file_handle)
592 unsigned int access; /* wanted access rights */
593 int inherit; /* inherit flag */
594 int fd; /* file descriptor on the client side */
596 obj_handle_t handle; /* handle to the file */
600 /* Get a Unix fd to access a file */
602 obj_handle_t handle; /* handle to the file */
603 unsigned int access; /* wanted access rights */
605 int fd; /* file descriptor */
606 int type; /* the type of file (see below) */
607 int flags; /* file read/write flags (see below) */
615 #define FD_FLAG_OVERLAPPED 0x01
616 #define FD_FLAG_TIMEOUT 0x02
617 #define FD_FLAG_RECV_SHUTDOWN 0x04
618 #define FD_FLAG_SEND_SHUTDOWN 0x08
621 /* Flush a file buffers */
623 obj_handle_t handle; /* handle to the file */
625 obj_handle_t event; /* event set when finished */
629 /* Lock a region of a file */
631 obj_handle_t handle; /* handle to the file */
632 unsigned int offset_low; /* offset of start of lock */
633 unsigned int offset_high; /* offset of start of lock */
634 unsigned int count_low; /* count of bytes to lock */
635 unsigned int count_high; /* count of bytes to lock */
636 int shared; /* shared or exclusive lock? */
637 int wait; /* do we want to wait? */
639 obj_handle_t handle; /* handle to wait on */
640 int overlapped; /* is it an overlapped I/O handle? */
644 /* Unlock a region of a file */
646 obj_handle_t handle; /* handle to the file */
647 unsigned int offset_low; /* offset of start of unlock */
648 unsigned int offset_high; /* offset of start of unlock */
649 unsigned int count_low; /* count of bytes to unlock */
650 unsigned int count_high; /* count of bytes to unlock */
654 /* Create a socket */
656 unsigned int access; /* wanted access rights */
657 int inherit; /* inherit flag */
658 int family; /* family, see socket manpage */
659 int type; /* type, see socket manpage */
660 int protocol; /* protocol, see socket manpage */
661 unsigned int flags; /* socket flags */
663 obj_handle_t handle; /* handle to the new socket */
667 /* Accept a socket */
669 obj_handle_t lhandle; /* handle to the listening socket */
670 unsigned int access; /* wanted access rights */
671 int inherit; /* inherit flag */
673 obj_handle_t handle; /* handle to the new socket */
677 /* Set socket event parameters */
678 @REQ(set_socket_event)
679 obj_handle_t handle; /* handle to the socket */
680 unsigned int mask; /* event mask */
681 obj_handle_t event; /* event object */
682 user_handle_t window; /* window to send the message to */
683 unsigned int msg; /* message to send */
687 /* Get socket event parameters */
688 @REQ(get_socket_event)
689 obj_handle_t handle; /* handle to the socket */
690 int service; /* clear pending? */
691 obj_handle_t c_event; /* event to clear */
693 unsigned int mask; /* event mask */
694 unsigned int pmask; /* pending events */
695 unsigned int state; /* status bits */
696 VARARG(errors,ints); /* event errors */
700 /* Reenable pending socket events */
701 @REQ(enable_socket_event)
702 obj_handle_t handle; /* handle to the socket */
703 unsigned int mask; /* events to re-enable */
704 unsigned int sstate; /* status bits to set */
705 unsigned int cstate; /* status bits to clear */
708 @REQ(set_socket_deferred)
709 obj_handle_t handle; /* handle to the socket */
710 obj_handle_t deferred; /* handle to the socket for which accept() is deferred */
713 /* Allocate a console (only used by a console renderer) */
715 unsigned int access; /* wanted access rights */
716 int inherit; /* inherit flag */
717 process_id_t pid; /* pid of process which shall be attached to the console */
719 obj_handle_t handle_in; /* handle to console input */
720 obj_handle_t event; /* handle to renderer events change notification */
724 /* Free the console of the current process */
729 #define CONSOLE_RENDERER_NONE_EVENT 0x00
730 #define CONSOLE_RENDERER_TITLE_EVENT 0x01
731 #define CONSOLE_RENDERER_ACTIVE_SB_EVENT 0x02
732 #define CONSOLE_RENDERER_SB_RESIZE_EVENT 0x03
733 #define CONSOLE_RENDERER_UPDATE_EVENT 0x04
734 #define CONSOLE_RENDERER_CURSOR_POS_EVENT 0x05
735 #define CONSOLE_RENDERER_CURSOR_GEOM_EVENT 0x06
736 #define CONSOLE_RENDERER_DISPLAY_EVENT 0x07
737 #define CONSOLE_RENDERER_EXIT_EVENT 0x08
738 struct console_renderer_event
773 /* retrieve console events for the renderer */
774 @REQ(get_console_renderer_events)
775 obj_handle_t handle; /* handle to console input events */
777 VARARG(data,bytes); /* the various console_renderer_events */
781 /* Open a handle to the process console */
783 int from; /* 0 (resp 1) input (resp output) of current process console */
784 /* otherwise console_in handle to get active screen buffer? */
785 unsigned int access; /* wanted access rights */
786 int inherit; /* inherit flag */
787 int share; /* share mask (only for output handles) */
789 obj_handle_t handle; /* handle to the console */
793 /* Get the input queue wait event */
794 @REQ(get_console_wait_event)
799 /* Get a console mode (input or output) */
800 @REQ(get_console_mode)
801 obj_handle_t handle; /* handle to the console */
803 int mode; /* console mode */
807 /* Set a console mode (input or output) */
808 @REQ(set_console_mode)
809 obj_handle_t handle; /* handle to the console */
810 int mode; /* console mode */
814 /* Set info about a console (input only) */
815 @REQ(set_console_input_info)
816 obj_handle_t handle; /* handle to console input, or 0 for process' console
*/
817 int mask
; /* setting
mask (see below
) */
818 obj_handle_t active_sb
; /* active screen buffer
*/
819 int history_mode
; /* whether we duplicate lines in history
*/
820 int history_size
; /* number of lines in history
*/
821 int edition_mode
; /* index to the edition mode flavors
*/
822 VARARG(title
,unicode_str
); /* console title
*/
824 #define SET_CONSOLE_INPUT_INFO_ACTIVE_SB
0x01
825 #define SET_CONSOLE_INPUT_INFO_TITLE
0x02
826 #define SET_CONSOLE_INPUT_INFO_HISTORY_MODE
0x04
827 #define SET_CONSOLE_INPUT_INFO_HISTORY_SIZE
0x08
828 #define SET_CONSOLE_INPUT_INFO_EDITION_MODE
0x10
831 /* Get info about a
console (input only
) */
832 @
REQ(get_console_input_info
)
833 obj_handle_t handle
; /* handle to console input
, or
0 for process
' console */
835 int history_mode; /* whether we duplicate lines in history */
836 int history_size; /* number of lines in history */
837 int history_index; /* number of used lines in history */
838 int edition_mode; /* index to the edition mode flavors */
839 VARARG(title,unicode_str); /* console title */
843 /* appends a string to console's history
*/
844 @
REQ(append_console_input_history
)
845 obj_handle_t handle
; /* handle to console input
, or
0 for process
' console */
846 VARARG(line,unicode_str); /* line to add */
850 /* appends a string to console's history
*/
851 @
REQ(get_console_input_history
)
852 obj_handle_t handle
; /* handle to console input
, or
0 for process
' console */
853 int index; /* index to get line from */
855 int total; /* total length of line in Unicode chars */
856 VARARG(line,unicode_str); /* line to add */
860 /* creates a new screen buffer on process' console
*/
861 @
REQ(create_console_output
)
862 obj_handle_t handle_in
; /* handle to console input
, or
0 for process
' console */
863 int access; /* wanted access rights */
864 int share; /* sharing credentials */
865 int inherit; /* inherit flag */
867 obj_handle_t handle_out; /* handle to the screen buffer */
871 /* Set info about a console (output only) */
872 @REQ(set_console_output_info)
873 obj_handle_t handle; /* handle to the console */
874 int mask; /* setting mask (see below) */
875 short int cursor_size; /* size of cursor (percentage filled) */
876 short int cursor_visible;/* cursor visibility flag */
877 short int cursor_x; /* position of cursor (x, y) */
879 short int width; /* width of the screen buffer */
880 short int height; /* height of the screen buffer */
881 short int attr; /* default attribute */
882 short int win_left; /* window actually displayed by renderer */
883 short int win_top; /* the rect area is expressed withing the */
884 short int win_right; /* boundaries of the screen buffer */
885 short int win_bottom;
886 short int max_width; /* maximum size (width x height) for the window */
887 short int max_height;
889 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_GEOM 0x01
890 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_POS 0x02
891 #define SET_CONSOLE_OUTPUT_INFO_SIZE 0x04
892 #define SET_CONSOLE_OUTPUT_INFO_ATTR 0x08
893 #define SET_CONSOLE_OUTPUT_INFO_DISPLAY_WINDOW 0x10
894 #define SET_CONSOLE_OUTPUT_INFO_MAX_SIZE 0x20
897 /* Get info about a console (output only) */
898 @REQ(get_console_output_info)
899 obj_handle_t handle; /* handle to the console */
901 short int cursor_size; /* size of cursor (percentage filled) */
902 short int cursor_visible;/* cursor visibility flag */
903 short int cursor_x; /* position of cursor (x, y) */
905 short int width; /* width of the screen buffer */
906 short int height; /* height of the screen buffer */
907 short int attr; /* default attribute */
908 short int win_left; /* window actually displayed by renderer */
909 short int win_top; /* the rect area is expressed withing the */
910 short int win_right; /* boundaries of the screen buffer */
911 short int win_bottom;
912 short int max_width; /* maximum size (width x height) for the window */
913 short int max_height;
916 /* Add input records to a console input queue */
917 @REQ(write_console_input)
918 obj_handle_t handle; /* handle to the console input */
919 VARARG(rec,input_records); /* input records */
921 int written; /* number of records written */
925 /* Fetch input records from a console input queue */
926 @REQ(read_console_input)
927 obj_handle_t handle; /* handle to the console input */
928 int flush; /* flush the retrieved records from the queue? */
930 int read; /* number of records read */
931 VARARG(rec,input_records); /* input records */
935 /* write data (chars and/or attributes) in a screen buffer */
936 @REQ(write_console_output)
937 obj_handle_t handle; /* handle to the console output */
938 int x; /* position where to start writing */
940 int mode; /* char info (see below) */
941 int wrap; /* wrap around at end of line? */
942 VARARG(data,bytes); /* info to write */
944 int written; /* number of char infos actually written */
945 int width; /* width of screen buffer */
946 int height; /* height of screen buffer */
950 CHAR_INFO_MODE_TEXT, /* characters only */
951 CHAR_INFO_MODE_ATTR, /* attributes only */
952 CHAR_INFO_MODE_TEXTATTR, /* both characters and attributes */
953 CHAR_INFO_MODE_TEXTSTDATTR /* characters but use standard attributes */
957 /* fill a screen buffer with constant data (chars and/or attributes) */
958 @REQ(fill_console_output)
959 obj_handle_t handle; /* handle to the console output */
960 int x; /* position where to start writing */
962 int mode; /* char info mode */
963 int count; /* number to write */
964 int wrap; /* wrap around at end of line? */
965 char_info_t data; /* data to write */
967 int written; /* number of char infos actually written */
971 /* read data (chars and/or attributes) from a screen buffer */
972 @REQ(read_console_output)
973 obj_handle_t handle; /* handle to the console output */
974 int x; /* position (x,y) where to start reading */
976 int mode; /* char info mode */
977 int wrap; /* wrap around at end of line? */
979 int width; /* width of screen buffer */
980 int height; /* height of screen buffer */
985 /* move a rect (of data) in screen buffer content */
986 @REQ(move_console_output)
987 obj_handle_t handle; /* handle to the console output */
988 short int x_src; /* position (x, y) of rect to start moving from */
990 short int x_dst; /* position (x, y) of rect to move to */
992 short int w; /* size of the rect (width, height) to move */
997 /* Sends a signal to a process group */
998 @REQ(send_console_signal)
999 int signal; /* the signal to send */
1000 process_id_t group_id; /* the group to send the signal to */
1004 /* Create a change notification */
1005 @REQ(create_change_notification)
1006 obj_handle_t handle; /* handle to the directory */
1007 int subtree; /* watch all the subtree */
1008 unsigned int filter; /* notification filter */
1010 obj_handle_t handle; /* handle to the change notification */
1014 /* Move to the next change notification */
1015 @REQ(next_change_notification)
1016 obj_handle_t handle; /* handle to the change notification */
1019 /* Create a file mapping */
1020 @REQ(create_mapping)
1021 int size_high; /* mapping size */
1022 int size_low; /* mapping size */
1023 int protect; /* protection flags (see below) */
1024 unsigned int access; /* wanted access rights */
1025 int inherit; /* inherit flag */
1026 obj_handle_t file_handle; /* file handle */
1027 VARARG(name,unicode_str); /* object name */
1029 obj_handle_t handle; /* handle to the mapping */
1031 /* protection flags */
1032 #define VPROT_READ 0x01
1033 #define VPROT_WRITE 0x02
1034 #define VPROT_EXEC 0x04
1035 #define VPROT_WRITECOPY 0x08
1036 #define VPROT_GUARD 0x10
1037 #define VPROT_NOCACHE 0x20
1038 #define VPROT_COMMITTED 0x40
1039 #define VPROT_IMAGE 0x80
1042 /* Open a mapping */
1044 unsigned int access; /* wanted access rights */
1045 int inherit; /* inherit flag */
1046 VARARG(name,unicode_str); /* object name */
1048 obj_handle_t handle; /* handle to the mapping */
1052 /* Get information about a file mapping */
1053 @REQ(get_mapping_info)
1054 obj_handle_t handle; /* handle to the mapping */
1056 int size_high; /* mapping size */
1057 int size_low; /* mapping size */
1058 int protect; /* protection flags */
1059 int header_size; /* header size (for VPROT_IMAGE mapping) */
1060 void* base; /* default base addr (for VPROT_IMAGE mapping) */
1061 obj_handle_t shared_file; /* shared mapping file handle */
1062 int shared_size; /* shared mapping size */
1066 #define SNAP_HEAPLIST 0x00000001
1067 #define SNAP_PROCESS 0x00000002
1068 #define SNAP_THREAD 0x00000004
1069 #define SNAP_MODULE 0x00000008
1070 /* Create a snapshot */
1071 @REQ(create_snapshot)
1072 int inherit; /* inherit flag */
1073 int flags; /* snapshot flags (SNAP_*) */
1074 process_id_t pid; /* process id */
1076 obj_handle_t handle; /* handle to the snapshot */
1080 /* Get the next process from a snapshot */
1082 obj_handle_t handle; /* handle to the snapshot */
1083 int reset; /* reset snapshot position? */
1085 int count; /* process usage count */
1086 process_id_t pid; /* process id */
1087 process_id_t ppid; /* parent process id */
1088 void* heap; /* heap base */
1089 void* module; /* main module */
1090 int threads; /* number of threads */
1091 int priority; /* process priority */
1092 int handles; /* number of handles */
1093 VARARG(filename,unicode_str); /* file name of main exe */
1097 /* Get the next thread from a snapshot */
1099 obj_handle_t handle; /* handle to the snapshot */
1100 int reset; /* reset snapshot position? */
1102 int count; /* thread usage count */
1103 process_id_t pid; /* process id */
1104 thread_id_t tid; /* thread id */
1105 int base_pri; /* base priority */
1106 int delta_pri; /* delta priority */
1110 /* Get the next module from a snapshot */
1112 obj_handle_t handle; /* handle to the snapshot */
1113 int reset; /* reset snapshot position? */
1115 process_id_t pid; /* process id */
1116 void* base; /* module base address */
1117 size_t size; /* module size */
1118 VARARG(filename,unicode_str); /* file name of module */
1122 /* Wait for a debug event */
1123 @REQ(wait_debug_event)
1124 int get_handle; /* should we alloc a handle for waiting? */
1126 process_id_t pid; /* process id */
1127 thread_id_t tid; /* thread id */
1128 obj_handle_t wait; /* wait handle if no event ready */
1129 VARARG(event,debug_event); /* debug event data */
1133 /* Queue an exception event */
1134 @REQ(queue_exception_event)
1135 int first; /* first chance exception? */
1136 VARARG(record,exc_event); /* thread context followed by exception record */
1138 obj_handle_t handle; /* handle to the queued event */
1142 /* Retrieve the status of an exception event */
1143 @REQ(get_exception_status)
1144 obj_handle_t handle; /* handle to the queued event */
1146 int status; /* event continuation status */
1147 VARARG(context,context); /* modified thread context */
1151 /* Send an output string to the debugger */
1152 @REQ(output_debug_string)
1153 void* string; /* string to display (in debugged process address space) */
1154 int unicode; /* is it Unicode? */
1155 int length; /* string length */
1159 /* Continue a debug event */
1160 @REQ(continue_debug_event)
1161 process_id_t pid; /* process id to continue */
1162 thread_id_t tid; /* thread id to continue */
1163 int status; /* continuation status */
1167 /* Start/stop debugging an existing process */
1169 process_id_t pid; /* id of the process to debug */
1170 int attach; /* 1=attaching / 0=detaching from the process */
1174 /* Simulate a breakpoint in a process */
1176 obj_handle_t handle; /* process handle */
1178 int self; /* was it the caller itself? */
1182 /* Set debugger kill on exit flag */
1183 @REQ(set_debugger_kill_on_exit)
1184 int kill_on_exit; /* 0=detach/1=kill debuggee when debugger dies */
1188 /* Read data from a process address space */
1189 @REQ(read_process_memory)
1190 obj_handle_t handle; /* process handle */
1191 void* addr; /* addr to read from */
1193 VARARG(data,bytes); /* result data */
1197 /* Write data to a process address space */
1198 @REQ(write_process_memory)
1199 obj_handle_t handle; /* process handle */
1200 void* addr; /* addr to write to (must be int-aligned) */
1201 unsigned int first_mask; /* mask for first word */
1202 unsigned int last_mask; /* mask for last word */
1203 VARARG(data,bytes); /* data to write */
1207 /* Create a registry key */
1209 obj_handle_t parent; /* handle to the parent key */
1210 unsigned int access; /* desired access rights */
1211 unsigned int options; /* creation options */
1212 time_t modif; /* last modification time */
1213 size_t namelen; /* length of key name in bytes */
1214 VARARG(name,unicode_str,namelen); /* key name */
1215 VARARG(class,unicode_str); /* class name */
1217 obj_handle_t hkey; /* handle to the created key */
1218 int created; /* has it been newly created? */
1221 /* Open a registry key */
1223 obj_handle_t parent; /* handle to the parent key */
1224 unsigned int access; /* desired access rights */
1225 VARARG(name,unicode_str); /* key name */
1227 obj_handle_t hkey; /* handle to the open key */
1231 /* Delete a registry key */
1233 obj_handle_t hkey; /* handle to the key */
1237 /* Flush a registry key */
1239 obj_handle_t hkey; /* handle to the key */
1243 /* Enumerate registry subkeys */
1245 obj_handle_t hkey; /* handle to registry key */
1246 int index; /* index of subkey (or -1 for current key) */
1247 int info_class; /* requested information class */
1249 int subkeys; /* number of subkeys */
1250 int max_subkey; /* longest subkey name */
1251 int max_class; /* longest class name */
1252 int values; /* number of values */
1253 int max_value; /* longest value name */
1254 int max_data; /* longest value data */
1255 time_t modif; /* last modification time */
1256 size_t total; /* total length needed for full name and class */
1257 size_t namelen; /* length of key name in bytes */
1258 VARARG(name,unicode_str,namelen); /* key name */
1259 VARARG(class,unicode_str); /* class name */
1263 /* Set a value of a registry key */
1265 obj_handle_t hkey; /* handle to registry key */
1266 int type; /* value type */
1267 size_t namelen; /* length of value name in bytes */
1268 VARARG(name,unicode_str,namelen); /* value name */
1269 VARARG(data,bytes); /* value data */
1273 /* Retrieve the value of a registry key */
1275 obj_handle_t hkey; /* handle to registry key */
1276 VARARG(name,unicode_str); /* value name */
1278 int type; /* value type */
1279 size_t total; /* total length needed for data */
1280 VARARG(data,bytes); /* value data */
1284 /* Enumerate a value of a registry key */
1285 @REQ(enum_key_value)
1286 obj_handle_t hkey; /* handle to registry key */
1287 int index; /* value index */
1288 int info_class; /* requested information class */
1290 int type; /* value type */
1291 size_t total; /* total length needed for full name and data */
1292 size_t namelen; /* length of value name in bytes */
1293 VARARG(name,unicode_str,namelen); /* value name */
1294 VARARG(data,bytes); /* value data */
1298 /* Delete a value of a registry key */
1299 @REQ(delete_key_value)
1300 obj_handle_t hkey; /* handle to registry key */
1301 VARARG(name,unicode_str); /* value name */
1305 /* Load a registry branch from a file */
1307 obj_handle_t hkey; /* root key to load to */
1308 obj_handle_t file; /* file to load from */
1309 VARARG(name,unicode_str); /* subkey name */
1313 /* UnLoad a registry branch from a file */
1314 @REQ(unload_registry)
1315 obj_handle_t hkey; /* root key to unload to */
1319 /* Save a registry branch to a file */
1321 obj_handle_t hkey; /* key to save */
1322 obj_handle_t file; /* file to save to */
1326 /* Load the user registry files */
1327 @REQ(load_user_registries)
1328 obj_handle_t hkey; /* key for HKCU */
1329 int saving; /* new saving level */
1330 int period; /* duration between periodic saves (milliseconds) */
1334 /* Add a registry key change notification */
1335 @REQ(set_registry_notification)
1336 obj_handle_t hkey; /* key to watch for changes */
1337 obj_handle_t event; /* event to set */
1338 int subtree; /* should we watch the whole subtree? */
1339 unsigned int filter; /* things to watch */
1343 /* Create a waitable timer */
1345 int inherit; /* inherit flag */
1346 int manual; /* manual reset */
1347 VARARG(name,unicode_str); /* object name */
1349 obj_handle_t handle; /* handle to the timer */
1353 /* Open a waitable timer */
1355 unsigned int access; /* wanted access rights */
1356 int inherit; /* inherit flag */
1357 VARARG(name,unicode_str); /* object name */
1359 obj_handle_t handle; /* handle to the timer */
1362 /* Set a waitable timer */
1364 obj_handle_t handle; /* handle to the timer */
1365 abs_time_t expire; /* next expiration absolute time */
1366 int period; /* timer period in ms */
1367 void* callback; /* callback function */
1368 void* arg; /* callback argument */
1370 int signaled; /* was the timer signaled before this call ? */
1373 /* Cancel a waitable timer */
1375 obj_handle_t handle; /* handle to the timer */
1377 int signaled; /* was the timer signaled before this calltime ? */
1381 /* Retrieve the current context of a thread */
1382 @REQ(get_thread_context)
1383 obj_handle_t handle; /* thread handle */
1384 unsigned int flags; /* context flags */
1386 VARARG(context,context); /* thread context */
1390 /* Set the current context of a thread */
1391 @REQ(set_thread_context)
1392 obj_handle_t handle; /* thread handle */
1393 unsigned int flags; /* context flags */
1394 VARARG(context,context); /* thread context */
1398 /* Fetch a selector entry for a thread */
1399 @REQ(get_selector_entry)
1400 obj_handle_t handle; /* thread handle */
1401 int entry; /* LDT entry */
1403 unsigned int base; /* selector base */
1404 unsigned int limit; /* selector limit */
1405 unsigned char flags; /* selector flags */
1411 int local; /* is atom in local process table? */
1412 VARARG(name,unicode_str); /* atom name */
1414 atom_t atom; /* resulting atom */
1418 /* Delete an atom */
1420 atom_t atom; /* atom handle */
1421 int local; /* is atom in local process table? */
1427 int local; /* is atom in local process table? */
1428 VARARG(name,unicode_str); /* atom name */
1430 atom_t atom; /* atom handle */
1434 /* Get an atom name */
1436 atom_t atom; /* atom handle */
1437 int local; /* is atom in local process table? */
1439 int count; /* atom lock count */
1440 VARARG(name,unicode_str); /* atom name */
1444 /* Init the process atom table */
1445 @REQ(init_atom_table)
1446 int entries; /* number of entries */
1450 /* Get the message queue of the current thread */
1453 obj_handle_t handle; /* handle to the queue */
1457 /* Set the current message queue wakeup mask */
1458 @REQ(set_queue_mask)
1459 unsigned int wake_mask; /* wakeup bits mask */
1460 unsigned int changed_mask; /* changed bits mask */
1461 int skip_wait; /* will we skip waiting if signaled? */
1463 unsigned int wake_bits; /* current wake bits */
1464 unsigned int changed_bits; /* current changed bits */
1468 /* Get the current message queue status */
1469 @REQ(get_queue_status)
1470 int clear; /* should we clear the change bits? */
1472 unsigned int wake_bits; /* wake bits */
1473 unsigned int changed_bits; /* changed bits since last time */
1477 /* Wait for a process to start waiting on input */
1478 @REQ(wait_input_idle)
1479 obj_handle_t handle; /* process handle */
1480 int timeout; /* timeout */
1482 obj_handle_t event; /* handle to idle event */
1486 /* Send a message to a thread queue */
1488 thread_id_t id; /* thread id */
1489 int type; /* message type (see below) */
1490 int flags; /* message flags (see below) */
1491 user_handle_t win; /* window handle */
1492 unsigned int msg; /* message code */
1493 unsigned int wparam; /* parameters */
1494 unsigned int lparam; /* parameters */
1495 int x; /* x position */
1496 int y; /* y position */
1497 unsigned int time; /* message time */
1498 unsigned int info; /* extra info */
1499 int timeout; /* timeout for reply */
1500 void* callback; /* callback address */
1501 VARARG(data,bytes); /* message data for sent messages */
1506 MSG_ASCII, /* Ascii message (from SendMessageA) */
1507 MSG_UNICODE, /* Unicode message (from SendMessageW) */
1508 MSG_NOTIFY, /* notify message (from SendNotifyMessageW), always Unicode */
1509 MSG_CALLBACK, /* callback message (from SendMessageCallbackW), always Unicode */
1510 MSG_CALLBACK_RESULT,/* result of a callback message */
1511 MSG_OTHER_PROCESS, /* sent from other process, may include vararg data, always Unicode */
1512 MSG_POSTED, /* posted message (from PostMessageW), always Unicode */
1513 MSG_HARDWARE /* hardware message */
1515 #define SEND_MSG_ABORT_IF_HUNG 0x01
1518 /* Get a message from the current queue */
1520 int flags; /* see below */
1521 user_handle_t get_win; /* window handle to get */
1522 unsigned int get_first; /* first message code to get */
1523 unsigned int get_last; /* last message code to get */
1525 int type; /* message type */
1526 user_handle_t win; /* window handle */
1527 unsigned int msg; /* message code */
1528 unsigned int wparam; /* parameters (callback function for MSG_CALLBACK_RESULT) */
1529 unsigned int lparam; /* parameters (result for MSG_CALLBACK_RESULT) */
1530 int x; /* x position */
1531 int y; /* y position */
1532 unsigned int time; /* message time */
1533 unsigned int info; /* extra info (callback argument for MSG_CALLBACK_RESULT) */
1534 size_t total; /* total size of extra data */
1535 VARARG(data,bytes); /* message data for sent messages */
1537 #define GET_MSG_REMOVE 1 /* remove the message */
1538 #define GET_MSG_SENT_ONLY 2 /* only get sent messages */
1540 /* Reply to a sent message */
1542 int type; /* type of original message */
1543 unsigned int result; /* message result */
1544 int remove; /* should we remove the message? */
1545 VARARG(data,bytes); /* message data for sent messages */
1549 /* Retrieve the reply for the last message sent */
1550 @REQ(get_message_reply)
1551 int cancel; /* cancel message if not ready? */
1553 unsigned int result; /* message result */
1554 VARARG(data,bytes); /* message data for sent messages */
1558 /* Set a window timer */
1560 user_handle_t win; /* window handle */
1561 unsigned int msg; /* message to post */
1562 unsigned int id; /* timer id */
1563 unsigned int rate; /* timer rate in ms */
1564 unsigned int lparam; /* message lparam (callback proc) */
1568 /* Kill a window timer */
1569 @REQ(kill_win_timer)
1570 user_handle_t win; /* window handle */
1571 unsigned int msg; /* message to post */
1572 unsigned int id; /* timer id */
1576 /* Retrieve info about a serial port */
1577 @REQ(get_serial_info)
1578 obj_handle_t handle; /* handle to comm port */
1580 unsigned int readinterval;
1581 unsigned int readconst;
1582 unsigned int readmult;
1583 unsigned int writeconst;
1584 unsigned int writemult;
1585 unsigned int eventmask;
1586 unsigned int commerror;
1590 /* Set info about a serial port */
1591 @REQ(set_serial_info)
1592 obj_handle_t handle; /* handle to comm port */
1593 int flags; /* bitmask to set values (see below) */
1594 unsigned int readinterval;
1595 unsigned int readconst;
1596 unsigned int readmult;
1597 unsigned int writeconst;
1598 unsigned int writemult;
1599 unsigned int eventmask;
1600 unsigned int commerror;
1602 #define SERIALINFO_SET_TIMEOUTS 0x01
1603 #define SERIALINFO_SET_MASK 0x02
1604 #define SERIALINFO_SET_ERROR 0x04
1607 /* Create / reschedule an async I/O */
1608 @REQ(register_async)
1609 obj_handle_t handle; /* handle to comm port, socket or file */
1613 unsigned int status;
1615 #define ASYNC_TYPE_NONE 0x00
1616 #define ASYNC_TYPE_READ 0x01
1617 #define ASYNC_TYPE_WRITE 0x02
1618 #define ASYNC_TYPE_WAIT 0x03
1621 /* Create a named pipe */
1622 @REQ(create_named_pipe)
1623 unsigned int openmode;
1624 unsigned int pipemode;
1625 unsigned int maxinstances;
1626 unsigned int outsize;
1627 unsigned int insize;
1628 unsigned int timeout;
1629 int inherit; /* inherit flag */
1630 VARARG(name,unicode_str); /* pipe name */
1632 obj_handle_t handle; /* handle to the pipe */
1636 /* Open an existing named pipe */
1637 @REQ(open_named_pipe)
1638 unsigned int access;
1639 int inherit; /* inherit flag */
1640 VARARG(name,unicode_str); /* pipe name */
1642 obj_handle_t handle; /* handle to the pipe */
1646 /* Connect to a named pipe */
1647 @REQ(connect_named_pipe)
1648 obj_handle_t handle;
1654 /* Wait for a named pipe */
1655 @REQ(wait_named_pipe)
1656 unsigned int timeout;
1659 VARARG(name,unicode_str); /* pipe name */
1663 /* Disconnect a named pipe */
1664 @REQ(disconnect_named_pipe)
1665 obj_handle_t handle;
1667 int fd; /* associated fd to close */
1671 @REQ(get_named_pipe_info)
1672 obj_handle_t handle;
1675 unsigned int maxinstances;
1676 unsigned int outsize;
1677 unsigned int insize;
1681 /* Create a window */
1683 user_handle_t parent; /* parent window */
1684 user_handle_t owner; /* owner window */
1685 atom_t atom; /* class atom */
1686 void* instance; /* module instance */
1688 user_handle_t handle; /* created window */
1689 int extra; /* number of extra bytes */
1690 void* class_ptr; /* pointer to class in client address space */
1694 /* Link a window into the tree */
1696 user_handle_t handle; /* handle to the window */
1697 user_handle_t parent; /* handle to the parent */
1698 user_handle_t previous; /* previous child in Z-order */
1700 user_handle_t full_parent; /* full handle of new parent */
1704 /* Destroy a window */
1705 @REQ(destroy_window)
1706 user_handle_t handle; /* handle to the window */
1710 /* Set a window owner */
1711 @REQ(set_window_owner)
1712 user_handle_t handle; /* handle to the window */
1713 user_handle_t owner; /* new owner */
1715 user_handle_t full_owner; /* full handle of new owner */
1716 user_handle_t prev_owner; /* full handle of previous owner */
1720 /* Get information from a window handle */
1721 @REQ(get_window_info)
1722 user_handle_t handle; /* handle to the window */
1724 user_handle_t full_handle; /* full 32-bit handle */
1725 user_handle_t last_active; /* last active popup */
1726 process_id_t pid; /* process owning the window */
1727 thread_id_t tid; /* thread owning the window */
1728 atom_t atom; /* class atom */
1732 /* Set some information in a window */
1733 @REQ(set_window_info)
1734 user_handle_t handle; /* handle to the window */
1735 unsigned int flags; /* flags for fields to set (see below) */
1736 unsigned int style; /* window style */
1737 unsigned int ex_style; /* window extended style */
1738 unsigned int id; /* window id */
1739 void* instance; /* creator instance */
1740 void* user_data; /* user-specific data */
1741 int extra_offset; /* offset to set in extra bytes */
1742 size_t extra_size; /* size to set in extra bytes */
1743 unsigned int extra_value; /* value to set in extra bytes */
1745 unsigned int old_style; /* old window style */
1746 unsigned int old_ex_style; /* old window extended style */
1747 unsigned int old_id; /* old window id */
1748 void* old_instance; /* old creator instance */
1749 void* old_user_data; /* old user-specific data */
1750 unsigned int old_extra_value; /* old value in extra bytes */
1752 #define SET_WIN_STYLE 0x01
1753 #define SET_WIN_EXSTYLE 0x02
1754 #define SET_WIN_ID 0x04
1755 #define SET_WIN_INSTANCE 0x08
1756 #define SET_WIN_USERDATA 0x10
1757 #define SET_WIN_EXTRA 0x20
1760 /* Get a list of the window parents, up to the root of the tree */
1761 @REQ(get_window_parents)
1762 user_handle_t handle; /* handle to the window */
1764 int count; /* total count of parents */
1765 VARARG(parents,user_handles); /* parent handles */
1769 /* Get a list of the window children */
1770 @REQ(get_window_children)
1771 user_handle_t parent; /* parent window */
1772 atom_t atom; /* class atom for the listed children */
1773 thread_id_t tid; /* thread owning the listed children */
1775 int count; /* total count of children */
1776 VARARG(children,user_handles); /* children handles */
1780 /* Get a list of the window children that contain a given point */
1781 @REQ(get_window_children_from_point)
1782 user_handle_t parent; /* parent window */
1783 int x; /* point in parent coordinates */
1786 int count; /* total count of children */
1787 VARARG(children,user_handles); /* children handles */
1791 /* Get window tree information from a window handle */
1792 @REQ(get_window_tree)
1793 user_handle_t handle; /* handle to the window */
1795 user_handle_t parent; /* parent window */
1796 user_handle_t owner; /* owner window */
1797 user_handle_t next_sibling; /* next sibling in Z-order */
1798 user_handle_t prev_sibling; /* prev sibling in Z-order */
1799 user_handle_t first_sibling; /* first sibling in Z-order */
1800 user_handle_t last_sibling; /* last sibling in Z-order */
1801 user_handle_t first_child; /* first child */
1802 user_handle_t last_child; /* last child */
1805 /* Set the window and client rectangles of a window */
1806 @REQ(set_window_rectangles)
1807 user_handle_t handle; /* handle to the window */
1808 rectangle_t window; /* window rectangle */
1809 rectangle_t client; /* client rectangle */
1813 /* Get the window and client rectangles of a window */
1814 @REQ(get_window_rectangles)
1815 user_handle_t handle; /* handle to the window */
1817 rectangle_t window; /* window rectangle */
1818 rectangle_t client; /* client rectangle */
1822 /* Get the window text */
1823 @REQ(get_window_text)
1824 user_handle_t handle; /* handle to the window */
1826 VARARG(text,unicode_str); /* window text */
1830 /* Set the window text */
1831 @REQ(set_window_text)
1832 user_handle_t handle; /* handle to the window */
1833 VARARG(text,unicode_str); /* window text */
1837 /* Increment the window paint count */
1838 @REQ(inc_window_paint_count)
1839 user_handle_t handle; /* handle to the window */
1840 int incr; /* increment (can be negative) */
1844 /* Get the coordinates offset between two windows */
1845 @REQ(get_windows_offset)
1846 user_handle_t from; /* handle to the first window */
1847 user_handle_t to; /* handle to the second window */
1849 int x; /* x coordinate offset */
1850 int y; /* y coordinate offset */
1854 /* Get the visible region of a window */
1855 @REQ(get_visible_region)
1856 user_handle_t window; /* handle to the window */
1857 user_handle_t top_win; /* top window to clip against */
1858 unsigned int flags; /* DCX flags */
1860 size_t total_size; /* total size of the resulting region */
1861 VARARG(region,rectangles); /* list of rectangles for the region */
1865 /* Get the window region */
1866 @REQ(get_window_region)
1867 user_handle_t window; /* handle to the window */
1869 size_t total_size; /* total size of the resulting region */
1870 VARARG(region,rectangles); /* list of rectangles for the region */
1874 /* Set the window region */
1875 @REQ(set_window_region)
1876 user_handle_t window; /* handle to the window */
1877 VARARG(region,rectangles); /* list of rectangles for the region */
1881 /* Set a window property */
1882 @REQ(set_window_property)
1883 user_handle_t window; /* handle to the window */
1884 atom_t atom; /* property atom (high-word set if it was a string) */
1885 int string; /* was atom a string originally? */
1886 obj_handle_t handle; /* handle to store */
1890 /* Remove a window property */
1891 @REQ(remove_window_property)
1892 user_handle_t window; /* handle to the window */
1893 atom_t atom; /* property atom */
1895 obj_handle_t handle; /* handle stored in property */
1899 /* Get a window property */
1900 @REQ(get_window_property)
1901 user_handle_t window; /* handle to the window */
1902 atom_t atom; /* property atom */
1904 obj_handle_t handle; /* handle stored in property */
1908 /* Get the list of properties of a window */
1909 @REQ(get_window_properties)
1910 user_handle_t window; /* handle to the window */
1912 int total; /* total number of properties */
1913 VARARG(props,properties); /* list of properties */
1917 /* Attach (or detach) thread inputs */
1918 @REQ(attach_thread_input)
1919 thread_id_t tid_from; /* thread to be attached */
1920 thread_id_t tid_to; /* thread to which tid_from should be attached */
1921 int attach; /* is it an attach? */
1925 /* Get input data for a given thread */
1926 @REQ(get_thread_input)
1927 thread_id_t tid; /* id of thread */
1929 user_handle_t focus; /* handle to the focus window */
1930 user_handle_t capture; /* handle to the capture window */
1931 user_handle_t active; /* handle to the active window */
1932 user_handle_t foreground; /* handle to the global foreground window */
1933 user_handle_t menu_owner; /* handle to the menu owner */
1934 user_handle_t move_size; /* handle to the moving/resizing window */
1935 user_handle_t caret; /* handle to the caret window */
1936 rectangle_t rect; /* caret rectangle */
1939 /* Retrieve queue keyboard state for a given thread */
1941 thread_id_t tid; /* id of thread */
1942 int key; /* optional key code or -1 */
1944 unsigned char state; /* state of specified key */
1945 VARARG(keystate,bytes); /* state array for all the keys */
1948 /* Set queue keyboard state for a given thread */
1950 thread_id_t tid; /* id of thread */
1951 VARARG(keystate,bytes); /* state array for all the keys */
1954 /* Set the system foreground window */
1955 @REQ(set_foreground_window)
1956 user_handle_t handle; /* handle to the foreground window */
1958 user_handle_t previous; /* handle to the previous foreground window */
1959 int send_msg_old; /* whether we have to send a msg to the old window */
1960 int send_msg_new; /* whether we have to send a msg to the new window */
1963 /* Set the current thread focus window */
1964 @REQ(set_focus_window)
1965 user_handle_t handle; /* handle to the focus window */
1967 user_handle_t previous; /* handle to the previous focus window */
1970 /* Set the current thread active window */
1971 @REQ(set_active_window)
1972 user_handle_t handle; /* handle to the active window */
1974 user_handle_t previous; /* handle to the previous active window */
1977 /* Set the current thread capture window */
1978 @REQ(set_capture_window)
1979 user_handle_t handle; /* handle to the capture window */
1980 unsigned int flags; /* capture flags (see below) */
1982 user_handle_t previous; /* handle to the previous capture window */
1983 user_handle_t full_handle; /* full 32-bit handle of new capture window */
1985 #define CAPTURE_MENU 0x01 /* capture is for a menu */
1986 #define CAPTURE_MOVESIZE 0x02 /* capture is for moving/resizing */
1989 /* Set the current thread caret window */
1990 @REQ(set_caret_window)
1991 user_handle_t handle; /* handle to the caret window */
1992 int width; /* caret width */
1993 int height; /* caret height */
1995 user_handle_t previous; /* handle to the previous caret window */
1996 rectangle_t old_rect; /* previous caret rectangle */
1997 int old_hide; /* previous hide count */
1998 int old_state; /* previous caret state (1=on, 0=off) */
2002 /* Set the current thread caret information */
2003 @REQ(set_caret_info)
2004 unsigned int flags; /* caret flags (see below) */
2005 user_handle_t handle; /* handle to the caret window */
2006 int x; /* caret x position */
2007 int y; /* caret y position */
2008 int hide; /* increment for hide count (can be negative to show it) */
2009 int state; /* caret state (1=on, 0=off, -1=toggle current state) */
2011 user_handle_t full_handle; /* handle to the current caret window */
2012 rectangle_t old_rect; /* previous caret rectangle */
2013 int old_hide; /* previous hide count */
2014 int old_state; /* previous caret state (1=on, 0=off) */
2016 #define SET_CARET_POS 0x01 /* set the caret position from x,y */
2017 #define SET_CARET_HIDE 0x02 /* increment the caret hide count */
2018 #define SET_CARET_STATE 0x04 /* set the caret on/off state */
2021 /* Set a window hook */
2023 int id; /* id of the hook */
2024 thread_id_t tid; /* id of thread to set the hook into */
2025 void* proc; /* hook procedure */
2026 int unicode; /* is it a unicode hook? */
2027 VARARG(module,unicode_str); /* module name */
2029 user_handle_t handle; /* handle to the hook */
2033 /* Remove a window hook */
2035 user_handle_t handle; /* handle to the hook */
2036 int id; /* id of the hook if handle is 0 */
2037 void* proc; /* hook procedure if handle is 0 */
2041 /* Start calling a hook chain */
2042 @REQ(start_hook_chain)
2043 int id; /* id of the hook */
2045 user_handle_t handle; /* handle to the next hook */
2046 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2047 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2048 void* proc; /* hook procedure */
2049 int unicode; /* is it a unicode hook? */
2050 VARARG(module,unicode_str); /* module name */
2054 /* Finished calling a hook chain */
2055 @REQ(finish_hook_chain)
2056 int id; /* id of the hook */
2060 /* Get the next hook to call */
2062 user_handle_t handle; /* handle to the current hook */
2064 user_handle_t next; /* handle to the next hook */
2065 int id; /* id of the next hook */
2066 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2067 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2068 void* proc; /* next hook procedure */
2069 int prev_unicode; /* was the previous a unicode hook? */
2070 int next_unicode; /* is the next a unicode hook? */
2071 VARARG(module,unicode_str); /* module name */
2075 /* Create a window class */
2077 int local; /* is it a local class? */
2078 atom_t atom; /* class atom */
2079 unsigned int style; /* class style */
2080 void* instance; /* module instance */
2081 int extra; /* number of extra class bytes */
2082 int win_extra; /* number of window extra bytes */
2083 void* client_ptr; /* pointer to class in client address space */
2087 /* Destroy a window class */
2089 atom_t atom; /* class atom */
2090 void* instance; /* module instance */
2092 void* client_ptr; /* pointer to class in client address space */
2096 /* Set some information in a class */
2097 @REQ(set_class_info)
2098 user_handle_t window; /* handle to the window */
2099 unsigned int flags; /* flags for info to set (see below) */
2100 atom_t atom; /* class atom */
2101 unsigned int style; /* class style */
2102 int win_extra; /* number of window extra bytes */
2103 void* instance; /* module instance */
2104 int extra_offset; /* offset to set in extra bytes */
2105 size_t extra_size; /* size to set in extra bytes */
2106 unsigned int extra_value; /* value to set in extra bytes */
2108 atom_t old_atom; /* previous class atom */
2109 unsigned int old_style; /* previous class style */
2110 int old_extra; /* previous number of class extra bytes */
2111 int old_win_extra; /* previous number of window extra bytes */
2112 void* old_instance; /* previous module instance */
2113 unsigned int old_extra_value; /* old value in extra bytes */
2115 #define SET_CLASS_ATOM 0x0001
2116 #define SET_CLASS_STYLE 0x0002
2117 #define SET_CLASS_WINEXTRA 0x0004
2118 #define SET_CLASS_INSTANCE 0x0008
2119 #define SET_CLASS_EXTRA 0x0010
2122 /* Set/get clipboard information */
2123 @REQ(set_clipboard_info)
2124 unsigned int flags; /* flags for fields to set (see below) */
2125 user_handle_t clipboard; /* clipboard window */
2126 user_handle_t owner; /* clipboard owner */
2127 user_handle_t viewer; /* first clipboard viewer */
2128 unsigned int seqno; /* change sequence number */
2130 unsigned int flags; /* status flags (see below) */
2131 user_handle_t old_clipboard; /* old clipboard window */
2132 user_handle_t old_owner; /* old clipboard owner */
2133 user_handle_t old_viewer; /* old clipboard viewer */
2134 unsigned int seqno; /* current sequence number */
2137 #define SET_CB_OPEN 0x001
2138 #define SET_CB_OWNER 0x002
2139 #define SET_CB_VIEWER 0x004
2140 #define SET_CB_SEQNO 0x008
2141 #define SET_CB_RELOWNER 0x010
2142 #define SET_CB_CLOSE 0x020
2143 #define CB_OPEN 0x040
2144 #define CB_OWNER 0x080
2147 /* Open a security token */
2149 obj_handle_t handle; /* handle to the thread or process */
2150 unsigned int flags; /* flags (see below) */
2152 obj_handle_t token; /* handle to the token */
2154 #define OPEN_TOKEN_THREAD 1
2155 #define OPEN_TOKEN_AS_SELF 2
2158 /* Set/get the global windows */
2159 @REQ(set_global_windows)
2160 unsigned int flags; /* flags for fields to set (see below) */
2161 user_handle_t shell_window; /* handle to the new shell window */
2162 user_handle_t shell_listview; /* handle to the new shell listview window */
2163 user_handle_t progman_window; /* handle to the new program manager window */
2164 user_handle_t taskman_window; /* handle to the new task manager window */
2166 user_handle_t old_shell_window; /* handle to the shell window */
2167 user_handle_t old_shell_listview; /* handle to the shell listview window */
2168 user_handle_t old_progman_window; /* handle to the new program manager window */
2169 user_handle_t old_taskman_window; /* handle to the new task manager window */
2171 #define SET_GLOBAL_SHELL_WINDOWS 0x01 /* set both main shell and listview windows */
2172 #define SET_GLOBAL_PROGMAN_WINDOW 0x02
2173 #define SET_GLOBAL_TASKMAN_WINDOW 0x04