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 data_size_t curdir_len
;
228 data_size_t dllpath_len
;
229 data_size_t imagepath_len
;
230 data_size_t cmdline_len
;
231 data_size_t title_len
;
232 data_size_t desktop_len
;
233 data_size_t shellinfo_len
;
234 data_size_t runtime_len
;
235 /* VARARG(curdir
,unicode_str
,curdir_len
); */
236 /* VARARG(dllpath
,unicode_str
,dllpath_len
); */
237 /* VARARG(imagepath
,unicode_str
,imagepath_len
); */
238 /* VARARG(cmdline
,unicode_str
,cmdline_len
); */
239 /* VARARG(title
,unicode_str
,title_len
); */
240 /* VARARG(desktop
,unicode_str
,desktop_len
); */
241 /* VARARG(shellinfo
,unicode_str
,shellinfo_len
); */
242 /* VARARG(runtime
,unicode_str
,runtime_len
); */
245 /* structure returned in the list of window properties
*/
248 atom_t atom
; /* property atom
*/
249 int string
; /* was atom a string originally?
*/
250 lparam_t data
; /* data stored in property
*/
253 /* structure to specify window rectangles
*/
262 /* structure for parameters of async I
/O calls
*/
265 obj_handle_t handle
; /* object to perform I
/O on
*/
266 obj_handle_t event
; /* event to signal when done
*/
267 client_ptr_t iosb
; /* I
/O status block in client addr space
*/
268 client_ptr_t user
; /* opaque user data containing callback pointer and async
-specific data
*/
269 client_ptr_t apc
; /* user APC to call
*/
270 apc_param_t apc_context
; /* user APC context or completion value
*/
273 /* structures for extra message data
*/
277 unsigned int device
; /* source
device (IMDT_
* values
) */
278 unsigned int origin
; /* source
origin (IMO_
* values
) */
286 int type
; /* RIM_TYPEKEYBOARD
*/
287 unsigned int message
; /* message generated by this rawinput event
*/
288 unsigned short vkey
; /* virtual key code
*/
289 unsigned short scan
; /* scan code
*/
293 int type
; /* RIM_TYPEMOUSE
*/
294 int x
; /* x coordinate
*/
295 int y
; /* y coordinate
*/
296 unsigned int data
; /* mouse data
*/
300 int type
; /* RIM_TYPEHID
*/
301 unsigned int device
; /* rawinput device index
*/
302 unsigned int param
; /* rawinput message param
*/
303 unsigned short usage_page
;/* HID usage page
*/
304 unsigned short usage
; /* HID usage
*/
305 unsigned int count
; /* HID report count
*/
306 unsigned int length
; /* HID report length
*/
310 struct hardware_msg_data
312 lparam_t info
; /* extra info
*/
313 data_size_t size
; /* size of hardware message data
*/
315 unsigned int hw_id
; /* unique id
*/
316 unsigned int flags
; /* hook flags
*/
317 struct hw_msg_source source
; /* message source
*/
318 union rawinput rawinput
; /* rawinput message data
*/
321 struct callback_msg_data
323 client_ptr_t callback
; /* callback function
*/
324 lparam_t data
; /* user data for callback
*/
325 lparam_t result
; /* message result
*/
328 struct winevent_msg_data
330 user_handle_t hook
; /* hook handle
*/
331 thread_id_t tid
; /* thread id
*/
332 client_ptr_t hook_proc
; /* hook proc address
*/
333 /* followed by module name if any
*/
341 int type
; /* INPUT_KEYBOARD
*/
342 unsigned short vkey
; /* virtual key code
*/
343 unsigned short scan
; /* scan code
*/
344 unsigned int flags
; /* event flags
*/
345 unsigned int time
; /* event time
*/
346 lparam_t info
; /* extra info
*/
350 int type
; /* INPUT_MOUSE
*/
351 int x
; /* coordinates
*/
353 unsigned int data
; /* mouse data
*/
354 unsigned int flags
; /* event flags
*/
355 unsigned int time
; /* event time
*/
356 lparam_t info
; /* extra info
*/
360 int type
; /* INPUT_HARDWARE
*/
361 unsigned int msg
; /* message code
*/
362 lparam_t lparam
; /* message param
*/
363 union rawinput rawinput
;/* rawinput message data
*/
369 unsigned char bytes
[1]; /* raw data for sent messages
*/
370 struct hardware_msg_data hardware
;
371 struct callback_msg_data callback
;
372 struct winevent_msg_data winevent
;
375 /* structure returned in filesystem events
*/
376 struct filesystem_event
385 unsigned int low_part
;
397 unsigned char revision
;
400 unsigned short count
;
406 unsigned char revision
;
407 unsigned char sub_count
;
408 unsigned char id_auth
[6];
409 unsigned int sub_auth
[15];
420 #define MAX_ACL_LEN
65535
422 struct security_descriptor
424 unsigned int control
; /* SE_ flags
*/
425 data_size_t owner_len
;
426 data_size_t group_len
;
427 data_size_t sacl_len
;
428 data_size_t dacl_len
;
429 /* VARARG(owner
,sid
); */
430 /* VARARG(group
,sid
); */
431 /* VARARG(sacl
,acl
); */
432 /* VARARG(dacl
,acl
); */
435 struct object_attributes
437 obj_handle_t rootdir
; /* root directory
*/
438 unsigned int attributes
; /* object attributes
*/
439 data_size_t sd_len
; /* length of security_descriptor data. may be
0 */
440 data_size_t name_len
; /* length of the name string. may be
0 */
441 /* VARARG(sd
,security_descriptor
); */
442 /* VARARG(name
,unicode_str
); */
445 struct object_type_info
447 data_size_t name_len
; /* length of the name string
*/
448 unsigned int index
; /* type index in global table
*/
449 unsigned int obj_count
; /* count of objects of this type
*/
450 unsigned int handle_count
; /* count of handles of this type
*/
451 unsigned int obj_max
; /* max count of objects of this type
*/
452 unsigned int handle_max
; /* max count of handles of this type
*/
453 unsigned int valid_access
; /* mask for valid access bits
*/
454 generic_map_t mapping
; /* generic access mappings
*/
455 /* VARARG(name
,unicode_str
); */
463 SELECT_SIGNAL_AND_WAIT
,
464 SELECT_KEYED_EVENT_WAIT
,
465 SELECT_KEYED_EVENT_RELEASE
473 enum select_op op
; /* SELECT_WAIT or SELECT_WAIT_ALL
*/
474 obj_handle_t handles
[MAXIMUM_WAIT_OBJECTS
];
479 enum select_op op
; /* SELECT_SIGNAL_AND_WAIT
*/
481 obj_handle_t signal
; /* must be last in the structure so we can remove it on retries
*/
485 enum select_op op
; /* SELECT_KEYED_EVENT_WAIT or SELECT_KEYED_EVENT_RELEASE
*/
497 APC_VIRTUAL_ALLOC_EX
,
513 enum apc_type type
; /* APC_USER
*/
515 client_ptr_t func
; /* void (__stdcall
*func
)(ULONG_PTR
,ULONG_PTR
,ULONG_PTR
); */
516 apc_param_t args
[3]; /* arguments for user function
*/
525 enum apc_type type
; /* APC_ASYNC_IO
*/
526 unsigned int status
; /* I
/O status
*/
527 client_ptr_t user
; /* user pointer
*/
528 client_ptr_t sb
; /* status block
*/
529 data_size_t result
; /* result size
*/
533 enum apc_type type
; /* APC_VIRTUAL_ALLOC
*/
534 unsigned int op_type
; /* type of operation
*/
535 client_ptr_t addr
; /* requested address
*/
536 mem_size_t size
; /* allocation size
*/
537 mem_size_t zero_bits
; /* number of zero high bits
*/
538 unsigned int prot
; /* memory protection flags
*/
542 enum apc_type type
; /* APC_VIRTUAL_ALLOC
*/
543 unsigned int op_type
; /* type of operation
*/
544 client_ptr_t addr
; /* requested address
*/
545 mem_size_t size
; /* allocation size
*/
546 mem_size_t limit_low
; /* allocation address limits
*/
547 mem_size_t limit_high
;
548 mem_size_t align
; /* allocation alignment
*/
549 unsigned int prot
; /* memory protection flags
*/
550 unsigned int attributes
; /* memory extended attributes
*/
554 enum apc_type type
; /* APC_VIRTUAL_FREE
*/
555 unsigned int op_type
; /* type of operation
*/
556 client_ptr_t addr
; /* requested address
*/
557 mem_size_t size
; /* allocation size
*/
561 enum apc_type type
; /* APC_VIRTUAL_QUERY
*/
563 client_ptr_t addr
; /* requested address
*/
567 enum apc_type type
; /* APC_VIRTUAL_PROTECT
*/
568 unsigned int prot
; /* new protection flags
*/
569 client_ptr_t addr
; /* requested address
*/
570 mem_size_t size
; /* requested size
*/
574 enum apc_type type
; /* APC_VIRTUAL_FLUSH
*/
576 client_ptr_t addr
; /* requested address
*/
577 mem_size_t size
; /* requested size
*/
581 enum apc_type type
; /* APC_VIRTUAL_LOCK
*/
583 client_ptr_t addr
; /* requested address
*/
584 mem_size_t size
; /* requested size
*/
588 enum apc_type type
; /* APC_VIRTUAL_UNLOCK
*/
590 client_ptr_t addr
; /* requested address
*/
591 mem_size_t size
; /* requested size
*/
595 enum apc_type type
; /* APC_MAP_VIEW
*/
596 obj_handle_t handle
; /* mapping handle
*/
597 client_ptr_t addr
; /* requested address
*/
598 mem_size_t size
; /* allocation size
*/
599 file_pos_t offset
; /* file offset
*/
600 mem_size_t zero_bits
; /* number of zero high bits
*/
601 unsigned int alloc_type
; /* allocation type
*/
602 unsigned int prot
; /* memory protection flags
*/
606 enum apc_type type
; /* APC_MAP_VIEW_EX
*/
607 obj_handle_t handle
; /* mapping handle
*/
608 client_ptr_t addr
; /* requested address
*/
609 mem_size_t size
; /* allocation size
*/
610 file_pos_t offset
; /* file offset
*/
611 mem_size_t limit_low
; /* allocation address limits
*/
612 mem_size_t limit_high
;
613 unsigned int alloc_type
; /* allocation type
*/
614 unsigned int prot
; /* memory protection flags
*/
615 unsigned short machine
; /* requested machine for image mappings
*/
616 unsigned short __pad
[3];
620 enum apc_type type
; /* APC_UNMAP_VIEW
*/
621 unsigned int flags
; /* unmap flags
*/
622 client_ptr_t addr
; /* view address
*/
626 enum apc_type type
; /* APC_CREATE_THREAD
*/
627 unsigned int flags
; /* creation flags
*/
628 client_ptr_t func
; /* void (__stdcall
*func
)(void*)
; start function
*/
629 client_ptr_t arg
; /* argument for start function
*/
630 mem_size_t zero_bits
; /* number of zero high bits for thread stack
*/
631 mem_size_t reserve
; /* reserve size for thread stack
*/
632 mem_size_t commit
; /* commit size for thread stack
*/
636 enum apc_type type
; /* APC_DUP_HANDLE
*/
637 obj_handle_t src_handle
; /* src handle to duplicate
*/
638 obj_handle_t dst_process
; /* dst process handle
*/
639 unsigned int access
; /* wanted access rights
*/
640 unsigned int attributes
; /* object attributes
*/
641 unsigned int options
; /* duplicate options
*/
650 enum apc_type type
; /* APC_ASYNC_IO
*/
651 unsigned int status
; /* new status of async operation
*/
652 unsigned int total
; /* bytes transferred
*/
656 enum apc_type type
; /* APC_VIRTUAL_ALLOC
*/
657 unsigned int status
; /* status returned by call
*/
658 client_ptr_t addr
; /* resulting address
*/
659 mem_size_t size
; /* resulting size
*/
663 enum apc_type type
; /* APC_VIRTUAL_ALLOC_EX
*/
664 unsigned int status
; /* status returned by call
*/
665 client_ptr_t addr
; /* resulting address
*/
666 mem_size_t size
; /* resulting size
*/
670 enum apc_type type
; /* APC_VIRTUAL_FREE
*/
671 unsigned int status
; /* status returned by call
*/
672 client_ptr_t addr
; /* resulting address
*/
673 mem_size_t size
; /* resulting size
*/
677 enum apc_type type
; /* APC_VIRTUAL_QUERY
*/
678 unsigned int status
; /* status returned by call
*/
679 client_ptr_t base
; /* resulting base address
*/
680 client_ptr_t alloc_base
;/* resulting allocation base
*/
681 mem_size_t size
; /* resulting region size
*/
682 unsigned short state
; /* resulting region state
*/
683 unsigned short prot
; /* resulting region protection
*/
684 unsigned short alloc_prot
;/* resulting allocation protection
*/
685 unsigned short alloc_type
;/* resulting region allocation type
*/
689 enum apc_type type
; /* APC_VIRTUAL_PROTECT
*/
690 unsigned int status
; /* status returned by call
*/
691 client_ptr_t addr
; /* resulting address
*/
692 mem_size_t size
; /* resulting size
*/
693 unsigned int prot
; /* old protection flags
*/
697 enum apc_type type
; /* APC_VIRTUAL_FLUSH
*/
698 unsigned int status
; /* status returned by call
*/
699 client_ptr_t addr
; /* resulting address
*/
700 mem_size_t size
; /* resulting size
*/
704 enum apc_type type
; /* APC_VIRTUAL_LOCK
*/
705 unsigned int status
; /* status returned by call
*/
706 client_ptr_t addr
; /* resulting address
*/
707 mem_size_t size
; /* resulting size
*/
711 enum apc_type type
; /* APC_VIRTUAL_UNLOCK
*/
712 unsigned int status
; /* status returned by call
*/
713 client_ptr_t addr
; /* resulting address
*/
714 mem_size_t size
; /* resulting size
*/
718 enum apc_type type
; /* APC_MAP_VIEW
*/
719 unsigned int status
; /* status returned by call
*/
720 client_ptr_t addr
; /* resulting address
*/
721 mem_size_t size
; /* resulting size
*/
725 enum apc_type type
; /* APC_MAP_VIEW_EX
*/
726 unsigned int status
; /* status returned by call
*/
727 client_ptr_t addr
; /* resulting address
*/
728 mem_size_t size
; /* resulting size
*/
732 enum apc_type type
; /* APC_UNMAP_VIEW
*/
733 unsigned int status
; /* status returned by call
*/
737 enum apc_type type
; /* APC_CREATE_THREAD
*/
738 unsigned int status
; /* status returned by call
*/
739 process_id_t pid
; /* process id
*/
740 thread_id_t tid
; /* thread id
*/
741 client_ptr_t teb
; /* thread
teb (in process address space
) */
742 obj_handle_t handle
; /* handle to new thread
*/
746 enum apc_type type
; /* APC_DUP_HANDLE
*/
747 unsigned int status
; /* status returned by call
*/
748 obj_handle_t handle
; /* duplicated handle in dst process
*/
752 enum apc_type type
; /* APC_BREAK_PROCESS
*/
753 unsigned int status
; /* status returned by call
*/
773 enum irp_type type
; /* irp call type
*/
776 enum irp_type type
; /* IRP_CALL_CREATE
*/
777 unsigned int access
; /* access rights
*/
778 unsigned int sharing
; /* sharing flags
*/
779 unsigned int options
; /* file options
*/
780 client_ptr_t device
; /* opaque ptr for the device
*/
781 obj_handle_t file
; /* file handle
*/
785 enum irp_type type
; /* IRP_CALL_CLOSE
*/
787 client_ptr_t file
; /* opaque ptr for the file object
*/
791 enum irp_type type
; /* IRP_CALL_READ
*/
792 unsigned int key
; /* driver key
*/
793 data_size_t out_size
; /* needed output size
*/
795 client_ptr_t file
; /* opaque ptr for the file object
*/
796 file_pos_t pos
; /* file position
*/
800 enum irp_type type
; /* IRP_CALL_WRITE
*/
801 unsigned int key
; /* driver key
*/
802 client_ptr_t file
; /* opaque ptr for the file object
*/
803 file_pos_t pos
; /* file position
*/
807 enum irp_type type
; /* IRP_CALL_FLUSH
*/
809 client_ptr_t file
; /* opaque ptr for the file object
*/
813 enum irp_type type
; /* IRP_CALL_IOCTL
*/
814 ioctl_code_t code
; /* ioctl code
*/
815 data_size_t out_size
; /* needed output size
*/
817 client_ptr_t file
; /* opaque ptr for the file object
*/
821 enum irp_type type
; /* IRP_CALL_VOLUME
*/
822 unsigned int info_class
;/* information class
*/
823 data_size_t out_size
; /* needed output size
*/
825 client_ptr_t file
; /* opaque ptr for the file object
*/
829 enum irp_type type
; /* IRP_CALL_FREE
*/
831 client_ptr_t obj
; /* opaque ptr for the freed object
*/
835 enum irp_type type
; /* IRP_CALL_CANCEL
*/
837 client_ptr_t irp
; /* opaque ptr for canceled irp
*/
841 /* information about a PE image mapping
, roughly equivalent to SECTION_IMAGE_INFORMATION
*/
845 mem_size_t stack_size
;
846 mem_size_t stack_commit
;
847 unsigned int entry_point
;
848 unsigned int map_size
;
849 unsigned int zerobits
;
850 unsigned int subsystem
;
851 unsigned short subsystem_minor
;
852 unsigned short subsystem_major
;
853 unsigned short osversion_major
;
854 unsigned short osversion_minor
;
855 unsigned short image_charact
;
856 unsigned short dll_charact
;
857 unsigned short machine
;
858 unsigned char contains_code
: 1;
859 unsigned char wine_builtin
: 1;
860 unsigned char wine_fakedll
: 1;
861 unsigned char image_flags
;
862 unsigned int loader_flags
;
863 unsigned int header_size
;
864 unsigned int file_size
;
865 unsigned int checksum
;
866 unsigned int dbg_offset
;
867 unsigned int dbg_size
;
869 #define IMAGE_FLAGS_ComPlusNativeReady
0x01
870 #define IMAGE_FLAGS_ComPlusILOnly
0x02
871 #define IMAGE_FLAGS_ImageDynamicallyRelocated
0x04
872 #define IMAGE_FLAGS_ImageMappedFlat
0x08
873 #define IMAGE_FLAGS_BaseBelow4gb
0x10
874 #define IMAGE_FLAGS_ComPlusPrefer32bit
0x20
876 struct rawinput_device
878 unsigned short usage_page
;
879 unsigned short usage
;
881 user_handle_t target
;
893 /****************************************************************/
894 /* Request declarations
*/
896 /* Create a new process from the context of the parent
*/
898 obj_handle_t token
; /* process token
*/
899 obj_handle_t debug
; /* process debug object
*/
900 obj_handle_t parent_process
; /* parent process
*/
901 unsigned int flags
; /* process creation flags
*/
902 int socket_fd
; /* file descriptor for process socket
*/
903 unsigned int access
; /* access rights for process object
*/
904 unsigned short machine
; /* architecture that the new process will use
*/
905 data_size_t info_size
; /* size of startup info
*/
906 data_size_t handles_size
; /* length of explicit handles list
*/
907 data_size_t jobs_size
; /* length of jobs list
*/
908 VARARG(objattr
,object_attributes
); /* object attributes
*/
909 VARARG(handles
,uints
,handles_size
); /* handles list
*/
910 VARARG(jobs
,uints
,jobs_size
); /* jobs list
*/
911 VARARG(info
,startup_info
,info_size
); /* startup information
*/
912 VARARG(env
,unicode_str
); /* environment for new process
*/
914 obj_handle_t info
; /* new process info handle
*/
915 process_id_t pid
; /* process id
*/
916 obj_handle_t handle
; /* process
handle (in the current process
) */
920 /* Retrieve information about a newly started process
*/
921 @
REQ(get_new_process_info
)
922 obj_handle_t info
; /* info handle returned from new_process_request
*/
924 int success
; /* did the process start successfully?
*/
925 int exit_code
; /* process exit code if failed
*/
929 /* Create a new thread
*/
931 obj_handle_t process
; /* process in which to create thread
*/
932 unsigned int access
; /* wanted access rights
*/
933 unsigned int flags
; /* thread creation flags
*/
934 int request_fd
; /* fd for request pipe
*/
935 VARARG(objattr
,object_attributes
); /* object attributes
*/
937 thread_id_t tid
; /* thread id
*/
938 obj_handle_t handle
; /* thread
handle (in the current process
) */
942 /* Retrieve the new process startup info
*/
943 @
REQ(get_startup_info
)
945 data_size_t info_size
; /* size of startup info
*/
946 unsigned short machine
; /* architecture for the new process
*/
947 VARARG(info
,startup_info
,info_size
); /* startup information
*/
948 VARARG(env
,unicode_str
); /* environment
*/
952 /* Signal the end of the process initialization
*/
953 @
REQ(init_process_done
)
954 client_ptr_t teb
; /* TEB of new
thread (in process address space
) */
955 client_ptr_t peb
; /* PEB of new
process (in process address space
) */
956 client_ptr_t ldt_copy
; /* address of LDT
copy (in process address space
) */
958 client_ptr_t entry
; /* process entry point
*/
959 int suspend
; /* is process suspended?
*/
963 /* Initialize the first thread of a new process
*/
964 @
REQ(init_first_thread
)
965 int unix_pid
; /* Unix pid of new process
*/
966 int unix_tid
; /* Unix tid of new thread
*/
967 int debug_level
; /* new debug level
*/
968 int reply_fd
; /* fd for reply pipe
*/
969 int wait_fd
; /* fd for blocking calls pipe
*/
971 process_id_t pid
; /* process id of the new thread
's process */
972 thread_id_t tid; /* thread id of the new thread */
973 timeout_t server_start; /* server start time */
974 unsigned int session_id; /* process session id */
975 data_size_t info_size; /* total size of startup info */
976 VARARG(machines,ushorts); /* array of supported machines */
980 /* Initialize a new thread; called from the child after pthread_create() */
982 int unix_tid; /* Unix tid of new thread */
983 int reply_fd; /* fd for reply pipe */
984 int wait_fd; /* fd for blocking calls pipe */
985 client_ptr_t teb; /* TEB of new thread (in thread address space) */
986 client_ptr_t entry; /* entry point (in thread address space) */
988 int suspend; /* is thread suspended? */
992 /* Terminate a process */
993 @REQ(terminate_process)
994 obj_handle_t handle; /* process handle to terminate */
995 int exit_code; /* process exit code */
997 int self; /* suicide? */
1001 /* Terminate a thread */
1002 @REQ(terminate_thread)
1003 obj_handle_t handle; /* thread handle to terminate */
1004 int exit_code; /* thread exit code */
1006 int self; /* suicide? */
1010 /* Retrieve information about a process */
1011 @REQ(get_process_info)
1012 obj_handle_t handle; /* process handle */
1014 process_id_t pid; /* server process id */
1015 process_id_t ppid; /* server process id of parent */
1016 affinity_t affinity; /* process affinity mask */
1017 client_ptr_t peb; /* PEB address in process address space */
1018 timeout_t start_time; /* process start time */
1019 timeout_t end_time; /* process end time */
1020 unsigned int session_id; /* process session id */
1021 int exit_code; /* process exit code */
1022 int priority; /* priority class */
1023 unsigned short machine; /* process architecture */
1024 VARARG(image,pe_image_info); /* image info for main exe */
1028 /* Retrieve debug information about a process */
1029 @REQ(get_process_debug_info)
1030 obj_handle_t handle; /* process handle */
1032 obj_handle_t debug; /* handle to debug port */
1033 int debug_children; /* inherit debugger to child processes */
1034 VARARG(image,pe_image_info); /* image info for main exe */
1038 /* Fetch the name of the process image */
1039 @REQ(get_process_image_name)
1040 obj_handle_t handle; /* process handle */
1041 int win32; /* return a win32 filename? */
1043 data_size_t len; /* len in bytes required to store filename */
1044 VARARG(name,unicode_str); /* image name for main exe */
1048 /* Retrieve information about a process memory usage */
1049 @REQ(get_process_vm_counters)
1050 obj_handle_t handle; /* process handle */
1052 mem_size_t peak_virtual_size; /* peak virtual memory in bytes */
1053 mem_size_t virtual_size; /* virtual memory in bytes */
1054 mem_size_t peak_working_set_size; /* peak real memory in bytes */
1055 mem_size_t working_set_size; /* real memory in bytes */
1056 mem_size_t pagefile_usage; /* commit charge in bytes */
1057 mem_size_t peak_pagefile_usage; /* peak commit charge in bytes */
1061 /* Set a process information */
1062 @REQ(set_process_info)
1063 obj_handle_t handle; /* process handle */
1064 int mask; /* setting mask (see below) */
1065 int priority; /* priority class */
1066 affinity_t affinity; /* affinity mask */
1068 #define SET_PROCESS_INFO_PRIORITY 0x01
1069 #define SET_PROCESS_INFO_AFFINITY 0x02
1072 /* Retrieve information about a thread */
1073 @REQ(get_thread_info)
1074 obj_handle_t handle; /* thread handle */
1075 unsigned int access; /* required access rights */
1077 process_id_t pid; /* server process id */
1078 thread_id_t tid; /* server thread id */
1079 client_ptr_t teb; /* thread teb pointer */
1080 client_ptr_t entry_point; /* thread entry point */
1081 affinity_t affinity; /* thread affinity mask */
1082 int exit_code; /* thread exit code */
1083 int priority; /* thread priority level */
1084 int last; /* last thread in process */
1085 int suspend_count; /* thread suspend count */
1086 int dbg_hidden; /* thread hidden from debugger */
1087 data_size_t desc_len; /* description length in bytes */
1088 VARARG(desc,unicode_str); /* description string */
1092 /* Retrieve information about thread times */
1093 @REQ(get_thread_times)
1094 obj_handle_t handle; /* thread handle */
1096 timeout_t creation_time; /* thread creation time */
1097 timeout_t exit_time; /* thread exit time */
1098 int unix_pid; /* thread native pid */
1099 int unix_tid; /* thread native pid */
1103 /* Set a thread information */
1104 @REQ(set_thread_info)
1105 obj_handle_t handle; /* thread handle */
1106 int mask; /* setting mask (see below) */
1107 int priority; /* priority class */
1108 affinity_t affinity; /* affinity mask */
1109 client_ptr_t entry_point; /* thread entry point */
1110 obj_handle_t token; /* impersonation token */
1111 VARARG(desc,unicode_str); /* description string */
1113 #define SET_THREAD_INFO_PRIORITY 0x01
1114 #define SET_THREAD_INFO_AFFINITY 0x02
1115 #define SET_THREAD_INFO_TOKEN 0x04
1116 #define SET_THREAD_INFO_ENTRYPOINT 0x08
1117 #define SET_THREAD_INFO_DESCRIPTION 0x10
1118 #define SET_THREAD_INFO_DBG_HIDDEN 0x20
1121 /* Suspend a thread */
1122 @REQ(suspend_thread)
1123 obj_handle_t handle; /* thread handle */
1125 int count; /* new suspend count */
1129 /* Resume a thread */
1131 obj_handle_t handle; /* thread handle */
1133 int count; /* new suspend count */
1137 /* Queue an APC for a thread or process */
1139 obj_handle_t handle; /* thread or process handle */
1140 VARARG(call,apc_call); /* call arguments */
1142 obj_handle_t handle; /* APC handle */
1143 int self; /* run APC in caller itself? */
1147 /* Get the result of an APC call */
1148 @REQ(get_apc_result)
1149 obj_handle_t handle; /* handle to the APC */
1151 apc_result_t result; /* result of the APC */
1155 /* Close a handle for the current process */
1157 obj_handle_t handle; /* handle to close */
1161 /* Set a handle information */
1162 @REQ(set_handle_info)
1163 obj_handle_t handle; /* handle we are interested in */
1164 int flags; /* new handle flags */
1165 int mask; /* mask for flags to set */
1167 int old_flags; /* old flag value */
1171 /* Duplicate a handle */
1173 obj_handle_t src_process; /* src process handle */
1174 obj_handle_t src_handle; /* src handle to duplicate */
1175 obj_handle_t dst_process; /* dst process handle */
1176 unsigned int access; /* wanted access rights */
1177 unsigned int attributes; /* object attributes */
1178 unsigned int options; /* duplicate options */
1180 obj_handle_t handle; /* duplicated handle in dst process */
1184 /* Test if two handles refer to the same object */
1185 @REQ(compare_objects)
1186 obj_handle_t first; /* first object handle */
1187 obj_handle_t second; /* second object handle */
1191 /* Make an object temporary */
1192 @REQ(make_temporary)
1193 obj_handle_t handle; /* handle to the object */
1197 /* Open a handle to a process */
1199 process_id_t pid; /* process id to open */
1200 unsigned int access; /* wanted access rights */
1201 unsigned int attributes; /* object attributes */
1203 obj_handle_t handle; /* handle to the process */
1207 /* Open a handle to a thread */
1209 thread_id_t tid; /* thread id to open */
1210 unsigned int access; /* wanted access rights */
1211 unsigned int attributes; /* object attributes */
1213 obj_handle_t handle; /* handle to the thread */
1217 /* Wait for handles */
1219 int flags; /* wait flags (see below) */
1220 client_ptr_t cookie; /* magic cookie to return to client */
1221 abstime_t timeout; /* timeout */
1222 data_size_t size; /* size of select_op */
1223 obj_handle_t prev_apc; /* handle to previous APC */
1224 VARARG(result,apc_result); /* result of previous APC */
1225 VARARG(data,select_op,size); /* operation-specific data */
1226 VARARG(contexts,contexts); /* suspend context(s) */
1228 obj_handle_t apc_handle; /* handle to next APC */
1229 int signaled; /* were the handles immediately signaled? */
1230 VARARG(call,apc_call); /* APC call arguments */
1231 VARARG(contexts,contexts); /* suspend context(s) */
1233 #define SELECT_ALERTABLE 1
1234 #define SELECT_INTERRUPTIBLE 2
1237 /* Create an event */
1239 unsigned int access; /* wanted access rights */
1240 int manual_reset; /* manual reset event */
1241 int initial_state; /* initial state of the event */
1242 VARARG(objattr,object_attributes); /* object attributes */
1244 obj_handle_t handle; /* handle to the event */
1247 /* Event operation */
1249 obj_handle_t handle; /* handle to event */
1250 int op; /* event operation (see below) */
1252 int state; /* previous state */
1254 enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT };
1257 obj_handle_t handle; /* handle to event */
1259 int manual_reset; /* manual reset event */
1260 int state; /* current state of the event */
1265 unsigned int access; /* wanted access rights */
1266 unsigned int attributes; /* object attributes */
1267 obj_handle_t rootdir; /* root directory */
1268 VARARG(name,unicode_str); /* object name */
1270 obj_handle_t handle; /* handle to the event */
1274 /* Create a keyed event */
1275 @REQ(create_keyed_event)
1276 unsigned int access; /* wanted access rights */
1277 VARARG(objattr,object_attributes); /* object attributes */
1279 obj_handle_t handle; /* handle to the event */
1282 /* Open a keyed event */
1283 @REQ(open_keyed_event)
1284 unsigned int access; /* wanted access rights */
1285 unsigned int attributes; /* object attributes */
1286 obj_handle_t rootdir; /* root directory */
1287 VARARG(name,unicode_str); /* object name */
1289 obj_handle_t handle; /* handle to the event */
1293 /* Create a mutex */
1295 unsigned int access; /* wanted access rights */
1296 int owned; /* initially owned? */
1297 VARARG(objattr,object_attributes); /* object attributes */
1299 obj_handle_t handle; /* handle to the mutex */
1303 /* Release a mutex */
1305 obj_handle_t handle; /* handle to the mutex */
1307 unsigned int prev_count; /* value of internal counter, before release */
1313 unsigned int access; /* wanted access rights */
1314 unsigned int attributes; /* object attributes */
1315 obj_handle_t rootdir; /* root directory */
1316 VARARG(name,unicode_str); /* object name */
1318 obj_handle_t handle; /* handle to the mutex */
1324 obj_handle_t handle; /* handle to mutex */
1326 unsigned int count; /* current count of mutex */
1327 int owned; /* true if owned by current thread */
1328 int abandoned; /* true if abandoned */
1332 /* Create a semaphore */
1333 @REQ(create_semaphore)
1334 unsigned int access; /* wanted access rights */
1335 unsigned int initial; /* initial count */
1336 unsigned int max; /* maximum count */
1337 VARARG(objattr,object_attributes); /* object attributes */
1339 obj_handle_t handle; /* handle to the semaphore */
1343 /* Release a semaphore */
1344 @REQ(release_semaphore)
1345 obj_handle_t handle; /* handle to the semaphore */
1346 unsigned int count; /* count to add to semaphore */
1348 unsigned int prev_count; /* previous semaphore count */
1351 @REQ(query_semaphore)
1352 obj_handle_t handle; /* handle to the semaphore */
1354 unsigned int current; /* current count */
1355 unsigned int max; /* maximum count */
1358 /* Open a semaphore */
1359 @REQ(open_semaphore)
1360 unsigned int access; /* wanted access rights */
1361 unsigned int attributes; /* object attributes */
1362 obj_handle_t rootdir; /* root directory */
1363 VARARG(name,unicode_str); /* object name */
1365 obj_handle_t handle; /* handle to the semaphore */
1371 unsigned int access; /* wanted access rights */
1372 unsigned int sharing; /* sharing flags */
1373 int create; /* file create action */
1374 unsigned int options; /* file options */
1375 unsigned int attrs; /* file attributes for creation */
1376 VARARG(objattr,object_attributes); /* object attributes */
1377 VARARG(filename,string); /* file name */
1379 obj_handle_t handle; /* handle to the file */
1383 /* Open a file object */
1384 @REQ(open_file_object)
1385 unsigned int access; /* wanted access rights */
1386 unsigned int attributes; /* open attributes */
1387 obj_handle_t rootdir; /* root directory */
1388 unsigned int sharing; /* sharing flags */
1389 unsigned int options; /* file options */
1390 VARARG(filename,unicode_str); /* file name */
1392 obj_handle_t handle; /* handle to the file */
1396 /* Allocate a file handle for a Unix fd */
1397 @REQ(alloc_file_handle)
1398 unsigned int access; /* wanted access rights */
1399 unsigned int attributes; /* object attributes */
1400 int fd; /* file descriptor on the client side */
1402 obj_handle_t handle; /* handle to the file */
1406 /* Get the Unix name from a file handle */
1407 @REQ(get_handle_unix_name)
1408 obj_handle_t handle; /* file handle */
1410 data_size_t name_len; /* unix name length */
1411 VARARG(name,string); /* unix name */
1415 /* Get a Unix fd to access a file */
1417 obj_handle_t handle; /* handle to the file */
1419 int type; /* file type (see below) */
1420 int cacheable; /* can fd be cached in the client? */
1421 unsigned int access; /* file access rights */
1422 unsigned int options; /* file open options */
1426 FD_TYPE_INVALID, /* invalid file (no associated fd) */
1427 FD_TYPE_FILE, /* regular file */
1428 FD_TYPE_DIR, /* directory */
1429 FD_TYPE_SOCKET, /* socket */
1430 FD_TYPE_SERIAL, /* serial port */
1431 FD_TYPE_PIPE, /* named pipe */
1432 FD_TYPE_MAILSLOT, /* mailslot */
1433 FD_TYPE_CHAR, /* unspecified char device */
1434 FD_TYPE_DEVICE, /* Windows device file */
1439 /* Retrieve (or allocate) the client-side directory cache entry */
1440 @REQ(get_directory_cache_entry)
1441 obj_handle_t handle; /* handle to the directory */
1443 int entry; /* cache entry on the client side */
1444 VARARG(free,ints); /* entries that can be freed */
1448 /* Flush a file buffers */
1450 async_data_t async; /* async I/O parameters */
1452 obj_handle_t event; /* event set when finished */
1455 /* Query file information */
1457 obj_handle_t handle; /* handle to the file */
1458 unsigned int info_class; /* queried information class */
1460 VARARG(data,bytes); /* file info data */
1463 /* Query volume information */
1464 @REQ(get_volume_info)
1465 obj_handle_t handle; /* handle to the file */
1466 async_data_t async; /* async I/O parameters */
1467 unsigned int info_class; /* queried information class */
1469 obj_handle_t wait; /* handle to wait on for blocking read */
1470 VARARG(data,bytes); /* volume info data */
1473 /* Lock a region of a file */
1475 obj_handle_t handle; /* handle to the file */
1476 file_pos_t offset; /* offset of start of lock */
1477 file_pos_t count; /* count of bytes to lock */
1478 int shared; /* shared or exclusive lock? */
1479 int wait; /* do we want to wait? */
1481 obj_handle_t handle; /* handle to wait on */
1482 int overlapped; /* is it an overlapped I/O handle? */
1486 /* Unlock a region of a file */
1488 obj_handle_t handle; /* handle to the file */
1489 file_pos_t offset; /* offset of start of unlock */
1490 file_pos_t count; /* count of bytes to unlock */
1494 /* Perform a recv on a socket */
1496 int oob; /* are we receiving OOB data? */
1497 async_data_t async; /* async I/O parameters */
1498 int force_async; /* Force asynchronous mode? */
1500 obj_handle_t wait; /* handle to wait on for blocking recv */
1501 unsigned int options; /* device open options */
1502 int nonblocking; /* is socket non-blocking? */
1506 /* Perform a send on a socket */
1508 async_data_t async; /* async I/O parameters */
1509 int force_async; /* Force asynchronous mode? */
1511 obj_handle_t wait; /* handle to wait on for blocking send */
1512 unsigned int options; /* device open options */
1513 int nonblocking; /* is socket non-blocking? */
1517 /* Store ICMP id for ICMP over datagram fixup */
1518 @REQ(socket_send_icmp_id)
1519 obj_handle_t handle; /* socket handle */
1520 unsigned short icmp_id; /* ICMP packet id */
1521 unsigned short icmp_seq; /* ICMP packed sequence */
1526 /* Get ICMP id for ICMP over datagram fixup */
1527 @REQ(socket_get_icmp_id)
1528 obj_handle_t handle; /* socket handle */
1529 unsigned short icmp_seq; /* ICMP packed sequence */
1531 unsigned short icmp_id; /* ICMP packet id */
1535 /* Retrieve the next pending console ioctl request */
1536 @REQ(get_next_console_request)
1537 obj_handle_t handle; /* console server handle */
1538 int signal; /* server signal state */
1539 int read; /* 1 if reporting result of blocked read ioctl */
1540 unsigned int status; /* status of previous ioctl */
1541 VARARG(out_data,bytes); /* out_data of previous ioctl */
1543 unsigned int code; /* ioctl code */
1544 unsigned int output; /* output id or 0 for input */
1545 data_size_t out_size; /* ioctl output size */
1546 VARARG(in_data,bytes); /* ioctl in_data */
1550 /* enable directory change notifications */
1551 @REQ(read_directory_changes)
1552 unsigned int filter; /* notification filter */
1553 int subtree; /* watch the subtree? */
1554 int want_data; /* flag indicating whether change data should be collected */
1555 async_data_t async; /* async I/O parameters */
1560 obj_handle_t handle;
1562 VARARG(events,filesystem_event); /* collected filesystem events */
1566 /* Create a file mapping */
1567 @REQ(create_mapping)
1568 unsigned int access; /* wanted access rights */
1569 unsigned int flags; /* SEC_* flags */
1570 unsigned int file_access; /* file access rights */
1571 mem_size_t size; /* mapping size */
1572 obj_handle_t file_handle; /* file handle */
1573 VARARG(objattr,object_attributes); /* object attributes */
1575 obj_handle_t handle; /* handle to the mapping */
1579 /* Open a mapping */
1581 unsigned int access; /* wanted access rights */
1582 unsigned int attributes; /* object attributes */
1583 obj_handle_t rootdir; /* root directory */
1584 VARARG(name,unicode_str); /* object name */
1586 obj_handle_t handle; /* handle to the mapping */
1590 /* Get information about a file mapping */
1591 @REQ(get_mapping_info)
1592 obj_handle_t handle; /* handle to the mapping */
1593 unsigned int access; /* wanted access rights */
1595 mem_size_t size; /* mapping size */
1596 unsigned int flags; /* SEC_* flags */
1597 obj_handle_t shared_file; /* shared mapping file handle */
1598 data_size_t total; /* total required buffer size in bytes */
1599 VARARG(image,pe_image_info);/* image info for SEC_IMAGE mappings */
1600 VARARG(name,unicode_str); /* filename for SEC_IMAGE mappings */
1604 /* Add a memory view in the current process */
1606 obj_handle_t mapping; /* file mapping handle */
1607 unsigned int access; /* wanted access rights */
1608 client_ptr_t base; /* view base address (page-aligned) */
1609 mem_size_t size; /* view size */
1610 file_pos_t start; /* start offset in mapping */
1614 /* Add a memory view for an image mapping in the current process */
1615 @REQ(map_image_view)
1616 obj_handle_t mapping; /* file mapping handle */
1617 client_ptr_t base; /* view base address (page-aligned) */
1618 mem_size_t size; /* view size */
1619 unsigned int entry; /* entry point in mapped view */
1620 unsigned short machine; /* machine in the mapped view */
1624 /* Add a memory view for a builtin dll in the current process */
1625 @REQ(map_builtin_view)
1626 VARARG(image,pe_image_info);/* image info */
1627 VARARG(name,unicode_str); /* image filename */
1631 /* Get information about a mapped image view */
1632 @REQ(get_image_view_info)
1633 obj_handle_t process; /* process handle */
1634 client_ptr_t addr; /* address inside mapped view (in process address space) */
1636 client_ptr_t base; /* view base address */
1637 mem_size_t size; /* view size */
1641 /* Unmap a memory view from the current process */
1643 client_ptr_t base; /* view base address */
1647 /* Get a range of committed pages in a file mapping */
1648 @REQ(get_mapping_committed_range)
1649 client_ptr_t base; /* view base address */
1650 file_pos_t offset; /* starting offset (page-aligned, in bytes) */
1652 mem_size_t size; /* size of range starting at offset (page-aligned, in bytes) */
1653 int committed; /* whether it is a committed range */
1657 /* Add a range to the committed pages in a file mapping */
1658 @REQ(add_mapping_committed_range)
1659 client_ptr_t base; /* view base address */
1660 file_pos_t offset; /* starting offset (page-aligned, in bytes) */
1661 mem_size_t size; /* size to set (page-aligned, in bytes) or 0 if only retrieving */
1665 /* Check if two memory maps are for the same file */
1666 @REQ(is_same_mapping)
1667 client_ptr_t base1; /* first view base address */
1668 client_ptr_t base2; /* second view base address */
1672 /* Get the filename of a mapping */
1673 @REQ(get_mapping_filename)
1674 obj_handle_t process; /* process handle */
1675 client_ptr_t addr; /* address inside mapped view (in process address space) */
1677 data_size_t len; /* total filename length in bytes */
1678 VARARG(filename,unicode_str); /* filename in NT format */
1684 timeout_t start_time;
1687 int current_priority;
1690 client_ptr_t entry_point;
1695 timeout_t start_time;
1696 data_size_t name_len;
1700 process_id_t parent_pid;
1701 unsigned int session_id;
1704 /* VARARG(name,unicode_str,name_len); */
1705 /* VARARG(threads,struct thread_info,thread_count); */
1708 /* Get a list of processes and threads currently running */
1709 @REQ(list_processes)
1711 data_size_t info_size;
1713 int total_thread_count;
1714 data_size_t total_name_len;
1715 VARARG(data,process_info,info_size);
1719 /* Create a debug object */
1720 @REQ(create_debug_obj)
1721 unsigned int access; /* wanted access rights */
1722 unsigned int flags; /* object flags */
1723 VARARG(objattr,object_attributes); /* object attributes */
1725 obj_handle_t handle; /* handle to the debug object */
1729 /* Wait for a debug event */
1730 @REQ(wait_debug_event)
1731 obj_handle_t debug; /* debug object */
1733 process_id_t pid; /* process id */
1734 thread_id_t tid; /* thread id */
1735 VARARG(event,debug_event); /* debug event data */
1739 /* Queue an exception event */
1740 @REQ(queue_exception_event)
1741 int first; /* first chance exception? */
1742 unsigned int code; /* exception code */
1743 unsigned int flags; /* exception flags */
1744 client_ptr_t record; /* exception record */
1745 client_ptr_t address; /* exception address */
1746 data_size_t len; /* size of parameters */
1747 VARARG(params,uints64,len);/* exception parameters */
1749 obj_handle_t handle; /* handle to the queued event */
1753 /* Retrieve the status of an exception event */
1754 @REQ(get_exception_status)
1755 obj_handle_t handle; /* handle to the queued event */
1759 /* Continue a debug event */
1760 @REQ(continue_debug_event)
1761 obj_handle_t debug; /* debug object */
1762 process_id_t pid; /* process id to continue */
1763 thread_id_t tid; /* thread id to continue */
1764 unsigned int status; /* continuation status */
1768 /* Start or stop debugging an existing process */
1770 obj_handle_t handle; /* process handle */
1771 obj_handle_t debug; /* debug object to attach to the process */
1772 int attach; /* 1=attaching / 0=detaching from the process */
1776 /* Set debug object information */
1777 @REQ(set_debug_obj_info)
1778 obj_handle_t debug; /* debug object */
1779 unsigned int flags; /* object flags */
1783 /* Read data from a process address space */
1784 @REQ(read_process_memory)
1785 obj_handle_t handle; /* process handle */
1786 client_ptr_t addr; /* addr to read from */
1788 VARARG(data,bytes); /* result data */
1792 /* Write data to a process address space */
1793 @REQ(write_process_memory)
1794 obj_handle_t handle; /* process handle */
1795 client_ptr_t addr; /* addr to write to */
1796 VARARG(data,bytes); /* data to write */
1800 /* Create a registry key */
1802 unsigned int access; /* desired access rights */
1803 unsigned int options; /* creation options */
1804 VARARG(objattr,object_attributes); /* object attributes */
1805 VARARG(class,unicode_str); /* class name */
1807 obj_handle_t hkey; /* handle to the created key */
1810 /* Open a registry key */
1812 obj_handle_t parent; /* handle to the parent key */
1813 unsigned int access; /* desired access rights */
1814 unsigned int attributes; /* object attributes */
1815 VARARG(name,unicode_str); /* key name */
1817 obj_handle_t hkey; /* handle to the open key */
1821 /* Delete a registry key */
1823 obj_handle_t hkey; /* handle to the key */
1827 /* Flush a registry key */
1829 obj_handle_t hkey; /* handle to the key */
1833 /* Enumerate registry subkeys */
1835 obj_handle_t hkey; /* handle to registry key */
1836 int index; /* index of subkey (or -1 for current key) */
1837 int info_class; /* requested information class */
1839 int subkeys; /* number of subkeys */
1840 int max_subkey; /* longest subkey name */
1841 int max_class; /* longest class name */
1842 int values; /* number of values */
1843 int max_value; /* longest value name */
1844 int max_data; /* longest value data */
1845 timeout_t modif; /* last modification time */
1846 data_size_t total; /* total length needed for full name and class */
1847 data_size_t namelen; /* length of key name in bytes */
1848 VARARG(name,unicode_str,namelen); /* key name */
1849 VARARG(class,unicode_str); /* class name */
1853 /* Set a value of a registry key */
1855 obj_handle_t hkey; /* handle to registry key */
1856 int type; /* value type */
1857 data_size_t namelen; /* length of value name in bytes */
1858 VARARG(name,unicode_str,namelen); /* value name */
1859 VARARG(data,bytes); /* value data */
1863 /* Retrieve the value of a registry key */
1865 obj_handle_t hkey; /* handle to registry key */
1866 VARARG(name,unicode_str); /* value name */
1868 int type; /* value type */
1869 data_size_t total; /* total length needed for data */
1870 VARARG(data,bytes); /* value data */
1874 /* Enumerate a value of a registry key */
1875 @REQ(enum_key_value)
1876 obj_handle_t hkey; /* handle to registry key */
1877 int index; /* value index */
1878 int info_class; /* requested information class */
1880 int type; /* value type */
1881 data_size_t total; /* total length needed for full name and data */
1882 data_size_t namelen; /* length of value name in bytes */
1883 VARARG(name,unicode_str,namelen); /* value name */
1884 VARARG(data,bytes); /* value data */
1888 /* Delete a value of a registry key */
1889 @REQ(delete_key_value)
1890 obj_handle_t hkey; /* handle to registry key */
1891 VARARG(name,unicode_str); /* value name */
1895 /* Load a registry branch from a file */
1897 obj_handle_t file; /* file to load from */
1898 VARARG(objattr,object_attributes); /* object attributes */
1902 /* UnLoad a registry branch from a file */
1903 @REQ(unload_registry)
1904 obj_handle_t parent; /* handle to the parent key */
1905 unsigned int attributes; /* object attributes */
1906 VARARG(name,unicode_str); /* key name */
1910 /* Save a registry branch to a file */
1912 obj_handle_t hkey; /* key to save */
1913 obj_handle_t file; /* file to save to */
1917 /* Add a registry key change notification */
1918 @REQ(set_registry_notification)
1919 obj_handle_t hkey; /* key to watch for changes */
1920 obj_handle_t event; /* event to set */
1921 int subtree; /* should we watch the whole subtree? */
1922 unsigned int filter; /* things to watch */
1926 /* Rename a registry key */
1928 obj_handle_t hkey; /* handle to the key to be renamed */
1929 VARARG(name,unicode_str); /* new name */
1933 /* Create a waitable timer */
1935 unsigned int access; /* wanted access rights */
1936 int manual; /* manual reset */
1937 VARARG(objattr,object_attributes); /* object attributes */
1939 obj_handle_t handle; /* handle to the timer */
1943 /* Open a waitable timer */
1945 unsigned int access; /* wanted access rights */
1946 unsigned int attributes; /* object attributes */
1947 obj_handle_t rootdir; /* root directory */
1948 VARARG(name,unicode_str); /* object name */
1950 obj_handle_t handle; /* handle to the timer */
1953 /* Set a waitable timer */
1955 obj_handle_t handle; /* handle to the timer */
1956 timeout_t expire; /* next expiration absolute time */
1957 client_ptr_t callback; /* callback function */
1958 client_ptr_t arg; /* callback argument */
1959 int period; /* timer period in ms */
1961 int signaled; /* was the timer signaled before this call ? */
1964 /* Cancel a waitable timer */
1966 obj_handle_t handle; /* handle to the timer */
1968 int signaled; /* was the timer signaled before this calltime ? */
1971 /* Get information on a waitable timer */
1972 @REQ(get_timer_info)
1973 obj_handle_t handle; /* handle to the timer */
1975 timeout_t when; /* absolute time when the timer next expires */
1976 int signaled; /* is the timer signaled? */
1980 /* Retrieve the current context of a thread */
1981 @REQ(get_thread_context)
1982 obj_handle_t handle; /* thread handle */
1983 obj_handle_t context; /* context handle */
1984 unsigned int flags; /* context flags */
1985 unsigned int native_flags; /* flags for native context if WoW present */
1986 unsigned short machine; /* context architecture */
1988 int self; /* was it a handle to the current thread? */
1989 obj_handle_t handle; /* pending context handle */
1990 VARARG(contexts,contexts); /* thread context(s) */
1994 /* Set the current context of a thread */
1995 @REQ(set_thread_context)
1996 obj_handle_t handle; /* thread handle */
1997 unsigned int native_flags; /* flags for native context if WoW present */
1998 VARARG(contexts,contexts); /* thread context(s) */
2000 int self; /* was it a handle to the current thread? */
2004 /* Fetch a selector entry for a thread */
2005 @REQ(get_selector_entry)
2006 obj_handle_t handle; /* thread handle */
2007 int entry; /* LDT entry */
2009 unsigned int base; /* selector base */
2010 unsigned int limit; /* selector limit */
2011 unsigned char flags; /* selector flags */
2017 VARARG(name,unicode_str); /* atom name */
2019 atom_t atom; /* resulting atom */
2023 /* Delete an atom */
2025 atom_t atom; /* atom handle */
2031 VARARG(name,unicode_str); /* atom name */
2033 atom_t atom; /* atom handle */
2037 /* Get information about an atom */
2038 @REQ(get_atom_information)
2039 atom_t atom; /* atom handle */
2041 int count; /* atom lock count */
2042 int pinned; /* whether the atom has been pinned */
2043 data_size_t total; /* actual length of atom name */
2044 VARARG(name,unicode_str); /* atom name */
2048 /* Get the message queue of the current thread */
2051 obj_handle_t handle; /* handle to the queue */
2055 /* Set the file descriptor associated to the current thread queue */
2057 obj_handle_t handle; /* handle to the file descriptor */
2061 /* Set the current message queue wakeup mask */
2062 @REQ(set_queue_mask)
2063 unsigned int wake_mask; /* wakeup bits mask */
2064 unsigned int changed_mask; /* changed bits mask */
2065 int skip_wait; /* will we skip waiting if signaled? */
2067 unsigned int wake_bits; /* current wake bits */
2068 unsigned int changed_bits; /* current changed bits */
2072 /* Get the current message queue status */
2073 @REQ(get_queue_status)
2074 unsigned int clear_bits; /* should we clear the change bits? */
2076 unsigned int wake_bits; /* wake bits */
2077 unsigned int changed_bits; /* changed bits since last time */
2081 /* Retrieve the process idle event */
2082 @REQ(get_process_idle_event)
2083 obj_handle_t handle; /* process handle */
2085 obj_handle_t event; /* handle to idle event */
2089 /* Send a message to a thread queue */
2091 thread_id_t id; /* thread id */
2092 int type; /* message type (see below) */
2093 int flags; /* message flags (see below) */
2094 user_handle_t win; /* window handle */
2095 unsigned int msg; /* message code */
2096 lparam_t wparam; /* parameters */
2097 lparam_t lparam; /* parameters */
2098 timeout_t timeout; /* timeout for reply */
2099 VARARG(data,message_data); /* message data for sent messages */
2102 @REQ(post_quit_message)
2103 int exit_code; /* exit code to return */
2108 MSG_ASCII, /* Ascii message (from SendMessageA) */
2109 MSG_UNICODE, /* Unicode message (from SendMessageW) */
2110 MSG_NOTIFY, /* notify message (from SendNotifyMessageW), always Unicode */
2111 MSG_CALLBACK, /* callback message (from SendMessageCallbackW), always Unicode */
2112 MSG_CALLBACK_RESULT,/* result of a callback message */
2113 MSG_OTHER_PROCESS, /* sent from other process, may include vararg data, always Unicode */
2114 MSG_POSTED, /* posted message (from PostMessageW), always Unicode */
2115 MSG_HARDWARE, /* hardware message */
2116 MSG_WINEVENT, /* winevent message */
2117 MSG_HOOK_LL /* low-level hardware hook */
2119 #define SEND_MSG_ABORT_IF_HUNG 0x01
2122 /* Send a hardware message to a thread queue */
2123 @REQ(send_hardware_message)
2124 user_handle_t win; /* window handle */
2125 hw_input_t input; /* input data */
2126 unsigned int flags; /* flags (see below) */
2127 VARARG(report,bytes); /* HID report data */
2129 int wait; /* do we need to wait for a reply? */
2130 int prev_x; /* previous cursor position */
2132 int new_x; /* new cursor position */
2135 #define SEND_HWMSG_INJECTED 0x01
2138 /* Get a message from the current queue */
2140 unsigned int flags; /* PM_* flags */
2141 user_handle_t get_win; /* window handle to get */
2142 unsigned int get_first; /* first message code to get */
2143 unsigned int get_last; /* last message code to get */
2144 unsigned int hw_id; /* id of the previous hardware message (or 0) */
2145 unsigned int wake_mask; /* wakeup bits mask */
2146 unsigned int changed_mask; /* changed bits mask */
2148 user_handle_t win; /* window handle */
2149 unsigned int msg; /* message code */
2150 lparam_t wparam; /* parameters */
2151 lparam_t lparam; /* parameters */
2152 int type; /* message type */
2153 int x; /* message x position */
2154 int y; /* message y position */
2155 unsigned int time; /* message time */
2156 unsigned int active_hooks; /* active hooks bitmap */
2157 data_size_t total; /* total size of extra data */
2158 VARARG(data,message_data); /* message data for sent messages */
2162 /* Reply to a sent message */
2164 int remove; /* should we remove the message? */
2165 lparam_t result; /* message result */
2166 VARARG(data,bytes); /* message data for sent messages */
2170 /* Accept and remove the current hardware message */
2171 @REQ(accept_hardware_message)
2172 unsigned int hw_id; /* id of the hardware message */
2176 /* Retrieve the reply for the last message sent */
2177 @REQ(get_message_reply)
2178 int cancel; /* cancel message if not ready? */
2180 lparam_t result; /* message result */
2181 VARARG(data,bytes); /* message data for sent messages */
2185 /* Set a window timer */
2187 user_handle_t win; /* window handle */
2188 unsigned int msg; /* message to post */
2189 unsigned int rate; /* timer rate in ms */
2190 lparam_t id; /* timer id */
2191 lparam_t lparam; /* message lparam (callback proc) */
2193 lparam_t id; /* timer id */
2197 /* Kill a window timer */
2198 @REQ(kill_win_timer)
2199 user_handle_t win; /* window handle */
2200 lparam_t id; /* timer id */
2201 unsigned int msg; /* message to post */
2205 /* check if the thread owning the window is hung */
2206 @REQ(is_window_hung)
2207 user_handle_t win; /* window handle */
2213 /* Retrieve info about a serial port */
2214 @REQ(get_serial_info)
2215 obj_handle_t handle; /* handle to comm port */
2218 unsigned int eventmask;
2219 unsigned int cookie;
2220 unsigned int pending_write;
2224 /* Set info about a serial port */
2225 @REQ(set_serial_info)
2226 obj_handle_t handle; /* handle to comm port */
2227 int flags; /* bitmask to set values (see below) */
2229 #define SERIALINFO_PENDING_WRITE 0x04
2230 #define SERIALINFO_PENDING_WAIT 0x08
2232 /* Cancel all sync io on a thread */
2234 obj_handle_t handle; /* thread handle on which to cancel io */
2235 client_ptr_t iosb; /* I/O status block (NULL=all) */
2238 /* Create an async I/O */
2239 @REQ(register_async)
2240 int type; /* type of queue to look after */
2241 async_data_t async; /* async I/O parameters */
2242 int count; /* count - usually # of bytes to be read/written */
2244 #define ASYNC_TYPE_READ 0x01
2245 #define ASYNC_TYPE_WRITE 0x02
2246 #define ASYNC_TYPE_WAIT 0x03
2249 /* Cancel all async op on a fd */
2251 obj_handle_t handle; /* handle to comm port, socket or file */
2252 client_ptr_t iosb; /* I/O status block (NULL=all) */
2253 int only_thread; /* cancel matching this thread */
2257 /* Retrieve results of an async */
2258 @REQ(get_async_result)
2259 client_ptr_t user_arg; /* user arg used to identify async */
2261 VARARG(out_data,bytes); /* iosb output data */
2265 /* Notify direct completion of async and close the wait handle if not blocking */
2266 @REQ(set_async_direct_result)
2267 obj_handle_t handle; /* wait handle */
2268 apc_param_t information; /* IO_STATUS_BLOCK Information */
2269 unsigned int status; /* completion status */
2270 int mark_pending; /* set async to pending before completion? */
2272 obj_handle_t handle; /* wait handle, or NULL if closed */
2276 /* Perform a read on a file object */
2278 async_data_t async; /* async I/O parameters */
2279 file_pos_t pos; /* read position */
2281 obj_handle_t wait; /* handle to wait on for blocking read */
2282 unsigned int options; /* device open options */
2283 VARARG(data,bytes); /* read data */
2287 /* Perform a write on a file object */
2289 async_data_t async; /* async I/O parameters */
2290 file_pos_t pos; /* write position */
2291 VARARG(data,bytes); /* write data */
2293 obj_handle_t wait; /* handle to wait on for blocking write */
2294 unsigned int options; /* device open options */
2295 data_size_t size; /* size written */
2299 /* Perform an ioctl on a file */
2301 ioctl_code_t code; /* ioctl code */
2302 async_data_t async; /* async I/O parameters */
2303 VARARG(in_data,bytes); /* ioctl input data */
2305 obj_handle_t wait; /* handle to wait on for blocking ioctl */
2306 unsigned int options; /* device open options */
2307 VARARG(out_data,bytes); /* ioctl output data */
2311 /* Store results of an async irp */
2312 @REQ(set_irp_result)
2313 obj_handle_t handle; /* handle to the irp */
2314 unsigned int status; /* status of the irp */
2315 data_size_t size; /* result size (input or output depending on the operation) */
2316 VARARG(data,bytes); /* output data of the irp */
2320 /* Create a named pipe */
2321 @REQ(create_named_pipe)
2322 unsigned int access;
2323 unsigned int options;
2324 unsigned int sharing;
2325 unsigned int disposition;
2326 unsigned int maxinstances;
2327 unsigned int outsize;
2328 unsigned int insize;
2331 VARARG(objattr,object_attributes); /* object attributes */
2333 obj_handle_t handle; /* handle to the pipe */
2337 /* flags in create_named_pipe and get_named_pipe_info */
2338 #define NAMED_PIPE_MESSAGE_STREAM_WRITE 0x0001
2339 #define NAMED_PIPE_MESSAGE_STREAM_READ 0x0002
2340 #define NAMED_PIPE_NONBLOCKING_MODE 0x0004
2341 #define NAMED_PIPE_SERVER_END 0x8000
2343 /* Set named pipe information by handle */
2344 @REQ(set_named_pipe_info)
2345 obj_handle_t handle;
2349 /* Create a window */
2351 user_handle_t parent; /* parent window */
2352 user_handle_t owner; /* owner window */
2353 atom_t atom; /* class atom */
2354 mod_handle_t instance; /* module instance */
2355 int dpi; /* system DPI */
2356 int awareness; /* thread DPI awareness */
2357 unsigned int style; /* window style */
2358 unsigned int ex_style; /* window extended style */
2359 VARARG(class,unicode_str); /* class name */
2361 user_handle_t handle; /* created window */
2362 user_handle_t parent; /* full handle of parent */
2363 user_handle_t owner; /* full handle of owner */
2364 int extra; /* number of extra bytes */
2365 client_ptr_t class_ptr; /* pointer to class in client address space */
2366 int dpi; /* window DPI if not per-monitor aware */
2367 int awareness; /* window DPI awareness */
2371 /* Destroy a window */
2372 @REQ(destroy_window)
2373 user_handle_t handle; /* handle to the window */
2377 /* Retrieve the desktop window for the current thread */
2378 @REQ(get_desktop_window)
2379 int force; /* force creation if it doesn't exist
*/
2381 user_handle_t top_window
; /* handle to the desktop window
*/
2382 user_handle_t msg_window
; /* handle to the top
-level HWND_MESSAGE parent
*/
2386 /* Set a window owner
*/
2387 @
REQ(set_window_owner
)
2388 user_handle_t handle
; /* handle to the window
*/
2389 user_handle_t owner
; /* new owner
*/
2391 user_handle_t full_owner
; /* full handle of new owner
*/
2392 user_handle_t prev_owner
; /* full handle of previous owner
*/
2396 /* Get information from a window handle
*/
2397 @
REQ(get_window_info
)
2398 user_handle_t handle
; /* handle to the window
*/
2400 user_handle_t full_handle
; /* full
32-bit handle
*/
2401 user_handle_t last_active
; /* last active popup
*/
2402 process_id_t pid
; /* process owning the window
*/
2403 thread_id_t tid
; /* thread owning the window
*/
2404 atom_t atom
; /* class atom
*/
2405 int is_unicode
; /* ANSI or unicode
*/
2406 int dpi
; /* window DPI
*/
2407 int awareness
; /* DPI awareness
*/
2411 /* Set some information in a window
*/
2412 @
REQ(set_window_info
)
2413 unsigned short flags
; /* flags for fields to
set (see below
) */
2414 short int is_unicode
; /* ANSI or unicode
*/
2415 user_handle_t handle
; /* handle to the window
*/
2416 unsigned int style
; /* window style
*/
2417 unsigned int ex_style
; /* window extended style
*/
2418 data_size_t extra_size
; /* size to set in extra bytes
*/
2419 mod_handle_t instance
; /* creator instance
*/
2420 lparam_t user_data
; /* user
-specific data
*/
2421 lparam_t extra_value
; /* value to set in extra bytes or window id
*/
2422 int extra_offset
; /* offset to set in extra bytes
*/
2424 unsigned int old_style
; /* old window style
*/
2425 unsigned int old_ex_style
; /* old window extended style
*/
2426 mod_handle_t old_instance
; /* old creator instance
*/
2427 lparam_t old_user_data
; /* old user
-specific data
*/
2428 lparam_t old_extra_value
; /* old value in extra bytes
*/
2429 lparam_t old_id
; /* old window id
*/
2431 #define SET_WIN_STYLE
0x01
2432 #define SET_WIN_EXSTYLE
0x02
2433 #define SET_WIN_ID
0x04
2434 #define SET_WIN_INSTANCE
0x08
2435 #define SET_WIN_USERDATA
0x10
2436 #define SET_WIN_EXTRA
0x20
2437 #define SET_WIN_UNICODE
0x40
2440 /* Set the parent of a window
*/
2442 user_handle_t handle
; /* handle to the window
*/
2443 user_handle_t parent
; /* handle to the parent
*/
2445 user_handle_t old_parent
; /* old parent window
*/
2446 user_handle_t full_parent
; /* full handle of new parent
*/
2447 int dpi
; /* new window DPI if not per
-monitor aware
*/
2448 int awareness
; /* new DPI awareness
*/
2452 /* Get a list of the window parents
, up to the root of the tree
*/
2453 @
REQ(get_window_parents
)
2454 user_handle_t handle
; /* handle to the window
*/
2456 int count
; /* total count of parents
*/
2457 VARARG(parents
,user_handles
); /* parent handles
*/
2461 /* Get a list of the window children
*/
2462 @
REQ(get_window_children
)
2463 obj_handle_t desktop
; /* handle to desktop
*/
2464 user_handle_t parent
; /* parent window
*/
2465 atom_t atom
; /* class atom for the listed children
*/
2466 thread_id_t tid
; /* thread owning the listed children
*/
2467 VARARG(class
,unicode_str
); /* class name
*/
2469 int count
; /* total count of children
*/
2470 VARARG(children
,user_handles
); /* children handles
*/
2474 /* Get a list of the window children that contain a given point
*/
2475 @
REQ(get_window_children_from_point
)
2476 user_handle_t parent
; /* parent window
*/
2477 int x
; /* point in parent coordinates
*/
2479 int dpi
; /* dpi for the point coordinates
*/
2481 int count
; /* total count of children
*/
2482 VARARG(children
,user_handles
); /* children handles
*/
2486 /* Get window tree information from a window handle
*/
2487 @
REQ(get_window_tree
)
2488 user_handle_t handle
; /* handle to the window
*/
2490 user_handle_t parent
; /* parent window
*/
2491 user_handle_t owner
; /* owner window
*/
2492 user_handle_t next_sibling
; /* next sibling in Z
-order
*/
2493 user_handle_t prev_sibling
; /* prev sibling in Z
-order
*/
2494 user_handle_t first_sibling
; /* first sibling in Z
-order
*/
2495 user_handle_t last_sibling
; /* last sibling in Z
-order
*/
2496 user_handle_t first_child
; /* first child
*/
2497 user_handle_t last_child
; /* last child
*/
2500 /* Set the position and Z order of a window
*/
2501 @
REQ(set_window_pos
)
2502 unsigned short swp_flags
; /* SWP_
* flags
*/
2503 unsigned short paint_flags
; /* paint
flags (see below
) */
2504 user_handle_t handle
; /* handle to the window
*/
2505 user_handle_t previous
; /* previous window in Z order
*/
2506 rectangle_t window
; /* window
rectangle (in parent coords
) */
2507 rectangle_t client
; /* client
rectangle (in parent coords
) */
2508 VARARG(valid
,rectangles
); /* valid rectangles from
WM_NCCALCSIZE (in parent coords
) */
2510 unsigned int new_style
; /* new window style
*/
2511 unsigned int new_ex_style
; /* new window extended style
*/
2512 user_handle_t surface_win
; /* parent window that holds the surface
*/
2513 int needs_update
; /* whether the surface region needs an update
*/
2515 #define SET_WINPOS_PAINT_SURFACE
0x01 /* window has a paintable surface
*/
2516 #define SET_WINPOS_PIXEL_FORMAT
0x02 /* window has a custom pixel format
*/
2518 /* Get the window and client rectangles of a window
*/
2519 @
REQ(get_window_rectangles
)
2520 user_handle_t handle
; /* handle to the window
*/
2521 int relative
; /* coords relative
to (see below
) */
2522 int dpi
; /* DPI to map to
, or zero for per
-monitor DPI
*/
2524 rectangle_t window
; /* window rectangle
*/
2525 rectangle_t client
; /* client rectangle
*/
2527 enum coords_relative
2529 COORDS_CLIENT
, /* relative to client area
*/
2530 COORDS_WINDOW
, /* relative to whole window area
*/
2531 COORDS_PARENT
, /* relative to parent
's client area */
2532 COORDS_SCREEN /* relative to screen origin */
2536 /* Get the window text */
2537 @REQ(get_window_text)
2538 user_handle_t handle; /* handle to the window */
2540 data_size_t length; /* total length in WCHARs */
2541 VARARG(text,unicode_str); /* window text */
2545 /* Set the window text */
2546 @REQ(set_window_text)
2547 user_handle_t handle; /* handle to the window */
2548 VARARG(text,unicode_str); /* window text */
2552 /* Get the coordinates offset between two windows */
2553 @REQ(get_windows_offset)
2554 user_handle_t from; /* handle to the first window */
2555 user_handle_t to; /* handle to the second window */
2556 int dpi; /* DPI to map to, or zero for per-monitor DPI */
2558 int x; /* x coordinate offset */
2559 int y; /* y coordinate offset */
2560 int mirror; /* whether to mirror the x coordinate */
2564 /* Get the visible region of a window */
2565 @REQ(get_visible_region)
2566 user_handle_t window; /* handle to the window */
2567 unsigned int flags; /* DCX flags */
2569 user_handle_t top_win; /* top window to clip against */
2570 rectangle_t top_rect; /* top window visible rect with screen coords */
2571 rectangle_t win_rect; /* window rect in screen coords */
2572 unsigned int paint_flags; /* paint flags (from SET_WINPOS_* flags) */
2573 data_size_t total_size; /* total size of the resulting region */
2574 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2578 /* Get the visible surface region of a window */
2579 @REQ(get_surface_region)
2580 user_handle_t window; /* handle to the window */
2582 rectangle_t visible_rect; /* window visible rect in screen coords */
2583 data_size_t total_size; /* total size of the resulting region */
2584 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2588 /* Get the window region */
2589 @REQ(get_window_region)
2590 user_handle_t window; /* handle to the window */
2592 data_size_t total_size; /* total size of the resulting region */
2593 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2597 /* Set the window region */
2598 @REQ(set_window_region)
2599 user_handle_t window; /* handle to the window */
2600 int redraw; /* redraw the window? */
2601 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2605 /* Get the window update region */
2606 @REQ(get_update_region)
2607 user_handle_t window; /* handle to the window */
2608 user_handle_t from_child; /* child to start searching from */
2609 unsigned int flags; /* update flags (see below) */
2611 user_handle_t child; /* child to repaint (or window itself) */
2612 unsigned int flags; /* resulting update flags (see below) */
2613 data_size_t total_size; /* total size of the resulting region */
2614 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2616 #define UPDATE_NONCLIENT 0x001 /* get region for repainting non-client area */
2617 #define UPDATE_ERASE 0x002 /* get region for erasing client area */
2618 #define UPDATE_PAINT 0x004 /* get region for painting client area */
2619 #define UPDATE_INTERNALPAINT 0x008 /* get region if internal paint is pending */
2620 #define UPDATE_ALLCHILDREN 0x010 /* force repaint of all children */
2621 #define UPDATE_NOCHILDREN 0x020 /* don't try to repaint any children
*/
2622 #define UPDATE_NOREGION
0x040 /* don
't return a region, only the flags */
2623 #define UPDATE_DELAYED_ERASE 0x080 /* still needs erase after BeginPaint */
2624 #define UPDATE_CLIPCHILDREN 0x100 /* remove clipped children from the update region */
2627 /* Update the z order of a window so that a given rectangle is fully visible */
2628 @REQ(update_window_zorder)
2629 user_handle_t window; /* handle to the window */
2630 rectangle_t rect; /* rectangle that must be visible (in client coords) */
2634 /* Mark parts of a window as needing a redraw */
2636 user_handle_t window; /* handle to the window */
2637 unsigned int flags; /* RDW_* flags */
2638 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2642 /* Set a window property */
2643 @REQ(set_window_property)
2644 user_handle_t window; /* handle to the window */
2645 lparam_t data; /* data to store */
2646 atom_t atom; /* property atom (if no name specified) */
2647 VARARG(name,unicode_str); /* property name */
2651 /* Remove a window property */
2652 @REQ(remove_window_property)
2653 user_handle_t window; /* handle to the window */
2654 atom_t atom; /* property atom (if no name specified) */
2655 VARARG(name,unicode_str); /* property name */
2657 lparam_t data; /* data stored in property */
2661 /* Get a window property */
2662 @REQ(get_window_property)
2663 user_handle_t window; /* handle to the window */
2664 atom_t atom; /* property atom (if no name specified) */
2665 VARARG(name,unicode_str); /* property name */
2667 lparam_t data; /* data stored in property */
2671 /* Get the list of properties of a window */
2672 @REQ(get_window_properties)
2673 user_handle_t window; /* handle to the window */
2675 int total; /* total number of properties */
2676 VARARG(props,properties); /* list of properties */
2680 /* Create a window station */
2681 @REQ(create_winstation)
2682 unsigned int flags; /* window station flags */
2683 unsigned int access; /* wanted access rights */
2684 unsigned int attributes; /* object attributes */
2685 obj_handle_t rootdir; /* root directory */
2686 VARARG(name,unicode_str); /* object name */
2688 obj_handle_t handle; /* handle to the window station */
2692 /* Open a handle to a window station */
2693 @REQ(open_winstation)
2694 unsigned int access; /* wanted access rights */
2695 unsigned int attributes; /* object attributes */
2696 obj_handle_t rootdir; /* root directory */
2697 VARARG(name,unicode_str); /* object name */
2699 obj_handle_t handle; /* handle to the window station */
2703 /* Close a window station */
2704 @REQ(close_winstation)
2705 obj_handle_t handle; /* handle to the window station */
2709 /* Get the process current window station */
2710 @REQ(get_process_winstation)
2712 obj_handle_t handle; /* handle to the window station */
2716 /* Set the process current window station */
2717 @REQ(set_process_winstation)
2718 obj_handle_t handle; /* handle to the window station */
2722 /* Enumerate window stations */
2723 @REQ(enum_winstation)
2724 unsigned int index; /* current index */
2726 unsigned int next; /* next index */
2727 VARARG(name,unicode_str); /* window station name */
2731 /* Create a desktop */
2732 @REQ(create_desktop)
2733 unsigned int flags; /* desktop flags */
2734 unsigned int access; /* wanted access rights */
2735 unsigned int attributes; /* object attributes */
2736 VARARG(name,unicode_str); /* object name */
2738 obj_handle_t handle; /* handle to the desktop */
2742 /* Open a handle to a desktop */
2744 obj_handle_t winsta; /* window station to open (null allowed) */
2745 unsigned int flags; /* desktop flags */
2746 unsigned int access; /* wanted access rights */
2747 unsigned int attributes; /* object attributes */
2748 VARARG(name,unicode_str); /* object name */
2750 obj_handle_t handle; /* handle to the desktop */
2754 /* Open a handle to current input desktop */
2755 @REQ(open_input_desktop)
2756 unsigned int flags; /* desktop flags */
2757 unsigned int access; /* wanted access rights */
2758 unsigned int attributes; /* object attributes */
2760 obj_handle_t handle; /* handle to the desktop */
2764 /* Close a desktop */
2766 obj_handle_t handle; /* handle to the desktop */
2770 /* Get the thread current desktop */
2771 @REQ(get_thread_desktop)
2772 thread_id_t tid; /* thread id */
2774 obj_handle_t handle; /* handle to the desktop */
2778 /* Set the thread current desktop */
2779 @REQ(set_thread_desktop)
2780 obj_handle_t handle; /* handle to the desktop */
2784 /* Enumerate desktops */
2786 obj_handle_t winstation; /* handle to the window station */
2787 unsigned int index; /* current index */
2789 unsigned int next; /* next index */
2790 VARARG(name,unicode_str); /* window station name */
2794 /* Get/set information about a user object (window station or desktop) */
2795 @REQ(set_user_object_info)
2796 obj_handle_t handle; /* handle to the object */
2797 unsigned int flags; /* information to set/get */
2798 unsigned int obj_flags; /* new object flags */
2800 int is_desktop; /* is object a desktop? */
2801 unsigned int old_obj_flags; /* old object flags */
2802 VARARG(name,unicode_str); /* object name */
2804 #define SET_USER_OBJECT_SET_FLAGS 1
2805 #define SET_USER_OBJECT_GET_FULL_NAME 2
2808 /* Register a hotkey */
2809 @REQ(register_hotkey)
2810 user_handle_t window; /* handle to the window */
2811 int id; /* hotkey identifier */
2812 unsigned int flags; /* modifier keys */
2813 unsigned int vkey; /* virtual key code */
2815 int replaced; /* did we replace an existing hotkey? */
2816 unsigned int flags; /* flags of replaced hotkey */
2817 unsigned int vkey; /* virtual key code of replaced hotkey */
2821 /* Unregister a hotkey */
2822 @REQ(unregister_hotkey)
2823 user_handle_t window; /* handle to the window */
2824 int id; /* hotkey identifier */
2826 unsigned int flags; /* flags of removed hotkey */
2827 unsigned int vkey; /* virtual key code of removed hotkey */
2831 /* Attach (or detach) thread inputs */
2832 @REQ(attach_thread_input)
2833 thread_id_t tid_from; /* thread to be attached */
2834 thread_id_t tid_to; /* thread to which tid_from should be attached */
2835 int attach; /* is it an attach? */
2839 /* Get input data for a given thread */
2840 @REQ(get_thread_input)
2841 thread_id_t tid; /* id of thread */
2843 user_handle_t focus; /* handle to the focus window */
2844 user_handle_t capture; /* handle to the capture window */
2845 user_handle_t active; /* handle to the active window */
2846 user_handle_t foreground; /* handle to the global foreground window */
2847 user_handle_t menu_owner; /* handle to the menu owner */
2848 user_handle_t move_size; /* handle to the moving/resizing window */
2849 user_handle_t caret; /* handle to the caret window */
2850 user_handle_t cursor; /* handle to the cursor */
2851 int show_count; /* cursor show count */
2852 rectangle_t rect; /* caret rectangle */
2856 /* Get the time of the last input event */
2857 @REQ(get_last_input_time)
2863 /* Retrieve queue keyboard state for current thread or global async state */
2865 int async; /* whether to query the async state */
2866 int key; /* optional key code or -1 */
2868 unsigned char state; /* state of specified key */
2869 VARARG(keystate,bytes); /* state array for all the keys */
2872 /* Set queue keyboard state for current thread */
2874 int async; /* whether to change the async state too */
2875 VARARG(keystate,bytes); /* state array for all the keys */
2878 /* Set the system foreground window */
2879 @REQ(set_foreground_window)
2880 user_handle_t handle; /* handle to the foreground window */
2882 user_handle_t previous; /* handle to the previous foreground window */
2883 int send_msg_old; /* whether we have to send a msg to the old window */
2884 int send_msg_new; /* whether we have to send a msg to the new window */
2887 /* Set the current thread focus window */
2888 @REQ(set_focus_window)
2889 user_handle_t handle; /* handle to the focus window */
2891 user_handle_t previous; /* handle to the previous focus window */
2894 /* Set the current thread active window */
2895 @REQ(set_active_window)
2896 user_handle_t handle; /* handle to the active window */
2898 user_handle_t previous; /* handle to the previous active window */
2901 /* Set the current thread capture window */
2902 @REQ(set_capture_window)
2903 user_handle_t handle; /* handle to the capture window */
2904 unsigned int flags; /* capture flags (see below) */
2906 user_handle_t previous; /* handle to the previous capture window */
2907 user_handle_t full_handle; /* full 32-bit handle of new capture window */
2909 #define CAPTURE_MENU 0x01 /* capture is for a menu */
2910 #define CAPTURE_MOVESIZE 0x02 /* capture is for moving/resizing */
2913 /* Set the current thread caret window */
2914 @REQ(set_caret_window)
2915 user_handle_t handle; /* handle to the caret window */
2916 int width; /* caret width */
2917 int height; /* caret height */
2919 user_handle_t previous; /* handle to the previous caret window */
2920 rectangle_t old_rect; /* previous caret rectangle */
2921 int old_hide; /* previous hide count */
2922 int old_state; /* previous caret state (1=on, 0=off) */
2926 /* Set the current thread caret information */
2927 @REQ(set_caret_info)
2928 unsigned int flags; /* caret flags (see below) */
2929 user_handle_t handle; /* handle to the caret window */
2930 int x; /* caret x position */
2931 int y; /* caret y position */
2932 int hide; /* increment for hide count (can be negative to show it) */
2933 int state; /* caret state (see below) */
2935 user_handle_t full_handle; /* handle to the current caret window */
2936 rectangle_t old_rect; /* previous caret rectangle */
2937 int old_hide; /* previous hide count */
2938 int old_state; /* previous caret state (1=on, 0=off) */
2940 #define SET_CARET_POS 0x01 /* set the caret position from x,y */
2941 #define SET_CARET_HIDE 0x02 /* increment the caret hide count */
2942 #define SET_CARET_STATE 0x04 /* set the caret on/off state */
2945 CARET_STATE_OFF, /* off */
2946 CARET_STATE_ON, /* on */
2947 CARET_STATE_TOGGLE, /* toggle current state */
2948 CARET_STATE_ON_IF_MOVED /* on if the position differs, unchanged otherwise */
2952 /* Set a window hook */
2954 int id; /* id of the hook */
2955 process_id_t pid; /* id of process to set the hook into */
2956 thread_id_t tid; /* id of thread to set the hook into */
2959 client_ptr_t proc; /* hook procedure */
2961 int unicode; /* is it a unicode hook? */
2962 VARARG(module,unicode_str); /* module name */
2964 user_handle_t handle; /* handle to the hook */
2965 unsigned int active_hooks; /* active hooks bitmap */
2969 /* Remove a window hook */
2971 user_handle_t handle; /* handle to the hook */
2972 client_ptr_t proc; /* hook procedure if handle is 0 */
2973 int id; /* id of the hook if handle is 0 */
2975 unsigned int active_hooks; /* active hooks bitmap */
2979 /* Start calling a hook chain */
2980 @REQ(start_hook_chain)
2981 int id; /* id of the hook */
2982 int event; /* signalled event */
2983 user_handle_t window; /* handle to the event window */
2984 int object_id; /* object id for out of context winevent */
2985 int child_id; /* child id for out of context winevent */
2987 user_handle_t handle; /* handle to the next hook */
2988 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2989 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2990 int unicode; /* is it a unicode hook? */
2991 client_ptr_t proc; /* hook procedure */
2992 unsigned int active_hooks; /* active hooks bitmap */
2993 VARARG(module,unicode_str); /* module name */
2997 /* Finished calling a hook chain */
2998 @REQ(finish_hook_chain)
2999 int id; /* id of the hook */
3003 /* Get the hook information */
3005 user_handle_t handle; /* handle to the current hook */
3006 int get_next; /* do we want info about current or next hook? */
3007 int event; /* signalled event */
3008 user_handle_t window; /* handle to the event window */
3009 int object_id; /* object id for out of context winevent */
3010 int child_id; /* child id for out of context winevent */
3012 user_handle_t handle; /* handle to the hook */
3013 int id; /* id of the hook */
3014 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
3015 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
3016 client_ptr_t proc; /* hook procedure */
3017 int unicode; /* is it a unicode hook? */
3018 VARARG(module,unicode_str); /* module name */
3022 /* Create a window class */
3024 int local; /* is it a local class? */
3025 atom_t atom; /* class atom */
3026 unsigned int style; /* class style */
3027 mod_handle_t instance; /* module instance */
3028 int extra; /* number of extra class bytes */
3029 int win_extra; /* number of window extra bytes */
3030 client_ptr_t client_ptr; /* pointer to class in client address space */
3031 data_size_t name_offset; /* base class name offset for specified atom */
3032 VARARG(name,unicode_str); /* class name */
3034 atom_t atom; /* resulting class atom */
3038 /* Destroy a window class */
3040 atom_t atom; /* class atom */
3041 mod_handle_t instance; /* module instance */
3042 VARARG(name,unicode_str); /* class name */
3044 client_ptr_t client_ptr; /* pointer to class in client address space */
3048 /* Set some information in a class */
3049 @REQ(set_class_info)
3050 user_handle_t window; /* handle to the window */
3051 unsigned int flags; /* flags for info to set (see below) */
3052 atom_t atom; /* class atom */
3053 unsigned int style; /* class style */
3054 int win_extra; /* number of window extra bytes */
3055 mod_handle_t instance; /* module instance */
3056 int extra_offset; /* offset to set in extra bytes */
3057 data_size_t extra_size; /* size to set in extra bytes */
3058 lparam_t extra_value; /* value to set in extra bytes */
3060 atom_t old_atom; /* previous class atom */
3061 atom_t base_atom; /* base class atom */
3062 mod_handle_t old_instance; /* previous module instance */
3063 lparam_t old_extra_value; /* old value in extra bytes */
3064 unsigned int old_style; /* previous class style */
3065 int old_extra; /* previous number of class extra bytes */
3066 int old_win_extra; /* previous number of window extra bytes */
3068 #define SET_CLASS_ATOM 0x0001
3069 #define SET_CLASS_STYLE 0x0002
3070 #define SET_CLASS_WINEXTRA 0x0004
3071 #define SET_CLASS_INSTANCE 0x0008
3072 #define SET_CLASS_EXTRA 0x0010
3075 /* Open the clipboard */
3076 @REQ(open_clipboard)
3077 user_handle_t window; /* clipboard window */
3079 user_handle_t owner; /* current clipboard owner */
3083 /* Close the clipboard */
3084 @REQ(close_clipboard)
3086 user_handle_t viewer; /* first clipboard viewer */
3087 user_handle_t owner; /* current clipboard owner */
3091 /* Empty the clipboard and grab ownership */
3092 @REQ(empty_clipboard)
3096 /* Add a data format to the clipboard */
3097 @REQ(set_clipboard_data)
3098 unsigned int format; /* clipboard format of the data */
3099 unsigned int lcid; /* locale id to use for synthesizing text formats */
3100 VARARG(data,bytes); /* data contents */
3102 unsigned int seqno; /* sequence number for the set data */
3106 /* Fetch a data format from the clipboard */
3107 @REQ(get_clipboard_data)
3108 unsigned int format; /* clipboard format of the data */
3109 int render; /* will we try to render it if missing? */
3110 int cached; /* do we already have it in the client-side cache? */
3111 unsigned int seqno; /* sequence number for the data in the cache */
3113 unsigned int from; /* for synthesized data, format to generate it from */
3114 user_handle_t owner; /* clipboard owner for delayed-rendered formats */
3115 unsigned int seqno; /* sequence number for the originally set data */
3116 data_size_t total; /* total data size */
3117 VARARG(data,bytes); /* data contents */
3121 /* Retrieve a list of available formats */
3122 @REQ(get_clipboard_formats)
3123 unsigned int format; /* specific format to query, return all if 0 */
3125 unsigned int count; /* count of available formats */
3126 VARARG(formats,uints); /* array of available formats */
3130 /* Retrieve the next available format */
3131 @REQ(enum_clipboard_formats)
3132 unsigned int previous; /* previous format, or first if 0 */
3134 unsigned int format; /* next format */
3138 /* Release ownership of the clipboard */
3139 @REQ(release_clipboard)
3140 user_handle_t owner; /* clipboard owner to release */
3142 user_handle_t viewer; /* first clipboard viewer */
3143 user_handle_t owner; /* current clipboard owner */
3147 /* Get clipboard information */
3148 @REQ(get_clipboard_info)
3150 user_handle_t window; /* clipboard window */
3151 user_handle_t owner; /* clipboard owner */
3152 user_handle_t viewer; /* clipboard viewer */
3153 unsigned int seqno; /* current sequence number */
3157 /* Set the clipboard viewer window */
3158 @REQ(set_clipboard_viewer)
3159 user_handle_t viewer; /* clipboard viewer */
3160 user_handle_t previous; /* if non-zero, check that this was the previous viewer */
3162 user_handle_t old_viewer; /* previous clipboard viewer */
3163 user_handle_t owner; /* clipboard owner */
3167 /* Add a clipboard listener window */
3168 @REQ(add_clipboard_listener)
3169 user_handle_t window; /* clipboard listener window */
3173 /* Remove a clipboard listener window */
3174 @REQ(remove_clipboard_listener)
3175 user_handle_t window; /* clipboard listener window */
3179 /* Open a security token */
3181 obj_handle_t handle; /* handle to the thread or process */
3182 unsigned int access; /* access rights to the new token */
3183 unsigned int attributes;/* object attributes */
3184 unsigned int flags; /* flags (see below) */
3186 obj_handle_t token; /* handle to the token */
3188 #define OPEN_TOKEN_THREAD 1
3189 #define OPEN_TOKEN_AS_SELF 2
3192 /* Set/get the global windows */
3193 @REQ(set_global_windows)
3194 unsigned int flags; /* flags for fields to set (see below) */
3195 user_handle_t shell_window; /* handle to the new shell window */
3196 user_handle_t shell_listview; /* handle to the new shell listview window */
3197 user_handle_t progman_window; /* handle to the new program manager window */
3198 user_handle_t taskman_window; /* handle to the new task manager window */
3200 user_handle_t old_shell_window; /* handle to the shell window */
3201 user_handle_t old_shell_listview; /* handle to the shell listview window */
3202 user_handle_t old_progman_window; /* handle to the new program manager window */
3203 user_handle_t old_taskman_window; /* handle to the new task manager window */
3205 #define SET_GLOBAL_SHELL_WINDOWS 0x01 /* set both main shell and listview windows */
3206 #define SET_GLOBAL_PROGMAN_WINDOW 0x02
3207 #define SET_GLOBAL_TASKMAN_WINDOW 0x04
3209 /* Adjust the privileges held by a token */
3210 @REQ(adjust_token_privileges)
3211 obj_handle_t handle; /* handle to the token */
3212 int disable_all; /* disable all privileges? */
3213 int get_modified_state; /* get modified privileges? */
3214 VARARG(privileges,luid_attr); /* privileges to enable/disable/remove */
3216 unsigned int len; /* total length in bytes required to store token privileges */
3217 VARARG(privileges,luid_attr); /* modified privileges */
3220 /* Retrieves the set of privileges held by or available to a token */
3221 @REQ(get_token_privileges)
3222 obj_handle_t handle; /* handle to the token */
3224 unsigned int len; /* total length in bytes required to store token privileges */
3225 VARARG(privileges,luid_attr); /* privileges held by or available to a token */
3228 /* Check the token has the required privileges */
3229 @REQ(check_token_privileges)
3230 obj_handle_t handle; /* handle to the token */
3231 int all_required; /* are all the privileges required for the check to succeed? */
3232 VARARG(privileges,luid_attr); /* privileges to check */
3234 int has_privileges; /* does the token have the required privileges? */
3235 VARARG(privileges,luid_attr); /* privileges held by or available to a token */
3238 @REQ(duplicate_token)
3239 obj_handle_t handle; /* handle to the token to duplicate */
3240 unsigned int access; /* access rights to the new token */
3241 int primary; /* is the new token to be a primary one? */
3242 int impersonation_level; /* impersonation level of the new token */
3243 VARARG(objattr,object_attributes); /* object attributes */
3245 obj_handle_t new_handle; /* duplicated handle */
3249 obj_handle_t handle; /* handle to the token to duplicate */
3250 unsigned int flags; /* flags */
3251 data_size_t privileges_size; /* size of privileges */
3252 VARARG(privileges,luid_attr,privileges_size); /* privileges to remove from new token */
3253 VARARG(disable_sids,sid); /* array of groups to remove from new token */
3255 obj_handle_t new_handle; /* filtered handle */
3259 obj_handle_t handle; /* handle to the token */
3260 unsigned int desired_access; /* desired access to the object */
3261 generic_map_t mapping; /* mapping to specific rights */
3262 VARARG(sd,security_descriptor); /* security descriptor to check */
3264 unsigned int access_granted; /* access rights actually granted */
3265 unsigned int access_status; /* was access granted? */
3266 unsigned int privileges_len; /* length needed to store privileges */
3267 VARARG(privileges,luid_attr); /* privileges used during access check */
3271 obj_handle_t handle; /* handle to the token */
3272 unsigned int which_sid; /* which SID to retrieve from the token */
3274 data_size_t sid_len; /* length needed to store sid */
3275 VARARG(sid,sid); /* the sid specified by which_sid from the token */
3278 @REQ(get_token_groups)
3279 obj_handle_t handle; /* handle to the token */
3280 unsigned int attr_mask; /* mask for wanted attributes */
3282 data_size_t attr_len; /* length needed to store attrs */
3283 data_size_t sid_len; /* length needed to store sids */
3284 VARARG(attrs,uints,attr_len); /* group attributes */
3285 VARARG(sids,sids); /* group sids */
3288 @REQ(get_token_default_dacl)
3289 obj_handle_t handle; /* handle to the token */
3291 data_size_t acl_len; /* length needed to store access control list */
3292 VARARG(acl,acl); /* access control list */
3295 @REQ(set_token_default_dacl)
3296 obj_handle_t handle; /* handle to the token */
3297 VARARG(acl,acl); /* default dacl to set */
3300 @REQ(set_security_object)
3301 obj_handle_t handle; /* handle to the object */
3302 unsigned int security_info; /* which parts of security descriptor to set */
3303 VARARG(sd,security_descriptor); /* security descriptor to set */
3306 @REQ(get_security_object)
3307 obj_handle_t handle; /* handle to the object */
3308 unsigned int security_info; /* which parts of security descriptor to get */
3310 unsigned int sd_len; /* buffer size needed for sd */
3311 VARARG(sd,security_descriptor); /* retrieved security descriptor */
3318 obj_handle_t handle;
3319 unsigned int access;
3320 unsigned int attributes;
3324 /* Return a list of all opened handles */
3325 @REQ(get_system_handles)
3327 unsigned int count; /* number of handles */
3328 VARARG(data,handle_infos); /* array of handle_infos */
3332 /* Create a mailslot */
3333 @REQ(create_mailslot)
3334 unsigned int access; /* wanted access rights */
3335 timeout_t read_timeout;
3336 unsigned int max_msgsize;
3337 VARARG(objattr,object_attributes); /* object attributes */
3339 obj_handle_t handle; /* handle to the mailslot */
3343 /* Set mailslot information */
3344 @REQ(set_mailslot_info)
3345 obj_handle_t handle; /* handle to the mailslot */
3346 timeout_t read_timeout;
3349 timeout_t read_timeout;
3350 unsigned int max_msgsize;
3352 #define MAILSLOT_SET_READ_TIMEOUT 1
3355 /* Create a directory object */
3356 @REQ(create_directory)
3357 unsigned int access; /* access flags */
3358 VARARG(objattr,object_attributes); /* object attributes */
3360 obj_handle_t handle; /* handle to the directory */
3364 /* Open a directory object */
3365 @REQ(open_directory)
3366 unsigned int access; /* access flags */
3367 unsigned int attributes; /* object attributes */
3368 obj_handle_t rootdir; /* root directory */
3369 VARARG(directory_name,unicode_str); /* Directory name */
3371 obj_handle_t handle; /* handle to the directory */
3375 /* Get a directory entry by index */
3376 @REQ(get_directory_entry)
3377 obj_handle_t handle; /* handle to the directory */
3378 unsigned int index; /* entry index */
3380 data_size_t total_len; /* total length needed for strings */
3381 data_size_t name_len; /* length of the entry name in bytes */
3382 VARARG(name,unicode_str,name_len); /* entry name */
3383 VARARG(type,unicode_str); /* entry type */
3387 /* Create a symbolic link object */
3388 @REQ(create_symlink)
3389 unsigned int access; /* access flags */
3390 VARARG(objattr,object_attributes); /* object attributes */
3391 VARARG(target_name,unicode_str); /* target name */
3393 obj_handle_t handle; /* handle to the symlink */
3397 /* Open a symbolic link object */
3399 unsigned int access; /* access flags */
3400 unsigned int attributes; /* object attributes */
3401 obj_handle_t rootdir; /* root directory */
3402 VARARG(name,unicode_str); /* symlink name */
3404 obj_handle_t handle; /* handle to the symlink */
3408 /* Query a symbolic link object */
3410 obj_handle_t handle; /* handle to the symlink */
3412 data_size_t total; /* total needed size for name */
3413 VARARG(target_name,unicode_str); /* target name */
3417 /* Query basic object information */
3418 @REQ(get_object_info)
3419 obj_handle_t handle; /* handle to the object */
3421 unsigned int access; /* granted access mask */
3422 unsigned int ref_count; /* object ref count */
3423 unsigned int handle_count; /* object handle count */
3427 /* Query the full name of an object */
3428 @REQ(get_object_name)
3429 obj_handle_t handle; /* handle to the object */
3431 data_size_t total; /* total needed size for name */
3432 VARARG(name,unicode_str); /* object name */
3436 /* Query object type name information */
3437 @REQ(get_object_type)
3438 obj_handle_t handle; /* handle to the object */
3440 VARARG(info,object_type_info); /* type information */
3444 /* Query type information for all types */
3445 @REQ(get_object_types)
3447 int count; /* total count of object types */
3448 VARARG(info,object_types_info); /* type information */
3452 /* Allocate a locally-unique identifier */
3453 @REQ(allocate_locally_unique_id)
3459 /* Create a device manager */
3460 @REQ(create_device_manager)
3461 unsigned int access; /* wanted access rights */
3462 unsigned int attributes; /* object attributes */
3464 obj_handle_t handle; /* handle to the device */
3468 /* Create a device */
3470 obj_handle_t rootdir; /* root directory */
3471 client_ptr_t user_ptr; /* opaque ptr for use by client */
3472 obj_handle_t manager; /* device manager */
3473 VARARG(name,unicode_str); /* object name */
3477 /* Delete a device */
3479 obj_handle_t manager; /* handle to the device manager */
3480 client_ptr_t device; /* pointer to the device */
3484 /* Retrieve the next pending device irp request */
3485 @REQ(get_next_device_request)
3486 obj_handle_t manager; /* handle to the device manager */
3487 obj_handle_t prev; /* handle to the previous irp */
3488 unsigned int status; /* status of the previous irp */
3489 client_ptr_t user_ptr; /* user pointer of the previous irp */
3490 int pending; /* was the previous irp marked pending? */
3491 unsigned int iosb_status; /* IOSB status of the previous irp */
3492 data_size_t result; /* IOSB result of the previous irp */
3493 VARARG(data,bytes); /* output data of the previous irp */
3495 irp_params_t params; /* irp parameters */
3496 obj_handle_t next; /* handle to the next irp */
3497 thread_id_t client_tid; /* tid of thread calling irp */
3498 client_ptr_t client_thread; /* pointer to thread object of calling irp */
3499 data_size_t in_size; /* total needed input size */
3500 VARARG(next_data,bytes); /* input data of the next irp */
3504 /* Get kernel pointer from server object */
3505 @REQ(get_kernel_object_ptr)
3506 obj_handle_t manager; /* handle to the device manager */
3507 obj_handle_t handle; /* object handle */
3509 client_ptr_t user_ptr; /* kernel object pointer */
3513 /* Associate kernel pointer with server object */
3514 @REQ(set_kernel_object_ptr)
3515 obj_handle_t manager; /* handle to the device manager */
3516 obj_handle_t handle; /* object handle */
3517 client_ptr_t user_ptr; /* kernel object pointer */
3521 /* Grab server object reference from kernel object pointer */
3522 @REQ(grab_kernel_object)
3523 obj_handle_t manager; /* handle to the device manager */
3524 client_ptr_t user_ptr; /* kernel object pointer */
3528 /* Release server object reference from kernel object pointer */
3529 @REQ(release_kernel_object)
3530 obj_handle_t manager; /* handle to the device manager */
3531 client_ptr_t user_ptr; /* kernel object pointer */
3535 /* Get handle from kernel object pointer */
3536 @REQ(get_kernel_object_handle)
3537 obj_handle_t manager; /* handle to the device manager */
3538 client_ptr_t user_ptr; /* kernel object pointer */
3539 unsigned int access; /* wanted access rights */
3541 obj_handle_t handle; /* kernel object handle */
3545 /* Make the current process a system process */
3546 @REQ(make_process_system)
3547 obj_handle_t handle; /* handle to the process */
3549 obj_handle_t event; /* event signaled when all user processes have exited */
3553 /* Get detailed fixed-size information about a token */
3554 @REQ(get_token_info)
3555 obj_handle_t handle; /* handle to the object */
3557 struct luid token_id; /* locally-unique identifier of the token */
3558 struct luid modified_id; /* locally-unique identifier of the modified version of the token */
3559 unsigned int session_id; /* token session id */
3560 int primary; /* is the token primary or impersonation? */
3561 int impersonation_level; /* level of impersonation */
3562 int elevation; /* elevation type */
3563 int group_count; /* the number of groups the token is a member of */
3564 int privilege_count; /* the number of privileges the token has */
3568 /* Create a token which is an elevation counterpart to this token */
3569 @REQ(create_linked_token)
3570 obj_handle_t handle; /* handle to the token */
3572 obj_handle_t linked; /* handle to the linked token */
3576 /* Create I/O completion port */
3577 @REQ(create_completion)
3578 unsigned int access; /* desired access to a port */
3579 unsigned int concurrent; /* max number of concurrent active threads */
3580 VARARG(objattr,object_attributes); /* object attributes */
3582 obj_handle_t handle; /* port handle */
3586 /* Open I/O completion port */
3587 @REQ(open_completion)
3588 unsigned int access; /* desired access to a port */
3589 unsigned int attributes; /* object attributes */
3590 obj_handle_t rootdir; /* root directory */
3591 VARARG(filename,unicode_str); /* port name */
3593 obj_handle_t handle; /* port handle */
3597 /* add completion to completion port */
3598 @REQ(add_completion)
3599 obj_handle_t handle; /* port handle */
3600 apc_param_t ckey; /* completion key */
3601 apc_param_t cvalue; /* completion value */
3602 apc_param_t information; /* IO_STATUS_BLOCK Information */
3603 unsigned int status; /* completion result */
3607 /* get completion from completion port queue */
3608 @REQ(remove_completion)
3609 obj_handle_t handle; /* port handle */
3611 apc_param_t ckey; /* completion key */
3612 apc_param_t cvalue; /* completion value */
3613 apc_param_t information; /* IO_STATUS_BLOCK Information */
3614 unsigned int status; /* completion result */
3618 /* get completion queue depth */
3619 @REQ(query_completion)
3620 obj_handle_t handle; /* port handle */
3622 unsigned int depth; /* completion queue depth */
3626 /* associate object with completion port */
3627 @REQ(set_completion_info)
3628 obj_handle_t handle; /* object handle */
3629 apc_param_t ckey; /* completion key */
3630 obj_handle_t chandle; /* port handle */
3634 /* check for associated completion and push msg */
3635 @REQ(add_fd_completion)
3636 obj_handle_t handle; /* async' object
*/
3637 apc_param_t cvalue
; /* completion value
*/
3638 apc_param_t information
; /* IO_STATUS_BLOCK Information
*/
3639 unsigned int status
; /* completion status
*/
3640 int async
; /* completion is an async result
*/
3644 /* set fd completion information
*/
3645 @
REQ(set_fd_completion_mode
)
3646 obj_handle_t handle
; /* handle to a file or directory
*/
3647 unsigned int flags
; /* completion notification flags
*/
3651 /* set fd disposition information
*/
3652 @
REQ(set_fd_disp_info
)
3653 obj_handle_t handle
; /* handle to a file or directory
*/
3654 unsigned int flags
; /* what actions should be taken when deleting a file
*/
3658 /* set fd name information
*/
3659 @
REQ(set_fd_name_info
)
3660 obj_handle_t handle
; /* handle to a file or directory
*/
3661 obj_handle_t rootdir
; /* root directory
*/
3662 data_size_t namelen
; /* length of NT name in bytes
*/
3663 int link
; /* link instead of renaming
*/
3664 int replace
; /* replace an existing file?
*/
3665 VARARG(name
,unicode_str
,namelen
); /* NT name
*/
3666 VARARG(filename
,string
); /* new file name
*/
3670 /* set fd eof information
*/
3671 @
REQ(set_fd_eof_info
)
3672 obj_handle_t handle
; /* handle to a file or directory
*/
3673 file_pos_t eof
; /* offset of eof of file
*/
3677 /* Retrieve layered info for a window
*/
3678 @
REQ(get_window_layered_info
)
3679 user_handle_t handle
; /* handle to the window
*/
3681 unsigned int color_key
; /* color key
*/
3682 unsigned int alpha
; /* alpha (0.
.255) */
3683 unsigned int flags
; /* LWA_
* flags
*/
3687 /* Set layered info for a window
*/
3688 @
REQ(set_window_layered_info
)
3689 user_handle_t handle
; /* handle to the window
*/
3690 unsigned int color_key
; /* color key
*/
3691 unsigned int alpha
; /* alpha (0.
.255) */
3692 unsigned int flags
; /* LWA_
* flags
*/
3696 /* Allocate an arbitrary user handle
*/
3697 @
REQ(alloc_user_handle
)
3699 user_handle_t handle
; /* allocated handle
*/
3703 /* Free an arbitrary user handle
*/
3704 @
REQ(free_user_handle
)
3705 user_handle_t handle
; /* handle to free
*/
3709 /* Set
/get the current cursor
*/
3711 unsigned int flags
; /* flags for fields to
set (see below
) */
3712 user_handle_t handle
; /* handle to the cursor
*/
3713 int show_count
; /* show count increment
/decrement
*/
3714 int x
; /* cursor position
*/
3716 rectangle_t clip
; /* cursor clip rectangle
*/
3718 user_handle_t prev_handle
; /* previous handle
*/
3719 int prev_count
; /* previous show count
*/
3720 int prev_x
; /* previous position
*/
3722 int new_x
; /* new position
*/
3724 rectangle_t new_clip
; /* new clip rectangle
*/
3725 unsigned int last_change
; /* time of last position change
*/
3727 #define SET_CURSOR_HANDLE
0x01
3728 #define SET_CURSOR_COUNT
0x02
3729 #define SET_CURSOR_POS
0x04
3730 #define SET_CURSOR_CLIP
0x08
3731 #define SET_CURSOR_NOCLIP
0x10
3732 #define SET_CURSOR_FSCLIP
0x20
3734 /* Get the history of the
64 last cursor positions
*/
3735 @
REQ(get_cursor_history
)
3737 VARARG(history
,cursor_positions
);
3741 /* Batch read rawinput message data
*/
3742 @
REQ(get_rawinput_buffer
)
3743 data_size_t rawinput_size
; /* size of RAWINPUT structure
*/
3744 data_size_t buffer_size
; /* size of output buffer
*/
3746 data_size_t next_size
; /* minimum size to get next message data
*/
3751 /* Modify the list of registered rawinput devices
*/
3752 @
REQ(update_rawinput_devices
)
3753 VARARG(devices
,rawinput_devices
);
3756 /* Create a new job object
*/
3758 unsigned int access
; /* wanted access rights
*/
3759 VARARG(objattr
,object_attributes
); /* object attributes
*/
3761 obj_handle_t handle
; /* handle to the job
*/
3765 /* Open a job object
*/
3767 unsigned int access
; /* wanted access rights
*/
3768 unsigned int attributes
; /* object attributes
*/
3769 obj_handle_t rootdir
; /* root directory
*/
3770 VARARG(name
,unicode_str
); /* object name
*/
3772 obj_handle_t handle
; /* handle to the job
*/
3776 /* Assign a job object to a process
*/
3778 obj_handle_t job
; /* handle to the job
*/
3779 obj_handle_t process
; /* handle to the process
*/
3783 /* Check if a process is associated with a job
*/
3784 @
REQ(process_in_job
)
3785 obj_handle_t job
; /* handle to the job
*/
3786 obj_handle_t process
; /* handle to the process
*/
3790 /* Set limit flags on a job
*/
3791 @
REQ(set_job_limits
)
3792 obj_handle_t handle
; /* handle to the job
*/
3793 unsigned int limit_flags
; /* new limit flags
*/
3797 /* Set new completion port for a job
*/
3798 @
REQ(set_job_completion_port
)
3799 obj_handle_t job
; /* handle to the job
*/
3800 obj_handle_t port
; /* handle to the completion port
*/
3801 client_ptr_t key
; /* key to send with completion messages
*/
3805 /* Retrieve information about a job
*/
3807 obj_handle_t handle
; /* handle to the job
*/
3809 int total_processes
; /* total count of processes
*/
3810 int active_processes
; /* count of running processes
*/
3811 VARARG(pids
,uints
); /* list of active pids
*/
3815 /* Terminate all processes associated with the job
*/
3817 obj_handle_t handle
; /* handle to the job
*/
3818 int status
; /* process exit code
*/
3822 /* Suspend a process
*/
3823 @
REQ(suspend_process
)
3824 obj_handle_t handle
; /* process handle
*/
3828 /* Resume a process
*/
3829 @
REQ(resume_process
)
3830 obj_handle_t handle
; /* process handle
*/
3834 /* Iterate thread list for process
*/
3835 @
REQ(get_next_thread
)
3836 obj_handle_t process
; /* process handle
*/
3837 obj_handle_t last
; /* thread handle to start with
*/
3838 unsigned int access
; /* desired access for returned handle
*/
3839 unsigned int attributes
; /* returned handle attributes
*/
3840 unsigned int flags
; /* controls iteration direction
*/
3842 obj_handle_t handle
; /* next thread handle
*/