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
*/
128 /* supported CPU types
*/
131 CPU_x86
, CPU_x86_64
, CPU_POWERPC
, CPU_ARM
, CPU_ARM64
133 typedef int client_cpu_t
;
138 client_cpu_t cpu
; /* cpu type
*/
139 unsigned int flags
; /* SERVER_CTX_
* flags
*/
142 struct
{ unsigned int eip
, ebp
, esp
, eflags
, cs
, ss
; } i386_regs
;
143 struct
{ unsigned __int64 rip
, rbp
, rsp
;
144 unsigned int cs
, ss
, flags
, __pad
; } x86_64_regs
;
145 struct
{ unsigned int iar
, msr
, ctr
, lr
, dar
, dsisr
, trap
, __pad
; } powerpc_regs
;
146 struct
{ unsigned int sp
, lr
, pc
, cpsr
; } arm_regs
;
147 struct
{ unsigned __int64 sp
, pc
, pstate
; } arm64_regs
;
148 } ctl
; /* selected by SERVER_CTX_CONTROL
*/
151 struct
{ unsigned int eax
, ebx
, ecx
, edx
, esi
, edi
; } i386_regs
;
152 struct
{ unsigned __int64 rax
,rbx
, rcx
, rdx
, rsi
, rdi
,
153 r8
, r9
, r10
, r11
, r12
, r13
, r14
, r15
; } x86_64_regs
;
154 struct
{ unsigned int gpr
[32], cr
, xer
; } powerpc_regs
;
155 struct
{ unsigned int r
[13]; } arm_regs
;
156 struct
{ unsigned __int64 x
[31]; } arm64_regs
;
157 } integer
; /* selected by SERVER_CTX_INTEGER
*/
160 struct
{ unsigned int ds
, es
, fs
, gs
; } i386_regs
;
161 struct
{ unsigned int ds
, es
, fs
, gs
; } x86_64_regs
;
162 } seg
; /* selected by SERVER_CTX_SEGMENTS
*/
165 struct
{ unsigned int ctrl
, status
, tag
, err_off
, err_sel
, data_off
, data_sel
, cr0npx
;
166 unsigned char regs
[80]; } i386_regs
;
167 struct
{ struct
{ unsigned __int64 low
, high
; } fpregs
[32]; } x86_64_regs
;
168 struct
{ double fpr
[32], fpscr
; } powerpc_regs
;
169 struct
{ unsigned __int64 d
[32]; unsigned int fpscr
; } arm_regs
;
170 struct
{ struct
{ unsigned __int64 low
, high
; } q
[32]; unsigned int fpcr
, fpsr
; } arm64_regs
;
171 } fp
; /* selected by SERVER_CTX_FLOATING_POINT
*/
174 struct
{ unsigned int dr0
, dr1
, dr2
, dr3
, dr6
, dr7
; } i386_regs
;
175 struct
{ unsigned __int64 dr0
, dr1
, dr2
, dr3
, dr6
, dr7
; } x86_64_regs
;
176 struct
{ unsigned int dr
[8]; } powerpc_regs
;
177 struct
{ unsigned int bvr
[8], bcr
[8], wvr
[1], wcr
[1]; } arm_regs
;
178 struct
{ unsigned __int64 bvr
[8], wvr
[2]; unsigned int bcr
[8], wcr
[2]; } arm64_regs
;
179 } debug
; /* selected by SERVER_CTX_DEBUG_REGISTERS
*/
182 unsigned char i386_regs
[512];
183 } ext
; /* selected by SERVER_CTX_EXTENDED_REGISTERS
*/
186 struct
{ struct
{ unsigned __int64 low
, high
; } ymm_high
[16]; } ymm_high_regs
;
187 } ymm
; /* selected by SERVER_CTX_YMM_REGISTERS
*/
190 #define SERVER_CTX_CONTROL
0x01
191 #define SERVER_CTX_INTEGER
0x02
192 #define SERVER_CTX_SEGMENTS
0x04
193 #define SERVER_CTX_FLOATING_POINT
0x08
194 #define SERVER_CTX_DEBUG_REGISTERS
0x10
195 #define SERVER_CTX_EXTENDED_REGISTERS
0x20
196 #define SERVER_CTX_YMM_REGISTERS
0x40
198 /* structure used in sending an fd from client to server
*/
201 thread_id_t tid
; /* thread id
*/
202 int fd
; /* file descriptor on client
-side
*/
205 /* structure sent by the server on the wait fifo
*/
208 client_ptr_t cookie
; /* magic cookie that was passed in select_request
*/
209 int signaled
; /* wait result
*/
213 /* NT
-style timeout
, in
100ns units
, negative means relative timeout
*/
214 typedef __int64 timeout_t
;
215 #define
TIMEOUT_INFINITE (((timeout_t
)0x7fffffff) << 32 |
0xffffffff)
217 /* absolute timeout
, negative means that monotonic clock is used
*/
218 typedef __int64 abstime_t
;
220 /* structure for process startup info
*/
223 unsigned int debug_flags
;
224 unsigned int console_flags
;
225 obj_handle_t console
;
227 obj_handle_t hstdout
;
228 obj_handle_t hstderr
;
235 unsigned int attribute
;
238 data_size_t curdir_len
;
239 data_size_t dllpath_len
;
240 data_size_t imagepath_len
;
241 data_size_t cmdline_len
;
242 data_size_t title_len
;
243 data_size_t desktop_len
;
244 data_size_t shellinfo_len
;
245 data_size_t runtime_len
;
246 /* VARARG(curdir
,unicode_str
,curdir_len
); */
247 /* VARARG(dllpath
,unicode_str
,dllpath_len
); */
248 /* VARARG(imagepath
,unicode_str
,imagepath_len
); */
249 /* VARARG(cmdline
,unicode_str
,cmdline_len
); */
250 /* VARARG(title
,unicode_str
,title_len
); */
251 /* VARARG(desktop
,unicode_str
,desktop_len
); */
252 /* VARARG(shellinfo
,unicode_str
,shellinfo_len
); */
253 /* VARARG(runtime
,unicode_str
,runtime_len
); */
256 /* structure returned in the list of window properties
*/
259 atom_t atom
; /* property atom
*/
260 int string
; /* was atom a string originally?
*/
261 lparam_t data
; /* data stored in property
*/
264 /* structure to specify window rectangles
*/
273 /* structure for parameters of async I
/O calls
*/
276 obj_handle_t handle
; /* object to perform I
/O on
*/
277 obj_handle_t event
; /* event to signal when done
*/
278 client_ptr_t iosb
; /* I
/O status block in client addr space
*/
279 client_ptr_t user
; /* opaque user data containing callback pointer and async
-specific data
*/
280 client_ptr_t apc
; /* user APC to call
*/
281 apc_param_t apc_context
; /* user APC context or completion value
*/
284 /* structures for extra message data
*/
288 unsigned int device
; /* source
device (IMDT_
* values
) */
289 unsigned int origin
; /* source
origin (IMO_
* values
) */
292 struct hardware_msg_data
294 lparam_t info
; /* extra info
*/
295 unsigned int hw_id
; /* unique id
*/
296 unsigned int flags
; /* hook flags
*/
297 struct hw_msg_source source
; /* message source
*/
303 int type
; /* RIM_TYPEKEYBOARD
*/
304 unsigned int message
; /* message generated by this rawinput event
*/
305 unsigned short vkey
; /* virtual key code
*/
306 unsigned short scan
; /* scan code
*/
310 int type
; /* RIM_TYPEMOUSE
*/
311 int x
; /* x coordinate
*/
312 int y
; /* y coordinate
*/
313 unsigned int data
; /* mouse data
*/
318 struct callback_msg_data
320 client_ptr_t callback
; /* callback function
*/
321 lparam_t data
; /* user data for callback
*/
322 lparam_t result
; /* message result
*/
325 struct winevent_msg_data
327 user_handle_t hook
; /* hook handle
*/
328 thread_id_t tid
; /* thread id
*/
329 client_ptr_t hook_proc
; /* hook proc address
*/
330 /* followed by module name if any
*/
338 int type
; /* INPUT_KEYBOARD
*/
339 unsigned short vkey
; /* virtual key code
*/
340 unsigned short scan
; /* scan code
*/
341 unsigned int flags
; /* event flags
*/
342 unsigned int time
; /* event time
*/
343 lparam_t info
; /* extra info
*/
347 int type
; /* INPUT_MOUSE
*/
348 int x
; /* coordinates
*/
350 unsigned int data
; /* mouse data
*/
351 unsigned int flags
; /* event flags
*/
352 unsigned int time
; /* event time
*/
353 lparam_t info
; /* extra info
*/
357 int type
; /* INPUT_HARDWARE
*/
358 unsigned int msg
; /* message code
*/
359 lparam_t lparam
; /* message param
*/
365 unsigned char bytes
[1]; /* raw data for sent messages
*/
366 struct hardware_msg_data hardware
;
367 struct callback_msg_data callback
;
368 struct winevent_msg_data winevent
;
371 /* structure returned in filesystem events
*/
372 struct filesystem_event
381 unsigned int low_part
;
393 #define MAX_ACL_LEN
65535
395 struct security_descriptor
397 unsigned int control
; /* SE_ flags
*/
398 data_size_t owner_len
;
399 data_size_t group_len
;
400 data_size_t sacl_len
;
401 data_size_t dacl_len
;
402 /* VARARG(owner
,SID
); */
403 /* VARARG(group
,SID
); */
404 /* VARARG(sacl
,ACL
); */
405 /* VARARG(dacl
,ACL
); */
408 struct object_attributes
410 obj_handle_t rootdir
; /* root directory
*/
411 unsigned int attributes
; /* object attributes
*/
412 data_size_t sd_len
; /* length of security_descriptor data. may be
0 */
413 data_size_t name_len
; /* length of the name string. may be
0 */
414 /* VARARG(sd
,security_descriptor
); */
415 /* VARARG(name
,unicode_str
); */
418 struct object_type_info
420 data_size_t name_len
; /* length of the name string
*/
421 unsigned int index
; /* type index in global table
*/
422 unsigned int obj_count
; /* count of objects of this type
*/
423 unsigned int handle_count
; /* count of handles of this type
*/
424 unsigned int obj_max
; /* max count of objects of this type
*/
425 unsigned int handle_max
; /* max count of handles of this type
*/
426 unsigned int valid_access
; /* mask for valid access bits
*/
427 generic_map_t mapping
; /* generic access mappings
*/
428 /* VARARG(name
,unicode_str
); */
434 /* unsigned int attributes
[count
]; */
435 /* VARARG(sids
,SID
); */
443 SELECT_SIGNAL_AND_WAIT
,
444 SELECT_KEYED_EVENT_WAIT
,
445 SELECT_KEYED_EVENT_RELEASE
453 enum select_op op
; /* SELECT_WAIT or SELECT_WAIT_ALL
*/
454 obj_handle_t handles
[MAXIMUM_WAIT_OBJECTS
];
458 enum select_op op
; /* SELECT_SIGNAL_AND_WAIT
*/
460 obj_handle_t signal
; /* must be last in the structure so we can remove it on retries
*/
464 enum select_op op
; /* SELECT_KEYED_EVENT_WAIT or SELECT_KEYED_EVENT_RELEASE
*/
494 enum apc_type type
; /* APC_USER
*/
496 client_ptr_t func
; /* void (__stdcall
*func
)(ULONG_PTR
,ULONG_PTR
,ULONG_PTR
); */
497 apc_param_t args
[3]; /* arguments for user function
*/
501 enum apc_type type
; /* APC_TIMER
*/
503 client_ptr_t func
; /* void (__stdcall
*func
)(void
*, unsigned int
, unsigned int
); */
504 abstime_t time
; /* time of expiration
*/
505 client_ptr_t arg
; /* user argument
*/
515 enum apc_type type
; /* APC_ASYNC_IO
*/
516 unsigned int status
; /* I
/O status
*/
517 client_ptr_t user
; /* user pointer
*/
518 client_ptr_t sb
; /* status block
*/
522 enum apc_type type
; /* APC_VIRTUAL_ALLOC
*/
523 unsigned int op_type
; /* type of operation
*/
524 client_ptr_t addr
; /* requested address
*/
525 mem_size_t size
; /* allocation size
*/
526 mem_size_t zero_bits
; /* number of zero high bits
*/
527 unsigned int prot
; /* memory protection flags
*/
531 enum apc_type type
; /* APC_VIRTUAL_FREE
*/
532 unsigned int op_type
; /* type of operation
*/
533 client_ptr_t addr
; /* requested address
*/
534 mem_size_t size
; /* allocation size
*/
538 enum apc_type type
; /* APC_VIRTUAL_QUERY
*/
540 client_ptr_t addr
; /* requested address
*/
544 enum apc_type type
; /* APC_VIRTUAL_PROTECT
*/
545 unsigned int prot
; /* new protection flags
*/
546 client_ptr_t addr
; /* requested address
*/
547 mem_size_t size
; /* requested size
*/
551 enum apc_type type
; /* APC_VIRTUAL_FLUSH
*/
553 client_ptr_t addr
; /* requested address
*/
554 mem_size_t size
; /* requested size
*/
558 enum apc_type type
; /* APC_VIRTUAL_LOCK
*/
560 client_ptr_t addr
; /* requested address
*/
561 mem_size_t size
; /* requested size
*/
565 enum apc_type type
; /* APC_VIRTUAL_UNLOCK
*/
567 client_ptr_t addr
; /* requested address
*/
568 mem_size_t size
; /* requested size
*/
572 enum apc_type type
; /* APC_MAP_VIEW
*/
573 obj_handle_t handle
; /* mapping handle
*/
574 client_ptr_t addr
; /* requested address
*/
575 mem_size_t size
; /* allocation size
*/
576 file_pos_t offset
; /* file offset
*/
577 mem_size_t zero_bits
; /* number of zero high bits
*/
578 unsigned int alloc_type
; /* allocation type
*/
579 unsigned int prot
; /* memory protection flags
*/
583 enum apc_type type
; /* APC_UNMAP_VIEW
*/
585 client_ptr_t addr
; /* view address
*/
589 enum apc_type type
; /* APC_CREATE_THREAD
*/
590 unsigned int flags
; /* creation flags
*/
591 client_ptr_t func
; /* void (__stdcall
*func
)(void*)
; start function
*/
592 client_ptr_t arg
; /* argument for start function
*/
593 mem_size_t reserve
; /* reserve size for thread stack
*/
594 mem_size_t commit
; /* commit size for thread stack
*/
603 enum apc_type type
; /* APC_ASYNC_IO
*/
604 unsigned int status
; /* new status of async operation
*/
605 unsigned int total
; /* bytes transferred
*/
609 enum apc_type type
; /* APC_VIRTUAL_ALLOC
*/
610 unsigned int status
; /* status returned by call
*/
611 client_ptr_t addr
; /* resulting address
*/
612 mem_size_t size
; /* resulting size
*/
616 enum apc_type type
; /* APC_VIRTUAL_FREE
*/
617 unsigned int status
; /* status returned by call
*/
618 client_ptr_t addr
; /* resulting address
*/
619 mem_size_t size
; /* resulting size
*/
623 enum apc_type type
; /* APC_VIRTUAL_QUERY
*/
624 unsigned int status
; /* status returned by call
*/
625 client_ptr_t base
; /* resulting base address
*/
626 client_ptr_t alloc_base
;/* resulting allocation base
*/
627 mem_size_t size
; /* resulting region size
*/
628 unsigned short state
; /* resulting region state
*/
629 unsigned short prot
; /* resulting region protection
*/
630 unsigned short alloc_prot
;/* resulting allocation protection
*/
631 unsigned short alloc_type
;/* resulting region allocation type
*/
635 enum apc_type type
; /* APC_VIRTUAL_PROTECT
*/
636 unsigned int status
; /* status returned by call
*/
637 client_ptr_t addr
; /* resulting address
*/
638 mem_size_t size
; /* resulting size
*/
639 unsigned int prot
; /* old protection flags
*/
643 enum apc_type type
; /* APC_VIRTUAL_FLUSH
*/
644 unsigned int status
; /* status returned by call
*/
645 client_ptr_t addr
; /* resulting address
*/
646 mem_size_t size
; /* resulting size
*/
650 enum apc_type type
; /* APC_VIRTUAL_LOCK
*/
651 unsigned int status
; /* status returned by call
*/
652 client_ptr_t addr
; /* resulting address
*/
653 mem_size_t size
; /* resulting size
*/
657 enum apc_type type
; /* APC_VIRTUAL_UNLOCK
*/
658 unsigned int status
; /* status returned by call
*/
659 client_ptr_t addr
; /* resulting address
*/
660 mem_size_t size
; /* resulting size
*/
664 enum apc_type type
; /* APC_MAP_VIEW
*/
665 unsigned int status
; /* status returned by call
*/
666 client_ptr_t addr
; /* resulting address
*/
667 mem_size_t size
; /* resulting size
*/
671 enum apc_type type
; /* APC_MAP_VIEW
*/
672 unsigned int status
; /* status returned by call
*/
676 enum apc_type type
; /* APC_CREATE_THREAD
*/
677 unsigned int status
; /* status returned by call
*/
678 process_id_t pid
; /* process id
*/
679 thread_id_t tid
; /* thread id
*/
680 client_ptr_t teb
; /* thread
teb (in process address space
) */
681 obj_handle_t handle
; /* handle to new thread
*/
685 enum apc_type type
; /* APC_BREAK_PROCESS
*/
686 unsigned int status
; /* status returned by call
*/
706 enum irp_type type
; /* irp call type
*/
709 enum irp_type type
; /* IRP_CALL_CREATE
*/
710 unsigned int access
; /* access rights
*/
711 unsigned int sharing
; /* sharing flags
*/
712 unsigned int options
; /* file options
*/
713 client_ptr_t device
; /* opaque ptr for the device
*/
714 obj_handle_t file
; /* file handle
*/
718 enum irp_type type
; /* IRP_CALL_CLOSE
*/
720 client_ptr_t file
; /* opaque ptr for the file object
*/
724 enum irp_type type
; /* IRP_CALL_READ
*/
725 unsigned int key
; /* driver key
*/
726 data_size_t out_size
; /* needed output size
*/
728 client_ptr_t file
; /* opaque ptr for the file object
*/
729 file_pos_t pos
; /* file position
*/
733 enum irp_type type
; /* IRP_CALL_WRITE
*/
734 unsigned int key
; /* driver key
*/
735 client_ptr_t file
; /* opaque ptr for the file object
*/
736 file_pos_t pos
; /* file position
*/
740 enum irp_type type
; /* IRP_CALL_FLUSH
*/
742 client_ptr_t file
; /* opaque ptr for the file object
*/
746 enum irp_type type
; /* IRP_CALL_IOCTL
*/
747 ioctl_code_t code
; /* ioctl code
*/
748 data_size_t out_size
; /* needed output size
*/
750 client_ptr_t file
; /* opaque ptr for the file object
*/
754 enum irp_type type
; /* IRP_CALL_VOLUME
*/
755 unsigned int info_class
;/* information class
*/
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_FREE
*/
764 client_ptr_t obj
; /* opaque ptr for the freed object
*/
768 enum irp_type type
; /* IRP_CALL_CANCEL
*/
770 client_ptr_t irp
; /* opaque ptr for canceled irp
*/
774 /* information about a PE image mapping
, roughly equivalent to SECTION_IMAGE_INFORMATION
*/
778 client_ptr_t entry_point
;
780 mem_size_t stack_size
;
781 mem_size_t stack_commit
;
782 unsigned int zerobits
;
783 unsigned int subsystem
;
784 unsigned short subsystem_minor
;
785 unsigned short subsystem_major
;
786 unsigned short osversion_major
;
787 unsigned short osversion_minor
;
788 unsigned short image_charact
;
789 unsigned short dll_charact
;
790 unsigned short machine
;
791 unsigned char contains_code
;
792 unsigned char image_flags
;
793 unsigned int loader_flags
;
794 unsigned int header_size
;
795 unsigned int file_size
;
796 unsigned int checksum
;
797 unsigned int dbg_offset
;
798 unsigned int dbg_size
;
802 #define IMAGE_FLAGS_ComPlusNativeReady
0x01
803 #define IMAGE_FLAGS_ComPlusILOnly
0x02
804 #define IMAGE_FLAGS_ImageDynamicallyRelocated
0x04
805 #define IMAGE_FLAGS_ImageMappedFlat
0x08
806 #define IMAGE_FLAGS_BaseBelow4gb
0x10
807 #define IMAGE_FLAGS_ComPlusPrefer32bit
0x20
808 #define IMAGE_FLAGS_WineBuiltin
0x40
809 #define IMAGE_FLAGS_WineFakeDll
0x80
811 struct rawinput_device
813 unsigned short usage_page
;
814 unsigned short usage
;
816 user_handle_t target
;
828 /****************************************************************/
829 /* Request declarations
*/
831 /* Create a new process from the context of the parent
*/
833 obj_handle_t token
; /* process token
*/
834 obj_handle_t debug
; /* process debug object
*/
835 obj_handle_t parent_process
; /* parent process
*/
836 int inherit_all
; /* inherit all handles from parent
*/
837 unsigned int create_flags
; /* creation flags
*/
838 int socket_fd
; /* file descriptor for process socket
*/
839 unsigned int access
; /* access rights for process object
*/
840 client_cpu_t cpu
; /* CPU that the new process will use
*/
841 data_size_t info_size
; /* size of startup info
*/
842 data_size_t handles_size
; /* length of explicit handles list
*/
843 VARARG(objattr
,object_attributes
); /* object attributes
*/
844 VARARG(handles
,uints
,handles_size
); /* handles list
*/
845 VARARG(info
,startup_info
,info_size
); /* startup information
*/
846 VARARG(env
,unicode_str
); /* environment for new process
*/
848 obj_handle_t info
; /* new process info handle
*/
849 process_id_t pid
; /* process id
*/
850 obj_handle_t handle
; /* process
handle (in the current process
) */
854 /* Execute a process
, replacing the current one
*/
856 int socket_fd
; /* file descriptor for process socket
*/
857 client_cpu_t cpu
; /* CPU that the new process will use
*/
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
)
895 client_ptr_t entry
; /* process entry point
*/
896 int suspend
; /* is process suspended?
*/
900 /* Initialize the first thread of a new process
*/
901 @
REQ(init_first_thread
)
902 int unix_pid
; /* Unix pid of new process
*/
903 int unix_tid
; /* Unix tid of new thread
*/
904 int debug_level
; /* new debug level
*/
905 client_ptr_t teb
; /* TEB of new
thread (in process address space
) */
906 client_ptr_t peb
; /* PEB of new
process (in process address space
) */
907 client_ptr_t ldt_copy
; /* address of LDT
copy (in process address space
) */
908 int reply_fd
; /* fd for reply pipe
*/
909 int wait_fd
; /* fd for blocking calls pipe
*/
910 client_cpu_t cpu
; /* CPU that this thread is running on
*/
912 process_id_t pid
; /* process id of the new thread
's process */
913 thread_id_t tid; /* thread id of the new thread */
914 timeout_t server_start; /* server start time */
915 data_size_t info_size; /* total size of startup info */
916 unsigned int all_cpus; /* bitset of supported CPUs */
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 process_id_t pid; /* process id of the new thread's process
*/
929 thread_id_t tid
; /* thread id of the new thread
*/
930 int suspend
; /* is thread suspended?
*/
934 /* Terminate a process
*/
935 @
REQ(terminate_process
)
936 obj_handle_t handle
; /* process handle to terminate
*/
937 int exit_code
; /* process exit code
*/
939 int self
; /* suicide?
*/
943 /* Terminate a thread
*/
944 @
REQ(terminate_thread
)
945 obj_handle_t handle
; /* thread handle to terminate
*/
946 int exit_code
; /* thread exit code
*/
948 int self
; /* suicide?
*/
952 /* Retrieve information about a process
*/
953 @
REQ(get_process_info
)
954 obj_handle_t handle
; /* process handle
*/
956 process_id_t pid
; /* server process id
*/
957 process_id_t ppid
; /* server process id of parent
*/
958 affinity_t affinity
; /* process affinity mask
*/
959 client_ptr_t peb
; /* PEB address in process address space
*/
960 timeout_t start_time
; /* process start time
*/
961 timeout_t end_time
; /* process end time
*/
962 int exit_code
; /* process exit code
*/
963 int priority
; /* priority class
*/
964 client_cpu_t cpu
; /* CPU that this process is running on
*/
965 VARARG(image
,pe_image_info
); /* image info for main exe
*/
969 /* Retrieve debug information about a process
*/
970 @
REQ(get_process_debug_info
)
971 obj_handle_t handle
; /* process handle
*/
973 obj_handle_t debug
; /* handle to debug port
*/
974 int debug_children
; /* inherit debugger to child processes
*/
975 VARARG(image
,pe_image_info
); /* image info for main exe
*/
979 /* Fetch the name of the process image
*/
980 @
REQ(get_process_image_name
)
981 obj_handle_t handle
; /* process handle
*/
982 int win32
; /* return a win32 filename?
*/
984 data_size_t len
; /* len in bytes required to store filename
*/
985 VARARG(name
,unicode_str
); /* image name for main exe
*/
989 /* Retrieve information about a process memory usage
*/
990 @
REQ(get_process_vm_counters
)
991 obj_handle_t handle
; /* process handle
*/
993 mem_size_t peak_virtual_size
; /* peak virtual memory in bytes
*/
994 mem_size_t virtual_size
; /* virtual memory in bytes
*/
995 mem_size_t peak_working_set_size
; /* peak real memory in bytes
*/
996 mem_size_t working_set_size
; /* real memory in bytes
*/
997 mem_size_t pagefile_usage
; /* commit charge in bytes
*/
998 mem_size_t peak_pagefile_usage
; /* peak commit charge in bytes
*/
1002 /* Set a process information
*/
1003 @
REQ(set_process_info
)
1004 obj_handle_t handle
; /* process handle
*/
1005 int mask
; /* setting
mask (see below
) */
1006 int priority
; /* priority class
*/
1007 affinity_t affinity
; /* affinity mask
*/
1009 #define SET_PROCESS_INFO_PRIORITY
0x01
1010 #define SET_PROCESS_INFO_AFFINITY
0x02
1013 /* Retrieve information about a thread
*/
1014 @
REQ(get_thread_info
)
1015 obj_handle_t handle
; /* thread handle
*/
1016 unsigned int access
; /* required access rights
*/
1018 process_id_t pid
; /* server process id
*/
1019 thread_id_t tid
; /* server thread id
*/
1020 client_ptr_t teb
; /* thread teb pointer
*/
1021 client_ptr_t entry_point
; /* thread entry point
*/
1022 affinity_t affinity
; /* thread affinity mask
*/
1023 int exit_code
; /* thread exit code
*/
1024 int priority
; /* thread priority level
*/
1025 int last
; /* last thread in process
*/
1026 int suspend_count
; /* thread suspend count
*/
1027 int dbg_hidden
; /* thread hidden from debugger
*/
1028 data_size_t desc_len
; /* description length in bytes
*/
1029 VARARG(desc
,unicode_str
); /* description string
*/
1033 /* Retrieve information about thread times
*/
1034 @
REQ(get_thread_times
)
1035 obj_handle_t handle
; /* thread handle
*/
1037 timeout_t creation_time
; /* thread creation time
*/
1038 timeout_t exit_time
; /* thread exit time
*/
1039 int unix_pid
; /* thread native pid
*/
1040 int unix_tid
; /* thread native pid
*/
1044 /* Set a thread information
*/
1045 @
REQ(set_thread_info
)
1046 obj_handle_t handle
; /* thread handle
*/
1047 int mask
; /* setting
mask (see below
) */
1048 int priority
; /* priority class
*/
1049 affinity_t affinity
; /* affinity mask
*/
1050 client_ptr_t entry_point
; /* thread entry point
*/
1051 obj_handle_t token
; /* impersonation token
*/
1052 VARARG(desc
,unicode_str
); /* description string
*/
1054 #define SET_THREAD_INFO_PRIORITY
0x01
1055 #define SET_THREAD_INFO_AFFINITY
0x02
1056 #define SET_THREAD_INFO_TOKEN
0x04
1057 #define SET_THREAD_INFO_ENTRYPOINT
0x08
1058 #define SET_THREAD_INFO_DESCRIPTION
0x10
1059 #define SET_THREAD_INFO_DBG_HIDDEN
0x20
1062 /* Suspend a thread
*/
1063 @
REQ(suspend_thread
)
1064 obj_handle_t handle
; /* thread handle
*/
1066 int count
; /* new suspend count
*/
1070 /* Resume a thread
*/
1072 obj_handle_t handle
; /* thread handle
*/
1074 int count
; /* new suspend count
*/
1078 /* Queue an APC for a thread or process
*/
1080 obj_handle_t handle
; /* thread or process handle
*/
1081 apc_call_t call
; /* call arguments
*/
1083 obj_handle_t handle
; /* APC handle
*/
1084 int self
; /* run APC in caller itself?
*/
1088 /* Get the result of an APC call
*/
1089 @
REQ(get_apc_result
)
1090 obj_handle_t handle
; /* handle to the APC
*/
1092 apc_result_t result
; /* result of the APC
*/
1096 /* Close a handle for the current process
*/
1098 obj_handle_t handle
; /* handle to close
*/
1102 /* Set a handle information
*/
1103 @
REQ(set_handle_info
)
1104 obj_handle_t handle
; /* handle we are interested in
*/
1105 int flags
; /* new handle flags
*/
1106 int mask
; /* mask for flags to set
*/
1108 int old_flags
; /* old flag value
*/
1112 /* Duplicate a handle
*/
1114 obj_handle_t src_process
; /* src process handle
*/
1115 obj_handle_t src_handle
; /* src handle to duplicate
*/
1116 obj_handle_t dst_process
; /* dst process handle
*/
1117 unsigned int access
; /* wanted access rights
*/
1118 unsigned int attributes
; /* object attributes
*/
1119 unsigned int options
; /* duplicate
options (see below
) */
1121 obj_handle_t handle
; /* duplicated handle in dst process
*/
1122 int self
; /* is the source the current process?
*/
1123 int closed
; /* whether the source handle has been closed
*/
1127 /* Make an object temporary
*/
1128 @
REQ(make_temporary
)
1129 obj_handle_t handle
; /* handle to the object
*/
1133 /* Open a handle to a process
*/
1135 process_id_t pid
; /* process id to open
*/
1136 unsigned int access
; /* wanted access rights
*/
1137 unsigned int attributes
; /* object attributes
*/
1139 obj_handle_t handle
; /* handle to the process
*/
1143 /* Open a handle to a thread
*/
1145 thread_id_t tid
; /* thread id to open
*/
1146 unsigned int access
; /* wanted access rights
*/
1147 unsigned int attributes
; /* object attributes
*/
1149 obj_handle_t handle
; /* handle to the thread
*/
1153 /* Wait for handles
*/
1155 int flags
; /* wait
flags (see below
) */
1156 client_ptr_t cookie
; /* magic cookie to return to client
*/
1157 abstime_t timeout
; /* timeout
*/
1158 data_size_t size
; /* size of select_op
*/
1159 obj_handle_t prev_apc
; /* handle to previous APC
*/
1160 VARARG(result
,apc_result
); /* result of previous APC
*/
1161 VARARG(data
,select_op
,size
); /* operation
-specific data
*/
1162 VARARG(context
,context
); /* suspend context
*/
1164 apc_call_t call
; /* APC call arguments
*/
1165 obj_handle_t apc_handle
; /* handle to next APC
*/
1166 VARARG(context
,context
); /* suspend context
*/
1168 #define SELECT_ALERTABLE
1
1169 #define SELECT_INTERRUPTIBLE
2
1172 /* Create an event
*/
1174 unsigned int access
; /* wanted access rights
*/
1175 int manual_reset
; /* manual reset event
*/
1176 int initial_state
; /* initial state of the event
*/
1177 VARARG(objattr
,object_attributes
); /* object attributes
*/
1179 obj_handle_t handle
; /* handle to the event
*/
1182 /* Event operation
*/
1184 obj_handle_t handle
; /* handle to event
*/
1185 int op
; /* event
operation (see below
) */
1187 int state
; /* previous state
*/
1189 enum event_op
{ PULSE_EVENT
, SET_EVENT
, RESET_EVENT
};
1192 obj_handle_t handle
; /* handle to event
*/
1194 int manual_reset
; /* manual reset event
*/
1195 int state
; /* current state of the event
*/
1200 unsigned int access
; /* wanted access rights
*/
1201 unsigned int attributes
; /* object attributes
*/
1202 obj_handle_t rootdir
; /* root directory
*/
1203 VARARG(name
,unicode_str
); /* object name
*/
1205 obj_handle_t handle
; /* handle to the event
*/
1209 /* Create a keyed event
*/
1210 @
REQ(create_keyed_event
)
1211 unsigned int access
; /* wanted access rights
*/
1212 VARARG(objattr
,object_attributes
); /* object attributes
*/
1214 obj_handle_t handle
; /* handle to the event
*/
1217 /* Open a keyed event
*/
1218 @
REQ(open_keyed_event
)
1219 unsigned int access
; /* wanted access rights
*/
1220 unsigned int attributes
; /* object attributes
*/
1221 obj_handle_t rootdir
; /* root directory
*/
1222 VARARG(name
,unicode_str
); /* object name
*/
1224 obj_handle_t handle
; /* handle to the event
*/
1228 /* Create a mutex
*/
1230 unsigned int access
; /* wanted access rights
*/
1231 int owned
; /* initially owned?
*/
1232 VARARG(objattr
,object_attributes
); /* object attributes
*/
1234 obj_handle_t handle
; /* handle to the mutex
*/
1238 /* Release a mutex
*/
1240 obj_handle_t handle
; /* handle to the mutex
*/
1242 unsigned int prev_count
; /* value of internal counter
, before release
*/
1248 unsigned int access
; /* wanted access rights
*/
1249 unsigned int attributes
; /* object attributes
*/
1250 obj_handle_t rootdir
; /* root directory
*/
1251 VARARG(name
,unicode_str
); /* object name
*/
1253 obj_handle_t handle
; /* handle to the mutex
*/
1259 obj_handle_t handle
; /* handle to mutex
*/
1261 unsigned int count
; /* current count of mutex
*/
1262 int owned
; /* true if owned by current thread
*/
1263 int abandoned
; /* true if abandoned
*/
1267 /* Create a semaphore
*/
1268 @
REQ(create_semaphore
)
1269 unsigned int access
; /* wanted access rights
*/
1270 unsigned int initial
; /* initial count
*/
1271 unsigned int max
; /* maximum count
*/
1272 VARARG(objattr
,object_attributes
); /* object attributes
*/
1274 obj_handle_t handle
; /* handle to the semaphore
*/
1278 /* Release a semaphore
*/
1279 @
REQ(release_semaphore
)
1280 obj_handle_t handle
; /* handle to the semaphore
*/
1281 unsigned int count
; /* count to add to semaphore
*/
1283 unsigned int prev_count
; /* previous semaphore count
*/
1286 @
REQ(query_semaphore
)
1287 obj_handle_t handle
; /* handle to the semaphore
*/
1289 unsigned int current
; /* current count
*/
1290 unsigned int max
; /* maximum count
*/
1293 /* Open a semaphore
*/
1294 @
REQ(open_semaphore
)
1295 unsigned int access
; /* wanted access rights
*/
1296 unsigned int attributes
; /* object attributes
*/
1297 obj_handle_t rootdir
; /* root directory
*/
1298 VARARG(name
,unicode_str
); /* object name
*/
1300 obj_handle_t handle
; /* handle to the semaphore
*/
1306 unsigned int access
; /* wanted access rights
*/
1307 unsigned int sharing
; /* sharing flags
*/
1308 int create
; /* file create action
*/
1309 unsigned int options
; /* file options
*/
1310 unsigned int attrs
; /* file attributes for creation
*/
1311 VARARG(objattr
,object_attributes
); /* object attributes
*/
1312 VARARG(filename
,string
); /* file name
*/
1314 obj_handle_t handle
; /* handle to the file
*/
1318 /* Open a file object
*/
1319 @
REQ(open_file_object
)
1320 unsigned int access
; /* wanted access rights
*/
1321 unsigned int attributes
; /* open attributes
*/
1322 obj_handle_t rootdir
; /* root directory
*/
1323 unsigned int sharing
; /* sharing flags
*/
1324 unsigned int options
; /* file options
*/
1325 VARARG(filename
,unicode_str
); /* file name
*/
1327 obj_handle_t handle
; /* handle to the file
*/
1331 /* Allocate a file handle for a Unix fd
*/
1332 @
REQ(alloc_file_handle
)
1333 unsigned int access
; /* wanted access rights
*/
1334 unsigned int attributes
; /* object attributes
*/
1335 int fd
; /* file descriptor on the client side
*/
1337 obj_handle_t handle
; /* handle to the file
*/
1341 /* Get the Unix name from a file handle
*/
1342 @
REQ(get_handle_unix_name
)
1343 obj_handle_t handle
; /* file handle
*/
1345 data_size_t name_len
; /* unix name length
*/
1346 VARARG(name
,string
); /* unix name
*/
1350 /* Get a Unix fd to access a file
*/
1352 obj_handle_t handle
; /* handle to the file
*/
1354 int type
; /* file
type (see below
) */
1355 int cacheable
; /* can fd be cached in the client?
*/
1356 unsigned int access
; /* file access rights
*/
1357 unsigned int options
; /* file open options
*/
1361 FD_TYPE_INVALID
, /* invalid
file (no associated fd
) */
1362 FD_TYPE_FILE
, /* regular file
*/
1363 FD_TYPE_DIR
, /* directory
*/
1364 FD_TYPE_SOCKET
, /* socket
*/
1365 FD_TYPE_SERIAL
, /* serial port
*/
1366 FD_TYPE_PIPE
, /* named pipe
*/
1367 FD_TYPE_MAILSLOT
, /* mailslot
*/
1368 FD_TYPE_CHAR
, /* unspecified char device
*/
1369 FD_TYPE_DEVICE
, /* Windows device file
*/
1374 /* Retrieve (or allocate
) the client
-side directory cache entry
*/
1375 @
REQ(get_directory_cache_entry
)
1376 obj_handle_t handle
; /* handle to the directory
*/
1378 int entry
; /* cache entry on the client side
*/
1379 VARARG(free
,ints
); /* entries that can be freed
*/
1383 /* Flush a file buffers
*/
1385 async_data_t async
; /* async I
/O parameters
*/
1387 obj_handle_t event
; /* event set when finished
*/
1390 /* Query file information
*/
1392 obj_handle_t handle
; /* handle to the file
*/
1393 unsigned int info_class
; /* queried information class
*/
1395 VARARG(data
,bytes
); /* file info data
*/
1398 /* Query volume information
*/
1399 @
REQ(get_volume_info
)
1400 obj_handle_t handle
; /* handle to the file
*/
1401 async_data_t async
; /* async I
/O parameters
*/
1402 unsigned int info_class
; /* queried information class
*/
1404 obj_handle_t wait
; /* handle to wait on for blocking read
*/
1405 VARARG(data
,bytes
); /* volume info data
*/
1408 /* Lock a region of a file
*/
1410 obj_handle_t handle
; /* handle to the file
*/
1411 file_pos_t offset
; /* offset of start of lock
*/
1412 file_pos_t count
; /* count of bytes to lock
*/
1413 int shared
; /* shared or exclusive lock?
*/
1414 int wait
; /* do we want to wait?
*/
1416 obj_handle_t handle
; /* handle to wait on
*/
1417 int overlapped
; /* is it an overlapped I
/O handle?
*/
1421 /* Unlock a region of a file
*/
1423 obj_handle_t handle
; /* handle to the file
*/
1424 file_pos_t offset
; /* offset of start of unlock
*/
1425 file_pos_t count
; /* count of bytes to unlock
*/
1429 /* Set socket event parameters
*/
1430 @
REQ(set_socket_event
)
1431 obj_handle_t handle
; /* handle to the socket
*/
1432 unsigned int mask
; /* event mask
*/
1433 obj_handle_t event
; /* event object
*/
1434 user_handle_t window
; /* window to send the message to
*/
1435 unsigned int msg
; /* message to send
*/
1439 /* Get socket event parameters
*/
1440 @
REQ(get_socket_event
)
1441 obj_handle_t handle
; /* handle to the socket
*/
1442 int service
; /* clear pending?
*/
1443 obj_handle_t c_event
; /* event to clear
*/
1445 unsigned int mask
; /* event mask
*/
1446 unsigned int pmask
; /* pending events
*/
1447 unsigned int state
; /* status bits
*/
1448 VARARG(errors
,ints
); /* event errors
*/
1452 /* Get socket info
*/
1453 @
REQ(get_socket_info
)
1454 obj_handle_t handle
; /* handle to the socket
*/
1456 int family
; /* family
, see socket manpage
*/
1457 int type
; /* type
, see socket manpage
*/
1458 int protocol
; /* protocol
, see socket manpage
*/
1462 /* Re
-enable pending socket events
*/
1463 @
REQ(enable_socket_event
)
1464 obj_handle_t handle
; /* handle to the socket
*/
1465 unsigned int mask
; /* events to re
-enable
*/
1466 unsigned int sstate
; /* status bits to set
*/
1467 unsigned int cstate
; /* status bits to clear
*/
1470 @
REQ(set_socket_deferred
)
1471 obj_handle_t handle
; /* handle to the socket
*/
1472 obj_handle_t deferred
; /* handle to the socket for which
accept() is deferred
*/
1476 /* Retrieve the next pending console ioctl request
*/
1477 @
REQ(get_next_console_request
)
1478 obj_handle_t handle
; /* console server handle
*/
1479 int signal
; /* server signal state
*/
1480 int read
; /* 1 if reporting result of blocked read ioctl
*/
1481 unsigned int status
; /* status of previous ioctl
*/
1482 VARARG(out_data
,bytes
); /* out_data of previous ioctl
*/
1484 unsigned int code
; /* ioctl code
*/
1485 unsigned int output
; /* output id or
0 for input
*/
1486 data_size_t out_size
; /* ioctl output size
*/
1487 VARARG(in_data
,bytes
); /* ioctl in_data
*/
1491 /* enable directory change notifications
*/
1492 @
REQ(read_directory_changes
)
1493 unsigned int filter
; /* notification filter
*/
1494 int subtree
; /* watch the subtree?
*/
1495 int want_data
; /* flag indicating whether change data should be collected
*/
1496 async_data_t async
; /* async I
/O parameters
*/
1501 obj_handle_t handle
;
1503 VARARG(events
,filesystem_event
); /* collected filesystem events
*/
1507 /* Create a file mapping
*/
1508 @
REQ(create_mapping
)
1509 unsigned int access
; /* wanted access rights
*/
1510 unsigned int flags
; /* SEC_
* flags
*/
1511 unsigned int file_access
; /* file access rights
*/
1512 mem_size_t size
; /* mapping size
*/
1513 obj_handle_t file_handle
; /* file handle
*/
1514 VARARG(objattr
,object_attributes
); /* object attributes
*/
1516 obj_handle_t handle
; /* handle to the mapping
*/
1520 /* Open a mapping
*/
1522 unsigned int access
; /* wanted access rights
*/
1523 unsigned int attributes
; /* object attributes
*/
1524 obj_handle_t rootdir
; /* root directory
*/
1525 VARARG(name
,unicode_str
); /* object name
*/
1527 obj_handle_t handle
; /* handle to the mapping
*/
1531 /* Get information about a file mapping
*/
1532 @
REQ(get_mapping_info
)
1533 obj_handle_t handle
; /* handle to the mapping
*/
1534 unsigned int access
; /* wanted access rights
*/
1536 mem_size_t size
; /* mapping size
*/
1537 unsigned int flags
; /* SEC_
* flags
*/
1538 obj_handle_t shared_file
; /* shared mapping file handle
*/
1539 VARARG(image
,pe_image_info
);/* image info for SEC_IMAGE mappings
*/
1543 /* Add a memory view in the current process
*/
1545 obj_handle_t mapping
; /* file mapping handle
, or
0 for .so builtin
*/
1546 unsigned int access
; /* wanted access rights
*/
1547 client_ptr_t base
; /* view base
address (page
-aligned
) */
1548 mem_size_t size
; /* view size
*/
1549 file_pos_t start
; /* start offset in mapping
*/
1550 VARARG(image
,pe_image_info
);/* image info for .so builtins
*/
1551 VARARG(name
,unicode_str
); /* image filename for .so builtins
*/
1555 /* Unmap a memory view from the current process
*/
1557 client_ptr_t base
; /* view base address
*/
1561 /* Get a range of committed pages in a file mapping
*/
1562 @
REQ(get_mapping_committed_range
)
1563 client_ptr_t base
; /* view base address
*/
1564 file_pos_t offset
; /* starting
offset (page
-aligned
, in bytes
) */
1566 mem_size_t size
; /* size of range starting at
offset (page
-aligned
, in bytes
) */
1567 int committed
; /* whether it is a committed range
*/
1571 /* Add a range to the committed pages in a file mapping
*/
1572 @
REQ(add_mapping_committed_range
)
1573 client_ptr_t base
; /* view base address
*/
1574 file_pos_t offset
; /* starting
offset (page
-aligned
, in bytes
) */
1575 mem_size_t size
; /* size to
set (page
-aligned
, in bytes
) or
0 if only retrieving
*/
1579 /* Check if two memory maps are for the same file
*/
1580 @
REQ(is_same_mapping
)
1581 client_ptr_t base1
; /* first view base address
*/
1582 client_ptr_t base2
; /* second view base address
*/
1586 /* Get the filename of a mapping
*/
1587 @
REQ(get_mapping_filename
)
1588 obj_handle_t process
; /* process handle
*/
1589 client_ptr_t addr
; /* address inside mapped
view (in process address space
) */
1591 data_size_t len
; /* total filename length in bytes
*/
1592 VARARG(filename
,unicode_str
); /* filename in NT format
*/
1598 timeout_t start_time
;
1601 int current_priority
;
1607 timeout_t start_time
;
1608 data_size_t name_len
;
1612 process_id_t parent_pid
;
1616 /* VARARG(name
,unicode_str
,name_len
); */
1617 /* VARARG(threads
,struct thread_info
,thread_count
); */
1620 /* Get a list of processes and threads currently running
*/
1621 @
REQ(list_processes
)
1623 data_size_t info_size
;
1625 VARARG(data
,process_info
,info_size
);
1629 /* Create a debug object
*/
1630 @
REQ(create_debug_obj
)
1631 unsigned int access
; /* wanted access rights
*/
1632 unsigned int flags
; /* object flags
*/
1633 VARARG(objattr
,object_attributes
); /* object attributes
*/
1635 obj_handle_t handle
; /* handle to the debug object
*/
1639 /* Wait for a debug event
*/
1640 @
REQ(wait_debug_event
)
1641 obj_handle_t debug
; /* debug object
*/
1643 process_id_t pid
; /* process id
*/
1644 thread_id_t tid
; /* thread id
*/
1645 VARARG(event
,debug_event
); /* debug event data
*/
1649 /* Queue an exception event
*/
1650 @
REQ(queue_exception_event
)
1651 int first
; /* first chance exception?
*/
1652 unsigned int code
; /* exception code
*/
1653 unsigned int flags
; /* exception flags
*/
1654 client_ptr_t record
; /* exception record
*/
1655 client_ptr_t address
; /* exception address
*/
1656 data_size_t len
; /* size of parameters
*/
1657 VARARG(params
,uints64
,len
);/* exception parameters
*/
1659 obj_handle_t handle
; /* handle to the queued event
*/
1663 /* Retrieve the status of an exception event
*/
1664 @
REQ(get_exception_status
)
1665 obj_handle_t handle
; /* handle to the queued event
*/
1669 /* Continue a debug event
*/
1670 @
REQ(continue_debug_event
)
1671 obj_handle_t debug
; /* debug object
*/
1672 process_id_t pid
; /* process id to continue
*/
1673 thread_id_t tid
; /* thread id to continue
*/
1674 unsigned int status
; /* continuation status
*/
1678 /* Start or stop debugging an existing process
*/
1680 obj_handle_t handle
; /* process handle
*/
1681 obj_handle_t debug
; /* debug object to attach to the process
*/
1682 int attach
; /* 1=attaching
/ 0=detaching from the process
*/
1686 /* Set debug object information
*/
1687 @
REQ(set_debug_obj_info
)
1688 obj_handle_t debug
; /* debug object
*/
1689 unsigned int flags
; /* object flags
*/
1693 /* Read data from a process address space
*/
1694 @
REQ(read_process_memory
)
1695 obj_handle_t handle
; /* process handle
*/
1696 client_ptr_t addr
; /* addr to read from
*/
1698 VARARG(data
,bytes
); /* result data
*/
1702 /* Write data to a process address space
*/
1703 @
REQ(write_process_memory
)
1704 obj_handle_t handle
; /* process handle
*/
1705 client_ptr_t addr
; /* addr to write to
*/
1706 VARARG(data
,bytes
); /* data to write
*/
1710 /* Create a registry key
*/
1712 unsigned int access
; /* desired access rights
*/
1713 unsigned int options
; /* creation options
*/
1714 VARARG(objattr
,object_attributes
); /* object attributes
*/
1715 VARARG(class
,unicode_str
); /* class name
*/
1717 obj_handle_t hkey
; /* handle to the created key
*/
1718 int created
; /* has it been newly created?
*/
1721 /* Open a registry key
*/
1723 obj_handle_t parent
; /* handle to the parent key
*/
1724 unsigned int access
; /* desired access rights
*/
1725 unsigned int attributes
; /* object attributes
*/
1726 VARARG(name
,unicode_str
); /* key name
*/
1728 obj_handle_t hkey
; /* handle to the open key
*/
1732 /* Delete a registry key
*/
1734 obj_handle_t hkey
; /* handle to the key
*/
1738 /* Flush a registry key
*/
1740 obj_handle_t hkey
; /* handle to the key
*/
1744 /* Enumerate registry subkeys
*/
1746 obj_handle_t hkey
; /* handle to registry key
*/
1747 int index
; /* index of
subkey (or
-1 for current key
) */
1748 int info_class
; /* requested information class
*/
1750 int subkeys
; /* number of subkeys
*/
1751 int max_subkey
; /* longest subkey name
*/
1752 int max_class
; /* longest class name
*/
1753 int values
; /* number of values
*/
1754 int max_value
; /* longest value name
*/
1755 int max_data
; /* longest value data
*/
1756 timeout_t modif
; /* last modification time
*/
1757 data_size_t total
; /* total length needed for full name and class
*/
1758 data_size_t namelen
; /* length of key name in bytes
*/
1759 VARARG(name
,unicode_str
,namelen
); /* key name
*/
1760 VARARG(class
,unicode_str
); /* class name
*/
1764 /* Set a value of a registry key
*/
1766 obj_handle_t hkey
; /* handle to registry key
*/
1767 int type
; /* value type
*/
1768 data_size_t namelen
; /* length of value name in bytes
*/
1769 VARARG(name
,unicode_str
,namelen
); /* value name
*/
1770 VARARG(data
,bytes
); /* value data
*/
1774 /* Retrieve the value of a registry key
*/
1776 obj_handle_t hkey
; /* handle to registry key
*/
1777 VARARG(name
,unicode_str
); /* value name
*/
1779 int type
; /* value type
*/
1780 data_size_t total
; /* total length needed for data
*/
1781 VARARG(data
,bytes
); /* value data
*/
1785 /* Enumerate a value of a registry key
*/
1786 @
REQ(enum_key_value
)
1787 obj_handle_t hkey
; /* handle to registry key
*/
1788 int index
; /* value index
*/
1789 int info_class
; /* requested information class
*/
1791 int type
; /* value type
*/
1792 data_size_t total
; /* total length needed for full name and data
*/
1793 data_size_t namelen
; /* length of value name in bytes
*/
1794 VARARG(name
,unicode_str
,namelen
); /* value name
*/
1795 VARARG(data
,bytes
); /* value data
*/
1799 /* Delete a value of a registry key
*/
1800 @
REQ(delete_key_value
)
1801 obj_handle_t hkey
; /* handle to registry key
*/
1802 VARARG(name
,unicode_str
); /* value name
*/
1806 /* Load a registry branch from a file
*/
1808 obj_handle_t file
; /* file to load from
*/
1809 VARARG(objattr
,object_attributes
); /* object attributes
*/
1813 /* UnLoad a registry branch from a file
*/
1814 @
REQ(unload_registry
)
1815 obj_handle_t parent
; /* handle to the parent key
*/
1816 unsigned int attributes
; /* object attributes
*/
1817 VARARG(name
,unicode_str
); /* key name
*/
1821 /* Save a registry branch to a file
*/
1823 obj_handle_t hkey
; /* key to save
*/
1824 obj_handle_t file
; /* file to save to
*/
1828 /* Add a registry key change notification
*/
1829 @
REQ(set_registry_notification
)
1830 obj_handle_t hkey
; /* key to watch for changes
*/
1831 obj_handle_t event
; /* event to set
*/
1832 int subtree
; /* should we watch the whole subtree?
*/
1833 unsigned int filter
; /* things to watch
*/
1837 /* Create a waitable timer
*/
1839 unsigned int access
; /* wanted access rights
*/
1840 int manual
; /* manual reset
*/
1841 VARARG(objattr
,object_attributes
); /* object attributes
*/
1843 obj_handle_t handle
; /* handle to the timer
*/
1847 /* Open a waitable timer
*/
1849 unsigned int access
; /* wanted access rights
*/
1850 unsigned int attributes
; /* object attributes
*/
1851 obj_handle_t rootdir
; /* root directory
*/
1852 VARARG(name
,unicode_str
); /* object name
*/
1854 obj_handle_t handle
; /* handle to the timer
*/
1857 /* Set a waitable timer
*/
1859 obj_handle_t handle
; /* handle to the timer
*/
1860 timeout_t expire
; /* next expiration absolute time
*/
1861 client_ptr_t callback
; /* callback function
*/
1862 client_ptr_t arg
; /* callback argument
*/
1863 int period
; /* timer period in ms
*/
1865 int signaled
; /* was the timer signaled before this call ?
*/
1868 /* Cancel a waitable timer
*/
1870 obj_handle_t handle
; /* handle to the timer
*/
1872 int signaled
; /* was the timer signaled before this calltime ?
*/
1875 /* Get information on a waitable timer
*/
1876 @
REQ(get_timer_info
)
1877 obj_handle_t handle
; /* handle to the timer
*/
1879 timeout_t when
; /* absolute time when the timer next expires
*/
1880 int signaled
; /* is the timer signaled?
*/
1884 /* Retrieve the current context of a thread
*/
1885 @
REQ(get_thread_context
)
1886 obj_handle_t handle
; /* thread or context handle
*/
1887 unsigned int flags
; /* context flags
*/
1889 int self
; /* was it a handle to the current thread?
*/
1890 obj_handle_t handle
; /* pending context handle
*/
1891 VARARG(context
,context
); /* thread context
*/
1895 /* Set the current context of a thread
*/
1896 @
REQ(set_thread_context
)
1897 obj_handle_t handle
; /* thread handle
*/
1898 VARARG(context
,context
); /* thread context
*/
1900 int self
; /* was it a handle to the current thread?
*/
1904 /* Fetch a selector entry for a thread
*/
1905 @
REQ(get_selector_entry
)
1906 obj_handle_t handle
; /* thread handle
*/
1907 int entry
; /* LDT entry
*/
1909 unsigned int base
; /* selector base
*/
1910 unsigned int limit
; /* selector limit
*/
1911 unsigned char flags
; /* selector flags
*/
1917 VARARG(name
,unicode_str
); /* atom name
*/
1919 atom_t atom
; /* resulting atom
*/
1923 /* Delete an atom
*/
1925 atom_t atom
; /* atom handle
*/
1931 VARARG(name
,unicode_str
); /* atom name
*/
1933 atom_t atom
; /* atom handle
*/
1937 /* Get information about an atom
*/
1938 @
REQ(get_atom_information
)
1939 atom_t atom
; /* atom handle
*/
1941 int count
; /* atom lock count
*/
1942 int pinned
; /* whether the atom has been pinned
*/
1943 data_size_t total
; /* actual length of atom name
*/
1944 VARARG(name
,unicode_str
); /* atom name
*/
1948 /* Get the message queue of the current thread
*/
1951 obj_handle_t handle
; /* handle to the queue
*/
1955 /* Set the file descriptor associated to the current thread queue
*/
1957 obj_handle_t handle
; /* handle to the file descriptor
*/
1961 /* Set the current message queue wakeup mask
*/
1962 @
REQ(set_queue_mask
)
1963 unsigned int wake_mask
; /* wakeup bits mask
*/
1964 unsigned int changed_mask
; /* changed bits mask
*/
1965 int skip_wait
; /* will we skip waiting if signaled?
*/
1967 unsigned int wake_bits
; /* current wake bits
*/
1968 unsigned int changed_bits
; /* current changed bits
*/
1972 /* Get the current message queue status
*/
1973 @
REQ(get_queue_status
)
1974 unsigned int clear_bits
; /* should we clear the change bits?
*/
1976 unsigned int wake_bits
; /* wake bits
*/
1977 unsigned int changed_bits
; /* changed bits since last time
*/
1981 /* Retrieve the process idle event
*/
1982 @
REQ(get_process_idle_event
)
1983 obj_handle_t handle
; /* process handle
*/
1985 obj_handle_t event
; /* handle to idle event
*/
1989 /* Send a message to a thread queue
*/
1991 thread_id_t id
; /* thread id
*/
1992 int type
; /* message
type (see below
) */
1993 int flags
; /* message
flags (see below
) */
1994 user_handle_t win
; /* window handle
*/
1995 unsigned int msg
; /* message code
*/
1996 lparam_t wparam
; /* parameters
*/
1997 lparam_t lparam
; /* parameters
*/
1998 timeout_t timeout
; /* timeout for reply
*/
1999 VARARG(data
,message_data
); /* message data for sent messages
*/
2002 @
REQ(post_quit_message
)
2003 int exit_code
; /* exit code to return
*/
2008 MSG_ASCII
, /* Ascii
message (from SendMessageA
) */
2009 MSG_UNICODE
, /* Unicode
message (from SendMessageW
) */
2010 MSG_NOTIFY
, /* notify
message (from SendNotifyMessageW
), always Unicode
*/
2011 MSG_CALLBACK
, /* callback
message (from SendMessageCallbackW
), always Unicode
*/
2012 MSG_CALLBACK_RESULT
,/* result of a callback message
*/
2013 MSG_OTHER_PROCESS
, /* sent from other process
, may include vararg data
, always Unicode
*/
2014 MSG_POSTED
, /* posted
message (from PostMessageW
), always Unicode
*/
2015 MSG_HARDWARE
, /* hardware message
*/
2016 MSG_WINEVENT
, /* winevent message
*/
2017 MSG_HOOK_LL
/* low
-level hardware hook
*/
2019 #define SEND_MSG_ABORT_IF_HUNG
0x01
2022 /* Send a hardware message to a thread queue
*/
2023 @
REQ(send_hardware_message
)
2024 user_handle_t win
; /* window handle
*/
2025 hw_input_t input
; /* input data
*/
2026 unsigned int flags
; /* flags (see below
) */
2028 int wait
; /* do we need to wait for a reply?
*/
2029 int prev_x
; /* previous cursor position
*/
2031 int new_x
; /* new cursor position
*/
2033 VARARG(keystate
,bytes
); /* global state array for all the keys
*/
2035 #define SEND_HWMSG_INJECTED
0x01
2038 /* Get a message from the current queue
*/
2040 unsigned int flags
; /* PM_
* flags
*/
2041 user_handle_t get_win
; /* window handle to get
*/
2042 unsigned int get_first
; /* first message code to get
*/
2043 unsigned int get_last
; /* last message code to get
*/
2044 unsigned int hw_id
; /* id of the previous hardware
message (or
0) */
2045 unsigned int wake_mask
; /* wakeup bits mask
*/
2046 unsigned int changed_mask
; /* changed bits mask
*/
2048 user_handle_t win
; /* window handle
*/
2049 unsigned int msg
; /* message code
*/
2050 lparam_t wparam
; /* parameters
*/
2051 lparam_t lparam
; /* parameters
*/
2052 int type
; /* message type
*/
2053 int x
; /* message x position
*/
2054 int y
; /* message y position
*/
2055 unsigned int time
; /* message time
*/
2056 unsigned int active_hooks
; /* active hooks bitmap
*/
2057 data_size_t total
; /* total size of extra data
*/
2058 VARARG(data
,message_data
); /* message data for sent messages
*/
2062 /* Reply to a sent message
*/
2064 int remove
; /* should we remove the message?
*/
2065 lparam_t result
; /* message result
*/
2066 VARARG(data
,bytes
); /* message data for sent messages
*/
2070 /* Accept and remove the current hardware message
*/
2071 @
REQ(accept_hardware_message
)
2072 unsigned int hw_id
; /* id of the hardware message
*/
2076 /* Retrieve the reply for the last message sent
*/
2077 @
REQ(get_message_reply
)
2078 int cancel
; /* cancel message if not ready?
*/
2080 lparam_t result
; /* message result
*/
2081 VARARG(data
,bytes
); /* message data for sent messages
*/
2085 /* Set a window timer
*/
2087 user_handle_t win
; /* window handle
*/
2088 unsigned int msg
; /* message to post
*/
2089 unsigned int rate
; /* timer rate in ms
*/
2090 lparam_t id
; /* timer id
*/
2091 lparam_t lparam
; /* message
lparam (callback proc
) */
2093 lparam_t id
; /* timer id
*/
2097 /* Kill a window timer
*/
2098 @
REQ(kill_win_timer
)
2099 user_handle_t win
; /* window handle
*/
2100 lparam_t id
; /* timer id
*/
2101 unsigned int msg
; /* message to post
*/
2105 /* check if the thread owning the window is hung
*/
2106 @
REQ(is_window_hung
)
2107 user_handle_t win
; /* window handle
*/
2113 /* Retrieve info about a serial port
*/
2114 @
REQ(get_serial_info
)
2115 obj_handle_t handle
; /* handle to comm port
*/
2118 unsigned int eventmask
;
2119 unsigned int cookie
;
2120 unsigned int pending_write
;
2124 /* Set info about a serial port
*/
2125 @
REQ(set_serial_info
)
2126 obj_handle_t handle
; /* handle to comm port
*/
2127 int flags
; /* bitmask to set
values (see below
) */
2129 #define SERIALINFO_PENDING_WRITE
0x04
2130 #define SERIALINFO_PENDING_WAIT
0x08
2133 /* Create an async I
/O
*/
2134 @
REQ(register_async
)
2135 int type
; /* type of queue to look after
*/
2136 async_data_t async
; /* async I
/O parameters
*/
2137 int count
; /* count
- usually # of bytes to be read
/written
*/
2139 #define ASYNC_TYPE_READ
0x01
2140 #define ASYNC_TYPE_WRITE
0x02
2141 #define ASYNC_TYPE_WAIT
0x03
2144 /* Cancel all async op on a fd
*/
2146 obj_handle_t handle
; /* handle to comm port
, socket or file
*/
2147 client_ptr_t iosb
; /* I
/O status
block (NULL
=all
) */
2148 int only_thread
; /* cancel matching this thread
*/
2152 /* Retrieve results of an async
*/
2153 @
REQ(get_async_result
)
2154 client_ptr_t user_arg
; /* user arg used to identify async
*/
2156 data_size_t size
; /* result
size (input or output depending on the operation
) */
2157 VARARG(out_data
,bytes
); /* iosb output data
*/
2161 /* Perform a read on a file object
*/
2163 async_data_t async
; /* async I
/O parameters
*/
2164 file_pos_t pos
; /* read position
*/
2166 obj_handle_t wait
; /* handle to wait on for blocking read
*/
2167 unsigned int options
; /* device open options
*/
2168 VARARG(data
,bytes
); /* read data
*/
2172 /* Perform a write on a file object
*/
2174 async_data_t async
; /* async I
/O parameters
*/
2175 file_pos_t pos
; /* write position
*/
2176 VARARG(data
,bytes
); /* write data
*/
2178 obj_handle_t wait
; /* handle to wait on for blocking write
*/
2179 unsigned int options
; /* device open options
*/
2180 data_size_t size
; /* size written
*/
2184 /* Perform an ioctl on a file
*/
2186 ioctl_code_t code
; /* ioctl code
*/
2187 async_data_t async
; /* async I
/O parameters
*/
2188 VARARG(in_data
,bytes
); /* ioctl input data
*/
2190 obj_handle_t wait
; /* handle to wait on for blocking ioctl
*/
2191 unsigned int options
; /* device open options
*/
2192 VARARG(out_data
,bytes
); /* ioctl output data
*/
2196 /* Store results of an async irp
*/
2197 @
REQ(set_irp_result
)
2198 obj_handle_t handle
; /* handle to the irp
*/
2199 unsigned int status
; /* status of the irp
*/
2200 data_size_t size
; /* result
size (input or output depending on the operation
) */
2201 VARARG(data
,bytes
); /* output data of the irp
*/
2205 /* Create a named pipe
*/
2206 @
REQ(create_named_pipe
)
2207 unsigned int access
;
2208 unsigned int options
;
2209 unsigned int sharing
;
2210 unsigned int maxinstances
;
2211 unsigned int outsize
;
2212 unsigned int insize
;
2215 VARARG(objattr
,object_attributes
); /* object attributes
*/
2217 obj_handle_t handle
; /* handle to the pipe
*/
2220 /* flags in create_named_pipe and get_named_pipe_info
*/
2221 #define NAMED_PIPE_MESSAGE_STREAM_WRITE
0x0001
2222 #define NAMED_PIPE_MESSAGE_STREAM_READ
0x0002
2223 #define NAMED_PIPE_NONBLOCKING_MODE
0x0004
2224 #define NAMED_PIPE_SERVER_END
0x8000
2226 /* Set named pipe information by handle
*/
2227 @
REQ(set_named_pipe_info
)
2228 obj_handle_t handle
;
2232 /* Create a window
*/
2234 user_handle_t parent
; /* parent window
*/
2235 user_handle_t owner
; /* owner window
*/
2236 atom_t atom
; /* class atom
*/
2237 mod_handle_t instance
; /* module instance
*/
2238 int dpi
; /* system DPI
*/
2239 int awareness
; /* thread DPI awareness
*/
2240 VARARG(class
,unicode_str
); /* class name
*/
2242 user_handle_t handle
; /* created window
*/
2243 user_handle_t parent
; /* full handle of parent
*/
2244 user_handle_t owner
; /* full handle of owner
*/
2245 int extra
; /* number of extra bytes
*/
2246 client_ptr_t class_ptr
; /* pointer to class in client address space
*/
2247 int dpi
; /* window DPI if not per
-monitor aware
*/
2248 int awareness
; /* window DPI awareness
*/
2252 /* Destroy a window
*/
2253 @
REQ(destroy_window
)
2254 user_handle_t handle
; /* handle to the window
*/
2258 /* Retrieve the desktop window for the current thread
*/
2259 @
REQ(get_desktop_window
)
2260 int force
; /* force creation if it doesn
't exist */
2262 user_handle_t top_window; /* handle to the desktop window */
2263 user_handle_t msg_window; /* handle to the top-level HWND_MESSAGE parent */
2267 /* Set a window owner */
2268 @REQ(set_window_owner)
2269 user_handle_t handle; /* handle to the window */
2270 user_handle_t owner; /* new owner */
2272 user_handle_t full_owner; /* full handle of new owner */
2273 user_handle_t prev_owner; /* full handle of previous owner */
2277 /* Get information from a window handle */
2278 @REQ(get_window_info)
2279 user_handle_t handle; /* handle to the window */
2281 user_handle_t full_handle; /* full 32-bit handle */
2282 user_handle_t last_active; /* last active popup */
2283 process_id_t pid; /* process owning the window */
2284 thread_id_t tid; /* thread owning the window */
2285 atom_t atom; /* class atom */
2286 int is_unicode; /* ANSI or unicode */
2287 int dpi; /* window DPI */
2288 int awareness; /* DPI awareness */
2292 /* Set some information in a window */
2293 @REQ(set_window_info)
2294 unsigned short flags; /* flags for fields to set (see below) */
2295 short int is_unicode; /* ANSI or unicode */
2296 user_handle_t handle; /* handle to the window */
2297 unsigned int style; /* window style */
2298 unsigned int ex_style; /* window extended style */
2299 unsigned int id; /* window id */
2300 mod_handle_t instance; /* creator instance */
2301 lparam_t user_data; /* user-specific data */
2302 int extra_offset; /* offset to set in extra bytes */
2303 data_size_t extra_size; /* size to set in extra bytes */
2304 lparam_t extra_value; /* value to set in extra bytes */
2306 unsigned int old_style; /* old window style */
2307 unsigned int old_ex_style; /* old window extended style */
2308 mod_handle_t old_instance; /* old creator instance */
2309 lparam_t old_user_data; /* old user-specific data */
2310 lparam_t old_extra_value; /* old value in extra bytes */
2311 unsigned int old_id; /* old window id */
2313 #define SET_WIN_STYLE 0x01
2314 #define SET_WIN_EXSTYLE 0x02
2315 #define SET_WIN_ID 0x04
2316 #define SET_WIN_INSTANCE 0x08
2317 #define SET_WIN_USERDATA 0x10
2318 #define SET_WIN_EXTRA 0x20
2319 #define SET_WIN_UNICODE 0x40
2322 /* Set the parent of a window */
2324 user_handle_t handle; /* handle to the window */
2325 user_handle_t parent; /* handle to the parent */
2327 user_handle_t old_parent; /* old parent window */
2328 user_handle_t full_parent; /* full handle of new parent */
2329 int dpi; /* new window DPI if not per-monitor aware */
2330 int awareness; /* new DPI awareness */
2334 /* Get a list of the window parents, up to the root of the tree */
2335 @REQ(get_window_parents)
2336 user_handle_t handle; /* handle to the window */
2338 int count; /* total count of parents */
2339 VARARG(parents,user_handles); /* parent handles */
2343 /* Get a list of the window children */
2344 @REQ(get_window_children)
2345 obj_handle_t desktop; /* handle to desktop */
2346 user_handle_t parent; /* parent window */
2347 atom_t atom; /* class atom for the listed children */
2348 thread_id_t tid; /* thread owning the listed children */
2349 VARARG(class,unicode_str); /* class name */
2351 int count; /* total count of children */
2352 VARARG(children,user_handles); /* children handles */
2356 /* Get a list of the window children that contain a given point */
2357 @REQ(get_window_children_from_point)
2358 user_handle_t parent; /* parent window */
2359 int x; /* point in parent coordinates */
2361 int dpi; /* dpi for the point coordinates */
2363 int count; /* total count of children */
2364 VARARG(children,user_handles); /* children handles */
2368 /* Get window tree information from a window handle */
2369 @REQ(get_window_tree)
2370 user_handle_t handle; /* handle to the window */
2372 user_handle_t parent; /* parent window */
2373 user_handle_t owner; /* owner window */
2374 user_handle_t next_sibling; /* next sibling in Z-order */
2375 user_handle_t prev_sibling; /* prev sibling in Z-order */
2376 user_handle_t first_sibling; /* first sibling in Z-order */
2377 user_handle_t last_sibling; /* last sibling in Z-order */
2378 user_handle_t first_child; /* first child */
2379 user_handle_t last_child; /* last child */
2382 /* Set the position and Z order of a window */
2383 @REQ(set_window_pos)
2384 unsigned short swp_flags; /* SWP_* flags */
2385 unsigned short paint_flags; /* paint flags (see below) */
2386 user_handle_t handle; /* handle to the window */
2387 user_handle_t previous; /* previous window in Z order */
2388 rectangle_t window; /* window rectangle (in parent coords) */
2389 rectangle_t client; /* client rectangle (in parent coords) */
2390 VARARG(valid,rectangles); /* valid rectangles from WM_NCCALCSIZE (in parent coords) */
2392 unsigned int new_style; /* new window style */
2393 unsigned int new_ex_style; /* new window extended style */
2394 user_handle_t surface_win; /* parent window that holds the surface */
2395 int needs_update; /* whether the surface region needs an update */
2397 #define SET_WINPOS_PAINT_SURFACE 0x01 /* window has a paintable surface */
2398 #define SET_WINPOS_PIXEL_FORMAT 0x02 /* window has a custom pixel format */
2400 /* Get the window and client rectangles of a window */
2401 @REQ(get_window_rectangles)
2402 user_handle_t handle; /* handle to the window */
2403 int relative; /* coords relative to (see below) */
2404 int dpi; /* DPI to map to, or zero for per-monitor DPI */
2406 rectangle_t window; /* window rectangle */
2407 rectangle_t client; /* client rectangle */
2409 enum coords_relative
2411 COORDS_CLIENT, /* relative to client area */
2412 COORDS_WINDOW, /* relative to whole window area */
2413 COORDS_PARENT, /* relative to parent's client area
*/
2414 COORDS_SCREEN
/* relative to screen origin
*/
2418 /* Get the window text
*/
2419 @
REQ(get_window_text
)
2420 user_handle_t handle
; /* handle to the window
*/
2422 data_size_t length
; /* total length in WCHARs
*/
2423 VARARG(text
,unicode_str
); /* window text
*/
2427 /* Set the window text
*/
2428 @
REQ(set_window_text
)
2429 user_handle_t handle
; /* handle to the window
*/
2430 VARARG(text
,unicode_str
); /* window text
*/
2434 /* Get the coordinates offset between two windows
*/
2435 @
REQ(get_windows_offset
)
2436 user_handle_t from
; /* handle to the first window
*/
2437 user_handle_t to
; /* handle to the second window
*/
2438 int dpi
; /* DPI to map to
, or zero for per
-monitor DPI
*/
2440 int x
; /* x coordinate offset
*/
2441 int y
; /* y coordinate offset
*/
2442 int mirror
; /* whether to mirror the x coordinate
*/
2446 /* Get the visible region of a window
*/
2447 @
REQ(get_visible_region
)
2448 user_handle_t window
; /* handle to the window
*/
2449 unsigned int flags
; /* DCX flags
*/
2451 user_handle_t top_win
; /* top window to clip against
*/
2452 rectangle_t top_rect
; /* top window visible rect with screen coords
*/
2453 rectangle_t win_rect
; /* window rect in screen coords
*/
2454 unsigned int paint_flags
; /* paint
flags (from SET_WINPOS_
* flags
) */
2455 data_size_t total_size
; /* total size of the resulting region
*/
2456 VARARG(region
,rectangles
); /* list of rectangles for the
region (in screen coords
) */
2460 /* Get the visible surface region of a window
*/
2461 @
REQ(get_surface_region
)
2462 user_handle_t window
; /* handle to the window
*/
2464 rectangle_t visible_rect
; /* window visible rect in screen coords
*/
2465 data_size_t total_size
; /* total size of the resulting region
*/
2466 VARARG(region
,rectangles
); /* list of rectangles for the
region (in screen coords
) */
2470 /* Get the window region
*/
2471 @
REQ(get_window_region
)
2472 user_handle_t window
; /* handle to the window
*/
2474 data_size_t total_size
; /* total size of the resulting region
*/
2475 VARARG(region
,rectangles
); /* list of rectangles for the
region (in window coords
) */
2479 /* Set the window region
*/
2480 @
REQ(set_window_region
)
2481 user_handle_t window
; /* handle to the window
*/
2482 int redraw
; /* redraw the window?
*/
2483 VARARG(region
,rectangles
); /* list of rectangles for the
region (in window coords
) */
2487 /* Get the window update region
*/
2488 @
REQ(get_update_region
)
2489 user_handle_t window
; /* handle to the window
*/
2490 user_handle_t from_child
; /* child to start searching from
*/
2491 unsigned int flags
; /* update
flags (see below
) */
2493 user_handle_t child
; /* child to
repaint (or window itself
) */
2494 unsigned int flags
; /* resulting update
flags (see below
) */
2495 data_size_t total_size
; /* total size of the resulting region
*/
2496 VARARG(region
,rectangles
); /* list of rectangles for the
region (in screen coords
) */
2498 #define UPDATE_NONCLIENT
0x001 /* get region for repainting non
-client area
*/
2499 #define UPDATE_ERASE
0x002 /* get region for erasing client area
*/
2500 #define UPDATE_PAINT
0x004 /* get region for painting client area
*/
2501 #define UPDATE_INTERNALPAINT
0x008 /* get region if internal paint is pending
*/
2502 #define UPDATE_ALLCHILDREN
0x010 /* force repaint of all children
*/
2503 #define UPDATE_NOCHILDREN
0x020 /* don
't try to repaint any children */
2504 #define UPDATE_NOREGION 0x040 /* don't return a region
, only the flags
*/
2505 #define UPDATE_DELAYED_ERASE
0x080 /* still needs erase after BeginPaint
*/
2506 #define UPDATE_CLIPCHILDREN
0x100 /* remove clipped children from the update region
*/
2509 /* Update the z order of a window so that a given rectangle is fully visible
*/
2510 @
REQ(update_window_zorder
)
2511 user_handle_t window
; /* handle to the window
*/
2512 rectangle_t rect
; /* rectangle that must be
visible (in client coords
) */
2516 /* Mark parts of a window as needing a redraw
*/
2518 user_handle_t window
; /* handle to the window
*/
2519 unsigned int flags
; /* RDW_
* flags
*/
2520 VARARG(region
,rectangles
); /* list of rectangles for the
region (in window coords
) */
2524 /* Set a window property
*/
2525 @
REQ(set_window_property
)
2526 user_handle_t window
; /* handle to the window
*/
2527 lparam_t data
; /* data to store
*/
2528 atom_t atom
; /* property
atom (if no name specified
) */
2529 VARARG(name
,unicode_str
); /* property name
*/
2533 /* Remove a window property
*/
2534 @
REQ(remove_window_property
)
2535 user_handle_t window
; /* handle to the window
*/
2536 atom_t atom
; /* property
atom (if no name specified
) */
2537 VARARG(name
,unicode_str
); /* property name
*/
2539 lparam_t data
; /* data stored in property
*/
2543 /* Get a window property
*/
2544 @
REQ(get_window_property
)
2545 user_handle_t window
; /* handle to the window
*/
2546 atom_t atom
; /* property
atom (if no name specified
) */
2547 VARARG(name
,unicode_str
); /* property name
*/
2549 lparam_t data
; /* data stored in property
*/
2553 /* Get the list of properties of a window
*/
2554 @
REQ(get_window_properties
)
2555 user_handle_t window
; /* handle to the window
*/
2557 int total
; /* total number of properties
*/
2558 VARARG(props
,properties
); /* list of properties
*/
2562 /* Create a window station
*/
2563 @
REQ(create_winstation
)
2564 unsigned int flags
; /* window station flags
*/
2565 unsigned int access
; /* wanted access rights
*/
2566 unsigned int attributes
; /* object attributes
*/
2567 obj_handle_t rootdir
; /* root directory
*/
2568 VARARG(name
,unicode_str
); /* object name
*/
2570 obj_handle_t handle
; /* handle to the window station
*/
2574 /* Open a handle to a window station
*/
2575 @
REQ(open_winstation
)
2576 unsigned int access
; /* wanted access rights
*/
2577 unsigned int attributes
; /* object attributes
*/
2578 obj_handle_t rootdir
; /* root directory
*/
2579 VARARG(name
,unicode_str
); /* object name
*/
2581 obj_handle_t handle
; /* handle to the window station
*/
2585 /* Close a window station
*/
2586 @
REQ(close_winstation
)
2587 obj_handle_t handle
; /* handle to the window station
*/
2591 /* Get the process current window station
*/
2592 @
REQ(get_process_winstation
)
2594 obj_handle_t handle
; /* handle to the window station
*/
2598 /* Set the process current window station
*/
2599 @
REQ(set_process_winstation
)
2600 obj_handle_t handle
; /* handle to the window station
*/
2604 /* Enumerate window stations
*/
2605 @
REQ(enum_winstation
)
2606 unsigned int index
; /* current index
*/
2608 unsigned int next
; /* next index
*/
2609 VARARG(name
,unicode_str
); /* window station name
*/
2613 /* Create a desktop
*/
2614 @
REQ(create_desktop
)
2615 unsigned int flags
; /* desktop flags
*/
2616 unsigned int access
; /* wanted access rights
*/
2617 unsigned int attributes
; /* object attributes
*/
2618 VARARG(name
,unicode_str
); /* object name
*/
2620 obj_handle_t handle
; /* handle to the desktop
*/
2624 /* Open a handle to a desktop
*/
2626 obj_handle_t winsta
; /* window station to
open (null allowed
) */
2627 unsigned int flags
; /* desktop flags
*/
2628 unsigned int access
; /* wanted access rights
*/
2629 unsigned int attributes
; /* object attributes
*/
2630 VARARG(name
,unicode_str
); /* object name
*/
2632 obj_handle_t handle
; /* handle to the desktop
*/
2636 /* Open a handle to current input desktop
*/
2637 @
REQ(open_input_desktop
)
2638 unsigned int flags
; /* desktop flags
*/
2639 unsigned int access
; /* wanted access rights
*/
2640 unsigned int attributes
; /* object attributes
*/
2642 obj_handle_t handle
; /* handle to the desktop
*/
2646 /* Close a desktop
*/
2648 obj_handle_t handle
; /* handle to the desktop
*/
2652 /* Get the thread current desktop
*/
2653 @
REQ(get_thread_desktop
)
2654 thread_id_t tid
; /* thread id
*/
2656 obj_handle_t handle
; /* handle to the desktop
*/
2660 /* Set the thread current desktop
*/
2661 @
REQ(set_thread_desktop
)
2662 obj_handle_t handle
; /* handle to the desktop
*/
2666 /* Enumerate desktops
*/
2668 obj_handle_t winstation
; /* handle to the window station
*/
2669 unsigned int index
; /* current index
*/
2671 unsigned int next
; /* next index
*/
2672 VARARG(name
,unicode_str
); /* window station name
*/
2676 /* Get
/set information about a user
object (window station or desktop
) */
2677 @
REQ(set_user_object_info
)
2678 obj_handle_t handle
; /* handle to the object
*/
2679 unsigned int flags
; /* information to set
/get
*/
2680 unsigned int obj_flags
; /* new object flags
*/
2682 int is_desktop
; /* is object a desktop?
*/
2683 unsigned int old_obj_flags
; /* old object flags
*/
2684 VARARG(name
,unicode_str
); /* object name
*/
2686 #define SET_USER_OBJECT_SET_FLAGS
1
2687 #define SET_USER_OBJECT_GET_FULL_NAME
2
2690 /* Register a hotkey
*/
2691 @
REQ(register_hotkey
)
2692 user_handle_t window
; /* handle to the window
*/
2693 int id
; /* hotkey identifier
*/
2694 unsigned int flags
; /* modifier keys
*/
2695 unsigned int vkey
; /* virtual key code
*/
2697 int replaced
; /* did we replace an existing hotkey?
*/
2698 unsigned int flags
; /* flags of replaced hotkey
*/
2699 unsigned int vkey
; /* virtual key code of replaced hotkey
*/
2703 /* Unregister a hotkey
*/
2704 @
REQ(unregister_hotkey
)
2705 user_handle_t window
; /* handle to the window
*/
2706 int id
; /* hotkey identifier
*/
2708 unsigned int flags
; /* flags of removed hotkey
*/
2709 unsigned int vkey
; /* virtual key code of removed hotkey
*/
2713 /* Attach (or detach
) thread inputs
*/
2714 @
REQ(attach_thread_input
)
2715 thread_id_t tid_from
; /* thread to be attached
*/
2716 thread_id_t tid_to
; /* thread to which tid_from should be attached
*/
2717 int attach
; /* is it an attach?
*/
2721 /* Get input data for a given thread
*/
2722 @
REQ(get_thread_input
)
2723 thread_id_t tid
; /* id of thread
*/
2725 user_handle_t focus
; /* handle to the focus window
*/
2726 user_handle_t capture
; /* handle to the capture window
*/
2727 user_handle_t active
; /* handle to the active window
*/
2728 user_handle_t foreground
; /* handle to the global foreground window
*/
2729 user_handle_t menu_owner
; /* handle to the menu owner
*/
2730 user_handle_t move_size
; /* handle to the moving
/resizing window
*/
2731 user_handle_t caret
; /* handle to the caret window
*/
2732 user_handle_t cursor
; /* handle to the cursor
*/
2733 int show_count
; /* cursor show count
*/
2734 rectangle_t rect
; /* caret rectangle
*/
2738 /* Get the time of the last input event
*/
2739 @
REQ(get_last_input_time
)
2745 /* Retrieve queue keyboard state for a given thread
*/
2747 thread_id_t tid
; /* id of thread
*/
2748 int key
; /* optional key code or
-1 */
2750 unsigned char state
; /* state of specified key
*/
2751 VARARG(keystate
,bytes
); /* state array for all the keys
*/
2754 /* Set queue keyboard state for a given thread
*/
2756 thread_id_t tid
; /* id of thread
*/
2757 int async
; /* whether to change the async state too
*/
2758 VARARG(keystate
,bytes
); /* state array for all the keys
*/
2761 /* Set the system foreground window
*/
2762 @
REQ(set_foreground_window
)
2763 user_handle_t handle
; /* handle to the foreground window
*/
2765 user_handle_t previous
; /* handle to the previous foreground window
*/
2766 int send_msg_old
; /* whether we have to send a msg to the old window
*/
2767 int send_msg_new
; /* whether we have to send a msg to the new window
*/
2770 /* Set the current thread focus window
*/
2771 @
REQ(set_focus_window
)
2772 user_handle_t handle
; /* handle to the focus window
*/
2774 user_handle_t previous
; /* handle to the previous focus window
*/
2777 /* Set the current thread active window
*/
2778 @
REQ(set_active_window
)
2779 user_handle_t handle
; /* handle to the active window
*/
2781 user_handle_t previous
; /* handle to the previous active window
*/
2784 /* Set the current thread capture window
*/
2785 @
REQ(set_capture_window
)
2786 user_handle_t handle
; /* handle to the capture window
*/
2787 unsigned int flags
; /* capture
flags (see below
) */
2789 user_handle_t previous
; /* handle to the previous capture window
*/
2790 user_handle_t full_handle
; /* full
32-bit handle of new capture window
*/
2792 #define CAPTURE_MENU
0x01 /* capture is for a menu
*/
2793 #define CAPTURE_MOVESIZE
0x02 /* capture is for moving
/resizing
*/
2796 /* Set the current thread caret window
*/
2797 @
REQ(set_caret_window
)
2798 user_handle_t handle
; /* handle to the caret window
*/
2799 int width
; /* caret width
*/
2800 int height
; /* caret height
*/
2802 user_handle_t previous
; /* handle to the previous caret window
*/
2803 rectangle_t old_rect
; /* previous caret rectangle
*/
2804 int old_hide
; /* previous hide count
*/
2805 int old_state
; /* previous caret
state (1=on
, 0=off
) */
2809 /* Set the current thread caret information
*/
2810 @
REQ(set_caret_info
)
2811 unsigned int flags
; /* caret
flags (see below
) */
2812 user_handle_t handle
; /* handle to the caret window
*/
2813 int x
; /* caret x position
*/
2814 int y
; /* caret y position
*/
2815 int hide
; /* increment for hide
count (can be negative to show it
) */
2816 int state
; /* caret
state (see below
) */
2818 user_handle_t full_handle
; /* handle to the current caret window
*/
2819 rectangle_t old_rect
; /* previous caret rectangle
*/
2820 int old_hide
; /* previous hide count
*/
2821 int old_state
; /* previous caret
state (1=on
, 0=off
) */
2823 #define SET_CARET_POS
0x01 /* set the caret position from x
,y
*/
2824 #define SET_CARET_HIDE
0x02 /* increment the caret hide count
*/
2825 #define SET_CARET_STATE
0x04 /* set the caret on
/off state
*/
2828 CARET_STATE_OFF
, /* off
*/
2829 CARET_STATE_ON
, /* on
*/
2830 CARET_STATE_TOGGLE
, /* toggle current state
*/
2831 CARET_STATE_ON_IF_MOVED
/* on if the position differs
, unchanged otherwise
*/
2835 /* Set a window hook
*/
2837 int id
; /* id of the hook
*/
2838 process_id_t pid
; /* id of process to set the hook into
*/
2839 thread_id_t tid
; /* id of thread to set the hook into
*/
2842 client_ptr_t proc
; /* hook procedure
*/
2844 int unicode
; /* is it a unicode hook?
*/
2845 VARARG(module
,unicode_str
); /* module name
*/
2847 user_handle_t handle
; /* handle to the hook
*/
2848 unsigned int active_hooks
; /* active hooks bitmap
*/
2852 /* Remove a window hook
*/
2854 user_handle_t handle
; /* handle to the hook
*/
2855 client_ptr_t proc
; /* hook procedure if handle is
0 */
2856 int id
; /* id of the hook if handle is
0 */
2858 unsigned int active_hooks
; /* active hooks bitmap
*/
2862 /* Start calling a hook chain
*/
2863 @
REQ(start_hook_chain
)
2864 int id
; /* id of the hook
*/
2865 int event
; /* signalled event
*/
2866 user_handle_t window
; /* handle to the event window
*/
2867 int object_id
; /* object id for out of context winevent
*/
2868 int child_id
; /* child id for out of context winevent
*/
2870 user_handle_t handle
; /* handle to the next hook
*/
2871 process_id_t pid
; /* process id for low
-level keyboard
/mouse hooks
*/
2872 thread_id_t tid
; /* thread id for low
-level keyboard
/mouse hooks
*/
2873 int unicode
; /* is it a unicode hook?
*/
2874 client_ptr_t proc
; /* hook procedure
*/
2875 unsigned int active_hooks
; /* active hooks bitmap
*/
2876 VARARG(module
,unicode_str
); /* module name
*/
2880 /* Finished calling a hook chain
*/
2881 @
REQ(finish_hook_chain
)
2882 int id
; /* id of the hook
*/
2886 /* Get the hook information
*/
2888 user_handle_t handle
; /* handle to the current hook
*/
2889 int get_next
; /* do we want info about current or next hook?
*/
2890 int event
; /* signalled event
*/
2891 user_handle_t window
; /* handle to the event window
*/
2892 int object_id
; /* object id for out of context winevent
*/
2893 int child_id
; /* child id for out of context winevent
*/
2895 user_handle_t handle
; /* handle to the hook
*/
2896 int id
; /* id of the hook
*/
2897 process_id_t pid
; /* process id for low
-level keyboard
/mouse hooks
*/
2898 thread_id_t tid
; /* thread id for low
-level keyboard
/mouse hooks
*/
2899 client_ptr_t proc
; /* hook procedure
*/
2900 int unicode
; /* is it a unicode hook?
*/
2901 VARARG(module
,unicode_str
); /* module name
*/
2905 /* Create a window class
*/
2907 int local
; /* is it a local class?
*/
2908 atom_t atom
; /* class atom
*/
2909 unsigned int style
; /* class style
*/
2910 mod_handle_t instance
; /* module instance
*/
2911 int extra
; /* number of extra class bytes
*/
2912 int win_extra
; /* number of window extra bytes
*/
2913 client_ptr_t client_ptr
; /* pointer to class in client address space
*/
2914 data_size_t name_offset
; /* base class name offset for specified atom
*/
2915 VARARG(name
,unicode_str
); /* class name
*/
2917 atom_t atom
; /* resulting class atom
*/
2921 /* Destroy a window class
*/
2923 atom_t atom
; /* class atom
*/
2924 mod_handle_t instance
; /* module instance
*/
2925 VARARG(name
,unicode_str
); /* class name
*/
2927 client_ptr_t client_ptr
; /* pointer to class in client address space
*/
2931 /* Set some information in a class
*/
2932 @
REQ(set_class_info
)
2933 user_handle_t window
; /* handle to the window
*/
2934 unsigned int flags
; /* flags for info to
set (see below
) */
2935 atom_t atom
; /* class atom
*/
2936 unsigned int style
; /* class style
*/
2937 int win_extra
; /* number of window extra bytes
*/
2938 mod_handle_t instance
; /* module instance
*/
2939 int extra_offset
; /* offset to set in extra bytes
*/
2940 data_size_t extra_size
; /* size to set in extra bytes
*/
2941 lparam_t extra_value
; /* value to set in extra bytes
*/
2943 atom_t old_atom
; /* previous class atom
*/
2944 atom_t base_atom
; /* base class atom
*/
2945 mod_handle_t old_instance
; /* previous module instance
*/
2946 lparam_t old_extra_value
; /* old value in extra bytes
*/
2947 unsigned int old_style
; /* previous class style
*/
2948 int old_extra
; /* previous number of class extra bytes
*/
2949 int old_win_extra
; /* previous number of window extra bytes
*/
2951 #define SET_CLASS_ATOM
0x0001
2952 #define SET_CLASS_STYLE
0x0002
2953 #define SET_CLASS_WINEXTRA
0x0004
2954 #define SET_CLASS_INSTANCE
0x0008
2955 #define SET_CLASS_EXTRA
0x0010
2958 /* Open the clipboard
*/
2959 @
REQ(open_clipboard
)
2960 user_handle_t window
; /* clipboard window
*/
2962 user_handle_t owner
; /* current clipboard owner
*/
2966 /* Close the clipboard
*/
2967 @
REQ(close_clipboard
)
2969 user_handle_t viewer
; /* first clipboard viewer
*/
2970 user_handle_t owner
; /* current clipboard owner
*/
2974 /* Empty the clipboard and grab ownership
*/
2975 @
REQ(empty_clipboard
)
2979 /* Add a data format to the clipboard
*/
2980 @
REQ(set_clipboard_data
)
2981 unsigned int format
; /* clipboard format of the data
*/
2982 unsigned int lcid
; /* locale id to use for synthesizing text formats
*/
2983 VARARG(data
,bytes
); /* data contents
*/
2985 unsigned int seqno
; /* sequence number for the set data
*/
2989 /* Fetch a data format from the clipboard
*/
2990 @
REQ(get_clipboard_data
)
2991 unsigned int format
; /* clipboard format of the data
*/
2992 int render
; /* will we try to render it if missing?
*/
2993 int cached
; /* do we already have it in the client
-side cache?
*/
2994 unsigned int seqno
; /* sequence number for the data in the cache
*/
2996 unsigned int from
; /* for synthesized data
, format to generate it from
*/
2997 user_handle_t owner
; /* clipboard owner for delayed
-rendered formats
*/
2998 unsigned int seqno
; /* sequence number for the originally set data
*/
2999 data_size_t total
; /* total data size
*/
3000 VARARG(data
,bytes
); /* data contents
*/
3004 /* Retrieve a list of available formats
*/
3005 @
REQ(get_clipboard_formats
)
3006 unsigned int format
; /* specific format to query
, return all if
0 */
3008 unsigned int count
; /* count of available formats
*/
3009 VARARG(formats
,uints
); /* array of available formats
*/
3013 /* Retrieve the next available format
*/
3014 @
REQ(enum_clipboard_formats
)
3015 unsigned int previous
; /* previous format
, or first if
0 */
3017 unsigned int format
; /* next format
*/
3021 /* Release ownership of the clipboard
*/
3022 @
REQ(release_clipboard
)
3023 user_handle_t owner
; /* clipboard owner to release
*/
3025 user_handle_t viewer
; /* first clipboard viewer
*/
3026 user_handle_t owner
; /* current clipboard owner
*/
3030 /* Get clipboard information
*/
3031 @
REQ(get_clipboard_info
)
3033 user_handle_t window
; /* clipboard window
*/
3034 user_handle_t owner
; /* clipboard owner
*/
3035 user_handle_t viewer
; /* clipboard viewer
*/
3036 unsigned int seqno
; /* current sequence number
*/
3040 /* Set the clipboard viewer window
*/
3041 @
REQ(set_clipboard_viewer
)
3042 user_handle_t viewer
; /* clipboard viewer
*/
3043 user_handle_t previous
; /* if non
-zero
, check that this was the previous viewer
*/
3045 user_handle_t old_viewer
; /* previous clipboard viewer
*/
3046 user_handle_t owner
; /* clipboard owner
*/
3050 /* Add a clipboard listener window
*/
3051 @
REQ(add_clipboard_listener
)
3052 user_handle_t window
; /* clipboard listener window
*/
3056 /* Remove a clipboard listener window
*/
3057 @
REQ(remove_clipboard_listener
)
3058 user_handle_t window
; /* clipboard listener window
*/
3062 /* Open a security token
*/
3064 obj_handle_t handle
; /* handle to the thread or process
*/
3065 unsigned int access
; /* access rights to the new token
*/
3066 unsigned int attributes
;/* object attributes
*/
3067 unsigned int flags
; /* flags (see below
) */
3069 obj_handle_t token
; /* handle to the token
*/
3071 #define OPEN_TOKEN_THREAD
1
3072 #define OPEN_TOKEN_AS_SELF
2
3075 /* Set
/get the global windows
*/
3076 @
REQ(set_global_windows
)
3077 unsigned int flags
; /* flags for fields to
set (see below
) */
3078 user_handle_t shell_window
; /* handle to the new shell window
*/
3079 user_handle_t shell_listview
; /* handle to the new shell listview window
*/
3080 user_handle_t progman_window
; /* handle to the new program manager window
*/
3081 user_handle_t taskman_window
; /* handle to the new task manager window
*/
3083 user_handle_t old_shell_window
; /* handle to the shell window
*/
3084 user_handle_t old_shell_listview
; /* handle to the shell listview window
*/
3085 user_handle_t old_progman_window
; /* handle to the new program manager window
*/
3086 user_handle_t old_taskman_window
; /* handle to the new task manager window
*/
3088 #define SET_GLOBAL_SHELL_WINDOWS
0x01 /* set both main shell and listview windows
*/
3089 #define SET_GLOBAL_PROGMAN_WINDOW
0x02
3090 #define SET_GLOBAL_TASKMAN_WINDOW
0x04
3092 /* Adjust the privileges held by a token
*/
3093 @
REQ(adjust_token_privileges
)
3094 obj_handle_t handle
; /* handle to the token
*/
3095 int disable_all
; /* disable all privileges?
*/
3096 int get_modified_state
; /* get modified privileges?
*/
3097 VARARG(privileges
,LUID_AND_ATTRIBUTES
); /* privileges to enable
/disable
/remove
*/
3099 unsigned int len
; /* total length in bytes required to store token privileges
*/
3100 VARARG(privileges
,LUID_AND_ATTRIBUTES
); /* modified privileges
*/
3103 /* Retrieves the set of privileges held by or available to a token
*/
3104 @
REQ(get_token_privileges
)
3105 obj_handle_t handle
; /* handle to the token
*/
3107 unsigned int len
; /* total length in bytes required to store token privileges
*/
3108 VARARG(privileges
,LUID_AND_ATTRIBUTES
); /* privileges held by or available to a token
*/
3111 /* Check the token has the required privileges
*/
3112 @
REQ(check_token_privileges
)
3113 obj_handle_t handle
; /* handle to the token
*/
3114 int all_required
; /* are all the privileges required for the check to succeed?
*/
3115 VARARG(privileges
,LUID_AND_ATTRIBUTES
); /* privileges to check
*/
3117 int has_privileges
; /* does the token have the required privileges?
*/
3118 VARARG(privileges
,LUID_AND_ATTRIBUTES
); /* privileges held by or available to a token
*/
3121 @
REQ(duplicate_token
)
3122 obj_handle_t handle
; /* handle to the token to duplicate
*/
3123 unsigned int access
; /* access rights to the new token
*/
3124 int primary
; /* is the new token to be a primary one?
*/
3125 int impersonation_level
; /* impersonation level of the new token
*/
3126 VARARG(objattr
,object_attributes
); /* object attributes
*/
3128 obj_handle_t new_handle
; /* duplicated handle
*/
3132 obj_handle_t handle
; /* handle to the token to duplicate
*/
3133 unsigned int flags
; /* flags
*/
3134 data_size_t privileges_size
; /* size of privileges
*/
3135 VARARG(privileges
,LUID_AND_ATTRIBUTES
,privileges_size
); /* privileges to remove from new token
*/
3136 VARARG(disable_sids
,SID
); /* array of groups to remove from new token
*/
3138 obj_handle_t new_handle
; /* filtered handle
*/
3142 obj_handle_t handle
; /* handle to the token
*/
3143 unsigned int desired_access
; /* desired access to the object
*/
3144 generic_map_t mapping
; /* mapping to specific rights
*/
3145 VARARG(sd
,security_descriptor
); /* security descriptor to check
*/
3147 unsigned int access_granted
; /* access rights actually granted
*/
3148 unsigned int access_status
; /* was access granted?
*/
3149 unsigned int privileges_len
; /* length needed to store privileges
*/
3150 VARARG(privileges
,LUID_AND_ATTRIBUTES
); /* privileges used during access check
*/
3154 obj_handle_t handle
; /* handle to the token
*/
3155 unsigned int which_sid
; /* which SID to retrieve from the token
*/
3157 data_size_t sid_len
; /* length needed to store sid
*/
3158 VARARG(sid
,SID
); /* the sid specified by which_sid from the token
*/
3161 @
REQ(get_token_groups
)
3162 obj_handle_t handle
; /* handle to the token
*/
3164 data_size_t user_len
; /* length needed to store user
*/
3165 VARARG(user
,token_groups
); /* groups the token
's user belongs to */
3168 @REQ(get_token_default_dacl)
3169 obj_handle_t handle; /* handle to the token */
3171 data_size_t acl_len; /* length needed to store access control list */
3172 VARARG(acl,ACL); /* access control list */
3175 @REQ(set_token_default_dacl)
3176 obj_handle_t handle; /* handle to the token */
3177 VARARG(acl,ACL); /* default dacl to set */
3180 @REQ(set_security_object)
3181 obj_handle_t handle; /* handle to the object */
3182 unsigned int security_info; /* which parts of security descriptor to set */
3183 VARARG(sd,security_descriptor); /* security descriptor to set */
3186 @REQ(get_security_object)
3187 obj_handle_t handle; /* handle to the object */
3188 unsigned int security_info; /* which parts of security descriptor to get */
3190 unsigned int sd_len; /* buffer size needed for sd */
3191 VARARG(sd,security_descriptor); /* retrieved security descriptor */
3198 obj_handle_t handle;
3199 unsigned int access;
3200 unsigned int attributes;
3204 /* Return a list of all opened handles */
3205 @REQ(get_system_handles)
3207 unsigned int count; /* number of handles */
3208 VARARG(data,handle_infos); /* array of handle_infos */
3212 /* Create a mailslot */
3213 @REQ(create_mailslot)
3214 unsigned int access; /* wanted access rights */
3215 timeout_t read_timeout;
3216 unsigned int max_msgsize;
3217 VARARG(objattr,object_attributes); /* object attributes */
3219 obj_handle_t handle; /* handle to the mailslot */
3223 /* Set mailslot information */
3224 @REQ(set_mailslot_info)
3225 obj_handle_t handle; /* handle to the mailslot */
3226 timeout_t read_timeout;
3229 timeout_t read_timeout;
3230 unsigned int max_msgsize;
3232 #define MAILSLOT_SET_READ_TIMEOUT 1
3235 /* Create a directory object */
3236 @REQ(create_directory)
3237 unsigned int access; /* access flags */
3238 VARARG(objattr,object_attributes); /* object attributes */
3240 obj_handle_t handle; /* handle to the directory */
3244 /* Open a directory object */
3245 @REQ(open_directory)
3246 unsigned int access; /* access flags */
3247 unsigned int attributes; /* object attributes */
3248 obj_handle_t rootdir; /* root directory */
3249 VARARG(directory_name,unicode_str); /* Directory name */
3251 obj_handle_t handle; /* handle to the directory */
3255 /* Get a directory entry by index */
3256 @REQ(get_directory_entry)
3257 obj_handle_t handle; /* handle to the directory */
3258 unsigned int index; /* entry index */
3260 data_size_t name_len; /* length of the entry name in bytes */
3261 VARARG(name,unicode_str,name_len); /* entry name */
3262 VARARG(type,unicode_str); /* entry type */
3266 /* Create a symbolic link object */
3267 @REQ(create_symlink)
3268 unsigned int access; /* access flags */
3269 VARARG(objattr,object_attributes); /* object attributes */
3270 VARARG(target_name,unicode_str); /* target name */
3272 obj_handle_t handle; /* handle to the symlink */
3276 /* Open a symbolic link object */
3278 unsigned int access; /* access flags */
3279 unsigned int attributes; /* object attributes */
3280 obj_handle_t rootdir; /* root directory */
3281 VARARG(name,unicode_str); /* symlink name */
3283 obj_handle_t handle; /* handle to the symlink */
3287 /* Query a symbolic link object */
3289 obj_handle_t handle; /* handle to the symlink */
3291 data_size_t total; /* total needed size for name */
3292 VARARG(target_name,unicode_str); /* target name */
3296 /* Query basic object information */
3297 @REQ(get_object_info)
3298 obj_handle_t handle; /* handle to the object */
3300 unsigned int access; /* granted access mask */
3301 unsigned int ref_count; /* object ref count */
3302 unsigned int handle_count; /* object handle count */
3303 data_size_t total; /* total needed size for name */
3304 VARARG(name,unicode_str); /* object name */
3308 /* Query object type name information */
3309 @REQ(get_object_type)
3310 obj_handle_t handle; /* handle to the object */
3312 VARARG(info,object_type_info); /* type information */
3316 /* Query type information for all types */
3317 @REQ(get_object_types)
3319 int count; /* total count of object types */
3320 VARARG(info,object_types_info); /* type information */
3324 /* Allocate a locally-unique identifier */
3325 @REQ(allocate_locally_unique_id)
3331 /* Create a device manager */
3332 @REQ(create_device_manager)
3333 unsigned int access; /* wanted access rights */
3334 unsigned int attributes; /* object attributes */
3336 obj_handle_t handle; /* handle to the device */
3340 /* Create a device */
3342 obj_handle_t rootdir; /* root directory */
3343 client_ptr_t user_ptr; /* opaque ptr for use by client */
3344 obj_handle_t manager; /* device manager */
3345 VARARG(name,unicode_str); /* object name */
3349 /* Delete a device */
3351 obj_handle_t manager; /* handle to the device manager */
3352 client_ptr_t device; /* pointer to the device */
3356 /* Retrieve the next pending device irp request */
3357 @REQ(get_next_device_request)
3358 obj_handle_t manager; /* handle to the device manager */
3359 obj_handle_t prev; /* handle to the previous irp */
3360 unsigned int status; /* status of the previous irp */
3361 client_ptr_t user_ptr; /* user pointer of the previous irp */
3363 irp_params_t params; /* irp parameters */
3364 obj_handle_t next; /* handle to the next irp */
3365 thread_id_t client_tid; /* tid of thread calling irp */
3366 client_ptr_t client_thread; /* pointer to thread object of calling irp */
3367 data_size_t in_size; /* total needed input size */
3368 VARARG(next_data,bytes); /* input data of the next irp */
3372 /* Get kernel pointer from server object */
3373 @REQ(get_kernel_object_ptr)
3374 obj_handle_t manager; /* handle to the device manager */
3375 obj_handle_t handle; /* object handle */
3377 client_ptr_t user_ptr; /* kernel object pointer */
3381 /* Associate kernel pointer with server object */
3382 @REQ(set_kernel_object_ptr)
3383 obj_handle_t manager; /* handle to the device manager */
3384 obj_handle_t handle; /* object handle */
3385 client_ptr_t user_ptr; /* kernel object pointer */
3389 /* Grab server object reference from kernel object pointer */
3390 @REQ(grab_kernel_object)
3391 obj_handle_t manager; /* handle to the device manager */
3392 client_ptr_t user_ptr; /* kernel object pointer */
3396 /* Release server object reference from kernel object pointer */
3397 @REQ(release_kernel_object)
3398 obj_handle_t manager; /* handle to the device manager */
3399 client_ptr_t user_ptr; /* kernel object pointer */
3403 /* Get handle from kernel object pointer */
3404 @REQ(get_kernel_object_handle)
3405 obj_handle_t manager; /* handle to the device manager */
3406 client_ptr_t user_ptr; /* kernel object pointer */
3407 unsigned int access; /* wanted access rights */
3409 obj_handle_t handle; /* kernel object handle */
3413 /* Make the current process a system process */
3414 @REQ(make_process_system)
3416 obj_handle_t event; /* event signaled when all user processes have exited */
3420 /* Get detailed fixed-size information about a token */
3421 @REQ(get_token_info)
3422 obj_handle_t handle; /* handle to the object */
3424 luid_t token_id; /* locally-unique identifier of the token */
3425 luid_t modified_id; /* locally-unique identifier of the modified version of the token */
3426 int primary; /* is the token primary or impersonation? */
3427 int impersonation_level; /* level of impersonation */
3428 int elevation; /* elevation type */
3429 int group_count; /* the number of groups the token is a member of */
3430 int privilege_count; /* the number of privileges the token has */
3434 /* Create a token which is an elevation counterpart to this token */
3435 @REQ(create_linked_token)
3436 obj_handle_t handle; /* handle to the token */
3438 obj_handle_t linked; /* handle to the linked token */
3442 /* Create I/O completion port */
3443 @REQ(create_completion)
3444 unsigned int access; /* desired access to a port */
3445 unsigned int concurrent; /* max number of concurrent active threads */
3446 VARARG(objattr,object_attributes); /* object attributes */
3448 obj_handle_t handle; /* port handle */
3452 /* Open I/O completion port */
3453 @REQ(open_completion)
3454 unsigned int access; /* desired access to a port */
3455 unsigned int attributes; /* object attributes */
3456 obj_handle_t rootdir; /* root directory */
3457 VARARG(filename,unicode_str); /* port name */
3459 obj_handle_t handle; /* port handle */
3463 /* add completion to completion port */
3464 @REQ(add_completion)
3465 obj_handle_t handle; /* port handle */
3466 apc_param_t ckey; /* completion key */
3467 apc_param_t cvalue; /* completion value */
3468 apc_param_t information; /* IO_STATUS_BLOCK Information */
3469 unsigned int status; /* completion result */
3473 /* get completion from completion port queue */
3474 @REQ(remove_completion)
3475 obj_handle_t handle; /* port handle */
3477 apc_param_t ckey; /* completion key */
3478 apc_param_t cvalue; /* completion value */
3479 apc_param_t information; /* IO_STATUS_BLOCK Information */
3480 unsigned int status; /* completion result */
3484 /* get completion queue depth */
3485 @REQ(query_completion)
3486 obj_handle_t handle; /* port handle */
3488 unsigned int depth; /* completion queue depth */
3492 /* associate object with completion port */
3493 @REQ(set_completion_info)
3494 obj_handle_t handle; /* object handle */
3495 apc_param_t ckey; /* completion key */
3496 obj_handle_t chandle; /* port handle */
3500 /* check for associated completion and push msg */
3501 @REQ(add_fd_completion)
3502 obj_handle_t handle; /* async' object
*/
3503 apc_param_t cvalue
; /* completion value
*/
3504 apc_param_t information
; /* IO_STATUS_BLOCK Information
*/
3505 unsigned int status
; /* completion status
*/
3506 int async
; /* completion is an async result
*/
3510 /* set fd completion information
*/
3511 @
REQ(set_fd_completion_mode
)
3512 obj_handle_t handle
; /* handle to a file or directory
*/
3513 unsigned int flags
; /* completion notification flags
*/
3517 /* set fd disposition information
*/
3518 @
REQ(set_fd_disp_info
)
3519 obj_handle_t handle
; /* handle to a file or directory
*/
3520 int unlink
; /* whether to unlink file on close
*/
3524 /* set fd name information
*/
3525 @
REQ(set_fd_name_info
)
3526 obj_handle_t handle
; /* handle to a file or directory
*/
3527 obj_handle_t rootdir
; /* root directory
*/
3528 data_size_t namelen
; /* length of NT name in bytes
*/
3529 int link
; /* link instead of renaming
*/
3530 int replace
; /* replace an existing file?
*/
3531 VARARG(name
,unicode_str
,namelen
); /* NT name
*/
3532 VARARG(filename
,string
); /* new file name
*/
3536 /* Retrieve layered info for a window
*/
3537 @
REQ(get_window_layered_info
)
3538 user_handle_t handle
; /* handle to the window
*/
3540 unsigned int color_key
; /* color key
*/
3541 unsigned int alpha
; /* alpha (0.
.255) */
3542 unsigned int flags
; /* LWA_
* flags
*/
3546 /* Set layered info for a window
*/
3547 @
REQ(set_window_layered_info
)
3548 user_handle_t handle
; /* handle to the window
*/
3549 unsigned int color_key
; /* color key
*/
3550 unsigned int alpha
; /* alpha (0.
.255) */
3551 unsigned int flags
; /* LWA_
* flags
*/
3555 /* Allocate an arbitrary user handle
*/
3556 @
REQ(alloc_user_handle
)
3558 user_handle_t handle
; /* allocated handle
*/
3562 /* Free an arbitrary user handle
*/
3563 @
REQ(free_user_handle
)
3564 user_handle_t handle
; /* handle to free
*/
3568 /* Set
/get the current cursor
*/
3570 unsigned int flags
; /* flags for fields to
set (see below
) */
3571 user_handle_t handle
; /* handle to the cursor
*/
3572 int show_count
; /* show count increment
/decrement
*/
3573 int x
; /* cursor position
*/
3575 rectangle_t clip
; /* cursor clip rectangle
*/
3576 unsigned int clip_msg
; /* message to post on cursor clip changes
*/
3578 user_handle_t prev_handle
; /* previous handle
*/
3579 int prev_count
; /* previous show count
*/
3580 int prev_x
; /* previous position
*/
3582 int new_x
; /* new position
*/
3584 rectangle_t new_clip
; /* new clip rectangle
*/
3585 unsigned int last_change
; /* time of last position change
*/
3587 #define SET_CURSOR_HANDLE
0x01
3588 #define SET_CURSOR_COUNT
0x02
3589 #define SET_CURSOR_POS
0x04
3590 #define SET_CURSOR_CLIP
0x08
3591 #define SET_CURSOR_NOCLIP
0x10
3593 /* Get the history of the
64 last cursor positions
*/
3594 @
REQ(get_cursor_history
)
3596 VARARG(history
,cursor_positions
);
3600 /* Batch read rawinput message data
*/
3601 @
REQ(get_rawinput_buffer
)
3602 data_size_t rawinput_size
; /* size of RAWINPUT structure
*/
3603 data_size_t buffer_size
; /* size of output buffer
*/
3605 data_size_t next_size
; /* minimum size to get next message data
*/
3610 /* Modify the list of registered rawinput devices
*/
3611 @
REQ(update_rawinput_devices
)
3612 VARARG(devices
,rawinput_devices
);
3615 /* Retrieve the list of registered rawinput devices
*/
3616 @
REQ(get_rawinput_devices
)
3618 unsigned int device_count
;
3619 VARARG(devices
,rawinput_devices
);
3622 /* Create a new job object
*/
3624 unsigned int access
; /* wanted access rights
*/
3625 VARARG(objattr
,object_attributes
); /* object attributes
*/
3627 obj_handle_t handle
; /* handle to the job
*/
3631 /* Open a job object
*/
3633 unsigned int access
; /* wanted access rights
*/
3634 unsigned int attributes
; /* object attributes
*/
3635 obj_handle_t rootdir
; /* root directory
*/
3636 VARARG(name
,unicode_str
); /* object name
*/
3638 obj_handle_t handle
; /* handle to the job
*/
3642 /* Assign a job object to a process
*/
3644 obj_handle_t job
; /* handle to the job
*/
3645 obj_handle_t process
; /* handle to the process
*/
3649 /* Check if a process is associated with a job
*/
3650 @
REQ(process_in_job
)
3651 obj_handle_t job
; /* handle to the job
*/
3652 obj_handle_t process
; /* handle to the process
*/
3656 /* Set limit flags on a job
*/
3657 @
REQ(set_job_limits
)
3658 obj_handle_t handle
; /* handle to the job
*/
3659 unsigned int limit_flags
; /* new limit flags
*/
3663 /* Set new completion port for a job
*/
3664 @
REQ(set_job_completion_port
)
3665 obj_handle_t job
; /* handle to the job
*/
3666 obj_handle_t port
; /* handle to the completion port
*/
3667 client_ptr_t key
; /* key to send with completion messages
*/
3671 /* Retrieve information about a job
*/
3673 obj_handle_t handle
; /* handle to the job
*/
3675 int total_processes
; /* total count of processes
*/
3676 int active_processes
; /* count of running processes
*/
3680 /* Terminate all processes associated with the job
*/
3682 obj_handle_t handle
; /* handle to the job
*/
3683 int status
; /* process exit code
*/
3687 /* Suspend a process
*/
3688 @
REQ(suspend_process
)
3689 obj_handle_t handle
; /* process handle
*/
3693 /* Resume a process
*/
3694 @
REQ(resume_process
)
3695 obj_handle_t handle
; /* process handle
*/