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 options; /* file options */
579 unsigned int attrs; /* file attributes for creation */
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
618 /* Truncate (or extend) a file */
620 obj_handle_t handle; /* handle to the file */
624 /* Flush a file buffers */
626 obj_handle_t handle; /* handle to the file */
628 obj_handle_t event; /* event set when finished */
632 /* Lock a region of a file */
634 obj_handle_t handle; /* handle to the file */
635 unsigned int offset_low; /* offset of start of lock */
636 unsigned int offset_high; /* offset of start of lock */
637 unsigned int count_low; /* count of bytes to lock */
638 unsigned int count_high; /* count of bytes to lock */
639 int shared; /* shared or exclusive lock? */
640 int wait; /* do we want to wait? */
642 obj_handle_t handle; /* handle to wait on */
643 int overlapped; /* is it an overlapped I/O handle? */
647 /* Unlock a region of a file */
649 obj_handle_t handle; /* handle to the file */
650 unsigned int offset_low; /* offset of start of unlock */
651 unsigned int offset_high; /* offset of start of unlock */
652 unsigned int count_low; /* count of bytes to unlock */
653 unsigned int count_high; /* count of bytes to unlock */
657 /* Create a socket */
659 unsigned int access; /* wanted access rights */
660 int inherit; /* inherit flag */
661 int family; /* family, see socket manpage */
662 int type; /* type, see socket manpage */
663 int protocol; /* protocol, see socket manpage */
664 unsigned int flags; /* socket flags */
666 obj_handle_t handle; /* handle to the new socket */
670 /* Accept a socket */
672 obj_handle_t lhandle; /* handle to the listening socket */
673 unsigned int access; /* wanted access rights */
674 int inherit; /* inherit flag */
676 obj_handle_t handle; /* handle to the new socket */
680 /* Set socket event parameters */
681 @REQ(set_socket_event)
682 obj_handle_t handle; /* handle to the socket */
683 unsigned int mask; /* event mask */
684 obj_handle_t event; /* event object */
685 user_handle_t window; /* window to send the message to */
686 unsigned int msg; /* message to send */
690 /* Get socket event parameters */
691 @REQ(get_socket_event)
692 obj_handle_t handle; /* handle to the socket */
693 int service; /* clear pending? */
694 obj_handle_t c_event; /* event to clear */
696 unsigned int mask; /* event mask */
697 unsigned int pmask; /* pending events */
698 unsigned int state; /* status bits */
699 VARARG(errors,ints); /* event errors */
703 /* Reenable pending socket events */
704 @REQ(enable_socket_event)
705 obj_handle_t handle; /* handle to the socket */
706 unsigned int mask; /* events to re-enable */
707 unsigned int sstate; /* status bits to set */
708 unsigned int cstate; /* status bits to clear */
711 @REQ(set_socket_deferred)
712 obj_handle_t handle; /* handle to the socket */
713 obj_handle_t deferred; /* handle to the socket for which accept() is deferred */
716 /* Allocate a console (only used by a console renderer) */
718 unsigned int access; /* wanted access rights */
719 int inherit; /* inherit flag */
720 process_id_t pid; /* pid of process which shall be attached to the console */
722 obj_handle_t handle_in; /* handle to console input */
723 obj_handle_t event; /* handle to renderer events change notification */
727 /* Free the console of the current process */
732 #define CONSOLE_RENDERER_NONE_EVENT 0x00
733 #define CONSOLE_RENDERER_TITLE_EVENT 0x01
734 #define CONSOLE_RENDERER_ACTIVE_SB_EVENT 0x02
735 #define CONSOLE_RENDERER_SB_RESIZE_EVENT 0x03
736 #define CONSOLE_RENDERER_UPDATE_EVENT 0x04
737 #define CONSOLE_RENDERER_CURSOR_POS_EVENT 0x05
738 #define CONSOLE_RENDERER_CURSOR_GEOM_EVENT 0x06
739 #define CONSOLE_RENDERER_DISPLAY_EVENT 0x07
740 #define CONSOLE_RENDERER_EXIT_EVENT 0x08
741 struct console_renderer_event
776 /* retrieve console events for the renderer */
777 @REQ(get_console_renderer_events)
778 obj_handle_t handle; /* handle to console input events */
780 VARARG(data,bytes); /* the various console_renderer_events */
784 /* Open a handle to the process console */
786 int from; /* 0 (resp 1) input (resp output) of current process console */
787 /* otherwise console_in handle to get active screen buffer? */
788 unsigned int access; /* wanted access rights */
789 int inherit; /* inherit flag */
790 int share; /* share mask (only for output handles) */
792 obj_handle_t handle; /* handle to the console */
796 /* Get the input queue wait event */
797 @REQ(get_console_wait_event)
802 /* Get a console mode (input or output) */
803 @REQ(get_console_mode)
804 obj_handle_t handle; /* handle to the console */
806 int mode; /* console mode */
810 /* Set a console mode (input or output) */
811 @REQ(set_console_mode)
812 obj_handle_t handle; /* handle to the console */
813 int mode; /* console mode */
817 /* Set info about a console (input only) */
818 @REQ(set_console_input_info)
819 obj_handle_t handle; /* handle to console input, or 0 for process' console
*/
820 int mask
; /* setting
mask (see below
) */
821 obj_handle_t active_sb
; /* active screen buffer
*/
822 int history_mode
; /* whether we duplicate lines in history
*/
823 int history_size
; /* number of lines in history
*/
824 int edition_mode
; /* index to the edition mode flavors
*/
825 VARARG(title
,unicode_str
); /* console title
*/
827 #define SET_CONSOLE_INPUT_INFO_ACTIVE_SB
0x01
828 #define SET_CONSOLE_INPUT_INFO_TITLE
0x02
829 #define SET_CONSOLE_INPUT_INFO_HISTORY_MODE
0x04
830 #define SET_CONSOLE_INPUT_INFO_HISTORY_SIZE
0x08
831 #define SET_CONSOLE_INPUT_INFO_EDITION_MODE
0x10
834 /* Get info about a
console (input only
) */
835 @
REQ(get_console_input_info
)
836 obj_handle_t handle
; /* handle to console input
, or
0 for process
' console */
838 int history_mode; /* whether we duplicate lines in history */
839 int history_size; /* number of lines in history */
840 int history_index; /* number of used lines in history */
841 int edition_mode; /* index to the edition mode flavors */
842 VARARG(title,unicode_str); /* console title */
846 /* appends a string to console's history
*/
847 @
REQ(append_console_input_history
)
848 obj_handle_t handle
; /* handle to console input
, or
0 for process
' console */
849 VARARG(line,unicode_str); /* line to add */
853 /* appends a string to console's history
*/
854 @
REQ(get_console_input_history
)
855 obj_handle_t handle
; /* handle to console input
, or
0 for process
' console */
856 int index; /* index to get line from */
858 int total; /* total length of line in Unicode chars */
859 VARARG(line,unicode_str); /* line to add */
863 /* creates a new screen buffer on process' console
*/
864 @
REQ(create_console_output
)
865 obj_handle_t handle_in
; /* handle to console input
, or
0 for process
' console */
866 int access; /* wanted access rights */
867 int share; /* sharing credentials */
868 int inherit; /* inherit flag */
870 obj_handle_t handle_out; /* handle to the screen buffer */
874 /* Set info about a console (output only) */
875 @REQ(set_console_output_info)
876 obj_handle_t handle; /* handle to the console */
877 int mask; /* setting mask (see below) */
878 short int cursor_size; /* size of cursor (percentage filled) */
879 short int cursor_visible;/* cursor visibility flag */
880 short int cursor_x; /* position of cursor (x, y) */
882 short int width; /* width of the screen buffer */
883 short int height; /* height of the screen buffer */
884 short int attr; /* default attribute */
885 short int win_left; /* window actually displayed by renderer */
886 short int win_top; /* the rect area is expressed withing the */
887 short int win_right; /* boundaries of the screen buffer */
888 short int win_bottom;
889 short int max_width; /* maximum size (width x height) for the window */
890 short int max_height;
892 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_GEOM 0x01
893 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_POS 0x02
894 #define SET_CONSOLE_OUTPUT_INFO_SIZE 0x04
895 #define SET_CONSOLE_OUTPUT_INFO_ATTR 0x08
896 #define SET_CONSOLE_OUTPUT_INFO_DISPLAY_WINDOW 0x10
897 #define SET_CONSOLE_OUTPUT_INFO_MAX_SIZE 0x20
900 /* Get info about a console (output only) */
901 @REQ(get_console_output_info)
902 obj_handle_t handle; /* handle to the console */
904 short int cursor_size; /* size of cursor (percentage filled) */
905 short int cursor_visible;/* cursor visibility flag */
906 short int cursor_x; /* position of cursor (x, y) */
908 short int width; /* width of the screen buffer */
909 short int height; /* height of the screen buffer */
910 short int attr; /* default attribute */
911 short int win_left; /* window actually displayed by renderer */
912 short int win_top; /* the rect area is expressed withing the */
913 short int win_right; /* boundaries of the screen buffer */
914 short int win_bottom;
915 short int max_width; /* maximum size (width x height) for the window */
916 short int max_height;
919 /* Add input records to a console input queue */
920 @REQ(write_console_input)
921 obj_handle_t handle; /* handle to the console input */
922 VARARG(rec,input_records); /* input records */
924 int written; /* number of records written */
928 /* Fetch input records from a console input queue */
929 @REQ(read_console_input)
930 obj_handle_t handle; /* handle to the console input */
931 int flush; /* flush the retrieved records from the queue? */
933 int read; /* number of records read */
934 VARARG(rec,input_records); /* input records */
938 /* write data (chars and/or attributes) in a screen buffer */
939 @REQ(write_console_output)
940 obj_handle_t handle; /* handle to the console output */
941 int x; /* position where to start writing */
943 int mode; /* char info (see below) */
944 int wrap; /* wrap around at end of line? */
945 VARARG(data,bytes); /* info to write */
947 int written; /* number of char infos actually written */
948 int width; /* width of screen buffer */
949 int height; /* height of screen buffer */
953 CHAR_INFO_MODE_TEXT, /* characters only */
954 CHAR_INFO_MODE_ATTR, /* attributes only */
955 CHAR_INFO_MODE_TEXTATTR, /* both characters and attributes */
956 CHAR_INFO_MODE_TEXTSTDATTR /* characters but use standard attributes */
960 /* fill a screen buffer with constant data (chars and/or attributes) */
961 @REQ(fill_console_output)
962 obj_handle_t handle; /* handle to the console output */
963 int x; /* position where to start writing */
965 int mode; /* char info mode */
966 int count; /* number to write */
967 int wrap; /* wrap around at end of line? */
968 char_info_t data; /* data to write */
970 int written; /* number of char infos actually written */
974 /* read data (chars and/or attributes) from a screen buffer */
975 @REQ(read_console_output)
976 obj_handle_t handle; /* handle to the console output */
977 int x; /* position (x,y) where to start reading */
979 int mode; /* char info mode */
980 int wrap; /* wrap around at end of line? */
982 int width; /* width of screen buffer */
983 int height; /* height of screen buffer */
988 /* move a rect (of data) in screen buffer content */
989 @REQ(move_console_output)
990 obj_handle_t handle; /* handle to the console output */
991 short int x_src; /* position (x, y) of rect to start moving from */
993 short int x_dst; /* position (x, y) of rect to move to */
995 short int w; /* size of the rect (width, height) to move */
1000 /* Sends a signal to a process group */
1001 @REQ(send_console_signal)
1002 int signal; /* the signal to send */
1003 process_id_t group_id; /* the group to send the signal to */
1007 /* Create a change notification */
1008 @REQ(create_change_notification)
1009 obj_handle_t handle; /* handle to the directory */
1010 int subtree; /* watch all the subtree */
1011 unsigned int filter; /* notification filter */
1013 obj_handle_t handle; /* handle to the change notification */
1017 /* Move to the next change notification */
1018 @REQ(next_change_notification)
1019 obj_handle_t handle; /* handle to the change notification */
1022 /* Create a file mapping */
1023 @REQ(create_mapping)
1024 int size_high; /* mapping size */
1025 int size_low; /* mapping size */
1026 int protect; /* protection flags (see below) */
1027 unsigned int access; /* wanted access rights */
1028 int inherit; /* inherit flag */
1029 obj_handle_t file_handle; /* file handle */
1030 VARARG(name,unicode_str); /* object name */
1032 obj_handle_t handle; /* handle to the mapping */
1034 /* protection flags */
1035 #define VPROT_READ 0x01
1036 #define VPROT_WRITE 0x02
1037 #define VPROT_EXEC 0x04
1038 #define VPROT_WRITECOPY 0x08
1039 #define VPROT_GUARD 0x10
1040 #define VPROT_NOCACHE 0x20
1041 #define VPROT_COMMITTED 0x40
1042 #define VPROT_IMAGE 0x80
1045 /* Open a mapping */
1047 unsigned int access; /* wanted access rights */
1048 int inherit; /* inherit flag */
1049 VARARG(name,unicode_str); /* object name */
1051 obj_handle_t handle; /* handle to the mapping */
1055 /* Get information about a file mapping */
1056 @REQ(get_mapping_info)
1057 obj_handle_t handle; /* handle to the mapping */
1059 int size_high; /* mapping size */
1060 int size_low; /* mapping size */
1061 int protect; /* protection flags */
1062 int header_size; /* header size (for VPROT_IMAGE mapping) */
1063 void* base; /* default base addr (for VPROT_IMAGE mapping) */
1064 obj_handle_t shared_file; /* shared mapping file handle */
1065 int shared_size; /* shared mapping size */
1069 #define SNAP_HEAPLIST 0x00000001
1070 #define SNAP_PROCESS 0x00000002
1071 #define SNAP_THREAD 0x00000004
1072 #define SNAP_MODULE 0x00000008
1073 /* Create a snapshot */
1074 @REQ(create_snapshot)
1075 int inherit; /* inherit flag */
1076 int flags; /* snapshot flags (SNAP_*) */
1077 process_id_t pid; /* process id */
1079 obj_handle_t handle; /* handle to the snapshot */
1083 /* Get the next process from a snapshot */
1085 obj_handle_t handle; /* handle to the snapshot */
1086 int reset; /* reset snapshot position? */
1088 int count; /* process usage count */
1089 process_id_t pid; /* process id */
1090 process_id_t ppid; /* parent process id */
1091 void* heap; /* heap base */
1092 void* module; /* main module */
1093 int threads; /* number of threads */
1094 int priority; /* process priority */
1095 int handles; /* number of handles */
1096 VARARG(filename,unicode_str); /* file name of main exe */
1100 /* Get the next thread from a snapshot */
1102 obj_handle_t handle; /* handle to the snapshot */
1103 int reset; /* reset snapshot position? */
1105 int count; /* thread usage count */
1106 process_id_t pid; /* process id */
1107 thread_id_t tid; /* thread id */
1108 int base_pri; /* base priority */
1109 int delta_pri; /* delta priority */
1113 /* Get the next module from a snapshot */
1115 obj_handle_t handle; /* handle to the snapshot */
1116 int reset; /* reset snapshot position? */
1118 process_id_t pid; /* process id */
1119 void* base; /* module base address */
1120 size_t size; /* module size */
1121 VARARG(filename,unicode_str); /* file name of module */
1125 /* Wait for a debug event */
1126 @REQ(wait_debug_event)
1127 int get_handle; /* should we alloc a handle for waiting? */
1129 process_id_t pid; /* process id */
1130 thread_id_t tid; /* thread id */
1131 obj_handle_t wait; /* wait handle if no event ready */
1132 VARARG(event,debug_event); /* debug event data */
1136 /* Queue an exception event */
1137 @REQ(queue_exception_event)
1138 int first; /* first chance exception? */
1139 VARARG(record,exc_event); /* thread context followed by exception record */
1141 obj_handle_t handle; /* handle to the queued event */
1145 /* Retrieve the status of an exception event */
1146 @REQ(get_exception_status)
1147 obj_handle_t handle; /* handle to the queued event */
1149 int status; /* event continuation status */
1150 VARARG(context,context); /* modified thread context */
1154 /* Send an output string to the debugger */
1155 @REQ(output_debug_string)
1156 void* string; /* string to display (in debugged process address space) */
1157 int unicode; /* is it Unicode? */
1158 int length; /* string length */
1162 /* Continue a debug event */
1163 @REQ(continue_debug_event)
1164 process_id_t pid; /* process id to continue */
1165 thread_id_t tid; /* thread id to continue */
1166 int status; /* continuation status */
1170 /* Start/stop debugging an existing process */
1172 process_id_t pid; /* id of the process to debug */
1173 int attach; /* 1=attaching / 0=detaching from the process */
1177 /* Simulate a breakpoint in a process */
1179 obj_handle_t handle; /* process handle */
1181 int self; /* was it the caller itself? */
1185 /* Set debugger kill on exit flag */
1186 @REQ(set_debugger_kill_on_exit)
1187 int kill_on_exit; /* 0=detach/1=kill debuggee when debugger dies */
1191 /* Read data from a process address space */
1192 @REQ(read_process_memory)
1193 obj_handle_t handle; /* process handle */
1194 void* addr; /* addr to read from */
1196 VARARG(data,bytes); /* result data */
1200 /* Write data to a process address space */
1201 @REQ(write_process_memory)
1202 obj_handle_t handle; /* process handle */
1203 void* addr; /* addr to write to (must be int-aligned) */
1204 unsigned int first_mask; /* mask for first word */
1205 unsigned int last_mask; /* mask for last word */
1206 VARARG(data,bytes); /* data to write */
1210 /* Create a registry key */
1212 obj_handle_t parent; /* handle to the parent key */
1213 unsigned int access; /* desired access rights */
1214 unsigned int options; /* creation options */
1215 time_t modif; /* last modification time */
1216 size_t namelen; /* length of key name in bytes */
1217 VARARG(name,unicode_str,namelen); /* key name */
1218 VARARG(class,unicode_str); /* class name */
1220 obj_handle_t hkey; /* handle to the created key */
1221 int created; /* has it been newly created? */
1224 /* Open a registry key */
1226 obj_handle_t parent; /* handle to the parent key */
1227 unsigned int access; /* desired access rights */
1228 VARARG(name,unicode_str); /* key name */
1230 obj_handle_t hkey; /* handle to the open key */
1234 /* Delete a registry key */
1236 obj_handle_t hkey; /* handle to the key */
1240 /* Flush a registry key */
1242 obj_handle_t hkey; /* handle to the key */
1246 /* Enumerate registry subkeys */
1248 obj_handle_t hkey; /* handle to registry key */
1249 int index; /* index of subkey (or -1 for current key) */
1250 int info_class; /* requested information class */
1252 int subkeys; /* number of subkeys */
1253 int max_subkey; /* longest subkey name */
1254 int max_class; /* longest class name */
1255 int values; /* number of values */
1256 int max_value; /* longest value name */
1257 int max_data; /* longest value data */
1258 time_t modif; /* last modification time */
1259 size_t total; /* total length needed for full name and class */
1260 size_t namelen; /* length of key name in bytes */
1261 VARARG(name,unicode_str,namelen); /* key name */
1262 VARARG(class,unicode_str); /* class name */
1266 /* Set a value of a registry key */
1268 obj_handle_t hkey; /* handle to registry key */
1269 int type; /* value type */
1270 size_t namelen; /* length of value name in bytes */
1271 VARARG(name,unicode_str,namelen); /* value name */
1272 VARARG(data,bytes); /* value data */
1276 /* Retrieve the value of a registry key */
1278 obj_handle_t hkey; /* handle to registry key */
1279 VARARG(name,unicode_str); /* value name */
1281 int type; /* value type */
1282 size_t total; /* total length needed for data */
1283 VARARG(data,bytes); /* value data */
1287 /* Enumerate a value of a registry key */
1288 @REQ(enum_key_value)
1289 obj_handle_t hkey; /* handle to registry key */
1290 int index; /* value index */
1291 int info_class; /* requested information class */
1293 int type; /* value type */
1294 size_t total; /* total length needed for full name and data */
1295 size_t namelen; /* length of value name in bytes */
1296 VARARG(name,unicode_str,namelen); /* value name */
1297 VARARG(data,bytes); /* value data */
1301 /* Delete a value of a registry key */
1302 @REQ(delete_key_value)
1303 obj_handle_t hkey; /* handle to registry key */
1304 VARARG(name,unicode_str); /* value name */
1308 /* Load a registry branch from a file */
1310 obj_handle_t hkey; /* root key to load to */
1311 obj_handle_t file; /* file to load from */
1312 VARARG(name,unicode_str); /* subkey name */
1316 /* UnLoad a registry branch from a file */
1317 @REQ(unload_registry)
1318 obj_handle_t hkey; /* root key to unload to */
1322 /* Save a registry branch to a file */
1324 obj_handle_t hkey; /* key to save */
1325 obj_handle_t file; /* file to save to */
1329 /* Save a registry branch at server exit */
1330 @REQ(save_registry_atexit)
1331 obj_handle_t hkey; /* key to save */
1332 VARARG(file,string); /* file to save to */
1336 /* Set the current and saving level for the registry */
1337 @REQ(set_registry_levels)
1338 int current; /* new current level */
1339 int saving; /* new saving level */
1340 int period; /* duration between periodic saves (milliseconds) */
1344 @REQ(set_registry_notification)
1345 obj_handle_t hkey; /* key to watch for changes */
1346 obj_handle_t event; /* event to set */
1347 int subtree; /* should we watch the whole subtree? */
1348 unsigned int filter; /* things to watch */
1352 /* Create a waitable timer */
1354 int inherit; /* inherit flag */
1355 int manual; /* manual reset */
1356 VARARG(name,unicode_str); /* object name */
1358 obj_handle_t handle; /* handle to the timer */
1362 /* Open a waitable timer */
1364 unsigned int access; /* wanted access rights */
1365 int inherit; /* inherit flag */
1366 VARARG(name,unicode_str); /* object name */
1368 obj_handle_t handle; /* handle to the timer */
1371 /* Set a waitable timer */
1373 obj_handle_t handle; /* handle to the timer */
1374 abs_time_t expire; /* next expiration absolute time */
1375 int period; /* timer period in ms */
1376 void* callback; /* callback function */
1377 void* arg; /* callback argument */
1379 int signaled; /* was the timer signaled before this call ? */
1382 /* Cancel a waitable timer */
1384 obj_handle_t handle; /* handle to the timer */
1386 int signaled; /* was the timer signaled before this calltime ? */
1390 /* Retrieve the current context of a thread */
1391 @REQ(get_thread_context)
1392 obj_handle_t handle; /* thread handle */
1393 unsigned int flags; /* context flags */
1395 VARARG(context,context); /* thread context */
1399 /* Set the current context of a thread */
1400 @REQ(set_thread_context)
1401 obj_handle_t handle; /* thread handle */
1402 unsigned int flags; /* context flags */
1403 VARARG(context,context); /* thread context */
1407 /* Fetch a selector entry for a thread */
1408 @REQ(get_selector_entry)
1409 obj_handle_t handle; /* thread handle */
1410 int entry; /* LDT entry */
1412 unsigned int base; /* selector base */
1413 unsigned int limit; /* selector limit */
1414 unsigned char flags; /* selector flags */
1420 int local; /* is atom in local process table? */
1421 VARARG(name,unicode_str); /* atom name */
1423 atom_t atom; /* resulting atom */
1427 /* Delete an atom */
1429 atom_t atom; /* atom handle */
1430 int local; /* is atom in local process table? */
1436 int local; /* is atom in local process table? */
1437 VARARG(name,unicode_str); /* atom name */
1439 atom_t atom; /* atom handle */
1443 /* Get an atom name */
1445 atom_t atom; /* atom handle */
1446 int local; /* is atom in local process table? */
1448 int count; /* atom lock count */
1449 VARARG(name,unicode_str); /* atom name */
1453 /* Init the process atom table */
1454 @REQ(init_atom_table)
1455 int entries; /* number of entries */
1459 /* Get the message queue of the current thread */
1462 obj_handle_t handle; /* handle to the queue */
1466 /* Set the current message queue wakeup mask */
1467 @REQ(set_queue_mask)
1468 unsigned int wake_mask; /* wakeup bits mask */
1469 unsigned int changed_mask; /* changed bits mask */
1470 int skip_wait; /* will we skip waiting if signaled? */
1472 unsigned int wake_bits; /* current wake bits */
1473 unsigned int changed_bits; /* current changed bits */
1477 /* Get the current message queue status */
1478 @REQ(get_queue_status)
1479 int clear; /* should we clear the change bits? */
1481 unsigned int wake_bits; /* wake bits */
1482 unsigned int changed_bits; /* changed bits since last time */
1486 /* Wait for a process to start waiting on input */
1487 @REQ(wait_input_idle)
1488 obj_handle_t handle; /* process handle */
1489 int timeout; /* timeout */
1491 obj_handle_t event; /* handle to idle event */
1495 /* Send a message to a thread queue */
1497 thread_id_t id; /* thread id */
1498 int type; /* message type (see below) */
1499 int flags; /* message flags (see below) */
1500 user_handle_t win; /* window handle */
1501 unsigned int msg; /* message code */
1502 unsigned int wparam; /* parameters */
1503 unsigned int lparam; /* parameters */
1504 int x; /* x position */
1505 int y; /* y position */
1506 unsigned int time; /* message time */
1507 unsigned int info; /* extra info */
1508 int timeout; /* timeout for reply */
1509 void* callback; /* callback address */
1510 VARARG(data,bytes); /* message data for sent messages */
1515 MSG_ASCII, /* Ascii message (from SendMessageA) */
1516 MSG_UNICODE, /* Unicode message (from SendMessageW) */
1517 MSG_NOTIFY, /* notify message (from SendNotifyMessageW), always Unicode */
1518 MSG_CALLBACK, /* callback message (from SendMessageCallbackW), always Unicode */
1519 MSG_CALLBACK_RESULT,/* result of a callback message */
1520 MSG_OTHER_PROCESS, /* sent from other process, may include vararg data, always Unicode */
1521 MSG_POSTED, /* posted message (from PostMessageW), always Unicode */
1522 MSG_HARDWARE /* hardware message */
1524 #define SEND_MSG_ABORT_IF_HUNG 0x01
1527 /* Get a message from the current queue */
1529 int flags; /* see below */
1530 user_handle_t get_win; /* window handle to get */
1531 unsigned int get_first; /* first message code to get */
1532 unsigned int get_last; /* last message code to get */
1534 int type; /* message type */
1535 user_handle_t win; /* window handle */
1536 unsigned int msg; /* message code */
1537 unsigned int wparam; /* parameters (callback function for MSG_CALLBACK_RESULT) */
1538 unsigned int lparam; /* parameters (result for MSG_CALLBACK_RESULT) */
1539 int x; /* x position */
1540 int y; /* y position */
1541 unsigned int time; /* message time */
1542 unsigned int info; /* extra info (callback argument for MSG_CALLBACK_RESULT) */
1543 size_t total; /* total size of extra data */
1544 VARARG(data,bytes); /* message data for sent messages */
1546 #define GET_MSG_REMOVE 1 /* remove the message */
1547 #define GET_MSG_SENT_ONLY 2 /* only get sent messages */
1549 /* Reply to a sent message */
1551 int type; /* type of original message */
1552 unsigned int result; /* message result */
1553 int remove; /* should we remove the message? */
1554 VARARG(data,bytes); /* message data for sent messages */
1558 /* Retrieve the reply for the last message sent */
1559 @REQ(get_message_reply)
1560 int cancel; /* cancel message if not ready? */
1562 unsigned int result; /* message result */
1563 VARARG(data,bytes); /* message data for sent messages */
1567 /* Set a window timer */
1569 user_handle_t win; /* window handle */
1570 unsigned int msg; /* message to post */
1571 unsigned int id; /* timer id */
1572 unsigned int rate; /* timer rate in ms */
1573 unsigned int lparam; /* message lparam (callback proc) */
1577 /* Kill a window timer */
1578 @REQ(kill_win_timer)
1579 user_handle_t win; /* window handle */
1580 unsigned int msg; /* message to post */
1581 unsigned int id; /* timer id */
1585 /* Retrieve info about a serial port */
1586 @REQ(get_serial_info)
1587 obj_handle_t handle; /* handle to comm port */
1589 unsigned int readinterval;
1590 unsigned int readconst;
1591 unsigned int readmult;
1592 unsigned int writeconst;
1593 unsigned int writemult;
1594 unsigned int eventmask;
1595 unsigned int commerror;
1599 /* Set info about a serial port */
1600 @REQ(set_serial_info)
1601 obj_handle_t handle; /* handle to comm port */
1602 int flags; /* bitmask to set values (see below) */
1603 unsigned int readinterval;
1604 unsigned int readconst;
1605 unsigned int readmult;
1606 unsigned int writeconst;
1607 unsigned int writemult;
1608 unsigned int eventmask;
1609 unsigned int commerror;
1611 #define SERIALINFO_SET_TIMEOUTS 0x01
1612 #define SERIALINFO_SET_MASK 0x02
1613 #define SERIALINFO_SET_ERROR 0x04
1616 /* Create / reschedule an async I/O */
1617 @REQ(register_async)
1618 obj_handle_t handle; /* handle to comm port, socket or file */
1622 unsigned int status;
1624 #define ASYNC_TYPE_NONE 0x00
1625 #define ASYNC_TYPE_READ 0x01
1626 #define ASYNC_TYPE_WRITE 0x02
1627 #define ASYNC_TYPE_WAIT 0x03
1630 /* Create a named pipe */
1631 @REQ(create_named_pipe)
1632 unsigned int openmode;
1633 unsigned int pipemode;
1634 unsigned int maxinstances;
1635 unsigned int outsize;
1636 unsigned int insize;
1637 unsigned int timeout;
1638 int inherit; /* inherit flag */
1639 VARARG(name,unicode_str); /* pipe name */
1641 obj_handle_t handle; /* handle to the pipe */
1645 /* Open an existing named pipe */
1646 @REQ(open_named_pipe)
1647 unsigned int access;
1648 int inherit; /* inherit flag */
1649 VARARG(name,unicode_str); /* pipe name */
1651 obj_handle_t handle; /* handle to the pipe */
1655 /* Connect to a named pipe */
1656 @REQ(connect_named_pipe)
1657 obj_handle_t handle;
1663 /* Wait for a named pipe */
1664 @REQ(wait_named_pipe)
1665 unsigned int timeout;
1668 VARARG(name,unicode_str); /* pipe name */
1672 /* Disconnect a named pipe */
1673 @REQ(disconnect_named_pipe)
1674 obj_handle_t handle;
1676 int fd; /* associated fd to close */
1680 @REQ(get_named_pipe_info)
1681 obj_handle_t handle;
1684 unsigned int maxinstances;
1685 unsigned int outsize;
1686 unsigned int insize;
1692 unsigned int tree_id;
1693 unsigned int user_id;
1694 unsigned int file_id;
1695 unsigned int dialect;
1697 obj_handle_t handle;
1702 obj_handle_t handle;
1704 unsigned int offset;
1706 unsigned int tree_id;
1707 unsigned int user_id;
1708 unsigned int dialect;
1709 unsigned int file_id;
1710 unsigned int offset;
1712 #define SMBINFO_SET_OFFSET 0x01
1715 /* Create a window */
1717 user_handle_t parent; /* parent window */
1718 user_handle_t owner; /* owner window */
1719 atom_t atom; /* class atom */
1720 void* instance; /* module instance */
1722 user_handle_t handle; /* created window */
1723 int extra; /* number of extra bytes */
1724 void* class_ptr; /* pointer to class in client address space */
1728 /* Link a window into the tree */
1730 user_handle_t handle; /* handle to the window */
1731 user_handle_t parent; /* handle to the parent */
1732 user_handle_t previous; /* previous child in Z-order */
1734 user_handle_t full_parent; /* full handle of new parent */
1738 /* Destroy a window */
1739 @REQ(destroy_window)
1740 user_handle_t handle; /* handle to the window */
1744 /* Set a window owner */
1745 @REQ(set_window_owner)
1746 user_handle_t handle; /* handle to the window */
1747 user_handle_t owner; /* new owner */
1749 user_handle_t full_owner; /* full handle of new owner */
1750 user_handle_t prev_owner; /* full handle of previous owner */
1754 /* Get information from a window handle */
1755 @REQ(get_window_info)
1756 user_handle_t handle; /* handle to the window */
1758 user_handle_t full_handle; /* full 32-bit handle */
1759 user_handle_t last_active; /* last active popup */
1760 process_id_t pid; /* process owning the window */
1761 thread_id_t tid; /* thread owning the window */
1762 atom_t atom; /* class atom */
1766 /* Set some information in a window */
1767 @REQ(set_window_info)
1768 user_handle_t handle; /* handle to the window */
1769 unsigned int flags; /* flags for fields to set (see below) */
1770 unsigned int style; /* window style */
1771 unsigned int ex_style; /* window extended style */
1772 unsigned int id; /* window id */
1773 void* instance; /* creator instance */
1774 void* user_data; /* user-specific data */
1775 int extra_offset; /* offset to set in extra bytes */
1776 size_t extra_size; /* size to set in extra bytes */
1777 unsigned int extra_value; /* value to set in extra bytes */
1779 unsigned int old_style; /* old window style */
1780 unsigned int old_ex_style; /* old window extended style */
1781 unsigned int old_id; /* old window id */
1782 void* old_instance; /* old creator instance */
1783 void* old_user_data; /* old user-specific data */
1784 unsigned int old_extra_value; /* old value in extra bytes */
1786 #define SET_WIN_STYLE 0x01
1787 #define SET_WIN_EXSTYLE 0x02
1788 #define SET_WIN_ID 0x04
1789 #define SET_WIN_INSTANCE 0x08
1790 #define SET_WIN_USERDATA 0x10
1791 #define SET_WIN_EXTRA 0x20
1794 /* Get a list of the window parents, up to the root of the tree */
1795 @REQ(get_window_parents)
1796 user_handle_t handle; /* handle to the window */
1798 int count; /* total count of parents */
1799 VARARG(parents,user_handles); /* parent handles */
1803 /* Get a list of the window children */
1804 @REQ(get_window_children)
1805 user_handle_t parent; /* parent window */
1806 atom_t atom; /* class atom for the listed children */
1807 thread_id_t tid; /* thread owning the listed children */
1809 int count; /* total count of children */
1810 VARARG(children,user_handles); /* children handles */
1814 /* Get window tree information from a window handle */
1815 @REQ(get_window_tree)
1816 user_handle_t handle; /* handle to the window */
1818 user_handle_t parent; /* parent window */
1819 user_handle_t owner; /* owner window */
1820 user_handle_t next_sibling; /* next sibling in Z-order */
1821 user_handle_t prev_sibling; /* prev sibling in Z-order */
1822 user_handle_t first_sibling; /* first sibling in Z-order */
1823 user_handle_t last_sibling; /* last sibling in Z-order */
1824 user_handle_t first_child; /* first child */
1825 user_handle_t last_child; /* last child */
1828 /* Set the window and client rectangles of a window */
1829 @REQ(set_window_rectangles)
1830 user_handle_t handle; /* handle to the window */
1831 rectangle_t window; /* window rectangle */
1832 rectangle_t client; /* client rectangle */
1836 /* Get the window and client rectangles of a window */
1837 @REQ(get_window_rectangles)
1838 user_handle_t handle; /* handle to the window */
1840 rectangle_t window; /* window rectangle */
1841 rectangle_t client; /* client rectangle */
1845 /* Get the window text */
1846 @REQ(get_window_text)
1847 user_handle_t handle; /* handle to the window */
1849 VARARG(text,unicode_str); /* window text */
1853 /* Set the window text */
1854 @REQ(set_window_text)
1855 user_handle_t handle; /* handle to the window */
1856 VARARG(text,unicode_str); /* window text */
1860 /* Increment the window paint count */
1861 @REQ(inc_window_paint_count)
1862 user_handle_t handle; /* handle to the window */
1863 int incr; /* increment (can be negative) */
1867 /* Get the coordinates offset between two windows */
1868 @REQ(get_windows_offset)
1869 user_handle_t from; /* handle to the first window */
1870 user_handle_t to; /* handle to the second window */
1872 int x; /* x coordinate offset */
1873 int y; /* y coordinate offset */
1877 /* Set a window property */
1878 @REQ(set_window_property)
1879 user_handle_t window; /* handle to the window */
1880 atom_t atom; /* property atom (high-word set if it was a string) */
1881 int string; /* was atom a string originally? */
1882 obj_handle_t handle; /* handle to store */
1886 /* Remove a window property */
1887 @REQ(remove_window_property)
1888 user_handle_t window; /* handle to the window */
1889 atom_t atom; /* property atom */
1891 obj_handle_t handle; /* handle stored in property */
1895 /* Get a window property */
1896 @REQ(get_window_property)
1897 user_handle_t window; /* handle to the window */
1898 atom_t atom; /* property atom */
1900 obj_handle_t handle; /* handle stored in property */
1904 /* Get the list of properties of a window */
1905 @REQ(get_window_properties)
1906 user_handle_t window; /* handle to the window */
1908 int total; /* total number of properties */
1909 VARARG(props,properties); /* list of properties */
1913 /* Attach (or detach) thread inputs */
1914 @REQ(attach_thread_input)
1915 thread_id_t tid_from; /* thread to be attached */
1916 thread_id_t tid_to; /* thread to which tid_from should be attached */
1917 int attach; /* is it an attach? */
1921 /* Get input data for a given thread */
1922 @REQ(get_thread_input)
1923 thread_id_t tid; /* id of thread */
1925 user_handle_t focus; /* handle to the focus window */
1926 user_handle_t capture; /* handle to the capture window */
1927 user_handle_t active; /* handle to the active window */
1928 user_handle_t foreground; /* handle to the global foreground window */
1929 user_handle_t menu_owner; /* handle to the menu owner */
1930 user_handle_t move_size; /* handle to the moving/resizing window */
1931 user_handle_t caret; /* handle to the caret window */
1932 rectangle_t rect; /* caret rectangle */
1935 /* Retrieve queue keyboard state for a given thread */
1937 thread_id_t tid; /* id of thread */
1938 int key; /* optional key code or -1 */
1940 unsigned char state; /* state of specified key */
1941 VARARG(keystate,bytes); /* state array for all the keys */
1944 /* Set queue keyboard state for a given thread */
1946 thread_id_t tid; /* id of thread */
1947 VARARG(keystate,bytes); /* state array for all the keys */
1950 /* Set the system foreground window */
1951 @REQ(set_foreground_window)
1952 user_handle_t handle; /* handle to the foreground window */
1954 user_handle_t previous; /* handle to the previous foreground window */
1955 int send_msg_old; /* whether we have to send a msg to the old window */
1956 int send_msg_new; /* whether we have to send a msg to the new window */
1959 /* Set the current thread focus window */
1960 @REQ(set_focus_window)
1961 user_handle_t handle; /* handle to the focus window */
1963 user_handle_t previous; /* handle to the previous focus window */
1966 /* Set the current thread active window */
1967 @REQ(set_active_window)
1968 user_handle_t handle; /* handle to the active window */
1970 user_handle_t previous; /* handle to the previous active window */
1973 /* Set the current thread capture window */
1974 @REQ(set_capture_window)
1975 user_handle_t handle; /* handle to the capture window */
1976 unsigned int flags; /* capture flags (see below) */
1978 user_handle_t previous; /* handle to the previous capture window */
1979 user_handle_t full_handle; /* full 32-bit handle of new capture window */
1981 #define CAPTURE_MENU 0x01 /* capture is for a menu */
1982 #define CAPTURE_MOVESIZE 0x02 /* capture is for moving/resizing */
1985 /* Set the current thread caret window */
1986 @REQ(set_caret_window)
1987 user_handle_t handle; /* handle to the caret window */
1988 int width; /* caret width */
1989 int height; /* caret height */
1991 user_handle_t previous; /* handle to the previous caret window */
1992 rectangle_t old_rect; /* previous caret rectangle */
1993 int old_hide; /* previous hide count */
1994 int old_state; /* previous caret state (1=on, 0=off) */
1998 /* Set the current thread caret information */
1999 @REQ(set_caret_info)
2000 unsigned int flags; /* caret flags (see below) */
2001 user_handle_t handle; /* handle to the caret window */
2002 int x; /* caret x position */
2003 int y; /* caret y position */
2004 int hide; /* increment for hide count (can be negative to show it) */
2005 int state; /* caret state (1=on, 0=off, -1=toggle current state) */
2007 user_handle_t full_handle; /* handle to the current caret window */
2008 rectangle_t old_rect; /* previous caret rectangle */
2009 int old_hide; /* previous hide count */
2010 int old_state; /* previous caret state (1=on, 0=off) */
2012 #define SET_CARET_POS 0x01 /* set the caret position from x,y */
2013 #define SET_CARET_HIDE 0x02 /* increment the caret hide count */
2014 #define SET_CARET_STATE 0x04 /* set the caret on/off state */
2017 /* Set a window hook */
2019 int id; /* id of the hook */
2020 thread_id_t tid; /* id of thread to set the hook into */
2021 void* proc; /* hook procedure */
2022 int unicode; /* is it a unicode hook? */
2023 VARARG(module,unicode_str); /* module name */
2025 user_handle_t handle; /* handle to the hook */
2029 /* Remove a window hook */
2031 user_handle_t handle; /* handle to the hook */
2032 int id; /* id of the hook if handle is 0 */
2033 void* proc; /* hook procedure if handle is 0 */
2037 /* Start calling a hook chain */
2038 @REQ(start_hook_chain)
2039 int id; /* id of the hook */
2041 user_handle_t handle; /* handle to the next hook */
2042 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2043 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2044 void* proc; /* hook procedure */
2045 int unicode; /* is it a unicode hook? */
2046 VARARG(module,unicode_str); /* module name */
2050 /* Finished calling a hook chain */
2051 @REQ(finish_hook_chain)
2052 int id; /* id of the hook */
2056 /* Get the next hook to call */
2058 user_handle_t handle; /* handle to the current hook */
2060 user_handle_t next; /* handle to the next hook */
2061 int id; /* id of the next hook */
2062 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2063 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2064 void* proc; /* next hook procedure */
2065 int prev_unicode; /* was the previous a unicode hook? */
2066 int next_unicode; /* is the next a unicode hook? */
2067 VARARG(module,unicode_str); /* module name */
2071 /* Create a window class */
2073 int local; /* is it a local class? */
2074 atom_t atom; /* class atom */
2075 unsigned int style; /* class style */
2076 void* instance; /* module instance */
2077 int extra; /* number of extra class bytes */
2078 int win_extra; /* number of window extra bytes */
2079 void* client_ptr; /* pointer to class in client address space */
2083 /* Destroy a window class */
2085 atom_t atom; /* class atom */
2086 void* instance; /* module instance */
2088 void* client_ptr; /* pointer to class in client address space */
2092 /* Set some information in a class */
2093 @REQ(set_class_info)
2094 user_handle_t window; /* handle to the window */
2095 unsigned int flags; /* flags for info to set (see below) */
2096 atom_t atom; /* class atom */
2097 unsigned int style; /* class style */
2098 int win_extra; /* number of window extra bytes */
2099 void* instance; /* module instance */
2100 int extra_offset; /* offset to set in extra bytes */
2101 size_t extra_size; /* size to set in extra bytes */
2102 unsigned int extra_value; /* value to set in extra bytes */
2104 atom_t old_atom; /* previous class atom */
2105 unsigned int old_style; /* previous class style */
2106 int old_extra; /* previous number of class extra bytes */
2107 int old_win_extra; /* previous number of window extra bytes */
2108 void* old_instance; /* previous module instance */
2109 unsigned int old_extra_value; /* old value in extra bytes */
2111 #define SET_CLASS_ATOM 0x0001
2112 #define SET_CLASS_STYLE 0x0002
2113 #define SET_CLASS_WINEXTRA 0x0004
2114 #define SET_CLASS_INSTANCE 0x0008
2115 #define SET_CLASS_EXTRA 0x0010
2118 /* Set/get clipboard information */
2119 @REQ(set_clipboard_info)
2120 unsigned int flags; /* flags for fields to set (see below) */
2121 user_handle_t clipboard; /* clipboard window */
2122 user_handle_t owner; /* clipboard owner */
2123 user_handle_t viewer; /* first clipboard viewer */
2124 unsigned int seqno; /* change sequence number */
2126 unsigned int flags; /* status flags (see below) */
2127 user_handle_t old_clipboard; /* old clipboard window */
2128 user_handle_t old_owner; /* old clipboard owner */
2129 user_handle_t old_viewer; /* old clipboard viewer */
2130 unsigned int seqno; /* current sequence number */
2133 #define SET_CB_OPEN 0x001
2134 #define SET_CB_OWNER 0x002
2135 #define SET_CB_VIEWER 0x004
2136 #define SET_CB_SEQNO 0x008
2137 #define SET_CB_RELOWNER 0x010
2138 #define SET_CB_CLOSE 0x020
2139 #define CB_OPEN 0x040
2140 #define CB_OWNER 0x080
2143 /* Open a security token */
2145 obj_handle_t handle; /* handle to the thread or process */
2146 unsigned int flags; /* flags (see below) */
2148 obj_handle_t token; /* handle to the token */
2150 #define OPEN_TOKEN_THREAD 1
2151 #define OPEN_TOKEN_AS_SELF 2
2154 /* Set/get the global windows */
2155 @REQ(set_global_windows)
2156 unsigned int flags; /* flags for fields to set (see below) */
2157 user_handle_t shell_window; /* handle to the new shell window */
2158 user_handle_t shell_listview; /* handle to the new shell listview window */
2159 user_handle_t progman_window; /* handle to the new program manager window */
2160 user_handle_t taskman_window; /* handle to the new task manager window */
2162 user_handle_t old_shell_window; /* handle to the shell window */
2163 user_handle_t old_shell_listview; /* handle to the shell listview window */
2164 user_handle_t old_progman_window; /* handle to the new program manager window */
2165 user_handle_t old_taskman_window; /* handle to the new task manager window */
2167 #define SET_GLOBAL_SHELL_WINDOWS 0x01 /* set both main shell and listview windows */
2168 #define SET_GLOBAL_PROGMAN_WINDOW 0x02
2169 #define SET_GLOBAL_TASKMAN_WINDOW 0x04