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 affinity; /* process affinity mask */
313 void* peb; /* PEB address in process address space */
317 /* Set a process informations */
318 @REQ(set_process_info)
319 obj_handle_t handle; /* process handle */
320 int mask; /* setting mask (see below) */
321 int priority; /* priority class */
322 int affinity; /* affinity mask */
324 #define SET_PROCESS_INFO_PRIORITY 0x01
325 #define SET_PROCESS_INFO_AFFINITY 0x02
328 /* Retrieve information about a thread */
329 @REQ(get_thread_info)
330 obj_handle_t handle; /* thread handle */
331 thread_id_t tid_in; /* thread id (optional) */
333 process_id_t pid; /* server process id */
334 thread_id_t tid; /* server thread id */
335 void* teb; /* thread teb pointer */
336 int exit_code; /* thread exit code */
337 int priority; /* thread priority level */
338 int affinity; /* thread affinity mask */
339 time_t creation_time; /* thread creation time */
340 time_t exit_time; /* thread exit time */
344 /* Set a thread informations */
345 @REQ(set_thread_info)
346 obj_handle_t handle; /* thread handle */
347 int mask; /* setting mask (see below) */
348 int priority; /* priority class */
349 int affinity; /* affinity mask */
350 obj_handle_t token; /* impersonation token */
352 #define SET_THREAD_INFO_PRIORITY 0x01
353 #define SET_THREAD_INFO_AFFINITY 0x02
354 #define SET_THREAD_INFO_TOKEN 0x04
357 /* Retrieve information about a module */
359 obj_handle_t handle; /* process handle */
360 void* base_address; /* base address of module */
362 size_t size; /* module size */
364 VARARG(filename,unicode_str); /* file name of module */
368 /* Suspend a thread */
370 obj_handle_t handle; /* thread handle */
372 int count; /* new suspend count */
376 /* Resume a thread */
378 obj_handle_t handle; /* thread handle */
380 int count; /* new suspend count */
384 /* Notify the server that a dll has been loaded */
386 obj_handle_t handle; /* file handle */
387 void* base; /* base address */
388 size_t size; /* dll size */
389 int dbg_offset; /* debug info offset */
390 int dbg_size; /* debug info size */
391 void* name; /* ptr to ptr to name (in process addr space) */
392 VARARG(filename,unicode_str); /* file name of dll */
396 /* Notify the server that a dll is being unloaded */
398 void* base; /* base address */
402 /* Queue an APC for a thread */
404 obj_handle_t handle; /* thread handle */
405 int user; /* user or system apc? */
406 void* func; /* function to call */
407 void* arg1; /* params for function to call */
413 /* Get next APC to call */
415 int alertable; /* is thread alertable? */
417 void* func; /* function to call */
418 int type; /* function type */
419 void* arg1; /* function arguments */
423 enum apc_type { APC_NONE, APC_USER, APC_TIMER, APC_ASYNC_IO };
426 /* Close a handle for the current process */
428 obj_handle_t handle; /* handle to close */
430 int fd; /* associated fd to close */
434 /* Set a handle information */
435 @REQ(set_handle_info)
436 obj_handle_t handle; /* handle we are interested in */
437 int flags; /* new handle flags */
438 int mask; /* mask for flags to set */
440 int old_flags; /* old flag value */
444 /* Duplicate a handle */
446 obj_handle_t src_process; /* src process handle */
447 obj_handle_t src_handle; /* src handle to duplicate */
448 obj_handle_t dst_process; /* dst process handle */
449 unsigned int access; /* wanted access rights */
450 int inherit; /* inherit flag */
451 int options; /* duplicate options (see below) */
453 obj_handle_t handle; /* duplicated handle in dst process */
454 int fd; /* associated fd to close */
456 #define DUP_HANDLE_CLOSE_SOURCE DUPLICATE_CLOSE_SOURCE
457 #define DUP_HANDLE_SAME_ACCESS DUPLICATE_SAME_ACCESS
458 #define DUP_HANDLE_MAKE_GLOBAL 0x80000000 /* Not a Windows flag */
461 /* Open a handle to a process */
463 process_id_t pid; /* process id to open */
464 unsigned int access; /* wanted access rights */
465 int inherit; /* inherit flag */
467 obj_handle_t handle; /* handle to the process */
471 /* Open a handle to a thread */
473 thread_id_t tid; /* thread id to open */
474 unsigned int access; /* wanted access rights */
475 int inherit; /* inherit flag */
477 obj_handle_t handle; /* handle to the thread */
481 /* Wait for handles */
483 int flags; /* wait flags (see below) */
484 void* cookie; /* magic cookie to return to client */
485 obj_handle_t signal; /* object to signal (0 if none) */
486 abs_time_t timeout; /* absolute timeout */
487 VARARG(handles,handles); /* handles to select on */
490 #define SELECT_ALERTABLE 2
491 #define SELECT_INTERRUPTIBLE 4
492 #define SELECT_TIMEOUT 8
495 /* Create an event */
497 unsigned int access; /* wanted access rights */
498 int manual_reset; /* manual reset event */
499 int initial_state; /* initial state of the event */
500 int inherit; /* inherit flag */
501 VARARG(name,unicode_str); /* object name */
503 obj_handle_t handle; /* handle to the event */
506 /* Event operation */
508 obj_handle_t handle; /* handle to event */
509 int op; /* event operation (see below) */
511 enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT };
516 unsigned int access; /* wanted access rights */
517 int inherit; /* inherit flag */
518 VARARG(name,unicode_str); /* object name */
520 obj_handle_t handle; /* handle to the event */
526 unsigned int access; /* wanted access rights */
527 int owned; /* initially owned? */
528 int inherit; /* inherit flag */
529 VARARG(name,unicode_str); /* object name */
531 obj_handle_t handle; /* handle to the mutex */
535 /* Release a mutex */
537 obj_handle_t handle; /* handle to the mutex */
539 unsigned int prev_count; /* value of internal counter, before release */
545 unsigned int access; /* wanted access rights */
546 int inherit; /* inherit flag */
547 VARARG(name,unicode_str); /* object name */
549 obj_handle_t handle; /* handle to the mutex */
553 /* Create a semaphore */
554 @REQ(create_semaphore)
555 unsigned int access; /* wanted access rights */
556 unsigned int initial; /* initial count */
557 unsigned int max; /* maximum count */
558 int inherit; /* inherit flag */
559 VARARG(name,unicode_str); /* object name */
561 obj_handle_t handle; /* handle to the semaphore */
565 /* Release a semaphore */
566 @REQ(release_semaphore)
567 obj_handle_t handle; /* handle to the semaphore */
568 unsigned int count; /* count to add to semaphore */
570 unsigned int prev_count; /* previous semaphore count */
574 /* Open a semaphore */
576 unsigned int access; /* wanted access rights */
577 int inherit; /* inherit flag */
578 VARARG(name,unicode_str); /* object name */
580 obj_handle_t handle; /* handle to the semaphore */
586 unsigned int access; /* wanted access rights */
587 int inherit; /* inherit flag */
588 unsigned int sharing; /* sharing flags */
589 int create; /* file create action */
590 unsigned int options; /* file options */
591 unsigned int attrs; /* file attributes for creation */
592 VARARG(filename,string); /* file name */
594 obj_handle_t handle; /* handle to the file */
598 /* Allocate a file handle for a Unix fd */
599 @REQ(alloc_file_handle)
600 unsigned int access; /* wanted access rights */
601 int inherit; /* inherit flag */
602 int fd; /* file descriptor on the client side */
604 obj_handle_t handle; /* handle to the file */
608 /* Get a Unix fd to access a file */
610 obj_handle_t handle; /* handle to the file */
611 unsigned int access; /* wanted access rights */
613 int fd; /* file descriptor */
614 int removable; /* is device removable? (-1 if unknown) */
615 int flags; /* file read/write flags (see below) */
617 #define FD_FLAG_OVERLAPPED 0x01 /* fd opened in overlapped mode */
618 #define FD_FLAG_TIMEOUT 0x02 /* read/write is synchronous */
619 #define FD_FLAG_RECV_SHUTDOWN 0x04
620 #define FD_FLAG_SEND_SHUTDOWN 0x08
621 #define FD_FLAG_AVAILABLE 0x10 /* in overlap read/write operation,
622 * only handle available data (don't wait
) */
624 /* Set the cached file descriptor of a handle
*/
626 obj_handle_t handle
; /* handle we are interested in
*/
627 int fd
; /* file descriptor
*/
628 int removable
; /* is device removable?
(-1 if unknown
) */
630 int cur_fd
; /* current file descriptor
*/
634 /* Flush a file buffers
*/
636 obj_handle_t handle
; /* handle to the file
*/
638 obj_handle_t event
; /* event set when finished
*/
642 /* Lock a region of a file
*/
644 obj_handle_t handle
; /* handle to the file
*/
645 unsigned int offset_low
; /* offset of start of lock
*/
646 unsigned int offset_high
; /* offset of start of lock
*/
647 unsigned int count_low
; /* count of bytes to lock
*/
648 unsigned int count_high
; /* count of bytes to lock
*/
649 int shared
; /* shared or exclusive lock?
*/
650 int wait
; /* do we want to wait?
*/
652 obj_handle_t handle
; /* handle to wait on
*/
653 int overlapped
; /* is it an overlapped I
/O handle?
*/
657 /* Unlock a region of a file
*/
659 obj_handle_t handle
; /* handle to the file
*/
660 unsigned int offset_low
; /* offset of start of unlock
*/
661 unsigned int offset_high
; /* offset of start of unlock
*/
662 unsigned int count_low
; /* count of bytes to unlock
*/
663 unsigned int count_high
; /* count of bytes to unlock
*/
667 /* Get ready to unmount a Unix device
*/
669 obj_handle_t handle
; /* handle to a file on the device
*/
673 /* Create a socket
*/
675 unsigned int access
; /* wanted access rights
*/
676 int inherit
; /* inherit flag
*/
677 int family
; /* family
, see socket manpage
*/
678 int type
; /* type
, see socket manpage
*/
679 int protocol
; /* protocol
, see socket manpage
*/
680 unsigned int flags
; /* socket flags
*/
682 obj_handle_t handle
; /* handle to the new socket
*/
686 /* Accept a socket
*/
688 obj_handle_t lhandle
; /* handle to the listening socket
*/
689 unsigned int access
; /* wanted access rights
*/
690 int inherit
; /* inherit flag
*/
692 obj_handle_t handle
; /* handle to the new socket
*/
696 /* Set socket event parameters
*/
697 @
REQ(set_socket_event
)
698 obj_handle_t handle
; /* handle to the socket
*/
699 unsigned int mask
; /* event mask
*/
700 obj_handle_t event
; /* event object
*/
701 user_handle_t window
; /* window to send the message to
*/
702 unsigned int msg
; /* message to send
*/
706 /* Get socket event parameters
*/
707 @
REQ(get_socket_event
)
708 obj_handle_t handle
; /* handle to the socket
*/
709 int service
; /* clear pending?
*/
710 obj_handle_t c_event
; /* event to clear
*/
712 unsigned int mask
; /* event mask
*/
713 unsigned int pmask
; /* pending events
*/
714 unsigned int state
; /* status bits
*/
715 VARARG(errors
,ints
); /* event errors
*/
719 /* Reenable pending socket events
*/
720 @
REQ(enable_socket_event
)
721 obj_handle_t handle
; /* handle to the socket
*/
722 unsigned int mask
; /* events to re
-enable
*/
723 unsigned int sstate
; /* status bits to set
*/
724 unsigned int cstate
; /* status bits to clear
*/
727 @
REQ(set_socket_deferred
)
728 obj_handle_t handle
; /* handle to the socket
*/
729 obj_handle_t deferred
; /* handle to the socket for which
accept() is deferred
*/
732 /* Allocate a
console (only used by a console renderer
) */
734 unsigned int access
; /* wanted access rights
*/
735 int inherit
; /* inherit flag
*/
736 process_id_t pid
; /* pid of process which shall be attached to the console
*/
738 obj_handle_t handle_in
; /* handle to console input
*/
739 obj_handle_t event
; /* handle to renderer events change notification
*/
743 /* Free the console of the current process
*/
748 #define CONSOLE_RENDERER_NONE_EVENT
0x00
749 #define CONSOLE_RENDERER_TITLE_EVENT
0x01
750 #define CONSOLE_RENDERER_ACTIVE_SB_EVENT
0x02
751 #define CONSOLE_RENDERER_SB_RESIZE_EVENT
0x03
752 #define CONSOLE_RENDERER_UPDATE_EVENT
0x04
753 #define CONSOLE_RENDERER_CURSOR_POS_EVENT
0x05
754 #define CONSOLE_RENDERER_CURSOR_GEOM_EVENT
0x06
755 #define CONSOLE_RENDERER_DISPLAY_EVENT
0x07
756 #define CONSOLE_RENDERER_EXIT_EVENT
0x08
757 struct console_renderer_event
792 /* retrieve console events for the renderer
*/
793 @
REQ(get_console_renderer_events
)
794 obj_handle_t handle
; /* handle to console input events
*/
796 VARARG(data
,bytes
); /* the various console_renderer_events
*/
800 /* Open a handle to the process console
*/
802 int from
; /* 0 (resp
1) input (resp output
) of current process console
*/
803 /* otherwise console_in handle to get active screen buffer?
*/
804 unsigned int access
; /* wanted access rights
*/
805 int inherit
; /* inherit flag
*/
806 int share
; /* share
mask (only for output handles
) */
808 obj_handle_t handle
; /* handle to the console
*/
812 /* Get the input queue wait event
*/
813 @
REQ(get_console_wait_event
)
818 /* Get a console
mode (input or output
) */
819 @
REQ(get_console_mode
)
820 obj_handle_t handle
; /* handle to the console
*/
822 int mode
; /* console mode
*/
826 /* Set a console
mode (input or output
) */
827 @
REQ(set_console_mode
)
828 obj_handle_t handle
; /* handle to the console
*/
829 int mode
; /* console mode
*/
833 /* Set info about a
console (input only
) */
834 @
REQ(set_console_input_info
)
835 obj_handle_t handle
; /* handle to console input
, or
0 for process
' console */
836 int mask; /* setting mask (see below) */
837 obj_handle_t active_sb; /* active screen buffer */
838 int history_mode; /* whether we duplicate lines in history */
839 int history_size; /* number of lines in history */
840 int edition_mode; /* index to the edition mode flavors */
841 VARARG(title,unicode_str); /* console title */
843 #define SET_CONSOLE_INPUT_INFO_ACTIVE_SB 0x01
844 #define SET_CONSOLE_INPUT_INFO_TITLE 0x02
845 #define SET_CONSOLE_INPUT_INFO_HISTORY_MODE 0x04
846 #define SET_CONSOLE_INPUT_INFO_HISTORY_SIZE 0x08
847 #define SET_CONSOLE_INPUT_INFO_EDITION_MODE 0x10
850 /* Get info about a console (input only) */
851 @REQ(get_console_input_info)
852 obj_handle_t handle; /* handle to console input, or 0 for process' console
*/
854 int history_mode
; /* whether we duplicate lines in history
*/
855 int history_size
; /* number of lines in history
*/
856 int history_index
; /* number of used lines in history
*/
857 int edition_mode
; /* index to the edition mode flavors
*/
858 VARARG(title
,unicode_str
); /* console title
*/
862 /* appends a string to console
's history */
863 @REQ(append_console_input_history)
864 obj_handle_t handle; /* handle to console input, or 0 for process' console
*/
865 VARARG(line
,unicode_str
); /* line to add
*/
869 /* appends a string to console
's history */
870 @REQ(get_console_input_history)
871 obj_handle_t handle; /* handle to console input, or 0 for process' console
*/
872 int index
; /* index to get line from
*/
874 int total
; /* total length of line in Unicode chars
*/
875 VARARG(line
,unicode_str
); /* line to add
*/
879 /* creates a new screen buffer on process
' console */
880 @REQ(create_console_output)
881 obj_handle_t handle_in; /* handle to console input, or 0 for process' console
*/
882 int access
; /* wanted access rights
*/
883 int share
; /* sharing credentials
*/
884 int inherit
; /* inherit flag
*/
886 obj_handle_t handle_out
; /* handle to the screen buffer
*/
890 /* Set info about a
console (output only
) */
891 @
REQ(set_console_output_info
)
892 obj_handle_t handle
; /* handle to the console
*/
893 int mask
; /* setting
mask (see below
) */
894 short int cursor_size
; /* size of
cursor (percentage filled
) */
895 short int cursor_visible
;/* cursor visibility flag
*/
896 short int cursor_x
; /* position of
cursor (x
, y
) */
898 short int width
; /* width of the screen buffer
*/
899 short int height
; /* height of the screen buffer
*/
900 short int attr
; /* default attribute
*/
901 short int win_left
; /* window actually displayed by renderer
*/
902 short int win_top
; /* the rect area is expressed withing the
*/
903 short int win_right
; /* boundaries of the screen buffer
*/
904 short int win_bottom
;
905 short int max_width
; /* maximum
size (width x height
) for the window
*/
906 short int max_height
;
908 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_GEOM
0x01
909 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_POS
0x02
910 #define SET_CONSOLE_OUTPUT_INFO_SIZE
0x04
911 #define SET_CONSOLE_OUTPUT_INFO_ATTR
0x08
912 #define SET_CONSOLE_OUTPUT_INFO_DISPLAY_WINDOW
0x10
913 #define SET_CONSOLE_OUTPUT_INFO_MAX_SIZE
0x20
916 /* Get info about a
console (output only
) */
917 @
REQ(get_console_output_info
)
918 obj_handle_t handle
; /* handle to the console
*/
920 short int cursor_size
; /* size of
cursor (percentage filled
) */
921 short int cursor_visible
;/* cursor visibility flag
*/
922 short int cursor_x
; /* position of
cursor (x
, y
) */
924 short int width
; /* width of the screen buffer
*/
925 short int height
; /* height of the screen buffer
*/
926 short int attr
; /* default attribute
*/
927 short int win_left
; /* window actually displayed by renderer
*/
928 short int win_top
; /* the rect area is expressed withing the
*/
929 short int win_right
; /* boundaries of the screen buffer
*/
930 short int win_bottom
;
931 short int max_width
; /* maximum
size (width x height
) for the window
*/
932 short int max_height
;
935 /* Add input records to a console input queue
*/
936 @
REQ(write_console_input
)
937 obj_handle_t handle
; /* handle to the console input
*/
938 VARARG(rec
,input_records
); /* input records
*/
940 int written
; /* number of records written
*/
944 /* Fetch input records from a console input queue
*/
945 @
REQ(read_console_input
)
946 obj_handle_t handle
; /* handle to the console input
*/
947 int flush
; /* flush the retrieved records from the queue?
*/
949 int read
; /* number of records read
*/
950 VARARG(rec
,input_records
); /* input records
*/
954 /* write
data (chars and
/or attributes
) in a screen buffer
*/
955 @
REQ(write_console_output
)
956 obj_handle_t handle
; /* handle to the console output
*/
957 int x
; /* position where to start writing
*/
959 int mode
; /* char
info (see below
) */
960 int wrap
; /* wrap around at end of line?
*/
961 VARARG(data
,bytes
); /* info to write
*/
963 int written
; /* number of char infos actually written
*/
964 int width
; /* width of screen buffer
*/
965 int height
; /* height of screen buffer
*/
969 CHAR_INFO_MODE_TEXT
, /* characters only
*/
970 CHAR_INFO_MODE_ATTR
, /* attributes only
*/
971 CHAR_INFO_MODE_TEXTATTR
, /* both characters and attributes
*/
972 CHAR_INFO_MODE_TEXTSTDATTR
/* characters but use standard attributes
*/
976 /* fill a screen buffer with constant
data (chars and
/or attributes
) */
977 @
REQ(fill_console_output
)
978 obj_handle_t handle
; /* handle to the console output
*/
979 int x
; /* position where to start writing
*/
981 int mode
; /* char info mode
*/
982 int count
; /* number to write
*/
983 int wrap
; /* wrap around at end of line?
*/
984 char_info_t data
; /* data to write
*/
986 int written
; /* number of char infos actually written
*/
990 /* read
data (chars and
/or attributes
) from a screen buffer
*/
991 @
REQ(read_console_output
)
992 obj_handle_t handle
; /* handle to the console output
*/
993 int x
; /* position (x
,y
) where to start reading
*/
995 int mode
; /* char info mode
*/
996 int wrap
; /* wrap around at end of line?
*/
998 int width
; /* width of screen buffer
*/
999 int height
; /* height of screen buffer
*/
1004 /* move a
rect (of data
) in screen buffer content
*/
1005 @
REQ(move_console_output
)
1006 obj_handle_t handle
; /* handle to the console output
*/
1007 short int x_src
; /* position (x
, y
) of rect to start moving from
*/
1009 short int x_dst
; /* position (x
, y
) of rect to move to
*/
1011 short int w
; /* size of the
rect (width
, height
) to move
*/
1016 /* Sends a signal to a process group
*/
1017 @
REQ(send_console_signal
)
1018 int signal
; /* the signal to send
*/
1019 process_id_t group_id
; /* the group to send the signal to
*/
1023 /* Create a change notification
*/
1024 @
REQ(create_change_notification
)
1025 obj_handle_t handle
; /* handle to the directory
*/
1026 int subtree
; /* watch all the subtree
*/
1027 unsigned int filter
; /* notification filter
*/
1029 obj_handle_t handle
; /* handle to the change notification
*/
1033 /* Move to the next change notification
*/
1034 @
REQ(next_change_notification
)
1035 obj_handle_t handle
; /* handle to the change notification
*/
1038 /* Create a file mapping
*/
1039 @
REQ(create_mapping
)
1040 int size_high
; /* mapping size
*/
1041 int size_low
; /* mapping size
*/
1042 int protect
; /* protection
flags (see below
) */
1043 unsigned int access
; /* wanted access rights
*/
1044 int inherit
; /* inherit flag
*/
1045 obj_handle_t file_handle
; /* file handle
*/
1046 VARARG(name
,unicode_str
); /* object name
*/
1048 obj_handle_t handle
; /* handle to the mapping
*/
1050 /* protection flags
*/
1051 #define VPROT_READ
0x01
1052 #define VPROT_WRITE
0x02
1053 #define VPROT_EXEC
0x04
1054 #define VPROT_WRITECOPY
0x08
1055 #define VPROT_GUARD
0x10
1056 #define VPROT_NOCACHE
0x20
1057 #define VPROT_COMMITTED
0x40
1058 #define VPROT_IMAGE
0x80
1061 /* Open a mapping
*/
1063 unsigned int access
; /* wanted access rights
*/
1064 int inherit
; /* inherit flag
*/
1065 VARARG(name
,unicode_str
); /* object name
*/
1067 obj_handle_t handle
; /* handle to the mapping
*/
1071 /* Get information about a file mapping
*/
1072 @
REQ(get_mapping_info
)
1073 obj_handle_t handle
; /* handle to the mapping
*/
1075 int size_high
; /* mapping size
*/
1076 int size_low
; /* mapping size
*/
1077 int protect
; /* protection flags
*/
1078 int header_size
; /* header
size (for VPROT_IMAGE mapping
) */
1079 void
* base
; /* default base
addr (for VPROT_IMAGE mapping
) */
1080 obj_handle_t shared_file
; /* shared mapping file handle
*/
1081 int shared_size
; /* shared mapping size
*/
1085 #define SNAP_HEAPLIST
0x00000001
1086 #define SNAP_PROCESS
0x00000002
1087 #define SNAP_THREAD
0x00000004
1088 #define SNAP_MODULE
0x00000008
1089 /* Create a snapshot
*/
1090 @
REQ(create_snapshot
)
1091 int inherit
; /* inherit flag
*/
1092 int flags
; /* snapshot
flags (SNAP_*)
*/
1093 process_id_t pid
; /* process id
*/
1095 obj_handle_t handle
; /* handle to the snapshot
*/
1099 /* Get the next process from a snapshot
*/
1101 obj_handle_t handle
; /* handle to the snapshot
*/
1102 int reset
; /* reset snapshot position?
*/
1104 int count
; /* process usage count
*/
1105 process_id_t pid
; /* process id
*/
1106 process_id_t ppid
; /* parent process id
*/
1107 void
* heap
; /* heap base
*/
1108 void
* module
; /* main module
*/
1109 int threads
; /* number of threads
*/
1110 int priority
; /* process priority
*/
1111 int handles
; /* number of handles
*/
1112 VARARG(filename
,unicode_str
); /* file name of main exe
*/
1116 /* Get the next thread from a snapshot
*/
1118 obj_handle_t handle
; /* handle to the snapshot
*/
1119 int reset
; /* reset snapshot position?
*/
1121 int count
; /* thread usage count
*/
1122 process_id_t pid
; /* process id
*/
1123 thread_id_t tid
; /* thread id
*/
1124 int base_pri
; /* base priority
*/
1125 int delta_pri
; /* delta priority
*/
1129 /* Get the next module from a snapshot
*/
1131 obj_handle_t handle
; /* handle to the snapshot
*/
1132 int reset
; /* reset snapshot position?
*/
1134 process_id_t pid
; /* process id
*/
1135 void
* base
; /* module base address
*/
1136 size_t size
; /* module size
*/
1137 VARARG(filename
,unicode_str
); /* file name of module
*/
1141 /* Wait for a debug event
*/
1142 @
REQ(wait_debug_event
)
1143 int get_handle
; /* should we alloc a handle for waiting?
*/
1145 process_id_t pid
; /* process id
*/
1146 thread_id_t tid
; /* thread id
*/
1147 obj_handle_t wait
; /* wait handle if no event ready
*/
1148 VARARG(event
,debug_event
); /* debug event data
*/
1152 /* Queue an exception event
*/
1153 @
REQ(queue_exception_event
)
1154 int first
; /* first chance exception?
*/
1155 VARARG(record
,exc_event
); /* thread context followed by exception record
*/
1157 obj_handle_t handle
; /* handle to the queued event
*/
1161 /* Retrieve the status of an exception event
*/
1162 @
REQ(get_exception_status
)
1163 obj_handle_t handle
; /* handle to the queued event
*/
1165 int status
; /* event continuation status
*/
1166 VARARG(context
,context
); /* modified thread context
*/
1170 /* Send an output string to the debugger
*/
1171 @
REQ(output_debug_string
)
1172 void
* string
; /* string to
display (in debugged process address space
) */
1173 int unicode
; /* is it Unicode?
*/
1174 int length
; /* string length
*/
1178 /* Continue a debug event
*/
1179 @
REQ(continue_debug_event
)
1180 process_id_t pid
; /* process id to continue
*/
1181 thread_id_t tid
; /* thread id to continue
*/
1182 int status
; /* continuation status
*/
1186 /* Start
/stop debugging an existing process
*/
1188 process_id_t pid
; /* id of the process to debug
*/
1189 int attach
; /* 1=attaching
/ 0=detaching from the process
*/
1193 /* Simulate a breakpoint in a process
*/
1195 obj_handle_t handle
; /* process handle
*/
1197 int self
; /* was it the caller itself?
*/
1201 /* Set debugger kill on exit flag
*/
1202 @
REQ(set_debugger_kill_on_exit
)
1203 int kill_on_exit
; /* 0=detach
/1=kill debuggee when debugger dies
*/
1207 /* Read data from a process address space
*/
1208 @
REQ(read_process_memory
)
1209 obj_handle_t handle
; /* process handle
*/
1210 void
* addr
; /* addr to read from
*/
1212 VARARG(data
,bytes
); /* result data
*/
1216 /* Write data to a process address space
*/
1217 @
REQ(write_process_memory
)
1218 obj_handle_t handle
; /* process handle
*/
1219 void
* addr
; /* addr to write
to (must be int
-aligned
) */
1220 unsigned int first_mask
; /* mask for first word
*/
1221 unsigned int last_mask
; /* mask for last word
*/
1222 VARARG(data
,bytes
); /* data to write
*/
1226 /* Create a registry key
*/
1228 obj_handle_t parent
; /* handle to the parent key
*/
1229 unsigned int access
; /* desired access rights
*/
1230 unsigned int options
; /* creation options
*/
1231 time_t modif
; /* last modification time
*/
1232 size_t namelen
; /* length of key name in bytes
*/
1233 VARARG(name
,unicode_str
,namelen
); /* key name
*/
1234 VARARG(class
,unicode_str
); /* class name
*/
1236 obj_handle_t hkey
; /* handle to the created key
*/
1237 int created
; /* has it been newly created?
*/
1240 /* Open a registry key
*/
1242 obj_handle_t parent
; /* handle to the parent key
*/
1243 unsigned int access
; /* desired access rights
*/
1244 VARARG(name
,unicode_str
); /* key name
*/
1246 obj_handle_t hkey
; /* handle to the open key
*/
1250 /* Delete a registry key
*/
1252 obj_handle_t hkey
; /* handle to the key
*/
1256 /* Flush a registry key
*/
1258 obj_handle_t hkey
; /* handle to the key
*/
1262 /* Enumerate registry subkeys
*/
1264 obj_handle_t hkey
; /* handle to registry key
*/
1265 int index
; /* index of
subkey (or
-1 for current key
) */
1266 int info_class
; /* requested information class
*/
1268 int subkeys
; /* number of subkeys
*/
1269 int max_subkey
; /* longest subkey name
*/
1270 int max_class
; /* longest class name
*/
1271 int values
; /* number of values
*/
1272 int max_value
; /* longest value name
*/
1273 int max_data
; /* longest value data
*/
1274 time_t modif
; /* last modification time
*/
1275 size_t total
; /* total length needed for full name and class
*/
1276 size_t namelen
; /* length of key name in bytes
*/
1277 VARARG(name
,unicode_str
,namelen
); /* key name
*/
1278 VARARG(class
,unicode_str
); /* class name
*/
1282 /* Set a value of a registry key
*/
1284 obj_handle_t hkey
; /* handle to registry key
*/
1285 int type
; /* value type
*/
1286 size_t namelen
; /* length of value name in bytes
*/
1287 VARARG(name
,unicode_str
,namelen
); /* value name
*/
1288 VARARG(data
,bytes
); /* value data
*/
1292 /* Retrieve the value of a registry key
*/
1294 obj_handle_t hkey
; /* handle to registry key
*/
1295 VARARG(name
,unicode_str
); /* value name
*/
1297 int type
; /* value type
*/
1298 size_t total
; /* total length needed for data
*/
1299 VARARG(data
,bytes
); /* value data
*/
1303 /* Enumerate a value of a registry key
*/
1304 @
REQ(enum_key_value
)
1305 obj_handle_t hkey
; /* handle to registry key
*/
1306 int index
; /* value index
*/
1307 int info_class
; /* requested information class
*/
1309 int type
; /* value type
*/
1310 size_t total
; /* total length needed for full name and data
*/
1311 size_t namelen
; /* length of value name in bytes
*/
1312 VARARG(name
,unicode_str
,namelen
); /* value name
*/
1313 VARARG(data
,bytes
); /* value data
*/
1317 /* Delete a value of a registry key
*/
1318 @
REQ(delete_key_value
)
1319 obj_handle_t hkey
; /* handle to registry key
*/
1320 VARARG(name
,unicode_str
); /* value name
*/
1324 /* Load a registry branch from a file
*/
1326 obj_handle_t hkey
; /* root key to load to
*/
1327 obj_handle_t file
; /* file to load from
*/
1328 VARARG(name
,unicode_str
); /* subkey name
*/
1332 /* UnLoad a registry branch from a file
*/
1333 @
REQ(unload_registry
)
1334 obj_handle_t hkey
; /* root key to unload to
*/
1338 /* Save a registry branch to a file
*/
1340 obj_handle_t hkey
; /* key to save
*/
1341 obj_handle_t file
; /* file to save to
*/
1345 /* Add a registry key change notification
*/
1346 @
REQ(set_registry_notification
)
1347 obj_handle_t hkey
; /* key to watch for changes
*/
1348 obj_handle_t event
; /* event to set
*/
1349 int subtree
; /* should we watch the whole subtree?
*/
1350 unsigned int filter
; /* things to watch
*/
1354 /* Create a waitable timer
*/
1356 unsigned int access
; /* wanted access rights
*/
1357 int inherit
; /* inherit flag
*/
1358 int manual
; /* manual reset
*/
1359 VARARG(name
,unicode_str
); /* object name
*/
1361 obj_handle_t handle
; /* handle to the timer
*/
1365 /* Open a waitable timer
*/
1367 unsigned int access
; /* wanted access rights
*/
1368 int inherit
; /* inherit flag
*/
1369 VARARG(name
,unicode_str
); /* object name
*/
1371 obj_handle_t handle
; /* handle to the timer
*/
1374 /* Set a waitable timer
*/
1376 obj_handle_t handle
; /* handle to the timer
*/
1377 abs_time_t expire
; /* next expiration absolute time
*/
1378 int period
; /* timer period in ms
*/
1379 void
* callback
; /* callback function
*/
1380 void
* arg
; /* callback argument
*/
1382 int signaled
; /* was the timer signaled before this call ?
*/
1385 /* Cancel a waitable timer
*/
1387 obj_handle_t handle
; /* handle to the timer
*/
1389 int signaled
; /* was the timer signaled before this calltime ?
*/
1392 /* Get information on a waitable timer
*/
1393 @
REQ(get_timer_info
)
1394 obj_handle_t handle
; /* handle to the timer
*/
1396 abs_time_t when
; /* absolute time when the timer next expires
*/
1397 int signaled
; /* is the timer signaled?
*/
1401 /* Retrieve the current context of a thread
*/
1402 @
REQ(get_thread_context
)
1403 obj_handle_t handle
; /* thread handle
*/
1404 unsigned int flags
; /* context flags
*/
1406 VARARG(context
,context
); /* thread context
*/
1410 /* Set the current context of a thread
*/
1411 @
REQ(set_thread_context
)
1412 obj_handle_t handle
; /* thread handle
*/
1413 unsigned int flags
; /* context flags
*/
1414 VARARG(context
,context
); /* thread context
*/
1418 /* Fetch a selector entry for a thread
*/
1419 @
REQ(get_selector_entry
)
1420 obj_handle_t handle
; /* thread handle
*/
1421 int entry
; /* LDT entry
*/
1423 unsigned int base
; /* selector base
*/
1424 unsigned int limit
; /* selector limit
*/
1425 unsigned char flags
; /* selector flags
*/
1431 obj_handle_t table
; /* which table to add atom to
*/
1432 VARARG(name
,unicode_str
); /* atom name
*/
1434 atom_t atom
; /* resulting atom
*/
1438 /* Delete an atom
*/
1440 obj_handle_t table
; /* which table to delete atom from
*/
1441 atom_t atom
; /* atom handle
*/
1447 obj_handle_t table
; /* which table to find atom from
*/
1448 VARARG(name
,unicode_str
); /* atom name
*/
1450 atom_t atom
; /* atom handle
*/
1454 /* Get information about an atom
*/
1455 @
REQ(get_atom_information
)
1456 obj_handle_t table
; /* which table to find atom from
*/
1457 atom_t atom
; /* atom handle
*/
1459 int count
; /* atom lock count
*/
1460 int pinned
; /* whether the atom has been pinned
*/
1461 VARARG(name
,unicode_str
); /* atom name
*/
1465 /* Set information about an atom
*/
1466 @
REQ(set_atom_information
)
1467 obj_handle_t table
; /* which table to find atom from
*/
1468 atom_t atom
; /* atom handle
*/
1469 int pinned
; /* whether to bump atom information
*/
1473 /* Empty an atom table
*/
1474 @
REQ(empty_atom_table
)
1475 obj_handle_t table
; /* which table to find atom from
*/
1476 int if_pinned
; /* whether to delete pinned atoms
*/
1480 /* Init an atom table
*/
1481 @
REQ(init_atom_table
)
1482 int entries
; /* number of
entries (only for local
) */
1484 obj_handle_t table
; /* handle to the atom table
*/
1488 /* Get the message queue of the current thread
*/
1491 obj_handle_t handle
; /* handle to the queue
*/
1495 /* Set the current message queue wakeup mask
*/
1496 @
REQ(set_queue_mask
)
1497 unsigned int wake_mask
; /* wakeup bits mask
*/
1498 unsigned int changed_mask
; /* changed bits mask
*/
1499 int skip_wait
; /* will we skip waiting if signaled?
*/
1501 unsigned int wake_bits
; /* current wake bits
*/
1502 unsigned int changed_bits
; /* current changed bits
*/
1506 /* Get the current message queue status
*/
1507 @
REQ(get_queue_status
)
1508 int clear
; /* should we clear the change bits?
*/
1510 unsigned int wake_bits
; /* wake bits
*/
1511 unsigned int changed_bits
; /* changed bits since last time
*/
1515 /* Wait for a process to start waiting on input
*/
1516 @
REQ(wait_input_idle
)
1517 obj_handle_t handle
; /* process handle
*/
1518 int timeout
; /* timeout
*/
1520 obj_handle_t event
; /* handle to idle event
*/
1524 /* Send a message to a thread queue
*/
1526 thread_id_t id
; /* thread id
*/
1527 int type
; /* message
type (see below
) */
1528 int flags
; /* message
flags (see below
) */
1529 user_handle_t win
; /* window handle
*/
1530 unsigned int msg
; /* message code
*/
1531 unsigned int wparam
; /* parameters
*/
1532 unsigned int lparam
; /* parameters
*/
1533 int x
; /* x position
*/
1534 int y
; /* y position
*/
1535 unsigned int time
; /* message time
*/
1536 unsigned int info
; /* extra info
*/
1537 int timeout
; /* timeout for reply
*/
1538 void
* callback
; /* callback address
*/
1539 VARARG(data
,bytes
); /* message data for sent messages
*/
1544 MSG_ASCII
, /* Ascii
message (from SendMessageA
) */
1545 MSG_UNICODE
, /* Unicode
message (from SendMessageW
) */
1546 MSG_NOTIFY
, /* notify
message (from SendNotifyMessageW
), always Unicode
*/
1547 MSG_CALLBACK
, /* callback
message (from SendMessageCallbackW
), always Unicode
*/
1548 MSG_CALLBACK_RESULT
,/* result of a callback message
*/
1549 MSG_OTHER_PROCESS
, /* sent from other process
, may include vararg data
, always Unicode
*/
1550 MSG_POSTED
, /* posted
message (from PostMessageW
), always Unicode
*/
1551 MSG_HARDWARE
, /* hardware message
*/
1552 MSG_WINEVENT
/* winevent message
*/
1554 #define SEND_MSG_ABORT_IF_HUNG
0x01
1557 /* Get a message from the current queue
*/
1559 int flags
; /* see below
*/
1560 user_handle_t get_win
; /* window handle to get
*/
1561 unsigned int get_first
; /* first message code to get
*/
1562 unsigned int get_last
; /* last message code to get
*/
1563 unsigned int hw_id
; /* id of the previous hardware
message (or
0) */
1565 int type
; /* message type
*/
1566 user_handle_t win
; /* window handle
*/
1567 unsigned int msg
; /* message code
*/
1568 unsigned int wparam
; /* parameters (callback function for MSG_CALLBACK_RESULT
) */
1569 unsigned int lparam
; /* parameters (result for MSG_CALLBACK_RESULT
) */
1570 int x
; /* x position
*/
1571 int y
; /* y position
*/
1572 user_handle_t hook
; /* winevent hook handle
*/
1573 void
* hook_proc
; /* winevent hook proc address
*/
1574 unsigned int time
; /* message time
*/
1575 unsigned int info
; /* extra
info (callback argument for MSG_CALLBACK_RESULT
) */
1576 unsigned int hw_id
; /* id if hardware message
*/
1577 unsigned int active_hooks
; /* active hooks bitmap
*/
1578 size_t total
; /* total size of extra data
*/
1579 VARARG(data
,bytes
); /* message data for sent messages
*/
1581 #define GET_MSG_REMOVE
1 /* remove the message
*/
1582 #define GET_MSG_SENT_ONLY
2 /* only get sent messages
*/
1584 /* Reply to a sent message
*/
1586 unsigned int result
; /* message result
*/
1587 int remove
; /* should we remove the message?
*/
1588 VARARG(data
,bytes
); /* message data for sent messages
*/
1592 /* Accept the current hardware message
*/
1593 @
REQ(accept_hardware_message
)
1594 unsigned int hw_id
; /* id of the hardware message
*/
1595 int remove
; /* should we remove the message?
*/
1596 user_handle_t new_win
; /* new destination window for current message
*/
1600 /* Retrieve the reply for the last message sent
*/
1601 @
REQ(get_message_reply
)
1602 int cancel
; /* cancel message if not ready?
*/
1604 unsigned int result
; /* message result
*/
1605 VARARG(data
,bytes
); /* message data for sent messages
*/
1609 /* Set a window timer
*/
1611 user_handle_t win
; /* window handle
*/
1612 unsigned int msg
; /* message to post
*/
1613 unsigned int id
; /* timer id
*/
1614 unsigned int rate
; /* timer rate in ms
*/
1615 unsigned int lparam
; /* message
lparam (callback proc
) */
1617 unsigned int id
; /* timer id
*/
1621 /* Kill a window timer
*/
1622 @
REQ(kill_win_timer
)
1623 user_handle_t win
; /* window handle
*/
1624 unsigned int msg
; /* message to post
*/
1625 unsigned int id
; /* timer id
*/
1629 /* Retrieve info about a serial port
*/
1630 @
REQ(get_serial_info
)
1631 obj_handle_t handle
; /* handle to comm port
*/
1633 unsigned int readinterval
;
1634 unsigned int readconst
;
1635 unsigned int readmult
;
1636 unsigned int writeconst
;
1637 unsigned int writemult
;
1638 unsigned int eventmask
;
1639 unsigned int commerror
;
1643 /* Set info about a serial port
*/
1644 @
REQ(set_serial_info
)
1645 obj_handle_t handle
; /* handle to comm port
*/
1646 int flags
; /* bitmask to set
values (see below
) */
1647 unsigned int readinterval
;
1648 unsigned int readconst
;
1649 unsigned int readmult
;
1650 unsigned int writeconst
;
1651 unsigned int writemult
;
1652 unsigned int eventmask
;
1653 unsigned int commerror
;
1655 #define SERIALINFO_SET_TIMEOUTS
0x01
1656 #define SERIALINFO_SET_MASK
0x02
1657 #define SERIALINFO_SET_ERROR
0x04
1660 /* Create an async I
/O
*/
1661 @
REQ(register_async
)
1662 obj_handle_t handle
; /* handle to comm port
, socket or file
*/
1663 int type
; /* type of queue to look after
*/
1664 void
* io_apc
; /* APC routine to queue upon end of async
*/
1665 void
* io_sb
; /* I
/O status
block (unique across all async on this handle
) */
1666 void
* io_user
; /* data to pass back to caller
*/
1667 int count
; /* count
- usually # of bytes to be read
/written
*/
1669 #define ASYNC_TYPE_READ
0x01
1670 #define ASYNC_TYPE_WRITE
0x02
1671 #define ASYNC_TYPE_WAIT
0x03
1674 /* Cancel all async op on a fd
*/
1676 obj_handle_t handle
; /* handle to comm port
, socket or file
*/
1680 /* Create a named pipe
*/
1681 @
REQ(create_named_pipe
)
1682 unsigned int access
;
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