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_low
;
760 unsigned short subsystem_high
;
762 unsigned short image_charact
;
763 unsigned short dll_charact
;
764 unsigned short machine
;
765 unsigned char contains_code
;
766 unsigned char image_flags
;
767 unsigned int loader_flags
;
768 unsigned int header_size
;
769 unsigned int file_size
;
770 unsigned int checksum
;
774 #define IMAGE_FLAGS_ComPlusNativeReady
0x01
775 #define IMAGE_FLAGS_ComPlusILOnly
0x02
776 #define IMAGE_FLAGS_ImageDynamicallyRelocated
0x04
777 #define IMAGE_FLAGS_ImageMappedFlat
0x08
778 #define IMAGE_FLAGS_BaseBelow4gb
0x10
779 #define IMAGE_FLAGS_WineBuiltin
0x40
780 #define IMAGE_FLAGS_WineFakeDll
0x80
782 struct rawinput_device
784 unsigned short usage_page
;
785 unsigned short usage
;
787 user_handle_t target
;
799 /****************************************************************/
800 /* Request declarations
*/
802 /* Create a new process from the context of the parent
*/
804 obj_handle_t token
; /* process token
*/
805 obj_handle_t parent_process
; /* parent process
*/
806 int inherit_all
; /* inherit all handles from parent
*/
807 unsigned int create_flags
; /* creation flags
*/
808 int socket_fd
; /* file descriptor for process socket
*/
809 obj_handle_t exe_file
; /* file handle for main exe
*/
810 unsigned int access
; /* access rights for process object
*/
811 client_cpu_t cpu
; /* CPU that the new process will use
*/
812 data_size_t info_size
; /* size of startup info
*/
813 data_size_t handles_size
; /* length of explicit handles list
*/
814 VARARG(objattr
,object_attributes
); /* object attributes
*/
815 VARARG(handles
,uints
,handles_size
); /* handles list
*/
816 VARARG(info
,startup_info
,info_size
); /* startup information
*/
817 VARARG(env
,unicode_str
); /* environment for new process
*/
819 obj_handle_t info
; /* new process info handle
*/
820 process_id_t pid
; /* process id
*/
821 obj_handle_t handle
; /* process
handle (in the current process
) */
825 /* Execute a process
, replacing the current one
*/
827 int socket_fd
; /* file descriptor for process socket
*/
828 client_cpu_t cpu
; /* CPU that the new process will use
*/
832 /* Retrieve information about a newly started process
*/
833 @
REQ(get_new_process_info
)
834 obj_handle_t info
; /* info handle returned from new_process_request
*/
836 int success
; /* did the process start successfully?
*/
837 int exit_code
; /* process exit code if failed
*/
841 /* Create a new thread
*/
843 obj_handle_t process
; /* process in which to create thread
*/
844 unsigned int access
; /* wanted access rights
*/
845 int suspend
; /* new thread should be suspended on creation
*/
846 int request_fd
; /* fd for request pipe
*/
847 VARARG(objattr
,object_attributes
); /* object attributes
*/
849 thread_id_t tid
; /* thread id
*/
850 obj_handle_t handle
; /* thread
handle (in the current process
) */
854 /* Retrieve the new process startup info
*/
855 @
REQ(get_startup_info
)
857 data_size_t info_size
; /* size of startup info
*/
858 VARARG(info
,startup_info
,info_size
); /* startup information
*/
859 VARARG(env
,unicode_str
); /* environment
*/
863 /* Signal the end of the process initialization
*/
864 @
REQ(init_process_done
)
865 int gui
; /* is it a GUI process?
*/
866 mod_handle_t module
; /* main module base address
*/
867 client_ptr_t ldt_copy
; /* address of LDT
copy (in thread address space
) */
868 client_ptr_t entry
; /* process entry point
*/
870 int suspend
; /* is process suspended?
*/
874 /* Initialize a thread
; called from the child after
fork()/clone() */
876 int unix_pid
; /* Unix pid of new thread
*/
877 int unix_tid
; /* Unix tid of new thread
*/
878 int debug_level
; /* new debug level
*/
879 client_ptr_t teb
; /* TEB of new
thread (in thread address space
) */
880 client_ptr_t entry
; /* entry point or PEB if initial
thread (in thread address space
) */
881 int reply_fd
; /* fd for reply pipe
*/
882 int wait_fd
; /* fd for blocking calls pipe
*/
883 client_cpu_t cpu
; /* CPU that this thread is running on
*/
885 process_id_t pid
; /* process id of the new thread
's process */
886 thread_id_t tid; /* thread id of the new thread */
887 timeout_t server_start; /* server start time */
888 data_size_t info_size; /* total size of startup info */
889 int version; /* protocol version */
890 unsigned int all_cpus; /* bitset of supported CPUs */
891 int suspend; /* is thread suspended? */
895 /* Terminate a process */
896 @REQ(terminate_process)
897 obj_handle_t handle; /* process handle to terminate */
898 int exit_code; /* process exit code */
900 int self; /* suicide? */
904 /* Terminate a thread */
905 @REQ(terminate_thread)
906 obj_handle_t handle; /* thread handle to terminate */
907 int exit_code; /* thread exit code */
909 int self; /* suicide? */
913 /* Retrieve information about a process */
914 @REQ(get_process_info)
915 obj_handle_t handle; /* process handle */
917 process_id_t pid; /* server process id */
918 process_id_t ppid; /* server process id of parent */
919 affinity_t affinity; /* process affinity mask */
920 client_ptr_t peb; /* PEB address in process address space */
921 timeout_t start_time; /* process start time */
922 timeout_t end_time; /* process end time */
923 int exit_code; /* process exit code */
924 int priority; /* priority class */
925 client_cpu_t cpu; /* CPU that this process is running on */
926 short int debugger_present; /* process is being debugged */
927 short int debug_children; /* inherit debugger to child processes */
928 VARARG(image,pe_image_info); /* image info for main exe */
932 /* Retrieve information about a process memory usage */
933 @REQ(get_process_vm_counters)
934 obj_handle_t handle; /* process handle */
936 mem_size_t peak_virtual_size; /* peak virtual memory in bytes */
937 mem_size_t virtual_size; /* virtual memory in bytes */
938 mem_size_t peak_working_set_size; /* peak real memory in bytes */
939 mem_size_t working_set_size; /* real memory in bytes */
940 mem_size_t pagefile_usage; /* commit charge in bytes */
941 mem_size_t peak_pagefile_usage; /* peak commit charge in bytes */
945 /* Set a process information */
946 @REQ(set_process_info)
947 obj_handle_t handle; /* process handle */
948 int mask; /* setting mask (see below) */
949 int priority; /* priority class */
950 affinity_t affinity; /* affinity mask */
952 #define SET_PROCESS_INFO_PRIORITY 0x01
953 #define SET_PROCESS_INFO_AFFINITY 0x02
956 /* Retrieve information about a thread */
957 @REQ(get_thread_info)
958 obj_handle_t handle; /* thread handle */
959 unsigned int access; /* required access rights */
961 process_id_t pid; /* server process id */
962 thread_id_t tid; /* server thread id */
963 client_ptr_t teb; /* thread teb pointer */
964 client_ptr_t entry_point; /* thread entry point */
965 affinity_t affinity; /* thread affinity mask */
966 int exit_code; /* thread exit code */
967 int priority; /* thread priority level */
968 int last; /* last thread in process */
969 int suspend_count; /* thread suspend count */
970 int dbg_hidden; /* thread hidden from debugger */
971 data_size_t desc_len; /* description length in bytes */
972 VARARG(desc,unicode_str); /* description string */
976 /* Retrieve information about thread times */
977 @REQ(get_thread_times)
978 obj_handle_t handle; /* thread handle */
980 timeout_t creation_time; /* thread creation time */
981 timeout_t exit_time; /* thread exit time */
982 int unix_pid; /* thread native pid */
983 int unix_tid; /* thread native pid */
987 /* Set a thread information */
988 @REQ(set_thread_info)
989 obj_handle_t handle; /* thread handle */
990 int mask; /* setting mask (see below) */
991 int priority; /* priority class */
992 affinity_t affinity; /* affinity mask */
993 client_ptr_t entry_point; /* thread entry point */
994 obj_handle_t token; /* impersonation token */
995 VARARG(desc,unicode_str); /* description string */
997 #define SET_THREAD_INFO_PRIORITY 0x01
998 #define SET_THREAD_INFO_AFFINITY 0x02
999 #define SET_THREAD_INFO_TOKEN 0x04
1000 #define SET_THREAD_INFO_ENTRYPOINT 0x08
1001 #define SET_THREAD_INFO_DESCRIPTION 0x10
1002 #define SET_THREAD_INFO_DBG_HIDDEN 0x20
1005 /* Retrieve information about a module */
1007 obj_handle_t handle; /* process handle */
1008 mod_handle_t base_address; /* base address of module */
1010 client_ptr_t entry_point;
1011 data_size_t filename_len; /* buffer len in bytes required to store filename */
1012 VARARG(filename,unicode_str); /* file name of module */
1016 /* Suspend a thread */
1017 @REQ(suspend_thread)
1018 obj_handle_t handle; /* thread handle */
1020 int count; /* new suspend count */
1024 /* Resume a thread */
1026 obj_handle_t handle; /* thread handle */
1028 int count; /* new suspend count */
1032 /* Notify the server that a dll has been loaded */
1034 data_size_t dbg_offset; /* debug info offset */
1035 mod_handle_t base; /* base address */
1036 client_ptr_t name; /* ptr to ptr to name (in process addr space) */
1037 data_size_t dbg_size; /* debug info size */
1038 VARARG(filename,unicode_str); /* file name of dll */
1042 /* Notify the server that a dll is being unloaded */
1044 mod_handle_t base; /* base address */
1048 /* Queue an APC for a thread or process */
1050 obj_handle_t handle; /* thread or process handle */
1051 apc_call_t call; /* call arguments */
1053 obj_handle_t handle; /* APC handle */
1054 int self; /* run APC in caller itself? */
1058 /* Get the result of an APC call */
1059 @REQ(get_apc_result)
1060 obj_handle_t handle; /* handle to the APC */
1062 apc_result_t result; /* result of the APC */
1066 /* Close a handle for the current process */
1068 obj_handle_t handle; /* handle to close */
1072 /* Set a handle information */
1073 @REQ(set_handle_info)
1074 obj_handle_t handle; /* handle we are interested in */
1075 int flags; /* new handle flags */
1076 int mask; /* mask for flags to set */
1078 int old_flags; /* old flag value */
1082 /* Duplicate a handle */
1084 obj_handle_t src_process; /* src process handle */
1085 obj_handle_t src_handle; /* src handle to duplicate */
1086 obj_handle_t dst_process; /* dst process handle */
1087 unsigned int access; /* wanted access rights */
1088 unsigned int attributes; /* object attributes */
1089 unsigned int options; /* duplicate options (see below) */
1091 obj_handle_t handle; /* duplicated handle in dst process */
1092 int self; /* is the source the current process? */
1093 int closed; /* whether the source handle has been closed */
1095 #define DUP_HANDLE_CLOSE_SOURCE DUPLICATE_CLOSE_SOURCE
1096 #define DUP_HANDLE_SAME_ACCESS DUPLICATE_SAME_ACCESS
1097 #define DUP_HANDLE_MAKE_GLOBAL 0x80000000 /* Not a Windows flag */
1100 /* Make an object temporary */
1101 @REQ(make_temporary)
1102 obj_handle_t handle; /* handle to the object */
1106 /* Open a handle to a process */
1108 process_id_t pid; /* process id to open */
1109 unsigned int access; /* wanted access rights */
1110 unsigned int attributes; /* object attributes */
1112 obj_handle_t handle; /* handle to the process */
1116 /* Open a handle to a thread */
1118 thread_id_t tid; /* thread id to open */
1119 unsigned int access; /* wanted access rights */
1120 unsigned int attributes; /* object attributes */
1122 obj_handle_t handle; /* handle to the thread */
1126 /* Wait for handles */
1128 int flags; /* wait flags (see below) */
1129 client_ptr_t cookie; /* magic cookie to return to client */
1130 abstime_t timeout; /* timeout */
1131 data_size_t size; /* size of select_op */
1132 obj_handle_t prev_apc; /* handle to previous APC */
1133 VARARG(result,apc_result); /* result of previous APC */
1134 VARARG(data,select_op,size); /* operation-specific data */
1135 VARARG(context,context); /* suspend context */
1137 apc_call_t call; /* APC call arguments */
1138 obj_handle_t apc_handle; /* handle to next APC */
1139 VARARG(context,context); /* suspend context */
1141 #define SELECT_ALERTABLE 1
1142 #define SELECT_INTERRUPTIBLE 2
1145 /* Create an event */
1147 unsigned int access; /* wanted access rights */
1148 int manual_reset; /* manual reset event */
1149 int initial_state; /* initial state of the event */
1150 VARARG(objattr,object_attributes); /* object attributes */
1152 obj_handle_t handle; /* handle to the event */
1155 /* Event operation */
1157 obj_handle_t handle; /* handle to event */
1158 int op; /* event operation (see below) */
1160 int state; /* previous state */
1162 enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT };
1165 obj_handle_t handle; /* handle to event */
1167 int manual_reset; /* manual reset event */
1168 int state; /* current state of the event */
1173 unsigned int access; /* wanted access rights */
1174 unsigned int attributes; /* object attributes */
1175 obj_handle_t rootdir; /* root directory */
1176 VARARG(name,unicode_str); /* object name */
1178 obj_handle_t handle; /* handle to the event */
1182 /* Create a keyed event */
1183 @REQ(create_keyed_event)
1184 unsigned int access; /* wanted access rights */
1185 VARARG(objattr,object_attributes); /* object attributes */
1187 obj_handle_t handle; /* handle to the event */
1190 /* Open a keyed event */
1191 @REQ(open_keyed_event)
1192 unsigned int access; /* wanted access rights */
1193 unsigned int attributes; /* object attributes */
1194 obj_handle_t rootdir; /* root directory */
1195 VARARG(name,unicode_str); /* object name */
1197 obj_handle_t handle; /* handle to the event */
1201 /* Create a mutex */
1203 unsigned int access; /* wanted access rights */
1204 int owned; /* initially owned? */
1205 VARARG(objattr,object_attributes); /* object attributes */
1207 obj_handle_t handle; /* handle to the mutex */
1211 /* Release a mutex */
1213 obj_handle_t handle; /* handle to the mutex */
1215 unsigned int prev_count; /* value of internal counter, before release */
1221 unsigned int access; /* wanted access rights */
1222 unsigned int attributes; /* object attributes */
1223 obj_handle_t rootdir; /* root directory */
1224 VARARG(name,unicode_str); /* object name */
1226 obj_handle_t handle; /* handle to the mutex */
1232 obj_handle_t handle; /* handle to mutex */
1234 unsigned int count; /* current count of mutex */
1235 int owned; /* true if owned by current thread */
1236 int abandoned; /* true if abandoned */
1240 /* Create a semaphore */
1241 @REQ(create_semaphore)
1242 unsigned int access; /* wanted access rights */
1243 unsigned int initial; /* initial count */
1244 unsigned int max; /* maximum count */
1245 VARARG(objattr,object_attributes); /* object attributes */
1247 obj_handle_t handle; /* handle to the semaphore */
1251 /* Release a semaphore */
1252 @REQ(release_semaphore)
1253 obj_handle_t handle; /* handle to the semaphore */
1254 unsigned int count; /* count to add to semaphore */
1256 unsigned int prev_count; /* previous semaphore count */
1259 @REQ(query_semaphore)
1260 obj_handle_t handle; /* handle to the semaphore */
1262 unsigned int current; /* current count */
1263 unsigned int max; /* maximum count */
1266 /* Open a semaphore */
1267 @REQ(open_semaphore)
1268 unsigned int access; /* wanted access rights */
1269 unsigned int attributes; /* object attributes */
1270 obj_handle_t rootdir; /* root directory */
1271 VARARG(name,unicode_str); /* object name */
1273 obj_handle_t handle; /* handle to the semaphore */
1279 unsigned int access; /* wanted access rights */
1280 unsigned int sharing; /* sharing flags */
1281 int create; /* file create action */
1282 unsigned int options; /* file options */
1283 unsigned int attrs; /* file attributes for creation */
1284 VARARG(objattr,object_attributes); /* object attributes */
1285 VARARG(filename,string); /* file name */
1287 obj_handle_t handle; /* handle to the file */
1291 /* Open a file object */
1292 @REQ(open_file_object)
1293 unsigned int access; /* wanted access rights */
1294 unsigned int attributes; /* open attributes */
1295 obj_handle_t rootdir; /* root directory */
1296 unsigned int sharing; /* sharing flags */
1297 unsigned int options; /* file options */
1298 VARARG(filename,unicode_str); /* file name */
1300 obj_handle_t handle; /* handle to the file */
1304 /* Allocate a file handle for a Unix fd */
1305 @REQ(alloc_file_handle)
1306 unsigned int access; /* wanted access rights */
1307 unsigned int attributes; /* object attributes */
1308 int fd; /* file descriptor on the client side */
1310 obj_handle_t handle; /* handle to the file */
1314 /* Get the Unix name from a file handle */
1315 @REQ(get_handle_unix_name)
1316 obj_handle_t handle; /* file handle */
1318 data_size_t name_len; /* unix name length */
1319 VARARG(name,string); /* unix name */
1323 /* Get a Unix fd to access a file */
1325 obj_handle_t handle; /* handle to the file */
1327 int type; /* file type (see below) */
1328 int cacheable; /* can fd be cached in the client? */
1329 unsigned int access; /* file access rights */
1330 unsigned int options; /* file open options */
1334 FD_TYPE_INVALID, /* invalid file (no associated fd) */
1335 FD_TYPE_FILE, /* regular file */
1336 FD_TYPE_DIR, /* directory */
1337 FD_TYPE_SOCKET, /* socket */
1338 FD_TYPE_SERIAL, /* serial port */
1339 FD_TYPE_PIPE, /* named pipe */
1340 FD_TYPE_MAILSLOT, /* mailslot */
1341 FD_TYPE_CHAR, /* unspecified char device */
1342 FD_TYPE_DEVICE, /* Windows device file */
1347 /* Retrieve (or allocate) the client-side directory cache entry */
1348 @REQ(get_directory_cache_entry)
1349 obj_handle_t handle; /* handle to the directory */
1351 int entry; /* cache entry on the client side */
1352 VARARG(free,ints); /* entries that can be freed */
1356 /* Flush a file buffers */
1358 async_data_t async; /* async I/O parameters */
1360 obj_handle_t event; /* event set when finished */
1363 /* Query file information */
1365 obj_handle_t handle; /* handle to the file */
1366 unsigned int info_class; /* queried information class */
1368 VARARG(data,bytes); /* file info data */
1371 /* Query volume information */
1372 @REQ(get_volume_info)
1373 obj_handle_t handle; /* handle to the file */
1374 unsigned int info_class; /* queried information class */
1376 VARARG(data,bytes); /* volume info data */
1379 /* Lock a region of a file */
1381 obj_handle_t handle; /* handle to the file */
1382 file_pos_t offset; /* offset of start of lock */
1383 file_pos_t count; /* count of bytes to lock */
1384 int shared; /* shared or exclusive lock? */
1385 int wait; /* do we want to wait? */
1387 obj_handle_t handle; /* handle to wait on */
1388 int overlapped; /* is it an overlapped I/O handle? */
1392 /* Unlock a region of a file */
1394 obj_handle_t handle; /* handle to the file */
1395 file_pos_t offset; /* offset of start of unlock */
1396 file_pos_t count; /* count of bytes to unlock */
1400 /* Set socket event parameters */
1401 @REQ(set_socket_event)
1402 obj_handle_t handle; /* handle to the socket */
1403 unsigned int mask; /* event mask */
1404 obj_handle_t event; /* event object */
1405 user_handle_t window; /* window to send the message to */
1406 unsigned int msg; /* message to send */
1410 /* Get socket event parameters */
1411 @REQ(get_socket_event)
1412 obj_handle_t handle; /* handle to the socket */
1413 int service; /* clear pending? */
1414 obj_handle_t c_event; /* event to clear */
1416 unsigned int mask; /* event mask */
1417 unsigned int pmask; /* pending events */
1418 unsigned int state; /* status bits */
1419 VARARG(errors,ints); /* event errors */
1423 /* Get socket info */
1424 @REQ(get_socket_info)
1425 obj_handle_t handle; /* handle to the socket */
1427 int family; /* family, see socket manpage */
1428 int type; /* type, see socket manpage */
1429 int protocol; /* protocol, see socket manpage */
1433 /* Re-enable pending socket events */
1434 @REQ(enable_socket_event)
1435 obj_handle_t handle; /* handle to the socket */
1436 unsigned int mask; /* events to re-enable */
1437 unsigned int sstate; /* status bits to set */
1438 unsigned int cstate; /* status bits to clear */
1441 @REQ(set_socket_deferred)
1442 obj_handle_t handle; /* handle to the socket */
1443 obj_handle_t deferred; /* handle to the socket for which accept() is deferred */
1447 /* Retrieve the next pending console ioctl request */
1448 @REQ(get_next_console_request)
1449 obj_handle_t handle; /* console server handle */
1450 int signal; /* server signal state */
1451 int read; /* 1 if reporting result of blocked read ioctl */
1452 unsigned int status; /* status of previous ioctl */
1453 VARARG(out_data,bytes); /* out_data of previous ioctl */
1455 unsigned int code; /* ioctl code */
1456 unsigned int output; /* output id or 0 for input */
1457 data_size_t out_size; /* ioctl output size */
1458 VARARG(in_data,bytes); /* ioctl in_data */
1462 /* enable directory change notifications */
1463 @REQ(read_directory_changes)
1464 unsigned int filter; /* notification filter */
1465 int subtree; /* watch the subtree? */
1466 int want_data; /* flag indicating whether change data should be collected */
1467 async_data_t async; /* async I/O parameters */
1472 obj_handle_t handle;
1474 VARARG(events,filesystem_event); /* collected filesystem events */
1478 /* Create a file mapping */
1479 @REQ(create_mapping)
1480 unsigned int access; /* wanted access rights */
1481 unsigned int flags; /* SEC_* flags */
1482 unsigned int file_access; /* file access rights */
1483 mem_size_t size; /* mapping size */
1484 obj_handle_t file_handle; /* file handle */
1485 VARARG(objattr,object_attributes); /* object attributes */
1487 obj_handle_t handle; /* handle to the mapping */
1491 /* Open a mapping */
1493 unsigned int access; /* wanted access rights */
1494 unsigned int attributes; /* object attributes */
1495 obj_handle_t rootdir; /* root directory */
1496 VARARG(name,unicode_str); /* object name */
1498 obj_handle_t handle; /* handle to the mapping */
1502 /* Get information about a file mapping */
1503 @REQ(get_mapping_info)
1504 obj_handle_t handle; /* handle to the mapping */
1505 unsigned int access; /* wanted access rights */
1507 mem_size_t size; /* mapping size */
1508 unsigned int flags; /* SEC_* flags */
1509 obj_handle_t shared_file; /* shared mapping file handle */
1510 VARARG(image,pe_image_info);/* image info for SEC_IMAGE mappings */
1514 /* Add a memory view in the current process */
1516 obj_handle_t mapping; /* file mapping handle */
1517 unsigned int access; /* wanted access rights */
1518 client_ptr_t base; /* view base address (page-aligned) */
1519 mem_size_t size; /* view size */
1520 file_pos_t start; /* start offset in mapping */
1524 /* Unmap a memory view from the current process */
1526 client_ptr_t base; /* view base address */
1530 /* Get a range of committed pages in a file mapping */
1531 @REQ(get_mapping_committed_range)
1532 client_ptr_t base; /* view base address */
1533 file_pos_t offset; /* starting offset (page-aligned, in bytes) */
1535 mem_size_t size; /* size of range starting at offset (page-aligned, in bytes) */
1536 int committed; /* whether it is a committed range */
1540 /* Add a range to the committed pages in a file mapping */
1541 @REQ(add_mapping_committed_range)
1542 client_ptr_t base; /* view base address */
1543 file_pos_t offset; /* starting offset (page-aligned, in bytes) */
1544 mem_size_t size; /* size to set (page-aligned, in bytes) or 0 if only retrieving */
1548 /* Check if two memory maps are for the same file */
1549 @REQ(is_same_mapping)
1550 client_ptr_t base1; /* first view base address */
1551 client_ptr_t base2; /* second view base address */
1557 timeout_t start_time;
1560 int current_priority;
1566 timeout_t start_time;
1567 data_size_t name_len;
1571 process_id_t parent_pid;
1575 /* VARARG(name,unicode_str,name_len); */
1576 /* VARARG(threads,struct thread_info,thread_count); */
1579 /* Get a list of processes and threads currently running */
1580 @REQ(list_processes)
1582 data_size_t info_size;
1584 VARARG(data,process_info,info_size);
1588 /* Wait for a debug event */
1589 @REQ(wait_debug_event)
1590 int get_handle; /* should we alloc a handle for waiting? */
1592 process_id_t pid; /* process id */
1593 thread_id_t tid; /* thread id */
1594 obj_handle_t wait; /* wait handle if no event ready */
1595 VARARG(event,debug_event); /* debug event data */
1599 /* Queue an exception event */
1600 @REQ(queue_exception_event)
1601 int first; /* first chance exception? */
1602 unsigned int code; /* exception code */
1603 unsigned int flags; /* exception flags */
1604 client_ptr_t record; /* exception record */
1605 client_ptr_t address; /* exception address */
1606 data_size_t len; /* size of parameters */
1607 VARARG(params,uints64,len);/* exception parameters */
1609 obj_handle_t handle; /* handle to the queued event */
1613 /* Retrieve the status of an exception event */
1614 @REQ(get_exception_status)
1615 obj_handle_t handle; /* handle to the queued event */
1619 /* Continue a debug event */
1620 @REQ(continue_debug_event)
1621 process_id_t pid; /* process id to continue */
1622 thread_id_t tid; /* thread id to continue */
1623 int status; /* continuation status */
1627 /* Start/stop debugging an existing process */
1629 process_id_t pid; /* id of the process to debug */
1630 int attach; /* 1=attaching / 0=detaching from the process */
1634 /* Set debugger kill on exit flag */
1635 @REQ(set_debugger_kill_on_exit)
1636 int kill_on_exit; /* 0=detach/1=kill debuggee when debugger dies */
1640 /* Read data from a process address space */
1641 @REQ(read_process_memory)
1642 obj_handle_t handle; /* process handle */
1643 client_ptr_t addr; /* addr to read from */
1645 VARARG(data,bytes); /* result data */
1649 /* Write data to a process address space */
1650 @REQ(write_process_memory)
1651 obj_handle_t handle; /* process handle */
1652 client_ptr_t addr; /* addr to write to */
1653 VARARG(data,bytes); /* data to write */
1657 /* Create a registry key */
1659 unsigned int access; /* desired access rights */
1660 unsigned int options; /* creation options */
1661 VARARG(objattr,object_attributes); /* object attributes */
1662 VARARG(class,unicode_str); /* class name */
1664 obj_handle_t hkey; /* handle to the created key */
1665 int created; /* has it been newly created? */
1668 /* Open a registry key */
1670 obj_handle_t parent; /* handle to the parent key */
1671 unsigned int access; /* desired access rights */
1672 unsigned int attributes; /* object attributes */
1673 VARARG(name,unicode_str); /* key name */
1675 obj_handle_t hkey; /* handle to the open key */
1679 /* Delete a registry key */
1681 obj_handle_t hkey; /* handle to the key */
1685 /* Flush a registry key */
1687 obj_handle_t hkey; /* handle to the key */
1691 /* Enumerate registry subkeys */
1693 obj_handle_t hkey; /* handle to registry key */
1694 int index; /* index of subkey (or -1 for current key) */
1695 int info_class; /* requested information class */
1697 int subkeys; /* number of subkeys */
1698 int max_subkey; /* longest subkey name */
1699 int max_class; /* longest class name */
1700 int values; /* number of values */
1701 int max_value; /* longest value name */
1702 int max_data; /* longest value data */
1703 timeout_t modif; /* last modification time */
1704 data_size_t total; /* total length needed for full name and class */
1705 data_size_t namelen; /* length of key name in bytes */
1706 VARARG(name,unicode_str,namelen); /* key name */
1707 VARARG(class,unicode_str); /* class name */
1711 /* Set a value of a registry key */
1713 obj_handle_t hkey; /* handle to registry key */
1714 int type; /* value type */
1715 data_size_t namelen; /* length of value name in bytes */
1716 VARARG(name,unicode_str,namelen); /* value name */
1717 VARARG(data,bytes); /* value data */
1721 /* Retrieve the value of a registry key */
1723 obj_handle_t hkey; /* handle to registry key */
1724 VARARG(name,unicode_str); /* value name */
1726 int type; /* value type */
1727 data_size_t total; /* total length needed for data */
1728 VARARG(data,bytes); /* value data */
1732 /* Enumerate a value of a registry key */
1733 @REQ(enum_key_value)
1734 obj_handle_t hkey; /* handle to registry key */
1735 int index; /* value index */
1736 int info_class; /* requested information class */
1738 int type; /* value type */
1739 data_size_t total; /* total length needed for full name and data */
1740 data_size_t namelen; /* length of value name in bytes */
1741 VARARG(name,unicode_str,namelen); /* value name */
1742 VARARG(data,bytes); /* value data */
1746 /* Delete a value of a registry key */
1747 @REQ(delete_key_value)
1748 obj_handle_t hkey; /* handle to registry key */
1749 VARARG(name,unicode_str); /* value name */
1753 /* Load a registry branch from a file */
1755 obj_handle_t file; /* file to load from */
1756 VARARG(objattr,object_attributes); /* object attributes */
1760 /* UnLoad a registry branch from a file */
1761 @REQ(unload_registry)
1762 obj_handle_t hkey; /* root key to unload to */
1766 /* Save a registry branch to a file */
1768 obj_handle_t hkey; /* key to save */
1769 obj_handle_t file; /* file to save to */
1773 /* Add a registry key change notification */
1774 @REQ(set_registry_notification)
1775 obj_handle_t hkey; /* key to watch for changes */
1776 obj_handle_t event; /* event to set */
1777 int subtree; /* should we watch the whole subtree? */
1778 unsigned int filter; /* things to watch */
1782 /* Create a waitable timer */
1784 unsigned int access; /* wanted access rights */
1785 int manual; /* manual reset */
1786 VARARG(objattr,object_attributes); /* object attributes */
1788 obj_handle_t handle; /* handle to the timer */
1792 /* Open a waitable timer */
1794 unsigned int access; /* wanted access rights */
1795 unsigned int attributes; /* object attributes */
1796 obj_handle_t rootdir; /* root directory */
1797 VARARG(name,unicode_str); /* object name */
1799 obj_handle_t handle; /* handle to the timer */
1802 /* Set a waitable timer */
1804 obj_handle_t handle; /* handle to the timer */
1805 timeout_t expire; /* next expiration absolute time */
1806 client_ptr_t callback; /* callback function */
1807 client_ptr_t arg; /* callback argument */
1808 int period; /* timer period in ms */
1810 int signaled; /* was the timer signaled before this call ? */
1813 /* Cancel a waitable timer */
1815 obj_handle_t handle; /* handle to the timer */
1817 int signaled; /* was the timer signaled before this calltime ? */
1820 /* Get information on a waitable timer */
1821 @REQ(get_timer_info)
1822 obj_handle_t handle; /* handle to the timer */
1824 timeout_t when; /* absolute time when the timer next expires */
1825 int signaled; /* is the timer signaled? */
1829 /* Retrieve the current context of a thread */
1830 @REQ(get_thread_context)
1831 obj_handle_t handle; /* thread or context handle */
1832 unsigned int flags; /* context flags */
1834 int self; /* was it a handle to the current thread? */
1835 obj_handle_t handle; /* pending context handle */
1836 VARARG(context,context); /* thread context */
1840 /* Set the current context of a thread */
1841 @REQ(set_thread_context)
1842 obj_handle_t handle; /* thread handle */
1843 VARARG(context,context); /* thread context */
1845 int self; /* was it a handle to the current thread? */
1849 /* Fetch a selector entry for a thread */
1850 @REQ(get_selector_entry)
1851 obj_handle_t handle; /* thread handle */
1852 int entry; /* LDT entry */
1854 unsigned int base; /* selector base */
1855 unsigned int limit; /* selector limit */
1856 unsigned char flags; /* selector flags */
1862 obj_handle_t table; /* which table to add atom to */
1863 VARARG(name,unicode_str); /* atom name */
1865 atom_t atom; /* resulting atom */
1869 /* Delete an atom */
1871 obj_handle_t table; /* which table to delete atom from */
1872 atom_t atom; /* atom handle */
1878 obj_handle_t table; /* which table to find atom from */
1879 VARARG(name,unicode_str); /* atom name */
1881 atom_t atom; /* atom handle */
1885 /* Get information about an atom */
1886 @REQ(get_atom_information)
1887 obj_handle_t table; /* which table to find atom from */
1888 atom_t atom; /* atom handle */
1890 int count; /* atom lock count */
1891 int pinned; /* whether the atom has been pinned */
1892 data_size_t total; /* actual length of atom name */
1893 VARARG(name,unicode_str); /* atom name */
1897 /* Set information about an atom */
1898 @REQ(set_atom_information)
1899 obj_handle_t table; /* which table to find atom from */
1900 atom_t atom; /* atom handle */
1901 int pinned; /* whether to bump atom information */
1905 /* Empty an atom table */
1906 @REQ(empty_atom_table)
1907 obj_handle_t table; /* which table to find atom from */
1908 int if_pinned; /* whether to delete pinned atoms */
1912 /* Init an atom table */
1913 @REQ(init_atom_table)
1914 int entries; /* number of entries (only for local) */
1916 obj_handle_t table; /* handle to the atom table */
1920 /* Get the message queue of the current thread */
1923 obj_handle_t handle; /* handle to the queue */
1927 /* Set the file descriptor associated to the current thread queue */
1929 obj_handle_t handle; /* handle to the file descriptor */
1933 /* Set the current message queue wakeup mask */
1934 @REQ(set_queue_mask)
1935 unsigned int wake_mask; /* wakeup bits mask */
1936 unsigned int changed_mask; /* changed bits mask */
1937 int skip_wait; /* will we skip waiting if signaled? */
1939 unsigned int wake_bits; /* current wake bits */
1940 unsigned int changed_bits; /* current changed bits */
1944 /* Get the current message queue status */
1945 @REQ(get_queue_status)
1946 unsigned int clear_bits; /* should we clear the change bits? */
1948 unsigned int wake_bits; /* wake bits */
1949 unsigned int changed_bits; /* changed bits since last time */
1953 /* Retrieve the process idle event */
1954 @REQ(get_process_idle_event)
1955 obj_handle_t handle; /* process handle */
1957 obj_handle_t event; /* handle to idle event */
1961 /* Send a message to a thread queue */
1963 thread_id_t id; /* thread id */
1964 int type; /* message type (see below) */
1965 int flags; /* message flags (see below) */
1966 user_handle_t win; /* window handle */
1967 unsigned int msg; /* message code */
1968 lparam_t wparam; /* parameters */
1969 lparam_t lparam; /* parameters */
1970 timeout_t timeout; /* timeout for reply */
1971 VARARG(data,message_data); /* message data for sent messages */
1974 @REQ(post_quit_message)
1975 int exit_code; /* exit code to return */
1980 MSG_ASCII, /* Ascii message (from SendMessageA) */
1981 MSG_UNICODE, /* Unicode message (from SendMessageW) */
1982 MSG_NOTIFY, /* notify message (from SendNotifyMessageW), always Unicode */
1983 MSG_CALLBACK, /* callback message (from SendMessageCallbackW), always Unicode */
1984 MSG_CALLBACK_RESULT,/* result of a callback message */
1985 MSG_OTHER_PROCESS, /* sent from other process, may include vararg data, always Unicode */
1986 MSG_POSTED, /* posted message (from PostMessageW), always Unicode */
1987 MSG_HARDWARE, /* hardware message */
1988 MSG_WINEVENT, /* winevent message */
1989 MSG_HOOK_LL /* low-level hardware hook */
1991 #define SEND_MSG_ABORT_IF_HUNG 0x01
1994 /* Send a hardware message to a thread queue */
1995 @REQ(send_hardware_message)
1996 user_handle_t win; /* window handle */
1997 hw_input_t input; /* input data */
1998 unsigned int flags; /* flags (see below) */
2000 int wait; /* do we need to wait for a reply? */
2001 int prev_x; /* previous cursor position */
2003 int new_x; /* new cursor position */
2005 VARARG(keystate,bytes); /* global state array for all the keys */
2007 #define SEND_HWMSG_INJECTED 0x01
2010 /* Get a message from the current queue */
2012 unsigned int flags; /* PM_* flags */
2013 user_handle_t get_win; /* window handle to get */
2014 unsigned int get_first; /* first message code to get */
2015 unsigned int get_last; /* last message code to get */
2016 unsigned int hw_id; /* id of the previous hardware message (or 0) */
2017 unsigned int wake_mask; /* wakeup bits mask */
2018 unsigned int changed_mask; /* changed bits mask */
2020 user_handle_t win; /* window handle */
2021 unsigned int msg; /* message code */
2022 lparam_t wparam; /* parameters */
2023 lparam_t lparam; /* parameters */
2024 int type; /* message type */
2025 int x; /* message x position */
2026 int y; /* message y position */
2027 unsigned int time; /* message time */
2028 unsigned int active_hooks; /* active hooks bitmap */
2029 data_size_t total; /* total size of extra data */
2030 VARARG(data,message_data); /* message data for sent messages */
2034 /* Reply to a sent message */
2036 int remove; /* should we remove the message? */
2037 lparam_t result; /* message result */
2038 VARARG(data,bytes); /* message data for sent messages */
2042 /* Accept and remove the current hardware message */
2043 @REQ(accept_hardware_message)
2044 unsigned int hw_id; /* id of the hardware message */
2048 /* Retrieve the reply for the last message sent */
2049 @REQ(get_message_reply)
2050 int cancel; /* cancel message if not ready? */
2052 lparam_t result; /* message result */
2053 VARARG(data,bytes); /* message data for sent messages */
2057 /* Set a window timer */
2059 user_handle_t win; /* window handle */
2060 unsigned int msg; /* message to post */
2061 unsigned int rate; /* timer rate in ms */
2062 lparam_t id; /* timer id */
2063 lparam_t lparam; /* message lparam (callback proc) */
2065 lparam_t id; /* timer id */
2069 /* Kill a window timer */
2070 @REQ(kill_win_timer)
2071 user_handle_t win; /* window handle */
2072 lparam_t id; /* timer id */
2073 unsigned int msg; /* message to post */
2077 /* check if the thread owning the window is hung */
2078 @REQ(is_window_hung)
2079 user_handle_t win; /* window handle */
2085 /* Retrieve info about a serial port */
2086 @REQ(get_serial_info)
2087 obj_handle_t handle; /* handle to comm port */
2090 unsigned int eventmask;
2091 unsigned int cookie;
2092 unsigned int pending_write;
2096 /* Set info about a serial port */
2097 @REQ(set_serial_info)
2098 obj_handle_t handle; /* handle to comm port */
2099 int flags; /* bitmask to set values (see below) */
2101 #define SERIALINFO_PENDING_WRITE 0x04
2102 #define SERIALINFO_PENDING_WAIT 0x08
2105 /* Create an async I/O */
2106 @REQ(register_async)
2107 int type; /* type of queue to look after */
2108 async_data_t async; /* async I/O parameters */
2109 int count; /* count - usually # of bytes to be read/written */
2111 #define ASYNC_TYPE_READ 0x01
2112 #define ASYNC_TYPE_WRITE 0x02
2113 #define ASYNC_TYPE_WAIT 0x03
2116 /* Cancel all async op on a fd */
2118 obj_handle_t handle; /* handle to comm port, socket or file */
2119 client_ptr_t iosb; /* I/O status block (NULL=all) */
2120 int only_thread; /* cancel matching this thread */
2124 /* Retrieve results of an async */
2125 @REQ(get_async_result)
2126 client_ptr_t user_arg; /* user arg used to identify async */
2128 data_size_t size; /* result size (input or output depending on the operation) */
2129 VARARG(out_data,bytes); /* iosb output data */
2133 /* Perform a read on a file object */
2135 async_data_t async; /* async I/O parameters */
2136 file_pos_t pos; /* read position */
2138 obj_handle_t wait; /* handle to wait on for blocking read */
2139 unsigned int options; /* device open options */
2140 VARARG(data,bytes); /* read data */
2144 /* Perform a write on a file object */
2146 async_data_t async; /* async I/O parameters */
2147 file_pos_t pos; /* write position */
2148 VARARG(data,bytes); /* write data */
2150 obj_handle_t wait; /* handle to wait on for blocking write */
2151 unsigned int options; /* device open options */
2152 data_size_t size; /* size written */
2156 /* Perform an ioctl on a file */
2158 ioctl_code_t code; /* ioctl code */
2159 async_data_t async; /* async I/O parameters */
2160 VARARG(in_data,bytes); /* ioctl input data */
2162 obj_handle_t wait; /* handle to wait on for blocking ioctl */
2163 unsigned int options; /* device open options */
2164 VARARG(out_data,bytes); /* ioctl output data */
2168 /* Store results of an async irp */
2169 @REQ(set_irp_result)
2170 obj_handle_t handle; /* handle to the irp */
2171 unsigned int status; /* status of the irp */
2172 data_size_t size; /* result size (input or output depending on the operation) */
2173 VARARG(data,bytes); /* output data of the irp */
2177 /* Create a named pipe */
2178 @REQ(create_named_pipe)
2179 unsigned int access;
2180 unsigned int options;
2181 unsigned int sharing;
2182 unsigned int maxinstances;
2183 unsigned int outsize;
2184 unsigned int insize;
2187 VARARG(objattr,object_attributes); /* object attributes */
2189 obj_handle_t handle; /* handle to the pipe */
2192 /* flags in create_named_pipe and get_named_pipe_info */
2193 #define NAMED_PIPE_MESSAGE_STREAM_WRITE 0x0001
2194 #define NAMED_PIPE_MESSAGE_STREAM_READ 0x0002
2195 #define NAMED_PIPE_NONBLOCKING_MODE 0x0004
2196 #define NAMED_PIPE_SERVER_END 0x8000
2198 /* Set named pipe information by handle */
2199 @REQ(set_named_pipe_info)
2200 obj_handle_t handle;
2204 /* Create a window */
2206 user_handle_t parent; /* parent window */
2207 user_handle_t owner; /* owner window */
2208 atom_t atom; /* class atom */
2209 mod_handle_t instance; /* module instance */
2210 int dpi; /* system DPI */
2211 int awareness; /* thread DPI awareness */
2212 VARARG(class,unicode_str); /* class name */
2214 user_handle_t handle; /* created window */
2215 user_handle_t parent; /* full handle of parent */
2216 user_handle_t owner; /* full handle of owner */
2217 int extra; /* number of extra bytes */
2218 client_ptr_t class_ptr; /* pointer to class in client address space */
2219 int dpi; /* window DPI if not per-monitor aware */
2220 int awareness; /* window DPI awareness */
2224 /* Destroy a window */
2225 @REQ(destroy_window)
2226 user_handle_t handle; /* handle to the window */
2230 /* Retrieve the desktop window for the current thread */
2231 @REQ(get_desktop_window)
2232 int force; /* force creation if it doesn't exist
*/
2234 user_handle_t top_window
; /* handle to the desktop window
*/
2235 user_handle_t msg_window
; /* handle to the top
-level HWND_MESSAGE parent
*/
2239 /* Set a window owner
*/
2240 @
REQ(set_window_owner
)
2241 user_handle_t handle
; /* handle to the window
*/
2242 user_handle_t owner
; /* new owner
*/
2244 user_handle_t full_owner
; /* full handle of new owner
*/
2245 user_handle_t prev_owner
; /* full handle of previous owner
*/
2249 /* Get information from a window handle
*/
2250 @
REQ(get_window_info
)
2251 user_handle_t handle
; /* handle to the window
*/
2253 user_handle_t full_handle
; /* full
32-bit handle
*/
2254 user_handle_t last_active
; /* last active popup
*/
2255 process_id_t pid
; /* process owning the window
*/
2256 thread_id_t tid
; /* thread owning the window
*/
2257 atom_t atom
; /* class atom
*/
2258 int is_unicode
; /* ANSI or unicode
*/
2259 int dpi
; /* window DPI
*/
2260 int awareness
; /* DPI awareness
*/
2264 /* Set some information in a window
*/
2265 @
REQ(set_window_info
)
2266 unsigned short flags
; /* flags for fields to
set (see below
) */
2267 short int is_unicode
; /* ANSI or unicode
*/
2268 user_handle_t handle
; /* handle to the window
*/
2269 unsigned int style
; /* window style
*/
2270 unsigned int ex_style
; /* window extended style
*/
2271 unsigned int id
; /* window id
*/
2272 mod_handle_t instance
; /* creator instance
*/
2273 lparam_t user_data
; /* user
-specific data
*/
2274 int extra_offset
; /* offset to set in extra bytes
*/
2275 data_size_t extra_size
; /* size to set in extra bytes
*/
2276 lparam_t extra_value
; /* value to set in extra bytes
*/
2278 unsigned int old_style
; /* old window style
*/
2279 unsigned int old_ex_style
; /* old window extended style
*/
2280 mod_handle_t old_instance
; /* old creator instance
*/
2281 lparam_t old_user_data
; /* old user
-specific data
*/
2282 lparam_t old_extra_value
; /* old value in extra bytes
*/
2283 unsigned int old_id
; /* old window id
*/
2285 #define SET_WIN_STYLE
0x01
2286 #define SET_WIN_EXSTYLE
0x02
2287 #define SET_WIN_ID
0x04
2288 #define SET_WIN_INSTANCE
0x08
2289 #define SET_WIN_USERDATA
0x10
2290 #define SET_WIN_EXTRA
0x20
2291 #define SET_WIN_UNICODE
0x40
2294 /* Set the parent of a window
*/
2296 user_handle_t handle
; /* handle to the window
*/
2297 user_handle_t parent
; /* handle to the parent
*/
2299 user_handle_t old_parent
; /* old parent window
*/
2300 user_handle_t full_parent
; /* full handle of new parent
*/
2301 int dpi
; /* new window DPI if not per
-monitor aware
*/
2302 int awareness
; /* new DPI awareness
*/
2306 /* Get a list of the window parents
, up to the root of the tree
*/
2307 @
REQ(get_window_parents
)
2308 user_handle_t handle
; /* handle to the window
*/
2310 int count
; /* total count of parents
*/
2311 VARARG(parents
,user_handles
); /* parent handles
*/
2315 /* Get a list of the window children
*/
2316 @
REQ(get_window_children
)
2317 obj_handle_t desktop
; /* handle to desktop
*/
2318 user_handle_t parent
; /* parent window
*/
2319 atom_t atom
; /* class atom for the listed children
*/
2320 thread_id_t tid
; /* thread owning the listed children
*/
2321 VARARG(class
,unicode_str
); /* class name
*/
2323 int count
; /* total count of children
*/
2324 VARARG(children
,user_handles
); /* children handles
*/
2328 /* Get a list of the window children that contain a given point
*/
2329 @
REQ(get_window_children_from_point
)
2330 user_handle_t parent
; /* parent window
*/
2331 int x
; /* point in parent coordinates
*/
2333 int dpi
; /* dpi for the point coordinates
*/
2335 int count
; /* total count of children
*/
2336 VARARG(children
,user_handles
); /* children handles
*/
2340 /* Get window tree information from a window handle
*/
2341 @
REQ(get_window_tree
)
2342 user_handle_t handle
; /* handle to the window
*/
2344 user_handle_t parent
; /* parent window
*/
2345 user_handle_t owner
; /* owner window
*/
2346 user_handle_t next_sibling
; /* next sibling in Z
-order
*/
2347 user_handle_t prev_sibling
; /* prev sibling in Z
-order
*/
2348 user_handle_t first_sibling
; /* first sibling in Z
-order
*/
2349 user_handle_t last_sibling
; /* last sibling in Z
-order
*/
2350 user_handle_t first_child
; /* first child
*/
2351 user_handle_t last_child
; /* last child
*/
2354 /* Set the position and Z order of a window
*/
2355 @
REQ(set_window_pos
)
2356 unsigned short swp_flags
; /* SWP_
* flags
*/
2357 unsigned short paint_flags
; /* paint
flags (see below
) */
2358 user_handle_t handle
; /* handle to the window
*/
2359 user_handle_t previous
; /* previous window in Z order
*/
2360 rectangle_t window
; /* window
rectangle (in parent coords
) */
2361 rectangle_t client
; /* client
rectangle (in parent coords
) */
2362 VARARG(valid
,rectangles
); /* valid rectangles from
WM_NCCALCSIZE (in parent coords
) */
2364 unsigned int new_style
; /* new window style
*/
2365 unsigned int new_ex_style
; /* new window extended style
*/
2366 user_handle_t surface_win
; /* parent window that holds the surface
*/
2367 int needs_update
; /* whether the surface region needs an update
*/
2369 #define SET_WINPOS_PAINT_SURFACE
0x01 /* window has a paintable surface
*/
2370 #define SET_WINPOS_PIXEL_FORMAT
0x02 /* window has a custom pixel format
*/
2372 /* Get the window and client rectangles of a window
*/
2373 @
REQ(get_window_rectangles
)
2374 user_handle_t handle
; /* handle to the window
*/
2375 int relative
; /* coords relative
to (see below
) */
2376 int dpi
; /* DPI to map to
, or zero for per
-monitor DPI
*/
2378 rectangle_t window
; /* window rectangle
*/
2379 rectangle_t client
; /* client rectangle
*/
2381 enum coords_relative
2383 COORDS_CLIENT
, /* relative to client area
*/
2384 COORDS_WINDOW
, /* relative to whole window area
*/
2385 COORDS_PARENT
, /* relative to parent
's client area */
2386 COORDS_SCREEN /* relative to screen origin */
2390 /* Get the window text */
2391 @REQ(get_window_text)
2392 user_handle_t handle; /* handle to the window */
2394 data_size_t length; /* total length in WCHARs */
2395 VARARG(text,unicode_str); /* window text */
2399 /* Set the window text */
2400 @REQ(set_window_text)
2401 user_handle_t handle; /* handle to the window */
2402 VARARG(text,unicode_str); /* window text */
2406 /* Get the coordinates offset between two windows */
2407 @REQ(get_windows_offset)
2408 user_handle_t from; /* handle to the first window */
2409 user_handle_t to; /* handle to the second window */
2410 int dpi; /* DPI to map to, or zero for per-monitor DPI */
2412 int x; /* x coordinate offset */
2413 int y; /* y coordinate offset */
2414 int mirror; /* whether to mirror the x coordinate */
2418 /* Get the visible region of a window */
2419 @REQ(get_visible_region)
2420 user_handle_t window; /* handle to the window */
2421 unsigned int flags; /* DCX flags */
2423 user_handle_t top_win; /* top window to clip against */
2424 rectangle_t top_rect; /* top window visible rect with screen coords */
2425 rectangle_t win_rect; /* window rect in screen coords */
2426 unsigned int paint_flags; /* paint flags (from SET_WINPOS_* flags) */
2427 data_size_t total_size; /* total size of the resulting region */
2428 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2432 /* Get the visible surface region of a window */
2433 @REQ(get_surface_region)
2434 user_handle_t window; /* handle to the window */
2436 rectangle_t visible_rect; /* window visible rect in screen coords */
2437 data_size_t total_size; /* total size of the resulting region */
2438 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2442 /* Get the window region */
2443 @REQ(get_window_region)
2444 user_handle_t window; /* handle to the window */
2446 data_size_t total_size; /* total size of the resulting region */
2447 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2451 /* Set the window region */
2452 @REQ(set_window_region)
2453 user_handle_t window; /* handle to the window */
2454 int redraw; /* redraw the window? */
2455 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2459 /* Get the window update region */
2460 @REQ(get_update_region)
2461 user_handle_t window; /* handle to the window */
2462 user_handle_t from_child; /* child to start searching from */
2463 unsigned int flags; /* update flags (see below) */
2465 user_handle_t child; /* child to repaint (or window itself) */
2466 unsigned int flags; /* resulting update flags (see below) */
2467 data_size_t total_size; /* total size of the resulting region */
2468 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2470 #define UPDATE_NONCLIENT 0x001 /* get region for repainting non-client area */
2471 #define UPDATE_ERASE 0x002 /* get region for erasing client area */
2472 #define UPDATE_PAINT 0x004 /* get region for painting client area */
2473 #define UPDATE_INTERNALPAINT 0x008 /* get region if internal paint is pending */
2474 #define UPDATE_ALLCHILDREN 0x010 /* force repaint of all children */
2475 #define UPDATE_NOCHILDREN 0x020 /* don't try to repaint any children
*/
2476 #define UPDATE_NOREGION
0x040 /* don
't return a region, only the flags */
2477 #define UPDATE_DELAYED_ERASE 0x080 /* still needs erase after BeginPaint */
2478 #define UPDATE_CLIPCHILDREN 0x100 /* remove clipped children from the update region */
2481 /* Update the z order of a window so that a given rectangle is fully visible */
2482 @REQ(update_window_zorder)
2483 user_handle_t window; /* handle to the window */
2484 rectangle_t rect; /* rectangle that must be visible (in client coords) */
2488 /* Mark parts of a window as needing a redraw */
2490 user_handle_t window; /* handle to the window */
2491 unsigned int flags; /* RDW_* flags */
2492 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2496 /* Set a window property */
2497 @REQ(set_window_property)
2498 user_handle_t window; /* handle to the window */
2499 lparam_t data; /* data to store */
2500 atom_t atom; /* property atom (if no name specified) */
2501 VARARG(name,unicode_str); /* property name */
2505 /* Remove a window property */
2506 @REQ(remove_window_property)
2507 user_handle_t window; /* handle to the window */
2508 atom_t atom; /* property atom (if no name specified) */
2509 VARARG(name,unicode_str); /* property name */
2511 lparam_t data; /* data stored in property */
2515 /* Get a window property */
2516 @REQ(get_window_property)
2517 user_handle_t window; /* handle to the window */
2518 atom_t atom; /* property atom (if no name specified) */
2519 VARARG(name,unicode_str); /* property name */
2521 lparam_t data; /* data stored in property */
2525 /* Get the list of properties of a window */
2526 @REQ(get_window_properties)
2527 user_handle_t window; /* handle to the window */
2529 int total; /* total number of properties */
2530 VARARG(props,properties); /* list of properties */
2534 /* Create a window station */
2535 @REQ(create_winstation)
2536 unsigned int flags; /* window station flags */
2537 unsigned int access; /* wanted access rights */
2538 unsigned int attributes; /* object attributes */
2539 obj_handle_t rootdir; /* root directory */
2540 VARARG(name,unicode_str); /* object name */
2542 obj_handle_t handle; /* handle to the window station */
2546 /* Open a handle to a window station */
2547 @REQ(open_winstation)
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 /* Close a window station */
2558 @REQ(close_winstation)
2559 obj_handle_t handle; /* handle to the window station */
2563 /* Get the process current window station */
2564 @REQ(get_process_winstation)
2566 obj_handle_t handle; /* handle to the window station */
2570 /* Set the process current window station */
2571 @REQ(set_process_winstation)
2572 obj_handle_t handle; /* handle to the window station */
2576 /* Enumerate window stations */
2577 @REQ(enum_winstation)
2578 unsigned int index; /* current index */
2580 unsigned int next; /* next index */
2581 VARARG(name,unicode_str); /* window station name */
2585 /* Create a desktop */
2586 @REQ(create_desktop)
2587 unsigned int flags; /* desktop flags */
2588 unsigned int access; /* wanted access rights */
2589 unsigned int attributes; /* object attributes */
2590 VARARG(name,unicode_str); /* object name */
2592 obj_handle_t handle; /* handle to the desktop */
2596 /* Open a handle to a desktop */
2598 obj_handle_t winsta; /* window station to open (null allowed) */
2599 unsigned int flags; /* desktop flags */
2600 unsigned int access; /* wanted access rights */
2601 unsigned int attributes; /* object attributes */
2602 VARARG(name,unicode_str); /* object name */
2604 obj_handle_t handle; /* handle to the desktop */
2608 /* Open a handle to current input desktop */
2609 @REQ(open_input_desktop)
2610 unsigned int flags; /* desktop flags */
2611 unsigned int access; /* wanted access rights */
2612 unsigned int attributes; /* object attributes */
2614 obj_handle_t handle; /* handle to the desktop */
2618 /* Close a desktop */
2620 obj_handle_t handle; /* handle to the desktop */
2624 /* Get the thread current desktop */
2625 @REQ(get_thread_desktop)
2626 thread_id_t tid; /* thread id */
2628 obj_handle_t handle; /* handle to the desktop */
2632 /* Set the thread current desktop */
2633 @REQ(set_thread_desktop)
2634 obj_handle_t handle; /* handle to the desktop */
2638 /* Enumerate desktops */
2640 obj_handle_t winstation; /* handle to the window station */
2641 unsigned int index; /* current index */
2643 unsigned int next; /* next index */
2644 VARARG(name,unicode_str); /* window station name */
2648 /* Get/set information about a user object (window station or desktop) */
2649 @REQ(set_user_object_info)
2650 obj_handle_t handle; /* handle to the object */
2651 unsigned int flags; /* information to set/get */
2652 unsigned int obj_flags; /* new object flags */
2654 int is_desktop; /* is object a desktop? */
2655 unsigned int old_obj_flags; /* old object flags */
2656 VARARG(name,unicode_str); /* object name */
2658 #define SET_USER_OBJECT_SET_FLAGS 1
2659 #define SET_USER_OBJECT_GET_FULL_NAME 2
2662 /* Register a hotkey */
2663 @REQ(register_hotkey)
2664 user_handle_t window; /* handle to the window */
2665 int id; /* hotkey identifier */
2666 unsigned int flags; /* modifier keys */
2667 unsigned int vkey; /* virtual key code */
2669 int replaced; /* did we replace an existing hotkey? */
2670 unsigned int flags; /* flags of replaced hotkey */
2671 unsigned int vkey; /* virtual key code of replaced hotkey */
2675 /* Unregister a hotkey */
2676 @REQ(unregister_hotkey)
2677 user_handle_t window; /* handle to the window */
2678 int id; /* hotkey identifier */
2680 unsigned int flags; /* flags of removed hotkey */
2681 unsigned int vkey; /* virtual key code of removed hotkey */
2685 /* Attach (or detach) thread inputs */
2686 @REQ(attach_thread_input)
2687 thread_id_t tid_from; /* thread to be attached */
2688 thread_id_t tid_to; /* thread to which tid_from should be attached */
2689 int attach; /* is it an attach? */
2693 /* Get input data for a given thread */
2694 @REQ(get_thread_input)
2695 thread_id_t tid; /* id of thread */
2697 user_handle_t focus; /* handle to the focus window */
2698 user_handle_t capture; /* handle to the capture window */
2699 user_handle_t active; /* handle to the active window */
2700 user_handle_t foreground; /* handle to the global foreground window */
2701 user_handle_t menu_owner; /* handle to the menu owner */
2702 user_handle_t move_size; /* handle to the moving/resizing window */
2703 user_handle_t caret; /* handle to the caret window */
2704 user_handle_t cursor; /* handle to the cursor */
2705 int show_count; /* cursor show count */
2706 rectangle_t rect; /* caret rectangle */
2710 /* Get the time of the last input event */
2711 @REQ(get_last_input_time)
2717 /* Retrieve queue keyboard state for a given thread */
2719 thread_id_t tid; /* id of thread */
2720 int key; /* optional key code or -1 */
2722 unsigned char state; /* state of specified key */
2723 VARARG(keystate,bytes); /* state array for all the keys */
2726 /* Set queue keyboard state for a given thread */
2728 thread_id_t tid; /* id of thread */
2729 int async; /* whether to change the async state too */
2730 VARARG(keystate,bytes); /* state array for all the keys */
2733 /* Set the system foreground window */
2734 @REQ(set_foreground_window)
2735 user_handle_t handle; /* handle to the foreground window */
2737 user_handle_t previous; /* handle to the previous foreground window */
2738 int send_msg_old; /* whether we have to send a msg to the old window */
2739 int send_msg_new; /* whether we have to send a msg to the new window */
2742 /* Set the current thread focus window */
2743 @REQ(set_focus_window)
2744 user_handle_t handle; /* handle to the focus window */
2746 user_handle_t previous; /* handle to the previous focus window */
2749 /* Set the current thread active window */
2750 @REQ(set_active_window)
2751 user_handle_t handle; /* handle to the active window */
2753 user_handle_t previous; /* handle to the previous active window */
2756 /* Set the current thread capture window */
2757 @REQ(set_capture_window)
2758 user_handle_t handle; /* handle to the capture window */
2759 unsigned int flags; /* capture flags (see below) */
2761 user_handle_t previous; /* handle to the previous capture window */
2762 user_handle_t full_handle; /* full 32-bit handle of new capture window */
2764 #define CAPTURE_MENU 0x01 /* capture is for a menu */
2765 #define CAPTURE_MOVESIZE 0x02 /* capture is for moving/resizing */
2768 /* Set the current thread caret window */
2769 @REQ(set_caret_window)
2770 user_handle_t handle; /* handle to the caret window */
2771 int width; /* caret width */
2772 int height; /* caret height */
2774 user_handle_t previous; /* handle to the previous caret window */
2775 rectangle_t old_rect; /* previous caret rectangle */
2776 int old_hide; /* previous hide count */
2777 int old_state; /* previous caret state (1=on, 0=off) */
2781 /* Set the current thread caret information */
2782 @REQ(set_caret_info)
2783 unsigned int flags; /* caret flags (see below) */
2784 user_handle_t handle; /* handle to the caret window */
2785 int x; /* caret x position */
2786 int y; /* caret y position */
2787 int hide; /* increment for hide count (can be negative to show it) */
2788 int state; /* caret state (see below) */
2790 user_handle_t full_handle; /* handle to the current caret window */
2791 rectangle_t old_rect; /* previous caret rectangle */
2792 int old_hide; /* previous hide count */
2793 int old_state; /* previous caret state (1=on, 0=off) */
2795 #define SET_CARET_POS 0x01 /* set the caret position from x,y */
2796 #define SET_CARET_HIDE 0x02 /* increment the caret hide count */
2797 #define SET_CARET_STATE 0x04 /* set the caret on/off state */
2800 CARET_STATE_OFF, /* off */
2801 CARET_STATE_ON, /* on */
2802 CARET_STATE_TOGGLE, /* toggle current state */
2803 CARET_STATE_ON_IF_MOVED /* on if the position differs, unchanged otherwise */
2807 /* Set a window hook */
2809 int id; /* id of the hook */
2810 process_id_t pid; /* id of process to set the hook into */
2811 thread_id_t tid; /* id of thread to set the hook into */
2814 client_ptr_t proc; /* hook procedure */
2816 int unicode; /* is it a unicode hook? */
2817 VARARG(module,unicode_str); /* module name */
2819 user_handle_t handle; /* handle to the hook */
2820 unsigned int active_hooks; /* active hooks bitmap */
2824 /* Remove a window hook */
2826 user_handle_t handle; /* handle to the hook */
2827 client_ptr_t proc; /* hook procedure if handle is 0 */
2828 int id; /* id of the hook if handle is 0 */
2830 unsigned int active_hooks; /* active hooks bitmap */
2834 /* Start calling a hook chain */
2835 @REQ(start_hook_chain)
2836 int id; /* id of the hook */
2837 int event; /* signalled event */
2838 user_handle_t window; /* handle to the event window */
2839 int object_id; /* object id for out of context winevent */
2840 int child_id; /* child id for out of context winevent */
2842 user_handle_t handle; /* handle to the next hook */
2843 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2844 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2845 int unicode; /* is it a unicode hook? */
2846 client_ptr_t proc; /* hook procedure */
2847 unsigned int active_hooks; /* active hooks bitmap */
2848 VARARG(module,unicode_str); /* module name */
2852 /* Finished calling a hook chain */
2853 @REQ(finish_hook_chain)
2854 int id; /* id of the hook */
2858 /* Get the hook information */
2860 user_handle_t handle; /* handle to the current hook */
2861 int get_next; /* do we want info about current or next hook? */
2862 int event; /* signalled event */
2863 user_handle_t window; /* handle to the event window */
2864 int object_id; /* object id for out of context winevent */
2865 int child_id; /* child id for out of context winevent */
2867 user_handle_t handle; /* handle to the hook */
2868 int id; /* id of the hook */
2869 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2870 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2871 client_ptr_t proc; /* hook procedure */
2872 int unicode; /* is it a unicode hook? */
2873 VARARG(module,unicode_str); /* module name */
2877 /* Create a window class */
2879 int local; /* is it a local class? */
2880 atom_t atom; /* class atom */
2881 unsigned int style; /* class style */
2882 mod_handle_t instance; /* module instance */
2883 int extra; /* number of extra class bytes */
2884 int win_extra; /* number of window extra bytes */
2885 client_ptr_t client_ptr; /* pointer to class in client address space */
2886 data_size_t name_offset; /* base class name offset for specified atom */
2887 VARARG(name,unicode_str); /* class name */
2889 atom_t atom; /* resulting class atom */
2893 /* Destroy a window class */
2895 atom_t atom; /* class atom */
2896 mod_handle_t instance; /* module instance */
2897 VARARG(name,unicode_str); /* class name */
2899 client_ptr_t client_ptr; /* pointer to class in client address space */
2903 /* Set some information in a class */
2904 @REQ(set_class_info)
2905 user_handle_t window; /* handle to the window */
2906 unsigned int flags; /* flags for info to set (see below) */
2907 atom_t atom; /* class atom */
2908 unsigned int style; /* class style */
2909 int win_extra; /* number of window extra bytes */
2910 mod_handle_t instance; /* module instance */
2911 int extra_offset; /* offset to set in extra bytes */
2912 data_size_t extra_size; /* size to set in extra bytes */
2913 lparam_t extra_value; /* value to set in extra bytes */
2915 atom_t old_atom; /* previous class atom */
2916 atom_t base_atom; /* base class atom */
2917 mod_handle_t old_instance; /* previous module instance */
2918 lparam_t old_extra_value; /* old value in extra bytes */
2919 unsigned int old_style; /* previous class style */
2920 int old_extra; /* previous number of class extra bytes */
2921 int old_win_extra; /* previous number of window extra bytes */
2923 #define SET_CLASS_ATOM 0x0001
2924 #define SET_CLASS_STYLE 0x0002
2925 #define SET_CLASS_WINEXTRA 0x0004
2926 #define SET_CLASS_INSTANCE 0x0008
2927 #define SET_CLASS_EXTRA 0x0010
2930 /* Open the clipboard */
2931 @REQ(open_clipboard)
2932 user_handle_t window; /* clipboard window */
2934 user_handle_t owner; /* current clipboard owner */
2938 /* Close the clipboard */
2939 @REQ(close_clipboard)
2941 user_handle_t viewer; /* first clipboard viewer */
2942 user_handle_t owner; /* current clipboard owner */
2946 /* Empty the clipboard and grab ownership */
2947 @REQ(empty_clipboard)
2951 /* Add a data format to the clipboard */
2952 @REQ(set_clipboard_data)
2953 unsigned int format; /* clipboard format of the data */
2954 unsigned int lcid; /* locale id to use for synthesizing text formats */
2955 VARARG(data,bytes); /* data contents */
2957 unsigned int seqno; /* sequence number for the set data */
2961 /* Fetch a data format from the clipboard */
2962 @REQ(get_clipboard_data)
2963 unsigned int format; /* clipboard format of the data */
2964 int render; /* will we try to render it if missing? */
2965 int cached; /* do we already have it in the client-side cache? */
2966 unsigned int seqno; /* sequence number for the data in the cache */
2968 unsigned int from; /* for synthesized data, format to generate it from */
2969 user_handle_t owner; /* clipboard owner for delayed-rendered formats */
2970 unsigned int seqno; /* sequence number for the originally set data */
2971 data_size_t total; /* total data size */
2972 VARARG(data,bytes); /* data contents */
2976 /* Retrieve a list of available formats */
2977 @REQ(get_clipboard_formats)
2978 unsigned int format; /* specific format to query, return all if 0 */
2980 unsigned int count; /* count of available formats */
2981 VARARG(formats,uints); /* array of available formats */
2985 /* Retrieve the next available format */
2986 @REQ(enum_clipboard_formats)
2987 unsigned int previous; /* previous format, or first if 0 */
2989 unsigned int format; /* next format */
2993 /* Release ownership of the clipboard */
2994 @REQ(release_clipboard)
2995 user_handle_t owner; /* clipboard owner to release */
2997 user_handle_t viewer; /* first clipboard viewer */
2998 user_handle_t owner; /* current clipboard owner */
3002 /* Get clipboard information */
3003 @REQ(get_clipboard_info)
3005 user_handle_t window; /* clipboard window */
3006 user_handle_t owner; /* clipboard owner */
3007 user_handle_t viewer; /* clipboard viewer */
3008 unsigned int seqno; /* current sequence number */
3012 /* Set the clipboard viewer window */
3013 @REQ(set_clipboard_viewer)
3014 user_handle_t viewer; /* clipboard viewer */
3015 user_handle_t previous; /* if non-zero, check that this was the previous viewer */
3017 user_handle_t old_viewer; /* previous clipboard viewer */
3018 user_handle_t owner; /* clipboard owner */
3022 /* Add a clipboard listener window */
3023 @REQ(add_clipboard_listener)
3024 user_handle_t window; /* clipboard listener window */
3028 /* Remove a clipboard listener window */
3029 @REQ(remove_clipboard_listener)
3030 user_handle_t window; /* clipboard listener window */
3034 /* Open a security token */
3036 obj_handle_t handle; /* handle to the thread or process */
3037 unsigned int access; /* access rights to the new token */
3038 unsigned int attributes;/* object attributes */
3039 unsigned int flags; /* flags (see below) */
3041 obj_handle_t token; /* handle to the token */
3043 #define OPEN_TOKEN_THREAD 1
3044 #define OPEN_TOKEN_AS_SELF 2
3047 /* Set/get the global windows */
3048 @REQ(set_global_windows)
3049 unsigned int flags; /* flags for fields to set (see below) */
3050 user_handle_t shell_window; /* handle to the new shell window */
3051 user_handle_t shell_listview; /* handle to the new shell listview window */
3052 user_handle_t progman_window; /* handle to the new program manager window */
3053 user_handle_t taskman_window; /* handle to the new task manager window */
3055 user_handle_t old_shell_window; /* handle to the shell window */
3056 user_handle_t old_shell_listview; /* handle to the shell listview window */
3057 user_handle_t old_progman_window; /* handle to the new program manager window */
3058 user_handle_t old_taskman_window; /* handle to the new task manager window */
3060 #define SET_GLOBAL_SHELL_WINDOWS 0x01 /* set both main shell and listview windows */
3061 #define SET_GLOBAL_PROGMAN_WINDOW 0x02
3062 #define SET_GLOBAL_TASKMAN_WINDOW 0x04
3064 /* Adjust the privileges held by a token */
3065 @REQ(adjust_token_privileges)
3066 obj_handle_t handle; /* handle to the token */
3067 int disable_all; /* disable all privileges? */
3068 int get_modified_state; /* get modified privileges? */
3069 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to enable/disable/remove */
3071 unsigned int len; /* total length in bytes required to store token privileges */
3072 VARARG(privileges,LUID_AND_ATTRIBUTES); /* modified privileges */
3075 /* Retrieves the set of privileges held by or available to a token */
3076 @REQ(get_token_privileges)
3077 obj_handle_t handle; /* handle to the token */
3079 unsigned int len; /* total length in bytes required to store token privileges */
3080 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
3083 /* Check the token has the required privileges */
3084 @REQ(check_token_privileges)
3085 obj_handle_t handle; /* handle to the token */
3086 int all_required; /* are all the privileges required for the check to succeed? */
3087 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to check */
3089 int has_privileges; /* does the token have the required privileges? */
3090 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
3093 @REQ(duplicate_token)
3094 obj_handle_t handle; /* handle to the token to duplicate */
3095 unsigned int access; /* access rights to the new token */
3096 int primary; /* is the new token to be a primary one? */
3097 int impersonation_level; /* impersonation level of the new token */
3098 VARARG(objattr,object_attributes); /* object attributes */
3100 obj_handle_t new_handle; /* duplicated handle */
3104 obj_handle_t handle; /* handle to the token to duplicate */
3105 unsigned int flags; /* flags */
3106 data_size_t privileges_size; /* size of privileges */
3107 VARARG(privileges,LUID_AND_ATTRIBUTES,privileges_size); /* privileges to remove from new token */
3108 VARARG(disable_sids,SID); /* array of groups to remove from new token */
3110 obj_handle_t new_handle; /* filtered handle */
3114 obj_handle_t handle; /* handle to the token */
3115 unsigned int desired_access; /* desired access to the object */
3116 unsigned int mapping_read; /* mapping from generic read to specific rights */
3117 unsigned int mapping_write; /* mapping from generic write to specific rights */
3118 unsigned int mapping_execute; /* mapping from generic execute to specific rights */
3119 unsigned int mapping_all; /* mapping from generic all to specific rights */
3120 VARARG(sd,security_descriptor); /* security descriptor to check */
3122 unsigned int access_granted; /* access rights actually granted */
3123 unsigned int access_status; /* was access granted? */
3124 unsigned int privileges_len; /* length needed to store privileges */
3125 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges used during access check */
3129 obj_handle_t handle; /* handle to the token */
3130 unsigned int which_sid; /* which SID to retrieve from the token */
3132 data_size_t sid_len; /* length needed to store sid */
3133 VARARG(sid,SID); /* the sid specified by which_sid from the token */
3136 @REQ(get_token_groups)
3137 obj_handle_t handle; /* handle to the token */
3139 data_size_t user_len; /* length needed to store user */
3140 VARARG(user,token_groups); /* groups the token's user belongs to
*/
3143 @
REQ(get_token_default_dacl
)
3144 obj_handle_t handle
; /* handle to the token
*/
3146 data_size_t acl_len
; /* length needed to store access control list
*/
3147 VARARG(acl
,ACL
); /* access control list
*/
3150 @
REQ(set_token_default_dacl
)
3151 obj_handle_t handle
; /* handle to the token
*/
3152 VARARG(acl
,ACL
); /* default dacl to set
*/
3155 @
REQ(set_security_object
)
3156 obj_handle_t handle
; /* handle to the object
*/
3157 unsigned int security_info
; /* which parts of security descriptor to set
*/
3158 VARARG(sd
,security_descriptor
); /* security descriptor to set
*/
3161 @
REQ(get_security_object
)
3162 obj_handle_t handle
; /* handle to the object
*/
3163 unsigned int security_info
; /* which parts of security descriptor to get
*/
3165 unsigned int sd_len
; /* buffer size needed for sd
*/
3166 VARARG(sd
,security_descriptor
); /* retrieved security descriptor
*/
3173 obj_handle_t handle
;
3174 unsigned int access
;
3177 /* Return a list of all opened handles
*/
3178 @
REQ(get_system_handles
)
3180 unsigned int count
; /* number of handles
*/
3181 VARARG(data
,handle_infos
); /* array of handle_infos
*/
3185 /* Create a mailslot
*/
3186 @
REQ(create_mailslot
)
3187 unsigned int access
; /* wanted access rights
*/
3188 timeout_t read_timeout
;
3189 unsigned int max_msgsize
;
3190 VARARG(objattr
,object_attributes
); /* object attributes
*/
3192 obj_handle_t handle
; /* handle to the mailslot
*/
3196 /* Set mailslot information
*/
3197 @
REQ(set_mailslot_info
)
3198 obj_handle_t handle
; /* handle to the mailslot
*/
3199 timeout_t read_timeout
;
3202 timeout_t read_timeout
;
3203 unsigned int max_msgsize
;
3205 #define MAILSLOT_SET_READ_TIMEOUT
1
3208 /* Create a directory object
*/
3209 @
REQ(create_directory
)
3210 unsigned int access
; /* access flags
*/
3211 VARARG(objattr
,object_attributes
); /* object attributes
*/
3213 obj_handle_t handle
; /* handle to the directory
*/
3217 /* Open a directory object
*/
3218 @
REQ(open_directory
)
3219 unsigned int access
; /* access flags
*/
3220 unsigned int attributes
; /* object attributes
*/
3221 obj_handle_t rootdir
; /* root directory
*/
3222 VARARG(directory_name
,unicode_str
); /* Directory name
*/
3224 obj_handle_t handle
; /* handle to the directory
*/
3228 /* Get a directory entry by index
*/
3229 @
REQ(get_directory_entry
)
3230 obj_handle_t handle
; /* handle to the directory
*/
3231 unsigned int index
; /* entry index
*/
3233 data_size_t name_len
; /* length of the entry name in bytes
*/
3234 VARARG(name
,unicode_str
,name_len
); /* entry name
*/
3235 VARARG(type
,unicode_str
); /* entry type
*/
3239 /* Create a symbolic link object
*/
3240 @
REQ(create_symlink
)
3241 unsigned int access
; /* access flags
*/
3242 VARARG(objattr
,object_attributes
); /* object attributes
*/
3243 VARARG(target_name
,unicode_str
); /* target name
*/
3245 obj_handle_t handle
; /* handle to the symlink
*/
3249 /* Open a symbolic link object
*/
3251 unsigned int access
; /* access flags
*/
3252 unsigned int attributes
; /* object attributes
*/
3253 obj_handle_t rootdir
; /* root directory
*/
3254 VARARG(name
,unicode_str
); /* symlink name
*/
3256 obj_handle_t handle
; /* handle to the symlink
*/
3260 /* Query a symbolic link object
*/
3262 obj_handle_t handle
; /* handle to the symlink
*/
3264 data_size_t total
; /* total needed size for name
*/
3265 VARARG(target_name
,unicode_str
); /* target name
*/
3269 /* Query basic object information
*/
3270 @
REQ(get_object_info
)
3271 obj_handle_t handle
; /* handle to the object
*/
3273 unsigned int access
; /* granted access mask
*/
3274 unsigned int ref_count
; /* object ref count
*/
3275 unsigned int handle_count
; /* object handle count
*/
3276 data_size_t total
; /* total needed size for name
*/
3277 VARARG(name
,unicode_str
); /* object name
*/
3281 /* Query object type name information
*/
3282 @
REQ(get_object_type
)
3283 obj_handle_t handle
; /* handle to the object
*/
3285 data_size_t total
; /* needed size for type name
*/
3286 VARARG(type
,unicode_str
); /* type name
*/
3290 /* Query the impersonation level of an impersonation token
*/
3291 @
REQ(get_token_impersonation_level
)
3292 obj_handle_t handle
; /* handle to the object
*/
3294 int impersonation_level
; /* impersonation level of the impersonation token
*/
3297 /* Allocate a locally
-unique identifier
*/
3298 @
REQ(allocate_locally_unique_id
)
3304 /* Create a device manager
*/
3305 @
REQ(create_device_manager
)
3306 unsigned int access
; /* wanted access rights
*/
3307 unsigned int attributes
; /* object attributes
*/
3309 obj_handle_t handle
; /* handle to the device
*/
3313 /* Create a device
*/
3315 obj_handle_t rootdir
; /* root directory
*/
3316 client_ptr_t user_ptr
; /* opaque ptr for use by client
*/
3317 obj_handle_t manager
; /* device manager
*/
3318 VARARG(name
,unicode_str
); /* object name
*/
3322 /* Delete a device
*/
3324 obj_handle_t manager
; /* handle to the device manager
*/
3325 client_ptr_t device
; /* pointer to the device
*/
3329 /* Retrieve the next pending device irp request
*/
3330 @
REQ(get_next_device_request
)
3331 obj_handle_t manager
; /* handle to the device manager
*/
3332 obj_handle_t prev
; /* handle to the previous irp
*/
3333 unsigned int status
; /* status of the previous irp
*/
3334 client_ptr_t user_ptr
; /* user pointer of the previous irp
*/
3336 irp_params_t params
; /* irp parameters
*/
3337 obj_handle_t next
; /* handle to the next irp
*/
3338 thread_id_t client_tid
; /* tid of thread calling irp
*/
3339 client_ptr_t client_thread
; /* pointer to thread object of calling irp
*/
3340 data_size_t in_size
; /* total needed input size
*/
3341 VARARG(next_data
,bytes
); /* input data of the next irp
*/
3345 /* Get kernel pointer from server object
*/
3346 @
REQ(get_kernel_object_ptr
)
3347 obj_handle_t manager
; /* handle to the device manager
*/
3348 obj_handle_t handle
; /* object handle
*/
3350 client_ptr_t user_ptr
; /* kernel object pointer
*/
3354 /* Associate kernel pointer with server object
*/
3355 @
REQ(set_kernel_object_ptr
)
3356 obj_handle_t manager
; /* handle to the device manager
*/
3357 obj_handle_t handle
; /* object handle
*/
3358 client_ptr_t user_ptr
; /* kernel object pointer
*/
3362 /* Grab server object reference from kernel object pointer
*/
3363 @
REQ(grab_kernel_object
)
3364 obj_handle_t manager
; /* handle to the device manager
*/
3365 client_ptr_t user_ptr
; /* kernel object pointer
*/
3369 /* Release server object reference from kernel object pointer
*/
3370 @
REQ(release_kernel_object
)
3371 obj_handle_t manager
; /* handle to the device manager
*/
3372 client_ptr_t user_ptr
; /* kernel object pointer
*/
3376 /* Get handle from kernel object pointer
*/
3377 @
REQ(get_kernel_object_handle
)
3378 obj_handle_t manager
; /* handle to the device manager
*/
3379 client_ptr_t user_ptr
; /* kernel object pointer
*/
3380 unsigned int access
; /* wanted access rights
*/
3382 obj_handle_t handle
; /* kernel object handle
*/
3386 /* Make the current process a system process
*/
3387 @
REQ(make_process_system
)
3389 obj_handle_t event
; /* event signaled when all user processes have exited
*/
3393 /* Get detailed fixed
-size information about a token
*/
3394 @
REQ(get_token_statistics
)
3395 obj_handle_t handle
; /* handle to the object
*/
3397 luid_t token_id
; /* locally
-unique identifier of the token
*/
3398 luid_t modified_id
; /* locally
-unique identifier of the modified version of the token
*/
3399 int primary
; /* is the token primary or impersonation?
*/
3400 int impersonation_level
; /* level of impersonation
*/
3401 int group_count
; /* the number of groups the token is a member of
*/
3402 int privilege_count
; /* the number of privileges the token has
*/
3406 /* Create I
/O completion port
*/
3407 @
REQ(create_completion
)
3408 unsigned int access
; /* desired access to a port
*/
3409 unsigned int concurrent
; /* max number of concurrent active threads
*/
3410 VARARG(objattr
,object_attributes
); /* object attributes
*/
3412 obj_handle_t handle
; /* port handle
*/
3416 /* Open I
/O completion port
*/
3417 @
REQ(open_completion
)
3418 unsigned int access
; /* desired access to a port
*/
3419 unsigned int attributes
; /* object attributes
*/
3420 obj_handle_t rootdir
; /* root directory
*/
3421 VARARG(filename
,unicode_str
); /* port name
*/
3423 obj_handle_t handle
; /* port handle
*/
3427 /* add completion to completion port
*/
3428 @
REQ(add_completion
)
3429 obj_handle_t handle
; /* port handle
*/
3430 apc_param_t ckey
; /* completion key
*/
3431 apc_param_t cvalue
; /* completion value
*/
3432 apc_param_t information
; /* IO_STATUS_BLOCK Information
*/
3433 unsigned int status
; /* completion result
*/
3437 /* get completion from completion port queue
*/
3438 @
REQ(remove_completion
)
3439 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 queue depth
*/
3449 @
REQ(query_completion
)
3450 obj_handle_t handle
; /* port handle
*/
3452 unsigned int depth
; /* completion queue depth
*/
3456 /* associate object with completion port
*/
3457 @
REQ(set_completion_info
)
3458 obj_handle_t handle
; /* object handle
*/
3459 apc_param_t ckey
; /* completion key
*/
3460 obj_handle_t chandle
; /* port handle
*/
3464 /* check for associated completion and push msg
*/
3465 @
REQ(add_fd_completion
)
3466 obj_handle_t handle
; /* async
' object */
3467 apc_param_t cvalue; /* completion value */
3468 apc_param_t information; /* IO_STATUS_BLOCK Information */
3469 unsigned int status; /* completion status */
3470 int async; /* completion is an async result */
3474 /* set fd completion information */
3475 @REQ(set_fd_completion_mode)
3476 obj_handle_t handle; /* handle to a file or directory */
3477 unsigned int flags; /* completion notification flags */
3481 /* set fd disposition information */
3482 @REQ(set_fd_disp_info)
3483 obj_handle_t handle; /* handle to a file or directory */
3484 int unlink; /* whether to unlink file on close */
3488 /* set fd name information */
3489 @REQ(set_fd_name_info)
3490 obj_handle_t handle; /* handle to a file or directory */
3491 obj_handle_t rootdir; /* root directory */
3492 int link; /* link instead of renaming */
3493 int replace; /* replace an existing file? */
3494 VARARG(filename,string); /* new file name */
3498 /* Retrieve layered info for a window */
3499 @REQ(get_window_layered_info)
3500 user_handle_t handle; /* handle to the window */
3502 unsigned int color_key; /* color key */
3503 unsigned int alpha; /* alpha (0..255) */
3504 unsigned int flags; /* LWA_* flags */
3508 /* Set layered info for a window */
3509 @REQ(set_window_layered_info)
3510 user_handle_t handle; /* handle to the window */
3511 unsigned int color_key; /* color key */
3512 unsigned int alpha; /* alpha (0..255) */
3513 unsigned int flags; /* LWA_* flags */
3517 /* Allocate an arbitrary user handle */
3518 @REQ(alloc_user_handle)
3520 user_handle_t handle; /* allocated handle */
3524 /* Free an arbitrary user handle */
3525 @REQ(free_user_handle)
3526 user_handle_t handle; /* handle to free*/
3530 /* Set/get the current cursor */
3532 unsigned int flags; /* flags for fields to set (see below) */
3533 user_handle_t handle; /* handle to the cursor */
3534 int show_count; /* show count increment/decrement */
3535 int x; /* cursor position */
3537 rectangle_t clip; /* cursor clip rectangle */
3538 unsigned int clip_msg; /* message to post on cursor clip changes */
3540 user_handle_t prev_handle; /* previous handle */
3541 int prev_count; /* previous show count */
3542 int prev_x; /* previous position */
3544 int new_x; /* new position */
3546 rectangle_t new_clip; /* new clip rectangle */
3547 unsigned int last_change; /* time of last position change */
3549 #define SET_CURSOR_HANDLE 0x01
3550 #define SET_CURSOR_COUNT 0x02
3551 #define SET_CURSOR_POS 0x04
3552 #define SET_CURSOR_CLIP 0x08
3553 #define SET_CURSOR_NOCLIP 0x10
3555 /* Get the history of the 64 last cursor positions */
3556 @REQ(get_cursor_history)
3558 VARARG(history,cursor_positions);
3562 /* Batch read rawinput message data */
3563 @REQ(get_rawinput_buffer)
3564 data_size_t rawinput_size; /* size of RAWINPUT structure */
3565 data_size_t buffer_size; /* size of output buffer */
3567 data_size_t next_size; /* minimum size to get next message data */
3572 /* Modify the list of registered rawinput devices */
3573 @REQ(update_rawinput_devices)
3574 VARARG(devices,rawinput_devices);
3577 /* Retrieve the list of registered rawinput devices */
3578 @REQ(get_rawinput_devices)
3580 unsigned int device_count;
3581 VARARG(devices,rawinput_devices);
3584 /* Create a new job object */
3586 unsigned int access; /* wanted access rights */
3587 VARARG(objattr,object_attributes); /* object attributes */
3589 obj_handle_t handle; /* handle to the job */
3593 /* Open a job object */
3595 unsigned int access; /* wanted access rights */
3596 unsigned int attributes; /* object attributes */
3597 obj_handle_t rootdir; /* root directory */
3598 VARARG(name,unicode_str); /* object name */
3600 obj_handle_t handle; /* handle to the job */
3604 /* Assign a job object to a process */
3606 obj_handle_t job; /* handle to the job */
3607 obj_handle_t process; /* handle to the process */
3611 /* Check if a process is associated with a job */
3612 @REQ(process_in_job)
3613 obj_handle_t job; /* handle to the job */
3614 obj_handle_t process; /* handle to the process */
3618 /* Set limit flags on a job */
3619 @REQ(set_job_limits)
3620 obj_handle_t handle; /* handle to the job */
3621 unsigned int limit_flags; /* new limit flags */
3625 /* Set new completion port for a job */
3626 @REQ(set_job_completion_port)
3627 obj_handle_t job; /* handle to the job */
3628 obj_handle_t port; /* handle to the completion port */
3629 client_ptr_t key; /* key to send with completion messages */
3633 /* Retrieve information about a job */
3635 obj_handle_t handle; /* handle to the job */
3637 int total_processes; /* total count of processes */
3638 int active_processes; /* count of running processes */
3642 /* Terminate all processes associated with the job */
3644 obj_handle_t handle; /* handle to the job */
3645 int status; /* process exit code */
3649 /* Suspend a process */
3650 @REQ(suspend_process)
3651 obj_handle_t handle; /* process handle */
3655 /* Resume a process */
3656 @REQ(resume_process)
3657 obj_handle_t handle; /* process handle */