3 * Wine server protocol definition
5 * Copyright (C
) 2001 Alexandre Julliard
7 * This file is used by tools
/make_requests to build the
8 * protocol structures in include
/wine
/server_protocol.h
10 * This library is free software
; you can redistribute it and
/or
11 * modify it under the terms of the GNU Lesser General Public
12 * License as published by the Free Software Foundation
; either
13 * version
2.1 of the License
, or (at your option
) any later version.
15 * This library is distributed in the hope that it will be useful
,
16 * but WITHOUT ANY WARRANTY
; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU
18 * Lesser General Public License for more details.
20 * You should have received a copy of the GNU Lesser General Public
21 * License along with this library
; if not
, write to the Free Software
22 * Foundation
, Inc.
, 51 Franklin St
, Fifth Floor
, Boston
, MA
02110-1301, USA
25 @HEADER
/* start of C declarations
*/
34 typedef unsigned int obj_handle_t
;
35 typedef unsigned int user_handle_t
;
36 typedef unsigned int atom_t
;
37 typedef unsigned int process_id_t
;
38 typedef unsigned int thread_id_t
;
39 typedef unsigned int data_size_t
;
40 typedef unsigned int ioctl_code_t
;
41 typedef unsigned __int64 lparam_t
;
42 typedef unsigned __int64 apc_param_t
;
43 typedef unsigned __int64 mem_size_t
;
44 typedef unsigned __int64 file_pos_t
;
45 typedef unsigned __int64 client_ptr_t
;
46 typedef unsigned __int64 affinity_t
;
47 typedef client_ptr_t mod_handle_t
;
51 int req
; /* request code
*/
52 data_size_t request_size
; /* request variable part size
*/
53 data_size_t reply_size
; /* reply variable part maximum size
*/
58 unsigned int error
; /* error result
*/
59 data_size_t reply_size
; /* reply variable part size
*/
62 /* placeholder structure for the maximum allowed request size
*/
63 /* this is used to construct the generic_request union
*/
64 struct request_max_size
66 int pad
[16]; /* the max request size is
16 ints
*/
69 #define FIRST_USER_HANDLE
0x0020 /* first possible value for low word of user handle
*/
70 #define LAST_USER_HANDLE
0xffef /* last possible value for low word of user handle
*/
73 /* debug event data
*/
76 int code
; /* event code
*/
79 int code
; /* DbgExceptionStateChange
*/
80 int first
; /* first chance exception?
*/
81 unsigned int exc_code
; /* exception code
*/
82 unsigned int flags
; /* exception flags
*/
83 client_ptr_t record
; /* exception record
*/
84 client_ptr_t address
; /* exception address
*/
85 int nb_params
; /* number of parameters
*/
87 client_ptr_t params
[15]; /* parameters
*/
91 int code
; /* DbgCreateThreadStateChange
*/
92 obj_handle_t handle
; /* handle to the new thread
*/
93 client_ptr_t start
; /* thread startup routine
*/
97 int code
; /* DbgCreateProcessStateChange
*/
98 obj_handle_t file
; /* handle to the process exe file
*/
99 obj_handle_t process
; /* handle to the new process
*/
100 obj_handle_t thread
; /* handle to the new thread
*/
101 mod_handle_t base
; /* base of executable image
*/
102 int dbg_offset
; /* offset of debug info in file
*/
103 int dbg_size
; /* size of debug info
*/
104 client_ptr_t start
; /* thread startup routine
*/
108 int code
; /* DbgExitThreadStateChange
/DbgExitProcessStateChange
*/
109 int exit_code
; /* thread or process exit code
*/
113 int code
; /* DbgLoadDllStateChange
*/
114 obj_handle_t handle
; /* file handle for the dll
*/
115 mod_handle_t base
; /* base address of the dll
*/
116 int dbg_offset
; /* offset of debug info in file
*/
117 int dbg_size
; /* size of debug info
*/
118 client_ptr_t name
; /* image
name (optional
) */
122 int code
; /* DbgUnloadDllStateChange
*/
124 mod_handle_t base
; /* base address of the dll
*/
131 unsigned int machine
; /* machine type
*/
132 unsigned int flags
; /* SERVER_CTX_
* flags
*/
135 struct
{ unsigned int eip
, ebp
, esp
, eflags
, cs
, ss
; } i386_regs
;
136 struct
{ unsigned __int64 rip
, rbp
, rsp
;
137 unsigned int cs
, ss
, flags
, __pad
; } x86_64_regs
;
138 struct
{ unsigned int sp
, lr
, pc
, cpsr
; } arm_regs
;
139 struct
{ unsigned __int64 sp
, pc
, pstate
; } arm64_regs
;
140 } ctl
; /* selected by SERVER_CTX_CONTROL
*/
143 struct
{ unsigned int eax
, ebx
, ecx
, edx
, esi
, edi
; } i386_regs
;
144 struct
{ unsigned __int64 rax
,rbx
, rcx
, rdx
, rsi
, rdi
,
145 r8
, r9
, r10
, r11
, r12
, r13
, r14
, r15
; } x86_64_regs
;
146 struct
{ unsigned int r
[13]; } arm_regs
;
147 struct
{ unsigned __int64 x
[31]; } arm64_regs
;
148 } integer
; /* selected by SERVER_CTX_INTEGER
*/
151 struct
{ unsigned int ds
, es
, fs
, gs
; } i386_regs
;
152 struct
{ unsigned int ds
, es
, fs
, gs
; } x86_64_regs
;
153 } seg
; /* selected by SERVER_CTX_SEGMENTS
*/
156 struct
{ unsigned int ctrl
, status
, tag
, err_off
, err_sel
, data_off
, data_sel
, cr0npx
;
157 unsigned char regs
[80]; } i386_regs
;
158 struct
{ struct
{ unsigned __int64 low
, high
; } fpregs
[32]; } x86_64_regs
;
159 struct
{ unsigned __int64 d
[32]; unsigned int fpscr
; } arm_regs
;
160 struct
{ struct
{ unsigned __int64 low
, high
; } q
[32]; unsigned int fpcr
, fpsr
; } arm64_regs
;
161 } fp
; /* selected by SERVER_CTX_FLOATING_POINT
*/
164 struct
{ unsigned int dr0
, dr1
, dr2
, dr3
, dr6
, dr7
; } i386_regs
;
165 struct
{ unsigned __int64 dr0
, dr1
, dr2
, dr3
, dr6
, dr7
; } x86_64_regs
;
166 struct
{ unsigned int bvr
[8], bcr
[8], wvr
[1], wcr
[1]; } arm_regs
;
167 struct
{ unsigned __int64 bvr
[8], wvr
[2]; unsigned int bcr
[8], wcr
[2]; } arm64_regs
;
168 } debug
; /* selected by SERVER_CTX_DEBUG_REGISTERS
*/
171 unsigned char i386_regs
[512];
172 } ext
; /* selected by SERVER_CTX_EXTENDED_REGISTERS
*/
175 struct
{ struct
{ unsigned __int64 low
, high
; } ymm_high
[16]; } regs
;
176 } ymm
; /* selected by SERVER_CTX_YMM_REGISTERS
*/
179 #define SERVER_CTX_CONTROL
0x01
180 #define SERVER_CTX_INTEGER
0x02
181 #define SERVER_CTX_SEGMENTS
0x04
182 #define SERVER_CTX_FLOATING_POINT
0x08
183 #define SERVER_CTX_DEBUG_REGISTERS
0x10
184 #define SERVER_CTX_EXTENDED_REGISTERS
0x20
185 #define SERVER_CTX_YMM_REGISTERS
0x40
187 /* structure used in sending an fd from client to server
*/
190 thread_id_t tid
; /* thread id
*/
191 int fd
; /* file descriptor on client
-side
*/
194 /* structure sent by the server on the wait fifo
*/
197 client_ptr_t cookie
; /* magic cookie that was passed in select_request
*/
198 int signaled
; /* wait result
*/
202 /* NT
-style timeout
, in
100ns units
, negative means relative timeout
*/
203 typedef __int64 timeout_t
;
204 #define
TIMEOUT_INFINITE (((timeout_t
)0x7fffffff) << 32 |
0xffffffff)
206 /* absolute timeout
, negative means that monotonic clock is used
*/
207 typedef __int64 abstime_t
;
209 /* structure for process startup info
*/
212 unsigned int debug_flags
;
213 unsigned int console_flags
;
214 obj_handle_t console
;
216 obj_handle_t hstdout
;
217 obj_handle_t hstderr
;
224 unsigned int attribute
;
227 data_size_t curdir_len
;
228 data_size_t dllpath_len
;
229 data_size_t imagepath_len
;
230 data_size_t cmdline_len
;
231 data_size_t title_len
;
232 data_size_t desktop_len
;
233 data_size_t shellinfo_len
;
234 data_size_t runtime_len
;
235 /* VARARG(curdir
,unicode_str
,curdir_len
); */
236 /* VARARG(dllpath
,unicode_str
,dllpath_len
); */
237 /* VARARG(imagepath
,unicode_str
,imagepath_len
); */
238 /* VARARG(cmdline
,unicode_str
,cmdline_len
); */
239 /* VARARG(title
,unicode_str
,title_len
); */
240 /* VARARG(desktop
,unicode_str
,desktop_len
); */
241 /* VARARG(shellinfo
,unicode_str
,shellinfo_len
); */
242 /* VARARG(runtime
,unicode_str
,runtime_len
); */
245 /* structure returned in the list of window properties
*/
248 atom_t atom
; /* property atom
*/
249 int string
; /* was atom a string originally?
*/
250 lparam_t data
; /* data stored in property
*/
253 /* structure to specify window rectangles
*/
262 /* structure for parameters of async I
/O calls
*/
265 obj_handle_t handle
; /* object to perform I
/O on
*/
266 obj_handle_t event
; /* event to signal when done
*/
267 client_ptr_t iosb
; /* I
/O status block in client addr space
*/
268 client_ptr_t user
; /* opaque user data containing callback pointer and async
-specific data
*/
269 client_ptr_t apc
; /* user APC to call
*/
270 apc_param_t apc_context
; /* user APC context or completion value
*/
273 /* structures for extra message data
*/
277 unsigned int device
; /* source
device (IMDT_
* values
) */
278 unsigned int origin
; /* source
origin (IMO_
* values
) */
286 int type
; /* RIM_TYPEKEYBOARD
*/
287 unsigned int message
; /* message generated by this rawinput event
*/
288 unsigned short vkey
; /* virtual key code
*/
289 unsigned short scan
; /* scan code
*/
293 int type
; /* RIM_TYPEMOUSE
*/
294 int x
; /* x coordinate
*/
295 int y
; /* y coordinate
*/
296 unsigned int data
; /* mouse data
*/
300 int type
; /* RIM_TYPEHID
*/
301 unsigned int device
; /* rawinput device index
*/
302 unsigned int param
; /* rawinput message param
*/
303 unsigned short usage_page
;/* HID usage page
*/
304 unsigned short usage
; /* HID usage
*/
305 unsigned int count
; /* HID report count
*/
306 unsigned int length
; /* HID report length
*/
310 struct hardware_msg_data
312 lparam_t info
; /* extra info
*/
313 data_size_t size
; /* size of hardware message data
*/
315 unsigned int hw_id
; /* unique id
*/
316 unsigned int flags
; /* hook flags
*/
317 struct hw_msg_source source
; /* message source
*/
318 union rawinput rawinput
; /* rawinput message data
*/
321 struct callback_msg_data
323 client_ptr_t callback
; /* callback function
*/
324 lparam_t data
; /* user data for callback
*/
325 lparam_t result
; /* message result
*/
328 struct winevent_msg_data
330 user_handle_t hook
; /* hook handle
*/
331 thread_id_t tid
; /* thread id
*/
332 client_ptr_t hook_proc
; /* hook proc address
*/
333 /* followed by module name if any
*/
341 int type
; /* INPUT_KEYBOARD
*/
342 unsigned short vkey
; /* virtual key code
*/
343 unsigned short scan
; /* scan code
*/
344 unsigned int flags
; /* event flags
*/
345 unsigned int time
; /* event time
*/
346 lparam_t info
; /* extra info
*/
350 int type
; /* INPUT_MOUSE
*/
351 int x
; /* coordinates
*/
353 unsigned int data
; /* mouse data
*/
354 unsigned int flags
; /* event flags
*/
355 unsigned int time
; /* event time
*/
356 lparam_t info
; /* extra info
*/
360 int type
; /* INPUT_HARDWARE
*/
361 unsigned int msg
; /* message code
*/
362 lparam_t lparam
; /* message param
*/
363 union rawinput rawinput
;/* rawinput message data
*/
369 unsigned char bytes
[1]; /* raw data for sent messages
*/
370 struct hardware_msg_data hardware
;
371 struct callback_msg_data callback
;
372 struct winevent_msg_data winevent
;
375 /* structure returned in filesystem events
*/
376 struct filesystem_event
385 unsigned int low_part
;
397 unsigned char revision
;
400 unsigned short count
;
406 unsigned char revision
;
407 unsigned char sub_count
;
408 unsigned char id_auth
[6];
409 unsigned int sub_auth
[15];
420 #define MAX_ACL_LEN
65535
422 struct security_descriptor
424 unsigned int control
; /* SE_ flags
*/
425 data_size_t owner_len
;
426 data_size_t group_len
;
427 data_size_t sacl_len
;
428 data_size_t dacl_len
;
429 /* VARARG(owner
,sid
); */
430 /* VARARG(group
,sid
); */
431 /* VARARG(sacl
,acl
); */
432 /* VARARG(dacl
,acl
); */
435 struct object_attributes
437 obj_handle_t rootdir
; /* root directory
*/
438 unsigned int attributes
; /* object attributes
*/
439 data_size_t sd_len
; /* length of security_descriptor data. may be
0 */
440 data_size_t name_len
; /* length of the name string. may be
0 */
441 /* VARARG(sd
,security_descriptor
); */
442 /* VARARG(name
,unicode_str
); */
445 struct object_type_info
447 data_size_t name_len
; /* length of the name string
*/
448 unsigned int index
; /* type index in global table
*/
449 unsigned int obj_count
; /* count of objects of this type
*/
450 unsigned int handle_count
; /* count of handles of this type
*/
451 unsigned int obj_max
; /* max count of objects of this type
*/
452 unsigned int handle_max
; /* max count of handles of this type
*/
453 unsigned int valid_access
; /* mask for valid access bits
*/
454 generic_map_t mapping
; /* generic access mappings
*/
455 /* VARARG(name
,unicode_str
); */
463 SELECT_SIGNAL_AND_WAIT
,
464 SELECT_KEYED_EVENT_WAIT
,
465 SELECT_KEYED_EVENT_RELEASE
473 enum select_op op
; /* SELECT_WAIT or SELECT_WAIT_ALL
*/
474 obj_handle_t handles
[MAXIMUM_WAIT_OBJECTS
];
478 enum select_op op
; /* SELECT_SIGNAL_AND_WAIT
*/
480 obj_handle_t signal
; /* must be last in the structure so we can remove it on retries
*/
484 enum select_op op
; /* SELECT_KEYED_EVENT_WAIT or SELECT_KEYED_EVENT_RELEASE
*/
510 enum apc_type type
; /* APC_USER
*/
512 client_ptr_t func
; /* void (__stdcall
*func
)(ULONG_PTR
,ULONG_PTR
,ULONG_PTR
); */
513 apc_param_t args
[3]; /* arguments for user function
*/
522 enum apc_type type
; /* APC_ASYNC_IO
*/
523 unsigned int status
; /* I
/O status
*/
524 client_ptr_t user
; /* user pointer
*/
525 client_ptr_t sb
; /* status block
*/
526 data_size_t result
; /* result size
*/
530 enum apc_type type
; /* APC_VIRTUAL_ALLOC
*/
531 unsigned int op_type
; /* type of operation
*/
532 client_ptr_t addr
; /* requested address
*/
533 mem_size_t size
; /* allocation size
*/
534 mem_size_t zero_bits
; /* number of zero high bits
*/
535 unsigned int prot
; /* memory protection flags
*/
539 enum apc_type type
; /* APC_VIRTUAL_FREE
*/
540 unsigned int op_type
; /* type of operation
*/
541 client_ptr_t addr
; /* requested address
*/
542 mem_size_t size
; /* allocation size
*/
546 enum apc_type type
; /* APC_VIRTUAL_QUERY
*/
548 client_ptr_t addr
; /* requested address
*/
552 enum apc_type type
; /* APC_VIRTUAL_PROTECT
*/
553 unsigned int prot
; /* new protection flags
*/
554 client_ptr_t addr
; /* requested address
*/
555 mem_size_t size
; /* requested size
*/
559 enum apc_type type
; /* APC_VIRTUAL_FLUSH
*/
561 client_ptr_t addr
; /* requested address
*/
562 mem_size_t size
; /* requested size
*/
566 enum apc_type type
; /* APC_VIRTUAL_LOCK
*/
568 client_ptr_t addr
; /* requested address
*/
569 mem_size_t size
; /* requested size
*/
573 enum apc_type type
; /* APC_VIRTUAL_UNLOCK
*/
575 client_ptr_t addr
; /* requested address
*/
576 mem_size_t size
; /* requested size
*/
580 enum apc_type type
; /* APC_MAP_VIEW
*/
581 obj_handle_t handle
; /* mapping handle
*/
582 client_ptr_t addr
; /* requested address
*/
583 mem_size_t size
; /* allocation size
*/
584 file_pos_t offset
; /* file offset
*/
585 mem_size_t zero_bits
; /* number of zero high bits
*/
586 unsigned int alloc_type
; /* allocation type
*/
587 unsigned int prot
; /* memory protection flags
*/
591 enum apc_type type
; /* APC_UNMAP_VIEW
*/
593 client_ptr_t addr
; /* view address
*/
597 enum apc_type type
; /* APC_CREATE_THREAD
*/
598 unsigned int flags
; /* creation flags
*/
599 client_ptr_t func
; /* void (__stdcall
*func
)(void*)
; start function
*/
600 client_ptr_t arg
; /* argument for start function
*/
601 mem_size_t zero_bits
; /* number of zero high bits for thread stack
*/
602 mem_size_t reserve
; /* reserve size for thread stack
*/
603 mem_size_t commit
; /* commit size for thread stack
*/
607 enum apc_type type
; /* APC_DUP_HANDLE
*/
608 obj_handle_t src_handle
; /* src handle to duplicate
*/
609 obj_handle_t dst_process
; /* dst process handle
*/
610 unsigned int access
; /* wanted access rights
*/
611 unsigned int attributes
; /* object attributes
*/
612 unsigned int options
; /* duplicate options
*/
621 enum apc_type type
; /* APC_ASYNC_IO
*/
622 unsigned int status
; /* new status of async operation
*/
623 unsigned int total
; /* bytes transferred
*/
627 enum apc_type type
; /* APC_VIRTUAL_ALLOC
*/
628 unsigned int status
; /* status returned by call
*/
629 client_ptr_t addr
; /* resulting address
*/
630 mem_size_t size
; /* resulting size
*/
634 enum apc_type type
; /* APC_VIRTUAL_FREE
*/
635 unsigned int status
; /* status returned by call
*/
636 client_ptr_t addr
; /* resulting address
*/
637 mem_size_t size
; /* resulting size
*/
641 enum apc_type type
; /* APC_VIRTUAL_QUERY
*/
642 unsigned int status
; /* status returned by call
*/
643 client_ptr_t base
; /* resulting base address
*/
644 client_ptr_t alloc_base
;/* resulting allocation base
*/
645 mem_size_t size
; /* resulting region size
*/
646 unsigned short state
; /* resulting region state
*/
647 unsigned short prot
; /* resulting region protection
*/
648 unsigned short alloc_prot
;/* resulting allocation protection
*/
649 unsigned short alloc_type
;/* resulting region allocation type
*/
653 enum apc_type type
; /* APC_VIRTUAL_PROTECT
*/
654 unsigned int status
; /* status returned by call
*/
655 client_ptr_t addr
; /* resulting address
*/
656 mem_size_t size
; /* resulting size
*/
657 unsigned int prot
; /* old protection flags
*/
661 enum apc_type type
; /* APC_VIRTUAL_FLUSH
*/
662 unsigned int status
; /* status returned by call
*/
663 client_ptr_t addr
; /* resulting address
*/
664 mem_size_t size
; /* resulting size
*/
668 enum apc_type type
; /* APC_VIRTUAL_LOCK
*/
669 unsigned int status
; /* status returned by call
*/
670 client_ptr_t addr
; /* resulting address
*/
671 mem_size_t size
; /* resulting size
*/
675 enum apc_type type
; /* APC_VIRTUAL_UNLOCK
*/
676 unsigned int status
; /* status returned by call
*/
677 client_ptr_t addr
; /* resulting address
*/
678 mem_size_t size
; /* resulting size
*/
682 enum apc_type type
; /* APC_MAP_VIEW
*/
683 unsigned int status
; /* status returned by call
*/
684 client_ptr_t addr
; /* resulting address
*/
685 mem_size_t size
; /* resulting size
*/
689 enum apc_type type
; /* APC_UNMAP_VIEW
*/
690 unsigned int status
; /* status returned by call
*/
694 enum apc_type type
; /* APC_CREATE_THREAD
*/
695 unsigned int status
; /* status returned by call
*/
696 process_id_t pid
; /* process id
*/
697 thread_id_t tid
; /* thread id
*/
698 client_ptr_t teb
; /* thread
teb (in process address space
) */
699 obj_handle_t handle
; /* handle to new thread
*/
703 enum apc_type type
; /* APC_DUP_HANDLE
*/
704 unsigned int status
; /* status returned by call
*/
705 obj_handle_t handle
; /* duplicated handle in dst process
*/
709 enum apc_type type
; /* APC_BREAK_PROCESS
*/
710 unsigned int status
; /* status returned by call
*/
730 enum irp_type type
; /* irp call type
*/
733 enum irp_type type
; /* IRP_CALL_CREATE
*/
734 unsigned int access
; /* access rights
*/
735 unsigned int sharing
; /* sharing flags
*/
736 unsigned int options
; /* file options
*/
737 client_ptr_t device
; /* opaque ptr for the device
*/
738 obj_handle_t file
; /* file handle
*/
742 enum irp_type type
; /* IRP_CALL_CLOSE
*/
744 client_ptr_t file
; /* opaque ptr for the file object
*/
748 enum irp_type type
; /* IRP_CALL_READ
*/
749 unsigned int key
; /* driver key
*/
750 data_size_t out_size
; /* needed output size
*/
752 client_ptr_t file
; /* opaque ptr for the file object
*/
753 file_pos_t pos
; /* file position
*/
757 enum irp_type type
; /* IRP_CALL_WRITE
*/
758 unsigned int key
; /* driver key
*/
759 client_ptr_t file
; /* opaque ptr for the file object
*/
760 file_pos_t pos
; /* file position
*/
764 enum irp_type type
; /* IRP_CALL_FLUSH
*/
766 client_ptr_t file
; /* opaque ptr for the file object
*/
770 enum irp_type type
; /* IRP_CALL_IOCTL
*/
771 ioctl_code_t code
; /* ioctl code
*/
772 data_size_t out_size
; /* needed output size
*/
774 client_ptr_t file
; /* opaque ptr for the file object
*/
778 enum irp_type type
; /* IRP_CALL_VOLUME
*/
779 unsigned int info_class
;/* information class
*/
780 data_size_t out_size
; /* needed output size
*/
782 client_ptr_t file
; /* opaque ptr for the file object
*/
786 enum irp_type type
; /* IRP_CALL_FREE
*/
788 client_ptr_t obj
; /* opaque ptr for the freed object
*/
792 enum irp_type type
; /* IRP_CALL_CANCEL
*/
794 client_ptr_t irp
; /* opaque ptr for canceled irp
*/
798 /* information about a PE image mapping
, roughly equivalent to SECTION_IMAGE_INFORMATION
*/
802 mem_size_t stack_size
;
803 mem_size_t stack_commit
;
804 unsigned int entry_point
;
805 unsigned int map_size
;
806 unsigned int zerobits
;
807 unsigned int subsystem
;
808 unsigned short subsystem_minor
;
809 unsigned short subsystem_major
;
810 unsigned short osversion_major
;
811 unsigned short osversion_minor
;
812 unsigned short image_charact
;
813 unsigned short dll_charact
;
814 unsigned short machine
;
815 unsigned char contains_code
;
816 unsigned char image_flags
;
817 unsigned int loader_flags
;
818 unsigned int header_size
;
819 unsigned int file_size
;
820 unsigned int checksum
;
821 unsigned int dbg_offset
;
822 unsigned int dbg_size
;
824 #define IMAGE_FLAGS_ComPlusNativeReady
0x01
825 #define IMAGE_FLAGS_ComPlusILOnly
0x02
826 #define IMAGE_FLAGS_ImageDynamicallyRelocated
0x04
827 #define IMAGE_FLAGS_ImageMappedFlat
0x08
828 #define IMAGE_FLAGS_BaseBelow4gb
0x10
829 #define IMAGE_FLAGS_ComPlusPrefer32bit
0x20
830 #define IMAGE_FLAGS_WineBuiltin
0x40
831 #define IMAGE_FLAGS_WineFakeDll
0x80
833 struct rawinput_device
835 unsigned short usage_page
;
836 unsigned short usage
;
838 user_handle_t target
;
850 /****************************************************************/
851 /* Request declarations
*/
853 /* Create a new process from the context of the parent
*/
855 obj_handle_t token
; /* process token
*/
856 obj_handle_t debug
; /* process debug object
*/
857 obj_handle_t parent_process
; /* parent process
*/
858 unsigned int flags
; /* process creation flags
*/
859 int socket_fd
; /* file descriptor for process socket
*/
860 unsigned int access
; /* access rights for process object
*/
861 unsigned short machine
; /* architecture that the new process will use
*/
862 data_size_t info_size
; /* size of startup info
*/
863 data_size_t handles_size
; /* length of explicit handles list
*/
864 data_size_t jobs_size
; /* length of jobs list
*/
865 VARARG(objattr
,object_attributes
); /* object attributes
*/
866 VARARG(handles
,uints
,handles_size
); /* handles list
*/
867 VARARG(jobs
,uints
,jobs_size
); /* jobs list
*/
868 VARARG(info
,startup_info
,info_size
); /* startup information
*/
869 VARARG(env
,unicode_str
); /* environment for new process
*/
871 obj_handle_t info
; /* new process info handle
*/
872 process_id_t pid
; /* process id
*/
873 obj_handle_t handle
; /* process
handle (in the current process
) */
877 /* Retrieve information about a newly started process
*/
878 @
REQ(get_new_process_info
)
879 obj_handle_t info
; /* info handle returned from new_process_request
*/
881 int success
; /* did the process start successfully?
*/
882 int exit_code
; /* process exit code if failed
*/
886 /* Create a new thread
*/
888 obj_handle_t process
; /* process in which to create thread
*/
889 unsigned int access
; /* wanted access rights
*/
890 unsigned int flags
; /* thread creation flags
*/
891 int request_fd
; /* fd for request pipe
*/
892 VARARG(objattr
,object_attributes
); /* object attributes
*/
894 thread_id_t tid
; /* thread id
*/
895 obj_handle_t handle
; /* thread
handle (in the current process
) */
899 /* Retrieve the new process startup info
*/
900 @
REQ(get_startup_info
)
902 data_size_t info_size
; /* size of startup info
*/
903 VARARG(info
,startup_info
,info_size
); /* startup information
*/
904 VARARG(env
,unicode_str
); /* environment
*/
908 /* Signal the end of the process initialization
*/
909 @
REQ(init_process_done
)
910 client_ptr_t teb
; /* TEB of new
thread (in process address space
) */
911 client_ptr_t peb
; /* PEB of new
process (in process address space
) */
912 client_ptr_t ldt_copy
; /* address of LDT
copy (in process address space
) */
914 client_ptr_t entry
; /* process entry point
*/
915 int suspend
; /* is process suspended?
*/
919 /* Initialize the first thread of a new process
*/
920 @
REQ(init_first_thread
)
921 int unix_pid
; /* Unix pid of new process
*/
922 int unix_tid
; /* Unix tid of new thread
*/
923 int debug_level
; /* new debug level
*/
924 int reply_fd
; /* fd for reply pipe
*/
925 int wait_fd
; /* fd for blocking calls pipe
*/
927 process_id_t pid
; /* process id of the new thread
's process */
928 thread_id_t tid; /* thread id of the new thread */
929 timeout_t server_start; /* server start time */
930 unsigned int session_id; /* process session id */
931 data_size_t info_size; /* total size of startup info */
932 VARARG(machines,ushorts); /* array of supported machines */
936 /* Initialize a new thread; called from the child after pthread_create() */
938 int unix_tid; /* Unix tid of new thread */
939 int reply_fd; /* fd for reply pipe */
940 int wait_fd; /* fd for blocking calls pipe */
941 client_ptr_t teb; /* TEB of new thread (in thread address space) */
942 client_ptr_t entry; /* entry point (in thread address space) */
944 int suspend; /* is thread suspended? */
948 /* Terminate a process */
949 @REQ(terminate_process)
950 obj_handle_t handle; /* process handle to terminate */
951 int exit_code; /* process exit code */
953 int self; /* suicide? */
957 /* Terminate a thread */
958 @REQ(terminate_thread)
959 obj_handle_t handle; /* thread handle to terminate */
960 int exit_code; /* thread exit code */
962 int self; /* suicide? */
966 /* Retrieve information about a process */
967 @REQ(get_process_info)
968 obj_handle_t handle; /* process handle */
970 process_id_t pid; /* server process id */
971 process_id_t ppid; /* server process id of parent */
972 affinity_t affinity; /* process affinity mask */
973 client_ptr_t peb; /* PEB address in process address space */
974 timeout_t start_time; /* process start time */
975 timeout_t end_time; /* process end time */
976 unsigned int session_id; /* process session id */
977 int exit_code; /* process exit code */
978 int priority; /* priority class */
979 unsigned short machine; /* process architecture */
980 VARARG(image,pe_image_info); /* image info for main exe */
984 /* Retrieve debug information about a process */
985 @REQ(get_process_debug_info)
986 obj_handle_t handle; /* process handle */
988 obj_handle_t debug; /* handle to debug port */
989 int debug_children; /* inherit debugger to child processes */
990 VARARG(image,pe_image_info); /* image info for main exe */
994 /* Fetch the name of the process image */
995 @REQ(get_process_image_name)
996 obj_handle_t handle; /* process handle */
997 int win32; /* return a win32 filename? */
999 data_size_t len; /* len in bytes required to store filename */
1000 VARARG(name,unicode_str); /* image name for main exe */
1004 /* Retrieve information about a process memory usage */
1005 @REQ(get_process_vm_counters)
1006 obj_handle_t handle; /* process handle */
1008 mem_size_t peak_virtual_size; /* peak virtual memory in bytes */
1009 mem_size_t virtual_size; /* virtual memory in bytes */
1010 mem_size_t peak_working_set_size; /* peak real memory in bytes */
1011 mem_size_t working_set_size; /* real memory in bytes */
1012 mem_size_t pagefile_usage; /* commit charge in bytes */
1013 mem_size_t peak_pagefile_usage; /* peak commit charge in bytes */
1017 /* Set a process information */
1018 @REQ(set_process_info)
1019 obj_handle_t handle; /* process handle */
1020 int mask; /* setting mask (see below) */
1021 int priority; /* priority class */
1022 affinity_t affinity; /* affinity mask */
1024 #define SET_PROCESS_INFO_PRIORITY 0x01
1025 #define SET_PROCESS_INFO_AFFINITY 0x02
1028 /* Retrieve information about a thread */
1029 @REQ(get_thread_info)
1030 obj_handle_t handle; /* thread handle */
1031 unsigned int access; /* required access rights */
1033 process_id_t pid; /* server process id */
1034 thread_id_t tid; /* server thread id */
1035 client_ptr_t teb; /* thread teb pointer */
1036 client_ptr_t entry_point; /* thread entry point */
1037 affinity_t affinity; /* thread affinity mask */
1038 int exit_code; /* thread exit code */
1039 int priority; /* thread priority level */
1040 int last; /* last thread in process */
1041 int suspend_count; /* thread suspend count */
1042 int dbg_hidden; /* thread hidden from debugger */
1043 data_size_t desc_len; /* description length in bytes */
1044 VARARG(desc,unicode_str); /* description string */
1048 /* Retrieve information about thread times */
1049 @REQ(get_thread_times)
1050 obj_handle_t handle; /* thread handle */
1052 timeout_t creation_time; /* thread creation time */
1053 timeout_t exit_time; /* thread exit time */
1054 int unix_pid; /* thread native pid */
1055 int unix_tid; /* thread native pid */
1059 /* Set a thread information */
1060 @REQ(set_thread_info)
1061 obj_handle_t handle; /* thread handle */
1062 int mask; /* setting mask (see below) */
1063 int priority; /* priority class */
1064 affinity_t affinity; /* affinity mask */
1065 client_ptr_t entry_point; /* thread entry point */
1066 obj_handle_t token; /* impersonation token */
1067 VARARG(desc,unicode_str); /* description string */
1069 #define SET_THREAD_INFO_PRIORITY 0x01
1070 #define SET_THREAD_INFO_AFFINITY 0x02
1071 #define SET_THREAD_INFO_TOKEN 0x04
1072 #define SET_THREAD_INFO_ENTRYPOINT 0x08
1073 #define SET_THREAD_INFO_DESCRIPTION 0x10
1074 #define SET_THREAD_INFO_DBG_HIDDEN 0x20
1077 /* Suspend a thread */
1078 @REQ(suspend_thread)
1079 obj_handle_t handle; /* thread handle */
1081 int count; /* new suspend count */
1085 /* Resume a thread */
1087 obj_handle_t handle; /* thread handle */
1089 int count; /* new suspend count */
1093 /* Queue an APC for a thread or process */
1095 obj_handle_t handle; /* thread or process handle */
1096 apc_call_t call; /* call arguments */
1098 obj_handle_t handle; /* APC handle */
1099 int self; /* run APC in caller itself? */
1103 /* Get the result of an APC call */
1104 @REQ(get_apc_result)
1105 obj_handle_t handle; /* handle to the APC */
1107 apc_result_t result; /* result of the APC */
1111 /* Close a handle for the current process */
1113 obj_handle_t handle; /* handle to close */
1117 /* Set a handle information */
1118 @REQ(set_handle_info)
1119 obj_handle_t handle; /* handle we are interested in */
1120 int flags; /* new handle flags */
1121 int mask; /* mask for flags to set */
1123 int old_flags; /* old flag value */
1127 /* Duplicate a handle */
1129 obj_handle_t src_process; /* src process handle */
1130 obj_handle_t src_handle; /* src handle to duplicate */
1131 obj_handle_t dst_process; /* dst process handle */
1132 unsigned int access; /* wanted access rights */
1133 unsigned int attributes; /* object attributes */
1134 unsigned int options; /* duplicate options */
1136 obj_handle_t handle; /* duplicated handle in dst process */
1140 /* Test if two handles refer to the same object */
1141 @REQ(compare_objects)
1142 obj_handle_t first; /* first object handle */
1143 obj_handle_t second; /* second object handle */
1147 /* Make an object temporary */
1148 @REQ(make_temporary)
1149 obj_handle_t handle; /* handle to the object */
1153 /* Open a handle to a process */
1155 process_id_t pid; /* process id to open */
1156 unsigned int access; /* wanted access rights */
1157 unsigned int attributes; /* object attributes */
1159 obj_handle_t handle; /* handle to the process */
1163 /* Open a handle to a thread */
1165 thread_id_t tid; /* thread id to open */
1166 unsigned int access; /* wanted access rights */
1167 unsigned int attributes; /* object attributes */
1169 obj_handle_t handle; /* handle to the thread */
1173 /* Wait for handles */
1175 int flags; /* wait flags (see below) */
1176 client_ptr_t cookie; /* magic cookie to return to client */
1177 abstime_t timeout; /* timeout */
1178 data_size_t size; /* size of select_op */
1179 obj_handle_t prev_apc; /* handle to previous APC */
1180 VARARG(result,apc_result); /* result of previous APC */
1181 VARARG(data,select_op,size); /* operation-specific data */
1182 VARARG(contexts,contexts); /* suspend context(s) */
1184 apc_call_t call; /* APC call arguments */
1185 obj_handle_t apc_handle; /* handle to next APC */
1186 int signaled; /* were the handles immediately signaled? */
1187 VARARG(contexts,contexts); /* suspend context(s) */
1189 #define SELECT_ALERTABLE 1
1190 #define SELECT_INTERRUPTIBLE 2
1193 /* Create an event */
1195 unsigned int access; /* wanted access rights */
1196 int manual_reset; /* manual reset event */
1197 int initial_state; /* initial state of the event */
1198 VARARG(objattr,object_attributes); /* object attributes */
1200 obj_handle_t handle; /* handle to the event */
1203 /* Event operation */
1205 obj_handle_t handle; /* handle to event */
1206 int op; /* event operation (see below) */
1208 int state; /* previous state */
1210 enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT };
1213 obj_handle_t handle; /* handle to event */
1215 int manual_reset; /* manual reset event */
1216 int state; /* current state of the event */
1221 unsigned int access; /* wanted access rights */
1222 unsigned int attributes; /* object attributes */
1223 obj_handle_t rootdir; /* root directory */
1224 VARARG(name,unicode_str); /* object name */
1226 obj_handle_t handle; /* handle to the event */
1230 /* Create a keyed event */
1231 @REQ(create_keyed_event)
1232 unsigned int access; /* wanted access rights */
1233 VARARG(objattr,object_attributes); /* object attributes */
1235 obj_handle_t handle; /* handle to the event */
1238 /* Open a keyed event */
1239 @REQ(open_keyed_event)
1240 unsigned int access; /* wanted access rights */
1241 unsigned int attributes; /* object attributes */
1242 obj_handle_t rootdir; /* root directory */
1243 VARARG(name,unicode_str); /* object name */
1245 obj_handle_t handle; /* handle to the event */
1249 /* Create a mutex */
1251 unsigned int access; /* wanted access rights */
1252 int owned; /* initially owned? */
1253 VARARG(objattr,object_attributes); /* object attributes */
1255 obj_handle_t handle; /* handle to the mutex */
1259 /* Release a mutex */
1261 obj_handle_t handle; /* handle to the mutex */
1263 unsigned int prev_count; /* value of internal counter, before release */
1269 unsigned int access; /* wanted access rights */
1270 unsigned int attributes; /* object attributes */
1271 obj_handle_t rootdir; /* root directory */
1272 VARARG(name,unicode_str); /* object name */
1274 obj_handle_t handle; /* handle to the mutex */
1280 obj_handle_t handle; /* handle to mutex */
1282 unsigned int count; /* current count of mutex */
1283 int owned; /* true if owned by current thread */
1284 int abandoned; /* true if abandoned */
1288 /* Create a semaphore */
1289 @REQ(create_semaphore)
1290 unsigned int access; /* wanted access rights */
1291 unsigned int initial; /* initial count */
1292 unsigned int max; /* maximum count */
1293 VARARG(objattr,object_attributes); /* object attributes */
1295 obj_handle_t handle; /* handle to the semaphore */
1299 /* Release a semaphore */
1300 @REQ(release_semaphore)
1301 obj_handle_t handle; /* handle to the semaphore */
1302 unsigned int count; /* count to add to semaphore */
1304 unsigned int prev_count; /* previous semaphore count */
1307 @REQ(query_semaphore)
1308 obj_handle_t handle; /* handle to the semaphore */
1310 unsigned int current; /* current count */
1311 unsigned int max; /* maximum count */
1314 /* Open a semaphore */
1315 @REQ(open_semaphore)
1316 unsigned int access; /* wanted access rights */
1317 unsigned int attributes; /* object attributes */
1318 obj_handle_t rootdir; /* root directory */
1319 VARARG(name,unicode_str); /* object name */
1321 obj_handle_t handle; /* handle to the semaphore */
1327 unsigned int access; /* wanted access rights */
1328 unsigned int sharing; /* sharing flags */
1329 int create; /* file create action */
1330 unsigned int options; /* file options */
1331 unsigned int attrs; /* file attributes for creation */
1332 VARARG(objattr,object_attributes); /* object attributes */
1333 VARARG(filename,string); /* file name */
1335 obj_handle_t handle; /* handle to the file */
1339 /* Open a file object */
1340 @REQ(open_file_object)
1341 unsigned int access; /* wanted access rights */
1342 unsigned int attributes; /* open attributes */
1343 obj_handle_t rootdir; /* root directory */
1344 unsigned int sharing; /* sharing flags */
1345 unsigned int options; /* file options */
1346 VARARG(filename,unicode_str); /* file name */
1348 obj_handle_t handle; /* handle to the file */
1352 /* Allocate a file handle for a Unix fd */
1353 @REQ(alloc_file_handle)
1354 unsigned int access; /* wanted access rights */
1355 unsigned int attributes; /* object attributes */
1356 int fd; /* file descriptor on the client side */
1358 obj_handle_t handle; /* handle to the file */
1362 /* Get the Unix name from a file handle */
1363 @REQ(get_handle_unix_name)
1364 obj_handle_t handle; /* file handle */
1366 data_size_t name_len; /* unix name length */
1367 VARARG(name,string); /* unix name */
1371 /* Get a Unix fd to access a file */
1373 obj_handle_t handle; /* handle to the file */
1375 int type; /* file type (see below) */
1376 int cacheable; /* can fd be cached in the client? */
1377 unsigned int access; /* file access rights */
1378 unsigned int options; /* file open options */
1382 FD_TYPE_INVALID, /* invalid file (no associated fd) */
1383 FD_TYPE_FILE, /* regular file */
1384 FD_TYPE_DIR, /* directory */
1385 FD_TYPE_SOCKET, /* socket */
1386 FD_TYPE_SERIAL, /* serial port */
1387 FD_TYPE_PIPE, /* named pipe */
1388 FD_TYPE_MAILSLOT, /* mailslot */
1389 FD_TYPE_CHAR, /* unspecified char device */
1390 FD_TYPE_DEVICE, /* Windows device file */
1395 /* Retrieve (or allocate) the client-side directory cache entry */
1396 @REQ(get_directory_cache_entry)
1397 obj_handle_t handle; /* handle to the directory */
1399 int entry; /* cache entry on the client side */
1400 VARARG(free,ints); /* entries that can be freed */
1404 /* Flush a file buffers */
1406 async_data_t async; /* async I/O parameters */
1408 obj_handle_t event; /* event set when finished */
1411 /* Query file information */
1413 obj_handle_t handle; /* handle to the file */
1414 unsigned int info_class; /* queried information class */
1416 VARARG(data,bytes); /* file info data */
1419 /* Query volume information */
1420 @REQ(get_volume_info)
1421 obj_handle_t handle; /* handle to the file */
1422 async_data_t async; /* async I/O parameters */
1423 unsigned int info_class; /* queried information class */
1425 obj_handle_t wait; /* handle to wait on for blocking read */
1426 VARARG(data,bytes); /* volume info data */
1429 /* Lock a region of a file */
1431 obj_handle_t handle; /* handle to the file */
1432 file_pos_t offset; /* offset of start of lock */
1433 file_pos_t count; /* count of bytes to lock */
1434 int shared; /* shared or exclusive lock? */
1435 int wait; /* do we want to wait? */
1437 obj_handle_t handle; /* handle to wait on */
1438 int overlapped; /* is it an overlapped I/O handle? */
1442 /* Unlock a region of a file */
1444 obj_handle_t handle; /* handle to the file */
1445 file_pos_t offset; /* offset of start of unlock */
1446 file_pos_t count; /* count of bytes to unlock */
1450 /* Perform a recv on a socket */
1452 int oob; /* are we receiving OOB data? */
1453 async_data_t async; /* async I/O parameters */
1454 int force_async; /* Force asynchronous mode? */
1456 obj_handle_t wait; /* handle to wait on for blocking recv */
1457 unsigned int options; /* device open options */
1458 int nonblocking; /* is socket non-blocking? */
1462 /* Perform a send on a socket */
1464 async_data_t async; /* async I/O parameters */
1465 int force_async; /* Force asynchronous mode? */
1467 obj_handle_t wait; /* handle to wait on for blocking send */
1468 unsigned int options; /* device open options */
1469 int nonblocking; /* is socket non-blocking? */
1473 /* Store ICMP id for ICMP over datagram fixup */
1474 @REQ(socket_send_icmp_id)
1475 obj_handle_t handle; /* socket handle */
1476 unsigned short icmp_id; /* ICMP packet id */
1477 unsigned short icmp_seq; /* ICMP packed sequence */
1482 /* Get ICMP id for ICMP over datagram fixup */
1483 @REQ(socket_get_icmp_id)
1484 obj_handle_t handle; /* socket handle */
1485 unsigned short icmp_seq; /* ICMP packed sequence */
1487 unsigned short icmp_id; /* ICMP packet id */
1491 /* Retrieve the next pending console ioctl request */
1492 @REQ(get_next_console_request)
1493 obj_handle_t handle; /* console server handle */
1494 int signal; /* server signal state */
1495 int read; /* 1 if reporting result of blocked read ioctl */
1496 unsigned int status; /* status of previous ioctl */
1497 VARARG(out_data,bytes); /* out_data of previous ioctl */
1499 unsigned int code; /* ioctl code */
1500 unsigned int output; /* output id or 0 for input */
1501 data_size_t out_size; /* ioctl output size */
1502 VARARG(in_data,bytes); /* ioctl in_data */
1506 /* enable directory change notifications */
1507 @REQ(read_directory_changes)
1508 unsigned int filter; /* notification filter */
1509 int subtree; /* watch the subtree? */
1510 int want_data; /* flag indicating whether change data should be collected */
1511 async_data_t async; /* async I/O parameters */
1516 obj_handle_t handle;
1518 VARARG(events,filesystem_event); /* collected filesystem events */
1522 /* Create a file mapping */
1523 @REQ(create_mapping)
1524 unsigned int access; /* wanted access rights */
1525 unsigned int flags; /* SEC_* flags */
1526 unsigned int file_access; /* file access rights */
1527 mem_size_t size; /* mapping size */
1528 obj_handle_t file_handle; /* file handle */
1529 VARARG(objattr,object_attributes); /* object attributes */
1531 obj_handle_t handle; /* handle to the mapping */
1535 /* Open a mapping */
1537 unsigned int access; /* wanted access rights */
1538 unsigned int attributes; /* object attributes */
1539 obj_handle_t rootdir; /* root directory */
1540 VARARG(name,unicode_str); /* object name */
1542 obj_handle_t handle; /* handle to the mapping */
1546 /* Get information about a file mapping */
1547 @REQ(get_mapping_info)
1548 obj_handle_t handle; /* handle to the mapping */
1549 unsigned int access; /* wanted access rights */
1551 mem_size_t size; /* mapping size */
1552 unsigned int flags; /* SEC_* flags */
1553 obj_handle_t shared_file; /* shared mapping file handle */
1554 data_size_t total; /* total required buffer size in bytes */
1555 VARARG(image,pe_image_info);/* image info for SEC_IMAGE mappings */
1556 VARARG(name,unicode_str); /* filename for SEC_IMAGE mappings */
1560 /* Add a memory view in the current process */
1562 obj_handle_t mapping; /* file mapping handle, or 0 for .so builtin */
1563 unsigned int access; /* wanted access rights */
1564 client_ptr_t base; /* view base address (page-aligned) */
1565 mem_size_t size; /* view size */
1566 file_pos_t start; /* start offset in mapping */
1567 VARARG(image,pe_image_info);/* image info for .so builtins */
1568 VARARG(name,unicode_str); /* image filename for .so builtins */
1572 /* Unmap a memory view from the current process */
1574 client_ptr_t base; /* view base address */
1578 /* Get a range of committed pages in a file mapping */
1579 @REQ(get_mapping_committed_range)
1580 client_ptr_t base; /* view base address */
1581 file_pos_t offset; /* starting offset (page-aligned, in bytes) */
1583 mem_size_t size; /* size of range starting at offset (page-aligned, in bytes) */
1584 int committed; /* whether it is a committed range */
1588 /* Add a range to the committed pages in a file mapping */
1589 @REQ(add_mapping_committed_range)
1590 client_ptr_t base; /* view base address */
1591 file_pos_t offset; /* starting offset (page-aligned, in bytes) */
1592 mem_size_t size; /* size to set (page-aligned, in bytes) or 0 if only retrieving */
1596 /* Check if two memory maps are for the same file */
1597 @REQ(is_same_mapping)
1598 client_ptr_t base1; /* first view base address */
1599 client_ptr_t base2; /* second view base address */
1603 /* Get the filename of a mapping */
1604 @REQ(get_mapping_filename)
1605 obj_handle_t process; /* process handle */
1606 client_ptr_t addr; /* address inside mapped view (in process address space) */
1608 data_size_t len; /* total filename length in bytes */
1609 VARARG(filename,unicode_str); /* filename in NT format */
1615 timeout_t start_time;
1618 int current_priority;
1621 client_ptr_t entry_point;
1626 timeout_t start_time;
1627 data_size_t name_len;
1631 process_id_t parent_pid;
1632 unsigned int session_id;
1635 /* VARARG(name,unicode_str,name_len); */
1636 /* VARARG(threads,struct thread_info,thread_count); */
1639 /* Get a list of processes and threads currently running */
1640 @REQ(list_processes)
1642 data_size_t info_size;
1644 int total_thread_count;
1645 data_size_t total_name_len;
1646 VARARG(data,process_info,info_size);
1650 /* Create a debug object */
1651 @REQ(create_debug_obj)
1652 unsigned int access; /* wanted access rights */
1653 unsigned int flags; /* object flags */
1654 VARARG(objattr,object_attributes); /* object attributes */
1656 obj_handle_t handle; /* handle to the debug object */
1660 /* Wait for a debug event */
1661 @REQ(wait_debug_event)
1662 obj_handle_t debug; /* debug object */
1664 process_id_t pid; /* process id */
1665 thread_id_t tid; /* thread id */
1666 VARARG(event,debug_event); /* debug event data */
1670 /* Queue an exception event */
1671 @REQ(queue_exception_event)
1672 int first; /* first chance exception? */
1673 unsigned int code; /* exception code */
1674 unsigned int flags; /* exception flags */
1675 client_ptr_t record; /* exception record */
1676 client_ptr_t address; /* exception address */
1677 data_size_t len; /* size of parameters */
1678 VARARG(params,uints64,len);/* exception parameters */
1680 obj_handle_t handle; /* handle to the queued event */
1684 /* Retrieve the status of an exception event */
1685 @REQ(get_exception_status)
1686 obj_handle_t handle; /* handle to the queued event */
1690 /* Continue a debug event */
1691 @REQ(continue_debug_event)
1692 obj_handle_t debug; /* debug object */
1693 process_id_t pid; /* process id to continue */
1694 thread_id_t tid; /* thread id to continue */
1695 unsigned int status; /* continuation status */
1699 /* Start or stop debugging an existing process */
1701 obj_handle_t handle; /* process handle */
1702 obj_handle_t debug; /* debug object to attach to the process */
1703 int attach; /* 1=attaching / 0=detaching from the process */
1707 /* Set debug object information */
1708 @REQ(set_debug_obj_info)
1709 obj_handle_t debug; /* debug object */
1710 unsigned int flags; /* object flags */
1714 /* Read data from a process address space */
1715 @REQ(read_process_memory)
1716 obj_handle_t handle; /* process handle */
1717 client_ptr_t addr; /* addr to read from */
1719 VARARG(data,bytes); /* result data */
1723 /* Write data to a process address space */
1724 @REQ(write_process_memory)
1725 obj_handle_t handle; /* process handle */
1726 client_ptr_t addr; /* addr to write to */
1727 VARARG(data,bytes); /* data to write */
1731 /* Create a registry key */
1733 unsigned int access; /* desired access rights */
1734 unsigned int options; /* creation options */
1735 VARARG(objattr,object_attributes); /* object attributes */
1736 VARARG(class,unicode_str); /* class name */
1738 obj_handle_t hkey; /* handle to the created key */
1741 /* Open a registry key */
1743 obj_handle_t parent; /* handle to the parent key */
1744 unsigned int access; /* desired access rights */
1745 unsigned int attributes; /* object attributes */
1746 VARARG(name,unicode_str); /* key name */
1748 obj_handle_t hkey; /* handle to the open key */
1752 /* Delete a registry key */
1754 obj_handle_t hkey; /* handle to the key */
1758 /* Flush a registry key */
1760 obj_handle_t hkey; /* handle to the key */
1764 /* Enumerate registry subkeys */
1766 obj_handle_t hkey; /* handle to registry key */
1767 int index; /* index of subkey (or -1 for current key) */
1768 int info_class; /* requested information class */
1770 int subkeys; /* number of subkeys */
1771 int max_subkey; /* longest subkey name */
1772 int max_class; /* longest class name */
1773 int values; /* number of values */
1774 int max_value; /* longest value name */
1775 int max_data; /* longest value data */
1776 timeout_t modif; /* last modification time */
1777 data_size_t total; /* total length needed for full name and class */
1778 data_size_t namelen; /* length of key name in bytes */
1779 VARARG(name,unicode_str,namelen); /* key name */
1780 VARARG(class,unicode_str); /* class name */
1784 /* Set a value of a registry key */
1786 obj_handle_t hkey; /* handle to registry key */
1787 int type; /* value type */
1788 data_size_t namelen; /* length of value name in bytes */
1789 VARARG(name,unicode_str,namelen); /* value name */
1790 VARARG(data,bytes); /* value data */
1794 /* Retrieve the value of a registry key */
1796 obj_handle_t hkey; /* handle to registry key */
1797 VARARG(name,unicode_str); /* value name */
1799 int type; /* value type */
1800 data_size_t total; /* total length needed for data */
1801 VARARG(data,bytes); /* value data */
1805 /* Enumerate a value of a registry key */
1806 @REQ(enum_key_value)
1807 obj_handle_t hkey; /* handle to registry key */
1808 int index; /* value index */
1809 int info_class; /* requested information class */
1811 int type; /* value type */
1812 data_size_t total; /* total length needed for full name and data */
1813 data_size_t namelen; /* length of value name in bytes */
1814 VARARG(name,unicode_str,namelen); /* value name */
1815 VARARG(data,bytes); /* value data */
1819 /* Delete a value of a registry key */
1820 @REQ(delete_key_value)
1821 obj_handle_t hkey; /* handle to registry key */
1822 VARARG(name,unicode_str); /* value name */
1826 /* Load a registry branch from a file */
1828 obj_handle_t file; /* file to load from */
1829 VARARG(objattr,object_attributes); /* object attributes */
1833 /* UnLoad a registry branch from a file */
1834 @REQ(unload_registry)
1835 obj_handle_t parent; /* handle to the parent key */
1836 unsigned int attributes; /* object attributes */
1837 VARARG(name,unicode_str); /* key name */
1841 /* Save a registry branch to a file */
1843 obj_handle_t hkey; /* key to save */
1844 obj_handle_t file; /* file to save to */
1848 /* Add a registry key change notification */
1849 @REQ(set_registry_notification)
1850 obj_handle_t hkey; /* key to watch for changes */
1851 obj_handle_t event; /* event to set */
1852 int subtree; /* should we watch the whole subtree? */
1853 unsigned int filter; /* things to watch */
1857 /* Rename a registry key */
1859 obj_handle_t hkey; /* handle to the key to be renamed */
1860 VARARG(name,unicode_str); /* new name */
1864 /* Create a waitable timer */
1866 unsigned int access; /* wanted access rights */
1867 int manual; /* manual reset */
1868 VARARG(objattr,object_attributes); /* object attributes */
1870 obj_handle_t handle; /* handle to the timer */
1874 /* Open a waitable timer */
1876 unsigned int access; /* wanted access rights */
1877 unsigned int attributes; /* object attributes */
1878 obj_handle_t rootdir; /* root directory */
1879 VARARG(name,unicode_str); /* object name */
1881 obj_handle_t handle; /* handle to the timer */
1884 /* Set a waitable timer */
1886 obj_handle_t handle; /* handle to the timer */
1887 timeout_t expire; /* next expiration absolute time */
1888 client_ptr_t callback; /* callback function */
1889 client_ptr_t arg; /* callback argument */
1890 int period; /* timer period in ms */
1892 int signaled; /* was the timer signaled before this call ? */
1895 /* Cancel a waitable timer */
1897 obj_handle_t handle; /* handle to the timer */
1899 int signaled; /* was the timer signaled before this calltime ? */
1902 /* Get information on a waitable timer */
1903 @REQ(get_timer_info)
1904 obj_handle_t handle; /* handle to the timer */
1906 timeout_t when; /* absolute time when the timer next expires */
1907 int signaled; /* is the timer signaled? */
1911 /* Retrieve the current context of a thread */
1912 @REQ(get_thread_context)
1913 obj_handle_t handle; /* thread handle */
1914 obj_handle_t context; /* context handle */
1915 unsigned int flags; /* context flags */
1916 unsigned short machine; /* context architecture */
1918 int self; /* was it a handle to the current thread? */
1919 obj_handle_t handle; /* pending context handle */
1920 VARARG(contexts,contexts); /* thread context(s) */
1924 /* Set the current context of a thread */
1925 @REQ(set_thread_context)
1926 obj_handle_t handle; /* thread handle */
1927 VARARG(contexts,contexts); /* thread context(s) */
1929 int self; /* was it a handle to the current thread? */
1933 /* Fetch a selector entry for a thread */
1934 @REQ(get_selector_entry)
1935 obj_handle_t handle; /* thread handle */
1936 int entry; /* LDT entry */
1938 unsigned int base; /* selector base */
1939 unsigned int limit; /* selector limit */
1940 unsigned char flags; /* selector flags */
1946 VARARG(name,unicode_str); /* atom name */
1948 atom_t atom; /* resulting atom */
1952 /* Delete an atom */
1954 atom_t atom; /* atom handle */
1960 VARARG(name,unicode_str); /* atom name */
1962 atom_t atom; /* atom handle */
1966 /* Get information about an atom */
1967 @REQ(get_atom_information)
1968 atom_t atom; /* atom handle */
1970 int count; /* atom lock count */
1971 int pinned; /* whether the atom has been pinned */
1972 data_size_t total; /* actual length of atom name */
1973 VARARG(name,unicode_str); /* atom name */
1977 /* Get the message queue of the current thread */
1980 obj_handle_t handle; /* handle to the queue */
1984 /* Set the file descriptor associated to the current thread queue */
1986 obj_handle_t handle; /* handle to the file descriptor */
1990 /* Set the current message queue wakeup mask */
1991 @REQ(set_queue_mask)
1992 unsigned int wake_mask; /* wakeup bits mask */
1993 unsigned int changed_mask; /* changed bits mask */
1994 int skip_wait; /* will we skip waiting if signaled? */
1996 unsigned int wake_bits; /* current wake bits */
1997 unsigned int changed_bits; /* current changed bits */
2001 /* Get the current message queue status */
2002 @REQ(get_queue_status)
2003 unsigned int clear_bits; /* should we clear the change bits? */
2005 unsigned int wake_bits; /* wake bits */
2006 unsigned int changed_bits; /* changed bits since last time */
2010 /* Retrieve the process idle event */
2011 @REQ(get_process_idle_event)
2012 obj_handle_t handle; /* process handle */
2014 obj_handle_t event; /* handle to idle event */
2018 /* Send a message to a thread queue */
2020 thread_id_t id; /* thread id */
2021 int type; /* message type (see below) */
2022 int flags; /* message flags (see below) */
2023 user_handle_t win; /* window handle */
2024 unsigned int msg; /* message code */
2025 lparam_t wparam; /* parameters */
2026 lparam_t lparam; /* parameters */
2027 timeout_t timeout; /* timeout for reply */
2028 VARARG(data,message_data); /* message data for sent messages */
2031 @REQ(post_quit_message)
2032 int exit_code; /* exit code to return */
2037 MSG_ASCII, /* Ascii message (from SendMessageA) */
2038 MSG_UNICODE, /* Unicode message (from SendMessageW) */
2039 MSG_NOTIFY, /* notify message (from SendNotifyMessageW), always Unicode */
2040 MSG_CALLBACK, /* callback message (from SendMessageCallbackW), always Unicode */
2041 MSG_CALLBACK_RESULT,/* result of a callback message */
2042 MSG_OTHER_PROCESS, /* sent from other process, may include vararg data, always Unicode */
2043 MSG_POSTED, /* posted message (from PostMessageW), always Unicode */
2044 MSG_HARDWARE, /* hardware message */
2045 MSG_WINEVENT, /* winevent message */
2046 MSG_HOOK_LL /* low-level hardware hook */
2048 #define SEND_MSG_ABORT_IF_HUNG 0x01
2051 /* Send a hardware message to a thread queue */
2052 @REQ(send_hardware_message)
2053 user_handle_t win; /* window handle */
2054 hw_input_t input; /* input data */
2055 unsigned int flags; /* flags (see below) */
2056 VARARG(report,bytes); /* HID report data */
2058 int wait; /* do we need to wait for a reply? */
2059 int prev_x; /* previous cursor position */
2061 int new_x; /* new cursor position */
2063 VARARG(keystate,bytes); /* global state array for all the keys */
2065 #define SEND_HWMSG_INJECTED 0x01
2068 /* Get a message from the current queue */
2070 unsigned int flags; /* PM_* flags */
2071 user_handle_t get_win; /* window handle to get */
2072 unsigned int get_first; /* first message code to get */
2073 unsigned int get_last; /* last message code to get */
2074 unsigned int hw_id; /* id of the previous hardware message (or 0) */
2075 unsigned int wake_mask; /* wakeup bits mask */
2076 unsigned int changed_mask; /* changed bits mask */
2078 user_handle_t win; /* window handle */
2079 unsigned int msg; /* message code */
2080 lparam_t wparam; /* parameters */
2081 lparam_t lparam; /* parameters */
2082 int type; /* message type */
2083 int x; /* message x position */
2084 int y; /* message y position */
2085 unsigned int time; /* message time */
2086 unsigned int active_hooks; /* active hooks bitmap */
2087 data_size_t total; /* total size of extra data */
2088 VARARG(data,message_data); /* message data for sent messages */
2092 /* Reply to a sent message */
2094 int remove; /* should we remove the message? */
2095 lparam_t result; /* message result */
2096 VARARG(data,bytes); /* message data for sent messages */
2100 /* Accept and remove the current hardware message */
2101 @REQ(accept_hardware_message)
2102 unsigned int hw_id; /* id of the hardware message */
2106 /* Retrieve the reply for the last message sent */
2107 @REQ(get_message_reply)
2108 int cancel; /* cancel message if not ready? */
2110 lparam_t result; /* message result */
2111 VARARG(data,bytes); /* message data for sent messages */
2115 /* Set a window timer */
2117 user_handle_t win; /* window handle */
2118 unsigned int msg; /* message to post */
2119 unsigned int rate; /* timer rate in ms */
2120 lparam_t id; /* timer id */
2121 lparam_t lparam; /* message lparam (callback proc) */
2123 lparam_t id; /* timer id */
2127 /* Kill a window timer */
2128 @REQ(kill_win_timer)
2129 user_handle_t win; /* window handle */
2130 lparam_t id; /* timer id */
2131 unsigned int msg; /* message to post */
2135 /* check if the thread owning the window is hung */
2136 @REQ(is_window_hung)
2137 user_handle_t win; /* window handle */
2143 /* Retrieve info about a serial port */
2144 @REQ(get_serial_info)
2145 obj_handle_t handle; /* handle to comm port */
2148 unsigned int eventmask;
2149 unsigned int cookie;
2150 unsigned int pending_write;
2154 /* Set info about a serial port */
2155 @REQ(set_serial_info)
2156 obj_handle_t handle; /* handle to comm port */
2157 int flags; /* bitmask to set values (see below) */
2159 #define SERIALINFO_PENDING_WRITE 0x04
2160 #define SERIALINFO_PENDING_WAIT 0x08
2162 /* Cancel all sync io on a thread */
2164 obj_handle_t handle; /* thread handle on which to cancel io */
2165 client_ptr_t iosb; /* I/O status block (NULL=all) */
2168 /* Create an async I/O */
2169 @REQ(register_async)
2170 int type; /* type of queue to look after */
2171 async_data_t async; /* async I/O parameters */
2172 int count; /* count - usually # of bytes to be read/written */
2174 #define ASYNC_TYPE_READ 0x01
2175 #define ASYNC_TYPE_WRITE 0x02
2176 #define ASYNC_TYPE_WAIT 0x03
2179 /* Cancel all async op on a fd */
2181 obj_handle_t handle; /* handle to comm port, socket or file */
2182 client_ptr_t iosb; /* I/O status block (NULL=all) */
2183 int only_thread; /* cancel matching this thread */
2187 /* Retrieve results of an async */
2188 @REQ(get_async_result)
2189 client_ptr_t user_arg; /* user arg used to identify async */
2191 VARARG(out_data,bytes); /* iosb output data */
2195 /* Notify direct completion of async and close the wait handle if not blocking */
2196 @REQ(set_async_direct_result)
2197 obj_handle_t handle; /* wait handle */
2198 apc_param_t information; /* IO_STATUS_BLOCK Information */
2199 unsigned int status; /* completion status */
2200 int mark_pending; /* set async to pending before completion? */
2202 obj_handle_t handle; /* wait handle, or NULL if closed */
2206 /* Perform a read on a file object */
2208 async_data_t async; /* async I/O parameters */
2209 file_pos_t pos; /* read position */
2211 obj_handle_t wait; /* handle to wait on for blocking read */
2212 unsigned int options; /* device open options */
2213 VARARG(data,bytes); /* read data */
2217 /* Perform a write on a file object */
2219 async_data_t async; /* async I/O parameters */
2220 file_pos_t pos; /* write position */
2221 VARARG(data,bytes); /* write data */
2223 obj_handle_t wait; /* handle to wait on for blocking write */
2224 unsigned int options; /* device open options */
2225 data_size_t size; /* size written */
2229 /* Perform an ioctl on a file */
2231 ioctl_code_t code; /* ioctl code */
2232 async_data_t async; /* async I/O parameters */
2233 VARARG(in_data,bytes); /* ioctl input data */
2235 obj_handle_t wait; /* handle to wait on for blocking ioctl */
2236 unsigned int options; /* device open options */
2237 VARARG(out_data,bytes); /* ioctl output data */
2241 /* Store results of an async irp */
2242 @REQ(set_irp_result)
2243 obj_handle_t handle; /* handle to the irp */
2244 unsigned int status; /* status of the irp */
2245 data_size_t size; /* result size (input or output depending on the operation) */
2246 VARARG(data,bytes); /* output data of the irp */
2250 /* Create a named pipe */
2251 @REQ(create_named_pipe)
2252 unsigned int access;
2253 unsigned int options;
2254 unsigned int sharing;
2255 unsigned int maxinstances;
2256 unsigned int outsize;
2257 unsigned int insize;
2260 VARARG(objattr,object_attributes); /* object attributes */
2262 obj_handle_t handle; /* handle to the pipe */
2265 /* flags in create_named_pipe and get_named_pipe_info */
2266 #define NAMED_PIPE_MESSAGE_STREAM_WRITE 0x0001
2267 #define NAMED_PIPE_MESSAGE_STREAM_READ 0x0002
2268 #define NAMED_PIPE_NONBLOCKING_MODE 0x0004
2269 #define NAMED_PIPE_SERVER_END 0x8000
2271 /* Set named pipe information by handle */
2272 @REQ(set_named_pipe_info)
2273 obj_handle_t handle;
2277 /* Create a window */
2279 user_handle_t parent; /* parent window */
2280 user_handle_t owner; /* owner window */
2281 atom_t atom; /* class atom */
2282 mod_handle_t instance; /* module instance */
2283 int dpi; /* system DPI */
2284 int awareness; /* thread DPI awareness */
2285 unsigned int style; /* window style */
2286 unsigned int ex_style; /* window extended style */
2287 VARARG(class,unicode_str); /* class name */
2289 user_handle_t handle; /* created window */
2290 user_handle_t parent; /* full handle of parent */
2291 user_handle_t owner; /* full handle of owner */
2292 int extra; /* number of extra bytes */
2293 client_ptr_t class_ptr; /* pointer to class in client address space */
2294 int dpi; /* window DPI if not per-monitor aware */
2295 int awareness; /* window DPI awareness */
2299 /* Destroy a window */
2300 @REQ(destroy_window)
2301 user_handle_t handle; /* handle to the window */
2305 /* Retrieve the desktop window for the current thread */
2306 @REQ(get_desktop_window)
2307 int force; /* force creation if it doesn't exist
*/
2309 user_handle_t top_window
; /* handle to the desktop window
*/
2310 user_handle_t msg_window
; /* handle to the top
-level HWND_MESSAGE parent
*/
2314 /* Set a window owner
*/
2315 @
REQ(set_window_owner
)
2316 user_handle_t handle
; /* handle to the window
*/
2317 user_handle_t owner
; /* new owner
*/
2319 user_handle_t full_owner
; /* full handle of new owner
*/
2320 user_handle_t prev_owner
; /* full handle of previous owner
*/
2324 /* Get information from a window handle
*/
2325 @
REQ(get_window_info
)
2326 user_handle_t handle
; /* handle to the window
*/
2328 user_handle_t full_handle
; /* full
32-bit handle
*/
2329 user_handle_t last_active
; /* last active popup
*/
2330 process_id_t pid
; /* process owning the window
*/
2331 thread_id_t tid
; /* thread owning the window
*/
2332 atom_t atom
; /* class atom
*/
2333 int is_unicode
; /* ANSI or unicode
*/
2334 int dpi
; /* window DPI
*/
2335 int awareness
; /* DPI awareness
*/
2339 /* Set some information in a window
*/
2340 @
REQ(set_window_info
)
2341 unsigned short flags
; /* flags for fields to
set (see below
) */
2342 short int is_unicode
; /* ANSI or unicode
*/
2343 user_handle_t handle
; /* handle to the window
*/
2344 unsigned int style
; /* window style
*/
2345 unsigned int ex_style
; /* window extended style
*/
2346 data_size_t extra_size
; /* size to set in extra bytes
*/
2347 mod_handle_t instance
; /* creator instance
*/
2348 lparam_t user_data
; /* user
-specific data
*/
2349 lparam_t extra_value
; /* value to set in extra bytes or window id
*/
2350 int extra_offset
; /* offset to set in extra bytes
*/
2352 unsigned int old_style
; /* old window style
*/
2353 unsigned int old_ex_style
; /* old window extended style
*/
2354 mod_handle_t old_instance
; /* old creator instance
*/
2355 lparam_t old_user_data
; /* old user
-specific data
*/
2356 lparam_t old_extra_value
; /* old value in extra bytes
*/
2357 lparam_t old_id
; /* old window id
*/
2359 #define SET_WIN_STYLE
0x01
2360 #define SET_WIN_EXSTYLE
0x02
2361 #define SET_WIN_ID
0x04
2362 #define SET_WIN_INSTANCE
0x08
2363 #define SET_WIN_USERDATA
0x10
2364 #define SET_WIN_EXTRA
0x20
2365 #define SET_WIN_UNICODE
0x40
2368 /* Set the parent of a window
*/
2370 user_handle_t handle
; /* handle to the window
*/
2371 user_handle_t parent
; /* handle to the parent
*/
2373 user_handle_t old_parent
; /* old parent window
*/
2374 user_handle_t full_parent
; /* full handle of new parent
*/
2375 int dpi
; /* new window DPI if not per
-monitor aware
*/
2376 int awareness
; /* new DPI awareness
*/
2380 /* Get a list of the window parents
, up to the root of the tree
*/
2381 @
REQ(get_window_parents
)
2382 user_handle_t handle
; /* handle to the window
*/
2384 int count
; /* total count of parents
*/
2385 VARARG(parents
,user_handles
); /* parent handles
*/
2389 /* Get a list of the window children
*/
2390 @
REQ(get_window_children
)
2391 obj_handle_t desktop
; /* handle to desktop
*/
2392 user_handle_t parent
; /* parent window
*/
2393 atom_t atom
; /* class atom for the listed children
*/
2394 thread_id_t tid
; /* thread owning the listed children
*/
2395 VARARG(class
,unicode_str
); /* class name
*/
2397 int count
; /* total count of children
*/
2398 VARARG(children
,user_handles
); /* children handles
*/
2402 /* Get a list of the window children that contain a given point
*/
2403 @
REQ(get_window_children_from_point
)
2404 user_handle_t parent
; /* parent window
*/
2405 int x
; /* point in parent coordinates
*/
2407 int dpi
; /* dpi for the point coordinates
*/
2409 int count
; /* total count of children
*/
2410 VARARG(children
,user_handles
); /* children handles
*/
2414 /* Get window tree information from a window handle
*/
2415 @
REQ(get_window_tree
)
2416 user_handle_t handle
; /* handle to the window
*/
2418 user_handle_t parent
; /* parent window
*/
2419 user_handle_t owner
; /* owner window
*/
2420 user_handle_t next_sibling
; /* next sibling in Z
-order
*/
2421 user_handle_t prev_sibling
; /* prev sibling in Z
-order
*/
2422 user_handle_t first_sibling
; /* first sibling in Z
-order
*/
2423 user_handle_t last_sibling
; /* last sibling in Z
-order
*/
2424 user_handle_t first_child
; /* first child
*/
2425 user_handle_t last_child
; /* last child
*/
2428 /* Set the position and Z order of a window
*/
2429 @
REQ(set_window_pos
)
2430 unsigned short swp_flags
; /* SWP_
* flags
*/
2431 unsigned short paint_flags
; /* paint
flags (see below
) */
2432 user_handle_t handle
; /* handle to the window
*/
2433 user_handle_t previous
; /* previous window in Z order
*/
2434 rectangle_t window
; /* window
rectangle (in parent coords
) */
2435 rectangle_t client
; /* client
rectangle (in parent coords
) */
2436 VARARG(valid
,rectangles
); /* valid rectangles from
WM_NCCALCSIZE (in parent coords
) */
2438 unsigned int new_style
; /* new window style
*/
2439 unsigned int new_ex_style
; /* new window extended style
*/
2440 user_handle_t surface_win
; /* parent window that holds the surface
*/
2441 int needs_update
; /* whether the surface region needs an update
*/
2443 #define SET_WINPOS_PAINT_SURFACE
0x01 /* window has a paintable surface
*/
2444 #define SET_WINPOS_PIXEL_FORMAT
0x02 /* window has a custom pixel format
*/
2446 /* Get the window and client rectangles of a window
*/
2447 @
REQ(get_window_rectangles
)
2448 user_handle_t handle
; /* handle to the window
*/
2449 int relative
; /* coords relative
to (see below
) */
2450 int dpi
; /* DPI to map to
, or zero for per
-monitor DPI
*/
2452 rectangle_t window
; /* window rectangle
*/
2453 rectangle_t client
; /* client rectangle
*/
2455 enum coords_relative
2457 COORDS_CLIENT
, /* relative to client area
*/
2458 COORDS_WINDOW
, /* relative to whole window area
*/
2459 COORDS_PARENT
, /* relative to parent
's client area */
2460 COORDS_SCREEN /* relative to screen origin */
2464 /* Get the window text */
2465 @REQ(get_window_text)
2466 user_handle_t handle; /* handle to the window */
2468 data_size_t length; /* total length in WCHARs */
2469 VARARG(text,unicode_str); /* window text */
2473 /* Set the window text */
2474 @REQ(set_window_text)
2475 user_handle_t handle; /* handle to the window */
2476 VARARG(text,unicode_str); /* window text */
2480 /* Get the coordinates offset between two windows */
2481 @REQ(get_windows_offset)
2482 user_handle_t from; /* handle to the first window */
2483 user_handle_t to; /* handle to the second window */
2484 int dpi; /* DPI to map to, or zero for per-monitor DPI */
2486 int x; /* x coordinate offset */
2487 int y; /* y coordinate offset */
2488 int mirror; /* whether to mirror the x coordinate */
2492 /* Get the visible region of a window */
2493 @REQ(get_visible_region)
2494 user_handle_t window; /* handle to the window */
2495 unsigned int flags; /* DCX flags */
2497 user_handle_t top_win; /* top window to clip against */
2498 rectangle_t top_rect; /* top window visible rect with screen coords */
2499 rectangle_t win_rect; /* window rect in screen coords */
2500 unsigned int paint_flags; /* paint flags (from SET_WINPOS_* flags) */
2501 data_size_t total_size; /* total size of the resulting region */
2502 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2506 /* Get the visible surface region of a window */
2507 @REQ(get_surface_region)
2508 user_handle_t window; /* handle to the window */
2510 rectangle_t visible_rect; /* window visible rect in screen coords */
2511 data_size_t total_size; /* total size of the resulting region */
2512 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2516 /* Get the window region */
2517 @REQ(get_window_region)
2518 user_handle_t window; /* handle to the window */
2520 data_size_t total_size; /* total size of the resulting region */
2521 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2525 /* Set the window region */
2526 @REQ(set_window_region)
2527 user_handle_t window; /* handle to the window */
2528 int redraw; /* redraw the window? */
2529 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2533 /* Get the window update region */
2534 @REQ(get_update_region)
2535 user_handle_t window; /* handle to the window */
2536 user_handle_t from_child; /* child to start searching from */
2537 unsigned int flags; /* update flags (see below) */
2539 user_handle_t child; /* child to repaint (or window itself) */
2540 unsigned int flags; /* resulting update flags (see below) */
2541 data_size_t total_size; /* total size of the resulting region */
2542 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2544 #define UPDATE_NONCLIENT 0x001 /* get region for repainting non-client area */
2545 #define UPDATE_ERASE 0x002 /* get region for erasing client area */
2546 #define UPDATE_PAINT 0x004 /* get region for painting client area */
2547 #define UPDATE_INTERNALPAINT 0x008 /* get region if internal paint is pending */
2548 #define UPDATE_ALLCHILDREN 0x010 /* force repaint of all children */
2549 #define UPDATE_NOCHILDREN 0x020 /* don't try to repaint any children
*/
2550 #define UPDATE_NOREGION
0x040 /* don
't return a region, only the flags */
2551 #define UPDATE_DELAYED_ERASE 0x080 /* still needs erase after BeginPaint */
2552 #define UPDATE_CLIPCHILDREN 0x100 /* remove clipped children from the update region */
2555 /* Update the z order of a window so that a given rectangle is fully visible */
2556 @REQ(update_window_zorder)
2557 user_handle_t window; /* handle to the window */
2558 rectangle_t rect; /* rectangle that must be visible (in client coords) */
2562 /* Mark parts of a window as needing a redraw */
2564 user_handle_t window; /* handle to the window */
2565 unsigned int flags; /* RDW_* flags */
2566 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2570 /* Set a window property */
2571 @REQ(set_window_property)
2572 user_handle_t window; /* handle to the window */
2573 lparam_t data; /* data to store */
2574 atom_t atom; /* property atom (if no name specified) */
2575 VARARG(name,unicode_str); /* property name */
2579 /* Remove a window property */
2580 @REQ(remove_window_property)
2581 user_handle_t window; /* handle to the window */
2582 atom_t atom; /* property atom (if no name specified) */
2583 VARARG(name,unicode_str); /* property name */
2585 lparam_t data; /* data stored in property */
2589 /* Get a window property */
2590 @REQ(get_window_property)
2591 user_handle_t window; /* handle to the window */
2592 atom_t atom; /* property atom (if no name specified) */
2593 VARARG(name,unicode_str); /* property name */
2595 lparam_t data; /* data stored in property */
2599 /* Get the list of properties of a window */
2600 @REQ(get_window_properties)
2601 user_handle_t window; /* handle to the window */
2603 int total; /* total number of properties */
2604 VARARG(props,properties); /* list of properties */
2608 /* Create a window station */
2609 @REQ(create_winstation)
2610 unsigned int flags; /* window station flags */
2611 unsigned int access; /* wanted access rights */
2612 unsigned int attributes; /* object attributes */
2613 obj_handle_t rootdir; /* root directory */
2614 VARARG(name,unicode_str); /* object name */
2616 obj_handle_t handle; /* handle to the window station */
2620 /* Open a handle to a window station */
2621 @REQ(open_winstation)
2622 unsigned int access; /* wanted access rights */
2623 unsigned int attributes; /* object attributes */
2624 obj_handle_t rootdir; /* root directory */
2625 VARARG(name,unicode_str); /* object name */
2627 obj_handle_t handle; /* handle to the window station */
2631 /* Close a window station */
2632 @REQ(close_winstation)
2633 obj_handle_t handle; /* handle to the window station */
2637 /* Get the process current window station */
2638 @REQ(get_process_winstation)
2640 obj_handle_t handle; /* handle to the window station */
2644 /* Set the process current window station */
2645 @REQ(set_process_winstation)
2646 obj_handle_t handle; /* handle to the window station */
2650 /* Enumerate window stations */
2651 @REQ(enum_winstation)
2652 unsigned int index; /* current index */
2654 unsigned int next; /* next index */
2655 VARARG(name,unicode_str); /* window station name */
2659 /* Create a desktop */
2660 @REQ(create_desktop)
2661 unsigned int flags; /* desktop flags */
2662 unsigned int access; /* wanted access rights */
2663 unsigned int attributes; /* object attributes */
2664 VARARG(name,unicode_str); /* object name */
2666 obj_handle_t handle; /* handle to the desktop */
2670 /* Open a handle to a desktop */
2672 obj_handle_t winsta; /* window station to open (null allowed) */
2673 unsigned int flags; /* desktop flags */
2674 unsigned int access; /* wanted access rights */
2675 unsigned int attributes; /* object attributes */
2676 VARARG(name,unicode_str); /* object name */
2678 obj_handle_t handle; /* handle to the desktop */
2682 /* Open a handle to current input desktop */
2683 @REQ(open_input_desktop)
2684 unsigned int flags; /* desktop flags */
2685 unsigned int access; /* wanted access rights */
2686 unsigned int attributes; /* object attributes */
2688 obj_handle_t handle; /* handle to the desktop */
2692 /* Close a desktop */
2694 obj_handle_t handle; /* handle to the desktop */
2698 /* Get the thread current desktop */
2699 @REQ(get_thread_desktop)
2700 thread_id_t tid; /* thread id */
2702 obj_handle_t handle; /* handle to the desktop */
2706 /* Set the thread current desktop */
2707 @REQ(set_thread_desktop)
2708 obj_handle_t handle; /* handle to the desktop */
2712 /* Enumerate desktops */
2714 obj_handle_t winstation; /* handle to the window station */
2715 unsigned int index; /* current index */
2717 unsigned int next; /* next index */
2718 VARARG(name,unicode_str); /* window station name */
2722 /* Get/set information about a user object (window station or desktop) */
2723 @REQ(set_user_object_info)
2724 obj_handle_t handle; /* handle to the object */
2725 unsigned int flags; /* information to set/get */
2726 unsigned int obj_flags; /* new object flags */
2728 int is_desktop; /* is object a desktop? */
2729 unsigned int old_obj_flags; /* old object flags */
2730 VARARG(name,unicode_str); /* object name */
2732 #define SET_USER_OBJECT_SET_FLAGS 1
2733 #define SET_USER_OBJECT_GET_FULL_NAME 2
2736 /* Register a hotkey */
2737 @REQ(register_hotkey)
2738 user_handle_t window; /* handle to the window */
2739 int id; /* hotkey identifier */
2740 unsigned int flags; /* modifier keys */
2741 unsigned int vkey; /* virtual key code */
2743 int replaced; /* did we replace an existing hotkey? */
2744 unsigned int flags; /* flags of replaced hotkey */
2745 unsigned int vkey; /* virtual key code of replaced hotkey */
2749 /* Unregister a hotkey */
2750 @REQ(unregister_hotkey)
2751 user_handle_t window; /* handle to the window */
2752 int id; /* hotkey identifier */
2754 unsigned int flags; /* flags of removed hotkey */
2755 unsigned int vkey; /* virtual key code of removed hotkey */
2759 /* Attach (or detach) thread inputs */
2760 @REQ(attach_thread_input)
2761 thread_id_t tid_from; /* thread to be attached */
2762 thread_id_t tid_to; /* thread to which tid_from should be attached */
2763 int attach; /* is it an attach? */
2767 /* Get input data for a given thread */
2768 @REQ(get_thread_input)
2769 thread_id_t tid; /* id of thread */
2771 user_handle_t focus; /* handle to the focus window */
2772 user_handle_t capture; /* handle to the capture window */
2773 user_handle_t active; /* handle to the active window */
2774 user_handle_t foreground; /* handle to the global foreground window */
2775 user_handle_t menu_owner; /* handle to the menu owner */
2776 user_handle_t move_size; /* handle to the moving/resizing window */
2777 user_handle_t caret; /* handle to the caret window */
2778 user_handle_t cursor; /* handle to the cursor */
2779 int show_count; /* cursor show count */
2780 rectangle_t rect; /* caret rectangle */
2784 /* Get the time of the last input event */
2785 @REQ(get_last_input_time)
2791 /* Retrieve queue keyboard state for current thread or global async state */
2793 int async; /* whether to query the async state */
2794 int key; /* optional key code or -1 */
2796 unsigned char state; /* state of specified key */
2797 VARARG(keystate,bytes); /* state array for all the keys */
2800 /* Set queue keyboard state for current thread */
2802 int async; /* whether to change the async state too */
2803 VARARG(keystate,bytes); /* state array for all the keys */
2806 /* Set the system foreground window */
2807 @REQ(set_foreground_window)
2808 user_handle_t handle; /* handle to the foreground window */
2810 user_handle_t previous; /* handle to the previous foreground window */
2811 int send_msg_old; /* whether we have to send a msg to the old window */
2812 int send_msg_new; /* whether we have to send a msg to the new window */
2815 /* Set the current thread focus window */
2816 @REQ(set_focus_window)
2817 user_handle_t handle; /* handle to the focus window */
2819 user_handle_t previous; /* handle to the previous focus window */
2822 /* Set the current thread active window */
2823 @REQ(set_active_window)
2824 user_handle_t handle; /* handle to the active window */
2826 user_handle_t previous; /* handle to the previous active window */
2829 /* Set the current thread capture window */
2830 @REQ(set_capture_window)
2831 user_handle_t handle; /* handle to the capture window */
2832 unsigned int flags; /* capture flags (see below) */
2834 user_handle_t previous; /* handle to the previous capture window */
2835 user_handle_t full_handle; /* full 32-bit handle of new capture window */
2837 #define CAPTURE_MENU 0x01 /* capture is for a menu */
2838 #define CAPTURE_MOVESIZE 0x02 /* capture is for moving/resizing */
2841 /* Set the current thread caret window */
2842 @REQ(set_caret_window)
2843 user_handle_t handle; /* handle to the caret window */
2844 int width; /* caret width */
2845 int height; /* caret height */
2847 user_handle_t previous; /* handle to the previous caret window */
2848 rectangle_t old_rect; /* previous caret rectangle */
2849 int old_hide; /* previous hide count */
2850 int old_state; /* previous caret state (1=on, 0=off) */
2854 /* Set the current thread caret information */
2855 @REQ(set_caret_info)
2856 unsigned int flags; /* caret flags (see below) */
2857 user_handle_t handle; /* handle to the caret window */
2858 int x; /* caret x position */
2859 int y; /* caret y position */
2860 int hide; /* increment for hide count (can be negative to show it) */
2861 int state; /* caret state (see below) */
2863 user_handle_t full_handle; /* handle to the current caret window */
2864 rectangle_t old_rect; /* previous caret rectangle */
2865 int old_hide; /* previous hide count */
2866 int old_state; /* previous caret state (1=on, 0=off) */
2868 #define SET_CARET_POS 0x01 /* set the caret position from x,y */
2869 #define SET_CARET_HIDE 0x02 /* increment the caret hide count */
2870 #define SET_CARET_STATE 0x04 /* set the caret on/off state */
2873 CARET_STATE_OFF, /* off */
2874 CARET_STATE_ON, /* on */
2875 CARET_STATE_TOGGLE, /* toggle current state */
2876 CARET_STATE_ON_IF_MOVED /* on if the position differs, unchanged otherwise */
2880 /* Set a window hook */
2882 int id; /* id of the hook */
2883 process_id_t pid; /* id of process to set the hook into */
2884 thread_id_t tid; /* id of thread to set the hook into */
2887 client_ptr_t proc; /* hook procedure */
2889 int unicode; /* is it a unicode hook? */
2890 VARARG(module,unicode_str); /* module name */
2892 user_handle_t handle; /* handle to the hook */
2893 unsigned int active_hooks; /* active hooks bitmap */
2897 /* Remove a window hook */
2899 user_handle_t handle; /* handle to the hook */
2900 client_ptr_t proc; /* hook procedure if handle is 0 */
2901 int id; /* id of the hook if handle is 0 */
2903 unsigned int active_hooks; /* active hooks bitmap */
2907 /* Start calling a hook chain */
2908 @REQ(start_hook_chain)
2909 int id; /* id of the hook */
2910 int event; /* signalled event */
2911 user_handle_t window; /* handle to the event window */
2912 int object_id; /* object id for out of context winevent */
2913 int child_id; /* child id for out of context winevent */
2915 user_handle_t handle; /* handle to the next hook */
2916 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2917 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2918 int unicode; /* is it a unicode hook? */
2919 client_ptr_t proc; /* hook procedure */
2920 unsigned int active_hooks; /* active hooks bitmap */
2921 VARARG(module,unicode_str); /* module name */
2925 /* Finished calling a hook chain */
2926 @REQ(finish_hook_chain)
2927 int id; /* id of the hook */
2931 /* Get the hook information */
2933 user_handle_t handle; /* handle to the current hook */
2934 int get_next; /* do we want info about current or next hook? */
2935 int event; /* signalled event */
2936 user_handle_t window; /* handle to the event window */
2937 int object_id; /* object id for out of context winevent */
2938 int child_id; /* child id for out of context winevent */
2940 user_handle_t handle; /* handle to the hook */
2941 int id; /* id of the hook */
2942 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2943 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2944 client_ptr_t proc; /* hook procedure */
2945 int unicode; /* is it a unicode hook? */
2946 VARARG(module,unicode_str); /* module name */
2950 /* Create a window class */
2952 int local; /* is it a local class? */
2953 atom_t atom; /* class atom */
2954 unsigned int style; /* class style */
2955 mod_handle_t instance; /* module instance */
2956 int extra; /* number of extra class bytes */
2957 int win_extra; /* number of window extra bytes */
2958 client_ptr_t client_ptr; /* pointer to class in client address space */
2959 data_size_t name_offset; /* base class name offset for specified atom */
2960 VARARG(name,unicode_str); /* class name */
2962 atom_t atom; /* resulting class atom */
2966 /* Destroy a window class */
2968 atom_t atom; /* class atom */
2969 mod_handle_t instance; /* module instance */
2970 VARARG(name,unicode_str); /* class name */
2972 client_ptr_t client_ptr; /* pointer to class in client address space */
2976 /* Set some information in a class */
2977 @REQ(set_class_info)
2978 user_handle_t window; /* handle to the window */
2979 unsigned int flags; /* flags for info to set (see below) */
2980 atom_t atom; /* class atom */
2981 unsigned int style; /* class style */
2982 int win_extra; /* number of window extra bytes */
2983 mod_handle_t instance; /* module instance */
2984 int extra_offset; /* offset to set in extra bytes */
2985 data_size_t extra_size; /* size to set in extra bytes */
2986 lparam_t extra_value; /* value to set in extra bytes */
2988 atom_t old_atom; /* previous class atom */
2989 atom_t base_atom; /* base class atom */
2990 mod_handle_t old_instance; /* previous module instance */
2991 lparam_t old_extra_value; /* old value in extra bytes */
2992 unsigned int old_style; /* previous class style */
2993 int old_extra; /* previous number of class extra bytes */
2994 int old_win_extra; /* previous number of window extra bytes */
2996 #define SET_CLASS_ATOM 0x0001
2997 #define SET_CLASS_STYLE 0x0002
2998 #define SET_CLASS_WINEXTRA 0x0004
2999 #define SET_CLASS_INSTANCE 0x0008
3000 #define SET_CLASS_EXTRA 0x0010
3003 /* Open the clipboard */
3004 @REQ(open_clipboard)
3005 user_handle_t window; /* clipboard window */
3007 user_handle_t owner; /* current clipboard owner */
3011 /* Close the clipboard */
3012 @REQ(close_clipboard)
3014 user_handle_t viewer; /* first clipboard viewer */
3015 user_handle_t owner; /* current clipboard owner */
3019 /* Empty the clipboard and grab ownership */
3020 @REQ(empty_clipboard)
3024 /* Add a data format to the clipboard */
3025 @REQ(set_clipboard_data)
3026 unsigned int format; /* clipboard format of the data */
3027 unsigned int lcid; /* locale id to use for synthesizing text formats */
3028 VARARG(data,bytes); /* data contents */
3030 unsigned int seqno; /* sequence number for the set data */
3034 /* Fetch a data format from the clipboard */
3035 @REQ(get_clipboard_data)
3036 unsigned int format; /* clipboard format of the data */
3037 int render; /* will we try to render it if missing? */
3038 int cached; /* do we already have it in the client-side cache? */
3039 unsigned int seqno; /* sequence number for the data in the cache */
3041 unsigned int from; /* for synthesized data, format to generate it from */
3042 user_handle_t owner; /* clipboard owner for delayed-rendered formats */
3043 unsigned int seqno; /* sequence number for the originally set data */
3044 data_size_t total; /* total data size */
3045 VARARG(data,bytes); /* data contents */
3049 /* Retrieve a list of available formats */
3050 @REQ(get_clipboard_formats)
3051 unsigned int format; /* specific format to query, return all if 0 */
3053 unsigned int count; /* count of available formats */
3054 VARARG(formats,uints); /* array of available formats */
3058 /* Retrieve the next available format */
3059 @REQ(enum_clipboard_formats)
3060 unsigned int previous; /* previous format, or first if 0 */
3062 unsigned int format; /* next format */
3066 /* Release ownership of the clipboard */
3067 @REQ(release_clipboard)
3068 user_handle_t owner; /* clipboard owner to release */
3070 user_handle_t viewer; /* first clipboard viewer */
3071 user_handle_t owner; /* current clipboard owner */
3075 /* Get clipboard information */
3076 @REQ(get_clipboard_info)
3078 user_handle_t window; /* clipboard window */
3079 user_handle_t owner; /* clipboard owner */
3080 user_handle_t viewer; /* clipboard viewer */
3081 unsigned int seqno; /* current sequence number */
3085 /* Set the clipboard viewer window */
3086 @REQ(set_clipboard_viewer)
3087 user_handle_t viewer; /* clipboard viewer */
3088 user_handle_t previous; /* if non-zero, check that this was the previous viewer */
3090 user_handle_t old_viewer; /* previous clipboard viewer */
3091 user_handle_t owner; /* clipboard owner */
3095 /* Add a clipboard listener window */
3096 @REQ(add_clipboard_listener)
3097 user_handle_t window; /* clipboard listener window */
3101 /* Remove a clipboard listener window */
3102 @REQ(remove_clipboard_listener)
3103 user_handle_t window; /* clipboard listener window */
3107 /* Open a security token */
3109 obj_handle_t handle; /* handle to the thread or process */
3110 unsigned int access; /* access rights to the new token */
3111 unsigned int attributes;/* object attributes */
3112 unsigned int flags; /* flags (see below) */
3114 obj_handle_t token; /* handle to the token */
3116 #define OPEN_TOKEN_THREAD 1
3117 #define OPEN_TOKEN_AS_SELF 2
3120 /* Set/get the global windows */
3121 @REQ(set_global_windows)
3122 unsigned int flags; /* flags for fields to set (see below) */
3123 user_handle_t shell_window; /* handle to the new shell window */
3124 user_handle_t shell_listview; /* handle to the new shell listview window */
3125 user_handle_t progman_window; /* handle to the new program manager window */
3126 user_handle_t taskman_window; /* handle to the new task manager window */
3128 user_handle_t old_shell_window; /* handle to the shell window */
3129 user_handle_t old_shell_listview; /* handle to the shell listview window */
3130 user_handle_t old_progman_window; /* handle to the new program manager window */
3131 user_handle_t old_taskman_window; /* handle to the new task manager window */
3133 #define SET_GLOBAL_SHELL_WINDOWS 0x01 /* set both main shell and listview windows */
3134 #define SET_GLOBAL_PROGMAN_WINDOW 0x02
3135 #define SET_GLOBAL_TASKMAN_WINDOW 0x04
3137 /* Adjust the privileges held by a token */
3138 @REQ(adjust_token_privileges)
3139 obj_handle_t handle; /* handle to the token */
3140 int disable_all; /* disable all privileges? */
3141 int get_modified_state; /* get modified privileges? */
3142 VARARG(privileges,luid_attr); /* privileges to enable/disable/remove */
3144 unsigned int len; /* total length in bytes required to store token privileges */
3145 VARARG(privileges,luid_attr); /* modified privileges */
3148 /* Retrieves the set of privileges held by or available to a token */
3149 @REQ(get_token_privileges)
3150 obj_handle_t handle; /* handle to the token */
3152 unsigned int len; /* total length in bytes required to store token privileges */
3153 VARARG(privileges,luid_attr); /* privileges held by or available to a token */
3156 /* Check the token has the required privileges */
3157 @REQ(check_token_privileges)
3158 obj_handle_t handle; /* handle to the token */
3159 int all_required; /* are all the privileges required for the check to succeed? */
3160 VARARG(privileges,luid_attr); /* privileges to check */
3162 int has_privileges; /* does the token have the required privileges? */
3163 VARARG(privileges,luid_attr); /* privileges held by or available to a token */
3166 @REQ(duplicate_token)
3167 obj_handle_t handle; /* handle to the token to duplicate */
3168 unsigned int access; /* access rights to the new token */
3169 int primary; /* is the new token to be a primary one? */
3170 int impersonation_level; /* impersonation level of the new token */
3171 VARARG(objattr,object_attributes); /* object attributes */
3173 obj_handle_t new_handle; /* duplicated handle */
3177 obj_handle_t handle; /* handle to the token to duplicate */
3178 unsigned int flags; /* flags */
3179 data_size_t privileges_size; /* size of privileges */
3180 VARARG(privileges,luid_attr,privileges_size); /* privileges to remove from new token */
3181 VARARG(disable_sids,sid); /* array of groups to remove from new token */
3183 obj_handle_t new_handle; /* filtered handle */
3187 obj_handle_t handle; /* handle to the token */
3188 unsigned int desired_access; /* desired access to the object */
3189 generic_map_t mapping; /* mapping to specific rights */
3190 VARARG(sd,security_descriptor); /* security descriptor to check */
3192 unsigned int access_granted; /* access rights actually granted */
3193 unsigned int access_status; /* was access granted? */
3194 unsigned int privileges_len; /* length needed to store privileges */
3195 VARARG(privileges,luid_attr); /* privileges used during access check */
3199 obj_handle_t handle; /* handle to the token */
3200 unsigned int which_sid; /* which SID to retrieve from the token */
3202 data_size_t sid_len; /* length needed to store sid */
3203 VARARG(sid,sid); /* the sid specified by which_sid from the token */
3206 @REQ(get_token_groups)
3207 obj_handle_t handle; /* handle to the token */
3208 unsigned int attr_mask; /* mask for wanted attributes */
3210 data_size_t attr_len; /* length needed to store attrs */
3211 data_size_t sid_len; /* length needed to store sids */
3212 VARARG(attrs,uints,attr_len); /* group attributes */
3213 VARARG(sids,sids); /* group sids */
3216 @REQ(get_token_default_dacl)
3217 obj_handle_t handle; /* handle to the token */
3219 data_size_t acl_len; /* length needed to store access control list */
3220 VARARG(acl,acl); /* access control list */
3223 @REQ(set_token_default_dacl)
3224 obj_handle_t handle; /* handle to the token */
3225 VARARG(acl,acl); /* default dacl to set */
3228 @REQ(set_security_object)
3229 obj_handle_t handle; /* handle to the object */
3230 unsigned int security_info; /* which parts of security descriptor to set */
3231 VARARG(sd,security_descriptor); /* security descriptor to set */
3234 @REQ(get_security_object)
3235 obj_handle_t handle; /* handle to the object */
3236 unsigned int security_info; /* which parts of security descriptor to get */
3238 unsigned int sd_len; /* buffer size needed for sd */
3239 VARARG(sd,security_descriptor); /* retrieved security descriptor */
3246 obj_handle_t handle;
3247 unsigned int access;
3248 unsigned int attributes;
3252 /* Return a list of all opened handles */
3253 @REQ(get_system_handles)
3255 unsigned int count; /* number of handles */
3256 VARARG(data,handle_infos); /* array of handle_infos */
3260 /* Create a mailslot */
3261 @REQ(create_mailslot)
3262 unsigned int access; /* wanted access rights */
3263 timeout_t read_timeout;
3264 unsigned int max_msgsize;
3265 VARARG(objattr,object_attributes); /* object attributes */
3267 obj_handle_t handle; /* handle to the mailslot */
3271 /* Set mailslot information */
3272 @REQ(set_mailslot_info)
3273 obj_handle_t handle; /* handle to the mailslot */
3274 timeout_t read_timeout;
3277 timeout_t read_timeout;
3278 unsigned int max_msgsize;
3280 #define MAILSLOT_SET_READ_TIMEOUT 1
3283 /* Create a directory object */
3284 @REQ(create_directory)
3285 unsigned int access; /* access flags */
3286 VARARG(objattr,object_attributes); /* object attributes */
3288 obj_handle_t handle; /* handle to the directory */
3292 /* Open a directory object */
3293 @REQ(open_directory)
3294 unsigned int access; /* access flags */
3295 unsigned int attributes; /* object attributes */
3296 obj_handle_t rootdir; /* root directory */
3297 VARARG(directory_name,unicode_str); /* Directory name */
3299 obj_handle_t handle; /* handle to the directory */
3303 /* Get a directory entry by index */
3304 @REQ(get_directory_entry)
3305 obj_handle_t handle; /* handle to the directory */
3306 unsigned int index; /* entry index */
3308 data_size_t total_len; /* total length needed for strings */
3309 data_size_t name_len; /* length of the entry name in bytes */
3310 VARARG(name,unicode_str,name_len); /* entry name */
3311 VARARG(type,unicode_str); /* entry type */
3315 /* Create a symbolic link object */
3316 @REQ(create_symlink)
3317 unsigned int access; /* access flags */
3318 VARARG(objattr,object_attributes); /* object attributes */
3319 VARARG(target_name,unicode_str); /* target name */
3321 obj_handle_t handle; /* handle to the symlink */
3325 /* Open a symbolic link object */
3327 unsigned int access; /* access flags */
3328 unsigned int attributes; /* object attributes */
3329 obj_handle_t rootdir; /* root directory */
3330 VARARG(name,unicode_str); /* symlink name */
3332 obj_handle_t handle; /* handle to the symlink */
3336 /* Query a symbolic link object */
3338 obj_handle_t handle; /* handle to the symlink */
3340 data_size_t total; /* total needed size for name */
3341 VARARG(target_name,unicode_str); /* target name */
3345 /* Query basic object information */
3346 @REQ(get_object_info)
3347 obj_handle_t handle; /* handle to the object */
3349 unsigned int access; /* granted access mask */
3350 unsigned int ref_count; /* object ref count */
3351 unsigned int handle_count; /* object handle count */
3355 /* Query the full name of an object */
3356 @REQ(get_object_name)
3357 obj_handle_t handle; /* handle to the object */
3359 data_size_t total; /* total needed size for name */
3360 VARARG(name,unicode_str); /* object name */
3364 /* Query object type name information */
3365 @REQ(get_object_type)
3366 obj_handle_t handle; /* handle to the object */
3368 VARARG(info,object_type_info); /* type information */
3372 /* Query type information for all types */
3373 @REQ(get_object_types)
3375 int count; /* total count of object types */
3376 VARARG(info,object_types_info); /* type information */
3380 /* Allocate a locally-unique identifier */
3381 @REQ(allocate_locally_unique_id)
3387 /* Create a device manager */
3388 @REQ(create_device_manager)
3389 unsigned int access; /* wanted access rights */
3390 unsigned int attributes; /* object attributes */
3392 obj_handle_t handle; /* handle to the device */
3396 /* Create a device */
3398 obj_handle_t rootdir; /* root directory */
3399 client_ptr_t user_ptr; /* opaque ptr for use by client */
3400 obj_handle_t manager; /* device manager */
3401 VARARG(name,unicode_str); /* object name */
3405 /* Delete a device */
3407 obj_handle_t manager; /* handle to the device manager */
3408 client_ptr_t device; /* pointer to the device */
3412 /* Retrieve the next pending device irp request */
3413 @REQ(get_next_device_request)
3414 obj_handle_t manager; /* handle to the device manager */
3415 obj_handle_t prev; /* handle to the previous irp */
3416 unsigned int status; /* status of the previous irp */
3417 client_ptr_t user_ptr; /* user pointer of the previous irp */
3418 int pending; /* was the previous irp marked pending? */
3419 unsigned int iosb_status; /* IOSB status of the previous irp */
3420 data_size_t result; /* IOSB result of the previous irp */
3421 VARARG(data,bytes); /* output data of the previous irp */
3423 irp_params_t params; /* irp parameters */
3424 obj_handle_t next; /* handle to the next irp */
3425 thread_id_t client_tid; /* tid of thread calling irp */
3426 client_ptr_t client_thread; /* pointer to thread object of calling irp */
3427 data_size_t in_size; /* total needed input size */
3428 VARARG(next_data,bytes); /* input data of the next irp */
3432 /* Get kernel pointer from server object */
3433 @REQ(get_kernel_object_ptr)
3434 obj_handle_t manager; /* handle to the device manager */
3435 obj_handle_t handle; /* object handle */
3437 client_ptr_t user_ptr; /* kernel object pointer */
3441 /* Associate kernel pointer with server object */
3442 @REQ(set_kernel_object_ptr)
3443 obj_handle_t manager; /* handle to the device manager */
3444 obj_handle_t handle; /* object handle */
3445 client_ptr_t user_ptr; /* kernel object pointer */
3449 /* Grab server object reference from kernel object pointer */
3450 @REQ(grab_kernel_object)
3451 obj_handle_t manager; /* handle to the device manager */
3452 client_ptr_t user_ptr; /* kernel object pointer */
3456 /* Release server object reference from kernel object pointer */
3457 @REQ(release_kernel_object)
3458 obj_handle_t manager; /* handle to the device manager */
3459 client_ptr_t user_ptr; /* kernel object pointer */
3463 /* Get handle from kernel object pointer */
3464 @REQ(get_kernel_object_handle)
3465 obj_handle_t manager; /* handle to the device manager */
3466 client_ptr_t user_ptr; /* kernel object pointer */
3467 unsigned int access; /* wanted access rights */
3469 obj_handle_t handle; /* kernel object handle */
3473 /* Make the current process a system process */
3474 @REQ(make_process_system)
3475 obj_handle_t handle; /* handle to the process */
3477 obj_handle_t event; /* event signaled when all user processes have exited */
3481 /* Get detailed fixed-size information about a token */
3482 @REQ(get_token_info)
3483 obj_handle_t handle; /* handle to the object */
3485 struct luid token_id; /* locally-unique identifier of the token */
3486 struct luid modified_id; /* locally-unique identifier of the modified version of the token */
3487 unsigned int session_id; /* token session id */
3488 int primary; /* is the token primary or impersonation? */
3489 int impersonation_level; /* level of impersonation */
3490 int elevation; /* elevation type */
3491 int group_count; /* the number of groups the token is a member of */
3492 int privilege_count; /* the number of privileges the token has */
3496 /* Create a token which is an elevation counterpart to this token */
3497 @REQ(create_linked_token)
3498 obj_handle_t handle; /* handle to the token */
3500 obj_handle_t linked; /* handle to the linked token */
3504 /* Create I/O completion port */
3505 @REQ(create_completion)
3506 unsigned int access; /* desired access to a port */
3507 unsigned int concurrent; /* max number of concurrent active threads */
3508 VARARG(objattr,object_attributes); /* object attributes */
3510 obj_handle_t handle; /* port handle */
3514 /* Open I/O completion port */
3515 @REQ(open_completion)
3516 unsigned int access; /* desired access to a port */
3517 unsigned int attributes; /* object attributes */
3518 obj_handle_t rootdir; /* root directory */
3519 VARARG(filename,unicode_str); /* port name */
3521 obj_handle_t handle; /* port handle */
3525 /* add completion to completion port */
3526 @REQ(add_completion)
3527 obj_handle_t handle; /* port handle */
3528 apc_param_t ckey; /* completion key */
3529 apc_param_t cvalue; /* completion value */
3530 apc_param_t information; /* IO_STATUS_BLOCK Information */
3531 unsigned int status; /* completion result */
3535 /* get completion from completion port queue */
3536 @REQ(remove_completion)
3537 obj_handle_t handle; /* port handle */
3539 apc_param_t ckey; /* completion key */
3540 apc_param_t cvalue; /* completion value */
3541 apc_param_t information; /* IO_STATUS_BLOCK Information */
3542 unsigned int status; /* completion result */
3546 /* get completion queue depth */
3547 @REQ(query_completion)
3548 obj_handle_t handle; /* port handle */
3550 unsigned int depth; /* completion queue depth */
3554 /* associate object with completion port */
3555 @REQ(set_completion_info)
3556 obj_handle_t handle; /* object handle */
3557 apc_param_t ckey; /* completion key */
3558 obj_handle_t chandle; /* port handle */
3562 /* check for associated completion and push msg */
3563 @REQ(add_fd_completion)
3564 obj_handle_t handle; /* async' object
*/
3565 apc_param_t cvalue
; /* completion value
*/
3566 apc_param_t information
; /* IO_STATUS_BLOCK Information
*/
3567 unsigned int status
; /* completion status
*/
3568 int async
; /* completion is an async result
*/
3572 /* set fd completion information
*/
3573 @
REQ(set_fd_completion_mode
)
3574 obj_handle_t handle
; /* handle to a file or directory
*/
3575 unsigned int flags
; /* completion notification flags
*/
3579 /* set fd disposition information
*/
3580 @
REQ(set_fd_disp_info
)
3581 obj_handle_t handle
; /* handle to a file or directory
*/
3582 int unlink
; /* whether to unlink file on close
*/
3586 /* set fd name information
*/
3587 @
REQ(set_fd_name_info
)
3588 obj_handle_t handle
; /* handle to a file or directory
*/
3589 obj_handle_t rootdir
; /* root directory
*/
3590 data_size_t namelen
; /* length of NT name in bytes
*/
3591 int link
; /* link instead of renaming
*/
3592 int replace
; /* replace an existing file?
*/
3593 VARARG(name
,unicode_str
,namelen
); /* NT name
*/
3594 VARARG(filename
,string
); /* new file name
*/
3598 /* set fd eof information
*/
3599 @
REQ(set_fd_eof_info
)
3600 obj_handle_t handle
; /* handle to a file or directory
*/
3601 file_pos_t eof
; /* offset of eof of file
*/
3605 /* Retrieve layered info for a window
*/
3606 @
REQ(get_window_layered_info
)
3607 user_handle_t handle
; /* handle to the window
*/
3609 unsigned int color_key
; /* color key
*/
3610 unsigned int alpha
; /* alpha (0.
.255) */
3611 unsigned int flags
; /* LWA_
* flags
*/
3615 /* Set layered info for a window
*/
3616 @
REQ(set_window_layered_info
)
3617 user_handle_t handle
; /* handle to the window
*/
3618 unsigned int color_key
; /* color key
*/
3619 unsigned int alpha
; /* alpha (0.
.255) */
3620 unsigned int flags
; /* LWA_
* flags
*/
3624 /* Allocate an arbitrary user handle
*/
3625 @
REQ(alloc_user_handle
)
3627 user_handle_t handle
; /* allocated handle
*/
3631 /* Free an arbitrary user handle
*/
3632 @
REQ(free_user_handle
)
3633 user_handle_t handle
; /* handle to free
*/
3637 /* Set
/get the current cursor
*/
3639 unsigned int flags
; /* flags for fields to
set (see below
) */
3640 user_handle_t handle
; /* handle to the cursor
*/
3641 int show_count
; /* show count increment
/decrement
*/
3642 int x
; /* cursor position
*/
3644 rectangle_t clip
; /* cursor clip rectangle
*/
3645 unsigned int clip_msg
; /* message to post on cursor clip changes
*/
3647 user_handle_t prev_handle
; /* previous handle
*/
3648 int prev_count
; /* previous show count
*/
3649 int prev_x
; /* previous position
*/
3651 int new_x
; /* new position
*/
3653 rectangle_t new_clip
; /* new clip rectangle
*/
3654 unsigned int last_change
; /* time of last position change
*/
3656 #define SET_CURSOR_HANDLE
0x01
3657 #define SET_CURSOR_COUNT
0x02
3658 #define SET_CURSOR_POS
0x04
3659 #define SET_CURSOR_CLIP
0x08
3660 #define SET_CURSOR_NOCLIP
0x10
3662 /* Get the history of the
64 last cursor positions
*/
3663 @
REQ(get_cursor_history
)
3665 VARARG(history
,cursor_positions
);
3669 /* Batch read rawinput message data
*/
3670 @
REQ(get_rawinput_buffer
)
3671 data_size_t rawinput_size
; /* size of RAWINPUT structure
*/
3672 data_size_t buffer_size
; /* size of output buffer
*/
3674 data_size_t next_size
; /* minimum size to get next message data
*/
3679 /* Modify the list of registered rawinput devices
*/
3680 @
REQ(update_rawinput_devices
)
3681 VARARG(devices
,rawinput_devices
);
3684 /* Create a new job object
*/
3686 unsigned int access
; /* wanted access rights
*/
3687 VARARG(objattr
,object_attributes
); /* object attributes
*/
3689 obj_handle_t handle
; /* handle to the job
*/
3693 /* Open a job object
*/
3695 unsigned int access
; /* wanted access rights
*/
3696 unsigned int attributes
; /* object attributes
*/
3697 obj_handle_t rootdir
; /* root directory
*/
3698 VARARG(name
,unicode_str
); /* object name
*/
3700 obj_handle_t handle
; /* handle to the job
*/
3704 /* Assign a job object to a process
*/
3706 obj_handle_t job
; /* handle to the job
*/
3707 obj_handle_t process
; /* handle to the process
*/
3711 /* Check if a process is associated with a job
*/
3712 @
REQ(process_in_job
)
3713 obj_handle_t job
; /* handle to the job
*/
3714 obj_handle_t process
; /* handle to the process
*/
3718 /* Set limit flags on a job
*/
3719 @
REQ(set_job_limits
)
3720 obj_handle_t handle
; /* handle to the job
*/
3721 unsigned int limit_flags
; /* new limit flags
*/
3725 /* Set new completion port for a job
*/
3726 @
REQ(set_job_completion_port
)
3727 obj_handle_t job
; /* handle to the job
*/
3728 obj_handle_t port
; /* handle to the completion port
*/
3729 client_ptr_t key
; /* key to send with completion messages
*/
3733 /* Retrieve information about a job
*/
3735 obj_handle_t handle
; /* handle to the job
*/
3737 int total_processes
; /* total count of processes
*/
3738 int active_processes
; /* count of running processes
*/
3739 VARARG(pids
,uints
); /* list of active pids
*/
3743 /* Terminate all processes associated with the job
*/
3745 obj_handle_t handle
; /* handle to the job
*/
3746 int status
; /* process exit code
*/
3750 /* Suspend a process
*/
3751 @
REQ(suspend_process
)
3752 obj_handle_t handle
; /* process handle
*/
3756 /* Resume a process
*/
3757 @
REQ(resume_process
)
3758 obj_handle_t handle
; /* process handle
*/
3762 /* Iterate thread list for process
*/
3763 @
REQ(get_next_thread
)
3764 obj_handle_t process
; /* process handle
*/
3765 obj_handle_t last
; /* thread handle to start with
*/
3766 unsigned int access
; /* desired access for returned handle
*/
3767 unsigned int attributes
; /* returned handle attributes
*/
3768 unsigned int flags
; /* controls iteration direction
*/
3770 obj_handle_t handle
; /* next thread handle
*/