3 * Wine server protocol definition
5 * Copyright (C
) 2001 Alexandre Julliard
7 * This file is used by tools
/make_requests to build the
8 * protocol structures in include
/wine
/server_protocol.h
10 * This library is free software
; you can redistribute it and
/or
11 * modify it under the terms of the GNU Lesser General Public
12 * License as published by the Free Software Foundation
; either
13 * version
2.1 of the License
, or (at your option
) any later version.
15 * This library is distributed in the hope that it will be useful
,
16 * but WITHOUT ANY WARRANTY
; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU
18 * Lesser General Public License for more details.
20 * You should have received a copy of the GNU Lesser General Public
21 * License along with this library
; if not
, write to the Free Software
22 * Foundation
, Inc.
, 51 Franklin St
, Fifth Floor
, Boston
, MA
02110-1301, USA
25 @HEADER
/* start of C declarations
*/
34 typedef void
*obj_handle_t
;
35 typedef void
*user_handle_t
;
36 typedef unsigned short atom_t
;
37 typedef unsigned int process_id_t
;
38 typedef unsigned int thread_id_t
;
39 typedef unsigned int data_size_t
;
43 int req
; /* request code
*/
44 data_size_t request_size
; /* request variable part size
*/
45 data_size_t reply_size
; /* reply variable part maximum size
*/
50 unsigned int error
; /* error result
*/
51 data_size_t reply_size
; /* reply variable part size
*/
54 /* placeholder structure for the maximum allowed request size
*/
55 /* this is used to construct the generic_request union
*/
56 struct request_max_size
58 int pad
[16]; /* the max request size is
16 ints
*/
61 #define FIRST_USER_HANDLE
0x0020 /* first possible value for low word of user handle
*/
62 #define LAST_USER_HANDLE
0xffef /* last possible value for low word of user handle
*/
65 /* definitions of the event data depending on the event code
*/
66 struct debug_event_exception
68 EXCEPTION_RECORD record
; /* exception record
*/
69 int first
; /* first chance exception?
*/
71 struct debug_event_create_thread
73 obj_handle_t handle
; /* handle to the new thread
*/
74 void
*teb
; /* thread
teb (in debugged process address space
) */
75 void
*start
; /* thread startup routine
*/
77 struct debug_event_create_process
79 obj_handle_t file
; /* handle to the process exe file
*/
80 obj_handle_t process
; /* handle to the new process
*/
81 obj_handle_t thread
; /* handle to the new thread
*/
82 void
*base
; /* base of executable image
*/
83 int dbg_offset
; /* offset of debug info in file
*/
84 int dbg_size
; /* size of debug info
*/
85 void
*teb
; /* thread
teb (in debugged process address space
) */
86 void
*start
; /* thread startup routine
*/
87 void
*name
; /* image
name (optional
) */
88 int unicode
; /* is it Unicode?
*/
90 struct debug_event_exit
92 int exit_code
; /* thread or process exit code
*/
94 struct debug_event_load_dll
96 obj_handle_t handle
; /* file handle for the dll
*/
97 void
*base
; /* base address of the dll
*/
98 int dbg_offset
; /* offset of debug info in file
*/
99 int dbg_size
; /* size of debug info
*/
100 void
*name
; /* image
name (optional
) */
101 int unicode
; /* is it Unicode?
*/
103 struct debug_event_unload_dll
105 void
*base
; /* base address of the dll
*/
107 struct debug_event_output_string
109 void
*string
; /* string to
display (in debugged process address space
) */
110 int unicode
; /* is it Unicode?
*/
111 int length
; /* string length
*/
113 struct debug_event_rip_info
118 union debug_event_data
120 struct debug_event_exception exception
;
121 struct debug_event_create_thread create_thread
;
122 struct debug_event_create_process create_process
;
123 struct debug_event_exit exit
;
124 struct debug_event_load_dll load_dll
;
125 struct debug_event_unload_dll unload_dll
;
126 struct debug_event_output_string output_string
;
127 struct debug_event_rip_info rip_info
;
130 /* debug event data
*/
133 int code
; /* event code
*/
134 union debug_event_data info
; /* event information
*/
137 /* structure used in sending an fd from client to server
*/
140 thread_id_t tid
; /* thread id
*/
141 int fd
; /* file descriptor on client
-side
*/
144 /* structure sent by the server on the wait fifo
*/
147 void
*cookie
; /* magic cookie that was passed in select_request
*/
148 int signaled
; /* wait result
*/
151 /* structure for absolute timeouts
*/
154 int sec
; /* seconds since Unix epoch
*/
155 int usec
; /* microseconds
*/
158 /* structure returned in the list of window properties
*/
161 atom_t atom
; /* property atom
*/
162 short string
; /* was atom a string originally?
*/
163 obj_handle_t handle
; /* handle stored in property
*/
166 /* structure to specify window rectangles
*/
175 /* structures for extra message data
*/
177 struct callback_msg_data
179 void
*callback
; /* callback function
*/
180 unsigned long data
; /* user data for callback
*/
181 unsigned long result
; /* message result
*/
184 struct winevent_msg_data
186 user_handle_t hook
; /* hook handle
*/
187 thread_id_t tid
; /* thread id
*/
188 void
*hook_proc
; /* hook proc address
*/
189 /* followed by module name if any
*/
194 unsigned char bytes
[1]; /* raw data for sent messages
*/
195 struct callback_msg_data callback
;
196 struct winevent_msg_data winevent
;
199 /* structure for console char
/attribute info
*/
208 unsigned int low_part
;
212 #define MAX_ACL_LEN
65535
214 struct security_descriptor
216 unsigned int control
; /* SE_ flags
*/
217 data_size_t owner_len
;
218 data_size_t group_len
;
219 data_size_t sacl_len
;
220 data_size_t dacl_len
;
221 /* VARARGS(owner
,SID
); */
222 /* VARARGS(group
,SID
); */
223 /* VARARGS(sacl
,ACL
); */
224 /* VARARGS(dacl
,ACL
); */
230 /* unsigned int attributes
[count
]; */
231 /* VARARGS(sids
,SID
); */
257 enum apc_type type
; /* APC_USER
*/
258 void (__stdcall
*func
)(unsigned long
,unsigned long
,unsigned long
);
259 unsigned long args
[3]; /* arguments for user function
*/
263 enum apc_type type
; /* APC_TIMER
*/
264 void (__stdcall
*func
)(void
*, unsigned int
, unsigned int
);
265 abs_time_t time
; /* absolute time of expiration
*/
266 void
*arg
; /* user argument
*/
270 enum apc_type type
; /* APC_ASYNC_IO
*/
271 void (__stdcall
*func
)(void
*, void
*, unsigned int
);
272 void
*user
; /* user pointer
*/
273 void
*sb
; /* status block
*/
274 unsigned int status
; /* I
/O status
*/
278 enum apc_type type
; /* APC_VIRTUAL_ALLOC
*/
279 void
*addr
; /* requested address
*/
280 unsigned long size
; /* allocation size
*/
281 unsigned int zero_bits
; /* allocation alignment
*/
282 unsigned int op_type
; /* type of operation
*/
283 unsigned int prot
; /* memory protection flags
*/
287 enum apc_type type
; /* APC_VIRTUAL_FREE
*/
288 void
*addr
; /* requested address
*/
289 unsigned long size
; /* allocation size
*/
290 unsigned int op_type
; /* type of operation
*/
294 enum apc_type type
; /* APC_VIRTUAL_QUERY
*/
295 const void
*addr
; /* requested address
*/
299 enum apc_type type
; /* APC_VIRTUAL_PROTECT
*/
300 void
*addr
; /* requested address
*/
301 unsigned long size
; /* requested address
*/
302 unsigned int prot
; /* new protection flags
*/
306 enum apc_type type
; /* APC_VIRTUAL_FLUSH
*/
307 const void
*addr
; /* requested address
*/
308 unsigned long size
; /* requested address
*/
312 enum apc_type type
; /* APC_VIRTUAL_LOCK
*/
313 void
*addr
; /* requested address
*/
314 unsigned long size
; /* requested address
*/
318 enum apc_type type
; /* APC_VIRTUAL_UNLOCK
*/
319 void
*addr
; /* requested address
*/
320 unsigned long size
; /* requested address
*/
324 enum apc_type type
; /* APC_MAP_VIEW
*/
325 obj_handle_t handle
; /* mapping handle
*/
326 void
*addr
; /* requested address
*/
327 unsigned long size
; /* allocation size
*/
328 unsigned int offset_low
;/* file offset
*/
329 unsigned int offset_high
;
330 unsigned int zero_bits
; /* allocation alignment
*/
331 unsigned int alloc_type
;/* allocation type
*/
332 unsigned int prot
; /* memory protection flags
*/
336 enum apc_type type
; /* APC_UNMAP_VIEW
*/
337 void
*addr
; /* view address
*/
341 enum apc_type type
; /* APC_CREATE_THREAD
*/
342 void (__stdcall
*func
)(void*)
; /* start function
*/
343 void
*arg
; /* argument for start function
*/
344 unsigned long reserve
; /* reserve size for thread stack
*/
345 unsigned long commit
; /* commit size for thread stack
*/
346 int suspend
; /* suspended thread?
*/
355 enum apc_type type
; /* APC_VIRTUAL_ALLOC
*/
356 unsigned int status
; /* status returned by call
*/
357 void
*addr
; /* resulting address
*/
358 unsigned long size
; /* resulting size
*/
362 enum apc_type type
; /* APC_VIRTUAL_FREE
*/
363 unsigned int status
; /* status returned by call
*/
364 void
*addr
; /* resulting address
*/
365 unsigned long size
; /* resulting size
*/
369 enum apc_type type
; /* APC_VIRTUAL_QUERY
*/
370 unsigned int status
; /* status returned by call
*/
371 void
*base
; /* resulting base address
*/
372 void
*alloc_base
;/* resulting allocation base
*/
373 unsigned long size
; /* resulting region size
*/
374 unsigned int state
; /* resulting region state
*/
375 unsigned int prot
; /* resulting region protection
*/
376 unsigned int alloc_prot
;/* resulting allocation protection
*/
377 unsigned int alloc_type
;/* resulting region allocation type
*/
381 enum apc_type type
; /* APC_VIRTUAL_PROTECT
*/
382 unsigned int status
; /* status returned by call
*/
383 void
*addr
; /* resulting address
*/
384 unsigned long size
; /* resulting size
*/
385 unsigned int prot
; /* old protection flags
*/
389 enum apc_type type
; /* APC_VIRTUAL_FLUSH
*/
390 unsigned int status
; /* status returned by call
*/
391 const void
*addr
; /* resulting address
*/
392 unsigned long size
; /* resulting size
*/
396 enum apc_type type
; /* APC_VIRTUAL_LOCK
*/
397 unsigned int status
; /* status returned by call
*/
398 void
*addr
; /* resulting address
*/
399 unsigned long size
; /* resulting size
*/
403 enum apc_type type
; /* APC_VIRTUAL_UNLOCK
*/
404 unsigned int status
; /* status returned by call
*/
405 void
*addr
; /* resulting address
*/
406 unsigned long size
; /* resulting size
*/
410 enum apc_type type
; /* APC_MAP_VIEW
*/
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_MAP_VIEW
*/
418 unsigned int status
; /* status returned by call
*/
422 enum apc_type type
; /* APC_CREATE_THREAD
*/
423 unsigned int status
; /* status returned by call
*/
424 thread_id_t tid
; /* thread id
*/
425 obj_handle_t handle
; /* handle to new thread
*/
429 /****************************************************************/
430 /* Request declarations
*/
432 /* Create a new process from the context of the parent
*/
434 int inherit_all
; /* inherit all handles from parent
*/
435 unsigned int create_flags
; /* creation flags
*/
436 int socket_fd
; /* file descriptor for process socket
*/
437 obj_handle_t exe_file
; /* file handle for main exe
*/
438 obj_handle_t hstdin
; /* handle for stdin
*/
439 obj_handle_t hstdout
; /* handle for stdout
*/
440 obj_handle_t hstderr
; /* handle for stderr
*/
441 unsigned int process_access
; /* access rights for process object
*/
442 unsigned int process_attr
; /* attributes for process object
*/
443 unsigned int thread_access
; /* access rights for thread object
*/
444 unsigned int thread_attr
; /* attributes for thread object
*/
445 VARARG(info
,startup_info
); /* startup information
*/
446 VARARG(env
,unicode_str
); /* environment for new process
*/
448 obj_handle_t info
; /* new process info handle
*/
449 process_id_t pid
; /* process id
*/
450 obj_handle_t phandle
; /* process
handle (in the current process
) */
451 thread_id_t tid
; /* thread id
*/
452 obj_handle_t thandle
; /* thread
handle (in the current process
) */
456 /* Retrieve information about a newly started process
*/
457 @
REQ(get_new_process_info
)
458 obj_handle_t info
; /* info handle returned from new_process_request
*/
460 int success
; /* did the process start successfully?
*/
461 int exit_code
; /* process exit code if failed
*/
465 /* Create a new thread from the context of the parent
*/
467 unsigned int access
; /* wanted access rights
*/
468 unsigned int attributes
; /* object attributes
*/
469 int suspend
; /* new thread should be suspended on creation
*/
470 int request_fd
; /* fd for request pipe
*/
472 thread_id_t tid
; /* thread id
*/
473 obj_handle_t handle
; /* thread
handle (in the current process
) */
477 /* Retrieve the new process startup info
*/
478 @
REQ(get_startup_info
)
480 obj_handle_t exe_file
; /* file handle for main exe
*/
481 obj_handle_t hstdin
; /* handle for stdin
*/
482 obj_handle_t hstdout
; /* handle for stdout
*/
483 obj_handle_t hstderr
; /* handle for stderr
*/
484 VARARG(info
,startup_info
); /* startup information
*/
485 VARARG(env
,unicode_str
); /* environment
*/
489 /* Signal the end of the process initialization
*/
490 @
REQ(init_process_done
)
491 void
* module
; /* main module base address
*/
492 void
* entry
; /* process entry point
*/
493 int gui
; /* is it a GUI process?
*/
497 /* Initialize a thread
; called from the child after
fork()/clone() */
499 int unix_pid
; /* Unix pid of new thread
*/
500 int unix_tid
; /* Unix tid of new thread
*/
501 int debug_level
; /* new debug level
*/
502 void
* teb
; /* TEB of new
thread (in thread address space
) */
503 void
* peb
; /* address of
PEB (in thread address space
) */
504 void
* entry
; /* thread entry
point (in thread address space
) */
505 void
* ldt_copy
; /* address of LDT
copy (in thread address space
) */
506 int reply_fd
; /* fd for reply pipe
*/
507 int wait_fd
; /* fd for blocking calls pipe
*/
509 process_id_t pid
; /* process id of the new thread
's process */
510 thread_id_t tid; /* thread id of the new thread */
511 data_size_t info_size; /* total size of startup info */
512 abs_time_t server_start; /* server start time */
513 int version; /* protocol version */
517 /* Terminate a process */
518 @REQ(terminate_process)
519 obj_handle_t handle; /* process handle to terminate */
520 int exit_code; /* process exit code */
522 int self; /* suicide? */
526 /* Terminate a thread */
527 @REQ(terminate_thread)
528 obj_handle_t handle; /* thread handle to terminate */
529 int exit_code; /* thread exit code */
531 int self; /* suicide? */
532 int last; /* last thread in this process? */
536 /* Retrieve information about a process */
537 @REQ(get_process_info)
538 obj_handle_t handle; /* process handle */
540 process_id_t pid; /* server process id */
541 process_id_t ppid; /* server process id of parent */
542 int exit_code; /* process exit code */
543 int priority; /* priority class */
544 int affinity; /* process affinity mask */
545 void* peb; /* PEB address in process address space */
546 abs_time_t start_time; /* process start time */
547 abs_time_t end_time; /* process end time */
551 /* Set a process informations */
552 @REQ(set_process_info)
553 obj_handle_t handle; /* process handle */
554 int mask; /* setting mask (see below) */
555 int priority; /* priority class */
556 int affinity; /* affinity mask */
558 #define SET_PROCESS_INFO_PRIORITY 0x01
559 #define SET_PROCESS_INFO_AFFINITY 0x02
562 /* Retrieve information about a thread */
563 @REQ(get_thread_info)
564 obj_handle_t handle; /* thread handle */
565 thread_id_t tid_in; /* thread id (optional) */
567 process_id_t pid; /* server process id */
568 thread_id_t tid; /* server thread id */
569 void* teb; /* thread teb pointer */
570 int exit_code; /* thread exit code */
571 int priority; /* thread priority level */
572 int affinity; /* thread affinity mask */
573 abs_time_t creation_time; /* thread creation time */
574 abs_time_t exit_time; /* thread exit time */
575 int last; /* last thread in process */
579 /* Set a thread informations */
580 @REQ(set_thread_info)
581 obj_handle_t handle; /* thread handle */
582 int mask; /* setting mask (see below) */
583 int priority; /* priority class */
584 int affinity; /* affinity mask */
585 obj_handle_t token; /* impersonation token */
587 #define SET_THREAD_INFO_PRIORITY 0x01
588 #define SET_THREAD_INFO_AFFINITY 0x02
589 #define SET_THREAD_INFO_TOKEN 0x04
592 /* Retrieve information about a module */
594 obj_handle_t handle; /* process handle */
595 void* base_address; /* base address of module */
597 size_t size; /* module size */
599 VARARG(filename,unicode_str); /* file name of module */
603 /* Suspend a thread */
605 obj_handle_t handle; /* thread handle */
607 int count; /* new suspend count */
611 /* Resume a thread */
613 obj_handle_t handle; /* thread handle */
615 int count; /* new suspend count */
619 /* Notify the server that a dll has been loaded */
621 obj_handle_t handle; /* file handle */
622 void* base; /* base address */
623 size_t size; /* dll size */
624 int dbg_offset; /* debug info offset */
625 int dbg_size; /* debug info size */
626 void* name; /* ptr to ptr to name (in process addr space) */
627 VARARG(filename,unicode_str); /* file name of dll */
631 /* Notify the server that a dll is being unloaded */
633 void* base; /* base address */
637 /* Queue an APC for a thread or process */
639 obj_handle_t thread; /* thread handle */
640 obj_handle_t process; /* process handle */
641 apc_call_t call; /* call arguments */
643 obj_handle_t handle; /* APC handle */
644 int self; /* run APC in caller itself? */
648 /* Get next APC to call */
650 int alertable; /* is thread alertable? */
651 obj_handle_t prev; /* handle to previous APC */
652 apc_result_t result; /* result of previous APC */
654 obj_handle_t handle; /* handle to APC */
655 apc_call_t call; /* call arguments */
659 /* Get the result of an APC call */
661 obj_handle_t handle; /* handle to the APC */
663 apc_result_t result; /* result of the APC */
667 /* Close a handle for the current process */
669 obj_handle_t handle; /* handle to close */
673 /* Set a handle information */
674 @REQ(set_handle_info)
675 obj_handle_t handle; /* handle we are interested in */
676 int flags; /* new handle flags */
677 int mask; /* mask for flags to set */
679 int old_flags; /* old flag value */
683 /* Duplicate a handle */
685 obj_handle_t src_process; /* src process handle */
686 obj_handle_t src_handle; /* src handle to duplicate */
687 obj_handle_t dst_process; /* dst process handle */
688 unsigned int access; /* wanted access rights */
689 unsigned int attributes; /* object attributes */
690 unsigned int options; /* duplicate options (see below) */
692 obj_handle_t handle; /* duplicated handle in dst process */
693 int self; /* is the source the current process? */
694 int closed; /* whether the source handle has been closed */
696 #define DUP_HANDLE_CLOSE_SOURCE DUPLICATE_CLOSE_SOURCE
697 #define DUP_HANDLE_SAME_ACCESS DUPLICATE_SAME_ACCESS
698 #define DUP_HANDLE_MAKE_GLOBAL 0x80000000 /* Not a Windows flag */
701 /* Open a handle to a process */
703 process_id_t pid; /* process id to open */
704 unsigned int access; /* wanted access rights */
705 unsigned int attributes; /* object attributes */
707 obj_handle_t handle; /* handle to the process */
711 /* Open a handle to a thread */
713 thread_id_t tid; /* thread id to open */
714 unsigned int access; /* wanted access rights */
715 unsigned int attributes; /* object attributes */
717 obj_handle_t handle; /* handle to the thread */
721 /* Wait for handles */
723 int flags; /* wait flags (see below) */
724 void* cookie; /* magic cookie to return to client */
725 obj_handle_t signal; /* object to signal (0 if none) */
726 abs_time_t timeout; /* absolute timeout */
727 VARARG(handles,handles); /* handles to select on */
730 #define SELECT_ALERTABLE 2
731 #define SELECT_INTERRUPTIBLE 4
732 #define SELECT_TIMEOUT 8
735 /* Create an event */
737 unsigned int access; /* wanted access rights */
738 unsigned int attributes; /* object attributes */
739 obj_handle_t rootdir; /* root directory */
740 int manual_reset; /* manual reset event */
741 int initial_state; /* initial state of the event */
742 VARARG(name,unicode_str); /* object name */
744 obj_handle_t handle; /* handle to the event */
747 /* Event operation */
749 obj_handle_t handle; /* handle to event */
750 int op; /* event operation (see below) */
752 enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT };
757 unsigned int access; /* wanted access rights */
758 unsigned int attributes; /* object attributes */
759 obj_handle_t rootdir; /* root directory */
760 VARARG(name,unicode_str); /* object name */
762 obj_handle_t handle; /* handle to the event */
768 unsigned int access; /* wanted access rights */
769 unsigned int attributes; /* object attributes */
770 obj_handle_t rootdir; /* root directory */
771 int owned; /* initially owned? */
772 VARARG(name,unicode_str); /* object name */
774 obj_handle_t handle; /* handle to the mutex */
778 /* Release a mutex */
780 obj_handle_t handle; /* handle to the mutex */
782 unsigned int prev_count; /* value of internal counter, before release */
788 unsigned int access; /* wanted access rights */
789 unsigned int attributes; /* object attributes */
790 obj_handle_t rootdir; /* root directory */
791 VARARG(name,unicode_str); /* object name */
793 obj_handle_t handle; /* handle to the mutex */
797 /* Create a semaphore */
798 @REQ(create_semaphore)
799 unsigned int access; /* wanted access rights */
800 unsigned int attributes; /* object attributes */
801 obj_handle_t rootdir; /* root directory */
802 unsigned int initial; /* initial count */
803 unsigned int max; /* maximum count */
804 VARARG(name,unicode_str); /* object name */
806 obj_handle_t handle; /* handle to the semaphore */
810 /* Release a semaphore */
811 @REQ(release_semaphore)
812 obj_handle_t handle; /* handle to the semaphore */
813 unsigned int count; /* count to add to semaphore */
815 unsigned int prev_count; /* previous semaphore count */
819 /* Open a semaphore */
821 unsigned int access; /* wanted access rights */
822 unsigned int attributes; /* object attributes */
823 obj_handle_t rootdir; /* root directory */
824 VARARG(name,unicode_str); /* object name */
826 obj_handle_t handle; /* handle to the semaphore */
832 unsigned int access; /* wanted access rights */
833 unsigned int attributes; /* object attributes */
834 unsigned int sharing; /* sharing flags */
835 int create; /* file create action */
836 unsigned int options; /* file options */
837 unsigned int attrs; /* file attributes for creation */
838 VARARG(filename,string); /* file name */
840 obj_handle_t handle; /* handle to the file */
844 /* Open a file object */
845 @REQ(open_file_object)
846 unsigned int access; /* wanted access rights */
847 unsigned int attributes; /* open attributes */
848 obj_handle_t rootdir; /* root directory */
849 unsigned int sharing; /* sharing flags */
850 VARARG(filename,unicode_str); /* file name */
852 obj_handle_t handle; /* handle to the file */
856 /* Allocate a file handle for a Unix fd */
857 @REQ(alloc_file_handle)
858 unsigned int access; /* wanted access rights */
859 unsigned int attributes; /* object attributes */
860 int fd; /* file descriptor on the client side */
862 obj_handle_t handle; /* handle to the file */
866 /* Get a Unix fd to access a file */
868 obj_handle_t handle; /* handle to the file */
869 unsigned int access; /* wanted access rights */
870 int cached; /* is it cached on the client already? */
872 int type; /* file type (see below) */
873 int flags; /* file read/write flags (see below) */
877 FD_TYPE_INVALID, /* invalid file (no associated fd) */
878 FD_TYPE_FILE, /* regular file */
879 FD_TYPE_DIR, /* directory */
880 FD_TYPE_SOCKET, /* socket */
881 FD_TYPE_SERIAL, /* serial port */
882 FD_TYPE_PIPE, /* named pipe */
883 FD_TYPE_MAILSLOT, /* mailslot */
884 FD_TYPE_DEVICE, /* Windows device file */
887 #define FD_FLAG_OVERLAPPED 0x01 /* fd opened in overlapped mode */
888 #define FD_FLAG_TIMEOUT 0x02 /* read/write is synchronous */
889 #define FD_FLAG_RECV_SHUTDOWN 0x04
890 #define FD_FLAG_SEND_SHUTDOWN 0x08
891 #define FD_FLAG_AVAILABLE 0x10 /* in overlap read/write operation,
892 * only handle available data (don't wait
) */
893 #define FD_FLAG_REMOVABLE
0x20 /* is it on a removable device?
*/
895 /* Flush a file buffers
*/
897 obj_handle_t handle
; /* handle to the file
*/
899 obj_handle_t event
; /* event set when finished
*/
903 /* Lock a region of a file
*/
905 obj_handle_t handle
; /* handle to the file
*/
906 unsigned int offset_low
; /* offset of start of lock
*/
907 unsigned int offset_high
; /* offset of start of lock
*/
908 unsigned int count_low
; /* count of bytes to lock
*/
909 unsigned int count_high
; /* count of bytes to lock
*/
910 int shared
; /* shared or exclusive lock?
*/
911 int wait
; /* do we want to wait?
*/
913 obj_handle_t handle
; /* handle to wait on
*/
914 int overlapped
; /* is it an overlapped I
/O handle?
*/
918 /* Unlock a region of a file
*/
920 obj_handle_t handle
; /* handle to the file
*/
921 unsigned int offset_low
; /* offset of start of unlock
*/
922 unsigned int offset_high
; /* offset of start of unlock
*/
923 unsigned int count_low
; /* count of bytes to unlock
*/
924 unsigned int count_high
; /* count of bytes to unlock
*/
928 /* Get ready to unmount a Unix device
*/
930 obj_handle_t handle
; /* handle to a file on the device
*/
934 /* Create a socket
*/
936 unsigned int access
; /* wanted access rights
*/
937 unsigned int attributes
; /* object attributes
*/
938 int family
; /* family
, see socket manpage
*/
939 int type
; /* type
, see socket manpage
*/
940 int protocol
; /* protocol
, see socket manpage
*/
941 unsigned int flags
; /* socket flags
*/
943 obj_handle_t handle
; /* handle to the new socket
*/
947 /* Accept a socket
*/
949 obj_handle_t lhandle
; /* handle to the listening socket
*/
950 unsigned int access
; /* wanted access rights
*/
951 unsigned int attributes
; /* object attributes
*/
953 obj_handle_t handle
; /* handle to the new socket
*/
957 /* Set socket event parameters
*/
958 @
REQ(set_socket_event
)
959 obj_handle_t handle
; /* handle to the socket
*/
960 unsigned int mask
; /* event mask
*/
961 obj_handle_t event
; /* event object
*/
962 user_handle_t window
; /* window to send the message to
*/
963 unsigned int msg
; /* message to send
*/
967 /* Get socket event parameters
*/
968 @
REQ(get_socket_event
)
969 obj_handle_t handle
; /* handle to the socket
*/
970 int service
; /* clear pending?
*/
971 obj_handle_t c_event
; /* event to clear
*/
973 unsigned int mask
; /* event mask
*/
974 unsigned int pmask
; /* pending events
*/
975 unsigned int state
; /* status bits
*/
976 VARARG(errors
,ints
); /* event errors
*/
980 /* Reenable pending socket events
*/
981 @
REQ(enable_socket_event
)
982 obj_handle_t handle
; /* handle to the socket
*/
983 unsigned int mask
; /* events to re
-enable
*/
984 unsigned int sstate
; /* status bits to set
*/
985 unsigned int cstate
; /* status bits to clear
*/
988 @
REQ(set_socket_deferred
)
989 obj_handle_t handle
; /* handle to the socket
*/
990 obj_handle_t deferred
; /* handle to the socket for which
accept() is deferred
*/
993 /* Allocate a
console (only used by a console renderer
) */
995 unsigned int access
; /* wanted access rights
*/
996 unsigned int attributes
; /* object attributes
*/
997 process_id_t pid
; /* pid of process which shall be attached to the console
*/
999 obj_handle_t handle_in
; /* handle to console input
*/
1000 obj_handle_t event
; /* handle to renderer events change notification
*/
1004 /* Free the console of the current process
*/
1009 #define CONSOLE_RENDERER_NONE_EVENT
0x00
1010 #define CONSOLE_RENDERER_TITLE_EVENT
0x01
1011 #define CONSOLE_RENDERER_ACTIVE_SB_EVENT
0x02
1012 #define CONSOLE_RENDERER_SB_RESIZE_EVENT
0x03
1013 #define CONSOLE_RENDERER_UPDATE_EVENT
0x04
1014 #define CONSOLE_RENDERER_CURSOR_POS_EVENT
0x05
1015 #define CONSOLE_RENDERER_CURSOR_GEOM_EVENT
0x06
1016 #define CONSOLE_RENDERER_DISPLAY_EVENT
0x07
1017 #define CONSOLE_RENDERER_EXIT_EVENT
0x08
1018 struct console_renderer_event
1053 /* retrieve console events for the renderer
*/
1054 @
REQ(get_console_renderer_events
)
1055 obj_handle_t handle
; /* handle to console input events
*/
1057 VARARG(data
,bytes
); /* the various console_renderer_events
*/
1061 /* Open a handle to the process console
*/
1063 obj_handle_t from
; /* 0 (resp
1) input (resp output
) of current process console
*/
1064 /* otherwise console_in handle to get active screen buffer?
*/
1065 unsigned int access
; /* wanted access rights
*/
1066 unsigned int attributes
; /* object attributes
*/
1067 int share
; /* share
mask (only for output handles
) */
1069 obj_handle_t handle
; /* handle to the console
*/
1073 /* Get the input queue wait event
*/
1074 @
REQ(get_console_wait_event
)
1076 obj_handle_t handle
;
1079 /* Get a console
mode (input or output
) */
1080 @
REQ(get_console_mode
)
1081 obj_handle_t handle
; /* handle to the console
*/
1083 int mode
; /* console mode
*/
1087 /* Set a console
mode (input or output
) */
1088 @
REQ(set_console_mode
)
1089 obj_handle_t handle
; /* handle to the console
*/
1090 int mode
; /* console mode
*/
1094 /* Set info about a
console (input only
) */
1095 @
REQ(set_console_input_info
)
1096 obj_handle_t handle
; /* handle to console input
, or
0 for process
' console */
1097 int mask; /* setting mask (see below) */
1098 obj_handle_t active_sb; /* active screen buffer */
1099 int history_mode; /* whether we duplicate lines in history */
1100 int history_size; /* number of lines in history */
1101 int edition_mode; /* index to the edition mode flavors */
1102 VARARG(title,unicode_str); /* console title */
1104 #define SET_CONSOLE_INPUT_INFO_ACTIVE_SB 0x01
1105 #define SET_CONSOLE_INPUT_INFO_TITLE 0x02
1106 #define SET_CONSOLE_INPUT_INFO_HISTORY_MODE 0x04
1107 #define SET_CONSOLE_INPUT_INFO_HISTORY_SIZE 0x08
1108 #define SET_CONSOLE_INPUT_INFO_EDITION_MODE 0x10
1111 /* Get info about a console (input only) */
1112 @REQ(get_console_input_info)
1113 obj_handle_t handle; /* handle to console input, or 0 for process' console
*/
1115 int history_mode
; /* whether we duplicate lines in history
*/
1116 int history_size
; /* number of lines in history
*/
1117 int history_index
; /* number of used lines in history
*/
1118 int edition_mode
; /* index to the edition mode flavors
*/
1119 VARARG(title
,unicode_str
); /* console title
*/
1123 /* appends a string to console
's history */
1124 @REQ(append_console_input_history)
1125 obj_handle_t handle; /* handle to console input, or 0 for process' console
*/
1126 VARARG(line
,unicode_str
); /* line to add
*/
1130 /* appends a string to console
's history */
1131 @REQ(get_console_input_history)
1132 obj_handle_t handle; /* handle to console input, or 0 for process' console
*/
1133 int index
; /* index to get line from
*/
1135 int total
; /* total length of line in Unicode chars
*/
1136 VARARG(line
,unicode_str
); /* line to add
*/
1140 /* creates a new screen buffer on process
' console */
1141 @REQ(create_console_output)
1142 obj_handle_t handle_in; /* handle to console input, or 0 for process' console
*/
1143 unsigned int access
; /* wanted access rights
*/
1144 unsigned int attributes
; /* object attributes
*/
1145 unsigned int share
; /* sharing credentials
*/
1147 obj_handle_t handle_out
; /* handle to the screen buffer
*/
1151 /* Set info about a
console (output only
) */
1152 @
REQ(set_console_output_info
)
1153 obj_handle_t handle
; /* handle to the console
*/
1154 int mask
; /* setting
mask (see below
) */
1155 short int cursor_size
; /* size of
cursor (percentage filled
) */
1156 short int cursor_visible
;/* cursor visibility flag
*/
1157 short int cursor_x
; /* position of
cursor (x
, y
) */
1159 short int width
; /* width of the screen buffer
*/
1160 short int height
; /* height of the screen buffer
*/
1161 short int attr
; /* default attribute
*/
1162 short int win_left
; /* window actually displayed by renderer
*/
1163 short int win_top
; /* the rect area is expressed withing the
*/
1164 short int win_right
; /* boundaries of the screen buffer
*/
1165 short int win_bottom
;
1166 short int max_width
; /* maximum
size (width x height
) for the window
*/
1167 short int max_height
;
1169 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_GEOM
0x01
1170 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_POS
0x02
1171 #define SET_CONSOLE_OUTPUT_INFO_SIZE
0x04
1172 #define SET_CONSOLE_OUTPUT_INFO_ATTR
0x08
1173 #define SET_CONSOLE_OUTPUT_INFO_DISPLAY_WINDOW
0x10
1174 #define SET_CONSOLE_OUTPUT_INFO_MAX_SIZE
0x20
1177 /* Get info about a
console (output only
) */
1178 @
REQ(get_console_output_info
)
1179 obj_handle_t handle
; /* handle to the console
*/
1181 short int cursor_size
; /* size of
cursor (percentage filled
) */
1182 short int cursor_visible
;/* cursor visibility flag
*/
1183 short int cursor_x
; /* position of
cursor (x
, y
) */
1185 short int width
; /* width of the screen buffer
*/
1186 short int height
; /* height of the screen buffer
*/
1187 short int attr
; /* default attribute
*/
1188 short int win_left
; /* window actually displayed by renderer
*/
1189 short int win_top
; /* the rect area is expressed withing the
*/
1190 short int win_right
; /* boundaries of the screen buffer
*/
1191 short int win_bottom
;
1192 short int max_width
; /* maximum
size (width x height
) for the window
*/
1193 short int max_height
;
1196 /* Add input records to a console input queue
*/
1197 @
REQ(write_console_input
)
1198 obj_handle_t handle
; /* handle to the console input
*/
1199 VARARG(rec
,input_records
); /* input records
*/
1201 int written
; /* number of records written
*/
1205 /* Fetch input records from a console input queue
*/
1206 @
REQ(read_console_input
)
1207 obj_handle_t handle
; /* handle to the console input
*/
1208 int flush
; /* flush the retrieved records from the queue?
*/
1210 int read
; /* number of records read
*/
1211 VARARG(rec
,input_records
); /* input records
*/
1215 /* write
data (chars and
/or attributes
) in a screen buffer
*/
1216 @
REQ(write_console_output
)
1217 obj_handle_t handle
; /* handle to the console output
*/
1218 int x
; /* position where to start writing
*/
1220 int mode
; /* char
info (see below
) */
1221 int wrap
; /* wrap around at end of line?
*/
1222 VARARG(data
,bytes
); /* info to write
*/
1224 int written
; /* number of char infos actually written
*/
1225 int width
; /* width of screen buffer
*/
1226 int height
; /* height of screen buffer
*/
1230 CHAR_INFO_MODE_TEXT
, /* characters only
*/
1231 CHAR_INFO_MODE_ATTR
, /* attributes only
*/
1232 CHAR_INFO_MODE_TEXTATTR
, /* both characters and attributes
*/
1233 CHAR_INFO_MODE_TEXTSTDATTR
/* characters but use standard attributes
*/
1237 /* fill a screen buffer with constant
data (chars and
/or attributes
) */
1238 @
REQ(fill_console_output
)
1239 obj_handle_t handle
; /* handle to the console output
*/
1240 int x
; /* position where to start writing
*/
1242 int mode
; /* char info mode
*/
1243 int count
; /* number to write
*/
1244 int wrap
; /* wrap around at end of line?
*/
1245 char_info_t data
; /* data to write
*/
1247 int written
; /* number of char infos actually written
*/
1251 /* read
data (chars and
/or attributes
) from a screen buffer
*/
1252 @
REQ(read_console_output
)
1253 obj_handle_t handle
; /* handle to the console output
*/
1254 int x
; /* position (x
,y
) where to start reading
*/
1256 int mode
; /* char info mode
*/
1257 int wrap
; /* wrap around at end of line?
*/
1259 int width
; /* width of screen buffer
*/
1260 int height
; /* height of screen buffer
*/
1265 /* move a
rect (of data
) in screen buffer content
*/
1266 @
REQ(move_console_output
)
1267 obj_handle_t handle
; /* handle to the console output
*/
1268 short int x_src
; /* position (x
, y
) of rect to start moving from
*/
1270 short int x_dst
; /* position (x
, y
) of rect to move to
*/
1272 short int w
; /* size of the
rect (width
, height
) to move
*/
1277 /* Sends a signal to a process group
*/
1278 @
REQ(send_console_signal
)
1279 int signal
; /* the signal to send
*/
1280 process_id_t group_id
; /* the group to send the signal to
*/
1284 /* enable directory change notifications
*/
1285 @
REQ(read_directory_changes
)
1286 unsigned int filter
; /* notification filter
*/
1287 obj_handle_t handle
; /* handle to the directory
*/
1288 obj_handle_t event
; /* handle to the event
*/
1289 int subtree
; /* watch the subtree?
*/
1290 int want_data
; /* flag indicating whether change data should be collected
*/
1291 void
* io_apc
; /* APC routine to queue upon end of async
*/
1292 void
* io_sb
; /* I
/O status
block (unique across all async on this handle
) */
1293 void
* io_user
; /* data to pass back to caller
*/
1298 obj_handle_t handle
;
1300 int action
; /* type of change
*/
1301 VARARG(name
,string
); /* name of directory entry that changed
*/
1305 /* Create a file mapping
*/
1306 @
REQ(create_mapping
)
1307 unsigned int access
; /* wanted access rights
*/
1308 unsigned int attributes
; /* object attributes
*/
1309 obj_handle_t rootdir
; /* root directory
*/
1310 int size_high
; /* mapping size
*/
1311 int size_low
; /* mapping size
*/
1312 int protect
; /* protection
flags (see below
) */
1313 obj_handle_t file_handle
; /* file handle
*/
1314 VARARG(name
,unicode_str
); /* object name
*/
1316 obj_handle_t handle
; /* handle to the mapping
*/
1318 /* protection flags
*/
1319 #define VPROT_READ
0x01
1320 #define VPROT_WRITE
0x02
1321 #define VPROT_EXEC
0x04
1322 #define VPROT_WRITECOPY
0x08
1323 #define VPROT_GUARD
0x10
1324 #define VPROT_NOCACHE
0x20
1325 #define VPROT_COMMITTED
0x40
1326 #define VPROT_IMAGE
0x80
1329 /* Open a mapping
*/
1331 unsigned int access
; /* wanted access rights
*/
1332 unsigned int attributes
; /* object attributes
*/
1333 obj_handle_t rootdir
; /* root directory
*/
1334 VARARG(name
,unicode_str
); /* object name
*/
1336 obj_handle_t handle
; /* handle to the mapping
*/
1340 /* Get information about a file mapping
*/
1341 @
REQ(get_mapping_info
)
1342 obj_handle_t handle
; /* handle to the mapping
*/
1344 int size_high
; /* mapping size
*/
1345 int size_low
; /* mapping size
*/
1346 int protect
; /* protection flags
*/
1347 int header_size
; /* header
size (for VPROT_IMAGE mapping
) */
1348 void
* base
; /* default base
addr (for VPROT_IMAGE mapping
) */
1349 obj_handle_t mapping
; /* duplicate mapping handle unless removable
*/
1350 obj_handle_t shared_file
; /* shared mapping file handle
*/
1351 int shared_size
; /* shared mapping size
*/
1355 #define SNAP_HEAPLIST
0x00000001
1356 #define SNAP_PROCESS
0x00000002
1357 #define SNAP_THREAD
0x00000004
1358 #define SNAP_MODULE
0x00000008
1359 /* Create a snapshot
*/
1360 @
REQ(create_snapshot
)
1361 unsigned int attributes
; /* object attributes
*/
1362 int flags
; /* snapshot
flags (SNAP_*)
*/
1363 process_id_t pid
; /* process id
*/
1365 obj_handle_t handle
; /* handle to the snapshot
*/
1369 /* Get the next process from a snapshot
*/
1371 obj_handle_t handle
; /* handle to the snapshot
*/
1372 int reset
; /* reset snapshot position?
*/
1374 int count
; /* process usage count
*/
1375 process_id_t pid
; /* process id
*/
1376 process_id_t ppid
; /* parent process id
*/
1377 void
* heap
; /* heap base
*/
1378 void
* module
; /* main module
*/
1379 int threads
; /* number of threads
*/
1380 int priority
; /* process priority
*/
1381 int handles
; /* number of handles
*/
1382 VARARG(filename
,unicode_str
); /* file name of main exe
*/
1386 /* Get the next thread from a snapshot
*/
1388 obj_handle_t handle
; /* handle to the snapshot
*/
1389 int reset
; /* reset snapshot position?
*/
1391 int count
; /* thread usage count
*/
1392 process_id_t pid
; /* process id
*/
1393 thread_id_t tid
; /* thread id
*/
1394 int base_pri
; /* base priority
*/
1395 int delta_pri
; /* delta priority
*/
1399 /* Get the next module from a snapshot
*/
1401 obj_handle_t handle
; /* handle to the snapshot
*/
1402 int reset
; /* reset snapshot position?
*/
1404 process_id_t pid
; /* process id
*/
1405 void
* base
; /* module base address
*/
1406 size_t size
; /* module size
*/
1407 VARARG(filename
,unicode_str
); /* file name of module
*/
1411 /* Wait for a debug event
*/
1412 @
REQ(wait_debug_event
)
1413 int get_handle
; /* should we alloc a handle for waiting?
*/
1415 process_id_t pid
; /* process id
*/
1416 thread_id_t tid
; /* thread id
*/
1417 obj_handle_t wait
; /* wait handle if no event ready
*/
1418 VARARG(event
,debug_event
); /* debug event data
*/
1422 /* Queue an exception event
*/
1423 @
REQ(queue_exception_event
)
1424 int first
; /* first chance exception?
*/
1425 VARARG(record
,exc_event
); /* thread context followed by exception record
*/
1427 obj_handle_t handle
; /* handle to the queued event
*/
1431 /* Retrieve the status of an exception event
*/
1432 @
REQ(get_exception_status
)
1433 obj_handle_t handle
; /* handle to the queued event
*/
1435 VARARG(context
,context
); /* modified thread context
*/
1439 /* Send an output string to the debugger
*/
1440 @
REQ(output_debug_string
)
1441 void
* string
; /* string to
display (in debugged process address space
) */
1442 int unicode
; /* is it Unicode?
*/
1443 int length
; /* string length
*/
1447 /* Continue a debug event
*/
1448 @
REQ(continue_debug_event
)
1449 process_id_t pid
; /* process id to continue
*/
1450 thread_id_t tid
; /* thread id to continue
*/
1451 int status
; /* continuation status
*/
1455 /* Start
/stop debugging an existing process
*/
1457 process_id_t pid
; /* id of the process to debug
*/
1458 int attach
; /* 1=attaching
/ 0=detaching from the process
*/
1462 /* Simulate a breakpoint in a process
*/
1464 obj_handle_t handle
; /* process handle
*/
1466 int self
; /* was it the caller itself?
*/
1470 /* Set debugger kill on exit flag
*/
1471 @
REQ(set_debugger_kill_on_exit
)
1472 int kill_on_exit
; /* 0=detach
/1=kill debuggee when debugger dies
*/
1476 /* Read data from a process address space
*/
1477 @
REQ(read_process_memory
)
1478 obj_handle_t handle
; /* process handle
*/
1479 void
* addr
; /* addr to read from
*/
1481 VARARG(data
,bytes
); /* result data
*/
1485 /* Write data to a process address space
*/
1486 @
REQ(write_process_memory
)
1487 obj_handle_t handle
; /* process handle
*/
1488 void
* addr
; /* addr to write to
*/
1489 VARARG(data
,bytes
); /* data to write
*/
1493 /* Create a registry key
*/
1495 obj_handle_t parent
; /* handle to the parent key
*/
1496 unsigned int access
; /* desired access rights
*/
1497 unsigned int attributes
; /* object attributes
*/
1498 unsigned int options
; /* creation options
*/
1499 time_t modif
; /* last modification time
*/
1500 data_size_t namelen
; /* length of key name in bytes
*/
1501 VARARG(name
,unicode_str
,namelen
); /* key name
*/
1502 VARARG(class
,unicode_str
); /* class name
*/
1504 obj_handle_t hkey
; /* handle to the created key
*/
1505 int created
; /* has it been newly created?
*/
1508 /* Open a registry key
*/
1510 obj_handle_t parent
; /* handle to the parent key
*/
1511 unsigned int access
; /* desired access rights
*/
1512 unsigned int attributes
; /* object attributes
*/
1513 VARARG(name
,unicode_str
); /* key name
*/
1515 obj_handle_t hkey
; /* handle to the open key
*/
1519 /* Delete a registry key
*/
1521 obj_handle_t hkey
; /* handle to the key
*/
1525 /* Flush a registry key
*/
1527 obj_handle_t hkey
; /* handle to the key
*/
1531 /* Enumerate registry subkeys
*/
1533 obj_handle_t hkey
; /* handle to registry key
*/
1534 int index
; /* index of
subkey (or
-1 for current key
) */
1535 int info_class
; /* requested information class
*/
1537 int subkeys
; /* number of subkeys
*/
1538 int max_subkey
; /* longest subkey name
*/
1539 int max_class
; /* longest class name
*/
1540 int values
; /* number of values
*/
1541 int max_value
; /* longest value name
*/
1542 int max_data
; /* longest value data
*/
1543 time_t modif
; /* last modification time
*/
1544 data_size_t total
; /* total length needed for full name and class
*/
1545 data_size_t namelen
; /* length of key name in bytes
*/
1546 VARARG(name
,unicode_str
,namelen
); /* key name
*/
1547 VARARG(class
,unicode_str
); /* class name
*/
1551 /* Set a value of a registry key
*/
1553 obj_handle_t hkey
; /* handle to registry key
*/
1554 int type
; /* value type
*/
1555 data_size_t namelen
; /* length of value name in bytes
*/
1556 VARARG(name
,unicode_str
,namelen
); /* value name
*/
1557 VARARG(data
,bytes
); /* value data
*/
1561 /* Retrieve the value of a registry key
*/
1563 obj_handle_t hkey
; /* handle to registry key
*/
1564 VARARG(name
,unicode_str
); /* value name
*/
1566 int type
; /* value type
*/
1567 data_size_t total
; /* total length needed for data
*/
1568 VARARG(data
,bytes
); /* value data
*/
1572 /* Enumerate a value of a registry key
*/
1573 @
REQ(enum_key_value
)
1574 obj_handle_t hkey
; /* handle to registry key
*/
1575 int index
; /* value index
*/
1576 int info_class
; /* requested information class
*/
1578 int type
; /* value type
*/
1579 data_size_t total
; /* total length needed for full name and data
*/
1580 data_size_t namelen
; /* length of value name in bytes
*/
1581 VARARG(name
,unicode_str
,namelen
); /* value name
*/
1582 VARARG(data
,bytes
); /* value data
*/
1586 /* Delete a value of a registry key
*/
1587 @
REQ(delete_key_value
)
1588 obj_handle_t hkey
; /* handle to registry key
*/
1589 VARARG(name
,unicode_str
); /* value name
*/
1593 /* Load a registry branch from a file
*/
1595 obj_handle_t hkey
; /* root key to load to
*/
1596 obj_handle_t file
; /* file to load from
*/
1597 VARARG(name
,unicode_str
); /* subkey name
*/
1601 /* UnLoad a registry branch from a file
*/
1602 @
REQ(unload_registry
)
1603 obj_handle_t hkey
; /* root key to unload to
*/
1607 /* Save a registry branch to a file
*/
1609 obj_handle_t hkey
; /* key to save
*/
1610 obj_handle_t file
; /* file to save to
*/
1614 /* Add a registry key change notification
*/
1615 @
REQ(set_registry_notification
)
1616 obj_handle_t hkey
; /* key to watch for changes
*/
1617 obj_handle_t event
; /* event to set
*/
1618 int subtree
; /* should we watch the whole subtree?
*/
1619 unsigned int filter
; /* things to watch
*/
1623 /* Create a waitable timer
*/
1625 unsigned int access
; /* wanted access rights
*/
1626 unsigned int attributes
; /* object attributes
*/
1627 obj_handle_t rootdir
; /* root directory
*/
1628 int manual
; /* manual reset
*/
1629 VARARG(name
,unicode_str
); /* object name
*/
1631 obj_handle_t handle
; /* handle to the timer
*/
1635 /* Open a waitable timer
*/
1637 unsigned int access
; /* wanted access rights
*/
1638 unsigned int attributes
; /* object attributes
*/
1639 obj_handle_t rootdir
; /* root directory
*/
1640 VARARG(name
,unicode_str
); /* object name
*/
1642 obj_handle_t handle
; /* handle to the timer
*/
1645 /* Set a waitable timer
*/
1647 obj_handle_t handle
; /* handle to the timer
*/
1648 abs_time_t expire
; /* next expiration absolute time
*/
1649 int period
; /* timer period in ms
*/
1650 void
* callback
; /* callback function
*/
1651 void
* arg
; /* callback argument
*/
1653 int signaled
; /* was the timer signaled before this call ?
*/
1656 /* Cancel a waitable timer
*/
1658 obj_handle_t handle
; /* handle to the timer
*/
1660 int signaled
; /* was the timer signaled before this calltime ?
*/
1663 /* Get information on a waitable timer
*/
1664 @
REQ(get_timer_info
)
1665 obj_handle_t handle
; /* handle to the timer
*/
1667 abs_time_t when
; /* absolute time when the timer next expires
*/
1668 int signaled
; /* is the timer signaled?
*/
1672 /* Retrieve the current context of a thread
*/
1673 @
REQ(get_thread_context
)
1674 obj_handle_t handle
; /* thread handle
*/
1675 unsigned int flags
; /* context flags
*/
1676 int suspend
; /* if getting context during suspend
*/
1678 int self
; /* was it a handle to the current thread?
*/
1679 VARARG(context
,context
); /* thread context
*/
1683 /* Set the current context of a thread
*/
1684 @
REQ(set_thread_context
)
1685 obj_handle_t handle
; /* thread handle
*/
1686 unsigned int flags
; /* context flags
*/
1687 int suspend
; /* if setting context during suspend
*/
1688 VARARG(context
,context
); /* thread context
*/
1690 int self
; /* was it a handle to the current thread?
*/
1694 /* Fetch a selector entry for a thread
*/
1695 @
REQ(get_selector_entry
)
1696 obj_handle_t handle
; /* thread handle
*/
1697 int entry
; /* LDT entry
*/
1699 unsigned int base
; /* selector base
*/
1700 unsigned int limit
; /* selector limit
*/
1701 unsigned char flags
; /* selector flags
*/
1707 obj_handle_t table
; /* which table to add atom to
*/
1708 VARARG(name
,unicode_str
); /* atom name
*/
1710 atom_t atom
; /* resulting atom
*/
1714 /* Delete an atom
*/
1716 obj_handle_t table
; /* which table to delete atom from
*/
1717 atom_t atom
; /* atom handle
*/
1723 obj_handle_t table
; /* which table to find atom from
*/
1724 VARARG(name
,unicode_str
); /* atom name
*/
1726 atom_t atom
; /* atom handle
*/
1730 /* Get information about an atom
*/
1731 @
REQ(get_atom_information
)
1732 obj_handle_t table
; /* which table to find atom from
*/
1733 atom_t atom
; /* atom handle
*/
1735 int count
; /* atom lock count
*/
1736 int pinned
; /* whether the atom has been pinned
*/
1737 data_size_t total
; /* actual length of atom name
*/
1738 VARARG(name
,unicode_str
); /* atom name
*/
1742 /* Set information about an atom
*/
1743 @
REQ(set_atom_information
)
1744 obj_handle_t table
; /* which table to find atom from
*/
1745 atom_t atom
; /* atom handle
*/
1746 int pinned
; /* whether to bump atom information
*/
1750 /* Empty an atom table
*/
1751 @
REQ(empty_atom_table
)
1752 obj_handle_t table
; /* which table to find atom from
*/
1753 int if_pinned
; /* whether to delete pinned atoms
*/
1757 /* Init an atom table
*/
1758 @
REQ(init_atom_table
)
1759 int entries
; /* number of
entries (only for local
) */
1761 obj_handle_t table
; /* handle to the atom table
*/
1765 /* Get the message queue of the current thread
*/
1768 obj_handle_t handle
; /* handle to the queue
*/
1772 /* Set the current message queue wakeup mask
*/
1773 @
REQ(set_queue_mask
)
1774 unsigned int wake_mask
; /* wakeup bits mask
*/
1775 unsigned int changed_mask
; /* changed bits mask
*/
1776 int skip_wait
; /* will we skip waiting if signaled?
*/
1778 unsigned int wake_bits
; /* current wake bits
*/
1779 unsigned int changed_bits
; /* current changed bits
*/
1783 /* Get the current message queue status
*/
1784 @
REQ(get_queue_status
)
1785 int clear
; /* should we clear the change bits?
*/
1787 unsigned int wake_bits
; /* wake bits
*/
1788 unsigned int changed_bits
; /* changed bits since last time
*/
1792 /* Retrieve the process idle event
*/
1793 @
REQ(get_process_idle_event
)
1794 obj_handle_t handle
; /* process handle
*/
1796 obj_handle_t event
; /* handle to idle event
*/
1800 /* Send a message to a thread queue
*/
1802 thread_id_t id
; /* thread id
*/
1803 int type
; /* message
type (see below
) */
1804 int flags
; /* message
flags (see below
) */
1805 user_handle_t win
; /* window handle
*/
1806 unsigned int msg
; /* message code
*/
1807 unsigned long wparam
; /* parameters
*/
1808 unsigned long lparam
; /* parameters
*/
1809 int timeout
; /* timeout for reply
*/
1810 VARARG(data
,message_data
); /* message data for sent messages
*/
1813 @
REQ(post_quit_message
)
1814 int exit_code
; /* exit code to return
*/
1819 MSG_ASCII
, /* Ascii
message (from SendMessageA
) */
1820 MSG_UNICODE
, /* Unicode
message (from SendMessageW
) */
1821 MSG_NOTIFY
, /* notify
message (from SendNotifyMessageW
), always Unicode
*/
1822 MSG_CALLBACK
, /* callback
message (from SendMessageCallbackW
), always Unicode
*/
1823 MSG_CALLBACK_RESULT
,/* result of a callback message
*/
1824 MSG_OTHER_PROCESS
, /* sent from other process
, may include vararg data
, always Unicode
*/
1825 MSG_POSTED
, /* posted
message (from PostMessageW
), always Unicode
*/
1826 MSG_HARDWARE
, /* hardware message
*/
1827 MSG_WINEVENT
/* winevent message
*/
1829 #define SEND_MSG_ABORT_IF_HUNG
0x01
1832 /* Send a hardware message to a thread queue
*/
1833 @
REQ(send_hardware_message
)
1834 thread_id_t id
; /* thread id
*/
1835 user_handle_t win
; /* window handle
*/
1836 unsigned int msg
; /* message code
*/
1837 unsigned int time
; /* message time
*/
1838 unsigned long wparam
; /* parameters
*/
1839 unsigned long lparam
; /* parameters
*/
1840 unsigned long info
; /* extra info
*/
1841 int x
; /* x position
*/
1842 int y
; /* y position
*/
1846 /* Get a message from the current queue
*/
1848 unsigned int flags
; /* PM_
* flags
*/
1849 user_handle_t get_win
; /* window handle to get
*/
1850 unsigned int get_first
; /* first message code to get
*/
1851 unsigned int get_last
; /* last message code to get
*/
1852 unsigned int hw_id
; /* id of the previous hardware
message (or
0) */
1854 user_handle_t win
; /* window handle
*/
1855 int type
; /* message type
*/
1856 unsigned int msg
; /* message code
*/
1857 unsigned long wparam
; /* parameters
*/
1858 unsigned long lparam
; /* parameters
*/
1859 unsigned long info
; /* extra info
*/
1860 int x
; /* x position
*/
1861 int y
; /* y position
*/
1862 unsigned int time
; /* message time
*/
1863 unsigned int hw_id
; /* id if hardware message
*/
1864 unsigned int active_hooks
; /* active hooks bitmap
*/
1865 data_size_t total
; /* total size of extra data
*/
1866 VARARG(data
,message_data
); /* message data for sent messages
*/
1870 /* Reply to a sent message
*/
1872 unsigned int result
; /* message result
*/
1873 int remove
; /* should we remove the message?
*/
1874 VARARG(data
,bytes
); /* message data for sent messages
*/
1878 /* Accept the current hardware message
*/
1879 @
REQ(accept_hardware_message
)
1880 unsigned int hw_id
; /* id of the hardware message
*/
1881 int remove
; /* should we remove the message?
*/
1882 user_handle_t new_win
; /* new destination window for current message
*/
1886 /* Retrieve the reply for the last message sent
*/
1887 @
REQ(get_message_reply
)
1888 int cancel
; /* cancel message if not ready?
*/
1890 unsigned int result
; /* message result
*/
1891 VARARG(data
,bytes
); /* message data for sent messages
*/
1895 /* Set a window timer
*/
1897 user_handle_t win
; /* window handle
*/
1898 unsigned int msg
; /* message to post
*/
1899 unsigned int rate
; /* timer rate in ms
*/
1900 unsigned long id
; /* timer id
*/
1901 unsigned long lparam
; /* message
lparam (callback proc
) */
1903 unsigned long id
; /* timer id
*/
1907 /* Kill a window timer
*/
1908 @
REQ(kill_win_timer
)
1909 user_handle_t win
; /* window handle
*/
1910 unsigned int msg
; /* message to post
*/
1911 unsigned long id
; /* timer id
*/
1915 /* Retrieve info about a serial port
*/
1916 @
REQ(get_serial_info
)
1917 obj_handle_t handle
; /* handle to comm port
*/
1919 unsigned int readinterval
;
1920 unsigned int readconst
;
1921 unsigned int readmult
;
1922 unsigned int writeconst
;
1923 unsigned int writemult
;
1924 unsigned int eventmask
;
1928 /* Set info about a serial port
*/
1929 @
REQ(set_serial_info
)
1930 obj_handle_t handle
; /* handle to comm port
*/
1931 int flags
; /* bitmask to set
values (see below
) */
1932 unsigned int readinterval
;
1933 unsigned int readconst
;
1934 unsigned int readmult
;
1935 unsigned int writeconst
;
1936 unsigned int writemult
;
1937 unsigned int eventmask
;
1939 #define SERIALINFO_SET_TIMEOUTS
0x01
1940 #define SERIALINFO_SET_MASK
0x02
1943 /* Create an async I
/O
*/
1944 @
REQ(register_async
)
1945 obj_handle_t handle
; /* handle to comm port
, socket or file
*/
1946 int type
; /* type of queue to look after
*/
1947 void
* io_apc
; /* APC routine to queue upon end of async
*/
1948 void
* io_sb
; /* I
/O status
block (unique across all async on this handle
) */
1949 void
* io_user
; /* data to pass back to caller
*/
1950 int count
; /* count
- usually # of bytes to be read
/written
*/
1952 #define ASYNC_TYPE_READ
0x01
1953 #define ASYNC_TYPE_WRITE
0x02
1954 #define ASYNC_TYPE_WAIT
0x03
1957 /* Cancel all async op on a fd
*/
1959 obj_handle_t handle
; /* handle to comm port
, socket or file
*/
1963 /* Create a named pipe
*/
1964 @
REQ(create_named_pipe
)
1965 unsigned int access
;
1966 unsigned int attributes
; /* object attributes
*/
1967 obj_handle_t rootdir
; /* root directory
*/
1968 unsigned int options
;
1970 unsigned int maxinstances
;
1971 unsigned int outsize
;
1972 unsigned int insize
;
1973 unsigned int timeout
;
1974 VARARG(name
,unicode_str
); /* pipe name
*/
1976 obj_handle_t handle
; /* handle to the pipe
*/
1979 /* flags in create_named_pipe and get_named_pipe_info
*/
1980 #define NAMED_PIPE_MESSAGE_STREAM_WRITE
0x0001
1981 #define NAMED_PIPE_MESSAGE_STREAM_READ
0x0002
1982 #define NAMED_PIPE_NONBLOCKING_MODE
0x0004
1983 #define NAMED_PIPE_SERVER_END
0x8000
1985 /* Open an existing named pipe
*/
1986 @
REQ(open_named_pipe
)
1987 unsigned int access
;
1988 unsigned int attributes
; /* object attributes
*/
1989 obj_handle_t rootdir
; /* root directory
*/
1990 unsigned int flags
; /* file flags
*/
1991 VARARG(name
,unicode_str
); /* pipe name
*/
1993 obj_handle_t handle
; /* handle to the pipe
*/
1997 /* Connect to a named pipe
*/
1998 @
REQ(connect_named_pipe
)
1999 obj_handle_t handle
;
2005 /* Wait for a named pipe
*/
2006 @
REQ(wait_named_pipe
)
2007 obj_handle_t handle
;
2008 unsigned int timeout
;
2011 VARARG(name
,unicode_str
); /* pipe name
*/
2015 /* Disconnect a named pipe
*/
2016 @
REQ(disconnect_named_pipe
)
2017 obj_handle_t handle
;
2021 @
REQ(get_named_pipe_info
)
2022 obj_handle_t handle
;
2025 unsigned int maxinstances
;
2026 unsigned int instances
;
2027 unsigned int outsize
;
2028 unsigned int insize
;
2032 /* Create a window
*/
2034 user_handle_t parent
; /* parent window
*/
2035 user_handle_t owner
; /* owner window
*/
2036 atom_t atom
; /* class atom
*/
2037 void
* instance
; /* module instance
*/
2039 user_handle_t handle
; /* created window
*/
2040 user_handle_t parent
; /* full handle of parent
*/
2041 user_handle_t owner
; /* full handle of owner
*/
2042 int extra
; /* number of extra bytes
*/
2043 void
* class_ptr
; /* pointer to class in client address space
*/
2047 /* Destroy a window
*/
2048 @
REQ(destroy_window
)
2049 user_handle_t handle
; /* handle to the window
*/
2053 /* Retrieve the desktop window for the current thread
*/
2054 @
REQ(get_desktop_window
)
2055 int force
; /* force creation if it doesn
't exist */
2057 user_handle_t handle; /* handle to the desktop window */
2061 /* Set a window owner */
2062 @REQ(set_window_owner)
2063 user_handle_t handle; /* handle to the window */
2064 user_handle_t owner; /* new owner */
2066 user_handle_t full_owner; /* full handle of new owner */
2067 user_handle_t prev_owner; /* full handle of previous owner */
2071 /* Get information from a window handle */
2072 @REQ(get_window_info)
2073 user_handle_t handle; /* handle to the window */
2075 user_handle_t full_handle; /* full 32-bit handle */
2076 user_handle_t last_active; /* last active popup */
2077 process_id_t pid; /* process owning the window */
2078 thread_id_t tid; /* thread owning the window */
2079 atom_t atom; /* class atom */
2080 int is_unicode; /* ANSI or unicode */
2084 /* Set some information in a window */
2085 @REQ(set_window_info)
2086 unsigned int flags; /* flags for fields to set (see below) */
2087 user_handle_t handle; /* handle to the window */
2088 unsigned int style; /* window style */
2089 unsigned int ex_style; /* window extended style */
2090 unsigned int id; /* window id */
2091 int is_unicode; /* ANSI or unicode */
2092 void* instance; /* creator instance */
2093 unsigned long user_data; /* user-specific data */
2094 int extra_offset; /* offset to set in extra bytes */
2095 data_size_t extra_size; /* size to set in extra bytes */
2096 unsigned long extra_value; /* value to set in extra bytes */
2098 unsigned int old_style; /* old window style */
2099 unsigned int old_ex_style; /* old window extended style */
2100 unsigned int old_id; /* old window id */
2101 void* old_instance; /* old creator instance */
2102 unsigned long old_user_data; /* old user-specific data */
2103 unsigned long old_extra_value; /* old value in extra bytes */
2105 #define SET_WIN_STYLE 0x01
2106 #define SET_WIN_EXSTYLE 0x02
2107 #define SET_WIN_ID 0x04
2108 #define SET_WIN_INSTANCE 0x08
2109 #define SET_WIN_USERDATA 0x10
2110 #define SET_WIN_EXTRA 0x20
2111 #define SET_WIN_UNICODE 0x40
2114 /* Set the parent of a window */
2116 user_handle_t handle; /* handle to the window */
2117 user_handle_t parent; /* handle to the parent */
2119 user_handle_t old_parent; /* old parent window */
2120 user_handle_t full_parent; /* full handle of new parent */
2124 /* Get a list of the window parents, up to the root of the tree */
2125 @REQ(get_window_parents)
2126 user_handle_t handle; /* handle to the window */
2128 int count; /* total count of parents */
2129 VARARG(parents,user_handles); /* parent handles */
2133 /* Get a list of the window children */
2134 @REQ(get_window_children)
2135 user_handle_t parent; /* parent window */
2136 atom_t atom; /* class atom for the listed children */
2137 thread_id_t tid; /* thread owning the listed children */
2139 int count; /* total count of children */
2140 VARARG(children,user_handles); /* children handles */
2144 /* Get a list of the window children that contain a given point */
2145 @REQ(get_window_children_from_point)
2146 user_handle_t parent; /* parent window */
2147 int x; /* point in parent coordinates */
2150 int count; /* total count of children */
2151 VARARG(children,user_handles); /* children handles */
2155 /* Get window tree information from a window handle */
2156 @REQ(get_window_tree)
2157 user_handle_t handle; /* handle to the window */
2159 user_handle_t parent; /* parent window */
2160 user_handle_t owner; /* owner window */
2161 user_handle_t next_sibling; /* next sibling in Z-order */
2162 user_handle_t prev_sibling; /* prev sibling in Z-order */
2163 user_handle_t first_sibling; /* first sibling in Z-order */
2164 user_handle_t last_sibling; /* last sibling in Z-order */
2165 user_handle_t first_child; /* first child */
2166 user_handle_t last_child; /* last child */
2169 /* Set the position and Z order of a window */
2170 @REQ(set_window_pos)
2171 unsigned int flags; /* SWP_* flags */
2172 user_handle_t handle; /* handle to the window */
2173 user_handle_t previous; /* previous window in Z order */
2174 rectangle_t window; /* window rectangle */
2175 rectangle_t client; /* client rectangle */
2176 VARARG(valid,rectangles); /* valid rectangles from WM_NCCALCSIZE */
2178 unsigned int new_style; /* new window 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 */
2267 /* Update the z order of a window so that a given rectangle is fully visible */
2268 @REQ(update_window_zorder)
2269 user_handle_t window; /* handle to the window */
2270 rectangle_t rect; /* rectangle that must be visible */
2274 /* Mark parts of a window as needing a redraw */
2276 user_handle_t window; /* handle to the window */
2277 unsigned int flags; /* RDW_* flags */
2278 VARARG(region,rectangles); /* list of rectangles for the region */
2282 /* Set a window property */
2283 @REQ(set_window_property)
2284 user_handle_t window; /* handle to the window */
2285 atom_t atom; /* property atom (if no name specified) */
2286 obj_handle_t handle; /* handle to store */
2287 VARARG(name,unicode_str); /* property name */
2291 /* Remove a window property */
2292 @REQ(remove_window_property)
2293 user_handle_t window; /* handle to the window */
2294 atom_t atom; /* property atom (if no name specified) */
2295 VARARG(name,unicode_str); /* property name */
2297 obj_handle_t handle; /* handle stored in property */
2301 /* Get a window property */
2302 @REQ(get_window_property)
2303 user_handle_t window; /* handle to the window */
2304 atom_t atom; /* property atom (if no name specified) */
2305 VARARG(name,unicode_str); /* property name */
2307 obj_handle_t handle; /* handle stored in property */
2311 /* Get the list of properties of a window */
2312 @REQ(get_window_properties)
2313 user_handle_t window; /* handle to the window */
2315 int total; /* total number of properties */
2316 VARARG(props,properties); /* list of properties */
2320 /* Create a window station */
2321 @REQ(create_winstation)
2322 unsigned int flags; /* window station flags */
2323 unsigned int access; /* wanted access rights */
2324 unsigned int attributes; /* object attributes */
2325 VARARG(name,unicode_str); /* object name */
2327 obj_handle_t handle; /* handle to the window station */
2331 /* Open a handle to a window station */
2332 @REQ(open_winstation)
2333 unsigned int access; /* wanted access rights */
2334 unsigned int attributes; /* object attributes */
2335 VARARG(name,unicode_str); /* object name */
2337 obj_handle_t handle; /* handle to the window station */
2341 /* Close a window station */
2342 @REQ(close_winstation)
2343 obj_handle_t handle; /* handle to the window station */
2347 /* Get the process current window station */
2348 @REQ(get_process_winstation)
2350 obj_handle_t handle; /* handle to the window station */
2354 /* Set the process current window station */
2355 @REQ(set_process_winstation)
2356 obj_handle_t handle; /* handle to the window station */
2360 /* Create a desktop */
2361 @REQ(create_desktop)
2362 unsigned int flags; /* desktop flags */
2363 unsigned int access; /* wanted access rights */
2364 unsigned int attributes; /* object attributes */
2365 VARARG(name,unicode_str); /* object name */
2367 obj_handle_t handle; /* handle to the desktop */
2371 /* Open a handle to a desktop */
2373 unsigned int flags; /* desktop flags */
2374 unsigned int access; /* wanted access rights */
2375 unsigned int attributes; /* object attributes */
2376 VARARG(name,unicode_str); /* object name */
2378 obj_handle_t handle; /* handle to the desktop */
2382 /* Close a desktop */
2384 obj_handle_t handle; /* handle to the desktop */
2388 /* Get the thread current desktop */
2389 @REQ(get_thread_desktop)
2390 thread_id_t tid; /* thread id */
2392 obj_handle_t handle; /* handle to the desktop */
2396 /* Set the thread current desktop */
2397 @REQ(set_thread_desktop)
2398 obj_handle_t handle; /* handle to the desktop */
2402 /* Get/set information about a user object (window station or desktop) */
2403 @REQ(set_user_object_info)
2404 obj_handle_t handle; /* handle to the object */
2405 unsigned int flags; /* information to set */
2406 unsigned int obj_flags; /* new object flags */
2408 int is_desktop; /* is object a desktop? */
2409 unsigned int old_obj_flags; /* old object flags */
2410 VARARG(name,unicode_str); /* object name */
2412 #define SET_USER_OBJECT_FLAGS 1
2415 /* Attach (or detach) thread inputs */
2416 @REQ(attach_thread_input)
2417 thread_id_t tid_from; /* thread to be attached */
2418 thread_id_t tid_to; /* thread to which tid_from should be attached */
2419 int attach; /* is it an attach? */
2423 /* Get input data for a given thread */
2424 @REQ(get_thread_input)
2425 thread_id_t tid; /* id of thread */
2427 user_handle_t focus; /* handle to the focus window */
2428 user_handle_t capture; /* handle to the capture window */
2429 user_handle_t active; /* handle to the active window */
2430 user_handle_t foreground; /* handle to the global foreground window */
2431 user_handle_t menu_owner; /* handle to the menu owner */
2432 user_handle_t move_size; /* handle to the moving/resizing window */
2433 user_handle_t caret; /* handle to the caret window */
2434 rectangle_t rect; /* caret rectangle */
2438 /* Get the time of the last input event */
2439 @REQ(get_last_input_time)
2445 /* Retrieve queue keyboard state for a given thread */
2447 thread_id_t tid; /* id of thread */
2448 int key; /* optional key code or -1 */
2450 unsigned char state; /* state of specified key */
2451 VARARG(keystate,bytes); /* state array for all the keys */
2454 /* Set queue keyboard state for a given thread */
2456 thread_id_t tid; /* id of thread */
2457 VARARG(keystate,bytes); /* state array for all the keys */
2460 /* Set the system foreground window */
2461 @REQ(set_foreground_window)
2462 user_handle_t handle; /* handle to the foreground window */
2464 user_handle_t previous; /* handle to the previous foreground window */
2465 int send_msg_old; /* whether we have to send a msg to the old window */
2466 int send_msg_new; /* whether we have to send a msg to the new window */
2469 /* Set the current thread focus window */
2470 @REQ(set_focus_window)
2471 user_handle_t handle; /* handle to the focus window */
2473 user_handle_t previous; /* handle to the previous focus window */
2476 /* Set the current thread active window */
2477 @REQ(set_active_window)
2478 user_handle_t handle; /* handle to the active window */
2480 user_handle_t previous; /* handle to the previous active window */
2483 /* Set the current thread capture window */
2484 @REQ(set_capture_window)
2485 user_handle_t handle; /* handle to the capture window */
2486 unsigned int flags; /* capture flags (see below) */
2488 user_handle_t previous; /* handle to the previous capture window */
2489 user_handle_t full_handle; /* full 32-bit handle of new capture window */
2491 #define CAPTURE_MENU 0x01 /* capture is for a menu */
2492 #define CAPTURE_MOVESIZE 0x02 /* capture is for moving/resizing */
2495 /* Set the current thread caret window */
2496 @REQ(set_caret_window)
2497 user_handle_t handle; /* handle to the caret window */
2498 int width; /* caret width */
2499 int height; /* caret height */
2501 user_handle_t previous; /* handle to the previous caret window */
2502 rectangle_t old_rect; /* previous caret rectangle */
2503 int old_hide; /* previous hide count */
2504 int old_state; /* previous caret state (1=on, 0=off) */
2508 /* Set the current thread caret information */
2509 @REQ(set_caret_info)
2510 unsigned int flags; /* caret flags (see below) */
2511 user_handle_t handle; /* handle to the caret window */
2512 int x; /* caret x position */
2513 int y; /* caret y position */
2514 int hide; /* increment for hide count (can be negative to show it) */
2515 int state; /* caret state (1=on, 0=off, -1=toggle current state) */
2517 user_handle_t full_handle; /* handle to the current caret window */
2518 rectangle_t old_rect; /* previous caret rectangle */
2519 int old_hide; /* previous hide count */
2520 int old_state; /* previous caret state (1=on, 0=off) */
2522 #define SET_CARET_POS 0x01 /* set the caret position from x,y */
2523 #define SET_CARET_HIDE 0x02 /* increment the caret hide count */
2524 #define SET_CARET_STATE 0x04 /* set the caret on/off state */
2527 /* Set a window hook */
2529 int id; /* id of the hook */
2530 process_id_t pid; /* id of process to set the hook into */
2531 thread_id_t tid; /* id of thread to set the hook into */
2535 void* proc; /* hook procedure */
2536 int unicode; /* is it a unicode hook? */
2537 VARARG(module,unicode_str); /* module name */
2539 user_handle_t handle; /* handle to the hook */
2540 unsigned int active_hooks; /* active hooks bitmap */
2544 /* Remove a window hook */
2546 user_handle_t handle; /* handle to the hook */
2547 int id; /* id of the hook if handle is 0 */
2548 void* proc; /* hook procedure if handle is 0 */
2550 unsigned int active_hooks; /* active hooks bitmap */
2554 /* Start calling a hook chain */
2555 @REQ(start_hook_chain)
2556 int id; /* id of the hook */
2557 int event; /* signalled event */
2558 user_handle_t window; /* handle to the event window */
2559 int object_id; /* object id for out of context winevent */
2560 int child_id; /* child id for out of context winevent */
2562 user_handle_t handle; /* handle to the next hook */
2563 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2564 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2565 void* proc; /* hook procedure */
2566 int unicode; /* is it a unicode hook? */
2567 unsigned int active_hooks; /* active hooks bitmap */
2568 VARARG(module,unicode_str); /* module name */
2572 /* Finished calling a hook chain */
2573 @REQ(finish_hook_chain)
2574 int id; /* id of the hook */
2578 /* Get the hook information */
2580 user_handle_t handle; /* handle to the current hook */
2581 int get_next; /* do we want info about current or next hook? */
2582 int event; /* signalled event */
2583 user_handle_t window; /* handle to the event window */
2584 int object_id; /* object id for out of context winevent */
2585 int child_id; /* child id for out of context winevent */
2587 user_handle_t handle; /* handle to the hook */
2588 int id; /* id of the hook */
2589 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2590 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2591 void* proc; /* hook procedure */
2592 int unicode; /* is it a unicode hook? */
2593 VARARG(module,unicode_str); /* module name */
2597 /* Create a window class */
2599 int local; /* is it a local class? */
2600 atom_t atom; /* class atom */
2601 unsigned int style; /* class style */
2602 void* instance; /* module instance */
2603 int extra; /* number of extra class bytes */
2604 int win_extra; /* number of window extra bytes */
2605 void* client_ptr; /* pointer to class in client address space */
2609 /* Destroy a window class */
2611 atom_t atom; /* class atom */
2612 void* instance; /* module instance */
2614 void* client_ptr; /* pointer to class in client address space */
2618 /* Set some information in a class */
2619 @REQ(set_class_info)
2620 user_handle_t window; /* handle to the window */
2621 unsigned int flags; /* flags for info to set (see below) */
2622 atom_t atom; /* class atom */
2623 unsigned int style; /* class style */
2624 int win_extra; /* number of window extra bytes */
2625 void* instance; /* module instance */
2626 int extra_offset; /* offset to set in extra bytes */
2627 data_size_t extra_size; /* size to set in extra bytes */
2628 unsigned long extra_value; /* value to set in extra bytes */
2630 atom_t old_atom; /* previous class atom */
2631 unsigned int old_style; /* previous class style */
2632 int old_extra; /* previous number of class extra bytes */
2633 int old_win_extra; /* previous number of window extra bytes */
2634 void* old_instance; /* previous module instance */
2635 unsigned long old_extra_value; /* old value in extra bytes */
2637 #define SET_CLASS_ATOM 0x0001
2638 #define SET_CLASS_STYLE 0x0002
2639 #define SET_CLASS_WINEXTRA 0x0004
2640 #define SET_CLASS_INSTANCE 0x0008
2641 #define SET_CLASS_EXTRA 0x0010
2644 /* Set/get clipboard information */
2645 @REQ(set_clipboard_info)
2646 unsigned int flags; /* flags for fields to set (see below) */
2647 user_handle_t clipboard; /* clipboard window */
2648 user_handle_t owner; /* clipboard owner */
2649 user_handle_t viewer; /* first clipboard viewer */
2650 unsigned int seqno; /* change sequence number */
2652 unsigned int flags; /* status flags (see below) */
2653 user_handle_t old_clipboard; /* old clipboard window */
2654 user_handle_t old_owner; /* old clipboard owner */
2655 user_handle_t old_viewer; /* old clipboard viewer */
2656 unsigned int seqno; /* current sequence number */
2659 #define SET_CB_OPEN 0x001
2660 #define SET_CB_OWNER 0x002
2661 #define SET_CB_VIEWER 0x004
2662 #define SET_CB_SEQNO 0x008
2663 #define SET_CB_RELOWNER 0x010
2664 #define SET_CB_CLOSE 0x020
2665 #define CB_OPEN 0x040
2666 #define CB_OWNER 0x080
2667 #define CB_PROCESS 0x100
2670 /* Open a security token */
2672 obj_handle_t handle; /* handle to the thread or process */
2673 unsigned int access; /* access rights to the new token */
2674 unsigned int attributes;/* object attributes */
2675 unsigned int flags; /* flags (see below) */
2677 obj_handle_t token; /* handle to the token */
2679 #define OPEN_TOKEN_THREAD 1
2680 #define OPEN_TOKEN_AS_SELF 2
2683 /* Set/get the global windows */
2684 @REQ(set_global_windows)
2685 unsigned int flags; /* flags for fields to set (see below) */
2686 user_handle_t shell_window; /* handle to the new shell window */
2687 user_handle_t shell_listview; /* handle to the new shell listview window */
2688 user_handle_t progman_window; /* handle to the new program manager window */
2689 user_handle_t taskman_window; /* handle to the new task manager window */
2691 user_handle_t old_shell_window; /* handle to the shell window */
2692 user_handle_t old_shell_listview; /* handle to the shell listview window */
2693 user_handle_t old_progman_window; /* handle to the new program manager window */
2694 user_handle_t old_taskman_window; /* handle to the new task manager window */
2696 #define SET_GLOBAL_SHELL_WINDOWS 0x01 /* set both main shell and listview windows */
2697 #define SET_GLOBAL_PROGMAN_WINDOW 0x02
2698 #define SET_GLOBAL_TASKMAN_WINDOW 0x04
2700 /* Adjust the privileges held by a token */
2701 @REQ(adjust_token_privileges)
2702 obj_handle_t handle; /* handle to the token */
2703 int disable_all; /* disable all privileges? */
2704 int get_modified_state; /* get modified privileges? */
2705 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to enable/disable/remove */
2707 unsigned int len; /* total length in bytes required to store token privileges */
2708 VARARG(privileges,LUID_AND_ATTRIBUTES); /* modified privileges */
2711 /* Retrieves the set of privileges held by or available to a token */
2712 @REQ(get_token_privileges)
2713 obj_handle_t handle; /* handle to the token */
2715 unsigned int len; /* total length in bytes required to store token privileges */
2716 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
2719 /* Check the token has the required privileges */
2720 @REQ(check_token_privileges)
2721 obj_handle_t handle; /* handle to the token */
2722 int all_required; /* are all the privileges required for the check to succeed? */
2723 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to check */
2725 int has_privileges; /* does the token have the required privileges? */
2726 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
2729 @REQ(duplicate_token)
2730 obj_handle_t handle; /* handle to the token to duplicate */
2731 unsigned int access; /* access rights to the new token */
2732 unsigned int attributes; /* object attributes */
2733 int primary; /* is the new token to be a primary one? */
2734 int impersonation_level; /* impersonation level of the new token */
2736 obj_handle_t new_handle; /* duplicated handle */
2740 obj_handle_t handle; /* handle to the token */
2741 unsigned int desired_access; /* desired access to the object */
2742 unsigned int mapping_read; /* mapping from generic read to specific rights */
2743 unsigned int mapping_write; /* mapping from generic write to specific rights */
2744 unsigned int mapping_execute; /* mapping from generic execute to specific rights */
2745 unsigned int mapping_all; /* mapping from generic all to specific rights */
2746 VARARG(sd,security_descriptor); /* security descriptor to check */
2748 unsigned int access_granted; /* access rights actually granted */
2749 unsigned int access_status; /* was access granted? */
2750 unsigned int privileges_len; /* length needed to store privileges */
2751 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges used during access check */
2754 @REQ(get_token_user)
2755 obj_handle_t handle; /* handle to the token */
2757 data_size_t user_len; /* length needed to store user */
2758 VARARG(user,SID); /* sid of the user the token represents */
2761 @REQ(get_token_groups)
2762 obj_handle_t handle; /* handle to the token */
2764 data_size_t user_len; /* length needed to store user */
2765 VARARG(user,token_groups); /* groups the token's user belongs to
*/
2768 @
REQ(set_security_object
)
2769 obj_handle_t handle
; /* handle to the object
*/
2770 unsigned int security_info
; /* which parts of security descriptor to set
*/
2771 VARARG(sd
,security_descriptor
); /* security descriptor to set
*/
2774 /* Create a mailslot
*/
2775 @
REQ(create_mailslot
)
2776 unsigned int access
; /* wanted access rights
*/
2777 unsigned int attributes
; /* object attributes
*/
2778 obj_handle_t rootdir
; /* root directory
*/
2779 unsigned int max_msgsize
;
2781 VARARG(name
,unicode_str
); /* mailslot name
*/
2783 obj_handle_t handle
; /* handle to the mailslot
*/
2787 /* Open an existing mailslot
*/
2789 unsigned int access
;
2790 unsigned int attributes
; /* object attributes
*/
2791 obj_handle_t rootdir
; /* root directory
*/
2792 unsigned int sharing
; /* sharing mode
*/
2793 VARARG(name
,unicode_str
); /* mailslot name
*/
2795 obj_handle_t handle
; /* handle to the mailslot
*/
2799 /* Set mailslot information
*/
2800 @
REQ(set_mailslot_info
)
2801 obj_handle_t handle
; /* handle to the mailslot
*/
2805 unsigned int max_msgsize
;
2808 #define MAILSLOT_SET_READ_TIMEOUT
1
2811 /* Create a directory object
*/
2812 @
REQ(create_directory
)
2813 unsigned int access
; /* access flags
*/
2814 unsigned int attributes
; /* object attributes
*/
2815 obj_handle_t rootdir
; /* root directory
*/
2816 VARARG(directory_name
,unicode_str
); /* Directory name
*/
2818 obj_handle_t handle
; /* handle to the directory
*/
2822 /* Open a directory object
*/
2823 @
REQ(open_directory
)
2824 unsigned int access
; /* access flags
*/
2825 unsigned int attributes
; /* object attributes
*/
2826 obj_handle_t rootdir
; /* root directory
*/
2827 VARARG(directory_name
,unicode_str
); /* Directory name
*/
2829 obj_handle_t handle
; /* handle to the directory
*/
2833 /* Create a symbolic link object
*/
2834 @
REQ(create_symlink
)
2835 unsigned int access
; /* access flags
*/
2836 unsigned int attributes
; /* object attributes
*/
2837 obj_handle_t rootdir
; /* root directory
*/
2838 data_size_t name_len
; /* length of the symlink name in bytes
*/
2839 VARARG(name
,unicode_str
,name_len
); /* symlink name
*/
2840 VARARG(target_name
,unicode_str
); /* target name
*/
2842 obj_handle_t handle
; /* handle to the symlink
*/
2846 /* Open a symbolic link object
*/
2848 unsigned int access
; /* access flags
*/
2849 unsigned int attributes
; /* object attributes
*/
2850 obj_handle_t rootdir
; /* root directory
*/
2851 VARARG(name
,unicode_str
); /* symlink name
*/
2853 obj_handle_t handle
; /* handle to the symlink
*/
2857 /* Query a symbolic link object
*/
2859 obj_handle_t handle
; /* handle to the symlink
*/
2861 VARARG(target_name
,unicode_str
); /* target name
*/
2865 /* Query basic object information
*/
2866 @
REQ(get_object_info
)
2867 obj_handle_t handle
; /* handle to the object
*/
2869 unsigned int access
; /* granted access mask
*/
2870 unsigned int ref_count
; /* object ref count
*/
2873 /* Query the impersonation level of an impersonation token
*/
2874 @
REQ(get_token_impersonation_level
)
2875 obj_handle_t handle
; /* handle to the object
*/
2877 int impersonation_level
; /* impersonation level of the impersonation token
*/
2880 /* Allocate a locally
-unique identifier
*/
2881 @
REQ(allocate_locally_unique_id
)