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 void
*apc_arg
; /* argument for user apc
*/
181 obj_handle_t event
; /* event to signal when done
*/
184 /* structures for extra message data
*/
186 struct callback_msg_data
188 void
*callback
; /* callback function
*/
189 unsigned long data
; /* user data for callback
*/
190 unsigned long result
; /* message result
*/
193 struct winevent_msg_data
195 user_handle_t hook
; /* hook handle
*/
196 thread_id_t tid
; /* thread id
*/
197 void
*hook_proc
; /* hook proc address
*/
198 /* followed by module name if any
*/
203 unsigned char bytes
[1]; /* raw data for sent messages
*/
204 struct callback_msg_data callback
;
205 struct winevent_msg_data winevent
;
208 /* structure for console char
/attribute info
*/
217 unsigned int low_part
;
221 #define MAX_ACL_LEN
65535
223 struct security_descriptor
225 unsigned int control
; /* SE_ flags
*/
226 data_size_t owner_len
;
227 data_size_t group_len
;
228 data_size_t sacl_len
;
229 data_size_t dacl_len
;
230 /* VARARGS(owner
,SID
); */
231 /* VARARGS(group
,SID
); */
232 /* VARARGS(sacl
,ACL
); */
233 /* VARARGS(dacl
,ACL
); */
239 /* unsigned int attributes
[count
]; */
240 /* VARARGS(sids
,SID
); */
266 enum apc_type type
; /* APC_USER
*/
267 void (__stdcall
*func
)(unsigned long
,unsigned long
,unsigned long
);
268 unsigned long args
[3]; /* arguments for user function
*/
272 enum apc_type type
; /* APC_TIMER
*/
273 void (__stdcall
*func
)(void
*, unsigned int
, unsigned int
);
274 timeout_t time
; /* absolute time of expiration
*/
275 void
*arg
; /* user argument
*/
279 enum apc_type type
; /* APC_ASYNC_IO
*/
280 unsigned
int (*func)(void*, void*, unsigned int);
281 void *user; /* user pointer */
282 void *sb; /* status block */
283 unsigned int status; /* I/O status */
287 enum apc_type type; /* APC_VIRTUAL_ALLOC */
288 void *addr; /* requested address */
289 unsigned long size; /* allocation size */
290 unsigned int zero_bits; /* allocation alignment */
291 unsigned int op_type; /* type of operation */
292 unsigned int prot; /* memory protection flags */
296 enum apc_type type; /* APC_VIRTUAL_FREE */
297 void *addr; /* requested address */
298 unsigned long size; /* allocation size */
299 unsigned int op_type; /* type of operation */
303 enum apc_type type; /* APC_VIRTUAL_QUERY */
304 const void *addr; /* requested address */
308 enum apc_type type; /* APC_VIRTUAL_PROTECT */
309 void *addr; /* requested address */
310 unsigned long size; /* requested address */
311 unsigned int prot; /* new protection flags */
315 enum apc_type type; /* APC_VIRTUAL_FLUSH */
316 const void *addr; /* requested address */
317 unsigned long size; /* requested address */
321 enum apc_type type; /* APC_VIRTUAL_LOCK */
322 void *addr; /* requested address */
323 unsigned long size; /* requested address */
327 enum apc_type type; /* APC_VIRTUAL_UNLOCK */
328 void *addr; /* requested address */
329 unsigned long size; /* requested address */
333 enum apc_type type; /* APC_MAP_VIEW */
334 obj_handle_t handle; /* mapping handle */
335 void *addr; /* requested address */
336 unsigned long size; /* allocation size */
337 unsigned int offset_low;/* file offset */
338 unsigned int offset_high;
339 unsigned int zero_bits; /* allocation alignment */
340 unsigned int alloc_type;/* allocation type */
341 unsigned int prot; /* memory protection flags */
345 enum apc_type type; /* APC_UNMAP_VIEW */
346 void *addr; /* view address */
350 enum apc_type type; /* APC_CREATE_THREAD */
351 void (__stdcall *func)(void*); /* start function
*/
352 void
*arg
; /* argument for start function
*/
353 unsigned long reserve
; /* reserve size for thread stack
*/
354 unsigned long commit
; /* commit size for thread stack
*/
355 int suspend
; /* suspended thread?
*/
364 enum apc_type type
; /* APC_ASYNC_IO
*/
365 unsigned int status
; /* new status of async operation
*/
369 enum apc_type type
; /* APC_VIRTUAL_ALLOC
*/
370 unsigned int status
; /* status returned by call
*/
371 void
*addr
; /* resulting address
*/
372 unsigned long size
; /* resulting size
*/
376 enum apc_type type
; /* APC_VIRTUAL_FREE
*/
377 unsigned int status
; /* status returned by call
*/
378 void
*addr
; /* resulting address
*/
379 unsigned long size
; /* resulting size
*/
383 enum apc_type type
; /* APC_VIRTUAL_QUERY
*/
384 unsigned int status
; /* status returned by call
*/
385 void
*base
; /* resulting base address
*/
386 void
*alloc_base
;/* resulting allocation base
*/
387 unsigned long size
; /* resulting region size
*/
388 unsigned int state
; /* resulting region state
*/
389 unsigned int prot
; /* resulting region protection
*/
390 unsigned int alloc_prot
;/* resulting allocation protection
*/
391 unsigned int alloc_type
;/* resulting region allocation type
*/
395 enum apc_type type
; /* APC_VIRTUAL_PROTECT
*/
396 unsigned int status
; /* status returned by call
*/
397 void
*addr
; /* resulting address
*/
398 unsigned long size
; /* resulting size
*/
399 unsigned int prot
; /* old protection flags
*/
403 enum apc_type type
; /* APC_VIRTUAL_FLUSH
*/
404 unsigned int status
; /* status returned by call
*/
405 const void
*addr
; /* resulting address
*/
406 unsigned long size
; /* resulting size
*/
410 enum apc_type type
; /* APC_VIRTUAL_LOCK
*/
411 unsigned int status
; /* status returned by call
*/
412 void
*addr
; /* resulting address
*/
413 unsigned long size
; /* resulting size
*/
417 enum apc_type type
; /* APC_VIRTUAL_UNLOCK
*/
418 unsigned int status
; /* status returned by call
*/
419 void
*addr
; /* resulting address
*/
420 unsigned long size
; /* resulting size
*/
424 enum apc_type type
; /* APC_MAP_VIEW
*/
425 unsigned int status
; /* status returned by call
*/
426 void
*addr
; /* resulting address
*/
427 unsigned long size
; /* resulting size
*/
431 enum apc_type type
; /* APC_MAP_VIEW
*/
432 unsigned int status
; /* status returned by call
*/
436 enum apc_type type
; /* APC_CREATE_THREAD
*/
437 unsigned int status
; /* status returned by call
*/
438 thread_id_t tid
; /* thread id
*/
439 obj_handle_t handle
; /* handle to new thread
*/
443 /****************************************************************/
444 /* Request declarations
*/
446 /* Create a new process from the context of the parent
*/
448 int inherit_all
; /* inherit all handles from parent
*/
449 unsigned int create_flags
; /* creation flags
*/
450 int socket_fd
; /* file descriptor for process socket
*/
451 obj_handle_t exe_file
; /* file handle for main exe
*/
452 obj_handle_t hstdin
; /* handle for stdin
*/
453 obj_handle_t hstdout
; /* handle for stdout
*/
454 obj_handle_t hstderr
; /* handle for stderr
*/
455 unsigned int process_access
; /* access rights for process object
*/
456 unsigned int process_attr
; /* attributes for process object
*/
457 unsigned int thread_access
; /* access rights for thread object
*/
458 unsigned int thread_attr
; /* attributes for thread object
*/
459 VARARG(info
,startup_info
); /* startup information
*/
460 VARARG(env
,unicode_str
); /* environment for new process
*/
462 obj_handle_t info
; /* new process info handle
*/
463 process_id_t pid
; /* process id
*/
464 obj_handle_t phandle
; /* process
handle (in the current process
) */
465 thread_id_t tid
; /* thread id
*/
466 obj_handle_t thandle
; /* thread
handle (in the current process
) */
470 /* Retrieve information about a newly started process
*/
471 @
REQ(get_new_process_info
)
472 obj_handle_t info
; /* info handle returned from new_process_request
*/
474 int success
; /* did the process start successfully?
*/
475 int exit_code
; /* process exit code if failed
*/
479 /* Create a new thread from the context of the parent
*/
481 unsigned int access
; /* wanted access rights
*/
482 unsigned int attributes
; /* object attributes
*/
483 int suspend
; /* new thread should be suspended on creation
*/
484 int request_fd
; /* fd for request pipe
*/
486 thread_id_t tid
; /* thread id
*/
487 obj_handle_t handle
; /* thread
handle (in the current process
) */
491 /* Retrieve the new process startup info
*/
492 @
REQ(get_startup_info
)
494 obj_handle_t exe_file
; /* file handle for main exe
*/
495 obj_handle_t hstdin
; /* handle for stdin
*/
496 obj_handle_t hstdout
; /* handle for stdout
*/
497 obj_handle_t hstderr
; /* handle for stderr
*/
498 VARARG(info
,startup_info
); /* startup information
*/
499 VARARG(env
,unicode_str
); /* environment
*/
503 /* Signal the end of the process initialization
*/
504 @
REQ(init_process_done
)
505 void
* module
; /* main module base address
*/
506 void
* entry
; /* process entry point
*/
507 int gui
; /* is it a GUI process?
*/
511 /* Initialize a thread
; called from the child after
fork()/clone() */
513 int unix_pid
; /* Unix pid of new thread
*/
514 int unix_tid
; /* Unix tid of new thread
*/
515 int debug_level
; /* new debug level
*/
516 void
* teb
; /* TEB of new
thread (in thread address space
) */
517 void
* peb
; /* address of
PEB (in thread address space
) */
518 void
* entry
; /* thread entry
point (in thread address space
) */
519 void
* ldt_copy
; /* address of LDT
copy (in thread address space
) */
520 int reply_fd
; /* fd for reply pipe
*/
521 int wait_fd
; /* fd for blocking calls pipe
*/
523 process_id_t pid
; /* process id of the new thread
's process */
524 thread_id_t tid; /* thread id of the new thread */
525 data_size_t info_size; /* total size of startup info */
526 timeout_t server_start; /* server start time */
527 int version; /* protocol version */
531 /* Terminate a process */
532 @REQ(terminate_process)
533 obj_handle_t handle; /* process handle to terminate */
534 int exit_code; /* process exit code */
536 int self; /* suicide? */
540 /* Terminate a thread */
541 @REQ(terminate_thread)
542 obj_handle_t handle; /* thread handle to terminate */
543 int exit_code; /* thread exit code */
545 int self; /* suicide? */
546 int last; /* last thread in this process? */
550 /* Retrieve information about a process */
551 @REQ(get_process_info)
552 obj_handle_t handle; /* process handle */
554 process_id_t pid; /* server process id */
555 process_id_t ppid; /* server process id of parent */
556 int exit_code; /* process exit code */
557 int priority; /* priority class */
558 int affinity; /* process affinity mask */
559 void* peb; /* PEB address in process address space */
560 timeout_t start_time; /* process start time */
561 timeout_t end_time; /* process end time */
565 /* Set a process informations */
566 @REQ(set_process_info)
567 obj_handle_t handle; /* process handle */
568 int mask; /* setting mask (see below) */
569 int priority; /* priority class */
570 int affinity; /* affinity mask */
572 #define SET_PROCESS_INFO_PRIORITY 0x01
573 #define SET_PROCESS_INFO_AFFINITY 0x02
576 /* Retrieve information about a thread */
577 @REQ(get_thread_info)
578 obj_handle_t handle; /* thread handle */
579 thread_id_t tid_in; /* thread id (optional) */
581 process_id_t pid; /* server process id */
582 thread_id_t tid; /* server thread id */
583 void* teb; /* thread teb pointer */
584 int exit_code; /* thread exit code */
585 int priority; /* thread priority level */
586 int affinity; /* thread affinity mask */
587 timeout_t creation_time; /* thread creation time */
588 timeout_t exit_time; /* thread exit time */
589 int last; /* last thread in process */
593 /* Set a thread informations */
594 @REQ(set_thread_info)
595 obj_handle_t handle; /* thread handle */
596 int mask; /* setting mask (see below) */
597 int priority; /* priority class */
598 int affinity; /* affinity mask */
599 obj_handle_t token; /* impersonation token */
601 #define SET_THREAD_INFO_PRIORITY 0x01
602 #define SET_THREAD_INFO_AFFINITY 0x02
603 #define SET_THREAD_INFO_TOKEN 0x04
606 /* Retrieve information about a module */
608 obj_handle_t handle; /* process handle */
609 void* base_address; /* base address of module */
611 size_t size; /* module size */
613 VARARG(filename,unicode_str); /* file name of module */
617 /* Suspend a thread */
619 obj_handle_t handle; /* thread handle */
621 int count; /* new suspend count */
625 /* Resume a thread */
627 obj_handle_t handle; /* thread handle */
629 int count; /* new suspend count */
633 /* Notify the server that a dll has been loaded */
635 obj_handle_t handle; /* file handle */
636 void* base; /* base address */
637 size_t size; /* dll size */
638 int dbg_offset; /* debug info offset */
639 int dbg_size; /* debug info size */
640 void* name; /* ptr to ptr to name (in process addr space) */
641 VARARG(filename,unicode_str); /* file name of dll */
645 /* Notify the server that a dll is being unloaded */
647 void* base; /* base address */
651 /* Queue an APC for a thread or process */
653 obj_handle_t thread; /* thread handle */
654 obj_handle_t process; /* process handle */
655 apc_call_t call; /* call arguments */
657 obj_handle_t handle; /* APC handle */
658 int self; /* run APC in caller itself? */
662 /* Get next APC to call */
664 int alertable; /* is thread alertable? */
665 obj_handle_t prev; /* handle to previous APC */
666 apc_result_t result; /* result of previous APC */
668 obj_handle_t handle; /* handle to APC */
669 apc_call_t call; /* call arguments */
673 /* Get the result of an APC call */
675 obj_handle_t handle; /* handle to the APC */
677 apc_result_t result; /* result of the APC */
681 /* Close a handle for the current process */
683 obj_handle_t handle; /* handle to close */
687 /* Set a handle information */
688 @REQ(set_handle_info)
689 obj_handle_t handle; /* handle we are interested in */
690 int flags; /* new handle flags */
691 int mask; /* mask for flags to set */
693 int old_flags; /* old flag value */
697 /* Duplicate a handle */
699 obj_handle_t src_process; /* src process handle */
700 obj_handle_t src_handle; /* src handle to duplicate */
701 obj_handle_t dst_process; /* dst process handle */
702 unsigned int access; /* wanted access rights */
703 unsigned int attributes; /* object attributes */
704 unsigned int options; /* duplicate options (see below) */
706 obj_handle_t handle; /* duplicated handle in dst process */
707 int self; /* is the source the current process? */
708 int closed; /* whether the source handle has been closed */
710 #define DUP_HANDLE_CLOSE_SOURCE DUPLICATE_CLOSE_SOURCE
711 #define DUP_HANDLE_SAME_ACCESS DUPLICATE_SAME_ACCESS
712 #define DUP_HANDLE_MAKE_GLOBAL 0x80000000 /* Not a Windows flag */
715 /* Open a handle to a process */
717 process_id_t pid; /* process id to open */
718 unsigned int access; /* wanted access rights */
719 unsigned int attributes; /* object attributes */
721 obj_handle_t handle; /* handle to the process */
725 /* Open a handle to a thread */
727 thread_id_t tid; /* thread id to open */
728 unsigned int access; /* wanted access rights */
729 unsigned int attributes; /* object attributes */
731 obj_handle_t handle; /* handle to the thread */
735 /* Wait for handles */
737 int flags; /* wait flags (see below) */
738 void* cookie; /* magic cookie to return to client */
739 obj_handle_t signal; /* object to signal (0 if none) */
740 timeout_t timeout; /* timeout */
741 VARARG(handles,handles); /* handles to select on */
743 timeout_t timeout; /* timeout converted to absolute */
746 #define SELECT_ALERTABLE 2
747 #define SELECT_INTERRUPTIBLE 4
750 /* Create an event */
752 unsigned int access; /* wanted access rights */
753 unsigned int attributes; /* object attributes */
754 obj_handle_t rootdir; /* root directory */
755 int manual_reset; /* manual reset event */
756 int initial_state; /* initial state of the event */
757 VARARG(name,unicode_str); /* object name */
759 obj_handle_t handle; /* handle to the event */
762 /* Event operation */
764 obj_handle_t handle; /* handle to event */
765 int op; /* event operation (see below) */
767 enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT };
772 unsigned int access; /* wanted access rights */
773 unsigned int attributes; /* object attributes */
774 obj_handle_t rootdir; /* root directory */
775 VARARG(name,unicode_str); /* object name */
777 obj_handle_t handle; /* handle to the event */
783 unsigned int access; /* wanted access rights */
784 unsigned int attributes; /* object attributes */
785 obj_handle_t rootdir; /* root directory */
786 int owned; /* initially owned? */
787 VARARG(name,unicode_str); /* object name */
789 obj_handle_t handle; /* handle to the mutex */
793 /* Release a mutex */
795 obj_handle_t handle; /* handle to the mutex */
797 unsigned int prev_count; /* value of internal counter, before release */
803 unsigned int access; /* wanted access rights */
804 unsigned int attributes; /* object attributes */
805 obj_handle_t rootdir; /* root directory */
806 VARARG(name,unicode_str); /* object name */
808 obj_handle_t handle; /* handle to the mutex */
812 /* Create a semaphore */
813 @REQ(create_semaphore)
814 unsigned int access; /* wanted access rights */
815 unsigned int attributes; /* object attributes */
816 obj_handle_t rootdir; /* root directory */
817 unsigned int initial; /* initial count */
818 unsigned int max; /* maximum count */
819 VARARG(name,unicode_str); /* object name */
821 obj_handle_t handle; /* handle to the semaphore */
825 /* Release a semaphore */
826 @REQ(release_semaphore)
827 obj_handle_t handle; /* handle to the semaphore */
828 unsigned int count; /* count to add to semaphore */
830 unsigned int prev_count; /* previous semaphore count */
834 /* Open a semaphore */
836 unsigned int access; /* wanted access rights */
837 unsigned int attributes; /* object attributes */
838 obj_handle_t rootdir; /* root directory */
839 VARARG(name,unicode_str); /* object name */
841 obj_handle_t handle; /* handle to the semaphore */
847 unsigned int access; /* wanted access rights */
848 unsigned int attributes; /* object attributes */
849 unsigned int sharing; /* sharing flags */
850 int create; /* file create action */
851 unsigned int options; /* file options */
852 unsigned int attrs; /* file attributes for creation */
853 VARARG(filename,string); /* file name */
855 obj_handle_t handle; /* handle to the file */
859 /* Open a file object */
860 @REQ(open_file_object)
861 unsigned int access; /* wanted access rights */
862 unsigned int attributes; /* open attributes */
863 obj_handle_t rootdir; /* root directory */
864 unsigned int sharing; /* sharing flags */
865 unsigned int options; /* file options */
866 VARARG(filename,unicode_str); /* file name */
868 obj_handle_t handle; /* handle to the file */
872 /* Allocate a file handle for a Unix fd */
873 @REQ(alloc_file_handle)
874 unsigned int access; /* wanted access rights */
875 unsigned int attributes; /* object attributes */
876 int fd; /* file descriptor on the client side */
878 obj_handle_t handle; /* handle to the file */
882 /* Get a Unix fd to access a file */
884 obj_handle_t handle; /* handle to the file */
886 int type; /* file type (see below) */
887 int removable; /* is file removable? */
888 unsigned int access; /* file access rights */
889 unsigned int options; /* file open options */
893 FD_TYPE_INVALID, /* invalid file (no associated fd) */
894 FD_TYPE_FILE, /* regular file */
895 FD_TYPE_DIR, /* directory */
896 FD_TYPE_SOCKET, /* socket */
897 FD_TYPE_SERIAL, /* serial port */
898 FD_TYPE_PIPE, /* named pipe */
899 FD_TYPE_MAILSLOT, /* mailslot */
900 FD_TYPE_CHAR, /* unspecified char device */
901 FD_TYPE_DEVICE, /* Windows device file */
906 /* Flush a file buffers */
908 obj_handle_t handle; /* handle to the file */
910 obj_handle_t event; /* event set when finished */
914 /* Lock a region of a file */
916 obj_handle_t handle; /* handle to the file */
917 unsigned int offset_low; /* offset of start of lock */
918 unsigned int offset_high; /* offset of start of lock */
919 unsigned int count_low; /* count of bytes to lock */
920 unsigned int count_high; /* count of bytes to lock */
921 int shared; /* shared or exclusive lock? */
922 int wait; /* do we want to wait? */
924 obj_handle_t handle; /* handle to wait on */
925 int overlapped; /* is it an overlapped I/O handle? */
929 /* Unlock a region of a file */
931 obj_handle_t handle; /* handle to the file */
932 unsigned int offset_low; /* offset of start of unlock */
933 unsigned int offset_high; /* offset of start of unlock */
934 unsigned int count_low; /* count of bytes to unlock */
935 unsigned int count_high; /* count of bytes to unlock */
939 /* Create a socket */
941 unsigned int access; /* wanted access rights */
942 unsigned int attributes; /* object attributes */
943 int family; /* family, see socket manpage */
944 int type; /* type, see socket manpage */
945 int protocol; /* protocol, see socket manpage */
946 unsigned int flags; /* socket flags */
948 obj_handle_t handle; /* handle to the new socket */
952 /* Accept a socket */
954 obj_handle_t lhandle; /* handle to the listening socket */
955 unsigned int access; /* wanted access rights */
956 unsigned int attributes; /* object attributes */
958 obj_handle_t handle; /* handle to the new socket */
962 /* Set socket event parameters */
963 @REQ(set_socket_event)
964 obj_handle_t handle; /* handle to the socket */
965 unsigned int mask; /* event mask */
966 obj_handle_t event; /* event object */
967 user_handle_t window; /* window to send the message to */
968 unsigned int msg; /* message to send */
972 /* Get socket event parameters */
973 @REQ(get_socket_event)
974 obj_handle_t handle; /* handle to the socket */
975 int service; /* clear pending? */
976 obj_handle_t c_event; /* event to clear */
978 unsigned int mask; /* event mask */
979 unsigned int pmask; /* pending events */
980 unsigned int state; /* status bits */
981 VARARG(errors,ints); /* event errors */
985 /* Reenable pending socket events */
986 @REQ(enable_socket_event)
987 obj_handle_t handle; /* handle to the socket */
988 unsigned int mask; /* events to re-enable */
989 unsigned int sstate; /* status bits to set */
990 unsigned int cstate; /* status bits to clear */
993 @REQ(set_socket_deferred)
994 obj_handle_t handle; /* handle to the socket */
995 obj_handle_t deferred; /* handle to the socket for which accept() is deferred */
998 /* Allocate a console (only used by a console renderer) */
1000 unsigned int access; /* wanted access rights */
1001 unsigned int attributes; /* object attributes */
1002 process_id_t pid; /* pid of process which shall be attached to the console */
1004 obj_handle_t handle_in; /* handle to console input */
1005 obj_handle_t event; /* handle to renderer events change notification */
1009 /* Free the console of the current process */
1014 #define CONSOLE_RENDERER_NONE_EVENT 0x00
1015 #define CONSOLE_RENDERER_TITLE_EVENT 0x01
1016 #define CONSOLE_RENDERER_ACTIVE_SB_EVENT 0x02
1017 #define CONSOLE_RENDERER_SB_RESIZE_EVENT 0x03
1018 #define CONSOLE_RENDERER_UPDATE_EVENT 0x04
1019 #define CONSOLE_RENDERER_CURSOR_POS_EVENT 0x05
1020 #define CONSOLE_RENDERER_CURSOR_GEOM_EVENT 0x06
1021 #define CONSOLE_RENDERER_DISPLAY_EVENT 0x07
1022 #define CONSOLE_RENDERER_EXIT_EVENT 0x08
1023 struct console_renderer_event
1058 /* retrieve console events for the renderer */
1059 @REQ(get_console_renderer_events)
1060 obj_handle_t handle; /* handle to console input events */
1062 VARARG(data,bytes); /* the various console_renderer_events */
1066 /* Open a handle to the process console */
1068 obj_handle_t from; /* 0 (resp 1) input (resp output) of current process console */
1069 /* otherwise console_in handle to get active screen buffer? */
1070 unsigned int access; /* wanted access rights */
1071 unsigned int attributes; /* object attributes */
1072 int share; /* share mask (only for output handles) */
1074 obj_handle_t handle; /* handle to the console */
1078 /* Get the input queue wait event */
1079 @REQ(get_console_wait_event)
1081 obj_handle_t handle;
1084 /* Get a console mode (input or output) */
1085 @REQ(get_console_mode)
1086 obj_handle_t handle; /* handle to the console */
1088 int mode; /* console mode */
1092 /* Set a console mode (input or output) */
1093 @REQ(set_console_mode)
1094 obj_handle_t handle; /* handle to the console */
1095 int mode; /* console mode */
1099 /* Set info about a console (input only) */
1100 @REQ(set_console_input_info)
1101 obj_handle_t handle; /* handle to console input, or 0 for process' console
*/
1102 int mask
; /* setting
mask (see below
) */
1103 obj_handle_t active_sb
; /* active screen buffer
*/
1104 int history_mode
; /* whether we duplicate lines in history
*/
1105 int history_size
; /* number of lines in history
*/
1106 int edition_mode
; /* index to the edition mode flavors
*/
1107 int input_cp
; /* console input codepage
*/
1108 int output_cp
; /* console output codepage
*/
1109 VARARG(title
,unicode_str
); /* console title
*/
1111 #define SET_CONSOLE_INPUT_INFO_ACTIVE_SB
0x01
1112 #define SET_CONSOLE_INPUT_INFO_TITLE
0x02
1113 #define SET_CONSOLE_INPUT_INFO_HISTORY_MODE
0x04
1114 #define SET_CONSOLE_INPUT_INFO_HISTORY_SIZE
0x08
1115 #define SET_CONSOLE_INPUT_INFO_EDITION_MODE
0x10
1116 #define SET_CONSOLE_INPUT_INFO_INPUT_CODEPAGE
0x20
1117 #define SET_CONSOLE_INPUT_INFO_OUTPUT_CODEPAGE
0x40
1120 /* Get info about a
console (input only
) */
1121 @
REQ(get_console_input_info
)
1122 obj_handle_t handle
; /* handle to console input
, or
0 for process
' console */
1124 int history_mode; /* whether we duplicate lines in history */
1125 int history_size; /* number of lines in history */
1126 int history_index; /* number of used lines in history */
1127 int edition_mode; /* index to the edition mode flavors */
1128 int input_cp; /* console input codepage */
1129 int output_cp; /* console output codepage */
1130 VARARG(title,unicode_str); /* console title */
1134 /* appends a string to console's history
*/
1135 @
REQ(append_console_input_history
)
1136 obj_handle_t handle
; /* handle to console input
, or
0 for process
' console */
1137 VARARG(line,unicode_str); /* line to add */
1141 /* appends a string to console's history
*/
1142 @
REQ(get_console_input_history
)
1143 obj_handle_t handle
; /* handle to console input
, or
0 for process
' console */
1144 int index; /* index to get line from */
1146 int total; /* total length of line in Unicode chars */
1147 VARARG(line,unicode_str); /* line to add */
1151 /* creates a new screen buffer on process' console
*/
1152 @
REQ(create_console_output
)
1153 obj_handle_t handle_in
; /* handle to console input
, or
0 for process
' console */
1154 unsigned int access; /* wanted access rights */
1155 unsigned int attributes; /* object attributes */
1156 unsigned int share; /* sharing credentials */
1158 obj_handle_t handle_out; /* handle to the screen buffer */
1162 /* Set info about a console (output only) */
1163 @REQ(set_console_output_info)
1164 obj_handle_t handle; /* handle to the console */
1165 int mask; /* setting mask (see below) */
1166 short int cursor_size; /* size of cursor (percentage filled) */
1167 short int cursor_visible;/* cursor visibility flag */
1168 short int cursor_x; /* position of cursor (x, y) */
1170 short int width; /* width of the screen buffer */
1171 short int height; /* height of the screen buffer */
1172 short int attr; /* default attribute */
1173 short int win_left; /* window actually displayed by renderer */
1174 short int win_top; /* the rect area is expressed withing the */
1175 short int win_right; /* boundaries of the screen buffer */
1176 short int win_bottom;
1177 short int max_width; /* maximum size (width x height) for the window */
1178 short int max_height;
1180 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_GEOM 0x01
1181 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_POS 0x02
1182 #define SET_CONSOLE_OUTPUT_INFO_SIZE 0x04
1183 #define SET_CONSOLE_OUTPUT_INFO_ATTR 0x08
1184 #define SET_CONSOLE_OUTPUT_INFO_DISPLAY_WINDOW 0x10
1185 #define SET_CONSOLE_OUTPUT_INFO_MAX_SIZE 0x20
1188 /* Get info about a console (output only) */
1189 @REQ(get_console_output_info)
1190 obj_handle_t handle; /* handle to the console */
1192 short int cursor_size; /* size of cursor (percentage filled) */
1193 short int cursor_visible;/* cursor visibility flag */
1194 short int cursor_x; /* position of cursor (x, y) */
1196 short int width; /* width of the screen buffer */
1197 short int height; /* height of the screen buffer */
1198 short int attr; /* default attribute */
1199 short int win_left; /* window actually displayed by renderer */
1200 short int win_top; /* the rect area is expressed withing the */
1201 short int win_right; /* boundaries of the screen buffer */
1202 short int win_bottom;
1203 short int max_width; /* maximum size (width x height) for the window */
1204 short int max_height;
1207 /* Add input records to a console input queue */
1208 @REQ(write_console_input)
1209 obj_handle_t handle; /* handle to the console input */
1210 VARARG(rec,input_records); /* input records */
1212 int written; /* number of records written */
1216 /* Fetch input records from a console input queue */
1217 @REQ(read_console_input)
1218 obj_handle_t handle; /* handle to the console input */
1219 int flush; /* flush the retrieved records from the queue? */
1221 int read; /* number of records read */
1222 VARARG(rec,input_records); /* input records */
1226 /* write data (chars and/or attributes) in a screen buffer */
1227 @REQ(write_console_output)
1228 obj_handle_t handle; /* handle to the console output */
1229 int x; /* position where to start writing */
1231 int mode; /* char info (see below) */
1232 int wrap; /* wrap around at end of line? */
1233 VARARG(data,bytes); /* info to write */
1235 int written; /* number of char infos actually written */
1236 int width; /* width of screen buffer */
1237 int height; /* height of screen buffer */
1241 CHAR_INFO_MODE_TEXT, /* characters only */
1242 CHAR_INFO_MODE_ATTR, /* attributes only */
1243 CHAR_INFO_MODE_TEXTATTR, /* both characters and attributes */
1244 CHAR_INFO_MODE_TEXTSTDATTR /* characters but use standard attributes */
1248 /* fill a screen buffer with constant data (chars and/or attributes) */
1249 @REQ(fill_console_output)
1250 obj_handle_t handle; /* handle to the console output */
1251 int x; /* position where to start writing */
1253 int mode; /* char info mode */
1254 int count; /* number to write */
1255 int wrap; /* wrap around at end of line? */
1256 char_info_t data; /* data to write */
1258 int written; /* number of char infos actually written */
1262 /* read data (chars and/or attributes) from a screen buffer */
1263 @REQ(read_console_output)
1264 obj_handle_t handle; /* handle to the console output */
1265 int x; /* position (x,y) where to start reading */
1267 int mode; /* char info mode */
1268 int wrap; /* wrap around at end of line? */
1270 int width; /* width of screen buffer */
1271 int height; /* height of screen buffer */
1276 /* move a rect (of data) in screen buffer content */
1277 @REQ(move_console_output)
1278 obj_handle_t handle; /* handle to the console output */
1279 short int x_src; /* position (x, y) of rect to start moving from */
1281 short int x_dst; /* position (x, y) of rect to move to */
1283 short int w; /* size of the rect (width, height) to move */
1288 /* Sends a signal to a process group */
1289 @REQ(send_console_signal)
1290 int signal; /* the signal to send */
1291 process_id_t group_id; /* the group to send the signal to */
1295 /* enable directory change notifications */
1296 @REQ(read_directory_changes)
1297 unsigned int filter; /* notification filter */
1298 obj_handle_t handle; /* handle to the directory */
1299 int subtree; /* watch the subtree? */
1300 int want_data; /* flag indicating whether change data should be collected */
1301 async_data_t async; /* async I/O parameters */
1306 obj_handle_t handle;
1308 int action; /* type of change */
1309 VARARG(name,string); /* name of directory entry that changed */
1313 /* Create a file mapping */
1314 @REQ(create_mapping)
1315 unsigned int access; /* wanted access rights */
1316 unsigned int attributes; /* object attributes */
1317 obj_handle_t rootdir; /* root directory */
1318 int size_high; /* mapping size */
1319 int size_low; /* mapping size */
1320 int protect; /* protection flags (see below) */
1321 obj_handle_t file_handle; /* file handle */
1322 VARARG(name,unicode_str); /* object name */
1324 obj_handle_t handle; /* handle to the mapping */
1326 /* protection flags */
1327 #define VPROT_READ 0x01
1328 #define VPROT_WRITE 0x02
1329 #define VPROT_EXEC 0x04
1330 #define VPROT_WRITECOPY 0x08
1331 #define VPROT_GUARD 0x10
1332 #define VPROT_NOCACHE 0x20
1333 #define VPROT_COMMITTED 0x40
1334 #define VPROT_IMAGE 0x80
1337 /* Open a mapping */
1339 unsigned int access; /* wanted access rights */
1340 unsigned int attributes; /* object attributes */
1341 obj_handle_t rootdir; /* root directory */
1342 VARARG(name,unicode_str); /* object name */
1344 obj_handle_t handle; /* handle to the mapping */
1348 /* Get information about a file mapping */
1349 @REQ(get_mapping_info)
1350 obj_handle_t handle; /* handle to the mapping */
1352 int size_high; /* mapping size */
1353 int size_low; /* mapping size */
1354 int protect; /* protection flags */
1355 int header_size; /* header size (for VPROT_IMAGE mapping) */
1356 void* base; /* default base addr (for VPROT_IMAGE mapping) */
1357 obj_handle_t mapping; /* duplicate mapping handle unless removable */
1358 obj_handle_t shared_file; /* shared mapping file handle */
1359 int shared_size; /* shared mapping size */
1363 #define SNAP_HEAPLIST 0x00000001
1364 #define SNAP_PROCESS 0x00000002
1365 #define SNAP_THREAD 0x00000004
1366 #define SNAP_MODULE 0x00000008
1367 /* Create a snapshot */
1368 @REQ(create_snapshot)
1369 unsigned int attributes; /* object attributes */
1370 int flags; /* snapshot flags (SNAP_*) */
1371 process_id_t pid; /* process id */
1373 obj_handle_t handle; /* handle to the snapshot */
1377 /* Get the next process from a snapshot */
1379 obj_handle_t handle; /* handle to the snapshot */
1380 int reset; /* reset snapshot position? */
1382 int count; /* process usage count */
1383 process_id_t pid; /* process id */
1384 process_id_t ppid; /* parent process id */
1385 void* heap; /* heap base */
1386 void* module; /* main module */
1387 int threads; /* number of threads */
1388 int priority; /* process priority */
1389 int handles; /* number of handles */
1390 VARARG(filename,unicode_str); /* file name of main exe */
1394 /* Get the next thread from a snapshot */
1396 obj_handle_t handle; /* handle to the snapshot */
1397 int reset; /* reset snapshot position? */
1399 int count; /* thread usage count */
1400 process_id_t pid; /* process id */
1401 thread_id_t tid; /* thread id */
1402 int base_pri; /* base priority */
1403 int delta_pri; /* delta priority */
1407 /* Get the next module from a snapshot */
1409 obj_handle_t handle; /* handle to the snapshot */
1410 int reset; /* reset snapshot position? */
1412 process_id_t pid; /* process id */
1413 void* base; /* module base address */
1414 size_t size; /* module size */
1415 VARARG(filename,unicode_str); /* file name of module */
1419 /* Wait for a debug event */
1420 @REQ(wait_debug_event)
1421 int get_handle; /* should we alloc a handle for waiting? */
1423 process_id_t pid; /* process id */
1424 thread_id_t tid; /* thread id */
1425 obj_handle_t wait; /* wait handle if no event ready */
1426 VARARG(event,debug_event); /* debug event data */
1430 /* Queue an exception event */
1431 @REQ(queue_exception_event)
1432 int first; /* first chance exception? */
1433 VARARG(record,exc_event); /* thread context followed by exception record */
1435 obj_handle_t handle; /* handle to the queued event */
1439 /* Retrieve the status of an exception event */
1440 @REQ(get_exception_status)
1441 obj_handle_t handle; /* handle to the queued event */
1443 VARARG(context,context); /* modified thread context */
1447 /* Send an output string to the debugger */
1448 @REQ(output_debug_string)
1449 void* string; /* string to display (in debugged process address space) */
1450 int unicode; /* is it Unicode? */
1451 int length; /* string length */
1455 /* Continue a debug event */
1456 @REQ(continue_debug_event)
1457 process_id_t pid; /* process id to continue */
1458 thread_id_t tid; /* thread id to continue */
1459 int status; /* continuation status */
1463 /* Start/stop debugging an existing process */
1465 process_id_t pid; /* id of the process to debug */
1466 int attach; /* 1=attaching / 0=detaching from the process */
1470 /* Simulate a breakpoint in a process */
1472 obj_handle_t handle; /* process handle */
1474 int self; /* was it the caller itself? */
1478 /* Set debugger kill on exit flag */
1479 @REQ(set_debugger_kill_on_exit)
1480 int kill_on_exit; /* 0=detach/1=kill debuggee when debugger dies */
1484 /* Read data from a process address space */
1485 @REQ(read_process_memory)
1486 obj_handle_t handle; /* process handle */
1487 void* addr; /* addr to read from */
1489 VARARG(data,bytes); /* result data */
1493 /* Write data to a process address space */
1494 @REQ(write_process_memory)
1495 obj_handle_t handle; /* process handle */
1496 void* addr; /* addr to write to */
1497 VARARG(data,bytes); /* data to write */
1501 /* Create a registry key */
1503 obj_handle_t parent; /* handle to the parent key */
1504 unsigned int access; /* desired access rights */
1505 unsigned int attributes; /* object attributes */
1506 unsigned int options; /* creation options */
1507 time_t modif; /* last modification time */
1508 data_size_t namelen; /* length of key name in bytes */
1509 VARARG(name,unicode_str,namelen); /* key name */
1510 VARARG(class,unicode_str); /* class name */
1512 obj_handle_t hkey; /* handle to the created key */
1513 int created; /* has it been newly created? */
1516 /* Open a registry key */
1518 obj_handle_t parent; /* handle to the parent key */
1519 unsigned int access; /* desired access rights */
1520 unsigned int attributes; /* object attributes */
1521 VARARG(name,unicode_str); /* key name */
1523 obj_handle_t hkey; /* handle to the open key */
1527 /* Delete a registry key */
1529 obj_handle_t hkey; /* handle to the key */
1533 /* Flush a registry key */
1535 obj_handle_t hkey; /* handle to the key */
1539 /* Enumerate registry subkeys */
1541 obj_handle_t hkey; /* handle to registry key */
1542 int index; /* index of subkey (or -1 for current key) */
1543 int info_class; /* requested information class */
1545 int subkeys; /* number of subkeys */
1546 int max_subkey; /* longest subkey name */
1547 int max_class; /* longest class name */
1548 int values; /* number of values */
1549 int max_value; /* longest value name */
1550 int max_data; /* longest value data */
1551 time_t modif; /* last modification time */
1552 data_size_t total; /* total length needed for full name and class */
1553 data_size_t namelen; /* length of key name in bytes */
1554 VARARG(name,unicode_str,namelen); /* key name */
1555 VARARG(class,unicode_str); /* class name */
1559 /* Set a value of a registry key */
1561 obj_handle_t hkey; /* handle to registry key */
1562 int type; /* value type */
1563 data_size_t namelen; /* length of value name in bytes */
1564 VARARG(name,unicode_str,namelen); /* value name */
1565 VARARG(data,bytes); /* value data */
1569 /* Retrieve the value of a registry key */
1571 obj_handle_t hkey; /* handle to registry key */
1572 VARARG(name,unicode_str); /* value name */
1574 int type; /* value type */
1575 data_size_t total; /* total length needed for data */
1576 VARARG(data,bytes); /* value data */
1580 /* Enumerate a value of a registry key */
1581 @REQ(enum_key_value)
1582 obj_handle_t hkey; /* handle to registry key */
1583 int index; /* value index */
1584 int info_class; /* requested information class */
1586 int type; /* value type */
1587 data_size_t total; /* total length needed for full name and data */
1588 data_size_t namelen; /* length of value name in bytes */
1589 VARARG(name,unicode_str,namelen); /* value name */
1590 VARARG(data,bytes); /* value data */
1594 /* Delete a value of a registry key */
1595 @REQ(delete_key_value)
1596 obj_handle_t hkey; /* handle to registry key */
1597 VARARG(name,unicode_str); /* value name */
1601 /* Load a registry branch from a file */
1603 obj_handle_t hkey; /* root key to load to */
1604 obj_handle_t file; /* file to load from */
1605 VARARG(name,unicode_str); /* subkey name */
1609 /* UnLoad a registry branch from a file */
1610 @REQ(unload_registry)
1611 obj_handle_t hkey; /* root key to unload to */
1615 /* Save a registry branch to a file */
1617 obj_handle_t hkey; /* key to save */
1618 obj_handle_t file; /* file to save to */
1622 /* Add a registry key change notification */
1623 @REQ(set_registry_notification)
1624 obj_handle_t hkey; /* key to watch for changes */
1625 obj_handle_t event; /* event to set */
1626 int subtree; /* should we watch the whole subtree? */
1627 unsigned int filter; /* things to watch */
1631 /* Create a waitable timer */
1633 unsigned int access; /* wanted access rights */
1634 unsigned int attributes; /* object attributes */
1635 obj_handle_t rootdir; /* root directory */
1636 int manual; /* manual reset */
1637 VARARG(name,unicode_str); /* object name */
1639 obj_handle_t handle; /* handle to the timer */
1643 /* Open a waitable timer */
1645 unsigned int access; /* wanted access rights */
1646 unsigned int attributes; /* object attributes */
1647 obj_handle_t rootdir; /* root directory */
1648 VARARG(name,unicode_str); /* object name */
1650 obj_handle_t handle; /* handle to the timer */
1653 /* Set a waitable timer */
1655 obj_handle_t handle; /* handle to the timer */
1656 timeout_t expire; /* next expiration absolute time */
1657 int period; /* timer period in ms */
1658 void* callback; /* callback function */
1659 void* arg; /* callback argument */
1661 int signaled; /* was the timer signaled before this call ? */
1664 /* Cancel a waitable timer */
1666 obj_handle_t handle; /* handle to the timer */
1668 int signaled; /* was the timer signaled before this calltime ? */
1671 /* Get information on a waitable timer */
1672 @REQ(get_timer_info)
1673 obj_handle_t handle; /* handle to the timer */
1675 timeout_t when; /* absolute time when the timer next expires */
1676 int signaled; /* is the timer signaled? */
1680 /* Retrieve the current context of a thread */
1681 @REQ(get_thread_context)
1682 obj_handle_t handle; /* thread handle */
1683 unsigned int flags; /* context flags */
1684 int suspend; /* if getting context during suspend */
1686 int self; /* was it a handle to the current thread? */
1687 VARARG(context,context); /* thread context */
1691 /* Set the current context of a thread */
1692 @REQ(set_thread_context)
1693 obj_handle_t handle; /* thread handle */
1694 unsigned int flags; /* context flags */
1695 int suspend; /* if setting context during suspend */
1696 VARARG(context,context); /* thread context */
1698 int self; /* was it a handle to the current thread? */
1702 /* Fetch a selector entry for a thread */
1703 @REQ(get_selector_entry)
1704 obj_handle_t handle; /* thread handle */
1705 int entry; /* LDT entry */
1707 unsigned int base; /* selector base */
1708 unsigned int limit; /* selector limit */
1709 unsigned char flags; /* selector flags */
1715 obj_handle_t table; /* which table to add atom to */
1716 VARARG(name,unicode_str); /* atom name */
1718 atom_t atom; /* resulting atom */
1722 /* Delete an atom */
1724 obj_handle_t table; /* which table to delete atom from */
1725 atom_t atom; /* atom handle */
1731 obj_handle_t table; /* which table to find atom from */
1732 VARARG(name,unicode_str); /* atom name */
1734 atom_t atom; /* atom handle */
1738 /* Get information about an atom */
1739 @REQ(get_atom_information)
1740 obj_handle_t table; /* which table to find atom from */
1741 atom_t atom; /* atom handle */
1743 int count; /* atom lock count */
1744 int pinned; /* whether the atom has been pinned */
1745 data_size_t total; /* actual length of atom name */
1746 VARARG(name,unicode_str); /* atom name */
1750 /* Set information about an atom */
1751 @REQ(set_atom_information)
1752 obj_handle_t table; /* which table to find atom from */
1753 atom_t atom; /* atom handle */
1754 int pinned; /* whether to bump atom information */
1758 /* Empty an atom table */
1759 @REQ(empty_atom_table)
1760 obj_handle_t table; /* which table to find atom from */
1761 int if_pinned; /* whether to delete pinned atoms */
1765 /* Init an atom table */
1766 @REQ(init_atom_table)
1767 int entries; /* number of entries (only for local) */
1769 obj_handle_t table; /* handle to the atom table */
1773 /* Get the message queue of the current thread */
1776 obj_handle_t handle; /* handle to the queue */
1780 /* Set the file descriptor associated to the current thread queue */
1782 obj_handle_t handle; /* handle to the file descriptor */
1786 /* Set the current message queue wakeup mask */
1787 @REQ(set_queue_mask)
1788 unsigned int wake_mask; /* wakeup bits mask */
1789 unsigned int changed_mask; /* changed bits mask */
1790 int skip_wait; /* will we skip waiting if signaled? */
1792 unsigned int wake_bits; /* current wake bits */
1793 unsigned int changed_bits; /* current changed bits */
1797 /* Get the current message queue status */
1798 @REQ(get_queue_status)
1799 int clear; /* should we clear the change bits? */
1801 unsigned int wake_bits; /* wake bits */
1802 unsigned int changed_bits; /* changed bits since last time */
1806 /* Retrieve the process idle event */
1807 @REQ(get_process_idle_event)
1808 obj_handle_t handle; /* process handle */
1810 obj_handle_t event; /* handle to idle event */
1814 /* Send a message to a thread queue */
1816 thread_id_t id; /* thread id */
1817 int type; /* message type (see below) */
1818 int flags; /* message flags (see below) */
1819 user_handle_t win; /* window handle */
1820 unsigned int msg; /* message code */
1821 unsigned long wparam; /* parameters */
1822 unsigned long lparam; /* parameters */
1823 timeout_t timeout; /* timeout for reply */
1824 VARARG(data,message_data); /* message data for sent messages */
1827 @REQ(post_quit_message)
1828 int exit_code; /* exit code to return */
1833 MSG_ASCII, /* Ascii message (from SendMessageA) */
1834 MSG_UNICODE, /* Unicode message (from SendMessageW) */
1835 MSG_NOTIFY, /* notify message (from SendNotifyMessageW), always Unicode */
1836 MSG_CALLBACK, /* callback message (from SendMessageCallbackW), always Unicode */
1837 MSG_CALLBACK_RESULT,/* result of a callback message */
1838 MSG_OTHER_PROCESS, /* sent from other process, may include vararg data, always Unicode */
1839 MSG_POSTED, /* posted message (from PostMessageW), always Unicode */
1840 MSG_HARDWARE, /* hardware message */
1841 MSG_WINEVENT /* winevent message */
1843 #define SEND_MSG_ABORT_IF_HUNG 0x01
1846 /* Send a hardware message to a thread queue */
1847 @REQ(send_hardware_message)
1848 thread_id_t id; /* thread id */
1849 user_handle_t win; /* window handle */
1850 unsigned int msg; /* message code */
1851 unsigned int time; /* message time */
1852 unsigned long wparam; /* parameters */
1853 unsigned long lparam; /* parameters */
1854 unsigned long info; /* extra info */
1855 int x; /* x position */
1856 int y; /* y position */
1860 /* Get a message from the current queue */
1862 unsigned int flags; /* PM_* flags */
1863 user_handle_t get_win; /* window handle to get */
1864 unsigned int get_first; /* first message code to get */
1865 unsigned int get_last; /* last message code to get */
1866 unsigned int hw_id; /* id of the previous hardware message (or 0) */
1868 user_handle_t win; /* window handle */
1869 int type; /* message type */
1870 unsigned int msg; /* message code */
1871 unsigned long wparam; /* parameters */
1872 unsigned long lparam; /* parameters */
1873 unsigned long info; /* extra info */
1874 int x; /* x position */
1875 int y; /* y position */
1876 unsigned int time; /* message time */
1877 unsigned int hw_id; /* id if hardware message */
1878 unsigned int active_hooks; /* active hooks bitmap */
1879 data_size_t total; /* total size of extra data */
1880 VARARG(data,message_data); /* message data for sent messages */
1884 /* Reply to a sent message */
1886 unsigned int result; /* message result */
1887 int remove; /* should we remove the message? */
1888 VARARG(data,bytes); /* message data for sent messages */
1892 /* Accept the current hardware message */
1893 @REQ(accept_hardware_message)
1894 unsigned int hw_id; /* id of the hardware message */
1895 int remove; /* should we remove the message? */
1896 user_handle_t new_win; /* new destination window for current message */
1900 /* Retrieve the reply for the last message sent */
1901 @REQ(get_message_reply)
1902 int cancel; /* cancel message if not ready? */
1904 unsigned int result; /* message result */
1905 VARARG(data,bytes); /* message data for sent messages */
1909 /* Set a window timer */
1911 user_handle_t win; /* window handle */
1912 unsigned int msg; /* message to post */
1913 unsigned int rate; /* timer rate in ms */
1914 unsigned long id; /* timer id */
1915 unsigned long lparam; /* message lparam (callback proc) */
1917 unsigned long id; /* timer id */
1921 /* Kill a window timer */
1922 @REQ(kill_win_timer)
1923 user_handle_t win; /* window handle */
1924 unsigned int msg; /* message to post */
1925 unsigned long id; /* timer id */
1929 /* Retrieve info about a serial port */
1930 @REQ(get_serial_info)
1931 obj_handle_t handle; /* handle to comm port */
1933 unsigned int readinterval;
1934 unsigned int readconst;
1935 unsigned int readmult;
1936 unsigned int writeconst;
1937 unsigned int writemult;
1938 unsigned int eventmask;
1942 /* Set info about a serial port */
1943 @REQ(set_serial_info)
1944 obj_handle_t handle; /* handle to comm port */
1945 int flags; /* bitmask to set values (see below) */
1946 unsigned int readinterval;
1947 unsigned int readconst;
1948 unsigned int readmult;
1949 unsigned int writeconst;
1950 unsigned int writemult;
1951 unsigned int eventmask;
1953 #define SERIALINFO_SET_TIMEOUTS 0x01
1954 #define SERIALINFO_SET_MASK 0x02
1957 /* Create an async I/O */
1958 @REQ(register_async)
1959 obj_handle_t handle; /* handle to comm port, socket or file */
1960 int type; /* type of queue to look after */
1961 int count; /* count - usually # of bytes to be read/written */
1962 async_data_t async; /* async I/O parameters */
1964 #define ASYNC_TYPE_READ 0x01
1965 #define ASYNC_TYPE_WRITE 0x02
1966 #define ASYNC_TYPE_WAIT 0x03
1969 /* Cancel all async op on a fd */
1971 obj_handle_t handle; /* handle to comm port, socket or file */
1975 /* Perform an ioctl on a file */
1977 obj_handle_t handle; /* handle to the device */
1978 ioctl_code_t code; /* ioctl code */
1979 async_data_t async; /* async I/O parameters */
1980 VARARG(in_data,bytes); /* ioctl input data */
1982 obj_handle_t wait; /* handle to wait on for blocking ioctl */
1983 unsigned int options; /* device open options */
1984 VARARG(out_data,bytes); /* ioctl output data */
1988 /* Retrieve results of an async ioctl */
1989 @REQ(get_ioctl_result)
1990 obj_handle_t handle; /* handle to the device */
1991 void* user_arg; /* user arg used to identify the request */
1993 VARARG(out_data,bytes); /* ioctl output data */
1997 /* Create a named pipe */
1998 @REQ(create_named_pipe)
1999 unsigned int access;
2000 unsigned int attributes; /* object attributes */
2001 obj_handle_t rootdir; /* root directory */
2002 unsigned int options;
2004 unsigned int maxinstances;
2005 unsigned int outsize;
2006 unsigned int insize;
2008 VARARG(name,unicode_str); /* pipe name */
2010 obj_handle_t handle; /* handle to the pipe */
2013 /* flags in create_named_pipe and get_named_pipe_info */
2014 #define NAMED_PIPE_MESSAGE_STREAM_WRITE 0x0001
2015 #define NAMED_PIPE_MESSAGE_STREAM_READ 0x0002
2016 #define NAMED_PIPE_NONBLOCKING_MODE 0x0004
2017 #define NAMED_PIPE_SERVER_END 0x8000
2020 @REQ(get_named_pipe_info)
2021 obj_handle_t handle;
2024 unsigned int maxinstances;
2025 unsigned int instances;
2026 unsigned int outsize;
2027 unsigned int insize;
2031 /* Create a window */
2033 user_handle_t parent; /* parent window */
2034 user_handle_t owner; /* owner window */
2035 atom_t atom; /* class atom */
2036 void* instance; /* module instance */
2038 user_handle_t handle; /* created window */
2039 user_handle_t parent; /* full handle of parent */
2040 user_handle_t owner; /* full handle of owner */
2041 int extra; /* number of extra bytes */
2042 void* class_ptr; /* pointer to class in client address space */
2046 /* Destroy a window */
2047 @REQ(destroy_window)
2048 user_handle_t handle; /* handle to the window */
2052 /* Retrieve the desktop window for the current thread */
2053 @REQ(get_desktop_window)
2054 int force; /* force creation if it doesn't exist
*/
2056 user_handle_t handle
; /* handle to the desktop window
*/
2060 /* Set a window owner
*/
2061 @
REQ(set_window_owner
)
2062 user_handle_t handle
; /* handle to the window
*/
2063 user_handle_t owner
; /* new owner
*/
2065 user_handle_t full_owner
; /* full handle of new owner
*/
2066 user_handle_t prev_owner
; /* full handle of previous owner
*/
2070 /* Get information from a window handle
*/
2071 @
REQ(get_window_info
)
2072 user_handle_t handle
; /* handle to the window
*/
2074 user_handle_t full_handle
; /* full
32-bit handle
*/
2075 user_handle_t last_active
; /* last active popup
*/
2076 process_id_t pid
; /* process owning the window
*/
2077 thread_id_t tid
; /* thread owning the window
*/
2078 atom_t atom
; /* class atom
*/
2079 int is_unicode
; /* ANSI or unicode
*/
2083 /* Set some information in a window
*/
2084 @
REQ(set_window_info
)
2085 unsigned int flags
; /* flags for fields to
set (see below
) */
2086 user_handle_t handle
; /* handle to the window
*/
2087 unsigned int style
; /* window style
*/
2088 unsigned int ex_style
; /* window extended style
*/
2089 unsigned int id
; /* window id
*/
2090 int is_unicode
; /* ANSI or unicode
*/
2091 void
* instance
; /* creator instance
*/
2092 unsigned long user_data
; /* user
-specific data
*/
2093 int extra_offset
; /* offset to set in extra bytes
*/
2094 data_size_t extra_size
; /* size to set in extra bytes
*/
2095 unsigned long extra_value
; /* value to set in extra bytes
*/
2097 unsigned int old_style
; /* old window style
*/
2098 unsigned int old_ex_style
; /* old window extended style
*/
2099 unsigned int old_id
; /* old window id
*/
2100 void
* old_instance
; /* old creator instance
*/
2101 unsigned long old_user_data
; /* old user
-specific data
*/
2102 unsigned long old_extra_value
; /* old value in extra bytes
*/
2104 #define SET_WIN_STYLE
0x01
2105 #define SET_WIN_EXSTYLE
0x02
2106 #define SET_WIN_ID
0x04
2107 #define SET_WIN_INSTANCE
0x08
2108 #define SET_WIN_USERDATA
0x10
2109 #define SET_WIN_EXTRA
0x20
2110 #define SET_WIN_UNICODE
0x40
2113 /* Set the parent of a window
*/
2115 user_handle_t handle
; /* handle to the window
*/
2116 user_handle_t parent
; /* handle to the parent
*/
2118 user_handle_t old_parent
; /* old parent window
*/
2119 user_handle_t full_parent
; /* full handle of new parent
*/
2123 /* Get a list of the window parents
, up to the root of the tree
*/
2124 @
REQ(get_window_parents
)
2125 user_handle_t handle
; /* handle to the window
*/
2127 int count
; /* total count of parents
*/
2128 VARARG(parents
,user_handles
); /* parent handles
*/
2132 /* Get a list of the window children
*/
2133 @
REQ(get_window_children
)
2134 user_handle_t parent
; /* parent window
*/
2135 atom_t atom
; /* class atom for the listed children
*/
2136 thread_id_t tid
; /* thread owning the listed children
*/
2138 int count
; /* total count of children
*/
2139 VARARG(children
,user_handles
); /* children handles
*/
2143 /* Get a list of the window children that contain a given point
*/
2144 @
REQ(get_window_children_from_point
)
2145 user_handle_t parent
; /* parent window
*/
2146 int x
; /* point in parent coordinates
*/
2149 int count
; /* total count of children
*/
2150 VARARG(children
,user_handles
); /* children handles
*/
2154 /* Get window tree information from a window handle
*/
2155 @
REQ(get_window_tree
)
2156 user_handle_t handle
; /* handle to the window
*/
2158 user_handle_t parent
; /* parent window
*/
2159 user_handle_t owner
; /* owner window
*/
2160 user_handle_t next_sibling
; /* next sibling in Z
-order
*/
2161 user_handle_t prev_sibling
; /* prev sibling in Z
-order
*/
2162 user_handle_t first_sibling
; /* first sibling in Z
-order
*/
2163 user_handle_t last_sibling
; /* last sibling in Z
-order
*/
2164 user_handle_t first_child
; /* first child
*/
2165 user_handle_t last_child
; /* last child
*/
2168 /* Set the position and Z order of a window
*/
2169 @
REQ(set_window_pos
)
2170 unsigned int flags
; /* SWP_
* flags
*/
2171 user_handle_t handle
; /* handle to the window
*/
2172 user_handle_t previous
; /* previous window in Z order
*/
2173 rectangle_t window
; /* window rectangle
*/
2174 rectangle_t client
; /* client rectangle
*/
2175 VARARG(valid
,rectangles
); /* valid rectangles from WM_NCCALCSIZE
*/
2177 unsigned int new_style
; /* new window style
*/
2181 /* Get the window and client rectangles of a window
*/
2182 @
REQ(get_window_rectangles
)
2183 user_handle_t handle
; /* handle to the window
*/
2185 rectangle_t window
; /* window rectangle
*/
2186 rectangle_t visible
; /* visible part of the window rectangle
*/
2187 rectangle_t client
; /* client rectangle
*/
2191 /* Get the window text
*/
2192 @
REQ(get_window_text
)
2193 user_handle_t handle
; /* handle to the window
*/
2195 VARARG(text
,unicode_str
); /* window text
*/
2199 /* Set the window text
*/
2200 @
REQ(set_window_text
)
2201 user_handle_t handle
; /* handle to the window
*/
2202 VARARG(text
,unicode_str
); /* window text
*/
2206 /* Get the coordinates offset between two windows
*/
2207 @
REQ(get_windows_offset
)
2208 user_handle_t from
; /* handle to the first window
*/
2209 user_handle_t to
; /* handle to the second window
*/
2211 int x
; /* x coordinate offset
*/
2212 int y
; /* y coordinate offset
*/
2216 /* Get the visible region of a window
*/
2217 @
REQ(get_visible_region
)
2218 user_handle_t window
; /* handle to the window
*/
2219 unsigned int flags
; /* DCX flags
*/
2221 user_handle_t top_win
; /* top window to clip against
*/
2222 rectangle_t top_rect
; /* top window visible rect with screen coords
*/
2223 rectangle_t win_rect
; /* window rect in screen coords
*/
2224 data_size_t total_size
; /* total size of the resulting region
*/
2225 VARARG(region
,rectangles
); /* list of rectangles for the
region (in screen coords
) */
2229 /* Get the window region
*/
2230 @
REQ(get_window_region
)
2231 user_handle_t window
; /* handle to the window
*/
2233 data_size_t total_size
; /* total size of the resulting region
*/
2234 VARARG(region
,rectangles
); /* list of rectangles for the region
*/
2238 /* Set the window region
*/
2239 @
REQ(set_window_region
)
2240 user_handle_t window
; /* handle to the window
*/
2241 int redraw
; /* redraw the window?
*/
2242 VARARG(region
,rectangles
); /* list of rectangles for the region
*/
2246 /* Get the window update region
*/
2247 @
REQ(get_update_region
)
2248 user_handle_t window
; /* handle to the window
*/
2249 user_handle_t from_child
; /* child to start searching from
*/
2250 unsigned int flags
; /* update
flags (see below
) */
2252 user_handle_t child
; /* child to
repaint (or window itself
) */
2253 unsigned int flags
; /* resulting update
flags (see below
) */
2254 data_size_t total_size
; /* total size of the resulting region
*/
2255 VARARG(region
,rectangles
); /* list of rectangles for the region
*/
2257 #define UPDATE_NONCLIENT
0x01 /* get region for repainting non
-client area
*/
2258 #define UPDATE_ERASE
0x02 /* get region for erasing client area
*/
2259 #define UPDATE_PAINT
0x04 /* get region for painting client area
*/
2260 #define UPDATE_INTERNALPAINT
0x08 /* get region if internal paint is pending
*/
2261 #define UPDATE_ALLCHILDREN
0x10 /* force repaint of all children
*/
2262 #define UPDATE_NOCHILDREN
0x20 /* don
't try to repaint any children */
2263 #define UPDATE_NOREGION 0x40 /* don't return a region
, only the flags
*/
2266 /* Update the z order of a window so that a given rectangle is fully visible
*/
2267 @
REQ(update_window_zorder
)
2268 user_handle_t window
; /* handle to the window
*/
2269 rectangle_t rect
; /* rectangle that must be visible
*/
2273 /* Mark parts of a window as needing a redraw
*/
2275 user_handle_t window
; /* handle to the window
*/
2276 unsigned int flags
; /* RDW_
* flags
*/
2277 VARARG(region
,rectangles
); /* list of rectangles for the region
*/
2281 /* Set a window property
*/
2282 @
REQ(set_window_property
)
2283 user_handle_t window
; /* handle to the window
*/
2284 atom_t atom
; /* property
atom (if no name specified
) */
2285 obj_handle_t handle
; /* handle to store
*/
2286 VARARG(name
,unicode_str
); /* property name
*/
2290 /* Remove a window property
*/
2291 @
REQ(remove_window_property
)
2292 user_handle_t window
; /* handle to the window
*/
2293 atom_t atom
; /* property
atom (if no name specified
) */
2294 VARARG(name
,unicode_str
); /* property name
*/
2296 obj_handle_t handle
; /* handle stored in property
*/
2300 /* Get a window property
*/
2301 @
REQ(get_window_property
)
2302 user_handle_t window
; /* handle to the window
*/
2303 atom_t atom
; /* property
atom (if no name specified
) */
2304 VARARG(name
,unicode_str
); /* property name
*/
2306 obj_handle_t handle
; /* handle stored in property
*/
2310 /* Get the list of properties of a window
*/
2311 @
REQ(get_window_properties
)
2312 user_handle_t window
; /* handle to the window
*/
2314 int total
; /* total number of properties
*/
2315 VARARG(props
,properties
); /* list of properties
*/
2319 /* Create a window station
*/
2320 @
REQ(create_winstation
)
2321 unsigned int flags
; /* window station flags
*/
2322 unsigned int access
; /* wanted access rights
*/
2323 unsigned int attributes
; /* object attributes
*/
2324 VARARG(name
,unicode_str
); /* object name
*/
2326 obj_handle_t handle
; /* handle to the window station
*/
2330 /* Open a handle to a window station
*/
2331 @
REQ(open_winstation
)
2332 unsigned int access
; /* wanted access rights
*/
2333 unsigned int attributes
; /* object attributes
*/
2334 VARARG(name
,unicode_str
); /* object name
*/
2336 obj_handle_t handle
; /* handle to the window station
*/
2340 /* Close a window station
*/
2341 @
REQ(close_winstation
)
2342 obj_handle_t handle
; /* handle to the window station
*/
2346 /* Get the process current window station
*/
2347 @
REQ(get_process_winstation
)
2349 obj_handle_t handle
; /* handle to the window station
*/
2353 /* Set the process current window station
*/
2354 @
REQ(set_process_winstation
)
2355 obj_handle_t handle
; /* handle to the window station
*/
2359 /* Create a desktop
*/
2360 @
REQ(create_desktop
)
2361 unsigned int flags
; /* desktop flags
*/
2362 unsigned int access
; /* wanted access rights
*/
2363 unsigned int attributes
; /* object attributes
*/
2364 VARARG(name
,unicode_str
); /* object name
*/
2366 obj_handle_t handle
; /* handle to the desktop
*/
2370 /* Open a handle to a desktop
*/
2372 unsigned int flags
; /* desktop flags
*/
2373 unsigned int access
; /* wanted access rights
*/
2374 unsigned int attributes
; /* object attributes
*/
2375 VARARG(name
,unicode_str
); /* object name
*/
2377 obj_handle_t handle
; /* handle to the desktop
*/
2381 /* Close a desktop
*/
2383 obj_handle_t handle
; /* handle to the desktop
*/
2387 /* Get the thread current desktop
*/
2388 @
REQ(get_thread_desktop
)
2389 thread_id_t tid
; /* thread id
*/
2391 obj_handle_t handle
; /* handle to the desktop
*/
2395 /* Set the thread current desktop
*/
2396 @
REQ(set_thread_desktop
)
2397 obj_handle_t handle
; /* handle to the desktop
*/
2401 /* Get
/set information about a user
object (window station or desktop
) */
2402 @
REQ(set_user_object_info
)
2403 obj_handle_t handle
; /* handle to the object
*/
2404 unsigned int flags
; /* information to set
*/
2405 unsigned int obj_flags
; /* new object flags
*/
2407 int is_desktop
; /* is object a desktop?
*/
2408 unsigned int old_obj_flags
; /* old object flags
*/
2409 VARARG(name
,unicode_str
); /* object name
*/
2411 #define SET_USER_OBJECT_FLAGS
1
2414 /* Attach (or detach
) thread inputs
*/
2415 @
REQ(attach_thread_input
)
2416 thread_id_t tid_from
; /* thread to be attached
*/
2417 thread_id_t tid_to
; /* thread to which tid_from should be attached
*/
2418 int attach
; /* is it an attach?
*/
2422 /* Get input data for a given thread
*/
2423 @
REQ(get_thread_input
)
2424 thread_id_t tid
; /* id of thread
*/
2426 user_handle_t focus
; /* handle to the focus window
*/
2427 user_handle_t capture
; /* handle to the capture window
*/
2428 user_handle_t active
; /* handle to the active window
*/
2429 user_handle_t foreground
; /* handle to the global foreground window
*/
2430 user_handle_t menu_owner
; /* handle to the menu owner
*/
2431 user_handle_t move_size
; /* handle to the moving
/resizing window
*/
2432 user_handle_t caret
; /* handle to the caret window
*/
2433 rectangle_t rect
; /* caret rectangle
*/
2437 /* Get the time of the last input event
*/
2438 @
REQ(get_last_input_time
)
2444 /* Retrieve queue keyboard state for a given thread
*/
2446 thread_id_t tid
; /* id of thread
*/
2447 int key
; /* optional key code or
-1 */
2449 unsigned char state
; /* state of specified key
*/
2450 VARARG(keystate
,bytes
); /* state array for all the keys
*/
2453 /* Set queue keyboard state for a given thread
*/
2455 thread_id_t tid
; /* id of thread
*/
2456 VARARG(keystate
,bytes
); /* state array for all the keys
*/
2459 /* Set the system foreground window
*/
2460 @
REQ(set_foreground_window
)
2461 user_handle_t handle
; /* handle to the foreground window
*/
2463 user_handle_t previous
; /* handle to the previous foreground window
*/
2464 int send_msg_old
; /* whether we have to send a msg to the old window
*/
2465 int send_msg_new
; /* whether we have to send a msg to the new window
*/
2468 /* Set the current thread focus window
*/
2469 @
REQ(set_focus_window
)
2470 user_handle_t handle
; /* handle to the focus window
*/
2472 user_handle_t previous
; /* handle to the previous focus window
*/
2475 /* Set the current thread active window
*/
2476 @
REQ(set_active_window
)
2477 user_handle_t handle
; /* handle to the active window
*/
2479 user_handle_t previous
; /* handle to the previous active window
*/
2482 /* Set the current thread capture window
*/
2483 @
REQ(set_capture_window
)
2484 user_handle_t handle
; /* handle to the capture window
*/
2485 unsigned int flags
; /* capture
flags (see below
) */
2487 user_handle_t previous
; /* handle to the previous capture window
*/
2488 user_handle_t full_handle
; /* full
32-bit handle of new capture window
*/
2490 #define CAPTURE_MENU
0x01 /* capture is for a menu
*/
2491 #define CAPTURE_MOVESIZE
0x02 /* capture is for moving
/resizing
*/
2494 /* Set the current thread caret window
*/
2495 @
REQ(set_caret_window
)
2496 user_handle_t handle
; /* handle to the caret window
*/
2497 int width
; /* caret width
*/
2498 int height
; /* caret height
*/
2500 user_handle_t previous
; /* handle to the previous caret window
*/
2501 rectangle_t old_rect
; /* previous caret rectangle
*/
2502 int old_hide
; /* previous hide count
*/
2503 int old_state
; /* previous caret
state (1=on
, 0=off
) */
2507 /* Set the current thread caret information
*/
2508 @
REQ(set_caret_info
)
2509 unsigned int flags
; /* caret
flags (see below
) */
2510 user_handle_t handle
; /* handle to the caret window
*/
2511 int x
; /* caret x position
*/
2512 int y
; /* caret y position
*/
2513 int hide
; /* increment for hide
count (can be negative to show it
) */
2514 int state
; /* caret
state (1=on
, 0=off
, -1=toggle current state
) */
2516 user_handle_t full_handle
; /* handle to the current caret window
*/
2517 rectangle_t old_rect
; /* previous caret rectangle
*/
2518 int old_hide
; /* previous hide count
*/
2519 int old_state
; /* previous caret
state (1=on
, 0=off
) */
2521 #define SET_CARET_POS
0x01 /* set the caret position from x
,y
*/
2522 #define SET_CARET_HIDE
0x02 /* increment the caret hide count
*/
2523 #define SET_CARET_STATE
0x04 /* set the caret on
/off state
*/
2526 /* Set a window hook
*/
2528 int id
; /* id of the hook
*/
2529 process_id_t pid
; /* id of process to set the hook into
*/
2530 thread_id_t tid
; /* id of thread to set the hook into
*/
2534 void
* proc
; /* hook procedure
*/
2535 int unicode
; /* is it a unicode hook?
*/
2536 VARARG(module
,unicode_str
); /* module name
*/
2538 user_handle_t handle
; /* handle to the hook
*/
2539 unsigned int active_hooks
; /* active hooks bitmap
*/
2543 /* Remove a window hook
*/
2545 user_handle_t handle
; /* handle to the hook
*/
2546 int id
; /* id of the hook if handle is
0 */
2547 void
* proc
; /* hook procedure if handle is
0 */
2549 unsigned int active_hooks
; /* active hooks bitmap
*/
2553 /* Start calling a hook chain
*/
2554 @
REQ(start_hook_chain
)
2555 int id
; /* id of the hook
*/
2556 int event
; /* signalled event
*/
2557 user_handle_t window
; /* handle to the event window
*/
2558 int object_id
; /* object id for out of context winevent
*/
2559 int child_id
; /* child id for out of context winevent
*/
2561 user_handle_t handle
; /* handle to the next hook
*/
2562 process_id_t pid
; /* process id for low
-level keyboard
/mouse hooks
*/
2563 thread_id_t tid
; /* thread id for low
-level keyboard
/mouse hooks
*/
2564 void
* proc
; /* hook procedure
*/
2565 int unicode
; /* is it a unicode hook?
*/
2566 unsigned int active_hooks
; /* active hooks bitmap
*/
2567 VARARG(module
,unicode_str
); /* module name
*/
2571 /* Finished calling a hook chain
*/
2572 @
REQ(finish_hook_chain
)
2573 int id
; /* id of the hook
*/
2577 /* Get the hook information
*/
2579 user_handle_t handle
; /* handle to the current hook
*/
2580 int get_next
; /* do we want info about current or next hook?
*/
2581 int event
; /* signalled event
*/
2582 user_handle_t window
; /* handle to the event window
*/
2583 int object_id
; /* object id for out of context winevent
*/
2584 int child_id
; /* child id for out of context winevent
*/
2586 user_handle_t handle
; /* handle to the hook
*/
2587 int id
; /* id of the hook
*/
2588 process_id_t pid
; /* process id for low
-level keyboard
/mouse hooks
*/
2589 thread_id_t tid
; /* thread id for low
-level keyboard
/mouse hooks
*/
2590 void
* proc
; /* hook procedure
*/
2591 int unicode
; /* is it a unicode hook?
*/
2592 VARARG(module
,unicode_str
); /* module name
*/
2596 /* Create a window class
*/
2598 int local
; /* is it a local class?
*/
2599 atom_t atom
; /* class atom
*/
2600 unsigned int style
; /* class style
*/
2601 void
* instance
; /* module instance
*/
2602 int extra
; /* number of extra class bytes
*/
2603 int win_extra
; /* number of window extra bytes
*/
2604 void
* client_ptr
; /* pointer to class in client address space
*/
2608 /* Destroy a window class
*/
2610 atom_t atom
; /* class atom
*/
2611 void
* instance
; /* module instance
*/
2613 void
* client_ptr
; /* pointer to class in client address space
*/
2617 /* Set some information in a class
*/
2618 @
REQ(set_class_info
)
2619 user_handle_t window
; /* handle to the window
*/
2620 unsigned int flags
; /* flags for info to
set (see below
) */
2621 atom_t atom
; /* class atom
*/
2622 unsigned int style
; /* class style
*/
2623 int win_extra
; /* number of window extra bytes
*/
2624 void
* instance
; /* module instance
*/
2625 int extra_offset
; /* offset to set in extra bytes
*/
2626 data_size_t extra_size
; /* size to set in extra bytes
*/
2627 unsigned long extra_value
; /* value to set in extra bytes
*/
2629 atom_t old_atom
; /* previous class atom
*/
2630 unsigned int old_style
; /* previous class style
*/
2631 int old_extra
; /* previous number of class extra bytes
*/
2632 int old_win_extra
; /* previous number of window extra bytes
*/
2633 void
* old_instance
; /* previous module instance
*/
2634 unsigned long old_extra_value
; /* old value in extra bytes
*/
2636 #define SET_CLASS_ATOM
0x0001
2637 #define SET_CLASS_STYLE
0x0002
2638 #define SET_CLASS_WINEXTRA
0x0004
2639 #define SET_CLASS_INSTANCE
0x0008
2640 #define SET_CLASS_EXTRA
0x0010
2643 /* Set
/get clipboard information
*/
2644 @
REQ(set_clipboard_info
)
2645 unsigned int flags
; /* flags for fields to
set (see below
) */
2646 user_handle_t clipboard
; /* clipboard window
*/
2647 user_handle_t owner
; /* clipboard owner
*/
2648 user_handle_t viewer
; /* first clipboard viewer
*/
2649 unsigned int seqno
; /* change sequence number
*/
2651 unsigned int flags
; /* status
flags (see below
) */
2652 user_handle_t old_clipboard
; /* old clipboard window
*/
2653 user_handle_t old_owner
; /* old clipboard owner
*/
2654 user_handle_t old_viewer
; /* old clipboard viewer
*/
2655 unsigned int seqno
; /* current sequence number
*/
2658 #define SET_CB_OPEN
0x001
2659 #define SET_CB_OWNER
0x002
2660 #define SET_CB_VIEWER
0x004
2661 #define SET_CB_SEQNO
0x008
2662 #define SET_CB_RELOWNER
0x010
2663 #define SET_CB_CLOSE
0x020
2664 #define CB_OPEN
0x040
2665 #define CB_OWNER
0x080
2666 #define CB_PROCESS
0x100
2669 /* Open a security token
*/
2671 obj_handle_t handle
; /* handle to the thread or process
*/
2672 unsigned int access
; /* access rights to the new token
*/
2673 unsigned int attributes
;/* object attributes
*/
2674 unsigned int flags
; /* flags (see below
) */
2676 obj_handle_t token
; /* handle to the token
*/
2678 #define OPEN_TOKEN_THREAD
1
2679 #define OPEN_TOKEN_AS_SELF
2
2682 /* Set
/get the global windows
*/
2683 @
REQ(set_global_windows
)
2684 unsigned int flags
; /* flags for fields to
set (see below
) */
2685 user_handle_t shell_window
; /* handle to the new shell window
*/
2686 user_handle_t shell_listview
; /* handle to the new shell listview window
*/
2687 user_handle_t progman_window
; /* handle to the new program manager window
*/
2688 user_handle_t taskman_window
; /* handle to the new task manager window
*/
2690 user_handle_t old_shell_window
; /* handle to the shell window
*/
2691 user_handle_t old_shell_listview
; /* handle to the shell listview window
*/
2692 user_handle_t old_progman_window
; /* handle to the new program manager window
*/
2693 user_handle_t old_taskman_window
; /* handle to the new task manager window
*/
2695 #define SET_GLOBAL_SHELL_WINDOWS
0x01 /* set both main shell and listview windows
*/
2696 #define SET_GLOBAL_PROGMAN_WINDOW
0x02
2697 #define SET_GLOBAL_TASKMAN_WINDOW
0x04
2699 /* Adjust the privileges held by a token
*/
2700 @
REQ(adjust_token_privileges
)
2701 obj_handle_t handle
; /* handle to the token
*/
2702 int disable_all
; /* disable all privileges?
*/
2703 int get_modified_state
; /* get modified privileges?
*/
2704 VARARG(privileges
,LUID_AND_ATTRIBUTES
); /* privileges to enable
/disable
/remove
*/
2706 unsigned int len
; /* total length in bytes required to store token privileges
*/
2707 VARARG(privileges
,LUID_AND_ATTRIBUTES
); /* modified privileges
*/
2710 /* Retrieves the set of privileges held by or available to a token
*/
2711 @
REQ(get_token_privileges
)
2712 obj_handle_t handle
; /* handle to the token
*/
2714 unsigned int len
; /* total length in bytes required to store token privileges
*/
2715 VARARG(privileges
,LUID_AND_ATTRIBUTES
); /* privileges held by or available to a token
*/
2718 /* Check the token has the required privileges
*/
2719 @
REQ(check_token_privileges
)
2720 obj_handle_t handle
; /* handle to the token
*/
2721 int all_required
; /* are all the privileges required for the check to succeed?
*/
2722 VARARG(privileges
,LUID_AND_ATTRIBUTES
); /* privileges to check
*/
2724 int has_privileges
; /* does the token have the required privileges?
*/
2725 VARARG(privileges
,LUID_AND_ATTRIBUTES
); /* privileges held by or available to a token
*/
2728 @
REQ(duplicate_token
)
2729 obj_handle_t handle
; /* handle to the token to duplicate
*/
2730 unsigned int access
; /* access rights to the new token
*/
2731 unsigned int attributes
; /* object attributes
*/
2732 int primary
; /* is the new token to be a primary one?
*/
2733 int impersonation_level
; /* impersonation level of the new token
*/
2735 obj_handle_t new_handle
; /* duplicated handle
*/
2739 obj_handle_t handle
; /* handle to the token
*/
2740 unsigned int desired_access
; /* desired access to the object
*/
2741 unsigned int mapping_read
; /* mapping from generic read to specific rights
*/
2742 unsigned int mapping_write
; /* mapping from generic write to specific rights
*/
2743 unsigned int mapping_execute
; /* mapping from generic execute to specific rights
*/
2744 unsigned int mapping_all
; /* mapping from generic all to specific rights
*/
2745 VARARG(sd
,security_descriptor
); /* security descriptor to check
*/
2747 unsigned int access_granted
; /* access rights actually granted
*/
2748 unsigned int access_status
; /* was access granted?
*/
2749 unsigned int privileges_len
; /* length needed to store privileges
*/
2750 VARARG(privileges
,LUID_AND_ATTRIBUTES
); /* privileges used during access check
*/
2753 @
REQ(get_token_user
)
2754 obj_handle_t handle
; /* handle to the token
*/
2756 data_size_t user_len
; /* length needed to store user
*/
2757 VARARG(user
,SID
); /* sid of the user the token represents
*/
2760 @
REQ(get_token_groups
)
2761 obj_handle_t handle
; /* handle to the token
*/
2763 data_size_t user_len
; /* length needed to store user
*/
2764 VARARG(user
,token_groups
); /* groups the token
's user belongs to */
2767 @REQ(set_security_object)
2768 obj_handle_t handle; /* handle to the object */
2769 unsigned int security_info; /* which parts of security descriptor to set */
2770 VARARG(sd,security_descriptor); /* security descriptor to set */
2773 /* Create a mailslot */
2774 @REQ(create_mailslot)
2775 unsigned int access; /* wanted access rights */
2776 unsigned int attributes; /* object attributes */
2777 obj_handle_t rootdir; /* root directory */
2778 unsigned int max_msgsize;
2779 timeout_t read_timeout;
2780 VARARG(name,unicode_str); /* mailslot name */
2782 obj_handle_t handle; /* handle to the mailslot */
2786 /* Set mailslot information */
2787 @REQ(set_mailslot_info)
2788 obj_handle_t handle; /* handle to the mailslot */
2790 timeout_t read_timeout;
2792 unsigned int max_msgsize;
2793 timeout_t read_timeout;
2795 #define MAILSLOT_SET_READ_TIMEOUT 1
2798 /* Create a directory object */
2799 @REQ(create_directory)
2800 unsigned int access; /* access flags */
2801 unsigned int attributes; /* object attributes */
2802 obj_handle_t rootdir; /* root directory */
2803 VARARG(directory_name,unicode_str); /* Directory name */
2805 obj_handle_t handle; /* handle to the directory */
2809 /* Open a directory object */
2810 @REQ(open_directory)
2811 unsigned int access; /* access flags */
2812 unsigned int attributes; /* object attributes */
2813 obj_handle_t rootdir; /* root directory */
2814 VARARG(directory_name,unicode_str); /* Directory name */
2816 obj_handle_t handle; /* handle to the directory */
2820 /* Create a symbolic link object */
2821 @REQ(create_symlink)
2822 unsigned int access; /* access flags */
2823 unsigned int attributes; /* object attributes */
2824 obj_handle_t rootdir; /* root directory */
2825 data_size_t name_len; /* length of the symlink name in bytes */
2826 VARARG(name,unicode_str,name_len); /* symlink name */
2827 VARARG(target_name,unicode_str); /* target name */
2829 obj_handle_t handle; /* handle to the symlink */
2833 /* Open a symbolic link object */
2835 unsigned int access; /* access flags */
2836 unsigned int attributes; /* object attributes */
2837 obj_handle_t rootdir; /* root directory */
2838 VARARG(name,unicode_str); /* symlink name */
2840 obj_handle_t handle; /* handle to the symlink */
2844 /* Query a symbolic link object */
2846 obj_handle_t handle; /* handle to the symlink */
2848 VARARG(target_name,unicode_str); /* target name */
2852 /* Query basic object information */
2853 @REQ(get_object_info)
2854 obj_handle_t handle; /* handle to the object */
2856 unsigned int access; /* granted access mask */
2857 unsigned int ref_count; /* object ref count */
2860 /* Query the impersonation level of an impersonation token */
2861 @REQ(get_token_impersonation_level)
2862 obj_handle_t handle; /* handle to the object */
2864 int impersonation_level; /* impersonation level of the impersonation token */
2867 /* Allocate a locally-unique identifier */
2868 @REQ(allocate_locally_unique_id)
2874 /* Create a device manager */
2875 @REQ(create_device_manager)
2876 unsigned int access; /* wanted access rights */
2877 unsigned int attributes; /* object attributes */
2879 obj_handle_t handle; /* handle to the device */
2883 /* Create a device */
2885 unsigned int access; /* wanted access rights */
2886 unsigned int attributes; /* object attributes */
2887 obj_handle_t rootdir; /* root directory */
2888 obj_handle_t manager; /* device manager */
2889 void* user_ptr; /* opaque ptr for use by client */
2890 VARARG(name,unicode_str); /* object name */
2892 obj_handle_t handle; /* handle to the device */
2896 /* Delete a device */
2898 obj_handle_t handle; /* handle to the device */
2902 /* Retrieve the next pending device ioctl request */
2903 @REQ(get_next_device_request)
2904 obj_handle_t manager; /* handle to the device manager */
2905 obj_handle_t prev; /* handle to the previous ioctl */
2906 unsigned int status; /* status of the previous ioctl */
2907 VARARG(prev_data,bytes); /* output data of the previous ioctl */
2909 obj_handle_t next; /* handle to the next ioctl */
2910 ioctl_code_t code; /* ioctl code */
2911 void* user_ptr; /* opaque ptr for the device */
2912 data_size_t in_size; /* total needed input size */
2913 data_size_t out_size; /* needed output size */
2914 VARARG(next_data,bytes); /* input data of the next ioctl */