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 cpu_type_t
;
143 cpu_type_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
{ unsigned __int64 d
[64]; 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 /* structure for process startup info
*/
220 unsigned int debug_flags
;
221 unsigned int console_flags
;
222 obj_handle_t console
;
224 obj_handle_t hstdout
;
225 obj_handle_t hstderr
;
232 unsigned int attribute
;
235 data_size_t curdir_len
;
236 data_size_t dllpath_len
;
237 data_size_t imagepath_len
;
238 data_size_t cmdline_len
;
239 data_size_t title_len
;
240 data_size_t desktop_len
;
241 data_size_t shellinfo_len
;
242 data_size_t runtime_len
;
243 /* VARARG(curdir
,unicode_str
,curdir_len
); */
244 /* VARARG(dllpath
,unicode_str
,dllpath_len
); */
245 /* VARARG(imagepath
,unicode_str
,imagepath_len
); */
246 /* VARARG(cmdline
,unicode_str
,cmdline_len
); */
247 /* VARARG(title
,unicode_str
,title_len
); */
248 /* VARARG(desktop
,unicode_str
,desktop_len
); */
249 /* VARARG(shellinfo
,unicode_str
,shellinfo_len
); */
250 /* VARARG(runtime
,unicode_str
,runtime_len
); */
253 /* structure returned in the list of window properties
*/
256 atom_t atom
; /* property atom
*/
257 int string
; /* was atom a string originally?
*/
258 lparam_t data
; /* data stored in property
*/
261 /* structure to specify window rectangles
*/
270 /* structure for parameters of async I
/O calls
*/
273 obj_handle_t handle
; /* object to perform I
/O on
*/
274 obj_handle_t event
; /* event to signal when done
*/
275 client_ptr_t iosb
; /* I
/O status block in client addr space
*/
276 client_ptr_t user
; /* opaque user data containing callback pointer and async
-specific data
*/
277 client_ptr_t apc
; /* user APC to call
*/
278 apc_param_t apc_context
; /* user APC context or completion value
*/
281 /* structures for extra message data
*/
285 unsigned int device
; /* source
device (IMDT_
* values
) */
286 unsigned int origin
; /* source
origin (IMO_
* values
) */
289 struct hardware_msg_data
291 lparam_t info
; /* extra info
*/
292 unsigned int hw_id
; /* unique id
*/
293 unsigned int flags
; /* hook flags
*/
294 struct hw_msg_source source
; /* message source
*/
300 int type
; /* RIM_TYPEKEYBOARD
*/
301 unsigned int message
; /* message generated by this rawinput event
*/
302 unsigned short vkey
; /* virtual key code
*/
303 unsigned short scan
; /* scan code
*/
307 int type
; /* RIM_TYPEMOUSE
*/
308 int x
; /* x coordinate
*/
309 int y
; /* y coordinate
*/
310 unsigned int data
; /* mouse data
*/
315 struct callback_msg_data
317 client_ptr_t callback
; /* callback function
*/
318 lparam_t data
; /* user data for callback
*/
319 lparam_t result
; /* message result
*/
322 struct winevent_msg_data
324 user_handle_t hook
; /* hook handle
*/
325 thread_id_t tid
; /* thread id
*/
326 client_ptr_t hook_proc
; /* hook proc address
*/
327 /* followed by module name if any
*/
335 int type
; /* INPUT_KEYBOARD
*/
336 unsigned short vkey
; /* virtual key code
*/
337 unsigned short scan
; /* scan code
*/
338 unsigned int flags
; /* event flags
*/
339 unsigned int time
; /* event time
*/
340 lparam_t info
; /* extra info
*/
344 int type
; /* INPUT_MOUSE
*/
345 int x
; /* coordinates
*/
347 unsigned int data
; /* mouse data
*/
348 unsigned int flags
; /* event flags
*/
349 unsigned int time
; /* event time
*/
350 lparam_t info
; /* extra info
*/
354 int type
; /* INPUT_HARDWARE
*/
355 unsigned int msg
; /* message code
*/
356 lparam_t lparam
; /* message param
*/
362 unsigned char bytes
[1]; /* raw data for sent messages
*/
363 struct hardware_msg_data hardware
;
364 struct callback_msg_data callback
;
365 struct winevent_msg_data winevent
;
368 /* structure for console char
/attribute info
*/
375 /* structure returned in filesystem events
*/
376 struct filesystem_event
385 unsigned int low_part
;
389 #define MAX_ACL_LEN
65535
391 struct security_descriptor
393 unsigned int control
; /* SE_ flags
*/
394 data_size_t owner_len
;
395 data_size_t group_len
;
396 data_size_t sacl_len
;
397 data_size_t dacl_len
;
398 /* VARARG(owner
,SID
); */
399 /* VARARG(group
,SID
); */
400 /* VARARG(sacl
,ACL
); */
401 /* VARARG(dacl
,ACL
); */
404 struct object_attributes
406 obj_handle_t rootdir
; /* root directory
*/
407 unsigned int attributes
; /* object attributes
*/
408 data_size_t sd_len
; /* length of security_descriptor data. may be
0 */
409 data_size_t name_len
; /* length of the name string. may be
0 */
410 /* VARARG(sd
,security_descriptor
); */
411 /* VARARG(name
,unicode_str
); */
417 /* unsigned int attributes
[count
]; */
418 /* VARARG(sids
,SID
); */
426 SELECT_SIGNAL_AND_WAIT
,
427 SELECT_KEYED_EVENT_WAIT
,
428 SELECT_KEYED_EVENT_RELEASE
436 enum select_op op
; /* SELECT_WAIT or SELECT_WAIT_ALL
*/
437 obj_handle_t handles
[MAXIMUM_WAIT_OBJECTS
];
441 enum select_op op
; /* SELECT_SIGNAL_AND_WAIT
*/
443 obj_handle_t signal
; /* must be last in the structure so we can remove it on retries
*/
447 enum select_op op
; /* SELECT_KEYED_EVENT_WAIT or SELECT_KEYED_EVENT_RELEASE
*/
476 enum apc_type type
; /* APC_USER
*/
478 client_ptr_t func
; /* void (__stdcall
*func
)(ULONG_PTR
,ULONG_PTR
,ULONG_PTR
); */
479 apc_param_t args
[3]; /* arguments for user function
*/
483 enum apc_type type
; /* APC_TIMER
*/
485 client_ptr_t func
; /* void (__stdcall
*func
)(void
*, unsigned int
, unsigned int
); */
486 timeout_t time
; /* absolute time of expiration
*/
487 client_ptr_t arg
; /* user argument
*/
491 enum apc_type type
; /* APC_ASYNC_IO
*/
492 unsigned int status
; /* I
/O status
*/
493 client_ptr_t user
; /* user pointer
*/
494 client_ptr_t sb
; /* status block
*/
498 enum apc_type type
; /* APC_VIRTUAL_ALLOC
*/
499 unsigned int op_type
; /* type of operation
*/
500 client_ptr_t addr
; /* requested address
*/
501 mem_size_t size
; /* allocation size
*/
502 unsigned int zero_bits
; /* allocation alignment
*/
503 unsigned int prot
; /* memory protection flags
*/
507 enum apc_type type
; /* APC_VIRTUAL_FREE
*/
508 unsigned int op_type
; /* type of operation
*/
509 client_ptr_t addr
; /* requested address
*/
510 mem_size_t size
; /* allocation size
*/
514 enum apc_type type
; /* APC_VIRTUAL_QUERY
*/
516 client_ptr_t addr
; /* requested address
*/
520 enum apc_type type
; /* APC_VIRTUAL_PROTECT
*/
521 unsigned int prot
; /* new protection flags
*/
522 client_ptr_t addr
; /* requested address
*/
523 mem_size_t size
; /* requested size
*/
527 enum apc_type type
; /* APC_VIRTUAL_FLUSH
*/
529 client_ptr_t addr
; /* requested address
*/
530 mem_size_t size
; /* requested size
*/
534 enum apc_type type
; /* APC_VIRTUAL_LOCK
*/
536 client_ptr_t addr
; /* requested address
*/
537 mem_size_t size
; /* requested size
*/
541 enum apc_type type
; /* APC_VIRTUAL_UNLOCK
*/
543 client_ptr_t addr
; /* requested address
*/
544 mem_size_t size
; /* requested size
*/
548 enum apc_type type
; /* APC_MAP_VIEW
*/
549 obj_handle_t handle
; /* mapping handle
*/
550 client_ptr_t addr
; /* requested address
*/
551 mem_size_t size
; /* allocation size
*/
552 file_pos_t offset
; /* file offset
*/
553 unsigned int alloc_type
;/* allocation type
*/
554 unsigned short zero_bits
; /* allocation alignment
*/
555 unsigned short prot
; /* memory protection flags
*/
559 enum apc_type type
; /* APC_UNMAP_VIEW
*/
561 client_ptr_t addr
; /* view address
*/
565 enum apc_type type
; /* APC_CREATE_THREAD
*/
566 int suspend
; /* suspended thread?
*/
567 client_ptr_t func
; /* void (__stdcall
*func
)(void*)
; start function
*/
568 client_ptr_t arg
; /* argument for start function
*/
569 mem_size_t reserve
; /* reserve size for thread stack
*/
570 mem_size_t commit
; /* commit size for thread stack
*/
579 enum apc_type type
; /* APC_ASYNC_IO
*/
580 unsigned int status
; /* new status of async operation
*/
581 unsigned int total
; /* bytes transferred
*/
585 enum apc_type type
; /* APC_VIRTUAL_ALLOC
*/
586 unsigned int status
; /* status returned by call
*/
587 client_ptr_t addr
; /* resulting address
*/
588 mem_size_t size
; /* resulting size
*/
592 enum apc_type type
; /* APC_VIRTUAL_FREE
*/
593 unsigned int status
; /* status returned by call
*/
594 client_ptr_t addr
; /* resulting address
*/
595 mem_size_t size
; /* resulting size
*/
599 enum apc_type type
; /* APC_VIRTUAL_QUERY
*/
600 unsigned int status
; /* status returned by call
*/
601 client_ptr_t base
; /* resulting base address
*/
602 client_ptr_t alloc_base
;/* resulting allocation base
*/
603 mem_size_t size
; /* resulting region size
*/
604 unsigned short state
; /* resulting region state
*/
605 unsigned short prot
; /* resulting region protection
*/
606 unsigned short alloc_prot
;/* resulting allocation protection
*/
607 unsigned short alloc_type
;/* resulting region allocation type
*/
611 enum apc_type type
; /* APC_VIRTUAL_PROTECT
*/
612 unsigned int status
; /* status returned by call
*/
613 client_ptr_t addr
; /* resulting address
*/
614 mem_size_t size
; /* resulting size
*/
615 unsigned int prot
; /* old protection flags
*/
619 enum apc_type type
; /* APC_VIRTUAL_FLUSH
*/
620 unsigned int status
; /* status returned by call
*/
621 client_ptr_t addr
; /* resulting address
*/
622 mem_size_t size
; /* resulting size
*/
626 enum apc_type type
; /* APC_VIRTUAL_LOCK
*/
627 unsigned int status
; /* status returned by call
*/
628 client_ptr_t addr
; /* resulting address
*/
629 mem_size_t size
; /* resulting size
*/
633 enum apc_type type
; /* APC_VIRTUAL_UNLOCK
*/
634 unsigned int status
; /* status returned by call
*/
635 client_ptr_t addr
; /* resulting address
*/
636 mem_size_t size
; /* resulting size
*/
640 enum apc_type type
; /* APC_MAP_VIEW
*/
641 unsigned int status
; /* status returned by call
*/
642 client_ptr_t addr
; /* resulting address
*/
643 mem_size_t size
; /* resulting size
*/
647 enum apc_type type
; /* APC_MAP_VIEW
*/
648 unsigned int status
; /* status returned by call
*/
652 enum apc_type type
; /* APC_CREATE_THREAD
*/
653 unsigned int status
; /* status returned by call
*/
654 thread_id_t tid
; /* thread id
*/
655 obj_handle_t handle
; /* handle to new thread
*/
661 unsigned int major
; /* irp major function
*/
664 unsigned int major
; /* IRP_MJ_CREATE
*/
665 unsigned int access
; /* access rights
*/
666 unsigned int sharing
; /* sharing flags
*/
667 unsigned int options
; /* file options
*/
668 client_ptr_t device
; /* opaque ptr for the device
*/
672 unsigned int major
; /* IRP_MJ_CLOSE
*/
674 client_ptr_t file
; /* opaque ptr for the file object
*/
678 unsigned int major
; /* IRP_MJ_READ
*/
679 unsigned int key
; /* driver key
*/
680 client_ptr_t file
; /* opaque ptr for the file object
*/
681 file_pos_t pos
; /* file position
*/
685 unsigned int major
; /* IRP_MJ_WRITE
*/
686 unsigned int key
; /* driver key
*/
687 client_ptr_t file
; /* opaque ptr for the file object
*/
688 file_pos_t pos
; /* file position
*/
692 unsigned int major
; /* IRP_MJ_FLUSH_BUFFERS
*/
694 client_ptr_t file
; /* opaque ptr for the file object
*/
698 unsigned int major
; /* IRP_MJ_DEVICE_CONTROL
*/
699 ioctl_code_t code
; /* ioctl code
*/
700 client_ptr_t file
; /* opaque ptr for the file object
*/
704 unsigned int major
; /* IRP_MJ_DEVICE_CLEANUP
*/
706 client_ptr_t obj
; /* opaque ptr for the freed object
*/
710 /* information about a PE image mapping
, roughly equivalent to SECTION_IMAGE_INFORMATION
*/
714 client_ptr_t entry_point
;
716 mem_size_t stack_size
;
717 mem_size_t stack_commit
;
718 unsigned int zerobits
;
719 unsigned int subsystem
;
720 unsigned short subsystem_low
;
721 unsigned short subsystem_high
;
723 unsigned short image_charact
;
724 unsigned short dll_charact
;
725 unsigned short machine
;
726 unsigned char contains_code
;
727 unsigned char image_flags
;
728 unsigned int loader_flags
;
729 unsigned int header_size
;
730 unsigned int file_size
;
731 unsigned int checksum
;
734 #define IMAGE_FLAGS_ComPlusNativeReady
0x01
735 #define IMAGE_FLAGS_ComPlusILOnly
0x02
736 #define IMAGE_FLAGS_ImageDynamicallyRelocated
0x04
737 #define IMAGE_FLAGS_ImageMappedFlat
0x08
738 #define IMAGE_FLAGS_BaseBelow4gb
0x10
739 #define IMAGE_FLAGS_WineFakeDll
0x80
741 struct rawinput_device
743 unsigned short usage_page
;
744 unsigned short usage
;
746 user_handle_t target
;
749 /****************************************************************/
750 /* Request declarations
*/
752 /* Create a new process from the context of the parent
*/
754 int inherit_all
; /* inherit all handles from parent
*/
755 unsigned int create_flags
; /* creation flags
*/
756 int socket_fd
; /* file descriptor for process socket
*/
757 obj_handle_t exe_file
; /* file handle for main exe
*/
758 unsigned int access
; /* access rights for process object
*/
759 cpu_type_t cpu
; /* CPU that the new process will use
*/
760 data_size_t info_size
; /* size of startup info
*/
761 VARARG(objattr
,object_attributes
); /* object attributes
*/
762 VARARG(info
,startup_info
,info_size
); /* startup information
*/
763 VARARG(env
,unicode_str
); /* environment for new process
*/
765 obj_handle_t info
; /* new process info handle
*/
766 process_id_t pid
; /* process id
*/
767 obj_handle_t handle
; /* process
handle (in the current process
) */
771 /* Execute a process
, replacing the current one
*/
773 int socket_fd
; /* file descriptor for process socket
*/
774 obj_handle_t exe_file
; /* file handle for main exe
*/
775 cpu_type_t cpu
; /* CPU that the new process will use
*/
779 /* Retrieve information about a newly started process
*/
780 @
REQ(get_new_process_info
)
781 obj_handle_t info
; /* info handle returned from new_process_request
*/
783 int success
; /* did the process start successfully?
*/
784 int exit_code
; /* process exit code if failed
*/
788 /* Create a new thread
*/
790 obj_handle_t process
; /* process in which to create thread
*/
791 unsigned int access
; /* wanted access rights
*/
792 int suspend
; /* new thread should be suspended on creation
*/
793 int request_fd
; /* fd for request pipe
*/
794 VARARG(objattr
,object_attributes
); /* object attributes
*/
796 thread_id_t tid
; /* thread id
*/
797 obj_handle_t handle
; /* thread
handle (in the current process
) */
801 /* Retrieve the new process startup info
*/
802 @
REQ(get_startup_info
)
804 data_size_t info_size
; /* size of startup info
*/
805 VARARG(info
,startup_info
,info_size
); /* startup information
*/
806 VARARG(env
,unicode_str
); /* environment
*/
810 /* Signal the end of the process initialization
*/
811 @
REQ(init_process_done
)
812 int gui
; /* is it a GUI process?
*/
813 mod_handle_t module
; /* main module base address
*/
814 client_ptr_t ldt_copy
; /* address of LDT
copy (in thread address space
) */
815 client_ptr_t entry
; /* process entry point
*/
817 int suspend
; /* is process suspended?
*/
821 /* Initialize a thread
; called from the child after
fork()/clone() */
823 int unix_pid
; /* Unix pid of new thread
*/
824 int unix_tid
; /* Unix tid of new thread
*/
825 int debug_level
; /* new debug level
*/
826 client_ptr_t teb
; /* TEB of new
thread (in thread address space
) */
827 client_ptr_t entry
; /* entry point or PEB if initial
thread (in thread address space
) */
828 int reply_fd
; /* fd for reply pipe
*/
829 int wait_fd
; /* fd for blocking calls pipe
*/
830 cpu_type_t cpu
; /* CPU that this thread is running on
*/
832 process_id_t pid
; /* process id of the new thread
's process */
833 thread_id_t tid; /* thread id of the new thread */
834 timeout_t server_start; /* server start time */
835 data_size_t info_size; /* total size of startup info */
836 int version; /* protocol version */
837 unsigned int all_cpus; /* bitset of supported CPUs */
838 int suspend; /* is thread suspended? */
842 /* Terminate a process */
843 @REQ(terminate_process)
844 obj_handle_t handle; /* process handle to terminate */
845 int exit_code; /* process exit code */
847 int self; /* suicide? */
851 /* Terminate a thread */
852 @REQ(terminate_thread)
853 obj_handle_t handle; /* thread handle to terminate */
854 int exit_code; /* thread exit code */
856 int self; /* suicide? */
857 int last; /* last thread in this process? */
861 /* Retrieve information about a process */
862 @REQ(get_process_info)
863 obj_handle_t handle; /* process handle */
865 process_id_t pid; /* server process id */
866 process_id_t ppid; /* server process id of parent */
867 affinity_t affinity; /* process affinity mask */
868 client_ptr_t peb; /* PEB address in process address space */
869 timeout_t start_time; /* process start time */
870 timeout_t end_time; /* process end time */
871 int exit_code; /* process exit code */
872 int priority; /* priority class */
873 cpu_type_t cpu; /* CPU that this process is running on */
874 short int debugger_present; /* process is being debugged */
875 short int debug_children; /* inherit debugger to child processes */
879 /* Retrieve information about a process memory usage */
880 @REQ(get_process_vm_counters)
881 obj_handle_t handle; /* process handle */
883 mem_size_t peak_virtual_size; /* peak virtual memory in bytes */
884 mem_size_t virtual_size; /* virtual memory in bytes */
885 mem_size_t peak_working_set_size; /* peak real memory in bytes */
886 mem_size_t working_set_size; /* real memory in bytes */
887 mem_size_t pagefile_usage; /* commit charge in bytes */
888 mem_size_t peak_pagefile_usage; /* peak commit charge in bytes */
892 /* Set a process information */
893 @REQ(set_process_info)
894 obj_handle_t handle; /* process handle */
895 int mask; /* setting mask (see below) */
896 int priority; /* priority class */
897 affinity_t affinity; /* affinity mask */
899 #define SET_PROCESS_INFO_PRIORITY 0x01
900 #define SET_PROCESS_INFO_AFFINITY 0x02
903 /* Retrieve information about a thread */
904 @REQ(get_thread_info)
905 obj_handle_t handle; /* thread handle */
906 thread_id_t tid_in; /* thread id (optional) */
908 process_id_t pid; /* server process id */
909 thread_id_t tid; /* server thread id */
910 client_ptr_t teb; /* thread teb pointer */
911 client_ptr_t entry_point; /* thread entry point */
912 affinity_t affinity; /* thread affinity mask */
913 int exit_code; /* thread exit code */
914 int priority; /* thread priority level */
915 int last; /* last thread in process */
919 /* Retrieve information about thread times */
920 @REQ(get_thread_times)
921 obj_handle_t handle; /* thread handle */
923 timeout_t creation_time; /* thread creation time */
924 timeout_t exit_time; /* thread exit time */
928 /* Set a thread information */
929 @REQ(set_thread_info)
930 obj_handle_t handle; /* thread handle */
931 int mask; /* setting mask (see below) */
932 int priority; /* priority class */
933 affinity_t affinity; /* affinity mask */
934 client_ptr_t entry_point; /* thread entry point */
935 obj_handle_t token; /* impersonation token */
937 #define SET_THREAD_INFO_PRIORITY 0x01
938 #define SET_THREAD_INFO_AFFINITY 0x02
939 #define SET_THREAD_INFO_TOKEN 0x04
940 #define SET_THREAD_INFO_ENTRYPOINT 0x08
943 /* Retrieve information about a module */
945 obj_handle_t handle; /* process handle */
946 mod_handle_t base_address; /* base address of module */
948 client_ptr_t entry_point;
949 data_size_t filename_len; /* buffer len in bytes required to store filename */
950 VARARG(filename,unicode_str); /* file name of module */
954 /* Suspend a thread */
956 obj_handle_t handle; /* thread handle */
958 int count; /* new suspend count */
962 /* Resume a thread */
964 obj_handle_t handle; /* thread handle */
966 int count; /* new suspend count */
970 /* Notify the server that a dll has been loaded */
972 data_size_t dbg_offset; /* debug info offset */
973 mod_handle_t base; /* base address */
974 client_ptr_t name; /* ptr to ptr to name (in process addr space) */
975 data_size_t dbg_size; /* debug info size */
976 VARARG(filename,unicode_str); /* file name of dll */
980 /* Notify the server that a dll is being unloaded */
982 mod_handle_t base; /* base address */
986 /* Queue an APC for a thread or process */
988 obj_handle_t handle; /* thread or process handle */
989 apc_call_t call; /* call arguments */
991 obj_handle_t handle; /* APC handle */
992 int self; /* run APC in caller itself? */
996 /* Get the result of an APC call */
998 obj_handle_t handle; /* handle to the APC */
1000 apc_result_t result; /* result of the APC */
1004 /* Close a handle for the current process */
1006 obj_handle_t handle; /* handle to close */
1010 /* Set a handle information */
1011 @REQ(set_handle_info)
1012 obj_handle_t handle; /* handle we are interested in */
1013 int flags; /* new handle flags */
1014 int mask; /* mask for flags to set */
1016 int old_flags; /* old flag value */
1020 /* Duplicate a handle */
1022 obj_handle_t src_process; /* src process handle */
1023 obj_handle_t src_handle; /* src handle to duplicate */
1024 obj_handle_t dst_process; /* dst process handle */
1025 unsigned int access; /* wanted access rights */
1026 unsigned int attributes; /* object attributes */
1027 unsigned int options; /* duplicate options (see below) */
1029 obj_handle_t handle; /* duplicated handle in dst process */
1030 int self; /* is the source the current process? */
1031 int closed; /* whether the source handle has been closed */
1033 #define DUP_HANDLE_CLOSE_SOURCE DUPLICATE_CLOSE_SOURCE
1034 #define DUP_HANDLE_SAME_ACCESS DUPLICATE_SAME_ACCESS
1035 #define DUP_HANDLE_MAKE_GLOBAL 0x80000000 /* Not a Windows flag */
1038 /* Open a handle to a process */
1040 process_id_t pid; /* process id to open */
1041 unsigned int access; /* wanted access rights */
1042 unsigned int attributes; /* object attributes */
1044 obj_handle_t handle; /* handle to the process */
1048 /* Open a handle to a thread */
1050 thread_id_t tid; /* thread id to open */
1051 unsigned int access; /* wanted access rights */
1052 unsigned int attributes; /* object attributes */
1054 obj_handle_t handle; /* handle to the thread */
1058 /* Wait for handles */
1060 int flags; /* wait flags (see below) */
1061 client_ptr_t cookie; /* magic cookie to return to client */
1062 timeout_t timeout; /* timeout */
1063 obj_handle_t prev_apc; /* handle to previous APC */
1064 VARARG(result,apc_result); /* result of previous APC */
1065 VARARG(data,select_op); /* operation-specific data */
1067 timeout_t timeout; /* timeout converted to absolute */
1068 apc_call_t call; /* APC call arguments */
1069 obj_handle_t apc_handle; /* handle to next APC */
1071 #define SELECT_ALERTABLE 1
1072 #define SELECT_INTERRUPTIBLE 2
1075 /* Create an event */
1077 unsigned int access; /* wanted access rights */
1078 int manual_reset; /* manual reset event */
1079 int initial_state; /* initial state of the event */
1080 VARARG(objattr,object_attributes); /* object attributes */
1082 obj_handle_t handle; /* handle to the event */
1085 /* Event operation */
1087 obj_handle_t handle; /* handle to event */
1088 int op; /* event operation (see below) */
1090 int state; /* previous state */
1092 enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT };
1095 obj_handle_t handle; /* handle to event */
1097 int manual_reset; /* manual reset event */
1098 int state; /* current state of the event */
1103 unsigned int access; /* wanted access rights */
1104 unsigned int attributes; /* object attributes */
1105 obj_handle_t rootdir; /* root directory */
1106 VARARG(name,unicode_str); /* object name */
1108 obj_handle_t handle; /* handle to the event */
1112 /* Create a keyed event */
1113 @REQ(create_keyed_event)
1114 unsigned int access; /* wanted access rights */
1115 VARARG(objattr,object_attributes); /* object attributes */
1117 obj_handle_t handle; /* handle to the event */
1120 /* Open a keyed event */
1121 @REQ(open_keyed_event)
1122 unsigned int access; /* wanted access rights */
1123 unsigned int attributes; /* object attributes */
1124 obj_handle_t rootdir; /* root directory */
1125 VARARG(name,unicode_str); /* object name */
1127 obj_handle_t handle; /* handle to the event */
1131 /* Create a mutex */
1133 unsigned int access; /* wanted access rights */
1134 int owned; /* initially owned? */
1135 VARARG(objattr,object_attributes); /* object attributes */
1137 obj_handle_t handle; /* handle to the mutex */
1141 /* Release a mutex */
1143 obj_handle_t handle; /* handle to the mutex */
1145 unsigned int prev_count; /* value of internal counter, before release */
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 mutex */
1162 obj_handle_t handle; /* handle to mutex */
1164 unsigned int count; /* current count of mutex */
1165 int owned; /* true if owned by current thread */
1166 int abandoned; /* true if abandoned */
1170 /* Create a semaphore */
1171 @REQ(create_semaphore)
1172 unsigned int access; /* wanted access rights */
1173 unsigned int initial; /* initial count */
1174 unsigned int max; /* maximum count */
1175 VARARG(objattr,object_attributes); /* object attributes */
1177 obj_handle_t handle; /* handle to the semaphore */
1181 /* Release a semaphore */
1182 @REQ(release_semaphore)
1183 obj_handle_t handle; /* handle to the semaphore */
1184 unsigned int count; /* count to add to semaphore */
1186 unsigned int prev_count; /* previous semaphore count */
1189 @REQ(query_semaphore)
1190 obj_handle_t handle; /* handle to the semaphore */
1192 unsigned int current; /* current count */
1193 unsigned int max; /* maximum count */
1196 /* Open a semaphore */
1197 @REQ(open_semaphore)
1198 unsigned int access; /* wanted access rights */
1199 unsigned int attributes; /* object attributes */
1200 obj_handle_t rootdir; /* root directory */
1201 VARARG(name,unicode_str); /* object name */
1203 obj_handle_t handle; /* handle to the semaphore */
1209 unsigned int access; /* wanted access rights */
1210 unsigned int sharing; /* sharing flags */
1211 int create; /* file create action */
1212 unsigned int options; /* file options */
1213 unsigned int attrs; /* file attributes for creation */
1214 VARARG(objattr,object_attributes); /* object attributes */
1215 VARARG(filename,string); /* file name */
1217 obj_handle_t handle; /* handle to the file */
1221 /* Open a file object */
1222 @REQ(open_file_object)
1223 unsigned int access; /* wanted access rights */
1224 unsigned int attributes; /* open attributes */
1225 obj_handle_t rootdir; /* root directory */
1226 unsigned int sharing; /* sharing flags */
1227 unsigned int options; /* file options */
1228 VARARG(filename,unicode_str); /* file name */
1230 obj_handle_t handle; /* handle to the file */
1234 /* Allocate a file handle for a Unix fd */
1235 @REQ(alloc_file_handle)
1236 unsigned int access; /* wanted access rights */
1237 unsigned int attributes; /* object attributes */
1238 int fd; /* file descriptor on the client side */
1240 obj_handle_t handle; /* handle to the file */
1244 /* Get the Unix name from a file handle */
1245 @REQ(get_handle_unix_name)
1246 obj_handle_t handle; /* file handle */
1248 data_size_t name_len; /* unix name length */
1249 VARARG(name,string); /* unix name */
1253 /* Get a Unix fd to access a file */
1255 obj_handle_t handle; /* handle to the file */
1257 int type; /* file type (see below) */
1258 int cacheable; /* can fd be cached in the client? */
1259 unsigned int access; /* file access rights */
1260 unsigned int options; /* file open options */
1264 FD_TYPE_INVALID, /* invalid file (no associated fd) */
1265 FD_TYPE_FILE, /* regular file */
1266 FD_TYPE_DIR, /* directory */
1267 FD_TYPE_SOCKET, /* socket */
1268 FD_TYPE_SERIAL, /* serial port */
1269 FD_TYPE_PIPE, /* named pipe */
1270 FD_TYPE_MAILSLOT, /* mailslot */
1271 FD_TYPE_CHAR, /* unspecified char device */
1272 FD_TYPE_DEVICE, /* Windows device file */
1277 /* Retrieve (or allocate) the client-side directory cache entry */
1278 @REQ(get_directory_cache_entry)
1279 obj_handle_t handle; /* handle to the directory */
1281 int entry; /* cache entry on the client side */
1282 VARARG(free,ints); /* entries that can be freed */
1286 /* Flush a file buffers */
1288 async_data_t async; /* async I/O parameters */
1290 obj_handle_t event; /* event set when finished */
1293 /* Query file information */
1295 obj_handle_t handle; /* handle to the file */
1296 unsigned int info_class; /* queried information class */
1298 VARARG(data,bytes); /* file info data */
1301 /* Query volume information */
1302 @REQ(get_volume_info)
1303 obj_handle_t handle; /* handle to the file */
1304 unsigned int info_class; /* queried information class */
1306 VARARG(data,bytes); /* volume info data */
1309 /* Lock a region of a file */
1311 obj_handle_t handle; /* handle to the file */
1312 file_pos_t offset; /* offset of start of lock */
1313 file_pos_t count; /* count of bytes to lock */
1314 int shared; /* shared or exclusive lock? */
1315 int wait; /* do we want to wait? */
1317 obj_handle_t handle; /* handle to wait on */
1318 int overlapped; /* is it an overlapped I/O handle? */
1322 /* Unlock a region of a file */
1324 obj_handle_t handle; /* handle to the file */
1325 file_pos_t offset; /* offset of start of unlock */
1326 file_pos_t count; /* count of bytes to unlock */
1330 /* Create a socket */
1332 unsigned int access; /* wanted access rights */
1333 unsigned int attributes; /* object attributes */
1334 int family; /* family, see socket manpage */
1335 int type; /* type, see socket manpage */
1336 int protocol; /* protocol, see socket manpage */
1337 unsigned int flags; /* socket flags */
1339 obj_handle_t handle; /* handle to the new socket */
1343 /* Accept a socket */
1345 obj_handle_t lhandle; /* handle to the listening socket */
1346 unsigned int access; /* wanted access rights */
1347 unsigned int attributes; /* object attributes */
1349 obj_handle_t handle; /* handle to the new socket */
1353 /* Accept into an initialized socket */
1354 @REQ(accept_into_socket)
1355 obj_handle_t lhandle; /* handle to the listening socket */
1356 obj_handle_t ahandle; /* handle to the accepting socket */
1360 /* Set socket event parameters */
1361 @REQ(set_socket_event)
1362 obj_handle_t handle; /* handle to the socket */
1363 unsigned int mask; /* event mask */
1364 obj_handle_t event; /* event object */
1365 user_handle_t window; /* window to send the message to */
1366 unsigned int msg; /* message to send */
1370 /* Get socket event parameters */
1371 @REQ(get_socket_event)
1372 obj_handle_t handle; /* handle to the socket */
1373 int service; /* clear pending? */
1374 obj_handle_t c_event; /* event to clear */
1376 unsigned int mask; /* event mask */
1377 unsigned int pmask; /* pending events */
1378 unsigned int state; /* status bits */
1379 VARARG(errors,ints); /* event errors */
1383 /* Get socket info */
1384 @REQ(get_socket_info)
1385 obj_handle_t handle; /* handle to the socket */
1387 int family; /* family, see socket manpage */
1388 int type; /* type, see socket manpage */
1389 int protocol; /* protocol, see socket manpage */
1393 /* Re-enable pending socket events */
1394 @REQ(enable_socket_event)
1395 obj_handle_t handle; /* handle to the socket */
1396 unsigned int mask; /* events to re-enable */
1397 unsigned int sstate; /* status bits to set */
1398 unsigned int cstate; /* status bits to clear */
1401 @REQ(set_socket_deferred)
1402 obj_handle_t handle; /* handle to the socket */
1403 obj_handle_t deferred; /* handle to the socket for which accept() is deferred */
1406 /* Allocate a console (only used by a console renderer) */
1408 unsigned int access; /* wanted access rights */
1409 unsigned int attributes; /* object attributes */
1410 process_id_t pid; /* pid of process which shall be attached to the console */
1411 int input_fd; /* if pid=-1 (bare console to current process), fd for input */
1413 obj_handle_t handle_in; /* handle to console input */
1414 obj_handle_t event; /* handle to renderer events change notification */
1418 /* Free the console of the current process */
1423 #define CONSOLE_RENDERER_NONE_EVENT 0x00
1424 #define CONSOLE_RENDERER_TITLE_EVENT 0x01
1425 #define CONSOLE_RENDERER_ACTIVE_SB_EVENT 0x02
1426 #define CONSOLE_RENDERER_SB_RESIZE_EVENT 0x03
1427 #define CONSOLE_RENDERER_UPDATE_EVENT 0x04
1428 #define CONSOLE_RENDERER_CURSOR_POS_EVENT 0x05
1429 #define CONSOLE_RENDERER_CURSOR_GEOM_EVENT 0x06
1430 #define CONSOLE_RENDERER_DISPLAY_EVENT 0x07
1431 #define CONSOLE_RENDERER_EXIT_EVENT 0x08
1432 struct console_renderer_event
1467 /* retrieve console events for the renderer */
1468 @REQ(get_console_renderer_events)
1469 obj_handle_t handle; /* handle to console input events */
1471 VARARG(data,bytes); /* the various console_renderer_events */
1475 /* Open a handle to the process console */
1477 obj_handle_t from; /* 0 (resp 1) input (resp output) of current process console */
1478 /* otherwise console_in handle to get active screen buffer? */
1479 unsigned int access; /* wanted access rights */
1480 unsigned int attributes; /* object attributes */
1481 int share; /* share mask (only for output handles) */
1483 obj_handle_t handle; /* handle to the console */
1487 /* Attach to a other process's console
*/
1488 @
REQ(attach_console
)
1489 process_id_t pid
; /* pid of attached console process
*/
1491 obj_handle_t std_in
; /* attached stdin
*/
1492 obj_handle_t std_out
; /* attached stdout
*/
1493 obj_handle_t std_err
; /* attached stderr
*/
1497 /* Get the input queue wait event
*/
1498 @
REQ(get_console_wait_event
)
1500 obj_handle_t handle
;
1503 /* Get a console
mode (input or output
) */
1504 @
REQ(get_console_mode
)
1505 obj_handle_t handle
; /* handle to the console
*/
1507 int mode
; /* console mode
*/
1511 /* Set a console
mode (input or output
) */
1512 @
REQ(set_console_mode
)
1513 obj_handle_t handle
; /* handle to the console
*/
1514 int mode
; /* console mode
*/
1518 /* Set info about a
console (input only
) */
1519 @
REQ(set_console_input_info
)
1520 obj_handle_t handle
; /* handle to console input
, or
0 for process
' console */
1521 int mask; /* setting mask (see below) */
1522 obj_handle_t active_sb; /* active screen buffer */
1523 int history_mode; /* whether we duplicate lines in history */
1524 int history_size; /* number of lines in history */
1525 int edition_mode; /* index to the edition mode flavors */
1526 int input_cp; /* console input codepage */
1527 int output_cp; /* console output codepage */
1528 user_handle_t win; /* console window if backend supports it */
1529 VARARG(title,unicode_str); /* console title */
1531 #define SET_CONSOLE_INPUT_INFO_ACTIVE_SB 0x01
1532 #define SET_CONSOLE_INPUT_INFO_TITLE 0x02
1533 #define SET_CONSOLE_INPUT_INFO_HISTORY_MODE 0x04
1534 #define SET_CONSOLE_INPUT_INFO_HISTORY_SIZE 0x08
1535 #define SET_CONSOLE_INPUT_INFO_EDITION_MODE 0x10
1536 #define SET_CONSOLE_INPUT_INFO_INPUT_CODEPAGE 0x20
1537 #define SET_CONSOLE_INPUT_INFO_OUTPUT_CODEPAGE 0x40
1538 #define SET_CONSOLE_INPUT_INFO_WIN 0x80
1541 /* Get info about a console (input only) */
1542 @REQ(get_console_input_info)
1543 obj_handle_t handle; /* handle to console input, or 0 for process' console
*/
1545 int history_mode
; /* whether we duplicate lines in history
*/
1546 int history_size
; /* number of lines in history
*/
1547 int history_index
; /* number of used lines in history
*/
1548 int edition_mode
; /* index to the edition mode flavors
*/
1549 int input_cp
; /* console input codepage
*/
1550 int output_cp
; /* console output codepage
*/
1551 user_handle_t win
; /* console window if backend supports it
*/
1552 VARARG(title
,unicode_str
); /* console title
*/
1556 /* appends a string to console
's history */
1557 @REQ(append_console_input_history)
1558 obj_handle_t handle; /* handle to console input, or 0 for process' console
*/
1559 VARARG(line
,unicode_str
); /* line to add
*/
1563 /* appends a string to console
's history */
1564 @REQ(get_console_input_history)
1565 obj_handle_t handle; /* handle to console input, or 0 for process' console
*/
1566 int index
; /* index to get line from
*/
1568 int total
; /* total length of line in Unicode chars
*/
1569 VARARG(line
,unicode_str
); /* line to add
*/
1573 /* creates a new screen buffer on process
' console */
1574 @REQ(create_console_output)
1575 obj_handle_t handle_in; /* handle to console input, or 0 for process' console
*/
1576 unsigned int access
; /* wanted access rights
*/
1577 unsigned int attributes
; /* object attributes
*/
1578 unsigned int share
; /* sharing credentials
*/
1579 int fd
; /* for bare consoles
, fd the screen
-buffer is attached to
*/
1581 obj_handle_t handle_out
; /* handle to the screen buffer
*/
1585 /* Set info about a
console (output only
) */
1586 @
REQ(set_console_output_info
)
1587 obj_handle_t handle
; /* handle to the console
*/
1588 int mask
; /* setting
mask (see below
) */
1589 short int cursor_size
; /* size of
cursor (percentage filled
) */
1590 short int cursor_visible
;/* cursor visibility flag
*/
1591 short int cursor_x
; /* position of
cursor (x
, y
) */
1593 short int width
; /* width of the screen buffer
*/
1594 short int height
; /* height of the screen buffer
*/
1595 short int attr
; /* default fill
attributes (screen colors
) */
1596 short int popup_attr
; /* pop
-up color attributes
*/
1597 short int win_left
; /* window actually displayed by renderer
*/
1598 short int win_top
; /* the rect area is expressed within the
*/
1599 short int win_right
; /* boundaries of the screen buffer
*/
1600 short int win_bottom
;
1601 short int max_width
; /* maximum
size (width x height
) for the window
*/
1602 short int max_height
;
1603 short int font_width
; /* font
size (width x height
) */
1604 short int font_height
;
1605 VARARG(colors
,uints
); /* color table
*/
1607 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_GEOM
0x0001
1608 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_POS
0x0002
1609 #define SET_CONSOLE_OUTPUT_INFO_SIZE
0x0004
1610 #define SET_CONSOLE_OUTPUT_INFO_ATTR
0x0008
1611 #define SET_CONSOLE_OUTPUT_INFO_DISPLAY_WINDOW
0x0010
1612 #define SET_CONSOLE_OUTPUT_INFO_MAX_SIZE
0x0020
1613 #define SET_CONSOLE_OUTPUT_INFO_FONT
0x0040
1614 #define SET_CONSOLE_OUTPUT_INFO_COLORTABLE
0x0080
1615 #define SET_CONSOLE_OUTPUT_INFO_POPUP_ATTR
0x0100
1618 /* Get info about a
console (output only
) */
1619 @
REQ(get_console_output_info
)
1620 obj_handle_t handle
; /* handle to the console
*/
1622 short int cursor_size
; /* size of
cursor (percentage filled
) */
1623 short int cursor_visible
;/* cursor visibility flag
*/
1624 short int cursor_x
; /* position of
cursor (x
, y
) */
1626 short int width
; /* width of the screen buffer
*/
1627 short int height
; /* height of the screen buffer
*/
1628 short int attr
; /* default fill
attributes (screen colors
) */
1629 short int popup_attr
; /* pop
-up color attributes
*/
1630 short int win_left
; /* window actually displayed by renderer
*/
1631 short int win_top
; /* the rect area is expressed within the
*/
1632 short int win_right
; /* boundaries of the screen buffer
*/
1633 short int win_bottom
;
1634 short int max_width
; /* maximum
size (width x height
) for the window
*/
1635 short int max_height
;
1636 short int font_width
; /* font
size (width x height
) */
1637 short int font_height
;
1638 VARARG(colors
,uints
); /* color table
*/
1641 /* Add input records to a console input queue
*/
1642 @
REQ(write_console_input
)
1643 obj_handle_t handle
; /* handle to the console input
*/
1644 VARARG(rec
,input_records
); /* input records
*/
1646 int written
; /* number of records written
*/
1650 /* Fetch input records from a console input queue
*/
1651 @
REQ(read_console_input
)
1652 obj_handle_t handle
; /* handle to the console input
*/
1653 int flush
; /* flush the retrieved records from the queue?
*/
1655 int read
; /* number of records read
*/
1656 VARARG(rec
,input_records
); /* input records
*/
1660 /* write
data (chars and
/or attributes
) in a screen buffer
*/
1661 @
REQ(write_console_output
)
1662 obj_handle_t handle
; /* handle to the console output
*/
1663 int x
; /* position where to start writing
*/
1665 int mode
; /* char
info (see below
) */
1666 int wrap
; /* wrap around at end of line?
*/
1667 VARARG(data
,bytes
); /* info to write
*/
1669 int written
; /* number of char infos actually written
*/
1670 int width
; /* width of screen buffer
*/
1671 int height
; /* height of screen buffer
*/
1675 CHAR_INFO_MODE_TEXT
, /* characters only
*/
1676 CHAR_INFO_MODE_ATTR
, /* attributes only
*/
1677 CHAR_INFO_MODE_TEXTATTR
, /* both characters and attributes
*/
1678 CHAR_INFO_MODE_TEXTSTDATTR
/* characters but use standard attributes
*/
1682 /* fill a screen buffer with constant
data (chars and
/or attributes
) */
1683 @
REQ(fill_console_output
)
1684 obj_handle_t handle
; /* handle to the console output
*/
1685 int x
; /* position where to start writing
*/
1687 int mode
; /* char info mode
*/
1688 int count
; /* number to write
*/
1689 int wrap
; /* wrap around at end of line?
*/
1690 char_info_t data
; /* data to write
*/
1692 int written
; /* number of char infos actually written
*/
1696 /* read
data (chars and
/or attributes
) from a screen buffer
*/
1697 @
REQ(read_console_output
)
1698 obj_handle_t handle
; /* handle to the console output
*/
1699 int x
; /* position (x
,y
) where to start reading
*/
1701 int mode
; /* char info mode
*/
1702 int wrap
; /* wrap around at end of line?
*/
1704 int width
; /* width of screen buffer
*/
1705 int height
; /* height of screen buffer
*/
1710 /* move a
rect (of data
) in screen buffer content
*/
1711 @
REQ(move_console_output
)
1712 obj_handle_t handle
; /* handle to the console output
*/
1713 short int x_src
; /* position (x
, y
) of rect to start moving from
*/
1715 short int x_dst
; /* position (x
, y
) of rect to move to
*/
1717 short int w
; /* size of the
rect (width
, height
) to move
*/
1722 /* Sends a signal to a process group
*/
1723 @
REQ(send_console_signal
)
1724 int signal
; /* the signal to send
*/
1725 process_id_t group_id
; /* the group to send the signal to
*/
1729 /* enable directory change notifications
*/
1730 @
REQ(read_directory_changes
)
1731 unsigned int filter
; /* notification filter
*/
1732 int subtree
; /* watch the subtree?
*/
1733 int want_data
; /* flag indicating whether change data should be collected
*/
1734 async_data_t async
; /* async I
/O parameters
*/
1739 obj_handle_t handle
;
1741 VARARG(events
,filesystem_event
); /* collected filesystem events
*/
1745 /* Create a file mapping
*/
1746 @
REQ(create_mapping
)
1747 unsigned int access
; /* wanted access rights
*/
1748 unsigned int flags
; /* SEC_
* flags
*/
1749 unsigned int file_access
; /* file access rights
*/
1750 mem_size_t size
; /* mapping size
*/
1751 obj_handle_t file_handle
; /* file handle
*/
1752 VARARG(objattr
,object_attributes
); /* object attributes
*/
1754 obj_handle_t handle
; /* handle to the mapping
*/
1758 /* Open a mapping
*/
1760 unsigned int access
; /* wanted access rights
*/
1761 unsigned int attributes
; /* object attributes
*/
1762 obj_handle_t rootdir
; /* root directory
*/
1763 VARARG(name
,unicode_str
); /* object name
*/
1765 obj_handle_t handle
; /* handle to the mapping
*/
1769 /* Get information about a file mapping
*/
1770 @
REQ(get_mapping_info
)
1771 obj_handle_t handle
; /* handle to the mapping
*/
1772 unsigned int access
; /* wanted access rights
*/
1774 mem_size_t size
; /* mapping size
*/
1775 unsigned int flags
; /* SEC_
* flags
*/
1776 obj_handle_t shared_file
; /* shared mapping file handle
*/
1777 VARARG(image
,pe_image_info
);/* image info for SEC_IMAGE mappings
*/
1781 /* Add a memory view in the current process
*/
1783 obj_handle_t mapping
; /* file mapping handle
*/
1784 unsigned int access
; /* wanted access rights
*/
1785 client_ptr_t base
; /* view base
address (page
-aligned
) */
1786 mem_size_t size
; /* view size
*/
1787 file_pos_t start
; /* start offset in mapping
*/
1791 /* Unmap a memory view from the current process
*/
1793 client_ptr_t base
; /* view base address
*/
1797 /* Get a range of committed pages in a file mapping
*/
1798 @
REQ(get_mapping_committed_range
)
1799 client_ptr_t base
; /* view base address
*/
1800 file_pos_t offset
; /* starting
offset (page
-aligned
, in bytes
) */
1802 mem_size_t size
; /* size of range starting at
offset (page
-aligned
, in bytes
) */
1803 int committed
; /* whether it is a committed range
*/
1807 /* Add a range to the committed pages in a file mapping
*/
1808 @
REQ(add_mapping_committed_range
)
1809 client_ptr_t base
; /* view base address
*/
1810 file_pos_t offset
; /* starting
offset (page
-aligned
, in bytes
) */
1811 mem_size_t size
; /* size to
set (page
-aligned
, in bytes
) or
0 if only retrieving
*/
1815 /* Check if two memory maps are for the same file
*/
1816 @
REQ(is_same_mapping
)
1817 client_ptr_t base1
; /* first view base address
*/
1818 client_ptr_t base2
; /* second view base address
*/
1822 #define SNAP_PROCESS
0x00000001
1823 #define SNAP_THREAD
0x00000002
1824 /* Create a snapshot
*/
1825 @
REQ(create_snapshot
)
1826 unsigned int attributes
; /* object attributes
*/
1827 unsigned int flags
; /* snapshot
flags (SNAP_*)
*/
1829 obj_handle_t handle
; /* handle to the snapshot
*/
1833 /* Get the next process from a snapshot
*/
1835 obj_handle_t handle
; /* handle to the snapshot
*/
1836 int reset
; /* reset snapshot position?
*/
1838 int count
; /* process usage count
*/
1839 process_id_t pid
; /* process id
*/
1840 process_id_t ppid
; /* parent process id
*/
1841 int threads
; /* number of threads
*/
1842 int priority
; /* process priority
*/
1843 int handles
; /* number of handles
*/
1844 int unix_pid
; /* Unix pid
*/
1845 VARARG(filename
,unicode_str
); /* file name of main exe
*/
1849 /* Get the next thread from a snapshot
*/
1851 obj_handle_t handle
; /* handle to the snapshot
*/
1852 int reset
; /* reset snapshot position?
*/
1854 int count
; /* thread usage count
*/
1855 process_id_t pid
; /* process id
*/
1856 thread_id_t tid
; /* thread id
*/
1857 int base_pri
; /* base priority
*/
1858 int delta_pri
; /* delta priority
*/
1862 /* Wait for a debug event
*/
1863 @
REQ(wait_debug_event
)
1864 int get_handle
; /* should we alloc a handle for waiting?
*/
1866 process_id_t pid
; /* process id
*/
1867 thread_id_t tid
; /* thread id
*/
1868 obj_handle_t wait
; /* wait handle if no event ready
*/
1869 VARARG(event
,debug_event
); /* debug event data
*/
1873 /* Queue an exception event
*/
1874 @
REQ(queue_exception_event
)
1875 int first
; /* first chance exception?
*/
1876 unsigned int code
; /* exception code
*/
1877 unsigned int flags
; /* exception flags
*/
1878 client_ptr_t record
; /* exception record
*/
1879 client_ptr_t address
; /* exception address
*/
1880 data_size_t len
; /* size of parameters
*/
1881 VARARG(params
,uints64
,len
);/* exception parameters
*/
1882 VARARG(context
,context
); /* thread context
*/
1884 obj_handle_t handle
; /* handle to the queued event
*/
1888 /* Retrieve the status of an exception event
*/
1889 @
REQ(get_exception_status
)
1890 obj_handle_t handle
; /* handle to the queued event
*/
1892 VARARG(context
,context
); /* modified thread context
*/
1896 /* Continue a debug event
*/
1897 @
REQ(continue_debug_event
)
1898 process_id_t pid
; /* process id to continue
*/
1899 thread_id_t tid
; /* thread id to continue
*/
1900 int status
; /* continuation status
*/
1904 /* Start
/stop debugging an existing process
*/
1906 process_id_t pid
; /* id of the process to debug
*/
1907 int attach
; /* 1=attaching
/ 0=detaching from the process
*/
1911 /* Simulate a breakpoint in a process
*/
1913 obj_handle_t handle
; /* process handle
*/
1915 int self
; /* was it the caller itself?
*/
1919 /* Set debugger kill on exit flag
*/
1920 @
REQ(set_debugger_kill_on_exit
)
1921 int kill_on_exit
; /* 0=detach
/1=kill debuggee when debugger dies
*/
1925 /* Read data from a process address space
*/
1926 @
REQ(read_process_memory
)
1927 obj_handle_t handle
; /* process handle
*/
1928 client_ptr_t addr
; /* addr to read from
*/
1930 VARARG(data
,bytes
); /* result data
*/
1934 /* Write data to a process address space
*/
1935 @
REQ(write_process_memory
)
1936 obj_handle_t handle
; /* process handle
*/
1937 client_ptr_t addr
; /* addr to write to
*/
1938 VARARG(data
,bytes
); /* data to write
*/
1942 /* Create a registry key
*/
1944 unsigned int access
; /* desired access rights
*/
1945 unsigned int options
; /* creation options
*/
1946 VARARG(objattr
,object_attributes
); /* object attributes
*/
1947 VARARG(class
,unicode_str
); /* class name
*/
1949 obj_handle_t hkey
; /* handle to the created key
*/
1950 int created
; /* has it been newly created?
*/
1953 /* Open a registry key
*/
1955 obj_handle_t parent
; /* handle to the parent key
*/
1956 unsigned int access
; /* desired access rights
*/
1957 unsigned int attributes
; /* object attributes
*/
1958 VARARG(name
,unicode_str
); /* key name
*/
1960 obj_handle_t hkey
; /* handle to the open key
*/
1964 /* Delete a registry key
*/
1966 obj_handle_t hkey
; /* handle to the key
*/
1970 /* Flush a registry key
*/
1972 obj_handle_t hkey
; /* handle to the key
*/
1976 /* Enumerate registry subkeys
*/
1978 obj_handle_t hkey
; /* handle to registry key
*/
1979 int index
; /* index of
subkey (or
-1 for current key
) */
1980 int info_class
; /* requested information class
*/
1982 int subkeys
; /* number of subkeys
*/
1983 int max_subkey
; /* longest subkey name
*/
1984 int max_class
; /* longest class name
*/
1985 int values
; /* number of values
*/
1986 int max_value
; /* longest value name
*/
1987 int max_data
; /* longest value data
*/
1988 timeout_t modif
; /* last modification time
*/
1989 data_size_t total
; /* total length needed for full name and class
*/
1990 data_size_t namelen
; /* length of key name in bytes
*/
1991 VARARG(name
,unicode_str
,namelen
); /* key name
*/
1992 VARARG(class
,unicode_str
); /* class name
*/
1996 /* Set a value of a registry key
*/
1998 obj_handle_t hkey
; /* handle to registry key
*/
1999 int type
; /* value type
*/
2000 data_size_t namelen
; /* length of value name in bytes
*/
2001 VARARG(name
,unicode_str
,namelen
); /* value name
*/
2002 VARARG(data
,bytes
); /* value data
*/
2006 /* Retrieve the value of a registry key
*/
2008 obj_handle_t hkey
; /* handle to registry key
*/
2009 VARARG(name
,unicode_str
); /* value name
*/
2011 int type
; /* value type
*/
2012 data_size_t total
; /* total length needed for data
*/
2013 VARARG(data
,bytes
); /* value data
*/
2017 /* Enumerate a value of a registry key
*/
2018 @
REQ(enum_key_value
)
2019 obj_handle_t hkey
; /* handle to registry key
*/
2020 int index
; /* value index
*/
2021 int info_class
; /* requested information class
*/
2023 int type
; /* value type
*/
2024 data_size_t total
; /* total length needed for full name and data
*/
2025 data_size_t namelen
; /* length of value name in bytes
*/
2026 VARARG(name
,unicode_str
,namelen
); /* value name
*/
2027 VARARG(data
,bytes
); /* value data
*/
2031 /* Delete a value of a registry key
*/
2032 @
REQ(delete_key_value
)
2033 obj_handle_t hkey
; /* handle to registry key
*/
2034 VARARG(name
,unicode_str
); /* value name
*/
2038 /* Load a registry branch from a file
*/
2040 obj_handle_t file
; /* file to load from
*/
2041 VARARG(objattr
,object_attributes
); /* object attributes
*/
2045 /* UnLoad a registry branch from a file
*/
2046 @
REQ(unload_registry
)
2047 obj_handle_t hkey
; /* root key to unload to
*/
2051 /* Save a registry branch to a file
*/
2053 obj_handle_t hkey
; /* key to save
*/
2054 obj_handle_t file
; /* file to save to
*/
2058 /* Add a registry key change notification
*/
2059 @
REQ(set_registry_notification
)
2060 obj_handle_t hkey
; /* key to watch for changes
*/
2061 obj_handle_t event
; /* event to set
*/
2062 int subtree
; /* should we watch the whole subtree?
*/
2063 unsigned int filter
; /* things to watch
*/
2067 /* Create a waitable timer
*/
2069 unsigned int access
; /* wanted access rights
*/
2070 int manual
; /* manual reset
*/
2071 VARARG(objattr
,object_attributes
); /* object attributes
*/
2073 obj_handle_t handle
; /* handle to the timer
*/
2077 /* Open a waitable timer
*/
2079 unsigned int access
; /* wanted access rights
*/
2080 unsigned int attributes
; /* object attributes
*/
2081 obj_handle_t rootdir
; /* root directory
*/
2082 VARARG(name
,unicode_str
); /* object name
*/
2084 obj_handle_t handle
; /* handle to the timer
*/
2087 /* Set a waitable timer
*/
2089 obj_handle_t handle
; /* handle to the timer
*/
2090 timeout_t expire
; /* next expiration absolute time
*/
2091 client_ptr_t callback
; /* callback function
*/
2092 client_ptr_t arg
; /* callback argument
*/
2093 int period
; /* timer period in ms
*/
2095 int signaled
; /* was the timer signaled before this call ?
*/
2098 /* Cancel a waitable timer
*/
2100 obj_handle_t handle
; /* handle to the timer
*/
2102 int signaled
; /* was the timer signaled before this calltime ?
*/
2105 /* Get information on a waitable timer
*/
2106 @
REQ(get_timer_info
)
2107 obj_handle_t handle
; /* handle to the timer
*/
2109 timeout_t when
; /* absolute time when the timer next expires
*/
2110 int signaled
; /* is the timer signaled?
*/
2114 /* Retrieve the current context of a thread
*/
2115 @
REQ(get_thread_context
)
2116 obj_handle_t handle
; /* thread handle
*/
2117 unsigned int flags
; /* context flags
*/
2118 int suspend
; /* suspend the thread if needed
*/
2120 int self
; /* was it a handle to the current thread?
*/
2121 VARARG(context
,context
); /* thread context
*/
2125 /* Set the current context of a thread
*/
2126 @
REQ(set_thread_context
)
2127 obj_handle_t handle
; /* thread handle
*/
2128 int suspend
; /* suspend the thread if needed
*/
2129 VARARG(context
,context
); /* thread context
*/
2131 int self
; /* was it a handle to the current thread?
*/
2135 /* Fetch a selector entry for a thread
*/
2136 @
REQ(get_selector_entry
)
2137 obj_handle_t handle
; /* thread handle
*/
2138 int entry
; /* LDT entry
*/
2140 unsigned int base
; /* selector base
*/
2141 unsigned int limit
; /* selector limit
*/
2142 unsigned char flags
; /* selector flags
*/
2148 obj_handle_t table
; /* which table to add atom to
*/
2149 VARARG(name
,unicode_str
); /* atom name
*/
2151 atom_t atom
; /* resulting atom
*/
2155 /* Delete an atom
*/
2157 obj_handle_t table
; /* which table to delete atom from
*/
2158 atom_t atom
; /* atom handle
*/
2164 obj_handle_t table
; /* which table to find atom from
*/
2165 VARARG(name
,unicode_str
); /* atom name
*/
2167 atom_t atom
; /* atom handle
*/
2171 /* Get information about an atom
*/
2172 @
REQ(get_atom_information
)
2173 obj_handle_t table
; /* which table to find atom from
*/
2174 atom_t atom
; /* atom handle
*/
2176 int count
; /* atom lock count
*/
2177 int pinned
; /* whether the atom has been pinned
*/
2178 data_size_t total
; /* actual length of atom name
*/
2179 VARARG(name
,unicode_str
); /* atom name
*/
2183 /* Set information about an atom
*/
2184 @
REQ(set_atom_information
)
2185 obj_handle_t table
; /* which table to find atom from
*/
2186 atom_t atom
; /* atom handle
*/
2187 int pinned
; /* whether to bump atom information
*/
2191 /* Empty an atom table
*/
2192 @
REQ(empty_atom_table
)
2193 obj_handle_t table
; /* which table to find atom from
*/
2194 int if_pinned
; /* whether to delete pinned atoms
*/
2198 /* Init an atom table
*/
2199 @
REQ(init_atom_table
)
2200 int entries
; /* number of
entries (only for local
) */
2202 obj_handle_t table
; /* handle to the atom table
*/
2206 /* Get the message queue of the current thread
*/
2209 obj_handle_t handle
; /* handle to the queue
*/
2213 /* Set the file descriptor associated to the current thread queue
*/
2215 obj_handle_t handle
; /* handle to the file descriptor
*/
2219 /* Set the current message queue wakeup mask
*/
2220 @
REQ(set_queue_mask
)
2221 unsigned int wake_mask
; /* wakeup bits mask
*/
2222 unsigned int changed_mask
; /* changed bits mask
*/
2223 int skip_wait
; /* will we skip waiting if signaled?
*/
2225 unsigned int wake_bits
; /* current wake bits
*/
2226 unsigned int changed_bits
; /* current changed bits
*/
2230 /* Get the current message queue status
*/
2231 @
REQ(get_queue_status
)
2232 unsigned int clear_bits
; /* should we clear the change bits?
*/
2234 unsigned int wake_bits
; /* wake bits
*/
2235 unsigned int changed_bits
; /* changed bits since last time
*/
2239 /* Retrieve the process idle event
*/
2240 @
REQ(get_process_idle_event
)
2241 obj_handle_t handle
; /* process handle
*/
2243 obj_handle_t event
; /* handle to idle event
*/
2247 /* Send a message to a thread queue
*/
2249 thread_id_t id
; /* thread id
*/
2250 int type
; /* message
type (see below
) */
2251 int flags
; /* message
flags (see below
) */
2252 user_handle_t win
; /* window handle
*/
2253 unsigned int msg
; /* message code
*/
2254 lparam_t wparam
; /* parameters
*/
2255 lparam_t lparam
; /* parameters
*/
2256 timeout_t timeout
; /* timeout for reply
*/
2257 VARARG(data
,message_data
); /* message data for sent messages
*/
2260 @
REQ(post_quit_message
)
2261 int exit_code
; /* exit code to return
*/
2266 MSG_ASCII
, /* Ascii
message (from SendMessageA
) */
2267 MSG_UNICODE
, /* Unicode
message (from SendMessageW
) */
2268 MSG_NOTIFY
, /* notify
message (from SendNotifyMessageW
), always Unicode
*/
2269 MSG_CALLBACK
, /* callback
message (from SendMessageCallbackW
), always Unicode
*/
2270 MSG_CALLBACK_RESULT
,/* result of a callback message
*/
2271 MSG_OTHER_PROCESS
, /* sent from other process
, may include vararg data
, always Unicode
*/
2272 MSG_POSTED
, /* posted
message (from PostMessageW
), always Unicode
*/
2273 MSG_HARDWARE
, /* hardware message
*/
2274 MSG_WINEVENT
, /* winevent message
*/
2275 MSG_HOOK_LL
/* low
-level hardware hook
*/
2277 #define SEND_MSG_ABORT_IF_HUNG
0x01
2280 /* Send a hardware message to a thread queue
*/
2281 @
REQ(send_hardware_message
)
2282 user_handle_t win
; /* window handle
*/
2283 hw_input_t input
; /* input data
*/
2284 unsigned int flags
; /* flags (see below
) */
2286 int wait
; /* do we need to wait for a reply?
*/
2287 int prev_x
; /* previous cursor position
*/
2289 int new_x
; /* new cursor position
*/
2291 VARARG(keystate
,bytes
); /* global state array for all the keys
*/
2293 #define SEND_HWMSG_INJECTED
0x01
2296 /* Get a message from the current queue
*/
2298 unsigned int flags
; /* PM_
* flags
*/
2299 user_handle_t get_win
; /* window handle to get
*/
2300 unsigned int get_first
; /* first message code to get
*/
2301 unsigned int get_last
; /* last message code to get
*/
2302 unsigned int hw_id
; /* id of the previous hardware
message (or
0) */
2303 unsigned int wake_mask
; /* wakeup bits mask
*/
2304 unsigned int changed_mask
; /* changed bits mask
*/
2306 user_handle_t win
; /* window handle
*/
2307 unsigned int msg
; /* message code
*/
2308 lparam_t wparam
; /* parameters
*/
2309 lparam_t lparam
; /* parameters
*/
2310 int type
; /* message type
*/
2311 int x
; /* message x position
*/
2312 int y
; /* message y position
*/
2313 unsigned int time
; /* message time
*/
2314 unsigned int active_hooks
; /* active hooks bitmap
*/
2315 data_size_t total
; /* total size of extra data
*/
2316 VARARG(data
,message_data
); /* message data for sent messages
*/
2320 /* Reply to a sent message
*/
2322 int remove
; /* should we remove the message?
*/
2323 lparam_t result
; /* message result
*/
2324 VARARG(data
,bytes
); /* message data for sent messages
*/
2328 /* Accept the current hardware message
*/
2329 @
REQ(accept_hardware_message
)
2330 unsigned int hw_id
; /* id of the hardware message
*/
2331 int remove
; /* should we remove the message?
*/
2335 /* Retrieve the reply for the last message sent
*/
2336 @
REQ(get_message_reply
)
2337 int cancel
; /* cancel message if not ready?
*/
2339 lparam_t result
; /* message result
*/
2340 VARARG(data
,bytes
); /* message data for sent messages
*/
2344 /* Set a window timer
*/
2346 user_handle_t win
; /* window handle
*/
2347 unsigned int msg
; /* message to post
*/
2348 unsigned int rate
; /* timer rate in ms
*/
2349 lparam_t id
; /* timer id
*/
2350 lparam_t lparam
; /* message
lparam (callback proc
) */
2352 lparam_t id
; /* timer id
*/
2356 /* Kill a window timer
*/
2357 @
REQ(kill_win_timer
)
2358 user_handle_t win
; /* window handle
*/
2359 lparam_t id
; /* timer id
*/
2360 unsigned int msg
; /* message to post
*/
2364 /* check if the thread owning the window is hung
*/
2365 @
REQ(is_window_hung
)
2366 user_handle_t win
; /* window handle
*/
2372 /* Retrieve info about a serial port
*/
2373 @
REQ(get_serial_info
)
2374 obj_handle_t handle
; /* handle to comm port
*/
2377 unsigned int eventmask
;
2378 unsigned int cookie
;
2379 unsigned int pending_write
;
2383 /* Set info about a serial port
*/
2384 @
REQ(set_serial_info
)
2385 obj_handle_t handle
; /* handle to comm port
*/
2386 int flags
; /* bitmask to set
values (see below
) */
2388 #define SERIALINFO_PENDING_WRITE
0x04
2389 #define SERIALINFO_PENDING_WAIT
0x08
2392 /* Create an async I
/O
*/
2393 @
REQ(register_async
)
2394 int type
; /* type of queue to look after
*/
2395 async_data_t async
; /* async I
/O parameters
*/
2396 int count
; /* count
- usually # of bytes to be read
/written
*/
2398 #define ASYNC_TYPE_READ
0x01
2399 #define ASYNC_TYPE_WRITE
0x02
2400 #define ASYNC_TYPE_WAIT
0x03
2403 /* Cancel all async op on a fd
*/
2405 obj_handle_t handle
; /* handle to comm port
, socket or file
*/
2406 client_ptr_t iosb
; /* I
/O status
block (NULL
=all
) */
2407 int only_thread
; /* cancel matching this thread
*/
2411 /* Retrieve results of an async
*/
2412 @
REQ(get_async_result
)
2413 client_ptr_t user_arg
; /* user arg used to identify async
*/
2415 data_size_t size
; /* result
size (input or output depending on the operation
) */
2416 VARARG(out_data
,bytes
); /* iosb output data
*/
2420 /* Perform a read on a file object
*/
2422 async_data_t async
; /* async I
/O parameters
*/
2423 file_pos_t pos
; /* read position
*/
2425 obj_handle_t wait
; /* handle to wait on for blocking read
*/
2426 unsigned int options
; /* device open options
*/
2427 VARARG(data
,bytes
); /* read data
*/
2431 /* Perform a write on a file object
*/
2433 async_data_t async
; /* async I
/O parameters
*/
2434 file_pos_t pos
; /* write position
*/
2435 VARARG(data
,bytes
); /* write data
*/
2437 obj_handle_t wait
; /* handle to wait on for blocking write
*/
2438 unsigned int options
; /* device open options
*/
2439 data_size_t size
; /* size written
*/
2443 /* Perform an ioctl on a file
*/
2445 ioctl_code_t code
; /* ioctl code
*/
2446 async_data_t async
; /* async I
/O parameters
*/
2447 VARARG(in_data
,bytes
); /* ioctl input data
*/
2449 obj_handle_t wait
; /* handle to wait on for blocking ioctl
*/
2450 unsigned int options
; /* device open options
*/
2451 VARARG(out_data
,bytes
); /* ioctl output data
*/
2455 /* Store results of an async irp
*/
2456 @
REQ(set_irp_result
)
2457 obj_handle_t handle
; /* handle to the irp
*/
2458 unsigned int status
; /* status of the irp
*/
2459 data_size_t size
; /* result
size (input or output depending on the operation
) */
2460 client_ptr_t file_ptr
; /* opaque pointer to the file object
*/
2461 VARARG(data
,bytes
); /* output data of the irp
*/
2465 /* Create a named pipe
*/
2466 @
REQ(create_named_pipe
)
2467 unsigned int access
;
2468 unsigned int options
;
2469 unsigned int sharing
;
2470 unsigned int maxinstances
;
2471 unsigned int outsize
;
2472 unsigned int insize
;
2475 VARARG(objattr
,object_attributes
); /* object attributes
*/
2477 obj_handle_t handle
; /* handle to the pipe
*/
2480 /* flags in create_named_pipe and get_named_pipe_info
*/
2481 #define NAMED_PIPE_MESSAGE_STREAM_WRITE
0x0001
2482 #define NAMED_PIPE_MESSAGE_STREAM_READ
0x0002
2483 #define NAMED_PIPE_NONBLOCKING_MODE
0x0004
2484 #define NAMED_PIPE_SERVER_END
0x8000
2486 /* Set named pipe information by handle
*/
2487 @
REQ(set_named_pipe_info
)
2488 obj_handle_t handle
;
2492 /* Create a window
*/
2494 user_handle_t parent
; /* parent window
*/
2495 user_handle_t owner
; /* owner window
*/
2496 atom_t atom
; /* class atom
*/
2497 mod_handle_t instance
; /* module instance
*/
2498 int dpi
; /* system DPI
*/
2499 int awareness
; /* thread DPI awareness
*/
2500 VARARG(class
,unicode_str
); /* class name
*/
2502 user_handle_t handle
; /* created window
*/
2503 user_handle_t parent
; /* full handle of parent
*/
2504 user_handle_t owner
; /* full handle of owner
*/
2505 int extra
; /* number of extra bytes
*/
2506 client_ptr_t class_ptr
; /* pointer to class in client address space
*/
2507 int dpi
; /* window DPI if not per
-monitor aware
*/
2508 int awareness
; /* window DPI awareness
*/
2512 /* Destroy a window
*/
2513 @
REQ(destroy_window
)
2514 user_handle_t handle
; /* handle to the window
*/
2518 /* Retrieve the desktop window for the current thread
*/
2519 @
REQ(get_desktop_window
)
2520 int force
; /* force creation if it doesn
't exist */
2522 user_handle_t top_window; /* handle to the desktop window */
2523 user_handle_t msg_window; /* handle to the top-level HWND_MESSAGE parent */
2527 /* Set a window owner */
2528 @REQ(set_window_owner)
2529 user_handle_t handle; /* handle to the window */
2530 user_handle_t owner; /* new owner */
2532 user_handle_t full_owner; /* full handle of new owner */
2533 user_handle_t prev_owner; /* full handle of previous owner */
2537 /* Get information from a window handle */
2538 @REQ(get_window_info)
2539 user_handle_t handle; /* handle to the window */
2541 user_handle_t full_handle; /* full 32-bit handle */
2542 user_handle_t last_active; /* last active popup */
2543 process_id_t pid; /* process owning the window */
2544 thread_id_t tid; /* thread owning the window */
2545 atom_t atom; /* class atom */
2546 int is_unicode; /* ANSI or unicode */
2547 int dpi; /* window DPI */
2548 int awareness; /* DPI awareness */
2552 /* Set some information in a window */
2553 @REQ(set_window_info)
2554 unsigned short flags; /* flags for fields to set (see below) */
2555 short int is_unicode; /* ANSI or unicode */
2556 user_handle_t handle; /* handle to the window */
2557 unsigned int style; /* window style */
2558 unsigned int ex_style; /* window extended style */
2559 unsigned int id; /* window id */
2560 mod_handle_t instance; /* creator instance */
2561 lparam_t user_data; /* user-specific data */
2562 int extra_offset; /* offset to set in extra bytes */
2563 data_size_t extra_size; /* size to set in extra bytes */
2564 lparam_t extra_value; /* value to set in extra bytes */
2566 unsigned int old_style; /* old window style */
2567 unsigned int old_ex_style; /* old window extended style */
2568 mod_handle_t old_instance; /* old creator instance */
2569 lparam_t old_user_data; /* old user-specific data */
2570 lparam_t old_extra_value; /* old value in extra bytes */
2571 unsigned int old_id; /* old window id */
2573 #define SET_WIN_STYLE 0x01
2574 #define SET_WIN_EXSTYLE 0x02
2575 #define SET_WIN_ID 0x04
2576 #define SET_WIN_INSTANCE 0x08
2577 #define SET_WIN_USERDATA 0x10
2578 #define SET_WIN_EXTRA 0x20
2579 #define SET_WIN_UNICODE 0x40
2582 /* Set the parent of a window */
2584 user_handle_t handle; /* handle to the window */
2585 user_handle_t parent; /* handle to the parent */
2587 user_handle_t old_parent; /* old parent window */
2588 user_handle_t full_parent; /* full handle of new parent */
2589 int dpi; /* new window DPI if not per-monitor aware */
2590 int awareness; /* new DPI awareness */
2594 /* Get a list of the window parents, up to the root of the tree */
2595 @REQ(get_window_parents)
2596 user_handle_t handle; /* handle to the window */
2598 int count; /* total count of parents */
2599 VARARG(parents,user_handles); /* parent handles */
2603 /* Get a list of the window children */
2604 @REQ(get_window_children)
2605 obj_handle_t desktop; /* handle to desktop */
2606 user_handle_t parent; /* parent window */
2607 atom_t atom; /* class atom for the listed children */
2608 thread_id_t tid; /* thread owning the listed children */
2609 VARARG(class,unicode_str); /* class name */
2611 int count; /* total count of children */
2612 VARARG(children,user_handles); /* children handles */
2616 /* Get a list of the window children that contain a given point */
2617 @REQ(get_window_children_from_point)
2618 user_handle_t parent; /* parent window */
2619 int x; /* point in parent coordinates */
2621 int dpi; /* dpi for the point coordinates */
2623 int count; /* total count of children */
2624 VARARG(children,user_handles); /* children handles */
2628 /* Get window tree information from a window handle */
2629 @REQ(get_window_tree)
2630 user_handle_t handle; /* handle to the window */
2632 user_handle_t parent; /* parent window */
2633 user_handle_t owner; /* owner window */
2634 user_handle_t next_sibling; /* next sibling in Z-order */
2635 user_handle_t prev_sibling; /* prev sibling in Z-order */
2636 user_handle_t first_sibling; /* first sibling in Z-order */
2637 user_handle_t last_sibling; /* last sibling in Z-order */
2638 user_handle_t first_child; /* first child */
2639 user_handle_t last_child; /* last child */
2642 /* Set the position and Z order of a window */
2643 @REQ(set_window_pos)
2644 unsigned short swp_flags; /* SWP_* flags */
2645 unsigned short paint_flags; /* paint flags (see below) */
2646 user_handle_t handle; /* handle to the window */
2647 user_handle_t previous; /* previous window in Z order */
2648 rectangle_t window; /* window rectangle (in parent coords) */
2649 rectangle_t client; /* client rectangle (in parent coords) */
2650 VARARG(valid,rectangles); /* valid rectangles from WM_NCCALCSIZE (in parent coords) */
2652 unsigned int new_style; /* new window style */
2653 unsigned int new_ex_style; /* new window extended style */
2654 user_handle_t surface_win; /* parent window that holds the surface */
2655 int needs_update; /* whether the surface region needs an update */
2657 #define SET_WINPOS_PAINT_SURFACE 0x01 /* window has a paintable surface */
2658 #define SET_WINPOS_PIXEL_FORMAT 0x02 /* window has a custom pixel format */
2660 /* Get the window and client rectangles of a window */
2661 @REQ(get_window_rectangles)
2662 user_handle_t handle; /* handle to the window */
2663 int relative; /* coords relative to (see below) */
2664 int dpi; /* DPI to map to, or zero for per-monitor DPI */
2666 rectangle_t window; /* window rectangle */
2667 rectangle_t client; /* client rectangle */
2669 enum coords_relative
2671 COORDS_CLIENT, /* relative to client area */
2672 COORDS_WINDOW, /* relative to whole window area */
2673 COORDS_PARENT, /* relative to parent's client area
*/
2674 COORDS_SCREEN
/* relative to screen origin
*/
2678 /* Get the window text
*/
2679 @
REQ(get_window_text
)
2680 user_handle_t handle
; /* handle to the window
*/
2682 data_size_t length
; /* total length in WCHARs
*/
2683 VARARG(text
,unicode_str
); /* window text
*/
2687 /* Set the window text
*/
2688 @
REQ(set_window_text
)
2689 user_handle_t handle
; /* handle to the window
*/
2690 VARARG(text
,unicode_str
); /* window text
*/
2694 /* Get the coordinates offset between two windows
*/
2695 @
REQ(get_windows_offset
)
2696 user_handle_t from
; /* handle to the first window
*/
2697 user_handle_t to
; /* handle to the second window
*/
2698 int dpi
; /* DPI to map to
, or zero for per
-monitor DPI
*/
2700 int x
; /* x coordinate offset
*/
2701 int y
; /* y coordinate offset
*/
2702 int mirror
; /* whether to mirror the x coordinate
*/
2706 /* Get the visible region of a window
*/
2707 @
REQ(get_visible_region
)
2708 user_handle_t window
; /* handle to the window
*/
2709 unsigned int flags
; /* DCX flags
*/
2711 user_handle_t top_win
; /* top window to clip against
*/
2712 rectangle_t top_rect
; /* top window visible rect with screen coords
*/
2713 rectangle_t win_rect
; /* window rect in screen coords
*/
2714 unsigned int paint_flags
; /* paint
flags (from SET_WINPOS_
* flags
) */
2715 data_size_t total_size
; /* total size of the resulting region
*/
2716 VARARG(region
,rectangles
); /* list of rectangles for the
region (in screen coords
) */
2720 /* Get the visible surface region of a window
*/
2721 @
REQ(get_surface_region
)
2722 user_handle_t window
; /* handle to the window
*/
2724 rectangle_t visible_rect
; /* window visible rect in screen coords
*/
2725 data_size_t total_size
; /* total size of the resulting region
*/
2726 VARARG(region
,rectangles
); /* list of rectangles for the
region (in screen coords
) */
2730 /* Get the window region
*/
2731 @
REQ(get_window_region
)
2732 user_handle_t window
; /* handle to the window
*/
2734 data_size_t total_size
; /* total size of the resulting region
*/
2735 VARARG(region
,rectangles
); /* list of rectangles for the
region (in window coords
) */
2739 /* Set the window region
*/
2740 @
REQ(set_window_region
)
2741 user_handle_t window
; /* handle to the window
*/
2742 int redraw
; /* redraw the window?
*/
2743 VARARG(region
,rectangles
); /* list of rectangles for the
region (in window coords
) */
2747 /* Get the window update region
*/
2748 @
REQ(get_update_region
)
2749 user_handle_t window
; /* handle to the window
*/
2750 user_handle_t from_child
; /* child to start searching from
*/
2751 unsigned int flags
; /* update
flags (see below
) */
2753 user_handle_t child
; /* child to
repaint (or window itself
) */
2754 unsigned int flags
; /* resulting update
flags (see below
) */
2755 data_size_t total_size
; /* total size of the resulting region
*/
2756 VARARG(region
,rectangles
); /* list of rectangles for the
region (in screen coords
) */
2758 #define UPDATE_NONCLIENT
0x001 /* get region for repainting non
-client area
*/
2759 #define UPDATE_ERASE
0x002 /* get region for erasing client area
*/
2760 #define UPDATE_PAINT
0x004 /* get region for painting client area
*/
2761 #define UPDATE_INTERNALPAINT
0x008 /* get region if internal paint is pending
*/
2762 #define UPDATE_ALLCHILDREN
0x010 /* force repaint of all children
*/
2763 #define UPDATE_NOCHILDREN
0x020 /* don
't try to repaint any children */
2764 #define UPDATE_NOREGION 0x040 /* don't return a region
, only the flags
*/
2765 #define UPDATE_DELAYED_ERASE
0x080 /* still needs erase after BeginPaint
*/
2766 #define UPDATE_CLIPCHILDREN
0x100 /* remove clipped children from the update region
*/
2769 /* Update the z order of a window so that a given rectangle is fully visible
*/
2770 @
REQ(update_window_zorder
)
2771 user_handle_t window
; /* handle to the window
*/
2772 rectangle_t rect
; /* rectangle that must be
visible (in client coords
) */
2776 /* Mark parts of a window as needing a redraw
*/
2778 user_handle_t window
; /* handle to the window
*/
2779 unsigned int flags
; /* RDW_
* flags
*/
2780 VARARG(region
,rectangles
); /* list of rectangles for the
region (in window coords
) */
2784 /* Set a window property
*/
2785 @
REQ(set_window_property
)
2786 user_handle_t window
; /* handle to the window
*/
2787 lparam_t data
; /* data to store
*/
2788 atom_t atom
; /* property
atom (if no name specified
) */
2789 VARARG(name
,unicode_str
); /* property name
*/
2793 /* Remove a window property
*/
2794 @
REQ(remove_window_property
)
2795 user_handle_t window
; /* handle to the window
*/
2796 atom_t atom
; /* property
atom (if no name specified
) */
2797 VARARG(name
,unicode_str
); /* property name
*/
2799 lparam_t data
; /* data stored in property
*/
2803 /* Get a window property
*/
2804 @
REQ(get_window_property
)
2805 user_handle_t window
; /* handle to the window
*/
2806 atom_t atom
; /* property
atom (if no name specified
) */
2807 VARARG(name
,unicode_str
); /* property name
*/
2809 lparam_t data
; /* data stored in property
*/
2813 /* Get the list of properties of a window
*/
2814 @
REQ(get_window_properties
)
2815 user_handle_t window
; /* handle to the window
*/
2817 int total
; /* total number of properties
*/
2818 VARARG(props
,properties
); /* list of properties
*/
2822 /* Create a window station
*/
2823 @
REQ(create_winstation
)
2824 unsigned int flags
; /* window station flags
*/
2825 unsigned int access
; /* wanted access rights
*/
2826 unsigned int attributes
; /* object attributes
*/
2827 obj_handle_t rootdir
; /* root directory
*/
2828 VARARG(name
,unicode_str
); /* object name
*/
2830 obj_handle_t handle
; /* handle to the window station
*/
2834 /* Open a handle to a window station
*/
2835 @
REQ(open_winstation
)
2836 unsigned int access
; /* wanted access rights
*/
2837 unsigned int attributes
; /* object attributes
*/
2838 obj_handle_t rootdir
; /* root directory
*/
2839 VARARG(name
,unicode_str
); /* object name
*/
2841 obj_handle_t handle
; /* handle to the window station
*/
2845 /* Close a window station
*/
2846 @
REQ(close_winstation
)
2847 obj_handle_t handle
; /* handle to the window station
*/
2851 /* Get the process current window station
*/
2852 @
REQ(get_process_winstation
)
2854 obj_handle_t handle
; /* handle to the window station
*/
2858 /* Set the process current window station
*/
2859 @
REQ(set_process_winstation
)
2860 obj_handle_t handle
; /* handle to the window station
*/
2864 /* Enumerate window stations
*/
2865 @
REQ(enum_winstation
)
2866 unsigned int index
; /* current index
*/
2868 unsigned int next
; /* next index
*/
2869 VARARG(name
,unicode_str
); /* window station name
*/
2873 /* Create a desktop
*/
2874 @
REQ(create_desktop
)
2875 unsigned int flags
; /* desktop flags
*/
2876 unsigned int access
; /* wanted access rights
*/
2877 unsigned int attributes
; /* object attributes
*/
2878 VARARG(name
,unicode_str
); /* object name
*/
2880 obj_handle_t handle
; /* handle to the desktop
*/
2884 /* Open a handle to a desktop
*/
2886 obj_handle_t winsta
; /* window station to
open (null allowed
) */
2887 unsigned int flags
; /* desktop flags
*/
2888 unsigned int access
; /* wanted access rights
*/
2889 unsigned int attributes
; /* object attributes
*/
2890 VARARG(name
,unicode_str
); /* object name
*/
2892 obj_handle_t handle
; /* handle to the desktop
*/
2896 /* Open a handle to current input desktop
*/
2897 @
REQ(open_input_desktop
)
2898 unsigned int flags
; /* desktop flags
*/
2899 unsigned int access
; /* wanted access rights
*/
2900 unsigned int attributes
; /* object attributes
*/
2902 obj_handle_t handle
; /* handle to the desktop
*/
2906 /* Close a desktop
*/
2908 obj_handle_t handle
; /* handle to the desktop
*/
2912 /* Get the thread current desktop
*/
2913 @
REQ(get_thread_desktop
)
2914 thread_id_t tid
; /* thread id
*/
2916 obj_handle_t handle
; /* handle to the desktop
*/
2920 /* Set the thread current desktop
*/
2921 @
REQ(set_thread_desktop
)
2922 obj_handle_t handle
; /* handle to the desktop
*/
2926 /* Enumerate desktops
*/
2928 obj_handle_t winstation
; /* handle to the window station
*/
2929 unsigned int index
; /* current index
*/
2931 unsigned int next
; /* next index
*/
2932 VARARG(name
,unicode_str
); /* window station name
*/
2936 /* Get
/set information about a user
object (window station or desktop
) */
2937 @
REQ(set_user_object_info
)
2938 obj_handle_t handle
; /* handle to the object
*/
2939 unsigned int flags
; /* information to set
/get
*/
2940 unsigned int obj_flags
; /* new object flags
*/
2942 int is_desktop
; /* is object a desktop?
*/
2943 unsigned int old_obj_flags
; /* old object flags
*/
2944 VARARG(name
,unicode_str
); /* object name
*/
2946 #define SET_USER_OBJECT_SET_FLAGS
1
2947 #define SET_USER_OBJECT_GET_FULL_NAME
2
2950 /* Register a hotkey
*/
2951 @
REQ(register_hotkey
)
2952 user_handle_t window
; /* handle to the window
*/
2953 int id
; /* hotkey identifier
*/
2954 unsigned int flags
; /* modifier keys
*/
2955 unsigned int vkey
; /* virtual key code
*/
2957 int replaced
; /* did we replace an existing hotkey?
*/
2958 unsigned int flags
; /* flags of replaced hotkey
*/
2959 unsigned int vkey
; /* virtual key code of replaced hotkey
*/
2963 /* Unregister a hotkey
*/
2964 @
REQ(unregister_hotkey
)
2965 user_handle_t window
; /* handle to the window
*/
2966 int id
; /* hotkey identifier
*/
2968 unsigned int flags
; /* flags of removed hotkey
*/
2969 unsigned int vkey
; /* virtual key code of removed hotkey
*/
2973 /* Attach (or detach
) thread inputs
*/
2974 @
REQ(attach_thread_input
)
2975 thread_id_t tid_from
; /* thread to be attached
*/
2976 thread_id_t tid_to
; /* thread to which tid_from should be attached
*/
2977 int attach
; /* is it an attach?
*/
2981 /* Get input data for a given thread
*/
2982 @
REQ(get_thread_input
)
2983 thread_id_t tid
; /* id of thread
*/
2985 user_handle_t focus
; /* handle to the focus window
*/
2986 user_handle_t capture
; /* handle to the capture window
*/
2987 user_handle_t active
; /* handle to the active window
*/
2988 user_handle_t foreground
; /* handle to the global foreground window
*/
2989 user_handle_t menu_owner
; /* handle to the menu owner
*/
2990 user_handle_t move_size
; /* handle to the moving
/resizing window
*/
2991 user_handle_t caret
; /* handle to the caret window
*/
2992 user_handle_t cursor
; /* handle to the cursor
*/
2993 int show_count
; /* cursor show count
*/
2994 rectangle_t rect
; /* caret rectangle
*/
2998 /* Get the time of the last input event
*/
2999 @
REQ(get_last_input_time
)
3005 /* Retrieve queue keyboard state for a given thread
*/
3007 thread_id_t tid
; /* id of thread
*/
3008 int key
; /* optional key code or
-1 */
3010 unsigned char state
; /* state of specified key
*/
3011 VARARG(keystate
,bytes
); /* state array for all the keys
*/
3014 /* Set queue keyboard state for a given thread
*/
3016 thread_id_t tid
; /* id of thread
*/
3017 int async
; /* whether to change the async state too
*/
3018 VARARG(keystate
,bytes
); /* state array for all the keys
*/
3021 /* Set the system foreground window
*/
3022 @
REQ(set_foreground_window
)
3023 user_handle_t handle
; /* handle to the foreground window
*/
3025 user_handle_t previous
; /* handle to the previous foreground window
*/
3026 int send_msg_old
; /* whether we have to send a msg to the old window
*/
3027 int send_msg_new
; /* whether we have to send a msg to the new window
*/
3030 /* Set the current thread focus window
*/
3031 @
REQ(set_focus_window
)
3032 user_handle_t handle
; /* handle to the focus window
*/
3034 user_handle_t previous
; /* handle to the previous focus window
*/
3037 /* Set the current thread active window
*/
3038 @
REQ(set_active_window
)
3039 user_handle_t handle
; /* handle to the active window
*/
3041 user_handle_t previous
; /* handle to the previous active window
*/
3044 /* Set the current thread capture window
*/
3045 @
REQ(set_capture_window
)
3046 user_handle_t handle
; /* handle to the capture window
*/
3047 unsigned int flags
; /* capture
flags (see below
) */
3049 user_handle_t previous
; /* handle to the previous capture window
*/
3050 user_handle_t full_handle
; /* full
32-bit handle of new capture window
*/
3052 #define CAPTURE_MENU
0x01 /* capture is for a menu
*/
3053 #define CAPTURE_MOVESIZE
0x02 /* capture is for moving
/resizing
*/
3056 /* Set the current thread caret window
*/
3057 @
REQ(set_caret_window
)
3058 user_handle_t handle
; /* handle to the caret window
*/
3059 int width
; /* caret width
*/
3060 int height
; /* caret height
*/
3062 user_handle_t previous
; /* handle to the previous caret window
*/
3063 rectangle_t old_rect
; /* previous caret rectangle
*/
3064 int old_hide
; /* previous hide count
*/
3065 int old_state
; /* previous caret
state (1=on
, 0=off
) */
3069 /* Set the current thread caret information
*/
3070 @
REQ(set_caret_info
)
3071 unsigned int flags
; /* caret
flags (see below
) */
3072 user_handle_t handle
; /* handle to the caret window
*/
3073 int x
; /* caret x position
*/
3074 int y
; /* caret y position
*/
3075 int hide
; /* increment for hide
count (can be negative to show it
) */
3076 int state
; /* caret
state (see below
) */
3078 user_handle_t full_handle
; /* handle to the current caret window
*/
3079 rectangle_t old_rect
; /* previous caret rectangle
*/
3080 int old_hide
; /* previous hide count
*/
3081 int old_state
; /* previous caret
state (1=on
, 0=off
) */
3083 #define SET_CARET_POS
0x01 /* set the caret position from x
,y
*/
3084 #define SET_CARET_HIDE
0x02 /* increment the caret hide count
*/
3085 #define SET_CARET_STATE
0x04 /* set the caret on
/off state
*/
3088 CARET_STATE_OFF
, /* off
*/
3089 CARET_STATE_ON
, /* on
*/
3090 CARET_STATE_TOGGLE
, /* toggle current state
*/
3091 CARET_STATE_ON_IF_MOVED
/* on if the position differs
, unchanged otherwise
*/
3095 /* Set a window hook
*/
3097 int id
; /* id of the hook
*/
3098 process_id_t pid
; /* id of process to set the hook into
*/
3099 thread_id_t tid
; /* id of thread to set the hook into
*/
3102 client_ptr_t proc
; /* hook procedure
*/
3104 int unicode
; /* is it a unicode hook?
*/
3105 VARARG(module
,unicode_str
); /* module name
*/
3107 user_handle_t handle
; /* handle to the hook
*/
3108 unsigned int active_hooks
; /* active hooks bitmap
*/
3112 /* Remove a window hook
*/
3114 user_handle_t handle
; /* handle to the hook
*/
3115 client_ptr_t proc
; /* hook procedure if handle is
0 */
3116 int id
; /* id of the hook if handle is
0 */
3118 unsigned int active_hooks
; /* active hooks bitmap
*/
3122 /* Start calling a hook chain
*/
3123 @
REQ(start_hook_chain
)
3124 int id
; /* id of the hook
*/
3125 int event
; /* signalled event
*/
3126 user_handle_t window
; /* handle to the event window
*/
3127 int object_id
; /* object id for out of context winevent
*/
3128 int child_id
; /* child id for out of context winevent
*/
3130 user_handle_t handle
; /* handle to the next hook
*/
3131 process_id_t pid
; /* process id for low
-level keyboard
/mouse hooks
*/
3132 thread_id_t tid
; /* thread id for low
-level keyboard
/mouse hooks
*/
3133 int unicode
; /* is it a unicode hook?
*/
3134 client_ptr_t proc
; /* hook procedure
*/
3135 unsigned int active_hooks
; /* active hooks bitmap
*/
3136 VARARG(module
,unicode_str
); /* module name
*/
3140 /* Finished calling a hook chain
*/
3141 @
REQ(finish_hook_chain
)
3142 int id
; /* id of the hook
*/
3146 /* Get the hook information
*/
3148 user_handle_t handle
; /* handle to the current hook
*/
3149 int get_next
; /* do we want info about current or next hook?
*/
3150 int event
; /* signalled event
*/
3151 user_handle_t window
; /* handle to the event window
*/
3152 int object_id
; /* object id for out of context winevent
*/
3153 int child_id
; /* child id for out of context winevent
*/
3155 user_handle_t handle
; /* handle to the hook
*/
3156 int id
; /* id of the hook
*/
3157 process_id_t pid
; /* process id for low
-level keyboard
/mouse hooks
*/
3158 thread_id_t tid
; /* thread id for low
-level keyboard
/mouse hooks
*/
3159 client_ptr_t proc
; /* hook procedure
*/
3160 int unicode
; /* is it a unicode hook?
*/
3161 VARARG(module
,unicode_str
); /* module name
*/
3165 /* Create a window class
*/
3167 int local
; /* is it a local class?
*/
3168 atom_t atom
; /* class atom
*/
3169 unsigned int style
; /* class style
*/
3170 mod_handle_t instance
; /* module instance
*/
3171 int extra
; /* number of extra class bytes
*/
3172 int win_extra
; /* number of window extra bytes
*/
3173 client_ptr_t client_ptr
; /* pointer to class in client address space
*/
3174 data_size_t name_offset
; /* base class name offset for specified atom
*/
3175 VARARG(name
,unicode_str
); /* class name
*/
3177 atom_t atom
; /* resulting class atom
*/
3181 /* Destroy a window class
*/
3183 atom_t atom
; /* class atom
*/
3184 mod_handle_t instance
; /* module instance
*/
3185 VARARG(name
,unicode_str
); /* class name
*/
3187 client_ptr_t client_ptr
; /* pointer to class in client address space
*/
3191 /* Set some information in a class
*/
3192 @
REQ(set_class_info
)
3193 user_handle_t window
; /* handle to the window
*/
3194 unsigned int flags
; /* flags for info to
set (see below
) */
3195 atom_t atom
; /* class atom
*/
3196 unsigned int style
; /* class style
*/
3197 int win_extra
; /* number of window extra bytes
*/
3198 mod_handle_t instance
; /* module instance
*/
3199 int extra_offset
; /* offset to set in extra bytes
*/
3200 data_size_t extra_size
; /* size to set in extra bytes
*/
3201 lparam_t extra_value
; /* value to set in extra bytes
*/
3203 atom_t old_atom
; /* previous class atom
*/
3204 atom_t base_atom
; /* base class atom
*/
3205 mod_handle_t old_instance
; /* previous module instance
*/
3206 lparam_t old_extra_value
; /* old value in extra bytes
*/
3207 unsigned int old_style
; /* previous class style
*/
3208 int old_extra
; /* previous number of class extra bytes
*/
3209 int old_win_extra
; /* previous number of window extra bytes
*/
3211 #define SET_CLASS_ATOM
0x0001
3212 #define SET_CLASS_STYLE
0x0002
3213 #define SET_CLASS_WINEXTRA
0x0004
3214 #define SET_CLASS_INSTANCE
0x0008
3215 #define SET_CLASS_EXTRA
0x0010
3218 /* Open the clipboard
*/
3219 @
REQ(open_clipboard
)
3220 user_handle_t window
; /* clipboard window
*/
3222 user_handle_t owner
; /* current clipboard owner
*/
3226 /* Close the clipboard
*/
3227 @
REQ(close_clipboard
)
3229 user_handle_t viewer
; /* first clipboard viewer
*/
3230 user_handle_t owner
; /* current clipboard owner
*/
3234 /* Empty the clipboard and grab ownership
*/
3235 @
REQ(empty_clipboard
)
3239 /* Add a data format to the clipboard
*/
3240 @
REQ(set_clipboard_data
)
3241 unsigned int format
; /* clipboard format of the data
*/
3242 unsigned int lcid
; /* locale id to use for synthesizing text formats
*/
3243 VARARG(data
,bytes
); /* data contents
*/
3245 unsigned int seqno
; /* sequence number for the set data
*/
3249 /* Fetch a data format from the clipboard
*/
3250 @
REQ(get_clipboard_data
)
3251 unsigned int format
; /* clipboard format of the data
*/
3252 int render
; /* will we try to render it if missing?
*/
3253 int cached
; /* do we already have it in the client
-side cache?
*/
3254 unsigned int seqno
; /* sequence number for the data in the cache
*/
3256 unsigned int from
; /* for synthesized data
, format to generate it from
*/
3257 user_handle_t owner
; /* clipboard owner for delayed
-rendered formats
*/
3258 unsigned int seqno
; /* sequence number for the originally set data
*/
3259 data_size_t total
; /* total data size
*/
3260 VARARG(data
,bytes
); /* data contents
*/
3264 /* Retrieve a list of available formats
*/
3265 @
REQ(get_clipboard_formats
)
3266 unsigned int format
; /* specific format to query
, return all if
0 */
3268 unsigned int count
; /* count of available formats
*/
3269 VARARG(formats
,uints
); /* array of available formats
*/
3273 /* Retrieve the next available format
*/
3274 @
REQ(enum_clipboard_formats
)
3275 unsigned int previous
; /* previous format
, or first if
0 */
3277 unsigned int format
; /* next format
*/
3281 /* Release ownership of the clipboard
*/
3282 @
REQ(release_clipboard
)
3283 user_handle_t owner
; /* clipboard owner to release
*/
3285 user_handle_t viewer
; /* first clipboard viewer
*/
3286 user_handle_t owner
; /* current clipboard owner
*/
3290 /* Get clipboard information
*/
3291 @
REQ(get_clipboard_info
)
3293 user_handle_t window
; /* clipboard window
*/
3294 user_handle_t owner
; /* clipboard owner
*/
3295 user_handle_t viewer
; /* clipboard viewer
*/
3296 unsigned int seqno
; /* current sequence number
*/
3300 /* Set the clipboard viewer window
*/
3301 @
REQ(set_clipboard_viewer
)
3302 user_handle_t viewer
; /* clipboard viewer
*/
3303 user_handle_t previous
; /* if non
-zero
, check that this was the previous viewer
*/
3305 user_handle_t old_viewer
; /* previous clipboard viewer
*/
3306 user_handle_t owner
; /* clipboard owner
*/
3310 /* Add a clipboard listener window
*/
3311 @
REQ(add_clipboard_listener
)
3312 user_handle_t window
; /* clipboard listener window
*/
3316 /* Remove a clipboard listener window
*/
3317 @
REQ(remove_clipboard_listener
)
3318 user_handle_t window
; /* clipboard listener window
*/
3322 /* Open a security token
*/
3324 obj_handle_t handle
; /* handle to the thread or process
*/
3325 unsigned int access
; /* access rights to the new token
*/
3326 unsigned int attributes
;/* object attributes
*/
3327 unsigned int flags
; /* flags (see below
) */
3329 obj_handle_t token
; /* handle to the token
*/
3331 #define OPEN_TOKEN_THREAD
1
3332 #define OPEN_TOKEN_AS_SELF
2
3335 /* Set
/get the global windows
*/
3336 @
REQ(set_global_windows
)
3337 unsigned int flags
; /* flags for fields to
set (see below
) */
3338 user_handle_t shell_window
; /* handle to the new shell window
*/
3339 user_handle_t shell_listview
; /* handle to the new shell listview window
*/
3340 user_handle_t progman_window
; /* handle to the new program manager window
*/
3341 user_handle_t taskman_window
; /* handle to the new task manager window
*/
3343 user_handle_t old_shell_window
; /* handle to the shell window
*/
3344 user_handle_t old_shell_listview
; /* handle to the shell listview window
*/
3345 user_handle_t old_progman_window
; /* handle to the new program manager window
*/
3346 user_handle_t old_taskman_window
; /* handle to the new task manager window
*/
3348 #define SET_GLOBAL_SHELL_WINDOWS
0x01 /* set both main shell and listview windows
*/
3349 #define SET_GLOBAL_PROGMAN_WINDOW
0x02
3350 #define SET_GLOBAL_TASKMAN_WINDOW
0x04
3352 /* Adjust the privileges held by a token
*/
3353 @
REQ(adjust_token_privileges
)
3354 obj_handle_t handle
; /* handle to the token
*/
3355 int disable_all
; /* disable all privileges?
*/
3356 int get_modified_state
; /* get modified privileges?
*/
3357 VARARG(privileges
,LUID_AND_ATTRIBUTES
); /* privileges to enable
/disable
/remove
*/
3359 unsigned int len
; /* total length in bytes required to store token privileges
*/
3360 VARARG(privileges
,LUID_AND_ATTRIBUTES
); /* modified privileges
*/
3363 /* Retrieves the set of privileges held by or available to a token
*/
3364 @
REQ(get_token_privileges
)
3365 obj_handle_t handle
; /* handle to the token
*/
3367 unsigned int len
; /* total length in bytes required to store token privileges
*/
3368 VARARG(privileges
,LUID_AND_ATTRIBUTES
); /* privileges held by or available to a token
*/
3371 /* Check the token has the required privileges
*/
3372 @
REQ(check_token_privileges
)
3373 obj_handle_t handle
; /* handle to the token
*/
3374 int all_required
; /* are all the privileges required for the check to succeed?
*/
3375 VARARG(privileges
,LUID_AND_ATTRIBUTES
); /* privileges to check
*/
3377 int has_privileges
; /* does the token have the required privileges?
*/
3378 VARARG(privileges
,LUID_AND_ATTRIBUTES
); /* privileges held by or available to a token
*/
3381 @
REQ(duplicate_token
)
3382 obj_handle_t handle
; /* handle to the token to duplicate
*/
3383 unsigned int access
; /* access rights to the new token
*/
3384 int primary
; /* is the new token to be a primary one?
*/
3385 int impersonation_level
; /* impersonation level of the new token
*/
3386 VARARG(objattr
,object_attributes
); /* object attributes
*/
3388 obj_handle_t new_handle
; /* duplicated handle
*/
3392 obj_handle_t handle
; /* handle to the token
*/
3393 unsigned int desired_access
; /* desired access to the object
*/
3394 unsigned int mapping_read
; /* mapping from generic read to specific rights
*/
3395 unsigned int mapping_write
; /* mapping from generic write to specific rights
*/
3396 unsigned int mapping_execute
; /* mapping from generic execute to specific rights
*/
3397 unsigned int mapping_all
; /* mapping from generic all to specific rights
*/
3398 VARARG(sd
,security_descriptor
); /* security descriptor to check
*/
3400 unsigned int access_granted
; /* access rights actually granted
*/
3401 unsigned int access_status
; /* was access granted?
*/
3402 unsigned int privileges_len
; /* length needed to store privileges
*/
3403 VARARG(privileges
,LUID_AND_ATTRIBUTES
); /* privileges used during access check
*/
3407 obj_handle_t handle
; /* handle to the token
*/
3408 unsigned int which_sid
; /* which SID to retrieve from the token
*/
3410 data_size_t sid_len
; /* length needed to store sid
*/
3411 VARARG(sid
,SID
); /* the sid specified by which_sid from the token
*/
3414 @
REQ(get_token_groups
)
3415 obj_handle_t handle
; /* handle to the token
*/
3417 data_size_t user_len
; /* length needed to store user
*/
3418 VARARG(user
,token_groups
); /* groups the token
's user belongs to */
3421 @REQ(get_token_default_dacl)
3422 obj_handle_t handle; /* handle to the token */
3424 data_size_t acl_len; /* length needed to store access control list */
3425 VARARG(acl,ACL); /* access control list */
3428 @REQ(set_token_default_dacl)
3429 obj_handle_t handle; /* handle to the token */
3430 VARARG(acl,ACL); /* default dacl to set */
3433 @REQ(set_security_object)
3434 obj_handle_t handle; /* handle to the object */
3435 unsigned int security_info; /* which parts of security descriptor to set */
3436 VARARG(sd,security_descriptor); /* security descriptor to set */
3439 @REQ(get_security_object)
3440 obj_handle_t handle; /* handle to the object */
3441 unsigned int security_info; /* which parts of security descriptor to get */
3443 unsigned int sd_len; /* buffer size needed for sd */
3444 VARARG(sd,security_descriptor); /* retrieved security descriptor */
3451 obj_handle_t handle;
3452 unsigned int access;
3455 /* Return a list of all opened handles */
3456 @REQ(get_system_handles)
3458 unsigned int count; /* number of handles */
3459 VARARG(data,handle_infos); /* array of handle_infos */
3463 /* Create a mailslot */
3464 @REQ(create_mailslot)
3465 unsigned int access; /* wanted access rights */
3466 timeout_t read_timeout;
3467 unsigned int max_msgsize;
3468 VARARG(objattr,object_attributes); /* object attributes */
3470 obj_handle_t handle; /* handle to the mailslot */
3474 /* Set mailslot information */
3475 @REQ(set_mailslot_info)
3476 obj_handle_t handle; /* handle to the mailslot */
3477 timeout_t read_timeout;
3480 timeout_t read_timeout;
3481 unsigned int max_msgsize;
3483 #define MAILSLOT_SET_READ_TIMEOUT 1
3486 /* Create a directory object */
3487 @REQ(create_directory)
3488 unsigned int access; /* access flags */
3489 VARARG(objattr,object_attributes); /* object attributes */
3491 obj_handle_t handle; /* handle to the directory */
3495 /* Open a directory object */
3496 @REQ(open_directory)
3497 unsigned int access; /* access flags */
3498 unsigned int attributes; /* object attributes */
3499 obj_handle_t rootdir; /* root directory */
3500 VARARG(directory_name,unicode_str); /* Directory name */
3502 obj_handle_t handle; /* handle to the directory */
3506 /* Get a directory entry by index */
3507 @REQ(get_directory_entry)
3508 obj_handle_t handle; /* handle to the directory */
3509 unsigned int index; /* entry index */
3511 data_size_t name_len; /* length of the entry name in bytes */
3512 VARARG(name,unicode_str,name_len); /* entry name */
3513 VARARG(type,unicode_str); /* entry type */
3517 /* Create a symbolic link object */
3518 @REQ(create_symlink)
3519 unsigned int access; /* access flags */
3520 VARARG(objattr,object_attributes); /* object attributes */
3521 VARARG(target_name,unicode_str); /* target name */
3523 obj_handle_t handle; /* handle to the symlink */
3527 /* Open a symbolic link object */
3529 unsigned int access; /* access flags */
3530 unsigned int attributes; /* object attributes */
3531 obj_handle_t rootdir; /* root directory */
3532 VARARG(name,unicode_str); /* symlink name */
3534 obj_handle_t handle; /* handle to the symlink */
3538 /* Query a symbolic link object */
3540 obj_handle_t handle; /* handle to the symlink */
3542 data_size_t total; /* total needed size for name */
3543 VARARG(target_name,unicode_str); /* target name */
3547 /* Query basic object information */
3548 @REQ(get_object_info)
3549 obj_handle_t handle; /* handle to the object */
3551 unsigned int access; /* granted access mask */
3552 unsigned int ref_count; /* object ref count */
3553 unsigned int handle_count; /* object handle count */
3554 data_size_t total; /* total needed size for name */
3555 VARARG(name,unicode_str); /* object name */
3559 /* Query object type name information */
3560 @REQ(get_object_type)
3561 obj_handle_t handle; /* handle to the object */
3563 data_size_t total; /* needed size for type name */
3564 VARARG(type,unicode_str); /* type name */
3568 /* Unlink a named object */
3570 obj_handle_t handle; /* handle to the object */
3574 /* Query the impersonation level of an impersonation token */
3575 @REQ(get_token_impersonation_level)
3576 obj_handle_t handle; /* handle to the object */
3578 int impersonation_level; /* impersonation level of the impersonation token */
3581 /* Allocate a locally-unique identifier */
3582 @REQ(allocate_locally_unique_id)
3588 /* Create a device manager */
3589 @REQ(create_device_manager)
3590 unsigned int access; /* wanted access rights */
3591 unsigned int attributes; /* object attributes */
3593 obj_handle_t handle; /* handle to the device */
3597 /* Create a device */
3599 unsigned int access; /* wanted access rights */
3600 unsigned int attributes; /* object attributes */
3601 obj_handle_t rootdir; /* root directory */
3602 client_ptr_t user_ptr; /* opaque ptr for use by client */
3603 obj_handle_t manager; /* device manager */
3604 VARARG(name,unicode_str); /* object name */
3606 obj_handle_t handle; /* handle to the device */
3610 /* Delete a device */
3612 obj_handle_t handle; /* handle to the device */
3616 /* Retrieve the next pending device irp request */
3617 @REQ(get_next_device_request)
3618 obj_handle_t manager; /* handle to the device manager */
3619 obj_handle_t prev; /* handle to the previous irp */
3620 unsigned int status; /* status of the previous irp */
3622 irp_params_t params; /* irp parameters */
3623 obj_handle_t next; /* handle to the next irp */
3624 process_id_t client_pid; /* pid of process calling irp */
3625 thread_id_t client_tid; /* tid of thread calling irp */
3626 data_size_t in_size; /* total needed input size */
3627 data_size_t out_size; /* needed output size */
3628 VARARG(next_data,bytes); /* input data of the next irp */
3632 /* Get kernel pointer from server object */
3633 @REQ(get_kernel_object_ptr)
3634 obj_handle_t manager; /* handle to the device manager */
3635 obj_handle_t handle; /* object handle */
3637 client_ptr_t user_ptr; /* kernel object pointer */
3641 /* Associate kernel pointer with server object */
3642 @REQ(set_kernel_object_ptr)
3643 obj_handle_t manager; /* handle to the device manager */
3644 obj_handle_t handle; /* object handle */
3645 client_ptr_t user_ptr; /* kernel object pointer */
3649 /* Grab server object reference from kernel object pointer */
3650 @REQ(grab_kernel_object)
3651 obj_handle_t manager; /* handle to the device manager */
3652 client_ptr_t user_ptr; /* kernel object pointer */
3656 /* Release server object reference from kernel object pointer */
3657 @REQ(release_kernel_object)
3658 obj_handle_t manager; /* handle to the device manager */
3659 client_ptr_t user_ptr; /* kernel object pointer */
3663 /* Get handle from kernel object pointer */
3664 @REQ(get_kernel_object_handle)
3665 obj_handle_t manager; /* handle to the device manager */
3666 client_ptr_t user_ptr; /* kernel object pointer */
3667 unsigned int access; /* wanted access rights */
3669 obj_handle_t handle; /* kernel object handle */
3673 /* Make the current process a system process */
3674 @REQ(make_process_system)
3676 obj_handle_t event; /* event signaled when all user processes have exited */
3680 /* Get detailed fixed-size information about a token */
3681 @REQ(get_token_statistics)
3682 obj_handle_t handle; /* handle to the object */
3684 luid_t token_id; /* locally-unique identifier of the token */
3685 luid_t modified_id; /* locally-unique identifier of the modified version of the token */
3686 int primary; /* is the token primary or impersonation? */
3687 int impersonation_level; /* level of impersonation */
3688 int group_count; /* the number of groups the token is a member of */
3689 int privilege_count; /* the number of privileges the token has */
3693 /* Create I/O completion port */
3694 @REQ(create_completion)
3695 unsigned int access; /* desired access to a port */
3696 unsigned int concurrent; /* max number of concurrent active threads */
3697 VARARG(objattr,object_attributes); /* object attributes */
3699 obj_handle_t handle; /* port handle */
3703 /* Open I/O completion port */
3704 @REQ(open_completion)
3705 unsigned int access; /* desired access to a port */
3706 unsigned int attributes; /* object attributes */
3707 obj_handle_t rootdir; /* root directory */
3708 VARARG(filename,unicode_str); /* port name */
3710 obj_handle_t handle; /* port handle */
3714 /* add completion to completion port */
3715 @REQ(add_completion)
3716 obj_handle_t handle; /* port handle */
3717 apc_param_t ckey; /* completion key */
3718 apc_param_t cvalue; /* completion value */
3719 apc_param_t information; /* IO_STATUS_BLOCK Information */
3720 unsigned int status; /* completion result */
3724 /* get completion from completion port queue */
3725 @REQ(remove_completion)
3726 obj_handle_t handle; /* port handle */
3728 apc_param_t ckey; /* completion key */
3729 apc_param_t cvalue; /* completion value */
3730 apc_param_t information; /* IO_STATUS_BLOCK Information */
3731 unsigned int status; /* completion result */
3735 /* get completion queue depth */
3736 @REQ(query_completion)
3737 obj_handle_t handle; /* port handle */
3739 unsigned int depth; /* completion queue depth */
3743 /* associate object with completion port */
3744 @REQ(set_completion_info)
3745 obj_handle_t handle; /* object handle */
3746 apc_param_t ckey; /* completion key */
3747 obj_handle_t chandle; /* port handle */
3751 /* check for associated completion and push msg */
3752 @REQ(add_fd_completion)
3753 obj_handle_t handle; /* async' object
*/
3754 apc_param_t cvalue
; /* completion value
*/
3755 apc_param_t information
; /* IO_STATUS_BLOCK Information
*/
3756 unsigned int status
; /* completion status
*/
3757 int async
; /* completion is an async result
*/
3761 /* set fd completion information
*/
3762 @
REQ(set_fd_completion_mode
)
3763 obj_handle_t handle
; /* handle to a file or directory
*/
3764 unsigned int flags
; /* completion notification flags
*/
3768 /* set fd disposition information
*/
3769 @
REQ(set_fd_disp_info
)
3770 obj_handle_t handle
; /* handle to a file or directory
*/
3771 int unlink
; /* whether to unlink file on close
*/
3775 /* set fd name information
*/
3776 @
REQ(set_fd_name_info
)
3777 obj_handle_t handle
; /* handle to a file or directory
*/
3778 obj_handle_t rootdir
; /* root directory
*/
3779 int link
; /* link instead of renaming
*/
3780 VARARG(filename
,string
); /* new file name
*/
3784 /* Retrieve layered info for a window
*/
3785 @
REQ(get_window_layered_info
)
3786 user_handle_t handle
; /* handle to the window
*/
3788 unsigned int color_key
; /* color key
*/
3789 unsigned int alpha
; /* alpha (0.
.255) */
3790 unsigned int flags
; /* LWA_
* flags
*/
3794 /* Set layered info for a window
*/
3795 @
REQ(set_window_layered_info
)
3796 user_handle_t handle
; /* handle to the window
*/
3797 unsigned int color_key
; /* color key
*/
3798 unsigned int alpha
; /* alpha (0.
.255) */
3799 unsigned int flags
; /* LWA_
* flags
*/
3803 /* Allocate an arbitrary user handle
*/
3804 @
REQ(alloc_user_handle
)
3806 user_handle_t handle
; /* allocated handle
*/
3810 /* Free an arbitrary user handle
*/
3811 @
REQ(free_user_handle
)
3812 user_handle_t handle
; /* handle to free
*/
3816 /* Set
/get the current cursor
*/
3818 unsigned int flags
; /* flags for fields to
set (see below
) */
3819 user_handle_t handle
; /* handle to the cursor
*/
3820 int show_count
; /* show count increment
/decrement
*/
3821 int x
; /* cursor position
*/
3823 rectangle_t clip
; /* cursor clip rectangle
*/
3824 unsigned int clip_msg
; /* message to post on cursor clip changes
*/
3826 user_handle_t prev_handle
; /* previous handle
*/
3827 int prev_count
; /* previous show count
*/
3828 int prev_x
; /* previous position
*/
3830 int new_x
; /* new position
*/
3832 rectangle_t new_clip
; /* new clip rectangle
*/
3833 unsigned int last_change
; /* time of last position change
*/
3835 #define SET_CURSOR_HANDLE
0x01
3836 #define SET_CURSOR_COUNT
0x02
3837 #define SET_CURSOR_POS
0x04
3838 #define SET_CURSOR_CLIP
0x08
3839 #define SET_CURSOR_NOCLIP
0x10
3842 /* Modify the list of registered rawinput devices
*/
3843 @
REQ(update_rawinput_devices
)
3844 VARARG(devices
,rawinput_devices
);
3848 /* Retrieve the suspended context of a thread
*/
3849 @
REQ(get_suspend_context
)
3851 VARARG(context
,context
); /* thread context
*/
3855 /* Store the suspend context of a thread
*/
3856 @
REQ(set_suspend_context
)
3857 VARARG(context
,context
); /* thread context
*/
3861 /* Create a new job object
*/
3863 unsigned int access
; /* wanted access rights
*/
3864 VARARG(objattr
,object_attributes
); /* object attributes
*/
3866 obj_handle_t handle
; /* handle to the job
*/
3870 /* Open a job object
*/
3872 unsigned int access
; /* wanted access rights
*/
3873 unsigned int attributes
; /* object attributes
*/
3874 obj_handle_t rootdir
; /* root directory
*/
3875 VARARG(name
,unicode_str
); /* object name
*/
3877 obj_handle_t handle
; /* handle to the job
*/
3881 /* Assign a job object to a process
*/
3883 obj_handle_t job
; /* handle to the job
*/
3884 obj_handle_t process
; /* handle to the process
*/
3888 /* Check if a process is associated with a job
*/
3889 @
REQ(process_in_job
)
3890 obj_handle_t job
; /* handle to the job
*/
3891 obj_handle_t process
; /* handle to the process
*/
3895 /* Set limit flags on a job
*/
3896 @
REQ(set_job_limits
)
3897 obj_handle_t handle
; /* handle to the job
*/
3898 unsigned int limit_flags
; /* new limit flags
*/
3902 /* Set new completion port for a job
*/
3903 @
REQ(set_job_completion_port
)
3904 obj_handle_t job
; /* handle to the job
*/
3905 obj_handle_t port
; /* handle to the completion port
*/
3906 client_ptr_t key
; /* key to send with completion messages
*/
3910 /* Terminate all processes associated with the job
*/
3912 obj_handle_t handle
; /* handle to the job
*/
3913 int status
; /* process exit code
*/