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 #define MAX_ACL_LEN
65535
399 struct security_descriptor
401 unsigned int control
; /* SE_ flags
*/
402 data_size_t owner_len
;
403 data_size_t group_len
;
404 data_size_t sacl_len
;
405 data_size_t dacl_len
;
406 /* VARARG(owner
,SID
); */
407 /* VARARG(group
,SID
); */
408 /* VARARG(sacl
,ACL
); */
409 /* VARARG(dacl
,ACL
); */
412 struct object_attributes
414 obj_handle_t rootdir
; /* root directory
*/
415 unsigned int attributes
; /* object attributes
*/
416 data_size_t sd_len
; /* length of security_descriptor data. may be
0 */
417 data_size_t name_len
; /* length of the name string. may be
0 */
418 /* VARARG(sd
,security_descriptor
); */
419 /* VARARG(name
,unicode_str
); */
422 struct object_type_info
424 data_size_t name_len
; /* length of the name string
*/
425 unsigned int index
; /* type index in global table
*/
426 unsigned int obj_count
; /* count of objects of this type
*/
427 unsigned int handle_count
; /* count of handles of this type
*/
428 unsigned int obj_max
; /* max count of objects of this type
*/
429 unsigned int handle_max
; /* max count of handles of this type
*/
430 unsigned int valid_access
; /* mask for valid access bits
*/
431 generic_map_t mapping
; /* generic access mappings
*/
432 /* VARARG(name
,unicode_str
); */
438 /* unsigned int attributes
[count
]; */
439 /* VARARG(sids
,SID
); */
447 SELECT_SIGNAL_AND_WAIT
,
448 SELECT_KEYED_EVENT_WAIT
,
449 SELECT_KEYED_EVENT_RELEASE
457 enum select_op op
; /* SELECT_WAIT or SELECT_WAIT_ALL
*/
458 obj_handle_t handles
[MAXIMUM_WAIT_OBJECTS
];
462 enum select_op op
; /* SELECT_SIGNAL_AND_WAIT
*/
464 obj_handle_t signal
; /* must be last in the structure so we can remove it on retries
*/
468 enum select_op op
; /* SELECT_KEYED_EVENT_WAIT or SELECT_KEYED_EVENT_RELEASE
*/
495 enum apc_type type
; /* APC_USER
*/
497 client_ptr_t func
; /* void (__stdcall
*func
)(ULONG_PTR
,ULONG_PTR
,ULONG_PTR
); */
498 apc_param_t args
[3]; /* arguments for user function
*/
507 enum apc_type type
; /* APC_ASYNC_IO
*/
508 unsigned int status
; /* I
/O status
*/
509 client_ptr_t user
; /* user pointer
*/
510 client_ptr_t sb
; /* status block
*/
514 enum apc_type type
; /* APC_VIRTUAL_ALLOC
*/
515 unsigned int op_type
; /* type of operation
*/
516 client_ptr_t addr
; /* requested address
*/
517 mem_size_t size
; /* allocation size
*/
518 mem_size_t zero_bits
; /* number of zero high bits
*/
519 unsigned int prot
; /* memory protection flags
*/
523 enum apc_type type
; /* APC_VIRTUAL_FREE
*/
524 unsigned int op_type
; /* type of operation
*/
525 client_ptr_t addr
; /* requested address
*/
526 mem_size_t size
; /* allocation size
*/
530 enum apc_type type
; /* APC_VIRTUAL_QUERY
*/
532 client_ptr_t addr
; /* requested address
*/
536 enum apc_type type
; /* APC_VIRTUAL_PROTECT
*/
537 unsigned int prot
; /* new protection flags
*/
538 client_ptr_t addr
; /* requested address
*/
539 mem_size_t size
; /* requested size
*/
543 enum apc_type type
; /* APC_VIRTUAL_FLUSH
*/
545 client_ptr_t addr
; /* requested address
*/
546 mem_size_t size
; /* requested size
*/
550 enum apc_type type
; /* APC_VIRTUAL_LOCK
*/
552 client_ptr_t addr
; /* requested address
*/
553 mem_size_t size
; /* requested size
*/
557 enum apc_type type
; /* APC_VIRTUAL_UNLOCK
*/
559 client_ptr_t addr
; /* requested address
*/
560 mem_size_t size
; /* requested size
*/
564 enum apc_type type
; /* APC_MAP_VIEW
*/
565 obj_handle_t handle
; /* mapping handle
*/
566 client_ptr_t addr
; /* requested address
*/
567 mem_size_t size
; /* allocation size
*/
568 file_pos_t offset
; /* file offset
*/
569 mem_size_t zero_bits
; /* number of zero high bits
*/
570 unsigned int alloc_type
; /* allocation type
*/
571 unsigned int prot
; /* memory protection flags
*/
575 enum apc_type type
; /* APC_UNMAP_VIEW
*/
577 client_ptr_t addr
; /* view address
*/
581 enum apc_type type
; /* APC_CREATE_THREAD
*/
582 unsigned int flags
; /* creation flags
*/
583 client_ptr_t func
; /* void (__stdcall
*func
)(void*)
; start function
*/
584 client_ptr_t arg
; /* argument for start function
*/
585 mem_size_t zero_bits
; /* number of zero high bits for thread stack
*/
586 mem_size_t reserve
; /* reserve size for thread stack
*/
587 mem_size_t commit
; /* commit size for thread stack
*/
591 enum apc_type type
; /* APC_DUP_HANDLE
*/
592 obj_handle_t src_handle
; /* src handle to duplicate
*/
593 obj_handle_t dst_process
; /* dst process handle
*/
594 unsigned int access
; /* wanted access rights
*/
595 unsigned int attributes
; /* object attributes
*/
596 unsigned int options
; /* duplicate options
*/
605 enum apc_type type
; /* APC_ASYNC_IO
*/
606 unsigned int status
; /* new status of async operation
*/
607 unsigned int total
; /* bytes transferred
*/
611 enum apc_type type
; /* APC_VIRTUAL_ALLOC
*/
612 unsigned int status
; /* status returned by call
*/
613 client_ptr_t addr
; /* resulting address
*/
614 mem_size_t size
; /* resulting size
*/
618 enum apc_type type
; /* APC_VIRTUAL_FREE
*/
619 unsigned int status
; /* status returned by call
*/
620 client_ptr_t addr
; /* resulting address
*/
621 mem_size_t size
; /* resulting size
*/
625 enum apc_type type
; /* APC_VIRTUAL_QUERY
*/
626 unsigned int status
; /* status returned by call
*/
627 client_ptr_t base
; /* resulting base address
*/
628 client_ptr_t alloc_base
;/* resulting allocation base
*/
629 mem_size_t size
; /* resulting region size
*/
630 unsigned short state
; /* resulting region state
*/
631 unsigned short prot
; /* resulting region protection
*/
632 unsigned short alloc_prot
;/* resulting allocation protection
*/
633 unsigned short alloc_type
;/* resulting region allocation type
*/
637 enum apc_type type
; /* APC_VIRTUAL_PROTECT
*/
638 unsigned int status
; /* status returned by call
*/
639 client_ptr_t addr
; /* resulting address
*/
640 mem_size_t size
; /* resulting size
*/
641 unsigned int prot
; /* old protection flags
*/
645 enum apc_type type
; /* APC_VIRTUAL_FLUSH
*/
646 unsigned int status
; /* status returned by call
*/
647 client_ptr_t addr
; /* resulting address
*/
648 mem_size_t size
; /* resulting size
*/
652 enum apc_type type
; /* APC_VIRTUAL_LOCK
*/
653 unsigned int status
; /* status returned by call
*/
654 client_ptr_t addr
; /* resulting address
*/
655 mem_size_t size
; /* resulting size
*/
659 enum apc_type type
; /* APC_VIRTUAL_UNLOCK
*/
660 unsigned int status
; /* status returned by call
*/
661 client_ptr_t addr
; /* resulting address
*/
662 mem_size_t size
; /* resulting size
*/
666 enum apc_type type
; /* APC_MAP_VIEW
*/
667 unsigned int status
; /* status returned by call
*/
668 client_ptr_t addr
; /* resulting address
*/
669 mem_size_t size
; /* resulting size
*/
673 enum apc_type type
; /* APC_UNMAP_VIEW
*/
674 unsigned int status
; /* status returned by call
*/
678 enum apc_type type
; /* APC_CREATE_THREAD
*/
679 unsigned int status
; /* status returned by call
*/
680 process_id_t pid
; /* process id
*/
681 thread_id_t tid
; /* thread id
*/
682 client_ptr_t teb
; /* thread
teb (in process address space
) */
683 obj_handle_t handle
; /* handle to new thread
*/
687 enum apc_type type
; /* APC_DUP_HANDLE
*/
688 unsigned int status
; /* status returned by call
*/
689 obj_handle_t handle
; /* duplicated handle in dst process
*/
693 enum apc_type type
; /* APC_BREAK_PROCESS
*/
694 unsigned int status
; /* status returned by call
*/
714 enum irp_type type
; /* irp call type
*/
717 enum irp_type type
; /* IRP_CALL_CREATE
*/
718 unsigned int access
; /* access rights
*/
719 unsigned int sharing
; /* sharing flags
*/
720 unsigned int options
; /* file options
*/
721 client_ptr_t device
; /* opaque ptr for the device
*/
722 obj_handle_t file
; /* file handle
*/
726 enum irp_type type
; /* IRP_CALL_CLOSE
*/
728 client_ptr_t file
; /* opaque ptr for the file object
*/
732 enum irp_type type
; /* IRP_CALL_READ
*/
733 unsigned int key
; /* driver key
*/
734 data_size_t out_size
; /* needed output size
*/
736 client_ptr_t file
; /* opaque ptr for the file object
*/
737 file_pos_t pos
; /* file position
*/
741 enum irp_type type
; /* IRP_CALL_WRITE
*/
742 unsigned int key
; /* driver key
*/
743 client_ptr_t file
; /* opaque ptr for the file object
*/
744 file_pos_t pos
; /* file position
*/
748 enum irp_type type
; /* IRP_CALL_FLUSH
*/
750 client_ptr_t file
; /* opaque ptr for the file object
*/
754 enum irp_type type
; /* IRP_CALL_IOCTL
*/
755 ioctl_code_t code
; /* ioctl code
*/
756 data_size_t out_size
; /* needed output size
*/
758 client_ptr_t file
; /* opaque ptr for the file object
*/
762 enum irp_type type
; /* IRP_CALL_VOLUME
*/
763 unsigned int info_class
;/* information class
*/
764 data_size_t out_size
; /* needed output size
*/
766 client_ptr_t file
; /* opaque ptr for the file object
*/
770 enum irp_type type
; /* IRP_CALL_FREE
*/
772 client_ptr_t obj
; /* opaque ptr for the freed object
*/
776 enum irp_type type
; /* IRP_CALL_CANCEL
*/
778 client_ptr_t irp
; /* opaque ptr for canceled irp
*/
782 /* information about a PE image mapping
, roughly equivalent to SECTION_IMAGE_INFORMATION
*/
786 client_ptr_t entry_point
;
788 mem_size_t stack_size
;
789 mem_size_t stack_commit
;
790 unsigned int zerobits
;
791 unsigned int subsystem
;
792 unsigned short subsystem_minor
;
793 unsigned short subsystem_major
;
794 unsigned short osversion_major
;
795 unsigned short osversion_minor
;
796 unsigned short image_charact
;
797 unsigned short dll_charact
;
798 unsigned short machine
;
799 unsigned char contains_code
;
800 unsigned char image_flags
;
801 unsigned int loader_flags
;
802 unsigned int header_size
;
803 unsigned int file_size
;
804 unsigned int checksum
;
805 unsigned int dbg_offset
;
806 unsigned int dbg_size
;
808 #define IMAGE_FLAGS_ComPlusNativeReady
0x01
809 #define IMAGE_FLAGS_ComPlusILOnly
0x02
810 #define IMAGE_FLAGS_ImageDynamicallyRelocated
0x04
811 #define IMAGE_FLAGS_ImageMappedFlat
0x08
812 #define IMAGE_FLAGS_BaseBelow4gb
0x10
813 #define IMAGE_FLAGS_ComPlusPrefer32bit
0x20
814 #define IMAGE_FLAGS_WineBuiltin
0x40
815 #define IMAGE_FLAGS_WineFakeDll
0x80
817 struct rawinput_device
819 unsigned short usage_page
;
820 unsigned short usage
;
822 user_handle_t target
;
834 /****************************************************************/
835 /* Request declarations
*/
837 /* Create a new process from the context of the parent
*/
839 obj_handle_t token
; /* process token
*/
840 obj_handle_t debug
; /* process debug object
*/
841 obj_handle_t parent_process
; /* parent process
*/
842 unsigned int flags
; /* process creation flags
*/
843 int socket_fd
; /* file descriptor for process socket
*/
844 unsigned int access
; /* access rights for process object
*/
845 unsigned short machine
; /* architecture that the new process will use
*/
846 data_size_t info_size
; /* size of startup info
*/
847 data_size_t handles_size
; /* length of explicit handles list
*/
848 data_size_t jobs_size
; /* length of jobs list
*/
849 VARARG(objattr
,object_attributes
); /* object attributes
*/
850 VARARG(handles
,uints
,handles_size
); /* handles list
*/
851 VARARG(jobs
,uints
,jobs_size
); /* jobs list
*/
852 VARARG(info
,startup_info
,info_size
); /* startup information
*/
853 VARARG(env
,unicode_str
); /* environment for new process
*/
855 obj_handle_t info
; /* new process info handle
*/
856 process_id_t pid
; /* process id
*/
857 obj_handle_t handle
; /* process
handle (in the current process
) */
861 /* Retrieve information about a newly started process
*/
862 @
REQ(get_new_process_info
)
863 obj_handle_t info
; /* info handle returned from new_process_request
*/
865 int success
; /* did the process start successfully?
*/
866 int exit_code
; /* process exit code if failed
*/
870 /* Create a new thread
*/
872 obj_handle_t process
; /* process in which to create thread
*/
873 unsigned int access
; /* wanted access rights
*/
874 int suspend
; /* new thread should be suspended on creation
*/
875 int request_fd
; /* fd for request pipe
*/
876 VARARG(objattr
,object_attributes
); /* object attributes
*/
878 thread_id_t tid
; /* thread id
*/
879 obj_handle_t handle
; /* thread
handle (in the current process
) */
883 /* Retrieve the new process startup info
*/
884 @
REQ(get_startup_info
)
886 data_size_t info_size
; /* size of startup info
*/
887 VARARG(info
,startup_info
,info_size
); /* startup information
*/
888 VARARG(env
,unicode_str
); /* environment
*/
892 /* Signal the end of the process initialization
*/
893 @
REQ(init_process_done
)
894 client_ptr_t teb
; /* TEB of new
thread (in process address space
) */
895 client_ptr_t peb
; /* PEB of new
process (in process address space
) */
896 client_ptr_t ldt_copy
; /* address of LDT
copy (in process address space
) */
898 client_ptr_t entry
; /* process entry point
*/
899 int suspend
; /* is process suspended?
*/
903 /* Initialize the first thread of a new process
*/
904 @
REQ(init_first_thread
)
905 int unix_pid
; /* Unix pid of new process
*/
906 int unix_tid
; /* Unix tid of new thread
*/
907 int debug_level
; /* new debug level
*/
908 int reply_fd
; /* fd for reply pipe
*/
909 int wait_fd
; /* fd for blocking calls pipe
*/
911 process_id_t pid
; /* process id of the new thread
's process */
912 thread_id_t tid; /* thread id of the new thread */
913 timeout_t server_start; /* server start time */
914 unsigned int session_id; /* process session id */
915 data_size_t info_size; /* total size of startup info */
916 VARARG(machines,ushorts); /* array of supported machines */
920 /* Initialize a new thread; called from the child after pthread_create() */
922 int unix_tid; /* Unix tid of new thread */
923 int reply_fd; /* fd for reply pipe */
924 int wait_fd; /* fd for blocking calls pipe */
925 client_ptr_t teb; /* TEB of new thread (in thread address space) */
926 client_ptr_t entry; /* entry point (in thread address space) */
928 int suspend; /* is thread suspended? */
932 /* Terminate a process */
933 @REQ(terminate_process)
934 obj_handle_t handle; /* process handle to terminate */
935 int exit_code; /* process exit code */
937 int self; /* suicide? */
941 /* Terminate a thread */
942 @REQ(terminate_thread)
943 obj_handle_t handle; /* thread handle to terminate */
944 int exit_code; /* thread exit code */
946 int self; /* suicide? */
950 /* Retrieve information about a process */
951 @REQ(get_process_info)
952 obj_handle_t handle; /* process handle */
954 process_id_t pid; /* server process id */
955 process_id_t ppid; /* server process id of parent */
956 affinity_t affinity; /* process affinity mask */
957 client_ptr_t peb; /* PEB address in process address space */
958 timeout_t start_time; /* process start time */
959 timeout_t end_time; /* process end time */
960 unsigned int session_id; /* process session id */
961 int exit_code; /* process exit code */
962 int priority; /* priority class */
963 unsigned short machine; /* process architecture */
964 VARARG(image,pe_image_info); /* image info for main exe */
968 /* Retrieve debug information about a process */
969 @REQ(get_process_debug_info)
970 obj_handle_t handle; /* process handle */
972 obj_handle_t debug; /* handle to debug port */
973 int debug_children; /* inherit debugger to child processes */
974 VARARG(image,pe_image_info); /* image info for main exe */
978 /* Fetch the name of the process image */
979 @REQ(get_process_image_name)
980 obj_handle_t handle; /* process handle */
981 int win32; /* return a win32 filename? */
983 data_size_t len; /* len in bytes required to store filename */
984 VARARG(name,unicode_str); /* image name for main exe */
988 /* Retrieve information about a process memory usage */
989 @REQ(get_process_vm_counters)
990 obj_handle_t handle; /* process handle */
992 mem_size_t peak_virtual_size; /* peak virtual memory in bytes */
993 mem_size_t virtual_size; /* virtual memory in bytes */
994 mem_size_t peak_working_set_size; /* peak real memory in bytes */
995 mem_size_t working_set_size; /* real memory in bytes */
996 mem_size_t pagefile_usage; /* commit charge in bytes */
997 mem_size_t peak_pagefile_usage; /* peak commit charge in bytes */
1001 /* Set a process information */
1002 @REQ(set_process_info)
1003 obj_handle_t handle; /* process handle */
1004 int mask; /* setting mask (see below) */
1005 int priority; /* priority class */
1006 affinity_t affinity; /* affinity mask */
1008 #define SET_PROCESS_INFO_PRIORITY 0x01
1009 #define SET_PROCESS_INFO_AFFINITY 0x02
1012 /* Retrieve information about a thread */
1013 @REQ(get_thread_info)
1014 obj_handle_t handle; /* thread handle */
1015 unsigned int access; /* required access rights */
1017 process_id_t pid; /* server process id */
1018 thread_id_t tid; /* server thread id */
1019 client_ptr_t teb; /* thread teb pointer */
1020 client_ptr_t entry_point; /* thread entry point */
1021 affinity_t affinity; /* thread affinity mask */
1022 int exit_code; /* thread exit code */
1023 int priority; /* thread priority level */
1024 int last; /* last thread in process */
1025 int suspend_count; /* thread suspend count */
1026 int dbg_hidden; /* thread hidden from debugger */
1027 data_size_t desc_len; /* description length in bytes */
1028 VARARG(desc,unicode_str); /* description string */
1032 /* Retrieve information about thread times */
1033 @REQ(get_thread_times)
1034 obj_handle_t handle; /* thread handle */
1036 timeout_t creation_time; /* thread creation time */
1037 timeout_t exit_time; /* thread exit time */
1038 int unix_pid; /* thread native pid */
1039 int unix_tid; /* thread native pid */
1043 /* Set a thread information */
1044 @REQ(set_thread_info)
1045 obj_handle_t handle; /* thread handle */
1046 int mask; /* setting mask (see below) */
1047 int priority; /* priority class */
1048 affinity_t affinity; /* affinity mask */
1049 client_ptr_t entry_point; /* thread entry point */
1050 obj_handle_t token; /* impersonation token */
1051 VARARG(desc,unicode_str); /* description string */
1053 #define SET_THREAD_INFO_PRIORITY 0x01
1054 #define SET_THREAD_INFO_AFFINITY 0x02
1055 #define SET_THREAD_INFO_TOKEN 0x04
1056 #define SET_THREAD_INFO_ENTRYPOINT 0x08
1057 #define SET_THREAD_INFO_DESCRIPTION 0x10
1058 #define SET_THREAD_INFO_DBG_HIDDEN 0x20
1061 /* Suspend a thread */
1062 @REQ(suspend_thread)
1063 obj_handle_t handle; /* thread handle */
1065 int count; /* new suspend count */
1069 /* Resume a thread */
1071 obj_handle_t handle; /* thread handle */
1073 int count; /* new suspend count */
1077 /* Queue an APC for a thread or process */
1079 obj_handle_t handle; /* thread or process handle */
1080 apc_call_t call; /* call arguments */
1082 obj_handle_t handle; /* APC handle */
1083 int self; /* run APC in caller itself? */
1087 /* Get the result of an APC call */
1088 @REQ(get_apc_result)
1089 obj_handle_t handle; /* handle to the APC */
1091 apc_result_t result; /* result of the APC */
1095 /* Close a handle for the current process */
1097 obj_handle_t handle; /* handle to close */
1101 /* Set a handle information */
1102 @REQ(set_handle_info)
1103 obj_handle_t handle; /* handle we are interested in */
1104 int flags; /* new handle flags */
1105 int mask; /* mask for flags to set */
1107 int old_flags; /* old flag value */
1111 /* Duplicate a handle */
1113 obj_handle_t src_process; /* src process handle */
1114 obj_handle_t src_handle; /* src handle to duplicate */
1115 obj_handle_t dst_process; /* dst process handle */
1116 unsigned int access; /* wanted access rights */
1117 unsigned int attributes; /* object attributes */
1118 unsigned int options; /* duplicate options */
1120 obj_handle_t handle; /* duplicated handle in dst process */
1124 /* Make an object temporary */
1125 @REQ(make_temporary)
1126 obj_handle_t handle; /* handle to the object */
1130 /* Open a handle to a process */
1132 process_id_t pid; /* process id to open */
1133 unsigned int access; /* wanted access rights */
1134 unsigned int attributes; /* object attributes */
1136 obj_handle_t handle; /* handle to the process */
1140 /* Open a handle to a thread */
1142 thread_id_t tid; /* thread id to open */
1143 unsigned int access; /* wanted access rights */
1144 unsigned int attributes; /* object attributes */
1146 obj_handle_t handle; /* handle to the thread */
1150 /* Wait for handles */
1152 int flags; /* wait flags (see below) */
1153 client_ptr_t cookie; /* magic cookie to return to client */
1154 abstime_t timeout; /* timeout */
1155 data_size_t size; /* size of select_op */
1156 obj_handle_t prev_apc; /* handle to previous APC */
1157 VARARG(result,apc_result); /* result of previous APC */
1158 VARARG(data,select_op,size); /* operation-specific data */
1159 VARARG(contexts,contexts); /* suspend context(s) */
1161 apc_call_t call; /* APC call arguments */
1162 obj_handle_t apc_handle; /* handle to next APC */
1163 VARARG(contexts,contexts); /* suspend context(s) */
1165 #define SELECT_ALERTABLE 1
1166 #define SELECT_INTERRUPTIBLE 2
1169 /* Create an event */
1171 unsigned int access; /* wanted access rights */
1172 int manual_reset; /* manual reset event */
1173 int initial_state; /* initial state of the event */
1174 VARARG(objattr,object_attributes); /* object attributes */
1176 obj_handle_t handle; /* handle to the event */
1179 /* Event operation */
1181 obj_handle_t handle; /* handle to event */
1182 int op; /* event operation (see below) */
1184 int state; /* previous state */
1186 enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT };
1189 obj_handle_t handle; /* handle to event */
1191 int manual_reset; /* manual reset event */
1192 int state; /* current state of the event */
1197 unsigned int access; /* wanted access rights */
1198 unsigned int attributes; /* object attributes */
1199 obj_handle_t rootdir; /* root directory */
1200 VARARG(name,unicode_str); /* object name */
1202 obj_handle_t handle; /* handle to the event */
1206 /* Create a keyed event */
1207 @REQ(create_keyed_event)
1208 unsigned int access; /* wanted access rights */
1209 VARARG(objattr,object_attributes); /* object attributes */
1211 obj_handle_t handle; /* handle to the event */
1214 /* Open a keyed event */
1215 @REQ(open_keyed_event)
1216 unsigned int access; /* wanted access rights */
1217 unsigned int attributes; /* object attributes */
1218 obj_handle_t rootdir; /* root directory */
1219 VARARG(name,unicode_str); /* object name */
1221 obj_handle_t handle; /* handle to the event */
1225 /* Create a mutex */
1227 unsigned int access; /* wanted access rights */
1228 int owned; /* initially owned? */
1229 VARARG(objattr,object_attributes); /* object attributes */
1231 obj_handle_t handle; /* handle to the mutex */
1235 /* Release a mutex */
1237 obj_handle_t handle; /* handle to the mutex */
1239 unsigned int prev_count; /* value of internal counter, before release */
1245 unsigned int access; /* wanted access rights */
1246 unsigned int attributes; /* object attributes */
1247 obj_handle_t rootdir; /* root directory */
1248 VARARG(name,unicode_str); /* object name */
1250 obj_handle_t handle; /* handle to the mutex */
1256 obj_handle_t handle; /* handle to mutex */
1258 unsigned int count; /* current count of mutex */
1259 int owned; /* true if owned by current thread */
1260 int abandoned; /* true if abandoned */
1264 /* Create a semaphore */
1265 @REQ(create_semaphore)
1266 unsigned int access; /* wanted access rights */
1267 unsigned int initial; /* initial count */
1268 unsigned int max; /* maximum count */
1269 VARARG(objattr,object_attributes); /* object attributes */
1271 obj_handle_t handle; /* handle to the semaphore */
1275 /* Release a semaphore */
1276 @REQ(release_semaphore)
1277 obj_handle_t handle; /* handle to the semaphore */
1278 unsigned int count; /* count to add to semaphore */
1280 unsigned int prev_count; /* previous semaphore count */
1283 @REQ(query_semaphore)
1284 obj_handle_t handle; /* handle to the semaphore */
1286 unsigned int current; /* current count */
1287 unsigned int max; /* maximum count */
1290 /* Open a semaphore */
1291 @REQ(open_semaphore)
1292 unsigned int access; /* wanted access rights */
1293 unsigned int attributes; /* object attributes */
1294 obj_handle_t rootdir; /* root directory */
1295 VARARG(name,unicode_str); /* object name */
1297 obj_handle_t handle; /* handle to the semaphore */
1303 unsigned int access; /* wanted access rights */
1304 unsigned int sharing; /* sharing flags */
1305 int create; /* file create action */
1306 unsigned int options; /* file options */
1307 unsigned int attrs; /* file attributes for creation */
1308 VARARG(objattr,object_attributes); /* object attributes */
1309 VARARG(filename,string); /* file name */
1311 obj_handle_t handle; /* handle to the file */
1315 /* Open a file object */
1316 @REQ(open_file_object)
1317 unsigned int access; /* wanted access rights */
1318 unsigned int attributes; /* open attributes */
1319 obj_handle_t rootdir; /* root directory */
1320 unsigned int sharing; /* sharing flags */
1321 unsigned int options; /* file options */
1322 VARARG(filename,unicode_str); /* file name */
1324 obj_handle_t handle; /* handle to the file */
1328 /* Allocate a file handle for a Unix fd */
1329 @REQ(alloc_file_handle)
1330 unsigned int access; /* wanted access rights */
1331 unsigned int attributes; /* object attributes */
1332 int fd; /* file descriptor on the client side */
1334 obj_handle_t handle; /* handle to the file */
1338 /* Get the Unix name from a file handle */
1339 @REQ(get_handle_unix_name)
1340 obj_handle_t handle; /* file handle */
1342 data_size_t name_len; /* unix name length */
1343 VARARG(name,string); /* unix name */
1347 /* Get a Unix fd to access a file */
1349 obj_handle_t handle; /* handle to the file */
1351 int type; /* file type (see below) */
1352 int cacheable; /* can fd be cached in the client? */
1353 unsigned int access; /* file access rights */
1354 unsigned int options; /* file open options */
1358 FD_TYPE_INVALID, /* invalid file (no associated fd) */
1359 FD_TYPE_FILE, /* regular file */
1360 FD_TYPE_DIR, /* directory */
1361 FD_TYPE_SOCKET, /* socket */
1362 FD_TYPE_SERIAL, /* serial port */
1363 FD_TYPE_PIPE, /* named pipe */
1364 FD_TYPE_MAILSLOT, /* mailslot */
1365 FD_TYPE_CHAR, /* unspecified char device */
1366 FD_TYPE_DEVICE, /* Windows device file */
1371 /* Retrieve (or allocate) the client-side directory cache entry */
1372 @REQ(get_directory_cache_entry)
1373 obj_handle_t handle; /* handle to the directory */
1375 int entry; /* cache entry on the client side */
1376 VARARG(free,ints); /* entries that can be freed */
1380 /* Flush a file buffers */
1382 async_data_t async; /* async I/O parameters */
1384 obj_handle_t event; /* event set when finished */
1387 /* Query file information */
1389 obj_handle_t handle; /* handle to the file */
1390 unsigned int info_class; /* queried information class */
1392 VARARG(data,bytes); /* file info data */
1395 /* Query volume information */
1396 @REQ(get_volume_info)
1397 obj_handle_t handle; /* handle to the file */
1398 async_data_t async; /* async I/O parameters */
1399 unsigned int info_class; /* queried information class */
1401 obj_handle_t wait; /* handle to wait on for blocking read */
1402 VARARG(data,bytes); /* volume info data */
1405 /* Lock a region of a file */
1407 obj_handle_t handle; /* handle to the file */
1408 file_pos_t offset; /* offset of start of lock */
1409 file_pos_t count; /* count of bytes to lock */
1410 int shared; /* shared or exclusive lock? */
1411 int wait; /* do we want to wait? */
1413 obj_handle_t handle; /* handle to wait on */
1414 int overlapped; /* is it an overlapped I/O handle? */
1418 /* Unlock a region of a file */
1420 obj_handle_t handle; /* handle to the file */
1421 file_pos_t offset; /* offset of start of unlock */
1422 file_pos_t count; /* count of bytes to unlock */
1426 /* Perform a recv on a socket */
1428 int oob; /* are we receiving OOB data? */
1429 async_data_t async; /* async I/O parameters */
1430 unsigned int status; /* status of initial call */
1431 unsigned int total; /* number of bytes already read */
1433 obj_handle_t wait; /* handle to wait on for blocking recv */
1434 unsigned int options; /* device open options */
1438 struct poll_socket_input
1440 obj_handle_t socket; /* socket handle */
1441 int flags; /* events to poll for */
1444 struct poll_socket_output
1446 int flags; /* events signaled */
1447 unsigned int status; /* socket status */
1450 /* Perform an async poll on a socket */
1452 async_data_t async; /* async I/O parameters */
1453 timeout_t timeout; /* timeout */
1454 VARARG(sockets,poll_socket_input); /* list of sockets to poll */
1456 obj_handle_t wait; /* handle to wait on for blocking poll */
1457 unsigned int options; /* file open options */
1458 VARARG(sockets,poll_socket_output); /* data returned */
1462 /* Perform a send on a socket */
1464 async_data_t async; /* async I/O parameters */
1465 unsigned int status; /* status of initial call */
1466 unsigned int total; /* number of bytes already sent */
1468 obj_handle_t wait; /* handle to wait on for blocking send */
1469 unsigned int options; /* device open options */
1473 /* Retrieve the next pending console ioctl request */
1474 @REQ(get_next_console_request)
1475 obj_handle_t handle; /* console server handle */
1476 int signal; /* server signal state */
1477 int read; /* 1 if reporting result of blocked read ioctl */
1478 unsigned int status; /* status of previous ioctl */
1479 VARARG(out_data,bytes); /* out_data of previous ioctl */
1481 unsigned int code; /* ioctl code */
1482 unsigned int output; /* output id or 0 for input */
1483 data_size_t out_size; /* ioctl output size */
1484 VARARG(in_data,bytes); /* ioctl in_data */
1488 /* enable directory change notifications */
1489 @REQ(read_directory_changes)
1490 unsigned int filter; /* notification filter */
1491 int subtree; /* watch the subtree? */
1492 int want_data; /* flag indicating whether change data should be collected */
1493 async_data_t async; /* async I/O parameters */
1498 obj_handle_t handle;
1500 VARARG(events,filesystem_event); /* collected filesystem events */
1504 /* Create a file mapping */
1505 @REQ(create_mapping)
1506 unsigned int access; /* wanted access rights */
1507 unsigned int flags; /* SEC_* flags */
1508 unsigned int file_access; /* file access rights */
1509 mem_size_t size; /* mapping size */
1510 obj_handle_t file_handle; /* file handle */
1511 VARARG(objattr,object_attributes); /* object attributes */
1513 obj_handle_t handle; /* handle to the mapping */
1517 /* Open a mapping */
1519 unsigned int access; /* wanted access rights */
1520 unsigned int attributes; /* object attributes */
1521 obj_handle_t rootdir; /* root directory */
1522 VARARG(name,unicode_str); /* object name */
1524 obj_handle_t handle; /* handle to the mapping */
1528 /* Get information about a file mapping */
1529 @REQ(get_mapping_info)
1530 obj_handle_t handle; /* handle to the mapping */
1531 unsigned int access; /* wanted access rights */
1533 mem_size_t size; /* mapping size */
1534 unsigned int flags; /* SEC_* flags */
1535 obj_handle_t shared_file; /* shared mapping file handle */
1536 data_size_t total; /* total required buffer size in bytes */
1537 VARARG(image,pe_image_info);/* image info for SEC_IMAGE mappings */
1538 VARARG(name,unicode_str); /* filename for SEC_IMAGE mappings */
1542 /* Add a memory view in the current process */
1544 obj_handle_t mapping; /* file mapping handle, or 0 for .so builtin */
1545 unsigned int access; /* wanted access rights */
1546 client_ptr_t base; /* view base address (page-aligned) */
1547 mem_size_t size; /* view size */
1548 file_pos_t start; /* start offset in mapping */
1549 VARARG(image,pe_image_info);/* image info for .so builtins */
1550 VARARG(name,unicode_str); /* image filename for .so builtins */
1554 /* Unmap a memory view from the current process */
1556 client_ptr_t base; /* view base address */
1560 /* Get a range of committed pages in a file mapping */
1561 @REQ(get_mapping_committed_range)
1562 client_ptr_t base; /* view base address */
1563 file_pos_t offset; /* starting offset (page-aligned, in bytes) */
1565 mem_size_t size; /* size of range starting at offset (page-aligned, in bytes) */
1566 int committed; /* whether it is a committed range */
1570 /* Add a range to the committed pages in a file mapping */
1571 @REQ(add_mapping_committed_range)
1572 client_ptr_t base; /* view base address */
1573 file_pos_t offset; /* starting offset (page-aligned, in bytes) */
1574 mem_size_t size; /* size to set (page-aligned, in bytes) or 0 if only retrieving */
1578 /* Check if two memory maps are for the same file */
1579 @REQ(is_same_mapping)
1580 client_ptr_t base1; /* first view base address */
1581 client_ptr_t base2; /* second view base address */
1585 /* Get the filename of a mapping */
1586 @REQ(get_mapping_filename)
1587 obj_handle_t process; /* process handle */
1588 client_ptr_t addr; /* address inside mapped view (in process address space) */
1590 data_size_t len; /* total filename length in bytes */
1591 VARARG(filename,unicode_str); /* filename in NT format */
1597 timeout_t start_time;
1600 int current_priority;
1606 timeout_t start_time;
1607 data_size_t name_len;
1611 process_id_t parent_pid;
1612 unsigned int session_id;
1615 /* VARARG(name,unicode_str,name_len); */
1616 /* VARARG(threads,struct thread_info,thread_count); */
1619 /* Get a list of processes and threads currently running */
1620 @REQ(list_processes)
1622 data_size_t info_size;
1624 VARARG(data,process_info,info_size);
1628 /* Create a debug object */
1629 @REQ(create_debug_obj)
1630 unsigned int access; /* wanted access rights */
1631 unsigned int flags; /* object flags */
1632 VARARG(objattr,object_attributes); /* object attributes */
1634 obj_handle_t handle; /* handle to the debug object */
1638 /* Wait for a debug event */
1639 @REQ(wait_debug_event)
1640 obj_handle_t debug; /* debug object */
1642 process_id_t pid; /* process id */
1643 thread_id_t tid; /* thread id */
1644 VARARG(event,debug_event); /* debug event data */
1648 /* Queue an exception event */
1649 @REQ(queue_exception_event)
1650 int first; /* first chance exception? */
1651 unsigned int code; /* exception code */
1652 unsigned int flags; /* exception flags */
1653 client_ptr_t record; /* exception record */
1654 client_ptr_t address; /* exception address */
1655 data_size_t len; /* size of parameters */
1656 VARARG(params,uints64,len);/* exception parameters */
1658 obj_handle_t handle; /* handle to the queued event */
1662 /* Retrieve the status of an exception event */
1663 @REQ(get_exception_status)
1664 obj_handle_t handle; /* handle to the queued event */
1668 /* Continue a debug event */
1669 @REQ(continue_debug_event)
1670 obj_handle_t debug; /* debug object */
1671 process_id_t pid; /* process id to continue */
1672 thread_id_t tid; /* thread id to continue */
1673 unsigned int status; /* continuation status */
1677 /* Start or stop debugging an existing process */
1679 obj_handle_t handle; /* process handle */
1680 obj_handle_t debug; /* debug object to attach to the process */
1681 int attach; /* 1=attaching / 0=detaching from the process */
1685 /* Set debug object information */
1686 @REQ(set_debug_obj_info)
1687 obj_handle_t debug; /* debug object */
1688 unsigned int flags; /* object flags */
1692 /* Read data from a process address space */
1693 @REQ(read_process_memory)
1694 obj_handle_t handle; /* process handle */
1695 client_ptr_t addr; /* addr to read from */
1697 VARARG(data,bytes); /* result data */
1701 /* Write data to a process address space */
1702 @REQ(write_process_memory)
1703 obj_handle_t handle; /* process handle */
1704 client_ptr_t addr; /* addr to write to */
1705 VARARG(data,bytes); /* data to write */
1709 /* Create a registry key */
1711 unsigned int access; /* desired access rights */
1712 unsigned int options; /* creation options */
1713 VARARG(objattr,object_attributes); /* object attributes */
1714 VARARG(class,unicode_str); /* class name */
1716 obj_handle_t hkey; /* handle to the created key */
1717 int created; /* has it been newly created? */
1720 /* Open a registry key */
1722 obj_handle_t parent; /* handle to the parent key */
1723 unsigned int access; /* desired access rights */
1724 unsigned int attributes; /* object attributes */
1725 VARARG(name,unicode_str); /* key name */
1727 obj_handle_t hkey; /* handle to the open key */
1731 /* Delete a registry key */
1733 obj_handle_t hkey; /* handle to the key */
1737 /* Flush a registry key */
1739 obj_handle_t hkey; /* handle to the key */
1743 /* Enumerate registry subkeys */
1745 obj_handle_t hkey; /* handle to registry key */
1746 int index; /* index of subkey (or -1 for current key) */
1747 int info_class; /* requested information class */
1749 int subkeys; /* number of subkeys */
1750 int max_subkey; /* longest subkey name */
1751 int max_class; /* longest class name */
1752 int values; /* number of values */
1753 int max_value; /* longest value name */
1754 int max_data; /* longest value data */
1755 timeout_t modif; /* last modification time */
1756 data_size_t total; /* total length needed for full name and class */
1757 data_size_t namelen; /* length of key name in bytes */
1758 VARARG(name,unicode_str,namelen); /* key name */
1759 VARARG(class,unicode_str); /* class name */
1763 /* Set a value of a registry key */
1765 obj_handle_t hkey; /* handle to registry key */
1766 int type; /* value type */
1767 data_size_t namelen; /* length of value name in bytes */
1768 VARARG(name,unicode_str,namelen); /* value name */
1769 VARARG(data,bytes); /* value data */
1773 /* Retrieve the value of a registry key */
1775 obj_handle_t hkey; /* handle to registry key */
1776 VARARG(name,unicode_str); /* value name */
1778 int type; /* value type */
1779 data_size_t total; /* total length needed for data */
1780 VARARG(data,bytes); /* value data */
1784 /* Enumerate a value of a registry key */
1785 @REQ(enum_key_value)
1786 obj_handle_t hkey; /* handle to registry key */
1787 int index; /* value index */
1788 int info_class; /* requested information class */
1790 int type; /* value type */
1791 data_size_t total; /* total length needed for full name and data */
1792 data_size_t namelen; /* length of value name in bytes */
1793 VARARG(name,unicode_str,namelen); /* value name */
1794 VARARG(data,bytes); /* value data */
1798 /* Delete a value of a registry key */
1799 @REQ(delete_key_value)
1800 obj_handle_t hkey; /* handle to registry key */
1801 VARARG(name,unicode_str); /* value name */
1805 /* Load a registry branch from a file */
1807 obj_handle_t file; /* file to load from */
1808 VARARG(objattr,object_attributes); /* object attributes */
1812 /* UnLoad a registry branch from a file */
1813 @REQ(unload_registry)
1814 obj_handle_t parent; /* handle to the parent key */
1815 unsigned int attributes; /* object attributes */
1816 VARARG(name,unicode_str); /* key name */
1820 /* Save a registry branch to a file */
1822 obj_handle_t hkey; /* key to save */
1823 obj_handle_t file; /* file to save to */
1827 /* Add a registry key change notification */
1828 @REQ(set_registry_notification)
1829 obj_handle_t hkey; /* key to watch for changes */
1830 obj_handle_t event; /* event to set */
1831 int subtree; /* should we watch the whole subtree? */
1832 unsigned int filter; /* things to watch */
1836 /* Create a waitable timer */
1838 unsigned int access; /* wanted access rights */
1839 int manual; /* manual reset */
1840 VARARG(objattr,object_attributes); /* object attributes */
1842 obj_handle_t handle; /* handle to the timer */
1846 /* Open a waitable timer */
1848 unsigned int access; /* wanted access rights */
1849 unsigned int attributes; /* object attributes */
1850 obj_handle_t rootdir; /* root directory */
1851 VARARG(name,unicode_str); /* object name */
1853 obj_handle_t handle; /* handle to the timer */
1856 /* Set a waitable timer */
1858 obj_handle_t handle; /* handle to the timer */
1859 timeout_t expire; /* next expiration absolute time */
1860 client_ptr_t callback; /* callback function */
1861 client_ptr_t arg; /* callback argument */
1862 int period; /* timer period in ms */
1864 int signaled; /* was the timer signaled before this call ? */
1867 /* Cancel a waitable timer */
1869 obj_handle_t handle; /* handle to the timer */
1871 int signaled; /* was the timer signaled before this calltime ? */
1874 /* Get information on a waitable timer */
1875 @REQ(get_timer_info)
1876 obj_handle_t handle; /* handle to the timer */
1878 timeout_t when; /* absolute time when the timer next expires */
1879 int signaled; /* is the timer signaled? */
1883 /* Retrieve the current context of a thread */
1884 @REQ(get_thread_context)
1885 obj_handle_t handle; /* thread handle */
1886 obj_handle_t context; /* context handle */
1887 unsigned int flags; /* context flags */
1888 unsigned short machine; /* context architecture */
1890 int self; /* was it a handle to the current thread? */
1891 obj_handle_t handle; /* pending context handle */
1892 VARARG(contexts,contexts); /* thread context(s) */
1896 /* Set the current context of a thread */
1897 @REQ(set_thread_context)
1898 obj_handle_t handle; /* thread handle */
1899 VARARG(contexts,contexts); /* thread context(s) */
1901 int self; /* was it a handle to the current thread? */
1905 /* Fetch a selector entry for a thread */
1906 @REQ(get_selector_entry)
1907 obj_handle_t handle; /* thread handle */
1908 int entry; /* LDT entry */
1910 unsigned int base; /* selector base */
1911 unsigned int limit; /* selector limit */
1912 unsigned char flags; /* selector flags */
1918 VARARG(name,unicode_str); /* atom name */
1920 atom_t atom; /* resulting atom */
1924 /* Delete an atom */
1926 atom_t atom; /* atom handle */
1932 VARARG(name,unicode_str); /* atom name */
1934 atom_t atom; /* atom handle */
1938 /* Get information about an atom */
1939 @REQ(get_atom_information)
1940 atom_t atom; /* atom handle */
1942 int count; /* atom lock count */
1943 int pinned; /* whether the atom has been pinned */
1944 data_size_t total; /* actual length of atom name */
1945 VARARG(name,unicode_str); /* atom name */
1949 /* Get the message queue of the current thread */
1952 obj_handle_t handle; /* handle to the queue */
1956 /* Set the file descriptor associated to the current thread queue */
1958 obj_handle_t handle; /* handle to the file descriptor */
1962 /* Set the current message queue wakeup mask */
1963 @REQ(set_queue_mask)
1964 unsigned int wake_mask; /* wakeup bits mask */
1965 unsigned int changed_mask; /* changed bits mask */
1966 int skip_wait; /* will we skip waiting if signaled? */
1968 unsigned int wake_bits; /* current wake bits */
1969 unsigned int changed_bits; /* current changed bits */
1973 /* Get the current message queue status */
1974 @REQ(get_queue_status)
1975 unsigned int clear_bits; /* should we clear the change bits? */
1977 unsigned int wake_bits; /* wake bits */
1978 unsigned int changed_bits; /* changed bits since last time */
1982 /* Retrieve the process idle event */
1983 @REQ(get_process_idle_event)
1984 obj_handle_t handle; /* process handle */
1986 obj_handle_t event; /* handle to idle event */
1990 /* Send a message to a thread queue */
1992 thread_id_t id; /* thread id */
1993 int type; /* message type (see below) */
1994 int flags; /* message flags (see below) */
1995 user_handle_t win; /* window handle */
1996 unsigned int msg; /* message code */
1997 lparam_t wparam; /* parameters */
1998 lparam_t lparam; /* parameters */
1999 timeout_t timeout; /* timeout for reply */
2000 VARARG(data,message_data); /* message data for sent messages */
2003 @REQ(post_quit_message)
2004 int exit_code; /* exit code to return */
2009 MSG_ASCII, /* Ascii message (from SendMessageA) */
2010 MSG_UNICODE, /* Unicode message (from SendMessageW) */
2011 MSG_NOTIFY, /* notify message (from SendNotifyMessageW), always Unicode */
2012 MSG_CALLBACK, /* callback message (from SendMessageCallbackW), always Unicode */
2013 MSG_CALLBACK_RESULT,/* result of a callback message */
2014 MSG_OTHER_PROCESS, /* sent from other process, may include vararg data, always Unicode */
2015 MSG_POSTED, /* posted message (from PostMessageW), always Unicode */
2016 MSG_HARDWARE, /* hardware message */
2017 MSG_WINEVENT, /* winevent message */
2018 MSG_HOOK_LL /* low-level hardware hook */
2020 #define SEND_MSG_ABORT_IF_HUNG 0x01
2023 /* Send a hardware message to a thread queue */
2024 @REQ(send_hardware_message)
2025 user_handle_t win; /* window handle */
2026 hw_input_t input; /* input data */
2027 unsigned int flags; /* flags (see below) */
2028 VARARG(report,bytes); /* HID report data */
2030 int wait; /* do we need to wait for a reply? */
2031 int prev_x; /* previous cursor position */
2033 int new_x; /* new cursor position */
2035 VARARG(keystate,bytes); /* global state array for all the keys */
2037 #define SEND_HWMSG_INJECTED 0x01
2040 /* Get a message from the current queue */
2042 unsigned int flags; /* PM_* flags */
2043 user_handle_t get_win; /* window handle to get */
2044 unsigned int get_first; /* first message code to get */
2045 unsigned int get_last; /* last message code to get */
2046 unsigned int hw_id; /* id of the previous hardware message (or 0) */
2047 unsigned int wake_mask; /* wakeup bits mask */
2048 unsigned int changed_mask; /* changed bits mask */
2050 user_handle_t win; /* window handle */
2051 unsigned int msg; /* message code */
2052 lparam_t wparam; /* parameters */
2053 lparam_t lparam; /* parameters */
2054 int type; /* message type */
2055 int x; /* message x position */
2056 int y; /* message y position */
2057 unsigned int time; /* message time */
2058 unsigned int active_hooks; /* active hooks bitmap */
2059 data_size_t total; /* total size of extra data */
2060 VARARG(data,message_data); /* message data for sent messages */
2064 /* Reply to a sent message */
2066 int remove; /* should we remove the message? */
2067 lparam_t result; /* message result */
2068 VARARG(data,bytes); /* message data for sent messages */
2072 /* Accept and remove the current hardware message */
2073 @REQ(accept_hardware_message)
2074 unsigned int hw_id; /* id of the hardware message */
2078 /* Retrieve the reply for the last message sent */
2079 @REQ(get_message_reply)
2080 int cancel; /* cancel message if not ready? */
2082 lparam_t result; /* message result */
2083 VARARG(data,bytes); /* message data for sent messages */
2087 /* Set a window timer */
2089 user_handle_t win; /* window handle */
2090 unsigned int msg; /* message to post */
2091 unsigned int rate; /* timer rate in ms */
2092 lparam_t id; /* timer id */
2093 lparam_t lparam; /* message lparam (callback proc) */
2095 lparam_t id; /* timer id */
2099 /* Kill a window timer */
2100 @REQ(kill_win_timer)
2101 user_handle_t win; /* window handle */
2102 lparam_t id; /* timer id */
2103 unsigned int msg; /* message to post */
2107 /* check if the thread owning the window is hung */
2108 @REQ(is_window_hung)
2109 user_handle_t win; /* window handle */
2115 /* Retrieve info about a serial port */
2116 @REQ(get_serial_info)
2117 obj_handle_t handle; /* handle to comm port */
2120 unsigned int eventmask;
2121 unsigned int cookie;
2122 unsigned int pending_write;
2126 /* Set info about a serial port */
2127 @REQ(set_serial_info)
2128 obj_handle_t handle; /* handle to comm port */
2129 int flags; /* bitmask to set values (see below) */
2131 #define SERIALINFO_PENDING_WRITE 0x04
2132 #define SERIALINFO_PENDING_WAIT 0x08
2135 /* Create an async I/O */
2136 @REQ(register_async)
2137 int type; /* type of queue to look after */
2138 async_data_t async; /* async I/O parameters */
2139 int count; /* count - usually # of bytes to be read/written */
2141 #define ASYNC_TYPE_READ 0x01
2142 #define ASYNC_TYPE_WRITE 0x02
2143 #define ASYNC_TYPE_WAIT 0x03
2146 /* Cancel all async op on a fd */
2148 obj_handle_t handle; /* handle to comm port, socket or file */
2149 client_ptr_t iosb; /* I/O status block (NULL=all) */
2150 int only_thread; /* cancel matching this thread */
2154 /* Retrieve results of an async */
2155 @REQ(get_async_result)
2156 client_ptr_t user_arg; /* user arg used to identify async */
2158 data_size_t size; /* result size (input or output depending on the operation) */
2159 VARARG(out_data,bytes); /* iosb output data */
2163 /* Perform a read on a file object */
2165 async_data_t async; /* async I/O parameters */
2166 file_pos_t pos; /* read position */
2168 obj_handle_t wait; /* handle to wait on for blocking read */
2169 unsigned int options; /* device open options */
2170 VARARG(data,bytes); /* read data */
2174 /* Perform a write on a file object */
2176 async_data_t async; /* async I/O parameters */
2177 file_pos_t pos; /* write position */
2178 VARARG(data,bytes); /* write data */
2180 obj_handle_t wait; /* handle to wait on for blocking write */
2181 unsigned int options; /* device open options */
2182 data_size_t size; /* size written */
2186 /* Perform an ioctl on a file */
2188 ioctl_code_t code; /* ioctl code */
2189 async_data_t async; /* async I/O parameters */
2190 VARARG(in_data,bytes); /* ioctl input data */
2192 obj_handle_t wait; /* handle to wait on for blocking ioctl */
2193 unsigned int options; /* device open options */
2194 VARARG(out_data,bytes); /* ioctl output data */
2198 /* Store results of an async irp */
2199 @REQ(set_irp_result)
2200 obj_handle_t handle; /* handle to the irp */
2201 unsigned int status; /* status of the irp */
2202 data_size_t size; /* result size (input or output depending on the operation) */
2203 VARARG(data,bytes); /* output data of the irp */
2207 /* Create a named pipe */
2208 @REQ(create_named_pipe)
2209 unsigned int access;
2210 unsigned int options;
2211 unsigned int sharing;
2212 unsigned int maxinstances;
2213 unsigned int outsize;
2214 unsigned int insize;
2217 VARARG(objattr,object_attributes); /* object attributes */
2219 obj_handle_t handle; /* handle to the pipe */
2222 /* flags in create_named_pipe and get_named_pipe_info */
2223 #define NAMED_PIPE_MESSAGE_STREAM_WRITE 0x0001
2224 #define NAMED_PIPE_MESSAGE_STREAM_READ 0x0002
2225 #define NAMED_PIPE_NONBLOCKING_MODE 0x0004
2226 #define NAMED_PIPE_SERVER_END 0x8000
2228 /* Set named pipe information by handle */
2229 @REQ(set_named_pipe_info)
2230 obj_handle_t handle;
2234 /* Create a window */
2236 user_handle_t parent; /* parent window */
2237 user_handle_t owner; /* owner window */
2238 atom_t atom; /* class atom */
2239 mod_handle_t instance; /* module instance */
2240 int dpi; /* system DPI */
2241 int awareness; /* thread DPI awareness */
2242 VARARG(class,unicode_str); /* class name */
2244 user_handle_t handle; /* created window */
2245 user_handle_t parent; /* full handle of parent */
2246 user_handle_t owner; /* full handle of owner */
2247 int extra; /* number of extra bytes */
2248 client_ptr_t class_ptr; /* pointer to class in client address space */
2249 int dpi; /* window DPI if not per-monitor aware */
2250 int awareness; /* window DPI awareness */
2254 /* Destroy a window */
2255 @REQ(destroy_window)
2256 user_handle_t handle; /* handle to the window */
2260 /* Retrieve the desktop window for the current thread */
2261 @REQ(get_desktop_window)
2262 int force; /* force creation if it doesn't exist
*/
2264 user_handle_t top_window
; /* handle to the desktop window
*/
2265 user_handle_t msg_window
; /* handle to the top
-level HWND_MESSAGE parent
*/
2269 /* Set a window owner
*/
2270 @
REQ(set_window_owner
)
2271 user_handle_t handle
; /* handle to the window
*/
2272 user_handle_t owner
; /* new owner
*/
2274 user_handle_t full_owner
; /* full handle of new owner
*/
2275 user_handle_t prev_owner
; /* full handle of previous owner
*/
2279 /* Get information from a window handle
*/
2280 @
REQ(get_window_info
)
2281 user_handle_t handle
; /* handle to the window
*/
2283 user_handle_t full_handle
; /* full
32-bit handle
*/
2284 user_handle_t last_active
; /* last active popup
*/
2285 process_id_t pid
; /* process owning the window
*/
2286 thread_id_t tid
; /* thread owning the window
*/
2287 atom_t atom
; /* class atom
*/
2288 int is_unicode
; /* ANSI or unicode
*/
2289 int dpi
; /* window DPI
*/
2290 int awareness
; /* DPI awareness
*/
2294 /* Set some information in a window
*/
2295 @
REQ(set_window_info
)
2296 unsigned short flags
; /* flags for fields to
set (see below
) */
2297 short int is_unicode
; /* ANSI or unicode
*/
2298 user_handle_t handle
; /* handle to the window
*/
2299 unsigned int style
; /* window style
*/
2300 unsigned int ex_style
; /* window extended style
*/
2301 unsigned int id
; /* window id
*/
2302 mod_handle_t instance
; /* creator instance
*/
2303 lparam_t user_data
; /* user
-specific data
*/
2304 int extra_offset
; /* offset to set in extra bytes
*/
2305 data_size_t extra_size
; /* size to set in extra bytes
*/
2306 lparam_t extra_value
; /* value to set in extra bytes
*/
2308 unsigned int old_style
; /* old window style
*/
2309 unsigned int old_ex_style
; /* old window extended style
*/
2310 mod_handle_t old_instance
; /* old creator instance
*/
2311 lparam_t old_user_data
; /* old user
-specific data
*/
2312 lparam_t old_extra_value
; /* old value in extra bytes
*/
2313 unsigned int old_id
; /* old window id
*/
2315 #define SET_WIN_STYLE
0x01
2316 #define SET_WIN_EXSTYLE
0x02
2317 #define SET_WIN_ID
0x04
2318 #define SET_WIN_INSTANCE
0x08
2319 #define SET_WIN_USERDATA
0x10
2320 #define SET_WIN_EXTRA
0x20
2321 #define SET_WIN_UNICODE
0x40
2324 /* Set the parent of a window
*/
2326 user_handle_t handle
; /* handle to the window
*/
2327 user_handle_t parent
; /* handle to the parent
*/
2329 user_handle_t old_parent
; /* old parent window
*/
2330 user_handle_t full_parent
; /* full handle of new parent
*/
2331 int dpi
; /* new window DPI if not per
-monitor aware
*/
2332 int awareness
; /* new DPI awareness
*/
2336 /* Get a list of the window parents
, up to the root of the tree
*/
2337 @
REQ(get_window_parents
)
2338 user_handle_t handle
; /* handle to the window
*/
2340 int count
; /* total count of parents
*/
2341 VARARG(parents
,user_handles
); /* parent handles
*/
2345 /* Get a list of the window children
*/
2346 @
REQ(get_window_children
)
2347 obj_handle_t desktop
; /* handle to desktop
*/
2348 user_handle_t parent
; /* parent window
*/
2349 atom_t atom
; /* class atom for the listed children
*/
2350 thread_id_t tid
; /* thread owning the listed children
*/
2351 VARARG(class
,unicode_str
); /* class name
*/
2353 int count
; /* total count of children
*/
2354 VARARG(children
,user_handles
); /* children handles
*/
2358 /* Get a list of the window children that contain a given point
*/
2359 @
REQ(get_window_children_from_point
)
2360 user_handle_t parent
; /* parent window
*/
2361 int x
; /* point in parent coordinates
*/
2363 int dpi
; /* dpi for the point coordinates
*/
2365 int count
; /* total count of children
*/
2366 VARARG(children
,user_handles
); /* children handles
*/
2370 /* Get window tree information from a window handle
*/
2371 @
REQ(get_window_tree
)
2372 user_handle_t handle
; /* handle to the window
*/
2374 user_handle_t parent
; /* parent window
*/
2375 user_handle_t owner
; /* owner window
*/
2376 user_handle_t next_sibling
; /* next sibling in Z
-order
*/
2377 user_handle_t prev_sibling
; /* prev sibling in Z
-order
*/
2378 user_handle_t first_sibling
; /* first sibling in Z
-order
*/
2379 user_handle_t last_sibling
; /* last sibling in Z
-order
*/
2380 user_handle_t first_child
; /* first child
*/
2381 user_handle_t last_child
; /* last child
*/
2384 /* Set the position and Z order of a window
*/
2385 @
REQ(set_window_pos
)
2386 unsigned short swp_flags
; /* SWP_
* flags
*/
2387 unsigned short paint_flags
; /* paint
flags (see below
) */
2388 user_handle_t handle
; /* handle to the window
*/
2389 user_handle_t previous
; /* previous window in Z order
*/
2390 rectangle_t window
; /* window
rectangle (in parent coords
) */
2391 rectangle_t client
; /* client
rectangle (in parent coords
) */
2392 VARARG(valid
,rectangles
); /* valid rectangles from
WM_NCCALCSIZE (in parent coords
) */
2394 unsigned int new_style
; /* new window style
*/
2395 unsigned int new_ex_style
; /* new window extended style
*/
2396 user_handle_t surface_win
; /* parent window that holds the surface
*/
2397 int needs_update
; /* whether the surface region needs an update
*/
2399 #define SET_WINPOS_PAINT_SURFACE
0x01 /* window has a paintable surface
*/
2400 #define SET_WINPOS_PIXEL_FORMAT
0x02 /* window has a custom pixel format
*/
2402 /* Get the window and client rectangles of a window
*/
2403 @
REQ(get_window_rectangles
)
2404 user_handle_t handle
; /* handle to the window
*/
2405 int relative
; /* coords relative
to (see below
) */
2406 int dpi
; /* DPI to map to
, or zero for per
-monitor DPI
*/
2408 rectangle_t window
; /* window rectangle
*/
2409 rectangle_t client
; /* client rectangle
*/
2411 enum coords_relative
2413 COORDS_CLIENT
, /* relative to client area
*/
2414 COORDS_WINDOW
, /* relative to whole window area
*/
2415 COORDS_PARENT
, /* relative to parent
's client area */
2416 COORDS_SCREEN /* relative to screen origin */
2420 /* Get the window text */
2421 @REQ(get_window_text)
2422 user_handle_t handle; /* handle to the window */
2424 data_size_t length; /* total length in WCHARs */
2425 VARARG(text,unicode_str); /* window text */
2429 /* Set the window text */
2430 @REQ(set_window_text)
2431 user_handle_t handle; /* handle to the window */
2432 VARARG(text,unicode_str); /* window text */
2436 /* Get the coordinates offset between two windows */
2437 @REQ(get_windows_offset)
2438 user_handle_t from; /* handle to the first window */
2439 user_handle_t to; /* handle to the second window */
2440 int dpi; /* DPI to map to, or zero for per-monitor DPI */
2442 int x; /* x coordinate offset */
2443 int y; /* y coordinate offset */
2444 int mirror; /* whether to mirror the x coordinate */
2448 /* Get the visible region of a window */
2449 @REQ(get_visible_region)
2450 user_handle_t window; /* handle to the window */
2451 unsigned int flags; /* DCX flags */
2453 user_handle_t top_win; /* top window to clip against */
2454 rectangle_t top_rect; /* top window visible rect with screen coords */
2455 rectangle_t win_rect; /* window rect in screen coords */
2456 unsigned int paint_flags; /* paint flags (from SET_WINPOS_* flags) */
2457 data_size_t total_size; /* total size of the resulting region */
2458 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2462 /* Get the visible surface region of a window */
2463 @REQ(get_surface_region)
2464 user_handle_t window; /* handle to the window */
2466 rectangle_t visible_rect; /* window visible rect in screen coords */
2467 data_size_t total_size; /* total size of the resulting region */
2468 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2472 /* Get the window region */
2473 @REQ(get_window_region)
2474 user_handle_t window; /* handle to the window */
2476 data_size_t total_size; /* total size of the resulting region */
2477 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2481 /* Set the window region */
2482 @REQ(set_window_region)
2483 user_handle_t window; /* handle to the window */
2484 int redraw; /* redraw the window? */
2485 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2489 /* Get the window update region */
2490 @REQ(get_update_region)
2491 user_handle_t window; /* handle to the window */
2492 user_handle_t from_child; /* child to start searching from */
2493 unsigned int flags; /* update flags (see below) */
2495 user_handle_t child; /* child to repaint (or window itself) */
2496 unsigned int flags; /* resulting update flags (see below) */
2497 data_size_t total_size; /* total size of the resulting region */
2498 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2500 #define UPDATE_NONCLIENT 0x001 /* get region for repainting non-client area */
2501 #define UPDATE_ERASE 0x002 /* get region for erasing client area */
2502 #define UPDATE_PAINT 0x004 /* get region for painting client area */
2503 #define UPDATE_INTERNALPAINT 0x008 /* get region if internal paint is pending */
2504 #define UPDATE_ALLCHILDREN 0x010 /* force repaint of all children */
2505 #define UPDATE_NOCHILDREN 0x020 /* don't try to repaint any children
*/
2506 #define UPDATE_NOREGION
0x040 /* don
't return a region, only the flags */
2507 #define UPDATE_DELAYED_ERASE 0x080 /* still needs erase after BeginPaint */
2508 #define UPDATE_CLIPCHILDREN 0x100 /* remove clipped children from the update region */
2511 /* Update the z order of a window so that a given rectangle is fully visible */
2512 @REQ(update_window_zorder)
2513 user_handle_t window; /* handle to the window */
2514 rectangle_t rect; /* rectangle that must be visible (in client coords) */
2518 /* Mark parts of a window as needing a redraw */
2520 user_handle_t window; /* handle to the window */
2521 unsigned int flags; /* RDW_* flags */
2522 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2526 /* Set a window property */
2527 @REQ(set_window_property)
2528 user_handle_t window; /* handle to the window */
2529 lparam_t data; /* data to store */
2530 atom_t atom; /* property atom (if no name specified) */
2531 VARARG(name,unicode_str); /* property name */
2535 /* Remove a window property */
2536 @REQ(remove_window_property)
2537 user_handle_t window; /* handle to the window */
2538 atom_t atom; /* property atom (if no name specified) */
2539 VARARG(name,unicode_str); /* property name */
2541 lparam_t data; /* data stored in property */
2545 /* Get a window property */
2546 @REQ(get_window_property)
2547 user_handle_t window; /* handle to the window */
2548 atom_t atom; /* property atom (if no name specified) */
2549 VARARG(name,unicode_str); /* property name */
2551 lparam_t data; /* data stored in property */
2555 /* Get the list of properties of a window */
2556 @REQ(get_window_properties)
2557 user_handle_t window; /* handle to the window */
2559 int total; /* total number of properties */
2560 VARARG(props,properties); /* list of properties */
2564 /* Create a window station */
2565 @REQ(create_winstation)
2566 unsigned int flags; /* window station flags */
2567 unsigned int access; /* wanted access rights */
2568 unsigned int attributes; /* object attributes */
2569 obj_handle_t rootdir; /* root directory */
2570 VARARG(name,unicode_str); /* object name */
2572 obj_handle_t handle; /* handle to the window station */
2576 /* Open a handle to a window station */
2577 @REQ(open_winstation)
2578 unsigned int access; /* wanted access rights */
2579 unsigned int attributes; /* object attributes */
2580 obj_handle_t rootdir; /* root directory */
2581 VARARG(name,unicode_str); /* object name */
2583 obj_handle_t handle; /* handle to the window station */
2587 /* Close a window station */
2588 @REQ(close_winstation)
2589 obj_handle_t handle; /* handle to the window station */
2593 /* Get the process current window station */
2594 @REQ(get_process_winstation)
2596 obj_handle_t handle; /* handle to the window station */
2600 /* Set the process current window station */
2601 @REQ(set_process_winstation)
2602 obj_handle_t handle; /* handle to the window station */
2606 /* Enumerate window stations */
2607 @REQ(enum_winstation)
2608 unsigned int index; /* current index */
2610 unsigned int next; /* next index */
2611 VARARG(name,unicode_str); /* window station name */
2615 /* Create a desktop */
2616 @REQ(create_desktop)
2617 unsigned int flags; /* desktop flags */
2618 unsigned int access; /* wanted access rights */
2619 unsigned int attributes; /* object attributes */
2620 VARARG(name,unicode_str); /* object name */
2622 obj_handle_t handle; /* handle to the desktop */
2626 /* Open a handle to a desktop */
2628 obj_handle_t winsta; /* window station to open (null allowed) */
2629 unsigned int flags; /* desktop flags */
2630 unsigned int access; /* wanted access rights */
2631 unsigned int attributes; /* object attributes */
2632 VARARG(name,unicode_str); /* object name */
2634 obj_handle_t handle; /* handle to the desktop */
2638 /* Open a handle to current input desktop */
2639 @REQ(open_input_desktop)
2640 unsigned int flags; /* desktop flags */
2641 unsigned int access; /* wanted access rights */
2642 unsigned int attributes; /* object attributes */
2644 obj_handle_t handle; /* handle to the desktop */
2648 /* Close a desktop */
2650 obj_handle_t handle; /* handle to the desktop */
2654 /* Get the thread current desktop */
2655 @REQ(get_thread_desktop)
2656 thread_id_t tid; /* thread id */
2658 obj_handle_t handle; /* handle to the desktop */
2662 /* Set the thread current desktop */
2663 @REQ(set_thread_desktop)
2664 obj_handle_t handle; /* handle to the desktop */
2668 /* Enumerate desktops */
2670 obj_handle_t winstation; /* handle to the window station */
2671 unsigned int index; /* current index */
2673 unsigned int next; /* next index */
2674 VARARG(name,unicode_str); /* window station name */
2678 /* Get/set information about a user object (window station or desktop) */
2679 @REQ(set_user_object_info)
2680 obj_handle_t handle; /* handle to the object */
2681 unsigned int flags; /* information to set/get */
2682 unsigned int obj_flags; /* new object flags */
2684 int is_desktop; /* is object a desktop? */
2685 unsigned int old_obj_flags; /* old object flags */
2686 VARARG(name,unicode_str); /* object name */
2688 #define SET_USER_OBJECT_SET_FLAGS 1
2689 #define SET_USER_OBJECT_GET_FULL_NAME 2
2692 /* Register a hotkey */
2693 @REQ(register_hotkey)
2694 user_handle_t window; /* handle to the window */
2695 int id; /* hotkey identifier */
2696 unsigned int flags; /* modifier keys */
2697 unsigned int vkey; /* virtual key code */
2699 int replaced; /* did we replace an existing hotkey? */
2700 unsigned int flags; /* flags of replaced hotkey */
2701 unsigned int vkey; /* virtual key code of replaced hotkey */
2705 /* Unregister a hotkey */
2706 @REQ(unregister_hotkey)
2707 user_handle_t window; /* handle to the window */
2708 int id; /* hotkey identifier */
2710 unsigned int flags; /* flags of removed hotkey */
2711 unsigned int vkey; /* virtual key code of removed hotkey */
2715 /* Attach (or detach) thread inputs */
2716 @REQ(attach_thread_input)
2717 thread_id_t tid_from; /* thread to be attached */
2718 thread_id_t tid_to; /* thread to which tid_from should be attached */
2719 int attach; /* is it an attach? */
2723 /* Get input data for a given thread */
2724 @REQ(get_thread_input)
2725 thread_id_t tid; /* id of thread */
2727 user_handle_t focus; /* handle to the focus window */
2728 user_handle_t capture; /* handle to the capture window */
2729 user_handle_t active; /* handle to the active window */
2730 user_handle_t foreground; /* handle to the global foreground window */
2731 user_handle_t menu_owner; /* handle to the menu owner */
2732 user_handle_t move_size; /* handle to the moving/resizing window */
2733 user_handle_t caret; /* handle to the caret window */
2734 user_handle_t cursor; /* handle to the cursor */
2735 int show_count; /* cursor show count */
2736 rectangle_t rect; /* caret rectangle */
2740 /* Get the time of the last input event */
2741 @REQ(get_last_input_time)
2747 /* Retrieve queue keyboard state for current thread or global async state */
2749 int async; /* whether to query the async state */
2750 int key; /* optional key code or -1 */
2752 unsigned char state; /* state of specified key */
2753 VARARG(keystate,bytes); /* state array for all the keys */
2756 /* Set queue keyboard state for current thread */
2758 int async; /* whether to change the async state too */
2759 VARARG(keystate,bytes); /* state array for all the keys */
2762 /* Set the system foreground window */
2763 @REQ(set_foreground_window)
2764 user_handle_t handle; /* handle to the foreground window */
2766 user_handle_t previous; /* handle to the previous foreground window */
2767 int send_msg_old; /* whether we have to send a msg to the old window */
2768 int send_msg_new; /* whether we have to send a msg to the new window */
2771 /* Set the current thread focus window */
2772 @REQ(set_focus_window)
2773 user_handle_t handle; /* handle to the focus window */
2775 user_handle_t previous; /* handle to the previous focus window */
2778 /* Set the current thread active window */
2779 @REQ(set_active_window)
2780 user_handle_t handle; /* handle to the active window */
2782 user_handle_t previous; /* handle to the previous active window */
2785 /* Set the current thread capture window */
2786 @REQ(set_capture_window)
2787 user_handle_t handle; /* handle to the capture window */
2788 unsigned int flags; /* capture flags (see below) */
2790 user_handle_t previous; /* handle to the previous capture window */
2791 user_handle_t full_handle; /* full 32-bit handle of new capture window */
2793 #define CAPTURE_MENU 0x01 /* capture is for a menu */
2794 #define CAPTURE_MOVESIZE 0x02 /* capture is for moving/resizing */
2797 /* Set the current thread caret window */
2798 @REQ(set_caret_window)
2799 user_handle_t handle; /* handle to the caret window */
2800 int width; /* caret width */
2801 int height; /* caret height */
2803 user_handle_t previous; /* handle to the previous caret window */
2804 rectangle_t old_rect; /* previous caret rectangle */
2805 int old_hide; /* previous hide count */
2806 int old_state; /* previous caret state (1=on, 0=off) */
2810 /* Set the current thread caret information */
2811 @REQ(set_caret_info)
2812 unsigned int flags; /* caret flags (see below) */
2813 user_handle_t handle; /* handle to the caret window */
2814 int x; /* caret x position */
2815 int y; /* caret y position */
2816 int hide; /* increment for hide count (can be negative to show it) */
2817 int state; /* caret state (see below) */
2819 user_handle_t full_handle; /* handle to the current caret window */
2820 rectangle_t old_rect; /* previous caret rectangle */
2821 int old_hide; /* previous hide count */
2822 int old_state; /* previous caret state (1=on, 0=off) */
2824 #define SET_CARET_POS 0x01 /* set the caret position from x,y */
2825 #define SET_CARET_HIDE 0x02 /* increment the caret hide count */
2826 #define SET_CARET_STATE 0x04 /* set the caret on/off state */
2829 CARET_STATE_OFF, /* off */
2830 CARET_STATE_ON, /* on */
2831 CARET_STATE_TOGGLE, /* toggle current state */
2832 CARET_STATE_ON_IF_MOVED /* on if the position differs, unchanged otherwise */
2836 /* Set a window hook */
2838 int id; /* id of the hook */
2839 process_id_t pid; /* id of process to set the hook into */
2840 thread_id_t tid; /* id of thread to set the hook into */
2843 client_ptr_t proc; /* hook procedure */
2845 int unicode; /* is it a unicode hook? */
2846 VARARG(module,unicode_str); /* module name */
2848 user_handle_t handle; /* handle to the hook */
2849 unsigned int active_hooks; /* active hooks bitmap */
2853 /* Remove a window hook */
2855 user_handle_t handle; /* handle to the hook */
2856 client_ptr_t proc; /* hook procedure if handle is 0 */
2857 int id; /* id of the hook if handle is 0 */
2859 unsigned int active_hooks; /* active hooks bitmap */
2863 /* Start calling a hook chain */
2864 @REQ(start_hook_chain)
2865 int id; /* id of the hook */
2866 int event; /* signalled event */
2867 user_handle_t window; /* handle to the event window */
2868 int object_id; /* object id for out of context winevent */
2869 int child_id; /* child id for out of context winevent */
2871 user_handle_t handle; /* handle to the next hook */
2872 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2873 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2874 int unicode; /* is it a unicode hook? */
2875 client_ptr_t proc; /* hook procedure */
2876 unsigned int active_hooks; /* active hooks bitmap */
2877 VARARG(module,unicode_str); /* module name */
2881 /* Finished calling a hook chain */
2882 @REQ(finish_hook_chain)
2883 int id; /* id of the hook */
2887 /* Get the hook information */
2889 user_handle_t handle; /* handle to the current hook */
2890 int get_next; /* do we want info about current or next hook? */
2891 int event; /* signalled event */
2892 user_handle_t window; /* handle to the event window */
2893 int object_id; /* object id for out of context winevent */
2894 int child_id; /* child id for out of context winevent */
2896 user_handle_t handle; /* handle to the hook */
2897 int id; /* id of the hook */
2898 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2899 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2900 client_ptr_t proc; /* hook procedure */
2901 int unicode; /* is it a unicode hook? */
2902 VARARG(module,unicode_str); /* module name */
2906 /* Create a window class */
2908 int local; /* is it a local class? */
2909 atom_t atom; /* class atom */
2910 unsigned int style; /* class style */
2911 mod_handle_t instance; /* module instance */
2912 int extra; /* number of extra class bytes */
2913 int win_extra; /* number of window extra bytes */
2914 client_ptr_t client_ptr; /* pointer to class in client address space */
2915 data_size_t name_offset; /* base class name offset for specified atom */
2916 VARARG(name,unicode_str); /* class name */
2918 atom_t atom; /* resulting class atom */
2922 /* Destroy a window class */
2924 atom_t atom; /* class atom */
2925 mod_handle_t instance; /* module instance */
2926 VARARG(name,unicode_str); /* class name */
2928 client_ptr_t client_ptr; /* pointer to class in client address space */
2932 /* Set some information in a class */
2933 @REQ(set_class_info)
2934 user_handle_t window; /* handle to the window */
2935 unsigned int flags; /* flags for info to set (see below) */
2936 atom_t atom; /* class atom */
2937 unsigned int style; /* class style */
2938 int win_extra; /* number of window extra bytes */
2939 mod_handle_t instance; /* module instance */
2940 int extra_offset; /* offset to set in extra bytes */
2941 data_size_t extra_size; /* size to set in extra bytes */
2942 lparam_t extra_value; /* value to set in extra bytes */
2944 atom_t old_atom; /* previous class atom */
2945 atom_t base_atom; /* base class atom */
2946 mod_handle_t old_instance; /* previous module instance */
2947 lparam_t old_extra_value; /* old value in extra bytes */
2948 unsigned int old_style; /* previous class style */
2949 int old_extra; /* previous number of class extra bytes */
2950 int old_win_extra; /* previous number of window extra bytes */
2952 #define SET_CLASS_ATOM 0x0001
2953 #define SET_CLASS_STYLE 0x0002
2954 #define SET_CLASS_WINEXTRA 0x0004
2955 #define SET_CLASS_INSTANCE 0x0008
2956 #define SET_CLASS_EXTRA 0x0010
2959 /* Open the clipboard */
2960 @REQ(open_clipboard)
2961 user_handle_t window; /* clipboard window */
2963 user_handle_t owner; /* current clipboard owner */
2967 /* Close the clipboard */
2968 @REQ(close_clipboard)
2970 user_handle_t viewer; /* first clipboard viewer */
2971 user_handle_t owner; /* current clipboard owner */
2975 /* Empty the clipboard and grab ownership */
2976 @REQ(empty_clipboard)
2980 /* Add a data format to the clipboard */
2981 @REQ(set_clipboard_data)
2982 unsigned int format; /* clipboard format of the data */
2983 unsigned int lcid; /* locale id to use for synthesizing text formats */
2984 VARARG(data,bytes); /* data contents */
2986 unsigned int seqno; /* sequence number for the set data */
2990 /* Fetch a data format from the clipboard */
2991 @REQ(get_clipboard_data)
2992 unsigned int format; /* clipboard format of the data */
2993 int render; /* will we try to render it if missing? */
2994 int cached; /* do we already have it in the client-side cache? */
2995 unsigned int seqno; /* sequence number for the data in the cache */
2997 unsigned int from; /* for synthesized data, format to generate it from */
2998 user_handle_t owner; /* clipboard owner for delayed-rendered formats */
2999 unsigned int seqno; /* sequence number for the originally set data */
3000 data_size_t total; /* total data size */
3001 VARARG(data,bytes); /* data contents */
3005 /* Retrieve a list of available formats */
3006 @REQ(get_clipboard_formats)
3007 unsigned int format; /* specific format to query, return all if 0 */
3009 unsigned int count; /* count of available formats */
3010 VARARG(formats,uints); /* array of available formats */
3014 /* Retrieve the next available format */
3015 @REQ(enum_clipboard_formats)
3016 unsigned int previous; /* previous format, or first if 0 */
3018 unsigned int format; /* next format */
3022 /* Release ownership of the clipboard */
3023 @REQ(release_clipboard)
3024 user_handle_t owner; /* clipboard owner to release */
3026 user_handle_t viewer; /* first clipboard viewer */
3027 user_handle_t owner; /* current clipboard owner */
3031 /* Get clipboard information */
3032 @REQ(get_clipboard_info)
3034 user_handle_t window; /* clipboard window */
3035 user_handle_t owner; /* clipboard owner */
3036 user_handle_t viewer; /* clipboard viewer */
3037 unsigned int seqno; /* current sequence number */
3041 /* Set the clipboard viewer window */
3042 @REQ(set_clipboard_viewer)
3043 user_handle_t viewer; /* clipboard viewer */
3044 user_handle_t previous; /* if non-zero, check that this was the previous viewer */
3046 user_handle_t old_viewer; /* previous clipboard viewer */
3047 user_handle_t owner; /* clipboard owner */
3051 /* Add a clipboard listener window */
3052 @REQ(add_clipboard_listener)
3053 user_handle_t window; /* clipboard listener window */
3057 /* Remove a clipboard listener window */
3058 @REQ(remove_clipboard_listener)
3059 user_handle_t window; /* clipboard listener window */
3063 /* Open a security token */
3065 obj_handle_t handle; /* handle to the thread or process */
3066 unsigned int access; /* access rights to the new token */
3067 unsigned int attributes;/* object attributes */
3068 unsigned int flags; /* flags (see below) */
3070 obj_handle_t token; /* handle to the token */
3072 #define OPEN_TOKEN_THREAD 1
3073 #define OPEN_TOKEN_AS_SELF 2
3076 /* Set/get the global windows */
3077 @REQ(set_global_windows)
3078 unsigned int flags; /* flags for fields to set (see below) */
3079 user_handle_t shell_window; /* handle to the new shell window */
3080 user_handle_t shell_listview; /* handle to the new shell listview window */
3081 user_handle_t progman_window; /* handle to the new program manager window */
3082 user_handle_t taskman_window; /* handle to the new task manager window */
3084 user_handle_t old_shell_window; /* handle to the shell window */
3085 user_handle_t old_shell_listview; /* handle to the shell listview window */
3086 user_handle_t old_progman_window; /* handle to the new program manager window */
3087 user_handle_t old_taskman_window; /* handle to the new task manager window */
3089 #define SET_GLOBAL_SHELL_WINDOWS 0x01 /* set both main shell and listview windows */
3090 #define SET_GLOBAL_PROGMAN_WINDOW 0x02
3091 #define SET_GLOBAL_TASKMAN_WINDOW 0x04
3093 /* Adjust the privileges held by a token */
3094 @REQ(adjust_token_privileges)
3095 obj_handle_t handle; /* handle to the token */
3096 int disable_all; /* disable all privileges? */
3097 int get_modified_state; /* get modified privileges? */
3098 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to enable/disable/remove */
3100 unsigned int len; /* total length in bytes required to store token privileges */
3101 VARARG(privileges,LUID_AND_ATTRIBUTES); /* modified privileges */
3104 /* Retrieves the set of privileges held by or available to a token */
3105 @REQ(get_token_privileges)
3106 obj_handle_t handle; /* handle to the token */
3108 unsigned int len; /* total length in bytes required to store token privileges */
3109 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
3112 /* Check the token has the required privileges */
3113 @REQ(check_token_privileges)
3114 obj_handle_t handle; /* handle to the token */
3115 int all_required; /* are all the privileges required for the check to succeed? */
3116 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to check */
3118 int has_privileges; /* does the token have the required privileges? */
3119 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
3122 @REQ(duplicate_token)
3123 obj_handle_t handle; /* handle to the token to duplicate */
3124 unsigned int access; /* access rights to the new token */
3125 int primary; /* is the new token to be a primary one? */
3126 int impersonation_level; /* impersonation level of the new token */
3127 VARARG(objattr,object_attributes); /* object attributes */
3129 obj_handle_t new_handle; /* duplicated handle */
3133 obj_handle_t handle; /* handle to the token to duplicate */
3134 unsigned int flags; /* flags */
3135 data_size_t privileges_size; /* size of privileges */
3136 VARARG(privileges,LUID_AND_ATTRIBUTES,privileges_size); /* privileges to remove from new token */
3137 VARARG(disable_sids,SID); /* array of groups to remove from new token */
3139 obj_handle_t new_handle; /* filtered handle */
3143 obj_handle_t handle; /* handle to the token */
3144 unsigned int desired_access; /* desired access to the object */
3145 generic_map_t mapping; /* mapping to specific rights */
3146 VARARG(sd,security_descriptor); /* security descriptor to check */
3148 unsigned int access_granted; /* access rights actually granted */
3149 unsigned int access_status; /* was access granted? */
3150 unsigned int privileges_len; /* length needed to store privileges */
3151 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges used during access check */
3155 obj_handle_t handle; /* handle to the token */
3156 unsigned int which_sid; /* which SID to retrieve from the token */
3158 data_size_t sid_len; /* length needed to store sid */
3159 VARARG(sid,SID); /* the sid specified by which_sid from the token */
3162 @REQ(get_token_groups)
3163 obj_handle_t handle; /* handle to the token */
3165 data_size_t user_len; /* length needed to store user */
3166 VARARG(user,token_groups); /* groups the token's user belongs to
*/
3169 @
REQ(get_token_default_dacl
)
3170 obj_handle_t handle
; /* handle to the token
*/
3172 data_size_t acl_len
; /* length needed to store access control list
*/
3173 VARARG(acl
,ACL
); /* access control list
*/
3176 @
REQ(set_token_default_dacl
)
3177 obj_handle_t handle
; /* handle to the token
*/
3178 VARARG(acl
,ACL
); /* default dacl to set
*/
3181 @
REQ(set_security_object
)
3182 obj_handle_t handle
; /* handle to the object
*/
3183 unsigned int security_info
; /* which parts of security descriptor to set
*/
3184 VARARG(sd
,security_descriptor
); /* security descriptor to set
*/
3187 @
REQ(get_security_object
)
3188 obj_handle_t handle
; /* handle to the object
*/
3189 unsigned int security_info
; /* which parts of security descriptor to get
*/
3191 unsigned int sd_len
; /* buffer size needed for sd
*/
3192 VARARG(sd
,security_descriptor
); /* retrieved security descriptor
*/
3199 obj_handle_t handle
;
3200 unsigned int access
;
3201 unsigned int attributes
;
3205 /* Return a list of all opened handles
*/
3206 @
REQ(get_system_handles
)
3208 unsigned int count
; /* number of handles
*/
3209 VARARG(data
,handle_infos
); /* array of handle_infos
*/
3213 /* Create a mailslot
*/
3214 @
REQ(create_mailslot
)
3215 unsigned int access
; /* wanted access rights
*/
3216 timeout_t read_timeout
;
3217 unsigned int max_msgsize
;
3218 VARARG(objattr
,object_attributes
); /* object attributes
*/
3220 obj_handle_t handle
; /* handle to the mailslot
*/
3224 /* Set mailslot information
*/
3225 @
REQ(set_mailslot_info
)
3226 obj_handle_t handle
; /* handle to the mailslot
*/
3227 timeout_t read_timeout
;
3230 timeout_t read_timeout
;
3231 unsigned int max_msgsize
;
3233 #define MAILSLOT_SET_READ_TIMEOUT
1
3236 /* Create a directory object
*/
3237 @
REQ(create_directory
)
3238 unsigned int access
; /* access flags
*/
3239 VARARG(objattr
,object_attributes
); /* object attributes
*/
3241 obj_handle_t handle
; /* handle to the directory
*/
3245 /* Open a directory object
*/
3246 @
REQ(open_directory
)
3247 unsigned int access
; /* access flags
*/
3248 unsigned int attributes
; /* object attributes
*/
3249 obj_handle_t rootdir
; /* root directory
*/
3250 VARARG(directory_name
,unicode_str
); /* Directory name
*/
3252 obj_handle_t handle
; /* handle to the directory
*/
3256 /* Get a directory entry by index
*/
3257 @
REQ(get_directory_entry
)
3258 obj_handle_t handle
; /* handle to the directory
*/
3259 unsigned int index
; /* entry index
*/
3261 data_size_t name_len
; /* length of the entry name in bytes
*/
3262 VARARG(name
,unicode_str
,name_len
); /* entry name
*/
3263 VARARG(type
,unicode_str
); /* entry type
*/
3267 /* Create a symbolic link object
*/
3268 @
REQ(create_symlink
)
3269 unsigned int access
; /* access flags
*/
3270 VARARG(objattr
,object_attributes
); /* object attributes
*/
3271 VARARG(target_name
,unicode_str
); /* target name
*/
3273 obj_handle_t handle
; /* handle to the symlink
*/
3277 /* Open a symbolic link object
*/
3279 unsigned int access
; /* access flags
*/
3280 unsigned int attributes
; /* object attributes
*/
3281 obj_handle_t rootdir
; /* root directory
*/
3282 VARARG(name
,unicode_str
); /* symlink name
*/
3284 obj_handle_t handle
; /* handle to the symlink
*/
3288 /* Query a symbolic link object
*/
3290 obj_handle_t handle
; /* handle to the symlink
*/
3292 data_size_t total
; /* total needed size for name
*/
3293 VARARG(target_name
,unicode_str
); /* target name
*/
3297 /* Query basic object information
*/
3298 @
REQ(get_object_info
)
3299 obj_handle_t handle
; /* handle to the object
*/
3301 unsigned int access
; /* granted access mask
*/
3302 unsigned int ref_count
; /* object ref count
*/
3303 unsigned int handle_count
; /* object handle count
*/
3307 /* Query the full name of an object
*/
3308 @
REQ(get_object_name
)
3309 obj_handle_t handle
; /* handle to the object
*/
3311 data_size_t total
; /* total needed size for name
*/
3312 VARARG(name
,unicode_str
); /* object name
*/
3316 /* Query object type name information
*/
3317 @
REQ(get_object_type
)
3318 obj_handle_t handle
; /* handle to the object
*/
3320 VARARG(info
,object_type_info
); /* type information
*/
3324 /* Query type information for all types
*/
3325 @
REQ(get_object_types
)
3327 int count
; /* total count of object types
*/
3328 VARARG(info
,object_types_info
); /* type information
*/
3332 /* Allocate a locally
-unique identifier
*/
3333 @
REQ(allocate_locally_unique_id
)
3339 /* Create a device manager
*/
3340 @
REQ(create_device_manager
)
3341 unsigned int access
; /* wanted access rights
*/
3342 unsigned int attributes
; /* object attributes
*/
3344 obj_handle_t handle
; /* handle to the device
*/
3348 /* Create a device
*/
3350 obj_handle_t rootdir
; /* root directory
*/
3351 client_ptr_t user_ptr
; /* opaque ptr for use by client
*/
3352 obj_handle_t manager
; /* device manager
*/
3353 VARARG(name
,unicode_str
); /* object name
*/
3357 /* Delete a device
*/
3359 obj_handle_t manager
; /* handle to the device manager
*/
3360 client_ptr_t device
; /* pointer to the device
*/
3364 /* Retrieve the next pending device irp request
*/
3365 @
REQ(get_next_device_request
)
3366 obj_handle_t manager
; /* handle to the device manager
*/
3367 obj_handle_t prev
; /* handle to the previous irp
*/
3368 unsigned int status
; /* status of the previous irp
*/
3369 client_ptr_t user_ptr
; /* user pointer of the previous irp
*/
3371 irp_params_t params
; /* irp parameters
*/
3372 obj_handle_t next
; /* handle to the next irp
*/
3373 thread_id_t client_tid
; /* tid of thread calling irp
*/
3374 client_ptr_t client_thread
; /* pointer to thread object of calling irp
*/
3375 data_size_t in_size
; /* total needed input size
*/
3376 VARARG(next_data
,bytes
); /* input data of the next irp
*/
3380 /* Get kernel pointer from server object
*/
3381 @
REQ(get_kernel_object_ptr
)
3382 obj_handle_t manager
; /* handle to the device manager
*/
3383 obj_handle_t handle
; /* object handle
*/
3385 client_ptr_t user_ptr
; /* kernel object pointer
*/
3389 /* Associate kernel pointer with server object
*/
3390 @
REQ(set_kernel_object_ptr
)
3391 obj_handle_t manager
; /* handle to the device manager
*/
3392 obj_handle_t handle
; /* object handle
*/
3393 client_ptr_t user_ptr
; /* kernel object pointer
*/
3397 /* Grab server object reference from kernel object pointer
*/
3398 @
REQ(grab_kernel_object
)
3399 obj_handle_t manager
; /* handle to the device manager
*/
3400 client_ptr_t user_ptr
; /* kernel object pointer
*/
3404 /* Release server object reference from kernel object pointer
*/
3405 @
REQ(release_kernel_object
)
3406 obj_handle_t manager
; /* handle to the device manager
*/
3407 client_ptr_t user_ptr
; /* kernel object pointer
*/
3411 /* Get handle from kernel object pointer
*/
3412 @
REQ(get_kernel_object_handle
)
3413 obj_handle_t manager
; /* handle to the device manager
*/
3414 client_ptr_t user_ptr
; /* kernel object pointer
*/
3415 unsigned int access
; /* wanted access rights
*/
3417 obj_handle_t handle
; /* kernel object handle
*/
3421 /* Make the current process a system process
*/
3422 @
REQ(make_process_system
)
3423 obj_handle_t handle
; /* handle to the process
*/
3425 obj_handle_t event
; /* event signaled when all user processes have exited
*/
3429 /* Get detailed fixed
-size information about a token
*/
3430 @
REQ(get_token_info
)
3431 obj_handle_t handle
; /* handle to the object
*/
3433 luid_t token_id
; /* locally
-unique identifier of the token
*/
3434 luid_t modified_id
; /* locally
-unique identifier of the modified version of the token
*/
3435 unsigned int session_id
; /* token session id
*/
3436 int primary
; /* is the token primary or impersonation?
*/
3437 int impersonation_level
; /* level of impersonation
*/
3438 int elevation
; /* elevation type
*/
3439 int group_count
; /* the number of groups the token is a member of
*/
3440 int privilege_count
; /* the number of privileges the token has
*/
3444 /* Create a token which is an elevation counterpart to this token
*/
3445 @
REQ(create_linked_token
)
3446 obj_handle_t handle
; /* handle to the token
*/
3448 obj_handle_t linked
; /* handle to the linked token
*/
3452 /* Create I
/O completion port
*/
3453 @
REQ(create_completion
)
3454 unsigned int access
; /* desired access to a port
*/
3455 unsigned int concurrent
; /* max number of concurrent active threads
*/
3456 VARARG(objattr
,object_attributes
); /* object attributes
*/
3458 obj_handle_t handle
; /* port handle
*/
3462 /* Open I
/O completion port
*/
3463 @
REQ(open_completion
)
3464 unsigned int access
; /* desired access to a port
*/
3465 unsigned int attributes
; /* object attributes
*/
3466 obj_handle_t rootdir
; /* root directory
*/
3467 VARARG(filename
,unicode_str
); /* port name
*/
3469 obj_handle_t handle
; /* port handle
*/
3473 /* add completion to completion port
*/
3474 @
REQ(add_completion
)
3475 obj_handle_t handle
; /* port handle
*/
3476 apc_param_t ckey
; /* completion key
*/
3477 apc_param_t cvalue
; /* completion value
*/
3478 apc_param_t information
; /* IO_STATUS_BLOCK Information
*/
3479 unsigned int status
; /* completion result
*/
3483 /* get completion from completion port queue
*/
3484 @
REQ(remove_completion
)
3485 obj_handle_t handle
; /* port handle
*/
3487 apc_param_t ckey
; /* completion key
*/
3488 apc_param_t cvalue
; /* completion value
*/
3489 apc_param_t information
; /* IO_STATUS_BLOCK Information
*/
3490 unsigned int status
; /* completion result
*/
3494 /* get completion queue depth
*/
3495 @
REQ(query_completion
)
3496 obj_handle_t handle
; /* port handle
*/
3498 unsigned int depth
; /* completion queue depth
*/
3502 /* associate object with completion port
*/
3503 @
REQ(set_completion_info
)
3504 obj_handle_t handle
; /* object handle
*/
3505 apc_param_t ckey
; /* completion key
*/
3506 obj_handle_t chandle
; /* port handle
*/
3510 /* check for associated completion and push msg
*/
3511 @
REQ(add_fd_completion
)
3512 obj_handle_t handle
; /* async
' object */
3513 apc_param_t cvalue; /* completion value */
3514 apc_param_t information; /* IO_STATUS_BLOCK Information */
3515 unsigned int status; /* completion status */
3516 int async; /* completion is an async result */
3520 /* set fd completion information */
3521 @REQ(set_fd_completion_mode)
3522 obj_handle_t handle; /* handle to a file or directory */
3523 unsigned int flags; /* completion notification flags */
3527 /* set fd disposition information */
3528 @REQ(set_fd_disp_info)
3529 obj_handle_t handle; /* handle to a file or directory */
3530 int unlink; /* whether to unlink file on close */
3534 /* set fd name information */
3535 @REQ(set_fd_name_info)
3536 obj_handle_t handle; /* handle to a file or directory */
3537 obj_handle_t rootdir; /* root directory */
3538 data_size_t namelen; /* length of NT name in bytes */
3539 int link; /* link instead of renaming */
3540 int replace; /* replace an existing file? */
3541 VARARG(name,unicode_str,namelen); /* NT name */
3542 VARARG(filename,string); /* new file name */
3546 /* set fd eof information */
3547 @REQ(set_fd_eof_info)
3548 obj_handle_t handle; /* handle to a file or directory */
3549 file_pos_t eof; /* offset of eof of file */
3553 /* Retrieve layered info for a window */
3554 @REQ(get_window_layered_info)
3555 user_handle_t handle; /* handle to the window */
3557 unsigned int color_key; /* color key */
3558 unsigned int alpha; /* alpha (0..255) */
3559 unsigned int flags; /* LWA_* flags */
3563 /* Set layered info for a window */
3564 @REQ(set_window_layered_info)
3565 user_handle_t handle; /* handle to the window */
3566 unsigned int color_key; /* color key */
3567 unsigned int alpha; /* alpha (0..255) */
3568 unsigned int flags; /* LWA_* flags */
3572 /* Allocate an arbitrary user handle */
3573 @REQ(alloc_user_handle)
3575 user_handle_t handle; /* allocated handle */
3579 /* Free an arbitrary user handle */
3580 @REQ(free_user_handle)
3581 user_handle_t handle; /* handle to free*/
3585 /* Set/get the current cursor */
3587 unsigned int flags; /* flags for fields to set (see below) */
3588 user_handle_t handle; /* handle to the cursor */
3589 int show_count; /* show count increment/decrement */
3590 int x; /* cursor position */
3592 rectangle_t clip; /* cursor clip rectangle */
3593 unsigned int clip_msg; /* message to post on cursor clip changes */
3595 user_handle_t prev_handle; /* previous handle */
3596 int prev_count; /* previous show count */
3597 int prev_x; /* previous position */
3599 int new_x; /* new position */
3601 rectangle_t new_clip; /* new clip rectangle */
3602 unsigned int last_change; /* time of last position change */
3604 #define SET_CURSOR_HANDLE 0x01
3605 #define SET_CURSOR_COUNT 0x02
3606 #define SET_CURSOR_POS 0x04
3607 #define SET_CURSOR_CLIP 0x08
3608 #define SET_CURSOR_NOCLIP 0x10
3610 /* Get the history of the 64 last cursor positions */
3611 @REQ(get_cursor_history)
3613 VARARG(history,cursor_positions);
3617 /* Batch read rawinput message data */
3618 @REQ(get_rawinput_buffer)
3619 data_size_t rawinput_size; /* size of RAWINPUT structure */
3620 data_size_t buffer_size; /* size of output buffer */
3622 data_size_t next_size; /* minimum size to get next message data */
3627 /* Modify the list of registered rawinput devices */
3628 @REQ(update_rawinput_devices)
3629 VARARG(devices,rawinput_devices);
3632 /* Retrieve the list of registered rawinput devices */
3633 @REQ(get_rawinput_devices)
3635 unsigned int device_count;
3636 VARARG(devices,rawinput_devices);
3639 /* Create a new job object */
3641 unsigned int access; /* wanted access rights */
3642 VARARG(objattr,object_attributes); /* object attributes */
3644 obj_handle_t handle; /* handle to the job */
3648 /* Open a job object */
3650 unsigned int access; /* wanted access rights */
3651 unsigned int attributes; /* object attributes */
3652 obj_handle_t rootdir; /* root directory */
3653 VARARG(name,unicode_str); /* object name */
3655 obj_handle_t handle; /* handle to the job */
3659 /* Assign a job object to a process */
3661 obj_handle_t job; /* handle to the job */
3662 obj_handle_t process; /* handle to the process */
3666 /* Check if a process is associated with a job */
3667 @REQ(process_in_job)
3668 obj_handle_t job; /* handle to the job */
3669 obj_handle_t process; /* handle to the process */
3673 /* Set limit flags on a job */
3674 @REQ(set_job_limits)
3675 obj_handle_t handle; /* handle to the job */
3676 unsigned int limit_flags; /* new limit flags */
3680 /* Set new completion port for a job */
3681 @REQ(set_job_completion_port)
3682 obj_handle_t job; /* handle to the job */
3683 obj_handle_t port; /* handle to the completion port */
3684 client_ptr_t key; /* key to send with completion messages */
3688 /* Retrieve information about a job */
3690 obj_handle_t handle; /* handle to the job */
3692 int total_processes; /* total count of processes */
3693 int active_processes; /* count of running processes */
3697 /* Terminate all processes associated with the job */
3699 obj_handle_t handle; /* handle to the job */
3700 int status; /* process exit code */
3704 /* Suspend a process */
3705 @REQ(suspend_process)
3706 obj_handle_t handle; /* process handle */
3710 /* Resume a process */
3711 @REQ(resume_process)
3712 obj_handle_t handle; /* process handle */
3716 /* Iterate thread list for process */
3717 @REQ(get_next_thread)
3718 obj_handle_t process; /* process handle */
3719 obj_handle_t last; /* thread handle to start with */
3720 unsigned int access; /* desired access for returned handle */
3721 unsigned int attributes; /* returned handle attributes */
3722 unsigned int flags; /* controls iteration direction */
3724 obj_handle_t handle; /* next thread handle */