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 parent_process
; /* parent process
*/
791 int inherit_all
; /* inherit all handles from parent
*/
792 unsigned int create_flags
; /* creation flags
*/
793 int socket_fd
; /* file descriptor for process socket
*/
794 obj_handle_t exe_file
; /* file handle for main exe
*/
795 unsigned int access
; /* access rights for process object
*/
796 client_cpu_t cpu
; /* CPU that the new process will use
*/
797 data_size_t info_size
; /* size of startup info
*/
798 VARARG(objattr
,object_attributes
); /* object attributes
*/
799 VARARG(info
,startup_info
,info_size
); /* startup information
*/
800 VARARG(env
,unicode_str
); /* environment for new process
*/
802 obj_handle_t info
; /* new process info handle
*/
803 process_id_t pid
; /* process id
*/
804 obj_handle_t handle
; /* process
handle (in the current process
) */
808 /* Execute a process
, replacing the current one
*/
810 int socket_fd
; /* file descriptor for process socket
*/
811 client_cpu_t cpu
; /* CPU that the new process will use
*/
815 /* Retrieve information about a newly started process
*/
816 @
REQ(get_new_process_info
)
817 obj_handle_t info
; /* info handle returned from new_process_request
*/
819 int success
; /* did the process start successfully?
*/
820 int exit_code
; /* process exit code if failed
*/
824 /* Create a new thread
*/
826 obj_handle_t process
; /* process in which to create thread
*/
827 unsigned int access
; /* wanted access rights
*/
828 int suspend
; /* new thread should be suspended on creation
*/
829 int request_fd
; /* fd for request pipe
*/
830 VARARG(objattr
,object_attributes
); /* object attributes
*/
832 thread_id_t tid
; /* thread id
*/
833 obj_handle_t handle
; /* thread
handle (in the current process
) */
837 /* Retrieve the new process startup info
*/
838 @
REQ(get_startup_info
)
840 data_size_t info_size
; /* size of startup info
*/
841 VARARG(info
,startup_info
,info_size
); /* startup information
*/
842 VARARG(env
,unicode_str
); /* environment
*/
846 /* Signal the end of the process initialization
*/
847 @
REQ(init_process_done
)
848 int gui
; /* is it a GUI process?
*/
849 mod_handle_t module
; /* main module base address
*/
850 client_ptr_t ldt_copy
; /* address of LDT
copy (in thread address space
) */
851 client_ptr_t entry
; /* process entry point
*/
853 int suspend
; /* is process suspended?
*/
857 /* Initialize a thread
; called from the child after
fork()/clone() */
859 int unix_pid
; /* Unix pid of new thread
*/
860 int unix_tid
; /* Unix tid of new thread
*/
861 int debug_level
; /* new debug level
*/
862 client_ptr_t teb
; /* TEB of new
thread (in thread address space
) */
863 client_ptr_t entry
; /* entry point or PEB if initial
thread (in thread address space
) */
864 int reply_fd
; /* fd for reply pipe
*/
865 int wait_fd
; /* fd for blocking calls pipe
*/
866 client_cpu_t cpu
; /* CPU that this thread is running on
*/
868 process_id_t pid
; /* process id of the new thread
's process */
869 thread_id_t tid; /* thread id of the new thread */
870 timeout_t server_start; /* server start time */
871 data_size_t info_size; /* total size of startup info */
872 int version; /* protocol version */
873 unsigned int all_cpus; /* bitset of supported CPUs */
874 int suspend; /* is thread suspended? */
878 /* Terminate a process */
879 @REQ(terminate_process)
880 obj_handle_t handle; /* process handle to terminate */
881 int exit_code; /* process exit code */
883 int self; /* suicide? */
887 /* Terminate a thread */
888 @REQ(terminate_thread)
889 obj_handle_t handle; /* thread handle to terminate */
890 int exit_code; /* thread exit code */
892 int self; /* suicide? */
896 /* Retrieve information about a process */
897 @REQ(get_process_info)
898 obj_handle_t handle; /* process handle */
900 process_id_t pid; /* server process id */
901 process_id_t ppid; /* server process id of parent */
902 affinity_t affinity; /* process affinity mask */
903 client_ptr_t peb; /* PEB address in process address space */
904 timeout_t start_time; /* process start time */
905 timeout_t end_time; /* process end time */
906 int exit_code; /* process exit code */
907 int priority; /* priority class */
908 client_cpu_t cpu; /* CPU that this process is running on */
909 short int debugger_present; /* process is being debugged */
910 short int debug_children; /* inherit debugger to child processes */
911 VARARG(image,pe_image_info); /* image info for main exe */
915 /* Retrieve information about a process memory usage */
916 @REQ(get_process_vm_counters)
917 obj_handle_t handle; /* process handle */
919 mem_size_t peak_virtual_size; /* peak virtual memory in bytes */
920 mem_size_t virtual_size; /* virtual memory in bytes */
921 mem_size_t peak_working_set_size; /* peak real memory in bytes */
922 mem_size_t working_set_size; /* real memory in bytes */
923 mem_size_t pagefile_usage; /* commit charge in bytes */
924 mem_size_t peak_pagefile_usage; /* peak commit charge in bytes */
928 /* Set a process information */
929 @REQ(set_process_info)
930 obj_handle_t handle; /* process handle */
931 int mask; /* setting mask (see below) */
932 int priority; /* priority class */
933 affinity_t affinity; /* affinity mask */
935 #define SET_PROCESS_INFO_PRIORITY 0x01
936 #define SET_PROCESS_INFO_AFFINITY 0x02
939 /* Retrieve information about a thread */
940 @REQ(get_thread_info)
941 obj_handle_t handle; /* thread handle */
942 unsigned int access; /* required access rights */
944 process_id_t pid; /* server process id */
945 thread_id_t tid; /* server thread id */
946 client_ptr_t teb; /* thread teb pointer */
947 client_ptr_t entry_point; /* thread entry point */
948 affinity_t affinity; /* thread affinity mask */
949 int exit_code; /* thread exit code */
950 int priority; /* thread priority level */
951 int last; /* last thread in process */
952 int suspend_count; /* thread suspend count */
953 int dbg_hidden; /* thread hidden from debugger */
954 data_size_t desc_len; /* description length in bytes */
955 VARARG(desc,unicode_str); /* description string */
959 /* Retrieve information about thread times */
960 @REQ(get_thread_times)
961 obj_handle_t handle; /* thread handle */
963 timeout_t creation_time; /* thread creation time */
964 timeout_t exit_time; /* thread exit time */
965 int unix_pid; /* thread native pid */
966 int unix_tid; /* thread native pid */
970 /* Set a thread information */
971 @REQ(set_thread_info)
972 obj_handle_t handle; /* thread handle */
973 int mask; /* setting mask (see below) */
974 int priority; /* priority class */
975 affinity_t affinity; /* affinity mask */
976 client_ptr_t entry_point; /* thread entry point */
977 obj_handle_t token; /* impersonation token */
978 VARARG(desc,unicode_str); /* description string */
980 #define SET_THREAD_INFO_PRIORITY 0x01
981 #define SET_THREAD_INFO_AFFINITY 0x02
982 #define SET_THREAD_INFO_TOKEN 0x04
983 #define SET_THREAD_INFO_ENTRYPOINT 0x08
984 #define SET_THREAD_INFO_DESCRIPTION 0x10
985 #define SET_THREAD_INFO_DBG_HIDDEN 0x20
988 /* Retrieve information about a module */
990 obj_handle_t handle; /* process handle */
991 mod_handle_t base_address; /* base address of module */
993 client_ptr_t entry_point;
994 data_size_t filename_len; /* buffer len in bytes required to store filename */
995 VARARG(filename,unicode_str); /* file name of module */
999 /* Suspend a thread */
1000 @REQ(suspend_thread)
1001 obj_handle_t handle; /* thread handle */
1003 int count; /* new suspend count */
1007 /* Resume a thread */
1009 obj_handle_t handle; /* thread handle */
1011 int count; /* new suspend count */
1015 /* Notify the server that a dll has been loaded */
1017 data_size_t dbg_offset; /* debug info offset */
1018 mod_handle_t base; /* base address */
1019 client_ptr_t name; /* ptr to ptr to name (in process addr space) */
1020 data_size_t dbg_size; /* debug info size */
1021 VARARG(filename,unicode_str); /* file name of dll */
1025 /* Notify the server that a dll is being unloaded */
1027 mod_handle_t base; /* base address */
1031 /* Queue an APC for a thread or process */
1033 obj_handle_t handle; /* thread or process handle */
1034 apc_call_t call; /* call arguments */
1036 obj_handle_t handle; /* APC handle */
1037 int self; /* run APC in caller itself? */
1041 /* Get the result of an APC call */
1042 @REQ(get_apc_result)
1043 obj_handle_t handle; /* handle to the APC */
1045 apc_result_t result; /* result of the APC */
1049 /* Close a handle for the current process */
1051 obj_handle_t handle; /* handle to close */
1055 /* Set a handle information */
1056 @REQ(set_handle_info)
1057 obj_handle_t handle; /* handle we are interested in */
1058 int flags; /* new handle flags */
1059 int mask; /* mask for flags to set */
1061 int old_flags; /* old flag value */
1065 /* Duplicate a handle */
1067 obj_handle_t src_process; /* src process handle */
1068 obj_handle_t src_handle; /* src handle to duplicate */
1069 obj_handle_t dst_process; /* dst process handle */
1070 unsigned int access; /* wanted access rights */
1071 unsigned int attributes; /* object attributes */
1072 unsigned int options; /* duplicate options (see below) */
1074 obj_handle_t handle; /* duplicated handle in dst process */
1075 int self; /* is the source the current process? */
1076 int closed; /* whether the source handle has been closed */
1078 #define DUP_HANDLE_CLOSE_SOURCE DUPLICATE_CLOSE_SOURCE
1079 #define DUP_HANDLE_SAME_ACCESS DUPLICATE_SAME_ACCESS
1080 #define DUP_HANDLE_MAKE_GLOBAL 0x80000000 /* Not a Windows flag */
1083 /* Make an object temporary */
1084 @REQ(make_temporary)
1085 obj_handle_t handle; /* handle to the object */
1089 /* Open a handle to a process */
1091 process_id_t pid; /* process id to open */
1092 unsigned int access; /* wanted access rights */
1093 unsigned int attributes; /* object attributes */
1095 obj_handle_t handle; /* handle to the process */
1099 /* Open a handle to a thread */
1101 thread_id_t tid; /* thread id to open */
1102 unsigned int access; /* wanted access rights */
1103 unsigned int attributes; /* object attributes */
1105 obj_handle_t handle; /* handle to the thread */
1109 /* Wait for handles */
1111 int flags; /* wait flags (see below) */
1112 client_ptr_t cookie; /* magic cookie to return to client */
1113 abstime_t timeout; /* timeout */
1114 data_size_t size; /* size of select_op */
1115 obj_handle_t prev_apc; /* handle to previous APC */
1116 VARARG(result,apc_result); /* result of previous APC */
1117 VARARG(data,select_op,size); /* operation-specific data */
1118 VARARG(context,context); /* suspend context */
1120 apc_call_t call; /* APC call arguments */
1121 obj_handle_t apc_handle; /* handle to next APC */
1122 VARARG(context,context); /* suspend context */
1124 #define SELECT_ALERTABLE 1
1125 #define SELECT_INTERRUPTIBLE 2
1128 /* Create an event */
1130 unsigned int access; /* wanted access rights */
1131 int manual_reset; /* manual reset event */
1132 int initial_state; /* initial state of the event */
1133 VARARG(objattr,object_attributes); /* object attributes */
1135 obj_handle_t handle; /* handle to the event */
1138 /* Event operation */
1140 obj_handle_t handle; /* handle to event */
1141 int op; /* event operation (see below) */
1143 int state; /* previous state */
1145 enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT };
1148 obj_handle_t handle; /* handle to event */
1150 int manual_reset; /* manual reset event */
1151 int state; /* current state of the event */
1156 unsigned int access; /* wanted access rights */
1157 unsigned int attributes; /* object attributes */
1158 obj_handle_t rootdir; /* root directory */
1159 VARARG(name,unicode_str); /* object name */
1161 obj_handle_t handle; /* handle to the event */
1165 /* Create a keyed event */
1166 @REQ(create_keyed_event)
1167 unsigned int access; /* wanted access rights */
1168 VARARG(objattr,object_attributes); /* object attributes */
1170 obj_handle_t handle; /* handle to the event */
1173 /* Open a keyed event */
1174 @REQ(open_keyed_event)
1175 unsigned int access; /* wanted access rights */
1176 unsigned int attributes; /* object attributes */
1177 obj_handle_t rootdir; /* root directory */
1178 VARARG(name,unicode_str); /* object name */
1180 obj_handle_t handle; /* handle to the event */
1184 /* Create a mutex */
1186 unsigned int access; /* wanted access rights */
1187 int owned; /* initially owned? */
1188 VARARG(objattr,object_attributes); /* object attributes */
1190 obj_handle_t handle; /* handle to the mutex */
1194 /* Release a mutex */
1196 obj_handle_t handle; /* handle to the mutex */
1198 unsigned int prev_count; /* value of internal counter, before release */
1204 unsigned int access; /* wanted access rights */
1205 unsigned int attributes; /* object attributes */
1206 obj_handle_t rootdir; /* root directory */
1207 VARARG(name,unicode_str); /* object name */
1209 obj_handle_t handle; /* handle to the mutex */
1215 obj_handle_t handle; /* handle to mutex */
1217 unsigned int count; /* current count of mutex */
1218 int owned; /* true if owned by current thread */
1219 int abandoned; /* true if abandoned */
1223 /* Create a semaphore */
1224 @REQ(create_semaphore)
1225 unsigned int access; /* wanted access rights */
1226 unsigned int initial; /* initial count */
1227 unsigned int max; /* maximum count */
1228 VARARG(objattr,object_attributes); /* object attributes */
1230 obj_handle_t handle; /* handle to the semaphore */
1234 /* Release a semaphore */
1235 @REQ(release_semaphore)
1236 obj_handle_t handle; /* handle to the semaphore */
1237 unsigned int count; /* count to add to semaphore */
1239 unsigned int prev_count; /* previous semaphore count */
1242 @REQ(query_semaphore)
1243 obj_handle_t handle; /* handle to the semaphore */
1245 unsigned int current; /* current count */
1246 unsigned int max; /* maximum count */
1249 /* Open a semaphore */
1250 @REQ(open_semaphore)
1251 unsigned int access; /* wanted access rights */
1252 unsigned int attributes; /* object attributes */
1253 obj_handle_t rootdir; /* root directory */
1254 VARARG(name,unicode_str); /* object name */
1256 obj_handle_t handle; /* handle to the semaphore */
1262 unsigned int access; /* wanted access rights */
1263 unsigned int sharing; /* sharing flags */
1264 int create; /* file create action */
1265 unsigned int options; /* file options */
1266 unsigned int attrs; /* file attributes for creation */
1267 VARARG(objattr,object_attributes); /* object attributes */
1268 VARARG(filename,string); /* file name */
1270 obj_handle_t handle; /* handle to the file */
1274 /* Open a file object */
1275 @REQ(open_file_object)
1276 unsigned int access; /* wanted access rights */
1277 unsigned int attributes; /* open attributes */
1278 obj_handle_t rootdir; /* root directory */
1279 unsigned int sharing; /* sharing flags */
1280 unsigned int options; /* file options */
1281 VARARG(filename,unicode_str); /* file name */
1283 obj_handle_t handle; /* handle to the file */
1287 /* Allocate a file handle for a Unix fd */
1288 @REQ(alloc_file_handle)
1289 unsigned int access; /* wanted access rights */
1290 unsigned int attributes; /* object attributes */
1291 int fd; /* file descriptor on the client side */
1293 obj_handle_t handle; /* handle to the file */
1297 /* Get the Unix name from a file handle */
1298 @REQ(get_handle_unix_name)
1299 obj_handle_t handle; /* file handle */
1301 data_size_t name_len; /* unix name length */
1302 VARARG(name,string); /* unix name */
1306 /* Get a Unix fd to access a file */
1308 obj_handle_t handle; /* handle to the file */
1310 int type; /* file type (see below) */
1311 int cacheable; /* can fd be cached in the client? */
1312 unsigned int access; /* file access rights */
1313 unsigned int options; /* file open options */
1317 FD_TYPE_INVALID, /* invalid file (no associated fd) */
1318 FD_TYPE_FILE, /* regular file */
1319 FD_TYPE_DIR, /* directory */
1320 FD_TYPE_SOCKET, /* socket */
1321 FD_TYPE_SERIAL, /* serial port */
1322 FD_TYPE_PIPE, /* named pipe */
1323 FD_TYPE_MAILSLOT, /* mailslot */
1324 FD_TYPE_CHAR, /* unspecified char device */
1325 FD_TYPE_DEVICE, /* Windows device file */
1330 /* Retrieve (or allocate) the client-side directory cache entry */
1331 @REQ(get_directory_cache_entry)
1332 obj_handle_t handle; /* handle to the directory */
1334 int entry; /* cache entry on the client side */
1335 VARARG(free,ints); /* entries that can be freed */
1339 /* Flush a file buffers */
1341 async_data_t async; /* async I/O parameters */
1343 obj_handle_t event; /* event set when finished */
1346 /* Query file information */
1348 obj_handle_t handle; /* handle to the file */
1349 unsigned int info_class; /* queried information class */
1351 VARARG(data,bytes); /* file info data */
1354 /* Query volume information */
1355 @REQ(get_volume_info)
1356 obj_handle_t handle; /* handle to the file */
1357 unsigned int info_class; /* queried information class */
1359 VARARG(data,bytes); /* volume info data */
1362 /* Lock a region of a file */
1364 obj_handle_t handle; /* handle to the file */
1365 file_pos_t offset; /* offset of start of lock */
1366 file_pos_t count; /* count of bytes to lock */
1367 int shared; /* shared or exclusive lock? */
1368 int wait; /* do we want to wait? */
1370 obj_handle_t handle; /* handle to wait on */
1371 int overlapped; /* is it an overlapped I/O handle? */
1375 /* Unlock a region of a file */
1377 obj_handle_t handle; /* handle to the file */
1378 file_pos_t offset; /* offset of start of unlock */
1379 file_pos_t count; /* count of bytes to unlock */
1383 /* Create a socket */
1385 unsigned int access; /* wanted access rights */
1386 unsigned int attributes; /* object attributes */
1387 int family; /* family, see socket manpage */
1388 int type; /* type, see socket manpage */
1389 int protocol; /* protocol, see socket manpage */
1390 unsigned int flags; /* socket flags */
1392 obj_handle_t handle; /* handle to the new socket */
1396 /* Accept a socket */
1398 obj_handle_t lhandle; /* handle to the listening socket */
1399 unsigned int access; /* wanted access rights */
1400 unsigned int attributes; /* object attributes */
1402 obj_handle_t handle; /* handle to the new socket */
1406 /* Accept into an initialized socket */
1407 @REQ(accept_into_socket)
1408 obj_handle_t lhandle; /* handle to the listening socket */
1409 obj_handle_t ahandle; /* handle to the accepting socket */
1413 /* Set socket event parameters */
1414 @REQ(set_socket_event)
1415 obj_handle_t handle; /* handle to the socket */
1416 unsigned int mask; /* event mask */
1417 obj_handle_t event; /* event object */
1418 user_handle_t window; /* window to send the message to */
1419 unsigned int msg; /* message to send */
1423 /* Get socket event parameters */
1424 @REQ(get_socket_event)
1425 obj_handle_t handle; /* handle to the socket */
1426 int service; /* clear pending? */
1427 obj_handle_t c_event; /* event to clear */
1429 unsigned int mask; /* event mask */
1430 unsigned int pmask; /* pending events */
1431 unsigned int state; /* status bits */
1432 VARARG(errors,ints); /* event errors */
1436 /* Get socket info */
1437 @REQ(get_socket_info)
1438 obj_handle_t handle; /* handle to the socket */
1440 int family; /* family, see socket manpage */
1441 int type; /* type, see socket manpage */
1442 int protocol; /* protocol, see socket manpage */
1446 /* Re-enable pending socket events */
1447 @REQ(enable_socket_event)
1448 obj_handle_t handle; /* handle to the socket */
1449 unsigned int mask; /* events to re-enable */
1450 unsigned int sstate; /* status bits to set */
1451 unsigned int cstate; /* status bits to clear */
1454 @REQ(set_socket_deferred)
1455 obj_handle_t handle; /* handle to the socket */
1456 obj_handle_t deferred; /* handle to the socket for which accept() is deferred */
1459 /* Allocate a console (only used by a console renderer) */
1461 unsigned int access; /* wanted access rights */
1462 unsigned int attributes; /* object attributes */
1463 process_id_t pid; /* pid of process which shall be attached to the console */
1464 int input_fd; /* if pid=-1 (bare console to current process), fd for input */
1466 obj_handle_t handle_in; /* handle to console input */
1470 /* Free the console of the current process */
1475 /* Attach to a other process's console
*/
1476 @
REQ(attach_console
)
1477 process_id_t pid
; /* pid of attached console process
*/
1481 /* Get the input queue wait event
*/
1482 @
REQ(get_console_wait_event
)
1483 obj_handle_t handle
; /* handle to the console
*/
1489 /* Set info about a
console (input only
) */
1490 @
REQ(set_console_input_info
)
1491 obj_handle_t handle
; /* handle to console input
, or
0 for process
' console */
1492 int mask; /* setting mask (see below) */
1493 obj_handle_t active_sb; /* active screen buffer */
1494 int history_mode; /* whether we duplicate lines in history */
1495 int history_size; /* number of lines in history */
1496 int edition_mode; /* index to the edition mode flavors */
1497 int input_cp; /* console input codepage */
1498 int output_cp; /* console output codepage */
1499 user_handle_t win; /* console window if backend supports it */
1500 VARARG(title,unicode_str); /* console title */
1502 #define SET_CONSOLE_INPUT_INFO_TITLE 0x02
1503 #define SET_CONSOLE_INPUT_INFO_HISTORY_MODE 0x04
1504 #define SET_CONSOLE_INPUT_INFO_HISTORY_SIZE 0x08
1505 #define SET_CONSOLE_INPUT_INFO_EDITION_MODE 0x10
1506 #define SET_CONSOLE_INPUT_INFO_INPUT_CODEPAGE 0x20
1507 #define SET_CONSOLE_INPUT_INFO_OUTPUT_CODEPAGE 0x40
1508 #define SET_CONSOLE_INPUT_INFO_WIN 0x80
1511 /* appends a string to console's history
*/
1512 @
REQ(append_console_input_history
)
1513 obj_handle_t handle
; /* handle to console input
, or
0 for process
' console */
1514 VARARG(line,unicode_str); /* line to add */
1518 /* appends a string to console's history
*/
1519 @
REQ(get_console_input_history
)
1520 obj_handle_t handle
; /* handle to console input
, or
0 for process
' console */
1521 int index; /* index to get line from */
1523 int total; /* total length of line in Unicode chars */
1524 VARARG(line,unicode_str); /* line to add */
1528 /* creates a new screen buffer on process' console
*/
1529 @
REQ(create_console_output
)
1530 obj_handle_t handle_in
; /* handle to console input
, or
0 for process
' console */
1531 unsigned int access; /* wanted access rights */
1532 unsigned int attributes; /* object attributes */
1533 unsigned int share; /* sharing credentials */
1534 int fd; /* for bare consoles, fd the screen-buffer is attached to */
1536 obj_handle_t handle_out; /* handle to the screen buffer */
1540 /* Sends a signal to a process group */
1541 @REQ(send_console_signal)
1542 int signal; /* the signal to send */
1543 process_id_t group_id; /* the group to send the signal to */
1547 /* enable directory change notifications */
1548 @REQ(read_directory_changes)
1549 unsigned int filter; /* notification filter */
1550 int subtree; /* watch the subtree? */
1551 int want_data; /* flag indicating whether change data should be collected */
1552 async_data_t async; /* async I/O parameters */
1557 obj_handle_t handle;
1559 VARARG(events,filesystem_event); /* collected filesystem events */
1563 /* Create a file mapping */
1564 @REQ(create_mapping)
1565 unsigned int access; /* wanted access rights */
1566 unsigned int flags; /* SEC_* flags */
1567 unsigned int file_access; /* file access rights */
1568 mem_size_t size; /* mapping size */
1569 obj_handle_t file_handle; /* file handle */
1570 VARARG(objattr,object_attributes); /* object attributes */
1572 obj_handle_t handle; /* handle to the mapping */
1576 /* Open a mapping */
1578 unsigned int access; /* wanted access rights */
1579 unsigned int attributes; /* object attributes */
1580 obj_handle_t rootdir; /* root directory */
1581 VARARG(name,unicode_str); /* object name */
1583 obj_handle_t handle; /* handle to the mapping */
1587 /* Get information about a file mapping */
1588 @REQ(get_mapping_info)
1589 obj_handle_t handle; /* handle to the mapping */
1590 unsigned int access; /* wanted access rights */
1592 mem_size_t size; /* mapping size */
1593 unsigned int flags; /* SEC_* flags */
1594 obj_handle_t shared_file; /* shared mapping file handle */
1595 VARARG(image,pe_image_info);/* image info for SEC_IMAGE mappings */
1599 /* Add a memory view in the current process */
1601 obj_handle_t mapping; /* file mapping handle */
1602 unsigned int access; /* wanted access rights */
1603 client_ptr_t base; /* view base address (page-aligned) */
1604 mem_size_t size; /* view size */
1605 file_pos_t start; /* start offset in mapping */
1609 /* Unmap a memory view from the current process */
1611 client_ptr_t base; /* view base address */
1615 /* Get a range of committed pages in a file mapping */
1616 @REQ(get_mapping_committed_range)
1617 client_ptr_t base; /* view base address */
1618 file_pos_t offset; /* starting offset (page-aligned, in bytes) */
1620 mem_size_t size; /* size of range starting at offset (page-aligned, in bytes) */
1621 int committed; /* whether it is a committed range */
1625 /* Add a range to the committed pages in a file mapping */
1626 @REQ(add_mapping_committed_range)
1627 client_ptr_t base; /* view base address */
1628 file_pos_t offset; /* starting offset (page-aligned, in bytes) */
1629 mem_size_t size; /* size to set (page-aligned, in bytes) or 0 if only retrieving */
1633 /* Check if two memory maps are for the same file */
1634 @REQ(is_same_mapping)
1635 client_ptr_t base1; /* first view base address */
1636 client_ptr_t base2; /* second view base address */
1642 timeout_t start_time;
1645 int current_priority;
1651 timeout_t start_time;
1652 data_size_t name_len;
1656 process_id_t parent_pid;
1660 /* VARARG(name,unicode_str,name_len); */
1661 /* VARARG(threads,struct thread_info,thread_count); */
1664 /* Get a list of processes and threads currently running */
1665 @REQ(list_processes)
1667 data_size_t info_size;
1669 VARARG(data,process_info,info_size);
1673 /* Wait for a debug event */
1674 @REQ(wait_debug_event)
1675 int get_handle; /* should we alloc a handle for waiting? */
1677 process_id_t pid; /* process id */
1678 thread_id_t tid; /* thread id */
1679 obj_handle_t wait; /* wait handle if no event ready */
1680 VARARG(event,debug_event); /* debug event data */
1684 /* Queue an exception event */
1685 @REQ(queue_exception_event)
1686 int first; /* first chance exception? */
1687 unsigned int code; /* exception code */
1688 unsigned int flags; /* exception flags */
1689 client_ptr_t record; /* exception record */
1690 client_ptr_t address; /* exception address */
1691 data_size_t len; /* size of parameters */
1692 VARARG(params,uints64,len);/* exception parameters */
1694 obj_handle_t handle; /* handle to the queued event */
1698 /* Retrieve the status of an exception event */
1699 @REQ(get_exception_status)
1700 obj_handle_t handle; /* handle to the queued event */
1704 /* Continue a debug event */
1705 @REQ(continue_debug_event)
1706 process_id_t pid; /* process id to continue */
1707 thread_id_t tid; /* thread id to continue */
1708 int status; /* continuation status */
1712 /* Start/stop debugging an existing process */
1714 process_id_t pid; /* id of the process to debug */
1715 int attach; /* 1=attaching / 0=detaching from the process */
1719 /* Set debugger kill on exit flag */
1720 @REQ(set_debugger_kill_on_exit)
1721 int kill_on_exit; /* 0=detach/1=kill debuggee when debugger dies */
1725 /* Read data from a process address space */
1726 @REQ(read_process_memory)
1727 obj_handle_t handle; /* process handle */
1728 client_ptr_t addr; /* addr to read from */
1730 VARARG(data,bytes); /* result data */
1734 /* Write data to a process address space */
1735 @REQ(write_process_memory)
1736 obj_handle_t handle; /* process handle */
1737 client_ptr_t addr; /* addr to write to */
1738 VARARG(data,bytes); /* data to write */
1742 /* Create a registry key */
1744 unsigned int access; /* desired access rights */
1745 unsigned int options; /* creation options */
1746 VARARG(objattr,object_attributes); /* object attributes */
1747 VARARG(class,unicode_str); /* class name */
1749 obj_handle_t hkey; /* handle to the created key */
1750 int created; /* has it been newly created? */
1753 /* Open a registry key */
1755 obj_handle_t parent; /* handle to the parent key */
1756 unsigned int access; /* desired access rights */
1757 unsigned int attributes; /* object attributes */
1758 VARARG(name,unicode_str); /* key name */
1760 obj_handle_t hkey; /* handle to the open key */
1764 /* Delete a registry key */
1766 obj_handle_t hkey; /* handle to the key */
1770 /* Flush a registry key */
1772 obj_handle_t hkey; /* handle to the key */
1776 /* Enumerate registry subkeys */
1778 obj_handle_t hkey; /* handle to registry key */
1779 int index; /* index of subkey (or -1 for current key) */
1780 int info_class; /* requested information class */
1782 int subkeys; /* number of subkeys */
1783 int max_subkey; /* longest subkey name */
1784 int max_class; /* longest class name */
1785 int values; /* number of values */
1786 int max_value; /* longest value name */
1787 int max_data; /* longest value data */
1788 timeout_t modif; /* last modification time */
1789 data_size_t total; /* total length needed for full name and class */
1790 data_size_t namelen; /* length of key name in bytes */
1791 VARARG(name,unicode_str,namelen); /* key name */
1792 VARARG(class,unicode_str); /* class name */
1796 /* Set a value of a registry key */
1798 obj_handle_t hkey; /* handle to registry key */
1799 int type; /* value type */
1800 data_size_t namelen; /* length of value name in bytes */
1801 VARARG(name,unicode_str,namelen); /* value name */
1802 VARARG(data,bytes); /* value data */
1806 /* Retrieve the value of a registry key */
1808 obj_handle_t hkey; /* handle to registry key */
1809 VARARG(name,unicode_str); /* value name */
1811 int type; /* value type */
1812 data_size_t total; /* total length needed for data */
1813 VARARG(data,bytes); /* value data */
1817 /* Enumerate a value of a registry key */
1818 @REQ(enum_key_value)
1819 obj_handle_t hkey; /* handle to registry key */
1820 int index; /* value index */
1821 int info_class; /* requested information class */
1823 int type; /* value type */
1824 data_size_t total; /* total length needed for full name and data */
1825 data_size_t namelen; /* length of value name in bytes */
1826 VARARG(name,unicode_str,namelen); /* value name */
1827 VARARG(data,bytes); /* value data */
1831 /* Delete a value of a registry key */
1832 @REQ(delete_key_value)
1833 obj_handle_t hkey; /* handle to registry key */
1834 VARARG(name,unicode_str); /* value name */
1838 /* Load a registry branch from a file */
1840 obj_handle_t file; /* file to load from */
1841 VARARG(objattr,object_attributes); /* object attributes */
1845 /* UnLoad a registry branch from a file */
1846 @REQ(unload_registry)
1847 obj_handle_t hkey; /* root key to unload to */
1851 /* Save a registry branch to a file */
1853 obj_handle_t hkey; /* key to save */
1854 obj_handle_t file; /* file to save to */
1858 /* Add a registry key change notification */
1859 @REQ(set_registry_notification)
1860 obj_handle_t hkey; /* key to watch for changes */
1861 obj_handle_t event; /* event to set */
1862 int subtree; /* should we watch the whole subtree? */
1863 unsigned int filter; /* things to watch */
1867 /* Create a waitable timer */
1869 unsigned int access; /* wanted access rights */
1870 int manual; /* manual reset */
1871 VARARG(objattr,object_attributes); /* object attributes */
1873 obj_handle_t handle; /* handle to the timer */
1877 /* Open a waitable timer */
1879 unsigned int access; /* wanted access rights */
1880 unsigned int attributes; /* object attributes */
1881 obj_handle_t rootdir; /* root directory */
1882 VARARG(name,unicode_str); /* object name */
1884 obj_handle_t handle; /* handle to the timer */
1887 /* Set a waitable timer */
1889 obj_handle_t handle; /* handle to the timer */
1890 timeout_t expire; /* next expiration absolute time */
1891 client_ptr_t callback; /* callback function */
1892 client_ptr_t arg; /* callback argument */
1893 int period; /* timer period in ms */
1895 int signaled; /* was the timer signaled before this call ? */
1898 /* Cancel a waitable timer */
1900 obj_handle_t handle; /* handle to the timer */
1902 int signaled; /* was the timer signaled before this calltime ? */
1905 /* Get information on a waitable timer */
1906 @REQ(get_timer_info)
1907 obj_handle_t handle; /* handle to the timer */
1909 timeout_t when; /* absolute time when the timer next expires */
1910 int signaled; /* is the timer signaled? */
1914 /* Retrieve the current context of a thread */
1915 @REQ(get_thread_context)
1916 obj_handle_t handle; /* thread or context handle */
1917 unsigned int flags; /* context flags */
1919 int self; /* was it a handle to the current thread? */
1920 obj_handle_t handle; /* pending context handle */
1921 VARARG(context,context); /* thread context */
1925 /* Set the current context of a thread */
1926 @REQ(set_thread_context)
1927 obj_handle_t handle; /* thread handle */
1928 VARARG(context,context); /* thread context */
1930 int self; /* was it a handle to the current thread? */
1934 /* Fetch a selector entry for a thread */
1935 @REQ(get_selector_entry)
1936 obj_handle_t handle; /* thread handle */
1937 int entry; /* LDT entry */
1939 unsigned int base; /* selector base */
1940 unsigned int limit; /* selector limit */
1941 unsigned char flags; /* selector flags */
1947 obj_handle_t table; /* which table to add atom to */
1948 VARARG(name,unicode_str); /* atom name */
1950 atom_t atom; /* resulting atom */
1954 /* Delete an atom */
1956 obj_handle_t table; /* which table to delete atom from */
1957 atom_t atom; /* atom handle */
1963 obj_handle_t table; /* which table to find atom from */
1964 VARARG(name,unicode_str); /* atom name */
1966 atom_t atom; /* atom handle */
1970 /* Get information about an atom */
1971 @REQ(get_atom_information)
1972 obj_handle_t table; /* which table to find atom from */
1973 atom_t atom; /* atom handle */
1975 int count; /* atom lock count */
1976 int pinned; /* whether the atom has been pinned */
1977 data_size_t total; /* actual length of atom name */
1978 VARARG(name,unicode_str); /* atom name */
1982 /* Set information about an atom */
1983 @REQ(set_atom_information)
1984 obj_handle_t table; /* which table to find atom from */
1985 atom_t atom; /* atom handle */
1986 int pinned; /* whether to bump atom information */
1990 /* Empty an atom table */
1991 @REQ(empty_atom_table)
1992 obj_handle_t table; /* which table to find atom from */
1993 int if_pinned; /* whether to delete pinned atoms */
1997 /* Init an atom table */
1998 @REQ(init_atom_table)
1999 int entries; /* number of entries (only for local) */
2001 obj_handle_t table; /* handle to the atom table */
2005 /* Get the message queue of the current thread */
2008 obj_handle_t handle; /* handle to the queue */
2012 /* Set the file descriptor associated to the current thread queue */
2014 obj_handle_t handle; /* handle to the file descriptor */
2018 /* Set the current message queue wakeup mask */
2019 @REQ(set_queue_mask)
2020 unsigned int wake_mask; /* wakeup bits mask */
2021 unsigned int changed_mask; /* changed bits mask */
2022 int skip_wait; /* will we skip waiting if signaled? */
2024 unsigned int wake_bits; /* current wake bits */
2025 unsigned int changed_bits; /* current changed bits */
2029 /* Get the current message queue status */
2030 @REQ(get_queue_status)
2031 unsigned int clear_bits; /* should we clear the change bits? */
2033 unsigned int wake_bits; /* wake bits */
2034 unsigned int changed_bits; /* changed bits since last time */
2038 /* Retrieve the process idle event */
2039 @REQ(get_process_idle_event)
2040 obj_handle_t handle; /* process handle */
2042 obj_handle_t event; /* handle to idle event */
2046 /* Send a message to a thread queue */
2048 thread_id_t id; /* thread id */
2049 int type; /* message type (see below) */
2050 int flags; /* message flags (see below) */
2051 user_handle_t win; /* window handle */
2052 unsigned int msg; /* message code */
2053 lparam_t wparam; /* parameters */
2054 lparam_t lparam; /* parameters */
2055 timeout_t timeout; /* timeout for reply */
2056 VARARG(data,message_data); /* message data for sent messages */
2059 @REQ(post_quit_message)
2060 int exit_code; /* exit code to return */
2065 MSG_ASCII, /* Ascii message (from SendMessageA) */
2066 MSG_UNICODE, /* Unicode message (from SendMessageW) */
2067 MSG_NOTIFY, /* notify message (from SendNotifyMessageW), always Unicode */
2068 MSG_CALLBACK, /* callback message (from SendMessageCallbackW), always Unicode */
2069 MSG_CALLBACK_RESULT,/* result of a callback message */
2070 MSG_OTHER_PROCESS, /* sent from other process, may include vararg data, always Unicode */
2071 MSG_POSTED, /* posted message (from PostMessageW), always Unicode */
2072 MSG_HARDWARE, /* hardware message */
2073 MSG_WINEVENT, /* winevent message */
2074 MSG_HOOK_LL /* low-level hardware hook */
2076 #define SEND_MSG_ABORT_IF_HUNG 0x01
2079 /* Send a hardware message to a thread queue */
2080 @REQ(send_hardware_message)
2081 user_handle_t win; /* window handle */
2082 hw_input_t input; /* input data */
2083 unsigned int flags; /* flags (see below) */
2085 int wait; /* do we need to wait for a reply? */
2086 int prev_x; /* previous cursor position */
2088 int new_x; /* new cursor position */
2090 VARARG(keystate,bytes); /* global state array for all the keys */
2092 #define SEND_HWMSG_INJECTED 0x01
2095 /* Get a message from the current queue */
2097 unsigned int flags; /* PM_* flags */
2098 user_handle_t get_win; /* window handle to get */
2099 unsigned int get_first; /* first message code to get */
2100 unsigned int get_last; /* last message code to get */
2101 unsigned int hw_id; /* id of the previous hardware message (or 0) */
2102 unsigned int wake_mask; /* wakeup bits mask */
2103 unsigned int changed_mask; /* changed bits mask */
2105 user_handle_t win; /* window handle */
2106 unsigned int msg; /* message code */
2107 lparam_t wparam; /* parameters */
2108 lparam_t lparam; /* parameters */
2109 int type; /* message type */
2110 int x; /* message x position */
2111 int y; /* message y position */
2112 unsigned int time; /* message time */
2113 unsigned int active_hooks; /* active hooks bitmap */
2114 data_size_t total; /* total size of extra data */
2115 VARARG(data,message_data); /* message data for sent messages */
2119 /* Reply to a sent message */
2121 int remove; /* should we remove the message? */
2122 lparam_t result; /* message result */
2123 VARARG(data,bytes); /* message data for sent messages */
2127 /* Accept and remove the current hardware message */
2128 @REQ(accept_hardware_message)
2129 unsigned int hw_id; /* id of the hardware message */
2133 /* Retrieve the reply for the last message sent */
2134 @REQ(get_message_reply)
2135 int cancel; /* cancel message if not ready? */
2137 lparam_t result; /* message result */
2138 VARARG(data,bytes); /* message data for sent messages */
2142 /* Set a window timer */
2144 user_handle_t win; /* window handle */
2145 unsigned int msg; /* message to post */
2146 unsigned int rate; /* timer rate in ms */
2147 lparam_t id; /* timer id */
2148 lparam_t lparam; /* message lparam (callback proc) */
2150 lparam_t id; /* timer id */
2154 /* Kill a window timer */
2155 @REQ(kill_win_timer)
2156 user_handle_t win; /* window handle */
2157 lparam_t id; /* timer id */
2158 unsigned int msg; /* message to post */
2162 /* check if the thread owning the window is hung */
2163 @REQ(is_window_hung)
2164 user_handle_t win; /* window handle */
2170 /* Retrieve info about a serial port */
2171 @REQ(get_serial_info)
2172 obj_handle_t handle; /* handle to comm port */
2175 unsigned int eventmask;
2176 unsigned int cookie;
2177 unsigned int pending_write;
2181 /* Set info about a serial port */
2182 @REQ(set_serial_info)
2183 obj_handle_t handle; /* handle to comm port */
2184 int flags; /* bitmask to set values (see below) */
2186 #define SERIALINFO_PENDING_WRITE 0x04
2187 #define SERIALINFO_PENDING_WAIT 0x08
2190 /* Create an async I/O */
2191 @REQ(register_async)
2192 int type; /* type of queue to look after */
2193 async_data_t async; /* async I/O parameters */
2194 int count; /* count - usually # of bytes to be read/written */
2196 #define ASYNC_TYPE_READ 0x01
2197 #define ASYNC_TYPE_WRITE 0x02
2198 #define ASYNC_TYPE_WAIT 0x03
2201 /* Cancel all async op on a fd */
2203 obj_handle_t handle; /* handle to comm port, socket or file */
2204 client_ptr_t iosb; /* I/O status block (NULL=all) */
2205 int only_thread; /* cancel matching this thread */
2209 /* Retrieve results of an async */
2210 @REQ(get_async_result)
2211 client_ptr_t user_arg; /* user arg used to identify async */
2213 data_size_t size; /* result size (input or output depending on the operation) */
2214 VARARG(out_data,bytes); /* iosb output data */
2218 /* Perform a read on a file object */
2220 async_data_t async; /* async I/O parameters */
2221 file_pos_t pos; /* read position */
2223 obj_handle_t wait; /* handle to wait on for blocking read */
2224 unsigned int options; /* device open options */
2225 VARARG(data,bytes); /* read data */
2229 /* Perform a write on a file object */
2231 async_data_t async; /* async I/O parameters */
2232 file_pos_t pos; /* write position */
2233 VARARG(data,bytes); /* write data */
2235 obj_handle_t wait; /* handle to wait on for blocking write */
2236 unsigned int options; /* device open options */
2237 data_size_t size; /* size written */
2241 /* Perform an ioctl on a file */
2243 ioctl_code_t code; /* ioctl code */
2244 async_data_t async; /* async I/O parameters */
2245 VARARG(in_data,bytes); /* ioctl input data */
2247 obj_handle_t wait; /* handle to wait on for blocking ioctl */
2248 unsigned int options; /* device open options */
2249 VARARG(out_data,bytes); /* ioctl output data */
2253 /* Store results of an async irp */
2254 @REQ(set_irp_result)
2255 obj_handle_t handle; /* handle to the irp */
2256 unsigned int status; /* status of the irp */
2257 data_size_t size; /* result size (input or output depending on the operation) */
2258 VARARG(data,bytes); /* output data of the irp */
2262 /* Create a named pipe */
2263 @REQ(create_named_pipe)
2264 unsigned int access;
2265 unsigned int options;
2266 unsigned int sharing;
2267 unsigned int maxinstances;
2268 unsigned int outsize;
2269 unsigned int insize;
2272 VARARG(objattr,object_attributes); /* object attributes */
2274 obj_handle_t handle; /* handle to the pipe */
2277 /* flags in create_named_pipe and get_named_pipe_info */
2278 #define NAMED_PIPE_MESSAGE_STREAM_WRITE 0x0001
2279 #define NAMED_PIPE_MESSAGE_STREAM_READ 0x0002
2280 #define NAMED_PIPE_NONBLOCKING_MODE 0x0004
2281 #define NAMED_PIPE_SERVER_END 0x8000
2283 /* Set named pipe information by handle */
2284 @REQ(set_named_pipe_info)
2285 obj_handle_t handle;
2289 /* Create a window */
2291 user_handle_t parent; /* parent window */
2292 user_handle_t owner; /* owner window */
2293 atom_t atom; /* class atom */
2294 mod_handle_t instance; /* module instance */
2295 int dpi; /* system DPI */
2296 int awareness; /* thread DPI awareness */
2297 VARARG(class,unicode_str); /* class name */
2299 user_handle_t handle; /* created window */
2300 user_handle_t parent; /* full handle of parent */
2301 user_handle_t owner; /* full handle of owner */
2302 int extra; /* number of extra bytes */
2303 client_ptr_t class_ptr; /* pointer to class in client address space */
2304 int dpi; /* window DPI if not per-monitor aware */
2305 int awareness; /* window DPI awareness */
2309 /* Destroy a window */
2310 @REQ(destroy_window)
2311 user_handle_t handle; /* handle to the window */
2315 /* Retrieve the desktop window for the current thread */
2316 @REQ(get_desktop_window)
2317 int force; /* force creation if it doesn't exist
*/
2319 user_handle_t top_window
; /* handle to the desktop window
*/
2320 user_handle_t msg_window
; /* handle to the top
-level HWND_MESSAGE parent
*/
2324 /* Set a window owner
*/
2325 @
REQ(set_window_owner
)
2326 user_handle_t handle
; /* handle to the window
*/
2327 user_handle_t owner
; /* new owner
*/
2329 user_handle_t full_owner
; /* full handle of new owner
*/
2330 user_handle_t prev_owner
; /* full handle of previous owner
*/
2334 /* Get information from a window handle
*/
2335 @
REQ(get_window_info
)
2336 user_handle_t handle
; /* handle to the window
*/
2338 user_handle_t full_handle
; /* full
32-bit handle
*/
2339 user_handle_t last_active
; /* last active popup
*/
2340 process_id_t pid
; /* process owning the window
*/
2341 thread_id_t tid
; /* thread owning the window
*/
2342 atom_t atom
; /* class atom
*/
2343 int is_unicode
; /* ANSI or unicode
*/
2344 int dpi
; /* window DPI
*/
2345 int awareness
; /* DPI awareness
*/
2349 /* Set some information in a window
*/
2350 @
REQ(set_window_info
)
2351 unsigned short flags
; /* flags for fields to
set (see below
) */
2352 short int is_unicode
; /* ANSI or unicode
*/
2353 user_handle_t handle
; /* handle to the window
*/
2354 unsigned int style
; /* window style
*/
2355 unsigned int ex_style
; /* window extended style
*/
2356 unsigned int id
; /* window id
*/
2357 mod_handle_t instance
; /* creator instance
*/
2358 lparam_t user_data
; /* user
-specific data
*/
2359 int extra_offset
; /* offset to set in extra bytes
*/
2360 data_size_t extra_size
; /* size to set in extra bytes
*/
2361 lparam_t extra_value
; /* value to set in extra bytes
*/
2363 unsigned int old_style
; /* old window style
*/
2364 unsigned int old_ex_style
; /* old window extended style
*/
2365 mod_handle_t old_instance
; /* old creator instance
*/
2366 lparam_t old_user_data
; /* old user
-specific data
*/
2367 lparam_t old_extra_value
; /* old value in extra bytes
*/
2368 unsigned int old_id
; /* old window id
*/
2370 #define SET_WIN_STYLE
0x01
2371 #define SET_WIN_EXSTYLE
0x02
2372 #define SET_WIN_ID
0x04
2373 #define SET_WIN_INSTANCE
0x08
2374 #define SET_WIN_USERDATA
0x10
2375 #define SET_WIN_EXTRA
0x20
2376 #define SET_WIN_UNICODE
0x40
2379 /* Set the parent of a window
*/
2381 user_handle_t handle
; /* handle to the window
*/
2382 user_handle_t parent
; /* handle to the parent
*/
2384 user_handle_t old_parent
; /* old parent window
*/
2385 user_handle_t full_parent
; /* full handle of new parent
*/
2386 int dpi
; /* new window DPI if not per
-monitor aware
*/
2387 int awareness
; /* new DPI awareness
*/
2391 /* Get a list of the window parents
, up to the root of the tree
*/
2392 @
REQ(get_window_parents
)
2393 user_handle_t handle
; /* handle to the window
*/
2395 int count
; /* total count of parents
*/
2396 VARARG(parents
,user_handles
); /* parent handles
*/
2400 /* Get a list of the window children
*/
2401 @
REQ(get_window_children
)
2402 obj_handle_t desktop
; /* handle to desktop
*/
2403 user_handle_t parent
; /* parent window
*/
2404 atom_t atom
; /* class atom for the listed children
*/
2405 thread_id_t tid
; /* thread owning the listed children
*/
2406 VARARG(class
,unicode_str
); /* class name
*/
2408 int count
; /* total count of children
*/
2409 VARARG(children
,user_handles
); /* children handles
*/
2413 /* Get a list of the window children that contain a given point
*/
2414 @
REQ(get_window_children_from_point
)
2415 user_handle_t parent
; /* parent window
*/
2416 int x
; /* point in parent coordinates
*/
2418 int dpi
; /* dpi for the point coordinates
*/
2420 int count
; /* total count of children
*/
2421 VARARG(children
,user_handles
); /* children handles
*/
2425 /* Get window tree information from a window handle
*/
2426 @
REQ(get_window_tree
)
2427 user_handle_t handle
; /* handle to the window
*/
2429 user_handle_t parent
; /* parent window
*/
2430 user_handle_t owner
; /* owner window
*/
2431 user_handle_t next_sibling
; /* next sibling in Z
-order
*/
2432 user_handle_t prev_sibling
; /* prev sibling in Z
-order
*/
2433 user_handle_t first_sibling
; /* first sibling in Z
-order
*/
2434 user_handle_t last_sibling
; /* last sibling in Z
-order
*/
2435 user_handle_t first_child
; /* first child
*/
2436 user_handle_t last_child
; /* last child
*/
2439 /* Set the position and Z order of a window
*/
2440 @
REQ(set_window_pos
)
2441 unsigned short swp_flags
; /* SWP_
* flags
*/
2442 unsigned short paint_flags
; /* paint
flags (see below
) */
2443 user_handle_t handle
; /* handle to the window
*/
2444 user_handle_t previous
; /* previous window in Z order
*/
2445 rectangle_t window
; /* window
rectangle (in parent coords
) */
2446 rectangle_t client
; /* client
rectangle (in parent coords
) */
2447 VARARG(valid
,rectangles
); /* valid rectangles from
WM_NCCALCSIZE (in parent coords
) */
2449 unsigned int new_style
; /* new window style
*/
2450 unsigned int new_ex_style
; /* new window extended style
*/
2451 user_handle_t surface_win
; /* parent window that holds the surface
*/
2452 int needs_update
; /* whether the surface region needs an update
*/
2454 #define SET_WINPOS_PAINT_SURFACE
0x01 /* window has a paintable surface
*/
2455 #define SET_WINPOS_PIXEL_FORMAT
0x02 /* window has a custom pixel format
*/
2457 /* Get the window and client rectangles of a window
*/
2458 @
REQ(get_window_rectangles
)
2459 user_handle_t handle
; /* handle to the window
*/
2460 int relative
; /* coords relative
to (see below
) */
2461 int dpi
; /* DPI to map to
, or zero for per
-monitor DPI
*/
2463 rectangle_t window
; /* window rectangle
*/
2464 rectangle_t client
; /* client rectangle
*/
2466 enum coords_relative
2468 COORDS_CLIENT
, /* relative to client area
*/
2469 COORDS_WINDOW
, /* relative to whole window area
*/
2470 COORDS_PARENT
, /* relative to parent
's client area */
2471 COORDS_SCREEN /* relative to screen origin */
2475 /* Get the window text */
2476 @REQ(get_window_text)
2477 user_handle_t handle; /* handle to the window */
2479 data_size_t length; /* total length in WCHARs */
2480 VARARG(text,unicode_str); /* window text */
2484 /* Set the window text */
2485 @REQ(set_window_text)
2486 user_handle_t handle; /* handle to the window */
2487 VARARG(text,unicode_str); /* window text */
2491 /* Get the coordinates offset between two windows */
2492 @REQ(get_windows_offset)
2493 user_handle_t from; /* handle to the first window */
2494 user_handle_t to; /* handle to the second window */
2495 int dpi; /* DPI to map to, or zero for per-monitor DPI */
2497 int x; /* x coordinate offset */
2498 int y; /* y coordinate offset */
2499 int mirror; /* whether to mirror the x coordinate */
2503 /* Get the visible region of a window */
2504 @REQ(get_visible_region)
2505 user_handle_t window; /* handle to the window */
2506 unsigned int flags; /* DCX flags */
2508 user_handle_t top_win; /* top window to clip against */
2509 rectangle_t top_rect; /* top window visible rect with screen coords */
2510 rectangle_t win_rect; /* window rect in screen coords */
2511 unsigned int paint_flags; /* paint flags (from SET_WINPOS_* flags) */
2512 data_size_t total_size; /* total size of the resulting region */
2513 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2517 /* Get the visible surface region of a window */
2518 @REQ(get_surface_region)
2519 user_handle_t window; /* handle to the window */
2521 rectangle_t visible_rect; /* window visible rect in screen coords */
2522 data_size_t total_size; /* total size of the resulting region */
2523 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2527 /* Get the window region */
2528 @REQ(get_window_region)
2529 user_handle_t window; /* handle to the window */
2531 data_size_t total_size; /* total size of the resulting region */
2532 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2536 /* Set the window region */
2537 @REQ(set_window_region)
2538 user_handle_t window; /* handle to the window */
2539 int redraw; /* redraw the window? */
2540 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2544 /* Get the window update region */
2545 @REQ(get_update_region)
2546 user_handle_t window; /* handle to the window */
2547 user_handle_t from_child; /* child to start searching from */
2548 unsigned int flags; /* update flags (see below) */
2550 user_handle_t child; /* child to repaint (or window itself) */
2551 unsigned int flags; /* resulting update flags (see below) */
2552 data_size_t total_size; /* total size of the resulting region */
2553 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2555 #define UPDATE_NONCLIENT 0x001 /* get region for repainting non-client area */
2556 #define UPDATE_ERASE 0x002 /* get region for erasing client area */
2557 #define UPDATE_PAINT 0x004 /* get region for painting client area */
2558 #define UPDATE_INTERNALPAINT 0x008 /* get region if internal paint is pending */
2559 #define UPDATE_ALLCHILDREN 0x010 /* force repaint of all children */
2560 #define UPDATE_NOCHILDREN 0x020 /* don't try to repaint any children
*/
2561 #define UPDATE_NOREGION
0x040 /* don
't return a region, only the flags */
2562 #define UPDATE_DELAYED_ERASE 0x080 /* still needs erase after BeginPaint */
2563 #define UPDATE_CLIPCHILDREN 0x100 /* remove clipped children from the update region */
2566 /* Update the z order of a window so that a given rectangle is fully visible */
2567 @REQ(update_window_zorder)
2568 user_handle_t window; /* handle to the window */
2569 rectangle_t rect; /* rectangle that must be visible (in client coords) */
2573 /* Mark parts of a window as needing a redraw */
2575 user_handle_t window; /* handle to the window */
2576 unsigned int flags; /* RDW_* flags */
2577 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2581 /* Set a window property */
2582 @REQ(set_window_property)
2583 user_handle_t window; /* handle to the window */
2584 lparam_t data; /* data to store */
2585 atom_t atom; /* property atom (if no name specified) */
2586 VARARG(name,unicode_str); /* property name */
2590 /* Remove a window property */
2591 @REQ(remove_window_property)
2592 user_handle_t window; /* handle to the window */
2593 atom_t atom; /* property atom (if no name specified) */
2594 VARARG(name,unicode_str); /* property name */
2596 lparam_t data; /* data stored in property */
2600 /* Get a window property */
2601 @REQ(get_window_property)
2602 user_handle_t window; /* handle to the window */
2603 atom_t atom; /* property atom (if no name specified) */
2604 VARARG(name,unicode_str); /* property name */
2606 lparam_t data; /* data stored in property */
2610 /* Get the list of properties of a window */
2611 @REQ(get_window_properties)
2612 user_handle_t window; /* handle to the window */
2614 int total; /* total number of properties */
2615 VARARG(props,properties); /* list of properties */
2619 /* Create a window station */
2620 @REQ(create_winstation)
2621 unsigned int flags; /* window station flags */
2622 unsigned int access; /* wanted access rights */
2623 unsigned int attributes; /* object attributes */
2624 obj_handle_t rootdir; /* root directory */
2625 VARARG(name,unicode_str); /* object name */
2627 obj_handle_t handle; /* handle to the window station */
2631 /* Open a handle to a window station */
2632 @REQ(open_winstation)
2633 unsigned int access; /* wanted access rights */
2634 unsigned int attributes; /* object attributes */
2635 obj_handle_t rootdir; /* root directory */
2636 VARARG(name,unicode_str); /* object name */
2638 obj_handle_t handle; /* handle to the window station */
2642 /* Close a window station */
2643 @REQ(close_winstation)
2644 obj_handle_t handle; /* handle to the window station */
2648 /* Get the process current window station */
2649 @REQ(get_process_winstation)
2651 obj_handle_t handle; /* handle to the window station */
2655 /* Set the process current window station */
2656 @REQ(set_process_winstation)
2657 obj_handle_t handle; /* handle to the window station */
2661 /* Enumerate window stations */
2662 @REQ(enum_winstation)
2663 unsigned int index; /* current index */
2665 unsigned int next; /* next index */
2666 VARARG(name,unicode_str); /* window station name */
2670 /* Create a desktop */
2671 @REQ(create_desktop)
2672 unsigned int flags; /* desktop flags */
2673 unsigned int access; /* wanted access rights */
2674 unsigned int attributes; /* object attributes */
2675 VARARG(name,unicode_str); /* object name */
2677 obj_handle_t handle; /* handle to the desktop */
2681 /* Open a handle to a desktop */
2683 obj_handle_t winsta; /* window station to open (null allowed) */
2684 unsigned int flags; /* desktop flags */
2685 unsigned int access; /* wanted access rights */
2686 unsigned int attributes; /* object attributes */
2687 VARARG(name,unicode_str); /* object name */
2689 obj_handle_t handle; /* handle to the desktop */
2693 /* Open a handle to current input desktop */
2694 @REQ(open_input_desktop)
2695 unsigned int flags; /* desktop flags */
2696 unsigned int access; /* wanted access rights */
2697 unsigned int attributes; /* object attributes */
2699 obj_handle_t handle; /* handle to the desktop */
2703 /* Close a desktop */
2705 obj_handle_t handle; /* handle to the desktop */
2709 /* Get the thread current desktop */
2710 @REQ(get_thread_desktop)
2711 thread_id_t tid; /* thread id */
2713 obj_handle_t handle; /* handle to the desktop */
2717 /* Set the thread current desktop */
2718 @REQ(set_thread_desktop)
2719 obj_handle_t handle; /* handle to the desktop */
2723 /* Enumerate desktops */
2725 obj_handle_t winstation; /* handle to the window station */
2726 unsigned int index; /* current index */
2728 unsigned int next; /* next index */
2729 VARARG(name,unicode_str); /* window station name */
2733 /* Get/set information about a user object (window station or desktop) */
2734 @REQ(set_user_object_info)
2735 obj_handle_t handle; /* handle to the object */
2736 unsigned int flags; /* information to set/get */
2737 unsigned int obj_flags; /* new object flags */
2739 int is_desktop; /* is object a desktop? */
2740 unsigned int old_obj_flags; /* old object flags */
2741 VARARG(name,unicode_str); /* object name */
2743 #define SET_USER_OBJECT_SET_FLAGS 1
2744 #define SET_USER_OBJECT_GET_FULL_NAME 2
2747 /* Register a hotkey */
2748 @REQ(register_hotkey)
2749 user_handle_t window; /* handle to the window */
2750 int id; /* hotkey identifier */
2751 unsigned int flags; /* modifier keys */
2752 unsigned int vkey; /* virtual key code */
2754 int replaced; /* did we replace an existing hotkey? */
2755 unsigned int flags; /* flags of replaced hotkey */
2756 unsigned int vkey; /* virtual key code of replaced hotkey */
2760 /* Unregister a hotkey */
2761 @REQ(unregister_hotkey)
2762 user_handle_t window; /* handle to the window */
2763 int id; /* hotkey identifier */
2765 unsigned int flags; /* flags of removed hotkey */
2766 unsigned int vkey; /* virtual key code of removed hotkey */
2770 /* Attach (or detach) thread inputs */
2771 @REQ(attach_thread_input)
2772 thread_id_t tid_from; /* thread to be attached */
2773 thread_id_t tid_to; /* thread to which tid_from should be attached */
2774 int attach; /* is it an attach? */
2778 /* Get input data for a given thread */
2779 @REQ(get_thread_input)
2780 thread_id_t tid; /* id of thread */
2782 user_handle_t focus; /* handle to the focus window */
2783 user_handle_t capture; /* handle to the capture window */
2784 user_handle_t active; /* handle to the active window */
2785 user_handle_t foreground; /* handle to the global foreground window */
2786 user_handle_t menu_owner; /* handle to the menu owner */
2787 user_handle_t move_size; /* handle to the moving/resizing window */
2788 user_handle_t caret; /* handle to the caret window */
2789 user_handle_t cursor; /* handle to the cursor */
2790 int show_count; /* cursor show count */
2791 rectangle_t rect; /* caret rectangle */
2795 /* Get the time of the last input event */
2796 @REQ(get_last_input_time)
2802 /* Retrieve queue keyboard state for a given thread */
2804 thread_id_t tid; /* id of thread */
2805 int key; /* optional key code or -1 */
2807 unsigned char state; /* state of specified key */
2808 VARARG(keystate,bytes); /* state array for all the keys */
2811 /* Set queue keyboard state for a given thread */
2813 thread_id_t tid; /* id of thread */
2814 int async; /* whether to change the async state too */
2815 VARARG(keystate,bytes); /* state array for all the keys */
2818 /* Set the system foreground window */
2819 @REQ(set_foreground_window)
2820 user_handle_t handle; /* handle to the foreground window */
2822 user_handle_t previous; /* handle to the previous foreground window */
2823 int send_msg_old; /* whether we have to send a msg to the old window */
2824 int send_msg_new; /* whether we have to send a msg to the new window */
2827 /* Set the current thread focus window */
2828 @REQ(set_focus_window)
2829 user_handle_t handle; /* handle to the focus window */
2831 user_handle_t previous; /* handle to the previous focus window */
2834 /* Set the current thread active window */
2835 @REQ(set_active_window)
2836 user_handle_t handle; /* handle to the active window */
2838 user_handle_t previous; /* handle to the previous active window */
2841 /* Set the current thread capture window */
2842 @REQ(set_capture_window)
2843 user_handle_t handle; /* handle to the capture window */
2844 unsigned int flags; /* capture flags (see below) */
2846 user_handle_t previous; /* handle to the previous capture window */
2847 user_handle_t full_handle; /* full 32-bit handle of new capture window */
2849 #define CAPTURE_MENU 0x01 /* capture is for a menu */
2850 #define CAPTURE_MOVESIZE 0x02 /* capture is for moving/resizing */
2853 /* Set the current thread caret window */
2854 @REQ(set_caret_window)
2855 user_handle_t handle; /* handle to the caret window */
2856 int width; /* caret width */
2857 int height; /* caret height */
2859 user_handle_t previous; /* handle to the previous caret window */
2860 rectangle_t old_rect; /* previous caret rectangle */
2861 int old_hide; /* previous hide count */
2862 int old_state; /* previous caret state (1=on, 0=off) */
2866 /* Set the current thread caret information */
2867 @REQ(set_caret_info)
2868 unsigned int flags; /* caret flags (see below) */
2869 user_handle_t handle; /* handle to the caret window */
2870 int x; /* caret x position */
2871 int y; /* caret y position */
2872 int hide; /* increment for hide count (can be negative to show it) */
2873 int state; /* caret state (see below) */
2875 user_handle_t full_handle; /* handle to the current caret window */
2876 rectangle_t old_rect; /* previous caret rectangle */
2877 int old_hide; /* previous hide count */
2878 int old_state; /* previous caret state (1=on, 0=off) */
2880 #define SET_CARET_POS 0x01 /* set the caret position from x,y */
2881 #define SET_CARET_HIDE 0x02 /* increment the caret hide count */
2882 #define SET_CARET_STATE 0x04 /* set the caret on/off state */
2885 CARET_STATE_OFF, /* off */
2886 CARET_STATE_ON, /* on */
2887 CARET_STATE_TOGGLE, /* toggle current state */
2888 CARET_STATE_ON_IF_MOVED /* on if the position differs, unchanged otherwise */
2892 /* Set a window hook */
2894 int id; /* id of the hook */
2895 process_id_t pid; /* id of process to set the hook into */
2896 thread_id_t tid; /* id of thread to set the hook into */
2899 client_ptr_t proc; /* hook procedure */
2901 int unicode; /* is it a unicode hook? */
2902 VARARG(module,unicode_str); /* module name */
2904 user_handle_t handle; /* handle to the hook */
2905 unsigned int active_hooks; /* active hooks bitmap */
2909 /* Remove a window hook */
2911 user_handle_t handle; /* handle to the hook */
2912 client_ptr_t proc; /* hook procedure if handle is 0 */
2913 int id; /* id of the hook if handle is 0 */
2915 unsigned int active_hooks; /* active hooks bitmap */
2919 /* Start calling a hook chain */
2920 @REQ(start_hook_chain)
2921 int id; /* id of the hook */
2922 int event; /* signalled event */
2923 user_handle_t window; /* handle to the event window */
2924 int object_id; /* object id for out of context winevent */
2925 int child_id; /* child id for out of context winevent */
2927 user_handle_t handle; /* handle to the next hook */
2928 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2929 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2930 int unicode; /* is it a unicode hook? */
2931 client_ptr_t proc; /* hook procedure */
2932 unsigned int active_hooks; /* active hooks bitmap */
2933 VARARG(module,unicode_str); /* module name */
2937 /* Finished calling a hook chain */
2938 @REQ(finish_hook_chain)
2939 int id; /* id of the hook */
2943 /* Get the hook information */
2945 user_handle_t handle; /* handle to the current hook */
2946 int get_next; /* do we want info about current or next hook? */
2947 int event; /* signalled event */
2948 user_handle_t window; /* handle to the event window */
2949 int object_id; /* object id for out of context winevent */
2950 int child_id; /* child id for out of context winevent */
2952 user_handle_t handle; /* handle to the hook */
2953 int id; /* id of the hook */
2954 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2955 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2956 client_ptr_t proc; /* hook procedure */
2957 int unicode; /* is it a unicode hook? */
2958 VARARG(module,unicode_str); /* module name */
2962 /* Create a window class */
2964 int local; /* is it a local class? */
2965 atom_t atom; /* class atom */
2966 unsigned int style; /* class style */
2967 mod_handle_t instance; /* module instance */
2968 int extra; /* number of extra class bytes */
2969 int win_extra; /* number of window extra bytes */
2970 client_ptr_t client_ptr; /* pointer to class in client address space */
2971 data_size_t name_offset; /* base class name offset for specified atom */
2972 VARARG(name,unicode_str); /* class name */
2974 atom_t atom; /* resulting class atom */
2978 /* Destroy a window class */
2980 atom_t atom; /* class atom */
2981 mod_handle_t instance; /* module instance */
2982 VARARG(name,unicode_str); /* class name */
2984 client_ptr_t client_ptr; /* pointer to class in client address space */
2988 /* Set some information in a class */
2989 @REQ(set_class_info)
2990 user_handle_t window; /* handle to the window */
2991 unsigned int flags; /* flags for info to set (see below) */
2992 atom_t atom; /* class atom */
2993 unsigned int style; /* class style */
2994 int win_extra; /* number of window extra bytes */
2995 mod_handle_t instance; /* module instance */
2996 int extra_offset; /* offset to set in extra bytes */
2997 data_size_t extra_size; /* size to set in extra bytes */
2998 lparam_t extra_value; /* value to set in extra bytes */
3000 atom_t old_atom; /* previous class atom */
3001 atom_t base_atom; /* base class atom */
3002 mod_handle_t old_instance; /* previous module instance */
3003 lparam_t old_extra_value; /* old value in extra bytes */
3004 unsigned int old_style; /* previous class style */
3005 int old_extra; /* previous number of class extra bytes */
3006 int old_win_extra; /* previous number of window extra bytes */
3008 #define SET_CLASS_ATOM 0x0001
3009 #define SET_CLASS_STYLE 0x0002
3010 #define SET_CLASS_WINEXTRA 0x0004
3011 #define SET_CLASS_INSTANCE 0x0008
3012 #define SET_CLASS_EXTRA 0x0010
3015 /* Open the clipboard */
3016 @REQ(open_clipboard)
3017 user_handle_t window; /* clipboard window */
3019 user_handle_t owner; /* current clipboard owner */
3023 /* Close the clipboard */
3024 @REQ(close_clipboard)
3026 user_handle_t viewer; /* first clipboard viewer */
3027 user_handle_t owner; /* current clipboard owner */
3031 /* Empty the clipboard and grab ownership */
3032 @REQ(empty_clipboard)
3036 /* Add a data format to the clipboard */
3037 @REQ(set_clipboard_data)
3038 unsigned int format; /* clipboard format of the data */
3039 unsigned int lcid; /* locale id to use for synthesizing text formats */
3040 VARARG(data,bytes); /* data contents */
3042 unsigned int seqno; /* sequence number for the set data */
3046 /* Fetch a data format from the clipboard */
3047 @REQ(get_clipboard_data)
3048 unsigned int format; /* clipboard format of the data */
3049 int render; /* will we try to render it if missing? */
3050 int cached; /* do we already have it in the client-side cache? */
3051 unsigned int seqno; /* sequence number for the data in the cache */
3053 unsigned int from; /* for synthesized data, format to generate it from */
3054 user_handle_t owner; /* clipboard owner for delayed-rendered formats */
3055 unsigned int seqno; /* sequence number for the originally set data */
3056 data_size_t total; /* total data size */
3057 VARARG(data,bytes); /* data contents */
3061 /* Retrieve a list of available formats */
3062 @REQ(get_clipboard_formats)
3063 unsigned int format; /* specific format to query, return all if 0 */
3065 unsigned int count; /* count of available formats */
3066 VARARG(formats,uints); /* array of available formats */
3070 /* Retrieve the next available format */
3071 @REQ(enum_clipboard_formats)
3072 unsigned int previous; /* previous format, or first if 0 */
3074 unsigned int format; /* next format */
3078 /* Release ownership of the clipboard */
3079 @REQ(release_clipboard)
3080 user_handle_t owner; /* clipboard owner to release */
3082 user_handle_t viewer; /* first clipboard viewer */
3083 user_handle_t owner; /* current clipboard owner */
3087 /* Get clipboard information */
3088 @REQ(get_clipboard_info)
3090 user_handle_t window; /* clipboard window */
3091 user_handle_t owner; /* clipboard owner */
3092 user_handle_t viewer; /* clipboard viewer */
3093 unsigned int seqno; /* current sequence number */
3097 /* Set the clipboard viewer window */
3098 @REQ(set_clipboard_viewer)
3099 user_handle_t viewer; /* clipboard viewer */
3100 user_handle_t previous; /* if non-zero, check that this was the previous viewer */
3102 user_handle_t old_viewer; /* previous clipboard viewer */
3103 user_handle_t owner; /* clipboard owner */
3107 /* Add a clipboard listener window */
3108 @REQ(add_clipboard_listener)
3109 user_handle_t window; /* clipboard listener window */
3113 /* Remove a clipboard listener window */
3114 @REQ(remove_clipboard_listener)
3115 user_handle_t window; /* clipboard listener window */
3119 /* Open a security token */
3121 obj_handle_t handle; /* handle to the thread or process */
3122 unsigned int access; /* access rights to the new token */
3123 unsigned int attributes;/* object attributes */
3124 unsigned int flags; /* flags (see below) */
3126 obj_handle_t token; /* handle to the token */
3128 #define OPEN_TOKEN_THREAD 1
3129 #define OPEN_TOKEN_AS_SELF 2
3132 /* Set/get the global windows */
3133 @REQ(set_global_windows)
3134 unsigned int flags; /* flags for fields to set (see below) */
3135 user_handle_t shell_window; /* handle to the new shell window */
3136 user_handle_t shell_listview; /* handle to the new shell listview window */
3137 user_handle_t progman_window; /* handle to the new program manager window */
3138 user_handle_t taskman_window; /* handle to the new task manager window */
3140 user_handle_t old_shell_window; /* handle to the shell window */
3141 user_handle_t old_shell_listview; /* handle to the shell listview window */
3142 user_handle_t old_progman_window; /* handle to the new program manager window */
3143 user_handle_t old_taskman_window; /* handle to the new task manager window */
3145 #define SET_GLOBAL_SHELL_WINDOWS 0x01 /* set both main shell and listview windows */
3146 #define SET_GLOBAL_PROGMAN_WINDOW 0x02
3147 #define SET_GLOBAL_TASKMAN_WINDOW 0x04
3149 /* Adjust the privileges held by a token */
3150 @REQ(adjust_token_privileges)
3151 obj_handle_t handle; /* handle to the token */
3152 int disable_all; /* disable all privileges? */
3153 int get_modified_state; /* get modified privileges? */
3154 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to enable/disable/remove */
3156 unsigned int len; /* total length in bytes required to store token privileges */
3157 VARARG(privileges,LUID_AND_ATTRIBUTES); /* modified privileges */
3160 /* Retrieves the set of privileges held by or available to a token */
3161 @REQ(get_token_privileges)
3162 obj_handle_t handle; /* handle to the token */
3164 unsigned int len; /* total length in bytes required to store token privileges */
3165 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
3168 /* Check the token has the required privileges */
3169 @REQ(check_token_privileges)
3170 obj_handle_t handle; /* handle to the token */
3171 int all_required; /* are all the privileges required for the check to succeed? */
3172 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to check */
3174 int has_privileges; /* does the token have the required privileges? */
3175 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
3178 @REQ(duplicate_token)
3179 obj_handle_t handle; /* handle to the token to duplicate */
3180 unsigned int access; /* access rights to the new token */
3181 int primary; /* is the new token to be a primary one? */
3182 int impersonation_level; /* impersonation level of the new token */
3183 VARARG(objattr,object_attributes); /* object attributes */
3185 obj_handle_t new_handle; /* duplicated handle */
3189 obj_handle_t handle; /* handle to the token */
3190 unsigned int desired_access; /* desired access to the object */
3191 unsigned int mapping_read; /* mapping from generic read to specific rights */
3192 unsigned int mapping_write; /* mapping from generic write to specific rights */
3193 unsigned int mapping_execute; /* mapping from generic execute to specific rights */
3194 unsigned int mapping_all; /* mapping from generic all to specific rights */
3195 VARARG(sd,security_descriptor); /* security descriptor to check */
3197 unsigned int access_granted; /* access rights actually granted */
3198 unsigned int access_status; /* was access granted? */
3199 unsigned int privileges_len; /* length needed to store privileges */
3200 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges used during access check */
3204 obj_handle_t handle; /* handle to the token */
3205 unsigned int which_sid; /* which SID to retrieve from the token */
3207 data_size_t sid_len; /* length needed to store sid */
3208 VARARG(sid,SID); /* the sid specified by which_sid from the token */
3211 @REQ(get_token_groups)
3212 obj_handle_t handle; /* handle to the token */
3214 data_size_t user_len; /* length needed to store user */
3215 VARARG(user,token_groups); /* groups the token's user belongs to
*/
3218 @
REQ(get_token_default_dacl
)
3219 obj_handle_t handle
; /* handle to the token
*/
3221 data_size_t acl_len
; /* length needed to store access control list
*/
3222 VARARG(acl
,ACL
); /* access control list
*/
3225 @
REQ(set_token_default_dacl
)
3226 obj_handle_t handle
; /* handle to the token
*/
3227 VARARG(acl
,ACL
); /* default dacl to set
*/
3230 @
REQ(set_security_object
)
3231 obj_handle_t handle
; /* handle to the object
*/
3232 unsigned int security_info
; /* which parts of security descriptor to set
*/
3233 VARARG(sd
,security_descriptor
); /* security descriptor to set
*/
3236 @
REQ(get_security_object
)
3237 obj_handle_t handle
; /* handle to the object
*/
3238 unsigned int security_info
; /* which parts of security descriptor to get
*/
3240 unsigned int sd_len
; /* buffer size needed for sd
*/
3241 VARARG(sd
,security_descriptor
); /* retrieved security descriptor
*/
3248 obj_handle_t handle
;
3249 unsigned int access
;
3252 /* Return a list of all opened handles
*/
3253 @
REQ(get_system_handles
)
3255 unsigned int count
; /* number of handles
*/
3256 VARARG(data
,handle_infos
); /* array of handle_infos
*/
3260 /* Create a mailslot
*/
3261 @
REQ(create_mailslot
)
3262 unsigned int access
; /* wanted access rights
*/
3263 timeout_t read_timeout
;
3264 unsigned int max_msgsize
;
3265 VARARG(objattr
,object_attributes
); /* object attributes
*/
3267 obj_handle_t handle
; /* handle to the mailslot
*/
3271 /* Set mailslot information
*/
3272 @
REQ(set_mailslot_info
)
3273 obj_handle_t handle
; /* handle to the mailslot
*/
3274 timeout_t read_timeout
;
3277 timeout_t read_timeout
;
3278 unsigned int max_msgsize
;
3280 #define MAILSLOT_SET_READ_TIMEOUT
1
3283 /* Create a directory object
*/
3284 @
REQ(create_directory
)
3285 unsigned int access
; /* access flags
*/
3286 VARARG(objattr
,object_attributes
); /* object attributes
*/
3288 obj_handle_t handle
; /* handle to the directory
*/
3292 /* Open a directory object
*/
3293 @
REQ(open_directory
)
3294 unsigned int access
; /* access flags
*/
3295 unsigned int attributes
; /* object attributes
*/
3296 obj_handle_t rootdir
; /* root directory
*/
3297 VARARG(directory_name
,unicode_str
); /* Directory name
*/
3299 obj_handle_t handle
; /* handle to the directory
*/
3303 /* Get a directory entry by index
*/
3304 @
REQ(get_directory_entry
)
3305 obj_handle_t handle
; /* handle to the directory
*/
3306 unsigned int index
; /* entry index
*/
3308 data_size_t name_len
; /* length of the entry name in bytes
*/
3309 VARARG(name
,unicode_str
,name_len
); /* entry name
*/
3310 VARARG(type
,unicode_str
); /* entry type
*/
3314 /* Create a symbolic link object
*/
3315 @
REQ(create_symlink
)
3316 unsigned int access
; /* access flags
*/
3317 VARARG(objattr
,object_attributes
); /* object attributes
*/
3318 VARARG(target_name
,unicode_str
); /* target name
*/
3320 obj_handle_t handle
; /* handle to the symlink
*/
3324 /* Open a symbolic link object
*/
3326 unsigned int access
; /* access flags
*/
3327 unsigned int attributes
; /* object attributes
*/
3328 obj_handle_t rootdir
; /* root directory
*/
3329 VARARG(name
,unicode_str
); /* symlink name
*/
3331 obj_handle_t handle
; /* handle to the symlink
*/
3335 /* Query a symbolic link object
*/
3337 obj_handle_t handle
; /* handle to the symlink
*/
3339 data_size_t total
; /* total needed size for name
*/
3340 VARARG(target_name
,unicode_str
); /* target name
*/
3344 /* Query basic object information
*/
3345 @
REQ(get_object_info
)
3346 obj_handle_t handle
; /* handle to the object
*/
3348 unsigned int access
; /* granted access mask
*/
3349 unsigned int ref_count
; /* object ref count
*/
3350 unsigned int handle_count
; /* object handle count
*/
3351 data_size_t total
; /* total needed size for name
*/
3352 VARARG(name
,unicode_str
); /* object name
*/
3356 /* Query object type name information
*/
3357 @
REQ(get_object_type
)
3358 obj_handle_t handle
; /* handle to the object
*/
3360 data_size_t total
; /* needed size for type name
*/
3361 VARARG(type
,unicode_str
); /* type name
*/
3365 /* Query the impersonation level of an impersonation token
*/
3366 @
REQ(get_token_impersonation_level
)
3367 obj_handle_t handle
; /* handle to the object
*/
3369 int impersonation_level
; /* impersonation level of the impersonation token
*/
3372 /* Allocate a locally
-unique identifier
*/
3373 @
REQ(allocate_locally_unique_id
)
3379 /* Create a device manager
*/
3380 @
REQ(create_device_manager
)
3381 unsigned int access
; /* wanted access rights
*/
3382 unsigned int attributes
; /* object attributes
*/
3384 obj_handle_t handle
; /* handle to the device
*/
3388 /* Create a device
*/
3390 obj_handle_t rootdir
; /* root directory
*/
3391 client_ptr_t user_ptr
; /* opaque ptr for use by client
*/
3392 obj_handle_t manager
; /* device manager
*/
3393 VARARG(name
,unicode_str
); /* object name
*/
3397 /* Delete a device
*/
3399 obj_handle_t manager
; /* handle to the device manager
*/
3400 client_ptr_t device
; /* pointer to the device
*/
3404 /* Retrieve the next pending device irp request
*/
3405 @
REQ(get_next_device_request
)
3406 obj_handle_t manager
; /* handle to the device manager
*/
3407 obj_handle_t prev
; /* handle to the previous irp
*/
3408 unsigned int status
; /* status of the previous irp
*/
3409 client_ptr_t user_ptr
; /* user pointer of the previous irp
*/
3411 irp_params_t params
; /* irp parameters
*/
3412 obj_handle_t next
; /* handle to the next irp
*/
3413 thread_id_t client_tid
; /* tid of thread calling irp
*/
3414 client_ptr_t client_thread
; /* pointer to thread object of calling irp
*/
3415 data_size_t in_size
; /* total needed input size
*/
3416 VARARG(next_data
,bytes
); /* input data of the next irp
*/
3420 /* Get kernel pointer from server object
*/
3421 @
REQ(get_kernel_object_ptr
)
3422 obj_handle_t manager
; /* handle to the device manager
*/
3423 obj_handle_t handle
; /* object handle
*/
3425 client_ptr_t user_ptr
; /* kernel object pointer
*/
3429 /* Associate kernel pointer with server object
*/
3430 @
REQ(set_kernel_object_ptr
)
3431 obj_handle_t manager
; /* handle to the device manager
*/
3432 obj_handle_t handle
; /* object handle
*/
3433 client_ptr_t user_ptr
; /* kernel object pointer
*/
3437 /* Grab server object reference from kernel object pointer
*/
3438 @
REQ(grab_kernel_object
)
3439 obj_handle_t manager
; /* handle to the device manager
*/
3440 client_ptr_t user_ptr
; /* kernel object pointer
*/
3444 /* Release server object reference from kernel object pointer
*/
3445 @
REQ(release_kernel_object
)
3446 obj_handle_t manager
; /* handle to the device manager
*/
3447 client_ptr_t user_ptr
; /* kernel object pointer
*/
3451 /* Get handle from kernel object pointer
*/
3452 @
REQ(get_kernel_object_handle
)
3453 obj_handle_t manager
; /* handle to the device manager
*/
3454 client_ptr_t user_ptr
; /* kernel object pointer
*/
3455 unsigned int access
; /* wanted access rights
*/
3457 obj_handle_t handle
; /* kernel object handle
*/
3461 /* Make the current process a system process
*/
3462 @
REQ(make_process_system
)
3464 obj_handle_t event
; /* event signaled when all user processes have exited
*/
3468 /* Get detailed fixed
-size information about a token
*/
3469 @
REQ(get_token_statistics
)
3470 obj_handle_t handle
; /* handle to the object
*/
3472 luid_t token_id
; /* locally
-unique identifier of the token
*/
3473 luid_t modified_id
; /* locally
-unique identifier of the modified version of the token
*/
3474 int primary
; /* is the token primary or impersonation?
*/
3475 int impersonation_level
; /* level of impersonation
*/
3476 int group_count
; /* the number of groups the token is a member of
*/
3477 int privilege_count
; /* the number of privileges the token has
*/
3481 /* Create I
/O completion port
*/
3482 @
REQ(create_completion
)
3483 unsigned int access
; /* desired access to a port
*/
3484 unsigned int concurrent
; /* max number of concurrent active threads
*/
3485 VARARG(objattr
,object_attributes
); /* object attributes
*/
3487 obj_handle_t handle
; /* port handle
*/
3491 /* Open I
/O completion port
*/
3492 @
REQ(open_completion
)
3493 unsigned int access
; /* desired access to a port
*/
3494 unsigned int attributes
; /* object attributes
*/
3495 obj_handle_t rootdir
; /* root directory
*/
3496 VARARG(filename
,unicode_str
); /* port name
*/
3498 obj_handle_t handle
; /* port handle
*/
3502 /* add completion to completion port
*/
3503 @
REQ(add_completion
)
3504 obj_handle_t handle
; /* port handle
*/
3505 apc_param_t ckey
; /* completion key
*/
3506 apc_param_t cvalue
; /* completion value
*/
3507 apc_param_t information
; /* IO_STATUS_BLOCK Information
*/
3508 unsigned int status
; /* completion result
*/
3512 /* get completion from completion port queue
*/
3513 @
REQ(remove_completion
)
3514 obj_handle_t handle
; /* port handle
*/
3516 apc_param_t ckey
; /* completion key
*/
3517 apc_param_t cvalue
; /* completion value
*/
3518 apc_param_t information
; /* IO_STATUS_BLOCK Information
*/
3519 unsigned int status
; /* completion result
*/
3523 /* get completion queue depth
*/
3524 @
REQ(query_completion
)
3525 obj_handle_t handle
; /* port handle
*/
3527 unsigned int depth
; /* completion queue depth
*/
3531 /* associate object with completion port
*/
3532 @
REQ(set_completion_info
)
3533 obj_handle_t handle
; /* object handle
*/
3534 apc_param_t ckey
; /* completion key
*/
3535 obj_handle_t chandle
; /* port handle
*/
3539 /* check for associated completion and push msg
*/
3540 @
REQ(add_fd_completion
)
3541 obj_handle_t handle
; /* async
' object */
3542 apc_param_t cvalue; /* completion value */
3543 apc_param_t information; /* IO_STATUS_BLOCK Information */
3544 unsigned int status; /* completion status */
3545 int async; /* completion is an async result */
3549 /* set fd completion information */
3550 @REQ(set_fd_completion_mode)
3551 obj_handle_t handle; /* handle to a file or directory */
3552 unsigned int flags; /* completion notification flags */
3556 /* set fd disposition information */
3557 @REQ(set_fd_disp_info)
3558 obj_handle_t handle; /* handle to a file or directory */
3559 int unlink; /* whether to unlink file on close */
3563 /* set fd name information */
3564 @REQ(set_fd_name_info)
3565 obj_handle_t handle; /* handle to a file or directory */
3566 obj_handle_t rootdir; /* root directory */
3567 int link; /* link instead of renaming */
3568 int replace; /* replace an existing file? */
3569 VARARG(filename,string); /* new file name */
3573 /* Retrieve layered info for a window */
3574 @REQ(get_window_layered_info)
3575 user_handle_t handle; /* handle to the window */
3577 unsigned int color_key; /* color key */
3578 unsigned int alpha; /* alpha (0..255) */
3579 unsigned int flags; /* LWA_* flags */
3583 /* Set layered info for a window */
3584 @REQ(set_window_layered_info)
3585 user_handle_t handle; /* handle to the window */
3586 unsigned int color_key; /* color key */
3587 unsigned int alpha; /* alpha (0..255) */
3588 unsigned int flags; /* LWA_* flags */
3592 /* Allocate an arbitrary user handle */
3593 @REQ(alloc_user_handle)
3595 user_handle_t handle; /* allocated handle */
3599 /* Free an arbitrary user handle */
3600 @REQ(free_user_handle)
3601 user_handle_t handle; /* handle to free*/
3605 /* Set/get the current cursor */
3607 unsigned int flags; /* flags for fields to set (see below) */
3608 user_handle_t handle; /* handle to the cursor */
3609 int show_count; /* show count increment/decrement */
3610 int x; /* cursor position */
3612 rectangle_t clip; /* cursor clip rectangle */
3613 unsigned int clip_msg; /* message to post on cursor clip changes */
3615 user_handle_t prev_handle; /* previous handle */
3616 int prev_count; /* previous show count */
3617 int prev_x; /* previous position */
3619 int new_x; /* new position */
3621 rectangle_t new_clip; /* new clip rectangle */
3622 unsigned int last_change; /* time of last position change */
3624 #define SET_CURSOR_HANDLE 0x01
3625 #define SET_CURSOR_COUNT 0x02
3626 #define SET_CURSOR_POS 0x04
3627 #define SET_CURSOR_CLIP 0x08
3628 #define SET_CURSOR_NOCLIP 0x10
3631 /* Batch read rawinput message data */
3632 @REQ(get_rawinput_buffer)
3633 data_size_t rawinput_size; /* size of RAWINPUT structure */
3634 data_size_t buffer_size; /* size of output buffer */
3636 data_size_t next_size; /* minimum size to get next message data */
3641 /* Modify the list of registered rawinput devices */
3642 @REQ(update_rawinput_devices)
3643 VARARG(devices,rawinput_devices);
3646 /* Retrieve the list of registered rawinput devices */
3647 @REQ(get_rawinput_devices)
3649 unsigned int device_count;
3650 VARARG(devices,rawinput_devices);
3653 /* Create a new job object */
3655 unsigned int access; /* wanted access rights */
3656 VARARG(objattr,object_attributes); /* object attributes */
3658 obj_handle_t handle; /* handle to the job */
3662 /* Open a job object */
3664 unsigned int access; /* wanted access rights */
3665 unsigned int attributes; /* object attributes */
3666 obj_handle_t rootdir; /* root directory */
3667 VARARG(name,unicode_str); /* object name */
3669 obj_handle_t handle; /* handle to the job */
3673 /* Assign a job object to a process */
3675 obj_handle_t job; /* handle to the job */
3676 obj_handle_t process; /* handle to the process */
3680 /* Check if a process is associated with a job */
3681 @REQ(process_in_job)
3682 obj_handle_t job; /* handle to the job */
3683 obj_handle_t process; /* handle to the process */
3687 /* Set limit flags on a job */
3688 @REQ(set_job_limits)
3689 obj_handle_t handle; /* handle to the job */
3690 unsigned int limit_flags; /* new limit flags */
3694 /* Set new completion port for a job */
3695 @REQ(set_job_completion_port)
3696 obj_handle_t job; /* handle to the job */
3697 obj_handle_t port; /* handle to the completion port */
3698 client_ptr_t key; /* key to send with completion messages */
3702 /* Retrieve information about a job */
3704 obj_handle_t handle; /* handle to the job */
3706 int total_processes; /* total count of processes */
3707 int active_processes; /* count of running processes */
3711 /* Terminate all processes associated with the job */
3713 obj_handle_t handle; /* handle to the job */
3714 int status; /* process exit code */
3718 /* Suspend a process */
3719 @REQ(suspend_process)
3720 obj_handle_t handle; /* process handle */
3724 /* Resume a process */
3725 @REQ(resume_process)
3726 obj_handle_t handle; /* process handle */