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 process_id_t ppid; /* server process id of parent */
305 int exit_code; /* process exit code */
306 int priority; /* priority class */
307 int process_affinity; /* process affinity mask */
308 int system_affinity; /* system affinity mask */
309 void* peb; /* PEB address in process address space */
313 /* Set a process informations */
314 @REQ(set_process_info)
315 obj_handle_t handle; /* process handle */
316 int mask; /* setting mask (see below) */
317 int priority; /* priority class */
318 int affinity; /* affinity mask */
320 #define SET_PROCESS_INFO_PRIORITY 0x01
321 #define SET_PROCESS_INFO_AFFINITY 0x02
324 /* Retrieve information about a thread */
325 @REQ(get_thread_info)
326 obj_handle_t handle; /* thread handle */
327 thread_id_t tid_in; /* thread id (optional) */
329 process_id_t pid; /* server process id */
330 thread_id_t tid; /* server thread id */
331 void* teb; /* thread teb pointer */
332 int exit_code; /* thread exit code */
333 int priority; /* thread priority level */
334 int affinity; /* thread affinity mask */
335 time_t creation_time; /* thread creation time */
336 time_t exit_time; /* thread exit time */
340 /* Set a thread informations */
341 @REQ(set_thread_info)
342 obj_handle_t handle; /* thread handle */
343 int mask; /* setting mask (see below) */
344 int priority; /* priority class */
345 int affinity; /* affinity mask */
347 #define SET_THREAD_INFO_PRIORITY 0x01
348 #define SET_THREAD_INFO_AFFINITY 0x02
351 /* Retrieve information about a module */
353 obj_handle_t handle; /* process handle */
354 void* base_address; /* base address of module */
356 size_t size; /* module size */
358 VARARG(filename,unicode_str); /* file name of module */
362 /* Suspend a thread */
364 obj_handle_t handle; /* thread handle */
366 int count; /* new suspend count */
370 /* Resume a thread */
372 obj_handle_t handle; /* thread handle */
374 int count; /* new suspend count */
378 /* Notify the server that a dll has been loaded */
380 obj_handle_t handle; /* file handle */
381 void* base; /* base address */
382 size_t size; /* dll size */
383 int dbg_offset; /* debug info offset */
384 int dbg_size; /* debug info size */
385 void* name; /* ptr to ptr to name (in process addr space) */
386 VARARG(filename,unicode_str); /* file name of dll */
390 /* Notify the server that a dll is being unloaded */
392 void* base; /* base address */
396 /* Queue an APC for a thread */
398 obj_handle_t handle; /* thread handle */
399 int user; /* user or system apc? */
400 void* func; /* function to call */
401 void* arg1; /* params for function to call */
407 /* Get next APC to call */
409 int alertable; /* is thread alertable? */
411 void* func; /* function to call */
412 int type; /* function type */
413 void* arg1; /* function arguments */
417 enum apc_type { APC_NONE, APC_USER, APC_TIMER, APC_ASYNC, APC_ASYNC_IO };
420 /* Close a handle for the current process */
422 obj_handle_t handle; /* handle to close */
424 int fd; /* associated fd to close */
428 /* Set a handle information */
429 @REQ(set_handle_info)
430 obj_handle_t handle; /* handle we are interested in */
431 int flags; /* new handle flags */
432 int mask; /* mask for flags to set */
433 int fd; /* file descriptor or -1 */
435 int old_flags; /* old flag value */
436 int cur_fd; /* current file descriptor */
440 /* Duplicate a handle */
442 obj_handle_t src_process; /* src process handle */
443 obj_handle_t src_handle; /* src handle to duplicate */
444 obj_handle_t dst_process; /* dst process handle */
445 unsigned int access; /* wanted access rights */
446 int inherit; /* inherit flag */
447 int options; /* duplicate options (see below) */
449 obj_handle_t handle; /* duplicated handle in dst process */
450 int fd; /* associated fd to close */
452 #define DUP_HANDLE_CLOSE_SOURCE DUPLICATE_CLOSE_SOURCE
453 #define DUP_HANDLE_SAME_ACCESS DUPLICATE_SAME_ACCESS
454 #define DUP_HANDLE_MAKE_GLOBAL 0x80000000 /* Not a Windows flag */
457 /* Open a handle to a process */
459 process_id_t pid; /* process id to open */
460 unsigned int access; /* wanted access rights */
461 int inherit; /* inherit flag */
463 obj_handle_t handle; /* handle to the process */
467 /* Open a handle to a thread */
469 thread_id_t tid; /* thread id to open */
470 unsigned int access; /* wanted access rights */
471 int inherit; /* inherit flag */
473 obj_handle_t handle; /* handle to the thread */
477 /* Wait for handles */
479 int flags; /* wait flags (see below) */
480 void* cookie; /* magic cookie to return to client */
481 abs_time_t timeout; /* absolute timeout */
482 VARARG(handles,handles); /* handles to select on */
485 #define SELECT_ALERTABLE 2
486 #define SELECT_INTERRUPTIBLE 4
487 #define SELECT_TIMEOUT 8
490 /* Create an event */
492 int manual_reset; /* manual reset event */
493 int initial_state; /* initial state of the event */
494 int inherit; /* inherit flag */
495 VARARG(name,unicode_str); /* object name */
497 obj_handle_t handle; /* handle to the event */
500 /* Event operation */
502 obj_handle_t handle; /* handle to event */
503 int op; /* event operation (see below) */
505 enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT };
510 unsigned int access; /* wanted access rights */
511 int inherit; /* inherit flag */
512 VARARG(name,unicode_str); /* object name */
514 obj_handle_t handle; /* handle to the event */
520 int owned; /* initially owned? */
521 int inherit; /* inherit flag */
522 VARARG(name,unicode_str); /* object name */
524 obj_handle_t handle; /* handle to the mutex */
528 /* Release a mutex */
530 obj_handle_t handle; /* handle to the mutex */
536 unsigned int access; /* wanted access rights */
537 int inherit; /* inherit flag */
538 VARARG(name,unicode_str); /* object name */
540 obj_handle_t handle; /* handle to the mutex */
544 /* Create a semaphore */
545 @REQ(create_semaphore)
546 unsigned int initial; /* initial count */
547 unsigned int max; /* maximum count */
548 int inherit; /* inherit flag */
549 VARARG(name,unicode_str); /* object name */
551 obj_handle_t handle; /* handle to the semaphore */
555 /* Release a semaphore */
556 @REQ(release_semaphore)
557 obj_handle_t handle; /* handle to the semaphore */
558 unsigned int count; /* count to add to semaphore */
560 unsigned int prev_count; /* previous semaphore count */
564 /* Open a semaphore */
566 unsigned int access; /* wanted access rights */
567 int inherit; /* inherit flag */
568 VARARG(name,unicode_str); /* object name */
570 obj_handle_t handle; /* handle to the semaphore */
576 unsigned int access; /* wanted access rights */
577 int inherit; /* inherit flag */
578 unsigned int sharing; /* sharing flags */
579 int create; /* file create action */
580 unsigned int options; /* file options */
581 unsigned int attrs; /* file attributes for creation */
582 VARARG(filename,string); /* file name */
584 obj_handle_t handle; /* handle to the file */
588 /* Allocate a file handle for a Unix fd */
589 @REQ(alloc_file_handle)
590 unsigned int access; /* wanted access rights */
591 int inherit; /* inherit flag */
592 int fd; /* file descriptor on the client side */
594 obj_handle_t handle; /* handle to the file */
598 /* Get a Unix fd to access a file */
600 obj_handle_t handle; /* handle to the file */
601 unsigned int access; /* wanted access rights */
603 int fd; /* file descriptor */
604 int type; /* the type of file (see below) */
605 int flags; /* file read/write flags (see below) */
613 #define FD_FLAG_OVERLAPPED 0x01
614 #define FD_FLAG_TIMEOUT 0x02
615 #define FD_FLAG_RECV_SHUTDOWN 0x04
616 #define FD_FLAG_SEND_SHUTDOWN 0x08
619 /* Flush a file buffers */
621 obj_handle_t handle; /* handle to the file */
623 obj_handle_t event; /* event set when finished */
627 /* Lock a region of a file */
629 obj_handle_t handle; /* handle to the file */
630 unsigned int offset_low; /* offset of start of lock */
631 unsigned int offset_high; /* offset of start of lock */
632 unsigned int count_low; /* count of bytes to lock */
633 unsigned int count_high; /* count of bytes to lock */
634 int shared; /* shared or exclusive lock? */
635 int wait; /* do we want to wait? */
637 obj_handle_t handle; /* handle to wait on */
638 int overlapped; /* is it an overlapped I/O handle? */
642 /* Unlock a region of a file */
644 obj_handle_t handle; /* handle to the file */
645 unsigned int offset_low; /* offset of start of unlock */
646 unsigned int offset_high; /* offset of start of unlock */
647 unsigned int count_low; /* count of bytes to unlock */
648 unsigned int count_high; /* count of bytes to unlock */
652 /* Create a socket */
654 unsigned int access; /* wanted access rights */
655 int inherit; /* inherit flag */
656 int family; /* family, see socket manpage */
657 int type; /* type, see socket manpage */
658 int protocol; /* protocol, see socket manpage */
659 unsigned int flags; /* socket flags */
661 obj_handle_t handle; /* handle to the new socket */
665 /* Accept a socket */
667 obj_handle_t lhandle; /* handle to the listening socket */
668 unsigned int access; /* wanted access rights */
669 int inherit; /* inherit flag */
671 obj_handle_t handle; /* handle to the new socket */
675 /* Set socket event parameters */
676 @REQ(set_socket_event)
677 obj_handle_t handle; /* handle to the socket */
678 unsigned int mask; /* event mask */
679 obj_handle_t event; /* event object */
680 user_handle_t window; /* window to send the message to */
681 unsigned int msg; /* message to send */
685 /* Get socket event parameters */
686 @REQ(get_socket_event)
687 obj_handle_t handle; /* handle to the socket */
688 int service; /* clear pending? */
689 obj_handle_t c_event; /* event to clear */
691 unsigned int mask; /* event mask */
692 unsigned int pmask; /* pending events */
693 unsigned int state; /* status bits */
694 VARARG(errors,ints); /* event errors */
698 /* Reenable pending socket events */
699 @REQ(enable_socket_event)
700 obj_handle_t handle; /* handle to the socket */
701 unsigned int mask; /* events to re-enable */
702 unsigned int sstate; /* status bits to set */
703 unsigned int cstate; /* status bits to clear */
706 @REQ(set_socket_deferred)
707 obj_handle_t handle; /* handle to the socket */
708 obj_handle_t deferred; /* handle to the socket for which accept() is deferred */
711 /* Allocate a console (only used by a console renderer) */
713 unsigned int access; /* wanted access rights */
714 int inherit; /* inherit flag */
715 process_id_t pid; /* pid of process which shall be attached to the console */
717 obj_handle_t handle_in; /* handle to console input */
718 obj_handle_t event; /* handle to renderer events change notification */
722 /* Free the console of the current process */
727 #define CONSOLE_RENDERER_NONE_EVENT 0x00
728 #define CONSOLE_RENDERER_TITLE_EVENT 0x01
729 #define CONSOLE_RENDERER_ACTIVE_SB_EVENT 0x02
730 #define CONSOLE_RENDERER_SB_RESIZE_EVENT 0x03
731 #define CONSOLE_RENDERER_UPDATE_EVENT 0x04
732 #define CONSOLE_RENDERER_CURSOR_POS_EVENT 0x05
733 #define CONSOLE_RENDERER_CURSOR_GEOM_EVENT 0x06
734 #define CONSOLE_RENDERER_DISPLAY_EVENT 0x07
735 #define CONSOLE_RENDERER_EXIT_EVENT 0x08
736 struct console_renderer_event
771 /* retrieve console events for the renderer */
772 @REQ(get_console_renderer_events)
773 obj_handle_t handle; /* handle to console input events */
775 VARARG(data,bytes); /* the various console_renderer_events */
779 /* Open a handle to the process console */
781 int from; /* 0 (resp 1) input (resp output) of current process console */
782 /* otherwise console_in handle to get active screen buffer? */
783 unsigned int access; /* wanted access rights */
784 int inherit; /* inherit flag */
785 int share; /* share mask (only for output handles) */
787 obj_handle_t handle; /* handle to the console */
791 /* Get the input queue wait event */
792 @REQ(get_console_wait_event)
797 /* Get a console mode (input or output) */
798 @REQ(get_console_mode)
799 obj_handle_t handle; /* handle to the console */
801 int mode; /* console mode */
805 /* Set a console mode (input or output) */
806 @REQ(set_console_mode)
807 obj_handle_t handle; /* handle to the console */
808 int mode; /* console mode */
812 /* Set info about a console (input only) */
813 @REQ(set_console_input_info)
814 obj_handle_t handle; /* handle to console input, or 0 for process' console
*/
815 int mask
; /* setting
mask (see below
) */
816 obj_handle_t active_sb
; /* active screen buffer
*/
817 int history_mode
; /* whether we duplicate lines in history
*/
818 int history_size
; /* number of lines in history
*/
819 int edition_mode
; /* index to the edition mode flavors
*/
820 VARARG(title
,unicode_str
); /* console title
*/
822 #define SET_CONSOLE_INPUT_INFO_ACTIVE_SB
0x01
823 #define SET_CONSOLE_INPUT_INFO_TITLE
0x02
824 #define SET_CONSOLE_INPUT_INFO_HISTORY_MODE
0x04
825 #define SET_CONSOLE_INPUT_INFO_HISTORY_SIZE
0x08
826 #define SET_CONSOLE_INPUT_INFO_EDITION_MODE
0x10
829 /* Get info about a
console (input only
) */
830 @
REQ(get_console_input_info
)
831 obj_handle_t handle
; /* handle to console input
, or
0 for process
' console */
833 int history_mode; /* whether we duplicate lines in history */
834 int history_size; /* number of lines in history */
835 int history_index; /* number of used lines in history */
836 int edition_mode; /* index to the edition mode flavors */
837 VARARG(title,unicode_str); /* console title */
841 /* appends a string to console's history
*/
842 @
REQ(append_console_input_history
)
843 obj_handle_t handle
; /* handle to console input
, or
0 for process
' console */
844 VARARG(line,unicode_str); /* line to add */
848 /* appends a string to console's history
*/
849 @
REQ(get_console_input_history
)
850 obj_handle_t handle
; /* handle to console input
, or
0 for process
' console */
851 int index; /* index to get line from */
853 int total; /* total length of line in Unicode chars */
854 VARARG(line,unicode_str); /* line to add */
858 /* creates a new screen buffer on process' console
*/
859 @
REQ(create_console_output
)
860 obj_handle_t handle_in
; /* handle to console input
, or
0 for process
' console */
861 int access; /* wanted access rights */
862 int share; /* sharing credentials */
863 int inherit; /* inherit flag */
865 obj_handle_t handle_out; /* handle to the screen buffer */
869 /* Set info about a console (output only) */
870 @REQ(set_console_output_info)
871 obj_handle_t handle; /* handle to the console */
872 int mask; /* setting mask (see below) */
873 short int cursor_size; /* size of cursor (percentage filled) */
874 short int cursor_visible;/* cursor visibility flag */
875 short int cursor_x; /* position of cursor (x, y) */
877 short int width; /* width of the screen buffer */
878 short int height; /* height of the screen buffer */
879 short int attr; /* default attribute */
880 short int win_left; /* window actually displayed by renderer */
881 short int win_top; /* the rect area is expressed withing the */
882 short int win_right; /* boundaries of the screen buffer */
883 short int win_bottom;
884 short int max_width; /* maximum size (width x height) for the window */
885 short int max_height;
887 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_GEOM 0x01
888 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_POS 0x02
889 #define SET_CONSOLE_OUTPUT_INFO_SIZE 0x04
890 #define SET_CONSOLE_OUTPUT_INFO_ATTR 0x08
891 #define SET_CONSOLE_OUTPUT_INFO_DISPLAY_WINDOW 0x10
892 #define SET_CONSOLE_OUTPUT_INFO_MAX_SIZE 0x20
895 /* Get info about a console (output only) */
896 @REQ(get_console_output_info)
897 obj_handle_t handle; /* handle to the console */
899 short int cursor_size; /* size of cursor (percentage filled) */
900 short int cursor_visible;/* cursor visibility flag */
901 short int cursor_x; /* position of cursor (x, y) */
903 short int width; /* width of the screen buffer */
904 short int height; /* height of the screen buffer */
905 short int attr; /* default attribute */
906 short int win_left; /* window actually displayed by renderer */
907 short int win_top; /* the rect area is expressed withing the */
908 short int win_right; /* boundaries of the screen buffer */
909 short int win_bottom;
910 short int max_width; /* maximum size (width x height) for the window */
911 short int max_height;
914 /* Add input records to a console input queue */
915 @REQ(write_console_input)
916 obj_handle_t handle; /* handle to the console input */
917 VARARG(rec,input_records); /* input records */
919 int written; /* number of records written */
923 /* Fetch input records from a console input queue */
924 @REQ(read_console_input)
925 obj_handle_t handle; /* handle to the console input */
926 int flush; /* flush the retrieved records from the queue? */
928 int read; /* number of records read */
929 VARARG(rec,input_records); /* input records */
933 /* write data (chars and/or attributes) in a screen buffer */
934 @REQ(write_console_output)
935 obj_handle_t handle; /* handle to the console output */
936 int x; /* position where to start writing */
938 int mode; /* char info (see below) */
939 int wrap; /* wrap around at end of line? */
940 VARARG(data,bytes); /* info to write */
942 int written; /* number of char infos actually written */
943 int width; /* width of screen buffer */
944 int height; /* height of screen buffer */
948 CHAR_INFO_MODE_TEXT, /* characters only */
949 CHAR_INFO_MODE_ATTR, /* attributes only */
950 CHAR_INFO_MODE_TEXTATTR, /* both characters and attributes */
951 CHAR_INFO_MODE_TEXTSTDATTR /* characters but use standard attributes */
955 /* fill a screen buffer with constant data (chars and/or attributes) */
956 @REQ(fill_console_output)
957 obj_handle_t handle; /* handle to the console output */
958 int x; /* position where to start writing */
960 int mode; /* char info mode */
961 int count; /* number to write */
962 int wrap; /* wrap around at end of line? */
963 char_info_t data; /* data to write */
965 int written; /* number of char infos actually written */
969 /* read data (chars and/or attributes) from a screen buffer */
970 @REQ(read_console_output)
971 obj_handle_t handle; /* handle to the console output */
972 int x; /* position (x,y) where to start reading */
974 int mode; /* char info mode */
975 int wrap; /* wrap around at end of line? */
977 int width; /* width of screen buffer */
978 int height; /* height of screen buffer */
983 /* move a rect (of data) in screen buffer content */
984 @REQ(move_console_output)
985 obj_handle_t handle; /* handle to the console output */
986 short int x_src; /* position (x, y) of rect to start moving from */
988 short int x_dst; /* position (x, y) of rect to move to */
990 short int w; /* size of the rect (width, height) to move */
995 /* Sends a signal to a process group */
996 @REQ(send_console_signal)
997 int signal; /* the signal to send */
998 process_id_t group_id; /* the group to send the signal to */
1002 /* Create a change notification */
1003 @REQ(create_change_notification)
1004 obj_handle_t handle; /* handle to the directory */
1005 int subtree; /* watch all the subtree */
1006 unsigned int filter; /* notification filter */
1008 obj_handle_t handle; /* handle to the change notification */
1012 /* Move to the next change notification */
1013 @REQ(next_change_notification)
1014 obj_handle_t handle; /* handle to the change notification */
1017 /* Create a file mapping */
1018 @REQ(create_mapping)
1019 int size_high; /* mapping size */
1020 int size_low; /* mapping size */
1021 int protect; /* protection flags (see below) */
1022 unsigned int access; /* wanted access rights */
1023 int inherit; /* inherit flag */
1024 obj_handle_t file_handle; /* file handle */
1025 VARARG(name,unicode_str); /* object name */
1027 obj_handle_t handle; /* handle to the mapping */
1029 /* protection flags */
1030 #define VPROT_READ 0x01
1031 #define VPROT_WRITE 0x02
1032 #define VPROT_EXEC 0x04
1033 #define VPROT_WRITECOPY 0x08
1034 #define VPROT_GUARD 0x10
1035 #define VPROT_NOCACHE 0x20
1036 #define VPROT_COMMITTED 0x40
1037 #define VPROT_IMAGE 0x80
1040 /* Open a mapping */
1042 unsigned int access; /* wanted access rights */
1043 int inherit; /* inherit flag */
1044 VARARG(name,unicode_str); /* object name */
1046 obj_handle_t handle; /* handle to the mapping */
1050 /* Get information about a file mapping */
1051 @REQ(get_mapping_info)
1052 obj_handle_t handle; /* handle to the mapping */
1054 int size_high; /* mapping size */
1055 int size_low; /* mapping size */
1056 int protect; /* protection flags */
1057 int header_size; /* header size (for VPROT_IMAGE mapping) */
1058 void* base; /* default base addr (for VPROT_IMAGE mapping) */
1059 obj_handle_t shared_file; /* shared mapping file handle */
1060 int shared_size; /* shared mapping size */
1064 #define SNAP_HEAPLIST 0x00000001
1065 #define SNAP_PROCESS 0x00000002
1066 #define SNAP_THREAD 0x00000004
1067 #define SNAP_MODULE 0x00000008
1068 /* Create a snapshot */
1069 @REQ(create_snapshot)
1070 int inherit; /* inherit flag */
1071 int flags; /* snapshot flags (SNAP_*) */
1072 process_id_t pid; /* process id */
1074 obj_handle_t handle; /* handle to the snapshot */
1078 /* Get the next process from a snapshot */
1080 obj_handle_t handle; /* handle to the snapshot */
1081 int reset; /* reset snapshot position? */
1083 int count; /* process usage count */
1084 process_id_t pid; /* process id */
1085 process_id_t ppid; /* parent process id */
1086 void* heap; /* heap base */
1087 void* module; /* main module */
1088 int threads; /* number of threads */
1089 int priority; /* process priority */
1090 int handles; /* number of handles */
1091 VARARG(filename,unicode_str); /* file name of main exe */
1095 /* Get the next thread from a snapshot */
1097 obj_handle_t handle; /* handle to the snapshot */
1098 int reset; /* reset snapshot position? */
1100 int count; /* thread usage count */
1101 process_id_t pid; /* process id */
1102 thread_id_t tid; /* thread id */
1103 int base_pri; /* base priority */
1104 int delta_pri; /* delta priority */
1108 /* Get the next module from a snapshot */
1110 obj_handle_t handle; /* handle to the snapshot */
1111 int reset; /* reset snapshot position? */
1113 process_id_t pid; /* process id */
1114 void* base; /* module base address */
1115 size_t size; /* module size */
1116 VARARG(filename,unicode_str); /* file name of module */
1120 /* Wait for a debug event */
1121 @REQ(wait_debug_event)
1122 int get_handle; /* should we alloc a handle for waiting? */
1124 process_id_t pid; /* process id */
1125 thread_id_t tid; /* thread id */
1126 obj_handle_t wait; /* wait handle if no event ready */
1127 VARARG(event,debug_event); /* debug event data */
1131 /* Queue an exception event */
1132 @REQ(queue_exception_event)
1133 int first; /* first chance exception? */
1134 VARARG(record,exc_event); /* thread context followed by exception record */
1136 obj_handle_t handle; /* handle to the queued event */
1140 /* Retrieve the status of an exception event */
1141 @REQ(get_exception_status)
1142 obj_handle_t handle; /* handle to the queued event */
1144 int status; /* event continuation status */
1145 VARARG(context,context); /* modified thread context */
1149 /* Send an output string to the debugger */
1150 @REQ(output_debug_string)
1151 void* string; /* string to display (in debugged process address space) */
1152 int unicode; /* is it Unicode? */
1153 int length; /* string length */
1157 /* Continue a debug event */
1158 @REQ(continue_debug_event)
1159 process_id_t pid; /* process id to continue */
1160 thread_id_t tid; /* thread id to continue */
1161 int status; /* continuation status */
1165 /* Start/stop debugging an existing process */
1167 process_id_t pid; /* id of the process to debug */
1168 int attach; /* 1=attaching / 0=detaching from the process */
1172 /* Simulate a breakpoint in a process */
1174 obj_handle_t handle; /* process handle */
1176 int self; /* was it the caller itself? */
1180 /* Set debugger kill on exit flag */
1181 @REQ(set_debugger_kill_on_exit)
1182 int kill_on_exit; /* 0=detach/1=kill debuggee when debugger dies */
1186 /* Read data from a process address space */
1187 @REQ(read_process_memory)
1188 obj_handle_t handle; /* process handle */
1189 void* addr; /* addr to read from */
1191 VARARG(data,bytes); /* result data */
1195 /* Write data to a process address space */
1196 @REQ(write_process_memory)
1197 obj_handle_t handle; /* process handle */
1198 void* addr; /* addr to write to (must be int-aligned) */
1199 unsigned int first_mask; /* mask for first word */
1200 unsigned int last_mask; /* mask for last word */
1201 VARARG(data,bytes); /* data to write */
1205 /* Create a registry key */
1207 obj_handle_t parent; /* handle to the parent key */
1208 unsigned int access; /* desired access rights */
1209 unsigned int options; /* creation options */
1210 time_t modif; /* last modification time */
1211 size_t namelen; /* length of key name in bytes */
1212 VARARG(name,unicode_str,namelen); /* key name */
1213 VARARG(class,unicode_str); /* class name */
1215 obj_handle_t hkey; /* handle to the created key */
1216 int created; /* has it been newly created? */
1219 /* Open a registry key */
1221 obj_handle_t parent; /* handle to the parent key */
1222 unsigned int access; /* desired access rights */
1223 VARARG(name,unicode_str); /* key name */
1225 obj_handle_t hkey; /* handle to the open key */
1229 /* Delete a registry key */
1231 obj_handle_t hkey; /* handle to the key */
1235 /* Flush a registry key */
1237 obj_handle_t hkey; /* handle to the key */
1241 /* Enumerate registry subkeys */
1243 obj_handle_t hkey; /* handle to registry key */
1244 int index; /* index of subkey (or -1 for current key) */
1245 int info_class; /* requested information class */
1247 int subkeys; /* number of subkeys */
1248 int max_subkey; /* longest subkey name */
1249 int max_class; /* longest class name */
1250 int values; /* number of values */
1251 int max_value; /* longest value name */
1252 int max_data; /* longest value data */
1253 time_t modif; /* last modification time */
1254 size_t total; /* total length needed for full name and class */
1255 size_t namelen; /* length of key name in bytes */
1256 VARARG(name,unicode_str,namelen); /* key name */
1257 VARARG(class,unicode_str); /* class name */
1261 /* Set a value of a registry key */
1263 obj_handle_t hkey; /* handle to registry key */
1264 int type; /* value type */
1265 size_t namelen; /* length of value name in bytes */
1266 VARARG(name,unicode_str,namelen); /* value name */
1267 VARARG(data,bytes); /* value data */
1271 /* Retrieve the value of a registry key */
1273 obj_handle_t hkey; /* handle to registry key */
1274 VARARG(name,unicode_str); /* value name */
1276 int type; /* value type */
1277 size_t total; /* total length needed for data */
1278 VARARG(data,bytes); /* value data */
1282 /* Enumerate a value of a registry key */
1283 @REQ(enum_key_value)
1284 obj_handle_t hkey; /* handle to registry key */
1285 int index; /* value index */
1286 int info_class; /* requested information class */
1288 int type; /* value type */
1289 size_t total; /* total length needed for full name and data */
1290 size_t namelen; /* length of value name in bytes */
1291 VARARG(name,unicode_str,namelen); /* value name */
1292 VARARG(data,bytes); /* value data */
1296 /* Delete a value of a registry key */
1297 @REQ(delete_key_value)
1298 obj_handle_t hkey; /* handle to registry key */
1299 VARARG(name,unicode_str); /* value name */
1303 /* Load a registry branch from a file */
1305 obj_handle_t hkey; /* root key to load to */
1306 obj_handle_t file; /* file to load from */
1307 VARARG(name,unicode_str); /* subkey name */
1311 /* UnLoad a registry branch from a file */
1312 @REQ(unload_registry)
1313 obj_handle_t hkey; /* root key to unload to */
1317 /* Save a registry branch to a file */
1319 obj_handle_t hkey; /* key to save */
1320 obj_handle_t file; /* file to save to */
1324 /* Load the user registry files */
1325 @REQ(load_user_registries)
1326 obj_handle_t hkey; /* key for HKCU */
1327 int saving; /* new saving level */
1328 int period; /* duration between periodic saves (milliseconds) */
1332 /* Add a registry key change notification */
1333 @REQ(set_registry_notification)
1334 obj_handle_t hkey; /* key to watch for changes */
1335 obj_handle_t event; /* event to set */
1336 int subtree; /* should we watch the whole subtree? */
1337 unsigned int filter; /* things to watch */
1341 /* Create a waitable timer */
1343 int inherit; /* inherit flag */
1344 int manual; /* manual reset */
1345 VARARG(name,unicode_str); /* object name */
1347 obj_handle_t handle; /* handle to the timer */
1351 /* Open a waitable timer */
1353 unsigned int access; /* wanted access rights */
1354 int inherit; /* inherit flag */
1355 VARARG(name,unicode_str); /* object name */
1357 obj_handle_t handle; /* handle to the timer */
1360 /* Set a waitable timer */
1362 obj_handle_t handle; /* handle to the timer */
1363 abs_time_t expire; /* next expiration absolute time */
1364 int period; /* timer period in ms */
1365 void* callback; /* callback function */
1366 void* arg; /* callback argument */
1368 int signaled; /* was the timer signaled before this call ? */
1371 /* Cancel a waitable timer */
1373 obj_handle_t handle; /* handle to the timer */
1375 int signaled; /* was the timer signaled before this calltime ? */
1379 /* Retrieve the current context of a thread */
1380 @REQ(get_thread_context)
1381 obj_handle_t handle; /* thread handle */
1382 unsigned int flags; /* context flags */
1384 VARARG(context,context); /* thread context */
1388 /* Set the current context of a thread */
1389 @REQ(set_thread_context)
1390 obj_handle_t handle; /* thread handle */
1391 unsigned int flags; /* context flags */
1392 VARARG(context,context); /* thread context */
1396 /* Fetch a selector entry for a thread */
1397 @REQ(get_selector_entry)
1398 obj_handle_t handle; /* thread handle */
1399 int entry; /* LDT entry */
1401 unsigned int base; /* selector base */
1402 unsigned int limit; /* selector limit */
1403 unsigned char flags; /* selector flags */
1409 int local; /* is atom in local process table? */
1410 VARARG(name,unicode_str); /* atom name */
1412 atom_t atom; /* resulting atom */
1416 /* Delete an atom */
1418 atom_t atom; /* atom handle */
1419 int local; /* is atom in local process table? */
1425 int local; /* is atom in local process table? */
1426 VARARG(name,unicode_str); /* atom name */
1428 atom_t atom; /* atom handle */
1432 /* Get an atom name */
1434 atom_t atom; /* atom handle */
1435 int local; /* is atom in local process table? */
1437 int count; /* atom lock count */
1438 VARARG(name,unicode_str); /* atom name */
1442 /* Init the process atom table */
1443 @REQ(init_atom_table)
1444 int entries; /* number of entries */
1448 /* Get the message queue of the current thread */
1451 obj_handle_t handle; /* handle to the queue */
1455 /* Set the current message queue wakeup mask */
1456 @REQ(set_queue_mask)
1457 unsigned int wake_mask; /* wakeup bits mask */
1458 unsigned int changed_mask; /* changed bits mask */
1459 int skip_wait; /* will we skip waiting if signaled? */
1461 unsigned int wake_bits; /* current wake bits */
1462 unsigned int changed_bits; /* current changed bits */
1466 /* Get the current message queue status */
1467 @REQ(get_queue_status)
1468 int clear; /* should we clear the change bits? */
1470 unsigned int wake_bits; /* wake bits */
1471 unsigned int changed_bits; /* changed bits since last time */
1475 /* Wait for a process to start waiting on input */
1476 @REQ(wait_input_idle)
1477 obj_handle_t handle; /* process handle */
1478 int timeout; /* timeout */
1480 obj_handle_t event; /* handle to idle event */
1484 /* Send a message to a thread queue */
1486 thread_id_t id; /* thread id */
1487 int type; /* message type (see below) */
1488 int flags; /* message flags (see below) */
1489 user_handle_t win; /* window handle */
1490 unsigned int msg; /* message code */
1491 unsigned int wparam; /* parameters */
1492 unsigned int lparam; /* parameters */
1493 int x; /* x position */
1494 int y; /* y position */
1495 unsigned int time; /* message time */
1496 unsigned int info; /* extra info */
1497 int timeout; /* timeout for reply */
1498 void* callback; /* callback address */
1499 VARARG(data,bytes); /* message data for sent messages */
1504 MSG_ASCII, /* Ascii message (from SendMessageA) */
1505 MSG_UNICODE, /* Unicode message (from SendMessageW) */
1506 MSG_NOTIFY, /* notify message (from SendNotifyMessageW), always Unicode */
1507 MSG_CALLBACK, /* callback message (from SendMessageCallbackW), always Unicode */
1508 MSG_CALLBACK_RESULT,/* result of a callback message */
1509 MSG_OTHER_PROCESS, /* sent from other process, may include vararg data, always Unicode */
1510 MSG_POSTED, /* posted message (from PostMessageW), always Unicode */
1511 MSG_HARDWARE /* hardware message */
1513 #define SEND_MSG_ABORT_IF_HUNG 0x01
1516 /* Get a message from the current queue */
1518 int flags; /* see below */
1519 user_handle_t get_win; /* window handle to get */
1520 unsigned int get_first; /* first message code to get */
1521 unsigned int get_last; /* last message code to get */
1523 int type; /* message type */
1524 user_handle_t win; /* window handle */
1525 unsigned int msg; /* message code */
1526 unsigned int wparam; /* parameters (callback function for MSG_CALLBACK_RESULT) */
1527 unsigned int lparam; /* parameters (result for MSG_CALLBACK_RESULT) */
1528 int x; /* x position */
1529 int y; /* y position */
1530 unsigned int time; /* message time */
1531 unsigned int info; /* extra info (callback argument for MSG_CALLBACK_RESULT) */
1532 size_t total; /* total size of extra data */
1533 VARARG(data,bytes); /* message data for sent messages */
1535 #define GET_MSG_REMOVE 1 /* remove the message */
1536 #define GET_MSG_SENT_ONLY 2 /* only get sent messages */
1538 /* Reply to a sent message */
1540 int type; /* type of original message */
1541 unsigned int result; /* message result */
1542 int remove; /* should we remove the message? */
1543 VARARG(data,bytes); /* message data for sent messages */
1547 /* Retrieve the reply for the last message sent */
1548 @REQ(get_message_reply)
1549 int cancel; /* cancel message if not ready? */
1551 unsigned int result; /* message result */
1552 VARARG(data,bytes); /* message data for sent messages */
1556 /* Set a window timer */
1558 user_handle_t win; /* window handle */
1559 unsigned int msg; /* message to post */
1560 unsigned int id; /* timer id */
1561 unsigned int rate; /* timer rate in ms */
1562 unsigned int lparam; /* message lparam (callback proc) */
1566 /* Kill a window timer */
1567 @REQ(kill_win_timer)
1568 user_handle_t win; /* window handle */
1569 unsigned int msg; /* message to post */
1570 unsigned int id; /* timer id */
1574 /* Retrieve info about a serial port */
1575 @REQ(get_serial_info)
1576 obj_handle_t handle; /* handle to comm port */
1578 unsigned int readinterval;
1579 unsigned int readconst;
1580 unsigned int readmult;
1581 unsigned int writeconst;
1582 unsigned int writemult;
1583 unsigned int eventmask;
1584 unsigned int commerror;
1588 /* Set info about a serial port */
1589 @REQ(set_serial_info)
1590 obj_handle_t handle; /* handle to comm port */
1591 int flags; /* bitmask to set values (see below) */
1592 unsigned int readinterval;
1593 unsigned int readconst;
1594 unsigned int readmult;
1595 unsigned int writeconst;
1596 unsigned int writemult;
1597 unsigned int eventmask;
1598 unsigned int commerror;
1600 #define SERIALINFO_SET_TIMEOUTS 0x01
1601 #define SERIALINFO_SET_MASK 0x02
1602 #define SERIALINFO_SET_ERROR 0x04
1605 /* Create / reschedule an async I/O */
1606 @REQ(register_async)
1607 obj_handle_t handle; /* handle to comm port, socket or file */
1611 unsigned int status;
1613 #define ASYNC_TYPE_NONE 0x00
1614 #define ASYNC_TYPE_READ 0x01
1615 #define ASYNC_TYPE_WRITE 0x02
1616 #define ASYNC_TYPE_WAIT 0x03
1619 /* Create a named pipe */
1620 @REQ(create_named_pipe)
1621 unsigned int openmode;
1622 unsigned int pipemode;
1623 unsigned int maxinstances;
1624 unsigned int outsize;
1625 unsigned int insize;
1626 unsigned int timeout;
1627 int inherit; /* inherit flag */
1628 VARARG(name,unicode_str); /* pipe name */
1630 obj_handle_t handle; /* handle to the pipe */
1634 /* Open an existing named pipe */
1635 @REQ(open_named_pipe)
1636 unsigned int access;
1637 int inherit; /* inherit flag */
1638 VARARG(name,unicode_str); /* pipe name */
1640 obj_handle_t handle; /* handle to the pipe */
1644 /* Connect to a named pipe */
1645 @REQ(connect_named_pipe)
1646 obj_handle_t handle;
1652 /* Wait for a named pipe */
1653 @REQ(wait_named_pipe)
1654 unsigned int timeout;
1657 VARARG(name,unicode_str); /* pipe name */
1661 /* Disconnect a named pipe */
1662 @REQ(disconnect_named_pipe)
1663 obj_handle_t handle;
1665 int fd; /* associated fd to close */
1669 @REQ(get_named_pipe_info)
1670 obj_handle_t handle;
1673 unsigned int maxinstances;
1674 unsigned int outsize;
1675 unsigned int insize;
1679 /* Create a window */
1681 user_handle_t parent; /* parent window */
1682 user_handle_t owner; /* owner window */
1683 atom_t atom; /* class atom */
1684 void* instance; /* module instance */
1686 user_handle_t handle; /* created window */
1687 int extra; /* number of extra bytes */
1688 void* class_ptr; /* pointer to class in client address space */
1692 /* Link a window into the tree */
1694 user_handle_t handle; /* handle to the window */
1695 user_handle_t parent; /* handle to the parent */
1696 user_handle_t previous; /* previous child in Z-order */
1698 user_handle_t full_parent; /* full handle of new parent */
1702 /* Destroy a window */
1703 @REQ(destroy_window)
1704 user_handle_t handle; /* handle to the window */
1708 /* Set a window owner */
1709 @REQ(set_window_owner)
1710 user_handle_t handle; /* handle to the window */
1711 user_handle_t owner; /* new owner */
1713 user_handle_t full_owner; /* full handle of new owner */
1714 user_handle_t prev_owner; /* full handle of previous owner */
1718 /* Get information from a window handle */
1719 @REQ(get_window_info)
1720 user_handle_t handle; /* handle to the window */
1722 user_handle_t full_handle; /* full 32-bit handle */
1723 user_handle_t last_active; /* last active popup */
1724 process_id_t pid; /* process owning the window */
1725 thread_id_t tid; /* thread owning the window */
1726 atom_t atom; /* class atom */
1730 /* Set some information in a window */
1731 @REQ(set_window_info)
1732 user_handle_t handle; /* handle to the window */
1733 unsigned int flags; /* flags for fields to set (see below) */
1734 unsigned int style; /* window style */
1735 unsigned int ex_style; /* window extended style */
1736 unsigned int id; /* window id */
1737 void* instance; /* creator instance */
1738 void* user_data; /* user-specific data */
1739 int extra_offset; /* offset to set in extra bytes */
1740 size_t extra_size; /* size to set in extra bytes */
1741 unsigned int extra_value; /* value to set in extra bytes */
1743 unsigned int old_style; /* old window style */
1744 unsigned int old_ex_style; /* old window extended style */
1745 unsigned int old_id; /* old window id */
1746 void* old_instance; /* old creator instance */
1747 void* old_user_data; /* old user-specific data */
1748 unsigned int old_extra_value; /* old value in extra bytes */
1750 #define SET_WIN_STYLE 0x01
1751 #define SET_WIN_EXSTYLE 0x02
1752 #define SET_WIN_ID 0x04
1753 #define SET_WIN_INSTANCE 0x08
1754 #define SET_WIN_USERDATA 0x10
1755 #define SET_WIN_EXTRA 0x20
1758 /* Get a list of the window parents, up to the root of the tree */
1759 @REQ(get_window_parents)
1760 user_handle_t handle; /* handle to the window */
1762 int count; /* total count of parents */
1763 VARARG(parents,user_handles); /* parent handles */
1767 /* Get a list of the window children */
1768 @REQ(get_window_children)
1769 user_handle_t parent; /* parent window */
1770 atom_t atom; /* class atom for the listed children */
1771 thread_id_t tid; /* thread owning the listed children */
1773 int count; /* total count of children */
1774 VARARG(children,user_handles); /* children handles */
1778 /* Get window tree information from a window handle */
1779 @REQ(get_window_tree)
1780 user_handle_t handle; /* handle to the window */
1782 user_handle_t parent; /* parent window */
1783 user_handle_t owner; /* owner window */
1784 user_handle_t next_sibling; /* next sibling in Z-order */
1785 user_handle_t prev_sibling; /* prev sibling in Z-order */
1786 user_handle_t first_sibling; /* first sibling in Z-order */
1787 user_handle_t last_sibling; /* last sibling in Z-order */
1788 user_handle_t first_child; /* first child */
1789 user_handle_t last_child; /* last child */
1792 /* Set the window and client rectangles of a window */
1793 @REQ(set_window_rectangles)
1794 user_handle_t handle; /* handle to the window */
1795 rectangle_t window; /* window rectangle */
1796 rectangle_t client; /* client rectangle */
1800 /* Get the window and client rectangles of a window */
1801 @REQ(get_window_rectangles)
1802 user_handle_t handle; /* handle to the window */
1804 rectangle_t window; /* window rectangle */
1805 rectangle_t client; /* client rectangle */
1809 /* Get the window text */
1810 @REQ(get_window_text)
1811 user_handle_t handle; /* handle to the window */
1813 VARARG(text,unicode_str); /* window text */
1817 /* Set the window text */
1818 @REQ(set_window_text)
1819 user_handle_t handle; /* handle to the window */
1820 VARARG(text,unicode_str); /* window text */
1824 /* Increment the window paint count */
1825 @REQ(inc_window_paint_count)
1826 user_handle_t handle; /* handle to the window */
1827 int incr; /* increment (can be negative) */
1831 /* Get the coordinates offset between two windows */
1832 @REQ(get_windows_offset)
1833 user_handle_t from; /* handle to the first window */
1834 user_handle_t to; /* handle to the second window */
1836 int x; /* x coordinate offset */
1837 int y; /* y coordinate offset */
1841 /* Get the visible region of a window */
1842 @REQ(get_visible_region)
1843 user_handle_t window; /* handle to the window */
1844 user_handle_t top_win; /* top window to clip against */
1845 unsigned int flags; /* DCX flags */
1847 size_t total_size; /* total size of the resulting region */
1848 VARARG(region,rectangles); /* list of rectangles for the region */
1852 /* Set a window property */
1853 @REQ(set_window_property)
1854 user_handle_t window; /* handle to the window */
1855 atom_t atom; /* property atom (high-word set if it was a string) */
1856 int string; /* was atom a string originally? */
1857 obj_handle_t handle; /* handle to store */
1861 /* Remove a window property */
1862 @REQ(remove_window_property)
1863 user_handle_t window; /* handle to the window */
1864 atom_t atom; /* property atom */
1866 obj_handle_t handle; /* handle stored in property */
1870 /* Get a window property */
1871 @REQ(get_window_property)
1872 user_handle_t window; /* handle to the window */
1873 atom_t atom; /* property atom */
1875 obj_handle_t handle; /* handle stored in property */
1879 /* Get the list of properties of a window */
1880 @REQ(get_window_properties)
1881 user_handle_t window; /* handle to the window */
1883 int total; /* total number of properties */
1884 VARARG(props,properties); /* list of properties */
1888 /* Attach (or detach) thread inputs */
1889 @REQ(attach_thread_input)
1890 thread_id_t tid_from; /* thread to be attached */
1891 thread_id_t tid_to; /* thread to which tid_from should be attached */
1892 int attach; /* is it an attach? */
1896 /* Get input data for a given thread */
1897 @REQ(get_thread_input)
1898 thread_id_t tid; /* id of thread */
1900 user_handle_t focus; /* handle to the focus window */
1901 user_handle_t capture; /* handle to the capture window */
1902 user_handle_t active; /* handle to the active window */
1903 user_handle_t foreground; /* handle to the global foreground window */
1904 user_handle_t menu_owner; /* handle to the menu owner */
1905 user_handle_t move_size; /* handle to the moving/resizing window */
1906 user_handle_t caret; /* handle to the caret window */
1907 rectangle_t rect; /* caret rectangle */
1910 /* Retrieve queue keyboard state for a given thread */
1912 thread_id_t tid; /* id of thread */
1913 int key; /* optional key code or -1 */
1915 unsigned char state; /* state of specified key */
1916 VARARG(keystate,bytes); /* state array for all the keys */
1919 /* Set queue keyboard state for a given thread */
1921 thread_id_t tid; /* id of thread */
1922 VARARG(keystate,bytes); /* state array for all the keys */
1925 /* Set the system foreground window */
1926 @REQ(set_foreground_window)
1927 user_handle_t handle; /* handle to the foreground window */
1929 user_handle_t previous; /* handle to the previous foreground window */
1930 int send_msg_old; /* whether we have to send a msg to the old window */
1931 int send_msg_new; /* whether we have to send a msg to the new window */
1934 /* Set the current thread focus window */
1935 @REQ(set_focus_window)
1936 user_handle_t handle; /* handle to the focus window */
1938 user_handle_t previous; /* handle to the previous focus window */
1941 /* Set the current thread active window */
1942 @REQ(set_active_window)
1943 user_handle_t handle; /* handle to the active window */
1945 user_handle_t previous; /* handle to the previous active window */
1948 /* Set the current thread capture window */
1949 @REQ(set_capture_window)
1950 user_handle_t handle; /* handle to the capture window */
1951 unsigned int flags; /* capture flags (see below) */
1953 user_handle_t previous; /* handle to the previous capture window */
1954 user_handle_t full_handle; /* full 32-bit handle of new capture window */
1956 #define CAPTURE_MENU 0x01 /* capture is for a menu */
1957 #define CAPTURE_MOVESIZE 0x02 /* capture is for moving/resizing */
1960 /* Set the current thread caret window */
1961 @REQ(set_caret_window)
1962 user_handle_t handle; /* handle to the caret window */
1963 int width; /* caret width */
1964 int height; /* caret height */
1966 user_handle_t previous; /* handle to the previous caret window */
1967 rectangle_t old_rect; /* previous caret rectangle */
1968 int old_hide; /* previous hide count */
1969 int old_state; /* previous caret state (1=on, 0=off) */
1973 /* Set the current thread caret information */
1974 @REQ(set_caret_info)
1975 unsigned int flags; /* caret flags (see below) */
1976 user_handle_t handle; /* handle to the caret window */
1977 int x; /* caret x position */
1978 int y; /* caret y position */
1979 int hide; /* increment for hide count (can be negative to show it) */
1980 int state; /* caret state (1=on, 0=off, -1=toggle current state) */
1982 user_handle_t full_handle; /* handle to the current caret window */
1983 rectangle_t old_rect; /* previous caret rectangle */
1984 int old_hide; /* previous hide count */
1985 int old_state; /* previous caret state (1=on, 0=off) */
1987 #define SET_CARET_POS 0x01 /* set the caret position from x,y */
1988 #define SET_CARET_HIDE 0x02 /* increment the caret hide count */
1989 #define SET_CARET_STATE 0x04 /* set the caret on/off state */
1992 /* Set a window hook */
1994 int id; /* id of the hook */
1995 thread_id_t tid; /* id of thread to set the hook into */
1996 void* proc; /* hook procedure */
1997 int unicode; /* is it a unicode hook? */
1998 VARARG(module,unicode_str); /* module name */
2000 user_handle_t handle; /* handle to the hook */
2004 /* Remove a window hook */
2006 user_handle_t handle; /* handle to the hook */
2007 int id; /* id of the hook if handle is 0 */
2008 void* proc; /* hook procedure if handle is 0 */
2012 /* Start calling a hook chain */
2013 @REQ(start_hook_chain)
2014 int id; /* id of the hook */
2016 user_handle_t handle; /* handle to the next hook */
2017 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2018 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2019 void* proc; /* hook procedure */
2020 int unicode; /* is it a unicode hook? */
2021 VARARG(module,unicode_str); /* module name */
2025 /* Finished calling a hook chain */
2026 @REQ(finish_hook_chain)
2027 int id; /* id of the hook */
2031 /* Get the next hook to call */
2033 user_handle_t handle; /* handle to the current hook */
2035 user_handle_t next; /* handle to the next hook */
2036 int id; /* id of the next hook */
2037 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2038 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2039 void* proc; /* next hook procedure */
2040 int prev_unicode; /* was the previous a unicode hook? */
2041 int next_unicode; /* is the next a unicode hook? */
2042 VARARG(module,unicode_str); /* module name */
2046 /* Create a window class */
2048 int local; /* is it a local class? */
2049 atom_t atom; /* class atom */
2050 unsigned int style; /* class style */
2051 void* instance; /* module instance */
2052 int extra; /* number of extra class bytes */
2053 int win_extra; /* number of window extra bytes */
2054 void* client_ptr; /* pointer to class in client address space */
2058 /* Destroy a window class */
2060 atom_t atom; /* class atom */
2061 void* instance; /* module instance */
2063 void* client_ptr; /* pointer to class in client address space */
2067 /* Set some information in a class */
2068 @REQ(set_class_info)
2069 user_handle_t window; /* handle to the window */
2070 unsigned int flags; /* flags for info to set (see below) */
2071 atom_t atom; /* class atom */
2072 unsigned int style; /* class style */
2073 int win_extra; /* number of window extra bytes */
2074 void* instance; /* module instance */
2075 int extra_offset; /* offset to set in extra bytes */
2076 size_t extra_size; /* size to set in extra bytes */
2077 unsigned int extra_value; /* value to set in extra bytes */
2079 atom_t old_atom; /* previous class atom */
2080 unsigned int old_style; /* previous class style */
2081 int old_extra; /* previous number of class extra bytes */
2082 int old_win_extra; /* previous number of window extra bytes */
2083 void* old_instance; /* previous module instance */
2084 unsigned int old_extra_value; /* old value in extra bytes */
2086 #define SET_CLASS_ATOM 0x0001
2087 #define SET_CLASS_STYLE 0x0002
2088 #define SET_CLASS_WINEXTRA 0x0004
2089 #define SET_CLASS_INSTANCE 0x0008
2090 #define SET_CLASS_EXTRA 0x0010
2093 /* Set/get clipboard information */
2094 @REQ(set_clipboard_info)
2095 unsigned int flags; /* flags for fields to set (see below) */
2096 user_handle_t clipboard; /* clipboard window */
2097 user_handle_t owner; /* clipboard owner */
2098 user_handle_t viewer; /* first clipboard viewer */
2099 unsigned int seqno; /* change sequence number */
2101 unsigned int flags; /* status flags (see below) */
2102 user_handle_t old_clipboard; /* old clipboard window */
2103 user_handle_t old_owner; /* old clipboard owner */
2104 user_handle_t old_viewer; /* old clipboard viewer */
2105 unsigned int seqno; /* current sequence number */
2108 #define SET_CB_OPEN 0x001
2109 #define SET_CB_OWNER 0x002
2110 #define SET_CB_VIEWER 0x004
2111 #define SET_CB_SEQNO 0x008
2112 #define SET_CB_RELOWNER 0x010
2113 #define SET_CB_CLOSE 0x020
2114 #define CB_OPEN 0x040
2115 #define CB_OWNER 0x080
2118 /* Open a security token */
2120 obj_handle_t handle; /* handle to the thread or process */
2121 unsigned int flags; /* flags (see below) */
2123 obj_handle_t token; /* handle to the token */
2125 #define OPEN_TOKEN_THREAD 1
2126 #define OPEN_TOKEN_AS_SELF 2
2129 /* Set/get the global windows */
2130 @REQ(set_global_windows)
2131 unsigned int flags; /* flags for fields to set (see below) */
2132 user_handle_t shell_window; /* handle to the new shell window */
2133 user_handle_t shell_listview; /* handle to the new shell listview window */
2134 user_handle_t progman_window; /* handle to the new program manager window */
2135 user_handle_t taskman_window; /* handle to the new task manager window */
2137 user_handle_t old_shell_window; /* handle to the shell window */
2138 user_handle_t old_shell_listview; /* handle to the shell listview window */
2139 user_handle_t old_progman_window; /* handle to the new program manager window */
2140 user_handle_t old_taskman_window; /* handle to the new task manager window */
2142 #define SET_GLOBAL_SHELL_WINDOWS 0x01 /* set both main shell and listview windows */
2143 #define SET_GLOBAL_PROGMAN_WINDOW 0x02
2144 #define SET_GLOBAL_TASKMAN_WINDOW 0x04