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
;
40 typedef unsigned int ioctl_code_t
;
44 int req
; /* request code
*/
45 data_size_t request_size
; /* request variable part size
*/
46 data_size_t reply_size
; /* reply variable part maximum size
*/
51 unsigned int error
; /* error result
*/
52 data_size_t reply_size
; /* reply variable part size
*/
55 /* placeholder structure for the maximum allowed request size
*/
56 /* this is used to construct the generic_request union
*/
57 struct request_max_size
59 int pad
[16]; /* the max request size is
16 ints
*/
62 #define FIRST_USER_HANDLE
0x0020 /* first possible value for low word of user handle
*/
63 #define LAST_USER_HANDLE
0xffef /* last possible value for low word of user handle
*/
66 /* definitions of the event data depending on the event code
*/
67 struct debug_event_exception
69 EXCEPTION_RECORD record
; /* exception record
*/
70 int first
; /* first chance exception?
*/
72 struct debug_event_create_thread
74 obj_handle_t handle
; /* handle to the new thread
*/
75 void
*teb
; /* thread
teb (in debugged process address space
) */
76 void
*start
; /* thread startup routine
*/
78 struct debug_event_create_process
80 obj_handle_t file
; /* handle to the process exe file
*/
81 obj_handle_t process
; /* handle to the new process
*/
82 obj_handle_t thread
; /* handle to the new thread
*/
83 void
*base
; /* base of executable image
*/
84 int dbg_offset
; /* offset of debug info in file
*/
85 int dbg_size
; /* size of debug info
*/
86 void
*teb
; /* thread
teb (in debugged process address space
) */
87 void
*start
; /* thread startup routine
*/
88 void
*name
; /* image
name (optional
) */
89 int unicode
; /* is it Unicode?
*/
91 struct debug_event_exit
93 int exit_code
; /* thread or process exit code
*/
95 struct debug_event_load_dll
97 obj_handle_t handle
; /* file handle for the dll
*/
98 void
*base
; /* base address of the dll
*/
99 int dbg_offset
; /* offset of debug info in file
*/
100 int dbg_size
; /* size of debug info
*/
101 void
*name
; /* image
name (optional
) */
102 int unicode
; /* is it Unicode?
*/
104 struct debug_event_unload_dll
106 void
*base
; /* base address of the dll
*/
108 struct debug_event_output_string
110 void
*string
; /* string to
display (in debugged process address space
) */
111 int unicode
; /* is it Unicode?
*/
112 int length
; /* string length
*/
114 struct debug_event_rip_info
119 union debug_event_data
121 struct debug_event_exception exception
;
122 struct debug_event_create_thread create_thread
;
123 struct debug_event_create_process create_process
;
124 struct debug_event_exit exit
;
125 struct debug_event_load_dll load_dll
;
126 struct debug_event_unload_dll unload_dll
;
127 struct debug_event_output_string output_string
;
128 struct debug_event_rip_info rip_info
;
131 /* debug event data
*/
134 int code
; /* event code
*/
135 union debug_event_data info
; /* event information
*/
138 /* structure used in sending an fd from client to server
*/
141 thread_id_t tid
; /* thread id
*/
142 int fd
; /* file descriptor on client
-side
*/
145 /* structure sent by the server on the wait fifo
*/
148 void
*cookie
; /* magic cookie that was passed in select_request
*/
149 int signaled
; /* wait result
*/
152 /* NT
-style timeout
, in
100ns units
, negative means relative timeout
*/
153 typedef __int64 timeout_t
;
154 #define
TIMEOUT_INFINITE (((timeout_t
)0x7fffffff) << 32 |
0xffffffff)
156 /* structure returned in the list of window properties
*/
159 atom_t atom
; /* property atom
*/
160 short string
; /* was atom a string originally?
*/
161 obj_handle_t handle
; /* handle stored in property
*/
164 /* structure to specify window rectangles
*/
173 /* structure for parameters of async I
/O calls
*/
176 void
*callback
; /* client
-side callback to call upon end of async
*/
177 void
*iosb
; /* I
/O status block in client addr space
*/
178 void
*arg
; /* opaque user data to pass to callback
*/
179 void
*apc
; /* user apc to call
*/
180 obj_handle_t event
; /* event to signal when done
*/
183 /* structures for extra message data
*/
185 struct callback_msg_data
187 void
*callback
; /* callback function
*/
188 unsigned long data
; /* user data for callback
*/
189 unsigned long result
; /* message result
*/
192 struct winevent_msg_data
194 user_handle_t hook
; /* hook handle
*/
195 thread_id_t tid
; /* thread id
*/
196 void
*hook_proc
; /* hook proc address
*/
197 /* followed by module name if any
*/
202 unsigned char bytes
[1]; /* raw data for sent messages
*/
203 struct callback_msg_data callback
;
204 struct winevent_msg_data winevent
;
207 /* structure for console char
/attribute info
*/
216 unsigned int low_part
;
220 #define MAX_ACL_LEN
65535
222 struct security_descriptor
224 unsigned int control
; /* SE_ flags
*/
225 data_size_t owner_len
;
226 data_size_t group_len
;
227 data_size_t sacl_len
;
228 data_size_t dacl_len
;
229 /* VARARGS(owner
,SID
); */
230 /* VARARGS(group
,SID
); */
231 /* VARARGS(sacl
,ACL
); */
232 /* VARARGS(dacl
,ACL
); */
238 /* unsigned int attributes
[count
]; */
239 /* VARARGS(sids
,SID
); */
265 enum apc_type type
; /* APC_USER
*/
266 void (__stdcall
*func
)(unsigned long
,unsigned long
,unsigned long
);
267 unsigned long args
[3]; /* arguments for user function
*/
271 enum apc_type type
; /* APC_TIMER
*/
272 void (__stdcall
*func
)(void
*, unsigned int
, unsigned int
);
273 timeout_t time
; /* absolute time of expiration
*/
274 void
*arg
; /* user argument
*/
278 enum apc_type type
; /* APC_ASYNC_IO
*/
279 unsigned
int (*func)(void*, void*, unsigned int);
280 void *user; /* user pointer */
281 void *sb; /* status block */
282 unsigned int status; /* I/O status */
286 enum apc_type type; /* APC_VIRTUAL_ALLOC */
287 void *addr; /* requested address */
288 unsigned long size; /* allocation size */
289 unsigned int zero_bits; /* allocation alignment */
290 unsigned int op_type; /* type of operation */
291 unsigned int prot; /* memory protection flags */
295 enum apc_type type; /* APC_VIRTUAL_FREE */
296 void *addr; /* requested address */
297 unsigned long size; /* allocation size */
298 unsigned int op_type; /* type of operation */
302 enum apc_type type; /* APC_VIRTUAL_QUERY */
303 const void *addr; /* requested address */
307 enum apc_type type; /* APC_VIRTUAL_PROTECT */
308 void *addr; /* requested address */
309 unsigned long size; /* requested address */
310 unsigned int prot; /* new protection flags */
314 enum apc_type type; /* APC_VIRTUAL_FLUSH */
315 const void *addr; /* requested address */
316 unsigned long size; /* requested address */
320 enum apc_type type; /* APC_VIRTUAL_LOCK */
321 void *addr; /* requested address */
322 unsigned long size; /* requested address */
326 enum apc_type type; /* APC_VIRTUAL_UNLOCK */
327 void *addr; /* requested address */
328 unsigned long size; /* requested address */
332 enum apc_type type; /* APC_MAP_VIEW */
333 obj_handle_t handle; /* mapping handle */
334 void *addr; /* requested address */
335 unsigned long size; /* allocation size */
336 unsigned int offset_low;/* file offset */
337 unsigned int offset_high;
338 unsigned int zero_bits; /* allocation alignment */
339 unsigned int alloc_type;/* allocation type */
340 unsigned int prot; /* memory protection flags */
344 enum apc_type type; /* APC_UNMAP_VIEW */
345 void *addr; /* view address */
349 enum apc_type type; /* APC_CREATE_THREAD */
350 void (__stdcall *func)(void*); /* start function
*/
351 void
*arg
; /* argument for start function
*/
352 unsigned long reserve
; /* reserve size for thread stack
*/
353 unsigned long commit
; /* commit size for thread stack
*/
354 int suspend
; /* suspended thread?
*/
363 enum apc_type type
; /* APC_ASYNC_IO
*/
364 unsigned int status
; /* new status of async operation
*/
368 enum apc_type type
; /* APC_VIRTUAL_ALLOC
*/
369 unsigned int status
; /* status returned by call
*/
370 void
*addr
; /* resulting address
*/
371 unsigned long size
; /* resulting size
*/
375 enum apc_type type
; /* APC_VIRTUAL_FREE
*/
376 unsigned int status
; /* status returned by call
*/
377 void
*addr
; /* resulting address
*/
378 unsigned long size
; /* resulting size
*/
382 enum apc_type type
; /* APC_VIRTUAL_QUERY
*/
383 unsigned int status
; /* status returned by call
*/
384 void
*base
; /* resulting base address
*/
385 void
*alloc_base
;/* resulting allocation base
*/
386 unsigned long size
; /* resulting region size
*/
387 unsigned int state
; /* resulting region state
*/
388 unsigned int prot
; /* resulting region protection
*/
389 unsigned int alloc_prot
;/* resulting allocation protection
*/
390 unsigned int alloc_type
;/* resulting region allocation type
*/
394 enum apc_type type
; /* APC_VIRTUAL_PROTECT
*/
395 unsigned int status
; /* status returned by call
*/
396 void
*addr
; /* resulting address
*/
397 unsigned long size
; /* resulting size
*/
398 unsigned int prot
; /* old protection flags
*/
402 enum apc_type type
; /* APC_VIRTUAL_FLUSH
*/
403 unsigned int status
; /* status returned by call
*/
404 const void
*addr
; /* resulting address
*/
405 unsigned long size
; /* resulting size
*/
409 enum apc_type type
; /* APC_VIRTUAL_LOCK
*/
410 unsigned int status
; /* status returned by call
*/
411 void
*addr
; /* resulting address
*/
412 unsigned long size
; /* resulting size
*/
416 enum apc_type type
; /* APC_VIRTUAL_UNLOCK
*/
417 unsigned int status
; /* status returned by call
*/
418 void
*addr
; /* resulting address
*/
419 unsigned long size
; /* resulting size
*/
423 enum apc_type type
; /* APC_MAP_VIEW
*/
424 unsigned int status
; /* status returned by call
*/
425 void
*addr
; /* resulting address
*/
426 unsigned long size
; /* resulting size
*/
430 enum apc_type type
; /* APC_MAP_VIEW
*/
431 unsigned int status
; /* status returned by call
*/
435 enum apc_type type
; /* APC_CREATE_THREAD
*/
436 unsigned int status
; /* status returned by call
*/
437 thread_id_t tid
; /* thread id
*/
438 obj_handle_t handle
; /* handle to new thread
*/
442 /****************************************************************/
443 /* Request declarations
*/
445 /* Create a new process from the context of the parent
*/
447 int inherit_all
; /* inherit all handles from parent
*/
448 unsigned int create_flags
; /* creation flags
*/
449 int socket_fd
; /* file descriptor for process socket
*/
450 obj_handle_t exe_file
; /* file handle for main exe
*/
451 obj_handle_t hstdin
; /* handle for stdin
*/
452 obj_handle_t hstdout
; /* handle for stdout
*/
453 obj_handle_t hstderr
; /* handle for stderr
*/
454 unsigned int process_access
; /* access rights for process object
*/
455 unsigned int process_attr
; /* attributes for process object
*/
456 unsigned int thread_access
; /* access rights for thread object
*/
457 unsigned int thread_attr
; /* attributes for thread object
*/
458 VARARG(info
,startup_info
); /* startup information
*/
459 VARARG(env
,unicode_str
); /* environment for new process
*/
461 obj_handle_t info
; /* new process info handle
*/
462 process_id_t pid
; /* process id
*/
463 obj_handle_t phandle
; /* process
handle (in the current process
) */
464 thread_id_t tid
; /* thread id
*/
465 obj_handle_t thandle
; /* thread
handle (in the current process
) */
469 /* Retrieve information about a newly started process
*/
470 @
REQ(get_new_process_info
)
471 obj_handle_t info
; /* info handle returned from new_process_request
*/
473 int success
; /* did the process start successfully?
*/
474 int exit_code
; /* process exit code if failed
*/
478 /* Create a new thread from the context of the parent
*/
480 unsigned int access
; /* wanted access rights
*/
481 unsigned int attributes
; /* object attributes
*/
482 int suspend
; /* new thread should be suspended on creation
*/
483 int request_fd
; /* fd for request pipe
*/
485 thread_id_t tid
; /* thread id
*/
486 obj_handle_t handle
; /* thread
handle (in the current process
) */
490 /* Retrieve the new process startup info
*/
491 @
REQ(get_startup_info
)
493 obj_handle_t exe_file
; /* file handle for main exe
*/
494 obj_handle_t hstdin
; /* handle for stdin
*/
495 obj_handle_t hstdout
; /* handle for stdout
*/
496 obj_handle_t hstderr
; /* handle for stderr
*/
497 VARARG(info
,startup_info
); /* startup information
*/
498 VARARG(env
,unicode_str
); /* environment
*/
502 /* Signal the end of the process initialization
*/
503 @
REQ(init_process_done
)
504 void
* module
; /* main module base address
*/
505 void
* entry
; /* process entry point
*/
506 int gui
; /* is it a GUI process?
*/
510 /* Initialize a thread
; called from the child after
fork()/clone() */
512 int unix_pid
; /* Unix pid of new thread
*/
513 int unix_tid
; /* Unix tid of new thread
*/
514 int debug_level
; /* new debug level
*/
515 void
* teb
; /* TEB of new
thread (in thread address space
) */
516 void
* peb
; /* address of
PEB (in thread address space
) */
517 void
* entry
; /* thread entry
point (in thread address space
) */
518 void
* ldt_copy
; /* address of LDT
copy (in thread address space
) */
519 int reply_fd
; /* fd for reply pipe
*/
520 int wait_fd
; /* fd for blocking calls pipe
*/
522 process_id_t pid
; /* process id of the new thread
's process */
523 thread_id_t tid; /* thread id of the new thread */
524 data_size_t info_size; /* total size of startup info */
525 timeout_t server_start; /* server start time */
526 int version; /* protocol version */
530 /* Terminate a process */
531 @REQ(terminate_process)
532 obj_handle_t handle; /* process handle to terminate */
533 int exit_code; /* process exit code */
535 int self; /* suicide? */
539 /* Terminate a thread */
540 @REQ(terminate_thread)
541 obj_handle_t handle; /* thread handle to terminate */
542 int exit_code; /* thread exit code */
544 int self; /* suicide? */
545 int last; /* last thread in this process? */
549 /* Retrieve information about a process */
550 @REQ(get_process_info)
551 obj_handle_t handle; /* process handle */
553 process_id_t pid; /* server process id */
554 process_id_t ppid; /* server process id of parent */
555 int exit_code; /* process exit code */
556 int priority; /* priority class */
557 int affinity; /* process affinity mask */
558 void* peb; /* PEB address in process address space */
559 timeout_t start_time; /* process start time */
560 timeout_t end_time; /* process end time */
564 /* Set a process informations */
565 @REQ(set_process_info)
566 obj_handle_t handle; /* process handle */
567 int mask; /* setting mask (see below) */
568 int priority; /* priority class */
569 int affinity; /* affinity mask */
571 #define SET_PROCESS_INFO_PRIORITY 0x01
572 #define SET_PROCESS_INFO_AFFINITY 0x02
575 /* Retrieve information about a thread */
576 @REQ(get_thread_info)
577 obj_handle_t handle; /* thread handle */
578 thread_id_t tid_in; /* thread id (optional) */
580 process_id_t pid; /* server process id */
581 thread_id_t tid; /* server thread id */
582 void* teb; /* thread teb pointer */
583 int exit_code; /* thread exit code */
584 int priority; /* thread priority level */
585 int affinity; /* thread affinity mask */
586 timeout_t creation_time; /* thread creation time */
587 timeout_t exit_time; /* thread exit time */
588 int last; /* last thread in process */
592 /* Set a thread informations */
593 @REQ(set_thread_info)
594 obj_handle_t handle; /* thread handle */
595 int mask; /* setting mask (see below) */
596 int priority; /* priority class */
597 int affinity; /* affinity mask */
598 obj_handle_t token; /* impersonation token */
600 #define SET_THREAD_INFO_PRIORITY 0x01
601 #define SET_THREAD_INFO_AFFINITY 0x02
602 #define SET_THREAD_INFO_TOKEN 0x04
605 /* Retrieve information about a module */
607 obj_handle_t handle; /* process handle */
608 void* base_address; /* base address of module */
610 size_t size; /* module size */
612 VARARG(filename,unicode_str); /* file name of module */
616 /* Suspend a thread */
618 obj_handle_t handle; /* thread handle */
620 int count; /* new suspend count */
624 /* Resume a thread */
626 obj_handle_t handle; /* thread handle */
628 int count; /* new suspend count */
632 /* Notify the server that a dll has been loaded */
634 obj_handle_t handle; /* file handle */
635 void* base; /* base address */
636 size_t size; /* dll size */
637 int dbg_offset; /* debug info offset */
638 int dbg_size; /* debug info size */
639 void* name; /* ptr to ptr to name (in process addr space) */
640 VARARG(filename,unicode_str); /* file name of dll */
644 /* Notify the server that a dll is being unloaded */
646 void* base; /* base address */
650 /* Queue an APC for a thread or process */
652 obj_handle_t thread; /* thread handle */
653 obj_handle_t process; /* process handle */
654 apc_call_t call; /* call arguments */
656 obj_handle_t handle; /* APC handle */
657 int self; /* run APC in caller itself? */
661 /* Get the result of an APC call */
663 obj_handle_t handle; /* handle to the APC */
665 apc_result_t result; /* result of the APC */
669 /* Close a handle for the current process */
671 obj_handle_t handle; /* handle to close */
675 /* Set a handle information */
676 @REQ(set_handle_info)
677 obj_handle_t handle; /* handle we are interested in */
678 int flags; /* new handle flags */
679 int mask; /* mask for flags to set */
681 int old_flags; /* old flag value */
685 /* Duplicate a handle */
687 obj_handle_t src_process; /* src process handle */
688 obj_handle_t src_handle; /* src handle to duplicate */
689 obj_handle_t dst_process; /* dst process handle */
690 unsigned int access; /* wanted access rights */
691 unsigned int attributes; /* object attributes */
692 unsigned int options; /* duplicate options (see below) */
694 obj_handle_t handle; /* duplicated handle in dst process */
695 int self; /* is the source the current process? */
696 int closed; /* whether the source handle has been closed */
698 #define DUP_HANDLE_CLOSE_SOURCE DUPLICATE_CLOSE_SOURCE
699 #define DUP_HANDLE_SAME_ACCESS DUPLICATE_SAME_ACCESS
700 #define DUP_HANDLE_MAKE_GLOBAL 0x80000000 /* Not a Windows flag */
703 /* Open a handle to a process */
705 process_id_t pid; /* process id to open */
706 unsigned int access; /* wanted access rights */
707 unsigned int attributes; /* object attributes */
709 obj_handle_t handle; /* handle to the process */
713 /* Open a handle to a thread */
715 thread_id_t tid; /* thread id to open */
716 unsigned int access; /* wanted access rights */
717 unsigned int attributes; /* object attributes */
719 obj_handle_t handle; /* handle to the thread */
723 /* Wait for handles */
725 int flags; /* wait flags (see below) */
726 void* cookie; /* magic cookie to return to client */
727 obj_handle_t signal; /* object to signal (0 if none) */
728 obj_handle_t prev_apc; /* handle to previous APC */
729 timeout_t timeout; /* timeout */
730 VARARG(result,apc_result); /* result of previous APC */
731 VARARG(handles,handles); /* handles to select on */
733 obj_handle_t apc_handle; /* handle to next APC */
734 timeout_t timeout; /* timeout converted to absolute */
735 apc_call_t call; /* APC call arguments */
738 #define SELECT_ALERTABLE 2
739 #define SELECT_INTERRUPTIBLE 4
742 /* Create an event */
744 unsigned int access; /* wanted access rights */
745 unsigned int attributes; /* object attributes */
746 obj_handle_t rootdir; /* root directory */
747 int manual_reset; /* manual reset event */
748 int initial_state; /* initial state of the event */
749 VARARG(name,unicode_str); /* object name */
751 obj_handle_t handle; /* handle to the event */
754 /* Event operation */
756 obj_handle_t handle; /* handle to event */
757 int op; /* event operation (see below) */
759 enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT };
764 unsigned int access; /* wanted access rights */
765 unsigned int attributes; /* object attributes */
766 obj_handle_t rootdir; /* root directory */
767 VARARG(name,unicode_str); /* object name */
769 obj_handle_t handle; /* handle to the event */
775 unsigned int access; /* wanted access rights */
776 unsigned int attributes; /* object attributes */
777 obj_handle_t rootdir; /* root directory */
778 int owned; /* initially owned? */
779 VARARG(name,unicode_str); /* object name */
781 obj_handle_t handle; /* handle to the mutex */
785 /* Release a mutex */
787 obj_handle_t handle; /* handle to the mutex */
789 unsigned int prev_count; /* value of internal counter, before release */
795 unsigned int access; /* wanted access rights */
796 unsigned int attributes; /* object attributes */
797 obj_handle_t rootdir; /* root directory */
798 VARARG(name,unicode_str); /* object name */
800 obj_handle_t handle; /* handle to the mutex */
804 /* Create a semaphore */
805 @REQ(create_semaphore)
806 unsigned int access; /* wanted access rights */
807 unsigned int attributes; /* object attributes */
808 obj_handle_t rootdir; /* root directory */
809 unsigned int initial; /* initial count */
810 unsigned int max; /* maximum count */
811 VARARG(name,unicode_str); /* object name */
813 obj_handle_t handle; /* handle to the semaphore */
817 /* Release a semaphore */
818 @REQ(release_semaphore)
819 obj_handle_t handle; /* handle to the semaphore */
820 unsigned int count; /* count to add to semaphore */
822 unsigned int prev_count; /* previous semaphore count */
826 /* Open a semaphore */
828 unsigned int access; /* wanted access rights */
829 unsigned int attributes; /* object attributes */
830 obj_handle_t rootdir; /* root directory */
831 VARARG(name,unicode_str); /* object name */
833 obj_handle_t handle; /* handle to the semaphore */
839 unsigned int access; /* wanted access rights */
840 unsigned int attributes; /* object attributes */
841 unsigned int sharing; /* sharing flags */
842 int create; /* file create action */
843 unsigned int options; /* file options */
844 unsigned int attrs; /* file attributes for creation */
845 VARARG(filename,string); /* file name */
847 obj_handle_t handle; /* handle to the file */
851 /* Open a file object */
852 @REQ(open_file_object)
853 unsigned int access; /* wanted access rights */
854 unsigned int attributes; /* open attributes */
855 obj_handle_t rootdir; /* root directory */
856 unsigned int sharing; /* sharing flags */
857 unsigned int options; /* file options */
858 VARARG(filename,unicode_str); /* file name */
860 obj_handle_t handle; /* handle to the file */
864 /* Allocate a file handle for a Unix fd */
865 @REQ(alloc_file_handle)
866 unsigned int access; /* wanted access rights */
867 unsigned int attributes; /* object attributes */
868 int fd; /* file descriptor on the client side */
870 obj_handle_t handle; /* handle to the file */
874 /* Get a Unix fd to access a file */
876 obj_handle_t handle; /* handle to the file */
878 int type; /* file type (see below) */
879 int removable; /* is file removable? */
880 unsigned int access; /* file access rights */
881 unsigned int options; /* file open options */
885 FD_TYPE_INVALID, /* invalid file (no associated fd) */
886 FD_TYPE_FILE, /* regular file */
887 FD_TYPE_DIR, /* directory */
888 FD_TYPE_SOCKET, /* socket */
889 FD_TYPE_SERIAL, /* serial port */
890 FD_TYPE_PIPE, /* named pipe */
891 FD_TYPE_MAILSLOT, /* mailslot */
892 FD_TYPE_CHAR, /* unspecified char device */
893 FD_TYPE_DEVICE, /* Windows device file */
898 /* Flush a file buffers */
900 obj_handle_t handle; /* handle to the file */
902 obj_handle_t event; /* event set when finished */
906 /* Lock a region of a file */
908 obj_handle_t handle; /* handle to the file */
909 unsigned int offset_low; /* offset of start of lock */
910 unsigned int offset_high; /* offset of start of lock */
911 unsigned int count_low; /* count of bytes to lock */
912 unsigned int count_high; /* count of bytes to lock */
913 int shared; /* shared or exclusive lock? */
914 int wait; /* do we want to wait? */
916 obj_handle_t handle; /* handle to wait on */
917 int overlapped; /* is it an overlapped I/O handle? */
921 /* Unlock a region of a file */
923 obj_handle_t handle; /* handle to the file */
924 unsigned int offset_low; /* offset of start of unlock */
925 unsigned int offset_high; /* offset of start of unlock */
926 unsigned int count_low; /* count of bytes to unlock */
927 unsigned int count_high; /* count of bytes to unlock */
931 /* Create a socket */
933 unsigned int access; /* wanted access rights */
934 unsigned int attributes; /* object attributes */
935 int family; /* family, see socket manpage */
936 int type; /* type, see socket manpage */
937 int protocol; /* protocol, see socket manpage */
938 unsigned int flags; /* socket flags */
940 obj_handle_t handle; /* handle to the new socket */
944 /* Accept a socket */
946 obj_handle_t lhandle; /* handle to the listening socket */
947 unsigned int access; /* wanted access rights */
948 unsigned int attributes; /* object attributes */
950 obj_handle_t handle; /* handle to the new socket */
954 /* Set socket event parameters */
955 @REQ(set_socket_event)
956 obj_handle_t handle; /* handle to the socket */
957 unsigned int mask; /* event mask */
958 obj_handle_t event; /* event object */
959 user_handle_t window; /* window to send the message to */
960 unsigned int msg; /* message to send */
964 /* Get socket event parameters */
965 @REQ(get_socket_event)
966 obj_handle_t handle; /* handle to the socket */
967 int service; /* clear pending? */
968 obj_handle_t c_event; /* event to clear */
970 unsigned int mask; /* event mask */
971 unsigned int pmask; /* pending events */
972 unsigned int state; /* status bits */
973 VARARG(errors,ints); /* event errors */
977 /* Reenable pending socket events */
978 @REQ(enable_socket_event)
979 obj_handle_t handle; /* handle to the socket */
980 unsigned int mask; /* events to re-enable */
981 unsigned int sstate; /* status bits to set */
982 unsigned int cstate; /* status bits to clear */
985 @REQ(set_socket_deferred)
986 obj_handle_t handle; /* handle to the socket */
987 obj_handle_t deferred; /* handle to the socket for which accept() is deferred */
990 /* Allocate a console (only used by a console renderer) */
992 unsigned int access; /* wanted access rights */
993 unsigned int attributes; /* object attributes */
994 process_id_t pid; /* pid of process which shall be attached to the console */
996 obj_handle_t handle_in; /* handle to console input */
997 obj_handle_t event; /* handle to renderer events change notification */
1001 /* Free the console of the current process */
1006 #define CONSOLE_RENDERER_NONE_EVENT 0x00
1007 #define CONSOLE_RENDERER_TITLE_EVENT 0x01
1008 #define CONSOLE_RENDERER_ACTIVE_SB_EVENT 0x02
1009 #define CONSOLE_RENDERER_SB_RESIZE_EVENT 0x03
1010 #define CONSOLE_RENDERER_UPDATE_EVENT 0x04
1011 #define CONSOLE_RENDERER_CURSOR_POS_EVENT 0x05
1012 #define CONSOLE_RENDERER_CURSOR_GEOM_EVENT 0x06
1013 #define CONSOLE_RENDERER_DISPLAY_EVENT 0x07
1014 #define CONSOLE_RENDERER_EXIT_EVENT 0x08
1015 struct console_renderer_event
1050 /* retrieve console events for the renderer */
1051 @REQ(get_console_renderer_events)
1052 obj_handle_t handle; /* handle to console input events */
1054 VARARG(data,bytes); /* the various console_renderer_events */
1058 /* Open a handle to the process console */
1060 obj_handle_t from; /* 0 (resp 1) input (resp output) of current process console */
1061 /* otherwise console_in handle to get active screen buffer? */
1062 unsigned int access; /* wanted access rights */
1063 unsigned int attributes; /* object attributes */
1064 int share; /* share mask (only for output handles) */
1066 obj_handle_t handle; /* handle to the console */
1070 /* Get the input queue wait event */
1071 @REQ(get_console_wait_event)
1073 obj_handle_t handle;
1076 /* Get a console mode (input or output) */
1077 @REQ(get_console_mode)
1078 obj_handle_t handle; /* handle to the console */
1080 int mode; /* console mode */
1084 /* Set a console mode (input or output) */
1085 @REQ(set_console_mode)
1086 obj_handle_t handle; /* handle to the console */
1087 int mode; /* console mode */
1091 /* Set info about a console (input only) */
1092 @REQ(set_console_input_info)
1093 obj_handle_t handle; /* handle to console input, or 0 for process' console
*/
1094 int mask
; /* setting
mask (see below
) */
1095 obj_handle_t active_sb
; /* active screen buffer
*/
1096 int history_mode
; /* whether we duplicate lines in history
*/
1097 int history_size
; /* number of lines in history
*/
1098 int edition_mode
; /* index to the edition mode flavors
*/
1099 int input_cp
; /* console input codepage
*/
1100 int output_cp
; /* console output codepage
*/
1101 user_handle_t win
; /* console window if backend supports it
*/
1102 VARARG(title
,unicode_str
); /* console title
*/
1104 #define SET_CONSOLE_INPUT_INFO_ACTIVE_SB
0x01
1105 #define SET_CONSOLE_INPUT_INFO_TITLE
0x02
1106 #define SET_CONSOLE_INPUT_INFO_HISTORY_MODE
0x04
1107 #define SET_CONSOLE_INPUT_INFO_HISTORY_SIZE
0x08
1108 #define SET_CONSOLE_INPUT_INFO_EDITION_MODE
0x10
1109 #define SET_CONSOLE_INPUT_INFO_INPUT_CODEPAGE
0x20
1110 #define SET_CONSOLE_INPUT_INFO_OUTPUT_CODEPAGE
0x40
1111 #define SET_CONSOLE_INPUT_INFO_WIN
0x80
1114 /* Get info about a
console (input only
) */
1115 @
REQ(get_console_input_info
)
1116 obj_handle_t handle
; /* handle to console input
, or
0 for process
' console */
1118 int history_mode; /* whether we duplicate lines in history */
1119 int history_size; /* number of lines in history */
1120 int history_index; /* number of used lines in history */
1121 int edition_mode; /* index to the edition mode flavors */
1122 int input_cp; /* console input codepage */
1123 int output_cp; /* console output codepage */
1124 user_handle_t win; /* console window if backend supports it */
1125 VARARG(title,unicode_str); /* console title */
1129 /* appends a string to console's history
*/
1130 @
REQ(append_console_input_history
)
1131 obj_handle_t handle
; /* handle to console input
, or
0 for process
' console */
1132 VARARG(line,unicode_str); /* line to add */
1136 /* appends a string to console's history
*/
1137 @
REQ(get_console_input_history
)
1138 obj_handle_t handle
; /* handle to console input
, or
0 for process
' console */
1139 int index; /* index to get line from */
1141 int total; /* total length of line in Unicode chars */
1142 VARARG(line,unicode_str); /* line to add */
1146 /* creates a new screen buffer on process' console
*/
1147 @
REQ(create_console_output
)
1148 obj_handle_t handle_in
; /* handle to console input
, or
0 for process
' console */
1149 unsigned int access; /* wanted access rights */
1150 unsigned int attributes; /* object attributes */
1151 unsigned int share; /* sharing credentials */
1153 obj_handle_t handle_out; /* handle to the screen buffer */
1157 /* Set info about a console (output only) */
1158 @REQ(set_console_output_info)
1159 obj_handle_t handle; /* handle to the console */
1160 int mask; /* setting mask (see below) */
1161 short int cursor_size; /* size of cursor (percentage filled) */
1162 short int cursor_visible;/* cursor visibility flag */
1163 short int cursor_x; /* position of cursor (x, y) */
1165 short int width; /* width of the screen buffer */
1166 short int height; /* height of the screen buffer */
1167 short int attr; /* default attribute */
1168 short int win_left; /* window actually displayed by renderer */
1169 short int win_top; /* the rect area is expressed withing the */
1170 short int win_right; /* boundaries of the screen buffer */
1171 short int win_bottom;
1172 short int max_width; /* maximum size (width x height) for the window */
1173 short int max_height;
1175 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_GEOM 0x01
1176 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_POS 0x02
1177 #define SET_CONSOLE_OUTPUT_INFO_SIZE 0x04
1178 #define SET_CONSOLE_OUTPUT_INFO_ATTR 0x08
1179 #define SET_CONSOLE_OUTPUT_INFO_DISPLAY_WINDOW 0x10
1180 #define SET_CONSOLE_OUTPUT_INFO_MAX_SIZE 0x20
1183 /* Get info about a console (output only) */
1184 @REQ(get_console_output_info)
1185 obj_handle_t handle; /* handle to the console */
1187 short int cursor_size; /* size of cursor (percentage filled) */
1188 short int cursor_visible;/* cursor visibility flag */
1189 short int cursor_x; /* position of cursor (x, y) */
1191 short int width; /* width of the screen buffer */
1192 short int height; /* height of the screen buffer */
1193 short int attr; /* default attribute */
1194 short int win_left; /* window actually displayed by renderer */
1195 short int win_top; /* the rect area is expressed withing the */
1196 short int win_right; /* boundaries of the screen buffer */
1197 short int win_bottom;
1198 short int max_width; /* maximum size (width x height) for the window */
1199 short int max_height;
1202 /* Add input records to a console input queue */
1203 @REQ(write_console_input)
1204 obj_handle_t handle; /* handle to the console input */
1205 VARARG(rec,input_records); /* input records */
1207 int written; /* number of records written */
1211 /* Fetch input records from a console input queue */
1212 @REQ(read_console_input)
1213 obj_handle_t handle; /* handle to the console input */
1214 int flush; /* flush the retrieved records from the queue? */
1216 int read; /* number of records read */
1217 VARARG(rec,input_records); /* input records */
1221 /* write data (chars and/or attributes) in a screen buffer */
1222 @REQ(write_console_output)
1223 obj_handle_t handle; /* handle to the console output */
1224 int x; /* position where to start writing */
1226 int mode; /* char info (see below) */
1227 int wrap; /* wrap around at end of line? */
1228 VARARG(data,bytes); /* info to write */
1230 int written; /* number of char infos actually written */
1231 int width; /* width of screen buffer */
1232 int height; /* height of screen buffer */
1236 CHAR_INFO_MODE_TEXT, /* characters only */
1237 CHAR_INFO_MODE_ATTR, /* attributes only */
1238 CHAR_INFO_MODE_TEXTATTR, /* both characters and attributes */
1239 CHAR_INFO_MODE_TEXTSTDATTR /* characters but use standard attributes */
1243 /* fill a screen buffer with constant data (chars and/or attributes) */
1244 @REQ(fill_console_output)
1245 obj_handle_t handle; /* handle to the console output */
1246 int x; /* position where to start writing */
1248 int mode; /* char info mode */
1249 int count; /* number to write */
1250 int wrap; /* wrap around at end of line? */
1251 char_info_t data; /* data to write */
1253 int written; /* number of char infos actually written */
1257 /* read data (chars and/or attributes) from a screen buffer */
1258 @REQ(read_console_output)
1259 obj_handle_t handle; /* handle to the console output */
1260 int x; /* position (x,y) where to start reading */
1262 int mode; /* char info mode */
1263 int wrap; /* wrap around at end of line? */
1265 int width; /* width of screen buffer */
1266 int height; /* height of screen buffer */
1271 /* move a rect (of data) in screen buffer content */
1272 @REQ(move_console_output)
1273 obj_handle_t handle; /* handle to the console output */
1274 short int x_src; /* position (x, y) of rect to start moving from */
1276 short int x_dst; /* position (x, y) of rect to move to */
1278 short int w; /* size of the rect (width, height) to move */
1283 /* Sends a signal to a process group */
1284 @REQ(send_console_signal)
1285 int signal; /* the signal to send */
1286 process_id_t group_id; /* the group to send the signal to */
1290 /* enable directory change notifications */
1291 @REQ(read_directory_changes)
1292 unsigned int filter; /* notification filter */
1293 obj_handle_t handle; /* handle to the directory */
1294 int subtree; /* watch the subtree? */
1295 int want_data; /* flag indicating whether change data should be collected */
1296 async_data_t async; /* async I/O parameters */
1301 obj_handle_t handle;
1303 int action; /* type of change */
1304 VARARG(name,string); /* name of directory entry that changed */
1308 /* Create a file mapping */
1309 @REQ(create_mapping)
1310 unsigned int access; /* wanted access rights */
1311 unsigned int attributes; /* object attributes */
1312 obj_handle_t rootdir; /* root directory */
1313 int size_high; /* mapping size */
1314 int size_low; /* mapping size */
1315 int protect; /* protection flags (see below) */
1316 obj_handle_t file_handle; /* file handle */
1317 VARARG(name,unicode_str); /* object name */
1319 obj_handle_t handle; /* handle to the mapping */
1321 /* protection flags */
1322 #define VPROT_READ 0x01
1323 #define VPROT_WRITE 0x02
1324 #define VPROT_EXEC 0x04
1325 #define VPROT_WRITECOPY 0x08
1326 #define VPROT_GUARD 0x10
1327 #define VPROT_NOCACHE 0x20
1328 #define VPROT_COMMITTED 0x40
1329 #define VPROT_IMAGE 0x80
1332 /* Open a mapping */
1334 unsigned int access; /* wanted access rights */
1335 unsigned int attributes; /* object attributes */
1336 obj_handle_t rootdir; /* root directory */
1337 VARARG(name,unicode_str); /* object name */
1339 obj_handle_t handle; /* handle to the mapping */
1343 /* Get information about a file mapping */
1344 @REQ(get_mapping_info)
1345 obj_handle_t handle; /* handle to the mapping */
1347 int size_high; /* mapping size */
1348 int size_low; /* mapping size */
1349 int protect; /* protection flags */
1350 int header_size; /* header size (for VPROT_IMAGE mapping) */
1351 void* base; /* default base addr (for VPROT_IMAGE mapping) */
1352 obj_handle_t mapping; /* duplicate mapping handle unless removable */
1353 obj_handle_t shared_file; /* shared mapping file handle */
1354 int shared_size; /* shared mapping size */
1358 #define SNAP_HEAPLIST 0x00000001
1359 #define SNAP_PROCESS 0x00000002
1360 #define SNAP_THREAD 0x00000004
1361 #define SNAP_MODULE 0x00000008
1362 /* Create a snapshot */
1363 @REQ(create_snapshot)
1364 unsigned int attributes; /* object attributes */
1365 int flags; /* snapshot flags (SNAP_*) */
1366 process_id_t pid; /* process id */
1368 obj_handle_t handle; /* handle to the snapshot */
1372 /* Get the next process from a snapshot */
1374 obj_handle_t handle; /* handle to the snapshot */
1375 int reset; /* reset snapshot position? */
1377 int count; /* process usage count */
1378 process_id_t pid; /* process id */
1379 process_id_t ppid; /* parent process id */
1380 void* heap; /* heap base */
1381 void* module; /* main module */
1382 int threads; /* number of threads */
1383 int priority; /* process priority */
1384 int handles; /* number of handles */
1385 VARARG(filename,unicode_str); /* file name of main exe */
1389 /* Get the next thread from a snapshot */
1391 obj_handle_t handle; /* handle to the snapshot */
1392 int reset; /* reset snapshot position? */
1394 int count; /* thread usage count */
1395 process_id_t pid; /* process id */
1396 thread_id_t tid; /* thread id */
1397 int base_pri; /* base priority */
1398 int delta_pri; /* delta priority */
1402 /* Get the next module from a snapshot */
1404 obj_handle_t handle; /* handle to the snapshot */
1405 int reset; /* reset snapshot position? */
1407 process_id_t pid; /* process id */
1408 void* base; /* module base address */
1409 size_t size; /* module size */
1410 VARARG(filename,unicode_str); /* file name of module */
1414 /* Wait for a debug event */
1415 @REQ(wait_debug_event)
1416 int get_handle; /* should we alloc a handle for waiting? */
1418 process_id_t pid; /* process id */
1419 thread_id_t tid; /* thread id */
1420 obj_handle_t wait; /* wait handle if no event ready */
1421 VARARG(event,debug_event); /* debug event data */
1425 /* Queue an exception event */
1426 @REQ(queue_exception_event)
1427 int first; /* first chance exception? */
1428 VARARG(record,exc_event); /* thread context followed by exception record */
1430 obj_handle_t handle; /* handle to the queued event */
1434 /* Retrieve the status of an exception event */
1435 @REQ(get_exception_status)
1436 obj_handle_t handle; /* handle to the queued event */
1438 VARARG(context,context); /* modified thread context */
1442 /* Send an output string to the debugger */
1443 @REQ(output_debug_string)
1444 void* string; /* string to display (in debugged process address space) */
1445 int unicode; /* is it Unicode? */
1446 int length; /* string length */
1450 /* Continue a debug event */
1451 @REQ(continue_debug_event)
1452 process_id_t pid; /* process id to continue */
1453 thread_id_t tid; /* thread id to continue */
1454 int status; /* continuation status */
1458 /* Start/stop debugging an existing process */
1460 process_id_t pid; /* id of the process to debug */
1461 int attach; /* 1=attaching / 0=detaching from the process */
1465 /* Simulate a breakpoint in a process */
1467 obj_handle_t handle; /* process handle */
1469 int self; /* was it the caller itself? */
1473 /* Set debugger kill on exit flag */
1474 @REQ(set_debugger_kill_on_exit)
1475 int kill_on_exit; /* 0=detach/1=kill debuggee when debugger dies */
1479 /* Read data from a process address space */
1480 @REQ(read_process_memory)
1481 obj_handle_t handle; /* process handle */
1482 void* addr; /* addr to read from */
1484 VARARG(data,bytes); /* result data */
1488 /* Write data to a process address space */
1489 @REQ(write_process_memory)
1490 obj_handle_t handle; /* process handle */
1491 void* addr; /* addr to write to */
1492 VARARG(data,bytes); /* data to write */
1496 /* Create a registry key */
1498 obj_handle_t parent; /* handle to the parent key */
1499 unsigned int access; /* desired access rights */
1500 unsigned int attributes; /* object attributes */
1501 unsigned int options; /* creation options */
1502 time_t modif; /* last modification time */
1503 data_size_t namelen; /* length of key name in bytes */
1504 VARARG(name,unicode_str,namelen); /* key name */
1505 VARARG(class,unicode_str); /* class name */
1507 obj_handle_t hkey; /* handle to the created key */
1508 int created; /* has it been newly created? */
1511 /* Open a registry key */
1513 obj_handle_t parent; /* handle to the parent key */
1514 unsigned int access; /* desired access rights */
1515 unsigned int attributes; /* object attributes */
1516 VARARG(name,unicode_str); /* key name */
1518 obj_handle_t hkey; /* handle to the open key */
1522 /* Delete a registry key */
1524 obj_handle_t hkey; /* handle to the key */
1528 /* Flush a registry key */
1530 obj_handle_t hkey; /* handle to the key */
1534 /* Enumerate registry subkeys */
1536 obj_handle_t hkey; /* handle to registry key */
1537 int index; /* index of subkey (or -1 for current key) */
1538 int info_class; /* requested information class */
1540 int subkeys; /* number of subkeys */
1541 int max_subkey; /* longest subkey name */
1542 int max_class; /* longest class name */
1543 int values; /* number of values */
1544 int max_value; /* longest value name */
1545 int max_data; /* longest value data */
1546 time_t modif; /* last modification time */
1547 data_size_t total; /* total length needed for full name and class */
1548 data_size_t namelen; /* length of key name in bytes */
1549 VARARG(name,unicode_str,namelen); /* key name */
1550 VARARG(class,unicode_str); /* class name */
1554 /* Set a value of a registry key */
1556 obj_handle_t hkey; /* handle to registry key */
1557 int type; /* value type */
1558 data_size_t namelen; /* length of value name in bytes */
1559 VARARG(name,unicode_str,namelen); /* value name */
1560 VARARG(data,bytes); /* value data */
1564 /* Retrieve the value of a registry key */
1566 obj_handle_t hkey; /* handle to registry key */
1567 VARARG(name,unicode_str); /* value name */
1569 int type; /* value type */
1570 data_size_t total; /* total length needed for data */
1571 VARARG(data,bytes); /* value data */
1575 /* Enumerate a value of a registry key */
1576 @REQ(enum_key_value)
1577 obj_handle_t hkey; /* handle to registry key */
1578 int index; /* value index */
1579 int info_class; /* requested information class */
1581 int type; /* value type */
1582 data_size_t total; /* total length needed for full name and data */
1583 data_size_t namelen; /* length of value name in bytes */
1584 VARARG(name,unicode_str,namelen); /* value name */
1585 VARARG(data,bytes); /* value data */
1589 /* Delete a value of a registry key */
1590 @REQ(delete_key_value)
1591 obj_handle_t hkey; /* handle to registry key */
1592 VARARG(name,unicode_str); /* value name */
1596 /* Load a registry branch from a file */
1598 obj_handle_t hkey; /* root key to load to */
1599 obj_handle_t file; /* file to load from */
1600 VARARG(name,unicode_str); /* subkey name */
1604 /* UnLoad a registry branch from a file */
1605 @REQ(unload_registry)
1606 obj_handle_t hkey; /* root key to unload to */
1610 /* Save a registry branch to a file */
1612 obj_handle_t hkey; /* key to save */
1613 obj_handle_t file; /* file to save to */
1617 /* Add a registry key change notification */
1618 @REQ(set_registry_notification)
1619 obj_handle_t hkey; /* key to watch for changes */
1620 obj_handle_t event; /* event to set */
1621 int subtree; /* should we watch the whole subtree? */
1622 unsigned int filter; /* things to watch */
1626 /* Create a waitable timer */
1628 unsigned int access; /* wanted access rights */
1629 unsigned int attributes; /* object attributes */
1630 obj_handle_t rootdir; /* root directory */
1631 int manual; /* manual reset */
1632 VARARG(name,unicode_str); /* object name */
1634 obj_handle_t handle; /* handle to the timer */
1638 /* Open a waitable timer */
1640 unsigned int access; /* wanted access rights */
1641 unsigned int attributes; /* object attributes */
1642 obj_handle_t rootdir; /* root directory */
1643 VARARG(name,unicode_str); /* object name */
1645 obj_handle_t handle; /* handle to the timer */
1648 /* Set a waitable timer */
1650 obj_handle_t handle; /* handle to the timer */
1651 timeout_t expire; /* next expiration absolute time */
1652 int period; /* timer period in ms */
1653 void* callback; /* callback function */
1654 void* arg; /* callback argument */
1656 int signaled; /* was the timer signaled before this call ? */
1659 /* Cancel a waitable timer */
1661 obj_handle_t handle; /* handle to the timer */
1663 int signaled; /* was the timer signaled before this calltime ? */
1666 /* Get information on a waitable timer */
1667 @REQ(get_timer_info)
1668 obj_handle_t handle; /* handle to the timer */
1670 timeout_t when; /* absolute time when the timer next expires */
1671 int signaled; /* is the timer signaled? */
1675 /* Retrieve the current context of a thread */
1676 @REQ(get_thread_context)
1677 obj_handle_t handle; /* thread handle */
1678 unsigned int flags; /* context flags */
1679 int suspend; /* if getting context during suspend */
1681 int self; /* was it a handle to the current thread? */
1682 VARARG(context,context); /* thread context */
1686 /* Set the current context of a thread */
1687 @REQ(set_thread_context)
1688 obj_handle_t handle; /* thread handle */
1689 unsigned int flags; /* context flags */
1690 int suspend; /* if setting context during suspend */
1691 VARARG(context,context); /* thread context */
1693 int self; /* was it a handle to the current thread? */
1697 /* Fetch a selector entry for a thread */
1698 @REQ(get_selector_entry)
1699 obj_handle_t handle; /* thread handle */
1700 int entry; /* LDT entry */
1702 unsigned int base; /* selector base */
1703 unsigned int limit; /* selector limit */
1704 unsigned char flags; /* selector flags */
1710 obj_handle_t table; /* which table to add atom to */
1711 VARARG(name,unicode_str); /* atom name */
1713 atom_t atom; /* resulting atom */
1717 /* Delete an atom */
1719 obj_handle_t table; /* which table to delete atom from */
1720 atom_t atom; /* atom handle */
1726 obj_handle_t table; /* which table to find atom from */
1727 VARARG(name,unicode_str); /* atom name */
1729 atom_t atom; /* atom handle */
1733 /* Get information about an atom */
1734 @REQ(get_atom_information)
1735 obj_handle_t table; /* which table to find atom from */
1736 atom_t atom; /* atom handle */
1738 int count; /* atom lock count */
1739 int pinned; /* whether the atom has been pinned */
1740 data_size_t total; /* actual length of atom name */
1741 VARARG(name,unicode_str); /* atom name */
1745 /* Set information about an atom */
1746 @REQ(set_atom_information)
1747 obj_handle_t table; /* which table to find atom from */
1748 atom_t atom; /* atom handle */
1749 int pinned; /* whether to bump atom information */
1753 /* Empty an atom table */
1754 @REQ(empty_atom_table)
1755 obj_handle_t table; /* which table to find atom from */
1756 int if_pinned; /* whether to delete pinned atoms */
1760 /* Init an atom table */
1761 @REQ(init_atom_table)
1762 int entries; /* number of entries (only for local) */
1764 obj_handle_t table; /* handle to the atom table */
1768 /* Get the message queue of the current thread */
1771 obj_handle_t handle; /* handle to the queue */
1775 /* Set the file descriptor associated to the current thread queue */
1777 obj_handle_t handle; /* handle to the file descriptor */
1781 /* Set the current message queue wakeup mask */
1782 @REQ(set_queue_mask)
1783 unsigned int wake_mask; /* wakeup bits mask */
1784 unsigned int changed_mask; /* changed bits mask */
1785 int skip_wait; /* will we skip waiting if signaled? */
1787 unsigned int wake_bits; /* current wake bits */
1788 unsigned int changed_bits; /* current changed bits */
1792 /* Get the current message queue status */
1793 @REQ(get_queue_status)
1794 int clear; /* should we clear the change bits? */
1796 unsigned int wake_bits; /* wake bits */
1797 unsigned int changed_bits; /* changed bits since last time */
1801 /* Retrieve the process idle event */
1802 @REQ(get_process_idle_event)
1803 obj_handle_t handle; /* process handle */
1805 obj_handle_t event; /* handle to idle event */
1809 /* Send a message to a thread queue */
1811 thread_id_t id; /* thread id */
1812 int type; /* message type (see below) */
1813 int flags; /* message flags (see below) */
1814 user_handle_t win; /* window handle */
1815 unsigned int msg; /* message code */
1816 unsigned long wparam; /* parameters */
1817 unsigned long lparam; /* parameters */
1818 timeout_t timeout; /* timeout for reply */
1819 VARARG(data,message_data); /* message data for sent messages */
1822 @REQ(post_quit_message)
1823 int exit_code; /* exit code to return */
1828 MSG_ASCII, /* Ascii message (from SendMessageA) */
1829 MSG_UNICODE, /* Unicode message (from SendMessageW) */
1830 MSG_NOTIFY, /* notify message (from SendNotifyMessageW), always Unicode */
1831 MSG_CALLBACK, /* callback message (from SendMessageCallbackW), always Unicode */
1832 MSG_CALLBACK_RESULT,/* result of a callback message */
1833 MSG_OTHER_PROCESS, /* sent from other process, may include vararg data, always Unicode */
1834 MSG_POSTED, /* posted message (from PostMessageW), always Unicode */
1835 MSG_HARDWARE, /* hardware message */
1836 MSG_WINEVENT /* winevent message */
1838 #define SEND_MSG_ABORT_IF_HUNG 0x01
1841 /* Send a hardware message to a thread queue */
1842 @REQ(send_hardware_message)
1843 thread_id_t id; /* thread id */
1844 user_handle_t win; /* window handle */
1845 unsigned int msg; /* message code */
1846 unsigned int time; /* message time */
1847 unsigned long wparam; /* parameters */
1848 unsigned long lparam; /* parameters */
1849 unsigned long info; /* extra info */
1850 int x; /* x position */
1851 int y; /* y position */
1855 /* Get a message from the current queue */
1857 unsigned int flags; /* PM_* flags */
1858 user_handle_t get_win; /* window handle to get */
1859 unsigned int get_first; /* first message code to get */
1860 unsigned int get_last; /* last message code to get */
1861 unsigned int hw_id; /* id of the previous hardware message (or 0) */
1862 unsigned int wake_mask; /* wakeup bits mask */
1863 unsigned int changed_mask; /* changed bits mask */
1865 user_handle_t win; /* window handle */
1866 int type; /* message type */
1867 unsigned int msg; /* message code */
1868 unsigned long wparam; /* parameters */
1869 unsigned long lparam; /* parameters */
1870 unsigned long info; /* extra info */
1871 int x; /* x position */
1872 int y; /* y position */
1873 unsigned int time; /* message time */
1874 unsigned int hw_id; /* id if hardware message */
1875 unsigned int active_hooks; /* active hooks bitmap */
1876 data_size_t total; /* total size of extra data */
1877 VARARG(data,message_data); /* message data for sent messages */
1881 /* Reply to a sent message */
1883 unsigned long result; /* message result */
1884 int remove; /* should we remove the message? */
1885 VARARG(data,bytes); /* message data for sent messages */
1889 /* Accept the current hardware message */
1890 @REQ(accept_hardware_message)
1891 unsigned int hw_id; /* id of the hardware message */
1892 int remove; /* should we remove the message? */
1893 user_handle_t new_win; /* new destination window for current message */
1897 /* Retrieve the reply for the last message sent */
1898 @REQ(get_message_reply)
1899 int cancel; /* cancel message if not ready? */
1901 unsigned long result; /* message result */
1902 VARARG(data,bytes); /* message data for sent messages */
1906 /* Set a window timer */
1908 user_handle_t win; /* window handle */
1909 unsigned int msg; /* message to post */
1910 unsigned int rate; /* timer rate in ms */
1911 unsigned long id; /* timer id */
1912 unsigned long lparam; /* message lparam (callback proc) */
1914 unsigned long id; /* timer id */
1918 /* Kill a window timer */
1919 @REQ(kill_win_timer)
1920 user_handle_t win; /* window handle */
1921 unsigned int msg; /* message to post */
1922 unsigned long id; /* timer id */
1926 /* Retrieve info about a serial port */
1927 @REQ(get_serial_info)
1928 obj_handle_t handle; /* handle to comm port */
1930 unsigned int readinterval;
1931 unsigned int readconst;
1932 unsigned int readmult;
1933 unsigned int writeconst;
1934 unsigned int writemult;
1935 unsigned int eventmask;
1939 /* Set info about a serial port */
1940 @REQ(set_serial_info)
1941 obj_handle_t handle; /* handle to comm port */
1942 int flags; /* bitmask to set values (see below) */
1943 unsigned int readinterval;
1944 unsigned int readconst;
1945 unsigned int readmult;
1946 unsigned int writeconst;
1947 unsigned int writemult;
1948 unsigned int eventmask;
1950 #define SERIALINFO_SET_TIMEOUTS 0x01
1951 #define SERIALINFO_SET_MASK 0x02
1954 /* Create an async I/O */
1955 @REQ(register_async)
1956 obj_handle_t handle; /* handle to comm port, socket or file */
1957 int type; /* type of queue to look after */
1958 int count; /* count - usually # of bytes to be read/written */
1959 async_data_t async; /* async I/O parameters */
1961 #define ASYNC_TYPE_READ 0x01
1962 #define ASYNC_TYPE_WRITE 0x02
1963 #define ASYNC_TYPE_WAIT 0x03
1966 /* Cancel all async op on a fd */
1968 obj_handle_t handle; /* handle to comm port, socket or file */
1972 /* Perform an ioctl on a file */
1974 obj_handle_t handle; /* handle to the device */
1975 ioctl_code_t code; /* ioctl code */
1976 async_data_t async; /* async I/O parameters */
1977 VARARG(in_data,bytes); /* ioctl input data */
1979 obj_handle_t wait; /* handle to wait on for blocking ioctl */
1980 unsigned int options; /* device open options */
1981 VARARG(out_data,bytes); /* ioctl output data */
1985 /* Retrieve results of an async ioctl */
1986 @REQ(get_ioctl_result)
1987 obj_handle_t handle; /* handle to the device */
1988 void* user_arg; /* user arg used to identify the request */
1990 VARARG(out_data,bytes); /* ioctl output data */
1994 /* Create a named pipe */
1995 @REQ(create_named_pipe)
1996 unsigned int access;
1997 unsigned int attributes; /* object attributes */
1998 obj_handle_t rootdir; /* root directory */
1999 unsigned int options;
2001 unsigned int maxinstances;
2002 unsigned int outsize;
2003 unsigned int insize;
2005 VARARG(name,unicode_str); /* pipe name */
2007 obj_handle_t handle; /* handle to the pipe */
2010 /* flags in create_named_pipe and get_named_pipe_info */
2011 #define NAMED_PIPE_MESSAGE_STREAM_WRITE 0x0001
2012 #define NAMED_PIPE_MESSAGE_STREAM_READ 0x0002
2013 #define NAMED_PIPE_NONBLOCKING_MODE 0x0004
2014 #define NAMED_PIPE_SERVER_END 0x8000
2017 @REQ(get_named_pipe_info)
2018 obj_handle_t handle;
2021 unsigned int maxinstances;
2022 unsigned int instances;
2023 unsigned int outsize;
2024 unsigned int insize;
2028 /* Create a window */
2030 user_handle_t parent; /* parent window */
2031 user_handle_t owner; /* owner window */
2032 atom_t atom; /* class atom */
2033 void* instance; /* module instance */
2035 user_handle_t handle; /* created window */
2036 user_handle_t parent; /* full handle of parent */
2037 user_handle_t owner; /* full handle of owner */
2038 int extra; /* number of extra bytes */
2039 void* class_ptr; /* pointer to class in client address space */
2043 /* Destroy a window */
2044 @REQ(destroy_window)
2045 user_handle_t handle; /* handle to the window */
2049 /* Retrieve the desktop window for the current thread */
2050 @REQ(get_desktop_window)
2051 int force; /* force creation if it doesn't exist
*/
2053 user_handle_t handle
; /* handle to the desktop window
*/
2057 /* Set a window owner
*/
2058 @
REQ(set_window_owner
)
2059 user_handle_t handle
; /* handle to the window
*/
2060 user_handle_t owner
; /* new owner
*/
2062 user_handle_t full_owner
; /* full handle of new owner
*/
2063 user_handle_t prev_owner
; /* full handle of previous owner
*/
2067 /* Get information from a window handle
*/
2068 @
REQ(get_window_info
)
2069 user_handle_t handle
; /* handle to the window
*/
2071 user_handle_t full_handle
; /* full
32-bit handle
*/
2072 user_handle_t last_active
; /* last active popup
*/
2073 process_id_t pid
; /* process owning the window
*/
2074 thread_id_t tid
; /* thread owning the window
*/
2075 atom_t atom
; /* class atom
*/
2076 int is_unicode
; /* ANSI or unicode
*/
2080 /* Set some information in a window
*/
2081 @
REQ(set_window_info
)
2082 unsigned int flags
; /* flags for fields to
set (see below
) */
2083 user_handle_t handle
; /* handle to the window
*/
2084 unsigned int style
; /* window style
*/
2085 unsigned int ex_style
; /* window extended style
*/
2086 unsigned int id
; /* window id
*/
2087 int is_unicode
; /* ANSI or unicode
*/
2088 void
* instance
; /* creator instance
*/
2089 unsigned long user_data
; /* user
-specific data
*/
2090 int extra_offset
; /* offset to set in extra bytes
*/
2091 data_size_t extra_size
; /* size to set in extra bytes
*/
2092 unsigned long extra_value
; /* value to set in extra bytes
*/
2094 unsigned int old_style
; /* old window style
*/
2095 unsigned int old_ex_style
; /* old window extended style
*/
2096 unsigned int old_id
; /* old window id
*/
2097 void
* old_instance
; /* old creator instance
*/
2098 unsigned long old_user_data
; /* old user
-specific data
*/
2099 unsigned long old_extra_value
; /* old value in extra bytes
*/
2101 #define SET_WIN_STYLE
0x01
2102 #define SET_WIN_EXSTYLE
0x02
2103 #define SET_WIN_ID
0x04
2104 #define SET_WIN_INSTANCE
0x08
2105 #define SET_WIN_USERDATA
0x10
2106 #define SET_WIN_EXTRA
0x20
2107 #define SET_WIN_UNICODE
0x40
2110 /* Set the parent of a window
*/
2112 user_handle_t handle
; /* handle to the window
*/
2113 user_handle_t parent
; /* handle to the parent
*/
2115 user_handle_t old_parent
; /* old parent window
*/
2116 user_handle_t full_parent
; /* full handle of new parent
*/
2120 /* Get a list of the window parents
, up to the root of the tree
*/
2121 @
REQ(get_window_parents
)
2122 user_handle_t handle
; /* handle to the window
*/
2124 int count
; /* total count of parents
*/
2125 VARARG(parents
,user_handles
); /* parent handles
*/
2129 /* Get a list of the window children
*/
2130 @
REQ(get_window_children
)
2131 user_handle_t parent
; /* parent window
*/
2132 atom_t atom
; /* class atom for the listed children
*/
2133 thread_id_t tid
; /* thread owning the listed children
*/
2135 int count
; /* total count of children
*/
2136 VARARG(children
,user_handles
); /* children handles
*/
2140 /* Get a list of the window children that contain a given point
*/
2141 @
REQ(get_window_children_from_point
)
2142 user_handle_t parent
; /* parent window
*/
2143 int x
; /* point in parent coordinates
*/
2146 int count
; /* total count of children
*/
2147 VARARG(children
,user_handles
); /* children handles
*/
2151 /* Get window tree information from a window handle
*/
2152 @
REQ(get_window_tree
)
2153 user_handle_t handle
; /* handle to the window
*/
2155 user_handle_t parent
; /* parent window
*/
2156 user_handle_t owner
; /* owner window
*/
2157 user_handle_t next_sibling
; /* next sibling in Z
-order
*/
2158 user_handle_t prev_sibling
; /* prev sibling in Z
-order
*/
2159 user_handle_t first_sibling
; /* first sibling in Z
-order
*/
2160 user_handle_t last_sibling
; /* last sibling in Z
-order
*/
2161 user_handle_t first_child
; /* first child
*/
2162 user_handle_t last_child
; /* last child
*/
2165 /* Set the position and Z order of a window
*/
2166 @
REQ(set_window_pos
)
2167 unsigned int flags
; /* SWP_
* flags
*/
2168 user_handle_t handle
; /* handle to the window
*/
2169 user_handle_t previous
; /* previous window in Z order
*/
2170 rectangle_t window
; /* window rectangle
*/
2171 rectangle_t client
; /* client rectangle
*/
2172 VARARG(valid
,rectangles
); /* valid rectangles from WM_NCCALCSIZE
*/
2174 unsigned int new_style
; /* new window style
*/
2178 /* Get the window and client rectangles of a window
*/
2179 @
REQ(get_window_rectangles
)
2180 user_handle_t handle
; /* handle to the window
*/
2182 rectangle_t window
; /* window rectangle
*/
2183 rectangle_t visible
; /* visible part of the window rectangle
*/
2184 rectangle_t client
; /* client rectangle
*/
2188 /* Get the window text
*/
2189 @
REQ(get_window_text
)
2190 user_handle_t handle
; /* handle to the window
*/
2192 VARARG(text
,unicode_str
); /* window text
*/
2196 /* Set the window text
*/
2197 @
REQ(set_window_text
)
2198 user_handle_t handle
; /* handle to the window
*/
2199 VARARG(text
,unicode_str
); /* window text
*/
2203 /* Get the coordinates offset between two windows
*/
2204 @
REQ(get_windows_offset
)
2205 user_handle_t from
; /* handle to the first window
*/
2206 user_handle_t to
; /* handle to the second window
*/
2208 int x
; /* x coordinate offset
*/
2209 int y
; /* y coordinate offset
*/
2213 /* Get the visible region of a window
*/
2214 @
REQ(get_visible_region
)
2215 user_handle_t window
; /* handle to the window
*/
2216 unsigned int flags
; /* DCX flags
*/
2218 user_handle_t top_win
; /* top window to clip against
*/
2219 rectangle_t top_rect
; /* top window visible rect with screen coords
*/
2220 rectangle_t win_rect
; /* window rect in screen coords
*/
2221 data_size_t total_size
; /* total size of the resulting region
*/
2222 VARARG(region
,rectangles
); /* list of rectangles for the
region (in screen coords
) */
2226 /* Get the window region
*/
2227 @
REQ(get_window_region
)
2228 user_handle_t window
; /* handle to the window
*/
2230 data_size_t total_size
; /* total size of the resulting region
*/
2231 VARARG(region
,rectangles
); /* list of rectangles for the region
*/
2235 /* Set the window region
*/
2236 @
REQ(set_window_region
)
2237 user_handle_t window
; /* handle to the window
*/
2238 int redraw
; /* redraw the window?
*/
2239 VARARG(region
,rectangles
); /* list of rectangles for the region
*/
2243 /* Get the window update region
*/
2244 @
REQ(get_update_region
)
2245 user_handle_t window
; /* handle to the window
*/
2246 user_handle_t from_child
; /* child to start searching from
*/
2247 unsigned int flags
; /* update
flags (see below
) */
2249 user_handle_t child
; /* child to
repaint (or window itself
) */
2250 unsigned int flags
; /* resulting update
flags (see below
) */
2251 data_size_t total_size
; /* total size of the resulting region
*/
2252 VARARG(region
,rectangles
); /* list of rectangles for the region
*/
2254 #define UPDATE_NONCLIENT
0x01 /* get region for repainting non
-client area
*/
2255 #define UPDATE_ERASE
0x02 /* get region for erasing client area
*/
2256 #define UPDATE_PAINT
0x04 /* get region for painting client area
*/
2257 #define UPDATE_INTERNALPAINT
0x08 /* get region if internal paint is pending
*/
2258 #define UPDATE_ALLCHILDREN
0x10 /* force repaint of all children
*/
2259 #define UPDATE_NOCHILDREN
0x20 /* don
't try to repaint any children */
2260 #define UPDATE_NOREGION 0x40 /* don't return a region
, only the flags
*/
2261 #define UPDATE_DELAYED_ERASE
0x80 /* still needs erase after BeginPaint
*/
2264 /* Update the z order of a window so that a given rectangle is fully visible
*/
2265 @
REQ(update_window_zorder
)
2266 user_handle_t window
; /* handle to the window
*/
2267 rectangle_t rect
; /* rectangle that must be visible
*/
2271 /* Mark parts of a window as needing a redraw
*/
2273 user_handle_t window
; /* handle to the window
*/
2274 unsigned int flags
; /* RDW_
* flags
*/
2275 VARARG(region
,rectangles
); /* list of rectangles for the region
*/
2279 /* Set a window property
*/
2280 @
REQ(set_window_property
)
2281 user_handle_t window
; /* handle to the window
*/
2282 atom_t atom
; /* property
atom (if no name specified
) */
2283 obj_handle_t handle
; /* handle to store
*/
2284 VARARG(name
,unicode_str
); /* property name
*/
2288 /* Remove a window property
*/
2289 @
REQ(remove_window_property
)
2290 user_handle_t window
; /* handle to the window
*/
2291 atom_t atom
; /* property
atom (if no name specified
) */
2292 VARARG(name
,unicode_str
); /* property name
*/
2294 obj_handle_t handle
; /* handle stored in property
*/
2298 /* Get a window property
*/
2299 @
REQ(get_window_property
)
2300 user_handle_t window
; /* handle to the window
*/
2301 atom_t atom
; /* property
atom (if no name specified
) */
2302 VARARG(name
,unicode_str
); /* property name
*/
2304 obj_handle_t handle
; /* handle stored in property
*/
2308 /* Get the list of properties of a window
*/
2309 @
REQ(get_window_properties
)
2310 user_handle_t window
; /* handle to the window
*/
2312 int total
; /* total number of properties
*/
2313 VARARG(props
,properties
); /* list of properties
*/
2317 /* Create a window station
*/
2318 @
REQ(create_winstation
)
2319 unsigned int flags
; /* window station flags
*/
2320 unsigned int access
; /* wanted access rights
*/
2321 unsigned int attributes
; /* object attributes
*/
2322 VARARG(name
,unicode_str
); /* object name
*/
2324 obj_handle_t handle
; /* handle to the window station
*/
2328 /* Open a handle to a window station
*/
2329 @
REQ(open_winstation
)
2330 unsigned int access
; /* wanted access rights
*/
2331 unsigned int attributes
; /* object attributes
*/
2332 VARARG(name
,unicode_str
); /* object name
*/
2334 obj_handle_t handle
; /* handle to the window station
*/
2338 /* Close a window station
*/
2339 @
REQ(close_winstation
)
2340 obj_handle_t handle
; /* handle to the window station
*/
2344 /* Get the process current window station
*/
2345 @
REQ(get_process_winstation
)
2347 obj_handle_t handle
; /* handle to the window station
*/
2351 /* Set the process current window station
*/
2352 @
REQ(set_process_winstation
)
2353 obj_handle_t handle
; /* handle to the window station
*/
2357 /* Create a desktop
*/
2358 @
REQ(create_desktop
)
2359 unsigned int flags
; /* desktop flags
*/
2360 unsigned int access
; /* wanted access rights
*/
2361 unsigned int attributes
; /* object attributes
*/
2362 VARARG(name
,unicode_str
); /* object name
*/
2364 obj_handle_t handle
; /* handle to the desktop
*/
2368 /* Open a handle to a desktop
*/
2370 unsigned int flags
; /* desktop flags
*/
2371 unsigned int access
; /* wanted access rights
*/
2372 unsigned int attributes
; /* object attributes
*/
2373 VARARG(name
,unicode_str
); /* object name
*/
2375 obj_handle_t handle
; /* handle to the desktop
*/
2379 /* Close a desktop
*/
2381 obj_handle_t handle
; /* handle to the desktop
*/
2385 /* Get the thread current desktop
*/
2386 @
REQ(get_thread_desktop
)
2387 thread_id_t tid
; /* thread id
*/
2389 obj_handle_t handle
; /* handle to the desktop
*/
2393 /* Set the thread current desktop
*/
2394 @
REQ(set_thread_desktop
)
2395 obj_handle_t handle
; /* handle to the desktop
*/
2399 /* Get
/set information about a user
object (window station or desktop
) */
2400 @
REQ(set_user_object_info
)
2401 obj_handle_t handle
; /* handle to the object
*/
2402 unsigned int flags
; /* information to set
*/
2403 unsigned int obj_flags
; /* new object flags
*/
2405 int is_desktop
; /* is object a desktop?
*/
2406 unsigned int old_obj_flags
; /* old object flags
*/
2407 VARARG(name
,unicode_str
); /* object name
*/
2409 #define SET_USER_OBJECT_FLAGS
1
2412 /* Attach (or detach
) thread inputs
*/
2413 @
REQ(attach_thread_input
)
2414 thread_id_t tid_from
; /* thread to be attached
*/
2415 thread_id_t tid_to
; /* thread to which tid_from should be attached
*/
2416 int attach
; /* is it an attach?
*/
2420 /* Get input data for a given thread
*/
2421 @
REQ(get_thread_input
)
2422 thread_id_t tid
; /* id of thread
*/
2424 user_handle_t focus
; /* handle to the focus window
*/
2425 user_handle_t capture
; /* handle to the capture window
*/
2426 user_handle_t active
; /* handle to the active window
*/
2427 user_handle_t foreground
; /* handle to the global foreground window
*/
2428 user_handle_t menu_owner
; /* handle to the menu owner
*/
2429 user_handle_t move_size
; /* handle to the moving
/resizing window
*/
2430 user_handle_t caret
; /* handle to the caret window
*/
2431 rectangle_t rect
; /* caret rectangle
*/
2435 /* Get the time of the last input event
*/
2436 @
REQ(get_last_input_time
)
2442 /* Retrieve queue keyboard state for a given thread
*/
2444 thread_id_t tid
; /* id of thread
*/
2445 int key
; /* optional key code or
-1 */
2447 unsigned char state
; /* state of specified key
*/
2448 VARARG(keystate
,bytes
); /* state array for all the keys
*/
2451 /* Set queue keyboard state for a given thread
*/
2453 thread_id_t tid
; /* id of thread
*/
2454 VARARG(keystate
,bytes
); /* state array for all the keys
*/
2457 /* Set the system foreground window
*/
2458 @
REQ(set_foreground_window
)
2459 user_handle_t handle
; /* handle to the foreground window
*/
2461 user_handle_t previous
; /* handle to the previous foreground window
*/
2462 int send_msg_old
; /* whether we have to send a msg to the old window
*/
2463 int send_msg_new
; /* whether we have to send a msg to the new window
*/
2466 /* Set the current thread focus window
*/
2467 @
REQ(set_focus_window
)
2468 user_handle_t handle
; /* handle to the focus window
*/
2470 user_handle_t previous
; /* handle to the previous focus window
*/
2473 /* Set the current thread active window
*/
2474 @
REQ(set_active_window
)
2475 user_handle_t handle
; /* handle to the active window
*/
2477 user_handle_t previous
; /* handle to the previous active window
*/
2480 /* Set the current thread capture window
*/
2481 @
REQ(set_capture_window
)
2482 user_handle_t handle
; /* handle to the capture window
*/
2483 unsigned int flags
; /* capture
flags (see below
) */
2485 user_handle_t previous
; /* handle to the previous capture window
*/
2486 user_handle_t full_handle
; /* full
32-bit handle of new capture window
*/
2488 #define CAPTURE_MENU
0x01 /* capture is for a menu
*/
2489 #define CAPTURE_MOVESIZE
0x02 /* capture is for moving
/resizing
*/
2492 /* Set the current thread caret window
*/
2493 @
REQ(set_caret_window
)
2494 user_handle_t handle
; /* handle to the caret window
*/
2495 int width
; /* caret width
*/
2496 int height
; /* caret height
*/
2498 user_handle_t previous
; /* handle to the previous caret window
*/
2499 rectangle_t old_rect
; /* previous caret rectangle
*/
2500 int old_hide
; /* previous hide count
*/
2501 int old_state
; /* previous caret
state (1=on
, 0=off
) */
2505 /* Set the current thread caret information
*/
2506 @
REQ(set_caret_info
)
2507 unsigned int flags
; /* caret
flags (see below
) */
2508 user_handle_t handle
; /* handle to the caret window
*/
2509 int x
; /* caret x position
*/
2510 int y
; /* caret y position
*/
2511 int hide
; /* increment for hide
count (can be negative to show it
) */
2512 int state
; /* caret
state (1=on
, 0=off
, -1=toggle current state
) */
2514 user_handle_t full_handle
; /* handle to the current caret window
*/
2515 rectangle_t old_rect
; /* previous caret rectangle
*/
2516 int old_hide
; /* previous hide count
*/
2517 int old_state
; /* previous caret
state (1=on
, 0=off
) */
2519 #define SET_CARET_POS
0x01 /* set the caret position from x
,y
*/
2520 #define SET_CARET_HIDE
0x02 /* increment the caret hide count
*/
2521 #define SET_CARET_STATE
0x04 /* set the caret on
/off state
*/
2524 /* Set a window hook
*/
2526 int id
; /* id of the hook
*/
2527 process_id_t pid
; /* id of process to set the hook into
*/
2528 thread_id_t tid
; /* id of thread to set the hook into
*/
2532 void
* proc
; /* hook procedure
*/
2533 int unicode
; /* is it a unicode hook?
*/
2534 VARARG(module
,unicode_str
); /* module name
*/
2536 user_handle_t handle
; /* handle to the hook
*/
2537 unsigned int active_hooks
; /* active hooks bitmap
*/
2541 /* Remove a window hook
*/
2543 user_handle_t handle
; /* handle to the hook
*/
2544 int id
; /* id of the hook if handle is
0 */
2545 void
* proc
; /* hook procedure if handle is
0 */
2547 unsigned int active_hooks
; /* active hooks bitmap
*/
2551 /* Start calling a hook chain
*/
2552 @
REQ(start_hook_chain
)
2553 int id
; /* id of the hook
*/
2554 int event
; /* signalled event
*/
2555 user_handle_t window
; /* handle to the event window
*/
2556 int object_id
; /* object id for out of context winevent
*/
2557 int child_id
; /* child id for out of context winevent
*/
2559 user_handle_t handle
; /* handle to the next hook
*/
2560 process_id_t pid
; /* process id for low
-level keyboard
/mouse hooks
*/
2561 thread_id_t tid
; /* thread id for low
-level keyboard
/mouse hooks
*/
2562 void
* proc
; /* hook procedure
*/
2563 int unicode
; /* is it a unicode hook?
*/
2564 unsigned int active_hooks
; /* active hooks bitmap
*/
2565 VARARG(module
,unicode_str
); /* module name
*/
2569 /* Finished calling a hook chain
*/
2570 @
REQ(finish_hook_chain
)
2571 int id
; /* id of the hook
*/
2575 /* Get the hook information
*/
2577 user_handle_t handle
; /* handle to the current hook
*/
2578 int get_next
; /* do we want info about current or next hook?
*/
2579 int event
; /* signalled event
*/
2580 user_handle_t window
; /* handle to the event window
*/
2581 int object_id
; /* object id for out of context winevent
*/
2582 int child_id
; /* child id for out of context winevent
*/
2584 user_handle_t handle
; /* handle to the hook
*/
2585 int id
; /* id of the hook
*/
2586 process_id_t pid
; /* process id for low
-level keyboard
/mouse hooks
*/
2587 thread_id_t tid
; /* thread id for low
-level keyboard
/mouse hooks
*/
2588 void
* proc
; /* hook procedure
*/
2589 int unicode
; /* is it a unicode hook?
*/
2590 VARARG(module
,unicode_str
); /* module name
*/
2594 /* Create a window class
*/
2596 int local
; /* is it a local class?
*/
2597 atom_t atom
; /* class atom
*/
2598 unsigned int style
; /* class style
*/
2599 void
* instance
; /* module instance
*/
2600 int extra
; /* number of extra class bytes
*/
2601 int win_extra
; /* number of window extra bytes
*/
2602 void
* client_ptr
; /* pointer to class in client address space
*/
2606 /* Destroy a window class
*/
2608 atom_t atom
; /* class atom
*/
2609 void
* instance
; /* module instance
*/
2611 void
* client_ptr
; /* pointer to class in client address space
*/
2615 /* Set some information in a class
*/
2616 @
REQ(set_class_info
)
2617 user_handle_t window
; /* handle to the window
*/
2618 unsigned int flags
; /* flags for info to
set (see below
) */
2619 atom_t atom
; /* class atom
*/
2620 unsigned int style
; /* class style
*/
2621 int win_extra
; /* number of window extra bytes
*/
2622 void
* instance
; /* module instance
*/
2623 int extra_offset
; /* offset to set in extra bytes
*/
2624 data_size_t extra_size
; /* size to set in extra bytes
*/
2625 unsigned long extra_value
; /* value to set in extra bytes
*/
2627 atom_t old_atom
; /* previous class atom
*/
2628 unsigned int old_style
; /* previous class style
*/
2629 int old_extra
; /* previous number of class extra bytes
*/
2630 int old_win_extra
; /* previous number of window extra bytes
*/
2631 void
* old_instance
; /* previous module instance
*/
2632 unsigned long old_extra_value
; /* old value in extra bytes
*/
2634 #define SET_CLASS_ATOM
0x0001
2635 #define SET_CLASS_STYLE
0x0002
2636 #define SET_CLASS_WINEXTRA
0x0004
2637 #define SET_CLASS_INSTANCE
0x0008
2638 #define SET_CLASS_EXTRA
0x0010
2641 /* Set
/get clipboard information
*/
2642 @
REQ(set_clipboard_info
)
2643 unsigned int flags
; /* flags for fields to
set (see below
) */
2644 user_handle_t clipboard
; /* clipboard window
*/
2645 user_handle_t owner
; /* clipboard owner
*/
2646 user_handle_t viewer
; /* first clipboard viewer
*/
2647 unsigned int seqno
; /* change sequence number
*/
2649 unsigned int flags
; /* status
flags (see below
) */
2650 user_handle_t old_clipboard
; /* old clipboard window
*/
2651 user_handle_t old_owner
; /* old clipboard owner
*/
2652 user_handle_t old_viewer
; /* old clipboard viewer
*/
2653 unsigned int seqno
; /* current sequence number
*/
2656 #define SET_CB_OPEN
0x001
2657 #define SET_CB_OWNER
0x002
2658 #define SET_CB_VIEWER
0x004
2659 #define SET_CB_SEQNO
0x008
2660 #define SET_CB_RELOWNER
0x010
2661 #define SET_CB_CLOSE
0x020
2662 #define CB_OPEN
0x040
2663 #define CB_OWNER
0x080
2664 #define CB_PROCESS
0x100
2667 /* Open a security token
*/
2669 obj_handle_t handle
; /* handle to the thread or process
*/
2670 unsigned int access
; /* access rights to the new token
*/
2671 unsigned int attributes
;/* object attributes
*/
2672 unsigned int flags
; /* flags (see below
) */
2674 obj_handle_t token
; /* handle to the token
*/
2676 #define OPEN_TOKEN_THREAD
1
2677 #define OPEN_TOKEN_AS_SELF
2
2680 /* Set
/get the global windows
*/
2681 @
REQ(set_global_windows
)
2682 unsigned int flags
; /* flags for fields to
set (see below
) */
2683 user_handle_t shell_window
; /* handle to the new shell window
*/
2684 user_handle_t shell_listview
; /* handle to the new shell listview window
*/
2685 user_handle_t progman_window
; /* handle to the new program manager window
*/
2686 user_handle_t taskman_window
; /* handle to the new task manager window
*/
2688 user_handle_t old_shell_window
; /* handle to the shell window
*/
2689 user_handle_t old_shell_listview
; /* handle to the shell listview window
*/
2690 user_handle_t old_progman_window
; /* handle to the new program manager window
*/
2691 user_handle_t old_taskman_window
; /* handle to the new task manager window
*/
2693 #define SET_GLOBAL_SHELL_WINDOWS
0x01 /* set both main shell and listview windows
*/
2694 #define SET_GLOBAL_PROGMAN_WINDOW
0x02
2695 #define SET_GLOBAL_TASKMAN_WINDOW
0x04
2697 /* Adjust the privileges held by a token
*/
2698 @
REQ(adjust_token_privileges
)
2699 obj_handle_t handle
; /* handle to the token
*/
2700 int disable_all
; /* disable all privileges?
*/
2701 int get_modified_state
; /* get modified privileges?
*/
2702 VARARG(privileges
,LUID_AND_ATTRIBUTES
); /* privileges to enable
/disable
/remove
*/
2704 unsigned int len
; /* total length in bytes required to store token privileges
*/
2705 VARARG(privileges
,LUID_AND_ATTRIBUTES
); /* modified privileges
*/
2708 /* Retrieves the set of privileges held by or available to a token
*/
2709 @
REQ(get_token_privileges
)
2710 obj_handle_t handle
; /* handle to the token
*/
2712 unsigned int len
; /* total length in bytes required to store token privileges
*/
2713 VARARG(privileges
,LUID_AND_ATTRIBUTES
); /* privileges held by or available to a token
*/
2716 /* Check the token has the required privileges
*/
2717 @
REQ(check_token_privileges
)
2718 obj_handle_t handle
; /* handle to the token
*/
2719 int all_required
; /* are all the privileges required for the check to succeed?
*/
2720 VARARG(privileges
,LUID_AND_ATTRIBUTES
); /* privileges to check
*/
2722 int has_privileges
; /* does the token have the required privileges?
*/
2723 VARARG(privileges
,LUID_AND_ATTRIBUTES
); /* privileges held by or available to a token
*/
2726 @
REQ(duplicate_token
)
2727 obj_handle_t handle
; /* handle to the token to duplicate
*/
2728 unsigned int access
; /* access rights to the new token
*/
2729 unsigned int attributes
; /* object attributes
*/
2730 int primary
; /* is the new token to be a primary one?
*/
2731 int impersonation_level
; /* impersonation level of the new token
*/
2733 obj_handle_t new_handle
; /* duplicated handle
*/
2737 obj_handle_t handle
; /* handle to the token
*/
2738 unsigned int desired_access
; /* desired access to the object
*/
2739 unsigned int mapping_read
; /* mapping from generic read to specific rights
*/
2740 unsigned int mapping_write
; /* mapping from generic write to specific rights
*/
2741 unsigned int mapping_execute
; /* mapping from generic execute to specific rights
*/
2742 unsigned int mapping_all
; /* mapping from generic all to specific rights
*/
2743 VARARG(sd
,security_descriptor
); /* security descriptor to check
*/
2745 unsigned int access_granted
; /* access rights actually granted
*/
2746 unsigned int access_status
; /* was access granted?
*/
2747 unsigned int privileges_len
; /* length needed to store privileges
*/
2748 VARARG(privileges
,LUID_AND_ATTRIBUTES
); /* privileges used during access check
*/
2751 @
REQ(get_token_user
)
2752 obj_handle_t handle
; /* handle to the token
*/
2754 data_size_t user_len
; /* length needed to store user
*/
2755 VARARG(user
,SID
); /* sid of the user the token represents
*/
2758 @
REQ(get_token_groups
)
2759 obj_handle_t handle
; /* handle to the token
*/
2761 data_size_t user_len
; /* length needed to store user
*/
2762 VARARG(user
,token_groups
); /* groups the token
's user belongs to */
2765 @REQ(set_security_object)
2766 obj_handle_t handle; /* handle to the object */
2767 unsigned int security_info; /* which parts of security descriptor to set */
2768 VARARG(sd,security_descriptor); /* security descriptor to set */
2771 /* Create a mailslot */
2772 @REQ(create_mailslot)
2773 unsigned int access; /* wanted access rights */
2774 unsigned int attributes; /* object attributes */
2775 obj_handle_t rootdir; /* root directory */
2776 unsigned int max_msgsize;
2777 timeout_t read_timeout;
2778 VARARG(name,unicode_str); /* mailslot name */
2780 obj_handle_t handle; /* handle to the mailslot */
2784 /* Set mailslot information */
2785 @REQ(set_mailslot_info)
2786 obj_handle_t handle; /* handle to the mailslot */
2788 timeout_t read_timeout;
2790 unsigned int max_msgsize;
2791 timeout_t read_timeout;
2793 #define MAILSLOT_SET_READ_TIMEOUT 1
2796 /* Create a directory object */
2797 @REQ(create_directory)
2798 unsigned int access; /* access flags */
2799 unsigned int attributes; /* object attributes */
2800 obj_handle_t rootdir; /* root directory */
2801 VARARG(directory_name,unicode_str); /* Directory name */
2803 obj_handle_t handle; /* handle to the directory */
2807 /* Open a directory object */
2808 @REQ(open_directory)
2809 unsigned int access; /* access flags */
2810 unsigned int attributes; /* object attributes */
2811 obj_handle_t rootdir; /* root directory */
2812 VARARG(directory_name,unicode_str); /* Directory name */
2814 obj_handle_t handle; /* handle to the directory */
2818 /* Create a symbolic link object */
2819 @REQ(create_symlink)
2820 unsigned int access; /* access flags */
2821 unsigned int attributes; /* object attributes */
2822 obj_handle_t rootdir; /* root directory */
2823 data_size_t name_len; /* length of the symlink name in bytes */
2824 VARARG(name,unicode_str,name_len); /* symlink name */
2825 VARARG(target_name,unicode_str); /* target name */
2827 obj_handle_t handle; /* handle to the symlink */
2831 /* Open a symbolic link object */
2833 unsigned int access; /* access flags */
2834 unsigned int attributes; /* object attributes */
2835 obj_handle_t rootdir; /* root directory */
2836 VARARG(name,unicode_str); /* symlink name */
2838 obj_handle_t handle; /* handle to the symlink */
2842 /* Query a symbolic link object */
2844 obj_handle_t handle; /* handle to the symlink */
2846 VARARG(target_name,unicode_str); /* target name */
2850 /* Query basic object information */
2851 @REQ(get_object_info)
2852 obj_handle_t handle; /* handle to the object */
2854 unsigned int access; /* granted access mask */
2855 unsigned int ref_count; /* object ref count */
2858 /* Query the impersonation level of an impersonation token */
2859 @REQ(get_token_impersonation_level)
2860 obj_handle_t handle; /* handle to the object */
2862 int impersonation_level; /* impersonation level of the impersonation token */
2865 /* Allocate a locally-unique identifier */
2866 @REQ(allocate_locally_unique_id)
2872 /* Create a device manager */
2873 @REQ(create_device_manager)
2874 unsigned int access; /* wanted access rights */
2875 unsigned int attributes; /* object attributes */
2877 obj_handle_t handle; /* handle to the device */
2881 /* Create a device */
2883 unsigned int access; /* wanted access rights */
2884 unsigned int attributes; /* object attributes */
2885 obj_handle_t rootdir; /* root directory */
2886 obj_handle_t manager; /* device manager */
2887 void* user_ptr; /* opaque ptr for use by client */
2888 VARARG(name,unicode_str); /* object name */
2890 obj_handle_t handle; /* handle to the device */
2894 /* Delete a device */
2896 obj_handle_t handle; /* handle to the device */
2900 /* Retrieve the next pending device ioctl request */
2901 @REQ(get_next_device_request)
2902 obj_handle_t manager; /* handle to the device manager */
2903 obj_handle_t prev; /* handle to the previous ioctl */
2904 unsigned int status; /* status of the previous ioctl */
2905 VARARG(prev_data,bytes); /* output data of the previous ioctl */
2907 obj_handle_t next; /* handle to the next ioctl */
2908 ioctl_code_t code; /* ioctl code */
2909 void* user_ptr; /* opaque ptr for the device */
2910 data_size_t in_size; /* total needed input size */
2911 data_size_t out_size; /* needed output size */
2912 VARARG(next_data,bytes); /* input data of the next ioctl */
2916 /* Make the current process a system process */
2917 @REQ(make_process_system)
2919 obj_handle_t event; /* event signaled when all user processes have exited */
2923 /* Get detailed fixed-size information about a token */
2924 @REQ(get_token_statistics)
2925 obj_handle_t handle; /* handle to the object */
2927 luid_t token_id; /* locally-unique identifier of the token */
2928 luid_t modified_id; /* locally-unique identifier of the modified version of the token */
2929 int primary; /* is the token primary or impersonation? */
2930 int impersonation_level; /* level of impersonation */
2931 int group_count; /* the number of groups the token is a member of */
2932 int privilege_count; /* the number of privileges the token has */