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 unsigned int attributes; /* object attributes */
499 int manual_reset; /* manual reset event */
500 int initial_state; /* initial state of the event */
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 unsigned int attributes; /* object attributes */
518 VARARG(name,unicode_str); /* object name */
520 obj_handle_t handle; /* handle to the event */
526 unsigned int access; /* wanted access rights */
527 unsigned int attributes; /* object attributes */
528 int owned; /* initially owned? */
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 unsigned int attributes; /* object attributes */
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 attributes; /* object attributes */
557 unsigned int initial; /* initial count */
558 unsigned int max; /* maximum count */
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 unsigned int attributes; /* object attributes */
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 unsigned int access
; /* wanted access rights
*/
1041 unsigned int attributes
; /* object attributes
*/
1042 int size_high
; /* mapping size
*/
1043 int size_low
; /* mapping size
*/
1044 int protect
; /* protection
flags (see below
) */
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 unsigned int attributes
; /* object attributes
*/
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 VARARG(context
,context
); /* modified thread context
*/
1169 /* Send an output string to the debugger
*/
1170 @
REQ(output_debug_string
)
1171 void
* string
; /* string to
display (in debugged process address space
) */
1172 int unicode
; /* is it Unicode?
*/
1173 int length
; /* string length
*/
1177 /* Continue a debug event
*/
1178 @
REQ(continue_debug_event
)
1179 process_id_t pid
; /* process id to continue
*/
1180 thread_id_t tid
; /* thread id to continue
*/
1181 int status
; /* continuation status
*/
1185 /* Start
/stop debugging an existing process
*/
1187 process_id_t pid
; /* id of the process to debug
*/
1188 int attach
; /* 1=attaching
/ 0=detaching from the process
*/
1192 /* Simulate a breakpoint in a process
*/
1194 obj_handle_t handle
; /* process handle
*/
1196 int self
; /* was it the caller itself?
*/
1200 /* Set debugger kill on exit flag
*/
1201 @
REQ(set_debugger_kill_on_exit
)
1202 int kill_on_exit
; /* 0=detach
/1=kill debuggee when debugger dies
*/
1206 /* Read data from a process address space
*/
1207 @
REQ(read_process_memory
)
1208 obj_handle_t handle
; /* process handle
*/
1209 void
* addr
; /* addr to read from
*/
1211 VARARG(data
,bytes
); /* result data
*/
1215 /* Write data to a process address space
*/
1216 @
REQ(write_process_memory
)
1217 obj_handle_t handle
; /* process handle
*/
1218 void
* addr
; /* addr to write
to (must be int
-aligned
) */
1219 unsigned int first_mask
; /* mask for first word
*/
1220 unsigned int last_mask
; /* mask for last word
*/
1221 VARARG(data
,bytes
); /* data to write
*/
1225 /* Create a registry key
*/
1227 obj_handle_t parent
; /* handle to the parent key
*/
1228 unsigned int access
; /* desired access rights
*/
1229 unsigned int options
; /* creation options
*/
1230 time_t modif
; /* last modification time
*/
1231 size_t namelen
; /* length of key name in bytes
*/
1232 VARARG(name
,unicode_str
,namelen
); /* key name
*/
1233 VARARG(class
,unicode_str
); /* class name
*/
1235 obj_handle_t hkey
; /* handle to the created key
*/
1236 int created
; /* has it been newly created?
*/
1239 /* Open a registry key
*/
1241 obj_handle_t parent
; /* handle to the parent key
*/
1242 unsigned int access
; /* desired access rights
*/
1243 VARARG(name
,unicode_str
); /* key name
*/
1245 obj_handle_t hkey
; /* handle to the open key
*/
1249 /* Delete a registry key
*/
1251 obj_handle_t hkey
; /* handle to the key
*/
1255 /* Flush a registry key
*/
1257 obj_handle_t hkey
; /* handle to the key
*/
1261 /* Enumerate registry subkeys
*/
1263 obj_handle_t hkey
; /* handle to registry key
*/
1264 int index
; /* index of
subkey (or
-1 for current key
) */
1265 int info_class
; /* requested information class
*/
1267 int subkeys
; /* number of subkeys
*/
1268 int max_subkey
; /* longest subkey name
*/
1269 int max_class
; /* longest class name
*/
1270 int values
; /* number of values
*/
1271 int max_value
; /* longest value name
*/
1272 int max_data
; /* longest value data
*/
1273 time_t modif
; /* last modification time
*/
1274 size_t total
; /* total length needed for full name and class
*/
1275 size_t namelen
; /* length of key name in bytes
*/
1276 VARARG(name
,unicode_str
,namelen
); /* key name
*/
1277 VARARG(class
,unicode_str
); /* class name
*/
1281 /* Set a value of a registry key
*/
1283 obj_handle_t hkey
; /* handle to registry key
*/
1284 int type
; /* value type
*/
1285 size_t namelen
; /* length of value name in bytes
*/
1286 VARARG(name
,unicode_str
,namelen
); /* value name
*/
1287 VARARG(data
,bytes
); /* value data
*/
1291 /* Retrieve the value of a registry key
*/
1293 obj_handle_t hkey
; /* handle to registry key
*/
1294 VARARG(name
,unicode_str
); /* value name
*/
1296 int type
; /* value type
*/
1297 size_t total
; /* total length needed for data
*/
1298 VARARG(data
,bytes
); /* value data
*/
1302 /* Enumerate a value of a registry key
*/
1303 @
REQ(enum_key_value
)
1304 obj_handle_t hkey
; /* handle to registry key
*/
1305 int index
; /* value index
*/
1306 int info_class
; /* requested information class
*/
1308 int type
; /* value type
*/
1309 size_t total
; /* total length needed for full name and data
*/
1310 size_t namelen
; /* length of value name in bytes
*/
1311 VARARG(name
,unicode_str
,namelen
); /* value name
*/
1312 VARARG(data
,bytes
); /* value data
*/
1316 /* Delete a value of a registry key
*/
1317 @
REQ(delete_key_value
)
1318 obj_handle_t hkey
; /* handle to registry key
*/
1319 VARARG(name
,unicode_str
); /* value name
*/
1323 /* Load a registry branch from a file
*/
1325 obj_handle_t hkey
; /* root key to load to
*/
1326 obj_handle_t file
; /* file to load from
*/
1327 VARARG(name
,unicode_str
); /* subkey name
*/
1331 /* UnLoad a registry branch from a file
*/
1332 @
REQ(unload_registry
)
1333 obj_handle_t hkey
; /* root key to unload to
*/
1337 /* Save a registry branch to a file
*/
1339 obj_handle_t hkey
; /* key to save
*/
1340 obj_handle_t file
; /* file to save to
*/
1344 /* Add a registry key change notification
*/
1345 @
REQ(set_registry_notification
)
1346 obj_handle_t hkey
; /* key to watch for changes
*/
1347 obj_handle_t event
; /* event to set
*/
1348 int subtree
; /* should we watch the whole subtree?
*/
1349 unsigned int filter
; /* things to watch
*/
1353 /* Create a waitable timer
*/
1355 unsigned int access
; /* wanted access rights
*/
1356 unsigned int attributes
; /* object attributes
*/
1357 int manual
; /* manual reset
*/
1358 VARARG(name
,unicode_str
); /* object name
*/
1360 obj_handle_t handle
; /* handle to the timer
*/
1364 /* Open a waitable timer
*/
1366 unsigned int access
; /* wanted access rights
*/
1367 unsigned int attributes
; /* object attributes
*/
1368 VARARG(name
,unicode_str
); /* object name
*/
1370 obj_handle_t handle
; /* handle to the timer
*/
1373 /* Set a waitable timer
*/
1375 obj_handle_t handle
; /* handle to the timer
*/
1376 abs_time_t expire
; /* next expiration absolute time
*/
1377 int period
; /* timer period in ms
*/
1378 void
* callback
; /* callback function
*/
1379 void
* arg
; /* callback argument
*/
1381 int signaled
; /* was the timer signaled before this call ?
*/
1384 /* Cancel a waitable timer
*/
1386 obj_handle_t handle
; /* handle to the timer
*/
1388 int signaled
; /* was the timer signaled before this calltime ?
*/
1391 /* Get information on a waitable timer
*/
1392 @
REQ(get_timer_info
)
1393 obj_handle_t handle
; /* handle to the timer
*/
1395 abs_time_t when
; /* absolute time when the timer next expires
*/
1396 int signaled
; /* is the timer signaled?
*/
1400 /* Retrieve the current context of a thread
*/
1401 @
REQ(get_thread_context
)
1402 obj_handle_t handle
; /* thread handle
*/
1403 unsigned int flags
; /* context flags
*/
1404 int suspend
; /* if getting context during suspend
*/
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 int suspend
; /* if setting context during suspend
*/
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 access
;
1684 unsigned int attributes
; /* object attributes
*/
1685 unsigned int options
;
1687 unsigned int maxinstances
;
1688 unsigned int outsize
;
1689 unsigned int insize
;
1690 unsigned int timeout
;
1691 VARARG(name
,unicode_str
); /* pipe name
*/
1693 obj_handle_t handle
; /* handle to the pipe
*/
1696 /* flags in create_named_pipe and get_named_pipe_info
*/
1697 #define NAMED_PIPE_MESSAGE_STREAM_WRITE
0x0001
1698 #define NAMED_PIPE_MESSAGE_STREAM_READ
0x0002
1699 #define NAMED_PIPE_NONBLOCKING_MODE
0x0004
1702 /* Open an existing named pipe
*/
1703 @
REQ(open_named_pipe
)
1704 unsigned int access
;
1705 unsigned int attributes
; /* object attributes
*/
1706 unsigned int flags
; /* file flags
*/
1707 VARARG(name
,unicode_str
); /* pipe name
*/
1709 obj_handle_t handle
; /* handle to the pipe
*/
1713 /* Connect to a named pipe
*/
1714 @
REQ(connect_named_pipe
)
1715 obj_handle_t handle
;
1721 /* Wait for a named pipe
*/
1722 @
REQ(wait_named_pipe
)
1723 unsigned int timeout
;
1726 VARARG(name
,unicode_str
); /* pipe name
*/
1730 /* Disconnect a named pipe
*/
1731 @
REQ(disconnect_named_pipe
)
1732 obj_handle_t handle
;
1734 int fd
; /* associated fd to close
*/
1738 @
REQ(get_named_pipe_info
)
1739 obj_handle_t handle
;
1742 unsigned int maxinstances
;
1743 unsigned int outsize
;
1744 unsigned int insize
;
1748 /* Create a window
*/
1750 user_handle_t parent
; /* parent window
*/
1751 user_handle_t owner
; /* owner window
*/
1752 atom_t atom
; /* class atom
*/
1753 void
* instance
; /* module instance
*/
1755 user_handle_t handle
; /* created window
*/
1756 int extra
; /* number of extra bytes
*/
1757 void
* class_ptr
; /* pointer to class in client address space
*/
1761 /* Destroy a window
*/
1762 @
REQ(destroy_window
)
1763 user_handle_t handle
; /* handle to the window
*/
1767 /* Retrieve the desktop window for the current thread
*/
1768 @
REQ(get_desktop_window
)
1770 user_handle_t handle
; /* handle to the desktop window
*/
1774 /* Set a window owner
*/
1775 @
REQ(set_window_owner
)
1776 user_handle_t handle
; /* handle to the window
*/
1777 user_handle_t owner
; /* new owner
*/
1779 user_handle_t full_owner
; /* full handle of new owner
*/
1780 user_handle_t prev_owner
; /* full handle of previous owner
*/
1784 /* Get information from a window handle
*/
1785 @
REQ(get_window_info
)
1786 user_handle_t handle
; /* handle to the window
*/
1788 user_handle_t full_handle
; /* full
32-bit handle
*/
1789 user_handle_t last_active
; /* last active popup
*/
1790 process_id_t pid
; /* process owning the window
*/
1791 thread_id_t tid
; /* thread owning the window
*/
1792 atom_t atom
; /* class atom
*/
1793 int is_unicode
; /* ANSI or unicode
*/
1797 /* Set some information in a window
*/
1798 @
REQ(set_window_info
)
1799 user_handle_t handle
; /* handle to the window
*/
1800 unsigned int flags
; /* flags for fields to
set (see below
) */
1801 unsigned int style
; /* window style
*/
1802 unsigned int ex_style
; /* window extended style
*/
1803 unsigned int id
; /* window id
*/
1804 void
* instance
; /* creator instance
*/
1805 int is_unicode
; /* ANSI or unicode
*/
1806 void
* user_data
; /* user
-specific data
*/
1807 int extra_offset
; /* offset to set in extra bytes
*/
1808 size_t extra_size
; /* size to set in extra bytes
*/
1809 unsigned int extra_value
; /* value to set in extra bytes
*/
1811 unsigned int old_style
; /* old window style
*/
1812 unsigned int old_ex_style
; /* old window extended style
*/
1813 unsigned int old_id
; /* old window id
*/
1814 void
* old_instance
; /* old creator instance
*/
1815 void
* old_user_data
; /* old user
-specific data
*/
1816 unsigned int old_extra_value
; /* old value in extra bytes
*/
1818 #define SET_WIN_STYLE
0x01
1819 #define SET_WIN_EXSTYLE
0x02
1820 #define SET_WIN_ID
0x04
1821 #define SET_WIN_INSTANCE
0x08
1822 #define SET_WIN_USERDATA
0x10
1823 #define SET_WIN_EXTRA
0x20
1824 #define SET_WIN_UNICODE
0x40
1827 /* Set the parent of a window
*/
1829 user_handle_t handle
; /* handle to the window
*/
1830 user_handle_t parent
; /* handle to the parent
*/
1832 user_handle_t old_parent
; /* old parent window
*/
1833 user_handle_t full_parent
; /* full handle of new parent
*/
1837 /* Get a list of the window parents
, up to the root of the tree
*/
1838 @
REQ(get_window_parents
)
1839 user_handle_t handle
; /* handle to the window
*/
1841 int count
; /* total count of parents
*/
1842 VARARG(parents
,user_handles
); /* parent handles
*/
1846 /* Get a list of the window children
*/
1847 @
REQ(get_window_children
)
1848 user_handle_t parent
; /* parent window
*/
1849 atom_t atom
; /* class atom for the listed children
*/
1850 thread_id_t tid
; /* thread owning the listed children
*/
1852 int count
; /* total count of children
*/
1853 VARARG(children
,user_handles
); /* children handles
*/
1857 /* Get a list of the window children that contain a given point
*/
1858 @
REQ(get_window_children_from_point
)
1859 user_handle_t parent
; /* parent window
*/
1860 int x
; /* point in parent coordinates
*/
1863 int count
; /* total count of children
*/
1864 VARARG(children
,user_handles
); /* children handles
*/
1868 /* Get window tree information from a window handle
*/
1869 @
REQ(get_window_tree
)
1870 user_handle_t handle
; /* handle to the window
*/
1872 user_handle_t parent
; /* parent window
*/
1873 user_handle_t owner
; /* owner window
*/
1874 user_handle_t next_sibling
; /* next sibling in Z
-order
*/
1875 user_handle_t prev_sibling
; /* prev sibling in Z
-order
*/
1876 user_handle_t first_sibling
; /* first sibling in Z
-order
*/
1877 user_handle_t last_sibling
; /* last sibling in Z
-order
*/
1878 user_handle_t first_child
; /* first child
*/
1879 user_handle_t last_child
; /* last child
*/
1882 /* Set the position and Z order of a window
*/
1883 @
REQ(set_window_pos
)
1884 user_handle_t handle
; /* handle to the window
*/
1885 user_handle_t previous
; /* previous window in Z order
*/
1886 unsigned int flags
; /* SWP_
* flags
*/
1887 rectangle_t window
; /* window rectangle
*/
1888 rectangle_t client
; /* client rectangle
*/
1889 VARARG(valid
,rectangles
); /* valid rectangles from WM_NCCALCSIZE
*/
1891 unsigned int new_style
; /* new window style
*/
1895 /* Get the window and client rectangles of a window
*/
1896 @
REQ(get_window_rectangles
)
1897 user_handle_t handle
; /* handle to the window
*/
1899 rectangle_t window
; /* window rectangle
*/
1900 rectangle_t visible
; /* visible part of the window rectangle
*/
1901 rectangle_t client
; /* client rectangle
*/
1905 /* Get the window text
*/
1906 @
REQ(get_window_text
)
1907 user_handle_t handle
; /* handle to the window
*/
1909 VARARG(text
,unicode_str
); /* window text
*/
1913 /* Set the window text
*/
1914 @
REQ(set_window_text
)
1915 user_handle_t handle
; /* handle to the window
*/
1916 VARARG(text
,unicode_str
); /* window text
*/
1920 /* Get the coordinates offset between two windows
*/
1921 @
REQ(get_windows_offset
)
1922 user_handle_t from
; /* handle to the first window
*/
1923 user_handle_t to
; /* handle to the second window
*/
1925 int x
; /* x coordinate offset
*/
1926 int y
; /* y coordinate offset
*/
1930 /* Get the visible region of a window
*/
1931 @
REQ(get_visible_region
)
1932 user_handle_t window
; /* handle to the window
*/
1933 unsigned int flags
; /* DCX flags
*/
1935 user_handle_t top_win
; /* top window to clip against
*/
1936 int top_org_x
; /* top window visible rect origin in screen coords
*/
1938 int win_org_x
; /* window rect origin in screen coords
*/
1940 size_t total_size
; /* total size of the resulting region
*/
1941 VARARG(region
,rectangles
); /* list of rectangles for the
region (in screen coords
) */
1945 /* Get the window region
*/
1946 @
REQ(get_window_region
)
1947 user_handle_t window
; /* handle to the window
*/
1949 size_t total_size
; /* total size of the resulting region
*/
1950 VARARG(region
,rectangles
); /* list of rectangles for the region
*/
1954 /* Set the window region
*/
1955 @
REQ(set_window_region
)
1956 user_handle_t window
; /* handle to the window
*/
1957 VARARG(region
,rectangles
); /* list of rectangles for the region
*/
1961 /* Get the window update region
*/
1962 @
REQ(get_update_region
)
1963 user_handle_t window
; /* handle to the window
*/
1964 user_handle_t from_child
; /* child to start searching from
*/
1965 unsigned int flags
; /* update
flags (see below
) */
1967 user_handle_t child
; /* child to
repaint (or window itself
) */
1968 unsigned int flags
; /* resulting update
flags (see below
) */
1969 size_t total_size
; /* total size of the resulting region
*/
1970 VARARG(region
,rectangles
); /* list of rectangles for the region
*/
1972 #define UPDATE_NONCLIENT
0x01 /* get region for repainting non
-client area
*/
1973 #define UPDATE_ERASE
0x02 /* get region for erasing client area
*/
1974 #define UPDATE_PAINT
0x04 /* get region for painting client area
*/
1975 #define UPDATE_INTERNALPAINT
0x08 /* get region if internal paint is pending
*/
1976 #define UPDATE_ALLCHILDREN
0x10 /* force repaint of all children
*/
1977 #define UPDATE_NOCHILDREN
0x20 /* don
't try to repaint any children */
1978 #define UPDATE_NOREGION 0x40 /* don't return a region
, only the flags
*/
1981 /* Update the z order of a window so that a given rectangle is fully visible
*/
1982 @
REQ(update_window_zorder
)
1983 user_handle_t window
; /* handle to the window
*/
1984 rectangle_t rect
; /* rectangle that must be visible
*/
1988 /* Mark parts of a window as needing a redraw
*/
1990 user_handle_t window
; /* handle to the window
*/
1991 unsigned int flags
; /* RDW_
* flags
*/
1992 VARARG(region
,rectangles
); /* list of rectangles for the region
*/
1996 /* Set a window property
*/
1997 @
REQ(set_window_property
)
1998 user_handle_t window
; /* handle to the window
*/
1999 atom_t atom
; /* property
atom (if no name specified
) */
2000 obj_handle_t handle
; /* handle to store
*/
2001 VARARG(name
,unicode_str
); /* property name
*/
2005 /* Remove a window property
*/
2006 @
REQ(remove_window_property
)
2007 user_handle_t window
; /* handle to the window
*/
2008 atom_t atom
; /* property
atom (if no name specified
) */
2009 VARARG(name
,unicode_str
); /* property name
*/
2011 obj_handle_t handle
; /* handle stored in property
*/
2015 /* Get a window property
*/
2016 @
REQ(get_window_property
)
2017 user_handle_t window
; /* handle to the window
*/
2018 atom_t atom
; /* property
atom (if no name specified
) */
2019 VARARG(name
,unicode_str
); /* property name
*/
2021 obj_handle_t handle
; /* handle stored in property
*/
2025 /* Get the list of properties of a window
*/
2026 @
REQ(get_window_properties
)
2027 user_handle_t window
; /* handle to the window
*/
2029 int total
; /* total number of properties
*/
2030 VARARG(props
,properties
); /* list of properties
*/
2034 /* Create a window station
*/
2035 @
REQ(create_winstation
)
2036 unsigned int flags
; /* window station flags
*/
2037 unsigned int access
; /* wanted access rights
*/
2038 unsigned int attributes
; /* object attributes
*/
2039 VARARG(name
,unicode_str
); /* object name
*/
2041 obj_handle_t handle
; /* handle to the window station
*/
2045 /* Open a handle to a window station
*/
2046 @
REQ(open_winstation
)
2047 unsigned int access
; /* wanted access rights
*/
2048 unsigned int attributes
; /* object attributes
*/
2049 VARARG(name
,unicode_str
); /* object name
*/
2051 obj_handle_t handle
; /* handle to the window station
*/
2055 /* Close a window station
*/
2056 @
REQ(close_winstation
)
2057 obj_handle_t handle
; /* handle to the window station
*/
2061 /* Get the process current window station
*/
2062 @
REQ(get_process_winstation
)
2064 obj_handle_t handle
; /* handle to the window station
*/
2068 /* Set the process current window station
*/
2069 @
REQ(set_process_winstation
)
2070 obj_handle_t handle
; /* handle to the window station
*/
2074 /* Create a desktop
*/
2075 @
REQ(create_desktop
)
2076 unsigned int flags
; /* desktop flags
*/
2077 unsigned int access
; /* wanted access rights
*/
2078 unsigned int attributes
; /* object attributes
*/
2079 VARARG(name
,unicode_str
); /* object name
*/
2081 obj_handle_t handle
; /* handle to the desktop
*/
2085 /* Open a handle to a desktop
*/
2087 unsigned int flags
; /* desktop flags
*/
2088 unsigned int access
; /* wanted access rights
*/
2089 unsigned int attributes
; /* object attributes
*/
2090 VARARG(name
,unicode_str
); /* object name
*/
2092 obj_handle_t handle
; /* handle to the desktop
*/
2096 /* Close a desktop
*/
2098 obj_handle_t handle
; /* handle to the desktop
*/
2102 /* Get the thread current desktop
*/
2103 @
REQ(get_thread_desktop
)
2104 thread_id_t tid
; /* thread id
*/
2106 obj_handle_t handle
; /* handle to the desktop
*/
2110 /* Set the thread current desktop
*/
2111 @
REQ(set_thread_desktop
)
2112 obj_handle_t handle
; /* handle to the desktop
*/
2116 /* Get
/set information about a user
object (window station or desktop
) */
2117 @
REQ(set_user_object_info
)
2118 obj_handle_t handle
; /* handle to the object
*/
2119 unsigned int flags
; /* information to set
*/
2120 unsigned int obj_flags
; /* new object flags
*/
2122 int is_desktop
; /* is object a desktop?
*/
2123 unsigned int old_obj_flags
; /* old object flags
*/
2124 VARARG(name
,unicode_str
); /* object name
*/
2126 #define SET_USER_OBJECT_FLAGS
1
2129 /* Attach (or detach
) thread inputs
*/
2130 @
REQ(attach_thread_input
)
2131 thread_id_t tid_from
; /* thread to be attached
*/
2132 thread_id_t tid_to
; /* thread to which tid_from should be attached
*/
2133 int attach
; /* is it an attach?
*/
2137 /* Get input data for a given thread
*/
2138 @
REQ(get_thread_input
)
2139 thread_id_t tid
; /* id of thread
*/
2141 user_handle_t focus
; /* handle to the focus window
*/
2142 user_handle_t capture
; /* handle to the capture window
*/
2143 user_handle_t active
; /* handle to the active window
*/
2144 user_handle_t foreground
; /* handle to the global foreground window
*/
2145 user_handle_t menu_owner
; /* handle to the menu owner
*/
2146 user_handle_t move_size
; /* handle to the moving
/resizing window
*/
2147 user_handle_t caret
; /* handle to the caret window
*/
2148 rectangle_t rect
; /* caret rectangle
*/
2152 /* Get the time of the last input event
*/
2153 @
REQ(get_last_input_time
)
2159 /* Retrieve queue keyboard state for a given thread
*/
2161 thread_id_t tid
; /* id of thread
*/
2162 int key
; /* optional key code or
-1 */
2164 unsigned char state
; /* state of specified key
*/
2165 VARARG(keystate
,bytes
); /* state array for all the keys
*/
2168 /* Set queue keyboard state for a given thread
*/
2170 thread_id_t tid
; /* id of thread
*/
2171 VARARG(keystate
,bytes
); /* state array for all the keys
*/
2174 /* Set the system foreground window
*/
2175 @
REQ(set_foreground_window
)
2176 user_handle_t handle
; /* handle to the foreground window
*/
2178 user_handle_t previous
; /* handle to the previous foreground window
*/
2179 int send_msg_old
; /* whether we have to send a msg to the old window
*/
2180 int send_msg_new
; /* whether we have to send a msg to the new window
*/
2183 /* Set the current thread focus window
*/
2184 @
REQ(set_focus_window
)
2185 user_handle_t handle
; /* handle to the focus window
*/
2187 user_handle_t previous
; /* handle to the previous focus window
*/
2190 /* Set the current thread active window
*/
2191 @
REQ(set_active_window
)
2192 user_handle_t handle
; /* handle to the active window
*/
2194 user_handle_t previous
; /* handle to the previous active window
*/
2197 /* Set the current thread capture window
*/
2198 @
REQ(set_capture_window
)
2199 user_handle_t handle
; /* handle to the capture window
*/
2200 unsigned int flags
; /* capture
flags (see below
) */
2202 user_handle_t previous
; /* handle to the previous capture window
*/
2203 user_handle_t full_handle
; /* full
32-bit handle of new capture window
*/
2205 #define CAPTURE_MENU
0x01 /* capture is for a menu
*/
2206 #define CAPTURE_MOVESIZE
0x02 /* capture is for moving
/resizing
*/
2209 /* Set the current thread caret window
*/
2210 @
REQ(set_caret_window
)
2211 user_handle_t handle
; /* handle to the caret window
*/
2212 int width
; /* caret width
*/
2213 int height
; /* caret height
*/
2215 user_handle_t previous
; /* handle to the previous caret window
*/
2216 rectangle_t old_rect
; /* previous caret rectangle
*/
2217 int old_hide
; /* previous hide count
*/
2218 int old_state
; /* previous caret
state (1=on
, 0=off
) */
2222 /* Set the current thread caret information
*/
2223 @
REQ(set_caret_info
)
2224 unsigned int flags
; /* caret
flags (see below
) */
2225 user_handle_t handle
; /* handle to the caret window
*/
2226 int x
; /* caret x position
*/
2227 int y
; /* caret y position
*/
2228 int hide
; /* increment for hide
count (can be negative to show it
) */
2229 int state
; /* caret
state (1=on
, 0=off
, -1=toggle current state
) */
2231 user_handle_t full_handle
; /* handle to the current caret window
*/
2232 rectangle_t old_rect
; /* previous caret rectangle
*/
2233 int old_hide
; /* previous hide count
*/
2234 int old_state
; /* previous caret
state (1=on
, 0=off
) */
2236 #define SET_CARET_POS
0x01 /* set the caret position from x
,y
*/
2237 #define SET_CARET_HIDE
0x02 /* increment the caret hide count
*/
2238 #define SET_CARET_STATE
0x04 /* set the caret on
/off state
*/
2241 /* Set a window hook
*/
2243 int id
; /* id of the hook
*/
2244 process_id_t pid
; /* id of process to set the hook into
*/
2245 thread_id_t tid
; /* id of thread to set the hook into
*/
2249 void
* proc
; /* hook procedure
*/
2250 int unicode
; /* is it a unicode hook?
*/
2251 VARARG(module
,unicode_str
); /* module name
*/
2253 user_handle_t handle
; /* handle to the hook
*/
2254 unsigned int active_hooks
; /* active hooks bitmap
*/
2258 /* Remove a window hook
*/
2260 user_handle_t handle
; /* handle to the hook
*/
2261 int id
; /* id of the hook if handle is
0 */
2262 void
* proc
; /* hook procedure if handle is
0 */
2264 unsigned int active_hooks
; /* active hooks bitmap
*/
2268 /* Start calling a hook chain
*/
2269 @
REQ(start_hook_chain
)
2270 int id
; /* id of the hook
*/
2271 int event
; /* signalled event
*/
2272 user_handle_t window
; /* handle to the event window
*/
2273 int object_id
; /* object id for out of context winevent
*/
2274 int child_id
; /* child id for out of context winevent
*/
2276 user_handle_t handle
; /* handle to the next hook
*/
2277 process_id_t pid
; /* process id for low
-level keyboard
/mouse hooks
*/
2278 thread_id_t tid
; /* thread id for low
-level keyboard
/mouse hooks
*/
2279 void
* proc
; /* hook procedure
*/
2280 int unicode
; /* is it a unicode hook?
*/
2281 unsigned int active_hooks
; /* active hooks bitmap
*/
2282 VARARG(module
,unicode_str
); /* module name
*/
2286 /* Finished calling a hook chain
*/
2287 @
REQ(finish_hook_chain
)
2288 int id
; /* id of the hook
*/
2292 /* Get the next hook to call
*/
2294 user_handle_t handle
; /* handle to the current hook
*/
2295 int event
; /* signalled event
*/
2296 user_handle_t window
; /* handle to the event window
*/
2297 int object_id
; /* object id for out of context winevent
*/
2298 int child_id
; /* child id for out of context winevent
*/
2300 user_handle_t next
; /* handle to the next hook
*/
2301 int id
; /* id of the next hook
*/
2302 process_id_t pid
; /* process id for low
-level keyboard
/mouse hooks
*/
2303 thread_id_t tid
; /* thread id for low
-level keyboard
/mouse hooks
*/
2304 void
* proc
; /* next hook procedure
*/
2305 int prev_unicode
; /* was the previous a unicode hook?
*/
2306 int next_unicode
; /* is the next a unicode hook?
*/
2307 VARARG(module
,unicode_str
); /* module name
*/
2311 /* Create a window class
*/
2313 int local
; /* is it a local class?
*/
2314 atom_t atom
; /* class atom
*/
2315 unsigned int style
; /* class style
*/
2316 void
* instance
; /* module instance
*/
2317 int extra
; /* number of extra class bytes
*/
2318 int win_extra
; /* number of window extra bytes
*/
2319 void
* client_ptr
; /* pointer to class in client address space
*/
2323 /* Destroy a window class
*/
2325 atom_t atom
; /* class atom
*/
2326 void
* instance
; /* module instance
*/
2328 void
* client_ptr
; /* pointer to class in client address space
*/
2332 /* Set some information in a class
*/
2333 @
REQ(set_class_info
)
2334 user_handle_t window
; /* handle to the window
*/
2335 unsigned int flags
; /* flags for info to
set (see below
) */
2336 atom_t atom
; /* class atom
*/
2337 unsigned int style
; /* class style
*/
2338 int win_extra
; /* number of window extra bytes
*/
2339 void
* instance
; /* module instance
*/
2340 int extra_offset
; /* offset to set in extra bytes
*/
2341 size_t extra_size
; /* size to set in extra bytes
*/
2342 unsigned int extra_value
; /* value to set in extra bytes
*/
2344 atom_t old_atom
; /* previous class atom
*/
2345 unsigned int old_style
; /* previous class style
*/
2346 int old_extra
; /* previous number of class extra bytes
*/
2347 int old_win_extra
; /* previous number of window extra bytes
*/
2348 void
* old_instance
; /* previous module instance
*/
2349 unsigned int old_extra_value
; /* old value in extra bytes
*/
2351 #define SET_CLASS_ATOM
0x0001
2352 #define SET_CLASS_STYLE
0x0002
2353 #define SET_CLASS_WINEXTRA
0x0004
2354 #define SET_CLASS_INSTANCE
0x0008
2355 #define SET_CLASS_EXTRA
0x0010
2358 /* Set
/get clipboard information
*/
2359 @
REQ(set_clipboard_info
)
2360 unsigned int flags
; /* flags for fields to
set (see below
) */
2361 user_handle_t clipboard
; /* clipboard window
*/
2362 user_handle_t owner
; /* clipboard owner
*/
2363 user_handle_t viewer
; /* first clipboard viewer
*/
2364 unsigned int seqno
; /* change sequence number
*/
2366 unsigned int flags
; /* status
flags (see below
) */
2367 user_handle_t old_clipboard
; /* old clipboard window
*/
2368 user_handle_t old_owner
; /* old clipboard owner
*/
2369 user_handle_t old_viewer
; /* old clipboard viewer
*/
2370 unsigned int seqno
; /* current sequence number
*/
2373 #define SET_CB_OPEN
0x001
2374 #define SET_CB_OWNER
0x002
2375 #define SET_CB_VIEWER
0x004
2376 #define SET_CB_SEQNO
0x008
2377 #define SET_CB_RELOWNER
0x010
2378 #define SET_CB_CLOSE
0x020
2379 #define CB_OPEN
0x040
2380 #define CB_OWNER
0x080
2381 #define CB_PROCESS
0x100
2384 /* Open a security token
*/
2386 obj_handle_t handle
; /* handle to the thread or process
*/
2387 unsigned int flags
; /* flags (see below
) */
2389 obj_handle_t token
; /* handle to the token
*/
2391 #define OPEN_TOKEN_THREAD
1
2392 #define OPEN_TOKEN_AS_SELF
2
2395 /* Set
/get the global windows
*/
2396 @
REQ(set_global_windows
)
2397 unsigned int flags
; /* flags for fields to
set (see below
) */
2398 user_handle_t shell_window
; /* handle to the new shell window
*/
2399 user_handle_t shell_listview
; /* handle to the new shell listview window
*/
2400 user_handle_t progman_window
; /* handle to the new program manager window
*/
2401 user_handle_t taskman_window
; /* handle to the new task manager window
*/
2403 user_handle_t old_shell_window
; /* handle to the shell window
*/
2404 user_handle_t old_shell_listview
; /* handle to the shell listview window
*/
2405 user_handle_t old_progman_window
; /* handle to the new program manager window
*/
2406 user_handle_t old_taskman_window
; /* handle to the new task manager window
*/
2408 #define SET_GLOBAL_SHELL_WINDOWS
0x01 /* set both main shell and listview windows
*/
2409 #define SET_GLOBAL_PROGMAN_WINDOW
0x02
2410 #define SET_GLOBAL_TASKMAN_WINDOW
0x04
2412 /* Adjust the privileges held by a token
*/
2413 @
REQ(adjust_token_privileges
)
2414 obj_handle_t handle
; /* handle to the token
*/
2415 int disable_all
; /* disable all privileges?
*/
2416 int get_modified_state
; /* get modified privileges?
*/
2417 VARARG(privileges
,LUID_AND_ATTRIBUTES
); /* privileges to enable
/disable
/remove
*/
2419 unsigned int len
; /* total length in bytes required to store token privileges
*/
2420 VARARG(privileges
,LUID_AND_ATTRIBUTES
); /* modified privileges
*/
2423 /* Retrieves the set of privileges held by or available to a token
*/
2424 @
REQ(get_token_privileges
)
2425 obj_handle_t handle
; /* handle to the token
*/
2427 unsigned int len
; /* total length in bytes required to store token privileges
*/
2428 VARARG(privileges
,LUID_AND_ATTRIBUTES
); /* privileges held by or available to a token
*/
2431 /* Check the token has the required privileges
*/
2432 @
REQ(check_token_privileges
)
2433 obj_handle_t handle
; /* handle to the token
*/
2434 int all_required
; /* are all the privileges required for the check to succeed?
*/
2435 VARARG(privileges
,LUID_AND_ATTRIBUTES
); /* privileges to check
*/
2437 int has_privileges
; /* does the token have the required privileges?
*/
2438 VARARG(privileges
,LUID_AND_ATTRIBUTES
); /* privileges held by or available to a token
*/
2441 @
REQ(duplicate_token
)
2442 obj_handle_t handle
; /* handle to the token to duplicate
*/
2443 unsigned int access
; /* access rights to the new token
*/
2444 int inherit
; /* inherit flag
*/
2445 int primary
; /* is the new token to be a primary one?
*/
2446 int impersonation_level
; /* impersonation level of the new token
*/
2448 obj_handle_t new_handle
; /* duplicated handle
*/
2452 obj_handle_t handle
; /* handle to the token
*/
2453 unsigned int desired_access
; /* desired access to the object
*/
2454 unsigned int mapping_read
; /* mapping from generic read to specific rights
*/
2455 unsigned int mapping_write
; /* mapping from generic write to specific rights
*/
2456 unsigned int mapping_execute
; /* mapping from generic execute to specific rights
*/
2457 unsigned int mapping_all
; /* mapping from generic all to specific rights
*/
2458 VARARG(sd
,security_descriptor
); /* security descriptor to check
*/
2460 unsigned int access_granted
; /* access rights actually granted
*/
2461 unsigned int access_status
; /* was access granted?
*/
2462 unsigned int privileges_len
; /* length needed to store privileges
*/
2463 VARARG(privileges
,LUID_AND_ATTRIBUTES
); /* privileges used during access check
*/
2466 @
REQ(get_token_user
)
2467 obj_handle_t handle
; /* handle to the token
*/
2469 size_t user_len
; /* length needed to store user
*/
2470 VARARG(user
,SID
); /* sid of the user the token represents
*/
2473 /* Create a mailslot
*/
2474 @
REQ(create_mailslot
)
2475 unsigned int access
; /* wanted access rights
*/
2476 unsigned int attributes
; /* object attributes
*/
2477 unsigned int max_msgsize
;
2479 VARARG(name
,unicode_str
); /* mailslot name
*/
2481 obj_handle_t handle
; /* handle to the mailslot
*/
2485 /* Open an existing mailslot
*/
2487 unsigned int access
;
2488 unsigned int attributes
; /* object attributes
*/
2489 unsigned int sharing
; /* sharing mode
*/
2490 VARARG(name
,unicode_str
); /* mailslot name
*/
2492 obj_handle_t handle
; /* handle to the mailslot
*/
2496 /* Set mailslot information
*/
2497 @
REQ(set_mailslot_info
)
2498 obj_handle_t handle
; /* handle to the mailslot
*/
2502 unsigned int max_msgsize
;
2504 unsigned int msg_count
;
2505 unsigned int next_msgsize
;
2507 #define MAILSLOT_SET_READ_TIMEOUT
1