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 #define MAX_ACL_LEN
65535
183 struct security_descriptor
185 unsigned int control
; /* SE_ flags
*/
190 /* VARARGS(owner
,SID
); */
191 /* VARARGS(group
,SID
); */
192 /* VARARGS(sacl
,ACL
); */
193 /* VARARGS(dacl
,ACL
); */
196 /****************************************************************/
197 /* Request declarations
*/
199 /* Create a new process from the context of the parent
*/
201 int inherit_all
; /* inherit all handles from parent
*/
202 unsigned int create_flags
; /* creation flags
*/
203 int unix_pid
; /* Unix pid of new process
*/
204 obj_handle_t exe_file
; /* file handle for main exe
*/
205 obj_handle_t hstdin
; /* handle for stdin
*/
206 obj_handle_t hstdout
; /* handle for stdout
*/
207 obj_handle_t hstderr
; /* handle for stderr
*/
208 VARARG(info
,startup_info
); /* startup information
*/
209 VARARG(env
,unicode_str
); /* environment for new process
*/
211 obj_handle_t info
; /* new process info handle
*/
215 /* Retrieve information about a newly started process
*/
216 @
REQ(get_new_process_info
)
217 obj_handle_t info
; /* info handle returned from new_process_request
*/
218 int pinherit
; /* process handle inherit flag
*/
219 int tinherit
; /* thread handle inherit flag
*/
221 process_id_t pid
; /* process id
*/
222 obj_handle_t phandle
; /* process
handle (in the current process
) */
223 thread_id_t tid
; /* thread id
*/
224 obj_handle_t thandle
; /* thread
handle (in the current process
) */
225 int success
; /* did the process start successfully?
*/
229 /* Create a new thread from the context of the parent
*/
231 int suspend
; /* new thread should be suspended on creation
*/
232 int inherit
; /* inherit flag
*/
233 int request_fd
; /* fd for request pipe
*/
235 thread_id_t tid
; /* thread id
*/
236 obj_handle_t handle
; /* thread
handle (in the current process
) */
240 /* Retrieve the new process startup info
*/
241 @
REQ(get_startup_info
)
243 unsigned int create_flags
; /* creation flags
*/
244 obj_handle_t exe_file
; /* file handle for main exe
*/
245 obj_handle_t hstdin
; /* handle for stdin
*/
246 obj_handle_t hstdout
; /* handle for stdout
*/
247 obj_handle_t hstderr
; /* handle for stderr
*/
248 VARARG(info
,startup_info
); /* startup information
*/
249 VARARG(env
,unicode_str
); /* environment
*/
253 /* Signal the end of the process initialization
*/
254 @
REQ(init_process_done
)
255 void
* module
; /* main module base address
*/
256 size_t module_size
; /* main module size
*/
257 void
* entry
; /* process entry point
*/
258 void
* name
; /* ptr to ptr to
name (in process addr space
) */
259 obj_handle_t exe_file
; /* file handle for main exe
*/
260 int gui
; /* is it a GUI process?
*/
261 VARARG(filename
,unicode_str
); /* file name of main exe
*/
265 /* Initialize a thread
; called from the child after
fork()/clone() */
267 int unix_pid
; /* Unix pid of new thread
*/
268 int unix_tid
; /* Unix tid of new thread
*/
269 void
* teb
; /* TEB of new
thread (in thread address space
) */
270 void
* peb
; /* address of
PEB (in thread address space
) */
271 void
* entry
; /* thread entry
point (in thread address space
) */
272 void
* ldt_copy
; /* address of LDT
copy (in thread address space
) */
273 int reply_fd
; /* fd for reply pipe
*/
274 int wait_fd
; /* fd for blocking calls pipe
*/
275 int debug_level
; /* new debug level
*/
277 process_id_t pid
; /* process id of the new thread
's process */
278 thread_id_t tid; /* thread id of the new thread */
279 size_t info_size; /* total size of startup info */
280 time_t server_start; /* server start time */
281 int version; /* protocol version */
285 /* Terminate a process */
286 @REQ(terminate_process)
287 obj_handle_t handle; /* process handle to terminate */
288 int exit_code; /* process exit code */
290 int self; /* suicide? */
294 /* Terminate a thread */
295 @REQ(terminate_thread)
296 obj_handle_t handle; /* thread handle to terminate */
297 int exit_code; /* thread exit code */
299 int self; /* suicide? */
300 int last; /* last thread in this process? */
304 /* Retrieve information about a process */
305 @REQ(get_process_info)
306 obj_handle_t handle; /* process handle */
308 process_id_t pid; /* server process id */
309 process_id_t ppid; /* server process id of parent */
310 int exit_code; /* process exit code */
311 int priority; /* priority class */
312 int process_affinity; /* process affinity mask */
313 int system_affinity; /* system affinity mask */
314 void* peb; /* PEB address in process address space */
318 /* Set a process informations */
319 @REQ(set_process_info)
320 obj_handle_t handle; /* process handle */
321 int mask; /* setting mask (see below) */
322 int priority; /* priority class */
323 int affinity; /* affinity mask */
325 #define SET_PROCESS_INFO_PRIORITY 0x01
326 #define SET_PROCESS_INFO_AFFINITY 0x02
329 /* Retrieve information about a thread */
330 @REQ(get_thread_info)
331 obj_handle_t handle; /* thread handle */
332 thread_id_t tid_in; /* thread id (optional) */
334 process_id_t pid; /* server process id */
335 thread_id_t tid; /* server thread id */
336 void* teb; /* thread teb pointer */
337 int exit_code; /* thread exit code */
338 int priority; /* thread priority level */
339 int affinity; /* thread affinity mask */
340 time_t creation_time; /* thread creation time */
341 time_t exit_time; /* thread exit time */
345 /* Set a thread informations */
346 @REQ(set_thread_info)
347 obj_handle_t handle; /* thread handle */
348 int mask; /* setting mask (see below) */
349 int priority; /* priority class */
350 int affinity; /* affinity mask */
351 obj_handle_t token; /* impersonation token */
353 #define SET_THREAD_INFO_PRIORITY 0x01
354 #define SET_THREAD_INFO_AFFINITY 0x02
355 #define SET_THREAD_INFO_TOKEN 0x04
358 /* Retrieve information about a module */
360 obj_handle_t handle; /* process handle */
361 void* base_address; /* base address of module */
363 size_t size; /* module size */
365 VARARG(filename,unicode_str); /* file name of module */
369 /* Suspend a thread */
371 obj_handle_t handle; /* thread handle */
373 int count; /* new suspend count */
377 /* Resume a thread */
379 obj_handle_t handle; /* thread handle */
381 int count; /* new suspend count */
385 /* Notify the server that a dll has been loaded */
387 obj_handle_t handle; /* file handle */
388 void* base; /* base address */
389 size_t size; /* dll size */
390 int dbg_offset; /* debug info offset */
391 int dbg_size; /* debug info size */
392 void* name; /* ptr to ptr to name (in process addr space) */
393 VARARG(filename,unicode_str); /* file name of dll */
397 /* Notify the server that a dll is being unloaded */
399 void* base; /* base address */
403 /* Queue an APC for a thread */
405 obj_handle_t handle; /* thread handle */
406 int user; /* user or system apc? */
407 void* func; /* function to call */
408 void* arg1; /* params for function to call */
414 /* Get next APC to call */
416 int alertable; /* is thread alertable? */
418 void* func; /* function to call */
419 int type; /* function type */
420 void* arg1; /* function arguments */
424 enum apc_type { APC_NONE, APC_USER, APC_TIMER, APC_ASYNC_IO };
427 /* Close a handle for the current process */
429 obj_handle_t handle; /* handle to close */
431 int fd; /* associated fd to close */
435 /* Set a handle information */
436 @REQ(set_handle_info)
437 obj_handle_t handle; /* handle we are interested in */
438 int flags; /* new handle flags */
439 int mask; /* mask for flags to set */
441 int old_flags; /* old flag value */
445 /* Duplicate a handle */
447 obj_handle_t src_process; /* src process handle */
448 obj_handle_t src_handle; /* src handle to duplicate */
449 obj_handle_t dst_process; /* dst process handle */
450 unsigned int access; /* wanted access rights */
451 int inherit; /* inherit flag */
452 int options; /* duplicate options (see below) */
454 obj_handle_t handle; /* duplicated handle in dst process */
455 int fd; /* associated fd to close */
457 #define DUP_HANDLE_CLOSE_SOURCE DUPLICATE_CLOSE_SOURCE
458 #define DUP_HANDLE_SAME_ACCESS DUPLICATE_SAME_ACCESS
459 #define DUP_HANDLE_MAKE_GLOBAL 0x80000000 /* Not a Windows flag */
462 /* Open a handle to a process */
464 process_id_t pid; /* process id to open */
465 unsigned int access; /* wanted access rights */
466 int inherit; /* inherit flag */
468 obj_handle_t handle; /* handle to the process */
472 /* Open a handle to a thread */
474 thread_id_t tid; /* thread id to open */
475 unsigned int access; /* wanted access rights */
476 int inherit; /* inherit flag */
478 obj_handle_t handle; /* handle to the thread */
482 /* Wait for handles */
484 int flags; /* wait flags (see below) */
485 void* cookie; /* magic cookie to return to client */
486 obj_handle_t signal; /* object to signal (0 if none) */
487 abs_time_t timeout; /* absolute timeout */
488 VARARG(handles,handles); /* handles to select on */
491 #define SELECT_ALERTABLE 2
492 #define SELECT_INTERRUPTIBLE 4
493 #define SELECT_TIMEOUT 8
496 /* Create an event */
498 unsigned int access; /* wanted access rights */
499 int manual_reset; /* manual reset event */
500 int initial_state; /* initial state of the event */
501 int inherit; /* inherit flag */
502 VARARG(name,unicode_str); /* object name */
504 obj_handle_t handle; /* handle to the event */
507 /* Event operation */
509 obj_handle_t handle; /* handle to event */
510 int op; /* event operation (see below) */
512 enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT };
517 unsigned int access; /* wanted access rights */
518 int inherit; /* inherit flag */
519 VARARG(name,unicode_str); /* object name */
521 obj_handle_t handle; /* handle to the event */
527 unsigned int access; /* wanted access rights */
528 int owned; /* initially owned? */
529 int inherit; /* inherit flag */
530 VARARG(name,unicode_str); /* object name */
532 obj_handle_t handle; /* handle to the mutex */
536 /* Release a mutex */
538 obj_handle_t handle; /* handle to the mutex */
540 unsigned int prev_count; /* value of internal counter, before release */
546 unsigned int access; /* wanted access rights */
547 int inherit; /* inherit flag */
548 VARARG(name,unicode_str); /* object name */
550 obj_handle_t handle; /* handle to the mutex */
554 /* Create a semaphore */
555 @REQ(create_semaphore)
556 unsigned int access; /* wanted access rights */
557 unsigned int initial; /* initial count */
558 unsigned int max; /* maximum count */
559 int inherit; /* inherit flag */
560 VARARG(name,unicode_str); /* object name */
562 obj_handle_t handle; /* handle to the semaphore */
566 /* Release a semaphore */
567 @REQ(release_semaphore)
568 obj_handle_t handle; /* handle to the semaphore */
569 unsigned int count; /* count to add to semaphore */
571 unsigned int prev_count; /* previous semaphore count */
575 /* Open a semaphore */
577 unsigned int access; /* wanted access rights */
578 int inherit; /* inherit flag */
579 VARARG(name,unicode_str); /* object name */
581 obj_handle_t handle; /* handle to the semaphore */
587 unsigned int access; /* wanted access rights */
588 int inherit; /* inherit flag */
589 unsigned int sharing; /* sharing flags */
590 int create; /* file create action */
591 unsigned int options; /* file options */
592 unsigned int attrs; /* file attributes for creation */
593 VARARG(filename,string); /* file name */
595 obj_handle_t handle; /* handle to the file */
599 /* Allocate a file handle for a Unix fd */
600 @REQ(alloc_file_handle)
601 unsigned int access; /* wanted access rights */
602 int inherit; /* inherit flag */
603 int fd; /* file descriptor on the client side */
605 obj_handle_t handle; /* handle to the file */
609 /* Get a Unix fd to access a file */
611 obj_handle_t handle; /* handle to the file */
612 unsigned int access; /* wanted access rights */
614 int fd; /* file descriptor */
615 int removable; /* is device removable? (-1 if unknown) */
616 int flags; /* file read/write flags (see below) */
618 #define FD_FLAG_OVERLAPPED 0x01 /* fd opened in overlapped mode */
619 #define FD_FLAG_TIMEOUT 0x02 /* read/write is synchronous */
620 #define FD_FLAG_RECV_SHUTDOWN 0x04
621 #define FD_FLAG_SEND_SHUTDOWN 0x08
622 #define FD_FLAG_AVAILABLE 0x10 /* in overlap read/write operation,
623 * only handle available data (don't wait
) */
625 /* Set the cached file descriptor of a handle
*/
627 obj_handle_t handle
; /* handle we are interested in
*/
628 int fd
; /* file descriptor
*/
629 int removable
; /* is device removable?
(-1 if unknown
) */
631 int cur_fd
; /* current file descriptor
*/
635 /* Flush a file buffers
*/
637 obj_handle_t handle
; /* handle to the file
*/
639 obj_handle_t event
; /* event set when finished
*/
643 /* Lock a region of a file
*/
645 obj_handle_t handle
; /* handle to the file
*/
646 unsigned int offset_low
; /* offset of start of lock
*/
647 unsigned int offset_high
; /* offset of start of lock
*/
648 unsigned int count_low
; /* count of bytes to lock
*/
649 unsigned int count_high
; /* count of bytes to lock
*/
650 int shared
; /* shared or exclusive lock?
*/
651 int wait
; /* do we want to wait?
*/
653 obj_handle_t handle
; /* handle to wait on
*/
654 int overlapped
; /* is it an overlapped I
/O handle?
*/
658 /* Unlock a region of a file
*/
660 obj_handle_t handle
; /* handle to the file
*/
661 unsigned int offset_low
; /* offset of start of unlock
*/
662 unsigned int offset_high
; /* offset of start of unlock
*/
663 unsigned int count_low
; /* count of bytes to unlock
*/
664 unsigned int count_high
; /* count of bytes to unlock
*/
668 /* Get ready to unmount a Unix device
*/
670 obj_handle_t handle
; /* handle to a file on the device
*/
674 /* Create a socket
*/
676 unsigned int access
; /* wanted access rights
*/
677 int inherit
; /* inherit flag
*/
678 int family
; /* family
, see socket manpage
*/
679 int type
; /* type
, see socket manpage
*/
680 int protocol
; /* protocol
, see socket manpage
*/
681 unsigned int flags
; /* socket flags
*/
683 obj_handle_t handle
; /* handle to the new socket
*/
687 /* Accept a socket
*/
689 obj_handle_t lhandle
; /* handle to the listening socket
*/
690 unsigned int access
; /* wanted access rights
*/
691 int inherit
; /* inherit flag
*/
693 obj_handle_t handle
; /* handle to the new socket
*/
697 /* Set socket event parameters
*/
698 @
REQ(set_socket_event
)
699 obj_handle_t handle
; /* handle to the socket
*/
700 unsigned int mask
; /* event mask
*/
701 obj_handle_t event
; /* event object
*/
702 user_handle_t window
; /* window to send the message to
*/
703 unsigned int msg
; /* message to send
*/
707 /* Get socket event parameters
*/
708 @
REQ(get_socket_event
)
709 obj_handle_t handle
; /* handle to the socket
*/
710 int service
; /* clear pending?
*/
711 obj_handle_t c_event
; /* event to clear
*/
713 unsigned int mask
; /* event mask
*/
714 unsigned int pmask
; /* pending events
*/
715 unsigned int state
; /* status bits
*/
716 VARARG(errors
,ints
); /* event errors
*/
720 /* Reenable pending socket events
*/
721 @
REQ(enable_socket_event
)
722 obj_handle_t handle
; /* handle to the socket
*/
723 unsigned int mask
; /* events to re
-enable
*/
724 unsigned int sstate
; /* status bits to set
*/
725 unsigned int cstate
; /* status bits to clear
*/
728 @
REQ(set_socket_deferred
)
729 obj_handle_t handle
; /* handle to the socket
*/
730 obj_handle_t deferred
; /* handle to the socket for which
accept() is deferred
*/
733 /* Allocate a
console (only used by a console renderer
) */
735 unsigned int access
; /* wanted access rights
*/
736 int inherit
; /* inherit flag
*/
737 process_id_t pid
; /* pid of process which shall be attached to the console
*/
739 obj_handle_t handle_in
; /* handle to console input
*/
740 obj_handle_t event
; /* handle to renderer events change notification
*/
744 /* Free the console of the current process
*/
749 #define CONSOLE_RENDERER_NONE_EVENT
0x00
750 #define CONSOLE_RENDERER_TITLE_EVENT
0x01
751 #define CONSOLE_RENDERER_ACTIVE_SB_EVENT
0x02
752 #define CONSOLE_RENDERER_SB_RESIZE_EVENT
0x03
753 #define CONSOLE_RENDERER_UPDATE_EVENT
0x04
754 #define CONSOLE_RENDERER_CURSOR_POS_EVENT
0x05
755 #define CONSOLE_RENDERER_CURSOR_GEOM_EVENT
0x06
756 #define CONSOLE_RENDERER_DISPLAY_EVENT
0x07
757 #define CONSOLE_RENDERER_EXIT_EVENT
0x08
758 struct console_renderer_event
793 /* retrieve console events for the renderer
*/
794 @
REQ(get_console_renderer_events
)
795 obj_handle_t handle
; /* handle to console input events
*/
797 VARARG(data
,bytes
); /* the various console_renderer_events
*/
801 /* Open a handle to the process console
*/
803 int from
; /* 0 (resp
1) input (resp output
) of current process console
*/
804 /* otherwise console_in handle to get active screen buffer?
*/
805 unsigned int access
; /* wanted access rights
*/
806 int inherit
; /* inherit flag
*/
807 int share
; /* share
mask (only for output handles
) */
809 obj_handle_t handle
; /* handle to the console
*/
813 /* Get the input queue wait event
*/
814 @
REQ(get_console_wait_event
)
819 /* Get a console
mode (input or output
) */
820 @
REQ(get_console_mode
)
821 obj_handle_t handle
; /* handle to the console
*/
823 int mode
; /* console mode
*/
827 /* Set a console
mode (input or output
) */
828 @
REQ(set_console_mode
)
829 obj_handle_t handle
; /* handle to the console
*/
830 int mode
; /* console mode
*/
834 /* Set info about a
console (input only
) */
835 @
REQ(set_console_input_info
)
836 obj_handle_t handle
; /* handle to console input
, or
0 for process
' console */
837 int mask; /* setting mask (see below) */
838 obj_handle_t active_sb; /* active screen buffer */
839 int history_mode; /* whether we duplicate lines in history */
840 int history_size; /* number of lines in history */
841 int edition_mode; /* index to the edition mode flavors */
842 VARARG(title,unicode_str); /* console title */
844 #define SET_CONSOLE_INPUT_INFO_ACTIVE_SB 0x01
845 #define SET_CONSOLE_INPUT_INFO_TITLE 0x02
846 #define SET_CONSOLE_INPUT_INFO_HISTORY_MODE 0x04
847 #define SET_CONSOLE_INPUT_INFO_HISTORY_SIZE 0x08
848 #define SET_CONSOLE_INPUT_INFO_EDITION_MODE 0x10
851 /* Get info about a console (input only) */
852 @REQ(get_console_input_info)
853 obj_handle_t handle; /* handle to console input, or 0 for process' console
*/
855 int history_mode
; /* whether we duplicate lines in history
*/
856 int history_size
; /* number of lines in history
*/
857 int history_index
; /* number of used lines in history
*/
858 int edition_mode
; /* index to the edition mode flavors
*/
859 VARARG(title
,unicode_str
); /* console title
*/
863 /* appends a string to console
's history */
864 @REQ(append_console_input_history)
865 obj_handle_t handle; /* handle to console input, or 0 for process' console
*/
866 VARARG(line
,unicode_str
); /* line to add
*/
870 /* appends a string to console
's history */
871 @REQ(get_console_input_history)
872 obj_handle_t handle; /* handle to console input, or 0 for process' console
*/
873 int index
; /* index to get line from
*/
875 int total
; /* total length of line in Unicode chars
*/
876 VARARG(line
,unicode_str
); /* line to add
*/
880 /* creates a new screen buffer on process
' console */
881 @REQ(create_console_output)
882 obj_handle_t handle_in; /* handle to console input, or 0 for process' console
*/
883 int access
; /* wanted access rights
*/
884 int share
; /* sharing credentials
*/
885 int inherit
; /* inherit flag
*/
887 obj_handle_t handle_out
; /* handle to the screen buffer
*/
891 /* Set info about a
console (output only
) */
892 @
REQ(set_console_output_info
)
893 obj_handle_t handle
; /* handle to the console
*/
894 int mask
; /* setting
mask (see below
) */
895 short int cursor_size
; /* size of
cursor (percentage filled
) */
896 short int cursor_visible
;/* cursor visibility flag
*/
897 short int cursor_x
; /* position of
cursor (x
, y
) */
899 short int width
; /* width of the screen buffer
*/
900 short int height
; /* height of the screen buffer
*/
901 short int attr
; /* default attribute
*/
902 short int win_left
; /* window actually displayed by renderer
*/
903 short int win_top
; /* the rect area is expressed withing the
*/
904 short int win_right
; /* boundaries of the screen buffer
*/
905 short int win_bottom
;
906 short int max_width
; /* maximum
size (width x height
) for the window
*/
907 short int max_height
;
909 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_GEOM
0x01
910 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_POS
0x02
911 #define SET_CONSOLE_OUTPUT_INFO_SIZE
0x04
912 #define SET_CONSOLE_OUTPUT_INFO_ATTR
0x08
913 #define SET_CONSOLE_OUTPUT_INFO_DISPLAY_WINDOW
0x10
914 #define SET_CONSOLE_OUTPUT_INFO_MAX_SIZE
0x20
917 /* Get info about a
console (output only
) */
918 @
REQ(get_console_output_info
)
919 obj_handle_t handle
; /* handle to the console
*/
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
;
936 /* Add input records to a console input queue
*/
937 @
REQ(write_console_input
)
938 obj_handle_t handle
; /* handle to the console input
*/
939 VARARG(rec
,input_records
); /* input records
*/
941 int written
; /* number of records written
*/
945 /* Fetch input records from a console input queue
*/
946 @
REQ(read_console_input
)
947 obj_handle_t handle
; /* handle to the console input
*/
948 int flush
; /* flush the retrieved records from the queue?
*/
950 int read
; /* number of records read
*/
951 VARARG(rec
,input_records
); /* input records
*/
955 /* write
data (chars and
/or attributes
) in a screen buffer
*/
956 @
REQ(write_console_output
)
957 obj_handle_t handle
; /* handle to the console output
*/
958 int x
; /* position where to start writing
*/
960 int mode
; /* char
info (see below
) */
961 int wrap
; /* wrap around at end of line?
*/
962 VARARG(data
,bytes
); /* info to write
*/
964 int written
; /* number of char infos actually written
*/
965 int width
; /* width of screen buffer
*/
966 int height
; /* height of screen buffer
*/
970 CHAR_INFO_MODE_TEXT
, /* characters only
*/
971 CHAR_INFO_MODE_ATTR
, /* attributes only
*/
972 CHAR_INFO_MODE_TEXTATTR
, /* both characters and attributes
*/
973 CHAR_INFO_MODE_TEXTSTDATTR
/* characters but use standard attributes
*/
977 /* fill a screen buffer with constant
data (chars and
/or attributes
) */
978 @
REQ(fill_console_output
)
979 obj_handle_t handle
; /* handle to the console output
*/
980 int x
; /* position where to start writing
*/
982 int mode
; /* char info mode
*/
983 int count
; /* number to write
*/
984 int wrap
; /* wrap around at end of line?
*/
985 char_info_t data
; /* data to write
*/
987 int written
; /* number of char infos actually written
*/
991 /* read
data (chars and
/or attributes
) from a screen buffer
*/
992 @
REQ(read_console_output
)
993 obj_handle_t handle
; /* handle to the console output
*/
994 int x
; /* position (x
,y
) where to start reading
*/
996 int mode
; /* char info mode
*/
997 int wrap
; /* wrap around at end of line?
*/
999 int width
; /* width of screen buffer
*/
1000 int height
; /* height of screen buffer
*/
1005 /* move a
rect (of data
) in screen buffer content
*/
1006 @
REQ(move_console_output
)
1007 obj_handle_t handle
; /* handle to the console output
*/
1008 short int x_src
; /* position (x
, y
) of rect to start moving from
*/
1010 short int x_dst
; /* position (x
, y
) of rect to move to
*/
1012 short int w
; /* size of the
rect (width
, height
) to move
*/
1017 /* Sends a signal to a process group
*/
1018 @
REQ(send_console_signal
)
1019 int signal
; /* the signal to send
*/
1020 process_id_t group_id
; /* the group to send the signal to
*/
1024 /* Create a change notification
*/
1025 @
REQ(create_change_notification
)
1026 obj_handle_t handle
; /* handle to the directory
*/
1027 int subtree
; /* watch all the subtree
*/
1028 unsigned int filter
; /* notification filter
*/
1030 obj_handle_t handle
; /* handle to the change notification
*/
1034 /* Move to the next change notification
*/
1035 @
REQ(next_change_notification
)
1036 obj_handle_t handle
; /* handle to the change notification
*/
1039 /* Create a file mapping
*/
1040 @
REQ(create_mapping
)
1041 int size_high
; /* mapping size
*/
1042 int size_low
; /* mapping size
*/
1043 int protect
; /* protection
flags (see below
) */
1044 unsigned int access
; /* wanted access rights
*/
1045 int inherit
; /* inherit flag
*/
1046 obj_handle_t file_handle
; /* file handle
*/
1047 VARARG(name
,unicode_str
); /* object name
*/
1049 obj_handle_t handle
; /* handle to the mapping
*/
1051 /* protection flags
*/
1052 #define VPROT_READ
0x01
1053 #define VPROT_WRITE
0x02
1054 #define VPROT_EXEC
0x04
1055 #define VPROT_WRITECOPY
0x08
1056 #define VPROT_GUARD
0x10
1057 #define VPROT_NOCACHE
0x20
1058 #define VPROT_COMMITTED
0x40
1059 #define VPROT_IMAGE
0x80
1062 /* Open a mapping
*/
1064 unsigned int access
; /* wanted access rights
*/
1065 int inherit
; /* inherit flag
*/
1066 VARARG(name
,unicode_str
); /* object name
*/
1068 obj_handle_t handle
; /* handle to the mapping
*/
1072 /* Get information about a file mapping
*/
1073 @
REQ(get_mapping_info
)
1074 obj_handle_t handle
; /* handle to the mapping
*/
1076 int size_high
; /* mapping size
*/
1077 int size_low
; /* mapping size
*/
1078 int protect
; /* protection flags
*/
1079 int header_size
; /* header
size (for VPROT_IMAGE mapping
) */
1080 void
* base
; /* default base
addr (for VPROT_IMAGE mapping
) */
1081 obj_handle_t shared_file
; /* shared mapping file handle
*/
1082 int shared_size
; /* shared mapping size
*/
1086 #define SNAP_HEAPLIST
0x00000001
1087 #define SNAP_PROCESS
0x00000002
1088 #define SNAP_THREAD
0x00000004
1089 #define SNAP_MODULE
0x00000008
1090 /* Create a snapshot
*/
1091 @
REQ(create_snapshot
)
1092 int inherit
; /* inherit flag
*/
1093 int flags
; /* snapshot
flags (SNAP_*)
*/
1094 process_id_t pid
; /* process id
*/
1096 obj_handle_t handle
; /* handle to the snapshot
*/
1100 /* Get the next process from a snapshot
*/
1102 obj_handle_t handle
; /* handle to the snapshot
*/
1103 int reset
; /* reset snapshot position?
*/
1105 int count
; /* process usage count
*/
1106 process_id_t pid
; /* process id
*/
1107 process_id_t ppid
; /* parent process id
*/
1108 void
* heap
; /* heap base
*/
1109 void
* module
; /* main module
*/
1110 int threads
; /* number of threads
*/
1111 int priority
; /* process priority
*/
1112 int handles
; /* number of handles
*/
1113 VARARG(filename
,unicode_str
); /* file name of main exe
*/
1117 /* Get the next thread from a snapshot
*/
1119 obj_handle_t handle
; /* handle to the snapshot
*/
1120 int reset
; /* reset snapshot position?
*/
1122 int count
; /* thread usage count
*/
1123 process_id_t pid
; /* process id
*/
1124 thread_id_t tid
; /* thread id
*/
1125 int base_pri
; /* base priority
*/
1126 int delta_pri
; /* delta priority
*/
1130 /* Get the next module from a snapshot
*/
1132 obj_handle_t handle
; /* handle to the snapshot
*/
1133 int reset
; /* reset snapshot position?
*/
1135 process_id_t pid
; /* process id
*/
1136 void
* base
; /* module base address
*/
1137 size_t size
; /* module size
*/
1138 VARARG(filename
,unicode_str
); /* file name of module
*/
1142 /* Wait for a debug event
*/
1143 @
REQ(wait_debug_event
)
1144 int get_handle
; /* should we alloc a handle for waiting?
*/
1146 process_id_t pid
; /* process id
*/
1147 thread_id_t tid
; /* thread id
*/
1148 obj_handle_t wait
; /* wait handle if no event ready
*/
1149 VARARG(event
,debug_event
); /* debug event data
*/
1153 /* Queue an exception event
*/
1154 @
REQ(queue_exception_event
)
1155 int first
; /* first chance exception?
*/
1156 VARARG(record
,exc_event
); /* thread context followed by exception record
*/
1158 obj_handle_t handle
; /* handle to the queued event
*/
1162 /* Retrieve the status of an exception event
*/
1163 @
REQ(get_exception_status
)
1164 obj_handle_t handle
; /* handle to the queued event
*/
1166 int status
; /* event continuation status
*/
1167 VARARG(context
,context
); /* modified thread context
*/
1171 /* Send an output string to the debugger
*/
1172 @
REQ(output_debug_string
)
1173 void
* string
; /* string to
display (in debugged process address space
) */
1174 int unicode
; /* is it Unicode?
*/
1175 int length
; /* string length
*/
1179 /* Continue a debug event
*/
1180 @
REQ(continue_debug_event
)
1181 process_id_t pid
; /* process id to continue
*/
1182 thread_id_t tid
; /* thread id to continue
*/
1183 int status
; /* continuation status
*/
1187 /* Start
/stop debugging an existing process
*/
1189 process_id_t pid
; /* id of the process to debug
*/
1190 int attach
; /* 1=attaching
/ 0=detaching from the process
*/
1194 /* Simulate a breakpoint in a process
*/
1196 obj_handle_t handle
; /* process handle
*/
1198 int self
; /* was it the caller itself?
*/
1202 /* Set debugger kill on exit flag
*/
1203 @
REQ(set_debugger_kill_on_exit
)
1204 int kill_on_exit
; /* 0=detach
/1=kill debuggee when debugger dies
*/
1208 /* Read data from a process address space
*/
1209 @
REQ(read_process_memory
)
1210 obj_handle_t handle
; /* process handle
*/
1211 void
* addr
; /* addr to read from
*/
1213 VARARG(data
,bytes
); /* result data
*/
1217 /* Write data to a process address space
*/
1218 @
REQ(write_process_memory
)
1219 obj_handle_t handle
; /* process handle
*/
1220 void
* addr
; /* addr to write
to (must be int
-aligned
) */
1221 unsigned int first_mask
; /* mask for first word
*/
1222 unsigned int last_mask
; /* mask for last word
*/
1223 VARARG(data
,bytes
); /* data to write
*/
1227 /* Create a registry key
*/
1229 obj_handle_t parent
; /* handle to the parent key
*/
1230 unsigned int access
; /* desired access rights
*/
1231 unsigned int options
; /* creation options
*/
1232 time_t modif
; /* last modification time
*/
1233 size_t namelen
; /* length of key name in bytes
*/
1234 VARARG(name
,unicode_str
,namelen
); /* key name
*/
1235 VARARG(class
,unicode_str
); /* class name
*/
1237 obj_handle_t hkey
; /* handle to the created key
*/
1238 int created
; /* has it been newly created?
*/
1241 /* Open a registry key
*/
1243 obj_handle_t parent
; /* handle to the parent key
*/
1244 unsigned int access
; /* desired access rights
*/
1245 VARARG(name
,unicode_str
); /* key name
*/
1247 obj_handle_t hkey
; /* handle to the open key
*/
1251 /* Delete a registry key
*/
1253 obj_handle_t hkey
; /* handle to the key
*/
1257 /* Flush a registry key
*/
1259 obj_handle_t hkey
; /* handle to the key
*/
1263 /* Enumerate registry subkeys
*/
1265 obj_handle_t hkey
; /* handle to registry key
*/
1266 int index
; /* index of
subkey (or
-1 for current key
) */
1267 int info_class
; /* requested information class
*/
1269 int subkeys
; /* number of subkeys
*/
1270 int max_subkey
; /* longest subkey name
*/
1271 int max_class
; /* longest class name
*/
1272 int values
; /* number of values
*/
1273 int max_value
; /* longest value name
*/
1274 int max_data
; /* longest value data
*/
1275 time_t modif
; /* last modification time
*/
1276 size_t total
; /* total length needed for full name and class
*/
1277 size_t namelen
; /* length of key name in bytes
*/
1278 VARARG(name
,unicode_str
,namelen
); /* key name
*/
1279 VARARG(class
,unicode_str
); /* class name
*/
1283 /* Set a value of a registry key
*/
1285 obj_handle_t hkey
; /* handle to registry key
*/
1286 int type
; /* value type
*/
1287 size_t namelen
; /* length of value name in bytes
*/
1288 VARARG(name
,unicode_str
,namelen
); /* value name
*/
1289 VARARG(data
,bytes
); /* value data
*/
1293 /* Retrieve the value of a registry key
*/
1295 obj_handle_t hkey
; /* handle to registry key
*/
1296 VARARG(name
,unicode_str
); /* value name
*/
1298 int type
; /* value type
*/
1299 size_t total
; /* total length needed for data
*/
1300 VARARG(data
,bytes
); /* value data
*/
1304 /* Enumerate a value of a registry key
*/
1305 @
REQ(enum_key_value
)
1306 obj_handle_t hkey
; /* handle to registry key
*/
1307 int index
; /* value index
*/
1308 int info_class
; /* requested information class
*/
1310 int type
; /* value type
*/
1311 size_t total
; /* total length needed for full name and data
*/
1312 size_t namelen
; /* length of value name in bytes
*/
1313 VARARG(name
,unicode_str
,namelen
); /* value name
*/
1314 VARARG(data
,bytes
); /* value data
*/
1318 /* Delete a value of a registry key
*/
1319 @
REQ(delete_key_value
)
1320 obj_handle_t hkey
; /* handle to registry key
*/
1321 VARARG(name
,unicode_str
); /* value name
*/
1325 /* Load a registry branch from a file
*/
1327 obj_handle_t hkey
; /* root key to load to
*/
1328 obj_handle_t file
; /* file to load from
*/
1329 VARARG(name
,unicode_str
); /* subkey name
*/
1333 /* UnLoad a registry branch from a file
*/
1334 @
REQ(unload_registry
)
1335 obj_handle_t hkey
; /* root key to unload to
*/
1339 /* Save a registry branch to a file
*/
1341 obj_handle_t hkey
; /* key to save
*/
1342 obj_handle_t file
; /* file to save to
*/
1346 /* Add a registry key change notification
*/
1347 @
REQ(set_registry_notification
)
1348 obj_handle_t hkey
; /* key to watch for changes
*/
1349 obj_handle_t event
; /* event to set
*/
1350 int subtree
; /* should we watch the whole subtree?
*/
1351 unsigned int filter
; /* things to watch
*/
1355 /* Create a waitable timer
*/
1357 unsigned int access
; /* wanted access rights
*/
1358 int inherit
; /* inherit flag
*/
1359 int manual
; /* manual reset
*/
1360 VARARG(name
,unicode_str
); /* object name
*/
1362 obj_handle_t handle
; /* handle to the timer
*/
1366 /* Open a waitable timer
*/
1368 unsigned int access
; /* wanted access rights
*/
1369 int inherit
; /* inherit flag
*/
1370 VARARG(name
,unicode_str
); /* object name
*/
1372 obj_handle_t handle
; /* handle to the timer
*/
1375 /* Set a waitable timer
*/
1377 obj_handle_t handle
; /* handle to the timer
*/
1378 abs_time_t expire
; /* next expiration absolute time
*/
1379 int period
; /* timer period in ms
*/
1380 void
* callback
; /* callback function
*/
1381 void
* arg
; /* callback argument
*/
1383 int signaled
; /* was the timer signaled before this call ?
*/
1386 /* Cancel a waitable timer
*/
1388 obj_handle_t handle
; /* handle to the timer
*/
1390 int signaled
; /* was the timer signaled before this calltime ?
*/
1393 /* Get information on a waitable timer
*/
1394 @
REQ(get_timer_info
)
1395 obj_handle_t handle
; /* handle to the timer
*/
1397 abs_time_t when
; /* absolute time when the timer next expires
*/
1398 int signaled
; /* is the timer signaled?
*/
1402 /* Retrieve the current context of a thread
*/
1403 @
REQ(get_thread_context
)
1404 obj_handle_t handle
; /* thread handle
*/
1405 unsigned int flags
; /* context flags
*/
1407 VARARG(context
,context
); /* thread context
*/
1411 /* Set the current context of a thread
*/
1412 @
REQ(set_thread_context
)
1413 obj_handle_t handle
; /* thread handle
*/
1414 unsigned int flags
; /* context flags
*/
1415 VARARG(context
,context
); /* thread context
*/
1419 /* Fetch a selector entry for a thread
*/
1420 @
REQ(get_selector_entry
)
1421 obj_handle_t handle
; /* thread handle
*/
1422 int entry
; /* LDT entry
*/
1424 unsigned int base
; /* selector base
*/
1425 unsigned int limit
; /* selector limit
*/
1426 unsigned char flags
; /* selector flags
*/
1432 obj_handle_t table
; /* which table to add atom to
*/
1433 VARARG(name
,unicode_str
); /* atom name
*/
1435 atom_t atom
; /* resulting atom
*/
1439 /* Delete an atom
*/
1441 obj_handle_t table
; /* which table to delete atom from
*/
1442 atom_t atom
; /* atom handle
*/
1448 obj_handle_t table
; /* which table to find atom from
*/
1449 VARARG(name
,unicode_str
); /* atom name
*/
1451 atom_t atom
; /* atom handle
*/
1455 /* Get information about an atom
*/
1456 @
REQ(get_atom_information
)
1457 obj_handle_t table
; /* which table to find atom from
*/
1458 atom_t atom
; /* atom handle
*/
1460 int count
; /* atom lock count
*/
1461 int pinned
; /* whether the atom has been pinned
*/
1462 VARARG(name
,unicode_str
); /* atom name
*/
1466 /* Set information about an atom
*/
1467 @
REQ(set_atom_information
)
1468 obj_handle_t table
; /* which table to find atom from
*/
1469 atom_t atom
; /* atom handle
*/
1470 int pinned
; /* whether to bump atom information
*/
1474 /* Empty an atom table
*/
1475 @
REQ(empty_atom_table
)
1476 obj_handle_t table
; /* which table to find atom from
*/
1477 int if_pinned
; /* whether to delete pinned atoms
*/
1481 /* Init an atom table
*/
1482 @
REQ(init_atom_table
)
1483 int entries
; /* number of
entries (only for local
) */
1485 obj_handle_t table
; /* handle to the atom table
*/
1489 /* Get the message queue of the current thread
*/
1492 obj_handle_t handle
; /* handle to the queue
*/
1496 /* Set the current message queue wakeup mask
*/
1497 @
REQ(set_queue_mask
)
1498 unsigned int wake_mask
; /* wakeup bits mask
*/
1499 unsigned int changed_mask
; /* changed bits mask
*/
1500 int skip_wait
; /* will we skip waiting if signaled?
*/
1502 unsigned int wake_bits
; /* current wake bits
*/
1503 unsigned int changed_bits
; /* current changed bits
*/
1507 /* Get the current message queue status
*/
1508 @
REQ(get_queue_status
)
1509 int clear
; /* should we clear the change bits?
*/
1511 unsigned int wake_bits
; /* wake bits
*/
1512 unsigned int changed_bits
; /* changed bits since last time
*/
1516 /* Wait for a process to start waiting on input
*/
1517 @
REQ(wait_input_idle
)
1518 obj_handle_t handle
; /* process handle
*/
1519 int timeout
; /* timeout
*/
1521 obj_handle_t event
; /* handle to idle event
*/
1525 /* Send a message to a thread queue
*/
1527 thread_id_t id
; /* thread id
*/
1528 int type
; /* message
type (see below
) */
1529 int flags
; /* message
flags (see below
) */
1530 user_handle_t win
; /* window handle
*/
1531 unsigned int msg
; /* message code
*/
1532 unsigned int wparam
; /* parameters
*/
1533 unsigned int lparam
; /* parameters
*/
1534 int x
; /* x position
*/
1535 int y
; /* y position
*/
1536 unsigned int time
; /* message time
*/
1537 unsigned int info
; /* extra info
*/
1538 int timeout
; /* timeout for reply
*/
1539 void
* callback
; /* callback address
*/
1540 VARARG(data
,bytes
); /* message data for sent messages
*/
1545 MSG_ASCII
, /* Ascii
message (from SendMessageA
) */
1546 MSG_UNICODE
, /* Unicode
message (from SendMessageW
) */
1547 MSG_NOTIFY
, /* notify
message (from SendNotifyMessageW
), always Unicode
*/
1548 MSG_CALLBACK
, /* callback
message (from SendMessageCallbackW
), always Unicode
*/
1549 MSG_CALLBACK_RESULT
,/* result of a callback message
*/
1550 MSG_OTHER_PROCESS
, /* sent from other process
, may include vararg data
, always Unicode
*/
1551 MSG_POSTED
, /* posted
message (from PostMessageW
), always Unicode
*/
1552 MSG_HARDWARE
, /* hardware message
*/
1553 MSG_WINEVENT
/* winevent message
*/
1555 #define SEND_MSG_ABORT_IF_HUNG
0x01
1558 /* Get a message from the current queue
*/
1560 int flags
; /* see below
*/
1561 user_handle_t get_win
; /* window handle to get
*/
1562 unsigned int get_first
; /* first message code to get
*/
1563 unsigned int get_last
; /* last message code to get
*/
1564 unsigned int hw_id
; /* id of the previous hardware
message (or
0) */
1566 int type
; /* message type
*/
1567 user_handle_t win
; /* window handle
*/
1568 unsigned int msg
; /* message code
*/
1569 unsigned int wparam
; /* parameters (callback function for MSG_CALLBACK_RESULT
) */
1570 unsigned int lparam
; /* parameters (result for MSG_CALLBACK_RESULT
) */
1571 int x
; /* x position
*/
1572 int y
; /* y position
*/
1573 user_handle_t hook
; /* winevent hook handle
*/
1574 void
* hook_proc
; /* winevent hook proc address
*/
1575 unsigned int time
; /* message time
*/
1576 unsigned int info
; /* extra
info (callback argument for MSG_CALLBACK_RESULT
) */
1577 unsigned int hw_id
; /* id if hardware message
*/
1578 unsigned int active_hooks
; /* active hooks bitmap
*/
1579 size_t total
; /* total size of extra data
*/
1580 VARARG(data
,bytes
); /* message data for sent messages
*/
1582 #define GET_MSG_REMOVE
1 /* remove the message
*/
1583 #define GET_MSG_SENT_ONLY
2 /* only get sent messages
*/
1585 /* Reply to a sent message
*/
1587 unsigned int result
; /* message result
*/
1588 int remove
; /* should we remove the message?
*/
1589 VARARG(data
,bytes
); /* message data for sent messages
*/
1593 /* Accept the current hardware message
*/
1594 @
REQ(accept_hardware_message
)
1595 unsigned int hw_id
; /* id of the hardware message
*/
1596 int remove
; /* should we remove the message?
*/
1597 user_handle_t new_win
; /* new destination window for current message
*/
1601 /* Retrieve the reply for the last message sent
*/
1602 @
REQ(get_message_reply
)
1603 int cancel
; /* cancel message if not ready?
*/
1605 unsigned int result
; /* message result
*/
1606 VARARG(data
,bytes
); /* message data for sent messages
*/
1610 /* Set a window timer
*/
1612 user_handle_t win
; /* window handle
*/
1613 unsigned int msg
; /* message to post
*/
1614 unsigned int id
; /* timer id
*/
1615 unsigned int rate
; /* timer rate in ms
*/
1616 unsigned int lparam
; /* message
lparam (callback proc
) */
1618 unsigned int id
; /* timer id
*/
1622 /* Kill a window timer
*/
1623 @
REQ(kill_win_timer
)
1624 user_handle_t win
; /* window handle
*/
1625 unsigned int msg
; /* message to post
*/
1626 unsigned int id
; /* timer id
*/
1630 /* Retrieve info about a serial port
*/
1631 @
REQ(get_serial_info
)
1632 obj_handle_t handle
; /* handle to comm port
*/
1634 unsigned int readinterval
;
1635 unsigned int readconst
;
1636 unsigned int readmult
;
1637 unsigned int writeconst
;
1638 unsigned int writemult
;
1639 unsigned int eventmask
;
1640 unsigned int commerror
;
1644 /* Set info about a serial port
*/
1645 @
REQ(set_serial_info
)
1646 obj_handle_t handle
; /* handle to comm port
*/
1647 int flags
; /* bitmask to set
values (see below
) */
1648 unsigned int readinterval
;
1649 unsigned int readconst
;
1650 unsigned int readmult
;
1651 unsigned int writeconst
;
1652 unsigned int writemult
;
1653 unsigned int eventmask
;
1654 unsigned int commerror
;
1656 #define SERIALINFO_SET_TIMEOUTS
0x01
1657 #define SERIALINFO_SET_MASK
0x02
1658 #define SERIALINFO_SET_ERROR
0x04
1661 /* Create an async I
/O
*/
1662 @
REQ(register_async
)
1663 obj_handle_t handle
; /* handle to comm port
, socket or file
*/
1664 int type
; /* type of queue to look after
*/
1665 void
* io_apc
; /* APC routine to queue upon end of async
*/
1666 void
* io_sb
; /* I
/O status
block (unique across all async on this handle
) */
1667 void
* io_user
; /* data to pass back to caller
*/
1668 int count
; /* count
- usually # of bytes to be read
/written
*/
1670 #define ASYNC_TYPE_READ
0x01
1671 #define ASYNC_TYPE_WRITE
0x02
1672 #define ASYNC_TYPE_WAIT
0x03
1675 /* Cancel all async op on a fd
*/
1677 obj_handle_t handle
; /* handle to comm port
, socket or file
*/
1681 /* Create a named pipe
*/
1682 @
REQ(create_named_pipe
)
1683 unsigned int options
;
1685 unsigned int maxinstances
;
1686 unsigned int outsize
;
1687 unsigned int insize
;
1688 unsigned int timeout
;
1689 int inherit
; /* inherit flag
*/
1690 VARARG(name
,unicode_str
); /* pipe name
*/
1692 obj_handle_t handle
; /* handle to the pipe
*/
1695 /* flags in create_named_pipe and get_named_pipe_info
*/
1696 #define NAMED_PIPE_MESSAGE_STREAM_WRITE
0x0001
1697 #define NAMED_PIPE_MESSAGE_STREAM_READ
0x0002
1698 #define NAMED_PIPE_NONBLOCKING_MODE
0x0004
1701 /* Open an existing named pipe
*/
1702 @
REQ(open_named_pipe
)
1703 unsigned int access
;
1704 unsigned int flags
; /* file flags
*/
1705 int inherit
; /* inherit flag
*/
1706 VARARG(name
,unicode_str
); /* pipe name
*/
1708 obj_handle_t handle
; /* handle to the pipe
*/
1712 /* Connect to a named pipe
*/
1713 @
REQ(connect_named_pipe
)
1714 obj_handle_t handle
;
1720 /* Wait for a named pipe
*/
1721 @
REQ(wait_named_pipe
)
1722 unsigned int timeout
;
1725 VARARG(name
,unicode_str
); /* pipe name
*/
1729 /* Disconnect a named pipe
*/
1730 @
REQ(disconnect_named_pipe
)
1731 obj_handle_t handle
;
1733 int fd
; /* associated fd to close
*/
1737 @
REQ(get_named_pipe_info
)
1738 obj_handle_t handle
;
1741 unsigned int maxinstances
;
1742 unsigned int outsize
;
1743 unsigned int insize
;
1747 /* Create a window
*/
1749 user_handle_t parent
; /* parent window
*/
1750 user_handle_t owner
; /* owner window
*/
1751 atom_t atom
; /* class atom
*/
1752 void
* instance
; /* module instance
*/
1754 user_handle_t handle
; /* created window
*/
1755 int extra
; /* number of extra bytes
*/
1756 void
* class_ptr
; /* pointer to class in client address space
*/
1760 /* Destroy a window
*/
1761 @
REQ(destroy_window
)
1762 user_handle_t handle
; /* handle to the window
*/
1766 /* Retrieve the desktop window for the current thread
*/
1767 @
REQ(get_desktop_window
)
1769 user_handle_t handle
; /* handle to the desktop window
*/
1773 /* Set a window owner
*/
1774 @
REQ(set_window_owner
)
1775 user_handle_t handle
; /* handle to the window
*/
1776 user_handle_t owner
; /* new owner
*/
1778 user_handle_t full_owner
; /* full handle of new owner
*/
1779 user_handle_t prev_owner
; /* full handle of previous owner
*/
1783 /* Get information from a window handle
*/
1784 @
REQ(get_window_info
)
1785 user_handle_t handle
; /* handle to the window
*/
1787 user_handle_t full_handle
; /* full
32-bit handle
*/
1788 user_handle_t last_active
; /* last active popup
*/
1789 process_id_t pid
; /* process owning the window
*/
1790 thread_id_t tid
; /* thread owning the window
*/
1791 atom_t atom
; /* class atom
*/
1792 int is_unicode
; /* ANSI or unicode
*/
1796 /* Set some information in a window
*/
1797 @
REQ(set_window_info
)
1798 user_handle_t handle
; /* handle to the window
*/
1799 unsigned int flags
; /* flags for fields to
set (see below
) */
1800 unsigned int style
; /* window style
*/
1801 unsigned int ex_style
; /* window extended style
*/
1802 unsigned int id
; /* window id
*/
1803 void
* instance
; /* creator instance
*/
1804 int is_unicode
; /* ANSI or unicode
*/
1805 void
* user_data
; /* user
-specific data
*/
1806 int extra_offset
; /* offset to set in extra bytes
*/
1807 size_t extra_size
; /* size to set in extra bytes
*/
1808 unsigned int extra_value
; /* value to set in extra bytes
*/
1810 unsigned int old_style
; /* old window style
*/
1811 unsigned int old_ex_style
; /* old window extended style
*/
1812 unsigned int old_id
; /* old window id
*/
1813 void
* old_instance
; /* old creator instance
*/
1814 void
* old_user_data
; /* old user
-specific data
*/
1815 unsigned int old_extra_value
; /* old value in extra bytes
*/
1817 #define SET_WIN_STYLE
0x01
1818 #define SET_WIN_EXSTYLE
0x02
1819 #define SET_WIN_ID
0x04
1820 #define SET_WIN_INSTANCE
0x08
1821 #define SET_WIN_USERDATA
0x10
1822 #define SET_WIN_EXTRA
0x20
1823 #define SET_WIN_UNICODE
0x40
1826 /* Set the parent of a window
*/
1828 user_handle_t handle
; /* handle to the window
*/
1829 user_handle_t parent
; /* handle to the parent
*/
1831 user_handle_t old_parent
; /* old parent window
*/
1832 user_handle_t full_parent
; /* full handle of new parent
*/
1836 /* Get a list of the window parents
, up to the root of the tree
*/
1837 @
REQ(get_window_parents
)
1838 user_handle_t handle
; /* handle to the window
*/
1840 int count
; /* total count of parents
*/
1841 VARARG(parents
,user_handles
); /* parent handles
*/
1845 /* Get a list of the window children
*/
1846 @
REQ(get_window_children
)
1847 user_handle_t parent
; /* parent window
*/
1848 atom_t atom
; /* class atom for the listed children
*/
1849 thread_id_t tid
; /* thread owning the listed children
*/
1851 int count
; /* total count of children
*/
1852 VARARG(children
,user_handles
); /* children handles
*/
1856 /* Get a list of the window children that contain a given point
*/
1857 @
REQ(get_window_children_from_point
)
1858 user_handle_t parent
; /* parent window
*/
1859 int x
; /* point in parent coordinates
*/
1862 int count
; /* total count of children
*/
1863 VARARG(children
,user_handles
); /* children handles
*/
1867 /* Get window tree information from a window handle
*/
1868 @
REQ(get_window_tree
)
1869 user_handle_t handle
; /* handle to the window
*/
1871 user_handle_t parent
; /* parent window
*/
1872 user_handle_t owner
; /* owner window
*/
1873 user_handle_t next_sibling
; /* next sibling in Z
-order
*/
1874 user_handle_t prev_sibling
; /* prev sibling in Z
-order
*/
1875 user_handle_t first_sibling
; /* first sibling in Z
-order
*/
1876 user_handle_t last_sibling
; /* last sibling in Z
-order
*/
1877 user_handle_t first_child
; /* first child
*/
1878 user_handle_t last_child
; /* last child
*/
1881 /* Set the position and Z order of a window
*/
1882 @
REQ(set_window_pos
)
1883 user_handle_t handle
; /* handle to the window
*/
1884 user_handle_t previous
; /* previous window in Z order
*/
1885 unsigned int flags
; /* SWP_
* flags
*/
1886 rectangle_t window
; /* window rectangle
*/
1887 rectangle_t client
; /* client rectangle
*/
1888 VARARG(valid
,rectangles
); /* valid rectangles from WM_NCCALCSIZE
*/
1890 unsigned int new_style
; /* new window style
*/
1894 /* Get the window and client rectangles of a window
*/
1895 @
REQ(get_window_rectangles
)
1896 user_handle_t handle
; /* handle to the window
*/
1898 rectangle_t window
; /* window rectangle
*/
1899 rectangle_t visible
; /* visible part of the window rectangle
*/
1900 rectangle_t client
; /* client rectangle
*/
1904 /* Get the window text
*/
1905 @
REQ(get_window_text
)
1906 user_handle_t handle
; /* handle to the window
*/
1908 VARARG(text
,unicode_str
); /* window text
*/
1912 /* Set the window text
*/
1913 @
REQ(set_window_text
)
1914 user_handle_t handle
; /* handle to the window
*/
1915 VARARG(text
,unicode_str
); /* window text
*/
1919 /* Get the coordinates offset between two windows
*/
1920 @
REQ(get_windows_offset
)
1921 user_handle_t from
; /* handle to the first window
*/
1922 user_handle_t to
; /* handle to the second window
*/
1924 int x
; /* x coordinate offset
*/
1925 int y
; /* y coordinate offset
*/
1929 /* Get the visible region of a window
*/
1930 @
REQ(get_visible_region
)
1931 user_handle_t window
; /* handle to the window
*/
1932 unsigned int flags
; /* DCX flags
*/
1934 user_handle_t top_win
; /* top window to clip against
*/
1935 int top_org_x
; /* top window visible rect origin in screen coords
*/
1937 int win_org_x
; /* window rect origin in screen coords
*/
1939 size_t total_size
; /* total size of the resulting region
*/
1940 VARARG(region
,rectangles
); /* list of rectangles for the
region (in screen coords
) */
1944 /* Get the window region
*/
1945 @
REQ(get_window_region
)
1946 user_handle_t window
; /* handle to the window
*/
1948 size_t total_size
; /* total size of the resulting region
*/
1949 VARARG(region
,rectangles
); /* list of rectangles for the region
*/
1953 /* Set the window region
*/
1954 @
REQ(set_window_region
)
1955 user_handle_t window
; /* handle to the window
*/
1956 VARARG(region
,rectangles
); /* list of rectangles for the region
*/
1960 /* Get the window update region
*/
1961 @
REQ(get_update_region
)
1962 user_handle_t window
; /* handle to the window
*/
1963 user_handle_t from_child
; /* child to start searching from
*/
1964 unsigned int flags
; /* update
flags (see below
) */
1966 user_handle_t child
; /* child to
repaint (or window itself
) */
1967 unsigned int flags
; /* resulting update
flags (see below
) */
1968 size_t total_size
; /* total size of the resulting region
*/
1969 VARARG(region
,rectangles
); /* list of rectangles for the region
*/
1971 #define UPDATE_NONCLIENT
0x01 /* get region for repainting non
-client area
*/
1972 #define UPDATE_ERASE
0x02 /* get region for erasing client area
*/
1973 #define UPDATE_PAINT
0x04 /* get region for painting client area
*/
1974 #define UPDATE_INTERNALPAINT
0x08 /* get region if internal paint is pending
*/
1975 #define UPDATE_ALLCHILDREN
0x10 /* force repaint of all children
*/
1976 #define UPDATE_NOCHILDREN
0x20 /* don
't try to repaint any children */
1977 #define UPDATE_NOREGION 0x40 /* don't return a region
, only the flags
*/
1980 /* Update the z order of a window so that a given rectangle is fully visible
*/
1981 @
REQ(update_window_zorder
)
1982 user_handle_t window
; /* handle to the window
*/
1983 rectangle_t rect
; /* rectangle that must be visible
*/
1987 /* Mark parts of a window as needing a redraw
*/
1989 user_handle_t window
; /* handle to the window
*/
1990 unsigned int flags
; /* RDW_
* flags
*/
1991 VARARG(region
,rectangles
); /* list of rectangles for the region
*/
1995 /* Set a window property
*/
1996 @
REQ(set_window_property
)
1997 user_handle_t window
; /* handle to the window
*/
1998 atom_t atom
; /* property
atom (if no name specified
) */
1999 obj_handle_t handle
; /* handle to store
*/
2000 VARARG(name
,unicode_str
); /* property name
*/
2004 /* Remove a window property
*/
2005 @
REQ(remove_window_property
)
2006 user_handle_t window
; /* handle to the window
*/
2007 atom_t atom
; /* property
atom (if no name specified
) */
2008 VARARG(name
,unicode_str
); /* property name
*/
2010 obj_handle_t handle
; /* handle stored in property
*/
2014 /* Get a window property
*/
2015 @
REQ(get_window_property
)
2016 user_handle_t window
; /* handle to the window
*/
2017 atom_t atom
; /* property
atom (if no name specified
) */
2018 VARARG(name
,unicode_str
); /* property name
*/
2020 obj_handle_t handle
; /* handle stored in property
*/
2024 /* Get the list of properties of a window
*/
2025 @
REQ(get_window_properties
)
2026 user_handle_t window
; /* handle to the window
*/
2028 int total
; /* total number of properties
*/
2029 VARARG(props
,properties
); /* list of properties
*/
2033 /* Create a window station
*/
2034 @
REQ(create_winstation
)
2035 unsigned int flags
; /* window station flags
*/
2036 unsigned int access
; /* wanted access rights
*/
2037 int inherit
; /* inherit flag
*/
2038 VARARG(name
,unicode_str
); /* object name
*/
2040 obj_handle_t handle
; /* handle to the window station
*/
2044 /* Open a handle to a window station
*/
2045 @
REQ(open_winstation
)
2046 unsigned int access
; /* wanted access rights
*/
2047 int inherit
; /* inherit flag
*/
2048 VARARG(name
,unicode_str
); /* object name
*/
2050 obj_handle_t handle
; /* handle to the window station
*/
2054 /* Close a window station
*/
2055 @
REQ(close_winstation
)
2056 obj_handle_t handle
; /* handle to the window station
*/
2060 /* Get the process current window station
*/
2061 @
REQ(get_process_winstation
)
2063 obj_handle_t handle
; /* handle to the window station
*/
2067 /* Set the process current window station
*/
2068 @
REQ(set_process_winstation
)
2069 obj_handle_t handle
; /* handle to the window station
*/
2073 /* Create a desktop
*/
2074 @
REQ(create_desktop
)
2075 unsigned int flags
; /* desktop flags
*/
2076 unsigned int access
; /* wanted access rights
*/
2077 int inherit
; /* inherit flag
*/
2078 VARARG(name
,unicode_str
); /* object name
*/
2080 obj_handle_t handle
; /* handle to the desktop
*/
2084 /* Open a handle to a desktop
*/
2086 unsigned int flags
; /* desktop flags
*/
2087 unsigned int access
; /* wanted access rights
*/
2088 int inherit
; /* inherit flag
*/
2089 VARARG(name
,unicode_str
); /* object name
*/
2091 obj_handle_t handle
; /* handle to the desktop
*/
2095 /* Close a desktop
*/
2097 obj_handle_t handle
; /* handle to the desktop
*/
2101 /* Get the thread current desktop
*/
2102 @
REQ(get_thread_desktop
)
2103 thread_id_t tid
; /* thread id
*/
2105 obj_handle_t handle
; /* handle to the desktop
*/
2109 /* Set the thread current desktop
*/
2110 @
REQ(set_thread_desktop
)
2111 obj_handle_t handle
; /* handle to the desktop
*/
2115 /* Get
/set information about a user
object (window station or desktop
) */
2116 @
REQ(set_user_object_info
)
2117 obj_handle_t handle
; /* handle to the object
*/
2118 unsigned int flags
; /* information to set
*/
2119 unsigned int obj_flags
; /* new object flags
*/
2121 int is_desktop
; /* is object a desktop?
*/
2122 unsigned int old_obj_flags
; /* old object flags
*/
2123 VARARG(name
,unicode_str
); /* object name
*/
2125 #define SET_USER_OBJECT_FLAGS
1
2128 /* Attach (or detach
) thread inputs
*/
2129 @
REQ(attach_thread_input
)
2130 thread_id_t tid_from
; /* thread to be attached
*/
2131 thread_id_t tid_to
; /* thread to which tid_from should be attached
*/
2132 int attach
; /* is it an attach?
*/
2136 /* Get input data for a given thread
*/
2137 @
REQ(get_thread_input
)
2138 thread_id_t tid
; /* id of thread
*/
2140 user_handle_t focus
; /* handle to the focus window
*/
2141 user_handle_t capture
; /* handle to the capture window
*/
2142 user_handle_t active
; /* handle to the active window
*/
2143 user_handle_t foreground
; /* handle to the global foreground window
*/
2144 user_handle_t menu_owner
; /* handle to the menu owner
*/
2145 user_handle_t move_size
; /* handle to the moving
/resizing window
*/
2146 user_handle_t caret
; /* handle to the caret window
*/
2147 rectangle_t rect
; /* caret rectangle
*/
2151 /* Get the time of the last input event
*/
2152 @
REQ(get_last_input_time
)
2158 /* Retrieve queue keyboard state for a given thread
*/
2160 thread_id_t tid
; /* id of thread
*/
2161 int key
; /* optional key code or
-1 */
2163 unsigned char state
; /* state of specified key
*/
2164 VARARG(keystate
,bytes
); /* state array for all the keys
*/
2167 /* Set queue keyboard state for a given thread
*/
2169 thread_id_t tid
; /* id of thread
*/
2170 VARARG(keystate
,bytes
); /* state array for all the keys
*/
2173 /* Set the system foreground window
*/
2174 @
REQ(set_foreground_window
)
2175 user_handle_t handle
; /* handle to the foreground window
*/
2177 user_handle_t previous
; /* handle to the previous foreground window
*/
2178 int send_msg_old
; /* whether we have to send a msg to the old window
*/
2179 int send_msg_new
; /* whether we have to send a msg to the new window
*/
2182 /* Set the current thread focus window
*/
2183 @
REQ(set_focus_window
)
2184 user_handle_t handle
; /* handle to the focus window
*/
2186 user_handle_t previous
; /* handle to the previous focus window
*/
2189 /* Set the current thread active window
*/
2190 @
REQ(set_active_window
)
2191 user_handle_t handle
; /* handle to the active window
*/
2193 user_handle_t previous
; /* handle to the previous active window
*/
2196 /* Set the current thread capture window
*/
2197 @
REQ(set_capture_window
)
2198 user_handle_t handle
; /* handle to the capture window
*/
2199 unsigned int flags
; /* capture
flags (see below
) */
2201 user_handle_t previous
; /* handle to the previous capture window
*/
2202 user_handle_t full_handle
; /* full
32-bit handle of new capture window
*/
2204 #define CAPTURE_MENU
0x01 /* capture is for a menu
*/
2205 #define CAPTURE_MOVESIZE
0x02 /* capture is for moving
/resizing
*/
2208 /* Set the current thread caret window
*/
2209 @
REQ(set_caret_window
)
2210 user_handle_t handle
; /* handle to the caret window
*/
2211 int width
; /* caret width
*/
2212 int height
; /* caret height
*/
2214 user_handle_t previous
; /* handle to the previous caret window
*/
2215 rectangle_t old_rect
; /* previous caret rectangle
*/
2216 int old_hide
; /* previous hide count
*/
2217 int old_state
; /* previous caret
state (1=on
, 0=off
) */
2221 /* Set the current thread caret information
*/
2222 @
REQ(set_caret_info
)
2223 unsigned int flags
; /* caret
flags (see below
) */
2224 user_handle_t handle
; /* handle to the caret window
*/
2225 int x
; /* caret x position
*/
2226 int y
; /* caret y position
*/
2227 int hide
; /* increment for hide
count (can be negative to show it
) */
2228 int state
; /* caret
state (1=on
, 0=off
, -1=toggle current state
) */
2230 user_handle_t full_handle
; /* handle to the current caret window
*/
2231 rectangle_t old_rect
; /* previous caret rectangle
*/
2232 int old_hide
; /* previous hide count
*/
2233 int old_state
; /* previous caret
state (1=on
, 0=off
) */
2235 #define SET_CARET_POS
0x01 /* set the caret position from x
,y
*/
2236 #define SET_CARET_HIDE
0x02 /* increment the caret hide count
*/
2237 #define SET_CARET_STATE
0x04 /* set the caret on
/off state
*/
2240 /* Set a window hook
*/
2242 int id
; /* id of the hook
*/
2243 process_id_t pid
; /* id of process to set the hook into
*/
2244 thread_id_t tid
; /* id of thread to set the hook into
*/
2248 void
* proc
; /* hook procedure
*/
2249 int unicode
; /* is it a unicode hook?
*/
2250 VARARG(module
,unicode_str
); /* module name
*/
2252 user_handle_t handle
; /* handle to the hook
*/
2253 unsigned int active_hooks
; /* active hooks bitmap
*/
2257 /* Remove a window hook
*/
2259 user_handle_t handle
; /* handle to the hook
*/
2260 int id
; /* id of the hook if handle is
0 */
2261 void
* proc
; /* hook procedure if handle is
0 */
2263 unsigned int active_hooks
; /* active hooks bitmap
*/
2267 /* Start calling a hook chain
*/
2268 @
REQ(start_hook_chain
)
2269 int id
; /* id of the hook
*/
2270 int event
; /* signalled event
*/
2271 user_handle_t window
; /* handle to the event window
*/
2272 int object_id
; /* object id for out of context winevent
*/
2273 int child_id
; /* child id for out of context winevent
*/
2275 user_handle_t handle
; /* handle to the next hook
*/
2276 process_id_t pid
; /* process id for low
-level keyboard
/mouse hooks
*/
2277 thread_id_t tid
; /* thread id for low
-level keyboard
/mouse hooks
*/
2278 void
* proc
; /* hook procedure
*/
2279 int unicode
; /* is it a unicode hook?
*/
2280 unsigned int active_hooks
; /* active hooks bitmap
*/
2281 VARARG(module
,unicode_str
); /* module name
*/
2285 /* Finished calling a hook chain
*/
2286 @
REQ(finish_hook_chain
)
2287 int id
; /* id of the hook
*/
2291 /* Get the next hook to call
*/
2293 user_handle_t handle
; /* handle to the current hook
*/
2294 int event
; /* signalled event
*/
2295 user_handle_t window
; /* handle to the event window
*/
2296 int object_id
; /* object id for out of context winevent
*/
2297 int child_id
; /* child id for out of context winevent
*/
2299 user_handle_t next
; /* handle to the next hook
*/
2300 int id
; /* id of the next hook
*/
2301 process_id_t pid
; /* process id for low
-level keyboard
/mouse hooks
*/
2302 thread_id_t tid
; /* thread id for low
-level keyboard
/mouse hooks
*/
2303 void
* proc
; /* next hook procedure
*/
2304 int prev_unicode
; /* was the previous a unicode hook?
*/
2305 int next_unicode
; /* is the next a unicode hook?
*/
2306 VARARG(module
,unicode_str
); /* module name
*/
2310 /* Create a window class
*/
2312 int local
; /* is it a local class?
*/
2313 atom_t atom
; /* class atom
*/
2314 unsigned int style
; /* class style
*/
2315 void
* instance
; /* module instance
*/
2316 int extra
; /* number of extra class bytes
*/
2317 int win_extra
; /* number of window extra bytes
*/
2318 void
* client_ptr
; /* pointer to class in client address space
*/
2322 /* Destroy a window class
*/
2324 atom_t atom
; /* class atom
*/
2325 void
* instance
; /* module instance
*/
2327 void
* client_ptr
; /* pointer to class in client address space
*/
2331 /* Set some information in a class
*/
2332 @
REQ(set_class_info
)
2333 user_handle_t window
; /* handle to the window
*/
2334 unsigned int flags
; /* flags for info to
set (see below
) */
2335 atom_t atom
; /* class atom
*/
2336 unsigned int style
; /* class style
*/
2337 int win_extra
; /* number of window extra bytes
*/
2338 void
* instance
; /* module instance
*/
2339 int extra_offset
; /* offset to set in extra bytes
*/
2340 size_t extra_size
; /* size to set in extra bytes
*/
2341 unsigned int extra_value
; /* value to set in extra bytes
*/
2343 atom_t old_atom
; /* previous class atom
*/
2344 unsigned int old_style
; /* previous class style
*/
2345 int old_extra
; /* previous number of class extra bytes
*/
2346 int old_win_extra
; /* previous number of window extra bytes
*/
2347 void
* old_instance
; /* previous module instance
*/
2348 unsigned int old_extra_value
; /* old value in extra bytes
*/
2350 #define SET_CLASS_ATOM
0x0001
2351 #define SET_CLASS_STYLE
0x0002
2352 #define SET_CLASS_WINEXTRA
0x0004
2353 #define SET_CLASS_INSTANCE
0x0008
2354 #define SET_CLASS_EXTRA
0x0010
2357 /* Set
/get clipboard information
*/
2358 @
REQ(set_clipboard_info
)
2359 unsigned int flags
; /* flags for fields to
set (see below
) */
2360 user_handle_t clipboard
; /* clipboard window
*/
2361 user_handle_t owner
; /* clipboard owner
*/
2362 user_handle_t viewer
; /* first clipboard viewer
*/
2363 unsigned int seqno
; /* change sequence number
*/
2365 unsigned int flags
; /* status
flags (see below
) */
2366 user_handle_t old_clipboard
; /* old clipboard window
*/
2367 user_handle_t old_owner
; /* old clipboard owner
*/
2368 user_handle_t old_viewer
; /* old clipboard viewer
*/
2369 unsigned int seqno
; /* current sequence number
*/
2372 #define SET_CB_OPEN
0x001
2373 #define SET_CB_OWNER
0x002
2374 #define SET_CB_VIEWER
0x004
2375 #define SET_CB_SEQNO
0x008
2376 #define SET_CB_RELOWNER
0x010
2377 #define SET_CB_CLOSE
0x020
2378 #define CB_OPEN
0x040
2379 #define CB_OWNER
0x080
2380 #define CB_PROCESS
0x100
2383 /* Open a security token
*/
2385 obj_handle_t handle
; /* handle to the thread or process
*/
2386 unsigned int flags
; /* flags (see below
) */
2388 obj_handle_t token
; /* handle to the token
*/
2390 #define OPEN_TOKEN_THREAD
1
2391 #define OPEN_TOKEN_AS_SELF
2
2394 /* Set
/get the global windows
*/
2395 @
REQ(set_global_windows
)
2396 unsigned int flags
; /* flags for fields to
set (see below
) */
2397 user_handle_t shell_window
; /* handle to the new shell window
*/
2398 user_handle_t shell_listview
; /* handle to the new shell listview window
*/
2399 user_handle_t progman_window
; /* handle to the new program manager window
*/
2400 user_handle_t taskman_window
; /* handle to the new task manager window
*/
2402 user_handle_t old_shell_window
; /* handle to the shell window
*/
2403 user_handle_t old_shell_listview
; /* handle to the shell listview window
*/
2404 user_handle_t old_progman_window
; /* handle to the new program manager window
*/
2405 user_handle_t old_taskman_window
; /* handle to the new task manager window
*/
2407 #define SET_GLOBAL_SHELL_WINDOWS
0x01 /* set both main shell and listview windows
*/
2408 #define SET_GLOBAL_PROGMAN_WINDOW
0x02
2409 #define SET_GLOBAL_TASKMAN_WINDOW
0x04
2411 /* Adjust the privileges held by a token
*/
2412 @
REQ(adjust_token_privileges
)
2413 obj_handle_t handle
; /* handle to the token
*/
2414 int disable_all
; /* disable all privileges?
*/
2415 int get_modified_state
; /* get modified privileges?
*/
2416 VARARG(privileges
,LUID_AND_ATTRIBUTES
); /* privileges to enable
/disable
/remove
*/
2418 unsigned int len
; /* total length in bytes required to store token privileges
*/
2419 VARARG(privileges
,LUID_AND_ATTRIBUTES
); /* modified privileges
*/
2422 /* Retrieves the set of privileges held by or available to a token
*/
2423 @
REQ(get_token_privileges
)
2424 obj_handle_t handle
; /* handle to the token
*/
2426 unsigned int len
; /* total length in bytes required to store token privileges
*/
2427 VARARG(privileges
,LUID_AND_ATTRIBUTES
); /* privileges held by or available to a token
*/
2430 /* Check the token has the required privileges
*/
2431 @
REQ(check_token_privileges
)
2432 obj_handle_t handle
; /* handle to the token
*/
2433 int all_required
; /* are all the privileges required for the check to succeed?
*/
2434 VARARG(privileges
,LUID_AND_ATTRIBUTES
); /* privileges to check
*/
2436 int has_privileges
; /* does the token have the required privileges?
*/
2437 VARARG(privileges
,LUID_AND_ATTRIBUTES
); /* privileges held by or available to a token
*/
2440 @
REQ(duplicate_token
)
2441 obj_handle_t handle
; /* handle to the token to duplicate
*/
2442 unsigned int access
; /* access rights to the new token
*/
2443 int inherit
; /* inherit flag
*/
2444 int primary
; /* is the new token to be a primary one?
*/
2445 int impersonation_level
; /* impersonation level of the new token
*/
2447 obj_handle_t new_handle
; /* duplicated handle
*/
2451 obj_handle_t handle
; /* handle to the token
*/
2452 unsigned int desired_access
; /* desired access to the object
*/
2453 unsigned int mapping_read
; /* mapping from generic read to specific rights
*/
2454 unsigned int mapping_write
; /* mapping from generic write to specific rights
*/
2455 unsigned int mapping_execute
; /* mapping from generic execute to specific rights
*/
2456 unsigned int mapping_all
; /* mapping from generic all to specific rights
*/
2457 VARARG(sd
,security_descriptor
); /* security descriptor to check
*/
2459 unsigned int access_granted
; /* access rights actually granted
*/
2460 unsigned int access_status
; /* was access granted?
*/
2461 unsigned int privileges_len
; /* length needed to store privileges
*/
2462 VARARG(privileges
,LUID_AND_ATTRIBUTES
); /* privileges used during access check
*/
2465 @
REQ(get_token_user
)
2466 obj_handle_t handle
; /* handle to the token
*/
2468 size_t user_len
; /* length needed to store user
*/
2469 VARARG(user
,SID
); /* sid of the user the token represents
*/
2472 /* Create a mailslot
*/
2473 @
REQ(create_mailslot
)
2474 unsigned int max_msgsize
;
2475 unsigned int read_timeout
;
2477 VARARG(name
,unicode_str
); /* mailslot name
*/
2479 obj_handle_t handle
; /* handle to the mailslot
*/
2483 /* Open an existing mailslot
*/
2485 unsigned int access
;
2486 int inherit
; /* inherit flag
*/
2487 unsigned int sharing
; /* sharing mode
*/
2488 VARARG(name
,unicode_str
); /* mailslot name
*/
2490 obj_handle_t handle
; /* handle to the mailslot
*/
2494 /* Set mailslot information
*/
2495 @
REQ(set_mailslot_info
)
2496 obj_handle_t handle
; /* handle to the mailslot
*/
2498 unsigned int read_timeout
;
2500 unsigned int max_msgsize
;
2501 unsigned int read_timeout
;
2502 unsigned int msg_count
;
2503 unsigned int next_msgsize
;
2505 #define MAILSLOT_SET_READ_TIMEOUT
1