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 unsigned int obj_handle_t
;
35 typedef unsigned int user_handle_t
;
36 typedef unsigned int atom_t
;
37 typedef unsigned int process_id_t
;
38 typedef unsigned int thread_id_t
;
39 typedef unsigned int data_size_t
;
40 typedef unsigned int ioctl_code_t
;
41 typedef unsigned __int64 lparam_t
;
42 typedef unsigned __int64 apc_param_t
;
43 typedef unsigned __int64 mem_size_t
;
44 typedef unsigned __int64 file_pos_t
;
45 typedef unsigned __int64 client_ptr_t
;
46 typedef unsigned __int64 affinity_t
;
47 typedef client_ptr_t mod_handle_t
;
51 int req
; /* request code
*/
52 data_size_t request_size
; /* request variable part size
*/
53 data_size_t reply_size
; /* reply variable part maximum size
*/
58 unsigned int error
; /* error result
*/
59 data_size_t reply_size
; /* reply variable part size
*/
62 /* placeholder structure for the maximum allowed request size
*/
63 /* this is used to construct the generic_request union
*/
64 struct request_max_size
66 int pad
[16]; /* the max request size is
16 ints
*/
69 #define FIRST_USER_HANDLE
0x0020 /* first possible value for low word of user handle
*/
70 #define LAST_USER_HANDLE
0xffef /* last possible value for low word of user handle
*/
73 /* debug event data
*/
76 int code
; /* event code
*/
79 int code
; /* DbgExceptionStateChange
*/
80 int first
; /* first chance exception?
*/
81 unsigned int exc_code
; /* exception code
*/
82 unsigned int flags
; /* exception flags
*/
83 client_ptr_t record
; /* exception record
*/
84 client_ptr_t address
; /* exception address
*/
85 int nb_params
; /* number of parameters
*/
87 client_ptr_t params
[15]; /* parameters
*/
91 int code
; /* DbgCreateThreadStateChange
*/
92 obj_handle_t handle
; /* handle to the new thread
*/
93 client_ptr_t start
; /* thread startup routine
*/
97 int code
; /* DbgCreateProcessStateChange
*/
98 obj_handle_t file
; /* handle to the process exe file
*/
99 obj_handle_t process
; /* handle to the new process
*/
100 obj_handle_t thread
; /* handle to the new thread
*/
101 mod_handle_t base
; /* base of executable image
*/
102 int dbg_offset
; /* offset of debug info in file
*/
103 int dbg_size
; /* size of debug info
*/
104 client_ptr_t start
; /* thread startup routine
*/
108 int code
; /* DbgExitThreadStateChange
/DbgExitProcessStateChange
*/
109 int exit_code
; /* thread or process exit code
*/
113 int code
; /* DbgLoadDllStateChange
*/
114 obj_handle_t handle
; /* file handle for the dll
*/
115 mod_handle_t base
; /* base address of the dll
*/
116 int dbg_offset
; /* offset of debug info in file
*/
117 int dbg_size
; /* size of debug info
*/
118 client_ptr_t name
; /* image
name (optional
) */
122 int code
; /* DbgUnloadDllStateChange
*/
124 mod_handle_t base
; /* base address of the dll
*/
131 unsigned int machine
; /* machine type
*/
132 unsigned int flags
; /* SERVER_CTX_
* flags
*/
135 struct
{ unsigned int eip
, ebp
, esp
, eflags
, cs
, ss
; } i386_regs
;
136 struct
{ unsigned __int64 rip
, rbp
, rsp
;
137 unsigned int cs
, ss
, flags
, __pad
; } x86_64_regs
;
138 struct
{ unsigned int sp
, lr
, pc
, cpsr
; } arm_regs
;
139 struct
{ unsigned __int64 sp
, pc
, pstate
; } arm64_regs
;
140 } ctl
; /* selected by SERVER_CTX_CONTROL
*/
143 struct
{ unsigned int eax
, ebx
, ecx
, edx
, esi
, edi
; } i386_regs
;
144 struct
{ unsigned __int64 rax
,rbx
, rcx
, rdx
, rsi
, rdi
,
145 r8
, r9
, r10
, r11
, r12
, r13
, r14
, r15
; } x86_64_regs
;
146 struct
{ unsigned int r
[13]; } arm_regs
;
147 struct
{ unsigned __int64 x
[31]; } arm64_regs
;
148 } integer
; /* selected by SERVER_CTX_INTEGER
*/
151 struct
{ unsigned int ds
, es
, fs
, gs
; } i386_regs
;
152 struct
{ unsigned int ds
, es
, fs
, gs
; } x86_64_regs
;
153 } seg
; /* selected by SERVER_CTX_SEGMENTS
*/
156 struct
{ unsigned int ctrl
, status
, tag
, err_off
, err_sel
, data_off
, data_sel
, cr0npx
;
157 unsigned char regs
[80]; } i386_regs
;
158 struct
{ struct
{ unsigned __int64 low
, high
; } fpregs
[32]; } x86_64_regs
;
159 struct
{ unsigned __int64 d
[32]; unsigned int fpscr
; } arm_regs
;
160 struct
{ struct
{ unsigned __int64 low
, high
; } q
[32]; unsigned int fpcr
, fpsr
; } arm64_regs
;
161 } fp
; /* selected by SERVER_CTX_FLOATING_POINT
*/
164 struct
{ unsigned int dr0
, dr1
, dr2
, dr3
, dr6
, dr7
; } i386_regs
;
165 struct
{ unsigned __int64 dr0
, dr1
, dr2
, dr3
, dr6
, dr7
; } x86_64_regs
;
166 struct
{ unsigned int bvr
[8], bcr
[8], wvr
[1], wcr
[1]; } arm_regs
;
167 struct
{ unsigned __int64 bvr
[8], wvr
[2]; unsigned int bcr
[8], wcr
[2]; } arm64_regs
;
168 } debug
; /* selected by SERVER_CTX_DEBUG_REGISTERS
*/
171 unsigned char i386_regs
[512];
172 } ext
; /* selected by SERVER_CTX_EXTENDED_REGISTERS
*/
175 struct
{ struct
{ unsigned __int64 low
, high
; } ymm_high
[16]; } regs
;
176 } ymm
; /* selected by SERVER_CTX_YMM_REGISTERS
*/
179 #define SERVER_CTX_CONTROL
0x01
180 #define SERVER_CTX_INTEGER
0x02
181 #define SERVER_CTX_SEGMENTS
0x04
182 #define SERVER_CTX_FLOATING_POINT
0x08
183 #define SERVER_CTX_DEBUG_REGISTERS
0x10
184 #define SERVER_CTX_EXTENDED_REGISTERS
0x20
185 #define SERVER_CTX_YMM_REGISTERS
0x40
187 /* structure used in sending an fd from client to server
*/
190 thread_id_t tid
; /* thread id
*/
191 int fd
; /* file descriptor on client
-side
*/
194 /* structure sent by the server on the wait fifo
*/
197 client_ptr_t cookie
; /* magic cookie that was passed in select_request
*/
198 int signaled
; /* wait result
*/
202 /* NT
-style timeout
, in
100ns units
, negative means relative timeout
*/
203 typedef __int64 timeout_t
;
204 #define
TIMEOUT_INFINITE (((timeout_t
)0x7fffffff) << 32 |
0xffffffff)
206 /* absolute timeout
, negative means that monotonic clock is used
*/
207 typedef __int64 abstime_t
;
209 /* structure for process startup info
*/
212 unsigned int debug_flags
;
213 unsigned int console_flags
;
214 obj_handle_t console
;
216 obj_handle_t hstdout
;
217 obj_handle_t hstderr
;
224 unsigned int attribute
;
227 process_id_t process_group_id
;
228 data_size_t curdir_len
;
229 data_size_t dllpath_len
;
230 data_size_t imagepath_len
;
231 data_size_t cmdline_len
;
232 data_size_t title_len
;
233 data_size_t desktop_len
;
234 data_size_t shellinfo_len
;
235 data_size_t runtime_len
;
236 /* VARARG(curdir
,unicode_str
,curdir_len
); */
237 /* VARARG(dllpath
,unicode_str
,dllpath_len
); */
238 /* VARARG(imagepath
,unicode_str
,imagepath_len
); */
239 /* VARARG(cmdline
,unicode_str
,cmdline_len
); */
240 /* VARARG(title
,unicode_str
,title_len
); */
241 /* VARARG(desktop
,unicode_str
,desktop_len
); */
242 /* VARARG(shellinfo
,unicode_str
,shellinfo_len
); */
243 /* VARARG(runtime
,unicode_str
,runtime_len
); */
246 /* structure returned in the list of window properties
*/
249 atom_t atom
; /* property atom
*/
250 int string
; /* was atom a string originally?
*/
251 lparam_t data
; /* data stored in property
*/
254 /* structure to specify window rectangles
*/
263 /* structure for parameters of async I
/O calls
*/
266 obj_handle_t handle
; /* object to perform I
/O on
*/
267 obj_handle_t event
; /* event to signal when done
*/
268 client_ptr_t iosb
; /* I
/O status block in client addr space
*/
269 client_ptr_t user
; /* opaque user data containing callback pointer and async
-specific data
*/
270 client_ptr_t apc
; /* user APC to call
*/
271 apc_param_t apc_context
; /* user APC context or completion value
*/
274 /* structures for extra message data
*/
278 unsigned int device
; /* source
device (IMDT_
* values
) */
279 unsigned int origin
; /* source
origin (IMO_
* values
) */
287 int type
; /* RIM_TYPEKEYBOARD
*/
288 unsigned int message
; /* message generated by this rawinput event
*/
289 unsigned short vkey
; /* virtual key code
*/
290 unsigned short scan
; /* scan code
*/
294 int type
; /* RIM_TYPEMOUSE
*/
295 int x
; /* x coordinate
*/
296 int y
; /* y coordinate
*/
297 unsigned int data
; /* mouse data
*/
301 int type
; /* RIM_TYPEHID
*/
302 unsigned int device
; /* rawinput device index
*/
303 unsigned int param
; /* rawinput message param
*/
304 unsigned short usage_page
;/* HID usage page
*/
305 unsigned short usage
; /* HID usage
*/
306 unsigned int count
; /* HID report count
*/
307 unsigned int length
; /* HID report length
*/
311 struct hardware_msg_data
313 lparam_t info
; /* extra info
*/
314 data_size_t size
; /* size of hardware message data
*/
316 unsigned int hw_id
; /* unique id
*/
317 unsigned int flags
; /* hook flags
*/
318 struct hw_msg_source source
; /* message source
*/
319 union rawinput rawinput
; /* rawinput message data
*/
322 struct callback_msg_data
324 client_ptr_t callback
; /* callback function
*/
325 lparam_t data
; /* user data for callback
*/
326 lparam_t result
; /* message result
*/
329 struct winevent_msg_data
331 user_handle_t hook
; /* hook handle
*/
332 thread_id_t tid
; /* thread id
*/
333 client_ptr_t hook_proc
; /* hook proc address
*/
334 /* followed by module name if any
*/
342 int type
; /* INPUT_KEYBOARD
*/
343 unsigned short vkey
; /* virtual key code
*/
344 unsigned short scan
; /* scan code
*/
345 unsigned int flags
; /* event flags
*/
346 unsigned int time
; /* event time
*/
347 lparam_t info
; /* extra info
*/
351 int type
; /* INPUT_MOUSE
*/
352 int x
; /* coordinates
*/
354 unsigned int data
; /* mouse data
*/
355 unsigned int flags
; /* event flags
*/
356 unsigned int time
; /* event time
*/
357 lparam_t info
; /* extra info
*/
361 int type
; /* INPUT_HARDWARE
*/
362 unsigned int msg
; /* message code
*/
363 lparam_t lparam
; /* message param
*/
364 union rawinput rawinput
;/* rawinput message data
*/
370 unsigned char bytes
[1]; /* raw data for sent messages
*/
371 struct hardware_msg_data hardware
;
372 struct callback_msg_data callback
;
373 struct winevent_msg_data winevent
;
376 /* structure returned in filesystem events
*/
377 struct filesystem_event
386 unsigned int low_part
;
398 unsigned char revision
;
401 unsigned short count
;
407 unsigned char revision
;
408 unsigned char sub_count
;
409 unsigned char id_auth
[6];
410 unsigned int sub_auth
[15];
421 #define MAX_ACL_LEN
65535
423 struct security_descriptor
425 unsigned int control
; /* SE_ flags
*/
426 data_size_t owner_len
;
427 data_size_t group_len
;
428 data_size_t sacl_len
;
429 data_size_t dacl_len
;
430 /* VARARG(owner
,sid
); */
431 /* VARARG(group
,sid
); */
432 /* VARARG(sacl
,acl
); */
433 /* VARARG(dacl
,acl
); */
436 struct object_attributes
438 obj_handle_t rootdir
; /* root directory
*/
439 unsigned int attributes
; /* object attributes
*/
440 data_size_t sd_len
; /* length of security_descriptor data. may be
0 */
441 data_size_t name_len
; /* length of the name string. may be
0 */
442 /* VARARG(sd
,security_descriptor
); */
443 /* VARARG(name
,unicode_str
); */
446 struct object_type_info
448 data_size_t name_len
; /* length of the name string
*/
449 unsigned int index
; /* type index in global table
*/
450 unsigned int obj_count
; /* count of objects of this type
*/
451 unsigned int handle_count
; /* count of handles of this type
*/
452 unsigned int obj_max
; /* max count of objects of this type
*/
453 unsigned int handle_max
; /* max count of handles of this type
*/
454 unsigned int valid_access
; /* mask for valid access bits
*/
455 generic_map_t mapping
; /* generic access mappings
*/
456 /* VARARG(name
,unicode_str
); */
464 SELECT_SIGNAL_AND_WAIT
,
465 SELECT_KEYED_EVENT_WAIT
,
466 SELECT_KEYED_EVENT_RELEASE
474 enum select_op op
; /* SELECT_WAIT or SELECT_WAIT_ALL
*/
475 obj_handle_t handles
[MAXIMUM_WAIT_OBJECTS
];
480 enum select_op op
; /* SELECT_SIGNAL_AND_WAIT
*/
482 obj_handle_t signal
; /* must be last in the structure so we can remove it on retries
*/
486 enum select_op op
; /* SELECT_KEYED_EVENT_WAIT or SELECT_KEYED_EVENT_RELEASE
*/
498 APC_VIRTUAL_ALLOC_EX
,
514 enum apc_type type
; /* APC_USER
*/
516 client_ptr_t func
; /* void (__stdcall
*func
)(ULONG_PTR
,ULONG_PTR
,ULONG_PTR
); */
517 apc_param_t args
[3]; /* arguments for user function
*/
526 enum apc_type type
; /* APC_ASYNC_IO
*/
527 unsigned int status
; /* I
/O status
*/
528 client_ptr_t user
; /* user pointer
*/
529 client_ptr_t sb
; /* status block
*/
530 data_size_t result
; /* result size
*/
534 enum apc_type type
; /* APC_VIRTUAL_ALLOC
*/
535 unsigned int op_type
; /* type of operation
*/
536 client_ptr_t addr
; /* requested address
*/
537 mem_size_t size
; /* allocation size
*/
538 mem_size_t zero_bits
; /* number of zero high bits
*/
539 unsigned int prot
; /* memory protection flags
*/
543 enum apc_type type
; /* APC_VIRTUAL_ALLOC
*/
544 unsigned int op_type
; /* type of operation
*/
545 client_ptr_t addr
; /* requested address
*/
546 mem_size_t size
; /* allocation size
*/
547 mem_size_t limit_low
; /* allocation address limits
*/
548 mem_size_t limit_high
;
549 mem_size_t align
; /* allocation alignment
*/
550 unsigned int prot
; /* memory protection flags
*/
551 unsigned int attributes
; /* memory extended attributes
*/
555 enum apc_type type
; /* APC_VIRTUAL_FREE
*/
556 unsigned int op_type
; /* type of operation
*/
557 client_ptr_t addr
; /* requested address
*/
558 mem_size_t size
; /* allocation size
*/
562 enum apc_type type
; /* APC_VIRTUAL_QUERY
*/
564 client_ptr_t addr
; /* requested address
*/
568 enum apc_type type
; /* APC_VIRTUAL_PROTECT
*/
569 unsigned int prot
; /* new protection flags
*/
570 client_ptr_t addr
; /* requested address
*/
571 mem_size_t size
; /* requested size
*/
575 enum apc_type type
; /* APC_VIRTUAL_FLUSH
*/
577 client_ptr_t addr
; /* requested address
*/
578 mem_size_t size
; /* requested size
*/
582 enum apc_type type
; /* APC_VIRTUAL_LOCK
*/
584 client_ptr_t addr
; /* requested address
*/
585 mem_size_t size
; /* requested size
*/
589 enum apc_type type
; /* APC_VIRTUAL_UNLOCK
*/
591 client_ptr_t addr
; /* requested address
*/
592 mem_size_t size
; /* requested size
*/
596 enum apc_type type
; /* APC_MAP_VIEW
*/
597 obj_handle_t handle
; /* mapping handle
*/
598 client_ptr_t addr
; /* requested address
*/
599 mem_size_t size
; /* allocation size
*/
600 file_pos_t offset
; /* file offset
*/
601 mem_size_t zero_bits
; /* number of zero high bits
*/
602 unsigned int alloc_type
; /* allocation type
*/
603 unsigned int prot
; /* memory protection flags
*/
607 enum apc_type type
; /* APC_MAP_VIEW_EX
*/
608 obj_handle_t handle
; /* mapping handle
*/
609 client_ptr_t addr
; /* requested address
*/
610 mem_size_t size
; /* allocation size
*/
611 file_pos_t offset
; /* file offset
*/
612 mem_size_t limit_low
; /* allocation address limits
*/
613 mem_size_t limit_high
;
614 unsigned int alloc_type
; /* allocation type
*/
615 unsigned int prot
; /* memory protection flags
*/
616 unsigned short machine
; /* requested machine for image mappings
*/
617 unsigned short __pad
[3];
621 enum apc_type type
; /* APC_UNMAP_VIEW
*/
622 unsigned int flags
; /* unmap flags
*/
623 client_ptr_t addr
; /* view address
*/
627 enum apc_type type
; /* APC_CREATE_THREAD
*/
628 unsigned int flags
; /* creation flags
*/
629 client_ptr_t func
; /* void (__stdcall
*func
)(void*)
; start function
*/
630 client_ptr_t arg
; /* argument for start function
*/
631 mem_size_t zero_bits
; /* number of zero high bits for thread stack
*/
632 mem_size_t reserve
; /* reserve size for thread stack
*/
633 mem_size_t commit
; /* commit size for thread stack
*/
637 enum apc_type type
; /* APC_DUP_HANDLE
*/
638 obj_handle_t src_handle
; /* src handle to duplicate
*/
639 obj_handle_t dst_process
; /* dst process handle
*/
640 unsigned int access
; /* wanted access rights
*/
641 unsigned int attributes
; /* object attributes
*/
642 unsigned int options
; /* duplicate options
*/
651 enum apc_type type
; /* APC_ASYNC_IO
*/
652 unsigned int status
; /* new status of async operation
*/
653 unsigned int total
; /* bytes transferred
*/
657 enum apc_type type
; /* APC_VIRTUAL_ALLOC
*/
658 unsigned int status
; /* status returned by call
*/
659 client_ptr_t addr
; /* resulting address
*/
660 mem_size_t size
; /* resulting size
*/
664 enum apc_type type
; /* APC_VIRTUAL_ALLOC_EX
*/
665 unsigned int status
; /* status returned by call
*/
666 client_ptr_t addr
; /* resulting address
*/
667 mem_size_t size
; /* resulting size
*/
671 enum apc_type type
; /* APC_VIRTUAL_FREE
*/
672 unsigned int status
; /* status returned by call
*/
673 client_ptr_t addr
; /* resulting address
*/
674 mem_size_t size
; /* resulting size
*/
678 enum apc_type type
; /* APC_VIRTUAL_QUERY
*/
679 unsigned int status
; /* status returned by call
*/
680 client_ptr_t base
; /* resulting base address
*/
681 client_ptr_t alloc_base
;/* resulting allocation base
*/
682 mem_size_t size
; /* resulting region size
*/
683 unsigned short state
; /* resulting region state
*/
684 unsigned short prot
; /* resulting region protection
*/
685 unsigned short alloc_prot
;/* resulting allocation protection
*/
686 unsigned short alloc_type
;/* resulting region allocation type
*/
690 enum apc_type type
; /* APC_VIRTUAL_PROTECT
*/
691 unsigned int status
; /* status returned by call
*/
692 client_ptr_t addr
; /* resulting address
*/
693 mem_size_t size
; /* resulting size
*/
694 unsigned int prot
; /* old protection flags
*/
698 enum apc_type type
; /* APC_VIRTUAL_FLUSH
*/
699 unsigned int status
; /* status returned by call
*/
700 client_ptr_t addr
; /* resulting address
*/
701 mem_size_t size
; /* resulting size
*/
705 enum apc_type type
; /* APC_VIRTUAL_LOCK
*/
706 unsigned int status
; /* status returned by call
*/
707 client_ptr_t addr
; /* resulting address
*/
708 mem_size_t size
; /* resulting size
*/
712 enum apc_type type
; /* APC_VIRTUAL_UNLOCK
*/
713 unsigned int status
; /* status returned by call
*/
714 client_ptr_t addr
; /* resulting address
*/
715 mem_size_t size
; /* resulting size
*/
719 enum apc_type type
; /* APC_MAP_VIEW
*/
720 unsigned int status
; /* status returned by call
*/
721 client_ptr_t addr
; /* resulting address
*/
722 mem_size_t size
; /* resulting size
*/
726 enum apc_type type
; /* APC_MAP_VIEW_EX
*/
727 unsigned int status
; /* status returned by call
*/
728 client_ptr_t addr
; /* resulting address
*/
729 mem_size_t size
; /* resulting size
*/
733 enum apc_type type
; /* APC_UNMAP_VIEW
*/
734 unsigned int status
; /* status returned by call
*/
738 enum apc_type type
; /* APC_CREATE_THREAD
*/
739 unsigned int status
; /* status returned by call
*/
740 process_id_t pid
; /* process id
*/
741 thread_id_t tid
; /* thread id
*/
742 client_ptr_t teb
; /* thread
teb (in process address space
) */
743 obj_handle_t handle
; /* handle to new thread
*/
747 enum apc_type type
; /* APC_DUP_HANDLE
*/
748 unsigned int status
; /* status returned by call
*/
749 obj_handle_t handle
; /* duplicated handle in dst process
*/
753 enum apc_type type
; /* APC_BREAK_PROCESS
*/
754 unsigned int status
; /* status returned by call
*/
774 enum irp_type type
; /* irp call type
*/
777 enum irp_type type
; /* IRP_CALL_CREATE
*/
778 unsigned int access
; /* access rights
*/
779 unsigned int sharing
; /* sharing flags
*/
780 unsigned int options
; /* file options
*/
781 client_ptr_t device
; /* opaque ptr for the device
*/
782 obj_handle_t file
; /* file handle
*/
786 enum irp_type type
; /* IRP_CALL_CLOSE
*/
788 client_ptr_t file
; /* opaque ptr for the file object
*/
792 enum irp_type type
; /* IRP_CALL_READ
*/
793 unsigned int key
; /* driver key
*/
794 data_size_t out_size
; /* needed output size
*/
796 client_ptr_t file
; /* opaque ptr for the file object
*/
797 file_pos_t pos
; /* file position
*/
801 enum irp_type type
; /* IRP_CALL_WRITE
*/
802 unsigned int key
; /* driver key
*/
803 client_ptr_t file
; /* opaque ptr for the file object
*/
804 file_pos_t pos
; /* file position
*/
808 enum irp_type type
; /* IRP_CALL_FLUSH
*/
810 client_ptr_t file
; /* opaque ptr for the file object
*/
814 enum irp_type type
; /* IRP_CALL_IOCTL
*/
815 ioctl_code_t code
; /* ioctl code
*/
816 data_size_t out_size
; /* needed output size
*/
818 client_ptr_t file
; /* opaque ptr for the file object
*/
822 enum irp_type type
; /* IRP_CALL_VOLUME
*/
823 unsigned int info_class
;/* information class
*/
824 data_size_t out_size
; /* needed output size
*/
826 client_ptr_t file
; /* opaque ptr for the file object
*/
830 enum irp_type type
; /* IRP_CALL_FREE
*/
832 client_ptr_t obj
; /* opaque ptr for the freed object
*/
836 enum irp_type type
; /* IRP_CALL_CANCEL
*/
838 client_ptr_t irp
; /* opaque ptr for canceled irp
*/
842 /* information about a PE image mapping
, roughly equivalent to SECTION_IMAGE_INFORMATION
*/
846 client_ptr_t map_addr
;
847 mem_size_t stack_size
;
848 mem_size_t stack_commit
;
849 unsigned int entry_point
;
850 unsigned int map_size
;
851 unsigned int zerobits
;
852 unsigned int subsystem
;
853 unsigned short subsystem_minor
;
854 unsigned short subsystem_major
;
855 unsigned short osversion_major
;
856 unsigned short osversion_minor
;
857 unsigned short image_charact
;
858 unsigned short dll_charact
;
859 unsigned short machine
;
860 unsigned char contains_code
: 1;
861 unsigned char wine_builtin
: 1;
862 unsigned char wine_fakedll
: 1;
863 unsigned char image_flags
;
864 unsigned int loader_flags
;
865 unsigned int header_size
;
866 unsigned int file_size
;
867 unsigned int checksum
;
868 unsigned int dbg_offset
;
869 unsigned int dbg_size
;
871 #define IMAGE_FLAGS_ComPlusNativeReady
0x01
872 #define IMAGE_FLAGS_ComPlusILOnly
0x02
873 #define IMAGE_FLAGS_ImageDynamicallyRelocated
0x04
874 #define IMAGE_FLAGS_ImageMappedFlat
0x08
875 #define IMAGE_FLAGS_BaseBelow4gb
0x10
876 #define IMAGE_FLAGS_ComPlusPrefer32bit
0x20
878 struct rawinput_device
880 unsigned short usage_page
;
881 unsigned short usage
;
883 user_handle_t target
;
895 /****************************************************************/
896 /* Request declarations
*/
898 /* Create a new process from the context of the parent
*/
900 obj_handle_t token
; /* process token
*/
901 obj_handle_t debug
; /* process debug object
*/
902 obj_handle_t parent_process
; /* parent process
*/
903 unsigned int flags
; /* process creation flags
*/
904 int socket_fd
; /* file descriptor for process socket
*/
905 unsigned int access
; /* access rights for process object
*/
906 unsigned short machine
; /* architecture that the new process will use
*/
907 data_size_t info_size
; /* size of startup info
*/
908 data_size_t handles_size
; /* length of explicit handles list
*/
909 data_size_t jobs_size
; /* length of jobs list
*/
910 VARARG(objattr
,object_attributes
); /* object attributes
*/
911 VARARG(handles
,uints
,handles_size
); /* handles list
*/
912 VARARG(jobs
,uints
,jobs_size
); /* jobs list
*/
913 VARARG(info
,startup_info
,info_size
); /* startup information
*/
914 VARARG(env
,unicode_str
); /* environment for new process
*/
916 obj_handle_t info
; /* new process info handle
*/
917 process_id_t pid
; /* process id
*/
918 obj_handle_t handle
; /* process
handle (in the current process
) */
922 /* Retrieve information about a newly started process
*/
923 @
REQ(get_new_process_info
)
924 obj_handle_t info
; /* info handle returned from new_process_request
*/
926 int success
; /* did the process start successfully?
*/
927 int exit_code
; /* process exit code if failed
*/
931 /* Create a new thread
*/
933 obj_handle_t process
; /* process in which to create thread
*/
934 unsigned int access
; /* wanted access rights
*/
935 unsigned int flags
; /* thread creation flags
*/
936 int request_fd
; /* fd for request pipe
*/
937 VARARG(objattr
,object_attributes
); /* object attributes
*/
939 thread_id_t tid
; /* thread id
*/
940 obj_handle_t handle
; /* thread
handle (in the current process
) */
944 /* Retrieve the new process startup info
*/
945 @
REQ(get_startup_info
)
947 data_size_t info_size
; /* size of startup info
*/
948 unsigned short machine
; /* architecture for the new process
*/
949 VARARG(info
,startup_info
,info_size
); /* startup information
*/
950 VARARG(env
,unicode_str
); /* environment
*/
954 /* Signal the end of the process initialization
*/
955 @
REQ(init_process_done
)
956 client_ptr_t teb
; /* TEB of new
thread (in process address space
) */
957 client_ptr_t peb
; /* PEB of new
process (in process address space
) */
958 client_ptr_t ldt_copy
; /* address of LDT
copy (in process address space
) */
960 client_ptr_t entry
; /* process entry point
*/
961 int suspend
; /* is process suspended?
*/
965 /* Initialize the first thread of a new process
*/
966 @
REQ(init_first_thread
)
967 int unix_pid
; /* Unix pid of new process
*/
968 int unix_tid
; /* Unix tid of new thread
*/
969 int debug_level
; /* new debug level
*/
970 int reply_fd
; /* fd for reply pipe
*/
971 int wait_fd
; /* fd for blocking calls pipe
*/
973 process_id_t pid
; /* process id of the new thread
's process */
974 thread_id_t tid; /* thread id of the new thread */
975 timeout_t server_start; /* server start time */
976 unsigned int session_id; /* process session id */
977 data_size_t info_size; /* total size of startup info */
978 VARARG(machines,ushorts); /* array of supported machines */
982 /* Initialize a new thread; called from the child after pthread_create() */
984 int unix_tid; /* Unix tid of new thread */
985 int reply_fd; /* fd for reply pipe */
986 int wait_fd; /* fd for blocking calls pipe */
987 client_ptr_t teb; /* TEB of new thread (in thread address space) */
988 client_ptr_t entry; /* entry point (in thread address space) */
990 int suspend; /* is thread suspended? */
994 /* Terminate a process */
995 @REQ(terminate_process)
996 obj_handle_t handle; /* process handle to terminate */
997 int exit_code; /* process exit code */
999 int self; /* suicide? */
1003 /* Terminate a thread */
1004 @REQ(terminate_thread)
1005 obj_handle_t handle; /* thread handle to terminate */
1006 int exit_code; /* thread exit code */
1008 int self; /* suicide? */
1012 /* Retrieve information about a process */
1013 @REQ(get_process_info)
1014 obj_handle_t handle; /* process handle */
1016 process_id_t pid; /* server process id */
1017 process_id_t ppid; /* server process id of parent */
1018 affinity_t affinity; /* process affinity mask */
1019 client_ptr_t peb; /* PEB address in process address space */
1020 timeout_t start_time; /* process start time */
1021 timeout_t end_time; /* process end time */
1022 unsigned int session_id; /* process session id */
1023 int exit_code; /* process exit code */
1024 int priority; /* priority class */
1025 unsigned short machine; /* process architecture */
1026 VARARG(image,pe_image_info); /* image info for main exe */
1030 /* Retrieve debug information about a process */
1031 @REQ(get_process_debug_info)
1032 obj_handle_t handle; /* process handle */
1034 obj_handle_t debug; /* handle to debug port */
1035 int debug_children; /* inherit debugger to child processes */
1036 VARARG(image,pe_image_info); /* image info for main exe */
1040 /* Fetch the name of the process image */
1041 @REQ(get_process_image_name)
1042 obj_handle_t handle; /* process handle */
1043 int win32; /* return a win32 filename? */
1045 data_size_t len; /* len in bytes required to store filename */
1046 VARARG(name,unicode_str); /* image name for main exe */
1050 /* Retrieve information about a process memory usage */
1051 @REQ(get_process_vm_counters)
1052 obj_handle_t handle; /* process handle */
1054 mem_size_t peak_virtual_size; /* peak virtual memory in bytes */
1055 mem_size_t virtual_size; /* virtual memory in bytes */
1056 mem_size_t peak_working_set_size; /* peak real memory in bytes */
1057 mem_size_t working_set_size; /* real memory in bytes */
1058 mem_size_t pagefile_usage; /* commit charge in bytes */
1059 mem_size_t peak_pagefile_usage; /* peak commit charge in bytes */
1063 /* Set a process information */
1064 @REQ(set_process_info)
1065 obj_handle_t handle; /* process handle */
1066 int mask; /* setting mask (see below) */
1067 int priority; /* priority class */
1068 affinity_t affinity; /* affinity mask */
1070 #define SET_PROCESS_INFO_PRIORITY 0x01
1071 #define SET_PROCESS_INFO_AFFINITY 0x02
1074 /* Retrieve information about a thread */
1075 @REQ(get_thread_info)
1076 obj_handle_t handle; /* thread handle */
1077 unsigned int access; /* required access rights */
1079 process_id_t pid; /* server process id */
1080 thread_id_t tid; /* server thread id */
1081 client_ptr_t teb; /* thread teb pointer */
1082 client_ptr_t entry_point; /* thread entry point */
1083 affinity_t affinity; /* thread affinity mask */
1084 int exit_code; /* thread exit code */
1085 int priority; /* thread priority level */
1086 int last; /* last thread in process */
1087 int suspend_count; /* thread suspend count */
1088 int dbg_hidden; /* thread hidden from debugger */
1089 data_size_t desc_len; /* description length in bytes */
1090 VARARG(desc,unicode_str); /* description string */
1094 /* Retrieve information about thread times */
1095 @REQ(get_thread_times)
1096 obj_handle_t handle; /* thread handle */
1098 timeout_t creation_time; /* thread creation time */
1099 timeout_t exit_time; /* thread exit time */
1100 int unix_pid; /* thread native pid */
1101 int unix_tid; /* thread native pid */
1105 /* Set a thread information */
1106 @REQ(set_thread_info)
1107 obj_handle_t handle; /* thread handle */
1108 int mask; /* setting mask (see below) */
1109 int priority; /* priority class */
1110 affinity_t affinity; /* affinity mask */
1111 client_ptr_t entry_point; /* thread entry point */
1112 obj_handle_t token; /* impersonation token */
1113 VARARG(desc,unicode_str); /* description string */
1115 #define SET_THREAD_INFO_PRIORITY 0x01
1116 #define SET_THREAD_INFO_AFFINITY 0x02
1117 #define SET_THREAD_INFO_TOKEN 0x04
1118 #define SET_THREAD_INFO_ENTRYPOINT 0x08
1119 #define SET_THREAD_INFO_DESCRIPTION 0x10
1120 #define SET_THREAD_INFO_DBG_HIDDEN 0x20
1123 /* Suspend a thread */
1124 @REQ(suspend_thread)
1125 obj_handle_t handle; /* thread handle */
1127 int count; /* new suspend count */
1131 /* Resume a thread */
1133 obj_handle_t handle; /* thread handle */
1135 int count; /* new suspend count */
1139 /* Queue an APC for a thread or process */
1141 obj_handle_t handle; /* thread or process handle */
1142 VARARG(call,apc_call); /* call arguments */
1144 obj_handle_t handle; /* APC handle */
1145 int self; /* run APC in caller itself? */
1149 /* Get the result of an APC call */
1150 @REQ(get_apc_result)
1151 obj_handle_t handle; /* handle to the APC */
1153 apc_result_t result; /* result of the APC */
1157 /* Close a handle for the current process */
1159 obj_handle_t handle; /* handle to close */
1163 /* Set a handle information */
1164 @REQ(set_handle_info)
1165 obj_handle_t handle; /* handle we are interested in */
1166 int flags; /* new handle flags */
1167 int mask; /* mask for flags to set */
1169 int old_flags; /* old flag value */
1173 /* Duplicate a handle */
1175 obj_handle_t src_process; /* src process handle */
1176 obj_handle_t src_handle; /* src handle to duplicate */
1177 obj_handle_t dst_process; /* dst process handle */
1178 unsigned int access; /* wanted access rights */
1179 unsigned int attributes; /* object attributes */
1180 unsigned int options; /* duplicate options */
1182 obj_handle_t handle; /* duplicated handle in dst process */
1186 /* Test if two handles refer to the same object */
1187 @REQ(compare_objects)
1188 obj_handle_t first; /* first object handle */
1189 obj_handle_t second; /* second object handle */
1193 /* Make an object temporary */
1194 @REQ(make_temporary)
1195 obj_handle_t handle; /* handle to the object */
1199 /* Open a handle to a process */
1201 process_id_t pid; /* process id to open */
1202 unsigned int access; /* wanted access rights */
1203 unsigned int attributes; /* object attributes */
1205 obj_handle_t handle; /* handle to the process */
1209 /* Open a handle to a thread */
1211 thread_id_t tid; /* thread id to open */
1212 unsigned int access; /* wanted access rights */
1213 unsigned int attributes; /* object attributes */
1215 obj_handle_t handle; /* handle to the thread */
1219 /* Wait for handles */
1221 int flags; /* wait flags (see below) */
1222 client_ptr_t cookie; /* magic cookie to return to client */
1223 abstime_t timeout; /* timeout */
1224 data_size_t size; /* size of select_op */
1225 obj_handle_t prev_apc; /* handle to previous APC */
1226 VARARG(result,apc_result); /* result of previous APC */
1227 VARARG(data,select_op,size); /* operation-specific data */
1228 VARARG(contexts,contexts); /* suspend context(s) */
1230 obj_handle_t apc_handle; /* handle to next APC */
1231 int signaled; /* were the handles immediately signaled? */
1232 VARARG(call,apc_call); /* APC call arguments */
1233 VARARG(contexts,contexts); /* suspend context(s) */
1235 #define SELECT_ALERTABLE 1
1236 #define SELECT_INTERRUPTIBLE 2
1239 /* Create an event */
1241 unsigned int access; /* wanted access rights */
1242 int manual_reset; /* manual reset event */
1243 int initial_state; /* initial state of the event */
1244 VARARG(objattr,object_attributes); /* object attributes */
1246 obj_handle_t handle; /* handle to the event */
1249 /* Event operation */
1251 obj_handle_t handle; /* handle to event */
1252 int op; /* event operation (see below) */
1254 int state; /* previous state */
1256 enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT };
1259 obj_handle_t handle; /* handle to event */
1261 int manual_reset; /* manual reset event */
1262 int state; /* current state of the event */
1267 unsigned int access; /* wanted access rights */
1268 unsigned int attributes; /* object attributes */
1269 obj_handle_t rootdir; /* root directory */
1270 VARARG(name,unicode_str); /* object name */
1272 obj_handle_t handle; /* handle to the event */
1276 /* Create a keyed event */
1277 @REQ(create_keyed_event)
1278 unsigned int access; /* wanted access rights */
1279 VARARG(objattr,object_attributes); /* object attributes */
1281 obj_handle_t handle; /* handle to the event */
1284 /* Open a keyed event */
1285 @REQ(open_keyed_event)
1286 unsigned int access; /* wanted access rights */
1287 unsigned int attributes; /* object attributes */
1288 obj_handle_t rootdir; /* root directory */
1289 VARARG(name,unicode_str); /* object name */
1291 obj_handle_t handle; /* handle to the event */
1295 /* Create a mutex */
1297 unsigned int access; /* wanted access rights */
1298 int owned; /* initially owned? */
1299 VARARG(objattr,object_attributes); /* object attributes */
1301 obj_handle_t handle; /* handle to the mutex */
1305 /* Release a mutex */
1307 obj_handle_t handle; /* handle to the mutex */
1309 unsigned int prev_count; /* value of internal counter, before release */
1315 unsigned int access; /* wanted access rights */
1316 unsigned int attributes; /* object attributes */
1317 obj_handle_t rootdir; /* root directory */
1318 VARARG(name,unicode_str); /* object name */
1320 obj_handle_t handle; /* handle to the mutex */
1326 obj_handle_t handle; /* handle to mutex */
1328 unsigned int count; /* current count of mutex */
1329 int owned; /* true if owned by current thread */
1330 int abandoned; /* true if abandoned */
1334 /* Create a semaphore */
1335 @REQ(create_semaphore)
1336 unsigned int access; /* wanted access rights */
1337 unsigned int initial; /* initial count */
1338 unsigned int max; /* maximum count */
1339 VARARG(objattr,object_attributes); /* object attributes */
1341 obj_handle_t handle; /* handle to the semaphore */
1345 /* Release a semaphore */
1346 @REQ(release_semaphore)
1347 obj_handle_t handle; /* handle to the semaphore */
1348 unsigned int count; /* count to add to semaphore */
1350 unsigned int prev_count; /* previous semaphore count */
1353 @REQ(query_semaphore)
1354 obj_handle_t handle; /* handle to the semaphore */
1356 unsigned int current; /* current count */
1357 unsigned int max; /* maximum count */
1360 /* Open a semaphore */
1361 @REQ(open_semaphore)
1362 unsigned int access; /* wanted access rights */
1363 unsigned int attributes; /* object attributes */
1364 obj_handle_t rootdir; /* root directory */
1365 VARARG(name,unicode_str); /* object name */
1367 obj_handle_t handle; /* handle to the semaphore */
1373 unsigned int access; /* wanted access rights */
1374 unsigned int sharing; /* sharing flags */
1375 int create; /* file create action */
1376 unsigned int options; /* file options */
1377 unsigned int attrs; /* file attributes for creation */
1378 VARARG(objattr,object_attributes); /* object attributes */
1379 VARARG(filename,string); /* file name */
1381 obj_handle_t handle; /* handle to the file */
1385 /* Open a file object */
1386 @REQ(open_file_object)
1387 unsigned int access; /* wanted access rights */
1388 unsigned int attributes; /* open attributes */
1389 obj_handle_t rootdir; /* root directory */
1390 unsigned int sharing; /* sharing flags */
1391 unsigned int options; /* file options */
1392 VARARG(filename,unicode_str); /* file name */
1394 obj_handle_t handle; /* handle to the file */
1398 /* Allocate a file handle for a Unix fd */
1399 @REQ(alloc_file_handle)
1400 unsigned int access; /* wanted access rights */
1401 unsigned int attributes; /* object attributes */
1402 int fd; /* file descriptor on the client side */
1404 obj_handle_t handle; /* handle to the file */
1408 /* Get the Unix name from a file handle */
1409 @REQ(get_handle_unix_name)
1410 obj_handle_t handle; /* file handle */
1412 data_size_t name_len; /* unix name length */
1413 VARARG(name,string); /* unix name */
1417 /* Get a Unix fd to access a file */
1419 obj_handle_t handle; /* handle to the file */
1421 int type; /* file type (see below) */
1422 int cacheable; /* can fd be cached in the client? */
1423 unsigned int access; /* file access rights */
1424 unsigned int options; /* file open options */
1428 FD_TYPE_INVALID, /* invalid file (no associated fd) */
1429 FD_TYPE_FILE, /* regular file */
1430 FD_TYPE_DIR, /* directory */
1431 FD_TYPE_SOCKET, /* socket */
1432 FD_TYPE_SERIAL, /* serial port */
1433 FD_TYPE_PIPE, /* named pipe */
1434 FD_TYPE_MAILSLOT, /* mailslot */
1435 FD_TYPE_CHAR, /* unspecified char device */
1436 FD_TYPE_DEVICE, /* Windows device file */
1441 /* Retrieve (or allocate) the client-side directory cache entry */
1442 @REQ(get_directory_cache_entry)
1443 obj_handle_t handle; /* handle to the directory */
1445 int entry; /* cache entry on the client side */
1446 VARARG(free,ints); /* entries that can be freed */
1450 /* Flush a file buffers */
1452 async_data_t async; /* async I/O parameters */
1454 obj_handle_t event; /* event set when finished */
1457 /* Query file information */
1459 obj_handle_t handle; /* handle to the file */
1460 unsigned int info_class; /* queried information class */
1462 VARARG(data,bytes); /* file info data */
1465 /* Query volume information */
1466 @REQ(get_volume_info)
1467 obj_handle_t handle; /* handle to the file */
1468 async_data_t async; /* async I/O parameters */
1469 unsigned int info_class; /* queried information class */
1471 obj_handle_t wait; /* handle to wait on for blocking read */
1472 VARARG(data,bytes); /* volume info data */
1475 /* Lock a region of a file */
1477 obj_handle_t handle; /* handle to the file */
1478 file_pos_t offset; /* offset of start of lock */
1479 file_pos_t count; /* count of bytes to lock */
1480 int shared; /* shared or exclusive lock? */
1481 int wait; /* do we want to wait? */
1483 obj_handle_t handle; /* handle to wait on */
1484 int overlapped; /* is it an overlapped I/O handle? */
1488 /* Unlock a region of a file */
1490 obj_handle_t handle; /* handle to the file */
1491 file_pos_t offset; /* offset of start of unlock */
1492 file_pos_t count; /* count of bytes to unlock */
1496 /* Perform a recv on a socket */
1498 int oob; /* are we receiving OOB data? */
1499 async_data_t async; /* async I/O parameters */
1500 int force_async; /* Force asynchronous mode? */
1502 obj_handle_t wait; /* handle to wait on for blocking recv */
1503 unsigned int options; /* device open options */
1504 int nonblocking; /* is socket non-blocking? */
1508 /* Perform a send on a socket */
1510 async_data_t async; /* async I/O parameters */
1511 int force_async; /* Force asynchronous mode? */
1513 obj_handle_t wait; /* handle to wait on for blocking send */
1514 unsigned int options; /* device open options */
1515 int nonblocking; /* is socket non-blocking? */
1519 /* Get socket event flags */
1520 @REQ(socket_get_events)
1521 obj_handle_t handle; /* socket handle */
1522 obj_handle_t event; /* event to reset */
1524 unsigned int flags; /* event mask */
1525 VARARG(status,uints); /* array of status codes */
1529 /* Store ICMP id for ICMP over datagram fixup */
1530 @REQ(socket_send_icmp_id)
1531 obj_handle_t handle; /* socket handle */
1532 unsigned short icmp_id; /* ICMP packet id */
1533 unsigned short icmp_seq; /* ICMP packed sequence */
1538 /* Get ICMP id for ICMP over datagram fixup */
1539 @REQ(socket_get_icmp_id)
1540 obj_handle_t handle; /* socket handle */
1541 unsigned short icmp_seq; /* ICMP packed sequence */
1543 unsigned short icmp_id; /* ICMP packet id */
1547 /* Retrieve the next pending console ioctl request */
1548 @REQ(get_next_console_request)
1549 obj_handle_t handle; /* console server handle */
1550 int signal; /* server signal state */
1551 int read; /* 1 if reporting result of blocked read ioctl */
1552 unsigned int status; /* status of previous ioctl */
1553 VARARG(out_data,bytes); /* out_data of previous ioctl */
1555 unsigned int code; /* ioctl code */
1556 unsigned int output; /* output id or 0 for input */
1557 data_size_t out_size; /* ioctl output size */
1558 VARARG(in_data,bytes); /* ioctl in_data */
1562 /* enable directory change notifications */
1563 @REQ(read_directory_changes)
1564 unsigned int filter; /* notification filter */
1565 int subtree; /* watch the subtree? */
1566 int want_data; /* flag indicating whether change data should be collected */
1567 async_data_t async; /* async I/O parameters */
1572 obj_handle_t handle;
1574 VARARG(events,filesystem_event); /* collected filesystem events */
1578 /* Create a file mapping */
1579 @REQ(create_mapping)
1580 unsigned int access; /* wanted access rights */
1581 unsigned int flags; /* SEC_* flags */
1582 unsigned int file_access; /* file access rights */
1583 mem_size_t size; /* mapping size */
1584 obj_handle_t file_handle; /* file handle */
1585 VARARG(objattr,object_attributes); /* object attributes */
1587 obj_handle_t handle; /* handle to the mapping */
1591 /* Open a mapping */
1593 unsigned int access; /* wanted access rights */
1594 unsigned int attributes; /* object attributes */
1595 obj_handle_t rootdir; /* root directory */
1596 VARARG(name,unicode_str); /* object name */
1598 obj_handle_t handle; /* handle to the mapping */
1602 /* Get information about a file mapping */
1603 @REQ(get_mapping_info)
1604 obj_handle_t handle; /* handle to the mapping */
1605 unsigned int access; /* wanted access rights */
1607 mem_size_t size; /* mapping size */
1608 unsigned int flags; /* SEC_* flags */
1609 obj_handle_t shared_file; /* shared mapping file handle */
1610 data_size_t total; /* total required buffer size in bytes */
1611 VARARG(image,pe_image_info);/* image info for SEC_IMAGE mappings */
1612 VARARG(name,unicode_str); /* filename for SEC_IMAGE mappings */
1616 /* Get the address to use to map an image mapping */
1617 @REQ(get_image_map_address)
1618 obj_handle_t handle; /* handle to the mapping */
1620 client_ptr_t addr; /* map address */
1624 /* Add a memory view in the current process */
1626 obj_handle_t mapping; /* file mapping handle */
1627 unsigned int access; /* wanted access rights */
1628 client_ptr_t base; /* view base address (page-aligned) */
1629 mem_size_t size; /* view size */
1630 file_pos_t start; /* start offset in mapping */
1634 /* Add a memory view for an image mapping in the current process */
1635 @REQ(map_image_view)
1636 obj_handle_t mapping; /* file mapping handle */
1637 client_ptr_t base; /* view base address (page-aligned) */
1638 mem_size_t size; /* view size */
1639 unsigned int entry; /* entry point in mapped view */
1640 unsigned short machine; /* machine in the mapped view */
1644 /* Add a memory view for a builtin dll in the current process */
1645 @REQ(map_builtin_view)
1646 VARARG(image,pe_image_info);/* image info */
1647 VARARG(name,unicode_str); /* image filename */
1651 /* Get information about a mapped image view */
1652 @REQ(get_image_view_info)
1653 obj_handle_t process; /* process handle */
1654 client_ptr_t addr; /* address inside mapped view (in process address space) */
1656 client_ptr_t base; /* view base address */
1657 mem_size_t size; /* view size */
1661 /* Unmap a memory view from the current process */
1663 client_ptr_t base; /* view base address */
1667 /* Get a range of committed pages in a file mapping */
1668 @REQ(get_mapping_committed_range)
1669 client_ptr_t base; /* view base address */
1670 file_pos_t offset; /* starting offset (page-aligned, in bytes) */
1672 mem_size_t size; /* size of range starting at offset (page-aligned, in bytes) */
1673 int committed; /* whether it is a committed range */
1677 /* Add a range to the committed pages in a file mapping */
1678 @REQ(add_mapping_committed_range)
1679 client_ptr_t base; /* view base address */
1680 file_pos_t offset; /* starting offset (page-aligned, in bytes) */
1681 mem_size_t size; /* size to set (page-aligned, in bytes) or 0 if only retrieving */
1685 /* Check if two memory maps are for the same file */
1686 @REQ(is_same_mapping)
1687 client_ptr_t base1; /* first view base address */
1688 client_ptr_t base2; /* second view base address */
1692 /* Get the filename of a mapping */
1693 @REQ(get_mapping_filename)
1694 obj_handle_t process; /* process handle */
1695 client_ptr_t addr; /* address inside mapped view (in process address space) */
1697 data_size_t len; /* total filename length in bytes */
1698 VARARG(filename,unicode_str); /* filename in NT format */
1704 timeout_t start_time;
1707 int current_priority;
1710 client_ptr_t entry_point;
1715 timeout_t start_time;
1716 data_size_t name_len;
1720 process_id_t parent_pid;
1721 unsigned int session_id;
1724 /* VARARG(name,unicode_str,name_len); */
1725 /* VARARG(threads,struct thread_info,thread_count); */
1728 /* Get a list of processes and threads currently running */
1729 @REQ(list_processes)
1731 data_size_t info_size;
1733 int total_thread_count;
1734 data_size_t total_name_len;
1735 VARARG(data,process_info,info_size);
1739 /* Create a debug object */
1740 @REQ(create_debug_obj)
1741 unsigned int access; /* wanted access rights */
1742 unsigned int flags; /* object flags */
1743 VARARG(objattr,object_attributes); /* object attributes */
1745 obj_handle_t handle; /* handle to the debug object */
1749 /* Wait for a debug event */
1750 @REQ(wait_debug_event)
1751 obj_handle_t debug; /* debug object */
1753 process_id_t pid; /* process id */
1754 thread_id_t tid; /* thread id */
1755 VARARG(event,debug_event); /* debug event data */
1759 /* Queue an exception event */
1760 @REQ(queue_exception_event)
1761 int first; /* first chance exception? */
1762 unsigned int code; /* exception code */
1763 unsigned int flags; /* exception flags */
1764 client_ptr_t record; /* exception record */
1765 client_ptr_t address; /* exception address */
1766 data_size_t len; /* size of parameters */
1767 VARARG(params,uints64,len);/* exception parameters */
1769 obj_handle_t handle; /* handle to the queued event */
1773 /* Retrieve the status of an exception event */
1774 @REQ(get_exception_status)
1775 obj_handle_t handle; /* handle to the queued event */
1779 /* Continue a debug event */
1780 @REQ(continue_debug_event)
1781 obj_handle_t debug; /* debug object */
1782 process_id_t pid; /* process id to continue */
1783 thread_id_t tid; /* thread id to continue */
1784 unsigned int status; /* continuation status */
1788 /* Start or stop debugging an existing process */
1790 obj_handle_t handle; /* process handle */
1791 obj_handle_t debug; /* debug object to attach to the process */
1792 int attach; /* 1=attaching / 0=detaching from the process */
1796 /* Set debug object information */
1797 @REQ(set_debug_obj_info)
1798 obj_handle_t debug; /* debug object */
1799 unsigned int flags; /* object flags */
1803 /* Read data from a process address space */
1804 @REQ(read_process_memory)
1805 obj_handle_t handle; /* process handle */
1806 client_ptr_t addr; /* addr to read from */
1808 VARARG(data,bytes); /* result data */
1812 /* Write data to a process address space */
1813 @REQ(write_process_memory)
1814 obj_handle_t handle; /* process handle */
1815 client_ptr_t addr; /* addr to write to */
1816 VARARG(data,bytes); /* data to write */
1820 /* Create a registry key */
1822 unsigned int access; /* desired access rights */
1823 unsigned int options; /* creation options */
1824 VARARG(objattr,object_attributes); /* object attributes */
1825 VARARG(class,unicode_str); /* class name */
1827 obj_handle_t hkey; /* handle to the created key */
1830 /* Open a registry key */
1832 obj_handle_t parent; /* handle to the parent key */
1833 unsigned int access; /* desired access rights */
1834 unsigned int attributes; /* object attributes */
1835 VARARG(name,unicode_str); /* key name */
1837 obj_handle_t hkey; /* handle to the open key */
1841 /* Delete a registry key */
1843 obj_handle_t hkey; /* handle to the key */
1847 /* Flush a registry key */
1849 obj_handle_t hkey; /* handle to the key */
1853 /* Enumerate registry subkeys */
1855 obj_handle_t hkey; /* handle to registry key */
1856 int index; /* index of subkey (or -1 for current key) */
1857 int info_class; /* requested information class */
1859 int subkeys; /* number of subkeys */
1860 int max_subkey; /* longest subkey name */
1861 int max_class; /* longest class name */
1862 int values; /* number of values */
1863 int max_value; /* longest value name */
1864 int max_data; /* longest value data */
1865 timeout_t modif; /* last modification time */
1866 data_size_t total; /* total length needed for full name and class */
1867 data_size_t namelen; /* length of key name in bytes */
1868 VARARG(name,unicode_str,namelen); /* key name */
1869 VARARG(class,unicode_str); /* class name */
1873 /* Set a value of a registry key */
1875 obj_handle_t hkey; /* handle to registry key */
1876 int type; /* value type */
1877 data_size_t namelen; /* length of value name in bytes */
1878 VARARG(name,unicode_str,namelen); /* value name */
1879 VARARG(data,bytes); /* value data */
1883 /* Retrieve the value of a registry key */
1885 obj_handle_t hkey; /* handle to registry key */
1886 VARARG(name,unicode_str); /* value name */
1888 int type; /* value type */
1889 data_size_t total; /* total length needed for data */
1890 VARARG(data,bytes); /* value data */
1894 /* Enumerate a value of a registry key */
1895 @REQ(enum_key_value)
1896 obj_handle_t hkey; /* handle to registry key */
1897 int index; /* value index */
1898 int info_class; /* requested information class */
1900 int type; /* value type */
1901 data_size_t total; /* total length needed for full name and data */
1902 data_size_t namelen; /* length of value name in bytes */
1903 VARARG(name,unicode_str,namelen); /* value name */
1904 VARARG(data,bytes); /* value data */
1908 /* Delete a value of a registry key */
1909 @REQ(delete_key_value)
1910 obj_handle_t hkey; /* handle to registry key */
1911 VARARG(name,unicode_str); /* value name */
1915 /* Load a registry branch from a file */
1917 obj_handle_t file; /* file to load from */
1918 VARARG(objattr,object_attributes); /* object attributes */
1922 /* UnLoad a registry branch from a file */
1923 @REQ(unload_registry)
1924 obj_handle_t parent; /* handle to the parent key */
1925 unsigned int attributes; /* object attributes */
1926 VARARG(name,unicode_str); /* key name */
1930 /* Save a registry branch to a file */
1932 obj_handle_t hkey; /* key to save */
1933 obj_handle_t file; /* file to save to */
1937 /* Add a registry key change notification */
1938 @REQ(set_registry_notification)
1939 obj_handle_t hkey; /* key to watch for changes */
1940 obj_handle_t event; /* event to set */
1941 int subtree; /* should we watch the whole subtree? */
1942 unsigned int filter; /* things to watch */
1946 /* Rename a registry key */
1948 obj_handle_t hkey; /* handle to the key to be renamed */
1949 VARARG(name,unicode_str); /* new name */
1953 /* Create a waitable timer */
1955 unsigned int access; /* wanted access rights */
1956 int manual; /* manual reset */
1957 VARARG(objattr,object_attributes); /* object attributes */
1959 obj_handle_t handle; /* handle to the timer */
1963 /* Open a waitable timer */
1965 unsigned int access; /* wanted access rights */
1966 unsigned int attributes; /* object attributes */
1967 obj_handle_t rootdir; /* root directory */
1968 VARARG(name,unicode_str); /* object name */
1970 obj_handle_t handle; /* handle to the timer */
1973 /* Set a waitable timer */
1975 obj_handle_t handle; /* handle to the timer */
1976 timeout_t expire; /* next expiration absolute time */
1977 client_ptr_t callback; /* callback function */
1978 client_ptr_t arg; /* callback argument */
1979 int period; /* timer period in ms */
1981 int signaled; /* was the timer signaled before this call ? */
1984 /* Cancel a waitable timer */
1986 obj_handle_t handle; /* handle to the timer */
1988 int signaled; /* was the timer signaled before this calltime ? */
1991 /* Get information on a waitable timer */
1992 @REQ(get_timer_info)
1993 obj_handle_t handle; /* handle to the timer */
1995 timeout_t when; /* absolute time when the timer next expires */
1996 int signaled; /* is the timer signaled? */
2000 /* Retrieve the current context of a thread */
2001 @REQ(get_thread_context)
2002 obj_handle_t handle; /* thread handle */
2003 obj_handle_t context; /* context handle */
2004 unsigned int flags; /* context flags */
2005 unsigned int native_flags; /* flags for native context if WoW present */
2006 unsigned short machine; /* context architecture */
2008 int self; /* was it a handle to the current thread? */
2009 obj_handle_t handle; /* pending context handle */
2010 VARARG(contexts,contexts); /* thread context(s) */
2014 /* Set the current context of a thread */
2015 @REQ(set_thread_context)
2016 obj_handle_t handle; /* thread handle */
2017 unsigned int native_flags; /* flags for native context if WoW present */
2018 VARARG(contexts,contexts); /* thread context(s) */
2020 int self; /* was it a handle to the current thread? */
2024 /* Fetch a selector entry for a thread */
2025 @REQ(get_selector_entry)
2026 obj_handle_t handle; /* thread handle */
2027 int entry; /* LDT entry */
2029 unsigned int base; /* selector base */
2030 unsigned int limit; /* selector limit */
2031 unsigned char flags; /* selector flags */
2037 VARARG(name,unicode_str); /* atom name */
2039 atom_t atom; /* resulting atom */
2043 /* Delete an atom */
2045 atom_t atom; /* atom handle */
2051 VARARG(name,unicode_str); /* atom name */
2053 atom_t atom; /* atom handle */
2057 /* Get information about an atom */
2058 @REQ(get_atom_information)
2059 atom_t atom; /* atom handle */
2061 int count; /* atom lock count */
2062 int pinned; /* whether the atom has been pinned */
2063 data_size_t total; /* actual length of atom name */
2064 VARARG(name,unicode_str); /* atom name */
2068 /* Get the message queue of the current thread */
2071 obj_handle_t handle; /* handle to the queue */
2075 /* Set the file descriptor associated to the current thread queue */
2077 obj_handle_t handle; /* handle to the file descriptor */
2081 /* Set the current message queue wakeup mask */
2082 @REQ(set_queue_mask)
2083 unsigned int wake_mask; /* wakeup bits mask */
2084 unsigned int changed_mask; /* changed bits mask */
2085 int skip_wait; /* will we skip waiting if signaled? */
2087 unsigned int wake_bits; /* current wake bits */
2088 unsigned int changed_bits; /* current changed bits */
2092 /* Get the current message queue status */
2093 @REQ(get_queue_status)
2094 unsigned int clear_bits; /* should we clear the change bits? */
2096 unsigned int wake_bits; /* wake bits */
2097 unsigned int changed_bits; /* changed bits since last time */
2101 /* Retrieve the process idle event */
2102 @REQ(get_process_idle_event)
2103 obj_handle_t handle; /* process handle */
2105 obj_handle_t event; /* handle to idle event */
2109 /* Send a message to a thread queue */
2111 thread_id_t id; /* thread id */
2112 int type; /* message type (see below) */
2113 int flags; /* message flags (see below) */
2114 user_handle_t win; /* window handle */
2115 unsigned int msg; /* message code */
2116 lparam_t wparam; /* parameters */
2117 lparam_t lparam; /* parameters */
2118 timeout_t timeout; /* timeout for reply */
2119 VARARG(data,message_data); /* message data for sent messages */
2122 @REQ(post_quit_message)
2123 int exit_code; /* exit code to return */
2128 MSG_ASCII, /* Ascii message (from SendMessageA) */
2129 MSG_UNICODE, /* Unicode message (from SendMessageW) */
2130 MSG_NOTIFY, /* notify message (from SendNotifyMessageW), always Unicode */
2131 MSG_CALLBACK, /* callback message (from SendMessageCallbackW), always Unicode */
2132 MSG_CALLBACK_RESULT,/* result of a callback message */
2133 MSG_OTHER_PROCESS, /* sent from other process, may include vararg data, always Unicode */
2134 MSG_POSTED, /* posted message (from PostMessageW), always Unicode */
2135 MSG_HARDWARE, /* hardware message */
2136 MSG_WINEVENT, /* winevent message */
2137 MSG_HOOK_LL /* low-level hardware hook */
2139 #define SEND_MSG_ABORT_IF_HUNG 0x01
2142 /* Send a hardware message to a thread queue */
2143 @REQ(send_hardware_message)
2144 user_handle_t win; /* window handle */
2145 hw_input_t input; /* input data */
2146 unsigned int flags; /* flags (see below) */
2147 VARARG(report,bytes); /* HID report data */
2149 int wait; /* do we need to wait for a reply? */
2150 int prev_x; /* previous cursor position */
2152 int new_x; /* new cursor position */
2155 #define SEND_HWMSG_INJECTED 0x01
2158 /* Get a message from the current queue */
2160 unsigned int flags; /* PM_* flags */
2161 user_handle_t get_win; /* window handle to get */
2162 unsigned int get_first; /* first message code to get */
2163 unsigned int get_last; /* last message code to get */
2164 unsigned int hw_id; /* id of the previous hardware message (or 0) */
2165 unsigned int wake_mask; /* wakeup bits mask */
2166 unsigned int changed_mask; /* changed bits mask */
2168 user_handle_t win; /* window handle */
2169 unsigned int msg; /* message code */
2170 lparam_t wparam; /* parameters */
2171 lparam_t lparam; /* parameters */
2172 int type; /* message type */
2173 int x; /* message x position */
2174 int y; /* message y position */
2175 unsigned int time; /* message time */
2176 unsigned int active_hooks; /* active hooks bitmap */
2177 data_size_t total; /* total size of extra data */
2178 VARARG(data,message_data); /* message data for sent messages */
2182 /* Reply to a sent message */
2184 int remove; /* should we remove the message? */
2185 lparam_t result; /* message result */
2186 VARARG(data,bytes); /* message data for sent messages */
2190 /* Accept and remove the current hardware message */
2191 @REQ(accept_hardware_message)
2192 unsigned int hw_id; /* id of the hardware message */
2196 /* Retrieve the reply for the last message sent */
2197 @REQ(get_message_reply)
2198 int cancel; /* cancel message if not ready? */
2200 lparam_t result; /* message result */
2201 VARARG(data,bytes); /* message data for sent messages */
2205 /* Set a window timer */
2207 user_handle_t win; /* window handle */
2208 unsigned int msg; /* message to post */
2209 unsigned int rate; /* timer rate in ms */
2210 lparam_t id; /* timer id */
2211 lparam_t lparam; /* message lparam (callback proc) */
2213 lparam_t id; /* timer id */
2217 /* Kill a window timer */
2218 @REQ(kill_win_timer)
2219 user_handle_t win; /* window handle */
2220 lparam_t id; /* timer id */
2221 unsigned int msg; /* message to post */
2225 /* check if the thread owning the window is hung */
2226 @REQ(is_window_hung)
2227 user_handle_t win; /* window handle */
2233 /* Retrieve info about a serial port */
2234 @REQ(get_serial_info)
2235 obj_handle_t handle; /* handle to comm port */
2238 unsigned int eventmask;
2239 unsigned int cookie;
2240 unsigned int pending_write;
2244 /* Set info about a serial port */
2245 @REQ(set_serial_info)
2246 obj_handle_t handle; /* handle to comm port */
2247 int flags; /* bitmask to set values (see below) */
2249 #define SERIALINFO_PENDING_WRITE 0x04
2250 #define SERIALINFO_PENDING_WAIT 0x08
2252 /* Cancel all sync io on a thread */
2254 obj_handle_t handle; /* thread handle on which to cancel io */
2255 client_ptr_t iosb; /* I/O status block (NULL=all) */
2258 /* Create an async I/O */
2259 @REQ(register_async)
2260 int type; /* type of queue to look after */
2261 async_data_t async; /* async I/O parameters */
2262 int count; /* count - usually # of bytes to be read/written */
2264 #define ASYNC_TYPE_READ 0x01
2265 #define ASYNC_TYPE_WRITE 0x02
2266 #define ASYNC_TYPE_WAIT 0x03
2269 /* Cancel all async op on a fd */
2271 obj_handle_t handle; /* handle to comm port, socket or file */
2272 client_ptr_t iosb; /* I/O status block (NULL=all) */
2273 int only_thread; /* cancel matching this thread */
2277 /* Retrieve results of an async */
2278 @REQ(get_async_result)
2279 client_ptr_t user_arg; /* user arg used to identify async */
2281 VARARG(out_data,bytes); /* iosb output data */
2285 /* Notify direct completion of async and close the wait handle if not blocking */
2286 @REQ(set_async_direct_result)
2287 obj_handle_t handle; /* wait handle */
2288 apc_param_t information; /* IO_STATUS_BLOCK Information */
2289 unsigned int status; /* completion status */
2290 int mark_pending; /* set async to pending before completion? */
2292 obj_handle_t handle; /* wait handle, or NULL if closed */
2296 /* Perform a read on a file object */
2298 async_data_t async; /* async I/O parameters */
2299 file_pos_t pos; /* read position */
2301 obj_handle_t wait; /* handle to wait on for blocking read */
2302 unsigned int options; /* device open options */
2303 VARARG(data,bytes); /* read data */
2307 /* Perform a write on a file object */
2309 async_data_t async; /* async I/O parameters */
2310 file_pos_t pos; /* write position */
2311 VARARG(data,bytes); /* write data */
2313 obj_handle_t wait; /* handle to wait on for blocking write */
2314 unsigned int options; /* device open options */
2315 data_size_t size; /* size written */
2319 /* Perform an ioctl on a file */
2321 ioctl_code_t code; /* ioctl code */
2322 async_data_t async; /* async I/O parameters */
2323 VARARG(in_data,bytes); /* ioctl input data */
2325 obj_handle_t wait; /* handle to wait on for blocking ioctl */
2326 unsigned int options; /* device open options */
2327 VARARG(out_data,bytes); /* ioctl output data */
2331 /* Store results of an async irp */
2332 @REQ(set_irp_result)
2333 obj_handle_t handle; /* handle to the irp */
2334 unsigned int status; /* status of the irp */
2335 data_size_t size; /* result size (input or output depending on the operation) */
2336 VARARG(data,bytes); /* output data of the irp */
2340 /* Create a named pipe */
2341 @REQ(create_named_pipe)
2342 unsigned int access;
2343 unsigned int options;
2344 unsigned int sharing;
2345 unsigned int disposition;
2346 unsigned int maxinstances;
2347 unsigned int outsize;
2348 unsigned int insize;
2351 VARARG(objattr,object_attributes); /* object attributes */
2353 obj_handle_t handle; /* handle to the pipe */
2357 /* flags in create_named_pipe and get_named_pipe_info */
2358 #define NAMED_PIPE_MESSAGE_STREAM_WRITE 0x0001
2359 #define NAMED_PIPE_MESSAGE_STREAM_READ 0x0002
2360 #define NAMED_PIPE_NONBLOCKING_MODE 0x0004
2361 #define NAMED_PIPE_SERVER_END 0x8000
2363 /* Set named pipe information by handle */
2364 @REQ(set_named_pipe_info)
2365 obj_handle_t handle;
2369 /* Create a window */
2371 user_handle_t parent; /* parent window */
2372 user_handle_t owner; /* owner window */
2373 atom_t atom; /* class atom */
2374 mod_handle_t instance; /* module instance */
2375 int dpi; /* system DPI */
2376 int awareness; /* thread DPI awareness */
2377 unsigned int style; /* window style */
2378 unsigned int ex_style; /* window extended style */
2379 VARARG(class,unicode_str); /* class name */
2381 user_handle_t handle; /* created window */
2382 user_handle_t parent; /* full handle of parent */
2383 user_handle_t owner; /* full handle of owner */
2384 int extra; /* number of extra bytes */
2385 client_ptr_t class_ptr; /* pointer to class in client address space */
2386 int dpi; /* window DPI if not per-monitor aware */
2387 int awareness; /* window DPI awareness */
2391 /* Destroy a window */
2392 @REQ(destroy_window)
2393 user_handle_t handle; /* handle to the window */
2397 /* Retrieve the desktop window for the current thread */
2398 @REQ(get_desktop_window)
2399 int force; /* force creation if it doesn't exist
*/
2401 user_handle_t top_window
; /* handle to the desktop window
*/
2402 user_handle_t msg_window
; /* handle to the top
-level HWND_MESSAGE parent
*/
2406 /* Set a window owner
*/
2407 @
REQ(set_window_owner
)
2408 user_handle_t handle
; /* handle to the window
*/
2409 user_handle_t owner
; /* new owner
*/
2411 user_handle_t full_owner
; /* full handle of new owner
*/
2412 user_handle_t prev_owner
; /* full handle of previous owner
*/
2416 /* Get information from a window handle
*/
2417 @
REQ(get_window_info
)
2418 user_handle_t handle
; /* handle to the window
*/
2420 user_handle_t full_handle
; /* full
32-bit handle
*/
2421 user_handle_t last_active
; /* last active popup
*/
2422 process_id_t pid
; /* process owning the window
*/
2423 thread_id_t tid
; /* thread owning the window
*/
2424 atom_t atom
; /* class atom
*/
2425 int is_unicode
; /* ANSI or unicode
*/
2426 int dpi
; /* window DPI
*/
2427 int awareness
; /* DPI awareness
*/
2431 /* Set some information in a window
*/
2432 @
REQ(set_window_info
)
2433 unsigned short flags
; /* flags for fields to
set (see below
) */
2434 short int is_unicode
; /* ANSI or unicode
*/
2435 user_handle_t handle
; /* handle to the window
*/
2436 unsigned int style
; /* window style
*/
2437 unsigned int ex_style
; /* window extended style
*/
2438 data_size_t extra_size
; /* size to set in extra bytes
*/
2439 mod_handle_t instance
; /* creator instance
*/
2440 lparam_t user_data
; /* user
-specific data
*/
2441 lparam_t extra_value
; /* value to set in extra bytes or window id
*/
2442 int extra_offset
; /* offset to set in extra bytes
*/
2444 unsigned int old_style
; /* old window style
*/
2445 unsigned int old_ex_style
; /* old window extended style
*/
2446 mod_handle_t old_instance
; /* old creator instance
*/
2447 lparam_t old_user_data
; /* old user
-specific data
*/
2448 lparam_t old_extra_value
; /* old value in extra bytes
*/
2449 lparam_t old_id
; /* old window id
*/
2451 #define SET_WIN_STYLE
0x01
2452 #define SET_WIN_EXSTYLE
0x02
2453 #define SET_WIN_ID
0x04
2454 #define SET_WIN_INSTANCE
0x08
2455 #define SET_WIN_USERDATA
0x10
2456 #define SET_WIN_EXTRA
0x20
2457 #define SET_WIN_UNICODE
0x40
2460 /* Set the parent of a window
*/
2462 user_handle_t handle
; /* handle to the window
*/
2463 user_handle_t parent
; /* handle to the parent
*/
2465 user_handle_t old_parent
; /* old parent window
*/
2466 user_handle_t full_parent
; /* full handle of new parent
*/
2467 int dpi
; /* new window DPI if not per
-monitor aware
*/
2468 int awareness
; /* new DPI awareness
*/
2472 /* Get a list of the window parents
, up to the root of the tree
*/
2473 @
REQ(get_window_parents
)
2474 user_handle_t handle
; /* handle to the window
*/
2476 int count
; /* total count of parents
*/
2477 VARARG(parents
,user_handles
); /* parent handles
*/
2481 /* Get a list of the window children
*/
2482 @
REQ(get_window_children
)
2483 obj_handle_t desktop
; /* handle to desktop
*/
2484 user_handle_t parent
; /* parent window
*/
2485 atom_t atom
; /* class atom for the listed children
*/
2486 thread_id_t tid
; /* thread owning the listed children
*/
2487 VARARG(class
,unicode_str
); /* class name
*/
2489 int count
; /* total count of children
*/
2490 VARARG(children
,user_handles
); /* children handles
*/
2494 /* Get a list of the window children that contain a given point
*/
2495 @
REQ(get_window_children_from_point
)
2496 user_handle_t parent
; /* parent window
*/
2497 int x
; /* point in parent coordinates
*/
2499 int dpi
; /* dpi for the point coordinates
*/
2501 int count
; /* total count of children
*/
2502 VARARG(children
,user_handles
); /* children handles
*/
2506 /* Get window tree information from a window handle
*/
2507 @
REQ(get_window_tree
)
2508 user_handle_t handle
; /* handle to the window
*/
2510 user_handle_t parent
; /* parent window
*/
2511 user_handle_t owner
; /* owner window
*/
2512 user_handle_t next_sibling
; /* next sibling in Z
-order
*/
2513 user_handle_t prev_sibling
; /* prev sibling in Z
-order
*/
2514 user_handle_t first_sibling
; /* first sibling in Z
-order
*/
2515 user_handle_t last_sibling
; /* last sibling in Z
-order
*/
2516 user_handle_t first_child
; /* first child
*/
2517 user_handle_t last_child
; /* last child
*/
2520 /* Set the position and Z order of a window
*/
2521 @
REQ(set_window_pos
)
2522 unsigned short swp_flags
; /* SWP_
* flags
*/
2523 unsigned short paint_flags
; /* paint
flags (see below
) */
2524 user_handle_t handle
; /* handle to the window
*/
2525 user_handle_t previous
; /* previous window in Z order
*/
2526 rectangle_t window
; /* window
rectangle (in parent coords
) */
2527 rectangle_t client
; /* client
rectangle (in parent coords
) */
2528 VARARG(valid
,rectangles
); /* valid rectangles from
WM_NCCALCSIZE (in parent coords
) */
2530 unsigned int new_style
; /* new window style
*/
2531 unsigned int new_ex_style
; /* new window extended style
*/
2532 user_handle_t surface_win
; /* parent window that holds the surface
*/
2533 int needs_update
; /* whether the surface region needs an update
*/
2535 #define SET_WINPOS_PAINT_SURFACE
0x01 /* window has a paintable surface
*/
2536 #define SET_WINPOS_PIXEL_FORMAT
0x02 /* window has a custom pixel format
*/
2538 /* Get the window and client rectangles of a window
*/
2539 @
REQ(get_window_rectangles
)
2540 user_handle_t handle
; /* handle to the window
*/
2541 int relative
; /* coords relative
to (see below
) */
2542 int dpi
; /* DPI to map to
, or zero for per
-monitor DPI
*/
2544 rectangle_t window
; /* window rectangle
*/
2545 rectangle_t client
; /* client rectangle
*/
2547 enum coords_relative
2549 COORDS_CLIENT
, /* relative to client area
*/
2550 COORDS_WINDOW
, /* relative to whole window area
*/
2551 COORDS_PARENT
, /* relative to parent
's client area */
2552 COORDS_SCREEN /* relative to screen origin */
2556 /* Get the window text */
2557 @REQ(get_window_text)
2558 user_handle_t handle; /* handle to the window */
2560 data_size_t length; /* total length in WCHARs */
2561 VARARG(text,unicode_str); /* window text */
2565 /* Set the window text */
2566 @REQ(set_window_text)
2567 user_handle_t handle; /* handle to the window */
2568 VARARG(text,unicode_str); /* window text */
2572 /* Get the coordinates offset between two windows */
2573 @REQ(get_windows_offset)
2574 user_handle_t from; /* handle to the first window */
2575 user_handle_t to; /* handle to the second window */
2576 int dpi; /* DPI to map to, or zero for per-monitor DPI */
2578 int x; /* x coordinate offset */
2579 int y; /* y coordinate offset */
2580 int mirror; /* whether to mirror the x coordinate */
2584 /* Get the visible region of a window */
2585 @REQ(get_visible_region)
2586 user_handle_t window; /* handle to the window */
2587 unsigned int flags; /* DCX flags */
2589 user_handle_t top_win; /* top window to clip against */
2590 rectangle_t top_rect; /* top window visible rect with screen coords */
2591 rectangle_t win_rect; /* window rect in screen coords */
2592 unsigned int paint_flags; /* paint flags (from SET_WINPOS_* flags) */
2593 data_size_t total_size; /* total size of the resulting region */
2594 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2598 /* Get the visible surface region of a window */
2599 @REQ(get_surface_region)
2600 user_handle_t window; /* handle to the window */
2602 rectangle_t visible_rect; /* window visible rect in screen coords */
2603 data_size_t total_size; /* total size of the resulting region */
2604 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2608 /* Get the window region */
2609 @REQ(get_window_region)
2610 user_handle_t window; /* handle to the window */
2612 data_size_t total_size; /* total size of the resulting region */
2613 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2617 /* Set the window region */
2618 @REQ(set_window_region)
2619 user_handle_t window; /* handle to the window */
2620 int redraw; /* redraw the window? */
2621 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2625 /* Get the window update region */
2626 @REQ(get_update_region)
2627 user_handle_t window; /* handle to the window */
2628 user_handle_t from_child; /* child to start searching from */
2629 unsigned int flags; /* update flags (see below) */
2631 user_handle_t child; /* child to repaint (or window itself) */
2632 unsigned int flags; /* resulting update flags (see below) */
2633 data_size_t total_size; /* total size of the resulting region */
2634 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2636 #define UPDATE_NONCLIENT 0x001 /* get region for repainting non-client area */
2637 #define UPDATE_ERASE 0x002 /* get region for erasing client area */
2638 #define UPDATE_PAINT 0x004 /* get region for painting client area */
2639 #define UPDATE_INTERNALPAINT 0x008 /* get region if internal paint is pending */
2640 #define UPDATE_ALLCHILDREN 0x010 /* force repaint of all children */
2641 #define UPDATE_NOCHILDREN 0x020 /* don't try to repaint any children
*/
2642 #define UPDATE_NOREGION
0x040 /* don
't return a region, only the flags */
2643 #define UPDATE_DELAYED_ERASE 0x080 /* still needs erase after BeginPaint */
2644 #define UPDATE_CLIPCHILDREN 0x100 /* remove clipped children from the update region */
2647 /* Update the z order of a window so that a given rectangle is fully visible */
2648 @REQ(update_window_zorder)
2649 user_handle_t window; /* handle to the window */
2650 rectangle_t rect; /* rectangle that must be visible (in client coords) */
2654 /* Mark parts of a window as needing a redraw */
2656 user_handle_t window; /* handle to the window */
2657 unsigned int flags; /* RDW_* flags */
2658 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2662 /* Set a window property */
2663 @REQ(set_window_property)
2664 user_handle_t window; /* handle to the window */
2665 lparam_t data; /* data to store */
2666 atom_t atom; /* property atom (if no name specified) */
2667 VARARG(name,unicode_str); /* property name */
2671 /* Remove a window property */
2672 @REQ(remove_window_property)
2673 user_handle_t window; /* handle to the window */
2674 atom_t atom; /* property atom (if no name specified) */
2675 VARARG(name,unicode_str); /* property name */
2677 lparam_t data; /* data stored in property */
2681 /* Get a window property */
2682 @REQ(get_window_property)
2683 user_handle_t window; /* handle to the window */
2684 atom_t atom; /* property atom (if no name specified) */
2685 VARARG(name,unicode_str); /* property name */
2687 lparam_t data; /* data stored in property */
2691 /* Get the list of properties of a window */
2692 @REQ(get_window_properties)
2693 user_handle_t window; /* handle to the window */
2695 int total; /* total number of properties */
2696 VARARG(props,properties); /* list of properties */
2700 /* Create a window station */
2701 @REQ(create_winstation)
2702 unsigned int flags; /* window station flags */
2703 unsigned int access; /* wanted access rights */
2704 unsigned int attributes; /* object attributes */
2705 obj_handle_t rootdir; /* root directory */
2706 VARARG(name,unicode_str); /* object name */
2708 obj_handle_t handle; /* handle to the window station */
2712 /* Open a handle to a window station */
2713 @REQ(open_winstation)
2714 unsigned int access; /* wanted access rights */
2715 unsigned int attributes; /* object attributes */
2716 obj_handle_t rootdir; /* root directory */
2717 VARARG(name,unicode_str); /* object name */
2719 obj_handle_t handle; /* handle to the window station */
2723 /* Close a window station */
2724 @REQ(close_winstation)
2725 obj_handle_t handle; /* handle to the window station */
2729 /* Get the process current window station */
2730 @REQ(get_process_winstation)
2732 obj_handle_t handle; /* handle to the window station */
2736 /* Set the process current window station */
2737 @REQ(set_process_winstation)
2738 obj_handle_t handle; /* handle to the window station */
2742 /* Enumerate window stations */
2743 @REQ(enum_winstation)
2744 unsigned int index; /* current index */
2746 unsigned int next; /* next index */
2747 VARARG(name,unicode_str); /* window station name */
2751 /* Create a desktop */
2752 @REQ(create_desktop)
2753 unsigned int flags; /* desktop flags */
2754 unsigned int access; /* wanted access rights */
2755 unsigned int attributes; /* object attributes */
2756 VARARG(name,unicode_str); /* object name */
2758 obj_handle_t handle; /* handle to the desktop */
2762 /* Open a handle to a desktop */
2764 obj_handle_t winsta; /* window station to open (null allowed) */
2765 unsigned int flags; /* desktop flags */
2766 unsigned int access; /* wanted access rights */
2767 unsigned int attributes; /* object attributes */
2768 VARARG(name,unicode_str); /* object name */
2770 obj_handle_t handle; /* handle to the desktop */
2774 /* Open a handle to current input desktop */
2775 @REQ(open_input_desktop)
2776 unsigned int flags; /* desktop flags */
2777 unsigned int access; /* wanted access rights */
2778 unsigned int attributes; /* object attributes */
2780 obj_handle_t handle; /* handle to the desktop */
2784 /* Close a desktop */
2786 obj_handle_t handle; /* handle to the desktop */
2790 /* Get the thread current desktop */
2791 @REQ(get_thread_desktop)
2792 thread_id_t tid; /* thread id */
2794 obj_handle_t handle; /* handle to the desktop */
2798 /* Set the thread current desktop */
2799 @REQ(set_thread_desktop)
2800 obj_handle_t handle; /* handle to the desktop */
2804 /* Enumerate desktops */
2806 obj_handle_t winstation; /* handle to the window station */
2807 unsigned int index; /* current index */
2809 unsigned int next; /* next index */
2810 VARARG(name,unicode_str); /* window station name */
2814 /* Get/set information about a user object (window station or desktop) */
2815 @REQ(set_user_object_info)
2816 obj_handle_t handle; /* handle to the object */
2817 unsigned int flags; /* information to set/get */
2818 unsigned int obj_flags; /* new object flags */
2820 int is_desktop; /* is object a desktop? */
2821 unsigned int old_obj_flags; /* old object flags */
2822 VARARG(name,unicode_str); /* object name */
2824 #define SET_USER_OBJECT_SET_FLAGS 1
2825 #define SET_USER_OBJECT_GET_FULL_NAME 2
2828 /* Register a hotkey */
2829 @REQ(register_hotkey)
2830 user_handle_t window; /* handle to the window */
2831 int id; /* hotkey identifier */
2832 unsigned int flags; /* modifier keys */
2833 unsigned int vkey; /* virtual key code */
2835 int replaced; /* did we replace an existing hotkey? */
2836 unsigned int flags; /* flags of replaced hotkey */
2837 unsigned int vkey; /* virtual key code of replaced hotkey */
2841 /* Unregister a hotkey */
2842 @REQ(unregister_hotkey)
2843 user_handle_t window; /* handle to the window */
2844 int id; /* hotkey identifier */
2846 unsigned int flags; /* flags of removed hotkey */
2847 unsigned int vkey; /* virtual key code of removed hotkey */
2851 /* Attach (or detach) thread inputs */
2852 @REQ(attach_thread_input)
2853 thread_id_t tid_from; /* thread to be attached */
2854 thread_id_t tid_to; /* thread to which tid_from should be attached */
2855 int attach; /* is it an attach? */
2859 /* Get input data for a given thread */
2860 @REQ(get_thread_input)
2861 thread_id_t tid; /* id of thread */
2863 user_handle_t focus; /* handle to the focus window */
2864 user_handle_t capture; /* handle to the capture window */
2865 user_handle_t active; /* handle to the active window */
2866 user_handle_t foreground; /* handle to the global foreground window */
2867 user_handle_t menu_owner; /* handle to the menu owner */
2868 user_handle_t move_size; /* handle to the moving/resizing window */
2869 user_handle_t caret; /* handle to the caret window */
2870 user_handle_t cursor; /* handle to the cursor */
2871 int show_count; /* cursor show count */
2872 rectangle_t rect; /* caret rectangle */
2876 /* Get the time of the last input event */
2877 @REQ(get_last_input_time)
2883 /* Retrieve queue keyboard state for current thread or global async state */
2885 int async; /* whether to query the async state */
2886 int key; /* optional key code or -1 */
2888 unsigned char state; /* state of specified key */
2889 VARARG(keystate,bytes); /* state array for all the keys */
2892 /* Set queue keyboard state for current thread */
2894 int async; /* whether to change the async state too */
2895 VARARG(keystate,bytes); /* state array for all the keys */
2898 /* Set the system foreground window */
2899 @REQ(set_foreground_window)
2900 user_handle_t handle; /* handle to the foreground window */
2902 user_handle_t previous; /* handle to the previous foreground window */
2903 int send_msg_old; /* whether we have to send a msg to the old window */
2904 int send_msg_new; /* whether we have to send a msg to the new window */
2907 /* Set the current thread focus window */
2908 @REQ(set_focus_window)
2909 user_handle_t handle; /* handle to the focus window */
2911 user_handle_t previous; /* handle to the previous focus window */
2914 /* Set the current thread active window */
2915 @REQ(set_active_window)
2916 user_handle_t handle; /* handle to the active window */
2918 user_handle_t previous; /* handle to the previous active window */
2921 /* Set the current thread capture window */
2922 @REQ(set_capture_window)
2923 user_handle_t handle; /* handle to the capture window */
2924 unsigned int flags; /* capture flags (see below) */
2926 user_handle_t previous; /* handle to the previous capture window */
2927 user_handle_t full_handle; /* full 32-bit handle of new capture window */
2929 #define CAPTURE_MENU 0x01 /* capture is for a menu */
2930 #define CAPTURE_MOVESIZE 0x02 /* capture is for moving/resizing */
2933 /* Set the current thread caret window */
2934 @REQ(set_caret_window)
2935 user_handle_t handle; /* handle to the caret window */
2936 int width; /* caret width */
2937 int height; /* caret height */
2939 user_handle_t previous; /* handle to the previous caret window */
2940 rectangle_t old_rect; /* previous caret rectangle */
2941 int old_hide; /* previous hide count */
2942 int old_state; /* previous caret state (1=on, 0=off) */
2946 /* Set the current thread caret information */
2947 @REQ(set_caret_info)
2948 unsigned int flags; /* caret flags (see below) */
2949 user_handle_t handle; /* handle to the caret window */
2950 int x; /* caret x position */
2951 int y; /* caret y position */
2952 int hide; /* increment for hide count (can be negative to show it) */
2953 int state; /* caret state (see below) */
2955 user_handle_t full_handle; /* handle to the current caret window */
2956 rectangle_t old_rect; /* previous caret rectangle */
2957 int old_hide; /* previous hide count */
2958 int old_state; /* previous caret state (1=on, 0=off) */
2960 #define SET_CARET_POS 0x01 /* set the caret position from x,y */
2961 #define SET_CARET_HIDE 0x02 /* increment the caret hide count */
2962 #define SET_CARET_STATE 0x04 /* set the caret on/off state */
2965 CARET_STATE_OFF, /* off */
2966 CARET_STATE_ON, /* on */
2967 CARET_STATE_TOGGLE, /* toggle current state */
2968 CARET_STATE_ON_IF_MOVED /* on if the position differs, unchanged otherwise */
2972 /* Set a window hook */
2974 int id; /* id of the hook */
2975 process_id_t pid; /* id of process to set the hook into */
2976 thread_id_t tid; /* id of thread to set the hook into */
2979 client_ptr_t proc; /* hook procedure */
2981 int unicode; /* is it a unicode hook? */
2982 VARARG(module,unicode_str); /* module name */
2984 user_handle_t handle; /* handle to the hook */
2985 unsigned int active_hooks; /* active hooks bitmap */
2989 /* Remove a window hook */
2991 user_handle_t handle; /* handle to the hook */
2992 client_ptr_t proc; /* hook procedure if handle is 0 */
2993 int id; /* id of the hook if handle is 0 */
2995 unsigned int active_hooks; /* active hooks bitmap */
2999 /* Start calling a hook chain */
3000 @REQ(start_hook_chain)
3001 int id; /* id of the hook */
3002 int event; /* signalled event */
3003 user_handle_t window; /* handle to the event window */
3004 int object_id; /* object id for out of context winevent */
3005 int child_id; /* child id for out of context winevent */
3007 user_handle_t handle; /* handle to the next hook */
3008 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
3009 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
3010 int unicode; /* is it a unicode hook? */
3011 client_ptr_t proc; /* hook procedure */
3012 unsigned int active_hooks; /* active hooks bitmap */
3013 VARARG(module,unicode_str); /* module name */
3017 /* Finished calling a hook chain */
3018 @REQ(finish_hook_chain)
3019 int id; /* id of the hook */
3023 /* Get the hook information */
3025 user_handle_t handle; /* handle to the current hook */
3026 int get_next; /* do we want info about current or next hook? */
3027 int event; /* signalled event */
3028 user_handle_t window; /* handle to the event window */
3029 int object_id; /* object id for out of context winevent */
3030 int child_id; /* child id for out of context winevent */
3032 user_handle_t handle; /* handle to the hook */
3033 int id; /* id of the hook */
3034 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
3035 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
3036 client_ptr_t proc; /* hook procedure */
3037 int unicode; /* is it a unicode hook? */
3038 VARARG(module,unicode_str); /* module name */
3042 /* Create a window class */
3044 int local; /* is it a local class? */
3045 atom_t atom; /* class atom */
3046 unsigned int style; /* class style */
3047 mod_handle_t instance; /* module instance */
3048 int extra; /* number of extra class bytes */
3049 int win_extra; /* number of window extra bytes */
3050 client_ptr_t client_ptr; /* pointer to class in client address space */
3051 data_size_t name_offset; /* base class name offset for specified atom */
3052 VARARG(name,unicode_str); /* class name */
3054 atom_t atom; /* resulting class atom */
3058 /* Destroy a window class */
3060 atom_t atom; /* class atom */
3061 mod_handle_t instance; /* module instance */
3062 VARARG(name,unicode_str); /* class name */
3064 client_ptr_t client_ptr; /* pointer to class in client address space */
3068 /* Set some information in a class */
3069 @REQ(set_class_info)
3070 user_handle_t window; /* handle to the window */
3071 unsigned int flags; /* flags for info to set (see below) */
3072 atom_t atom; /* class atom */
3073 unsigned int style; /* class style */
3074 int win_extra; /* number of window extra bytes */
3075 mod_handle_t instance; /* module instance */
3076 int extra_offset; /* offset to set in extra bytes */
3077 data_size_t extra_size; /* size to set in extra bytes */
3078 lparam_t extra_value; /* value to set in extra bytes */
3080 atom_t old_atom; /* previous class atom */
3081 atom_t base_atom; /* base class atom */
3082 mod_handle_t old_instance; /* previous module instance */
3083 lparam_t old_extra_value; /* old value in extra bytes */
3084 unsigned int old_style; /* previous class style */
3085 int old_extra; /* previous number of class extra bytes */
3086 int old_win_extra; /* previous number of window extra bytes */
3088 #define SET_CLASS_ATOM 0x0001
3089 #define SET_CLASS_STYLE 0x0002
3090 #define SET_CLASS_WINEXTRA 0x0004
3091 #define SET_CLASS_INSTANCE 0x0008
3092 #define SET_CLASS_EXTRA 0x0010
3095 /* Open the clipboard */
3096 @REQ(open_clipboard)
3097 user_handle_t window; /* clipboard window */
3099 user_handle_t owner; /* current clipboard owner */
3103 /* Close the clipboard */
3104 @REQ(close_clipboard)
3106 user_handle_t viewer; /* first clipboard viewer */
3107 user_handle_t owner; /* current clipboard owner */
3111 /* Empty the clipboard and grab ownership */
3112 @REQ(empty_clipboard)
3116 /* Add a data format to the clipboard */
3117 @REQ(set_clipboard_data)
3118 unsigned int format; /* clipboard format of the data */
3119 unsigned int lcid; /* locale id to use for synthesizing text formats */
3120 VARARG(data,bytes); /* data contents */
3122 unsigned int seqno; /* sequence number for the set data */
3126 /* Fetch a data format from the clipboard */
3127 @REQ(get_clipboard_data)
3128 unsigned int format; /* clipboard format of the data */
3129 int render; /* will we try to render it if missing? */
3130 int cached; /* do we already have it in the client-side cache? */
3131 unsigned int seqno; /* sequence number for the data in the cache */
3133 unsigned int from; /* for synthesized data, format to generate it from */
3134 user_handle_t owner; /* clipboard owner for delayed-rendered formats */
3135 unsigned int seqno; /* sequence number for the originally set data */
3136 data_size_t total; /* total data size */
3137 VARARG(data,bytes); /* data contents */
3141 /* Retrieve a list of available formats */
3142 @REQ(get_clipboard_formats)
3143 unsigned int format; /* specific format to query, return all if 0 */
3145 unsigned int count; /* count of available formats */
3146 VARARG(formats,uints); /* array of available formats */
3150 /* Retrieve the next available format */
3151 @REQ(enum_clipboard_formats)
3152 unsigned int previous; /* previous format, or first if 0 */
3154 unsigned int format; /* next format */
3158 /* Release ownership of the clipboard */
3159 @REQ(release_clipboard)
3160 user_handle_t owner; /* clipboard owner to release */
3162 user_handle_t viewer; /* first clipboard viewer */
3163 user_handle_t owner; /* current clipboard owner */
3167 /* Get clipboard information */
3168 @REQ(get_clipboard_info)
3170 user_handle_t window; /* clipboard window */
3171 user_handle_t owner; /* clipboard owner */
3172 user_handle_t viewer; /* clipboard viewer */
3173 unsigned int seqno; /* current sequence number */
3177 /* Set the clipboard viewer window */
3178 @REQ(set_clipboard_viewer)
3179 user_handle_t viewer; /* clipboard viewer */
3180 user_handle_t previous; /* if non-zero, check that this was the previous viewer */
3182 user_handle_t old_viewer; /* previous clipboard viewer */
3183 user_handle_t owner; /* clipboard owner */
3187 /* Add a clipboard listener window */
3188 @REQ(add_clipboard_listener)
3189 user_handle_t window; /* clipboard listener window */
3193 /* Remove a clipboard listener window */
3194 @REQ(remove_clipboard_listener)
3195 user_handle_t window; /* clipboard listener window */
3199 /* Create a security token */
3201 struct luid token_id;
3202 unsigned int access; /* access rights to the new token */
3203 int primary; /* is the new token to be a primary one? */
3204 int impersonation_level; /* impersonation level of the new token */
3205 abstime_t expire; /* expiration time */
3209 /* VARARG(objattr,object_attributes); */
3210 /* VARARG(user,sid); */
3211 /* VARARG(groups,sid); */
3212 /* VARARG(privs,luid_attr); */
3213 /* VARARG(dacl,acl); */
3215 obj_handle_t token; /* handle to the token */
3219 /* Open a security token */
3221 obj_handle_t handle; /* handle to the thread or process */
3222 unsigned int access; /* access rights to the new token */
3223 unsigned int attributes;/* object attributes */
3224 unsigned int flags; /* flags (see below) */
3226 obj_handle_t token; /* handle to the token */
3228 #define OPEN_TOKEN_THREAD 1
3229 #define OPEN_TOKEN_AS_SELF 2
3232 /* Set/get the global windows */
3233 @REQ(set_global_windows)
3234 unsigned int flags; /* flags for fields to set (see below) */
3235 user_handle_t shell_window; /* handle to the new shell window */
3236 user_handle_t shell_listview; /* handle to the new shell listview window */
3237 user_handle_t progman_window; /* handle to the new program manager window */
3238 user_handle_t taskman_window; /* handle to the new task manager window */
3240 user_handle_t old_shell_window; /* handle to the shell window */
3241 user_handle_t old_shell_listview; /* handle to the shell listview window */
3242 user_handle_t old_progman_window; /* handle to the new program manager window */
3243 user_handle_t old_taskman_window; /* handle to the new task manager window */
3245 #define SET_GLOBAL_SHELL_WINDOWS 0x01 /* set both main shell and listview windows */
3246 #define SET_GLOBAL_PROGMAN_WINDOW 0x02
3247 #define SET_GLOBAL_TASKMAN_WINDOW 0x04
3249 /* Adjust the privileges held by a token */
3250 @REQ(adjust_token_privileges)
3251 obj_handle_t handle; /* handle to the token */
3252 int disable_all; /* disable all privileges? */
3253 int get_modified_state; /* get modified privileges? */
3254 VARARG(privileges,luid_attr); /* privileges to enable/disable/remove */
3256 unsigned int len; /* total length in bytes required to store token privileges */
3257 VARARG(privileges,luid_attr); /* modified privileges */
3260 /* Retrieves the set of privileges held by or available to a token */
3261 @REQ(get_token_privileges)
3262 obj_handle_t handle; /* handle to the token */
3264 unsigned int len; /* total length in bytes required to store token privileges */
3265 VARARG(privileges,luid_attr); /* privileges held by or available to a token */
3268 /* Check the token has the required privileges */
3269 @REQ(check_token_privileges)
3270 obj_handle_t handle; /* handle to the token */
3271 int all_required; /* are all the privileges required for the check to succeed? */
3272 VARARG(privileges,luid_attr); /* privileges to check */
3274 int has_privileges; /* does the token have the required privileges? */
3275 VARARG(privileges,luid_attr); /* privileges held by or available to a token */
3278 @REQ(duplicate_token)
3279 obj_handle_t handle; /* handle to the token to duplicate */
3280 unsigned int access; /* access rights to the new token */
3281 int primary; /* is the new token to be a primary one? */
3282 int impersonation_level; /* impersonation level of the new token */
3283 VARARG(objattr,object_attributes); /* object attributes */
3285 obj_handle_t new_handle; /* duplicated handle */
3289 obj_handle_t handle; /* handle to the token to duplicate */
3290 unsigned int flags; /* flags */
3291 data_size_t privileges_size; /* size of privileges */
3292 VARARG(privileges,luid_attr,privileges_size); /* privileges to remove from new token */
3293 VARARG(disable_sids,sid); /* array of groups to remove from new token */
3295 obj_handle_t new_handle; /* filtered handle */
3299 obj_handle_t handle; /* handle to the token */
3300 unsigned int desired_access; /* desired access to the object */
3301 generic_map_t mapping; /* mapping to specific rights */
3302 VARARG(sd,security_descriptor); /* security descriptor to check */
3304 unsigned int access_granted; /* access rights actually granted */
3305 unsigned int access_status; /* was access granted? */
3306 unsigned int privileges_len; /* length needed to store privileges */
3307 VARARG(privileges,luid_attr); /* privileges used during access check */
3311 obj_handle_t handle; /* handle to the token */
3312 unsigned int which_sid; /* which SID to retrieve from the token */
3314 data_size_t sid_len; /* length needed to store sid */
3315 VARARG(sid,sid); /* the sid specified by which_sid from the token */
3318 @REQ(get_token_groups)
3319 obj_handle_t handle; /* handle to the token */
3320 unsigned int attr_mask; /* mask for wanted attributes */
3322 data_size_t attr_len; /* length needed to store attrs */
3323 data_size_t sid_len; /* length needed to store sids */
3324 VARARG(attrs,uints,attr_len); /* group attributes */
3325 VARARG(sids,sids); /* group sids */
3328 @REQ(get_token_default_dacl)
3329 obj_handle_t handle; /* handle to the token */
3331 data_size_t acl_len; /* length needed to store access control list */
3332 VARARG(acl,acl); /* access control list */
3335 @REQ(set_token_default_dacl)
3336 obj_handle_t handle; /* handle to the token */
3337 VARARG(acl,acl); /* default dacl to set */
3340 @REQ(set_security_object)
3341 obj_handle_t handle; /* handle to the object */
3342 unsigned int security_info; /* which parts of security descriptor to set */
3343 VARARG(sd,security_descriptor); /* security descriptor to set */
3346 @REQ(get_security_object)
3347 obj_handle_t handle; /* handle to the object */
3348 unsigned int security_info; /* which parts of security descriptor to get */
3350 unsigned int sd_len; /* buffer size needed for sd */
3351 VARARG(sd,security_descriptor); /* retrieved security descriptor */
3358 obj_handle_t handle;
3359 unsigned int access;
3360 unsigned int attributes;
3364 /* Return a list of all opened handles */
3365 @REQ(get_system_handles)
3367 unsigned int count; /* number of handles */
3368 VARARG(data,handle_infos); /* array of handle_infos */
3372 /* Create a mailslot */
3373 @REQ(create_mailslot)
3374 unsigned int access; /* wanted access rights */
3375 timeout_t read_timeout;
3376 unsigned int max_msgsize;
3377 VARARG(objattr,object_attributes); /* object attributes */
3379 obj_handle_t handle; /* handle to the mailslot */
3383 /* Set mailslot information */
3384 @REQ(set_mailslot_info)
3385 obj_handle_t handle; /* handle to the mailslot */
3386 timeout_t read_timeout;
3389 timeout_t read_timeout;
3390 unsigned int max_msgsize;
3392 #define MAILSLOT_SET_READ_TIMEOUT 1
3395 /* Create a directory object */
3396 @REQ(create_directory)
3397 unsigned int access; /* access flags */
3398 VARARG(objattr,object_attributes); /* object attributes */
3400 obj_handle_t handle; /* handle to the directory */
3404 /* Open a directory object */
3405 @REQ(open_directory)
3406 unsigned int access; /* access flags */
3407 unsigned int attributes; /* object attributes */
3408 obj_handle_t rootdir; /* root directory */
3409 VARARG(directory_name,unicode_str); /* Directory name */
3411 obj_handle_t handle; /* handle to the directory */
3415 /* Get a directory entry by index */
3416 @REQ(get_directory_entry)
3417 obj_handle_t handle; /* handle to the directory */
3418 unsigned int index; /* entry index */
3420 data_size_t total_len; /* total length needed for strings */
3421 data_size_t name_len; /* length of the entry name in bytes */
3422 VARARG(name,unicode_str,name_len); /* entry name */
3423 VARARG(type,unicode_str); /* entry type */
3427 /* Create a symbolic link object */
3428 @REQ(create_symlink)
3429 unsigned int access; /* access flags */
3430 VARARG(objattr,object_attributes); /* object attributes */
3431 VARARG(target_name,unicode_str); /* target name */
3433 obj_handle_t handle; /* handle to the symlink */
3437 /* Open a symbolic link object */
3439 unsigned int access; /* access flags */
3440 unsigned int attributes; /* object attributes */
3441 obj_handle_t rootdir; /* root directory */
3442 VARARG(name,unicode_str); /* symlink name */
3444 obj_handle_t handle; /* handle to the symlink */
3448 /* Query a symbolic link object */
3450 obj_handle_t handle; /* handle to the symlink */
3452 data_size_t total; /* total needed size for name */
3453 VARARG(target_name,unicode_str); /* target name */
3457 /* Query basic object information */
3458 @REQ(get_object_info)
3459 obj_handle_t handle; /* handle to the object */
3461 unsigned int access; /* granted access mask */
3462 unsigned int ref_count; /* object ref count */
3463 unsigned int handle_count; /* object handle count */
3467 /* Query the full name of an object */
3468 @REQ(get_object_name)
3469 obj_handle_t handle; /* handle to the object */
3471 data_size_t total; /* total needed size for name */
3472 VARARG(name,unicode_str); /* object name */
3476 /* Query object type name information */
3477 @REQ(get_object_type)
3478 obj_handle_t handle; /* handle to the object */
3480 VARARG(info,object_type_info); /* type information */
3484 /* Query type information for all types */
3485 @REQ(get_object_types)
3487 int count; /* total count of object types */
3488 VARARG(info,object_types_info); /* type information */
3492 /* Allocate a locally-unique identifier */
3493 @REQ(allocate_locally_unique_id)
3499 /* Create a device manager */
3500 @REQ(create_device_manager)
3501 unsigned int access; /* wanted access rights */
3502 unsigned int attributes; /* object attributes */
3504 obj_handle_t handle; /* handle to the device */
3508 /* Create a device */
3510 obj_handle_t rootdir; /* root directory */
3511 client_ptr_t user_ptr; /* opaque ptr for use by client */
3512 obj_handle_t manager; /* device manager */
3513 VARARG(name,unicode_str); /* object name */
3517 /* Delete a device */
3519 obj_handle_t manager; /* handle to the device manager */
3520 client_ptr_t device; /* pointer to the device */
3524 /* Retrieve the next pending device irp request */
3525 @REQ(get_next_device_request)
3526 obj_handle_t manager; /* handle to the device manager */
3527 obj_handle_t prev; /* handle to the previous irp */
3528 unsigned int status; /* status of the previous irp */
3529 client_ptr_t user_ptr; /* user pointer of the previous irp */
3530 int pending; /* was the previous irp marked pending? */
3531 unsigned int iosb_status; /* IOSB status of the previous irp */
3532 data_size_t result; /* IOSB result of the previous irp */
3533 VARARG(data,bytes); /* output data of the previous irp */
3535 irp_params_t params; /* irp parameters */
3536 obj_handle_t next; /* handle to the next irp */
3537 thread_id_t client_tid; /* tid of thread calling irp */
3538 client_ptr_t client_thread; /* pointer to thread object of calling irp */
3539 data_size_t in_size; /* total needed input size */
3540 VARARG(next_data,bytes); /* input data of the next irp */
3544 /* Get kernel pointer from server object */
3545 @REQ(get_kernel_object_ptr)
3546 obj_handle_t manager; /* handle to the device manager */
3547 obj_handle_t handle; /* object handle */
3549 client_ptr_t user_ptr; /* kernel object pointer */
3553 /* Associate kernel pointer with server object */
3554 @REQ(set_kernel_object_ptr)
3555 obj_handle_t manager; /* handle to the device manager */
3556 obj_handle_t handle; /* object handle */
3557 client_ptr_t user_ptr; /* kernel object pointer */
3561 /* Grab server object reference from kernel object pointer */
3562 @REQ(grab_kernel_object)
3563 obj_handle_t manager; /* handle to the device manager */
3564 client_ptr_t user_ptr; /* kernel object pointer */
3568 /* Release server object reference from kernel object pointer */
3569 @REQ(release_kernel_object)
3570 obj_handle_t manager; /* handle to the device manager */
3571 client_ptr_t user_ptr; /* kernel object pointer */
3575 /* Get handle from kernel object pointer */
3576 @REQ(get_kernel_object_handle)
3577 obj_handle_t manager; /* handle to the device manager */
3578 client_ptr_t user_ptr; /* kernel object pointer */
3579 unsigned int access; /* wanted access rights */
3581 obj_handle_t handle; /* kernel object handle */
3585 /* Make the current process a system process */
3586 @REQ(make_process_system)
3587 obj_handle_t handle; /* handle to the process */
3589 obj_handle_t event; /* event signaled when all user processes have exited */
3593 /* Get detailed fixed-size information about a token */
3594 @REQ(get_token_info)
3595 obj_handle_t handle; /* handle to the object */
3597 struct luid token_id; /* locally-unique identifier of the token */
3598 struct luid modified_id; /* locally-unique identifier of the modified version of the token */
3599 unsigned int session_id; /* token session id */
3600 int primary; /* is the token primary or impersonation? */
3601 int impersonation_level; /* level of impersonation */
3602 int elevation; /* elevation type */
3603 int group_count; /* the number of groups the token is a member of */
3604 int privilege_count; /* the number of privileges the token has */
3608 /* Create a token which is an elevation counterpart to this token */
3609 @REQ(create_linked_token)
3610 obj_handle_t handle; /* handle to the token */
3612 obj_handle_t linked; /* handle to the linked token */
3616 /* Create I/O completion port */
3617 @REQ(create_completion)
3618 unsigned int access; /* desired access to a port */
3619 unsigned int concurrent; /* max number of concurrent active threads */
3620 VARARG(objattr,object_attributes); /* object attributes */
3622 obj_handle_t handle; /* port handle */
3626 /* Open I/O completion port */
3627 @REQ(open_completion)
3628 unsigned int access; /* desired access to a port */
3629 unsigned int attributes; /* object attributes */
3630 obj_handle_t rootdir; /* root directory */
3631 VARARG(filename,unicode_str); /* port name */
3633 obj_handle_t handle; /* port handle */
3637 /* add completion to completion port */
3638 @REQ(add_completion)
3639 obj_handle_t handle; /* port handle */
3640 apc_param_t ckey; /* completion key */
3641 apc_param_t cvalue; /* completion value */
3642 apc_param_t information; /* IO_STATUS_BLOCK Information */
3643 unsigned int status; /* completion result */
3647 /* get completion from completion port queue */
3648 @REQ(remove_completion)
3649 obj_handle_t handle; /* port handle */
3651 apc_param_t ckey; /* completion key */
3652 apc_param_t cvalue; /* completion value */
3653 apc_param_t information; /* IO_STATUS_BLOCK Information */
3654 unsigned int status; /* completion result */
3658 /* get completion queue depth */
3659 @REQ(query_completion)
3660 obj_handle_t handle; /* port handle */
3662 unsigned int depth; /* completion queue depth */
3666 /* associate object with completion port */
3667 @REQ(set_completion_info)
3668 obj_handle_t handle; /* object handle */
3669 apc_param_t ckey; /* completion key */
3670 obj_handle_t chandle; /* port handle */
3674 /* check for associated completion and push msg */
3675 @REQ(add_fd_completion)
3676 obj_handle_t handle; /* async' object
*/
3677 apc_param_t cvalue
; /* completion value
*/
3678 apc_param_t information
; /* IO_STATUS_BLOCK Information
*/
3679 unsigned int status
; /* completion status
*/
3680 int async
; /* completion is an async result
*/
3684 /* set fd completion information
*/
3685 @
REQ(set_fd_completion_mode
)
3686 obj_handle_t handle
; /* handle to a file or directory
*/
3687 unsigned int flags
; /* completion notification flags
*/
3691 /* set fd disposition information
*/
3692 @
REQ(set_fd_disp_info
)
3693 obj_handle_t handle
; /* handle to a file or directory
*/
3694 unsigned int flags
; /* what actions should be taken when deleting a file
*/
3698 /* set fd name information
*/
3699 @
REQ(set_fd_name_info
)
3700 obj_handle_t handle
; /* handle to a file or directory
*/
3701 obj_handle_t rootdir
; /* root directory
*/
3702 data_size_t namelen
; /* length of NT name in bytes
*/
3703 int link
; /* link instead of renaming
*/
3704 unsigned int flags
; /* FILE_RENAME_
* flags
*/
3705 VARARG(name
,unicode_str
,namelen
); /* NT name
*/
3706 VARARG(filename
,string
); /* new file name
*/
3710 /* set fd eof information
*/
3711 @
REQ(set_fd_eof_info
)
3712 obj_handle_t handle
; /* handle to a file or directory
*/
3713 file_pos_t eof
; /* offset of eof of file
*/
3717 /* Retrieve layered info for a window
*/
3718 @
REQ(get_window_layered_info
)
3719 user_handle_t handle
; /* handle to the window
*/
3721 unsigned int color_key
; /* color key
*/
3722 unsigned int alpha
; /* alpha (0.
.255) */
3723 unsigned int flags
; /* LWA_
* flags
*/
3727 /* Set layered info for a window
*/
3728 @
REQ(set_window_layered_info
)
3729 user_handle_t handle
; /* handle to the window
*/
3730 unsigned int color_key
; /* color key
*/
3731 unsigned int alpha
; /* alpha (0.
.255) */
3732 unsigned int flags
; /* LWA_
* flags
*/
3736 /* Allocate an arbitrary user handle
*/
3737 @
REQ(alloc_user_handle
)
3739 user_handle_t handle
; /* allocated handle
*/
3743 /* Free an arbitrary user handle
*/
3744 @
REQ(free_user_handle
)
3745 user_handle_t handle
; /* handle to free
*/
3749 /* Set
/get the current cursor
*/
3751 unsigned int flags
; /* flags for fields to
set (see below
) */
3752 user_handle_t handle
; /* handle to the cursor
*/
3753 int show_count
; /* show count increment
/decrement
*/
3754 int x
; /* cursor position
*/
3756 rectangle_t clip
; /* cursor clip rectangle
*/
3758 user_handle_t prev_handle
; /* previous handle
*/
3759 int prev_count
; /* previous show count
*/
3760 int prev_x
; /* previous position
*/
3762 int new_x
; /* new position
*/
3764 rectangle_t new_clip
; /* new clip rectangle
*/
3765 unsigned int last_change
; /* time of last position change
*/
3767 #define SET_CURSOR_HANDLE
0x01
3768 #define SET_CURSOR_COUNT
0x02
3769 #define SET_CURSOR_POS
0x04
3770 #define SET_CURSOR_CLIP
0x08
3771 #define SET_CURSOR_NOCLIP
0x10
3772 #define SET_CURSOR_FSCLIP
0x20
3774 /* Get the history of the
64 last cursor positions
*/
3775 @
REQ(get_cursor_history
)
3777 VARARG(history
,cursor_positions
);
3781 /* Batch read rawinput message data
*/
3782 @
REQ(get_rawinput_buffer
)
3783 data_size_t rawinput_size
; /* size of RAWINPUT structure
*/
3784 data_size_t buffer_size
; /* size of output buffer
*/
3786 data_size_t next_size
; /* minimum size to get next message data
*/
3791 /* Modify the list of registered rawinput devices
*/
3792 @
REQ(update_rawinput_devices
)
3793 VARARG(devices
,rawinput_devices
);
3796 /* Create a new job object
*/
3798 unsigned int access
; /* wanted access rights
*/
3799 VARARG(objattr
,object_attributes
); /* object attributes
*/
3801 obj_handle_t handle
; /* handle to the job
*/
3805 /* Open a job object
*/
3807 unsigned int access
; /* wanted access rights
*/
3808 unsigned int attributes
; /* object attributes
*/
3809 obj_handle_t rootdir
; /* root directory
*/
3810 VARARG(name
,unicode_str
); /* object name
*/
3812 obj_handle_t handle
; /* handle to the job
*/
3816 /* Assign a job object to a process
*/
3818 obj_handle_t job
; /* handle to the job
*/
3819 obj_handle_t process
; /* handle to the process
*/
3823 /* Check if a process is associated with a job
*/
3824 @
REQ(process_in_job
)
3825 obj_handle_t job
; /* handle to the job
*/
3826 obj_handle_t process
; /* handle to the process
*/
3830 /* Set limit flags on a job
*/
3831 @
REQ(set_job_limits
)
3832 obj_handle_t handle
; /* handle to the job
*/
3833 unsigned int limit_flags
; /* new limit flags
*/
3837 /* Set new completion port for a job
*/
3838 @
REQ(set_job_completion_port
)
3839 obj_handle_t job
; /* handle to the job
*/
3840 obj_handle_t port
; /* handle to the completion port
*/
3841 client_ptr_t key
; /* key to send with completion messages
*/
3845 /* Retrieve information about a job
*/
3847 obj_handle_t handle
; /* handle to the job
*/
3849 int total_processes
; /* total count of processes
*/
3850 int active_processes
; /* count of running processes
*/
3851 VARARG(pids
,uints
); /* list of active pids
*/
3855 /* Terminate all processes associated with the job
*/
3857 obj_handle_t handle
; /* handle to the job
*/
3858 int status
; /* process exit code
*/
3862 /* Suspend a process
*/
3863 @
REQ(suspend_process
)
3864 obj_handle_t handle
; /* process handle
*/
3868 /* Resume a process
*/
3869 @
REQ(resume_process
)
3870 obj_handle_t handle
; /* process handle
*/
3874 /* Iterate thread list for process
*/
3875 @
REQ(get_next_thread
)
3876 obj_handle_t process
; /* process handle
*/
3877 obj_handle_t last
; /* thread handle to start with
*/
3878 unsigned int access
; /* desired access for returned handle
*/
3879 unsigned int attributes
; /* returned handle attributes
*/
3880 unsigned int flags
; /* controls iteration direction
*/
3882 obj_handle_t handle
; /* next thread handle
*/