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 unsigned int zero_bits_64
; /* 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 unsigned int alloc_type
; /* allocation type
*/
564 unsigned short zero_bits_64
; /* number of zero high bits
*/
565 unsigned short 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 int suspend
; /* suspended thread?
*/
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 thread_id_t tid
; /* thread id
*/
665 obj_handle_t handle
; /* handle to new thread
*/
669 enum apc_type type
; /* APC_BREAK_PROCESS
*/
670 unsigned int status
; /* status returned by call
*/
689 enum irp_type type
; /* irp call type
*/
692 enum irp_type type
; /* IRP_CALL_CREATE
*/
693 unsigned int access
; /* access rights
*/
694 unsigned int sharing
; /* sharing flags
*/
695 unsigned int options
; /* file options
*/
696 client_ptr_t device
; /* opaque ptr for the device
*/
697 obj_handle_t file
; /* file handle
*/
701 enum irp_type type
; /* IRP_CALL_CLOSE
*/
703 client_ptr_t file
; /* opaque ptr for the file object
*/
707 enum irp_type type
; /* IRP_CALL_READ
*/
708 unsigned int key
; /* driver key
*/
709 data_size_t out_size
; /* needed output size
*/
711 client_ptr_t file
; /* opaque ptr for the file object
*/
712 file_pos_t pos
; /* file position
*/
716 enum irp_type type
; /* IRP_CALL_WRITE
*/
717 unsigned int key
; /* driver key
*/
718 client_ptr_t file
; /* opaque ptr for the file object
*/
719 file_pos_t pos
; /* file position
*/
723 enum irp_type type
; /* IRP_CALL_FLUSH
*/
725 client_ptr_t file
; /* opaque ptr for the file object
*/
729 enum irp_type type
; /* IRP_CALL_IOCTL
*/
730 ioctl_code_t code
; /* ioctl code
*/
731 data_size_t out_size
; /* needed output size
*/
733 client_ptr_t file
; /* opaque ptr for the file object
*/
737 enum irp_type type
; /* IRP_CALL_FREE
*/
739 client_ptr_t obj
; /* opaque ptr for the freed object
*/
743 enum irp_type type
; /* IRP_CALL_CANCEL
*/
745 client_ptr_t irp
; /* opaque ptr for canceled irp
*/
749 /* information about a PE image mapping
, roughly equivalent to SECTION_IMAGE_INFORMATION
*/
753 client_ptr_t entry_point
;
755 mem_size_t stack_size
;
756 mem_size_t stack_commit
;
757 unsigned int zerobits
;
758 unsigned int subsystem
;
759 unsigned short subsystem_low
;
760 unsigned short subsystem_high
;
762 unsigned short image_charact
;
763 unsigned short dll_charact
;
764 unsigned short machine
;
765 unsigned char contains_code
;
766 unsigned char image_flags
;
767 unsigned int loader_flags
;
768 unsigned int header_size
;
769 unsigned int file_size
;
770 unsigned int checksum
;
774 #define IMAGE_FLAGS_ComPlusNativeReady
0x01
775 #define IMAGE_FLAGS_ComPlusILOnly
0x02
776 #define IMAGE_FLAGS_ImageDynamicallyRelocated
0x04
777 #define IMAGE_FLAGS_ImageMappedFlat
0x08
778 #define IMAGE_FLAGS_BaseBelow4gb
0x10
779 #define IMAGE_FLAGS_WineBuiltin
0x40
780 #define IMAGE_FLAGS_WineFakeDll
0x80
782 struct rawinput_device
784 unsigned short usage_page
;
785 unsigned short usage
;
787 user_handle_t target
;
790 /****************************************************************/
791 /* Request declarations
*/
793 /* Create a new process from the context of the parent
*/
795 obj_handle_t parent_process
; /* parent process
*/
796 int inherit_all
; /* inherit all handles from parent
*/
797 unsigned int create_flags
; /* creation flags
*/
798 int socket_fd
; /* file descriptor for process socket
*/
799 obj_handle_t exe_file
; /* file handle for main exe
*/
800 unsigned int access
; /* access rights for process object
*/
801 client_cpu_t cpu
; /* CPU that the new process will use
*/
802 data_size_t info_size
; /* size of startup info
*/
803 VARARG(objattr
,object_attributes
); /* object attributes
*/
804 VARARG(info
,startup_info
,info_size
); /* startup information
*/
805 VARARG(env
,unicode_str
); /* environment for new process
*/
807 obj_handle_t info
; /* new process info handle
*/
808 process_id_t pid
; /* process id
*/
809 obj_handle_t handle
; /* process
handle (in the current process
) */
813 /* Execute a process
, replacing the current one
*/
815 int socket_fd
; /* file descriptor for process socket
*/
816 client_cpu_t cpu
; /* CPU that the new process will use
*/
820 /* Retrieve information about a newly started process
*/
821 @
REQ(get_new_process_info
)
822 obj_handle_t info
; /* info handle returned from new_process_request
*/
824 int success
; /* did the process start successfully?
*/
825 int exit_code
; /* process exit code if failed
*/
829 /* Create a new thread
*/
831 obj_handle_t process
; /* process in which to create thread
*/
832 unsigned int access
; /* wanted access rights
*/
833 int suspend
; /* new thread should be suspended on creation
*/
834 int request_fd
; /* fd for request pipe
*/
835 VARARG(objattr
,object_attributes
); /* object attributes
*/
837 thread_id_t tid
; /* thread id
*/
838 obj_handle_t handle
; /* thread
handle (in the current process
) */
842 /* Retrieve the new process startup info
*/
843 @
REQ(get_startup_info
)
845 data_size_t info_size
; /* size of startup info
*/
846 VARARG(info
,startup_info
,info_size
); /* startup information
*/
847 VARARG(env
,unicode_str
); /* environment
*/
851 /* Signal the end of the process initialization
*/
852 @
REQ(init_process_done
)
853 int gui
; /* is it a GUI process?
*/
854 mod_handle_t module
; /* main module base address
*/
855 client_ptr_t ldt_copy
; /* address of LDT
copy (in thread address space
) */
856 client_ptr_t entry
; /* process entry point
*/
857 obj_handle_t usd_handle
; /* USD mapping handle
*/
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 thread_id_t tid_in; /* thread id (optional) */
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 data_size_t desc_len; /* description length in bytes */
960 VARARG(desc,unicode_str); /* description string */
964 /* Retrieve information about thread times */
965 @REQ(get_thread_times)
966 obj_handle_t handle; /* thread handle */
968 timeout_t creation_time; /* thread creation time */
969 timeout_t exit_time; /* thread exit time */
973 /* Set a thread information */
974 @REQ(set_thread_info)
975 obj_handle_t handle; /* thread handle */
976 int mask; /* setting mask (see below) */
977 int priority; /* priority class */
978 affinity_t affinity; /* affinity mask */
979 client_ptr_t entry_point; /* thread entry point */
980 obj_handle_t token; /* impersonation token */
981 VARARG(desc,unicode_str); /* description string */
983 #define SET_THREAD_INFO_PRIORITY 0x01
984 #define SET_THREAD_INFO_AFFINITY 0x02
985 #define SET_THREAD_INFO_TOKEN 0x04
986 #define SET_THREAD_INFO_ENTRYPOINT 0x08
987 #define SET_THREAD_INFO_DESCRIPTION 0x10
990 /* Retrieve information about a module */
992 obj_handle_t handle; /* process handle */
993 mod_handle_t base_address; /* base address of module */
995 client_ptr_t entry_point;
996 data_size_t filename_len; /* buffer len in bytes required to store filename */
997 VARARG(filename,unicode_str); /* file name of module */
1001 /* Suspend a thread */
1002 @REQ(suspend_thread)
1003 obj_handle_t handle; /* thread handle */
1005 int count; /* new suspend count */
1009 /* Resume a thread */
1011 obj_handle_t handle; /* thread handle */
1013 int count; /* new suspend count */
1017 /* Notify the server that a dll has been loaded */
1019 data_size_t dbg_offset; /* debug info offset */
1020 mod_handle_t base; /* base address */
1021 client_ptr_t name; /* ptr to ptr to name (in process addr space) */
1022 data_size_t dbg_size; /* debug info size */
1023 VARARG(filename,unicode_str); /* file name of dll */
1027 /* Notify the server that a dll is being unloaded */
1029 mod_handle_t base; /* base address */
1033 /* Queue an APC for a thread or process */
1035 obj_handle_t handle; /* thread or process handle */
1036 apc_call_t call; /* call arguments */
1038 obj_handle_t handle; /* APC handle */
1039 int self; /* run APC in caller itself? */
1043 /* Get the result of an APC call */
1044 @REQ(get_apc_result)
1045 obj_handle_t handle; /* handle to the APC */
1047 apc_result_t result; /* result of the APC */
1051 /* Close a handle for the current process */
1053 obj_handle_t handle; /* handle to close */
1057 /* Set a handle information */
1058 @REQ(set_handle_info)
1059 obj_handle_t handle; /* handle we are interested in */
1060 int flags; /* new handle flags */
1061 int mask; /* mask for flags to set */
1063 int old_flags; /* old flag value */
1067 /* Duplicate a handle */
1069 obj_handle_t src_process; /* src process handle */
1070 obj_handle_t src_handle; /* src handle to duplicate */
1071 obj_handle_t dst_process; /* dst process handle */
1072 unsigned int access; /* wanted access rights */
1073 unsigned int attributes; /* object attributes */
1074 unsigned int options; /* duplicate options (see below) */
1076 obj_handle_t handle; /* duplicated handle in dst process */
1077 int self; /* is the source the current process? */
1078 int closed; /* whether the source handle has been closed */
1080 #define DUP_HANDLE_CLOSE_SOURCE DUPLICATE_CLOSE_SOURCE
1081 #define DUP_HANDLE_SAME_ACCESS DUPLICATE_SAME_ACCESS
1082 #define DUP_HANDLE_MAKE_GLOBAL 0x80000000 /* Not a Windows flag */
1085 /* Open a handle to a process */
1087 process_id_t pid; /* process id to open */
1088 unsigned int access; /* wanted access rights */
1089 unsigned int attributes; /* object attributes */
1091 obj_handle_t handle; /* handle to the process */
1095 /* Open a handle to a thread */
1097 thread_id_t tid; /* thread id to open */
1098 unsigned int access; /* wanted access rights */
1099 unsigned int attributes; /* object attributes */
1101 obj_handle_t handle; /* handle to the thread */
1105 /* Wait for handles */
1107 int flags; /* wait flags (see below) */
1108 client_ptr_t cookie; /* magic cookie to return to client */
1109 abstime_t timeout; /* timeout */
1110 data_size_t size; /* size of select_op */
1111 obj_handle_t prev_apc; /* handle to previous APC */
1112 VARARG(result,apc_result); /* result of previous APC */
1113 VARARG(data,select_op,size); /* operation-specific data */
1114 VARARG(context,context); /* suspend context */
1116 apc_call_t call; /* APC call arguments */
1117 obj_handle_t apc_handle; /* handle to next APC */
1118 VARARG(context,context); /* suspend context */
1120 #define SELECT_ALERTABLE 1
1121 #define SELECT_INTERRUPTIBLE 2
1124 /* Create an event */
1126 unsigned int access; /* wanted access rights */
1127 int manual_reset; /* manual reset event */
1128 int initial_state; /* initial state of the event */
1129 VARARG(objattr,object_attributes); /* object attributes */
1131 obj_handle_t handle; /* handle to the event */
1134 /* Event operation */
1136 obj_handle_t handle; /* handle to event */
1137 int op; /* event operation (see below) */
1139 int state; /* previous state */
1141 enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT };
1144 obj_handle_t handle; /* handle to event */
1146 int manual_reset; /* manual reset event */
1147 int state; /* current state of the event */
1152 unsigned int access; /* wanted access rights */
1153 unsigned int attributes; /* object attributes */
1154 obj_handle_t rootdir; /* root directory */
1155 VARARG(name,unicode_str); /* object name */
1157 obj_handle_t handle; /* handle to the event */
1161 /* Create a keyed event */
1162 @REQ(create_keyed_event)
1163 unsigned int access; /* wanted access rights */
1164 VARARG(objattr,object_attributes); /* object attributes */
1166 obj_handle_t handle; /* handle to the event */
1169 /* Open a keyed event */
1170 @REQ(open_keyed_event)
1171 unsigned int access; /* wanted access rights */
1172 unsigned int attributes; /* object attributes */
1173 obj_handle_t rootdir; /* root directory */
1174 VARARG(name,unicode_str); /* object name */
1176 obj_handle_t handle; /* handle to the event */
1180 /* Create a mutex */
1182 unsigned int access; /* wanted access rights */
1183 int owned; /* initially owned? */
1184 VARARG(objattr,object_attributes); /* object attributes */
1186 obj_handle_t handle; /* handle to the mutex */
1190 /* Release a mutex */
1192 obj_handle_t handle; /* handle to the mutex */
1194 unsigned int prev_count; /* value of internal counter, before release */
1200 unsigned int access; /* wanted access rights */
1201 unsigned int attributes; /* object attributes */
1202 obj_handle_t rootdir; /* root directory */
1203 VARARG(name,unicode_str); /* object name */
1205 obj_handle_t handle; /* handle to the mutex */
1211 obj_handle_t handle; /* handle to mutex */
1213 unsigned int count; /* current count of mutex */
1214 int owned; /* true if owned by current thread */
1215 int abandoned; /* true if abandoned */
1219 /* Create a semaphore */
1220 @REQ(create_semaphore)
1221 unsigned int access; /* wanted access rights */
1222 unsigned int initial; /* initial count */
1223 unsigned int max; /* maximum count */
1224 VARARG(objattr,object_attributes); /* object attributes */
1226 obj_handle_t handle; /* handle to the semaphore */
1230 /* Release a semaphore */
1231 @REQ(release_semaphore)
1232 obj_handle_t handle; /* handle to the semaphore */
1233 unsigned int count; /* count to add to semaphore */
1235 unsigned int prev_count; /* previous semaphore count */
1238 @REQ(query_semaphore)
1239 obj_handle_t handle; /* handle to the semaphore */
1241 unsigned int current; /* current count */
1242 unsigned int max; /* maximum count */
1245 /* Open a semaphore */
1246 @REQ(open_semaphore)
1247 unsigned int access; /* wanted access rights */
1248 unsigned int attributes; /* object attributes */
1249 obj_handle_t rootdir; /* root directory */
1250 VARARG(name,unicode_str); /* object name */
1252 obj_handle_t handle; /* handle to the semaphore */
1258 unsigned int access; /* wanted access rights */
1259 unsigned int sharing; /* sharing flags */
1260 int create; /* file create action */
1261 unsigned int options; /* file options */
1262 unsigned int attrs; /* file attributes for creation */
1263 VARARG(objattr,object_attributes); /* object attributes */
1264 VARARG(filename,string); /* file name */
1266 obj_handle_t handle; /* handle to the file */
1270 /* Open a file object */
1271 @REQ(open_file_object)
1272 unsigned int access; /* wanted access rights */
1273 unsigned int attributes; /* open attributes */
1274 obj_handle_t rootdir; /* root directory */
1275 unsigned int sharing; /* sharing flags */
1276 unsigned int options; /* file options */
1277 VARARG(filename,unicode_str); /* file name */
1279 obj_handle_t handle; /* handle to the file */
1283 /* Allocate a file handle for a Unix fd */
1284 @REQ(alloc_file_handle)
1285 unsigned int access; /* wanted access rights */
1286 unsigned int attributes; /* object attributes */
1287 int fd; /* file descriptor on the client side */
1289 obj_handle_t handle; /* handle to the file */
1293 /* Get the Unix name from a file handle */
1294 @REQ(get_handle_unix_name)
1295 obj_handle_t handle; /* file handle */
1297 data_size_t name_len; /* unix name length */
1298 VARARG(name,string); /* unix name */
1302 /* Get a Unix fd to access a file */
1304 obj_handle_t handle; /* handle to the file */
1306 int type; /* file type (see below) */
1307 int cacheable; /* can fd be cached in the client? */
1308 unsigned int access; /* file access rights */
1309 unsigned int options; /* file open options */
1313 FD_TYPE_INVALID, /* invalid file (no associated fd) */
1314 FD_TYPE_FILE, /* regular file */
1315 FD_TYPE_DIR, /* directory */
1316 FD_TYPE_SOCKET, /* socket */
1317 FD_TYPE_SERIAL, /* serial port */
1318 FD_TYPE_PIPE, /* named pipe */
1319 FD_TYPE_MAILSLOT, /* mailslot */
1320 FD_TYPE_CHAR, /* unspecified char device */
1321 FD_TYPE_DEVICE, /* Windows device file */
1326 /* Retrieve (or allocate) the client-side directory cache entry */
1327 @REQ(get_directory_cache_entry)
1328 obj_handle_t handle; /* handle to the directory */
1330 int entry; /* cache entry on the client side */
1331 VARARG(free,ints); /* entries that can be freed */
1335 /* Flush a file buffers */
1337 async_data_t async; /* async I/O parameters */
1339 obj_handle_t event; /* event set when finished */
1342 /* Query file information */
1344 obj_handle_t handle; /* handle to the file */
1345 unsigned int info_class; /* queried information class */
1347 VARARG(data,bytes); /* file info data */
1350 /* Query volume information */
1351 @REQ(get_volume_info)
1352 obj_handle_t handle; /* handle to the file */
1353 unsigned int info_class; /* queried information class */
1355 VARARG(data,bytes); /* volume info data */
1358 /* Lock a region of a file */
1360 obj_handle_t handle; /* handle to the file */
1361 file_pos_t offset; /* offset of start of lock */
1362 file_pos_t count; /* count of bytes to lock */
1363 int shared; /* shared or exclusive lock? */
1364 int wait; /* do we want to wait? */
1366 obj_handle_t handle; /* handle to wait on */
1367 int overlapped; /* is it an overlapped I/O handle? */
1371 /* Unlock a region of a file */
1373 obj_handle_t handle; /* handle to the file */
1374 file_pos_t offset; /* offset of start of unlock */
1375 file_pos_t count; /* count of bytes to unlock */
1379 /* Create a socket */
1381 unsigned int access; /* wanted access rights */
1382 unsigned int attributes; /* object attributes */
1383 int family; /* family, see socket manpage */
1384 int type; /* type, see socket manpage */
1385 int protocol; /* protocol, see socket manpage */
1386 unsigned int flags; /* socket flags */
1388 obj_handle_t handle; /* handle to the new socket */
1392 /* Accept a socket */
1394 obj_handle_t lhandle; /* handle to the listening socket */
1395 unsigned int access; /* wanted access rights */
1396 unsigned int attributes; /* object attributes */
1398 obj_handle_t handle; /* handle to the new socket */
1402 /* Accept into an initialized socket */
1403 @REQ(accept_into_socket)
1404 obj_handle_t lhandle; /* handle to the listening socket */
1405 obj_handle_t ahandle; /* handle to the accepting socket */
1409 /* Set socket event parameters */
1410 @REQ(set_socket_event)
1411 obj_handle_t handle; /* handle to the socket */
1412 unsigned int mask; /* event mask */
1413 obj_handle_t event; /* event object */
1414 user_handle_t window; /* window to send the message to */
1415 unsigned int msg; /* message to send */
1419 /* Get socket event parameters */
1420 @REQ(get_socket_event)
1421 obj_handle_t handle; /* handle to the socket */
1422 int service; /* clear pending? */
1423 obj_handle_t c_event; /* event to clear */
1425 unsigned int mask; /* event mask */
1426 unsigned int pmask; /* pending events */
1427 unsigned int state; /* status bits */
1428 VARARG(errors,ints); /* event errors */
1432 /* Get socket info */
1433 @REQ(get_socket_info)
1434 obj_handle_t handle; /* handle to the socket */
1436 int family; /* family, see socket manpage */
1437 int type; /* type, see socket manpage */
1438 int protocol; /* protocol, see socket manpage */
1442 /* Re-enable pending socket events */
1443 @REQ(enable_socket_event)
1444 obj_handle_t handle; /* handle to the socket */
1445 unsigned int mask; /* events to re-enable */
1446 unsigned int sstate; /* status bits to set */
1447 unsigned int cstate; /* status bits to clear */
1450 @REQ(set_socket_deferred)
1451 obj_handle_t handle; /* handle to the socket */
1452 obj_handle_t deferred; /* handle to the socket for which accept() is deferred */
1455 /* Allocate a console (only used by a console renderer) */
1457 unsigned int access; /* wanted access rights */
1458 unsigned int attributes; /* object attributes */
1459 process_id_t pid; /* pid of process which shall be attached to the console */
1460 int input_fd; /* if pid=-1 (bare console to current process), fd for input */
1462 obj_handle_t handle_in; /* handle to console input */
1463 obj_handle_t event; /* handle to renderer events change notification */
1467 /* Free the console of the current process */
1472 #define CONSOLE_RENDERER_NONE_EVENT 0x00
1473 #define CONSOLE_RENDERER_TITLE_EVENT 0x01
1474 #define CONSOLE_RENDERER_ACTIVE_SB_EVENT 0x02
1475 #define CONSOLE_RENDERER_SB_RESIZE_EVENT 0x03
1476 #define CONSOLE_RENDERER_UPDATE_EVENT 0x04
1477 #define CONSOLE_RENDERER_CURSOR_POS_EVENT 0x05
1478 #define CONSOLE_RENDERER_CURSOR_GEOM_EVENT 0x06
1479 #define CONSOLE_RENDERER_DISPLAY_EVENT 0x07
1480 #define CONSOLE_RENDERER_EXIT_EVENT 0x08
1481 struct console_renderer_event
1516 /* retrieve console events for the renderer */
1517 @REQ(get_console_renderer_events)
1518 obj_handle_t handle; /* handle to console input events */
1520 VARARG(data,bytes); /* the various console_renderer_events */
1524 /* Open a handle to the process console */
1526 obj_handle_t from; /* 0 (resp 1) input (resp output) of current process console */
1527 /* otherwise console_in handle to get active screen buffer? */
1528 unsigned int access; /* wanted access rights */
1529 unsigned int attributes; /* object attributes */
1530 int share; /* share mask (only for output handles) */
1532 obj_handle_t handle; /* handle to the console */
1536 /* Attach to a other process's console
*/
1537 @
REQ(attach_console
)
1538 process_id_t pid
; /* pid of attached console process
*/
1540 obj_handle_t std_in
; /* attached stdin
*/
1541 obj_handle_t std_out
; /* attached stdout
*/
1542 obj_handle_t std_err
; /* attached stderr
*/
1546 /* Get the input queue wait event
*/
1547 @
REQ(get_console_wait_event
)
1548 obj_handle_t handle
; /* handle to the console
*/
1553 /* Get a console
mode (input or output
) */
1554 @
REQ(get_console_mode
)
1555 obj_handle_t handle
; /* handle to the console
*/
1557 int mode
; /* console mode
*/
1561 /* Set a console
mode (input or output
) */
1562 @
REQ(set_console_mode
)
1563 obj_handle_t handle
; /* handle to the console
*/
1564 int mode
; /* console mode
*/
1568 /* Set info about a
console (input only
) */
1569 @
REQ(set_console_input_info
)
1570 obj_handle_t handle
; /* handle to console input
, or
0 for process
' console */
1571 int mask; /* setting mask (see below) */
1572 obj_handle_t active_sb; /* active screen buffer */
1573 int history_mode; /* whether we duplicate lines in history */
1574 int history_size; /* number of lines in history */
1575 int edition_mode; /* index to the edition mode flavors */
1576 int input_cp; /* console input codepage */
1577 int output_cp; /* console output codepage */
1578 user_handle_t win; /* console window if backend supports it */
1579 VARARG(title,unicode_str); /* console title */
1581 #define SET_CONSOLE_INPUT_INFO_ACTIVE_SB 0x01
1582 #define SET_CONSOLE_INPUT_INFO_TITLE 0x02
1583 #define SET_CONSOLE_INPUT_INFO_HISTORY_MODE 0x04
1584 #define SET_CONSOLE_INPUT_INFO_HISTORY_SIZE 0x08
1585 #define SET_CONSOLE_INPUT_INFO_EDITION_MODE 0x10
1586 #define SET_CONSOLE_INPUT_INFO_INPUT_CODEPAGE 0x20
1587 #define SET_CONSOLE_INPUT_INFO_OUTPUT_CODEPAGE 0x40
1588 #define SET_CONSOLE_INPUT_INFO_WIN 0x80
1591 /* Get info about a console (input only) */
1592 @REQ(get_console_input_info)
1593 obj_handle_t handle; /* handle to console input, or 0 for process' console
*/
1595 int history_mode
; /* whether we duplicate lines in history
*/
1596 int history_size
; /* number of lines in history
*/
1597 int history_index
; /* number of used lines in history
*/
1598 int edition_mode
; /* index to the edition mode flavors
*/
1599 int input_cp
; /* console input codepage
*/
1600 int output_cp
; /* console output codepage
*/
1601 user_handle_t win
; /* console window if backend supports it
*/
1602 VARARG(title
,unicode_str
); /* console title
*/
1606 /* appends a string to console
's history */
1607 @REQ(append_console_input_history)
1608 obj_handle_t handle; /* handle to console input, or 0 for process' console
*/
1609 VARARG(line
,unicode_str
); /* line to add
*/
1613 /* appends a string to console
's history */
1614 @REQ(get_console_input_history)
1615 obj_handle_t handle; /* handle to console input, or 0 for process' console
*/
1616 int index
; /* index to get line from
*/
1618 int total
; /* total length of line in Unicode chars
*/
1619 VARARG(line
,unicode_str
); /* line to add
*/
1623 /* creates a new screen buffer on process
' console */
1624 @REQ(create_console_output)
1625 obj_handle_t handle_in; /* handle to console input, or 0 for process' console
*/
1626 unsigned int access
; /* wanted access rights
*/
1627 unsigned int attributes
; /* object attributes
*/
1628 unsigned int share
; /* sharing credentials
*/
1629 int fd
; /* for bare consoles
, fd the screen
-buffer is attached to
*/
1631 obj_handle_t handle_out
; /* handle to the screen buffer
*/
1635 /* Set info about a
console (output only
) */
1636 @
REQ(set_console_output_info
)
1637 obj_handle_t handle
; /* handle to the console
*/
1638 int mask
; /* setting
mask (see below
) */
1639 short int cursor_size
; /* size of
cursor (percentage filled
) */
1640 short int cursor_visible
;/* cursor visibility flag
*/
1641 short int cursor_x
; /* position of
cursor (x
, y
) */
1643 short int width
; /* width of the screen buffer
*/
1644 short int height
; /* height of the screen buffer
*/
1645 short int attr
; /* default fill
attributes (screen colors
) */
1646 short int popup_attr
; /* pop
-up color attributes
*/
1647 short int win_left
; /* window actually displayed by renderer
*/
1648 short int win_top
; /* the rect area is expressed within the
*/
1649 short int win_right
; /* boundaries of the screen buffer
*/
1650 short int win_bottom
;
1651 short int max_width
; /* maximum
size (width x height
) for the window
*/
1652 short int max_height
;
1653 short int font_width
; /* font
size (width x height
) */
1654 short int font_height
;
1655 short int font_weight
; /* font weight
*/
1656 short int font_pitch_family
; /* font pitch
& family
*/
1657 VARARG(colors
,uints
,64); /* color table
*/
1658 VARARG(face_name
,unicode_str
); /* font face name
*/
1660 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_GEOM
0x0001
1661 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_POS
0x0002
1662 #define SET_CONSOLE_OUTPUT_INFO_SIZE
0x0004
1663 #define SET_CONSOLE_OUTPUT_INFO_ATTR
0x0008
1664 #define SET_CONSOLE_OUTPUT_INFO_DISPLAY_WINDOW
0x0010
1665 #define SET_CONSOLE_OUTPUT_INFO_MAX_SIZE
0x0020
1666 #define SET_CONSOLE_OUTPUT_INFO_FONT
0x0040
1667 #define SET_CONSOLE_OUTPUT_INFO_COLORTABLE
0x0080
1668 #define SET_CONSOLE_OUTPUT_INFO_POPUP_ATTR
0x0100
1671 /* Get info about a
console (output only
) */
1672 @
REQ(get_console_output_info
)
1673 obj_handle_t handle
; /* handle to the console
*/
1675 short int cursor_size
; /* size of
cursor (percentage filled
) */
1676 short int cursor_visible
;/* cursor visibility flag
*/
1677 short int cursor_x
; /* position of
cursor (x
, y
) */
1679 short int width
; /* width of the screen buffer
*/
1680 short int height
; /* height of the screen buffer
*/
1681 short int attr
; /* default fill
attributes (screen colors
) */
1682 short int popup_attr
; /* pop
-up color attributes
*/
1683 short int win_left
; /* window actually displayed by renderer
*/
1684 short int win_top
; /* the rect area is expressed within the
*/
1685 short int win_right
; /* boundaries of the screen buffer
*/
1686 short int win_bottom
;
1687 short int max_width
; /* maximum
size (width x height
) for the window
*/
1688 short int max_height
;
1689 short int font_width
; /* font
size (width x height
) */
1690 short int font_height
;
1691 short int font_weight
; /* font weight
*/
1692 short int font_pitch_family
; /* font pitch
& family
*/
1693 VARARG(colors
,uints
,64); /* color table
*/
1694 VARARG(face_name
,unicode_str
); /* font face name
*/
1697 /* Add input records to a console input queue
*/
1698 @
REQ(write_console_input
)
1699 obj_handle_t handle
; /* handle to the console input
*/
1700 VARARG(rec
,input_records
); /* input records
*/
1702 int written
; /* number of records written
*/
1706 /* Fetch input records from a console input queue
*/
1707 @
REQ(read_console_input
)
1708 obj_handle_t handle
; /* handle to the console input
*/
1709 int flush
; /* flush the retrieved records from the queue?
*/
1711 int read
; /* number of records read
*/
1712 VARARG(rec
,input_records
); /* input records
*/
1716 /* write
data (chars and
/or attributes
) in a screen buffer
*/
1717 @
REQ(write_console_output
)
1718 obj_handle_t handle
; /* handle to the console output
*/
1719 int x
; /* position where to start writing
*/
1721 int mode
; /* char
info (see below
) */
1722 int wrap
; /* wrap around at end of line?
*/
1723 VARARG(data
,bytes
); /* info to write
*/
1725 int written
; /* number of char infos actually written
*/
1726 int width
; /* width of screen buffer
*/
1727 int height
; /* height of screen buffer
*/
1731 CHAR_INFO_MODE_TEXT
, /* characters only
*/
1732 CHAR_INFO_MODE_ATTR
, /* attributes only
*/
1733 CHAR_INFO_MODE_TEXTATTR
, /* both characters and attributes
*/
1734 CHAR_INFO_MODE_TEXTSTDATTR
/* characters but use standard attributes
*/
1738 /* fill a screen buffer with constant
data (chars and
/or attributes
) */
1739 @
REQ(fill_console_output
)
1740 obj_handle_t handle
; /* handle to the console output
*/
1741 int x
; /* position where to start writing
*/
1743 int mode
; /* char info mode
*/
1744 int count
; /* number to write
*/
1745 int wrap
; /* wrap around at end of line?
*/
1746 char_info_t data
; /* data to write
*/
1748 int written
; /* number of char infos actually written
*/
1752 /* read
data (chars and
/or attributes
) from a screen buffer
*/
1753 @
REQ(read_console_output
)
1754 obj_handle_t handle
; /* handle to the console output
*/
1755 int x
; /* position (x
,y
) where to start reading
*/
1757 int mode
; /* char info mode
*/
1758 int wrap
; /* wrap around at end of line?
*/
1760 int width
; /* width of screen buffer
*/
1761 int height
; /* height of screen buffer
*/
1766 /* move a
rect (of data
) in screen buffer content
*/
1767 @
REQ(move_console_output
)
1768 obj_handle_t handle
; /* handle to the console output
*/
1769 short int x_src
; /* position (x
, y
) of rect to start moving from
*/
1771 short int x_dst
; /* position (x
, y
) of rect to move to
*/
1773 short int w
; /* size of the
rect (width
, height
) to move
*/
1778 /* Sends a signal to a process group
*/
1779 @
REQ(send_console_signal
)
1780 int signal
; /* the signal to send
*/
1781 process_id_t group_id
; /* the group to send the signal to
*/
1785 /* enable directory change notifications
*/
1786 @
REQ(read_directory_changes
)
1787 unsigned int filter
; /* notification filter
*/
1788 int subtree
; /* watch the subtree?
*/
1789 int want_data
; /* flag indicating whether change data should be collected
*/
1790 async_data_t async
; /* async I
/O parameters
*/
1795 obj_handle_t handle
;
1797 VARARG(events
,filesystem_event
); /* collected filesystem events
*/
1801 /* Create a file mapping
*/
1802 @
REQ(create_mapping
)
1803 unsigned int access
; /* wanted access rights
*/
1804 unsigned int flags
; /* SEC_
* flags
*/
1805 unsigned int file_access
; /* file access rights
*/
1806 mem_size_t size
; /* mapping size
*/
1807 obj_handle_t file_handle
; /* file handle
*/
1808 VARARG(objattr
,object_attributes
); /* object attributes
*/
1810 obj_handle_t handle
; /* handle to the mapping
*/
1814 /* Open a mapping
*/
1816 unsigned int access
; /* wanted access rights
*/
1817 unsigned int attributes
; /* object attributes
*/
1818 obj_handle_t rootdir
; /* root directory
*/
1819 VARARG(name
,unicode_str
); /* object name
*/
1821 obj_handle_t handle
; /* handle to the mapping
*/
1825 /* Get information about a file mapping
*/
1826 @
REQ(get_mapping_info
)
1827 obj_handle_t handle
; /* handle to the mapping
*/
1828 unsigned int access
; /* wanted access rights
*/
1830 mem_size_t size
; /* mapping size
*/
1831 unsigned int flags
; /* SEC_
* flags
*/
1832 obj_handle_t shared_file
; /* shared mapping file handle
*/
1833 VARARG(image
,pe_image_info
);/* image info for SEC_IMAGE mappings
*/
1837 /* Add a memory view in the current process
*/
1839 obj_handle_t mapping
; /* file mapping handle
*/
1840 unsigned int access
; /* wanted access rights
*/
1841 client_ptr_t base
; /* view base
address (page
-aligned
) */
1842 mem_size_t size
; /* view size
*/
1843 file_pos_t start
; /* start offset in mapping
*/
1847 /* Unmap a memory view from the current process
*/
1849 client_ptr_t base
; /* view base address
*/
1853 /* Get a range of committed pages in a file mapping
*/
1854 @
REQ(get_mapping_committed_range
)
1855 client_ptr_t base
; /* view base address
*/
1856 file_pos_t offset
; /* starting
offset (page
-aligned
, in bytes
) */
1858 mem_size_t size
; /* size of range starting at
offset (page
-aligned
, in bytes
) */
1859 int committed
; /* whether it is a committed range
*/
1863 /* Add a range to the committed pages in a file mapping
*/
1864 @
REQ(add_mapping_committed_range
)
1865 client_ptr_t base
; /* view base address
*/
1866 file_pos_t offset
; /* starting
offset (page
-aligned
, in bytes
) */
1867 mem_size_t size
; /* size to
set (page
-aligned
, in bytes
) or
0 if only retrieving
*/
1871 /* Check if two memory maps are for the same file
*/
1872 @
REQ(is_same_mapping
)
1873 client_ptr_t base1
; /* first view base address
*/
1874 client_ptr_t base2
; /* second view base address
*/
1878 #define SNAP_PROCESS
0x00000001
1879 #define SNAP_THREAD
0x00000002
1880 /* Create a snapshot
*/
1881 @
REQ(create_snapshot
)
1882 unsigned int attributes
; /* object attributes
*/
1883 unsigned int flags
; /* snapshot
flags (SNAP_*)
*/
1885 obj_handle_t handle
; /* handle to the snapshot
*/
1889 /* Get the next process from a snapshot
*/
1891 obj_handle_t handle
; /* handle to the snapshot
*/
1892 int reset
; /* reset snapshot position?
*/
1894 int count
; /* process usage count
*/
1895 process_id_t pid
; /* process id
*/
1896 process_id_t ppid
; /* parent process id
*/
1897 int threads
; /* number of threads
*/
1898 int priority
; /* process priority
*/
1899 int handles
; /* number of handles
*/
1900 int unix_pid
; /* Unix pid
*/
1901 VARARG(filename
,unicode_str
); /* file name of main exe
*/
1905 /* Get the next thread from a snapshot
*/
1907 obj_handle_t handle
; /* handle to the snapshot
*/
1908 int reset
; /* reset snapshot position?
*/
1910 int count
; /* thread usage count
*/
1911 process_id_t pid
; /* process id
*/
1912 thread_id_t tid
; /* thread id
*/
1913 int base_pri
; /* base priority
*/
1914 int delta_pri
; /* delta priority
*/
1918 /* Wait for a debug event
*/
1919 @
REQ(wait_debug_event
)
1920 int get_handle
; /* should we alloc a handle for waiting?
*/
1922 process_id_t pid
; /* process id
*/
1923 thread_id_t tid
; /* thread id
*/
1924 obj_handle_t wait
; /* wait handle if no event ready
*/
1925 VARARG(event
,debug_event
); /* debug event data
*/
1929 /* Queue an exception event
*/
1930 @
REQ(queue_exception_event
)
1931 int first
; /* first chance exception?
*/
1932 unsigned int code
; /* exception code
*/
1933 unsigned int flags
; /* exception flags
*/
1934 client_ptr_t record
; /* exception record
*/
1935 client_ptr_t address
; /* exception address
*/
1936 data_size_t len
; /* size of parameters
*/
1937 VARARG(params
,uints64
,len
);/* exception parameters
*/
1939 obj_handle_t handle
; /* handle to the queued event
*/
1943 /* Retrieve the status of an exception event
*/
1944 @
REQ(get_exception_status
)
1945 obj_handle_t handle
; /* handle to the queued event
*/
1949 /* Continue a debug event
*/
1950 @
REQ(continue_debug_event
)
1951 process_id_t pid
; /* process id to continue
*/
1952 thread_id_t tid
; /* thread id to continue
*/
1953 int status
; /* continuation status
*/
1957 /* Start
/stop debugging an existing process
*/
1959 process_id_t pid
; /* id of the process to debug
*/
1960 int attach
; /* 1=attaching
/ 0=detaching from the process
*/
1964 /* Set debugger kill on exit flag
*/
1965 @
REQ(set_debugger_kill_on_exit
)
1966 int kill_on_exit
; /* 0=detach
/1=kill debuggee when debugger dies
*/
1970 /* Read data from a process address space
*/
1971 @
REQ(read_process_memory
)
1972 obj_handle_t handle
; /* process handle
*/
1973 client_ptr_t addr
; /* addr to read from
*/
1975 VARARG(data
,bytes
); /* result data
*/
1979 /* Write data to a process address space
*/
1980 @
REQ(write_process_memory
)
1981 obj_handle_t handle
; /* process handle
*/
1982 client_ptr_t addr
; /* addr to write to
*/
1983 VARARG(data
,bytes
); /* data to write
*/
1987 /* Create a registry key
*/
1989 unsigned int access
; /* desired access rights
*/
1990 unsigned int options
; /* creation options
*/
1991 VARARG(objattr
,object_attributes
); /* object attributes
*/
1992 VARARG(class
,unicode_str
); /* class name
*/
1994 obj_handle_t hkey
; /* handle to the created key
*/
1995 int created
; /* has it been newly created?
*/
1998 /* Open a registry key
*/
2000 obj_handle_t parent
; /* handle to the parent key
*/
2001 unsigned int access
; /* desired access rights
*/
2002 unsigned int attributes
; /* object attributes
*/
2003 VARARG(name
,unicode_str
); /* key name
*/
2005 obj_handle_t hkey
; /* handle to the open key
*/
2009 /* Delete a registry key
*/
2011 obj_handle_t hkey
; /* handle to the key
*/
2015 /* Flush a registry key
*/
2017 obj_handle_t hkey
; /* handle to the key
*/
2021 /* Enumerate registry subkeys
*/
2023 obj_handle_t hkey
; /* handle to registry key
*/
2024 int index
; /* index of
subkey (or
-1 for current key
) */
2025 int info_class
; /* requested information class
*/
2027 int subkeys
; /* number of subkeys
*/
2028 int max_subkey
; /* longest subkey name
*/
2029 int max_class
; /* longest class name
*/
2030 int values
; /* number of values
*/
2031 int max_value
; /* longest value name
*/
2032 int max_data
; /* longest value data
*/
2033 timeout_t modif
; /* last modification time
*/
2034 data_size_t total
; /* total length needed for full name and class
*/
2035 data_size_t namelen
; /* length of key name in bytes
*/
2036 VARARG(name
,unicode_str
,namelen
); /* key name
*/
2037 VARARG(class
,unicode_str
); /* class name
*/
2041 /* Set a value of a registry key
*/
2043 obj_handle_t hkey
; /* handle to registry key
*/
2044 int type
; /* value type
*/
2045 data_size_t namelen
; /* length of value name in bytes
*/
2046 VARARG(name
,unicode_str
,namelen
); /* value name
*/
2047 VARARG(data
,bytes
); /* value data
*/
2051 /* Retrieve the value of a registry key
*/
2053 obj_handle_t hkey
; /* handle to registry key
*/
2054 VARARG(name
,unicode_str
); /* value name
*/
2056 int type
; /* value type
*/
2057 data_size_t total
; /* total length needed for data
*/
2058 VARARG(data
,bytes
); /* value data
*/
2062 /* Enumerate a value of a registry key
*/
2063 @
REQ(enum_key_value
)
2064 obj_handle_t hkey
; /* handle to registry key
*/
2065 int index
; /* value index
*/
2066 int info_class
; /* requested information class
*/
2068 int type
; /* value type
*/
2069 data_size_t total
; /* total length needed for full name and data
*/
2070 data_size_t namelen
; /* length of value name in bytes
*/
2071 VARARG(name
,unicode_str
,namelen
); /* value name
*/
2072 VARARG(data
,bytes
); /* value data
*/
2076 /* Delete a value of a registry key
*/
2077 @
REQ(delete_key_value
)
2078 obj_handle_t hkey
; /* handle to registry key
*/
2079 VARARG(name
,unicode_str
); /* value name
*/
2083 /* Load a registry branch from a file
*/
2085 obj_handle_t file
; /* file to load from
*/
2086 VARARG(objattr
,object_attributes
); /* object attributes
*/
2090 /* UnLoad a registry branch from a file
*/
2091 @
REQ(unload_registry
)
2092 obj_handle_t hkey
; /* root key to unload to
*/
2096 /* Save a registry branch to a file
*/
2098 obj_handle_t hkey
; /* key to save
*/
2099 obj_handle_t file
; /* file to save to
*/
2103 /* Add a registry key change notification
*/
2104 @
REQ(set_registry_notification
)
2105 obj_handle_t hkey
; /* key to watch for changes
*/
2106 obj_handle_t event
; /* event to set
*/
2107 int subtree
; /* should we watch the whole subtree?
*/
2108 unsigned int filter
; /* things to watch
*/
2112 /* Create a waitable timer
*/
2114 unsigned int access
; /* wanted access rights
*/
2115 int manual
; /* manual reset
*/
2116 VARARG(objattr
,object_attributes
); /* object attributes
*/
2118 obj_handle_t handle
; /* handle to the timer
*/
2122 /* Open a waitable timer
*/
2124 unsigned int access
; /* wanted access rights
*/
2125 unsigned int attributes
; /* object attributes
*/
2126 obj_handle_t rootdir
; /* root directory
*/
2127 VARARG(name
,unicode_str
); /* object name
*/
2129 obj_handle_t handle
; /* handle to the timer
*/
2132 /* Set a waitable timer
*/
2134 obj_handle_t handle
; /* handle to the timer
*/
2135 timeout_t expire
; /* next expiration absolute time
*/
2136 client_ptr_t callback
; /* callback function
*/
2137 client_ptr_t arg
; /* callback argument
*/
2138 int period
; /* timer period in ms
*/
2140 int signaled
; /* was the timer signaled before this call ?
*/
2143 /* Cancel a waitable timer
*/
2145 obj_handle_t handle
; /* handle to the timer
*/
2147 int signaled
; /* was the timer signaled before this calltime ?
*/
2150 /* Get information on a waitable timer
*/
2151 @
REQ(get_timer_info
)
2152 obj_handle_t handle
; /* handle to the timer
*/
2154 timeout_t when
; /* absolute time when the timer next expires
*/
2155 int signaled
; /* is the timer signaled?
*/
2159 /* Retrieve the current context of a thread
*/
2160 @
REQ(get_thread_context
)
2161 obj_handle_t handle
; /* thread or context handle
*/
2162 unsigned int flags
; /* context flags
*/
2164 int self
; /* was it a handle to the current thread?
*/
2165 obj_handle_t handle
; /* pending context handle
*/
2166 VARARG(context
,context
); /* thread context
*/
2170 /* Set the current context of a thread
*/
2171 @
REQ(set_thread_context
)
2172 obj_handle_t handle
; /* thread handle
*/
2173 VARARG(context
,context
); /* thread context
*/
2175 int self
; /* was it a handle to the current thread?
*/
2179 /* Fetch a selector entry for a thread
*/
2180 @
REQ(get_selector_entry
)
2181 obj_handle_t handle
; /* thread handle
*/
2182 int entry
; /* LDT entry
*/
2184 unsigned int base
; /* selector base
*/
2185 unsigned int limit
; /* selector limit
*/
2186 unsigned char flags
; /* selector flags
*/
2192 obj_handle_t table
; /* which table to add atom to
*/
2193 VARARG(name
,unicode_str
); /* atom name
*/
2195 atom_t atom
; /* resulting atom
*/
2199 /* Delete an atom
*/
2201 obj_handle_t table
; /* which table to delete atom from
*/
2202 atom_t atom
; /* atom handle
*/
2208 obj_handle_t table
; /* which table to find atom from
*/
2209 VARARG(name
,unicode_str
); /* atom name
*/
2211 atom_t atom
; /* atom handle
*/
2215 /* Get information about an atom
*/
2216 @
REQ(get_atom_information
)
2217 obj_handle_t table
; /* which table to find atom from
*/
2218 atom_t atom
; /* atom handle
*/
2220 int count
; /* atom lock count
*/
2221 int pinned
; /* whether the atom has been pinned
*/
2222 data_size_t total
; /* actual length of atom name
*/
2223 VARARG(name
,unicode_str
); /* atom name
*/
2227 /* Set information about an atom
*/
2228 @
REQ(set_atom_information
)
2229 obj_handle_t table
; /* which table to find atom from
*/
2230 atom_t atom
; /* atom handle
*/
2231 int pinned
; /* whether to bump atom information
*/
2235 /* Empty an atom table
*/
2236 @
REQ(empty_atom_table
)
2237 obj_handle_t table
; /* which table to find atom from
*/
2238 int if_pinned
; /* whether to delete pinned atoms
*/
2242 /* Init an atom table
*/
2243 @
REQ(init_atom_table
)
2244 int entries
; /* number of
entries (only for local
) */
2246 obj_handle_t table
; /* handle to the atom table
*/
2250 /* Get the message queue of the current thread
*/
2253 obj_handle_t handle
; /* handle to the queue
*/
2257 /* Set the file descriptor associated to the current thread queue
*/
2259 obj_handle_t handle
; /* handle to the file descriptor
*/
2263 /* Set the current message queue wakeup mask
*/
2264 @
REQ(set_queue_mask
)
2265 unsigned int wake_mask
; /* wakeup bits mask
*/
2266 unsigned int changed_mask
; /* changed bits mask
*/
2267 int skip_wait
; /* will we skip waiting if signaled?
*/
2269 unsigned int wake_bits
; /* current wake bits
*/
2270 unsigned int changed_bits
; /* current changed bits
*/
2274 /* Get the current message queue status
*/
2275 @
REQ(get_queue_status
)
2276 unsigned int clear_bits
; /* should we clear the change bits?
*/
2278 unsigned int wake_bits
; /* wake bits
*/
2279 unsigned int changed_bits
; /* changed bits since last time
*/
2283 /* Retrieve the process idle event
*/
2284 @
REQ(get_process_idle_event
)
2285 obj_handle_t handle
; /* process handle
*/
2287 obj_handle_t event
; /* handle to idle event
*/
2291 /* Send a message to a thread queue
*/
2293 thread_id_t id
; /* thread id
*/
2294 int type
; /* message
type (see below
) */
2295 int flags
; /* message
flags (see below
) */
2296 user_handle_t win
; /* window handle
*/
2297 unsigned int msg
; /* message code
*/
2298 lparam_t wparam
; /* parameters
*/
2299 lparam_t lparam
; /* parameters
*/
2300 timeout_t timeout
; /* timeout for reply
*/
2301 VARARG(data
,message_data
); /* message data for sent messages
*/
2304 @
REQ(post_quit_message
)
2305 int exit_code
; /* exit code to return
*/
2310 MSG_ASCII
, /* Ascii
message (from SendMessageA
) */
2311 MSG_UNICODE
, /* Unicode
message (from SendMessageW
) */
2312 MSG_NOTIFY
, /* notify
message (from SendNotifyMessageW
), always Unicode
*/
2313 MSG_CALLBACK
, /* callback
message (from SendMessageCallbackW
), always Unicode
*/
2314 MSG_CALLBACK_RESULT
,/* result of a callback message
*/
2315 MSG_OTHER_PROCESS
, /* sent from other process
, may include vararg data
, always Unicode
*/
2316 MSG_POSTED
, /* posted
message (from PostMessageW
), always Unicode
*/
2317 MSG_HARDWARE
, /* hardware message
*/
2318 MSG_WINEVENT
, /* winevent message
*/
2319 MSG_HOOK_LL
/* low
-level hardware hook
*/
2321 #define SEND_MSG_ABORT_IF_HUNG
0x01
2324 /* Send a hardware message to a thread queue
*/
2325 @
REQ(send_hardware_message
)
2326 user_handle_t win
; /* window handle
*/
2327 hw_input_t input
; /* input data
*/
2328 unsigned int flags
; /* flags (see below
) */
2330 int wait
; /* do we need to wait for a reply?
*/
2331 int prev_x
; /* previous cursor position
*/
2333 int new_x
; /* new cursor position
*/
2335 VARARG(keystate
,bytes
); /* global state array for all the keys
*/
2337 #define SEND_HWMSG_INJECTED
0x01
2340 /* Get a message from the current queue
*/
2342 unsigned int flags
; /* PM_
* flags
*/
2343 user_handle_t get_win
; /* window handle to get
*/
2344 unsigned int get_first
; /* first message code to get
*/
2345 unsigned int get_last
; /* last message code to get
*/
2346 unsigned int hw_id
; /* id of the previous hardware
message (or
0) */
2347 unsigned int wake_mask
; /* wakeup bits mask
*/
2348 unsigned int changed_mask
; /* changed bits mask
*/
2350 user_handle_t win
; /* window handle
*/
2351 unsigned int msg
; /* message code
*/
2352 lparam_t wparam
; /* parameters
*/
2353 lparam_t lparam
; /* parameters
*/
2354 int type
; /* message type
*/
2355 int x
; /* message x position
*/
2356 int y
; /* message y position
*/
2357 unsigned int time
; /* message time
*/
2358 unsigned int active_hooks
; /* active hooks bitmap
*/
2359 data_size_t total
; /* total size of extra data
*/
2360 VARARG(data
,message_data
); /* message data for sent messages
*/
2364 /* Reply to a sent message
*/
2366 int remove
; /* should we remove the message?
*/
2367 lparam_t result
; /* message result
*/
2368 VARARG(data
,bytes
); /* message data for sent messages
*/
2372 /* Accept the current hardware message
*/
2373 @
REQ(accept_hardware_message
)
2374 unsigned int hw_id
; /* id of the hardware message
*/
2375 int remove
; /* should we remove the message?
*/
2379 /* Retrieve the reply for the last message sent
*/
2380 @
REQ(get_message_reply
)
2381 int cancel
; /* cancel message if not ready?
*/
2383 lparam_t result
; /* message result
*/
2384 VARARG(data
,bytes
); /* message data for sent messages
*/
2388 /* Set a window timer
*/
2390 user_handle_t win
; /* window handle
*/
2391 unsigned int msg
; /* message to post
*/
2392 unsigned int rate
; /* timer rate in ms
*/
2393 lparam_t id
; /* timer id
*/
2394 lparam_t lparam
; /* message
lparam (callback proc
) */
2396 lparam_t id
; /* timer id
*/
2400 /* Kill a window timer
*/
2401 @
REQ(kill_win_timer
)
2402 user_handle_t win
; /* window handle
*/
2403 lparam_t id
; /* timer id
*/
2404 unsigned int msg
; /* message to post
*/
2408 /* check if the thread owning the window is hung
*/
2409 @
REQ(is_window_hung
)
2410 user_handle_t win
; /* window handle
*/
2416 /* Retrieve info about a serial port
*/
2417 @
REQ(get_serial_info
)
2418 obj_handle_t handle
; /* handle to comm port
*/
2421 unsigned int eventmask
;
2422 unsigned int cookie
;
2423 unsigned int pending_write
;
2427 /* Set info about a serial port
*/
2428 @
REQ(set_serial_info
)
2429 obj_handle_t handle
; /* handle to comm port
*/
2430 int flags
; /* bitmask to set
values (see below
) */
2432 #define SERIALINFO_PENDING_WRITE
0x04
2433 #define SERIALINFO_PENDING_WAIT
0x08
2436 /* Create an async I
/O
*/
2437 @
REQ(register_async
)
2438 int type
; /* type of queue to look after
*/
2439 async_data_t async
; /* async I
/O parameters
*/
2440 int count
; /* count
- usually # of bytes to be read
/written
*/
2442 #define ASYNC_TYPE_READ
0x01
2443 #define ASYNC_TYPE_WRITE
0x02
2444 #define ASYNC_TYPE_WAIT
0x03
2447 /* Cancel all async op on a fd
*/
2449 obj_handle_t handle
; /* handle to comm port
, socket or file
*/
2450 client_ptr_t iosb
; /* I
/O status
block (NULL
=all
) */
2451 int only_thread
; /* cancel matching this thread
*/
2455 /* Retrieve results of an async
*/
2456 @
REQ(get_async_result
)
2457 client_ptr_t user_arg
; /* user arg used to identify async
*/
2459 data_size_t size
; /* result
size (input or output depending on the operation
) */
2460 VARARG(out_data
,bytes
); /* iosb output data
*/
2464 /* Perform a read on a file object
*/
2466 async_data_t async
; /* async I
/O parameters
*/
2467 file_pos_t pos
; /* read position
*/
2469 obj_handle_t wait
; /* handle to wait on for blocking read
*/
2470 unsigned int options
; /* device open options
*/
2471 VARARG(data
,bytes
); /* read data
*/
2475 /* Perform a write on a file object
*/
2477 async_data_t async
; /* async I
/O parameters
*/
2478 file_pos_t pos
; /* write position
*/
2479 VARARG(data
,bytes
); /* write data
*/
2481 obj_handle_t wait
; /* handle to wait on for blocking write
*/
2482 unsigned int options
; /* device open options
*/
2483 data_size_t size
; /* size written
*/
2487 /* Perform an ioctl on a file
*/
2489 ioctl_code_t code
; /* ioctl code
*/
2490 async_data_t async
; /* async I
/O parameters
*/
2491 VARARG(in_data
,bytes
); /* ioctl input data
*/
2493 obj_handle_t wait
; /* handle to wait on for blocking ioctl
*/
2494 unsigned int options
; /* device open options
*/
2495 VARARG(out_data
,bytes
); /* ioctl output data
*/
2499 /* Store results of an async irp
*/
2500 @
REQ(set_irp_result
)
2501 obj_handle_t handle
; /* handle to the irp
*/
2502 unsigned int status
; /* status of the irp
*/
2503 data_size_t size
; /* result
size (input or output depending on the operation
) */
2504 VARARG(data
,bytes
); /* output data of the irp
*/
2508 /* Create a named pipe
*/
2509 @
REQ(create_named_pipe
)
2510 unsigned int access
;
2511 unsigned int options
;
2512 unsigned int sharing
;
2513 unsigned int maxinstances
;
2514 unsigned int outsize
;
2515 unsigned int insize
;
2518 VARARG(objattr
,object_attributes
); /* object attributes
*/
2520 obj_handle_t handle
; /* handle to the pipe
*/
2523 /* flags in create_named_pipe and get_named_pipe_info
*/
2524 #define NAMED_PIPE_MESSAGE_STREAM_WRITE
0x0001
2525 #define NAMED_PIPE_MESSAGE_STREAM_READ
0x0002
2526 #define NAMED_PIPE_NONBLOCKING_MODE
0x0004
2527 #define NAMED_PIPE_SERVER_END
0x8000
2529 /* Set named pipe information by handle
*/
2530 @
REQ(set_named_pipe_info
)
2531 obj_handle_t handle
;
2535 /* Create a window
*/
2537 user_handle_t parent
; /* parent window
*/
2538 user_handle_t owner
; /* owner window
*/
2539 atom_t atom
; /* class atom
*/
2540 mod_handle_t instance
; /* module instance
*/
2541 int dpi
; /* system DPI
*/
2542 int awareness
; /* thread DPI awareness
*/
2543 VARARG(class
,unicode_str
); /* class name
*/
2545 user_handle_t handle
; /* created window
*/
2546 user_handle_t parent
; /* full handle of parent
*/
2547 user_handle_t owner
; /* full handle of owner
*/
2548 int extra
; /* number of extra bytes
*/
2549 client_ptr_t class_ptr
; /* pointer to class in client address space
*/
2550 int dpi
; /* window DPI if not per
-monitor aware
*/
2551 int awareness
; /* window DPI awareness
*/
2555 /* Destroy a window
*/
2556 @
REQ(destroy_window
)
2557 user_handle_t handle
; /* handle to the window
*/
2561 /* Retrieve the desktop window for the current thread
*/
2562 @
REQ(get_desktop_window
)
2563 int force
; /* force creation if it doesn
't exist */
2565 user_handle_t top_window; /* handle to the desktop window */
2566 user_handle_t msg_window; /* handle to the top-level HWND_MESSAGE parent */
2570 /* Set a window owner */
2571 @REQ(set_window_owner)
2572 user_handle_t handle; /* handle to the window */
2573 user_handle_t owner; /* new owner */
2575 user_handle_t full_owner; /* full handle of new owner */
2576 user_handle_t prev_owner; /* full handle of previous owner */
2580 /* Get information from a window handle */
2581 @REQ(get_window_info)
2582 user_handle_t handle; /* handle to the window */
2584 user_handle_t full_handle; /* full 32-bit handle */
2585 user_handle_t last_active; /* last active popup */
2586 process_id_t pid; /* process owning the window */
2587 thread_id_t tid; /* thread owning the window */
2588 atom_t atom; /* class atom */
2589 int is_unicode; /* ANSI or unicode */
2590 int dpi; /* window DPI */
2591 int awareness; /* DPI awareness */
2595 /* Set some information in a window */
2596 @REQ(set_window_info)
2597 unsigned short flags; /* flags for fields to set (see below) */
2598 short int is_unicode; /* ANSI or unicode */
2599 user_handle_t handle; /* handle to the window */
2600 unsigned int style; /* window style */
2601 unsigned int ex_style; /* window extended style */
2602 unsigned int id; /* window id */
2603 mod_handle_t instance; /* creator instance */
2604 lparam_t user_data; /* user-specific data */
2605 int extra_offset; /* offset to set in extra bytes */
2606 data_size_t extra_size; /* size to set in extra bytes */
2607 lparam_t extra_value; /* value to set in extra bytes */
2609 unsigned int old_style; /* old window style */
2610 unsigned int old_ex_style; /* old window extended style */
2611 mod_handle_t old_instance; /* old creator instance */
2612 lparam_t old_user_data; /* old user-specific data */
2613 lparam_t old_extra_value; /* old value in extra bytes */
2614 unsigned int old_id; /* old window id */
2616 #define SET_WIN_STYLE 0x01
2617 #define SET_WIN_EXSTYLE 0x02
2618 #define SET_WIN_ID 0x04
2619 #define SET_WIN_INSTANCE 0x08
2620 #define SET_WIN_USERDATA 0x10
2621 #define SET_WIN_EXTRA 0x20
2622 #define SET_WIN_UNICODE 0x40
2625 /* Set the parent of a window */
2627 user_handle_t handle; /* handle to the window */
2628 user_handle_t parent; /* handle to the parent */
2630 user_handle_t old_parent; /* old parent window */
2631 user_handle_t full_parent; /* full handle of new parent */
2632 int dpi; /* new window DPI if not per-monitor aware */
2633 int awareness; /* new DPI awareness */
2637 /* Get a list of the window parents, up to the root of the tree */
2638 @REQ(get_window_parents)
2639 user_handle_t handle; /* handle to the window */
2641 int count; /* total count of parents */
2642 VARARG(parents,user_handles); /* parent handles */
2646 /* Get a list of the window children */
2647 @REQ(get_window_children)
2648 obj_handle_t desktop; /* handle to desktop */
2649 user_handle_t parent; /* parent window */
2650 atom_t atom; /* class atom for the listed children */
2651 thread_id_t tid; /* thread owning the listed children */
2652 VARARG(class,unicode_str); /* class name */
2654 int count; /* total count of children */
2655 VARARG(children,user_handles); /* children handles */
2659 /* Get a list of the window children that contain a given point */
2660 @REQ(get_window_children_from_point)
2661 user_handle_t parent; /* parent window */
2662 int x; /* point in parent coordinates */
2664 int dpi; /* dpi for the point coordinates */
2666 int count; /* total count of children */
2667 VARARG(children,user_handles); /* children handles */
2671 /* Get window tree information from a window handle */
2672 @REQ(get_window_tree)
2673 user_handle_t handle; /* handle to the window */
2675 user_handle_t parent; /* parent window */
2676 user_handle_t owner; /* owner window */
2677 user_handle_t next_sibling; /* next sibling in Z-order */
2678 user_handle_t prev_sibling; /* prev sibling in Z-order */
2679 user_handle_t first_sibling; /* first sibling in Z-order */
2680 user_handle_t last_sibling; /* last sibling in Z-order */
2681 user_handle_t first_child; /* first child */
2682 user_handle_t last_child; /* last child */
2685 /* Set the position and Z order of a window */
2686 @REQ(set_window_pos)
2687 unsigned short swp_flags; /* SWP_* flags */
2688 unsigned short paint_flags; /* paint flags (see below) */
2689 user_handle_t handle; /* handle to the window */
2690 user_handle_t previous; /* previous window in Z order */
2691 rectangle_t window; /* window rectangle (in parent coords) */
2692 rectangle_t client; /* client rectangle (in parent coords) */
2693 VARARG(valid,rectangles); /* valid rectangles from WM_NCCALCSIZE (in parent coords) */
2695 unsigned int new_style; /* new window style */
2696 unsigned int new_ex_style; /* new window extended style */
2697 user_handle_t surface_win; /* parent window that holds the surface */
2698 int needs_update; /* whether the surface region needs an update */
2700 #define SET_WINPOS_PAINT_SURFACE 0x01 /* window has a paintable surface */
2701 #define SET_WINPOS_PIXEL_FORMAT 0x02 /* window has a custom pixel format */
2703 /* Get the window and client rectangles of a window */
2704 @REQ(get_window_rectangles)
2705 user_handle_t handle; /* handle to the window */
2706 int relative; /* coords relative to (see below) */
2707 int dpi; /* DPI to map to, or zero for per-monitor DPI */
2709 rectangle_t window; /* window rectangle */
2710 rectangle_t client; /* client rectangle */
2712 enum coords_relative
2714 COORDS_CLIENT, /* relative to client area */
2715 COORDS_WINDOW, /* relative to whole window area */
2716 COORDS_PARENT, /* relative to parent's client area
*/
2717 COORDS_SCREEN
/* relative to screen origin
*/
2721 /* Get the window text
*/
2722 @
REQ(get_window_text
)
2723 user_handle_t handle
; /* handle to the window
*/
2725 data_size_t length
; /* total length in WCHARs
*/
2726 VARARG(text
,unicode_str
); /* window text
*/
2730 /* Set the window text
*/
2731 @
REQ(set_window_text
)
2732 user_handle_t handle
; /* handle to the window
*/
2733 VARARG(text
,unicode_str
); /* window text
*/
2737 /* Get the coordinates offset between two windows
*/
2738 @
REQ(get_windows_offset
)
2739 user_handle_t from
; /* handle to the first window
*/
2740 user_handle_t to
; /* handle to the second window
*/
2741 int dpi
; /* DPI to map to
, or zero for per
-monitor DPI
*/
2743 int x
; /* x coordinate offset
*/
2744 int y
; /* y coordinate offset
*/
2745 int mirror
; /* whether to mirror the x coordinate
*/
2749 /* Get the visible region of a window
*/
2750 @
REQ(get_visible_region
)
2751 user_handle_t window
; /* handle to the window
*/
2752 unsigned int flags
; /* DCX flags
*/
2754 user_handle_t top_win
; /* top window to clip against
*/
2755 rectangle_t top_rect
; /* top window visible rect with screen coords
*/
2756 rectangle_t win_rect
; /* window rect in screen coords
*/
2757 unsigned int paint_flags
; /* paint
flags (from SET_WINPOS_
* flags
) */
2758 data_size_t total_size
; /* total size of the resulting region
*/
2759 VARARG(region
,rectangles
); /* list of rectangles for the
region (in screen coords
) */
2763 /* Get the visible surface region of a window
*/
2764 @
REQ(get_surface_region
)
2765 user_handle_t window
; /* handle to the window
*/
2767 rectangle_t visible_rect
; /* window visible rect in screen coords
*/
2768 data_size_t total_size
; /* total size of the resulting region
*/
2769 VARARG(region
,rectangles
); /* list of rectangles for the
region (in screen coords
) */
2773 /* Get the window region
*/
2774 @
REQ(get_window_region
)
2775 user_handle_t window
; /* handle to the window
*/
2777 data_size_t total_size
; /* total size of the resulting region
*/
2778 VARARG(region
,rectangles
); /* list of rectangles for the
region (in window coords
) */
2782 /* Set the window region
*/
2783 @
REQ(set_window_region
)
2784 user_handle_t window
; /* handle to the window
*/
2785 int redraw
; /* redraw the window?
*/
2786 VARARG(region
,rectangles
); /* list of rectangles for the
region (in window coords
) */
2790 /* Get the window update region
*/
2791 @
REQ(get_update_region
)
2792 user_handle_t window
; /* handle to the window
*/
2793 user_handle_t from_child
; /* child to start searching from
*/
2794 unsigned int flags
; /* update
flags (see below
) */
2796 user_handle_t child
; /* child to
repaint (or window itself
) */
2797 unsigned int flags
; /* resulting update
flags (see below
) */
2798 data_size_t total_size
; /* total size of the resulting region
*/
2799 VARARG(region
,rectangles
); /* list of rectangles for the
region (in screen coords
) */
2801 #define UPDATE_NONCLIENT
0x001 /* get region for repainting non
-client area
*/
2802 #define UPDATE_ERASE
0x002 /* get region for erasing client area
*/
2803 #define UPDATE_PAINT
0x004 /* get region for painting client area
*/
2804 #define UPDATE_INTERNALPAINT
0x008 /* get region if internal paint is pending
*/
2805 #define UPDATE_ALLCHILDREN
0x010 /* force repaint of all children
*/
2806 #define UPDATE_NOCHILDREN
0x020 /* don
't try to repaint any children */
2807 #define UPDATE_NOREGION 0x040 /* don't return a region
, only the flags
*/
2808 #define UPDATE_DELAYED_ERASE
0x080 /* still needs erase after BeginPaint
*/
2809 #define UPDATE_CLIPCHILDREN
0x100 /* remove clipped children from the update region
*/
2812 /* Update the z order of a window so that a given rectangle is fully visible
*/
2813 @
REQ(update_window_zorder
)
2814 user_handle_t window
; /* handle to the window
*/
2815 rectangle_t rect
; /* rectangle that must be
visible (in client coords
) */
2819 /* Mark parts of a window as needing a redraw
*/
2821 user_handle_t window
; /* handle to the window
*/
2822 unsigned int flags
; /* RDW_
* flags
*/
2823 VARARG(region
,rectangles
); /* list of rectangles for the
region (in window coords
) */
2827 /* Set a window property
*/
2828 @
REQ(set_window_property
)
2829 user_handle_t window
; /* handle to the window
*/
2830 lparam_t data
; /* data to store
*/
2831 atom_t atom
; /* property
atom (if no name specified
) */
2832 VARARG(name
,unicode_str
); /* property name
*/
2836 /* Remove a window property
*/
2837 @
REQ(remove_window_property
)
2838 user_handle_t window
; /* handle to the window
*/
2839 atom_t atom
; /* property
atom (if no name specified
) */
2840 VARARG(name
,unicode_str
); /* property name
*/
2842 lparam_t data
; /* data stored in property
*/
2846 /* Get a window property
*/
2847 @
REQ(get_window_property
)
2848 user_handle_t window
; /* handle to the window
*/
2849 atom_t atom
; /* property
atom (if no name specified
) */
2850 VARARG(name
,unicode_str
); /* property name
*/
2852 lparam_t data
; /* data stored in property
*/
2856 /* Get the list of properties of a window
*/
2857 @
REQ(get_window_properties
)
2858 user_handle_t window
; /* handle to the window
*/
2860 int total
; /* total number of properties
*/
2861 VARARG(props
,properties
); /* list of properties
*/
2865 /* Create a window station
*/
2866 @
REQ(create_winstation
)
2867 unsigned int flags
; /* window station flags
*/
2868 unsigned int access
; /* wanted access rights
*/
2869 unsigned int attributes
; /* object attributes
*/
2870 obj_handle_t rootdir
; /* root directory
*/
2871 VARARG(name
,unicode_str
); /* object name
*/
2873 obj_handle_t handle
; /* handle to the window station
*/
2877 /* Open a handle to a window station
*/
2878 @
REQ(open_winstation
)
2879 unsigned int access
; /* wanted access rights
*/
2880 unsigned int attributes
; /* object attributes
*/
2881 obj_handle_t rootdir
; /* root directory
*/
2882 VARARG(name
,unicode_str
); /* object name
*/
2884 obj_handle_t handle
; /* handle to the window station
*/
2888 /* Close a window station
*/
2889 @
REQ(close_winstation
)
2890 obj_handle_t handle
; /* handle to the window station
*/
2894 /* Get the process current window station
*/
2895 @
REQ(get_process_winstation
)
2897 obj_handle_t handle
; /* handle to the window station
*/
2901 /* Set the process current window station
*/
2902 @
REQ(set_process_winstation
)
2903 obj_handle_t handle
; /* handle to the window station
*/
2907 /* Enumerate window stations
*/
2908 @
REQ(enum_winstation
)
2909 unsigned int index
; /* current index
*/
2911 unsigned int next
; /* next index
*/
2912 VARARG(name
,unicode_str
); /* window station name
*/
2916 /* Create a desktop
*/
2917 @
REQ(create_desktop
)
2918 unsigned int flags
; /* desktop flags
*/
2919 unsigned int access
; /* wanted access rights
*/
2920 unsigned int attributes
; /* object attributes
*/
2921 VARARG(name
,unicode_str
); /* object name
*/
2923 obj_handle_t handle
; /* handle to the desktop
*/
2927 /* Open a handle to a desktop
*/
2929 obj_handle_t winsta
; /* window station to
open (null allowed
) */
2930 unsigned int flags
; /* desktop flags
*/
2931 unsigned int access
; /* wanted access rights
*/
2932 unsigned int attributes
; /* object attributes
*/
2933 VARARG(name
,unicode_str
); /* object name
*/
2935 obj_handle_t handle
; /* handle to the desktop
*/
2939 /* Open a handle to current input desktop
*/
2940 @
REQ(open_input_desktop
)
2941 unsigned int flags
; /* desktop flags
*/
2942 unsigned int access
; /* wanted access rights
*/
2943 unsigned int attributes
; /* object attributes
*/
2945 obj_handle_t handle
; /* handle to the desktop
*/
2949 /* Close a desktop
*/
2951 obj_handle_t handle
; /* handle to the desktop
*/
2955 /* Get the thread current desktop
*/
2956 @
REQ(get_thread_desktop
)
2957 thread_id_t tid
; /* thread id
*/
2959 obj_handle_t handle
; /* handle to the desktop
*/
2963 /* Set the thread current desktop
*/
2964 @
REQ(set_thread_desktop
)
2965 obj_handle_t handle
; /* handle to the desktop
*/
2969 /* Enumerate desktops
*/
2971 obj_handle_t winstation
; /* handle to the window station
*/
2972 unsigned int index
; /* current index
*/
2974 unsigned int next
; /* next index
*/
2975 VARARG(name
,unicode_str
); /* window station name
*/
2979 /* Get
/set information about a user
object (window station or desktop
) */
2980 @
REQ(set_user_object_info
)
2981 obj_handle_t handle
; /* handle to the object
*/
2982 unsigned int flags
; /* information to set
/get
*/
2983 unsigned int obj_flags
; /* new object flags
*/
2985 int is_desktop
; /* is object a desktop?
*/
2986 unsigned int old_obj_flags
; /* old object flags
*/
2987 VARARG(name
,unicode_str
); /* object name
*/
2989 #define SET_USER_OBJECT_SET_FLAGS
1
2990 #define SET_USER_OBJECT_GET_FULL_NAME
2
2993 /* Register a hotkey
*/
2994 @
REQ(register_hotkey
)
2995 user_handle_t window
; /* handle to the window
*/
2996 int id
; /* hotkey identifier
*/
2997 unsigned int flags
; /* modifier keys
*/
2998 unsigned int vkey
; /* virtual key code
*/
3000 int replaced
; /* did we replace an existing hotkey?
*/
3001 unsigned int flags
; /* flags of replaced hotkey
*/
3002 unsigned int vkey
; /* virtual key code of replaced hotkey
*/
3006 /* Unregister a hotkey
*/
3007 @
REQ(unregister_hotkey
)
3008 user_handle_t window
; /* handle to the window
*/
3009 int id
; /* hotkey identifier
*/
3011 unsigned int flags
; /* flags of removed hotkey
*/
3012 unsigned int vkey
; /* virtual key code of removed hotkey
*/
3016 /* Attach (or detach
) thread inputs
*/
3017 @
REQ(attach_thread_input
)
3018 thread_id_t tid_from
; /* thread to be attached
*/
3019 thread_id_t tid_to
; /* thread to which tid_from should be attached
*/
3020 int attach
; /* is it an attach?
*/
3024 /* Get input data for a given thread
*/
3025 @
REQ(get_thread_input
)
3026 thread_id_t tid
; /* id of thread
*/
3028 user_handle_t focus
; /* handle to the focus window
*/
3029 user_handle_t capture
; /* handle to the capture window
*/
3030 user_handle_t active
; /* handle to the active window
*/
3031 user_handle_t foreground
; /* handle to the global foreground window
*/
3032 user_handle_t menu_owner
; /* handle to the menu owner
*/
3033 user_handle_t move_size
; /* handle to the moving
/resizing window
*/
3034 user_handle_t caret
; /* handle to the caret window
*/
3035 user_handle_t cursor
; /* handle to the cursor
*/
3036 int show_count
; /* cursor show count
*/
3037 rectangle_t rect
; /* caret rectangle
*/
3041 /* Get the time of the last input event
*/
3042 @
REQ(get_last_input_time
)
3048 /* Retrieve queue keyboard state for a given thread
*/
3050 thread_id_t tid
; /* id of thread
*/
3051 int key
; /* optional key code or
-1 */
3053 unsigned char state
; /* state of specified key
*/
3054 VARARG(keystate
,bytes
); /* state array for all the keys
*/
3057 /* Set queue keyboard state for a given thread
*/
3059 thread_id_t tid
; /* id of thread
*/
3060 int async
; /* whether to change the async state too
*/
3061 VARARG(keystate
,bytes
); /* state array for all the keys
*/
3064 /* Set the system foreground window
*/
3065 @
REQ(set_foreground_window
)
3066 user_handle_t handle
; /* handle to the foreground window
*/
3068 user_handle_t previous
; /* handle to the previous foreground window
*/
3069 int send_msg_old
; /* whether we have to send a msg to the old window
*/
3070 int send_msg_new
; /* whether we have to send a msg to the new window
*/
3073 /* Set the current thread focus window
*/
3074 @
REQ(set_focus_window
)
3075 user_handle_t handle
; /* handle to the focus window
*/
3077 user_handle_t previous
; /* handle to the previous focus window
*/
3080 /* Set the current thread active window
*/
3081 @
REQ(set_active_window
)
3082 user_handle_t handle
; /* handle to the active window
*/
3084 user_handle_t previous
; /* handle to the previous active window
*/
3087 /* Set the current thread capture window
*/
3088 @
REQ(set_capture_window
)
3089 user_handle_t handle
; /* handle to the capture window
*/
3090 unsigned int flags
; /* capture
flags (see below
) */
3092 user_handle_t previous
; /* handle to the previous capture window
*/
3093 user_handle_t full_handle
; /* full
32-bit handle of new capture window
*/
3095 #define CAPTURE_MENU
0x01 /* capture is for a menu
*/
3096 #define CAPTURE_MOVESIZE
0x02 /* capture is for moving
/resizing
*/
3099 /* Set the current thread caret window
*/
3100 @
REQ(set_caret_window
)
3101 user_handle_t handle
; /* handle to the caret window
*/
3102 int width
; /* caret width
*/
3103 int height
; /* caret height
*/
3105 user_handle_t previous
; /* handle to the previous caret window
*/
3106 rectangle_t old_rect
; /* previous caret rectangle
*/
3107 int old_hide
; /* previous hide count
*/
3108 int old_state
; /* previous caret
state (1=on
, 0=off
) */
3112 /* Set the current thread caret information
*/
3113 @
REQ(set_caret_info
)
3114 unsigned int flags
; /* caret
flags (see below
) */
3115 user_handle_t handle
; /* handle to the caret window
*/
3116 int x
; /* caret x position
*/
3117 int y
; /* caret y position
*/
3118 int hide
; /* increment for hide
count (can be negative to show it
) */
3119 int state
; /* caret
state (see below
) */
3121 user_handle_t full_handle
; /* handle to the current caret window
*/
3122 rectangle_t old_rect
; /* previous caret rectangle
*/
3123 int old_hide
; /* previous hide count
*/
3124 int old_state
; /* previous caret
state (1=on
, 0=off
) */
3126 #define SET_CARET_POS
0x01 /* set the caret position from x
,y
*/
3127 #define SET_CARET_HIDE
0x02 /* increment the caret hide count
*/
3128 #define SET_CARET_STATE
0x04 /* set the caret on
/off state
*/
3131 CARET_STATE_OFF
, /* off
*/
3132 CARET_STATE_ON
, /* on
*/
3133 CARET_STATE_TOGGLE
, /* toggle current state
*/
3134 CARET_STATE_ON_IF_MOVED
/* on if the position differs
, unchanged otherwise
*/
3138 /* Set a window hook
*/
3140 int id
; /* id of the hook
*/
3141 process_id_t pid
; /* id of process to set the hook into
*/
3142 thread_id_t tid
; /* id of thread to set the hook into
*/
3145 client_ptr_t proc
; /* hook procedure
*/
3147 int unicode
; /* is it a unicode hook?
*/
3148 VARARG(module
,unicode_str
); /* module name
*/
3150 user_handle_t handle
; /* handle to the hook
*/
3151 unsigned int active_hooks
; /* active hooks bitmap
*/
3155 /* Remove a window hook
*/
3157 user_handle_t handle
; /* handle to the hook
*/
3158 client_ptr_t proc
; /* hook procedure if handle is
0 */
3159 int id
; /* id of the hook if handle is
0 */
3161 unsigned int active_hooks
; /* active hooks bitmap
*/
3165 /* Start calling a hook chain
*/
3166 @
REQ(start_hook_chain
)
3167 int id
; /* id of the hook
*/
3168 int event
; /* signalled event
*/
3169 user_handle_t window
; /* handle to the event window
*/
3170 int object_id
; /* object id for out of context winevent
*/
3171 int child_id
; /* child id for out of context winevent
*/
3173 user_handle_t handle
; /* handle to the next hook
*/
3174 process_id_t pid
; /* process id for low
-level keyboard
/mouse hooks
*/
3175 thread_id_t tid
; /* thread id for low
-level keyboard
/mouse hooks
*/
3176 int unicode
; /* is it a unicode hook?
*/
3177 client_ptr_t proc
; /* hook procedure
*/
3178 unsigned int active_hooks
; /* active hooks bitmap
*/
3179 VARARG(module
,unicode_str
); /* module name
*/
3183 /* Finished calling a hook chain
*/
3184 @
REQ(finish_hook_chain
)
3185 int id
; /* id of the hook
*/
3189 /* Get the hook information
*/
3191 user_handle_t handle
; /* handle to the current hook
*/
3192 int get_next
; /* do we want info about current or next hook?
*/
3193 int event
; /* signalled event
*/
3194 user_handle_t window
; /* handle to the event window
*/
3195 int object_id
; /* object id for out of context winevent
*/
3196 int child_id
; /* child id for out of context winevent
*/
3198 user_handle_t handle
; /* handle to the hook
*/
3199 int id
; /* id of the hook
*/
3200 process_id_t pid
; /* process id for low
-level keyboard
/mouse hooks
*/
3201 thread_id_t tid
; /* thread id for low
-level keyboard
/mouse hooks
*/
3202 client_ptr_t proc
; /* hook procedure
*/
3203 int unicode
; /* is it a unicode hook?
*/
3204 VARARG(module
,unicode_str
); /* module name
*/
3208 /* Create a window class
*/
3210 int local
; /* is it a local class?
*/
3211 atom_t atom
; /* class atom
*/
3212 unsigned int style
; /* class style
*/
3213 mod_handle_t instance
; /* module instance
*/
3214 int extra
; /* number of extra class bytes
*/
3215 int win_extra
; /* number of window extra bytes
*/
3216 client_ptr_t client_ptr
; /* pointer to class in client address space
*/
3217 data_size_t name_offset
; /* base class name offset for specified atom
*/
3218 VARARG(name
,unicode_str
); /* class name
*/
3220 atom_t atom
; /* resulting class atom
*/
3224 /* Destroy a window class
*/
3226 atom_t atom
; /* class atom
*/
3227 mod_handle_t instance
; /* module instance
*/
3228 VARARG(name
,unicode_str
); /* class name
*/
3230 client_ptr_t client_ptr
; /* pointer to class in client address space
*/
3234 /* Set some information in a class
*/
3235 @
REQ(set_class_info
)
3236 user_handle_t window
; /* handle to the window
*/
3237 unsigned int flags
; /* flags for info to
set (see below
) */
3238 atom_t atom
; /* class atom
*/
3239 unsigned int style
; /* class style
*/
3240 int win_extra
; /* number of window extra bytes
*/
3241 mod_handle_t instance
; /* module instance
*/
3242 int extra_offset
; /* offset to set in extra bytes
*/
3243 data_size_t extra_size
; /* size to set in extra bytes
*/
3244 lparam_t extra_value
; /* value to set in extra bytes
*/
3246 atom_t old_atom
; /* previous class atom
*/
3247 atom_t base_atom
; /* base class atom
*/
3248 mod_handle_t old_instance
; /* previous module instance
*/
3249 lparam_t old_extra_value
; /* old value in extra bytes
*/
3250 unsigned int old_style
; /* previous class style
*/
3251 int old_extra
; /* previous number of class extra bytes
*/
3252 int old_win_extra
; /* previous number of window extra bytes
*/
3254 #define SET_CLASS_ATOM
0x0001
3255 #define SET_CLASS_STYLE
0x0002
3256 #define SET_CLASS_WINEXTRA
0x0004
3257 #define SET_CLASS_INSTANCE
0x0008
3258 #define SET_CLASS_EXTRA
0x0010
3261 /* Open the clipboard
*/
3262 @
REQ(open_clipboard
)
3263 user_handle_t window
; /* clipboard window
*/
3265 user_handle_t owner
; /* current clipboard owner
*/
3269 /* Close the clipboard
*/
3270 @
REQ(close_clipboard
)
3272 user_handle_t viewer
; /* first clipboard viewer
*/
3273 user_handle_t owner
; /* current clipboard owner
*/
3277 /* Empty the clipboard and grab ownership
*/
3278 @
REQ(empty_clipboard
)
3282 /* Add a data format to the clipboard
*/
3283 @
REQ(set_clipboard_data
)
3284 unsigned int format
; /* clipboard format of the data
*/
3285 unsigned int lcid
; /* locale id to use for synthesizing text formats
*/
3286 VARARG(data
,bytes
); /* data contents
*/
3288 unsigned int seqno
; /* sequence number for the set data
*/
3292 /* Fetch a data format from the clipboard
*/
3293 @
REQ(get_clipboard_data
)
3294 unsigned int format
; /* clipboard format of the data
*/
3295 int render
; /* will we try to render it if missing?
*/
3296 int cached
; /* do we already have it in the client
-side cache?
*/
3297 unsigned int seqno
; /* sequence number for the data in the cache
*/
3299 unsigned int from
; /* for synthesized data
, format to generate it from
*/
3300 user_handle_t owner
; /* clipboard owner for delayed
-rendered formats
*/
3301 unsigned int seqno
; /* sequence number for the originally set data
*/
3302 data_size_t total
; /* total data size
*/
3303 VARARG(data
,bytes
); /* data contents
*/
3307 /* Retrieve a list of available formats
*/
3308 @
REQ(get_clipboard_formats
)
3309 unsigned int format
; /* specific format to query
, return all if
0 */
3311 unsigned int count
; /* count of available formats
*/
3312 VARARG(formats
,uints
); /* array of available formats
*/
3316 /* Retrieve the next available format
*/
3317 @
REQ(enum_clipboard_formats
)
3318 unsigned int previous
; /* previous format
, or first if
0 */
3320 unsigned int format
; /* next format
*/
3324 /* Release ownership of the clipboard
*/
3325 @
REQ(release_clipboard
)
3326 user_handle_t owner
; /* clipboard owner to release
*/
3328 user_handle_t viewer
; /* first clipboard viewer
*/
3329 user_handle_t owner
; /* current clipboard owner
*/
3333 /* Get clipboard information
*/
3334 @
REQ(get_clipboard_info
)
3336 user_handle_t window
; /* clipboard window
*/
3337 user_handle_t owner
; /* clipboard owner
*/
3338 user_handle_t viewer
; /* clipboard viewer
*/
3339 unsigned int seqno
; /* current sequence number
*/
3343 /* Set the clipboard viewer window
*/
3344 @
REQ(set_clipboard_viewer
)
3345 user_handle_t viewer
; /* clipboard viewer
*/
3346 user_handle_t previous
; /* if non
-zero
, check that this was the previous viewer
*/
3348 user_handle_t old_viewer
; /* previous clipboard viewer
*/
3349 user_handle_t owner
; /* clipboard owner
*/
3353 /* Add a clipboard listener window
*/
3354 @
REQ(add_clipboard_listener
)
3355 user_handle_t window
; /* clipboard listener window
*/
3359 /* Remove a clipboard listener window
*/
3360 @
REQ(remove_clipboard_listener
)
3361 user_handle_t window
; /* clipboard listener window
*/
3365 /* Open a security token
*/
3367 obj_handle_t handle
; /* handle to the thread or process
*/
3368 unsigned int access
; /* access rights to the new token
*/
3369 unsigned int attributes
;/* object attributes
*/
3370 unsigned int flags
; /* flags (see below
) */
3372 obj_handle_t token
; /* handle to the token
*/
3374 #define OPEN_TOKEN_THREAD
1
3375 #define OPEN_TOKEN_AS_SELF
2
3378 /* Set
/get the global windows
*/
3379 @
REQ(set_global_windows
)
3380 unsigned int flags
; /* flags for fields to
set (see below
) */
3381 user_handle_t shell_window
; /* handle to the new shell window
*/
3382 user_handle_t shell_listview
; /* handle to the new shell listview window
*/
3383 user_handle_t progman_window
; /* handle to the new program manager window
*/
3384 user_handle_t taskman_window
; /* handle to the new task manager window
*/
3386 user_handle_t old_shell_window
; /* handle to the shell window
*/
3387 user_handle_t old_shell_listview
; /* handle to the shell listview window
*/
3388 user_handle_t old_progman_window
; /* handle to the new program manager window
*/
3389 user_handle_t old_taskman_window
; /* handle to the new task manager window
*/
3391 #define SET_GLOBAL_SHELL_WINDOWS
0x01 /* set both main shell and listview windows
*/
3392 #define SET_GLOBAL_PROGMAN_WINDOW
0x02
3393 #define SET_GLOBAL_TASKMAN_WINDOW
0x04
3395 /* Adjust the privileges held by a token
*/
3396 @
REQ(adjust_token_privileges
)
3397 obj_handle_t handle
; /* handle to the token
*/
3398 int disable_all
; /* disable all privileges?
*/
3399 int get_modified_state
; /* get modified privileges?
*/
3400 VARARG(privileges
,LUID_AND_ATTRIBUTES
); /* privileges to enable
/disable
/remove
*/
3402 unsigned int len
; /* total length in bytes required to store token privileges
*/
3403 VARARG(privileges
,LUID_AND_ATTRIBUTES
); /* modified privileges
*/
3406 /* Retrieves the set of privileges held by or available to a token
*/
3407 @
REQ(get_token_privileges
)
3408 obj_handle_t handle
; /* handle to the token
*/
3410 unsigned int len
; /* total length in bytes required to store token privileges
*/
3411 VARARG(privileges
,LUID_AND_ATTRIBUTES
); /* privileges held by or available to a token
*/
3414 /* Check the token has the required privileges
*/
3415 @
REQ(check_token_privileges
)
3416 obj_handle_t handle
; /* handle to the token
*/
3417 int all_required
; /* are all the privileges required for the check to succeed?
*/
3418 VARARG(privileges
,LUID_AND_ATTRIBUTES
); /* privileges to check
*/
3420 int has_privileges
; /* does the token have the required privileges?
*/
3421 VARARG(privileges
,LUID_AND_ATTRIBUTES
); /* privileges held by or available to a token
*/
3424 @
REQ(duplicate_token
)
3425 obj_handle_t handle
; /* handle to the token to duplicate
*/
3426 unsigned int access
; /* access rights to the new token
*/
3427 int primary
; /* is the new token to be a primary one?
*/
3428 int impersonation_level
; /* impersonation level of the new token
*/
3429 VARARG(objattr
,object_attributes
); /* object attributes
*/
3431 obj_handle_t new_handle
; /* duplicated handle
*/
3435 obj_handle_t handle
; /* handle to the token
*/
3436 unsigned int desired_access
; /* desired access to the object
*/
3437 unsigned int mapping_read
; /* mapping from generic read to specific rights
*/
3438 unsigned int mapping_write
; /* mapping from generic write to specific rights
*/
3439 unsigned int mapping_execute
; /* mapping from generic execute to specific rights
*/
3440 unsigned int mapping_all
; /* mapping from generic all to specific rights
*/
3441 VARARG(sd
,security_descriptor
); /* security descriptor to check
*/
3443 unsigned int access_granted
; /* access rights actually granted
*/
3444 unsigned int access_status
; /* was access granted?
*/
3445 unsigned int privileges_len
; /* length needed to store privileges
*/
3446 VARARG(privileges
,LUID_AND_ATTRIBUTES
); /* privileges used during access check
*/
3450 obj_handle_t handle
; /* handle to the token
*/
3451 unsigned int which_sid
; /* which SID to retrieve from the token
*/
3453 data_size_t sid_len
; /* length needed to store sid
*/
3454 VARARG(sid
,SID
); /* the sid specified by which_sid from the token
*/
3457 @
REQ(get_token_groups
)
3458 obj_handle_t handle
; /* handle to the token
*/
3460 data_size_t user_len
; /* length needed to store user
*/
3461 VARARG(user
,token_groups
); /* groups the token
's user belongs to */
3464 @REQ(get_token_default_dacl)
3465 obj_handle_t handle; /* handle to the token */
3467 data_size_t acl_len; /* length needed to store access control list */
3468 VARARG(acl,ACL); /* access control list */
3471 @REQ(set_token_default_dacl)
3472 obj_handle_t handle; /* handle to the token */
3473 VARARG(acl,ACL); /* default dacl to set */
3476 @REQ(set_security_object)
3477 obj_handle_t handle; /* handle to the object */
3478 unsigned int security_info; /* which parts of security descriptor to set */
3479 VARARG(sd,security_descriptor); /* security descriptor to set */
3482 @REQ(get_security_object)
3483 obj_handle_t handle; /* handle to the object */
3484 unsigned int security_info; /* which parts of security descriptor to get */
3486 unsigned int sd_len; /* buffer size needed for sd */
3487 VARARG(sd,security_descriptor); /* retrieved security descriptor */
3494 obj_handle_t handle;
3495 unsigned int access;
3498 /* Return a list of all opened handles */
3499 @REQ(get_system_handles)
3501 unsigned int count; /* number of handles */
3502 VARARG(data,handle_infos); /* array of handle_infos */
3506 /* Create a mailslot */
3507 @REQ(create_mailslot)
3508 unsigned int access; /* wanted access rights */
3509 timeout_t read_timeout;
3510 unsigned int max_msgsize;
3511 VARARG(objattr,object_attributes); /* object attributes */
3513 obj_handle_t handle; /* handle to the mailslot */
3517 /* Set mailslot information */
3518 @REQ(set_mailslot_info)
3519 obj_handle_t handle; /* handle to the mailslot */
3520 timeout_t read_timeout;
3523 timeout_t read_timeout;
3524 unsigned int max_msgsize;
3526 #define MAILSLOT_SET_READ_TIMEOUT 1
3529 /* Create a directory object */
3530 @REQ(create_directory)
3531 unsigned int access; /* access flags */
3532 VARARG(objattr,object_attributes); /* object attributes */
3534 obj_handle_t handle; /* handle to the directory */
3538 /* Open a directory object */
3539 @REQ(open_directory)
3540 unsigned int access; /* access flags */
3541 unsigned int attributes; /* object attributes */
3542 obj_handle_t rootdir; /* root directory */
3543 VARARG(directory_name,unicode_str); /* Directory name */
3545 obj_handle_t handle; /* handle to the directory */
3549 /* Get a directory entry by index */
3550 @REQ(get_directory_entry)
3551 obj_handle_t handle; /* handle to the directory */
3552 unsigned int index; /* entry index */
3554 data_size_t name_len; /* length of the entry name in bytes */
3555 VARARG(name,unicode_str,name_len); /* entry name */
3556 VARARG(type,unicode_str); /* entry type */
3560 /* Create a symbolic link object */
3561 @REQ(create_symlink)
3562 unsigned int access; /* access flags */
3563 VARARG(objattr,object_attributes); /* object attributes */
3564 VARARG(target_name,unicode_str); /* target name */
3566 obj_handle_t handle; /* handle to the symlink */
3570 /* Open a symbolic link object */
3572 unsigned int access; /* access flags */
3573 unsigned int attributes; /* object attributes */
3574 obj_handle_t rootdir; /* root directory */
3575 VARARG(name,unicode_str); /* symlink name */
3577 obj_handle_t handle; /* handle to the symlink */
3581 /* Query a symbolic link object */
3583 obj_handle_t handle; /* handle to the symlink */
3585 data_size_t total; /* total needed size for name */
3586 VARARG(target_name,unicode_str); /* target name */
3590 /* Query basic object information */
3591 @REQ(get_object_info)
3592 obj_handle_t handle; /* handle to the object */
3594 unsigned int access; /* granted access mask */
3595 unsigned int ref_count; /* object ref count */
3596 unsigned int handle_count; /* object handle count */
3597 data_size_t total; /* total needed size for name */
3598 VARARG(name,unicode_str); /* object name */
3602 /* Query object type name information */
3603 @REQ(get_object_type)
3604 obj_handle_t handle; /* handle to the object */
3606 data_size_t total; /* needed size for type name */
3607 VARARG(type,unicode_str); /* type name */
3611 /* Unlink a named object */
3613 obj_handle_t handle; /* handle to the object */
3617 /* Query the impersonation level of an impersonation token */
3618 @REQ(get_token_impersonation_level)
3619 obj_handle_t handle; /* handle to the object */
3621 int impersonation_level; /* impersonation level of the impersonation token */
3624 /* Allocate a locally-unique identifier */
3625 @REQ(allocate_locally_unique_id)
3631 /* Create a device manager */
3632 @REQ(create_device_manager)
3633 unsigned int access; /* wanted access rights */
3634 unsigned int attributes; /* object attributes */
3636 obj_handle_t handle; /* handle to the device */
3640 /* Create a device */
3642 obj_handle_t rootdir; /* root directory */
3643 client_ptr_t user_ptr; /* opaque ptr for use by client */
3644 obj_handle_t manager; /* device manager */
3645 VARARG(name,unicode_str); /* object name */
3649 /* Delete a device */
3651 obj_handle_t manager; /* handle to the device manager */
3652 client_ptr_t device; /* pointer to the device */
3656 /* Retrieve the next pending device irp request */
3657 @REQ(get_next_device_request)
3658 obj_handle_t manager; /* handle to the device manager */
3659 obj_handle_t prev; /* handle to the previous irp */
3660 unsigned int status; /* status of the previous irp */
3661 client_ptr_t user_ptr; /* user pointer of the previous irp */
3663 irp_params_t params; /* irp parameters */
3664 obj_handle_t next; /* handle to the next irp */
3665 thread_id_t client_tid; /* tid of thread calling irp */
3666 client_ptr_t client_thread; /* pointer to thread object of calling irp */
3667 data_size_t in_size; /* total needed input size */
3668 VARARG(next_data,bytes); /* input data of the next irp */
3672 /* Get kernel pointer from server object */
3673 @REQ(get_kernel_object_ptr)
3674 obj_handle_t manager; /* handle to the device manager */
3675 obj_handle_t handle; /* object handle */
3677 client_ptr_t user_ptr; /* kernel object pointer */
3681 /* Associate kernel pointer with server object */
3682 @REQ(set_kernel_object_ptr)
3683 obj_handle_t manager; /* handle to the device manager */
3684 obj_handle_t handle; /* object handle */
3685 client_ptr_t user_ptr; /* kernel object pointer */
3689 /* Grab server object reference from kernel object pointer */
3690 @REQ(grab_kernel_object)
3691 obj_handle_t manager; /* handle to the device manager */
3692 client_ptr_t user_ptr; /* kernel object pointer */
3696 /* Release server object reference from kernel object pointer */
3697 @REQ(release_kernel_object)
3698 obj_handle_t manager; /* handle to the device manager */
3699 client_ptr_t user_ptr; /* kernel object pointer */
3703 /* Get handle from kernel object pointer */
3704 @REQ(get_kernel_object_handle)
3705 obj_handle_t manager; /* handle to the device manager */
3706 client_ptr_t user_ptr; /* kernel object pointer */
3707 unsigned int access; /* wanted access rights */
3709 obj_handle_t handle; /* kernel object handle */
3713 /* Make the current process a system process */
3714 @REQ(make_process_system)
3716 obj_handle_t event; /* event signaled when all user processes have exited */
3720 /* Get detailed fixed-size information about a token */
3721 @REQ(get_token_statistics)
3722 obj_handle_t handle; /* handle to the object */
3724 luid_t token_id; /* locally-unique identifier of the token */
3725 luid_t modified_id; /* locally-unique identifier of the modified version of the token */
3726 int primary; /* is the token primary or impersonation? */
3727 int impersonation_level; /* level of impersonation */
3728 int group_count; /* the number of groups the token is a member of */
3729 int privilege_count; /* the number of privileges the token has */
3733 /* Create I/O completion port */
3734 @REQ(create_completion)
3735 unsigned int access; /* desired access to a port */
3736 unsigned int concurrent; /* max number of concurrent active threads */
3737 VARARG(objattr,object_attributes); /* object attributes */
3739 obj_handle_t handle; /* port handle */
3743 /* Open I/O completion port */
3744 @REQ(open_completion)
3745 unsigned int access; /* desired access to a port */
3746 unsigned int attributes; /* object attributes */
3747 obj_handle_t rootdir; /* root directory */
3748 VARARG(filename,unicode_str); /* port name */
3750 obj_handle_t handle; /* port handle */
3754 /* add completion to completion port */
3755 @REQ(add_completion)
3756 obj_handle_t handle; /* port handle */
3757 apc_param_t ckey; /* completion key */
3758 apc_param_t cvalue; /* completion value */
3759 apc_param_t information; /* IO_STATUS_BLOCK Information */
3760 unsigned int status; /* completion result */
3764 /* get completion from completion port queue */
3765 @REQ(remove_completion)
3766 obj_handle_t handle; /* port handle */
3768 apc_param_t ckey; /* completion key */
3769 apc_param_t cvalue; /* completion value */
3770 apc_param_t information; /* IO_STATUS_BLOCK Information */
3771 unsigned int status; /* completion result */
3775 /* get completion queue depth */
3776 @REQ(query_completion)
3777 obj_handle_t handle; /* port handle */
3779 unsigned int depth; /* completion queue depth */
3783 /* associate object with completion port */
3784 @REQ(set_completion_info)
3785 obj_handle_t handle; /* object handle */
3786 apc_param_t ckey; /* completion key */
3787 obj_handle_t chandle; /* port handle */
3791 /* check for associated completion and push msg */
3792 @REQ(add_fd_completion)
3793 obj_handle_t handle; /* async' object
*/
3794 apc_param_t cvalue
; /* completion value
*/
3795 apc_param_t information
; /* IO_STATUS_BLOCK Information
*/
3796 unsigned int status
; /* completion status
*/
3797 int async
; /* completion is an async result
*/
3801 /* set fd completion information
*/
3802 @
REQ(set_fd_completion_mode
)
3803 obj_handle_t handle
; /* handle to a file or directory
*/
3804 unsigned int flags
; /* completion notification flags
*/
3808 /* set fd disposition information
*/
3809 @
REQ(set_fd_disp_info
)
3810 obj_handle_t handle
; /* handle to a file or directory
*/
3811 int unlink
; /* whether to unlink file on close
*/
3815 /* set fd name information
*/
3816 @
REQ(set_fd_name_info
)
3817 obj_handle_t handle
; /* handle to a file or directory
*/
3818 obj_handle_t rootdir
; /* root directory
*/
3819 int link
; /* link instead of renaming
*/
3820 int replace
; /* replace an existing file?
*/
3821 VARARG(filename
,string
); /* new file name
*/
3825 /* Retrieve layered info for a window
*/
3826 @
REQ(get_window_layered_info
)
3827 user_handle_t handle
; /* handle to the window
*/
3829 unsigned int color_key
; /* color key
*/
3830 unsigned int alpha
; /* alpha (0.
.255) */
3831 unsigned int flags
; /* LWA_
* flags
*/
3835 /* Set layered info for a window
*/
3836 @
REQ(set_window_layered_info
)
3837 user_handle_t handle
; /* handle to the window
*/
3838 unsigned int color_key
; /* color key
*/
3839 unsigned int alpha
; /* alpha (0.
.255) */
3840 unsigned int flags
; /* LWA_
* flags
*/
3844 /* Allocate an arbitrary user handle
*/
3845 @
REQ(alloc_user_handle
)
3847 user_handle_t handle
; /* allocated handle
*/
3851 /* Free an arbitrary user handle
*/
3852 @
REQ(free_user_handle
)
3853 user_handle_t handle
; /* handle to free
*/
3857 /* Set
/get the current cursor
*/
3859 unsigned int flags
; /* flags for fields to
set (see below
) */
3860 user_handle_t handle
; /* handle to the cursor
*/
3861 int show_count
; /* show count increment
/decrement
*/
3862 int x
; /* cursor position
*/
3864 rectangle_t clip
; /* cursor clip rectangle
*/
3865 unsigned int clip_msg
; /* message to post on cursor clip changes
*/
3867 user_handle_t prev_handle
; /* previous handle
*/
3868 int prev_count
; /* previous show count
*/
3869 int prev_x
; /* previous position
*/
3871 int new_x
; /* new position
*/
3873 rectangle_t new_clip
; /* new clip rectangle
*/
3874 unsigned int last_change
; /* time of last position change
*/
3876 #define SET_CURSOR_HANDLE
0x01
3877 #define SET_CURSOR_COUNT
0x02
3878 #define SET_CURSOR_POS
0x04
3879 #define SET_CURSOR_CLIP
0x08
3880 #define SET_CURSOR_NOCLIP
0x10
3883 /* Modify the list of registered rawinput devices
*/
3884 @
REQ(update_rawinput_devices
)
3885 VARARG(devices
,rawinput_devices
);
3889 /* Create a new job object
*/
3891 unsigned int access
; /* wanted access rights
*/
3892 VARARG(objattr
,object_attributes
); /* object attributes
*/
3894 obj_handle_t handle
; /* handle to the job
*/
3898 /* Open a job object
*/
3900 unsigned int access
; /* wanted access rights
*/
3901 unsigned int attributes
; /* object attributes
*/
3902 obj_handle_t rootdir
; /* root directory
*/
3903 VARARG(name
,unicode_str
); /* object name
*/
3905 obj_handle_t handle
; /* handle to the job
*/
3909 /* Assign a job object to a process
*/
3911 obj_handle_t job
; /* handle to the job
*/
3912 obj_handle_t process
; /* handle to the process
*/
3916 /* Check if a process is associated with a job
*/
3917 @
REQ(process_in_job
)
3918 obj_handle_t job
; /* handle to the job
*/
3919 obj_handle_t process
; /* handle to the process
*/
3923 /* Set limit flags on a job
*/
3924 @
REQ(set_job_limits
)
3925 obj_handle_t handle
; /* handle to the job
*/
3926 unsigned int limit_flags
; /* new limit flags
*/
3930 /* Set new completion port for a job
*/
3931 @
REQ(set_job_completion_port
)
3932 obj_handle_t job
; /* handle to the job
*/
3933 obj_handle_t port
; /* handle to the completion port
*/
3934 client_ptr_t key
; /* key to send with completion messages
*/
3938 /* Terminate all processes associated with the job
*/
3940 obj_handle_t handle
; /* handle to the job
*/
3941 int status
; /* process exit code
*/
3945 /* Suspend a process
*/
3946 @
REQ(suspend_process
)
3947 obj_handle_t handle
; /* process handle
*/
3951 /* Resume a process
*/
3952 @
REQ(resume_process
)
3953 obj_handle_t handle
; /* process handle
*/