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
; /* EXCEPTION_DEBUG_EVENT
*/
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
; /* CREATE_THREAD_DEBUG_EVENT
*/
92 obj_handle_t handle
; /* handle to the new thread
*/
93 client_ptr_t teb
; /* thread
teb (in debugged process address space
) */
94 client_ptr_t start
; /* thread startup routine
*/
98 int code
; /* CREATE_PROCESS_DEBUG_EVENT
*/
99 obj_handle_t file
; /* handle to the process exe file
*/
100 obj_handle_t process
; /* handle to the new process
*/
101 obj_handle_t thread
; /* handle to the new thread
*/
102 mod_handle_t base
; /* base of executable image
*/
103 int dbg_offset
; /* offset of debug info in file
*/
104 int dbg_size
; /* size of debug info
*/
105 client_ptr_t teb
; /* thread
teb (in debugged process address space
) */
106 client_ptr_t start
; /* thread startup routine
*/
107 client_ptr_t name
; /* image
name (optional
) */
108 int unicode
; /* is it Unicode?
*/
112 int code
; /* EXIT_THREAD_DEBUG_EVENT
/EXIT_PROCESS_DEBUG_EVENT
*/
113 int exit_code
; /* thread or process exit code
*/
117 int code
; /* LOAD_DLL_DEBUG_EVENT
*/
118 obj_handle_t handle
; /* file handle for the dll
*/
119 mod_handle_t base
; /* base address of the dll
*/
120 int dbg_offset
; /* offset of debug info in file
*/
121 int dbg_size
; /* size of debug info
*/
122 client_ptr_t name
; /* image
name (optional
) */
123 int unicode
; /* is it Unicode?
*/
127 int code
; /* UNLOAD_DLL_DEBUG_EVENT
*/
129 mod_handle_t base
; /* base address of the dll
*/
133 /* supported CPU types
*/
136 CPU_x86
, CPU_x86_64
, CPU_POWERPC
, CPU_ARM
, CPU_ARM64
138 typedef int client_cpu_t
;
143 client_cpu_t cpu
; /* cpu type
*/
144 unsigned int flags
; /* SERVER_CTX_
* flags
*/
147 struct
{ unsigned int eip
, ebp
, esp
, eflags
, cs
, ss
; } i386_regs
;
148 struct
{ unsigned __int64 rip
, rbp
, rsp
;
149 unsigned int cs
, ss
, flags
, __pad
; } x86_64_regs
;
150 struct
{ unsigned int iar
, msr
, ctr
, lr
, dar
, dsisr
, trap
, __pad
; } powerpc_regs
;
151 struct
{ unsigned int sp
, lr
, pc
, cpsr
; } arm_regs
;
152 struct
{ unsigned __int64 sp
, pc
, pstate
; } arm64_regs
;
153 } ctl
; /* selected by SERVER_CTX_CONTROL
*/
156 struct
{ unsigned int eax
, ebx
, ecx
, edx
, esi
, edi
; } i386_regs
;
157 struct
{ unsigned __int64 rax
,rbx
, rcx
, rdx
, rsi
, rdi
,
158 r8
, r9
, r10
, r11
, r12
, r13
, r14
, r15
; } x86_64_regs
;
159 struct
{ unsigned int gpr
[32], cr
, xer
; } powerpc_regs
;
160 struct
{ unsigned int r
[13]; } arm_regs
;
161 struct
{ unsigned __int64 x
[31]; } arm64_regs
;
162 } integer
; /* selected by SERVER_CTX_INTEGER
*/
165 struct
{ unsigned int ds
, es
, fs
, gs
; } i386_regs
;
166 struct
{ unsigned int ds
, es
, fs
, gs
; } x86_64_regs
;
167 } seg
; /* selected by SERVER_CTX_SEGMENTS
*/
170 struct
{ unsigned int ctrl
, status
, tag
, err_off
, err_sel
, data_off
, data_sel
, cr0npx
;
171 unsigned char regs
[80]; } i386_regs
;
172 struct
{ struct
{ unsigned __int64 low
, high
; } fpregs
[32]; } x86_64_regs
;
173 struct
{ double fpr
[32], fpscr
; } powerpc_regs
;
174 struct
{ unsigned __int64 d
[32]; unsigned int fpscr
; } arm_regs
;
175 struct
{ struct
{ unsigned __int64 low
, high
; } q
[32]; unsigned int fpcr
, fpsr
; } arm64_regs
;
176 } fp
; /* selected by SERVER_CTX_FLOATING_POINT
*/
179 struct
{ unsigned int dr0
, dr1
, dr2
, dr3
, dr6
, dr7
; } i386_regs
;
180 struct
{ unsigned __int64 dr0
, dr1
, dr2
, dr3
, dr6
, dr7
; } x86_64_regs
;
181 struct
{ unsigned int dr
[8]; } powerpc_regs
;
182 struct
{ unsigned int bvr
[8], bcr
[8], wvr
[1], wcr
[1]; } arm_regs
;
183 struct
{ unsigned __int64 bvr
[8], wvr
[2]; unsigned int bcr
[8], wcr
[2]; } arm64_regs
;
184 } debug
; /* selected by SERVER_CTX_DEBUG_REGISTERS
*/
187 unsigned char i386_regs
[512];
188 } ext
; /* selected by SERVER_CTX_EXTENDED_REGISTERS
*/
191 #define SERVER_CTX_CONTROL
0x01
192 #define SERVER_CTX_INTEGER
0x02
193 #define SERVER_CTX_SEGMENTS
0x04
194 #define SERVER_CTX_FLOATING_POINT
0x08
195 #define SERVER_CTX_DEBUG_REGISTERS
0x10
196 #define SERVER_CTX_EXTENDED_REGISTERS
0x20
198 /* structure used in sending an fd from client to server
*/
201 thread_id_t tid
; /* thread id
*/
202 int fd
; /* file descriptor on client
-side
*/
205 /* structure sent by the server on the wait fifo
*/
208 client_ptr_t cookie
; /* magic cookie that was passed in select_request
*/
209 int signaled
; /* wait result
*/
213 /* NT
-style timeout
, in
100ns units
, negative means relative timeout
*/
214 typedef __int64 timeout_t
;
215 #define
TIMEOUT_INFINITE (((timeout_t
)0x7fffffff) << 32 |
0xffffffff)
217 /* absolute timeout
, negative means that monotonic clock is used
*/
218 typedef __int64 abstime_t
;
220 /* structure for process startup info
*/
223 unsigned int debug_flags
;
224 unsigned int console_flags
;
225 obj_handle_t console
;
227 obj_handle_t hstdout
;
228 obj_handle_t hstderr
;
235 unsigned int attribute
;
238 data_size_t curdir_len
;
239 data_size_t dllpath_len
;
240 data_size_t imagepath_len
;
241 data_size_t cmdline_len
;
242 data_size_t title_len
;
243 data_size_t desktop_len
;
244 data_size_t shellinfo_len
;
245 data_size_t runtime_len
;
246 /* VARARG(curdir
,unicode_str
,curdir_len
); */
247 /* VARARG(dllpath
,unicode_str
,dllpath_len
); */
248 /* VARARG(imagepath
,unicode_str
,imagepath_len
); */
249 /* VARARG(cmdline
,unicode_str
,cmdline_len
); */
250 /* VARARG(title
,unicode_str
,title_len
); */
251 /* VARARG(desktop
,unicode_str
,desktop_len
); */
252 /* VARARG(shellinfo
,unicode_str
,shellinfo_len
); */
253 /* VARARG(runtime
,unicode_str
,runtime_len
); */
256 /* structure returned in the list of window properties
*/
259 atom_t atom
; /* property atom
*/
260 int string
; /* was atom a string originally?
*/
261 lparam_t data
; /* data stored in property
*/
264 /* structure to specify window rectangles
*/
273 /* structure for parameters of async I
/O calls
*/
276 obj_handle_t handle
; /* object to perform I
/O on
*/
277 obj_handle_t event
; /* event to signal when done
*/
278 client_ptr_t iosb
; /* I
/O status block in client addr space
*/
279 client_ptr_t user
; /* opaque user data containing callback pointer and async
-specific data
*/
280 client_ptr_t apc
; /* user APC to call
*/
281 apc_param_t apc_context
; /* user APC context or completion value
*/
284 /* structures for extra message data
*/
288 unsigned int device
; /* source
device (IMDT_
* values
) */
289 unsigned int origin
; /* source
origin (IMO_
* values
) */
292 struct hardware_msg_data
294 lparam_t info
; /* extra info
*/
295 unsigned int hw_id
; /* unique id
*/
296 unsigned int flags
; /* hook flags
*/
297 struct hw_msg_source source
; /* message source
*/
303 int type
; /* RIM_TYPEKEYBOARD
*/
304 unsigned int message
; /* message generated by this rawinput event
*/
305 unsigned short vkey
; /* virtual key code
*/
306 unsigned short scan
; /* scan code
*/
310 int type
; /* RIM_TYPEMOUSE
*/
311 int x
; /* x coordinate
*/
312 int y
; /* y coordinate
*/
313 unsigned int data
; /* mouse data
*/
318 struct callback_msg_data
320 client_ptr_t callback
; /* callback function
*/
321 lparam_t data
; /* user data for callback
*/
322 lparam_t result
; /* message result
*/
325 struct winevent_msg_data
327 user_handle_t hook
; /* hook handle
*/
328 thread_id_t tid
; /* thread id
*/
329 client_ptr_t hook_proc
; /* hook proc address
*/
330 /* followed by module name if any
*/
338 int type
; /* INPUT_KEYBOARD
*/
339 unsigned short vkey
; /* virtual key code
*/
340 unsigned short scan
; /* scan code
*/
341 unsigned int flags
; /* event flags
*/
342 unsigned int time
; /* event time
*/
343 lparam_t info
; /* extra info
*/
347 int type
; /* INPUT_MOUSE
*/
348 int x
; /* coordinates
*/
350 unsigned int data
; /* mouse data
*/
351 unsigned int flags
; /* event flags
*/
352 unsigned int time
; /* event time
*/
353 lparam_t info
; /* extra info
*/
357 int type
; /* INPUT_HARDWARE
*/
358 unsigned int msg
; /* message code
*/
359 lparam_t lparam
; /* message param
*/
365 unsigned char bytes
[1]; /* raw data for sent messages
*/
366 struct hardware_msg_data hardware
;
367 struct callback_msg_data callback
;
368 struct winevent_msg_data winevent
;
371 /* structure returned in filesystem events
*/
372 struct filesystem_event
381 unsigned int low_part
;
385 #define MAX_ACL_LEN
65535
387 struct security_descriptor
389 unsigned int control
; /* SE_ flags
*/
390 data_size_t owner_len
;
391 data_size_t group_len
;
392 data_size_t sacl_len
;
393 data_size_t dacl_len
;
394 /* VARARG(owner
,SID
); */
395 /* VARARG(group
,SID
); */
396 /* VARARG(sacl
,ACL
); */
397 /* VARARG(dacl
,ACL
); */
400 struct object_attributes
402 obj_handle_t rootdir
; /* root directory
*/
403 unsigned int attributes
; /* object attributes
*/
404 data_size_t sd_len
; /* length of security_descriptor data. may be
0 */
405 data_size_t name_len
; /* length of the name string. may be
0 */
406 /* VARARG(sd
,security_descriptor
); */
407 /* VARARG(name
,unicode_str
); */
413 /* unsigned int attributes
[count
]; */
414 /* VARARG(sids
,SID
); */
422 SELECT_SIGNAL_AND_WAIT
,
423 SELECT_KEYED_EVENT_WAIT
,
424 SELECT_KEYED_EVENT_RELEASE
432 enum select_op op
; /* SELECT_WAIT or SELECT_WAIT_ALL
*/
433 obj_handle_t handles
[MAXIMUM_WAIT_OBJECTS
];
437 enum select_op op
; /* SELECT_SIGNAL_AND_WAIT
*/
439 obj_handle_t signal
; /* must be last in the structure so we can remove it on retries
*/
443 enum select_op op
; /* SELECT_KEYED_EVENT_WAIT or SELECT_KEYED_EVENT_RELEASE
*/
473 enum apc_type type
; /* APC_USER
*/
475 client_ptr_t func
; /* void (__stdcall
*func
)(ULONG_PTR
,ULONG_PTR
,ULONG_PTR
); */
476 apc_param_t args
[3]; /* arguments for user function
*/
480 enum apc_type type
; /* APC_TIMER
*/
482 client_ptr_t func
; /* void (__stdcall
*func
)(void
*, unsigned int
, unsigned int
); */
483 abstime_t time
; /* time of expiration
*/
484 client_ptr_t arg
; /* user argument
*/
494 enum apc_type type
; /* APC_ASYNC_IO
*/
495 unsigned int status
; /* I
/O status
*/
496 client_ptr_t user
; /* user pointer
*/
497 client_ptr_t sb
; /* status block
*/
501 enum apc_type type
; /* APC_VIRTUAL_ALLOC
*/
502 unsigned int op_type
; /* type of operation
*/
503 client_ptr_t addr
; /* requested address
*/
504 mem_size_t size
; /* allocation size
*/
505 mem_size_t zero_bits
; /* number of zero high bits
*/
506 unsigned int prot
; /* memory protection flags
*/
510 enum apc_type type
; /* APC_VIRTUAL_FREE
*/
511 unsigned int op_type
; /* type of operation
*/
512 client_ptr_t addr
; /* requested address
*/
513 mem_size_t size
; /* allocation size
*/
517 enum apc_type type
; /* APC_VIRTUAL_QUERY
*/
519 client_ptr_t addr
; /* requested address
*/
523 enum apc_type type
; /* APC_VIRTUAL_PROTECT
*/
524 unsigned int prot
; /* new protection flags
*/
525 client_ptr_t addr
; /* requested address
*/
526 mem_size_t size
; /* requested size
*/
530 enum apc_type type
; /* APC_VIRTUAL_FLUSH
*/
532 client_ptr_t addr
; /* requested address
*/
533 mem_size_t size
; /* requested size
*/
537 enum apc_type type
; /* APC_VIRTUAL_LOCK
*/
539 client_ptr_t addr
; /* requested address
*/
540 mem_size_t size
; /* requested size
*/
544 enum apc_type type
; /* APC_VIRTUAL_UNLOCK
*/
546 client_ptr_t addr
; /* requested address
*/
547 mem_size_t size
; /* requested size
*/
551 enum apc_type type
; /* APC_MAP_VIEW
*/
552 obj_handle_t handle
; /* mapping handle
*/
553 client_ptr_t addr
; /* requested address
*/
554 mem_size_t size
; /* allocation size
*/
555 file_pos_t offset
; /* file offset
*/
556 mem_size_t zero_bits
; /* number of zero high bits
*/
557 unsigned int alloc_type
; /* allocation type
*/
558 unsigned int prot
; /* memory protection flags
*/
562 enum apc_type type
; /* APC_UNMAP_VIEW
*/
564 client_ptr_t addr
; /* view address
*/
568 enum apc_type type
; /* APC_CREATE_THREAD
*/
569 unsigned int flags
; /* creation flags
*/
570 client_ptr_t func
; /* void (__stdcall
*func
)(void*)
; start function
*/
571 client_ptr_t arg
; /* argument for start function
*/
572 mem_size_t reserve
; /* reserve size for thread stack
*/
573 mem_size_t commit
; /* commit size for thread stack
*/
582 enum apc_type type
; /* APC_ASYNC_IO
*/
583 unsigned int status
; /* new status of async operation
*/
584 unsigned int total
; /* bytes transferred
*/
588 enum apc_type type
; /* APC_VIRTUAL_ALLOC
*/
589 unsigned int status
; /* status returned by call
*/
590 client_ptr_t addr
; /* resulting address
*/
591 mem_size_t size
; /* resulting size
*/
595 enum apc_type type
; /* APC_VIRTUAL_FREE
*/
596 unsigned int status
; /* status returned by call
*/
597 client_ptr_t addr
; /* resulting address
*/
598 mem_size_t size
; /* resulting size
*/
602 enum apc_type type
; /* APC_VIRTUAL_QUERY
*/
603 unsigned int status
; /* status returned by call
*/
604 client_ptr_t base
; /* resulting base address
*/
605 client_ptr_t alloc_base
;/* resulting allocation base
*/
606 mem_size_t size
; /* resulting region size
*/
607 unsigned short state
; /* resulting region state
*/
608 unsigned short prot
; /* resulting region protection
*/
609 unsigned short alloc_prot
;/* resulting allocation protection
*/
610 unsigned short alloc_type
;/* resulting region allocation type
*/
614 enum apc_type type
; /* APC_VIRTUAL_PROTECT
*/
615 unsigned int status
; /* status returned by call
*/
616 client_ptr_t addr
; /* resulting address
*/
617 mem_size_t size
; /* resulting size
*/
618 unsigned int prot
; /* old protection flags
*/
622 enum apc_type type
; /* APC_VIRTUAL_FLUSH
*/
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_LOCK
*/
630 unsigned int status
; /* status returned by call
*/
631 client_ptr_t addr
; /* resulting address
*/
632 mem_size_t size
; /* resulting size
*/
636 enum apc_type type
; /* APC_VIRTUAL_UNLOCK
*/
637 unsigned int status
; /* status returned by call
*/
638 client_ptr_t addr
; /* resulting address
*/
639 mem_size_t size
; /* resulting size
*/
643 enum apc_type type
; /* APC_MAP_VIEW
*/
644 unsigned int status
; /* status returned by call
*/
645 client_ptr_t addr
; /* resulting address
*/
646 mem_size_t size
; /* resulting size
*/
650 enum apc_type type
; /* APC_MAP_VIEW
*/
651 unsigned int status
; /* status returned by call
*/
655 enum apc_type type
; /* APC_CREATE_THREAD
*/
656 unsigned int status
; /* status returned by call
*/
657 process_id_t pid
; /* process id
*/
658 thread_id_t tid
; /* thread id
*/
659 client_ptr_t teb
; /* thread
teb (in process address space
) */
660 obj_handle_t handle
; /* handle to new thread
*/
664 enum apc_type type
; /* APC_BREAK_PROCESS
*/
665 unsigned int status
; /* status returned by call
*/
684 enum irp_type type
; /* irp call type
*/
687 enum irp_type type
; /* IRP_CALL_CREATE
*/
688 unsigned int access
; /* access rights
*/
689 unsigned int sharing
; /* sharing flags
*/
690 unsigned int options
; /* file options
*/
691 client_ptr_t device
; /* opaque ptr for the device
*/
692 obj_handle_t file
; /* file handle
*/
696 enum irp_type type
; /* IRP_CALL_CLOSE
*/
698 client_ptr_t file
; /* opaque ptr for the file object
*/
702 enum irp_type type
; /* IRP_CALL_READ
*/
703 unsigned int key
; /* driver key
*/
704 data_size_t out_size
; /* needed output size
*/
706 client_ptr_t file
; /* opaque ptr for the file object
*/
707 file_pos_t pos
; /* file position
*/
711 enum irp_type type
; /* IRP_CALL_WRITE
*/
712 unsigned int key
; /* driver key
*/
713 client_ptr_t file
; /* opaque ptr for the file object
*/
714 file_pos_t pos
; /* file position
*/
718 enum irp_type type
; /* IRP_CALL_FLUSH
*/
720 client_ptr_t file
; /* opaque ptr for the file object
*/
724 enum irp_type type
; /* IRP_CALL_IOCTL
*/
725 ioctl_code_t code
; /* ioctl code
*/
726 data_size_t out_size
; /* needed output size
*/
728 client_ptr_t file
; /* opaque ptr for the file object
*/
732 enum irp_type type
; /* IRP_CALL_FREE
*/
734 client_ptr_t obj
; /* opaque ptr for the freed object
*/
738 enum irp_type type
; /* IRP_CALL_CANCEL
*/
740 client_ptr_t irp
; /* opaque ptr for canceled irp
*/
744 /* information about a PE image mapping
, roughly equivalent to SECTION_IMAGE_INFORMATION
*/
748 client_ptr_t entry_point
;
750 mem_size_t stack_size
;
751 mem_size_t stack_commit
;
752 unsigned int zerobits
;
753 unsigned int subsystem
;
754 unsigned short subsystem_low
;
755 unsigned short subsystem_high
;
757 unsigned short image_charact
;
758 unsigned short dll_charact
;
759 unsigned short machine
;
760 unsigned char contains_code
;
761 unsigned char image_flags
;
762 unsigned int loader_flags
;
763 unsigned int header_size
;
764 unsigned int file_size
;
765 unsigned int checksum
;
769 #define IMAGE_FLAGS_ComPlusNativeReady
0x01
770 #define IMAGE_FLAGS_ComPlusILOnly
0x02
771 #define IMAGE_FLAGS_ImageDynamicallyRelocated
0x04
772 #define IMAGE_FLAGS_ImageMappedFlat
0x08
773 #define IMAGE_FLAGS_BaseBelow4gb
0x10
774 #define IMAGE_FLAGS_WineBuiltin
0x40
775 #define IMAGE_FLAGS_WineFakeDll
0x80
777 struct rawinput_device
779 unsigned short usage_page
;
780 unsigned short usage
;
782 user_handle_t target
;
785 /****************************************************************/
786 /* Request declarations
*/
788 /* Create a new process from the context of the parent
*/
790 obj_handle_t token
; /* process token
*/
791 obj_handle_t parent_process
; /* parent process
*/
792 int inherit_all
; /* inherit all handles from parent
*/
793 unsigned int create_flags
; /* creation flags
*/
794 int socket_fd
; /* file descriptor for process socket
*/
795 obj_handle_t exe_file
; /* file handle for main exe
*/
796 unsigned int access
; /* access rights for process object
*/
797 client_cpu_t cpu
; /* CPU that the new process will use
*/
798 data_size_t info_size
; /* size of startup info
*/
799 data_size_t handles_size
; /* length of explicit handles list
*/
800 VARARG(objattr
,object_attributes
); /* object attributes
*/
801 VARARG(handles
,uints
,handles_size
); /* handles list
*/
802 VARARG(info
,startup_info
,info_size
); /* startup information
*/
803 VARARG(env
,unicode_str
); /* environment for new process
*/
805 obj_handle_t info
; /* new process info handle
*/
806 process_id_t pid
; /* process id
*/
807 obj_handle_t handle
; /* process
handle (in the current process
) */
811 /* Execute a process
, replacing the current one
*/
813 int socket_fd
; /* file descriptor for process socket
*/
814 client_cpu_t cpu
; /* CPU that the new process will use
*/
818 /* Retrieve information about a newly started process
*/
819 @
REQ(get_new_process_info
)
820 obj_handle_t info
; /* info handle returned from new_process_request
*/
822 int success
; /* did the process start successfully?
*/
823 int exit_code
; /* process exit code if failed
*/
827 /* Create a new thread
*/
829 obj_handle_t process
; /* process in which to create thread
*/
830 unsigned int access
; /* wanted access rights
*/
831 int suspend
; /* new thread should be suspended on creation
*/
832 int request_fd
; /* fd for request pipe
*/
833 VARARG(objattr
,object_attributes
); /* object attributes
*/
835 thread_id_t tid
; /* thread id
*/
836 obj_handle_t handle
; /* thread
handle (in the current process
) */
840 /* Retrieve the new process startup info
*/
841 @
REQ(get_startup_info
)
843 data_size_t info_size
; /* size of startup info
*/
844 VARARG(info
,startup_info
,info_size
); /* startup information
*/
845 VARARG(env
,unicode_str
); /* environment
*/
849 /* Signal the end of the process initialization
*/
850 @
REQ(init_process_done
)
851 int gui
; /* is it a GUI process?
*/
852 mod_handle_t module
; /* main module base address
*/
853 client_ptr_t ldt_copy
; /* address of LDT
copy (in thread address space
) */
854 client_ptr_t entry
; /* process entry point
*/
856 int suspend
; /* is process suspended?
*/
860 /* Initialize a thread
; called from the child after
fork()/clone() */
862 int unix_pid
; /* Unix pid of new thread
*/
863 int unix_tid
; /* Unix tid of new thread
*/
864 int debug_level
; /* new debug level
*/
865 client_ptr_t teb
; /* TEB of new
thread (in thread address space
) */
866 client_ptr_t entry
; /* entry point or PEB if initial
thread (in thread address space
) */
867 int reply_fd
; /* fd for reply pipe
*/
868 int wait_fd
; /* fd for blocking calls pipe
*/
869 client_cpu_t cpu
; /* CPU that this thread is running on
*/
871 process_id_t pid
; /* process id of the new thread
's process */
872 thread_id_t tid; /* thread id of the new thread */
873 timeout_t server_start; /* server start time */
874 data_size_t info_size; /* total size of startup info */
875 int version; /* protocol version */
876 unsigned int all_cpus; /* bitset of supported CPUs */
877 int suspend; /* is thread suspended? */
881 /* Terminate a process */
882 @REQ(terminate_process)
883 obj_handle_t handle; /* process handle to terminate */
884 int exit_code; /* process exit code */
886 int self; /* suicide? */
890 /* Terminate a thread */
891 @REQ(terminate_thread)
892 obj_handle_t handle; /* thread handle to terminate */
893 int exit_code; /* thread exit code */
895 int self; /* suicide? */
899 /* Retrieve information about a process */
900 @REQ(get_process_info)
901 obj_handle_t handle; /* process handle */
903 process_id_t pid; /* server process id */
904 process_id_t ppid; /* server process id of parent */
905 affinity_t affinity; /* process affinity mask */
906 client_ptr_t peb; /* PEB address in process address space */
907 timeout_t start_time; /* process start time */
908 timeout_t end_time; /* process end time */
909 int exit_code; /* process exit code */
910 int priority; /* priority class */
911 client_cpu_t cpu; /* CPU that this process is running on */
912 short int debugger_present; /* process is being debugged */
913 short int debug_children; /* inherit debugger to child processes */
914 VARARG(image,pe_image_info); /* image info for main exe */
918 /* Retrieve information about a process memory usage */
919 @REQ(get_process_vm_counters)
920 obj_handle_t handle; /* process handle */
922 mem_size_t peak_virtual_size; /* peak virtual memory in bytes */
923 mem_size_t virtual_size; /* virtual memory in bytes */
924 mem_size_t peak_working_set_size; /* peak real memory in bytes */
925 mem_size_t working_set_size; /* real memory in bytes */
926 mem_size_t pagefile_usage; /* commit charge in bytes */
927 mem_size_t peak_pagefile_usage; /* peak commit charge in bytes */
931 /* Set a process information */
932 @REQ(set_process_info)
933 obj_handle_t handle; /* process handle */
934 int mask; /* setting mask (see below) */
935 int priority; /* priority class */
936 affinity_t affinity; /* affinity mask */
938 #define SET_PROCESS_INFO_PRIORITY 0x01
939 #define SET_PROCESS_INFO_AFFINITY 0x02
942 /* Retrieve information about a thread */
943 @REQ(get_thread_info)
944 obj_handle_t handle; /* thread handle */
945 unsigned int access; /* required access rights */
947 process_id_t pid; /* server process id */
948 thread_id_t tid; /* server thread id */
949 client_ptr_t teb; /* thread teb pointer */
950 client_ptr_t entry_point; /* thread entry point */
951 affinity_t affinity; /* thread affinity mask */
952 int exit_code; /* thread exit code */
953 int priority; /* thread priority level */
954 int last; /* last thread in process */
955 int suspend_count; /* thread suspend count */
956 int dbg_hidden; /* thread hidden from debugger */
957 data_size_t desc_len; /* description length in bytes */
958 VARARG(desc,unicode_str); /* description string */
962 /* Retrieve information about thread times */
963 @REQ(get_thread_times)
964 obj_handle_t handle; /* thread handle */
966 timeout_t creation_time; /* thread creation time */
967 timeout_t exit_time; /* thread exit time */
968 int unix_pid; /* thread native pid */
969 int unix_tid; /* thread native pid */
973 /* Set a thread information */
974 @REQ(set_thread_info)
975 obj_handle_t handle; /* thread handle */
976 int mask; /* setting mask (see below) */
977 int priority; /* priority class */
978 affinity_t affinity; /* affinity mask */
979 client_ptr_t entry_point; /* thread entry point */
980 obj_handle_t token; /* impersonation token */
981 VARARG(desc,unicode_str); /* description string */
983 #define SET_THREAD_INFO_PRIORITY 0x01
984 #define SET_THREAD_INFO_AFFINITY 0x02
985 #define SET_THREAD_INFO_TOKEN 0x04
986 #define SET_THREAD_INFO_ENTRYPOINT 0x08
987 #define SET_THREAD_INFO_DESCRIPTION 0x10
988 #define SET_THREAD_INFO_DBG_HIDDEN 0x20
991 /* Retrieve information about a module */
993 obj_handle_t handle; /* process handle */
994 mod_handle_t base_address; /* base address of module */
996 client_ptr_t entry_point;
997 data_size_t filename_len; /* buffer len in bytes required to store filename */
998 VARARG(filename,unicode_str); /* file name of module */
1002 /* Suspend a thread */
1003 @REQ(suspend_thread)
1004 obj_handle_t handle; /* thread handle */
1006 int count; /* new suspend count */
1010 /* Resume a thread */
1012 obj_handle_t handle; /* thread handle */
1014 int count; /* new suspend count */
1018 /* Notify the server that a dll has been loaded */
1020 data_size_t dbg_offset; /* debug info offset */
1021 mod_handle_t base; /* base address */
1022 client_ptr_t name; /* ptr to ptr to name (in process addr space) */
1023 data_size_t dbg_size; /* debug info size */
1024 VARARG(filename,unicode_str); /* file name of dll */
1028 /* Notify the server that a dll is being unloaded */
1030 mod_handle_t base; /* base address */
1034 /* Queue an APC for a thread or process */
1036 obj_handle_t handle; /* thread or process handle */
1037 apc_call_t call; /* call arguments */
1039 obj_handle_t handle; /* APC handle */
1040 int self; /* run APC in caller itself? */
1044 /* Get the result of an APC call */
1045 @REQ(get_apc_result)
1046 obj_handle_t handle; /* handle to the APC */
1048 apc_result_t result; /* result of the APC */
1052 /* Close a handle for the current process */
1054 obj_handle_t handle; /* handle to close */
1058 /* Set a handle information */
1059 @REQ(set_handle_info)
1060 obj_handle_t handle; /* handle we are interested in */
1061 int flags; /* new handle flags */
1062 int mask; /* mask for flags to set */
1064 int old_flags; /* old flag value */
1068 /* Duplicate a handle */
1070 obj_handle_t src_process; /* src process handle */
1071 obj_handle_t src_handle; /* src handle to duplicate */
1072 obj_handle_t dst_process; /* dst process handle */
1073 unsigned int access; /* wanted access rights */
1074 unsigned int attributes; /* object attributes */
1075 unsigned int options; /* duplicate options (see below) */
1077 obj_handle_t handle; /* duplicated handle in dst process */
1078 int self; /* is the source the current process? */
1079 int closed; /* whether the source handle has been closed */
1081 #define DUP_HANDLE_CLOSE_SOURCE DUPLICATE_CLOSE_SOURCE
1082 #define DUP_HANDLE_SAME_ACCESS DUPLICATE_SAME_ACCESS
1083 #define DUP_HANDLE_MAKE_GLOBAL 0x80000000 /* Not a Windows flag */
1086 /* Make an object temporary */
1087 @REQ(make_temporary)
1088 obj_handle_t handle; /* handle to the object */
1092 /* Open a handle to a process */
1094 process_id_t pid; /* process id to open */
1095 unsigned int access; /* wanted access rights */
1096 unsigned int attributes; /* object attributes */
1098 obj_handle_t handle; /* handle to the process */
1102 /* Open a handle to a thread */
1104 thread_id_t tid; /* thread id to open */
1105 unsigned int access; /* wanted access rights */
1106 unsigned int attributes; /* object attributes */
1108 obj_handle_t handle; /* handle to the thread */
1112 /* Wait for handles */
1114 int flags; /* wait flags (see below) */
1115 client_ptr_t cookie; /* magic cookie to return to client */
1116 abstime_t timeout; /* timeout */
1117 data_size_t size; /* size of select_op */
1118 obj_handle_t prev_apc; /* handle to previous APC */
1119 VARARG(result,apc_result); /* result of previous APC */
1120 VARARG(data,select_op,size); /* operation-specific data */
1121 VARARG(context,context); /* suspend context */
1123 apc_call_t call; /* APC call arguments */
1124 obj_handle_t apc_handle; /* handle to next APC */
1125 VARARG(context,context); /* suspend context */
1127 #define SELECT_ALERTABLE 1
1128 #define SELECT_INTERRUPTIBLE 2
1131 /* Create an event */
1133 unsigned int access; /* wanted access rights */
1134 int manual_reset; /* manual reset event */
1135 int initial_state; /* initial state of the event */
1136 VARARG(objattr,object_attributes); /* object attributes */
1138 obj_handle_t handle; /* handle to the event */
1141 /* Event operation */
1143 obj_handle_t handle; /* handle to event */
1144 int op; /* event operation (see below) */
1146 int state; /* previous state */
1148 enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT };
1151 obj_handle_t handle; /* handle to event */
1153 int manual_reset; /* manual reset event */
1154 int state; /* current state of the event */
1159 unsigned int access; /* wanted access rights */
1160 unsigned int attributes; /* object attributes */
1161 obj_handle_t rootdir; /* root directory */
1162 VARARG(name,unicode_str); /* object name */
1164 obj_handle_t handle; /* handle to the event */
1168 /* Create a keyed event */
1169 @REQ(create_keyed_event)
1170 unsigned int access; /* wanted access rights */
1171 VARARG(objattr,object_attributes); /* object attributes */
1173 obj_handle_t handle; /* handle to the event */
1176 /* Open a keyed event */
1177 @REQ(open_keyed_event)
1178 unsigned int access; /* wanted access rights */
1179 unsigned int attributes; /* object attributes */
1180 obj_handle_t rootdir; /* root directory */
1181 VARARG(name,unicode_str); /* object name */
1183 obj_handle_t handle; /* handle to the event */
1187 /* Create a mutex */
1189 unsigned int access; /* wanted access rights */
1190 int owned; /* initially owned? */
1191 VARARG(objattr,object_attributes); /* object attributes */
1193 obj_handle_t handle; /* handle to the mutex */
1197 /* Release a mutex */
1199 obj_handle_t handle; /* handle to the mutex */
1201 unsigned int prev_count; /* value of internal counter, before release */
1207 unsigned int access; /* wanted access rights */
1208 unsigned int attributes; /* object attributes */
1209 obj_handle_t rootdir; /* root directory */
1210 VARARG(name,unicode_str); /* object name */
1212 obj_handle_t handle; /* handle to the mutex */
1218 obj_handle_t handle; /* handle to mutex */
1220 unsigned int count; /* current count of mutex */
1221 int owned; /* true if owned by current thread */
1222 int abandoned; /* true if abandoned */
1226 /* Create a semaphore */
1227 @REQ(create_semaphore)
1228 unsigned int access; /* wanted access rights */
1229 unsigned int initial; /* initial count */
1230 unsigned int max; /* maximum count */
1231 VARARG(objattr,object_attributes); /* object attributes */
1233 obj_handle_t handle; /* handle to the semaphore */
1237 /* Release a semaphore */
1238 @REQ(release_semaphore)
1239 obj_handle_t handle; /* handle to the semaphore */
1240 unsigned int count; /* count to add to semaphore */
1242 unsigned int prev_count; /* previous semaphore count */
1245 @REQ(query_semaphore)
1246 obj_handle_t handle; /* handle to the semaphore */
1248 unsigned int current; /* current count */
1249 unsigned int max; /* maximum count */
1252 /* Open a semaphore */
1253 @REQ(open_semaphore)
1254 unsigned int access; /* wanted access rights */
1255 unsigned int attributes; /* object attributes */
1256 obj_handle_t rootdir; /* root directory */
1257 VARARG(name,unicode_str); /* object name */
1259 obj_handle_t handle; /* handle to the semaphore */
1265 unsigned int access; /* wanted access rights */
1266 unsigned int sharing; /* sharing flags */
1267 int create; /* file create action */
1268 unsigned int options; /* file options */
1269 unsigned int attrs; /* file attributes for creation */
1270 VARARG(objattr,object_attributes); /* object attributes */
1271 VARARG(filename,string); /* file name */
1273 obj_handle_t handle; /* handle to the file */
1277 /* Open a file object */
1278 @REQ(open_file_object)
1279 unsigned int access; /* wanted access rights */
1280 unsigned int attributes; /* open attributes */
1281 obj_handle_t rootdir; /* root directory */
1282 unsigned int sharing; /* sharing flags */
1283 unsigned int options; /* file options */
1284 VARARG(filename,unicode_str); /* file name */
1286 obj_handle_t handle; /* handle to the file */
1290 /* Allocate a file handle for a Unix fd */
1291 @REQ(alloc_file_handle)
1292 unsigned int access; /* wanted access rights */
1293 unsigned int attributes; /* object attributes */
1294 int fd; /* file descriptor on the client side */
1296 obj_handle_t handle; /* handle to the file */
1300 /* Get the Unix name from a file handle */
1301 @REQ(get_handle_unix_name)
1302 obj_handle_t handle; /* file handle */
1304 data_size_t name_len; /* unix name length */
1305 VARARG(name,string); /* unix name */
1309 /* Get a Unix fd to access a file */
1311 obj_handle_t handle; /* handle to the file */
1313 int type; /* file type (see below) */
1314 int cacheable; /* can fd be cached in the client? */
1315 unsigned int access; /* file access rights */
1316 unsigned int options; /* file open options */
1320 FD_TYPE_INVALID, /* invalid file (no associated fd) */
1321 FD_TYPE_FILE, /* regular file */
1322 FD_TYPE_DIR, /* directory */
1323 FD_TYPE_SOCKET, /* socket */
1324 FD_TYPE_SERIAL, /* serial port */
1325 FD_TYPE_PIPE, /* named pipe */
1326 FD_TYPE_MAILSLOT, /* mailslot */
1327 FD_TYPE_CHAR, /* unspecified char device */
1328 FD_TYPE_DEVICE, /* Windows device file */
1333 /* Retrieve (or allocate) the client-side directory cache entry */
1334 @REQ(get_directory_cache_entry)
1335 obj_handle_t handle; /* handle to the directory */
1337 int entry; /* cache entry on the client side */
1338 VARARG(free,ints); /* entries that can be freed */
1342 /* Flush a file buffers */
1344 async_data_t async; /* async I/O parameters */
1346 obj_handle_t event; /* event set when finished */
1349 /* Query file information */
1351 obj_handle_t handle; /* handle to the file */
1352 unsigned int info_class; /* queried information class */
1354 VARARG(data,bytes); /* file info data */
1357 /* Query volume information */
1358 @REQ(get_volume_info)
1359 obj_handle_t handle; /* handle to the file */
1360 unsigned int info_class; /* queried information class */
1362 VARARG(data,bytes); /* volume info data */
1365 /* Lock a region of a file */
1367 obj_handle_t handle; /* handle to the file */
1368 file_pos_t offset; /* offset of start of lock */
1369 file_pos_t count; /* count of bytes to lock */
1370 int shared; /* shared or exclusive lock? */
1371 int wait; /* do we want to wait? */
1373 obj_handle_t handle; /* handle to wait on */
1374 int overlapped; /* is it an overlapped I/O handle? */
1378 /* Unlock a region of a file */
1380 obj_handle_t handle; /* handle to the file */
1381 file_pos_t offset; /* offset of start of unlock */
1382 file_pos_t count; /* count of bytes to unlock */
1386 /* Set socket event parameters */
1387 @REQ(set_socket_event)
1388 obj_handle_t handle; /* handle to the socket */
1389 unsigned int mask; /* event mask */
1390 obj_handle_t event; /* event object */
1391 user_handle_t window; /* window to send the message to */
1392 unsigned int msg; /* message to send */
1396 /* Get socket event parameters */
1397 @REQ(get_socket_event)
1398 obj_handle_t handle; /* handle to the socket */
1399 int service; /* clear pending? */
1400 obj_handle_t c_event; /* event to clear */
1402 unsigned int mask; /* event mask */
1403 unsigned int pmask; /* pending events */
1404 unsigned int state; /* status bits */
1405 VARARG(errors,ints); /* event errors */
1409 /* Get socket info */
1410 @REQ(get_socket_info)
1411 obj_handle_t handle; /* handle to the socket */
1413 int family; /* family, see socket manpage */
1414 int type; /* type, see socket manpage */
1415 int protocol; /* protocol, see socket manpage */
1419 /* Re-enable pending socket events */
1420 @REQ(enable_socket_event)
1421 obj_handle_t handle; /* handle to the socket */
1422 unsigned int mask; /* events to re-enable */
1423 unsigned int sstate; /* status bits to set */
1424 unsigned int cstate; /* status bits to clear */
1427 @REQ(set_socket_deferred)
1428 obj_handle_t handle; /* handle to the socket */
1429 obj_handle_t deferred; /* handle to the socket for which accept() is deferred */
1432 /* Allocate a console (only used by a console renderer) */
1434 unsigned int access; /* wanted access rights */
1435 unsigned int attributes; /* object attributes */
1436 process_id_t pid; /* pid of process which shall be attached to the console */
1438 obj_handle_t handle_in; /* handle to console input */
1442 /* Free the console of the current process */
1447 /* Get the input queue wait event */
1448 @REQ(get_console_wait_event)
1449 obj_handle_t handle; /* handle to the console */
1455 /* appends a string to console's history
*/
1456 @
REQ(append_console_input_history
)
1457 obj_handle_t handle
; /* handle to console input
, or
0 for process
' console */
1458 VARARG(line,unicode_str); /* line to add */
1462 /* appends a string to console's history
*/
1463 @
REQ(get_console_input_history
)
1464 obj_handle_t handle
; /* handle to console input
, or
0 for process
' console */
1465 int index; /* index to get line from */
1467 int total; /* total length of line in Unicode chars */
1468 VARARG(line,unicode_str); /* line to add */
1472 /* creates a new screen buffer on process' console
*/
1473 @
REQ(create_console_output
)
1474 obj_handle_t handle_in
; /* handle to console input
, or
0 for process
' console */
1475 unsigned int access; /* wanted access rights */
1476 unsigned int attributes; /* object attributes */
1477 unsigned int share; /* sharing credentials */
1479 obj_handle_t handle_out; /* handle to the screen buffer */
1483 /* Retrieve the next pending console ioctl request */
1484 @REQ(get_next_console_request)
1485 obj_handle_t handle; /* console server handle */
1486 int signal; /* server signal state */
1487 int read; /* 1 if reporting result of blocked read ioctl */
1488 unsigned int status; /* status of previous ioctl */
1489 VARARG(out_data,bytes); /* out_data of previous ioctl */
1491 unsigned int code; /* ioctl code */
1492 unsigned int output; /* output id or 0 for input */
1493 data_size_t out_size; /* ioctl output size */
1494 VARARG(in_data,bytes); /* ioctl in_data */
1498 /* enable directory change notifications */
1499 @REQ(read_directory_changes)
1500 unsigned int filter; /* notification filter */
1501 int subtree; /* watch the subtree? */
1502 int want_data; /* flag indicating whether change data should be collected */
1503 async_data_t async; /* async I/O parameters */
1508 obj_handle_t handle;
1510 VARARG(events,filesystem_event); /* collected filesystem events */
1514 /* Create a file mapping */
1515 @REQ(create_mapping)
1516 unsigned int access; /* wanted access rights */
1517 unsigned int flags; /* SEC_* flags */
1518 unsigned int file_access; /* file access rights */
1519 mem_size_t size; /* mapping size */
1520 obj_handle_t file_handle; /* file handle */
1521 VARARG(objattr,object_attributes); /* object attributes */
1523 obj_handle_t handle; /* handle to the mapping */
1527 /* Open a mapping */
1529 unsigned int access; /* wanted access rights */
1530 unsigned int attributes; /* object attributes */
1531 obj_handle_t rootdir; /* root directory */
1532 VARARG(name,unicode_str); /* object name */
1534 obj_handle_t handle; /* handle to the mapping */
1538 /* Get information about a file mapping */
1539 @REQ(get_mapping_info)
1540 obj_handle_t handle; /* handle to the mapping */
1541 unsigned int access; /* wanted access rights */
1543 mem_size_t size; /* mapping size */
1544 unsigned int flags; /* SEC_* flags */
1545 obj_handle_t shared_file; /* shared mapping file handle */
1546 VARARG(image,pe_image_info);/* image info for SEC_IMAGE mappings */
1550 /* Add a memory view in the current process */
1552 obj_handle_t mapping; /* file mapping handle */
1553 unsigned int access; /* wanted access rights */
1554 client_ptr_t base; /* view base address (page-aligned) */
1555 mem_size_t size; /* view size */
1556 file_pos_t start; /* start offset in mapping */
1560 /* Unmap a memory view from the current process */
1562 client_ptr_t base; /* view base address */
1566 /* Get a range of committed pages in a file mapping */
1567 @REQ(get_mapping_committed_range)
1568 client_ptr_t base; /* view base address */
1569 file_pos_t offset; /* starting offset (page-aligned, in bytes) */
1571 mem_size_t size; /* size of range starting at offset (page-aligned, in bytes) */
1572 int committed; /* whether it is a committed range */
1576 /* Add a range to the committed pages in a file mapping */
1577 @REQ(add_mapping_committed_range)
1578 client_ptr_t base; /* view base address */
1579 file_pos_t offset; /* starting offset (page-aligned, in bytes) */
1580 mem_size_t size; /* size to set (page-aligned, in bytes) or 0 if only retrieving */
1584 /* Check if two memory maps are for the same file */
1585 @REQ(is_same_mapping)
1586 client_ptr_t base1; /* first view base address */
1587 client_ptr_t base2; /* second view base address */
1593 timeout_t start_time;
1596 int current_priority;
1602 timeout_t start_time;
1603 data_size_t name_len;
1607 process_id_t parent_pid;
1611 /* VARARG(name,unicode_str,name_len); */
1612 /* VARARG(threads,struct thread_info,thread_count); */
1615 /* Get a list of processes and threads currently running */
1616 @REQ(list_processes)
1618 data_size_t info_size;
1620 VARARG(data,process_info,info_size);
1624 /* Wait for a debug event */
1625 @REQ(wait_debug_event)
1626 int get_handle; /* should we alloc a handle for waiting? */
1628 process_id_t pid; /* process id */
1629 thread_id_t tid; /* thread id */
1630 obj_handle_t wait; /* wait handle if no event ready */
1631 VARARG(event,debug_event); /* debug event data */
1635 /* Queue an exception event */
1636 @REQ(queue_exception_event)
1637 int first; /* first chance exception? */
1638 unsigned int code; /* exception code */
1639 unsigned int flags; /* exception flags */
1640 client_ptr_t record; /* exception record */
1641 client_ptr_t address; /* exception address */
1642 data_size_t len; /* size of parameters */
1643 VARARG(params,uints64,len);/* exception parameters */
1645 obj_handle_t handle; /* handle to the queued event */
1649 /* Retrieve the status of an exception event */
1650 @REQ(get_exception_status)
1651 obj_handle_t handle; /* handle to the queued event */
1655 /* Continue a debug event */
1656 @REQ(continue_debug_event)
1657 process_id_t pid; /* process id to continue */
1658 thread_id_t tid; /* thread id to continue */
1659 int status; /* continuation status */
1663 /* Start/stop debugging an existing process */
1665 process_id_t pid; /* id of the process to debug */
1666 int attach; /* 1=attaching / 0=detaching from the process */
1670 /* Set debugger kill on exit flag */
1671 @REQ(set_debugger_kill_on_exit)
1672 int kill_on_exit; /* 0=detach/1=kill debuggee when debugger dies */
1676 /* Read data from a process address space */
1677 @REQ(read_process_memory)
1678 obj_handle_t handle; /* process handle */
1679 client_ptr_t addr; /* addr to read from */
1681 VARARG(data,bytes); /* result data */
1685 /* Write data to a process address space */
1686 @REQ(write_process_memory)
1687 obj_handle_t handle; /* process handle */
1688 client_ptr_t addr; /* addr to write to */
1689 VARARG(data,bytes); /* data to write */
1693 /* Create a registry key */
1695 unsigned int access; /* desired access rights */
1696 unsigned int options; /* creation options */
1697 VARARG(objattr,object_attributes); /* object attributes */
1698 VARARG(class,unicode_str); /* class name */
1700 obj_handle_t hkey; /* handle to the created key */
1701 int created; /* has it been newly created? */
1704 /* Open a registry key */
1706 obj_handle_t parent; /* handle to the parent key */
1707 unsigned int access; /* desired access rights */
1708 unsigned int attributes; /* object attributes */
1709 VARARG(name,unicode_str); /* key name */
1711 obj_handle_t hkey; /* handle to the open key */
1715 /* Delete a registry key */
1717 obj_handle_t hkey; /* handle to the key */
1721 /* Flush a registry key */
1723 obj_handle_t hkey; /* handle to the key */
1727 /* Enumerate registry subkeys */
1729 obj_handle_t hkey; /* handle to registry key */
1730 int index; /* index of subkey (or -1 for current key) */
1731 int info_class; /* requested information class */
1733 int subkeys; /* number of subkeys */
1734 int max_subkey; /* longest subkey name */
1735 int max_class; /* longest class name */
1736 int values; /* number of values */
1737 int max_value; /* longest value name */
1738 int max_data; /* longest value data */
1739 timeout_t modif; /* last modification time */
1740 data_size_t total; /* total length needed for full name and class */
1741 data_size_t namelen; /* length of key name in bytes */
1742 VARARG(name,unicode_str,namelen); /* key name */
1743 VARARG(class,unicode_str); /* class name */
1747 /* Set a value of a registry key */
1749 obj_handle_t hkey; /* handle to registry key */
1750 int type; /* value type */
1751 data_size_t namelen; /* length of value name in bytes */
1752 VARARG(name,unicode_str,namelen); /* value name */
1753 VARARG(data,bytes); /* value data */
1757 /* Retrieve the value of a registry key */
1759 obj_handle_t hkey; /* handle to registry key */
1760 VARARG(name,unicode_str); /* value name */
1762 int type; /* value type */
1763 data_size_t total; /* total length needed for data */
1764 VARARG(data,bytes); /* value data */
1768 /* Enumerate a value of a registry key */
1769 @REQ(enum_key_value)
1770 obj_handle_t hkey; /* handle to registry key */
1771 int index; /* value index */
1772 int info_class; /* requested information class */
1774 int type; /* value type */
1775 data_size_t total; /* total length needed for full name and data */
1776 data_size_t namelen; /* length of value name in bytes */
1777 VARARG(name,unicode_str,namelen); /* value name */
1778 VARARG(data,bytes); /* value data */
1782 /* Delete a value of a registry key */
1783 @REQ(delete_key_value)
1784 obj_handle_t hkey; /* handle to registry key */
1785 VARARG(name,unicode_str); /* value name */
1789 /* Load a registry branch from a file */
1791 obj_handle_t file; /* file to load from */
1792 VARARG(objattr,object_attributes); /* object attributes */
1796 /* UnLoad a registry branch from a file */
1797 @REQ(unload_registry)
1798 obj_handle_t hkey; /* root key to unload to */
1802 /* Save a registry branch to a file */
1804 obj_handle_t hkey; /* key to save */
1805 obj_handle_t file; /* file to save to */
1809 /* Add a registry key change notification */
1810 @REQ(set_registry_notification)
1811 obj_handle_t hkey; /* key to watch for changes */
1812 obj_handle_t event; /* event to set */
1813 int subtree; /* should we watch the whole subtree? */
1814 unsigned int filter; /* things to watch */
1818 /* Create a waitable timer */
1820 unsigned int access; /* wanted access rights */
1821 int manual; /* manual reset */
1822 VARARG(objattr,object_attributes); /* object attributes */
1824 obj_handle_t handle; /* handle to the timer */
1828 /* Open a waitable timer */
1830 unsigned int access; /* wanted access rights */
1831 unsigned int attributes; /* object attributes */
1832 obj_handle_t rootdir; /* root directory */
1833 VARARG(name,unicode_str); /* object name */
1835 obj_handle_t handle; /* handle to the timer */
1838 /* Set a waitable timer */
1840 obj_handle_t handle; /* handle to the timer */
1841 timeout_t expire; /* next expiration absolute time */
1842 client_ptr_t callback; /* callback function */
1843 client_ptr_t arg; /* callback argument */
1844 int period; /* timer period in ms */
1846 int signaled; /* was the timer signaled before this call ? */
1849 /* Cancel a waitable timer */
1851 obj_handle_t handle; /* handle to the timer */
1853 int signaled; /* was the timer signaled before this calltime ? */
1856 /* Get information on a waitable timer */
1857 @REQ(get_timer_info)
1858 obj_handle_t handle; /* handle to the timer */
1860 timeout_t when; /* absolute time when the timer next expires */
1861 int signaled; /* is the timer signaled? */
1865 /* Retrieve the current context of a thread */
1866 @REQ(get_thread_context)
1867 obj_handle_t handle; /* thread or context handle */
1868 unsigned int flags; /* context flags */
1870 int self; /* was it a handle to the current thread? */
1871 obj_handle_t handle; /* pending context handle */
1872 VARARG(context,context); /* thread context */
1876 /* Set the current context of a thread */
1877 @REQ(set_thread_context)
1878 obj_handle_t handle; /* thread handle */
1879 VARARG(context,context); /* thread context */
1881 int self; /* was it a handle to the current thread? */
1885 /* Fetch a selector entry for a thread */
1886 @REQ(get_selector_entry)
1887 obj_handle_t handle; /* thread handle */
1888 int entry; /* LDT entry */
1890 unsigned int base; /* selector base */
1891 unsigned int limit; /* selector limit */
1892 unsigned char flags; /* selector flags */
1898 obj_handle_t table; /* which table to add atom to */
1899 VARARG(name,unicode_str); /* atom name */
1901 atom_t atom; /* resulting atom */
1905 /* Delete an atom */
1907 obj_handle_t table; /* which table to delete atom from */
1908 atom_t atom; /* atom handle */
1914 obj_handle_t table; /* which table to find atom from */
1915 VARARG(name,unicode_str); /* atom name */
1917 atom_t atom; /* atom handle */
1921 /* Get information about an atom */
1922 @REQ(get_atom_information)
1923 obj_handle_t table; /* which table to find atom from */
1924 atom_t atom; /* atom handle */
1926 int count; /* atom lock count */
1927 int pinned; /* whether the atom has been pinned */
1928 data_size_t total; /* actual length of atom name */
1929 VARARG(name,unicode_str); /* atom name */
1933 /* Set information about an atom */
1934 @REQ(set_atom_information)
1935 obj_handle_t table; /* which table to find atom from */
1936 atom_t atom; /* atom handle */
1937 int pinned; /* whether to bump atom information */
1941 /* Empty an atom table */
1942 @REQ(empty_atom_table)
1943 obj_handle_t table; /* which table to find atom from */
1944 int if_pinned; /* whether to delete pinned atoms */
1948 /* Init an atom table */
1949 @REQ(init_atom_table)
1950 int entries; /* number of entries (only for local) */
1952 obj_handle_t table; /* handle to the atom table */
1956 /* Get the message queue of the current thread */
1959 obj_handle_t handle; /* handle to the queue */
1963 /* Set the file descriptor associated to the current thread queue */
1965 obj_handle_t handle; /* handle to the file descriptor */
1969 /* Set the current message queue wakeup mask */
1970 @REQ(set_queue_mask)
1971 unsigned int wake_mask; /* wakeup bits mask */
1972 unsigned int changed_mask; /* changed bits mask */
1973 int skip_wait; /* will we skip waiting if signaled? */
1975 unsigned int wake_bits; /* current wake bits */
1976 unsigned int changed_bits; /* current changed bits */
1980 /* Get the current message queue status */
1981 @REQ(get_queue_status)
1982 unsigned int clear_bits; /* should we clear the change bits? */
1984 unsigned int wake_bits; /* wake bits */
1985 unsigned int changed_bits; /* changed bits since last time */
1989 /* Retrieve the process idle event */
1990 @REQ(get_process_idle_event)
1991 obj_handle_t handle; /* process handle */
1993 obj_handle_t event; /* handle to idle event */
1997 /* Send a message to a thread queue */
1999 thread_id_t id; /* thread id */
2000 int type; /* message type (see below) */
2001 int flags; /* message flags (see below) */
2002 user_handle_t win; /* window handle */
2003 unsigned int msg; /* message code */
2004 lparam_t wparam; /* parameters */
2005 lparam_t lparam; /* parameters */
2006 timeout_t timeout; /* timeout for reply */
2007 VARARG(data,message_data); /* message data for sent messages */
2010 @REQ(post_quit_message)
2011 int exit_code; /* exit code to return */
2016 MSG_ASCII, /* Ascii message (from SendMessageA) */
2017 MSG_UNICODE, /* Unicode message (from SendMessageW) */
2018 MSG_NOTIFY, /* notify message (from SendNotifyMessageW), always Unicode */
2019 MSG_CALLBACK, /* callback message (from SendMessageCallbackW), always Unicode */
2020 MSG_CALLBACK_RESULT,/* result of a callback message */
2021 MSG_OTHER_PROCESS, /* sent from other process, may include vararg data, always Unicode */
2022 MSG_POSTED, /* posted message (from PostMessageW), always Unicode */
2023 MSG_HARDWARE, /* hardware message */
2024 MSG_WINEVENT, /* winevent message */
2025 MSG_HOOK_LL /* low-level hardware hook */
2027 #define SEND_MSG_ABORT_IF_HUNG 0x01
2030 /* Send a hardware message to a thread queue */
2031 @REQ(send_hardware_message)
2032 user_handle_t win; /* window handle */
2033 hw_input_t input; /* input data */
2034 unsigned int flags; /* flags (see below) */
2036 int wait; /* do we need to wait for a reply? */
2037 int prev_x; /* previous cursor position */
2039 int new_x; /* new cursor position */
2041 VARARG(keystate,bytes); /* global state array for all the keys */
2043 #define SEND_HWMSG_INJECTED 0x01
2046 /* Get a message from the current queue */
2048 unsigned int flags; /* PM_* flags */
2049 user_handle_t get_win; /* window handle to get */
2050 unsigned int get_first; /* first message code to get */
2051 unsigned int get_last; /* last message code to get */
2052 unsigned int hw_id; /* id of the previous hardware message (or 0) */
2053 unsigned int wake_mask; /* wakeup bits mask */
2054 unsigned int changed_mask; /* changed bits mask */
2056 user_handle_t win; /* window handle */
2057 unsigned int msg; /* message code */
2058 lparam_t wparam; /* parameters */
2059 lparam_t lparam; /* parameters */
2060 int type; /* message type */
2061 int x; /* message x position */
2062 int y; /* message y position */
2063 unsigned int time; /* message time */
2064 unsigned int active_hooks; /* active hooks bitmap */
2065 data_size_t total; /* total size of extra data */
2066 VARARG(data,message_data); /* message data for sent messages */
2070 /* Reply to a sent message */
2072 int remove; /* should we remove the message? */
2073 lparam_t result; /* message result */
2074 VARARG(data,bytes); /* message data for sent messages */
2078 /* Accept and remove the current hardware message */
2079 @REQ(accept_hardware_message)
2080 unsigned int hw_id; /* id of the hardware message */
2084 /* Retrieve the reply for the last message sent */
2085 @REQ(get_message_reply)
2086 int cancel; /* cancel message if not ready? */
2088 lparam_t result; /* message result */
2089 VARARG(data,bytes); /* message data for sent messages */
2093 /* Set a window timer */
2095 user_handle_t win; /* window handle */
2096 unsigned int msg; /* message to post */
2097 unsigned int rate; /* timer rate in ms */
2098 lparam_t id; /* timer id */
2099 lparam_t lparam; /* message lparam (callback proc) */
2101 lparam_t id; /* timer id */
2105 /* Kill a window timer */
2106 @REQ(kill_win_timer)
2107 user_handle_t win; /* window handle */
2108 lparam_t id; /* timer id */
2109 unsigned int msg; /* message to post */
2113 /* check if the thread owning the window is hung */
2114 @REQ(is_window_hung)
2115 user_handle_t win; /* window handle */
2121 /* Retrieve info about a serial port */
2122 @REQ(get_serial_info)
2123 obj_handle_t handle; /* handle to comm port */
2126 unsigned int eventmask;
2127 unsigned int cookie;
2128 unsigned int pending_write;
2132 /* Set info about a serial port */
2133 @REQ(set_serial_info)
2134 obj_handle_t handle; /* handle to comm port */
2135 int flags; /* bitmask to set values (see below) */
2137 #define SERIALINFO_PENDING_WRITE 0x04
2138 #define SERIALINFO_PENDING_WAIT 0x08
2141 /* Create an async I/O */
2142 @REQ(register_async)
2143 int type; /* type of queue to look after */
2144 async_data_t async; /* async I/O parameters */
2145 int count; /* count - usually # of bytes to be read/written */
2147 #define ASYNC_TYPE_READ 0x01
2148 #define ASYNC_TYPE_WRITE 0x02
2149 #define ASYNC_TYPE_WAIT 0x03
2152 /* Cancel all async op on a fd */
2154 obj_handle_t handle; /* handle to comm port, socket or file */
2155 client_ptr_t iosb; /* I/O status block (NULL=all) */
2156 int only_thread; /* cancel matching this thread */
2160 /* Retrieve results of an async */
2161 @REQ(get_async_result)
2162 client_ptr_t user_arg; /* user arg used to identify async */
2164 data_size_t size; /* result size (input or output depending on the operation) */
2165 VARARG(out_data,bytes); /* iosb output data */
2169 /* Perform a read on a file object */
2171 async_data_t async; /* async I/O parameters */
2172 file_pos_t pos; /* read position */
2174 obj_handle_t wait; /* handle to wait on for blocking read */
2175 unsigned int options; /* device open options */
2176 VARARG(data,bytes); /* read data */
2180 /* Perform a write on a file object */
2182 async_data_t async; /* async I/O parameters */
2183 file_pos_t pos; /* write position */
2184 VARARG(data,bytes); /* write data */
2186 obj_handle_t wait; /* handle to wait on for blocking write */
2187 unsigned int options; /* device open options */
2188 data_size_t size; /* size written */
2192 /* Perform an ioctl on a file */
2194 ioctl_code_t code; /* ioctl code */
2195 async_data_t async; /* async I/O parameters */
2196 VARARG(in_data,bytes); /* ioctl input data */
2198 obj_handle_t wait; /* handle to wait on for blocking ioctl */
2199 unsigned int options; /* device open options */
2200 VARARG(out_data,bytes); /* ioctl output data */
2204 /* Store results of an async irp */
2205 @REQ(set_irp_result)
2206 obj_handle_t handle; /* handle to the irp */
2207 unsigned int status; /* status of the irp */
2208 data_size_t size; /* result size (input or output depending on the operation) */
2209 VARARG(data,bytes); /* output data of the irp */
2213 /* Create a named pipe */
2214 @REQ(create_named_pipe)
2215 unsigned int access;
2216 unsigned int options;
2217 unsigned int sharing;
2218 unsigned int maxinstances;
2219 unsigned int outsize;
2220 unsigned int insize;
2223 VARARG(objattr,object_attributes); /* object attributes */
2225 obj_handle_t handle; /* handle to the pipe */
2228 /* flags in create_named_pipe and get_named_pipe_info */
2229 #define NAMED_PIPE_MESSAGE_STREAM_WRITE 0x0001
2230 #define NAMED_PIPE_MESSAGE_STREAM_READ 0x0002
2231 #define NAMED_PIPE_NONBLOCKING_MODE 0x0004
2232 #define NAMED_PIPE_SERVER_END 0x8000
2234 /* Set named pipe information by handle */
2235 @REQ(set_named_pipe_info)
2236 obj_handle_t handle;
2240 /* Create a window */
2242 user_handle_t parent; /* parent window */
2243 user_handle_t owner; /* owner window */
2244 atom_t atom; /* class atom */
2245 mod_handle_t instance; /* module instance */
2246 int dpi; /* system DPI */
2247 int awareness; /* thread DPI awareness */
2248 VARARG(class,unicode_str); /* class name */
2250 user_handle_t handle; /* created window */
2251 user_handle_t parent; /* full handle of parent */
2252 user_handle_t owner; /* full handle of owner */
2253 int extra; /* number of extra bytes */
2254 client_ptr_t class_ptr; /* pointer to class in client address space */
2255 int dpi; /* window DPI if not per-monitor aware */
2256 int awareness; /* window DPI awareness */
2260 /* Destroy a window */
2261 @REQ(destroy_window)
2262 user_handle_t handle; /* handle to the window */
2266 /* Retrieve the desktop window for the current thread */
2267 @REQ(get_desktop_window)
2268 int force; /* force creation if it doesn't exist
*/
2270 user_handle_t top_window
; /* handle to the desktop window
*/
2271 user_handle_t msg_window
; /* handle to the top
-level HWND_MESSAGE parent
*/
2275 /* Set a window owner
*/
2276 @
REQ(set_window_owner
)
2277 user_handle_t handle
; /* handle to the window
*/
2278 user_handle_t owner
; /* new owner
*/
2280 user_handle_t full_owner
; /* full handle of new owner
*/
2281 user_handle_t prev_owner
; /* full handle of previous owner
*/
2285 /* Get information from a window handle
*/
2286 @
REQ(get_window_info
)
2287 user_handle_t handle
; /* handle to the window
*/
2289 user_handle_t full_handle
; /* full
32-bit handle
*/
2290 user_handle_t last_active
; /* last active popup
*/
2291 process_id_t pid
; /* process owning the window
*/
2292 thread_id_t tid
; /* thread owning the window
*/
2293 atom_t atom
; /* class atom
*/
2294 int is_unicode
; /* ANSI or unicode
*/
2295 int dpi
; /* window DPI
*/
2296 int awareness
; /* DPI awareness
*/
2300 /* Set some information in a window
*/
2301 @
REQ(set_window_info
)
2302 unsigned short flags
; /* flags for fields to
set (see below
) */
2303 short int is_unicode
; /* ANSI or unicode
*/
2304 user_handle_t handle
; /* handle to the window
*/
2305 unsigned int style
; /* window style
*/
2306 unsigned int ex_style
; /* window extended style
*/
2307 unsigned int id
; /* window id
*/
2308 mod_handle_t instance
; /* creator instance
*/
2309 lparam_t user_data
; /* user
-specific data
*/
2310 int extra_offset
; /* offset to set in extra bytes
*/
2311 data_size_t extra_size
; /* size to set in extra bytes
*/
2312 lparam_t extra_value
; /* value to set in extra bytes
*/
2314 unsigned int old_style
; /* old window style
*/
2315 unsigned int old_ex_style
; /* old window extended style
*/
2316 mod_handle_t old_instance
; /* old creator instance
*/
2317 lparam_t old_user_data
; /* old user
-specific data
*/
2318 lparam_t old_extra_value
; /* old value in extra bytes
*/
2319 unsigned int old_id
; /* old window id
*/
2321 #define SET_WIN_STYLE
0x01
2322 #define SET_WIN_EXSTYLE
0x02
2323 #define SET_WIN_ID
0x04
2324 #define SET_WIN_INSTANCE
0x08
2325 #define SET_WIN_USERDATA
0x10
2326 #define SET_WIN_EXTRA
0x20
2327 #define SET_WIN_UNICODE
0x40
2330 /* Set the parent of a window
*/
2332 user_handle_t handle
; /* handle to the window
*/
2333 user_handle_t parent
; /* handle to the parent
*/
2335 user_handle_t old_parent
; /* old parent window
*/
2336 user_handle_t full_parent
; /* full handle of new parent
*/
2337 int dpi
; /* new window DPI if not per
-monitor aware
*/
2338 int awareness
; /* new DPI awareness
*/
2342 /* Get a list of the window parents
, up to the root of the tree
*/
2343 @
REQ(get_window_parents
)
2344 user_handle_t handle
; /* handle to the window
*/
2346 int count
; /* total count of parents
*/
2347 VARARG(parents
,user_handles
); /* parent handles
*/
2351 /* Get a list of the window children
*/
2352 @
REQ(get_window_children
)
2353 obj_handle_t desktop
; /* handle to desktop
*/
2354 user_handle_t parent
; /* parent window
*/
2355 atom_t atom
; /* class atom for the listed children
*/
2356 thread_id_t tid
; /* thread owning the listed children
*/
2357 VARARG(class
,unicode_str
); /* class name
*/
2359 int count
; /* total count of children
*/
2360 VARARG(children
,user_handles
); /* children handles
*/
2364 /* Get a list of the window children that contain a given point
*/
2365 @
REQ(get_window_children_from_point
)
2366 user_handle_t parent
; /* parent window
*/
2367 int x
; /* point in parent coordinates
*/
2369 int dpi
; /* dpi for the point coordinates
*/
2371 int count
; /* total count of children
*/
2372 VARARG(children
,user_handles
); /* children handles
*/
2376 /* Get window tree information from a window handle
*/
2377 @
REQ(get_window_tree
)
2378 user_handle_t handle
; /* handle to the window
*/
2380 user_handle_t parent
; /* parent window
*/
2381 user_handle_t owner
; /* owner window
*/
2382 user_handle_t next_sibling
; /* next sibling in Z
-order
*/
2383 user_handle_t prev_sibling
; /* prev sibling in Z
-order
*/
2384 user_handle_t first_sibling
; /* first sibling in Z
-order
*/
2385 user_handle_t last_sibling
; /* last sibling in Z
-order
*/
2386 user_handle_t first_child
; /* first child
*/
2387 user_handle_t last_child
; /* last child
*/
2390 /* Set the position and Z order of a window
*/
2391 @
REQ(set_window_pos
)
2392 unsigned short swp_flags
; /* SWP_
* flags
*/
2393 unsigned short paint_flags
; /* paint
flags (see below
) */
2394 user_handle_t handle
; /* handle to the window
*/
2395 user_handle_t previous
; /* previous window in Z order
*/
2396 rectangle_t window
; /* window
rectangle (in parent coords
) */
2397 rectangle_t client
; /* client
rectangle (in parent coords
) */
2398 VARARG(valid
,rectangles
); /* valid rectangles from
WM_NCCALCSIZE (in parent coords
) */
2400 unsigned int new_style
; /* new window style
*/
2401 unsigned int new_ex_style
; /* new window extended style
*/
2402 user_handle_t surface_win
; /* parent window that holds the surface
*/
2403 int needs_update
; /* whether the surface region needs an update
*/
2405 #define SET_WINPOS_PAINT_SURFACE
0x01 /* window has a paintable surface
*/
2406 #define SET_WINPOS_PIXEL_FORMAT
0x02 /* window has a custom pixel format
*/
2408 /* Get the window and client rectangles of a window
*/
2409 @
REQ(get_window_rectangles
)
2410 user_handle_t handle
; /* handle to the window
*/
2411 int relative
; /* coords relative
to (see below
) */
2412 int dpi
; /* DPI to map to
, or zero for per
-monitor DPI
*/
2414 rectangle_t window
; /* window rectangle
*/
2415 rectangle_t client
; /* client rectangle
*/
2417 enum coords_relative
2419 COORDS_CLIENT
, /* relative to client area
*/
2420 COORDS_WINDOW
, /* relative to whole window area
*/
2421 COORDS_PARENT
, /* relative to parent
's client area */
2422 COORDS_SCREEN /* relative to screen origin */
2426 /* Get the window text */
2427 @REQ(get_window_text)
2428 user_handle_t handle; /* handle to the window */
2430 data_size_t length; /* total length in WCHARs */
2431 VARARG(text,unicode_str); /* window text */
2435 /* Set the window text */
2436 @REQ(set_window_text)
2437 user_handle_t handle; /* handle to the window */
2438 VARARG(text,unicode_str); /* window text */
2442 /* Get the coordinates offset between two windows */
2443 @REQ(get_windows_offset)
2444 user_handle_t from; /* handle to the first window */
2445 user_handle_t to; /* handle to the second window */
2446 int dpi; /* DPI to map to, or zero for per-monitor DPI */
2448 int x; /* x coordinate offset */
2449 int y; /* y coordinate offset */
2450 int mirror; /* whether to mirror the x coordinate */
2454 /* Get the visible region of a window */
2455 @REQ(get_visible_region)
2456 user_handle_t window; /* handle to the window */
2457 unsigned int flags; /* DCX flags */
2459 user_handle_t top_win; /* top window to clip against */
2460 rectangle_t top_rect; /* top window visible rect with screen coords */
2461 rectangle_t win_rect; /* window rect in screen coords */
2462 unsigned int paint_flags; /* paint flags (from SET_WINPOS_* flags) */
2463 data_size_t total_size; /* total size of the resulting region */
2464 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2468 /* Get the visible surface region of a window */
2469 @REQ(get_surface_region)
2470 user_handle_t window; /* handle to the window */
2472 rectangle_t visible_rect; /* window visible rect in screen coords */
2473 data_size_t total_size; /* total size of the resulting region */
2474 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2478 /* Get the window region */
2479 @REQ(get_window_region)
2480 user_handle_t window; /* handle to the window */
2482 data_size_t total_size; /* total size of the resulting region */
2483 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2487 /* Set the window region */
2488 @REQ(set_window_region)
2489 user_handle_t window; /* handle to the window */
2490 int redraw; /* redraw the window? */
2491 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2495 /* Get the window update region */
2496 @REQ(get_update_region)
2497 user_handle_t window; /* handle to the window */
2498 user_handle_t from_child; /* child to start searching from */
2499 unsigned int flags; /* update flags (see below) */
2501 user_handle_t child; /* child to repaint (or window itself) */
2502 unsigned int flags; /* resulting update flags (see below) */
2503 data_size_t total_size; /* total size of the resulting region */
2504 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2506 #define UPDATE_NONCLIENT 0x001 /* get region for repainting non-client area */
2507 #define UPDATE_ERASE 0x002 /* get region for erasing client area */
2508 #define UPDATE_PAINT 0x004 /* get region for painting client area */
2509 #define UPDATE_INTERNALPAINT 0x008 /* get region if internal paint is pending */
2510 #define UPDATE_ALLCHILDREN 0x010 /* force repaint of all children */
2511 #define UPDATE_NOCHILDREN 0x020 /* don't try to repaint any children
*/
2512 #define UPDATE_NOREGION
0x040 /* don
't return a region, only the flags */
2513 #define UPDATE_DELAYED_ERASE 0x080 /* still needs erase after BeginPaint */
2514 #define UPDATE_CLIPCHILDREN 0x100 /* remove clipped children from the update region */
2517 /* Update the z order of a window so that a given rectangle is fully visible */
2518 @REQ(update_window_zorder)
2519 user_handle_t window; /* handle to the window */
2520 rectangle_t rect; /* rectangle that must be visible (in client coords) */
2524 /* Mark parts of a window as needing a redraw */
2526 user_handle_t window; /* handle to the window */
2527 unsigned int flags; /* RDW_* flags */
2528 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2532 /* Set a window property */
2533 @REQ(set_window_property)
2534 user_handle_t window; /* handle to the window */
2535 lparam_t data; /* data to store */
2536 atom_t atom; /* property atom (if no name specified) */
2537 VARARG(name,unicode_str); /* property name */
2541 /* Remove a window property */
2542 @REQ(remove_window_property)
2543 user_handle_t window; /* handle to the window */
2544 atom_t atom; /* property atom (if no name specified) */
2545 VARARG(name,unicode_str); /* property name */
2547 lparam_t data; /* data stored in property */
2551 /* Get a window property */
2552 @REQ(get_window_property)
2553 user_handle_t window; /* handle to the window */
2554 atom_t atom; /* property atom (if no name specified) */
2555 VARARG(name,unicode_str); /* property name */
2557 lparam_t data; /* data stored in property */
2561 /* Get the list of properties of a window */
2562 @REQ(get_window_properties)
2563 user_handle_t window; /* handle to the window */
2565 int total; /* total number of properties */
2566 VARARG(props,properties); /* list of properties */
2570 /* Create a window station */
2571 @REQ(create_winstation)
2572 unsigned int flags; /* window station flags */
2573 unsigned int access; /* wanted access rights */
2574 unsigned int attributes; /* object attributes */
2575 obj_handle_t rootdir; /* root directory */
2576 VARARG(name,unicode_str); /* object name */
2578 obj_handle_t handle; /* handle to the window station */
2582 /* Open a handle to a window station */
2583 @REQ(open_winstation)
2584 unsigned int access; /* wanted access rights */
2585 unsigned int attributes; /* object attributes */
2586 obj_handle_t rootdir; /* root directory */
2587 VARARG(name,unicode_str); /* object name */
2589 obj_handle_t handle; /* handle to the window station */
2593 /* Close a window station */
2594 @REQ(close_winstation)
2595 obj_handle_t handle; /* handle to the window station */
2599 /* Get the process current window station */
2600 @REQ(get_process_winstation)
2602 obj_handle_t handle; /* handle to the window station */
2606 /* Set the process current window station */
2607 @REQ(set_process_winstation)
2608 obj_handle_t handle; /* handle to the window station */
2612 /* Enumerate window stations */
2613 @REQ(enum_winstation)
2614 unsigned int index; /* current index */
2616 unsigned int next; /* next index */
2617 VARARG(name,unicode_str); /* window station name */
2621 /* Create a desktop */
2622 @REQ(create_desktop)
2623 unsigned int flags; /* desktop flags */
2624 unsigned int access; /* wanted access rights */
2625 unsigned int attributes; /* object attributes */
2626 VARARG(name,unicode_str); /* object name */
2628 obj_handle_t handle; /* handle to the desktop */
2632 /* Open a handle to a desktop */
2634 obj_handle_t winsta; /* window station to open (null allowed) */
2635 unsigned int flags; /* desktop flags */
2636 unsigned int access; /* wanted access rights */
2637 unsigned int attributes; /* object attributes */
2638 VARARG(name,unicode_str); /* object name */
2640 obj_handle_t handle; /* handle to the desktop */
2644 /* Open a handle to current input desktop */
2645 @REQ(open_input_desktop)
2646 unsigned int flags; /* desktop flags */
2647 unsigned int access; /* wanted access rights */
2648 unsigned int attributes; /* object attributes */
2650 obj_handle_t handle; /* handle to the desktop */
2654 /* Close a desktop */
2656 obj_handle_t handle; /* handle to the desktop */
2660 /* Get the thread current desktop */
2661 @REQ(get_thread_desktop)
2662 thread_id_t tid; /* thread id */
2664 obj_handle_t handle; /* handle to the desktop */
2668 /* Set the thread current desktop */
2669 @REQ(set_thread_desktop)
2670 obj_handle_t handle; /* handle to the desktop */
2674 /* Enumerate desktops */
2676 obj_handle_t winstation; /* handle to the window station */
2677 unsigned int index; /* current index */
2679 unsigned int next; /* next index */
2680 VARARG(name,unicode_str); /* window station name */
2684 /* Get/set information about a user object (window station or desktop) */
2685 @REQ(set_user_object_info)
2686 obj_handle_t handle; /* handle to the object */
2687 unsigned int flags; /* information to set/get */
2688 unsigned int obj_flags; /* new object flags */
2690 int is_desktop; /* is object a desktop? */
2691 unsigned int old_obj_flags; /* old object flags */
2692 VARARG(name,unicode_str); /* object name */
2694 #define SET_USER_OBJECT_SET_FLAGS 1
2695 #define SET_USER_OBJECT_GET_FULL_NAME 2
2698 /* Register a hotkey */
2699 @REQ(register_hotkey)
2700 user_handle_t window; /* handle to the window */
2701 int id; /* hotkey identifier */
2702 unsigned int flags; /* modifier keys */
2703 unsigned int vkey; /* virtual key code */
2705 int replaced; /* did we replace an existing hotkey? */
2706 unsigned int flags; /* flags of replaced hotkey */
2707 unsigned int vkey; /* virtual key code of replaced hotkey */
2711 /* Unregister a hotkey */
2712 @REQ(unregister_hotkey)
2713 user_handle_t window; /* handle to the window */
2714 int id; /* hotkey identifier */
2716 unsigned int flags; /* flags of removed hotkey */
2717 unsigned int vkey; /* virtual key code of removed hotkey */
2721 /* Attach (or detach) thread inputs */
2722 @REQ(attach_thread_input)
2723 thread_id_t tid_from; /* thread to be attached */
2724 thread_id_t tid_to; /* thread to which tid_from should be attached */
2725 int attach; /* is it an attach? */
2729 /* Get input data for a given thread */
2730 @REQ(get_thread_input)
2731 thread_id_t tid; /* id of thread */
2733 user_handle_t focus; /* handle to the focus window */
2734 user_handle_t capture; /* handle to the capture window */
2735 user_handle_t active; /* handle to the active window */
2736 user_handle_t foreground; /* handle to the global foreground window */
2737 user_handle_t menu_owner; /* handle to the menu owner */
2738 user_handle_t move_size; /* handle to the moving/resizing window */
2739 user_handle_t caret; /* handle to the caret window */
2740 user_handle_t cursor; /* handle to the cursor */
2741 int show_count; /* cursor show count */
2742 rectangle_t rect; /* caret rectangle */
2746 /* Get the time of the last input event */
2747 @REQ(get_last_input_time)
2753 /* Retrieve queue keyboard state for a given thread */
2755 thread_id_t tid; /* id of thread */
2756 int key; /* optional key code or -1 */
2758 unsigned char state; /* state of specified key */
2759 VARARG(keystate,bytes); /* state array for all the keys */
2762 /* Set queue keyboard state for a given thread */
2764 thread_id_t tid; /* id of thread */
2765 int async; /* whether to change the async state too */
2766 VARARG(keystate,bytes); /* state array for all the keys */
2769 /* Set the system foreground window */
2770 @REQ(set_foreground_window)
2771 user_handle_t handle; /* handle to the foreground window */
2773 user_handle_t previous; /* handle to the previous foreground window */
2774 int send_msg_old; /* whether we have to send a msg to the old window */
2775 int send_msg_new; /* whether we have to send a msg to the new window */
2778 /* Set the current thread focus window */
2779 @REQ(set_focus_window)
2780 user_handle_t handle; /* handle to the focus window */
2782 user_handle_t previous; /* handle to the previous focus window */
2785 /* Set the current thread active window */
2786 @REQ(set_active_window)
2787 user_handle_t handle; /* handle to the active window */
2789 user_handle_t previous; /* handle to the previous active window */
2792 /* Set the current thread capture window */
2793 @REQ(set_capture_window)
2794 user_handle_t handle; /* handle to the capture window */
2795 unsigned int flags; /* capture flags (see below) */
2797 user_handle_t previous; /* handle to the previous capture window */
2798 user_handle_t full_handle; /* full 32-bit handle of new capture window */
2800 #define CAPTURE_MENU 0x01 /* capture is for a menu */
2801 #define CAPTURE_MOVESIZE 0x02 /* capture is for moving/resizing */
2804 /* Set the current thread caret window */
2805 @REQ(set_caret_window)
2806 user_handle_t handle; /* handle to the caret window */
2807 int width; /* caret width */
2808 int height; /* caret height */
2810 user_handle_t previous; /* handle to the previous caret window */
2811 rectangle_t old_rect; /* previous caret rectangle */
2812 int old_hide; /* previous hide count */
2813 int old_state; /* previous caret state (1=on, 0=off) */
2817 /* Set the current thread caret information */
2818 @REQ(set_caret_info)
2819 unsigned int flags; /* caret flags (see below) */
2820 user_handle_t handle; /* handle to the caret window */
2821 int x; /* caret x position */
2822 int y; /* caret y position */
2823 int hide; /* increment for hide count (can be negative to show it) */
2824 int state; /* caret state (see below) */
2826 user_handle_t full_handle; /* handle to the current caret window */
2827 rectangle_t old_rect; /* previous caret rectangle */
2828 int old_hide; /* previous hide count */
2829 int old_state; /* previous caret state (1=on, 0=off) */
2831 #define SET_CARET_POS 0x01 /* set the caret position from x,y */
2832 #define SET_CARET_HIDE 0x02 /* increment the caret hide count */
2833 #define SET_CARET_STATE 0x04 /* set the caret on/off state */
2836 CARET_STATE_OFF, /* off */
2837 CARET_STATE_ON, /* on */
2838 CARET_STATE_TOGGLE, /* toggle current state */
2839 CARET_STATE_ON_IF_MOVED /* on if the position differs, unchanged otherwise */
2843 /* Set a window hook */
2845 int id; /* id of the hook */
2846 process_id_t pid; /* id of process to set the hook into */
2847 thread_id_t tid; /* id of thread to set the hook into */
2850 client_ptr_t proc; /* hook procedure */
2852 int unicode; /* is it a unicode hook? */
2853 VARARG(module,unicode_str); /* module name */
2855 user_handle_t handle; /* handle to the hook */
2856 unsigned int active_hooks; /* active hooks bitmap */
2860 /* Remove a window hook */
2862 user_handle_t handle; /* handle to the hook */
2863 client_ptr_t proc; /* hook procedure if handle is 0 */
2864 int id; /* id of the hook if handle is 0 */
2866 unsigned int active_hooks; /* active hooks bitmap */
2870 /* Start calling a hook chain */
2871 @REQ(start_hook_chain)
2872 int id; /* id of the hook */
2873 int event; /* signalled event */
2874 user_handle_t window; /* handle to the event window */
2875 int object_id; /* object id for out of context winevent */
2876 int child_id; /* child id for out of context winevent */
2878 user_handle_t handle; /* handle to the next hook */
2879 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2880 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2881 int unicode; /* is it a unicode hook? */
2882 client_ptr_t proc; /* hook procedure */
2883 unsigned int active_hooks; /* active hooks bitmap */
2884 VARARG(module,unicode_str); /* module name */
2888 /* Finished calling a hook chain */
2889 @REQ(finish_hook_chain)
2890 int id; /* id of the hook */
2894 /* Get the hook information */
2896 user_handle_t handle; /* handle to the current hook */
2897 int get_next; /* do we want info about current or next hook? */
2898 int event; /* signalled event */
2899 user_handle_t window; /* handle to the event window */
2900 int object_id; /* object id for out of context winevent */
2901 int child_id; /* child id for out of context winevent */
2903 user_handle_t handle; /* handle to the hook */
2904 int id; /* id of the hook */
2905 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2906 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2907 client_ptr_t proc; /* hook procedure */
2908 int unicode; /* is it a unicode hook? */
2909 VARARG(module,unicode_str); /* module name */
2913 /* Create a window class */
2915 int local; /* is it a local class? */
2916 atom_t atom; /* class atom */
2917 unsigned int style; /* class style */
2918 mod_handle_t instance; /* module instance */
2919 int extra; /* number of extra class bytes */
2920 int win_extra; /* number of window extra bytes */
2921 client_ptr_t client_ptr; /* pointer to class in client address space */
2922 data_size_t name_offset; /* base class name offset for specified atom */
2923 VARARG(name,unicode_str); /* class name */
2925 atom_t atom; /* resulting class atom */
2929 /* Destroy a window class */
2931 atom_t atom; /* class atom */
2932 mod_handle_t instance; /* module instance */
2933 VARARG(name,unicode_str); /* class name */
2935 client_ptr_t client_ptr; /* pointer to class in client address space */
2939 /* Set some information in a class */
2940 @REQ(set_class_info)
2941 user_handle_t window; /* handle to the window */
2942 unsigned int flags; /* flags for info to set (see below) */
2943 atom_t atom; /* class atom */
2944 unsigned int style; /* class style */
2945 int win_extra; /* number of window extra bytes */
2946 mod_handle_t instance; /* module instance */
2947 int extra_offset; /* offset to set in extra bytes */
2948 data_size_t extra_size; /* size to set in extra bytes */
2949 lparam_t extra_value; /* value to set in extra bytes */
2951 atom_t old_atom; /* previous class atom */
2952 atom_t base_atom; /* base class atom */
2953 mod_handle_t old_instance; /* previous module instance */
2954 lparam_t old_extra_value; /* old value in extra bytes */
2955 unsigned int old_style; /* previous class style */
2956 int old_extra; /* previous number of class extra bytes */
2957 int old_win_extra; /* previous number of window extra bytes */
2959 #define SET_CLASS_ATOM 0x0001
2960 #define SET_CLASS_STYLE 0x0002
2961 #define SET_CLASS_WINEXTRA 0x0004
2962 #define SET_CLASS_INSTANCE 0x0008
2963 #define SET_CLASS_EXTRA 0x0010
2966 /* Open the clipboard */
2967 @REQ(open_clipboard)
2968 user_handle_t window; /* clipboard window */
2970 user_handle_t owner; /* current clipboard owner */
2974 /* Close the clipboard */
2975 @REQ(close_clipboard)
2977 user_handle_t viewer; /* first clipboard viewer */
2978 user_handle_t owner; /* current clipboard owner */
2982 /* Empty the clipboard and grab ownership */
2983 @REQ(empty_clipboard)
2987 /* Add a data format to the clipboard */
2988 @REQ(set_clipboard_data)
2989 unsigned int format; /* clipboard format of the data */
2990 unsigned int lcid; /* locale id to use for synthesizing text formats */
2991 VARARG(data,bytes); /* data contents */
2993 unsigned int seqno; /* sequence number for the set data */
2997 /* Fetch a data format from the clipboard */
2998 @REQ(get_clipboard_data)
2999 unsigned int format; /* clipboard format of the data */
3000 int render; /* will we try to render it if missing? */
3001 int cached; /* do we already have it in the client-side cache? */
3002 unsigned int seqno; /* sequence number for the data in the cache */
3004 unsigned int from; /* for synthesized data, format to generate it from */
3005 user_handle_t owner; /* clipboard owner for delayed-rendered formats */
3006 unsigned int seqno; /* sequence number for the originally set data */
3007 data_size_t total; /* total data size */
3008 VARARG(data,bytes); /* data contents */
3012 /* Retrieve a list of available formats */
3013 @REQ(get_clipboard_formats)
3014 unsigned int format; /* specific format to query, return all if 0 */
3016 unsigned int count; /* count of available formats */
3017 VARARG(formats,uints); /* array of available formats */
3021 /* Retrieve the next available format */
3022 @REQ(enum_clipboard_formats)
3023 unsigned int previous; /* previous format, or first if 0 */
3025 unsigned int format; /* next format */
3029 /* Release ownership of the clipboard */
3030 @REQ(release_clipboard)
3031 user_handle_t owner; /* clipboard owner to release */
3033 user_handle_t viewer; /* first clipboard viewer */
3034 user_handle_t owner; /* current clipboard owner */
3038 /* Get clipboard information */
3039 @REQ(get_clipboard_info)
3041 user_handle_t window; /* clipboard window */
3042 user_handle_t owner; /* clipboard owner */
3043 user_handle_t viewer; /* clipboard viewer */
3044 unsigned int seqno; /* current sequence number */
3048 /* Set the clipboard viewer window */
3049 @REQ(set_clipboard_viewer)
3050 user_handle_t viewer; /* clipboard viewer */
3051 user_handle_t previous; /* if non-zero, check that this was the previous viewer */
3053 user_handle_t old_viewer; /* previous clipboard viewer */
3054 user_handle_t owner; /* clipboard owner */
3058 /* Add a clipboard listener window */
3059 @REQ(add_clipboard_listener)
3060 user_handle_t window; /* clipboard listener window */
3064 /* Remove a clipboard listener window */
3065 @REQ(remove_clipboard_listener)
3066 user_handle_t window; /* clipboard listener window */
3070 /* Open a security token */
3072 obj_handle_t handle; /* handle to the thread or process */
3073 unsigned int access; /* access rights to the new token */
3074 unsigned int attributes;/* object attributes */
3075 unsigned int flags; /* flags (see below) */
3077 obj_handle_t token; /* handle to the token */
3079 #define OPEN_TOKEN_THREAD 1
3080 #define OPEN_TOKEN_AS_SELF 2
3083 /* Set/get the global windows */
3084 @REQ(set_global_windows)
3085 unsigned int flags; /* flags for fields to set (see below) */
3086 user_handle_t shell_window; /* handle to the new shell window */
3087 user_handle_t shell_listview; /* handle to the new shell listview window */
3088 user_handle_t progman_window; /* handle to the new program manager window */
3089 user_handle_t taskman_window; /* handle to the new task manager window */
3091 user_handle_t old_shell_window; /* handle to the shell window */
3092 user_handle_t old_shell_listview; /* handle to the shell listview window */
3093 user_handle_t old_progman_window; /* handle to the new program manager window */
3094 user_handle_t old_taskman_window; /* handle to the new task manager window */
3096 #define SET_GLOBAL_SHELL_WINDOWS 0x01 /* set both main shell and listview windows */
3097 #define SET_GLOBAL_PROGMAN_WINDOW 0x02
3098 #define SET_GLOBAL_TASKMAN_WINDOW 0x04
3100 /* Adjust the privileges held by a token */
3101 @REQ(adjust_token_privileges)
3102 obj_handle_t handle; /* handle to the token */
3103 int disable_all; /* disable all privileges? */
3104 int get_modified_state; /* get modified privileges? */
3105 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to enable/disable/remove */
3107 unsigned int len; /* total length in bytes required to store token privileges */
3108 VARARG(privileges,LUID_AND_ATTRIBUTES); /* modified privileges */
3111 /* Retrieves the set of privileges held by or available to a token */
3112 @REQ(get_token_privileges)
3113 obj_handle_t handle; /* handle to the token */
3115 unsigned int len; /* total length in bytes required to store token privileges */
3116 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
3119 /* Check the token has the required privileges */
3120 @REQ(check_token_privileges)
3121 obj_handle_t handle; /* handle to the token */
3122 int all_required; /* are all the privileges required for the check to succeed? */
3123 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to check */
3125 int has_privileges; /* does the token have the required privileges? */
3126 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
3129 @REQ(duplicate_token)
3130 obj_handle_t handle; /* handle to the token to duplicate */
3131 unsigned int access; /* access rights to the new token */
3132 int primary; /* is the new token to be a primary one? */
3133 int impersonation_level; /* impersonation level of the new token */
3134 VARARG(objattr,object_attributes); /* object attributes */
3136 obj_handle_t new_handle; /* duplicated handle */
3140 obj_handle_t handle; /* handle to the token to duplicate */
3141 unsigned int flags; /* flags */
3142 data_size_t privileges_size; /* size of privileges */
3143 VARARG(privileges,LUID_AND_ATTRIBUTES,privileges_size); /* privileges to remove from new token */
3144 VARARG(disable_sids,SID); /* array of groups to remove from new token */
3146 obj_handle_t new_handle; /* filtered handle */
3150 obj_handle_t handle; /* handle to the token */
3151 unsigned int desired_access; /* desired access to the object */
3152 unsigned int mapping_read; /* mapping from generic read to specific rights */
3153 unsigned int mapping_write; /* mapping from generic write to specific rights */
3154 unsigned int mapping_execute; /* mapping from generic execute to specific rights */
3155 unsigned int mapping_all; /* mapping from generic all to specific rights */
3156 VARARG(sd,security_descriptor); /* security descriptor to check */
3158 unsigned int access_granted; /* access rights actually granted */
3159 unsigned int access_status; /* was access granted? */
3160 unsigned int privileges_len; /* length needed to store privileges */
3161 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges used during access check */
3165 obj_handle_t handle; /* handle to the token */
3166 unsigned int which_sid; /* which SID to retrieve from the token */
3168 data_size_t sid_len; /* length needed to store sid */
3169 VARARG(sid,SID); /* the sid specified by which_sid from the token */
3172 @REQ(get_token_groups)
3173 obj_handle_t handle; /* handle to the token */
3175 data_size_t user_len; /* length needed to store user */
3176 VARARG(user,token_groups); /* groups the token's user belongs to
*/
3179 @
REQ(get_token_default_dacl
)
3180 obj_handle_t handle
; /* handle to the token
*/
3182 data_size_t acl_len
; /* length needed to store access control list
*/
3183 VARARG(acl
,ACL
); /* access control list
*/
3186 @
REQ(set_token_default_dacl
)
3187 obj_handle_t handle
; /* handle to the token
*/
3188 VARARG(acl
,ACL
); /* default dacl to set
*/
3191 @
REQ(set_security_object
)
3192 obj_handle_t handle
; /* handle to the object
*/
3193 unsigned int security_info
; /* which parts of security descriptor to set
*/
3194 VARARG(sd
,security_descriptor
); /* security descriptor to set
*/
3197 @
REQ(get_security_object
)
3198 obj_handle_t handle
; /* handle to the object
*/
3199 unsigned int security_info
; /* which parts of security descriptor to get
*/
3201 unsigned int sd_len
; /* buffer size needed for sd
*/
3202 VARARG(sd
,security_descriptor
); /* retrieved security descriptor
*/
3209 obj_handle_t handle
;
3210 unsigned int access
;
3213 /* Return a list of all opened handles
*/
3214 @
REQ(get_system_handles
)
3216 unsigned int count
; /* number of handles
*/
3217 VARARG(data
,handle_infos
); /* array of handle_infos
*/
3221 /* Create a mailslot
*/
3222 @
REQ(create_mailslot
)
3223 unsigned int access
; /* wanted access rights
*/
3224 timeout_t read_timeout
;
3225 unsigned int max_msgsize
;
3226 VARARG(objattr
,object_attributes
); /* object attributes
*/
3228 obj_handle_t handle
; /* handle to the mailslot
*/
3232 /* Set mailslot information
*/
3233 @
REQ(set_mailslot_info
)
3234 obj_handle_t handle
; /* handle to the mailslot
*/
3235 timeout_t read_timeout
;
3238 timeout_t read_timeout
;
3239 unsigned int max_msgsize
;
3241 #define MAILSLOT_SET_READ_TIMEOUT
1
3244 /* Create a directory object
*/
3245 @
REQ(create_directory
)
3246 unsigned int access
; /* access flags
*/
3247 VARARG(objattr
,object_attributes
); /* object attributes
*/
3249 obj_handle_t handle
; /* handle to the directory
*/
3253 /* Open a directory object
*/
3254 @
REQ(open_directory
)
3255 unsigned int access
; /* access flags
*/
3256 unsigned int attributes
; /* object attributes
*/
3257 obj_handle_t rootdir
; /* root directory
*/
3258 VARARG(directory_name
,unicode_str
); /* Directory name
*/
3260 obj_handle_t handle
; /* handle to the directory
*/
3264 /* Get a directory entry by index
*/
3265 @
REQ(get_directory_entry
)
3266 obj_handle_t handle
; /* handle to the directory
*/
3267 unsigned int index
; /* entry index
*/
3269 data_size_t name_len
; /* length of the entry name in bytes
*/
3270 VARARG(name
,unicode_str
,name_len
); /* entry name
*/
3271 VARARG(type
,unicode_str
); /* entry type
*/
3275 /* Create a symbolic link object
*/
3276 @
REQ(create_symlink
)
3277 unsigned int access
; /* access flags
*/
3278 VARARG(objattr
,object_attributes
); /* object attributes
*/
3279 VARARG(target_name
,unicode_str
); /* target name
*/
3281 obj_handle_t handle
; /* handle to the symlink
*/
3285 /* Open a symbolic link object
*/
3287 unsigned int access
; /* access flags
*/
3288 unsigned int attributes
; /* object attributes
*/
3289 obj_handle_t rootdir
; /* root directory
*/
3290 VARARG(name
,unicode_str
); /* symlink name
*/
3292 obj_handle_t handle
; /* handle to the symlink
*/
3296 /* Query a symbolic link object
*/
3298 obj_handle_t handle
; /* handle to the symlink
*/
3300 data_size_t total
; /* total needed size for name
*/
3301 VARARG(target_name
,unicode_str
); /* target name
*/
3305 /* Query basic object information
*/
3306 @
REQ(get_object_info
)
3307 obj_handle_t handle
; /* handle to the object
*/
3309 unsigned int access
; /* granted access mask
*/
3310 unsigned int ref_count
; /* object ref count
*/
3311 unsigned int handle_count
; /* object handle count
*/
3312 data_size_t total
; /* total needed size for name
*/
3313 VARARG(name
,unicode_str
); /* object name
*/
3317 /* Query object type name information
*/
3318 @
REQ(get_object_type
)
3319 obj_handle_t handle
; /* handle to the object
*/
3321 data_size_t total
; /* needed size for type name
*/
3322 VARARG(type
,unicode_str
); /* type name
*/
3326 /* Query the impersonation level of an impersonation token
*/
3327 @
REQ(get_token_impersonation_level
)
3328 obj_handle_t handle
; /* handle to the object
*/
3330 int impersonation_level
; /* impersonation level of the impersonation token
*/
3333 /* Allocate a locally
-unique identifier
*/
3334 @
REQ(allocate_locally_unique_id
)
3340 /* Create a device manager
*/
3341 @
REQ(create_device_manager
)
3342 unsigned int access
; /* wanted access rights
*/
3343 unsigned int attributes
; /* object attributes
*/
3345 obj_handle_t handle
; /* handle to the device
*/
3349 /* Create a device
*/
3351 obj_handle_t rootdir
; /* root directory
*/
3352 client_ptr_t user_ptr
; /* opaque ptr for use by client
*/
3353 obj_handle_t manager
; /* device manager
*/
3354 VARARG(name
,unicode_str
); /* object name
*/
3358 /* Delete a device
*/
3360 obj_handle_t manager
; /* handle to the device manager
*/
3361 client_ptr_t device
; /* pointer to the device
*/
3365 /* Retrieve the next pending device irp request
*/
3366 @
REQ(get_next_device_request
)
3367 obj_handle_t manager
; /* handle to the device manager
*/
3368 obj_handle_t prev
; /* handle to the previous irp
*/
3369 unsigned int status
; /* status of the previous irp
*/
3370 client_ptr_t user_ptr
; /* user pointer of the previous irp
*/
3372 irp_params_t params
; /* irp parameters
*/
3373 obj_handle_t next
; /* handle to the next irp
*/
3374 thread_id_t client_tid
; /* tid of thread calling irp
*/
3375 client_ptr_t client_thread
; /* pointer to thread object of calling irp
*/
3376 data_size_t in_size
; /* total needed input size
*/
3377 VARARG(next_data
,bytes
); /* input data of the next irp
*/
3381 /* Get kernel pointer from server object
*/
3382 @
REQ(get_kernel_object_ptr
)
3383 obj_handle_t manager
; /* handle to the device manager
*/
3384 obj_handle_t handle
; /* object handle
*/
3386 client_ptr_t user_ptr
; /* kernel object pointer
*/
3390 /* Associate kernel pointer with server object
*/
3391 @
REQ(set_kernel_object_ptr
)
3392 obj_handle_t manager
; /* handle to the device manager
*/
3393 obj_handle_t handle
; /* object handle
*/
3394 client_ptr_t user_ptr
; /* kernel object pointer
*/
3398 /* Grab server object reference from kernel object pointer
*/
3399 @
REQ(grab_kernel_object
)
3400 obj_handle_t manager
; /* handle to the device manager
*/
3401 client_ptr_t user_ptr
; /* kernel object pointer
*/
3405 /* Release server object reference from kernel object pointer
*/
3406 @
REQ(release_kernel_object
)
3407 obj_handle_t manager
; /* handle to the device manager
*/
3408 client_ptr_t user_ptr
; /* kernel object pointer
*/
3412 /* Get handle from kernel object pointer
*/
3413 @
REQ(get_kernel_object_handle
)
3414 obj_handle_t manager
; /* handle to the device manager
*/
3415 client_ptr_t user_ptr
; /* kernel object pointer
*/
3416 unsigned int access
; /* wanted access rights
*/
3418 obj_handle_t handle
; /* kernel object handle
*/
3422 /* Make the current process a system process
*/
3423 @
REQ(make_process_system
)
3425 obj_handle_t event
; /* event signaled when all user processes have exited
*/
3429 /* Get detailed fixed
-size information about a token
*/
3430 @
REQ(get_token_statistics
)
3431 obj_handle_t handle
; /* handle to the object
*/
3433 luid_t token_id
; /* locally
-unique identifier of the token
*/
3434 luid_t modified_id
; /* locally
-unique identifier of the modified version of the token
*/
3435 int primary
; /* is the token primary or impersonation?
*/
3436 int impersonation_level
; /* level of impersonation
*/
3437 int group_count
; /* the number of groups the token is a member of
*/
3438 int privilege_count
; /* the number of privileges the token has
*/
3442 /* Create I
/O completion port
*/
3443 @
REQ(create_completion
)
3444 unsigned int access
; /* desired access to a port
*/
3445 unsigned int concurrent
; /* max number of concurrent active threads
*/
3446 VARARG(objattr
,object_attributes
); /* object attributes
*/
3448 obj_handle_t handle
; /* port handle
*/
3452 /* Open I
/O completion port
*/
3453 @
REQ(open_completion
)
3454 unsigned int access
; /* desired access to a port
*/
3455 unsigned int attributes
; /* object attributes
*/
3456 obj_handle_t rootdir
; /* root directory
*/
3457 VARARG(filename
,unicode_str
); /* port name
*/
3459 obj_handle_t handle
; /* port handle
*/
3463 /* add completion to completion port
*/
3464 @
REQ(add_completion
)
3465 obj_handle_t handle
; /* port handle
*/
3466 apc_param_t ckey
; /* completion key
*/
3467 apc_param_t cvalue
; /* completion value
*/
3468 apc_param_t information
; /* IO_STATUS_BLOCK Information
*/
3469 unsigned int status
; /* completion result
*/
3473 /* get completion from completion port queue
*/
3474 @
REQ(remove_completion
)
3475 obj_handle_t handle
; /* port handle
*/
3477 apc_param_t ckey
; /* completion key
*/
3478 apc_param_t cvalue
; /* completion value
*/
3479 apc_param_t information
; /* IO_STATUS_BLOCK Information
*/
3480 unsigned int status
; /* completion result
*/
3484 /* get completion queue depth
*/
3485 @
REQ(query_completion
)
3486 obj_handle_t handle
; /* port handle
*/
3488 unsigned int depth
; /* completion queue depth
*/
3492 /* associate object with completion port
*/
3493 @
REQ(set_completion_info
)
3494 obj_handle_t handle
; /* object handle
*/
3495 apc_param_t ckey
; /* completion key
*/
3496 obj_handle_t chandle
; /* port handle
*/
3500 /* check for associated completion and push msg
*/
3501 @
REQ(add_fd_completion
)
3502 obj_handle_t handle
; /* async
' object */
3503 apc_param_t cvalue; /* completion value */
3504 apc_param_t information; /* IO_STATUS_BLOCK Information */
3505 unsigned int status; /* completion status */
3506 int async; /* completion is an async result */
3510 /* set fd completion information */
3511 @REQ(set_fd_completion_mode)
3512 obj_handle_t handle; /* handle to a file or directory */
3513 unsigned int flags; /* completion notification flags */
3517 /* set fd disposition information */
3518 @REQ(set_fd_disp_info)
3519 obj_handle_t handle; /* handle to a file or directory */
3520 int unlink; /* whether to unlink file on close */
3524 /* set fd name information */
3525 @REQ(set_fd_name_info)
3526 obj_handle_t handle; /* handle to a file or directory */
3527 obj_handle_t rootdir; /* root directory */
3528 int link; /* link instead of renaming */
3529 int replace; /* replace an existing file? */
3530 VARARG(filename,string); /* new file name */
3534 /* Retrieve layered info for a window */
3535 @REQ(get_window_layered_info)
3536 user_handle_t handle; /* handle to the window */
3538 unsigned int color_key; /* color key */
3539 unsigned int alpha; /* alpha (0..255) */
3540 unsigned int flags; /* LWA_* flags */
3544 /* Set layered info for a window */
3545 @REQ(set_window_layered_info)
3546 user_handle_t handle; /* handle to the window */
3547 unsigned int color_key; /* color key */
3548 unsigned int alpha; /* alpha (0..255) */
3549 unsigned int flags; /* LWA_* flags */
3553 /* Allocate an arbitrary user handle */
3554 @REQ(alloc_user_handle)
3556 user_handle_t handle; /* allocated handle */
3560 /* Free an arbitrary user handle */
3561 @REQ(free_user_handle)
3562 user_handle_t handle; /* handle to free*/
3566 /* Set/get the current cursor */
3568 unsigned int flags; /* flags for fields to set (see below) */
3569 user_handle_t handle; /* handle to the cursor */
3570 int show_count; /* show count increment/decrement */
3571 int x; /* cursor position */
3573 rectangle_t clip; /* cursor clip rectangle */
3574 unsigned int clip_msg; /* message to post on cursor clip changes */
3576 user_handle_t prev_handle; /* previous handle */
3577 int prev_count; /* previous show count */
3578 int prev_x; /* previous position */
3580 int new_x; /* new position */
3582 rectangle_t new_clip; /* new clip rectangle */
3583 unsigned int last_change; /* time of last position change */
3585 #define SET_CURSOR_HANDLE 0x01
3586 #define SET_CURSOR_COUNT 0x02
3587 #define SET_CURSOR_POS 0x04
3588 #define SET_CURSOR_CLIP 0x08
3589 #define SET_CURSOR_NOCLIP 0x10
3592 /* Batch read rawinput message data */
3593 @REQ(get_rawinput_buffer)
3594 data_size_t rawinput_size; /* size of RAWINPUT structure */
3595 data_size_t buffer_size; /* size of output buffer */
3597 data_size_t next_size; /* minimum size to get next message data */
3602 /* Modify the list of registered rawinput devices */
3603 @REQ(update_rawinput_devices)
3604 VARARG(devices,rawinput_devices);
3607 /* Retrieve the list of registered rawinput devices */
3608 @REQ(get_rawinput_devices)
3610 unsigned int device_count;
3611 VARARG(devices,rawinput_devices);
3614 /* Create a new job object */
3616 unsigned int access; /* wanted access rights */
3617 VARARG(objattr,object_attributes); /* object attributes */
3619 obj_handle_t handle; /* handle to the job */
3623 /* Open a job object */
3625 unsigned int access; /* wanted access rights */
3626 unsigned int attributes; /* object attributes */
3627 obj_handle_t rootdir; /* root directory */
3628 VARARG(name,unicode_str); /* object name */
3630 obj_handle_t handle; /* handle to the job */
3634 /* Assign a job object to a process */
3636 obj_handle_t job; /* handle to the job */
3637 obj_handle_t process; /* handle to the process */
3641 /* Check if a process is associated with a job */
3642 @REQ(process_in_job)
3643 obj_handle_t job; /* handle to the job */
3644 obj_handle_t process; /* handle to the process */
3648 /* Set limit flags on a job */
3649 @REQ(set_job_limits)
3650 obj_handle_t handle; /* handle to the job */
3651 unsigned int limit_flags; /* new limit flags */
3655 /* Set new completion port for a job */
3656 @REQ(set_job_completion_port)
3657 obj_handle_t job; /* handle to the job */
3658 obj_handle_t port; /* handle to the completion port */
3659 client_ptr_t key; /* key to send with completion messages */
3663 /* Retrieve information about a job */
3665 obj_handle_t handle; /* handle to the job */
3667 int total_processes; /* total count of processes */
3668 int active_processes; /* count of running processes */
3672 /* Terminate all processes associated with the job */
3674 obj_handle_t handle; /* handle to the job */
3675 int status; /* process exit code */
3679 /* Suspend a process */
3680 @REQ(suspend_process)
3681 obj_handle_t handle; /* process handle */
3685 /* Resume a process */
3686 @REQ(resume_process)
3687 obj_handle_t handle; /* process handle */