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.
, 51 Franklin St
, Fifth Floor
, Boston
, MA
02110-1301, USA
25 @HEADER
/* start of C declarations
*/
34 typedef void
*obj_handle_t
;
35 typedef void
*user_handle_t
;
36 typedef unsigned short atom_t
;
37 typedef unsigned int process_id_t
;
38 typedef unsigned int thread_id_t
;
39 typedef unsigned int data_size_t
;
43 int req
; /* request code
*/
44 data_size_t request_size
; /* request variable part size
*/
45 data_size_t reply_size
; /* reply variable part maximum size
*/
50 unsigned int error
; /* error result
*/
51 data_size_t reply_size
; /* reply variable part size
*/
54 /* placeholder structure for the maximum allowed request size
*/
55 /* this is used to construct the generic_request union
*/
56 struct request_max_size
58 int pad
[16]; /* the max request size is
16 ints
*/
61 #define FIRST_USER_HANDLE
0x0020 /* first possible value for low word of user handle
*/
62 #define LAST_USER_HANDLE
0xffef /* last possible value for low word of user handle
*/
65 /* definitions of the event data depending on the event code
*/
66 struct debug_event_exception
68 EXCEPTION_RECORD record
; /* exception record
*/
69 int first
; /* first chance exception?
*/
71 struct debug_event_create_thread
73 obj_handle_t handle
; /* handle to the new thread
*/
74 void
*teb
; /* thread
teb (in debugged process address space
) */
75 void
*start
; /* thread startup routine
*/
77 struct debug_event_create_process
79 obj_handle_t file
; /* handle to the process exe file
*/
80 obj_handle_t process
; /* handle to the new process
*/
81 obj_handle_t thread
; /* handle to the new thread
*/
82 void
*base
; /* base of executable image
*/
83 int dbg_offset
; /* offset of debug info in file
*/
84 int dbg_size
; /* size of debug info
*/
85 void
*teb
; /* thread
teb (in debugged process address space
) */
86 void
*start
; /* thread startup routine
*/
87 void
*name
; /* image
name (optional
) */
88 int unicode
; /* is it Unicode?
*/
90 struct debug_event_exit
92 int exit_code
; /* thread or process exit code
*/
94 struct debug_event_load_dll
96 obj_handle_t handle
; /* file handle for the dll
*/
97 void
*base
; /* base address of the dll
*/
98 int dbg_offset
; /* offset of debug info in file
*/
99 int dbg_size
; /* size of debug info
*/
100 void
*name
; /* image
name (optional
) */
101 int unicode
; /* is it Unicode?
*/
103 struct debug_event_unload_dll
105 void
*base
; /* base address of the dll
*/
107 struct debug_event_output_string
109 void
*string
; /* string to
display (in debugged process address space
) */
110 int unicode
; /* is it Unicode?
*/
111 int length
; /* string length
*/
113 struct debug_event_rip_info
118 union debug_event_data
120 struct debug_event_exception exception
;
121 struct debug_event_create_thread create_thread
;
122 struct debug_event_create_process create_process
;
123 struct debug_event_exit exit
;
124 struct debug_event_load_dll load_dll
;
125 struct debug_event_unload_dll unload_dll
;
126 struct debug_event_output_string output_string
;
127 struct debug_event_rip_info rip_info
;
130 /* debug event data
*/
133 int code
; /* event code
*/
134 union debug_event_data info
; /* event information
*/
137 /* structure used in sending an fd from client to server
*/
140 thread_id_t tid
; /* thread id
*/
141 int fd
; /* file descriptor on client
-side
*/
144 /* structure sent by the server on the wait fifo
*/
147 void
*cookie
; /* magic cookie that was passed in select_request
*/
148 int signaled
; /* wait result
*/
151 /* structure for absolute timeouts
*/
154 int sec
; /* seconds since Unix epoch
*/
155 int usec
; /* microseconds
*/
158 /* structure returned in the list of window properties
*/
161 atom_t atom
; /* property atom
*/
162 short string
; /* was atom a string originally?
*/
163 obj_handle_t handle
; /* handle stored in property
*/
166 /* structure to specify window rectangles
*/
175 /* structure for console char
/attribute info
*/
182 #define MAX_ACL_LEN
65535
184 struct security_descriptor
186 unsigned int control
; /* SE_ flags
*/
187 data_size_t owner_len
;
188 data_size_t group_len
;
189 data_size_t sacl_len
;
190 data_size_t dacl_len
;
191 /* VARARGS(owner
,SID
); */
192 /* VARARGS(group
,SID
); */
193 /* VARARGS(sacl
,ACL
); */
194 /* VARARGS(dacl
,ACL
); */
200 /* unsigned int attributes
[count
]; */
201 /* VARARGS(sids
,SID
); */
204 /****************************************************************/
205 /* Request declarations
*/
207 /* Create a new process from the context of the parent
*/
209 int inherit_all
; /* inherit all handles from parent
*/
210 unsigned int create_flags
; /* creation flags
*/
211 int socket_fd
; /* file descriptor for process socket
*/
212 obj_handle_t exe_file
; /* file handle for main exe
*/
213 obj_handle_t hstdin
; /* handle for stdin
*/
214 obj_handle_t hstdout
; /* handle for stdout
*/
215 obj_handle_t hstderr
; /* handle for stderr
*/
216 unsigned int process_access
; /* access rights for process object
*/
217 unsigned int process_attr
; /* attributes for process object
*/
218 unsigned int thread_access
; /* access rights for thread object
*/
219 unsigned int thread_attr
; /* attributes for thread object
*/
220 VARARG(info
,startup_info
); /* startup information
*/
221 VARARG(env
,unicode_str
); /* environment for new process
*/
223 obj_handle_t info
; /* new process info handle
*/
224 process_id_t pid
; /* process id
*/
225 obj_handle_t phandle
; /* process
handle (in the current process
) */
226 thread_id_t tid
; /* thread id
*/
227 obj_handle_t thandle
; /* thread
handle (in the current process
) */
231 /* Retrieve information about a newly started process
*/
232 @
REQ(get_new_process_info
)
233 obj_handle_t info
; /* info handle returned from new_process_request
*/
235 int success
; /* did the process start successfully?
*/
236 int exit_code
; /* process exit code if failed
*/
240 /* Create a new thread from the context of the parent
*/
242 unsigned int access
; /* wanted access rights
*/
243 unsigned int attributes
; /* object attributes
*/
244 int suspend
; /* new thread should be suspended on creation
*/
245 int request_fd
; /* fd for request pipe
*/
247 thread_id_t tid
; /* thread id
*/
248 obj_handle_t handle
; /* thread
handle (in the current process
) */
252 /* Retrieve the new process startup info
*/
253 @
REQ(get_startup_info
)
255 obj_handle_t exe_file
; /* file handle for main exe
*/
256 obj_handle_t hstdin
; /* handle for stdin
*/
257 obj_handle_t hstdout
; /* handle for stdout
*/
258 obj_handle_t hstderr
; /* handle for stderr
*/
259 VARARG(info
,startup_info
); /* startup information
*/
260 VARARG(env
,unicode_str
); /* environment
*/
264 /* Signal the end of the process initialization
*/
265 @
REQ(init_process_done
)
266 void
* module
; /* main module base address
*/
267 void
* entry
; /* process entry point
*/
268 int gui
; /* is it a GUI process?
*/
272 /* Initialize a thread
; called from the child after
fork()/clone() */
274 int unix_pid
; /* Unix pid of new thread
*/
275 int unix_tid
; /* Unix tid of new thread
*/
276 void
* teb
; /* TEB of new
thread (in thread address space
) */
277 void
* peb
; /* address of
PEB (in thread address space
) */
278 void
* entry
; /* thread entry
point (in thread address space
) */
279 void
* ldt_copy
; /* address of LDT
copy (in thread address space
) */
280 int reply_fd
; /* fd for reply pipe
*/
281 int wait_fd
; /* fd for blocking calls pipe
*/
282 int debug_level
; /* new debug level
*/
284 process_id_t pid
; /* process id of the new thread
's process */
285 thread_id_t tid; /* thread id of the new thread */
286 data_size_t info_size; /* total size of startup info */
287 abs_time_t server_start; /* server start time */
288 int version; /* protocol version */
292 /* Terminate a process */
293 @REQ(terminate_process)
294 obj_handle_t handle; /* process handle to terminate */
295 int exit_code; /* process exit code */
297 int self; /* suicide? */
301 /* Terminate a thread */
302 @REQ(terminate_thread)
303 obj_handle_t handle; /* thread handle to terminate */
304 int exit_code; /* thread exit code */
306 int self; /* suicide? */
307 int last; /* last thread in this process? */
311 /* Retrieve information about a process */
312 @REQ(get_process_info)
313 obj_handle_t handle; /* process handle */
315 process_id_t pid; /* server process id */
316 process_id_t ppid; /* server process id of parent */
317 int exit_code; /* process exit code */
318 int priority; /* priority class */
319 int affinity; /* process affinity mask */
320 void* peb; /* PEB address in process address space */
321 abs_time_t start_time; /* process start time */
322 abs_time_t end_time; /* process end time */
326 /* Set a process informations */
327 @REQ(set_process_info)
328 obj_handle_t handle; /* process handle */
329 int mask; /* setting mask (see below) */
330 int priority; /* priority class */
331 int affinity; /* affinity mask */
333 #define SET_PROCESS_INFO_PRIORITY 0x01
334 #define SET_PROCESS_INFO_AFFINITY 0x02
337 /* Retrieve information about a thread */
338 @REQ(get_thread_info)
339 obj_handle_t handle; /* thread handle */
340 thread_id_t tid_in; /* thread id (optional) */
342 process_id_t pid; /* server process id */
343 thread_id_t tid; /* server thread id */
344 void* teb; /* thread teb pointer */
345 int exit_code; /* thread exit code */
346 int priority; /* thread priority level */
347 int affinity; /* thread affinity mask */
348 abs_time_t creation_time; /* thread creation time */
349 abs_time_t exit_time; /* thread exit time */
353 /* Set a thread informations */
354 @REQ(set_thread_info)
355 obj_handle_t handle; /* thread handle */
356 int mask; /* setting mask (see below) */
357 int priority; /* priority class */
358 int affinity; /* affinity mask */
359 obj_handle_t token; /* impersonation token */
361 #define SET_THREAD_INFO_PRIORITY 0x01
362 #define SET_THREAD_INFO_AFFINITY 0x02
363 #define SET_THREAD_INFO_TOKEN 0x04
366 /* Retrieve information about a module */
368 obj_handle_t handle; /* process handle */
369 void* base_address; /* base address of module */
371 size_t size; /* module size */
373 VARARG(filename,unicode_str); /* file name of module */
377 /* Suspend a thread */
379 obj_handle_t handle; /* thread handle */
381 int count; /* new suspend count */
385 /* Resume a thread */
387 obj_handle_t handle; /* thread handle */
389 int count; /* new suspend count */
393 /* Notify the server that a dll has been loaded */
395 obj_handle_t handle; /* file handle */
396 void* base; /* base address */
397 size_t size; /* dll size */
398 int dbg_offset; /* debug info offset */
399 int dbg_size; /* debug info size */
400 void* name; /* ptr to ptr to name (in process addr space) */
401 VARARG(filename,unicode_str); /* file name of dll */
405 /* Notify the server that a dll is being unloaded */
407 void* base; /* base address */
411 /* Queue an APC for a thread */
413 obj_handle_t handle; /* thread handle */
414 int user; /* user or system apc? */
415 void* func; /* function to call */
416 void* arg1; /* params for function to call */
422 /* Get next APC to call */
424 int alertable; /* is thread alertable? */
426 void* func; /* function to call */
427 int type; /* function type */
428 void* arg1; /* function arguments */
432 enum apc_type { APC_NONE, APC_USER, APC_TIMER, APC_ASYNC_IO };
435 /* Close a handle for the current process */
437 obj_handle_t handle; /* handle to close */
439 int fd; /* associated fd to close */
443 /* Set a handle information */
444 @REQ(set_handle_info)
445 obj_handle_t handle; /* handle we are interested in */
446 int flags; /* new handle flags */
447 int mask; /* mask for flags to set */
449 int old_flags; /* old flag value */
453 /* Duplicate a handle */
455 obj_handle_t src_process; /* src process handle */
456 obj_handle_t src_handle; /* src handle to duplicate */
457 obj_handle_t dst_process; /* dst process handle */
458 unsigned int access; /* wanted access rights */
459 unsigned int attributes; /* object attributes */
460 unsigned int options; /* duplicate options (see below) */
462 obj_handle_t handle; /* duplicated handle in dst process */
463 int fd; /* associated fd to close */
465 #define DUP_HANDLE_CLOSE_SOURCE DUPLICATE_CLOSE_SOURCE
466 #define DUP_HANDLE_SAME_ACCESS DUPLICATE_SAME_ACCESS
467 #define DUP_HANDLE_MAKE_GLOBAL 0x80000000 /* Not a Windows flag */
470 /* Open a handle to a process */
472 process_id_t pid; /* process id to open */
473 unsigned int access; /* wanted access rights */
474 unsigned int attributes; /* object attributes */
476 obj_handle_t handle; /* handle to the process */
480 /* Open a handle to a thread */
482 thread_id_t tid; /* thread id to open */
483 unsigned int access; /* wanted access rights */
484 unsigned int attributes; /* object attributes */
486 obj_handle_t handle; /* handle to the thread */
490 /* Wait for handles */
492 int flags; /* wait flags (see below) */
493 void* cookie; /* magic cookie to return to client */
494 obj_handle_t signal; /* object to signal (0 if none) */
495 abs_time_t timeout; /* absolute timeout */
496 VARARG(handles,handles); /* handles to select on */
499 #define SELECT_ALERTABLE 2
500 #define SELECT_INTERRUPTIBLE 4
501 #define SELECT_TIMEOUT 8
504 /* Create an event */
506 unsigned int access; /* wanted access rights */
507 unsigned int attributes; /* object attributes */
508 obj_handle_t rootdir; /* root directory */
509 int manual_reset; /* manual reset event */
510 int initial_state; /* initial state of the event */
511 VARARG(name,unicode_str); /* object name */
513 obj_handle_t handle; /* handle to the event */
516 /* Event operation */
518 obj_handle_t handle; /* handle to event */
519 int op; /* event operation (see below) */
521 enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT };
526 unsigned int access; /* wanted access rights */
527 unsigned int attributes; /* object attributes */
528 obj_handle_t rootdir; /* root directory */
529 VARARG(name,unicode_str); /* object name */
531 obj_handle_t handle; /* handle to the event */
537 unsigned int access; /* wanted access rights */
538 unsigned int attributes; /* object attributes */
539 obj_handle_t rootdir; /* root directory */
540 int owned; /* initially owned? */
541 VARARG(name,unicode_str); /* object name */
543 obj_handle_t handle; /* handle to the mutex */
547 /* Release a mutex */
549 obj_handle_t handle; /* handle to the mutex */
551 unsigned int prev_count; /* value of internal counter, before release */
557 unsigned int access; /* wanted access rights */
558 unsigned int attributes; /* object attributes */
559 obj_handle_t rootdir; /* root directory */
560 VARARG(name,unicode_str); /* object name */
562 obj_handle_t handle; /* handle to the mutex */
566 /* Create a semaphore */
567 @REQ(create_semaphore)
568 unsigned int access; /* wanted access rights */
569 unsigned int attributes; /* object attributes */
570 obj_handle_t rootdir; /* root directory */
571 unsigned int initial; /* initial count */
572 unsigned int max; /* maximum count */
573 VARARG(name,unicode_str); /* object name */
575 obj_handle_t handle; /* handle to the semaphore */
579 /* Release a semaphore */
580 @REQ(release_semaphore)
581 obj_handle_t handle; /* handle to the semaphore */
582 unsigned int count; /* count to add to semaphore */
584 unsigned int prev_count; /* previous semaphore count */
588 /* Open a semaphore */
590 unsigned int access; /* wanted access rights */
591 unsigned int attributes; /* object attributes */
592 obj_handle_t rootdir; /* root directory */
593 VARARG(name,unicode_str); /* object name */
595 obj_handle_t handle; /* handle to the semaphore */
601 unsigned int access; /* wanted access rights */
602 unsigned int attributes; /* object attributes */
603 unsigned int sharing; /* sharing flags */
604 int create; /* file create action */
605 unsigned int options; /* file options */
606 unsigned int attrs; /* file attributes for creation */
607 VARARG(filename,string); /* file name */
609 obj_handle_t handle; /* handle to the file */
613 /* Open a file object */
614 @REQ(open_file_object)
615 unsigned int access; /* wanted access rights */
616 unsigned int attributes; /* open attributes */
617 obj_handle_t rootdir; /* root directory */
618 unsigned int sharing; /* sharing flags */
619 VARARG(filename,unicode_str); /* file name */
621 obj_handle_t handle; /* handle to the file */
625 /* Allocate a file handle for a Unix fd */
626 @REQ(alloc_file_handle)
627 unsigned int access; /* wanted access rights */
628 unsigned int attributes; /* object attributes */
629 int fd; /* file descriptor on the client side */
631 obj_handle_t handle; /* handle to the file */
635 /* Get a Unix fd to access a file */
637 obj_handle_t handle; /* handle to the file */
638 unsigned int access; /* wanted access rights */
640 int fd; /* file descriptor */
641 int removable; /* is device removable? (-1 if unknown) */
642 int flags; /* file read/write flags (see below) */
644 #define FD_FLAG_OVERLAPPED 0x01 /* fd opened in overlapped mode */
645 #define FD_FLAG_TIMEOUT 0x02 /* read/write is synchronous */
646 #define FD_FLAG_RECV_SHUTDOWN 0x04
647 #define FD_FLAG_SEND_SHUTDOWN 0x08
648 #define FD_FLAG_AVAILABLE 0x10 /* in overlap read/write operation,
649 * only handle available data (don't wait
) */
651 /* Set the cached file descriptor of a handle
*/
653 obj_handle_t handle
; /* handle we are interested in
*/
654 int fd
; /* file descriptor
*/
655 int removable
; /* is device removable?
(-1 if unknown
) */
657 int cur_fd
; /* current file descriptor
*/
661 /* Flush a file buffers
*/
663 obj_handle_t handle
; /* handle to the file
*/
665 obj_handle_t event
; /* event set when finished
*/
669 /* Lock a region of a file
*/
671 obj_handle_t handle
; /* handle to the file
*/
672 unsigned int offset_low
; /* offset of start of lock
*/
673 unsigned int offset_high
; /* offset of start of lock
*/
674 unsigned int count_low
; /* count of bytes to lock
*/
675 unsigned int count_high
; /* count of bytes to lock
*/
676 int shared
; /* shared or exclusive lock?
*/
677 int wait
; /* do we want to wait?
*/
679 obj_handle_t handle
; /* handle to wait on
*/
680 int overlapped
; /* is it an overlapped I
/O handle?
*/
684 /* Unlock a region of a file
*/
686 obj_handle_t handle
; /* handle to the file
*/
687 unsigned int offset_low
; /* offset of start of unlock
*/
688 unsigned int offset_high
; /* offset of start of unlock
*/
689 unsigned int count_low
; /* count of bytes to unlock
*/
690 unsigned int count_high
; /* count of bytes to unlock
*/
694 /* Get ready to unmount a Unix device
*/
696 obj_handle_t handle
; /* handle to a file on the device
*/
700 /* Create a socket
*/
702 unsigned int access
; /* wanted access rights
*/
703 unsigned int attributes
; /* object attributes
*/
704 int family
; /* family
, see socket manpage
*/
705 int type
; /* type
, see socket manpage
*/
706 int protocol
; /* protocol
, see socket manpage
*/
707 unsigned int flags
; /* socket flags
*/
709 obj_handle_t handle
; /* handle to the new socket
*/
713 /* Accept a socket
*/
715 obj_handle_t lhandle
; /* handle to the listening socket
*/
716 unsigned int access
; /* wanted access rights
*/
717 unsigned int attributes
; /* object attributes
*/
719 obj_handle_t handle
; /* handle to the new socket
*/
723 /* Set socket event parameters
*/
724 @
REQ(set_socket_event
)
725 obj_handle_t handle
; /* handle to the socket
*/
726 unsigned int mask
; /* event mask
*/
727 obj_handle_t event
; /* event object
*/
728 user_handle_t window
; /* window to send the message to
*/
729 unsigned int msg
; /* message to send
*/
733 /* Get socket event parameters
*/
734 @
REQ(get_socket_event
)
735 obj_handle_t handle
; /* handle to the socket
*/
736 int service
; /* clear pending?
*/
737 obj_handle_t c_event
; /* event to clear
*/
739 unsigned int mask
; /* event mask
*/
740 unsigned int pmask
; /* pending events
*/
741 unsigned int state
; /* status bits
*/
742 VARARG(errors
,ints
); /* event errors
*/
746 /* Reenable pending socket events
*/
747 @
REQ(enable_socket_event
)
748 obj_handle_t handle
; /* handle to the socket
*/
749 unsigned int mask
; /* events to re
-enable
*/
750 unsigned int sstate
; /* status bits to set
*/
751 unsigned int cstate
; /* status bits to clear
*/
754 @
REQ(set_socket_deferred
)
755 obj_handle_t handle
; /* handle to the socket
*/
756 obj_handle_t deferred
; /* handle to the socket for which
accept() is deferred
*/
759 /* Allocate a
console (only used by a console renderer
) */
761 unsigned int access
; /* wanted access rights
*/
762 unsigned int attributes
; /* object attributes
*/
763 process_id_t pid
; /* pid of process which shall be attached to the console
*/
765 obj_handle_t handle_in
; /* handle to console input
*/
766 obj_handle_t event
; /* handle to renderer events change notification
*/
770 /* Free the console of the current process
*/
775 #define CONSOLE_RENDERER_NONE_EVENT
0x00
776 #define CONSOLE_RENDERER_TITLE_EVENT
0x01
777 #define CONSOLE_RENDERER_ACTIVE_SB_EVENT
0x02
778 #define CONSOLE_RENDERER_SB_RESIZE_EVENT
0x03
779 #define CONSOLE_RENDERER_UPDATE_EVENT
0x04
780 #define CONSOLE_RENDERER_CURSOR_POS_EVENT
0x05
781 #define CONSOLE_RENDERER_CURSOR_GEOM_EVENT
0x06
782 #define CONSOLE_RENDERER_DISPLAY_EVENT
0x07
783 #define CONSOLE_RENDERER_EXIT_EVENT
0x08
784 struct console_renderer_event
819 /* retrieve console events for the renderer
*/
820 @
REQ(get_console_renderer_events
)
821 obj_handle_t handle
; /* handle to console input events
*/
823 VARARG(data
,bytes
); /* the various console_renderer_events
*/
827 /* Open a handle to the process console
*/
829 obj_handle_t from
; /* 0 (resp
1) input (resp output
) of current process console
*/
830 /* otherwise console_in handle to get active screen buffer?
*/
831 unsigned int access
; /* wanted access rights
*/
832 unsigned int attributes
; /* object attributes
*/
833 int share
; /* share
mask (only for output handles
) */
835 obj_handle_t handle
; /* handle to the console
*/
839 /* Get the input queue wait event
*/
840 @
REQ(get_console_wait_event
)
845 /* Get a console
mode (input or output
) */
846 @
REQ(get_console_mode
)
847 obj_handle_t handle
; /* handle to the console
*/
849 int mode
; /* console mode
*/
853 /* Set a console
mode (input or output
) */
854 @
REQ(set_console_mode
)
855 obj_handle_t handle
; /* handle to the console
*/
856 int mode
; /* console mode
*/
860 /* Set info about a
console (input only
) */
861 @
REQ(set_console_input_info
)
862 obj_handle_t handle
; /* handle to console input
, or
0 for process
' console */
863 int mask; /* setting mask (see below) */
864 obj_handle_t active_sb; /* active screen buffer */
865 int history_mode; /* whether we duplicate lines in history */
866 int history_size; /* number of lines in history */
867 int edition_mode; /* index to the edition mode flavors */
868 VARARG(title,unicode_str); /* console title */
870 #define SET_CONSOLE_INPUT_INFO_ACTIVE_SB 0x01
871 #define SET_CONSOLE_INPUT_INFO_TITLE 0x02
872 #define SET_CONSOLE_INPUT_INFO_HISTORY_MODE 0x04
873 #define SET_CONSOLE_INPUT_INFO_HISTORY_SIZE 0x08
874 #define SET_CONSOLE_INPUT_INFO_EDITION_MODE 0x10
877 /* Get info about a console (input only) */
878 @REQ(get_console_input_info)
879 obj_handle_t handle; /* handle to console input, or 0 for process' console
*/
881 int history_mode
; /* whether we duplicate lines in history
*/
882 int history_size
; /* number of lines in history
*/
883 int history_index
; /* number of used lines in history
*/
884 int edition_mode
; /* index to the edition mode flavors
*/
885 VARARG(title
,unicode_str
); /* console title
*/
889 /* appends a string to console
's history */
890 @REQ(append_console_input_history)
891 obj_handle_t handle; /* handle to console input, or 0 for process' console
*/
892 VARARG(line
,unicode_str
); /* line to add
*/
896 /* appends a string to console
's history */
897 @REQ(get_console_input_history)
898 obj_handle_t handle; /* handle to console input, or 0 for process' console
*/
899 int index
; /* index to get line from
*/
901 int total
; /* total length of line in Unicode chars
*/
902 VARARG(line
,unicode_str
); /* line to add
*/
906 /* creates a new screen buffer on process
' console */
907 @REQ(create_console_output)
908 obj_handle_t handle_in; /* handle to console input, or 0 for process' console
*/
909 unsigned int access
; /* wanted access rights
*/
910 unsigned int attributes
; /* object attributes
*/
911 unsigned int share
; /* sharing credentials
*/
913 obj_handle_t handle_out
; /* handle to the screen buffer
*/
917 /* Set info about a
console (output only
) */
918 @
REQ(set_console_output_info
)
919 obj_handle_t handle
; /* handle to the console
*/
920 int mask
; /* setting
mask (see below
) */
921 short int cursor_size
; /* size of
cursor (percentage filled
) */
922 short int cursor_visible
;/* cursor visibility flag
*/
923 short int cursor_x
; /* position of
cursor (x
, y
) */
925 short int width
; /* width of the screen buffer
*/
926 short int height
; /* height of the screen buffer
*/
927 short int attr
; /* default attribute
*/
928 short int win_left
; /* window actually displayed by renderer
*/
929 short int win_top
; /* the rect area is expressed withing the
*/
930 short int win_right
; /* boundaries of the screen buffer
*/
931 short int win_bottom
;
932 short int max_width
; /* maximum
size (width x height
) for the window
*/
933 short int max_height
;
935 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_GEOM
0x01
936 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_POS
0x02
937 #define SET_CONSOLE_OUTPUT_INFO_SIZE
0x04
938 #define SET_CONSOLE_OUTPUT_INFO_ATTR
0x08
939 #define SET_CONSOLE_OUTPUT_INFO_DISPLAY_WINDOW
0x10
940 #define SET_CONSOLE_OUTPUT_INFO_MAX_SIZE
0x20
943 /* Get info about a
console (output only
) */
944 @
REQ(get_console_output_info
)
945 obj_handle_t handle
; /* handle to the console
*/
947 short int cursor_size
; /* size of
cursor (percentage filled
) */
948 short int cursor_visible
;/* cursor visibility flag
*/
949 short int cursor_x
; /* position of
cursor (x
, y
) */
951 short int width
; /* width of the screen buffer
*/
952 short int height
; /* height of the screen buffer
*/
953 short int attr
; /* default attribute
*/
954 short int win_left
; /* window actually displayed by renderer
*/
955 short int win_top
; /* the rect area is expressed withing the
*/
956 short int win_right
; /* boundaries of the screen buffer
*/
957 short int win_bottom
;
958 short int max_width
; /* maximum
size (width x height
) for the window
*/
959 short int max_height
;
962 /* Add input records to a console input queue
*/
963 @
REQ(write_console_input
)
964 obj_handle_t handle
; /* handle to the console input
*/
965 VARARG(rec
,input_records
); /* input records
*/
967 int written
; /* number of records written
*/
971 /* Fetch input records from a console input queue
*/
972 @
REQ(read_console_input
)
973 obj_handle_t handle
; /* handle to the console input
*/
974 int flush
; /* flush the retrieved records from the queue?
*/
976 int read
; /* number of records read
*/
977 VARARG(rec
,input_records
); /* input records
*/
981 /* write
data (chars and
/or attributes
) in a screen buffer
*/
982 @
REQ(write_console_output
)
983 obj_handle_t handle
; /* handle to the console output
*/
984 int x
; /* position where to start writing
*/
986 int mode
; /* char
info (see below
) */
987 int wrap
; /* wrap around at end of line?
*/
988 VARARG(data
,bytes
); /* info to write
*/
990 int written
; /* number of char infos actually written
*/
991 int width
; /* width of screen buffer
*/
992 int height
; /* height of screen buffer
*/
996 CHAR_INFO_MODE_TEXT
, /* characters only
*/
997 CHAR_INFO_MODE_ATTR
, /* attributes only
*/
998 CHAR_INFO_MODE_TEXTATTR
, /* both characters and attributes
*/
999 CHAR_INFO_MODE_TEXTSTDATTR
/* characters but use standard attributes
*/
1003 /* fill a screen buffer with constant
data (chars and
/or attributes
) */
1004 @
REQ(fill_console_output
)
1005 obj_handle_t handle
; /* handle to the console output
*/
1006 int x
; /* position where to start writing
*/
1008 int mode
; /* char info mode
*/
1009 int count
; /* number to write
*/
1010 int wrap
; /* wrap around at end of line?
*/
1011 char_info_t data
; /* data to write
*/
1013 int written
; /* number of char infos actually written
*/
1017 /* read
data (chars and
/or attributes
) from a screen buffer
*/
1018 @
REQ(read_console_output
)
1019 obj_handle_t handle
; /* handle to the console output
*/
1020 int x
; /* position (x
,y
) where to start reading
*/
1022 int mode
; /* char info mode
*/
1023 int wrap
; /* wrap around at end of line?
*/
1025 int width
; /* width of screen buffer
*/
1026 int height
; /* height of screen buffer
*/
1031 /* move a
rect (of data
) in screen buffer content
*/
1032 @
REQ(move_console_output
)
1033 obj_handle_t handle
; /* handle to the console output
*/
1034 short int x_src
; /* position (x
, y
) of rect to start moving from
*/
1036 short int x_dst
; /* position (x
, y
) of rect to move to
*/
1038 short int w
; /* size of the
rect (width
, height
) to move
*/
1043 /* Sends a signal to a process group
*/
1044 @
REQ(send_console_signal
)
1045 int signal
; /* the signal to send
*/
1046 process_id_t group_id
; /* the group to send the signal to
*/
1050 /* enable directory change notifications
*/
1051 @
REQ(read_directory_changes
)
1052 obj_handle_t handle
; /* handle to the directory
*/
1053 obj_handle_t event
; /* handle to the event
*/
1054 unsigned int filter
; /* notification filter
*/
1055 int subtree
; /* watch the subtree?
*/
1056 int want_data
; /* flag indicating whether change data should be collected
*/
1057 void
* io_apc
; /* APC routine to queue upon end of async
*/
1058 void
* io_sb
; /* I
/O status
block (unique across all async on this handle
) */
1059 void
* io_user
; /* data to pass back to caller
*/
1064 obj_handle_t handle
;
1066 int action
; /* type of change
*/
1067 VARARG(name
,string
); /* name of directory entry that changed
*/
1071 /* Create a file mapping
*/
1072 @
REQ(create_mapping
)
1073 unsigned int access
; /* wanted access rights
*/
1074 unsigned int attributes
; /* object attributes
*/
1075 obj_handle_t rootdir
; /* root directory
*/
1076 int size_high
; /* mapping size
*/
1077 int size_low
; /* mapping size
*/
1078 int protect
; /* protection
flags (see below
) */
1079 obj_handle_t file_handle
; /* file handle
*/
1080 VARARG(name
,unicode_str
); /* object name
*/
1082 obj_handle_t handle
; /* handle to the mapping
*/
1084 /* protection flags
*/
1085 #define VPROT_READ
0x01
1086 #define VPROT_WRITE
0x02
1087 #define VPROT_EXEC
0x04
1088 #define VPROT_WRITECOPY
0x08
1089 #define VPROT_GUARD
0x10
1090 #define VPROT_NOCACHE
0x20
1091 #define VPROT_COMMITTED
0x40
1092 #define VPROT_IMAGE
0x80
1095 /* Open a mapping
*/
1097 unsigned int access
; /* wanted access rights
*/
1098 unsigned int attributes
; /* object attributes
*/
1099 obj_handle_t rootdir
; /* root directory
*/
1100 VARARG(name
,unicode_str
); /* object name
*/
1102 obj_handle_t handle
; /* handle to the mapping
*/
1106 /* Get information about a file mapping
*/
1107 @
REQ(get_mapping_info
)
1108 obj_handle_t handle
; /* handle to the mapping
*/
1110 int size_high
; /* mapping size
*/
1111 int size_low
; /* mapping size
*/
1112 int protect
; /* protection flags
*/
1113 int header_size
; /* header
size (for VPROT_IMAGE mapping
) */
1114 void
* base
; /* default base
addr (for VPROT_IMAGE mapping
) */
1115 obj_handle_t shared_file
; /* shared mapping file handle
*/
1116 int shared_size
; /* shared mapping size
*/
1120 #define SNAP_HEAPLIST
0x00000001
1121 #define SNAP_PROCESS
0x00000002
1122 #define SNAP_THREAD
0x00000004
1123 #define SNAP_MODULE
0x00000008
1124 /* Create a snapshot
*/
1125 @
REQ(create_snapshot
)
1126 unsigned int attributes
; /* object attributes
*/
1127 int flags
; /* snapshot
flags (SNAP_*)
*/
1128 process_id_t pid
; /* process id
*/
1130 obj_handle_t handle
; /* handle to the snapshot
*/
1134 /* Get the next process from a snapshot
*/
1136 obj_handle_t handle
; /* handle to the snapshot
*/
1137 int reset
; /* reset snapshot position?
*/
1139 int count
; /* process usage count
*/
1140 process_id_t pid
; /* process id
*/
1141 process_id_t ppid
; /* parent process id
*/
1142 void
* heap
; /* heap base
*/
1143 void
* module
; /* main module
*/
1144 int threads
; /* number of threads
*/
1145 int priority
; /* process priority
*/
1146 int handles
; /* number of handles
*/
1147 VARARG(filename
,unicode_str
); /* file name of main exe
*/
1151 /* Get the next thread from a snapshot
*/
1153 obj_handle_t handle
; /* handle to the snapshot
*/
1154 int reset
; /* reset snapshot position?
*/
1156 int count
; /* thread usage count
*/
1157 process_id_t pid
; /* process id
*/
1158 thread_id_t tid
; /* thread id
*/
1159 int base_pri
; /* base priority
*/
1160 int delta_pri
; /* delta priority
*/
1164 /* Get the next module from a snapshot
*/
1166 obj_handle_t handle
; /* handle to the snapshot
*/
1167 int reset
; /* reset snapshot position?
*/
1169 process_id_t pid
; /* process id
*/
1170 void
* base
; /* module base address
*/
1171 size_t size
; /* module size
*/
1172 VARARG(filename
,unicode_str
); /* file name of module
*/
1176 /* Wait for a debug event
*/
1177 @
REQ(wait_debug_event
)
1178 int get_handle
; /* should we alloc a handle for waiting?
*/
1180 process_id_t pid
; /* process id
*/
1181 thread_id_t tid
; /* thread id
*/
1182 obj_handle_t wait
; /* wait handle if no event ready
*/
1183 VARARG(event
,debug_event
); /* debug event data
*/
1187 /* Queue an exception event
*/
1188 @
REQ(queue_exception_event
)
1189 int first
; /* first chance exception?
*/
1190 VARARG(record
,exc_event
); /* thread context followed by exception record
*/
1192 obj_handle_t handle
; /* handle to the queued event
*/
1196 /* Retrieve the status of an exception event
*/
1197 @
REQ(get_exception_status
)
1198 obj_handle_t handle
; /* handle to the queued event
*/
1200 VARARG(context
,context
); /* modified thread context
*/
1204 /* Send an output string to the debugger
*/
1205 @
REQ(output_debug_string
)
1206 void
* string
; /* string to
display (in debugged process address space
) */
1207 int unicode
; /* is it Unicode?
*/
1208 int length
; /* string length
*/
1212 /* Continue a debug event
*/
1213 @
REQ(continue_debug_event
)
1214 process_id_t pid
; /* process id to continue
*/
1215 thread_id_t tid
; /* thread id to continue
*/
1216 int status
; /* continuation status
*/
1220 /* Start
/stop debugging an existing process
*/
1222 process_id_t pid
; /* id of the process to debug
*/
1223 int attach
; /* 1=attaching
/ 0=detaching from the process
*/
1227 /* Simulate a breakpoint in a process
*/
1229 obj_handle_t handle
; /* process handle
*/
1231 int self
; /* was it the caller itself?
*/
1235 /* Set debugger kill on exit flag
*/
1236 @
REQ(set_debugger_kill_on_exit
)
1237 int kill_on_exit
; /* 0=detach
/1=kill debuggee when debugger dies
*/
1241 /* Read data from a process address space
*/
1242 @
REQ(read_process_memory
)
1243 obj_handle_t handle
; /* process handle
*/
1244 void
* addr
; /* addr to read from
*/
1246 VARARG(data
,bytes
); /* result data
*/
1250 /* Write data to a process address space
*/
1251 @
REQ(write_process_memory
)
1252 obj_handle_t handle
; /* process handle
*/
1253 void
* addr
; /* addr to write to
*/
1254 VARARG(data
,bytes
); /* data to write
*/
1258 /* Create a registry key
*/
1260 obj_handle_t parent
; /* handle to the parent key
*/
1261 unsigned int access
; /* desired access rights
*/
1262 unsigned int attributes
; /* object attributes
*/
1263 unsigned int options
; /* creation options
*/
1264 time_t modif
; /* last modification time
*/
1265 data_size_t namelen
; /* length of key name in bytes
*/
1266 VARARG(name
,unicode_str
,namelen
); /* key name
*/
1267 VARARG(class
,unicode_str
); /* class name
*/
1269 obj_handle_t hkey
; /* handle to the created key
*/
1270 int created
; /* has it been newly created?
*/
1273 /* Open a registry key
*/
1275 obj_handle_t parent
; /* handle to the parent key
*/
1276 unsigned int access
; /* desired access rights
*/
1277 unsigned int attributes
; /* object attributes
*/
1278 VARARG(name
,unicode_str
); /* key name
*/
1280 obj_handle_t hkey
; /* handle to the open key
*/
1284 /* Delete a registry key
*/
1286 obj_handle_t hkey
; /* handle to the key
*/
1290 /* Flush a registry key
*/
1292 obj_handle_t hkey
; /* handle to the key
*/
1296 /* Enumerate registry subkeys
*/
1298 obj_handle_t hkey
; /* handle to registry key
*/
1299 int index
; /* index of
subkey (or
-1 for current key
) */
1300 int info_class
; /* requested information class
*/
1302 int subkeys
; /* number of subkeys
*/
1303 int max_subkey
; /* longest subkey name
*/
1304 int max_class
; /* longest class name
*/
1305 int values
; /* number of values
*/
1306 int max_value
; /* longest value name
*/
1307 int max_data
; /* longest value data
*/
1308 time_t modif
; /* last modification time
*/
1309 data_size_t total
; /* total length needed for full name and class
*/
1310 data_size_t namelen
; /* length of key name in bytes
*/
1311 VARARG(name
,unicode_str
,namelen
); /* key name
*/
1312 VARARG(class
,unicode_str
); /* class name
*/
1316 /* Set a value of a registry key
*/
1318 obj_handle_t hkey
; /* handle to registry key
*/
1319 int type
; /* value type
*/
1320 data_size_t namelen
; /* length of value name in bytes
*/
1321 VARARG(name
,unicode_str
,namelen
); /* value name
*/
1322 VARARG(data
,bytes
); /* value data
*/
1326 /* Retrieve the value of a registry key
*/
1328 obj_handle_t hkey
; /* handle to registry key
*/
1329 VARARG(name
,unicode_str
); /* value name
*/
1331 int type
; /* value type
*/
1332 data_size_t total
; /* total length needed for data
*/
1333 VARARG(data
,bytes
); /* value data
*/
1337 /* Enumerate a value of a registry key
*/
1338 @
REQ(enum_key_value
)
1339 obj_handle_t hkey
; /* handle to registry key
*/
1340 int index
; /* value index
*/
1341 int info_class
; /* requested information class
*/
1343 int type
; /* value type
*/
1344 data_size_t total
; /* total length needed for full name and data
*/
1345 data_size_t namelen
; /* length of value name in bytes
*/
1346 VARARG(name
,unicode_str
,namelen
); /* value name
*/
1347 VARARG(data
,bytes
); /* value data
*/
1351 /* Delete a value of a registry key
*/
1352 @
REQ(delete_key_value
)
1353 obj_handle_t hkey
; /* handle to registry key
*/
1354 VARARG(name
,unicode_str
); /* value name
*/
1358 /* Load a registry branch from a file
*/
1360 obj_handle_t hkey
; /* root key to load to
*/
1361 obj_handle_t file
; /* file to load from
*/
1362 VARARG(name
,unicode_str
); /* subkey name
*/
1366 /* UnLoad a registry branch from a file
*/
1367 @
REQ(unload_registry
)
1368 obj_handle_t hkey
; /* root key to unload to
*/
1372 /* Save a registry branch to a file
*/
1374 obj_handle_t hkey
; /* key to save
*/
1375 obj_handle_t file
; /* file to save to
*/
1379 /* Add a registry key change notification
*/
1380 @
REQ(set_registry_notification
)
1381 obj_handle_t hkey
; /* key to watch for changes
*/
1382 obj_handle_t event
; /* event to set
*/
1383 int subtree
; /* should we watch the whole subtree?
*/
1384 unsigned int filter
; /* things to watch
*/
1388 /* Create a waitable timer
*/
1390 unsigned int access
; /* wanted access rights
*/
1391 unsigned int attributes
; /* object attributes
*/
1392 obj_handle_t rootdir
; /* root directory
*/
1393 int manual
; /* manual reset
*/
1394 VARARG(name
,unicode_str
); /* object name
*/
1396 obj_handle_t handle
; /* handle to the timer
*/
1400 /* Open a waitable timer
*/
1402 unsigned int access
; /* wanted access rights
*/
1403 unsigned int attributes
; /* object attributes
*/
1404 obj_handle_t rootdir
; /* root directory
*/
1405 VARARG(name
,unicode_str
); /* object name
*/
1407 obj_handle_t handle
; /* handle to the timer
*/
1410 /* Set a waitable timer
*/
1412 obj_handle_t handle
; /* handle to the timer
*/
1413 abs_time_t expire
; /* next expiration absolute time
*/
1414 int period
; /* timer period in ms
*/
1415 void
* callback
; /* callback function
*/
1416 void
* arg
; /* callback argument
*/
1418 int signaled
; /* was the timer signaled before this call ?
*/
1421 /* Cancel a waitable timer
*/
1423 obj_handle_t handle
; /* handle to the timer
*/
1425 int signaled
; /* was the timer signaled before this calltime ?
*/
1428 /* Get information on a waitable timer
*/
1429 @
REQ(get_timer_info
)
1430 obj_handle_t handle
; /* handle to the timer
*/
1432 abs_time_t when
; /* absolute time when the timer next expires
*/
1433 int signaled
; /* is the timer signaled?
*/
1437 /* Retrieve the current context of a thread
*/
1438 @
REQ(get_thread_context
)
1439 obj_handle_t handle
; /* thread handle
*/
1440 unsigned int flags
; /* context flags
*/
1441 int suspend
; /* if getting context during suspend
*/
1443 int self
; /* was it a handle to the current thread?
*/
1444 VARARG(context
,context
); /* thread context
*/
1448 /* Set the current context of a thread
*/
1449 @
REQ(set_thread_context
)
1450 obj_handle_t handle
; /* thread handle
*/
1451 unsigned int flags
; /* context flags
*/
1452 int suspend
; /* if setting context during suspend
*/
1453 VARARG(context
,context
); /* thread context
*/
1455 int self
; /* was it a handle to the current thread?
*/
1459 /* Fetch a selector entry for a thread
*/
1460 @
REQ(get_selector_entry
)
1461 obj_handle_t handle
; /* thread handle
*/
1462 int entry
; /* LDT entry
*/
1464 unsigned int base
; /* selector base
*/
1465 unsigned int limit
; /* selector limit
*/
1466 unsigned char flags
; /* selector flags
*/
1472 obj_handle_t table
; /* which table to add atom to
*/
1473 VARARG(name
,unicode_str
); /* atom name
*/
1475 atom_t atom
; /* resulting atom
*/
1479 /* Delete an atom
*/
1481 obj_handle_t table
; /* which table to delete atom from
*/
1482 atom_t atom
; /* atom handle
*/
1488 obj_handle_t table
; /* which table to find atom from
*/
1489 VARARG(name
,unicode_str
); /* atom name
*/
1491 atom_t atom
; /* atom handle
*/
1495 /* Get information about an atom
*/
1496 @
REQ(get_atom_information
)
1497 obj_handle_t table
; /* which table to find atom from
*/
1498 atom_t atom
; /* atom handle
*/
1500 int count
; /* atom lock count
*/
1501 int pinned
; /* whether the atom has been pinned
*/
1502 data_size_t total
; /* actual length of atom name
*/
1503 VARARG(name
,unicode_str
); /* atom name
*/
1507 /* Set information about an atom
*/
1508 @
REQ(set_atom_information
)
1509 obj_handle_t table
; /* which table to find atom from
*/
1510 atom_t atom
; /* atom handle
*/
1511 int pinned
; /* whether to bump atom information
*/
1515 /* Empty an atom table
*/
1516 @
REQ(empty_atom_table
)
1517 obj_handle_t table
; /* which table to find atom from
*/
1518 int if_pinned
; /* whether to delete pinned atoms
*/
1522 /* Init an atom table
*/
1523 @
REQ(init_atom_table
)
1524 int entries
; /* number of
entries (only for local
) */
1526 obj_handle_t table
; /* handle to the atom table
*/
1530 /* Get the message queue of the current thread
*/
1533 obj_handle_t handle
; /* handle to the queue
*/
1537 /* Set the current message queue wakeup mask
*/
1538 @
REQ(set_queue_mask
)
1539 unsigned int wake_mask
; /* wakeup bits mask
*/
1540 unsigned int changed_mask
; /* changed bits mask
*/
1541 int skip_wait
; /* will we skip waiting if signaled?
*/
1543 unsigned int wake_bits
; /* current wake bits
*/
1544 unsigned int changed_bits
; /* current changed bits
*/
1548 /* Get the current message queue status
*/
1549 @
REQ(get_queue_status
)
1550 int clear
; /* should we clear the change bits?
*/
1552 unsigned int wake_bits
; /* wake bits
*/
1553 unsigned int changed_bits
; /* changed bits since last time
*/
1557 /* Retrieve the process idle event
*/
1558 @
REQ(get_process_idle_event
)
1559 obj_handle_t handle
; /* process handle
*/
1561 obj_handle_t event
; /* handle to idle event
*/
1565 /* Send a message to a thread queue
*/
1567 thread_id_t id
; /* thread id
*/
1568 int type
; /* message
type (see below
) */
1569 int flags
; /* message
flags (see below
) */
1570 user_handle_t win
; /* window handle
*/
1571 unsigned int msg
; /* message code
*/
1572 unsigned long wparam
; /* parameters
*/
1573 unsigned long lparam
; /* parameters
*/
1574 unsigned long info
; /* extra info
*/
1575 int timeout
; /* timeout for reply
*/
1576 void
* callback
; /* callback address
*/
1577 VARARG(data
,bytes
); /* message data for sent messages
*/
1580 @
REQ(post_quit_message
)
1581 int exit_code
; /* exit code to return
*/
1586 MSG_ASCII
, /* Ascii
message (from SendMessageA
) */
1587 MSG_UNICODE
, /* Unicode
message (from SendMessageW
) */
1588 MSG_NOTIFY
, /* notify
message (from SendNotifyMessageW
), always Unicode
*/
1589 MSG_CALLBACK
, /* callback
message (from SendMessageCallbackW
), always Unicode
*/
1590 MSG_CALLBACK_RESULT
,/* result of a callback message
*/
1591 MSG_OTHER_PROCESS
, /* sent from other process
, may include vararg data
, always Unicode
*/
1592 MSG_POSTED
, /* posted
message (from PostMessageW
), always Unicode
*/
1593 MSG_HARDWARE
, /* hardware message
*/
1594 MSG_WINEVENT
/* winevent message
*/
1596 #define SEND_MSG_ABORT_IF_HUNG
0x01
1599 /* Send a hardware message to a thread queue
*/
1600 @
REQ(send_hardware_message
)
1601 thread_id_t id
; /* thread id
*/
1602 user_handle_t win
; /* window handle
*/
1603 unsigned int msg
; /* message code
*/
1604 unsigned long wparam
; /* parameters
*/
1605 unsigned long lparam
; /* parameters
*/
1606 unsigned long info
; /* extra info
*/
1607 int x
; /* x position
*/
1608 int y
; /* y position
*/
1609 unsigned int time
; /* message time
*/
1613 /* Get a message from the current queue
*/
1615 int flags
; /* see below
*/
1616 user_handle_t get_win
; /* window handle to get
*/
1617 unsigned int get_first
; /* first message code to get
*/
1618 unsigned int get_last
; /* last message code to get
*/
1619 unsigned int hw_id
; /* id of the previous hardware
message (or
0) */
1621 int type
; /* message type
*/
1622 user_handle_t win
; /* window handle
*/
1623 unsigned int msg
; /* message code
*/
1624 unsigned long wparam
; /* parameters (callback function for MSG_CALLBACK_RESULT
) */
1625 unsigned long lparam
; /* parameters (result for MSG_CALLBACK_RESULT
) */
1626 unsigned long info
; /* extra
info (callback argument for MSG_CALLBACK_RESULT
) */
1627 int x
; /* x position
*/
1628 int y
; /* y position
*/
1629 user_handle_t hook
; /* winevent hook handle
*/
1630 void
* hook_proc
; /* winevent hook proc address
*/
1631 unsigned int time
; /* message time
*/
1632 unsigned int hw_id
; /* id if hardware message
*/
1633 unsigned int active_hooks
; /* active hooks bitmap
*/
1634 data_size_t total
; /* total size of extra data
*/
1635 VARARG(data
,bytes
); /* message data for sent messages
*/
1637 #define GET_MSG_REMOVE
1 /* remove the message
*/
1638 #define GET_MSG_SENT_ONLY
2 /* only get sent messages
*/
1640 /* Reply to a sent message
*/
1642 unsigned int result
; /* message result
*/
1643 int remove
; /* should we remove the message?
*/
1644 VARARG(data
,bytes
); /* message data for sent messages
*/
1648 /* Accept the current hardware message
*/
1649 @
REQ(accept_hardware_message
)
1650 unsigned int hw_id
; /* id of the hardware message
*/
1651 int remove
; /* should we remove the message?
*/
1652 user_handle_t new_win
; /* new destination window for current message
*/
1656 /* Retrieve the reply for the last message sent
*/
1657 @
REQ(get_message_reply
)
1658 int cancel
; /* cancel message if not ready?
*/
1660 unsigned int result
; /* message result
*/
1661 VARARG(data
,bytes
); /* message data for sent messages
*/
1665 /* Set a window timer
*/
1667 user_handle_t win
; /* window handle
*/
1668 unsigned int msg
; /* message to post
*/
1669 unsigned int id
; /* timer id
*/
1670 unsigned int rate
; /* timer rate in ms
*/
1671 unsigned long lparam
; /* message
lparam (callback proc
) */
1673 unsigned int id
; /* timer id
*/
1677 /* Kill a window timer
*/
1678 @
REQ(kill_win_timer
)
1679 user_handle_t win
; /* window handle
*/
1680 unsigned int msg
; /* message to post
*/
1681 unsigned int id
; /* timer id
*/
1685 /* Retrieve info about a serial port
*/
1686 @
REQ(get_serial_info
)
1687 obj_handle_t handle
; /* handle to comm port
*/
1689 unsigned int readinterval
;
1690 unsigned int readconst
;
1691 unsigned int readmult
;
1692 unsigned int writeconst
;
1693 unsigned int writemult
;
1694 unsigned int eventmask
;
1698 /* Set info about a serial port
*/
1699 @
REQ(set_serial_info
)
1700 obj_handle_t handle
; /* handle to comm port
*/
1701 int flags
; /* bitmask to set
values (see below
) */
1702 unsigned int readinterval
;
1703 unsigned int readconst
;
1704 unsigned int readmult
;
1705 unsigned int writeconst
;
1706 unsigned int writemult
;
1707 unsigned int eventmask
;
1709 #define SERIALINFO_SET_TIMEOUTS
0x01
1710 #define SERIALINFO_SET_MASK
0x02
1713 /* Create an async I
/O
*/
1714 @
REQ(register_async
)
1715 obj_handle_t handle
; /* handle to comm port
, socket or file
*/
1716 int type
; /* type of queue to look after
*/
1717 void
* io_apc
; /* APC routine to queue upon end of async
*/
1718 void
* io_sb
; /* I
/O status
block (unique across all async on this handle
) */
1719 void
* io_user
; /* data to pass back to caller
*/
1720 int count
; /* count
- usually # of bytes to be read
/written
*/
1722 #define ASYNC_TYPE_READ
0x01
1723 #define ASYNC_TYPE_WRITE
0x02
1724 #define ASYNC_TYPE_WAIT
0x03
1727 /* Cancel all async op on a fd
*/
1729 obj_handle_t handle
; /* handle to comm port
, socket or file
*/
1733 /* Create a named pipe
*/
1734 @
REQ(create_named_pipe
)
1735 unsigned int access
;
1736 unsigned int attributes
; /* object attributes
*/
1737 obj_handle_t rootdir
; /* root directory
*/
1738 unsigned int options
;
1740 unsigned int maxinstances
;
1741 unsigned int outsize
;
1742 unsigned int insize
;
1743 unsigned int timeout
;
1744 VARARG(name
,unicode_str
); /* pipe name
*/
1746 obj_handle_t handle
; /* handle to the pipe
*/
1749 /* flags in create_named_pipe and get_named_pipe_info
*/
1750 #define NAMED_PIPE_MESSAGE_STREAM_WRITE
0x0001
1751 #define NAMED_PIPE_MESSAGE_STREAM_READ
0x0002
1752 #define NAMED_PIPE_NONBLOCKING_MODE
0x0004
1753 #define NAMED_PIPE_SERVER_END
0x8000
1755 /* Open an existing named pipe
*/
1756 @
REQ(open_named_pipe
)
1757 unsigned int access
;
1758 unsigned int attributes
; /* object attributes
*/
1759 obj_handle_t rootdir
; /* root directory
*/
1760 unsigned int flags
; /* file flags
*/
1761 VARARG(name
,unicode_str
); /* pipe name
*/
1763 obj_handle_t handle
; /* handle to the pipe
*/
1767 /* Connect to a named pipe
*/
1768 @
REQ(connect_named_pipe
)
1769 obj_handle_t handle
;
1775 /* Wait for a named pipe
*/
1776 @
REQ(wait_named_pipe
)
1777 obj_handle_t handle
;
1778 unsigned int timeout
;
1781 VARARG(name
,unicode_str
); /* pipe name
*/
1785 /* Disconnect a named pipe
*/
1786 @
REQ(disconnect_named_pipe
)
1787 obj_handle_t handle
;
1789 int fd
; /* associated fd to close
*/
1793 @
REQ(get_named_pipe_info
)
1794 obj_handle_t handle
;
1797 unsigned int maxinstances
;
1798 unsigned int instances
;
1799 unsigned int outsize
;
1800 unsigned int insize
;
1804 /* Create a window
*/
1806 user_handle_t parent
; /* parent window
*/
1807 user_handle_t owner
; /* owner window
*/
1808 atom_t atom
; /* class atom
*/
1809 void
* instance
; /* module instance
*/
1811 user_handle_t handle
; /* created window
*/
1812 user_handle_t parent
; /* full handle of parent
*/
1813 user_handle_t owner
; /* full handle of owner
*/
1814 int extra
; /* number of extra bytes
*/
1815 void
* class_ptr
; /* pointer to class in client address space
*/
1819 /* Destroy a window
*/
1820 @
REQ(destroy_window
)
1821 user_handle_t handle
; /* handle to the window
*/
1825 /* Retrieve the desktop window for the current thread
*/
1826 @
REQ(get_desktop_window
)
1827 int force
; /* force creation if it doesn
't exist */
1829 user_handle_t handle; /* handle to the desktop window */
1833 /* Set a window owner */
1834 @REQ(set_window_owner)
1835 user_handle_t handle; /* handle to the window */
1836 user_handle_t owner; /* new owner */
1838 user_handle_t full_owner; /* full handle of new owner */
1839 user_handle_t prev_owner; /* full handle of previous owner */
1843 /* Get information from a window handle */
1844 @REQ(get_window_info)
1845 user_handle_t handle; /* handle to the window */
1847 user_handle_t full_handle; /* full 32-bit handle */
1848 user_handle_t last_active; /* last active popup */
1849 process_id_t pid; /* process owning the window */
1850 thread_id_t tid; /* thread owning the window */
1851 atom_t atom; /* class atom */
1852 int is_unicode; /* ANSI or unicode */
1856 /* Set some information in a window */
1857 @REQ(set_window_info)
1858 user_handle_t handle; /* handle to the window */
1859 unsigned int flags; /* flags for fields to set (see below) */
1860 unsigned int style; /* window style */
1861 unsigned int ex_style; /* window extended style */
1862 unsigned int id; /* window id */
1863 void* instance; /* creator instance */
1864 int is_unicode; /* ANSI or unicode */
1865 void* user_data; /* user-specific data */
1866 int extra_offset; /* offset to set in extra bytes */
1867 data_size_t extra_size; /* size to set in extra bytes */
1868 unsigned long extra_value; /* value to set in extra bytes */
1870 unsigned int old_style; /* old window style */
1871 unsigned int old_ex_style; /* old window extended style */
1872 unsigned int old_id; /* old window id */
1873 void* old_instance; /* old creator instance */
1874 void* old_user_data; /* old user-specific data */
1875 unsigned long old_extra_value; /* old value in extra bytes */
1877 #define SET_WIN_STYLE 0x01
1878 #define SET_WIN_EXSTYLE 0x02
1879 #define SET_WIN_ID 0x04
1880 #define SET_WIN_INSTANCE 0x08
1881 #define SET_WIN_USERDATA 0x10
1882 #define SET_WIN_EXTRA 0x20
1883 #define SET_WIN_UNICODE 0x40
1886 /* Set the parent of a window */
1888 user_handle_t handle; /* handle to the window */
1889 user_handle_t parent; /* handle to the parent */
1891 user_handle_t old_parent; /* old parent window */
1892 user_handle_t full_parent; /* full handle of new parent */
1896 /* Get a list of the window parents, up to the root of the tree */
1897 @REQ(get_window_parents)
1898 user_handle_t handle; /* handle to the window */
1900 int count; /* total count of parents */
1901 VARARG(parents,user_handles); /* parent handles */
1905 /* Get a list of the window children */
1906 @REQ(get_window_children)
1907 user_handle_t parent; /* parent window */
1908 atom_t atom; /* class atom for the listed children */
1909 thread_id_t tid; /* thread owning the listed children */
1911 int count; /* total count of children */
1912 VARARG(children,user_handles); /* children handles */
1916 /* Get a list of the window children that contain a given point */
1917 @REQ(get_window_children_from_point)
1918 user_handle_t parent; /* parent window */
1919 int x; /* point in parent coordinates */
1922 int count; /* total count of children */
1923 VARARG(children,user_handles); /* children handles */
1927 /* Get window tree information from a window handle */
1928 @REQ(get_window_tree)
1929 user_handle_t handle; /* handle to the window */
1931 user_handle_t parent; /* parent window */
1932 user_handle_t owner; /* owner window */
1933 user_handle_t next_sibling; /* next sibling in Z-order */
1934 user_handle_t prev_sibling; /* prev sibling in Z-order */
1935 user_handle_t first_sibling; /* first sibling in Z-order */
1936 user_handle_t last_sibling; /* last sibling in Z-order */
1937 user_handle_t first_child; /* first child */
1938 user_handle_t last_child; /* last child */
1941 /* Set the position and Z order of a window */
1942 @REQ(set_window_pos)
1943 user_handle_t handle; /* handle to the window */
1944 user_handle_t previous; /* previous window in Z order */
1945 unsigned int flags; /* SWP_* flags */
1946 rectangle_t window; /* window rectangle */
1947 rectangle_t client; /* client rectangle */
1948 VARARG(valid,rectangles); /* valid rectangles from WM_NCCALCSIZE */
1950 unsigned int new_style; /* new window style */
1954 /* Get the window and client rectangles of a window */
1955 @REQ(get_window_rectangles)
1956 user_handle_t handle; /* handle to the window */
1958 rectangle_t window; /* window rectangle */
1959 rectangle_t visible; /* visible part of the window rectangle */
1960 rectangle_t client; /* client rectangle */
1964 /* Get the window text */
1965 @REQ(get_window_text)
1966 user_handle_t handle; /* handle to the window */
1968 VARARG(text,unicode_str); /* window text */
1972 /* Set the window text */
1973 @REQ(set_window_text)
1974 user_handle_t handle; /* handle to the window */
1975 VARARG(text,unicode_str); /* window text */
1979 /* Get the coordinates offset between two windows */
1980 @REQ(get_windows_offset)
1981 user_handle_t from; /* handle to the first window */
1982 user_handle_t to; /* handle to the second window */
1984 int x; /* x coordinate offset */
1985 int y; /* y coordinate offset */
1989 /* Get the visible region of a window */
1990 @REQ(get_visible_region)
1991 user_handle_t window; /* handle to the window */
1992 unsigned int flags; /* DCX flags */
1994 user_handle_t top_win; /* top window to clip against */
1995 int top_org_x; /* top window visible rect origin in screen coords */
1997 int win_org_x; /* window rect origin in screen coords */
1999 data_size_t total_size; /* total size of the resulting region */
2000 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2004 /* Get the window region */
2005 @REQ(get_window_region)
2006 user_handle_t window; /* handle to the window */
2008 data_size_t total_size; /* total size of the resulting region */
2009 VARARG(region,rectangles); /* list of rectangles for the region */
2013 /* Set the window region */
2014 @REQ(set_window_region)
2015 user_handle_t window; /* handle to the window */
2016 VARARG(region,rectangles); /* list of rectangles for the region */
2020 /* Get the window update region */
2021 @REQ(get_update_region)
2022 user_handle_t window; /* handle to the window */
2023 user_handle_t from_child; /* child to start searching from */
2024 unsigned int flags; /* update flags (see below) */
2026 user_handle_t child; /* child to repaint (or window itself) */
2027 unsigned int flags; /* resulting update flags (see below) */
2028 data_size_t total_size; /* total size of the resulting region */
2029 VARARG(region,rectangles); /* list of rectangles for the region */
2031 #define UPDATE_NONCLIENT 0x01 /* get region for repainting non-client area */
2032 #define UPDATE_ERASE 0x02 /* get region for erasing client area */
2033 #define UPDATE_PAINT 0x04 /* get region for painting client area */
2034 #define UPDATE_INTERNALPAINT 0x08 /* get region if internal paint is pending */
2035 #define UPDATE_ALLCHILDREN 0x10 /* force repaint of all children */
2036 #define UPDATE_NOCHILDREN 0x20 /* don't try to repaint any children
*/
2037 #define UPDATE_NOREGION
0x40 /* don
't return a region, only the flags */
2040 /* Update the z order of a window so that a given rectangle is fully visible */
2041 @REQ(update_window_zorder)
2042 user_handle_t window; /* handle to the window */
2043 rectangle_t rect; /* rectangle that must be visible */
2047 /* Mark parts of a window as needing a redraw */
2049 user_handle_t window; /* handle to the window */
2050 unsigned int flags; /* RDW_* flags */
2051 VARARG(region,rectangles); /* list of rectangles for the region */
2055 /* Set a window property */
2056 @REQ(set_window_property)
2057 user_handle_t window; /* handle to the window */
2058 atom_t atom; /* property atom (if no name specified) */
2059 obj_handle_t handle; /* handle to store */
2060 VARARG(name,unicode_str); /* property name */
2064 /* Remove a window property */
2065 @REQ(remove_window_property)
2066 user_handle_t window; /* handle to the window */
2067 atom_t atom; /* property atom (if no name specified) */
2068 VARARG(name,unicode_str); /* property name */
2070 obj_handle_t handle; /* handle stored in property */
2074 /* Get a window property */
2075 @REQ(get_window_property)
2076 user_handle_t window; /* handle to the window */
2077 atom_t atom; /* property atom (if no name specified) */
2078 VARARG(name,unicode_str); /* property name */
2080 obj_handle_t handle; /* handle stored in property */
2084 /* Get the list of properties of a window */
2085 @REQ(get_window_properties)
2086 user_handle_t window; /* handle to the window */
2088 int total; /* total number of properties */
2089 VARARG(props,properties); /* list of properties */
2093 /* Create a window station */
2094 @REQ(create_winstation)
2095 unsigned int flags; /* window station flags */
2096 unsigned int access; /* wanted access rights */
2097 unsigned int attributes; /* object attributes */
2098 VARARG(name,unicode_str); /* object name */
2100 obj_handle_t handle; /* handle to the window station */
2104 /* Open a handle to a window station */
2105 @REQ(open_winstation)
2106 unsigned int access; /* wanted access rights */
2107 unsigned int attributes; /* object attributes */
2108 VARARG(name,unicode_str); /* object name */
2110 obj_handle_t handle; /* handle to the window station */
2114 /* Close a window station */
2115 @REQ(close_winstation)
2116 obj_handle_t handle; /* handle to the window station */
2120 /* Get the process current window station */
2121 @REQ(get_process_winstation)
2123 obj_handle_t handle; /* handle to the window station */
2127 /* Set the process current window station */
2128 @REQ(set_process_winstation)
2129 obj_handle_t handle; /* handle to the window station */
2133 /* Create a desktop */
2134 @REQ(create_desktop)
2135 unsigned int flags; /* desktop flags */
2136 unsigned int access; /* wanted access rights */
2137 unsigned int attributes; /* object attributes */
2138 VARARG(name,unicode_str); /* object name */
2140 obj_handle_t handle; /* handle to the desktop */
2144 /* Open a handle to a desktop */
2146 unsigned int flags; /* desktop flags */
2147 unsigned int access; /* wanted access rights */
2148 unsigned int attributes; /* object attributes */
2149 VARARG(name,unicode_str); /* object name */
2151 obj_handle_t handle; /* handle to the desktop */
2155 /* Close a desktop */
2157 obj_handle_t handle; /* handle to the desktop */
2161 /* Get the thread current desktop */
2162 @REQ(get_thread_desktop)
2163 thread_id_t tid; /* thread id */
2165 obj_handle_t handle; /* handle to the desktop */
2169 /* Set the thread current desktop */
2170 @REQ(set_thread_desktop)
2171 obj_handle_t handle; /* handle to the desktop */
2175 /* Get/set information about a user object (window station or desktop) */
2176 @REQ(set_user_object_info)
2177 obj_handle_t handle; /* handle to the object */
2178 unsigned int flags; /* information to set */
2179 unsigned int obj_flags; /* new object flags */
2181 int is_desktop; /* is object a desktop? */
2182 unsigned int old_obj_flags; /* old object flags */
2183 VARARG(name,unicode_str); /* object name */
2185 #define SET_USER_OBJECT_FLAGS 1
2188 /* Attach (or detach) thread inputs */
2189 @REQ(attach_thread_input)
2190 thread_id_t tid_from; /* thread to be attached */
2191 thread_id_t tid_to; /* thread to which tid_from should be attached */
2192 int attach; /* is it an attach? */
2196 /* Get input data for a given thread */
2197 @REQ(get_thread_input)
2198 thread_id_t tid; /* id of thread */
2200 user_handle_t focus; /* handle to the focus window */
2201 user_handle_t capture; /* handle to the capture window */
2202 user_handle_t active; /* handle to the active window */
2203 user_handle_t foreground; /* handle to the global foreground window */
2204 user_handle_t menu_owner; /* handle to the menu owner */
2205 user_handle_t move_size; /* handle to the moving/resizing window */
2206 user_handle_t caret; /* handle to the caret window */
2207 rectangle_t rect; /* caret rectangle */
2211 /* Get the time of the last input event */
2212 @REQ(get_last_input_time)
2218 /* Retrieve queue keyboard state for a given thread */
2220 thread_id_t tid; /* id of thread */
2221 int key; /* optional key code or -1 */
2223 unsigned char state; /* state of specified key */
2224 VARARG(keystate,bytes); /* state array for all the keys */
2227 /* Set queue keyboard state for a given thread */
2229 thread_id_t tid; /* id of thread */
2230 VARARG(keystate,bytes); /* state array for all the keys */
2233 /* Set the system foreground window */
2234 @REQ(set_foreground_window)
2235 user_handle_t handle; /* handle to the foreground window */
2237 user_handle_t previous; /* handle to the previous foreground window */
2238 int send_msg_old; /* whether we have to send a msg to the old window */
2239 int send_msg_new; /* whether we have to send a msg to the new window */
2242 /* Set the current thread focus window */
2243 @REQ(set_focus_window)
2244 user_handle_t handle; /* handle to the focus window */
2246 user_handle_t previous; /* handle to the previous focus window */
2249 /* Set the current thread active window */
2250 @REQ(set_active_window)
2251 user_handle_t handle; /* handle to the active window */
2253 user_handle_t previous; /* handle to the previous active window */
2256 /* Set the current thread capture window */
2257 @REQ(set_capture_window)
2258 user_handle_t handle; /* handle to the capture window */
2259 unsigned int flags; /* capture flags (see below) */
2261 user_handle_t previous; /* handle to the previous capture window */
2262 user_handle_t full_handle; /* full 32-bit handle of new capture window */
2264 #define CAPTURE_MENU 0x01 /* capture is for a menu */
2265 #define CAPTURE_MOVESIZE 0x02 /* capture is for moving/resizing */
2268 /* Set the current thread caret window */
2269 @REQ(set_caret_window)
2270 user_handle_t handle; /* handle to the caret window */
2271 int width; /* caret width */
2272 int height; /* caret height */
2274 user_handle_t previous; /* handle to the previous caret window */
2275 rectangle_t old_rect; /* previous caret rectangle */
2276 int old_hide; /* previous hide count */
2277 int old_state; /* previous caret state (1=on, 0=off) */
2281 /* Set the current thread caret information */
2282 @REQ(set_caret_info)
2283 unsigned int flags; /* caret flags (see below) */
2284 user_handle_t handle; /* handle to the caret window */
2285 int x; /* caret x position */
2286 int y; /* caret y position */
2287 int hide; /* increment for hide count (can be negative to show it) */
2288 int state; /* caret state (1=on, 0=off, -1=toggle current state) */
2290 user_handle_t full_handle; /* handle to the current caret window */
2291 rectangle_t old_rect; /* previous caret rectangle */
2292 int old_hide; /* previous hide count */
2293 int old_state; /* previous caret state (1=on, 0=off) */
2295 #define SET_CARET_POS 0x01 /* set the caret position from x,y */
2296 #define SET_CARET_HIDE 0x02 /* increment the caret hide count */
2297 #define SET_CARET_STATE 0x04 /* set the caret on/off state */
2300 /* Set a window hook */
2302 int id; /* id of the hook */
2303 process_id_t pid; /* id of process to set the hook into */
2304 thread_id_t tid; /* id of thread to set the hook into */
2308 void* proc; /* hook procedure */
2309 int unicode; /* is it a unicode hook? */
2310 VARARG(module,unicode_str); /* module name */
2312 user_handle_t handle; /* handle to the hook */
2313 unsigned int active_hooks; /* active hooks bitmap */
2317 /* Remove a window hook */
2319 user_handle_t handle; /* handle to the hook */
2320 int id; /* id of the hook if handle is 0 */
2321 void* proc; /* hook procedure if handle is 0 */
2323 unsigned int active_hooks; /* active hooks bitmap */
2327 /* Start calling a hook chain */
2328 @REQ(start_hook_chain)
2329 int id; /* id of the hook */
2330 int event; /* signalled event */
2331 user_handle_t window; /* handle to the event window */
2332 int object_id; /* object id for out of context winevent */
2333 int child_id; /* child id for out of context winevent */
2335 user_handle_t handle; /* handle to the next hook */
2336 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2337 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2338 void* proc; /* hook procedure */
2339 int unicode; /* is it a unicode hook? */
2340 unsigned int active_hooks; /* active hooks bitmap */
2341 VARARG(module,unicode_str); /* module name */
2345 /* Finished calling a hook chain */
2346 @REQ(finish_hook_chain)
2347 int id; /* id of the hook */
2351 /* Get the next hook to call */
2353 user_handle_t handle; /* handle to the current hook */
2354 int event; /* signalled event */
2355 user_handle_t window; /* handle to the event window */
2356 int object_id; /* object id for out of context winevent */
2357 int child_id; /* child id for out of context winevent */
2359 user_handle_t next; /* handle to the next hook */
2360 int id; /* id of the next hook */
2361 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2362 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2363 void* proc; /* next hook procedure */
2364 int prev_unicode; /* was the previous a unicode hook? */
2365 int next_unicode; /* is the next a unicode hook? */
2366 VARARG(module,unicode_str); /* module name */
2370 /* Create a window class */
2372 int local; /* is it a local class? */
2373 atom_t atom; /* class atom */
2374 unsigned int style; /* class style */
2375 void* instance; /* module instance */
2376 int extra; /* number of extra class bytes */
2377 int win_extra; /* number of window extra bytes */
2378 void* client_ptr; /* pointer to class in client address space */
2382 /* Destroy a window class */
2384 atom_t atom; /* class atom */
2385 void* instance; /* module instance */
2387 void* client_ptr; /* pointer to class in client address space */
2391 /* Set some information in a class */
2392 @REQ(set_class_info)
2393 user_handle_t window; /* handle to the window */
2394 unsigned int flags; /* flags for info to set (see below) */
2395 atom_t atom; /* class atom */
2396 unsigned int style; /* class style */
2397 int win_extra; /* number of window extra bytes */
2398 void* instance; /* module instance */
2399 int extra_offset; /* offset to set in extra bytes */
2400 data_size_t extra_size; /* size to set in extra bytes */
2401 unsigned long extra_value; /* value to set in extra bytes */
2403 atom_t old_atom; /* previous class atom */
2404 unsigned int old_style; /* previous class style */
2405 int old_extra; /* previous number of class extra bytes */
2406 int old_win_extra; /* previous number of window extra bytes */
2407 void* old_instance; /* previous module instance */
2408 unsigned long old_extra_value; /* old value in extra bytes */
2410 #define SET_CLASS_ATOM 0x0001
2411 #define SET_CLASS_STYLE 0x0002
2412 #define SET_CLASS_WINEXTRA 0x0004
2413 #define SET_CLASS_INSTANCE 0x0008
2414 #define SET_CLASS_EXTRA 0x0010
2417 /* Set/get clipboard information */
2418 @REQ(set_clipboard_info)
2419 unsigned int flags; /* flags for fields to set (see below) */
2420 user_handle_t clipboard; /* clipboard window */
2421 user_handle_t owner; /* clipboard owner */
2422 user_handle_t viewer; /* first clipboard viewer */
2423 unsigned int seqno; /* change sequence number */
2425 unsigned int flags; /* status flags (see below) */
2426 user_handle_t old_clipboard; /* old clipboard window */
2427 user_handle_t old_owner; /* old clipboard owner */
2428 user_handle_t old_viewer; /* old clipboard viewer */
2429 unsigned int seqno; /* current sequence number */
2432 #define SET_CB_OPEN 0x001
2433 #define SET_CB_OWNER 0x002
2434 #define SET_CB_VIEWER 0x004
2435 #define SET_CB_SEQNO 0x008
2436 #define SET_CB_RELOWNER 0x010
2437 #define SET_CB_CLOSE 0x020
2438 #define CB_OPEN 0x040
2439 #define CB_OWNER 0x080
2440 #define CB_PROCESS 0x100
2443 /* Open a security token */
2445 obj_handle_t handle; /* handle to the thread or process */
2446 unsigned int access; /* access rights to the new token */
2447 unsigned int attributes;/* object attributes */
2448 unsigned int flags; /* flags (see below) */
2450 obj_handle_t token; /* handle to the token */
2452 #define OPEN_TOKEN_THREAD 1
2453 #define OPEN_TOKEN_AS_SELF 2
2456 /* Set/get the global windows */
2457 @REQ(set_global_windows)
2458 unsigned int flags; /* flags for fields to set (see below) */
2459 user_handle_t shell_window; /* handle to the new shell window */
2460 user_handle_t shell_listview; /* handle to the new shell listview window */
2461 user_handle_t progman_window; /* handle to the new program manager window */
2462 user_handle_t taskman_window; /* handle to the new task manager window */
2464 user_handle_t old_shell_window; /* handle to the shell window */
2465 user_handle_t old_shell_listview; /* handle to the shell listview window */
2466 user_handle_t old_progman_window; /* handle to the new program manager window */
2467 user_handle_t old_taskman_window; /* handle to the new task manager window */
2469 #define SET_GLOBAL_SHELL_WINDOWS 0x01 /* set both main shell and listview windows */
2470 #define SET_GLOBAL_PROGMAN_WINDOW 0x02
2471 #define SET_GLOBAL_TASKMAN_WINDOW 0x04
2473 /* Adjust the privileges held by a token */
2474 @REQ(adjust_token_privileges)
2475 obj_handle_t handle; /* handle to the token */
2476 int disable_all; /* disable all privileges? */
2477 int get_modified_state; /* get modified privileges? */
2478 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to enable/disable/remove */
2480 unsigned int len; /* total length in bytes required to store token privileges */
2481 VARARG(privileges,LUID_AND_ATTRIBUTES); /* modified privileges */
2484 /* Retrieves the set of privileges held by or available to a token */
2485 @REQ(get_token_privileges)
2486 obj_handle_t handle; /* handle to the token */
2488 unsigned int len; /* total length in bytes required to store token privileges */
2489 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
2492 /* Check the token has the required privileges */
2493 @REQ(check_token_privileges)
2494 obj_handle_t handle; /* handle to the token */
2495 int all_required; /* are all the privileges required for the check to succeed? */
2496 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to check */
2498 int has_privileges; /* does the token have the required privileges? */
2499 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
2502 @REQ(duplicate_token)
2503 obj_handle_t handle; /* handle to the token to duplicate */
2504 unsigned int access; /* access rights to the new token */
2505 unsigned int attributes; /* object attributes */
2506 int primary; /* is the new token to be a primary one? */
2507 int impersonation_level; /* impersonation level of the new token */
2509 obj_handle_t new_handle; /* duplicated handle */
2513 obj_handle_t handle; /* handle to the token */
2514 unsigned int desired_access; /* desired access to the object */
2515 unsigned int mapping_read; /* mapping from generic read to specific rights */
2516 unsigned int mapping_write; /* mapping from generic write to specific rights */
2517 unsigned int mapping_execute; /* mapping from generic execute to specific rights */
2518 unsigned int mapping_all; /* mapping from generic all to specific rights */
2519 VARARG(sd,security_descriptor); /* security descriptor to check */
2521 unsigned int access_granted; /* access rights actually granted */
2522 unsigned int access_status; /* was access granted? */
2523 unsigned int privileges_len; /* length needed to store privileges */
2524 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges used during access check */
2527 @REQ(get_token_user)
2528 obj_handle_t handle; /* handle to the token */
2530 data_size_t user_len; /* length needed to store user */
2531 VARARG(user,SID); /* sid of the user the token represents */
2534 @REQ(get_token_groups)
2535 obj_handle_t handle; /* handle to the token */
2537 data_size_t user_len; /* length needed to store user */
2538 VARARG(user,token_groups); /* groups the token's user belongs to
*/
2541 /* Create a mailslot
*/
2542 @
REQ(create_mailslot
)
2543 unsigned int access
; /* wanted access rights
*/
2544 unsigned int attributes
; /* object attributes
*/
2545 obj_handle_t rootdir
; /* root directory
*/
2546 unsigned int max_msgsize
;
2548 VARARG(name
,unicode_str
); /* mailslot name
*/
2550 obj_handle_t handle
; /* handle to the mailslot
*/
2554 /* Open an existing mailslot
*/
2556 unsigned int access
;
2557 unsigned int attributes
; /* object attributes
*/
2558 obj_handle_t rootdir
; /* root directory
*/
2559 unsigned int sharing
; /* sharing mode
*/
2560 VARARG(name
,unicode_str
); /* mailslot name
*/
2562 obj_handle_t handle
; /* handle to the mailslot
*/
2566 /* Set mailslot information
*/
2567 @
REQ(set_mailslot_info
)
2568 obj_handle_t handle
; /* handle to the mailslot
*/
2572 unsigned int max_msgsize
;
2574 unsigned int msg_count
;
2575 unsigned int next_msgsize
;
2577 #define MAILSLOT_SET_READ_TIMEOUT
1
2580 /* Create a directory object
*/
2581 @
REQ(create_directory
)
2582 unsigned int access
; /* access flags
*/
2583 unsigned int attributes
; /* object attributes
*/
2584 obj_handle_t rootdir
; /* root directory
*/
2585 VARARG(directory_name
,unicode_str
); /* Directory name
*/
2587 obj_handle_t handle
; /* handle to the directory
*/
2591 /* Open a directory object
*/
2592 @
REQ(open_directory
)
2593 unsigned int access
; /* access flags
*/
2594 unsigned int attributes
; /* object attributes
*/
2595 obj_handle_t rootdir
; /* root directory
*/
2596 VARARG(directory_name
,unicode_str
); /* Directory name
*/
2598 obj_handle_t handle
; /* handle to the directory
*/
2602 /* Create a symbolic link object
*/
2603 @
REQ(create_symlink
)
2604 unsigned int access
; /* access flags
*/
2605 unsigned int attributes
; /* object attributes
*/
2606 obj_handle_t rootdir
; /* root directory
*/
2607 data_size_t name_len
; /* length of the symlink name in bytes
*/
2608 VARARG(name
,unicode_str
,name_len
); /* symlink name
*/
2609 VARARG(target_name
,unicode_str
); /* target name
*/
2611 obj_handle_t handle
; /* handle to the symlink
*/
2615 /* Open a symbolic link object
*/
2617 unsigned int access
; /* access flags
*/
2618 unsigned int attributes
; /* object attributes
*/
2619 obj_handle_t rootdir
; /* root directory
*/
2620 VARARG(name
,unicode_str
); /* symlink name
*/
2622 obj_handle_t handle
; /* handle to the symlink
*/
2626 /* Query a symbolic link object
*/
2628 obj_handle_t handle
; /* handle to the symlink
*/
2630 VARARG(target_name
,unicode_str
); /* target name
*/