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 permanent or temporary */
1179 @REQ(set_object_permanence)
1180 obj_handle_t handle; /* handle to the object */
1181 int permanent; /* 1 to make permanent, 0 to make temporary */
1185 /* Open a handle to a process */
1187 process_id_t pid; /* process id to open */
1188 unsigned int access; /* wanted access rights */
1189 unsigned int attributes; /* object attributes */
1191 obj_handle_t handle; /* handle to the process */
1195 /* Open a handle to a thread */
1197 thread_id_t tid; /* thread id to open */
1198 unsigned int access; /* wanted access rights */
1199 unsigned int attributes; /* object attributes */
1201 obj_handle_t handle; /* handle to the thread */
1205 /* Wait for handles */
1207 int flags; /* wait flags (see below) */
1208 client_ptr_t cookie; /* magic cookie to return to client */
1209 abstime_t timeout; /* timeout */
1210 data_size_t size; /* size of select_op */
1211 obj_handle_t prev_apc; /* handle to previous APC */
1212 VARARG(result,apc_result); /* result of previous APC */
1213 VARARG(data,select_op,size); /* operation-specific data */
1214 VARARG(contexts,contexts); /* suspend context(s) */
1216 obj_handle_t apc_handle; /* handle to next APC */
1217 int signaled; /* were the handles immediately signaled? */
1218 VARARG(call,apc_call); /* APC call arguments */
1219 VARARG(contexts,contexts); /* suspend context(s) */
1221 #define SELECT_ALERTABLE 1
1222 #define SELECT_INTERRUPTIBLE 2
1225 /* Create an event */
1227 unsigned int access; /* wanted access rights */
1228 int manual_reset; /* manual reset event */
1229 int initial_state; /* initial state of the event */
1230 VARARG(objattr,object_attributes); /* object attributes */
1232 obj_handle_t handle; /* handle to the event */
1235 /* Event operation */
1237 obj_handle_t handle; /* handle to event */
1238 int op; /* event operation (see below) */
1240 int state; /* previous state */
1242 enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT };
1245 obj_handle_t handle; /* handle to event */
1247 int manual_reset; /* manual reset event */
1248 int state; /* current state of the event */
1253 unsigned int access; /* wanted access rights */
1254 unsigned int attributes; /* object attributes */
1255 obj_handle_t rootdir; /* root directory */
1256 VARARG(name,unicode_str); /* object name */
1258 obj_handle_t handle; /* handle to the event */
1262 /* Create a keyed event */
1263 @REQ(create_keyed_event)
1264 unsigned int access; /* wanted access rights */
1265 VARARG(objattr,object_attributes); /* object attributes */
1267 obj_handle_t handle; /* handle to the event */
1270 /* Open a keyed event */
1271 @REQ(open_keyed_event)
1272 unsigned int access; /* wanted access rights */
1273 unsigned int attributes; /* object attributes */
1274 obj_handle_t rootdir; /* root directory */
1275 VARARG(name,unicode_str); /* object name */
1277 obj_handle_t handle; /* handle to the event */
1281 /* Create a mutex */
1283 unsigned int access; /* wanted access rights */
1284 int owned; /* initially owned? */
1285 VARARG(objattr,object_attributes); /* object attributes */
1287 obj_handle_t handle; /* handle to the mutex */
1291 /* Release a mutex */
1293 obj_handle_t handle; /* handle to the mutex */
1295 unsigned int prev_count; /* value of internal counter, before release */
1301 unsigned int access; /* wanted access rights */
1302 unsigned int attributes; /* object attributes */
1303 obj_handle_t rootdir; /* root directory */
1304 VARARG(name,unicode_str); /* object name */
1306 obj_handle_t handle; /* handle to the mutex */
1312 obj_handle_t handle; /* handle to mutex */
1314 unsigned int count; /* current count of mutex */
1315 int owned; /* true if owned by current thread */
1316 int abandoned; /* true if abandoned */
1320 /* Create a semaphore */
1321 @REQ(create_semaphore)
1322 unsigned int access; /* wanted access rights */
1323 unsigned int initial; /* initial count */
1324 unsigned int max; /* maximum count */
1325 VARARG(objattr,object_attributes); /* object attributes */
1327 obj_handle_t handle; /* handle to the semaphore */
1331 /* Release a semaphore */
1332 @REQ(release_semaphore)
1333 obj_handle_t handle; /* handle to the semaphore */
1334 unsigned int count; /* count to add to semaphore */
1336 unsigned int prev_count; /* previous semaphore count */
1339 @REQ(query_semaphore)
1340 obj_handle_t handle; /* handle to the semaphore */
1342 unsigned int current; /* current count */
1343 unsigned int max; /* maximum count */
1346 /* Open a semaphore */
1347 @REQ(open_semaphore)
1348 unsigned int access; /* wanted access rights */
1349 unsigned int attributes; /* object attributes */
1350 obj_handle_t rootdir; /* root directory */
1351 VARARG(name,unicode_str); /* object name */
1353 obj_handle_t handle; /* handle to the semaphore */
1359 unsigned int access; /* wanted access rights */
1360 unsigned int sharing; /* sharing flags */
1361 int create; /* file create action */
1362 unsigned int options; /* file options */
1363 unsigned int attrs; /* file attributes for creation */
1364 VARARG(objattr,object_attributes); /* object attributes */
1365 VARARG(filename,string); /* file name */
1367 obj_handle_t handle; /* handle to the file */
1371 /* Open a file object */
1372 @REQ(open_file_object)
1373 unsigned int access; /* wanted access rights */
1374 unsigned int attributes; /* open attributes */
1375 obj_handle_t rootdir; /* root directory */
1376 unsigned int sharing; /* sharing flags */
1377 unsigned int options; /* file options */
1378 VARARG(filename,unicode_str); /* file name */
1380 obj_handle_t handle; /* handle to the file */
1384 /* Allocate a file handle for a Unix fd */
1385 @REQ(alloc_file_handle)
1386 unsigned int access; /* wanted access rights */
1387 unsigned int attributes; /* object attributes */
1388 int fd; /* file descriptor on the client side */
1390 obj_handle_t handle; /* handle to the file */
1394 /* Get the Unix name from a file handle */
1395 @REQ(get_handle_unix_name)
1396 obj_handle_t handle; /* file handle */
1398 data_size_t name_len; /* unix name length */
1399 VARARG(name,string); /* unix name */
1403 /* Get a Unix fd to access a file */
1405 obj_handle_t handle; /* handle to the file */
1407 int type; /* file type (see below) */
1408 int cacheable; /* can fd be cached in the client? */
1409 unsigned int access; /* file access rights */
1410 unsigned int options; /* file open options */
1414 FD_TYPE_INVALID, /* invalid file (no associated fd) */
1415 FD_TYPE_FILE, /* regular file */
1416 FD_TYPE_DIR, /* directory */
1417 FD_TYPE_SOCKET, /* socket */
1418 FD_TYPE_SERIAL, /* serial port */
1419 FD_TYPE_PIPE, /* named pipe */
1420 FD_TYPE_MAILSLOT, /* mailslot */
1421 FD_TYPE_CHAR, /* unspecified char device */
1422 FD_TYPE_DEVICE, /* Windows device file */
1427 /* Retrieve (or allocate) the client-side directory cache entry */
1428 @REQ(get_directory_cache_entry)
1429 obj_handle_t handle; /* handle to the directory */
1431 int entry; /* cache entry on the client side */
1432 VARARG(free,ints); /* entries that can be freed */
1436 /* Flush a file buffers */
1438 async_data_t async; /* async I/O parameters */
1440 obj_handle_t event; /* event set when finished */
1443 /* Query file information */
1445 obj_handle_t handle; /* handle to the file */
1446 unsigned int info_class; /* queried information class */
1448 VARARG(data,bytes); /* file info data */
1451 /* Query volume information */
1452 @REQ(get_volume_info)
1453 obj_handle_t handle; /* handle to the file */
1454 async_data_t async; /* async I/O parameters */
1455 unsigned int info_class; /* queried information class */
1457 obj_handle_t wait; /* handle to wait on for blocking read */
1458 VARARG(data,bytes); /* volume info data */
1461 /* Lock a region of a file */
1463 obj_handle_t handle; /* handle to the file */
1464 file_pos_t offset; /* offset of start of lock */
1465 file_pos_t count; /* count of bytes to lock */
1466 int shared; /* shared or exclusive lock? */
1467 int wait; /* do we want to wait? */
1469 obj_handle_t handle; /* handle to wait on */
1470 int overlapped; /* is it an overlapped I/O handle? */
1474 /* Unlock a region of a file */
1476 obj_handle_t handle; /* handle to the file */
1477 file_pos_t offset; /* offset of start of unlock */
1478 file_pos_t count; /* count of bytes to unlock */
1482 /* Perform a recv on a socket */
1484 int oob; /* are we receiving OOB data? */
1485 async_data_t async; /* async I/O parameters */
1486 int force_async; /* Force asynchronous mode? */
1488 obj_handle_t wait; /* handle to wait on for blocking recv */
1489 unsigned int options; /* device open options */
1490 int nonblocking; /* is socket non-blocking? */
1494 /* Perform a send on a socket */
1496 async_data_t async; /* async I/O parameters */
1497 int force_async; /* Force asynchronous mode? */
1499 obj_handle_t wait; /* handle to wait on for blocking send */
1500 unsigned int options; /* device open options */
1501 int nonblocking; /* is socket non-blocking? */
1505 /* Get socket event flags */
1506 @REQ(socket_get_events)
1507 obj_handle_t handle; /* socket handle */
1508 obj_handle_t event; /* event to reset */
1510 unsigned int flags; /* event mask */
1511 VARARG(status,uints); /* array of status codes */
1515 /* Store ICMP id for ICMP over datagram fixup */
1516 @REQ(socket_send_icmp_id)
1517 obj_handle_t handle; /* socket handle */
1518 unsigned short icmp_id; /* ICMP packet id */
1519 unsigned short icmp_seq; /* ICMP packed sequence */
1524 /* Get ICMP id for ICMP over datagram fixup */
1525 @REQ(socket_get_icmp_id)
1526 obj_handle_t handle; /* socket handle */
1527 unsigned short icmp_seq; /* ICMP packed sequence */
1529 unsigned short icmp_id; /* ICMP packet id */
1533 /* Retrieve the next pending console ioctl request */
1534 @REQ(get_next_console_request)
1535 obj_handle_t handle; /* console server handle */
1536 int signal; /* server signal state */
1537 int read; /* 1 if reporting result of blocked read ioctl */
1538 unsigned int status; /* status of previous ioctl */
1539 VARARG(out_data,bytes); /* out_data of previous ioctl */
1541 unsigned int code; /* ioctl code */
1542 unsigned int output; /* output id or 0 for input */
1543 data_size_t out_size; /* ioctl output size */
1544 VARARG(in_data,bytes); /* ioctl in_data */
1548 /* enable directory change notifications */
1549 @REQ(read_directory_changes)
1550 unsigned int filter; /* notification filter */
1551 int subtree; /* watch the subtree? */
1552 int want_data; /* flag indicating whether change data should be collected */
1553 async_data_t async; /* async I/O parameters */
1558 obj_handle_t handle;
1560 VARARG(events,filesystem_event); /* collected filesystem events */
1564 /* Create a file mapping */
1565 @REQ(create_mapping)
1566 unsigned int access; /* wanted access rights */
1567 unsigned int flags; /* SEC_* flags */
1568 unsigned int file_access; /* file access rights */
1569 mem_size_t size; /* mapping size */
1570 obj_handle_t file_handle; /* file handle */
1571 VARARG(objattr,object_attributes); /* object attributes */
1573 obj_handle_t handle; /* handle to the mapping */
1577 /* Open a mapping */
1579 unsigned int access; /* wanted access rights */
1580 unsigned int attributes; /* object attributes */
1581 obj_handle_t rootdir; /* root directory */
1582 VARARG(name,unicode_str); /* object name */
1584 obj_handle_t handle; /* handle to the mapping */
1588 /* Get information about a file mapping */
1589 @REQ(get_mapping_info)
1590 obj_handle_t handle; /* handle to the mapping */
1591 unsigned int access; /* wanted access rights */
1593 mem_size_t size; /* mapping size */
1594 unsigned int flags; /* SEC_* flags */
1595 obj_handle_t shared_file; /* shared mapping file handle */
1596 data_size_t total; /* total required buffer size in bytes */
1597 VARARG(image,pe_image_info);/* image info for SEC_IMAGE mappings */
1598 VARARG(name,unicode_str); /* filename for SEC_IMAGE mappings */
1602 /* Get the address to use to map an image mapping */
1603 @REQ(get_image_map_address)
1604 obj_handle_t handle; /* handle to the mapping */
1606 client_ptr_t addr; /* map address */
1610 /* Add a memory view in the current process */
1612 obj_handle_t mapping; /* file mapping handle */
1613 unsigned int access; /* wanted access rights */
1614 client_ptr_t base; /* view base address (page-aligned) */
1615 mem_size_t size; /* view size */
1616 file_pos_t start; /* start offset in mapping */
1620 /* Add a memory view for an image mapping in the current process */
1621 @REQ(map_image_view)
1622 obj_handle_t mapping; /* file mapping handle */
1623 client_ptr_t base; /* view base address (page-aligned) */
1624 mem_size_t size; /* view size */
1625 unsigned int entry; /* entry point in mapped view */
1626 unsigned short machine; /* machine in the mapped view */
1630 /* Add a memory view for a builtin dll in the current process */
1631 @REQ(map_builtin_view)
1632 VARARG(image,pe_image_info);/* image info */
1633 VARARG(name,unicode_str); /* image filename */
1637 /* Get information about a mapped image view */
1638 @REQ(get_image_view_info)
1639 obj_handle_t process; /* process handle */
1640 client_ptr_t addr; /* address inside mapped view (in process address space) */
1642 client_ptr_t base; /* view base address */
1643 mem_size_t size; /* view size */
1647 /* Unmap a memory view from the current process */
1649 client_ptr_t base; /* view base address */
1653 /* Get a range of committed pages in a file mapping */
1654 @REQ(get_mapping_committed_range)
1655 client_ptr_t base; /* view base address */
1656 file_pos_t offset; /* starting offset (page-aligned, in bytes) */
1658 mem_size_t size; /* size of range starting at offset (page-aligned, in bytes) */
1659 int committed; /* whether it is a committed range */
1663 /* Add a range to the committed pages in a file mapping */
1664 @REQ(add_mapping_committed_range)
1665 client_ptr_t base; /* view base address */
1666 file_pos_t offset; /* starting offset (page-aligned, in bytes) */
1667 mem_size_t size; /* size to set (page-aligned, in bytes) or 0 if only retrieving */
1671 /* Check if two memory maps are for the same file */
1672 @REQ(is_same_mapping)
1673 client_ptr_t base1; /* first view base address */
1674 client_ptr_t base2; /* second view base address */
1678 /* Get the filename of a mapping */
1679 @REQ(get_mapping_filename)
1680 obj_handle_t process; /* process handle */
1681 client_ptr_t addr; /* address inside mapped view (in process address space) */
1683 data_size_t len; /* total filename length in bytes */
1684 VARARG(filename,unicode_str); /* filename in NT format */
1690 timeout_t start_time;
1693 int current_priority;
1696 client_ptr_t entry_point;
1701 timeout_t start_time;
1702 data_size_t name_len;
1706 process_id_t parent_pid;
1707 unsigned int session_id;
1710 /* VARARG(name,unicode_str,name_len); */
1711 /* VARARG(threads,struct thread_info,thread_count); */
1714 /* Get a list of processes and threads currently running */
1715 @REQ(list_processes)
1717 data_size_t info_size;
1719 int total_thread_count;
1720 data_size_t total_name_len;
1721 VARARG(data,process_info,info_size);
1725 /* Create a debug object */
1726 @REQ(create_debug_obj)
1727 unsigned int access; /* wanted access rights */
1728 unsigned int flags; /* object flags */
1729 VARARG(objattr,object_attributes); /* object attributes */
1731 obj_handle_t handle; /* handle to the debug object */
1735 /* Wait for a debug event */
1736 @REQ(wait_debug_event)
1737 obj_handle_t debug; /* debug object */
1739 process_id_t pid; /* process id */
1740 thread_id_t tid; /* thread id */
1741 VARARG(event,debug_event); /* debug event data */
1745 /* Queue an exception event */
1746 @REQ(queue_exception_event)
1747 int first; /* first chance exception? */
1748 unsigned int code; /* exception code */
1749 unsigned int flags; /* exception flags */
1750 client_ptr_t record; /* exception record */
1751 client_ptr_t address; /* exception address */
1752 data_size_t len; /* size of parameters */
1753 VARARG(params,uints64,len);/* exception parameters */
1755 obj_handle_t handle; /* handle to the queued event */
1759 /* Retrieve the status of an exception event */
1760 @REQ(get_exception_status)
1761 obj_handle_t handle; /* handle to the queued event */
1765 /* Continue a debug event */
1766 @REQ(continue_debug_event)
1767 obj_handle_t debug; /* debug object */
1768 process_id_t pid; /* process id to continue */
1769 thread_id_t tid; /* thread id to continue */
1770 unsigned int status; /* continuation status */
1774 /* Start or stop debugging an existing process */
1776 obj_handle_t handle; /* process handle */
1777 obj_handle_t debug; /* debug object to attach to the process */
1778 int attach; /* 1=attaching / 0=detaching from the process */
1782 /* Set debug object information */
1783 @REQ(set_debug_obj_info)
1784 obj_handle_t debug; /* debug object */
1785 unsigned int flags; /* object flags */
1789 /* Read data from a process address space */
1790 @REQ(read_process_memory)
1791 obj_handle_t handle; /* process handle */
1792 client_ptr_t addr; /* addr to read from */
1794 VARARG(data,bytes); /* result data */
1798 /* Write data to a process address space */
1799 @REQ(write_process_memory)
1800 obj_handle_t handle; /* process handle */
1801 client_ptr_t addr; /* addr to write to */
1802 VARARG(data,bytes); /* data to write */
1806 /* Create a registry key */
1808 unsigned int access; /* desired access rights */
1809 unsigned int options; /* creation options */
1810 VARARG(objattr,object_attributes); /* object attributes */
1811 VARARG(class,unicode_str); /* class name */
1813 obj_handle_t hkey; /* handle to the created key */
1816 /* Open a registry key */
1818 obj_handle_t parent; /* handle to the parent key */
1819 unsigned int access; /* desired access rights */
1820 unsigned int attributes; /* object attributes */
1821 VARARG(name,unicode_str); /* key name */
1823 obj_handle_t hkey; /* handle to the open key */
1827 /* Delete a registry key */
1829 obj_handle_t hkey; /* handle to the key */
1833 /* Flush a registry key */
1835 obj_handle_t hkey; /* handle to the key */
1839 /* Enumerate registry subkeys */
1841 obj_handle_t hkey; /* handle to registry key */
1842 int index; /* index of subkey (or -1 for current key) */
1843 int info_class; /* requested information class */
1845 int subkeys; /* number of subkeys */
1846 int max_subkey; /* longest subkey name */
1847 int max_class; /* longest class name */
1848 int values; /* number of values */
1849 int max_value; /* longest value name */
1850 int max_data; /* longest value data */
1851 timeout_t modif; /* last modification time */
1852 data_size_t total; /* total length needed for full name and class */
1853 data_size_t namelen; /* length of key name in bytes */
1854 VARARG(name,unicode_str,namelen); /* key name */
1855 VARARG(class,unicode_str); /* class name */
1859 /* Set a value of a registry key */
1861 obj_handle_t hkey; /* handle to registry key */
1862 int type; /* value type */
1863 data_size_t namelen; /* length of value name in bytes */
1864 VARARG(name,unicode_str,namelen); /* value name */
1865 VARARG(data,bytes); /* value data */
1869 /* Retrieve the value of a registry key */
1871 obj_handle_t hkey; /* handle to registry key */
1872 VARARG(name,unicode_str); /* value name */
1874 int type; /* value type */
1875 data_size_t total; /* total length needed for data */
1876 VARARG(data,bytes); /* value data */
1880 /* Enumerate a value of a registry key */
1881 @REQ(enum_key_value)
1882 obj_handle_t hkey; /* handle to registry key */
1883 int index; /* value index */
1884 int info_class; /* requested information class */
1886 int type; /* value type */
1887 data_size_t total; /* total length needed for full name and data */
1888 data_size_t namelen; /* length of value name in bytes */
1889 VARARG(name,unicode_str,namelen); /* value name */
1890 VARARG(data,bytes); /* value data */
1894 /* Delete a value of a registry key */
1895 @REQ(delete_key_value)
1896 obj_handle_t hkey; /* handle to registry key */
1897 VARARG(name,unicode_str); /* value name */
1901 /* Load a registry branch from a file */
1903 obj_handle_t file; /* file to load from */
1904 VARARG(objattr,object_attributes); /* object attributes */
1908 /* UnLoad a registry branch from a file */
1909 @REQ(unload_registry)
1910 obj_handle_t parent; /* handle to the parent key */
1911 unsigned int attributes; /* object attributes */
1912 VARARG(name,unicode_str); /* key name */
1916 /* Save a registry branch to a file */
1918 obj_handle_t hkey; /* key to save */
1919 obj_handle_t file; /* file to save to */
1923 /* Add a registry key change notification */
1924 @REQ(set_registry_notification)
1925 obj_handle_t hkey; /* key to watch for changes */
1926 obj_handle_t event; /* event to set */
1927 int subtree; /* should we watch the whole subtree? */
1928 unsigned int filter; /* things to watch */
1932 /* Rename a registry key */
1934 obj_handle_t hkey; /* handle to the key to be renamed */
1935 VARARG(name,unicode_str); /* new name */
1939 /* Create a waitable timer */
1941 unsigned int access; /* wanted access rights */
1942 int manual; /* manual reset */
1943 VARARG(objattr,object_attributes); /* object attributes */
1945 obj_handle_t handle; /* handle to the timer */
1949 /* Open a waitable timer */
1951 unsigned int access; /* wanted access rights */
1952 unsigned int attributes; /* object attributes */
1953 obj_handle_t rootdir; /* root directory */
1954 VARARG(name,unicode_str); /* object name */
1956 obj_handle_t handle; /* handle to the timer */
1959 /* Set a waitable timer */
1961 obj_handle_t handle; /* handle to the timer */
1962 timeout_t expire; /* next expiration absolute time */
1963 client_ptr_t callback; /* callback function */
1964 client_ptr_t arg; /* callback argument */
1965 int period; /* timer period in ms */
1967 int signaled; /* was the timer signaled before this call ? */
1970 /* Cancel a waitable timer */
1972 obj_handle_t handle; /* handle to the timer */
1974 int signaled; /* was the timer signaled before this calltime ? */
1977 /* Get information on a waitable timer */
1978 @REQ(get_timer_info)
1979 obj_handle_t handle; /* handle to the timer */
1981 timeout_t when; /* absolute time when the timer next expires */
1982 int signaled; /* is the timer signaled? */
1986 /* Retrieve the current context of a thread */
1987 @REQ(get_thread_context)
1988 obj_handle_t handle; /* thread handle */
1989 obj_handle_t context; /* context handle */
1990 unsigned int flags; /* context flags */
1991 unsigned int native_flags; /* flags for native context if WoW present */
1992 unsigned short machine; /* context architecture */
1994 int self; /* was it a handle to the current thread? */
1995 obj_handle_t handle; /* pending context handle */
1996 VARARG(contexts,contexts); /* thread context(s) */
2000 /* Set the current context of a thread */
2001 @REQ(set_thread_context)
2002 obj_handle_t handle; /* thread handle */
2003 unsigned int native_flags; /* flags for native context if WoW present */
2004 VARARG(contexts,contexts); /* thread context(s) */
2006 int self; /* was it a handle to the current thread? */
2010 /* Fetch a selector entry for a thread */
2011 @REQ(get_selector_entry)
2012 obj_handle_t handle; /* thread handle */
2013 int entry; /* LDT entry */
2015 unsigned int base; /* selector base */
2016 unsigned int limit; /* selector limit */
2017 unsigned char flags; /* selector flags */
2023 VARARG(name,unicode_str); /* atom name */
2025 atom_t atom; /* resulting atom */
2029 /* Delete an atom */
2031 atom_t atom; /* atom handle */
2037 VARARG(name,unicode_str); /* atom name */
2039 atom_t atom; /* atom handle */
2043 /* Get information about an atom */
2044 @REQ(get_atom_information)
2045 atom_t atom; /* atom handle */
2047 int count; /* atom lock count */
2048 int pinned; /* whether the atom has been pinned */
2049 data_size_t total; /* actual length of atom name */
2050 VARARG(name,unicode_str); /* atom name */
2054 /* Get the message queue of the current thread */
2057 obj_handle_t handle; /* handle to the queue */
2061 /* Set the file descriptor associated to the current thread queue */
2063 obj_handle_t handle; /* handle to the file descriptor */
2067 /* Set the current message queue wakeup mask */
2068 @REQ(set_queue_mask)
2069 unsigned int wake_mask; /* wakeup bits mask */
2070 unsigned int changed_mask; /* changed bits mask */
2071 int skip_wait; /* will we skip waiting if signaled? */
2073 unsigned int wake_bits; /* current wake bits */
2074 unsigned int changed_bits; /* current changed bits */
2078 /* Get the current message queue status */
2079 @REQ(get_queue_status)
2080 unsigned int clear_bits; /* should we clear the change bits? */
2082 unsigned int wake_bits; /* wake bits */
2083 unsigned int changed_bits; /* changed bits since last time */
2087 /* Retrieve the process idle event */
2088 @REQ(get_process_idle_event)
2089 obj_handle_t handle; /* process handle */
2091 obj_handle_t event; /* handle to idle event */
2095 /* Send a message to a thread queue */
2097 thread_id_t id; /* thread id */
2098 int type; /* message type (see below) */
2099 int flags; /* message flags (see below) */
2100 user_handle_t win; /* window handle */
2101 unsigned int msg; /* message code */
2102 lparam_t wparam; /* parameters */
2103 lparam_t lparam; /* parameters */
2104 timeout_t timeout; /* timeout for reply */
2105 VARARG(data,message_data); /* message data for sent messages */
2108 @REQ(post_quit_message)
2109 int exit_code; /* exit code to return */
2114 MSG_ASCII, /* Ascii message (from SendMessageA) */
2115 MSG_UNICODE, /* Unicode message (from SendMessageW) */
2116 MSG_NOTIFY, /* notify message (from SendNotifyMessageW), always Unicode */
2117 MSG_CALLBACK, /* callback message (from SendMessageCallbackW), always Unicode */
2118 MSG_CALLBACK_RESULT,/* result of a callback message */
2119 MSG_OTHER_PROCESS, /* sent from other process, may include vararg data, always Unicode */
2120 MSG_POSTED, /* posted message (from PostMessageW), always Unicode */
2121 MSG_HARDWARE, /* hardware message */
2122 MSG_WINEVENT, /* winevent message */
2123 MSG_HOOK_LL /* low-level hardware hook */
2125 #define SEND_MSG_ABORT_IF_HUNG 0x01
2128 /* Send a hardware message to a thread queue */
2129 @REQ(send_hardware_message)
2130 user_handle_t win; /* window handle */
2131 hw_input_t input; /* input data */
2132 unsigned int flags; /* flags (see below) */
2133 VARARG(report,bytes); /* HID report data */
2135 int wait; /* do we need to wait for a reply? */
2136 int prev_x; /* previous cursor position */
2138 int new_x; /* new cursor position */
2141 #define SEND_HWMSG_INJECTED 0x01
2144 /* Get a message from the current queue */
2146 unsigned int flags; /* PM_* flags */
2147 user_handle_t get_win; /* window handle to get */
2148 unsigned int get_first; /* first message code to get */
2149 unsigned int get_last; /* last message code to get */
2150 unsigned int hw_id; /* id of the previous hardware message (or 0) */
2151 unsigned int wake_mask; /* wakeup bits mask */
2152 unsigned int changed_mask; /* changed bits mask */
2153 unsigned int internal; /* get internal messages only */
2155 user_handle_t win; /* window handle */
2156 unsigned int msg; /* message code */
2157 lparam_t wparam; /* parameters */
2158 lparam_t lparam; /* parameters */
2159 int type; /* message type */
2160 int x; /* message x position */
2161 int y; /* message y position */
2162 unsigned int time; /* message time */
2163 unsigned int active_hooks; /* active hooks bitmap */
2164 data_size_t total; /* total size of extra data */
2165 VARARG(data,message_data); /* message data for sent messages */
2169 /* Reply to a sent message */
2171 int remove; /* should we remove the message? */
2172 lparam_t result; /* message result */
2173 VARARG(data,bytes); /* message data for sent messages */
2177 /* Accept and remove the current hardware message */
2178 @REQ(accept_hardware_message)
2179 unsigned int hw_id; /* id of the hardware message */
2183 /* Retrieve the reply for the last message sent */
2184 @REQ(get_message_reply)
2185 int cancel; /* cancel message if not ready? */
2187 lparam_t result; /* message result */
2188 VARARG(data,bytes); /* message data for sent messages */
2192 /* Set a window timer */
2194 user_handle_t win; /* window handle */
2195 unsigned int msg; /* message to post */
2196 unsigned int rate; /* timer rate in ms */
2197 lparam_t id; /* timer id */
2198 lparam_t lparam; /* message lparam (callback proc) */
2200 lparam_t id; /* timer id */
2204 /* Kill a window timer */
2205 @REQ(kill_win_timer)
2206 user_handle_t win; /* window handle */
2207 lparam_t id; /* timer id */
2208 unsigned int msg; /* message to post */
2212 /* check if the thread owning the window is hung */
2213 @REQ(is_window_hung)
2214 user_handle_t win; /* window handle */
2220 /* Retrieve info about a serial port */
2221 @REQ(get_serial_info)
2222 obj_handle_t handle; /* handle to comm port */
2225 unsigned int eventmask;
2226 unsigned int cookie;
2227 unsigned int pending_write;
2231 /* Set info about a serial port */
2232 @REQ(set_serial_info)
2233 obj_handle_t handle; /* handle to comm port */
2234 int flags; /* bitmask to set values (see below) */
2236 #define SERIALINFO_PENDING_WRITE 0x04
2237 #define SERIALINFO_PENDING_WAIT 0x08
2239 /* Cancel all sync io on a thread */
2241 obj_handle_t handle; /* thread handle on which to cancel io */
2242 client_ptr_t iosb; /* I/O status block (NULL=all) */
2245 /* Create an async I/O */
2246 @REQ(register_async)
2247 int type; /* type of queue to look after */
2248 async_data_t async; /* async I/O parameters */
2249 int count; /* count - usually # of bytes to be read/written */
2251 #define ASYNC_TYPE_READ 0x01
2252 #define ASYNC_TYPE_WRITE 0x02
2253 #define ASYNC_TYPE_WAIT 0x03
2256 /* Cancel all async op on a fd */
2258 obj_handle_t handle; /* handle to comm port, socket or file */
2259 client_ptr_t iosb; /* I/O status block (NULL=all) */
2260 int only_thread; /* cancel matching this thread */
2264 /* Retrieve results of an async */
2265 @REQ(get_async_result)
2266 client_ptr_t user_arg; /* user arg used to identify async */
2268 VARARG(out_data,bytes); /* iosb output data */
2272 /* Notify direct completion of async and close the wait handle if not blocking */
2273 @REQ(set_async_direct_result)
2274 obj_handle_t handle; /* wait handle */
2275 apc_param_t information; /* IO_STATUS_BLOCK Information */
2276 unsigned int status; /* completion status */
2277 int mark_pending; /* set async to pending before completion? */
2279 obj_handle_t handle; /* wait handle, or NULL if closed */
2283 /* Perform a read on a file object */
2285 async_data_t async; /* async I/O parameters */
2286 file_pos_t pos; /* read position */
2288 obj_handle_t wait; /* handle to wait on for blocking read */
2289 unsigned int options; /* device open options */
2290 VARARG(data,bytes); /* read data */
2294 /* Perform a write on a file object */
2296 async_data_t async; /* async I/O parameters */
2297 file_pos_t pos; /* write position */
2298 VARARG(data,bytes); /* write data */
2300 obj_handle_t wait; /* handle to wait on for blocking write */
2301 unsigned int options; /* device open options */
2302 data_size_t size; /* size written */
2306 /* Perform an ioctl on a file */
2308 ioctl_code_t code; /* ioctl code */
2309 async_data_t async; /* async I/O parameters */
2310 VARARG(in_data,bytes); /* ioctl input data */
2312 obj_handle_t wait; /* handle to wait on for blocking ioctl */
2313 unsigned int options; /* device open options */
2314 VARARG(out_data,bytes); /* ioctl output data */
2318 /* Store results of an async irp */
2319 @REQ(set_irp_result)
2320 obj_handle_t handle; /* handle to the irp */
2321 unsigned int status; /* status of the irp */
2322 data_size_t size; /* result size (input or output depending on the operation) */
2323 VARARG(data,bytes); /* output data of the irp */
2327 /* Create a named pipe */
2328 @REQ(create_named_pipe)
2329 unsigned int access;
2330 unsigned int options;
2331 unsigned int sharing;
2332 unsigned int disposition;
2333 unsigned int maxinstances;
2334 unsigned int outsize;
2335 unsigned int insize;
2338 VARARG(objattr,object_attributes); /* object attributes */
2340 obj_handle_t handle; /* handle to the pipe */
2344 /* flags in create_named_pipe and get_named_pipe_info */
2345 #define NAMED_PIPE_MESSAGE_STREAM_WRITE 0x0001
2346 #define NAMED_PIPE_MESSAGE_STREAM_READ 0x0002
2347 #define NAMED_PIPE_NONBLOCKING_MODE 0x0004
2348 #define NAMED_PIPE_SERVER_END 0x8000
2350 /* Set named pipe information by handle */
2351 @REQ(set_named_pipe_info)
2352 obj_handle_t handle;
2356 /* Create a window */
2358 user_handle_t parent; /* parent window */
2359 user_handle_t owner; /* owner window */
2360 atom_t atom; /* class atom */
2361 mod_handle_t instance; /* module instance */
2362 int dpi; /* system DPI */
2363 int awareness; /* thread DPI awareness */
2364 unsigned int style; /* window style */
2365 unsigned int ex_style; /* window extended style */
2366 VARARG(class,unicode_str); /* class name */
2368 user_handle_t handle; /* created window */
2369 user_handle_t parent; /* full handle of parent */
2370 user_handle_t owner; /* full handle of owner */
2371 int extra; /* number of extra bytes */
2372 client_ptr_t class_ptr; /* pointer to class in client address space */
2373 int dpi; /* window DPI if not per-monitor aware */
2374 int awareness; /* window DPI awareness */
2378 /* Destroy a window */
2379 @REQ(destroy_window)
2380 user_handle_t handle; /* handle to the window */
2384 /* Retrieve the desktop window for the current thread */
2385 @REQ(get_desktop_window)
2386 int force; /* force creation if it doesn't exist
*/
2388 user_handle_t top_window
; /* handle to the desktop window
*/
2389 user_handle_t msg_window
; /* handle to the top
-level HWND_MESSAGE parent
*/
2393 /* Set a window owner
*/
2394 @
REQ(set_window_owner
)
2395 user_handle_t handle
; /* handle to the window
*/
2396 user_handle_t owner
; /* new owner
*/
2398 user_handle_t full_owner
; /* full handle of new owner
*/
2399 user_handle_t prev_owner
; /* full handle of previous owner
*/
2403 /* Get information from a window handle
*/
2404 @
REQ(get_window_info
)
2405 user_handle_t handle
; /* handle to the window
*/
2407 user_handle_t full_handle
; /* full
32-bit handle
*/
2408 user_handle_t last_active
; /* last active popup
*/
2409 process_id_t pid
; /* process owning the window
*/
2410 thread_id_t tid
; /* thread owning the window
*/
2411 atom_t atom
; /* class atom
*/
2412 int is_unicode
; /* ANSI or unicode
*/
2413 int dpi
; /* window DPI
*/
2414 int awareness
; /* DPI awareness
*/
2418 /* Set some information in a window
*/
2419 @
REQ(set_window_info
)
2420 unsigned short flags
; /* flags for fields to
set (see below
) */
2421 short int is_unicode
; /* ANSI or unicode
*/
2422 user_handle_t handle
; /* handle to the window
*/
2423 unsigned int style
; /* window style
*/
2424 unsigned int ex_style
; /* window extended style
*/
2425 data_size_t extra_size
; /* size to set in extra bytes
*/
2426 mod_handle_t instance
; /* creator instance
*/
2427 lparam_t user_data
; /* user
-specific data
*/
2428 lparam_t extra_value
; /* value to set in extra bytes or window id
*/
2429 int extra_offset
; /* offset to set in extra bytes
*/
2431 unsigned int old_style
; /* old window style
*/
2432 unsigned int old_ex_style
; /* old window extended style
*/
2433 mod_handle_t old_instance
; /* old creator instance
*/
2434 lparam_t old_user_data
; /* old user
-specific data
*/
2435 lparam_t old_extra_value
; /* old value in extra bytes
*/
2436 lparam_t old_id
; /* old window id
*/
2438 #define SET_WIN_STYLE
0x01
2439 #define SET_WIN_EXSTYLE
0x02
2440 #define SET_WIN_ID
0x04
2441 #define SET_WIN_INSTANCE
0x08
2442 #define SET_WIN_USERDATA
0x10
2443 #define SET_WIN_EXTRA
0x20
2444 #define SET_WIN_UNICODE
0x40
2447 /* Set the parent of a window
*/
2449 user_handle_t handle
; /* handle to the window
*/
2450 user_handle_t parent
; /* handle to the parent
*/
2452 user_handle_t old_parent
; /* old parent window
*/
2453 user_handle_t full_parent
; /* full handle of new parent
*/
2454 int dpi
; /* new window DPI if not per
-monitor aware
*/
2455 int awareness
; /* new DPI awareness
*/
2459 /* Get a list of the window parents
, up to the root of the tree
*/
2460 @
REQ(get_window_parents
)
2461 user_handle_t handle
; /* handle to the window
*/
2463 int count
; /* total count of parents
*/
2464 VARARG(parents
,user_handles
); /* parent handles
*/
2468 /* Get a list of the window children
*/
2469 @
REQ(get_window_children
)
2470 obj_handle_t desktop
; /* handle to desktop
*/
2471 user_handle_t parent
; /* parent window
*/
2472 atom_t atom
; /* class atom for the listed children
*/
2473 thread_id_t tid
; /* thread owning the listed children
*/
2474 VARARG(class
,unicode_str
); /* class name
*/
2476 int count
; /* total count of children
*/
2477 VARARG(children
,user_handles
); /* children handles
*/
2481 /* Get a list of the window children that contain a given point
*/
2482 @
REQ(get_window_children_from_point
)
2483 user_handle_t parent
; /* parent window
*/
2484 int x
; /* point in parent coordinates
*/
2486 int dpi
; /* dpi for the point coordinates
*/
2488 int count
; /* total count of children
*/
2489 VARARG(children
,user_handles
); /* children handles
*/
2493 /* Get window tree information from a window handle
*/
2494 @
REQ(get_window_tree
)
2495 user_handle_t handle
; /* handle to the window
*/
2497 user_handle_t parent
; /* parent window
*/
2498 user_handle_t owner
; /* owner window
*/
2499 user_handle_t next_sibling
; /* next sibling in Z
-order
*/
2500 user_handle_t prev_sibling
; /* prev sibling in Z
-order
*/
2501 user_handle_t first_sibling
; /* first sibling in Z
-order
*/
2502 user_handle_t last_sibling
; /* last sibling in Z
-order
*/
2503 user_handle_t first_child
; /* first child
*/
2504 user_handle_t last_child
; /* last child
*/
2507 /* Set the position and Z order of a window
*/
2508 @
REQ(set_window_pos
)
2509 unsigned short swp_flags
; /* SWP_
* flags
*/
2510 unsigned short paint_flags
; /* paint
flags (see below
) */
2511 user_handle_t handle
; /* handle to the window
*/
2512 user_handle_t previous
; /* previous window in Z order
*/
2513 rectangle_t window
; /* window
rectangle (in parent coords
) */
2514 rectangle_t client
; /* client
rectangle (in parent coords
) */
2515 VARARG(valid
,rectangles
); /* valid rectangles from
WM_NCCALCSIZE (in parent coords
) */
2517 unsigned int new_style
; /* new window style
*/
2518 unsigned int new_ex_style
; /* new window extended style
*/
2519 user_handle_t surface_win
; /* parent window that holds the surface
*/
2520 int needs_update
; /* whether the surface region needs an update
*/
2522 #define SET_WINPOS_PAINT_SURFACE
0x01 /* window has a paintable surface
*/
2523 #define SET_WINPOS_PIXEL_FORMAT
0x02 /* window has a custom pixel format
*/
2525 /* Get the window and client rectangles of a window
*/
2526 @
REQ(get_window_rectangles
)
2527 user_handle_t handle
; /* handle to the window
*/
2528 int relative
; /* coords relative
to (see below
) */
2529 int dpi
; /* DPI to map to
, or zero for per
-monitor DPI
*/
2531 rectangle_t window
; /* window rectangle
*/
2532 rectangle_t client
; /* client rectangle
*/
2534 enum coords_relative
2536 COORDS_CLIENT
, /* relative to client area
*/
2537 COORDS_WINDOW
, /* relative to whole window area
*/
2538 COORDS_PARENT
, /* relative to parent
's client area */
2539 COORDS_SCREEN /* relative to screen origin */
2543 /* Get the window text */
2544 @REQ(get_window_text)
2545 user_handle_t handle; /* handle to the window */
2547 data_size_t length; /* total length in WCHARs */
2548 VARARG(text,unicode_str); /* window text */
2552 /* Set the window text */
2553 @REQ(set_window_text)
2554 user_handle_t handle; /* handle to the window */
2555 VARARG(text,unicode_str); /* window text */
2559 /* Get the coordinates offset between two windows */
2560 @REQ(get_windows_offset)
2561 user_handle_t from; /* handle to the first window */
2562 user_handle_t to; /* handle to the second window */
2563 int dpi; /* DPI to map to, or zero for per-monitor DPI */
2565 int x; /* x coordinate offset */
2566 int y; /* y coordinate offset */
2567 int mirror; /* whether to mirror the x coordinate */
2571 /* Get the visible region of a window */
2572 @REQ(get_visible_region)
2573 user_handle_t window; /* handle to the window */
2574 unsigned int flags; /* DCX flags */
2576 user_handle_t top_win; /* top window to clip against */
2577 rectangle_t top_rect; /* top window visible rect with screen coords */
2578 rectangle_t win_rect; /* window rect in screen coords */
2579 unsigned int paint_flags; /* paint flags (from SET_WINPOS_* flags) */
2580 data_size_t total_size; /* total size of the resulting region */
2581 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2585 /* Get the visible surface region of a window */
2586 @REQ(get_surface_region)
2587 user_handle_t window; /* handle to the window */
2589 rectangle_t visible_rect; /* window visible rect in screen coords */
2590 data_size_t total_size; /* total size of the resulting region */
2591 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2595 /* Get the window region */
2596 @REQ(get_window_region)
2597 user_handle_t window; /* handle to the window */
2599 data_size_t total_size; /* total size of the resulting region */
2600 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2604 /* Set the window region */
2605 @REQ(set_window_region)
2606 user_handle_t window; /* handle to the window */
2607 int redraw; /* redraw the window? */
2608 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2612 /* Get the window update region */
2613 @REQ(get_update_region)
2614 user_handle_t window; /* handle to the window */
2615 user_handle_t from_child; /* child to start searching from */
2616 unsigned int flags; /* update flags (see below) */
2618 user_handle_t child; /* child to repaint (or window itself) */
2619 unsigned int flags; /* resulting update flags (see below) */
2620 data_size_t total_size; /* total size of the resulting region */
2621 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2623 #define UPDATE_NONCLIENT 0x001 /* get region for repainting non-client area */
2624 #define UPDATE_ERASE 0x002 /* get region for erasing client area */
2625 #define UPDATE_PAINT 0x004 /* get region for painting client area */
2626 #define UPDATE_INTERNALPAINT 0x008 /* get region if internal paint is pending */
2627 #define UPDATE_ALLCHILDREN 0x010 /* force repaint of all children */
2628 #define UPDATE_NOCHILDREN 0x020 /* don't try to repaint any children
*/
2629 #define UPDATE_NOREGION
0x040 /* don
't return a region, only the flags */
2630 #define UPDATE_DELAYED_ERASE 0x080 /* still needs erase after BeginPaint */
2631 #define UPDATE_CLIPCHILDREN 0x100 /* remove clipped children from the update region */
2634 /* Update the z order of a window so that a given rectangle is fully visible */
2635 @REQ(update_window_zorder)
2636 user_handle_t window; /* handle to the window */
2637 rectangle_t rect; /* rectangle that must be visible (in client coords) */
2641 /* Mark parts of a window as needing a redraw */
2643 user_handle_t window; /* handle to the window */
2644 unsigned int flags; /* RDW_* flags */
2645 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2649 /* Set a window property */
2650 @REQ(set_window_property)
2651 user_handle_t window; /* handle to the window */
2652 lparam_t data; /* data to store */
2653 atom_t atom; /* property atom (if no name specified) */
2654 VARARG(name,unicode_str); /* property name */
2658 /* Remove a window property */
2659 @REQ(remove_window_property)
2660 user_handle_t window; /* handle to the window */
2661 atom_t atom; /* property atom (if no name specified) */
2662 VARARG(name,unicode_str); /* property name */
2664 lparam_t data; /* data stored in property */
2668 /* Get a window property */
2669 @REQ(get_window_property)
2670 user_handle_t window; /* handle to the window */
2671 atom_t atom; /* property atom (if no name specified) */
2672 VARARG(name,unicode_str); /* property name */
2674 lparam_t data; /* data stored in property */
2678 /* Get the list of properties of a window */
2679 @REQ(get_window_properties)
2680 user_handle_t window; /* handle to the window */
2682 int total; /* total number of properties */
2683 VARARG(props,properties); /* list of properties */
2687 /* Create a window station */
2688 @REQ(create_winstation)
2689 unsigned int flags; /* window station flags */
2690 unsigned int access; /* wanted access rights */
2691 unsigned int attributes; /* object attributes */
2692 obj_handle_t rootdir; /* root directory */
2693 VARARG(name,unicode_str); /* object name */
2695 obj_handle_t handle; /* handle to the window station */
2699 /* Open a handle to a window station */
2700 @REQ(open_winstation)
2701 unsigned int access; /* wanted access rights */
2702 unsigned int attributes; /* object attributes */
2703 obj_handle_t rootdir; /* root directory */
2704 VARARG(name,unicode_str); /* object name */
2706 obj_handle_t handle; /* handle to the window station */
2710 /* Close a window station */
2711 @REQ(close_winstation)
2712 obj_handle_t handle; /* handle to the window station */
2716 /* Get the process current window station */
2717 @REQ(get_process_winstation)
2719 obj_handle_t handle; /* handle to the window station */
2723 /* Set the process current window station */
2724 @REQ(set_process_winstation)
2725 obj_handle_t handle; /* handle to the window station */
2729 /* Enumerate window stations */
2730 @REQ(enum_winstation)
2731 unsigned int index; /* current index */
2733 unsigned int next; /* next index */
2734 VARARG(name,unicode_str); /* window station name */
2738 /* Create a desktop */
2739 @REQ(create_desktop)
2740 unsigned int flags; /* desktop flags */
2741 unsigned int access; /* wanted access rights */
2742 unsigned int attributes; /* object attributes */
2743 VARARG(name,unicode_str); /* object name */
2745 obj_handle_t handle; /* handle to the desktop */
2749 /* Open a handle to a desktop */
2751 obj_handle_t winsta; /* window station to open (null allowed) */
2752 unsigned int flags; /* desktop flags */
2753 unsigned int access; /* wanted access rights */
2754 unsigned int attributes; /* object attributes */
2755 VARARG(name,unicode_str); /* object name */
2757 obj_handle_t handle; /* handle to the desktop */
2761 /* Open a handle to current input desktop */
2762 @REQ(open_input_desktop)
2763 unsigned int flags; /* desktop flags */
2764 unsigned int access; /* wanted access rights */
2765 unsigned int attributes; /* object attributes */
2767 obj_handle_t handle; /* handle to the desktop */
2771 /* Changes the current input desktop */
2772 @REQ(set_input_desktop)
2773 obj_handle_t handle; /* handle to the desktop */
2777 /* Close a desktop */
2779 obj_handle_t handle; /* handle to the desktop */
2783 /* Get the thread current desktop */
2784 @REQ(get_thread_desktop)
2785 thread_id_t tid; /* thread id */
2787 obj_handle_t handle; /* handle to the desktop */
2791 /* Set the thread current desktop */
2792 @REQ(set_thread_desktop)
2793 obj_handle_t handle; /* handle to the desktop */
2797 /* Enumerate desktops */
2799 obj_handle_t winstation; /* handle to the window station */
2800 unsigned int index; /* current index */
2802 unsigned int next; /* next index */
2803 VARARG(name,unicode_str); /* window station name */
2807 /* Get/set information about a user object (window station or desktop) */
2808 @REQ(set_user_object_info)
2809 obj_handle_t handle; /* handle to the object */
2810 unsigned int flags; /* information to set/get */
2811 unsigned int obj_flags; /* new object flags */
2813 int is_desktop; /* is object a desktop? */
2814 unsigned int old_obj_flags; /* old object flags */
2815 VARARG(name,unicode_str); /* object name */
2817 #define SET_USER_OBJECT_SET_FLAGS 1
2818 #define SET_USER_OBJECT_GET_FULL_NAME 2
2821 /* Register a hotkey */
2822 @REQ(register_hotkey)
2823 user_handle_t window; /* handle to the window */
2824 int id; /* hotkey identifier */
2825 unsigned int flags; /* modifier keys */
2826 unsigned int vkey; /* virtual key code */
2828 int replaced; /* did we replace an existing hotkey? */
2829 unsigned int flags; /* flags of replaced hotkey */
2830 unsigned int vkey; /* virtual key code of replaced hotkey */
2834 /* Unregister a hotkey */
2835 @REQ(unregister_hotkey)
2836 user_handle_t window; /* handle to the window */
2837 int id; /* hotkey identifier */
2839 unsigned int flags; /* flags of removed hotkey */
2840 unsigned int vkey; /* virtual key code of removed hotkey */
2844 /* Attach (or detach) thread inputs */
2845 @REQ(attach_thread_input)
2846 thread_id_t tid_from; /* thread to be attached */
2847 thread_id_t tid_to; /* thread to which tid_from should be attached */
2848 int attach; /* is it an attach? */
2852 /* Get input data for a given thread */
2853 @REQ(get_thread_input)
2854 thread_id_t tid; /* id of thread */
2856 user_handle_t focus; /* handle to the focus window */
2857 user_handle_t capture; /* handle to the capture window */
2858 user_handle_t active; /* handle to the active window */
2859 user_handle_t foreground; /* handle to the global foreground window */
2860 user_handle_t menu_owner; /* handle to the menu owner */
2861 user_handle_t move_size; /* handle to the moving/resizing window */
2862 user_handle_t caret; /* handle to the caret window */
2863 user_handle_t cursor; /* handle to the cursor */
2864 int show_count; /* cursor show count */
2865 rectangle_t rect; /* caret rectangle */
2869 /* Get the time of the last input event */
2870 @REQ(get_last_input_time)
2876 /* Retrieve queue keyboard state for current thread or global async state */
2878 int async; /* whether to query the async state */
2879 int key; /* optional key code or -1 */
2881 unsigned char state; /* state of specified key */
2882 VARARG(keystate,bytes); /* state array for all the keys */
2885 /* Set queue keyboard state for current thread */
2887 int async; /* whether to change the async state too */
2888 VARARG(keystate,bytes); /* state array for all the keys */
2891 /* Set the system foreground window */
2892 @REQ(set_foreground_window)
2893 user_handle_t handle; /* handle to the foreground window */
2895 user_handle_t previous; /* handle to the previous foreground window */
2896 int send_msg_old; /* whether we have to send a msg to the old window */
2897 int send_msg_new; /* whether we have to send a msg to the new window */
2900 /* Set the current thread focus window */
2901 @REQ(set_focus_window)
2902 user_handle_t handle; /* handle to the focus window */
2904 user_handle_t previous; /* handle to the previous focus window */
2907 /* Set the current thread active window */
2908 @REQ(set_active_window)
2909 user_handle_t handle; /* handle to the active window */
2911 user_handle_t previous; /* handle to the previous active window */
2914 /* Set the current thread capture window */
2915 @REQ(set_capture_window)
2916 user_handle_t handle; /* handle to the capture window */
2917 unsigned int flags; /* capture flags (see below) */
2919 user_handle_t previous; /* handle to the previous capture window */
2920 user_handle_t full_handle; /* full 32-bit handle of new capture window */
2922 #define CAPTURE_MENU 0x01 /* capture is for a menu */
2923 #define CAPTURE_MOVESIZE 0x02 /* capture is for moving/resizing */
2926 /* Set the current thread caret window */
2927 @REQ(set_caret_window)
2928 user_handle_t handle; /* handle to the caret window */
2929 int width; /* caret width */
2930 int height; /* caret height */
2932 user_handle_t previous; /* handle to the previous caret window */
2933 rectangle_t old_rect; /* previous caret rectangle */
2934 int old_hide; /* previous hide count */
2935 int old_state; /* previous caret state (1=on, 0=off) */
2939 /* Set the current thread caret information */
2940 @REQ(set_caret_info)
2941 unsigned int flags; /* caret flags (see below) */
2942 user_handle_t handle; /* handle to the caret window */
2943 int x; /* caret x position */
2944 int y; /* caret y position */
2945 int hide; /* increment for hide count (can be negative to show it) */
2946 int state; /* caret state (see below) */
2948 user_handle_t full_handle; /* handle to the current caret window */
2949 rectangle_t old_rect; /* previous caret rectangle */
2950 int old_hide; /* previous hide count */
2951 int old_state; /* previous caret state (1=on, 0=off) */
2953 #define SET_CARET_POS 0x01 /* set the caret position from x,y */
2954 #define SET_CARET_HIDE 0x02 /* increment the caret hide count */
2955 #define SET_CARET_STATE 0x04 /* set the caret on/off state */
2958 CARET_STATE_OFF, /* off */
2959 CARET_STATE_ON, /* on */
2960 CARET_STATE_TOGGLE, /* toggle current state */
2961 CARET_STATE_ON_IF_MOVED /* on if the position differs, unchanged otherwise */
2965 /* Set a window hook */
2967 int id; /* id of the hook */
2968 process_id_t pid; /* id of process to set the hook into */
2969 thread_id_t tid; /* id of thread to set the hook into */
2972 client_ptr_t proc; /* hook procedure */
2974 int unicode; /* is it a unicode hook? */
2975 VARARG(module,unicode_str); /* module name */
2977 user_handle_t handle; /* handle to the hook */
2978 unsigned int active_hooks; /* active hooks bitmap */
2982 /* Remove a window hook */
2984 user_handle_t handle; /* handle to the hook */
2985 client_ptr_t proc; /* hook procedure if handle is 0 */
2986 int id; /* id of the hook if handle is 0 */
2988 unsigned int active_hooks; /* active hooks bitmap */
2992 /* Start calling a hook chain */
2993 @REQ(start_hook_chain)
2994 int id; /* id of the hook */
2995 int event; /* signalled event */
2996 user_handle_t window; /* handle to the event window */
2997 int object_id; /* object id for out of context winevent */
2998 int child_id; /* child id for out of context winevent */
3000 user_handle_t handle; /* handle to the next hook */
3001 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
3002 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
3003 int unicode; /* is it a unicode hook? */
3004 client_ptr_t proc; /* hook procedure */
3005 unsigned int active_hooks; /* active hooks bitmap */
3006 VARARG(module,unicode_str); /* module name */
3010 /* Finished calling a hook chain */
3011 @REQ(finish_hook_chain)
3012 int id; /* id of the hook */
3016 /* Get the hook information */
3018 user_handle_t handle; /* handle to the current hook */
3019 int get_next; /* do we want info about current or next hook? */
3020 int event; /* signalled event */
3021 user_handle_t window; /* handle to the event window */
3022 int object_id; /* object id for out of context winevent */
3023 int child_id; /* child id for out of context winevent */
3025 user_handle_t handle; /* handle to the hook */
3026 int id; /* id of the hook */
3027 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
3028 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
3029 client_ptr_t proc; /* hook procedure */
3030 int unicode; /* is it a unicode hook? */
3031 VARARG(module,unicode_str); /* module name */
3035 /* Create a window class */
3037 int local; /* is it a local class? */
3038 atom_t atom; /* class atom */
3039 unsigned int style; /* class style */
3040 mod_handle_t instance; /* module instance */
3041 int extra; /* number of extra class bytes */
3042 int win_extra; /* number of window extra bytes */
3043 client_ptr_t client_ptr; /* pointer to class in client address space */
3044 data_size_t name_offset; /* base class name offset for specified atom */
3045 VARARG(name,unicode_str); /* class name */
3047 atom_t atom; /* resulting class atom */
3051 /* Destroy a window class */
3053 atom_t atom; /* class atom */
3054 mod_handle_t instance; /* module instance */
3055 VARARG(name,unicode_str); /* class name */
3057 client_ptr_t client_ptr; /* pointer to class in client address space */
3061 /* Set some information in a class */
3062 @REQ(set_class_info)
3063 user_handle_t window; /* handle to the window */
3064 unsigned int flags; /* flags for info to set (see below) */
3065 atom_t atom; /* class atom */
3066 unsigned int style; /* class style */
3067 int win_extra; /* number of window extra bytes */
3068 mod_handle_t instance; /* module instance */
3069 int extra_offset; /* offset to set in extra bytes */
3070 data_size_t extra_size; /* size to set in extra bytes */
3071 lparam_t extra_value; /* value to set in extra bytes */
3073 atom_t old_atom; /* previous class atom */
3074 atom_t base_atom; /* base class atom */
3075 mod_handle_t old_instance; /* previous module instance */
3076 lparam_t old_extra_value; /* old value in extra bytes */
3077 unsigned int old_style; /* previous class style */
3078 int old_extra; /* previous number of class extra bytes */
3079 int old_win_extra; /* previous number of window extra bytes */
3081 #define SET_CLASS_ATOM 0x0001
3082 #define SET_CLASS_STYLE 0x0002
3083 #define SET_CLASS_WINEXTRA 0x0004
3084 #define SET_CLASS_INSTANCE 0x0008
3085 #define SET_CLASS_EXTRA 0x0010
3088 /* Open the clipboard */
3089 @REQ(open_clipboard)
3090 user_handle_t window; /* clipboard window */
3092 user_handle_t owner; /* current clipboard owner */
3096 /* Close the clipboard */
3097 @REQ(close_clipboard)
3099 user_handle_t viewer; /* first clipboard viewer */
3100 user_handle_t owner; /* current clipboard owner */
3104 /* Empty the clipboard and grab ownership */
3105 @REQ(empty_clipboard)
3109 /* Add a data format to the clipboard */
3110 @REQ(set_clipboard_data)
3111 unsigned int format; /* clipboard format of the data */
3112 unsigned int lcid; /* locale id to use for synthesizing text formats */
3113 VARARG(data,bytes); /* data contents */
3115 unsigned int seqno; /* sequence number for the set data */
3119 /* Fetch a data format from the clipboard */
3120 @REQ(get_clipboard_data)
3121 unsigned int format; /* clipboard format of the data */
3122 int render; /* will we try to render it if missing? */
3123 int cached; /* do we already have it in the client-side cache? */
3124 unsigned int seqno; /* sequence number for the data in the cache */
3126 unsigned int from; /* for synthesized data, format to generate it from */
3127 user_handle_t owner; /* clipboard owner for delayed-rendered formats */
3128 unsigned int seqno; /* sequence number for the originally set data */
3129 data_size_t total; /* total data size */
3130 VARARG(data,bytes); /* data contents */
3134 /* Retrieve a list of available formats */
3135 @REQ(get_clipboard_formats)
3136 unsigned int format; /* specific format to query, return all if 0 */
3138 unsigned int count; /* count of available formats */
3139 VARARG(formats,uints); /* array of available formats */
3143 /* Retrieve the next available format */
3144 @REQ(enum_clipboard_formats)
3145 unsigned int previous; /* previous format, or first if 0 */
3147 unsigned int format; /* next format */
3151 /* Release ownership of the clipboard */
3152 @REQ(release_clipboard)
3153 user_handle_t owner; /* clipboard owner to release */
3155 user_handle_t viewer; /* first clipboard viewer */
3156 user_handle_t owner; /* current clipboard owner */
3160 /* Get clipboard information */
3161 @REQ(get_clipboard_info)
3163 user_handle_t window; /* clipboard window */
3164 user_handle_t owner; /* clipboard owner */
3165 user_handle_t viewer; /* clipboard viewer */
3166 unsigned int seqno; /* current sequence number */
3170 /* Set the clipboard viewer window */
3171 @REQ(set_clipboard_viewer)
3172 user_handle_t viewer; /* clipboard viewer */
3173 user_handle_t previous; /* if non-zero, check that this was the previous viewer */
3175 user_handle_t old_viewer; /* previous clipboard viewer */
3176 user_handle_t owner; /* clipboard owner */
3180 /* Add a clipboard listener window */
3181 @REQ(add_clipboard_listener)
3182 user_handle_t window; /* clipboard listener window */
3186 /* Remove a clipboard listener window */
3187 @REQ(remove_clipboard_listener)
3188 user_handle_t window; /* clipboard listener window */
3192 /* Create a security token */
3194 struct luid token_id;
3195 unsigned int access; /* access rights to the new token */
3196 int primary; /* is the new token to be a primary one? */
3197 int impersonation_level; /* impersonation level of the new token */
3198 abstime_t expire; /* expiration time */
3202 /* VARARG(objattr,object_attributes); */
3203 /* VARARG(user,sid); */
3204 /* VARARG(groups,sid); */
3205 /* VARARG(privs,luid_attr); */
3206 /* VARARG(dacl,acl); */
3208 obj_handle_t token; /* handle to the token */
3212 /* Open a security token */
3214 obj_handle_t handle; /* handle to the thread or process */
3215 unsigned int access; /* access rights to the new token */
3216 unsigned int attributes;/* object attributes */
3217 unsigned int flags; /* flags (see below) */
3219 obj_handle_t token; /* handle to the token */
3221 #define OPEN_TOKEN_THREAD 1
3222 #define OPEN_TOKEN_AS_SELF 2
3225 /* Set/get the global windows */
3226 @REQ(set_global_windows)
3227 unsigned int flags; /* flags for fields to set (see below) */
3228 user_handle_t shell_window; /* handle to the new shell window */
3229 user_handle_t shell_listview; /* handle to the new shell listview window */
3230 user_handle_t progman_window; /* handle to the new program manager window */
3231 user_handle_t taskman_window; /* handle to the new task manager window */
3233 user_handle_t old_shell_window; /* handle to the shell window */
3234 user_handle_t old_shell_listview; /* handle to the shell listview window */
3235 user_handle_t old_progman_window; /* handle to the new program manager window */
3236 user_handle_t old_taskman_window; /* handle to the new task manager window */
3238 #define SET_GLOBAL_SHELL_WINDOWS 0x01 /* set both main shell and listview windows */
3239 #define SET_GLOBAL_PROGMAN_WINDOW 0x02
3240 #define SET_GLOBAL_TASKMAN_WINDOW 0x04
3242 /* Adjust the privileges held by a token */
3243 @REQ(adjust_token_privileges)
3244 obj_handle_t handle; /* handle to the token */
3245 int disable_all; /* disable all privileges? */
3246 int get_modified_state; /* get modified privileges? */
3247 VARARG(privileges,luid_attr); /* privileges to enable/disable/remove */
3249 unsigned int len; /* total length in bytes required to store token privileges */
3250 VARARG(privileges,luid_attr); /* modified privileges */
3253 /* Retrieves the set of privileges held by or available to a token */
3254 @REQ(get_token_privileges)
3255 obj_handle_t handle; /* handle to the token */
3257 unsigned int len; /* total length in bytes required to store token privileges */
3258 VARARG(privileges,luid_attr); /* privileges held by or available to a token */
3261 /* Check the token has the required privileges */
3262 @REQ(check_token_privileges)
3263 obj_handle_t handle; /* handle to the token */
3264 int all_required; /* are all the privileges required for the check to succeed? */
3265 VARARG(privileges,luid_attr); /* privileges to check */
3267 int has_privileges; /* does the token have the required privileges? */
3268 VARARG(privileges,luid_attr); /* privileges held by or available to a token */
3271 @REQ(duplicate_token)
3272 obj_handle_t handle; /* handle to the token to duplicate */
3273 unsigned int access; /* access rights to the new token */
3274 int primary; /* is the new token to be a primary one? */
3275 int impersonation_level; /* impersonation level of the new token */
3276 VARARG(objattr,object_attributes); /* object attributes */
3278 obj_handle_t new_handle; /* duplicated handle */
3282 obj_handle_t handle; /* handle to the token to duplicate */
3283 unsigned int flags; /* flags */
3284 data_size_t privileges_size; /* size of privileges */
3285 VARARG(privileges,luid_attr,privileges_size); /* privileges to remove from new token */
3286 VARARG(disable_sids,sid); /* array of groups to remove from new token */
3288 obj_handle_t new_handle; /* filtered handle */
3292 obj_handle_t handle; /* handle to the token */
3293 unsigned int desired_access; /* desired access to the object */
3294 generic_map_t mapping; /* mapping to specific rights */
3295 VARARG(sd,security_descriptor); /* security descriptor to check */
3297 unsigned int access_granted; /* access rights actually granted */
3298 unsigned int access_status; /* was access granted? */
3299 unsigned int privileges_len; /* length needed to store privileges */
3300 VARARG(privileges,luid_attr); /* privileges used during access check */
3304 obj_handle_t handle; /* handle to the token */
3305 unsigned int which_sid; /* which SID to retrieve from the token */
3307 data_size_t sid_len; /* length needed to store sid */
3308 VARARG(sid,sid); /* the sid specified by which_sid from the token */
3311 @REQ(get_token_groups)
3312 obj_handle_t handle; /* handle to the token */
3313 unsigned int attr_mask; /* mask for wanted attributes */
3315 data_size_t attr_len; /* length needed to store attrs */
3316 data_size_t sid_len; /* length needed to store sids */
3317 VARARG(attrs,uints,attr_len); /* group attributes */
3318 VARARG(sids,sids); /* group sids */
3321 @REQ(get_token_default_dacl)
3322 obj_handle_t handle; /* handle to the token */
3324 data_size_t acl_len; /* length needed to store access control list */
3325 VARARG(acl,acl); /* access control list */
3328 @REQ(set_token_default_dacl)
3329 obj_handle_t handle; /* handle to the token */
3330 VARARG(acl,acl); /* default dacl to set */
3333 @REQ(set_security_object)
3334 obj_handle_t handle; /* handle to the object */
3335 unsigned int security_info; /* which parts of security descriptor to set */
3336 VARARG(sd,security_descriptor); /* security descriptor to set */
3339 @REQ(get_security_object)
3340 obj_handle_t handle; /* handle to the object */
3341 unsigned int security_info; /* which parts of security descriptor to get */
3343 unsigned int sd_len; /* buffer size needed for sd */
3344 VARARG(sd,security_descriptor); /* retrieved security descriptor */
3351 obj_handle_t handle;
3352 unsigned int access;
3353 unsigned int attributes;
3357 /* Return a list of all opened handles */
3358 @REQ(get_system_handles)
3360 unsigned int count; /* number of handles */
3361 VARARG(data,handle_infos); /* array of handle_infos */
3365 /* Create a mailslot */
3366 @REQ(create_mailslot)
3367 unsigned int access; /* wanted access rights */
3368 timeout_t read_timeout;
3369 unsigned int max_msgsize;
3370 VARARG(objattr,object_attributes); /* object attributes */
3372 obj_handle_t handle; /* handle to the mailslot */
3376 /* Set mailslot information */
3377 @REQ(set_mailslot_info)
3378 obj_handle_t handle; /* handle to the mailslot */
3379 timeout_t read_timeout;
3382 timeout_t read_timeout;
3383 unsigned int max_msgsize;
3385 #define MAILSLOT_SET_READ_TIMEOUT 1
3388 /* Create a directory object */
3389 @REQ(create_directory)
3390 unsigned int access; /* access flags */
3391 VARARG(objattr,object_attributes); /* object attributes */
3393 obj_handle_t handle; /* handle to the directory */
3397 /* Open a directory object */
3398 @REQ(open_directory)
3399 unsigned int access; /* access flags */
3400 unsigned int attributes; /* object attributes */
3401 obj_handle_t rootdir; /* root directory */
3402 VARARG(directory_name,unicode_str); /* Directory name */
3404 obj_handle_t handle; /* handle to the directory */
3408 /* Get a directory entry by index */
3409 @REQ(get_directory_entry)
3410 obj_handle_t handle; /* handle to the directory */
3411 unsigned int index; /* entry index */
3413 data_size_t total_len; /* total length needed for strings */
3414 data_size_t name_len; /* length of the entry name in bytes */
3415 VARARG(name,unicode_str,name_len); /* entry name */
3416 VARARG(type,unicode_str); /* entry type */
3420 /* Create a symbolic link object */
3421 @REQ(create_symlink)
3422 unsigned int access; /* access flags */
3423 VARARG(objattr,object_attributes); /* object attributes */
3424 VARARG(target_name,unicode_str); /* target name */
3426 obj_handle_t handle; /* handle to the symlink */
3430 /* Open a symbolic link object */
3432 unsigned int access; /* access flags */
3433 unsigned int attributes; /* object attributes */
3434 obj_handle_t rootdir; /* root directory */
3435 VARARG(name,unicode_str); /* symlink name */
3437 obj_handle_t handle; /* handle to the symlink */
3441 /* Query a symbolic link object */
3443 obj_handle_t handle; /* handle to the symlink */
3445 data_size_t total; /* total needed size for name */
3446 VARARG(target_name,unicode_str); /* target name */
3450 /* Query basic object information */
3451 @REQ(get_object_info)
3452 obj_handle_t handle; /* handle to the object */
3454 unsigned int access; /* granted access mask */
3455 unsigned int ref_count; /* object ref count */
3456 unsigned int handle_count; /* object handle count */
3460 /* Query the full name of an object */
3461 @REQ(get_object_name)
3462 obj_handle_t handle; /* handle to the object */
3464 data_size_t total; /* total needed size for name */
3465 VARARG(name,unicode_str); /* object name */
3469 /* Query object type name information */
3470 @REQ(get_object_type)
3471 obj_handle_t handle; /* handle to the object */
3473 VARARG(info,object_type_info); /* type information */
3477 /* Query type information for all types */
3478 @REQ(get_object_types)
3480 int count; /* total count of object types */
3481 VARARG(info,object_types_info); /* type information */
3485 /* Allocate a locally-unique identifier */
3486 @REQ(allocate_locally_unique_id)
3492 /* Create a device manager */
3493 @REQ(create_device_manager)
3494 unsigned int access; /* wanted access rights */
3495 unsigned int attributes; /* object attributes */
3497 obj_handle_t handle; /* handle to the device */
3501 /* Create a device */
3503 obj_handle_t rootdir; /* root directory */
3504 client_ptr_t user_ptr; /* opaque ptr for use by client */
3505 obj_handle_t manager; /* device manager */
3506 VARARG(name,unicode_str); /* object name */
3510 /* Delete a device */
3512 obj_handle_t manager; /* handle to the device manager */
3513 client_ptr_t device; /* pointer to the device */
3517 /* Retrieve the next pending device irp request */
3518 @REQ(get_next_device_request)
3519 obj_handle_t manager; /* handle to the device manager */
3520 obj_handle_t prev; /* handle to the previous irp */
3521 unsigned int status; /* status of the previous irp */
3522 client_ptr_t user_ptr; /* user pointer of the previous irp */
3523 int pending; /* was the previous irp marked pending? */
3524 unsigned int iosb_status; /* IOSB status of the previous irp */
3525 data_size_t result; /* IOSB result of the previous irp */
3526 VARARG(data,bytes); /* output data of the previous irp */
3528 irp_params_t params; /* irp parameters */
3529 obj_handle_t next; /* handle to the next irp */
3530 thread_id_t client_tid; /* tid of thread calling irp */
3531 client_ptr_t client_thread; /* pointer to thread object of calling irp */
3532 data_size_t in_size; /* total needed input size */
3533 VARARG(next_data,bytes); /* input data of the next irp */
3537 /* Get kernel pointer from server object */
3538 @REQ(get_kernel_object_ptr)
3539 obj_handle_t manager; /* handle to the device manager */
3540 obj_handle_t handle; /* object handle */
3542 client_ptr_t user_ptr; /* kernel object pointer */
3546 /* Associate kernel pointer with server object */
3547 @REQ(set_kernel_object_ptr)
3548 obj_handle_t manager; /* handle to the device manager */
3549 obj_handle_t handle; /* object handle */
3550 client_ptr_t user_ptr; /* kernel object pointer */
3554 /* Grab server object reference from kernel object pointer */
3555 @REQ(grab_kernel_object)
3556 obj_handle_t manager; /* handle to the device manager */
3557 client_ptr_t user_ptr; /* kernel object pointer */
3561 /* Release server object reference from kernel object pointer */
3562 @REQ(release_kernel_object)
3563 obj_handle_t manager; /* handle to the device manager */
3564 client_ptr_t user_ptr; /* kernel object pointer */
3568 /* Get handle from kernel object pointer */
3569 @REQ(get_kernel_object_handle)
3570 obj_handle_t manager; /* handle to the device manager */
3571 client_ptr_t user_ptr; /* kernel object pointer */
3572 unsigned int access; /* wanted access rights */
3574 obj_handle_t handle; /* kernel object handle */
3578 /* Make the current process a system process */
3579 @REQ(make_process_system)
3580 obj_handle_t handle; /* handle to the process */
3582 obj_handle_t event; /* event signaled when all user processes have exited */
3586 /* Get detailed fixed-size information about a token */
3587 @REQ(get_token_info)
3588 obj_handle_t handle; /* handle to the object */
3590 struct luid token_id; /* locally-unique identifier of the token */
3591 struct luid modified_id; /* locally-unique identifier of the modified version of the token */
3592 unsigned int session_id; /* token session id */
3593 int primary; /* is the token primary or impersonation? */
3594 int impersonation_level; /* level of impersonation */
3595 int elevation; /* elevation type */
3596 int group_count; /* the number of groups the token is a member of */
3597 int privilege_count; /* the number of privileges the token has */
3601 /* Create a token which is an elevation counterpart to this token */
3602 @REQ(create_linked_token)
3603 obj_handle_t handle; /* handle to the token */
3605 obj_handle_t linked; /* handle to the linked token */
3609 /* Create I/O completion port */
3610 @REQ(create_completion)
3611 unsigned int access; /* desired access to a port */
3612 unsigned int concurrent; /* max number of concurrent active threads */
3613 VARARG(objattr,object_attributes); /* object attributes */
3615 obj_handle_t handle; /* port handle */
3619 /* Open I/O completion port */
3620 @REQ(open_completion)
3621 unsigned int access; /* desired access to a port */
3622 unsigned int attributes; /* object attributes */
3623 obj_handle_t rootdir; /* root directory */
3624 VARARG(filename,unicode_str); /* port name */
3626 obj_handle_t handle; /* port handle */
3630 /* add completion to completion port */
3631 @REQ(add_completion)
3632 obj_handle_t handle; /* port handle */
3633 apc_param_t ckey; /* completion key */
3634 apc_param_t cvalue; /* completion value */
3635 apc_param_t information; /* IO_STATUS_BLOCK Information */
3636 unsigned int status; /* completion result */
3640 /* get completion from completion port queue */
3641 @REQ(remove_completion)
3642 obj_handle_t handle; /* port handle */
3644 apc_param_t ckey; /* completion key */
3645 apc_param_t cvalue; /* completion value */
3646 apc_param_t information; /* IO_STATUS_BLOCK Information */
3647 unsigned int status; /* completion result */
3651 /* get completion queue depth */
3652 @REQ(query_completion)
3653 obj_handle_t handle; /* port handle */
3655 unsigned int depth; /* completion queue depth */
3659 /* associate object with completion port */
3660 @REQ(set_completion_info)
3661 obj_handle_t handle; /* object handle */
3662 apc_param_t ckey; /* completion key */
3663 obj_handle_t chandle; /* port handle */
3667 /* check for associated completion and push msg */
3668 @REQ(add_fd_completion)
3669 obj_handle_t handle; /* async' object
*/
3670 apc_param_t cvalue
; /* completion value
*/
3671 apc_param_t information
; /* IO_STATUS_BLOCK Information
*/
3672 unsigned int status
; /* completion status
*/
3673 int async
; /* completion is an async result
*/
3677 /* set fd completion information
*/
3678 @
REQ(set_fd_completion_mode
)
3679 obj_handle_t handle
; /* handle to a file or directory
*/
3680 unsigned int flags
; /* completion notification flags
*/
3684 /* set fd disposition information
*/
3685 @
REQ(set_fd_disp_info
)
3686 obj_handle_t handle
; /* handle to a file or directory
*/
3687 unsigned int flags
; /* what actions should be taken when deleting a file
*/
3691 /* set fd name information
*/
3692 @
REQ(set_fd_name_info
)
3693 obj_handle_t handle
; /* handle to a file or directory
*/
3694 obj_handle_t rootdir
; /* root directory
*/
3695 data_size_t namelen
; /* length of NT name in bytes
*/
3696 int link
; /* link instead of renaming
*/
3697 unsigned int flags
; /* FILE_RENAME_
* flags
*/
3698 VARARG(name
,unicode_str
,namelen
); /* NT name
*/
3699 VARARG(filename
,string
); /* new file name
*/
3703 /* set fd eof information
*/
3704 @
REQ(set_fd_eof_info
)
3705 obj_handle_t handle
; /* handle to a file or directory
*/
3706 file_pos_t eof
; /* offset of eof of file
*/
3710 /* Retrieve layered info for a window
*/
3711 @
REQ(get_window_layered_info
)
3712 user_handle_t handle
; /* handle to the window
*/
3714 unsigned int color_key
; /* color key
*/
3715 unsigned int alpha
; /* alpha (0.
.255) */
3716 unsigned int flags
; /* LWA_
* flags
*/
3720 /* Set layered info for a window
*/
3721 @
REQ(set_window_layered_info
)
3722 user_handle_t handle
; /* handle to the window
*/
3723 unsigned int color_key
; /* color key
*/
3724 unsigned int alpha
; /* alpha (0.
.255) */
3725 unsigned int flags
; /* LWA_
* flags
*/
3729 /* Allocate an arbitrary user handle
*/
3730 @
REQ(alloc_user_handle
)
3732 user_handle_t handle
; /* allocated handle
*/
3736 /* Free an arbitrary user handle
*/
3737 @
REQ(free_user_handle
)
3738 user_handle_t handle
; /* handle to free
*/
3742 /* Set
/get the current cursor
*/
3744 unsigned int flags
; /* flags for fields to
set (see below
) */
3745 user_handle_t handle
; /* handle to the cursor
*/
3746 int show_count
; /* show count increment
/decrement
*/
3747 int x
; /* cursor position
*/
3749 rectangle_t clip
; /* cursor clip rectangle
*/
3751 user_handle_t prev_handle
; /* previous handle
*/
3752 int prev_count
; /* previous show count
*/
3753 int prev_x
; /* previous position
*/
3755 int new_x
; /* new position
*/
3757 rectangle_t new_clip
; /* new clip rectangle
*/
3758 unsigned int last_change
; /* time of last position change
*/
3760 #define SET_CURSOR_HANDLE
0x01
3761 #define SET_CURSOR_COUNT
0x02
3762 #define SET_CURSOR_POS
0x04
3763 #define SET_CURSOR_CLIP
0x08
3764 #define SET_CURSOR_NOCLIP
0x10
3765 #define SET_CURSOR_FSCLIP
0x20
3767 /* Get the history of the
64 last cursor positions
*/
3768 @
REQ(get_cursor_history
)
3770 VARARG(history
,cursor_positions
);
3774 /* Batch read rawinput message data
*/
3775 @
REQ(get_rawinput_buffer
)
3776 data_size_t header_size
; /* size of RAWINPUTHEADER structure
*/
3777 int read_data
; /* read the rawinput buffer data
*/
3779 data_size_t next_size
; /* minimum size to get next message data
*/
3784 /* Modify the list of registered rawinput devices
*/
3785 @
REQ(update_rawinput_devices
)
3786 VARARG(devices
,rawinput_devices
);
3789 /* Create a new job object
*/
3791 unsigned int access
; /* wanted access rights
*/
3792 VARARG(objattr
,object_attributes
); /* object attributes
*/
3794 obj_handle_t handle
; /* handle to the job
*/
3798 /* Open a job object
*/
3800 unsigned int access
; /* wanted access rights
*/
3801 unsigned int attributes
; /* object attributes
*/
3802 obj_handle_t rootdir
; /* root directory
*/
3803 VARARG(name
,unicode_str
); /* object name
*/
3805 obj_handle_t handle
; /* handle to the job
*/
3809 /* Assign a job object to a process
*/
3811 obj_handle_t job
; /* handle to the job
*/
3812 obj_handle_t process
; /* handle to the process
*/
3816 /* Check if a process is associated with a job
*/
3817 @
REQ(process_in_job
)
3818 obj_handle_t job
; /* handle to the job
*/
3819 obj_handle_t process
; /* handle to the process
*/
3823 /* Set limit flags on a job
*/
3824 @
REQ(set_job_limits
)
3825 obj_handle_t handle
; /* handle to the job
*/
3826 unsigned int limit_flags
; /* new limit flags
*/
3830 /* Set new completion port for a job
*/
3831 @
REQ(set_job_completion_port
)
3832 obj_handle_t job
; /* handle to the job
*/
3833 obj_handle_t port
; /* handle to the completion port
*/
3834 client_ptr_t key
; /* key to send with completion messages
*/
3838 /* Retrieve information about a job
*/
3840 obj_handle_t handle
; /* handle to the job
*/
3842 int total_processes
; /* total count of processes
*/
3843 int active_processes
; /* count of running processes
*/
3844 VARARG(pids
,uints
); /* list of active pids
*/
3848 /* Terminate all processes associated with the job
*/
3850 obj_handle_t handle
; /* handle to the job
*/
3851 int status
; /* process exit code
*/
3855 /* Suspend a process
*/
3856 @
REQ(suspend_process
)
3857 obj_handle_t handle
; /* process handle
*/
3861 /* Resume a process
*/
3862 @
REQ(resume_process
)
3863 obj_handle_t handle
; /* process handle
*/
3867 /* Iterate thread list for process
*/
3868 @
REQ(get_next_thread
)
3869 obj_handle_t process
; /* process handle
*/
3870 obj_handle_t last
; /* thread handle to start with
*/
3871 unsigned int access
; /* desired access for returned handle
*/
3872 unsigned int attributes
; /* returned handle attributes
*/
3873 unsigned int flags
; /* controls iteration direction
*/
3875 obj_handle_t handle
; /* next thread handle
*/