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
*/
495 enum apc_type type
; /* APC_USER
*/
497 client_ptr_t func
; /* void (__stdcall
*func
)(ULONG_PTR
,ULONG_PTR
,ULONG_PTR
); */
498 apc_param_t args
[3]; /* arguments for user function
*/
502 enum apc_type type
; /* APC_TIMER
*/
504 client_ptr_t func
; /* void (__stdcall
*func
)(void
*, unsigned int
, unsigned int
); */
505 abstime_t time
; /* time of expiration
*/
506 client_ptr_t arg
; /* user argument
*/
516 enum apc_type type
; /* APC_ASYNC_IO
*/
517 unsigned int status
; /* I
/O status
*/
518 client_ptr_t user
; /* user pointer
*/
519 client_ptr_t sb
; /* status block
*/
523 enum apc_type type
; /* APC_VIRTUAL_ALLOC
*/
524 unsigned int op_type
; /* type of operation
*/
525 client_ptr_t addr
; /* requested address
*/
526 mem_size_t size
; /* allocation size
*/
527 mem_size_t zero_bits
; /* number of zero high bits
*/
528 unsigned int prot
; /* memory protection flags
*/
532 enum apc_type type
; /* APC_VIRTUAL_FREE
*/
533 unsigned int op_type
; /* type of operation
*/
534 client_ptr_t addr
; /* requested address
*/
535 mem_size_t size
; /* allocation size
*/
539 enum apc_type type
; /* APC_VIRTUAL_QUERY
*/
541 client_ptr_t addr
; /* requested address
*/
545 enum apc_type type
; /* APC_VIRTUAL_PROTECT
*/
546 unsigned int prot
; /* new protection flags
*/
547 client_ptr_t addr
; /* requested address
*/
548 mem_size_t size
; /* requested size
*/
552 enum apc_type type
; /* APC_VIRTUAL_FLUSH
*/
554 client_ptr_t addr
; /* requested address
*/
555 mem_size_t size
; /* requested size
*/
559 enum apc_type type
; /* APC_VIRTUAL_LOCK
*/
561 client_ptr_t addr
; /* requested address
*/
562 mem_size_t size
; /* requested size
*/
566 enum apc_type type
; /* APC_VIRTUAL_UNLOCK
*/
568 client_ptr_t addr
; /* requested address
*/
569 mem_size_t size
; /* requested size
*/
573 enum apc_type type
; /* APC_MAP_VIEW
*/
574 obj_handle_t handle
; /* mapping handle
*/
575 client_ptr_t addr
; /* requested address
*/
576 mem_size_t size
; /* allocation size
*/
577 file_pos_t offset
; /* file offset
*/
578 mem_size_t zero_bits
; /* number of zero high bits
*/
579 unsigned int alloc_type
; /* allocation type
*/
580 unsigned int prot
; /* memory protection flags
*/
584 enum apc_type type
; /* APC_UNMAP_VIEW
*/
586 client_ptr_t addr
; /* view address
*/
590 enum apc_type type
; /* APC_CREATE_THREAD
*/
591 unsigned int flags
; /* creation flags
*/
592 client_ptr_t func
; /* void (__stdcall
*func
)(void*)
; start function
*/
593 client_ptr_t arg
; /* argument for start function
*/
594 mem_size_t reserve
; /* reserve size for thread stack
*/
595 mem_size_t commit
; /* commit size for thread stack
*/
599 enum apc_type type
; /* APC_DUP_HANDLE
*/
600 obj_handle_t src_handle
; /* src handle to duplicate
*/
601 obj_handle_t dst_process
; /* dst process handle
*/
602 unsigned int access
; /* wanted access rights
*/
603 unsigned int attributes
; /* object attributes
*/
604 unsigned int options
; /* duplicate options
*/
613 enum apc_type type
; /* APC_ASYNC_IO
*/
614 unsigned int status
; /* new status of async operation
*/
615 unsigned int total
; /* bytes transferred
*/
619 enum apc_type type
; /* APC_VIRTUAL_ALLOC
*/
620 unsigned int status
; /* status returned by call
*/
621 client_ptr_t addr
; /* resulting address
*/
622 mem_size_t size
; /* resulting size
*/
626 enum apc_type type
; /* APC_VIRTUAL_FREE
*/
627 unsigned int status
; /* status returned by call
*/
628 client_ptr_t addr
; /* resulting address
*/
629 mem_size_t size
; /* resulting size
*/
633 enum apc_type type
; /* APC_VIRTUAL_QUERY
*/
634 unsigned int status
; /* status returned by call
*/
635 client_ptr_t base
; /* resulting base address
*/
636 client_ptr_t alloc_base
;/* resulting allocation base
*/
637 mem_size_t size
; /* resulting region size
*/
638 unsigned short state
; /* resulting region state
*/
639 unsigned short prot
; /* resulting region protection
*/
640 unsigned short alloc_prot
;/* resulting allocation protection
*/
641 unsigned short alloc_type
;/* resulting region allocation type
*/
645 enum apc_type type
; /* APC_VIRTUAL_PROTECT
*/
646 unsigned int status
; /* status returned by call
*/
647 client_ptr_t addr
; /* resulting address
*/
648 mem_size_t size
; /* resulting size
*/
649 unsigned int prot
; /* old protection flags
*/
653 enum apc_type type
; /* APC_VIRTUAL_FLUSH
*/
654 unsigned int status
; /* status returned by call
*/
655 client_ptr_t addr
; /* resulting address
*/
656 mem_size_t size
; /* resulting size
*/
660 enum apc_type type
; /* APC_VIRTUAL_LOCK
*/
661 unsigned int status
; /* status returned by call
*/
662 client_ptr_t addr
; /* resulting address
*/
663 mem_size_t size
; /* resulting size
*/
667 enum apc_type type
; /* APC_VIRTUAL_UNLOCK
*/
668 unsigned int status
; /* status returned by call
*/
669 client_ptr_t addr
; /* resulting address
*/
670 mem_size_t size
; /* resulting size
*/
674 enum apc_type type
; /* APC_MAP_VIEW
*/
675 unsigned int status
; /* status returned by call
*/
676 client_ptr_t addr
; /* resulting address
*/
677 mem_size_t size
; /* resulting size
*/
681 enum apc_type type
; /* APC_UNMAP_VIEW
*/
682 unsigned int status
; /* status returned by call
*/
686 enum apc_type type
; /* APC_CREATE_THREAD
*/
687 unsigned int status
; /* status returned by call
*/
688 process_id_t pid
; /* process id
*/
689 thread_id_t tid
; /* thread id
*/
690 client_ptr_t teb
; /* thread
teb (in process address space
) */
691 obj_handle_t handle
; /* handle to new thread
*/
695 enum apc_type type
; /* APC_DUP_HANDLE
*/
696 unsigned int status
; /* status returned by call
*/
697 obj_handle_t handle
; /* duplicated handle in dst process
*/
701 enum apc_type type
; /* APC_BREAK_PROCESS
*/
702 unsigned int status
; /* status returned by call
*/
722 enum irp_type type
; /* irp call type
*/
725 enum irp_type type
; /* IRP_CALL_CREATE
*/
726 unsigned int access
; /* access rights
*/
727 unsigned int sharing
; /* sharing flags
*/
728 unsigned int options
; /* file options
*/
729 client_ptr_t device
; /* opaque ptr for the device
*/
730 obj_handle_t file
; /* file handle
*/
734 enum irp_type type
; /* IRP_CALL_CLOSE
*/
736 client_ptr_t file
; /* opaque ptr for the file object
*/
740 enum irp_type type
; /* IRP_CALL_READ
*/
741 unsigned int key
; /* driver key
*/
742 data_size_t out_size
; /* needed output size
*/
744 client_ptr_t file
; /* opaque ptr for the file object
*/
745 file_pos_t pos
; /* file position
*/
749 enum irp_type type
; /* IRP_CALL_WRITE
*/
750 unsigned int key
; /* driver key
*/
751 client_ptr_t file
; /* opaque ptr for the file object
*/
752 file_pos_t pos
; /* file position
*/
756 enum irp_type type
; /* IRP_CALL_FLUSH
*/
758 client_ptr_t file
; /* opaque ptr for the file object
*/
762 enum irp_type type
; /* IRP_CALL_IOCTL
*/
763 ioctl_code_t code
; /* ioctl code
*/
764 data_size_t out_size
; /* needed output size
*/
766 client_ptr_t file
; /* opaque ptr for the file object
*/
770 enum irp_type type
; /* IRP_CALL_VOLUME
*/
771 unsigned int info_class
;/* information class
*/
772 data_size_t out_size
; /* needed output size
*/
774 client_ptr_t file
; /* opaque ptr for the file object
*/
778 enum irp_type type
; /* IRP_CALL_FREE
*/
780 client_ptr_t obj
; /* opaque ptr for the freed object
*/
784 enum irp_type type
; /* IRP_CALL_CANCEL
*/
786 client_ptr_t irp
; /* opaque ptr for canceled irp
*/
790 /* information about a PE image mapping
, roughly equivalent to SECTION_IMAGE_INFORMATION
*/
794 client_ptr_t entry_point
;
796 mem_size_t stack_size
;
797 mem_size_t stack_commit
;
798 unsigned int zerobits
;
799 unsigned int subsystem
;
800 unsigned short subsystem_minor
;
801 unsigned short subsystem_major
;
802 unsigned short osversion_major
;
803 unsigned short osversion_minor
;
804 unsigned short image_charact
;
805 unsigned short dll_charact
;
806 unsigned short machine
;
807 unsigned char contains_code
;
808 unsigned char image_flags
;
809 unsigned int loader_flags
;
810 unsigned int header_size
;
811 unsigned int file_size
;
812 unsigned int checksum
;
813 unsigned int dbg_offset
;
814 unsigned int dbg_size
;
816 #define IMAGE_FLAGS_ComPlusNativeReady
0x01
817 #define IMAGE_FLAGS_ComPlusILOnly
0x02
818 #define IMAGE_FLAGS_ImageDynamicallyRelocated
0x04
819 #define IMAGE_FLAGS_ImageMappedFlat
0x08
820 #define IMAGE_FLAGS_BaseBelow4gb
0x10
821 #define IMAGE_FLAGS_ComPlusPrefer32bit
0x20
822 #define IMAGE_FLAGS_WineBuiltin
0x40
823 #define IMAGE_FLAGS_WineFakeDll
0x80
825 struct rawinput_device
827 unsigned short usage_page
;
828 unsigned short usage
;
830 user_handle_t target
;
842 /****************************************************************/
843 /* Request declarations
*/
845 /* Create a new process from the context of the parent
*/
847 obj_handle_t token
; /* process token
*/
848 obj_handle_t debug
; /* process debug object
*/
849 obj_handle_t parent_process
; /* parent process
*/
850 int inherit_all
; /* inherit all handles from parent
*/
851 unsigned int create_flags
; /* creation flags
*/
852 int socket_fd
; /* file descriptor for process socket
*/
853 unsigned int access
; /* access rights for process object
*/
854 client_cpu_t cpu
; /* CPU that the new process will use
*/
855 data_size_t info_size
; /* size of startup info
*/
856 data_size_t handles_size
; /* length of explicit handles list
*/
857 VARARG(objattr
,object_attributes
); /* object attributes
*/
858 VARARG(handles
,uints
,handles_size
); /* handles list
*/
859 VARARG(info
,startup_info
,info_size
); /* startup information
*/
860 VARARG(env
,unicode_str
); /* environment for new process
*/
862 obj_handle_t info
; /* new process info handle
*/
863 process_id_t pid
; /* process id
*/
864 obj_handle_t handle
; /* process
handle (in the current process
) */
868 /* Retrieve information about a newly started process
*/
869 @
REQ(get_new_process_info
)
870 obj_handle_t info
; /* info handle returned from new_process_request
*/
872 int success
; /* did the process start successfully?
*/
873 int exit_code
; /* process exit code if failed
*/
877 /* Create a new thread
*/
879 obj_handle_t process
; /* process in which to create thread
*/
880 unsigned int access
; /* wanted access rights
*/
881 int suspend
; /* new thread should be suspended on creation
*/
882 int request_fd
; /* fd for request pipe
*/
883 VARARG(objattr
,object_attributes
); /* object attributes
*/
885 thread_id_t tid
; /* thread id
*/
886 obj_handle_t handle
; /* thread
handle (in the current process
) */
890 /* Retrieve the new process startup info
*/
891 @
REQ(get_startup_info
)
893 data_size_t info_size
; /* size of startup info
*/
894 VARARG(info
,startup_info
,info_size
); /* startup information
*/
895 VARARG(env
,unicode_str
); /* environment
*/
899 /* Signal the end of the process initialization
*/
900 @
REQ(init_process_done
)
902 client_ptr_t entry
; /* process entry point
*/
903 int suspend
; /* is process suspended?
*/
907 /* Initialize the first thread of a new process
*/
908 @
REQ(init_first_thread
)
909 int unix_pid
; /* Unix pid of new process
*/
910 int unix_tid
; /* Unix tid of new thread
*/
911 int debug_level
; /* new debug level
*/
912 client_ptr_t teb
; /* TEB of new
thread (in process address space
) */
913 client_ptr_t peb
; /* PEB of new
process (in process address space
) */
914 client_ptr_t ldt_copy
; /* address of LDT
copy (in process address space
) */
915 int reply_fd
; /* fd for reply pipe
*/
916 int wait_fd
; /* fd for blocking calls pipe
*/
917 client_cpu_t cpu
; /* CPU that this thread is running on
*/
919 process_id_t pid
; /* process id of the new thread
's process */
920 thread_id_t tid; /* thread id of the new thread */
921 timeout_t server_start; /* server start time */
922 data_size_t info_size; /* total size of startup info */
923 unsigned int all_cpus; /* bitset of supported CPUs */
927 /* Initialize a new thread; called from the child after pthread_create() */
929 int unix_tid; /* Unix tid of new thread */
930 int reply_fd; /* fd for reply pipe */
931 int wait_fd; /* fd for blocking calls pipe */
932 client_ptr_t teb; /* TEB of new thread (in thread address space) */
933 client_ptr_t entry; /* entry point (in thread address space) */
935 process_id_t pid; /* process id of the new thread's process
*/
936 thread_id_t tid
; /* thread id of the new thread
*/
937 int suspend
; /* is thread suspended?
*/
941 /* Terminate a process
*/
942 @
REQ(terminate_process
)
943 obj_handle_t handle
; /* process handle to terminate
*/
944 int exit_code
; /* process exit code
*/
946 int self
; /* suicide?
*/
950 /* Terminate a thread
*/
951 @
REQ(terminate_thread
)
952 obj_handle_t handle
; /* thread handle to terminate
*/
953 int exit_code
; /* thread exit code
*/
955 int self
; /* suicide?
*/
959 /* Retrieve information about a process
*/
960 @
REQ(get_process_info
)
961 obj_handle_t handle
; /* process handle
*/
963 process_id_t pid
; /* server process id
*/
964 process_id_t ppid
; /* server process id of parent
*/
965 affinity_t affinity
; /* process affinity mask
*/
966 client_ptr_t peb
; /* PEB address in process address space
*/
967 timeout_t start_time
; /* process start time
*/
968 timeout_t end_time
; /* process end time
*/
969 int exit_code
; /* process exit code
*/
970 int priority
; /* priority class
*/
971 client_cpu_t cpu
; /* CPU that this process is running on
*/
972 VARARG(image
,pe_image_info
); /* image info for main exe
*/
976 /* Retrieve debug information about a process
*/
977 @
REQ(get_process_debug_info
)
978 obj_handle_t handle
; /* process handle
*/
980 obj_handle_t debug
; /* handle to debug port
*/
981 int debug_children
; /* inherit debugger to child processes
*/
982 VARARG(image
,pe_image_info
); /* image info for main exe
*/
986 /* Fetch the name of the process image
*/
987 @
REQ(get_process_image_name
)
988 obj_handle_t handle
; /* process handle
*/
989 int win32
; /* return a win32 filename?
*/
991 data_size_t len
; /* len in bytes required to store filename
*/
992 VARARG(name
,unicode_str
); /* image name for main exe
*/
996 /* Retrieve information about a process memory usage
*/
997 @
REQ(get_process_vm_counters
)
998 obj_handle_t handle
; /* process handle
*/
1000 mem_size_t peak_virtual_size
; /* peak virtual memory in bytes
*/
1001 mem_size_t virtual_size
; /* virtual memory in bytes
*/
1002 mem_size_t peak_working_set_size
; /* peak real memory in bytes
*/
1003 mem_size_t working_set_size
; /* real memory in bytes
*/
1004 mem_size_t pagefile_usage
; /* commit charge in bytes
*/
1005 mem_size_t peak_pagefile_usage
; /* peak commit charge in bytes
*/
1009 /* Set a process information
*/
1010 @
REQ(set_process_info
)
1011 obj_handle_t handle
; /* process handle
*/
1012 int mask
; /* setting
mask (see below
) */
1013 int priority
; /* priority class
*/
1014 affinity_t affinity
; /* affinity mask
*/
1016 #define SET_PROCESS_INFO_PRIORITY
0x01
1017 #define SET_PROCESS_INFO_AFFINITY
0x02
1020 /* Retrieve information about a thread
*/
1021 @
REQ(get_thread_info
)
1022 obj_handle_t handle
; /* thread handle
*/
1023 unsigned int access
; /* required access rights
*/
1025 process_id_t pid
; /* server process id
*/
1026 thread_id_t tid
; /* server thread id
*/
1027 client_ptr_t teb
; /* thread teb pointer
*/
1028 client_ptr_t entry_point
; /* thread entry point
*/
1029 affinity_t affinity
; /* thread affinity mask
*/
1030 int exit_code
; /* thread exit code
*/
1031 int priority
; /* thread priority level
*/
1032 int last
; /* last thread in process
*/
1033 int suspend_count
; /* thread suspend count
*/
1034 int dbg_hidden
; /* thread hidden from debugger
*/
1035 data_size_t desc_len
; /* description length in bytes
*/
1036 VARARG(desc
,unicode_str
); /* description string
*/
1040 /* Retrieve information about thread times
*/
1041 @
REQ(get_thread_times
)
1042 obj_handle_t handle
; /* thread handle
*/
1044 timeout_t creation_time
; /* thread creation time
*/
1045 timeout_t exit_time
; /* thread exit time
*/
1046 int unix_pid
; /* thread native pid
*/
1047 int unix_tid
; /* thread native pid
*/
1051 /* Set a thread information
*/
1052 @
REQ(set_thread_info
)
1053 obj_handle_t handle
; /* thread handle
*/
1054 int mask
; /* setting
mask (see below
) */
1055 int priority
; /* priority class
*/
1056 affinity_t affinity
; /* affinity mask
*/
1057 client_ptr_t entry_point
; /* thread entry point
*/
1058 obj_handle_t token
; /* impersonation token
*/
1059 VARARG(desc
,unicode_str
); /* description string
*/
1061 #define SET_THREAD_INFO_PRIORITY
0x01
1062 #define SET_THREAD_INFO_AFFINITY
0x02
1063 #define SET_THREAD_INFO_TOKEN
0x04
1064 #define SET_THREAD_INFO_ENTRYPOINT
0x08
1065 #define SET_THREAD_INFO_DESCRIPTION
0x10
1066 #define SET_THREAD_INFO_DBG_HIDDEN
0x20
1069 /* Suspend a thread
*/
1070 @
REQ(suspend_thread
)
1071 obj_handle_t handle
; /* thread handle
*/
1073 int count
; /* new suspend count
*/
1077 /* Resume a thread
*/
1079 obj_handle_t handle
; /* thread handle
*/
1081 int count
; /* new suspend count
*/
1085 /* Queue an APC for a thread or process
*/
1087 obj_handle_t handle
; /* thread or process handle
*/
1088 apc_call_t call
; /* call arguments
*/
1090 obj_handle_t handle
; /* APC handle
*/
1091 int self
; /* run APC in caller itself?
*/
1095 /* Get the result of an APC call
*/
1096 @
REQ(get_apc_result
)
1097 obj_handle_t handle
; /* handle to the APC
*/
1099 apc_result_t result
; /* result of the APC
*/
1103 /* Close a handle for the current process
*/
1105 obj_handle_t handle
; /* handle to close
*/
1109 /* Set a handle information
*/
1110 @
REQ(set_handle_info
)
1111 obj_handle_t handle
; /* handle we are interested in
*/
1112 int flags
; /* new handle flags
*/
1113 int mask
; /* mask for flags to set
*/
1115 int old_flags
; /* old flag value
*/
1119 /* Duplicate a handle
*/
1121 obj_handle_t src_process
; /* src process handle
*/
1122 obj_handle_t src_handle
; /* src handle to duplicate
*/
1123 obj_handle_t dst_process
; /* dst process handle
*/
1124 unsigned int access
; /* wanted access rights
*/
1125 unsigned int attributes
; /* object attributes
*/
1126 unsigned int options
; /* duplicate options
*/
1128 obj_handle_t handle
; /* duplicated handle in dst process
*/
1132 /* Make an object temporary
*/
1133 @
REQ(make_temporary
)
1134 obj_handle_t handle
; /* handle to the object
*/
1138 /* Open a handle to a process
*/
1140 process_id_t pid
; /* process id to open
*/
1141 unsigned int access
; /* wanted access rights
*/
1142 unsigned int attributes
; /* object attributes
*/
1144 obj_handle_t handle
; /* handle to the process
*/
1148 /* Open a handle to a thread
*/
1150 thread_id_t tid
; /* thread id to open
*/
1151 unsigned int access
; /* wanted access rights
*/
1152 unsigned int attributes
; /* object attributes
*/
1154 obj_handle_t handle
; /* handle to the thread
*/
1158 /* Wait for handles
*/
1160 int flags
; /* wait
flags (see below
) */
1161 client_ptr_t cookie
; /* magic cookie to return to client
*/
1162 abstime_t timeout
; /* timeout
*/
1163 data_size_t size
; /* size of select_op
*/
1164 obj_handle_t prev_apc
; /* handle to previous APC
*/
1165 VARARG(result
,apc_result
); /* result of previous APC
*/
1166 VARARG(data
,select_op
,size
); /* operation
-specific data
*/
1167 VARARG(context
,context
); /* suspend context
*/
1169 apc_call_t call
; /* APC call arguments
*/
1170 obj_handle_t apc_handle
; /* handle to next APC
*/
1171 VARARG(context
,context
); /* suspend context
*/
1173 #define SELECT_ALERTABLE
1
1174 #define SELECT_INTERRUPTIBLE
2
1177 /* Create an event
*/
1179 unsigned int access
; /* wanted access rights
*/
1180 int manual_reset
; /* manual reset event
*/
1181 int initial_state
; /* initial state of the event
*/
1182 VARARG(objattr
,object_attributes
); /* object attributes
*/
1184 obj_handle_t handle
; /* handle to the event
*/
1187 /* Event operation
*/
1189 obj_handle_t handle
; /* handle to event
*/
1190 int op
; /* event
operation (see below
) */
1192 int state
; /* previous state
*/
1194 enum event_op
{ PULSE_EVENT
, SET_EVENT
, RESET_EVENT
};
1197 obj_handle_t handle
; /* handle to event
*/
1199 int manual_reset
; /* manual reset event
*/
1200 int state
; /* current state of the event
*/
1205 unsigned int access
; /* wanted access rights
*/
1206 unsigned int attributes
; /* object attributes
*/
1207 obj_handle_t rootdir
; /* root directory
*/
1208 VARARG(name
,unicode_str
); /* object name
*/
1210 obj_handle_t handle
; /* handle to the event
*/
1214 /* Create a keyed event
*/
1215 @
REQ(create_keyed_event
)
1216 unsigned int access
; /* wanted access rights
*/
1217 VARARG(objattr
,object_attributes
); /* object attributes
*/
1219 obj_handle_t handle
; /* handle to the event
*/
1222 /* Open a keyed event
*/
1223 @
REQ(open_keyed_event
)
1224 unsigned int access
; /* wanted access rights
*/
1225 unsigned int attributes
; /* object attributes
*/
1226 obj_handle_t rootdir
; /* root directory
*/
1227 VARARG(name
,unicode_str
); /* object name
*/
1229 obj_handle_t handle
; /* handle to the event
*/
1233 /* Create a mutex
*/
1235 unsigned int access
; /* wanted access rights
*/
1236 int owned
; /* initially owned?
*/
1237 VARARG(objattr
,object_attributes
); /* object attributes
*/
1239 obj_handle_t handle
; /* handle to the mutex
*/
1243 /* Release a mutex
*/
1245 obj_handle_t handle
; /* handle to the mutex
*/
1247 unsigned int prev_count
; /* value of internal counter
, before release
*/
1253 unsigned int access
; /* wanted access rights
*/
1254 unsigned int attributes
; /* object attributes
*/
1255 obj_handle_t rootdir
; /* root directory
*/
1256 VARARG(name
,unicode_str
); /* object name
*/
1258 obj_handle_t handle
; /* handle to the mutex
*/
1264 obj_handle_t handle
; /* handle to mutex
*/
1266 unsigned int count
; /* current count of mutex
*/
1267 int owned
; /* true if owned by current thread
*/
1268 int abandoned
; /* true if abandoned
*/
1272 /* Create a semaphore
*/
1273 @
REQ(create_semaphore
)
1274 unsigned int access
; /* wanted access rights
*/
1275 unsigned int initial
; /* initial count
*/
1276 unsigned int max
; /* maximum count
*/
1277 VARARG(objattr
,object_attributes
); /* object attributes
*/
1279 obj_handle_t handle
; /* handle to the semaphore
*/
1283 /* Release a semaphore
*/
1284 @
REQ(release_semaphore
)
1285 obj_handle_t handle
; /* handle to the semaphore
*/
1286 unsigned int count
; /* count to add to semaphore
*/
1288 unsigned int prev_count
; /* previous semaphore count
*/
1291 @
REQ(query_semaphore
)
1292 obj_handle_t handle
; /* handle to the semaphore
*/
1294 unsigned int current
; /* current count
*/
1295 unsigned int max
; /* maximum count
*/
1298 /* Open a semaphore
*/
1299 @
REQ(open_semaphore
)
1300 unsigned int access
; /* wanted access rights
*/
1301 unsigned int attributes
; /* object attributes
*/
1302 obj_handle_t rootdir
; /* root directory
*/
1303 VARARG(name
,unicode_str
); /* object name
*/
1305 obj_handle_t handle
; /* handle to the semaphore
*/
1311 unsigned int access
; /* wanted access rights
*/
1312 unsigned int sharing
; /* sharing flags
*/
1313 int create
; /* file create action
*/
1314 unsigned int options
; /* file options
*/
1315 unsigned int attrs
; /* file attributes for creation
*/
1316 VARARG(objattr
,object_attributes
); /* object attributes
*/
1317 VARARG(filename
,string
); /* file name
*/
1319 obj_handle_t handle
; /* handle to the file
*/
1323 /* Open a file object
*/
1324 @
REQ(open_file_object
)
1325 unsigned int access
; /* wanted access rights
*/
1326 unsigned int attributes
; /* open attributes
*/
1327 obj_handle_t rootdir
; /* root directory
*/
1328 unsigned int sharing
; /* sharing flags
*/
1329 unsigned int options
; /* file options
*/
1330 VARARG(filename
,unicode_str
); /* file name
*/
1332 obj_handle_t handle
; /* handle to the file
*/
1336 /* Allocate a file handle for a Unix fd
*/
1337 @
REQ(alloc_file_handle
)
1338 unsigned int access
; /* wanted access rights
*/
1339 unsigned int attributes
; /* object attributes
*/
1340 int fd
; /* file descriptor on the client side
*/
1342 obj_handle_t handle
; /* handle to the file
*/
1346 /* Get the Unix name from a file handle
*/
1347 @
REQ(get_handle_unix_name
)
1348 obj_handle_t handle
; /* file handle
*/
1350 data_size_t name_len
; /* unix name length
*/
1351 VARARG(name
,string
); /* unix name
*/
1355 /* Get a Unix fd to access a file
*/
1357 obj_handle_t handle
; /* handle to the file
*/
1359 int type
; /* file
type (see below
) */
1360 int cacheable
; /* can fd be cached in the client?
*/
1361 unsigned int access
; /* file access rights
*/
1362 unsigned int options
; /* file open options
*/
1366 FD_TYPE_INVALID
, /* invalid
file (no associated fd
) */
1367 FD_TYPE_FILE
, /* regular file
*/
1368 FD_TYPE_DIR
, /* directory
*/
1369 FD_TYPE_SOCKET
, /* socket
*/
1370 FD_TYPE_SERIAL
, /* serial port
*/
1371 FD_TYPE_PIPE
, /* named pipe
*/
1372 FD_TYPE_MAILSLOT
, /* mailslot
*/
1373 FD_TYPE_CHAR
, /* unspecified char device
*/
1374 FD_TYPE_DEVICE
, /* Windows device file
*/
1379 /* Retrieve (or allocate
) the client
-side directory cache entry
*/
1380 @
REQ(get_directory_cache_entry
)
1381 obj_handle_t handle
; /* handle to the directory
*/
1383 int entry
; /* cache entry on the client side
*/
1384 VARARG(free
,ints
); /* entries that can be freed
*/
1388 /* Flush a file buffers
*/
1390 async_data_t async
; /* async I
/O parameters
*/
1392 obj_handle_t event
; /* event set when finished
*/
1395 /* Query file information
*/
1397 obj_handle_t handle
; /* handle to the file
*/
1398 unsigned int info_class
; /* queried information class
*/
1400 VARARG(data
,bytes
); /* file info data
*/
1403 /* Query volume information
*/
1404 @
REQ(get_volume_info
)
1405 obj_handle_t handle
; /* handle to the file
*/
1406 async_data_t async
; /* async I
/O parameters
*/
1407 unsigned int info_class
; /* queried information class
*/
1409 obj_handle_t wait
; /* handle to wait on for blocking read
*/
1410 VARARG(data
,bytes
); /* volume info data
*/
1413 /* Lock a region of a file
*/
1415 obj_handle_t handle
; /* handle to the file
*/
1416 file_pos_t offset
; /* offset of start of lock
*/
1417 file_pos_t count
; /* count of bytes to lock
*/
1418 int shared
; /* shared or exclusive lock?
*/
1419 int wait
; /* do we want to wait?
*/
1421 obj_handle_t handle
; /* handle to wait on
*/
1422 int overlapped
; /* is it an overlapped I
/O handle?
*/
1426 /* Unlock a region of a file
*/
1428 obj_handle_t handle
; /* handle to the file
*/
1429 file_pos_t offset
; /* offset of start of unlock
*/
1430 file_pos_t count
; /* count of bytes to unlock
*/
1434 /* Set socket event parameters
*/
1435 @
REQ(set_socket_event
)
1436 obj_handle_t handle
; /* handle to the socket
*/
1437 unsigned int mask
; /* event mask
*/
1438 obj_handle_t event
; /* event object
*/
1439 user_handle_t window
; /* window to send the message to
*/
1440 unsigned int msg
; /* message to send
*/
1444 /* Get socket event parameters
*/
1445 @
REQ(get_socket_event
)
1446 obj_handle_t handle
; /* handle to the socket
*/
1447 int service
; /* clear pending?
*/
1448 obj_handle_t c_event
; /* event to clear
*/
1450 unsigned int mask
; /* event mask
*/
1451 unsigned int pmask
; /* pending events
*/
1452 unsigned int state
; /* status bits
*/
1453 VARARG(errors
,ints
); /* event errors
*/
1457 /* Get socket info
*/
1458 @
REQ(get_socket_info
)
1459 obj_handle_t handle
; /* handle to the socket
*/
1461 int family
; /* family
, see socket manpage
*/
1462 int type
; /* type
, see socket manpage
*/
1463 int protocol
; /* protocol
, see socket manpage
*/
1467 /* Re
-enable pending socket events
*/
1468 @
REQ(enable_socket_event
)
1469 obj_handle_t handle
; /* handle to the socket
*/
1470 unsigned int mask
; /* events to re
-enable
*/
1471 unsigned int sstate
; /* status bits to set
*/
1472 unsigned int cstate
; /* status bits to clear
*/
1475 @
REQ(set_socket_deferred
)
1476 obj_handle_t handle
; /* handle to the socket
*/
1477 obj_handle_t deferred
; /* handle to the socket for which
accept() is deferred
*/
1481 /* Retrieve the next pending console ioctl request
*/
1482 @
REQ(get_next_console_request
)
1483 obj_handle_t handle
; /* console server handle
*/
1484 int signal
; /* server signal state
*/
1485 int read
; /* 1 if reporting result of blocked read ioctl
*/
1486 unsigned int status
; /* status of previous ioctl
*/
1487 VARARG(out_data
,bytes
); /* out_data of previous ioctl
*/
1489 unsigned int code
; /* ioctl code
*/
1490 unsigned int output
; /* output id or
0 for input
*/
1491 data_size_t out_size
; /* ioctl output size
*/
1492 VARARG(in_data
,bytes
); /* ioctl in_data
*/
1496 /* enable directory change notifications
*/
1497 @
REQ(read_directory_changes
)
1498 unsigned int filter
; /* notification filter
*/
1499 int subtree
; /* watch the subtree?
*/
1500 int want_data
; /* flag indicating whether change data should be collected
*/
1501 async_data_t async
; /* async I
/O parameters
*/
1506 obj_handle_t handle
;
1508 VARARG(events
,filesystem_event
); /* collected filesystem events
*/
1512 /* Create a file mapping
*/
1513 @
REQ(create_mapping
)
1514 unsigned int access
; /* wanted access rights
*/
1515 unsigned int flags
; /* SEC_
* flags
*/
1516 unsigned int file_access
; /* file access rights
*/
1517 mem_size_t size
; /* mapping size
*/
1518 obj_handle_t file_handle
; /* file handle
*/
1519 VARARG(objattr
,object_attributes
); /* object attributes
*/
1521 obj_handle_t handle
; /* handle to the mapping
*/
1525 /* Open a mapping
*/
1527 unsigned int access
; /* wanted access rights
*/
1528 unsigned int attributes
; /* object attributes
*/
1529 obj_handle_t rootdir
; /* root directory
*/
1530 VARARG(name
,unicode_str
); /* object name
*/
1532 obj_handle_t handle
; /* handle to the mapping
*/
1536 /* Get information about a file mapping
*/
1537 @
REQ(get_mapping_info
)
1538 obj_handle_t handle
; /* handle to the mapping
*/
1539 unsigned int access
; /* wanted access rights
*/
1541 mem_size_t size
; /* mapping size
*/
1542 unsigned int flags
; /* SEC_
* flags
*/
1543 obj_handle_t shared_file
; /* shared mapping file handle
*/
1544 data_size_t total
; /* total required buffer size in bytes
*/
1545 VARARG(image
,pe_image_info
);/* image info for SEC_IMAGE mappings
*/
1546 VARARG(name
,unicode_str
); /* filename for SEC_IMAGE mappings
*/
1550 /* Add a memory view in the current process
*/
1552 obj_handle_t mapping
; /* file mapping handle
, or
0 for .so builtin
*/
1553 unsigned int access
; /* wanted access rights
*/
1554 client_ptr_t base
; /* view base
address (page
-aligned
) */
1555 mem_size_t size
; /* view size
*/
1556 file_pos_t start
; /* start offset in mapping
*/
1557 VARARG(image
,pe_image_info
);/* image info for .so builtins
*/
1558 VARARG(name
,unicode_str
); /* image filename for .so builtins
*/
1562 /* Unmap a memory view from the current process
*/
1564 client_ptr_t base
; /* view base address
*/
1568 /* Get a range of committed pages in a file mapping
*/
1569 @
REQ(get_mapping_committed_range
)
1570 client_ptr_t base
; /* view base address
*/
1571 file_pos_t offset
; /* starting
offset (page
-aligned
, in bytes
) */
1573 mem_size_t size
; /* size of range starting at
offset (page
-aligned
, in bytes
) */
1574 int committed
; /* whether it is a committed range
*/
1578 /* Add a range to the committed pages in a file mapping
*/
1579 @
REQ(add_mapping_committed_range
)
1580 client_ptr_t base
; /* view base address
*/
1581 file_pos_t offset
; /* starting
offset (page
-aligned
, in bytes
) */
1582 mem_size_t size
; /* size to
set (page
-aligned
, in bytes
) or
0 if only retrieving
*/
1586 /* Check if two memory maps are for the same file
*/
1587 @
REQ(is_same_mapping
)
1588 client_ptr_t base1
; /* first view base address
*/
1589 client_ptr_t base2
; /* second view base address
*/
1593 /* Get the filename of a mapping
*/
1594 @
REQ(get_mapping_filename
)
1595 obj_handle_t process
; /* process handle
*/
1596 client_ptr_t addr
; /* address inside mapped
view (in process address space
) */
1598 data_size_t len
; /* total filename length in bytes
*/
1599 VARARG(filename
,unicode_str
); /* filename in NT format
*/
1605 timeout_t start_time
;
1608 int current_priority
;
1614 timeout_t start_time
;
1615 data_size_t name_len
;
1619 process_id_t parent_pid
;
1623 /* VARARG(name
,unicode_str
,name_len
); */
1624 /* VARARG(threads
,struct thread_info
,thread_count
); */
1627 /* Get a list of processes and threads currently running
*/
1628 @
REQ(list_processes
)
1630 data_size_t info_size
;
1632 VARARG(data
,process_info
,info_size
);
1636 /* Create a debug object
*/
1637 @
REQ(create_debug_obj
)
1638 unsigned int access
; /* wanted access rights
*/
1639 unsigned int flags
; /* object flags
*/
1640 VARARG(objattr
,object_attributes
); /* object attributes
*/
1642 obj_handle_t handle
; /* handle to the debug object
*/
1646 /* Wait for a debug event
*/
1647 @
REQ(wait_debug_event
)
1648 obj_handle_t debug
; /* debug object
*/
1650 process_id_t pid
; /* process id
*/
1651 thread_id_t tid
; /* thread id
*/
1652 VARARG(event
,debug_event
); /* debug event data
*/
1656 /* Queue an exception event
*/
1657 @
REQ(queue_exception_event
)
1658 int first
; /* first chance exception?
*/
1659 unsigned int code
; /* exception code
*/
1660 unsigned int flags
; /* exception flags
*/
1661 client_ptr_t record
; /* exception record
*/
1662 client_ptr_t address
; /* exception address
*/
1663 data_size_t len
; /* size of parameters
*/
1664 VARARG(params
,uints64
,len
);/* exception parameters
*/
1666 obj_handle_t handle
; /* handle to the queued event
*/
1670 /* Retrieve the status of an exception event
*/
1671 @
REQ(get_exception_status
)
1672 obj_handle_t handle
; /* handle to the queued event
*/
1676 /* Continue a debug event
*/
1677 @
REQ(continue_debug_event
)
1678 obj_handle_t debug
; /* debug object
*/
1679 process_id_t pid
; /* process id to continue
*/
1680 thread_id_t tid
; /* thread id to continue
*/
1681 unsigned int status
; /* continuation status
*/
1685 /* Start or stop debugging an existing process
*/
1687 obj_handle_t handle
; /* process handle
*/
1688 obj_handle_t debug
; /* debug object to attach to the process
*/
1689 int attach
; /* 1=attaching
/ 0=detaching from the process
*/
1693 /* Set debug object information
*/
1694 @
REQ(set_debug_obj_info
)
1695 obj_handle_t debug
; /* debug object
*/
1696 unsigned int flags
; /* object flags
*/
1700 /* Read data from a process address space
*/
1701 @
REQ(read_process_memory
)
1702 obj_handle_t handle
; /* process handle
*/
1703 client_ptr_t addr
; /* addr to read from
*/
1705 VARARG(data
,bytes
); /* result data
*/
1709 /* Write data to a process address space
*/
1710 @
REQ(write_process_memory
)
1711 obj_handle_t handle
; /* process handle
*/
1712 client_ptr_t addr
; /* addr to write to
*/
1713 VARARG(data
,bytes
); /* data to write
*/
1717 /* Create a registry key
*/
1719 unsigned int access
; /* desired access rights
*/
1720 unsigned int options
; /* creation options
*/
1721 VARARG(objattr
,object_attributes
); /* object attributes
*/
1722 VARARG(class
,unicode_str
); /* class name
*/
1724 obj_handle_t hkey
; /* handle to the created key
*/
1725 int created
; /* has it been newly created?
*/
1728 /* Open a registry key
*/
1730 obj_handle_t parent
; /* handle to the parent key
*/
1731 unsigned int access
; /* desired access rights
*/
1732 unsigned int attributes
; /* object attributes
*/
1733 VARARG(name
,unicode_str
); /* key name
*/
1735 obj_handle_t hkey
; /* handle to the open key
*/
1739 /* Delete a registry key
*/
1741 obj_handle_t hkey
; /* handle to the key
*/
1745 /* Flush a registry key
*/
1747 obj_handle_t hkey
; /* handle to the key
*/
1751 /* Enumerate registry subkeys
*/
1753 obj_handle_t hkey
; /* handle to registry key
*/
1754 int index
; /* index of
subkey (or
-1 for current key
) */
1755 int info_class
; /* requested information class
*/
1757 int subkeys
; /* number of subkeys
*/
1758 int max_subkey
; /* longest subkey name
*/
1759 int max_class
; /* longest class name
*/
1760 int values
; /* number of values
*/
1761 int max_value
; /* longest value name
*/
1762 int max_data
; /* longest value data
*/
1763 timeout_t modif
; /* last modification time
*/
1764 data_size_t total
; /* total length needed for full name and class
*/
1765 data_size_t namelen
; /* length of key name in bytes
*/
1766 VARARG(name
,unicode_str
,namelen
); /* key name
*/
1767 VARARG(class
,unicode_str
); /* class name
*/
1771 /* Set a value of a registry key
*/
1773 obj_handle_t hkey
; /* handle to registry key
*/
1774 int type
; /* value type
*/
1775 data_size_t namelen
; /* length of value name in bytes
*/
1776 VARARG(name
,unicode_str
,namelen
); /* value name
*/
1777 VARARG(data
,bytes
); /* value data
*/
1781 /* Retrieve the value of a registry key
*/
1783 obj_handle_t hkey
; /* handle to registry key
*/
1784 VARARG(name
,unicode_str
); /* value name
*/
1786 int type
; /* value type
*/
1787 data_size_t total
; /* total length needed for data
*/
1788 VARARG(data
,bytes
); /* value data
*/
1792 /* Enumerate a value of a registry key
*/
1793 @
REQ(enum_key_value
)
1794 obj_handle_t hkey
; /* handle to registry key
*/
1795 int index
; /* value index
*/
1796 int info_class
; /* requested information class
*/
1798 int type
; /* value type
*/
1799 data_size_t total
; /* total length needed for full name and data
*/
1800 data_size_t namelen
; /* length of value name in bytes
*/
1801 VARARG(name
,unicode_str
,namelen
); /* value name
*/
1802 VARARG(data
,bytes
); /* value data
*/
1806 /* Delete a value of a registry key
*/
1807 @
REQ(delete_key_value
)
1808 obj_handle_t hkey
; /* handle to registry key
*/
1809 VARARG(name
,unicode_str
); /* value name
*/
1813 /* Load a registry branch from a file
*/
1815 obj_handle_t file
; /* file to load from
*/
1816 VARARG(objattr
,object_attributes
); /* object attributes
*/
1820 /* UnLoad a registry branch from a file
*/
1821 @
REQ(unload_registry
)
1822 obj_handle_t parent
; /* handle to the parent key
*/
1823 unsigned int attributes
; /* object attributes
*/
1824 VARARG(name
,unicode_str
); /* key name
*/
1828 /* Save a registry branch to a file
*/
1830 obj_handle_t hkey
; /* key to save
*/
1831 obj_handle_t file
; /* file to save to
*/
1835 /* Add a registry key change notification
*/
1836 @
REQ(set_registry_notification
)
1837 obj_handle_t hkey
; /* key to watch for changes
*/
1838 obj_handle_t event
; /* event to set
*/
1839 int subtree
; /* should we watch the whole subtree?
*/
1840 unsigned int filter
; /* things to watch
*/
1844 /* Create a waitable timer
*/
1846 unsigned int access
; /* wanted access rights
*/
1847 int manual
; /* manual reset
*/
1848 VARARG(objattr
,object_attributes
); /* object attributes
*/
1850 obj_handle_t handle
; /* handle to the timer
*/
1854 /* Open a waitable timer
*/
1856 unsigned int access
; /* wanted access rights
*/
1857 unsigned int attributes
; /* object attributes
*/
1858 obj_handle_t rootdir
; /* root directory
*/
1859 VARARG(name
,unicode_str
); /* object name
*/
1861 obj_handle_t handle
; /* handle to the timer
*/
1864 /* Set a waitable timer
*/
1866 obj_handle_t handle
; /* handle to the timer
*/
1867 timeout_t expire
; /* next expiration absolute time
*/
1868 client_ptr_t callback
; /* callback function
*/
1869 client_ptr_t arg
; /* callback argument
*/
1870 int period
; /* timer period in ms
*/
1872 int signaled
; /* was the timer signaled before this call ?
*/
1875 /* Cancel a waitable timer
*/
1877 obj_handle_t handle
; /* handle to the timer
*/
1879 int signaled
; /* was the timer signaled before this calltime ?
*/
1882 /* Get information on a waitable timer
*/
1883 @
REQ(get_timer_info
)
1884 obj_handle_t handle
; /* handle to the timer
*/
1886 timeout_t when
; /* absolute time when the timer next expires
*/
1887 int signaled
; /* is the timer signaled?
*/
1891 /* Retrieve the current context of a thread
*/
1892 @
REQ(get_thread_context
)
1893 obj_handle_t handle
; /* thread or context handle
*/
1894 unsigned int flags
; /* context flags
*/
1896 int self
; /* was it a handle to the current thread?
*/
1897 obj_handle_t handle
; /* pending context handle
*/
1898 VARARG(context
,context
); /* thread context
*/
1902 /* Set the current context of a thread
*/
1903 @
REQ(set_thread_context
)
1904 obj_handle_t handle
; /* thread handle
*/
1905 VARARG(context
,context
); /* thread context
*/
1907 int self
; /* was it a handle to the current thread?
*/
1911 /* Fetch a selector entry for a thread
*/
1912 @
REQ(get_selector_entry
)
1913 obj_handle_t handle
; /* thread handle
*/
1914 int entry
; /* LDT entry
*/
1916 unsigned int base
; /* selector base
*/
1917 unsigned int limit
; /* selector limit
*/
1918 unsigned char flags
; /* selector flags
*/
1924 VARARG(name
,unicode_str
); /* atom name
*/
1926 atom_t atom
; /* resulting atom
*/
1930 /* Delete an atom
*/
1932 atom_t atom
; /* atom handle
*/
1938 VARARG(name
,unicode_str
); /* atom name
*/
1940 atom_t atom
; /* atom handle
*/
1944 /* Get information about an atom
*/
1945 @
REQ(get_atom_information
)
1946 atom_t atom
; /* atom handle
*/
1948 int count
; /* atom lock count
*/
1949 int pinned
; /* whether the atom has been pinned
*/
1950 data_size_t total
; /* actual length of atom name
*/
1951 VARARG(name
,unicode_str
); /* atom name
*/
1955 /* Get the message queue of the current thread
*/
1958 obj_handle_t handle
; /* handle to the queue
*/
1962 /* Set the file descriptor associated to the current thread queue
*/
1964 obj_handle_t handle
; /* handle to the file descriptor
*/
1968 /* Set the current message queue wakeup mask
*/
1969 @
REQ(set_queue_mask
)
1970 unsigned int wake_mask
; /* wakeup bits mask
*/
1971 unsigned int changed_mask
; /* changed bits mask
*/
1972 int skip_wait
; /* will we skip waiting if signaled?
*/
1974 unsigned int wake_bits
; /* current wake bits
*/
1975 unsigned int changed_bits
; /* current changed bits
*/
1979 /* Get the current message queue status
*/
1980 @
REQ(get_queue_status
)
1981 unsigned int clear_bits
; /* should we clear the change bits?
*/
1983 unsigned int wake_bits
; /* wake bits
*/
1984 unsigned int changed_bits
; /* changed bits since last time
*/
1988 /* Retrieve the process idle event
*/
1989 @
REQ(get_process_idle_event
)
1990 obj_handle_t handle
; /* process handle
*/
1992 obj_handle_t event
; /* handle to idle event
*/
1996 /* Send a message to a thread queue
*/
1998 thread_id_t id
; /* thread id
*/
1999 int type
; /* message
type (see below
) */
2000 int flags
; /* message
flags (see below
) */
2001 user_handle_t win
; /* window handle
*/
2002 unsigned int msg
; /* message code
*/
2003 lparam_t wparam
; /* parameters
*/
2004 lparam_t lparam
; /* parameters
*/
2005 timeout_t timeout
; /* timeout for reply
*/
2006 VARARG(data
,message_data
); /* message data for sent messages
*/
2009 @
REQ(post_quit_message
)
2010 int exit_code
; /* exit code to return
*/
2015 MSG_ASCII
, /* Ascii
message (from SendMessageA
) */
2016 MSG_UNICODE
, /* Unicode
message (from SendMessageW
) */
2017 MSG_NOTIFY
, /* notify
message (from SendNotifyMessageW
), always Unicode
*/
2018 MSG_CALLBACK
, /* callback
message (from SendMessageCallbackW
), always Unicode
*/
2019 MSG_CALLBACK_RESULT
,/* result of a callback message
*/
2020 MSG_OTHER_PROCESS
, /* sent from other process
, may include vararg data
, always Unicode
*/
2021 MSG_POSTED
, /* posted
message (from PostMessageW
), always Unicode
*/
2022 MSG_HARDWARE
, /* hardware message
*/
2023 MSG_WINEVENT
, /* winevent message
*/
2024 MSG_HOOK_LL
/* low
-level hardware hook
*/
2026 #define SEND_MSG_ABORT_IF_HUNG
0x01
2029 /* Send a hardware message to a thread queue
*/
2030 @
REQ(send_hardware_message
)
2031 user_handle_t win
; /* window handle
*/
2032 hw_input_t input
; /* input data
*/
2033 unsigned int flags
; /* flags (see below
) */
2035 int wait
; /* do we need to wait for a reply?
*/
2036 int prev_x
; /* previous cursor position
*/
2038 int new_x
; /* new cursor position
*/
2040 VARARG(keystate
,bytes
); /* global state array for all the keys
*/
2042 #define SEND_HWMSG_INJECTED
0x01
2045 /* Get a message from the current queue
*/
2047 unsigned int flags
; /* PM_
* flags
*/
2048 user_handle_t get_win
; /* window handle to get
*/
2049 unsigned int get_first
; /* first message code to get
*/
2050 unsigned int get_last
; /* last message code to get
*/
2051 unsigned int hw_id
; /* id of the previous hardware
message (or
0) */
2052 unsigned int wake_mask
; /* wakeup bits mask
*/
2053 unsigned int changed_mask
; /* changed bits mask
*/
2055 user_handle_t win
; /* window handle
*/
2056 unsigned int msg
; /* message code
*/
2057 lparam_t wparam
; /* parameters
*/
2058 lparam_t lparam
; /* parameters
*/
2059 int type
; /* message type
*/
2060 int x
; /* message x position
*/
2061 int y
; /* message y position
*/
2062 unsigned int time
; /* message time
*/
2063 unsigned int active_hooks
; /* active hooks bitmap
*/
2064 data_size_t total
; /* total size of extra data
*/
2065 VARARG(data
,message_data
); /* message data for sent messages
*/
2069 /* Reply to a sent message
*/
2071 int remove
; /* should we remove the message?
*/
2072 lparam_t result
; /* message result
*/
2073 VARARG(data
,bytes
); /* message data for sent messages
*/
2077 /* Accept and remove the current hardware message
*/
2078 @
REQ(accept_hardware_message
)
2079 unsigned int hw_id
; /* id of the hardware message
*/
2083 /* Retrieve the reply for the last message sent
*/
2084 @
REQ(get_message_reply
)
2085 int cancel
; /* cancel message if not ready?
*/
2087 lparam_t result
; /* message result
*/
2088 VARARG(data
,bytes
); /* message data for sent messages
*/
2092 /* Set a window timer
*/
2094 user_handle_t win
; /* window handle
*/
2095 unsigned int msg
; /* message to post
*/
2096 unsigned int rate
; /* timer rate in ms
*/
2097 lparam_t id
; /* timer id
*/
2098 lparam_t lparam
; /* message
lparam (callback proc
) */
2100 lparam_t id
; /* timer id
*/
2104 /* Kill a window timer
*/
2105 @
REQ(kill_win_timer
)
2106 user_handle_t win
; /* window handle
*/
2107 lparam_t id
; /* timer id
*/
2108 unsigned int msg
; /* message to post
*/
2112 /* check if the thread owning the window is hung
*/
2113 @
REQ(is_window_hung
)
2114 user_handle_t win
; /* window handle
*/
2120 /* Retrieve info about a serial port
*/
2121 @
REQ(get_serial_info
)
2122 obj_handle_t handle
; /* handle to comm port
*/
2125 unsigned int eventmask
;
2126 unsigned int cookie
;
2127 unsigned int pending_write
;
2131 /* Set info about a serial port
*/
2132 @
REQ(set_serial_info
)
2133 obj_handle_t handle
; /* handle to comm port
*/
2134 int flags
; /* bitmask to set
values (see below
) */
2136 #define SERIALINFO_PENDING_WRITE
0x04
2137 #define SERIALINFO_PENDING_WAIT
0x08
2140 /* Create an async I
/O
*/
2141 @
REQ(register_async
)
2142 int type
; /* type of queue to look after
*/
2143 async_data_t async
; /* async I
/O parameters
*/
2144 int count
; /* count
- usually # of bytes to be read
/written
*/
2146 #define ASYNC_TYPE_READ
0x01
2147 #define ASYNC_TYPE_WRITE
0x02
2148 #define ASYNC_TYPE_WAIT
0x03
2151 /* Cancel all async op on a fd
*/
2153 obj_handle_t handle
; /* handle to comm port
, socket or file
*/
2154 client_ptr_t iosb
; /* I
/O status
block (NULL
=all
) */
2155 int only_thread
; /* cancel matching this thread
*/
2159 /* Retrieve results of an async
*/
2160 @
REQ(get_async_result
)
2161 client_ptr_t user_arg
; /* user arg used to identify async
*/
2163 data_size_t size
; /* result
size (input or output depending on the operation
) */
2164 VARARG(out_data
,bytes
); /* iosb output data
*/
2168 /* Perform a read on a file object
*/
2170 async_data_t async
; /* async I
/O parameters
*/
2171 file_pos_t pos
; /* read position
*/
2173 obj_handle_t wait
; /* handle to wait on for blocking read
*/
2174 unsigned int options
; /* device open options
*/
2175 VARARG(data
,bytes
); /* read data
*/
2179 /* Perform a write on a file object
*/
2181 async_data_t async
; /* async I
/O parameters
*/
2182 file_pos_t pos
; /* write position
*/
2183 VARARG(data
,bytes
); /* write data
*/
2185 obj_handle_t wait
; /* handle to wait on for blocking write
*/
2186 unsigned int options
; /* device open options
*/
2187 data_size_t size
; /* size written
*/
2191 /* Perform an ioctl on a file
*/
2193 ioctl_code_t code
; /* ioctl code
*/
2194 async_data_t async
; /* async I
/O parameters
*/
2195 VARARG(in_data
,bytes
); /* ioctl input data
*/
2197 obj_handle_t wait
; /* handle to wait on for blocking ioctl
*/
2198 unsigned int options
; /* device open options
*/
2199 VARARG(out_data
,bytes
); /* ioctl output data
*/
2203 /* Store results of an async irp
*/
2204 @
REQ(set_irp_result
)
2205 obj_handle_t handle
; /* handle to the irp
*/
2206 unsigned int status
; /* status of the irp
*/
2207 data_size_t size
; /* result
size (input or output depending on the operation
) */
2208 VARARG(data
,bytes
); /* output data of the irp
*/
2212 /* Create a named pipe
*/
2213 @
REQ(create_named_pipe
)
2214 unsigned int access
;
2215 unsigned int options
;
2216 unsigned int sharing
;
2217 unsigned int maxinstances
;
2218 unsigned int outsize
;
2219 unsigned int insize
;
2222 VARARG(objattr
,object_attributes
); /* object attributes
*/
2224 obj_handle_t handle
; /* handle to the pipe
*/
2227 /* flags in create_named_pipe and get_named_pipe_info
*/
2228 #define NAMED_PIPE_MESSAGE_STREAM_WRITE
0x0001
2229 #define NAMED_PIPE_MESSAGE_STREAM_READ
0x0002
2230 #define NAMED_PIPE_NONBLOCKING_MODE
0x0004
2231 #define NAMED_PIPE_SERVER_END
0x8000
2233 /* Set named pipe information by handle
*/
2234 @
REQ(set_named_pipe_info
)
2235 obj_handle_t handle
;
2239 /* Create a window
*/
2241 user_handle_t parent
; /* parent window
*/
2242 user_handle_t owner
; /* owner window
*/
2243 atom_t atom
; /* class atom
*/
2244 mod_handle_t instance
; /* module instance
*/
2245 int dpi
; /* system DPI
*/
2246 int awareness
; /* thread DPI awareness
*/
2247 VARARG(class
,unicode_str
); /* class name
*/
2249 user_handle_t handle
; /* created window
*/
2250 user_handle_t parent
; /* full handle of parent
*/
2251 user_handle_t owner
; /* full handle of owner
*/
2252 int extra
; /* number of extra bytes
*/
2253 client_ptr_t class_ptr
; /* pointer to class in client address space
*/
2254 int dpi
; /* window DPI if not per
-monitor aware
*/
2255 int awareness
; /* window DPI awareness
*/
2259 /* Destroy a window
*/
2260 @
REQ(destroy_window
)
2261 user_handle_t handle
; /* handle to the window
*/
2265 /* Retrieve the desktop window for the current thread
*/
2266 @
REQ(get_desktop_window
)
2267 int force
; /* force creation if it doesn
't exist */
2269 user_handle_t top_window; /* handle to the desktop window */
2270 user_handle_t msg_window; /* handle to the top-level HWND_MESSAGE parent */
2274 /* Set a window owner */
2275 @REQ(set_window_owner)
2276 user_handle_t handle; /* handle to the window */
2277 user_handle_t owner; /* new owner */
2279 user_handle_t full_owner; /* full handle of new owner */
2280 user_handle_t prev_owner; /* full handle of previous owner */
2284 /* Get information from a window handle */
2285 @REQ(get_window_info)
2286 user_handle_t handle; /* handle to the window */
2288 user_handle_t full_handle; /* full 32-bit handle */
2289 user_handle_t last_active; /* last active popup */
2290 process_id_t pid; /* process owning the window */
2291 thread_id_t tid; /* thread owning the window */
2292 atom_t atom; /* class atom */
2293 int is_unicode; /* ANSI or unicode */
2294 int dpi; /* window DPI */
2295 int awareness; /* DPI awareness */
2299 /* Set some information in a window */
2300 @REQ(set_window_info)
2301 unsigned short flags; /* flags for fields to set (see below) */
2302 short int is_unicode; /* ANSI or unicode */
2303 user_handle_t handle; /* handle to the window */
2304 unsigned int style; /* window style */
2305 unsigned int ex_style; /* window extended style */
2306 unsigned int id; /* window id */
2307 mod_handle_t instance; /* creator instance */
2308 lparam_t user_data; /* user-specific data */
2309 int extra_offset; /* offset to set in extra bytes */
2310 data_size_t extra_size; /* size to set in extra bytes */
2311 lparam_t extra_value; /* value to set in extra bytes */
2313 unsigned int old_style; /* old window style */
2314 unsigned int old_ex_style; /* old window extended style */
2315 mod_handle_t old_instance; /* old creator instance */
2316 lparam_t old_user_data; /* old user-specific data */
2317 lparam_t old_extra_value; /* old value in extra bytes */
2318 unsigned int old_id; /* old window id */
2320 #define SET_WIN_STYLE 0x01
2321 #define SET_WIN_EXSTYLE 0x02
2322 #define SET_WIN_ID 0x04
2323 #define SET_WIN_INSTANCE 0x08
2324 #define SET_WIN_USERDATA 0x10
2325 #define SET_WIN_EXTRA 0x20
2326 #define SET_WIN_UNICODE 0x40
2329 /* Set the parent of a window */
2331 user_handle_t handle; /* handle to the window */
2332 user_handle_t parent; /* handle to the parent */
2334 user_handle_t old_parent; /* old parent window */
2335 user_handle_t full_parent; /* full handle of new parent */
2336 int dpi; /* new window DPI if not per-monitor aware */
2337 int awareness; /* new DPI awareness */
2341 /* Get a list of the window parents, up to the root of the tree */
2342 @REQ(get_window_parents)
2343 user_handle_t handle; /* handle to the window */
2345 int count; /* total count of parents */
2346 VARARG(parents,user_handles); /* parent handles */
2350 /* Get a list of the window children */
2351 @REQ(get_window_children)
2352 obj_handle_t desktop; /* handle to desktop */
2353 user_handle_t parent; /* parent window */
2354 atom_t atom; /* class atom for the listed children */
2355 thread_id_t tid; /* thread owning the listed children */
2356 VARARG(class,unicode_str); /* class name */
2358 int count; /* total count of children */
2359 VARARG(children,user_handles); /* children handles */
2363 /* Get a list of the window children that contain a given point */
2364 @REQ(get_window_children_from_point)
2365 user_handle_t parent; /* parent window */
2366 int x; /* point in parent coordinates */
2368 int dpi; /* dpi for the point coordinates */
2370 int count; /* total count of children */
2371 VARARG(children,user_handles); /* children handles */
2375 /* Get window tree information from a window handle */
2376 @REQ(get_window_tree)
2377 user_handle_t handle; /* handle to the window */
2379 user_handle_t parent; /* parent window */
2380 user_handle_t owner; /* owner window */
2381 user_handle_t next_sibling; /* next sibling in Z-order */
2382 user_handle_t prev_sibling; /* prev sibling in Z-order */
2383 user_handle_t first_sibling; /* first sibling in Z-order */
2384 user_handle_t last_sibling; /* last sibling in Z-order */
2385 user_handle_t first_child; /* first child */
2386 user_handle_t last_child; /* last child */
2389 /* Set the position and Z order of a window */
2390 @REQ(set_window_pos)
2391 unsigned short swp_flags; /* SWP_* flags */
2392 unsigned short paint_flags; /* paint flags (see below) */
2393 user_handle_t handle; /* handle to the window */
2394 user_handle_t previous; /* previous window in Z order */
2395 rectangle_t window; /* window rectangle (in parent coords) */
2396 rectangle_t client; /* client rectangle (in parent coords) */
2397 VARARG(valid,rectangles); /* valid rectangles from WM_NCCALCSIZE (in parent coords) */
2399 unsigned int new_style; /* new window style */
2400 unsigned int new_ex_style; /* new window extended style */
2401 user_handle_t surface_win; /* parent window that holds the surface */
2402 int needs_update; /* whether the surface region needs an update */
2404 #define SET_WINPOS_PAINT_SURFACE 0x01 /* window has a paintable surface */
2405 #define SET_WINPOS_PIXEL_FORMAT 0x02 /* window has a custom pixel format */
2407 /* Get the window and client rectangles of a window */
2408 @REQ(get_window_rectangles)
2409 user_handle_t handle; /* handle to the window */
2410 int relative; /* coords relative to (see below) */
2411 int dpi; /* DPI to map to, or zero for per-monitor DPI */
2413 rectangle_t window; /* window rectangle */
2414 rectangle_t client; /* client rectangle */
2416 enum coords_relative
2418 COORDS_CLIENT, /* relative to client area */
2419 COORDS_WINDOW, /* relative to whole window area */
2420 COORDS_PARENT, /* relative to parent's client area
*/
2421 COORDS_SCREEN
/* relative to screen origin
*/
2425 /* Get the window text
*/
2426 @
REQ(get_window_text
)
2427 user_handle_t handle
; /* handle to the window
*/
2429 data_size_t length
; /* total length in WCHARs
*/
2430 VARARG(text
,unicode_str
); /* window text
*/
2434 /* Set the window text
*/
2435 @
REQ(set_window_text
)
2436 user_handle_t handle
; /* handle to the window
*/
2437 VARARG(text
,unicode_str
); /* window text
*/
2441 /* Get the coordinates offset between two windows
*/
2442 @
REQ(get_windows_offset
)
2443 user_handle_t from
; /* handle to the first window
*/
2444 user_handle_t to
; /* handle to the second window
*/
2445 int dpi
; /* DPI to map to
, or zero for per
-monitor DPI
*/
2447 int x
; /* x coordinate offset
*/
2448 int y
; /* y coordinate offset
*/
2449 int mirror
; /* whether to mirror the x coordinate
*/
2453 /* Get the visible region of a window
*/
2454 @
REQ(get_visible_region
)
2455 user_handle_t window
; /* handle to the window
*/
2456 unsigned int flags
; /* DCX flags
*/
2458 user_handle_t top_win
; /* top window to clip against
*/
2459 rectangle_t top_rect
; /* top window visible rect with screen coords
*/
2460 rectangle_t win_rect
; /* window rect in screen coords
*/
2461 unsigned int paint_flags
; /* paint
flags (from SET_WINPOS_
* flags
) */
2462 data_size_t total_size
; /* total size of the resulting region
*/
2463 VARARG(region
,rectangles
); /* list of rectangles for the
region (in screen coords
) */
2467 /* Get the visible surface region of a window
*/
2468 @
REQ(get_surface_region
)
2469 user_handle_t window
; /* handle to the window
*/
2471 rectangle_t visible_rect
; /* window visible rect in screen coords
*/
2472 data_size_t total_size
; /* total size of the resulting region
*/
2473 VARARG(region
,rectangles
); /* list of rectangles for the
region (in screen coords
) */
2477 /* Get the window region
*/
2478 @
REQ(get_window_region
)
2479 user_handle_t window
; /* handle to the window
*/
2481 data_size_t total_size
; /* total size of the resulting region
*/
2482 VARARG(region
,rectangles
); /* list of rectangles for the
region (in window coords
) */
2486 /* Set the window region
*/
2487 @
REQ(set_window_region
)
2488 user_handle_t window
; /* handle to the window
*/
2489 int redraw
; /* redraw the window?
*/
2490 VARARG(region
,rectangles
); /* list of rectangles for the
region (in window coords
) */
2494 /* Get the window update region
*/
2495 @
REQ(get_update_region
)
2496 user_handle_t window
; /* handle to the window
*/
2497 user_handle_t from_child
; /* child to start searching from
*/
2498 unsigned int flags
; /* update
flags (see below
) */
2500 user_handle_t child
; /* child to
repaint (or window itself
) */
2501 unsigned int flags
; /* resulting update
flags (see below
) */
2502 data_size_t total_size
; /* total size of the resulting region
*/
2503 VARARG(region
,rectangles
); /* list of rectangles for the
region (in screen coords
) */
2505 #define UPDATE_NONCLIENT
0x001 /* get region for repainting non
-client area
*/
2506 #define UPDATE_ERASE
0x002 /* get region for erasing client area
*/
2507 #define UPDATE_PAINT
0x004 /* get region for painting client area
*/
2508 #define UPDATE_INTERNALPAINT
0x008 /* get region if internal paint is pending
*/
2509 #define UPDATE_ALLCHILDREN
0x010 /* force repaint of all children
*/
2510 #define UPDATE_NOCHILDREN
0x020 /* don
't try to repaint any children */
2511 #define UPDATE_NOREGION 0x040 /* don't return a region
, only the flags
*/
2512 #define UPDATE_DELAYED_ERASE
0x080 /* still needs erase after BeginPaint
*/
2513 #define UPDATE_CLIPCHILDREN
0x100 /* remove clipped children from the update region
*/
2516 /* Update the z order of a window so that a given rectangle is fully visible
*/
2517 @
REQ(update_window_zorder
)
2518 user_handle_t window
; /* handle to the window
*/
2519 rectangle_t rect
; /* rectangle that must be
visible (in client coords
) */
2523 /* Mark parts of a window as needing a redraw
*/
2525 user_handle_t window
; /* handle to the window
*/
2526 unsigned int flags
; /* RDW_
* flags
*/
2527 VARARG(region
,rectangles
); /* list of rectangles for the
region (in window coords
) */
2531 /* Set a window property
*/
2532 @
REQ(set_window_property
)
2533 user_handle_t window
; /* handle to the window
*/
2534 lparam_t data
; /* data to store
*/
2535 atom_t atom
; /* property
atom (if no name specified
) */
2536 VARARG(name
,unicode_str
); /* property name
*/
2540 /* Remove a window property
*/
2541 @
REQ(remove_window_property
)
2542 user_handle_t window
; /* handle to the window
*/
2543 atom_t atom
; /* property
atom (if no name specified
) */
2544 VARARG(name
,unicode_str
); /* property name
*/
2546 lparam_t data
; /* data stored in property
*/
2550 /* Get a window property
*/
2551 @
REQ(get_window_property
)
2552 user_handle_t window
; /* handle to the window
*/
2553 atom_t atom
; /* property
atom (if no name specified
) */
2554 VARARG(name
,unicode_str
); /* property name
*/
2556 lparam_t data
; /* data stored in property
*/
2560 /* Get the list of properties of a window
*/
2561 @
REQ(get_window_properties
)
2562 user_handle_t window
; /* handle to the window
*/
2564 int total
; /* total number of properties
*/
2565 VARARG(props
,properties
); /* list of properties
*/
2569 /* Create a window station
*/
2570 @
REQ(create_winstation
)
2571 unsigned int flags
; /* window station flags
*/
2572 unsigned int access
; /* wanted access rights
*/
2573 unsigned int attributes
; /* object attributes
*/
2574 obj_handle_t rootdir
; /* root directory
*/
2575 VARARG(name
,unicode_str
); /* object name
*/
2577 obj_handle_t handle
; /* handle to the window station
*/
2581 /* Open a handle to a window station
*/
2582 @
REQ(open_winstation
)
2583 unsigned int access
; /* wanted access rights
*/
2584 unsigned int attributes
; /* object attributes
*/
2585 obj_handle_t rootdir
; /* root directory
*/
2586 VARARG(name
,unicode_str
); /* object name
*/
2588 obj_handle_t handle
; /* handle to the window station
*/
2592 /* Close a window station
*/
2593 @
REQ(close_winstation
)
2594 obj_handle_t handle
; /* handle to the window station
*/
2598 /* Get the process current window station
*/
2599 @
REQ(get_process_winstation
)
2601 obj_handle_t handle
; /* handle to the window station
*/
2605 /* Set the process current window station
*/
2606 @
REQ(set_process_winstation
)
2607 obj_handle_t handle
; /* handle to the window station
*/
2611 /* Enumerate window stations
*/
2612 @
REQ(enum_winstation
)
2613 unsigned int index
; /* current index
*/
2615 unsigned int next
; /* next index
*/
2616 VARARG(name
,unicode_str
); /* window station name
*/
2620 /* Create a desktop
*/
2621 @
REQ(create_desktop
)
2622 unsigned int flags
; /* desktop flags
*/
2623 unsigned int access
; /* wanted access rights
*/
2624 unsigned int attributes
; /* object attributes
*/
2625 VARARG(name
,unicode_str
); /* object name
*/
2627 obj_handle_t handle
; /* handle to the desktop
*/
2631 /* Open a handle to a desktop
*/
2633 obj_handle_t winsta
; /* window station to
open (null allowed
) */
2634 unsigned int flags
; /* desktop flags
*/
2635 unsigned int access
; /* wanted access rights
*/
2636 unsigned int attributes
; /* object attributes
*/
2637 VARARG(name
,unicode_str
); /* object name
*/
2639 obj_handle_t handle
; /* handle to the desktop
*/
2643 /* Open a handle to current input desktop
*/
2644 @
REQ(open_input_desktop
)
2645 unsigned int flags
; /* desktop flags
*/
2646 unsigned int access
; /* wanted access rights
*/
2647 unsigned int attributes
; /* object attributes
*/
2649 obj_handle_t handle
; /* handle to the desktop
*/
2653 /* Close a desktop
*/
2655 obj_handle_t handle
; /* handle to the desktop
*/
2659 /* Get the thread current desktop
*/
2660 @
REQ(get_thread_desktop
)
2661 thread_id_t tid
; /* thread id
*/
2663 obj_handle_t handle
; /* handle to the desktop
*/
2667 /* Set the thread current desktop
*/
2668 @
REQ(set_thread_desktop
)
2669 obj_handle_t handle
; /* handle to the desktop
*/
2673 /* Enumerate desktops
*/
2675 obj_handle_t winstation
; /* handle to the window station
*/
2676 unsigned int index
; /* current index
*/
2678 unsigned int next
; /* next index
*/
2679 VARARG(name
,unicode_str
); /* window station name
*/
2683 /* Get
/set information about a user
object (window station or desktop
) */
2684 @
REQ(set_user_object_info
)
2685 obj_handle_t handle
; /* handle to the object
*/
2686 unsigned int flags
; /* information to set
/get
*/
2687 unsigned int obj_flags
; /* new object flags
*/
2689 int is_desktop
; /* is object a desktop?
*/
2690 unsigned int old_obj_flags
; /* old object flags
*/
2691 VARARG(name
,unicode_str
); /* object name
*/
2693 #define SET_USER_OBJECT_SET_FLAGS
1
2694 #define SET_USER_OBJECT_GET_FULL_NAME
2
2697 /* Register a hotkey
*/
2698 @
REQ(register_hotkey
)
2699 user_handle_t window
; /* handle to the window
*/
2700 int id
; /* hotkey identifier
*/
2701 unsigned int flags
; /* modifier keys
*/
2702 unsigned int vkey
; /* virtual key code
*/
2704 int replaced
; /* did we replace an existing hotkey?
*/
2705 unsigned int flags
; /* flags of replaced hotkey
*/
2706 unsigned int vkey
; /* virtual key code of replaced hotkey
*/
2710 /* Unregister a hotkey
*/
2711 @
REQ(unregister_hotkey
)
2712 user_handle_t window
; /* handle to the window
*/
2713 int id
; /* hotkey identifier
*/
2715 unsigned int flags
; /* flags of removed hotkey
*/
2716 unsigned int vkey
; /* virtual key code of removed hotkey
*/
2720 /* Attach (or detach
) thread inputs
*/
2721 @
REQ(attach_thread_input
)
2722 thread_id_t tid_from
; /* thread to be attached
*/
2723 thread_id_t tid_to
; /* thread to which tid_from should be attached
*/
2724 int attach
; /* is it an attach?
*/
2728 /* Get input data for a given thread
*/
2729 @
REQ(get_thread_input
)
2730 thread_id_t tid
; /* id of thread
*/
2732 user_handle_t focus
; /* handle to the focus window
*/
2733 user_handle_t capture
; /* handle to the capture window
*/
2734 user_handle_t active
; /* handle to the active window
*/
2735 user_handle_t foreground
; /* handle to the global foreground window
*/
2736 user_handle_t menu_owner
; /* handle to the menu owner
*/
2737 user_handle_t move_size
; /* handle to the moving
/resizing window
*/
2738 user_handle_t caret
; /* handle to the caret window
*/
2739 user_handle_t cursor
; /* handle to the cursor
*/
2740 int show_count
; /* cursor show count
*/
2741 rectangle_t rect
; /* caret rectangle
*/
2745 /* Get the time of the last input event
*/
2746 @
REQ(get_last_input_time
)
2752 /* Retrieve queue keyboard state for a given thread
*/
2754 thread_id_t tid
; /* id of thread
*/
2755 int key
; /* optional key code or
-1 */
2757 unsigned char state
; /* state of specified key
*/
2758 VARARG(keystate
,bytes
); /* state array for all the keys
*/
2761 /* Set queue keyboard state for a given thread
*/
2763 thread_id_t tid
; /* id of thread
*/
2764 int async
; /* whether to change the async state too
*/
2765 VARARG(keystate
,bytes
); /* state array for all the keys
*/
2768 /* Set the system foreground window
*/
2769 @
REQ(set_foreground_window
)
2770 user_handle_t handle
; /* handle to the foreground window
*/
2772 user_handle_t previous
; /* handle to the previous foreground window
*/
2773 int send_msg_old
; /* whether we have to send a msg to the old window
*/
2774 int send_msg_new
; /* whether we have to send a msg to the new window
*/
2777 /* Set the current thread focus window
*/
2778 @
REQ(set_focus_window
)
2779 user_handle_t handle
; /* handle to the focus window
*/
2781 user_handle_t previous
; /* handle to the previous focus window
*/
2784 /* Set the current thread active window
*/
2785 @
REQ(set_active_window
)
2786 user_handle_t handle
; /* handle to the active window
*/
2788 user_handle_t previous
; /* handle to the previous active window
*/
2791 /* Set the current thread capture window
*/
2792 @
REQ(set_capture_window
)
2793 user_handle_t handle
; /* handle to the capture window
*/
2794 unsigned int flags
; /* capture
flags (see below
) */
2796 user_handle_t previous
; /* handle to the previous capture window
*/
2797 user_handle_t full_handle
; /* full
32-bit handle of new capture window
*/
2799 #define CAPTURE_MENU
0x01 /* capture is for a menu
*/
2800 #define CAPTURE_MOVESIZE
0x02 /* capture is for moving
/resizing
*/
2803 /* Set the current thread caret window
*/
2804 @
REQ(set_caret_window
)
2805 user_handle_t handle
; /* handle to the caret window
*/
2806 int width
; /* caret width
*/
2807 int height
; /* caret height
*/
2809 user_handle_t previous
; /* handle to the previous caret window
*/
2810 rectangle_t old_rect
; /* previous caret rectangle
*/
2811 int old_hide
; /* previous hide count
*/
2812 int old_state
; /* previous caret
state (1=on
, 0=off
) */
2816 /* Set the current thread caret information
*/
2817 @
REQ(set_caret_info
)
2818 unsigned int flags
; /* caret
flags (see below
) */
2819 user_handle_t handle
; /* handle to the caret window
*/
2820 int x
; /* caret x position
*/
2821 int y
; /* caret y position
*/
2822 int hide
; /* increment for hide
count (can be negative to show it
) */
2823 int state
; /* caret
state (see below
) */
2825 user_handle_t full_handle
; /* handle to the current caret window
*/
2826 rectangle_t old_rect
; /* previous caret rectangle
*/
2827 int old_hide
; /* previous hide count
*/
2828 int old_state
; /* previous caret
state (1=on
, 0=off
) */
2830 #define SET_CARET_POS
0x01 /* set the caret position from x
,y
*/
2831 #define SET_CARET_HIDE
0x02 /* increment the caret hide count
*/
2832 #define SET_CARET_STATE
0x04 /* set the caret on
/off state
*/
2835 CARET_STATE_OFF
, /* off
*/
2836 CARET_STATE_ON
, /* on
*/
2837 CARET_STATE_TOGGLE
, /* toggle current state
*/
2838 CARET_STATE_ON_IF_MOVED
/* on if the position differs
, unchanged otherwise
*/
2842 /* Set a window hook
*/
2844 int id
; /* id of the hook
*/
2845 process_id_t pid
; /* id of process to set the hook into
*/
2846 thread_id_t tid
; /* id of thread to set the hook into
*/
2849 client_ptr_t proc
; /* hook procedure
*/
2851 int unicode
; /* is it a unicode hook?
*/
2852 VARARG(module
,unicode_str
); /* module name
*/
2854 user_handle_t handle
; /* handle to the hook
*/
2855 unsigned int active_hooks
; /* active hooks bitmap
*/
2859 /* Remove a window hook
*/
2861 user_handle_t handle
; /* handle to the hook
*/
2862 client_ptr_t proc
; /* hook procedure if handle is
0 */
2863 int id
; /* id of the hook if handle is
0 */
2865 unsigned int active_hooks
; /* active hooks bitmap
*/
2869 /* Start calling a hook chain
*/
2870 @
REQ(start_hook_chain
)
2871 int id
; /* id of the hook
*/
2872 int event
; /* signalled event
*/
2873 user_handle_t window
; /* handle to the event window
*/
2874 int object_id
; /* object id for out of context winevent
*/
2875 int child_id
; /* child id for out of context winevent
*/
2877 user_handle_t handle
; /* handle to the next hook
*/
2878 process_id_t pid
; /* process id for low
-level keyboard
/mouse hooks
*/
2879 thread_id_t tid
; /* thread id for low
-level keyboard
/mouse hooks
*/
2880 int unicode
; /* is it a unicode hook?
*/
2881 client_ptr_t proc
; /* hook procedure
*/
2882 unsigned int active_hooks
; /* active hooks bitmap
*/
2883 VARARG(module
,unicode_str
); /* module name
*/
2887 /* Finished calling a hook chain
*/
2888 @
REQ(finish_hook_chain
)
2889 int id
; /* id of the hook
*/
2893 /* Get the hook information
*/
2895 user_handle_t handle
; /* handle to the current hook
*/
2896 int get_next
; /* do we want info about current or next hook?
*/
2897 int event
; /* signalled event
*/
2898 user_handle_t window
; /* handle to the event window
*/
2899 int object_id
; /* object id for out of context winevent
*/
2900 int child_id
; /* child id for out of context winevent
*/
2902 user_handle_t handle
; /* handle to the hook
*/
2903 int id
; /* id of the hook
*/
2904 process_id_t pid
; /* process id for low
-level keyboard
/mouse hooks
*/
2905 thread_id_t tid
; /* thread id for low
-level keyboard
/mouse hooks
*/
2906 client_ptr_t proc
; /* hook procedure
*/
2907 int unicode
; /* is it a unicode hook?
*/
2908 VARARG(module
,unicode_str
); /* module name
*/
2912 /* Create a window class
*/
2914 int local
; /* is it a local class?
*/
2915 atom_t atom
; /* class atom
*/
2916 unsigned int style
; /* class style
*/
2917 mod_handle_t instance
; /* module instance
*/
2918 int extra
; /* number of extra class bytes
*/
2919 int win_extra
; /* number of window extra bytes
*/
2920 client_ptr_t client_ptr
; /* pointer to class in client address space
*/
2921 data_size_t name_offset
; /* base class name offset for specified atom
*/
2922 VARARG(name
,unicode_str
); /* class name
*/
2924 atom_t atom
; /* resulting class atom
*/
2928 /* Destroy a window class
*/
2930 atom_t atom
; /* class atom
*/
2931 mod_handle_t instance
; /* module instance
*/
2932 VARARG(name
,unicode_str
); /* class name
*/
2934 client_ptr_t client_ptr
; /* pointer to class in client address space
*/
2938 /* Set some information in a class
*/
2939 @
REQ(set_class_info
)
2940 user_handle_t window
; /* handle to the window
*/
2941 unsigned int flags
; /* flags for info to
set (see below
) */
2942 atom_t atom
; /* class atom
*/
2943 unsigned int style
; /* class style
*/
2944 int win_extra
; /* number of window extra bytes
*/
2945 mod_handle_t instance
; /* module instance
*/
2946 int extra_offset
; /* offset to set in extra bytes
*/
2947 data_size_t extra_size
; /* size to set in extra bytes
*/
2948 lparam_t extra_value
; /* value to set in extra bytes
*/
2950 atom_t old_atom
; /* previous class atom
*/
2951 atom_t base_atom
; /* base class atom
*/
2952 mod_handle_t old_instance
; /* previous module instance
*/
2953 lparam_t old_extra_value
; /* old value in extra bytes
*/
2954 unsigned int old_style
; /* previous class style
*/
2955 int old_extra
; /* previous number of class extra bytes
*/
2956 int old_win_extra
; /* previous number of window extra bytes
*/
2958 #define SET_CLASS_ATOM
0x0001
2959 #define SET_CLASS_STYLE
0x0002
2960 #define SET_CLASS_WINEXTRA
0x0004
2961 #define SET_CLASS_INSTANCE
0x0008
2962 #define SET_CLASS_EXTRA
0x0010
2965 /* Open the clipboard
*/
2966 @
REQ(open_clipboard
)
2967 user_handle_t window
; /* clipboard window
*/
2969 user_handle_t owner
; /* current clipboard owner
*/
2973 /* Close the clipboard
*/
2974 @
REQ(close_clipboard
)
2976 user_handle_t viewer
; /* first clipboard viewer
*/
2977 user_handle_t owner
; /* current clipboard owner
*/
2981 /* Empty the clipboard and grab ownership
*/
2982 @
REQ(empty_clipboard
)
2986 /* Add a data format to the clipboard
*/
2987 @
REQ(set_clipboard_data
)
2988 unsigned int format
; /* clipboard format of the data
*/
2989 unsigned int lcid
; /* locale id to use for synthesizing text formats
*/
2990 VARARG(data
,bytes
); /* data contents
*/
2992 unsigned int seqno
; /* sequence number for the set data
*/
2996 /* Fetch a data format from the clipboard
*/
2997 @
REQ(get_clipboard_data
)
2998 unsigned int format
; /* clipboard format of the data
*/
2999 int render
; /* will we try to render it if missing?
*/
3000 int cached
; /* do we already have it in the client
-side cache?
*/
3001 unsigned int seqno
; /* sequence number for the data in the cache
*/
3003 unsigned int from
; /* for synthesized data
, format to generate it from
*/
3004 user_handle_t owner
; /* clipboard owner for delayed
-rendered formats
*/
3005 unsigned int seqno
; /* sequence number for the originally set data
*/
3006 data_size_t total
; /* total data size
*/
3007 VARARG(data
,bytes
); /* data contents
*/
3011 /* Retrieve a list of available formats
*/
3012 @
REQ(get_clipboard_formats
)
3013 unsigned int format
; /* specific format to query
, return all if
0 */
3015 unsigned int count
; /* count of available formats
*/
3016 VARARG(formats
,uints
); /* array of available formats
*/
3020 /* Retrieve the next available format
*/
3021 @
REQ(enum_clipboard_formats
)
3022 unsigned int previous
; /* previous format
, or first if
0 */
3024 unsigned int format
; /* next format
*/
3028 /* Release ownership of the clipboard
*/
3029 @
REQ(release_clipboard
)
3030 user_handle_t owner
; /* clipboard owner to release
*/
3032 user_handle_t viewer
; /* first clipboard viewer
*/
3033 user_handle_t owner
; /* current clipboard owner
*/
3037 /* Get clipboard information
*/
3038 @
REQ(get_clipboard_info
)
3040 user_handle_t window
; /* clipboard window
*/
3041 user_handle_t owner
; /* clipboard owner
*/
3042 user_handle_t viewer
; /* clipboard viewer
*/
3043 unsigned int seqno
; /* current sequence number
*/
3047 /* Set the clipboard viewer window
*/
3048 @
REQ(set_clipboard_viewer
)
3049 user_handle_t viewer
; /* clipboard viewer
*/
3050 user_handle_t previous
; /* if non
-zero
, check that this was the previous viewer
*/
3052 user_handle_t old_viewer
; /* previous clipboard viewer
*/
3053 user_handle_t owner
; /* clipboard owner
*/
3057 /* Add a clipboard listener window
*/
3058 @
REQ(add_clipboard_listener
)
3059 user_handle_t window
; /* clipboard listener window
*/
3063 /* Remove a clipboard listener window
*/
3064 @
REQ(remove_clipboard_listener
)
3065 user_handle_t window
; /* clipboard listener window
*/
3069 /* Open a security token
*/
3071 obj_handle_t handle
; /* handle to the thread or process
*/
3072 unsigned int access
; /* access rights to the new token
*/
3073 unsigned int attributes
;/* object attributes
*/
3074 unsigned int flags
; /* flags (see below
) */
3076 obj_handle_t token
; /* handle to the token
*/
3078 #define OPEN_TOKEN_THREAD
1
3079 #define OPEN_TOKEN_AS_SELF
2
3082 /* Set
/get the global windows
*/
3083 @
REQ(set_global_windows
)
3084 unsigned int flags
; /* flags for fields to
set (see below
) */
3085 user_handle_t shell_window
; /* handle to the new shell window
*/
3086 user_handle_t shell_listview
; /* handle to the new shell listview window
*/
3087 user_handle_t progman_window
; /* handle to the new program manager window
*/
3088 user_handle_t taskman_window
; /* handle to the new task manager window
*/
3090 user_handle_t old_shell_window
; /* handle to the shell window
*/
3091 user_handle_t old_shell_listview
; /* handle to the shell listview window
*/
3092 user_handle_t old_progman_window
; /* handle to the new program manager window
*/
3093 user_handle_t old_taskman_window
; /* handle to the new task manager window
*/
3095 #define SET_GLOBAL_SHELL_WINDOWS
0x01 /* set both main shell and listview windows
*/
3096 #define SET_GLOBAL_PROGMAN_WINDOW
0x02
3097 #define SET_GLOBAL_TASKMAN_WINDOW
0x04
3099 /* Adjust the privileges held by a token
*/
3100 @
REQ(adjust_token_privileges
)
3101 obj_handle_t handle
; /* handle to the token
*/
3102 int disable_all
; /* disable all privileges?
*/
3103 int get_modified_state
; /* get modified privileges?
*/
3104 VARARG(privileges
,LUID_AND_ATTRIBUTES
); /* privileges to enable
/disable
/remove
*/
3106 unsigned int len
; /* total length in bytes required to store token privileges
*/
3107 VARARG(privileges
,LUID_AND_ATTRIBUTES
); /* modified privileges
*/
3110 /* Retrieves the set of privileges held by or available to a token
*/
3111 @
REQ(get_token_privileges
)
3112 obj_handle_t handle
; /* handle to the token
*/
3114 unsigned int len
; /* total length in bytes required to store token privileges
*/
3115 VARARG(privileges
,LUID_AND_ATTRIBUTES
); /* privileges held by or available to a token
*/
3118 /* Check the token has the required privileges
*/
3119 @
REQ(check_token_privileges
)
3120 obj_handle_t handle
; /* handle to the token
*/
3121 int all_required
; /* are all the privileges required for the check to succeed?
*/
3122 VARARG(privileges
,LUID_AND_ATTRIBUTES
); /* privileges to check
*/
3124 int has_privileges
; /* does the token have the required privileges?
*/
3125 VARARG(privileges
,LUID_AND_ATTRIBUTES
); /* privileges held by or available to a token
*/
3128 @
REQ(duplicate_token
)
3129 obj_handle_t handle
; /* handle to the token to duplicate
*/
3130 unsigned int access
; /* access rights to the new token
*/
3131 int primary
; /* is the new token to be a primary one?
*/
3132 int impersonation_level
; /* impersonation level of the new token
*/
3133 VARARG(objattr
,object_attributes
); /* object attributes
*/
3135 obj_handle_t new_handle
; /* duplicated handle
*/
3139 obj_handle_t handle
; /* handle to the token to duplicate
*/
3140 unsigned int flags
; /* flags
*/
3141 data_size_t privileges_size
; /* size of privileges
*/
3142 VARARG(privileges
,LUID_AND_ATTRIBUTES
,privileges_size
); /* privileges to remove from new token
*/
3143 VARARG(disable_sids
,SID
); /* array of groups to remove from new token
*/
3145 obj_handle_t new_handle
; /* filtered handle
*/
3149 obj_handle_t handle
; /* handle to the token
*/
3150 unsigned int desired_access
; /* desired access to the object
*/
3151 generic_map_t mapping
; /* mapping to specific rights
*/
3152 VARARG(sd
,security_descriptor
); /* security descriptor to check
*/
3154 unsigned int access_granted
; /* access rights actually granted
*/
3155 unsigned int access_status
; /* was access granted?
*/
3156 unsigned int privileges_len
; /* length needed to store privileges
*/
3157 VARARG(privileges
,LUID_AND_ATTRIBUTES
); /* privileges used during access check
*/
3161 obj_handle_t handle
; /* handle to the token
*/
3162 unsigned int which_sid
; /* which SID to retrieve from the token
*/
3164 data_size_t sid_len
; /* length needed to store sid
*/
3165 VARARG(sid
,SID
); /* the sid specified by which_sid from the token
*/
3168 @
REQ(get_token_groups
)
3169 obj_handle_t handle
; /* handle to the token
*/
3171 data_size_t user_len
; /* length needed to store user
*/
3172 VARARG(user
,token_groups
); /* groups the token
's user belongs to */
3175 @REQ(get_token_default_dacl)
3176 obj_handle_t handle; /* handle to the token */
3178 data_size_t acl_len; /* length needed to store access control list */
3179 VARARG(acl,ACL); /* access control list */
3182 @REQ(set_token_default_dacl)
3183 obj_handle_t handle; /* handle to the token */
3184 VARARG(acl,ACL); /* default dacl to set */
3187 @REQ(set_security_object)
3188 obj_handle_t handle; /* handle to the object */
3189 unsigned int security_info; /* which parts of security descriptor to set */
3190 VARARG(sd,security_descriptor); /* security descriptor to set */
3193 @REQ(get_security_object)
3194 obj_handle_t handle; /* handle to the object */
3195 unsigned int security_info; /* which parts of security descriptor to get */
3197 unsigned int sd_len; /* buffer size needed for sd */
3198 VARARG(sd,security_descriptor); /* retrieved security descriptor */
3205 obj_handle_t handle;
3206 unsigned int access;
3207 unsigned int attributes;
3211 /* Return a list of all opened handles */
3212 @REQ(get_system_handles)
3214 unsigned int count; /* number of handles */
3215 VARARG(data,handle_infos); /* array of handle_infos */
3219 /* Create a mailslot */
3220 @REQ(create_mailslot)
3221 unsigned int access; /* wanted access rights */
3222 timeout_t read_timeout;
3223 unsigned int max_msgsize;
3224 VARARG(objattr,object_attributes); /* object attributes */
3226 obj_handle_t handle; /* handle to the mailslot */
3230 /* Set mailslot information */
3231 @REQ(set_mailslot_info)
3232 obj_handle_t handle; /* handle to the mailslot */
3233 timeout_t read_timeout;
3236 timeout_t read_timeout;
3237 unsigned int max_msgsize;
3239 #define MAILSLOT_SET_READ_TIMEOUT 1
3242 /* Create a directory object */
3243 @REQ(create_directory)
3244 unsigned int access; /* access flags */
3245 VARARG(objattr,object_attributes); /* object attributes */
3247 obj_handle_t handle; /* handle to the directory */
3251 /* Open a directory object */
3252 @REQ(open_directory)
3253 unsigned int access; /* access flags */
3254 unsigned int attributes; /* object attributes */
3255 obj_handle_t rootdir; /* root directory */
3256 VARARG(directory_name,unicode_str); /* Directory name */
3258 obj_handle_t handle; /* handle to the directory */
3262 /* Get a directory entry by index */
3263 @REQ(get_directory_entry)
3264 obj_handle_t handle; /* handle to the directory */
3265 unsigned int index; /* entry index */
3267 data_size_t name_len; /* length of the entry name in bytes */
3268 VARARG(name,unicode_str,name_len); /* entry name */
3269 VARARG(type,unicode_str); /* entry type */
3273 /* Create a symbolic link object */
3274 @REQ(create_symlink)
3275 unsigned int access; /* access flags */
3276 VARARG(objattr,object_attributes); /* object attributes */
3277 VARARG(target_name,unicode_str); /* target name */
3279 obj_handle_t handle; /* handle to the symlink */
3283 /* Open a symbolic link object */
3285 unsigned int access; /* access flags */
3286 unsigned int attributes; /* object attributes */
3287 obj_handle_t rootdir; /* root directory */
3288 VARARG(name,unicode_str); /* symlink name */
3290 obj_handle_t handle; /* handle to the symlink */
3294 /* Query a symbolic link object */
3296 obj_handle_t handle; /* handle to the symlink */
3298 data_size_t total; /* total needed size for name */
3299 VARARG(target_name,unicode_str); /* target name */
3303 /* Query basic object information */
3304 @REQ(get_object_info)
3305 obj_handle_t handle; /* handle to the object */
3307 unsigned int access; /* granted access mask */
3308 unsigned int ref_count; /* object ref count */
3309 unsigned int handle_count; /* object handle count */
3310 data_size_t total; /* total needed size for name */
3311 VARARG(name,unicode_str); /* object name */
3315 /* Query object type name information */
3316 @REQ(get_object_type)
3317 obj_handle_t handle; /* handle to the object */
3319 VARARG(info,object_type_info); /* type information */
3323 /* Query type information for all types */
3324 @REQ(get_object_types)
3326 int count; /* total count of object types */
3327 VARARG(info,object_types_info); /* type information */
3331 /* Allocate a locally-unique identifier */
3332 @REQ(allocate_locally_unique_id)
3338 /* Create a device manager */
3339 @REQ(create_device_manager)
3340 unsigned int access; /* wanted access rights */
3341 unsigned int attributes; /* object attributes */
3343 obj_handle_t handle; /* handle to the device */
3347 /* Create a device */
3349 obj_handle_t rootdir; /* root directory */
3350 client_ptr_t user_ptr; /* opaque ptr for use by client */
3351 obj_handle_t manager; /* device manager */
3352 VARARG(name,unicode_str); /* object name */
3356 /* Delete a device */
3358 obj_handle_t manager; /* handle to the device manager */
3359 client_ptr_t device; /* pointer to the device */
3363 /* Retrieve the next pending device irp request */
3364 @REQ(get_next_device_request)
3365 obj_handle_t manager; /* handle to the device manager */
3366 obj_handle_t prev; /* handle to the previous irp */
3367 unsigned int status; /* status of the previous irp */
3368 client_ptr_t user_ptr; /* user pointer of the previous irp */
3370 irp_params_t params; /* irp parameters */
3371 obj_handle_t next; /* handle to the next irp */
3372 thread_id_t client_tid; /* tid of thread calling irp */
3373 client_ptr_t client_thread; /* pointer to thread object of calling irp */
3374 data_size_t in_size; /* total needed input size */
3375 VARARG(next_data,bytes); /* input data of the next irp */
3379 /* Get kernel pointer from server object */
3380 @REQ(get_kernel_object_ptr)
3381 obj_handle_t manager; /* handle to the device manager */
3382 obj_handle_t handle; /* object handle */
3384 client_ptr_t user_ptr; /* kernel object pointer */
3388 /* Associate kernel pointer with server object */
3389 @REQ(set_kernel_object_ptr)
3390 obj_handle_t manager; /* handle to the device manager */
3391 obj_handle_t handle; /* object handle */
3392 client_ptr_t user_ptr; /* kernel object pointer */
3396 /* Grab server object reference from kernel object pointer */
3397 @REQ(grab_kernel_object)
3398 obj_handle_t manager; /* handle to the device manager */
3399 client_ptr_t user_ptr; /* kernel object pointer */
3403 /* Release server object reference from kernel object pointer */
3404 @REQ(release_kernel_object)
3405 obj_handle_t manager; /* handle to the device manager */
3406 client_ptr_t user_ptr; /* kernel object pointer */
3410 /* Get handle from kernel object pointer */
3411 @REQ(get_kernel_object_handle)
3412 obj_handle_t manager; /* handle to the device manager */
3413 client_ptr_t user_ptr; /* kernel object pointer */
3414 unsigned int access; /* wanted access rights */
3416 obj_handle_t handle; /* kernel object handle */
3420 /* Make the current process a system process */
3421 @REQ(make_process_system)
3423 obj_handle_t event; /* event signaled when all user processes have exited */
3427 /* Get detailed fixed-size information about a token */
3428 @REQ(get_token_info)
3429 obj_handle_t handle; /* handle to the object */
3431 luid_t token_id; /* locally-unique identifier of the token */
3432 luid_t modified_id; /* locally-unique identifier of the modified version of the token */
3433 int primary; /* is the token primary or impersonation? */
3434 int impersonation_level; /* level of impersonation */
3435 int elevation; /* elevation type */
3436 int group_count; /* the number of groups the token is a member of */
3437 int privilege_count; /* the number of privileges the token has */
3441 /* Create a token which is an elevation counterpart to this token */
3442 @REQ(create_linked_token)
3443 obj_handle_t handle; /* handle to the token */
3445 obj_handle_t linked; /* handle to the linked token */
3449 /* Create I/O completion port */
3450 @REQ(create_completion)
3451 unsigned int access; /* desired access to a port */
3452 unsigned int concurrent; /* max number of concurrent active threads */
3453 VARARG(objattr,object_attributes); /* object attributes */
3455 obj_handle_t handle; /* port handle */
3459 /* Open I/O completion port */
3460 @REQ(open_completion)
3461 unsigned int access; /* desired access to a port */
3462 unsigned int attributes; /* object attributes */
3463 obj_handle_t rootdir; /* root directory */
3464 VARARG(filename,unicode_str); /* port name */
3466 obj_handle_t handle; /* port handle */
3470 /* add completion to completion port */
3471 @REQ(add_completion)
3472 obj_handle_t handle; /* port handle */
3473 apc_param_t ckey; /* completion key */
3474 apc_param_t cvalue; /* completion value */
3475 apc_param_t information; /* IO_STATUS_BLOCK Information */
3476 unsigned int status; /* completion result */
3480 /* get completion from completion port queue */
3481 @REQ(remove_completion)
3482 obj_handle_t handle; /* port handle */
3484 apc_param_t ckey; /* completion key */
3485 apc_param_t cvalue; /* completion value */
3486 apc_param_t information; /* IO_STATUS_BLOCK Information */
3487 unsigned int status; /* completion result */
3491 /* get completion queue depth */
3492 @REQ(query_completion)
3493 obj_handle_t handle; /* port handle */
3495 unsigned int depth; /* completion queue depth */
3499 /* associate object with completion port */
3500 @REQ(set_completion_info)
3501 obj_handle_t handle; /* object handle */
3502 apc_param_t ckey; /* completion key */
3503 obj_handle_t chandle; /* port handle */
3507 /* check for associated completion and push msg */
3508 @REQ(add_fd_completion)
3509 obj_handle_t handle; /* async' object
*/
3510 apc_param_t cvalue
; /* completion value
*/
3511 apc_param_t information
; /* IO_STATUS_BLOCK Information
*/
3512 unsigned int status
; /* completion status
*/
3513 int async
; /* completion is an async result
*/
3517 /* set fd completion information
*/
3518 @
REQ(set_fd_completion_mode
)
3519 obj_handle_t handle
; /* handle to a file or directory
*/
3520 unsigned int flags
; /* completion notification flags
*/
3524 /* set fd disposition information
*/
3525 @
REQ(set_fd_disp_info
)
3526 obj_handle_t handle
; /* handle to a file or directory
*/
3527 int unlink
; /* whether to unlink file on close
*/
3531 /* set fd name information
*/
3532 @
REQ(set_fd_name_info
)
3533 obj_handle_t handle
; /* handle to a file or directory
*/
3534 obj_handle_t rootdir
; /* root directory
*/
3535 data_size_t namelen
; /* length of NT name in bytes
*/
3536 int link
; /* link instead of renaming
*/
3537 int replace
; /* replace an existing file?
*/
3538 VARARG(name
,unicode_str
,namelen
); /* NT name
*/
3539 VARARG(filename
,string
); /* new file name
*/
3543 /* Retrieve layered info for a window
*/
3544 @
REQ(get_window_layered_info
)
3545 user_handle_t handle
; /* handle to the window
*/
3547 unsigned int color_key
; /* color key
*/
3548 unsigned int alpha
; /* alpha (0.
.255) */
3549 unsigned int flags
; /* LWA_
* flags
*/
3553 /* Set layered info for a window
*/
3554 @
REQ(set_window_layered_info
)
3555 user_handle_t handle
; /* handle to the window
*/
3556 unsigned int color_key
; /* color key
*/
3557 unsigned int alpha
; /* alpha (0.
.255) */
3558 unsigned int flags
; /* LWA_
* flags
*/
3562 /* Allocate an arbitrary user handle
*/
3563 @
REQ(alloc_user_handle
)
3565 user_handle_t handle
; /* allocated handle
*/
3569 /* Free an arbitrary user handle
*/
3570 @
REQ(free_user_handle
)
3571 user_handle_t handle
; /* handle to free
*/
3575 /* Set
/get the current cursor
*/
3577 unsigned int flags
; /* flags for fields to
set (see below
) */
3578 user_handle_t handle
; /* handle to the cursor
*/
3579 int show_count
; /* show count increment
/decrement
*/
3580 int x
; /* cursor position
*/
3582 rectangle_t clip
; /* cursor clip rectangle
*/
3583 unsigned int clip_msg
; /* message to post on cursor clip changes
*/
3585 user_handle_t prev_handle
; /* previous handle
*/
3586 int prev_count
; /* previous show count
*/
3587 int prev_x
; /* previous position
*/
3589 int new_x
; /* new position
*/
3591 rectangle_t new_clip
; /* new clip rectangle
*/
3592 unsigned int last_change
; /* time of last position change
*/
3594 #define SET_CURSOR_HANDLE
0x01
3595 #define SET_CURSOR_COUNT
0x02
3596 #define SET_CURSOR_POS
0x04
3597 #define SET_CURSOR_CLIP
0x08
3598 #define SET_CURSOR_NOCLIP
0x10
3600 /* Get the history of the
64 last cursor positions
*/
3601 @
REQ(get_cursor_history
)
3603 VARARG(history
,cursor_positions
);
3607 /* Batch read rawinput message data
*/
3608 @
REQ(get_rawinput_buffer
)
3609 data_size_t rawinput_size
; /* size of RAWINPUT structure
*/
3610 data_size_t buffer_size
; /* size of output buffer
*/
3612 data_size_t next_size
; /* minimum size to get next message data
*/
3617 /* Modify the list of registered rawinput devices
*/
3618 @
REQ(update_rawinput_devices
)
3619 VARARG(devices
,rawinput_devices
);
3622 /* Retrieve the list of registered rawinput devices
*/
3623 @
REQ(get_rawinput_devices
)
3625 unsigned int device_count
;
3626 VARARG(devices
,rawinput_devices
);
3629 /* Create a new job object
*/
3631 unsigned int access
; /* wanted access rights
*/
3632 VARARG(objattr
,object_attributes
); /* object attributes
*/
3634 obj_handle_t handle
; /* handle to the job
*/
3638 /* Open a job object
*/
3640 unsigned int access
; /* wanted access rights
*/
3641 unsigned int attributes
; /* object attributes
*/
3642 obj_handle_t rootdir
; /* root directory
*/
3643 VARARG(name
,unicode_str
); /* object name
*/
3645 obj_handle_t handle
; /* handle to the job
*/
3649 /* Assign a job object to a process
*/
3651 obj_handle_t job
; /* handle to the job
*/
3652 obj_handle_t process
; /* handle to the process
*/
3656 /* Check if a process is associated with a job
*/
3657 @
REQ(process_in_job
)
3658 obj_handle_t job
; /* handle to the job
*/
3659 obj_handle_t process
; /* handle to the process
*/
3663 /* Set limit flags on a job
*/
3664 @
REQ(set_job_limits
)
3665 obj_handle_t handle
; /* handle to the job
*/
3666 unsigned int limit_flags
; /* new limit flags
*/
3670 /* Set new completion port for a job
*/
3671 @
REQ(set_job_completion_port
)
3672 obj_handle_t job
; /* handle to the job
*/
3673 obj_handle_t port
; /* handle to the completion port
*/
3674 client_ptr_t key
; /* key to send with completion messages
*/
3678 /* Retrieve information about a job
*/
3680 obj_handle_t handle
; /* handle to the job
*/
3682 int total_processes
; /* total count of processes
*/
3683 int active_processes
; /* count of running processes
*/
3687 /* Terminate all processes associated with the job
*/
3689 obj_handle_t handle
; /* handle to the job
*/
3690 int status
; /* process exit code
*/
3694 /* Suspend a process
*/
3695 @
REQ(suspend_process
)
3696 obj_handle_t handle
; /* process handle
*/
3700 /* Resume a process
*/
3701 @
REQ(resume_process
)
3702 obj_handle_t handle
; /* process handle
*/