3 * Wine server protocol definition
5 * Copyright (C
) 2001 Alexandre Julliard
7 * This file is used by tools
/make_requests to build the
8 * protocol structures in include
/wine
/server_protocol.h
10 * This library is free software
; you can redistribute it and
/or
11 * modify it under the terms of the GNU Lesser General Public
12 * License as published by the Free Software Foundation
; either
13 * version
2.1 of the License
, or (at your option
) any later version.
15 * This library is distributed in the hope that it will be useful
,
16 * but WITHOUT ANY WARRANTY
; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU
18 * Lesser General Public License for more details.
20 * You should have received a copy of the GNU Lesser General Public
21 * License along with this library
; if not
, write to the Free Software
22 * Foundation
, Inc.
, 51 Franklin St
, Fifth Floor
, Boston
, MA
02110-1301, USA
25 @HEADER
/* start of C declarations
*/
34 typedef unsigned int obj_handle_t
;
35 typedef unsigned int user_handle_t
;
36 typedef unsigned int atom_t
;
37 typedef unsigned int process_id_t
;
38 typedef unsigned int thread_id_t
;
39 typedef unsigned int data_size_t
;
40 typedef unsigned int ioctl_code_t
;
41 typedef unsigned __int64 lparam_t
;
42 typedef unsigned __int64 apc_param_t
;
43 typedef unsigned __int64 mem_size_t
;
44 typedef unsigned __int64 file_pos_t
;
45 typedef unsigned __int64 client_ptr_t
;
46 typedef unsigned __int64 affinity_t
;
47 typedef client_ptr_t mod_handle_t
;
51 int req
; /* request code
*/
52 data_size_t request_size
; /* request variable part size
*/
53 data_size_t reply_size
; /* reply variable part maximum size
*/
58 unsigned int error
; /* error result
*/
59 data_size_t reply_size
; /* reply variable part size
*/
62 /* placeholder structure for the maximum allowed request size
*/
63 /* this is used to construct the generic_request union
*/
64 struct request_max_size
66 int pad
[16]; /* the max request size is
16 ints
*/
69 #define FIRST_USER_HANDLE
0x0020 /* first possible value for low word of user handle
*/
70 #define LAST_USER_HANDLE
0xffef /* last possible value for low word of user handle
*/
73 /* debug event data
*/
76 int code
; /* event code
*/
79 int code
; /* EXCEPTION_DEBUG_EVENT
*/
80 int first
; /* first chance exception?
*/
81 unsigned int exc_code
; /* exception code
*/
82 unsigned int flags
; /* exception flags
*/
83 client_ptr_t record
; /* exception record
*/
84 client_ptr_t address
; /* exception address
*/
85 int nb_params
; /* number of parameters
*/
87 client_ptr_t params
[15]; /* parameters
*/
91 int code
; /* CREATE_THREAD_DEBUG_EVENT
*/
92 obj_handle_t handle
; /* handle to the new thread
*/
93 client_ptr_t teb
; /* thread
teb (in debugged process address space
) */
94 client_ptr_t start
; /* thread startup routine
*/
98 int code
; /* CREATE_PROCESS_DEBUG_EVENT
*/
99 obj_handle_t file
; /* handle to the process exe file
*/
100 obj_handle_t process
; /* handle to the new process
*/
101 obj_handle_t thread
; /* handle to the new thread
*/
102 mod_handle_t base
; /* base of executable image
*/
103 int dbg_offset
; /* offset of debug info in file
*/
104 int dbg_size
; /* size of debug info
*/
105 client_ptr_t teb
; /* thread
teb (in debugged process address space
) */
106 client_ptr_t start
; /* thread startup routine
*/
107 client_ptr_t name
; /* image
name (optional
) */
108 int unicode
; /* is it Unicode?
*/
112 int code
; /* EXIT_THREAD_DEBUG_EVENT
/EXIT_PROCESS_DEBUG_EVENT
*/
113 int exit_code
; /* thread or process exit code
*/
117 int code
; /* LOAD_DLL_DEBUG_EVENT
*/
118 obj_handle_t handle
; /* file handle for the dll
*/
119 mod_handle_t base
; /* base address of the dll
*/
120 int dbg_offset
; /* offset of debug info in file
*/
121 int dbg_size
; /* size of debug info
*/
122 client_ptr_t name
; /* image
name (optional
) */
123 int unicode
; /* is it Unicode?
*/
127 int code
; /* UNLOAD_DLL_DEBUG_EVENT
*/
129 mod_handle_t base
; /* base address of the dll
*/
133 /* supported CPU types
*/
136 CPU_x86
, CPU_x86_64
, CPU_POWERPC
, CPU_ARM
, CPU_ARM64
138 typedef int client_cpu_t
;
143 client_cpu_t cpu
; /* cpu type
*/
144 unsigned int flags
; /* SERVER_CTX_
* flags
*/
147 struct
{ unsigned int eip
, ebp
, esp
, eflags
, cs
, ss
; } i386_regs
;
148 struct
{ unsigned __int64 rip
, rbp
, rsp
;
149 unsigned int cs
, ss
, flags
, __pad
; } x86_64_regs
;
150 struct
{ unsigned int iar
, msr
, ctr
, lr
, dar
, dsisr
, trap
, __pad
; } powerpc_regs
;
151 struct
{ unsigned int sp
, lr
, pc
, cpsr
; } arm_regs
;
152 struct
{ unsigned __int64 sp
, pc
, pstate
; } arm64_regs
;
153 } ctl
; /* selected by SERVER_CTX_CONTROL
*/
156 struct
{ unsigned int eax
, ebx
, ecx
, edx
, esi
, edi
; } i386_regs
;
157 struct
{ unsigned __int64 rax
,rbx
, rcx
, rdx
, rsi
, rdi
,
158 r8
, r9
, r10
, r11
, r12
, r13
, r14
, r15
; } x86_64_regs
;
159 struct
{ unsigned int gpr
[32], cr
, xer
; } powerpc_regs
;
160 struct
{ unsigned int r
[13]; } arm_regs
;
161 struct
{ unsigned __int64 x
[31]; } arm64_regs
;
162 } integer
; /* selected by SERVER_CTX_INTEGER
*/
165 struct
{ unsigned int ds
, es
, fs
, gs
; } i386_regs
;
166 struct
{ unsigned int ds
, es
, fs
, gs
; } x86_64_regs
;
167 } seg
; /* selected by SERVER_CTX_SEGMENTS
*/
170 struct
{ unsigned int ctrl
, status
, tag
, err_off
, err_sel
, data_off
, data_sel
, cr0npx
;
171 unsigned char regs
[80]; } i386_regs
;
172 struct
{ struct
{ unsigned __int64 low
, high
; } fpregs
[32]; } x86_64_regs
;
173 struct
{ double fpr
[32], fpscr
; } powerpc_regs
;
174 struct
{ unsigned __int64 d
[32]; unsigned int fpscr
; } arm_regs
;
175 struct
{ struct
{ unsigned __int64 low
, high
; } q
[32]; unsigned int fpcr
, fpsr
; } arm64_regs
;
176 } fp
; /* selected by SERVER_CTX_FLOATING_POINT
*/
179 struct
{ unsigned int dr0
, dr1
, dr2
, dr3
, dr6
, dr7
; } i386_regs
;
180 struct
{ unsigned __int64 dr0
, dr1
, dr2
, dr3
, dr6
, dr7
; } x86_64_regs
;
181 struct
{ unsigned int dr
[8]; } powerpc_regs
;
182 struct
{ unsigned int bvr
[8], bcr
[8], wvr
[1], wcr
[1]; } arm_regs
;
183 struct
{ unsigned __int64 bvr
[8], wvr
[2]; unsigned int bcr
[8], wcr
[2]; } arm64_regs
;
184 } debug
; /* selected by SERVER_CTX_DEBUG_REGISTERS
*/
187 unsigned char i386_regs
[512];
188 } ext
; /* selected by SERVER_CTX_EXTENDED_REGISTERS
*/
191 #define SERVER_CTX_CONTROL
0x01
192 #define SERVER_CTX_INTEGER
0x02
193 #define SERVER_CTX_SEGMENTS
0x04
194 #define SERVER_CTX_FLOATING_POINT
0x08
195 #define SERVER_CTX_DEBUG_REGISTERS
0x10
196 #define SERVER_CTX_EXTENDED_REGISTERS
0x20
198 /* structure used in sending an fd from client to server
*/
201 thread_id_t tid
; /* thread id
*/
202 int fd
; /* file descriptor on client
-side
*/
205 /* structure sent by the server on the wait fifo
*/
208 client_ptr_t cookie
; /* magic cookie that was passed in select_request
*/
209 int signaled
; /* wait result
*/
213 /* NT
-style timeout
, in
100ns units
, negative means relative timeout
*/
214 typedef __int64 timeout_t
;
215 #define
TIMEOUT_INFINITE (((timeout_t
)0x7fffffff) << 32 |
0xffffffff)
217 /* absolute timeout
, negative means that monotonic clock is used
*/
218 typedef __int64 abstime_t
;
220 /* structure for process startup info
*/
223 unsigned int debug_flags
;
224 unsigned int console_flags
;
225 obj_handle_t console
;
227 obj_handle_t hstdout
;
228 obj_handle_t hstderr
;
235 unsigned int attribute
;
238 data_size_t curdir_len
;
239 data_size_t dllpath_len
;
240 data_size_t imagepath_len
;
241 data_size_t cmdline_len
;
242 data_size_t title_len
;
243 data_size_t desktop_len
;
244 data_size_t shellinfo_len
;
245 data_size_t runtime_len
;
246 /* VARARG(curdir
,unicode_str
,curdir_len
); */
247 /* VARARG(dllpath
,unicode_str
,dllpath_len
); */
248 /* VARARG(imagepath
,unicode_str
,imagepath_len
); */
249 /* VARARG(cmdline
,unicode_str
,cmdline_len
); */
250 /* VARARG(title
,unicode_str
,title_len
); */
251 /* VARARG(desktop
,unicode_str
,desktop_len
); */
252 /* VARARG(shellinfo
,unicode_str
,shellinfo_len
); */
253 /* VARARG(runtime
,unicode_str
,runtime_len
); */
256 /* structure returned in the list of window properties
*/
259 atom_t atom
; /* property atom
*/
260 int string
; /* was atom a string originally?
*/
261 lparam_t data
; /* data stored in property
*/
264 /* structure to specify window rectangles
*/
273 /* structure for parameters of async I
/O calls
*/
276 obj_handle_t handle
; /* object to perform I
/O on
*/
277 obj_handle_t event
; /* event to signal when done
*/
278 client_ptr_t iosb
; /* I
/O status block in client addr space
*/
279 client_ptr_t user
; /* opaque user data containing callback pointer and async
-specific data
*/
280 client_ptr_t apc
; /* user APC to call
*/
281 apc_param_t apc_context
; /* user APC context or completion value
*/
284 /* structures for extra message data
*/
288 unsigned int device
; /* source
device (IMDT_
* values
) */
289 unsigned int origin
; /* source
origin (IMO_
* values
) */
292 struct hardware_msg_data
294 lparam_t info
; /* extra info
*/
295 unsigned int hw_id
; /* unique id
*/
296 unsigned int flags
; /* hook flags
*/
297 struct hw_msg_source source
; /* message source
*/
303 int type
; /* RIM_TYPEKEYBOARD
*/
304 unsigned int message
; /* message generated by this rawinput event
*/
305 unsigned short vkey
; /* virtual key code
*/
306 unsigned short scan
; /* scan code
*/
310 int type
; /* RIM_TYPEMOUSE
*/
311 int x
; /* x coordinate
*/
312 int y
; /* y coordinate
*/
313 unsigned int data
; /* mouse data
*/
318 struct callback_msg_data
320 client_ptr_t callback
; /* callback function
*/
321 lparam_t data
; /* user data for callback
*/
322 lparam_t result
; /* message result
*/
325 struct winevent_msg_data
327 user_handle_t hook
; /* hook handle
*/
328 thread_id_t tid
; /* thread id
*/
329 client_ptr_t hook_proc
; /* hook proc address
*/
330 /* followed by module name if any
*/
338 int type
; /* INPUT_KEYBOARD
*/
339 unsigned short vkey
; /* virtual key code
*/
340 unsigned short scan
; /* scan code
*/
341 unsigned int flags
; /* event flags
*/
342 unsigned int time
; /* event time
*/
343 lparam_t info
; /* extra info
*/
347 int type
; /* INPUT_MOUSE
*/
348 int x
; /* coordinates
*/
350 unsigned int data
; /* mouse data
*/
351 unsigned int flags
; /* event flags
*/
352 unsigned int time
; /* event time
*/
353 lparam_t info
; /* extra info
*/
357 int type
; /* INPUT_HARDWARE
*/
358 unsigned int msg
; /* message code
*/
359 lparam_t lparam
; /* message param
*/
365 unsigned char bytes
[1]; /* raw data for sent messages
*/
366 struct hardware_msg_data hardware
;
367 struct callback_msg_data callback
;
368 struct winevent_msg_data winevent
;
371 /* structure for console char
/attribute info
*/
378 /* structure returned in filesystem events
*/
379 struct filesystem_event
388 unsigned int low_part
;
392 #define MAX_ACL_LEN
65535
394 struct security_descriptor
396 unsigned int control
; /* SE_ flags
*/
397 data_size_t owner_len
;
398 data_size_t group_len
;
399 data_size_t sacl_len
;
400 data_size_t dacl_len
;
401 /* VARARG(owner
,SID
); */
402 /* VARARG(group
,SID
); */
403 /* VARARG(sacl
,ACL
); */
404 /* VARARG(dacl
,ACL
); */
407 struct object_attributes
409 obj_handle_t rootdir
; /* root directory
*/
410 unsigned int attributes
; /* object attributes
*/
411 data_size_t sd_len
; /* length of security_descriptor data. may be
0 */
412 data_size_t name_len
; /* length of the name string. may be
0 */
413 /* VARARG(sd
,security_descriptor
); */
414 /* VARARG(name
,unicode_str
); */
420 /* unsigned int attributes
[count
]; */
421 /* VARARG(sids
,SID
); */
429 SELECT_SIGNAL_AND_WAIT
,
430 SELECT_KEYED_EVENT_WAIT
,
431 SELECT_KEYED_EVENT_RELEASE
439 enum select_op op
; /* SELECT_WAIT or SELECT_WAIT_ALL
*/
440 obj_handle_t handles
[MAXIMUM_WAIT_OBJECTS
];
444 enum select_op op
; /* SELECT_SIGNAL_AND_WAIT
*/
446 obj_handle_t signal
; /* must be last in the structure so we can remove it on retries
*/
450 enum select_op op
; /* SELECT_KEYED_EVENT_WAIT or SELECT_KEYED_EVENT_RELEASE
*/
480 enum apc_type type
; /* APC_USER
*/
482 client_ptr_t func
; /* void (__stdcall
*func
)(ULONG_PTR
,ULONG_PTR
,ULONG_PTR
); */
483 apc_param_t args
[3]; /* arguments for user function
*/
487 enum apc_type type
; /* APC_TIMER
*/
489 client_ptr_t func
; /* void (__stdcall
*func
)(void
*, unsigned int
, unsigned int
); */
490 abstime_t time
; /* time of expiration
*/
491 client_ptr_t arg
; /* user argument
*/
501 enum apc_type type
; /* APC_ASYNC_IO
*/
502 unsigned int status
; /* I
/O status
*/
503 client_ptr_t user
; /* user pointer
*/
504 client_ptr_t sb
; /* status block
*/
508 enum apc_type type
; /* APC_VIRTUAL_ALLOC
*/
509 unsigned int op_type
; /* type of operation
*/
510 client_ptr_t addr
; /* requested address
*/
511 mem_size_t size
; /* allocation size
*/
512 mem_size_t zero_bits
; /* number of zero high bits
*/
513 unsigned int prot
; /* memory protection flags
*/
517 enum apc_type type
; /* APC_VIRTUAL_FREE
*/
518 unsigned int op_type
; /* type of operation
*/
519 client_ptr_t addr
; /* requested address
*/
520 mem_size_t size
; /* allocation size
*/
524 enum apc_type type
; /* APC_VIRTUAL_QUERY
*/
526 client_ptr_t addr
; /* requested address
*/
530 enum apc_type type
; /* APC_VIRTUAL_PROTECT
*/
531 unsigned int prot
; /* new protection flags
*/
532 client_ptr_t addr
; /* requested address
*/
533 mem_size_t size
; /* requested size
*/
537 enum apc_type type
; /* APC_VIRTUAL_FLUSH
*/
539 client_ptr_t addr
; /* requested address
*/
540 mem_size_t size
; /* requested size
*/
544 enum apc_type type
; /* APC_VIRTUAL_LOCK
*/
546 client_ptr_t addr
; /* requested address
*/
547 mem_size_t size
; /* requested size
*/
551 enum apc_type type
; /* APC_VIRTUAL_UNLOCK
*/
553 client_ptr_t addr
; /* requested address
*/
554 mem_size_t size
; /* requested size
*/
558 enum apc_type type
; /* APC_MAP_VIEW
*/
559 obj_handle_t handle
; /* mapping handle
*/
560 client_ptr_t addr
; /* requested address
*/
561 mem_size_t size
; /* allocation size
*/
562 file_pos_t offset
; /* file offset
*/
563 mem_size_t zero_bits
; /* number of zero high bits
*/
564 unsigned int alloc_type
; /* allocation type
*/
565 unsigned int prot
; /* memory protection flags
*/
569 enum apc_type type
; /* APC_UNMAP_VIEW
*/
571 client_ptr_t addr
; /* view address
*/
575 enum apc_type type
; /* APC_CREATE_THREAD
*/
576 unsigned int flags
; /* creation flags
*/
577 client_ptr_t func
; /* void (__stdcall
*func
)(void*)
; start function
*/
578 client_ptr_t arg
; /* argument for start function
*/
579 mem_size_t reserve
; /* reserve size for thread stack
*/
580 mem_size_t commit
; /* commit size for thread stack
*/
589 enum apc_type type
; /* APC_ASYNC_IO
*/
590 unsigned int status
; /* new status of async operation
*/
591 unsigned int total
; /* bytes transferred
*/
595 enum apc_type type
; /* APC_VIRTUAL_ALLOC
*/
596 unsigned int status
; /* status returned by call
*/
597 client_ptr_t addr
; /* resulting address
*/
598 mem_size_t size
; /* resulting size
*/
602 enum apc_type type
; /* APC_VIRTUAL_FREE
*/
603 unsigned int status
; /* status returned by call
*/
604 client_ptr_t addr
; /* resulting address
*/
605 mem_size_t size
; /* resulting size
*/
609 enum apc_type type
; /* APC_VIRTUAL_QUERY
*/
610 unsigned int status
; /* status returned by call
*/
611 client_ptr_t base
; /* resulting base address
*/
612 client_ptr_t alloc_base
;/* resulting allocation base
*/
613 mem_size_t size
; /* resulting region size
*/
614 unsigned short state
; /* resulting region state
*/
615 unsigned short prot
; /* resulting region protection
*/
616 unsigned short alloc_prot
;/* resulting allocation protection
*/
617 unsigned short alloc_type
;/* resulting region allocation type
*/
621 enum apc_type type
; /* APC_VIRTUAL_PROTECT
*/
622 unsigned int status
; /* status returned by call
*/
623 client_ptr_t addr
; /* resulting address
*/
624 mem_size_t size
; /* resulting size
*/
625 unsigned int prot
; /* old protection flags
*/
629 enum apc_type type
; /* APC_VIRTUAL_FLUSH
*/
630 unsigned int status
; /* status returned by call
*/
631 client_ptr_t addr
; /* resulting address
*/
632 mem_size_t size
; /* resulting size
*/
636 enum apc_type type
; /* APC_VIRTUAL_LOCK
*/
637 unsigned int status
; /* status returned by call
*/
638 client_ptr_t addr
; /* resulting address
*/
639 mem_size_t size
; /* resulting size
*/
643 enum apc_type type
; /* APC_VIRTUAL_UNLOCK
*/
644 unsigned int status
; /* status returned by call
*/
645 client_ptr_t addr
; /* resulting address
*/
646 mem_size_t size
; /* resulting size
*/
650 enum apc_type type
; /* APC_MAP_VIEW
*/
651 unsigned int status
; /* status returned by call
*/
652 client_ptr_t addr
; /* resulting address
*/
653 mem_size_t size
; /* resulting size
*/
657 enum apc_type type
; /* APC_MAP_VIEW
*/
658 unsigned int status
; /* status returned by call
*/
662 enum apc_type type
; /* APC_CREATE_THREAD
*/
663 unsigned int status
; /* status returned by call
*/
664 process_id_t pid
; /* process id
*/
665 thread_id_t tid
; /* thread id
*/
666 obj_handle_t handle
; /* handle to new thread
*/
670 enum apc_type type
; /* APC_BREAK_PROCESS
*/
671 unsigned int status
; /* status returned by call
*/
690 enum irp_type type
; /* irp call type
*/
693 enum irp_type type
; /* IRP_CALL_CREATE
*/
694 unsigned int access
; /* access rights
*/
695 unsigned int sharing
; /* sharing flags
*/
696 unsigned int options
; /* file options
*/
697 client_ptr_t device
; /* opaque ptr for the device
*/
698 obj_handle_t file
; /* file handle
*/
702 enum irp_type type
; /* IRP_CALL_CLOSE
*/
704 client_ptr_t file
; /* opaque ptr for the file object
*/
708 enum irp_type type
; /* IRP_CALL_READ
*/
709 unsigned int key
; /* driver key
*/
710 data_size_t out_size
; /* needed output size
*/
712 client_ptr_t file
; /* opaque ptr for the file object
*/
713 file_pos_t pos
; /* file position
*/
717 enum irp_type type
; /* IRP_CALL_WRITE
*/
718 unsigned int key
; /* driver key
*/
719 client_ptr_t file
; /* opaque ptr for the file object
*/
720 file_pos_t pos
; /* file position
*/
724 enum irp_type type
; /* IRP_CALL_FLUSH
*/
726 client_ptr_t file
; /* opaque ptr for the file object
*/
730 enum irp_type type
; /* IRP_CALL_IOCTL
*/
731 ioctl_code_t code
; /* ioctl code
*/
732 data_size_t out_size
; /* needed output size
*/
734 client_ptr_t file
; /* opaque ptr for the file object
*/
738 enum irp_type type
; /* IRP_CALL_FREE
*/
740 client_ptr_t obj
; /* opaque ptr for the freed object
*/
744 enum irp_type type
; /* IRP_CALL_CANCEL
*/
746 client_ptr_t irp
; /* opaque ptr for canceled irp
*/
750 /* information about a PE image mapping
, roughly equivalent to SECTION_IMAGE_INFORMATION
*/
754 client_ptr_t entry_point
;
756 mem_size_t stack_size
;
757 mem_size_t stack_commit
;
758 unsigned int zerobits
;
759 unsigned int subsystem
;
760 unsigned short subsystem_low
;
761 unsigned short subsystem_high
;
763 unsigned short image_charact
;
764 unsigned short dll_charact
;
765 unsigned short machine
;
766 unsigned char contains_code
;
767 unsigned char image_flags
;
768 unsigned int loader_flags
;
769 unsigned int header_size
;
770 unsigned int file_size
;
771 unsigned int checksum
;
775 #define IMAGE_FLAGS_ComPlusNativeReady
0x01
776 #define IMAGE_FLAGS_ComPlusILOnly
0x02
777 #define IMAGE_FLAGS_ImageDynamicallyRelocated
0x04
778 #define IMAGE_FLAGS_ImageMappedFlat
0x08
779 #define IMAGE_FLAGS_BaseBelow4gb
0x10
780 #define IMAGE_FLAGS_WineBuiltin
0x40
781 #define IMAGE_FLAGS_WineFakeDll
0x80
783 struct rawinput_device
785 unsigned short usage_page
;
786 unsigned short usage
;
788 user_handle_t target
;
791 /****************************************************************/
792 /* Request declarations
*/
794 /* Create a new process from the context of the parent
*/
796 obj_handle_t parent_process
; /* parent process
*/
797 int inherit_all
; /* inherit all handles from parent
*/
798 unsigned int create_flags
; /* creation flags
*/
799 int socket_fd
; /* file descriptor for process socket
*/
800 obj_handle_t exe_file
; /* file handle for main exe
*/
801 unsigned int access
; /* access rights for process object
*/
802 client_cpu_t cpu
; /* CPU that the new process will use
*/
803 data_size_t info_size
; /* size of startup info
*/
804 VARARG(objattr
,object_attributes
); /* object attributes
*/
805 VARARG(info
,startup_info
,info_size
); /* startup information
*/
806 VARARG(env
,unicode_str
); /* environment for new process
*/
808 obj_handle_t info
; /* new process info handle
*/
809 process_id_t pid
; /* process id
*/
810 obj_handle_t handle
; /* process
handle (in the current process
) */
814 /* Execute a process
, replacing the current one
*/
816 int socket_fd
; /* file descriptor for process socket
*/
817 client_cpu_t cpu
; /* CPU that the new process will use
*/
821 /* Retrieve information about a newly started process
*/
822 @
REQ(get_new_process_info
)
823 obj_handle_t info
; /* info handle returned from new_process_request
*/
825 int success
; /* did the process start successfully?
*/
826 int exit_code
; /* process exit code if failed
*/
830 /* Create a new thread
*/
832 obj_handle_t process
; /* process in which to create thread
*/
833 unsigned int access
; /* wanted access rights
*/
834 int suspend
; /* new thread should be suspended on creation
*/
835 int request_fd
; /* fd for request pipe
*/
836 VARARG(objattr
,object_attributes
); /* object attributes
*/
838 thread_id_t tid
; /* thread id
*/
839 obj_handle_t handle
; /* thread
handle (in the current process
) */
843 /* Retrieve the new process startup info
*/
844 @
REQ(get_startup_info
)
846 data_size_t info_size
; /* size of startup info
*/
847 VARARG(info
,startup_info
,info_size
); /* startup information
*/
848 VARARG(env
,unicode_str
); /* environment
*/
852 /* Signal the end of the process initialization
*/
853 @
REQ(init_process_done
)
854 int gui
; /* is it a GUI process?
*/
855 mod_handle_t module
; /* main module base address
*/
856 client_ptr_t ldt_copy
; /* address of LDT
copy (in thread address space
) */
857 client_ptr_t entry
; /* process entry point
*/
859 int suspend
; /* is process suspended?
*/
863 /* Initialize a thread
; called from the child after
fork()/clone() */
865 int unix_pid
; /* Unix pid of new thread
*/
866 int unix_tid
; /* Unix tid of new thread
*/
867 int debug_level
; /* new debug level
*/
868 client_ptr_t teb
; /* TEB of new
thread (in thread address space
) */
869 client_ptr_t entry
; /* entry point or PEB if initial
thread (in thread address space
) */
870 int reply_fd
; /* fd for reply pipe
*/
871 int wait_fd
; /* fd for blocking calls pipe
*/
872 client_cpu_t cpu
; /* CPU that this thread is running on
*/
874 process_id_t pid
; /* process id of the new thread
's process */
875 thread_id_t tid; /* thread id of the new thread */
876 timeout_t server_start; /* server start time */
877 data_size_t info_size; /* total size of startup info */
878 int version; /* protocol version */
879 unsigned int all_cpus; /* bitset of supported CPUs */
880 int suspend; /* is thread suspended? */
884 /* Terminate a process */
885 @REQ(terminate_process)
886 obj_handle_t handle; /* process handle to terminate */
887 int exit_code; /* process exit code */
889 int self; /* suicide? */
893 /* Terminate a thread */
894 @REQ(terminate_thread)
895 obj_handle_t handle; /* thread handle to terminate */
896 int exit_code; /* thread exit code */
898 int self; /* suicide? */
902 /* Retrieve information about a process */
903 @REQ(get_process_info)
904 obj_handle_t handle; /* process handle */
906 process_id_t pid; /* server process id */
907 process_id_t ppid; /* server process id of parent */
908 affinity_t affinity; /* process affinity mask */
909 client_ptr_t peb; /* PEB address in process address space */
910 timeout_t start_time; /* process start time */
911 timeout_t end_time; /* process end time */
912 int exit_code; /* process exit code */
913 int priority; /* priority class */
914 client_cpu_t cpu; /* CPU that this process is running on */
915 short int debugger_present; /* process is being debugged */
916 short int debug_children; /* inherit debugger to child processes */
917 VARARG(image,pe_image_info); /* image info for main exe */
921 /* Retrieve information about a process memory usage */
922 @REQ(get_process_vm_counters)
923 obj_handle_t handle; /* process handle */
925 mem_size_t peak_virtual_size; /* peak virtual memory in bytes */
926 mem_size_t virtual_size; /* virtual memory in bytes */
927 mem_size_t peak_working_set_size; /* peak real memory in bytes */
928 mem_size_t working_set_size; /* real memory in bytes */
929 mem_size_t pagefile_usage; /* commit charge in bytes */
930 mem_size_t peak_pagefile_usage; /* peak commit charge in bytes */
934 /* Set a process information */
935 @REQ(set_process_info)
936 obj_handle_t handle; /* process handle */
937 int mask; /* setting mask (see below) */
938 int priority; /* priority class */
939 affinity_t affinity; /* affinity mask */
941 #define SET_PROCESS_INFO_PRIORITY 0x01
942 #define SET_PROCESS_INFO_AFFINITY 0x02
945 /* Retrieve information about a thread */
946 @REQ(get_thread_info)
947 obj_handle_t handle; /* thread handle */
948 unsigned int access; /* required access rights */
950 process_id_t pid; /* server process id */
951 thread_id_t tid; /* server thread id */
952 client_ptr_t teb; /* thread teb pointer */
953 client_ptr_t entry_point; /* thread entry point */
954 affinity_t affinity; /* thread affinity mask */
955 int exit_code; /* thread exit code */
956 int priority; /* thread priority level */
957 int last; /* last thread in process */
958 int suspend_count; /* thread suspend count */
959 int dbg_hidden; /* thread hidden from debugger */
960 data_size_t desc_len; /* description length in bytes */
961 VARARG(desc,unicode_str); /* description string */
965 /* Retrieve information about thread times */
966 @REQ(get_thread_times)
967 obj_handle_t handle; /* thread handle */
969 timeout_t creation_time; /* thread creation time */
970 timeout_t exit_time; /* thread exit time */
971 int unix_pid; /* thread native pid */
972 int unix_tid; /* thread native pid */
976 /* Set a thread information */
977 @REQ(set_thread_info)
978 obj_handle_t handle; /* thread handle */
979 int mask; /* setting mask (see below) */
980 int priority; /* priority class */
981 affinity_t affinity; /* affinity mask */
982 client_ptr_t entry_point; /* thread entry point */
983 obj_handle_t token; /* impersonation token */
984 VARARG(desc,unicode_str); /* description string */
986 #define SET_THREAD_INFO_PRIORITY 0x01
987 #define SET_THREAD_INFO_AFFINITY 0x02
988 #define SET_THREAD_INFO_TOKEN 0x04
989 #define SET_THREAD_INFO_ENTRYPOINT 0x08
990 #define SET_THREAD_INFO_DESCRIPTION 0x10
991 #define SET_THREAD_INFO_DBG_HIDDEN 0x20
994 /* Retrieve information about a module */
996 obj_handle_t handle; /* process handle */
997 mod_handle_t base_address; /* base address of module */
999 client_ptr_t entry_point;
1000 data_size_t filename_len; /* buffer len in bytes required to store filename */
1001 VARARG(filename,unicode_str); /* file name of module */
1005 /* Suspend a thread */
1006 @REQ(suspend_thread)
1007 obj_handle_t handle; /* thread handle */
1009 int count; /* new suspend count */
1013 /* Resume a thread */
1015 obj_handle_t handle; /* thread handle */
1017 int count; /* new suspend count */
1021 /* Notify the server that a dll has been loaded */
1023 data_size_t dbg_offset; /* debug info offset */
1024 mod_handle_t base; /* base address */
1025 client_ptr_t name; /* ptr to ptr to name (in process addr space) */
1026 data_size_t dbg_size; /* debug info size */
1027 VARARG(filename,unicode_str); /* file name of dll */
1031 /* Notify the server that a dll is being unloaded */
1033 mod_handle_t base; /* base address */
1037 /* Queue an APC for a thread or process */
1039 obj_handle_t handle; /* thread or process handle */
1040 apc_call_t call; /* call arguments */
1042 obj_handle_t handle; /* APC handle */
1043 int self; /* run APC in caller itself? */
1047 /* Get the result of an APC call */
1048 @REQ(get_apc_result)
1049 obj_handle_t handle; /* handle to the APC */
1051 apc_result_t result; /* result of the APC */
1055 /* Close a handle for the current process */
1057 obj_handle_t handle; /* handle to close */
1061 /* Set a handle information */
1062 @REQ(set_handle_info)
1063 obj_handle_t handle; /* handle we are interested in */
1064 int flags; /* new handle flags */
1065 int mask; /* mask for flags to set */
1067 int old_flags; /* old flag value */
1071 /* Duplicate a handle */
1073 obj_handle_t src_process; /* src process handle */
1074 obj_handle_t src_handle; /* src handle to duplicate */
1075 obj_handle_t dst_process; /* dst process handle */
1076 unsigned int access; /* wanted access rights */
1077 unsigned int attributes; /* object attributes */
1078 unsigned int options; /* duplicate options (see below) */
1080 obj_handle_t handle; /* duplicated handle in dst process */
1081 int self; /* is the source the current process? */
1082 int closed; /* whether the source handle has been closed */
1084 #define DUP_HANDLE_CLOSE_SOURCE DUPLICATE_CLOSE_SOURCE
1085 #define DUP_HANDLE_SAME_ACCESS DUPLICATE_SAME_ACCESS
1086 #define DUP_HANDLE_MAKE_GLOBAL 0x80000000 /* Not a Windows flag */
1089 /* Open a handle to a process */
1091 process_id_t pid; /* process id to open */
1092 unsigned int access; /* wanted access rights */
1093 unsigned int attributes; /* object attributes */
1095 obj_handle_t handle; /* handle to the process */
1099 /* Open a handle to a thread */
1101 thread_id_t tid; /* thread id to open */
1102 unsigned int access; /* wanted access rights */
1103 unsigned int attributes; /* object attributes */
1105 obj_handle_t handle; /* handle to the thread */
1109 /* Wait for handles */
1111 int flags; /* wait flags (see below) */
1112 client_ptr_t cookie; /* magic cookie to return to client */
1113 abstime_t timeout; /* timeout */
1114 data_size_t size; /* size of select_op */
1115 obj_handle_t prev_apc; /* handle to previous APC */
1116 VARARG(result,apc_result); /* result of previous APC */
1117 VARARG(data,select_op,size); /* operation-specific data */
1118 VARARG(context,context); /* suspend context */
1120 apc_call_t call; /* APC call arguments */
1121 obj_handle_t apc_handle; /* handle to next APC */
1122 VARARG(context,context); /* suspend context */
1124 #define SELECT_ALERTABLE 1
1125 #define SELECT_INTERRUPTIBLE 2
1128 /* Create an event */
1130 unsigned int access; /* wanted access rights */
1131 int manual_reset; /* manual reset event */
1132 int initial_state; /* initial state of the event */
1133 VARARG(objattr,object_attributes); /* object attributes */
1135 obj_handle_t handle; /* handle to the event */
1138 /* Event operation */
1140 obj_handle_t handle; /* handle to event */
1141 int op; /* event operation (see below) */
1143 int state; /* previous state */
1145 enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT };
1148 obj_handle_t handle; /* handle to event */
1150 int manual_reset; /* manual reset event */
1151 int state; /* current state of the event */
1156 unsigned int access; /* wanted access rights */
1157 unsigned int attributes; /* object attributes */
1158 obj_handle_t rootdir; /* root directory */
1159 VARARG(name,unicode_str); /* object name */
1161 obj_handle_t handle; /* handle to the event */
1165 /* Create a keyed event */
1166 @REQ(create_keyed_event)
1167 unsigned int access; /* wanted access rights */
1168 VARARG(objattr,object_attributes); /* object attributes */
1170 obj_handle_t handle; /* handle to the event */
1173 /* Open a keyed event */
1174 @REQ(open_keyed_event)
1175 unsigned int access; /* wanted access rights */
1176 unsigned int attributes; /* object attributes */
1177 obj_handle_t rootdir; /* root directory */
1178 VARARG(name,unicode_str); /* object name */
1180 obj_handle_t handle; /* handle to the event */
1184 /* Create a mutex */
1186 unsigned int access; /* wanted access rights */
1187 int owned; /* initially owned? */
1188 VARARG(objattr,object_attributes); /* object attributes */
1190 obj_handle_t handle; /* handle to the mutex */
1194 /* Release a mutex */
1196 obj_handle_t handle; /* handle to the mutex */
1198 unsigned int prev_count; /* value of internal counter, before release */
1204 unsigned int access; /* wanted access rights */
1205 unsigned int attributes; /* object attributes */
1206 obj_handle_t rootdir; /* root directory */
1207 VARARG(name,unicode_str); /* object name */
1209 obj_handle_t handle; /* handle to the mutex */
1215 obj_handle_t handle; /* handle to mutex */
1217 unsigned int count; /* current count of mutex */
1218 int owned; /* true if owned by current thread */
1219 int abandoned; /* true if abandoned */
1223 /* Create a semaphore */
1224 @REQ(create_semaphore)
1225 unsigned int access; /* wanted access rights */
1226 unsigned int initial; /* initial count */
1227 unsigned int max; /* maximum count */
1228 VARARG(objattr,object_attributes); /* object attributes */
1230 obj_handle_t handle; /* handle to the semaphore */
1234 /* Release a semaphore */
1235 @REQ(release_semaphore)
1236 obj_handle_t handle; /* handle to the semaphore */
1237 unsigned int count; /* count to add to semaphore */
1239 unsigned int prev_count; /* previous semaphore count */
1242 @REQ(query_semaphore)
1243 obj_handle_t handle; /* handle to the semaphore */
1245 unsigned int current; /* current count */
1246 unsigned int max; /* maximum count */
1249 /* Open a semaphore */
1250 @REQ(open_semaphore)
1251 unsigned int access; /* wanted access rights */
1252 unsigned int attributes; /* object attributes */
1253 obj_handle_t rootdir; /* root directory */
1254 VARARG(name,unicode_str); /* object name */
1256 obj_handle_t handle; /* handle to the semaphore */
1262 unsigned int access; /* wanted access rights */
1263 unsigned int sharing; /* sharing flags */
1264 int create; /* file create action */
1265 unsigned int options; /* file options */
1266 unsigned int attrs; /* file attributes for creation */
1267 VARARG(objattr,object_attributes); /* object attributes */
1268 VARARG(filename,string); /* file name */
1270 obj_handle_t handle; /* handle to the file */
1274 /* Open a file object */
1275 @REQ(open_file_object)
1276 unsigned int access; /* wanted access rights */
1277 unsigned int attributes; /* open attributes */
1278 obj_handle_t rootdir; /* root directory */
1279 unsigned int sharing; /* sharing flags */
1280 unsigned int options; /* file options */
1281 VARARG(filename,unicode_str); /* file name */
1283 obj_handle_t handle; /* handle to the file */
1287 /* Allocate a file handle for a Unix fd */
1288 @REQ(alloc_file_handle)
1289 unsigned int access; /* wanted access rights */
1290 unsigned int attributes; /* object attributes */
1291 int fd; /* file descriptor on the client side */
1293 obj_handle_t handle; /* handle to the file */
1297 /* Get the Unix name from a file handle */
1298 @REQ(get_handle_unix_name)
1299 obj_handle_t handle; /* file handle */
1301 data_size_t name_len; /* unix name length */
1302 VARARG(name,string); /* unix name */
1306 /* Get a Unix fd to access a file */
1308 obj_handle_t handle; /* handle to the file */
1310 int type; /* file type (see below) */
1311 int cacheable; /* can fd be cached in the client? */
1312 unsigned int access; /* file access rights */
1313 unsigned int options; /* file open options */
1317 FD_TYPE_INVALID, /* invalid file (no associated fd) */
1318 FD_TYPE_FILE, /* regular file */
1319 FD_TYPE_DIR, /* directory */
1320 FD_TYPE_SOCKET, /* socket */
1321 FD_TYPE_SERIAL, /* serial port */
1322 FD_TYPE_PIPE, /* named pipe */
1323 FD_TYPE_MAILSLOT, /* mailslot */
1324 FD_TYPE_CHAR, /* unspecified char device */
1325 FD_TYPE_DEVICE, /* Windows device file */
1330 /* Retrieve (or allocate) the client-side directory cache entry */
1331 @REQ(get_directory_cache_entry)
1332 obj_handle_t handle; /* handle to the directory */
1334 int entry; /* cache entry on the client side */
1335 VARARG(free,ints); /* entries that can be freed */
1339 /* Flush a file buffers */
1341 async_data_t async; /* async I/O parameters */
1343 obj_handle_t event; /* event set when finished */
1346 /* Query file information */
1348 obj_handle_t handle; /* handle to the file */
1349 unsigned int info_class; /* queried information class */
1351 VARARG(data,bytes); /* file info data */
1354 /* Query volume information */
1355 @REQ(get_volume_info)
1356 obj_handle_t handle; /* handle to the file */
1357 unsigned int info_class; /* queried information class */
1359 VARARG(data,bytes); /* volume info data */
1362 /* Lock a region of a file */
1364 obj_handle_t handle; /* handle to the file */
1365 file_pos_t offset; /* offset of start of lock */
1366 file_pos_t count; /* count of bytes to lock */
1367 int shared; /* shared or exclusive lock? */
1368 int wait; /* do we want to wait? */
1370 obj_handle_t handle; /* handle to wait on */
1371 int overlapped; /* is it an overlapped I/O handle? */
1375 /* Unlock a region of a file */
1377 obj_handle_t handle; /* handle to the file */
1378 file_pos_t offset; /* offset of start of unlock */
1379 file_pos_t count; /* count of bytes to unlock */
1383 /* Create a socket */
1385 unsigned int access; /* wanted access rights */
1386 unsigned int attributes; /* object attributes */
1387 int family; /* family, see socket manpage */
1388 int type; /* type, see socket manpage */
1389 int protocol; /* protocol, see socket manpage */
1390 unsigned int flags; /* socket flags */
1392 obj_handle_t handle; /* handle to the new socket */
1396 /* Accept a socket */
1398 obj_handle_t lhandle; /* handle to the listening socket */
1399 unsigned int access; /* wanted access rights */
1400 unsigned int attributes; /* object attributes */
1402 obj_handle_t handle; /* handle to the new socket */
1406 /* Accept into an initialized socket */
1407 @REQ(accept_into_socket)
1408 obj_handle_t lhandle; /* handle to the listening socket */
1409 obj_handle_t ahandle; /* handle to the accepting socket */
1413 /* Set socket event parameters */
1414 @REQ(set_socket_event)
1415 obj_handle_t handle; /* handle to the socket */
1416 unsigned int mask; /* event mask */
1417 obj_handle_t event; /* event object */
1418 user_handle_t window; /* window to send the message to */
1419 unsigned int msg; /* message to send */
1423 /* Get socket event parameters */
1424 @REQ(get_socket_event)
1425 obj_handle_t handle; /* handle to the socket */
1426 int service; /* clear pending? */
1427 obj_handle_t c_event; /* event to clear */
1429 unsigned int mask; /* event mask */
1430 unsigned int pmask; /* pending events */
1431 unsigned int state; /* status bits */
1432 VARARG(errors,ints); /* event errors */
1436 /* Get socket info */
1437 @REQ(get_socket_info)
1438 obj_handle_t handle; /* handle to the socket */
1440 int family; /* family, see socket manpage */
1441 int type; /* type, see socket manpage */
1442 int protocol; /* protocol, see socket manpage */
1446 /* Re-enable pending socket events */
1447 @REQ(enable_socket_event)
1448 obj_handle_t handle; /* handle to the socket */
1449 unsigned int mask; /* events to re-enable */
1450 unsigned int sstate; /* status bits to set */
1451 unsigned int cstate; /* status bits to clear */
1454 @REQ(set_socket_deferred)
1455 obj_handle_t handle; /* handle to the socket */
1456 obj_handle_t deferred; /* handle to the socket for which accept() is deferred */
1459 /* Allocate a console (only used by a console renderer) */
1461 unsigned int access; /* wanted access rights */
1462 unsigned int attributes; /* object attributes */
1463 process_id_t pid; /* pid of process which shall be attached to the console */
1464 int input_fd; /* if pid=-1 (bare console to current process), fd for input */
1466 obj_handle_t handle_in; /* handle to console input */
1467 obj_handle_t event; /* handle to renderer events change notification */
1471 /* Free the console of the current process */
1476 #define CONSOLE_RENDERER_NONE_EVENT 0x00
1477 #define CONSOLE_RENDERER_TITLE_EVENT 0x01
1478 #define CONSOLE_RENDERER_ACTIVE_SB_EVENT 0x02
1479 #define CONSOLE_RENDERER_SB_RESIZE_EVENT 0x03
1480 #define CONSOLE_RENDERER_UPDATE_EVENT 0x04
1481 #define CONSOLE_RENDERER_CURSOR_POS_EVENT 0x05
1482 #define CONSOLE_RENDERER_CURSOR_GEOM_EVENT 0x06
1483 #define CONSOLE_RENDERER_DISPLAY_EVENT 0x07
1484 #define CONSOLE_RENDERER_EXIT_EVENT 0x08
1485 struct console_renderer_event
1520 /* retrieve console events for the renderer */
1521 @REQ(get_console_renderer_events)
1522 obj_handle_t handle; /* handle to console input events */
1524 VARARG(data,bytes); /* the various console_renderer_events */
1528 /* Open a handle to the process console */
1530 obj_handle_t from; /* console_in handle to get active screen buffer */
1531 unsigned int access; /* wanted access rights */
1532 unsigned int attributes; /* object attributes */
1533 int share; /* share mask (only for output handles) */
1535 obj_handle_t handle; /* handle to the console */
1539 /* Attach to a other process's console
*/
1540 @
REQ(attach_console
)
1541 process_id_t pid
; /* pid of attached console process
*/
1543 obj_handle_t std_in
; /* attached stdin
*/
1544 obj_handle_t std_out
; /* attached stdout
*/
1545 obj_handle_t std_err
; /* attached stderr
*/
1549 /* Get the input queue wait event
*/
1550 @
REQ(get_console_wait_event
)
1551 obj_handle_t handle
; /* handle to the console
*/
1556 /* Get a console
mode (input or output
) */
1557 @
REQ(get_console_mode
)
1558 obj_handle_t handle
; /* handle to the console
*/
1560 int mode
; /* console mode
*/
1564 /* Set a console
mode (input or output
) */
1565 @
REQ(set_console_mode
)
1566 obj_handle_t handle
; /* handle to the console
*/
1567 int mode
; /* console mode
*/
1571 /* Set info about a
console (input only
) */
1572 @
REQ(set_console_input_info
)
1573 obj_handle_t handle
; /* handle to console input
, or
0 for process
' console */
1574 int mask; /* setting mask (see below) */
1575 obj_handle_t active_sb; /* active screen buffer */
1576 int history_mode; /* whether we duplicate lines in history */
1577 int history_size; /* number of lines in history */
1578 int edition_mode; /* index to the edition mode flavors */
1579 int input_cp; /* console input codepage */
1580 int output_cp; /* console output codepage */
1581 user_handle_t win; /* console window if backend supports it */
1582 VARARG(title,unicode_str); /* console title */
1584 #define SET_CONSOLE_INPUT_INFO_ACTIVE_SB 0x01
1585 #define SET_CONSOLE_INPUT_INFO_TITLE 0x02
1586 #define SET_CONSOLE_INPUT_INFO_HISTORY_MODE 0x04
1587 #define SET_CONSOLE_INPUT_INFO_HISTORY_SIZE 0x08
1588 #define SET_CONSOLE_INPUT_INFO_EDITION_MODE 0x10
1589 #define SET_CONSOLE_INPUT_INFO_INPUT_CODEPAGE 0x20
1590 #define SET_CONSOLE_INPUT_INFO_OUTPUT_CODEPAGE 0x40
1591 #define SET_CONSOLE_INPUT_INFO_WIN 0x80
1594 /* Get info about a console (input only) */
1595 @REQ(get_console_input_info)
1596 obj_handle_t handle; /* handle to console input, or 0 for process' console
*/
1598 int history_mode
; /* whether we duplicate lines in history
*/
1599 int history_size
; /* number of lines in history
*/
1600 int history_index
; /* number of used lines in history
*/
1601 int edition_mode
; /* index to the edition mode flavors
*/
1602 int input_cp
; /* console input codepage
*/
1603 int output_cp
; /* console output codepage
*/
1604 user_handle_t win
; /* console window if backend supports it
*/
1605 VARARG(title
,unicode_str
); /* console title
*/
1609 /* appends a string to console
's history */
1610 @REQ(append_console_input_history)
1611 obj_handle_t handle; /* handle to console input, or 0 for process' console
*/
1612 VARARG(line
,unicode_str
); /* line to add
*/
1616 /* appends a string to console
's history */
1617 @REQ(get_console_input_history)
1618 obj_handle_t handle; /* handle to console input, or 0 for process' console
*/
1619 int index
; /* index to get line from
*/
1621 int total
; /* total length of line in Unicode chars
*/
1622 VARARG(line
,unicode_str
); /* line to add
*/
1626 /* creates a new screen buffer on process
' console */
1627 @REQ(create_console_output)
1628 obj_handle_t handle_in; /* handle to console input, or 0 for process' console
*/
1629 unsigned int access
; /* wanted access rights
*/
1630 unsigned int attributes
; /* object attributes
*/
1631 unsigned int share
; /* sharing credentials
*/
1632 int fd
; /* for bare consoles
, fd the screen
-buffer is attached to
*/
1634 obj_handle_t handle_out
; /* handle to the screen buffer
*/
1638 /* Set info about a
console (output only
) */
1639 @
REQ(set_console_output_info
)
1640 obj_handle_t handle
; /* handle to the console
*/
1641 int mask
; /* setting
mask (see below
) */
1642 short int cursor_size
; /* size of
cursor (percentage filled
) */
1643 short int cursor_visible
;/* cursor visibility flag
*/
1644 short int cursor_x
; /* position of
cursor (x
, y
) */
1646 short int width
; /* width of the screen buffer
*/
1647 short int height
; /* height of the screen buffer
*/
1648 short int attr
; /* default fill
attributes (screen colors
) */
1649 short int popup_attr
; /* pop
-up color attributes
*/
1650 short int win_left
; /* window actually displayed by renderer
*/
1651 short int win_top
; /* the rect area is expressed within the
*/
1652 short int win_right
; /* boundaries of the screen buffer
*/
1653 short int win_bottom
;
1654 short int max_width
; /* maximum
size (width x height
) for the window
*/
1655 short int max_height
;
1656 short int font_width
; /* font
size (width x height
) */
1657 short int font_height
;
1658 short int font_weight
; /* font weight
*/
1659 short int font_pitch_family
; /* font pitch
& family
*/
1660 VARARG(colors
,uints
,64); /* color table
*/
1661 VARARG(face_name
,unicode_str
); /* font face name
*/
1663 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_GEOM
0x0001
1664 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_POS
0x0002
1665 #define SET_CONSOLE_OUTPUT_INFO_SIZE
0x0004
1666 #define SET_CONSOLE_OUTPUT_INFO_ATTR
0x0008
1667 #define SET_CONSOLE_OUTPUT_INFO_DISPLAY_WINDOW
0x0010
1668 #define SET_CONSOLE_OUTPUT_INFO_MAX_SIZE
0x0020
1669 #define SET_CONSOLE_OUTPUT_INFO_FONT
0x0040
1670 #define SET_CONSOLE_OUTPUT_INFO_COLORTABLE
0x0080
1671 #define SET_CONSOLE_OUTPUT_INFO_POPUP_ATTR
0x0100
1674 /* Get info about a
console (output only
) */
1675 @
REQ(get_console_output_info
)
1676 obj_handle_t handle
; /* handle to the console
*/
1678 short int cursor_size
; /* size of
cursor (percentage filled
) */
1679 short int cursor_visible
;/* cursor visibility flag
*/
1680 short int cursor_x
; /* position of
cursor (x
, y
) */
1682 short int width
; /* width of the screen buffer
*/
1683 short int height
; /* height of the screen buffer
*/
1684 short int attr
; /* default fill
attributes (screen colors
) */
1685 short int popup_attr
; /* pop
-up color attributes
*/
1686 short int win_left
; /* window actually displayed by renderer
*/
1687 short int win_top
; /* the rect area is expressed within the
*/
1688 short int win_right
; /* boundaries of the screen buffer
*/
1689 short int win_bottom
;
1690 short int max_width
; /* maximum
size (width x height
) for the window
*/
1691 short int max_height
;
1692 short int font_width
; /* font
size (width x height
) */
1693 short int font_height
;
1694 short int font_weight
; /* font weight
*/
1695 short int font_pitch_family
; /* font pitch
& family
*/
1696 VARARG(colors
,uints
,64); /* color table
*/
1697 VARARG(face_name
,unicode_str
); /* font face name
*/
1700 /* Add input records to a console input queue
*/
1701 @
REQ(write_console_input
)
1702 obj_handle_t handle
; /* handle to the console input
*/
1703 VARARG(rec
,input_records
); /* input records
*/
1705 int written
; /* number of records written
*/
1709 /* Fetch input records from a console input queue
*/
1710 @
REQ(read_console_input
)
1711 obj_handle_t handle
; /* handle to the console input
*/
1712 int flush
; /* flush the retrieved records from the queue?
*/
1714 int read
; /* number of records read
*/
1715 VARARG(rec
,input_records
); /* input records
*/
1719 /* write
data (chars and
/or attributes
) in a screen buffer
*/
1720 @
REQ(write_console_output
)
1721 obj_handle_t handle
; /* handle to the console output
*/
1722 int x
; /* position where to start writing
*/
1724 int mode
; /* char
info (see below
) */
1725 int wrap
; /* wrap around at end of line?
*/
1726 VARARG(data
,bytes
); /* info to write
*/
1728 int written
; /* number of char infos actually written
*/
1729 int width
; /* width of screen buffer
*/
1730 int height
; /* height of screen buffer
*/
1734 CHAR_INFO_MODE_TEXT
, /* characters only
*/
1735 CHAR_INFO_MODE_ATTR
, /* attributes only
*/
1736 CHAR_INFO_MODE_TEXTATTR
, /* both characters and attributes
*/
1737 CHAR_INFO_MODE_TEXTSTDATTR
/* characters but use standard attributes
*/
1741 /* fill a screen buffer with constant
data (chars and
/or attributes
) */
1742 @
REQ(fill_console_output
)
1743 obj_handle_t handle
; /* handle to the console output
*/
1744 int x
; /* position where to start writing
*/
1746 int mode
; /* char info mode
*/
1747 int count
; /* number to write
*/
1748 int wrap
; /* wrap around at end of line?
*/
1749 char_info_t data
; /* data to write
*/
1751 int written
; /* number of char infos actually written
*/
1755 /* read
data (chars and
/or attributes
) from a screen buffer
*/
1756 @
REQ(read_console_output
)
1757 obj_handle_t handle
; /* handle to the console output
*/
1758 int x
; /* position (x
,y
) where to start reading
*/
1760 int mode
; /* char info mode
*/
1761 int wrap
; /* wrap around at end of line?
*/
1763 int width
; /* width of screen buffer
*/
1764 int height
; /* height of screen buffer
*/
1769 /* move a
rect (of data
) in screen buffer content
*/
1770 @
REQ(move_console_output
)
1771 obj_handle_t handle
; /* handle to the console output
*/
1772 short int x_src
; /* position (x
, y
) of rect to start moving from
*/
1774 short int x_dst
; /* position (x
, y
) of rect to move to
*/
1776 short int w
; /* size of the
rect (width
, height
) to move
*/
1781 /* Sends a signal to a process group
*/
1782 @
REQ(send_console_signal
)
1783 int signal
; /* the signal to send
*/
1784 process_id_t group_id
; /* the group to send the signal to
*/
1788 /* enable directory change notifications
*/
1789 @
REQ(read_directory_changes
)
1790 unsigned int filter
; /* notification filter
*/
1791 int subtree
; /* watch the subtree?
*/
1792 int want_data
; /* flag indicating whether change data should be collected
*/
1793 async_data_t async
; /* async I
/O parameters
*/
1798 obj_handle_t handle
;
1800 VARARG(events
,filesystem_event
); /* collected filesystem events
*/
1804 /* Create a file mapping
*/
1805 @
REQ(create_mapping
)
1806 unsigned int access
; /* wanted access rights
*/
1807 unsigned int flags
; /* SEC_
* flags
*/
1808 unsigned int file_access
; /* file access rights
*/
1809 mem_size_t size
; /* mapping size
*/
1810 obj_handle_t file_handle
; /* file handle
*/
1811 VARARG(objattr
,object_attributes
); /* object attributes
*/
1813 obj_handle_t handle
; /* handle to the mapping
*/
1817 /* Open a mapping
*/
1819 unsigned int access
; /* wanted access rights
*/
1820 unsigned int attributes
; /* object attributes
*/
1821 obj_handle_t rootdir
; /* root directory
*/
1822 VARARG(name
,unicode_str
); /* object name
*/
1824 obj_handle_t handle
; /* handle to the mapping
*/
1828 /* Get information about a file mapping
*/
1829 @
REQ(get_mapping_info
)
1830 obj_handle_t handle
; /* handle to the mapping
*/
1831 unsigned int access
; /* wanted access rights
*/
1833 mem_size_t size
; /* mapping size
*/
1834 unsigned int flags
; /* SEC_
* flags
*/
1835 obj_handle_t shared_file
; /* shared mapping file handle
*/
1836 VARARG(image
,pe_image_info
);/* image info for SEC_IMAGE mappings
*/
1840 /* Add a memory view in the current process
*/
1842 obj_handle_t mapping
; /* file mapping handle
*/
1843 unsigned int access
; /* wanted access rights
*/
1844 client_ptr_t base
; /* view base
address (page
-aligned
) */
1845 mem_size_t size
; /* view size
*/
1846 file_pos_t start
; /* start offset in mapping
*/
1850 /* Unmap a memory view from the current process
*/
1852 client_ptr_t base
; /* view base address
*/
1856 /* Get a range of committed pages in a file mapping
*/
1857 @
REQ(get_mapping_committed_range
)
1858 client_ptr_t base
; /* view base address
*/
1859 file_pos_t offset
; /* starting
offset (page
-aligned
, in bytes
) */
1861 mem_size_t size
; /* size of range starting at
offset (page
-aligned
, in bytes
) */
1862 int committed
; /* whether it is a committed range
*/
1866 /* Add a range to the committed pages in a file mapping
*/
1867 @
REQ(add_mapping_committed_range
)
1868 client_ptr_t base
; /* view base address
*/
1869 file_pos_t offset
; /* starting
offset (page
-aligned
, in bytes
) */
1870 mem_size_t size
; /* size to
set (page
-aligned
, in bytes
) or
0 if only retrieving
*/
1874 /* Check if two memory maps are for the same file
*/
1875 @
REQ(is_same_mapping
)
1876 client_ptr_t base1
; /* first view base address
*/
1877 client_ptr_t base2
; /* second view base address
*/
1881 #define SNAP_PROCESS
0x00000001
1882 #define SNAP_THREAD
0x00000002
1883 /* Create a snapshot
*/
1884 @
REQ(create_snapshot
)
1885 unsigned int attributes
; /* object attributes
*/
1886 unsigned int flags
; /* snapshot
flags (SNAP_*)
*/
1888 obj_handle_t handle
; /* handle to the snapshot
*/
1892 /* Get the next process from a snapshot
*/
1894 obj_handle_t handle
; /* handle to the snapshot
*/
1895 int reset
; /* reset snapshot position?
*/
1897 int count
; /* process usage count
*/
1898 process_id_t pid
; /* process id
*/
1899 process_id_t ppid
; /* parent process id
*/
1900 int threads
; /* number of threads
*/
1901 int priority
; /* process priority
*/
1902 int handles
; /* number of handles
*/
1903 int unix_pid
; /* Unix pid
*/
1904 VARARG(filename
,unicode_str
); /* file name of main exe
*/
1908 /* Get the next thread from a snapshot
*/
1910 obj_handle_t handle
; /* handle to the snapshot
*/
1911 int reset
; /* reset snapshot position?
*/
1913 int count
; /* thread usage count
*/
1914 process_id_t pid
; /* process id
*/
1915 thread_id_t tid
; /* thread id
*/
1916 int base_pri
; /* base priority
*/
1917 int delta_pri
; /* delta priority
*/
1918 int unix_tid
; /* thread native pid
*/
1922 /* Wait for a debug event
*/
1923 @
REQ(wait_debug_event
)
1924 int get_handle
; /* should we alloc a handle for waiting?
*/
1926 process_id_t pid
; /* process id
*/
1927 thread_id_t tid
; /* thread id
*/
1928 obj_handle_t wait
; /* wait handle if no event ready
*/
1929 VARARG(event
,debug_event
); /* debug event data
*/
1933 /* Queue an exception event
*/
1934 @
REQ(queue_exception_event
)
1935 int first
; /* first chance exception?
*/
1936 unsigned int code
; /* exception code
*/
1937 unsigned int flags
; /* exception flags
*/
1938 client_ptr_t record
; /* exception record
*/
1939 client_ptr_t address
; /* exception address
*/
1940 data_size_t len
; /* size of parameters
*/
1941 VARARG(params
,uints64
,len
);/* exception parameters
*/
1943 obj_handle_t handle
; /* handle to the queued event
*/
1947 /* Retrieve the status of an exception event
*/
1948 @
REQ(get_exception_status
)
1949 obj_handle_t handle
; /* handle to the queued event
*/
1953 /* Continue a debug event
*/
1954 @
REQ(continue_debug_event
)
1955 process_id_t pid
; /* process id to continue
*/
1956 thread_id_t tid
; /* thread id to continue
*/
1957 int status
; /* continuation status
*/
1961 /* Start
/stop debugging an existing process
*/
1963 process_id_t pid
; /* id of the process to debug
*/
1964 int attach
; /* 1=attaching
/ 0=detaching from the process
*/
1968 /* Set debugger kill on exit flag
*/
1969 @
REQ(set_debugger_kill_on_exit
)
1970 int kill_on_exit
; /* 0=detach
/1=kill debuggee when debugger dies
*/
1974 /* Read data from a process address space
*/
1975 @
REQ(read_process_memory
)
1976 obj_handle_t handle
; /* process handle
*/
1977 client_ptr_t addr
; /* addr to read from
*/
1979 VARARG(data
,bytes
); /* result data
*/
1983 /* Write data to a process address space
*/
1984 @
REQ(write_process_memory
)
1985 obj_handle_t handle
; /* process handle
*/
1986 client_ptr_t addr
; /* addr to write to
*/
1987 VARARG(data
,bytes
); /* data to write
*/
1991 /* Create a registry key
*/
1993 unsigned int access
; /* desired access rights
*/
1994 unsigned int options
; /* creation options
*/
1995 VARARG(objattr
,object_attributes
); /* object attributes
*/
1996 VARARG(class
,unicode_str
); /* class name
*/
1998 obj_handle_t hkey
; /* handle to the created key
*/
1999 int created
; /* has it been newly created?
*/
2002 /* Open a registry key
*/
2004 obj_handle_t parent
; /* handle to the parent key
*/
2005 unsigned int access
; /* desired access rights
*/
2006 unsigned int attributes
; /* object attributes
*/
2007 VARARG(name
,unicode_str
); /* key name
*/
2009 obj_handle_t hkey
; /* handle to the open key
*/
2013 /* Delete a registry key
*/
2015 obj_handle_t hkey
; /* handle to the key
*/
2019 /* Flush a registry key
*/
2021 obj_handle_t hkey
; /* handle to the key
*/
2025 /* Enumerate registry subkeys
*/
2027 obj_handle_t hkey
; /* handle to registry key
*/
2028 int index
; /* index of
subkey (or
-1 for current key
) */
2029 int info_class
; /* requested information class
*/
2031 int subkeys
; /* number of subkeys
*/
2032 int max_subkey
; /* longest subkey name
*/
2033 int max_class
; /* longest class name
*/
2034 int values
; /* number of values
*/
2035 int max_value
; /* longest value name
*/
2036 int max_data
; /* longest value data
*/
2037 timeout_t modif
; /* last modification time
*/
2038 data_size_t total
; /* total length needed for full name and class
*/
2039 data_size_t namelen
; /* length of key name in bytes
*/
2040 VARARG(name
,unicode_str
,namelen
); /* key name
*/
2041 VARARG(class
,unicode_str
); /* class name
*/
2045 /* Set a value of a registry key
*/
2047 obj_handle_t hkey
; /* handle to registry key
*/
2048 int type
; /* value type
*/
2049 data_size_t namelen
; /* length of value name in bytes
*/
2050 VARARG(name
,unicode_str
,namelen
); /* value name
*/
2051 VARARG(data
,bytes
); /* value data
*/
2055 /* Retrieve the value of a registry key
*/
2057 obj_handle_t hkey
; /* handle to registry key
*/
2058 VARARG(name
,unicode_str
); /* value name
*/
2060 int type
; /* value type
*/
2061 data_size_t total
; /* total length needed for data
*/
2062 VARARG(data
,bytes
); /* value data
*/
2066 /* Enumerate a value of a registry key
*/
2067 @
REQ(enum_key_value
)
2068 obj_handle_t hkey
; /* handle to registry key
*/
2069 int index
; /* value index
*/
2070 int info_class
; /* requested information class
*/
2072 int type
; /* value type
*/
2073 data_size_t total
; /* total length needed for full name and data
*/
2074 data_size_t namelen
; /* length of value name in bytes
*/
2075 VARARG(name
,unicode_str
,namelen
); /* value name
*/
2076 VARARG(data
,bytes
); /* value data
*/
2080 /* Delete a value of a registry key
*/
2081 @
REQ(delete_key_value
)
2082 obj_handle_t hkey
; /* handle to registry key
*/
2083 VARARG(name
,unicode_str
); /* value name
*/
2087 /* Load a registry branch from a file
*/
2089 obj_handle_t file
; /* file to load from
*/
2090 VARARG(objattr
,object_attributes
); /* object attributes
*/
2094 /* UnLoad a registry branch from a file
*/
2095 @
REQ(unload_registry
)
2096 obj_handle_t hkey
; /* root key to unload to
*/
2100 /* Save a registry branch to a file
*/
2102 obj_handle_t hkey
; /* key to save
*/
2103 obj_handle_t file
; /* file to save to
*/
2107 /* Add a registry key change notification
*/
2108 @
REQ(set_registry_notification
)
2109 obj_handle_t hkey
; /* key to watch for changes
*/
2110 obj_handle_t event
; /* event to set
*/
2111 int subtree
; /* should we watch the whole subtree?
*/
2112 unsigned int filter
; /* things to watch
*/
2116 /* Create a waitable timer
*/
2118 unsigned int access
; /* wanted access rights
*/
2119 int manual
; /* manual reset
*/
2120 VARARG(objattr
,object_attributes
); /* object attributes
*/
2122 obj_handle_t handle
; /* handle to the timer
*/
2126 /* Open a waitable timer
*/
2128 unsigned int access
; /* wanted access rights
*/
2129 unsigned int attributes
; /* object attributes
*/
2130 obj_handle_t rootdir
; /* root directory
*/
2131 VARARG(name
,unicode_str
); /* object name
*/
2133 obj_handle_t handle
; /* handle to the timer
*/
2136 /* Set a waitable timer
*/
2138 obj_handle_t handle
; /* handle to the timer
*/
2139 timeout_t expire
; /* next expiration absolute time
*/
2140 client_ptr_t callback
; /* callback function
*/
2141 client_ptr_t arg
; /* callback argument
*/
2142 int period
; /* timer period in ms
*/
2144 int signaled
; /* was the timer signaled before this call ?
*/
2147 /* Cancel a waitable timer
*/
2149 obj_handle_t handle
; /* handle to the timer
*/
2151 int signaled
; /* was the timer signaled before this calltime ?
*/
2154 /* Get information on a waitable timer
*/
2155 @
REQ(get_timer_info
)
2156 obj_handle_t handle
; /* handle to the timer
*/
2158 timeout_t when
; /* absolute time when the timer next expires
*/
2159 int signaled
; /* is the timer signaled?
*/
2163 /* Retrieve the current context of a thread
*/
2164 @
REQ(get_thread_context
)
2165 obj_handle_t handle
; /* thread or context handle
*/
2166 unsigned int flags
; /* context flags
*/
2168 int self
; /* was it a handle to the current thread?
*/
2169 obj_handle_t handle
; /* pending context handle
*/
2170 VARARG(context
,context
); /* thread context
*/
2174 /* Set the current context of a thread
*/
2175 @
REQ(set_thread_context
)
2176 obj_handle_t handle
; /* thread handle
*/
2177 VARARG(context
,context
); /* thread context
*/
2179 int self
; /* was it a handle to the current thread?
*/
2183 /* Fetch a selector entry for a thread
*/
2184 @
REQ(get_selector_entry
)
2185 obj_handle_t handle
; /* thread handle
*/
2186 int entry
; /* LDT entry
*/
2188 unsigned int base
; /* selector base
*/
2189 unsigned int limit
; /* selector limit
*/
2190 unsigned char flags
; /* selector flags
*/
2196 obj_handle_t table
; /* which table to add atom to
*/
2197 VARARG(name
,unicode_str
); /* atom name
*/
2199 atom_t atom
; /* resulting atom
*/
2203 /* Delete an atom
*/
2205 obj_handle_t table
; /* which table to delete atom from
*/
2206 atom_t atom
; /* atom handle
*/
2212 obj_handle_t table
; /* which table to find atom from
*/
2213 VARARG(name
,unicode_str
); /* atom name
*/
2215 atom_t atom
; /* atom handle
*/
2219 /* Get information about an atom
*/
2220 @
REQ(get_atom_information
)
2221 obj_handle_t table
; /* which table to find atom from
*/
2222 atom_t atom
; /* atom handle
*/
2224 int count
; /* atom lock count
*/
2225 int pinned
; /* whether the atom has been pinned
*/
2226 data_size_t total
; /* actual length of atom name
*/
2227 VARARG(name
,unicode_str
); /* atom name
*/
2231 /* Set information about an atom
*/
2232 @
REQ(set_atom_information
)
2233 obj_handle_t table
; /* which table to find atom from
*/
2234 atom_t atom
; /* atom handle
*/
2235 int pinned
; /* whether to bump atom information
*/
2239 /* Empty an atom table
*/
2240 @
REQ(empty_atom_table
)
2241 obj_handle_t table
; /* which table to find atom from
*/
2242 int if_pinned
; /* whether to delete pinned atoms
*/
2246 /* Init an atom table
*/
2247 @
REQ(init_atom_table
)
2248 int entries
; /* number of
entries (only for local
) */
2250 obj_handle_t table
; /* handle to the atom table
*/
2254 /* Get the message queue of the current thread
*/
2257 obj_handle_t handle
; /* handle to the queue
*/
2261 /* Set the file descriptor associated to the current thread queue
*/
2263 obj_handle_t handle
; /* handle to the file descriptor
*/
2267 /* Set the current message queue wakeup mask
*/
2268 @
REQ(set_queue_mask
)
2269 unsigned int wake_mask
; /* wakeup bits mask
*/
2270 unsigned int changed_mask
; /* changed bits mask
*/
2271 int skip_wait
; /* will we skip waiting if signaled?
*/
2273 unsigned int wake_bits
; /* current wake bits
*/
2274 unsigned int changed_bits
; /* current changed bits
*/
2278 /* Get the current message queue status
*/
2279 @
REQ(get_queue_status
)
2280 unsigned int clear_bits
; /* should we clear the change bits?
*/
2282 unsigned int wake_bits
; /* wake bits
*/
2283 unsigned int changed_bits
; /* changed bits since last time
*/
2287 /* Retrieve the process idle event
*/
2288 @
REQ(get_process_idle_event
)
2289 obj_handle_t handle
; /* process handle
*/
2291 obj_handle_t event
; /* handle to idle event
*/
2295 /* Send a message to a thread queue
*/
2297 thread_id_t id
; /* thread id
*/
2298 int type
; /* message
type (see below
) */
2299 int flags
; /* message
flags (see below
) */
2300 user_handle_t win
; /* window handle
*/
2301 unsigned int msg
; /* message code
*/
2302 lparam_t wparam
; /* parameters
*/
2303 lparam_t lparam
; /* parameters
*/
2304 timeout_t timeout
; /* timeout for reply
*/
2305 VARARG(data
,message_data
); /* message data for sent messages
*/
2308 @
REQ(post_quit_message
)
2309 int exit_code
; /* exit code to return
*/
2314 MSG_ASCII
, /* Ascii
message (from SendMessageA
) */
2315 MSG_UNICODE
, /* Unicode
message (from SendMessageW
) */
2316 MSG_NOTIFY
, /* notify
message (from SendNotifyMessageW
), always Unicode
*/
2317 MSG_CALLBACK
, /* callback
message (from SendMessageCallbackW
), always Unicode
*/
2318 MSG_CALLBACK_RESULT
,/* result of a callback message
*/
2319 MSG_OTHER_PROCESS
, /* sent from other process
, may include vararg data
, always Unicode
*/
2320 MSG_POSTED
, /* posted
message (from PostMessageW
), always Unicode
*/
2321 MSG_HARDWARE
, /* hardware message
*/
2322 MSG_WINEVENT
, /* winevent message
*/
2323 MSG_HOOK_LL
/* low
-level hardware hook
*/
2325 #define SEND_MSG_ABORT_IF_HUNG
0x01
2328 /* Send a hardware message to a thread queue
*/
2329 @
REQ(send_hardware_message
)
2330 user_handle_t win
; /* window handle
*/
2331 hw_input_t input
; /* input data
*/
2332 unsigned int flags
; /* flags (see below
) */
2334 int wait
; /* do we need to wait for a reply?
*/
2335 int prev_x
; /* previous cursor position
*/
2337 int new_x
; /* new cursor position
*/
2339 VARARG(keystate
,bytes
); /* global state array for all the keys
*/
2341 #define SEND_HWMSG_INJECTED
0x01
2344 /* Get a message from the current queue
*/
2346 unsigned int flags
; /* PM_
* flags
*/
2347 user_handle_t get_win
; /* window handle to get
*/
2348 unsigned int get_first
; /* first message code to get
*/
2349 unsigned int get_last
; /* last message code to get
*/
2350 unsigned int hw_id
; /* id of the previous hardware
message (or
0) */
2351 unsigned int wake_mask
; /* wakeup bits mask
*/
2352 unsigned int changed_mask
; /* changed bits mask
*/
2354 user_handle_t win
; /* window handle
*/
2355 unsigned int msg
; /* message code
*/
2356 lparam_t wparam
; /* parameters
*/
2357 lparam_t lparam
; /* parameters
*/
2358 int type
; /* message type
*/
2359 int x
; /* message x position
*/
2360 int y
; /* message y position
*/
2361 unsigned int time
; /* message time
*/
2362 unsigned int active_hooks
; /* active hooks bitmap
*/
2363 data_size_t total
; /* total size of extra data
*/
2364 VARARG(data
,message_data
); /* message data for sent messages
*/
2368 /* Reply to a sent message
*/
2370 int remove
; /* should we remove the message?
*/
2371 lparam_t result
; /* message result
*/
2372 VARARG(data
,bytes
); /* message data for sent messages
*/
2376 /* Accept the current hardware message
*/
2377 @
REQ(accept_hardware_message
)
2378 unsigned int hw_id
; /* id of the hardware message
*/
2379 int remove
; /* should we remove the message?
*/
2383 /* Retrieve the reply for the last message sent
*/
2384 @
REQ(get_message_reply
)
2385 int cancel
; /* cancel message if not ready?
*/
2387 lparam_t result
; /* message result
*/
2388 VARARG(data
,bytes
); /* message data for sent messages
*/
2392 /* Set a window timer
*/
2394 user_handle_t win
; /* window handle
*/
2395 unsigned int msg
; /* message to post
*/
2396 unsigned int rate
; /* timer rate in ms
*/
2397 lparam_t id
; /* timer id
*/
2398 lparam_t lparam
; /* message
lparam (callback proc
) */
2400 lparam_t id
; /* timer id
*/
2404 /* Kill a window timer
*/
2405 @
REQ(kill_win_timer
)
2406 user_handle_t win
; /* window handle
*/
2407 lparam_t id
; /* timer id
*/
2408 unsigned int msg
; /* message to post
*/
2412 /* check if the thread owning the window is hung
*/
2413 @
REQ(is_window_hung
)
2414 user_handle_t win
; /* window handle
*/
2420 /* Retrieve info about a serial port
*/
2421 @
REQ(get_serial_info
)
2422 obj_handle_t handle
; /* handle to comm port
*/
2425 unsigned int eventmask
;
2426 unsigned int cookie
;
2427 unsigned int pending_write
;
2431 /* Set info about a serial port
*/
2432 @
REQ(set_serial_info
)
2433 obj_handle_t handle
; /* handle to comm port
*/
2434 int flags
; /* bitmask to set
values (see below
) */
2436 #define SERIALINFO_PENDING_WRITE
0x04
2437 #define SERIALINFO_PENDING_WAIT
0x08
2440 /* Create an async I
/O
*/
2441 @
REQ(register_async
)
2442 int type
; /* type of queue to look after
*/
2443 async_data_t async
; /* async I
/O parameters
*/
2444 int count
; /* count
- usually # of bytes to be read
/written
*/
2446 #define ASYNC_TYPE_READ
0x01
2447 #define ASYNC_TYPE_WRITE
0x02
2448 #define ASYNC_TYPE_WAIT
0x03
2451 /* Cancel all async op on a fd
*/
2453 obj_handle_t handle
; /* handle to comm port
, socket or file
*/
2454 client_ptr_t iosb
; /* I
/O status
block (NULL
=all
) */
2455 int only_thread
; /* cancel matching this thread
*/
2459 /* Retrieve results of an async
*/
2460 @
REQ(get_async_result
)
2461 client_ptr_t user_arg
; /* user arg used to identify async
*/
2463 data_size_t size
; /* result
size (input or output depending on the operation
) */
2464 VARARG(out_data
,bytes
); /* iosb output data
*/
2468 /* Perform a read on a file object
*/
2470 async_data_t async
; /* async I
/O parameters
*/
2471 file_pos_t pos
; /* read position
*/
2473 obj_handle_t wait
; /* handle to wait on for blocking read
*/
2474 unsigned int options
; /* device open options
*/
2475 VARARG(data
,bytes
); /* read data
*/
2479 /* Perform a write on a file object
*/
2481 async_data_t async
; /* async I
/O parameters
*/
2482 file_pos_t pos
; /* write position
*/
2483 VARARG(data
,bytes
); /* write data
*/
2485 obj_handle_t wait
; /* handle to wait on for blocking write
*/
2486 unsigned int options
; /* device open options
*/
2487 data_size_t size
; /* size written
*/
2491 /* Perform an ioctl on a file
*/
2493 ioctl_code_t code
; /* ioctl code
*/
2494 async_data_t async
; /* async I
/O parameters
*/
2495 VARARG(in_data
,bytes
); /* ioctl input data
*/
2497 obj_handle_t wait
; /* handle to wait on for blocking ioctl
*/
2498 unsigned int options
; /* device open options
*/
2499 VARARG(out_data
,bytes
); /* ioctl output data
*/
2503 /* Store results of an async irp
*/
2504 @
REQ(set_irp_result
)
2505 obj_handle_t handle
; /* handle to the irp
*/
2506 unsigned int status
; /* status of the irp
*/
2507 data_size_t size
; /* result
size (input or output depending on the operation
) */
2508 VARARG(data
,bytes
); /* output data of the irp
*/
2512 /* Create a named pipe
*/
2513 @
REQ(create_named_pipe
)
2514 unsigned int access
;
2515 unsigned int options
;
2516 unsigned int sharing
;
2517 unsigned int maxinstances
;
2518 unsigned int outsize
;
2519 unsigned int insize
;
2522 VARARG(objattr
,object_attributes
); /* object attributes
*/
2524 obj_handle_t handle
; /* handle to the pipe
*/
2527 /* flags in create_named_pipe and get_named_pipe_info
*/
2528 #define NAMED_PIPE_MESSAGE_STREAM_WRITE
0x0001
2529 #define NAMED_PIPE_MESSAGE_STREAM_READ
0x0002
2530 #define NAMED_PIPE_NONBLOCKING_MODE
0x0004
2531 #define NAMED_PIPE_SERVER_END
0x8000
2533 /* Set named pipe information by handle
*/
2534 @
REQ(set_named_pipe_info
)
2535 obj_handle_t handle
;
2539 /* Create a window
*/
2541 user_handle_t parent
; /* parent window
*/
2542 user_handle_t owner
; /* owner window
*/
2543 atom_t atom
; /* class atom
*/
2544 mod_handle_t instance
; /* module instance
*/
2545 int dpi
; /* system DPI
*/
2546 int awareness
; /* thread DPI awareness
*/
2547 VARARG(class
,unicode_str
); /* class name
*/
2549 user_handle_t handle
; /* created window
*/
2550 user_handle_t parent
; /* full handle of parent
*/
2551 user_handle_t owner
; /* full handle of owner
*/
2552 int extra
; /* number of extra bytes
*/
2553 client_ptr_t class_ptr
; /* pointer to class in client address space
*/
2554 int dpi
; /* window DPI if not per
-monitor aware
*/
2555 int awareness
; /* window DPI awareness
*/
2559 /* Destroy a window
*/
2560 @
REQ(destroy_window
)
2561 user_handle_t handle
; /* handle to the window
*/
2565 /* Retrieve the desktop window for the current thread
*/
2566 @
REQ(get_desktop_window
)
2567 int force
; /* force creation if it doesn
't exist */
2569 user_handle_t top_window; /* handle to the desktop window */
2570 user_handle_t msg_window; /* handle to the top-level HWND_MESSAGE parent */
2574 /* Set a window owner */
2575 @REQ(set_window_owner)
2576 user_handle_t handle; /* handle to the window */
2577 user_handle_t owner; /* new owner */
2579 user_handle_t full_owner; /* full handle of new owner */
2580 user_handle_t prev_owner; /* full handle of previous owner */
2584 /* Get information from a window handle */
2585 @REQ(get_window_info)
2586 user_handle_t handle; /* handle to the window */
2588 user_handle_t full_handle; /* full 32-bit handle */
2589 user_handle_t last_active; /* last active popup */
2590 process_id_t pid; /* process owning the window */
2591 thread_id_t tid; /* thread owning the window */
2592 atom_t atom; /* class atom */
2593 int is_unicode; /* ANSI or unicode */
2594 int dpi; /* window DPI */
2595 int awareness; /* DPI awareness */
2599 /* Set some information in a window */
2600 @REQ(set_window_info)
2601 unsigned short flags; /* flags for fields to set (see below) */
2602 short int is_unicode; /* ANSI or unicode */
2603 user_handle_t handle; /* handle to the window */
2604 unsigned int style; /* window style */
2605 unsigned int ex_style; /* window extended style */
2606 unsigned int id; /* window id */
2607 mod_handle_t instance; /* creator instance */
2608 lparam_t user_data; /* user-specific data */
2609 int extra_offset; /* offset to set in extra bytes */
2610 data_size_t extra_size; /* size to set in extra bytes */
2611 lparam_t extra_value; /* value to set in extra bytes */
2613 unsigned int old_style; /* old window style */
2614 unsigned int old_ex_style; /* old window extended style */
2615 mod_handle_t old_instance; /* old creator instance */
2616 lparam_t old_user_data; /* old user-specific data */
2617 lparam_t old_extra_value; /* old value in extra bytes */
2618 unsigned int old_id; /* old window id */
2620 #define SET_WIN_STYLE 0x01
2621 #define SET_WIN_EXSTYLE 0x02
2622 #define SET_WIN_ID 0x04
2623 #define SET_WIN_INSTANCE 0x08
2624 #define SET_WIN_USERDATA 0x10
2625 #define SET_WIN_EXTRA 0x20
2626 #define SET_WIN_UNICODE 0x40
2629 /* Set the parent of a window */
2631 user_handle_t handle; /* handle to the window */
2632 user_handle_t parent; /* handle to the parent */
2634 user_handle_t old_parent; /* old parent window */
2635 user_handle_t full_parent; /* full handle of new parent */
2636 int dpi; /* new window DPI if not per-monitor aware */
2637 int awareness; /* new DPI awareness */
2641 /* Get a list of the window parents, up to the root of the tree */
2642 @REQ(get_window_parents)
2643 user_handle_t handle; /* handle to the window */
2645 int count; /* total count of parents */
2646 VARARG(parents,user_handles); /* parent handles */
2650 /* Get a list of the window children */
2651 @REQ(get_window_children)
2652 obj_handle_t desktop; /* handle to desktop */
2653 user_handle_t parent; /* parent window */
2654 atom_t atom; /* class atom for the listed children */
2655 thread_id_t tid; /* thread owning the listed children */
2656 VARARG(class,unicode_str); /* class name */
2658 int count; /* total count of children */
2659 VARARG(children,user_handles); /* children handles */
2663 /* Get a list of the window children that contain a given point */
2664 @REQ(get_window_children_from_point)
2665 user_handle_t parent; /* parent window */
2666 int x; /* point in parent coordinates */
2668 int dpi; /* dpi for the point coordinates */
2670 int count; /* total count of children */
2671 VARARG(children,user_handles); /* children handles */
2675 /* Get window tree information from a window handle */
2676 @REQ(get_window_tree)
2677 user_handle_t handle; /* handle to the window */
2679 user_handle_t parent; /* parent window */
2680 user_handle_t owner; /* owner window */
2681 user_handle_t next_sibling; /* next sibling in Z-order */
2682 user_handle_t prev_sibling; /* prev sibling in Z-order */
2683 user_handle_t first_sibling; /* first sibling in Z-order */
2684 user_handle_t last_sibling; /* last sibling in Z-order */
2685 user_handle_t first_child; /* first child */
2686 user_handle_t last_child; /* last child */
2689 /* Set the position and Z order of a window */
2690 @REQ(set_window_pos)
2691 unsigned short swp_flags; /* SWP_* flags */
2692 unsigned short paint_flags; /* paint flags (see below) */
2693 user_handle_t handle; /* handle to the window */
2694 user_handle_t previous; /* previous window in Z order */
2695 rectangle_t window; /* window rectangle (in parent coords) */
2696 rectangle_t client; /* client rectangle (in parent coords) */
2697 VARARG(valid,rectangles); /* valid rectangles from WM_NCCALCSIZE (in parent coords) */
2699 unsigned int new_style; /* new window style */
2700 unsigned int new_ex_style; /* new window extended style */
2701 user_handle_t surface_win; /* parent window that holds the surface */
2702 int needs_update; /* whether the surface region needs an update */
2704 #define SET_WINPOS_PAINT_SURFACE 0x01 /* window has a paintable surface */
2705 #define SET_WINPOS_PIXEL_FORMAT 0x02 /* window has a custom pixel format */
2707 /* Get the window and client rectangles of a window */
2708 @REQ(get_window_rectangles)
2709 user_handle_t handle; /* handle to the window */
2710 int relative; /* coords relative to (see below) */
2711 int dpi; /* DPI to map to, or zero for per-monitor DPI */
2713 rectangle_t window; /* window rectangle */
2714 rectangle_t client; /* client rectangle */
2716 enum coords_relative
2718 COORDS_CLIENT, /* relative to client area */
2719 COORDS_WINDOW, /* relative to whole window area */
2720 COORDS_PARENT, /* relative to parent's client area
*/
2721 COORDS_SCREEN
/* relative to screen origin
*/
2725 /* Get the window text
*/
2726 @
REQ(get_window_text
)
2727 user_handle_t handle
; /* handle to the window
*/
2729 data_size_t length
; /* total length in WCHARs
*/
2730 VARARG(text
,unicode_str
); /* window text
*/
2734 /* Set the window text
*/
2735 @
REQ(set_window_text
)
2736 user_handle_t handle
; /* handle to the window
*/
2737 VARARG(text
,unicode_str
); /* window text
*/
2741 /* Get the coordinates offset between two windows
*/
2742 @
REQ(get_windows_offset
)
2743 user_handle_t from
; /* handle to the first window
*/
2744 user_handle_t to
; /* handle to the second window
*/
2745 int dpi
; /* DPI to map to
, or zero for per
-monitor DPI
*/
2747 int x
; /* x coordinate offset
*/
2748 int y
; /* y coordinate offset
*/
2749 int mirror
; /* whether to mirror the x coordinate
*/
2753 /* Get the visible region of a window
*/
2754 @
REQ(get_visible_region
)
2755 user_handle_t window
; /* handle to the window
*/
2756 unsigned int flags
; /* DCX flags
*/
2758 user_handle_t top_win
; /* top window to clip against
*/
2759 rectangle_t top_rect
; /* top window visible rect with screen coords
*/
2760 rectangle_t win_rect
; /* window rect in screen coords
*/
2761 unsigned int paint_flags
; /* paint
flags (from SET_WINPOS_
* flags
) */
2762 data_size_t total_size
; /* total size of the resulting region
*/
2763 VARARG(region
,rectangles
); /* list of rectangles for the
region (in screen coords
) */
2767 /* Get the visible surface region of a window
*/
2768 @
REQ(get_surface_region
)
2769 user_handle_t window
; /* handle to the window
*/
2771 rectangle_t visible_rect
; /* window visible rect in screen coords
*/
2772 data_size_t total_size
; /* total size of the resulting region
*/
2773 VARARG(region
,rectangles
); /* list of rectangles for the
region (in screen coords
) */
2777 /* Get the window region
*/
2778 @
REQ(get_window_region
)
2779 user_handle_t window
; /* handle to the window
*/
2781 data_size_t total_size
; /* total size of the resulting region
*/
2782 VARARG(region
,rectangles
); /* list of rectangles for the
region (in window coords
) */
2786 /* Set the window region
*/
2787 @
REQ(set_window_region
)
2788 user_handle_t window
; /* handle to the window
*/
2789 int redraw
; /* redraw the window?
*/
2790 VARARG(region
,rectangles
); /* list of rectangles for the
region (in window coords
) */
2794 /* Get the window update region
*/
2795 @
REQ(get_update_region
)
2796 user_handle_t window
; /* handle to the window
*/
2797 user_handle_t from_child
; /* child to start searching from
*/
2798 unsigned int flags
; /* update
flags (see below
) */
2800 user_handle_t child
; /* child to
repaint (or window itself
) */
2801 unsigned int flags
; /* resulting update
flags (see below
) */
2802 data_size_t total_size
; /* total size of the resulting region
*/
2803 VARARG(region
,rectangles
); /* list of rectangles for the
region (in screen coords
) */
2805 #define UPDATE_NONCLIENT
0x001 /* get region for repainting non
-client area
*/
2806 #define UPDATE_ERASE
0x002 /* get region for erasing client area
*/
2807 #define UPDATE_PAINT
0x004 /* get region for painting client area
*/
2808 #define UPDATE_INTERNALPAINT
0x008 /* get region if internal paint is pending
*/
2809 #define UPDATE_ALLCHILDREN
0x010 /* force repaint of all children
*/
2810 #define UPDATE_NOCHILDREN
0x020 /* don
't try to repaint any children */
2811 #define UPDATE_NOREGION 0x040 /* don't return a region
, only the flags
*/
2812 #define UPDATE_DELAYED_ERASE
0x080 /* still needs erase after BeginPaint
*/
2813 #define UPDATE_CLIPCHILDREN
0x100 /* remove clipped children from the update region
*/
2816 /* Update the z order of a window so that a given rectangle is fully visible
*/
2817 @
REQ(update_window_zorder
)
2818 user_handle_t window
; /* handle to the window
*/
2819 rectangle_t rect
; /* rectangle that must be
visible (in client coords
) */
2823 /* Mark parts of a window as needing a redraw
*/
2825 user_handle_t window
; /* handle to the window
*/
2826 unsigned int flags
; /* RDW_
* flags
*/
2827 VARARG(region
,rectangles
); /* list of rectangles for the
region (in window coords
) */
2831 /* Set a window property
*/
2832 @
REQ(set_window_property
)
2833 user_handle_t window
; /* handle to the window
*/
2834 lparam_t data
; /* data to store
*/
2835 atom_t atom
; /* property
atom (if no name specified
) */
2836 VARARG(name
,unicode_str
); /* property name
*/
2840 /* Remove a window property
*/
2841 @
REQ(remove_window_property
)
2842 user_handle_t window
; /* handle to the window
*/
2843 atom_t atom
; /* property
atom (if no name specified
) */
2844 VARARG(name
,unicode_str
); /* property name
*/
2846 lparam_t data
; /* data stored in property
*/
2850 /* Get a window property
*/
2851 @
REQ(get_window_property
)
2852 user_handle_t window
; /* handle to the window
*/
2853 atom_t atom
; /* property
atom (if no name specified
) */
2854 VARARG(name
,unicode_str
); /* property name
*/
2856 lparam_t data
; /* data stored in property
*/
2860 /* Get the list of properties of a window
*/
2861 @
REQ(get_window_properties
)
2862 user_handle_t window
; /* handle to the window
*/
2864 int total
; /* total number of properties
*/
2865 VARARG(props
,properties
); /* list of properties
*/
2869 /* Create a window station
*/
2870 @
REQ(create_winstation
)
2871 unsigned int flags
; /* window station flags
*/
2872 unsigned int access
; /* wanted access rights
*/
2873 unsigned int attributes
; /* object attributes
*/
2874 obj_handle_t rootdir
; /* root directory
*/
2875 VARARG(name
,unicode_str
); /* object name
*/
2877 obj_handle_t handle
; /* handle to the window station
*/
2881 /* Open a handle to a window station
*/
2882 @
REQ(open_winstation
)
2883 unsigned int access
; /* wanted access rights
*/
2884 unsigned int attributes
; /* object attributes
*/
2885 obj_handle_t rootdir
; /* root directory
*/
2886 VARARG(name
,unicode_str
); /* object name
*/
2888 obj_handle_t handle
; /* handle to the window station
*/
2892 /* Close a window station
*/
2893 @
REQ(close_winstation
)
2894 obj_handle_t handle
; /* handle to the window station
*/
2898 /* Get the process current window station
*/
2899 @
REQ(get_process_winstation
)
2901 obj_handle_t handle
; /* handle to the window station
*/
2905 /* Set the process current window station
*/
2906 @
REQ(set_process_winstation
)
2907 obj_handle_t handle
; /* handle to the window station
*/
2911 /* Enumerate window stations
*/
2912 @
REQ(enum_winstation
)
2913 unsigned int index
; /* current index
*/
2915 unsigned int next
; /* next index
*/
2916 VARARG(name
,unicode_str
); /* window station name
*/
2920 /* Create a desktop
*/
2921 @
REQ(create_desktop
)
2922 unsigned int flags
; /* desktop flags
*/
2923 unsigned int access
; /* wanted access rights
*/
2924 unsigned int attributes
; /* object attributes
*/
2925 VARARG(name
,unicode_str
); /* object name
*/
2927 obj_handle_t handle
; /* handle to the desktop
*/
2931 /* Open a handle to a desktop
*/
2933 obj_handle_t winsta
; /* window station to
open (null allowed
) */
2934 unsigned int flags
; /* desktop flags
*/
2935 unsigned int access
; /* wanted access rights
*/
2936 unsigned int attributes
; /* object attributes
*/
2937 VARARG(name
,unicode_str
); /* object name
*/
2939 obj_handle_t handle
; /* handle to the desktop
*/
2943 /* Open a handle to current input desktop
*/
2944 @
REQ(open_input_desktop
)
2945 unsigned int flags
; /* desktop flags
*/
2946 unsigned int access
; /* wanted access rights
*/
2947 unsigned int attributes
; /* object attributes
*/
2949 obj_handle_t handle
; /* handle to the desktop
*/
2953 /* Close a desktop
*/
2955 obj_handle_t handle
; /* handle to the desktop
*/
2959 /* Get the thread current desktop
*/
2960 @
REQ(get_thread_desktop
)
2961 thread_id_t tid
; /* thread id
*/
2963 obj_handle_t handle
; /* handle to the desktop
*/
2967 /* Set the thread current desktop
*/
2968 @
REQ(set_thread_desktop
)
2969 obj_handle_t handle
; /* handle to the desktop
*/
2973 /* Enumerate desktops
*/
2975 obj_handle_t winstation
; /* handle to the window station
*/
2976 unsigned int index
; /* current index
*/
2978 unsigned int next
; /* next index
*/
2979 VARARG(name
,unicode_str
); /* window station name
*/
2983 /* Get
/set information about a user
object (window station or desktop
) */
2984 @
REQ(set_user_object_info
)
2985 obj_handle_t handle
; /* handle to the object
*/
2986 unsigned int flags
; /* information to set
/get
*/
2987 unsigned int obj_flags
; /* new object flags
*/
2989 int is_desktop
; /* is object a desktop?
*/
2990 unsigned int old_obj_flags
; /* old object flags
*/
2991 VARARG(name
,unicode_str
); /* object name
*/
2993 #define SET_USER_OBJECT_SET_FLAGS
1
2994 #define SET_USER_OBJECT_GET_FULL_NAME
2
2997 /* Register a hotkey
*/
2998 @
REQ(register_hotkey
)
2999 user_handle_t window
; /* handle to the window
*/
3000 int id
; /* hotkey identifier
*/
3001 unsigned int flags
; /* modifier keys
*/
3002 unsigned int vkey
; /* virtual key code
*/
3004 int replaced
; /* did we replace an existing hotkey?
*/
3005 unsigned int flags
; /* flags of replaced hotkey
*/
3006 unsigned int vkey
; /* virtual key code of replaced hotkey
*/
3010 /* Unregister a hotkey
*/
3011 @
REQ(unregister_hotkey
)
3012 user_handle_t window
; /* handle to the window
*/
3013 int id
; /* hotkey identifier
*/
3015 unsigned int flags
; /* flags of removed hotkey
*/
3016 unsigned int vkey
; /* virtual key code of removed hotkey
*/
3020 /* Attach (or detach
) thread inputs
*/
3021 @
REQ(attach_thread_input
)
3022 thread_id_t tid_from
; /* thread to be attached
*/
3023 thread_id_t tid_to
; /* thread to which tid_from should be attached
*/
3024 int attach
; /* is it an attach?
*/
3028 /* Get input data for a given thread
*/
3029 @
REQ(get_thread_input
)
3030 thread_id_t tid
; /* id of thread
*/
3032 user_handle_t focus
; /* handle to the focus window
*/
3033 user_handle_t capture
; /* handle to the capture window
*/
3034 user_handle_t active
; /* handle to the active window
*/
3035 user_handle_t foreground
; /* handle to the global foreground window
*/
3036 user_handle_t menu_owner
; /* handle to the menu owner
*/
3037 user_handle_t move_size
; /* handle to the moving
/resizing window
*/
3038 user_handle_t caret
; /* handle to the caret window
*/
3039 user_handle_t cursor
; /* handle to the cursor
*/
3040 int show_count
; /* cursor show count
*/
3041 rectangle_t rect
; /* caret rectangle
*/
3045 /* Get the time of the last input event
*/
3046 @
REQ(get_last_input_time
)
3052 /* Retrieve queue keyboard state for a given thread
*/
3054 thread_id_t tid
; /* id of thread
*/
3055 int key
; /* optional key code or
-1 */
3057 unsigned char state
; /* state of specified key
*/
3058 VARARG(keystate
,bytes
); /* state array for all the keys
*/
3061 /* Set queue keyboard state for a given thread
*/
3063 thread_id_t tid
; /* id of thread
*/
3064 int async
; /* whether to change the async state too
*/
3065 VARARG(keystate
,bytes
); /* state array for all the keys
*/
3068 /* Set the system foreground window
*/
3069 @
REQ(set_foreground_window
)
3070 user_handle_t handle
; /* handle to the foreground window
*/
3072 user_handle_t previous
; /* handle to the previous foreground window
*/
3073 int send_msg_old
; /* whether we have to send a msg to the old window
*/
3074 int send_msg_new
; /* whether we have to send a msg to the new window
*/
3077 /* Set the current thread focus window
*/
3078 @
REQ(set_focus_window
)
3079 user_handle_t handle
; /* handle to the focus window
*/
3081 user_handle_t previous
; /* handle to the previous focus window
*/
3084 /* Set the current thread active window
*/
3085 @
REQ(set_active_window
)
3086 user_handle_t handle
; /* handle to the active window
*/
3088 user_handle_t previous
; /* handle to the previous active window
*/
3091 /* Set the current thread capture window
*/
3092 @
REQ(set_capture_window
)
3093 user_handle_t handle
; /* handle to the capture window
*/
3094 unsigned int flags
; /* capture
flags (see below
) */
3096 user_handle_t previous
; /* handle to the previous capture window
*/
3097 user_handle_t full_handle
; /* full
32-bit handle of new capture window
*/
3099 #define CAPTURE_MENU
0x01 /* capture is for a menu
*/
3100 #define CAPTURE_MOVESIZE
0x02 /* capture is for moving
/resizing
*/
3103 /* Set the current thread caret window
*/
3104 @
REQ(set_caret_window
)
3105 user_handle_t handle
; /* handle to the caret window
*/
3106 int width
; /* caret width
*/
3107 int height
; /* caret height
*/
3109 user_handle_t previous
; /* handle to the previous caret window
*/
3110 rectangle_t old_rect
; /* previous caret rectangle
*/
3111 int old_hide
; /* previous hide count
*/
3112 int old_state
; /* previous caret
state (1=on
, 0=off
) */
3116 /* Set the current thread caret information
*/
3117 @
REQ(set_caret_info
)
3118 unsigned int flags
; /* caret
flags (see below
) */
3119 user_handle_t handle
; /* handle to the caret window
*/
3120 int x
; /* caret x position
*/
3121 int y
; /* caret y position
*/
3122 int hide
; /* increment for hide
count (can be negative to show it
) */
3123 int state
; /* caret
state (see below
) */
3125 user_handle_t full_handle
; /* handle to the current caret window
*/
3126 rectangle_t old_rect
; /* previous caret rectangle
*/
3127 int old_hide
; /* previous hide count
*/
3128 int old_state
; /* previous caret
state (1=on
, 0=off
) */
3130 #define SET_CARET_POS
0x01 /* set the caret position from x
,y
*/
3131 #define SET_CARET_HIDE
0x02 /* increment the caret hide count
*/
3132 #define SET_CARET_STATE
0x04 /* set the caret on
/off state
*/
3135 CARET_STATE_OFF
, /* off
*/
3136 CARET_STATE_ON
, /* on
*/
3137 CARET_STATE_TOGGLE
, /* toggle current state
*/
3138 CARET_STATE_ON_IF_MOVED
/* on if the position differs
, unchanged otherwise
*/
3142 /* Set a window hook
*/
3144 int id
; /* id of the hook
*/
3145 process_id_t pid
; /* id of process to set the hook into
*/
3146 thread_id_t tid
; /* id of thread to set the hook into
*/
3149 client_ptr_t proc
; /* hook procedure
*/
3151 int unicode
; /* is it a unicode hook?
*/
3152 VARARG(module
,unicode_str
); /* module name
*/
3154 user_handle_t handle
; /* handle to the hook
*/
3155 unsigned int active_hooks
; /* active hooks bitmap
*/
3159 /* Remove a window hook
*/
3161 user_handle_t handle
; /* handle to the hook
*/
3162 client_ptr_t proc
; /* hook procedure if handle is
0 */
3163 int id
; /* id of the hook if handle is
0 */
3165 unsigned int active_hooks
; /* active hooks bitmap
*/
3169 /* Start calling a hook chain
*/
3170 @
REQ(start_hook_chain
)
3171 int id
; /* id of the hook
*/
3172 int event
; /* signalled event
*/
3173 user_handle_t window
; /* handle to the event window
*/
3174 int object_id
; /* object id for out of context winevent
*/
3175 int child_id
; /* child id for out of context winevent
*/
3177 user_handle_t handle
; /* handle to the next hook
*/
3178 process_id_t pid
; /* process id for low
-level keyboard
/mouse hooks
*/
3179 thread_id_t tid
; /* thread id for low
-level keyboard
/mouse hooks
*/
3180 int unicode
; /* is it a unicode hook?
*/
3181 client_ptr_t proc
; /* hook procedure
*/
3182 unsigned int active_hooks
; /* active hooks bitmap
*/
3183 VARARG(module
,unicode_str
); /* module name
*/
3187 /* Finished calling a hook chain
*/
3188 @
REQ(finish_hook_chain
)
3189 int id
; /* id of the hook
*/
3193 /* Get the hook information
*/
3195 user_handle_t handle
; /* handle to the current hook
*/
3196 int get_next
; /* do we want info about current or next hook?
*/
3197 int event
; /* signalled event
*/
3198 user_handle_t window
; /* handle to the event window
*/
3199 int object_id
; /* object id for out of context winevent
*/
3200 int child_id
; /* child id for out of context winevent
*/
3202 user_handle_t handle
; /* handle to the hook
*/
3203 int id
; /* id of the hook
*/
3204 process_id_t pid
; /* process id for low
-level keyboard
/mouse hooks
*/
3205 thread_id_t tid
; /* thread id for low
-level keyboard
/mouse hooks
*/
3206 client_ptr_t proc
; /* hook procedure
*/
3207 int unicode
; /* is it a unicode hook?
*/
3208 VARARG(module
,unicode_str
); /* module name
*/
3212 /* Create a window class
*/
3214 int local
; /* is it a local class?
*/
3215 atom_t atom
; /* class atom
*/
3216 unsigned int style
; /* class style
*/
3217 mod_handle_t instance
; /* module instance
*/
3218 int extra
; /* number of extra class bytes
*/
3219 int win_extra
; /* number of window extra bytes
*/
3220 client_ptr_t client_ptr
; /* pointer to class in client address space
*/
3221 data_size_t name_offset
; /* base class name offset for specified atom
*/
3222 VARARG(name
,unicode_str
); /* class name
*/
3224 atom_t atom
; /* resulting class atom
*/
3228 /* Destroy a window class
*/
3230 atom_t atom
; /* class atom
*/
3231 mod_handle_t instance
; /* module instance
*/
3232 VARARG(name
,unicode_str
); /* class name
*/
3234 client_ptr_t client_ptr
; /* pointer to class in client address space
*/
3238 /* Set some information in a class
*/
3239 @
REQ(set_class_info
)
3240 user_handle_t window
; /* handle to the window
*/
3241 unsigned int flags
; /* flags for info to
set (see below
) */
3242 atom_t atom
; /* class atom
*/
3243 unsigned int style
; /* class style
*/
3244 int win_extra
; /* number of window extra bytes
*/
3245 mod_handle_t instance
; /* module instance
*/
3246 int extra_offset
; /* offset to set in extra bytes
*/
3247 data_size_t extra_size
; /* size to set in extra bytes
*/
3248 lparam_t extra_value
; /* value to set in extra bytes
*/
3250 atom_t old_atom
; /* previous class atom
*/
3251 atom_t base_atom
; /* base class atom
*/
3252 mod_handle_t old_instance
; /* previous module instance
*/
3253 lparam_t old_extra_value
; /* old value in extra bytes
*/
3254 unsigned int old_style
; /* previous class style
*/
3255 int old_extra
; /* previous number of class extra bytes
*/
3256 int old_win_extra
; /* previous number of window extra bytes
*/
3258 #define SET_CLASS_ATOM
0x0001
3259 #define SET_CLASS_STYLE
0x0002
3260 #define SET_CLASS_WINEXTRA
0x0004
3261 #define SET_CLASS_INSTANCE
0x0008
3262 #define SET_CLASS_EXTRA
0x0010
3265 /* Open the clipboard
*/
3266 @
REQ(open_clipboard
)
3267 user_handle_t window
; /* clipboard window
*/
3269 user_handle_t owner
; /* current clipboard owner
*/
3273 /* Close the clipboard
*/
3274 @
REQ(close_clipboard
)
3276 user_handle_t viewer
; /* first clipboard viewer
*/
3277 user_handle_t owner
; /* current clipboard owner
*/
3281 /* Empty the clipboard and grab ownership
*/
3282 @
REQ(empty_clipboard
)
3286 /* Add a data format to the clipboard
*/
3287 @
REQ(set_clipboard_data
)
3288 unsigned int format
; /* clipboard format of the data
*/
3289 unsigned int lcid
; /* locale id to use for synthesizing text formats
*/
3290 VARARG(data
,bytes
); /* data contents
*/
3292 unsigned int seqno
; /* sequence number for the set data
*/
3296 /* Fetch a data format from the clipboard
*/
3297 @
REQ(get_clipboard_data
)
3298 unsigned int format
; /* clipboard format of the data
*/
3299 int render
; /* will we try to render it if missing?
*/
3300 int cached
; /* do we already have it in the client
-side cache?
*/
3301 unsigned int seqno
; /* sequence number for the data in the cache
*/
3303 unsigned int from
; /* for synthesized data
, format to generate it from
*/
3304 user_handle_t owner
; /* clipboard owner for delayed
-rendered formats
*/
3305 unsigned int seqno
; /* sequence number for the originally set data
*/
3306 data_size_t total
; /* total data size
*/
3307 VARARG(data
,bytes
); /* data contents
*/
3311 /* Retrieve a list of available formats
*/
3312 @
REQ(get_clipboard_formats
)
3313 unsigned int format
; /* specific format to query
, return all if
0 */
3315 unsigned int count
; /* count of available formats
*/
3316 VARARG(formats
,uints
); /* array of available formats
*/
3320 /* Retrieve the next available format
*/
3321 @
REQ(enum_clipboard_formats
)
3322 unsigned int previous
; /* previous format
, or first if
0 */
3324 unsigned int format
; /* next format
*/
3328 /* Release ownership of the clipboard
*/
3329 @
REQ(release_clipboard
)
3330 user_handle_t owner
; /* clipboard owner to release
*/
3332 user_handle_t viewer
; /* first clipboard viewer
*/
3333 user_handle_t owner
; /* current clipboard owner
*/
3337 /* Get clipboard information
*/
3338 @
REQ(get_clipboard_info
)
3340 user_handle_t window
; /* clipboard window
*/
3341 user_handle_t owner
; /* clipboard owner
*/
3342 user_handle_t viewer
; /* clipboard viewer
*/
3343 unsigned int seqno
; /* current sequence number
*/
3347 /* Set the clipboard viewer window
*/
3348 @
REQ(set_clipboard_viewer
)
3349 user_handle_t viewer
; /* clipboard viewer
*/
3350 user_handle_t previous
; /* if non
-zero
, check that this was the previous viewer
*/
3352 user_handle_t old_viewer
; /* previous clipboard viewer
*/
3353 user_handle_t owner
; /* clipboard owner
*/
3357 /* Add a clipboard listener window
*/
3358 @
REQ(add_clipboard_listener
)
3359 user_handle_t window
; /* clipboard listener window
*/
3363 /* Remove a clipboard listener window
*/
3364 @
REQ(remove_clipboard_listener
)
3365 user_handle_t window
; /* clipboard listener window
*/
3369 /* Open a security token
*/
3371 obj_handle_t handle
; /* handle to the thread or process
*/
3372 unsigned int access
; /* access rights to the new token
*/
3373 unsigned int attributes
;/* object attributes
*/
3374 unsigned int flags
; /* flags (see below
) */
3376 obj_handle_t token
; /* handle to the token
*/
3378 #define OPEN_TOKEN_THREAD
1
3379 #define OPEN_TOKEN_AS_SELF
2
3382 /* Set
/get the global windows
*/
3383 @
REQ(set_global_windows
)
3384 unsigned int flags
; /* flags for fields to
set (see below
) */
3385 user_handle_t shell_window
; /* handle to the new shell window
*/
3386 user_handle_t shell_listview
; /* handle to the new shell listview window
*/
3387 user_handle_t progman_window
; /* handle to the new program manager window
*/
3388 user_handle_t taskman_window
; /* handle to the new task manager window
*/
3390 user_handle_t old_shell_window
; /* handle to the shell window
*/
3391 user_handle_t old_shell_listview
; /* handle to the shell listview window
*/
3392 user_handle_t old_progman_window
; /* handle to the new program manager window
*/
3393 user_handle_t old_taskman_window
; /* handle to the new task manager window
*/
3395 #define SET_GLOBAL_SHELL_WINDOWS
0x01 /* set both main shell and listview windows
*/
3396 #define SET_GLOBAL_PROGMAN_WINDOW
0x02
3397 #define SET_GLOBAL_TASKMAN_WINDOW
0x04
3399 /* Adjust the privileges held by a token
*/
3400 @
REQ(adjust_token_privileges
)
3401 obj_handle_t handle
; /* handle to the token
*/
3402 int disable_all
; /* disable all privileges?
*/
3403 int get_modified_state
; /* get modified privileges?
*/
3404 VARARG(privileges
,LUID_AND_ATTRIBUTES
); /* privileges to enable
/disable
/remove
*/
3406 unsigned int len
; /* total length in bytes required to store token privileges
*/
3407 VARARG(privileges
,LUID_AND_ATTRIBUTES
); /* modified privileges
*/
3410 /* Retrieves the set of privileges held by or available to a token
*/
3411 @
REQ(get_token_privileges
)
3412 obj_handle_t handle
; /* handle to the token
*/
3414 unsigned int len
; /* total length in bytes required to store token privileges
*/
3415 VARARG(privileges
,LUID_AND_ATTRIBUTES
); /* privileges held by or available to a token
*/
3418 /* Check the token has the required privileges
*/
3419 @
REQ(check_token_privileges
)
3420 obj_handle_t handle
; /* handle to the token
*/
3421 int all_required
; /* are all the privileges required for the check to succeed?
*/
3422 VARARG(privileges
,LUID_AND_ATTRIBUTES
); /* privileges to check
*/
3424 int has_privileges
; /* does the token have the required privileges?
*/
3425 VARARG(privileges
,LUID_AND_ATTRIBUTES
); /* privileges held by or available to a token
*/
3428 @
REQ(duplicate_token
)
3429 obj_handle_t handle
; /* handle to the token to duplicate
*/
3430 unsigned int access
; /* access rights to the new token
*/
3431 int primary
; /* is the new token to be a primary one?
*/
3432 int impersonation_level
; /* impersonation level of the new token
*/
3433 VARARG(objattr
,object_attributes
); /* object attributes
*/
3435 obj_handle_t new_handle
; /* duplicated handle
*/
3439 obj_handle_t handle
; /* handle to the token
*/
3440 unsigned int desired_access
; /* desired access to the object
*/
3441 unsigned int mapping_read
; /* mapping from generic read to specific rights
*/
3442 unsigned int mapping_write
; /* mapping from generic write to specific rights
*/
3443 unsigned int mapping_execute
; /* mapping from generic execute to specific rights
*/
3444 unsigned int mapping_all
; /* mapping from generic all to specific rights
*/
3445 VARARG(sd
,security_descriptor
); /* security descriptor to check
*/
3447 unsigned int access_granted
; /* access rights actually granted
*/
3448 unsigned int access_status
; /* was access granted?
*/
3449 unsigned int privileges_len
; /* length needed to store privileges
*/
3450 VARARG(privileges
,LUID_AND_ATTRIBUTES
); /* privileges used during access check
*/
3454 obj_handle_t handle
; /* handle to the token
*/
3455 unsigned int which_sid
; /* which SID to retrieve from the token
*/
3457 data_size_t sid_len
; /* length needed to store sid
*/
3458 VARARG(sid
,SID
); /* the sid specified by which_sid from the token
*/
3461 @
REQ(get_token_groups
)
3462 obj_handle_t handle
; /* handle to the token
*/
3464 data_size_t user_len
; /* length needed to store user
*/
3465 VARARG(user
,token_groups
); /* groups the token
's user belongs to */
3468 @REQ(get_token_default_dacl)
3469 obj_handle_t handle; /* handle to the token */
3471 data_size_t acl_len; /* length needed to store access control list */
3472 VARARG(acl,ACL); /* access control list */
3475 @REQ(set_token_default_dacl)
3476 obj_handle_t handle; /* handle to the token */
3477 VARARG(acl,ACL); /* default dacl to set */
3480 @REQ(set_security_object)
3481 obj_handle_t handle; /* handle to the object */
3482 unsigned int security_info; /* which parts of security descriptor to set */
3483 VARARG(sd,security_descriptor); /* security descriptor to set */
3486 @REQ(get_security_object)
3487 obj_handle_t handle; /* handle to the object */
3488 unsigned int security_info; /* which parts of security descriptor to get */
3490 unsigned int sd_len; /* buffer size needed for sd */
3491 VARARG(sd,security_descriptor); /* retrieved security descriptor */
3498 obj_handle_t handle;
3499 unsigned int access;
3502 /* Return a list of all opened handles */
3503 @REQ(get_system_handles)
3505 unsigned int count; /* number of handles */
3506 VARARG(data,handle_infos); /* array of handle_infos */
3510 /* Create a mailslot */
3511 @REQ(create_mailslot)
3512 unsigned int access; /* wanted access rights */
3513 timeout_t read_timeout;
3514 unsigned int max_msgsize;
3515 VARARG(objattr,object_attributes); /* object attributes */
3517 obj_handle_t handle; /* handle to the mailslot */
3521 /* Set mailslot information */
3522 @REQ(set_mailslot_info)
3523 obj_handle_t handle; /* handle to the mailslot */
3524 timeout_t read_timeout;
3527 timeout_t read_timeout;
3528 unsigned int max_msgsize;
3530 #define MAILSLOT_SET_READ_TIMEOUT 1
3533 /* Create a directory object */
3534 @REQ(create_directory)
3535 unsigned int access; /* access flags */
3536 VARARG(objattr,object_attributes); /* object attributes */
3538 obj_handle_t handle; /* handle to the directory */
3542 /* Open a directory object */
3543 @REQ(open_directory)
3544 unsigned int access; /* access flags */
3545 unsigned int attributes; /* object attributes */
3546 obj_handle_t rootdir; /* root directory */
3547 VARARG(directory_name,unicode_str); /* Directory name */
3549 obj_handle_t handle; /* handle to the directory */
3553 /* Get a directory entry by index */
3554 @REQ(get_directory_entry)
3555 obj_handle_t handle; /* handle to the directory */
3556 unsigned int index; /* entry index */
3558 data_size_t name_len; /* length of the entry name in bytes */
3559 VARARG(name,unicode_str,name_len); /* entry name */
3560 VARARG(type,unicode_str); /* entry type */
3564 /* Create a symbolic link object */
3565 @REQ(create_symlink)
3566 unsigned int access; /* access flags */
3567 VARARG(objattr,object_attributes); /* object attributes */
3568 VARARG(target_name,unicode_str); /* target name */
3570 obj_handle_t handle; /* handle to the symlink */
3574 /* Open a symbolic link object */
3576 unsigned int access; /* access flags */
3577 unsigned int attributes; /* object attributes */
3578 obj_handle_t rootdir; /* root directory */
3579 VARARG(name,unicode_str); /* symlink name */
3581 obj_handle_t handle; /* handle to the symlink */
3585 /* Query a symbolic link object */
3587 obj_handle_t handle; /* handle to the symlink */
3589 data_size_t total; /* total needed size for name */
3590 VARARG(target_name,unicode_str); /* target name */
3594 /* Query basic object information */
3595 @REQ(get_object_info)
3596 obj_handle_t handle; /* handle to the object */
3598 unsigned int access; /* granted access mask */
3599 unsigned int ref_count; /* object ref count */
3600 unsigned int handle_count; /* object handle count */
3601 data_size_t total; /* total needed size for name */
3602 VARARG(name,unicode_str); /* object name */
3606 /* Query object type name information */
3607 @REQ(get_object_type)
3608 obj_handle_t handle; /* handle to the object */
3610 data_size_t total; /* needed size for type name */
3611 VARARG(type,unicode_str); /* type name */
3615 /* Unlink a named object */
3617 obj_handle_t handle; /* handle to the object */
3621 /* Query the impersonation level of an impersonation token */
3622 @REQ(get_token_impersonation_level)
3623 obj_handle_t handle; /* handle to the object */
3625 int impersonation_level; /* impersonation level of the impersonation token */
3628 /* Allocate a locally-unique identifier */
3629 @REQ(allocate_locally_unique_id)
3635 /* Create a device manager */
3636 @REQ(create_device_manager)
3637 unsigned int access; /* wanted access rights */
3638 unsigned int attributes; /* object attributes */
3640 obj_handle_t handle; /* handle to the device */
3644 /* Create a device */
3646 obj_handle_t rootdir; /* root directory */
3647 client_ptr_t user_ptr; /* opaque ptr for use by client */
3648 obj_handle_t manager; /* device manager */
3649 VARARG(name,unicode_str); /* object name */
3653 /* Delete a device */
3655 obj_handle_t manager; /* handle to the device manager */
3656 client_ptr_t device; /* pointer to the device */
3660 /* Retrieve the next pending device irp request */
3661 @REQ(get_next_device_request)
3662 obj_handle_t manager; /* handle to the device manager */
3663 obj_handle_t prev; /* handle to the previous irp */
3664 unsigned int status; /* status of the previous irp */
3665 client_ptr_t user_ptr; /* user pointer of the previous irp */
3667 irp_params_t params; /* irp parameters */
3668 obj_handle_t next; /* handle to the next irp */
3669 thread_id_t client_tid; /* tid of thread calling irp */
3670 client_ptr_t client_thread; /* pointer to thread object of calling irp */
3671 data_size_t in_size; /* total needed input size */
3672 VARARG(next_data,bytes); /* input data of the next irp */
3676 /* Get kernel pointer from server object */
3677 @REQ(get_kernel_object_ptr)
3678 obj_handle_t manager; /* handle to the device manager */
3679 obj_handle_t handle; /* object handle */
3681 client_ptr_t user_ptr; /* kernel object pointer */
3685 /* Associate kernel pointer with server object */
3686 @REQ(set_kernel_object_ptr)
3687 obj_handle_t manager; /* handle to the device manager */
3688 obj_handle_t handle; /* object handle */
3689 client_ptr_t user_ptr; /* kernel object pointer */
3693 /* Grab server object reference from kernel object pointer */
3694 @REQ(grab_kernel_object)
3695 obj_handle_t manager; /* handle to the device manager */
3696 client_ptr_t user_ptr; /* kernel object pointer */
3700 /* Release server object reference from kernel object pointer */
3701 @REQ(release_kernel_object)
3702 obj_handle_t manager; /* handle to the device manager */
3703 client_ptr_t user_ptr; /* kernel object pointer */
3707 /* Get handle from kernel object pointer */
3708 @REQ(get_kernel_object_handle)
3709 obj_handle_t manager; /* handle to the device manager */
3710 client_ptr_t user_ptr; /* kernel object pointer */
3711 unsigned int access; /* wanted access rights */
3713 obj_handle_t handle; /* kernel object handle */
3717 /* Make the current process a system process */
3718 @REQ(make_process_system)
3720 obj_handle_t event; /* event signaled when all user processes have exited */
3724 /* Get detailed fixed-size information about a token */
3725 @REQ(get_token_statistics)
3726 obj_handle_t handle; /* handle to the object */
3728 luid_t token_id; /* locally-unique identifier of the token */
3729 luid_t modified_id; /* locally-unique identifier of the modified version of the token */
3730 int primary; /* is the token primary or impersonation? */
3731 int impersonation_level; /* level of impersonation */
3732 int group_count; /* the number of groups the token is a member of */
3733 int privilege_count; /* the number of privileges the token has */
3737 /* Create I/O completion port */
3738 @REQ(create_completion)
3739 unsigned int access; /* desired access to a port */
3740 unsigned int concurrent; /* max number of concurrent active threads */
3741 VARARG(objattr,object_attributes); /* object attributes */
3743 obj_handle_t handle; /* port handle */
3747 /* Open I/O completion port */
3748 @REQ(open_completion)
3749 unsigned int access; /* desired access to a port */
3750 unsigned int attributes; /* object attributes */
3751 obj_handle_t rootdir; /* root directory */
3752 VARARG(filename,unicode_str); /* port name */
3754 obj_handle_t handle; /* port handle */
3758 /* add completion to completion port */
3759 @REQ(add_completion)
3760 obj_handle_t handle; /* port handle */
3761 apc_param_t ckey; /* completion key */
3762 apc_param_t cvalue; /* completion value */
3763 apc_param_t information; /* IO_STATUS_BLOCK Information */
3764 unsigned int status; /* completion result */
3768 /* get completion from completion port queue */
3769 @REQ(remove_completion)
3770 obj_handle_t handle; /* port handle */
3772 apc_param_t ckey; /* completion key */
3773 apc_param_t cvalue; /* completion value */
3774 apc_param_t information; /* IO_STATUS_BLOCK Information */
3775 unsigned int status; /* completion result */
3779 /* get completion queue depth */
3780 @REQ(query_completion)
3781 obj_handle_t handle; /* port handle */
3783 unsigned int depth; /* completion queue depth */
3787 /* associate object with completion port */
3788 @REQ(set_completion_info)
3789 obj_handle_t handle; /* object handle */
3790 apc_param_t ckey; /* completion key */
3791 obj_handle_t chandle; /* port handle */
3795 /* check for associated completion and push msg */
3796 @REQ(add_fd_completion)
3797 obj_handle_t handle; /* async' object
*/
3798 apc_param_t cvalue
; /* completion value
*/
3799 apc_param_t information
; /* IO_STATUS_BLOCK Information
*/
3800 unsigned int status
; /* completion status
*/
3801 int async
; /* completion is an async result
*/
3805 /* set fd completion information
*/
3806 @
REQ(set_fd_completion_mode
)
3807 obj_handle_t handle
; /* handle to a file or directory
*/
3808 unsigned int flags
; /* completion notification flags
*/
3812 /* set fd disposition information
*/
3813 @
REQ(set_fd_disp_info
)
3814 obj_handle_t handle
; /* handle to a file or directory
*/
3815 int unlink
; /* whether to unlink file on close
*/
3819 /* set fd name information
*/
3820 @
REQ(set_fd_name_info
)
3821 obj_handle_t handle
; /* handle to a file or directory
*/
3822 obj_handle_t rootdir
; /* root directory
*/
3823 int link
; /* link instead of renaming
*/
3824 int replace
; /* replace an existing file?
*/
3825 VARARG(filename
,string
); /* new file name
*/
3829 /* Retrieve layered info for a window
*/
3830 @
REQ(get_window_layered_info
)
3831 user_handle_t handle
; /* handle to the window
*/
3833 unsigned int color_key
; /* color key
*/
3834 unsigned int alpha
; /* alpha (0.
.255) */
3835 unsigned int flags
; /* LWA_
* flags
*/
3839 /* Set layered info for a window
*/
3840 @
REQ(set_window_layered_info
)
3841 user_handle_t handle
; /* handle to the window
*/
3842 unsigned int color_key
; /* color key
*/
3843 unsigned int alpha
; /* alpha (0.
.255) */
3844 unsigned int flags
; /* LWA_
* flags
*/
3848 /* Allocate an arbitrary user handle
*/
3849 @
REQ(alloc_user_handle
)
3851 user_handle_t handle
; /* allocated handle
*/
3855 /* Free an arbitrary user handle
*/
3856 @
REQ(free_user_handle
)
3857 user_handle_t handle
; /* handle to free
*/
3861 /* Set
/get the current cursor
*/
3863 unsigned int flags
; /* flags for fields to
set (see below
) */
3864 user_handle_t handle
; /* handle to the cursor
*/
3865 int show_count
; /* show count increment
/decrement
*/
3866 int x
; /* cursor position
*/
3868 rectangle_t clip
; /* cursor clip rectangle
*/
3869 unsigned int clip_msg
; /* message to post on cursor clip changes
*/
3871 user_handle_t prev_handle
; /* previous handle
*/
3872 int prev_count
; /* previous show count
*/
3873 int prev_x
; /* previous position
*/
3875 int new_x
; /* new position
*/
3877 rectangle_t new_clip
; /* new clip rectangle
*/
3878 unsigned int last_change
; /* time of last position change
*/
3880 #define SET_CURSOR_HANDLE
0x01
3881 #define SET_CURSOR_COUNT
0x02
3882 #define SET_CURSOR_POS
0x04
3883 #define SET_CURSOR_CLIP
0x08
3884 #define SET_CURSOR_NOCLIP
0x10
3887 /* Modify the list of registered rawinput devices
*/
3888 @
REQ(update_rawinput_devices
)
3889 VARARG(devices
,rawinput_devices
);
3893 /* Create a new job object
*/
3895 unsigned int access
; /* wanted access rights
*/
3896 VARARG(objattr
,object_attributes
); /* object attributes
*/
3898 obj_handle_t handle
; /* handle to the job
*/
3902 /* Open a job object
*/
3904 unsigned int access
; /* wanted access rights
*/
3905 unsigned int attributes
; /* object attributes
*/
3906 obj_handle_t rootdir
; /* root directory
*/
3907 VARARG(name
,unicode_str
); /* object name
*/
3909 obj_handle_t handle
; /* handle to the job
*/
3913 /* Assign a job object to a process
*/
3915 obj_handle_t job
; /* handle to the job
*/
3916 obj_handle_t process
; /* handle to the process
*/
3920 /* Check if a process is associated with a job
*/
3921 @
REQ(process_in_job
)
3922 obj_handle_t job
; /* handle to the job
*/
3923 obj_handle_t process
; /* handle to the process
*/
3927 /* Set limit flags on a job
*/
3928 @
REQ(set_job_limits
)
3929 obj_handle_t handle
; /* handle to the job
*/
3930 unsigned int limit_flags
; /* new limit flags
*/
3934 /* Set new completion port for a job
*/
3935 @
REQ(set_job_completion_port
)
3936 obj_handle_t job
; /* handle to the job
*/
3937 obj_handle_t port
; /* handle to the completion port
*/
3938 client_ptr_t key
; /* key to send with completion messages
*/
3942 /* Retrieve information about a job
*/
3944 obj_handle_t handle
; /* handle to the job
*/
3946 int total_processes
; /* total count of processes
*/
3947 int active_processes
; /* count of running processes
*/
3951 /* Terminate all processes associated with the job
*/
3953 obj_handle_t handle
; /* handle to the job
*/
3954 int status
; /* process exit code
*/
3958 /* Suspend a process
*/
3959 @
REQ(suspend_process
)
3960 obj_handle_t handle
; /* process handle
*/
3964 /* Resume a process
*/
3965 @
REQ(resume_process
)
3966 obj_handle_t handle
; /* process handle
*/