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
*/
35 typedef unsigned int obj_handle_t
;
36 typedef unsigned int user_handle_t
;
37 typedef unsigned int atom_t
;
38 typedef unsigned int process_id_t
;
39 typedef unsigned int thread_id_t
;
40 typedef unsigned int data_size_t
;
41 typedef unsigned int ioctl_code_t
;
42 typedef unsigned __int64 lparam_t
;
43 typedef unsigned __int64 apc_param_t
;
44 typedef unsigned __int64 mem_size_t
;
45 typedef unsigned __int64 file_pos_t
;
46 typedef unsigned __int64 client_ptr_t
;
47 typedef unsigned __int64 affinity_t
;
48 typedef client_ptr_t mod_handle_t
;
52 int req
; /* request code
*/
53 data_size_t request_size
; /* request variable part size
*/
54 data_size_t reply_size
; /* reply variable part maximum size
*/
59 unsigned int error
; /* error result
*/
60 data_size_t reply_size
; /* reply variable part size
*/
63 /* placeholder structure for the maximum allowed request size
*/
64 /* this is used to construct the generic_request union
*/
65 struct request_max_size
67 int pad
[16]; /* the max request size is
16 ints
*/
70 #define FIRST_USER_HANDLE
0x0020 /* first possible value for low word of user handle
*/
71 #define LAST_USER_HANDLE
0xffef /* last possible value for low word of user handle
*/
74 /* debug event data
*/
77 int code
; /* event code
*/
80 int code
; /* DbgExceptionStateChange
*/
81 int first
; /* first chance exception?
*/
82 unsigned int exc_code
; /* exception code
*/
83 unsigned int flags
; /* exception flags
*/
84 client_ptr_t record
; /* exception record
*/
85 client_ptr_t address
; /* exception address
*/
86 int nb_params
; /* number of parameters
*/
88 client_ptr_t params
[15]; /* parameters
*/
92 int code
; /* DbgCreateThreadStateChange
*/
93 obj_handle_t handle
; /* handle to the new thread
*/
94 client_ptr_t start
; /* thread startup routine
*/
98 int code
; /* DbgCreateProcessStateChange
*/
99 obj_handle_t file
; /* handle to the process exe file
*/
100 obj_handle_t process
; /* handle to the new process
*/
101 obj_handle_t thread
; /* handle to the new thread
*/
102 mod_handle_t base
; /* base of executable image
*/
103 int dbg_offset
; /* offset of debug info in file
*/
104 int dbg_size
; /* size of debug info
*/
105 client_ptr_t start
; /* thread startup routine
*/
109 int code
; /* DbgExitThreadStateChange
/DbgExitProcessStateChange
*/
110 int exit_code
; /* thread or process exit code
*/
114 int code
; /* DbgLoadDllStateChange
*/
115 obj_handle_t handle
; /* file handle for the dll
*/
116 mod_handle_t base
; /* base address of the dll
*/
117 int dbg_offset
; /* offset of debug info in file
*/
118 int dbg_size
; /* size of debug info
*/
119 client_ptr_t name
; /* image
name (optional
) */
123 int code
; /* DbgUnloadDllStateChange
*/
125 mod_handle_t base
; /* base address of the dll
*/
132 unsigned int machine
; /* machine type
*/
133 unsigned int flags
; /* SERVER_CTX_
* flags
*/
136 struct
{ unsigned int eip
, ebp
, esp
, eflags
, cs
, ss
; } i386_regs
;
137 struct
{ unsigned __int64 rip
, rbp
, rsp
;
138 unsigned int cs
, ss
, flags
, __pad
; } x86_64_regs
;
139 struct
{ unsigned int sp
, lr
, pc
, cpsr
; } arm_regs
;
140 struct
{ unsigned __int64 sp
, pc
, pstate
; } arm64_regs
;
141 } ctl
; /* selected by SERVER_CTX_CONTROL
*/
144 struct
{ unsigned int eax
, ebx
, ecx
, edx
, esi
, edi
; } i386_regs
;
145 struct
{ unsigned __int64 rax
,rbx
, rcx
, rdx
, rsi
, rdi
,
146 r8
, r9
, r10
, r11
, r12
, r13
, r14
, r15
; } x86_64_regs
;
147 struct
{ unsigned int r
[13]; } arm_regs
;
148 struct
{ unsigned __int64 x
[31]; } arm64_regs
;
149 } integer
; /* selected by SERVER_CTX_INTEGER
*/
152 struct
{ unsigned int ds
, es
, fs
, gs
; } i386_regs
;
153 struct
{ unsigned int ds
, es
, fs
, gs
; } x86_64_regs
;
154 } seg
; /* selected by SERVER_CTX_SEGMENTS
*/
157 struct
{ unsigned int ctrl
, status
, tag
, err_off
, err_sel
, data_off
, data_sel
, cr0npx
;
158 unsigned char regs
[80]; } i386_regs
;
159 struct
{ struct
{ unsigned __int64 low
, high
; } fpregs
[32]; } x86_64_regs
;
160 struct
{ unsigned __int64 d
[32]; unsigned int fpscr
; } arm_regs
;
161 struct
{ struct
{ unsigned __int64 low
, high
; } q
[32]; unsigned int fpcr
, fpsr
; } arm64_regs
;
162 } fp
; /* selected by SERVER_CTX_FLOATING_POINT
*/
165 struct
{ unsigned int dr0
, dr1
, dr2
, dr3
, dr6
, dr7
; } i386_regs
;
166 struct
{ unsigned __int64 dr0
, dr1
, dr2
, dr3
, dr6
, dr7
; } x86_64_regs
;
167 struct
{ unsigned int bvr
[8], bcr
[8], wvr
[1], wcr
[1]; } arm_regs
;
168 struct
{ unsigned __int64 bvr
[8], wvr
[2]; unsigned int bcr
[8], wcr
[2]; } arm64_regs
;
169 } debug
; /* selected by SERVER_CTX_DEBUG_REGISTERS
*/
172 unsigned char i386_regs
[512];
173 } ext
; /* selected by SERVER_CTX_EXTENDED_REGISTERS
*/
176 struct
{ struct
{ unsigned __int64 low
, high
; } ymm_high
[16]; } regs
;
177 } ymm
; /* selected by SERVER_CTX_YMM_REGISTERS
*/
180 #define SERVER_CTX_CONTROL
0x01
181 #define SERVER_CTX_INTEGER
0x02
182 #define SERVER_CTX_SEGMENTS
0x04
183 #define SERVER_CTX_FLOATING_POINT
0x08
184 #define SERVER_CTX_DEBUG_REGISTERS
0x10
185 #define SERVER_CTX_EXTENDED_REGISTERS
0x20
186 #define SERVER_CTX_YMM_REGISTERS
0x40
188 /* structure used in sending an fd from client to server
*/
191 thread_id_t tid
; /* thread id
*/
192 int fd
; /* file descriptor on client
-side
*/
195 /* structure sent by the server on the wait fifo
*/
198 client_ptr_t cookie
; /* magic cookie that was passed in select_request
*/
199 int signaled
; /* wait result
*/
203 /* NT
-style timeout
, in
100ns units
, negative means relative timeout
*/
204 typedef __int64 timeout_t
;
205 #define
TIMEOUT_INFINITE (((timeout_t
)0x7fffffff) << 32 |
0xffffffff)
207 /* absolute timeout
, negative means that monotonic clock is used
*/
208 typedef __int64 abstime_t
;
210 /* structure for process startup info
*/
213 unsigned int debug_flags
;
214 unsigned int console_flags
;
215 obj_handle_t console
;
217 obj_handle_t hstdout
;
218 obj_handle_t hstderr
;
225 unsigned int attribute
;
228 process_id_t process_group_id
;
229 data_size_t curdir_len
;
230 data_size_t dllpath_len
;
231 data_size_t imagepath_len
;
232 data_size_t cmdline_len
;
233 data_size_t title_len
;
234 data_size_t desktop_len
;
235 data_size_t shellinfo_len
;
236 data_size_t runtime_len
;
237 /* VARARG(curdir
,unicode_str
,curdir_len
); */
238 /* VARARG(dllpath
,unicode_str
,dllpath_len
); */
239 /* VARARG(imagepath
,unicode_str
,imagepath_len
); */
240 /* VARARG(cmdline
,unicode_str
,cmdline_len
); */
241 /* VARARG(title
,unicode_str
,title_len
); */
242 /* VARARG(desktop
,unicode_str
,desktop_len
); */
243 /* VARARG(shellinfo
,unicode_str
,shellinfo_len
); */
244 /* VARARG(runtime
,unicode_str
,runtime_len
); */
247 /* structure returned in the list of window properties
*/
250 atom_t atom
; /* property atom
*/
251 int string
; /* was atom a string originally?
*/
252 lparam_t data
; /* data stored in property
*/
255 /* structure to specify window rectangles
*/
264 /* structure for parameters of async I
/O calls
*/
267 obj_handle_t handle
; /* object to perform I
/O on
*/
268 obj_handle_t event
; /* event to signal when done
*/
269 client_ptr_t iosb
; /* I
/O status block in client addr space
*/
270 client_ptr_t user
; /* opaque user data containing callback pointer and async
-specific data
*/
271 client_ptr_t apc
; /* user APC to call
*/
272 apc_param_t apc_context
; /* user APC context or completion value
*/
275 /* structures for extra message data
*/
279 unsigned int device
; /* source
device (IMDT_
* values
) */
280 unsigned int origin
; /* source
origin (IMO_
* values
) */
285 int type
; /* rawinput data
type (RIM_
* values
) */
286 unsigned int device
; /* rawinput device pseudo
-handle
*/
287 unsigned int wparam
; /* wparam of the WM_INPUT
* message
*/
288 unsigned int usage
; /* HID device usage
*/
291 struct hardware_msg_data
293 lparam_t info
; /* extra info
*/
294 data_size_t size
; /* size of hardware message data
*/
296 unsigned int hw_id
; /* unique id
*/
297 unsigned int flags
; /* hook flags
*/
298 struct hw_msg_source source
; /* message source
*/
299 struct rawinput rawinput
; /* rawinput message data
*/
302 struct callback_msg_data
304 client_ptr_t callback
; /* callback function
*/
305 lparam_t data
; /* user data for callback
*/
306 lparam_t result
; /* message result
*/
309 struct winevent_msg_data
311 user_handle_t hook
; /* hook handle
*/
312 thread_id_t tid
; /* thread id
*/
313 client_ptr_t hook_proc
; /* hook proc address
*/
314 /* followed by module name if any
*/
322 int type
; /* INPUT_KEYBOARD
*/
323 unsigned short vkey
; /* virtual key code
*/
324 unsigned short scan
; /* scan code
*/
325 unsigned int flags
; /* event flags
*/
326 unsigned int time
; /* event time
*/
327 lparam_t info
; /* extra info
*/
331 int type
; /* INPUT_MOUSE
*/
332 int x
; /* coordinates
*/
334 unsigned int data
; /* mouse data
*/
335 unsigned int flags
; /* event flags
*/
336 unsigned int time
; /* event time
*/
337 lparam_t info
; /* extra info
*/
341 int type
; /* INPUT_HARDWARE
*/
342 unsigned int msg
; /* message code
*/
343 lparam_t wparam
; /* parameters
*/
344 lparam_t lparam
; /* parameters
*/
345 struct hid_input hid
; /* defined in ntuser.h
*/
351 unsigned char bytes
[1]; /* raw data for sent messages
*/
352 struct hardware_msg_data hardware
;
353 struct callback_msg_data callback
;
354 struct winevent_msg_data winevent
;
357 /* structure returned in filesystem events
*/
358 struct filesystem_event
367 unsigned int low_part
;
379 unsigned char revision
;
382 unsigned short count
;
388 unsigned char revision
;
389 unsigned char sub_count
;
390 unsigned char id_auth
[6];
391 unsigned int sub_auth
[15];
402 #define MAX_ACL_LEN
65535
404 struct security_descriptor
406 unsigned int control
; /* SE_ flags
*/
407 data_size_t owner_len
;
408 data_size_t group_len
;
409 data_size_t sacl_len
;
410 data_size_t dacl_len
;
411 /* VARARG(owner
,sid
); */
412 /* VARARG(group
,sid
); */
413 /* VARARG(sacl
,acl
); */
414 /* VARARG(dacl
,acl
); */
417 struct object_attributes
419 obj_handle_t rootdir
; /* root directory
*/
420 unsigned int attributes
; /* object attributes
*/
421 data_size_t sd_len
; /* length of security_descriptor data. may be
0 */
422 data_size_t name_len
; /* length of the name string. may be
0 */
423 /* VARARG(sd
,security_descriptor
); */
424 /* VARARG(name
,unicode_str
); */
427 struct object_type_info
429 data_size_t name_len
; /* length of the name string
*/
430 unsigned int index
; /* type index in global table
*/
431 unsigned int obj_count
; /* count of objects of this type
*/
432 unsigned int handle_count
; /* count of handles of this type
*/
433 unsigned int obj_max
; /* max count of objects of this type
*/
434 unsigned int handle_max
; /* max count of handles of this type
*/
435 unsigned int valid_access
; /* mask for valid access bits
*/
436 generic_map_t mapping
; /* generic access mappings
*/
437 /* VARARG(name
,unicode_str
); */
445 SELECT_SIGNAL_AND_WAIT
,
446 SELECT_KEYED_EVENT_WAIT
,
447 SELECT_KEYED_EVENT_RELEASE
455 enum select_op op
; /* SELECT_WAIT or SELECT_WAIT_ALL
*/
456 obj_handle_t handles
[MAXIMUM_WAIT_OBJECTS
];
461 enum select_op op
; /* SELECT_SIGNAL_AND_WAIT
*/
463 obj_handle_t signal
; /* must be last in the structure so we can remove it on retries
*/
467 enum select_op op
; /* SELECT_KEYED_EVENT_WAIT or SELECT_KEYED_EVENT_RELEASE
*/
479 APC_VIRTUAL_ALLOC_EX
,
495 enum apc_type type
; /* APC_USER
*/
497 client_ptr_t func
; /* void (__stdcall
*func
)(ULONG_PTR
,ULONG_PTR
,ULONG_PTR
); */
498 apc_param_t args
[3]; /* arguments for user function
*/
507 enum apc_type type
; /* APC_ASYNC_IO
*/
508 unsigned int status
; /* I
/O status
*/
509 client_ptr_t user
; /* user pointer
*/
510 client_ptr_t sb
; /* status block
*/
511 data_size_t result
; /* result size
*/
515 enum apc_type type
; /* APC_VIRTUAL_ALLOC
*/
516 unsigned int op_type
; /* type of operation
*/
517 client_ptr_t addr
; /* requested address
*/
518 mem_size_t size
; /* allocation size
*/
519 mem_size_t zero_bits
; /* number of zero high bits
*/
520 unsigned int prot
; /* memory protection flags
*/
524 enum apc_type type
; /* APC_VIRTUAL_ALLOC
*/
525 unsigned int op_type
; /* type of operation
*/
526 client_ptr_t addr
; /* requested address
*/
527 mem_size_t size
; /* allocation size
*/
528 mem_size_t limit_low
; /* allocation address limits
*/
529 mem_size_t limit_high
;
530 mem_size_t align
; /* allocation alignment
*/
531 unsigned int prot
; /* memory protection flags
*/
532 unsigned int attributes
; /* memory extended attributes
*/
536 enum apc_type type
; /* APC_VIRTUAL_FREE
*/
537 unsigned int op_type
; /* type of operation
*/
538 client_ptr_t addr
; /* requested address
*/
539 mem_size_t size
; /* allocation size
*/
543 enum apc_type type
; /* APC_VIRTUAL_QUERY
*/
545 client_ptr_t addr
; /* requested address
*/
549 enum apc_type type
; /* APC_VIRTUAL_PROTECT
*/
550 unsigned int prot
; /* new protection flags
*/
551 client_ptr_t addr
; /* requested address
*/
552 mem_size_t size
; /* requested size
*/
556 enum apc_type type
; /* APC_VIRTUAL_FLUSH
*/
558 client_ptr_t addr
; /* requested address
*/
559 mem_size_t size
; /* requested size
*/
563 enum apc_type type
; /* APC_VIRTUAL_LOCK
*/
565 client_ptr_t addr
; /* requested address
*/
566 mem_size_t size
; /* requested size
*/
570 enum apc_type type
; /* APC_VIRTUAL_UNLOCK
*/
572 client_ptr_t addr
; /* requested address
*/
573 mem_size_t size
; /* requested size
*/
577 enum apc_type type
; /* APC_MAP_VIEW
*/
578 obj_handle_t handle
; /* mapping handle
*/
579 client_ptr_t addr
; /* requested address
*/
580 mem_size_t size
; /* allocation size
*/
581 file_pos_t offset
; /* file offset
*/
582 mem_size_t zero_bits
; /* number of zero high bits
*/
583 unsigned int alloc_type
; /* allocation type
*/
584 unsigned int prot
; /* memory protection flags
*/
588 enum apc_type type
; /* APC_MAP_VIEW_EX
*/
589 obj_handle_t handle
; /* mapping handle
*/
590 client_ptr_t addr
; /* requested address
*/
591 mem_size_t size
; /* allocation size
*/
592 file_pos_t offset
; /* file offset
*/
593 mem_size_t limit_low
; /* allocation address limits
*/
594 mem_size_t limit_high
;
595 unsigned int alloc_type
; /* allocation type
*/
596 unsigned int prot
; /* memory protection flags
*/
597 unsigned short machine
; /* requested machine for image mappings
*/
598 unsigned short __pad
[3];
602 enum apc_type type
; /* APC_UNMAP_VIEW
*/
603 unsigned int flags
; /* unmap flags
*/
604 client_ptr_t addr
; /* view address
*/
608 enum apc_type type
; /* APC_CREATE_THREAD
*/
609 unsigned int flags
; /* creation flags
*/
610 client_ptr_t func
; /* void (__stdcall
*func
)(void*)
; start function
*/
611 client_ptr_t arg
; /* argument for start function
*/
612 mem_size_t zero_bits
; /* number of zero high bits for thread stack
*/
613 mem_size_t reserve
; /* reserve size for thread stack
*/
614 mem_size_t commit
; /* commit size for thread stack
*/
618 enum apc_type type
; /* APC_DUP_HANDLE
*/
619 obj_handle_t src_handle
; /* src handle to duplicate
*/
620 obj_handle_t dst_process
; /* dst process handle
*/
621 unsigned int access
; /* wanted access rights
*/
622 unsigned int attributes
; /* object attributes
*/
623 unsigned int options
; /* duplicate options
*/
632 enum apc_type type
; /* APC_ASYNC_IO
*/
633 unsigned int status
; /* new status of async operation
*/
634 unsigned int total
; /* bytes transferred
*/
638 enum apc_type type
; /* APC_VIRTUAL_ALLOC
*/
639 unsigned int status
; /* status returned by call
*/
640 client_ptr_t addr
; /* resulting address
*/
641 mem_size_t size
; /* resulting size
*/
645 enum apc_type type
; /* APC_VIRTUAL_ALLOC_EX
*/
646 unsigned int status
; /* status returned by call
*/
647 client_ptr_t addr
; /* resulting address
*/
648 mem_size_t size
; /* resulting size
*/
652 enum apc_type type
; /* APC_VIRTUAL_FREE
*/
653 unsigned int status
; /* status returned by call
*/
654 client_ptr_t addr
; /* resulting address
*/
655 mem_size_t size
; /* resulting size
*/
659 enum apc_type type
; /* APC_VIRTUAL_QUERY
*/
660 unsigned int status
; /* status returned by call
*/
661 client_ptr_t base
; /* resulting base address
*/
662 client_ptr_t alloc_base
;/* resulting allocation base
*/
663 mem_size_t size
; /* resulting region size
*/
664 unsigned short state
; /* resulting region state
*/
665 unsigned short prot
; /* resulting region protection
*/
666 unsigned short alloc_prot
;/* resulting allocation protection
*/
667 unsigned short alloc_type
;/* resulting region allocation type
*/
671 enum apc_type type
; /* APC_VIRTUAL_PROTECT
*/
672 unsigned int status
; /* status returned by call
*/
673 client_ptr_t addr
; /* resulting address
*/
674 mem_size_t size
; /* resulting size
*/
675 unsigned int prot
; /* old protection flags
*/
679 enum apc_type type
; /* APC_VIRTUAL_FLUSH
*/
680 unsigned int status
; /* status returned by call
*/
681 client_ptr_t addr
; /* resulting address
*/
682 mem_size_t size
; /* resulting size
*/
686 enum apc_type type
; /* APC_VIRTUAL_LOCK
*/
687 unsigned int status
; /* status returned by call
*/
688 client_ptr_t addr
; /* resulting address
*/
689 mem_size_t size
; /* resulting size
*/
693 enum apc_type type
; /* APC_VIRTUAL_UNLOCK
*/
694 unsigned int status
; /* status returned by call
*/
695 client_ptr_t addr
; /* resulting address
*/
696 mem_size_t size
; /* resulting size
*/
700 enum apc_type type
; /* APC_MAP_VIEW
*/
701 unsigned int status
; /* status returned by call
*/
702 client_ptr_t addr
; /* resulting address
*/
703 mem_size_t size
; /* resulting size
*/
707 enum apc_type type
; /* APC_MAP_VIEW_EX
*/
708 unsigned int status
; /* status returned by call
*/
709 client_ptr_t addr
; /* resulting address
*/
710 mem_size_t size
; /* resulting size
*/
714 enum apc_type type
; /* APC_UNMAP_VIEW
*/
715 unsigned int status
; /* status returned by call
*/
719 enum apc_type type
; /* APC_CREATE_THREAD
*/
720 unsigned int status
; /* status returned by call
*/
721 process_id_t pid
; /* process id
*/
722 thread_id_t tid
; /* thread id
*/
723 client_ptr_t teb
; /* thread
teb (in process address space
) */
724 obj_handle_t handle
; /* handle to new thread
*/
728 enum apc_type type
; /* APC_DUP_HANDLE
*/
729 unsigned int status
; /* status returned by call
*/
730 obj_handle_t handle
; /* duplicated handle in dst process
*/
734 enum apc_type type
; /* APC_BREAK_PROCESS
*/
735 unsigned int status
; /* status returned by call
*/
755 enum irp_type type
; /* irp call type
*/
758 enum irp_type type
; /* IRP_CALL_CREATE
*/
759 unsigned int access
; /* access rights
*/
760 unsigned int sharing
; /* sharing flags
*/
761 unsigned int options
; /* file options
*/
762 client_ptr_t device
; /* opaque ptr for the device
*/
763 obj_handle_t file
; /* file handle
*/
767 enum irp_type type
; /* IRP_CALL_CLOSE
*/
769 client_ptr_t file
; /* opaque ptr for the file object
*/
773 enum irp_type type
; /* IRP_CALL_READ
*/
774 unsigned int key
; /* driver key
*/
775 data_size_t out_size
; /* needed output size
*/
777 client_ptr_t file
; /* opaque ptr for the file object
*/
778 file_pos_t pos
; /* file position
*/
782 enum irp_type type
; /* IRP_CALL_WRITE
*/
783 unsigned int key
; /* driver key
*/
784 client_ptr_t file
; /* opaque ptr for the file object
*/
785 file_pos_t pos
; /* file position
*/
789 enum irp_type type
; /* IRP_CALL_FLUSH
*/
791 client_ptr_t file
; /* opaque ptr for the file object
*/
795 enum irp_type type
; /* IRP_CALL_IOCTL
*/
796 ioctl_code_t code
; /* ioctl code
*/
797 data_size_t out_size
; /* needed output size
*/
799 client_ptr_t file
; /* opaque ptr for the file object
*/
803 enum irp_type type
; /* IRP_CALL_VOLUME
*/
804 unsigned int info_class
;/* information class
*/
805 data_size_t out_size
; /* needed output size
*/
807 client_ptr_t file
; /* opaque ptr for the file object
*/
811 enum irp_type type
; /* IRP_CALL_FREE
*/
813 client_ptr_t obj
; /* opaque ptr for the freed object
*/
817 enum irp_type type
; /* IRP_CALL_CANCEL
*/
819 client_ptr_t irp
; /* opaque ptr for canceled irp
*/
823 /* information about a PE image mapping
, roughly equivalent to SECTION_IMAGE_INFORMATION
*/
827 client_ptr_t map_addr
;
828 mem_size_t stack_size
;
829 mem_size_t stack_commit
;
830 unsigned int entry_point
;
831 unsigned int map_size
;
832 unsigned int zerobits
;
833 unsigned int subsystem
;
834 unsigned short subsystem_minor
;
835 unsigned short subsystem_major
;
836 unsigned short osversion_major
;
837 unsigned short osversion_minor
;
838 unsigned short image_charact
;
839 unsigned short dll_charact
;
840 unsigned short machine
;
841 unsigned char contains_code
: 1;
842 unsigned char wine_builtin
: 1;
843 unsigned char wine_fakedll
: 1;
844 unsigned char is_hybrid
: 1;
845 unsigned char padding
: 4;
846 unsigned char image_flags
;
847 unsigned int loader_flags
;
848 unsigned int header_size
;
849 unsigned int file_size
;
850 unsigned int checksum
;
851 unsigned int dbg_offset
;
852 unsigned int dbg_size
;
854 #define IMAGE_FLAGS_ComPlusNativeReady
0x01
855 #define IMAGE_FLAGS_ComPlusILOnly
0x02
856 #define IMAGE_FLAGS_ImageDynamicallyRelocated
0x04
857 #define IMAGE_FLAGS_ImageMappedFlat
0x08
858 #define IMAGE_FLAGS_BaseBelow4gb
0x10
859 #define IMAGE_FLAGS_ComPlusPrefer32bit
0x20
861 struct rawinput_device
865 user_handle_t target
;
877 /****************************************************************/
878 /* Request declarations
*/
880 /* Create a new process from the context of the parent
*/
882 obj_handle_t token
; /* process token
*/
883 obj_handle_t debug
; /* process debug object
*/
884 obj_handle_t parent_process
; /* parent process
*/
885 unsigned int flags
; /* process creation flags
*/
886 int socket_fd
; /* file descriptor for process socket
*/
887 unsigned int access
; /* access rights for process object
*/
888 unsigned short machine
; /* architecture that the new process will use
*/
889 data_size_t info_size
; /* size of startup info
*/
890 data_size_t handles_size
; /* length of explicit handles list
*/
891 data_size_t jobs_size
; /* length of jobs list
*/
892 VARARG(objattr
,object_attributes
); /* object attributes
*/
893 VARARG(handles
,uints
,handles_size
); /* handles list
*/
894 VARARG(jobs
,uints
,jobs_size
); /* jobs list
*/
895 VARARG(info
,startup_info
,info_size
); /* startup information
*/
896 VARARG(env
,unicode_str
); /* environment for new process
*/
898 obj_handle_t info
; /* new process info handle
*/
899 process_id_t pid
; /* process id
*/
900 obj_handle_t handle
; /* process
handle (in the current process
) */
904 /* Retrieve information about a newly started process
*/
905 @
REQ(get_new_process_info
)
906 obj_handle_t info
; /* info handle returned from new_process_request
*/
908 int success
; /* did the process start successfully?
*/
909 int exit_code
; /* process exit code if failed
*/
913 /* Create a new thread
*/
915 obj_handle_t process
; /* process in which to create thread
*/
916 unsigned int access
; /* wanted access rights
*/
917 unsigned int flags
; /* thread creation flags
*/
918 int request_fd
; /* fd for request pipe
*/
919 VARARG(objattr
,object_attributes
); /* object attributes
*/
921 thread_id_t tid
; /* thread id
*/
922 obj_handle_t handle
; /* thread
handle (in the current process
) */
926 /* Retrieve the new process startup info
*/
927 @
REQ(get_startup_info
)
929 data_size_t info_size
; /* size of startup info
*/
930 unsigned short machine
; /* architecture for the new process
*/
931 VARARG(info
,startup_info
,info_size
); /* startup information
*/
932 VARARG(env
,unicode_str
); /* environment
*/
936 /* Signal the end of the process initialization
*/
937 @
REQ(init_process_done
)
938 client_ptr_t teb
; /* TEB of new
thread (in process address space
) */
939 client_ptr_t peb
; /* PEB of new
process (in process address space
) */
940 client_ptr_t ldt_copy
; /* address of LDT
copy (in process address space
) */
942 int suspend
; /* is process suspended?
*/
946 /* Initialize the first thread of a new process
*/
947 @
REQ(init_first_thread
)
948 int unix_pid
; /* Unix pid of new process
*/
949 int unix_tid
; /* Unix tid of new thread
*/
950 int debug_level
; /* new debug level
*/
951 int reply_fd
; /* fd for reply pipe
*/
952 int wait_fd
; /* fd for blocking calls pipe
*/
954 process_id_t pid
; /* process id of the new thread
's process */
955 thread_id_t tid; /* thread id of the new thread */
956 timeout_t server_start; /* server start time */
957 unsigned int session_id; /* process session id */
958 data_size_t info_size; /* total size of startup info */
959 VARARG(machines,ushorts); /* array of supported machines */
963 /* Initialize a new thread; called from the child after pthread_create() */
965 int unix_tid; /* Unix tid of new thread */
966 int reply_fd; /* fd for reply pipe */
967 int wait_fd; /* fd for blocking calls pipe */
968 client_ptr_t teb; /* TEB of new thread (in thread address space) */
969 client_ptr_t entry; /* entry point (in thread address space) */
971 int suspend; /* is thread suspended? */
975 /* Terminate a process */
976 @REQ(terminate_process)
977 obj_handle_t handle; /* process handle to terminate */
978 int exit_code; /* process exit code */
980 int self; /* suicide? */
984 /* Terminate a thread */
985 @REQ(terminate_thread)
986 obj_handle_t handle; /* thread handle to terminate */
987 int exit_code; /* thread exit code */
989 int self; /* suicide? */
993 /* Retrieve information about a process */
994 @REQ(get_process_info)
995 obj_handle_t handle; /* process handle */
997 process_id_t pid; /* server process id */
998 process_id_t ppid; /* server process id of parent */
999 affinity_t affinity; /* process affinity mask */
1000 client_ptr_t peb; /* PEB address in process address space */
1001 timeout_t start_time; /* process start time */
1002 timeout_t end_time; /* process end time */
1003 unsigned int session_id; /* process session id */
1004 int exit_code; /* process exit code */
1005 int priority; /* priority class */
1006 unsigned short machine; /* process architecture */
1007 VARARG(image,pe_image_info); /* image info for main exe */
1011 /* Retrieve debug information about a process */
1012 @REQ(get_process_debug_info)
1013 obj_handle_t handle; /* process handle */
1015 obj_handle_t debug; /* handle to debug port */
1016 int debug_children; /* inherit debugger to child processes */
1017 VARARG(image,pe_image_info); /* image info for main exe */
1021 /* Fetch the name of the process image */
1022 @REQ(get_process_image_name)
1023 obj_handle_t handle; /* process handle */
1024 int win32; /* return a win32 filename? */
1026 data_size_t len; /* len in bytes required to store filename */
1027 VARARG(name,unicode_str); /* image name for main exe */
1031 /* Retrieve information about a process memory usage */
1032 @REQ(get_process_vm_counters)
1033 obj_handle_t handle; /* process handle */
1035 mem_size_t peak_virtual_size; /* peak virtual memory in bytes */
1036 mem_size_t virtual_size; /* virtual memory in bytes */
1037 mem_size_t peak_working_set_size; /* peak real memory in bytes */
1038 mem_size_t working_set_size; /* real memory in bytes */
1039 mem_size_t pagefile_usage; /* commit charge in bytes */
1040 mem_size_t peak_pagefile_usage; /* peak commit charge in bytes */
1044 /* Set a process information */
1045 @REQ(set_process_info)
1046 obj_handle_t handle; /* process handle */
1047 int mask; /* setting mask (see below) */
1048 int priority; /* priority class */
1049 affinity_t affinity; /* affinity mask */
1050 obj_handle_t token; /* primary token */
1052 #define SET_PROCESS_INFO_PRIORITY 0x01
1053 #define SET_PROCESS_INFO_AFFINITY 0x02
1054 #define SET_PROCESS_INFO_TOKEN 0x04
1057 /* Retrieve information about a thread */
1058 @REQ(get_thread_info)
1059 obj_handle_t handle; /* thread handle */
1060 unsigned int access; /* required access rights */
1062 process_id_t pid; /* server process id */
1063 thread_id_t tid; /* server thread id */
1064 client_ptr_t teb; /* thread teb pointer */
1065 client_ptr_t entry_point; /* thread entry point */
1066 affinity_t affinity; /* thread affinity mask */
1067 int exit_code; /* thread exit code */
1068 int priority; /* thread priority level */
1069 int last; /* last thread in process */
1070 int suspend_count; /* thread suspend count */
1071 unsigned int flags; /* GET_THREAD_INFO_FLAG_ flags */
1072 data_size_t desc_len; /* description length in bytes */
1073 VARARG(desc,unicode_str); /* description string */
1075 #define GET_THREAD_INFO_FLAG_DBG_HIDDEN 0x01
1076 #define GET_THREAD_INFO_FLAG_TERMINATED 0x02
1079 /* Retrieve information about thread times */
1080 @REQ(get_thread_times)
1081 obj_handle_t handle; /* thread handle */
1083 timeout_t creation_time; /* thread creation time */
1084 timeout_t exit_time; /* thread exit time */
1085 int unix_pid; /* thread native pid */
1086 int unix_tid; /* thread native pid */
1090 /* Set a thread information */
1091 @REQ(set_thread_info)
1092 obj_handle_t handle; /* thread handle */
1093 int mask; /* setting mask (see below) */
1094 int priority; /* priority class */
1095 affinity_t affinity; /* affinity mask */
1096 client_ptr_t entry_point; /* thread entry point */
1097 obj_handle_t token; /* impersonation token */
1098 VARARG(desc,unicode_str); /* description string */
1100 #define SET_THREAD_INFO_PRIORITY 0x01
1101 #define SET_THREAD_INFO_AFFINITY 0x02
1102 #define SET_THREAD_INFO_TOKEN 0x04
1103 #define SET_THREAD_INFO_ENTRYPOINT 0x08
1104 #define SET_THREAD_INFO_DESCRIPTION 0x10
1105 #define SET_THREAD_INFO_DBG_HIDDEN 0x20
1108 /* Suspend a thread */
1109 @REQ(suspend_thread)
1110 obj_handle_t handle; /* thread handle */
1112 int count; /* new suspend count */
1116 /* Resume a thread */
1118 obj_handle_t handle; /* thread handle */
1120 int count; /* new suspend count */
1124 /* Queue an APC for a thread or process */
1126 obj_handle_t handle; /* thread or process handle */
1127 VARARG(call,apc_call); /* call arguments */
1129 obj_handle_t handle; /* APC handle */
1130 int self; /* run APC in caller itself? */
1134 /* Get the result of an APC call */
1135 @REQ(get_apc_result)
1136 obj_handle_t handle; /* handle to the APC */
1138 apc_result_t result; /* result of the APC */
1142 /* Close a handle for the current process */
1144 obj_handle_t handle; /* handle to close */
1148 /* Set a handle information */
1149 @REQ(set_handle_info)
1150 obj_handle_t handle; /* handle we are interested in */
1151 int flags; /* new handle flags */
1152 int mask; /* mask for flags to set */
1154 int old_flags; /* old flag value */
1158 /* Duplicate a handle */
1160 obj_handle_t src_process; /* src process handle */
1161 obj_handle_t src_handle; /* src handle to duplicate */
1162 obj_handle_t dst_process; /* dst process handle */
1163 unsigned int access; /* wanted access rights */
1164 unsigned int attributes; /* object attributes */
1165 unsigned int options; /* duplicate options */
1167 obj_handle_t handle; /* duplicated handle in dst process */
1171 /* Test if two handles refer to the same object */
1172 @REQ(compare_objects)
1173 obj_handle_t first; /* first object handle */
1174 obj_handle_t second; /* second object handle */
1178 /* Make an object temporary */
1179 @REQ(make_temporary)
1180 obj_handle_t handle; /* handle to the object */
1184 /* Open a handle to a process */
1186 process_id_t pid; /* process id to open */
1187 unsigned int access; /* wanted access rights */
1188 unsigned int attributes; /* object attributes */
1190 obj_handle_t handle; /* handle to the process */
1194 /* Open a handle to a thread */
1196 thread_id_t tid; /* thread id to open */
1197 unsigned int access; /* wanted access rights */
1198 unsigned int attributes; /* object attributes */
1200 obj_handle_t handle; /* handle to the thread */
1204 /* Wait for handles */
1206 int flags; /* wait flags (see below) */
1207 client_ptr_t cookie; /* magic cookie to return to client */
1208 abstime_t timeout; /* timeout */
1209 data_size_t size; /* size of select_op */
1210 obj_handle_t prev_apc; /* handle to previous APC */
1211 VARARG(result,apc_result); /* result of previous APC */
1212 VARARG(data,select_op,size); /* operation-specific data */
1213 VARARG(contexts,contexts); /* suspend context(s) */
1215 obj_handle_t apc_handle; /* handle to next APC */
1216 int signaled; /* were the handles immediately signaled? */
1217 VARARG(call,apc_call); /* APC call arguments */
1218 VARARG(contexts,contexts); /* suspend context(s) */
1220 #define SELECT_ALERTABLE 1
1221 #define SELECT_INTERRUPTIBLE 2
1224 /* Create an event */
1226 unsigned int access; /* wanted access rights */
1227 int manual_reset; /* manual reset event */
1228 int initial_state; /* initial state of the event */
1229 VARARG(objattr,object_attributes); /* object attributes */
1231 obj_handle_t handle; /* handle to the event */
1234 /* Event operation */
1236 obj_handle_t handle; /* handle to event */
1237 int op; /* event operation (see below) */
1239 int state; /* previous state */
1241 enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT };
1244 obj_handle_t handle; /* handle to event */
1246 int manual_reset; /* manual reset event */
1247 int state; /* current state of the event */
1252 unsigned int access; /* wanted access rights */
1253 unsigned int attributes; /* object attributes */
1254 obj_handle_t rootdir; /* root directory */
1255 VARARG(name,unicode_str); /* object name */
1257 obj_handle_t handle; /* handle to the event */
1261 /* Create a keyed event */
1262 @REQ(create_keyed_event)
1263 unsigned int access; /* wanted access rights */
1264 VARARG(objattr,object_attributes); /* object attributes */
1266 obj_handle_t handle; /* handle to the event */
1269 /* Open a keyed event */
1270 @REQ(open_keyed_event)
1271 unsigned int access; /* wanted access rights */
1272 unsigned int attributes; /* object attributes */
1273 obj_handle_t rootdir; /* root directory */
1274 VARARG(name,unicode_str); /* object name */
1276 obj_handle_t handle; /* handle to the event */
1280 /* Create a mutex */
1282 unsigned int access; /* wanted access rights */
1283 int owned; /* initially owned? */
1284 VARARG(objattr,object_attributes); /* object attributes */
1286 obj_handle_t handle; /* handle to the mutex */
1290 /* Release a mutex */
1292 obj_handle_t handle; /* handle to the mutex */
1294 unsigned int prev_count; /* value of internal counter, before release */
1300 unsigned int access; /* wanted access rights */
1301 unsigned int attributes; /* object attributes */
1302 obj_handle_t rootdir; /* root directory */
1303 VARARG(name,unicode_str); /* object name */
1305 obj_handle_t handle; /* handle to the mutex */
1311 obj_handle_t handle; /* handle to mutex */
1313 unsigned int count; /* current count of mutex */
1314 int owned; /* true if owned by current thread */
1315 int abandoned; /* true if abandoned */
1319 /* Create a semaphore */
1320 @REQ(create_semaphore)
1321 unsigned int access; /* wanted access rights */
1322 unsigned int initial; /* initial count */
1323 unsigned int max; /* maximum count */
1324 VARARG(objattr,object_attributes); /* object attributes */
1326 obj_handle_t handle; /* handle to the semaphore */
1330 /* Release a semaphore */
1331 @REQ(release_semaphore)
1332 obj_handle_t handle; /* handle to the semaphore */
1333 unsigned int count; /* count to add to semaphore */
1335 unsigned int prev_count; /* previous semaphore count */
1338 @REQ(query_semaphore)
1339 obj_handle_t handle; /* handle to the semaphore */
1341 unsigned int current; /* current count */
1342 unsigned int max; /* maximum count */
1345 /* Open a semaphore */
1346 @REQ(open_semaphore)
1347 unsigned int access; /* wanted access rights */
1348 unsigned int attributes; /* object attributes */
1349 obj_handle_t rootdir; /* root directory */
1350 VARARG(name,unicode_str); /* object name */
1352 obj_handle_t handle; /* handle to the semaphore */
1358 unsigned int access; /* wanted access rights */
1359 unsigned int sharing; /* sharing flags */
1360 int create; /* file create action */
1361 unsigned int options; /* file options */
1362 unsigned int attrs; /* file attributes for creation */
1363 VARARG(objattr,object_attributes); /* object attributes */
1364 VARARG(filename,string); /* file name */
1366 obj_handle_t handle; /* handle to the file */
1370 /* Open a file object */
1371 @REQ(open_file_object)
1372 unsigned int access; /* wanted access rights */
1373 unsigned int attributes; /* open attributes */
1374 obj_handle_t rootdir; /* root directory */
1375 unsigned int sharing; /* sharing flags */
1376 unsigned int options; /* file options */
1377 VARARG(filename,unicode_str); /* file name */
1379 obj_handle_t handle; /* handle to the file */
1383 /* Allocate a file handle for a Unix fd */
1384 @REQ(alloc_file_handle)
1385 unsigned int access; /* wanted access rights */
1386 unsigned int attributes; /* object attributes */
1387 int fd; /* file descriptor on the client side */
1389 obj_handle_t handle; /* handle to the file */
1393 /* Get the Unix name from a file handle */
1394 @REQ(get_handle_unix_name)
1395 obj_handle_t handle; /* file handle */
1397 data_size_t name_len; /* unix name length */
1398 VARARG(name,string); /* unix name */
1402 /* Get a Unix fd to access a file */
1404 obj_handle_t handle; /* handle to the file */
1406 int type; /* file type (see below) */
1407 int cacheable; /* can fd be cached in the client? */
1408 unsigned int access; /* file access rights */
1409 unsigned int options; /* file open options */
1413 FD_TYPE_INVALID, /* invalid file (no associated fd) */
1414 FD_TYPE_FILE, /* regular file */
1415 FD_TYPE_DIR, /* directory */
1416 FD_TYPE_SOCKET, /* socket */
1417 FD_TYPE_SERIAL, /* serial port */
1418 FD_TYPE_PIPE, /* named pipe */
1419 FD_TYPE_MAILSLOT, /* mailslot */
1420 FD_TYPE_CHAR, /* unspecified char device */
1421 FD_TYPE_DEVICE, /* Windows device file */
1426 /* Retrieve (or allocate) the client-side directory cache entry */
1427 @REQ(get_directory_cache_entry)
1428 obj_handle_t handle; /* handle to the directory */
1430 int entry; /* cache entry on the client side */
1431 VARARG(free,ints); /* entries that can be freed */
1435 /* Flush a file buffers */
1437 async_data_t async; /* async I/O parameters */
1439 obj_handle_t event; /* event set when finished */
1442 /* Query file information */
1444 obj_handle_t handle; /* handle to the file */
1445 unsigned int info_class; /* queried information class */
1447 VARARG(data,bytes); /* file info data */
1450 /* Query volume information */
1451 @REQ(get_volume_info)
1452 obj_handle_t handle; /* handle to the file */
1453 async_data_t async; /* async I/O parameters */
1454 unsigned int info_class; /* queried information class */
1456 obj_handle_t wait; /* handle to wait on for blocking read */
1457 VARARG(data,bytes); /* volume info data */
1460 /* Lock a region of a file */
1462 obj_handle_t handle; /* handle to the file */
1463 file_pos_t offset; /* offset of start of lock */
1464 file_pos_t count; /* count of bytes to lock */
1465 int shared; /* shared or exclusive lock? */
1466 int wait; /* do we want to wait? */
1468 obj_handle_t handle; /* handle to wait on */
1469 int overlapped; /* is it an overlapped I/O handle? */
1473 /* Unlock a region of a file */
1475 obj_handle_t handle; /* handle to the file */
1476 file_pos_t offset; /* offset of start of unlock */
1477 file_pos_t count; /* count of bytes to unlock */
1481 /* Perform a recv on a socket */
1483 int oob; /* are we receiving OOB data? */
1484 async_data_t async; /* async I/O parameters */
1485 int force_async; /* Force asynchronous mode? */
1487 obj_handle_t wait; /* handle to wait on for blocking recv */
1488 unsigned int options; /* device open options */
1489 int nonblocking; /* is socket non-blocking? */
1493 /* Perform a send on a socket */
1495 async_data_t async; /* async I/O parameters */
1496 int force_async; /* Force asynchronous mode? */
1498 obj_handle_t wait; /* handle to wait on for blocking send */
1499 unsigned int options; /* device open options */
1500 int nonblocking; /* is socket non-blocking? */
1504 /* Get socket event flags */
1505 @REQ(socket_get_events)
1506 obj_handle_t handle; /* socket handle */
1507 obj_handle_t event; /* event to reset */
1509 unsigned int flags; /* event mask */
1510 VARARG(status,uints); /* array of status codes */
1514 /* Store ICMP id for ICMP over datagram fixup */
1515 @REQ(socket_send_icmp_id)
1516 obj_handle_t handle; /* socket handle */
1517 unsigned short icmp_id; /* ICMP packet id */
1518 unsigned short icmp_seq; /* ICMP packed sequence */
1523 /* Get ICMP id for ICMP over datagram fixup */
1524 @REQ(socket_get_icmp_id)
1525 obj_handle_t handle; /* socket handle */
1526 unsigned short icmp_seq; /* ICMP packed sequence */
1528 unsigned short icmp_id; /* ICMP packet id */
1532 /* Retrieve the next pending console ioctl request */
1533 @REQ(get_next_console_request)
1534 obj_handle_t handle; /* console server handle */
1535 int signal; /* server signal state */
1536 int read; /* 1 if reporting result of blocked read ioctl */
1537 unsigned int status; /* status of previous ioctl */
1538 VARARG(out_data,bytes); /* out_data of previous ioctl */
1540 unsigned int code; /* ioctl code */
1541 unsigned int output; /* output id or 0 for input */
1542 data_size_t out_size; /* ioctl output size */
1543 VARARG(in_data,bytes); /* ioctl in_data */
1547 /* enable directory change notifications */
1548 @REQ(read_directory_changes)
1549 unsigned int filter; /* notification filter */
1550 int subtree; /* watch the subtree? */
1551 int want_data; /* flag indicating whether change data should be collected */
1552 async_data_t async; /* async I/O parameters */
1557 obj_handle_t handle;
1559 VARARG(events,filesystem_event); /* collected filesystem events */
1563 /* Create a file mapping */
1564 @REQ(create_mapping)
1565 unsigned int access; /* wanted access rights */
1566 unsigned int flags; /* SEC_* flags */
1567 unsigned int file_access; /* file access rights */
1568 mem_size_t size; /* mapping size */
1569 obj_handle_t file_handle; /* file handle */
1570 VARARG(objattr,object_attributes); /* object attributes */
1572 obj_handle_t handle; /* handle to the mapping */
1576 /* Open a mapping */
1578 unsigned int access; /* wanted access rights */
1579 unsigned int attributes; /* object attributes */
1580 obj_handle_t rootdir; /* root directory */
1581 VARARG(name,unicode_str); /* object name */
1583 obj_handle_t handle; /* handle to the mapping */
1587 /* Get information about a file mapping */
1588 @REQ(get_mapping_info)
1589 obj_handle_t handle; /* handle to the mapping */
1590 unsigned int access; /* wanted access rights */
1592 mem_size_t size; /* mapping size */
1593 unsigned int flags; /* SEC_* flags */
1594 obj_handle_t shared_file; /* shared mapping file handle */
1595 data_size_t total; /* total required buffer size in bytes */
1596 VARARG(image,pe_image_info);/* image info for SEC_IMAGE mappings */
1597 VARARG(name,unicode_str); /* filename for SEC_IMAGE mappings */
1601 /* Get the address to use to map an image mapping */
1602 @REQ(get_image_map_address)
1603 obj_handle_t handle; /* handle to the mapping */
1605 client_ptr_t addr; /* map address */
1609 /* Add a memory view in the current process */
1611 obj_handle_t mapping; /* file mapping handle */
1612 unsigned int access; /* wanted access rights */
1613 client_ptr_t base; /* view base address (page-aligned) */
1614 mem_size_t size; /* view size */
1615 file_pos_t start; /* start offset in mapping */
1619 /* Add a memory view for an image mapping in the current process */
1620 @REQ(map_image_view)
1621 obj_handle_t mapping; /* file mapping handle */
1622 client_ptr_t base; /* view base address (page-aligned) */
1623 mem_size_t size; /* view size */
1624 unsigned int entry; /* entry point in mapped view */
1625 unsigned short machine; /* machine in the mapped view */
1629 /* Add a memory view for a builtin dll in the current process */
1630 @REQ(map_builtin_view)
1631 VARARG(image,pe_image_info);/* image info */
1632 VARARG(name,unicode_str); /* image filename */
1636 /* Get information about a mapped image view */
1637 @REQ(get_image_view_info)
1638 obj_handle_t process; /* process handle */
1639 client_ptr_t addr; /* address inside mapped view (in process address space) */
1641 client_ptr_t base; /* view base address */
1642 mem_size_t size; /* view size */
1646 /* Unmap a memory view from the current process */
1648 client_ptr_t base; /* view base address */
1652 /* Get a range of committed pages in a file mapping */
1653 @REQ(get_mapping_committed_range)
1654 client_ptr_t base; /* view base address */
1655 file_pos_t offset; /* starting offset (page-aligned, in bytes) */
1657 mem_size_t size; /* size of range starting at offset (page-aligned, in bytes) */
1658 int committed; /* whether it is a committed range */
1662 /* Add a range to the committed pages in a file mapping */
1663 @REQ(add_mapping_committed_range)
1664 client_ptr_t base; /* view base address */
1665 file_pos_t offset; /* starting offset (page-aligned, in bytes) */
1666 mem_size_t size; /* size to set (page-aligned, in bytes) or 0 if only retrieving */
1670 /* Check if two memory maps are for the same file */
1671 @REQ(is_same_mapping)
1672 client_ptr_t base1; /* first view base address */
1673 client_ptr_t base2; /* second view base address */
1677 /* Get the filename of a mapping */
1678 @REQ(get_mapping_filename)
1679 obj_handle_t process; /* process handle */
1680 client_ptr_t addr; /* address inside mapped view (in process address space) */
1682 data_size_t len; /* total filename length in bytes */
1683 VARARG(filename,unicode_str); /* filename in NT format */
1689 timeout_t start_time;
1692 int current_priority;
1695 client_ptr_t entry_point;
1700 timeout_t start_time;
1701 data_size_t name_len;
1705 process_id_t parent_pid;
1706 unsigned int session_id;
1709 /* VARARG(name,unicode_str,name_len); */
1710 /* VARARG(threads,struct thread_info,thread_count); */
1713 /* Get a list of processes and threads currently running */
1714 @REQ(list_processes)
1716 data_size_t info_size;
1718 int total_thread_count;
1719 data_size_t total_name_len;
1720 VARARG(data,process_info,info_size);
1724 /* Create a debug object */
1725 @REQ(create_debug_obj)
1726 unsigned int access; /* wanted access rights */
1727 unsigned int flags; /* object flags */
1728 VARARG(objattr,object_attributes); /* object attributes */
1730 obj_handle_t handle; /* handle to the debug object */
1734 /* Wait for a debug event */
1735 @REQ(wait_debug_event)
1736 obj_handle_t debug; /* debug object */
1738 process_id_t pid; /* process id */
1739 thread_id_t tid; /* thread id */
1740 VARARG(event,debug_event); /* debug event data */
1744 /* Queue an exception event */
1745 @REQ(queue_exception_event)
1746 int first; /* first chance exception? */
1747 unsigned int code; /* exception code */
1748 unsigned int flags; /* exception flags */
1749 client_ptr_t record; /* exception record */
1750 client_ptr_t address; /* exception address */
1751 data_size_t len; /* size of parameters */
1752 VARARG(params,uints64,len);/* exception parameters */
1754 obj_handle_t handle; /* handle to the queued event */
1758 /* Retrieve the status of an exception event */
1759 @REQ(get_exception_status)
1760 obj_handle_t handle; /* handle to the queued event */
1764 /* Continue a debug event */
1765 @REQ(continue_debug_event)
1766 obj_handle_t debug; /* debug object */
1767 process_id_t pid; /* process id to continue */
1768 thread_id_t tid; /* thread id to continue */
1769 unsigned int status; /* continuation status */
1773 /* Start or stop debugging an existing process */
1775 obj_handle_t handle; /* process handle */
1776 obj_handle_t debug; /* debug object to attach to the process */
1777 int attach; /* 1=attaching / 0=detaching from the process */
1781 /* Set debug object information */
1782 @REQ(set_debug_obj_info)
1783 obj_handle_t debug; /* debug object */
1784 unsigned int flags; /* object flags */
1788 /* Read data from a process address space */
1789 @REQ(read_process_memory)
1790 obj_handle_t handle; /* process handle */
1791 client_ptr_t addr; /* addr to read from */
1793 VARARG(data,bytes); /* result data */
1797 /* Write data to a process address space */
1798 @REQ(write_process_memory)
1799 obj_handle_t handle; /* process handle */
1800 client_ptr_t addr; /* addr to write to */
1801 VARARG(data,bytes); /* data to write */
1805 /* Create a registry key */
1807 unsigned int access; /* desired access rights */
1808 unsigned int options; /* creation options */
1809 VARARG(objattr,object_attributes); /* object attributes */
1810 VARARG(class,unicode_str); /* class name */
1812 obj_handle_t hkey; /* handle to the created key */
1815 /* Open a registry key */
1817 obj_handle_t parent; /* handle to the parent key */
1818 unsigned int access; /* desired access rights */
1819 unsigned int attributes; /* object attributes */
1820 VARARG(name,unicode_str); /* key name */
1822 obj_handle_t hkey; /* handle to the open key */
1826 /* Delete a registry key */
1828 obj_handle_t hkey; /* handle to the key */
1832 /* Flush a registry key */
1834 obj_handle_t hkey; /* handle to the key */
1838 /* Enumerate registry subkeys */
1840 obj_handle_t hkey; /* handle to registry key */
1841 int index; /* index of subkey (or -1 for current key) */
1842 int info_class; /* requested information class */
1844 int subkeys; /* number of subkeys */
1845 int max_subkey; /* longest subkey name */
1846 int max_class; /* longest class name */
1847 int values; /* number of values */
1848 int max_value; /* longest value name */
1849 int max_data; /* longest value data */
1850 timeout_t modif; /* last modification time */
1851 data_size_t total; /* total length needed for full name and class */
1852 data_size_t namelen; /* length of key name in bytes */
1853 VARARG(name,unicode_str,namelen); /* key name */
1854 VARARG(class,unicode_str); /* class name */
1858 /* Set a value of a registry key */
1860 obj_handle_t hkey; /* handle to registry key */
1861 int type; /* value type */
1862 data_size_t namelen; /* length of value name in bytes */
1863 VARARG(name,unicode_str,namelen); /* value name */
1864 VARARG(data,bytes); /* value data */
1868 /* Retrieve the value of a registry key */
1870 obj_handle_t hkey; /* handle to registry key */
1871 VARARG(name,unicode_str); /* value name */
1873 int type; /* value type */
1874 data_size_t total; /* total length needed for data */
1875 VARARG(data,bytes); /* value data */
1879 /* Enumerate a value of a registry key */
1880 @REQ(enum_key_value)
1881 obj_handle_t hkey; /* handle to registry key */
1882 int index; /* value index */
1883 int info_class; /* requested information class */
1885 int type; /* value type */
1886 data_size_t total; /* total length needed for full name and data */
1887 data_size_t namelen; /* length of value name in bytes */
1888 VARARG(name,unicode_str,namelen); /* value name */
1889 VARARG(data,bytes); /* value data */
1893 /* Delete a value of a registry key */
1894 @REQ(delete_key_value)
1895 obj_handle_t hkey; /* handle to registry key */
1896 VARARG(name,unicode_str); /* value name */
1900 /* Load a registry branch from a file */
1902 obj_handle_t file; /* file to load from */
1903 VARARG(objattr,object_attributes); /* object attributes */
1907 /* UnLoad a registry branch from a file */
1908 @REQ(unload_registry)
1909 obj_handle_t parent; /* handle to the parent key */
1910 unsigned int attributes; /* object attributes */
1911 VARARG(name,unicode_str); /* key name */
1915 /* Save a registry branch to a file */
1917 obj_handle_t hkey; /* key to save */
1918 obj_handle_t file; /* file to save to */
1922 /* Add a registry key change notification */
1923 @REQ(set_registry_notification)
1924 obj_handle_t hkey; /* key to watch for changes */
1925 obj_handle_t event; /* event to set */
1926 int subtree; /* should we watch the whole subtree? */
1927 unsigned int filter; /* things to watch */
1931 /* Rename a registry key */
1933 obj_handle_t hkey; /* handle to the key to be renamed */
1934 VARARG(name,unicode_str); /* new name */
1938 /* Create a waitable timer */
1940 unsigned int access; /* wanted access rights */
1941 int manual; /* manual reset */
1942 VARARG(objattr,object_attributes); /* object attributes */
1944 obj_handle_t handle; /* handle to the timer */
1948 /* Open a waitable timer */
1950 unsigned int access; /* wanted access rights */
1951 unsigned int attributes; /* object attributes */
1952 obj_handle_t rootdir; /* root directory */
1953 VARARG(name,unicode_str); /* object name */
1955 obj_handle_t handle; /* handle to the timer */
1958 /* Set a waitable timer */
1960 obj_handle_t handle; /* handle to the timer */
1961 timeout_t expire; /* next expiration absolute time */
1962 client_ptr_t callback; /* callback function */
1963 client_ptr_t arg; /* callback argument */
1964 int period; /* timer period in ms */
1966 int signaled; /* was the timer signaled before this call ? */
1969 /* Cancel a waitable timer */
1971 obj_handle_t handle; /* handle to the timer */
1973 int signaled; /* was the timer signaled before this calltime ? */
1976 /* Get information on a waitable timer */
1977 @REQ(get_timer_info)
1978 obj_handle_t handle; /* handle to the timer */
1980 timeout_t when; /* absolute time when the timer next expires */
1981 int signaled; /* is the timer signaled? */
1985 /* Retrieve the current context of a thread */
1986 @REQ(get_thread_context)
1987 obj_handle_t handle; /* thread handle */
1988 obj_handle_t context; /* context handle */
1989 unsigned int flags; /* context flags */
1990 unsigned int native_flags; /* flags for native context if WoW present */
1991 unsigned short machine; /* context architecture */
1993 int self; /* was it a handle to the current thread? */
1994 obj_handle_t handle; /* pending context handle */
1995 VARARG(contexts,contexts); /* thread context(s) */
1999 /* Set the current context of a thread */
2000 @REQ(set_thread_context)
2001 obj_handle_t handle; /* thread handle */
2002 unsigned int native_flags; /* flags for native context if WoW present */
2003 VARARG(contexts,contexts); /* thread context(s) */
2005 int self; /* was it a handle to the current thread? */
2009 /* Fetch a selector entry for a thread */
2010 @REQ(get_selector_entry)
2011 obj_handle_t handle; /* thread handle */
2012 int entry; /* LDT entry */
2014 unsigned int base; /* selector base */
2015 unsigned int limit; /* selector limit */
2016 unsigned char flags; /* selector flags */
2022 VARARG(name,unicode_str); /* atom name */
2024 atom_t atom; /* resulting atom */
2028 /* Delete an atom */
2030 atom_t atom; /* atom handle */
2036 VARARG(name,unicode_str); /* atom name */
2038 atom_t atom; /* atom handle */
2042 /* Get information about an atom */
2043 @REQ(get_atom_information)
2044 atom_t atom; /* atom handle */
2046 int count; /* atom lock count */
2047 int pinned; /* whether the atom has been pinned */
2048 data_size_t total; /* actual length of atom name */
2049 VARARG(name,unicode_str); /* atom name */
2053 /* Get the message queue of the current thread */
2056 obj_handle_t handle; /* handle to the queue */
2060 /* Set the file descriptor associated to the current thread queue */
2062 obj_handle_t handle; /* handle to the file descriptor */
2066 /* Set the current message queue wakeup mask */
2067 @REQ(set_queue_mask)
2068 unsigned int wake_mask; /* wakeup bits mask */
2069 unsigned int changed_mask; /* changed bits mask */
2070 int skip_wait; /* will we skip waiting if signaled? */
2072 unsigned int wake_bits; /* current wake bits */
2073 unsigned int changed_bits; /* current changed bits */
2077 /* Get the current message queue status */
2078 @REQ(get_queue_status)
2079 unsigned int clear_bits; /* should we clear the change bits? */
2081 unsigned int wake_bits; /* wake bits */
2082 unsigned int changed_bits; /* changed bits since last time */
2086 /* Retrieve the process idle event */
2087 @REQ(get_process_idle_event)
2088 obj_handle_t handle; /* process handle */
2090 obj_handle_t event; /* handle to idle event */
2094 /* Send a message to a thread queue */
2096 thread_id_t id; /* thread id */
2097 int type; /* message type (see below) */
2098 int flags; /* message flags (see below) */
2099 user_handle_t win; /* window handle */
2100 unsigned int msg; /* message code */
2101 lparam_t wparam; /* parameters */
2102 lparam_t lparam; /* parameters */
2103 timeout_t timeout; /* timeout for reply */
2104 VARARG(data,message_data); /* message data for sent messages */
2107 @REQ(post_quit_message)
2108 int exit_code; /* exit code to return */
2113 MSG_ASCII, /* Ascii message (from SendMessageA) */
2114 MSG_UNICODE, /* Unicode message (from SendMessageW) */
2115 MSG_NOTIFY, /* notify message (from SendNotifyMessageW), always Unicode */
2116 MSG_CALLBACK, /* callback message (from SendMessageCallbackW), always Unicode */
2117 MSG_CALLBACK_RESULT,/* result of a callback message */
2118 MSG_OTHER_PROCESS, /* sent from other process, may include vararg data, always Unicode */
2119 MSG_POSTED, /* posted message (from PostMessageW), always Unicode */
2120 MSG_HARDWARE, /* hardware message */
2121 MSG_WINEVENT, /* winevent message */
2122 MSG_HOOK_LL /* low-level hardware hook */
2124 #define SEND_MSG_ABORT_IF_HUNG 0x01
2127 /* Send a hardware message to a thread queue */
2128 @REQ(send_hardware_message)
2129 user_handle_t win; /* window handle */
2130 hw_input_t input; /* input data */
2131 unsigned int flags; /* flags (see below) */
2132 VARARG(report,bytes); /* HID report data */
2134 int wait; /* do we need to wait for a reply? */
2135 int prev_x; /* previous cursor position */
2137 int new_x; /* new cursor position */
2140 #define SEND_HWMSG_INJECTED 0x01
2143 /* Get a message from the current queue */
2145 unsigned int flags; /* PM_* flags */
2146 user_handle_t get_win; /* window handle to get */
2147 unsigned int get_first; /* first message code to get */
2148 unsigned int get_last; /* last message code to get */
2149 unsigned int hw_id; /* id of the previous hardware message (or 0) */
2150 unsigned int wake_mask; /* wakeup bits mask */
2151 unsigned int changed_mask; /* changed bits mask */
2153 user_handle_t win; /* window handle */
2154 unsigned int msg; /* message code */
2155 lparam_t wparam; /* parameters */
2156 lparam_t lparam; /* parameters */
2157 int type; /* message type */
2158 int x; /* message x position */
2159 int y; /* message y position */
2160 unsigned int time; /* message time */
2161 unsigned int active_hooks; /* active hooks bitmap */
2162 data_size_t total; /* total size of extra data */
2163 VARARG(data,message_data); /* message data for sent messages */
2167 /* Reply to a sent message */
2169 int remove; /* should we remove the message? */
2170 lparam_t result; /* message result */
2171 VARARG(data,bytes); /* message data for sent messages */
2175 /* Accept and remove the current hardware message */
2176 @REQ(accept_hardware_message)
2177 unsigned int hw_id; /* id of the hardware message */
2181 /* Retrieve the reply for the last message sent */
2182 @REQ(get_message_reply)
2183 int cancel; /* cancel message if not ready? */
2185 lparam_t result; /* message result */
2186 VARARG(data,bytes); /* message data for sent messages */
2190 /* Set a window timer */
2192 user_handle_t win; /* window handle */
2193 unsigned int msg; /* message to post */
2194 unsigned int rate; /* timer rate in ms */
2195 lparam_t id; /* timer id */
2196 lparam_t lparam; /* message lparam (callback proc) */
2198 lparam_t id; /* timer id */
2202 /* Kill a window timer */
2203 @REQ(kill_win_timer)
2204 user_handle_t win; /* window handle */
2205 lparam_t id; /* timer id */
2206 unsigned int msg; /* message to post */
2210 /* check if the thread owning the window is hung */
2211 @REQ(is_window_hung)
2212 user_handle_t win; /* window handle */
2218 /* Retrieve info about a serial port */
2219 @REQ(get_serial_info)
2220 obj_handle_t handle; /* handle to comm port */
2223 unsigned int eventmask;
2224 unsigned int cookie;
2225 unsigned int pending_write;
2229 /* Set info about a serial port */
2230 @REQ(set_serial_info)
2231 obj_handle_t handle; /* handle to comm port */
2232 int flags; /* bitmask to set values (see below) */
2234 #define SERIALINFO_PENDING_WRITE 0x04
2235 #define SERIALINFO_PENDING_WAIT 0x08
2237 /* Cancel all sync io on a thread */
2239 obj_handle_t handle; /* thread handle on which to cancel io */
2240 client_ptr_t iosb; /* I/O status block (NULL=all) */
2243 /* Create an async I/O */
2244 @REQ(register_async)
2245 int type; /* type of queue to look after */
2246 async_data_t async; /* async I/O parameters */
2247 int count; /* count - usually # of bytes to be read/written */
2249 #define ASYNC_TYPE_READ 0x01
2250 #define ASYNC_TYPE_WRITE 0x02
2251 #define ASYNC_TYPE_WAIT 0x03
2254 /* Cancel all async op on a fd */
2256 obj_handle_t handle; /* handle to comm port, socket or file */
2257 client_ptr_t iosb; /* I/O status block (NULL=all) */
2258 int only_thread; /* cancel matching this thread */
2262 /* Retrieve results of an async */
2263 @REQ(get_async_result)
2264 client_ptr_t user_arg; /* user arg used to identify async */
2266 VARARG(out_data,bytes); /* iosb output data */
2270 /* Notify direct completion of async and close the wait handle if not blocking */
2271 @REQ(set_async_direct_result)
2272 obj_handle_t handle; /* wait handle */
2273 apc_param_t information; /* IO_STATUS_BLOCK Information */
2274 unsigned int status; /* completion status */
2275 int mark_pending; /* set async to pending before completion? */
2277 obj_handle_t handle; /* wait handle, or NULL if closed */
2281 /* Perform a read on a file object */
2283 async_data_t async; /* async I/O parameters */
2284 file_pos_t pos; /* read position */
2286 obj_handle_t wait; /* handle to wait on for blocking read */
2287 unsigned int options; /* device open options */
2288 VARARG(data,bytes); /* read data */
2292 /* Perform a write on a file object */
2294 async_data_t async; /* async I/O parameters */
2295 file_pos_t pos; /* write position */
2296 VARARG(data,bytes); /* write data */
2298 obj_handle_t wait; /* handle to wait on for blocking write */
2299 unsigned int options; /* device open options */
2300 data_size_t size; /* size written */
2304 /* Perform an ioctl on a file */
2306 ioctl_code_t code; /* ioctl code */
2307 async_data_t async; /* async I/O parameters */
2308 VARARG(in_data,bytes); /* ioctl input data */
2310 obj_handle_t wait; /* handle to wait on for blocking ioctl */
2311 unsigned int options; /* device open options */
2312 VARARG(out_data,bytes); /* ioctl output data */
2316 /* Store results of an async irp */
2317 @REQ(set_irp_result)
2318 obj_handle_t handle; /* handle to the irp */
2319 unsigned int status; /* status of the irp */
2320 data_size_t size; /* result size (input or output depending on the operation) */
2321 VARARG(data,bytes); /* output data of the irp */
2325 /* Create a named pipe */
2326 @REQ(create_named_pipe)
2327 unsigned int access;
2328 unsigned int options;
2329 unsigned int sharing;
2330 unsigned int disposition;
2331 unsigned int maxinstances;
2332 unsigned int outsize;
2333 unsigned int insize;
2336 VARARG(objattr,object_attributes); /* object attributes */
2338 obj_handle_t handle; /* handle to the pipe */
2342 /* flags in create_named_pipe and get_named_pipe_info */
2343 #define NAMED_PIPE_MESSAGE_STREAM_WRITE 0x0001
2344 #define NAMED_PIPE_MESSAGE_STREAM_READ 0x0002
2345 #define NAMED_PIPE_NONBLOCKING_MODE 0x0004
2346 #define NAMED_PIPE_SERVER_END 0x8000
2348 /* Set named pipe information by handle */
2349 @REQ(set_named_pipe_info)
2350 obj_handle_t handle;
2354 /* Create a window */
2356 user_handle_t parent; /* parent window */
2357 user_handle_t owner; /* owner window */
2358 atom_t atom; /* class atom */
2359 mod_handle_t instance; /* module instance */
2360 int dpi; /* system DPI */
2361 int awareness; /* thread DPI awareness */
2362 unsigned int style; /* window style */
2363 unsigned int ex_style; /* window extended style */
2364 VARARG(class,unicode_str); /* class name */
2366 user_handle_t handle; /* created window */
2367 user_handle_t parent; /* full handle of parent */
2368 user_handle_t owner; /* full handle of owner */
2369 int extra; /* number of extra bytes */
2370 client_ptr_t class_ptr; /* pointer to class in client address space */
2371 int dpi; /* window DPI if not per-monitor aware */
2372 int awareness; /* window DPI awareness */
2376 /* Destroy a window */
2377 @REQ(destroy_window)
2378 user_handle_t handle; /* handle to the window */
2382 /* Retrieve the desktop window for the current thread */
2383 @REQ(get_desktop_window)
2384 int force; /* force creation if it doesn't exist
*/
2386 user_handle_t top_window
; /* handle to the desktop window
*/
2387 user_handle_t msg_window
; /* handle to the top
-level HWND_MESSAGE parent
*/
2391 /* Set a window owner
*/
2392 @
REQ(set_window_owner
)
2393 user_handle_t handle
; /* handle to the window
*/
2394 user_handle_t owner
; /* new owner
*/
2396 user_handle_t full_owner
; /* full handle of new owner
*/
2397 user_handle_t prev_owner
; /* full handle of previous owner
*/
2401 /* Get information from a window handle
*/
2402 @
REQ(get_window_info
)
2403 user_handle_t handle
; /* handle to the window
*/
2405 user_handle_t full_handle
; /* full
32-bit handle
*/
2406 user_handle_t last_active
; /* last active popup
*/
2407 process_id_t pid
; /* process owning the window
*/
2408 thread_id_t tid
; /* thread owning the window
*/
2409 atom_t atom
; /* class atom
*/
2410 int is_unicode
; /* ANSI or unicode
*/
2411 int dpi
; /* window DPI
*/
2412 int awareness
; /* DPI awareness
*/
2416 /* Set some information in a window
*/
2417 @
REQ(set_window_info
)
2418 unsigned short flags
; /* flags for fields to
set (see below
) */
2419 short int is_unicode
; /* ANSI or unicode
*/
2420 user_handle_t handle
; /* handle to the window
*/
2421 unsigned int style
; /* window style
*/
2422 unsigned int ex_style
; /* window extended style
*/
2423 data_size_t extra_size
; /* size to set in extra bytes
*/
2424 mod_handle_t instance
; /* creator instance
*/
2425 lparam_t user_data
; /* user
-specific data
*/
2426 lparam_t extra_value
; /* value to set in extra bytes or window id
*/
2427 int extra_offset
; /* offset to set in extra bytes
*/
2429 unsigned int old_style
; /* old window style
*/
2430 unsigned int old_ex_style
; /* old window extended style
*/
2431 mod_handle_t old_instance
; /* old creator instance
*/
2432 lparam_t old_user_data
; /* old user
-specific data
*/
2433 lparam_t old_extra_value
; /* old value in extra bytes
*/
2434 lparam_t old_id
; /* old window id
*/
2436 #define SET_WIN_STYLE
0x01
2437 #define SET_WIN_EXSTYLE
0x02
2438 #define SET_WIN_ID
0x04
2439 #define SET_WIN_INSTANCE
0x08
2440 #define SET_WIN_USERDATA
0x10
2441 #define SET_WIN_EXTRA
0x20
2442 #define SET_WIN_UNICODE
0x40
2445 /* Set the parent of a window
*/
2447 user_handle_t handle
; /* handle to the window
*/
2448 user_handle_t parent
; /* handle to the parent
*/
2450 user_handle_t old_parent
; /* old parent window
*/
2451 user_handle_t full_parent
; /* full handle of new parent
*/
2452 int dpi
; /* new window DPI if not per
-monitor aware
*/
2453 int awareness
; /* new DPI awareness
*/
2457 /* Get a list of the window parents
, up to the root of the tree
*/
2458 @
REQ(get_window_parents
)
2459 user_handle_t handle
; /* handle to the window
*/
2461 int count
; /* total count of parents
*/
2462 VARARG(parents
,user_handles
); /* parent handles
*/
2466 /* Get a list of the window children
*/
2467 @
REQ(get_window_children
)
2468 obj_handle_t desktop
; /* handle to desktop
*/
2469 user_handle_t parent
; /* parent window
*/
2470 atom_t atom
; /* class atom for the listed children
*/
2471 thread_id_t tid
; /* thread owning the listed children
*/
2472 VARARG(class
,unicode_str
); /* class name
*/
2474 int count
; /* total count of children
*/
2475 VARARG(children
,user_handles
); /* children handles
*/
2479 /* Get a list of the window children that contain a given point
*/
2480 @
REQ(get_window_children_from_point
)
2481 user_handle_t parent
; /* parent window
*/
2482 int x
; /* point in parent coordinates
*/
2484 int dpi
; /* dpi for the point coordinates
*/
2486 int count
; /* total count of children
*/
2487 VARARG(children
,user_handles
); /* children handles
*/
2491 /* Get window tree information from a window handle
*/
2492 @
REQ(get_window_tree
)
2493 user_handle_t handle
; /* handle to the window
*/
2495 user_handle_t parent
; /* parent window
*/
2496 user_handle_t owner
; /* owner window
*/
2497 user_handle_t next_sibling
; /* next sibling in Z
-order
*/
2498 user_handle_t prev_sibling
; /* prev sibling in Z
-order
*/
2499 user_handle_t first_sibling
; /* first sibling in Z
-order
*/
2500 user_handle_t last_sibling
; /* last sibling in Z
-order
*/
2501 user_handle_t first_child
; /* first child
*/
2502 user_handle_t last_child
; /* last child
*/
2505 /* Set the position and Z order of a window
*/
2506 @
REQ(set_window_pos
)
2507 unsigned short swp_flags
; /* SWP_
* flags
*/
2508 unsigned short paint_flags
; /* paint
flags (see below
) */
2509 user_handle_t handle
; /* handle to the window
*/
2510 user_handle_t previous
; /* previous window in Z order
*/
2511 rectangle_t window
; /* window
rectangle (in parent coords
) */
2512 rectangle_t client
; /* client
rectangle (in parent coords
) */
2513 VARARG(valid
,rectangles
); /* valid rectangles from
WM_NCCALCSIZE (in parent coords
) */
2515 unsigned int new_style
; /* new window style
*/
2516 unsigned int new_ex_style
; /* new window extended style
*/
2517 user_handle_t surface_win
; /* parent window that holds the surface
*/
2518 int needs_update
; /* whether the surface region needs an update
*/
2520 #define SET_WINPOS_PAINT_SURFACE
0x01 /* window has a paintable surface
*/
2521 #define SET_WINPOS_PIXEL_FORMAT
0x02 /* window has a custom pixel format
*/
2523 /* Get the window and client rectangles of a window
*/
2524 @
REQ(get_window_rectangles
)
2525 user_handle_t handle
; /* handle to the window
*/
2526 int relative
; /* coords relative
to (see below
) */
2527 int dpi
; /* DPI to map to
, or zero for per
-monitor DPI
*/
2529 rectangle_t window
; /* window rectangle
*/
2530 rectangle_t client
; /* client rectangle
*/
2532 enum coords_relative
2534 COORDS_CLIENT
, /* relative to client area
*/
2535 COORDS_WINDOW
, /* relative to whole window area
*/
2536 COORDS_PARENT
, /* relative to parent
's client area */
2537 COORDS_SCREEN /* relative to screen origin */
2541 /* Get the window text */
2542 @REQ(get_window_text)
2543 user_handle_t handle; /* handle to the window */
2545 data_size_t length; /* total length in WCHARs */
2546 VARARG(text,unicode_str); /* window text */
2550 /* Set the window text */
2551 @REQ(set_window_text)
2552 user_handle_t handle; /* handle to the window */
2553 VARARG(text,unicode_str); /* window text */
2557 /* Get the coordinates offset between two windows */
2558 @REQ(get_windows_offset)
2559 user_handle_t from; /* handle to the first window */
2560 user_handle_t to; /* handle to the second window */
2561 int dpi; /* DPI to map to, or zero for per-monitor DPI */
2563 int x; /* x coordinate offset */
2564 int y; /* y coordinate offset */
2565 int mirror; /* whether to mirror the x coordinate */
2569 /* Get the visible region of a window */
2570 @REQ(get_visible_region)
2571 user_handle_t window; /* handle to the window */
2572 unsigned int flags; /* DCX flags */
2574 user_handle_t top_win; /* top window to clip against */
2575 rectangle_t top_rect; /* top window visible rect with screen coords */
2576 rectangle_t win_rect; /* window rect in screen coords */
2577 unsigned int paint_flags; /* paint flags (from SET_WINPOS_* flags) */
2578 data_size_t total_size; /* total size of the resulting region */
2579 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2583 /* Get the visible surface region of a window */
2584 @REQ(get_surface_region)
2585 user_handle_t window; /* handle to the window */
2587 rectangle_t visible_rect; /* window visible rect in screen coords */
2588 data_size_t total_size; /* total size of the resulting region */
2589 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2593 /* Get the window region */
2594 @REQ(get_window_region)
2595 user_handle_t window; /* handle to the window */
2597 data_size_t total_size; /* total size of the resulting region */
2598 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2602 /* Set the window region */
2603 @REQ(set_window_region)
2604 user_handle_t window; /* handle to the window */
2605 int redraw; /* redraw the window? */
2606 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2610 /* Get the window update region */
2611 @REQ(get_update_region)
2612 user_handle_t window; /* handle to the window */
2613 user_handle_t from_child; /* child to start searching from */
2614 unsigned int flags; /* update flags (see below) */
2616 user_handle_t child; /* child to repaint (or window itself) */
2617 unsigned int flags; /* resulting update flags (see below) */
2618 data_size_t total_size; /* total size of the resulting region */
2619 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2621 #define UPDATE_NONCLIENT 0x001 /* get region for repainting non-client area */
2622 #define UPDATE_ERASE 0x002 /* get region for erasing client area */
2623 #define UPDATE_PAINT 0x004 /* get region for painting client area */
2624 #define UPDATE_INTERNALPAINT 0x008 /* get region if internal paint is pending */
2625 #define UPDATE_ALLCHILDREN 0x010 /* force repaint of all children */
2626 #define UPDATE_NOCHILDREN 0x020 /* don't try to repaint any children
*/
2627 #define UPDATE_NOREGION
0x040 /* don
't return a region, only the flags */
2628 #define UPDATE_DELAYED_ERASE 0x080 /* still needs erase after BeginPaint */
2629 #define UPDATE_CLIPCHILDREN 0x100 /* remove clipped children from the update region */
2632 /* Update the z order of a window so that a given rectangle is fully visible */
2633 @REQ(update_window_zorder)
2634 user_handle_t window; /* handle to the window */
2635 rectangle_t rect; /* rectangle that must be visible (in client coords) */
2639 /* Mark parts of a window as needing a redraw */
2641 user_handle_t window; /* handle to the window */
2642 unsigned int flags; /* RDW_* flags */
2643 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2647 /* Set a window property */
2648 @REQ(set_window_property)
2649 user_handle_t window; /* handle to the window */
2650 lparam_t data; /* data to store */
2651 atom_t atom; /* property atom (if no name specified) */
2652 VARARG(name,unicode_str); /* property name */
2656 /* Remove a window property */
2657 @REQ(remove_window_property)
2658 user_handle_t window; /* handle to the window */
2659 atom_t atom; /* property atom (if no name specified) */
2660 VARARG(name,unicode_str); /* property name */
2662 lparam_t data; /* data stored in property */
2666 /* Get a window property */
2667 @REQ(get_window_property)
2668 user_handle_t window; /* handle to the window */
2669 atom_t atom; /* property atom (if no name specified) */
2670 VARARG(name,unicode_str); /* property name */
2672 lparam_t data; /* data stored in property */
2676 /* Get the list of properties of a window */
2677 @REQ(get_window_properties)
2678 user_handle_t window; /* handle to the window */
2680 int total; /* total number of properties */
2681 VARARG(props,properties); /* list of properties */
2685 /* Create a window station */
2686 @REQ(create_winstation)
2687 unsigned int flags; /* window station flags */
2688 unsigned int access; /* wanted access rights */
2689 unsigned int attributes; /* object attributes */
2690 obj_handle_t rootdir; /* root directory */
2691 VARARG(name,unicode_str); /* object name */
2693 obj_handle_t handle; /* handle to the window station */
2697 /* Open a handle to a window station */
2698 @REQ(open_winstation)
2699 unsigned int access; /* wanted access rights */
2700 unsigned int attributes; /* object attributes */
2701 obj_handle_t rootdir; /* root directory */
2702 VARARG(name,unicode_str); /* object name */
2704 obj_handle_t handle; /* handle to the window station */
2708 /* Close a window station */
2709 @REQ(close_winstation)
2710 obj_handle_t handle; /* handle to the window station */
2714 /* Get the process current window station */
2715 @REQ(get_process_winstation)
2717 obj_handle_t handle; /* handle to the window station */
2721 /* Set the process current window station */
2722 @REQ(set_process_winstation)
2723 obj_handle_t handle; /* handle to the window station */
2727 /* Enumerate window stations */
2728 @REQ(enum_winstation)
2729 unsigned int index; /* current index */
2731 unsigned int next; /* next index */
2732 VARARG(name,unicode_str); /* window station name */
2736 /* Create a desktop */
2737 @REQ(create_desktop)
2738 unsigned int flags; /* desktop flags */
2739 unsigned int access; /* wanted access rights */
2740 unsigned int attributes; /* object attributes */
2741 VARARG(name,unicode_str); /* object name */
2743 obj_handle_t handle; /* handle to the desktop */
2747 /* Open a handle to a desktop */
2749 obj_handle_t winsta; /* window station to open (null allowed) */
2750 unsigned int flags; /* desktop flags */
2751 unsigned int access; /* wanted access rights */
2752 unsigned int attributes; /* object attributes */
2753 VARARG(name,unicode_str); /* object name */
2755 obj_handle_t handle; /* handle to the desktop */
2759 /* Open a handle to current input desktop */
2760 @REQ(open_input_desktop)
2761 unsigned int flags; /* desktop flags */
2762 unsigned int access; /* wanted access rights */
2763 unsigned int attributes; /* object attributes */
2765 obj_handle_t handle; /* handle to the desktop */
2769 /* Changes the current input desktop */
2770 @REQ(set_input_desktop)
2771 obj_handle_t handle; /* handle to the desktop */
2775 /* Close a desktop */
2777 obj_handle_t handle; /* handle to the desktop */
2781 /* Get the thread current desktop */
2782 @REQ(get_thread_desktop)
2783 thread_id_t tid; /* thread id */
2785 obj_handle_t handle; /* handle to the desktop */
2789 /* Set the thread current desktop */
2790 @REQ(set_thread_desktop)
2791 obj_handle_t handle; /* handle to the desktop */
2795 /* Enumerate desktops */
2797 obj_handle_t winstation; /* handle to the window station */
2798 unsigned int index; /* current index */
2800 unsigned int next; /* next index */
2801 VARARG(name,unicode_str); /* window station name */
2805 /* Get/set information about a user object (window station or desktop) */
2806 @REQ(set_user_object_info)
2807 obj_handle_t handle; /* handle to the object */
2808 unsigned int flags; /* information to set/get */
2809 unsigned int obj_flags; /* new object flags */
2811 int is_desktop; /* is object a desktop? */
2812 unsigned int old_obj_flags; /* old object flags */
2813 VARARG(name,unicode_str); /* object name */
2815 #define SET_USER_OBJECT_SET_FLAGS 1
2816 #define SET_USER_OBJECT_GET_FULL_NAME 2
2819 /* Register a hotkey */
2820 @REQ(register_hotkey)
2821 user_handle_t window; /* handle to the window */
2822 int id; /* hotkey identifier */
2823 unsigned int flags; /* modifier keys */
2824 unsigned int vkey; /* virtual key code */
2826 int replaced; /* did we replace an existing hotkey? */
2827 unsigned int flags; /* flags of replaced hotkey */
2828 unsigned int vkey; /* virtual key code of replaced hotkey */
2832 /* Unregister a hotkey */
2833 @REQ(unregister_hotkey)
2834 user_handle_t window; /* handle to the window */
2835 int id; /* hotkey identifier */
2837 unsigned int flags; /* flags of removed hotkey */
2838 unsigned int vkey; /* virtual key code of removed hotkey */
2842 /* Attach (or detach) thread inputs */
2843 @REQ(attach_thread_input)
2844 thread_id_t tid_from; /* thread to be attached */
2845 thread_id_t tid_to; /* thread to which tid_from should be attached */
2846 int attach; /* is it an attach? */
2850 /* Get input data for a given thread */
2851 @REQ(get_thread_input)
2852 thread_id_t tid; /* id of thread */
2854 user_handle_t focus; /* handle to the focus window */
2855 user_handle_t capture; /* handle to the capture window */
2856 user_handle_t active; /* handle to the active window */
2857 user_handle_t foreground; /* handle to the global foreground window */
2858 user_handle_t menu_owner; /* handle to the menu owner */
2859 user_handle_t move_size; /* handle to the moving/resizing window */
2860 user_handle_t caret; /* handle to the caret window */
2861 user_handle_t cursor; /* handle to the cursor */
2862 int show_count; /* cursor show count */
2863 rectangle_t rect; /* caret rectangle */
2867 /* Get the time of the last input event */
2868 @REQ(get_last_input_time)
2874 /* Retrieve queue keyboard state for current thread or global async state */
2876 int async; /* whether to query the async state */
2877 int key; /* optional key code or -1 */
2879 unsigned char state; /* state of specified key */
2880 VARARG(keystate,bytes); /* state array for all the keys */
2883 /* Set queue keyboard state for current thread */
2885 int async; /* whether to change the async state too */
2886 VARARG(keystate,bytes); /* state array for all the keys */
2889 /* Set the system foreground window */
2890 @REQ(set_foreground_window)
2891 user_handle_t handle; /* handle to the foreground window */
2893 user_handle_t previous; /* handle to the previous foreground window */
2894 int send_msg_old; /* whether we have to send a msg to the old window */
2895 int send_msg_new; /* whether we have to send a msg to the new window */
2898 /* Set the current thread focus window */
2899 @REQ(set_focus_window)
2900 user_handle_t handle; /* handle to the focus window */
2902 user_handle_t previous; /* handle to the previous focus window */
2905 /* Set the current thread active window */
2906 @REQ(set_active_window)
2907 user_handle_t handle; /* handle to the active window */
2909 user_handle_t previous; /* handle to the previous active window */
2912 /* Set the current thread capture window */
2913 @REQ(set_capture_window)
2914 user_handle_t handle; /* handle to the capture window */
2915 unsigned int flags; /* capture flags (see below) */
2917 user_handle_t previous; /* handle to the previous capture window */
2918 user_handle_t full_handle; /* full 32-bit handle of new capture window */
2920 #define CAPTURE_MENU 0x01 /* capture is for a menu */
2921 #define CAPTURE_MOVESIZE 0x02 /* capture is for moving/resizing */
2924 /* Set the current thread caret window */
2925 @REQ(set_caret_window)
2926 user_handle_t handle; /* handle to the caret window */
2927 int width; /* caret width */
2928 int height; /* caret height */
2930 user_handle_t previous; /* handle to the previous caret window */
2931 rectangle_t old_rect; /* previous caret rectangle */
2932 int old_hide; /* previous hide count */
2933 int old_state; /* previous caret state (1=on, 0=off) */
2937 /* Set the current thread caret information */
2938 @REQ(set_caret_info)
2939 unsigned int flags; /* caret flags (see below) */
2940 user_handle_t handle; /* handle to the caret window */
2941 int x; /* caret x position */
2942 int y; /* caret y position */
2943 int hide; /* increment for hide count (can be negative to show it) */
2944 int state; /* caret state (see below) */
2946 user_handle_t full_handle; /* handle to the current caret window */
2947 rectangle_t old_rect; /* previous caret rectangle */
2948 int old_hide; /* previous hide count */
2949 int old_state; /* previous caret state (1=on, 0=off) */
2951 #define SET_CARET_POS 0x01 /* set the caret position from x,y */
2952 #define SET_CARET_HIDE 0x02 /* increment the caret hide count */
2953 #define SET_CARET_STATE 0x04 /* set the caret on/off state */
2956 CARET_STATE_OFF, /* off */
2957 CARET_STATE_ON, /* on */
2958 CARET_STATE_TOGGLE, /* toggle current state */
2959 CARET_STATE_ON_IF_MOVED /* on if the position differs, unchanged otherwise */
2963 /* Set a window hook */
2965 int id; /* id of the hook */
2966 process_id_t pid; /* id of process to set the hook into */
2967 thread_id_t tid; /* id of thread to set the hook into */
2970 client_ptr_t proc; /* hook procedure */
2972 int unicode; /* is it a unicode hook? */
2973 VARARG(module,unicode_str); /* module name */
2975 user_handle_t handle; /* handle to the hook */
2976 unsigned int active_hooks; /* active hooks bitmap */
2980 /* Remove a window hook */
2982 user_handle_t handle; /* handle to the hook */
2983 client_ptr_t proc; /* hook procedure if handle is 0 */
2984 int id; /* id of the hook if handle is 0 */
2986 unsigned int active_hooks; /* active hooks bitmap */
2990 /* Start calling a hook chain */
2991 @REQ(start_hook_chain)
2992 int id; /* id of the hook */
2993 int event; /* signalled event */
2994 user_handle_t window; /* handle to the event window */
2995 int object_id; /* object id for out of context winevent */
2996 int child_id; /* child id for out of context winevent */
2998 user_handle_t handle; /* handle to the next hook */
2999 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
3000 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
3001 int unicode; /* is it a unicode hook? */
3002 client_ptr_t proc; /* hook procedure */
3003 unsigned int active_hooks; /* active hooks bitmap */
3004 VARARG(module,unicode_str); /* module name */
3008 /* Finished calling a hook chain */
3009 @REQ(finish_hook_chain)
3010 int id; /* id of the hook */
3014 /* Get the hook information */
3016 user_handle_t handle; /* handle to the current hook */
3017 int get_next; /* do we want info about current or next hook? */
3018 int event; /* signalled event */
3019 user_handle_t window; /* handle to the event window */
3020 int object_id; /* object id for out of context winevent */
3021 int child_id; /* child id for out of context winevent */
3023 user_handle_t handle; /* handle to the hook */
3024 int id; /* id of the hook */
3025 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
3026 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
3027 client_ptr_t proc; /* hook procedure */
3028 int unicode; /* is it a unicode hook? */
3029 VARARG(module,unicode_str); /* module name */
3033 /* Create a window class */
3035 int local; /* is it a local class? */
3036 atom_t atom; /* class atom */
3037 unsigned int style; /* class style */
3038 mod_handle_t instance; /* module instance */
3039 int extra; /* number of extra class bytes */
3040 int win_extra; /* number of window extra bytes */
3041 client_ptr_t client_ptr; /* pointer to class in client address space */
3042 data_size_t name_offset; /* base class name offset for specified atom */
3043 VARARG(name,unicode_str); /* class name */
3045 atom_t atom; /* resulting class atom */
3049 /* Destroy a window class */
3051 atom_t atom; /* class atom */
3052 mod_handle_t instance; /* module instance */
3053 VARARG(name,unicode_str); /* class name */
3055 client_ptr_t client_ptr; /* pointer to class in client address space */
3059 /* Set some information in a class */
3060 @REQ(set_class_info)
3061 user_handle_t window; /* handle to the window */
3062 unsigned int flags; /* flags for info to set (see below) */
3063 atom_t atom; /* class atom */
3064 unsigned int style; /* class style */
3065 int win_extra; /* number of window extra bytes */
3066 mod_handle_t instance; /* module instance */
3067 int extra_offset; /* offset to set in extra bytes */
3068 data_size_t extra_size; /* size to set in extra bytes */
3069 lparam_t extra_value; /* value to set in extra bytes */
3071 atom_t old_atom; /* previous class atom */
3072 atom_t base_atom; /* base class atom */
3073 mod_handle_t old_instance; /* previous module instance */
3074 lparam_t old_extra_value; /* old value in extra bytes */
3075 unsigned int old_style; /* previous class style */
3076 int old_extra; /* previous number of class extra bytes */
3077 int old_win_extra; /* previous number of window extra bytes */
3079 #define SET_CLASS_ATOM 0x0001
3080 #define SET_CLASS_STYLE 0x0002
3081 #define SET_CLASS_WINEXTRA 0x0004
3082 #define SET_CLASS_INSTANCE 0x0008
3083 #define SET_CLASS_EXTRA 0x0010
3086 /* Open the clipboard */
3087 @REQ(open_clipboard)
3088 user_handle_t window; /* clipboard window */
3090 user_handle_t owner; /* current clipboard owner */
3094 /* Close the clipboard */
3095 @REQ(close_clipboard)
3097 user_handle_t viewer; /* first clipboard viewer */
3098 user_handle_t owner; /* current clipboard owner */
3102 /* Empty the clipboard and grab ownership */
3103 @REQ(empty_clipboard)
3107 /* Add a data format to the clipboard */
3108 @REQ(set_clipboard_data)
3109 unsigned int format; /* clipboard format of the data */
3110 unsigned int lcid; /* locale id to use for synthesizing text formats */
3111 VARARG(data,bytes); /* data contents */
3113 unsigned int seqno; /* sequence number for the set data */
3117 /* Fetch a data format from the clipboard */
3118 @REQ(get_clipboard_data)
3119 unsigned int format; /* clipboard format of the data */
3120 int render; /* will we try to render it if missing? */
3121 int cached; /* do we already have it in the client-side cache? */
3122 unsigned int seqno; /* sequence number for the data in the cache */
3124 unsigned int from; /* for synthesized data, format to generate it from */
3125 user_handle_t owner; /* clipboard owner for delayed-rendered formats */
3126 unsigned int seqno; /* sequence number for the originally set data */
3127 data_size_t total; /* total data size */
3128 VARARG(data,bytes); /* data contents */
3132 /* Retrieve a list of available formats */
3133 @REQ(get_clipboard_formats)
3134 unsigned int format; /* specific format to query, return all if 0 */
3136 unsigned int count; /* count of available formats */
3137 VARARG(formats,uints); /* array of available formats */
3141 /* Retrieve the next available format */
3142 @REQ(enum_clipboard_formats)
3143 unsigned int previous; /* previous format, or first if 0 */
3145 unsigned int format; /* next format */
3149 /* Release ownership of the clipboard */
3150 @REQ(release_clipboard)
3151 user_handle_t owner; /* clipboard owner to release */
3153 user_handle_t viewer; /* first clipboard viewer */
3154 user_handle_t owner; /* current clipboard owner */
3158 /* Get clipboard information */
3159 @REQ(get_clipboard_info)
3161 user_handle_t window; /* clipboard window */
3162 user_handle_t owner; /* clipboard owner */
3163 user_handle_t viewer; /* clipboard viewer */
3164 unsigned int seqno; /* current sequence number */
3168 /* Set the clipboard viewer window */
3169 @REQ(set_clipboard_viewer)
3170 user_handle_t viewer; /* clipboard viewer */
3171 user_handle_t previous; /* if non-zero, check that this was the previous viewer */
3173 user_handle_t old_viewer; /* previous clipboard viewer */
3174 user_handle_t owner; /* clipboard owner */
3178 /* Add a clipboard listener window */
3179 @REQ(add_clipboard_listener)
3180 user_handle_t window; /* clipboard listener window */
3184 /* Remove a clipboard listener window */
3185 @REQ(remove_clipboard_listener)
3186 user_handle_t window; /* clipboard listener window */
3190 /* Create a security token */
3192 struct luid token_id;
3193 unsigned int access; /* access rights to the new token */
3194 int primary; /* is the new token to be a primary one? */
3195 int impersonation_level; /* impersonation level of the new token */
3196 abstime_t expire; /* expiration time */
3200 /* VARARG(objattr,object_attributes); */
3201 /* VARARG(user,sid); */
3202 /* VARARG(groups,sid); */
3203 /* VARARG(privs,luid_attr); */
3204 /* VARARG(dacl,acl); */
3206 obj_handle_t token; /* handle to the token */
3210 /* Open a security token */
3212 obj_handle_t handle; /* handle to the thread or process */
3213 unsigned int access; /* access rights to the new token */
3214 unsigned int attributes;/* object attributes */
3215 unsigned int flags; /* flags (see below) */
3217 obj_handle_t token; /* handle to the token */
3219 #define OPEN_TOKEN_THREAD 1
3220 #define OPEN_TOKEN_AS_SELF 2
3223 /* Set/get the global windows */
3224 @REQ(set_global_windows)
3225 unsigned int flags; /* flags for fields to set (see below) */
3226 user_handle_t shell_window; /* handle to the new shell window */
3227 user_handle_t shell_listview; /* handle to the new shell listview window */
3228 user_handle_t progman_window; /* handle to the new program manager window */
3229 user_handle_t taskman_window; /* handle to the new task manager window */
3231 user_handle_t old_shell_window; /* handle to the shell window */
3232 user_handle_t old_shell_listview; /* handle to the shell listview window */
3233 user_handle_t old_progman_window; /* handle to the new program manager window */
3234 user_handle_t old_taskman_window; /* handle to the new task manager window */
3236 #define SET_GLOBAL_SHELL_WINDOWS 0x01 /* set both main shell and listview windows */
3237 #define SET_GLOBAL_PROGMAN_WINDOW 0x02
3238 #define SET_GLOBAL_TASKMAN_WINDOW 0x04
3240 /* Adjust the privileges held by a token */
3241 @REQ(adjust_token_privileges)
3242 obj_handle_t handle; /* handle to the token */
3243 int disable_all; /* disable all privileges? */
3244 int get_modified_state; /* get modified privileges? */
3245 VARARG(privileges,luid_attr); /* privileges to enable/disable/remove */
3247 unsigned int len; /* total length in bytes required to store token privileges */
3248 VARARG(privileges,luid_attr); /* modified privileges */
3251 /* Retrieves the set of privileges held by or available to a token */
3252 @REQ(get_token_privileges)
3253 obj_handle_t handle; /* handle to the token */
3255 unsigned int len; /* total length in bytes required to store token privileges */
3256 VARARG(privileges,luid_attr); /* privileges held by or available to a token */
3259 /* Check the token has the required privileges */
3260 @REQ(check_token_privileges)
3261 obj_handle_t handle; /* handle to the token */
3262 int all_required; /* are all the privileges required for the check to succeed? */
3263 VARARG(privileges,luid_attr); /* privileges to check */
3265 int has_privileges; /* does the token have the required privileges? */
3266 VARARG(privileges,luid_attr); /* privileges held by or available to a token */
3269 @REQ(duplicate_token)
3270 obj_handle_t handle; /* handle to the token to duplicate */
3271 unsigned int access; /* access rights to the new token */
3272 int primary; /* is the new token to be a primary one? */
3273 int impersonation_level; /* impersonation level of the new token */
3274 VARARG(objattr,object_attributes); /* object attributes */
3276 obj_handle_t new_handle; /* duplicated handle */
3280 obj_handle_t handle; /* handle to the token to duplicate */
3281 unsigned int flags; /* flags */
3282 data_size_t privileges_size; /* size of privileges */
3283 VARARG(privileges,luid_attr,privileges_size); /* privileges to remove from new token */
3284 VARARG(disable_sids,sid); /* array of groups to remove from new token */
3286 obj_handle_t new_handle; /* filtered handle */
3290 obj_handle_t handle; /* handle to the token */
3291 unsigned int desired_access; /* desired access to the object */
3292 generic_map_t mapping; /* mapping to specific rights */
3293 VARARG(sd,security_descriptor); /* security descriptor to check */
3295 unsigned int access_granted; /* access rights actually granted */
3296 unsigned int access_status; /* was access granted? */
3297 unsigned int privileges_len; /* length needed to store privileges */
3298 VARARG(privileges,luid_attr); /* privileges used during access check */
3302 obj_handle_t handle; /* handle to the token */
3303 unsigned int which_sid; /* which SID to retrieve from the token */
3305 data_size_t sid_len; /* length needed to store sid */
3306 VARARG(sid,sid); /* the sid specified by which_sid from the token */
3309 @REQ(get_token_groups)
3310 obj_handle_t handle; /* handle to the token */
3311 unsigned int attr_mask; /* mask for wanted attributes */
3313 data_size_t attr_len; /* length needed to store attrs */
3314 data_size_t sid_len; /* length needed to store sids */
3315 VARARG(attrs,uints,attr_len); /* group attributes */
3316 VARARG(sids,sids); /* group sids */
3319 @REQ(get_token_default_dacl)
3320 obj_handle_t handle; /* handle to the token */
3322 data_size_t acl_len; /* length needed to store access control list */
3323 VARARG(acl,acl); /* access control list */
3326 @REQ(set_token_default_dacl)
3327 obj_handle_t handle; /* handle to the token */
3328 VARARG(acl,acl); /* default dacl to set */
3331 @REQ(set_security_object)
3332 obj_handle_t handle; /* handle to the object */
3333 unsigned int security_info; /* which parts of security descriptor to set */
3334 VARARG(sd,security_descriptor); /* security descriptor to set */
3337 @REQ(get_security_object)
3338 obj_handle_t handle; /* handle to the object */
3339 unsigned int security_info; /* which parts of security descriptor to get */
3341 unsigned int sd_len; /* buffer size needed for sd */
3342 VARARG(sd,security_descriptor); /* retrieved security descriptor */
3349 obj_handle_t handle;
3350 unsigned int access;
3351 unsigned int attributes;
3355 /* Return a list of all opened handles */
3356 @REQ(get_system_handles)
3358 unsigned int count; /* number of handles */
3359 VARARG(data,handle_infos); /* array of handle_infos */
3363 /* Create a mailslot */
3364 @REQ(create_mailslot)
3365 unsigned int access; /* wanted access rights */
3366 timeout_t read_timeout;
3367 unsigned int max_msgsize;
3368 VARARG(objattr,object_attributes); /* object attributes */
3370 obj_handle_t handle; /* handle to the mailslot */
3374 /* Set mailslot information */
3375 @REQ(set_mailslot_info)
3376 obj_handle_t handle; /* handle to the mailslot */
3377 timeout_t read_timeout;
3380 timeout_t read_timeout;
3381 unsigned int max_msgsize;
3383 #define MAILSLOT_SET_READ_TIMEOUT 1
3386 /* Create a directory object */
3387 @REQ(create_directory)
3388 unsigned int access; /* access flags */
3389 VARARG(objattr,object_attributes); /* object attributes */
3391 obj_handle_t handle; /* handle to the directory */
3395 /* Open a directory object */
3396 @REQ(open_directory)
3397 unsigned int access; /* access flags */
3398 unsigned int attributes; /* object attributes */
3399 obj_handle_t rootdir; /* root directory */
3400 VARARG(directory_name,unicode_str); /* Directory name */
3402 obj_handle_t handle; /* handle to the directory */
3406 /* Get a directory entry by index */
3407 @REQ(get_directory_entry)
3408 obj_handle_t handle; /* handle to the directory */
3409 unsigned int index; /* entry index */
3411 data_size_t total_len; /* total length needed for strings */
3412 data_size_t name_len; /* length of the entry name in bytes */
3413 VARARG(name,unicode_str,name_len); /* entry name */
3414 VARARG(type,unicode_str); /* entry type */
3418 /* Create a symbolic link object */
3419 @REQ(create_symlink)
3420 unsigned int access; /* access flags */
3421 VARARG(objattr,object_attributes); /* object attributes */
3422 VARARG(target_name,unicode_str); /* target name */
3424 obj_handle_t handle; /* handle to the symlink */
3428 /* Open a symbolic link object */
3430 unsigned int access; /* access flags */
3431 unsigned int attributes; /* object attributes */
3432 obj_handle_t rootdir; /* root directory */
3433 VARARG(name,unicode_str); /* symlink name */
3435 obj_handle_t handle; /* handle to the symlink */
3439 /* Query a symbolic link object */
3441 obj_handle_t handle; /* handle to the symlink */
3443 data_size_t total; /* total needed size for name */
3444 VARARG(target_name,unicode_str); /* target name */
3448 /* Query basic object information */
3449 @REQ(get_object_info)
3450 obj_handle_t handle; /* handle to the object */
3452 unsigned int access; /* granted access mask */
3453 unsigned int ref_count; /* object ref count */
3454 unsigned int handle_count; /* object handle count */
3458 /* Query the full name of an object */
3459 @REQ(get_object_name)
3460 obj_handle_t handle; /* handle to the object */
3462 data_size_t total; /* total needed size for name */
3463 VARARG(name,unicode_str); /* object name */
3467 /* Query object type name information */
3468 @REQ(get_object_type)
3469 obj_handle_t handle; /* handle to the object */
3471 VARARG(info,object_type_info); /* type information */
3475 /* Query type information for all types */
3476 @REQ(get_object_types)
3478 int count; /* total count of object types */
3479 VARARG(info,object_types_info); /* type information */
3483 /* Allocate a locally-unique identifier */
3484 @REQ(allocate_locally_unique_id)
3490 /* Create a device manager */
3491 @REQ(create_device_manager)
3492 unsigned int access; /* wanted access rights */
3493 unsigned int attributes; /* object attributes */
3495 obj_handle_t handle; /* handle to the device */
3499 /* Create a device */
3501 obj_handle_t rootdir; /* root directory */
3502 client_ptr_t user_ptr; /* opaque ptr for use by client */
3503 obj_handle_t manager; /* device manager */
3504 VARARG(name,unicode_str); /* object name */
3508 /* Delete a device */
3510 obj_handle_t manager; /* handle to the device manager */
3511 client_ptr_t device; /* pointer to the device */
3515 /* Retrieve the next pending device irp request */
3516 @REQ(get_next_device_request)
3517 obj_handle_t manager; /* handle to the device manager */
3518 obj_handle_t prev; /* handle to the previous irp */
3519 unsigned int status; /* status of the previous irp */
3520 client_ptr_t user_ptr; /* user pointer of the previous irp */
3521 int pending; /* was the previous irp marked pending? */
3522 unsigned int iosb_status; /* IOSB status of the previous irp */
3523 data_size_t result; /* IOSB result of the previous irp */
3524 VARARG(data,bytes); /* output data of the previous irp */
3526 irp_params_t params; /* irp parameters */
3527 obj_handle_t next; /* handle to the next irp */
3528 thread_id_t client_tid; /* tid of thread calling irp */
3529 client_ptr_t client_thread; /* pointer to thread object of calling irp */
3530 data_size_t in_size; /* total needed input size */
3531 VARARG(next_data,bytes); /* input data of the next irp */
3535 /* Get kernel pointer from server object */
3536 @REQ(get_kernel_object_ptr)
3537 obj_handle_t manager; /* handle to the device manager */
3538 obj_handle_t handle; /* object handle */
3540 client_ptr_t user_ptr; /* kernel object pointer */
3544 /* Associate kernel pointer with server object */
3545 @REQ(set_kernel_object_ptr)
3546 obj_handle_t manager; /* handle to the device manager */
3547 obj_handle_t handle; /* object handle */
3548 client_ptr_t user_ptr; /* kernel object pointer */
3552 /* Grab server object reference from kernel object pointer */
3553 @REQ(grab_kernel_object)
3554 obj_handle_t manager; /* handle to the device manager */
3555 client_ptr_t user_ptr; /* kernel object pointer */
3559 /* Release server object reference from kernel object pointer */
3560 @REQ(release_kernel_object)
3561 obj_handle_t manager; /* handle to the device manager */
3562 client_ptr_t user_ptr; /* kernel object pointer */
3566 /* Get handle from kernel object pointer */
3567 @REQ(get_kernel_object_handle)
3568 obj_handle_t manager; /* handle to the device manager */
3569 client_ptr_t user_ptr; /* kernel object pointer */
3570 unsigned int access; /* wanted access rights */
3572 obj_handle_t handle; /* kernel object handle */
3576 /* Make the current process a system process */
3577 @REQ(make_process_system)
3578 obj_handle_t handle; /* handle to the process */
3580 obj_handle_t event; /* event signaled when all user processes have exited */
3584 /* Get detailed fixed-size information about a token */
3585 @REQ(get_token_info)
3586 obj_handle_t handle; /* handle to the object */
3588 struct luid token_id; /* locally-unique identifier of the token */
3589 struct luid modified_id; /* locally-unique identifier of the modified version of the token */
3590 unsigned int session_id; /* token session id */
3591 int primary; /* is the token primary or impersonation? */
3592 int impersonation_level; /* level of impersonation */
3593 int elevation; /* elevation type */
3594 int group_count; /* the number of groups the token is a member of */
3595 int privilege_count; /* the number of privileges the token has */
3599 /* Create a token which is an elevation counterpart to this token */
3600 @REQ(create_linked_token)
3601 obj_handle_t handle; /* handle to the token */
3603 obj_handle_t linked; /* handle to the linked token */
3607 /* Create I/O completion port */
3608 @REQ(create_completion)
3609 unsigned int access; /* desired access to a port */
3610 unsigned int concurrent; /* max number of concurrent active threads */
3611 VARARG(objattr,object_attributes); /* object attributes */
3613 obj_handle_t handle; /* port handle */
3617 /* Open I/O completion port */
3618 @REQ(open_completion)
3619 unsigned int access; /* desired access to a port */
3620 unsigned int attributes; /* object attributes */
3621 obj_handle_t rootdir; /* root directory */
3622 VARARG(filename,unicode_str); /* port name */
3624 obj_handle_t handle; /* port handle */
3628 /* add completion to completion port */
3629 @REQ(add_completion)
3630 obj_handle_t handle; /* port handle */
3631 apc_param_t ckey; /* completion key */
3632 apc_param_t cvalue; /* completion value */
3633 apc_param_t information; /* IO_STATUS_BLOCK Information */
3634 unsigned int status; /* completion result */
3638 /* get completion from completion port queue */
3639 @REQ(remove_completion)
3640 obj_handle_t handle; /* port handle */
3642 apc_param_t ckey; /* completion key */
3643 apc_param_t cvalue; /* completion value */
3644 apc_param_t information; /* IO_STATUS_BLOCK Information */
3645 unsigned int status; /* completion result */
3649 /* get completion queue depth */
3650 @REQ(query_completion)
3651 obj_handle_t handle; /* port handle */
3653 unsigned int depth; /* completion queue depth */
3657 /* associate object with completion port */
3658 @REQ(set_completion_info)
3659 obj_handle_t handle; /* object handle */
3660 apc_param_t ckey; /* completion key */
3661 obj_handle_t chandle; /* port handle */
3665 /* check for associated completion and push msg */
3666 @REQ(add_fd_completion)
3667 obj_handle_t handle; /* async' object
*/
3668 apc_param_t cvalue
; /* completion value
*/
3669 apc_param_t information
; /* IO_STATUS_BLOCK Information
*/
3670 unsigned int status
; /* completion status
*/
3671 int async
; /* completion is an async result
*/
3675 /* set fd completion information
*/
3676 @
REQ(set_fd_completion_mode
)
3677 obj_handle_t handle
; /* handle to a file or directory
*/
3678 unsigned int flags
; /* completion notification flags
*/
3682 /* set fd disposition information
*/
3683 @
REQ(set_fd_disp_info
)
3684 obj_handle_t handle
; /* handle to a file or directory
*/
3685 unsigned int flags
; /* what actions should be taken when deleting a file
*/
3689 /* set fd name information
*/
3690 @
REQ(set_fd_name_info
)
3691 obj_handle_t handle
; /* handle to a file or directory
*/
3692 obj_handle_t rootdir
; /* root directory
*/
3693 data_size_t namelen
; /* length of NT name in bytes
*/
3694 int link
; /* link instead of renaming
*/
3695 unsigned int flags
; /* FILE_RENAME_
* flags
*/
3696 VARARG(name
,unicode_str
,namelen
); /* NT name
*/
3697 VARARG(filename
,string
); /* new file name
*/
3701 /* set fd eof information
*/
3702 @
REQ(set_fd_eof_info
)
3703 obj_handle_t handle
; /* handle to a file or directory
*/
3704 file_pos_t eof
; /* offset of eof of file
*/
3708 /* Retrieve layered info for a window
*/
3709 @
REQ(get_window_layered_info
)
3710 user_handle_t handle
; /* handle to the window
*/
3712 unsigned int color_key
; /* color key
*/
3713 unsigned int alpha
; /* alpha (0.
.255) */
3714 unsigned int flags
; /* LWA_
* flags
*/
3718 /* Set layered info for a window
*/
3719 @
REQ(set_window_layered_info
)
3720 user_handle_t handle
; /* handle to the window
*/
3721 unsigned int color_key
; /* color key
*/
3722 unsigned int alpha
; /* alpha (0.
.255) */
3723 unsigned int flags
; /* LWA_
* flags
*/
3727 /* Allocate an arbitrary user handle
*/
3728 @
REQ(alloc_user_handle
)
3730 user_handle_t handle
; /* allocated handle
*/
3734 /* Free an arbitrary user handle
*/
3735 @
REQ(free_user_handle
)
3736 user_handle_t handle
; /* handle to free
*/
3740 /* Set
/get the current cursor
*/
3742 unsigned int flags
; /* flags for fields to
set (see below
) */
3743 user_handle_t handle
; /* handle to the cursor
*/
3744 int show_count
; /* show count increment
/decrement
*/
3745 int x
; /* cursor position
*/
3747 rectangle_t clip
; /* cursor clip rectangle
*/
3749 user_handle_t prev_handle
; /* previous handle
*/
3750 int prev_count
; /* previous show count
*/
3751 int prev_x
; /* previous position
*/
3753 int new_x
; /* new position
*/
3755 rectangle_t new_clip
; /* new clip rectangle
*/
3756 unsigned int last_change
; /* time of last position change
*/
3758 #define SET_CURSOR_HANDLE
0x01
3759 #define SET_CURSOR_COUNT
0x02
3760 #define SET_CURSOR_POS
0x04
3761 #define SET_CURSOR_CLIP
0x08
3762 #define SET_CURSOR_NOCLIP
0x10
3763 #define SET_CURSOR_FSCLIP
0x20
3765 /* Get the history of the
64 last cursor positions
*/
3766 @
REQ(get_cursor_history
)
3768 VARARG(history
,cursor_positions
);
3772 /* Batch read rawinput message data
*/
3773 @
REQ(get_rawinput_buffer
)
3774 data_size_t header_size
; /* size of RAWINPUTHEADER structure
*/
3775 int read_data
; /* read the rawinput buffer data
*/
3777 data_size_t next_size
; /* minimum size to get next message data
*/
3782 /* Modify the list of registered rawinput devices
*/
3783 @
REQ(update_rawinput_devices
)
3784 VARARG(devices
,rawinput_devices
);
3787 /* Create a new job object
*/
3789 unsigned int access
; /* wanted access rights
*/
3790 VARARG(objattr
,object_attributes
); /* object attributes
*/
3792 obj_handle_t handle
; /* handle to the job
*/
3796 /* Open a job object
*/
3798 unsigned int access
; /* wanted access rights
*/
3799 unsigned int attributes
; /* object attributes
*/
3800 obj_handle_t rootdir
; /* root directory
*/
3801 VARARG(name
,unicode_str
); /* object name
*/
3803 obj_handle_t handle
; /* handle to the job
*/
3807 /* Assign a job object to a process
*/
3809 obj_handle_t job
; /* handle to the job
*/
3810 obj_handle_t process
; /* handle to the process
*/
3814 /* Check if a process is associated with a job
*/
3815 @
REQ(process_in_job
)
3816 obj_handle_t job
; /* handle to the job
*/
3817 obj_handle_t process
; /* handle to the process
*/
3821 /* Set limit flags on a job
*/
3822 @
REQ(set_job_limits
)
3823 obj_handle_t handle
; /* handle to the job
*/
3824 unsigned int limit_flags
; /* new limit flags
*/
3828 /* Set new completion port for a job
*/
3829 @
REQ(set_job_completion_port
)
3830 obj_handle_t job
; /* handle to the job
*/
3831 obj_handle_t port
; /* handle to the completion port
*/
3832 client_ptr_t key
; /* key to send with completion messages
*/
3836 /* Retrieve information about a job
*/
3838 obj_handle_t handle
; /* handle to the job
*/
3840 int total_processes
; /* total count of processes
*/
3841 int active_processes
; /* count of running processes
*/
3842 VARARG(pids
,uints
); /* list of active pids
*/
3846 /* Terminate all processes associated with the job
*/
3848 obj_handle_t handle
; /* handle to the job
*/
3849 int status
; /* process exit code
*/
3853 /* Suspend a process
*/
3854 @
REQ(suspend_process
)
3855 obj_handle_t handle
; /* process handle
*/
3859 /* Resume a process
*/
3860 @
REQ(resume_process
)
3861 obj_handle_t handle
; /* process handle
*/
3865 /* Iterate thread list for process
*/
3866 @
REQ(get_next_thread
)
3867 obj_handle_t process
; /* process handle
*/
3868 obj_handle_t last
; /* thread handle to start with
*/
3869 unsigned int access
; /* desired access for returned handle
*/
3870 unsigned int attributes
; /* returned handle attributes
*/
3871 unsigned int flags
; /* controls iteration direction
*/
3873 obj_handle_t handle
; /* next thread handle
*/