3 * Wine server protocol definition
5 * Copyright (C
) 2001 Alexandre Julliard
7 * This file is used by tools
/make_requests to build the
8 * protocol structures in include
/wine
/server_protocol.h
10 * This library is free software
; you can redistribute it and
/or
11 * modify it under the terms of the GNU Lesser General Public
12 * License as published by the Free Software Foundation
; either
13 * version
2.1 of the License
, or (at your option
) any later version.
15 * This library is distributed in the hope that it will be useful
,
16 * but WITHOUT ANY WARRANTY
; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU
18 * Lesser General Public License for more details.
20 * You should have received a copy of the GNU Lesser General Public
21 * License along with this library
; if not
, write to the Free Software
22 * Foundation
, Inc.
, 51 Franklin St
, Fifth Floor
, Boston
, MA
02110-1301, USA
25 @HEADER
/* start of C declarations
*/
34 typedef unsigned int obj_handle_t
;
35 typedef unsigned int user_handle_t
;
36 typedef unsigned int atom_t
;
37 typedef unsigned int process_id_t
;
38 typedef unsigned int thread_id_t
;
39 typedef unsigned int data_size_t
;
40 typedef unsigned int ioctl_code_t
;
41 typedef unsigned __int64 lparam_t
;
42 typedef unsigned __int64 apc_param_t
;
43 typedef unsigned __int64 mem_size_t
;
44 typedef unsigned __int64 file_pos_t
;
45 typedef unsigned __int64 client_ptr_t
;
46 typedef unsigned __int64 affinity_t
;
47 typedef client_ptr_t mod_handle_t
;
51 int req
; /* request code
*/
52 data_size_t request_size
; /* request variable part size
*/
53 data_size_t reply_size
; /* reply variable part maximum size
*/
58 unsigned int error
; /* error result
*/
59 data_size_t reply_size
; /* reply variable part size
*/
62 /* placeholder structure for the maximum allowed request size
*/
63 /* this is used to construct the generic_request union
*/
64 struct request_max_size
66 int pad
[16]; /* the max request size is
16 ints
*/
69 #define FIRST_USER_HANDLE
0x0020 /* first possible value for low word of user handle
*/
70 #define LAST_USER_HANDLE
0xffef /* last possible value for low word of user handle
*/
73 /* debug event data
*/
76 int code
; /* event code
*/
79 int code
; /* EXCEPTION_DEBUG_EVENT
*/
80 int first
; /* first chance exception?
*/
81 unsigned int exc_code
; /* exception code
*/
82 unsigned int flags
; /* exception flags
*/
83 client_ptr_t record
; /* exception record
*/
84 client_ptr_t address
; /* exception address
*/
85 int nb_params
; /* number of parameters
*/
87 client_ptr_t params
[15]; /* parameters
*/
91 int code
; /* CREATE_THREAD_DEBUG_EVENT
*/
92 obj_handle_t handle
; /* handle to the new thread
*/
93 client_ptr_t teb
; /* thread
teb (in debugged process address space
) */
94 client_ptr_t start
; /* thread startup routine
*/
98 int code
; /* CREATE_PROCESS_DEBUG_EVENT
*/
99 obj_handle_t file
; /* handle to the process exe file
*/
100 obj_handle_t process
; /* handle to the new process
*/
101 obj_handle_t thread
; /* handle to the new thread
*/
102 mod_handle_t base
; /* base of executable image
*/
103 int dbg_offset
; /* offset of debug info in file
*/
104 int dbg_size
; /* size of debug info
*/
105 client_ptr_t teb
; /* thread
teb (in debugged process address space
) */
106 client_ptr_t start
; /* thread startup routine
*/
107 client_ptr_t name
; /* image
name (optional
) */
108 int unicode
; /* is it Unicode?
*/
112 int code
; /* EXIT_THREAD_DEBUG_EVENT
/EXIT_PROCESS_DEBUG_EVENT
*/
113 int exit_code
; /* thread or process exit code
*/
117 int code
; /* LOAD_DLL_DEBUG_EVENT
*/
118 obj_handle_t handle
; /* file handle for the dll
*/
119 mod_handle_t base
; /* base address of the dll
*/
120 int dbg_offset
; /* offset of debug info in file
*/
121 int dbg_size
; /* size of debug info
*/
122 client_ptr_t name
; /* image
name (optional
) */
123 int unicode
; /* is it Unicode?
*/
127 int code
; /* UNLOAD_DLL_DEBUG_EVENT
*/
129 mod_handle_t base
; /* base address of the dll
*/
133 /* supported CPU types
*/
136 CPU_x86
, CPU_x86_64
, CPU_POWERPC
, CPU_ARM
, CPU_ARM64
138 typedef int client_cpu_t
;
143 client_cpu_t cpu
; /* cpu type
*/
144 unsigned int flags
; /* SERVER_CTX_
* flags
*/
147 struct
{ unsigned int eip
, ebp
, esp
, eflags
, cs
, ss
; } i386_regs
;
148 struct
{ unsigned __int64 rip
, rbp
, rsp
;
149 unsigned int cs
, ss
, flags
, __pad
; } x86_64_regs
;
150 struct
{ unsigned int iar
, msr
, ctr
, lr
, dar
, dsisr
, trap
, __pad
; } powerpc_regs
;
151 struct
{ unsigned int sp
, lr
, pc
, cpsr
; } arm_regs
;
152 struct
{ unsigned __int64 sp
, pc
, pstate
; } arm64_regs
;
153 } ctl
; /* selected by SERVER_CTX_CONTROL
*/
156 struct
{ unsigned int eax
, ebx
, ecx
, edx
, esi
, edi
; } i386_regs
;
157 struct
{ unsigned __int64 rax
,rbx
, rcx
, rdx
, rsi
, rdi
,
158 r8
, r9
, r10
, r11
, r12
, r13
, r14
, r15
; } x86_64_regs
;
159 struct
{ unsigned int gpr
[32], cr
, xer
; } powerpc_regs
;
160 struct
{ unsigned int r
[13]; } arm_regs
;
161 struct
{ unsigned __int64 x
[31]; } arm64_regs
;
162 } integer
; /* selected by SERVER_CTX_INTEGER
*/
165 struct
{ unsigned int ds
, es
, fs
, gs
; } i386_regs
;
166 struct
{ unsigned int ds
, es
, fs
, gs
; } x86_64_regs
;
167 } seg
; /* selected by SERVER_CTX_SEGMENTS
*/
170 struct
{ unsigned int ctrl
, status
, tag
, err_off
, err_sel
, data_off
, data_sel
, cr0npx
;
171 unsigned char regs
[80]; } i386_regs
;
172 struct
{ struct
{ unsigned __int64 low
, high
; } fpregs
[32]; } x86_64_regs
;
173 struct
{ double fpr
[32], fpscr
; } powerpc_regs
;
174 struct
{ unsigned __int64 d
[32]; unsigned int fpscr
; } arm_regs
;
175 struct
{ struct
{ unsigned __int64 low
, high
; } q
[32]; unsigned int fpcr
, fpsr
; } arm64_regs
;
176 } fp
; /* selected by SERVER_CTX_FLOATING_POINT
*/
179 struct
{ unsigned int dr0
, dr1
, dr2
, dr3
, dr6
, dr7
; } i386_regs
;
180 struct
{ unsigned __int64 dr0
, dr1
, dr2
, dr3
, dr6
, dr7
; } x86_64_regs
;
181 struct
{ unsigned int dr
[8]; } powerpc_regs
;
182 struct
{ unsigned int bvr
[8], bcr
[8], wvr
[1], wcr
[1]; } arm_regs
;
183 struct
{ unsigned __int64 bvr
[8], wvr
[2]; unsigned int bcr
[8], wcr
[2]; } arm64_regs
;
184 } debug
; /* selected by SERVER_CTX_DEBUG_REGISTERS
*/
187 unsigned char i386_regs
[512];
188 } ext
; /* selected by SERVER_CTX_EXTENDED_REGISTERS
*/
191 #define SERVER_CTX_CONTROL
0x01
192 #define SERVER_CTX_INTEGER
0x02
193 #define SERVER_CTX_SEGMENTS
0x04
194 #define SERVER_CTX_FLOATING_POINT
0x08
195 #define SERVER_CTX_DEBUG_REGISTERS
0x10
196 #define SERVER_CTX_EXTENDED_REGISTERS
0x20
198 /* structure used in sending an fd from client to server
*/
201 thread_id_t tid
; /* thread id
*/
202 int fd
; /* file descriptor on client
-side
*/
205 /* structure sent by the server on the wait fifo
*/
208 client_ptr_t cookie
; /* magic cookie that was passed in select_request
*/
209 int signaled
; /* wait result
*/
213 /* NT
-style timeout
, in
100ns units
, negative means relative timeout
*/
214 typedef __int64 timeout_t
;
215 #define
TIMEOUT_INFINITE (((timeout_t
)0x7fffffff) << 32 |
0xffffffff)
217 /* absolute timeout
, negative means that monotonic clock is used
*/
218 typedef __int64 abstime_t
;
220 /* structure for process startup info
*/
223 unsigned int debug_flags
;
224 unsigned int console_flags
;
225 obj_handle_t console
;
227 obj_handle_t hstdout
;
228 obj_handle_t hstderr
;
235 unsigned int attribute
;
238 data_size_t curdir_len
;
239 data_size_t dllpath_len
;
240 data_size_t imagepath_len
;
241 data_size_t cmdline_len
;
242 data_size_t title_len
;
243 data_size_t desktop_len
;
244 data_size_t shellinfo_len
;
245 data_size_t runtime_len
;
246 /* VARARG(curdir
,unicode_str
,curdir_len
); */
247 /* VARARG(dllpath
,unicode_str
,dllpath_len
); */
248 /* VARARG(imagepath
,unicode_str
,imagepath_len
); */
249 /* VARARG(cmdline
,unicode_str
,cmdline_len
); */
250 /* VARARG(title
,unicode_str
,title_len
); */
251 /* VARARG(desktop
,unicode_str
,desktop_len
); */
252 /* VARARG(shellinfo
,unicode_str
,shellinfo_len
); */
253 /* VARARG(runtime
,unicode_str
,runtime_len
); */
256 /* structure returned in the list of window properties
*/
259 atom_t atom
; /* property atom
*/
260 int string
; /* was atom a string originally?
*/
261 lparam_t data
; /* data stored in property
*/
264 /* structure to specify window rectangles
*/
273 /* structure for parameters of async I
/O calls
*/
276 obj_handle_t handle
; /* object to perform I
/O on
*/
277 obj_handle_t event
; /* event to signal when done
*/
278 client_ptr_t iosb
; /* I
/O status block in client addr space
*/
279 client_ptr_t user
; /* opaque user data containing callback pointer and async
-specific data
*/
280 client_ptr_t apc
; /* user APC to call
*/
281 apc_param_t apc_context
; /* user APC context or completion value
*/
284 /* structures for extra message data
*/
288 unsigned int device
; /* source
device (IMDT_
* values
) */
289 unsigned int origin
; /* source
origin (IMO_
* values
) */
292 struct hardware_msg_data
294 lparam_t info
; /* extra info
*/
295 unsigned int hw_id
; /* unique id
*/
296 unsigned int flags
; /* hook flags
*/
297 struct hw_msg_source source
; /* message source
*/
303 int type
; /* RIM_TYPEKEYBOARD
*/
304 unsigned int message
; /* message generated by this rawinput event
*/
305 unsigned short vkey
; /* virtual key code
*/
306 unsigned short scan
; /* scan code
*/
310 int type
; /* RIM_TYPEMOUSE
*/
311 int x
; /* x coordinate
*/
312 int y
; /* y coordinate
*/
313 unsigned int data
; /* mouse data
*/
318 struct callback_msg_data
320 client_ptr_t callback
; /* callback function
*/
321 lparam_t data
; /* user data for callback
*/
322 lparam_t result
; /* message result
*/
325 struct winevent_msg_data
327 user_handle_t hook
; /* hook handle
*/
328 thread_id_t tid
; /* thread id
*/
329 client_ptr_t hook_proc
; /* hook proc address
*/
330 /* followed by module name if any
*/
338 int type
; /* INPUT_KEYBOARD
*/
339 unsigned short vkey
; /* virtual key code
*/
340 unsigned short scan
; /* scan code
*/
341 unsigned int flags
; /* event flags
*/
342 unsigned int time
; /* event time
*/
343 lparam_t info
; /* extra info
*/
347 int type
; /* INPUT_MOUSE
*/
348 int x
; /* coordinates
*/
350 unsigned int data
; /* mouse data
*/
351 unsigned int flags
; /* event flags
*/
352 unsigned int time
; /* event time
*/
353 lparam_t info
; /* extra info
*/
357 int type
; /* INPUT_HARDWARE
*/
358 unsigned int msg
; /* message code
*/
359 lparam_t lparam
; /* message param
*/
365 unsigned char bytes
[1]; /* raw data for sent messages
*/
366 struct hardware_msg_data hardware
;
367 struct callback_msg_data callback
;
368 struct winevent_msg_data winevent
;
371 /* structure for console char
/attribute info
*/
378 /* structure returned in filesystem events
*/
379 struct filesystem_event
388 unsigned int low_part
;
392 #define MAX_ACL_LEN
65535
394 struct security_descriptor
396 unsigned int control
; /* SE_ flags
*/
397 data_size_t owner_len
;
398 data_size_t group_len
;
399 data_size_t sacl_len
;
400 data_size_t dacl_len
;
401 /* VARARG(owner
,SID
); */
402 /* VARARG(group
,SID
); */
403 /* VARARG(sacl
,ACL
); */
404 /* VARARG(dacl
,ACL
); */
407 struct object_attributes
409 obj_handle_t rootdir
; /* root directory
*/
410 unsigned int attributes
; /* object attributes
*/
411 data_size_t sd_len
; /* length of security_descriptor data. may be
0 */
412 data_size_t name_len
; /* length of the name string. may be
0 */
413 /* VARARG(sd
,security_descriptor
); */
414 /* VARARG(name
,unicode_str
); */
420 /* unsigned int attributes
[count
]; */
421 /* VARARG(sids
,SID
); */
429 SELECT_SIGNAL_AND_WAIT
,
430 SELECT_KEYED_EVENT_WAIT
,
431 SELECT_KEYED_EVENT_RELEASE
439 enum select_op op
; /* SELECT_WAIT or SELECT_WAIT_ALL
*/
440 obj_handle_t handles
[MAXIMUM_WAIT_OBJECTS
];
444 enum select_op op
; /* SELECT_SIGNAL_AND_WAIT
*/
446 obj_handle_t signal
; /* must be last in the structure so we can remove it on retries
*/
450 enum select_op op
; /* SELECT_KEYED_EVENT_WAIT or SELECT_KEYED_EVENT_RELEASE
*/
480 enum apc_type type
; /* APC_USER
*/
482 client_ptr_t func
; /* void (__stdcall
*func
)(ULONG_PTR
,ULONG_PTR
,ULONG_PTR
); */
483 apc_param_t args
[3]; /* arguments for user function
*/
487 enum apc_type type
; /* APC_TIMER
*/
489 client_ptr_t func
; /* void (__stdcall
*func
)(void
*, unsigned int
, unsigned int
); */
490 abstime_t time
; /* time of expiration
*/
491 client_ptr_t arg
; /* user argument
*/
501 enum apc_type type
; /* APC_ASYNC_IO
*/
502 unsigned int status
; /* I
/O status
*/
503 client_ptr_t user
; /* user pointer
*/
504 client_ptr_t sb
; /* status block
*/
508 enum apc_type type
; /* APC_VIRTUAL_ALLOC
*/
509 unsigned int op_type
; /* type of operation
*/
510 client_ptr_t addr
; /* requested address
*/
511 mem_size_t size
; /* allocation size
*/
512 mem_size_t zero_bits
; /* number of zero high bits
*/
513 unsigned int prot
; /* memory protection flags
*/
517 enum apc_type type
; /* APC_VIRTUAL_FREE
*/
518 unsigned int op_type
; /* type of operation
*/
519 client_ptr_t addr
; /* requested address
*/
520 mem_size_t size
; /* allocation size
*/
524 enum apc_type type
; /* APC_VIRTUAL_QUERY
*/
526 client_ptr_t addr
; /* requested address
*/
530 enum apc_type type
; /* APC_VIRTUAL_PROTECT
*/
531 unsigned int prot
; /* new protection flags
*/
532 client_ptr_t addr
; /* requested address
*/
533 mem_size_t size
; /* requested size
*/
537 enum apc_type type
; /* APC_VIRTUAL_FLUSH
*/
539 client_ptr_t addr
; /* requested address
*/
540 mem_size_t size
; /* requested size
*/
544 enum apc_type type
; /* APC_VIRTUAL_LOCK
*/
546 client_ptr_t addr
; /* requested address
*/
547 mem_size_t size
; /* requested size
*/
551 enum apc_type type
; /* APC_VIRTUAL_UNLOCK
*/
553 client_ptr_t addr
; /* requested address
*/
554 mem_size_t size
; /* requested size
*/
558 enum apc_type type
; /* APC_MAP_VIEW
*/
559 obj_handle_t handle
; /* mapping handle
*/
560 client_ptr_t addr
; /* requested address
*/
561 mem_size_t size
; /* allocation size
*/
562 file_pos_t offset
; /* file offset
*/
563 mem_size_t zero_bits
; /* number of zero high bits
*/
564 unsigned int alloc_type
; /* allocation type
*/
565 unsigned int prot
; /* memory protection flags
*/
569 enum apc_type type
; /* APC_UNMAP_VIEW
*/
571 client_ptr_t addr
; /* view address
*/
575 enum apc_type type
; /* APC_CREATE_THREAD
*/
576 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
*/
858 int suspend
; /* is process suspended?
*/
862 /* Initialize a thread
; called from the child after
fork()/clone() */
864 int unix_pid
; /* Unix pid of new thread
*/
865 int unix_tid
; /* Unix tid of new thread
*/
866 int debug_level
; /* new debug level
*/
867 client_ptr_t teb
; /* TEB of new
thread (in thread address space
) */
868 client_ptr_t entry
; /* entry point or PEB if initial
thread (in thread address space
) */
869 int reply_fd
; /* fd for reply pipe
*/
870 int wait_fd
; /* fd for blocking calls pipe
*/
871 client_cpu_t cpu
; /* CPU that this thread is running on
*/
873 process_id_t pid
; /* process id of the new thread
's process */
874 thread_id_t tid; /* thread id of the new thread */
875 timeout_t server_start; /* server start time */
876 data_size_t info_size; /* total size of startup info */
877 int version; /* protocol version */
878 unsigned int all_cpus; /* bitset of supported CPUs */
879 int suspend; /* is thread suspended? */
883 /* Terminate a process */
884 @REQ(terminate_process)
885 obj_handle_t handle; /* process handle to terminate */
886 int exit_code; /* process exit code */
888 int self; /* suicide? */
892 /* Terminate a thread */
893 @REQ(terminate_thread)
894 obj_handle_t handle; /* thread handle to terminate */
895 int exit_code; /* thread exit code */
897 int self; /* suicide? */
901 /* Retrieve information about a process */
902 @REQ(get_process_info)
903 obj_handle_t handle; /* process handle */
905 process_id_t pid; /* server process id */
906 process_id_t ppid; /* server process id of parent */
907 affinity_t affinity; /* process affinity mask */
908 client_ptr_t peb; /* PEB address in process address space */
909 timeout_t start_time; /* process start time */
910 timeout_t end_time; /* process end time */
911 int exit_code; /* process exit code */
912 int priority; /* priority class */
913 client_cpu_t cpu; /* CPU that this process is running on */
914 short int debugger_present; /* process is being debugged */
915 short int debug_children; /* inherit debugger to child processes */
916 VARARG(image,pe_image_info); /* image info for main exe */
920 /* Retrieve information about a process memory usage */
921 @REQ(get_process_vm_counters)
922 obj_handle_t handle; /* process handle */
924 mem_size_t peak_virtual_size; /* peak virtual memory in bytes */
925 mem_size_t virtual_size; /* virtual memory in bytes */
926 mem_size_t peak_working_set_size; /* peak real memory in bytes */
927 mem_size_t working_set_size; /* real memory in bytes */
928 mem_size_t pagefile_usage; /* commit charge in bytes */
929 mem_size_t peak_pagefile_usage; /* peak commit charge in bytes */
933 /* Set a process information */
934 @REQ(set_process_info)
935 obj_handle_t handle; /* process handle */
936 int mask; /* setting mask (see below) */
937 int priority; /* priority class */
938 affinity_t affinity; /* affinity mask */
940 #define SET_PROCESS_INFO_PRIORITY 0x01
941 #define SET_PROCESS_INFO_AFFINITY 0x02
944 /* Retrieve information about a thread */
945 @REQ(get_thread_info)
946 obj_handle_t handle; /* thread handle */
947 thread_id_t tid_in; /* thread id (optional) */
949 process_id_t pid; /* server process id */
950 thread_id_t tid; /* server thread id */
951 client_ptr_t teb; /* thread teb pointer */
952 client_ptr_t entry_point; /* thread entry point */
953 affinity_t affinity; /* thread affinity mask */
954 int exit_code; /* thread exit code */
955 int priority; /* thread priority level */
956 int last; /* last thread in process */
957 int suspend_count; /* thread suspend count */
958 data_size_t desc_len; /* description length in bytes */
959 VARARG(desc,unicode_str); /* description string */
963 /* Retrieve information about thread times */
964 @REQ(get_thread_times)
965 obj_handle_t handle; /* thread handle */
967 timeout_t creation_time; /* thread creation time */
968 timeout_t exit_time; /* thread exit time */
972 /* Set a thread information */
973 @REQ(set_thread_info)
974 obj_handle_t handle; /* thread handle */
975 int mask; /* setting mask (see below) */
976 int priority; /* priority class */
977 affinity_t affinity; /* affinity mask */
978 client_ptr_t entry_point; /* thread entry point */
979 obj_handle_t token; /* impersonation token */
980 VARARG(desc,unicode_str); /* description string */
982 #define SET_THREAD_INFO_PRIORITY 0x01
983 #define SET_THREAD_INFO_AFFINITY 0x02
984 #define SET_THREAD_INFO_TOKEN 0x04
985 #define SET_THREAD_INFO_ENTRYPOINT 0x08
986 #define SET_THREAD_INFO_DESCRIPTION 0x10
989 /* Retrieve information about a module */
991 obj_handle_t handle; /* process handle */
992 mod_handle_t base_address; /* base address of module */
994 client_ptr_t entry_point;
995 data_size_t filename_len; /* buffer len in bytes required to store filename */
996 VARARG(filename,unicode_str); /* file name of module */
1000 /* Suspend a thread */
1001 @REQ(suspend_thread)
1002 obj_handle_t handle; /* thread handle */
1004 int count; /* new suspend count */
1008 /* Resume a thread */
1010 obj_handle_t handle; /* thread handle */
1012 int count; /* new suspend count */
1016 /* Notify the server that a dll has been loaded */
1018 data_size_t dbg_offset; /* debug info offset */
1019 mod_handle_t base; /* base address */
1020 client_ptr_t name; /* ptr to ptr to name (in process addr space) */
1021 data_size_t dbg_size; /* debug info size */
1022 VARARG(filename,unicode_str); /* file name of dll */
1026 /* Notify the server that a dll is being unloaded */
1028 mod_handle_t base; /* base address */
1032 /* Queue an APC for a thread or process */
1034 obj_handle_t handle; /* thread or process handle */
1035 apc_call_t call; /* call arguments */
1037 obj_handle_t handle; /* APC handle */
1038 int self; /* run APC in caller itself? */
1042 /* Get the result of an APC call */
1043 @REQ(get_apc_result)
1044 obj_handle_t handle; /* handle to the APC */
1046 apc_result_t result; /* result of the APC */
1050 /* Close a handle for the current process */
1052 obj_handle_t handle; /* handle to close */
1056 /* Set a handle information */
1057 @REQ(set_handle_info)
1058 obj_handle_t handle; /* handle we are interested in */
1059 int flags; /* new handle flags */
1060 int mask; /* mask for flags to set */
1062 int old_flags; /* old flag value */
1066 /* Duplicate a handle */
1068 obj_handle_t src_process; /* src process handle */
1069 obj_handle_t src_handle; /* src handle to duplicate */
1070 obj_handle_t dst_process; /* dst process handle */
1071 unsigned int access; /* wanted access rights */
1072 unsigned int attributes; /* object attributes */
1073 unsigned int options; /* duplicate options (see below) */
1075 obj_handle_t handle; /* duplicated handle in dst process */
1076 int self; /* is the source the current process? */
1077 int closed; /* whether the source handle has been closed */
1079 #define DUP_HANDLE_CLOSE_SOURCE DUPLICATE_CLOSE_SOURCE
1080 #define DUP_HANDLE_SAME_ACCESS DUPLICATE_SAME_ACCESS
1081 #define DUP_HANDLE_MAKE_GLOBAL 0x80000000 /* Not a Windows flag */
1084 /* Open a handle to a process */
1086 process_id_t pid; /* process id to open */
1087 unsigned int access; /* wanted access rights */
1088 unsigned int attributes; /* object attributes */
1090 obj_handle_t handle; /* handle to the process */
1094 /* Open a handle to a thread */
1096 thread_id_t tid; /* thread id to open */
1097 unsigned int access; /* wanted access rights */
1098 unsigned int attributes; /* object attributes */
1100 obj_handle_t handle; /* handle to the thread */
1104 /* Wait for handles */
1106 int flags; /* wait flags (see below) */
1107 client_ptr_t cookie; /* magic cookie to return to client */
1108 abstime_t timeout; /* timeout */
1109 data_size_t size; /* size of select_op */
1110 obj_handle_t prev_apc; /* handle to previous APC */
1111 VARARG(result,apc_result); /* result of previous APC */
1112 VARARG(data,select_op,size); /* operation-specific data */
1113 VARARG(context,context); /* suspend context */
1115 apc_call_t call; /* APC call arguments */
1116 obj_handle_t apc_handle; /* handle to next APC */
1117 VARARG(context,context); /* suspend context */
1119 #define SELECT_ALERTABLE 1
1120 #define SELECT_INTERRUPTIBLE 2
1123 /* Create an event */
1125 unsigned int access; /* wanted access rights */
1126 int manual_reset; /* manual reset event */
1127 int initial_state; /* initial state of the event */
1128 VARARG(objattr,object_attributes); /* object attributes */
1130 obj_handle_t handle; /* handle to the event */
1133 /* Event operation */
1135 obj_handle_t handle; /* handle to event */
1136 int op; /* event operation (see below) */
1138 int state; /* previous state */
1140 enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT };
1143 obj_handle_t handle; /* handle to event */
1145 int manual_reset; /* manual reset event */
1146 int state; /* current state of the event */
1151 unsigned int access; /* wanted access rights */
1152 unsigned int attributes; /* object attributes */
1153 obj_handle_t rootdir; /* root directory */
1154 VARARG(name,unicode_str); /* object name */
1156 obj_handle_t handle; /* handle to the event */
1160 /* Create a keyed event */
1161 @REQ(create_keyed_event)
1162 unsigned int access; /* wanted access rights */
1163 VARARG(objattr,object_attributes); /* object attributes */
1165 obj_handle_t handle; /* handle to the event */
1168 /* Open a keyed event */
1169 @REQ(open_keyed_event)
1170 unsigned int access; /* wanted access rights */
1171 unsigned int attributes; /* object attributes */
1172 obj_handle_t rootdir; /* root directory */
1173 VARARG(name,unicode_str); /* object name */
1175 obj_handle_t handle; /* handle to the event */
1179 /* Create a mutex */
1181 unsigned int access; /* wanted access rights */
1182 int owned; /* initially owned? */
1183 VARARG(objattr,object_attributes); /* object attributes */
1185 obj_handle_t handle; /* handle to the mutex */
1189 /* Release a mutex */
1191 obj_handle_t handle; /* handle to the mutex */
1193 unsigned int prev_count; /* value of internal counter, before release */
1199 unsigned int access; /* wanted access rights */
1200 unsigned int attributes; /* object attributes */
1201 obj_handle_t rootdir; /* root directory */
1202 VARARG(name,unicode_str); /* object name */
1204 obj_handle_t handle; /* handle to the mutex */
1210 obj_handle_t handle; /* handle to mutex */
1212 unsigned int count; /* current count of mutex */
1213 int owned; /* true if owned by current thread */
1214 int abandoned; /* true if abandoned */
1218 /* Create a semaphore */
1219 @REQ(create_semaphore)
1220 unsigned int access; /* wanted access rights */
1221 unsigned int initial; /* initial count */
1222 unsigned int max; /* maximum count */
1223 VARARG(objattr,object_attributes); /* object attributes */
1225 obj_handle_t handle; /* handle to the semaphore */
1229 /* Release a semaphore */
1230 @REQ(release_semaphore)
1231 obj_handle_t handle; /* handle to the semaphore */
1232 unsigned int count; /* count to add to semaphore */
1234 unsigned int prev_count; /* previous semaphore count */
1237 @REQ(query_semaphore)
1238 obj_handle_t handle; /* handle to the semaphore */
1240 unsigned int current; /* current count */
1241 unsigned int max; /* maximum count */
1244 /* Open a semaphore */
1245 @REQ(open_semaphore)
1246 unsigned int access; /* wanted access rights */
1247 unsigned int attributes; /* object attributes */
1248 obj_handle_t rootdir; /* root directory */
1249 VARARG(name,unicode_str); /* object name */
1251 obj_handle_t handle; /* handle to the semaphore */
1257 unsigned int access; /* wanted access rights */
1258 unsigned int sharing; /* sharing flags */
1259 int create; /* file create action */
1260 unsigned int options; /* file options */
1261 unsigned int attrs; /* file attributes for creation */
1262 VARARG(objattr,object_attributes); /* object attributes */
1263 VARARG(filename,string); /* file name */
1265 obj_handle_t handle; /* handle to the file */
1269 /* Open a file object */
1270 @REQ(open_file_object)
1271 unsigned int access; /* wanted access rights */
1272 unsigned int attributes; /* open attributes */
1273 obj_handle_t rootdir; /* root directory */
1274 unsigned int sharing; /* sharing flags */
1275 unsigned int options; /* file options */
1276 VARARG(filename,unicode_str); /* file name */
1278 obj_handle_t handle; /* handle to the file */
1282 /* Allocate a file handle for a Unix fd */
1283 @REQ(alloc_file_handle)
1284 unsigned int access; /* wanted access rights */
1285 unsigned int attributes; /* object attributes */
1286 int fd; /* file descriptor on the client side */
1288 obj_handle_t handle; /* handle to the file */
1292 /* Get the Unix name from a file handle */
1293 @REQ(get_handle_unix_name)
1294 obj_handle_t handle; /* file handle */
1296 data_size_t name_len; /* unix name length */
1297 VARARG(name,string); /* unix name */
1301 /* Get a Unix fd to access a file */
1303 obj_handle_t handle; /* handle to the file */
1305 int type; /* file type (see below) */
1306 int cacheable; /* can fd be cached in the client? */
1307 unsigned int access; /* file access rights */
1308 unsigned int options; /* file open options */
1312 FD_TYPE_INVALID, /* invalid file (no associated fd) */
1313 FD_TYPE_FILE, /* regular file */
1314 FD_TYPE_DIR, /* directory */
1315 FD_TYPE_SOCKET, /* socket */
1316 FD_TYPE_SERIAL, /* serial port */
1317 FD_TYPE_PIPE, /* named pipe */
1318 FD_TYPE_MAILSLOT, /* mailslot */
1319 FD_TYPE_CHAR, /* unspecified char device */
1320 FD_TYPE_DEVICE, /* Windows device file */
1325 /* Retrieve (or allocate) the client-side directory cache entry */
1326 @REQ(get_directory_cache_entry)
1327 obj_handle_t handle; /* handle to the directory */
1329 int entry; /* cache entry on the client side */
1330 VARARG(free,ints); /* entries that can be freed */
1334 /* Flush a file buffers */
1336 async_data_t async; /* async I/O parameters */
1338 obj_handle_t event; /* event set when finished */
1341 /* Query file information */
1343 obj_handle_t handle; /* handle to the file */
1344 unsigned int info_class; /* queried information class */
1346 VARARG(data,bytes); /* file info data */
1349 /* Query volume information */
1350 @REQ(get_volume_info)
1351 obj_handle_t handle; /* handle to the file */
1352 unsigned int info_class; /* queried information class */
1354 VARARG(data,bytes); /* volume info data */
1357 /* Lock a region of a file */
1359 obj_handle_t handle; /* handle to the file */
1360 file_pos_t offset; /* offset of start of lock */
1361 file_pos_t count; /* count of bytes to lock */
1362 int shared; /* shared or exclusive lock? */
1363 int wait; /* do we want to wait? */
1365 obj_handle_t handle; /* handle to wait on */
1366 int overlapped; /* is it an overlapped I/O handle? */
1370 /* Unlock a region of a file */
1372 obj_handle_t handle; /* handle to the file */
1373 file_pos_t offset; /* offset of start of unlock */
1374 file_pos_t count; /* count of bytes to unlock */
1378 /* Create a socket */
1380 unsigned int access; /* wanted access rights */
1381 unsigned int attributes; /* object attributes */
1382 int family; /* family, see socket manpage */
1383 int type; /* type, see socket manpage */
1384 int protocol; /* protocol, see socket manpage */
1385 unsigned int flags; /* socket flags */
1387 obj_handle_t handle; /* handle to the new socket */
1391 /* Accept a socket */
1393 obj_handle_t lhandle; /* handle to the listening socket */
1394 unsigned int access; /* wanted access rights */
1395 unsigned int attributes; /* object attributes */
1397 obj_handle_t handle; /* handle to the new socket */
1401 /* Accept into an initialized socket */
1402 @REQ(accept_into_socket)
1403 obj_handle_t lhandle; /* handle to the listening socket */
1404 obj_handle_t ahandle; /* handle to the accepting socket */
1408 /* Set socket event parameters */
1409 @REQ(set_socket_event)
1410 obj_handle_t handle; /* handle to the socket */
1411 unsigned int mask; /* event mask */
1412 obj_handle_t event; /* event object */
1413 user_handle_t window; /* window to send the message to */
1414 unsigned int msg; /* message to send */
1418 /* Get socket event parameters */
1419 @REQ(get_socket_event)
1420 obj_handle_t handle; /* handle to the socket */
1421 int service; /* clear pending? */
1422 obj_handle_t c_event; /* event to clear */
1424 unsigned int mask; /* event mask */
1425 unsigned int pmask; /* pending events */
1426 unsigned int state; /* status bits */
1427 VARARG(errors,ints); /* event errors */
1431 /* Get socket info */
1432 @REQ(get_socket_info)
1433 obj_handle_t handle; /* handle to the socket */
1435 int family; /* family, see socket manpage */
1436 int type; /* type, see socket manpage */
1437 int protocol; /* protocol, see socket manpage */
1441 /* Re-enable pending socket events */
1442 @REQ(enable_socket_event)
1443 obj_handle_t handle; /* handle to the socket */
1444 unsigned int mask; /* events to re-enable */
1445 unsigned int sstate; /* status bits to set */
1446 unsigned int cstate; /* status bits to clear */
1449 @REQ(set_socket_deferred)
1450 obj_handle_t handle; /* handle to the socket */
1451 obj_handle_t deferred; /* handle to the socket for which accept() is deferred */
1454 /* Allocate a console (only used by a console renderer) */
1456 unsigned int access; /* wanted access rights */
1457 unsigned int attributes; /* object attributes */
1458 process_id_t pid; /* pid of process which shall be attached to the console */
1459 int input_fd; /* if pid=-1 (bare console to current process), fd for input */
1461 obj_handle_t handle_in; /* handle to console input */
1462 obj_handle_t event; /* handle to renderer events change notification */
1466 /* Free the console of the current process */
1471 #define CONSOLE_RENDERER_NONE_EVENT 0x00
1472 #define CONSOLE_RENDERER_TITLE_EVENT 0x01
1473 #define CONSOLE_RENDERER_ACTIVE_SB_EVENT 0x02
1474 #define CONSOLE_RENDERER_SB_RESIZE_EVENT 0x03
1475 #define CONSOLE_RENDERER_UPDATE_EVENT 0x04
1476 #define CONSOLE_RENDERER_CURSOR_POS_EVENT 0x05
1477 #define CONSOLE_RENDERER_CURSOR_GEOM_EVENT 0x06
1478 #define CONSOLE_RENDERER_DISPLAY_EVENT 0x07
1479 #define CONSOLE_RENDERER_EXIT_EVENT 0x08
1480 struct console_renderer_event
1515 /* retrieve console events for the renderer */
1516 @REQ(get_console_renderer_events)
1517 obj_handle_t handle; /* handle to console input events */
1519 VARARG(data,bytes); /* the various console_renderer_events */
1523 /* Open a handle to the process console */
1525 obj_handle_t from; /* 0 (resp 1) input (resp output) of current process console */
1526 /* otherwise console_in handle to get active screen buffer? */
1527 unsigned int access; /* wanted access rights */
1528 unsigned int attributes; /* object attributes */
1529 int share; /* share mask (only for output handles) */
1531 obj_handle_t handle; /* handle to the console */
1535 /* Attach to a other process's console
*/
1536 @
REQ(attach_console
)
1537 process_id_t pid
; /* pid of attached console process
*/
1539 obj_handle_t std_in
; /* attached stdin
*/
1540 obj_handle_t std_out
; /* attached stdout
*/
1541 obj_handle_t std_err
; /* attached stderr
*/
1545 /* Get the input queue wait event
*/
1546 @
REQ(get_console_wait_event
)
1547 obj_handle_t handle
; /* handle to the console
*/
1552 /* Get a console
mode (input or output
) */
1553 @
REQ(get_console_mode
)
1554 obj_handle_t handle
; /* handle to the console
*/
1556 int mode
; /* console mode
*/
1560 /* Set a console
mode (input or output
) */
1561 @
REQ(set_console_mode
)
1562 obj_handle_t handle
; /* handle to the console
*/
1563 int mode
; /* console mode
*/
1567 /* Set info about a
console (input only
) */
1568 @
REQ(set_console_input_info
)
1569 obj_handle_t handle
; /* handle to console input
, or
0 for process
' console */
1570 int mask; /* setting mask (see below) */
1571 obj_handle_t active_sb; /* active screen buffer */
1572 int history_mode; /* whether we duplicate lines in history */
1573 int history_size; /* number of lines in history */
1574 int edition_mode; /* index to the edition mode flavors */
1575 int input_cp; /* console input codepage */
1576 int output_cp; /* console output codepage */
1577 user_handle_t win; /* console window if backend supports it */
1578 VARARG(title,unicode_str); /* console title */
1580 #define SET_CONSOLE_INPUT_INFO_ACTIVE_SB 0x01
1581 #define SET_CONSOLE_INPUT_INFO_TITLE 0x02
1582 #define SET_CONSOLE_INPUT_INFO_HISTORY_MODE 0x04
1583 #define SET_CONSOLE_INPUT_INFO_HISTORY_SIZE 0x08
1584 #define SET_CONSOLE_INPUT_INFO_EDITION_MODE 0x10
1585 #define SET_CONSOLE_INPUT_INFO_INPUT_CODEPAGE 0x20
1586 #define SET_CONSOLE_INPUT_INFO_OUTPUT_CODEPAGE 0x40
1587 #define SET_CONSOLE_INPUT_INFO_WIN 0x80
1590 /* Get info about a console (input only) */
1591 @REQ(get_console_input_info)
1592 obj_handle_t handle; /* handle to console input, or 0 for process' console
*/
1594 int history_mode
; /* whether we duplicate lines in history
*/
1595 int history_size
; /* number of lines in history
*/
1596 int history_index
; /* number of used lines in history
*/
1597 int edition_mode
; /* index to the edition mode flavors
*/
1598 int input_cp
; /* console input codepage
*/
1599 int output_cp
; /* console output codepage
*/
1600 user_handle_t win
; /* console window if backend supports it
*/
1601 VARARG(title
,unicode_str
); /* console title
*/
1605 /* appends a string to console
's history */
1606 @REQ(append_console_input_history)
1607 obj_handle_t handle; /* handle to console input, or 0 for process' console
*/
1608 VARARG(line
,unicode_str
); /* line to add
*/
1612 /* appends a string to console
's history */
1613 @REQ(get_console_input_history)
1614 obj_handle_t handle; /* handle to console input, or 0 for process' console
*/
1615 int index
; /* index to get line from
*/
1617 int total
; /* total length of line in Unicode chars
*/
1618 VARARG(line
,unicode_str
); /* line to add
*/
1622 /* creates a new screen buffer on process
' console */
1623 @REQ(create_console_output)
1624 obj_handle_t handle_in; /* handle to console input, or 0 for process' console
*/
1625 unsigned int access
; /* wanted access rights
*/
1626 unsigned int attributes
; /* object attributes
*/
1627 unsigned int share
; /* sharing credentials
*/
1628 int fd
; /* for bare consoles
, fd the screen
-buffer is attached to
*/
1630 obj_handle_t handle_out
; /* handle to the screen buffer
*/
1634 /* Set info about a
console (output only
) */
1635 @
REQ(set_console_output_info
)
1636 obj_handle_t handle
; /* handle to the console
*/
1637 int mask
; /* setting
mask (see below
) */
1638 short int cursor_size
; /* size of
cursor (percentage filled
) */
1639 short int cursor_visible
;/* cursor visibility flag
*/
1640 short int cursor_x
; /* position of
cursor (x
, y
) */
1642 short int width
; /* width of the screen buffer
*/
1643 short int height
; /* height of the screen buffer
*/
1644 short int attr
; /* default fill
attributes (screen colors
) */
1645 short int popup_attr
; /* pop
-up color attributes
*/
1646 short int win_left
; /* window actually displayed by renderer
*/
1647 short int win_top
; /* the rect area is expressed within the
*/
1648 short int win_right
; /* boundaries of the screen buffer
*/
1649 short int win_bottom
;
1650 short int max_width
; /* maximum
size (width x height
) for the window
*/
1651 short int max_height
;
1652 short int font_width
; /* font
size (width x height
) */
1653 short int font_height
;
1654 short int font_weight
; /* font weight
*/
1655 short int font_pitch_family
; /* font pitch
& family
*/
1656 VARARG(colors
,uints
,64); /* color table
*/
1657 VARARG(face_name
,unicode_str
); /* font face name
*/
1659 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_GEOM
0x0001
1660 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_POS
0x0002
1661 #define SET_CONSOLE_OUTPUT_INFO_SIZE
0x0004
1662 #define SET_CONSOLE_OUTPUT_INFO_ATTR
0x0008
1663 #define SET_CONSOLE_OUTPUT_INFO_DISPLAY_WINDOW
0x0010
1664 #define SET_CONSOLE_OUTPUT_INFO_MAX_SIZE
0x0020
1665 #define SET_CONSOLE_OUTPUT_INFO_FONT
0x0040
1666 #define SET_CONSOLE_OUTPUT_INFO_COLORTABLE
0x0080
1667 #define SET_CONSOLE_OUTPUT_INFO_POPUP_ATTR
0x0100
1670 /* Get info about a
console (output only
) */
1671 @
REQ(get_console_output_info
)
1672 obj_handle_t handle
; /* handle to the console
*/
1674 short int cursor_size
; /* size of
cursor (percentage filled
) */
1675 short int cursor_visible
;/* cursor visibility flag
*/
1676 short int cursor_x
; /* position of
cursor (x
, y
) */
1678 short int width
; /* width of the screen buffer
*/
1679 short int height
; /* height of the screen buffer
*/
1680 short int attr
; /* default fill
attributes (screen colors
) */
1681 short int popup_attr
; /* pop
-up color attributes
*/
1682 short int win_left
; /* window actually displayed by renderer
*/
1683 short int win_top
; /* the rect area is expressed within the
*/
1684 short int win_right
; /* boundaries of the screen buffer
*/
1685 short int win_bottom
;
1686 short int max_width
; /* maximum
size (width x height
) for the window
*/
1687 short int max_height
;
1688 short int font_width
; /* font
size (width x height
) */
1689 short int font_height
;
1690 short int font_weight
; /* font weight
*/
1691 short int font_pitch_family
; /* font pitch
& family
*/
1692 VARARG(colors
,uints
,64); /* color table
*/
1693 VARARG(face_name
,unicode_str
); /* font face name
*/
1696 /* Add input records to a console input queue
*/
1697 @
REQ(write_console_input
)
1698 obj_handle_t handle
; /* handle to the console input
*/
1699 VARARG(rec
,input_records
); /* input records
*/
1701 int written
; /* number of records written
*/
1705 /* Fetch input records from a console input queue
*/
1706 @
REQ(read_console_input
)
1707 obj_handle_t handle
; /* handle to the console input
*/
1708 int flush
; /* flush the retrieved records from the queue?
*/
1710 int read
; /* number of records read
*/
1711 VARARG(rec
,input_records
); /* input records
*/
1715 /* write
data (chars and
/or attributes
) in a screen buffer
*/
1716 @
REQ(write_console_output
)
1717 obj_handle_t handle
; /* handle to the console output
*/
1718 int x
; /* position where to start writing
*/
1720 int mode
; /* char
info (see below
) */
1721 int wrap
; /* wrap around at end of line?
*/
1722 VARARG(data
,bytes
); /* info to write
*/
1724 int written
; /* number of char infos actually written
*/
1725 int width
; /* width of screen buffer
*/
1726 int height
; /* height of screen buffer
*/
1730 CHAR_INFO_MODE_TEXT
, /* characters only
*/
1731 CHAR_INFO_MODE_ATTR
, /* attributes only
*/
1732 CHAR_INFO_MODE_TEXTATTR
, /* both characters and attributes
*/
1733 CHAR_INFO_MODE_TEXTSTDATTR
/* characters but use standard attributes
*/
1737 /* fill a screen buffer with constant
data (chars and
/or attributes
) */
1738 @
REQ(fill_console_output
)
1739 obj_handle_t handle
; /* handle to the console output
*/
1740 int x
; /* position where to start writing
*/
1742 int mode
; /* char info mode
*/
1743 int count
; /* number to write
*/
1744 int wrap
; /* wrap around at end of line?
*/
1745 char_info_t data
; /* data to write
*/
1747 int written
; /* number of char infos actually written
*/
1751 /* read
data (chars and
/or attributes
) from a screen buffer
*/
1752 @
REQ(read_console_output
)
1753 obj_handle_t handle
; /* handle to the console output
*/
1754 int x
; /* position (x
,y
) where to start reading
*/
1756 int mode
; /* char info mode
*/
1757 int wrap
; /* wrap around at end of line?
*/
1759 int width
; /* width of screen buffer
*/
1760 int height
; /* height of screen buffer
*/
1765 /* move a
rect (of data
) in screen buffer content
*/
1766 @
REQ(move_console_output
)
1767 obj_handle_t handle
; /* handle to the console output
*/
1768 short int x_src
; /* position (x
, y
) of rect to start moving from
*/
1770 short int x_dst
; /* position (x
, y
) of rect to move to
*/
1772 short int w
; /* size of the
rect (width
, height
) to move
*/
1777 /* Sends a signal to a process group
*/
1778 @
REQ(send_console_signal
)
1779 int signal
; /* the signal to send
*/
1780 process_id_t group_id
; /* the group to send the signal to
*/
1784 /* enable directory change notifications
*/
1785 @
REQ(read_directory_changes
)
1786 unsigned int filter
; /* notification filter
*/
1787 int subtree
; /* watch the subtree?
*/
1788 int want_data
; /* flag indicating whether change data should be collected
*/
1789 async_data_t async
; /* async I
/O parameters
*/
1794 obj_handle_t handle
;
1796 VARARG(events
,filesystem_event
); /* collected filesystem events
*/
1800 /* Create a file mapping
*/
1801 @
REQ(create_mapping
)
1802 unsigned int access
; /* wanted access rights
*/
1803 unsigned int flags
; /* SEC_
* flags
*/
1804 unsigned int file_access
; /* file access rights
*/
1805 mem_size_t size
; /* mapping size
*/
1806 obj_handle_t file_handle
; /* file handle
*/
1807 VARARG(objattr
,object_attributes
); /* object attributes
*/
1809 obj_handle_t handle
; /* handle to the mapping
*/
1813 /* Open a mapping
*/
1815 unsigned int access
; /* wanted access rights
*/
1816 unsigned int attributes
; /* object attributes
*/
1817 obj_handle_t rootdir
; /* root directory
*/
1818 VARARG(name
,unicode_str
); /* object name
*/
1820 obj_handle_t handle
; /* handle to the mapping
*/
1824 /* Get information about a file mapping
*/
1825 @
REQ(get_mapping_info
)
1826 obj_handle_t handle
; /* handle to the mapping
*/
1827 unsigned int access
; /* wanted access rights
*/
1829 mem_size_t size
; /* mapping size
*/
1830 unsigned int flags
; /* SEC_
* flags
*/
1831 obj_handle_t shared_file
; /* shared mapping file handle
*/
1832 VARARG(image
,pe_image_info
);/* image info for SEC_IMAGE mappings
*/
1836 /* Add a memory view in the current process
*/
1838 obj_handle_t mapping
; /* file mapping handle
*/
1839 unsigned int access
; /* wanted access rights
*/
1840 client_ptr_t base
; /* view base
address (page
-aligned
) */
1841 mem_size_t size
; /* view size
*/
1842 file_pos_t start
; /* start offset in mapping
*/
1846 /* Unmap a memory view from the current process
*/
1848 client_ptr_t base
; /* view base address
*/
1852 /* Get a range of committed pages in a file mapping
*/
1853 @
REQ(get_mapping_committed_range
)
1854 client_ptr_t base
; /* view base address
*/
1855 file_pos_t offset
; /* starting
offset (page
-aligned
, in bytes
) */
1857 mem_size_t size
; /* size of range starting at
offset (page
-aligned
, in bytes
) */
1858 int committed
; /* whether it is a committed range
*/
1862 /* Add a range to the committed pages in a file mapping
*/
1863 @
REQ(add_mapping_committed_range
)
1864 client_ptr_t base
; /* view base address
*/
1865 file_pos_t offset
; /* starting
offset (page
-aligned
, in bytes
) */
1866 mem_size_t size
; /* size to
set (page
-aligned
, in bytes
) or
0 if only retrieving
*/
1870 /* Check if two memory maps are for the same file
*/
1871 @
REQ(is_same_mapping
)
1872 client_ptr_t base1
; /* first view base address
*/
1873 client_ptr_t base2
; /* second view base address
*/
1877 #define SNAP_PROCESS
0x00000001
1878 #define SNAP_THREAD
0x00000002
1879 /* Create a snapshot
*/
1880 @
REQ(create_snapshot
)
1881 unsigned int attributes
; /* object attributes
*/
1882 unsigned int flags
; /* snapshot
flags (SNAP_*)
*/
1884 obj_handle_t handle
; /* handle to the snapshot
*/
1888 /* Get the next process from a snapshot
*/
1890 obj_handle_t handle
; /* handle to the snapshot
*/
1891 int reset
; /* reset snapshot position?
*/
1893 int count
; /* process usage count
*/
1894 process_id_t pid
; /* process id
*/
1895 process_id_t ppid
; /* parent process id
*/
1896 int threads
; /* number of threads
*/
1897 int priority
; /* process priority
*/
1898 int handles
; /* number of handles
*/
1899 int unix_pid
; /* Unix pid
*/
1900 VARARG(filename
,unicode_str
); /* file name of main exe
*/
1904 /* Get the next thread from a snapshot
*/
1906 obj_handle_t handle
; /* handle to the snapshot
*/
1907 int reset
; /* reset snapshot position?
*/
1909 int count
; /* thread usage count
*/
1910 process_id_t pid
; /* process id
*/
1911 thread_id_t tid
; /* thread id
*/
1912 int base_pri
; /* base priority
*/
1913 int delta_pri
; /* delta priority
*/
1917 /* Wait for a debug event
*/
1918 @
REQ(wait_debug_event
)
1919 int get_handle
; /* should we alloc a handle for waiting?
*/
1921 process_id_t pid
; /* process id
*/
1922 thread_id_t tid
; /* thread id
*/
1923 obj_handle_t wait
; /* wait handle if no event ready
*/
1924 VARARG(event
,debug_event
); /* debug event data
*/
1928 /* Queue an exception event
*/
1929 @
REQ(queue_exception_event
)
1930 int first
; /* first chance exception?
*/
1931 unsigned int code
; /* exception code
*/
1932 unsigned int flags
; /* exception flags
*/
1933 client_ptr_t record
; /* exception record
*/
1934 client_ptr_t address
; /* exception address
*/
1935 data_size_t len
; /* size of parameters
*/
1936 VARARG(params
,uints64
,len
);/* exception parameters
*/
1938 obj_handle_t handle
; /* handle to the queued event
*/
1942 /* Retrieve the status of an exception event
*/
1943 @
REQ(get_exception_status
)
1944 obj_handle_t handle
; /* handle to the queued event
*/
1948 /* Continue a debug event
*/
1949 @
REQ(continue_debug_event
)
1950 process_id_t pid
; /* process id to continue
*/
1951 thread_id_t tid
; /* thread id to continue
*/
1952 int status
; /* continuation status
*/
1956 /* Start
/stop debugging an existing process
*/
1958 process_id_t pid
; /* id of the process to debug
*/
1959 int attach
; /* 1=attaching
/ 0=detaching from the process
*/
1963 /* Set debugger kill on exit flag
*/
1964 @
REQ(set_debugger_kill_on_exit
)
1965 int kill_on_exit
; /* 0=detach
/1=kill debuggee when debugger dies
*/
1969 /* Read data from a process address space
*/
1970 @
REQ(read_process_memory
)
1971 obj_handle_t handle
; /* process handle
*/
1972 client_ptr_t addr
; /* addr to read from
*/
1974 VARARG(data
,bytes
); /* result data
*/
1978 /* Write data to a process address space
*/
1979 @
REQ(write_process_memory
)
1980 obj_handle_t handle
; /* process handle
*/
1981 client_ptr_t addr
; /* addr to write to
*/
1982 VARARG(data
,bytes
); /* data to write
*/
1986 /* Create a registry key
*/
1988 unsigned int access
; /* desired access rights
*/
1989 unsigned int options
; /* creation options
*/
1990 VARARG(objattr
,object_attributes
); /* object attributes
*/
1991 VARARG(class
,unicode_str
); /* class name
*/
1993 obj_handle_t hkey
; /* handle to the created key
*/
1994 int created
; /* has it been newly created?
*/
1997 /* Open a registry key
*/
1999 obj_handle_t parent
; /* handle to the parent key
*/
2000 unsigned int access
; /* desired access rights
*/
2001 unsigned int attributes
; /* object attributes
*/
2002 VARARG(name
,unicode_str
); /* key name
*/
2004 obj_handle_t hkey
; /* handle to the open key
*/
2008 /* Delete a registry key
*/
2010 obj_handle_t hkey
; /* handle to the key
*/
2014 /* Flush a registry key
*/
2016 obj_handle_t hkey
; /* handle to the key
*/
2020 /* Enumerate registry subkeys
*/
2022 obj_handle_t hkey
; /* handle to registry key
*/
2023 int index
; /* index of
subkey (or
-1 for current key
) */
2024 int info_class
; /* requested information class
*/
2026 int subkeys
; /* number of subkeys
*/
2027 int max_subkey
; /* longest subkey name
*/
2028 int max_class
; /* longest class name
*/
2029 int values
; /* number of values
*/
2030 int max_value
; /* longest value name
*/
2031 int max_data
; /* longest value data
*/
2032 timeout_t modif
; /* last modification time
*/
2033 data_size_t total
; /* total length needed for full name and class
*/
2034 data_size_t namelen
; /* length of key name in bytes
*/
2035 VARARG(name
,unicode_str
,namelen
); /* key name
*/
2036 VARARG(class
,unicode_str
); /* class name
*/
2040 /* Set a value of a registry key
*/
2042 obj_handle_t hkey
; /* handle to registry key
*/
2043 int type
; /* value type
*/
2044 data_size_t namelen
; /* length of value name in bytes
*/
2045 VARARG(name
,unicode_str
,namelen
); /* value name
*/
2046 VARARG(data
,bytes
); /* value data
*/
2050 /* Retrieve the value of a registry key
*/
2052 obj_handle_t hkey
; /* handle to registry key
*/
2053 VARARG(name
,unicode_str
); /* value name
*/
2055 int type
; /* value type
*/
2056 data_size_t total
; /* total length needed for data
*/
2057 VARARG(data
,bytes
); /* value data
*/
2061 /* Enumerate a value of a registry key
*/
2062 @
REQ(enum_key_value
)
2063 obj_handle_t hkey
; /* handle to registry key
*/
2064 int index
; /* value index
*/
2065 int info_class
; /* requested information class
*/
2067 int type
; /* value type
*/
2068 data_size_t total
; /* total length needed for full name and data
*/
2069 data_size_t namelen
; /* length of value name in bytes
*/
2070 VARARG(name
,unicode_str
,namelen
); /* value name
*/
2071 VARARG(data
,bytes
); /* value data
*/
2075 /* Delete a value of a registry key
*/
2076 @
REQ(delete_key_value
)
2077 obj_handle_t hkey
; /* handle to registry key
*/
2078 VARARG(name
,unicode_str
); /* value name
*/
2082 /* Load a registry branch from a file
*/
2084 obj_handle_t file
; /* file to load from
*/
2085 VARARG(objattr
,object_attributes
); /* object attributes
*/
2089 /* UnLoad a registry branch from a file
*/
2090 @
REQ(unload_registry
)
2091 obj_handle_t hkey
; /* root key to unload to
*/
2095 /* Save a registry branch to a file
*/
2097 obj_handle_t hkey
; /* key to save
*/
2098 obj_handle_t file
; /* file to save to
*/
2102 /* Add a registry key change notification
*/
2103 @
REQ(set_registry_notification
)
2104 obj_handle_t hkey
; /* key to watch for changes
*/
2105 obj_handle_t event
; /* event to set
*/
2106 int subtree
; /* should we watch the whole subtree?
*/
2107 unsigned int filter
; /* things to watch
*/
2111 /* Create a waitable timer
*/
2113 unsigned int access
; /* wanted access rights
*/
2114 int manual
; /* manual reset
*/
2115 VARARG(objattr
,object_attributes
); /* object attributes
*/
2117 obj_handle_t handle
; /* handle to the timer
*/
2121 /* Open a waitable timer
*/
2123 unsigned int access
; /* wanted access rights
*/
2124 unsigned int attributes
; /* object attributes
*/
2125 obj_handle_t rootdir
; /* root directory
*/
2126 VARARG(name
,unicode_str
); /* object name
*/
2128 obj_handle_t handle
; /* handle to the timer
*/
2131 /* Set a waitable timer
*/
2133 obj_handle_t handle
; /* handle to the timer
*/
2134 timeout_t expire
; /* next expiration absolute time
*/
2135 client_ptr_t callback
; /* callback function
*/
2136 client_ptr_t arg
; /* callback argument
*/
2137 int period
; /* timer period in ms
*/
2139 int signaled
; /* was the timer signaled before this call ?
*/
2142 /* Cancel a waitable timer
*/
2144 obj_handle_t handle
; /* handle to the timer
*/
2146 int signaled
; /* was the timer signaled before this calltime ?
*/
2149 /* Get information on a waitable timer
*/
2150 @
REQ(get_timer_info
)
2151 obj_handle_t handle
; /* handle to the timer
*/
2153 timeout_t when
; /* absolute time when the timer next expires
*/
2154 int signaled
; /* is the timer signaled?
*/
2158 /* Retrieve the current context of a thread
*/
2159 @
REQ(get_thread_context
)
2160 obj_handle_t handle
; /* thread or context handle
*/
2161 unsigned int flags
; /* context flags
*/
2163 int self
; /* was it a handle to the current thread?
*/
2164 obj_handle_t handle
; /* pending context handle
*/
2165 VARARG(context
,context
); /* thread context
*/
2169 /* Set the current context of a thread
*/
2170 @
REQ(set_thread_context
)
2171 obj_handle_t handle
; /* thread handle
*/
2172 VARARG(context
,context
); /* thread context
*/
2174 int self
; /* was it a handle to the current thread?
*/
2178 /* Fetch a selector entry for a thread
*/
2179 @
REQ(get_selector_entry
)
2180 obj_handle_t handle
; /* thread handle
*/
2181 int entry
; /* LDT entry
*/
2183 unsigned int base
; /* selector base
*/
2184 unsigned int limit
; /* selector limit
*/
2185 unsigned char flags
; /* selector flags
*/
2191 obj_handle_t table
; /* which table to add atom to
*/
2192 VARARG(name
,unicode_str
); /* atom name
*/
2194 atom_t atom
; /* resulting atom
*/
2198 /* Delete an atom
*/
2200 obj_handle_t table
; /* which table to delete atom from
*/
2201 atom_t atom
; /* atom handle
*/
2207 obj_handle_t table
; /* which table to find atom from
*/
2208 VARARG(name
,unicode_str
); /* atom name
*/
2210 atom_t atom
; /* atom handle
*/
2214 /* Get information about an atom
*/
2215 @
REQ(get_atom_information
)
2216 obj_handle_t table
; /* which table to find atom from
*/
2217 atom_t atom
; /* atom handle
*/
2219 int count
; /* atom lock count
*/
2220 int pinned
; /* whether the atom has been pinned
*/
2221 data_size_t total
; /* actual length of atom name
*/
2222 VARARG(name
,unicode_str
); /* atom name
*/
2226 /* Set information about an atom
*/
2227 @
REQ(set_atom_information
)
2228 obj_handle_t table
; /* which table to find atom from
*/
2229 atom_t atom
; /* atom handle
*/
2230 int pinned
; /* whether to bump atom information
*/
2234 /* Empty an atom table
*/
2235 @
REQ(empty_atom_table
)
2236 obj_handle_t table
; /* which table to find atom from
*/
2237 int if_pinned
; /* whether to delete pinned atoms
*/
2241 /* Init an atom table
*/
2242 @
REQ(init_atom_table
)
2243 int entries
; /* number of
entries (only for local
) */
2245 obj_handle_t table
; /* handle to the atom table
*/
2249 /* Get the message queue of the current thread
*/
2252 obj_handle_t handle
; /* handle to the queue
*/
2256 /* Set the file descriptor associated to the current thread queue
*/
2258 obj_handle_t handle
; /* handle to the file descriptor
*/
2262 /* Set the current message queue wakeup mask
*/
2263 @
REQ(set_queue_mask
)
2264 unsigned int wake_mask
; /* wakeup bits mask
*/
2265 unsigned int changed_mask
; /* changed bits mask
*/
2266 int skip_wait
; /* will we skip waiting if signaled?
*/
2268 unsigned int wake_bits
; /* current wake bits
*/
2269 unsigned int changed_bits
; /* current changed bits
*/
2273 /* Get the current message queue status
*/
2274 @
REQ(get_queue_status
)
2275 unsigned int clear_bits
; /* should we clear the change bits?
*/
2277 unsigned int wake_bits
; /* wake bits
*/
2278 unsigned int changed_bits
; /* changed bits since last time
*/
2282 /* Retrieve the process idle event
*/
2283 @
REQ(get_process_idle_event
)
2284 obj_handle_t handle
; /* process handle
*/
2286 obj_handle_t event
; /* handle to idle event
*/
2290 /* Send a message to a thread queue
*/
2292 thread_id_t id
; /* thread id
*/
2293 int type
; /* message
type (see below
) */
2294 int flags
; /* message
flags (see below
) */
2295 user_handle_t win
; /* window handle
*/
2296 unsigned int msg
; /* message code
*/
2297 lparam_t wparam
; /* parameters
*/
2298 lparam_t lparam
; /* parameters
*/
2299 timeout_t timeout
; /* timeout for reply
*/
2300 VARARG(data
,message_data
); /* message data for sent messages
*/
2303 @
REQ(post_quit_message
)
2304 int exit_code
; /* exit code to return
*/
2309 MSG_ASCII
, /* Ascii
message (from SendMessageA
) */
2310 MSG_UNICODE
, /* Unicode
message (from SendMessageW
) */
2311 MSG_NOTIFY
, /* notify
message (from SendNotifyMessageW
), always Unicode
*/
2312 MSG_CALLBACK
, /* callback
message (from SendMessageCallbackW
), always Unicode
*/
2313 MSG_CALLBACK_RESULT
,/* result of a callback message
*/
2314 MSG_OTHER_PROCESS
, /* sent from other process
, may include vararg data
, always Unicode
*/
2315 MSG_POSTED
, /* posted
message (from PostMessageW
), always Unicode
*/
2316 MSG_HARDWARE
, /* hardware message
*/
2317 MSG_WINEVENT
, /* winevent message
*/
2318 MSG_HOOK_LL
/* low
-level hardware hook
*/
2320 #define SEND_MSG_ABORT_IF_HUNG
0x01
2323 /* Send a hardware message to a thread queue
*/
2324 @
REQ(send_hardware_message
)
2325 user_handle_t win
; /* window handle
*/
2326 hw_input_t input
; /* input data
*/
2327 unsigned int flags
; /* flags (see below
) */
2329 int wait
; /* do we need to wait for a reply?
*/
2330 int prev_x
; /* previous cursor position
*/
2332 int new_x
; /* new cursor position
*/
2334 VARARG(keystate
,bytes
); /* global state array for all the keys
*/
2336 #define SEND_HWMSG_INJECTED
0x01
2339 /* Get a message from the current queue
*/
2341 unsigned int flags
; /* PM_
* flags
*/
2342 user_handle_t get_win
; /* window handle to get
*/
2343 unsigned int get_first
; /* first message code to get
*/
2344 unsigned int get_last
; /* last message code to get
*/
2345 unsigned int hw_id
; /* id of the previous hardware
message (or
0) */
2346 unsigned int wake_mask
; /* wakeup bits mask
*/
2347 unsigned int changed_mask
; /* changed bits mask
*/
2349 user_handle_t win
; /* window handle
*/
2350 unsigned int msg
; /* message code
*/
2351 lparam_t wparam
; /* parameters
*/
2352 lparam_t lparam
; /* parameters
*/
2353 int type
; /* message type
*/
2354 int x
; /* message x position
*/
2355 int y
; /* message y position
*/
2356 unsigned int time
; /* message time
*/
2357 unsigned int active_hooks
; /* active hooks bitmap
*/
2358 data_size_t total
; /* total size of extra data
*/
2359 VARARG(data
,message_data
); /* message data for sent messages
*/
2363 /* Reply to a sent message
*/
2365 int remove
; /* should we remove the message?
*/
2366 lparam_t result
; /* message result
*/
2367 VARARG(data
,bytes
); /* message data for sent messages
*/
2371 /* Accept the current hardware message
*/
2372 @
REQ(accept_hardware_message
)
2373 unsigned int hw_id
; /* id of the hardware message
*/
2374 int remove
; /* should we remove the message?
*/
2378 /* Retrieve the reply for the last message sent
*/
2379 @
REQ(get_message_reply
)
2380 int cancel
; /* cancel message if not ready?
*/
2382 lparam_t result
; /* message result
*/
2383 VARARG(data
,bytes
); /* message data for sent messages
*/
2387 /* Set a window timer
*/
2389 user_handle_t win
; /* window handle
*/
2390 unsigned int msg
; /* message to post
*/
2391 unsigned int rate
; /* timer rate in ms
*/
2392 lparam_t id
; /* timer id
*/
2393 lparam_t lparam
; /* message
lparam (callback proc
) */
2395 lparam_t id
; /* timer id
*/
2399 /* Kill a window timer
*/
2400 @
REQ(kill_win_timer
)
2401 user_handle_t win
; /* window handle
*/
2402 lparam_t id
; /* timer id
*/
2403 unsigned int msg
; /* message to post
*/
2407 /* check if the thread owning the window is hung
*/
2408 @
REQ(is_window_hung
)
2409 user_handle_t win
; /* window handle
*/
2415 /* Retrieve info about a serial port
*/
2416 @
REQ(get_serial_info
)
2417 obj_handle_t handle
; /* handle to comm port
*/
2420 unsigned int eventmask
;
2421 unsigned int cookie
;
2422 unsigned int pending_write
;
2426 /* Set info about a serial port
*/
2427 @
REQ(set_serial_info
)
2428 obj_handle_t handle
; /* handle to comm port
*/
2429 int flags
; /* bitmask to set
values (see below
) */
2431 #define SERIALINFO_PENDING_WRITE
0x04
2432 #define SERIALINFO_PENDING_WAIT
0x08
2435 /* Create an async I
/O
*/
2436 @
REQ(register_async
)
2437 int type
; /* type of queue to look after
*/
2438 async_data_t async
; /* async I
/O parameters
*/
2439 int count
; /* count
- usually # of bytes to be read
/written
*/
2441 #define ASYNC_TYPE_READ
0x01
2442 #define ASYNC_TYPE_WRITE
0x02
2443 #define ASYNC_TYPE_WAIT
0x03
2446 /* Cancel all async op on a fd
*/
2448 obj_handle_t handle
; /* handle to comm port
, socket or file
*/
2449 client_ptr_t iosb
; /* I
/O status
block (NULL
=all
) */
2450 int only_thread
; /* cancel matching this thread
*/
2454 /* Retrieve results of an async
*/
2455 @
REQ(get_async_result
)
2456 client_ptr_t user_arg
; /* user arg used to identify async
*/
2458 data_size_t size
; /* result
size (input or output depending on the operation
) */
2459 VARARG(out_data
,bytes
); /* iosb output data
*/
2463 /* Perform a read on a file object
*/
2465 async_data_t async
; /* async I
/O parameters
*/
2466 file_pos_t pos
; /* read position
*/
2468 obj_handle_t wait
; /* handle to wait on for blocking read
*/
2469 unsigned int options
; /* device open options
*/
2470 VARARG(data
,bytes
); /* read data
*/
2474 /* Perform a write on a file object
*/
2476 async_data_t async
; /* async I
/O parameters
*/
2477 file_pos_t pos
; /* write position
*/
2478 VARARG(data
,bytes
); /* write data
*/
2480 obj_handle_t wait
; /* handle to wait on for blocking write
*/
2481 unsigned int options
; /* device open options
*/
2482 data_size_t size
; /* size written
*/
2486 /* Perform an ioctl on a file
*/
2488 ioctl_code_t code
; /* ioctl code
*/
2489 async_data_t async
; /* async I
/O parameters
*/
2490 VARARG(in_data
,bytes
); /* ioctl input data
*/
2492 obj_handle_t wait
; /* handle to wait on for blocking ioctl
*/
2493 unsigned int options
; /* device open options
*/
2494 VARARG(out_data
,bytes
); /* ioctl output data
*/
2498 /* Store results of an async irp
*/
2499 @
REQ(set_irp_result
)
2500 obj_handle_t handle
; /* handle to the irp
*/
2501 unsigned int status
; /* status of the irp
*/
2502 data_size_t size
; /* result
size (input or output depending on the operation
) */
2503 VARARG(data
,bytes
); /* output data of the irp
*/
2507 /* Create a named pipe
*/
2508 @
REQ(create_named_pipe
)
2509 unsigned int access
;
2510 unsigned int options
;
2511 unsigned int sharing
;
2512 unsigned int maxinstances
;
2513 unsigned int outsize
;
2514 unsigned int insize
;
2517 VARARG(objattr
,object_attributes
); /* object attributes
*/
2519 obj_handle_t handle
; /* handle to the pipe
*/
2522 /* flags in create_named_pipe and get_named_pipe_info
*/
2523 #define NAMED_PIPE_MESSAGE_STREAM_WRITE
0x0001
2524 #define NAMED_PIPE_MESSAGE_STREAM_READ
0x0002
2525 #define NAMED_PIPE_NONBLOCKING_MODE
0x0004
2526 #define NAMED_PIPE_SERVER_END
0x8000
2528 /* Set named pipe information by handle
*/
2529 @
REQ(set_named_pipe_info
)
2530 obj_handle_t handle
;
2534 /* Create a window
*/
2536 user_handle_t parent
; /* parent window
*/
2537 user_handle_t owner
; /* owner window
*/
2538 atom_t atom
; /* class atom
*/
2539 mod_handle_t instance
; /* module instance
*/
2540 int dpi
; /* system DPI
*/
2541 int awareness
; /* thread DPI awareness
*/
2542 VARARG(class
,unicode_str
); /* class name
*/
2544 user_handle_t handle
; /* created window
*/
2545 user_handle_t parent
; /* full handle of parent
*/
2546 user_handle_t owner
; /* full handle of owner
*/
2547 int extra
; /* number of extra bytes
*/
2548 client_ptr_t class_ptr
; /* pointer to class in client address space
*/
2549 int dpi
; /* window DPI if not per
-monitor aware
*/
2550 int awareness
; /* window DPI awareness
*/
2554 /* Destroy a window
*/
2555 @
REQ(destroy_window
)
2556 user_handle_t handle
; /* handle to the window
*/
2560 /* Retrieve the desktop window for the current thread
*/
2561 @
REQ(get_desktop_window
)
2562 int force
; /* force creation if it doesn
't exist */
2564 user_handle_t top_window; /* handle to the desktop window */
2565 user_handle_t msg_window; /* handle to the top-level HWND_MESSAGE parent */
2569 /* Set a window owner */
2570 @REQ(set_window_owner)
2571 user_handle_t handle; /* handle to the window */
2572 user_handle_t owner; /* new owner */
2574 user_handle_t full_owner; /* full handle of new owner */
2575 user_handle_t prev_owner; /* full handle of previous owner */
2579 /* Get information from a window handle */
2580 @REQ(get_window_info)
2581 user_handle_t handle; /* handle to the window */
2583 user_handle_t full_handle; /* full 32-bit handle */
2584 user_handle_t last_active; /* last active popup */
2585 process_id_t pid; /* process owning the window */
2586 thread_id_t tid; /* thread owning the window */
2587 atom_t atom; /* class atom */
2588 int is_unicode; /* ANSI or unicode */
2589 int dpi; /* window DPI */
2590 int awareness; /* DPI awareness */
2594 /* Set some information in a window */
2595 @REQ(set_window_info)
2596 unsigned short flags; /* flags for fields to set (see below) */
2597 short int is_unicode; /* ANSI or unicode */
2598 user_handle_t handle; /* handle to the window */
2599 unsigned int style; /* window style */
2600 unsigned int ex_style; /* window extended style */
2601 unsigned int id; /* window id */
2602 mod_handle_t instance; /* creator instance */
2603 lparam_t user_data; /* user-specific data */
2604 int extra_offset; /* offset to set in extra bytes */
2605 data_size_t extra_size; /* size to set in extra bytes */
2606 lparam_t extra_value; /* value to set in extra bytes */
2608 unsigned int old_style; /* old window style */
2609 unsigned int old_ex_style; /* old window extended style */
2610 mod_handle_t old_instance; /* old creator instance */
2611 lparam_t old_user_data; /* old user-specific data */
2612 lparam_t old_extra_value; /* old value in extra bytes */
2613 unsigned int old_id; /* old window id */
2615 #define SET_WIN_STYLE 0x01
2616 #define SET_WIN_EXSTYLE 0x02
2617 #define SET_WIN_ID 0x04
2618 #define SET_WIN_INSTANCE 0x08
2619 #define SET_WIN_USERDATA 0x10
2620 #define SET_WIN_EXTRA 0x20
2621 #define SET_WIN_UNICODE 0x40
2624 /* Set the parent of a window */
2626 user_handle_t handle; /* handle to the window */
2627 user_handle_t parent; /* handle to the parent */
2629 user_handle_t old_parent; /* old parent window */
2630 user_handle_t full_parent; /* full handle of new parent */
2631 int dpi; /* new window DPI if not per-monitor aware */
2632 int awareness; /* new DPI awareness */
2636 /* Get a list of the window parents, up to the root of the tree */
2637 @REQ(get_window_parents)
2638 user_handle_t handle; /* handle to the window */
2640 int count; /* total count of parents */
2641 VARARG(parents,user_handles); /* parent handles */
2645 /* Get a list of the window children */
2646 @REQ(get_window_children)
2647 obj_handle_t desktop; /* handle to desktop */
2648 user_handle_t parent; /* parent window */
2649 atom_t atom; /* class atom for the listed children */
2650 thread_id_t tid; /* thread owning the listed children */
2651 VARARG(class,unicode_str); /* class name */
2653 int count; /* total count of children */
2654 VARARG(children,user_handles); /* children handles */
2658 /* Get a list of the window children that contain a given point */
2659 @REQ(get_window_children_from_point)
2660 user_handle_t parent; /* parent window */
2661 int x; /* point in parent coordinates */
2663 int dpi; /* dpi for the point coordinates */
2665 int count; /* total count of children */
2666 VARARG(children,user_handles); /* children handles */
2670 /* Get window tree information from a window handle */
2671 @REQ(get_window_tree)
2672 user_handle_t handle; /* handle to the window */
2674 user_handle_t parent; /* parent window */
2675 user_handle_t owner; /* owner window */
2676 user_handle_t next_sibling; /* next sibling in Z-order */
2677 user_handle_t prev_sibling; /* prev sibling in Z-order */
2678 user_handle_t first_sibling; /* first sibling in Z-order */
2679 user_handle_t last_sibling; /* last sibling in Z-order */
2680 user_handle_t first_child; /* first child */
2681 user_handle_t last_child; /* last child */
2684 /* Set the position and Z order of a window */
2685 @REQ(set_window_pos)
2686 unsigned short swp_flags; /* SWP_* flags */
2687 unsigned short paint_flags; /* paint flags (see below) */
2688 user_handle_t handle; /* handle to the window */
2689 user_handle_t previous; /* previous window in Z order */
2690 rectangle_t window; /* window rectangle (in parent coords) */
2691 rectangle_t client; /* client rectangle (in parent coords) */
2692 VARARG(valid,rectangles); /* valid rectangles from WM_NCCALCSIZE (in parent coords) */
2694 unsigned int new_style; /* new window style */
2695 unsigned int new_ex_style; /* new window extended style */
2696 user_handle_t surface_win; /* parent window that holds the surface */
2697 int needs_update; /* whether the surface region needs an update */
2699 #define SET_WINPOS_PAINT_SURFACE 0x01 /* window has a paintable surface */
2700 #define SET_WINPOS_PIXEL_FORMAT 0x02 /* window has a custom pixel format */
2702 /* Get the window and client rectangles of a window */
2703 @REQ(get_window_rectangles)
2704 user_handle_t handle; /* handle to the window */
2705 int relative; /* coords relative to (see below) */
2706 int dpi; /* DPI to map to, or zero for per-monitor DPI */
2708 rectangle_t window; /* window rectangle */
2709 rectangle_t client; /* client rectangle */
2711 enum coords_relative
2713 COORDS_CLIENT, /* relative to client area */
2714 COORDS_WINDOW, /* relative to whole window area */
2715 COORDS_PARENT, /* relative to parent's client area
*/
2716 COORDS_SCREEN
/* relative to screen origin
*/
2720 /* Get the window text
*/
2721 @
REQ(get_window_text
)
2722 user_handle_t handle
; /* handle to the window
*/
2724 data_size_t length
; /* total length in WCHARs
*/
2725 VARARG(text
,unicode_str
); /* window text
*/
2729 /* Set the window text
*/
2730 @
REQ(set_window_text
)
2731 user_handle_t handle
; /* handle to the window
*/
2732 VARARG(text
,unicode_str
); /* window text
*/
2736 /* Get the coordinates offset between two windows
*/
2737 @
REQ(get_windows_offset
)
2738 user_handle_t from
; /* handle to the first window
*/
2739 user_handle_t to
; /* handle to the second window
*/
2740 int dpi
; /* DPI to map to
, or zero for per
-monitor DPI
*/
2742 int x
; /* x coordinate offset
*/
2743 int y
; /* y coordinate offset
*/
2744 int mirror
; /* whether to mirror the x coordinate
*/
2748 /* Get the visible region of a window
*/
2749 @
REQ(get_visible_region
)
2750 user_handle_t window
; /* handle to the window
*/
2751 unsigned int flags
; /* DCX flags
*/
2753 user_handle_t top_win
; /* top window to clip against
*/
2754 rectangle_t top_rect
; /* top window visible rect with screen coords
*/
2755 rectangle_t win_rect
; /* window rect in screen coords
*/
2756 unsigned int paint_flags
; /* paint
flags (from SET_WINPOS_
* flags
) */
2757 data_size_t total_size
; /* total size of the resulting region
*/
2758 VARARG(region
,rectangles
); /* list of rectangles for the
region (in screen coords
) */
2762 /* Get the visible surface region of a window
*/
2763 @
REQ(get_surface_region
)
2764 user_handle_t window
; /* handle to the window
*/
2766 rectangle_t visible_rect
; /* window visible rect in screen coords
*/
2767 data_size_t total_size
; /* total size of the resulting region
*/
2768 VARARG(region
,rectangles
); /* list of rectangles for the
region (in screen coords
) */
2772 /* Get the window region
*/
2773 @
REQ(get_window_region
)
2774 user_handle_t window
; /* handle to the window
*/
2776 data_size_t total_size
; /* total size of the resulting region
*/
2777 VARARG(region
,rectangles
); /* list of rectangles for the
region (in window coords
) */
2781 /* Set the window region
*/
2782 @
REQ(set_window_region
)
2783 user_handle_t window
; /* handle to the window
*/
2784 int redraw
; /* redraw the window?
*/
2785 VARARG(region
,rectangles
); /* list of rectangles for the
region (in window coords
) */
2789 /* Get the window update region
*/
2790 @
REQ(get_update_region
)
2791 user_handle_t window
; /* handle to the window
*/
2792 user_handle_t from_child
; /* child to start searching from
*/
2793 unsigned int flags
; /* update
flags (see below
) */
2795 user_handle_t child
; /* child to
repaint (or window itself
) */
2796 unsigned int flags
; /* resulting update
flags (see below
) */
2797 data_size_t total_size
; /* total size of the resulting region
*/
2798 VARARG(region
,rectangles
); /* list of rectangles for the
region (in screen coords
) */
2800 #define UPDATE_NONCLIENT
0x001 /* get region for repainting non
-client area
*/
2801 #define UPDATE_ERASE
0x002 /* get region for erasing client area
*/
2802 #define UPDATE_PAINT
0x004 /* get region for painting client area
*/
2803 #define UPDATE_INTERNALPAINT
0x008 /* get region if internal paint is pending
*/
2804 #define UPDATE_ALLCHILDREN
0x010 /* force repaint of all children
*/
2805 #define UPDATE_NOCHILDREN
0x020 /* don
't try to repaint any children */
2806 #define UPDATE_NOREGION 0x040 /* don't return a region
, only the flags
*/
2807 #define UPDATE_DELAYED_ERASE
0x080 /* still needs erase after BeginPaint
*/
2808 #define UPDATE_CLIPCHILDREN
0x100 /* remove clipped children from the update region
*/
2811 /* Update the z order of a window so that a given rectangle is fully visible
*/
2812 @
REQ(update_window_zorder
)
2813 user_handle_t window
; /* handle to the window
*/
2814 rectangle_t rect
; /* rectangle that must be
visible (in client coords
) */
2818 /* Mark parts of a window as needing a redraw
*/
2820 user_handle_t window
; /* handle to the window
*/
2821 unsigned int flags
; /* RDW_
* flags
*/
2822 VARARG(region
,rectangles
); /* list of rectangles for the
region (in window coords
) */
2826 /* Set a window property
*/
2827 @
REQ(set_window_property
)
2828 user_handle_t window
; /* handle to the window
*/
2829 lparam_t data
; /* data to store
*/
2830 atom_t atom
; /* property
atom (if no name specified
) */
2831 VARARG(name
,unicode_str
); /* property name
*/
2835 /* Remove a window property
*/
2836 @
REQ(remove_window_property
)
2837 user_handle_t window
; /* handle to the window
*/
2838 atom_t atom
; /* property
atom (if no name specified
) */
2839 VARARG(name
,unicode_str
); /* property name
*/
2841 lparam_t data
; /* data stored in property
*/
2845 /* Get a window property
*/
2846 @
REQ(get_window_property
)
2847 user_handle_t window
; /* handle to the window
*/
2848 atom_t atom
; /* property
atom (if no name specified
) */
2849 VARARG(name
,unicode_str
); /* property name
*/
2851 lparam_t data
; /* data stored in property
*/
2855 /* Get the list of properties of a window
*/
2856 @
REQ(get_window_properties
)
2857 user_handle_t window
; /* handle to the window
*/
2859 int total
; /* total number of properties
*/
2860 VARARG(props
,properties
); /* list of properties
*/
2864 /* Create a window station
*/
2865 @
REQ(create_winstation
)
2866 unsigned int flags
; /* window station flags
*/
2867 unsigned int access
; /* wanted access rights
*/
2868 unsigned int attributes
; /* object attributes
*/
2869 obj_handle_t rootdir
; /* root directory
*/
2870 VARARG(name
,unicode_str
); /* object name
*/
2872 obj_handle_t handle
; /* handle to the window station
*/
2876 /* Open a handle to a window station
*/
2877 @
REQ(open_winstation
)
2878 unsigned int access
; /* wanted access rights
*/
2879 unsigned int attributes
; /* object attributes
*/
2880 obj_handle_t rootdir
; /* root directory
*/
2881 VARARG(name
,unicode_str
); /* object name
*/
2883 obj_handle_t handle
; /* handle to the window station
*/
2887 /* Close a window station
*/
2888 @
REQ(close_winstation
)
2889 obj_handle_t handle
; /* handle to the window station
*/
2893 /* Get the process current window station
*/
2894 @
REQ(get_process_winstation
)
2896 obj_handle_t handle
; /* handle to the window station
*/
2900 /* Set the process current window station
*/
2901 @
REQ(set_process_winstation
)
2902 obj_handle_t handle
; /* handle to the window station
*/
2906 /* Enumerate window stations
*/
2907 @
REQ(enum_winstation
)
2908 unsigned int index
; /* current index
*/
2910 unsigned int next
; /* next index
*/
2911 VARARG(name
,unicode_str
); /* window station name
*/
2915 /* Create a desktop
*/
2916 @
REQ(create_desktop
)
2917 unsigned int flags
; /* desktop flags
*/
2918 unsigned int access
; /* wanted access rights
*/
2919 unsigned int attributes
; /* object attributes
*/
2920 VARARG(name
,unicode_str
); /* object name
*/
2922 obj_handle_t handle
; /* handle to the desktop
*/
2926 /* Open a handle to a desktop
*/
2928 obj_handle_t winsta
; /* window station to
open (null allowed
) */
2929 unsigned int flags
; /* desktop flags
*/
2930 unsigned int access
; /* wanted access rights
*/
2931 unsigned int attributes
; /* object attributes
*/
2932 VARARG(name
,unicode_str
); /* object name
*/
2934 obj_handle_t handle
; /* handle to the desktop
*/
2938 /* Open a handle to current input desktop
*/
2939 @
REQ(open_input_desktop
)
2940 unsigned int flags
; /* desktop flags
*/
2941 unsigned int access
; /* wanted access rights
*/
2942 unsigned int attributes
; /* object attributes
*/
2944 obj_handle_t handle
; /* handle to the desktop
*/
2948 /* Close a desktop
*/
2950 obj_handle_t handle
; /* handle to the desktop
*/
2954 /* Get the thread current desktop
*/
2955 @
REQ(get_thread_desktop
)
2956 thread_id_t tid
; /* thread id
*/
2958 obj_handle_t handle
; /* handle to the desktop
*/
2962 /* Set the thread current desktop
*/
2963 @
REQ(set_thread_desktop
)
2964 obj_handle_t handle
; /* handle to the desktop
*/
2968 /* Enumerate desktops
*/
2970 obj_handle_t winstation
; /* handle to the window station
*/
2971 unsigned int index
; /* current index
*/
2973 unsigned int next
; /* next index
*/
2974 VARARG(name
,unicode_str
); /* window station name
*/
2978 /* Get
/set information about a user
object (window station or desktop
) */
2979 @
REQ(set_user_object_info
)
2980 obj_handle_t handle
; /* handle to the object
*/
2981 unsigned int flags
; /* information to set
/get
*/
2982 unsigned int obj_flags
; /* new object flags
*/
2984 int is_desktop
; /* is object a desktop?
*/
2985 unsigned int old_obj_flags
; /* old object flags
*/
2986 VARARG(name
,unicode_str
); /* object name
*/
2988 #define SET_USER_OBJECT_SET_FLAGS
1
2989 #define SET_USER_OBJECT_GET_FULL_NAME
2
2992 /* Register a hotkey
*/
2993 @
REQ(register_hotkey
)
2994 user_handle_t window
; /* handle to the window
*/
2995 int id
; /* hotkey identifier
*/
2996 unsigned int flags
; /* modifier keys
*/
2997 unsigned int vkey
; /* virtual key code
*/
2999 int replaced
; /* did we replace an existing hotkey?
*/
3000 unsigned int flags
; /* flags of replaced hotkey
*/
3001 unsigned int vkey
; /* virtual key code of replaced hotkey
*/
3005 /* Unregister a hotkey
*/
3006 @
REQ(unregister_hotkey
)
3007 user_handle_t window
; /* handle to the window
*/
3008 int id
; /* hotkey identifier
*/
3010 unsigned int flags
; /* flags of removed hotkey
*/
3011 unsigned int vkey
; /* virtual key code of removed hotkey
*/
3015 /* Attach (or detach
) thread inputs
*/
3016 @
REQ(attach_thread_input
)
3017 thread_id_t tid_from
; /* thread to be attached
*/
3018 thread_id_t tid_to
; /* thread to which tid_from should be attached
*/
3019 int attach
; /* is it an attach?
*/
3023 /* Get input data for a given thread
*/
3024 @
REQ(get_thread_input
)
3025 thread_id_t tid
; /* id of thread
*/
3027 user_handle_t focus
; /* handle to the focus window
*/
3028 user_handle_t capture
; /* handle to the capture window
*/
3029 user_handle_t active
; /* handle to the active window
*/
3030 user_handle_t foreground
; /* handle to the global foreground window
*/
3031 user_handle_t menu_owner
; /* handle to the menu owner
*/
3032 user_handle_t move_size
; /* handle to the moving
/resizing window
*/
3033 user_handle_t caret
; /* handle to the caret window
*/
3034 user_handle_t cursor
; /* handle to the cursor
*/
3035 int show_count
; /* cursor show count
*/
3036 rectangle_t rect
; /* caret rectangle
*/
3040 /* Get the time of the last input event
*/
3041 @
REQ(get_last_input_time
)
3047 /* Retrieve queue keyboard state for a given thread
*/
3049 thread_id_t tid
; /* id of thread
*/
3050 int key
; /* optional key code or
-1 */
3052 unsigned char state
; /* state of specified key
*/
3053 VARARG(keystate
,bytes
); /* state array for all the keys
*/
3056 /* Set queue keyboard state for a given thread
*/
3058 thread_id_t tid
; /* id of thread
*/
3059 int async
; /* whether to change the async state too
*/
3060 VARARG(keystate
,bytes
); /* state array for all the keys
*/
3063 /* Set the system foreground window
*/
3064 @
REQ(set_foreground_window
)
3065 user_handle_t handle
; /* handle to the foreground window
*/
3067 user_handle_t previous
; /* handle to the previous foreground window
*/
3068 int send_msg_old
; /* whether we have to send a msg to the old window
*/
3069 int send_msg_new
; /* whether we have to send a msg to the new window
*/
3072 /* Set the current thread focus window
*/
3073 @
REQ(set_focus_window
)
3074 user_handle_t handle
; /* handle to the focus window
*/
3076 user_handle_t previous
; /* handle to the previous focus window
*/
3079 /* Set the current thread active window
*/
3080 @
REQ(set_active_window
)
3081 user_handle_t handle
; /* handle to the active window
*/
3083 user_handle_t previous
; /* handle to the previous active window
*/
3086 /* Set the current thread capture window
*/
3087 @
REQ(set_capture_window
)
3088 user_handle_t handle
; /* handle to the capture window
*/
3089 unsigned int flags
; /* capture
flags (see below
) */
3091 user_handle_t previous
; /* handle to the previous capture window
*/
3092 user_handle_t full_handle
; /* full
32-bit handle of new capture window
*/
3094 #define CAPTURE_MENU
0x01 /* capture is for a menu
*/
3095 #define CAPTURE_MOVESIZE
0x02 /* capture is for moving
/resizing
*/
3098 /* Set the current thread caret window
*/
3099 @
REQ(set_caret_window
)
3100 user_handle_t handle
; /* handle to the caret window
*/
3101 int width
; /* caret width
*/
3102 int height
; /* caret height
*/
3104 user_handle_t previous
; /* handle to the previous caret window
*/
3105 rectangle_t old_rect
; /* previous caret rectangle
*/
3106 int old_hide
; /* previous hide count
*/
3107 int old_state
; /* previous caret
state (1=on
, 0=off
) */
3111 /* Set the current thread caret information
*/
3112 @
REQ(set_caret_info
)
3113 unsigned int flags
; /* caret
flags (see below
) */
3114 user_handle_t handle
; /* handle to the caret window
*/
3115 int x
; /* caret x position
*/
3116 int y
; /* caret y position
*/
3117 int hide
; /* increment for hide
count (can be negative to show it
) */
3118 int state
; /* caret
state (see below
) */
3120 user_handle_t full_handle
; /* handle to the current caret window
*/
3121 rectangle_t old_rect
; /* previous caret rectangle
*/
3122 int old_hide
; /* previous hide count
*/
3123 int old_state
; /* previous caret
state (1=on
, 0=off
) */
3125 #define SET_CARET_POS
0x01 /* set the caret position from x
,y
*/
3126 #define SET_CARET_HIDE
0x02 /* increment the caret hide count
*/
3127 #define SET_CARET_STATE
0x04 /* set the caret on
/off state
*/
3130 CARET_STATE_OFF
, /* off
*/
3131 CARET_STATE_ON
, /* on
*/
3132 CARET_STATE_TOGGLE
, /* toggle current state
*/
3133 CARET_STATE_ON_IF_MOVED
/* on if the position differs
, unchanged otherwise
*/
3137 /* Set a window hook
*/
3139 int id
; /* id of the hook
*/
3140 process_id_t pid
; /* id of process to set the hook into
*/
3141 thread_id_t tid
; /* id of thread to set the hook into
*/
3144 client_ptr_t proc
; /* hook procedure
*/
3146 int unicode
; /* is it a unicode hook?
*/
3147 VARARG(module
,unicode_str
); /* module name
*/
3149 user_handle_t handle
; /* handle to the hook
*/
3150 unsigned int active_hooks
; /* active hooks bitmap
*/
3154 /* Remove a window hook
*/
3156 user_handle_t handle
; /* handle to the hook
*/
3157 client_ptr_t proc
; /* hook procedure if handle is
0 */
3158 int id
; /* id of the hook if handle is
0 */
3160 unsigned int active_hooks
; /* active hooks bitmap
*/
3164 /* Start calling a hook chain
*/
3165 @
REQ(start_hook_chain
)
3166 int id
; /* id of the hook
*/
3167 int event
; /* signalled event
*/
3168 user_handle_t window
; /* handle to the event window
*/
3169 int object_id
; /* object id for out of context winevent
*/
3170 int child_id
; /* child id for out of context winevent
*/
3172 user_handle_t handle
; /* handle to the next hook
*/
3173 process_id_t pid
; /* process id for low
-level keyboard
/mouse hooks
*/
3174 thread_id_t tid
; /* thread id for low
-level keyboard
/mouse hooks
*/
3175 int unicode
; /* is it a unicode hook?
*/
3176 client_ptr_t proc
; /* hook procedure
*/
3177 unsigned int active_hooks
; /* active hooks bitmap
*/
3178 VARARG(module
,unicode_str
); /* module name
*/
3182 /* Finished calling a hook chain
*/
3183 @
REQ(finish_hook_chain
)
3184 int id
; /* id of the hook
*/
3188 /* Get the hook information
*/
3190 user_handle_t handle
; /* handle to the current hook
*/
3191 int get_next
; /* do we want info about current or next hook?
*/
3192 int event
; /* signalled event
*/
3193 user_handle_t window
; /* handle to the event window
*/
3194 int object_id
; /* object id for out of context winevent
*/
3195 int child_id
; /* child id for out of context winevent
*/
3197 user_handle_t handle
; /* handle to the hook
*/
3198 int id
; /* id of the hook
*/
3199 process_id_t pid
; /* process id for low
-level keyboard
/mouse hooks
*/
3200 thread_id_t tid
; /* thread id for low
-level keyboard
/mouse hooks
*/
3201 client_ptr_t proc
; /* hook procedure
*/
3202 int unicode
; /* is it a unicode hook?
*/
3203 VARARG(module
,unicode_str
); /* module name
*/
3207 /* Create a window class
*/
3209 int local
; /* is it a local class?
*/
3210 atom_t atom
; /* class atom
*/
3211 unsigned int style
; /* class style
*/
3212 mod_handle_t instance
; /* module instance
*/
3213 int extra
; /* number of extra class bytes
*/
3214 int win_extra
; /* number of window extra bytes
*/
3215 client_ptr_t client_ptr
; /* pointer to class in client address space
*/
3216 data_size_t name_offset
; /* base class name offset for specified atom
*/
3217 VARARG(name
,unicode_str
); /* class name
*/
3219 atom_t atom
; /* resulting class atom
*/
3223 /* Destroy a window class
*/
3225 atom_t atom
; /* class atom
*/
3226 mod_handle_t instance
; /* module instance
*/
3227 VARARG(name
,unicode_str
); /* class name
*/
3229 client_ptr_t client_ptr
; /* pointer to class in client address space
*/
3233 /* Set some information in a class
*/
3234 @
REQ(set_class_info
)
3235 user_handle_t window
; /* handle to the window
*/
3236 unsigned int flags
; /* flags for info to
set (see below
) */
3237 atom_t atom
; /* class atom
*/
3238 unsigned int style
; /* class style
*/
3239 int win_extra
; /* number of window extra bytes
*/
3240 mod_handle_t instance
; /* module instance
*/
3241 int extra_offset
; /* offset to set in extra bytes
*/
3242 data_size_t extra_size
; /* size to set in extra bytes
*/
3243 lparam_t extra_value
; /* value to set in extra bytes
*/
3245 atom_t old_atom
; /* previous class atom
*/
3246 atom_t base_atom
; /* base class atom
*/
3247 mod_handle_t old_instance
; /* previous module instance
*/
3248 lparam_t old_extra_value
; /* old value in extra bytes
*/
3249 unsigned int old_style
; /* previous class style
*/
3250 int old_extra
; /* previous number of class extra bytes
*/
3251 int old_win_extra
; /* previous number of window extra bytes
*/
3253 #define SET_CLASS_ATOM
0x0001
3254 #define SET_CLASS_STYLE
0x0002
3255 #define SET_CLASS_WINEXTRA
0x0004
3256 #define SET_CLASS_INSTANCE
0x0008
3257 #define SET_CLASS_EXTRA
0x0010
3260 /* Open the clipboard
*/
3261 @
REQ(open_clipboard
)
3262 user_handle_t window
; /* clipboard window
*/
3264 user_handle_t owner
; /* current clipboard owner
*/
3268 /* Close the clipboard
*/
3269 @
REQ(close_clipboard
)
3271 user_handle_t viewer
; /* first clipboard viewer
*/
3272 user_handle_t owner
; /* current clipboard owner
*/
3276 /* Empty the clipboard and grab ownership
*/
3277 @
REQ(empty_clipboard
)
3281 /* Add a data format to the clipboard
*/
3282 @
REQ(set_clipboard_data
)
3283 unsigned int format
; /* clipboard format of the data
*/
3284 unsigned int lcid
; /* locale id to use for synthesizing text formats
*/
3285 VARARG(data
,bytes
); /* data contents
*/
3287 unsigned int seqno
; /* sequence number for the set data
*/
3291 /* Fetch a data format from the clipboard
*/
3292 @
REQ(get_clipboard_data
)
3293 unsigned int format
; /* clipboard format of the data
*/
3294 int render
; /* will we try to render it if missing?
*/
3295 int cached
; /* do we already have it in the client
-side cache?
*/
3296 unsigned int seqno
; /* sequence number for the data in the cache
*/
3298 unsigned int from
; /* for synthesized data
, format to generate it from
*/
3299 user_handle_t owner
; /* clipboard owner for delayed
-rendered formats
*/
3300 unsigned int seqno
; /* sequence number for the originally set data
*/
3301 data_size_t total
; /* total data size
*/
3302 VARARG(data
,bytes
); /* data contents
*/
3306 /* Retrieve a list of available formats
*/
3307 @
REQ(get_clipboard_formats
)
3308 unsigned int format
; /* specific format to query
, return all if
0 */
3310 unsigned int count
; /* count of available formats
*/
3311 VARARG(formats
,uints
); /* array of available formats
*/
3315 /* Retrieve the next available format
*/
3316 @
REQ(enum_clipboard_formats
)
3317 unsigned int previous
; /* previous format
, or first if
0 */
3319 unsigned int format
; /* next format
*/
3323 /* Release ownership of the clipboard
*/
3324 @
REQ(release_clipboard
)
3325 user_handle_t owner
; /* clipboard owner to release
*/
3327 user_handle_t viewer
; /* first clipboard viewer
*/
3328 user_handle_t owner
; /* current clipboard owner
*/
3332 /* Get clipboard information
*/
3333 @
REQ(get_clipboard_info
)
3335 user_handle_t window
; /* clipboard window
*/
3336 user_handle_t owner
; /* clipboard owner
*/
3337 user_handle_t viewer
; /* clipboard viewer
*/
3338 unsigned int seqno
; /* current sequence number
*/
3342 /* Set the clipboard viewer window
*/
3343 @
REQ(set_clipboard_viewer
)
3344 user_handle_t viewer
; /* clipboard viewer
*/
3345 user_handle_t previous
; /* if non
-zero
, check that this was the previous viewer
*/
3347 user_handle_t old_viewer
; /* previous clipboard viewer
*/
3348 user_handle_t owner
; /* clipboard owner
*/
3352 /* Add a clipboard listener window
*/
3353 @
REQ(add_clipboard_listener
)
3354 user_handle_t window
; /* clipboard listener window
*/
3358 /* Remove a clipboard listener window
*/
3359 @
REQ(remove_clipboard_listener
)
3360 user_handle_t window
; /* clipboard listener window
*/
3364 /* Open a security token
*/
3366 obj_handle_t handle
; /* handle to the thread or process
*/
3367 unsigned int access
; /* access rights to the new token
*/
3368 unsigned int attributes
;/* object attributes
*/
3369 unsigned int flags
; /* flags (see below
) */
3371 obj_handle_t token
; /* handle to the token
*/
3373 #define OPEN_TOKEN_THREAD
1
3374 #define OPEN_TOKEN_AS_SELF
2
3377 /* Set
/get the global windows
*/
3378 @
REQ(set_global_windows
)
3379 unsigned int flags
; /* flags for fields to
set (see below
) */
3380 user_handle_t shell_window
; /* handle to the new shell window
*/
3381 user_handle_t shell_listview
; /* handle to the new shell listview window
*/
3382 user_handle_t progman_window
; /* handle to the new program manager window
*/
3383 user_handle_t taskman_window
; /* handle to the new task manager window
*/
3385 user_handle_t old_shell_window
; /* handle to the shell window
*/
3386 user_handle_t old_shell_listview
; /* handle to the shell listview window
*/
3387 user_handle_t old_progman_window
; /* handle to the new program manager window
*/
3388 user_handle_t old_taskman_window
; /* handle to the new task manager window
*/
3390 #define SET_GLOBAL_SHELL_WINDOWS
0x01 /* set both main shell and listview windows
*/
3391 #define SET_GLOBAL_PROGMAN_WINDOW
0x02
3392 #define SET_GLOBAL_TASKMAN_WINDOW
0x04
3394 /* Adjust the privileges held by a token
*/
3395 @
REQ(adjust_token_privileges
)
3396 obj_handle_t handle
; /* handle to the token
*/
3397 int disable_all
; /* disable all privileges?
*/
3398 int get_modified_state
; /* get modified privileges?
*/
3399 VARARG(privileges
,LUID_AND_ATTRIBUTES
); /* privileges to enable
/disable
/remove
*/
3401 unsigned int len
; /* total length in bytes required to store token privileges
*/
3402 VARARG(privileges
,LUID_AND_ATTRIBUTES
); /* modified privileges
*/
3405 /* Retrieves the set of privileges held by or available to a token
*/
3406 @
REQ(get_token_privileges
)
3407 obj_handle_t handle
; /* handle to the token
*/
3409 unsigned int len
; /* total length in bytes required to store token privileges
*/
3410 VARARG(privileges
,LUID_AND_ATTRIBUTES
); /* privileges held by or available to a token
*/
3413 /* Check the token has the required privileges
*/
3414 @
REQ(check_token_privileges
)
3415 obj_handle_t handle
; /* handle to the token
*/
3416 int all_required
; /* are all the privileges required for the check to succeed?
*/
3417 VARARG(privileges
,LUID_AND_ATTRIBUTES
); /* privileges to check
*/
3419 int has_privileges
; /* does the token have the required privileges?
*/
3420 VARARG(privileges
,LUID_AND_ATTRIBUTES
); /* privileges held by or available to a token
*/
3423 @
REQ(duplicate_token
)
3424 obj_handle_t handle
; /* handle to the token to duplicate
*/
3425 unsigned int access
; /* access rights to the new token
*/
3426 int primary
; /* is the new token to be a primary one?
*/
3427 int impersonation_level
; /* impersonation level of the new token
*/
3428 VARARG(objattr
,object_attributes
); /* object attributes
*/
3430 obj_handle_t new_handle
; /* duplicated handle
*/
3434 obj_handle_t handle
; /* handle to the token
*/
3435 unsigned int desired_access
; /* desired access to the object
*/
3436 unsigned int mapping_read
; /* mapping from generic read to specific rights
*/
3437 unsigned int mapping_write
; /* mapping from generic write to specific rights
*/
3438 unsigned int mapping_execute
; /* mapping from generic execute to specific rights
*/
3439 unsigned int mapping_all
; /* mapping from generic all to specific rights
*/
3440 VARARG(sd
,security_descriptor
); /* security descriptor to check
*/
3442 unsigned int access_granted
; /* access rights actually granted
*/
3443 unsigned int access_status
; /* was access granted?
*/
3444 unsigned int privileges_len
; /* length needed to store privileges
*/
3445 VARARG(privileges
,LUID_AND_ATTRIBUTES
); /* privileges used during access check
*/
3449 obj_handle_t handle
; /* handle to the token
*/
3450 unsigned int which_sid
; /* which SID to retrieve from the token
*/
3452 data_size_t sid_len
; /* length needed to store sid
*/
3453 VARARG(sid
,SID
); /* the sid specified by which_sid from the token
*/
3456 @
REQ(get_token_groups
)
3457 obj_handle_t handle
; /* handle to the token
*/
3459 data_size_t user_len
; /* length needed to store user
*/
3460 VARARG(user
,token_groups
); /* groups the token
's user belongs to */
3463 @REQ(get_token_default_dacl)
3464 obj_handle_t handle; /* handle to the token */
3466 data_size_t acl_len; /* length needed to store access control list */
3467 VARARG(acl,ACL); /* access control list */
3470 @REQ(set_token_default_dacl)
3471 obj_handle_t handle; /* handle to the token */
3472 VARARG(acl,ACL); /* default dacl to set */
3475 @REQ(set_security_object)
3476 obj_handle_t handle; /* handle to the object */
3477 unsigned int security_info; /* which parts of security descriptor to set */
3478 VARARG(sd,security_descriptor); /* security descriptor to set */
3481 @REQ(get_security_object)
3482 obj_handle_t handle; /* handle to the object */
3483 unsigned int security_info; /* which parts of security descriptor to get */
3485 unsigned int sd_len; /* buffer size needed for sd */
3486 VARARG(sd,security_descriptor); /* retrieved security descriptor */
3493 obj_handle_t handle;
3494 unsigned int access;
3497 /* Return a list of all opened handles */
3498 @REQ(get_system_handles)
3500 unsigned int count; /* number of handles */
3501 VARARG(data,handle_infos); /* array of handle_infos */
3505 /* Create a mailslot */
3506 @REQ(create_mailslot)
3507 unsigned int access; /* wanted access rights */
3508 timeout_t read_timeout;
3509 unsigned int max_msgsize;
3510 VARARG(objattr,object_attributes); /* object attributes */
3512 obj_handle_t handle; /* handle to the mailslot */
3516 /* Set mailslot information */
3517 @REQ(set_mailslot_info)
3518 obj_handle_t handle; /* handle to the mailslot */
3519 timeout_t read_timeout;
3522 timeout_t read_timeout;
3523 unsigned int max_msgsize;
3525 #define MAILSLOT_SET_READ_TIMEOUT 1
3528 /* Create a directory object */
3529 @REQ(create_directory)
3530 unsigned int access; /* access flags */
3531 VARARG(objattr,object_attributes); /* object attributes */
3533 obj_handle_t handle; /* handle to the directory */
3537 /* Open a directory object */
3538 @REQ(open_directory)
3539 unsigned int access; /* access flags */
3540 unsigned int attributes; /* object attributes */
3541 obj_handle_t rootdir; /* root directory */
3542 VARARG(directory_name,unicode_str); /* Directory name */
3544 obj_handle_t handle; /* handle to the directory */
3548 /* Get a directory entry by index */
3549 @REQ(get_directory_entry)
3550 obj_handle_t handle; /* handle to the directory */
3551 unsigned int index; /* entry index */
3553 data_size_t name_len; /* length of the entry name in bytes */
3554 VARARG(name,unicode_str,name_len); /* entry name */
3555 VARARG(type,unicode_str); /* entry type */
3559 /* Create a symbolic link object */
3560 @REQ(create_symlink)
3561 unsigned int access; /* access flags */
3562 VARARG(objattr,object_attributes); /* object attributes */
3563 VARARG(target_name,unicode_str); /* target name */
3565 obj_handle_t handle; /* handle to the symlink */
3569 /* Open a symbolic link object */
3571 unsigned int access; /* access flags */
3572 unsigned int attributes; /* object attributes */
3573 obj_handle_t rootdir; /* root directory */
3574 VARARG(name,unicode_str); /* symlink name */
3576 obj_handle_t handle; /* handle to the symlink */
3580 /* Query a symbolic link object */
3582 obj_handle_t handle; /* handle to the symlink */
3584 data_size_t total; /* total needed size for name */
3585 VARARG(target_name,unicode_str); /* target name */
3589 /* Query basic object information */
3590 @REQ(get_object_info)
3591 obj_handle_t handle; /* handle to the object */
3593 unsigned int access; /* granted access mask */
3594 unsigned int ref_count; /* object ref count */
3595 unsigned int handle_count; /* object handle count */
3596 data_size_t total; /* total needed size for name */
3597 VARARG(name,unicode_str); /* object name */
3601 /* Query object type name information */
3602 @REQ(get_object_type)
3603 obj_handle_t handle; /* handle to the object */
3605 data_size_t total; /* needed size for type name */
3606 VARARG(type,unicode_str); /* type name */
3610 /* Unlink a named object */
3612 obj_handle_t handle; /* handle to the object */
3616 /* Query the impersonation level of an impersonation token */
3617 @REQ(get_token_impersonation_level)
3618 obj_handle_t handle; /* handle to the object */
3620 int impersonation_level; /* impersonation level of the impersonation token */
3623 /* Allocate a locally-unique identifier */
3624 @REQ(allocate_locally_unique_id)
3630 /* Create a device manager */
3631 @REQ(create_device_manager)
3632 unsigned int access; /* wanted access rights */
3633 unsigned int attributes; /* object attributes */
3635 obj_handle_t handle; /* handle to the device */
3639 /* Create a device */
3641 obj_handle_t rootdir; /* root directory */
3642 client_ptr_t user_ptr; /* opaque ptr for use by client */
3643 obj_handle_t manager; /* device manager */
3644 VARARG(name,unicode_str); /* object name */
3648 /* Delete a device */
3650 obj_handle_t manager; /* handle to the device manager */
3651 client_ptr_t device; /* pointer to the device */
3655 /* Retrieve the next pending device irp request */
3656 @REQ(get_next_device_request)
3657 obj_handle_t manager; /* handle to the device manager */
3658 obj_handle_t prev; /* handle to the previous irp */
3659 unsigned int status; /* status of the previous irp */
3660 client_ptr_t user_ptr; /* user pointer of the previous irp */
3662 irp_params_t params; /* irp parameters */
3663 obj_handle_t next; /* handle to the next irp */
3664 thread_id_t client_tid; /* tid of thread calling irp */
3665 client_ptr_t client_thread; /* pointer to thread object of calling irp */
3666 data_size_t in_size; /* total needed input size */
3667 VARARG(next_data,bytes); /* input data of the next irp */
3671 /* Get kernel pointer from server object */
3672 @REQ(get_kernel_object_ptr)
3673 obj_handle_t manager; /* handle to the device manager */
3674 obj_handle_t handle; /* object handle */
3676 client_ptr_t user_ptr; /* kernel object pointer */
3680 /* Associate kernel pointer with server object */
3681 @REQ(set_kernel_object_ptr)
3682 obj_handle_t manager; /* handle to the device manager */
3683 obj_handle_t handle; /* object handle */
3684 client_ptr_t user_ptr; /* kernel object pointer */
3688 /* Grab server object reference from kernel object pointer */
3689 @REQ(grab_kernel_object)
3690 obj_handle_t manager; /* handle to the device manager */
3691 client_ptr_t user_ptr; /* kernel object pointer */
3695 /* Release server object reference from kernel object pointer */
3696 @REQ(release_kernel_object)
3697 obj_handle_t manager; /* handle to the device manager */
3698 client_ptr_t user_ptr; /* kernel object pointer */
3702 /* Get handle from kernel object pointer */
3703 @REQ(get_kernel_object_handle)
3704 obj_handle_t manager; /* handle to the device manager */
3705 client_ptr_t user_ptr; /* kernel object pointer */
3706 unsigned int access; /* wanted access rights */
3708 obj_handle_t handle; /* kernel object handle */
3712 /* Make the current process a system process */
3713 @REQ(make_process_system)
3715 obj_handle_t event; /* event signaled when all user processes have exited */
3719 /* Get detailed fixed-size information about a token */
3720 @REQ(get_token_statistics)
3721 obj_handle_t handle; /* handle to the object */
3723 luid_t token_id; /* locally-unique identifier of the token */
3724 luid_t modified_id; /* locally-unique identifier of the modified version of the token */
3725 int primary; /* is the token primary or impersonation? */
3726 int impersonation_level; /* level of impersonation */
3727 int group_count; /* the number of groups the token is a member of */
3728 int privilege_count; /* the number of privileges the token has */
3732 /* Create I/O completion port */
3733 @REQ(create_completion)
3734 unsigned int access; /* desired access to a port */
3735 unsigned int concurrent; /* max number of concurrent active threads */
3736 VARARG(objattr,object_attributes); /* object attributes */
3738 obj_handle_t handle; /* port handle */
3742 /* Open I/O completion port */
3743 @REQ(open_completion)
3744 unsigned int access; /* desired access to a port */
3745 unsigned int attributes; /* object attributes */
3746 obj_handle_t rootdir; /* root directory */
3747 VARARG(filename,unicode_str); /* port name */
3749 obj_handle_t handle; /* port handle */
3753 /* add completion to completion port */
3754 @REQ(add_completion)
3755 obj_handle_t handle; /* port handle */
3756 apc_param_t ckey; /* completion key */
3757 apc_param_t cvalue; /* completion value */
3758 apc_param_t information; /* IO_STATUS_BLOCK Information */
3759 unsigned int status; /* completion result */
3763 /* get completion from completion port queue */
3764 @REQ(remove_completion)
3765 obj_handle_t handle; /* port handle */
3767 apc_param_t ckey; /* completion key */
3768 apc_param_t cvalue; /* completion value */
3769 apc_param_t information; /* IO_STATUS_BLOCK Information */
3770 unsigned int status; /* completion result */
3774 /* get completion queue depth */
3775 @REQ(query_completion)
3776 obj_handle_t handle; /* port handle */
3778 unsigned int depth; /* completion queue depth */
3782 /* associate object with completion port */
3783 @REQ(set_completion_info)
3784 obj_handle_t handle; /* object handle */
3785 apc_param_t ckey; /* completion key */
3786 obj_handle_t chandle; /* port handle */
3790 /* check for associated completion and push msg */
3791 @REQ(add_fd_completion)
3792 obj_handle_t handle; /* async' object
*/
3793 apc_param_t cvalue
; /* completion value
*/
3794 apc_param_t information
; /* IO_STATUS_BLOCK Information
*/
3795 unsigned int status
; /* completion status
*/
3796 int async
; /* completion is an async result
*/
3800 /* set fd completion information
*/
3801 @
REQ(set_fd_completion_mode
)
3802 obj_handle_t handle
; /* handle to a file or directory
*/
3803 unsigned int flags
; /* completion notification flags
*/
3807 /* set fd disposition information
*/
3808 @
REQ(set_fd_disp_info
)
3809 obj_handle_t handle
; /* handle to a file or directory
*/
3810 int unlink
; /* whether to unlink file on close
*/
3814 /* set fd name information
*/
3815 @
REQ(set_fd_name_info
)
3816 obj_handle_t handle
; /* handle to a file or directory
*/
3817 obj_handle_t rootdir
; /* root directory
*/
3818 int link
; /* link instead of renaming
*/
3819 int replace
; /* replace an existing file?
*/
3820 VARARG(filename
,string
); /* new file name
*/
3824 /* Retrieve layered info for a window
*/
3825 @
REQ(get_window_layered_info
)
3826 user_handle_t handle
; /* handle to the window
*/
3828 unsigned int color_key
; /* color key
*/
3829 unsigned int alpha
; /* alpha (0.
.255) */
3830 unsigned int flags
; /* LWA_
* flags
*/
3834 /* Set layered info for a window
*/
3835 @
REQ(set_window_layered_info
)
3836 user_handle_t handle
; /* handle to the window
*/
3837 unsigned int color_key
; /* color key
*/
3838 unsigned int alpha
; /* alpha (0.
.255) */
3839 unsigned int flags
; /* LWA_
* flags
*/
3843 /* Allocate an arbitrary user handle
*/
3844 @
REQ(alloc_user_handle
)
3846 user_handle_t handle
; /* allocated handle
*/
3850 /* Free an arbitrary user handle
*/
3851 @
REQ(free_user_handle
)
3852 user_handle_t handle
; /* handle to free
*/
3856 /* Set
/get the current cursor
*/
3858 unsigned int flags
; /* flags for fields to
set (see below
) */
3859 user_handle_t handle
; /* handle to the cursor
*/
3860 int show_count
; /* show count increment
/decrement
*/
3861 int x
; /* cursor position
*/
3863 rectangle_t clip
; /* cursor clip rectangle
*/
3864 unsigned int clip_msg
; /* message to post on cursor clip changes
*/
3866 user_handle_t prev_handle
; /* previous handle
*/
3867 int prev_count
; /* previous show count
*/
3868 int prev_x
; /* previous position
*/
3870 int new_x
; /* new position
*/
3872 rectangle_t new_clip
; /* new clip rectangle
*/
3873 unsigned int last_change
; /* time of last position change
*/
3875 #define SET_CURSOR_HANDLE
0x01
3876 #define SET_CURSOR_COUNT
0x02
3877 #define SET_CURSOR_POS
0x04
3878 #define SET_CURSOR_CLIP
0x08
3879 #define SET_CURSOR_NOCLIP
0x10
3882 /* Modify the list of registered rawinput devices
*/
3883 @
REQ(update_rawinput_devices
)
3884 VARARG(devices
,rawinput_devices
);
3888 /* Create a new job object
*/
3890 unsigned int access
; /* wanted access rights
*/
3891 VARARG(objattr
,object_attributes
); /* object attributes
*/
3893 obj_handle_t handle
; /* handle to the job
*/
3897 /* Open a job object
*/
3899 unsigned int access
; /* wanted access rights
*/
3900 unsigned int attributes
; /* object attributes
*/
3901 obj_handle_t rootdir
; /* root directory
*/
3902 VARARG(name
,unicode_str
); /* object name
*/
3904 obj_handle_t handle
; /* handle to the job
*/
3908 /* Assign a job object to a process
*/
3910 obj_handle_t job
; /* handle to the job
*/
3911 obj_handle_t process
; /* handle to the process
*/
3915 /* Check if a process is associated with a job
*/
3916 @
REQ(process_in_job
)
3917 obj_handle_t job
; /* handle to the job
*/
3918 obj_handle_t process
; /* handle to the process
*/
3922 /* Set limit flags on a job
*/
3923 @
REQ(set_job_limits
)
3924 obj_handle_t handle
; /* handle to the job
*/
3925 unsigned int limit_flags
; /* new limit flags
*/
3929 /* Set new completion port for a job
*/
3930 @
REQ(set_job_completion_port
)
3931 obj_handle_t job
; /* handle to the job
*/
3932 obj_handle_t port
; /* handle to the completion port
*/
3933 client_ptr_t key
; /* key to send with completion messages
*/
3937 /* Terminate all processes associated with the job
*/
3939 obj_handle_t handle
; /* handle to the job
*/
3940 int status
; /* process exit code
*/
3944 /* Suspend a process
*/
3945 @
REQ(suspend_process
)
3946 obj_handle_t handle
; /* process handle
*/
3950 /* Resume a process
*/
3951 @
REQ(resume_process
)
3952 obj_handle_t handle
; /* process handle
*/