3 * Wine server protocol definition
5 * Copyright (C
) 2001 Alexandre Julliard
7 * This file is used by tools
/make_requests to build the
8 * protocol structures in include
/wine
/server_protocol.h
10 * This library is free software
; you can redistribute it and
/or
11 * modify it under the terms of the GNU Lesser General Public
12 * License as published by the Free Software Foundation
; either
13 * version
2.1 of the License
, or (at your option
) any later version.
15 * This library is distributed in the hope that it will be useful
,
16 * but WITHOUT ANY WARRANTY
; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU
18 * Lesser General Public License for more details.
20 * You should have received a copy of the GNU Lesser General Public
21 * License along with this library
; if not
, write to the Free Software
22 * Foundation
, Inc.
, 59 Temple Place
, Suite
330, Boston
, MA
02111-1307 USA
25 @HEADER
/* start of C declarations
*/
36 int req
; /* request code
*/
37 size_t request_size
; /* request variable part size
*/
38 size_t reply_size
; /* reply variable part maximum size
*/
43 unsigned int error
; /* error result
*/
44 size_t reply_size
; /* reply variable part size
*/
47 /* placeholder structure for the maximum allowed request size
*/
48 /* this is used to construct the generic_request union
*/
49 struct request_max_size
51 int pad
[16]; /* the max request size is
16 ints
*/
54 typedef void
*obj_handle_t
;
55 typedef void
*user_handle_t
;
56 typedef unsigned short atom_t
;
57 typedef unsigned int process_id_t
;
58 typedef unsigned int thread_id_t
;
60 #define FIRST_USER_HANDLE
0x0020 /* first possible value for low word of user handle
*/
61 #define LAST_USER_HANDLE
0xffef /* last possible value for low word of user handle
*/
64 /* definitions of the event data depending on the event code
*/
65 struct debug_event_exception
67 EXCEPTION_RECORD record
; /* exception record
*/
68 int first
; /* first chance exception?
*/
70 struct debug_event_create_thread
72 obj_handle_t handle
; /* handle to the new thread
*/
73 void
*teb
; /* thread
teb (in debugged process address space
) */
74 void
*start
; /* thread startup routine
*/
76 struct debug_event_create_process
78 obj_handle_t file
; /* handle to the process exe file
*/
79 obj_handle_t process
; /* handle to the new process
*/
80 obj_handle_t thread
; /* handle to the new thread
*/
81 void
*base
; /* base of executable image
*/
82 int dbg_offset
; /* offset of debug info in file
*/
83 int dbg_size
; /* size of debug info
*/
84 void
*teb
; /* thread
teb (in debugged process address space
) */
85 void
*start
; /* thread startup routine
*/
86 void
*name
; /* image
name (optional
) */
87 int unicode
; /* is it Unicode?
*/
89 struct debug_event_exit
91 int exit_code
; /* thread or process exit code
*/
93 struct debug_event_load_dll
95 obj_handle_t handle
; /* file handle for the dll
*/
96 void
*base
; /* base address of the dll
*/
97 int dbg_offset
; /* offset of debug info in file
*/
98 int dbg_size
; /* size of debug info
*/
99 void
*name
; /* image
name (optional
) */
100 int unicode
; /* is it Unicode?
*/
102 struct debug_event_unload_dll
104 void
*base
; /* base address of the dll
*/
106 struct debug_event_output_string
108 void
*string
; /* string to
display (in debugged process address space
) */
109 int unicode
; /* is it Unicode?
*/
110 int length
; /* string length
*/
112 struct debug_event_rip_info
117 union debug_event_data
119 struct debug_event_exception exception
;
120 struct debug_event_create_thread create_thread
;
121 struct debug_event_create_process create_process
;
122 struct debug_event_exit exit
;
123 struct debug_event_load_dll load_dll
;
124 struct debug_event_unload_dll unload_dll
;
125 struct debug_event_output_string output_string
;
126 struct debug_event_rip_info rip_info
;
129 /* debug event data
*/
132 int code
; /* event code
*/
133 union debug_event_data info
; /* event information
*/
136 /* structure used in sending an fd from client to server
*/
139 thread_id_t tid
; /* thread id
*/
140 int fd
; /* file descriptor on client
-side
*/
143 /* structure sent by the server on the wait fifo
*/
146 void
*cookie
; /* magic cookie that was passed in select_request
*/
147 int signaled
; /* wait result
*/
150 /* structure for absolute timeouts
*/
153 int sec
; /* seconds since Unix epoch
*/
154 int usec
; /* microseconds
*/
157 /* structure returned in the list of window properties
*/
160 atom_t atom
; /* property atom
*/
161 short string
; /* was atom a string originally?
*/
162 obj_handle_t handle
; /* handle stored in property
*/
165 /* structure to specify window rectangles
*/
174 /* structure for console char
/attribute info
*/
181 #define MAX_ACL_LEN
65535
183 struct security_descriptor
185 unsigned int control
; /* SE_ flags
*/
190 /* VARARGS(owner
,SID
); */
191 /* VARARGS(group
,SID
); */
192 /* VARARGS(sacl
,ACL
); */
193 /* VARARGS(dacl
,ACL
); */
196 /****************************************************************/
197 /* Request declarations
*/
199 /* Create a new process from the context of the parent
*/
201 int inherit_all
; /* inherit all handles from parent
*/
202 unsigned int create_flags
; /* creation flags
*/
203 int unix_pid
; /* Unix pid of new process
*/
204 obj_handle_t exe_file
; /* file handle for main exe
*/
205 obj_handle_t hstdin
; /* handle for stdin
*/
206 obj_handle_t hstdout
; /* handle for stdout
*/
207 obj_handle_t hstderr
; /* handle for stderr
*/
208 VARARG(info
,startup_info
); /* startup information
*/
209 VARARG(env
,unicode_str
); /* environment for new process
*/
211 obj_handle_t info
; /* new process info handle
*/
215 /* Retrieve information about a newly started process
*/
216 @
REQ(get_new_process_info
)
217 obj_handle_t info
; /* info handle returned from new_process_request
*/
218 int pinherit
; /* process handle inherit flag
*/
219 int tinherit
; /* thread handle inherit flag
*/
221 process_id_t pid
; /* process id
*/
222 obj_handle_t phandle
; /* process
handle (in the current process
) */
223 thread_id_t tid
; /* thread id
*/
224 obj_handle_t thandle
; /* thread
handle (in the current process
) */
225 int success
; /* did the process start successfully?
*/
229 /* Create a new thread from the context of the parent
*/
231 int suspend
; /* new thread should be suspended on creation
*/
232 int inherit
; /* inherit flag
*/
233 int request_fd
; /* fd for request pipe
*/
235 thread_id_t tid
; /* thread id
*/
236 obj_handle_t handle
; /* thread
handle (in the current process
) */
240 /* Retrieve the new process startup info
*/
241 @
REQ(get_startup_info
)
243 unsigned int create_flags
; /* creation flags
*/
244 obj_handle_t exe_file
; /* file handle for main exe
*/
245 obj_handle_t hstdin
; /* handle for stdin
*/
246 obj_handle_t hstdout
; /* handle for stdout
*/
247 obj_handle_t hstderr
; /* handle for stderr
*/
248 VARARG(info
,startup_info
); /* startup information
*/
249 VARARG(env
,unicode_str
); /* environment
*/
253 /* Signal the end of the process initialization
*/
254 @
REQ(init_process_done
)
255 void
* module
; /* main module base address
*/
256 size_t module_size
; /* main module size
*/
257 void
* entry
; /* process entry point
*/
258 void
* name
; /* ptr to ptr to
name (in process addr space
) */
259 obj_handle_t exe_file
; /* file handle for main exe
*/
260 int gui
; /* is it a GUI process?
*/
261 VARARG(filename
,unicode_str
); /* file name of main exe
*/
265 /* Initialize a thread
; called from the child after
fork()/clone() */
267 int unix_pid
; /* Unix pid of new thread
*/
268 int unix_tid
; /* Unix tid of new thread
*/
269 void
* teb
; /* TEB of new
thread (in thread address space
) */
270 void
* peb
; /* address of
PEB (in thread address space
) */
271 void
* entry
; /* thread entry
point (in thread address space
) */
272 void
* ldt_copy
; /* address of LDT
copy (in thread address space
) */
273 int reply_fd
; /* fd for reply pipe
*/
274 int wait_fd
; /* fd for blocking calls pipe
*/
275 int debug_level
; /* new debug level
*/
277 process_id_t pid
; /* process id of the new thread
's process */
278 thread_id_t tid; /* thread id of the new thread */
279 size_t info_size; /* total size of startup info */
280 time_t server_start; /* server start time */
281 int version; /* protocol version */
285 /* Terminate a process */
286 @REQ(terminate_process)
287 obj_handle_t handle; /* process handle to terminate */
288 int exit_code; /* process exit code */
290 int self; /* suicide? */
294 /* Terminate a thread */
295 @REQ(terminate_thread)
296 obj_handle_t handle; /* thread handle to terminate */
297 int exit_code; /* thread exit code */
299 int self; /* suicide? */
300 int last; /* last thread in this process? */
304 /* Retrieve information about a process */
305 @REQ(get_process_info)
306 obj_handle_t handle; /* process handle */
308 process_id_t pid; /* server process id */
309 process_id_t ppid; /* server process id of parent */
310 int exit_code; /* process exit code */
311 int priority; /* priority class */
312 int process_affinity; /* process affinity mask */
313 int system_affinity; /* system affinity mask */
314 void* peb; /* PEB address in process address space */
318 /* Set a process informations */
319 @REQ(set_process_info)
320 obj_handle_t handle; /* process handle */
321 int mask; /* setting mask (see below) */
322 int priority; /* priority class */
323 int affinity; /* affinity mask */
325 #define SET_PROCESS_INFO_PRIORITY 0x01
326 #define SET_PROCESS_INFO_AFFINITY 0x02
329 /* Retrieve information about a thread */
330 @REQ(get_thread_info)
331 obj_handle_t handle; /* thread handle */
332 thread_id_t tid_in; /* thread id (optional) */
334 process_id_t pid; /* server process id */
335 thread_id_t tid; /* server thread id */
336 void* teb; /* thread teb pointer */
337 int exit_code; /* thread exit code */
338 int priority; /* thread priority level */
339 int affinity; /* thread affinity mask */
340 time_t creation_time; /* thread creation time */
341 time_t exit_time; /* thread exit time */
345 /* Set a thread informations */
346 @REQ(set_thread_info)
347 obj_handle_t handle; /* thread handle */
348 int mask; /* setting mask (see below) */
349 int priority; /* priority class */
350 int affinity; /* affinity mask */
351 obj_handle_t token; /* impersonation token */
353 #define SET_THREAD_INFO_PRIORITY 0x01
354 #define SET_THREAD_INFO_AFFINITY 0x02
355 #define SET_THREAD_INFO_TOKEN 0x04
358 /* Retrieve information about a module */
360 obj_handle_t handle; /* process handle */
361 void* base_address; /* base address of module */
363 size_t size; /* module size */
365 VARARG(filename,unicode_str); /* file name of module */
369 /* Suspend a thread */
371 obj_handle_t handle; /* thread handle */
373 int count; /* new suspend count */
377 /* Resume a thread */
379 obj_handle_t handle; /* thread handle */
381 int count; /* new suspend count */
385 /* Notify the server that a dll has been loaded */
387 obj_handle_t handle; /* file handle */
388 void* base; /* base address */
389 size_t size; /* dll size */
390 int dbg_offset; /* debug info offset */
391 int dbg_size; /* debug info size */
392 void* name; /* ptr to ptr to name (in process addr space) */
393 VARARG(filename,unicode_str); /* file name of dll */
397 /* Notify the server that a dll is being unloaded */
399 void* base; /* base address */
403 /* Queue an APC for a thread */
405 obj_handle_t handle; /* thread handle */
406 int user; /* user or system apc? */
407 void* func; /* function to call */
408 void* arg1; /* params for function to call */
414 /* Get next APC to call */
416 int alertable; /* is thread alertable? */
418 void* func; /* function to call */
419 int type; /* function type */
420 void* arg1; /* function arguments */
424 enum apc_type { APC_NONE, APC_USER, APC_TIMER, APC_ASYNC_IO };
427 /* Close a handle for the current process */
429 obj_handle_t handle; /* handle to close */
431 int fd; /* associated fd to close */
435 /* Set a handle information */
436 @REQ(set_handle_info)
437 obj_handle_t handle; /* handle we are interested in */
438 int flags; /* new handle flags */
439 int mask; /* mask for flags to set */
440 int fd; /* file descriptor or -1 */
442 int old_flags; /* old flag value */
443 int cur_fd; /* current file descriptor */
447 /* Duplicate a handle */
449 obj_handle_t src_process; /* src process handle */
450 obj_handle_t src_handle; /* src handle to duplicate */
451 obj_handle_t dst_process; /* dst process handle */
452 unsigned int access; /* wanted access rights */
453 int inherit; /* inherit flag */
454 int options; /* duplicate options (see below) */
456 obj_handle_t handle; /* duplicated handle in dst process */
457 int fd; /* associated fd to close */
459 #define DUP_HANDLE_CLOSE_SOURCE DUPLICATE_CLOSE_SOURCE
460 #define DUP_HANDLE_SAME_ACCESS DUPLICATE_SAME_ACCESS
461 #define DUP_HANDLE_MAKE_GLOBAL 0x80000000 /* Not a Windows flag */
464 /* Open a handle to a process */
466 process_id_t pid; /* process id to open */
467 unsigned int access; /* wanted access rights */
468 int inherit; /* inherit flag */
470 obj_handle_t handle; /* handle to the process */
474 /* Open a handle to a thread */
476 thread_id_t tid; /* thread id to open */
477 unsigned int access; /* wanted access rights */
478 int inherit; /* inherit flag */
480 obj_handle_t handle; /* handle to the thread */
484 /* Wait for handles */
486 int flags; /* wait flags (see below) */
487 void* cookie; /* magic cookie to return to client */
488 obj_handle_t signal; /* object to signal (0 if none) */
489 abs_time_t timeout; /* absolute timeout */
490 VARARG(handles,handles); /* handles to select on */
493 #define SELECT_ALERTABLE 2
494 #define SELECT_INTERRUPTIBLE 4
495 #define SELECT_TIMEOUT 8
498 /* Create an event */
500 unsigned int access; /* wanted access rights */
501 int manual_reset; /* manual reset event */
502 int initial_state; /* initial state of the event */
503 int inherit; /* inherit flag */
504 VARARG(name,unicode_str); /* object name */
506 obj_handle_t handle; /* handle to the event */
509 /* Event operation */
511 obj_handle_t handle; /* handle to event */
512 int op; /* event operation (see below) */
514 enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT };
519 unsigned int access; /* wanted access rights */
520 int inherit; /* inherit flag */
521 VARARG(name,unicode_str); /* object name */
523 obj_handle_t handle; /* handle to the event */
529 unsigned int access; /* wanted access rights */
530 int owned; /* initially owned? */
531 int inherit; /* inherit flag */
532 VARARG(name,unicode_str); /* object name */
534 obj_handle_t handle; /* handle to the mutex */
538 /* Release a mutex */
540 obj_handle_t handle; /* handle to the mutex */
542 unsigned int prev_count; /* value of internal counter, before release */
548 unsigned int access; /* wanted access rights */
549 int inherit; /* inherit flag */
550 VARARG(name,unicode_str); /* object name */
552 obj_handle_t handle; /* handle to the mutex */
556 /* Create a semaphore */
557 @REQ(create_semaphore)
558 unsigned int access; /* wanted access rights */
559 unsigned int initial; /* initial count */
560 unsigned int max; /* maximum count */
561 int inherit; /* inherit flag */
562 VARARG(name,unicode_str); /* object name */
564 obj_handle_t handle; /* handle to the semaphore */
568 /* Release a semaphore */
569 @REQ(release_semaphore)
570 obj_handle_t handle; /* handle to the semaphore */
571 unsigned int count; /* count to add to semaphore */
573 unsigned int prev_count; /* previous semaphore count */
577 /* Open a semaphore */
579 unsigned int access; /* wanted access rights */
580 int inherit; /* inherit flag */
581 VARARG(name,unicode_str); /* object name */
583 obj_handle_t handle; /* handle to the semaphore */
589 unsigned int access; /* wanted access rights */
590 int inherit; /* inherit flag */
591 unsigned int sharing; /* sharing flags */
592 int create; /* file create action */
593 unsigned int options; /* file options */
594 unsigned int attrs; /* file attributes for creation */
595 VARARG(filename,string); /* file name */
597 obj_handle_t handle; /* handle to the file */
601 /* Allocate a file handle for a Unix fd */
602 @REQ(alloc_file_handle)
603 unsigned int access; /* wanted access rights */
604 int inherit; /* inherit flag */
605 int fd; /* file descriptor on the client side */
607 obj_handle_t handle; /* handle to the file */
611 /* Get a Unix fd to access a file */
613 obj_handle_t handle; /* handle to the file */
614 unsigned int access; /* wanted access rights */
616 int fd; /* file descriptor */
617 int flags; /* file read/write flags (see below) */
619 #define FD_FLAG_OVERLAPPED 0x01 /* fd opened in overlapped mode */
620 #define FD_FLAG_TIMEOUT 0x02 /* read/write is synchronous */
621 #define FD_FLAG_RECV_SHUTDOWN 0x04
622 #define FD_FLAG_SEND_SHUTDOWN 0x08
623 #define FD_FLAG_AVAILABLE 0x10 /* in overlap read/write operation,
624 * only handle available data (don't wait
) */
627 /* Flush a file buffers
*/
629 obj_handle_t handle
; /* handle to the file
*/
631 obj_handle_t event
; /* event set when finished
*/
635 /* Lock a region of a file
*/
637 obj_handle_t handle
; /* handle to the file
*/
638 unsigned int offset_low
; /* offset of start of lock
*/
639 unsigned int offset_high
; /* offset of start of lock
*/
640 unsigned int count_low
; /* count of bytes to lock
*/
641 unsigned int count_high
; /* count of bytes to lock
*/
642 int shared
; /* shared or exclusive lock?
*/
643 int wait
; /* do we want to wait?
*/
645 obj_handle_t handle
; /* handle to wait on
*/
646 int overlapped
; /* is it an overlapped I
/O handle?
*/
650 /* Unlock a region of a file
*/
652 obj_handle_t handle
; /* handle to the file
*/
653 unsigned int offset_low
; /* offset of start of unlock
*/
654 unsigned int offset_high
; /* offset of start of unlock
*/
655 unsigned int count_low
; /* count of bytes to unlock
*/
656 unsigned int count_high
; /* count of bytes to unlock
*/
660 /* Create a socket
*/
662 unsigned int access
; /* wanted access rights
*/
663 int inherit
; /* inherit flag
*/
664 int family
; /* family
, see socket manpage
*/
665 int type
; /* type
, see socket manpage
*/
666 int protocol
; /* protocol
, see socket manpage
*/
667 unsigned int flags
; /* socket flags
*/
669 obj_handle_t handle
; /* handle to the new socket
*/
673 /* Accept a socket
*/
675 obj_handle_t lhandle
; /* handle to the listening socket
*/
676 unsigned int access
; /* wanted access rights
*/
677 int inherit
; /* inherit flag
*/
679 obj_handle_t handle
; /* handle to the new socket
*/
683 /* Set socket event parameters
*/
684 @
REQ(set_socket_event
)
685 obj_handle_t handle
; /* handle to the socket
*/
686 unsigned int mask
; /* event mask
*/
687 obj_handle_t event
; /* event object
*/
688 user_handle_t window
; /* window to send the message to
*/
689 unsigned int msg
; /* message to send
*/
693 /* Get socket event parameters
*/
694 @
REQ(get_socket_event
)
695 obj_handle_t handle
; /* handle to the socket
*/
696 int service
; /* clear pending?
*/
697 obj_handle_t c_event
; /* event to clear
*/
699 unsigned int mask
; /* event mask
*/
700 unsigned int pmask
; /* pending events
*/
701 unsigned int state
; /* status bits
*/
702 VARARG(errors
,ints
); /* event errors
*/
706 /* Reenable pending socket events
*/
707 @
REQ(enable_socket_event
)
708 obj_handle_t handle
; /* handle to the socket
*/
709 unsigned int mask
; /* events to re
-enable
*/
710 unsigned int sstate
; /* status bits to set
*/
711 unsigned int cstate
; /* status bits to clear
*/
714 @
REQ(set_socket_deferred
)
715 obj_handle_t handle
; /* handle to the socket
*/
716 obj_handle_t deferred
; /* handle to the socket for which
accept() is deferred
*/
719 /* Allocate a
console (only used by a console renderer
) */
721 unsigned int access
; /* wanted access rights
*/
722 int inherit
; /* inherit flag
*/
723 process_id_t pid
; /* pid of process which shall be attached to the console
*/
725 obj_handle_t handle_in
; /* handle to console input
*/
726 obj_handle_t event
; /* handle to renderer events change notification
*/
730 /* Free the console of the current process
*/
735 #define CONSOLE_RENDERER_NONE_EVENT
0x00
736 #define CONSOLE_RENDERER_TITLE_EVENT
0x01
737 #define CONSOLE_RENDERER_ACTIVE_SB_EVENT
0x02
738 #define CONSOLE_RENDERER_SB_RESIZE_EVENT
0x03
739 #define CONSOLE_RENDERER_UPDATE_EVENT
0x04
740 #define CONSOLE_RENDERER_CURSOR_POS_EVENT
0x05
741 #define CONSOLE_RENDERER_CURSOR_GEOM_EVENT
0x06
742 #define CONSOLE_RENDERER_DISPLAY_EVENT
0x07
743 #define CONSOLE_RENDERER_EXIT_EVENT
0x08
744 struct console_renderer_event
779 /* retrieve console events for the renderer
*/
780 @
REQ(get_console_renderer_events
)
781 obj_handle_t handle
; /* handle to console input events
*/
783 VARARG(data
,bytes
); /* the various console_renderer_events
*/
787 /* Open a handle to the process console
*/
789 int from
; /* 0 (resp
1) input (resp output
) of current process console
*/
790 /* otherwise console_in handle to get active screen buffer?
*/
791 unsigned int access
; /* wanted access rights
*/
792 int inherit
; /* inherit flag
*/
793 int share
; /* share
mask (only for output handles
) */
795 obj_handle_t handle
; /* handle to the console
*/
799 /* Get the input queue wait event
*/
800 @
REQ(get_console_wait_event
)
805 /* Get a console
mode (input or output
) */
806 @
REQ(get_console_mode
)
807 obj_handle_t handle
; /* handle to the console
*/
809 int mode
; /* console mode
*/
813 /* Set a console
mode (input or output
) */
814 @
REQ(set_console_mode
)
815 obj_handle_t handle
; /* handle to the console
*/
816 int mode
; /* console mode
*/
820 /* Set info about a
console (input only
) */
821 @
REQ(set_console_input_info
)
822 obj_handle_t handle
; /* handle to console input
, or
0 for process
' console */
823 int mask; /* setting mask (see below) */
824 obj_handle_t active_sb; /* active screen buffer */
825 int history_mode; /* whether we duplicate lines in history */
826 int history_size; /* number of lines in history */
827 int edition_mode; /* index to the edition mode flavors */
828 VARARG(title,unicode_str); /* console title */
830 #define SET_CONSOLE_INPUT_INFO_ACTIVE_SB 0x01
831 #define SET_CONSOLE_INPUT_INFO_TITLE 0x02
832 #define SET_CONSOLE_INPUT_INFO_HISTORY_MODE 0x04
833 #define SET_CONSOLE_INPUT_INFO_HISTORY_SIZE 0x08
834 #define SET_CONSOLE_INPUT_INFO_EDITION_MODE 0x10
837 /* Get info about a console (input only) */
838 @REQ(get_console_input_info)
839 obj_handle_t handle; /* handle to console input, or 0 for process' console
*/
841 int history_mode
; /* whether we duplicate lines in history
*/
842 int history_size
; /* number of lines in history
*/
843 int history_index
; /* number of used lines in history
*/
844 int edition_mode
; /* index to the edition mode flavors
*/
845 VARARG(title
,unicode_str
); /* console title
*/
849 /* appends a string to console
's history */
850 @REQ(append_console_input_history)
851 obj_handle_t handle; /* handle to console input, or 0 for process' console
*/
852 VARARG(line
,unicode_str
); /* line to add
*/
856 /* appends a string to console
's history */
857 @REQ(get_console_input_history)
858 obj_handle_t handle; /* handle to console input, or 0 for process' console
*/
859 int index
; /* index to get line from
*/
861 int total
; /* total length of line in Unicode chars
*/
862 VARARG(line
,unicode_str
); /* line to add
*/
866 /* creates a new screen buffer on process
' console */
867 @REQ(create_console_output)
868 obj_handle_t handle_in; /* handle to console input, or 0 for process' console
*/
869 int access
; /* wanted access rights
*/
870 int share
; /* sharing credentials
*/
871 int inherit
; /* inherit flag
*/
873 obj_handle_t handle_out
; /* handle to the screen buffer
*/
877 /* Set info about a
console (output only
) */
878 @
REQ(set_console_output_info
)
879 obj_handle_t handle
; /* handle to the console
*/
880 int mask
; /* setting
mask (see below
) */
881 short int cursor_size
; /* size of
cursor (percentage filled
) */
882 short int cursor_visible
;/* cursor visibility flag
*/
883 short int cursor_x
; /* position of
cursor (x
, y
) */
885 short int width
; /* width of the screen buffer
*/
886 short int height
; /* height of the screen buffer
*/
887 short int attr
; /* default attribute
*/
888 short int win_left
; /* window actually displayed by renderer
*/
889 short int win_top
; /* the rect area is expressed withing the
*/
890 short int win_right
; /* boundaries of the screen buffer
*/
891 short int win_bottom
;
892 short int max_width
; /* maximum
size (width x height
) for the window
*/
893 short int max_height
;
895 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_GEOM
0x01
896 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_POS
0x02
897 #define SET_CONSOLE_OUTPUT_INFO_SIZE
0x04
898 #define SET_CONSOLE_OUTPUT_INFO_ATTR
0x08
899 #define SET_CONSOLE_OUTPUT_INFO_DISPLAY_WINDOW
0x10
900 #define SET_CONSOLE_OUTPUT_INFO_MAX_SIZE
0x20
903 /* Get info about a
console (output only
) */
904 @
REQ(get_console_output_info
)
905 obj_handle_t handle
; /* handle to the console
*/
907 short int cursor_size
; /* size of
cursor (percentage filled
) */
908 short int cursor_visible
;/* cursor visibility flag
*/
909 short int cursor_x
; /* position of
cursor (x
, y
) */
911 short int width
; /* width of the screen buffer
*/
912 short int height
; /* height of the screen buffer
*/
913 short int attr
; /* default attribute
*/
914 short int win_left
; /* window actually displayed by renderer
*/
915 short int win_top
; /* the rect area is expressed withing the
*/
916 short int win_right
; /* boundaries of the screen buffer
*/
917 short int win_bottom
;
918 short int max_width
; /* maximum
size (width x height
) for the window
*/
919 short int max_height
;
922 /* Add input records to a console input queue
*/
923 @
REQ(write_console_input
)
924 obj_handle_t handle
; /* handle to the console input
*/
925 VARARG(rec
,input_records
); /* input records
*/
927 int written
; /* number of records written
*/
931 /* Fetch input records from a console input queue
*/
932 @
REQ(read_console_input
)
933 obj_handle_t handle
; /* handle to the console input
*/
934 int flush
; /* flush the retrieved records from the queue?
*/
936 int read
; /* number of records read
*/
937 VARARG(rec
,input_records
); /* input records
*/
941 /* write
data (chars and
/or attributes
) in a screen buffer
*/
942 @
REQ(write_console_output
)
943 obj_handle_t handle
; /* handle to the console output
*/
944 int x
; /* position where to start writing
*/
946 int mode
; /* char
info (see below
) */
947 int wrap
; /* wrap around at end of line?
*/
948 VARARG(data
,bytes
); /* info to write
*/
950 int written
; /* number of char infos actually written
*/
951 int width
; /* width of screen buffer
*/
952 int height
; /* height of screen buffer
*/
956 CHAR_INFO_MODE_TEXT
, /* characters only
*/
957 CHAR_INFO_MODE_ATTR
, /* attributes only
*/
958 CHAR_INFO_MODE_TEXTATTR
, /* both characters and attributes
*/
959 CHAR_INFO_MODE_TEXTSTDATTR
/* characters but use standard attributes
*/
963 /* fill a screen buffer with constant
data (chars and
/or attributes
) */
964 @
REQ(fill_console_output
)
965 obj_handle_t handle
; /* handle to the console output
*/
966 int x
; /* position where to start writing
*/
968 int mode
; /* char info mode
*/
969 int count
; /* number to write
*/
970 int wrap
; /* wrap around at end of line?
*/
971 char_info_t data
; /* data to write
*/
973 int written
; /* number of char infos actually written
*/
977 /* read
data (chars and
/or attributes
) from a screen buffer
*/
978 @
REQ(read_console_output
)
979 obj_handle_t handle
; /* handle to the console output
*/
980 int x
; /* position (x
,y
) where to start reading
*/
982 int mode
; /* char info mode
*/
983 int wrap
; /* wrap around at end of line?
*/
985 int width
; /* width of screen buffer
*/
986 int height
; /* height of screen buffer
*/
991 /* move a
rect (of data
) in screen buffer content
*/
992 @
REQ(move_console_output
)
993 obj_handle_t handle
; /* handle to the console output
*/
994 short int x_src
; /* position (x
, y
) of rect to start moving from
*/
996 short int x_dst
; /* position (x
, y
) of rect to move to
*/
998 short int w
; /* size of the
rect (width
, height
) to move
*/
1003 /* Sends a signal to a process group
*/
1004 @
REQ(send_console_signal
)
1005 int signal
; /* the signal to send
*/
1006 process_id_t group_id
; /* the group to send the signal to
*/
1010 /* Create a change notification
*/
1011 @
REQ(create_change_notification
)
1012 obj_handle_t handle
; /* handle to the directory
*/
1013 int subtree
; /* watch all the subtree
*/
1014 unsigned int filter
; /* notification filter
*/
1016 obj_handle_t handle
; /* handle to the change notification
*/
1020 /* Move to the next change notification
*/
1021 @
REQ(next_change_notification
)
1022 obj_handle_t handle
; /* handle to the change notification
*/
1025 /* Create a file mapping
*/
1026 @
REQ(create_mapping
)
1027 int size_high
; /* mapping size
*/
1028 int size_low
; /* mapping size
*/
1029 int protect
; /* protection
flags (see below
) */
1030 unsigned int access
; /* wanted access rights
*/
1031 int inherit
; /* inherit flag
*/
1032 obj_handle_t file_handle
; /* file handle
*/
1033 VARARG(name
,unicode_str
); /* object name
*/
1035 obj_handle_t handle
; /* handle to the mapping
*/
1037 /* protection flags
*/
1038 #define VPROT_READ
0x01
1039 #define VPROT_WRITE
0x02
1040 #define VPROT_EXEC
0x04
1041 #define VPROT_WRITECOPY
0x08
1042 #define VPROT_GUARD
0x10
1043 #define VPROT_NOCACHE
0x20
1044 #define VPROT_COMMITTED
0x40
1045 #define VPROT_IMAGE
0x80
1048 /* Open a mapping
*/
1050 unsigned int access
; /* wanted access rights
*/
1051 int inherit
; /* inherit flag
*/
1052 VARARG(name
,unicode_str
); /* object name
*/
1054 obj_handle_t handle
; /* handle to the mapping
*/
1058 /* Get information about a file mapping
*/
1059 @
REQ(get_mapping_info
)
1060 obj_handle_t handle
; /* handle to the mapping
*/
1062 int size_high
; /* mapping size
*/
1063 int size_low
; /* mapping size
*/
1064 int protect
; /* protection flags
*/
1065 int header_size
; /* header
size (for VPROT_IMAGE mapping
) */
1066 void
* base
; /* default base
addr (for VPROT_IMAGE mapping
) */
1067 obj_handle_t shared_file
; /* shared mapping file handle
*/
1068 int shared_size
; /* shared mapping size
*/
1072 #define SNAP_HEAPLIST
0x00000001
1073 #define SNAP_PROCESS
0x00000002
1074 #define SNAP_THREAD
0x00000004
1075 #define SNAP_MODULE
0x00000008
1076 /* Create a snapshot
*/
1077 @
REQ(create_snapshot
)
1078 int inherit
; /* inherit flag
*/
1079 int flags
; /* snapshot
flags (SNAP_*)
*/
1080 process_id_t pid
; /* process id
*/
1082 obj_handle_t handle
; /* handle to the snapshot
*/
1086 /* Get the next process from a snapshot
*/
1088 obj_handle_t handle
; /* handle to the snapshot
*/
1089 int reset
; /* reset snapshot position?
*/
1091 int count
; /* process usage count
*/
1092 process_id_t pid
; /* process id
*/
1093 process_id_t ppid
; /* parent process id
*/
1094 void
* heap
; /* heap base
*/
1095 void
* module
; /* main module
*/
1096 int threads
; /* number of threads
*/
1097 int priority
; /* process priority
*/
1098 int handles
; /* number of handles
*/
1099 VARARG(filename
,unicode_str
); /* file name of main exe
*/
1103 /* Get the next thread from a snapshot
*/
1105 obj_handle_t handle
; /* handle to the snapshot
*/
1106 int reset
; /* reset snapshot position?
*/
1108 int count
; /* thread usage count
*/
1109 process_id_t pid
; /* process id
*/
1110 thread_id_t tid
; /* thread id
*/
1111 int base_pri
; /* base priority
*/
1112 int delta_pri
; /* delta priority
*/
1116 /* Get the next module from a snapshot
*/
1118 obj_handle_t handle
; /* handle to the snapshot
*/
1119 int reset
; /* reset snapshot position?
*/
1121 process_id_t pid
; /* process id
*/
1122 void
* base
; /* module base address
*/
1123 size_t size
; /* module size
*/
1124 VARARG(filename
,unicode_str
); /* file name of module
*/
1128 /* Wait for a debug event
*/
1129 @
REQ(wait_debug_event
)
1130 int get_handle
; /* should we alloc a handle for waiting?
*/
1132 process_id_t pid
; /* process id
*/
1133 thread_id_t tid
; /* thread id
*/
1134 obj_handle_t wait
; /* wait handle if no event ready
*/
1135 VARARG(event
,debug_event
); /* debug event data
*/
1139 /* Queue an exception event
*/
1140 @
REQ(queue_exception_event
)
1141 int first
; /* first chance exception?
*/
1142 VARARG(record
,exc_event
); /* thread context followed by exception record
*/
1144 obj_handle_t handle
; /* handle to the queued event
*/
1148 /* Retrieve the status of an exception event
*/
1149 @
REQ(get_exception_status
)
1150 obj_handle_t handle
; /* handle to the queued event
*/
1152 int status
; /* event continuation status
*/
1153 VARARG(context
,context
); /* modified thread context
*/
1157 /* Send an output string to the debugger
*/
1158 @
REQ(output_debug_string
)
1159 void
* string
; /* string to
display (in debugged process address space
) */
1160 int unicode
; /* is it Unicode?
*/
1161 int length
; /* string length
*/
1165 /* Continue a debug event
*/
1166 @
REQ(continue_debug_event
)
1167 process_id_t pid
; /* process id to continue
*/
1168 thread_id_t tid
; /* thread id to continue
*/
1169 int status
; /* continuation status
*/
1173 /* Start
/stop debugging an existing process
*/
1175 process_id_t pid
; /* id of the process to debug
*/
1176 int attach
; /* 1=attaching
/ 0=detaching from the process
*/
1180 /* Simulate a breakpoint in a process
*/
1182 obj_handle_t handle
; /* process handle
*/
1184 int self
; /* was it the caller itself?
*/
1188 /* Set debugger kill on exit flag
*/
1189 @
REQ(set_debugger_kill_on_exit
)
1190 int kill_on_exit
; /* 0=detach
/1=kill debuggee when debugger dies
*/
1194 /* Read data from a process address space
*/
1195 @
REQ(read_process_memory
)
1196 obj_handle_t handle
; /* process handle
*/
1197 void
* addr
; /* addr to read from
*/
1199 VARARG(data
,bytes
); /* result data
*/
1203 /* Write data to a process address space
*/
1204 @
REQ(write_process_memory
)
1205 obj_handle_t handle
; /* process handle
*/
1206 void
* addr
; /* addr to write
to (must be int
-aligned
) */
1207 unsigned int first_mask
; /* mask for first word
*/
1208 unsigned int last_mask
; /* mask for last word
*/
1209 VARARG(data
,bytes
); /* data to write
*/
1213 /* Create a registry key
*/
1215 obj_handle_t parent
; /* handle to the parent key
*/
1216 unsigned int access
; /* desired access rights
*/
1217 unsigned int options
; /* creation options
*/
1218 time_t modif
; /* last modification time
*/
1219 size_t namelen
; /* length of key name in bytes
*/
1220 VARARG(name
,unicode_str
,namelen
); /* key name
*/
1221 VARARG(class
,unicode_str
); /* class name
*/
1223 obj_handle_t hkey
; /* handle to the created key
*/
1224 int created
; /* has it been newly created?
*/
1227 /* Open a registry key
*/
1229 obj_handle_t parent
; /* handle to the parent key
*/
1230 unsigned int access
; /* desired access rights
*/
1231 VARARG(name
,unicode_str
); /* key name
*/
1233 obj_handle_t hkey
; /* handle to the open key
*/
1237 /* Delete a registry key
*/
1239 obj_handle_t hkey
; /* handle to the key
*/
1243 /* Flush a registry key
*/
1245 obj_handle_t hkey
; /* handle to the key
*/
1249 /* Enumerate registry subkeys
*/
1251 obj_handle_t hkey
; /* handle to registry key
*/
1252 int index
; /* index of
subkey (or
-1 for current key
) */
1253 int info_class
; /* requested information class
*/
1255 int subkeys
; /* number of subkeys
*/
1256 int max_subkey
; /* longest subkey name
*/
1257 int max_class
; /* longest class name
*/
1258 int values
; /* number of values
*/
1259 int max_value
; /* longest value name
*/
1260 int max_data
; /* longest value data
*/
1261 time_t modif
; /* last modification time
*/
1262 size_t total
; /* total length needed for full name and class
*/
1263 size_t namelen
; /* length of key name in bytes
*/
1264 VARARG(name
,unicode_str
,namelen
); /* key name
*/
1265 VARARG(class
,unicode_str
); /* class name
*/
1269 /* Set a value of a registry key
*/
1271 obj_handle_t hkey
; /* handle to registry key
*/
1272 int type
; /* value type
*/
1273 size_t namelen
; /* length of value name in bytes
*/
1274 VARARG(name
,unicode_str
,namelen
); /* value name
*/
1275 VARARG(data
,bytes
); /* value data
*/
1279 /* Retrieve the value of a registry key
*/
1281 obj_handle_t hkey
; /* handle to registry key
*/
1282 VARARG(name
,unicode_str
); /* value name
*/
1284 int type
; /* value type
*/
1285 size_t total
; /* total length needed for data
*/
1286 VARARG(data
,bytes
); /* value data
*/
1290 /* Enumerate a value of a registry key
*/
1291 @
REQ(enum_key_value
)
1292 obj_handle_t hkey
; /* handle to registry key
*/
1293 int index
; /* value index
*/
1294 int info_class
; /* requested information class
*/
1296 int type
; /* value type
*/
1297 size_t total
; /* total length needed for full name and data
*/
1298 size_t namelen
; /* length of value name in bytes
*/
1299 VARARG(name
,unicode_str
,namelen
); /* value name
*/
1300 VARARG(data
,bytes
); /* value data
*/
1304 /* Delete a value of a registry key
*/
1305 @
REQ(delete_key_value
)
1306 obj_handle_t hkey
; /* handle to registry key
*/
1307 VARARG(name
,unicode_str
); /* value name
*/
1311 /* Load a registry branch from a file
*/
1313 obj_handle_t hkey
; /* root key to load to
*/
1314 obj_handle_t file
; /* file to load from
*/
1315 VARARG(name
,unicode_str
); /* subkey name
*/
1319 /* UnLoad a registry branch from a file
*/
1320 @
REQ(unload_registry
)
1321 obj_handle_t hkey
; /* root key to unload to
*/
1325 /* Save a registry branch to a file
*/
1327 obj_handle_t hkey
; /* key to save
*/
1328 obj_handle_t file
; /* file to save to
*/
1332 /* Add a registry key change notification
*/
1333 @
REQ(set_registry_notification
)
1334 obj_handle_t hkey
; /* key to watch for changes
*/
1335 obj_handle_t event
; /* event to set
*/
1336 int subtree
; /* should we watch the whole subtree?
*/
1337 unsigned int filter
; /* things to watch
*/
1341 /* Create a waitable timer
*/
1343 unsigned int access
; /* wanted access rights
*/
1344 int inherit
; /* inherit flag
*/
1345 int manual
; /* manual reset
*/
1346 VARARG(name
,unicode_str
); /* object name
*/
1348 obj_handle_t handle
; /* handle to the timer
*/
1352 /* Open a waitable timer
*/
1354 unsigned int access
; /* wanted access rights
*/
1355 int inherit
; /* inherit flag
*/
1356 VARARG(name
,unicode_str
); /* object name
*/
1358 obj_handle_t handle
; /* handle to the timer
*/
1361 /* Set a waitable timer
*/
1363 obj_handle_t handle
; /* handle to the timer
*/
1364 abs_time_t expire
; /* next expiration absolute time
*/
1365 int period
; /* timer period in ms
*/
1366 void
* callback
; /* callback function
*/
1367 void
* arg
; /* callback argument
*/
1369 int signaled
; /* was the timer signaled before this call ?
*/
1372 /* Cancel a waitable timer
*/
1374 obj_handle_t handle
; /* handle to the timer
*/
1376 int signaled
; /* was the timer signaled before this calltime ?
*/
1379 /* Get information on a waitable timer
*/
1380 @
REQ(get_timer_info
)
1381 obj_handle_t handle
; /* handle to the timer
*/
1383 abs_time_t when
; /* absolute time when the timer next expires
*/
1384 int signaled
; /* is the timer signaled?
*/
1388 /* Retrieve the current context of a thread
*/
1389 @
REQ(get_thread_context
)
1390 obj_handle_t handle
; /* thread handle
*/
1391 unsigned int flags
; /* context flags
*/
1393 VARARG(context
,context
); /* thread context
*/
1397 /* Set the current context of a thread
*/
1398 @
REQ(set_thread_context
)
1399 obj_handle_t handle
; /* thread handle
*/
1400 unsigned int flags
; /* context flags
*/
1401 VARARG(context
,context
); /* thread context
*/
1405 /* Fetch a selector entry for a thread
*/
1406 @
REQ(get_selector_entry
)
1407 obj_handle_t handle
; /* thread handle
*/
1408 int entry
; /* LDT entry
*/
1410 unsigned int base
; /* selector base
*/
1411 unsigned int limit
; /* selector limit
*/
1412 unsigned char flags
; /* selector flags
*/
1418 obj_handle_t table
; /* which table to add atom to
*/
1419 VARARG(name
,unicode_str
); /* atom name
*/
1421 atom_t atom
; /* resulting atom
*/
1425 /* Delete an atom
*/
1427 obj_handle_t table
; /* which table to delete atom from
*/
1428 atom_t atom
; /* atom handle
*/
1434 obj_handle_t table
; /* which table to find atom from
*/
1435 VARARG(name
,unicode_str
); /* atom name
*/
1437 atom_t atom
; /* atom handle
*/
1441 /* Get information about an atom
*/
1442 @
REQ(get_atom_information
)
1443 obj_handle_t table
; /* which table to find atom from
*/
1444 atom_t atom
; /* atom handle
*/
1446 int count
; /* atom lock count
*/
1447 int pinned
; /* whether the atom has been pinned
*/
1448 VARARG(name
,unicode_str
); /* atom name
*/
1452 /* Set information about an atom
*/
1453 @
REQ(set_atom_information
)
1454 obj_handle_t table
; /* which table to find atom from
*/
1455 atom_t atom
; /* atom handle
*/
1456 int pinned
; /* whether to bump atom information
*/
1460 /* Empty an atom table
*/
1461 @
REQ(empty_atom_table
)
1462 obj_handle_t table
; /* which table to find atom from
*/
1463 int if_pinned
; /* whether to delete pinned atoms
*/
1467 /* Init an atom table
*/
1468 @
REQ(init_atom_table
)
1469 int entries
; /* number of
entries (only for local
) */
1471 obj_handle_t table
; /* handle to the atom table
*/
1475 /* Get the message queue of the current thread
*/
1478 obj_handle_t handle
; /* handle to the queue
*/
1482 /* Set the current message queue wakeup mask
*/
1483 @
REQ(set_queue_mask
)
1484 unsigned int wake_mask
; /* wakeup bits mask
*/
1485 unsigned int changed_mask
; /* changed bits mask
*/
1486 int skip_wait
; /* will we skip waiting if signaled?
*/
1488 unsigned int wake_bits
; /* current wake bits
*/
1489 unsigned int changed_bits
; /* current changed bits
*/
1493 /* Get the current message queue status
*/
1494 @
REQ(get_queue_status
)
1495 int clear
; /* should we clear the change bits?
*/
1497 unsigned int wake_bits
; /* wake bits
*/
1498 unsigned int changed_bits
; /* changed bits since last time
*/
1502 /* Wait for a process to start waiting on input
*/
1503 @
REQ(wait_input_idle
)
1504 obj_handle_t handle
; /* process handle
*/
1505 int timeout
; /* timeout
*/
1507 obj_handle_t event
; /* handle to idle event
*/
1511 /* Send a message to a thread queue
*/
1513 thread_id_t id
; /* thread id
*/
1514 int type
; /* message
type (see below
) */
1515 int flags
; /* message
flags (see below
) */
1516 user_handle_t win
; /* window handle
*/
1517 unsigned int msg
; /* message code
*/
1518 unsigned int wparam
; /* parameters
*/
1519 unsigned int lparam
; /* parameters
*/
1520 int x
; /* x position
*/
1521 int y
; /* y position
*/
1522 unsigned int time
; /* message time
*/
1523 unsigned int info
; /* extra info
*/
1524 int timeout
; /* timeout for reply
*/
1525 void
* callback
; /* callback address
*/
1526 VARARG(data
,bytes
); /* message data for sent messages
*/
1531 MSG_ASCII
, /* Ascii
message (from SendMessageA
) */
1532 MSG_UNICODE
, /* Unicode
message (from SendMessageW
) */
1533 MSG_NOTIFY
, /* notify
message (from SendNotifyMessageW
), always Unicode
*/
1534 MSG_CALLBACK
, /* callback
message (from SendMessageCallbackW
), always Unicode
*/
1535 MSG_CALLBACK_RESULT
,/* result of a callback message
*/
1536 MSG_OTHER_PROCESS
, /* sent from other process
, may include vararg data
, always Unicode
*/
1537 MSG_POSTED
, /* posted
message (from PostMessageW
), always Unicode
*/
1538 MSG_HARDWARE
, /* hardware message
*/
1539 MSG_WINEVENT
/* winevent message
*/
1541 #define SEND_MSG_ABORT_IF_HUNG
0x01
1544 /* Get a message from the current queue
*/
1546 int flags
; /* see below
*/
1547 user_handle_t get_win
; /* window handle to get
*/
1548 unsigned int get_first
; /* first message code to get
*/
1549 unsigned int get_last
; /* last message code to get
*/
1550 unsigned int hw_id
; /* id of the previous hardware
message (or
0) */
1552 int type
; /* message type
*/
1553 user_handle_t win
; /* window handle
*/
1554 unsigned int msg
; /* message code
*/
1555 unsigned int wparam
; /* parameters (callback function for MSG_CALLBACK_RESULT
) */
1556 unsigned int lparam
; /* parameters (result for MSG_CALLBACK_RESULT
) */
1557 int x
; /* x position
*/
1558 int y
; /* y position
*/
1559 user_handle_t hook
; /* winevent hook handle
*/
1560 void
* hook_proc
; /* winevent hook proc address
*/
1561 unsigned int time
; /* message time
*/
1562 unsigned int info
; /* extra
info (callback argument for MSG_CALLBACK_RESULT
) */
1563 unsigned int hw_id
; /* id if hardware message
*/
1564 unsigned int active_hooks
; /* active hooks bitmap
*/
1565 size_t total
; /* total size of extra data
*/
1566 VARARG(data
,bytes
); /* message data for sent messages
*/
1568 #define GET_MSG_REMOVE
1 /* remove the message
*/
1569 #define GET_MSG_SENT_ONLY
2 /* only get sent messages
*/
1571 /* Reply to a sent message
*/
1573 unsigned int result
; /* message result
*/
1574 int remove
; /* should we remove the message?
*/
1575 VARARG(data
,bytes
); /* message data for sent messages
*/
1579 /* Accept the current hardware message
*/
1580 @
REQ(accept_hardware_message
)
1581 unsigned int hw_id
; /* id of the hardware message
*/
1582 int remove
; /* should we remove the message?
*/
1583 user_handle_t new_win
; /* new destination window for current message
*/
1587 /* Retrieve the reply for the last message sent
*/
1588 @
REQ(get_message_reply
)
1589 int cancel
; /* cancel message if not ready?
*/
1591 unsigned int result
; /* message result
*/
1592 VARARG(data
,bytes
); /* message data for sent messages
*/
1596 /* Set a window timer
*/
1598 user_handle_t win
; /* window handle
*/
1599 unsigned int msg
; /* message to post
*/
1600 unsigned int id
; /* timer id
*/
1601 unsigned int rate
; /* timer rate in ms
*/
1602 unsigned int lparam
; /* message
lparam (callback proc
) */
1604 unsigned int id
; /* timer id
*/
1608 /* Kill a window timer
*/
1609 @
REQ(kill_win_timer
)
1610 user_handle_t win
; /* window handle
*/
1611 unsigned int msg
; /* message to post
*/
1612 unsigned int id
; /* timer id
*/
1616 /* Retrieve info about a serial port
*/
1617 @
REQ(get_serial_info
)
1618 obj_handle_t handle
; /* handle to comm port
*/
1620 unsigned int readinterval
;
1621 unsigned int readconst
;
1622 unsigned int readmult
;
1623 unsigned int writeconst
;
1624 unsigned int writemult
;
1625 unsigned int eventmask
;
1626 unsigned int commerror
;
1630 /* Set info about a serial port
*/
1631 @
REQ(set_serial_info
)
1632 obj_handle_t handle
; /* handle to comm port
*/
1633 int flags
; /* bitmask to set
values (see below
) */
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
;
1642 #define SERIALINFO_SET_TIMEOUTS
0x01
1643 #define SERIALINFO_SET_MASK
0x02
1644 #define SERIALINFO_SET_ERROR
0x04
1647 /* Create an async I
/O
*/
1648 @
REQ(register_async
)
1649 obj_handle_t handle
; /* handle to comm port
, socket or file
*/
1650 int type
; /* type of queue to look after
*/
1651 void
* io_apc
; /* APC routine to queue upon end of async
*/
1652 void
* io_sb
; /* I
/O status
block (unique across all async on this handle
) */
1653 void
* io_user
; /* data to pass back to caller
*/
1654 int count
; /* count
- usually # of bytes to be read
/written
*/
1656 #define ASYNC_TYPE_READ
0x01
1657 #define ASYNC_TYPE_WRITE
0x02
1658 #define ASYNC_TYPE_WAIT
0x03
1661 /* Cancel all async op on a fd
*/
1663 obj_handle_t handle
; /* handle to comm port
, socket or file
*/
1667 /* Create a named pipe
*/
1668 @
REQ(create_named_pipe
)
1669 unsigned int options
;
1671 unsigned int maxinstances
;
1672 unsigned int outsize
;
1673 unsigned int insize
;
1674 unsigned int timeout
;
1675 int inherit
; /* inherit flag
*/
1676 VARARG(name
,unicode_str
); /* pipe name
*/
1678 obj_handle_t handle
; /* handle to the pipe
*/
1681 /* flags in create_named_pipe and get_named_pipe_info
*/
1682 #define NAMED_PIPE_MESSAGE_STREAM_WRITE
0x0001
1683 #define NAMED_PIPE_MESSAGE_STREAM_READ
0x0002
1684 #define NAMED_PIPE_NONBLOCKING_MODE
0x0004
1687 /* Open an existing named pipe
*/
1688 @
REQ(open_named_pipe
)
1689 unsigned int access
;
1690 unsigned int flags
; /* file flags
*/
1691 int inherit
; /* inherit flag
*/
1692 VARARG(name
,unicode_str
); /* pipe name
*/
1694 obj_handle_t handle
; /* handle to the pipe
*/
1698 /* Connect to a named pipe
*/
1699 @
REQ(connect_named_pipe
)
1700 obj_handle_t handle
;
1706 /* Wait for a named pipe
*/
1707 @
REQ(wait_named_pipe
)
1708 unsigned int timeout
;
1711 VARARG(name
,unicode_str
); /* pipe name
*/
1715 /* Disconnect a named pipe
*/
1716 @
REQ(disconnect_named_pipe
)
1717 obj_handle_t handle
;
1719 int fd
; /* associated fd to close
*/
1723 @
REQ(get_named_pipe_info
)
1724 obj_handle_t handle
;
1727 unsigned int maxinstances
;
1728 unsigned int outsize
;
1729 unsigned int insize
;
1733 /* Create a window
*/
1735 user_handle_t parent
; /* parent window
*/
1736 user_handle_t owner
; /* owner window
*/
1737 atom_t atom
; /* class atom
*/
1738 void
* instance
; /* module instance
*/
1740 user_handle_t handle
; /* created window
*/
1741 int extra
; /* number of extra bytes
*/
1742 void
* class_ptr
; /* pointer to class in client address space
*/
1746 /* Destroy a window
*/
1747 @
REQ(destroy_window
)
1748 user_handle_t handle
; /* handle to the window
*/
1752 /* Retrieve the desktop window for the current thread
*/
1753 @
REQ(get_desktop_window
)
1755 user_handle_t handle
; /* handle to the desktop window
*/
1759 /* Set a window owner
*/
1760 @
REQ(set_window_owner
)
1761 user_handle_t handle
; /* handle to the window
*/
1762 user_handle_t owner
; /* new owner
*/
1764 user_handle_t full_owner
; /* full handle of new owner
*/
1765 user_handle_t prev_owner
; /* full handle of previous owner
*/
1769 /* Get information from a window handle
*/
1770 @
REQ(get_window_info
)
1771 user_handle_t handle
; /* handle to the window
*/
1773 user_handle_t full_handle
; /* full
32-bit handle
*/
1774 user_handle_t last_active
; /* last active popup
*/
1775 process_id_t pid
; /* process owning the window
*/
1776 thread_id_t tid
; /* thread owning the window
*/
1777 atom_t atom
; /* class atom
*/
1778 int is_unicode
; /* ANSI or unicode
*/
1782 /* Set some information in a window
*/
1783 @
REQ(set_window_info
)
1784 user_handle_t handle
; /* handle to the window
*/
1785 unsigned int flags
; /* flags for fields to
set (see below
) */
1786 unsigned int style
; /* window style
*/
1787 unsigned int ex_style
; /* window extended style
*/
1788 unsigned int id
; /* window id
*/
1789 void
* instance
; /* creator instance
*/
1790 int is_unicode
; /* ANSI or unicode
*/
1791 void
* user_data
; /* user
-specific data
*/
1792 int extra_offset
; /* offset to set in extra bytes
*/
1793 size_t extra_size
; /* size to set in extra bytes
*/
1794 unsigned int extra_value
; /* value to set in extra bytes
*/
1796 unsigned int old_style
; /* old window style
*/
1797 unsigned int old_ex_style
; /* old window extended style
*/
1798 unsigned int old_id
; /* old window id
*/
1799 void
* old_instance
; /* old creator instance
*/
1800 void
* old_user_data
; /* old user
-specific data
*/
1801 unsigned int old_extra_value
; /* old value in extra bytes
*/
1803 #define SET_WIN_STYLE
0x01
1804 #define SET_WIN_EXSTYLE
0x02
1805 #define SET_WIN_ID
0x04
1806 #define SET_WIN_INSTANCE
0x08
1807 #define SET_WIN_USERDATA
0x10
1808 #define SET_WIN_EXTRA
0x20
1809 #define SET_WIN_UNICODE
0x40
1812 /* Set the parent of a window
*/
1814 user_handle_t handle
; /* handle to the window
*/
1815 user_handle_t parent
; /* handle to the parent
*/
1817 user_handle_t old_parent
; /* old parent window
*/
1818 user_handle_t full_parent
; /* full handle of new parent
*/
1822 /* Get a list of the window parents
, up to the root of the tree
*/
1823 @
REQ(get_window_parents
)
1824 user_handle_t handle
; /* handle to the window
*/
1826 int count
; /* total count of parents
*/
1827 VARARG(parents
,user_handles
); /* parent handles
*/
1831 /* Get a list of the window children
*/
1832 @
REQ(get_window_children
)
1833 user_handle_t parent
; /* parent window
*/
1834 atom_t atom
; /* class atom for the listed children
*/
1835 thread_id_t tid
; /* thread owning the listed children
*/
1837 int count
; /* total count of children
*/
1838 VARARG(children
,user_handles
); /* children handles
*/
1842 /* Get a list of the window children that contain a given point
*/
1843 @
REQ(get_window_children_from_point
)
1844 user_handle_t parent
; /* parent window
*/
1845 int x
; /* point in parent coordinates
*/
1848 int count
; /* total count of children
*/
1849 VARARG(children
,user_handles
); /* children handles
*/
1853 /* Get window tree information from a window handle
*/
1854 @
REQ(get_window_tree
)
1855 user_handle_t handle
; /* handle to the window
*/
1857 user_handle_t parent
; /* parent window
*/
1858 user_handle_t owner
; /* owner window
*/
1859 user_handle_t next_sibling
; /* next sibling in Z
-order
*/
1860 user_handle_t prev_sibling
; /* prev sibling in Z
-order
*/
1861 user_handle_t first_sibling
; /* first sibling in Z
-order
*/
1862 user_handle_t last_sibling
; /* last sibling in Z
-order
*/
1863 user_handle_t first_child
; /* first child
*/
1864 user_handle_t last_child
; /* last child
*/
1867 /* Set the position and Z order of a window
*/
1868 @
REQ(set_window_pos
)
1869 user_handle_t handle
; /* handle to the window
*/
1870 user_handle_t previous
; /* previous window in Z order
*/
1871 unsigned int flags
; /* SWP_
* flags
*/
1872 rectangle_t window
; /* window rectangle
*/
1873 rectangle_t client
; /* client rectangle
*/
1874 VARARG(valid
,rectangles
); /* valid rectangles from WM_NCCALCSIZE
*/
1876 unsigned int new_style
; /* new window style
*/
1880 /* Get the window and client rectangles of a window
*/
1881 @
REQ(get_window_rectangles
)
1882 user_handle_t handle
; /* handle to the window
*/
1884 rectangle_t window
; /* window rectangle
*/
1885 rectangle_t visible
; /* visible part of the window rectangle
*/
1886 rectangle_t client
; /* client rectangle
*/
1890 /* Get the window text
*/
1891 @
REQ(get_window_text
)
1892 user_handle_t handle
; /* handle to the window
*/
1894 VARARG(text
,unicode_str
); /* window text
*/
1898 /* Set the window text
*/
1899 @
REQ(set_window_text
)
1900 user_handle_t handle
; /* handle to the window
*/
1901 VARARG(text
,unicode_str
); /* window text
*/
1905 /* Get the coordinates offset between two windows
*/
1906 @
REQ(get_windows_offset
)
1907 user_handle_t from
; /* handle to the first window
*/
1908 user_handle_t to
; /* handle to the second window
*/
1910 int x
; /* x coordinate offset
*/
1911 int y
; /* y coordinate offset
*/
1915 /* Get the visible region of a window
*/
1916 @
REQ(get_visible_region
)
1917 user_handle_t window
; /* handle to the window
*/
1918 unsigned int flags
; /* DCX flags
*/
1920 user_handle_t top_win
; /* top window to clip against
*/
1921 int top_org_x
; /* top window visible rect origin in screen coords
*/
1923 int win_org_x
; /* window rect origin in screen coords
*/
1925 size_t total_size
; /* total size of the resulting region
*/
1926 VARARG(region
,rectangles
); /* list of rectangles for the
region (in screen coords
) */
1930 /* Get the window region
*/
1931 @
REQ(get_window_region
)
1932 user_handle_t window
; /* handle to the window
*/
1934 size_t total_size
; /* total size of the resulting region
*/
1935 VARARG(region
,rectangles
); /* list of rectangles for the region
*/
1939 /* Set the window region
*/
1940 @
REQ(set_window_region
)
1941 user_handle_t window
; /* handle to the window
*/
1942 VARARG(region
,rectangles
); /* list of rectangles for the region
*/
1946 /* Get the window update region
*/
1947 @
REQ(get_update_region
)
1948 user_handle_t window
; /* handle to the window
*/
1949 user_handle_t from_child
; /* child to start searching from
*/
1950 unsigned int flags
; /* update
flags (see below
) */
1952 user_handle_t child
; /* child to
repaint (or window itself
) */
1953 unsigned int flags
; /* resulting update
flags (see below
) */
1954 size_t total_size
; /* total size of the resulting region
*/
1955 VARARG(region
,rectangles
); /* list of rectangles for the region
*/
1957 #define UPDATE_NONCLIENT
0x01 /* get region for repainting non
-client area
*/
1958 #define UPDATE_ERASE
0x02 /* get region for erasing client area
*/
1959 #define UPDATE_PAINT
0x04 /* get region for painting client area
*/
1960 #define UPDATE_INTERNALPAINT
0x08 /* get region if internal paint is pending
*/
1961 #define UPDATE_ALLCHILDREN
0x10 /* force repaint of all children
*/
1962 #define UPDATE_NOCHILDREN
0x20 /* don
't try to repaint any children */
1963 #define UPDATE_NOREGION 0x40 /* don't return a region
, only the flags
*/
1966 /* Update the z order of a window so that a given rectangle is fully visible
*/
1967 @
REQ(update_window_zorder
)
1968 user_handle_t window
; /* handle to the window
*/
1969 rectangle_t rect
; /* rectangle that must be visible
*/
1973 /* Mark parts of a window as needing a redraw
*/
1975 user_handle_t window
; /* handle to the window
*/
1976 unsigned int flags
; /* RDW_
* flags
*/
1977 VARARG(region
,rectangles
); /* list of rectangles for the region
*/
1981 /* Set a window property
*/
1982 @
REQ(set_window_property
)
1983 user_handle_t window
; /* handle to the window
*/
1984 atom_t atom
; /* property
atom (if no name specified
) */
1985 obj_handle_t handle
; /* handle to store
*/
1986 VARARG(name
,unicode_str
); /* property name
*/
1990 /* Remove a window property
*/
1991 @
REQ(remove_window_property
)
1992 user_handle_t window
; /* handle to the window
*/
1993 atom_t atom
; /* property
atom (if no name specified
) */
1994 VARARG(name
,unicode_str
); /* property name
*/
1996 obj_handle_t handle
; /* handle stored in property
*/
2000 /* Get a window property
*/
2001 @
REQ(get_window_property
)
2002 user_handle_t window
; /* handle to the window
*/
2003 atom_t atom
; /* property
atom (if no name specified
) */
2004 VARARG(name
,unicode_str
); /* property name
*/
2006 obj_handle_t handle
; /* handle stored in property
*/
2010 /* Get the list of properties of a window
*/
2011 @
REQ(get_window_properties
)
2012 user_handle_t window
; /* handle to the window
*/
2014 int total
; /* total number of properties
*/
2015 VARARG(props
,properties
); /* list of properties
*/
2019 /* Create a window station
*/
2020 @
REQ(create_winstation
)
2021 unsigned int flags
; /* window station flags
*/
2022 unsigned int access
; /* wanted access rights
*/
2023 int inherit
; /* inherit flag
*/
2024 VARARG(name
,unicode_str
); /* object name
*/
2026 obj_handle_t handle
; /* handle to the window station
*/
2030 /* Open a handle to a window station
*/
2031 @
REQ(open_winstation
)
2032 unsigned int access
; /* wanted access rights
*/
2033 int inherit
; /* inherit flag
*/
2034 VARARG(name
,unicode_str
); /* object name
*/
2036 obj_handle_t handle
; /* handle to the window station
*/
2040 /* Close a window station
*/
2041 @
REQ(close_winstation
)
2042 obj_handle_t handle
; /* handle to the window station
*/
2046 /* Get the process current window station
*/
2047 @
REQ(get_process_winstation
)
2049 obj_handle_t handle
; /* handle to the window station
*/
2053 /* Set the process current window station
*/
2054 @
REQ(set_process_winstation
)
2055 obj_handle_t handle
; /* handle to the window station
*/
2059 /* Create a desktop
*/
2060 @
REQ(create_desktop
)
2061 unsigned int flags
; /* desktop flags
*/
2062 unsigned int access
; /* wanted access rights
*/
2063 int inherit
; /* inherit flag
*/
2064 VARARG(name
,unicode_str
); /* object name
*/
2066 obj_handle_t handle
; /* handle to the desktop
*/
2070 /* Open a handle to a desktop
*/
2072 unsigned int flags
; /* desktop flags
*/
2073 unsigned int access
; /* wanted access rights
*/
2074 int inherit
; /* inherit flag
*/
2075 VARARG(name
,unicode_str
); /* object name
*/
2077 obj_handle_t handle
; /* handle to the desktop
*/
2081 /* Close a desktop
*/
2083 obj_handle_t handle
; /* handle to the desktop
*/
2087 /* Get the thread current desktop
*/
2088 @
REQ(get_thread_desktop
)
2089 thread_id_t tid
; /* thread id
*/
2091 obj_handle_t handle
; /* handle to the desktop
*/
2095 /* Set the thread current desktop
*/
2096 @
REQ(set_thread_desktop
)
2097 obj_handle_t handle
; /* handle to the desktop
*/
2101 /* Get
/set information about a user
object (window station or desktop
) */
2102 @
REQ(set_user_object_info
)
2103 obj_handle_t handle
; /* handle to the object
*/
2104 unsigned int flags
; /* information to set
*/
2105 unsigned int obj_flags
; /* new object flags
*/
2107 int is_desktop
; /* is object a desktop?
*/
2108 unsigned int old_obj_flags
; /* old object flags
*/
2109 VARARG(name
,unicode_str
); /* object name
*/
2111 #define SET_USER_OBJECT_FLAGS
1
2114 /* Attach (or detach
) thread inputs
*/
2115 @
REQ(attach_thread_input
)
2116 thread_id_t tid_from
; /* thread to be attached
*/
2117 thread_id_t tid_to
; /* thread to which tid_from should be attached
*/
2118 int attach
; /* is it an attach?
*/
2122 /* Get input data for a given thread
*/
2123 @
REQ(get_thread_input
)
2124 thread_id_t tid
; /* id of thread
*/
2126 user_handle_t focus
; /* handle to the focus window
*/
2127 user_handle_t capture
; /* handle to the capture window
*/
2128 user_handle_t active
; /* handle to the active window
*/
2129 user_handle_t foreground
; /* handle to the global foreground window
*/
2130 user_handle_t menu_owner
; /* handle to the menu owner
*/
2131 user_handle_t move_size
; /* handle to the moving
/resizing window
*/
2132 user_handle_t caret
; /* handle to the caret window
*/
2133 rectangle_t rect
; /* caret rectangle
*/
2137 /* Get the time of the last input event
*/
2138 @
REQ(get_last_input_time
)
2144 /* Retrieve queue keyboard state for a given thread
*/
2146 thread_id_t tid
; /* id of thread
*/
2147 int key
; /* optional key code or
-1 */
2149 unsigned char state
; /* state of specified key
*/
2150 VARARG(keystate
,bytes
); /* state array for all the keys
*/
2153 /* Set queue keyboard state for a given thread
*/
2155 thread_id_t tid
; /* id of thread
*/
2156 VARARG(keystate
,bytes
); /* state array for all the keys
*/
2159 /* Set the system foreground window
*/
2160 @
REQ(set_foreground_window
)
2161 user_handle_t handle
; /* handle to the foreground window
*/
2163 user_handle_t previous
; /* handle to the previous foreground window
*/
2164 int send_msg_old
; /* whether we have to send a msg to the old window
*/
2165 int send_msg_new
; /* whether we have to send a msg to the new window
*/
2168 /* Set the current thread focus window
*/
2169 @
REQ(set_focus_window
)
2170 user_handle_t handle
; /* handle to the focus window
*/
2172 user_handle_t previous
; /* handle to the previous focus window
*/
2175 /* Set the current thread active window
*/
2176 @
REQ(set_active_window
)
2177 user_handle_t handle
; /* handle to the active window
*/
2179 user_handle_t previous
; /* handle to the previous active window
*/
2182 /* Set the current thread capture window
*/
2183 @
REQ(set_capture_window
)
2184 user_handle_t handle
; /* handle to the capture window
*/
2185 unsigned int flags
; /* capture
flags (see below
) */
2187 user_handle_t previous
; /* handle to the previous capture window
*/
2188 user_handle_t full_handle
; /* full
32-bit handle of new capture window
*/
2190 #define CAPTURE_MENU
0x01 /* capture is for a menu
*/
2191 #define CAPTURE_MOVESIZE
0x02 /* capture is for moving
/resizing
*/
2194 /* Set the current thread caret window
*/
2195 @
REQ(set_caret_window
)
2196 user_handle_t handle
; /* handle to the caret window
*/
2197 int width
; /* caret width
*/
2198 int height
; /* caret height
*/
2200 user_handle_t previous
; /* handle to the previous caret window
*/
2201 rectangle_t old_rect
; /* previous caret rectangle
*/
2202 int old_hide
; /* previous hide count
*/
2203 int old_state
; /* previous caret
state (1=on
, 0=off
) */
2207 /* Set the current thread caret information
*/
2208 @
REQ(set_caret_info
)
2209 unsigned int flags
; /* caret
flags (see below
) */
2210 user_handle_t handle
; /* handle to the caret window
*/
2211 int x
; /* caret x position
*/
2212 int y
; /* caret y position
*/
2213 int hide
; /* increment for hide
count (can be negative to show it
) */
2214 int state
; /* caret
state (1=on
, 0=off
, -1=toggle current state
) */
2216 user_handle_t full_handle
; /* handle to the current caret window
*/
2217 rectangle_t old_rect
; /* previous caret rectangle
*/
2218 int old_hide
; /* previous hide count
*/
2219 int old_state
; /* previous caret
state (1=on
, 0=off
) */
2221 #define SET_CARET_POS
0x01 /* set the caret position from x
,y
*/
2222 #define SET_CARET_HIDE
0x02 /* increment the caret hide count
*/
2223 #define SET_CARET_STATE
0x04 /* set the caret on
/off state
*/
2226 /* Set a window hook
*/
2228 int id
; /* id of the hook
*/
2229 process_id_t pid
; /* id of process to set the hook into
*/
2230 thread_id_t tid
; /* id of thread to set the hook into
*/
2234 void
* proc
; /* hook procedure
*/
2235 int unicode
; /* is it a unicode hook?
*/
2236 VARARG(module
,unicode_str
); /* module name
*/
2238 user_handle_t handle
; /* handle to the hook
*/
2239 unsigned int active_hooks
; /* active hooks bitmap
*/
2243 /* Remove a window hook
*/
2245 user_handle_t handle
; /* handle to the hook
*/
2246 int id
; /* id of the hook if handle is
0 */
2247 void
* proc
; /* hook procedure if handle is
0 */
2249 unsigned int active_hooks
; /* active hooks bitmap
*/
2253 /* Start calling a hook chain
*/
2254 @
REQ(start_hook_chain
)
2255 int id
; /* id of the hook
*/
2256 int event
; /* signalled event
*/
2257 user_handle_t window
; /* handle to the event window
*/
2258 int object_id
; /* object id for out of context winevent
*/
2259 int child_id
; /* child id for out of context winevent
*/
2261 user_handle_t handle
; /* handle to the next hook
*/
2262 process_id_t pid
; /* process id for low
-level keyboard
/mouse hooks
*/
2263 thread_id_t tid
; /* thread id for low
-level keyboard
/mouse hooks
*/
2264 void
* proc
; /* hook procedure
*/
2265 int unicode
; /* is it a unicode hook?
*/
2266 unsigned int active_hooks
; /* active hooks bitmap
*/
2267 VARARG(module
,unicode_str
); /* module name
*/
2271 /* Finished calling a hook chain
*/
2272 @
REQ(finish_hook_chain
)
2273 int id
; /* id of the hook
*/
2277 /* Get the next hook to call
*/
2279 user_handle_t handle
; /* handle to the current hook
*/
2280 int event
; /* signalled event
*/
2281 user_handle_t window
; /* handle to the event window
*/
2282 int object_id
; /* object id for out of context winevent
*/
2283 int child_id
; /* child id for out of context winevent
*/
2285 user_handle_t next
; /* handle to the next hook
*/
2286 int id
; /* id of the next hook
*/
2287 process_id_t pid
; /* process id for low
-level keyboard
/mouse hooks
*/
2288 thread_id_t tid
; /* thread id for low
-level keyboard
/mouse hooks
*/
2289 void
* proc
; /* next hook procedure
*/
2290 int prev_unicode
; /* was the previous a unicode hook?
*/
2291 int next_unicode
; /* is the next a unicode hook?
*/
2292 VARARG(module
,unicode_str
); /* module name
*/
2296 /* Create a window class
*/
2298 int local
; /* is it a local class?
*/
2299 atom_t atom
; /* class atom
*/
2300 unsigned int style
; /* class style
*/
2301 void
* instance
; /* module instance
*/
2302 int extra
; /* number of extra class bytes
*/
2303 int win_extra
; /* number of window extra bytes
*/
2304 void
* client_ptr
; /* pointer to class in client address space
*/
2308 /* Destroy a window class
*/
2310 atom_t atom
; /* class atom
*/
2311 void
* instance
; /* module instance
*/
2313 void
* client_ptr
; /* pointer to class in client address space
*/
2317 /* Set some information in a class
*/
2318 @
REQ(set_class_info
)
2319 user_handle_t window
; /* handle to the window
*/
2320 unsigned int flags
; /* flags for info to
set (see below
) */
2321 atom_t atom
; /* class atom
*/
2322 unsigned int style
; /* class style
*/
2323 int win_extra
; /* number of window extra bytes
*/
2324 void
* instance
; /* module instance
*/
2325 int extra_offset
; /* offset to set in extra bytes
*/
2326 size_t extra_size
; /* size to set in extra bytes
*/
2327 unsigned int extra_value
; /* value to set in extra bytes
*/
2329 atom_t old_atom
; /* previous class atom
*/
2330 unsigned int old_style
; /* previous class style
*/
2331 int old_extra
; /* previous number of class extra bytes
*/
2332 int old_win_extra
; /* previous number of window extra bytes
*/
2333 void
* old_instance
; /* previous module instance
*/
2334 unsigned int old_extra_value
; /* old value in extra bytes
*/
2336 #define SET_CLASS_ATOM
0x0001
2337 #define SET_CLASS_STYLE
0x0002
2338 #define SET_CLASS_WINEXTRA
0x0004
2339 #define SET_CLASS_INSTANCE
0x0008
2340 #define SET_CLASS_EXTRA
0x0010
2343 /* Set
/get clipboard information
*/
2344 @
REQ(set_clipboard_info
)
2345 unsigned int flags
; /* flags for fields to
set (see below
) */
2346 user_handle_t clipboard
; /* clipboard window
*/
2347 user_handle_t owner
; /* clipboard owner
*/
2348 user_handle_t viewer
; /* first clipboard viewer
*/
2349 unsigned int seqno
; /* change sequence number
*/
2351 unsigned int flags
; /* status
flags (see below
) */
2352 user_handle_t old_clipboard
; /* old clipboard window
*/
2353 user_handle_t old_owner
; /* old clipboard owner
*/
2354 user_handle_t old_viewer
; /* old clipboard viewer
*/
2355 unsigned int seqno
; /* current sequence number
*/
2358 #define SET_CB_OPEN
0x001
2359 #define SET_CB_OWNER
0x002
2360 #define SET_CB_VIEWER
0x004
2361 #define SET_CB_SEQNO
0x008
2362 #define SET_CB_RELOWNER
0x010
2363 #define SET_CB_CLOSE
0x020
2364 #define CB_OPEN
0x040
2365 #define CB_OWNER
0x080
2366 #define CB_PROCESS
0x100
2369 /* Open a security token
*/
2371 obj_handle_t handle
; /* handle to the thread or process
*/
2372 unsigned int flags
; /* flags (see below
) */
2374 obj_handle_t token
; /* handle to the token
*/
2376 #define OPEN_TOKEN_THREAD
1
2377 #define OPEN_TOKEN_AS_SELF
2
2380 /* Set
/get the global windows
*/
2381 @
REQ(set_global_windows
)
2382 unsigned int flags
; /* flags for fields to
set (see below
) */
2383 user_handle_t shell_window
; /* handle to the new shell window
*/
2384 user_handle_t shell_listview
; /* handle to the new shell listview window
*/
2385 user_handle_t progman_window
; /* handle to the new program manager window
*/
2386 user_handle_t taskman_window
; /* handle to the new task manager window
*/
2388 user_handle_t old_shell_window
; /* handle to the shell window
*/
2389 user_handle_t old_shell_listview
; /* handle to the shell listview window
*/
2390 user_handle_t old_progman_window
; /* handle to the new program manager window
*/
2391 user_handle_t old_taskman_window
; /* handle to the new task manager window
*/
2393 #define SET_GLOBAL_SHELL_WINDOWS
0x01 /* set both main shell and listview windows
*/
2394 #define SET_GLOBAL_PROGMAN_WINDOW
0x02
2395 #define SET_GLOBAL_TASKMAN_WINDOW
0x04
2397 /* Adjust the privileges held by a token
*/
2398 @
REQ(adjust_token_privileges
)
2399 obj_handle_t handle
; /* handle to the token
*/
2400 int disable_all
; /* disable all privileges?
*/
2401 int get_modified_state
; /* get modified privileges?
*/
2402 VARARG(privileges
,LUID_AND_ATTRIBUTES
); /* privileges to enable
/disable
/remove
*/
2404 unsigned int len
; /* total length in bytes required to store token privileges
*/
2405 VARARG(privileges
,LUID_AND_ATTRIBUTES
); /* modified privileges
*/
2408 /* Retrieves the set of privileges held by or available to a token
*/
2409 @
REQ(get_token_privileges
)
2410 obj_handle_t handle
; /* handle to the token
*/
2412 unsigned int len
; /* total length in bytes required to store token privileges
*/
2413 VARARG(privileges
,LUID_AND_ATTRIBUTES
); /* privileges held by or available to a token
*/
2416 /* Check the token has the required privileges
*/
2417 @
REQ(check_token_privileges
)
2418 obj_handle_t handle
; /* handle to the token
*/
2419 int all_required
; /* are all the privileges required for the check to succeed?
*/
2420 VARARG(privileges
,LUID_AND_ATTRIBUTES
); /* privileges to check
*/
2422 int has_privileges
; /* does the token have the required privileges?
*/
2423 VARARG(privileges
,LUID_AND_ATTRIBUTES
); /* privileges held by or available to a token
*/
2426 @
REQ(duplicate_token
)
2427 obj_handle_t handle
; /* handle to the token to duplicate
*/
2428 unsigned int access
; /* access rights to the new token
*/
2429 int inherit
; /* inherit flag
*/
2430 int primary
; /* is the new token to be a primary one?
*/
2431 int impersonation_level
; /* impersonation level of the new token
*/
2433 obj_handle_t new_handle
; /* duplicated handle
*/
2437 obj_handle_t handle
; /* handle to the token
*/
2438 unsigned int desired_access
; /* desired access to the object
*/
2439 unsigned int mapping_read
; /* mapping from generic read to specific rights
*/
2440 unsigned int mapping_write
; /* mapping from generic write to specific rights
*/
2441 unsigned int mapping_execute
; /* mapping from generic execute to specific rights
*/
2442 unsigned int mapping_all
; /* mapping from generic all to specific rights
*/
2443 VARARG(sd
,security_descriptor
); /* security descriptor to check
*/
2445 unsigned int access_granted
; /* access rights actually granted
*/
2446 unsigned int access_status
; /* was access granted?
*/
2447 unsigned int privileges_len
; /* length needed to store privileges
*/
2448 VARARG(privileges
,LUID_AND_ATTRIBUTES
); /* privileges used during access check
*/
2451 @
REQ(get_token_user
)
2452 obj_handle_t handle
; /* handle to the token
*/
2454 size_t user_len
; /* length needed to store user
*/
2455 VARARG(user
,SID
); /* sid of the user the token represents
*/
2458 /* Create a mailslot
*/
2459 @
REQ(create_mailslot
)
2460 unsigned int max_msgsize
;
2461 unsigned int read_timeout
;
2463 VARARG(name
,unicode_str
); /* mailslot name
*/
2465 obj_handle_t handle
; /* handle to the mailslot
*/
2469 /* Open an existing mailslot
*/
2471 unsigned int access
;
2472 int inherit
; /* inherit flag
*/
2473 unsigned int sharing
; /* sharing mode
*/
2474 VARARG(name
,unicode_str
); /* mailslot name
*/
2476 obj_handle_t handle
; /* handle to the mailslot
*/
2480 /* Set mailslot information
*/
2481 @
REQ(set_mailslot_info
)
2482 obj_handle_t handle
; /* handle to the mailslot
*/
2484 unsigned int read_timeout
;
2486 unsigned int max_msgsize
;
2487 unsigned int read_timeout
;
2488 unsigned int msg_count
;
2489 unsigned int next_msgsize
;
2491 #define MAILSLOT_SET_READ_TIMEOUT
1