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 /* Flush a file buffers */
620 obj_handle_t handle; /* handle to the file */
622 obj_handle_t event; /* event set when finished */
626 /* Lock a region of a file */
628 obj_handle_t handle; /* handle to the file */
629 unsigned int offset_low; /* offset of start of lock */
630 unsigned int offset_high; /* offset of start of lock */
631 unsigned int count_low; /* count of bytes to lock */
632 unsigned int count_high; /* count of bytes to lock */
633 int shared; /* shared or exclusive lock? */
634 int wait; /* do we want to wait? */
636 obj_handle_t handle; /* handle to wait on */
637 int overlapped; /* is it an overlapped I/O handle? */
641 /* Unlock a region of a file */
643 obj_handle_t handle; /* handle to the file */
644 unsigned int offset_low; /* offset of start of unlock */
645 unsigned int offset_high; /* offset of start of unlock */
646 unsigned int count_low; /* count of bytes to unlock */
647 unsigned int count_high; /* count of bytes to unlock */
651 /* Create a socket */
653 unsigned int access; /* wanted access rights */
654 int inherit; /* inherit flag */
655 int family; /* family, see socket manpage */
656 int type; /* type, see socket manpage */
657 int protocol; /* protocol, see socket manpage */
658 unsigned int flags; /* socket flags */
660 obj_handle_t handle; /* handle to the new socket */
664 /* Accept a socket */
666 obj_handle_t lhandle; /* handle to the listening socket */
667 unsigned int access; /* wanted access rights */
668 int inherit; /* inherit flag */
670 obj_handle_t handle; /* handle to the new socket */
674 /* Set socket event parameters */
675 @REQ(set_socket_event)
676 obj_handle_t handle; /* handle to the socket */
677 unsigned int mask; /* event mask */
678 obj_handle_t event; /* event object */
679 user_handle_t window; /* window to send the message to */
680 unsigned int msg; /* message to send */
684 /* Get socket event parameters */
685 @REQ(get_socket_event)
686 obj_handle_t handle; /* handle to the socket */
687 int service; /* clear pending? */
688 obj_handle_t c_event; /* event to clear */
690 unsigned int mask; /* event mask */
691 unsigned int pmask; /* pending events */
692 unsigned int state; /* status bits */
693 VARARG(errors,ints); /* event errors */
697 /* Reenable pending socket events */
698 @REQ(enable_socket_event)
699 obj_handle_t handle; /* handle to the socket */
700 unsigned int mask; /* events to re-enable */
701 unsigned int sstate; /* status bits to set */
702 unsigned int cstate; /* status bits to clear */
705 @REQ(set_socket_deferred)
706 obj_handle_t handle; /* handle to the socket */
707 obj_handle_t deferred; /* handle to the socket for which accept() is deferred */
710 /* Allocate a console (only used by a console renderer) */
712 unsigned int access; /* wanted access rights */
713 int inherit; /* inherit flag */
714 process_id_t pid; /* pid of process which shall be attached to the console */
716 obj_handle_t handle_in; /* handle to console input */
717 obj_handle_t event; /* handle to renderer events change notification */
721 /* Free the console of the current process */
726 #define CONSOLE_RENDERER_NONE_EVENT 0x00
727 #define CONSOLE_RENDERER_TITLE_EVENT 0x01
728 #define CONSOLE_RENDERER_ACTIVE_SB_EVENT 0x02
729 #define CONSOLE_RENDERER_SB_RESIZE_EVENT 0x03
730 #define CONSOLE_RENDERER_UPDATE_EVENT 0x04
731 #define CONSOLE_RENDERER_CURSOR_POS_EVENT 0x05
732 #define CONSOLE_RENDERER_CURSOR_GEOM_EVENT 0x06
733 #define CONSOLE_RENDERER_DISPLAY_EVENT 0x07
734 #define CONSOLE_RENDERER_EXIT_EVENT 0x08
735 struct console_renderer_event
770 /* retrieve console events for the renderer */
771 @REQ(get_console_renderer_events)
772 obj_handle_t handle; /* handle to console input events */
774 VARARG(data,bytes); /* the various console_renderer_events */
778 /* Open a handle to the process console */
780 int from; /* 0 (resp 1) input (resp output) of current process console */
781 /* otherwise console_in handle to get active screen buffer? */
782 unsigned int access; /* wanted access rights */
783 int inherit; /* inherit flag */
784 int share; /* share mask (only for output handles) */
786 obj_handle_t handle; /* handle to the console */
790 /* Get the input queue wait event */
791 @REQ(get_console_wait_event)
796 /* Get a console mode (input or output) */
797 @REQ(get_console_mode)
798 obj_handle_t handle; /* handle to the console */
800 int mode; /* console mode */
804 /* Set a console mode (input or output) */
805 @REQ(set_console_mode)
806 obj_handle_t handle; /* handle to the console */
807 int mode; /* console mode */
811 /* Set info about a console (input only) */
812 @REQ(set_console_input_info)
813 obj_handle_t handle; /* handle to console input, or 0 for process' console */
814 int mask; /* setting mask (see below) */
815 obj_handle_t active_sb; /* active screen buffer */
816 int history_mode; /* whether we duplicate lines in history */
817 int history_size; /* number of lines in history */
818 int edition_mode; /* index to the edition mode flavors */
819 VARARG(title,unicode_str); /* console title */
821 #define SET_CONSOLE_INPUT_INFO_ACTIVE_SB 0x01
822 #define SET_CONSOLE_INPUT_INFO_TITLE 0x02
823 #define SET_CONSOLE_INPUT_INFO_HISTORY_MODE 0x04
824 #define SET_CONSOLE_INPUT_INFO_HISTORY_SIZE 0x08
825 #define SET_CONSOLE_INPUT_INFO_EDITION_MODE 0x10
828 /* Get info about a console (input only) */
829 @REQ(get_console_input_info)
830 obj_handle_t handle; /* handle to console input, or 0 for process' console */
832 int history_mode; /* whether we duplicate lines in history */
833 int history_size; /* number of lines in history */
834 int history_index; /* number of used lines in history */
835 int edition_mode; /* index to the edition mode flavors */
836 VARARG(title,unicode_str); /* console title */
840 /* appends a string to console's history */
841 @REQ(append_console_input_history)
842 obj_handle_t handle; /* handle to console input, or 0 for process' console */
843 VARARG(line,unicode_str); /* line to add */
847 /* appends a string to console's history */
848 @REQ(get_console_input_history)
849 obj_handle_t handle; /* handle to console input, or 0 for process' console */
850 int index; /* index to get line from */
852 int total; /* total length of line in Unicode chars */
853 VARARG(line,unicode_str); /* line to add */
857 /* creates a new screen buffer on process' console */
858 @REQ(create_console_output)
859 obj_handle_t handle_in; /* handle to console input, or 0 for process' console */
860 int access; /* wanted access rights */
861 int share; /* sharing credentials */
862 int inherit; /* inherit flag */
864 obj_handle_t handle_out; /* handle to the screen buffer */
868 /* Set info about a console (output only) */
869 @REQ(set_console_output_info)
870 obj_handle_t handle; /* handle to the console */
871 int mask; /* setting mask (see below) */
872 short int cursor_size; /* size of cursor (percentage filled) */
873 short int cursor_visible;/* cursor visibility flag */
874 short int cursor_x; /* position of cursor (x, y) */
876 short int width; /* width of the screen buffer */
877 short int height; /* height of the screen buffer */
878 short int attr; /* default attribute */
879 short int win_left; /* window actually displayed by renderer */
880 short int win_top; /* the rect area is expressed withing the */
881 short int win_right; /* boundaries of the screen buffer */
882 short int win_bottom;
883 short int max_width; /* maximum size (width x height) for the window */
884 short int max_height;
886 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_GEOM 0x01
887 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_POS 0x02
888 #define SET_CONSOLE_OUTPUT_INFO_SIZE 0x04
889 #define SET_CONSOLE_OUTPUT_INFO_ATTR 0x08
890 #define SET_CONSOLE_OUTPUT_INFO_DISPLAY_WINDOW 0x10
891 #define SET_CONSOLE_OUTPUT_INFO_MAX_SIZE 0x20
894 /* Get info about a console (output only) */
895 @REQ(get_console_output_info)
896 obj_handle_t handle; /* handle to the console */
898 short int cursor_size; /* size of cursor (percentage filled) */
899 short int cursor_visible;/* cursor visibility flag */
900 short int cursor_x; /* position of cursor (x, y) */
902 short int width; /* width of the screen buffer */
903 short int height; /* height of the screen buffer */
904 short int attr; /* default attribute */
905 short int win_left; /* window actually displayed by renderer */
906 short int win_top; /* the rect area is expressed withing the */
907 short int win_right; /* boundaries of the screen buffer */
908 short int win_bottom;
909 short int max_width; /* maximum size (width x height) for the window */
910 short int max_height;
913 /* Add input records to a console input queue */
914 @REQ(write_console_input)
915 obj_handle_t handle; /* handle to the console input */
916 VARARG(rec,input_records); /* input records */
918 int written; /* number of records written */
922 /* Fetch input records from a console input queue */
923 @REQ(read_console_input)
924 obj_handle_t handle; /* handle to the console input */
925 int flush; /* flush the retrieved records from the queue? */
927 int read; /* number of records read */
928 VARARG(rec,input_records); /* input records */
932 /* write data (chars and/or attributes) in a screen buffer */
933 @REQ(write_console_output)
934 obj_handle_t handle; /* handle to the console output */
935 int x; /* position where to start writing */
937 int mode; /* char info (see below) */
938 int wrap; /* wrap around at end of line? */
939 VARARG(data,bytes); /* info to write */
941 int written; /* number of char infos actually written */
942 int width; /* width of screen buffer */
943 int height; /* height of screen buffer */
947 CHAR_INFO_MODE_TEXT, /* characters only */
948 CHAR_INFO_MODE_ATTR, /* attributes only */
949 CHAR_INFO_MODE_TEXTATTR, /* both characters and attributes */
950 CHAR_INFO_MODE_TEXTSTDATTR /* characters but use standard attributes */
954 /* fill a screen buffer with constant data (chars and/or attributes) */
955 @REQ(fill_console_output)
956 obj_handle_t handle; /* handle to the console output */
957 int x; /* position where to start writing */
959 int mode; /* char info mode */
960 int count; /* number to write */
961 int wrap; /* wrap around at end of line? */
962 char_info_t data; /* data to write */
964 int written; /* number of char infos actually written */
968 /* read data (chars and/or attributes) from a screen buffer */
969 @REQ(read_console_output)
970 obj_handle_t handle; /* handle to the console output */
971 int x; /* position (x,y) where to start reading */
973 int mode; /* char info mode */
974 int wrap; /* wrap around at end of line? */
976 int width; /* width of screen buffer */
977 int height; /* height of screen buffer */
982 /* move a rect (of data) in screen buffer content */
983 @REQ(move_console_output)
984 obj_handle_t handle; /* handle to the console output */
985 short int x_src; /* position (x, y) of rect to start moving from */
987 short int x_dst; /* position (x, y) of rect to move to */
989 short int w; /* size of the rect (width, height) to move */
994 /* Sends a signal to a process group */
995 @REQ(send_console_signal)
996 int signal; /* the signal to send */
997 process_id_t group_id; /* the group to send the signal to */
1001 /* Create a change notification */
1002 @REQ(create_change_notification)
1003 obj_handle_t handle; /* handle to the directory */
1004 int subtree; /* watch all the subtree */
1005 unsigned int filter; /* notification filter */
1007 obj_handle_t handle; /* handle to the change notification */
1011 /* Move to the next change notification */
1012 @REQ(next_change_notification)
1013 obj_handle_t handle; /* handle to the change notification */
1016 /* Create a file mapping */
1017 @REQ(create_mapping)
1018 int size_high; /* mapping size */
1019 int size_low; /* mapping size */
1020 int protect; /* protection flags (see below) */
1021 unsigned int access; /* wanted access rights */
1022 int inherit; /* inherit flag */
1023 obj_handle_t file_handle; /* file handle */
1024 VARARG(name,unicode_str); /* object name */
1026 obj_handle_t handle; /* handle to the mapping */
1028 /* protection flags */
1029 #define VPROT_READ 0x01
1030 #define VPROT_WRITE 0x02
1031 #define VPROT_EXEC 0x04
1032 #define VPROT_WRITECOPY 0x08
1033 #define VPROT_GUARD 0x10
1034 #define VPROT_NOCACHE 0x20
1035 #define VPROT_COMMITTED 0x40
1036 #define VPROT_IMAGE 0x80
1039 /* Open a mapping */
1041 unsigned int access; /* wanted access rights */
1042 int inherit; /* inherit flag */
1043 VARARG(name,unicode_str); /* object name */
1045 obj_handle_t handle; /* handle to the mapping */
1049 /* Get information about a file mapping */
1050 @REQ(get_mapping_info)
1051 obj_handle_t handle; /* handle to the mapping */
1053 int size_high; /* mapping size */
1054 int size_low; /* mapping size */
1055 int protect; /* protection flags */
1056 int header_size; /* header size (for VPROT_IMAGE mapping) */
1057 void* base; /* default base addr (for VPROT_IMAGE mapping) */
1058 obj_handle_t shared_file; /* shared mapping file handle */
1059 int shared_size; /* shared mapping size */
1063 #define SNAP_HEAPLIST 0x00000001
1064 #define SNAP_PROCESS 0x00000002
1065 #define SNAP_THREAD 0x00000004
1066 #define SNAP_MODULE 0x00000008
1067 /* Create a snapshot */
1068 @REQ(create_snapshot)
1069 int inherit; /* inherit flag */
1070 int flags; /* snapshot flags (SNAP_*) */
1071 process_id_t pid; /* process id */
1073 obj_handle_t handle; /* handle to the snapshot */
1077 /* Get the next process from a snapshot */
1079 obj_handle_t handle; /* handle to the snapshot */
1080 int reset; /* reset snapshot position? */
1082 int count; /* process usage count */
1083 process_id_t pid; /* process id */
1084 process_id_t ppid; /* parent process id */
1085 void* heap; /* heap base */
1086 void* module; /* main module */
1087 int threads; /* number of threads */
1088 int priority; /* process priority */
1089 int handles; /* number of handles */
1090 VARARG(filename,unicode_str); /* file name of main exe */
1094 /* Get the next thread from a snapshot */
1096 obj_handle_t handle; /* handle to the snapshot */
1097 int reset; /* reset snapshot position? */
1099 int count; /* thread usage count */
1100 process_id_t pid; /* process id */
1101 thread_id_t tid; /* thread id */
1102 int base_pri; /* base priority */
1103 int delta_pri; /* delta priority */
1107 /* Get the next module from a snapshot */
1109 obj_handle_t handle; /* handle to the snapshot */
1110 int reset; /* reset snapshot position? */
1112 process_id_t pid; /* process id */
1113 void* base; /* module base address */
1114 size_t size; /* module size */
1115 VARARG(filename,unicode_str); /* file name of module */
1119 /* Wait for a debug event */
1120 @REQ(wait_debug_event)
1121 int get_handle; /* should we alloc a handle for waiting? */
1123 process_id_t pid; /* process id */
1124 thread_id_t tid; /* thread id */
1125 obj_handle_t wait; /* wait handle if no event ready */
1126 VARARG(event,debug_event); /* debug event data */
1130 /* Queue an exception event */
1131 @REQ(queue_exception_event)
1132 int first; /* first chance exception? */
1133 VARARG(record,exc_event); /* thread context followed by exception record */
1135 obj_handle_t handle; /* handle to the queued event */
1139 /* Retrieve the status of an exception event */
1140 @REQ(get_exception_status)
1141 obj_handle_t handle; /* handle to the queued event */
1143 int status; /* event continuation status */
1144 VARARG(context,context); /* modified thread context */
1148 /* Send an output string to the debugger */
1149 @REQ(output_debug_string)
1150 void* string; /* string to display (in debugged process address space) */
1151 int unicode; /* is it Unicode? */
1152 int length; /* string length */
1156 /* Continue a debug event */
1157 @REQ(continue_debug_event)
1158 process_id_t pid; /* process id to continue */
1159 thread_id_t tid; /* thread id to continue */
1160 int status; /* continuation status */
1164 /* Start/stop debugging an existing process */
1166 process_id_t pid; /* id of the process to debug */
1167 int attach; /* 1=attaching / 0=detaching from the process */
1171 /* Simulate a breakpoint in a process */
1173 obj_handle_t handle; /* process handle */
1175 int self; /* was it the caller itself? */
1179 /* Set debugger kill on exit flag */
1180 @REQ(set_debugger_kill_on_exit)
1181 int kill_on_exit; /* 0=detach/1=kill debuggee when debugger dies */
1185 /* Read data from a process address space */
1186 @REQ(read_process_memory)
1187 obj_handle_t handle; /* process handle */
1188 void* addr; /* addr to read from */
1190 VARARG(data,bytes); /* result data */
1194 /* Write data to a process address space */
1195 @REQ(write_process_memory)
1196 obj_handle_t handle; /* process handle */
1197 void* addr; /* addr to write to (must be int-aligned) */
1198 unsigned int first_mask; /* mask for first word */
1199 unsigned int last_mask; /* mask for last word */
1200 VARARG(data,bytes); /* data to write */
1204 /* Create a registry key */
1206 obj_handle_t parent; /* handle to the parent key */
1207 unsigned int access; /* desired access rights */
1208 unsigned int options; /* creation options */
1209 time_t modif; /* last modification time */
1210 size_t namelen; /* length of key name in bytes */
1211 VARARG(name,unicode_str,namelen); /* key name */
1212 VARARG(class,unicode_str); /* class name */
1214 obj_handle_t hkey; /* handle to the created key */
1215 int created; /* has it been newly created? */
1218 /* Open a registry key */
1220 obj_handle_t parent; /* handle to the parent key */
1221 unsigned int access; /* desired access rights */
1222 VARARG(name,unicode_str); /* key name */
1224 obj_handle_t hkey; /* handle to the open key */
1228 /* Delete a registry key */
1230 obj_handle_t hkey; /* handle to the key */
1234 /* Flush a registry key */
1236 obj_handle_t hkey; /* handle to the key */
1240 /* Enumerate registry subkeys */
1242 obj_handle_t hkey; /* handle to registry key */
1243 int index; /* index of subkey (or -1 for current key) */
1244 int info_class; /* requested information class */
1246 int subkeys; /* number of subkeys */
1247 int max_subkey; /* longest subkey name */
1248 int max_class; /* longest class name */
1249 int values; /* number of values */
1250 int max_value; /* longest value name */
1251 int max_data; /* longest value data */
1252 time_t modif; /* last modification time */
1253 size_t total; /* total length needed for full name and class */
1254 size_t namelen; /* length of key name in bytes */
1255 VARARG(name,unicode_str,namelen); /* key name */
1256 VARARG(class,unicode_str); /* class name */
1260 /* Set a value of a registry key */
1262 obj_handle_t hkey; /* handle to registry key */
1263 int type; /* value type */
1264 size_t namelen; /* length of value name in bytes */
1265 VARARG(name,unicode_str,namelen); /* value name */
1266 VARARG(data,bytes); /* value data */
1270 /* Retrieve the value of a registry key */
1272 obj_handle_t hkey; /* handle to registry key */
1273 VARARG(name,unicode_str); /* value name */
1275 int type; /* value type */
1276 size_t total; /* total length needed for data */
1277 VARARG(data,bytes); /* value data */
1281 /* Enumerate a value of a registry key */
1282 @REQ(enum_key_value)
1283 obj_handle_t hkey; /* handle to registry key */
1284 int index; /* value index */
1285 int info_class; /* requested information class */
1287 int type; /* value type */
1288 size_t total; /* total length needed for full name and data */
1289 size_t namelen; /* length of value name in bytes */
1290 VARARG(name,unicode_str,namelen); /* value name */
1291 VARARG(data,bytes); /* value data */
1295 /* Delete a value of a registry key */
1296 @REQ(delete_key_value)
1297 obj_handle_t hkey; /* handle to registry key */
1298 VARARG(name,unicode_str); /* value name */
1302 /* Load a registry branch from a file */
1304 obj_handle_t hkey; /* root key to load to */
1305 obj_handle_t file; /* file to load from */
1306 VARARG(name,unicode_str); /* subkey name */
1310 /* UnLoad a registry branch from a file */
1311 @REQ(unload_registry)
1312 obj_handle_t hkey; /* root key to unload to */
1316 /* Save a registry branch to a file */
1318 obj_handle_t hkey; /* key to save */
1319 obj_handle_t file; /* file to save to */
1323 /* Save a registry branch at server exit */
1324 @REQ(save_registry_atexit)
1325 obj_handle_t hkey; /* key to save */
1326 VARARG(file,string); /* file to save to */
1330 /* Set the current and saving level for the registry */
1331 @REQ(set_registry_levels)
1332 int current; /* new current level */
1333 int saving; /* new saving level */
1334 int period; /* duration between periodic saves (milliseconds) */
1338 @REQ(set_registry_notification)
1339 obj_handle_t hkey; /* key to watch for changes */
1340 obj_handle_t event; /* event to set */
1341 int subtree; /* should we watch the whole subtree? */
1342 unsigned int filter; /* things to watch */
1346 /* Create a waitable timer */
1348 int inherit; /* inherit flag */
1349 int manual; /* manual reset */
1350 VARARG(name,unicode_str); /* object name */
1352 obj_handle_t handle; /* handle to the timer */
1356 /* Open a waitable timer */
1358 unsigned int access; /* wanted access rights */
1359 int inherit; /* inherit flag */
1360 VARARG(name,unicode_str); /* object name */
1362 obj_handle_t handle; /* handle to the timer */
1365 /* Set a waitable timer */
1367 obj_handle_t handle; /* handle to the timer */
1368 abs_time_t expire; /* next expiration absolute time */
1369 int period; /* timer period in ms */
1370 void* callback; /* callback function */
1371 void* arg; /* callback argument */
1373 int signaled; /* was the timer signaled before this call ? */
1376 /* Cancel a waitable timer */
1378 obj_handle_t handle; /* handle to the timer */
1380 int signaled; /* was the timer signaled before this calltime ? */
1384 /* Retrieve the current context of a thread */
1385 @REQ(get_thread_context)
1386 obj_handle_t handle; /* thread handle */
1387 unsigned int flags; /* context flags */
1389 VARARG(context,context); /* thread context */
1393 /* Set the current context of a thread */
1394 @REQ(set_thread_context)
1395 obj_handle_t handle; /* thread handle */
1396 unsigned int flags; /* context flags */
1397 VARARG(context,context); /* thread context */
1401 /* Fetch a selector entry for a thread */
1402 @REQ(get_selector_entry)
1403 obj_handle_t handle; /* thread handle */
1404 int entry; /* LDT entry */
1406 unsigned int base; /* selector base */
1407 unsigned int limit; /* selector limit */
1408 unsigned char flags; /* selector flags */
1414 int local; /* is atom in local process table? */
1415 VARARG(name,unicode_str); /* atom name */
1417 atom_t atom; /* resulting atom */
1421 /* Delete an atom */
1423 atom_t atom; /* atom handle */
1424 int local; /* is atom in local process table? */
1430 int local; /* is atom in local process table? */
1431 VARARG(name,unicode_str); /* atom name */
1433 atom_t atom; /* atom handle */
1437 /* Get an atom name */
1439 atom_t atom; /* atom handle */
1440 int local; /* is atom in local process table? */
1442 int count; /* atom lock count */
1443 VARARG(name,unicode_str); /* atom name */
1447 /* Init the process atom table */
1448 @REQ(init_atom_table)
1449 int entries; /* number of entries */
1453 /* Get the message queue of the current thread */
1456 obj_handle_t handle; /* handle to the queue */
1460 /* Set the current message queue wakeup mask */
1461 @REQ(set_queue_mask)
1462 unsigned int wake_mask; /* wakeup bits mask */
1463 unsigned int changed_mask; /* changed bits mask */
1464 int skip_wait; /* will we skip waiting if signaled? */
1466 unsigned int wake_bits; /* current wake bits */
1467 unsigned int changed_bits; /* current changed bits */
1471 /* Get the current message queue status */
1472 @REQ(get_queue_status)
1473 int clear; /* should we clear the change bits? */
1475 unsigned int wake_bits; /* wake bits */
1476 unsigned int changed_bits; /* changed bits since last time */
1480 /* Wait for a process to start waiting on input */
1481 @REQ(wait_input_idle)
1482 obj_handle_t handle; /* process handle */
1483 int timeout; /* timeout */
1485 obj_handle_t event; /* handle to idle event */
1489 /* Send a message to a thread queue */
1491 thread_id_t id; /* thread id */
1492 int type; /* message type (see below) */
1493 int flags; /* message flags (see below) */
1494 user_handle_t win; /* window handle */
1495 unsigned int msg; /* message code */
1496 unsigned int wparam; /* parameters */
1497 unsigned int lparam; /* parameters */
1498 int x; /* x position */
1499 int y; /* y position */
1500 unsigned int time; /* message time */
1501 unsigned int info; /* extra info */
1502 int timeout; /* timeout for reply */
1503 void* callback; /* callback address */
1504 VARARG(data,bytes); /* message data for sent messages */
1509 MSG_ASCII, /* Ascii message (from SendMessageA) */
1510 MSG_UNICODE, /* Unicode message (from SendMessageW) */
1511 MSG_NOTIFY, /* notify message (from SendNotifyMessageW), always Unicode */
1512 MSG_CALLBACK, /* callback message (from SendMessageCallbackW), always Unicode */
1513 MSG_CALLBACK_RESULT,/* result of a callback message */
1514 MSG_OTHER_PROCESS, /* sent from other process, may include vararg data, always Unicode */
1515 MSG_POSTED, /* posted message (from PostMessageW), always Unicode */
1516 MSG_HARDWARE /* hardware message */
1518 #define SEND_MSG_ABORT_IF_HUNG 0x01
1521 /* Get a message from the current queue */
1523 int flags; /* see below */
1524 user_handle_t get_win; /* window handle to get */
1525 unsigned int get_first; /* first message code to get */
1526 unsigned int get_last; /* last message code to get */
1528 int type; /* message type */
1529 user_handle_t win; /* window handle */
1530 unsigned int msg; /* message code */
1531 unsigned int wparam; /* parameters (callback function for MSG_CALLBACK_RESULT) */
1532 unsigned int lparam; /* parameters (result for MSG_CALLBACK_RESULT) */
1533 int x; /* x position */
1534 int y; /* y position */
1535 unsigned int time; /* message time */
1536 unsigned int info; /* extra info (callback argument for MSG_CALLBACK_RESULT) */
1537 size_t total; /* total size of extra data */
1538 VARARG(data,bytes); /* message data for sent messages */
1540 #define GET_MSG_REMOVE 1 /* remove the message */
1541 #define GET_MSG_SENT_ONLY 2 /* only get sent messages */
1543 /* Reply to a sent message */
1545 int type; /* type of original message */
1546 unsigned int result; /* message result */
1547 int remove; /* should we remove the message? */
1548 VARARG(data,bytes); /* message data for sent messages */
1552 /* Retrieve the reply for the last message sent */
1553 @REQ(get_message_reply)
1554 int cancel; /* cancel message if not ready? */
1556 unsigned int result; /* message result */
1557 VARARG(data,bytes); /* message data for sent messages */
1561 /* Set a window timer */
1563 user_handle_t win; /* window handle */
1564 unsigned int msg; /* message to post */
1565 unsigned int id; /* timer id */
1566 unsigned int rate; /* timer rate in ms */
1567 unsigned int lparam; /* message lparam (callback proc) */
1571 /* Kill a window timer */
1572 @REQ(kill_win_timer)
1573 user_handle_t win; /* window handle */
1574 unsigned int msg; /* message to post */
1575 unsigned int id; /* timer id */
1579 /* Retrieve info about a serial port */
1580 @REQ(get_serial_info)
1581 obj_handle_t handle; /* handle to comm port */
1583 unsigned int readinterval;
1584 unsigned int readconst;
1585 unsigned int readmult;
1586 unsigned int writeconst;
1587 unsigned int writemult;
1588 unsigned int eventmask;
1589 unsigned int commerror;
1593 /* Set info about a serial port */
1594 @REQ(set_serial_info)
1595 obj_handle_t handle; /* handle to comm port */
1596 int flags; /* bitmask to set values (see below) */
1597 unsigned int readinterval;
1598 unsigned int readconst;
1599 unsigned int readmult;
1600 unsigned int writeconst;
1601 unsigned int writemult;
1602 unsigned int eventmask;
1603 unsigned int commerror;
1605 #define SERIALINFO_SET_TIMEOUTS 0x01
1606 #define SERIALINFO_SET_MASK 0x02
1607 #define SERIALINFO_SET_ERROR 0x04
1610 /* Create / reschedule an async I/O */
1611 @REQ(register_async)
1612 obj_handle_t handle; /* handle to comm port, socket or file */
1616 unsigned int status;
1618 #define ASYNC_TYPE_NONE 0x00
1619 #define ASYNC_TYPE_READ 0x01
1620 #define ASYNC_TYPE_WRITE 0x02
1621 #define ASYNC_TYPE_WAIT 0x03
1624 /* Create a named pipe */
1625 @REQ(create_named_pipe)
1626 unsigned int openmode;
1627 unsigned int pipemode;
1628 unsigned int maxinstances;
1629 unsigned int outsize;
1630 unsigned int insize;
1631 unsigned int timeout;
1632 int inherit; /* inherit flag */
1633 VARARG(name,unicode_str); /* pipe name */
1635 obj_handle_t handle; /* handle to the pipe */
1639 /* Open an existing named pipe */
1640 @REQ(open_named_pipe)
1641 unsigned int access;
1642 int inherit; /* inherit flag */
1643 VARARG(name,unicode_str); /* pipe name */
1645 obj_handle_t handle; /* handle to the pipe */
1649 /* Connect to a named pipe */
1650 @REQ(connect_named_pipe)
1651 obj_handle_t handle;
1657 /* Wait for a named pipe */
1658 @REQ(wait_named_pipe)
1659 unsigned int timeout;
1662 VARARG(name,unicode_str); /* pipe name */
1666 /* Disconnect a named pipe */
1667 @REQ(disconnect_named_pipe)
1668 obj_handle_t handle;
1670 int fd; /* associated fd to close */
1674 @REQ(get_named_pipe_info)
1675 obj_handle_t handle;
1678 unsigned int maxinstances;
1679 unsigned int outsize;
1680 unsigned int insize;
1686 unsigned int tree_id;
1687 unsigned int user_id;
1688 unsigned int file_id;
1689 unsigned int dialect;
1691 obj_handle_t handle;
1696 obj_handle_t handle;
1698 unsigned int offset;
1700 unsigned int tree_id;
1701 unsigned int user_id;
1702 unsigned int dialect;
1703 unsigned int file_id;
1704 unsigned int offset;
1706 #define SMBINFO_SET_OFFSET 0x01
1709 /* Create a window */
1711 user_handle_t parent; /* parent window */
1712 user_handle_t owner; /* owner window */
1713 atom_t atom; /* class atom */
1714 void* instance; /* module instance */
1716 user_handle_t handle; /* created window */
1717 int extra; /* number of extra bytes */
1718 void* class_ptr; /* pointer to class in client address space */
1722 /* Link a window into the tree */
1724 user_handle_t handle; /* handle to the window */
1725 user_handle_t parent; /* handle to the parent */
1726 user_handle_t previous; /* previous child in Z-order */
1728 user_handle_t full_parent; /* full handle of new parent */
1732 /* Destroy a window */
1733 @REQ(destroy_window)
1734 user_handle_t handle; /* handle to the window */
1738 /* Set a window owner */
1739 @REQ(set_window_owner)
1740 user_handle_t handle; /* handle to the window */
1741 user_handle_t owner; /* new owner */
1743 user_handle_t full_owner; /* full handle of new owner */
1744 user_handle_t prev_owner; /* full handle of previous owner */
1748 /* Get information from a window handle */
1749 @REQ(get_window_info)
1750 user_handle_t handle; /* handle to the window */
1752 user_handle_t full_handle; /* full 32-bit handle */
1753 user_handle_t last_active; /* last active popup */
1754 process_id_t pid; /* process owning the window */
1755 thread_id_t tid; /* thread owning the window */
1756 atom_t atom; /* class atom */
1760 /* Set some information in a window */
1761 @REQ(set_window_info)
1762 user_handle_t handle; /* handle to the window */
1763 unsigned int flags; /* flags for fields to set (see below) */
1764 unsigned int style; /* window style */
1765 unsigned int ex_style; /* window extended style */
1766 unsigned int id; /* window id */
1767 void* instance; /* creator instance */
1768 void* user_data; /* user-specific data */
1769 int extra_offset; /* offset to set in extra bytes */
1770 size_t extra_size; /* size to set in extra bytes */
1771 unsigned int extra_value; /* value to set in extra bytes */
1773 unsigned int old_style; /* old window style */
1774 unsigned int old_ex_style; /* old window extended style */
1775 unsigned int old_id; /* old window id */
1776 void* old_instance; /* old creator instance */
1777 void* old_user_data; /* old user-specific data */
1778 unsigned int old_extra_value; /* old value in extra bytes */
1780 #define SET_WIN_STYLE 0x01
1781 #define SET_WIN_EXSTYLE 0x02
1782 #define SET_WIN_ID 0x04
1783 #define SET_WIN_INSTANCE 0x08
1784 #define SET_WIN_USERDATA 0x10
1785 #define SET_WIN_EXTRA 0x20
1788 /* Get a list of the window parents, up to the root of the tree */
1789 @REQ(get_window_parents)
1790 user_handle_t handle; /* handle to the window */
1792 int count; /* total count of parents */
1793 VARARG(parents,user_handles); /* parent handles */
1797 /* Get a list of the window children */
1798 @REQ(get_window_children)
1799 user_handle_t parent; /* parent window */
1800 atom_t atom; /* class atom for the listed children */
1801 thread_id_t tid; /* thread owning the listed children */
1803 int count; /* total count of children */
1804 VARARG(children,user_handles); /* children handles */
1808 /* Get window tree information from a window handle */
1809 @REQ(get_window_tree)
1810 user_handle_t handle; /* handle to the window */
1812 user_handle_t parent; /* parent window */
1813 user_handle_t owner; /* owner window */
1814 user_handle_t next_sibling; /* next sibling in Z-order */
1815 user_handle_t prev_sibling; /* prev sibling in Z-order */
1816 user_handle_t first_sibling; /* first sibling in Z-order */
1817 user_handle_t last_sibling; /* last sibling in Z-order */
1818 user_handle_t first_child; /* first child */
1819 user_handle_t last_child; /* last child */
1822 /* Set the window and client rectangles of a window */
1823 @REQ(set_window_rectangles)
1824 user_handle_t handle; /* handle to the window */
1825 rectangle_t window; /* window rectangle */
1826 rectangle_t client; /* client rectangle */
1830 /* Get the window and client rectangles of a window */
1831 @REQ(get_window_rectangles)
1832 user_handle_t handle; /* handle to the window */
1834 rectangle_t window; /* window rectangle */
1835 rectangle_t client; /* client rectangle */
1839 /* Get the window text */
1840 @REQ(get_window_text)
1841 user_handle_t handle; /* handle to the window */
1843 VARARG(text,unicode_str); /* window text */
1847 /* Set the window text */
1848 @REQ(set_window_text)
1849 user_handle_t handle; /* handle to the window */
1850 VARARG(text,unicode_str); /* window text */
1854 /* Increment the window paint count */
1855 @REQ(inc_window_paint_count)
1856 user_handle_t handle; /* handle to the window */
1857 int incr; /* increment (can be negative) */
1861 /* Get the coordinates offset between two windows */
1862 @REQ(get_windows_offset)
1863 user_handle_t from; /* handle to the first window */
1864 user_handle_t to; /* handle to the second window */
1866 int x; /* x coordinate offset */
1867 int y; /* y coordinate offset */
1871 /* Set a window property */
1872 @REQ(set_window_property)
1873 user_handle_t window; /* handle to the window */
1874 atom_t atom; /* property atom (high-word set if it was a string) */
1875 int string; /* was atom a string originally? */
1876 obj_handle_t handle; /* handle to store */
1880 /* Remove a window property */
1881 @REQ(remove_window_property)
1882 user_handle_t window; /* handle to the window */
1883 atom_t atom; /* property atom */
1885 obj_handle_t handle; /* handle stored in property */
1889 /* Get a window property */
1890 @REQ(get_window_property)
1891 user_handle_t window; /* handle to the window */
1892 atom_t atom; /* property atom */
1894 obj_handle_t handle; /* handle stored in property */
1898 /* Get the list of properties of a window */
1899 @REQ(get_window_properties)
1900 user_handle_t window; /* handle to the window */
1902 int total; /* total number of properties */
1903 VARARG(props,properties); /* list of properties */
1907 /* Attach (or detach) thread inputs */
1908 @REQ(attach_thread_input)
1909 thread_id_t tid_from; /* thread to be attached */
1910 thread_id_t tid_to; /* thread to which tid_from should be attached */
1911 int attach; /* is it an attach? */
1915 /* Get input data for a given thread */
1916 @REQ(get_thread_input)
1917 thread_id_t tid; /* id of thread */
1919 user_handle_t focus; /* handle to the focus window */
1920 user_handle_t capture; /* handle to the capture window */
1921 user_handle_t active; /* handle to the active window */
1922 user_handle_t foreground; /* handle to the global foreground window */
1923 user_handle_t menu_owner; /* handle to the menu owner */
1924 user_handle_t move_size; /* handle to the moving/resizing window */
1925 user_handle_t caret; /* handle to the caret window */
1926 rectangle_t rect; /* caret rectangle */
1929 /* Retrieve queue keyboard state for a given thread */
1931 thread_id_t tid; /* id of thread */
1932 int key; /* optional key code or -1 */
1934 unsigned char state; /* state of specified key */
1935 VARARG(keystate,bytes); /* state array for all the keys */
1938 /* Set queue keyboard state for a given thread */
1940 thread_id_t tid; /* id of thread */
1941 VARARG(keystate,bytes); /* state array for all the keys */
1944 /* Set the system foreground window */
1945 @REQ(set_foreground_window)
1946 user_handle_t handle; /* handle to the foreground window */
1948 user_handle_t previous; /* handle to the previous foreground window */
1949 int send_msg_old; /* whether we have to send a msg to the old window */
1950 int send_msg_new; /* whether we have to send a msg to the new window */
1953 /* Set the current thread focus window */
1954 @REQ(set_focus_window)
1955 user_handle_t handle; /* handle to the focus window */
1957 user_handle_t previous; /* handle to the previous focus window */
1960 /* Set the current thread active window */
1961 @REQ(set_active_window)
1962 user_handle_t handle; /* handle to the active window */
1964 user_handle_t previous; /* handle to the previous active window */
1967 /* Set the current thread capture window */
1968 @REQ(set_capture_window)
1969 user_handle_t handle; /* handle to the capture window */
1970 unsigned int flags; /* capture flags (see below) */
1972 user_handle_t previous; /* handle to the previous capture window */
1973 user_handle_t full_handle; /* full 32-bit handle of new capture window */
1975 #define CAPTURE_MENU 0x01 /* capture is for a menu */
1976 #define CAPTURE_MOVESIZE 0x02 /* capture is for moving/resizing */
1979 /* Set the current thread caret window */
1980 @REQ(set_caret_window)
1981 user_handle_t handle; /* handle to the caret window */
1982 int width; /* caret width */
1983 int height; /* caret height */
1985 user_handle_t previous; /* handle to the previous caret window */
1986 rectangle_t old_rect; /* previous caret rectangle */
1987 int old_hide; /* previous hide count */
1988 int old_state; /* previous caret state (1=on, 0=off) */
1992 /* Set the current thread caret information */
1993 @REQ(set_caret_info)
1994 unsigned int flags; /* caret flags (see below) */
1995 user_handle_t handle; /* handle to the caret window */
1996 int x; /* caret x position */
1997 int y; /* caret y position */
1998 int hide; /* increment for hide count (can be negative to show it) */
1999 int state; /* caret state (1=on, 0=off, -1=toggle current state) */
2001 user_handle_t full_handle; /* handle to the current caret window */
2002 rectangle_t old_rect; /* previous caret rectangle */
2003 int old_hide; /* previous hide count */
2004 int old_state; /* previous caret state (1=on, 0=off) */
2006 #define SET_CARET_POS 0x01 /* set the caret position from x,y */
2007 #define SET_CARET_HIDE 0x02 /* increment the caret hide count */
2008 #define SET_CARET_STATE 0x04 /* set the caret on/off state */
2011 /* Set a window hook */
2013 int id; /* id of the hook */
2014 thread_id_t tid; /* id of thread to set the hook into */
2015 void* proc; /* hook procedure */
2016 int unicode; /* is it a unicode hook? */
2017 VARARG(module,unicode_str); /* module name */
2019 user_handle_t handle; /* handle to the hook */
2023 /* Remove a window hook */
2025 user_handle_t handle; /* handle to the hook */
2026 int id; /* id of the hook if handle is 0 */
2027 void* proc; /* hook procedure if handle is 0 */
2031 /* Start calling a hook chain */
2032 @REQ(start_hook_chain)
2033 int id; /* id of the hook */
2035 user_handle_t handle; /* handle to the next hook */
2036 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2037 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2038 void* proc; /* hook procedure */
2039 int unicode; /* is it a unicode hook? */
2040 VARARG(module,unicode_str); /* module name */
2044 /* Finished calling a hook chain */
2045 @REQ(finish_hook_chain)
2046 int id; /* id of the hook */
2050 /* Get the next hook to call */
2052 user_handle_t handle; /* handle to the current hook */
2054 user_handle_t next; /* handle to the next hook */
2055 int id; /* id of the next hook */
2056 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2057 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2058 void* proc; /* next hook procedure */
2059 int prev_unicode; /* was the previous a unicode hook? */
2060 int next_unicode; /* is the next a unicode hook? */
2061 VARARG(module,unicode_str); /* module name */
2065 /* Create a window class */
2067 int local; /* is it a local class? */
2068 atom_t atom; /* class atom */
2069 unsigned int style; /* class style */
2070 void* instance; /* module instance */
2071 int extra; /* number of extra class bytes */
2072 int win_extra; /* number of window extra bytes */
2073 void* client_ptr; /* pointer to class in client address space */
2077 /* Destroy a window class */
2079 atom_t atom; /* class atom */
2080 void* instance; /* module instance */
2082 void* client_ptr; /* pointer to class in client address space */
2086 /* Set some information in a class */
2087 @REQ(set_class_info)
2088 user_handle_t window; /* handle to the window */
2089 unsigned int flags; /* flags for info to set (see below) */
2090 atom_t atom; /* class atom */
2091 unsigned int style; /* class style */
2092 int win_extra; /* number of window extra bytes */
2093 void* instance; /* module instance */
2094 int extra_offset; /* offset to set in extra bytes */
2095 size_t extra_size; /* size to set in extra bytes */
2096 unsigned int extra_value; /* value to set in extra bytes */
2098 atom_t old_atom; /* previous class atom */
2099 unsigned int old_style; /* previous class style */
2100 int old_extra; /* previous number of class extra bytes */
2101 int old_win_extra; /* previous number of window extra bytes */
2102 void* old_instance; /* previous module instance */
2103 unsigned int old_extra_value; /* old value in extra bytes */
2105 #define SET_CLASS_ATOM 0x0001
2106 #define SET_CLASS_STYLE 0x0002
2107 #define SET_CLASS_WINEXTRA 0x0004
2108 #define SET_CLASS_INSTANCE 0x0008
2109 #define SET_CLASS_EXTRA 0x0010
2112 /* Set/get clipboard information */
2113 @REQ(set_clipboard_info)
2114 unsigned int flags; /* flags for fields to set (see below) */
2115 user_handle_t clipboard; /* clipboard window */
2116 user_handle_t owner; /* clipboard owner */
2117 user_handle_t viewer; /* first clipboard viewer */
2118 unsigned int seqno; /* change sequence number */
2120 unsigned int flags; /* status flags (see below) */
2121 user_handle_t old_clipboard; /* old clipboard window */
2122 user_handle_t old_owner; /* old clipboard owner */
2123 user_handle_t old_viewer; /* old clipboard viewer */
2124 unsigned int seqno; /* current sequence number */
2127 #define SET_CB_OPEN 0x001
2128 #define SET_CB_OWNER 0x002
2129 #define SET_CB_VIEWER 0x004
2130 #define SET_CB_SEQNO 0x008
2131 #define SET_CB_RELOWNER 0x010
2132 #define SET_CB_CLOSE 0x020
2133 #define CB_OPEN 0x040
2134 #define CB_OWNER 0x080
2137 /* Open a security token */
2139 obj_handle_t handle; /* handle to the thread or process */
2140 unsigned int flags; /* flags (see below) */
2142 obj_handle_t token; /* handle to the token */
2144 #define OPEN_TOKEN_THREAD 1
2145 #define OPEN_TOKEN_AS_SELF 2
2148 /* Set/get the global windows */
2149 @REQ(set_global_windows)
2150 unsigned int flags; /* flags for fields to set (see below) */
2151 user_handle_t shell_window; /* handle to the new shell window */
2152 user_handle_t shell_listview; /* handle to the new shell listview window */
2153 user_handle_t progman_window; /* handle to the new program manager window */
2154 user_handle_t taskman_window; /* handle to the new task manager window */
2156 user_handle_t old_shell_window; /* handle to the shell window */
2157 user_handle_t old_shell_listview; /* handle to the shell listview window */
2158 user_handle_t old_progman_window; /* handle to the new program manager window */
2159 user_handle_t old_taskman_window; /* handle to the new task manager window */
2161 #define SET_GLOBAL_SHELL_WINDOWS 0x01 /* set both main shell and listview windows */
2162 #define SET_GLOBAL_PROGMAN_WINDOW 0x02
2163 #define SET_GLOBAL_TASKMAN_WINDOW 0x04