3 * Wine server protocol definition
5 * Copyright (C
) 2001 Alexandre Julliard
7 * This file is used by tools
/make_requests to build the
8 * protocol structures in include
/wine
/server_protocol.h
10 * This library is free software
; you can redistribute it and
/or
11 * modify it under the terms of the GNU Lesser General Public
12 * License as published by the Free Software Foundation
; either
13 * version
2.1 of the License
, or (at your option
) any later version.
15 * This library is distributed in the hope that it will be useful
,
16 * but WITHOUT ANY WARRANTY
; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU
18 * Lesser General Public License for more details.
20 * You should have received a copy of the GNU Lesser General Public
21 * License along with this library
; if not
, write to the Free Software
22 * Foundation
, Inc.
, 51 Franklin St
, Fifth Floor
, Boston
, MA
02110-1301, USA
25 @HEADER
/* start of C declarations
*/
34 typedef void
*obj_handle_t
;
35 typedef void
*user_handle_t
;
36 typedef unsigned short atom_t
;
37 typedef unsigned int process_id_t
;
38 typedef unsigned int thread_id_t
;
39 typedef unsigned int data_size_t
;
43 int req
; /* request code
*/
44 data_size_t request_size
; /* request variable part size
*/
45 data_size_t reply_size
; /* reply variable part maximum size
*/
50 unsigned int error
; /* error result
*/
51 data_size_t reply_size
; /* reply variable part size
*/
54 /* placeholder structure for the maximum allowed request size
*/
55 /* this is used to construct the generic_request union
*/
56 struct request_max_size
58 int pad
[16]; /* the max request size is
16 ints
*/
61 #define FIRST_USER_HANDLE
0x0020 /* first possible value for low word of user handle
*/
62 #define LAST_USER_HANDLE
0xffef /* last possible value for low word of user handle
*/
65 /* definitions of the event data depending on the event code
*/
66 struct debug_event_exception
68 EXCEPTION_RECORD record
; /* exception record
*/
69 int first
; /* first chance exception?
*/
71 struct debug_event_create_thread
73 obj_handle_t handle
; /* handle to the new thread
*/
74 void
*teb
; /* thread
teb (in debugged process address space
) */
75 void
*start
; /* thread startup routine
*/
77 struct debug_event_create_process
79 obj_handle_t file
; /* handle to the process exe file
*/
80 obj_handle_t process
; /* handle to the new process
*/
81 obj_handle_t thread
; /* handle to the new thread
*/
82 void
*base
; /* base of executable image
*/
83 int dbg_offset
; /* offset of debug info in file
*/
84 int dbg_size
; /* size of debug info
*/
85 void
*teb
; /* thread
teb (in debugged process address space
) */
86 void
*start
; /* thread startup routine
*/
87 void
*name
; /* image
name (optional
) */
88 int unicode
; /* is it Unicode?
*/
90 struct debug_event_exit
92 int exit_code
; /* thread or process exit code
*/
94 struct debug_event_load_dll
96 obj_handle_t handle
; /* file handle for the dll
*/
97 void
*base
; /* base address of the dll
*/
98 int dbg_offset
; /* offset of debug info in file
*/
99 int dbg_size
; /* size of debug info
*/
100 void
*name
; /* image
name (optional
) */
101 int unicode
; /* is it Unicode?
*/
103 struct debug_event_unload_dll
105 void
*base
; /* base address of the dll
*/
107 struct debug_event_output_string
109 void
*string
; /* string to
display (in debugged process address space
) */
110 int unicode
; /* is it Unicode?
*/
111 int length
; /* string length
*/
113 struct debug_event_rip_info
118 union debug_event_data
120 struct debug_event_exception exception
;
121 struct debug_event_create_thread create_thread
;
122 struct debug_event_create_process create_process
;
123 struct debug_event_exit exit
;
124 struct debug_event_load_dll load_dll
;
125 struct debug_event_unload_dll unload_dll
;
126 struct debug_event_output_string output_string
;
127 struct debug_event_rip_info rip_info
;
130 /* debug event data
*/
133 int code
; /* event code
*/
134 union debug_event_data info
; /* event information
*/
137 /* structure used in sending an fd from client to server
*/
140 thread_id_t tid
; /* thread id
*/
141 int fd
; /* file descriptor on client
-side
*/
144 /* structure sent by the server on the wait fifo
*/
147 void
*cookie
; /* magic cookie that was passed in select_request
*/
148 int signaled
; /* wait result
*/
151 /* structure for absolute timeouts
*/
154 int sec
; /* seconds since Unix epoch
*/
155 int usec
; /* microseconds
*/
158 /* structure returned in the list of window properties
*/
161 atom_t atom
; /* property atom
*/
162 short string
; /* was atom a string originally?
*/
163 obj_handle_t handle
; /* handle stored in property
*/
166 /* structure to specify window rectangles
*/
175 /* structure for parameters of async I
/O calls
*/
178 void
*callback
; /* client
-side callback to call upon end of async
*/
179 void
*iosb
; /* I
/O status block in client addr space
*/
180 void
*arg
; /* opaque user data to pass to callback
*/
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 abs_time_t time
; /* absolute time of expiration
*/
275 void
*arg
; /* user argument
*/
279 enum apc_type type
; /* APC_ASYNC_IO
*/
280 void (__stdcall
*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 abs_time_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 abs_time_t start_time; /* process start time */
561 abs_time_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 abs_time_t creation_time; /* thread creation time */
588 abs_time_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 abs_time_t timeout; /* absolute timeout */
741 VARARG(handles,handles); /* handles to select on */
744 #define SELECT_ALERTABLE 2
745 #define SELECT_INTERRUPTIBLE 4
746 #define SELECT_TIMEOUT 8
749 /* Create an event */
751 unsigned int access; /* wanted access rights */
752 unsigned int attributes; /* object attributes */
753 obj_handle_t rootdir; /* root directory */
754 int manual_reset; /* manual reset event */
755 int initial_state; /* initial state of the event */
756 VARARG(name,unicode_str); /* object name */
758 obj_handle_t handle; /* handle to the event */
761 /* Event operation */
763 obj_handle_t handle; /* handle to event */
764 int op; /* event operation (see below) */
766 enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT };
771 unsigned int access; /* wanted access rights */
772 unsigned int attributes; /* object attributes */
773 obj_handle_t rootdir; /* root directory */
774 VARARG(name,unicode_str); /* object name */
776 obj_handle_t handle; /* handle to the event */
782 unsigned int access; /* wanted access rights */
783 unsigned int attributes; /* object attributes */
784 obj_handle_t rootdir; /* root directory */
785 int owned; /* initially owned? */
786 VARARG(name,unicode_str); /* object name */
788 obj_handle_t handle; /* handle to the mutex */
792 /* Release a mutex */
794 obj_handle_t handle; /* handle to the mutex */
796 unsigned int prev_count; /* value of internal counter, before release */
802 unsigned int access; /* wanted access rights */
803 unsigned int attributes; /* object attributes */
804 obj_handle_t rootdir; /* root directory */
805 VARARG(name,unicode_str); /* object name */
807 obj_handle_t handle; /* handle to the mutex */
811 /* Create a semaphore */
812 @REQ(create_semaphore)
813 unsigned int access; /* wanted access rights */
814 unsigned int attributes; /* object attributes */
815 obj_handle_t rootdir; /* root directory */
816 unsigned int initial; /* initial count */
817 unsigned int max; /* maximum count */
818 VARARG(name,unicode_str); /* object name */
820 obj_handle_t handle; /* handle to the semaphore */
824 /* Release a semaphore */
825 @REQ(release_semaphore)
826 obj_handle_t handle; /* handle to the semaphore */
827 unsigned int count; /* count to add to semaphore */
829 unsigned int prev_count; /* previous semaphore count */
833 /* Open a semaphore */
835 unsigned int access; /* wanted access rights */
836 unsigned int attributes; /* object attributes */
837 obj_handle_t rootdir; /* root directory */
838 VARARG(name,unicode_str); /* object name */
840 obj_handle_t handle; /* handle to the semaphore */
846 unsigned int access; /* wanted access rights */
847 unsigned int attributes; /* object attributes */
848 unsigned int sharing; /* sharing flags */
849 int create; /* file create action */
850 unsigned int options; /* file options */
851 unsigned int attrs; /* file attributes for creation */
852 VARARG(filename,string); /* file name */
854 obj_handle_t handle; /* handle to the file */
858 /* Open a file object */
859 @REQ(open_file_object)
860 unsigned int access; /* wanted access rights */
861 unsigned int attributes; /* open attributes */
862 obj_handle_t rootdir; /* root directory */
863 unsigned int sharing; /* sharing flags */
864 unsigned int options; /* file options */
865 VARARG(filename,unicode_str); /* file name */
867 obj_handle_t handle; /* handle to the file */
871 /* Allocate a file handle for a Unix fd */
872 @REQ(alloc_file_handle)
873 unsigned int access; /* wanted access rights */
874 unsigned int attributes; /* object attributes */
875 int fd; /* file descriptor on the client side */
877 obj_handle_t handle; /* handle to the file */
881 /* Get a Unix fd to access a file */
883 obj_handle_t handle; /* handle to the file */
884 unsigned int access; /* wanted access rights */
885 int cached; /* is it cached on the client already? */
887 int type; /* file type (see below) */
888 int flags; /* file read/write flags (see below) */
892 FD_TYPE_INVALID, /* invalid file (no associated fd) */
893 FD_TYPE_FILE, /* regular file */
894 FD_TYPE_DIR, /* directory */
895 FD_TYPE_SOCKET, /* socket */
896 FD_TYPE_SERIAL, /* serial port */
897 FD_TYPE_PIPE, /* named pipe */
898 FD_TYPE_MAILSLOT, /* mailslot */
899 FD_TYPE_DEVICE, /* Windows device file */
902 #define FD_FLAG_OVERLAPPED 0x01 /* fd opened in overlapped mode */
903 #define FD_FLAG_TIMEOUT 0x02 /* read/write is synchronous */
904 #define FD_FLAG_RECV_SHUTDOWN 0x04
905 #define FD_FLAG_SEND_SHUTDOWN 0x08
906 #define FD_FLAG_AVAILABLE 0x10 /* in overlap read/write operation,
907 * only handle available data (don't wait
) */
908 #define FD_FLAG_REMOVABLE
0x20 /* is it on a removable device?
*/
910 /* Flush a file buffers
*/
912 obj_handle_t handle
; /* handle to the file
*/
914 obj_handle_t event
; /* event set when finished
*/
918 /* Lock a region of a file
*/
920 obj_handle_t handle
; /* handle to the file
*/
921 unsigned int offset_low
; /* offset of start of lock
*/
922 unsigned int offset_high
; /* offset of start of lock
*/
923 unsigned int count_low
; /* count of bytes to lock
*/
924 unsigned int count_high
; /* count of bytes to lock
*/
925 int shared
; /* shared or exclusive lock?
*/
926 int wait
; /* do we want to wait?
*/
928 obj_handle_t handle
; /* handle to wait on
*/
929 int overlapped
; /* is it an overlapped I
/O handle?
*/
933 /* Unlock a region of a file
*/
935 obj_handle_t handle
; /* handle to the file
*/
936 unsigned int offset_low
; /* offset of start of unlock
*/
937 unsigned int offset_high
; /* offset of start of unlock
*/
938 unsigned int count_low
; /* count of bytes to unlock
*/
939 unsigned int count_high
; /* count of bytes to unlock
*/
943 /* Get ready to unmount a Unix device
*/
945 obj_handle_t handle
; /* handle to a file on the device
*/
949 /* Create a socket
*/
951 unsigned int access
; /* wanted access rights
*/
952 unsigned int attributes
; /* object attributes
*/
953 int family
; /* family
, see socket manpage
*/
954 int type
; /* type
, see socket manpage
*/
955 int protocol
; /* protocol
, see socket manpage
*/
956 unsigned int flags
; /* socket flags
*/
958 obj_handle_t handle
; /* handle to the new socket
*/
962 /* Accept a socket
*/
964 obj_handle_t lhandle
; /* handle to the listening socket
*/
965 unsigned int access
; /* wanted access rights
*/
966 unsigned int attributes
; /* object attributes
*/
968 obj_handle_t handle
; /* handle to the new socket
*/
972 /* Set socket event parameters
*/
973 @
REQ(set_socket_event
)
974 obj_handle_t handle
; /* handle to the socket
*/
975 unsigned int mask
; /* event mask
*/
976 obj_handle_t event
; /* event object
*/
977 user_handle_t window
; /* window to send the message to
*/
978 unsigned int msg
; /* message to send
*/
982 /* Get socket event parameters
*/
983 @
REQ(get_socket_event
)
984 obj_handle_t handle
; /* handle to the socket
*/
985 int service
; /* clear pending?
*/
986 obj_handle_t c_event
; /* event to clear
*/
988 unsigned int mask
; /* event mask
*/
989 unsigned int pmask
; /* pending events
*/
990 unsigned int state
; /* status bits
*/
991 VARARG(errors
,ints
); /* event errors
*/
995 /* Reenable pending socket events
*/
996 @
REQ(enable_socket_event
)
997 obj_handle_t handle
; /* handle to the socket
*/
998 unsigned int mask
; /* events to re
-enable
*/
999 unsigned int sstate
; /* status bits to set
*/
1000 unsigned int cstate
; /* status bits to clear
*/
1003 @
REQ(set_socket_deferred
)
1004 obj_handle_t handle
; /* handle to the socket
*/
1005 obj_handle_t deferred
; /* handle to the socket for which
accept() is deferred
*/
1008 /* Allocate a
console (only used by a console renderer
) */
1010 unsigned int access
; /* wanted access rights
*/
1011 unsigned int attributes
; /* object attributes
*/
1012 process_id_t pid
; /* pid of process which shall be attached to the console
*/
1014 obj_handle_t handle_in
; /* handle to console input
*/
1015 obj_handle_t event
; /* handle to renderer events change notification
*/
1019 /* Free the console of the current process
*/
1024 #define CONSOLE_RENDERER_NONE_EVENT
0x00
1025 #define CONSOLE_RENDERER_TITLE_EVENT
0x01
1026 #define CONSOLE_RENDERER_ACTIVE_SB_EVENT
0x02
1027 #define CONSOLE_RENDERER_SB_RESIZE_EVENT
0x03
1028 #define CONSOLE_RENDERER_UPDATE_EVENT
0x04
1029 #define CONSOLE_RENDERER_CURSOR_POS_EVENT
0x05
1030 #define CONSOLE_RENDERER_CURSOR_GEOM_EVENT
0x06
1031 #define CONSOLE_RENDERER_DISPLAY_EVENT
0x07
1032 #define CONSOLE_RENDERER_EXIT_EVENT
0x08
1033 struct console_renderer_event
1068 /* retrieve console events for the renderer
*/
1069 @
REQ(get_console_renderer_events
)
1070 obj_handle_t handle
; /* handle to console input events
*/
1072 VARARG(data
,bytes
); /* the various console_renderer_events
*/
1076 /* Open a handle to the process console
*/
1078 obj_handle_t from
; /* 0 (resp
1) input (resp output
) of current process console
*/
1079 /* otherwise console_in handle to get active screen buffer?
*/
1080 unsigned int access
; /* wanted access rights
*/
1081 unsigned int attributes
; /* object attributes
*/
1082 int share
; /* share
mask (only for output handles
) */
1084 obj_handle_t handle
; /* handle to the console
*/
1088 /* Get the input queue wait event
*/
1089 @
REQ(get_console_wait_event
)
1091 obj_handle_t handle
;
1094 /* Get a console
mode (input or output
) */
1095 @
REQ(get_console_mode
)
1096 obj_handle_t handle
; /* handle to the console
*/
1098 int mode
; /* console mode
*/
1102 /* Set a console
mode (input or output
) */
1103 @
REQ(set_console_mode
)
1104 obj_handle_t handle
; /* handle to the console
*/
1105 int mode
; /* console mode
*/
1109 /* Set info about a
console (input only
) */
1110 @
REQ(set_console_input_info
)
1111 obj_handle_t handle
; /* handle to console input
, or
0 for process
' console */
1112 int mask; /* setting mask (see below) */
1113 obj_handle_t active_sb; /* active screen buffer */
1114 int history_mode; /* whether we duplicate lines in history */
1115 int history_size; /* number of lines in history */
1116 int edition_mode; /* index to the edition mode flavors */
1117 VARARG(title,unicode_str); /* console title */
1119 #define SET_CONSOLE_INPUT_INFO_ACTIVE_SB 0x01
1120 #define SET_CONSOLE_INPUT_INFO_TITLE 0x02
1121 #define SET_CONSOLE_INPUT_INFO_HISTORY_MODE 0x04
1122 #define SET_CONSOLE_INPUT_INFO_HISTORY_SIZE 0x08
1123 #define SET_CONSOLE_INPUT_INFO_EDITION_MODE 0x10
1126 /* Get info about a console (input only) */
1127 @REQ(get_console_input_info)
1128 obj_handle_t handle; /* handle to console input, or 0 for process' console
*/
1130 int history_mode
; /* whether we duplicate lines in history
*/
1131 int history_size
; /* number of lines in history
*/
1132 int history_index
; /* number of used lines in history
*/
1133 int edition_mode
; /* index to the edition mode flavors
*/
1134 VARARG(title
,unicode_str
); /* console title
*/
1138 /* appends a string to console
's history */
1139 @REQ(append_console_input_history)
1140 obj_handle_t handle; /* handle to console input, or 0 for process' console
*/
1141 VARARG(line
,unicode_str
); /* line to add
*/
1145 /* appends a string to console
's history */
1146 @REQ(get_console_input_history)
1147 obj_handle_t handle; /* handle to console input, or 0 for process' console
*/
1148 int index
; /* index to get line from
*/
1150 int total
; /* total length of line in Unicode chars
*/
1151 VARARG(line
,unicode_str
); /* line to add
*/
1155 /* creates a new screen buffer on process
' console */
1156 @REQ(create_console_output)
1157 obj_handle_t handle_in; /* handle to console input, or 0 for process' console
*/
1158 unsigned int access
; /* wanted access rights
*/
1159 unsigned int attributes
; /* object attributes
*/
1160 unsigned int share
; /* sharing credentials
*/
1162 obj_handle_t handle_out
; /* handle to the screen buffer
*/
1166 /* Set info about a
console (output only
) */
1167 @
REQ(set_console_output_info
)
1168 obj_handle_t handle
; /* handle to the console
*/
1169 int mask
; /* setting
mask (see below
) */
1170 short int cursor_size
; /* size of
cursor (percentage filled
) */
1171 short int cursor_visible
;/* cursor visibility flag
*/
1172 short int cursor_x
; /* position of
cursor (x
, y
) */
1174 short int width
; /* width of the screen buffer
*/
1175 short int height
; /* height of the screen buffer
*/
1176 short int attr
; /* default attribute
*/
1177 short int win_left
; /* window actually displayed by renderer
*/
1178 short int win_top
; /* the rect area is expressed withing the
*/
1179 short int win_right
; /* boundaries of the screen buffer
*/
1180 short int win_bottom
;
1181 short int max_width
; /* maximum
size (width x height
) for the window
*/
1182 short int max_height
;
1184 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_GEOM
0x01
1185 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_POS
0x02
1186 #define SET_CONSOLE_OUTPUT_INFO_SIZE
0x04
1187 #define SET_CONSOLE_OUTPUT_INFO_ATTR
0x08
1188 #define SET_CONSOLE_OUTPUT_INFO_DISPLAY_WINDOW
0x10
1189 #define SET_CONSOLE_OUTPUT_INFO_MAX_SIZE
0x20
1192 /* Get info about a
console (output only
) */
1193 @
REQ(get_console_output_info
)
1194 obj_handle_t handle
; /* handle to the console
*/
1196 short int cursor_size
; /* size of
cursor (percentage filled
) */
1197 short int cursor_visible
;/* cursor visibility flag
*/
1198 short int cursor_x
; /* position of
cursor (x
, y
) */
1200 short int width
; /* width of the screen buffer
*/
1201 short int height
; /* height of the screen buffer
*/
1202 short int attr
; /* default attribute
*/
1203 short int win_left
; /* window actually displayed by renderer
*/
1204 short int win_top
; /* the rect area is expressed withing the
*/
1205 short int win_right
; /* boundaries of the screen buffer
*/
1206 short int win_bottom
;
1207 short int max_width
; /* maximum
size (width x height
) for the window
*/
1208 short int max_height
;
1211 /* Add input records to a console input queue
*/
1212 @
REQ(write_console_input
)
1213 obj_handle_t handle
; /* handle to the console input
*/
1214 VARARG(rec
,input_records
); /* input records
*/
1216 int written
; /* number of records written
*/
1220 /* Fetch input records from a console input queue
*/
1221 @
REQ(read_console_input
)
1222 obj_handle_t handle
; /* handle to the console input
*/
1223 int flush
; /* flush the retrieved records from the queue?
*/
1225 int read
; /* number of records read
*/
1226 VARARG(rec
,input_records
); /* input records
*/
1230 /* write
data (chars and
/or attributes
) in a screen buffer
*/
1231 @
REQ(write_console_output
)
1232 obj_handle_t handle
; /* handle to the console output
*/
1233 int x
; /* position where to start writing
*/
1235 int mode
; /* char
info (see below
) */
1236 int wrap
; /* wrap around at end of line?
*/
1237 VARARG(data
,bytes
); /* info to write
*/
1239 int written
; /* number of char infos actually written
*/
1240 int width
; /* width of screen buffer
*/
1241 int height
; /* height of screen buffer
*/
1245 CHAR_INFO_MODE_TEXT
, /* characters only
*/
1246 CHAR_INFO_MODE_ATTR
, /* attributes only
*/
1247 CHAR_INFO_MODE_TEXTATTR
, /* both characters and attributes
*/
1248 CHAR_INFO_MODE_TEXTSTDATTR
/* characters but use standard attributes
*/
1252 /* fill a screen buffer with constant
data (chars and
/or attributes
) */
1253 @
REQ(fill_console_output
)
1254 obj_handle_t handle
; /* handle to the console output
*/
1255 int x
; /* position where to start writing
*/
1257 int mode
; /* char info mode
*/
1258 int count
; /* number to write
*/
1259 int wrap
; /* wrap around at end of line?
*/
1260 char_info_t data
; /* data to write
*/
1262 int written
; /* number of char infos actually written
*/
1266 /* read
data (chars and
/or attributes
) from a screen buffer
*/
1267 @
REQ(read_console_output
)
1268 obj_handle_t handle
; /* handle to the console output
*/
1269 int x
; /* position (x
,y
) where to start reading
*/
1271 int mode
; /* char info mode
*/
1272 int wrap
; /* wrap around at end of line?
*/
1274 int width
; /* width of screen buffer
*/
1275 int height
; /* height of screen buffer
*/
1280 /* move a
rect (of data
) in screen buffer content
*/
1281 @
REQ(move_console_output
)
1282 obj_handle_t handle
; /* handle to the console output
*/
1283 short int x_src
; /* position (x
, y
) of rect to start moving from
*/
1285 short int x_dst
; /* position (x
, y
) of rect to move to
*/
1287 short int w
; /* size of the
rect (width
, height
) to move
*/
1292 /* Sends a signal to a process group
*/
1293 @
REQ(send_console_signal
)
1294 int signal
; /* the signal to send
*/
1295 process_id_t group_id
; /* the group to send the signal to
*/
1299 /* enable directory change notifications
*/
1300 @
REQ(read_directory_changes
)
1301 unsigned int filter
; /* notification filter
*/
1302 obj_handle_t handle
; /* handle to the directory
*/
1303 int subtree
; /* watch the subtree?
*/
1304 int want_data
; /* flag indicating whether change data should be collected
*/
1305 async_data_t async
; /* async I
/O parameters
*/
1310 obj_handle_t handle
;
1312 int action
; /* type of change
*/
1313 VARARG(name
,string
); /* name of directory entry that changed
*/
1317 /* Create a file mapping
*/
1318 @
REQ(create_mapping
)
1319 unsigned int access
; /* wanted access rights
*/
1320 unsigned int attributes
; /* object attributes
*/
1321 obj_handle_t rootdir
; /* root directory
*/
1322 int size_high
; /* mapping size
*/
1323 int size_low
; /* mapping size
*/
1324 int protect
; /* protection
flags (see below
) */
1325 obj_handle_t file_handle
; /* file handle
*/
1326 VARARG(name
,unicode_str
); /* object name
*/
1328 obj_handle_t handle
; /* handle to the mapping
*/
1330 /* protection flags
*/
1331 #define VPROT_READ
0x01
1332 #define VPROT_WRITE
0x02
1333 #define VPROT_EXEC
0x04
1334 #define VPROT_WRITECOPY
0x08
1335 #define VPROT_GUARD
0x10
1336 #define VPROT_NOCACHE
0x20
1337 #define VPROT_COMMITTED
0x40
1338 #define VPROT_IMAGE
0x80
1341 /* Open a mapping
*/
1343 unsigned int access
; /* wanted access rights
*/
1344 unsigned int attributes
; /* object attributes
*/
1345 obj_handle_t rootdir
; /* root directory
*/
1346 VARARG(name
,unicode_str
); /* object name
*/
1348 obj_handle_t handle
; /* handle to the mapping
*/
1352 /* Get information about a file mapping
*/
1353 @
REQ(get_mapping_info
)
1354 obj_handle_t handle
; /* handle to the mapping
*/
1356 int size_high
; /* mapping size
*/
1357 int size_low
; /* mapping size
*/
1358 int protect
; /* protection flags
*/
1359 int header_size
; /* header
size (for VPROT_IMAGE mapping
) */
1360 void
* base
; /* default base
addr (for VPROT_IMAGE mapping
) */
1361 obj_handle_t mapping
; /* duplicate mapping handle unless removable
*/
1362 obj_handle_t shared_file
; /* shared mapping file handle
*/
1363 int shared_size
; /* shared mapping size
*/
1367 #define SNAP_HEAPLIST
0x00000001
1368 #define SNAP_PROCESS
0x00000002
1369 #define SNAP_THREAD
0x00000004
1370 #define SNAP_MODULE
0x00000008
1371 /* Create a snapshot
*/
1372 @
REQ(create_snapshot
)
1373 unsigned int attributes
; /* object attributes
*/
1374 int flags
; /* snapshot
flags (SNAP_*)
*/
1375 process_id_t pid
; /* process id
*/
1377 obj_handle_t handle
; /* handle to the snapshot
*/
1381 /* Get the next process from a snapshot
*/
1383 obj_handle_t handle
; /* handle to the snapshot
*/
1384 int reset
; /* reset snapshot position?
*/
1386 int count
; /* process usage count
*/
1387 process_id_t pid
; /* process id
*/
1388 process_id_t ppid
; /* parent process id
*/
1389 void
* heap
; /* heap base
*/
1390 void
* module
; /* main module
*/
1391 int threads
; /* number of threads
*/
1392 int priority
; /* process priority
*/
1393 int handles
; /* number of handles
*/
1394 VARARG(filename
,unicode_str
); /* file name of main exe
*/
1398 /* Get the next thread from a snapshot
*/
1400 obj_handle_t handle
; /* handle to the snapshot
*/
1401 int reset
; /* reset snapshot position?
*/
1403 int count
; /* thread usage count
*/
1404 process_id_t pid
; /* process id
*/
1405 thread_id_t tid
; /* thread id
*/
1406 int base_pri
; /* base priority
*/
1407 int delta_pri
; /* delta priority
*/
1411 /* Get the next module from a snapshot
*/
1413 obj_handle_t handle
; /* handle to the snapshot
*/
1414 int reset
; /* reset snapshot position?
*/
1416 process_id_t pid
; /* process id
*/
1417 void
* base
; /* module base address
*/
1418 size_t size
; /* module size
*/
1419 VARARG(filename
,unicode_str
); /* file name of module
*/
1423 /* Wait for a debug event
*/
1424 @
REQ(wait_debug_event
)
1425 int get_handle
; /* should we alloc a handle for waiting?
*/
1427 process_id_t pid
; /* process id
*/
1428 thread_id_t tid
; /* thread id
*/
1429 obj_handle_t wait
; /* wait handle if no event ready
*/
1430 VARARG(event
,debug_event
); /* debug event data
*/
1434 /* Queue an exception event
*/
1435 @
REQ(queue_exception_event
)
1436 int first
; /* first chance exception?
*/
1437 VARARG(record
,exc_event
); /* thread context followed by exception record
*/
1439 obj_handle_t handle
; /* handle to the queued event
*/
1443 /* Retrieve the status of an exception event
*/
1444 @
REQ(get_exception_status
)
1445 obj_handle_t handle
; /* handle to the queued event
*/
1447 VARARG(context
,context
); /* modified thread context
*/
1451 /* Send an output string to the debugger
*/
1452 @
REQ(output_debug_string
)
1453 void
* string
; /* string to
display (in debugged process address space
) */
1454 int unicode
; /* is it Unicode?
*/
1455 int length
; /* string length
*/
1459 /* Continue a debug event
*/
1460 @
REQ(continue_debug_event
)
1461 process_id_t pid
; /* process id to continue
*/
1462 thread_id_t tid
; /* thread id to continue
*/
1463 int status
; /* continuation status
*/
1467 /* Start
/stop debugging an existing process
*/
1469 process_id_t pid
; /* id of the process to debug
*/
1470 int attach
; /* 1=attaching
/ 0=detaching from the process
*/
1474 /* Simulate a breakpoint in a process
*/
1476 obj_handle_t handle
; /* process handle
*/
1478 int self
; /* was it the caller itself?
*/
1482 /* Set debugger kill on exit flag
*/
1483 @
REQ(set_debugger_kill_on_exit
)
1484 int kill_on_exit
; /* 0=detach
/1=kill debuggee when debugger dies
*/
1488 /* Read data from a process address space
*/
1489 @
REQ(read_process_memory
)
1490 obj_handle_t handle
; /* process handle
*/
1491 void
* addr
; /* addr to read from
*/
1493 VARARG(data
,bytes
); /* result data
*/
1497 /* Write data to a process address space
*/
1498 @
REQ(write_process_memory
)
1499 obj_handle_t handle
; /* process handle
*/
1500 void
* addr
; /* addr to write to
*/
1501 VARARG(data
,bytes
); /* data to write
*/
1505 /* Create a registry key
*/
1507 obj_handle_t parent
; /* handle to the parent key
*/
1508 unsigned int access
; /* desired access rights
*/
1509 unsigned int attributes
; /* object attributes
*/
1510 unsigned int options
; /* creation options
*/
1511 time_t modif
; /* last modification time
*/
1512 data_size_t namelen
; /* length of key name in bytes
*/
1513 VARARG(name
,unicode_str
,namelen
); /* key name
*/
1514 VARARG(class
,unicode_str
); /* class name
*/
1516 obj_handle_t hkey
; /* handle to the created key
*/
1517 int created
; /* has it been newly created?
*/
1520 /* Open a registry key
*/
1522 obj_handle_t parent
; /* handle to the parent key
*/
1523 unsigned int access
; /* desired access rights
*/
1524 unsigned int attributes
; /* object attributes
*/
1525 VARARG(name
,unicode_str
); /* key name
*/
1527 obj_handle_t hkey
; /* handle to the open key
*/
1531 /* Delete a registry key
*/
1533 obj_handle_t hkey
; /* handle to the key
*/
1537 /* Flush a registry key
*/
1539 obj_handle_t hkey
; /* handle to the key
*/
1543 /* Enumerate registry subkeys
*/
1545 obj_handle_t hkey
; /* handle to registry key
*/
1546 int index
; /* index of
subkey (or
-1 for current key
) */
1547 int info_class
; /* requested information class
*/
1549 int subkeys
; /* number of subkeys
*/
1550 int max_subkey
; /* longest subkey name
*/
1551 int max_class
; /* longest class name
*/
1552 int values
; /* number of values
*/
1553 int max_value
; /* longest value name
*/
1554 int max_data
; /* longest value data
*/
1555 time_t modif
; /* last modification time
*/
1556 data_size_t total
; /* total length needed for full name and class
*/
1557 data_size_t namelen
; /* length of key name in bytes
*/
1558 VARARG(name
,unicode_str
,namelen
); /* key name
*/
1559 VARARG(class
,unicode_str
); /* class name
*/
1563 /* Set a value of a registry key
*/
1565 obj_handle_t hkey
; /* handle to registry key
*/
1566 int type
; /* value type
*/
1567 data_size_t namelen
; /* length of value name in bytes
*/
1568 VARARG(name
,unicode_str
,namelen
); /* value name
*/
1569 VARARG(data
,bytes
); /* value data
*/
1573 /* Retrieve the value of a registry key
*/
1575 obj_handle_t hkey
; /* handle to registry key
*/
1576 VARARG(name
,unicode_str
); /* value name
*/
1578 int type
; /* value type
*/
1579 data_size_t total
; /* total length needed for data
*/
1580 VARARG(data
,bytes
); /* value data
*/
1584 /* Enumerate a value of a registry key
*/
1585 @
REQ(enum_key_value
)
1586 obj_handle_t hkey
; /* handle to registry key
*/
1587 int index
; /* value index
*/
1588 int info_class
; /* requested information class
*/
1590 int type
; /* value type
*/
1591 data_size_t total
; /* total length needed for full name and data
*/
1592 data_size_t namelen
; /* length of value name in bytes
*/
1593 VARARG(name
,unicode_str
,namelen
); /* value name
*/
1594 VARARG(data
,bytes
); /* value data
*/
1598 /* Delete a value of a registry key
*/
1599 @
REQ(delete_key_value
)
1600 obj_handle_t hkey
; /* handle to registry key
*/
1601 VARARG(name
,unicode_str
); /* value name
*/
1605 /* Load a registry branch from a file
*/
1607 obj_handle_t hkey
; /* root key to load to
*/
1608 obj_handle_t file
; /* file to load from
*/
1609 VARARG(name
,unicode_str
); /* subkey name
*/
1613 /* UnLoad a registry branch from a file
*/
1614 @
REQ(unload_registry
)
1615 obj_handle_t hkey
; /* root key to unload to
*/
1619 /* Save a registry branch to a file
*/
1621 obj_handle_t hkey
; /* key to save
*/
1622 obj_handle_t file
; /* file to save to
*/
1626 /* Add a registry key change notification
*/
1627 @
REQ(set_registry_notification
)
1628 obj_handle_t hkey
; /* key to watch for changes
*/
1629 obj_handle_t event
; /* event to set
*/
1630 int subtree
; /* should we watch the whole subtree?
*/
1631 unsigned int filter
; /* things to watch
*/
1635 /* Create a waitable timer
*/
1637 unsigned int access
; /* wanted access rights
*/
1638 unsigned int attributes
; /* object attributes
*/
1639 obj_handle_t rootdir
; /* root directory
*/
1640 int manual
; /* manual reset
*/
1641 VARARG(name
,unicode_str
); /* object name
*/
1643 obj_handle_t handle
; /* handle to the timer
*/
1647 /* Open a waitable timer
*/
1649 unsigned int access
; /* wanted access rights
*/
1650 unsigned int attributes
; /* object attributes
*/
1651 obj_handle_t rootdir
; /* root directory
*/
1652 VARARG(name
,unicode_str
); /* object name
*/
1654 obj_handle_t handle
; /* handle to the timer
*/
1657 /* Set a waitable timer
*/
1659 obj_handle_t handle
; /* handle to the timer
*/
1660 abs_time_t expire
; /* next expiration absolute time
*/
1661 int period
; /* timer period in ms
*/
1662 void
* callback
; /* callback function
*/
1663 void
* arg
; /* callback argument
*/
1665 int signaled
; /* was the timer signaled before this call ?
*/
1668 /* Cancel a waitable timer
*/
1670 obj_handle_t handle
; /* handle to the timer
*/
1672 int signaled
; /* was the timer signaled before this calltime ?
*/
1675 /* Get information on a waitable timer
*/
1676 @
REQ(get_timer_info
)
1677 obj_handle_t handle
; /* handle to the timer
*/
1679 abs_time_t when
; /* absolute time when the timer next expires
*/
1680 int signaled
; /* is the timer signaled?
*/
1684 /* Retrieve the current context of a thread
*/
1685 @
REQ(get_thread_context
)
1686 obj_handle_t handle
; /* thread handle
*/
1687 unsigned int flags
; /* context flags
*/
1688 int suspend
; /* if getting context during suspend
*/
1690 int self
; /* was it a handle to the current thread?
*/
1691 VARARG(context
,context
); /* thread context
*/
1695 /* Set the current context of a thread
*/
1696 @
REQ(set_thread_context
)
1697 obj_handle_t handle
; /* thread handle
*/
1698 unsigned int flags
; /* context flags
*/
1699 int suspend
; /* if setting context during suspend
*/
1700 VARARG(context
,context
); /* thread context
*/
1702 int self
; /* was it a handle to the current thread?
*/
1706 /* Fetch a selector entry for a thread
*/
1707 @
REQ(get_selector_entry
)
1708 obj_handle_t handle
; /* thread handle
*/
1709 int entry
; /* LDT entry
*/
1711 unsigned int base
; /* selector base
*/
1712 unsigned int limit
; /* selector limit
*/
1713 unsigned char flags
; /* selector flags
*/
1719 obj_handle_t table
; /* which table to add atom to
*/
1720 VARARG(name
,unicode_str
); /* atom name
*/
1722 atom_t atom
; /* resulting atom
*/
1726 /* Delete an atom
*/
1728 obj_handle_t table
; /* which table to delete atom from
*/
1729 atom_t atom
; /* atom handle
*/
1735 obj_handle_t table
; /* which table to find atom from
*/
1736 VARARG(name
,unicode_str
); /* atom name
*/
1738 atom_t atom
; /* atom handle
*/
1742 /* Get information about an atom
*/
1743 @
REQ(get_atom_information
)
1744 obj_handle_t table
; /* which table to find atom from
*/
1745 atom_t atom
; /* atom handle
*/
1747 int count
; /* atom lock count
*/
1748 int pinned
; /* whether the atom has been pinned
*/
1749 data_size_t total
; /* actual length of atom name
*/
1750 VARARG(name
,unicode_str
); /* atom name
*/
1754 /* Set information about an atom
*/
1755 @
REQ(set_atom_information
)
1756 obj_handle_t table
; /* which table to find atom from
*/
1757 atom_t atom
; /* atom handle
*/
1758 int pinned
; /* whether to bump atom information
*/
1762 /* Empty an atom table
*/
1763 @
REQ(empty_atom_table
)
1764 obj_handle_t table
; /* which table to find atom from
*/
1765 int if_pinned
; /* whether to delete pinned atoms
*/
1769 /* Init an atom table
*/
1770 @
REQ(init_atom_table
)
1771 int entries
; /* number of
entries (only for local
) */
1773 obj_handle_t table
; /* handle to the atom table
*/
1777 /* Get the message queue of the current thread
*/
1780 obj_handle_t handle
; /* handle to the queue
*/
1784 /* Set the current message queue wakeup mask
*/
1785 @
REQ(set_queue_mask
)
1786 unsigned int wake_mask
; /* wakeup bits mask
*/
1787 unsigned int changed_mask
; /* changed bits mask
*/
1788 int skip_wait
; /* will we skip waiting if signaled?
*/
1790 unsigned int wake_bits
; /* current wake bits
*/
1791 unsigned int changed_bits
; /* current changed bits
*/
1795 /* Get the current message queue status
*/
1796 @
REQ(get_queue_status
)
1797 int clear
; /* should we clear the change bits?
*/
1799 unsigned int wake_bits
; /* wake bits
*/
1800 unsigned int changed_bits
; /* changed bits since last time
*/
1804 /* Retrieve the process idle event
*/
1805 @
REQ(get_process_idle_event
)
1806 obj_handle_t handle
; /* process handle
*/
1808 obj_handle_t event
; /* handle to idle event
*/
1812 /* Send a message to a thread queue
*/
1814 thread_id_t id
; /* thread id
*/
1815 int type
; /* message
type (see below
) */
1816 int flags
; /* message
flags (see below
) */
1817 user_handle_t win
; /* window handle
*/
1818 unsigned int msg
; /* message code
*/
1819 unsigned long wparam
; /* parameters
*/
1820 unsigned long lparam
; /* parameters
*/
1821 int timeout
; /* timeout for reply
*/
1822 VARARG(data
,message_data
); /* message data for sent messages
*/
1825 @
REQ(post_quit_message
)
1826 int exit_code
; /* exit code to return
*/
1831 MSG_ASCII
, /* Ascii
message (from SendMessageA
) */
1832 MSG_UNICODE
, /* Unicode
message (from SendMessageW
) */
1833 MSG_NOTIFY
, /* notify
message (from SendNotifyMessageW
), always Unicode
*/
1834 MSG_CALLBACK
, /* callback
message (from SendMessageCallbackW
), always Unicode
*/
1835 MSG_CALLBACK_RESULT
,/* result of a callback message
*/
1836 MSG_OTHER_PROCESS
, /* sent from other process
, may include vararg data
, always Unicode
*/
1837 MSG_POSTED
, /* posted
message (from PostMessageW
), always Unicode
*/
1838 MSG_HARDWARE
, /* hardware message
*/
1839 MSG_WINEVENT
/* winevent message
*/
1841 #define SEND_MSG_ABORT_IF_HUNG
0x01
1844 /* Send a hardware message to a thread queue
*/
1845 @
REQ(send_hardware_message
)
1846 thread_id_t id
; /* thread id
*/
1847 user_handle_t win
; /* window handle
*/
1848 unsigned int msg
; /* message code
*/
1849 unsigned int time
; /* message time
*/
1850 unsigned long wparam
; /* parameters
*/
1851 unsigned long lparam
; /* parameters
*/
1852 unsigned long info
; /* extra info
*/
1853 int x
; /* x position
*/
1854 int y
; /* y position
*/
1858 /* Get a message from the current queue
*/
1860 unsigned int flags
; /* PM_
* flags
*/
1861 user_handle_t get_win
; /* window handle to get
*/
1862 unsigned int get_first
; /* first message code to get
*/
1863 unsigned int get_last
; /* last message code to get
*/
1864 unsigned int hw_id
; /* id of the previous hardware
message (or
0) */
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 int 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 int 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 /* Create a named pipe
*/
1974 @
REQ(create_named_pipe
)
1975 unsigned int access
;
1976 unsigned int attributes
; /* object attributes
*/
1977 obj_handle_t rootdir
; /* root directory
*/
1978 unsigned int options
;
1980 unsigned int maxinstances
;
1981 unsigned int outsize
;
1982 unsigned int insize
;
1983 unsigned int timeout
;
1984 VARARG(name
,unicode_str
); /* pipe name
*/
1986 obj_handle_t handle
; /* handle to the pipe
*/
1989 /* flags in create_named_pipe and get_named_pipe_info
*/
1990 #define NAMED_PIPE_MESSAGE_STREAM_WRITE
0x0001
1991 #define NAMED_PIPE_MESSAGE_STREAM_READ
0x0002
1992 #define NAMED_PIPE_NONBLOCKING_MODE
0x0004
1993 #define NAMED_PIPE_SERVER_END
0x8000
1995 /* Connect to a named pipe
*/
1996 @
REQ(connect_named_pipe
)
1997 obj_handle_t handle
;
1998 async_data_t async
; /* async I
/O parameters
*/
2002 /* Wait for a named pipe
*/
2003 @
REQ(wait_named_pipe
)
2004 obj_handle_t handle
;
2005 async_data_t async
; /* async I
/O parameters
*/
2006 unsigned int timeout
;
2007 VARARG(name
,unicode_str
); /* pipe name
*/
2011 /* Disconnect a named pipe
*/
2012 @
REQ(disconnect_named_pipe
)
2013 obj_handle_t handle
;
2017 @
REQ(get_named_pipe_info
)
2018 obj_handle_t handle
;
2021 unsigned int maxinstances
;
2022 unsigned int instances
;
2023 unsigned int outsize
;
2024 unsigned int insize
;
2028 /* Create a window
*/
2030 user_handle_t parent
; /* parent window
*/
2031 user_handle_t owner
; /* owner window
*/
2032 atom_t atom
; /* class atom
*/
2033 void
* instance
; /* module instance
*/
2035 user_handle_t handle
; /* created window
*/
2036 user_handle_t parent
; /* full handle of parent
*/
2037 user_handle_t owner
; /* full handle of owner
*/
2038 int extra
; /* number of extra bytes
*/
2039 void
* class_ptr
; /* pointer to class in client address space
*/
2043 /* Destroy a window
*/
2044 @
REQ(destroy_window
)
2045 user_handle_t handle
; /* handle to the window
*/
2049 /* Retrieve the desktop window for the current thread
*/
2050 @
REQ(get_desktop_window
)
2051 int force
; /* force creation if it doesn
't exist */
2053 user_handle_t handle; /* handle to the desktop window */
2057 /* Set a window owner */
2058 @REQ(set_window_owner)
2059 user_handle_t handle; /* handle to the window */
2060 user_handle_t owner; /* new owner */
2062 user_handle_t full_owner; /* full handle of new owner */
2063 user_handle_t prev_owner; /* full handle of previous owner */
2067 /* Get information from a window handle */
2068 @REQ(get_window_info)
2069 user_handle_t handle; /* handle to the window */
2071 user_handle_t full_handle; /* full 32-bit handle */
2072 user_handle_t last_active; /* last active popup */
2073 process_id_t pid; /* process owning the window */
2074 thread_id_t tid; /* thread owning the window */
2075 atom_t atom; /* class atom */
2076 int is_unicode; /* ANSI or unicode */
2080 /* Set some information in a window */
2081 @REQ(set_window_info)
2082 unsigned int flags; /* flags for fields to set (see below) */
2083 user_handle_t handle; /* handle to the window */
2084 unsigned int style; /* window style */
2085 unsigned int ex_style; /* window extended style */
2086 unsigned int id; /* window id */
2087 int is_unicode; /* ANSI or unicode */
2088 void* instance; /* creator instance */
2089 unsigned long user_data; /* user-specific data */
2090 int extra_offset; /* offset to set in extra bytes */
2091 data_size_t extra_size; /* size to set in extra bytes */
2092 unsigned long extra_value; /* value to set in extra bytes */
2094 unsigned int old_style; /* old window style */
2095 unsigned int old_ex_style; /* old window extended style */
2096 unsigned int old_id; /* old window id */
2097 void* old_instance; /* old creator instance */
2098 unsigned long old_user_data; /* old user-specific data */
2099 unsigned long old_extra_value; /* old value in extra bytes */
2101 #define SET_WIN_STYLE 0x01
2102 #define SET_WIN_EXSTYLE 0x02
2103 #define SET_WIN_ID 0x04
2104 #define SET_WIN_INSTANCE 0x08
2105 #define SET_WIN_USERDATA 0x10
2106 #define SET_WIN_EXTRA 0x20
2107 #define SET_WIN_UNICODE 0x40
2110 /* Set the parent of a window */
2112 user_handle_t handle; /* handle to the window */
2113 user_handle_t parent; /* handle to the parent */
2115 user_handle_t old_parent; /* old parent window */
2116 user_handle_t full_parent; /* full handle of new parent */
2120 /* Get a list of the window parents, up to the root of the tree */
2121 @REQ(get_window_parents)
2122 user_handle_t handle; /* handle to the window */
2124 int count; /* total count of parents */
2125 VARARG(parents,user_handles); /* parent handles */
2129 /* Get a list of the window children */
2130 @REQ(get_window_children)
2131 user_handle_t parent; /* parent window */
2132 atom_t atom; /* class atom for the listed children */
2133 thread_id_t tid; /* thread owning the listed children */
2135 int count; /* total count of children */
2136 VARARG(children,user_handles); /* children handles */
2140 /* Get a list of the window children that contain a given point */
2141 @REQ(get_window_children_from_point)
2142 user_handle_t parent; /* parent window */
2143 int x; /* point in parent coordinates */
2146 int count; /* total count of children */
2147 VARARG(children,user_handles); /* children handles */
2151 /* Get window tree information from a window handle */
2152 @REQ(get_window_tree)
2153 user_handle_t handle; /* handle to the window */
2155 user_handle_t parent; /* parent window */
2156 user_handle_t owner; /* owner window */
2157 user_handle_t next_sibling; /* next sibling in Z-order */
2158 user_handle_t prev_sibling; /* prev sibling in Z-order */
2159 user_handle_t first_sibling; /* first sibling in Z-order */
2160 user_handle_t last_sibling; /* last sibling in Z-order */
2161 user_handle_t first_child; /* first child */
2162 user_handle_t last_child; /* last child */
2165 /* Set the position and Z order of a window */
2166 @REQ(set_window_pos)
2167 unsigned int flags; /* SWP_* flags */
2168 user_handle_t handle; /* handle to the window */
2169 user_handle_t previous; /* previous window in Z order */
2170 rectangle_t window; /* window rectangle */
2171 rectangle_t client; /* client rectangle */
2172 VARARG(valid,rectangles); /* valid rectangles from WM_NCCALCSIZE */
2174 unsigned int new_style; /* new window style */
2178 /* Get the window and client rectangles of a window */
2179 @REQ(get_window_rectangles)
2180 user_handle_t handle; /* handle to the window */
2182 rectangle_t window; /* window rectangle */
2183 rectangle_t visible; /* visible part of the window rectangle */
2184 rectangle_t client; /* client rectangle */
2188 /* Get the window text */
2189 @REQ(get_window_text)
2190 user_handle_t handle; /* handle to the window */
2192 VARARG(text,unicode_str); /* window text */
2196 /* Set the window text */
2197 @REQ(set_window_text)
2198 user_handle_t handle; /* handle to the window */
2199 VARARG(text,unicode_str); /* window text */
2203 /* Get the coordinates offset between two windows */
2204 @REQ(get_windows_offset)
2205 user_handle_t from; /* handle to the first window */
2206 user_handle_t to; /* handle to the second window */
2208 int x; /* x coordinate offset */
2209 int y; /* y coordinate offset */
2213 /* Get the visible region of a window */
2214 @REQ(get_visible_region)
2215 user_handle_t window; /* handle to the window */
2216 unsigned int flags; /* DCX flags */
2218 user_handle_t top_win; /* top window to clip against */
2219 rectangle_t top_rect; /* top window visible rect with screen coords */
2220 rectangle_t win_rect; /* window rect in screen coords */
2221 data_size_t total_size; /* total size of the resulting region */
2222 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2226 /* Get the window region */
2227 @REQ(get_window_region)
2228 user_handle_t window; /* handle to the window */
2230 data_size_t total_size; /* total size of the resulting region */
2231 VARARG(region,rectangles); /* list of rectangles for the region */
2235 /* Set the window region */
2236 @REQ(set_window_region)
2237 user_handle_t window; /* handle to the window */
2238 int redraw; /* redraw the window? */
2239 VARARG(region,rectangles); /* list of rectangles for the region */
2243 /* Get the window update region */
2244 @REQ(get_update_region)
2245 user_handle_t window; /* handle to the window */
2246 user_handle_t from_child; /* child to start searching from */
2247 unsigned int flags; /* update flags (see below) */
2249 user_handle_t child; /* child to repaint (or window itself) */
2250 unsigned int flags; /* resulting update flags (see below) */
2251 data_size_t total_size; /* total size of the resulting region */
2252 VARARG(region,rectangles); /* list of rectangles for the region */
2254 #define UPDATE_NONCLIENT 0x01 /* get region for repainting non-client area */
2255 #define UPDATE_ERASE 0x02 /* get region for erasing client area */
2256 #define UPDATE_PAINT 0x04 /* get region for painting client area */
2257 #define UPDATE_INTERNALPAINT 0x08 /* get region if internal paint is pending */
2258 #define UPDATE_ALLCHILDREN 0x10 /* force repaint of all children */
2259 #define UPDATE_NOCHILDREN 0x20 /* don't try to repaint any children
*/
2260 #define UPDATE_NOREGION
0x40 /* don
't return a region, only the flags */
2263 /* Update the z order of a window so that a given rectangle is fully visible */
2264 @REQ(update_window_zorder)
2265 user_handle_t window; /* handle to the window */
2266 rectangle_t rect; /* rectangle that must be visible */
2270 /* Mark parts of a window as needing a redraw */
2272 user_handle_t window; /* handle to the window */
2273 unsigned int flags; /* RDW_* flags */
2274 VARARG(region,rectangles); /* list of rectangles for the region */
2278 /* Set a window property */
2279 @REQ(set_window_property)
2280 user_handle_t window; /* handle to the window */
2281 atom_t atom; /* property atom (if no name specified) */
2282 obj_handle_t handle; /* handle to store */
2283 VARARG(name,unicode_str); /* property name */
2287 /* Remove a window property */
2288 @REQ(remove_window_property)
2289 user_handle_t window; /* handle to the window */
2290 atom_t atom; /* property atom (if no name specified) */
2291 VARARG(name,unicode_str); /* property name */
2293 obj_handle_t handle; /* handle stored in property */
2297 /* Get a window property */
2298 @REQ(get_window_property)
2299 user_handle_t window; /* handle to the window */
2300 atom_t atom; /* property atom (if no name specified) */
2301 VARARG(name,unicode_str); /* property name */
2303 obj_handle_t handle; /* handle stored in property */
2307 /* Get the list of properties of a window */
2308 @REQ(get_window_properties)
2309 user_handle_t window; /* handle to the window */
2311 int total; /* total number of properties */
2312 VARARG(props,properties); /* list of properties */
2316 /* Create a window station */
2317 @REQ(create_winstation)
2318 unsigned int flags; /* window station flags */
2319 unsigned int access; /* wanted access rights */
2320 unsigned int attributes; /* object attributes */
2321 VARARG(name,unicode_str); /* object name */
2323 obj_handle_t handle; /* handle to the window station */
2327 /* Open a handle to a window station */
2328 @REQ(open_winstation)
2329 unsigned int access; /* wanted access rights */
2330 unsigned int attributes; /* object attributes */
2331 VARARG(name,unicode_str); /* object name */
2333 obj_handle_t handle; /* handle to the window station */
2337 /* Close a window station */
2338 @REQ(close_winstation)
2339 obj_handle_t handle; /* handle to the window station */
2343 /* Get the process current window station */
2344 @REQ(get_process_winstation)
2346 obj_handle_t handle; /* handle to the window station */
2350 /* Set the process current window station */
2351 @REQ(set_process_winstation)
2352 obj_handle_t handle; /* handle to the window station */
2356 /* Create a desktop */
2357 @REQ(create_desktop)
2358 unsigned int flags; /* desktop flags */
2359 unsigned int access; /* wanted access rights */
2360 unsigned int attributes; /* object attributes */
2361 VARARG(name,unicode_str); /* object name */
2363 obj_handle_t handle; /* handle to the desktop */
2367 /* Open a handle to a desktop */
2369 unsigned int flags; /* desktop flags */
2370 unsigned int access; /* wanted access rights */
2371 unsigned int attributes; /* object attributes */
2372 VARARG(name,unicode_str); /* object name */
2374 obj_handle_t handle; /* handle to the desktop */
2378 /* Close a desktop */
2380 obj_handle_t handle; /* handle to the desktop */
2384 /* Get the thread current desktop */
2385 @REQ(get_thread_desktop)
2386 thread_id_t tid; /* thread id */
2388 obj_handle_t handle; /* handle to the desktop */
2392 /* Set the thread current desktop */
2393 @REQ(set_thread_desktop)
2394 obj_handle_t handle; /* handle to the desktop */
2398 /* Get/set information about a user object (window station or desktop) */
2399 @REQ(set_user_object_info)
2400 obj_handle_t handle; /* handle to the object */
2401 unsigned int flags; /* information to set */
2402 unsigned int obj_flags; /* new object flags */
2404 int is_desktop; /* is object a desktop? */
2405 unsigned int old_obj_flags; /* old object flags */
2406 VARARG(name,unicode_str); /* object name */
2408 #define SET_USER_OBJECT_FLAGS 1
2411 /* Attach (or detach) thread inputs */
2412 @REQ(attach_thread_input)
2413 thread_id_t tid_from; /* thread to be attached */
2414 thread_id_t tid_to; /* thread to which tid_from should be attached */
2415 int attach; /* is it an attach? */
2419 /* Get input data for a given thread */
2420 @REQ(get_thread_input)
2421 thread_id_t tid; /* id of thread */
2423 user_handle_t focus; /* handle to the focus window */
2424 user_handle_t capture; /* handle to the capture window */
2425 user_handle_t active; /* handle to the active window */
2426 user_handle_t foreground; /* handle to the global foreground window */
2427 user_handle_t menu_owner; /* handle to the menu owner */
2428 user_handle_t move_size; /* handle to the moving/resizing window */
2429 user_handle_t caret; /* handle to the caret window */
2430 rectangle_t rect; /* caret rectangle */
2434 /* Get the time of the last input event */
2435 @REQ(get_last_input_time)
2441 /* Retrieve queue keyboard state for a given thread */
2443 thread_id_t tid; /* id of thread */
2444 int key; /* optional key code or -1 */
2446 unsigned char state; /* state of specified key */
2447 VARARG(keystate,bytes); /* state array for all the keys */
2450 /* Set queue keyboard state for a given thread */
2452 thread_id_t tid; /* id of thread */
2453 VARARG(keystate,bytes); /* state array for all the keys */
2456 /* Set the system foreground window */
2457 @REQ(set_foreground_window)
2458 user_handle_t handle; /* handle to the foreground window */
2460 user_handle_t previous; /* handle to the previous foreground window */
2461 int send_msg_old; /* whether we have to send a msg to the old window */
2462 int send_msg_new; /* whether we have to send a msg to the new window */
2465 /* Set the current thread focus window */
2466 @REQ(set_focus_window)
2467 user_handle_t handle; /* handle to the focus window */
2469 user_handle_t previous; /* handle to the previous focus window */
2472 /* Set the current thread active window */
2473 @REQ(set_active_window)
2474 user_handle_t handle; /* handle to the active window */
2476 user_handle_t previous; /* handle to the previous active window */
2479 /* Set the current thread capture window */
2480 @REQ(set_capture_window)
2481 user_handle_t handle; /* handle to the capture window */
2482 unsigned int flags; /* capture flags (see below) */
2484 user_handle_t previous; /* handle to the previous capture window */
2485 user_handle_t full_handle; /* full 32-bit handle of new capture window */
2487 #define CAPTURE_MENU 0x01 /* capture is for a menu */
2488 #define CAPTURE_MOVESIZE 0x02 /* capture is for moving/resizing */
2491 /* Set the current thread caret window */
2492 @REQ(set_caret_window)
2493 user_handle_t handle; /* handle to the caret window */
2494 int width; /* caret width */
2495 int height; /* caret height */
2497 user_handle_t previous; /* handle to the previous caret window */
2498 rectangle_t old_rect; /* previous caret rectangle */
2499 int old_hide; /* previous hide count */
2500 int old_state; /* previous caret state (1=on, 0=off) */
2504 /* Set the current thread caret information */
2505 @REQ(set_caret_info)
2506 unsigned int flags; /* caret flags (see below) */
2507 user_handle_t handle; /* handle to the caret window */
2508 int x; /* caret x position */
2509 int y; /* caret y position */
2510 int hide; /* increment for hide count (can be negative to show it) */
2511 int state; /* caret state (1=on, 0=off, -1=toggle current state) */
2513 user_handle_t full_handle; /* handle to the current caret window */
2514 rectangle_t old_rect; /* previous caret rectangle */
2515 int old_hide; /* previous hide count */
2516 int old_state; /* previous caret state (1=on, 0=off) */
2518 #define SET_CARET_POS 0x01 /* set the caret position from x,y */
2519 #define SET_CARET_HIDE 0x02 /* increment the caret hide count */
2520 #define SET_CARET_STATE 0x04 /* set the caret on/off state */
2523 /* Set a window hook */
2525 int id; /* id of the hook */
2526 process_id_t pid; /* id of process to set the hook into */
2527 thread_id_t tid; /* id of thread to set the hook into */
2531 void* proc; /* hook procedure */
2532 int unicode; /* is it a unicode hook? */
2533 VARARG(module,unicode_str); /* module name */
2535 user_handle_t handle; /* handle to the hook */
2536 unsigned int active_hooks; /* active hooks bitmap */
2540 /* Remove a window hook */
2542 user_handle_t handle; /* handle to the hook */
2543 int id; /* id of the hook if handle is 0 */
2544 void* proc; /* hook procedure if handle is 0 */
2546 unsigned int active_hooks; /* active hooks bitmap */
2550 /* Start calling a hook chain */
2551 @REQ(start_hook_chain)
2552 int id; /* id of the hook */
2553 int event; /* signalled event */
2554 user_handle_t window; /* handle to the event window */
2555 int object_id; /* object id for out of context winevent */
2556 int child_id; /* child id for out of context winevent */
2558 user_handle_t handle; /* handle to the next hook */
2559 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2560 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2561 void* proc; /* hook procedure */
2562 int unicode; /* is it a unicode hook? */
2563 unsigned int active_hooks; /* active hooks bitmap */
2564 VARARG(module,unicode_str); /* module name */
2568 /* Finished calling a hook chain */
2569 @REQ(finish_hook_chain)
2570 int id; /* id of the hook */
2574 /* Get the hook information */
2576 user_handle_t handle; /* handle to the current hook */
2577 int get_next; /* do we want info about current or next hook? */
2578 int event; /* signalled event */
2579 user_handle_t window; /* handle to the event window */
2580 int object_id; /* object id for out of context winevent */
2581 int child_id; /* child id for out of context winevent */
2583 user_handle_t handle; /* handle to the hook */
2584 int id; /* id of the hook */
2585 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2586 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2587 void* proc; /* hook procedure */
2588 int unicode; /* is it a unicode hook? */
2589 VARARG(module,unicode_str); /* module name */
2593 /* Create a window class */
2595 int local; /* is it a local class? */
2596 atom_t atom; /* class atom */
2597 unsigned int style; /* class style */
2598 void* instance; /* module instance */
2599 int extra; /* number of extra class bytes */
2600 int win_extra; /* number of window extra bytes */
2601 void* client_ptr; /* pointer to class in client address space */
2605 /* Destroy a window class */
2607 atom_t atom; /* class atom */
2608 void* instance; /* module instance */
2610 void* client_ptr; /* pointer to class in client address space */
2614 /* Set some information in a class */
2615 @REQ(set_class_info)
2616 user_handle_t window; /* handle to the window */
2617 unsigned int flags; /* flags for info to set (see below) */
2618 atom_t atom; /* class atom */
2619 unsigned int style; /* class style */
2620 int win_extra; /* number of window extra bytes */
2621 void* instance; /* module instance */
2622 int extra_offset; /* offset to set in extra bytes */
2623 data_size_t extra_size; /* size to set in extra bytes */
2624 unsigned long extra_value; /* value to set in extra bytes */
2626 atom_t old_atom; /* previous class atom */
2627 unsigned int old_style; /* previous class style */
2628 int old_extra; /* previous number of class extra bytes */
2629 int old_win_extra; /* previous number of window extra bytes */
2630 void* old_instance; /* previous module instance */
2631 unsigned long old_extra_value; /* old value in extra bytes */
2633 #define SET_CLASS_ATOM 0x0001
2634 #define SET_CLASS_STYLE 0x0002
2635 #define SET_CLASS_WINEXTRA 0x0004
2636 #define SET_CLASS_INSTANCE 0x0008
2637 #define SET_CLASS_EXTRA 0x0010
2640 /* Set/get clipboard information */
2641 @REQ(set_clipboard_info)
2642 unsigned int flags; /* flags for fields to set (see below) */
2643 user_handle_t clipboard; /* clipboard window */
2644 user_handle_t owner; /* clipboard owner */
2645 user_handle_t viewer; /* first clipboard viewer */
2646 unsigned int seqno; /* change sequence number */
2648 unsigned int flags; /* status flags (see below) */
2649 user_handle_t old_clipboard; /* old clipboard window */
2650 user_handle_t old_owner; /* old clipboard owner */
2651 user_handle_t old_viewer; /* old clipboard viewer */
2652 unsigned int seqno; /* current sequence number */
2655 #define SET_CB_OPEN 0x001
2656 #define SET_CB_OWNER 0x002
2657 #define SET_CB_VIEWER 0x004
2658 #define SET_CB_SEQNO 0x008
2659 #define SET_CB_RELOWNER 0x010
2660 #define SET_CB_CLOSE 0x020
2661 #define CB_OPEN 0x040
2662 #define CB_OWNER 0x080
2663 #define CB_PROCESS 0x100
2666 /* Open a security token */
2668 obj_handle_t handle; /* handle to the thread or process */
2669 unsigned int access; /* access rights to the new token */
2670 unsigned int attributes;/* object attributes */
2671 unsigned int flags; /* flags (see below) */
2673 obj_handle_t token; /* handle to the token */
2675 #define OPEN_TOKEN_THREAD 1
2676 #define OPEN_TOKEN_AS_SELF 2
2679 /* Set/get the global windows */
2680 @REQ(set_global_windows)
2681 unsigned int flags; /* flags for fields to set (see below) */
2682 user_handle_t shell_window; /* handle to the new shell window */
2683 user_handle_t shell_listview; /* handle to the new shell listview window */
2684 user_handle_t progman_window; /* handle to the new program manager window */
2685 user_handle_t taskman_window; /* handle to the new task manager window */
2687 user_handle_t old_shell_window; /* handle to the shell window */
2688 user_handle_t old_shell_listview; /* handle to the shell listview window */
2689 user_handle_t old_progman_window; /* handle to the new program manager window */
2690 user_handle_t old_taskman_window; /* handle to the new task manager window */
2692 #define SET_GLOBAL_SHELL_WINDOWS 0x01 /* set both main shell and listview windows */
2693 #define SET_GLOBAL_PROGMAN_WINDOW 0x02
2694 #define SET_GLOBAL_TASKMAN_WINDOW 0x04
2696 /* Adjust the privileges held by a token */
2697 @REQ(adjust_token_privileges)
2698 obj_handle_t handle; /* handle to the token */
2699 int disable_all; /* disable all privileges? */
2700 int get_modified_state; /* get modified privileges? */
2701 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to enable/disable/remove */
2703 unsigned int len; /* total length in bytes required to store token privileges */
2704 VARARG(privileges,LUID_AND_ATTRIBUTES); /* modified privileges */
2707 /* Retrieves the set of privileges held by or available to a token */
2708 @REQ(get_token_privileges)
2709 obj_handle_t handle; /* handle to the token */
2711 unsigned int len; /* total length in bytes required to store token privileges */
2712 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
2715 /* Check the token has the required privileges */
2716 @REQ(check_token_privileges)
2717 obj_handle_t handle; /* handle to the token */
2718 int all_required; /* are all the privileges required for the check to succeed? */
2719 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to check */
2721 int has_privileges; /* does the token have the required privileges? */
2722 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
2725 @REQ(duplicate_token)
2726 obj_handle_t handle; /* handle to the token to duplicate */
2727 unsigned int access; /* access rights to the new token */
2728 unsigned int attributes; /* object attributes */
2729 int primary; /* is the new token to be a primary one? */
2730 int impersonation_level; /* impersonation level of the new token */
2732 obj_handle_t new_handle; /* duplicated handle */
2736 obj_handle_t handle; /* handle to the token */
2737 unsigned int desired_access; /* desired access to the object */
2738 unsigned int mapping_read; /* mapping from generic read to specific rights */
2739 unsigned int mapping_write; /* mapping from generic write to specific rights */
2740 unsigned int mapping_execute; /* mapping from generic execute to specific rights */
2741 unsigned int mapping_all; /* mapping from generic all to specific rights */
2742 VARARG(sd,security_descriptor); /* security descriptor to check */
2744 unsigned int access_granted; /* access rights actually granted */
2745 unsigned int access_status; /* was access granted? */
2746 unsigned int privileges_len; /* length needed to store privileges */
2747 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges used during access check */
2750 @REQ(get_token_user)
2751 obj_handle_t handle; /* handle to the token */
2753 data_size_t user_len; /* length needed to store user */
2754 VARARG(user,SID); /* sid of the user the token represents */
2757 @REQ(get_token_groups)
2758 obj_handle_t handle; /* handle to the token */
2760 data_size_t user_len; /* length needed to store user */
2761 VARARG(user,token_groups); /* groups the token's user belongs to
*/
2764 @
REQ(set_security_object
)
2765 obj_handle_t handle
; /* handle to the object
*/
2766 unsigned int security_info
; /* which parts of security descriptor to set
*/
2767 VARARG(sd
,security_descriptor
); /* security descriptor to set
*/
2770 /* Create a mailslot
*/
2771 @
REQ(create_mailslot
)
2772 unsigned int access
; /* wanted access rights
*/
2773 unsigned int attributes
; /* object attributes
*/
2774 obj_handle_t rootdir
; /* root directory
*/
2775 unsigned int max_msgsize
;
2777 VARARG(name
,unicode_str
); /* mailslot name
*/
2779 obj_handle_t handle
; /* handle to the mailslot
*/
2783 /* Set mailslot information
*/
2784 @
REQ(set_mailslot_info
)
2785 obj_handle_t handle
; /* handle to the mailslot
*/
2789 unsigned int max_msgsize
;
2792 #define MAILSLOT_SET_READ_TIMEOUT
1
2795 /* Create a directory object
*/
2796 @
REQ(create_directory
)
2797 unsigned int access
; /* access flags
*/
2798 unsigned int attributes
; /* object attributes
*/
2799 obj_handle_t rootdir
; /* root directory
*/
2800 VARARG(directory_name
,unicode_str
); /* Directory name
*/
2802 obj_handle_t handle
; /* handle to the directory
*/
2806 /* Open a directory object
*/
2807 @
REQ(open_directory
)
2808 unsigned int access
; /* access flags
*/
2809 unsigned int attributes
; /* object attributes
*/
2810 obj_handle_t rootdir
; /* root directory
*/
2811 VARARG(directory_name
,unicode_str
); /* Directory name
*/
2813 obj_handle_t handle
; /* handle to the directory
*/
2817 /* Create a symbolic link object
*/
2818 @
REQ(create_symlink
)
2819 unsigned int access
; /* access flags
*/
2820 unsigned int attributes
; /* object attributes
*/
2821 obj_handle_t rootdir
; /* root directory
*/
2822 data_size_t name_len
; /* length of the symlink name in bytes
*/
2823 VARARG(name
,unicode_str
,name_len
); /* symlink name
*/
2824 VARARG(target_name
,unicode_str
); /* target name
*/
2826 obj_handle_t handle
; /* handle to the symlink
*/
2830 /* Open a symbolic link object
*/
2832 unsigned int access
; /* access flags
*/
2833 unsigned int attributes
; /* object attributes
*/
2834 obj_handle_t rootdir
; /* root directory
*/
2835 VARARG(name
,unicode_str
); /* symlink name
*/
2837 obj_handle_t handle
; /* handle to the symlink
*/
2841 /* Query a symbolic link object
*/
2843 obj_handle_t handle
; /* handle to the symlink
*/
2845 VARARG(target_name
,unicode_str
); /* target name
*/
2849 /* Query basic object information
*/
2850 @
REQ(get_object_info
)
2851 obj_handle_t handle
; /* handle to the object
*/
2853 unsigned int access
; /* granted access mask
*/
2854 unsigned int ref_count
; /* object ref count
*/
2857 /* Query the impersonation level of an impersonation token
*/
2858 @
REQ(get_token_impersonation_level
)
2859 obj_handle_t handle
; /* handle to the object
*/
2861 int impersonation_level
; /* impersonation level of the impersonation token
*/
2864 /* Allocate a locally
-unique identifier
*/
2865 @
REQ(allocate_locally_unique_id
)