3 * Wine server protocol definition
5 * Copyright (C
) 2001 Alexandre Julliard
7 * This file is used by tools
/make_requests to build the
8 * protocol structures in include
/wine
/server_protocol.h
10 * This library is free software
; you can redistribute it and
/or
11 * modify it under the terms of the GNU Lesser General Public
12 * License as published by the Free Software Foundation
; either
13 * version
2.1 of the License
, or (at your option
) any later version.
15 * This library is distributed in the hope that it will be useful
,
16 * but WITHOUT ANY WARRANTY
; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU
18 * Lesser General Public License for more details.
20 * You should have received a copy of the GNU Lesser General Public
21 * License along with this library
; if not
, write to the Free Software
22 * Foundation
, Inc.
, 51 Franklin St
, Fifth Floor
, Boston
, MA
02110-1301, USA
25 @HEADER
/* start of C declarations
*/
34 typedef unsigned int obj_handle_t
;
35 typedef unsigned int user_handle_t
;
36 typedef unsigned int atom_t
;
37 typedef unsigned int process_id_t
;
38 typedef unsigned int thread_id_t
;
39 typedef unsigned int data_size_t
;
40 typedef unsigned int ioctl_code_t
;
41 typedef unsigned __int64 lparam_t
;
42 typedef unsigned __int64 apc_param_t
;
43 typedef unsigned __int64 mem_size_t
;
44 typedef unsigned __int64 file_pos_t
;
45 typedef unsigned __int64 client_ptr_t
;
46 typedef unsigned __int64 affinity_t
;
47 typedef client_ptr_t mod_handle_t
;
51 int req
; /* request code
*/
52 data_size_t request_size
; /* request variable part size
*/
53 data_size_t reply_size
; /* reply variable part maximum size
*/
58 unsigned int error
; /* error result
*/
59 data_size_t reply_size
; /* reply variable part size
*/
62 /* placeholder structure for the maximum allowed request size
*/
63 /* this is used to construct the generic_request union
*/
64 struct request_max_size
66 int pad
[16]; /* the max request size is
16 ints
*/
69 #define FIRST_USER_HANDLE
0x0020 /* first possible value for low word of user handle
*/
70 #define LAST_USER_HANDLE
0xffef /* last possible value for low word of user handle
*/
73 /* debug event data
*/
76 int code
; /* event code
*/
79 int code
; /* DbgExceptionStateChange
*/
80 int first
; /* first chance exception?
*/
81 unsigned int exc_code
; /* exception code
*/
82 unsigned int flags
; /* exception flags
*/
83 client_ptr_t record
; /* exception record
*/
84 client_ptr_t address
; /* exception address
*/
85 int nb_params
; /* number of parameters
*/
87 client_ptr_t params
[15]; /* parameters
*/
91 int code
; /* DbgCreateThreadStateChange
*/
92 obj_handle_t handle
; /* handle to the new thread
*/
93 client_ptr_t start
; /* thread startup routine
*/
97 int code
; /* DbgCreateProcessStateChange
*/
98 obj_handle_t file
; /* handle to the process exe file
*/
99 obj_handle_t process
; /* handle to the new process
*/
100 obj_handle_t thread
; /* handle to the new thread
*/
101 mod_handle_t base
; /* base of executable image
*/
102 int dbg_offset
; /* offset of debug info in file
*/
103 int dbg_size
; /* size of debug info
*/
104 client_ptr_t start
; /* thread startup routine
*/
108 int code
; /* DbgExitThreadStateChange
/DbgExitProcessStateChange
*/
109 int exit_code
; /* thread or process exit code
*/
113 int code
; /* DbgLoadDllStateChange
*/
114 obj_handle_t handle
; /* file handle for the dll
*/
115 mod_handle_t base
; /* base address of the dll
*/
116 int dbg_offset
; /* offset of debug info in file
*/
117 int dbg_size
; /* size of debug info
*/
118 client_ptr_t name
; /* image
name (optional
) */
122 int code
; /* DbgUnloadDllStateChange
*/
124 mod_handle_t base
; /* base address of the dll
*/
131 unsigned int machine
; /* machine type
*/
132 unsigned int flags
; /* SERVER_CTX_
* flags
*/
135 struct
{ unsigned int eip
, ebp
, esp
, eflags
, cs
, ss
; } i386_regs
;
136 struct
{ unsigned __int64 rip
, rbp
, rsp
;
137 unsigned int cs
, ss
, flags
, __pad
; } x86_64_regs
;
138 struct
{ unsigned int sp
, lr
, pc
, cpsr
; } arm_regs
;
139 struct
{ unsigned __int64 sp
, pc
, pstate
; } arm64_regs
;
140 } ctl
; /* selected by SERVER_CTX_CONTROL
*/
143 struct
{ unsigned int eax
, ebx
, ecx
, edx
, esi
, edi
; } i386_regs
;
144 struct
{ unsigned __int64 rax
,rbx
, rcx
, rdx
, rsi
, rdi
,
145 r8
, r9
, r10
, r11
, r12
, r13
, r14
, r15
; } x86_64_regs
;
146 struct
{ unsigned int r
[13]; } arm_regs
;
147 struct
{ unsigned __int64 x
[31]; } arm64_regs
;
148 } integer
; /* selected by SERVER_CTX_INTEGER
*/
151 struct
{ unsigned int ds
, es
, fs
, gs
; } i386_regs
;
152 struct
{ unsigned int ds
, es
, fs
, gs
; } x86_64_regs
;
153 } seg
; /* selected by SERVER_CTX_SEGMENTS
*/
156 struct
{ unsigned int ctrl
, status
, tag
, err_off
, err_sel
, data_off
, data_sel
, cr0npx
;
157 unsigned char regs
[80]; } i386_regs
;
158 struct
{ struct
{ unsigned __int64 low
, high
; } fpregs
[32]; } x86_64_regs
;
159 struct
{ unsigned __int64 d
[32]; unsigned int fpscr
; } arm_regs
;
160 struct
{ struct
{ unsigned __int64 low
, high
; } q
[32]; unsigned int fpcr
, fpsr
; } arm64_regs
;
161 } fp
; /* selected by SERVER_CTX_FLOATING_POINT
*/
164 struct
{ unsigned int dr0
, dr1
, dr2
, dr3
, dr6
, dr7
; } i386_regs
;
165 struct
{ unsigned __int64 dr0
, dr1
, dr2
, dr3
, dr6
, dr7
; } x86_64_regs
;
166 struct
{ unsigned int bvr
[8], bcr
[8], wvr
[1], wcr
[1]; } arm_regs
;
167 struct
{ unsigned __int64 bvr
[8], wvr
[2]; unsigned int bcr
[8], wcr
[2]; } arm64_regs
;
168 } debug
; /* selected by SERVER_CTX_DEBUG_REGISTERS
*/
171 unsigned char i386_regs
[512];
172 } ext
; /* selected by SERVER_CTX_EXTENDED_REGISTERS
*/
175 struct
{ struct
{ unsigned __int64 low
, high
; } ymm_high
[16]; } regs
;
176 } ymm
; /* selected by SERVER_CTX_YMM_REGISTERS
*/
179 #define SERVER_CTX_CONTROL
0x01
180 #define SERVER_CTX_INTEGER
0x02
181 #define SERVER_CTX_SEGMENTS
0x04
182 #define SERVER_CTX_FLOATING_POINT
0x08
183 #define SERVER_CTX_DEBUG_REGISTERS
0x10
184 #define SERVER_CTX_EXTENDED_REGISTERS
0x20
185 #define SERVER_CTX_YMM_REGISTERS
0x40
187 /* structure used in sending an fd from client to server
*/
190 thread_id_t tid
; /* thread id
*/
191 int fd
; /* file descriptor on client
-side
*/
194 /* structure sent by the server on the wait fifo
*/
197 client_ptr_t cookie
; /* magic cookie that was passed in select_request
*/
198 int signaled
; /* wait result
*/
202 /* NT
-style timeout
, in
100ns units
, negative means relative timeout
*/
203 typedef __int64 timeout_t
;
204 #define
TIMEOUT_INFINITE (((timeout_t
)0x7fffffff) << 32 |
0xffffffff)
206 /* absolute timeout
, negative means that monotonic clock is used
*/
207 typedef __int64 abstime_t
;
209 /* structure for process startup info
*/
212 unsigned int debug_flags
;
213 unsigned int console_flags
;
214 obj_handle_t console
;
216 obj_handle_t hstdout
;
217 obj_handle_t hstderr
;
224 unsigned int attribute
;
227 process_id_t process_group_id
;
228 data_size_t curdir_len
;
229 data_size_t dllpath_len
;
230 data_size_t imagepath_len
;
231 data_size_t cmdline_len
;
232 data_size_t title_len
;
233 data_size_t desktop_len
;
234 data_size_t shellinfo_len
;
235 data_size_t runtime_len
;
236 /* VARARG(curdir
,unicode_str
,curdir_len
); */
237 /* VARARG(dllpath
,unicode_str
,dllpath_len
); */
238 /* VARARG(imagepath
,unicode_str
,imagepath_len
); */
239 /* VARARG(cmdline
,unicode_str
,cmdline_len
); */
240 /* VARARG(title
,unicode_str
,title_len
); */
241 /* VARARG(desktop
,unicode_str
,desktop_len
); */
242 /* VARARG(shellinfo
,unicode_str
,shellinfo_len
); */
243 /* VARARG(runtime
,unicode_str
,runtime_len
); */
246 /* structure returned in the list of window properties
*/
249 atom_t atom
; /* property atom
*/
250 int string
; /* was atom a string originally?
*/
251 lparam_t data
; /* data stored in property
*/
254 /* structure to specify window rectangles
*/
263 /* structure for parameters of async I
/O calls
*/
266 obj_handle_t handle
; /* object to perform I
/O on
*/
267 obj_handle_t event
; /* event to signal when done
*/
268 client_ptr_t iosb
; /* I
/O status block in client addr space
*/
269 client_ptr_t user
; /* opaque user data containing callback pointer and async
-specific data
*/
270 client_ptr_t apc
; /* user APC to call
*/
271 apc_param_t apc_context
; /* user APC context or completion value
*/
274 /* structures for extra message data
*/
278 unsigned int device
; /* source
device (IMDT_
* values
) */
279 unsigned int origin
; /* source
origin (IMO_
* values
) */
284 int type
; /* rawinput data
type (RIM_
* values
) */
285 unsigned int device
; /* rawinput device pseudo
-handle
*/
286 unsigned int wparam
; /* wparam of the WM_INPUT
* message
*/
287 unsigned int usage
; /* HID device usage
*/
290 struct hardware_msg_data
292 lparam_t info
; /* extra info
*/
293 data_size_t size
; /* size of hardware message data
*/
295 unsigned int hw_id
; /* unique id
*/
296 unsigned int flags
; /* hook flags
*/
297 struct hw_msg_source source
; /* message source
*/
298 struct rawinput rawinput
; /* rawinput message data
*/
301 struct callback_msg_data
303 client_ptr_t callback
; /* callback function
*/
304 lparam_t data
; /* user data for callback
*/
305 lparam_t result
; /* message result
*/
308 struct winevent_msg_data
310 user_handle_t hook
; /* hook handle
*/
311 thread_id_t tid
; /* thread id
*/
312 client_ptr_t hook_proc
; /* hook proc address
*/
313 /* followed by module name if any
*/
321 int type
; /* INPUT_KEYBOARD
*/
322 unsigned short vkey
; /* virtual key code
*/
323 unsigned short scan
; /* scan code
*/
324 unsigned int flags
; /* event flags
*/
325 unsigned int time
; /* event time
*/
326 lparam_t info
; /* extra info
*/
330 int type
; /* INPUT_MOUSE
*/
331 int x
; /* coordinates
*/
333 unsigned int data
; /* mouse data
*/
334 unsigned int flags
; /* event flags
*/
335 unsigned int time
; /* event time
*/
336 lparam_t info
; /* extra info
*/
340 int type
; /* INPUT_HARDWARE
*/
341 unsigned int msg
; /* message code
*/
342 lparam_t wparam
; /* parameters
*/
343 lparam_t lparam
; /* parameters
*/
346 unsigned int device
; /* rawinput device index
*/
347 unsigned int usage
; /* HID device usage
*/
348 unsigned int count
; /* HID report count
*/
349 unsigned int length
; /* HID report length
*/
356 unsigned char bytes
[1]; /* raw data for sent messages
*/
357 struct hardware_msg_data hardware
;
358 struct callback_msg_data callback
;
359 struct winevent_msg_data winevent
;
362 /* structure returned in filesystem events
*/
363 struct filesystem_event
372 unsigned int low_part
;
384 unsigned char revision
;
387 unsigned short count
;
393 unsigned char revision
;
394 unsigned char sub_count
;
395 unsigned char id_auth
[6];
396 unsigned int sub_auth
[15];
407 #define MAX_ACL_LEN
65535
409 struct security_descriptor
411 unsigned int control
; /* SE_ flags
*/
412 data_size_t owner_len
;
413 data_size_t group_len
;
414 data_size_t sacl_len
;
415 data_size_t dacl_len
;
416 /* VARARG(owner
,sid
); */
417 /* VARARG(group
,sid
); */
418 /* VARARG(sacl
,acl
); */
419 /* VARARG(dacl
,acl
); */
422 struct object_attributes
424 obj_handle_t rootdir
; /* root directory
*/
425 unsigned int attributes
; /* object attributes
*/
426 data_size_t sd_len
; /* length of security_descriptor data. may be
0 */
427 data_size_t name_len
; /* length of the name string. may be
0 */
428 /* VARARG(sd
,security_descriptor
); */
429 /* VARARG(name
,unicode_str
); */
432 struct object_type_info
434 data_size_t name_len
; /* length of the name string
*/
435 unsigned int index
; /* type index in global table
*/
436 unsigned int obj_count
; /* count of objects of this type
*/
437 unsigned int handle_count
; /* count of handles of this type
*/
438 unsigned int obj_max
; /* max count of objects of this type
*/
439 unsigned int handle_max
; /* max count of handles of this type
*/
440 unsigned int valid_access
; /* mask for valid access bits
*/
441 generic_map_t mapping
; /* generic access mappings
*/
442 /* VARARG(name
,unicode_str
); */
450 SELECT_SIGNAL_AND_WAIT
,
451 SELECT_KEYED_EVENT_WAIT
,
452 SELECT_KEYED_EVENT_RELEASE
460 enum select_op op
; /* SELECT_WAIT or SELECT_WAIT_ALL
*/
461 obj_handle_t handles
[MAXIMUM_WAIT_OBJECTS
];
466 enum select_op op
; /* SELECT_SIGNAL_AND_WAIT
*/
468 obj_handle_t signal
; /* must be last in the structure so we can remove it on retries
*/
472 enum select_op op
; /* SELECT_KEYED_EVENT_WAIT or SELECT_KEYED_EVENT_RELEASE
*/
484 APC_VIRTUAL_ALLOC_EX
,
500 enum apc_type type
; /* APC_USER
*/
502 client_ptr_t func
; /* void (__stdcall
*func
)(ULONG_PTR
,ULONG_PTR
,ULONG_PTR
); */
503 apc_param_t args
[3]; /* arguments for user function
*/
512 enum apc_type type
; /* APC_ASYNC_IO
*/
513 unsigned int status
; /* I
/O status
*/
514 client_ptr_t user
; /* user pointer
*/
515 client_ptr_t sb
; /* status block
*/
516 data_size_t result
; /* result size
*/
520 enum apc_type type
; /* APC_VIRTUAL_ALLOC
*/
521 unsigned int op_type
; /* type of operation
*/
522 client_ptr_t addr
; /* requested address
*/
523 mem_size_t size
; /* allocation size
*/
524 mem_size_t zero_bits
; /* number of zero high bits
*/
525 unsigned int prot
; /* memory protection flags
*/
529 enum apc_type type
; /* APC_VIRTUAL_ALLOC
*/
530 unsigned int op_type
; /* type of operation
*/
531 client_ptr_t addr
; /* requested address
*/
532 mem_size_t size
; /* allocation size
*/
533 mem_size_t limit_low
; /* allocation address limits
*/
534 mem_size_t limit_high
;
535 mem_size_t align
; /* allocation alignment
*/
536 unsigned int prot
; /* memory protection flags
*/
537 unsigned int attributes
; /* memory extended attributes
*/
541 enum apc_type type
; /* APC_VIRTUAL_FREE
*/
542 unsigned int op_type
; /* type of operation
*/
543 client_ptr_t addr
; /* requested address
*/
544 mem_size_t size
; /* allocation size
*/
548 enum apc_type type
; /* APC_VIRTUAL_QUERY
*/
550 client_ptr_t addr
; /* requested address
*/
554 enum apc_type type
; /* APC_VIRTUAL_PROTECT
*/
555 unsigned int prot
; /* new protection flags
*/
556 client_ptr_t addr
; /* requested address
*/
557 mem_size_t size
; /* requested size
*/
561 enum apc_type type
; /* APC_VIRTUAL_FLUSH
*/
563 client_ptr_t addr
; /* requested address
*/
564 mem_size_t size
; /* requested size
*/
568 enum apc_type type
; /* APC_VIRTUAL_LOCK
*/
570 client_ptr_t addr
; /* requested address
*/
571 mem_size_t size
; /* requested size
*/
575 enum apc_type type
; /* APC_VIRTUAL_UNLOCK
*/
577 client_ptr_t addr
; /* requested address
*/
578 mem_size_t size
; /* requested size
*/
582 enum apc_type type
; /* APC_MAP_VIEW
*/
583 obj_handle_t handle
; /* mapping handle
*/
584 client_ptr_t addr
; /* requested address
*/
585 mem_size_t size
; /* allocation size
*/
586 file_pos_t offset
; /* file offset
*/
587 mem_size_t zero_bits
; /* number of zero high bits
*/
588 unsigned int alloc_type
; /* allocation type
*/
589 unsigned int prot
; /* memory protection flags
*/
593 enum apc_type type
; /* APC_MAP_VIEW_EX
*/
594 obj_handle_t handle
; /* mapping handle
*/
595 client_ptr_t addr
; /* requested address
*/
596 mem_size_t size
; /* allocation size
*/
597 file_pos_t offset
; /* file offset
*/
598 mem_size_t limit_low
; /* allocation address limits
*/
599 mem_size_t limit_high
;
600 unsigned int alloc_type
; /* allocation type
*/
601 unsigned int prot
; /* memory protection flags
*/
602 unsigned short machine
; /* requested machine for image mappings
*/
603 unsigned short __pad
[3];
607 enum apc_type type
; /* APC_UNMAP_VIEW
*/
608 unsigned int flags
; /* unmap flags
*/
609 client_ptr_t addr
; /* view address
*/
613 enum apc_type type
; /* APC_CREATE_THREAD
*/
614 unsigned int flags
; /* creation flags
*/
615 client_ptr_t func
; /* void (__stdcall
*func
)(void*)
; start function
*/
616 client_ptr_t arg
; /* argument for start function
*/
617 mem_size_t zero_bits
; /* number of zero high bits for thread stack
*/
618 mem_size_t reserve
; /* reserve size for thread stack
*/
619 mem_size_t commit
; /* commit size for thread stack
*/
623 enum apc_type type
; /* APC_DUP_HANDLE
*/
624 obj_handle_t src_handle
; /* src handle to duplicate
*/
625 obj_handle_t dst_process
; /* dst process handle
*/
626 unsigned int access
; /* wanted access rights
*/
627 unsigned int attributes
; /* object attributes
*/
628 unsigned int options
; /* duplicate options
*/
637 enum apc_type type
; /* APC_ASYNC_IO
*/
638 unsigned int status
; /* new status of async operation
*/
639 unsigned int total
; /* bytes transferred
*/
643 enum apc_type type
; /* APC_VIRTUAL_ALLOC
*/
644 unsigned int status
; /* status returned by call
*/
645 client_ptr_t addr
; /* resulting address
*/
646 mem_size_t size
; /* resulting size
*/
650 enum apc_type type
; /* APC_VIRTUAL_ALLOC_EX
*/
651 unsigned int status
; /* status returned by call
*/
652 client_ptr_t addr
; /* resulting address
*/
653 mem_size_t size
; /* resulting size
*/
657 enum apc_type type
; /* APC_VIRTUAL_FREE
*/
658 unsigned int status
; /* status returned by call
*/
659 client_ptr_t addr
; /* resulting address
*/
660 mem_size_t size
; /* resulting size
*/
664 enum apc_type type
; /* APC_VIRTUAL_QUERY
*/
665 unsigned int status
; /* status returned by call
*/
666 client_ptr_t base
; /* resulting base address
*/
667 client_ptr_t alloc_base
;/* resulting allocation base
*/
668 mem_size_t size
; /* resulting region size
*/
669 unsigned short state
; /* resulting region state
*/
670 unsigned short prot
; /* resulting region protection
*/
671 unsigned short alloc_prot
;/* resulting allocation protection
*/
672 unsigned short alloc_type
;/* resulting region allocation type
*/
676 enum apc_type type
; /* APC_VIRTUAL_PROTECT
*/
677 unsigned int status
; /* status returned by call
*/
678 client_ptr_t addr
; /* resulting address
*/
679 mem_size_t size
; /* resulting size
*/
680 unsigned int prot
; /* old protection flags
*/
684 enum apc_type type
; /* APC_VIRTUAL_FLUSH
*/
685 unsigned int status
; /* status returned by call
*/
686 client_ptr_t addr
; /* resulting address
*/
687 mem_size_t size
; /* resulting size
*/
691 enum apc_type type
; /* APC_VIRTUAL_LOCK
*/
692 unsigned int status
; /* status returned by call
*/
693 client_ptr_t addr
; /* resulting address
*/
694 mem_size_t size
; /* resulting size
*/
698 enum apc_type type
; /* APC_VIRTUAL_UNLOCK
*/
699 unsigned int status
; /* status returned by call
*/
700 client_ptr_t addr
; /* resulting address
*/
701 mem_size_t size
; /* resulting size
*/
705 enum apc_type type
; /* APC_MAP_VIEW
*/
706 unsigned int status
; /* status returned by call
*/
707 client_ptr_t addr
; /* resulting address
*/
708 mem_size_t size
; /* resulting size
*/
712 enum apc_type type
; /* APC_MAP_VIEW_EX
*/
713 unsigned int status
; /* status returned by call
*/
714 client_ptr_t addr
; /* resulting address
*/
715 mem_size_t size
; /* resulting size
*/
719 enum apc_type type
; /* APC_UNMAP_VIEW
*/
720 unsigned int status
; /* status returned by call
*/
724 enum apc_type type
; /* APC_CREATE_THREAD
*/
725 unsigned int status
; /* status returned by call
*/
726 process_id_t pid
; /* process id
*/
727 thread_id_t tid
; /* thread id
*/
728 client_ptr_t teb
; /* thread
teb (in process address space
) */
729 obj_handle_t handle
; /* handle to new thread
*/
733 enum apc_type type
; /* APC_DUP_HANDLE
*/
734 unsigned int status
; /* status returned by call
*/
735 obj_handle_t handle
; /* duplicated handle in dst process
*/
739 enum apc_type type
; /* APC_BREAK_PROCESS
*/
740 unsigned int status
; /* status returned by call
*/
760 enum irp_type type
; /* irp call type
*/
763 enum irp_type type
; /* IRP_CALL_CREATE
*/
764 unsigned int access
; /* access rights
*/
765 unsigned int sharing
; /* sharing flags
*/
766 unsigned int options
; /* file options
*/
767 client_ptr_t device
; /* opaque ptr for the device
*/
768 obj_handle_t file
; /* file handle
*/
772 enum irp_type type
; /* IRP_CALL_CLOSE
*/
774 client_ptr_t file
; /* opaque ptr for the file object
*/
778 enum irp_type type
; /* IRP_CALL_READ
*/
779 unsigned int key
; /* driver key
*/
780 data_size_t out_size
; /* needed output size
*/
782 client_ptr_t file
; /* opaque ptr for the file object
*/
783 file_pos_t pos
; /* file position
*/
787 enum irp_type type
; /* IRP_CALL_WRITE
*/
788 unsigned int key
; /* driver key
*/
789 client_ptr_t file
; /* opaque ptr for the file object
*/
790 file_pos_t pos
; /* file position
*/
794 enum irp_type type
; /* IRP_CALL_FLUSH
*/
796 client_ptr_t file
; /* opaque ptr for the file object
*/
800 enum irp_type type
; /* IRP_CALL_IOCTL
*/
801 ioctl_code_t code
; /* ioctl code
*/
802 data_size_t out_size
; /* needed output size
*/
804 client_ptr_t file
; /* opaque ptr for the file object
*/
808 enum irp_type type
; /* IRP_CALL_VOLUME
*/
809 unsigned int info_class
;/* information class
*/
810 data_size_t out_size
; /* needed output size
*/
812 client_ptr_t file
; /* opaque ptr for the file object
*/
816 enum irp_type type
; /* IRP_CALL_FREE
*/
818 client_ptr_t obj
; /* opaque ptr for the freed object
*/
822 enum irp_type type
; /* IRP_CALL_CANCEL
*/
824 client_ptr_t irp
; /* opaque ptr for canceled irp
*/
828 /* information about a PE image mapping
, roughly equivalent to SECTION_IMAGE_INFORMATION
*/
832 client_ptr_t map_addr
;
833 mem_size_t stack_size
;
834 mem_size_t stack_commit
;
835 unsigned int entry_point
;
836 unsigned int map_size
;
837 unsigned int zerobits
;
838 unsigned int subsystem
;
839 unsigned short subsystem_minor
;
840 unsigned short subsystem_major
;
841 unsigned short osversion_major
;
842 unsigned short osversion_minor
;
843 unsigned short image_charact
;
844 unsigned short dll_charact
;
845 unsigned short machine
;
846 unsigned char contains_code
: 1;
847 unsigned char wine_builtin
: 1;
848 unsigned char wine_fakedll
: 1;
849 unsigned char is_hybrid
: 1;
850 unsigned char padding
: 4;
851 unsigned char image_flags
;
852 unsigned int loader_flags
;
853 unsigned int header_size
;
854 unsigned int file_size
;
855 unsigned int checksum
;
856 unsigned int dbg_offset
;
857 unsigned int dbg_size
;
859 #define IMAGE_FLAGS_ComPlusNativeReady
0x01
860 #define IMAGE_FLAGS_ComPlusILOnly
0x02
861 #define IMAGE_FLAGS_ImageDynamicallyRelocated
0x04
862 #define IMAGE_FLAGS_ImageMappedFlat
0x08
863 #define IMAGE_FLAGS_BaseBelow4gb
0x10
864 #define IMAGE_FLAGS_ComPlusPrefer32bit
0x20
866 struct rawinput_device
870 user_handle_t target
;
882 /****************************************************************/
883 /* Request declarations
*/
885 /* Create a new process from the context of the parent
*/
887 obj_handle_t token
; /* process token
*/
888 obj_handle_t debug
; /* process debug object
*/
889 obj_handle_t parent_process
; /* parent process
*/
890 unsigned int flags
; /* process creation flags
*/
891 int socket_fd
; /* file descriptor for process socket
*/
892 unsigned int access
; /* access rights for process object
*/
893 unsigned short machine
; /* architecture that the new process will use
*/
894 data_size_t info_size
; /* size of startup info
*/
895 data_size_t handles_size
; /* length of explicit handles list
*/
896 data_size_t jobs_size
; /* length of jobs list
*/
897 VARARG(objattr
,object_attributes
); /* object attributes
*/
898 VARARG(handles
,uints
,handles_size
); /* handles list
*/
899 VARARG(jobs
,uints
,jobs_size
); /* jobs list
*/
900 VARARG(info
,startup_info
,info_size
); /* startup information
*/
901 VARARG(env
,unicode_str
); /* environment for new process
*/
903 obj_handle_t info
; /* new process info handle
*/
904 process_id_t pid
; /* process id
*/
905 obj_handle_t handle
; /* process
handle (in the current process
) */
909 /* Retrieve information about a newly started process
*/
910 @
REQ(get_new_process_info
)
911 obj_handle_t info
; /* info handle returned from new_process_request
*/
913 int success
; /* did the process start successfully?
*/
914 int exit_code
; /* process exit code if failed
*/
918 /* Create a new thread
*/
920 obj_handle_t process
; /* process in which to create thread
*/
921 unsigned int access
; /* wanted access rights
*/
922 unsigned int flags
; /* thread creation flags
*/
923 int request_fd
; /* fd for request pipe
*/
924 VARARG(objattr
,object_attributes
); /* object attributes
*/
926 thread_id_t tid
; /* thread id
*/
927 obj_handle_t handle
; /* thread
handle (in the current process
) */
931 /* Retrieve the new process startup info
*/
932 @
REQ(get_startup_info
)
934 data_size_t info_size
; /* size of startup info
*/
935 unsigned short machine
; /* architecture for the new process
*/
936 VARARG(info
,startup_info
,info_size
); /* startup information
*/
937 VARARG(env
,unicode_str
); /* environment
*/
941 /* Signal the end of the process initialization
*/
942 @
REQ(init_process_done
)
943 client_ptr_t teb
; /* TEB of new
thread (in process address space
) */
944 client_ptr_t peb
; /* PEB of new
process (in process address space
) */
945 client_ptr_t ldt_copy
; /* address of LDT
copy (in process address space
) */
947 int suspend
; /* is process suspended?
*/
951 /* Initialize the first thread of a new process
*/
952 @
REQ(init_first_thread
)
953 int unix_pid
; /* Unix pid of new process
*/
954 int unix_tid
; /* Unix tid of new thread
*/
955 int debug_level
; /* new debug level
*/
956 int reply_fd
; /* fd for reply pipe
*/
957 int wait_fd
; /* fd for blocking calls pipe
*/
959 process_id_t pid
; /* process id of the new thread
's process */
960 thread_id_t tid; /* thread id of the new thread */
961 timeout_t server_start; /* server start time */
962 unsigned int session_id; /* process session id */
963 data_size_t info_size; /* total size of startup info */
964 VARARG(machines,ushorts); /* array of supported machines */
968 /* Initialize a new thread; called from the child after pthread_create() */
970 int unix_tid; /* Unix tid of new thread */
971 int reply_fd; /* fd for reply pipe */
972 int wait_fd; /* fd for blocking calls pipe */
973 client_ptr_t teb; /* TEB of new thread (in thread address space) */
974 client_ptr_t entry; /* entry point (in thread address space) */
976 int suspend; /* is thread suspended? */
980 /* Terminate a process */
981 @REQ(terminate_process)
982 obj_handle_t handle; /* process handle to terminate */
983 int exit_code; /* process exit code */
985 int self; /* suicide? */
989 /* Terminate a thread */
990 @REQ(terminate_thread)
991 obj_handle_t handle; /* thread handle to terminate */
992 int exit_code; /* thread exit code */
994 int self; /* suicide? */
998 /* Retrieve information about a process */
999 @REQ(get_process_info)
1000 obj_handle_t handle; /* process handle */
1002 process_id_t pid; /* server process id */
1003 process_id_t ppid; /* server process id of parent */
1004 affinity_t affinity; /* process affinity mask */
1005 client_ptr_t peb; /* PEB address in process address space */
1006 timeout_t start_time; /* process start time */
1007 timeout_t end_time; /* process end time */
1008 unsigned int session_id; /* process session id */
1009 int exit_code; /* process exit code */
1010 int priority; /* priority class */
1011 unsigned short machine; /* process architecture */
1012 VARARG(image,pe_image_info); /* image info for main exe */
1016 /* Retrieve debug information about a process */
1017 @REQ(get_process_debug_info)
1018 obj_handle_t handle; /* process handle */
1020 obj_handle_t debug; /* handle to debug port */
1021 int debug_children; /* inherit debugger to child processes */
1022 VARARG(image,pe_image_info); /* image info for main exe */
1026 /* Fetch the name of the process image */
1027 @REQ(get_process_image_name)
1028 obj_handle_t handle; /* process handle */
1029 int win32; /* return a win32 filename? */
1031 data_size_t len; /* len in bytes required to store filename */
1032 VARARG(name,unicode_str); /* image name for main exe */
1036 /* Retrieve information about a process memory usage */
1037 @REQ(get_process_vm_counters)
1038 obj_handle_t handle; /* process handle */
1040 mem_size_t peak_virtual_size; /* peak virtual memory in bytes */
1041 mem_size_t virtual_size; /* virtual memory in bytes */
1042 mem_size_t peak_working_set_size; /* peak real memory in bytes */
1043 mem_size_t working_set_size; /* real memory in bytes */
1044 mem_size_t pagefile_usage; /* commit charge in bytes */
1045 mem_size_t peak_pagefile_usage; /* peak commit charge in bytes */
1049 /* Set a process information */
1050 @REQ(set_process_info)
1051 obj_handle_t handle; /* process handle */
1052 int mask; /* setting mask (see below) */
1053 int priority; /* priority class */
1054 affinity_t affinity; /* affinity mask */
1056 #define SET_PROCESS_INFO_PRIORITY 0x01
1057 #define SET_PROCESS_INFO_AFFINITY 0x02
1060 /* Retrieve information about a thread */
1061 @REQ(get_thread_info)
1062 obj_handle_t handle; /* thread handle */
1063 unsigned int access; /* required access rights */
1065 process_id_t pid; /* server process id */
1066 thread_id_t tid; /* server thread id */
1067 client_ptr_t teb; /* thread teb pointer */
1068 client_ptr_t entry_point; /* thread entry point */
1069 affinity_t affinity; /* thread affinity mask */
1070 int exit_code; /* thread exit code */
1071 int priority; /* thread priority level */
1072 int last; /* last thread in process */
1073 int suspend_count; /* thread suspend count */
1074 unsigned int flags; /* GET_THREAD_INFO_FLAG_ flags */
1075 data_size_t desc_len; /* description length in bytes */
1076 VARARG(desc,unicode_str); /* description string */
1078 #define GET_THREAD_INFO_FLAG_DBG_HIDDEN 0x01
1079 #define GET_THREAD_INFO_FLAG_TERMINATED 0x02
1082 /* Retrieve information about thread times */
1083 @REQ(get_thread_times)
1084 obj_handle_t handle; /* thread handle */
1086 timeout_t creation_time; /* thread creation time */
1087 timeout_t exit_time; /* thread exit time */
1088 int unix_pid; /* thread native pid */
1089 int unix_tid; /* thread native pid */
1093 /* Set a thread information */
1094 @REQ(set_thread_info)
1095 obj_handle_t handle; /* thread handle */
1096 int mask; /* setting mask (see below) */
1097 int priority; /* priority class */
1098 affinity_t affinity; /* affinity mask */
1099 client_ptr_t entry_point; /* thread entry point */
1100 obj_handle_t token; /* impersonation token */
1101 VARARG(desc,unicode_str); /* description string */
1103 #define SET_THREAD_INFO_PRIORITY 0x01
1104 #define SET_THREAD_INFO_AFFINITY 0x02
1105 #define SET_THREAD_INFO_TOKEN 0x04
1106 #define SET_THREAD_INFO_ENTRYPOINT 0x08
1107 #define SET_THREAD_INFO_DESCRIPTION 0x10
1108 #define SET_THREAD_INFO_DBG_HIDDEN 0x20
1111 /* Suspend a thread */
1112 @REQ(suspend_thread)
1113 obj_handle_t handle; /* thread handle */
1115 int count; /* new suspend count */
1119 /* Resume a thread */
1121 obj_handle_t handle; /* thread handle */
1123 int count; /* new suspend count */
1127 /* Queue an APC for a thread or process */
1129 obj_handle_t handle; /* thread or process handle */
1130 VARARG(call,apc_call); /* call arguments */
1132 obj_handle_t handle; /* APC handle */
1133 int self; /* run APC in caller itself? */
1137 /* Get the result of an APC call */
1138 @REQ(get_apc_result)
1139 obj_handle_t handle; /* handle to the APC */
1141 apc_result_t result; /* result of the APC */
1145 /* Close a handle for the current process */
1147 obj_handle_t handle; /* handle to close */
1151 /* Set a handle information */
1152 @REQ(set_handle_info)
1153 obj_handle_t handle; /* handle we are interested in */
1154 int flags; /* new handle flags */
1155 int mask; /* mask for flags to set */
1157 int old_flags; /* old flag value */
1161 /* Duplicate a handle */
1163 obj_handle_t src_process; /* src process handle */
1164 obj_handle_t src_handle; /* src handle to duplicate */
1165 obj_handle_t dst_process; /* dst process handle */
1166 unsigned int access; /* wanted access rights */
1167 unsigned int attributes; /* object attributes */
1168 unsigned int options; /* duplicate options */
1170 obj_handle_t handle; /* duplicated handle in dst process */
1174 /* Test if two handles refer to the same object */
1175 @REQ(compare_objects)
1176 obj_handle_t first; /* first object handle */
1177 obj_handle_t second; /* second object handle */
1181 /* Make an object temporary */
1182 @REQ(make_temporary)
1183 obj_handle_t handle; /* handle to the object */
1187 /* Open a handle to a process */
1189 process_id_t pid; /* process id to open */
1190 unsigned int access; /* wanted access rights */
1191 unsigned int attributes; /* object attributes */
1193 obj_handle_t handle; /* handle to the process */
1197 /* Open a handle to a thread */
1199 thread_id_t tid; /* thread id to open */
1200 unsigned int access; /* wanted access rights */
1201 unsigned int attributes; /* object attributes */
1203 obj_handle_t handle; /* handle to the thread */
1207 /* Wait for handles */
1209 int flags; /* wait flags (see below) */
1210 client_ptr_t cookie; /* magic cookie to return to client */
1211 abstime_t timeout; /* timeout */
1212 data_size_t size; /* size of select_op */
1213 obj_handle_t prev_apc; /* handle to previous APC */
1214 VARARG(result,apc_result); /* result of previous APC */
1215 VARARG(data,select_op,size); /* operation-specific data */
1216 VARARG(contexts,contexts); /* suspend context(s) */
1218 obj_handle_t apc_handle; /* handle to next APC */
1219 int signaled; /* were the handles immediately signaled? */
1220 VARARG(call,apc_call); /* APC call arguments */
1221 VARARG(contexts,contexts); /* suspend context(s) */
1223 #define SELECT_ALERTABLE 1
1224 #define SELECT_INTERRUPTIBLE 2
1227 /* Create an event */
1229 unsigned int access; /* wanted access rights */
1230 int manual_reset; /* manual reset event */
1231 int initial_state; /* initial state of the event */
1232 VARARG(objattr,object_attributes); /* object attributes */
1234 obj_handle_t handle; /* handle to the event */
1237 /* Event operation */
1239 obj_handle_t handle; /* handle to event */
1240 int op; /* event operation (see below) */
1242 int state; /* previous state */
1244 enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT };
1247 obj_handle_t handle; /* handle to event */
1249 int manual_reset; /* manual reset event */
1250 int state; /* current state of the event */
1255 unsigned int access; /* wanted access rights */
1256 unsigned int attributes; /* object attributes */
1257 obj_handle_t rootdir; /* root directory */
1258 VARARG(name,unicode_str); /* object name */
1260 obj_handle_t handle; /* handle to the event */
1264 /* Create a keyed event */
1265 @REQ(create_keyed_event)
1266 unsigned int access; /* wanted access rights */
1267 VARARG(objattr,object_attributes); /* object attributes */
1269 obj_handle_t handle; /* handle to the event */
1272 /* Open a keyed event */
1273 @REQ(open_keyed_event)
1274 unsigned int access; /* wanted access rights */
1275 unsigned int attributes; /* object attributes */
1276 obj_handle_t rootdir; /* root directory */
1277 VARARG(name,unicode_str); /* object name */
1279 obj_handle_t handle; /* handle to the event */
1283 /* Create a mutex */
1285 unsigned int access; /* wanted access rights */
1286 int owned; /* initially owned? */
1287 VARARG(objattr,object_attributes); /* object attributes */
1289 obj_handle_t handle; /* handle to the mutex */
1293 /* Release a mutex */
1295 obj_handle_t handle; /* handle to the mutex */
1297 unsigned int prev_count; /* value of internal counter, before release */
1303 unsigned int access; /* wanted access rights */
1304 unsigned int attributes; /* object attributes */
1305 obj_handle_t rootdir; /* root directory */
1306 VARARG(name,unicode_str); /* object name */
1308 obj_handle_t handle; /* handle to the mutex */
1314 obj_handle_t handle; /* handle to mutex */
1316 unsigned int count; /* current count of mutex */
1317 int owned; /* true if owned by current thread */
1318 int abandoned; /* true if abandoned */
1322 /* Create a semaphore */
1323 @REQ(create_semaphore)
1324 unsigned int access; /* wanted access rights */
1325 unsigned int initial; /* initial count */
1326 unsigned int max; /* maximum count */
1327 VARARG(objattr,object_attributes); /* object attributes */
1329 obj_handle_t handle; /* handle to the semaphore */
1333 /* Release a semaphore */
1334 @REQ(release_semaphore)
1335 obj_handle_t handle; /* handle to the semaphore */
1336 unsigned int count; /* count to add to semaphore */
1338 unsigned int prev_count; /* previous semaphore count */
1341 @REQ(query_semaphore)
1342 obj_handle_t handle; /* handle to the semaphore */
1344 unsigned int current; /* current count */
1345 unsigned int max; /* maximum count */
1348 /* Open a semaphore */
1349 @REQ(open_semaphore)
1350 unsigned int access; /* wanted access rights */
1351 unsigned int attributes; /* object attributes */
1352 obj_handle_t rootdir; /* root directory */
1353 VARARG(name,unicode_str); /* object name */
1355 obj_handle_t handle; /* handle to the semaphore */
1361 unsigned int access; /* wanted access rights */
1362 unsigned int sharing; /* sharing flags */
1363 int create; /* file create action */
1364 unsigned int options; /* file options */
1365 unsigned int attrs; /* file attributes for creation */
1366 VARARG(objattr,object_attributes); /* object attributes */
1367 VARARG(filename,string); /* file name */
1369 obj_handle_t handle; /* handle to the file */
1373 /* Open a file object */
1374 @REQ(open_file_object)
1375 unsigned int access; /* wanted access rights */
1376 unsigned int attributes; /* open attributes */
1377 obj_handle_t rootdir; /* root directory */
1378 unsigned int sharing; /* sharing flags */
1379 unsigned int options; /* file options */
1380 VARARG(filename,unicode_str); /* file name */
1382 obj_handle_t handle; /* handle to the file */
1386 /* Allocate a file handle for a Unix fd */
1387 @REQ(alloc_file_handle)
1388 unsigned int access; /* wanted access rights */
1389 unsigned int attributes; /* object attributes */
1390 int fd; /* file descriptor on the client side */
1392 obj_handle_t handle; /* handle to the file */
1396 /* Get the Unix name from a file handle */
1397 @REQ(get_handle_unix_name)
1398 obj_handle_t handle; /* file handle */
1400 data_size_t name_len; /* unix name length */
1401 VARARG(name,string); /* unix name */
1405 /* Get a Unix fd to access a file */
1407 obj_handle_t handle; /* handle to the file */
1409 int type; /* file type (see below) */
1410 int cacheable; /* can fd be cached in the client? */
1411 unsigned int access; /* file access rights */
1412 unsigned int options; /* file open options */
1416 FD_TYPE_INVALID, /* invalid file (no associated fd) */
1417 FD_TYPE_FILE, /* regular file */
1418 FD_TYPE_DIR, /* directory */
1419 FD_TYPE_SOCKET, /* socket */
1420 FD_TYPE_SERIAL, /* serial port */
1421 FD_TYPE_PIPE, /* named pipe */
1422 FD_TYPE_MAILSLOT, /* mailslot */
1423 FD_TYPE_CHAR, /* unspecified char device */
1424 FD_TYPE_DEVICE, /* Windows device file */
1429 /* Retrieve (or allocate) the client-side directory cache entry */
1430 @REQ(get_directory_cache_entry)
1431 obj_handle_t handle; /* handle to the directory */
1433 int entry; /* cache entry on the client side */
1434 VARARG(free,ints); /* entries that can be freed */
1438 /* Flush a file buffers */
1440 async_data_t async; /* async I/O parameters */
1442 obj_handle_t event; /* event set when finished */
1445 /* Query file information */
1447 obj_handle_t handle; /* handle to the file */
1448 unsigned int info_class; /* queried information class */
1450 VARARG(data,bytes); /* file info data */
1453 /* Query volume information */
1454 @REQ(get_volume_info)
1455 obj_handle_t handle; /* handle to the file */
1456 async_data_t async; /* async I/O parameters */
1457 unsigned int info_class; /* queried information class */
1459 obj_handle_t wait; /* handle to wait on for blocking read */
1460 VARARG(data,bytes); /* volume info data */
1463 /* Lock a region of a file */
1465 obj_handle_t handle; /* handle to the file */
1466 file_pos_t offset; /* offset of start of lock */
1467 file_pos_t count; /* count of bytes to lock */
1468 int shared; /* shared or exclusive lock? */
1469 int wait; /* do we want to wait? */
1471 obj_handle_t handle; /* handle to wait on */
1472 int overlapped; /* is it an overlapped I/O handle? */
1476 /* Unlock a region of a file */
1478 obj_handle_t handle; /* handle to the file */
1479 file_pos_t offset; /* offset of start of unlock */
1480 file_pos_t count; /* count of bytes to unlock */
1484 /* Perform a recv on a socket */
1486 int oob; /* are we receiving OOB data? */
1487 async_data_t async; /* async I/O parameters */
1488 int force_async; /* Force asynchronous mode? */
1490 obj_handle_t wait; /* handle to wait on for blocking recv */
1491 unsigned int options; /* device open options */
1492 int nonblocking; /* is socket non-blocking? */
1496 /* Perform a send on a socket */
1498 async_data_t async; /* async I/O parameters */
1499 int force_async; /* Force asynchronous mode? */
1501 obj_handle_t wait; /* handle to wait on for blocking send */
1502 unsigned int options; /* device open options */
1503 int nonblocking; /* is socket non-blocking? */
1507 /* Get socket event flags */
1508 @REQ(socket_get_events)
1509 obj_handle_t handle; /* socket handle */
1510 obj_handle_t event; /* event to reset */
1512 unsigned int flags; /* event mask */
1513 VARARG(status,uints); /* array of status codes */
1517 /* Store ICMP id for ICMP over datagram fixup */
1518 @REQ(socket_send_icmp_id)
1519 obj_handle_t handle; /* socket handle */
1520 unsigned short icmp_id; /* ICMP packet id */
1521 unsigned short icmp_seq; /* ICMP packed sequence */
1526 /* Get ICMP id for ICMP over datagram fixup */
1527 @REQ(socket_get_icmp_id)
1528 obj_handle_t handle; /* socket handle */
1529 unsigned short icmp_seq; /* ICMP packed sequence */
1531 unsigned short icmp_id; /* ICMP packet id */
1535 /* Retrieve the next pending console ioctl request */
1536 @REQ(get_next_console_request)
1537 obj_handle_t handle; /* console server handle */
1538 int signal; /* server signal state */
1539 int read; /* 1 if reporting result of blocked read ioctl */
1540 unsigned int status; /* status of previous ioctl */
1541 VARARG(out_data,bytes); /* out_data of previous ioctl */
1543 unsigned int code; /* ioctl code */
1544 unsigned int output; /* output id or 0 for input */
1545 data_size_t out_size; /* ioctl output size */
1546 VARARG(in_data,bytes); /* ioctl in_data */
1550 /* enable directory change notifications */
1551 @REQ(read_directory_changes)
1552 unsigned int filter; /* notification filter */
1553 int subtree; /* watch the subtree? */
1554 int want_data; /* flag indicating whether change data should be collected */
1555 async_data_t async; /* async I/O parameters */
1560 obj_handle_t handle;
1562 VARARG(events,filesystem_event); /* collected filesystem events */
1566 /* Create a file mapping */
1567 @REQ(create_mapping)
1568 unsigned int access; /* wanted access rights */
1569 unsigned int flags; /* SEC_* flags */
1570 unsigned int file_access; /* file access rights */
1571 mem_size_t size; /* mapping size */
1572 obj_handle_t file_handle; /* file handle */
1573 VARARG(objattr,object_attributes); /* object attributes */
1575 obj_handle_t handle; /* handle to the mapping */
1579 /* Open a mapping */
1581 unsigned int access; /* wanted access rights */
1582 unsigned int attributes; /* object attributes */
1583 obj_handle_t rootdir; /* root directory */
1584 VARARG(name,unicode_str); /* object name */
1586 obj_handle_t handle; /* handle to the mapping */
1590 /* Get information about a file mapping */
1591 @REQ(get_mapping_info)
1592 obj_handle_t handle; /* handle to the mapping */
1593 unsigned int access; /* wanted access rights */
1595 mem_size_t size; /* mapping size */
1596 unsigned int flags; /* SEC_* flags */
1597 obj_handle_t shared_file; /* shared mapping file handle */
1598 data_size_t total; /* total required buffer size in bytes */
1599 VARARG(image,pe_image_info);/* image info for SEC_IMAGE mappings */
1600 VARARG(name,unicode_str); /* filename for SEC_IMAGE mappings */
1604 /* Get the address to use to map an image mapping */
1605 @REQ(get_image_map_address)
1606 obj_handle_t handle; /* handle to the mapping */
1608 client_ptr_t addr; /* map address */
1612 /* Add a memory view in the current process */
1614 obj_handle_t mapping; /* file mapping handle */
1615 unsigned int access; /* wanted access rights */
1616 client_ptr_t base; /* view base address (page-aligned) */
1617 mem_size_t size; /* view size */
1618 file_pos_t start; /* start offset in mapping */
1622 /* Add a memory view for an image mapping in the current process */
1623 @REQ(map_image_view)
1624 obj_handle_t mapping; /* file mapping handle */
1625 client_ptr_t base; /* view base address (page-aligned) */
1626 mem_size_t size; /* view size */
1627 unsigned int entry; /* entry point in mapped view */
1628 unsigned short machine; /* machine in the mapped view */
1632 /* Add a memory view for a builtin dll in the current process */
1633 @REQ(map_builtin_view)
1634 VARARG(image,pe_image_info);/* image info */
1635 VARARG(name,unicode_str); /* image filename */
1639 /* Get information about a mapped image view */
1640 @REQ(get_image_view_info)
1641 obj_handle_t process; /* process handle */
1642 client_ptr_t addr; /* address inside mapped view (in process address space) */
1644 client_ptr_t base; /* view base address */
1645 mem_size_t size; /* view size */
1649 /* Unmap a memory view from the current process */
1651 client_ptr_t base; /* view base address */
1655 /* Get a range of committed pages in a file mapping */
1656 @REQ(get_mapping_committed_range)
1657 client_ptr_t base; /* view base address */
1658 file_pos_t offset; /* starting offset (page-aligned, in bytes) */
1660 mem_size_t size; /* size of range starting at offset (page-aligned, in bytes) */
1661 int committed; /* whether it is a committed range */
1665 /* Add a range to the committed pages in a file mapping */
1666 @REQ(add_mapping_committed_range)
1667 client_ptr_t base; /* view base address */
1668 file_pos_t offset; /* starting offset (page-aligned, in bytes) */
1669 mem_size_t size; /* size to set (page-aligned, in bytes) or 0 if only retrieving */
1673 /* Check if two memory maps are for the same file */
1674 @REQ(is_same_mapping)
1675 client_ptr_t base1; /* first view base address */
1676 client_ptr_t base2; /* second view base address */
1680 /* Get the filename of a mapping */
1681 @REQ(get_mapping_filename)
1682 obj_handle_t process; /* process handle */
1683 client_ptr_t addr; /* address inside mapped view (in process address space) */
1685 data_size_t len; /* total filename length in bytes */
1686 VARARG(filename,unicode_str); /* filename in NT format */
1692 timeout_t start_time;
1695 int current_priority;
1698 client_ptr_t entry_point;
1703 timeout_t start_time;
1704 data_size_t name_len;
1708 process_id_t parent_pid;
1709 unsigned int session_id;
1712 /* VARARG(name,unicode_str,name_len); */
1713 /* VARARG(threads,struct thread_info,thread_count); */
1716 /* Get a list of processes and threads currently running */
1717 @REQ(list_processes)
1719 data_size_t info_size;
1721 int total_thread_count;
1722 data_size_t total_name_len;
1723 VARARG(data,process_info,info_size);
1727 /* Create a debug object */
1728 @REQ(create_debug_obj)
1729 unsigned int access; /* wanted access rights */
1730 unsigned int flags; /* object flags */
1731 VARARG(objattr,object_attributes); /* object attributes */
1733 obj_handle_t handle; /* handle to the debug object */
1737 /* Wait for a debug event */
1738 @REQ(wait_debug_event)
1739 obj_handle_t debug; /* debug object */
1741 process_id_t pid; /* process id */
1742 thread_id_t tid; /* thread id */
1743 VARARG(event,debug_event); /* debug event data */
1747 /* Queue an exception event */
1748 @REQ(queue_exception_event)
1749 int first; /* first chance exception? */
1750 unsigned int code; /* exception code */
1751 unsigned int flags; /* exception flags */
1752 client_ptr_t record; /* exception record */
1753 client_ptr_t address; /* exception address */
1754 data_size_t len; /* size of parameters */
1755 VARARG(params,uints64,len);/* exception parameters */
1757 obj_handle_t handle; /* handle to the queued event */
1761 /* Retrieve the status of an exception event */
1762 @REQ(get_exception_status)
1763 obj_handle_t handle; /* handle to the queued event */
1767 /* Continue a debug event */
1768 @REQ(continue_debug_event)
1769 obj_handle_t debug; /* debug object */
1770 process_id_t pid; /* process id to continue */
1771 thread_id_t tid; /* thread id to continue */
1772 unsigned int status; /* continuation status */
1776 /* Start or stop debugging an existing process */
1778 obj_handle_t handle; /* process handle */
1779 obj_handle_t debug; /* debug object to attach to the process */
1780 int attach; /* 1=attaching / 0=detaching from the process */
1784 /* Set debug object information */
1785 @REQ(set_debug_obj_info)
1786 obj_handle_t debug; /* debug object */
1787 unsigned int flags; /* object flags */
1791 /* Read data from a process address space */
1792 @REQ(read_process_memory)
1793 obj_handle_t handle; /* process handle */
1794 client_ptr_t addr; /* addr to read from */
1796 VARARG(data,bytes); /* result data */
1800 /* Write data to a process address space */
1801 @REQ(write_process_memory)
1802 obj_handle_t handle; /* process handle */
1803 client_ptr_t addr; /* addr to write to */
1804 VARARG(data,bytes); /* data to write */
1808 /* Create a registry key */
1810 unsigned int access; /* desired access rights */
1811 unsigned int options; /* creation options */
1812 VARARG(objattr,object_attributes); /* object attributes */
1813 VARARG(class,unicode_str); /* class name */
1815 obj_handle_t hkey; /* handle to the created key */
1818 /* Open a registry key */
1820 obj_handle_t parent; /* handle to the parent key */
1821 unsigned int access; /* desired access rights */
1822 unsigned int attributes; /* object attributes */
1823 VARARG(name,unicode_str); /* key name */
1825 obj_handle_t hkey; /* handle to the open key */
1829 /* Delete a registry key */
1831 obj_handle_t hkey; /* handle to the key */
1835 /* Flush a registry key */
1837 obj_handle_t hkey; /* handle to the key */
1841 /* Enumerate registry subkeys */
1843 obj_handle_t hkey; /* handle to registry key */
1844 int index; /* index of subkey (or -1 for current key) */
1845 int info_class; /* requested information class */
1847 int subkeys; /* number of subkeys */
1848 int max_subkey; /* longest subkey name */
1849 int max_class; /* longest class name */
1850 int values; /* number of values */
1851 int max_value; /* longest value name */
1852 int max_data; /* longest value data */
1853 timeout_t modif; /* last modification time */
1854 data_size_t total; /* total length needed for full name and class */
1855 data_size_t namelen; /* length of key name in bytes */
1856 VARARG(name,unicode_str,namelen); /* key name */
1857 VARARG(class,unicode_str); /* class name */
1861 /* Set a value of a registry key */
1863 obj_handle_t hkey; /* handle to registry key */
1864 int type; /* value type */
1865 data_size_t namelen; /* length of value name in bytes */
1866 VARARG(name,unicode_str,namelen); /* value name */
1867 VARARG(data,bytes); /* value data */
1871 /* Retrieve the value of a registry key */
1873 obj_handle_t hkey; /* handle to registry key */
1874 VARARG(name,unicode_str); /* value name */
1876 int type; /* value type */
1877 data_size_t total; /* total length needed for data */
1878 VARARG(data,bytes); /* value data */
1882 /* Enumerate a value of a registry key */
1883 @REQ(enum_key_value)
1884 obj_handle_t hkey; /* handle to registry key */
1885 int index; /* value index */
1886 int info_class; /* requested information class */
1888 int type; /* value type */
1889 data_size_t total; /* total length needed for full name and data */
1890 data_size_t namelen; /* length of value name in bytes */
1891 VARARG(name,unicode_str,namelen); /* value name */
1892 VARARG(data,bytes); /* value data */
1896 /* Delete a value of a registry key */
1897 @REQ(delete_key_value)
1898 obj_handle_t hkey; /* handle to registry key */
1899 VARARG(name,unicode_str); /* value name */
1903 /* Load a registry branch from a file */
1905 obj_handle_t file; /* file to load from */
1906 VARARG(objattr,object_attributes); /* object attributes */
1910 /* UnLoad a registry branch from a file */
1911 @REQ(unload_registry)
1912 obj_handle_t parent; /* handle to the parent key */
1913 unsigned int attributes; /* object attributes */
1914 VARARG(name,unicode_str); /* key name */
1918 /* Save a registry branch to a file */
1920 obj_handle_t hkey; /* key to save */
1921 obj_handle_t file; /* file to save to */
1925 /* Add a registry key change notification */
1926 @REQ(set_registry_notification)
1927 obj_handle_t hkey; /* key to watch for changes */
1928 obj_handle_t event; /* event to set */
1929 int subtree; /* should we watch the whole subtree? */
1930 unsigned int filter; /* things to watch */
1934 /* Rename a registry key */
1936 obj_handle_t hkey; /* handle to the key to be renamed */
1937 VARARG(name,unicode_str); /* new name */
1941 /* Create a waitable timer */
1943 unsigned int access; /* wanted access rights */
1944 int manual; /* manual reset */
1945 VARARG(objattr,object_attributes); /* object attributes */
1947 obj_handle_t handle; /* handle to the timer */
1951 /* Open a waitable timer */
1953 unsigned int access; /* wanted access rights */
1954 unsigned int attributes; /* object attributes */
1955 obj_handle_t rootdir; /* root directory */
1956 VARARG(name,unicode_str); /* object name */
1958 obj_handle_t handle; /* handle to the timer */
1961 /* Set a waitable timer */
1963 obj_handle_t handle; /* handle to the timer */
1964 timeout_t expire; /* next expiration absolute time */
1965 client_ptr_t callback; /* callback function */
1966 client_ptr_t arg; /* callback argument */
1967 int period; /* timer period in ms */
1969 int signaled; /* was the timer signaled before this call ? */
1972 /* Cancel a waitable timer */
1974 obj_handle_t handle; /* handle to the timer */
1976 int signaled; /* was the timer signaled before this calltime ? */
1979 /* Get information on a waitable timer */
1980 @REQ(get_timer_info)
1981 obj_handle_t handle; /* handle to the timer */
1983 timeout_t when; /* absolute time when the timer next expires */
1984 int signaled; /* is the timer signaled? */
1988 /* Retrieve the current context of a thread */
1989 @REQ(get_thread_context)
1990 obj_handle_t handle; /* thread handle */
1991 obj_handle_t context; /* context handle */
1992 unsigned int flags; /* context flags */
1993 unsigned int native_flags; /* flags for native context if WoW present */
1994 unsigned short machine; /* context architecture */
1996 int self; /* was it a handle to the current thread? */
1997 obj_handle_t handle; /* pending context handle */
1998 VARARG(contexts,contexts); /* thread context(s) */
2002 /* Set the current context of a thread */
2003 @REQ(set_thread_context)
2004 obj_handle_t handle; /* thread handle */
2005 unsigned int native_flags; /* flags for native context if WoW present */
2006 VARARG(contexts,contexts); /* thread context(s) */
2008 int self; /* was it a handle to the current thread? */
2012 /* Fetch a selector entry for a thread */
2013 @REQ(get_selector_entry)
2014 obj_handle_t handle; /* thread handle */
2015 int entry; /* LDT entry */
2017 unsigned int base; /* selector base */
2018 unsigned int limit; /* selector limit */
2019 unsigned char flags; /* selector flags */
2025 VARARG(name,unicode_str); /* atom name */
2027 atom_t atom; /* resulting atom */
2031 /* Delete an atom */
2033 atom_t atom; /* atom handle */
2039 VARARG(name,unicode_str); /* atom name */
2041 atom_t atom; /* atom handle */
2045 /* Get information about an atom */
2046 @REQ(get_atom_information)
2047 atom_t atom; /* atom handle */
2049 int count; /* atom lock count */
2050 int pinned; /* whether the atom has been pinned */
2051 data_size_t total; /* actual length of atom name */
2052 VARARG(name,unicode_str); /* atom name */
2056 /* Get the message queue of the current thread */
2059 obj_handle_t handle; /* handle to the queue */
2063 /* Set the file descriptor associated to the current thread queue */
2065 obj_handle_t handle; /* handle to the file descriptor */
2069 /* Set the current message queue wakeup mask */
2070 @REQ(set_queue_mask)
2071 unsigned int wake_mask; /* wakeup bits mask */
2072 unsigned int changed_mask; /* changed bits mask */
2073 int skip_wait; /* will we skip waiting if signaled? */
2075 unsigned int wake_bits; /* current wake bits */
2076 unsigned int changed_bits; /* current changed bits */
2080 /* Get the current message queue status */
2081 @REQ(get_queue_status)
2082 unsigned int clear_bits; /* should we clear the change bits? */
2084 unsigned int wake_bits; /* wake bits */
2085 unsigned int changed_bits; /* changed bits since last time */
2089 /* Retrieve the process idle event */
2090 @REQ(get_process_idle_event)
2091 obj_handle_t handle; /* process handle */
2093 obj_handle_t event; /* handle to idle event */
2097 /* Send a message to a thread queue */
2099 thread_id_t id; /* thread id */
2100 int type; /* message type (see below) */
2101 int flags; /* message flags (see below) */
2102 user_handle_t win; /* window handle */
2103 unsigned int msg; /* message code */
2104 lparam_t wparam; /* parameters */
2105 lparam_t lparam; /* parameters */
2106 timeout_t timeout; /* timeout for reply */
2107 VARARG(data,message_data); /* message data for sent messages */
2110 @REQ(post_quit_message)
2111 int exit_code; /* exit code to return */
2116 MSG_ASCII, /* Ascii message (from SendMessageA) */
2117 MSG_UNICODE, /* Unicode message (from SendMessageW) */
2118 MSG_NOTIFY, /* notify message (from SendNotifyMessageW), always Unicode */
2119 MSG_CALLBACK, /* callback message (from SendMessageCallbackW), always Unicode */
2120 MSG_CALLBACK_RESULT,/* result of a callback message */
2121 MSG_OTHER_PROCESS, /* sent from other process, may include vararg data, always Unicode */
2122 MSG_POSTED, /* posted message (from PostMessageW), always Unicode */
2123 MSG_HARDWARE, /* hardware message */
2124 MSG_WINEVENT, /* winevent message */
2125 MSG_HOOK_LL /* low-level hardware hook */
2127 #define SEND_MSG_ABORT_IF_HUNG 0x01
2130 /* Send a hardware message to a thread queue */
2131 @REQ(send_hardware_message)
2132 user_handle_t win; /* window handle */
2133 hw_input_t input; /* input data */
2134 unsigned int flags; /* flags (see below) */
2135 VARARG(report,bytes); /* HID report data */
2137 int wait; /* do we need to wait for a reply? */
2138 int prev_x; /* previous cursor position */
2140 int new_x; /* new cursor position */
2143 #define SEND_HWMSG_INJECTED 0x01
2146 /* Get a message from the current queue */
2148 unsigned int flags; /* PM_* flags */
2149 user_handle_t get_win; /* window handle to get */
2150 unsigned int get_first; /* first message code to get */
2151 unsigned int get_last; /* last message code to get */
2152 unsigned int hw_id; /* id of the previous hardware message (or 0) */
2153 unsigned int wake_mask; /* wakeup bits mask */
2154 unsigned int changed_mask; /* changed bits mask */
2156 user_handle_t win; /* window handle */
2157 unsigned int msg; /* message code */
2158 lparam_t wparam; /* parameters */
2159 lparam_t lparam; /* parameters */
2160 int type; /* message type */
2161 int x; /* message x position */
2162 int y; /* message y position */
2163 unsigned int time; /* message time */
2164 unsigned int active_hooks; /* active hooks bitmap */
2165 data_size_t total; /* total size of extra data */
2166 VARARG(data,message_data); /* message data for sent messages */
2170 /* Reply to a sent message */
2172 int remove; /* should we remove the message? */
2173 lparam_t result; /* message result */
2174 VARARG(data,bytes); /* message data for sent messages */
2178 /* Accept and remove the current hardware message */
2179 @REQ(accept_hardware_message)
2180 unsigned int hw_id; /* id of the hardware message */
2184 /* Retrieve the reply for the last message sent */
2185 @REQ(get_message_reply)
2186 int cancel; /* cancel message if not ready? */
2188 lparam_t result; /* message result */
2189 VARARG(data,bytes); /* message data for sent messages */
2193 /* Set a window timer */
2195 user_handle_t win; /* window handle */
2196 unsigned int msg; /* message to post */
2197 unsigned int rate; /* timer rate in ms */
2198 lparam_t id; /* timer id */
2199 lparam_t lparam; /* message lparam (callback proc) */
2201 lparam_t id; /* timer id */
2205 /* Kill a window timer */
2206 @REQ(kill_win_timer)
2207 user_handle_t win; /* window handle */
2208 lparam_t id; /* timer id */
2209 unsigned int msg; /* message to post */
2213 /* check if the thread owning the window is hung */
2214 @REQ(is_window_hung)
2215 user_handle_t win; /* window handle */
2221 /* Retrieve info about a serial port */
2222 @REQ(get_serial_info)
2223 obj_handle_t handle; /* handle to comm port */
2226 unsigned int eventmask;
2227 unsigned int cookie;
2228 unsigned int pending_write;
2232 /* Set info about a serial port */
2233 @REQ(set_serial_info)
2234 obj_handle_t handle; /* handle to comm port */
2235 int flags; /* bitmask to set values (see below) */
2237 #define SERIALINFO_PENDING_WRITE 0x04
2238 #define SERIALINFO_PENDING_WAIT 0x08
2240 /* Cancel all sync io on a thread */
2242 obj_handle_t handle; /* thread handle on which to cancel io */
2243 client_ptr_t iosb; /* I/O status block (NULL=all) */
2246 /* Create an async I/O */
2247 @REQ(register_async)
2248 int type; /* type of queue to look after */
2249 async_data_t async; /* async I/O parameters */
2250 int count; /* count - usually # of bytes to be read/written */
2252 #define ASYNC_TYPE_READ 0x01
2253 #define ASYNC_TYPE_WRITE 0x02
2254 #define ASYNC_TYPE_WAIT 0x03
2257 /* Cancel all async op on a fd */
2259 obj_handle_t handle; /* handle to comm port, socket or file */
2260 client_ptr_t iosb; /* I/O status block (NULL=all) */
2261 int only_thread; /* cancel matching this thread */
2265 /* Retrieve results of an async */
2266 @REQ(get_async_result)
2267 client_ptr_t user_arg; /* user arg used to identify async */
2269 VARARG(out_data,bytes); /* iosb output data */
2273 /* Notify direct completion of async and close the wait handle if not blocking */
2274 @REQ(set_async_direct_result)
2275 obj_handle_t handle; /* wait handle */
2276 apc_param_t information; /* IO_STATUS_BLOCK Information */
2277 unsigned int status; /* completion status */
2278 int mark_pending; /* set async to pending before completion? */
2280 obj_handle_t handle; /* wait handle, or NULL if closed */
2284 /* Perform a read on a file object */
2286 async_data_t async; /* async I/O parameters */
2287 file_pos_t pos; /* read position */
2289 obj_handle_t wait; /* handle to wait on for blocking read */
2290 unsigned int options; /* device open options */
2291 VARARG(data,bytes); /* read data */
2295 /* Perform a write on a file object */
2297 async_data_t async; /* async I/O parameters */
2298 file_pos_t pos; /* write position */
2299 VARARG(data,bytes); /* write data */
2301 obj_handle_t wait; /* handle to wait on for blocking write */
2302 unsigned int options; /* device open options */
2303 data_size_t size; /* size written */
2307 /* Perform an ioctl on a file */
2309 ioctl_code_t code; /* ioctl code */
2310 async_data_t async; /* async I/O parameters */
2311 VARARG(in_data,bytes); /* ioctl input data */
2313 obj_handle_t wait; /* handle to wait on for blocking ioctl */
2314 unsigned int options; /* device open options */
2315 VARARG(out_data,bytes); /* ioctl output data */
2319 /* Store results of an async irp */
2320 @REQ(set_irp_result)
2321 obj_handle_t handle; /* handle to the irp */
2322 unsigned int status; /* status of the irp */
2323 data_size_t size; /* result size (input or output depending on the operation) */
2324 VARARG(data,bytes); /* output data of the irp */
2328 /* Create a named pipe */
2329 @REQ(create_named_pipe)
2330 unsigned int access;
2331 unsigned int options;
2332 unsigned int sharing;
2333 unsigned int disposition;
2334 unsigned int maxinstances;
2335 unsigned int outsize;
2336 unsigned int insize;
2339 VARARG(objattr,object_attributes); /* object attributes */
2341 obj_handle_t handle; /* handle to the pipe */
2345 /* flags in create_named_pipe and get_named_pipe_info */
2346 #define NAMED_PIPE_MESSAGE_STREAM_WRITE 0x0001
2347 #define NAMED_PIPE_MESSAGE_STREAM_READ 0x0002
2348 #define NAMED_PIPE_NONBLOCKING_MODE 0x0004
2349 #define NAMED_PIPE_SERVER_END 0x8000
2351 /* Set named pipe information by handle */
2352 @REQ(set_named_pipe_info)
2353 obj_handle_t handle;
2357 /* Create a window */
2359 user_handle_t parent; /* parent window */
2360 user_handle_t owner; /* owner window */
2361 atom_t atom; /* class atom */
2362 mod_handle_t instance; /* module instance */
2363 int dpi; /* system DPI */
2364 int awareness; /* thread DPI awareness */
2365 unsigned int style; /* window style */
2366 unsigned int ex_style; /* window extended style */
2367 VARARG(class,unicode_str); /* class name */
2369 user_handle_t handle; /* created window */
2370 user_handle_t parent; /* full handle of parent */
2371 user_handle_t owner; /* full handle of owner */
2372 int extra; /* number of extra bytes */
2373 client_ptr_t class_ptr; /* pointer to class in client address space */
2374 int dpi; /* window DPI if not per-monitor aware */
2375 int awareness; /* window DPI awareness */
2379 /* Destroy a window */
2380 @REQ(destroy_window)
2381 user_handle_t handle; /* handle to the window */
2385 /* Retrieve the desktop window for the current thread */
2386 @REQ(get_desktop_window)
2387 int force; /* force creation if it doesn't exist
*/
2389 user_handle_t top_window
; /* handle to the desktop window
*/
2390 user_handle_t msg_window
; /* handle to the top
-level HWND_MESSAGE parent
*/
2394 /* Set a window owner
*/
2395 @
REQ(set_window_owner
)
2396 user_handle_t handle
; /* handle to the window
*/
2397 user_handle_t owner
; /* new owner
*/
2399 user_handle_t full_owner
; /* full handle of new owner
*/
2400 user_handle_t prev_owner
; /* full handle of previous owner
*/
2404 /* Get information from a window handle
*/
2405 @
REQ(get_window_info
)
2406 user_handle_t handle
; /* handle to the window
*/
2408 user_handle_t full_handle
; /* full
32-bit handle
*/
2409 user_handle_t last_active
; /* last active popup
*/
2410 process_id_t pid
; /* process owning the window
*/
2411 thread_id_t tid
; /* thread owning the window
*/
2412 atom_t atom
; /* class atom
*/
2413 int is_unicode
; /* ANSI or unicode
*/
2414 int dpi
; /* window DPI
*/
2415 int awareness
; /* DPI awareness
*/
2419 /* Set some information in a window
*/
2420 @
REQ(set_window_info
)
2421 unsigned short flags
; /* flags for fields to
set (see below
) */
2422 short int is_unicode
; /* ANSI or unicode
*/
2423 user_handle_t handle
; /* handle to the window
*/
2424 unsigned int style
; /* window style
*/
2425 unsigned int ex_style
; /* window extended style
*/
2426 data_size_t extra_size
; /* size to set in extra bytes
*/
2427 mod_handle_t instance
; /* creator instance
*/
2428 lparam_t user_data
; /* user
-specific data
*/
2429 lparam_t extra_value
; /* value to set in extra bytes or window id
*/
2430 int extra_offset
; /* offset to set in extra bytes
*/
2432 unsigned int old_style
; /* old window style
*/
2433 unsigned int old_ex_style
; /* old window extended style
*/
2434 mod_handle_t old_instance
; /* old creator instance
*/
2435 lparam_t old_user_data
; /* old user
-specific data
*/
2436 lparam_t old_extra_value
; /* old value in extra bytes
*/
2437 lparam_t old_id
; /* old window id
*/
2439 #define SET_WIN_STYLE
0x01
2440 #define SET_WIN_EXSTYLE
0x02
2441 #define SET_WIN_ID
0x04
2442 #define SET_WIN_INSTANCE
0x08
2443 #define SET_WIN_USERDATA
0x10
2444 #define SET_WIN_EXTRA
0x20
2445 #define SET_WIN_UNICODE
0x40
2448 /* Set the parent of a window
*/
2450 user_handle_t handle
; /* handle to the window
*/
2451 user_handle_t parent
; /* handle to the parent
*/
2453 user_handle_t old_parent
; /* old parent window
*/
2454 user_handle_t full_parent
; /* full handle of new parent
*/
2455 int dpi
; /* new window DPI if not per
-monitor aware
*/
2456 int awareness
; /* new DPI awareness
*/
2460 /* Get a list of the window parents
, up to the root of the tree
*/
2461 @
REQ(get_window_parents
)
2462 user_handle_t handle
; /* handle to the window
*/
2464 int count
; /* total count of parents
*/
2465 VARARG(parents
,user_handles
); /* parent handles
*/
2469 /* Get a list of the window children
*/
2470 @
REQ(get_window_children
)
2471 obj_handle_t desktop
; /* handle to desktop
*/
2472 user_handle_t parent
; /* parent window
*/
2473 atom_t atom
; /* class atom for the listed children
*/
2474 thread_id_t tid
; /* thread owning the listed children
*/
2475 VARARG(class
,unicode_str
); /* class name
*/
2477 int count
; /* total count of children
*/
2478 VARARG(children
,user_handles
); /* children handles
*/
2482 /* Get a list of the window children that contain a given point
*/
2483 @
REQ(get_window_children_from_point
)
2484 user_handle_t parent
; /* parent window
*/
2485 int x
; /* point in parent coordinates
*/
2487 int dpi
; /* dpi for the point coordinates
*/
2489 int count
; /* total count of children
*/
2490 VARARG(children
,user_handles
); /* children handles
*/
2494 /* Get window tree information from a window handle
*/
2495 @
REQ(get_window_tree
)
2496 user_handle_t handle
; /* handle to the window
*/
2498 user_handle_t parent
; /* parent window
*/
2499 user_handle_t owner
; /* owner window
*/
2500 user_handle_t next_sibling
; /* next sibling in Z
-order
*/
2501 user_handle_t prev_sibling
; /* prev sibling in Z
-order
*/
2502 user_handle_t first_sibling
; /* first sibling in Z
-order
*/
2503 user_handle_t last_sibling
; /* last sibling in Z
-order
*/
2504 user_handle_t first_child
; /* first child
*/
2505 user_handle_t last_child
; /* last child
*/
2508 /* Set the position and Z order of a window
*/
2509 @
REQ(set_window_pos
)
2510 unsigned short swp_flags
; /* SWP_
* flags
*/
2511 unsigned short paint_flags
; /* paint
flags (see below
) */
2512 user_handle_t handle
; /* handle to the window
*/
2513 user_handle_t previous
; /* previous window in Z order
*/
2514 rectangle_t window
; /* window
rectangle (in parent coords
) */
2515 rectangle_t client
; /* client
rectangle (in parent coords
) */
2516 VARARG(valid
,rectangles
); /* valid rectangles from
WM_NCCALCSIZE (in parent coords
) */
2518 unsigned int new_style
; /* new window style
*/
2519 unsigned int new_ex_style
; /* new window extended style
*/
2520 user_handle_t surface_win
; /* parent window that holds the surface
*/
2521 int needs_update
; /* whether the surface region needs an update
*/
2523 #define SET_WINPOS_PAINT_SURFACE
0x01 /* window has a paintable surface
*/
2524 #define SET_WINPOS_PIXEL_FORMAT
0x02 /* window has a custom pixel format
*/
2526 /* Get the window and client rectangles of a window
*/
2527 @
REQ(get_window_rectangles
)
2528 user_handle_t handle
; /* handle to the window
*/
2529 int relative
; /* coords relative
to (see below
) */
2530 int dpi
; /* DPI to map to
, or zero for per
-monitor DPI
*/
2532 rectangle_t window
; /* window rectangle
*/
2533 rectangle_t client
; /* client rectangle
*/
2535 enum coords_relative
2537 COORDS_CLIENT
, /* relative to client area
*/
2538 COORDS_WINDOW
, /* relative to whole window area
*/
2539 COORDS_PARENT
, /* relative to parent
's client area */
2540 COORDS_SCREEN /* relative to screen origin */
2544 /* Get the window text */
2545 @REQ(get_window_text)
2546 user_handle_t handle; /* handle to the window */
2548 data_size_t length; /* total length in WCHARs */
2549 VARARG(text,unicode_str); /* window text */
2553 /* Set the window text */
2554 @REQ(set_window_text)
2555 user_handle_t handle; /* handle to the window */
2556 VARARG(text,unicode_str); /* window text */
2560 /* Get the coordinates offset between two windows */
2561 @REQ(get_windows_offset)
2562 user_handle_t from; /* handle to the first window */
2563 user_handle_t to; /* handle to the second window */
2564 int dpi; /* DPI to map to, or zero for per-monitor DPI */
2566 int x; /* x coordinate offset */
2567 int y; /* y coordinate offset */
2568 int mirror; /* whether to mirror the x coordinate */
2572 /* Get the visible region of a window */
2573 @REQ(get_visible_region)
2574 user_handle_t window; /* handle to the window */
2575 unsigned int flags; /* DCX flags */
2577 user_handle_t top_win; /* top window to clip against */
2578 rectangle_t top_rect; /* top window visible rect with screen coords */
2579 rectangle_t win_rect; /* window rect in screen coords */
2580 unsigned int paint_flags; /* paint flags (from SET_WINPOS_* flags) */
2581 data_size_t total_size; /* total size of the resulting region */
2582 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2586 /* Get the visible surface region of a window */
2587 @REQ(get_surface_region)
2588 user_handle_t window; /* handle to the window */
2590 rectangle_t visible_rect; /* window visible rect in screen coords */
2591 data_size_t total_size; /* total size of the resulting region */
2592 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2596 /* Get the window region */
2597 @REQ(get_window_region)
2598 user_handle_t window; /* handle to the window */
2600 data_size_t total_size; /* total size of the resulting region */
2601 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2605 /* Set the window region */
2606 @REQ(set_window_region)
2607 user_handle_t window; /* handle to the window */
2608 int redraw; /* redraw the window? */
2609 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2613 /* Get the window update region */
2614 @REQ(get_update_region)
2615 user_handle_t window; /* handle to the window */
2616 user_handle_t from_child; /* child to start searching from */
2617 unsigned int flags; /* update flags (see below) */
2619 user_handle_t child; /* child to repaint (or window itself) */
2620 unsigned int flags; /* resulting update flags (see below) */
2621 data_size_t total_size; /* total size of the resulting region */
2622 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2624 #define UPDATE_NONCLIENT 0x001 /* get region for repainting non-client area */
2625 #define UPDATE_ERASE 0x002 /* get region for erasing client area */
2626 #define UPDATE_PAINT 0x004 /* get region for painting client area */
2627 #define UPDATE_INTERNALPAINT 0x008 /* get region if internal paint is pending */
2628 #define UPDATE_ALLCHILDREN 0x010 /* force repaint of all children */
2629 #define UPDATE_NOCHILDREN 0x020 /* don't try to repaint any children
*/
2630 #define UPDATE_NOREGION
0x040 /* don
't return a region, only the flags */
2631 #define UPDATE_DELAYED_ERASE 0x080 /* still needs erase after BeginPaint */
2632 #define UPDATE_CLIPCHILDREN 0x100 /* remove clipped children from the update region */
2635 /* Update the z order of a window so that a given rectangle is fully visible */
2636 @REQ(update_window_zorder)
2637 user_handle_t window; /* handle to the window */
2638 rectangle_t rect; /* rectangle that must be visible (in client coords) */
2642 /* Mark parts of a window as needing a redraw */
2644 user_handle_t window; /* handle to the window */
2645 unsigned int flags; /* RDW_* flags */
2646 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2650 /* Set a window property */
2651 @REQ(set_window_property)
2652 user_handle_t window; /* handle to the window */
2653 lparam_t data; /* data to store */
2654 atom_t atom; /* property atom (if no name specified) */
2655 VARARG(name,unicode_str); /* property name */
2659 /* Remove a window property */
2660 @REQ(remove_window_property)
2661 user_handle_t window; /* handle to the window */
2662 atom_t atom; /* property atom (if no name specified) */
2663 VARARG(name,unicode_str); /* property name */
2665 lparam_t data; /* data stored in property */
2669 /* Get a window property */
2670 @REQ(get_window_property)
2671 user_handle_t window; /* handle to the window */
2672 atom_t atom; /* property atom (if no name specified) */
2673 VARARG(name,unicode_str); /* property name */
2675 lparam_t data; /* data stored in property */
2679 /* Get the list of properties of a window */
2680 @REQ(get_window_properties)
2681 user_handle_t window; /* handle to the window */
2683 int total; /* total number of properties */
2684 VARARG(props,properties); /* list of properties */
2688 /* Create a window station */
2689 @REQ(create_winstation)
2690 unsigned int flags; /* window station flags */
2691 unsigned int access; /* wanted access rights */
2692 unsigned int attributes; /* object attributes */
2693 obj_handle_t rootdir; /* root directory */
2694 VARARG(name,unicode_str); /* object name */
2696 obj_handle_t handle; /* handle to the window station */
2700 /* Open a handle to a window station */
2701 @REQ(open_winstation)
2702 unsigned int access; /* wanted access rights */
2703 unsigned int attributes; /* object attributes */
2704 obj_handle_t rootdir; /* root directory */
2705 VARARG(name,unicode_str); /* object name */
2707 obj_handle_t handle; /* handle to the window station */
2711 /* Close a window station */
2712 @REQ(close_winstation)
2713 obj_handle_t handle; /* handle to the window station */
2717 /* Get the process current window station */
2718 @REQ(get_process_winstation)
2720 obj_handle_t handle; /* handle to the window station */
2724 /* Set the process current window station */
2725 @REQ(set_process_winstation)
2726 obj_handle_t handle; /* handle to the window station */
2730 /* Enumerate window stations */
2731 @REQ(enum_winstation)
2732 unsigned int index; /* current index */
2734 unsigned int next; /* next index */
2735 VARARG(name,unicode_str); /* window station name */
2739 /* Create a desktop */
2740 @REQ(create_desktop)
2741 unsigned int flags; /* desktop flags */
2742 unsigned int access; /* wanted access rights */
2743 unsigned int attributes; /* object attributes */
2744 VARARG(name,unicode_str); /* object name */
2746 obj_handle_t handle; /* handle to the desktop */
2750 /* Open a handle to a desktop */
2752 obj_handle_t winsta; /* window station to open (null allowed) */
2753 unsigned int flags; /* desktop flags */
2754 unsigned int access; /* wanted access rights */
2755 unsigned int attributes; /* object attributes */
2756 VARARG(name,unicode_str); /* object name */
2758 obj_handle_t handle; /* handle to the desktop */
2762 /* Open a handle to current input desktop */
2763 @REQ(open_input_desktop)
2764 unsigned int flags; /* desktop flags */
2765 unsigned int access; /* wanted access rights */
2766 unsigned int attributes; /* object attributes */
2768 obj_handle_t handle; /* handle to the desktop */
2772 /* Close a desktop */
2774 obj_handle_t handle; /* handle to the desktop */
2778 /* Get the thread current desktop */
2779 @REQ(get_thread_desktop)
2780 thread_id_t tid; /* thread id */
2782 obj_handle_t handle; /* handle to the desktop */
2786 /* Set the thread current desktop */
2787 @REQ(set_thread_desktop)
2788 obj_handle_t handle; /* handle to the desktop */
2792 /* Enumerate desktops */
2794 obj_handle_t winstation; /* handle to the window station */
2795 unsigned int index; /* current index */
2797 unsigned int next; /* next index */
2798 VARARG(name,unicode_str); /* window station name */
2802 /* Get/set information about a user object (window station or desktop) */
2803 @REQ(set_user_object_info)
2804 obj_handle_t handle; /* handle to the object */
2805 unsigned int flags; /* information to set/get */
2806 unsigned int obj_flags; /* new object flags */
2808 int is_desktop; /* is object a desktop? */
2809 unsigned int old_obj_flags; /* old object flags */
2810 VARARG(name,unicode_str); /* object name */
2812 #define SET_USER_OBJECT_SET_FLAGS 1
2813 #define SET_USER_OBJECT_GET_FULL_NAME 2
2816 /* Register a hotkey */
2817 @REQ(register_hotkey)
2818 user_handle_t window; /* handle to the window */
2819 int id; /* hotkey identifier */
2820 unsigned int flags; /* modifier keys */
2821 unsigned int vkey; /* virtual key code */
2823 int replaced; /* did we replace an existing hotkey? */
2824 unsigned int flags; /* flags of replaced hotkey */
2825 unsigned int vkey; /* virtual key code of replaced hotkey */
2829 /* Unregister a hotkey */
2830 @REQ(unregister_hotkey)
2831 user_handle_t window; /* handle to the window */
2832 int id; /* hotkey identifier */
2834 unsigned int flags; /* flags of removed hotkey */
2835 unsigned int vkey; /* virtual key code of removed hotkey */
2839 /* Attach (or detach) thread inputs */
2840 @REQ(attach_thread_input)
2841 thread_id_t tid_from; /* thread to be attached */
2842 thread_id_t tid_to; /* thread to which tid_from should be attached */
2843 int attach; /* is it an attach? */
2847 /* Get input data for a given thread */
2848 @REQ(get_thread_input)
2849 thread_id_t tid; /* id of thread */
2851 user_handle_t focus; /* handle to the focus window */
2852 user_handle_t capture; /* handle to the capture window */
2853 user_handle_t active; /* handle to the active window */
2854 user_handle_t foreground; /* handle to the global foreground window */
2855 user_handle_t menu_owner; /* handle to the menu owner */
2856 user_handle_t move_size; /* handle to the moving/resizing window */
2857 user_handle_t caret; /* handle to the caret window */
2858 user_handle_t cursor; /* handle to the cursor */
2859 int show_count; /* cursor show count */
2860 rectangle_t rect; /* caret rectangle */
2864 /* Get the time of the last input event */
2865 @REQ(get_last_input_time)
2871 /* Retrieve queue keyboard state for current thread or global async state */
2873 int async; /* whether to query the async state */
2874 int key; /* optional key code or -1 */
2876 unsigned char state; /* state of specified key */
2877 VARARG(keystate,bytes); /* state array for all the keys */
2880 /* Set queue keyboard state for current thread */
2882 int async; /* whether to change the async state too */
2883 VARARG(keystate,bytes); /* state array for all the keys */
2886 /* Set the system foreground window */
2887 @REQ(set_foreground_window)
2888 user_handle_t handle; /* handle to the foreground window */
2890 user_handle_t previous; /* handle to the previous foreground window */
2891 int send_msg_old; /* whether we have to send a msg to the old window */
2892 int send_msg_new; /* whether we have to send a msg to the new window */
2895 /* Set the current thread focus window */
2896 @REQ(set_focus_window)
2897 user_handle_t handle; /* handle to the focus window */
2899 user_handle_t previous; /* handle to the previous focus window */
2902 /* Set the current thread active window */
2903 @REQ(set_active_window)
2904 user_handle_t handle; /* handle to the active window */
2906 user_handle_t previous; /* handle to the previous active window */
2909 /* Set the current thread capture window */
2910 @REQ(set_capture_window)
2911 user_handle_t handle; /* handle to the capture window */
2912 unsigned int flags; /* capture flags (see below) */
2914 user_handle_t previous; /* handle to the previous capture window */
2915 user_handle_t full_handle; /* full 32-bit handle of new capture window */
2917 #define CAPTURE_MENU 0x01 /* capture is for a menu */
2918 #define CAPTURE_MOVESIZE 0x02 /* capture is for moving/resizing */
2921 /* Set the current thread caret window */
2922 @REQ(set_caret_window)
2923 user_handle_t handle; /* handle to the caret window */
2924 int width; /* caret width */
2925 int height; /* caret height */
2927 user_handle_t previous; /* handle to the previous caret window */
2928 rectangle_t old_rect; /* previous caret rectangle */
2929 int old_hide; /* previous hide count */
2930 int old_state; /* previous caret state (1=on, 0=off) */
2934 /* Set the current thread caret information */
2935 @REQ(set_caret_info)
2936 unsigned int flags; /* caret flags (see below) */
2937 user_handle_t handle; /* handle to the caret window */
2938 int x; /* caret x position */
2939 int y; /* caret y position */
2940 int hide; /* increment for hide count (can be negative to show it) */
2941 int state; /* caret state (see below) */
2943 user_handle_t full_handle; /* handle to the current caret window */
2944 rectangle_t old_rect; /* previous caret rectangle */
2945 int old_hide; /* previous hide count */
2946 int old_state; /* previous caret state (1=on, 0=off) */
2948 #define SET_CARET_POS 0x01 /* set the caret position from x,y */
2949 #define SET_CARET_HIDE 0x02 /* increment the caret hide count */
2950 #define SET_CARET_STATE 0x04 /* set the caret on/off state */
2953 CARET_STATE_OFF, /* off */
2954 CARET_STATE_ON, /* on */
2955 CARET_STATE_TOGGLE, /* toggle current state */
2956 CARET_STATE_ON_IF_MOVED /* on if the position differs, unchanged otherwise */
2960 /* Set a window hook */
2962 int id; /* id of the hook */
2963 process_id_t pid; /* id of process to set the hook into */
2964 thread_id_t tid; /* id of thread to set the hook into */
2967 client_ptr_t proc; /* hook procedure */
2969 int unicode; /* is it a unicode hook? */
2970 VARARG(module,unicode_str); /* module name */
2972 user_handle_t handle; /* handle to the hook */
2973 unsigned int active_hooks; /* active hooks bitmap */
2977 /* Remove a window hook */
2979 user_handle_t handle; /* handle to the hook */
2980 client_ptr_t proc; /* hook procedure if handle is 0 */
2981 int id; /* id of the hook if handle is 0 */
2983 unsigned int active_hooks; /* active hooks bitmap */
2987 /* Start calling a hook chain */
2988 @REQ(start_hook_chain)
2989 int id; /* id of the hook */
2990 int event; /* signalled event */
2991 user_handle_t window; /* handle to the event window */
2992 int object_id; /* object id for out of context winevent */
2993 int child_id; /* child id for out of context winevent */
2995 user_handle_t handle; /* handle to the next hook */
2996 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2997 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2998 int unicode; /* is it a unicode hook? */
2999 client_ptr_t proc; /* hook procedure */
3000 unsigned int active_hooks; /* active hooks bitmap */
3001 VARARG(module,unicode_str); /* module name */
3005 /* Finished calling a hook chain */
3006 @REQ(finish_hook_chain)
3007 int id; /* id of the hook */
3011 /* Get the hook information */
3013 user_handle_t handle; /* handle to the current hook */
3014 int get_next; /* do we want info about current or next hook? */
3015 int event; /* signalled event */
3016 user_handle_t window; /* handle to the event window */
3017 int object_id; /* object id for out of context winevent */
3018 int child_id; /* child id for out of context winevent */
3020 user_handle_t handle; /* handle to the hook */
3021 int id; /* id of the hook */
3022 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
3023 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
3024 client_ptr_t proc; /* hook procedure */
3025 int unicode; /* is it a unicode hook? */
3026 VARARG(module,unicode_str); /* module name */
3030 /* Create a window class */
3032 int local; /* is it a local class? */
3033 atom_t atom; /* class atom */
3034 unsigned int style; /* class style */
3035 mod_handle_t instance; /* module instance */
3036 int extra; /* number of extra class bytes */
3037 int win_extra; /* number of window extra bytes */
3038 client_ptr_t client_ptr; /* pointer to class in client address space */
3039 data_size_t name_offset; /* base class name offset for specified atom */
3040 VARARG(name,unicode_str); /* class name */
3042 atom_t atom; /* resulting class atom */
3046 /* Destroy a window class */
3048 atom_t atom; /* class atom */
3049 mod_handle_t instance; /* module instance */
3050 VARARG(name,unicode_str); /* class name */
3052 client_ptr_t client_ptr; /* pointer to class in client address space */
3056 /* Set some information in a class */
3057 @REQ(set_class_info)
3058 user_handle_t window; /* handle to the window */
3059 unsigned int flags; /* flags for info to set (see below) */
3060 atom_t atom; /* class atom */
3061 unsigned int style; /* class style */
3062 int win_extra; /* number of window extra bytes */
3063 mod_handle_t instance; /* module instance */
3064 int extra_offset; /* offset to set in extra bytes */
3065 data_size_t extra_size; /* size to set in extra bytes */
3066 lparam_t extra_value; /* value to set in extra bytes */
3068 atom_t old_atom; /* previous class atom */
3069 atom_t base_atom; /* base class atom */
3070 mod_handle_t old_instance; /* previous module instance */
3071 lparam_t old_extra_value; /* old value in extra bytes */
3072 unsigned int old_style; /* previous class style */
3073 int old_extra; /* previous number of class extra bytes */
3074 int old_win_extra; /* previous number of window extra bytes */
3076 #define SET_CLASS_ATOM 0x0001
3077 #define SET_CLASS_STYLE 0x0002
3078 #define SET_CLASS_WINEXTRA 0x0004
3079 #define SET_CLASS_INSTANCE 0x0008
3080 #define SET_CLASS_EXTRA 0x0010
3083 /* Open the clipboard */
3084 @REQ(open_clipboard)
3085 user_handle_t window; /* clipboard window */
3087 user_handle_t owner; /* current clipboard owner */
3091 /* Close the clipboard */
3092 @REQ(close_clipboard)
3094 user_handle_t viewer; /* first clipboard viewer */
3095 user_handle_t owner; /* current clipboard owner */
3099 /* Empty the clipboard and grab ownership */
3100 @REQ(empty_clipboard)
3104 /* Add a data format to the clipboard */
3105 @REQ(set_clipboard_data)
3106 unsigned int format; /* clipboard format of the data */
3107 unsigned int lcid; /* locale id to use for synthesizing text formats */
3108 VARARG(data,bytes); /* data contents */
3110 unsigned int seqno; /* sequence number for the set data */
3114 /* Fetch a data format from the clipboard */
3115 @REQ(get_clipboard_data)
3116 unsigned int format; /* clipboard format of the data */
3117 int render; /* will we try to render it if missing? */
3118 int cached; /* do we already have it in the client-side cache? */
3119 unsigned int seqno; /* sequence number for the data in the cache */
3121 unsigned int from; /* for synthesized data, format to generate it from */
3122 user_handle_t owner; /* clipboard owner for delayed-rendered formats */
3123 unsigned int seqno; /* sequence number for the originally set data */
3124 data_size_t total; /* total data size */
3125 VARARG(data,bytes); /* data contents */
3129 /* Retrieve a list of available formats */
3130 @REQ(get_clipboard_formats)
3131 unsigned int format; /* specific format to query, return all if 0 */
3133 unsigned int count; /* count of available formats */
3134 VARARG(formats,uints); /* array of available formats */
3138 /* Retrieve the next available format */
3139 @REQ(enum_clipboard_formats)
3140 unsigned int previous; /* previous format, or first if 0 */
3142 unsigned int format; /* next format */
3146 /* Release ownership of the clipboard */
3147 @REQ(release_clipboard)
3148 user_handle_t owner; /* clipboard owner to release */
3150 user_handle_t viewer; /* first clipboard viewer */
3151 user_handle_t owner; /* current clipboard owner */
3155 /* Get clipboard information */
3156 @REQ(get_clipboard_info)
3158 user_handle_t window; /* clipboard window */
3159 user_handle_t owner; /* clipboard owner */
3160 user_handle_t viewer; /* clipboard viewer */
3161 unsigned int seqno; /* current sequence number */
3165 /* Set the clipboard viewer window */
3166 @REQ(set_clipboard_viewer)
3167 user_handle_t viewer; /* clipboard viewer */
3168 user_handle_t previous; /* if non-zero, check that this was the previous viewer */
3170 user_handle_t old_viewer; /* previous clipboard viewer */
3171 user_handle_t owner; /* clipboard owner */
3175 /* Add a clipboard listener window */
3176 @REQ(add_clipboard_listener)
3177 user_handle_t window; /* clipboard listener window */
3181 /* Remove a clipboard listener window */
3182 @REQ(remove_clipboard_listener)
3183 user_handle_t window; /* clipboard listener window */
3187 /* Create a security token */
3189 struct luid token_id;
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 abstime_t expire; /* expiration time */
3197 /* VARARG(objattr,object_attributes); */
3198 /* VARARG(user,sid); */
3199 /* VARARG(groups,sid); */
3200 /* VARARG(privs,luid_attr); */
3201 /* VARARG(dacl,acl); */
3203 obj_handle_t token; /* handle to the token */
3207 /* Open a security token */
3209 obj_handle_t handle; /* handle to the thread or process */
3210 unsigned int access; /* access rights to the new token */
3211 unsigned int attributes;/* object attributes */
3212 unsigned int flags; /* flags (see below) */
3214 obj_handle_t token; /* handle to the token */
3216 #define OPEN_TOKEN_THREAD 1
3217 #define OPEN_TOKEN_AS_SELF 2
3220 /* Set/get the global windows */
3221 @REQ(set_global_windows)
3222 unsigned int flags; /* flags for fields to set (see below) */
3223 user_handle_t shell_window; /* handle to the new shell window */
3224 user_handle_t shell_listview; /* handle to the new shell listview window */
3225 user_handle_t progman_window; /* handle to the new program manager window */
3226 user_handle_t taskman_window; /* handle to the new task manager window */
3228 user_handle_t old_shell_window; /* handle to the shell window */
3229 user_handle_t old_shell_listview; /* handle to the shell listview window */
3230 user_handle_t old_progman_window; /* handle to the new program manager window */
3231 user_handle_t old_taskman_window; /* handle to the new task manager window */
3233 #define SET_GLOBAL_SHELL_WINDOWS 0x01 /* set both main shell and listview windows */
3234 #define SET_GLOBAL_PROGMAN_WINDOW 0x02
3235 #define SET_GLOBAL_TASKMAN_WINDOW 0x04
3237 /* Adjust the privileges held by a token */
3238 @REQ(adjust_token_privileges)
3239 obj_handle_t handle; /* handle to the token */
3240 int disable_all; /* disable all privileges? */
3241 int get_modified_state; /* get modified privileges? */
3242 VARARG(privileges,luid_attr); /* privileges to enable/disable/remove */
3244 unsigned int len; /* total length in bytes required to store token privileges */
3245 VARARG(privileges,luid_attr); /* modified privileges */
3248 /* Retrieves the set of privileges held by or available to a token */
3249 @REQ(get_token_privileges)
3250 obj_handle_t handle; /* handle to the token */
3252 unsigned int len; /* total length in bytes required to store token privileges */
3253 VARARG(privileges,luid_attr); /* privileges held by or available to a token */
3256 /* Check the token has the required privileges */
3257 @REQ(check_token_privileges)
3258 obj_handle_t handle; /* handle to the token */
3259 int all_required; /* are all the privileges required for the check to succeed? */
3260 VARARG(privileges,luid_attr); /* privileges to check */
3262 int has_privileges; /* does the token have the required privileges? */
3263 VARARG(privileges,luid_attr); /* privileges held by or available to a token */
3266 @REQ(duplicate_token)
3267 obj_handle_t handle; /* handle to the token to duplicate */
3268 unsigned int access; /* access rights to the new token */
3269 int primary; /* is the new token to be a primary one? */
3270 int impersonation_level; /* impersonation level of the new token */
3271 VARARG(objattr,object_attributes); /* object attributes */
3273 obj_handle_t new_handle; /* duplicated handle */
3277 obj_handle_t handle; /* handle to the token to duplicate */
3278 unsigned int flags; /* flags */
3279 data_size_t privileges_size; /* size of privileges */
3280 VARARG(privileges,luid_attr,privileges_size); /* privileges to remove from new token */
3281 VARARG(disable_sids,sid); /* array of groups to remove from new token */
3283 obj_handle_t new_handle; /* filtered handle */
3287 obj_handle_t handle; /* handle to the token */
3288 unsigned int desired_access; /* desired access to the object */
3289 generic_map_t mapping; /* mapping to specific rights */
3290 VARARG(sd,security_descriptor); /* security descriptor to check */
3292 unsigned int access_granted; /* access rights actually granted */
3293 unsigned int access_status; /* was access granted? */
3294 unsigned int privileges_len; /* length needed to store privileges */
3295 VARARG(privileges,luid_attr); /* privileges used during access check */
3299 obj_handle_t handle; /* handle to the token */
3300 unsigned int which_sid; /* which SID to retrieve from the token */
3302 data_size_t sid_len; /* length needed to store sid */
3303 VARARG(sid,sid); /* the sid specified by which_sid from the token */
3306 @REQ(get_token_groups)
3307 obj_handle_t handle; /* handle to the token */
3308 unsigned int attr_mask; /* mask for wanted attributes */
3310 data_size_t attr_len; /* length needed to store attrs */
3311 data_size_t sid_len; /* length needed to store sids */
3312 VARARG(attrs,uints,attr_len); /* group attributes */
3313 VARARG(sids,sids); /* group sids */
3316 @REQ(get_token_default_dacl)
3317 obj_handle_t handle; /* handle to the token */
3319 data_size_t acl_len; /* length needed to store access control list */
3320 VARARG(acl,acl); /* access control list */
3323 @REQ(set_token_default_dacl)
3324 obj_handle_t handle; /* handle to the token */
3325 VARARG(acl,acl); /* default dacl to set */
3328 @REQ(set_security_object)
3329 obj_handle_t handle; /* handle to the object */
3330 unsigned int security_info; /* which parts of security descriptor to set */
3331 VARARG(sd,security_descriptor); /* security descriptor to set */
3334 @REQ(get_security_object)
3335 obj_handle_t handle; /* handle to the object */
3336 unsigned int security_info; /* which parts of security descriptor to get */
3338 unsigned int sd_len; /* buffer size needed for sd */
3339 VARARG(sd,security_descriptor); /* retrieved security descriptor */
3346 obj_handle_t handle;
3347 unsigned int access;
3348 unsigned int attributes;
3352 /* Return a list of all opened handles */
3353 @REQ(get_system_handles)
3355 unsigned int count; /* number of handles */
3356 VARARG(data,handle_infos); /* array of handle_infos */
3360 /* Create a mailslot */
3361 @REQ(create_mailslot)
3362 unsigned int access; /* wanted access rights */
3363 timeout_t read_timeout;
3364 unsigned int max_msgsize;
3365 VARARG(objattr,object_attributes); /* object attributes */
3367 obj_handle_t handle; /* handle to the mailslot */
3371 /* Set mailslot information */
3372 @REQ(set_mailslot_info)
3373 obj_handle_t handle; /* handle to the mailslot */
3374 timeout_t read_timeout;
3377 timeout_t read_timeout;
3378 unsigned int max_msgsize;
3380 #define MAILSLOT_SET_READ_TIMEOUT 1
3383 /* Create a directory object */
3384 @REQ(create_directory)
3385 unsigned int access; /* access flags */
3386 VARARG(objattr,object_attributes); /* object attributes */
3388 obj_handle_t handle; /* handle to the directory */
3392 /* Open a directory object */
3393 @REQ(open_directory)
3394 unsigned int access; /* access flags */
3395 unsigned int attributes; /* object attributes */
3396 obj_handle_t rootdir; /* root directory */
3397 VARARG(directory_name,unicode_str); /* Directory name */
3399 obj_handle_t handle; /* handle to the directory */
3403 /* Get a directory entry by index */
3404 @REQ(get_directory_entry)
3405 obj_handle_t handle; /* handle to the directory */
3406 unsigned int index; /* entry index */
3408 data_size_t total_len; /* total length needed for strings */
3409 data_size_t name_len; /* length of the entry name in bytes */
3410 VARARG(name,unicode_str,name_len); /* entry name */
3411 VARARG(type,unicode_str); /* entry type */
3415 /* Create a symbolic link object */
3416 @REQ(create_symlink)
3417 unsigned int access; /* access flags */
3418 VARARG(objattr,object_attributes); /* object attributes */
3419 VARARG(target_name,unicode_str); /* target name */
3421 obj_handle_t handle; /* handle to the symlink */
3425 /* Open a symbolic link object */
3427 unsigned int access; /* access flags */
3428 unsigned int attributes; /* object attributes */
3429 obj_handle_t rootdir; /* root directory */
3430 VARARG(name,unicode_str); /* symlink name */
3432 obj_handle_t handle; /* handle to the symlink */
3436 /* Query a symbolic link object */
3438 obj_handle_t handle; /* handle to the symlink */
3440 data_size_t total; /* total needed size for name */
3441 VARARG(target_name,unicode_str); /* target name */
3445 /* Query basic object information */
3446 @REQ(get_object_info)
3447 obj_handle_t handle; /* handle to the object */
3449 unsigned int access; /* granted access mask */
3450 unsigned int ref_count; /* object ref count */
3451 unsigned int handle_count; /* object handle count */
3455 /* Query the full name of an object */
3456 @REQ(get_object_name)
3457 obj_handle_t handle; /* handle to the object */
3459 data_size_t total; /* total needed size for name */
3460 VARARG(name,unicode_str); /* object name */
3464 /* Query object type name information */
3465 @REQ(get_object_type)
3466 obj_handle_t handle; /* handle to the object */
3468 VARARG(info,object_type_info); /* type information */
3472 /* Query type information for all types */
3473 @REQ(get_object_types)
3475 int count; /* total count of object types */
3476 VARARG(info,object_types_info); /* type information */
3480 /* Allocate a locally-unique identifier */
3481 @REQ(allocate_locally_unique_id)
3487 /* Create a device manager */
3488 @REQ(create_device_manager)
3489 unsigned int access; /* wanted access rights */
3490 unsigned int attributes; /* object attributes */
3492 obj_handle_t handle; /* handle to the device */
3496 /* Create a device */
3498 obj_handle_t rootdir; /* root directory */
3499 client_ptr_t user_ptr; /* opaque ptr for use by client */
3500 obj_handle_t manager; /* device manager */
3501 VARARG(name,unicode_str); /* object name */
3505 /* Delete a device */
3507 obj_handle_t manager; /* handle to the device manager */
3508 client_ptr_t device; /* pointer to the device */
3512 /* Retrieve the next pending device irp request */
3513 @REQ(get_next_device_request)
3514 obj_handle_t manager; /* handle to the device manager */
3515 obj_handle_t prev; /* handle to the previous irp */
3516 unsigned int status; /* status of the previous irp */
3517 client_ptr_t user_ptr; /* user pointer of the previous irp */
3518 int pending; /* was the previous irp marked pending? */
3519 unsigned int iosb_status; /* IOSB status of the previous irp */
3520 data_size_t result; /* IOSB result of the previous irp */
3521 VARARG(data,bytes); /* output data of the previous irp */
3523 irp_params_t params; /* irp parameters */
3524 obj_handle_t next; /* handle to the next irp */
3525 thread_id_t client_tid; /* tid of thread calling irp */
3526 client_ptr_t client_thread; /* pointer to thread object of calling irp */
3527 data_size_t in_size; /* total needed input size */
3528 VARARG(next_data,bytes); /* input data of the next irp */
3532 /* Get kernel pointer from server object */
3533 @REQ(get_kernel_object_ptr)
3534 obj_handle_t manager; /* handle to the device manager */
3535 obj_handle_t handle; /* object handle */
3537 client_ptr_t user_ptr; /* kernel object pointer */
3541 /* Associate kernel pointer with server object */
3542 @REQ(set_kernel_object_ptr)
3543 obj_handle_t manager; /* handle to the device manager */
3544 obj_handle_t handle; /* object handle */
3545 client_ptr_t user_ptr; /* kernel object pointer */
3549 /* Grab server object reference from kernel object pointer */
3550 @REQ(grab_kernel_object)
3551 obj_handle_t manager; /* handle to the device manager */
3552 client_ptr_t user_ptr; /* kernel object pointer */
3556 /* Release server object reference from kernel object pointer */
3557 @REQ(release_kernel_object)
3558 obj_handle_t manager; /* handle to the device manager */
3559 client_ptr_t user_ptr; /* kernel object pointer */
3563 /* Get handle from kernel object pointer */
3564 @REQ(get_kernel_object_handle)
3565 obj_handle_t manager; /* handle to the device manager */
3566 client_ptr_t user_ptr; /* kernel object pointer */
3567 unsigned int access; /* wanted access rights */
3569 obj_handle_t handle; /* kernel object handle */
3573 /* Make the current process a system process */
3574 @REQ(make_process_system)
3575 obj_handle_t handle; /* handle to the process */
3577 obj_handle_t event; /* event signaled when all user processes have exited */
3581 /* Get detailed fixed-size information about a token */
3582 @REQ(get_token_info)
3583 obj_handle_t handle; /* handle to the object */
3585 struct luid token_id; /* locally-unique identifier of the token */
3586 struct luid modified_id; /* locally-unique identifier of the modified version of the token */
3587 unsigned int session_id; /* token session id */
3588 int primary; /* is the token primary or impersonation? */
3589 int impersonation_level; /* level of impersonation */
3590 int elevation; /* elevation type */
3591 int group_count; /* the number of groups the token is a member of */
3592 int privilege_count; /* the number of privileges the token has */
3596 /* Create a token which is an elevation counterpart to this token */
3597 @REQ(create_linked_token)
3598 obj_handle_t handle; /* handle to the token */
3600 obj_handle_t linked; /* handle to the linked token */
3604 /* Create I/O completion port */
3605 @REQ(create_completion)
3606 unsigned int access; /* desired access to a port */
3607 unsigned int concurrent; /* max number of concurrent active threads */
3608 VARARG(objattr,object_attributes); /* object attributes */
3610 obj_handle_t handle; /* port handle */
3614 /* Open I/O completion port */
3615 @REQ(open_completion)
3616 unsigned int access; /* desired access to a port */
3617 unsigned int attributes; /* object attributes */
3618 obj_handle_t rootdir; /* root directory */
3619 VARARG(filename,unicode_str); /* port name */
3621 obj_handle_t handle; /* port handle */
3625 /* add completion to completion port */
3626 @REQ(add_completion)
3627 obj_handle_t handle; /* port handle */
3628 apc_param_t ckey; /* completion key */
3629 apc_param_t cvalue; /* completion value */
3630 apc_param_t information; /* IO_STATUS_BLOCK Information */
3631 unsigned int status; /* completion result */
3635 /* get completion from completion port queue */
3636 @REQ(remove_completion)
3637 obj_handle_t handle; /* port handle */
3639 apc_param_t ckey; /* completion key */
3640 apc_param_t cvalue; /* completion value */
3641 apc_param_t information; /* IO_STATUS_BLOCK Information */
3642 unsigned int status; /* completion result */
3646 /* get completion queue depth */
3647 @REQ(query_completion)
3648 obj_handle_t handle; /* port handle */
3650 unsigned int depth; /* completion queue depth */
3654 /* associate object with completion port */
3655 @REQ(set_completion_info)
3656 obj_handle_t handle; /* object handle */
3657 apc_param_t ckey; /* completion key */
3658 obj_handle_t chandle; /* port handle */
3662 /* check for associated completion and push msg */
3663 @REQ(add_fd_completion)
3664 obj_handle_t handle; /* async' object
*/
3665 apc_param_t cvalue
; /* completion value
*/
3666 apc_param_t information
; /* IO_STATUS_BLOCK Information
*/
3667 unsigned int status
; /* completion status
*/
3668 int async
; /* completion is an async result
*/
3672 /* set fd completion information
*/
3673 @
REQ(set_fd_completion_mode
)
3674 obj_handle_t handle
; /* handle to a file or directory
*/
3675 unsigned int flags
; /* completion notification flags
*/
3679 /* set fd disposition information
*/
3680 @
REQ(set_fd_disp_info
)
3681 obj_handle_t handle
; /* handle to a file or directory
*/
3682 unsigned int flags
; /* what actions should be taken when deleting a file
*/
3686 /* set fd name information
*/
3687 @
REQ(set_fd_name_info
)
3688 obj_handle_t handle
; /* handle to a file or directory
*/
3689 obj_handle_t rootdir
; /* root directory
*/
3690 data_size_t namelen
; /* length of NT name in bytes
*/
3691 int link
; /* link instead of renaming
*/
3692 unsigned int flags
; /* FILE_RENAME_
* flags
*/
3693 VARARG(name
,unicode_str
,namelen
); /* NT name
*/
3694 VARARG(filename
,string
); /* new file name
*/
3698 /* set fd eof information
*/
3699 @
REQ(set_fd_eof_info
)
3700 obj_handle_t handle
; /* handle to a file or directory
*/
3701 file_pos_t eof
; /* offset of eof of file
*/
3705 /* Retrieve layered info for a window
*/
3706 @
REQ(get_window_layered_info
)
3707 user_handle_t handle
; /* handle to the window
*/
3709 unsigned int color_key
; /* color key
*/
3710 unsigned int alpha
; /* alpha (0.
.255) */
3711 unsigned int flags
; /* LWA_
* flags
*/
3715 /* Set layered info for a window
*/
3716 @
REQ(set_window_layered_info
)
3717 user_handle_t handle
; /* handle to the window
*/
3718 unsigned int color_key
; /* color key
*/
3719 unsigned int alpha
; /* alpha (0.
.255) */
3720 unsigned int flags
; /* LWA_
* flags
*/
3724 /* Allocate an arbitrary user handle
*/
3725 @
REQ(alloc_user_handle
)
3727 user_handle_t handle
; /* allocated handle
*/
3731 /* Free an arbitrary user handle
*/
3732 @
REQ(free_user_handle
)
3733 user_handle_t handle
; /* handle to free
*/
3737 /* Set
/get the current cursor
*/
3739 unsigned int flags
; /* flags for fields to
set (see below
) */
3740 user_handle_t handle
; /* handle to the cursor
*/
3741 int show_count
; /* show count increment
/decrement
*/
3742 int x
; /* cursor position
*/
3744 rectangle_t clip
; /* cursor clip rectangle
*/
3746 user_handle_t prev_handle
; /* previous handle
*/
3747 int prev_count
; /* previous show count
*/
3748 int prev_x
; /* previous position
*/
3750 int new_x
; /* new position
*/
3752 rectangle_t new_clip
; /* new clip rectangle
*/
3753 unsigned int last_change
; /* time of last position change
*/
3755 #define SET_CURSOR_HANDLE
0x01
3756 #define SET_CURSOR_COUNT
0x02
3757 #define SET_CURSOR_POS
0x04
3758 #define SET_CURSOR_CLIP
0x08
3759 #define SET_CURSOR_NOCLIP
0x10
3760 #define SET_CURSOR_FSCLIP
0x20
3762 /* Get the history of the
64 last cursor positions
*/
3763 @
REQ(get_cursor_history
)
3765 VARARG(history
,cursor_positions
);
3769 /* Batch read rawinput message data
*/
3770 @
REQ(get_rawinput_buffer
)
3771 data_size_t header_size
; /* size of RAWINPUTHEADER structure
*/
3772 int read_data
; /* read the rawinput buffer data
*/
3774 data_size_t next_size
; /* minimum size to get next message data
*/
3779 /* Modify the list of registered rawinput devices
*/
3780 @
REQ(update_rawinput_devices
)
3781 VARARG(devices
,rawinput_devices
);
3784 /* Create a new job object
*/
3786 unsigned int access
; /* wanted access rights
*/
3787 VARARG(objattr
,object_attributes
); /* object attributes
*/
3789 obj_handle_t handle
; /* handle to the job
*/
3793 /* Open a job object
*/
3795 unsigned int access
; /* wanted access rights
*/
3796 unsigned int attributes
; /* object attributes
*/
3797 obj_handle_t rootdir
; /* root directory
*/
3798 VARARG(name
,unicode_str
); /* object name
*/
3800 obj_handle_t handle
; /* handle to the job
*/
3804 /* Assign a job object to a process
*/
3806 obj_handle_t job
; /* handle to the job
*/
3807 obj_handle_t process
; /* handle to the process
*/
3811 /* Check if a process is associated with a job
*/
3812 @
REQ(process_in_job
)
3813 obj_handle_t job
; /* handle to the job
*/
3814 obj_handle_t process
; /* handle to the process
*/
3818 /* Set limit flags on a job
*/
3819 @
REQ(set_job_limits
)
3820 obj_handle_t handle
; /* handle to the job
*/
3821 unsigned int limit_flags
; /* new limit flags
*/
3825 /* Set new completion port for a job
*/
3826 @
REQ(set_job_completion_port
)
3827 obj_handle_t job
; /* handle to the job
*/
3828 obj_handle_t port
; /* handle to the completion port
*/
3829 client_ptr_t key
; /* key to send with completion messages
*/
3833 /* Retrieve information about a job
*/
3835 obj_handle_t handle
; /* handle to the job
*/
3837 int total_processes
; /* total count of processes
*/
3838 int active_processes
; /* count of running processes
*/
3839 VARARG(pids
,uints
); /* list of active pids
*/
3843 /* Terminate all processes associated with the job
*/
3845 obj_handle_t handle
; /* handle to the job
*/
3846 int status
; /* process exit code
*/
3850 /* Suspend a process
*/
3851 @
REQ(suspend_process
)
3852 obj_handle_t handle
; /* process handle
*/
3856 /* Resume a process
*/
3857 @
REQ(resume_process
)
3858 obj_handle_t handle
; /* process handle
*/
3862 /* Iterate thread list for process
*/
3863 @
REQ(get_next_thread
)
3864 obj_handle_t process
; /* process handle
*/
3865 obj_handle_t last
; /* thread handle to start with
*/
3866 unsigned int access
; /* desired access for returned handle
*/
3867 unsigned int attributes
; /* returned handle attributes
*/
3868 unsigned int flags
; /* controls iteration direction
*/
3870 obj_handle_t handle
; /* next thread handle
*/