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
];
478 enum select_op op
; /* SELECT_SIGNAL_AND_WAIT
*/
480 obj_handle_t signal
; /* must be last in the structure so we can remove it on retries
*/
484 enum select_op op
; /* SELECT_KEYED_EVENT_WAIT or SELECT_KEYED_EVENT_RELEASE
*/
496 APC_VIRTUAL_ALLOC_EX
,
511 enum apc_type type
; /* APC_USER
*/
513 client_ptr_t func
; /* void (__stdcall
*func
)(ULONG_PTR
,ULONG_PTR
,ULONG_PTR
); */
514 apc_param_t args
[3]; /* arguments for user function
*/
523 enum apc_type type
; /* APC_ASYNC_IO
*/
524 unsigned int status
; /* I
/O status
*/
525 client_ptr_t user
; /* user pointer
*/
526 client_ptr_t sb
; /* status block
*/
527 data_size_t result
; /* result size
*/
531 enum apc_type type
; /* APC_VIRTUAL_ALLOC
*/
532 unsigned int op_type
; /* type of operation
*/
533 client_ptr_t addr
; /* requested address
*/
534 mem_size_t size
; /* allocation size
*/
535 mem_size_t zero_bits
; /* number of zero high bits
*/
536 unsigned int prot
; /* memory protection flags
*/
540 enum apc_type type
; /* APC_VIRTUAL_ALLOC
*/
541 unsigned int op_type
; /* type of operation
*/
542 client_ptr_t addr
; /* requested address
*/
543 mem_size_t size
; /* allocation size
*/
544 mem_size_t limit
; /* allocation address limit
*/
545 mem_size_t align
; /* allocation alignment
*/
546 unsigned int prot
; /* memory protection flags
*/
547 unsigned int attributes
; /* memory extended attributes
*/
551 enum apc_type type
; /* APC_VIRTUAL_FREE
*/
552 unsigned int op_type
; /* type of operation
*/
553 client_ptr_t addr
; /* requested address
*/
554 mem_size_t size
; /* allocation size
*/
558 enum apc_type type
; /* APC_VIRTUAL_QUERY
*/
560 client_ptr_t addr
; /* requested address
*/
564 enum apc_type type
; /* APC_VIRTUAL_PROTECT
*/
565 unsigned int prot
; /* new protection flags
*/
566 client_ptr_t addr
; /* requested address
*/
567 mem_size_t size
; /* requested size
*/
571 enum apc_type type
; /* APC_VIRTUAL_FLUSH
*/
573 client_ptr_t addr
; /* requested address
*/
574 mem_size_t size
; /* requested size
*/
578 enum apc_type type
; /* APC_VIRTUAL_LOCK
*/
580 client_ptr_t addr
; /* requested address
*/
581 mem_size_t size
; /* requested size
*/
585 enum apc_type type
; /* APC_VIRTUAL_UNLOCK
*/
587 client_ptr_t addr
; /* requested address
*/
588 mem_size_t size
; /* requested size
*/
592 enum apc_type type
; /* APC_MAP_VIEW
*/
593 obj_handle_t handle
; /* mapping handle
*/
594 client_ptr_t addr
; /* requested address
*/
595 mem_size_t size
; /* allocation size
*/
596 file_pos_t offset
; /* file offset
*/
597 mem_size_t zero_bits
; /* number of zero high bits
*/
598 unsigned int alloc_type
; /* allocation type
*/
599 unsigned int prot
; /* memory protection flags
*/
603 enum apc_type type
; /* APC_UNMAP_VIEW
*/
605 client_ptr_t addr
; /* view address
*/
609 enum apc_type type
; /* APC_CREATE_THREAD
*/
610 unsigned int flags
; /* creation flags
*/
611 client_ptr_t func
; /* void (__stdcall
*func
)(void*)
; start function
*/
612 client_ptr_t arg
; /* argument for start function
*/
613 mem_size_t zero_bits
; /* number of zero high bits for thread stack
*/
614 mem_size_t reserve
; /* reserve size for thread stack
*/
615 mem_size_t commit
; /* commit size for thread stack
*/
619 enum apc_type type
; /* APC_DUP_HANDLE
*/
620 obj_handle_t src_handle
; /* src handle to duplicate
*/
621 obj_handle_t dst_process
; /* dst process handle
*/
622 unsigned int access
; /* wanted access rights
*/
623 unsigned int attributes
; /* object attributes
*/
624 unsigned int options
; /* duplicate options
*/
633 enum apc_type type
; /* APC_ASYNC_IO
*/
634 unsigned int status
; /* new status of async operation
*/
635 unsigned int total
; /* bytes transferred
*/
639 enum apc_type type
; /* APC_VIRTUAL_ALLOC
*/
640 unsigned int status
; /* status returned by call
*/
641 client_ptr_t addr
; /* resulting address
*/
642 mem_size_t size
; /* resulting size
*/
646 enum apc_type type
; /* APC_VIRTUAL_ALLOC
*/
647 unsigned int status
; /* status returned by call
*/
648 client_ptr_t addr
; /* resulting address
*/
649 mem_size_t size
; /* resulting size
*/
653 enum apc_type type
; /* APC_VIRTUAL_FREE
*/
654 unsigned int status
; /* status returned by call
*/
655 client_ptr_t addr
; /* resulting address
*/
656 mem_size_t size
; /* resulting size
*/
660 enum apc_type type
; /* APC_VIRTUAL_QUERY
*/
661 unsigned int status
; /* status returned by call
*/
662 client_ptr_t base
; /* resulting base address
*/
663 client_ptr_t alloc_base
;/* resulting allocation base
*/
664 mem_size_t size
; /* resulting region size
*/
665 unsigned short state
; /* resulting region state
*/
666 unsigned short prot
; /* resulting region protection
*/
667 unsigned short alloc_prot
;/* resulting allocation protection
*/
668 unsigned short alloc_type
;/* resulting region allocation type
*/
672 enum apc_type type
; /* APC_VIRTUAL_PROTECT
*/
673 unsigned int status
; /* status returned by call
*/
674 client_ptr_t addr
; /* resulting address
*/
675 mem_size_t size
; /* resulting size
*/
676 unsigned int prot
; /* old protection flags
*/
680 enum apc_type type
; /* APC_VIRTUAL_FLUSH
*/
681 unsigned int status
; /* status returned by call
*/
682 client_ptr_t addr
; /* resulting address
*/
683 mem_size_t size
; /* resulting size
*/
687 enum apc_type type
; /* APC_VIRTUAL_LOCK
*/
688 unsigned int status
; /* status returned by call
*/
689 client_ptr_t addr
; /* resulting address
*/
690 mem_size_t size
; /* resulting size
*/
694 enum apc_type type
; /* APC_VIRTUAL_UNLOCK
*/
695 unsigned int status
; /* status returned by call
*/
696 client_ptr_t addr
; /* resulting address
*/
697 mem_size_t size
; /* resulting size
*/
701 enum apc_type type
; /* APC_MAP_VIEW
*/
702 unsigned int status
; /* status returned by call
*/
703 client_ptr_t addr
; /* resulting address
*/
704 mem_size_t size
; /* resulting size
*/
708 enum apc_type type
; /* APC_UNMAP_VIEW
*/
709 unsigned int status
; /* status returned by call
*/
713 enum apc_type type
; /* APC_CREATE_THREAD
*/
714 unsigned int status
; /* status returned by call
*/
715 process_id_t pid
; /* process id
*/
716 thread_id_t tid
; /* thread id
*/
717 client_ptr_t teb
; /* thread
teb (in process address space
) */
718 obj_handle_t handle
; /* handle to new thread
*/
722 enum apc_type type
; /* APC_DUP_HANDLE
*/
723 unsigned int status
; /* status returned by call
*/
724 obj_handle_t handle
; /* duplicated handle in dst process
*/
728 enum apc_type type
; /* APC_BREAK_PROCESS
*/
729 unsigned int status
; /* status returned by call
*/
749 enum irp_type type
; /* irp call type
*/
752 enum irp_type type
; /* IRP_CALL_CREATE
*/
753 unsigned int access
; /* access rights
*/
754 unsigned int sharing
; /* sharing flags
*/
755 unsigned int options
; /* file options
*/
756 client_ptr_t device
; /* opaque ptr for the device
*/
757 obj_handle_t file
; /* file handle
*/
761 enum irp_type type
; /* IRP_CALL_CLOSE
*/
763 client_ptr_t file
; /* opaque ptr for the file object
*/
767 enum irp_type type
; /* IRP_CALL_READ
*/
768 unsigned int key
; /* driver key
*/
769 data_size_t out_size
; /* needed output size
*/
771 client_ptr_t file
; /* opaque ptr for the file object
*/
772 file_pos_t pos
; /* file position
*/
776 enum irp_type type
; /* IRP_CALL_WRITE
*/
777 unsigned int key
; /* driver key
*/
778 client_ptr_t file
; /* opaque ptr for the file object
*/
779 file_pos_t pos
; /* file position
*/
783 enum irp_type type
; /* IRP_CALL_FLUSH
*/
785 client_ptr_t file
; /* opaque ptr for the file object
*/
789 enum irp_type type
; /* IRP_CALL_IOCTL
*/
790 ioctl_code_t code
; /* ioctl code
*/
791 data_size_t out_size
; /* needed output size
*/
793 client_ptr_t file
; /* opaque ptr for the file object
*/
797 enum irp_type type
; /* IRP_CALL_VOLUME
*/
798 unsigned int info_class
;/* information class
*/
799 data_size_t out_size
; /* needed output size
*/
801 client_ptr_t file
; /* opaque ptr for the file object
*/
805 enum irp_type type
; /* IRP_CALL_FREE
*/
807 client_ptr_t obj
; /* opaque ptr for the freed object
*/
811 enum irp_type type
; /* IRP_CALL_CANCEL
*/
813 client_ptr_t irp
; /* opaque ptr for canceled irp
*/
817 /* information about a PE image mapping
, roughly equivalent to SECTION_IMAGE_INFORMATION
*/
821 mem_size_t stack_size
;
822 mem_size_t stack_commit
;
823 unsigned int entry_point
;
824 unsigned int map_size
;
825 unsigned int zerobits
;
826 unsigned int subsystem
;
827 unsigned short subsystem_minor
;
828 unsigned short subsystem_major
;
829 unsigned short osversion_major
;
830 unsigned short osversion_minor
;
831 unsigned short image_charact
;
832 unsigned short dll_charact
;
833 unsigned short machine
;
834 unsigned char contains_code
;
835 unsigned char image_flags
;
836 unsigned int loader_flags
;
837 unsigned int header_size
;
838 unsigned int file_size
;
839 unsigned int checksum
;
840 unsigned int dbg_offset
;
841 unsigned int dbg_size
;
843 #define IMAGE_FLAGS_ComPlusNativeReady
0x01
844 #define IMAGE_FLAGS_ComPlusILOnly
0x02
845 #define IMAGE_FLAGS_ImageDynamicallyRelocated
0x04
846 #define IMAGE_FLAGS_ImageMappedFlat
0x08
847 #define IMAGE_FLAGS_BaseBelow4gb
0x10
848 #define IMAGE_FLAGS_ComPlusPrefer32bit
0x20
849 #define IMAGE_FLAGS_WineBuiltin
0x40
850 #define IMAGE_FLAGS_WineFakeDll
0x80
852 struct rawinput_device
854 unsigned short usage_page
;
855 unsigned short usage
;
857 user_handle_t target
;
869 /****************************************************************/
870 /* Request declarations
*/
872 /* Create a new process from the context of the parent
*/
874 obj_handle_t token
; /* process token
*/
875 obj_handle_t debug
; /* process debug object
*/
876 obj_handle_t parent_process
; /* parent process
*/
877 unsigned int flags
; /* process creation flags
*/
878 int socket_fd
; /* file descriptor for process socket
*/
879 unsigned int access
; /* access rights for process object
*/
880 unsigned short machine
; /* architecture that the new process will use
*/
881 data_size_t info_size
; /* size of startup info
*/
882 data_size_t handles_size
; /* length of explicit handles list
*/
883 data_size_t jobs_size
; /* length of jobs list
*/
884 VARARG(objattr
,object_attributes
); /* object attributes
*/
885 VARARG(handles
,uints
,handles_size
); /* handles list
*/
886 VARARG(jobs
,uints
,jobs_size
); /* jobs list
*/
887 VARARG(info
,startup_info
,info_size
); /* startup information
*/
888 VARARG(env
,unicode_str
); /* environment for new process
*/
890 obj_handle_t info
; /* new process info handle
*/
891 process_id_t pid
; /* process id
*/
892 obj_handle_t handle
; /* process
handle (in the current process
) */
896 /* Retrieve information about a newly started process
*/
897 @
REQ(get_new_process_info
)
898 obj_handle_t info
; /* info handle returned from new_process_request
*/
900 int success
; /* did the process start successfully?
*/
901 int exit_code
; /* process exit code if failed
*/
905 /* Create a new thread
*/
907 obj_handle_t process
; /* process in which to create thread
*/
908 unsigned int access
; /* wanted access rights
*/
909 unsigned int flags
; /* thread creation flags
*/
910 int request_fd
; /* fd for request pipe
*/
911 VARARG(objattr
,object_attributes
); /* object attributes
*/
913 thread_id_t tid
; /* thread id
*/
914 obj_handle_t handle
; /* thread
handle (in the current process
) */
918 /* Retrieve the new process startup info
*/
919 @
REQ(get_startup_info
)
921 data_size_t info_size
; /* size of startup info
*/
922 VARARG(info
,startup_info
,info_size
); /* startup information
*/
923 VARARG(env
,unicode_str
); /* environment
*/
927 /* Signal the end of the process initialization
*/
928 @
REQ(init_process_done
)
929 client_ptr_t teb
; /* TEB of new
thread (in process address space
) */
930 client_ptr_t peb
; /* PEB of new
process (in process address space
) */
931 client_ptr_t ldt_copy
; /* address of LDT
copy (in process address space
) */
933 client_ptr_t entry
; /* process entry point
*/
934 int suspend
; /* is process suspended?
*/
938 /* Initialize the first thread of a new process
*/
939 @
REQ(init_first_thread
)
940 int unix_pid
; /* Unix pid of new process
*/
941 int unix_tid
; /* Unix tid of new thread
*/
942 int debug_level
; /* new debug level
*/
943 int reply_fd
; /* fd for reply pipe
*/
944 int wait_fd
; /* fd for blocking calls pipe
*/
946 process_id_t pid
; /* process id of the new thread
's process */
947 thread_id_t tid; /* thread id of the new thread */
948 timeout_t server_start; /* server start time */
949 unsigned int session_id; /* process session id */
950 data_size_t info_size; /* total size of startup info */
951 VARARG(machines,ushorts); /* array of supported machines */
955 /* Initialize a new thread; called from the child after pthread_create() */
957 int unix_tid; /* Unix tid of new thread */
958 int reply_fd; /* fd for reply pipe */
959 int wait_fd; /* fd for blocking calls pipe */
960 client_ptr_t teb; /* TEB of new thread (in thread address space) */
961 client_ptr_t entry; /* entry point (in thread address space) */
963 int suspend; /* is thread suspended? */
967 /* Terminate a process */
968 @REQ(terminate_process)
969 obj_handle_t handle; /* process handle to terminate */
970 int exit_code; /* process exit code */
972 int self; /* suicide? */
976 /* Terminate a thread */
977 @REQ(terminate_thread)
978 obj_handle_t handle; /* thread handle to terminate */
979 int exit_code; /* thread exit code */
981 int self; /* suicide? */
985 /* Retrieve information about a process */
986 @REQ(get_process_info)
987 obj_handle_t handle; /* process handle */
989 process_id_t pid; /* server process id */
990 process_id_t ppid; /* server process id of parent */
991 affinity_t affinity; /* process affinity mask */
992 client_ptr_t peb; /* PEB address in process address space */
993 timeout_t start_time; /* process start time */
994 timeout_t end_time; /* process end time */
995 unsigned int session_id; /* process session id */
996 int exit_code; /* process exit code */
997 int priority; /* priority class */
998 unsigned short machine; /* process architecture */
999 VARARG(image,pe_image_info); /* image info for main exe */
1003 /* Retrieve debug information about a process */
1004 @REQ(get_process_debug_info)
1005 obj_handle_t handle; /* process handle */
1007 obj_handle_t debug; /* handle to debug port */
1008 int debug_children; /* inherit debugger to child processes */
1009 VARARG(image,pe_image_info); /* image info for main exe */
1013 /* Fetch the name of the process image */
1014 @REQ(get_process_image_name)
1015 obj_handle_t handle; /* process handle */
1016 int win32; /* return a win32 filename? */
1018 data_size_t len; /* len in bytes required to store filename */
1019 VARARG(name,unicode_str); /* image name for main exe */
1023 /* Retrieve information about a process memory usage */
1024 @REQ(get_process_vm_counters)
1025 obj_handle_t handle; /* process handle */
1027 mem_size_t peak_virtual_size; /* peak virtual memory in bytes */
1028 mem_size_t virtual_size; /* virtual memory in bytes */
1029 mem_size_t peak_working_set_size; /* peak real memory in bytes */
1030 mem_size_t working_set_size; /* real memory in bytes */
1031 mem_size_t pagefile_usage; /* commit charge in bytes */
1032 mem_size_t peak_pagefile_usage; /* peak commit charge in bytes */
1036 /* Set a process information */
1037 @REQ(set_process_info)
1038 obj_handle_t handle; /* process handle */
1039 int mask; /* setting mask (see below) */
1040 int priority; /* priority class */
1041 affinity_t affinity; /* affinity mask */
1043 #define SET_PROCESS_INFO_PRIORITY 0x01
1044 #define SET_PROCESS_INFO_AFFINITY 0x02
1047 /* Retrieve information about a thread */
1048 @REQ(get_thread_info)
1049 obj_handle_t handle; /* thread handle */
1050 unsigned int access; /* required access rights */
1052 process_id_t pid; /* server process id */
1053 thread_id_t tid; /* server thread id */
1054 client_ptr_t teb; /* thread teb pointer */
1055 client_ptr_t entry_point; /* thread entry point */
1056 affinity_t affinity; /* thread affinity mask */
1057 int exit_code; /* thread exit code */
1058 int priority; /* thread priority level */
1059 int last; /* last thread in process */
1060 int suspend_count; /* thread suspend count */
1061 int dbg_hidden; /* thread hidden from debugger */
1062 data_size_t desc_len; /* description length in bytes */
1063 VARARG(desc,unicode_str); /* description string */
1067 /* Retrieve information about thread times */
1068 @REQ(get_thread_times)
1069 obj_handle_t handle; /* thread handle */
1071 timeout_t creation_time; /* thread creation time */
1072 timeout_t exit_time; /* thread exit time */
1073 int unix_pid; /* thread native pid */
1074 int unix_tid; /* thread native pid */
1078 /* Set a thread information */
1079 @REQ(set_thread_info)
1080 obj_handle_t handle; /* thread handle */
1081 int mask; /* setting mask (see below) */
1082 int priority; /* priority class */
1083 affinity_t affinity; /* affinity mask */
1084 client_ptr_t entry_point; /* thread entry point */
1085 obj_handle_t token; /* impersonation token */
1086 VARARG(desc,unicode_str); /* description string */
1088 #define SET_THREAD_INFO_PRIORITY 0x01
1089 #define SET_THREAD_INFO_AFFINITY 0x02
1090 #define SET_THREAD_INFO_TOKEN 0x04
1091 #define SET_THREAD_INFO_ENTRYPOINT 0x08
1092 #define SET_THREAD_INFO_DESCRIPTION 0x10
1093 #define SET_THREAD_INFO_DBG_HIDDEN 0x20
1096 /* Suspend a thread */
1097 @REQ(suspend_thread)
1098 obj_handle_t handle; /* thread handle */
1100 int count; /* new suspend count */
1104 /* Resume a thread */
1106 obj_handle_t handle; /* thread handle */
1108 int count; /* new suspend count */
1112 /* Queue an APC for a thread or process */
1114 obj_handle_t handle; /* thread or process handle */
1115 apc_call_t call; /* call arguments */
1117 obj_handle_t handle; /* APC handle */
1118 int self; /* run APC in caller itself? */
1122 /* Get the result of an APC call */
1123 @REQ(get_apc_result)
1124 obj_handle_t handle; /* handle to the APC */
1126 apc_result_t result; /* result of the APC */
1130 /* Close a handle for the current process */
1132 obj_handle_t handle; /* handle to close */
1136 /* Set a handle information */
1137 @REQ(set_handle_info)
1138 obj_handle_t handle; /* handle we are interested in */
1139 int flags; /* new handle flags */
1140 int mask; /* mask for flags to set */
1142 int old_flags; /* old flag value */
1146 /* Duplicate a handle */
1148 obj_handle_t src_process; /* src process handle */
1149 obj_handle_t src_handle; /* src handle to duplicate */
1150 obj_handle_t dst_process; /* dst process handle */
1151 unsigned int access; /* wanted access rights */
1152 unsigned int attributes; /* object attributes */
1153 unsigned int options; /* duplicate options */
1155 obj_handle_t handle; /* duplicated handle in dst process */
1159 /* Test if two handles refer to the same object */
1160 @REQ(compare_objects)
1161 obj_handle_t first; /* first object handle */
1162 obj_handle_t second; /* second object handle */
1166 /* Make an object temporary */
1167 @REQ(make_temporary)
1168 obj_handle_t handle; /* handle to the object */
1172 /* Open a handle to a process */
1174 process_id_t pid; /* process id to open */
1175 unsigned int access; /* wanted access rights */
1176 unsigned int attributes; /* object attributes */
1178 obj_handle_t handle; /* handle to the process */
1182 /* Open a handle to a thread */
1184 thread_id_t tid; /* thread id to open */
1185 unsigned int access; /* wanted access rights */
1186 unsigned int attributes; /* object attributes */
1188 obj_handle_t handle; /* handle to the thread */
1192 /* Wait for handles */
1194 int flags; /* wait flags (see below) */
1195 client_ptr_t cookie; /* magic cookie to return to client */
1196 abstime_t timeout; /* timeout */
1197 data_size_t size; /* size of select_op */
1198 obj_handle_t prev_apc; /* handle to previous APC */
1199 VARARG(result,apc_result); /* result of previous APC */
1200 VARARG(data,select_op,size); /* operation-specific data */
1201 VARARG(contexts,contexts); /* suspend context(s) */
1203 apc_call_t call; /* APC call arguments */
1204 obj_handle_t apc_handle; /* handle to next APC */
1205 int signaled; /* were the handles immediately signaled? */
1206 VARARG(contexts,contexts); /* suspend context(s) */
1208 #define SELECT_ALERTABLE 1
1209 #define SELECT_INTERRUPTIBLE 2
1212 /* Create an event */
1214 unsigned int access; /* wanted access rights */
1215 int manual_reset; /* manual reset event */
1216 int initial_state; /* initial state of the event */
1217 VARARG(objattr,object_attributes); /* object attributes */
1219 obj_handle_t handle; /* handle to the event */
1222 /* Event operation */
1224 obj_handle_t handle; /* handle to event */
1225 int op; /* event operation (see below) */
1227 int state; /* previous state */
1229 enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT };
1232 obj_handle_t handle; /* handle to event */
1234 int manual_reset; /* manual reset event */
1235 int state; /* current state of the event */
1240 unsigned int access; /* wanted access rights */
1241 unsigned int attributes; /* object attributes */
1242 obj_handle_t rootdir; /* root directory */
1243 VARARG(name,unicode_str); /* object name */
1245 obj_handle_t handle; /* handle to the event */
1249 /* Create a keyed event */
1250 @REQ(create_keyed_event)
1251 unsigned int access; /* wanted access rights */
1252 VARARG(objattr,object_attributes); /* object attributes */
1254 obj_handle_t handle; /* handle to the event */
1257 /* Open a keyed event */
1258 @REQ(open_keyed_event)
1259 unsigned int access; /* wanted access rights */
1260 unsigned int attributes; /* object attributes */
1261 obj_handle_t rootdir; /* root directory */
1262 VARARG(name,unicode_str); /* object name */
1264 obj_handle_t handle; /* handle to the event */
1268 /* Create a mutex */
1270 unsigned int access; /* wanted access rights */
1271 int owned; /* initially owned? */
1272 VARARG(objattr,object_attributes); /* object attributes */
1274 obj_handle_t handle; /* handle to the mutex */
1278 /* Release a mutex */
1280 obj_handle_t handle; /* handle to the mutex */
1282 unsigned int prev_count; /* value of internal counter, before release */
1288 unsigned int access; /* wanted access rights */
1289 unsigned int attributes; /* object attributes */
1290 obj_handle_t rootdir; /* root directory */
1291 VARARG(name,unicode_str); /* object name */
1293 obj_handle_t handle; /* handle to the mutex */
1299 obj_handle_t handle; /* handle to mutex */
1301 unsigned int count; /* current count of mutex */
1302 int owned; /* true if owned by current thread */
1303 int abandoned; /* true if abandoned */
1307 /* Create a semaphore */
1308 @REQ(create_semaphore)
1309 unsigned int access; /* wanted access rights */
1310 unsigned int initial; /* initial count */
1311 unsigned int max; /* maximum count */
1312 VARARG(objattr,object_attributes); /* object attributes */
1314 obj_handle_t handle; /* handle to the semaphore */
1318 /* Release a semaphore */
1319 @REQ(release_semaphore)
1320 obj_handle_t handle; /* handle to the semaphore */
1321 unsigned int count; /* count to add to semaphore */
1323 unsigned int prev_count; /* previous semaphore count */
1326 @REQ(query_semaphore)
1327 obj_handle_t handle; /* handle to the semaphore */
1329 unsigned int current; /* current count */
1330 unsigned int max; /* maximum count */
1333 /* Open a semaphore */
1334 @REQ(open_semaphore)
1335 unsigned int access; /* wanted access rights */
1336 unsigned int attributes; /* object attributes */
1337 obj_handle_t rootdir; /* root directory */
1338 VARARG(name,unicode_str); /* object name */
1340 obj_handle_t handle; /* handle to the semaphore */
1346 unsigned int access; /* wanted access rights */
1347 unsigned int sharing; /* sharing flags */
1348 int create; /* file create action */
1349 unsigned int options; /* file options */
1350 unsigned int attrs; /* file attributes for creation */
1351 VARARG(objattr,object_attributes); /* object attributes */
1352 VARARG(filename,string); /* file name */
1354 obj_handle_t handle; /* handle to the file */
1358 /* Open a file object */
1359 @REQ(open_file_object)
1360 unsigned int access; /* wanted access rights */
1361 unsigned int attributes; /* open attributes */
1362 obj_handle_t rootdir; /* root directory */
1363 unsigned int sharing; /* sharing flags */
1364 unsigned int options; /* file options */
1365 VARARG(filename,unicode_str); /* file name */
1367 obj_handle_t handle; /* handle to the file */
1371 /* Allocate a file handle for a Unix fd */
1372 @REQ(alloc_file_handle)
1373 unsigned int access; /* wanted access rights */
1374 unsigned int attributes; /* object attributes */
1375 int fd; /* file descriptor on the client side */
1377 obj_handle_t handle; /* handle to the file */
1381 /* Get the Unix name from a file handle */
1382 @REQ(get_handle_unix_name)
1383 obj_handle_t handle; /* file handle */
1385 data_size_t name_len; /* unix name length */
1386 VARARG(name,string); /* unix name */
1390 /* Get a Unix fd to access a file */
1392 obj_handle_t handle; /* handle to the file */
1394 int type; /* file type (see below) */
1395 int cacheable; /* can fd be cached in the client? */
1396 unsigned int access; /* file access rights */
1397 unsigned int options; /* file open options */
1401 FD_TYPE_INVALID, /* invalid file (no associated fd) */
1402 FD_TYPE_FILE, /* regular file */
1403 FD_TYPE_DIR, /* directory */
1404 FD_TYPE_SOCKET, /* socket */
1405 FD_TYPE_SERIAL, /* serial port */
1406 FD_TYPE_PIPE, /* named pipe */
1407 FD_TYPE_MAILSLOT, /* mailslot */
1408 FD_TYPE_CHAR, /* unspecified char device */
1409 FD_TYPE_DEVICE, /* Windows device file */
1414 /* Retrieve (or allocate) the client-side directory cache entry */
1415 @REQ(get_directory_cache_entry)
1416 obj_handle_t handle; /* handle to the directory */
1418 int entry; /* cache entry on the client side */
1419 VARARG(free,ints); /* entries that can be freed */
1423 /* Flush a file buffers */
1425 async_data_t async; /* async I/O parameters */
1427 obj_handle_t event; /* event set when finished */
1430 /* Query file information */
1432 obj_handle_t handle; /* handle to the file */
1433 unsigned int info_class; /* queried information class */
1435 VARARG(data,bytes); /* file info data */
1438 /* Query volume information */
1439 @REQ(get_volume_info)
1440 obj_handle_t handle; /* handle to the file */
1441 async_data_t async; /* async I/O parameters */
1442 unsigned int info_class; /* queried information class */
1444 obj_handle_t wait; /* handle to wait on for blocking read */
1445 VARARG(data,bytes); /* volume info data */
1448 /* Lock a region of a file */
1450 obj_handle_t handle; /* handle to the file */
1451 file_pos_t offset; /* offset of start of lock */
1452 file_pos_t count; /* count of bytes to lock */
1453 int shared; /* shared or exclusive lock? */
1454 int wait; /* do we want to wait? */
1456 obj_handle_t handle; /* handle to wait on */
1457 int overlapped; /* is it an overlapped I/O handle? */
1461 /* Unlock a region of a file */
1463 obj_handle_t handle; /* handle to the file */
1464 file_pos_t offset; /* offset of start of unlock */
1465 file_pos_t count; /* count of bytes to unlock */
1469 /* Perform a recv on a socket */
1471 int oob; /* are we receiving OOB data? */
1472 async_data_t async; /* async I/O parameters */
1473 int force_async; /* Force asynchronous mode? */
1475 obj_handle_t wait; /* handle to wait on for blocking recv */
1476 unsigned int options; /* device open options */
1477 int nonblocking; /* is socket non-blocking? */
1481 /* Perform a send on a socket */
1483 async_data_t async; /* async I/O parameters */
1484 int force_async; /* Force asynchronous mode? */
1486 obj_handle_t wait; /* handle to wait on for blocking send */
1487 unsigned int options; /* device open options */
1488 int nonblocking; /* is socket non-blocking? */
1492 /* Store ICMP id for ICMP over datagram fixup */
1493 @REQ(socket_send_icmp_id)
1494 obj_handle_t handle; /* socket handle */
1495 unsigned short icmp_id; /* ICMP packet id */
1496 unsigned short icmp_seq; /* ICMP packed sequence */
1501 /* Get ICMP id for ICMP over datagram fixup */
1502 @REQ(socket_get_icmp_id)
1503 obj_handle_t handle; /* socket handle */
1504 unsigned short icmp_seq; /* ICMP packed sequence */
1506 unsigned short icmp_id; /* ICMP packet id */
1510 /* Retrieve the next pending console ioctl request */
1511 @REQ(get_next_console_request)
1512 obj_handle_t handle; /* console server handle */
1513 int signal; /* server signal state */
1514 int read; /* 1 if reporting result of blocked read ioctl */
1515 unsigned int status; /* status of previous ioctl */
1516 VARARG(out_data,bytes); /* out_data of previous ioctl */
1518 unsigned int code; /* ioctl code */
1519 unsigned int output; /* output id or 0 for input */
1520 data_size_t out_size; /* ioctl output size */
1521 VARARG(in_data,bytes); /* ioctl in_data */
1525 /* enable directory change notifications */
1526 @REQ(read_directory_changes)
1527 unsigned int filter; /* notification filter */
1528 int subtree; /* watch the subtree? */
1529 int want_data; /* flag indicating whether change data should be collected */
1530 async_data_t async; /* async I/O parameters */
1535 obj_handle_t handle;
1537 VARARG(events,filesystem_event); /* collected filesystem events */
1541 /* Create a file mapping */
1542 @REQ(create_mapping)
1543 unsigned int access; /* wanted access rights */
1544 unsigned int flags; /* SEC_* flags */
1545 unsigned int file_access; /* file access rights */
1546 mem_size_t size; /* mapping size */
1547 obj_handle_t file_handle; /* file handle */
1548 VARARG(objattr,object_attributes); /* object attributes */
1550 obj_handle_t handle; /* handle to the mapping */
1554 /* Open a mapping */
1556 unsigned int access; /* wanted access rights */
1557 unsigned int attributes; /* object attributes */
1558 obj_handle_t rootdir; /* root directory */
1559 VARARG(name,unicode_str); /* object name */
1561 obj_handle_t handle; /* handle to the mapping */
1565 /* Get information about a file mapping */
1566 @REQ(get_mapping_info)
1567 obj_handle_t handle; /* handle to the mapping */
1568 unsigned int access; /* wanted access rights */
1570 mem_size_t size; /* mapping size */
1571 unsigned int flags; /* SEC_* flags */
1572 obj_handle_t shared_file; /* shared mapping file handle */
1573 data_size_t total; /* total required buffer size in bytes */
1574 VARARG(image,pe_image_info);/* image info for SEC_IMAGE mappings */
1575 VARARG(name,unicode_str); /* filename for SEC_IMAGE mappings */
1579 /* Add a memory view in the current process */
1581 obj_handle_t mapping; /* file mapping handle, or 0 for .so builtin */
1582 unsigned int access; /* wanted access rights */
1583 client_ptr_t base; /* view base address (page-aligned) */
1584 mem_size_t size; /* view size */
1585 file_pos_t start; /* start offset in mapping */
1586 VARARG(image,pe_image_info);/* image info for .so builtins */
1587 VARARG(name,unicode_str); /* image filename for .so builtins */
1591 /* Unmap a memory view from the current process */
1593 client_ptr_t base; /* view base address */
1597 /* Get a range of committed pages in a file mapping */
1598 @REQ(get_mapping_committed_range)
1599 client_ptr_t base; /* view base address */
1600 file_pos_t offset; /* starting offset (page-aligned, in bytes) */
1602 mem_size_t size; /* size of range starting at offset (page-aligned, in bytes) */
1603 int committed; /* whether it is a committed range */
1607 /* Add a range to the committed pages in a file mapping */
1608 @REQ(add_mapping_committed_range)
1609 client_ptr_t base; /* view base address */
1610 file_pos_t offset; /* starting offset (page-aligned, in bytes) */
1611 mem_size_t size; /* size to set (page-aligned, in bytes) or 0 if only retrieving */
1615 /* Check if two memory maps are for the same file */
1616 @REQ(is_same_mapping)
1617 client_ptr_t base1; /* first view base address */
1618 client_ptr_t base2; /* second view base address */
1622 /* Get the filename of a mapping */
1623 @REQ(get_mapping_filename)
1624 obj_handle_t process; /* process handle */
1625 client_ptr_t addr; /* address inside mapped view (in process address space) */
1627 data_size_t len; /* total filename length in bytes */
1628 VARARG(filename,unicode_str); /* filename in NT format */
1634 timeout_t start_time;
1637 int current_priority;
1640 client_ptr_t entry_point;
1645 timeout_t start_time;
1646 data_size_t name_len;
1650 process_id_t parent_pid;
1651 unsigned int session_id;
1654 /* VARARG(name,unicode_str,name_len); */
1655 /* VARARG(threads,struct thread_info,thread_count); */
1658 /* Get a list of processes and threads currently running */
1659 @REQ(list_processes)
1661 data_size_t info_size;
1663 int total_thread_count;
1664 data_size_t total_name_len;
1665 VARARG(data,process_info,info_size);
1669 /* Create a debug object */
1670 @REQ(create_debug_obj)
1671 unsigned int access; /* wanted access rights */
1672 unsigned int flags; /* object flags */
1673 VARARG(objattr,object_attributes); /* object attributes */
1675 obj_handle_t handle; /* handle to the debug object */
1679 /* Wait for a debug event */
1680 @REQ(wait_debug_event)
1681 obj_handle_t debug; /* debug object */
1683 process_id_t pid; /* process id */
1684 thread_id_t tid; /* thread id */
1685 VARARG(event,debug_event); /* debug event data */
1689 /* Queue an exception event */
1690 @REQ(queue_exception_event)
1691 int first; /* first chance exception? */
1692 unsigned int code; /* exception code */
1693 unsigned int flags; /* exception flags */
1694 client_ptr_t record; /* exception record */
1695 client_ptr_t address; /* exception address */
1696 data_size_t len; /* size of parameters */
1697 VARARG(params,uints64,len);/* exception parameters */
1699 obj_handle_t handle; /* handle to the queued event */
1703 /* Retrieve the status of an exception event */
1704 @REQ(get_exception_status)
1705 obj_handle_t handle; /* handle to the queued event */
1709 /* Continue a debug event */
1710 @REQ(continue_debug_event)
1711 obj_handle_t debug; /* debug object */
1712 process_id_t pid; /* process id to continue */
1713 thread_id_t tid; /* thread id to continue */
1714 unsigned int status; /* continuation status */
1718 /* Start or stop debugging an existing process */
1720 obj_handle_t handle; /* process handle */
1721 obj_handle_t debug; /* debug object to attach to the process */
1722 int attach; /* 1=attaching / 0=detaching from the process */
1726 /* Set debug object information */
1727 @REQ(set_debug_obj_info)
1728 obj_handle_t debug; /* debug object */
1729 unsigned int flags; /* object flags */
1733 /* Read data from a process address space */
1734 @REQ(read_process_memory)
1735 obj_handle_t handle; /* process handle */
1736 client_ptr_t addr; /* addr to read from */
1738 VARARG(data,bytes); /* result data */
1742 /* Write data to a process address space */
1743 @REQ(write_process_memory)
1744 obj_handle_t handle; /* process handle */
1745 client_ptr_t addr; /* addr to write to */
1746 VARARG(data,bytes); /* data to write */
1750 /* Create a registry key */
1752 unsigned int access; /* desired access rights */
1753 unsigned int options; /* creation options */
1754 VARARG(objattr,object_attributes); /* object attributes */
1755 VARARG(class,unicode_str); /* class name */
1757 obj_handle_t hkey; /* handle to the created key */
1760 /* Open a registry key */
1762 obj_handle_t parent; /* handle to the parent key */
1763 unsigned int access; /* desired access rights */
1764 unsigned int attributes; /* object attributes */
1765 VARARG(name,unicode_str); /* key name */
1767 obj_handle_t hkey; /* handle to the open key */
1771 /* Delete a registry key */
1773 obj_handle_t hkey; /* handle to the key */
1777 /* Flush a registry key */
1779 obj_handle_t hkey; /* handle to the key */
1783 /* Enumerate registry subkeys */
1785 obj_handle_t hkey; /* handle to registry key */
1786 int index; /* index of subkey (or -1 for current key) */
1787 int info_class; /* requested information class */
1789 int subkeys; /* number of subkeys */
1790 int max_subkey; /* longest subkey name */
1791 int max_class; /* longest class name */
1792 int values; /* number of values */
1793 int max_value; /* longest value name */
1794 int max_data; /* longest value data */
1795 timeout_t modif; /* last modification time */
1796 data_size_t total; /* total length needed for full name and class */
1797 data_size_t namelen; /* length of key name in bytes */
1798 VARARG(name,unicode_str,namelen); /* key name */
1799 VARARG(class,unicode_str); /* class name */
1803 /* Set a value of a registry key */
1805 obj_handle_t hkey; /* handle to registry key */
1806 int type; /* value type */
1807 data_size_t namelen; /* length of value name in bytes */
1808 VARARG(name,unicode_str,namelen); /* value name */
1809 VARARG(data,bytes); /* value data */
1813 /* Retrieve the value of a registry key */
1815 obj_handle_t hkey; /* handle to registry key */
1816 VARARG(name,unicode_str); /* value name */
1818 int type; /* value type */
1819 data_size_t total; /* total length needed for data */
1820 VARARG(data,bytes); /* value data */
1824 /* Enumerate a value of a registry key */
1825 @REQ(enum_key_value)
1826 obj_handle_t hkey; /* handle to registry key */
1827 int index; /* value index */
1828 int info_class; /* requested information class */
1830 int type; /* value type */
1831 data_size_t total; /* total length needed for full name and data */
1832 data_size_t namelen; /* length of value name in bytes */
1833 VARARG(name,unicode_str,namelen); /* value name */
1834 VARARG(data,bytes); /* value data */
1838 /* Delete a value of a registry key */
1839 @REQ(delete_key_value)
1840 obj_handle_t hkey; /* handle to registry key */
1841 VARARG(name,unicode_str); /* value name */
1845 /* Load a registry branch from a file */
1847 obj_handle_t file; /* file to load from */
1848 VARARG(objattr,object_attributes); /* object attributes */
1852 /* UnLoad a registry branch from a file */
1853 @REQ(unload_registry)
1854 obj_handle_t parent; /* handle to the parent key */
1855 unsigned int attributes; /* object attributes */
1856 VARARG(name,unicode_str); /* key name */
1860 /* Save a registry branch to a file */
1862 obj_handle_t hkey; /* key to save */
1863 obj_handle_t file; /* file to save to */
1867 /* Add a registry key change notification */
1868 @REQ(set_registry_notification)
1869 obj_handle_t hkey; /* key to watch for changes */
1870 obj_handle_t event; /* event to set */
1871 int subtree; /* should we watch the whole subtree? */
1872 unsigned int filter; /* things to watch */
1876 /* Rename a registry key */
1878 obj_handle_t hkey; /* handle to the key to be renamed */
1879 VARARG(name,unicode_str); /* new name */
1883 /* Create a waitable timer */
1885 unsigned int access; /* wanted access rights */
1886 int manual; /* manual reset */
1887 VARARG(objattr,object_attributes); /* object attributes */
1889 obj_handle_t handle; /* handle to the timer */
1893 /* Open a waitable timer */
1895 unsigned int access; /* wanted access rights */
1896 unsigned int attributes; /* object attributes */
1897 obj_handle_t rootdir; /* root directory */
1898 VARARG(name,unicode_str); /* object name */
1900 obj_handle_t handle; /* handle to the timer */
1903 /* Set a waitable timer */
1905 obj_handle_t handle; /* handle to the timer */
1906 timeout_t expire; /* next expiration absolute time */
1907 client_ptr_t callback; /* callback function */
1908 client_ptr_t arg; /* callback argument */
1909 int period; /* timer period in ms */
1911 int signaled; /* was the timer signaled before this call ? */
1914 /* Cancel a waitable timer */
1916 obj_handle_t handle; /* handle to the timer */
1918 int signaled; /* was the timer signaled before this calltime ? */
1921 /* Get information on a waitable timer */
1922 @REQ(get_timer_info)
1923 obj_handle_t handle; /* handle to the timer */
1925 timeout_t when; /* absolute time when the timer next expires */
1926 int signaled; /* is the timer signaled? */
1930 /* Retrieve the current context of a thread */
1931 @REQ(get_thread_context)
1932 obj_handle_t handle; /* thread handle */
1933 obj_handle_t context; /* context handle */
1934 unsigned int flags; /* context flags */
1935 unsigned int native_flags; /* flags for native context if WoW present */
1936 unsigned short machine; /* context architecture */
1938 int self; /* was it a handle to the current thread? */
1939 obj_handle_t handle; /* pending context handle */
1940 VARARG(contexts,contexts); /* thread context(s) */
1944 /* Set the current context of a thread */
1945 @REQ(set_thread_context)
1946 obj_handle_t handle; /* thread handle */
1947 unsigned int native_flags; /* flags for native context if WoW present */
1948 VARARG(contexts,contexts); /* thread context(s) */
1950 int self; /* was it a handle to the current thread? */
1954 /* Fetch a selector entry for a thread */
1955 @REQ(get_selector_entry)
1956 obj_handle_t handle; /* thread handle */
1957 int entry; /* LDT entry */
1959 unsigned int base; /* selector base */
1960 unsigned int limit; /* selector limit */
1961 unsigned char flags; /* selector flags */
1967 VARARG(name,unicode_str); /* atom name */
1969 atom_t atom; /* resulting atom */
1973 /* Delete an atom */
1975 atom_t atom; /* atom handle */
1981 VARARG(name,unicode_str); /* atom name */
1983 atom_t atom; /* atom handle */
1987 /* Get information about an atom */
1988 @REQ(get_atom_information)
1989 atom_t atom; /* atom handle */
1991 int count; /* atom lock count */
1992 int pinned; /* whether the atom has been pinned */
1993 data_size_t total; /* actual length of atom name */
1994 VARARG(name,unicode_str); /* atom name */
1998 /* Get the message queue of the current thread */
2001 obj_handle_t handle; /* handle to the queue */
2005 /* Set the file descriptor associated to the current thread queue */
2007 obj_handle_t handle; /* handle to the file descriptor */
2011 /* Set the current message queue wakeup mask */
2012 @REQ(set_queue_mask)
2013 unsigned int wake_mask; /* wakeup bits mask */
2014 unsigned int changed_mask; /* changed bits mask */
2015 int skip_wait; /* will we skip waiting if signaled? */
2017 unsigned int wake_bits; /* current wake bits */
2018 unsigned int changed_bits; /* current changed bits */
2022 /* Get the current message queue status */
2023 @REQ(get_queue_status)
2024 unsigned int clear_bits; /* should we clear the change bits? */
2026 unsigned int wake_bits; /* wake bits */
2027 unsigned int changed_bits; /* changed bits since last time */
2031 /* Retrieve the process idle event */
2032 @REQ(get_process_idle_event)
2033 obj_handle_t handle; /* process handle */
2035 obj_handle_t event; /* handle to idle event */
2039 /* Send a message to a thread queue */
2041 thread_id_t id; /* thread id */
2042 int type; /* message type (see below) */
2043 int flags; /* message flags (see below) */
2044 user_handle_t win; /* window handle */
2045 unsigned int msg; /* message code */
2046 lparam_t wparam; /* parameters */
2047 lparam_t lparam; /* parameters */
2048 timeout_t timeout; /* timeout for reply */
2049 VARARG(data,message_data); /* message data for sent messages */
2052 @REQ(post_quit_message)
2053 int exit_code; /* exit code to return */
2058 MSG_ASCII, /* Ascii message (from SendMessageA) */
2059 MSG_UNICODE, /* Unicode message (from SendMessageW) */
2060 MSG_NOTIFY, /* notify message (from SendNotifyMessageW), always Unicode */
2061 MSG_CALLBACK, /* callback message (from SendMessageCallbackW), always Unicode */
2062 MSG_CALLBACK_RESULT,/* result of a callback message */
2063 MSG_OTHER_PROCESS, /* sent from other process, may include vararg data, always Unicode */
2064 MSG_POSTED, /* posted message (from PostMessageW), always Unicode */
2065 MSG_HARDWARE, /* hardware message */
2066 MSG_WINEVENT, /* winevent message */
2067 MSG_HOOK_LL /* low-level hardware hook */
2069 #define SEND_MSG_ABORT_IF_HUNG 0x01
2072 /* Send a hardware message to a thread queue */
2073 @REQ(send_hardware_message)
2074 user_handle_t win; /* window handle */
2075 hw_input_t input; /* input data */
2076 unsigned int flags; /* flags (see below) */
2077 VARARG(report,bytes); /* HID report data */
2079 int wait; /* do we need to wait for a reply? */
2080 int prev_x; /* previous cursor position */
2082 int new_x; /* new cursor position */
2085 #define SEND_HWMSG_INJECTED 0x01
2088 /* Get a message from the current queue */
2090 unsigned int flags; /* PM_* flags */
2091 user_handle_t get_win; /* window handle to get */
2092 unsigned int get_first; /* first message code to get */
2093 unsigned int get_last; /* last message code to get */
2094 unsigned int hw_id; /* id of the previous hardware message (or 0) */
2095 unsigned int wake_mask; /* wakeup bits mask */
2096 unsigned int changed_mask; /* changed bits mask */
2098 user_handle_t win; /* window handle */
2099 unsigned int msg; /* message code */
2100 lparam_t wparam; /* parameters */
2101 lparam_t lparam; /* parameters */
2102 int type; /* message type */
2103 int x; /* message x position */
2104 int y; /* message y position */
2105 unsigned int time; /* message time */
2106 unsigned int active_hooks; /* active hooks bitmap */
2107 data_size_t total; /* total size of extra data */
2108 VARARG(data,message_data); /* message data for sent messages */
2112 /* Reply to a sent message */
2114 int remove; /* should we remove the message? */
2115 lparam_t result; /* message result */
2116 VARARG(data,bytes); /* message data for sent messages */
2120 /* Accept and remove the current hardware message */
2121 @REQ(accept_hardware_message)
2122 unsigned int hw_id; /* id of the hardware message */
2126 /* Retrieve the reply for the last message sent */
2127 @REQ(get_message_reply)
2128 int cancel; /* cancel message if not ready? */
2130 lparam_t result; /* message result */
2131 VARARG(data,bytes); /* message data for sent messages */
2135 /* Set a window timer */
2137 user_handle_t win; /* window handle */
2138 unsigned int msg; /* message to post */
2139 unsigned int rate; /* timer rate in ms */
2140 lparam_t id; /* timer id */
2141 lparam_t lparam; /* message lparam (callback proc) */
2143 lparam_t id; /* timer id */
2147 /* Kill a window timer */
2148 @REQ(kill_win_timer)
2149 user_handle_t win; /* window handle */
2150 lparam_t id; /* timer id */
2151 unsigned int msg; /* message to post */
2155 /* check if the thread owning the window is hung */
2156 @REQ(is_window_hung)
2157 user_handle_t win; /* window handle */
2163 /* Retrieve info about a serial port */
2164 @REQ(get_serial_info)
2165 obj_handle_t handle; /* handle to comm port */
2168 unsigned int eventmask;
2169 unsigned int cookie;
2170 unsigned int pending_write;
2174 /* Set info about a serial port */
2175 @REQ(set_serial_info)
2176 obj_handle_t handle; /* handle to comm port */
2177 int flags; /* bitmask to set values (see below) */
2179 #define SERIALINFO_PENDING_WRITE 0x04
2180 #define SERIALINFO_PENDING_WAIT 0x08
2182 /* Cancel all sync io on a thread */
2184 obj_handle_t handle; /* thread handle on which to cancel io */
2185 client_ptr_t iosb; /* I/O status block (NULL=all) */
2188 /* Create an async I/O */
2189 @REQ(register_async)
2190 int type; /* type of queue to look after */
2191 async_data_t async; /* async I/O parameters */
2192 int count; /* count - usually # of bytes to be read/written */
2194 #define ASYNC_TYPE_READ 0x01
2195 #define ASYNC_TYPE_WRITE 0x02
2196 #define ASYNC_TYPE_WAIT 0x03
2199 /* Cancel all async op on a fd */
2201 obj_handle_t handle; /* handle to comm port, socket or file */
2202 client_ptr_t iosb; /* I/O status block (NULL=all) */
2203 int only_thread; /* cancel matching this thread */
2207 /* Retrieve results of an async */
2208 @REQ(get_async_result)
2209 client_ptr_t user_arg; /* user arg used to identify async */
2211 VARARG(out_data,bytes); /* iosb output data */
2215 /* Notify direct completion of async and close the wait handle if not blocking */
2216 @REQ(set_async_direct_result)
2217 obj_handle_t handle; /* wait handle */
2218 apc_param_t information; /* IO_STATUS_BLOCK Information */
2219 unsigned int status; /* completion status */
2220 int mark_pending; /* set async to pending before completion? */
2222 obj_handle_t handle; /* wait handle, or NULL if closed */
2226 /* Perform a read on a file object */
2228 async_data_t async; /* async I/O parameters */
2229 file_pos_t pos; /* read position */
2231 obj_handle_t wait; /* handle to wait on for blocking read */
2232 unsigned int options; /* device open options */
2233 VARARG(data,bytes); /* read data */
2237 /* Perform a write on a file object */
2239 async_data_t async; /* async I/O parameters */
2240 file_pos_t pos; /* write position */
2241 VARARG(data,bytes); /* write data */
2243 obj_handle_t wait; /* handle to wait on for blocking write */
2244 unsigned int options; /* device open options */
2245 data_size_t size; /* size written */
2249 /* Perform an ioctl on a file */
2251 ioctl_code_t code; /* ioctl code */
2252 async_data_t async; /* async I/O parameters */
2253 VARARG(in_data,bytes); /* ioctl input data */
2255 obj_handle_t wait; /* handle to wait on for blocking ioctl */
2256 unsigned int options; /* device open options */
2257 VARARG(out_data,bytes); /* ioctl output data */
2261 /* Store results of an async irp */
2262 @REQ(set_irp_result)
2263 obj_handle_t handle; /* handle to the irp */
2264 unsigned int status; /* status of the irp */
2265 data_size_t size; /* result size (input or output depending on the operation) */
2266 VARARG(data,bytes); /* output data of the irp */
2270 /* Create a named pipe */
2271 @REQ(create_named_pipe)
2272 unsigned int access;
2273 unsigned int options;
2274 unsigned int sharing;
2275 unsigned int disposition;
2276 unsigned int maxinstances;
2277 unsigned int outsize;
2278 unsigned int insize;
2281 VARARG(objattr,object_attributes); /* object attributes */
2283 obj_handle_t handle; /* handle to the pipe */
2287 /* flags in create_named_pipe and get_named_pipe_info */
2288 #define NAMED_PIPE_MESSAGE_STREAM_WRITE 0x0001
2289 #define NAMED_PIPE_MESSAGE_STREAM_READ 0x0002
2290 #define NAMED_PIPE_NONBLOCKING_MODE 0x0004
2291 #define NAMED_PIPE_SERVER_END 0x8000
2293 /* Set named pipe information by handle */
2294 @REQ(set_named_pipe_info)
2295 obj_handle_t handle;
2299 /* Create a window */
2301 user_handle_t parent; /* parent window */
2302 user_handle_t owner; /* owner window */
2303 atom_t atom; /* class atom */
2304 mod_handle_t instance; /* module instance */
2305 int dpi; /* system DPI */
2306 int awareness; /* thread DPI awareness */
2307 unsigned int style; /* window style */
2308 unsigned int ex_style; /* window extended style */
2309 VARARG(class,unicode_str); /* class name */
2311 user_handle_t handle; /* created window */
2312 user_handle_t parent; /* full handle of parent */
2313 user_handle_t owner; /* full handle of owner */
2314 int extra; /* number of extra bytes */
2315 client_ptr_t class_ptr; /* pointer to class in client address space */
2316 int dpi; /* window DPI if not per-monitor aware */
2317 int awareness; /* window DPI awareness */
2321 /* Destroy a window */
2322 @REQ(destroy_window)
2323 user_handle_t handle; /* handle to the window */
2327 /* Retrieve the desktop window for the current thread */
2328 @REQ(get_desktop_window)
2329 int force; /* force creation if it doesn't exist
*/
2331 user_handle_t top_window
; /* handle to the desktop window
*/
2332 user_handle_t msg_window
; /* handle to the top
-level HWND_MESSAGE parent
*/
2336 /* Set a window owner
*/
2337 @
REQ(set_window_owner
)
2338 user_handle_t handle
; /* handle to the window
*/
2339 user_handle_t owner
; /* new owner
*/
2341 user_handle_t full_owner
; /* full handle of new owner
*/
2342 user_handle_t prev_owner
; /* full handle of previous owner
*/
2346 /* Get information from a window handle
*/
2347 @
REQ(get_window_info
)
2348 user_handle_t handle
; /* handle to the window
*/
2350 user_handle_t full_handle
; /* full
32-bit handle
*/
2351 user_handle_t last_active
; /* last active popup
*/
2352 process_id_t pid
; /* process owning the window
*/
2353 thread_id_t tid
; /* thread owning the window
*/
2354 atom_t atom
; /* class atom
*/
2355 int is_unicode
; /* ANSI or unicode
*/
2356 int dpi
; /* window DPI
*/
2357 int awareness
; /* DPI awareness
*/
2361 /* Set some information in a window
*/
2362 @
REQ(set_window_info
)
2363 unsigned short flags
; /* flags for fields to
set (see below
) */
2364 short int is_unicode
; /* ANSI or unicode
*/
2365 user_handle_t handle
; /* handle to the window
*/
2366 unsigned int style
; /* window style
*/
2367 unsigned int ex_style
; /* window extended style
*/
2368 data_size_t extra_size
; /* size to set in extra bytes
*/
2369 mod_handle_t instance
; /* creator instance
*/
2370 lparam_t user_data
; /* user
-specific data
*/
2371 lparam_t extra_value
; /* value to set in extra bytes or window id
*/
2372 int extra_offset
; /* offset to set in extra bytes
*/
2374 unsigned int old_style
; /* old window style
*/
2375 unsigned int old_ex_style
; /* old window extended style
*/
2376 mod_handle_t old_instance
; /* old creator instance
*/
2377 lparam_t old_user_data
; /* old user
-specific data
*/
2378 lparam_t old_extra_value
; /* old value in extra bytes
*/
2379 lparam_t old_id
; /* old window id
*/
2381 #define SET_WIN_STYLE
0x01
2382 #define SET_WIN_EXSTYLE
0x02
2383 #define SET_WIN_ID
0x04
2384 #define SET_WIN_INSTANCE
0x08
2385 #define SET_WIN_USERDATA
0x10
2386 #define SET_WIN_EXTRA
0x20
2387 #define SET_WIN_UNICODE
0x40
2390 /* Set the parent of a window
*/
2392 user_handle_t handle
; /* handle to the window
*/
2393 user_handle_t parent
; /* handle to the parent
*/
2395 user_handle_t old_parent
; /* old parent window
*/
2396 user_handle_t full_parent
; /* full handle of new parent
*/
2397 int dpi
; /* new window DPI if not per
-monitor aware
*/
2398 int awareness
; /* new DPI awareness
*/
2402 /* Get a list of the window parents
, up to the root of the tree
*/
2403 @
REQ(get_window_parents
)
2404 user_handle_t handle
; /* handle to the window
*/
2406 int count
; /* total count of parents
*/
2407 VARARG(parents
,user_handles
); /* parent handles
*/
2411 /* Get a list of the window children
*/
2412 @
REQ(get_window_children
)
2413 obj_handle_t desktop
; /* handle to desktop
*/
2414 user_handle_t parent
; /* parent window
*/
2415 atom_t atom
; /* class atom for the listed children
*/
2416 thread_id_t tid
; /* thread owning the listed children
*/
2417 VARARG(class
,unicode_str
); /* class name
*/
2419 int count
; /* total count of children
*/
2420 VARARG(children
,user_handles
); /* children handles
*/
2424 /* Get a list of the window children that contain a given point
*/
2425 @
REQ(get_window_children_from_point
)
2426 user_handle_t parent
; /* parent window
*/
2427 int x
; /* point in parent coordinates
*/
2429 int dpi
; /* dpi for the point coordinates
*/
2431 int count
; /* total count of children
*/
2432 VARARG(children
,user_handles
); /* children handles
*/
2436 /* Get window tree information from a window handle
*/
2437 @
REQ(get_window_tree
)
2438 user_handle_t handle
; /* handle to the window
*/
2440 user_handle_t parent
; /* parent window
*/
2441 user_handle_t owner
; /* owner window
*/
2442 user_handle_t next_sibling
; /* next sibling in Z
-order
*/
2443 user_handle_t prev_sibling
; /* prev sibling in Z
-order
*/
2444 user_handle_t first_sibling
; /* first sibling in Z
-order
*/
2445 user_handle_t last_sibling
; /* last sibling in Z
-order
*/
2446 user_handle_t first_child
; /* first child
*/
2447 user_handle_t last_child
; /* last child
*/
2450 /* Set the position and Z order of a window
*/
2451 @
REQ(set_window_pos
)
2452 unsigned short swp_flags
; /* SWP_
* flags
*/
2453 unsigned short paint_flags
; /* paint
flags (see below
) */
2454 user_handle_t handle
; /* handle to the window
*/
2455 user_handle_t previous
; /* previous window in Z order
*/
2456 rectangle_t window
; /* window
rectangle (in parent coords
) */
2457 rectangle_t client
; /* client
rectangle (in parent coords
) */
2458 VARARG(valid
,rectangles
); /* valid rectangles from
WM_NCCALCSIZE (in parent coords
) */
2460 unsigned int new_style
; /* new window style
*/
2461 unsigned int new_ex_style
; /* new window extended style
*/
2462 user_handle_t surface_win
; /* parent window that holds the surface
*/
2463 int needs_update
; /* whether the surface region needs an update
*/
2465 #define SET_WINPOS_PAINT_SURFACE
0x01 /* window has a paintable surface
*/
2466 #define SET_WINPOS_PIXEL_FORMAT
0x02 /* window has a custom pixel format
*/
2468 /* Get the window and client rectangles of a window
*/
2469 @
REQ(get_window_rectangles
)
2470 user_handle_t handle
; /* handle to the window
*/
2471 int relative
; /* coords relative
to (see below
) */
2472 int dpi
; /* DPI to map to
, or zero for per
-monitor DPI
*/
2474 rectangle_t window
; /* window rectangle
*/
2475 rectangle_t client
; /* client rectangle
*/
2477 enum coords_relative
2479 COORDS_CLIENT
, /* relative to client area
*/
2480 COORDS_WINDOW
, /* relative to whole window area
*/
2481 COORDS_PARENT
, /* relative to parent
's client area */
2482 COORDS_SCREEN /* relative to screen origin */
2486 /* Get the window text */
2487 @REQ(get_window_text)
2488 user_handle_t handle; /* handle to the window */
2490 data_size_t length; /* total length in WCHARs */
2491 VARARG(text,unicode_str); /* window text */
2495 /* Set the window text */
2496 @REQ(set_window_text)
2497 user_handle_t handle; /* handle to the window */
2498 VARARG(text,unicode_str); /* window text */
2502 /* Get the coordinates offset between two windows */
2503 @REQ(get_windows_offset)
2504 user_handle_t from; /* handle to the first window */
2505 user_handle_t to; /* handle to the second window */
2506 int dpi; /* DPI to map to, or zero for per-monitor DPI */
2508 int x; /* x coordinate offset */
2509 int y; /* y coordinate offset */
2510 int mirror; /* whether to mirror the x coordinate */
2514 /* Get the visible region of a window */
2515 @REQ(get_visible_region)
2516 user_handle_t window; /* handle to the window */
2517 unsigned int flags; /* DCX flags */
2519 user_handle_t top_win; /* top window to clip against */
2520 rectangle_t top_rect; /* top window visible rect with screen coords */
2521 rectangle_t win_rect; /* window rect in screen coords */
2522 unsigned int paint_flags; /* paint flags (from SET_WINPOS_* flags) */
2523 data_size_t total_size; /* total size of the resulting region */
2524 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2528 /* Get the visible surface region of a window */
2529 @REQ(get_surface_region)
2530 user_handle_t window; /* handle to the window */
2532 rectangle_t visible_rect; /* window visible rect in screen coords */
2533 data_size_t total_size; /* total size of the resulting region */
2534 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2538 /* Get the window region */
2539 @REQ(get_window_region)
2540 user_handle_t window; /* handle to the window */
2542 data_size_t total_size; /* total size of the resulting region */
2543 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2547 /* Set the window region */
2548 @REQ(set_window_region)
2549 user_handle_t window; /* handle to the window */
2550 int redraw; /* redraw the window? */
2551 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2555 /* Get the window update region */
2556 @REQ(get_update_region)
2557 user_handle_t window; /* handle to the window */
2558 user_handle_t from_child; /* child to start searching from */
2559 unsigned int flags; /* update flags (see below) */
2561 user_handle_t child; /* child to repaint (or window itself) */
2562 unsigned int flags; /* resulting update flags (see below) */
2563 data_size_t total_size; /* total size of the resulting region */
2564 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2566 #define UPDATE_NONCLIENT 0x001 /* get region for repainting non-client area */
2567 #define UPDATE_ERASE 0x002 /* get region for erasing client area */
2568 #define UPDATE_PAINT 0x004 /* get region for painting client area */
2569 #define UPDATE_INTERNALPAINT 0x008 /* get region if internal paint is pending */
2570 #define UPDATE_ALLCHILDREN 0x010 /* force repaint of all children */
2571 #define UPDATE_NOCHILDREN 0x020 /* don't try to repaint any children
*/
2572 #define UPDATE_NOREGION
0x040 /* don
't return a region, only the flags */
2573 #define UPDATE_DELAYED_ERASE 0x080 /* still needs erase after BeginPaint */
2574 #define UPDATE_CLIPCHILDREN 0x100 /* remove clipped children from the update region */
2577 /* Update the z order of a window so that a given rectangle is fully visible */
2578 @REQ(update_window_zorder)
2579 user_handle_t window; /* handle to the window */
2580 rectangle_t rect; /* rectangle that must be visible (in client coords) */
2584 /* Mark parts of a window as needing a redraw */
2586 user_handle_t window; /* handle to the window */
2587 unsigned int flags; /* RDW_* flags */
2588 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2592 /* Set a window property */
2593 @REQ(set_window_property)
2594 user_handle_t window; /* handle to the window */
2595 lparam_t data; /* data to store */
2596 atom_t atom; /* property atom (if no name specified) */
2597 VARARG(name,unicode_str); /* property name */
2601 /* Remove a window property */
2602 @REQ(remove_window_property)
2603 user_handle_t window; /* handle to the window */
2604 atom_t atom; /* property atom (if no name specified) */
2605 VARARG(name,unicode_str); /* property name */
2607 lparam_t data; /* data stored in property */
2611 /* Get a window property */
2612 @REQ(get_window_property)
2613 user_handle_t window; /* handle to the window */
2614 atom_t atom; /* property atom (if no name specified) */
2615 VARARG(name,unicode_str); /* property name */
2617 lparam_t data; /* data stored in property */
2621 /* Get the list of properties of a window */
2622 @REQ(get_window_properties)
2623 user_handle_t window; /* handle to the window */
2625 int total; /* total number of properties */
2626 VARARG(props,properties); /* list of properties */
2630 /* Create a window station */
2631 @REQ(create_winstation)
2632 unsigned int flags; /* window station flags */
2633 unsigned int access; /* wanted access rights */
2634 unsigned int attributes; /* object attributes */
2635 obj_handle_t rootdir; /* root directory */
2636 VARARG(name,unicode_str); /* object name */
2638 obj_handle_t handle; /* handle to the window station */
2642 /* Open a handle to a window station */
2643 @REQ(open_winstation)
2644 unsigned int access; /* wanted access rights */
2645 unsigned int attributes; /* object attributes */
2646 obj_handle_t rootdir; /* root directory */
2647 VARARG(name,unicode_str); /* object name */
2649 obj_handle_t handle; /* handle to the window station */
2653 /* Close a window station */
2654 @REQ(close_winstation)
2655 obj_handle_t handle; /* handle to the window station */
2659 /* Get the process current window station */
2660 @REQ(get_process_winstation)
2662 obj_handle_t handle; /* handle to the window station */
2666 /* Set the process current window station */
2667 @REQ(set_process_winstation)
2668 obj_handle_t handle; /* handle to the window station */
2672 /* Enumerate window stations */
2673 @REQ(enum_winstation)
2674 unsigned int index; /* current index */
2676 unsigned int next; /* next index */
2677 VARARG(name,unicode_str); /* window station name */
2681 /* Create a desktop */
2682 @REQ(create_desktop)
2683 unsigned int flags; /* desktop flags */
2684 unsigned int access; /* wanted access rights */
2685 unsigned int attributes; /* object attributes */
2686 VARARG(name,unicode_str); /* object name */
2688 obj_handle_t handle; /* handle to the desktop */
2692 /* Open a handle to a desktop */
2694 obj_handle_t winsta; /* window station to open (null allowed) */
2695 unsigned int flags; /* desktop flags */
2696 unsigned int access; /* wanted access rights */
2697 unsigned int attributes; /* object attributes */
2698 VARARG(name,unicode_str); /* object name */
2700 obj_handle_t handle; /* handle to the desktop */
2704 /* Open a handle to current input desktop */
2705 @REQ(open_input_desktop)
2706 unsigned int flags; /* desktop flags */
2707 unsigned int access; /* wanted access rights */
2708 unsigned int attributes; /* object attributes */
2710 obj_handle_t handle; /* handle to the desktop */
2714 /* Close a desktop */
2716 obj_handle_t handle; /* handle to the desktop */
2720 /* Get the thread current desktop */
2721 @REQ(get_thread_desktop)
2722 thread_id_t tid; /* thread id */
2724 obj_handle_t handle; /* handle to the desktop */
2728 /* Set the thread current desktop */
2729 @REQ(set_thread_desktop)
2730 obj_handle_t handle; /* handle to the desktop */
2734 /* Enumerate desktops */
2736 obj_handle_t winstation; /* handle to the window station */
2737 unsigned int index; /* current index */
2739 unsigned int next; /* next index */
2740 VARARG(name,unicode_str); /* window station name */
2744 /* Get/set information about a user object (window station or desktop) */
2745 @REQ(set_user_object_info)
2746 obj_handle_t handle; /* handle to the object */
2747 unsigned int flags; /* information to set/get */
2748 unsigned int obj_flags; /* new object flags */
2750 int is_desktop; /* is object a desktop? */
2751 unsigned int old_obj_flags; /* old object flags */
2752 VARARG(name,unicode_str); /* object name */
2754 #define SET_USER_OBJECT_SET_FLAGS 1
2755 #define SET_USER_OBJECT_GET_FULL_NAME 2
2758 /* Register a hotkey */
2759 @REQ(register_hotkey)
2760 user_handle_t window; /* handle to the window */
2761 int id; /* hotkey identifier */
2762 unsigned int flags; /* modifier keys */
2763 unsigned int vkey; /* virtual key code */
2765 int replaced; /* did we replace an existing hotkey? */
2766 unsigned int flags; /* flags of replaced hotkey */
2767 unsigned int vkey; /* virtual key code of replaced hotkey */
2771 /* Unregister a hotkey */
2772 @REQ(unregister_hotkey)
2773 user_handle_t window; /* handle to the window */
2774 int id; /* hotkey identifier */
2776 unsigned int flags; /* flags of removed hotkey */
2777 unsigned int vkey; /* virtual key code of removed hotkey */
2781 /* Attach (or detach) thread inputs */
2782 @REQ(attach_thread_input)
2783 thread_id_t tid_from; /* thread to be attached */
2784 thread_id_t tid_to; /* thread to which tid_from should be attached */
2785 int attach; /* is it an attach? */
2789 /* Get input data for a given thread */
2790 @REQ(get_thread_input)
2791 thread_id_t tid; /* id of thread */
2793 user_handle_t focus; /* handle to the focus window */
2794 user_handle_t capture; /* handle to the capture window */
2795 user_handle_t active; /* handle to the active window */
2796 user_handle_t foreground; /* handle to the global foreground window */
2797 user_handle_t menu_owner; /* handle to the menu owner */
2798 user_handle_t move_size; /* handle to the moving/resizing window */
2799 user_handle_t caret; /* handle to the caret window */
2800 user_handle_t cursor; /* handle to the cursor */
2801 int show_count; /* cursor show count */
2802 rectangle_t rect; /* caret rectangle */
2806 /* Get the time of the last input event */
2807 @REQ(get_last_input_time)
2813 /* Retrieve queue keyboard state for current thread or global async state */
2815 int async; /* whether to query the async state */
2816 int key; /* optional key code or -1 */
2818 unsigned char state; /* state of specified key */
2819 VARARG(keystate,bytes); /* state array for all the keys */
2822 /* Set queue keyboard state for current thread */
2824 int async; /* whether to change the async state too */
2825 VARARG(keystate,bytes); /* state array for all the keys */
2828 /* Set the system foreground window */
2829 @REQ(set_foreground_window)
2830 user_handle_t handle; /* handle to the foreground window */
2832 user_handle_t previous; /* handle to the previous foreground window */
2833 int send_msg_old; /* whether we have to send a msg to the old window */
2834 int send_msg_new; /* whether we have to send a msg to the new window */
2837 /* Set the current thread focus window */
2838 @REQ(set_focus_window)
2839 user_handle_t handle; /* handle to the focus window */
2841 user_handle_t previous; /* handle to the previous focus window */
2844 /* Set the current thread active window */
2845 @REQ(set_active_window)
2846 user_handle_t handle; /* handle to the active window */
2848 user_handle_t previous; /* handle to the previous active window */
2851 /* Set the current thread capture window */
2852 @REQ(set_capture_window)
2853 user_handle_t handle; /* handle to the capture window */
2854 unsigned int flags; /* capture flags (see below) */
2856 user_handle_t previous; /* handle to the previous capture window */
2857 user_handle_t full_handle; /* full 32-bit handle of new capture window */
2859 #define CAPTURE_MENU 0x01 /* capture is for a menu */
2860 #define CAPTURE_MOVESIZE 0x02 /* capture is for moving/resizing */
2863 /* Set the current thread caret window */
2864 @REQ(set_caret_window)
2865 user_handle_t handle; /* handle to the caret window */
2866 int width; /* caret width */
2867 int height; /* caret height */
2869 user_handle_t previous; /* handle to the previous caret window */
2870 rectangle_t old_rect; /* previous caret rectangle */
2871 int old_hide; /* previous hide count */
2872 int old_state; /* previous caret state (1=on, 0=off) */
2876 /* Set the current thread caret information */
2877 @REQ(set_caret_info)
2878 unsigned int flags; /* caret flags (see below) */
2879 user_handle_t handle; /* handle to the caret window */
2880 int x; /* caret x position */
2881 int y; /* caret y position */
2882 int hide; /* increment for hide count (can be negative to show it) */
2883 int state; /* caret state (see below) */
2885 user_handle_t full_handle; /* handle to the current caret window */
2886 rectangle_t old_rect; /* previous caret rectangle */
2887 int old_hide; /* previous hide count */
2888 int old_state; /* previous caret state (1=on, 0=off) */
2890 #define SET_CARET_POS 0x01 /* set the caret position from x,y */
2891 #define SET_CARET_HIDE 0x02 /* increment the caret hide count */
2892 #define SET_CARET_STATE 0x04 /* set the caret on/off state */
2895 CARET_STATE_OFF, /* off */
2896 CARET_STATE_ON, /* on */
2897 CARET_STATE_TOGGLE, /* toggle current state */
2898 CARET_STATE_ON_IF_MOVED /* on if the position differs, unchanged otherwise */
2902 /* Set a window hook */
2904 int id; /* id of the hook */
2905 process_id_t pid; /* id of process to set the hook into */
2906 thread_id_t tid; /* id of thread to set the hook into */
2909 client_ptr_t proc; /* hook procedure */
2911 int unicode; /* is it a unicode hook? */
2912 VARARG(module,unicode_str); /* module name */
2914 user_handle_t handle; /* handle to the hook */
2915 unsigned int active_hooks; /* active hooks bitmap */
2919 /* Remove a window hook */
2921 user_handle_t handle; /* handle to the hook */
2922 client_ptr_t proc; /* hook procedure if handle is 0 */
2923 int id; /* id of the hook if handle is 0 */
2925 unsigned int active_hooks; /* active hooks bitmap */
2929 /* Start calling a hook chain */
2930 @REQ(start_hook_chain)
2931 int id; /* id of the hook */
2932 int event; /* signalled event */
2933 user_handle_t window; /* handle to the event window */
2934 int object_id; /* object id for out of context winevent */
2935 int child_id; /* child id for out of context winevent */
2937 user_handle_t handle; /* handle to the next hook */
2938 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2939 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2940 int unicode; /* is it a unicode hook? */
2941 client_ptr_t proc; /* hook procedure */
2942 unsigned int active_hooks; /* active hooks bitmap */
2943 VARARG(module,unicode_str); /* module name */
2947 /* Finished calling a hook chain */
2948 @REQ(finish_hook_chain)
2949 int id; /* id of the hook */
2953 /* Get the hook information */
2955 user_handle_t handle; /* handle to the current hook */
2956 int get_next; /* do we want info about current or next hook? */
2957 int event; /* signalled event */
2958 user_handle_t window; /* handle to the event window */
2959 int object_id; /* object id for out of context winevent */
2960 int child_id; /* child id for out of context winevent */
2962 user_handle_t handle; /* handle to the hook */
2963 int id; /* id of the hook */
2964 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2965 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2966 client_ptr_t proc; /* hook procedure */
2967 int unicode; /* is it a unicode hook? */
2968 VARARG(module,unicode_str); /* module name */
2972 /* Create a window class */
2974 int local; /* is it a local class? */
2975 atom_t atom; /* class atom */
2976 unsigned int style; /* class style */
2977 mod_handle_t instance; /* module instance */
2978 int extra; /* number of extra class bytes */
2979 int win_extra; /* number of window extra bytes */
2980 client_ptr_t client_ptr; /* pointer to class in client address space */
2981 data_size_t name_offset; /* base class name offset for specified atom */
2982 VARARG(name,unicode_str); /* class name */
2984 atom_t atom; /* resulting class atom */
2988 /* Destroy a window class */
2990 atom_t atom; /* class atom */
2991 mod_handle_t instance; /* module instance */
2992 VARARG(name,unicode_str); /* class name */
2994 client_ptr_t client_ptr; /* pointer to class in client address space */
2998 /* Set some information in a class */
2999 @REQ(set_class_info)
3000 user_handle_t window; /* handle to the window */
3001 unsigned int flags; /* flags for info to set (see below) */
3002 atom_t atom; /* class atom */
3003 unsigned int style; /* class style */
3004 int win_extra; /* number of window extra bytes */
3005 mod_handle_t instance; /* module instance */
3006 int extra_offset; /* offset to set in extra bytes */
3007 data_size_t extra_size; /* size to set in extra bytes */
3008 lparam_t extra_value; /* value to set in extra bytes */
3010 atom_t old_atom; /* previous class atom */
3011 atom_t base_atom; /* base class atom */
3012 mod_handle_t old_instance; /* previous module instance */
3013 lparam_t old_extra_value; /* old value in extra bytes */
3014 unsigned int old_style; /* previous class style */
3015 int old_extra; /* previous number of class extra bytes */
3016 int old_win_extra; /* previous number of window extra bytes */
3018 #define SET_CLASS_ATOM 0x0001
3019 #define SET_CLASS_STYLE 0x0002
3020 #define SET_CLASS_WINEXTRA 0x0004
3021 #define SET_CLASS_INSTANCE 0x0008
3022 #define SET_CLASS_EXTRA 0x0010
3025 /* Open the clipboard */
3026 @REQ(open_clipboard)
3027 user_handle_t window; /* clipboard window */
3029 user_handle_t owner; /* current clipboard owner */
3033 /* Close the clipboard */
3034 @REQ(close_clipboard)
3036 user_handle_t viewer; /* first clipboard viewer */
3037 user_handle_t owner; /* current clipboard owner */
3041 /* Empty the clipboard and grab ownership */
3042 @REQ(empty_clipboard)
3046 /* Add a data format to the clipboard */
3047 @REQ(set_clipboard_data)
3048 unsigned int format; /* clipboard format of the data */
3049 unsigned int lcid; /* locale id to use for synthesizing text formats */
3050 VARARG(data,bytes); /* data contents */
3052 unsigned int seqno; /* sequence number for the set data */
3056 /* Fetch a data format from the clipboard */
3057 @REQ(get_clipboard_data)
3058 unsigned int format; /* clipboard format of the data */
3059 int render; /* will we try to render it if missing? */
3060 int cached; /* do we already have it in the client-side cache? */
3061 unsigned int seqno; /* sequence number for the data in the cache */
3063 unsigned int from; /* for synthesized data, format to generate it from */
3064 user_handle_t owner; /* clipboard owner for delayed-rendered formats */
3065 unsigned int seqno; /* sequence number for the originally set data */
3066 data_size_t total; /* total data size */
3067 VARARG(data,bytes); /* data contents */
3071 /* Retrieve a list of available formats */
3072 @REQ(get_clipboard_formats)
3073 unsigned int format; /* specific format to query, return all if 0 */
3075 unsigned int count; /* count of available formats */
3076 VARARG(formats,uints); /* array of available formats */
3080 /* Retrieve the next available format */
3081 @REQ(enum_clipboard_formats)
3082 unsigned int previous; /* previous format, or first if 0 */
3084 unsigned int format; /* next format */
3088 /* Release ownership of the clipboard */
3089 @REQ(release_clipboard)
3090 user_handle_t owner; /* clipboard owner to release */
3092 user_handle_t viewer; /* first clipboard viewer */
3093 user_handle_t owner; /* current clipboard owner */
3097 /* Get clipboard information */
3098 @REQ(get_clipboard_info)
3100 user_handle_t window; /* clipboard window */
3101 user_handle_t owner; /* clipboard owner */
3102 user_handle_t viewer; /* clipboard viewer */
3103 unsigned int seqno; /* current sequence number */
3107 /* Set the clipboard viewer window */
3108 @REQ(set_clipboard_viewer)
3109 user_handle_t viewer; /* clipboard viewer */
3110 user_handle_t previous; /* if non-zero, check that this was the previous viewer */
3112 user_handle_t old_viewer; /* previous clipboard viewer */
3113 user_handle_t owner; /* clipboard owner */
3117 /* Add a clipboard listener window */
3118 @REQ(add_clipboard_listener)
3119 user_handle_t window; /* clipboard listener window */
3123 /* Remove a clipboard listener window */
3124 @REQ(remove_clipboard_listener)
3125 user_handle_t window; /* clipboard listener window */
3129 /* Open a security token */
3131 obj_handle_t handle; /* handle to the thread or process */
3132 unsigned int access; /* access rights to the new token */
3133 unsigned int attributes;/* object attributes */
3134 unsigned int flags; /* flags (see below) */
3136 obj_handle_t token; /* handle to the token */
3138 #define OPEN_TOKEN_THREAD 1
3139 #define OPEN_TOKEN_AS_SELF 2
3142 /* Set/get the global windows */
3143 @REQ(set_global_windows)
3144 unsigned int flags; /* flags for fields to set (see below) */
3145 user_handle_t shell_window; /* handle to the new shell window */
3146 user_handle_t shell_listview; /* handle to the new shell listview window */
3147 user_handle_t progman_window; /* handle to the new program manager window */
3148 user_handle_t taskman_window; /* handle to the new task manager window */
3150 user_handle_t old_shell_window; /* handle to the shell window */
3151 user_handle_t old_shell_listview; /* handle to the shell listview window */
3152 user_handle_t old_progman_window; /* handle to the new program manager window */
3153 user_handle_t old_taskman_window; /* handle to the new task manager window */
3155 #define SET_GLOBAL_SHELL_WINDOWS 0x01 /* set both main shell and listview windows */
3156 #define SET_GLOBAL_PROGMAN_WINDOW 0x02
3157 #define SET_GLOBAL_TASKMAN_WINDOW 0x04
3159 /* Adjust the privileges held by a token */
3160 @REQ(adjust_token_privileges)
3161 obj_handle_t handle; /* handle to the token */
3162 int disable_all; /* disable all privileges? */
3163 int get_modified_state; /* get modified privileges? */
3164 VARARG(privileges,luid_attr); /* privileges to enable/disable/remove */
3166 unsigned int len; /* total length in bytes required to store token privileges */
3167 VARARG(privileges,luid_attr); /* modified privileges */
3170 /* Retrieves the set of privileges held by or available to a token */
3171 @REQ(get_token_privileges)
3172 obj_handle_t handle; /* handle to the token */
3174 unsigned int len; /* total length in bytes required to store token privileges */
3175 VARARG(privileges,luid_attr); /* privileges held by or available to a token */
3178 /* Check the token has the required privileges */
3179 @REQ(check_token_privileges)
3180 obj_handle_t handle; /* handle to the token */
3181 int all_required; /* are all the privileges required for the check to succeed? */
3182 VARARG(privileges,luid_attr); /* privileges to check */
3184 int has_privileges; /* does the token have the required privileges? */
3185 VARARG(privileges,luid_attr); /* privileges held by or available to a token */
3188 @REQ(duplicate_token)
3189 obj_handle_t handle; /* handle to the token to duplicate */
3190 unsigned int access; /* access rights to the new token */
3191 int primary; /* is the new token to be a primary one? */
3192 int impersonation_level; /* impersonation level of the new token */
3193 VARARG(objattr,object_attributes); /* object attributes */
3195 obj_handle_t new_handle; /* duplicated handle */
3199 obj_handle_t handle; /* handle to the token to duplicate */
3200 unsigned int flags; /* flags */
3201 data_size_t privileges_size; /* size of privileges */
3202 VARARG(privileges,luid_attr,privileges_size); /* privileges to remove from new token */
3203 VARARG(disable_sids,sid); /* array of groups to remove from new token */
3205 obj_handle_t new_handle; /* filtered handle */
3209 obj_handle_t handle; /* handle to the token */
3210 unsigned int desired_access; /* desired access to the object */
3211 generic_map_t mapping; /* mapping to specific rights */
3212 VARARG(sd,security_descriptor); /* security descriptor to check */
3214 unsigned int access_granted; /* access rights actually granted */
3215 unsigned int access_status; /* was access granted? */
3216 unsigned int privileges_len; /* length needed to store privileges */
3217 VARARG(privileges,luid_attr); /* privileges used during access check */
3221 obj_handle_t handle; /* handle to the token */
3222 unsigned int which_sid; /* which SID to retrieve from the token */
3224 data_size_t sid_len; /* length needed to store sid */
3225 VARARG(sid,sid); /* the sid specified by which_sid from the token */
3228 @REQ(get_token_groups)
3229 obj_handle_t handle; /* handle to the token */
3230 unsigned int attr_mask; /* mask for wanted attributes */
3232 data_size_t attr_len; /* length needed to store attrs */
3233 data_size_t sid_len; /* length needed to store sids */
3234 VARARG(attrs,uints,attr_len); /* group attributes */
3235 VARARG(sids,sids); /* group sids */
3238 @REQ(get_token_default_dacl)
3239 obj_handle_t handle; /* handle to the token */
3241 data_size_t acl_len; /* length needed to store access control list */
3242 VARARG(acl,acl); /* access control list */
3245 @REQ(set_token_default_dacl)
3246 obj_handle_t handle; /* handle to the token */
3247 VARARG(acl,acl); /* default dacl to set */
3250 @REQ(set_security_object)
3251 obj_handle_t handle; /* handle to the object */
3252 unsigned int security_info; /* which parts of security descriptor to set */
3253 VARARG(sd,security_descriptor); /* security descriptor to set */
3256 @REQ(get_security_object)
3257 obj_handle_t handle; /* handle to the object */
3258 unsigned int security_info; /* which parts of security descriptor to get */
3260 unsigned int sd_len; /* buffer size needed for sd */
3261 VARARG(sd,security_descriptor); /* retrieved security descriptor */
3268 obj_handle_t handle;
3269 unsigned int access;
3270 unsigned int attributes;
3274 /* Return a list of all opened handles */
3275 @REQ(get_system_handles)
3277 unsigned int count; /* number of handles */
3278 VARARG(data,handle_infos); /* array of handle_infos */
3282 /* Create a mailslot */
3283 @REQ(create_mailslot)
3284 unsigned int access; /* wanted access rights */
3285 timeout_t read_timeout;
3286 unsigned int max_msgsize;
3287 VARARG(objattr,object_attributes); /* object attributes */
3289 obj_handle_t handle; /* handle to the mailslot */
3293 /* Set mailslot information */
3294 @REQ(set_mailslot_info)
3295 obj_handle_t handle; /* handle to the mailslot */
3296 timeout_t read_timeout;
3299 timeout_t read_timeout;
3300 unsigned int max_msgsize;
3302 #define MAILSLOT_SET_READ_TIMEOUT 1
3305 /* Create a directory object */
3306 @REQ(create_directory)
3307 unsigned int access; /* access flags */
3308 VARARG(objattr,object_attributes); /* object attributes */
3310 obj_handle_t handle; /* handle to the directory */
3314 /* Open a directory object */
3315 @REQ(open_directory)
3316 unsigned int access; /* access flags */
3317 unsigned int attributes; /* object attributes */
3318 obj_handle_t rootdir; /* root directory */
3319 VARARG(directory_name,unicode_str); /* Directory name */
3321 obj_handle_t handle; /* handle to the directory */
3325 /* Get a directory entry by index */
3326 @REQ(get_directory_entry)
3327 obj_handle_t handle; /* handle to the directory */
3328 unsigned int index; /* entry index */
3330 data_size_t total_len; /* total length needed for strings */
3331 data_size_t name_len; /* length of the entry name in bytes */
3332 VARARG(name,unicode_str,name_len); /* entry name */
3333 VARARG(type,unicode_str); /* entry type */
3337 /* Create a symbolic link object */
3338 @REQ(create_symlink)
3339 unsigned int access; /* access flags */
3340 VARARG(objattr,object_attributes); /* object attributes */
3341 VARARG(target_name,unicode_str); /* target name */
3343 obj_handle_t handle; /* handle to the symlink */
3347 /* Open a symbolic link object */
3349 unsigned int access; /* access flags */
3350 unsigned int attributes; /* object attributes */
3351 obj_handle_t rootdir; /* root directory */
3352 VARARG(name,unicode_str); /* symlink name */
3354 obj_handle_t handle; /* handle to the symlink */
3358 /* Query a symbolic link object */
3360 obj_handle_t handle; /* handle to the symlink */
3362 data_size_t total; /* total needed size for name */
3363 VARARG(target_name,unicode_str); /* target name */
3367 /* Query basic object information */
3368 @REQ(get_object_info)
3369 obj_handle_t handle; /* handle to the object */
3371 unsigned int access; /* granted access mask */
3372 unsigned int ref_count; /* object ref count */
3373 unsigned int handle_count; /* object handle count */
3377 /* Query the full name of an object */
3378 @REQ(get_object_name)
3379 obj_handle_t handle; /* handle to the object */
3381 data_size_t total; /* total needed size for name */
3382 VARARG(name,unicode_str); /* object name */
3386 /* Query object type name information */
3387 @REQ(get_object_type)
3388 obj_handle_t handle; /* handle to the object */
3390 VARARG(info,object_type_info); /* type information */
3394 /* Query type information for all types */
3395 @REQ(get_object_types)
3397 int count; /* total count of object types */
3398 VARARG(info,object_types_info); /* type information */
3402 /* Allocate a locally-unique identifier */
3403 @REQ(allocate_locally_unique_id)
3409 /* Create a device manager */
3410 @REQ(create_device_manager)
3411 unsigned int access; /* wanted access rights */
3412 unsigned int attributes; /* object attributes */
3414 obj_handle_t handle; /* handle to the device */
3418 /* Create a device */
3420 obj_handle_t rootdir; /* root directory */
3421 client_ptr_t user_ptr; /* opaque ptr for use by client */
3422 obj_handle_t manager; /* device manager */
3423 VARARG(name,unicode_str); /* object name */
3427 /* Delete a device */
3429 obj_handle_t manager; /* handle to the device manager */
3430 client_ptr_t device; /* pointer to the device */
3434 /* Retrieve the next pending device irp request */
3435 @REQ(get_next_device_request)
3436 obj_handle_t manager; /* handle to the device manager */
3437 obj_handle_t prev; /* handle to the previous irp */
3438 unsigned int status; /* status of the previous irp */
3439 client_ptr_t user_ptr; /* user pointer of the previous irp */
3440 int pending; /* was the previous irp marked pending? */
3441 unsigned int iosb_status; /* IOSB status of the previous irp */
3442 data_size_t result; /* IOSB result of the previous irp */
3443 VARARG(data,bytes); /* output data of the previous irp */
3445 irp_params_t params; /* irp parameters */
3446 obj_handle_t next; /* handle to the next irp */
3447 thread_id_t client_tid; /* tid of thread calling irp */
3448 client_ptr_t client_thread; /* pointer to thread object of calling irp */
3449 data_size_t in_size; /* total needed input size */
3450 VARARG(next_data,bytes); /* input data of the next irp */
3454 /* Get kernel pointer from server object */
3455 @REQ(get_kernel_object_ptr)
3456 obj_handle_t manager; /* handle to the device manager */
3457 obj_handle_t handle; /* object handle */
3459 client_ptr_t user_ptr; /* kernel object pointer */
3463 /* Associate kernel pointer with server object */
3464 @REQ(set_kernel_object_ptr)
3465 obj_handle_t manager; /* handle to the device manager */
3466 obj_handle_t handle; /* object handle */
3467 client_ptr_t user_ptr; /* kernel object pointer */
3471 /* Grab server object reference from kernel object pointer */
3472 @REQ(grab_kernel_object)
3473 obj_handle_t manager; /* handle to the device manager */
3474 client_ptr_t user_ptr; /* kernel object pointer */
3478 /* Release server object reference from kernel object pointer */
3479 @REQ(release_kernel_object)
3480 obj_handle_t manager; /* handle to the device manager */
3481 client_ptr_t user_ptr; /* kernel object pointer */
3485 /* Get handle from kernel object pointer */
3486 @REQ(get_kernel_object_handle)
3487 obj_handle_t manager; /* handle to the device manager */
3488 client_ptr_t user_ptr; /* kernel object pointer */
3489 unsigned int access; /* wanted access rights */
3491 obj_handle_t handle; /* kernel object handle */
3495 /* Make the current process a system process */
3496 @REQ(make_process_system)
3497 obj_handle_t handle; /* handle to the process */
3499 obj_handle_t event; /* event signaled when all user processes have exited */
3503 /* Get detailed fixed-size information about a token */
3504 @REQ(get_token_info)
3505 obj_handle_t handle; /* handle to the object */
3507 struct luid token_id; /* locally-unique identifier of the token */
3508 struct luid modified_id; /* locally-unique identifier of the modified version of the token */
3509 unsigned int session_id; /* token session id */
3510 int primary; /* is the token primary or impersonation? */
3511 int impersonation_level; /* level of impersonation */
3512 int elevation; /* elevation type */
3513 int group_count; /* the number of groups the token is a member of */
3514 int privilege_count; /* the number of privileges the token has */
3518 /* Create a token which is an elevation counterpart to this token */
3519 @REQ(create_linked_token)
3520 obj_handle_t handle; /* handle to the token */
3522 obj_handle_t linked; /* handle to the linked token */
3526 /* Create I/O completion port */
3527 @REQ(create_completion)
3528 unsigned int access; /* desired access to a port */
3529 unsigned int concurrent; /* max number of concurrent active threads */
3530 VARARG(objattr,object_attributes); /* object attributes */
3532 obj_handle_t handle; /* port handle */
3536 /* Open I/O completion port */
3537 @REQ(open_completion)
3538 unsigned int access; /* desired access to a port */
3539 unsigned int attributes; /* object attributes */
3540 obj_handle_t rootdir; /* root directory */
3541 VARARG(filename,unicode_str); /* port name */
3543 obj_handle_t handle; /* port handle */
3547 /* add completion to completion port */
3548 @REQ(add_completion)
3549 obj_handle_t handle; /* port handle */
3550 apc_param_t ckey; /* completion key */
3551 apc_param_t cvalue; /* completion value */
3552 apc_param_t information; /* IO_STATUS_BLOCK Information */
3553 unsigned int status; /* completion result */
3557 /* get completion from completion port queue */
3558 @REQ(remove_completion)
3559 obj_handle_t handle; /* port handle */
3561 apc_param_t ckey; /* completion key */
3562 apc_param_t cvalue; /* completion value */
3563 apc_param_t information; /* IO_STATUS_BLOCK Information */
3564 unsigned int status; /* completion result */
3568 /* get completion queue depth */
3569 @REQ(query_completion)
3570 obj_handle_t handle; /* port handle */
3572 unsigned int depth; /* completion queue depth */
3576 /* associate object with completion port */
3577 @REQ(set_completion_info)
3578 obj_handle_t handle; /* object handle */
3579 apc_param_t ckey; /* completion key */
3580 obj_handle_t chandle; /* port handle */
3584 /* check for associated completion and push msg */
3585 @REQ(add_fd_completion)
3586 obj_handle_t handle; /* async' object
*/
3587 apc_param_t cvalue
; /* completion value
*/
3588 apc_param_t information
; /* IO_STATUS_BLOCK Information
*/
3589 unsigned int status
; /* completion status
*/
3590 int async
; /* completion is an async result
*/
3594 /* set fd completion information
*/
3595 @
REQ(set_fd_completion_mode
)
3596 obj_handle_t handle
; /* handle to a file or directory
*/
3597 unsigned int flags
; /* completion notification flags
*/
3601 /* set fd disposition information
*/
3602 @
REQ(set_fd_disp_info
)
3603 obj_handle_t handle
; /* handle to a file or directory
*/
3604 int unlink
; /* whether to unlink file on close
*/
3608 /* set fd name information
*/
3609 @
REQ(set_fd_name_info
)
3610 obj_handle_t handle
; /* handle to a file or directory
*/
3611 obj_handle_t rootdir
; /* root directory
*/
3612 data_size_t namelen
; /* length of NT name in bytes
*/
3613 int link
; /* link instead of renaming
*/
3614 int replace
; /* replace an existing file?
*/
3615 VARARG(name
,unicode_str
,namelen
); /* NT name
*/
3616 VARARG(filename
,string
); /* new file name
*/
3620 /* set fd eof information
*/
3621 @
REQ(set_fd_eof_info
)
3622 obj_handle_t handle
; /* handle to a file or directory
*/
3623 file_pos_t eof
; /* offset of eof of file
*/
3627 /* Retrieve layered info for a window
*/
3628 @
REQ(get_window_layered_info
)
3629 user_handle_t handle
; /* handle to the window
*/
3631 unsigned int color_key
; /* color key
*/
3632 unsigned int alpha
; /* alpha (0.
.255) */
3633 unsigned int flags
; /* LWA_
* flags
*/
3637 /* Set layered info for a window
*/
3638 @
REQ(set_window_layered_info
)
3639 user_handle_t handle
; /* handle to the window
*/
3640 unsigned int color_key
; /* color key
*/
3641 unsigned int alpha
; /* alpha (0.
.255) */
3642 unsigned int flags
; /* LWA_
* flags
*/
3646 /* Allocate an arbitrary user handle
*/
3647 @
REQ(alloc_user_handle
)
3649 user_handle_t handle
; /* allocated handle
*/
3653 /* Free an arbitrary user handle
*/
3654 @
REQ(free_user_handle
)
3655 user_handle_t handle
; /* handle to free
*/
3659 /* Set
/get the current cursor
*/
3661 unsigned int flags
; /* flags for fields to
set (see below
) */
3662 user_handle_t handle
; /* handle to the cursor
*/
3663 int show_count
; /* show count increment
/decrement
*/
3664 int x
; /* cursor position
*/
3666 rectangle_t clip
; /* cursor clip rectangle
*/
3667 unsigned int clip_msg
; /* message to post on cursor clip changes
*/
3669 user_handle_t prev_handle
; /* previous handle
*/
3670 int prev_count
; /* previous show count
*/
3671 int prev_x
; /* previous position
*/
3673 int new_x
; /* new position
*/
3675 rectangle_t new_clip
; /* new clip rectangle
*/
3676 unsigned int last_change
; /* time of last position change
*/
3678 #define SET_CURSOR_HANDLE
0x01
3679 #define SET_CURSOR_COUNT
0x02
3680 #define SET_CURSOR_POS
0x04
3681 #define SET_CURSOR_CLIP
0x08
3682 #define SET_CURSOR_NOCLIP
0x10
3684 /* Get the history of the
64 last cursor positions
*/
3685 @
REQ(get_cursor_history
)
3687 VARARG(history
,cursor_positions
);
3691 /* Batch read rawinput message data
*/
3692 @
REQ(get_rawinput_buffer
)
3693 data_size_t rawinput_size
; /* size of RAWINPUT structure
*/
3694 data_size_t buffer_size
; /* size of output buffer
*/
3696 data_size_t next_size
; /* minimum size to get next message data
*/
3701 /* Modify the list of registered rawinput devices
*/
3702 @
REQ(update_rawinput_devices
)
3703 VARARG(devices
,rawinput_devices
);
3706 /* Create a new job object
*/
3708 unsigned int access
; /* wanted access rights
*/
3709 VARARG(objattr
,object_attributes
); /* object attributes
*/
3711 obj_handle_t handle
; /* handle to the job
*/
3715 /* Open a job object
*/
3717 unsigned int access
; /* wanted access rights
*/
3718 unsigned int attributes
; /* object attributes
*/
3719 obj_handle_t rootdir
; /* root directory
*/
3720 VARARG(name
,unicode_str
); /* object name
*/
3722 obj_handle_t handle
; /* handle to the job
*/
3726 /* Assign a job object to a process
*/
3728 obj_handle_t job
; /* handle to the job
*/
3729 obj_handle_t process
; /* handle to the process
*/
3733 /* Check if a process is associated with a job
*/
3734 @
REQ(process_in_job
)
3735 obj_handle_t job
; /* handle to the job
*/
3736 obj_handle_t process
; /* handle to the process
*/
3740 /* Set limit flags on a job
*/
3741 @
REQ(set_job_limits
)
3742 obj_handle_t handle
; /* handle to the job
*/
3743 unsigned int limit_flags
; /* new limit flags
*/
3747 /* Set new completion port for a job
*/
3748 @
REQ(set_job_completion_port
)
3749 obj_handle_t job
; /* handle to the job
*/
3750 obj_handle_t port
; /* handle to the completion port
*/
3751 client_ptr_t key
; /* key to send with completion messages
*/
3755 /* Retrieve information about a job
*/
3757 obj_handle_t handle
; /* handle to the job
*/
3759 int total_processes
; /* total count of processes
*/
3760 int active_processes
; /* count of running processes
*/
3761 VARARG(pids
,uints
); /* list of active pids
*/
3765 /* Terminate all processes associated with the job
*/
3767 obj_handle_t handle
; /* handle to the job
*/
3768 int status
; /* process exit code
*/
3772 /* Suspend a process
*/
3773 @
REQ(suspend_process
)
3774 obj_handle_t handle
; /* process handle
*/
3778 /* Resume a process
*/
3779 @
REQ(resume_process
)
3780 obj_handle_t handle
; /* process handle
*/
3784 /* Iterate thread list for process
*/
3785 @
REQ(get_next_thread
)
3786 obj_handle_t process
; /* process handle
*/
3787 obj_handle_t last
; /* thread handle to start with
*/
3788 unsigned int access
; /* desired access for returned handle
*/
3789 unsigned int attributes
; /* returned handle attributes
*/
3790 unsigned int flags
; /* controls iteration direction
*/
3792 obj_handle_t handle
; /* next thread handle
*/