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_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 sp
, lr
, pc
, cpsr
; } arm_regs
;
146 struct
{ unsigned __int64 sp
, pc
, pstate
; } arm64_regs
;
147 } ctl
; /* selected by SERVER_CTX_CONTROL
*/
150 struct
{ unsigned int eax
, ebx
, ecx
, edx
, esi
, edi
; } i386_regs
;
151 struct
{ unsigned __int64 rax
,rbx
, rcx
, rdx
, rsi
, rdi
,
152 r8
, r9
, r10
, r11
, r12
, r13
, r14
, r15
; } x86_64_regs
;
153 struct
{ unsigned int r
[13]; } arm_regs
;
154 struct
{ unsigned __int64 x
[31]; } arm64_regs
;
155 } integer
; /* selected by SERVER_CTX_INTEGER
*/
158 struct
{ unsigned int ds
, es
, fs
, gs
; } i386_regs
;
159 struct
{ unsigned int ds
, es
, fs
, gs
; } x86_64_regs
;
160 } seg
; /* selected by SERVER_CTX_SEGMENTS
*/
163 struct
{ unsigned int ctrl
, status
, tag
, err_off
, err_sel
, data_off
, data_sel
, cr0npx
;
164 unsigned char regs
[80]; } i386_regs
;
165 struct
{ struct
{ unsigned __int64 low
, high
; } fpregs
[32]; } x86_64_regs
;
166 struct
{ unsigned __int64 d
[32]; unsigned int fpscr
; } arm_regs
;
167 struct
{ struct
{ unsigned __int64 low
, high
; } q
[32]; unsigned int fpcr
, fpsr
; } arm64_regs
;
168 } fp
; /* selected by SERVER_CTX_FLOATING_POINT
*/
171 struct
{ unsigned int dr0
, dr1
, dr2
, dr3
, dr6
, dr7
; } i386_regs
;
172 struct
{ unsigned __int64 dr0
, dr1
, dr2
, dr3
, dr6
, dr7
; } x86_64_regs
;
173 struct
{ unsigned int bvr
[8], bcr
[8], wvr
[1], wcr
[1]; } arm_regs
;
174 struct
{ unsigned __int64 bvr
[8], wvr
[2]; unsigned int bcr
[8], wcr
[2]; } arm64_regs
;
175 } debug
; /* selected by SERVER_CTX_DEBUG_REGISTERS
*/
178 unsigned char i386_regs
[512];
179 } ext
; /* selected by SERVER_CTX_EXTENDED_REGISTERS
*/
182 struct
{ struct
{ unsigned __int64 low
, high
; } ymm_high
[16]; } ymm_high_regs
;
183 } ymm
; /* selected by SERVER_CTX_YMM_REGISTERS
*/
186 #define SERVER_CTX_CONTROL
0x01
187 #define SERVER_CTX_INTEGER
0x02
188 #define SERVER_CTX_SEGMENTS
0x04
189 #define SERVER_CTX_FLOATING_POINT
0x08
190 #define SERVER_CTX_DEBUG_REGISTERS
0x10
191 #define SERVER_CTX_EXTENDED_REGISTERS
0x20
192 #define SERVER_CTX_YMM_REGISTERS
0x40
194 /* structure used in sending an fd from client to server
*/
197 thread_id_t tid
; /* thread id
*/
198 int fd
; /* file descriptor on client
-side
*/
201 /* structure sent by the server on the wait fifo
*/
204 client_ptr_t cookie
; /* magic cookie that was passed in select_request
*/
205 int signaled
; /* wait result
*/
209 /* NT
-style timeout
, in
100ns units
, negative means relative timeout
*/
210 typedef __int64 timeout_t
;
211 #define
TIMEOUT_INFINITE (((timeout_t
)0x7fffffff) << 32 |
0xffffffff)
213 /* absolute timeout
, negative means that monotonic clock is used
*/
214 typedef __int64 abstime_t
;
216 /* structure for process startup info
*/
219 unsigned int debug_flags
;
220 unsigned int console_flags
;
221 obj_handle_t console
;
223 obj_handle_t hstdout
;
224 obj_handle_t hstderr
;
231 unsigned int attribute
;
234 data_size_t curdir_len
;
235 data_size_t dllpath_len
;
236 data_size_t imagepath_len
;
237 data_size_t cmdline_len
;
238 data_size_t title_len
;
239 data_size_t desktop_len
;
240 data_size_t shellinfo_len
;
241 data_size_t runtime_len
;
242 /* VARARG(curdir
,unicode_str
,curdir_len
); */
243 /* VARARG(dllpath
,unicode_str
,dllpath_len
); */
244 /* VARARG(imagepath
,unicode_str
,imagepath_len
); */
245 /* VARARG(cmdline
,unicode_str
,cmdline_len
); */
246 /* VARARG(title
,unicode_str
,title_len
); */
247 /* VARARG(desktop
,unicode_str
,desktop_len
); */
248 /* VARARG(shellinfo
,unicode_str
,shellinfo_len
); */
249 /* VARARG(runtime
,unicode_str
,runtime_len
); */
252 /* structure returned in the list of window properties
*/
255 atom_t atom
; /* property atom
*/
256 int string
; /* was atom a string originally?
*/
257 lparam_t data
; /* data stored in property
*/
260 /* structure to specify window rectangles
*/
269 /* structure for parameters of async I
/O calls
*/
272 obj_handle_t handle
; /* object to perform I
/O on
*/
273 obj_handle_t event
; /* event to signal when done
*/
274 client_ptr_t iosb
; /* I
/O status block in client addr space
*/
275 client_ptr_t user
; /* opaque user data containing callback pointer and async
-specific data
*/
276 client_ptr_t apc
; /* user APC to call
*/
277 apc_param_t apc_context
; /* user APC context or completion value
*/
280 /* structures for extra message data
*/
284 unsigned int device
; /* source
device (IMDT_
* values
) */
285 unsigned int origin
; /* source
origin (IMO_
* values
) */
288 struct hardware_msg_data
290 lparam_t info
; /* extra info
*/
291 unsigned int hw_id
; /* unique id
*/
292 unsigned int flags
; /* hook flags
*/
293 struct hw_msg_source source
; /* message source
*/
299 int type
; /* RIM_TYPEKEYBOARD
*/
300 unsigned int message
; /* message generated by this rawinput event
*/
301 unsigned short vkey
; /* virtual key code
*/
302 unsigned short scan
; /* scan code
*/
306 int type
; /* RIM_TYPEMOUSE
*/
307 int x
; /* x coordinate
*/
308 int y
; /* y coordinate
*/
309 unsigned int data
; /* mouse data
*/
314 struct callback_msg_data
316 client_ptr_t callback
; /* callback function
*/
317 lparam_t data
; /* user data for callback
*/
318 lparam_t result
; /* message result
*/
321 struct winevent_msg_data
323 user_handle_t hook
; /* hook handle
*/
324 thread_id_t tid
; /* thread id
*/
325 client_ptr_t hook_proc
; /* hook proc address
*/
326 /* followed by module name if any
*/
334 int type
; /* INPUT_KEYBOARD
*/
335 unsigned short vkey
; /* virtual key code
*/
336 unsigned short scan
; /* scan code
*/
337 unsigned int flags
; /* event flags
*/
338 unsigned int time
; /* event time
*/
339 lparam_t info
; /* extra info
*/
343 int type
; /* INPUT_MOUSE
*/
344 int x
; /* coordinates
*/
346 unsigned int data
; /* mouse data
*/
347 unsigned int flags
; /* event flags
*/
348 unsigned int time
; /* event time
*/
349 lparam_t info
; /* extra info
*/
353 int type
; /* INPUT_HARDWARE
*/
354 unsigned int msg
; /* message code
*/
355 lparam_t lparam
; /* message param
*/
361 unsigned char bytes
[1]; /* raw data for sent messages
*/
362 struct hardware_msg_data hardware
;
363 struct callback_msg_data callback
;
364 struct winevent_msg_data winevent
;
367 /* structure returned in filesystem events
*/
368 struct filesystem_event
377 unsigned int low_part
;
389 #define MAX_ACL_LEN
65535
391 struct security_descriptor
393 unsigned int control
; /* SE_ flags
*/
394 data_size_t owner_len
;
395 data_size_t group_len
;
396 data_size_t sacl_len
;
397 data_size_t dacl_len
;
398 /* VARARG(owner
,SID
); */
399 /* VARARG(group
,SID
); */
400 /* VARARG(sacl
,ACL
); */
401 /* VARARG(dacl
,ACL
); */
404 struct object_attributes
406 obj_handle_t rootdir
; /* root directory
*/
407 unsigned int attributes
; /* object attributes
*/
408 data_size_t sd_len
; /* length of security_descriptor data. may be
0 */
409 data_size_t name_len
; /* length of the name string. may be
0 */
410 /* VARARG(sd
,security_descriptor
); */
411 /* VARARG(name
,unicode_str
); */
414 struct object_type_info
416 data_size_t name_len
; /* length of the name string
*/
417 unsigned int index
; /* type index in global table
*/
418 unsigned int obj_count
; /* count of objects of this type
*/
419 unsigned int handle_count
; /* count of handles of this type
*/
420 unsigned int obj_max
; /* max count of objects of this type
*/
421 unsigned int handle_max
; /* max count of handles of this type
*/
422 unsigned int valid_access
; /* mask for valid access bits
*/
423 generic_map_t mapping
; /* generic access mappings
*/
424 /* VARARG(name
,unicode_str
); */
430 /* unsigned int attributes
[count
]; */
431 /* VARARG(sids
,SID
); */
439 SELECT_SIGNAL_AND_WAIT
,
440 SELECT_KEYED_EVENT_WAIT
,
441 SELECT_KEYED_EVENT_RELEASE
449 enum select_op op
; /* SELECT_WAIT or SELECT_WAIT_ALL
*/
450 obj_handle_t handles
[MAXIMUM_WAIT_OBJECTS
];
454 enum select_op op
; /* SELECT_SIGNAL_AND_WAIT
*/
456 obj_handle_t signal
; /* must be last in the structure so we can remove it on retries
*/
460 enum select_op op
; /* SELECT_KEYED_EVENT_WAIT or SELECT_KEYED_EVENT_RELEASE
*/
491 enum apc_type type
; /* APC_USER
*/
493 client_ptr_t func
; /* void (__stdcall
*func
)(ULONG_PTR
,ULONG_PTR
,ULONG_PTR
); */
494 apc_param_t args
[3]; /* arguments for user function
*/
498 enum apc_type type
; /* APC_TIMER
*/
500 client_ptr_t func
; /* void (__stdcall
*func
)(void
*, unsigned int
, unsigned int
); */
501 abstime_t time
; /* time of expiration
*/
502 client_ptr_t arg
; /* user argument
*/
512 enum apc_type type
; /* APC_ASYNC_IO
*/
513 unsigned int status
; /* I
/O status
*/
514 client_ptr_t user
; /* user pointer
*/
515 client_ptr_t sb
; /* status block
*/
519 enum apc_type type
; /* APC_VIRTUAL_ALLOC
*/
520 unsigned int op_type
; /* type of operation
*/
521 client_ptr_t addr
; /* requested address
*/
522 mem_size_t size
; /* allocation size
*/
523 mem_size_t zero_bits
; /* number of zero high bits
*/
524 unsigned int prot
; /* memory protection flags
*/
528 enum apc_type type
; /* APC_VIRTUAL_FREE
*/
529 unsigned int op_type
; /* type of operation
*/
530 client_ptr_t addr
; /* requested address
*/
531 mem_size_t size
; /* allocation size
*/
535 enum apc_type type
; /* APC_VIRTUAL_QUERY
*/
537 client_ptr_t addr
; /* requested address
*/
541 enum apc_type type
; /* APC_VIRTUAL_PROTECT
*/
542 unsigned int prot
; /* new protection flags
*/
543 client_ptr_t addr
; /* requested address
*/
544 mem_size_t size
; /* requested size
*/
548 enum apc_type type
; /* APC_VIRTUAL_FLUSH
*/
550 client_ptr_t addr
; /* requested address
*/
551 mem_size_t size
; /* requested size
*/
555 enum apc_type type
; /* APC_VIRTUAL_LOCK
*/
557 client_ptr_t addr
; /* requested address
*/
558 mem_size_t size
; /* requested size
*/
562 enum apc_type type
; /* APC_VIRTUAL_UNLOCK
*/
564 client_ptr_t addr
; /* requested address
*/
565 mem_size_t size
; /* requested size
*/
569 enum apc_type type
; /* APC_MAP_VIEW
*/
570 obj_handle_t handle
; /* mapping handle
*/
571 client_ptr_t addr
; /* requested address
*/
572 mem_size_t size
; /* allocation size
*/
573 file_pos_t offset
; /* file offset
*/
574 mem_size_t zero_bits
; /* number of zero high bits
*/
575 unsigned int alloc_type
; /* allocation type
*/
576 unsigned int prot
; /* memory protection flags
*/
580 enum apc_type type
; /* APC_UNMAP_VIEW
*/
582 client_ptr_t addr
; /* view address
*/
586 enum apc_type type
; /* APC_CREATE_THREAD
*/
587 unsigned int flags
; /* creation flags
*/
588 client_ptr_t func
; /* void (__stdcall
*func
)(void*)
; start function
*/
589 client_ptr_t arg
; /* argument for start function
*/
590 mem_size_t reserve
; /* reserve size for thread stack
*/
591 mem_size_t commit
; /* commit size for thread stack
*/
595 enum apc_type type
; /* APC_DUP_HANDLE
*/
596 obj_handle_t src_handle
; /* src handle to duplicate
*/
597 obj_handle_t dst_process
; /* dst process handle
*/
598 unsigned int access
; /* wanted access rights
*/
599 unsigned int attributes
; /* object attributes
*/
600 unsigned int options
; /* duplicate options
*/
609 enum apc_type type
; /* APC_ASYNC_IO
*/
610 unsigned int status
; /* new status of async operation
*/
611 unsigned int total
; /* bytes transferred
*/
615 enum apc_type type
; /* APC_VIRTUAL_ALLOC
*/
616 unsigned int status
; /* status returned by call
*/
617 client_ptr_t addr
; /* resulting address
*/
618 mem_size_t size
; /* resulting size
*/
622 enum apc_type type
; /* APC_VIRTUAL_FREE
*/
623 unsigned int status
; /* status returned by call
*/
624 client_ptr_t addr
; /* resulting address
*/
625 mem_size_t size
; /* resulting size
*/
629 enum apc_type type
; /* APC_VIRTUAL_QUERY
*/
630 unsigned int status
; /* status returned by call
*/
631 client_ptr_t base
; /* resulting base address
*/
632 client_ptr_t alloc_base
;/* resulting allocation base
*/
633 mem_size_t size
; /* resulting region size
*/
634 unsigned short state
; /* resulting region state
*/
635 unsigned short prot
; /* resulting region protection
*/
636 unsigned short alloc_prot
;/* resulting allocation protection
*/
637 unsigned short alloc_type
;/* resulting region allocation type
*/
641 enum apc_type type
; /* APC_VIRTUAL_PROTECT
*/
642 unsigned int status
; /* status returned by call
*/
643 client_ptr_t addr
; /* resulting address
*/
644 mem_size_t size
; /* resulting size
*/
645 unsigned int prot
; /* old protection flags
*/
649 enum apc_type type
; /* APC_VIRTUAL_FLUSH
*/
650 unsigned int status
; /* status returned by call
*/
651 client_ptr_t addr
; /* resulting address
*/
652 mem_size_t size
; /* resulting size
*/
656 enum apc_type type
; /* APC_VIRTUAL_LOCK
*/
657 unsigned int status
; /* status returned by call
*/
658 client_ptr_t addr
; /* resulting address
*/
659 mem_size_t size
; /* resulting size
*/
663 enum apc_type type
; /* APC_VIRTUAL_UNLOCK
*/
664 unsigned int status
; /* status returned by call
*/
665 client_ptr_t addr
; /* resulting address
*/
666 mem_size_t size
; /* resulting size
*/
670 enum apc_type type
; /* APC_MAP_VIEW
*/
671 unsigned int status
; /* status returned by call
*/
672 client_ptr_t addr
; /* resulting address
*/
673 mem_size_t size
; /* resulting size
*/
677 enum apc_type type
; /* APC_UNMAP_VIEW
*/
678 unsigned int status
; /* status returned by call
*/
682 enum apc_type type
; /* APC_CREATE_THREAD
*/
683 unsigned int status
; /* status returned by call
*/
684 process_id_t pid
; /* process id
*/
685 thread_id_t tid
; /* thread id
*/
686 client_ptr_t teb
; /* thread
teb (in process address space
) */
687 obj_handle_t handle
; /* handle to new thread
*/
691 enum apc_type type
; /* APC_DUP_HANDLE
*/
692 unsigned int status
; /* status returned by call
*/
693 obj_handle_t handle
; /* duplicated handle in dst process
*/
697 enum apc_type type
; /* APC_BREAK_PROCESS
*/
698 unsigned int status
; /* status returned by call
*/
718 enum irp_type type
; /* irp call type
*/
721 enum irp_type type
; /* IRP_CALL_CREATE
*/
722 unsigned int access
; /* access rights
*/
723 unsigned int sharing
; /* sharing flags
*/
724 unsigned int options
; /* file options
*/
725 client_ptr_t device
; /* opaque ptr for the device
*/
726 obj_handle_t file
; /* file handle
*/
730 enum irp_type type
; /* IRP_CALL_CLOSE
*/
732 client_ptr_t file
; /* opaque ptr for the file object
*/
736 enum irp_type type
; /* IRP_CALL_READ
*/
737 unsigned int key
; /* driver key
*/
738 data_size_t out_size
; /* needed output size
*/
740 client_ptr_t file
; /* opaque ptr for the file object
*/
741 file_pos_t pos
; /* file position
*/
745 enum irp_type type
; /* IRP_CALL_WRITE
*/
746 unsigned int key
; /* driver key
*/
747 client_ptr_t file
; /* opaque ptr for the file object
*/
748 file_pos_t pos
; /* file position
*/
752 enum irp_type type
; /* IRP_CALL_FLUSH
*/
754 client_ptr_t file
; /* opaque ptr for the file object
*/
758 enum irp_type type
; /* IRP_CALL_IOCTL
*/
759 ioctl_code_t code
; /* ioctl code
*/
760 data_size_t out_size
; /* needed output size
*/
762 client_ptr_t file
; /* opaque ptr for the file object
*/
766 enum irp_type type
; /* IRP_CALL_VOLUME
*/
767 unsigned int info_class
;/* information class
*/
768 data_size_t out_size
; /* needed output size
*/
770 client_ptr_t file
; /* opaque ptr for the file object
*/
774 enum irp_type type
; /* IRP_CALL_FREE
*/
776 client_ptr_t obj
; /* opaque ptr for the freed object
*/
780 enum irp_type type
; /* IRP_CALL_CANCEL
*/
782 client_ptr_t irp
; /* opaque ptr for canceled irp
*/
786 /* information about a PE image mapping
, roughly equivalent to SECTION_IMAGE_INFORMATION
*/
790 client_ptr_t entry_point
;
792 mem_size_t stack_size
;
793 mem_size_t stack_commit
;
794 unsigned int zerobits
;
795 unsigned int subsystem
;
796 unsigned short subsystem_minor
;
797 unsigned short subsystem_major
;
798 unsigned short osversion_major
;
799 unsigned short osversion_minor
;
800 unsigned short image_charact
;
801 unsigned short dll_charact
;
802 unsigned short machine
;
803 unsigned char contains_code
;
804 unsigned char image_flags
;
805 unsigned int loader_flags
;
806 unsigned int header_size
;
807 unsigned int file_size
;
808 unsigned int checksum
;
809 unsigned int dbg_offset
;
810 unsigned int dbg_size
;
812 #define IMAGE_FLAGS_ComPlusNativeReady
0x01
813 #define IMAGE_FLAGS_ComPlusILOnly
0x02
814 #define IMAGE_FLAGS_ImageDynamicallyRelocated
0x04
815 #define IMAGE_FLAGS_ImageMappedFlat
0x08
816 #define IMAGE_FLAGS_BaseBelow4gb
0x10
817 #define IMAGE_FLAGS_ComPlusPrefer32bit
0x20
818 #define IMAGE_FLAGS_WineBuiltin
0x40
819 #define IMAGE_FLAGS_WineFakeDll
0x80
821 struct rawinput_device
823 unsigned short usage_page
;
824 unsigned short usage
;
826 user_handle_t target
;
838 /****************************************************************/
839 /* Request declarations
*/
841 /* Create a new process from the context of the parent
*/
843 obj_handle_t token
; /* process token
*/
844 obj_handle_t debug
; /* process debug object
*/
845 obj_handle_t parent_process
; /* parent process
*/
846 unsigned int flags
; /* process creation flags
*/
847 int socket_fd
; /* file descriptor for process socket
*/
848 unsigned int access
; /* access rights for process object
*/
849 client_cpu_t cpu
; /* CPU that the new process will use
*/
850 data_size_t info_size
; /* size of startup info
*/
851 data_size_t handles_size
; /* length of explicit handles list
*/
852 VARARG(objattr
,object_attributes
); /* object attributes
*/
853 VARARG(handles
,uints
,handles_size
); /* handles list
*/
854 VARARG(info
,startup_info
,info_size
); /* startup information
*/
855 VARARG(env
,unicode_str
); /* environment for new process
*/
857 obj_handle_t info
; /* new process info handle
*/
858 process_id_t pid
; /* process id
*/
859 obj_handle_t handle
; /* process
handle (in the current process
) */
863 /* Retrieve information about a newly started process
*/
864 @
REQ(get_new_process_info
)
865 obj_handle_t info
; /* info handle returned from new_process_request
*/
867 int success
; /* did the process start successfully?
*/
868 int exit_code
; /* process exit code if failed
*/
872 /* Create a new thread
*/
874 obj_handle_t process
; /* process in which to create thread
*/
875 unsigned int access
; /* wanted access rights
*/
876 int suspend
; /* new thread should be suspended on creation
*/
877 int request_fd
; /* fd for request pipe
*/
878 VARARG(objattr
,object_attributes
); /* object attributes
*/
880 thread_id_t tid
; /* thread id
*/
881 obj_handle_t handle
; /* thread
handle (in the current process
) */
885 /* Retrieve the new process startup info
*/
886 @
REQ(get_startup_info
)
888 data_size_t info_size
; /* size of startup info
*/
889 VARARG(info
,startup_info
,info_size
); /* startup information
*/
890 VARARG(env
,unicode_str
); /* environment
*/
894 /* Signal the end of the process initialization
*/
895 @
REQ(init_process_done
)
897 client_ptr_t entry
; /* process entry point
*/
898 int suspend
; /* is process suspended?
*/
902 /* Initialize the first thread of a new process
*/
903 @
REQ(init_first_thread
)
904 int unix_pid
; /* Unix pid of new process
*/
905 int unix_tid
; /* Unix tid of new thread
*/
906 int debug_level
; /* new debug level
*/
907 client_ptr_t teb
; /* TEB of new
thread (in process address space
) */
908 client_ptr_t peb
; /* PEB of new
process (in process address space
) */
909 client_ptr_t ldt_copy
; /* address of LDT
copy (in process address space
) */
910 int reply_fd
; /* fd for reply pipe
*/
911 int wait_fd
; /* fd for blocking calls pipe
*/
912 client_cpu_t cpu
; /* CPU that this thread is running on
*/
914 process_id_t pid
; /* process id of the new thread
's process */
915 thread_id_t tid; /* thread id of the new thread */
916 timeout_t server_start; /* server start time */
917 data_size_t info_size; /* total size of startup info */
918 VARARG(machines,ushorts); /* array of supported machines */
922 /* Initialize a new thread; called from the child after pthread_create() */
924 int unix_tid; /* Unix tid of new thread */
925 int reply_fd; /* fd for reply pipe */
926 int wait_fd; /* fd for blocking calls pipe */
927 client_ptr_t teb; /* TEB of new thread (in thread address space) */
928 client_ptr_t entry; /* entry point (in thread address space) */
930 process_id_t pid; /* process id of the new thread's process
*/
931 thread_id_t tid
; /* thread id of the new thread
*/
932 int suspend
; /* is thread suspended?
*/
936 /* Terminate a process
*/
937 @
REQ(terminate_process
)
938 obj_handle_t handle
; /* process handle to terminate
*/
939 int exit_code
; /* process exit code
*/
941 int self
; /* suicide?
*/
945 /* Terminate a thread
*/
946 @
REQ(terminate_thread
)
947 obj_handle_t handle
; /* thread handle to terminate
*/
948 int exit_code
; /* thread exit code
*/
950 int self
; /* suicide?
*/
954 /* Retrieve information about a process
*/
955 @
REQ(get_process_info
)
956 obj_handle_t handle
; /* process handle
*/
958 process_id_t pid
; /* server process id
*/
959 process_id_t ppid
; /* server process id of parent
*/
960 affinity_t affinity
; /* process affinity mask
*/
961 client_ptr_t peb
; /* PEB address in process address space
*/
962 timeout_t start_time
; /* process start time
*/
963 timeout_t end_time
; /* process end time
*/
964 int exit_code
; /* process exit code
*/
965 int priority
; /* priority class
*/
966 unsigned short machine
; /* process architecture
*/
967 VARARG(image
,pe_image_info
); /* image info for main exe
*/
971 /* Retrieve debug information about a process
*/
972 @
REQ(get_process_debug_info
)
973 obj_handle_t handle
; /* process handle
*/
975 obj_handle_t debug
; /* handle to debug port
*/
976 int debug_children
; /* inherit debugger to child processes
*/
977 VARARG(image
,pe_image_info
); /* image info for main exe
*/
981 /* Fetch the name of the process image
*/
982 @
REQ(get_process_image_name
)
983 obj_handle_t handle
; /* process handle
*/
984 int win32
; /* return a win32 filename?
*/
986 data_size_t len
; /* len in bytes required to store filename
*/
987 VARARG(name
,unicode_str
); /* image name for main exe
*/
991 /* Retrieve information about a process memory usage
*/
992 @
REQ(get_process_vm_counters
)
993 obj_handle_t handle
; /* process handle
*/
995 mem_size_t peak_virtual_size
; /* peak virtual memory in bytes
*/
996 mem_size_t virtual_size
; /* virtual memory in bytes
*/
997 mem_size_t peak_working_set_size
; /* peak real memory in bytes
*/
998 mem_size_t working_set_size
; /* real memory in bytes
*/
999 mem_size_t pagefile_usage
; /* commit charge in bytes
*/
1000 mem_size_t peak_pagefile_usage
; /* peak commit charge in bytes
*/
1004 /* Set a process information
*/
1005 @
REQ(set_process_info
)
1006 obj_handle_t handle
; /* process handle
*/
1007 int mask
; /* setting
mask (see below
) */
1008 int priority
; /* priority class
*/
1009 affinity_t affinity
; /* affinity mask
*/
1011 #define SET_PROCESS_INFO_PRIORITY
0x01
1012 #define SET_PROCESS_INFO_AFFINITY
0x02
1015 /* Retrieve information about a thread
*/
1016 @
REQ(get_thread_info
)
1017 obj_handle_t handle
; /* thread handle
*/
1018 unsigned int access
; /* required access rights
*/
1020 process_id_t pid
; /* server process id
*/
1021 thread_id_t tid
; /* server thread id
*/
1022 client_ptr_t teb
; /* thread teb pointer
*/
1023 client_ptr_t entry_point
; /* thread entry point
*/
1024 affinity_t affinity
; /* thread affinity mask
*/
1025 int exit_code
; /* thread exit code
*/
1026 int priority
; /* thread priority level
*/
1027 int last
; /* last thread in process
*/
1028 int suspend_count
; /* thread suspend count
*/
1029 int dbg_hidden
; /* thread hidden from debugger
*/
1030 data_size_t desc_len
; /* description length in bytes
*/
1031 VARARG(desc
,unicode_str
); /* description string
*/
1035 /* Retrieve information about thread times
*/
1036 @
REQ(get_thread_times
)
1037 obj_handle_t handle
; /* thread handle
*/
1039 timeout_t creation_time
; /* thread creation time
*/
1040 timeout_t exit_time
; /* thread exit time
*/
1041 int unix_pid
; /* thread native pid
*/
1042 int unix_tid
; /* thread native pid
*/
1046 /* Set a thread information
*/
1047 @
REQ(set_thread_info
)
1048 obj_handle_t handle
; /* thread handle
*/
1049 int mask
; /* setting
mask (see below
) */
1050 int priority
; /* priority class
*/
1051 affinity_t affinity
; /* affinity mask
*/
1052 client_ptr_t entry_point
; /* thread entry point
*/
1053 obj_handle_t token
; /* impersonation token
*/
1054 VARARG(desc
,unicode_str
); /* description string
*/
1056 #define SET_THREAD_INFO_PRIORITY
0x01
1057 #define SET_THREAD_INFO_AFFINITY
0x02
1058 #define SET_THREAD_INFO_TOKEN
0x04
1059 #define SET_THREAD_INFO_ENTRYPOINT
0x08
1060 #define SET_THREAD_INFO_DESCRIPTION
0x10
1061 #define SET_THREAD_INFO_DBG_HIDDEN
0x20
1064 /* Suspend a thread
*/
1065 @
REQ(suspend_thread
)
1066 obj_handle_t handle
; /* thread handle
*/
1068 int count
; /* new suspend count
*/
1072 /* Resume a thread
*/
1074 obj_handle_t handle
; /* thread handle
*/
1076 int count
; /* new suspend count
*/
1080 /* Queue an APC for a thread or process
*/
1082 obj_handle_t handle
; /* thread or process handle
*/
1083 apc_call_t call
; /* call arguments
*/
1085 obj_handle_t handle
; /* APC handle
*/
1086 int self
; /* run APC in caller itself?
*/
1090 /* Get the result of an APC call
*/
1091 @
REQ(get_apc_result
)
1092 obj_handle_t handle
; /* handle to the APC
*/
1094 apc_result_t result
; /* result of the APC
*/
1098 /* Close a handle for the current process
*/
1100 obj_handle_t handle
; /* handle to close
*/
1104 /* Set a handle information
*/
1105 @
REQ(set_handle_info
)
1106 obj_handle_t handle
; /* handle we are interested in
*/
1107 int flags
; /* new handle flags
*/
1108 int mask
; /* mask for flags to set
*/
1110 int old_flags
; /* old flag value
*/
1114 /* Duplicate a handle
*/
1116 obj_handle_t src_process
; /* src process handle
*/
1117 obj_handle_t src_handle
; /* src handle to duplicate
*/
1118 obj_handle_t dst_process
; /* dst process handle
*/
1119 unsigned int access
; /* wanted access rights
*/
1120 unsigned int attributes
; /* object attributes
*/
1121 unsigned int options
; /* duplicate options
*/
1123 obj_handle_t handle
; /* duplicated handle in dst process
*/
1127 /* Make an object temporary
*/
1128 @
REQ(make_temporary
)
1129 obj_handle_t handle
; /* handle to the object
*/
1133 /* Open a handle to a process
*/
1135 process_id_t pid
; /* process id to open
*/
1136 unsigned int access
; /* wanted access rights
*/
1137 unsigned int attributes
; /* object attributes
*/
1139 obj_handle_t handle
; /* handle to the process
*/
1143 /* Open a handle to a thread
*/
1145 thread_id_t tid
; /* thread id to open
*/
1146 unsigned int access
; /* wanted access rights
*/
1147 unsigned int attributes
; /* object attributes
*/
1149 obj_handle_t handle
; /* handle to the thread
*/
1153 /* Wait for handles
*/
1155 int flags
; /* wait
flags (see below
) */
1156 client_ptr_t cookie
; /* magic cookie to return to client
*/
1157 abstime_t timeout
; /* timeout
*/
1158 data_size_t size
; /* size of select_op
*/
1159 obj_handle_t prev_apc
; /* handle to previous APC
*/
1160 VARARG(result
,apc_result
); /* result of previous APC
*/
1161 VARARG(data
,select_op
,size
); /* operation
-specific data
*/
1162 VARARG(context
,context
); /* suspend context
*/
1164 apc_call_t call
; /* APC call arguments
*/
1165 obj_handle_t apc_handle
; /* handle to next APC
*/
1166 VARARG(context
,context
); /* suspend context
*/
1168 #define SELECT_ALERTABLE
1
1169 #define SELECT_INTERRUPTIBLE
2
1172 /* Create an event
*/
1174 unsigned int access
; /* wanted access rights
*/
1175 int manual_reset
; /* manual reset event
*/
1176 int initial_state
; /* initial state of the event
*/
1177 VARARG(objattr
,object_attributes
); /* object attributes
*/
1179 obj_handle_t handle
; /* handle to the event
*/
1182 /* Event operation
*/
1184 obj_handle_t handle
; /* handle to event
*/
1185 int op
; /* event
operation (see below
) */
1187 int state
; /* previous state
*/
1189 enum event_op
{ PULSE_EVENT
, SET_EVENT
, RESET_EVENT
};
1192 obj_handle_t handle
; /* handle to event
*/
1194 int manual_reset
; /* manual reset event
*/
1195 int state
; /* current state of the event
*/
1200 unsigned int access
; /* wanted access rights
*/
1201 unsigned int attributes
; /* object attributes
*/
1202 obj_handle_t rootdir
; /* root directory
*/
1203 VARARG(name
,unicode_str
); /* object name
*/
1205 obj_handle_t handle
; /* handle to the event
*/
1209 /* Create a keyed event
*/
1210 @
REQ(create_keyed_event
)
1211 unsigned int access
; /* wanted access rights
*/
1212 VARARG(objattr
,object_attributes
); /* object attributes
*/
1214 obj_handle_t handle
; /* handle to the event
*/
1217 /* Open a keyed event
*/
1218 @
REQ(open_keyed_event
)
1219 unsigned int access
; /* wanted access rights
*/
1220 unsigned int attributes
; /* object attributes
*/
1221 obj_handle_t rootdir
; /* root directory
*/
1222 VARARG(name
,unicode_str
); /* object name
*/
1224 obj_handle_t handle
; /* handle to the event
*/
1228 /* Create a mutex
*/
1230 unsigned int access
; /* wanted access rights
*/
1231 int owned
; /* initially owned?
*/
1232 VARARG(objattr
,object_attributes
); /* object attributes
*/
1234 obj_handle_t handle
; /* handle to the mutex
*/
1238 /* Release a mutex
*/
1240 obj_handle_t handle
; /* handle to the mutex
*/
1242 unsigned int prev_count
; /* value of internal counter
, before release
*/
1248 unsigned int access
; /* wanted access rights
*/
1249 unsigned int attributes
; /* object attributes
*/
1250 obj_handle_t rootdir
; /* root directory
*/
1251 VARARG(name
,unicode_str
); /* object name
*/
1253 obj_handle_t handle
; /* handle to the mutex
*/
1259 obj_handle_t handle
; /* handle to mutex
*/
1261 unsigned int count
; /* current count of mutex
*/
1262 int owned
; /* true if owned by current thread
*/
1263 int abandoned
; /* true if abandoned
*/
1267 /* Create a semaphore
*/
1268 @
REQ(create_semaphore
)
1269 unsigned int access
; /* wanted access rights
*/
1270 unsigned int initial
; /* initial count
*/
1271 unsigned int max
; /* maximum count
*/
1272 VARARG(objattr
,object_attributes
); /* object attributes
*/
1274 obj_handle_t handle
; /* handle to the semaphore
*/
1278 /* Release a semaphore
*/
1279 @
REQ(release_semaphore
)
1280 obj_handle_t handle
; /* handle to the semaphore
*/
1281 unsigned int count
; /* count to add to semaphore
*/
1283 unsigned int prev_count
; /* previous semaphore count
*/
1286 @
REQ(query_semaphore
)
1287 obj_handle_t handle
; /* handle to the semaphore
*/
1289 unsigned int current
; /* current count
*/
1290 unsigned int max
; /* maximum count
*/
1293 /* Open a semaphore
*/
1294 @
REQ(open_semaphore
)
1295 unsigned int access
; /* wanted access rights
*/
1296 unsigned int attributes
; /* object attributes
*/
1297 obj_handle_t rootdir
; /* root directory
*/
1298 VARARG(name
,unicode_str
); /* object name
*/
1300 obj_handle_t handle
; /* handle to the semaphore
*/
1306 unsigned int access
; /* wanted access rights
*/
1307 unsigned int sharing
; /* sharing flags
*/
1308 int create
; /* file create action
*/
1309 unsigned int options
; /* file options
*/
1310 unsigned int attrs
; /* file attributes for creation
*/
1311 VARARG(objattr
,object_attributes
); /* object attributes
*/
1312 VARARG(filename
,string
); /* file name
*/
1314 obj_handle_t handle
; /* handle to the file
*/
1318 /* Open a file object
*/
1319 @
REQ(open_file_object
)
1320 unsigned int access
; /* wanted access rights
*/
1321 unsigned int attributes
; /* open attributes
*/
1322 obj_handle_t rootdir
; /* root directory
*/
1323 unsigned int sharing
; /* sharing flags
*/
1324 unsigned int options
; /* file options
*/
1325 VARARG(filename
,unicode_str
); /* file name
*/
1327 obj_handle_t handle
; /* handle to the file
*/
1331 /* Allocate a file handle for a Unix fd
*/
1332 @
REQ(alloc_file_handle
)
1333 unsigned int access
; /* wanted access rights
*/
1334 unsigned int attributes
; /* object attributes
*/
1335 int fd
; /* file descriptor on the client side
*/
1337 obj_handle_t handle
; /* handle to the file
*/
1341 /* Get the Unix name from a file handle
*/
1342 @
REQ(get_handle_unix_name
)
1343 obj_handle_t handle
; /* file handle
*/
1345 data_size_t name_len
; /* unix name length
*/
1346 VARARG(name
,string
); /* unix name
*/
1350 /* Get a Unix fd to access a file
*/
1352 obj_handle_t handle
; /* handle to the file
*/
1354 int type
; /* file
type (see below
) */
1355 int cacheable
; /* can fd be cached in the client?
*/
1356 unsigned int access
; /* file access rights
*/
1357 unsigned int options
; /* file open options
*/
1361 FD_TYPE_INVALID
, /* invalid
file (no associated fd
) */
1362 FD_TYPE_FILE
, /* regular file
*/
1363 FD_TYPE_DIR
, /* directory
*/
1364 FD_TYPE_SOCKET
, /* socket
*/
1365 FD_TYPE_SERIAL
, /* serial port
*/
1366 FD_TYPE_PIPE
, /* named pipe
*/
1367 FD_TYPE_MAILSLOT
, /* mailslot
*/
1368 FD_TYPE_CHAR
, /* unspecified char device
*/
1369 FD_TYPE_DEVICE
, /* Windows device file
*/
1374 /* Retrieve (or allocate
) the client
-side directory cache entry
*/
1375 @
REQ(get_directory_cache_entry
)
1376 obj_handle_t handle
; /* handle to the directory
*/
1378 int entry
; /* cache entry on the client side
*/
1379 VARARG(free
,ints
); /* entries that can be freed
*/
1383 /* Flush a file buffers
*/
1385 async_data_t async
; /* async I
/O parameters
*/
1387 obj_handle_t event
; /* event set when finished
*/
1390 /* Query file information
*/
1392 obj_handle_t handle
; /* handle to the file
*/
1393 unsigned int info_class
; /* queried information class
*/
1395 VARARG(data
,bytes
); /* file info data
*/
1398 /* Query volume information
*/
1399 @
REQ(get_volume_info
)
1400 obj_handle_t handle
; /* handle to the file
*/
1401 async_data_t async
; /* async I
/O parameters
*/
1402 unsigned int info_class
; /* queried information class
*/
1404 obj_handle_t wait
; /* handle to wait on for blocking read
*/
1405 VARARG(data
,bytes
); /* volume info data
*/
1408 /* Lock a region of a file
*/
1410 obj_handle_t handle
; /* handle to the file
*/
1411 file_pos_t offset
; /* offset of start of lock
*/
1412 file_pos_t count
; /* count of bytes to lock
*/
1413 int shared
; /* shared or exclusive lock?
*/
1414 int wait
; /* do we want to wait?
*/
1416 obj_handle_t handle
; /* handle to wait on
*/
1417 int overlapped
; /* is it an overlapped I
/O handle?
*/
1421 /* Unlock a region of a file
*/
1423 obj_handle_t handle
; /* handle to the file
*/
1424 file_pos_t offset
; /* offset of start of unlock
*/
1425 file_pos_t count
; /* count of bytes to unlock
*/
1429 /* Set socket event parameters
*/
1430 @
REQ(set_socket_event
)
1431 obj_handle_t handle
; /* handle to the socket
*/
1432 unsigned int mask
; /* event mask
*/
1433 obj_handle_t event
; /* event object
*/
1434 user_handle_t window
; /* window to send the message to
*/
1435 unsigned int msg
; /* message to send
*/
1439 /* Get socket event parameters
*/
1440 @
REQ(get_socket_event
)
1441 obj_handle_t handle
; /* handle to the socket
*/
1442 int service
; /* clear pending?
*/
1443 obj_handle_t c_event
; /* event to clear
*/
1445 unsigned int mask
; /* event mask
*/
1446 unsigned int pmask
; /* pending events
*/
1447 unsigned int state
; /* status bits
*/
1448 VARARG(errors
,ints
); /* event errors
*/
1452 /* Get socket info
*/
1453 @
REQ(get_socket_info
)
1454 obj_handle_t handle
; /* handle to the socket
*/
1456 int family
; /* family
, see socket manpage
*/
1457 int type
; /* type
, see socket manpage
*/
1458 int protocol
; /* protocol
, see socket manpage
*/
1462 /* Re
-enable pending socket events
*/
1463 @
REQ(enable_socket_event
)
1464 obj_handle_t handle
; /* handle to the socket
*/
1465 unsigned int mask
; /* events to re
-enable
*/
1466 unsigned int sstate
; /* status bits to set
*/
1467 unsigned int cstate
; /* status bits to clear
*/
1470 @
REQ(set_socket_deferred
)
1471 obj_handle_t handle
; /* handle to the socket
*/
1472 obj_handle_t deferred
; /* handle to the socket for which
accept() is deferred
*/
1476 /* Retrieve the next pending console ioctl request
*/
1477 @
REQ(get_next_console_request
)
1478 obj_handle_t handle
; /* console server handle
*/
1479 int signal
; /* server signal state
*/
1480 int read
; /* 1 if reporting result of blocked read ioctl
*/
1481 unsigned int status
; /* status of previous ioctl
*/
1482 VARARG(out_data
,bytes
); /* out_data of previous ioctl
*/
1484 unsigned int code
; /* ioctl code
*/
1485 unsigned int output
; /* output id or
0 for input
*/
1486 data_size_t out_size
; /* ioctl output size
*/
1487 VARARG(in_data
,bytes
); /* ioctl in_data
*/
1491 /* enable directory change notifications
*/
1492 @
REQ(read_directory_changes
)
1493 unsigned int filter
; /* notification filter
*/
1494 int subtree
; /* watch the subtree?
*/
1495 int want_data
; /* flag indicating whether change data should be collected
*/
1496 async_data_t async
; /* async I
/O parameters
*/
1501 obj_handle_t handle
;
1503 VARARG(events
,filesystem_event
); /* collected filesystem events
*/
1507 /* Create a file mapping
*/
1508 @
REQ(create_mapping
)
1509 unsigned int access
; /* wanted access rights
*/
1510 unsigned int flags
; /* SEC_
* flags
*/
1511 unsigned int file_access
; /* file access rights
*/
1512 mem_size_t size
; /* mapping size
*/
1513 obj_handle_t file_handle
; /* file handle
*/
1514 VARARG(objattr
,object_attributes
); /* object attributes
*/
1516 obj_handle_t handle
; /* handle to the mapping
*/
1520 /* Open a mapping
*/
1522 unsigned int access
; /* wanted access rights
*/
1523 unsigned int attributes
; /* object attributes
*/
1524 obj_handle_t rootdir
; /* root directory
*/
1525 VARARG(name
,unicode_str
); /* object name
*/
1527 obj_handle_t handle
; /* handle to the mapping
*/
1531 /* Get information about a file mapping
*/
1532 @
REQ(get_mapping_info
)
1533 obj_handle_t handle
; /* handle to the mapping
*/
1534 unsigned int access
; /* wanted access rights
*/
1536 mem_size_t size
; /* mapping size
*/
1537 unsigned int flags
; /* SEC_
* flags
*/
1538 obj_handle_t shared_file
; /* shared mapping file handle
*/
1539 data_size_t total
; /* total required buffer size in bytes
*/
1540 VARARG(image
,pe_image_info
);/* image info for SEC_IMAGE mappings
*/
1541 VARARG(name
,unicode_str
); /* filename for SEC_IMAGE mappings
*/
1545 /* Add a memory view in the current process
*/
1547 obj_handle_t mapping
; /* file mapping handle
, or
0 for .so builtin
*/
1548 unsigned int access
; /* wanted access rights
*/
1549 client_ptr_t base
; /* view base
address (page
-aligned
) */
1550 mem_size_t size
; /* view size
*/
1551 file_pos_t start
; /* start offset in mapping
*/
1552 VARARG(image
,pe_image_info
);/* image info for .so builtins
*/
1553 VARARG(name
,unicode_str
); /* image filename for .so builtins
*/
1557 /* Unmap a memory view from the current process
*/
1559 client_ptr_t base
; /* view base address
*/
1563 /* Get a range of committed pages in a file mapping
*/
1564 @
REQ(get_mapping_committed_range
)
1565 client_ptr_t base
; /* view base address
*/
1566 file_pos_t offset
; /* starting
offset (page
-aligned
, in bytes
) */
1568 mem_size_t size
; /* size of range starting at
offset (page
-aligned
, in bytes
) */
1569 int committed
; /* whether it is a committed range
*/
1573 /* Add a range to the committed pages in a file mapping
*/
1574 @
REQ(add_mapping_committed_range
)
1575 client_ptr_t base
; /* view base address
*/
1576 file_pos_t offset
; /* starting
offset (page
-aligned
, in bytes
) */
1577 mem_size_t size
; /* size to
set (page
-aligned
, in bytes
) or
0 if only retrieving
*/
1581 /* Check if two memory maps are for the same file
*/
1582 @
REQ(is_same_mapping
)
1583 client_ptr_t base1
; /* first view base address
*/
1584 client_ptr_t base2
; /* second view base address
*/
1588 /* Get the filename of a mapping
*/
1589 @
REQ(get_mapping_filename
)
1590 obj_handle_t process
; /* process handle
*/
1591 client_ptr_t addr
; /* address inside mapped
view (in process address space
) */
1593 data_size_t len
; /* total filename length in bytes
*/
1594 VARARG(filename
,unicode_str
); /* filename in NT format
*/
1600 timeout_t start_time
;
1603 int current_priority
;
1609 timeout_t start_time
;
1610 data_size_t name_len
;
1614 process_id_t parent_pid
;
1618 /* VARARG(name
,unicode_str
,name_len
); */
1619 /* VARARG(threads
,struct thread_info
,thread_count
); */
1622 /* Get a list of processes and threads currently running
*/
1623 @
REQ(list_processes
)
1625 data_size_t info_size
;
1627 VARARG(data
,process_info
,info_size
);
1631 /* Create a debug object
*/
1632 @
REQ(create_debug_obj
)
1633 unsigned int access
; /* wanted access rights
*/
1634 unsigned int flags
; /* object flags
*/
1635 VARARG(objattr
,object_attributes
); /* object attributes
*/
1637 obj_handle_t handle
; /* handle to the debug object
*/
1641 /* Wait for a debug event
*/
1642 @
REQ(wait_debug_event
)
1643 obj_handle_t debug
; /* debug object
*/
1645 process_id_t pid
; /* process id
*/
1646 thread_id_t tid
; /* thread id
*/
1647 VARARG(event
,debug_event
); /* debug event data
*/
1651 /* Queue an exception event
*/
1652 @
REQ(queue_exception_event
)
1653 int first
; /* first chance exception?
*/
1654 unsigned int code
; /* exception code
*/
1655 unsigned int flags
; /* exception flags
*/
1656 client_ptr_t record
; /* exception record
*/
1657 client_ptr_t address
; /* exception address
*/
1658 data_size_t len
; /* size of parameters
*/
1659 VARARG(params
,uints64
,len
);/* exception parameters
*/
1661 obj_handle_t handle
; /* handle to the queued event
*/
1665 /* Retrieve the status of an exception event
*/
1666 @
REQ(get_exception_status
)
1667 obj_handle_t handle
; /* handle to the queued event
*/
1671 /* Continue a debug event
*/
1672 @
REQ(continue_debug_event
)
1673 obj_handle_t debug
; /* debug object
*/
1674 process_id_t pid
; /* process id to continue
*/
1675 thread_id_t tid
; /* thread id to continue
*/
1676 unsigned int status
; /* continuation status
*/
1680 /* Start or stop debugging an existing process
*/
1682 obj_handle_t handle
; /* process handle
*/
1683 obj_handle_t debug
; /* debug object to attach to the process
*/
1684 int attach
; /* 1=attaching
/ 0=detaching from the process
*/
1688 /* Set debug object information
*/
1689 @
REQ(set_debug_obj_info
)
1690 obj_handle_t debug
; /* debug object
*/
1691 unsigned int flags
; /* object flags
*/
1695 /* Read data from a process address space
*/
1696 @
REQ(read_process_memory
)
1697 obj_handle_t handle
; /* process handle
*/
1698 client_ptr_t addr
; /* addr to read from
*/
1700 VARARG(data
,bytes
); /* result data
*/
1704 /* Write data to a process address space
*/
1705 @
REQ(write_process_memory
)
1706 obj_handle_t handle
; /* process handle
*/
1707 client_ptr_t addr
; /* addr to write to
*/
1708 VARARG(data
,bytes
); /* data to write
*/
1712 /* Create a registry key
*/
1714 unsigned int access
; /* desired access rights
*/
1715 unsigned int options
; /* creation options
*/
1716 VARARG(objattr
,object_attributes
); /* object attributes
*/
1717 VARARG(class
,unicode_str
); /* class name
*/
1719 obj_handle_t hkey
; /* handle to the created key
*/
1720 int created
; /* has it been newly created?
*/
1723 /* Open a registry key
*/
1725 obj_handle_t parent
; /* handle to the parent key
*/
1726 unsigned int access
; /* desired access rights
*/
1727 unsigned int attributes
; /* object attributes
*/
1728 VARARG(name
,unicode_str
); /* key name
*/
1730 obj_handle_t hkey
; /* handle to the open key
*/
1734 /* Delete a registry key
*/
1736 obj_handle_t hkey
; /* handle to the key
*/
1740 /* Flush a registry key
*/
1742 obj_handle_t hkey
; /* handle to the key
*/
1746 /* Enumerate registry subkeys
*/
1748 obj_handle_t hkey
; /* handle to registry key
*/
1749 int index
; /* index of
subkey (or
-1 for current key
) */
1750 int info_class
; /* requested information class
*/
1752 int subkeys
; /* number of subkeys
*/
1753 int max_subkey
; /* longest subkey name
*/
1754 int max_class
; /* longest class name
*/
1755 int values
; /* number of values
*/
1756 int max_value
; /* longest value name
*/
1757 int max_data
; /* longest value data
*/
1758 timeout_t modif
; /* last modification time
*/
1759 data_size_t total
; /* total length needed for full name and class
*/
1760 data_size_t namelen
; /* length of key name in bytes
*/
1761 VARARG(name
,unicode_str
,namelen
); /* key name
*/
1762 VARARG(class
,unicode_str
); /* class name
*/
1766 /* Set a value of a registry key
*/
1768 obj_handle_t hkey
; /* handle to registry key
*/
1769 int type
; /* value type
*/
1770 data_size_t namelen
; /* length of value name in bytes
*/
1771 VARARG(name
,unicode_str
,namelen
); /* value name
*/
1772 VARARG(data
,bytes
); /* value data
*/
1776 /* Retrieve the value of a registry key
*/
1778 obj_handle_t hkey
; /* handle to registry key
*/
1779 VARARG(name
,unicode_str
); /* value name
*/
1781 int type
; /* value type
*/
1782 data_size_t total
; /* total length needed for data
*/
1783 VARARG(data
,bytes
); /* value data
*/
1787 /* Enumerate a value of a registry key
*/
1788 @
REQ(enum_key_value
)
1789 obj_handle_t hkey
; /* handle to registry key
*/
1790 int index
; /* value index
*/
1791 int info_class
; /* requested information class
*/
1793 int type
; /* value type
*/
1794 data_size_t total
; /* total length needed for full name and data
*/
1795 data_size_t namelen
; /* length of value name in bytes
*/
1796 VARARG(name
,unicode_str
,namelen
); /* value name
*/
1797 VARARG(data
,bytes
); /* value data
*/
1801 /* Delete a value of a registry key
*/
1802 @
REQ(delete_key_value
)
1803 obj_handle_t hkey
; /* handle to registry key
*/
1804 VARARG(name
,unicode_str
); /* value name
*/
1808 /* Load a registry branch from a file
*/
1810 obj_handle_t file
; /* file to load from
*/
1811 VARARG(objattr
,object_attributes
); /* object attributes
*/
1815 /* UnLoad a registry branch from a file
*/
1816 @
REQ(unload_registry
)
1817 obj_handle_t parent
; /* handle to the parent key
*/
1818 unsigned int attributes
; /* object attributes
*/
1819 VARARG(name
,unicode_str
); /* key name
*/
1823 /* Save a registry branch to a file
*/
1825 obj_handle_t hkey
; /* key to save
*/
1826 obj_handle_t file
; /* file to save to
*/
1830 /* Add a registry key change notification
*/
1831 @
REQ(set_registry_notification
)
1832 obj_handle_t hkey
; /* key to watch for changes
*/
1833 obj_handle_t event
; /* event to set
*/
1834 int subtree
; /* should we watch the whole subtree?
*/
1835 unsigned int filter
; /* things to watch
*/
1839 /* Create a waitable timer
*/
1841 unsigned int access
; /* wanted access rights
*/
1842 int manual
; /* manual reset
*/
1843 VARARG(objattr
,object_attributes
); /* object attributes
*/
1845 obj_handle_t handle
; /* handle to the timer
*/
1849 /* Open a waitable timer
*/
1851 unsigned int access
; /* wanted access rights
*/
1852 unsigned int attributes
; /* object attributes
*/
1853 obj_handle_t rootdir
; /* root directory
*/
1854 VARARG(name
,unicode_str
); /* object name
*/
1856 obj_handle_t handle
; /* handle to the timer
*/
1859 /* Set a waitable timer
*/
1861 obj_handle_t handle
; /* handle to the timer
*/
1862 timeout_t expire
; /* next expiration absolute time
*/
1863 client_ptr_t callback
; /* callback function
*/
1864 client_ptr_t arg
; /* callback argument
*/
1865 int period
; /* timer period in ms
*/
1867 int signaled
; /* was the timer signaled before this call ?
*/
1870 /* Cancel a waitable timer
*/
1872 obj_handle_t handle
; /* handle to the timer
*/
1874 int signaled
; /* was the timer signaled before this calltime ?
*/
1877 /* Get information on a waitable timer
*/
1878 @
REQ(get_timer_info
)
1879 obj_handle_t handle
; /* handle to the timer
*/
1881 timeout_t when
; /* absolute time when the timer next expires
*/
1882 int signaled
; /* is the timer signaled?
*/
1886 /* Retrieve the current context of a thread
*/
1887 @
REQ(get_thread_context
)
1888 obj_handle_t handle
; /* thread or context handle
*/
1889 unsigned int flags
; /* context flags
*/
1891 int self
; /* was it a handle to the current thread?
*/
1892 obj_handle_t handle
; /* pending context handle
*/
1893 VARARG(context
,context
); /* thread context
*/
1897 /* Set the current context of a thread
*/
1898 @
REQ(set_thread_context
)
1899 obj_handle_t handle
; /* thread handle
*/
1900 VARARG(context
,context
); /* thread context
*/
1902 int self
; /* was it a handle to the current thread?
*/
1906 /* Fetch a selector entry for a thread
*/
1907 @
REQ(get_selector_entry
)
1908 obj_handle_t handle
; /* thread handle
*/
1909 int entry
; /* LDT entry
*/
1911 unsigned int base
; /* selector base
*/
1912 unsigned int limit
; /* selector limit
*/
1913 unsigned char flags
; /* selector flags
*/
1919 VARARG(name
,unicode_str
); /* atom name
*/
1921 atom_t atom
; /* resulting atom
*/
1925 /* Delete an atom
*/
1927 atom_t atom
; /* atom handle
*/
1933 VARARG(name
,unicode_str
); /* atom name
*/
1935 atom_t atom
; /* atom handle
*/
1939 /* Get information about an atom
*/
1940 @
REQ(get_atom_information
)
1941 atom_t atom
; /* atom handle
*/
1943 int count
; /* atom lock count
*/
1944 int pinned
; /* whether the atom has been pinned
*/
1945 data_size_t total
; /* actual length of atom name
*/
1946 VARARG(name
,unicode_str
); /* atom name
*/
1950 /* Get the message queue of the current thread
*/
1953 obj_handle_t handle
; /* handle to the queue
*/
1957 /* Set the file descriptor associated to the current thread queue
*/
1959 obj_handle_t handle
; /* handle to the file descriptor
*/
1963 /* Set the current message queue wakeup mask
*/
1964 @
REQ(set_queue_mask
)
1965 unsigned int wake_mask
; /* wakeup bits mask
*/
1966 unsigned int changed_mask
; /* changed bits mask
*/
1967 int skip_wait
; /* will we skip waiting if signaled?
*/
1969 unsigned int wake_bits
; /* current wake bits
*/
1970 unsigned int changed_bits
; /* current changed bits
*/
1974 /* Get the current message queue status
*/
1975 @
REQ(get_queue_status
)
1976 unsigned int clear_bits
; /* should we clear the change bits?
*/
1978 unsigned int wake_bits
; /* wake bits
*/
1979 unsigned int changed_bits
; /* changed bits since last time
*/
1983 /* Retrieve the process idle event
*/
1984 @
REQ(get_process_idle_event
)
1985 obj_handle_t handle
; /* process handle
*/
1987 obj_handle_t event
; /* handle to idle event
*/
1991 /* Send a message to a thread queue
*/
1993 thread_id_t id
; /* thread id
*/
1994 int type
; /* message
type (see below
) */
1995 int flags
; /* message
flags (see below
) */
1996 user_handle_t win
; /* window handle
*/
1997 unsigned int msg
; /* message code
*/
1998 lparam_t wparam
; /* parameters
*/
1999 lparam_t lparam
; /* parameters
*/
2000 timeout_t timeout
; /* timeout for reply
*/
2001 VARARG(data
,message_data
); /* message data for sent messages
*/
2004 @
REQ(post_quit_message
)
2005 int exit_code
; /* exit code to return
*/
2010 MSG_ASCII
, /* Ascii
message (from SendMessageA
) */
2011 MSG_UNICODE
, /* Unicode
message (from SendMessageW
) */
2012 MSG_NOTIFY
, /* notify
message (from SendNotifyMessageW
), always Unicode
*/
2013 MSG_CALLBACK
, /* callback
message (from SendMessageCallbackW
), always Unicode
*/
2014 MSG_CALLBACK_RESULT
,/* result of a callback message
*/
2015 MSG_OTHER_PROCESS
, /* sent from other process
, may include vararg data
, always Unicode
*/
2016 MSG_POSTED
, /* posted
message (from PostMessageW
), always Unicode
*/
2017 MSG_HARDWARE
, /* hardware message
*/
2018 MSG_WINEVENT
, /* winevent message
*/
2019 MSG_HOOK_LL
/* low
-level hardware hook
*/
2021 #define SEND_MSG_ABORT_IF_HUNG
0x01
2024 /* Send a hardware message to a thread queue
*/
2025 @
REQ(send_hardware_message
)
2026 user_handle_t win
; /* window handle
*/
2027 hw_input_t input
; /* input data
*/
2028 unsigned int flags
; /* flags (see below
) */
2030 int wait
; /* do we need to wait for a reply?
*/
2031 int prev_x
; /* previous cursor position
*/
2033 int new_x
; /* new cursor position
*/
2035 VARARG(keystate
,bytes
); /* global state array for all the keys
*/
2037 #define SEND_HWMSG_INJECTED
0x01
2040 /* Get a message from the current queue
*/
2042 unsigned int flags
; /* PM_
* flags
*/
2043 user_handle_t get_win
; /* window handle to get
*/
2044 unsigned int get_first
; /* first message code to get
*/
2045 unsigned int get_last
; /* last message code to get
*/
2046 unsigned int hw_id
; /* id of the previous hardware
message (or
0) */
2047 unsigned int wake_mask
; /* wakeup bits mask
*/
2048 unsigned int changed_mask
; /* changed bits mask
*/
2050 user_handle_t win
; /* window handle
*/
2051 unsigned int msg
; /* message code
*/
2052 lparam_t wparam
; /* parameters
*/
2053 lparam_t lparam
; /* parameters
*/
2054 int type
; /* message type
*/
2055 int x
; /* message x position
*/
2056 int y
; /* message y position
*/
2057 unsigned int time
; /* message time
*/
2058 unsigned int active_hooks
; /* active hooks bitmap
*/
2059 data_size_t total
; /* total size of extra data
*/
2060 VARARG(data
,message_data
); /* message data for sent messages
*/
2064 /* Reply to a sent message
*/
2066 int remove
; /* should we remove the message?
*/
2067 lparam_t result
; /* message result
*/
2068 VARARG(data
,bytes
); /* message data for sent messages
*/
2072 /* Accept and remove the current hardware message
*/
2073 @
REQ(accept_hardware_message
)
2074 unsigned int hw_id
; /* id of the hardware message
*/
2078 /* Retrieve the reply for the last message sent
*/
2079 @
REQ(get_message_reply
)
2080 int cancel
; /* cancel message if not ready?
*/
2082 lparam_t result
; /* message result
*/
2083 VARARG(data
,bytes
); /* message data for sent messages
*/
2087 /* Set a window timer
*/
2089 user_handle_t win
; /* window handle
*/
2090 unsigned int msg
; /* message to post
*/
2091 unsigned int rate
; /* timer rate in ms
*/
2092 lparam_t id
; /* timer id
*/
2093 lparam_t lparam
; /* message
lparam (callback proc
) */
2095 lparam_t id
; /* timer id
*/
2099 /* Kill a window timer
*/
2100 @
REQ(kill_win_timer
)
2101 user_handle_t win
; /* window handle
*/
2102 lparam_t id
; /* timer id
*/
2103 unsigned int msg
; /* message to post
*/
2107 /* check if the thread owning the window is hung
*/
2108 @
REQ(is_window_hung
)
2109 user_handle_t win
; /* window handle
*/
2115 /* Retrieve info about a serial port
*/
2116 @
REQ(get_serial_info
)
2117 obj_handle_t handle
; /* handle to comm port
*/
2120 unsigned int eventmask
;
2121 unsigned int cookie
;
2122 unsigned int pending_write
;
2126 /* Set info about a serial port
*/
2127 @
REQ(set_serial_info
)
2128 obj_handle_t handle
; /* handle to comm port
*/
2129 int flags
; /* bitmask to set
values (see below
) */
2131 #define SERIALINFO_PENDING_WRITE
0x04
2132 #define SERIALINFO_PENDING_WAIT
0x08
2135 /* Create an async I
/O
*/
2136 @
REQ(register_async
)
2137 int type
; /* type of queue to look after
*/
2138 async_data_t async
; /* async I
/O parameters
*/
2139 int count
; /* count
- usually # of bytes to be read
/written
*/
2141 #define ASYNC_TYPE_READ
0x01
2142 #define ASYNC_TYPE_WRITE
0x02
2143 #define ASYNC_TYPE_WAIT
0x03
2146 /* Cancel all async op on a fd
*/
2148 obj_handle_t handle
; /* handle to comm port
, socket or file
*/
2149 client_ptr_t iosb
; /* I
/O status
block (NULL
=all
) */
2150 int only_thread
; /* cancel matching this thread
*/
2154 /* Retrieve results of an async
*/
2155 @
REQ(get_async_result
)
2156 client_ptr_t user_arg
; /* user arg used to identify async
*/
2158 data_size_t size
; /* result
size (input or output depending on the operation
) */
2159 VARARG(out_data
,bytes
); /* iosb output data
*/
2163 /* Perform a read on a file object
*/
2165 async_data_t async
; /* async I
/O parameters
*/
2166 file_pos_t pos
; /* read position
*/
2168 obj_handle_t wait
; /* handle to wait on for blocking read
*/
2169 unsigned int options
; /* device open options
*/
2170 VARARG(data
,bytes
); /* read data
*/
2174 /* Perform a write on a file object
*/
2176 async_data_t async
; /* async I
/O parameters
*/
2177 file_pos_t pos
; /* write position
*/
2178 VARARG(data
,bytes
); /* write data
*/
2180 obj_handle_t wait
; /* handle to wait on for blocking write
*/
2181 unsigned int options
; /* device open options
*/
2182 data_size_t size
; /* size written
*/
2186 /* Perform an ioctl on a file
*/
2188 ioctl_code_t code
; /* ioctl code
*/
2189 async_data_t async
; /* async I
/O parameters
*/
2190 VARARG(in_data
,bytes
); /* ioctl input data
*/
2192 obj_handle_t wait
; /* handle to wait on for blocking ioctl
*/
2193 unsigned int options
; /* device open options
*/
2194 VARARG(out_data
,bytes
); /* ioctl output data
*/
2198 /* Store results of an async irp
*/
2199 @
REQ(set_irp_result
)
2200 obj_handle_t handle
; /* handle to the irp
*/
2201 unsigned int status
; /* status of the irp
*/
2202 data_size_t size
; /* result
size (input or output depending on the operation
) */
2203 VARARG(data
,bytes
); /* output data of the irp
*/
2207 /* Create a named pipe
*/
2208 @
REQ(create_named_pipe
)
2209 unsigned int access
;
2210 unsigned int options
;
2211 unsigned int sharing
;
2212 unsigned int maxinstances
;
2213 unsigned int outsize
;
2214 unsigned int insize
;
2217 VARARG(objattr
,object_attributes
); /* object attributes
*/
2219 obj_handle_t handle
; /* handle to the pipe
*/
2222 /* flags in create_named_pipe and get_named_pipe_info
*/
2223 #define NAMED_PIPE_MESSAGE_STREAM_WRITE
0x0001
2224 #define NAMED_PIPE_MESSAGE_STREAM_READ
0x0002
2225 #define NAMED_PIPE_NONBLOCKING_MODE
0x0004
2226 #define NAMED_PIPE_SERVER_END
0x8000
2228 /* Set named pipe information by handle
*/
2229 @
REQ(set_named_pipe_info
)
2230 obj_handle_t handle
;
2234 /* Create a window
*/
2236 user_handle_t parent
; /* parent window
*/
2237 user_handle_t owner
; /* owner window
*/
2238 atom_t atom
; /* class atom
*/
2239 mod_handle_t instance
; /* module instance
*/
2240 int dpi
; /* system DPI
*/
2241 int awareness
; /* thread DPI awareness
*/
2242 VARARG(class
,unicode_str
); /* class name
*/
2244 user_handle_t handle
; /* created window
*/
2245 user_handle_t parent
; /* full handle of parent
*/
2246 user_handle_t owner
; /* full handle of owner
*/
2247 int extra
; /* number of extra bytes
*/
2248 client_ptr_t class_ptr
; /* pointer to class in client address space
*/
2249 int dpi
; /* window DPI if not per
-monitor aware
*/
2250 int awareness
; /* window DPI awareness
*/
2254 /* Destroy a window
*/
2255 @
REQ(destroy_window
)
2256 user_handle_t handle
; /* handle to the window
*/
2260 /* Retrieve the desktop window for the current thread
*/
2261 @
REQ(get_desktop_window
)
2262 int force
; /* force creation if it doesn
't exist */
2264 user_handle_t top_window; /* handle to the desktop window */
2265 user_handle_t msg_window; /* handle to the top-level HWND_MESSAGE parent */
2269 /* Set a window owner */
2270 @REQ(set_window_owner)
2271 user_handle_t handle; /* handle to the window */
2272 user_handle_t owner; /* new owner */
2274 user_handle_t full_owner; /* full handle of new owner */
2275 user_handle_t prev_owner; /* full handle of previous owner */
2279 /* Get information from a window handle */
2280 @REQ(get_window_info)
2281 user_handle_t handle; /* handle to the window */
2283 user_handle_t full_handle; /* full 32-bit handle */
2284 user_handle_t last_active; /* last active popup */
2285 process_id_t pid; /* process owning the window */
2286 thread_id_t tid; /* thread owning the window */
2287 atom_t atom; /* class atom */
2288 int is_unicode; /* ANSI or unicode */
2289 int dpi; /* window DPI */
2290 int awareness; /* DPI awareness */
2294 /* Set some information in a window */
2295 @REQ(set_window_info)
2296 unsigned short flags; /* flags for fields to set (see below) */
2297 short int is_unicode; /* ANSI or unicode */
2298 user_handle_t handle; /* handle to the window */
2299 unsigned int style; /* window style */
2300 unsigned int ex_style; /* window extended style */
2301 unsigned int id; /* window id */
2302 mod_handle_t instance; /* creator instance */
2303 lparam_t user_data; /* user-specific data */
2304 int extra_offset; /* offset to set in extra bytes */
2305 data_size_t extra_size; /* size to set in extra bytes */
2306 lparam_t extra_value; /* value to set in extra bytes */
2308 unsigned int old_style; /* old window style */
2309 unsigned int old_ex_style; /* old window extended style */
2310 mod_handle_t old_instance; /* old creator instance */
2311 lparam_t old_user_data; /* old user-specific data */
2312 lparam_t old_extra_value; /* old value in extra bytes */
2313 unsigned int old_id; /* old window id */
2315 #define SET_WIN_STYLE 0x01
2316 #define SET_WIN_EXSTYLE 0x02
2317 #define SET_WIN_ID 0x04
2318 #define SET_WIN_INSTANCE 0x08
2319 #define SET_WIN_USERDATA 0x10
2320 #define SET_WIN_EXTRA 0x20
2321 #define SET_WIN_UNICODE 0x40
2324 /* Set the parent of a window */
2326 user_handle_t handle; /* handle to the window */
2327 user_handle_t parent; /* handle to the parent */
2329 user_handle_t old_parent; /* old parent window */
2330 user_handle_t full_parent; /* full handle of new parent */
2331 int dpi; /* new window DPI if not per-monitor aware */
2332 int awareness; /* new DPI awareness */
2336 /* Get a list of the window parents, up to the root of the tree */
2337 @REQ(get_window_parents)
2338 user_handle_t handle; /* handle to the window */
2340 int count; /* total count of parents */
2341 VARARG(parents,user_handles); /* parent handles */
2345 /* Get a list of the window children */
2346 @REQ(get_window_children)
2347 obj_handle_t desktop; /* handle to desktop */
2348 user_handle_t parent; /* parent window */
2349 atom_t atom; /* class atom for the listed children */
2350 thread_id_t tid; /* thread owning the listed children */
2351 VARARG(class,unicode_str); /* class name */
2353 int count; /* total count of children */
2354 VARARG(children,user_handles); /* children handles */
2358 /* Get a list of the window children that contain a given point */
2359 @REQ(get_window_children_from_point)
2360 user_handle_t parent; /* parent window */
2361 int x; /* point in parent coordinates */
2363 int dpi; /* dpi for the point coordinates */
2365 int count; /* total count of children */
2366 VARARG(children,user_handles); /* children handles */
2370 /* Get window tree information from a window handle */
2371 @REQ(get_window_tree)
2372 user_handle_t handle; /* handle to the window */
2374 user_handle_t parent; /* parent window */
2375 user_handle_t owner; /* owner window */
2376 user_handle_t next_sibling; /* next sibling in Z-order */
2377 user_handle_t prev_sibling; /* prev sibling in Z-order */
2378 user_handle_t first_sibling; /* first sibling in Z-order */
2379 user_handle_t last_sibling; /* last sibling in Z-order */
2380 user_handle_t first_child; /* first child */
2381 user_handle_t last_child; /* last child */
2384 /* Set the position and Z order of a window */
2385 @REQ(set_window_pos)
2386 unsigned short swp_flags; /* SWP_* flags */
2387 unsigned short paint_flags; /* paint flags (see below) */
2388 user_handle_t handle; /* handle to the window */
2389 user_handle_t previous; /* previous window in Z order */
2390 rectangle_t window; /* window rectangle (in parent coords) */
2391 rectangle_t client; /* client rectangle (in parent coords) */
2392 VARARG(valid,rectangles); /* valid rectangles from WM_NCCALCSIZE (in parent coords) */
2394 unsigned int new_style; /* new window style */
2395 unsigned int new_ex_style; /* new window extended style */
2396 user_handle_t surface_win; /* parent window that holds the surface */
2397 int needs_update; /* whether the surface region needs an update */
2399 #define SET_WINPOS_PAINT_SURFACE 0x01 /* window has a paintable surface */
2400 #define SET_WINPOS_PIXEL_FORMAT 0x02 /* window has a custom pixel format */
2402 /* Get the window and client rectangles of a window */
2403 @REQ(get_window_rectangles)
2404 user_handle_t handle; /* handle to the window */
2405 int relative; /* coords relative to (see below) */
2406 int dpi; /* DPI to map to, or zero for per-monitor DPI */
2408 rectangle_t window; /* window rectangle */
2409 rectangle_t client; /* client rectangle */
2411 enum coords_relative
2413 COORDS_CLIENT, /* relative to client area */
2414 COORDS_WINDOW, /* relative to whole window area */
2415 COORDS_PARENT, /* relative to parent's client area
*/
2416 COORDS_SCREEN
/* relative to screen origin
*/
2420 /* Get the window text
*/
2421 @
REQ(get_window_text
)
2422 user_handle_t handle
; /* handle to the window
*/
2424 data_size_t length
; /* total length in WCHARs
*/
2425 VARARG(text
,unicode_str
); /* window text
*/
2429 /* Set the window text
*/
2430 @
REQ(set_window_text
)
2431 user_handle_t handle
; /* handle to the window
*/
2432 VARARG(text
,unicode_str
); /* window text
*/
2436 /* Get the coordinates offset between two windows
*/
2437 @
REQ(get_windows_offset
)
2438 user_handle_t from
; /* handle to the first window
*/
2439 user_handle_t to
; /* handle to the second window
*/
2440 int dpi
; /* DPI to map to
, or zero for per
-monitor DPI
*/
2442 int x
; /* x coordinate offset
*/
2443 int y
; /* y coordinate offset
*/
2444 int mirror
; /* whether to mirror the x coordinate
*/
2448 /* Get the visible region of a window
*/
2449 @
REQ(get_visible_region
)
2450 user_handle_t window
; /* handle to the window
*/
2451 unsigned int flags
; /* DCX flags
*/
2453 user_handle_t top_win
; /* top window to clip against
*/
2454 rectangle_t top_rect
; /* top window visible rect with screen coords
*/
2455 rectangle_t win_rect
; /* window rect in screen coords
*/
2456 unsigned int paint_flags
; /* paint
flags (from SET_WINPOS_
* flags
) */
2457 data_size_t total_size
; /* total size of the resulting region
*/
2458 VARARG(region
,rectangles
); /* list of rectangles for the
region (in screen coords
) */
2462 /* Get the visible surface region of a window
*/
2463 @
REQ(get_surface_region
)
2464 user_handle_t window
; /* handle to the window
*/
2466 rectangle_t visible_rect
; /* window visible rect in screen coords
*/
2467 data_size_t total_size
; /* total size of the resulting region
*/
2468 VARARG(region
,rectangles
); /* list of rectangles for the
region (in screen coords
) */
2472 /* Get the window region
*/
2473 @
REQ(get_window_region
)
2474 user_handle_t window
; /* handle to the window
*/
2476 data_size_t total_size
; /* total size of the resulting region
*/
2477 VARARG(region
,rectangles
); /* list of rectangles for the
region (in window coords
) */
2481 /* Set the window region
*/
2482 @
REQ(set_window_region
)
2483 user_handle_t window
; /* handle to the window
*/
2484 int redraw
; /* redraw the window?
*/
2485 VARARG(region
,rectangles
); /* list of rectangles for the
region (in window coords
) */
2489 /* Get the window update region
*/
2490 @
REQ(get_update_region
)
2491 user_handle_t window
; /* handle to the window
*/
2492 user_handle_t from_child
; /* child to start searching from
*/
2493 unsigned int flags
; /* update
flags (see below
) */
2495 user_handle_t child
; /* child to
repaint (or window itself
) */
2496 unsigned int flags
; /* resulting update
flags (see below
) */
2497 data_size_t total_size
; /* total size of the resulting region
*/
2498 VARARG(region
,rectangles
); /* list of rectangles for the
region (in screen coords
) */
2500 #define UPDATE_NONCLIENT
0x001 /* get region for repainting non
-client area
*/
2501 #define UPDATE_ERASE
0x002 /* get region for erasing client area
*/
2502 #define UPDATE_PAINT
0x004 /* get region for painting client area
*/
2503 #define UPDATE_INTERNALPAINT
0x008 /* get region if internal paint is pending
*/
2504 #define UPDATE_ALLCHILDREN
0x010 /* force repaint of all children
*/
2505 #define UPDATE_NOCHILDREN
0x020 /* don
't try to repaint any children */
2506 #define UPDATE_NOREGION 0x040 /* don't return a region
, only the flags
*/
2507 #define UPDATE_DELAYED_ERASE
0x080 /* still needs erase after BeginPaint
*/
2508 #define UPDATE_CLIPCHILDREN
0x100 /* remove clipped children from the update region
*/
2511 /* Update the z order of a window so that a given rectangle is fully visible
*/
2512 @
REQ(update_window_zorder
)
2513 user_handle_t window
; /* handle to the window
*/
2514 rectangle_t rect
; /* rectangle that must be
visible (in client coords
) */
2518 /* Mark parts of a window as needing a redraw
*/
2520 user_handle_t window
; /* handle to the window
*/
2521 unsigned int flags
; /* RDW_
* flags
*/
2522 VARARG(region
,rectangles
); /* list of rectangles for the
region (in window coords
) */
2526 /* Set a window property
*/
2527 @
REQ(set_window_property
)
2528 user_handle_t window
; /* handle to the window
*/
2529 lparam_t data
; /* data to store
*/
2530 atom_t atom
; /* property
atom (if no name specified
) */
2531 VARARG(name
,unicode_str
); /* property name
*/
2535 /* Remove a window property
*/
2536 @
REQ(remove_window_property
)
2537 user_handle_t window
; /* handle to the window
*/
2538 atom_t atom
; /* property
atom (if no name specified
) */
2539 VARARG(name
,unicode_str
); /* property name
*/
2541 lparam_t data
; /* data stored in property
*/
2545 /* Get a window property
*/
2546 @
REQ(get_window_property
)
2547 user_handle_t window
; /* handle to the window
*/
2548 atom_t atom
; /* property
atom (if no name specified
) */
2549 VARARG(name
,unicode_str
); /* property name
*/
2551 lparam_t data
; /* data stored in property
*/
2555 /* Get the list of properties of a window
*/
2556 @
REQ(get_window_properties
)
2557 user_handle_t window
; /* handle to the window
*/
2559 int total
; /* total number of properties
*/
2560 VARARG(props
,properties
); /* list of properties
*/
2564 /* Create a window station
*/
2565 @
REQ(create_winstation
)
2566 unsigned int flags
; /* window station flags
*/
2567 unsigned int access
; /* wanted access rights
*/
2568 unsigned int attributes
; /* object attributes
*/
2569 obj_handle_t rootdir
; /* root directory
*/
2570 VARARG(name
,unicode_str
); /* object name
*/
2572 obj_handle_t handle
; /* handle to the window station
*/
2576 /* Open a handle to a window station
*/
2577 @
REQ(open_winstation
)
2578 unsigned int access
; /* wanted access rights
*/
2579 unsigned int attributes
; /* object attributes
*/
2580 obj_handle_t rootdir
; /* root directory
*/
2581 VARARG(name
,unicode_str
); /* object name
*/
2583 obj_handle_t handle
; /* handle to the window station
*/
2587 /* Close a window station
*/
2588 @
REQ(close_winstation
)
2589 obj_handle_t handle
; /* handle to the window station
*/
2593 /* Get the process current window station
*/
2594 @
REQ(get_process_winstation
)
2596 obj_handle_t handle
; /* handle to the window station
*/
2600 /* Set the process current window station
*/
2601 @
REQ(set_process_winstation
)
2602 obj_handle_t handle
; /* handle to the window station
*/
2606 /* Enumerate window stations
*/
2607 @
REQ(enum_winstation
)
2608 unsigned int index
; /* current index
*/
2610 unsigned int next
; /* next index
*/
2611 VARARG(name
,unicode_str
); /* window station name
*/
2615 /* Create a desktop
*/
2616 @
REQ(create_desktop
)
2617 unsigned int flags
; /* desktop flags
*/
2618 unsigned int access
; /* wanted access rights
*/
2619 unsigned int attributes
; /* object attributes
*/
2620 VARARG(name
,unicode_str
); /* object name
*/
2622 obj_handle_t handle
; /* handle to the desktop
*/
2626 /* Open a handle to a desktop
*/
2628 obj_handle_t winsta
; /* window station to
open (null allowed
) */
2629 unsigned int flags
; /* desktop flags
*/
2630 unsigned int access
; /* wanted access rights
*/
2631 unsigned int attributes
; /* object attributes
*/
2632 VARARG(name
,unicode_str
); /* object name
*/
2634 obj_handle_t handle
; /* handle to the desktop
*/
2638 /* Open a handle to current input desktop
*/
2639 @
REQ(open_input_desktop
)
2640 unsigned int flags
; /* desktop flags
*/
2641 unsigned int access
; /* wanted access rights
*/
2642 unsigned int attributes
; /* object attributes
*/
2644 obj_handle_t handle
; /* handle to the desktop
*/
2648 /* Close a desktop
*/
2650 obj_handle_t handle
; /* handle to the desktop
*/
2654 /* Get the thread current desktop
*/
2655 @
REQ(get_thread_desktop
)
2656 thread_id_t tid
; /* thread id
*/
2658 obj_handle_t handle
; /* handle to the desktop
*/
2662 /* Set the thread current desktop
*/
2663 @
REQ(set_thread_desktop
)
2664 obj_handle_t handle
; /* handle to the desktop
*/
2668 /* Enumerate desktops
*/
2670 obj_handle_t winstation
; /* handle to the window station
*/
2671 unsigned int index
; /* current index
*/
2673 unsigned int next
; /* next index
*/
2674 VARARG(name
,unicode_str
); /* window station name
*/
2678 /* Get
/set information about a user
object (window station or desktop
) */
2679 @
REQ(set_user_object_info
)
2680 obj_handle_t handle
; /* handle to the object
*/
2681 unsigned int flags
; /* information to set
/get
*/
2682 unsigned int obj_flags
; /* new object flags
*/
2684 int is_desktop
; /* is object a desktop?
*/
2685 unsigned int old_obj_flags
; /* old object flags
*/
2686 VARARG(name
,unicode_str
); /* object name
*/
2688 #define SET_USER_OBJECT_SET_FLAGS
1
2689 #define SET_USER_OBJECT_GET_FULL_NAME
2
2692 /* Register a hotkey
*/
2693 @
REQ(register_hotkey
)
2694 user_handle_t window
; /* handle to the window
*/
2695 int id
; /* hotkey identifier
*/
2696 unsigned int flags
; /* modifier keys
*/
2697 unsigned int vkey
; /* virtual key code
*/
2699 int replaced
; /* did we replace an existing hotkey?
*/
2700 unsigned int flags
; /* flags of replaced hotkey
*/
2701 unsigned int vkey
; /* virtual key code of replaced hotkey
*/
2705 /* Unregister a hotkey
*/
2706 @
REQ(unregister_hotkey
)
2707 user_handle_t window
; /* handle to the window
*/
2708 int id
; /* hotkey identifier
*/
2710 unsigned int flags
; /* flags of removed hotkey
*/
2711 unsigned int vkey
; /* virtual key code of removed hotkey
*/
2715 /* Attach (or detach
) thread inputs
*/
2716 @
REQ(attach_thread_input
)
2717 thread_id_t tid_from
; /* thread to be attached
*/
2718 thread_id_t tid_to
; /* thread to which tid_from should be attached
*/
2719 int attach
; /* is it an attach?
*/
2723 /* Get input data for a given thread
*/
2724 @
REQ(get_thread_input
)
2725 thread_id_t tid
; /* id of thread
*/
2727 user_handle_t focus
; /* handle to the focus window
*/
2728 user_handle_t capture
; /* handle to the capture window
*/
2729 user_handle_t active
; /* handle to the active window
*/
2730 user_handle_t foreground
; /* handle to the global foreground window
*/
2731 user_handle_t menu_owner
; /* handle to the menu owner
*/
2732 user_handle_t move_size
; /* handle to the moving
/resizing window
*/
2733 user_handle_t caret
; /* handle to the caret window
*/
2734 user_handle_t cursor
; /* handle to the cursor
*/
2735 int show_count
; /* cursor show count
*/
2736 rectangle_t rect
; /* caret rectangle
*/
2740 /* Get the time of the last input event
*/
2741 @
REQ(get_last_input_time
)
2747 /* Retrieve queue keyboard state for current thread or global async state
*/
2749 int async
; /* whether to query the async state
*/
2750 int key
; /* optional key code or
-1 */
2752 unsigned char state
; /* state of specified key
*/
2753 VARARG(keystate
,bytes
); /* state array for all the keys
*/
2756 /* Set queue keyboard state for current thread
*/
2758 int async
; /* whether to change the async state too
*/
2759 VARARG(keystate
,bytes
); /* state array for all the keys
*/
2762 /* Set the system foreground window
*/
2763 @
REQ(set_foreground_window
)
2764 user_handle_t handle
; /* handle to the foreground window
*/
2766 user_handle_t previous
; /* handle to the previous foreground window
*/
2767 int send_msg_old
; /* whether we have to send a msg to the old window
*/
2768 int send_msg_new
; /* whether we have to send a msg to the new window
*/
2771 /* Set the current thread focus window
*/
2772 @
REQ(set_focus_window
)
2773 user_handle_t handle
; /* handle to the focus window
*/
2775 user_handle_t previous
; /* handle to the previous focus window
*/
2778 /* Set the current thread active window
*/
2779 @
REQ(set_active_window
)
2780 user_handle_t handle
; /* handle to the active window
*/
2782 user_handle_t previous
; /* handle to the previous active window
*/
2785 /* Set the current thread capture window
*/
2786 @
REQ(set_capture_window
)
2787 user_handle_t handle
; /* handle to the capture window
*/
2788 unsigned int flags
; /* capture
flags (see below
) */
2790 user_handle_t previous
; /* handle to the previous capture window
*/
2791 user_handle_t full_handle
; /* full
32-bit handle of new capture window
*/
2793 #define CAPTURE_MENU
0x01 /* capture is for a menu
*/
2794 #define CAPTURE_MOVESIZE
0x02 /* capture is for moving
/resizing
*/
2797 /* Set the current thread caret window
*/
2798 @
REQ(set_caret_window
)
2799 user_handle_t handle
; /* handle to the caret window
*/
2800 int width
; /* caret width
*/
2801 int height
; /* caret height
*/
2803 user_handle_t previous
; /* handle to the previous caret window
*/
2804 rectangle_t old_rect
; /* previous caret rectangle
*/
2805 int old_hide
; /* previous hide count
*/
2806 int old_state
; /* previous caret
state (1=on
, 0=off
) */
2810 /* Set the current thread caret information
*/
2811 @
REQ(set_caret_info
)
2812 unsigned int flags
; /* caret
flags (see below
) */
2813 user_handle_t handle
; /* handle to the caret window
*/
2814 int x
; /* caret x position
*/
2815 int y
; /* caret y position
*/
2816 int hide
; /* increment for hide
count (can be negative to show it
) */
2817 int state
; /* caret
state (see below
) */
2819 user_handle_t full_handle
; /* handle to the current caret window
*/
2820 rectangle_t old_rect
; /* previous caret rectangle
*/
2821 int old_hide
; /* previous hide count
*/
2822 int old_state
; /* previous caret
state (1=on
, 0=off
) */
2824 #define SET_CARET_POS
0x01 /* set the caret position from x
,y
*/
2825 #define SET_CARET_HIDE
0x02 /* increment the caret hide count
*/
2826 #define SET_CARET_STATE
0x04 /* set the caret on
/off state
*/
2829 CARET_STATE_OFF
, /* off
*/
2830 CARET_STATE_ON
, /* on
*/
2831 CARET_STATE_TOGGLE
, /* toggle current state
*/
2832 CARET_STATE_ON_IF_MOVED
/* on if the position differs
, unchanged otherwise
*/
2836 /* Set a window hook
*/
2838 int id
; /* id of the hook
*/
2839 process_id_t pid
; /* id of process to set the hook into
*/
2840 thread_id_t tid
; /* id of thread to set the hook into
*/
2843 client_ptr_t proc
; /* hook procedure
*/
2845 int unicode
; /* is it a unicode hook?
*/
2846 VARARG(module
,unicode_str
); /* module name
*/
2848 user_handle_t handle
; /* handle to the hook
*/
2849 unsigned int active_hooks
; /* active hooks bitmap
*/
2853 /* Remove a window hook
*/
2855 user_handle_t handle
; /* handle to the hook
*/
2856 client_ptr_t proc
; /* hook procedure if handle is
0 */
2857 int id
; /* id of the hook if handle is
0 */
2859 unsigned int active_hooks
; /* active hooks bitmap
*/
2863 /* Start calling a hook chain
*/
2864 @
REQ(start_hook_chain
)
2865 int id
; /* id of the hook
*/
2866 int event
; /* signalled event
*/
2867 user_handle_t window
; /* handle to the event window
*/
2868 int object_id
; /* object id for out of context winevent
*/
2869 int child_id
; /* child id for out of context winevent
*/
2871 user_handle_t handle
; /* handle to the next hook
*/
2872 process_id_t pid
; /* process id for low
-level keyboard
/mouse hooks
*/
2873 thread_id_t tid
; /* thread id for low
-level keyboard
/mouse hooks
*/
2874 int unicode
; /* is it a unicode hook?
*/
2875 client_ptr_t proc
; /* hook procedure
*/
2876 unsigned int active_hooks
; /* active hooks bitmap
*/
2877 VARARG(module
,unicode_str
); /* module name
*/
2881 /* Finished calling a hook chain
*/
2882 @
REQ(finish_hook_chain
)
2883 int id
; /* id of the hook
*/
2887 /* Get the hook information
*/
2889 user_handle_t handle
; /* handle to the current hook
*/
2890 int get_next
; /* do we want info about current or next hook?
*/
2891 int event
; /* signalled event
*/
2892 user_handle_t window
; /* handle to the event window
*/
2893 int object_id
; /* object id for out of context winevent
*/
2894 int child_id
; /* child id for out of context winevent
*/
2896 user_handle_t handle
; /* handle to the hook
*/
2897 int id
; /* id of the hook
*/
2898 process_id_t pid
; /* process id for low
-level keyboard
/mouse hooks
*/
2899 thread_id_t tid
; /* thread id for low
-level keyboard
/mouse hooks
*/
2900 client_ptr_t proc
; /* hook procedure
*/
2901 int unicode
; /* is it a unicode hook?
*/
2902 VARARG(module
,unicode_str
); /* module name
*/
2906 /* Create a window class
*/
2908 int local
; /* is it a local class?
*/
2909 atom_t atom
; /* class atom
*/
2910 unsigned int style
; /* class style
*/
2911 mod_handle_t instance
; /* module instance
*/
2912 int extra
; /* number of extra class bytes
*/
2913 int win_extra
; /* number of window extra bytes
*/
2914 client_ptr_t client_ptr
; /* pointer to class in client address space
*/
2915 data_size_t name_offset
; /* base class name offset for specified atom
*/
2916 VARARG(name
,unicode_str
); /* class name
*/
2918 atom_t atom
; /* resulting class atom
*/
2922 /* Destroy a window class
*/
2924 atom_t atom
; /* class atom
*/
2925 mod_handle_t instance
; /* module instance
*/
2926 VARARG(name
,unicode_str
); /* class name
*/
2928 client_ptr_t client_ptr
; /* pointer to class in client address space
*/
2932 /* Set some information in a class
*/
2933 @
REQ(set_class_info
)
2934 user_handle_t window
; /* handle to the window
*/
2935 unsigned int flags
; /* flags for info to
set (see below
) */
2936 atom_t atom
; /* class atom
*/
2937 unsigned int style
; /* class style
*/
2938 int win_extra
; /* number of window extra bytes
*/
2939 mod_handle_t instance
; /* module instance
*/
2940 int extra_offset
; /* offset to set in extra bytes
*/
2941 data_size_t extra_size
; /* size to set in extra bytes
*/
2942 lparam_t extra_value
; /* value to set in extra bytes
*/
2944 atom_t old_atom
; /* previous class atom
*/
2945 atom_t base_atom
; /* base class atom
*/
2946 mod_handle_t old_instance
; /* previous module instance
*/
2947 lparam_t old_extra_value
; /* old value in extra bytes
*/
2948 unsigned int old_style
; /* previous class style
*/
2949 int old_extra
; /* previous number of class extra bytes
*/
2950 int old_win_extra
; /* previous number of window extra bytes
*/
2952 #define SET_CLASS_ATOM
0x0001
2953 #define SET_CLASS_STYLE
0x0002
2954 #define SET_CLASS_WINEXTRA
0x0004
2955 #define SET_CLASS_INSTANCE
0x0008
2956 #define SET_CLASS_EXTRA
0x0010
2959 /* Open the clipboard
*/
2960 @
REQ(open_clipboard
)
2961 user_handle_t window
; /* clipboard window
*/
2963 user_handle_t owner
; /* current clipboard owner
*/
2967 /* Close the clipboard
*/
2968 @
REQ(close_clipboard
)
2970 user_handle_t viewer
; /* first clipboard viewer
*/
2971 user_handle_t owner
; /* current clipboard owner
*/
2975 /* Empty the clipboard and grab ownership
*/
2976 @
REQ(empty_clipboard
)
2980 /* Add a data format to the clipboard
*/
2981 @
REQ(set_clipboard_data
)
2982 unsigned int format
; /* clipboard format of the data
*/
2983 unsigned int lcid
; /* locale id to use for synthesizing text formats
*/
2984 VARARG(data
,bytes
); /* data contents
*/
2986 unsigned int seqno
; /* sequence number for the set data
*/
2990 /* Fetch a data format from the clipboard
*/
2991 @
REQ(get_clipboard_data
)
2992 unsigned int format
; /* clipboard format of the data
*/
2993 int render
; /* will we try to render it if missing?
*/
2994 int cached
; /* do we already have it in the client
-side cache?
*/
2995 unsigned int seqno
; /* sequence number for the data in the cache
*/
2997 unsigned int from
; /* for synthesized data
, format to generate it from
*/
2998 user_handle_t owner
; /* clipboard owner for delayed
-rendered formats
*/
2999 unsigned int seqno
; /* sequence number for the originally set data
*/
3000 data_size_t total
; /* total data size
*/
3001 VARARG(data
,bytes
); /* data contents
*/
3005 /* Retrieve a list of available formats
*/
3006 @
REQ(get_clipboard_formats
)
3007 unsigned int format
; /* specific format to query
, return all if
0 */
3009 unsigned int count
; /* count of available formats
*/
3010 VARARG(formats
,uints
); /* array of available formats
*/
3014 /* Retrieve the next available format
*/
3015 @
REQ(enum_clipboard_formats
)
3016 unsigned int previous
; /* previous format
, or first if
0 */
3018 unsigned int format
; /* next format
*/
3022 /* Release ownership of the clipboard
*/
3023 @
REQ(release_clipboard
)
3024 user_handle_t owner
; /* clipboard owner to release
*/
3026 user_handle_t viewer
; /* first clipboard viewer
*/
3027 user_handle_t owner
; /* current clipboard owner
*/
3031 /* Get clipboard information
*/
3032 @
REQ(get_clipboard_info
)
3034 user_handle_t window
; /* clipboard window
*/
3035 user_handle_t owner
; /* clipboard owner
*/
3036 user_handle_t viewer
; /* clipboard viewer
*/
3037 unsigned int seqno
; /* current sequence number
*/
3041 /* Set the clipboard viewer window
*/
3042 @
REQ(set_clipboard_viewer
)
3043 user_handle_t viewer
; /* clipboard viewer
*/
3044 user_handle_t previous
; /* if non
-zero
, check that this was the previous viewer
*/
3046 user_handle_t old_viewer
; /* previous clipboard viewer
*/
3047 user_handle_t owner
; /* clipboard owner
*/
3051 /* Add a clipboard listener window
*/
3052 @
REQ(add_clipboard_listener
)
3053 user_handle_t window
; /* clipboard listener window
*/
3057 /* Remove a clipboard listener window
*/
3058 @
REQ(remove_clipboard_listener
)
3059 user_handle_t window
; /* clipboard listener window
*/
3063 /* Open a security token
*/
3065 obj_handle_t handle
; /* handle to the thread or process
*/
3066 unsigned int access
; /* access rights to the new token
*/
3067 unsigned int attributes
;/* object attributes
*/
3068 unsigned int flags
; /* flags (see below
) */
3070 obj_handle_t token
; /* handle to the token
*/
3072 #define OPEN_TOKEN_THREAD
1
3073 #define OPEN_TOKEN_AS_SELF
2
3076 /* Set
/get the global windows
*/
3077 @
REQ(set_global_windows
)
3078 unsigned int flags
; /* flags for fields to
set (see below
) */
3079 user_handle_t shell_window
; /* handle to the new shell window
*/
3080 user_handle_t shell_listview
; /* handle to the new shell listview window
*/
3081 user_handle_t progman_window
; /* handle to the new program manager window
*/
3082 user_handle_t taskman_window
; /* handle to the new task manager window
*/
3084 user_handle_t old_shell_window
; /* handle to the shell window
*/
3085 user_handle_t old_shell_listview
; /* handle to the shell listview window
*/
3086 user_handle_t old_progman_window
; /* handle to the new program manager window
*/
3087 user_handle_t old_taskman_window
; /* handle to the new task manager window
*/
3089 #define SET_GLOBAL_SHELL_WINDOWS
0x01 /* set both main shell and listview windows
*/
3090 #define SET_GLOBAL_PROGMAN_WINDOW
0x02
3091 #define SET_GLOBAL_TASKMAN_WINDOW
0x04
3093 /* Adjust the privileges held by a token
*/
3094 @
REQ(adjust_token_privileges
)
3095 obj_handle_t handle
; /* handle to the token
*/
3096 int disable_all
; /* disable all privileges?
*/
3097 int get_modified_state
; /* get modified privileges?
*/
3098 VARARG(privileges
,LUID_AND_ATTRIBUTES
); /* privileges to enable
/disable
/remove
*/
3100 unsigned int len
; /* total length in bytes required to store token privileges
*/
3101 VARARG(privileges
,LUID_AND_ATTRIBUTES
); /* modified privileges
*/
3104 /* Retrieves the set of privileges held by or available to a token
*/
3105 @
REQ(get_token_privileges
)
3106 obj_handle_t handle
; /* handle to the token
*/
3108 unsigned int len
; /* total length in bytes required to store token privileges
*/
3109 VARARG(privileges
,LUID_AND_ATTRIBUTES
); /* privileges held by or available to a token
*/
3112 /* Check the token has the required privileges
*/
3113 @
REQ(check_token_privileges
)
3114 obj_handle_t handle
; /* handle to the token
*/
3115 int all_required
; /* are all the privileges required for the check to succeed?
*/
3116 VARARG(privileges
,LUID_AND_ATTRIBUTES
); /* privileges to check
*/
3118 int has_privileges
; /* does the token have the required privileges?
*/
3119 VARARG(privileges
,LUID_AND_ATTRIBUTES
); /* privileges held by or available to a token
*/
3122 @
REQ(duplicate_token
)
3123 obj_handle_t handle
; /* handle to the token to duplicate
*/
3124 unsigned int access
; /* access rights to the new token
*/
3125 int primary
; /* is the new token to be a primary one?
*/
3126 int impersonation_level
; /* impersonation level of the new token
*/
3127 VARARG(objattr
,object_attributes
); /* object attributes
*/
3129 obj_handle_t new_handle
; /* duplicated handle
*/
3133 obj_handle_t handle
; /* handle to the token to duplicate
*/
3134 unsigned int flags
; /* flags
*/
3135 data_size_t privileges_size
; /* size of privileges
*/
3136 VARARG(privileges
,LUID_AND_ATTRIBUTES
,privileges_size
); /* privileges to remove from new token
*/
3137 VARARG(disable_sids
,SID
); /* array of groups to remove from new token
*/
3139 obj_handle_t new_handle
; /* filtered handle
*/
3143 obj_handle_t handle
; /* handle to the token
*/
3144 unsigned int desired_access
; /* desired access to the object
*/
3145 generic_map_t mapping
; /* mapping to specific rights
*/
3146 VARARG(sd
,security_descriptor
); /* security descriptor to check
*/
3148 unsigned int access_granted
; /* access rights actually granted
*/
3149 unsigned int access_status
; /* was access granted?
*/
3150 unsigned int privileges_len
; /* length needed to store privileges
*/
3151 VARARG(privileges
,LUID_AND_ATTRIBUTES
); /* privileges used during access check
*/
3155 obj_handle_t handle
; /* handle to the token
*/
3156 unsigned int which_sid
; /* which SID to retrieve from the token
*/
3158 data_size_t sid_len
; /* length needed to store sid
*/
3159 VARARG(sid
,SID
); /* the sid specified by which_sid from the token
*/
3162 @
REQ(get_token_groups
)
3163 obj_handle_t handle
; /* handle to the token
*/
3165 data_size_t user_len
; /* length needed to store user
*/
3166 VARARG(user
,token_groups
); /* groups the token
's user belongs to */
3169 @REQ(get_token_default_dacl)
3170 obj_handle_t handle; /* handle to the token */
3172 data_size_t acl_len; /* length needed to store access control list */
3173 VARARG(acl,ACL); /* access control list */
3176 @REQ(set_token_default_dacl)
3177 obj_handle_t handle; /* handle to the token */
3178 VARARG(acl,ACL); /* default dacl to set */
3181 @REQ(set_security_object)
3182 obj_handle_t handle; /* handle to the object */
3183 unsigned int security_info; /* which parts of security descriptor to set */
3184 VARARG(sd,security_descriptor); /* security descriptor to set */
3187 @REQ(get_security_object)
3188 obj_handle_t handle; /* handle to the object */
3189 unsigned int security_info; /* which parts of security descriptor to get */
3191 unsigned int sd_len; /* buffer size needed for sd */
3192 VARARG(sd,security_descriptor); /* retrieved security descriptor */
3199 obj_handle_t handle;
3200 unsigned int access;
3201 unsigned int attributes;
3205 /* Return a list of all opened handles */
3206 @REQ(get_system_handles)
3208 unsigned int count; /* number of handles */
3209 VARARG(data,handle_infos); /* array of handle_infos */
3213 /* Create a mailslot */
3214 @REQ(create_mailslot)
3215 unsigned int access; /* wanted access rights */
3216 timeout_t read_timeout;
3217 unsigned int max_msgsize;
3218 VARARG(objattr,object_attributes); /* object attributes */
3220 obj_handle_t handle; /* handle to the mailslot */
3224 /* Set mailslot information */
3225 @REQ(set_mailslot_info)
3226 obj_handle_t handle; /* handle to the mailslot */
3227 timeout_t read_timeout;
3230 timeout_t read_timeout;
3231 unsigned int max_msgsize;
3233 #define MAILSLOT_SET_READ_TIMEOUT 1
3236 /* Create a directory object */
3237 @REQ(create_directory)
3238 unsigned int access; /* access flags */
3239 VARARG(objattr,object_attributes); /* object attributes */
3241 obj_handle_t handle; /* handle to the directory */
3245 /* Open a directory object */
3246 @REQ(open_directory)
3247 unsigned int access; /* access flags */
3248 unsigned int attributes; /* object attributes */
3249 obj_handle_t rootdir; /* root directory */
3250 VARARG(directory_name,unicode_str); /* Directory name */
3252 obj_handle_t handle; /* handle to the directory */
3256 /* Get a directory entry by index */
3257 @REQ(get_directory_entry)
3258 obj_handle_t handle; /* handle to the directory */
3259 unsigned int index; /* entry index */
3261 data_size_t name_len; /* length of the entry name in bytes */
3262 VARARG(name,unicode_str,name_len); /* entry name */
3263 VARARG(type,unicode_str); /* entry type */
3267 /* Create a symbolic link object */
3268 @REQ(create_symlink)
3269 unsigned int access; /* access flags */
3270 VARARG(objattr,object_attributes); /* object attributes */
3271 VARARG(target_name,unicode_str); /* target name */
3273 obj_handle_t handle; /* handle to the symlink */
3277 /* Open a symbolic link object */
3279 unsigned int access; /* access flags */
3280 unsigned int attributes; /* object attributes */
3281 obj_handle_t rootdir; /* root directory */
3282 VARARG(name,unicode_str); /* symlink name */
3284 obj_handle_t handle; /* handle to the symlink */
3288 /* Query a symbolic link object */
3290 obj_handle_t handle; /* handle to the symlink */
3292 data_size_t total; /* total needed size for name */
3293 VARARG(target_name,unicode_str); /* target name */
3297 /* Query basic object information */
3298 @REQ(get_object_info)
3299 obj_handle_t handle; /* handle to the object */
3301 unsigned int access; /* granted access mask */
3302 unsigned int ref_count; /* object ref count */
3303 unsigned int handle_count; /* object handle count */
3304 data_size_t total; /* total needed size for name */
3305 VARARG(name,unicode_str); /* object name */
3309 /* Query object type name information */
3310 @REQ(get_object_type)
3311 obj_handle_t handle; /* handle to the object */
3313 VARARG(info,object_type_info); /* type information */
3317 /* Query type information for all types */
3318 @REQ(get_object_types)
3320 int count; /* total count of object types */
3321 VARARG(info,object_types_info); /* type information */
3325 /* Allocate a locally-unique identifier */
3326 @REQ(allocate_locally_unique_id)
3332 /* Create a device manager */
3333 @REQ(create_device_manager)
3334 unsigned int access; /* wanted access rights */
3335 unsigned int attributes; /* object attributes */
3337 obj_handle_t handle; /* handle to the device */
3341 /* Create a device */
3343 obj_handle_t rootdir; /* root directory */
3344 client_ptr_t user_ptr; /* opaque ptr for use by client */
3345 obj_handle_t manager; /* device manager */
3346 VARARG(name,unicode_str); /* object name */
3350 /* Delete a device */
3352 obj_handle_t manager; /* handle to the device manager */
3353 client_ptr_t device; /* pointer to the device */
3357 /* Retrieve the next pending device irp request */
3358 @REQ(get_next_device_request)
3359 obj_handle_t manager; /* handle to the device manager */
3360 obj_handle_t prev; /* handle to the previous irp */
3361 unsigned int status; /* status of the previous irp */
3362 client_ptr_t user_ptr; /* user pointer of the previous irp */
3364 irp_params_t params; /* irp parameters */
3365 obj_handle_t next; /* handle to the next irp */
3366 thread_id_t client_tid; /* tid of thread calling irp */
3367 client_ptr_t client_thread; /* pointer to thread object of calling irp */
3368 data_size_t in_size; /* total needed input size */
3369 VARARG(next_data,bytes); /* input data of the next irp */
3373 /* Get kernel pointer from server object */
3374 @REQ(get_kernel_object_ptr)
3375 obj_handle_t manager; /* handle to the device manager */
3376 obj_handle_t handle; /* object handle */
3378 client_ptr_t user_ptr; /* kernel object pointer */
3382 /* Associate kernel pointer with server object */
3383 @REQ(set_kernel_object_ptr)
3384 obj_handle_t manager; /* handle to the device manager */
3385 obj_handle_t handle; /* object handle */
3386 client_ptr_t user_ptr; /* kernel object pointer */
3390 /* Grab server object reference from kernel object pointer */
3391 @REQ(grab_kernel_object)
3392 obj_handle_t manager; /* handle to the device manager */
3393 client_ptr_t user_ptr; /* kernel object pointer */
3397 /* Release server object reference from kernel object pointer */
3398 @REQ(release_kernel_object)
3399 obj_handle_t manager; /* handle to the device manager */
3400 client_ptr_t user_ptr; /* kernel object pointer */
3404 /* Get handle from kernel object pointer */
3405 @REQ(get_kernel_object_handle)
3406 obj_handle_t manager; /* handle to the device manager */
3407 client_ptr_t user_ptr; /* kernel object pointer */
3408 unsigned int access; /* wanted access rights */
3410 obj_handle_t handle; /* kernel object handle */
3414 /* Make the current process a system process */
3415 @REQ(make_process_system)
3417 obj_handle_t event; /* event signaled when all user processes have exited */
3421 /* Get detailed fixed-size information about a token */
3422 @REQ(get_token_info)
3423 obj_handle_t handle; /* handle to the object */
3425 luid_t token_id; /* locally-unique identifier of the token */
3426 luid_t modified_id; /* locally-unique identifier of the modified version of the token */
3427 int primary; /* is the token primary or impersonation? */
3428 int impersonation_level; /* level of impersonation */
3429 int elevation; /* elevation type */
3430 int group_count; /* the number of groups the token is a member of */
3431 int privilege_count; /* the number of privileges the token has */
3435 /* Create a token which is an elevation counterpart to this token */
3436 @REQ(create_linked_token)
3437 obj_handle_t handle; /* handle to the token */
3439 obj_handle_t linked; /* handle to the linked token */
3443 /* Create I/O completion port */
3444 @REQ(create_completion)
3445 unsigned int access; /* desired access to a port */
3446 unsigned int concurrent; /* max number of concurrent active threads */
3447 VARARG(objattr,object_attributes); /* object attributes */
3449 obj_handle_t handle; /* port handle */
3453 /* Open I/O completion port */
3454 @REQ(open_completion)
3455 unsigned int access; /* desired access to a port */
3456 unsigned int attributes; /* object attributes */
3457 obj_handle_t rootdir; /* root directory */
3458 VARARG(filename,unicode_str); /* port name */
3460 obj_handle_t handle; /* port handle */
3464 /* add completion to completion port */
3465 @REQ(add_completion)
3466 obj_handle_t handle; /* port handle */
3467 apc_param_t ckey; /* completion key */
3468 apc_param_t cvalue; /* completion value */
3469 apc_param_t information; /* IO_STATUS_BLOCK Information */
3470 unsigned int status; /* completion result */
3474 /* get completion from completion port queue */
3475 @REQ(remove_completion)
3476 obj_handle_t handle; /* port handle */
3478 apc_param_t ckey; /* completion key */
3479 apc_param_t cvalue; /* completion value */
3480 apc_param_t information; /* IO_STATUS_BLOCK Information */
3481 unsigned int status; /* completion result */
3485 /* get completion queue depth */
3486 @REQ(query_completion)
3487 obj_handle_t handle; /* port handle */
3489 unsigned int depth; /* completion queue depth */
3493 /* associate object with completion port */
3494 @REQ(set_completion_info)
3495 obj_handle_t handle; /* object handle */
3496 apc_param_t ckey; /* completion key */
3497 obj_handle_t chandle; /* port handle */
3501 /* check for associated completion and push msg */
3502 @REQ(add_fd_completion)
3503 obj_handle_t handle; /* async' object
*/
3504 apc_param_t cvalue
; /* completion value
*/
3505 apc_param_t information
; /* IO_STATUS_BLOCK Information
*/
3506 unsigned int status
; /* completion status
*/
3507 int async
; /* completion is an async result
*/
3511 /* set fd completion information
*/
3512 @
REQ(set_fd_completion_mode
)
3513 obj_handle_t handle
; /* handle to a file or directory
*/
3514 unsigned int flags
; /* completion notification flags
*/
3518 /* set fd disposition information
*/
3519 @
REQ(set_fd_disp_info
)
3520 obj_handle_t handle
; /* handle to a file or directory
*/
3521 int unlink
; /* whether to unlink file on close
*/
3525 /* set fd name information
*/
3526 @
REQ(set_fd_name_info
)
3527 obj_handle_t handle
; /* handle to a file or directory
*/
3528 obj_handle_t rootdir
; /* root directory
*/
3529 data_size_t namelen
; /* length of NT name in bytes
*/
3530 int link
; /* link instead of renaming
*/
3531 int replace
; /* replace an existing file?
*/
3532 VARARG(name
,unicode_str
,namelen
); /* NT name
*/
3533 VARARG(filename
,string
); /* new file name
*/
3537 /* Retrieve layered info for a window
*/
3538 @
REQ(get_window_layered_info
)
3539 user_handle_t handle
; /* handle to the window
*/
3541 unsigned int color_key
; /* color key
*/
3542 unsigned int alpha
; /* alpha (0.
.255) */
3543 unsigned int flags
; /* LWA_
* flags
*/
3547 /* Set layered info for a window
*/
3548 @
REQ(set_window_layered_info
)
3549 user_handle_t handle
; /* handle to the window
*/
3550 unsigned int color_key
; /* color key
*/
3551 unsigned int alpha
; /* alpha (0.
.255) */
3552 unsigned int flags
; /* LWA_
* flags
*/
3556 /* Allocate an arbitrary user handle
*/
3557 @
REQ(alloc_user_handle
)
3559 user_handle_t handle
; /* allocated handle
*/
3563 /* Free an arbitrary user handle
*/
3564 @
REQ(free_user_handle
)
3565 user_handle_t handle
; /* handle to free
*/
3569 /* Set
/get the current cursor
*/
3571 unsigned int flags
; /* flags for fields to
set (see below
) */
3572 user_handle_t handle
; /* handle to the cursor
*/
3573 int show_count
; /* show count increment
/decrement
*/
3574 int x
; /* cursor position
*/
3576 rectangle_t clip
; /* cursor clip rectangle
*/
3577 unsigned int clip_msg
; /* message to post on cursor clip changes
*/
3579 user_handle_t prev_handle
; /* previous handle
*/
3580 int prev_count
; /* previous show count
*/
3581 int prev_x
; /* previous position
*/
3583 int new_x
; /* new position
*/
3585 rectangle_t new_clip
; /* new clip rectangle
*/
3586 unsigned int last_change
; /* time of last position change
*/
3588 #define SET_CURSOR_HANDLE
0x01
3589 #define SET_CURSOR_COUNT
0x02
3590 #define SET_CURSOR_POS
0x04
3591 #define SET_CURSOR_CLIP
0x08
3592 #define SET_CURSOR_NOCLIP
0x10
3594 /* Get the history of the
64 last cursor positions
*/
3595 @
REQ(get_cursor_history
)
3597 VARARG(history
,cursor_positions
);
3601 /* Batch read rawinput message data
*/
3602 @
REQ(get_rawinput_buffer
)
3603 data_size_t rawinput_size
; /* size of RAWINPUT structure
*/
3604 data_size_t buffer_size
; /* size of output buffer
*/
3606 data_size_t next_size
; /* minimum size to get next message data
*/
3611 /* Modify the list of registered rawinput devices
*/
3612 @
REQ(update_rawinput_devices
)
3613 VARARG(devices
,rawinput_devices
);
3616 /* Retrieve the list of registered rawinput devices
*/
3617 @
REQ(get_rawinput_devices
)
3619 unsigned int device_count
;
3620 VARARG(devices
,rawinput_devices
);
3623 /* Create a new job object
*/
3625 unsigned int access
; /* wanted access rights
*/
3626 VARARG(objattr
,object_attributes
); /* object attributes
*/
3628 obj_handle_t handle
; /* handle to the job
*/
3632 /* Open a job object
*/
3634 unsigned int access
; /* wanted access rights
*/
3635 unsigned int attributes
; /* object attributes
*/
3636 obj_handle_t rootdir
; /* root directory
*/
3637 VARARG(name
,unicode_str
); /* object name
*/
3639 obj_handle_t handle
; /* handle to the job
*/
3643 /* Assign a job object to a process
*/
3645 obj_handle_t job
; /* handle to the job
*/
3646 obj_handle_t process
; /* handle to the process
*/
3650 /* Check if a process is associated with a job
*/
3651 @
REQ(process_in_job
)
3652 obj_handle_t job
; /* handle to the job
*/
3653 obj_handle_t process
; /* handle to the process
*/
3657 /* Set limit flags on a job
*/
3658 @
REQ(set_job_limits
)
3659 obj_handle_t handle
; /* handle to the job
*/
3660 unsigned int limit_flags
; /* new limit flags
*/
3664 /* Set new completion port for a job
*/
3665 @
REQ(set_job_completion_port
)
3666 obj_handle_t job
; /* handle to the job
*/
3667 obj_handle_t port
; /* handle to the completion port
*/
3668 client_ptr_t key
; /* key to send with completion messages
*/
3672 /* Retrieve information about a job
*/
3674 obj_handle_t handle
; /* handle to the job
*/
3676 int total_processes
; /* total count of processes
*/
3677 int active_processes
; /* count of running processes
*/
3681 /* Terminate all processes associated with the job
*/
3683 obj_handle_t handle
; /* handle to the job
*/
3684 int status
; /* process exit code
*/
3688 /* Suspend a process
*/
3689 @
REQ(suspend_process
)
3690 obj_handle_t handle
; /* process handle
*/
3694 /* Resume a process
*/
3695 @
REQ(resume_process
)
3696 obj_handle_t handle
; /* process handle
*/