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
*/
34 typedef void
*obj_handle_t
;
35 typedef void
*user_handle_t
;
36 typedef unsigned short atom_t
;
37 typedef unsigned int process_id_t
;
38 typedef unsigned int thread_id_t
;
39 typedef unsigned int data_size_t
;
43 int req
; /* request code
*/
44 data_size_t request_size
; /* request variable part size
*/
45 data_size_t reply_size
; /* reply variable part maximum size
*/
50 unsigned int error
; /* error result
*/
51 data_size_t reply_size
; /* reply variable part size
*/
54 /* placeholder structure for the maximum allowed request size
*/
55 /* this is used to construct the generic_request union
*/
56 struct request_max_size
58 int pad
[16]; /* the max request size is
16 ints
*/
61 #define FIRST_USER_HANDLE
0x0020 /* first possible value for low word of user handle
*/
62 #define LAST_USER_HANDLE
0xffef /* last possible value for low word of user handle
*/
65 /* definitions of the event data depending on the event code
*/
66 struct debug_event_exception
68 EXCEPTION_RECORD record
; /* exception record
*/
69 int first
; /* first chance exception?
*/
71 struct debug_event_create_thread
73 obj_handle_t handle
; /* handle to the new thread
*/
74 void
*teb
; /* thread
teb (in debugged process address space
) */
75 void
*start
; /* thread startup routine
*/
77 struct debug_event_create_process
79 obj_handle_t file
; /* handle to the process exe file
*/
80 obj_handle_t process
; /* handle to the new process
*/
81 obj_handle_t thread
; /* handle to the new thread
*/
82 void
*base
; /* base of executable image
*/
83 int dbg_offset
; /* offset of debug info in file
*/
84 int dbg_size
; /* size of debug info
*/
85 void
*teb
; /* thread
teb (in debugged process address space
) */
86 void
*start
; /* thread startup routine
*/
87 void
*name
; /* image
name (optional
) */
88 int unicode
; /* is it Unicode?
*/
90 struct debug_event_exit
92 int exit_code
; /* thread or process exit code
*/
94 struct debug_event_load_dll
96 obj_handle_t handle
; /* file handle for the dll
*/
97 void
*base
; /* base address of the dll
*/
98 int dbg_offset
; /* offset of debug info in file
*/
99 int dbg_size
; /* size of debug info
*/
100 void
*name
; /* image
name (optional
) */
101 int unicode
; /* is it Unicode?
*/
103 struct debug_event_unload_dll
105 void
*base
; /* base address of the dll
*/
107 struct debug_event_output_string
109 void
*string
; /* string to
display (in debugged process address space
) */
110 int unicode
; /* is it Unicode?
*/
111 int length
; /* string length
*/
113 struct debug_event_rip_info
118 union debug_event_data
120 struct debug_event_exception exception
;
121 struct debug_event_create_thread create_thread
;
122 struct debug_event_create_process create_process
;
123 struct debug_event_exit exit
;
124 struct debug_event_load_dll load_dll
;
125 struct debug_event_unload_dll unload_dll
;
126 struct debug_event_output_string output_string
;
127 struct debug_event_rip_info rip_info
;
130 /* debug event data
*/
133 int code
; /* event code
*/
134 union debug_event_data info
; /* event information
*/
137 /* structure used in sending an fd from client to server
*/
140 thread_id_t tid
; /* thread id
*/
141 int fd
; /* file descriptor on client
-side
*/
144 /* structure sent by the server on the wait fifo
*/
147 void
*cookie
; /* magic cookie that was passed in select_request
*/
148 int signaled
; /* wait result
*/
151 /* structure for absolute timeouts
*/
154 int sec
; /* seconds since Unix epoch
*/
155 int usec
; /* microseconds
*/
158 /* structure returned in the list of window properties
*/
161 atom_t atom
; /* property atom
*/
162 short string
; /* was atom a string originally?
*/
163 obj_handle_t handle
; /* handle stored in property
*/
166 /* structure to specify window rectangles
*/
175 /* structures for extra message data
*/
177 struct callback_msg_data
179 void
*callback
; /* callback function
*/
180 unsigned long data
; /* user data for callback
*/
181 unsigned long result
; /* message result
*/
184 struct winevent_msg_data
186 user_handle_t hook
; /* hook handle
*/
187 thread_id_t tid
; /* thread id
*/
188 void
*hook_proc
; /* hook proc address
*/
189 /* followed by module name if any
*/
194 unsigned char bytes
[1]; /* raw data for sent messages
*/
195 struct callback_msg_data callback
;
196 struct winevent_msg_data winevent
;
199 /* structure for console char
/attribute info
*/
206 #define MAX_ACL_LEN
65535
208 struct security_descriptor
210 unsigned int control
; /* SE_ flags
*/
211 data_size_t owner_len
;
212 data_size_t group_len
;
213 data_size_t sacl_len
;
214 data_size_t dacl_len
;
215 /* VARARGS(owner
,SID
); */
216 /* VARARGS(group
,SID
); */
217 /* VARARGS(sacl
,ACL
); */
218 /* VARARGS(dacl
,ACL
); */
224 /* unsigned int attributes
[count
]; */
225 /* VARARGS(sids
,SID
); */
228 enum apc_type
{ APC_NONE
, APC_USER
, APC_TIMER
, APC_ASYNC_IO
};
235 enum apc_type type
; /* APC_USER
*/
236 void (__stdcall
*func
)(unsigned long
,unsigned long
,unsigned long
);
237 unsigned long args
[3]; /* arguments for user function
*/
241 enum apc_type type
; /* APC_TIMER
*/
242 void (__stdcall
*func
)(void
*, unsigned int
, unsigned int
);
243 abs_time_t time
; /* absolute time of expiration
*/
244 void
*arg
; /* user argument
*/
248 enum apc_type type
; /* APC_ASYNC_IO
*/
249 void (__stdcall
*func
)(void
*, void
*, unsigned int
);
250 void
*user
; /* user pointer
*/
251 void
*sb
; /* status block
*/
252 unsigned int status
; /* I
/O status
*/
256 /****************************************************************/
257 /* Request declarations
*/
259 /* Create a new process from the context of the parent
*/
261 int inherit_all
; /* inherit all handles from parent
*/
262 unsigned int create_flags
; /* creation flags
*/
263 int socket_fd
; /* file descriptor for process socket
*/
264 obj_handle_t exe_file
; /* file handle for main exe
*/
265 obj_handle_t hstdin
; /* handle for stdin
*/
266 obj_handle_t hstdout
; /* handle for stdout
*/
267 obj_handle_t hstderr
; /* handle for stderr
*/
268 unsigned int process_access
; /* access rights for process object
*/
269 unsigned int process_attr
; /* attributes for process object
*/
270 unsigned int thread_access
; /* access rights for thread object
*/
271 unsigned int thread_attr
; /* attributes for thread object
*/
272 VARARG(info
,startup_info
); /* startup information
*/
273 VARARG(env
,unicode_str
); /* environment for new process
*/
275 obj_handle_t info
; /* new process info handle
*/
276 process_id_t pid
; /* process id
*/
277 obj_handle_t phandle
; /* process
handle (in the current process
) */
278 thread_id_t tid
; /* thread id
*/
279 obj_handle_t thandle
; /* thread
handle (in the current process
) */
283 /* Retrieve information about a newly started process
*/
284 @
REQ(get_new_process_info
)
285 obj_handle_t info
; /* info handle returned from new_process_request
*/
287 int success
; /* did the process start successfully?
*/
288 int exit_code
; /* process exit code if failed
*/
292 /* Create a new thread from the context of the parent
*/
294 unsigned int access
; /* wanted access rights
*/
295 unsigned int attributes
; /* object attributes
*/
296 int suspend
; /* new thread should be suspended on creation
*/
297 int request_fd
; /* fd for request pipe
*/
299 thread_id_t tid
; /* thread id
*/
300 obj_handle_t handle
; /* thread
handle (in the current process
) */
304 /* Retrieve the new process startup info
*/
305 @
REQ(get_startup_info
)
307 obj_handle_t exe_file
; /* file handle for main exe
*/
308 obj_handle_t hstdin
; /* handle for stdin
*/
309 obj_handle_t hstdout
; /* handle for stdout
*/
310 obj_handle_t hstderr
; /* handle for stderr
*/
311 VARARG(info
,startup_info
); /* startup information
*/
312 VARARG(env
,unicode_str
); /* environment
*/
316 /* Signal the end of the process initialization
*/
317 @
REQ(init_process_done
)
318 void
* module
; /* main module base address
*/
319 void
* entry
; /* process entry point
*/
320 int gui
; /* is it a GUI process?
*/
324 /* Initialize a thread
; called from the child after
fork()/clone() */
326 int unix_pid
; /* Unix pid of new thread
*/
327 int unix_tid
; /* Unix tid of new thread
*/
328 int debug_level
; /* new debug level
*/
329 void
* teb
; /* TEB of new
thread (in thread address space
) */
330 void
* peb
; /* address of
PEB (in thread address space
) */
331 void
* entry
; /* thread entry
point (in thread address space
) */
332 void
* ldt_copy
; /* address of LDT
copy (in thread address space
) */
333 int reply_fd
; /* fd for reply pipe
*/
334 int wait_fd
; /* fd for blocking calls pipe
*/
336 process_id_t pid
; /* process id of the new thread
's process */
337 thread_id_t tid; /* thread id of the new thread */
338 data_size_t info_size; /* total size of startup info */
339 abs_time_t server_start; /* server start time */
340 int version; /* protocol version */
344 /* Terminate a process */
345 @REQ(terminate_process)
346 obj_handle_t handle; /* process handle to terminate */
347 int exit_code; /* process exit code */
349 int self; /* suicide? */
353 /* Terminate a thread */
354 @REQ(terminate_thread)
355 obj_handle_t handle; /* thread handle to terminate */
356 int exit_code; /* thread exit code */
358 int self; /* suicide? */
359 int last; /* last thread in this process? */
363 /* Retrieve information about a process */
364 @REQ(get_process_info)
365 obj_handle_t handle; /* process handle */
367 process_id_t pid; /* server process id */
368 process_id_t ppid; /* server process id of parent */
369 int exit_code; /* process exit code */
370 int priority; /* priority class */
371 int affinity; /* process affinity mask */
372 void* peb; /* PEB address in process address space */
373 abs_time_t start_time; /* process start time */
374 abs_time_t end_time; /* process end time */
378 /* Set a process informations */
379 @REQ(set_process_info)
380 obj_handle_t handle; /* process handle */
381 int mask; /* setting mask (see below) */
382 int priority; /* priority class */
383 int affinity; /* affinity mask */
385 #define SET_PROCESS_INFO_PRIORITY 0x01
386 #define SET_PROCESS_INFO_AFFINITY 0x02
389 /* Retrieve information about a thread */
390 @REQ(get_thread_info)
391 obj_handle_t handle; /* thread handle */
392 thread_id_t tid_in; /* thread id (optional) */
394 process_id_t pid; /* server process id */
395 thread_id_t tid; /* server thread id */
396 void* teb; /* thread teb pointer */
397 int exit_code; /* thread exit code */
398 int priority; /* thread priority level */
399 int affinity; /* thread affinity mask */
400 abs_time_t creation_time; /* thread creation time */
401 abs_time_t exit_time; /* thread exit time */
402 int last; /* last thread in process */
406 /* Set a thread informations */
407 @REQ(set_thread_info)
408 obj_handle_t handle; /* thread handle */
409 int mask; /* setting mask (see below) */
410 int priority; /* priority class */
411 int affinity; /* affinity mask */
412 obj_handle_t token; /* impersonation token */
414 #define SET_THREAD_INFO_PRIORITY 0x01
415 #define SET_THREAD_INFO_AFFINITY 0x02
416 #define SET_THREAD_INFO_TOKEN 0x04
419 /* Retrieve information about a module */
421 obj_handle_t handle; /* process handle */
422 void* base_address; /* base address of module */
424 size_t size; /* module size */
426 VARARG(filename,unicode_str); /* file name of module */
430 /* Suspend a thread */
432 obj_handle_t handle; /* thread handle */
434 int count; /* new suspend count */
438 /* Resume a thread */
440 obj_handle_t handle; /* thread handle */
442 int count; /* new suspend count */
446 /* Notify the server that a dll has been loaded */
448 obj_handle_t handle; /* file handle */
449 void* base; /* base address */
450 size_t size; /* dll size */
451 int dbg_offset; /* debug info offset */
452 int dbg_size; /* debug info size */
453 void* name; /* ptr to ptr to name (in process addr space) */
454 VARARG(filename,unicode_str); /* file name of dll */
458 /* Notify the server that a dll is being unloaded */
460 void* base; /* base address */
464 /* Queue an APC for a thread */
466 obj_handle_t handle; /* thread handle */
467 apc_call_t call; /* call arguments */
471 /* Get next APC to call */
473 int alertable; /* is thread alertable? */
474 obj_handle_t prev; /* handle to previous APC */
476 obj_handle_t handle; /* handle to APC */
477 apc_call_t call; /* call arguments */
481 /* Close a handle for the current process */
483 obj_handle_t handle; /* handle to close */
487 /* Set a handle information */
488 @REQ(set_handle_info)
489 obj_handle_t handle; /* handle we are interested in */
490 int flags; /* new handle flags */
491 int mask; /* mask for flags to set */
493 int old_flags; /* old flag value */
497 /* Duplicate a handle */
499 obj_handle_t src_process; /* src process handle */
500 obj_handle_t src_handle; /* src handle to duplicate */
501 obj_handle_t dst_process; /* dst process handle */
502 unsigned int access; /* wanted access rights */
503 unsigned int attributes; /* object attributes */
504 unsigned int options; /* duplicate options (see below) */
506 obj_handle_t handle; /* duplicated handle in dst process */
507 int closed; /* whether the source handle has been closed */
509 #define DUP_HANDLE_CLOSE_SOURCE DUPLICATE_CLOSE_SOURCE
510 #define DUP_HANDLE_SAME_ACCESS DUPLICATE_SAME_ACCESS
511 #define DUP_HANDLE_MAKE_GLOBAL 0x80000000 /* Not a Windows flag */
514 /* Open a handle to a process */
516 process_id_t pid; /* process id to open */
517 unsigned int access; /* wanted access rights */
518 unsigned int attributes; /* object attributes */
520 obj_handle_t handle; /* handle to the process */
524 /* Open a handle to a thread */
526 thread_id_t tid; /* thread id to open */
527 unsigned int access; /* wanted access rights */
528 unsigned int attributes; /* object attributes */
530 obj_handle_t handle; /* handle to the thread */
534 /* Wait for handles */
536 int flags; /* wait flags (see below) */
537 void* cookie; /* magic cookie to return to client */
538 obj_handle_t signal; /* object to signal (0 if none) */
539 abs_time_t timeout; /* absolute timeout */
540 VARARG(handles,handles); /* handles to select on */
543 #define SELECT_ALERTABLE 2
544 #define SELECT_INTERRUPTIBLE 4
545 #define SELECT_TIMEOUT 8
548 /* Create an event */
550 unsigned int access; /* wanted access rights */
551 unsigned int attributes; /* object attributes */
552 obj_handle_t rootdir; /* root directory */
553 int manual_reset; /* manual reset event */
554 int initial_state; /* initial state of the event */
555 VARARG(name,unicode_str); /* object name */
557 obj_handle_t handle; /* handle to the event */
560 /* Event operation */
562 obj_handle_t handle; /* handle to event */
563 int op; /* event operation (see below) */
565 enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT };
570 unsigned int access; /* wanted access rights */
571 unsigned int attributes; /* object attributes */
572 obj_handle_t rootdir; /* root directory */
573 VARARG(name,unicode_str); /* object name */
575 obj_handle_t handle; /* handle to the event */
581 unsigned int access; /* wanted access rights */
582 unsigned int attributes; /* object attributes */
583 obj_handle_t rootdir; /* root directory */
584 int owned; /* initially owned? */
585 VARARG(name,unicode_str); /* object name */
587 obj_handle_t handle; /* handle to the mutex */
591 /* Release a mutex */
593 obj_handle_t handle; /* handle to the mutex */
595 unsigned int prev_count; /* value of internal counter, before release */
601 unsigned int access; /* wanted access rights */
602 unsigned int attributes; /* object attributes */
603 obj_handle_t rootdir; /* root directory */
604 VARARG(name,unicode_str); /* object name */
606 obj_handle_t handle; /* handle to the mutex */
610 /* Create a semaphore */
611 @REQ(create_semaphore)
612 unsigned int access; /* wanted access rights */
613 unsigned int attributes; /* object attributes */
614 obj_handle_t rootdir; /* root directory */
615 unsigned int initial; /* initial count */
616 unsigned int max; /* maximum count */
617 VARARG(name,unicode_str); /* object name */
619 obj_handle_t handle; /* handle to the semaphore */
623 /* Release a semaphore */
624 @REQ(release_semaphore)
625 obj_handle_t handle; /* handle to the semaphore */
626 unsigned int count; /* count to add to semaphore */
628 unsigned int prev_count; /* previous semaphore count */
632 /* Open a semaphore */
634 unsigned int access; /* wanted access rights */
635 unsigned int attributes; /* object attributes */
636 obj_handle_t rootdir; /* root directory */
637 VARARG(name,unicode_str); /* object name */
639 obj_handle_t handle; /* handle to the semaphore */
645 unsigned int access; /* wanted access rights */
646 unsigned int attributes; /* object attributes */
647 unsigned int sharing; /* sharing flags */
648 int create; /* file create action */
649 unsigned int options; /* file options */
650 unsigned int attrs; /* file attributes for creation */
651 VARARG(filename,string); /* file name */
653 obj_handle_t handle; /* handle to the file */
657 /* Open a file object */
658 @REQ(open_file_object)
659 unsigned int access; /* wanted access rights */
660 unsigned int attributes; /* open attributes */
661 obj_handle_t rootdir; /* root directory */
662 unsigned int sharing; /* sharing flags */
663 VARARG(filename,unicode_str); /* file name */
665 obj_handle_t handle; /* handle to the file */
669 /* Allocate a file handle for a Unix fd */
670 @REQ(alloc_file_handle)
671 unsigned int access; /* wanted access rights */
672 unsigned int attributes; /* object attributes */
673 int fd; /* file descriptor on the client side */
675 obj_handle_t handle; /* handle to the file */
679 /* Get a Unix fd to access a file */
681 obj_handle_t handle; /* handle to the file */
682 unsigned int access; /* wanted access rights */
683 int cached; /* is it cached on the client already? */
685 int type; /* file type (see below) */
686 int flags; /* file read/write flags (see below) */
690 FD_TYPE_INVALID, /* invalid file (no associated fd) */
691 FD_TYPE_FILE, /* regular file */
692 FD_TYPE_DIR, /* directory */
693 FD_TYPE_SOCKET, /* socket */
694 FD_TYPE_SERIAL, /* serial port */
695 FD_TYPE_PIPE, /* named pipe */
696 FD_TYPE_MAILSLOT, /* mailslot */
697 FD_TYPE_DEVICE, /* Windows device file */
700 #define FD_FLAG_OVERLAPPED 0x01 /* fd opened in overlapped mode */
701 #define FD_FLAG_TIMEOUT 0x02 /* read/write is synchronous */
702 #define FD_FLAG_RECV_SHUTDOWN 0x04
703 #define FD_FLAG_SEND_SHUTDOWN 0x08
704 #define FD_FLAG_AVAILABLE 0x10 /* in overlap read/write operation,
705 * only handle available data (don't wait
) */
706 #define FD_FLAG_REMOVABLE
0x20 /* is it on a removable device?
*/
708 /* Flush a file buffers
*/
710 obj_handle_t handle
; /* handle to the file
*/
712 obj_handle_t event
; /* event set when finished
*/
716 /* Lock a region of a file
*/
718 obj_handle_t handle
; /* handle to the file
*/
719 unsigned int offset_low
; /* offset of start of lock
*/
720 unsigned int offset_high
; /* offset of start of lock
*/
721 unsigned int count_low
; /* count of bytes to lock
*/
722 unsigned int count_high
; /* count of bytes to lock
*/
723 int shared
; /* shared or exclusive lock?
*/
724 int wait
; /* do we want to wait?
*/
726 obj_handle_t handle
; /* handle to wait on
*/
727 int overlapped
; /* is it an overlapped I
/O handle?
*/
731 /* Unlock a region of a file
*/
733 obj_handle_t handle
; /* handle to the file
*/
734 unsigned int offset_low
; /* offset of start of unlock
*/
735 unsigned int offset_high
; /* offset of start of unlock
*/
736 unsigned int count_low
; /* count of bytes to unlock
*/
737 unsigned int count_high
; /* count of bytes to unlock
*/
741 /* Get ready to unmount a Unix device
*/
743 obj_handle_t handle
; /* handle to a file on the device
*/
747 /* Create a socket
*/
749 unsigned int access
; /* wanted access rights
*/
750 unsigned int attributes
; /* object attributes
*/
751 int family
; /* family
, see socket manpage
*/
752 int type
; /* type
, see socket manpage
*/
753 int protocol
; /* protocol
, see socket manpage
*/
754 unsigned int flags
; /* socket flags
*/
756 obj_handle_t handle
; /* handle to the new socket
*/
760 /* Accept a socket
*/
762 obj_handle_t lhandle
; /* handle to the listening socket
*/
763 unsigned int access
; /* wanted access rights
*/
764 unsigned int attributes
; /* object attributes
*/
766 obj_handle_t handle
; /* handle to the new socket
*/
770 /* Set socket event parameters
*/
771 @
REQ(set_socket_event
)
772 obj_handle_t handle
; /* handle to the socket
*/
773 unsigned int mask
; /* event mask
*/
774 obj_handle_t event
; /* event object
*/
775 user_handle_t window
; /* window to send the message to
*/
776 unsigned int msg
; /* message to send
*/
780 /* Get socket event parameters
*/
781 @
REQ(get_socket_event
)
782 obj_handle_t handle
; /* handle to the socket
*/
783 int service
; /* clear pending?
*/
784 obj_handle_t c_event
; /* event to clear
*/
786 unsigned int mask
; /* event mask
*/
787 unsigned int pmask
; /* pending events
*/
788 unsigned int state
; /* status bits
*/
789 VARARG(errors
,ints
); /* event errors
*/
793 /* Reenable pending socket events
*/
794 @
REQ(enable_socket_event
)
795 obj_handle_t handle
; /* handle to the socket
*/
796 unsigned int mask
; /* events to re
-enable
*/
797 unsigned int sstate
; /* status bits to set
*/
798 unsigned int cstate
; /* status bits to clear
*/
801 @
REQ(set_socket_deferred
)
802 obj_handle_t handle
; /* handle to the socket
*/
803 obj_handle_t deferred
; /* handle to the socket for which
accept() is deferred
*/
806 /* Allocate a
console (only used by a console renderer
) */
808 unsigned int access
; /* wanted access rights
*/
809 unsigned int attributes
; /* object attributes
*/
810 process_id_t pid
; /* pid of process which shall be attached to the console
*/
812 obj_handle_t handle_in
; /* handle to console input
*/
813 obj_handle_t event
; /* handle to renderer events change notification
*/
817 /* Free the console of the current process
*/
822 #define CONSOLE_RENDERER_NONE_EVENT
0x00
823 #define CONSOLE_RENDERER_TITLE_EVENT
0x01
824 #define CONSOLE_RENDERER_ACTIVE_SB_EVENT
0x02
825 #define CONSOLE_RENDERER_SB_RESIZE_EVENT
0x03
826 #define CONSOLE_RENDERER_UPDATE_EVENT
0x04
827 #define CONSOLE_RENDERER_CURSOR_POS_EVENT
0x05
828 #define CONSOLE_RENDERER_CURSOR_GEOM_EVENT
0x06
829 #define CONSOLE_RENDERER_DISPLAY_EVENT
0x07
830 #define CONSOLE_RENDERER_EXIT_EVENT
0x08
831 struct console_renderer_event
866 /* retrieve console events for the renderer
*/
867 @
REQ(get_console_renderer_events
)
868 obj_handle_t handle
; /* handle to console input events
*/
870 VARARG(data
,bytes
); /* the various console_renderer_events
*/
874 /* Open a handle to the process console
*/
876 obj_handle_t from
; /* 0 (resp
1) input (resp output
) of current process console
*/
877 /* otherwise console_in handle to get active screen buffer?
*/
878 unsigned int access
; /* wanted access rights
*/
879 unsigned int attributes
; /* object attributes
*/
880 int share
; /* share
mask (only for output handles
) */
882 obj_handle_t handle
; /* handle to the console
*/
886 /* Get the input queue wait event
*/
887 @
REQ(get_console_wait_event
)
892 /* Get a console
mode (input or output
) */
893 @
REQ(get_console_mode
)
894 obj_handle_t handle
; /* handle to the console
*/
896 int mode
; /* console mode
*/
900 /* Set a console
mode (input or output
) */
901 @
REQ(set_console_mode
)
902 obj_handle_t handle
; /* handle to the console
*/
903 int mode
; /* console mode
*/
907 /* Set info about a
console (input only
) */
908 @
REQ(set_console_input_info
)
909 obj_handle_t handle
; /* handle to console input
, or
0 for process
' console */
910 int mask; /* setting mask (see below) */
911 obj_handle_t active_sb; /* active screen buffer */
912 int history_mode; /* whether we duplicate lines in history */
913 int history_size; /* number of lines in history */
914 int edition_mode; /* index to the edition mode flavors */
915 VARARG(title,unicode_str); /* console title */
917 #define SET_CONSOLE_INPUT_INFO_ACTIVE_SB 0x01
918 #define SET_CONSOLE_INPUT_INFO_TITLE 0x02
919 #define SET_CONSOLE_INPUT_INFO_HISTORY_MODE 0x04
920 #define SET_CONSOLE_INPUT_INFO_HISTORY_SIZE 0x08
921 #define SET_CONSOLE_INPUT_INFO_EDITION_MODE 0x10
924 /* Get info about a console (input only) */
925 @REQ(get_console_input_info)
926 obj_handle_t handle; /* handle to console input, or 0 for process' console
*/
928 int history_mode
; /* whether we duplicate lines in history
*/
929 int history_size
; /* number of lines in history
*/
930 int history_index
; /* number of used lines in history
*/
931 int edition_mode
; /* index to the edition mode flavors
*/
932 VARARG(title
,unicode_str
); /* console title
*/
936 /* appends a string to console
's history */
937 @REQ(append_console_input_history)
938 obj_handle_t handle; /* handle to console input, or 0 for process' console
*/
939 VARARG(line
,unicode_str
); /* line to add
*/
943 /* appends a string to console
's history */
944 @REQ(get_console_input_history)
945 obj_handle_t handle; /* handle to console input, or 0 for process' console
*/
946 int index
; /* index to get line from
*/
948 int total
; /* total length of line in Unicode chars
*/
949 VARARG(line
,unicode_str
); /* line to add
*/
953 /* creates a new screen buffer on process
' console */
954 @REQ(create_console_output)
955 obj_handle_t handle_in; /* handle to console input, or 0 for process' console
*/
956 unsigned int access
; /* wanted access rights
*/
957 unsigned int attributes
; /* object attributes
*/
958 unsigned int share
; /* sharing credentials
*/
960 obj_handle_t handle_out
; /* handle to the screen buffer
*/
964 /* Set info about a
console (output only
) */
965 @
REQ(set_console_output_info
)
966 obj_handle_t handle
; /* handle to the console
*/
967 int mask
; /* setting
mask (see below
) */
968 short int cursor_size
; /* size of
cursor (percentage filled
) */
969 short int cursor_visible
;/* cursor visibility flag
*/
970 short int cursor_x
; /* position of
cursor (x
, y
) */
972 short int width
; /* width of the screen buffer
*/
973 short int height
; /* height of the screen buffer
*/
974 short int attr
; /* default attribute
*/
975 short int win_left
; /* window actually displayed by renderer
*/
976 short int win_top
; /* the rect area is expressed withing the
*/
977 short int win_right
; /* boundaries of the screen buffer
*/
978 short int win_bottom
;
979 short int max_width
; /* maximum
size (width x height
) for the window
*/
980 short int max_height
;
982 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_GEOM
0x01
983 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_POS
0x02
984 #define SET_CONSOLE_OUTPUT_INFO_SIZE
0x04
985 #define SET_CONSOLE_OUTPUT_INFO_ATTR
0x08
986 #define SET_CONSOLE_OUTPUT_INFO_DISPLAY_WINDOW
0x10
987 #define SET_CONSOLE_OUTPUT_INFO_MAX_SIZE
0x20
990 /* Get info about a
console (output only
) */
991 @
REQ(get_console_output_info
)
992 obj_handle_t handle
; /* handle to the console
*/
994 short int cursor_size
; /* size of
cursor (percentage filled
) */
995 short int cursor_visible
;/* cursor visibility flag
*/
996 short int cursor_x
; /* position of
cursor (x
, y
) */
998 short int width
; /* width of the screen buffer
*/
999 short int height
; /* height of the screen buffer
*/
1000 short int attr
; /* default attribute
*/
1001 short int win_left
; /* window actually displayed by renderer
*/
1002 short int win_top
; /* the rect area is expressed withing the
*/
1003 short int win_right
; /* boundaries of the screen buffer
*/
1004 short int win_bottom
;
1005 short int max_width
; /* maximum
size (width x height
) for the window
*/
1006 short int max_height
;
1009 /* Add input records to a console input queue
*/
1010 @
REQ(write_console_input
)
1011 obj_handle_t handle
; /* handle to the console input
*/
1012 VARARG(rec
,input_records
); /* input records
*/
1014 int written
; /* number of records written
*/
1018 /* Fetch input records from a console input queue
*/
1019 @
REQ(read_console_input
)
1020 obj_handle_t handle
; /* handle to the console input
*/
1021 int flush
; /* flush the retrieved records from the queue?
*/
1023 int read
; /* number of records read
*/
1024 VARARG(rec
,input_records
); /* input records
*/
1028 /* write
data (chars and
/or attributes
) in a screen buffer
*/
1029 @
REQ(write_console_output
)
1030 obj_handle_t handle
; /* handle to the console output
*/
1031 int x
; /* position where to start writing
*/
1033 int mode
; /* char
info (see below
) */
1034 int wrap
; /* wrap around at end of line?
*/
1035 VARARG(data
,bytes
); /* info to write
*/
1037 int written
; /* number of char infos actually written
*/
1038 int width
; /* width of screen buffer
*/
1039 int height
; /* height of screen buffer
*/
1043 CHAR_INFO_MODE_TEXT
, /* characters only
*/
1044 CHAR_INFO_MODE_ATTR
, /* attributes only
*/
1045 CHAR_INFO_MODE_TEXTATTR
, /* both characters and attributes
*/
1046 CHAR_INFO_MODE_TEXTSTDATTR
/* characters but use standard attributes
*/
1050 /* fill a screen buffer with constant
data (chars and
/or attributes
) */
1051 @
REQ(fill_console_output
)
1052 obj_handle_t handle
; /* handle to the console output
*/
1053 int x
; /* position where to start writing
*/
1055 int mode
; /* char info mode
*/
1056 int count
; /* number to write
*/
1057 int wrap
; /* wrap around at end of line?
*/
1058 char_info_t data
; /* data to write
*/
1060 int written
; /* number of char infos actually written
*/
1064 /* read
data (chars and
/or attributes
) from a screen buffer
*/
1065 @
REQ(read_console_output
)
1066 obj_handle_t handle
; /* handle to the console output
*/
1067 int x
; /* position (x
,y
) where to start reading
*/
1069 int mode
; /* char info mode
*/
1070 int wrap
; /* wrap around at end of line?
*/
1072 int width
; /* width of screen buffer
*/
1073 int height
; /* height of screen buffer
*/
1078 /* move a
rect (of data
) in screen buffer content
*/
1079 @
REQ(move_console_output
)
1080 obj_handle_t handle
; /* handle to the console output
*/
1081 short int x_src
; /* position (x
, y
) of rect to start moving from
*/
1083 short int x_dst
; /* position (x
, y
) of rect to move to
*/
1085 short int w
; /* size of the
rect (width
, height
) to move
*/
1090 /* Sends a signal to a process group
*/
1091 @
REQ(send_console_signal
)
1092 int signal
; /* the signal to send
*/
1093 process_id_t group_id
; /* the group to send the signal to
*/
1097 /* enable directory change notifications
*/
1098 @
REQ(read_directory_changes
)
1099 unsigned int filter
; /* notification filter
*/
1100 obj_handle_t handle
; /* handle to the directory
*/
1101 obj_handle_t event
; /* handle to the event
*/
1102 int subtree
; /* watch the subtree?
*/
1103 int want_data
; /* flag indicating whether change data should be collected
*/
1104 void
* io_apc
; /* APC routine to queue upon end of async
*/
1105 void
* io_sb
; /* I
/O status
block (unique across all async on this handle
) */
1106 void
* io_user
; /* data to pass back to caller
*/
1111 obj_handle_t handle
;
1113 int action
; /* type of change
*/
1114 VARARG(name
,string
); /* name of directory entry that changed
*/
1118 /* Create a file mapping
*/
1119 @
REQ(create_mapping
)
1120 unsigned int access
; /* wanted access rights
*/
1121 unsigned int attributes
; /* object attributes
*/
1122 obj_handle_t rootdir
; /* root directory
*/
1123 int size_high
; /* mapping size
*/
1124 int size_low
; /* mapping size
*/
1125 int protect
; /* protection
flags (see below
) */
1126 obj_handle_t file_handle
; /* file handle
*/
1127 VARARG(name
,unicode_str
); /* object name
*/
1129 obj_handle_t handle
; /* handle to the mapping
*/
1131 /* protection flags
*/
1132 #define VPROT_READ
0x01
1133 #define VPROT_WRITE
0x02
1134 #define VPROT_EXEC
0x04
1135 #define VPROT_WRITECOPY
0x08
1136 #define VPROT_GUARD
0x10
1137 #define VPROT_NOCACHE
0x20
1138 #define VPROT_COMMITTED
0x40
1139 #define VPROT_IMAGE
0x80
1142 /* Open a mapping
*/
1144 unsigned int access
; /* wanted access rights
*/
1145 unsigned int attributes
; /* object attributes
*/
1146 obj_handle_t rootdir
; /* root directory
*/
1147 VARARG(name
,unicode_str
); /* object name
*/
1149 obj_handle_t handle
; /* handle to the mapping
*/
1153 /* Get information about a file mapping
*/
1154 @
REQ(get_mapping_info
)
1155 obj_handle_t handle
; /* handle to the mapping
*/
1157 int size_high
; /* mapping size
*/
1158 int size_low
; /* mapping size
*/
1159 int protect
; /* protection flags
*/
1160 int header_size
; /* header
size (for VPROT_IMAGE mapping
) */
1161 void
* base
; /* default base
addr (for VPROT_IMAGE mapping
) */
1162 obj_handle_t mapping
; /* duplicate mapping handle unless removable
*/
1163 obj_handle_t shared_file
; /* shared mapping file handle
*/
1164 int shared_size
; /* shared mapping size
*/
1168 #define SNAP_HEAPLIST
0x00000001
1169 #define SNAP_PROCESS
0x00000002
1170 #define SNAP_THREAD
0x00000004
1171 #define SNAP_MODULE
0x00000008
1172 /* Create a snapshot
*/
1173 @
REQ(create_snapshot
)
1174 unsigned int attributes
; /* object attributes
*/
1175 int flags
; /* snapshot
flags (SNAP_*)
*/
1176 process_id_t pid
; /* process id
*/
1178 obj_handle_t handle
; /* handle to the snapshot
*/
1182 /* Get the next process from a snapshot
*/
1184 obj_handle_t handle
; /* handle to the snapshot
*/
1185 int reset
; /* reset snapshot position?
*/
1187 int count
; /* process usage count
*/
1188 process_id_t pid
; /* process id
*/
1189 process_id_t ppid
; /* parent process id
*/
1190 void
* heap
; /* heap base
*/
1191 void
* module
; /* main module
*/
1192 int threads
; /* number of threads
*/
1193 int priority
; /* process priority
*/
1194 int handles
; /* number of handles
*/
1195 VARARG(filename
,unicode_str
); /* file name of main exe
*/
1199 /* Get the next thread from a snapshot
*/
1201 obj_handle_t handle
; /* handle to the snapshot
*/
1202 int reset
; /* reset snapshot position?
*/
1204 int count
; /* thread usage count
*/
1205 process_id_t pid
; /* process id
*/
1206 thread_id_t tid
; /* thread id
*/
1207 int base_pri
; /* base priority
*/
1208 int delta_pri
; /* delta priority
*/
1212 /* Get the next module from a snapshot
*/
1214 obj_handle_t handle
; /* handle to the snapshot
*/
1215 int reset
; /* reset snapshot position?
*/
1217 process_id_t pid
; /* process id
*/
1218 void
* base
; /* module base address
*/
1219 size_t size
; /* module size
*/
1220 VARARG(filename
,unicode_str
); /* file name of module
*/
1224 /* Wait for a debug event
*/
1225 @
REQ(wait_debug_event
)
1226 int get_handle
; /* should we alloc a handle for waiting?
*/
1228 process_id_t pid
; /* process id
*/
1229 thread_id_t tid
; /* thread id
*/
1230 obj_handle_t wait
; /* wait handle if no event ready
*/
1231 VARARG(event
,debug_event
); /* debug event data
*/
1235 /* Queue an exception event
*/
1236 @
REQ(queue_exception_event
)
1237 int first
; /* first chance exception?
*/
1238 VARARG(record
,exc_event
); /* thread context followed by exception record
*/
1240 obj_handle_t handle
; /* handle to the queued event
*/
1244 /* Retrieve the status of an exception event
*/
1245 @
REQ(get_exception_status
)
1246 obj_handle_t handle
; /* handle to the queued event
*/
1248 VARARG(context
,context
); /* modified thread context
*/
1252 /* Send an output string to the debugger
*/
1253 @
REQ(output_debug_string
)
1254 void
* string
; /* string to
display (in debugged process address space
) */
1255 int unicode
; /* is it Unicode?
*/
1256 int length
; /* string length
*/
1260 /* Continue a debug event
*/
1261 @
REQ(continue_debug_event
)
1262 process_id_t pid
; /* process id to continue
*/
1263 thread_id_t tid
; /* thread id to continue
*/
1264 int status
; /* continuation status
*/
1268 /* Start
/stop debugging an existing process
*/
1270 process_id_t pid
; /* id of the process to debug
*/
1271 int attach
; /* 1=attaching
/ 0=detaching from the process
*/
1275 /* Simulate a breakpoint in a process
*/
1277 obj_handle_t handle
; /* process handle
*/
1279 int self
; /* was it the caller itself?
*/
1283 /* Set debugger kill on exit flag
*/
1284 @
REQ(set_debugger_kill_on_exit
)
1285 int kill_on_exit
; /* 0=detach
/1=kill debuggee when debugger dies
*/
1289 /* Read data from a process address space
*/
1290 @
REQ(read_process_memory
)
1291 obj_handle_t handle
; /* process handle
*/
1292 void
* addr
; /* addr to read from
*/
1294 VARARG(data
,bytes
); /* result data
*/
1298 /* Write data to a process address space
*/
1299 @
REQ(write_process_memory
)
1300 obj_handle_t handle
; /* process handle
*/
1301 void
* addr
; /* addr to write to
*/
1302 VARARG(data
,bytes
); /* data to write
*/
1306 /* Create a registry key
*/
1308 obj_handle_t parent
; /* handle to the parent key
*/
1309 unsigned int access
; /* desired access rights
*/
1310 unsigned int attributes
; /* object attributes
*/
1311 unsigned int options
; /* creation options
*/
1312 time_t modif
; /* last modification time
*/
1313 data_size_t namelen
; /* length of key name in bytes
*/
1314 VARARG(name
,unicode_str
,namelen
); /* key name
*/
1315 VARARG(class
,unicode_str
); /* class name
*/
1317 obj_handle_t hkey
; /* handle to the created key
*/
1318 int created
; /* has it been newly created?
*/
1321 /* Open a registry key
*/
1323 obj_handle_t parent
; /* handle to the parent key
*/
1324 unsigned int access
; /* desired access rights
*/
1325 unsigned int attributes
; /* object attributes
*/
1326 VARARG(name
,unicode_str
); /* key name
*/
1328 obj_handle_t hkey
; /* handle to the open key
*/
1332 /* Delete a registry key
*/
1334 obj_handle_t hkey
; /* handle to the key
*/
1338 /* Flush a registry key
*/
1340 obj_handle_t hkey
; /* handle to the key
*/
1344 /* Enumerate registry subkeys
*/
1346 obj_handle_t hkey
; /* handle to registry key
*/
1347 int index
; /* index of
subkey (or
-1 for current key
) */
1348 int info_class
; /* requested information class
*/
1350 int subkeys
; /* number of subkeys
*/
1351 int max_subkey
; /* longest subkey name
*/
1352 int max_class
; /* longest class name
*/
1353 int values
; /* number of values
*/
1354 int max_value
; /* longest value name
*/
1355 int max_data
; /* longest value data
*/
1356 time_t modif
; /* last modification time
*/
1357 data_size_t total
; /* total length needed for full name and class
*/
1358 data_size_t namelen
; /* length of key name in bytes
*/
1359 VARARG(name
,unicode_str
,namelen
); /* key name
*/
1360 VARARG(class
,unicode_str
); /* class name
*/
1364 /* Set a value of a registry key
*/
1366 obj_handle_t hkey
; /* handle to registry key
*/
1367 int type
; /* value type
*/
1368 data_size_t namelen
; /* length of value name in bytes
*/
1369 VARARG(name
,unicode_str
,namelen
); /* value name
*/
1370 VARARG(data
,bytes
); /* value data
*/
1374 /* Retrieve the value of a registry key
*/
1376 obj_handle_t hkey
; /* handle to registry key
*/
1377 VARARG(name
,unicode_str
); /* value name
*/
1379 int type
; /* value type
*/
1380 data_size_t total
; /* total length needed for data
*/
1381 VARARG(data
,bytes
); /* value data
*/
1385 /* Enumerate a value of a registry key
*/
1386 @
REQ(enum_key_value
)
1387 obj_handle_t hkey
; /* handle to registry key
*/
1388 int index
; /* value index
*/
1389 int info_class
; /* requested information class
*/
1391 int type
; /* value type
*/
1392 data_size_t total
; /* total length needed for full name and data
*/
1393 data_size_t namelen
; /* length of value name in bytes
*/
1394 VARARG(name
,unicode_str
,namelen
); /* value name
*/
1395 VARARG(data
,bytes
); /* value data
*/
1399 /* Delete a value of a registry key
*/
1400 @
REQ(delete_key_value
)
1401 obj_handle_t hkey
; /* handle to registry key
*/
1402 VARARG(name
,unicode_str
); /* value name
*/
1406 /* Load a registry branch from a file
*/
1408 obj_handle_t hkey
; /* root key to load to
*/
1409 obj_handle_t file
; /* file to load from
*/
1410 VARARG(name
,unicode_str
); /* subkey name
*/
1414 /* UnLoad a registry branch from a file
*/
1415 @
REQ(unload_registry
)
1416 obj_handle_t hkey
; /* root key to unload to
*/
1420 /* Save a registry branch to a file
*/
1422 obj_handle_t hkey
; /* key to save
*/
1423 obj_handle_t file
; /* file to save to
*/
1427 /* Add a registry key change notification
*/
1428 @
REQ(set_registry_notification
)
1429 obj_handle_t hkey
; /* key to watch for changes
*/
1430 obj_handle_t event
; /* event to set
*/
1431 int subtree
; /* should we watch the whole subtree?
*/
1432 unsigned int filter
; /* things to watch
*/
1436 /* Create a waitable timer
*/
1438 unsigned int access
; /* wanted access rights
*/
1439 unsigned int attributes
; /* object attributes
*/
1440 obj_handle_t rootdir
; /* root directory
*/
1441 int manual
; /* manual reset
*/
1442 VARARG(name
,unicode_str
); /* object name
*/
1444 obj_handle_t handle
; /* handle to the timer
*/
1448 /* Open a waitable timer
*/
1450 unsigned int access
; /* wanted access rights
*/
1451 unsigned int attributes
; /* object attributes
*/
1452 obj_handle_t rootdir
; /* root directory
*/
1453 VARARG(name
,unicode_str
); /* object name
*/
1455 obj_handle_t handle
; /* handle to the timer
*/
1458 /* Set a waitable timer
*/
1460 obj_handle_t handle
; /* handle to the timer
*/
1461 abs_time_t expire
; /* next expiration absolute time
*/
1462 int period
; /* timer period in ms
*/
1463 void
* callback
; /* callback function
*/
1464 void
* arg
; /* callback argument
*/
1466 int signaled
; /* was the timer signaled before this call ?
*/
1469 /* Cancel a waitable timer
*/
1471 obj_handle_t handle
; /* handle to the timer
*/
1473 int signaled
; /* was the timer signaled before this calltime ?
*/
1476 /* Get information on a waitable timer
*/
1477 @
REQ(get_timer_info
)
1478 obj_handle_t handle
; /* handle to the timer
*/
1480 abs_time_t when
; /* absolute time when the timer next expires
*/
1481 int signaled
; /* is the timer signaled?
*/
1485 /* Retrieve the current context of a thread
*/
1486 @
REQ(get_thread_context
)
1487 obj_handle_t handle
; /* thread handle
*/
1488 unsigned int flags
; /* context flags
*/
1489 int suspend
; /* if getting context during suspend
*/
1491 int self
; /* was it a handle to the current thread?
*/
1492 VARARG(context
,context
); /* thread context
*/
1496 /* Set the current context of a thread
*/
1497 @
REQ(set_thread_context
)
1498 obj_handle_t handle
; /* thread handle
*/
1499 unsigned int flags
; /* context flags
*/
1500 int suspend
; /* if setting context during suspend
*/
1501 VARARG(context
,context
); /* thread context
*/
1503 int self
; /* was it a handle to the current thread?
*/
1507 /* Fetch a selector entry for a thread
*/
1508 @
REQ(get_selector_entry
)
1509 obj_handle_t handle
; /* thread handle
*/
1510 int entry
; /* LDT entry
*/
1512 unsigned int base
; /* selector base
*/
1513 unsigned int limit
; /* selector limit
*/
1514 unsigned char flags
; /* selector flags
*/
1520 obj_handle_t table
; /* which table to add atom to
*/
1521 VARARG(name
,unicode_str
); /* atom name
*/
1523 atom_t atom
; /* resulting atom
*/
1527 /* Delete an atom
*/
1529 obj_handle_t table
; /* which table to delete atom from
*/
1530 atom_t atom
; /* atom handle
*/
1536 obj_handle_t table
; /* which table to find atom from
*/
1537 VARARG(name
,unicode_str
); /* atom name
*/
1539 atom_t atom
; /* atom handle
*/
1543 /* Get information about an atom
*/
1544 @
REQ(get_atom_information
)
1545 obj_handle_t table
; /* which table to find atom from
*/
1546 atom_t atom
; /* atom handle
*/
1548 int count
; /* atom lock count
*/
1549 int pinned
; /* whether the atom has been pinned
*/
1550 data_size_t total
; /* actual length of atom name
*/
1551 VARARG(name
,unicode_str
); /* atom name
*/
1555 /* Set information about an atom
*/
1556 @
REQ(set_atom_information
)
1557 obj_handle_t table
; /* which table to find atom from
*/
1558 atom_t atom
; /* atom handle
*/
1559 int pinned
; /* whether to bump atom information
*/
1563 /* Empty an atom table
*/
1564 @
REQ(empty_atom_table
)
1565 obj_handle_t table
; /* which table to find atom from
*/
1566 int if_pinned
; /* whether to delete pinned atoms
*/
1570 /* Init an atom table
*/
1571 @
REQ(init_atom_table
)
1572 int entries
; /* number of
entries (only for local
) */
1574 obj_handle_t table
; /* handle to the atom table
*/
1578 /* Get the message queue of the current thread
*/
1581 obj_handle_t handle
; /* handle to the queue
*/
1585 /* Set the current message queue wakeup mask
*/
1586 @
REQ(set_queue_mask
)
1587 unsigned int wake_mask
; /* wakeup bits mask
*/
1588 unsigned int changed_mask
; /* changed bits mask
*/
1589 int skip_wait
; /* will we skip waiting if signaled?
*/
1591 unsigned int wake_bits
; /* current wake bits
*/
1592 unsigned int changed_bits
; /* current changed bits
*/
1596 /* Get the current message queue status
*/
1597 @
REQ(get_queue_status
)
1598 int clear
; /* should we clear the change bits?
*/
1600 unsigned int wake_bits
; /* wake bits
*/
1601 unsigned int changed_bits
; /* changed bits since last time
*/
1605 /* Retrieve the process idle event
*/
1606 @
REQ(get_process_idle_event
)
1607 obj_handle_t handle
; /* process handle
*/
1609 obj_handle_t event
; /* handle to idle event
*/
1613 /* Send a message to a thread queue
*/
1615 thread_id_t id
; /* thread id
*/
1616 int type
; /* message
type (see below
) */
1617 int flags
; /* message
flags (see below
) */
1618 user_handle_t win
; /* window handle
*/
1619 unsigned int msg
; /* message code
*/
1620 unsigned long wparam
; /* parameters
*/
1621 unsigned long lparam
; /* parameters
*/
1622 int timeout
; /* timeout for reply
*/
1623 VARARG(data
,message_data
); /* message data for sent messages
*/
1626 @
REQ(post_quit_message
)
1627 int exit_code
; /* exit code to return
*/
1632 MSG_ASCII
, /* Ascii
message (from SendMessageA
) */
1633 MSG_UNICODE
, /* Unicode
message (from SendMessageW
) */
1634 MSG_NOTIFY
, /* notify
message (from SendNotifyMessageW
), always Unicode
*/
1635 MSG_CALLBACK
, /* callback
message (from SendMessageCallbackW
), always Unicode
*/
1636 MSG_CALLBACK_RESULT
,/* result of a callback message
*/
1637 MSG_OTHER_PROCESS
, /* sent from other process
, may include vararg data
, always Unicode
*/
1638 MSG_POSTED
, /* posted
message (from PostMessageW
), always Unicode
*/
1639 MSG_HARDWARE
, /* hardware message
*/
1640 MSG_WINEVENT
/* winevent message
*/
1642 #define SEND_MSG_ABORT_IF_HUNG
0x01
1645 /* Send a hardware message to a thread queue
*/
1646 @
REQ(send_hardware_message
)
1647 thread_id_t id
; /* thread id
*/
1648 user_handle_t win
; /* window handle
*/
1649 unsigned int msg
; /* message code
*/
1650 unsigned int time
; /* message time
*/
1651 unsigned long wparam
; /* parameters
*/
1652 unsigned long lparam
; /* parameters
*/
1653 unsigned long info
; /* extra info
*/
1654 int x
; /* x position
*/
1655 int y
; /* y position
*/
1659 /* Get a message from the current queue
*/
1661 int flags
; /* see below
*/
1662 user_handle_t get_win
; /* window handle to get
*/
1663 unsigned int get_first
; /* first message code to get
*/
1664 unsigned int get_last
; /* last message code to get
*/
1665 unsigned int hw_id
; /* id of the previous hardware
message (or
0) */
1667 user_handle_t win
; /* window handle
*/
1668 int type
; /* message type
*/
1669 unsigned int msg
; /* message code
*/
1670 unsigned long wparam
; /* parameters
*/
1671 unsigned long lparam
; /* parameters
*/
1672 unsigned long info
; /* extra info
*/
1673 int x
; /* x position
*/
1674 int y
; /* y position
*/
1675 unsigned int time
; /* message time
*/
1676 unsigned int hw_id
; /* id if hardware message
*/
1677 unsigned int active_hooks
; /* active hooks bitmap
*/
1678 data_size_t total
; /* total size of extra data
*/
1679 VARARG(data
,message_data
); /* message data for sent messages
*/
1681 #define GET_MSG_REMOVE
1 /* remove the message
*/
1682 #define GET_MSG_SENT_ONLY
2 /* only get sent messages
*/
1684 /* Reply to a sent message
*/
1686 unsigned int result
; /* message result
*/
1687 int remove
; /* should we remove the message?
*/
1688 VARARG(data
,bytes
); /* message data for sent messages
*/
1692 /* Accept the current hardware message
*/
1693 @
REQ(accept_hardware_message
)
1694 unsigned int hw_id
; /* id of the hardware message
*/
1695 int remove
; /* should we remove the message?
*/
1696 user_handle_t new_win
; /* new destination window for current message
*/
1700 /* Retrieve the reply for the last message sent
*/
1701 @
REQ(get_message_reply
)
1702 int cancel
; /* cancel message if not ready?
*/
1704 unsigned int result
; /* message result
*/
1705 VARARG(data
,bytes
); /* message data for sent messages
*/
1709 /* Set a window timer
*/
1711 user_handle_t win
; /* window handle
*/
1712 unsigned int msg
; /* message to post
*/
1713 unsigned int rate
; /* timer rate in ms
*/
1714 unsigned long id
; /* timer id
*/
1715 unsigned long lparam
; /* message
lparam (callback proc
) */
1717 unsigned long id
; /* timer id
*/
1721 /* Kill a window timer
*/
1722 @
REQ(kill_win_timer
)
1723 user_handle_t win
; /* window handle
*/
1724 unsigned int msg
; /* message to post
*/
1725 unsigned long id
; /* timer id
*/
1729 /* Retrieve info about a serial port
*/
1730 @
REQ(get_serial_info
)
1731 obj_handle_t handle
; /* handle to comm port
*/
1733 unsigned int readinterval
;
1734 unsigned int readconst
;
1735 unsigned int readmult
;
1736 unsigned int writeconst
;
1737 unsigned int writemult
;
1738 unsigned int eventmask
;
1742 /* Set info about a serial port
*/
1743 @
REQ(set_serial_info
)
1744 obj_handle_t handle
; /* handle to comm port
*/
1745 int flags
; /* bitmask to set
values (see below
) */
1746 unsigned int readinterval
;
1747 unsigned int readconst
;
1748 unsigned int readmult
;
1749 unsigned int writeconst
;
1750 unsigned int writemult
;
1751 unsigned int eventmask
;
1753 #define SERIALINFO_SET_TIMEOUTS
0x01
1754 #define SERIALINFO_SET_MASK
0x02
1757 /* Create an async I
/O
*/
1758 @
REQ(register_async
)
1759 obj_handle_t handle
; /* handle to comm port
, socket or file
*/
1760 int type
; /* type of queue to look after
*/
1761 void
* io_apc
; /* APC routine to queue upon end of async
*/
1762 void
* io_sb
; /* I
/O status
block (unique across all async on this handle
) */
1763 void
* io_user
; /* data to pass back to caller
*/
1764 int count
; /* count
- usually # of bytes to be read
/written
*/
1766 #define ASYNC_TYPE_READ
0x01
1767 #define ASYNC_TYPE_WRITE
0x02
1768 #define ASYNC_TYPE_WAIT
0x03
1771 /* Cancel all async op on a fd
*/
1773 obj_handle_t handle
; /* handle to comm port
, socket or file
*/
1777 /* Create a named pipe
*/
1778 @
REQ(create_named_pipe
)
1779 unsigned int access
;
1780 unsigned int attributes
; /* object attributes
*/
1781 obj_handle_t rootdir
; /* root directory
*/
1782 unsigned int options
;
1784 unsigned int maxinstances
;
1785 unsigned int outsize
;
1786 unsigned int insize
;
1787 unsigned int timeout
;
1788 VARARG(name
,unicode_str
); /* pipe name
*/
1790 obj_handle_t handle
; /* handle to the pipe
*/
1793 /* flags in create_named_pipe and get_named_pipe_info
*/
1794 #define NAMED_PIPE_MESSAGE_STREAM_WRITE
0x0001
1795 #define NAMED_PIPE_MESSAGE_STREAM_READ
0x0002
1796 #define NAMED_PIPE_NONBLOCKING_MODE
0x0004
1797 #define NAMED_PIPE_SERVER_END
0x8000
1799 /* Open an existing named pipe
*/
1800 @
REQ(open_named_pipe
)
1801 unsigned int access
;
1802 unsigned int attributes
; /* object attributes
*/
1803 obj_handle_t rootdir
; /* root directory
*/
1804 unsigned int flags
; /* file flags
*/
1805 VARARG(name
,unicode_str
); /* pipe name
*/
1807 obj_handle_t handle
; /* handle to the pipe
*/
1811 /* Connect to a named pipe
*/
1812 @
REQ(connect_named_pipe
)
1813 obj_handle_t handle
;
1819 /* Wait for a named pipe
*/
1820 @
REQ(wait_named_pipe
)
1821 obj_handle_t handle
;
1822 unsigned int timeout
;
1825 VARARG(name
,unicode_str
); /* pipe name
*/
1829 /* Disconnect a named pipe
*/
1830 @
REQ(disconnect_named_pipe
)
1831 obj_handle_t handle
;
1835 @
REQ(get_named_pipe_info
)
1836 obj_handle_t handle
;
1839 unsigned int maxinstances
;
1840 unsigned int instances
;
1841 unsigned int outsize
;
1842 unsigned int insize
;
1846 /* Create a window
*/
1848 user_handle_t parent
; /* parent window
*/
1849 user_handle_t owner
; /* owner window
*/
1850 atom_t atom
; /* class atom
*/
1851 void
* instance
; /* module instance
*/
1853 user_handle_t handle
; /* created window
*/
1854 user_handle_t parent
; /* full handle of parent
*/
1855 user_handle_t owner
; /* full handle of owner
*/
1856 int extra
; /* number of extra bytes
*/
1857 void
* class_ptr
; /* pointer to class in client address space
*/
1861 /* Destroy a window
*/
1862 @
REQ(destroy_window
)
1863 user_handle_t handle
; /* handle to the window
*/
1867 /* Retrieve the desktop window for the current thread
*/
1868 @
REQ(get_desktop_window
)
1869 int force
; /* force creation if it doesn
't exist */
1871 user_handle_t handle; /* handle to the desktop window */
1875 /* Set a window owner */
1876 @REQ(set_window_owner)
1877 user_handle_t handle; /* handle to the window */
1878 user_handle_t owner; /* new owner */
1880 user_handle_t full_owner; /* full handle of new owner */
1881 user_handle_t prev_owner; /* full handle of previous owner */
1885 /* Get information from a window handle */
1886 @REQ(get_window_info)
1887 user_handle_t handle; /* handle to the window */
1889 user_handle_t full_handle; /* full 32-bit handle */
1890 user_handle_t last_active; /* last active popup */
1891 process_id_t pid; /* process owning the window */
1892 thread_id_t tid; /* thread owning the window */
1893 atom_t atom; /* class atom */
1894 int is_unicode; /* ANSI or unicode */
1898 /* Set some information in a window */
1899 @REQ(set_window_info)
1900 unsigned int flags; /* flags for fields to set (see below) */
1901 user_handle_t handle; /* handle to the window */
1902 unsigned int style; /* window style */
1903 unsigned int ex_style; /* window extended style */
1904 unsigned int id; /* window id */
1905 int is_unicode; /* ANSI or unicode */
1906 void* instance; /* creator instance */
1907 unsigned long user_data; /* user-specific data */
1908 int extra_offset; /* offset to set in extra bytes */
1909 data_size_t extra_size; /* size to set in extra bytes */
1910 unsigned long extra_value; /* value to set in extra bytes */
1912 unsigned int old_style; /* old window style */
1913 unsigned int old_ex_style; /* old window extended style */
1914 unsigned int old_id; /* old window id */
1915 void* old_instance; /* old creator instance */
1916 unsigned long old_user_data; /* old user-specific data */
1917 unsigned long old_extra_value; /* old value in extra bytes */
1919 #define SET_WIN_STYLE 0x01
1920 #define SET_WIN_EXSTYLE 0x02
1921 #define SET_WIN_ID 0x04
1922 #define SET_WIN_INSTANCE 0x08
1923 #define SET_WIN_USERDATA 0x10
1924 #define SET_WIN_EXTRA 0x20
1925 #define SET_WIN_UNICODE 0x40
1928 /* Set the parent of a window */
1930 user_handle_t handle; /* handle to the window */
1931 user_handle_t parent; /* handle to the parent */
1933 user_handle_t old_parent; /* old parent window */
1934 user_handle_t full_parent; /* full handle of new parent */
1938 /* Get a list of the window parents, up to the root of the tree */
1939 @REQ(get_window_parents)
1940 user_handle_t handle; /* handle to the window */
1942 int count; /* total count of parents */
1943 VARARG(parents,user_handles); /* parent handles */
1947 /* Get a list of the window children */
1948 @REQ(get_window_children)
1949 user_handle_t parent; /* parent window */
1950 atom_t atom; /* class atom for the listed children */
1951 thread_id_t tid; /* thread owning the listed children */
1953 int count; /* total count of children */
1954 VARARG(children,user_handles); /* children handles */
1958 /* Get a list of the window children that contain a given point */
1959 @REQ(get_window_children_from_point)
1960 user_handle_t parent; /* parent window */
1961 int x; /* point in parent coordinates */
1964 int count; /* total count of children */
1965 VARARG(children,user_handles); /* children handles */
1969 /* Get window tree information from a window handle */
1970 @REQ(get_window_tree)
1971 user_handle_t handle; /* handle to the window */
1973 user_handle_t parent; /* parent window */
1974 user_handle_t owner; /* owner window */
1975 user_handle_t next_sibling; /* next sibling in Z-order */
1976 user_handle_t prev_sibling; /* prev sibling in Z-order */
1977 user_handle_t first_sibling; /* first sibling in Z-order */
1978 user_handle_t last_sibling; /* last sibling in Z-order */
1979 user_handle_t first_child; /* first child */
1980 user_handle_t last_child; /* last child */
1983 /* Set the position and Z order of a window */
1984 @REQ(set_window_pos)
1985 unsigned int flags; /* SWP_* flags */
1986 user_handle_t handle; /* handle to the window */
1987 user_handle_t previous; /* previous window in Z order */
1988 rectangle_t window; /* window rectangle */
1989 rectangle_t client; /* client rectangle */
1990 VARARG(valid,rectangles); /* valid rectangles from WM_NCCALCSIZE */
1992 unsigned int new_style; /* new window style */
1996 /* Get the window and client rectangles of a window */
1997 @REQ(get_window_rectangles)
1998 user_handle_t handle; /* handle to the window */
2000 rectangle_t window; /* window rectangle */
2001 rectangle_t visible; /* visible part of the window rectangle */
2002 rectangle_t client; /* client rectangle */
2006 /* Get the window text */
2007 @REQ(get_window_text)
2008 user_handle_t handle; /* handle to the window */
2010 VARARG(text,unicode_str); /* window text */
2014 /* Set the window text */
2015 @REQ(set_window_text)
2016 user_handle_t handle; /* handle to the window */
2017 VARARG(text,unicode_str); /* window text */
2021 /* Get the coordinates offset between two windows */
2022 @REQ(get_windows_offset)
2023 user_handle_t from; /* handle to the first window */
2024 user_handle_t to; /* handle to the second window */
2026 int x; /* x coordinate offset */
2027 int y; /* y coordinate offset */
2031 /* Get the visible region of a window */
2032 @REQ(get_visible_region)
2033 user_handle_t window; /* handle to the window */
2034 unsigned int flags; /* DCX flags */
2036 user_handle_t top_win; /* top window to clip against */
2037 rectangle_t top_rect; /* top window visible rect with screen coords */
2038 rectangle_t win_rect; /* window rect in screen coords */
2039 data_size_t total_size; /* total size of the resulting region */
2040 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2044 /* Get the window region */
2045 @REQ(get_window_region)
2046 user_handle_t window; /* handle to the window */
2048 data_size_t total_size; /* total size of the resulting region */
2049 VARARG(region,rectangles); /* list of rectangles for the region */
2053 /* Set the window region */
2054 @REQ(set_window_region)
2055 user_handle_t window; /* handle to the window */
2056 VARARG(region,rectangles); /* list of rectangles for the region */
2060 /* Get the window update region */
2061 @REQ(get_update_region)
2062 user_handle_t window; /* handle to the window */
2063 user_handle_t from_child; /* child to start searching from */
2064 unsigned int flags; /* update flags (see below) */
2066 user_handle_t child; /* child to repaint (or window itself) */
2067 unsigned int flags; /* resulting update flags (see below) */
2068 data_size_t total_size; /* total size of the resulting region */
2069 VARARG(region,rectangles); /* list of rectangles for the region */
2071 #define UPDATE_NONCLIENT 0x01 /* get region for repainting non-client area */
2072 #define UPDATE_ERASE 0x02 /* get region for erasing client area */
2073 #define UPDATE_PAINT 0x04 /* get region for painting client area */
2074 #define UPDATE_INTERNALPAINT 0x08 /* get region if internal paint is pending */
2075 #define UPDATE_ALLCHILDREN 0x10 /* force repaint of all children */
2076 #define UPDATE_NOCHILDREN 0x20 /* don't try to repaint any children
*/
2077 #define UPDATE_NOREGION
0x40 /* don
't return a region, only the flags */
2080 /* Update the z order of a window so that a given rectangle is fully visible */
2081 @REQ(update_window_zorder)
2082 user_handle_t window; /* handle to the window */
2083 rectangle_t rect; /* rectangle that must be visible */
2087 /* Mark parts of a window as needing a redraw */
2089 user_handle_t window; /* handle to the window */
2090 unsigned int flags; /* RDW_* flags */
2091 VARARG(region,rectangles); /* list of rectangles for the region */
2095 /* Set a window property */
2096 @REQ(set_window_property)
2097 user_handle_t window; /* handle to the window */
2098 atom_t atom; /* property atom (if no name specified) */
2099 obj_handle_t handle; /* handle to store */
2100 VARARG(name,unicode_str); /* property name */
2104 /* Remove a window property */
2105 @REQ(remove_window_property)
2106 user_handle_t window; /* handle to the window */
2107 atom_t atom; /* property atom (if no name specified) */
2108 VARARG(name,unicode_str); /* property name */
2110 obj_handle_t handle; /* handle stored in property */
2114 /* Get a window property */
2115 @REQ(get_window_property)
2116 user_handle_t window; /* handle to the window */
2117 atom_t atom; /* property atom (if no name specified) */
2118 VARARG(name,unicode_str); /* property name */
2120 obj_handle_t handle; /* handle stored in property */
2124 /* Get the list of properties of a window */
2125 @REQ(get_window_properties)
2126 user_handle_t window; /* handle to the window */
2128 int total; /* total number of properties */
2129 VARARG(props,properties); /* list of properties */
2133 /* Create a window station */
2134 @REQ(create_winstation)
2135 unsigned int flags; /* window station flags */
2136 unsigned int access; /* wanted access rights */
2137 unsigned int attributes; /* object attributes */
2138 VARARG(name,unicode_str); /* object name */
2140 obj_handle_t handle; /* handle to the window station */
2144 /* Open a handle to a window station */
2145 @REQ(open_winstation)
2146 unsigned int access; /* wanted access rights */
2147 unsigned int attributes; /* object attributes */
2148 VARARG(name,unicode_str); /* object name */
2150 obj_handle_t handle; /* handle to the window station */
2154 /* Close a window station */
2155 @REQ(close_winstation)
2156 obj_handle_t handle; /* handle to the window station */
2160 /* Get the process current window station */
2161 @REQ(get_process_winstation)
2163 obj_handle_t handle; /* handle to the window station */
2167 /* Set the process current window station */
2168 @REQ(set_process_winstation)
2169 obj_handle_t handle; /* handle to the window station */
2173 /* Create a desktop */
2174 @REQ(create_desktop)
2175 unsigned int flags; /* desktop flags */
2176 unsigned int access; /* wanted access rights */
2177 unsigned int attributes; /* object attributes */
2178 VARARG(name,unicode_str); /* object name */
2180 obj_handle_t handle; /* handle to the desktop */
2184 /* Open a handle to a desktop */
2186 unsigned int flags; /* desktop flags */
2187 unsigned int access; /* wanted access rights */
2188 unsigned int attributes; /* object attributes */
2189 VARARG(name,unicode_str); /* object name */
2191 obj_handle_t handle; /* handle to the desktop */
2195 /* Close a desktop */
2197 obj_handle_t handle; /* handle to the desktop */
2201 /* Get the thread current desktop */
2202 @REQ(get_thread_desktop)
2203 thread_id_t tid; /* thread id */
2205 obj_handle_t handle; /* handle to the desktop */
2209 /* Set the thread current desktop */
2210 @REQ(set_thread_desktop)
2211 obj_handle_t handle; /* handle to the desktop */
2215 /* Get/set information about a user object (window station or desktop) */
2216 @REQ(set_user_object_info)
2217 obj_handle_t handle; /* handle to the object */
2218 unsigned int flags; /* information to set */
2219 unsigned int obj_flags; /* new object flags */
2221 int is_desktop; /* is object a desktop? */
2222 unsigned int old_obj_flags; /* old object flags */
2223 VARARG(name,unicode_str); /* object name */
2225 #define SET_USER_OBJECT_FLAGS 1
2228 /* Attach (or detach) thread inputs */
2229 @REQ(attach_thread_input)
2230 thread_id_t tid_from; /* thread to be attached */
2231 thread_id_t tid_to; /* thread to which tid_from should be attached */
2232 int attach; /* is it an attach? */
2236 /* Get input data for a given thread */
2237 @REQ(get_thread_input)
2238 thread_id_t tid; /* id of thread */
2240 user_handle_t focus; /* handle to the focus window */
2241 user_handle_t capture; /* handle to the capture window */
2242 user_handle_t active; /* handle to the active window */
2243 user_handle_t foreground; /* handle to the global foreground window */
2244 user_handle_t menu_owner; /* handle to the menu owner */
2245 user_handle_t move_size; /* handle to the moving/resizing window */
2246 user_handle_t caret; /* handle to the caret window */
2247 rectangle_t rect; /* caret rectangle */
2251 /* Get the time of the last input event */
2252 @REQ(get_last_input_time)
2258 /* Retrieve queue keyboard state for a given thread */
2260 thread_id_t tid; /* id of thread */
2261 int key; /* optional key code or -1 */
2263 unsigned char state; /* state of specified key */
2264 VARARG(keystate,bytes); /* state array for all the keys */
2267 /* Set queue keyboard state for a given thread */
2269 thread_id_t tid; /* id of thread */
2270 VARARG(keystate,bytes); /* state array for all the keys */
2273 /* Set the system foreground window */
2274 @REQ(set_foreground_window)
2275 user_handle_t handle; /* handle to the foreground window */
2277 user_handle_t previous; /* handle to the previous foreground window */
2278 int send_msg_old; /* whether we have to send a msg to the old window */
2279 int send_msg_new; /* whether we have to send a msg to the new window */
2282 /* Set the current thread focus window */
2283 @REQ(set_focus_window)
2284 user_handle_t handle; /* handle to the focus window */
2286 user_handle_t previous; /* handle to the previous focus window */
2289 /* Set the current thread active window */
2290 @REQ(set_active_window)
2291 user_handle_t handle; /* handle to the active window */
2293 user_handle_t previous; /* handle to the previous active window */
2296 /* Set the current thread capture window */
2297 @REQ(set_capture_window)
2298 user_handle_t handle; /* handle to the capture window */
2299 unsigned int flags; /* capture flags (see below) */
2301 user_handle_t previous; /* handle to the previous capture window */
2302 user_handle_t full_handle; /* full 32-bit handle of new capture window */
2304 #define CAPTURE_MENU 0x01 /* capture is for a menu */
2305 #define CAPTURE_MOVESIZE 0x02 /* capture is for moving/resizing */
2308 /* Set the current thread caret window */
2309 @REQ(set_caret_window)
2310 user_handle_t handle; /* handle to the caret window */
2311 int width; /* caret width */
2312 int height; /* caret height */
2314 user_handle_t previous; /* handle to the previous caret window */
2315 rectangle_t old_rect; /* previous caret rectangle */
2316 int old_hide; /* previous hide count */
2317 int old_state; /* previous caret state (1=on, 0=off) */
2321 /* Set the current thread caret information */
2322 @REQ(set_caret_info)
2323 unsigned int flags; /* caret flags (see below) */
2324 user_handle_t handle; /* handle to the caret window */
2325 int x; /* caret x position */
2326 int y; /* caret y position */
2327 int hide; /* increment for hide count (can be negative to show it) */
2328 int state; /* caret state (1=on, 0=off, -1=toggle current state) */
2330 user_handle_t full_handle; /* handle to the current caret window */
2331 rectangle_t old_rect; /* previous caret rectangle */
2332 int old_hide; /* previous hide count */
2333 int old_state; /* previous caret state (1=on, 0=off) */
2335 #define SET_CARET_POS 0x01 /* set the caret position from x,y */
2336 #define SET_CARET_HIDE 0x02 /* increment the caret hide count */
2337 #define SET_CARET_STATE 0x04 /* set the caret on/off state */
2340 /* Set a window hook */
2342 int id; /* id of the hook */
2343 process_id_t pid; /* id of process to set the hook into */
2344 thread_id_t tid; /* id of thread to set the hook into */
2348 void* proc; /* hook procedure */
2349 int unicode; /* is it a unicode hook? */
2350 VARARG(module,unicode_str); /* module name */
2352 user_handle_t handle; /* handle to the hook */
2353 unsigned int active_hooks; /* active hooks bitmap */
2357 /* Remove a window hook */
2359 user_handle_t handle; /* handle to the hook */
2360 int id; /* id of the hook if handle is 0 */
2361 void* proc; /* hook procedure if handle is 0 */
2363 unsigned int active_hooks; /* active hooks bitmap */
2367 /* Start calling a hook chain */
2368 @REQ(start_hook_chain)
2369 int id; /* id of the hook */
2370 int event; /* signalled event */
2371 user_handle_t window; /* handle to the event window */
2372 int object_id; /* object id for out of context winevent */
2373 int child_id; /* child id for out of context winevent */
2375 user_handle_t handle; /* handle to the next hook */
2376 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2377 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2378 void* proc; /* hook procedure */
2379 int unicode; /* is it a unicode hook? */
2380 unsigned int active_hooks; /* active hooks bitmap */
2381 VARARG(module,unicode_str); /* module name */
2385 /* Finished calling a hook chain */
2386 @REQ(finish_hook_chain)
2387 int id; /* id of the hook */
2391 /* Get the hook information */
2393 user_handle_t handle; /* handle to the current hook */
2394 int get_next; /* do we want info about current or next hook? */
2395 int event; /* signalled event */
2396 user_handle_t window; /* handle to the event window */
2397 int object_id; /* object id for out of context winevent */
2398 int child_id; /* child id for out of context winevent */
2400 user_handle_t handle; /* handle to the hook */
2401 int id; /* id of the hook */
2402 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2403 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2404 void* proc; /* hook procedure */
2405 int unicode; /* is it a unicode hook? */
2406 VARARG(module,unicode_str); /* module name */
2410 /* Create a window class */
2412 int local; /* is it a local class? */
2413 atom_t atom; /* class atom */
2414 unsigned int style; /* class style */
2415 void* instance; /* module instance */
2416 int extra; /* number of extra class bytes */
2417 int win_extra; /* number of window extra bytes */
2418 void* client_ptr; /* pointer to class in client address space */
2422 /* Destroy a window class */
2424 atom_t atom; /* class atom */
2425 void* instance; /* module instance */
2427 void* client_ptr; /* pointer to class in client address space */
2431 /* Set some information in a class */
2432 @REQ(set_class_info)
2433 user_handle_t window; /* handle to the window */
2434 unsigned int flags; /* flags for info to set (see below) */
2435 atom_t atom; /* class atom */
2436 unsigned int style; /* class style */
2437 int win_extra; /* number of window extra bytes */
2438 void* instance; /* module instance */
2439 int extra_offset; /* offset to set in extra bytes */
2440 data_size_t extra_size; /* size to set in extra bytes */
2441 unsigned long extra_value; /* value to set in extra bytes */
2443 atom_t old_atom; /* previous class atom */
2444 unsigned int old_style; /* previous class style */
2445 int old_extra; /* previous number of class extra bytes */
2446 int old_win_extra; /* previous number of window extra bytes */
2447 void* old_instance; /* previous module instance */
2448 unsigned long old_extra_value; /* old value in extra bytes */
2450 #define SET_CLASS_ATOM 0x0001
2451 #define SET_CLASS_STYLE 0x0002
2452 #define SET_CLASS_WINEXTRA 0x0004
2453 #define SET_CLASS_INSTANCE 0x0008
2454 #define SET_CLASS_EXTRA 0x0010
2457 /* Set/get clipboard information */
2458 @REQ(set_clipboard_info)
2459 unsigned int flags; /* flags for fields to set (see below) */
2460 user_handle_t clipboard; /* clipboard window */
2461 user_handle_t owner; /* clipboard owner */
2462 user_handle_t viewer; /* first clipboard viewer */
2463 unsigned int seqno; /* change sequence number */
2465 unsigned int flags; /* status flags (see below) */
2466 user_handle_t old_clipboard; /* old clipboard window */
2467 user_handle_t old_owner; /* old clipboard owner */
2468 user_handle_t old_viewer; /* old clipboard viewer */
2469 unsigned int seqno; /* current sequence number */
2472 #define SET_CB_OPEN 0x001
2473 #define SET_CB_OWNER 0x002
2474 #define SET_CB_VIEWER 0x004
2475 #define SET_CB_SEQNO 0x008
2476 #define SET_CB_RELOWNER 0x010
2477 #define SET_CB_CLOSE 0x020
2478 #define CB_OPEN 0x040
2479 #define CB_OWNER 0x080
2480 #define CB_PROCESS 0x100
2483 /* Open a security token */
2485 obj_handle_t handle; /* handle to the thread or process */
2486 unsigned int access; /* access rights to the new token */
2487 unsigned int attributes;/* object attributes */
2488 unsigned int flags; /* flags (see below) */
2490 obj_handle_t token; /* handle to the token */
2492 #define OPEN_TOKEN_THREAD 1
2493 #define OPEN_TOKEN_AS_SELF 2
2496 /* Set/get the global windows */
2497 @REQ(set_global_windows)
2498 unsigned int flags; /* flags for fields to set (see below) */
2499 user_handle_t shell_window; /* handle to the new shell window */
2500 user_handle_t shell_listview; /* handle to the new shell listview window */
2501 user_handle_t progman_window; /* handle to the new program manager window */
2502 user_handle_t taskman_window; /* handle to the new task manager window */
2504 user_handle_t old_shell_window; /* handle to the shell window */
2505 user_handle_t old_shell_listview; /* handle to the shell listview window */
2506 user_handle_t old_progman_window; /* handle to the new program manager window */
2507 user_handle_t old_taskman_window; /* handle to the new task manager window */
2509 #define SET_GLOBAL_SHELL_WINDOWS 0x01 /* set both main shell and listview windows */
2510 #define SET_GLOBAL_PROGMAN_WINDOW 0x02
2511 #define SET_GLOBAL_TASKMAN_WINDOW 0x04
2513 /* Adjust the privileges held by a token */
2514 @REQ(adjust_token_privileges)
2515 obj_handle_t handle; /* handle to the token */
2516 int disable_all; /* disable all privileges? */
2517 int get_modified_state; /* get modified privileges? */
2518 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to enable/disable/remove */
2520 unsigned int len; /* total length in bytes required to store token privileges */
2521 VARARG(privileges,LUID_AND_ATTRIBUTES); /* modified privileges */
2524 /* Retrieves the set of privileges held by or available to a token */
2525 @REQ(get_token_privileges)
2526 obj_handle_t handle; /* handle to the token */
2528 unsigned int len; /* total length in bytes required to store token privileges */
2529 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
2532 /* Check the token has the required privileges */
2533 @REQ(check_token_privileges)
2534 obj_handle_t handle; /* handle to the token */
2535 int all_required; /* are all the privileges required for the check to succeed? */
2536 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to check */
2538 int has_privileges; /* does the token have the required privileges? */
2539 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
2542 @REQ(duplicate_token)
2543 obj_handle_t handle; /* handle to the token to duplicate */
2544 unsigned int access; /* access rights to the new token */
2545 unsigned int attributes; /* object attributes */
2546 int primary; /* is the new token to be a primary one? */
2547 int impersonation_level; /* impersonation level of the new token */
2549 obj_handle_t new_handle; /* duplicated handle */
2553 obj_handle_t handle; /* handle to the token */
2554 unsigned int desired_access; /* desired access to the object */
2555 unsigned int mapping_read; /* mapping from generic read to specific rights */
2556 unsigned int mapping_write; /* mapping from generic write to specific rights */
2557 unsigned int mapping_execute; /* mapping from generic execute to specific rights */
2558 unsigned int mapping_all; /* mapping from generic all to specific rights */
2559 VARARG(sd,security_descriptor); /* security descriptor to check */
2561 unsigned int access_granted; /* access rights actually granted */
2562 unsigned int access_status; /* was access granted? */
2563 unsigned int privileges_len; /* length needed to store privileges */
2564 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges used during access check */
2567 @REQ(get_token_user)
2568 obj_handle_t handle; /* handle to the token */
2570 data_size_t user_len; /* length needed to store user */
2571 VARARG(user,SID); /* sid of the user the token represents */
2574 @REQ(get_token_groups)
2575 obj_handle_t handle; /* handle to the token */
2577 data_size_t user_len; /* length needed to store user */
2578 VARARG(user,token_groups); /* groups the token's user belongs to
*/
2581 /* Create a mailslot
*/
2582 @
REQ(create_mailslot
)
2583 unsigned int access
; /* wanted access rights
*/
2584 unsigned int attributes
; /* object attributes
*/
2585 obj_handle_t rootdir
; /* root directory
*/
2586 unsigned int max_msgsize
;
2588 VARARG(name
,unicode_str
); /* mailslot name
*/
2590 obj_handle_t handle
; /* handle to the mailslot
*/
2594 /* Open an existing mailslot
*/
2596 unsigned int access
;
2597 unsigned int attributes
; /* object attributes
*/
2598 obj_handle_t rootdir
; /* root directory
*/
2599 unsigned int sharing
; /* sharing mode
*/
2600 VARARG(name
,unicode_str
); /* mailslot name
*/
2602 obj_handle_t handle
; /* handle to the mailslot
*/
2606 /* Set mailslot information
*/
2607 @
REQ(set_mailslot_info
)
2608 obj_handle_t handle
; /* handle to the mailslot
*/
2612 unsigned int max_msgsize
;
2615 #define MAILSLOT_SET_READ_TIMEOUT
1
2618 /* Create a directory object
*/
2619 @
REQ(create_directory
)
2620 unsigned int access
; /* access flags
*/
2621 unsigned int attributes
; /* object attributes
*/
2622 obj_handle_t rootdir
; /* root directory
*/
2623 VARARG(directory_name
,unicode_str
); /* Directory name
*/
2625 obj_handle_t handle
; /* handle to the directory
*/
2629 /* Open a directory object
*/
2630 @
REQ(open_directory
)
2631 unsigned int access
; /* access flags
*/
2632 unsigned int attributes
; /* object attributes
*/
2633 obj_handle_t rootdir
; /* root directory
*/
2634 VARARG(directory_name
,unicode_str
); /* Directory name
*/
2636 obj_handle_t handle
; /* handle to the directory
*/
2640 /* Create a symbolic link object
*/
2641 @
REQ(create_symlink
)
2642 unsigned int access
; /* access flags
*/
2643 unsigned int attributes
; /* object attributes
*/
2644 obj_handle_t rootdir
; /* root directory
*/
2645 data_size_t name_len
; /* length of the symlink name in bytes
*/
2646 VARARG(name
,unicode_str
,name_len
); /* symlink name
*/
2647 VARARG(target_name
,unicode_str
); /* target name
*/
2649 obj_handle_t handle
; /* handle to the symlink
*/
2653 /* Open a symbolic link object
*/
2655 unsigned int access
; /* access flags
*/
2656 unsigned int attributes
; /* object attributes
*/
2657 obj_handle_t rootdir
; /* root directory
*/
2658 VARARG(name
,unicode_str
); /* symlink name
*/
2660 obj_handle_t handle
; /* handle to the symlink
*/
2664 /* Query a symbolic link object
*/
2666 obj_handle_t handle
; /* handle to the symlink
*/
2668 VARARG(target_name
,unicode_str
); /* target name
*/