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 struct
{ struct
{ unsigned __int64 low
, high
; } ymm_high
[16]; } ymm_high_regs
;
192 } ymm
; /* selected by SERVER_CTX_YMM_REGISTERS
*/
195 #define SERVER_CTX_CONTROL
0x01
196 #define SERVER_CTX_INTEGER
0x02
197 #define SERVER_CTX_SEGMENTS
0x04
198 #define SERVER_CTX_FLOATING_POINT
0x08
199 #define SERVER_CTX_DEBUG_REGISTERS
0x10
200 #define SERVER_CTX_EXTENDED_REGISTERS
0x20
201 #define SERVER_CTX_YMM_REGISTERS
0x40
203 /* structure used in sending an fd from client to server
*/
206 thread_id_t tid
; /* thread id
*/
207 int fd
; /* file descriptor on client
-side
*/
210 /* structure sent by the server on the wait fifo
*/
213 client_ptr_t cookie
; /* magic cookie that was passed in select_request
*/
214 int signaled
; /* wait result
*/
218 /* NT
-style timeout
, in
100ns units
, negative means relative timeout
*/
219 typedef __int64 timeout_t
;
220 #define
TIMEOUT_INFINITE (((timeout_t
)0x7fffffff) << 32 |
0xffffffff)
222 /* absolute timeout
, negative means that monotonic clock is used
*/
223 typedef __int64 abstime_t
;
225 /* structure for process startup info
*/
228 unsigned int debug_flags
;
229 unsigned int console_flags
;
230 obj_handle_t console
;
232 obj_handle_t hstdout
;
233 obj_handle_t hstderr
;
240 unsigned int attribute
;
243 data_size_t curdir_len
;
244 data_size_t dllpath_len
;
245 data_size_t imagepath_len
;
246 data_size_t cmdline_len
;
247 data_size_t title_len
;
248 data_size_t desktop_len
;
249 data_size_t shellinfo_len
;
250 data_size_t runtime_len
;
251 /* VARARG(curdir
,unicode_str
,curdir_len
); */
252 /* VARARG(dllpath
,unicode_str
,dllpath_len
); */
253 /* VARARG(imagepath
,unicode_str
,imagepath_len
); */
254 /* VARARG(cmdline
,unicode_str
,cmdline_len
); */
255 /* VARARG(title
,unicode_str
,title_len
); */
256 /* VARARG(desktop
,unicode_str
,desktop_len
); */
257 /* VARARG(shellinfo
,unicode_str
,shellinfo_len
); */
258 /* VARARG(runtime
,unicode_str
,runtime_len
); */
261 /* structure returned in the list of window properties
*/
264 atom_t atom
; /* property atom
*/
265 int string
; /* was atom a string originally?
*/
266 lparam_t data
; /* data stored in property
*/
269 /* structure to specify window rectangles
*/
278 /* structure for parameters of async I
/O calls
*/
281 obj_handle_t handle
; /* object to perform I
/O on
*/
282 obj_handle_t event
; /* event to signal when done
*/
283 client_ptr_t iosb
; /* I
/O status block in client addr space
*/
284 client_ptr_t user
; /* opaque user data containing callback pointer and async
-specific data
*/
285 client_ptr_t apc
; /* user APC to call
*/
286 apc_param_t apc_context
; /* user APC context or completion value
*/
289 /* structures for extra message data
*/
293 unsigned int device
; /* source
device (IMDT_
* values
) */
294 unsigned int origin
; /* source
origin (IMO_
* values
) */
297 struct hardware_msg_data
299 lparam_t info
; /* extra info
*/
300 unsigned int hw_id
; /* unique id
*/
301 unsigned int flags
; /* hook flags
*/
302 struct hw_msg_source source
; /* message source
*/
308 int type
; /* RIM_TYPEKEYBOARD
*/
309 unsigned int message
; /* message generated by this rawinput event
*/
310 unsigned short vkey
; /* virtual key code
*/
311 unsigned short scan
; /* scan code
*/
315 int type
; /* RIM_TYPEMOUSE
*/
316 int x
; /* x coordinate
*/
317 int y
; /* y coordinate
*/
318 unsigned int data
; /* mouse data
*/
323 struct callback_msg_data
325 client_ptr_t callback
; /* callback function
*/
326 lparam_t data
; /* user data for callback
*/
327 lparam_t result
; /* message result
*/
330 struct winevent_msg_data
332 user_handle_t hook
; /* hook handle
*/
333 thread_id_t tid
; /* thread id
*/
334 client_ptr_t hook_proc
; /* hook proc address
*/
335 /* followed by module name if any
*/
343 int type
; /* INPUT_KEYBOARD
*/
344 unsigned short vkey
; /* virtual key code
*/
345 unsigned short scan
; /* scan code
*/
346 unsigned int flags
; /* event flags
*/
347 unsigned int time
; /* event time
*/
348 lparam_t info
; /* extra info
*/
352 int type
; /* INPUT_MOUSE
*/
353 int x
; /* coordinates
*/
355 unsigned int data
; /* mouse data
*/
356 unsigned int flags
; /* event flags
*/
357 unsigned int time
; /* event time
*/
358 lparam_t info
; /* extra info
*/
362 int type
; /* INPUT_HARDWARE
*/
363 unsigned int msg
; /* message code
*/
364 lparam_t lparam
; /* message param
*/
370 unsigned char bytes
[1]; /* raw data for sent messages
*/
371 struct hardware_msg_data hardware
;
372 struct callback_msg_data callback
;
373 struct winevent_msg_data winevent
;
376 /* structure returned in filesystem events
*/
377 struct filesystem_event
386 unsigned int low_part
;
390 #define MAX_ACL_LEN
65535
392 struct security_descriptor
394 unsigned int control
; /* SE_ flags
*/
395 data_size_t owner_len
;
396 data_size_t group_len
;
397 data_size_t sacl_len
;
398 data_size_t dacl_len
;
399 /* VARARG(owner
,SID
); */
400 /* VARARG(group
,SID
); */
401 /* VARARG(sacl
,ACL
); */
402 /* VARARG(dacl
,ACL
); */
405 struct object_attributes
407 obj_handle_t rootdir
; /* root directory
*/
408 unsigned int attributes
; /* object attributes
*/
409 data_size_t sd_len
; /* length of security_descriptor data. may be
0 */
410 data_size_t name_len
; /* length of the name string. may be
0 */
411 /* VARARG(sd
,security_descriptor
); */
412 /* VARARG(name
,unicode_str
); */
418 /* unsigned int attributes
[count
]; */
419 /* VARARG(sids
,SID
); */
427 SELECT_SIGNAL_AND_WAIT
,
428 SELECT_KEYED_EVENT_WAIT
,
429 SELECT_KEYED_EVENT_RELEASE
437 enum select_op op
; /* SELECT_WAIT or SELECT_WAIT_ALL
*/
438 obj_handle_t handles
[MAXIMUM_WAIT_OBJECTS
];
442 enum select_op op
; /* SELECT_SIGNAL_AND_WAIT
*/
444 obj_handle_t signal
; /* must be last in the structure so we can remove it on retries
*/
448 enum select_op op
; /* SELECT_KEYED_EVENT_WAIT or SELECT_KEYED_EVENT_RELEASE
*/
478 enum apc_type type
; /* APC_USER
*/
480 client_ptr_t func
; /* void (__stdcall
*func
)(ULONG_PTR
,ULONG_PTR
,ULONG_PTR
); */
481 apc_param_t args
[3]; /* arguments for user function
*/
485 enum apc_type type
; /* APC_TIMER
*/
487 client_ptr_t func
; /* void (__stdcall
*func
)(void
*, unsigned int
, unsigned int
); */
488 abstime_t time
; /* time of expiration
*/
489 client_ptr_t arg
; /* user argument
*/
499 enum apc_type type
; /* APC_ASYNC_IO
*/
500 unsigned int status
; /* I
/O status
*/
501 client_ptr_t user
; /* user pointer
*/
502 client_ptr_t sb
; /* status block
*/
506 enum apc_type type
; /* APC_VIRTUAL_ALLOC
*/
507 unsigned int op_type
; /* type of operation
*/
508 client_ptr_t addr
; /* requested address
*/
509 mem_size_t size
; /* allocation size
*/
510 mem_size_t zero_bits
; /* number of zero high bits
*/
511 unsigned int prot
; /* memory protection flags
*/
515 enum apc_type type
; /* APC_VIRTUAL_FREE
*/
516 unsigned int op_type
; /* type of operation
*/
517 client_ptr_t addr
; /* requested address
*/
518 mem_size_t size
; /* allocation size
*/
522 enum apc_type type
; /* APC_VIRTUAL_QUERY
*/
524 client_ptr_t addr
; /* requested address
*/
528 enum apc_type type
; /* APC_VIRTUAL_PROTECT
*/
529 unsigned int prot
; /* new protection flags
*/
530 client_ptr_t addr
; /* requested address
*/
531 mem_size_t size
; /* requested size
*/
535 enum apc_type type
; /* APC_VIRTUAL_FLUSH
*/
537 client_ptr_t addr
; /* requested address
*/
538 mem_size_t size
; /* requested size
*/
542 enum apc_type type
; /* APC_VIRTUAL_LOCK
*/
544 client_ptr_t addr
; /* requested address
*/
545 mem_size_t size
; /* requested size
*/
549 enum apc_type type
; /* APC_VIRTUAL_UNLOCK
*/
551 client_ptr_t addr
; /* requested address
*/
552 mem_size_t size
; /* requested size
*/
556 enum apc_type type
; /* APC_MAP_VIEW
*/
557 obj_handle_t handle
; /* mapping handle
*/
558 client_ptr_t addr
; /* requested address
*/
559 mem_size_t size
; /* allocation size
*/
560 file_pos_t offset
; /* file offset
*/
561 mem_size_t zero_bits
; /* number of zero high bits
*/
562 unsigned int alloc_type
; /* allocation type
*/
563 unsigned int prot
; /* memory protection flags
*/
567 enum apc_type type
; /* APC_UNMAP_VIEW
*/
569 client_ptr_t addr
; /* view address
*/
573 enum apc_type type
; /* APC_CREATE_THREAD
*/
574 unsigned int flags
; /* creation flags
*/
575 client_ptr_t func
; /* void (__stdcall
*func
)(void*)
; start function
*/
576 client_ptr_t arg
; /* argument for start function
*/
577 mem_size_t reserve
; /* reserve size for thread stack
*/
578 mem_size_t commit
; /* commit size for thread stack
*/
587 enum apc_type type
; /* APC_ASYNC_IO
*/
588 unsigned int status
; /* new status of async operation
*/
589 unsigned int total
; /* bytes transferred
*/
593 enum apc_type type
; /* APC_VIRTUAL_ALLOC
*/
594 unsigned int status
; /* status returned by call
*/
595 client_ptr_t addr
; /* resulting address
*/
596 mem_size_t size
; /* resulting size
*/
600 enum apc_type type
; /* APC_VIRTUAL_FREE
*/
601 unsigned int status
; /* status returned by call
*/
602 client_ptr_t addr
; /* resulting address
*/
603 mem_size_t size
; /* resulting size
*/
607 enum apc_type type
; /* APC_VIRTUAL_QUERY
*/
608 unsigned int status
; /* status returned by call
*/
609 client_ptr_t base
; /* resulting base address
*/
610 client_ptr_t alloc_base
;/* resulting allocation base
*/
611 mem_size_t size
; /* resulting region size
*/
612 unsigned short state
; /* resulting region state
*/
613 unsigned short prot
; /* resulting region protection
*/
614 unsigned short alloc_prot
;/* resulting allocation protection
*/
615 unsigned short alloc_type
;/* resulting region allocation type
*/
619 enum apc_type type
; /* APC_VIRTUAL_PROTECT
*/
620 unsigned int status
; /* status returned by call
*/
621 client_ptr_t addr
; /* resulting address
*/
622 mem_size_t size
; /* resulting size
*/
623 unsigned int prot
; /* old protection flags
*/
627 enum apc_type type
; /* APC_VIRTUAL_FLUSH
*/
628 unsigned int status
; /* status returned by call
*/
629 client_ptr_t addr
; /* resulting address
*/
630 mem_size_t size
; /* resulting size
*/
634 enum apc_type type
; /* APC_VIRTUAL_LOCK
*/
635 unsigned int status
; /* status returned by call
*/
636 client_ptr_t addr
; /* resulting address
*/
637 mem_size_t size
; /* resulting size
*/
641 enum apc_type type
; /* APC_VIRTUAL_UNLOCK
*/
642 unsigned int status
; /* status returned by call
*/
643 client_ptr_t addr
; /* resulting address
*/
644 mem_size_t size
; /* resulting size
*/
648 enum apc_type type
; /* APC_MAP_VIEW
*/
649 unsigned int status
; /* status returned by call
*/
650 client_ptr_t addr
; /* resulting address
*/
651 mem_size_t size
; /* resulting size
*/
655 enum apc_type type
; /* APC_MAP_VIEW
*/
656 unsigned int status
; /* status returned by call
*/
660 enum apc_type type
; /* APC_CREATE_THREAD
*/
661 unsigned int status
; /* status returned by call
*/
662 process_id_t pid
; /* process id
*/
663 thread_id_t tid
; /* thread id
*/
664 client_ptr_t teb
; /* thread
teb (in process address space
) */
665 obj_handle_t handle
; /* handle to new thread
*/
669 enum apc_type type
; /* APC_BREAK_PROCESS
*/
670 unsigned int status
; /* status returned by call
*/
689 enum irp_type type
; /* irp call type
*/
692 enum irp_type type
; /* IRP_CALL_CREATE
*/
693 unsigned int access
; /* access rights
*/
694 unsigned int sharing
; /* sharing flags
*/
695 unsigned int options
; /* file options
*/
696 client_ptr_t device
; /* opaque ptr for the device
*/
697 obj_handle_t file
; /* file handle
*/
701 enum irp_type type
; /* IRP_CALL_CLOSE
*/
703 client_ptr_t file
; /* opaque ptr for the file object
*/
707 enum irp_type type
; /* IRP_CALL_READ
*/
708 unsigned int key
; /* driver key
*/
709 data_size_t out_size
; /* needed output size
*/
711 client_ptr_t file
; /* opaque ptr for the file object
*/
712 file_pos_t pos
; /* file position
*/
716 enum irp_type type
; /* IRP_CALL_WRITE
*/
717 unsigned int key
; /* driver key
*/
718 client_ptr_t file
; /* opaque ptr for the file object
*/
719 file_pos_t pos
; /* file position
*/
723 enum irp_type type
; /* IRP_CALL_FLUSH
*/
725 client_ptr_t file
; /* opaque ptr for the file object
*/
729 enum irp_type type
; /* IRP_CALL_IOCTL
*/
730 ioctl_code_t code
; /* ioctl code
*/
731 data_size_t out_size
; /* needed output size
*/
733 client_ptr_t file
; /* opaque ptr for the file object
*/
737 enum irp_type type
; /* IRP_CALL_FREE
*/
739 client_ptr_t obj
; /* opaque ptr for the freed object
*/
743 enum irp_type type
; /* IRP_CALL_CANCEL
*/
745 client_ptr_t irp
; /* opaque ptr for canceled irp
*/
749 /* information about a PE image mapping
, roughly equivalent to SECTION_IMAGE_INFORMATION
*/
753 client_ptr_t entry_point
;
755 mem_size_t stack_size
;
756 mem_size_t stack_commit
;
757 unsigned int zerobits
;
758 unsigned int subsystem
;
759 unsigned short subsystem_minor
;
760 unsigned short subsystem_major
;
761 unsigned short osversion_major
;
762 unsigned short osversion_minor
;
763 unsigned short image_charact
;
764 unsigned short dll_charact
;
765 unsigned short machine
;
766 unsigned char contains_code
;
767 unsigned char image_flags
;
768 unsigned int loader_flags
;
769 unsigned int header_size
;
770 unsigned int file_size
;
771 unsigned int checksum
;
775 #define IMAGE_FLAGS_ComPlusNativeReady
0x01
776 #define IMAGE_FLAGS_ComPlusILOnly
0x02
777 #define IMAGE_FLAGS_ImageDynamicallyRelocated
0x04
778 #define IMAGE_FLAGS_ImageMappedFlat
0x08
779 #define IMAGE_FLAGS_BaseBelow4gb
0x10
780 #define IMAGE_FLAGS_ComPlusPrefer32bit
0x20
781 #define IMAGE_FLAGS_WineBuiltin
0x40
782 #define IMAGE_FLAGS_WineFakeDll
0x80
784 struct rawinput_device
786 unsigned short usage_page
;
787 unsigned short usage
;
789 user_handle_t target
;
801 /****************************************************************/
802 /* Request declarations
*/
804 /* Create a new process from the context of the parent
*/
806 obj_handle_t token
; /* process token
*/
807 obj_handle_t parent_process
; /* parent process
*/
808 int inherit_all
; /* inherit all handles from parent
*/
809 unsigned int create_flags
; /* creation flags
*/
810 int socket_fd
; /* file descriptor for process socket
*/
811 unsigned int access
; /* access rights for process object
*/
812 client_cpu_t cpu
; /* CPU that the new process will use
*/
813 data_size_t info_size
; /* size of startup info
*/
814 data_size_t handles_size
; /* length of explicit handles list
*/
815 VARARG(objattr
,object_attributes
); /* object attributes
*/
816 VARARG(handles
,uints
,handles_size
); /* handles list
*/
817 VARARG(info
,startup_info
,info_size
); /* startup information
*/
818 VARARG(env
,unicode_str
); /* environment for new process
*/
820 obj_handle_t info
; /* new process info handle
*/
821 process_id_t pid
; /* process id
*/
822 obj_handle_t handle
; /* process
handle (in the current process
) */
826 /* Execute a process
, replacing the current one
*/
828 int socket_fd
; /* file descriptor for process socket
*/
829 client_cpu_t cpu
; /* CPU that the new process will use
*/
833 /* Retrieve information about a newly started process
*/
834 @
REQ(get_new_process_info
)
835 obj_handle_t info
; /* info handle returned from new_process_request
*/
837 int success
; /* did the process start successfully?
*/
838 int exit_code
; /* process exit code if failed
*/
842 /* Create a new thread
*/
844 obj_handle_t process
; /* process in which to create thread
*/
845 unsigned int access
; /* wanted access rights
*/
846 int suspend
; /* new thread should be suspended on creation
*/
847 int request_fd
; /* fd for request pipe
*/
848 VARARG(objattr
,object_attributes
); /* object attributes
*/
850 thread_id_t tid
; /* thread id
*/
851 obj_handle_t handle
; /* thread
handle (in the current process
) */
855 /* Retrieve the new process startup info
*/
856 @
REQ(get_startup_info
)
858 data_size_t info_size
; /* size of startup info
*/
859 VARARG(info
,startup_info
,info_size
); /* startup information
*/
860 VARARG(env
,unicode_str
); /* environment
*/
864 /* Signal the end of the process initialization
*/
865 @
REQ(init_process_done
)
866 int gui
; /* is it a GUI process?
*/
867 mod_handle_t module
; /* main module base address
*/
868 client_ptr_t ldt_copy
; /* address of LDT
copy (in thread address space
) */
869 client_ptr_t entry
; /* process entry point
*/
871 int suspend
; /* is process suspended?
*/
875 /* Initialize a thread
; called from the child after
fork()/clone() */
877 int unix_pid
; /* Unix pid of new thread
*/
878 int unix_tid
; /* Unix tid of new thread
*/
879 int debug_level
; /* new debug level
*/
880 client_ptr_t teb
; /* TEB of new
thread (in thread address space
) */
881 client_ptr_t entry
; /* entry point or PEB if initial
thread (in thread address space
) */
882 int reply_fd
; /* fd for reply pipe
*/
883 int wait_fd
; /* fd for blocking calls pipe
*/
884 client_cpu_t cpu
; /* CPU that this thread is running on
*/
886 process_id_t pid
; /* process id of the new thread
's process */
887 thread_id_t tid; /* thread id of the new thread */
888 timeout_t server_start; /* server start time */
889 data_size_t info_size; /* total size of startup info */
890 int version; /* protocol version */
891 unsigned int all_cpus; /* bitset of supported CPUs */
892 int suspend; /* is thread suspended? */
896 /* Terminate a process */
897 @REQ(terminate_process)
898 obj_handle_t handle; /* process handle to terminate */
899 int exit_code; /* process exit code */
901 int self; /* suicide? */
905 /* Terminate a thread */
906 @REQ(terminate_thread)
907 obj_handle_t handle; /* thread handle to terminate */
908 int exit_code; /* thread exit code */
910 int self; /* suicide? */
914 /* Retrieve information about a process */
915 @REQ(get_process_info)
916 obj_handle_t handle; /* process handle */
918 process_id_t pid; /* server process id */
919 process_id_t ppid; /* server process id of parent */
920 affinity_t affinity; /* process affinity mask */
921 client_ptr_t peb; /* PEB address in process address space */
922 timeout_t start_time; /* process start time */
923 timeout_t end_time; /* process end time */
924 int exit_code; /* process exit code */
925 int priority; /* priority class */
926 client_cpu_t cpu; /* CPU that this process is running on */
927 short int debugger_present; /* process is being debugged */
928 short int debug_children; /* inherit debugger to child processes */
929 VARARG(image,pe_image_info); /* image info for main exe */
933 /* Retrieve information about a process memory usage */
934 @REQ(get_process_vm_counters)
935 obj_handle_t handle; /* process handle */
937 mem_size_t peak_virtual_size; /* peak virtual memory in bytes */
938 mem_size_t virtual_size; /* virtual memory in bytes */
939 mem_size_t peak_working_set_size; /* peak real memory in bytes */
940 mem_size_t working_set_size; /* real memory in bytes */
941 mem_size_t pagefile_usage; /* commit charge in bytes */
942 mem_size_t peak_pagefile_usage; /* peak commit charge in bytes */
946 /* Set a process information */
947 @REQ(set_process_info)
948 obj_handle_t handle; /* process handle */
949 int mask; /* setting mask (see below) */
950 int priority; /* priority class */
951 affinity_t affinity; /* affinity mask */
953 #define SET_PROCESS_INFO_PRIORITY 0x01
954 #define SET_PROCESS_INFO_AFFINITY 0x02
957 /* Retrieve information about a thread */
958 @REQ(get_thread_info)
959 obj_handle_t handle; /* thread handle */
960 unsigned int access; /* required access rights */
962 process_id_t pid; /* server process id */
963 thread_id_t tid; /* server thread id */
964 client_ptr_t teb; /* thread teb pointer */
965 client_ptr_t entry_point; /* thread entry point */
966 affinity_t affinity; /* thread affinity mask */
967 int exit_code; /* thread exit code */
968 int priority; /* thread priority level */
969 int last; /* last thread in process */
970 int suspend_count; /* thread suspend count */
971 int dbg_hidden; /* thread hidden from debugger */
972 data_size_t desc_len; /* description length in bytes */
973 VARARG(desc,unicode_str); /* description string */
977 /* Retrieve information about thread times */
978 @REQ(get_thread_times)
979 obj_handle_t handle; /* thread handle */
981 timeout_t creation_time; /* thread creation time */
982 timeout_t exit_time; /* thread exit time */
983 int unix_pid; /* thread native pid */
984 int unix_tid; /* thread native pid */
988 /* Set a thread information */
989 @REQ(set_thread_info)
990 obj_handle_t handle; /* thread handle */
991 int mask; /* setting mask (see below) */
992 int priority; /* priority class */
993 affinity_t affinity; /* affinity mask */
994 client_ptr_t entry_point; /* thread entry point */
995 obj_handle_t token; /* impersonation token */
996 VARARG(desc,unicode_str); /* description string */
998 #define SET_THREAD_INFO_PRIORITY 0x01
999 #define SET_THREAD_INFO_AFFINITY 0x02
1000 #define SET_THREAD_INFO_TOKEN 0x04
1001 #define SET_THREAD_INFO_ENTRYPOINT 0x08
1002 #define SET_THREAD_INFO_DESCRIPTION 0x10
1003 #define SET_THREAD_INFO_DBG_HIDDEN 0x20
1006 /* Retrieve information about a module */
1008 obj_handle_t handle; /* process handle */
1009 mod_handle_t base_address; /* base address of module */
1011 client_ptr_t entry_point;
1012 data_size_t filename_len; /* buffer len in bytes required to store filename */
1013 VARARG(filename,unicode_str); /* file name of module */
1017 /* Suspend a thread */
1018 @REQ(suspend_thread)
1019 obj_handle_t handle; /* thread handle */
1021 int count; /* new suspend count */
1025 /* Resume a thread */
1027 obj_handle_t handle; /* thread handle */
1029 int count; /* new suspend count */
1033 /* Notify the server that a dll has been loaded */
1035 data_size_t dbg_offset; /* debug info offset */
1036 mod_handle_t base; /* base address */
1037 client_ptr_t name; /* ptr to ptr to name (in process addr space) */
1038 data_size_t dbg_size; /* debug info size */
1039 VARARG(filename,unicode_str); /* file name of dll */
1043 /* Notify the server that a dll is being unloaded */
1045 mod_handle_t base; /* base address */
1049 /* Queue an APC for a thread or process */
1051 obj_handle_t handle; /* thread or process handle */
1052 apc_call_t call; /* call arguments */
1054 obj_handle_t handle; /* APC handle */
1055 int self; /* run APC in caller itself? */
1059 /* Get the result of an APC call */
1060 @REQ(get_apc_result)
1061 obj_handle_t handle; /* handle to the APC */
1063 apc_result_t result; /* result of the APC */
1067 /* Close a handle for the current process */
1069 obj_handle_t handle; /* handle to close */
1073 /* Set a handle information */
1074 @REQ(set_handle_info)
1075 obj_handle_t handle; /* handle we are interested in */
1076 int flags; /* new handle flags */
1077 int mask; /* mask for flags to set */
1079 int old_flags; /* old flag value */
1083 /* Duplicate a handle */
1085 obj_handle_t src_process; /* src process handle */
1086 obj_handle_t src_handle; /* src handle to duplicate */
1087 obj_handle_t dst_process; /* dst process handle */
1088 unsigned int access; /* wanted access rights */
1089 unsigned int attributes; /* object attributes */
1090 unsigned int options; /* duplicate options (see below) */
1092 obj_handle_t handle; /* duplicated handle in dst process */
1093 int self; /* is the source the current process? */
1094 int closed; /* whether the source handle has been closed */
1096 #define DUP_HANDLE_CLOSE_SOURCE DUPLICATE_CLOSE_SOURCE
1097 #define DUP_HANDLE_SAME_ACCESS DUPLICATE_SAME_ACCESS
1098 #define DUP_HANDLE_MAKE_GLOBAL 0x80000000 /* Not a Windows flag */
1101 /* Make an object temporary */
1102 @REQ(make_temporary)
1103 obj_handle_t handle; /* handle to the object */
1107 /* Open a handle to a process */
1109 process_id_t pid; /* process id to open */
1110 unsigned int access; /* wanted access rights */
1111 unsigned int attributes; /* object attributes */
1113 obj_handle_t handle; /* handle to the process */
1117 /* Open a handle to a thread */
1119 thread_id_t tid; /* thread id to open */
1120 unsigned int access; /* wanted access rights */
1121 unsigned int attributes; /* object attributes */
1123 obj_handle_t handle; /* handle to the thread */
1127 /* Wait for handles */
1129 int flags; /* wait flags (see below) */
1130 client_ptr_t cookie; /* magic cookie to return to client */
1131 abstime_t timeout; /* timeout */
1132 data_size_t size; /* size of select_op */
1133 obj_handle_t prev_apc; /* handle to previous APC */
1134 VARARG(result,apc_result); /* result of previous APC */
1135 VARARG(data,select_op,size); /* operation-specific data */
1136 VARARG(context,context); /* suspend context */
1138 apc_call_t call; /* APC call arguments */
1139 obj_handle_t apc_handle; /* handle to next APC */
1140 VARARG(context,context); /* suspend context */
1142 #define SELECT_ALERTABLE 1
1143 #define SELECT_INTERRUPTIBLE 2
1146 /* Create an event */
1148 unsigned int access; /* wanted access rights */
1149 int manual_reset; /* manual reset event */
1150 int initial_state; /* initial state of the event */
1151 VARARG(objattr,object_attributes); /* object attributes */
1153 obj_handle_t handle; /* handle to the event */
1156 /* Event operation */
1158 obj_handle_t handle; /* handle to event */
1159 int op; /* event operation (see below) */
1161 int state; /* previous state */
1163 enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT };
1166 obj_handle_t handle; /* handle to event */
1168 int manual_reset; /* manual reset event */
1169 int state; /* current state of the event */
1174 unsigned int access; /* wanted access rights */
1175 unsigned int attributes; /* object attributes */
1176 obj_handle_t rootdir; /* root directory */
1177 VARARG(name,unicode_str); /* object name */
1179 obj_handle_t handle; /* handle to the event */
1183 /* Create a keyed event */
1184 @REQ(create_keyed_event)
1185 unsigned int access; /* wanted access rights */
1186 VARARG(objattr,object_attributes); /* object attributes */
1188 obj_handle_t handle; /* handle to the event */
1191 /* Open a keyed event */
1192 @REQ(open_keyed_event)
1193 unsigned int access; /* wanted access rights */
1194 unsigned int attributes; /* object attributes */
1195 obj_handle_t rootdir; /* root directory */
1196 VARARG(name,unicode_str); /* object name */
1198 obj_handle_t handle; /* handle to the event */
1202 /* Create a mutex */
1204 unsigned int access; /* wanted access rights */
1205 int owned; /* initially owned? */
1206 VARARG(objattr,object_attributes); /* object attributes */
1208 obj_handle_t handle; /* handle to the mutex */
1212 /* Release a mutex */
1214 obj_handle_t handle; /* handle to the mutex */
1216 unsigned int prev_count; /* value of internal counter, before release */
1222 unsigned int access; /* wanted access rights */
1223 unsigned int attributes; /* object attributes */
1224 obj_handle_t rootdir; /* root directory */
1225 VARARG(name,unicode_str); /* object name */
1227 obj_handle_t handle; /* handle to the mutex */
1233 obj_handle_t handle; /* handle to mutex */
1235 unsigned int count; /* current count of mutex */
1236 int owned; /* true if owned by current thread */
1237 int abandoned; /* true if abandoned */
1241 /* Create a semaphore */
1242 @REQ(create_semaphore)
1243 unsigned int access; /* wanted access rights */
1244 unsigned int initial; /* initial count */
1245 unsigned int max; /* maximum count */
1246 VARARG(objattr,object_attributes); /* object attributes */
1248 obj_handle_t handle; /* handle to the semaphore */
1252 /* Release a semaphore */
1253 @REQ(release_semaphore)
1254 obj_handle_t handle; /* handle to the semaphore */
1255 unsigned int count; /* count to add to semaphore */
1257 unsigned int prev_count; /* previous semaphore count */
1260 @REQ(query_semaphore)
1261 obj_handle_t handle; /* handle to the semaphore */
1263 unsigned int current; /* current count */
1264 unsigned int max; /* maximum count */
1267 /* Open a semaphore */
1268 @REQ(open_semaphore)
1269 unsigned int access; /* wanted access rights */
1270 unsigned int attributes; /* object attributes */
1271 obj_handle_t rootdir; /* root directory */
1272 VARARG(name,unicode_str); /* object name */
1274 obj_handle_t handle; /* handle to the semaphore */
1280 unsigned int access; /* wanted access rights */
1281 unsigned int sharing; /* sharing flags */
1282 int create; /* file create action */
1283 unsigned int options; /* file options */
1284 unsigned int attrs; /* file attributes for creation */
1285 VARARG(objattr,object_attributes); /* object attributes */
1286 VARARG(filename,string); /* file name */
1288 obj_handle_t handle; /* handle to the file */
1292 /* Open a file object */
1293 @REQ(open_file_object)
1294 unsigned int access; /* wanted access rights */
1295 unsigned int attributes; /* open attributes */
1296 obj_handle_t rootdir; /* root directory */
1297 unsigned int sharing; /* sharing flags */
1298 unsigned int options; /* file options */
1299 VARARG(filename,unicode_str); /* file name */
1301 obj_handle_t handle; /* handle to the file */
1305 /* Allocate a file handle for a Unix fd */
1306 @REQ(alloc_file_handle)
1307 unsigned int access; /* wanted access rights */
1308 unsigned int attributes; /* object attributes */
1309 int fd; /* file descriptor on the client side */
1311 obj_handle_t handle; /* handle to the file */
1315 /* Get the Unix name from a file handle */
1316 @REQ(get_handle_unix_name)
1317 obj_handle_t handle; /* file handle */
1319 data_size_t name_len; /* unix name length */
1320 VARARG(name,string); /* unix name */
1324 /* Get a Unix fd to access a file */
1326 obj_handle_t handle; /* handle to the file */
1328 int type; /* file type (see below) */
1329 int cacheable; /* can fd be cached in the client? */
1330 unsigned int access; /* file access rights */
1331 unsigned int options; /* file open options */
1335 FD_TYPE_INVALID, /* invalid file (no associated fd) */
1336 FD_TYPE_FILE, /* regular file */
1337 FD_TYPE_DIR, /* directory */
1338 FD_TYPE_SOCKET, /* socket */
1339 FD_TYPE_SERIAL, /* serial port */
1340 FD_TYPE_PIPE, /* named pipe */
1341 FD_TYPE_MAILSLOT, /* mailslot */
1342 FD_TYPE_CHAR, /* unspecified char device */
1343 FD_TYPE_DEVICE, /* Windows device file */
1348 /* Retrieve (or allocate) the client-side directory cache entry */
1349 @REQ(get_directory_cache_entry)
1350 obj_handle_t handle; /* handle to the directory */
1352 int entry; /* cache entry on the client side */
1353 VARARG(free,ints); /* entries that can be freed */
1357 /* Flush a file buffers */
1359 async_data_t async; /* async I/O parameters */
1361 obj_handle_t event; /* event set when finished */
1364 /* Query file information */
1366 obj_handle_t handle; /* handle to the file */
1367 unsigned int info_class; /* queried information class */
1369 VARARG(data,bytes); /* file info data */
1372 /* Query volume information */
1373 @REQ(get_volume_info)
1374 obj_handle_t handle; /* handle to the file */
1375 unsigned int info_class; /* queried information class */
1377 VARARG(data,bytes); /* volume info data */
1380 /* Lock a region of a file */
1382 obj_handle_t handle; /* handle to the file */
1383 file_pos_t offset; /* offset of start of lock */
1384 file_pos_t count; /* count of bytes to lock */
1385 int shared; /* shared or exclusive lock? */
1386 int wait; /* do we want to wait? */
1388 obj_handle_t handle; /* handle to wait on */
1389 int overlapped; /* is it an overlapped I/O handle? */
1393 /* Unlock a region of a file */
1395 obj_handle_t handle; /* handle to the file */
1396 file_pos_t offset; /* offset of start of unlock */
1397 file_pos_t count; /* count of bytes to unlock */
1401 /* Set socket event parameters */
1402 @REQ(set_socket_event)
1403 obj_handle_t handle; /* handle to the socket */
1404 unsigned int mask; /* event mask */
1405 obj_handle_t event; /* event object */
1406 user_handle_t window; /* window to send the message to */
1407 unsigned int msg; /* message to send */
1411 /* Get socket event parameters */
1412 @REQ(get_socket_event)
1413 obj_handle_t handle; /* handle to the socket */
1414 int service; /* clear pending? */
1415 obj_handle_t c_event; /* event to clear */
1417 unsigned int mask; /* event mask */
1418 unsigned int pmask; /* pending events */
1419 unsigned int state; /* status bits */
1420 VARARG(errors,ints); /* event errors */
1424 /* Get socket info */
1425 @REQ(get_socket_info)
1426 obj_handle_t handle; /* handle to the socket */
1428 int family; /* family, see socket manpage */
1429 int type; /* type, see socket manpage */
1430 int protocol; /* protocol, see socket manpage */
1434 /* Re-enable pending socket events */
1435 @REQ(enable_socket_event)
1436 obj_handle_t handle; /* handle to the socket */
1437 unsigned int mask; /* events to re-enable */
1438 unsigned int sstate; /* status bits to set */
1439 unsigned int cstate; /* status bits to clear */
1442 @REQ(set_socket_deferred)
1443 obj_handle_t handle; /* handle to the socket */
1444 obj_handle_t deferred; /* handle to the socket for which accept() is deferred */
1448 /* Retrieve the next pending console ioctl request */
1449 @REQ(get_next_console_request)
1450 obj_handle_t handle; /* console server handle */
1451 int signal; /* server signal state */
1452 int read; /* 1 if reporting result of blocked read ioctl */
1453 unsigned int status; /* status of previous ioctl */
1454 VARARG(out_data,bytes); /* out_data of previous ioctl */
1456 unsigned int code; /* ioctl code */
1457 unsigned int output; /* output id or 0 for input */
1458 data_size_t out_size; /* ioctl output size */
1459 VARARG(in_data,bytes); /* ioctl in_data */
1463 /* enable directory change notifications */
1464 @REQ(read_directory_changes)
1465 unsigned int filter; /* notification filter */
1466 int subtree; /* watch the subtree? */
1467 int want_data; /* flag indicating whether change data should be collected */
1468 async_data_t async; /* async I/O parameters */
1473 obj_handle_t handle;
1475 VARARG(events,filesystem_event); /* collected filesystem events */
1479 /* Create a file mapping */
1480 @REQ(create_mapping)
1481 unsigned int access; /* wanted access rights */
1482 unsigned int flags; /* SEC_* flags */
1483 unsigned int file_access; /* file access rights */
1484 mem_size_t size; /* mapping size */
1485 obj_handle_t file_handle; /* file handle */
1486 VARARG(objattr,object_attributes); /* object attributes */
1488 obj_handle_t handle; /* handle to the mapping */
1492 /* Open a mapping */
1494 unsigned int access; /* wanted access rights */
1495 unsigned int attributes; /* object attributes */
1496 obj_handle_t rootdir; /* root directory */
1497 VARARG(name,unicode_str); /* object name */
1499 obj_handle_t handle; /* handle to the mapping */
1503 /* Get information about a file mapping */
1504 @REQ(get_mapping_info)
1505 obj_handle_t handle; /* handle to the mapping */
1506 unsigned int access; /* wanted access rights */
1508 mem_size_t size; /* mapping size */
1509 unsigned int flags; /* SEC_* flags */
1510 obj_handle_t shared_file; /* shared mapping file handle */
1511 VARARG(image,pe_image_info);/* image info for SEC_IMAGE mappings */
1515 /* Add a memory view in the current process */
1517 obj_handle_t mapping; /* file mapping handle, or 0 for .so builtin */
1518 unsigned int access; /* wanted access rights */
1519 client_ptr_t base; /* view base address (page-aligned) */
1520 mem_size_t size; /* view size */
1521 file_pos_t start; /* start offset in mapping */
1522 VARARG(image,pe_image_info);/* image info for .so builtins */
1526 /* Unmap a memory view from the current process */
1528 client_ptr_t base; /* view base address */
1532 /* Get a range of committed pages in a file mapping */
1533 @REQ(get_mapping_committed_range)
1534 client_ptr_t base; /* view base address */
1535 file_pos_t offset; /* starting offset (page-aligned, in bytes) */
1537 mem_size_t size; /* size of range starting at offset (page-aligned, in bytes) */
1538 int committed; /* whether it is a committed range */
1542 /* Add a range to the committed pages in a file mapping */
1543 @REQ(add_mapping_committed_range)
1544 client_ptr_t base; /* view base address */
1545 file_pos_t offset; /* starting offset (page-aligned, in bytes) */
1546 mem_size_t size; /* size to set (page-aligned, in bytes) or 0 if only retrieving */
1550 /* Check if two memory maps are for the same file */
1551 @REQ(is_same_mapping)
1552 client_ptr_t base1; /* first view base address */
1553 client_ptr_t base2; /* second view base address */
1559 timeout_t start_time;
1562 int current_priority;
1568 timeout_t start_time;
1569 data_size_t name_len;
1573 process_id_t parent_pid;
1577 /* VARARG(name,unicode_str,name_len); */
1578 /* VARARG(threads,struct thread_info,thread_count); */
1581 /* Get a list of processes and threads currently running */
1582 @REQ(list_processes)
1584 data_size_t info_size;
1586 VARARG(data,process_info,info_size);
1590 /* Create a debug object */
1591 @REQ(create_debug_obj)
1592 unsigned int access; /* wanted access rights */
1593 VARARG(objattr,object_attributes); /* object attributes */
1595 obj_handle_t handle; /* handle to the debug object */
1599 /* Wait for a debug event */
1600 @REQ(wait_debug_event)
1601 int get_handle; /* should we alloc a handle for waiting? */
1603 process_id_t pid; /* process id */
1604 thread_id_t tid; /* thread id */
1605 obj_handle_t wait; /* wait handle if no event ready */
1606 VARARG(event,debug_event); /* debug event data */
1610 /* Queue an exception event */
1611 @REQ(queue_exception_event)
1612 int first; /* first chance exception? */
1613 unsigned int code; /* exception code */
1614 unsigned int flags; /* exception flags */
1615 client_ptr_t record; /* exception record */
1616 client_ptr_t address; /* exception address */
1617 data_size_t len; /* size of parameters */
1618 VARARG(params,uints64,len);/* exception parameters */
1620 obj_handle_t handle; /* handle to the queued event */
1624 /* Retrieve the status of an exception event */
1625 @REQ(get_exception_status)
1626 obj_handle_t handle; /* handle to the queued event */
1630 /* Continue a debug event */
1631 @REQ(continue_debug_event)
1632 process_id_t pid; /* process id to continue */
1633 thread_id_t tid; /* thread id to continue */
1634 int status; /* continuation status */
1638 /* Start/stop debugging an existing process */
1640 process_id_t pid; /* id of the process to debug */
1641 int attach; /* 1=attaching / 0=detaching from the process */
1645 /* Set debugger kill on exit flag */
1646 @REQ(set_debugger_kill_on_exit)
1647 int kill_on_exit; /* 0=detach/1=kill debuggee when debugger dies */
1651 /* Read data from a process address space */
1652 @REQ(read_process_memory)
1653 obj_handle_t handle; /* process handle */
1654 client_ptr_t addr; /* addr to read from */
1656 VARARG(data,bytes); /* result data */
1660 /* Write data to a process address space */
1661 @REQ(write_process_memory)
1662 obj_handle_t handle; /* process handle */
1663 client_ptr_t addr; /* addr to write to */
1664 VARARG(data,bytes); /* data to write */
1668 /* Create a registry key */
1670 unsigned int access; /* desired access rights */
1671 unsigned int options; /* creation options */
1672 VARARG(objattr,object_attributes); /* object attributes */
1673 VARARG(class,unicode_str); /* class name */
1675 obj_handle_t hkey; /* handle to the created key */
1676 int created; /* has it been newly created? */
1679 /* Open a registry key */
1681 obj_handle_t parent; /* handle to the parent key */
1682 unsigned int access; /* desired access rights */
1683 unsigned int attributes; /* object attributes */
1684 VARARG(name,unicode_str); /* key name */
1686 obj_handle_t hkey; /* handle to the open key */
1690 /* Delete a registry key */
1692 obj_handle_t hkey; /* handle to the key */
1696 /* Flush a registry key */
1698 obj_handle_t hkey; /* handle to the key */
1702 /* Enumerate registry subkeys */
1704 obj_handle_t hkey; /* handle to registry key */
1705 int index; /* index of subkey (or -1 for current key) */
1706 int info_class; /* requested information class */
1708 int subkeys; /* number of subkeys */
1709 int max_subkey; /* longest subkey name */
1710 int max_class; /* longest class name */
1711 int values; /* number of values */
1712 int max_value; /* longest value name */
1713 int max_data; /* longest value data */
1714 timeout_t modif; /* last modification time */
1715 data_size_t total; /* total length needed for full name and class */
1716 data_size_t namelen; /* length of key name in bytes */
1717 VARARG(name,unicode_str,namelen); /* key name */
1718 VARARG(class,unicode_str); /* class name */
1722 /* Set a value of a registry key */
1724 obj_handle_t hkey; /* handle to registry key */
1725 int type; /* value type */
1726 data_size_t namelen; /* length of value name in bytes */
1727 VARARG(name,unicode_str,namelen); /* value name */
1728 VARARG(data,bytes); /* value data */
1732 /* Retrieve the value of a registry key */
1734 obj_handle_t hkey; /* handle to registry key */
1735 VARARG(name,unicode_str); /* value name */
1737 int type; /* value type */
1738 data_size_t total; /* total length needed for data */
1739 VARARG(data,bytes); /* value data */
1743 /* Enumerate a value of a registry key */
1744 @REQ(enum_key_value)
1745 obj_handle_t hkey; /* handle to registry key */
1746 int index; /* value index */
1747 int info_class; /* requested information class */
1749 int type; /* value type */
1750 data_size_t total; /* total length needed for full name and data */
1751 data_size_t namelen; /* length of value name in bytes */
1752 VARARG(name,unicode_str,namelen); /* value name */
1753 VARARG(data,bytes); /* value data */
1757 /* Delete a value of a registry key */
1758 @REQ(delete_key_value)
1759 obj_handle_t hkey; /* handle to registry key */
1760 VARARG(name,unicode_str); /* value name */
1764 /* Load a registry branch from a file */
1766 obj_handle_t file; /* file to load from */
1767 VARARG(objattr,object_attributes); /* object attributes */
1771 /* UnLoad a registry branch from a file */
1772 @REQ(unload_registry)
1773 obj_handle_t hkey; /* root key to unload to */
1777 /* Save a registry branch to a file */
1779 obj_handle_t hkey; /* key to save */
1780 obj_handle_t file; /* file to save to */
1784 /* Add a registry key change notification */
1785 @REQ(set_registry_notification)
1786 obj_handle_t hkey; /* key to watch for changes */
1787 obj_handle_t event; /* event to set */
1788 int subtree; /* should we watch the whole subtree? */
1789 unsigned int filter; /* things to watch */
1793 /* Create a waitable timer */
1795 unsigned int access; /* wanted access rights */
1796 int manual; /* manual reset */
1797 VARARG(objattr,object_attributes); /* object attributes */
1799 obj_handle_t handle; /* handle to the timer */
1803 /* Open a waitable timer */
1805 unsigned int access; /* wanted access rights */
1806 unsigned int attributes; /* object attributes */
1807 obj_handle_t rootdir; /* root directory */
1808 VARARG(name,unicode_str); /* object name */
1810 obj_handle_t handle; /* handle to the timer */
1813 /* Set a waitable timer */
1815 obj_handle_t handle; /* handle to the timer */
1816 timeout_t expire; /* next expiration absolute time */
1817 client_ptr_t callback; /* callback function */
1818 client_ptr_t arg; /* callback argument */
1819 int period; /* timer period in ms */
1821 int signaled; /* was the timer signaled before this call ? */
1824 /* Cancel a waitable timer */
1826 obj_handle_t handle; /* handle to the timer */
1828 int signaled; /* was the timer signaled before this calltime ? */
1831 /* Get information on a waitable timer */
1832 @REQ(get_timer_info)
1833 obj_handle_t handle; /* handle to the timer */
1835 timeout_t when; /* absolute time when the timer next expires */
1836 int signaled; /* is the timer signaled? */
1840 /* Retrieve the current context of a thread */
1841 @REQ(get_thread_context)
1842 obj_handle_t handle; /* thread or context handle */
1843 unsigned int flags; /* context flags */
1845 int self; /* was it a handle to the current thread? */
1846 obj_handle_t handle; /* pending context handle */
1847 VARARG(context,context); /* thread context */
1851 /* Set the current context of a thread */
1852 @REQ(set_thread_context)
1853 obj_handle_t handle; /* thread handle */
1854 VARARG(context,context); /* thread context */
1856 int self; /* was it a handle to the current thread? */
1860 /* Fetch a selector entry for a thread */
1861 @REQ(get_selector_entry)
1862 obj_handle_t handle; /* thread handle */
1863 int entry; /* LDT entry */
1865 unsigned int base; /* selector base */
1866 unsigned int limit; /* selector limit */
1867 unsigned char flags; /* selector flags */
1873 obj_handle_t table; /* which table to add atom to */
1874 VARARG(name,unicode_str); /* atom name */
1876 atom_t atom; /* resulting atom */
1880 /* Delete an atom */
1882 obj_handle_t table; /* which table to delete atom from */
1883 atom_t atom; /* atom handle */
1889 obj_handle_t table; /* which table to find atom from */
1890 VARARG(name,unicode_str); /* atom name */
1892 atom_t atom; /* atom handle */
1896 /* Get information about an atom */
1897 @REQ(get_atom_information)
1898 obj_handle_t table; /* which table to find atom from */
1899 atom_t atom; /* atom handle */
1901 int count; /* atom lock count */
1902 int pinned; /* whether the atom has been pinned */
1903 data_size_t total; /* actual length of atom name */
1904 VARARG(name,unicode_str); /* atom name */
1908 /* Set information about an atom */
1909 @REQ(set_atom_information)
1910 obj_handle_t table; /* which table to find atom from */
1911 atom_t atom; /* atom handle */
1912 int pinned; /* whether to bump atom information */
1916 /* Empty an atom table */
1917 @REQ(empty_atom_table)
1918 obj_handle_t table; /* which table to find atom from */
1919 int if_pinned; /* whether to delete pinned atoms */
1923 /* Init an atom table */
1924 @REQ(init_atom_table)
1925 int entries; /* number of entries (only for local) */
1927 obj_handle_t table; /* handle to the atom table */
1931 /* Get the message queue of the current thread */
1934 obj_handle_t handle; /* handle to the queue */
1938 /* Set the file descriptor associated to the current thread queue */
1940 obj_handle_t handle; /* handle to the file descriptor */
1944 /* Set the current message queue wakeup mask */
1945 @REQ(set_queue_mask)
1946 unsigned int wake_mask; /* wakeup bits mask */
1947 unsigned int changed_mask; /* changed bits mask */
1948 int skip_wait; /* will we skip waiting if signaled? */
1950 unsigned int wake_bits; /* current wake bits */
1951 unsigned int changed_bits; /* current changed bits */
1955 /* Get the current message queue status */
1956 @REQ(get_queue_status)
1957 unsigned int clear_bits; /* should we clear the change bits? */
1959 unsigned int wake_bits; /* wake bits */
1960 unsigned int changed_bits; /* changed bits since last time */
1964 /* Retrieve the process idle event */
1965 @REQ(get_process_idle_event)
1966 obj_handle_t handle; /* process handle */
1968 obj_handle_t event; /* handle to idle event */
1972 /* Send a message to a thread queue */
1974 thread_id_t id; /* thread id */
1975 int type; /* message type (see below) */
1976 int flags; /* message flags (see below) */
1977 user_handle_t win; /* window handle */
1978 unsigned int msg; /* message code */
1979 lparam_t wparam; /* parameters */
1980 lparam_t lparam; /* parameters */
1981 timeout_t timeout; /* timeout for reply */
1982 VARARG(data,message_data); /* message data for sent messages */
1985 @REQ(post_quit_message)
1986 int exit_code; /* exit code to return */
1991 MSG_ASCII, /* Ascii message (from SendMessageA) */
1992 MSG_UNICODE, /* Unicode message (from SendMessageW) */
1993 MSG_NOTIFY, /* notify message (from SendNotifyMessageW), always Unicode */
1994 MSG_CALLBACK, /* callback message (from SendMessageCallbackW), always Unicode */
1995 MSG_CALLBACK_RESULT,/* result of a callback message */
1996 MSG_OTHER_PROCESS, /* sent from other process, may include vararg data, always Unicode */
1997 MSG_POSTED, /* posted message (from PostMessageW), always Unicode */
1998 MSG_HARDWARE, /* hardware message */
1999 MSG_WINEVENT, /* winevent message */
2000 MSG_HOOK_LL /* low-level hardware hook */
2002 #define SEND_MSG_ABORT_IF_HUNG 0x01
2005 /* Send a hardware message to a thread queue */
2006 @REQ(send_hardware_message)
2007 user_handle_t win; /* window handle */
2008 hw_input_t input; /* input data */
2009 unsigned int flags; /* flags (see below) */
2011 int wait; /* do we need to wait for a reply? */
2012 int prev_x; /* previous cursor position */
2014 int new_x; /* new cursor position */
2016 VARARG(keystate,bytes); /* global state array for all the keys */
2018 #define SEND_HWMSG_INJECTED 0x01
2021 /* Get a message from the current queue */
2023 unsigned int flags; /* PM_* flags */
2024 user_handle_t get_win; /* window handle to get */
2025 unsigned int get_first; /* first message code to get */
2026 unsigned int get_last; /* last message code to get */
2027 unsigned int hw_id; /* id of the previous hardware message (or 0) */
2028 unsigned int wake_mask; /* wakeup bits mask */
2029 unsigned int changed_mask; /* changed bits mask */
2031 user_handle_t win; /* window handle */
2032 unsigned int msg; /* message code */
2033 lparam_t wparam; /* parameters */
2034 lparam_t lparam; /* parameters */
2035 int type; /* message type */
2036 int x; /* message x position */
2037 int y; /* message y position */
2038 unsigned int time; /* message time */
2039 unsigned int active_hooks; /* active hooks bitmap */
2040 data_size_t total; /* total size of extra data */
2041 VARARG(data,message_data); /* message data for sent messages */
2045 /* Reply to a sent message */
2047 int remove; /* should we remove the message? */
2048 lparam_t result; /* message result */
2049 VARARG(data,bytes); /* message data for sent messages */
2053 /* Accept and remove the current hardware message */
2054 @REQ(accept_hardware_message)
2055 unsigned int hw_id; /* id of the hardware message */
2059 /* Retrieve the reply for the last message sent */
2060 @REQ(get_message_reply)
2061 int cancel; /* cancel message if not ready? */
2063 lparam_t result; /* message result */
2064 VARARG(data,bytes); /* message data for sent messages */
2068 /* Set a window timer */
2070 user_handle_t win; /* window handle */
2071 unsigned int msg; /* message to post */
2072 unsigned int rate; /* timer rate in ms */
2073 lparam_t id; /* timer id */
2074 lparam_t lparam; /* message lparam (callback proc) */
2076 lparam_t id; /* timer id */
2080 /* Kill a window timer */
2081 @REQ(kill_win_timer)
2082 user_handle_t win; /* window handle */
2083 lparam_t id; /* timer id */
2084 unsigned int msg; /* message to post */
2088 /* check if the thread owning the window is hung */
2089 @REQ(is_window_hung)
2090 user_handle_t win; /* window handle */
2096 /* Retrieve info about a serial port */
2097 @REQ(get_serial_info)
2098 obj_handle_t handle; /* handle to comm port */
2101 unsigned int eventmask;
2102 unsigned int cookie;
2103 unsigned int pending_write;
2107 /* Set info about a serial port */
2108 @REQ(set_serial_info)
2109 obj_handle_t handle; /* handle to comm port */
2110 int flags; /* bitmask to set values (see below) */
2112 #define SERIALINFO_PENDING_WRITE 0x04
2113 #define SERIALINFO_PENDING_WAIT 0x08
2116 /* Create an async I/O */
2117 @REQ(register_async)
2118 int type; /* type of queue to look after */
2119 async_data_t async; /* async I/O parameters */
2120 int count; /* count - usually # of bytes to be read/written */
2122 #define ASYNC_TYPE_READ 0x01
2123 #define ASYNC_TYPE_WRITE 0x02
2124 #define ASYNC_TYPE_WAIT 0x03
2127 /* Cancel all async op on a fd */
2129 obj_handle_t handle; /* handle to comm port, socket or file */
2130 client_ptr_t iosb; /* I/O status block (NULL=all) */
2131 int only_thread; /* cancel matching this thread */
2135 /* Retrieve results of an async */
2136 @REQ(get_async_result)
2137 client_ptr_t user_arg; /* user arg used to identify async */
2139 data_size_t size; /* result size (input or output depending on the operation) */
2140 VARARG(out_data,bytes); /* iosb output data */
2144 /* Perform a read on a file object */
2146 async_data_t async; /* async I/O parameters */
2147 file_pos_t pos; /* read position */
2149 obj_handle_t wait; /* handle to wait on for blocking read */
2150 unsigned int options; /* device open options */
2151 VARARG(data,bytes); /* read data */
2155 /* Perform a write on a file object */
2157 async_data_t async; /* async I/O parameters */
2158 file_pos_t pos; /* write position */
2159 VARARG(data,bytes); /* write data */
2161 obj_handle_t wait; /* handle to wait on for blocking write */
2162 unsigned int options; /* device open options */
2163 data_size_t size; /* size written */
2167 /* Perform an ioctl on a file */
2169 ioctl_code_t code; /* ioctl code */
2170 async_data_t async; /* async I/O parameters */
2171 VARARG(in_data,bytes); /* ioctl input data */
2173 obj_handle_t wait; /* handle to wait on for blocking ioctl */
2174 unsigned int options; /* device open options */
2175 VARARG(out_data,bytes); /* ioctl output data */
2179 /* Store results of an async irp */
2180 @REQ(set_irp_result)
2181 obj_handle_t handle; /* handle to the irp */
2182 unsigned int status; /* status of the irp */
2183 data_size_t size; /* result size (input or output depending on the operation) */
2184 VARARG(data,bytes); /* output data of the irp */
2188 /* Create a named pipe */
2189 @REQ(create_named_pipe)
2190 unsigned int access;
2191 unsigned int options;
2192 unsigned int sharing;
2193 unsigned int maxinstances;
2194 unsigned int outsize;
2195 unsigned int insize;
2198 VARARG(objattr,object_attributes); /* object attributes */
2200 obj_handle_t handle; /* handle to the pipe */
2203 /* flags in create_named_pipe and get_named_pipe_info */
2204 #define NAMED_PIPE_MESSAGE_STREAM_WRITE 0x0001
2205 #define NAMED_PIPE_MESSAGE_STREAM_READ 0x0002
2206 #define NAMED_PIPE_NONBLOCKING_MODE 0x0004
2207 #define NAMED_PIPE_SERVER_END 0x8000
2209 /* Set named pipe information by handle */
2210 @REQ(set_named_pipe_info)
2211 obj_handle_t handle;
2215 /* Create a window */
2217 user_handle_t parent; /* parent window */
2218 user_handle_t owner; /* owner window */
2219 atom_t atom; /* class atom */
2220 mod_handle_t instance; /* module instance */
2221 int dpi; /* system DPI */
2222 int awareness; /* thread DPI awareness */
2223 VARARG(class,unicode_str); /* class name */
2225 user_handle_t handle; /* created window */
2226 user_handle_t parent; /* full handle of parent */
2227 user_handle_t owner; /* full handle of owner */
2228 int extra; /* number of extra bytes */
2229 client_ptr_t class_ptr; /* pointer to class in client address space */
2230 int dpi; /* window DPI if not per-monitor aware */
2231 int awareness; /* window DPI awareness */
2235 /* Destroy a window */
2236 @REQ(destroy_window)
2237 user_handle_t handle; /* handle to the window */
2241 /* Retrieve the desktop window for the current thread */
2242 @REQ(get_desktop_window)
2243 int force; /* force creation if it doesn't exist
*/
2245 user_handle_t top_window
; /* handle to the desktop window
*/
2246 user_handle_t msg_window
; /* handle to the top
-level HWND_MESSAGE parent
*/
2250 /* Set a window owner
*/
2251 @
REQ(set_window_owner
)
2252 user_handle_t handle
; /* handle to the window
*/
2253 user_handle_t owner
; /* new owner
*/
2255 user_handle_t full_owner
; /* full handle of new owner
*/
2256 user_handle_t prev_owner
; /* full handle of previous owner
*/
2260 /* Get information from a window handle
*/
2261 @
REQ(get_window_info
)
2262 user_handle_t handle
; /* handle to the window
*/
2264 user_handle_t full_handle
; /* full
32-bit handle
*/
2265 user_handle_t last_active
; /* last active popup
*/
2266 process_id_t pid
; /* process owning the window
*/
2267 thread_id_t tid
; /* thread owning the window
*/
2268 atom_t atom
; /* class atom
*/
2269 int is_unicode
; /* ANSI or unicode
*/
2270 int dpi
; /* window DPI
*/
2271 int awareness
; /* DPI awareness
*/
2275 /* Set some information in a window
*/
2276 @
REQ(set_window_info
)
2277 unsigned short flags
; /* flags for fields to
set (see below
) */
2278 short int is_unicode
; /* ANSI or unicode
*/
2279 user_handle_t handle
; /* handle to the window
*/
2280 unsigned int style
; /* window style
*/
2281 unsigned int ex_style
; /* window extended style
*/
2282 unsigned int id
; /* window id
*/
2283 mod_handle_t instance
; /* creator instance
*/
2284 lparam_t user_data
; /* user
-specific data
*/
2285 int extra_offset
; /* offset to set in extra bytes
*/
2286 data_size_t extra_size
; /* size to set in extra bytes
*/
2287 lparam_t extra_value
; /* value to set in extra bytes
*/
2289 unsigned int old_style
; /* old window style
*/
2290 unsigned int old_ex_style
; /* old window extended style
*/
2291 mod_handle_t old_instance
; /* old creator instance
*/
2292 lparam_t old_user_data
; /* old user
-specific data
*/
2293 lparam_t old_extra_value
; /* old value in extra bytes
*/
2294 unsigned int old_id
; /* old window id
*/
2296 #define SET_WIN_STYLE
0x01
2297 #define SET_WIN_EXSTYLE
0x02
2298 #define SET_WIN_ID
0x04
2299 #define SET_WIN_INSTANCE
0x08
2300 #define SET_WIN_USERDATA
0x10
2301 #define SET_WIN_EXTRA
0x20
2302 #define SET_WIN_UNICODE
0x40
2305 /* Set the parent of a window
*/
2307 user_handle_t handle
; /* handle to the window
*/
2308 user_handle_t parent
; /* handle to the parent
*/
2310 user_handle_t old_parent
; /* old parent window
*/
2311 user_handle_t full_parent
; /* full handle of new parent
*/
2312 int dpi
; /* new window DPI if not per
-monitor aware
*/
2313 int awareness
; /* new DPI awareness
*/
2317 /* Get a list of the window parents
, up to the root of the tree
*/
2318 @
REQ(get_window_parents
)
2319 user_handle_t handle
; /* handle to the window
*/
2321 int count
; /* total count of parents
*/
2322 VARARG(parents
,user_handles
); /* parent handles
*/
2326 /* Get a list of the window children
*/
2327 @
REQ(get_window_children
)
2328 obj_handle_t desktop
; /* handle to desktop
*/
2329 user_handle_t parent
; /* parent window
*/
2330 atom_t atom
; /* class atom for the listed children
*/
2331 thread_id_t tid
; /* thread owning the listed children
*/
2332 VARARG(class
,unicode_str
); /* class name
*/
2334 int count
; /* total count of children
*/
2335 VARARG(children
,user_handles
); /* children handles
*/
2339 /* Get a list of the window children that contain a given point
*/
2340 @
REQ(get_window_children_from_point
)
2341 user_handle_t parent
; /* parent window
*/
2342 int x
; /* point in parent coordinates
*/
2344 int dpi
; /* dpi for the point coordinates
*/
2346 int count
; /* total count of children
*/
2347 VARARG(children
,user_handles
); /* children handles
*/
2351 /* Get window tree information from a window handle
*/
2352 @
REQ(get_window_tree
)
2353 user_handle_t handle
; /* handle to the window
*/
2355 user_handle_t parent
; /* parent window
*/
2356 user_handle_t owner
; /* owner window
*/
2357 user_handle_t next_sibling
; /* next sibling in Z
-order
*/
2358 user_handle_t prev_sibling
; /* prev sibling in Z
-order
*/
2359 user_handle_t first_sibling
; /* first sibling in Z
-order
*/
2360 user_handle_t last_sibling
; /* last sibling in Z
-order
*/
2361 user_handle_t first_child
; /* first child
*/
2362 user_handle_t last_child
; /* last child
*/
2365 /* Set the position and Z order of a window
*/
2366 @
REQ(set_window_pos
)
2367 unsigned short swp_flags
; /* SWP_
* flags
*/
2368 unsigned short paint_flags
; /* paint
flags (see below
) */
2369 user_handle_t handle
; /* handle to the window
*/
2370 user_handle_t previous
; /* previous window in Z order
*/
2371 rectangle_t window
; /* window
rectangle (in parent coords
) */
2372 rectangle_t client
; /* client
rectangle (in parent coords
) */
2373 VARARG(valid
,rectangles
); /* valid rectangles from
WM_NCCALCSIZE (in parent coords
) */
2375 unsigned int new_style
; /* new window style
*/
2376 unsigned int new_ex_style
; /* new window extended style
*/
2377 user_handle_t surface_win
; /* parent window that holds the surface
*/
2378 int needs_update
; /* whether the surface region needs an update
*/
2380 #define SET_WINPOS_PAINT_SURFACE
0x01 /* window has a paintable surface
*/
2381 #define SET_WINPOS_PIXEL_FORMAT
0x02 /* window has a custom pixel format
*/
2383 /* Get the window and client rectangles of a window
*/
2384 @
REQ(get_window_rectangles
)
2385 user_handle_t handle
; /* handle to the window
*/
2386 int relative
; /* coords relative
to (see below
) */
2387 int dpi
; /* DPI to map to
, or zero for per
-monitor DPI
*/
2389 rectangle_t window
; /* window rectangle
*/
2390 rectangle_t client
; /* client rectangle
*/
2392 enum coords_relative
2394 COORDS_CLIENT
, /* relative to client area
*/
2395 COORDS_WINDOW
, /* relative to whole window area
*/
2396 COORDS_PARENT
, /* relative to parent
's client area */
2397 COORDS_SCREEN /* relative to screen origin */
2401 /* Get the window text */
2402 @REQ(get_window_text)
2403 user_handle_t handle; /* handle to the window */
2405 data_size_t length; /* total length in WCHARs */
2406 VARARG(text,unicode_str); /* window text */
2410 /* Set the window text */
2411 @REQ(set_window_text)
2412 user_handle_t handle; /* handle to the window */
2413 VARARG(text,unicode_str); /* window text */
2417 /* Get the coordinates offset between two windows */
2418 @REQ(get_windows_offset)
2419 user_handle_t from; /* handle to the first window */
2420 user_handle_t to; /* handle to the second window */
2421 int dpi; /* DPI to map to, or zero for per-monitor DPI */
2423 int x; /* x coordinate offset */
2424 int y; /* y coordinate offset */
2425 int mirror; /* whether to mirror the x coordinate */
2429 /* Get the visible region of a window */
2430 @REQ(get_visible_region)
2431 user_handle_t window; /* handle to the window */
2432 unsigned int flags; /* DCX flags */
2434 user_handle_t top_win; /* top window to clip against */
2435 rectangle_t top_rect; /* top window visible rect with screen coords */
2436 rectangle_t win_rect; /* window rect in screen coords */
2437 unsigned int paint_flags; /* paint flags (from SET_WINPOS_* flags) */
2438 data_size_t total_size; /* total size of the resulting region */
2439 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2443 /* Get the visible surface region of a window */
2444 @REQ(get_surface_region)
2445 user_handle_t window; /* handle to the window */
2447 rectangle_t visible_rect; /* window visible rect in screen coords */
2448 data_size_t total_size; /* total size of the resulting region */
2449 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2453 /* Get the window region */
2454 @REQ(get_window_region)
2455 user_handle_t window; /* handle to the window */
2457 data_size_t total_size; /* total size of the resulting region */
2458 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2462 /* Set the window region */
2463 @REQ(set_window_region)
2464 user_handle_t window; /* handle to the window */
2465 int redraw; /* redraw the window? */
2466 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2470 /* Get the window update region */
2471 @REQ(get_update_region)
2472 user_handle_t window; /* handle to the window */
2473 user_handle_t from_child; /* child to start searching from */
2474 unsigned int flags; /* update flags (see below) */
2476 user_handle_t child; /* child to repaint (or window itself) */
2477 unsigned int flags; /* resulting update flags (see below) */
2478 data_size_t total_size; /* total size of the resulting region */
2479 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2481 #define UPDATE_NONCLIENT 0x001 /* get region for repainting non-client area */
2482 #define UPDATE_ERASE 0x002 /* get region for erasing client area */
2483 #define UPDATE_PAINT 0x004 /* get region for painting client area */
2484 #define UPDATE_INTERNALPAINT 0x008 /* get region if internal paint is pending */
2485 #define UPDATE_ALLCHILDREN 0x010 /* force repaint of all children */
2486 #define UPDATE_NOCHILDREN 0x020 /* don't try to repaint any children
*/
2487 #define UPDATE_NOREGION
0x040 /* don
't return a region, only the flags */
2488 #define UPDATE_DELAYED_ERASE 0x080 /* still needs erase after BeginPaint */
2489 #define UPDATE_CLIPCHILDREN 0x100 /* remove clipped children from the update region */
2492 /* Update the z order of a window so that a given rectangle is fully visible */
2493 @REQ(update_window_zorder)
2494 user_handle_t window; /* handle to the window */
2495 rectangle_t rect; /* rectangle that must be visible (in client coords) */
2499 /* Mark parts of a window as needing a redraw */
2501 user_handle_t window; /* handle to the window */
2502 unsigned int flags; /* RDW_* flags */
2503 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2507 /* Set a window property */
2508 @REQ(set_window_property)
2509 user_handle_t window; /* handle to the window */
2510 lparam_t data; /* data to store */
2511 atom_t atom; /* property atom (if no name specified) */
2512 VARARG(name,unicode_str); /* property name */
2516 /* Remove a window property */
2517 @REQ(remove_window_property)
2518 user_handle_t window; /* handle to the window */
2519 atom_t atom; /* property atom (if no name specified) */
2520 VARARG(name,unicode_str); /* property name */
2522 lparam_t data; /* data stored in property */
2526 /* Get a window property */
2527 @REQ(get_window_property)
2528 user_handle_t window; /* handle to the window */
2529 atom_t atom; /* property atom (if no name specified) */
2530 VARARG(name,unicode_str); /* property name */
2532 lparam_t data; /* data stored in property */
2536 /* Get the list of properties of a window */
2537 @REQ(get_window_properties)
2538 user_handle_t window; /* handle to the window */
2540 int total; /* total number of properties */
2541 VARARG(props,properties); /* list of properties */
2545 /* Create a window station */
2546 @REQ(create_winstation)
2547 unsigned int flags; /* window station flags */
2548 unsigned int access; /* wanted access rights */
2549 unsigned int attributes; /* object attributes */
2550 obj_handle_t rootdir; /* root directory */
2551 VARARG(name,unicode_str); /* object name */
2553 obj_handle_t handle; /* handle to the window station */
2557 /* Open a handle to a window station */
2558 @REQ(open_winstation)
2559 unsigned int access; /* wanted access rights */
2560 unsigned int attributes; /* object attributes */
2561 obj_handle_t rootdir; /* root directory */
2562 VARARG(name,unicode_str); /* object name */
2564 obj_handle_t handle; /* handle to the window station */
2568 /* Close a window station */
2569 @REQ(close_winstation)
2570 obj_handle_t handle; /* handle to the window station */
2574 /* Get the process current window station */
2575 @REQ(get_process_winstation)
2577 obj_handle_t handle; /* handle to the window station */
2581 /* Set the process current window station */
2582 @REQ(set_process_winstation)
2583 obj_handle_t handle; /* handle to the window station */
2587 /* Enumerate window stations */
2588 @REQ(enum_winstation)
2589 unsigned int index; /* current index */
2591 unsigned int next; /* next index */
2592 VARARG(name,unicode_str); /* window station name */
2596 /* Create a desktop */
2597 @REQ(create_desktop)
2598 unsigned int flags; /* desktop flags */
2599 unsigned int access; /* wanted access rights */
2600 unsigned int attributes; /* object attributes */
2601 VARARG(name,unicode_str); /* object name */
2603 obj_handle_t handle; /* handle to the desktop */
2607 /* Open a handle to a desktop */
2609 obj_handle_t winsta; /* window station to open (null allowed) */
2610 unsigned int flags; /* desktop flags */
2611 unsigned int access; /* wanted access rights */
2612 unsigned int attributes; /* object attributes */
2613 VARARG(name,unicode_str); /* object name */
2615 obj_handle_t handle; /* handle to the desktop */
2619 /* Open a handle to current input desktop */
2620 @REQ(open_input_desktop)
2621 unsigned int flags; /* desktop flags */
2622 unsigned int access; /* wanted access rights */
2623 unsigned int attributes; /* object attributes */
2625 obj_handle_t handle; /* handle to the desktop */
2629 /* Close a desktop */
2631 obj_handle_t handle; /* handle to the desktop */
2635 /* Get the thread current desktop */
2636 @REQ(get_thread_desktop)
2637 thread_id_t tid; /* thread id */
2639 obj_handle_t handle; /* handle to the desktop */
2643 /* Set the thread current desktop */
2644 @REQ(set_thread_desktop)
2645 obj_handle_t handle; /* handle to the desktop */
2649 /* Enumerate desktops */
2651 obj_handle_t winstation; /* handle to the window station */
2652 unsigned int index; /* current index */
2654 unsigned int next; /* next index */
2655 VARARG(name,unicode_str); /* window station name */
2659 /* Get/set information about a user object (window station or desktop) */
2660 @REQ(set_user_object_info)
2661 obj_handle_t handle; /* handle to the object */
2662 unsigned int flags; /* information to set/get */
2663 unsigned int obj_flags; /* new object flags */
2665 int is_desktop; /* is object a desktop? */
2666 unsigned int old_obj_flags; /* old object flags */
2667 VARARG(name,unicode_str); /* object name */
2669 #define SET_USER_OBJECT_SET_FLAGS 1
2670 #define SET_USER_OBJECT_GET_FULL_NAME 2
2673 /* Register a hotkey */
2674 @REQ(register_hotkey)
2675 user_handle_t window; /* handle to the window */
2676 int id; /* hotkey identifier */
2677 unsigned int flags; /* modifier keys */
2678 unsigned int vkey; /* virtual key code */
2680 int replaced; /* did we replace an existing hotkey? */
2681 unsigned int flags; /* flags of replaced hotkey */
2682 unsigned int vkey; /* virtual key code of replaced hotkey */
2686 /* Unregister a hotkey */
2687 @REQ(unregister_hotkey)
2688 user_handle_t window; /* handle to the window */
2689 int id; /* hotkey identifier */
2691 unsigned int flags; /* flags of removed hotkey */
2692 unsigned int vkey; /* virtual key code of removed hotkey */
2696 /* Attach (or detach) thread inputs */
2697 @REQ(attach_thread_input)
2698 thread_id_t tid_from; /* thread to be attached */
2699 thread_id_t tid_to; /* thread to which tid_from should be attached */
2700 int attach; /* is it an attach? */
2704 /* Get input data for a given thread */
2705 @REQ(get_thread_input)
2706 thread_id_t tid; /* id of thread */
2708 user_handle_t focus; /* handle to the focus window */
2709 user_handle_t capture; /* handle to the capture window */
2710 user_handle_t active; /* handle to the active window */
2711 user_handle_t foreground; /* handle to the global foreground window */
2712 user_handle_t menu_owner; /* handle to the menu owner */
2713 user_handle_t move_size; /* handle to the moving/resizing window */
2714 user_handle_t caret; /* handle to the caret window */
2715 user_handle_t cursor; /* handle to the cursor */
2716 int show_count; /* cursor show count */
2717 rectangle_t rect; /* caret rectangle */
2721 /* Get the time of the last input event */
2722 @REQ(get_last_input_time)
2728 /* Retrieve queue keyboard state for a given thread */
2730 thread_id_t tid; /* id of thread */
2731 int key; /* optional key code or -1 */
2733 unsigned char state; /* state of specified key */
2734 VARARG(keystate,bytes); /* state array for all the keys */
2737 /* Set queue keyboard state for a given thread */
2739 thread_id_t tid; /* id of thread */
2740 int async; /* whether to change the async state too */
2741 VARARG(keystate,bytes); /* state array for all the keys */
2744 /* Set the system foreground window */
2745 @REQ(set_foreground_window)
2746 user_handle_t handle; /* handle to the foreground window */
2748 user_handle_t previous; /* handle to the previous foreground window */
2749 int send_msg_old; /* whether we have to send a msg to the old window */
2750 int send_msg_new; /* whether we have to send a msg to the new window */
2753 /* Set the current thread focus window */
2754 @REQ(set_focus_window)
2755 user_handle_t handle; /* handle to the focus window */
2757 user_handle_t previous; /* handle to the previous focus window */
2760 /* Set the current thread active window */
2761 @REQ(set_active_window)
2762 user_handle_t handle; /* handle to the active window */
2764 user_handle_t previous; /* handle to the previous active window */
2767 /* Set the current thread capture window */
2768 @REQ(set_capture_window)
2769 user_handle_t handle; /* handle to the capture window */
2770 unsigned int flags; /* capture flags (see below) */
2772 user_handle_t previous; /* handle to the previous capture window */
2773 user_handle_t full_handle; /* full 32-bit handle of new capture window */
2775 #define CAPTURE_MENU 0x01 /* capture is for a menu */
2776 #define CAPTURE_MOVESIZE 0x02 /* capture is for moving/resizing */
2779 /* Set the current thread caret window */
2780 @REQ(set_caret_window)
2781 user_handle_t handle; /* handle to the caret window */
2782 int width; /* caret width */
2783 int height; /* caret height */
2785 user_handle_t previous; /* handle to the previous caret window */
2786 rectangle_t old_rect; /* previous caret rectangle */
2787 int old_hide; /* previous hide count */
2788 int old_state; /* previous caret state (1=on, 0=off) */
2792 /* Set the current thread caret information */
2793 @REQ(set_caret_info)
2794 unsigned int flags; /* caret flags (see below) */
2795 user_handle_t handle; /* handle to the caret window */
2796 int x; /* caret x position */
2797 int y; /* caret y position */
2798 int hide; /* increment for hide count (can be negative to show it) */
2799 int state; /* caret state (see below) */
2801 user_handle_t full_handle; /* handle to the current caret window */
2802 rectangle_t old_rect; /* previous caret rectangle */
2803 int old_hide; /* previous hide count */
2804 int old_state; /* previous caret state (1=on, 0=off) */
2806 #define SET_CARET_POS 0x01 /* set the caret position from x,y */
2807 #define SET_CARET_HIDE 0x02 /* increment the caret hide count */
2808 #define SET_CARET_STATE 0x04 /* set the caret on/off state */
2811 CARET_STATE_OFF, /* off */
2812 CARET_STATE_ON, /* on */
2813 CARET_STATE_TOGGLE, /* toggle current state */
2814 CARET_STATE_ON_IF_MOVED /* on if the position differs, unchanged otherwise */
2818 /* Set a window hook */
2820 int id; /* id of the hook */
2821 process_id_t pid; /* id of process to set the hook into */
2822 thread_id_t tid; /* id of thread to set the hook into */
2825 client_ptr_t proc; /* hook procedure */
2827 int unicode; /* is it a unicode hook? */
2828 VARARG(module,unicode_str); /* module name */
2830 user_handle_t handle; /* handle to the hook */
2831 unsigned int active_hooks; /* active hooks bitmap */
2835 /* Remove a window hook */
2837 user_handle_t handle; /* handle to the hook */
2838 client_ptr_t proc; /* hook procedure if handle is 0 */
2839 int id; /* id of the hook if handle is 0 */
2841 unsigned int active_hooks; /* active hooks bitmap */
2845 /* Start calling a hook chain */
2846 @REQ(start_hook_chain)
2847 int id; /* id of the hook */
2848 int event; /* signalled event */
2849 user_handle_t window; /* handle to the event window */
2850 int object_id; /* object id for out of context winevent */
2851 int child_id; /* child id for out of context winevent */
2853 user_handle_t handle; /* handle to the next hook */
2854 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2855 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2856 int unicode; /* is it a unicode hook? */
2857 client_ptr_t proc; /* hook procedure */
2858 unsigned int active_hooks; /* active hooks bitmap */
2859 VARARG(module,unicode_str); /* module name */
2863 /* Finished calling a hook chain */
2864 @REQ(finish_hook_chain)
2865 int id; /* id of the hook */
2869 /* Get the hook information */
2871 user_handle_t handle; /* handle to the current hook */
2872 int get_next; /* do we want info about current or next hook? */
2873 int event; /* signalled event */
2874 user_handle_t window; /* handle to the event window */
2875 int object_id; /* object id for out of context winevent */
2876 int child_id; /* child id for out of context winevent */
2878 user_handle_t handle; /* handle to the hook */
2879 int id; /* id of the hook */
2880 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2881 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2882 client_ptr_t proc; /* hook procedure */
2883 int unicode; /* is it a unicode hook? */
2884 VARARG(module,unicode_str); /* module name */
2888 /* Create a window class */
2890 int local; /* is it a local class? */
2891 atom_t atom; /* class atom */
2892 unsigned int style; /* class style */
2893 mod_handle_t instance; /* module instance */
2894 int extra; /* number of extra class bytes */
2895 int win_extra; /* number of window extra bytes */
2896 client_ptr_t client_ptr; /* pointer to class in client address space */
2897 data_size_t name_offset; /* base class name offset for specified atom */
2898 VARARG(name,unicode_str); /* class name */
2900 atom_t atom; /* resulting class atom */
2904 /* Destroy a window class */
2906 atom_t atom; /* class atom */
2907 mod_handle_t instance; /* module instance */
2908 VARARG(name,unicode_str); /* class name */
2910 client_ptr_t client_ptr; /* pointer to class in client address space */
2914 /* Set some information in a class */
2915 @REQ(set_class_info)
2916 user_handle_t window; /* handle to the window */
2917 unsigned int flags; /* flags for info to set (see below) */
2918 atom_t atom; /* class atom */
2919 unsigned int style; /* class style */
2920 int win_extra; /* number of window extra bytes */
2921 mod_handle_t instance; /* module instance */
2922 int extra_offset; /* offset to set in extra bytes */
2923 data_size_t extra_size; /* size to set in extra bytes */
2924 lparam_t extra_value; /* value to set in extra bytes */
2926 atom_t old_atom; /* previous class atom */
2927 atom_t base_atom; /* base class atom */
2928 mod_handle_t old_instance; /* previous module instance */
2929 lparam_t old_extra_value; /* old value in extra bytes */
2930 unsigned int old_style; /* previous class style */
2931 int old_extra; /* previous number of class extra bytes */
2932 int old_win_extra; /* previous number of window extra bytes */
2934 #define SET_CLASS_ATOM 0x0001
2935 #define SET_CLASS_STYLE 0x0002
2936 #define SET_CLASS_WINEXTRA 0x0004
2937 #define SET_CLASS_INSTANCE 0x0008
2938 #define SET_CLASS_EXTRA 0x0010
2941 /* Open the clipboard */
2942 @REQ(open_clipboard)
2943 user_handle_t window; /* clipboard window */
2945 user_handle_t owner; /* current clipboard owner */
2949 /* Close the clipboard */
2950 @REQ(close_clipboard)
2952 user_handle_t viewer; /* first clipboard viewer */
2953 user_handle_t owner; /* current clipboard owner */
2957 /* Empty the clipboard and grab ownership */
2958 @REQ(empty_clipboard)
2962 /* Add a data format to the clipboard */
2963 @REQ(set_clipboard_data)
2964 unsigned int format; /* clipboard format of the data */
2965 unsigned int lcid; /* locale id to use for synthesizing text formats */
2966 VARARG(data,bytes); /* data contents */
2968 unsigned int seqno; /* sequence number for the set data */
2972 /* Fetch a data format from the clipboard */
2973 @REQ(get_clipboard_data)
2974 unsigned int format; /* clipboard format of the data */
2975 int render; /* will we try to render it if missing? */
2976 int cached; /* do we already have it in the client-side cache? */
2977 unsigned int seqno; /* sequence number for the data in the cache */
2979 unsigned int from; /* for synthesized data, format to generate it from */
2980 user_handle_t owner; /* clipboard owner for delayed-rendered formats */
2981 unsigned int seqno; /* sequence number for the originally set data */
2982 data_size_t total; /* total data size */
2983 VARARG(data,bytes); /* data contents */
2987 /* Retrieve a list of available formats */
2988 @REQ(get_clipboard_formats)
2989 unsigned int format; /* specific format to query, return all if 0 */
2991 unsigned int count; /* count of available formats */
2992 VARARG(formats,uints); /* array of available formats */
2996 /* Retrieve the next available format */
2997 @REQ(enum_clipboard_formats)
2998 unsigned int previous; /* previous format, or first if 0 */
3000 unsigned int format; /* next format */
3004 /* Release ownership of the clipboard */
3005 @REQ(release_clipboard)
3006 user_handle_t owner; /* clipboard owner to release */
3008 user_handle_t viewer; /* first clipboard viewer */
3009 user_handle_t owner; /* current clipboard owner */
3013 /* Get clipboard information */
3014 @REQ(get_clipboard_info)
3016 user_handle_t window; /* clipboard window */
3017 user_handle_t owner; /* clipboard owner */
3018 user_handle_t viewer; /* clipboard viewer */
3019 unsigned int seqno; /* current sequence number */
3023 /* Set the clipboard viewer window */
3024 @REQ(set_clipboard_viewer)
3025 user_handle_t viewer; /* clipboard viewer */
3026 user_handle_t previous; /* if non-zero, check that this was the previous viewer */
3028 user_handle_t old_viewer; /* previous clipboard viewer */
3029 user_handle_t owner; /* clipboard owner */
3033 /* Add a clipboard listener window */
3034 @REQ(add_clipboard_listener)
3035 user_handle_t window; /* clipboard listener window */
3039 /* Remove a clipboard listener window */
3040 @REQ(remove_clipboard_listener)
3041 user_handle_t window; /* clipboard listener window */
3045 /* Open a security token */
3047 obj_handle_t handle; /* handle to the thread or process */
3048 unsigned int access; /* access rights to the new token */
3049 unsigned int attributes;/* object attributes */
3050 unsigned int flags; /* flags (see below) */
3052 obj_handle_t token; /* handle to the token */
3054 #define OPEN_TOKEN_THREAD 1
3055 #define OPEN_TOKEN_AS_SELF 2
3058 /* Set/get the global windows */
3059 @REQ(set_global_windows)
3060 unsigned int flags; /* flags for fields to set (see below) */
3061 user_handle_t shell_window; /* handle to the new shell window */
3062 user_handle_t shell_listview; /* handle to the new shell listview window */
3063 user_handle_t progman_window; /* handle to the new program manager window */
3064 user_handle_t taskman_window; /* handle to the new task manager window */
3066 user_handle_t old_shell_window; /* handle to the shell window */
3067 user_handle_t old_shell_listview; /* handle to the shell listview window */
3068 user_handle_t old_progman_window; /* handle to the new program manager window */
3069 user_handle_t old_taskman_window; /* handle to the new task manager window */
3071 #define SET_GLOBAL_SHELL_WINDOWS 0x01 /* set both main shell and listview windows */
3072 #define SET_GLOBAL_PROGMAN_WINDOW 0x02
3073 #define SET_GLOBAL_TASKMAN_WINDOW 0x04
3075 /* Adjust the privileges held by a token */
3076 @REQ(adjust_token_privileges)
3077 obj_handle_t handle; /* handle to the token */
3078 int disable_all; /* disable all privileges? */
3079 int get_modified_state; /* get modified privileges? */
3080 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to enable/disable/remove */
3082 unsigned int len; /* total length in bytes required to store token privileges */
3083 VARARG(privileges,LUID_AND_ATTRIBUTES); /* modified privileges */
3086 /* Retrieves the set of privileges held by or available to a token */
3087 @REQ(get_token_privileges)
3088 obj_handle_t handle; /* handle to the token */
3090 unsigned int len; /* total length in bytes required to store token privileges */
3091 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
3094 /* Check the token has the required privileges */
3095 @REQ(check_token_privileges)
3096 obj_handle_t handle; /* handle to the token */
3097 int all_required; /* are all the privileges required for the check to succeed? */
3098 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to check */
3100 int has_privileges; /* does the token have the required privileges? */
3101 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
3104 @REQ(duplicate_token)
3105 obj_handle_t handle; /* handle to the token to duplicate */
3106 unsigned int access; /* access rights to the new token */
3107 int primary; /* is the new token to be a primary one? */
3108 int impersonation_level; /* impersonation level of the new token */
3109 VARARG(objattr,object_attributes); /* object attributes */
3111 obj_handle_t new_handle; /* duplicated handle */
3115 obj_handle_t handle; /* handle to the token to duplicate */
3116 unsigned int flags; /* flags */
3117 data_size_t privileges_size; /* size of privileges */
3118 VARARG(privileges,LUID_AND_ATTRIBUTES,privileges_size); /* privileges to remove from new token */
3119 VARARG(disable_sids,SID); /* array of groups to remove from new token */
3121 obj_handle_t new_handle; /* filtered handle */
3125 obj_handle_t handle; /* handle to the token */
3126 unsigned int desired_access; /* desired access to the object */
3127 unsigned int mapping_read; /* mapping from generic read to specific rights */
3128 unsigned int mapping_write; /* mapping from generic write to specific rights */
3129 unsigned int mapping_execute; /* mapping from generic execute to specific rights */
3130 unsigned int mapping_all; /* mapping from generic all to specific rights */
3131 VARARG(sd,security_descriptor); /* security descriptor to check */
3133 unsigned int access_granted; /* access rights actually granted */
3134 unsigned int access_status; /* was access granted? */
3135 unsigned int privileges_len; /* length needed to store privileges */
3136 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges used during access check */
3140 obj_handle_t handle; /* handle to the token */
3141 unsigned int which_sid; /* which SID to retrieve from the token */
3143 data_size_t sid_len; /* length needed to store sid */
3144 VARARG(sid,SID); /* the sid specified by which_sid from the token */
3147 @REQ(get_token_groups)
3148 obj_handle_t handle; /* handle to the token */
3150 data_size_t user_len; /* length needed to store user */
3151 VARARG(user,token_groups); /* groups the token's user belongs to
*/
3154 @
REQ(get_token_default_dacl
)
3155 obj_handle_t handle
; /* handle to the token
*/
3157 data_size_t acl_len
; /* length needed to store access control list
*/
3158 VARARG(acl
,ACL
); /* access control list
*/
3161 @
REQ(set_token_default_dacl
)
3162 obj_handle_t handle
; /* handle to the token
*/
3163 VARARG(acl
,ACL
); /* default dacl to set
*/
3166 @
REQ(set_security_object
)
3167 obj_handle_t handle
; /* handle to the object
*/
3168 unsigned int security_info
; /* which parts of security descriptor to set
*/
3169 VARARG(sd
,security_descriptor
); /* security descriptor to set
*/
3172 @
REQ(get_security_object
)
3173 obj_handle_t handle
; /* handle to the object
*/
3174 unsigned int security_info
; /* which parts of security descriptor to get
*/
3176 unsigned int sd_len
; /* buffer size needed for sd
*/
3177 VARARG(sd
,security_descriptor
); /* retrieved security descriptor
*/
3184 obj_handle_t handle
;
3185 unsigned int access
;
3188 /* Return a list of all opened handles
*/
3189 @
REQ(get_system_handles
)
3191 unsigned int count
; /* number of handles
*/
3192 VARARG(data
,handle_infos
); /* array of handle_infos
*/
3196 /* Create a mailslot
*/
3197 @
REQ(create_mailslot
)
3198 unsigned int access
; /* wanted access rights
*/
3199 timeout_t read_timeout
;
3200 unsigned int max_msgsize
;
3201 VARARG(objattr
,object_attributes
); /* object attributes
*/
3203 obj_handle_t handle
; /* handle to the mailslot
*/
3207 /* Set mailslot information
*/
3208 @
REQ(set_mailslot_info
)
3209 obj_handle_t handle
; /* handle to the mailslot
*/
3210 timeout_t read_timeout
;
3213 timeout_t read_timeout
;
3214 unsigned int max_msgsize
;
3216 #define MAILSLOT_SET_READ_TIMEOUT
1
3219 /* Create a directory object
*/
3220 @
REQ(create_directory
)
3221 unsigned int access
; /* access flags
*/
3222 VARARG(objattr
,object_attributes
); /* object attributes
*/
3224 obj_handle_t handle
; /* handle to the directory
*/
3228 /* Open a directory object
*/
3229 @
REQ(open_directory
)
3230 unsigned int access
; /* access flags
*/
3231 unsigned int attributes
; /* object attributes
*/
3232 obj_handle_t rootdir
; /* root directory
*/
3233 VARARG(directory_name
,unicode_str
); /* Directory name
*/
3235 obj_handle_t handle
; /* handle to the directory
*/
3239 /* Get a directory entry by index
*/
3240 @
REQ(get_directory_entry
)
3241 obj_handle_t handle
; /* handle to the directory
*/
3242 unsigned int index
; /* entry index
*/
3244 data_size_t name_len
; /* length of the entry name in bytes
*/
3245 VARARG(name
,unicode_str
,name_len
); /* entry name
*/
3246 VARARG(type
,unicode_str
); /* entry type
*/
3250 /* Create a symbolic link object
*/
3251 @
REQ(create_symlink
)
3252 unsigned int access
; /* access flags
*/
3253 VARARG(objattr
,object_attributes
); /* object attributes
*/
3254 VARARG(target_name
,unicode_str
); /* target name
*/
3256 obj_handle_t handle
; /* handle to the symlink
*/
3260 /* Open a symbolic link object
*/
3262 unsigned int access
; /* access flags
*/
3263 unsigned int attributes
; /* object attributes
*/
3264 obj_handle_t rootdir
; /* root directory
*/
3265 VARARG(name
,unicode_str
); /* symlink name
*/
3267 obj_handle_t handle
; /* handle to the symlink
*/
3271 /* Query a symbolic link object
*/
3273 obj_handle_t handle
; /* handle to the symlink
*/
3275 data_size_t total
; /* total needed size for name
*/
3276 VARARG(target_name
,unicode_str
); /* target name
*/
3280 /* Query basic object information
*/
3281 @
REQ(get_object_info
)
3282 obj_handle_t handle
; /* handle to the object
*/
3284 unsigned int access
; /* granted access mask
*/
3285 unsigned int ref_count
; /* object ref count
*/
3286 unsigned int handle_count
; /* object handle count
*/
3287 data_size_t total
; /* total needed size for name
*/
3288 VARARG(name
,unicode_str
); /* object name
*/
3292 /* Query object type name information
*/
3293 @
REQ(get_object_type
)
3294 obj_handle_t handle
; /* handle to the object
*/
3296 data_size_t total
; /* needed size for type name
*/
3297 VARARG(type
,unicode_str
); /* type name
*/
3301 /* Query the impersonation level of an impersonation token
*/
3302 @
REQ(get_token_impersonation_level
)
3303 obj_handle_t handle
; /* handle to the object
*/
3305 int impersonation_level
; /* impersonation level of the impersonation token
*/
3308 /* Allocate a locally
-unique identifier
*/
3309 @
REQ(allocate_locally_unique_id
)
3315 /* Create a device manager
*/
3316 @
REQ(create_device_manager
)
3317 unsigned int access
; /* wanted access rights
*/
3318 unsigned int attributes
; /* object attributes
*/
3320 obj_handle_t handle
; /* handle to the device
*/
3324 /* Create a device
*/
3326 obj_handle_t rootdir
; /* root directory
*/
3327 client_ptr_t user_ptr
; /* opaque ptr for use by client
*/
3328 obj_handle_t manager
; /* device manager
*/
3329 VARARG(name
,unicode_str
); /* object name
*/
3333 /* Delete a device
*/
3335 obj_handle_t manager
; /* handle to the device manager
*/
3336 client_ptr_t device
; /* pointer to the device
*/
3340 /* Retrieve the next pending device irp request
*/
3341 @
REQ(get_next_device_request
)
3342 obj_handle_t manager
; /* handle to the device manager
*/
3343 obj_handle_t prev
; /* handle to the previous irp
*/
3344 unsigned int status
; /* status of the previous irp
*/
3345 client_ptr_t user_ptr
; /* user pointer of the previous irp
*/
3347 irp_params_t params
; /* irp parameters
*/
3348 obj_handle_t next
; /* handle to the next irp
*/
3349 thread_id_t client_tid
; /* tid of thread calling irp
*/
3350 client_ptr_t client_thread
; /* pointer to thread object of calling irp
*/
3351 data_size_t in_size
; /* total needed input size
*/
3352 VARARG(next_data
,bytes
); /* input data of the next irp
*/
3356 /* Get kernel pointer from server object
*/
3357 @
REQ(get_kernel_object_ptr
)
3358 obj_handle_t manager
; /* handle to the device manager
*/
3359 obj_handle_t handle
; /* object handle
*/
3361 client_ptr_t user_ptr
; /* kernel object pointer
*/
3365 /* Associate kernel pointer with server object
*/
3366 @
REQ(set_kernel_object_ptr
)
3367 obj_handle_t manager
; /* handle to the device manager
*/
3368 obj_handle_t handle
; /* object handle
*/
3369 client_ptr_t user_ptr
; /* kernel object pointer
*/
3373 /* Grab server object reference from kernel object pointer
*/
3374 @
REQ(grab_kernel_object
)
3375 obj_handle_t manager
; /* handle to the device manager
*/
3376 client_ptr_t user_ptr
; /* kernel object pointer
*/
3380 /* Release server object reference from kernel object pointer
*/
3381 @
REQ(release_kernel_object
)
3382 obj_handle_t manager
; /* handle to the device manager
*/
3383 client_ptr_t user_ptr
; /* kernel object pointer
*/
3387 /* Get handle from kernel object pointer
*/
3388 @
REQ(get_kernel_object_handle
)
3389 obj_handle_t manager
; /* handle to the device manager
*/
3390 client_ptr_t user_ptr
; /* kernel object pointer
*/
3391 unsigned int access
; /* wanted access rights
*/
3393 obj_handle_t handle
; /* kernel object handle
*/
3397 /* Make the current process a system process
*/
3398 @
REQ(make_process_system
)
3400 obj_handle_t event
; /* event signaled when all user processes have exited
*/
3404 /* Get detailed fixed
-size information about a token
*/
3405 @
REQ(get_token_statistics
)
3406 obj_handle_t handle
; /* handle to the object
*/
3408 luid_t token_id
; /* locally
-unique identifier of the token
*/
3409 luid_t modified_id
; /* locally
-unique identifier of the modified version of the token
*/
3410 int primary
; /* is the token primary or impersonation?
*/
3411 int impersonation_level
; /* level of impersonation
*/
3412 int group_count
; /* the number of groups the token is a member of
*/
3413 int privilege_count
; /* the number of privileges the token has
*/
3417 /* Create I
/O completion port
*/
3418 @
REQ(create_completion
)
3419 unsigned int access
; /* desired access to a port
*/
3420 unsigned int concurrent
; /* max number of concurrent active threads
*/
3421 VARARG(objattr
,object_attributes
); /* object attributes
*/
3423 obj_handle_t handle
; /* port handle
*/
3427 /* Open I
/O completion port
*/
3428 @
REQ(open_completion
)
3429 unsigned int access
; /* desired access to a port
*/
3430 unsigned int attributes
; /* object attributes
*/
3431 obj_handle_t rootdir
; /* root directory
*/
3432 VARARG(filename
,unicode_str
); /* port name
*/
3434 obj_handle_t handle
; /* port handle
*/
3438 /* add completion to completion port
*/
3439 @
REQ(add_completion
)
3440 obj_handle_t handle
; /* port handle
*/
3441 apc_param_t ckey
; /* completion key
*/
3442 apc_param_t cvalue
; /* completion value
*/
3443 apc_param_t information
; /* IO_STATUS_BLOCK Information
*/
3444 unsigned int status
; /* completion result
*/
3448 /* get completion from completion port queue
*/
3449 @
REQ(remove_completion
)
3450 obj_handle_t handle
; /* port handle
*/
3452 apc_param_t ckey
; /* completion key
*/
3453 apc_param_t cvalue
; /* completion value
*/
3454 apc_param_t information
; /* IO_STATUS_BLOCK Information
*/
3455 unsigned int status
; /* completion result
*/
3459 /* get completion queue depth
*/
3460 @
REQ(query_completion
)
3461 obj_handle_t handle
; /* port handle
*/
3463 unsigned int depth
; /* completion queue depth
*/
3467 /* associate object with completion port
*/
3468 @
REQ(set_completion_info
)
3469 obj_handle_t handle
; /* object handle
*/
3470 apc_param_t ckey
; /* completion key
*/
3471 obj_handle_t chandle
; /* port handle
*/
3475 /* check for associated completion and push msg
*/
3476 @
REQ(add_fd_completion
)
3477 obj_handle_t handle
; /* async
' object */
3478 apc_param_t cvalue; /* completion value */
3479 apc_param_t information; /* IO_STATUS_BLOCK Information */
3480 unsigned int status; /* completion status */
3481 int async; /* completion is an async result */
3485 /* set fd completion information */
3486 @REQ(set_fd_completion_mode)
3487 obj_handle_t handle; /* handle to a file or directory */
3488 unsigned int flags; /* completion notification flags */
3492 /* set fd disposition information */
3493 @REQ(set_fd_disp_info)
3494 obj_handle_t handle; /* handle to a file or directory */
3495 int unlink; /* whether to unlink file on close */
3499 /* set fd name information */
3500 @REQ(set_fd_name_info)
3501 obj_handle_t handle; /* handle to a file or directory */
3502 obj_handle_t rootdir; /* root directory */
3503 int link; /* link instead of renaming */
3504 int replace; /* replace an existing file? */
3505 VARARG(filename,string); /* new file name */
3509 /* Retrieve layered info for a window */
3510 @REQ(get_window_layered_info)
3511 user_handle_t handle; /* handle to the window */
3513 unsigned int color_key; /* color key */
3514 unsigned int alpha; /* alpha (0..255) */
3515 unsigned int flags; /* LWA_* flags */
3519 /* Set layered info for a window */
3520 @REQ(set_window_layered_info)
3521 user_handle_t handle; /* handle to the window */
3522 unsigned int color_key; /* color key */
3523 unsigned int alpha; /* alpha (0..255) */
3524 unsigned int flags; /* LWA_* flags */
3528 /* Allocate an arbitrary user handle */
3529 @REQ(alloc_user_handle)
3531 user_handle_t handle; /* allocated handle */
3535 /* Free an arbitrary user handle */
3536 @REQ(free_user_handle)
3537 user_handle_t handle; /* handle to free*/
3541 /* Set/get the current cursor */
3543 unsigned int flags; /* flags for fields to set (see below) */
3544 user_handle_t handle; /* handle to the cursor */
3545 int show_count; /* show count increment/decrement */
3546 int x; /* cursor position */
3548 rectangle_t clip; /* cursor clip rectangle */
3549 unsigned int clip_msg; /* message to post on cursor clip changes */
3551 user_handle_t prev_handle; /* previous handle */
3552 int prev_count; /* previous show count */
3553 int prev_x; /* previous position */
3555 int new_x; /* new position */
3557 rectangle_t new_clip; /* new clip rectangle */
3558 unsigned int last_change; /* time of last position change */
3560 #define SET_CURSOR_HANDLE 0x01
3561 #define SET_CURSOR_COUNT 0x02
3562 #define SET_CURSOR_POS 0x04
3563 #define SET_CURSOR_CLIP 0x08
3564 #define SET_CURSOR_NOCLIP 0x10
3566 /* Get the history of the 64 last cursor positions */
3567 @REQ(get_cursor_history)
3569 VARARG(history,cursor_positions);
3573 /* Batch read rawinput message data */
3574 @REQ(get_rawinput_buffer)
3575 data_size_t rawinput_size; /* size of RAWINPUT structure */
3576 data_size_t buffer_size; /* size of output buffer */
3578 data_size_t next_size; /* minimum size to get next message data */
3583 /* Modify the list of registered rawinput devices */
3584 @REQ(update_rawinput_devices)
3585 VARARG(devices,rawinput_devices);
3588 /* Retrieve the list of registered rawinput devices */
3589 @REQ(get_rawinput_devices)
3591 unsigned int device_count;
3592 VARARG(devices,rawinput_devices);
3595 /* Create a new job object */
3597 unsigned int access; /* wanted access rights */
3598 VARARG(objattr,object_attributes); /* object attributes */
3600 obj_handle_t handle; /* handle to the job */
3604 /* Open a job object */
3606 unsigned int access; /* wanted access rights */
3607 unsigned int attributes; /* object attributes */
3608 obj_handle_t rootdir; /* root directory */
3609 VARARG(name,unicode_str); /* object name */
3611 obj_handle_t handle; /* handle to the job */
3615 /* Assign a job object to a process */
3617 obj_handle_t job; /* handle to the job */
3618 obj_handle_t process; /* handle to the process */
3622 /* Check if a process is associated with a job */
3623 @REQ(process_in_job)
3624 obj_handle_t job; /* handle to the job */
3625 obj_handle_t process; /* handle to the process */
3629 /* Set limit flags on a job */
3630 @REQ(set_job_limits)
3631 obj_handle_t handle; /* handle to the job */
3632 unsigned int limit_flags; /* new limit flags */
3636 /* Set new completion port for a job */
3637 @REQ(set_job_completion_port)
3638 obj_handle_t job; /* handle to the job */
3639 obj_handle_t port; /* handle to the completion port */
3640 client_ptr_t key; /* key to send with completion messages */
3644 /* Retrieve information about a job */
3646 obj_handle_t handle; /* handle to the job */
3648 int total_processes; /* total count of processes */
3649 int active_processes; /* count of running processes */
3653 /* Terminate all processes associated with the job */
3655 obj_handle_t handle; /* handle to the job */
3656 int status; /* process exit code */
3660 /* Suspend a process */
3661 @REQ(suspend_process)
3662 obj_handle_t handle; /* process handle */
3666 /* Resume a process */
3667 @REQ(resume_process)
3668 obj_handle_t handle; /* process handle */