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
;
41 typedef unsigned __int64 file_pos_t
;
45 int req
; /* request code
*/
46 data_size_t request_size
; /* request variable part size
*/
47 data_size_t reply_size
; /* reply variable part maximum size
*/
52 unsigned int error
; /* error result
*/
53 data_size_t reply_size
; /* reply variable part size
*/
56 /* placeholder structure for the maximum allowed request size
*/
57 /* this is used to construct the generic_request union
*/
58 struct request_max_size
60 int pad
[16]; /* the max request size is
16 ints
*/
63 #define FIRST_USER_HANDLE
0x0020 /* first possible value for low word of user handle
*/
64 #define LAST_USER_HANDLE
0xffef /* last possible value for low word of user handle
*/
67 /* definitions of the event data depending on the event code
*/
68 struct debug_event_exception
70 EXCEPTION_RECORD record
; /* exception record
*/
71 int first
; /* first chance exception?
*/
73 struct debug_event_create_thread
75 obj_handle_t handle
; /* handle to the new thread
*/
76 void
*teb
; /* thread
teb (in debugged process address space
) */
77 void
*start
; /* thread startup routine
*/
79 struct debug_event_create_process
81 obj_handle_t file
; /* handle to the process exe file
*/
82 obj_handle_t process
; /* handle to the new process
*/
83 obj_handle_t thread
; /* handle to the new thread
*/
84 void
*base
; /* base of executable image
*/
85 int dbg_offset
; /* offset of debug info in file
*/
86 int dbg_size
; /* size of debug info
*/
87 void
*teb
; /* thread
teb (in debugged process address space
) */
88 void
*start
; /* thread startup routine
*/
89 void
*name
; /* image
name (optional
) */
90 int unicode
; /* is it Unicode?
*/
92 struct debug_event_exit
94 int exit_code
; /* thread or process exit code
*/
96 struct debug_event_load_dll
98 obj_handle_t handle
; /* file handle for the dll
*/
99 void
*base
; /* base address of the dll
*/
100 int dbg_offset
; /* offset of debug info in file
*/
101 int dbg_size
; /* size of debug info
*/
102 void
*name
; /* image
name (optional
) */
103 int unicode
; /* is it Unicode?
*/
105 struct debug_event_unload_dll
107 void
*base
; /* base address of the dll
*/
109 struct debug_event_output_string
111 void
*string
; /* string to
display (in debugged process address space
) */
112 int unicode
; /* is it Unicode?
*/
113 int length
; /* string length
*/
115 struct debug_event_rip_info
120 union debug_event_data
122 struct debug_event_exception exception
;
123 struct debug_event_create_thread create_thread
;
124 struct debug_event_create_process create_process
;
125 struct debug_event_exit exit
;
126 struct debug_event_load_dll load_dll
;
127 struct debug_event_unload_dll unload_dll
;
128 struct debug_event_output_string output_string
;
129 struct debug_event_rip_info rip_info
;
132 /* debug event data
*/
135 int code
; /* event code
*/
136 union debug_event_data info
; /* event information
*/
139 /* structure used in sending an fd from client to server
*/
142 thread_id_t tid
; /* thread id
*/
143 int fd
; /* file descriptor on client
-side
*/
146 /* structure sent by the server on the wait fifo
*/
149 void
*cookie
; /* magic cookie that was passed in select_request
*/
150 int signaled
; /* wait result
*/
153 /* NT
-style timeout
, in
100ns units
, negative means relative timeout
*/
154 typedef __int64 timeout_t
;
155 #define
TIMEOUT_INFINITE (((timeout_t
)0x7fffffff) << 32 |
0xffffffff)
157 /* structure returned in the list of window properties
*/
160 atom_t atom
; /* property atom
*/
161 short string
; /* was atom a string originally?
*/
162 obj_handle_t handle
; /* handle stored in property
*/
165 /* structure to specify window rectangles
*/
174 /* structure for parameters of async I
/O calls
*/
177 void
*callback
; /* client
-side callback to call upon end of async
*/
178 void
*iosb
; /* I
/O status block in client addr space
*/
179 void
*arg
; /* opaque user data to pass to callback
*/
180 void
*apc
; /* user apc to call
*/
181 obj_handle_t event
; /* event to signal when done
*/
182 unsigned long cvalue
; /* completion value to use for completion events
*/
185 /* structures for extra message data
*/
187 struct callback_msg_data
189 void
*callback
; /* callback function
*/
190 unsigned long data
; /* user data for callback
*/
191 unsigned long result
; /* message result
*/
194 struct winevent_msg_data
196 user_handle_t hook
; /* hook handle
*/
197 thread_id_t tid
; /* thread id
*/
198 void
*hook_proc
; /* hook proc address
*/
199 /* followed by module name if any
*/
204 unsigned char bytes
[1]; /* raw data for sent messages
*/
205 struct callback_msg_data callback
;
206 struct winevent_msg_data winevent
;
209 /* structure for console char
/attribute info
*/
218 unsigned int low_part
;
222 #define MAX_ACL_LEN
65535
224 struct security_descriptor
226 unsigned int control
; /* SE_ flags
*/
227 data_size_t owner_len
;
228 data_size_t group_len
;
229 data_size_t sacl_len
;
230 data_size_t dacl_len
;
231 /* VARARG(owner
,SID
); */
232 /* VARARG(group
,SID
); */
233 /* VARARG(sacl
,ACL
); */
234 /* VARARG(dacl
,ACL
); */
237 struct object_attributes
239 obj_handle_t rootdir
; /* root directory
*/
240 data_size_t sd_len
; /* length of security_descriptor data. may be
0 */
241 data_size_t name_len
; /* length of the name string. may be
0 */
242 /* VARARG(sd
,security_descriptor
); */
243 /* VARARG(name
,unicode_str
); */
249 /* unsigned int attributes
[count
]; */
250 /* VARARG(sids
,SID
); */
276 enum apc_type type
; /* APC_USER
*/
277 void (__stdcall
*func
)(unsigned long
,unsigned long
,unsigned long
);
278 unsigned long args
[3]; /* arguments for user function
*/
282 enum apc_type type
; /* APC_TIMER
*/
283 void (__stdcall
*func
)(void
*, unsigned int
, unsigned int
);
284 timeout_t time
; /* absolute time of expiration
*/
285 void
*arg
; /* user argument
*/
289 enum apc_type type
; /* APC_ASYNC_IO
*/
290 unsigned
int (*func)(void*, void*, unsigned int, unsigned long *);
291 void
*user
; /* user pointer
*/
292 void
*sb
; /* status block
*/
293 unsigned int status
; /* I
/O status
*/
297 enum apc_type type
; /* APC_VIRTUAL_ALLOC
*/
298 void
*addr
; /* requested address
*/
299 unsigned long size
; /* allocation size
*/
300 unsigned int zero_bits
; /* allocation alignment
*/
301 unsigned int op_type
; /* type of operation
*/
302 unsigned int prot
; /* memory protection flags
*/
306 enum apc_type type
; /* APC_VIRTUAL_FREE
*/
307 void
*addr
; /* requested address
*/
308 unsigned long size
; /* allocation size
*/
309 unsigned int op_type
; /* type of operation
*/
313 enum apc_type type
; /* APC_VIRTUAL_QUERY
*/
314 const void
*addr
; /* requested address
*/
318 enum apc_type type
; /* APC_VIRTUAL_PROTECT
*/
319 void
*addr
; /* requested address
*/
320 unsigned long size
; /* requested address
*/
321 unsigned int prot
; /* new protection flags
*/
325 enum apc_type type
; /* APC_VIRTUAL_FLUSH
*/
326 const void
*addr
; /* requested address
*/
327 unsigned long size
; /* requested address
*/
331 enum apc_type type
; /* APC_VIRTUAL_LOCK
*/
332 void
*addr
; /* requested address
*/
333 unsigned long size
; /* requested address
*/
337 enum apc_type type
; /* APC_VIRTUAL_UNLOCK
*/
338 void
*addr
; /* requested address
*/
339 unsigned long size
; /* requested address
*/
343 enum apc_type type
; /* APC_MAP_VIEW
*/
344 obj_handle_t handle
; /* mapping handle
*/
345 void
*addr
; /* requested address
*/
346 unsigned long size
; /* allocation size
*/
347 file_pos_t offset
; /* file offset
*/
348 unsigned int zero_bits
; /* allocation alignment
*/
349 unsigned int alloc_type
;/* allocation type
*/
350 unsigned int prot
; /* memory protection flags
*/
354 enum apc_type type
; /* APC_UNMAP_VIEW
*/
355 void
*addr
; /* view address
*/
359 enum apc_type type
; /* APC_CREATE_THREAD
*/
360 void (__stdcall
*func
)(void*)
; /* start function
*/
361 void
*arg
; /* argument for start function
*/
362 unsigned long reserve
; /* reserve size for thread stack
*/
363 unsigned long commit
; /* commit size for thread stack
*/
364 int suspend
; /* suspended thread?
*/
373 enum apc_type type
; /* APC_ASYNC_IO
*/
374 unsigned int status
; /* new status of async operation
*/
375 unsigned long total
; /* bytes transferred
*/
379 enum apc_type type
; /* APC_VIRTUAL_ALLOC
*/
380 unsigned int status
; /* status returned by call
*/
381 void
*addr
; /* resulting address
*/
382 unsigned long size
; /* resulting size
*/
386 enum apc_type type
; /* APC_VIRTUAL_FREE
*/
387 unsigned int status
; /* status returned by call
*/
388 void
*addr
; /* resulting address
*/
389 unsigned long size
; /* resulting size
*/
393 enum apc_type type
; /* APC_VIRTUAL_QUERY
*/
394 unsigned int status
; /* status returned by call
*/
395 void
*base
; /* resulting base address
*/
396 void
*alloc_base
;/* resulting allocation base
*/
397 unsigned long size
; /* resulting region size
*/
398 unsigned int state
; /* resulting region state
*/
399 unsigned int prot
; /* resulting region protection
*/
400 unsigned int alloc_prot
;/* resulting allocation protection
*/
401 unsigned int alloc_type
;/* resulting region allocation type
*/
405 enum apc_type type
; /* APC_VIRTUAL_PROTECT
*/
406 unsigned int status
; /* status returned by call
*/
407 void
*addr
; /* resulting address
*/
408 unsigned long size
; /* resulting size
*/
409 unsigned int prot
; /* old protection flags
*/
413 enum apc_type type
; /* APC_VIRTUAL_FLUSH
*/
414 unsigned int status
; /* status returned by call
*/
415 const void
*addr
; /* resulting address
*/
416 unsigned long size
; /* resulting size
*/
420 enum apc_type type
; /* APC_VIRTUAL_LOCK
*/
421 unsigned int status
; /* status returned by call
*/
422 void
*addr
; /* resulting address
*/
423 unsigned long size
; /* resulting size
*/
427 enum apc_type type
; /* APC_VIRTUAL_UNLOCK
*/
428 unsigned int status
; /* status returned by call
*/
429 void
*addr
; /* resulting address
*/
430 unsigned long size
; /* resulting size
*/
434 enum apc_type type
; /* APC_MAP_VIEW
*/
435 unsigned int status
; /* status returned by call
*/
436 void
*addr
; /* resulting address
*/
437 unsigned long size
; /* resulting size
*/
441 enum apc_type type
; /* APC_MAP_VIEW
*/
442 unsigned int status
; /* status returned by call
*/
446 enum apc_type type
; /* APC_CREATE_THREAD
*/
447 unsigned int status
; /* status returned by call
*/
448 thread_id_t tid
; /* thread id
*/
449 obj_handle_t handle
; /* handle to new thread
*/
453 /****************************************************************/
454 /* Request declarations
*/
456 /* Create a new process from the context of the parent
*/
458 int inherit_all
; /* inherit all handles from parent
*/
459 unsigned int create_flags
; /* creation flags
*/
460 int socket_fd
; /* file descriptor for process socket
*/
461 obj_handle_t exe_file
; /* file handle for main exe
*/
462 obj_handle_t hstdin
; /* handle for stdin
*/
463 obj_handle_t hstdout
; /* handle for stdout
*/
464 obj_handle_t hstderr
; /* handle for stderr
*/
465 unsigned int process_access
; /* access rights for process object
*/
466 unsigned int process_attr
; /* attributes for process object
*/
467 unsigned int thread_access
; /* access rights for thread object
*/
468 unsigned int thread_attr
; /* attributes for thread object
*/
469 VARARG(info
,startup_info
); /* startup information
*/
470 VARARG(env
,unicode_str
); /* environment for new process
*/
472 obj_handle_t info
; /* new process info handle
*/
473 process_id_t pid
; /* process id
*/
474 obj_handle_t phandle
; /* process
handle (in the current process
) */
475 thread_id_t tid
; /* thread id
*/
476 obj_handle_t thandle
; /* thread
handle (in the current process
) */
480 /* Retrieve information about a newly started process
*/
481 @
REQ(get_new_process_info
)
482 obj_handle_t info
; /* info handle returned from new_process_request
*/
484 int success
; /* did the process start successfully?
*/
485 int exit_code
; /* process exit code if failed
*/
489 /* Create a new thread from the context of the parent
*/
491 unsigned int access
; /* wanted access rights
*/
492 unsigned int attributes
; /* object attributes
*/
493 int suspend
; /* new thread should be suspended on creation
*/
494 int request_fd
; /* fd for request pipe
*/
496 thread_id_t tid
; /* thread id
*/
497 obj_handle_t handle
; /* thread
handle (in the current process
) */
501 /* Retrieve the new process startup info
*/
502 @
REQ(get_startup_info
)
504 obj_handle_t exe_file
; /* file handle for main exe
*/
505 obj_handle_t hstdin
; /* handle for stdin
*/
506 obj_handle_t hstdout
; /* handle for stdout
*/
507 obj_handle_t hstderr
; /* handle for stderr
*/
508 VARARG(info
,startup_info
); /* startup information
*/
509 VARARG(env
,unicode_str
); /* environment
*/
513 /* Signal the end of the process initialization
*/
514 @
REQ(init_process_done
)
515 void
* module
; /* main module base address
*/
516 void
* entry
; /* process entry point
*/
517 int gui
; /* is it a GUI process?
*/
521 /* Initialize a thread
; called from the child after
fork()/clone() */
523 int unix_pid
; /* Unix pid of new thread
*/
524 int unix_tid
; /* Unix tid of new thread
*/
525 int debug_level
; /* new debug level
*/
526 void
* teb
; /* TEB of new
thread (in thread address space
) */
527 void
* peb
; /* address of
PEB (in thread address space
) */
528 void
* entry
; /* thread entry
point (in thread address space
) */
529 void
* ldt_copy
; /* address of LDT
copy (in thread address space
) */
530 int reply_fd
; /* fd for reply pipe
*/
531 int wait_fd
; /* fd for blocking calls pipe
*/
533 process_id_t pid
; /* process id of the new thread
's process */
534 thread_id_t tid; /* thread id of the new thread */
535 data_size_t info_size; /* total size of startup info */
536 timeout_t server_start; /* server start time */
537 int version; /* protocol version */
541 /* Terminate a process */
542 @REQ(terminate_process)
543 obj_handle_t handle; /* process handle to terminate */
544 int exit_code; /* process exit code */
546 int self; /* suicide? */
550 /* Terminate a thread */
551 @REQ(terminate_thread)
552 obj_handle_t handle; /* thread handle to terminate */
553 int exit_code; /* thread exit code */
555 int self; /* suicide? */
556 int last; /* last thread in this process? */
560 /* Retrieve information about a process */
561 @REQ(get_process_info)
562 obj_handle_t handle; /* process handle */
564 process_id_t pid; /* server process id */
565 process_id_t ppid; /* server process id of parent */
566 int exit_code; /* process exit code */
567 int priority; /* priority class */
568 int affinity; /* process affinity mask */
569 void* peb; /* PEB address in process address space */
570 timeout_t start_time; /* process start time */
571 timeout_t end_time; /* process end time */
575 /* Set a process informations */
576 @REQ(set_process_info)
577 obj_handle_t handle; /* process handle */
578 int mask; /* setting mask (see below) */
579 int priority; /* priority class */
580 int affinity; /* affinity mask */
582 #define SET_PROCESS_INFO_PRIORITY 0x01
583 #define SET_PROCESS_INFO_AFFINITY 0x02
586 /* Retrieve information about a thread */
587 @REQ(get_thread_info)
588 obj_handle_t handle; /* thread handle */
589 thread_id_t tid_in; /* thread id (optional) */
591 process_id_t pid; /* server process id */
592 thread_id_t tid; /* server thread id */
593 void* teb; /* thread teb pointer */
594 int exit_code; /* thread exit code */
595 int priority; /* thread priority level */
596 int affinity; /* thread affinity mask */
597 timeout_t creation_time; /* thread creation time */
598 timeout_t exit_time; /* thread exit time */
599 int last; /* last thread in process */
603 /* Set a thread informations */
604 @REQ(set_thread_info)
605 obj_handle_t handle; /* thread handle */
606 int mask; /* setting mask (see below) */
607 int priority; /* priority class */
608 int affinity; /* affinity mask */
609 obj_handle_t token; /* impersonation token */
611 #define SET_THREAD_INFO_PRIORITY 0x01
612 #define SET_THREAD_INFO_AFFINITY 0x02
613 #define SET_THREAD_INFO_TOKEN 0x04
616 /* Retrieve information about a module */
618 obj_handle_t handle; /* process handle */
619 void* base_address; /* base address of module */
621 size_t size; /* module size */
623 VARARG(filename,unicode_str); /* file name of module */
627 /* Suspend a thread */
629 obj_handle_t handle; /* thread handle */
631 int count; /* new suspend count */
635 /* Resume a thread */
637 obj_handle_t handle; /* thread handle */
639 int count; /* new suspend count */
643 /* Notify the server that a dll has been loaded */
645 obj_handle_t handle; /* file handle */
646 void* base; /* base address */
647 size_t size; /* dll size */
648 int dbg_offset; /* debug info offset */
649 int dbg_size; /* debug info size */
650 void* name; /* ptr to ptr to name (in process addr space) */
651 VARARG(filename,unicode_str); /* file name of dll */
655 /* Notify the server that a dll is being unloaded */
657 void* base; /* base address */
661 /* Queue an APC for a thread or process */
663 obj_handle_t thread; /* thread handle */
664 obj_handle_t process; /* process handle */
665 apc_call_t call; /* call arguments */
667 obj_handle_t handle; /* APC handle */
668 int self; /* run APC in caller itself? */
672 /* Get the result of an APC call */
674 obj_handle_t handle; /* handle to the APC */
676 apc_result_t result; /* result of the APC */
680 /* Close a handle for the current process */
682 obj_handle_t handle; /* handle to close */
686 /* Set a handle information */
687 @REQ(set_handle_info)
688 obj_handle_t handle; /* handle we are interested in */
689 int flags; /* new handle flags */
690 int mask; /* mask for flags to set */
692 int old_flags; /* old flag value */
696 /* Duplicate a handle */
698 obj_handle_t src_process; /* src process handle */
699 obj_handle_t src_handle; /* src handle to duplicate */
700 obj_handle_t dst_process; /* dst process handle */
701 unsigned int access; /* wanted access rights */
702 unsigned int attributes; /* object attributes */
703 unsigned int options; /* duplicate options (see below) */
705 obj_handle_t handle; /* duplicated handle in dst process */
706 int self; /* is the source the current process? */
707 int closed; /* whether the source handle has been closed */
709 #define DUP_HANDLE_CLOSE_SOURCE DUPLICATE_CLOSE_SOURCE
710 #define DUP_HANDLE_SAME_ACCESS DUPLICATE_SAME_ACCESS
711 #define DUP_HANDLE_MAKE_GLOBAL 0x80000000 /* Not a Windows flag */
714 /* Open a handle to a process */
716 process_id_t pid; /* process id to open */
717 unsigned int access; /* wanted access rights */
718 unsigned int attributes; /* object attributes */
720 obj_handle_t handle; /* handle to the process */
724 /* Open a handle to a thread */
726 thread_id_t tid; /* thread id to open */
727 unsigned int access; /* wanted access rights */
728 unsigned int attributes; /* object attributes */
730 obj_handle_t handle; /* handle to the thread */
734 /* Wait for handles */
736 int flags; /* wait flags (see below) */
737 void* cookie; /* magic cookie to return to client */
738 obj_handle_t signal; /* object to signal (0 if none) */
739 obj_handle_t prev_apc; /* handle to previous APC */
740 timeout_t timeout; /* timeout */
741 VARARG(result,apc_result); /* result of previous APC */
742 VARARG(handles,handles); /* handles to select on */
744 obj_handle_t apc_handle; /* handle to next APC */
745 timeout_t timeout; /* timeout converted to absolute */
746 apc_call_t call; /* APC call arguments */
749 #define SELECT_ALERTABLE 2
750 #define SELECT_INTERRUPTIBLE 4
753 /* Create an event */
755 unsigned int access; /* wanted access rights */
756 unsigned int attributes; /* object attributes */
757 int manual_reset; /* manual reset event */
758 int initial_state; /* initial state of the event */
759 VARARG(objattr,object_attributes); /* object attributes */
761 obj_handle_t handle; /* handle to the event */
764 /* Event operation */
766 obj_handle_t handle; /* handle to event */
767 int op; /* event operation (see below) */
769 enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT };
774 unsigned int access; /* wanted access rights */
775 unsigned int attributes; /* object attributes */
776 obj_handle_t rootdir; /* root directory */
777 VARARG(name,unicode_str); /* object name */
779 obj_handle_t handle; /* handle to the event */
785 unsigned int access; /* wanted access rights */
786 unsigned int attributes; /* object attributes */
787 int owned; /* initially owned? */
788 VARARG(objattr,object_attributes); /* object attributes */
790 obj_handle_t handle; /* handle to the mutex */
794 /* Release a mutex */
796 obj_handle_t handle; /* handle to the mutex */
798 unsigned int prev_count; /* value of internal counter, before release */
804 unsigned int access; /* wanted access rights */
805 unsigned int attributes; /* object attributes */
806 obj_handle_t rootdir; /* root directory */
807 VARARG(name,unicode_str); /* object name */
809 obj_handle_t handle; /* handle to the mutex */
813 /* Create a semaphore */
814 @REQ(create_semaphore)
815 unsigned int access; /* wanted access rights */
816 unsigned int attributes; /* object attributes */
817 unsigned int initial; /* initial count */
818 unsigned int max; /* maximum count */
819 VARARG(objattr,object_attributes); /* object attributes */
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(objattr,object_attributes); /* object attributes */
854 VARARG(filename,string); /* file name */
856 obj_handle_t handle; /* handle to the file */
860 /* Open a file object */
861 @REQ(open_file_object)
862 unsigned int access; /* wanted access rights */
863 unsigned int attributes; /* open attributes */
864 obj_handle_t rootdir; /* root directory */
865 unsigned int sharing; /* sharing flags */
866 unsigned int options; /* file options */
867 VARARG(filename,unicode_str); /* file name */
869 obj_handle_t handle; /* handle to the file */
873 /* Allocate a file handle for a Unix fd */
874 @REQ(alloc_file_handle)
875 unsigned int access; /* wanted access rights */
876 unsigned int attributes; /* object attributes */
877 int fd; /* file descriptor on the client side */
879 obj_handle_t handle; /* handle to the file */
883 /* Get a Unix fd to access a file */
885 obj_handle_t handle; /* handle to the file */
887 int type; /* file type (see below) */
888 int removable; /* is file removable? */
889 unsigned int access; /* file access rights */
890 unsigned int options; /* file open options */
894 FD_TYPE_INVALID, /* invalid file (no associated fd) */
895 FD_TYPE_FILE, /* regular file */
896 FD_TYPE_DIR, /* directory */
897 FD_TYPE_SOCKET, /* socket */
898 FD_TYPE_SERIAL, /* serial port */
899 FD_TYPE_PIPE, /* named pipe */
900 FD_TYPE_MAILSLOT, /* mailslot */
901 FD_TYPE_CHAR, /* unspecified char device */
902 FD_TYPE_DEVICE, /* Windows device file */
907 /* Flush a file buffers */
909 obj_handle_t handle; /* handle to the file */
911 obj_handle_t event; /* event set when finished */
915 /* Lock a region of a file */
917 obj_handle_t handle; /* handle to the file */
918 file_pos_t offset; /* offset of start of lock */
919 file_pos_t count; /* count of bytes to lock */
920 int shared; /* shared or exclusive lock? */
921 int wait; /* do we want to wait? */
923 obj_handle_t handle; /* handle to wait on */
924 int overlapped; /* is it an overlapped I/O handle? */
928 /* Unlock a region of a file */
930 obj_handle_t handle; /* handle to the file */
931 file_pos_t offset; /* offset of start of unlock */
932 file_pos_t count; /* count of bytes to unlock */
936 /* Create a socket */
938 unsigned int access; /* wanted access rights */
939 unsigned int attributes; /* object attributes */
940 int family; /* family, see socket manpage */
941 int type; /* type, see socket manpage */
942 int protocol; /* protocol, see socket manpage */
943 unsigned int flags; /* socket flags */
945 obj_handle_t handle; /* handle to the new socket */
949 /* Accept a socket */
951 obj_handle_t lhandle; /* handle to the listening socket */
952 unsigned int access; /* wanted access rights */
953 unsigned int attributes; /* object attributes */
955 obj_handle_t handle; /* handle to the new socket */
959 /* Set socket event parameters */
960 @REQ(set_socket_event)
961 obj_handle_t handle; /* handle to the socket */
962 unsigned int mask; /* event mask */
963 obj_handle_t event; /* event object */
964 user_handle_t window; /* window to send the message to */
965 unsigned int msg; /* message to send */
969 /* Get socket event parameters */
970 @REQ(get_socket_event)
971 obj_handle_t handle; /* handle to the socket */
972 int service; /* clear pending? */
973 obj_handle_t c_event; /* event to clear */
975 unsigned int mask; /* event mask */
976 unsigned int pmask; /* pending events */
977 unsigned int state; /* status bits */
978 VARARG(errors,ints); /* event errors */
982 /* Reenable pending socket events */
983 @REQ(enable_socket_event)
984 obj_handle_t handle; /* handle to the socket */
985 unsigned int mask; /* events to re-enable */
986 unsigned int sstate; /* status bits to set */
987 unsigned int cstate; /* status bits to clear */
990 @REQ(set_socket_deferred)
991 obj_handle_t handle; /* handle to the socket */
992 obj_handle_t deferred; /* handle to the socket for which accept() is deferred */
995 /* Allocate a console (only used by a console renderer) */
997 unsigned int access; /* wanted access rights */
998 unsigned int attributes; /* object attributes */
999 process_id_t pid; /* pid of process which shall be attached to the console */
1001 obj_handle_t handle_in; /* handle to console input */
1002 obj_handle_t event; /* handle to renderer events change notification */
1006 /* Free the console of the current process */
1011 #define CONSOLE_RENDERER_NONE_EVENT 0x00
1012 #define CONSOLE_RENDERER_TITLE_EVENT 0x01
1013 #define CONSOLE_RENDERER_ACTIVE_SB_EVENT 0x02
1014 #define CONSOLE_RENDERER_SB_RESIZE_EVENT 0x03
1015 #define CONSOLE_RENDERER_UPDATE_EVENT 0x04
1016 #define CONSOLE_RENDERER_CURSOR_POS_EVENT 0x05
1017 #define CONSOLE_RENDERER_CURSOR_GEOM_EVENT 0x06
1018 #define CONSOLE_RENDERER_DISPLAY_EVENT 0x07
1019 #define CONSOLE_RENDERER_EXIT_EVENT 0x08
1020 struct console_renderer_event
1055 /* retrieve console events for the renderer */
1056 @REQ(get_console_renderer_events)
1057 obj_handle_t handle; /* handle to console input events */
1059 VARARG(data,bytes); /* the various console_renderer_events */
1063 /* Open a handle to the process console */
1065 obj_handle_t from; /* 0 (resp 1) input (resp output) of current process console */
1066 /* otherwise console_in handle to get active screen buffer? */
1067 unsigned int access; /* wanted access rights */
1068 unsigned int attributes; /* object attributes */
1069 int share; /* share mask (only for output handles) */
1071 obj_handle_t handle; /* handle to the console */
1075 /* Get the input queue wait event */
1076 @REQ(get_console_wait_event)
1078 obj_handle_t handle;
1081 /* Get a console mode (input or output) */
1082 @REQ(get_console_mode)
1083 obj_handle_t handle; /* handle to the console */
1085 int mode; /* console mode */
1089 /* Set a console mode (input or output) */
1090 @REQ(set_console_mode)
1091 obj_handle_t handle; /* handle to the console */
1092 int mode; /* console mode */
1096 /* Set info about a console (input only) */
1097 @REQ(set_console_input_info)
1098 obj_handle_t handle; /* handle to console input, or 0 for process' console
*/
1099 int mask
; /* setting
mask (see below
) */
1100 obj_handle_t active_sb
; /* active screen buffer
*/
1101 int history_mode
; /* whether we duplicate lines in history
*/
1102 int history_size
; /* number of lines in history
*/
1103 int edition_mode
; /* index to the edition mode flavors
*/
1104 int input_cp
; /* console input codepage
*/
1105 int output_cp
; /* console output codepage
*/
1106 user_handle_t win
; /* console window if backend supports it
*/
1107 VARARG(title
,unicode_str
); /* console title
*/
1109 #define SET_CONSOLE_INPUT_INFO_ACTIVE_SB
0x01
1110 #define SET_CONSOLE_INPUT_INFO_TITLE
0x02
1111 #define SET_CONSOLE_INPUT_INFO_HISTORY_MODE
0x04
1112 #define SET_CONSOLE_INPUT_INFO_HISTORY_SIZE
0x08
1113 #define SET_CONSOLE_INPUT_INFO_EDITION_MODE
0x10
1114 #define SET_CONSOLE_INPUT_INFO_INPUT_CODEPAGE
0x20
1115 #define SET_CONSOLE_INPUT_INFO_OUTPUT_CODEPAGE
0x40
1116 #define SET_CONSOLE_INPUT_INFO_WIN
0x80
1119 /* Get info about a
console (input only
) */
1120 @
REQ(get_console_input_info
)
1121 obj_handle_t handle
; /* handle to console input
, or
0 for process
' console */
1123 int history_mode; /* whether we duplicate lines in history */
1124 int history_size; /* number of lines in history */
1125 int history_index; /* number of used lines in history */
1126 int edition_mode; /* index to the edition mode flavors */
1127 int input_cp; /* console input codepage */
1128 int output_cp; /* console output codepage */
1129 user_handle_t win; /* console window if backend supports it */
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 file_pos_t size; /* mapping size */
1318 int protect; /* protection flags (see below) */
1319 obj_handle_t file_handle; /* file handle */
1320 VARARG(objattr,object_attributes); /* object attributes */
1322 obj_handle_t handle; /* handle to the mapping */
1324 /* protection flags */
1325 #define VPROT_READ 0x01
1326 #define VPROT_WRITE 0x02
1327 #define VPROT_EXEC 0x04
1328 #define VPROT_WRITECOPY 0x08
1329 #define VPROT_GUARD 0x10
1330 #define VPROT_NOCACHE 0x20
1331 #define VPROT_COMMITTED 0x40
1332 #define VPROT_IMAGE 0x80
1335 /* Open a mapping */
1337 unsigned int access; /* wanted access rights */
1338 unsigned int attributes; /* object attributes */
1339 obj_handle_t rootdir; /* root directory */
1340 VARARG(name,unicode_str); /* object name */
1342 obj_handle_t handle; /* handle to the mapping */
1346 /* Get information about a file mapping */
1347 @REQ(get_mapping_info)
1348 obj_handle_t handle; /* handle to the mapping */
1350 file_pos_t size; /* mapping size */
1351 int protect; /* protection flags */
1352 int header_size; /* header size (for VPROT_IMAGE mapping) */
1353 void* base; /* default base addr (for VPROT_IMAGE mapping) */
1354 obj_handle_t mapping; /* duplicate mapping handle unless removable */
1355 obj_handle_t shared_file; /* shared mapping file handle */
1359 #define SNAP_HEAPLIST 0x00000001
1360 #define SNAP_PROCESS 0x00000002
1361 #define SNAP_THREAD 0x00000004
1362 #define SNAP_MODULE 0x00000008
1363 /* Create a snapshot */
1364 @REQ(create_snapshot)
1365 unsigned int attributes; /* object attributes */
1366 int flags; /* snapshot flags (SNAP_*) */
1367 process_id_t pid; /* process id */
1369 obj_handle_t handle; /* handle to the snapshot */
1373 /* Get the next process from a snapshot */
1375 obj_handle_t handle; /* handle to the snapshot */
1376 int reset; /* reset snapshot position? */
1378 int count; /* process usage count */
1379 process_id_t pid; /* process id */
1380 process_id_t ppid; /* parent process id */
1381 void* heap; /* heap base */
1382 void* module; /* main module */
1383 int threads; /* number of threads */
1384 int priority; /* process priority */
1385 int handles; /* number of handles */
1386 VARARG(filename,unicode_str); /* file name of main exe */
1390 /* Get the next thread from a snapshot */
1392 obj_handle_t handle; /* handle to the snapshot */
1393 int reset; /* reset snapshot position? */
1395 int count; /* thread usage count */
1396 process_id_t pid; /* process id */
1397 thread_id_t tid; /* thread id */
1398 int base_pri; /* base priority */
1399 int delta_pri; /* delta priority */
1403 /* Get the next module from a snapshot */
1405 obj_handle_t handle; /* handle to the snapshot */
1406 int reset; /* reset snapshot position? */
1408 process_id_t pid; /* process id */
1409 void* base; /* module base address */
1410 size_t size; /* module size */
1411 VARARG(filename,unicode_str); /* file name of module */
1415 /* Wait for a debug event */
1416 @REQ(wait_debug_event)
1417 int get_handle; /* should we alloc a handle for waiting? */
1419 process_id_t pid; /* process id */
1420 thread_id_t tid; /* thread id */
1421 obj_handle_t wait; /* wait handle if no event ready */
1422 VARARG(event,debug_event); /* debug event data */
1426 /* Queue an exception event */
1427 @REQ(queue_exception_event)
1428 int first; /* first chance exception? */
1429 VARARG(record,exc_event); /* thread context followed by exception record */
1431 obj_handle_t handle; /* handle to the queued event */
1435 /* Retrieve the status of an exception event */
1436 @REQ(get_exception_status)
1437 obj_handle_t handle; /* handle to the queued event */
1439 VARARG(context,context); /* modified thread context */
1443 /* Send an output string to the debugger */
1444 @REQ(output_debug_string)
1445 void* string; /* string to display (in debugged process address space) */
1446 int unicode; /* is it Unicode? */
1447 int length; /* string length */
1451 /* Continue a debug event */
1452 @REQ(continue_debug_event)
1453 process_id_t pid; /* process id to continue */
1454 thread_id_t tid; /* thread id to continue */
1455 int status; /* continuation status */
1459 /* Start/stop debugging an existing process */
1461 process_id_t pid; /* id of the process to debug */
1462 int attach; /* 1=attaching / 0=detaching from the process */
1466 /* Simulate a breakpoint in a process */
1468 obj_handle_t handle; /* process handle */
1470 int self; /* was it the caller itself? */
1474 /* Set debugger kill on exit flag */
1475 @REQ(set_debugger_kill_on_exit)
1476 int kill_on_exit; /* 0=detach/1=kill debuggee when debugger dies */
1480 /* Read data from a process address space */
1481 @REQ(read_process_memory)
1482 obj_handle_t handle; /* process handle */
1483 void* addr; /* addr to read from */
1485 VARARG(data,bytes); /* result data */
1489 /* Write data to a process address space */
1490 @REQ(write_process_memory)
1491 obj_handle_t handle; /* process handle */
1492 void* addr; /* addr to write to */
1493 VARARG(data,bytes); /* data to write */
1497 /* Create a registry key */
1499 obj_handle_t parent; /* handle to the parent key */
1500 unsigned int access; /* desired access rights */
1501 unsigned int attributes; /* object attributes */
1502 unsigned int options; /* creation options */
1503 time_t modif; /* last modification time */
1504 data_size_t namelen; /* length of key name in bytes */
1505 VARARG(name,unicode_str,namelen); /* key name */
1506 VARARG(class,unicode_str); /* class name */
1508 obj_handle_t hkey; /* handle to the created key */
1509 int created; /* has it been newly created? */
1512 /* Open a registry key */
1514 obj_handle_t parent; /* handle to the parent key */
1515 unsigned int access; /* desired access rights */
1516 unsigned int attributes; /* object attributes */
1517 VARARG(name,unicode_str); /* key name */
1519 obj_handle_t hkey; /* handle to the open key */
1523 /* Delete a registry key */
1525 obj_handle_t hkey; /* handle to the key */
1529 /* Flush a registry key */
1531 obj_handle_t hkey; /* handle to the key */
1535 /* Enumerate registry subkeys */
1537 obj_handle_t hkey; /* handle to registry key */
1538 int index; /* index of subkey (or -1 for current key) */
1539 int info_class; /* requested information class */
1541 int subkeys; /* number of subkeys */
1542 int max_subkey; /* longest subkey name */
1543 int max_class; /* longest class name */
1544 int values; /* number of values */
1545 int max_value; /* longest value name */
1546 int max_data; /* longest value data */
1547 time_t modif; /* last modification time */
1548 data_size_t total; /* total length needed for full name and class */
1549 data_size_t namelen; /* length of key name in bytes */
1550 VARARG(name,unicode_str,namelen); /* key name */
1551 VARARG(class,unicode_str); /* class name */
1555 /* Set a value of a registry key */
1557 obj_handle_t hkey; /* handle to registry key */
1558 int type; /* value type */
1559 data_size_t namelen; /* length of value name in bytes */
1560 VARARG(name,unicode_str,namelen); /* value name */
1561 VARARG(data,bytes); /* value data */
1565 /* Retrieve the value of a registry key */
1567 obj_handle_t hkey; /* handle to registry key */
1568 VARARG(name,unicode_str); /* value name */
1570 int type; /* value type */
1571 data_size_t total; /* total length needed for data */
1572 VARARG(data,bytes); /* value data */
1576 /* Enumerate a value of a registry key */
1577 @REQ(enum_key_value)
1578 obj_handle_t hkey; /* handle to registry key */
1579 int index; /* value index */
1580 int info_class; /* requested information class */
1582 int type; /* value type */
1583 data_size_t total; /* total length needed for full name and data */
1584 data_size_t namelen; /* length of value name in bytes */
1585 VARARG(name,unicode_str,namelen); /* value name */
1586 VARARG(data,bytes); /* value data */
1590 /* Delete a value of a registry key */
1591 @REQ(delete_key_value)
1592 obj_handle_t hkey; /* handle to registry key */
1593 VARARG(name,unicode_str); /* value name */
1597 /* Load a registry branch from a file */
1599 obj_handle_t hkey; /* root key to load to */
1600 obj_handle_t file; /* file to load from */
1601 VARARG(name,unicode_str); /* subkey name */
1605 /* UnLoad a registry branch from a file */
1606 @REQ(unload_registry)
1607 obj_handle_t hkey; /* root key to unload to */
1611 /* Save a registry branch to a file */
1613 obj_handle_t hkey; /* key to save */
1614 obj_handle_t file; /* file to save to */
1618 /* Add a registry key change notification */
1619 @REQ(set_registry_notification)
1620 obj_handle_t hkey; /* key to watch for changes */
1621 obj_handle_t event; /* event to set */
1622 int subtree; /* should we watch the whole subtree? */
1623 unsigned int filter; /* things to watch */
1627 /* Create a waitable timer */
1629 unsigned int access; /* wanted access rights */
1630 unsigned int attributes; /* object attributes */
1631 obj_handle_t rootdir; /* root directory */
1632 int manual; /* manual reset */
1633 VARARG(name,unicode_str); /* object name */
1635 obj_handle_t handle; /* handle to the timer */
1639 /* Open a waitable timer */
1641 unsigned int access; /* wanted access rights */
1642 unsigned int attributes; /* object attributes */
1643 obj_handle_t rootdir; /* root directory */
1644 VARARG(name,unicode_str); /* object name */
1646 obj_handle_t handle; /* handle to the timer */
1649 /* Set a waitable timer */
1651 obj_handle_t handle; /* handle to the timer */
1652 timeout_t expire; /* next expiration absolute time */
1653 int period; /* timer period in ms */
1654 void* callback; /* callback function */
1655 void* arg; /* callback argument */
1657 int signaled; /* was the timer signaled before this call ? */
1660 /* Cancel a waitable timer */
1662 obj_handle_t handle; /* handle to the timer */
1664 int signaled; /* was the timer signaled before this calltime ? */
1667 /* Get information on a waitable timer */
1668 @REQ(get_timer_info)
1669 obj_handle_t handle; /* handle to the timer */
1671 timeout_t when; /* absolute time when the timer next expires */
1672 int signaled; /* is the timer signaled? */
1676 /* Retrieve the current context of a thread */
1677 @REQ(get_thread_context)
1678 obj_handle_t handle; /* thread handle */
1679 unsigned int flags; /* context flags */
1680 int suspend; /* if getting context during suspend */
1682 int self; /* was it a handle to the current thread? */
1683 VARARG(context,context); /* thread context */
1687 /* Set the current context of a thread */
1688 @REQ(set_thread_context)
1689 obj_handle_t handle; /* thread handle */
1690 unsigned int flags; /* context flags */
1691 int suspend; /* if setting context during suspend */
1692 VARARG(context,context); /* thread context */
1694 int self; /* was it a handle to the current thread? */
1698 /* Fetch a selector entry for a thread */
1699 @REQ(get_selector_entry)
1700 obj_handle_t handle; /* thread handle */
1701 int entry; /* LDT entry */
1703 unsigned int base; /* selector base */
1704 unsigned int limit; /* selector limit */
1705 unsigned char flags; /* selector flags */
1711 obj_handle_t table; /* which table to add atom to */
1712 VARARG(name,unicode_str); /* atom name */
1714 atom_t atom; /* resulting atom */
1718 /* Delete an atom */
1720 obj_handle_t table; /* which table to delete atom from */
1721 atom_t atom; /* atom handle */
1727 obj_handle_t table; /* which table to find atom from */
1728 VARARG(name,unicode_str); /* atom name */
1730 atom_t atom; /* atom handle */
1734 /* Get information about an atom */
1735 @REQ(get_atom_information)
1736 obj_handle_t table; /* which table to find atom from */
1737 atom_t atom; /* atom handle */
1739 int count; /* atom lock count */
1740 int pinned; /* whether the atom has been pinned */
1741 data_size_t total; /* actual length of atom name */
1742 VARARG(name,unicode_str); /* atom name */
1746 /* Set information about an atom */
1747 @REQ(set_atom_information)
1748 obj_handle_t table; /* which table to find atom from */
1749 atom_t atom; /* atom handle */
1750 int pinned; /* whether to bump atom information */
1754 /* Empty an atom table */
1755 @REQ(empty_atom_table)
1756 obj_handle_t table; /* which table to find atom from */
1757 int if_pinned; /* whether to delete pinned atoms */
1761 /* Init an atom table */
1762 @REQ(init_atom_table)
1763 int entries; /* number of entries (only for local) */
1765 obj_handle_t table; /* handle to the atom table */
1769 /* Get the message queue of the current thread */
1772 obj_handle_t handle; /* handle to the queue */
1776 /* Set the file descriptor associated to the current thread queue */
1778 obj_handle_t handle; /* handle to the file descriptor */
1782 /* Set the current message queue wakeup mask */
1783 @REQ(set_queue_mask)
1784 unsigned int wake_mask; /* wakeup bits mask */
1785 unsigned int changed_mask; /* changed bits mask */
1786 int skip_wait; /* will we skip waiting if signaled? */
1788 unsigned int wake_bits; /* current wake bits */
1789 unsigned int changed_bits; /* current changed bits */
1793 /* Get the current message queue status */
1794 @REQ(get_queue_status)
1795 int clear; /* should we clear the change bits? */
1797 unsigned int wake_bits; /* wake bits */
1798 unsigned int changed_bits; /* changed bits since last time */
1802 /* Retrieve the process idle event */
1803 @REQ(get_process_idle_event)
1804 obj_handle_t handle; /* process handle */
1806 obj_handle_t event; /* handle to idle event */
1810 /* Send a message to a thread queue */
1812 thread_id_t id; /* thread id */
1813 int type; /* message type (see below) */
1814 int flags; /* message flags (see below) */
1815 user_handle_t win; /* window handle */
1816 unsigned int msg; /* message code */
1817 unsigned long wparam; /* parameters */
1818 unsigned long lparam; /* parameters */
1819 timeout_t timeout; /* timeout for reply */
1820 VARARG(data,message_data); /* message data for sent messages */
1823 @REQ(post_quit_message)
1824 int exit_code; /* exit code to return */
1829 MSG_ASCII, /* Ascii message (from SendMessageA) */
1830 MSG_UNICODE, /* Unicode message (from SendMessageW) */
1831 MSG_NOTIFY, /* notify message (from SendNotifyMessageW), always Unicode */
1832 MSG_CALLBACK, /* callback message (from SendMessageCallbackW), always Unicode */
1833 MSG_CALLBACK_RESULT,/* result of a callback message */
1834 MSG_OTHER_PROCESS, /* sent from other process, may include vararg data, always Unicode */
1835 MSG_POSTED, /* posted message (from PostMessageW), always Unicode */
1836 MSG_HARDWARE, /* hardware message */
1837 MSG_WINEVENT /* winevent message */
1839 #define SEND_MSG_ABORT_IF_HUNG 0x01
1842 /* Send a hardware message to a thread queue */
1843 @REQ(send_hardware_message)
1844 thread_id_t id; /* thread id */
1845 user_handle_t win; /* window handle */
1846 unsigned int msg; /* message code */
1847 unsigned int time; /* message time */
1848 unsigned long wparam; /* parameters */
1849 unsigned long lparam; /* parameters */
1850 unsigned long info; /* extra info */
1851 int x; /* x position */
1852 int y; /* y position */
1856 /* Get a message from the current queue */
1858 unsigned int flags; /* PM_* flags */
1859 user_handle_t get_win; /* window handle to get */
1860 unsigned int get_first; /* first message code to get */
1861 unsigned int get_last; /* last message code to get */
1862 unsigned int hw_id; /* id of the previous hardware message (or 0) */
1863 unsigned int wake_mask; /* wakeup bits mask */
1864 unsigned int changed_mask; /* changed bits mask */
1866 user_handle_t win; /* window handle */
1867 int type; /* message type */
1868 unsigned int msg; /* message code */
1869 unsigned long wparam; /* parameters */
1870 unsigned long lparam; /* parameters */
1871 unsigned long info; /* extra info */
1872 int x; /* x position */
1873 int y; /* y position */
1874 unsigned int time; /* message time */
1875 unsigned int hw_id; /* id if hardware message */
1876 unsigned int active_hooks; /* active hooks bitmap */
1877 data_size_t total; /* total size of extra data */
1878 VARARG(data,message_data); /* message data for sent messages */
1882 /* Reply to a sent message */
1884 unsigned long result; /* message result */
1885 int remove; /* should we remove the message? */
1886 VARARG(data,bytes); /* message data for sent messages */
1890 /* Accept the current hardware message */
1891 @REQ(accept_hardware_message)
1892 unsigned int hw_id; /* id of the hardware message */
1893 int remove; /* should we remove the message? */
1894 user_handle_t new_win; /* new destination window for current message */
1898 /* Retrieve the reply for the last message sent */
1899 @REQ(get_message_reply)
1900 int cancel; /* cancel message if not ready? */
1902 unsigned long result; /* message result */
1903 VARARG(data,bytes); /* message data for sent messages */
1907 /* Set a window timer */
1909 user_handle_t win; /* window handle */
1910 unsigned int msg; /* message to post */
1911 unsigned int rate; /* timer rate in ms */
1912 unsigned long id; /* timer id */
1913 unsigned long lparam; /* message lparam (callback proc) */
1915 unsigned long id; /* timer id */
1919 /* Kill a window timer */
1920 @REQ(kill_win_timer)
1921 user_handle_t win; /* window handle */
1922 unsigned int msg; /* message to post */
1923 unsigned long id; /* timer id */
1927 /* Retrieve info about a serial port */
1928 @REQ(get_serial_info)
1929 obj_handle_t handle; /* handle to comm port */
1931 unsigned int readinterval;
1932 unsigned int readconst;
1933 unsigned int readmult;
1934 unsigned int writeconst;
1935 unsigned int writemult;
1936 unsigned int eventmask;
1940 /* Set info about a serial port */
1941 @REQ(set_serial_info)
1942 obj_handle_t handle; /* handle to comm port */
1943 int flags; /* bitmask to set values (see below) */
1944 unsigned int readinterval;
1945 unsigned int readconst;
1946 unsigned int readmult;
1947 unsigned int writeconst;
1948 unsigned int writemult;
1949 unsigned int eventmask;
1951 #define SERIALINFO_SET_TIMEOUTS 0x01
1952 #define SERIALINFO_SET_MASK 0x02
1955 /* Create an async I/O */
1956 @REQ(register_async)
1957 obj_handle_t handle; /* handle to comm port, socket or file */
1958 int type; /* type of queue to look after */
1959 int count; /* count - usually # of bytes to be read/written */
1960 async_data_t async; /* async I/O parameters */
1962 #define ASYNC_TYPE_READ 0x01
1963 #define ASYNC_TYPE_WRITE 0x02
1964 #define ASYNC_TYPE_WAIT 0x03
1967 /* Cancel all async op on a fd */
1969 obj_handle_t handle; /* handle to comm port, socket or file */
1973 /* Perform an ioctl on a file */
1975 obj_handle_t handle; /* handle to the device */
1976 ioctl_code_t code; /* ioctl code */
1977 async_data_t async; /* async I/O parameters */
1978 VARARG(in_data,bytes); /* ioctl input data */
1980 obj_handle_t wait; /* handle to wait on for blocking ioctl */
1981 unsigned int options; /* device open options */
1982 VARARG(out_data,bytes); /* ioctl output data */
1986 /* Retrieve results of an async ioctl */
1987 @REQ(get_ioctl_result)
1988 obj_handle_t handle; /* handle to the device */
1989 void* user_arg; /* user arg used to identify the request */
1991 VARARG(out_data,bytes); /* ioctl output data */
1995 /* Create a named pipe */
1996 @REQ(create_named_pipe)
1997 unsigned int access;
1998 unsigned int attributes; /* object attributes */
1999 obj_handle_t rootdir; /* root directory */
2000 unsigned int options;
2002 unsigned int maxinstances;
2003 unsigned int outsize;
2004 unsigned int insize;
2006 VARARG(name,unicode_str); /* pipe name */
2008 obj_handle_t handle; /* handle to the pipe */
2011 /* flags in create_named_pipe and get_named_pipe_info */
2012 #define NAMED_PIPE_MESSAGE_STREAM_WRITE 0x0001
2013 #define NAMED_PIPE_MESSAGE_STREAM_READ 0x0002
2014 #define NAMED_PIPE_NONBLOCKING_MODE 0x0004
2015 #define NAMED_PIPE_SERVER_END 0x8000
2018 @REQ(get_named_pipe_info)
2019 obj_handle_t handle;
2022 unsigned int maxinstances;
2023 unsigned int instances;
2024 unsigned int outsize;
2025 unsigned int insize;
2029 /* Create a window */
2031 user_handle_t parent; /* parent window */
2032 user_handle_t owner; /* owner window */
2033 atom_t atom; /* class atom */
2034 void* instance; /* module instance */
2035 VARARG(class,unicode_str); /* class name */
2037 user_handle_t handle; /* created window */
2038 user_handle_t parent; /* full handle of parent */
2039 user_handle_t owner; /* full handle of owner */
2040 int extra; /* number of extra bytes */
2041 void* class_ptr; /* pointer to class in client address space */
2045 /* Destroy a window */
2046 @REQ(destroy_window)
2047 user_handle_t handle; /* handle to the window */
2051 /* Retrieve the desktop window for the current thread */
2052 @REQ(get_desktop_window)
2053 int force; /* force creation if it doesn't exist
*/
2055 user_handle_t handle
; /* handle to the desktop window
*/
2059 /* Set a window owner
*/
2060 @
REQ(set_window_owner
)
2061 user_handle_t handle
; /* handle to the window
*/
2062 user_handle_t owner
; /* new owner
*/
2064 user_handle_t full_owner
; /* full handle of new owner
*/
2065 user_handle_t prev_owner
; /* full handle of previous owner
*/
2069 /* Get information from a window handle
*/
2070 @
REQ(get_window_info
)
2071 user_handle_t handle
; /* handle to the window
*/
2073 user_handle_t full_handle
; /* full
32-bit handle
*/
2074 user_handle_t last_active
; /* last active popup
*/
2075 process_id_t pid
; /* process owning the window
*/
2076 thread_id_t tid
; /* thread owning the window
*/
2077 atom_t atom
; /* class atom
*/
2078 int is_unicode
; /* ANSI or unicode
*/
2082 /* Set some information in a window
*/
2083 @
REQ(set_window_info
)
2084 unsigned int flags
; /* flags for fields to
set (see below
) */
2085 user_handle_t handle
; /* handle to the window
*/
2086 unsigned int style
; /* window style
*/
2087 unsigned int ex_style
; /* window extended style
*/
2088 unsigned int id
; /* window id
*/
2089 int is_unicode
; /* ANSI or unicode
*/
2090 void
* instance
; /* creator instance
*/
2091 unsigned long user_data
; /* user
-specific data
*/
2092 int extra_offset
; /* offset to set in extra bytes
*/
2093 data_size_t extra_size
; /* size to set in extra bytes
*/
2094 unsigned long extra_value
; /* value to set in extra bytes
*/
2096 unsigned int old_style
; /* old window style
*/
2097 unsigned int old_ex_style
; /* old window extended style
*/
2098 unsigned int old_id
; /* old window id
*/
2099 void
* old_instance
; /* old creator instance
*/
2100 unsigned long old_user_data
; /* old user
-specific data
*/
2101 unsigned long old_extra_value
; /* old value in extra bytes
*/
2103 #define SET_WIN_STYLE
0x01
2104 #define SET_WIN_EXSTYLE
0x02
2105 #define SET_WIN_ID
0x04
2106 #define SET_WIN_INSTANCE
0x08
2107 #define SET_WIN_USERDATA
0x10
2108 #define SET_WIN_EXTRA
0x20
2109 #define SET_WIN_UNICODE
0x40
2112 /* Set the parent of a window
*/
2114 user_handle_t handle
; /* handle to the window
*/
2115 user_handle_t parent
; /* handle to the parent
*/
2117 user_handle_t old_parent
; /* old parent window
*/
2118 user_handle_t full_parent
; /* full handle of new parent
*/
2122 /* Get a list of the window parents
, up to the root of the tree
*/
2123 @
REQ(get_window_parents
)
2124 user_handle_t handle
; /* handle to the window
*/
2126 int count
; /* total count of parents
*/
2127 VARARG(parents
,user_handles
); /* parent handles
*/
2131 /* Get a list of the window children
*/
2132 @
REQ(get_window_children
)
2133 user_handle_t parent
; /* parent window
*/
2134 atom_t atom
; /* class atom for the listed children
*/
2135 thread_id_t tid
; /* thread owning the listed children
*/
2136 VARARG(class
,unicode_str
); /* class name
*/
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
*/
2178 unsigned int new_ex_style
; /* new window extended style
*/
2182 /* Get the window and client rectangles of a window
*/
2183 @
REQ(get_window_rectangles
)
2184 user_handle_t handle
; /* handle to the window
*/
2186 rectangle_t window
; /* window rectangle
*/
2187 rectangle_t visible
; /* visible part of the window rectangle
*/
2188 rectangle_t client
; /* client rectangle
*/
2192 /* Get the window text
*/
2193 @
REQ(get_window_text
)
2194 user_handle_t handle
; /* handle to the window
*/
2196 VARARG(text
,unicode_str
); /* window text
*/
2200 /* Set the window text
*/
2201 @
REQ(set_window_text
)
2202 user_handle_t handle
; /* handle to the window
*/
2203 VARARG(text
,unicode_str
); /* window text
*/
2207 /* Get the coordinates offset between two windows
*/
2208 @
REQ(get_windows_offset
)
2209 user_handle_t from
; /* handle to the first window
*/
2210 user_handle_t to
; /* handle to the second window
*/
2212 int x
; /* x coordinate offset
*/
2213 int y
; /* y coordinate offset
*/
2217 /* Get the visible region of a window
*/
2218 @
REQ(get_visible_region
)
2219 user_handle_t window
; /* handle to the window
*/
2220 unsigned int flags
; /* DCX flags
*/
2222 user_handle_t top_win
; /* top window to clip against
*/
2223 rectangle_t top_rect
; /* top window visible rect with screen coords
*/
2224 rectangle_t win_rect
; /* window rect in screen coords
*/
2225 data_size_t total_size
; /* total size of the resulting region
*/
2226 VARARG(region
,rectangles
); /* list of rectangles for the
region (in screen coords
) */
2230 /* Get the window region
*/
2231 @
REQ(get_window_region
)
2232 user_handle_t window
; /* handle to the window
*/
2234 data_size_t total_size
; /* total size of the resulting region
*/
2235 VARARG(region
,rectangles
); /* list of rectangles for the region
*/
2239 /* Set the window region
*/
2240 @
REQ(set_window_region
)
2241 user_handle_t window
; /* handle to the window
*/
2242 int redraw
; /* redraw the window?
*/
2243 VARARG(region
,rectangles
); /* list of rectangles for the region
*/
2247 /* Get the window update region
*/
2248 @
REQ(get_update_region
)
2249 user_handle_t window
; /* handle to the window
*/
2250 user_handle_t from_child
; /* child to start searching from
*/
2251 unsigned int flags
; /* update
flags (see below
) */
2253 user_handle_t child
; /* child to
repaint (or window itself
) */
2254 unsigned int flags
; /* resulting update
flags (see below
) */
2255 data_size_t total_size
; /* total size of the resulting region
*/
2256 VARARG(region
,rectangles
); /* list of rectangles for the region
*/
2258 #define UPDATE_NONCLIENT
0x01 /* get region for repainting non
-client area
*/
2259 #define UPDATE_ERASE
0x02 /* get region for erasing client area
*/
2260 #define UPDATE_PAINT
0x04 /* get region for painting client area
*/
2261 #define UPDATE_INTERNALPAINT
0x08 /* get region if internal paint is pending
*/
2262 #define UPDATE_ALLCHILDREN
0x10 /* force repaint of all children
*/
2263 #define UPDATE_NOCHILDREN
0x20 /* don
't try to repaint any children */
2264 #define UPDATE_NOREGION 0x40 /* don't return a region
, only the flags
*/
2265 #define UPDATE_DELAYED_ERASE
0x80 /* still needs erase after BeginPaint
*/
2268 /* Update the z order of a window so that a given rectangle is fully visible
*/
2269 @
REQ(update_window_zorder
)
2270 user_handle_t window
; /* handle to the window
*/
2271 rectangle_t rect
; /* rectangle that must be visible
*/
2275 /* Mark parts of a window as needing a redraw
*/
2277 user_handle_t window
; /* handle to the window
*/
2278 unsigned int flags
; /* RDW_
* flags
*/
2279 VARARG(region
,rectangles
); /* list of rectangles for the region
*/
2283 /* Set a window property
*/
2284 @
REQ(set_window_property
)
2285 user_handle_t window
; /* handle to the window
*/
2286 atom_t atom
; /* property
atom (if no name specified
) */
2287 obj_handle_t handle
; /* handle to store
*/
2288 VARARG(name
,unicode_str
); /* property name
*/
2292 /* Remove a window property
*/
2293 @
REQ(remove_window_property
)
2294 user_handle_t window
; /* handle to the window
*/
2295 atom_t atom
; /* property
atom (if no name specified
) */
2296 VARARG(name
,unicode_str
); /* property name
*/
2298 obj_handle_t handle
; /* handle stored in property
*/
2302 /* Get a window property
*/
2303 @
REQ(get_window_property
)
2304 user_handle_t window
; /* handle to the window
*/
2305 atom_t atom
; /* property
atom (if no name specified
) */
2306 VARARG(name
,unicode_str
); /* property name
*/
2308 obj_handle_t handle
; /* handle stored in property
*/
2312 /* Get the list of properties of a window
*/
2313 @
REQ(get_window_properties
)
2314 user_handle_t window
; /* handle to the window
*/
2316 int total
; /* total number of properties
*/
2317 VARARG(props
,properties
); /* list of properties
*/
2321 /* Create a window station
*/
2322 @
REQ(create_winstation
)
2323 unsigned int flags
; /* window station flags
*/
2324 unsigned int access
; /* wanted access rights
*/
2325 unsigned int attributes
; /* object attributes
*/
2326 VARARG(name
,unicode_str
); /* object name
*/
2328 obj_handle_t handle
; /* handle to the window station
*/
2332 /* Open a handle to a window station
*/
2333 @
REQ(open_winstation
)
2334 unsigned int access
; /* wanted access rights
*/
2335 unsigned int attributes
; /* object attributes
*/
2336 VARARG(name
,unicode_str
); /* object name
*/
2338 obj_handle_t handle
; /* handle to the window station
*/
2342 /* Close a window station
*/
2343 @
REQ(close_winstation
)
2344 obj_handle_t handle
; /* handle to the window station
*/
2348 /* Get the process current window station
*/
2349 @
REQ(get_process_winstation
)
2351 obj_handle_t handle
; /* handle to the window station
*/
2355 /* Set the process current window station
*/
2356 @
REQ(set_process_winstation
)
2357 obj_handle_t handle
; /* handle to the window station
*/
2361 /* Create a desktop
*/
2362 @
REQ(create_desktop
)
2363 unsigned int flags
; /* desktop flags
*/
2364 unsigned int access
; /* wanted access rights
*/
2365 unsigned int attributes
; /* object attributes
*/
2366 VARARG(name
,unicode_str
); /* object name
*/
2368 obj_handle_t handle
; /* handle to the desktop
*/
2372 /* Open a handle to a desktop
*/
2374 unsigned int flags
; /* desktop flags
*/
2375 unsigned int access
; /* wanted access rights
*/
2376 unsigned int attributes
; /* object attributes
*/
2377 VARARG(name
,unicode_str
); /* object name
*/
2379 obj_handle_t handle
; /* handle to the desktop
*/
2383 /* Close a desktop
*/
2385 obj_handle_t handle
; /* handle to the desktop
*/
2389 /* Get the thread current desktop
*/
2390 @
REQ(get_thread_desktop
)
2391 thread_id_t tid
; /* thread id
*/
2393 obj_handle_t handle
; /* handle to the desktop
*/
2397 /* Set the thread current desktop
*/
2398 @
REQ(set_thread_desktop
)
2399 obj_handle_t handle
; /* handle to the desktop
*/
2403 /* Get
/set information about a user
object (window station or desktop
) */
2404 @
REQ(set_user_object_info
)
2405 obj_handle_t handle
; /* handle to the object
*/
2406 unsigned int flags
; /* information to set
*/
2407 unsigned int obj_flags
; /* new object flags
*/
2409 int is_desktop
; /* is object a desktop?
*/
2410 unsigned int old_obj_flags
; /* old object flags
*/
2411 VARARG(name
,unicode_str
); /* object name
*/
2413 #define SET_USER_OBJECT_FLAGS
1
2416 /* Attach (or detach
) thread inputs
*/
2417 @
REQ(attach_thread_input
)
2418 thread_id_t tid_from
; /* thread to be attached
*/
2419 thread_id_t tid_to
; /* thread to which tid_from should be attached
*/
2420 int attach
; /* is it an attach?
*/
2424 /* Get input data for a given thread
*/
2425 @
REQ(get_thread_input
)
2426 thread_id_t tid
; /* id of thread
*/
2428 user_handle_t focus
; /* handle to the focus window
*/
2429 user_handle_t capture
; /* handle to the capture window
*/
2430 user_handle_t active
; /* handle to the active window
*/
2431 user_handle_t foreground
; /* handle to the global foreground window
*/
2432 user_handle_t menu_owner
; /* handle to the menu owner
*/
2433 user_handle_t move_size
; /* handle to the moving
/resizing window
*/
2434 user_handle_t caret
; /* handle to the caret window
*/
2435 rectangle_t rect
; /* caret rectangle
*/
2439 /* Get the time of the last input event
*/
2440 @
REQ(get_last_input_time
)
2446 /* Retrieve queue keyboard state for a given thread
*/
2448 thread_id_t tid
; /* id of thread
*/
2449 int key
; /* optional key code or
-1 */
2451 unsigned char state
; /* state of specified key
*/
2452 VARARG(keystate
,bytes
); /* state array for all the keys
*/
2455 /* Set queue keyboard state for a given thread
*/
2457 thread_id_t tid
; /* id of thread
*/
2458 VARARG(keystate
,bytes
); /* state array for all the keys
*/
2461 /* Set the system foreground window
*/
2462 @
REQ(set_foreground_window
)
2463 user_handle_t handle
; /* handle to the foreground window
*/
2465 user_handle_t previous
; /* handle to the previous foreground window
*/
2466 int send_msg_old
; /* whether we have to send a msg to the old window
*/
2467 int send_msg_new
; /* whether we have to send a msg to the new window
*/
2470 /* Set the current thread focus window
*/
2471 @
REQ(set_focus_window
)
2472 user_handle_t handle
; /* handle to the focus window
*/
2474 user_handle_t previous
; /* handle to the previous focus window
*/
2477 /* Set the current thread active window
*/
2478 @
REQ(set_active_window
)
2479 user_handle_t handle
; /* handle to the active window
*/
2481 user_handle_t previous
; /* handle to the previous active window
*/
2484 /* Set the current thread capture window
*/
2485 @
REQ(set_capture_window
)
2486 user_handle_t handle
; /* handle to the capture window
*/
2487 unsigned int flags
; /* capture
flags (see below
) */
2489 user_handle_t previous
; /* handle to the previous capture window
*/
2490 user_handle_t full_handle
; /* full
32-bit handle of new capture window
*/
2492 #define CAPTURE_MENU
0x01 /* capture is for a menu
*/
2493 #define CAPTURE_MOVESIZE
0x02 /* capture is for moving
/resizing
*/
2496 /* Set the current thread caret window
*/
2497 @
REQ(set_caret_window
)
2498 user_handle_t handle
; /* handle to the caret window
*/
2499 int width
; /* caret width
*/
2500 int height
; /* caret height
*/
2502 user_handle_t previous
; /* handle to the previous caret window
*/
2503 rectangle_t old_rect
; /* previous caret rectangle
*/
2504 int old_hide
; /* previous hide count
*/
2505 int old_state
; /* previous caret
state (1=on
, 0=off
) */
2509 /* Set the current thread caret information
*/
2510 @
REQ(set_caret_info
)
2511 unsigned int flags
; /* caret
flags (see below
) */
2512 user_handle_t handle
; /* handle to the caret window
*/
2513 int x
; /* caret x position
*/
2514 int y
; /* caret y position
*/
2515 int hide
; /* increment for hide
count (can be negative to show it
) */
2516 int state
; /* caret
state (1=on
, 0=off
, -1=toggle current state
) */
2518 user_handle_t full_handle
; /* handle to the current caret window
*/
2519 rectangle_t old_rect
; /* previous caret rectangle
*/
2520 int old_hide
; /* previous hide count
*/
2521 int old_state
; /* previous caret
state (1=on
, 0=off
) */
2523 #define SET_CARET_POS
0x01 /* set the caret position from x
,y
*/
2524 #define SET_CARET_HIDE
0x02 /* increment the caret hide count
*/
2525 #define SET_CARET_STATE
0x04 /* set the caret on
/off state
*/
2528 /* Set a window hook
*/
2530 int id
; /* id of the hook
*/
2531 process_id_t pid
; /* id of process to set the hook into
*/
2532 thread_id_t tid
; /* id of thread to set the hook into
*/
2536 void
* proc
; /* hook procedure
*/
2537 int unicode
; /* is it a unicode hook?
*/
2538 VARARG(module
,unicode_str
); /* module name
*/
2540 user_handle_t handle
; /* handle to the hook
*/
2541 unsigned int active_hooks
; /* active hooks bitmap
*/
2545 /* Remove a window hook
*/
2547 user_handle_t handle
; /* handle to the hook
*/
2548 int id
; /* id of the hook if handle is
0 */
2549 void
* proc
; /* hook procedure if handle is
0 */
2551 unsigned int active_hooks
; /* active hooks bitmap
*/
2555 /* Start calling a hook chain
*/
2556 @
REQ(start_hook_chain
)
2557 int id
; /* id of the hook
*/
2558 int event
; /* signalled event
*/
2559 user_handle_t window
; /* handle to the event window
*/
2560 int object_id
; /* object id for out of context winevent
*/
2561 int child_id
; /* child id for out of context winevent
*/
2563 user_handle_t handle
; /* handle to the next hook
*/
2564 process_id_t pid
; /* process id for low
-level keyboard
/mouse hooks
*/
2565 thread_id_t tid
; /* thread id for low
-level keyboard
/mouse hooks
*/
2566 void
* proc
; /* hook procedure
*/
2567 int unicode
; /* is it a unicode hook?
*/
2568 unsigned int active_hooks
; /* active hooks bitmap
*/
2569 VARARG(module
,unicode_str
); /* module name
*/
2573 /* Finished calling a hook chain
*/
2574 @
REQ(finish_hook_chain
)
2575 int id
; /* id of the hook
*/
2579 /* Get the hook information
*/
2581 user_handle_t handle
; /* handle to the current hook
*/
2582 int get_next
; /* do we want info about current or next hook?
*/
2583 int event
; /* signalled event
*/
2584 user_handle_t window
; /* handle to the event window
*/
2585 int object_id
; /* object id for out of context winevent
*/
2586 int child_id
; /* child id for out of context winevent
*/
2588 user_handle_t handle
; /* handle to the hook
*/
2589 int id
; /* id of the hook
*/
2590 process_id_t pid
; /* process id for low
-level keyboard
/mouse hooks
*/
2591 thread_id_t tid
; /* thread id for low
-level keyboard
/mouse hooks
*/
2592 void
* proc
; /* hook procedure
*/
2593 int unicode
; /* is it a unicode hook?
*/
2594 VARARG(module
,unicode_str
); /* module name
*/
2598 /* Create a window class
*/
2600 int local
; /* is it a local class?
*/
2601 atom_t atom
; /* class atom
*/
2602 unsigned int style
; /* class style
*/
2603 void
* instance
; /* module instance
*/
2604 int extra
; /* number of extra class bytes
*/
2605 int win_extra
; /* number of window extra bytes
*/
2606 void
* client_ptr
; /* pointer to class in client address space
*/
2607 VARARG(name
,unicode_str
); /* class name
*/
2609 atom_t atom
; /* resulting class atom
*/
2613 /* Destroy a window class
*/
2615 atom_t atom
; /* class atom
*/
2616 void
* instance
; /* module instance
*/
2617 VARARG(name
,unicode_str
); /* class name
*/
2619 void
* client_ptr
; /* pointer to class in client address space
*/
2623 /* Set some information in a class
*/
2624 @
REQ(set_class_info
)
2625 user_handle_t window
; /* handle to the window
*/
2626 unsigned int flags
; /* flags for info to
set (see below
) */
2627 atom_t atom
; /* class atom
*/
2628 unsigned int style
; /* class style
*/
2629 int win_extra
; /* number of window extra bytes
*/
2630 void
* instance
; /* module instance
*/
2631 int extra_offset
; /* offset to set in extra bytes
*/
2632 data_size_t extra_size
; /* size to set in extra bytes
*/
2633 unsigned long extra_value
; /* value to set in extra bytes
*/
2635 atom_t old_atom
; /* previous class atom
*/
2636 unsigned int old_style
; /* previous class style
*/
2637 int old_extra
; /* previous number of class extra bytes
*/
2638 int old_win_extra
; /* previous number of window extra bytes
*/
2639 void
* old_instance
; /* previous module instance
*/
2640 unsigned long old_extra_value
; /* old value in extra bytes
*/
2642 #define SET_CLASS_ATOM
0x0001
2643 #define SET_CLASS_STYLE
0x0002
2644 #define SET_CLASS_WINEXTRA
0x0004
2645 #define SET_CLASS_INSTANCE
0x0008
2646 #define SET_CLASS_EXTRA
0x0010
2649 /* Set
/get clipboard information
*/
2650 @
REQ(set_clipboard_info
)
2651 unsigned int flags
; /* flags for fields to
set (see below
) */
2652 user_handle_t clipboard
; /* clipboard window
*/
2653 user_handle_t owner
; /* clipboard owner
*/
2654 user_handle_t viewer
; /* first clipboard viewer
*/
2655 unsigned int seqno
; /* change sequence number
*/
2657 unsigned int flags
; /* status
flags (see below
) */
2658 user_handle_t old_clipboard
; /* old clipboard window
*/
2659 user_handle_t old_owner
; /* old clipboard owner
*/
2660 user_handle_t old_viewer
; /* old clipboard viewer
*/
2661 unsigned int seqno
; /* current sequence number
*/
2664 #define SET_CB_OPEN
0x001
2665 #define SET_CB_OWNER
0x002
2666 #define SET_CB_VIEWER
0x004
2667 #define SET_CB_SEQNO
0x008
2668 #define SET_CB_RELOWNER
0x010
2669 #define SET_CB_CLOSE
0x020
2670 #define CB_OPEN
0x040
2671 #define CB_OWNER
0x080
2672 #define CB_PROCESS
0x100
2675 /* Open a security token
*/
2677 obj_handle_t handle
; /* handle to the thread or process
*/
2678 unsigned int access
; /* access rights to the new token
*/
2679 unsigned int attributes
;/* object attributes
*/
2680 unsigned int flags
; /* flags (see below
) */
2682 obj_handle_t token
; /* handle to the token
*/
2684 #define OPEN_TOKEN_THREAD
1
2685 #define OPEN_TOKEN_AS_SELF
2
2688 /* Set
/get the global windows
*/
2689 @
REQ(set_global_windows
)
2690 unsigned int flags
; /* flags for fields to
set (see below
) */
2691 user_handle_t shell_window
; /* handle to the new shell window
*/
2692 user_handle_t shell_listview
; /* handle to the new shell listview window
*/
2693 user_handle_t progman_window
; /* handle to the new program manager window
*/
2694 user_handle_t taskman_window
; /* handle to the new task manager window
*/
2696 user_handle_t old_shell_window
; /* handle to the shell window
*/
2697 user_handle_t old_shell_listview
; /* handle to the shell listview window
*/
2698 user_handle_t old_progman_window
; /* handle to the new program manager window
*/
2699 user_handle_t old_taskman_window
; /* handle to the new task manager window
*/
2701 #define SET_GLOBAL_SHELL_WINDOWS
0x01 /* set both main shell and listview windows
*/
2702 #define SET_GLOBAL_PROGMAN_WINDOW
0x02
2703 #define SET_GLOBAL_TASKMAN_WINDOW
0x04
2705 /* Adjust the privileges held by a token
*/
2706 @
REQ(adjust_token_privileges
)
2707 obj_handle_t handle
; /* handle to the token
*/
2708 int disable_all
; /* disable all privileges?
*/
2709 int get_modified_state
; /* get modified privileges?
*/
2710 VARARG(privileges
,LUID_AND_ATTRIBUTES
); /* privileges to enable
/disable
/remove
*/
2712 unsigned int len
; /* total length in bytes required to store token privileges
*/
2713 VARARG(privileges
,LUID_AND_ATTRIBUTES
); /* modified privileges
*/
2716 /* Retrieves the set of privileges held by or available to a token
*/
2717 @
REQ(get_token_privileges
)
2718 obj_handle_t handle
; /* handle to the token
*/
2720 unsigned int len
; /* total length in bytes required to store token privileges
*/
2721 VARARG(privileges
,LUID_AND_ATTRIBUTES
); /* privileges held by or available to a token
*/
2724 /* Check the token has the required privileges
*/
2725 @
REQ(check_token_privileges
)
2726 obj_handle_t handle
; /* handle to the token
*/
2727 int all_required
; /* are all the privileges required for the check to succeed?
*/
2728 VARARG(privileges
,LUID_AND_ATTRIBUTES
); /* privileges to check
*/
2730 int has_privileges
; /* does the token have the required privileges?
*/
2731 VARARG(privileges
,LUID_AND_ATTRIBUTES
); /* privileges held by or available to a token
*/
2734 @
REQ(duplicate_token
)
2735 obj_handle_t handle
; /* handle to the token to duplicate
*/
2736 unsigned int access
; /* access rights to the new token
*/
2737 unsigned int attributes
; /* object attributes
*/
2738 int primary
; /* is the new token to be a primary one?
*/
2739 int impersonation_level
; /* impersonation level of the new token
*/
2741 obj_handle_t new_handle
; /* duplicated handle
*/
2745 obj_handle_t handle
; /* handle to the token
*/
2746 unsigned int desired_access
; /* desired access to the object
*/
2747 unsigned int mapping_read
; /* mapping from generic read to specific rights
*/
2748 unsigned int mapping_write
; /* mapping from generic write to specific rights
*/
2749 unsigned int mapping_execute
; /* mapping from generic execute to specific rights
*/
2750 unsigned int mapping_all
; /* mapping from generic all to specific rights
*/
2751 VARARG(sd
,security_descriptor
); /* security descriptor to check
*/
2753 unsigned int access_granted
; /* access rights actually granted
*/
2754 unsigned int access_status
; /* was access granted?
*/
2755 unsigned int privileges_len
; /* length needed to store privileges
*/
2756 VARARG(privileges
,LUID_AND_ATTRIBUTES
); /* privileges used during access check
*/
2759 @
REQ(get_token_user
)
2760 obj_handle_t handle
; /* handle to the token
*/
2762 data_size_t user_len
; /* length needed to store user
*/
2763 VARARG(user
,SID
); /* sid of the user the token represents
*/
2766 @
REQ(get_token_groups
)
2767 obj_handle_t handle
; /* handle to the token
*/
2769 data_size_t user_len
; /* length needed to store user
*/
2770 VARARG(user
,token_groups
); /* groups the token
's user belongs to */
2773 @REQ(set_security_object)
2774 obj_handle_t handle; /* handle to the object */
2775 unsigned int security_info; /* which parts of security descriptor to set */
2776 VARARG(sd,security_descriptor); /* security descriptor to set */
2779 @REQ(get_security_object)
2780 obj_handle_t handle; /* handle to the object */
2781 unsigned int security_info; /* which parts of security descriptor to get */
2783 unsigned int sd_len; /* buffer size needed for sd */
2784 VARARG(sd,security_descriptor); /* retrieved security descriptor */
2787 /* Create a mailslot */
2788 @REQ(create_mailslot)
2789 unsigned int access; /* wanted access rights */
2790 unsigned int attributes; /* object attributes */
2791 obj_handle_t rootdir; /* root directory */
2792 unsigned int max_msgsize;
2793 timeout_t read_timeout;
2794 VARARG(name,unicode_str); /* mailslot name */
2796 obj_handle_t handle; /* handle to the mailslot */
2800 /* Set mailslot information */
2801 @REQ(set_mailslot_info)
2802 obj_handle_t handle; /* handle to the mailslot */
2804 timeout_t read_timeout;
2806 unsigned int max_msgsize;
2807 timeout_t read_timeout;
2809 #define MAILSLOT_SET_READ_TIMEOUT 1
2812 /* Create a directory object */
2813 @REQ(create_directory)
2814 unsigned int access; /* access flags */
2815 unsigned int attributes; /* object attributes */
2816 obj_handle_t rootdir; /* root directory */
2817 VARARG(directory_name,unicode_str); /* Directory name */
2819 obj_handle_t handle; /* handle to the directory */
2823 /* Open a directory object */
2824 @REQ(open_directory)
2825 unsigned int access; /* access flags */
2826 unsigned int attributes; /* object attributes */
2827 obj_handle_t rootdir; /* root directory */
2828 VARARG(directory_name,unicode_str); /* Directory name */
2830 obj_handle_t handle; /* handle to the directory */
2834 /* Create a symbolic link object */
2835 @REQ(create_symlink)
2836 unsigned int access; /* access flags */
2837 unsigned int attributes; /* object attributes */
2838 obj_handle_t rootdir; /* root directory */
2839 data_size_t name_len; /* length of the symlink name in bytes */
2840 VARARG(name,unicode_str,name_len); /* symlink name */
2841 VARARG(target_name,unicode_str); /* target name */
2843 obj_handle_t handle; /* handle to the symlink */
2847 /* Open a symbolic link object */
2849 unsigned int access; /* access flags */
2850 unsigned int attributes; /* object attributes */
2851 obj_handle_t rootdir; /* root directory */
2852 VARARG(name,unicode_str); /* symlink name */
2854 obj_handle_t handle; /* handle to the symlink */
2858 /* Query a symbolic link object */
2860 obj_handle_t handle; /* handle to the symlink */
2862 VARARG(target_name,unicode_str); /* target name */
2866 /* Query basic object information */
2867 @REQ(get_object_info)
2868 obj_handle_t handle; /* handle to the object */
2870 unsigned int access; /* granted access mask */
2871 unsigned int ref_count; /* object ref count */
2874 /* Query the impersonation level of an impersonation token */
2875 @REQ(get_token_impersonation_level)
2876 obj_handle_t handle; /* handle to the object */
2878 int impersonation_level; /* impersonation level of the impersonation token */
2881 /* Allocate a locally-unique identifier */
2882 @REQ(allocate_locally_unique_id)
2888 /* Create a device manager */
2889 @REQ(create_device_manager)
2890 unsigned int access; /* wanted access rights */
2891 unsigned int attributes; /* object attributes */
2893 obj_handle_t handle; /* handle to the device */
2897 /* Create a device */
2899 unsigned int access; /* wanted access rights */
2900 unsigned int attributes; /* object attributes */
2901 obj_handle_t rootdir; /* root directory */
2902 obj_handle_t manager; /* device manager */
2903 void* user_ptr; /* opaque ptr for use by client */
2904 VARARG(name,unicode_str); /* object name */
2906 obj_handle_t handle; /* handle to the device */
2910 /* Delete a device */
2912 obj_handle_t handle; /* handle to the device */
2916 /* Retrieve the next pending device ioctl request */
2917 @REQ(get_next_device_request)
2918 obj_handle_t manager; /* handle to the device manager */
2919 obj_handle_t prev; /* handle to the previous ioctl */
2920 unsigned int status; /* status of the previous ioctl */
2921 VARARG(prev_data,bytes); /* output data of the previous ioctl */
2923 obj_handle_t next; /* handle to the next ioctl */
2924 ioctl_code_t code; /* ioctl code */
2925 void* user_ptr; /* opaque ptr for the device */
2926 data_size_t in_size; /* total needed input size */
2927 data_size_t out_size; /* needed output size */
2928 VARARG(next_data,bytes); /* input data of the next ioctl */
2932 /* Make the current process a system process */
2933 @REQ(make_process_system)
2935 obj_handle_t event; /* event signaled when all user processes have exited */
2939 /* Get detailed fixed-size information about a token */
2940 @REQ(get_token_statistics)
2941 obj_handle_t handle; /* handle to the object */
2943 luid_t token_id; /* locally-unique identifier of the token */
2944 luid_t modified_id; /* locally-unique identifier of the modified version of the token */
2945 int primary; /* is the token primary or impersonation? */
2946 int impersonation_level; /* level of impersonation */
2947 int group_count; /* the number of groups the token is a member of */
2948 int privilege_count; /* the number of privileges the token has */
2952 /* Create I/O completion port */
2953 @REQ(create_completion)
2954 unsigned int access; /* desired access to a port */
2955 unsigned int attributes; /* object attributes */
2956 unsigned int concurrent; /* max number of concurrent active threads */
2957 obj_handle_t rootdir; /* root directory */
2958 VARARG(filename,string); /* port name */
2960 obj_handle_t handle; /* port handle */
2964 /* Open I/O completion port */
2965 @REQ(open_completion)
2966 unsigned int access; /* desired access to a port */
2967 unsigned int attributes; /* object attributes */
2968 obj_handle_t rootdir; /* root directory */
2969 VARARG(filename,string); /* port name */
2971 obj_handle_t handle; /* port handle */
2975 /* add completion to completion port */
2976 @REQ(add_completion)
2977 obj_handle_t handle; /* port handle */
2978 unsigned long ckey; /* completion key */
2979 unsigned long cvalue; /* completion value */
2980 unsigned long information; /* IO_STATUS_BLOCK Information */
2981 unsigned int status; /* completion result */
2985 /* get completion from completion port queue */
2986 @REQ(remove_completion)
2987 obj_handle_t handle; /* port handle */
2989 unsigned long ckey; /* completion key */
2990 unsigned long cvalue; /* completion value */
2991 unsigned long information; /* IO_STATUS_BLOCK Information */
2992 unsigned int status; /* completion result */
2996 /* get completion queue depth */
2997 @REQ(query_completion)
2998 obj_handle_t handle; /* port handle */
3000 unsigned int depth; /* completion queue depth */
3004 /* associate object with completion port */
3005 @REQ(set_completion_info)
3006 obj_handle_t handle; /* object handle */
3007 obj_handle_t chandle; /* port handle */
3008 unsigned long ckey; /* completion key */
3012 /* check for associated completion and push msg */
3013 @REQ(add_fd_completion)
3014 obj_handle_t handle; /* async' object
*/
3015 unsigned long cvalue
; /* completion value
*/
3016 unsigned int status
; /* completion status
*/
3017 unsigned long information
; /* IO_STATUS_BLOCK Information
*/