3 * Wine server protocol definition
5 * Copyright (C
) 2001 Alexandre Julliard
7 * This file is used by tools
/make_requests to build the
8 * protocol structures in include
/wine
/server_protocol.h
10 * This library is free software
; you can redistribute it and
/or
11 * modify it under the terms of the GNU Lesser General Public
12 * License as published by the Free Software Foundation
; either
13 * version
2.1 of the License
, or (at your option
) any later version.
15 * This library is distributed in the hope that it will be useful
,
16 * but WITHOUT ANY WARRANTY
; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU
18 * Lesser General Public License for more details.
20 * You should have received a copy of the GNU Lesser General Public
21 * License along with this library
; if not
, write to the Free Software
22 * Foundation
, Inc.
, 51 Franklin St
, Fifth Floor
, Boston
, MA
02110-1301, USA
25 @HEADER
/* start of C declarations
*/
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
); */
199 /* unsigned int attributes
[count
]; */
200 /* VARARGS(sids
,SID
); */
203 /****************************************************************/
204 /* Request declarations
*/
206 /* Create a new process from the context of the parent
*/
208 int inherit_all
; /* inherit all handles from parent
*/
209 unsigned int create_flags
; /* creation flags
*/
210 int unix_pid
; /* Unix pid of new process
*/
211 obj_handle_t exe_file
; /* file handle for main exe
*/
212 obj_handle_t hstdin
; /* handle for stdin
*/
213 obj_handle_t hstdout
; /* handle for stdout
*/
214 obj_handle_t hstderr
; /* handle for stderr
*/
215 VARARG(info
,startup_info
); /* startup information
*/
216 VARARG(env
,unicode_str
); /* environment for new process
*/
218 obj_handle_t info
; /* new process info handle
*/
222 /* Retrieve information about a newly started process
*/
223 @
REQ(get_new_process_info
)
224 obj_handle_t info
; /* info handle returned from new_process_request
*/
225 unsigned int process_access
; /* access rights for process object
*/
226 unsigned int process_attr
; /* attributes for process object
*/
227 unsigned int thread_access
; /* access rights for thread object
*/
228 unsigned int thread_attr
; /* attributes for thread object
*/
230 process_id_t pid
; /* process id
*/
231 obj_handle_t phandle
; /* process
handle (in the current process
) */
232 thread_id_t tid
; /* thread id
*/
233 obj_handle_t thandle
; /* thread
handle (in the current process
) */
234 int success
; /* did the process start successfully?
*/
238 /* Create a new thread from the context of the parent
*/
240 unsigned int access
; /* wanted access rights
*/
241 unsigned int attributes
; /* object attributes
*/
242 int suspend
; /* new thread should be suspended on creation
*/
243 int request_fd
; /* fd for request pipe
*/
245 thread_id_t tid
; /* thread id
*/
246 obj_handle_t handle
; /* thread
handle (in the current process
) */
250 /* Retrieve the new process startup info
*/
251 @
REQ(get_startup_info
)
253 obj_handle_t exe_file
; /* file handle for main exe
*/
254 obj_handle_t hstdin
; /* handle for stdin
*/
255 obj_handle_t hstdout
; /* handle for stdout
*/
256 obj_handle_t hstderr
; /* handle for stderr
*/
257 VARARG(info
,startup_info
); /* startup information
*/
258 VARARG(env
,unicode_str
); /* environment
*/
262 /* Signal the end of the process initialization
*/
263 @
REQ(init_process_done
)
264 void
* module
; /* main module base address
*/
265 void
* entry
; /* process entry point
*/
266 int gui
; /* is it a GUI process?
*/
270 /* Initialize a thread
; called from the child after
fork()/clone() */
272 int unix_pid
; /* Unix pid of new thread
*/
273 int unix_tid
; /* Unix tid of new thread
*/
274 void
* teb
; /* TEB of new
thread (in thread address space
) */
275 void
* peb
; /* address of
PEB (in thread address space
) */
276 void
* entry
; /* thread entry
point (in thread address space
) */
277 void
* ldt_copy
; /* address of LDT
copy (in thread address space
) */
278 int reply_fd
; /* fd for reply pipe
*/
279 int wait_fd
; /* fd for blocking calls pipe
*/
280 int debug_level
; /* new debug level
*/
282 process_id_t pid
; /* process id of the new thread
's process */
283 thread_id_t tid; /* thread id of the new thread */
284 size_t info_size; /* total size of startup info */
285 time_t server_start; /* server start time */
286 int version; /* protocol version */
290 /* Terminate a process */
291 @REQ(terminate_process)
292 obj_handle_t handle; /* process handle to terminate */
293 int exit_code; /* process exit code */
295 int self; /* suicide? */
299 /* Terminate a thread */
300 @REQ(terminate_thread)
301 obj_handle_t handle; /* thread handle to terminate */
302 int exit_code; /* thread exit code */
304 int self; /* suicide? */
305 int last; /* last thread in this process? */
309 /* Retrieve information about a process */
310 @REQ(get_process_info)
311 obj_handle_t handle; /* process handle */
313 process_id_t pid; /* server process id */
314 process_id_t ppid; /* server process id of parent */
315 int exit_code; /* process exit code */
316 int priority; /* priority class */
317 int affinity; /* process affinity mask */
318 void* peb; /* PEB address in process address space */
322 /* Set a process informations */
323 @REQ(set_process_info)
324 obj_handle_t handle; /* process handle */
325 int mask; /* setting mask (see below) */
326 int priority; /* priority class */
327 int affinity; /* affinity mask */
329 #define SET_PROCESS_INFO_PRIORITY 0x01
330 #define SET_PROCESS_INFO_AFFINITY 0x02
333 /* Retrieve information about a thread */
334 @REQ(get_thread_info)
335 obj_handle_t handle; /* thread handle */
336 thread_id_t tid_in; /* thread id (optional) */
338 process_id_t pid; /* server process id */
339 thread_id_t tid; /* server thread id */
340 void* teb; /* thread teb pointer */
341 int exit_code; /* thread exit code */
342 int priority; /* thread priority level */
343 int affinity; /* thread affinity mask */
344 time_t creation_time; /* thread creation time */
345 time_t exit_time; /* thread exit time */
349 /* Set a thread informations */
350 @REQ(set_thread_info)
351 obj_handle_t handle; /* thread handle */
352 int mask; /* setting mask (see below) */
353 int priority; /* priority class */
354 int affinity; /* affinity mask */
355 obj_handle_t token; /* impersonation token */
357 #define SET_THREAD_INFO_PRIORITY 0x01
358 #define SET_THREAD_INFO_AFFINITY 0x02
359 #define SET_THREAD_INFO_TOKEN 0x04
362 /* Retrieve information about a module */
364 obj_handle_t handle; /* process handle */
365 void* base_address; /* base address of module */
367 size_t size; /* module size */
369 VARARG(filename,unicode_str); /* file name of module */
373 /* Suspend a thread */
375 obj_handle_t handle; /* thread handle */
377 int count; /* new suspend count */
381 /* Resume a thread */
383 obj_handle_t handle; /* thread handle */
385 int count; /* new suspend count */
389 /* Notify the server that a dll has been loaded */
391 obj_handle_t handle; /* file handle */
392 void* base; /* base address */
393 size_t size; /* dll size */
394 int dbg_offset; /* debug info offset */
395 int dbg_size; /* debug info size */
396 void* name; /* ptr to ptr to name (in process addr space) */
397 VARARG(filename,unicode_str); /* file name of dll */
401 /* Notify the server that a dll is being unloaded */
403 void* base; /* base address */
407 /* Queue an APC for a thread */
409 obj_handle_t handle; /* thread handle */
410 int user; /* user or system apc? */
411 void* func; /* function to call */
412 void* arg1; /* params for function to call */
418 /* Get next APC to call */
420 int alertable; /* is thread alertable? */
422 void* func; /* function to call */
423 int type; /* function type */
424 void* arg1; /* function arguments */
428 enum apc_type { APC_NONE, APC_USER, APC_TIMER, APC_ASYNC_IO };
431 /* Close a handle for the current process */
433 obj_handle_t handle; /* handle to close */
435 int fd; /* associated fd to close */
439 /* Set a handle information */
440 @REQ(set_handle_info)
441 obj_handle_t handle; /* handle we are interested in */
442 int flags; /* new handle flags */
443 int mask; /* mask for flags to set */
445 int old_flags; /* old flag value */
449 /* Duplicate a handle */
451 obj_handle_t src_process; /* src process handle */
452 obj_handle_t src_handle; /* src handle to duplicate */
453 obj_handle_t dst_process; /* dst process handle */
454 unsigned int access; /* wanted access rights */
455 unsigned int attributes; /* object attributes */
456 unsigned int options; /* duplicate options (see below) */
458 obj_handle_t handle; /* duplicated handle in dst process */
459 int fd; /* associated fd to close */
461 #define DUP_HANDLE_CLOSE_SOURCE DUPLICATE_CLOSE_SOURCE
462 #define DUP_HANDLE_SAME_ACCESS DUPLICATE_SAME_ACCESS
463 #define DUP_HANDLE_MAKE_GLOBAL 0x80000000 /* Not a Windows flag */
466 /* Open a handle to a process */
468 process_id_t pid; /* process id to open */
469 unsigned int access; /* wanted access rights */
470 unsigned int attributes; /* object attributes */
472 obj_handle_t handle; /* handle to the process */
476 /* Open a handle to a thread */
478 thread_id_t tid; /* thread id to open */
479 unsigned int access; /* wanted access rights */
480 unsigned int attributes; /* object attributes */
482 obj_handle_t handle; /* handle to the thread */
486 /* Wait for handles */
488 int flags; /* wait flags (see below) */
489 void* cookie; /* magic cookie to return to client */
490 obj_handle_t signal; /* object to signal (0 if none) */
491 abs_time_t timeout; /* absolute timeout */
492 VARARG(handles,handles); /* handles to select on */
495 #define SELECT_ALERTABLE 2
496 #define SELECT_INTERRUPTIBLE 4
497 #define SELECT_TIMEOUT 8
500 /* Create an event */
502 unsigned int access; /* wanted access rights */
503 unsigned int attributes; /* object attributes */
504 obj_handle_t rootdir; /* root directory */
505 int manual_reset; /* manual reset event */
506 int initial_state; /* initial state of the event */
507 VARARG(name,unicode_str); /* object name */
509 obj_handle_t handle; /* handle to the event */
512 /* Event operation */
514 obj_handle_t handle; /* handle to event */
515 int op; /* event operation (see below) */
517 enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT };
522 unsigned int access; /* wanted access rights */
523 unsigned int attributes; /* object attributes */
524 obj_handle_t rootdir; /* root directory */
525 VARARG(name,unicode_str); /* object name */
527 obj_handle_t handle; /* handle to the event */
533 unsigned int access; /* wanted access rights */
534 unsigned int attributes; /* object attributes */
535 obj_handle_t rootdir; /* root directory */
536 int owned; /* initially owned? */
537 VARARG(name,unicode_str); /* object name */
539 obj_handle_t handle; /* handle to the mutex */
543 /* Release a mutex */
545 obj_handle_t handle; /* handle to the mutex */
547 unsigned int prev_count; /* value of internal counter, before release */
553 unsigned int access; /* wanted access rights */
554 unsigned int attributes; /* object attributes */
555 obj_handle_t rootdir; /* root directory */
556 VARARG(name,unicode_str); /* object name */
558 obj_handle_t handle; /* handle to the mutex */
562 /* Create a semaphore */
563 @REQ(create_semaphore)
564 unsigned int access; /* wanted access rights */
565 unsigned int attributes; /* object attributes */
566 obj_handle_t rootdir; /* root directory */
567 unsigned int initial; /* initial count */
568 unsigned int max; /* maximum count */
569 VARARG(name,unicode_str); /* object name */
571 obj_handle_t handle; /* handle to the semaphore */
575 /* Release a semaphore */
576 @REQ(release_semaphore)
577 obj_handle_t handle; /* handle to the semaphore */
578 unsigned int count; /* count to add to semaphore */
580 unsigned int prev_count; /* previous semaphore count */
584 /* Open a semaphore */
586 unsigned int access; /* wanted access rights */
587 unsigned int attributes; /* object attributes */
588 obj_handle_t rootdir; /* root directory */
589 VARARG(name,unicode_str); /* object name */
591 obj_handle_t handle; /* handle to the semaphore */
597 unsigned int access; /* wanted access rights */
598 unsigned int attributes; /* object attributes */
599 unsigned int sharing; /* sharing flags */
600 int create; /* file create action */
601 unsigned int options; /* file options */
602 unsigned int attrs; /* file attributes for creation */
603 VARARG(filename,string); /* file name */
605 obj_handle_t handle; /* handle to the file */
609 /* Open a file object */
610 @REQ(open_file_object)
611 unsigned int access; /* wanted access rights */
612 unsigned int attributes; /* open attributes */
613 obj_handle_t rootdir; /* root directory */
614 unsigned int sharing; /* sharing flags */
615 VARARG(filename,unicode_str); /* file name */
617 obj_handle_t handle; /* handle to the file */
621 /* Allocate a file handle for a Unix fd */
622 @REQ(alloc_file_handle)
623 unsigned int access; /* wanted access rights */
624 unsigned int attributes; /* object attributes */
625 int fd; /* file descriptor on the client side */
627 obj_handle_t handle; /* handle to the file */
631 /* Get a Unix fd to access a file */
633 obj_handle_t handle; /* handle to the file */
634 unsigned int access; /* wanted access rights */
636 int fd; /* file descriptor */
637 int removable; /* is device removable? (-1 if unknown) */
638 int flags; /* file read/write flags (see below) */
640 #define FD_FLAG_OVERLAPPED 0x01 /* fd opened in overlapped mode */
641 #define FD_FLAG_TIMEOUT 0x02 /* read/write is synchronous */
642 #define FD_FLAG_RECV_SHUTDOWN 0x04
643 #define FD_FLAG_SEND_SHUTDOWN 0x08
644 #define FD_FLAG_AVAILABLE 0x10 /* in overlap read/write operation,
645 * only handle available data (don't wait
) */
647 /* Set the cached file descriptor of a handle
*/
649 obj_handle_t handle
; /* handle we are interested in
*/
650 int fd
; /* file descriptor
*/
651 int removable
; /* is device removable?
(-1 if unknown
) */
653 int cur_fd
; /* current file descriptor
*/
657 /* Flush a file buffers
*/
659 obj_handle_t handle
; /* handle to the file
*/
661 obj_handle_t event
; /* event set when finished
*/
665 /* Lock a region of a file
*/
667 obj_handle_t handle
; /* handle to the file
*/
668 unsigned int offset_low
; /* offset of start of lock
*/
669 unsigned int offset_high
; /* offset of start of lock
*/
670 unsigned int count_low
; /* count of bytes to lock
*/
671 unsigned int count_high
; /* count of bytes to lock
*/
672 int shared
; /* shared or exclusive lock?
*/
673 int wait
; /* do we want to wait?
*/
675 obj_handle_t handle
; /* handle to wait on
*/
676 int overlapped
; /* is it an overlapped I
/O handle?
*/
680 /* Unlock a region of a file
*/
682 obj_handle_t handle
; /* handle to the file
*/
683 unsigned int offset_low
; /* offset of start of unlock
*/
684 unsigned int offset_high
; /* offset of start of unlock
*/
685 unsigned int count_low
; /* count of bytes to unlock
*/
686 unsigned int count_high
; /* count of bytes to unlock
*/
690 /* Get ready to unmount a Unix device
*/
692 obj_handle_t handle
; /* handle to a file on the device
*/
696 /* Create a socket
*/
698 unsigned int access
; /* wanted access rights
*/
699 unsigned int attributes
; /* object attributes
*/
700 int family
; /* family
, see socket manpage
*/
701 int type
; /* type
, see socket manpage
*/
702 int protocol
; /* protocol
, see socket manpage
*/
703 unsigned int flags
; /* socket flags
*/
705 obj_handle_t handle
; /* handle to the new socket
*/
709 /* Accept a socket
*/
711 obj_handle_t lhandle
; /* handle to the listening socket
*/
712 unsigned int access
; /* wanted access rights
*/
713 unsigned int attributes
; /* object attributes
*/
715 obj_handle_t handle
; /* handle to the new socket
*/
719 /* Set socket event parameters
*/
720 @
REQ(set_socket_event
)
721 obj_handle_t handle
; /* handle to the socket
*/
722 unsigned int mask
; /* event mask
*/
723 obj_handle_t event
; /* event object
*/
724 user_handle_t window
; /* window to send the message to
*/
725 unsigned int msg
; /* message to send
*/
729 /* Get socket event parameters
*/
730 @
REQ(get_socket_event
)
731 obj_handle_t handle
; /* handle to the socket
*/
732 int service
; /* clear pending?
*/
733 obj_handle_t c_event
; /* event to clear
*/
735 unsigned int mask
; /* event mask
*/
736 unsigned int pmask
; /* pending events
*/
737 unsigned int state
; /* status bits
*/
738 VARARG(errors
,ints
); /* event errors
*/
742 /* Reenable pending socket events
*/
743 @
REQ(enable_socket_event
)
744 obj_handle_t handle
; /* handle to the socket
*/
745 unsigned int mask
; /* events to re
-enable
*/
746 unsigned int sstate
; /* status bits to set
*/
747 unsigned int cstate
; /* status bits to clear
*/
750 @
REQ(set_socket_deferred
)
751 obj_handle_t handle
; /* handle to the socket
*/
752 obj_handle_t deferred
; /* handle to the socket for which
accept() is deferred
*/
755 /* Allocate a
console (only used by a console renderer
) */
757 unsigned int access
; /* wanted access rights
*/
758 unsigned int attributes
; /* object attributes
*/
759 process_id_t pid
; /* pid of process which shall be attached to the console
*/
761 obj_handle_t handle_in
; /* handle to console input
*/
762 obj_handle_t event
; /* handle to renderer events change notification
*/
766 /* Free the console of the current process
*/
771 #define CONSOLE_RENDERER_NONE_EVENT
0x00
772 #define CONSOLE_RENDERER_TITLE_EVENT
0x01
773 #define CONSOLE_RENDERER_ACTIVE_SB_EVENT
0x02
774 #define CONSOLE_RENDERER_SB_RESIZE_EVENT
0x03
775 #define CONSOLE_RENDERER_UPDATE_EVENT
0x04
776 #define CONSOLE_RENDERER_CURSOR_POS_EVENT
0x05
777 #define CONSOLE_RENDERER_CURSOR_GEOM_EVENT
0x06
778 #define CONSOLE_RENDERER_DISPLAY_EVENT
0x07
779 #define CONSOLE_RENDERER_EXIT_EVENT
0x08
780 struct console_renderer_event
815 /* retrieve console events for the renderer
*/
816 @
REQ(get_console_renderer_events
)
817 obj_handle_t handle
; /* handle to console input events
*/
819 VARARG(data
,bytes
); /* the various console_renderer_events
*/
823 /* Open a handle to the process console
*/
825 int from
; /* 0 (resp
1) input (resp output
) of current process console
*/
826 /* otherwise console_in handle to get active screen buffer?
*/
827 unsigned int access
; /* wanted access rights
*/
828 unsigned int attributes
; /* object attributes
*/
829 int share
; /* share
mask (only for output handles
) */
831 obj_handle_t handle
; /* handle to the console
*/
835 /* Get the input queue wait event
*/
836 @
REQ(get_console_wait_event
)
841 /* Get a console
mode (input or output
) */
842 @
REQ(get_console_mode
)
843 obj_handle_t handle
; /* handle to the console
*/
845 int mode
; /* console mode
*/
849 /* Set a console
mode (input or output
) */
850 @
REQ(set_console_mode
)
851 obj_handle_t handle
; /* handle to the console
*/
852 int mode
; /* console mode
*/
856 /* Set info about a
console (input only
) */
857 @
REQ(set_console_input_info
)
858 obj_handle_t handle
; /* handle to console input
, or
0 for process
' console */
859 int mask; /* setting mask (see below) */
860 obj_handle_t active_sb; /* active screen buffer */
861 int history_mode; /* whether we duplicate lines in history */
862 int history_size; /* number of lines in history */
863 int edition_mode; /* index to the edition mode flavors */
864 VARARG(title,unicode_str); /* console title */
866 #define SET_CONSOLE_INPUT_INFO_ACTIVE_SB 0x01
867 #define SET_CONSOLE_INPUT_INFO_TITLE 0x02
868 #define SET_CONSOLE_INPUT_INFO_HISTORY_MODE 0x04
869 #define SET_CONSOLE_INPUT_INFO_HISTORY_SIZE 0x08
870 #define SET_CONSOLE_INPUT_INFO_EDITION_MODE 0x10
873 /* Get info about a console (input only) */
874 @REQ(get_console_input_info)
875 obj_handle_t handle; /* handle to console input, or 0 for process' console
*/
877 int history_mode
; /* whether we duplicate lines in history
*/
878 int history_size
; /* number of lines in history
*/
879 int history_index
; /* number of used lines in history
*/
880 int edition_mode
; /* index to the edition mode flavors
*/
881 VARARG(title
,unicode_str
); /* console title
*/
885 /* appends a string to console
's history */
886 @REQ(append_console_input_history)
887 obj_handle_t handle; /* handle to console input, or 0 for process' console
*/
888 VARARG(line
,unicode_str
); /* line to add
*/
892 /* appends a string to console
's history */
893 @REQ(get_console_input_history)
894 obj_handle_t handle; /* handle to console input, or 0 for process' console
*/
895 int index
; /* index to get line from
*/
897 int total
; /* total length of line in Unicode chars
*/
898 VARARG(line
,unicode_str
); /* line to add
*/
902 /* creates a new screen buffer on process
' console */
903 @REQ(create_console_output)
904 obj_handle_t handle_in; /* handle to console input, or 0 for process' console
*/
905 unsigned int access
; /* wanted access rights
*/
906 unsigned int attributes
; /* object attributes
*/
907 unsigned int share
; /* sharing credentials
*/
909 obj_handle_t handle_out
; /* handle to the screen buffer
*/
913 /* Set info about a
console (output only
) */
914 @
REQ(set_console_output_info
)
915 obj_handle_t handle
; /* handle to the console
*/
916 int mask
; /* setting
mask (see below
) */
917 short int cursor_size
; /* size of
cursor (percentage filled
) */
918 short int cursor_visible
;/* cursor visibility flag
*/
919 short int cursor_x
; /* position of
cursor (x
, y
) */
921 short int width
; /* width of the screen buffer
*/
922 short int height
; /* height of the screen buffer
*/
923 short int attr
; /* default attribute
*/
924 short int win_left
; /* window actually displayed by renderer
*/
925 short int win_top
; /* the rect area is expressed withing the
*/
926 short int win_right
; /* boundaries of the screen buffer
*/
927 short int win_bottom
;
928 short int max_width
; /* maximum
size (width x height
) for the window
*/
929 short int max_height
;
931 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_GEOM
0x01
932 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_POS
0x02
933 #define SET_CONSOLE_OUTPUT_INFO_SIZE
0x04
934 #define SET_CONSOLE_OUTPUT_INFO_ATTR
0x08
935 #define SET_CONSOLE_OUTPUT_INFO_DISPLAY_WINDOW
0x10
936 #define SET_CONSOLE_OUTPUT_INFO_MAX_SIZE
0x20
939 /* Get info about a
console (output only
) */
940 @
REQ(get_console_output_info
)
941 obj_handle_t handle
; /* handle to the console
*/
943 short int cursor_size
; /* size of
cursor (percentage filled
) */
944 short int cursor_visible
;/* cursor visibility flag
*/
945 short int cursor_x
; /* position of
cursor (x
, y
) */
947 short int width
; /* width of the screen buffer
*/
948 short int height
; /* height of the screen buffer
*/
949 short int attr
; /* default attribute
*/
950 short int win_left
; /* window actually displayed by renderer
*/
951 short int win_top
; /* the rect area is expressed withing the
*/
952 short int win_right
; /* boundaries of the screen buffer
*/
953 short int win_bottom
;
954 short int max_width
; /* maximum
size (width x height
) for the window
*/
955 short int max_height
;
958 /* Add input records to a console input queue
*/
959 @
REQ(write_console_input
)
960 obj_handle_t handle
; /* handle to the console input
*/
961 VARARG(rec
,input_records
); /* input records
*/
963 int written
; /* number of records written
*/
967 /* Fetch input records from a console input queue
*/
968 @
REQ(read_console_input
)
969 obj_handle_t handle
; /* handle to the console input
*/
970 int flush
; /* flush the retrieved records from the queue?
*/
972 int read
; /* number of records read
*/
973 VARARG(rec
,input_records
); /* input records
*/
977 /* write
data (chars and
/or attributes
) in a screen buffer
*/
978 @
REQ(write_console_output
)
979 obj_handle_t handle
; /* handle to the console output
*/
980 int x
; /* position where to start writing
*/
982 int mode
; /* char
info (see below
) */
983 int wrap
; /* wrap around at end of line?
*/
984 VARARG(data
,bytes
); /* info to write
*/
986 int written
; /* number of char infos actually written
*/
987 int width
; /* width of screen buffer
*/
988 int height
; /* height of screen buffer
*/
992 CHAR_INFO_MODE_TEXT
, /* characters only
*/
993 CHAR_INFO_MODE_ATTR
, /* attributes only
*/
994 CHAR_INFO_MODE_TEXTATTR
, /* both characters and attributes
*/
995 CHAR_INFO_MODE_TEXTSTDATTR
/* characters but use standard attributes
*/
999 /* fill a screen buffer with constant
data (chars and
/or attributes
) */
1000 @
REQ(fill_console_output
)
1001 obj_handle_t handle
; /* handle to the console output
*/
1002 int x
; /* position where to start writing
*/
1004 int mode
; /* char info mode
*/
1005 int count
; /* number to write
*/
1006 int wrap
; /* wrap around at end of line?
*/
1007 char_info_t data
; /* data to write
*/
1009 int written
; /* number of char infos actually written
*/
1013 /* read
data (chars and
/or attributes
) from a screen buffer
*/
1014 @
REQ(read_console_output
)
1015 obj_handle_t handle
; /* handle to the console output
*/
1016 int x
; /* position (x
,y
) where to start reading
*/
1018 int mode
; /* char info mode
*/
1019 int wrap
; /* wrap around at end of line?
*/
1021 int width
; /* width of screen buffer
*/
1022 int height
; /* height of screen buffer
*/
1027 /* move a
rect (of data
) in screen buffer content
*/
1028 @
REQ(move_console_output
)
1029 obj_handle_t handle
; /* handle to the console output
*/
1030 short int x_src
; /* position (x
, y
) of rect to start moving from
*/
1032 short int x_dst
; /* position (x
, y
) of rect to move to
*/
1034 short int w
; /* size of the
rect (width
, height
) to move
*/
1039 /* Sends a signal to a process group
*/
1040 @
REQ(send_console_signal
)
1041 int signal
; /* the signal to send
*/
1042 process_id_t group_id
; /* the group to send the signal to
*/
1046 /* enable directory change notifications
*/
1047 @
REQ(read_directory_changes
)
1048 obj_handle_t handle
; /* handle to the directory
*/
1049 obj_handle_t event
; /* handle to the event
*/
1050 unsigned int filter
; /* notification filter
*/
1051 int subtree
; /* watch the subtree?
*/
1052 int want_data
; /* flag indicating whether change data should be collected
*/
1053 void
* io_apc
; /* APC routine to queue upon end of async
*/
1054 void
* io_sb
; /* I
/O status
block (unique across all async on this handle
) */
1055 void
* io_user
; /* data to pass back to caller
*/
1060 obj_handle_t handle
;
1062 int action
; /* type of change
*/
1063 VARARG(name
,string
); /* name of directory entry that changed
*/
1067 /* Create a file mapping
*/
1068 @
REQ(create_mapping
)
1069 unsigned int access
; /* wanted access rights
*/
1070 unsigned int attributes
; /* object attributes
*/
1071 obj_handle_t rootdir
; /* root directory
*/
1072 int size_high
; /* mapping size
*/
1073 int size_low
; /* mapping size
*/
1074 int protect
; /* protection
flags (see below
) */
1075 obj_handle_t file_handle
; /* file handle
*/
1076 VARARG(name
,unicode_str
); /* object name
*/
1078 obj_handle_t handle
; /* handle to the mapping
*/
1080 /* protection flags
*/
1081 #define VPROT_READ
0x01
1082 #define VPROT_WRITE
0x02
1083 #define VPROT_EXEC
0x04
1084 #define VPROT_WRITECOPY
0x08
1085 #define VPROT_GUARD
0x10
1086 #define VPROT_NOCACHE
0x20
1087 #define VPROT_COMMITTED
0x40
1088 #define VPROT_IMAGE
0x80
1091 /* Open a mapping
*/
1093 unsigned int access
; /* wanted access rights
*/
1094 unsigned int attributes
; /* object attributes
*/
1095 obj_handle_t rootdir
; /* root directory
*/
1096 VARARG(name
,unicode_str
); /* object name
*/
1098 obj_handle_t handle
; /* handle to the mapping
*/
1102 /* Get information about a file mapping
*/
1103 @
REQ(get_mapping_info
)
1104 obj_handle_t handle
; /* handle to the mapping
*/
1106 int size_high
; /* mapping size
*/
1107 int size_low
; /* mapping size
*/
1108 int protect
; /* protection flags
*/
1109 int header_size
; /* header
size (for VPROT_IMAGE mapping
) */
1110 void
* base
; /* default base
addr (for VPROT_IMAGE mapping
) */
1111 obj_handle_t shared_file
; /* shared mapping file handle
*/
1112 int shared_size
; /* shared mapping size
*/
1116 #define SNAP_HEAPLIST
0x00000001
1117 #define SNAP_PROCESS
0x00000002
1118 #define SNAP_THREAD
0x00000004
1119 #define SNAP_MODULE
0x00000008
1120 /* Create a snapshot
*/
1121 @
REQ(create_snapshot
)
1122 unsigned int attributes
; /* object attributes
*/
1123 int flags
; /* snapshot
flags (SNAP_*)
*/
1124 process_id_t pid
; /* process id
*/
1126 obj_handle_t handle
; /* handle to the snapshot
*/
1130 /* Get the next process from a snapshot
*/
1132 obj_handle_t handle
; /* handle to the snapshot
*/
1133 int reset
; /* reset snapshot position?
*/
1135 int count
; /* process usage count
*/
1136 process_id_t pid
; /* process id
*/
1137 process_id_t ppid
; /* parent process id
*/
1138 void
* heap
; /* heap base
*/
1139 void
* module
; /* main module
*/
1140 int threads
; /* number of threads
*/
1141 int priority
; /* process priority
*/
1142 int handles
; /* number of handles
*/
1143 VARARG(filename
,unicode_str
); /* file name of main exe
*/
1147 /* Get the next thread from a snapshot
*/
1149 obj_handle_t handle
; /* handle to the snapshot
*/
1150 int reset
; /* reset snapshot position?
*/
1152 int count
; /* thread usage count
*/
1153 process_id_t pid
; /* process id
*/
1154 thread_id_t tid
; /* thread id
*/
1155 int base_pri
; /* base priority
*/
1156 int delta_pri
; /* delta priority
*/
1160 /* Get the next module from a snapshot
*/
1162 obj_handle_t handle
; /* handle to the snapshot
*/
1163 int reset
; /* reset snapshot position?
*/
1165 process_id_t pid
; /* process id
*/
1166 void
* base
; /* module base address
*/
1167 size_t size
; /* module size
*/
1168 VARARG(filename
,unicode_str
); /* file name of module
*/
1172 /* Wait for a debug event
*/
1173 @
REQ(wait_debug_event
)
1174 int get_handle
; /* should we alloc a handle for waiting?
*/
1176 process_id_t pid
; /* process id
*/
1177 thread_id_t tid
; /* thread id
*/
1178 obj_handle_t wait
; /* wait handle if no event ready
*/
1179 VARARG(event
,debug_event
); /* debug event data
*/
1183 /* Queue an exception event
*/
1184 @
REQ(queue_exception_event
)
1185 int first
; /* first chance exception?
*/
1186 VARARG(record
,exc_event
); /* thread context followed by exception record
*/
1188 obj_handle_t handle
; /* handle to the queued event
*/
1192 /* Retrieve the status of an exception event
*/
1193 @
REQ(get_exception_status
)
1194 obj_handle_t handle
; /* handle to the queued event
*/
1196 VARARG(context
,context
); /* modified thread context
*/
1200 /* Send an output string to the debugger
*/
1201 @
REQ(output_debug_string
)
1202 void
* string
; /* string to
display (in debugged process address space
) */
1203 int unicode
; /* is it Unicode?
*/
1204 int length
; /* string length
*/
1208 /* Continue a debug event
*/
1209 @
REQ(continue_debug_event
)
1210 process_id_t pid
; /* process id to continue
*/
1211 thread_id_t tid
; /* thread id to continue
*/
1212 int status
; /* continuation status
*/
1216 /* Start
/stop debugging an existing process
*/
1218 process_id_t pid
; /* id of the process to debug
*/
1219 int attach
; /* 1=attaching
/ 0=detaching from the process
*/
1223 /* Simulate a breakpoint in a process
*/
1225 obj_handle_t handle
; /* process handle
*/
1227 int self
; /* was it the caller itself?
*/
1231 /* Set debugger kill on exit flag
*/
1232 @
REQ(set_debugger_kill_on_exit
)
1233 int kill_on_exit
; /* 0=detach
/1=kill debuggee when debugger dies
*/
1237 /* Read data from a process address space
*/
1238 @
REQ(read_process_memory
)
1239 obj_handle_t handle
; /* process handle
*/
1240 void
* addr
; /* addr to read from
*/
1242 VARARG(data
,bytes
); /* result data
*/
1246 /* Write data to a process address space
*/
1247 @
REQ(write_process_memory
)
1248 obj_handle_t handle
; /* process handle
*/
1249 void
* addr
; /* addr to write to
*/
1250 VARARG(data
,bytes
); /* data to write
*/
1254 /* Create a registry key
*/
1256 obj_handle_t parent
; /* handle to the parent key
*/
1257 unsigned int access
; /* desired access rights
*/
1258 unsigned int attributes
; /* object attributes
*/
1259 unsigned int options
; /* creation options
*/
1260 time_t modif
; /* last modification time
*/
1261 size_t namelen
; /* length of key name in bytes
*/
1262 VARARG(name
,unicode_str
,namelen
); /* key name
*/
1263 VARARG(class
,unicode_str
); /* class name
*/
1265 obj_handle_t hkey
; /* handle to the created key
*/
1266 int created
; /* has it been newly created?
*/
1269 /* Open a registry key
*/
1271 obj_handle_t parent
; /* handle to the parent key
*/
1272 unsigned int access
; /* desired access rights
*/
1273 unsigned int attributes
; /* object attributes
*/
1274 VARARG(name
,unicode_str
); /* key name
*/
1276 obj_handle_t hkey
; /* handle to the open key
*/
1280 /* Delete a registry key
*/
1282 obj_handle_t hkey
; /* handle to the key
*/
1286 /* Flush a registry key
*/
1288 obj_handle_t hkey
; /* handle to the key
*/
1292 /* Enumerate registry subkeys
*/
1294 obj_handle_t hkey
; /* handle to registry key
*/
1295 int index
; /* index of
subkey (or
-1 for current key
) */
1296 int info_class
; /* requested information class
*/
1298 int subkeys
; /* number of subkeys
*/
1299 int max_subkey
; /* longest subkey name
*/
1300 int max_class
; /* longest class name
*/
1301 int values
; /* number of values
*/
1302 int max_value
; /* longest value name
*/
1303 int max_data
; /* longest value data
*/
1304 time_t modif
; /* last modification time
*/
1305 size_t total
; /* total length needed for full name and class
*/
1306 size_t namelen
; /* length of key name in bytes
*/
1307 VARARG(name
,unicode_str
,namelen
); /* key name
*/
1308 VARARG(class
,unicode_str
); /* class name
*/
1312 /* Set a value of a registry key
*/
1314 obj_handle_t hkey
; /* handle to registry key
*/
1315 int type
; /* value type
*/
1316 size_t namelen
; /* length of value name in bytes
*/
1317 VARARG(name
,unicode_str
,namelen
); /* value name
*/
1318 VARARG(data
,bytes
); /* value data
*/
1322 /* Retrieve the value of a registry key
*/
1324 obj_handle_t hkey
; /* handle to registry key
*/
1325 VARARG(name
,unicode_str
); /* value name
*/
1327 int type
; /* value type
*/
1328 size_t total
; /* total length needed for data
*/
1329 VARARG(data
,bytes
); /* value data
*/
1333 /* Enumerate a value of a registry key
*/
1334 @
REQ(enum_key_value
)
1335 obj_handle_t hkey
; /* handle to registry key
*/
1336 int index
; /* value index
*/
1337 int info_class
; /* requested information class
*/
1339 int type
; /* value type
*/
1340 size_t total
; /* total length needed for full name and data
*/
1341 size_t namelen
; /* length of value name in bytes
*/
1342 VARARG(name
,unicode_str
,namelen
); /* value name
*/
1343 VARARG(data
,bytes
); /* value data
*/
1347 /* Delete a value of a registry key
*/
1348 @
REQ(delete_key_value
)
1349 obj_handle_t hkey
; /* handle to registry key
*/
1350 VARARG(name
,unicode_str
); /* value name
*/
1354 /* Load a registry branch from a file
*/
1356 obj_handle_t hkey
; /* root key to load to
*/
1357 obj_handle_t file
; /* file to load from
*/
1358 VARARG(name
,unicode_str
); /* subkey name
*/
1362 /* UnLoad a registry branch from a file
*/
1363 @
REQ(unload_registry
)
1364 obj_handle_t hkey
; /* root key to unload to
*/
1368 /* Save a registry branch to a file
*/
1370 obj_handle_t hkey
; /* key to save
*/
1371 obj_handle_t file
; /* file to save to
*/
1375 /* Add a registry key change notification
*/
1376 @
REQ(set_registry_notification
)
1377 obj_handle_t hkey
; /* key to watch for changes
*/
1378 obj_handle_t event
; /* event to set
*/
1379 int subtree
; /* should we watch the whole subtree?
*/
1380 unsigned int filter
; /* things to watch
*/
1384 /* Create a waitable timer
*/
1386 unsigned int access
; /* wanted access rights
*/
1387 unsigned int attributes
; /* object attributes
*/
1388 obj_handle_t rootdir
; /* root directory
*/
1389 int manual
; /* manual reset
*/
1390 VARARG(name
,unicode_str
); /* object name
*/
1392 obj_handle_t handle
; /* handle to the timer
*/
1396 /* Open a waitable timer
*/
1398 unsigned int access
; /* wanted access rights
*/
1399 unsigned int attributes
; /* object attributes
*/
1400 obj_handle_t rootdir
; /* root directory
*/
1401 VARARG(name
,unicode_str
); /* object name
*/
1403 obj_handle_t handle
; /* handle to the timer
*/
1406 /* Set a waitable timer
*/
1408 obj_handle_t handle
; /* handle to the timer
*/
1409 abs_time_t expire
; /* next expiration absolute time
*/
1410 int period
; /* timer period in ms
*/
1411 void
* callback
; /* callback function
*/
1412 void
* arg
; /* callback argument
*/
1414 int signaled
; /* was the timer signaled before this call ?
*/
1417 /* Cancel a waitable timer
*/
1419 obj_handle_t handle
; /* handle to the timer
*/
1421 int signaled
; /* was the timer signaled before this calltime ?
*/
1424 /* Get information on a waitable timer
*/
1425 @
REQ(get_timer_info
)
1426 obj_handle_t handle
; /* handle to the timer
*/
1428 abs_time_t when
; /* absolute time when the timer next expires
*/
1429 int signaled
; /* is the timer signaled?
*/
1433 /* Retrieve the current context of a thread
*/
1434 @
REQ(get_thread_context
)
1435 obj_handle_t handle
; /* thread handle
*/
1436 unsigned int flags
; /* context flags
*/
1437 int suspend
; /* if getting context during suspend
*/
1439 int self
; /* was it a handle to the current thread?
*/
1440 VARARG(context
,context
); /* thread context
*/
1444 /* Set the current context of a thread
*/
1445 @
REQ(set_thread_context
)
1446 obj_handle_t handle
; /* thread handle
*/
1447 unsigned int flags
; /* context flags
*/
1448 int suspend
; /* if setting context during suspend
*/
1449 VARARG(context
,context
); /* thread context
*/
1451 int self
; /* was it a handle to the current thread?
*/
1455 /* Fetch a selector entry for a thread
*/
1456 @
REQ(get_selector_entry
)
1457 obj_handle_t handle
; /* thread handle
*/
1458 int entry
; /* LDT entry
*/
1460 unsigned int base
; /* selector base
*/
1461 unsigned int limit
; /* selector limit
*/
1462 unsigned char flags
; /* selector flags
*/
1468 obj_handle_t table
; /* which table to add atom to
*/
1469 VARARG(name
,unicode_str
); /* atom name
*/
1471 atom_t atom
; /* resulting atom
*/
1475 /* Delete an atom
*/
1477 obj_handle_t table
; /* which table to delete atom from
*/
1478 atom_t atom
; /* atom handle
*/
1484 obj_handle_t table
; /* which table to find atom from
*/
1485 VARARG(name
,unicode_str
); /* atom name
*/
1487 atom_t atom
; /* atom handle
*/
1491 /* Get information about an atom
*/
1492 @
REQ(get_atom_information
)
1493 obj_handle_t table
; /* which table to find atom from
*/
1494 atom_t atom
; /* atom handle
*/
1496 int count
; /* atom lock count
*/
1497 int pinned
; /* whether the atom has been pinned
*/
1498 size_t total
; /* actual length of atom name
*/
1499 VARARG(name
,unicode_str
); /* atom name
*/
1503 /* Set information about an atom
*/
1504 @
REQ(set_atom_information
)
1505 obj_handle_t table
; /* which table to find atom from
*/
1506 atom_t atom
; /* atom handle
*/
1507 int pinned
; /* whether to bump atom information
*/
1511 /* Empty an atom table
*/
1512 @
REQ(empty_atom_table
)
1513 obj_handle_t table
; /* which table to find atom from
*/
1514 int if_pinned
; /* whether to delete pinned atoms
*/
1518 /* Init an atom table
*/
1519 @
REQ(init_atom_table
)
1520 int entries
; /* number of
entries (only for local
) */
1522 obj_handle_t table
; /* handle to the atom table
*/
1526 /* Get the message queue of the current thread
*/
1529 obj_handle_t handle
; /* handle to the queue
*/
1533 /* Set the current message queue wakeup mask
*/
1534 @
REQ(set_queue_mask
)
1535 unsigned int wake_mask
; /* wakeup bits mask
*/
1536 unsigned int changed_mask
; /* changed bits mask
*/
1537 int skip_wait
; /* will we skip waiting if signaled?
*/
1539 unsigned int wake_bits
; /* current wake bits
*/
1540 unsigned int changed_bits
; /* current changed bits
*/
1544 /* Get the current message queue status
*/
1545 @
REQ(get_queue_status
)
1546 int clear
; /* should we clear the change bits?
*/
1548 unsigned int wake_bits
; /* wake bits
*/
1549 unsigned int changed_bits
; /* changed bits since last time
*/
1553 /* Wait for a process to start waiting on input
*/
1554 @
REQ(wait_input_idle
)
1555 obj_handle_t handle
; /* process handle
*/
1556 int timeout
; /* timeout
*/
1558 obj_handle_t event
; /* handle to idle event
*/
1562 /* Send a message to a thread queue
*/
1564 thread_id_t id
; /* thread id
*/
1565 int type
; /* message
type (see below
) */
1566 int flags
; /* message
flags (see below
) */
1567 user_handle_t win
; /* window handle
*/
1568 unsigned int msg
; /* message code
*/
1569 unsigned int wparam
; /* parameters
*/
1570 unsigned int lparam
; /* parameters
*/
1571 int x
; /* x position
*/
1572 int y
; /* y position
*/
1573 unsigned int time
; /* message time
*/
1574 unsigned int info
; /* extra info
*/
1575 int timeout
; /* timeout for reply
*/
1576 void
* callback
; /* callback address
*/
1577 VARARG(data
,bytes
); /* message data for sent messages
*/
1580 @
REQ(post_quit_message
)
1581 int exit_code
; /* exit code to return
*/
1586 MSG_ASCII
, /* Ascii
message (from SendMessageA
) */
1587 MSG_UNICODE
, /* Unicode
message (from SendMessageW
) */
1588 MSG_NOTIFY
, /* notify
message (from SendNotifyMessageW
), always Unicode
*/
1589 MSG_CALLBACK
, /* callback
message (from SendMessageCallbackW
), always Unicode
*/
1590 MSG_CALLBACK_RESULT
,/* result of a callback message
*/
1591 MSG_OTHER_PROCESS
, /* sent from other process
, may include vararg data
, always Unicode
*/
1592 MSG_POSTED
, /* posted
message (from PostMessageW
), always Unicode
*/
1593 MSG_HARDWARE
, /* hardware message
*/
1594 MSG_WINEVENT
/* winevent message
*/
1596 #define SEND_MSG_ABORT_IF_HUNG
0x01
1599 /* Get a message from the current queue
*/
1601 int flags
; /* see below
*/
1602 user_handle_t get_win
; /* window handle to get
*/
1603 unsigned int get_first
; /* first message code to get
*/
1604 unsigned int get_last
; /* last message code to get
*/
1605 unsigned int hw_id
; /* id of the previous hardware
message (or
0) */
1607 int type
; /* message type
*/
1608 user_handle_t win
; /* window handle
*/
1609 unsigned int msg
; /* message code
*/
1610 unsigned int wparam
; /* parameters (callback function for MSG_CALLBACK_RESULT
) */
1611 unsigned int lparam
; /* parameters (result for MSG_CALLBACK_RESULT
) */
1612 int x
; /* x position
*/
1613 int y
; /* y position
*/
1614 user_handle_t hook
; /* winevent hook handle
*/
1615 void
* hook_proc
; /* winevent hook proc address
*/
1616 unsigned int time
; /* message time
*/
1617 unsigned int info
; /* extra
info (callback argument for MSG_CALLBACK_RESULT
) */
1618 unsigned int hw_id
; /* id if hardware message
*/
1619 unsigned int active_hooks
; /* active hooks bitmap
*/
1620 size_t total
; /* total size of extra data
*/
1621 VARARG(data
,bytes
); /* message data for sent messages
*/
1623 #define GET_MSG_REMOVE
1 /* remove the message
*/
1624 #define GET_MSG_SENT_ONLY
2 /* only get sent messages
*/
1626 /* Reply to a sent message
*/
1628 unsigned int result
; /* message result
*/
1629 int remove
; /* should we remove the message?
*/
1630 VARARG(data
,bytes
); /* message data for sent messages
*/
1634 /* Accept the current hardware message
*/
1635 @
REQ(accept_hardware_message
)
1636 unsigned int hw_id
; /* id of the hardware message
*/
1637 int remove
; /* should we remove the message?
*/
1638 user_handle_t new_win
; /* new destination window for current message
*/
1642 /* Retrieve the reply for the last message sent
*/
1643 @
REQ(get_message_reply
)
1644 int cancel
; /* cancel message if not ready?
*/
1646 unsigned int result
; /* message result
*/
1647 VARARG(data
,bytes
); /* message data for sent messages
*/
1651 /* Set a window timer
*/
1653 user_handle_t win
; /* window handle
*/
1654 unsigned int msg
; /* message to post
*/
1655 unsigned int id
; /* timer id
*/
1656 unsigned int rate
; /* timer rate in ms
*/
1657 unsigned int lparam
; /* message
lparam (callback proc
) */
1659 unsigned int id
; /* timer id
*/
1663 /* Kill a window timer
*/
1664 @
REQ(kill_win_timer
)
1665 user_handle_t win
; /* window handle
*/
1666 unsigned int msg
; /* message to post
*/
1667 unsigned int id
; /* timer id
*/
1671 /* Retrieve info about a serial port
*/
1672 @
REQ(get_serial_info
)
1673 obj_handle_t handle
; /* handle to comm port
*/
1675 unsigned int readinterval
;
1676 unsigned int readconst
;
1677 unsigned int readmult
;
1678 unsigned int writeconst
;
1679 unsigned int writemult
;
1680 unsigned int eventmask
;
1684 /* Set info about a serial port
*/
1685 @
REQ(set_serial_info
)
1686 obj_handle_t handle
; /* handle to comm port
*/
1687 int flags
; /* bitmask to set
values (see below
) */
1688 unsigned int readinterval
;
1689 unsigned int readconst
;
1690 unsigned int readmult
;
1691 unsigned int writeconst
;
1692 unsigned int writemult
;
1693 unsigned int eventmask
;
1695 #define SERIALINFO_SET_TIMEOUTS
0x01
1696 #define SERIALINFO_SET_MASK
0x02
1699 /* Create an async I
/O
*/
1700 @
REQ(register_async
)
1701 obj_handle_t handle
; /* handle to comm port
, socket or file
*/
1702 int type
; /* type of queue to look after
*/
1703 void
* io_apc
; /* APC routine to queue upon end of async
*/
1704 void
* io_sb
; /* I
/O status
block (unique across all async on this handle
) */
1705 void
* io_user
; /* data to pass back to caller
*/
1706 int count
; /* count
- usually # of bytes to be read
/written
*/
1708 #define ASYNC_TYPE_READ
0x01
1709 #define ASYNC_TYPE_WRITE
0x02
1710 #define ASYNC_TYPE_WAIT
0x03
1713 /* Cancel all async op on a fd
*/
1715 obj_handle_t handle
; /* handle to comm port
, socket or file
*/
1719 /* Create a named pipe
*/
1720 @
REQ(create_named_pipe
)
1721 unsigned int access
;
1722 unsigned int attributes
; /* object attributes
*/
1723 obj_handle_t rootdir
; /* root directory
*/
1724 unsigned int options
;
1726 unsigned int maxinstances
;
1727 unsigned int outsize
;
1728 unsigned int insize
;
1729 unsigned int timeout
;
1730 VARARG(name
,unicode_str
); /* pipe name
*/
1732 obj_handle_t handle
; /* handle to the pipe
*/
1735 /* flags in create_named_pipe and get_named_pipe_info
*/
1736 #define NAMED_PIPE_MESSAGE_STREAM_WRITE
0x0001
1737 #define NAMED_PIPE_MESSAGE_STREAM_READ
0x0002
1738 #define NAMED_PIPE_NONBLOCKING_MODE
0x0004
1739 #define NAMED_PIPE_SERVER_END
0x8000
1741 /* Open an existing named pipe
*/
1742 @
REQ(open_named_pipe
)
1743 unsigned int access
;
1744 unsigned int attributes
; /* object attributes
*/
1745 obj_handle_t rootdir
; /* root directory
*/
1746 unsigned int flags
; /* file flags
*/
1747 VARARG(name
,unicode_str
); /* pipe name
*/
1749 obj_handle_t handle
; /* handle to the pipe
*/
1753 /* Connect to a named pipe
*/
1754 @
REQ(connect_named_pipe
)
1755 obj_handle_t handle
;
1761 /* Wait for a named pipe
*/
1762 @
REQ(wait_named_pipe
)
1763 obj_handle_t handle
;
1764 unsigned int timeout
;
1767 VARARG(name
,unicode_str
); /* pipe name
*/
1771 /* Disconnect a named pipe
*/
1772 @
REQ(disconnect_named_pipe
)
1773 obj_handle_t handle
;
1775 int fd
; /* associated fd to close
*/
1779 @
REQ(get_named_pipe_info
)
1780 obj_handle_t handle
;
1783 unsigned int maxinstances
;
1784 unsigned int instances
;
1785 unsigned int outsize
;
1786 unsigned int insize
;
1790 /* Create a window
*/
1792 user_handle_t parent
; /* parent window
*/
1793 user_handle_t owner
; /* owner window
*/
1794 atom_t atom
; /* class atom
*/
1795 void
* instance
; /* module instance
*/
1797 user_handle_t handle
; /* created window
*/
1798 user_handle_t parent
; /* full handle of parent
*/
1799 user_handle_t owner
; /* full handle of owner
*/
1800 int extra
; /* number of extra bytes
*/
1801 void
* class_ptr
; /* pointer to class in client address space
*/
1805 /* Destroy a window
*/
1806 @
REQ(destroy_window
)
1807 user_handle_t handle
; /* handle to the window
*/
1811 /* Retrieve the desktop window for the current thread
*/
1812 @
REQ(get_desktop_window
)
1813 int force
; /* force creation if it doesn
't exist */
1815 user_handle_t handle; /* handle to the desktop window */
1819 /* Set a window owner */
1820 @REQ(set_window_owner)
1821 user_handle_t handle; /* handle to the window */
1822 user_handle_t owner; /* new owner */
1824 user_handle_t full_owner; /* full handle of new owner */
1825 user_handle_t prev_owner; /* full handle of previous owner */
1829 /* Get information from a window handle */
1830 @REQ(get_window_info)
1831 user_handle_t handle; /* handle to the window */
1833 user_handle_t full_handle; /* full 32-bit handle */
1834 user_handle_t last_active; /* last active popup */
1835 process_id_t pid; /* process owning the window */
1836 thread_id_t tid; /* thread owning the window */
1837 atom_t atom; /* class atom */
1838 int is_unicode; /* ANSI or unicode */
1842 /* Set some information in a window */
1843 @REQ(set_window_info)
1844 user_handle_t handle; /* handle to the window */
1845 unsigned int flags; /* flags for fields to set (see below) */
1846 unsigned int style; /* window style */
1847 unsigned int ex_style; /* window extended style */
1848 unsigned int id; /* window id */
1849 void* instance; /* creator instance */
1850 int is_unicode; /* ANSI or unicode */
1851 void* user_data; /* user-specific data */
1852 int extra_offset; /* offset to set in extra bytes */
1853 size_t extra_size; /* size to set in extra bytes */
1854 unsigned int extra_value; /* value to set in extra bytes */
1856 unsigned int old_style; /* old window style */
1857 unsigned int old_ex_style; /* old window extended style */
1858 unsigned int old_id; /* old window id */
1859 void* old_instance; /* old creator instance */
1860 void* old_user_data; /* old user-specific data */
1861 unsigned int old_extra_value; /* old value in extra bytes */
1863 #define SET_WIN_STYLE 0x01
1864 #define SET_WIN_EXSTYLE 0x02
1865 #define SET_WIN_ID 0x04
1866 #define SET_WIN_INSTANCE 0x08
1867 #define SET_WIN_USERDATA 0x10
1868 #define SET_WIN_EXTRA 0x20
1869 #define SET_WIN_UNICODE 0x40
1872 /* Set the parent of a window */
1874 user_handle_t handle; /* handle to the window */
1875 user_handle_t parent; /* handle to the parent */
1877 user_handle_t old_parent; /* old parent window */
1878 user_handle_t full_parent; /* full handle of new parent */
1882 /* Get a list of the window parents, up to the root of the tree */
1883 @REQ(get_window_parents)
1884 user_handle_t handle; /* handle to the window */
1886 int count; /* total count of parents */
1887 VARARG(parents,user_handles); /* parent handles */
1891 /* Get a list of the window children */
1892 @REQ(get_window_children)
1893 user_handle_t parent; /* parent window */
1894 atom_t atom; /* class atom for the listed children */
1895 thread_id_t tid; /* thread owning the listed children */
1897 int count; /* total count of children */
1898 VARARG(children,user_handles); /* children handles */
1902 /* Get a list of the window children that contain a given point */
1903 @REQ(get_window_children_from_point)
1904 user_handle_t parent; /* parent window */
1905 int x; /* point in parent coordinates */
1908 int count; /* total count of children */
1909 VARARG(children,user_handles); /* children handles */
1913 /* Get window tree information from a window handle */
1914 @REQ(get_window_tree)
1915 user_handle_t handle; /* handle to the window */
1917 user_handle_t parent; /* parent window */
1918 user_handle_t owner; /* owner window */
1919 user_handle_t next_sibling; /* next sibling in Z-order */
1920 user_handle_t prev_sibling; /* prev sibling in Z-order */
1921 user_handle_t first_sibling; /* first sibling in Z-order */
1922 user_handle_t last_sibling; /* last sibling in Z-order */
1923 user_handle_t first_child; /* first child */
1924 user_handle_t last_child; /* last child */
1927 /* Set the position and Z order of a window */
1928 @REQ(set_window_pos)
1929 user_handle_t handle; /* handle to the window */
1930 user_handle_t previous; /* previous window in Z order */
1931 unsigned int flags; /* SWP_* flags */
1932 rectangle_t window; /* window rectangle */
1933 rectangle_t client; /* client rectangle */
1934 VARARG(valid,rectangles); /* valid rectangles from WM_NCCALCSIZE */
1936 unsigned int new_style; /* new window style */
1940 /* Get the window and client rectangles of a window */
1941 @REQ(get_window_rectangles)
1942 user_handle_t handle; /* handle to the window */
1944 rectangle_t window; /* window rectangle */
1945 rectangle_t visible; /* visible part of the window rectangle */
1946 rectangle_t client; /* client rectangle */
1950 /* Get the window text */
1951 @REQ(get_window_text)
1952 user_handle_t handle; /* handle to the window */
1954 VARARG(text,unicode_str); /* window text */
1958 /* Set the window text */
1959 @REQ(set_window_text)
1960 user_handle_t handle; /* handle to the window */
1961 VARARG(text,unicode_str); /* window text */
1965 /* Get the coordinates offset between two windows */
1966 @REQ(get_windows_offset)
1967 user_handle_t from; /* handle to the first window */
1968 user_handle_t to; /* handle to the second window */
1970 int x; /* x coordinate offset */
1971 int y; /* y coordinate offset */
1975 /* Get the visible region of a window */
1976 @REQ(get_visible_region)
1977 user_handle_t window; /* handle to the window */
1978 unsigned int flags; /* DCX flags */
1980 user_handle_t top_win; /* top window to clip against */
1981 int top_org_x; /* top window visible rect origin in screen coords */
1983 int win_org_x; /* window rect origin in screen coords */
1985 size_t total_size; /* total size of the resulting region */
1986 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
1990 /* Get the window region */
1991 @REQ(get_window_region)
1992 user_handle_t window; /* handle to the window */
1994 size_t total_size; /* total size of the resulting region */
1995 VARARG(region,rectangles); /* list of rectangles for the region */
1999 /* Set the window region */
2000 @REQ(set_window_region)
2001 user_handle_t window; /* handle to the window */
2002 VARARG(region,rectangles); /* list of rectangles for the region */
2006 /* Get the window update region */
2007 @REQ(get_update_region)
2008 user_handle_t window; /* handle to the window */
2009 user_handle_t from_child; /* child to start searching from */
2010 unsigned int flags; /* update flags (see below) */
2012 user_handle_t child; /* child to repaint (or window itself) */
2013 unsigned int flags; /* resulting update flags (see below) */
2014 size_t total_size; /* total size of the resulting region */
2015 VARARG(region,rectangles); /* list of rectangles for the region */
2017 #define UPDATE_NONCLIENT 0x01 /* get region for repainting non-client area */
2018 #define UPDATE_ERASE 0x02 /* get region for erasing client area */
2019 #define UPDATE_PAINT 0x04 /* get region for painting client area */
2020 #define UPDATE_INTERNALPAINT 0x08 /* get region if internal paint is pending */
2021 #define UPDATE_ALLCHILDREN 0x10 /* force repaint of all children */
2022 #define UPDATE_NOCHILDREN 0x20 /* don't try to repaint any children
*/
2023 #define UPDATE_NOREGION
0x40 /* don
't return a region, only the flags */
2026 /* Update the z order of a window so that a given rectangle is fully visible */
2027 @REQ(update_window_zorder)
2028 user_handle_t window; /* handle to the window */
2029 rectangle_t rect; /* rectangle that must be visible */
2033 /* Mark parts of a window as needing a redraw */
2035 user_handle_t window; /* handle to the window */
2036 unsigned int flags; /* RDW_* flags */
2037 VARARG(region,rectangles); /* list of rectangles for the region */
2041 /* Set a window property */
2042 @REQ(set_window_property)
2043 user_handle_t window; /* handle to the window */
2044 atom_t atom; /* property atom (if no name specified) */
2045 obj_handle_t handle; /* handle to store */
2046 VARARG(name,unicode_str); /* property name */
2050 /* Remove a window property */
2051 @REQ(remove_window_property)
2052 user_handle_t window; /* handle to the window */
2053 atom_t atom; /* property atom (if no name specified) */
2054 VARARG(name,unicode_str); /* property name */
2056 obj_handle_t handle; /* handle stored in property */
2060 /* Get a window property */
2061 @REQ(get_window_property)
2062 user_handle_t window; /* handle to the window */
2063 atom_t atom; /* property atom (if no name specified) */
2064 VARARG(name,unicode_str); /* property name */
2066 obj_handle_t handle; /* handle stored in property */
2070 /* Get the list of properties of a window */
2071 @REQ(get_window_properties)
2072 user_handle_t window; /* handle to the window */
2074 int total; /* total number of properties */
2075 VARARG(props,properties); /* list of properties */
2079 /* Create a window station */
2080 @REQ(create_winstation)
2081 unsigned int flags; /* window station flags */
2082 unsigned int access; /* wanted access rights */
2083 unsigned int attributes; /* object attributes */
2084 VARARG(name,unicode_str); /* object name */
2086 obj_handle_t handle; /* handle to the window station */
2090 /* Open a handle to a window station */
2091 @REQ(open_winstation)
2092 unsigned int access; /* wanted access rights */
2093 unsigned int attributes; /* object attributes */
2094 VARARG(name,unicode_str); /* object name */
2096 obj_handle_t handle; /* handle to the window station */
2100 /* Close a window station */
2101 @REQ(close_winstation)
2102 obj_handle_t handle; /* handle to the window station */
2106 /* Get the process current window station */
2107 @REQ(get_process_winstation)
2109 obj_handle_t handle; /* handle to the window station */
2113 /* Set the process current window station */
2114 @REQ(set_process_winstation)
2115 obj_handle_t handle; /* handle to the window station */
2119 /* Create a desktop */
2120 @REQ(create_desktop)
2121 unsigned int flags; /* desktop flags */
2122 unsigned int access; /* wanted access rights */
2123 unsigned int attributes; /* object attributes */
2124 VARARG(name,unicode_str); /* object name */
2126 obj_handle_t handle; /* handle to the desktop */
2130 /* Open a handle to a desktop */
2132 unsigned int flags; /* desktop flags */
2133 unsigned int access; /* wanted access rights */
2134 unsigned int attributes; /* object attributes */
2135 VARARG(name,unicode_str); /* object name */
2137 obj_handle_t handle; /* handle to the desktop */
2141 /* Close a desktop */
2143 obj_handle_t handle; /* handle to the desktop */
2147 /* Get the thread current desktop */
2148 @REQ(get_thread_desktop)
2149 thread_id_t tid; /* thread id */
2151 obj_handle_t handle; /* handle to the desktop */
2155 /* Set the thread current desktop */
2156 @REQ(set_thread_desktop)
2157 obj_handle_t handle; /* handle to the desktop */
2161 /* Get/set information about a user object (window station or desktop) */
2162 @REQ(set_user_object_info)
2163 obj_handle_t handle; /* handle to the object */
2164 unsigned int flags; /* information to set */
2165 unsigned int obj_flags; /* new object flags */
2167 int is_desktop; /* is object a desktop? */
2168 unsigned int old_obj_flags; /* old object flags */
2169 VARARG(name,unicode_str); /* object name */
2171 #define SET_USER_OBJECT_FLAGS 1
2174 /* Attach (or detach) thread inputs */
2175 @REQ(attach_thread_input)
2176 thread_id_t tid_from; /* thread to be attached */
2177 thread_id_t tid_to; /* thread to which tid_from should be attached */
2178 int attach; /* is it an attach? */
2182 /* Get input data for a given thread */
2183 @REQ(get_thread_input)
2184 thread_id_t tid; /* id of thread */
2186 user_handle_t focus; /* handle to the focus window */
2187 user_handle_t capture; /* handle to the capture window */
2188 user_handle_t active; /* handle to the active window */
2189 user_handle_t foreground; /* handle to the global foreground window */
2190 user_handle_t menu_owner; /* handle to the menu owner */
2191 user_handle_t move_size; /* handle to the moving/resizing window */
2192 user_handle_t caret; /* handle to the caret window */
2193 rectangle_t rect; /* caret rectangle */
2197 /* Get the time of the last input event */
2198 @REQ(get_last_input_time)
2204 /* Retrieve queue keyboard state for a given thread */
2206 thread_id_t tid; /* id of thread */
2207 int key; /* optional key code or -1 */
2209 unsigned char state; /* state of specified key */
2210 VARARG(keystate,bytes); /* state array for all the keys */
2213 /* Set queue keyboard state for a given thread */
2215 thread_id_t tid; /* id of thread */
2216 VARARG(keystate,bytes); /* state array for all the keys */
2219 /* Set the system foreground window */
2220 @REQ(set_foreground_window)
2221 user_handle_t handle; /* handle to the foreground window */
2223 user_handle_t previous; /* handle to the previous foreground window */
2224 int send_msg_old; /* whether we have to send a msg to the old window */
2225 int send_msg_new; /* whether we have to send a msg to the new window */
2228 /* Set the current thread focus window */
2229 @REQ(set_focus_window)
2230 user_handle_t handle; /* handle to the focus window */
2232 user_handle_t previous; /* handle to the previous focus window */
2235 /* Set the current thread active window */
2236 @REQ(set_active_window)
2237 user_handle_t handle; /* handle to the active window */
2239 user_handle_t previous; /* handle to the previous active window */
2242 /* Set the current thread capture window */
2243 @REQ(set_capture_window)
2244 user_handle_t handle; /* handle to the capture window */
2245 unsigned int flags; /* capture flags (see below) */
2247 user_handle_t previous; /* handle to the previous capture window */
2248 user_handle_t full_handle; /* full 32-bit handle of new capture window */
2250 #define CAPTURE_MENU 0x01 /* capture is for a menu */
2251 #define CAPTURE_MOVESIZE 0x02 /* capture is for moving/resizing */
2254 /* Set the current thread caret window */
2255 @REQ(set_caret_window)
2256 user_handle_t handle; /* handle to the caret window */
2257 int width; /* caret width */
2258 int height; /* caret height */
2260 user_handle_t previous; /* handle to the previous caret window */
2261 rectangle_t old_rect; /* previous caret rectangle */
2262 int old_hide; /* previous hide count */
2263 int old_state; /* previous caret state (1=on, 0=off) */
2267 /* Set the current thread caret information */
2268 @REQ(set_caret_info)
2269 unsigned int flags; /* caret flags (see below) */
2270 user_handle_t handle; /* handle to the caret window */
2271 int x; /* caret x position */
2272 int y; /* caret y position */
2273 int hide; /* increment for hide count (can be negative to show it) */
2274 int state; /* caret state (1=on, 0=off, -1=toggle current state) */
2276 user_handle_t full_handle; /* handle to the current caret window */
2277 rectangle_t old_rect; /* previous caret rectangle */
2278 int old_hide; /* previous hide count */
2279 int old_state; /* previous caret state (1=on, 0=off) */
2281 #define SET_CARET_POS 0x01 /* set the caret position from x,y */
2282 #define SET_CARET_HIDE 0x02 /* increment the caret hide count */
2283 #define SET_CARET_STATE 0x04 /* set the caret on/off state */
2286 /* Set a window hook */
2288 int id; /* id of the hook */
2289 process_id_t pid; /* id of process to set the hook into */
2290 thread_id_t tid; /* id of thread to set the hook into */
2294 void* proc; /* hook procedure */
2295 int unicode; /* is it a unicode hook? */
2296 VARARG(module,unicode_str); /* module name */
2298 user_handle_t handle; /* handle to the hook */
2299 unsigned int active_hooks; /* active hooks bitmap */
2303 /* Remove a window hook */
2305 user_handle_t handle; /* handle to the hook */
2306 int id; /* id of the hook if handle is 0 */
2307 void* proc; /* hook procedure if handle is 0 */
2309 unsigned int active_hooks; /* active hooks bitmap */
2313 /* Start calling a hook chain */
2314 @REQ(start_hook_chain)
2315 int id; /* id of the hook */
2316 int event; /* signalled event */
2317 user_handle_t window; /* handle to the event window */
2318 int object_id; /* object id for out of context winevent */
2319 int child_id; /* child id for out of context winevent */
2321 user_handle_t handle; /* handle to the next hook */
2322 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2323 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2324 void* proc; /* hook procedure */
2325 int unicode; /* is it a unicode hook? */
2326 unsigned int active_hooks; /* active hooks bitmap */
2327 VARARG(module,unicode_str); /* module name */
2331 /* Finished calling a hook chain */
2332 @REQ(finish_hook_chain)
2333 int id; /* id of the hook */
2337 /* Get the next hook to call */
2339 user_handle_t handle; /* handle to the current hook */
2340 int event; /* signalled event */
2341 user_handle_t window; /* handle to the event window */
2342 int object_id; /* object id for out of context winevent */
2343 int child_id; /* child id for out of context winevent */
2345 user_handle_t next; /* handle to the next hook */
2346 int id; /* id of the next hook */
2347 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2348 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2349 void* proc; /* next hook procedure */
2350 int prev_unicode; /* was the previous a unicode hook? */
2351 int next_unicode; /* is the next a unicode hook? */
2352 VARARG(module,unicode_str); /* module name */
2356 /* Create a window class */
2358 int local; /* is it a local class? */
2359 atom_t atom; /* class atom */
2360 unsigned int style; /* class style */
2361 void* instance; /* module instance */
2362 int extra; /* number of extra class bytes */
2363 int win_extra; /* number of window extra bytes */
2364 void* client_ptr; /* pointer to class in client address space */
2368 /* Destroy a window class */
2370 atom_t atom; /* class atom */
2371 void* instance; /* module instance */
2373 void* client_ptr; /* pointer to class in client address space */
2377 /* Set some information in a class */
2378 @REQ(set_class_info)
2379 user_handle_t window; /* handle to the window */
2380 unsigned int flags; /* flags for info to set (see below) */
2381 atom_t atom; /* class atom */
2382 unsigned int style; /* class style */
2383 int win_extra; /* number of window extra bytes */
2384 void* instance; /* module instance */
2385 int extra_offset; /* offset to set in extra bytes */
2386 size_t extra_size; /* size to set in extra bytes */
2387 unsigned int extra_value; /* value to set in extra bytes */
2389 atom_t old_atom; /* previous class atom */
2390 unsigned int old_style; /* previous class style */
2391 int old_extra; /* previous number of class extra bytes */
2392 int old_win_extra; /* previous number of window extra bytes */
2393 void* old_instance; /* previous module instance */
2394 unsigned int old_extra_value; /* old value in extra bytes */
2396 #define SET_CLASS_ATOM 0x0001
2397 #define SET_CLASS_STYLE 0x0002
2398 #define SET_CLASS_WINEXTRA 0x0004
2399 #define SET_CLASS_INSTANCE 0x0008
2400 #define SET_CLASS_EXTRA 0x0010
2403 /* Set/get clipboard information */
2404 @REQ(set_clipboard_info)
2405 unsigned int flags; /* flags for fields to set (see below) */
2406 user_handle_t clipboard; /* clipboard window */
2407 user_handle_t owner; /* clipboard owner */
2408 user_handle_t viewer; /* first clipboard viewer */
2409 unsigned int seqno; /* change sequence number */
2411 unsigned int flags; /* status flags (see below) */
2412 user_handle_t old_clipboard; /* old clipboard window */
2413 user_handle_t old_owner; /* old clipboard owner */
2414 user_handle_t old_viewer; /* old clipboard viewer */
2415 unsigned int seqno; /* current sequence number */
2418 #define SET_CB_OPEN 0x001
2419 #define SET_CB_OWNER 0x002
2420 #define SET_CB_VIEWER 0x004
2421 #define SET_CB_SEQNO 0x008
2422 #define SET_CB_RELOWNER 0x010
2423 #define SET_CB_CLOSE 0x020
2424 #define CB_OPEN 0x040
2425 #define CB_OWNER 0x080
2426 #define CB_PROCESS 0x100
2429 /* Open a security token */
2431 obj_handle_t handle; /* handle to the thread or process */
2432 unsigned int access; /* access rights to the new token */
2433 unsigned int attributes;/* object attributes */
2434 unsigned int flags; /* flags (see below) */
2436 obj_handle_t token; /* handle to the token */
2438 #define OPEN_TOKEN_THREAD 1
2439 #define OPEN_TOKEN_AS_SELF 2
2442 /* Set/get the global windows */
2443 @REQ(set_global_windows)
2444 unsigned int flags; /* flags for fields to set (see below) */
2445 user_handle_t shell_window; /* handle to the new shell window */
2446 user_handle_t shell_listview; /* handle to the new shell listview window */
2447 user_handle_t progman_window; /* handle to the new program manager window */
2448 user_handle_t taskman_window; /* handle to the new task manager window */
2450 user_handle_t old_shell_window; /* handle to the shell window */
2451 user_handle_t old_shell_listview; /* handle to the shell listview window */
2452 user_handle_t old_progman_window; /* handle to the new program manager window */
2453 user_handle_t old_taskman_window; /* handle to the new task manager window */
2455 #define SET_GLOBAL_SHELL_WINDOWS 0x01 /* set both main shell and listview windows */
2456 #define SET_GLOBAL_PROGMAN_WINDOW 0x02
2457 #define SET_GLOBAL_TASKMAN_WINDOW 0x04
2459 /* Adjust the privileges held by a token */
2460 @REQ(adjust_token_privileges)
2461 obj_handle_t handle; /* handle to the token */
2462 int disable_all; /* disable all privileges? */
2463 int get_modified_state; /* get modified privileges? */
2464 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to enable/disable/remove */
2466 unsigned int len; /* total length in bytes required to store token privileges */
2467 VARARG(privileges,LUID_AND_ATTRIBUTES); /* modified privileges */
2470 /* Retrieves the set of privileges held by or available to a token */
2471 @REQ(get_token_privileges)
2472 obj_handle_t handle; /* handle to the token */
2474 unsigned int len; /* total length in bytes required to store token privileges */
2475 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
2478 /* Check the token has the required privileges */
2479 @REQ(check_token_privileges)
2480 obj_handle_t handle; /* handle to the token */
2481 int all_required; /* are all the privileges required for the check to succeed? */
2482 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to check */
2484 int has_privileges; /* does the token have the required privileges? */
2485 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
2488 @REQ(duplicate_token)
2489 obj_handle_t handle; /* handle to the token to duplicate */
2490 unsigned int access; /* access rights to the new token */
2491 unsigned int attributes; /* object attributes */
2492 int primary; /* is the new token to be a primary one? */
2493 int impersonation_level; /* impersonation level of the new token */
2495 obj_handle_t new_handle; /* duplicated handle */
2499 obj_handle_t handle; /* handle to the token */
2500 unsigned int desired_access; /* desired access to the object */
2501 unsigned int mapping_read; /* mapping from generic read to specific rights */
2502 unsigned int mapping_write; /* mapping from generic write to specific rights */
2503 unsigned int mapping_execute; /* mapping from generic execute to specific rights */
2504 unsigned int mapping_all; /* mapping from generic all to specific rights */
2505 VARARG(sd,security_descriptor); /* security descriptor to check */
2507 unsigned int access_granted; /* access rights actually granted */
2508 unsigned int access_status; /* was access granted? */
2509 unsigned int privileges_len; /* length needed to store privileges */
2510 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges used during access check */
2513 @REQ(get_token_user)
2514 obj_handle_t handle; /* handle to the token */
2516 size_t user_len; /* length needed to store user */
2517 VARARG(user,SID); /* sid of the user the token represents */
2520 @REQ(get_token_groups)
2521 obj_handle_t handle; /* handle to the token */
2523 size_t user_len; /* length needed to store user */
2524 VARARG(user,token_groups); /* groups the token's user belongs to
*/
2527 /* Create a mailslot
*/
2528 @
REQ(create_mailslot
)
2529 unsigned int access
; /* wanted access rights
*/
2530 unsigned int attributes
; /* object attributes
*/
2531 obj_handle_t rootdir
; /* root directory
*/
2532 unsigned int max_msgsize
;
2534 VARARG(name
,unicode_str
); /* mailslot name
*/
2536 obj_handle_t handle
; /* handle to the mailslot
*/
2540 /* Open an existing mailslot
*/
2542 unsigned int access
;
2543 unsigned int attributes
; /* object attributes
*/
2544 obj_handle_t rootdir
; /* root directory
*/
2545 unsigned int sharing
; /* sharing mode
*/
2546 VARARG(name
,unicode_str
); /* mailslot name
*/
2548 obj_handle_t handle
; /* handle to the mailslot
*/
2552 /* Set mailslot information
*/
2553 @
REQ(set_mailslot_info
)
2554 obj_handle_t handle
; /* handle to the mailslot
*/
2558 unsigned int max_msgsize
;
2560 unsigned int msg_count
;
2561 unsigned int next_msgsize
;
2563 #define MAILSLOT_SET_READ_TIMEOUT
1
2566 /* Create a directory object
*/
2567 @
REQ(create_directory
)
2568 unsigned int access
; /* access flags
*/
2569 unsigned int attributes
; /* object attributes
*/
2570 obj_handle_t rootdir
; /* root directory
*/
2571 VARARG(directory_name
,unicode_str
); /* Directory name
*/
2573 obj_handle_t handle
; /* handle to the directory
*/
2577 /* Open a directory object
*/
2578 @
REQ(open_directory
)
2579 unsigned int access
; /* access flags
*/
2580 unsigned int attributes
; /* object attributes
*/
2581 obj_handle_t rootdir
; /* root directory
*/
2582 VARARG(directory_name
,unicode_str
); /* Directory name
*/
2584 obj_handle_t handle
; /* handle to the directory
*/
2588 /* Create a symbolic link object
*/
2589 @
REQ(create_symlink
)
2590 unsigned int access
; /* access flags
*/
2591 unsigned int attributes
; /* object attributes
*/
2592 obj_handle_t rootdir
; /* root directory
*/
2593 size_t name_len
; /* length of the symlink name in bytes
*/
2594 VARARG(name
,unicode_str
,name_len
); /* symlink name
*/
2595 VARARG(target_name
,unicode_str
); /* target name
*/
2597 obj_handle_t handle
; /* handle to the symlink
*/
2601 /* Open a symbolic link object
*/
2603 unsigned int access
; /* access flags
*/
2604 unsigned int attributes
; /* object attributes
*/
2605 obj_handle_t rootdir
; /* root directory
*/
2606 VARARG(name
,unicode_str
); /* symlink name
*/
2608 obj_handle_t handle
; /* handle to the symlink
*/
2612 /* Query a symbolic link object
*/
2614 obj_handle_t handle
; /* handle to the symlink
*/
2616 VARARG(target_name
,unicode_str
); /* target name
*/