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 } fp
; /* selected by SERVER_CTX_FLOATING_POINT
*/
177 struct
{ unsigned int dr0
, dr1
, dr2
, dr3
, dr6
, dr7
; } i386_regs
;
178 struct
{ unsigned __int64 dr0
, dr1
, dr2
, dr3
, dr6
, dr7
; } x86_64_regs
;
179 struct
{ unsigned int dr
[8]; } powerpc_regs
;
180 } debug
; /* selected by SERVER_CTX_DEBUG_REGISTERS
*/
183 unsigned char i386_regs
[512];
184 } ext
; /* selected by SERVER_CTX_EXTENDED_REGISTERS
*/
187 #define SERVER_CTX_CONTROL
0x01
188 #define SERVER_CTX_INTEGER
0x02
189 #define SERVER_CTX_SEGMENTS
0x04
190 #define SERVER_CTX_FLOATING_POINT
0x08
191 #define SERVER_CTX_DEBUG_REGISTERS
0x10
192 #define SERVER_CTX_EXTENDED_REGISTERS
0x20
194 /* structure used in sending an fd from client to server
*/
197 thread_id_t tid
; /* thread id
*/
198 int fd
; /* file descriptor on client
-side
*/
201 /* structure sent by the server on the wait fifo
*/
204 client_ptr_t cookie
; /* magic cookie that was passed in select_request
*/
205 int signaled
; /* wait result
*/
209 /* NT
-style timeout
, in
100ns units
, negative means relative timeout
*/
210 typedef __int64 timeout_t
;
211 #define
TIMEOUT_INFINITE (((timeout_t
)0x7fffffff) << 32 |
0xffffffff)
213 /* structure for process startup info
*/
216 unsigned int debug_flags
;
217 unsigned int console_flags
;
218 obj_handle_t console
;
220 obj_handle_t hstdout
;
221 obj_handle_t hstderr
;
228 unsigned int attribute
;
231 data_size_t curdir_len
;
232 data_size_t dllpath_len
;
233 data_size_t imagepath_len
;
234 data_size_t cmdline_len
;
235 data_size_t title_len
;
236 data_size_t desktop_len
;
237 data_size_t shellinfo_len
;
238 data_size_t runtime_len
;
239 /* VARARG(curdir
,unicode_str
,curdir_len
); */
240 /* VARARG(dllpath
,unicode_str
,dllpath_len
); */
241 /* VARARG(imagepath
,unicode_str
,imagepath_len
); */
242 /* VARARG(cmdline
,unicode_str
,cmdline_len
); */
243 /* VARARG(title
,unicode_str
,title_len
); */
244 /* VARARG(desktop
,unicode_str
,desktop_len
); */
245 /* VARARG(shellinfo
,unicode_str
,shellinfo_len
); */
246 /* VARARG(runtime
,unicode_str
,runtime_len
); */
249 /* structure returned in the list of window properties
*/
252 atom_t atom
; /* property atom
*/
253 int string
; /* was atom a string originally?
*/
254 lparam_t data
; /* data stored in property
*/
257 /* structure to specify window rectangles
*/
266 /* structure for parameters of async I
/O calls
*/
269 obj_handle_t handle
; /* object to perform I
/O on
*/
270 obj_handle_t event
; /* event to signal when done
*/
271 client_ptr_t callback
; /* client
-side callback to call upon end of async
*/
272 client_ptr_t iosb
; /* I
/O status block in client addr space
*/
273 client_ptr_t arg
; /* opaque user data to pass to callback
*/
274 apc_param_t cvalue
; /* completion value to use for completion events
*/
277 /* structures for extra message data
*/
279 struct hardware_msg_data
281 lparam_t info
; /* extra info
*/
282 unsigned int hw_id
; /* unique id
*/
283 unsigned int flags
; /* hook flags
*/
289 int type
; /* RIM_TYPEKEYBOARD
*/
290 unsigned int message
; /* message generated by this rawinput event
*/
291 unsigned short vkey
; /* virtual key code
*/
292 unsigned short scan
; /* scan code
*/
296 int type
; /* RIM_TYPEMOUSE
*/
297 int x
; /* x coordinate
*/
298 int y
; /* y coordinate
*/
299 unsigned int data
; /* mouse data
*/
304 struct callback_msg_data
306 client_ptr_t callback
; /* callback function
*/
307 lparam_t data
; /* user data for callback
*/
308 lparam_t result
; /* message result
*/
311 struct winevent_msg_data
313 user_handle_t hook
; /* hook handle
*/
314 thread_id_t tid
; /* thread id
*/
315 client_ptr_t hook_proc
; /* hook proc address
*/
316 /* followed by module name if any
*/
324 int type
; /* INPUT_KEYBOARD
*/
325 unsigned short vkey
; /* virtual key code
*/
326 unsigned short scan
; /* scan code
*/
327 unsigned int flags
; /* event flags
*/
328 unsigned int time
; /* event time
*/
329 lparam_t info
; /* extra info
*/
333 int type
; /* INPUT_MOUSE
*/
334 int x
; /* coordinates
*/
336 unsigned int data
; /* mouse data
*/
337 unsigned int flags
; /* event flags
*/
338 unsigned int time
; /* event time
*/
339 lparam_t info
; /* extra info
*/
343 int type
; /* INPUT_HARDWARE
*/
344 unsigned int msg
; /* message code
*/
345 lparam_t lparam
; /* message param
*/
351 unsigned char bytes
[1]; /* raw data for sent messages
*/
352 struct hardware_msg_data hardware
;
353 struct callback_msg_data callback
;
354 struct winevent_msg_data winevent
;
357 /* structure for console char
/attribute info
*/
364 /* structure returned in filesystem events
*/
365 struct filesystem_event
374 unsigned int low_part
;
378 #define MAX_ACL_LEN
65535
380 struct security_descriptor
382 unsigned int control
; /* SE_ flags
*/
383 data_size_t owner_len
;
384 data_size_t group_len
;
385 data_size_t sacl_len
;
386 data_size_t dacl_len
;
387 /* VARARG(owner
,SID
); */
388 /* VARARG(group
,SID
); */
389 /* VARARG(sacl
,ACL
); */
390 /* VARARG(dacl
,ACL
); */
393 struct object_attributes
395 obj_handle_t rootdir
; /* root directory
*/
396 data_size_t sd_len
; /* length of security_descriptor data. may be
0 */
397 data_size_t name_len
; /* length of the name string. may be
0 */
398 /* VARARG(sd
,security_descriptor
); */
399 /* VARARG(name
,unicode_str
); */
405 /* unsigned int attributes
[count
]; */
406 /* VARARG(sids
,SID
); */
414 SELECT_SIGNAL_AND_WAIT
,
415 SELECT_KEYED_EVENT_WAIT
,
416 SELECT_KEYED_EVENT_RELEASE
424 enum select_op op
; /* SELECT_WAIT or SELECT_WAIT_ALL
*/
425 obj_handle_t handles
[MAXIMUM_WAIT_OBJECTS
];
429 enum select_op op
; /* SELECT_SIGNAL_AND_WAIT
*/
431 obj_handle_t signal
; /* must be last in the structure so we can remove it on retries
*/
435 enum select_op op
; /* SELECT_KEYED_EVENT_WAIT or SELECT_KEYED_EVENT_RELEASE
*/
464 enum apc_type type
; /* APC_USER
*/
466 client_ptr_t func
; /* void (__stdcall
*func
)(ULONG_PTR
,ULONG_PTR
,ULONG_PTR
); */
467 apc_param_t args
[3]; /* arguments for user function
*/
471 enum apc_type type
; /* APC_TIMER
*/
473 client_ptr_t func
; /* void (__stdcall
*func
)(void
*, unsigned int
, unsigned int
); */
474 timeout_t time
; /* absolute time of expiration
*/
475 client_ptr_t arg
; /* user argument
*/
479 enum apc_type type
; /* APC_ASYNC_IO
*/
480 unsigned int status
; /* I
/O status
*/
481 client_ptr_t func
; /* unsigned
int (*func)(void*, void*, unsigned int, void**, void**); */
482 client_ptr_t user
; /* user pointer
*/
483 client_ptr_t sb
; /* status block
*/
487 enum apc_type type
; /* APC_VIRTUAL_ALLOC
*/
488 unsigned int op_type
; /* type of operation
*/
489 client_ptr_t addr
; /* requested address
*/
490 mem_size_t size
; /* allocation size
*/
491 unsigned int zero_bits
; /* allocation alignment
*/
492 unsigned int prot
; /* memory protection flags
*/
496 enum apc_type type
; /* APC_VIRTUAL_FREE
*/
497 unsigned int op_type
; /* type of operation
*/
498 client_ptr_t addr
; /* requested address
*/
499 mem_size_t size
; /* allocation size
*/
503 enum apc_type type
; /* APC_VIRTUAL_QUERY
*/
505 client_ptr_t addr
; /* requested address
*/
509 enum apc_type type
; /* APC_VIRTUAL_PROTECT
*/
510 unsigned int prot
; /* new protection flags
*/
511 client_ptr_t addr
; /* requested address
*/
512 mem_size_t size
; /* requested size
*/
516 enum apc_type type
; /* APC_VIRTUAL_FLUSH
*/
518 client_ptr_t addr
; /* requested address
*/
519 mem_size_t size
; /* requested size
*/
523 enum apc_type type
; /* APC_VIRTUAL_LOCK
*/
525 client_ptr_t addr
; /* requested address
*/
526 mem_size_t size
; /* requested size
*/
530 enum apc_type type
; /* APC_VIRTUAL_UNLOCK
*/
532 client_ptr_t addr
; /* requested address
*/
533 mem_size_t size
; /* requested size
*/
537 enum apc_type type
; /* APC_MAP_VIEW
*/
538 obj_handle_t handle
; /* mapping handle
*/
539 client_ptr_t addr
; /* requested address
*/
540 mem_size_t size
; /* allocation size
*/
541 file_pos_t offset
; /* file offset
*/
542 unsigned int alloc_type
;/* allocation type
*/
543 unsigned short zero_bits
; /* allocation alignment
*/
544 unsigned short prot
; /* memory protection flags
*/
548 enum apc_type type
; /* APC_UNMAP_VIEW
*/
550 client_ptr_t addr
; /* view address
*/
554 enum apc_type type
; /* APC_CREATE_THREAD
*/
555 int suspend
; /* suspended thread?
*/
556 client_ptr_t func
; /* void (__stdcall
*func
)(void*)
; start function
*/
557 client_ptr_t arg
; /* argument for start function
*/
558 mem_size_t reserve
; /* reserve size for thread stack
*/
559 mem_size_t commit
; /* commit size for thread stack
*/
568 enum apc_type type
; /* APC_ASYNC_IO
*/
569 unsigned int status
; /* new status of async operation
*/
570 client_ptr_t apc
; /* user APC to call
*/
571 client_ptr_t arg
; /* user APC argument
*/
572 unsigned int total
; /* bytes transferred
*/
576 enum apc_type type
; /* APC_VIRTUAL_ALLOC
*/
577 unsigned int status
; /* status returned by call
*/
578 client_ptr_t addr
; /* resulting address
*/
579 mem_size_t size
; /* resulting size
*/
583 enum apc_type type
; /* APC_VIRTUAL_FREE
*/
584 unsigned int status
; /* status returned by call
*/
585 client_ptr_t addr
; /* resulting address
*/
586 mem_size_t size
; /* resulting size
*/
590 enum apc_type type
; /* APC_VIRTUAL_QUERY
*/
591 unsigned int status
; /* status returned by call
*/
592 client_ptr_t base
; /* resulting base address
*/
593 client_ptr_t alloc_base
;/* resulting allocation base
*/
594 mem_size_t size
; /* resulting region size
*/
595 unsigned short state
; /* resulting region state
*/
596 unsigned short prot
; /* resulting region protection
*/
597 unsigned short alloc_prot
;/* resulting allocation protection
*/
598 unsigned short alloc_type
;/* resulting region allocation type
*/
602 enum apc_type type
; /* APC_VIRTUAL_PROTECT
*/
603 unsigned int status
; /* status returned by call
*/
604 client_ptr_t addr
; /* resulting address
*/
605 mem_size_t size
; /* resulting size
*/
606 unsigned int prot
; /* old protection flags
*/
610 enum apc_type type
; /* APC_VIRTUAL_FLUSH
*/
611 unsigned int status
; /* status returned by call
*/
612 client_ptr_t addr
; /* resulting address
*/
613 mem_size_t size
; /* resulting size
*/
617 enum apc_type type
; /* APC_VIRTUAL_LOCK
*/
618 unsigned int status
; /* status returned by call
*/
619 client_ptr_t addr
; /* resulting address
*/
620 mem_size_t size
; /* resulting size
*/
624 enum apc_type type
; /* APC_VIRTUAL_UNLOCK
*/
625 unsigned int status
; /* status returned by call
*/
626 client_ptr_t addr
; /* resulting address
*/
627 mem_size_t size
; /* resulting size
*/
631 enum apc_type type
; /* APC_MAP_VIEW
*/
632 unsigned int status
; /* status returned by call
*/
633 client_ptr_t addr
; /* resulting address
*/
634 mem_size_t size
; /* resulting size
*/
638 enum apc_type type
; /* APC_MAP_VIEW
*/
639 unsigned int status
; /* status returned by call
*/
643 enum apc_type type
; /* APC_CREATE_THREAD
*/
644 unsigned int status
; /* status returned by call
*/
645 thread_id_t tid
; /* thread id
*/
646 obj_handle_t handle
; /* handle to new thread
*/
652 unsigned int major
; /* irp major function
*/
655 unsigned int major
; /* IRP_MJ_CREATE
*/
656 unsigned int access
; /* access rights
*/
657 unsigned int sharing
; /* sharing flags
*/
658 unsigned int options
; /* file options
*/
659 client_ptr_t device
; /* opaque ptr for the device
*/
663 unsigned int major
; /* IRP_MJ_READ
*/
664 unsigned int key
; /* driver key
*/
665 client_ptr_t device
; /* opaque ptr for the device
*/
666 file_pos_t pos
; /* file position
*/
670 unsigned int major
; /* IRP_MJ_WRITE
*/
671 unsigned int key
; /* driver key
*/
672 client_ptr_t device
; /* opaque ptr for the device
*/
673 file_pos_t pos
; /* file position
*/
677 unsigned int major
; /* IRP_MJ_FLUSH_BUFFERS
*/
679 client_ptr_t device
; /* opaque ptr for the device
*/
683 unsigned int major
; /* IRP_MJ_DEVICE_CONTROL
*/
684 ioctl_code_t code
; /* ioctl code
*/
685 client_ptr_t device
; /* opaque ptr for the device
*/
689 struct rawinput_device
691 unsigned short usage_page
;
692 unsigned short usage
;
694 user_handle_t target
;
697 /****************************************************************/
698 /* Request declarations
*/
700 /* Create a new process from the context of the parent
*/
702 int inherit_all
; /* inherit all handles from parent
*/
703 unsigned int create_flags
; /* creation flags
*/
704 int socket_fd
; /* file descriptor for process socket
*/
705 obj_handle_t exe_file
; /* file handle for main exe
*/
706 unsigned int process_access
; /* access rights for process object
*/
707 unsigned int process_attr
; /* attributes for process object
*/
708 unsigned int thread_access
; /* access rights for thread object
*/
709 unsigned int thread_attr
; /* attributes for thread object
*/
710 cpu_type_t cpu
; /* CPU that the new process will use
*/
711 data_size_t info_size
; /* size of startup info
*/
712 VARARG(info
,startup_info
,info_size
); /* startup information
*/
713 VARARG(env
,unicode_str
); /* environment for new process
*/
715 obj_handle_t info
; /* new process info handle
*/
716 process_id_t pid
; /* process id
*/
717 obj_handle_t phandle
; /* process
handle (in the current process
) */
718 thread_id_t tid
; /* thread id
*/
719 obj_handle_t thandle
; /* thread
handle (in the current process
) */
723 /* Retrieve information about a newly started process
*/
724 @
REQ(get_new_process_info
)
725 obj_handle_t info
; /* info handle returned from new_process_request
*/
727 int success
; /* did the process start successfully?
*/
728 int exit_code
; /* process exit code if failed
*/
732 /* Create a new thread from the context of the parent
*/
734 unsigned int access
; /* wanted access rights
*/
735 unsigned int attributes
; /* object attributes
*/
736 int suspend
; /* new thread should be suspended on creation
*/
737 int request_fd
; /* fd for request pipe
*/
739 thread_id_t tid
; /* thread id
*/
740 obj_handle_t handle
; /* thread
handle (in the current process
) */
744 /* Retrieve the new process startup info
*/
745 @
REQ(get_startup_info
)
747 obj_handle_t exe_file
; /* file handle for main exe
*/
748 data_size_t info_size
; /* size of startup info
*/
749 VARARG(info
,startup_info
,info_size
); /* startup information
*/
750 VARARG(env
,unicode_str
); /* environment
*/
754 /* Signal the end of the process initialization
*/
755 @
REQ(init_process_done
)
756 int gui
; /* is it a GUI process?
*/
757 mod_handle_t module
; /* main module base address
*/
758 client_ptr_t ldt_copy
; /* address of LDT
copy (in thread address space
) */
759 client_ptr_t entry
; /* process entry point
*/
763 /* Initialize a thread
; called from the child after
fork()/clone() */
765 int unix_pid
; /* Unix pid of new thread
*/
766 int unix_tid
; /* Unix tid of new thread
*/
767 int debug_level
; /* new debug level
*/
768 client_ptr_t teb
; /* TEB of new
thread (in thread address space
) */
769 client_ptr_t entry
; /* entry point or PEB if initial
thread (in thread address space
) */
770 int reply_fd
; /* fd for reply pipe
*/
771 int wait_fd
; /* fd for blocking calls pipe
*/
772 cpu_type_t cpu
; /* CPU that this thread is running on
*/
774 process_id_t pid
; /* process id of the new thread
's process */
775 thread_id_t tid; /* thread id of the new thread */
776 timeout_t server_start; /* server start time */
777 data_size_t info_size; /* total size of startup info */
778 int version; /* protocol version */
779 unsigned int all_cpus; /* bitset of supported CPUs */
783 /* Terminate a process */
784 @REQ(terminate_process)
785 obj_handle_t handle; /* process handle to terminate */
786 int exit_code; /* process exit code */
788 int self; /* suicide? */
792 /* Terminate a thread */
793 @REQ(terminate_thread)
794 obj_handle_t handle; /* thread handle to terminate */
795 int exit_code; /* thread exit code */
797 int self; /* suicide? */
798 int last; /* last thread in this process? */
802 /* Retrieve information about a process */
803 @REQ(get_process_info)
804 obj_handle_t handle; /* process handle */
806 process_id_t pid; /* server process id */
807 process_id_t ppid; /* server process id of parent */
808 affinity_t affinity; /* process affinity mask */
809 client_ptr_t peb; /* PEB address in process address space */
810 timeout_t start_time; /* process start time */
811 timeout_t end_time; /* process end time */
812 int exit_code; /* process exit code */
813 int priority; /* priority class */
814 cpu_type_t cpu; /* CPU that this process is running on */
815 int debugger_present; /* process is being debugged */
819 /* Set a process information */
820 @REQ(set_process_info)
821 obj_handle_t handle; /* process handle */
822 int mask; /* setting mask (see below) */
823 int priority; /* priority class */
824 affinity_t affinity; /* affinity mask */
826 #define SET_PROCESS_INFO_PRIORITY 0x01
827 #define SET_PROCESS_INFO_AFFINITY 0x02
830 /* Retrieve information about a thread */
831 @REQ(get_thread_info)
832 obj_handle_t handle; /* thread handle */
833 thread_id_t tid_in; /* thread id (optional) */
835 process_id_t pid; /* server process id */
836 thread_id_t tid; /* server thread id */
837 client_ptr_t teb; /* thread teb pointer */
838 affinity_t affinity; /* thread affinity mask */
839 timeout_t creation_time; /* thread creation time */
840 timeout_t exit_time; /* thread exit time */
841 int exit_code; /* thread exit code */
842 int priority; /* thread priority level */
843 int last; /* last thread in process */
847 /* Set a thread information */
848 @REQ(set_thread_info)
849 obj_handle_t handle; /* thread handle */
850 int mask; /* setting mask (see below) */
851 int priority; /* priority class */
852 affinity_t affinity; /* affinity mask */
853 obj_handle_t token; /* impersonation token */
855 #define SET_THREAD_INFO_PRIORITY 0x01
856 #define SET_THREAD_INFO_AFFINITY 0x02
857 #define SET_THREAD_INFO_TOKEN 0x04
860 /* Retrieve information about a module */
862 obj_handle_t handle; /* process handle */
863 mod_handle_t base_address; /* base address of module */
865 client_ptr_t entry_point;
866 data_size_t size; /* module size */
867 data_size_t filename_len; /* buffer len in bytes required to store filename */
868 VARARG(filename,unicode_str); /* file name of module */
872 /* Suspend a thread */
874 obj_handle_t handle; /* thread handle */
876 int count; /* new suspend count */
880 /* Resume a thread */
882 obj_handle_t handle; /* thread handle */
884 int count; /* new suspend count */
888 /* Notify the server that a dll has been loaded */
890 obj_handle_t mapping; /* file mapping handle */
891 mod_handle_t base; /* base address */
892 client_ptr_t name; /* ptr to ptr to name (in process addr space) */
893 data_size_t size; /* dll size */
894 int dbg_offset; /* debug info offset */
895 int dbg_size; /* debug info size */
896 VARARG(filename,unicode_str); /* file name of dll */
900 /* Notify the server that a dll is being unloaded */
902 mod_handle_t base; /* base address */
906 /* Queue an APC for a thread or process */
908 obj_handle_t handle; /* thread or process handle */
909 apc_call_t call; /* call arguments */
911 obj_handle_t handle; /* APC handle */
912 int self; /* run APC in caller itself? */
916 /* Get the result of an APC call */
918 obj_handle_t handle; /* handle to the APC */
920 apc_result_t result; /* result of the APC */
924 /* Close a handle for the current process */
926 obj_handle_t handle; /* handle to close */
930 /* Set a handle information */
931 @REQ(set_handle_info)
932 obj_handle_t handle; /* handle we are interested in */
933 int flags; /* new handle flags */
934 int mask; /* mask for flags to set */
936 int old_flags; /* old flag value */
940 /* Duplicate a handle */
942 obj_handle_t src_process; /* src process handle */
943 obj_handle_t src_handle; /* src handle to duplicate */
944 obj_handle_t dst_process; /* dst process handle */
945 unsigned int access; /* wanted access rights */
946 unsigned int attributes; /* object attributes */
947 unsigned int options; /* duplicate options (see below) */
949 obj_handle_t handle; /* duplicated handle in dst process */
950 int self; /* is the source the current process? */
951 int closed; /* whether the source handle has been closed */
953 #define DUP_HANDLE_CLOSE_SOURCE DUPLICATE_CLOSE_SOURCE
954 #define DUP_HANDLE_SAME_ACCESS DUPLICATE_SAME_ACCESS
955 #define DUP_HANDLE_MAKE_GLOBAL 0x80000000 /* Not a Windows flag */
958 /* Open a handle to a process */
960 process_id_t pid; /* process id to open */
961 unsigned int access; /* wanted access rights */
962 unsigned int attributes; /* object attributes */
964 obj_handle_t handle; /* handle to the process */
968 /* Open a handle to a thread */
970 thread_id_t tid; /* thread id to open */
971 unsigned int access; /* wanted access rights */
972 unsigned int attributes; /* object attributes */
974 obj_handle_t handle; /* handle to the thread */
978 /* Wait for handles */
980 int flags; /* wait flags (see below) */
981 client_ptr_t cookie; /* magic cookie to return to client */
982 timeout_t timeout; /* timeout */
983 obj_handle_t prev_apc; /* handle to previous APC */
984 VARARG(result,apc_result); /* result of previous APC */
985 VARARG(data,select_op); /* operation-specific data */
987 timeout_t timeout; /* timeout converted to absolute */
988 apc_call_t call; /* APC call arguments */
989 obj_handle_t apc_handle; /* handle to next APC */
991 #define SELECT_ALERTABLE 1
992 #define SELECT_INTERRUPTIBLE 2
995 /* Create an event */
997 unsigned int access; /* wanted access rights */
998 unsigned int attributes; /* object attributes */
999 int manual_reset; /* manual reset event */
1000 int initial_state; /* initial state of the event */
1001 VARARG(objattr,object_attributes); /* object attributes */
1003 obj_handle_t handle; /* handle to the event */
1006 /* Event operation */
1008 obj_handle_t handle; /* handle to event */
1009 int op; /* event operation (see below) */
1011 enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT };
1014 obj_handle_t handle; /* handle to event */
1016 int manual_reset; /* manual reset event */
1017 int state; /* current state of the event */
1022 unsigned int access; /* wanted access rights */
1023 unsigned int attributes; /* object attributes */
1024 obj_handle_t rootdir; /* root directory */
1025 VARARG(name,unicode_str); /* object name */
1027 obj_handle_t handle; /* handle to the event */
1031 /* Create a keyed event */
1032 @REQ(create_keyed_event)
1033 unsigned int access; /* wanted access rights */
1034 unsigned int attributes; /* object attributes */
1035 VARARG(objattr,object_attributes); /* object attributes */
1037 obj_handle_t handle; /* handle to the event */
1040 /* Open a keyed event */
1041 @REQ(open_keyed_event)
1042 unsigned int access; /* wanted access rights */
1043 unsigned int attributes; /* object attributes */
1044 obj_handle_t rootdir; /* root directory */
1045 VARARG(name,unicode_str); /* object name */
1047 obj_handle_t handle; /* handle to the event */
1051 /* Create a mutex */
1053 unsigned int access; /* wanted access rights */
1054 unsigned int attributes; /* object attributes */
1055 int owned; /* initially owned? */
1056 VARARG(objattr,object_attributes); /* object attributes */
1058 obj_handle_t handle; /* handle to the mutex */
1062 /* Release a mutex */
1064 obj_handle_t handle; /* handle to the mutex */
1066 unsigned int prev_count; /* value of internal counter, before release */
1072 unsigned int access; /* wanted access rights */
1073 unsigned int attributes; /* object attributes */
1074 obj_handle_t rootdir; /* root directory */
1075 VARARG(name,unicode_str); /* object name */
1077 obj_handle_t handle; /* handle to the mutex */
1081 /* Create a semaphore */
1082 @REQ(create_semaphore)
1083 unsigned int access; /* wanted access rights */
1084 unsigned int attributes; /* object attributes */
1085 unsigned int initial; /* initial count */
1086 unsigned int max; /* maximum count */
1087 VARARG(objattr,object_attributes); /* object attributes */
1089 obj_handle_t handle; /* handle to the semaphore */
1093 /* Release a semaphore */
1094 @REQ(release_semaphore)
1095 obj_handle_t handle; /* handle to the semaphore */
1096 unsigned int count; /* count to add to semaphore */
1098 unsigned int prev_count; /* previous semaphore count */
1101 @REQ(query_semaphore)
1102 obj_handle_t handle; /* handle to the semaphore */
1104 unsigned int current; /* current count */
1105 unsigned int max; /* maximum count */
1108 /* Open a semaphore */
1109 @REQ(open_semaphore)
1110 unsigned int access; /* wanted access rights */
1111 unsigned int attributes; /* object attributes */
1112 obj_handle_t rootdir; /* root directory */
1113 VARARG(name,unicode_str); /* object name */
1115 obj_handle_t handle; /* handle to the semaphore */
1121 unsigned int access; /* wanted access rights */
1122 unsigned int attributes; /* object attributes */
1123 unsigned int sharing; /* sharing flags */
1124 int create; /* file create action */
1125 unsigned int options; /* file options */
1126 unsigned int attrs; /* file attributes for creation */
1127 VARARG(objattr,object_attributes); /* object attributes */
1128 VARARG(filename,string); /* file name */
1130 obj_handle_t handle; /* handle to the file */
1134 /* Open a file object */
1135 @REQ(open_file_object)
1136 unsigned int access; /* wanted access rights */
1137 unsigned int attributes; /* open attributes */
1138 obj_handle_t rootdir; /* root directory */
1139 unsigned int sharing; /* sharing flags */
1140 unsigned int options; /* file options */
1141 VARARG(filename,unicode_str); /* file name */
1143 obj_handle_t handle; /* handle to the file */
1147 /* Allocate a file handle for a Unix fd */
1148 @REQ(alloc_file_handle)
1149 unsigned int access; /* wanted access rights */
1150 unsigned int attributes; /* object attributes */
1151 int fd; /* file descriptor on the client side */
1153 obj_handle_t handle; /* handle to the file */
1157 /* Get the Unix name from a file handle */
1158 @REQ(get_handle_unix_name)
1159 obj_handle_t handle; /* file handle */
1161 data_size_t name_len; /* unix name length */
1162 VARARG(name,string); /* unix name */
1166 /* Get a Unix fd to access a file */
1168 obj_handle_t handle; /* handle to the file */
1170 int type; /* file type (see below) */
1171 int cacheable; /* can fd be cached in the client? */
1172 unsigned int access; /* file access rights */
1173 unsigned int options; /* file open options */
1177 FD_TYPE_INVALID, /* invalid file (no associated fd) */
1178 FD_TYPE_FILE, /* regular file */
1179 FD_TYPE_DIR, /* directory */
1180 FD_TYPE_SOCKET, /* socket */
1181 FD_TYPE_SERIAL, /* serial port */
1182 FD_TYPE_PIPE, /* named pipe */
1183 FD_TYPE_MAILSLOT, /* mailslot */
1184 FD_TYPE_CHAR, /* unspecified char device */
1185 FD_TYPE_DEVICE, /* Windows device file */
1190 /* Flush a file buffers */
1192 int blocking; /* whether it's a blocking flush
*/
1193 async_data_t async
; /* async I
/O parameters
*/
1195 obj_handle_t event
; /* event set when finished
*/
1199 /* Lock a region of a file
*/
1201 obj_handle_t handle
; /* handle to the file
*/
1202 file_pos_t offset
; /* offset of start of lock
*/
1203 file_pos_t count
; /* count of bytes to lock
*/
1204 int shared
; /* shared or exclusive lock?
*/
1205 int wait
; /* do we want to wait?
*/
1207 obj_handle_t handle
; /* handle to wait on
*/
1208 int overlapped
; /* is it an overlapped I
/O handle?
*/
1212 /* Unlock a region of a file
*/
1214 obj_handle_t handle
; /* handle to the file
*/
1215 file_pos_t offset
; /* offset of start of unlock
*/
1216 file_pos_t count
; /* count of bytes to unlock
*/
1220 /* Create a socket
*/
1222 unsigned int access
; /* wanted access rights
*/
1223 unsigned int attributes
; /* object attributes
*/
1224 int family
; /* family
, see socket manpage
*/
1225 int type
; /* type
, see socket manpage
*/
1226 int protocol
; /* protocol
, see socket manpage
*/
1227 unsigned int flags
; /* socket flags
*/
1229 obj_handle_t handle
; /* handle to the new socket
*/
1233 /* Accept a socket
*/
1235 obj_handle_t lhandle
; /* handle to the listening socket
*/
1236 unsigned int access
; /* wanted access rights
*/
1237 unsigned int attributes
; /* object attributes
*/
1239 obj_handle_t handle
; /* handle to the new socket
*/
1243 /* Accept into an initialized socket
*/
1244 @
REQ(accept_into_socket
)
1245 obj_handle_t lhandle
; /* handle to the listening socket
*/
1246 obj_handle_t ahandle
; /* handle to the accepting socket
*/
1250 /* Set socket event parameters
*/
1251 @
REQ(set_socket_event
)
1252 obj_handle_t handle
; /* handle to the socket
*/
1253 unsigned int mask
; /* event mask
*/
1254 obj_handle_t event
; /* event object
*/
1255 user_handle_t window
; /* window to send the message to
*/
1256 unsigned int msg
; /* message to send
*/
1260 /* Get socket event parameters
*/
1261 @
REQ(get_socket_event
)
1262 obj_handle_t handle
; /* handle to the socket
*/
1263 int service
; /* clear pending?
*/
1264 obj_handle_t c_event
; /* event to clear
*/
1266 unsigned int mask
; /* event mask
*/
1267 unsigned int pmask
; /* pending events
*/
1268 unsigned int state
; /* status bits
*/
1269 VARARG(errors
,ints
); /* event errors
*/
1273 /* Get socket info
*/
1274 @
REQ(get_socket_info
)
1275 obj_handle_t handle
; /* handle to the socket
*/
1277 int family
; /* family
, see socket manpage
*/
1278 int type
; /* type
, see socket manpage
*/
1279 int protocol
; /* protocol
, see socket manpage
*/
1283 /* Re
-enable pending socket events
*/
1284 @
REQ(enable_socket_event
)
1285 obj_handle_t handle
; /* handle to the socket
*/
1286 unsigned int mask
; /* events to re
-enable
*/
1287 unsigned int sstate
; /* status bits to set
*/
1288 unsigned int cstate
; /* status bits to clear
*/
1291 @
REQ(set_socket_deferred
)
1292 obj_handle_t handle
; /* handle to the socket
*/
1293 obj_handle_t deferred
; /* handle to the socket for which
accept() is deferred
*/
1296 /* Allocate a
console (only used by a console renderer
) */
1298 unsigned int access
; /* wanted access rights
*/
1299 unsigned int attributes
; /* object attributes
*/
1300 process_id_t pid
; /* pid of process which shall be attached to the console
*/
1301 int input_fd
; /* if pid
=-1 (bare console to current process
), fd for input
*/
1303 obj_handle_t handle_in
; /* handle to console input
*/
1304 obj_handle_t event
; /* handle to renderer events change notification
*/
1308 /* Free the console of the current process
*/
1313 #define CONSOLE_RENDERER_NONE_EVENT
0x00
1314 #define CONSOLE_RENDERER_TITLE_EVENT
0x01
1315 #define CONSOLE_RENDERER_ACTIVE_SB_EVENT
0x02
1316 #define CONSOLE_RENDERER_SB_RESIZE_EVENT
0x03
1317 #define CONSOLE_RENDERER_UPDATE_EVENT
0x04
1318 #define CONSOLE_RENDERER_CURSOR_POS_EVENT
0x05
1319 #define CONSOLE_RENDERER_CURSOR_GEOM_EVENT
0x06
1320 #define CONSOLE_RENDERER_DISPLAY_EVENT
0x07
1321 #define CONSOLE_RENDERER_EXIT_EVENT
0x08
1322 struct console_renderer_event
1357 /* retrieve console events for the renderer
*/
1358 @
REQ(get_console_renderer_events
)
1359 obj_handle_t handle
; /* handle to console input events
*/
1361 VARARG(data
,bytes
); /* the various console_renderer_events
*/
1365 /* Open a handle to the process console
*/
1367 obj_handle_t from
; /* 0 (resp
1) input (resp output
) of current process console
*/
1368 /* otherwise console_in handle to get active screen buffer?
*/
1369 unsigned int access
; /* wanted access rights
*/
1370 unsigned int attributes
; /* object attributes
*/
1371 int share
; /* share
mask (only for output handles
) */
1373 obj_handle_t handle
; /* handle to the console
*/
1377 /* Get the input queue wait event
*/
1378 @
REQ(get_console_wait_event
)
1380 obj_handle_t handle
;
1383 /* Get a console
mode (input or output
) */
1384 @
REQ(get_console_mode
)
1385 obj_handle_t handle
; /* handle to the console
*/
1387 int mode
; /* console mode
*/
1391 /* Set a console
mode (input or output
) */
1392 @
REQ(set_console_mode
)
1393 obj_handle_t handle
; /* handle to the console
*/
1394 int mode
; /* console mode
*/
1398 /* Set info about a
console (input only
) */
1399 @
REQ(set_console_input_info
)
1400 obj_handle_t handle
; /* handle to console input
, or
0 for process
' console */
1401 int mask; /* setting mask (see below) */
1402 obj_handle_t active_sb; /* active screen buffer */
1403 int history_mode; /* whether we duplicate lines in history */
1404 int history_size; /* number of lines in history */
1405 int edition_mode; /* index to the edition mode flavors */
1406 int input_cp; /* console input codepage */
1407 int output_cp; /* console output codepage */
1408 user_handle_t win; /* console window if backend supports it */
1409 VARARG(title,unicode_str); /* console title */
1411 #define SET_CONSOLE_INPUT_INFO_ACTIVE_SB 0x01
1412 #define SET_CONSOLE_INPUT_INFO_TITLE 0x02
1413 #define SET_CONSOLE_INPUT_INFO_HISTORY_MODE 0x04
1414 #define SET_CONSOLE_INPUT_INFO_HISTORY_SIZE 0x08
1415 #define SET_CONSOLE_INPUT_INFO_EDITION_MODE 0x10
1416 #define SET_CONSOLE_INPUT_INFO_INPUT_CODEPAGE 0x20
1417 #define SET_CONSOLE_INPUT_INFO_OUTPUT_CODEPAGE 0x40
1418 #define SET_CONSOLE_INPUT_INFO_WIN 0x80
1421 /* Get info about a console (input only) */
1422 @REQ(get_console_input_info)
1423 obj_handle_t handle; /* handle to console input, or 0 for process' console
*/
1425 int history_mode
; /* whether we duplicate lines in history
*/
1426 int history_size
; /* number of lines in history
*/
1427 int history_index
; /* number of used lines in history
*/
1428 int edition_mode
; /* index to the edition mode flavors
*/
1429 int input_cp
; /* console input codepage
*/
1430 int output_cp
; /* console output codepage
*/
1431 user_handle_t win
; /* console window if backend supports it
*/
1432 VARARG(title
,unicode_str
); /* console title
*/
1436 /* appends a string to console
's history */
1437 @REQ(append_console_input_history)
1438 obj_handle_t handle; /* handle to console input, or 0 for process' console
*/
1439 VARARG(line
,unicode_str
); /* line to add
*/
1443 /* appends a string to console
's history */
1444 @REQ(get_console_input_history)
1445 obj_handle_t handle; /* handle to console input, or 0 for process' console
*/
1446 int index
; /* index to get line from
*/
1448 int total
; /* total length of line in Unicode chars
*/
1449 VARARG(line
,unicode_str
); /* line to add
*/
1453 /* creates a new screen buffer on process
' console */
1454 @REQ(create_console_output)
1455 obj_handle_t handle_in; /* handle to console input, or 0 for process' console
*/
1456 unsigned int access
; /* wanted access rights
*/
1457 unsigned int attributes
; /* object attributes
*/
1458 unsigned int share
; /* sharing credentials
*/
1459 int fd
; /* for bare consoles
, fd the screen
-buffer is attached to
*/
1461 obj_handle_t handle_out
; /* handle to the screen buffer
*/
1465 /* Set info about a
console (output only
) */
1466 @
REQ(set_console_output_info
)
1467 obj_handle_t handle
; /* handle to the console
*/
1468 int mask
; /* setting
mask (see below
) */
1469 short int cursor_size
; /* size of
cursor (percentage filled
) */
1470 short int cursor_visible
;/* cursor visibility flag
*/
1471 short int cursor_x
; /* position of
cursor (x
, y
) */
1473 short int width
; /* width of the screen buffer
*/
1474 short int height
; /* height of the screen buffer
*/
1475 short int attr
; /* default attribute
*/
1476 short int win_left
; /* window actually displayed by renderer
*/
1477 short int win_top
; /* the rect area is expressed within the
*/
1478 short int win_right
; /* boundaries of the screen buffer
*/
1479 short int win_bottom
;
1480 short int max_width
; /* maximum
size (width x height
) for the window
*/
1481 short int max_height
;
1483 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_GEOM
0x01
1484 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_POS
0x02
1485 #define SET_CONSOLE_OUTPUT_INFO_SIZE
0x04
1486 #define SET_CONSOLE_OUTPUT_INFO_ATTR
0x08
1487 #define SET_CONSOLE_OUTPUT_INFO_DISPLAY_WINDOW
0x10
1488 #define SET_CONSOLE_OUTPUT_INFO_MAX_SIZE
0x20
1491 /* Get info about a
console (output only
) */
1492 @
REQ(get_console_output_info
)
1493 obj_handle_t handle
; /* handle to the console
*/
1495 short int cursor_size
; /* size of
cursor (percentage filled
) */
1496 short int cursor_visible
;/* cursor visibility flag
*/
1497 short int cursor_x
; /* position of
cursor (x
, y
) */
1499 short int width
; /* width of the screen buffer
*/
1500 short int height
; /* height of the screen buffer
*/
1501 short int attr
; /* default attribute
*/
1502 short int win_left
; /* window actually displayed by renderer
*/
1503 short int win_top
; /* the rect area is expressed within the
*/
1504 short int win_right
; /* boundaries of the screen buffer
*/
1505 short int win_bottom
;
1506 short int max_width
; /* maximum
size (width x height
) for the window
*/
1507 short int max_height
;
1510 /* Add input records to a console input queue
*/
1511 @
REQ(write_console_input
)
1512 obj_handle_t handle
; /* handle to the console input
*/
1513 VARARG(rec
,input_records
); /* input records
*/
1515 int written
; /* number of records written
*/
1519 /* Fetch input records from a console input queue
*/
1520 @
REQ(read_console_input
)
1521 obj_handle_t handle
; /* handle to the console input
*/
1522 int flush
; /* flush the retrieved records from the queue?
*/
1524 int read
; /* number of records read
*/
1525 VARARG(rec
,input_records
); /* input records
*/
1529 /* write
data (chars and
/or attributes
) in a screen buffer
*/
1530 @
REQ(write_console_output
)
1531 obj_handle_t handle
; /* handle to the console output
*/
1532 int x
; /* position where to start writing
*/
1534 int mode
; /* char
info (see below
) */
1535 int wrap
; /* wrap around at end of line?
*/
1536 VARARG(data
,bytes
); /* info to write
*/
1538 int written
; /* number of char infos actually written
*/
1539 int width
; /* width of screen buffer
*/
1540 int height
; /* height of screen buffer
*/
1544 CHAR_INFO_MODE_TEXT
, /* characters only
*/
1545 CHAR_INFO_MODE_ATTR
, /* attributes only
*/
1546 CHAR_INFO_MODE_TEXTATTR
, /* both characters and attributes
*/
1547 CHAR_INFO_MODE_TEXTSTDATTR
/* characters but use standard attributes
*/
1551 /* fill a screen buffer with constant
data (chars and
/or attributes
) */
1552 @
REQ(fill_console_output
)
1553 obj_handle_t handle
; /* handle to the console output
*/
1554 int x
; /* position where to start writing
*/
1556 int mode
; /* char info mode
*/
1557 int count
; /* number to write
*/
1558 int wrap
; /* wrap around at end of line?
*/
1559 char_info_t data
; /* data to write
*/
1561 int written
; /* number of char infos actually written
*/
1565 /* read
data (chars and
/or attributes
) from a screen buffer
*/
1566 @
REQ(read_console_output
)
1567 obj_handle_t handle
; /* handle to the console output
*/
1568 int x
; /* position (x
,y
) where to start reading
*/
1570 int mode
; /* char info mode
*/
1571 int wrap
; /* wrap around at end of line?
*/
1573 int width
; /* width of screen buffer
*/
1574 int height
; /* height of screen buffer
*/
1579 /* move a
rect (of data
) in screen buffer content
*/
1580 @
REQ(move_console_output
)
1581 obj_handle_t handle
; /* handle to the console output
*/
1582 short int x_src
; /* position (x
, y
) of rect to start moving from
*/
1584 short int x_dst
; /* position (x
, y
) of rect to move to
*/
1586 short int w
; /* size of the
rect (width
, height
) to move
*/
1591 /* Sends a signal to a process group
*/
1592 @
REQ(send_console_signal
)
1593 int signal
; /* the signal to send
*/
1594 process_id_t group_id
; /* the group to send the signal to
*/
1598 /* enable directory change notifications
*/
1599 @
REQ(read_directory_changes
)
1600 unsigned int filter
; /* notification filter
*/
1601 int subtree
; /* watch the subtree?
*/
1602 int want_data
; /* flag indicating whether change data should be collected
*/
1603 async_data_t async
; /* async I
/O parameters
*/
1608 obj_handle_t handle
;
1610 VARARG(events
,filesystem_event
); /* collected filesystem events
*/
1614 /* Create a file mapping
*/
1615 @
REQ(create_mapping
)
1616 unsigned int access
; /* wanted access rights
*/
1617 unsigned int attributes
; /* object attributes
*/
1618 unsigned int protect
; /* protection
flags (see below
) */
1619 mem_size_t size
; /* mapping size
*/
1620 obj_handle_t file_handle
; /* file handle
*/
1621 VARARG(objattr
,object_attributes
); /* object attributes
*/
1623 obj_handle_t handle
; /* handle to the mapping
*/
1625 /* per
-page protection flags
*/
1626 #define VPROT_READ
0x01
1627 #define VPROT_WRITE
0x02
1628 #define VPROT_EXEC
0x04
1629 #define VPROT_WRITECOPY
0x08
1630 #define VPROT_GUARD
0x10
1631 #define VPROT_NOCACHE
0x20
1632 #define VPROT_COMMITTED
0x40
1633 #define VPROT_WRITEWATCH
0x80
1634 /* per
-mapping protection flags
*/
1635 #define VPROT_IMAGE
0x0100 /* mapping for an exe image
*/
1636 #define VPROT_SYSTEM
0x0200 /* system
view (underlying mmap not under our control
) */
1637 #define VPROT_VALLOC
0x0400 /* allocated by VirtualAlloc
*/
1638 #define VPROT_NOEXEC
0x0800 /* don
't force exec permission */
1641 /* Open a mapping */
1643 unsigned int access; /* wanted access rights */
1644 unsigned int attributes; /* object attributes */
1645 obj_handle_t rootdir; /* root directory */
1646 VARARG(name,unicode_str); /* object name */
1648 obj_handle_t handle; /* handle to the mapping */
1652 /* Get information about a file mapping */
1653 @REQ(get_mapping_info)
1654 obj_handle_t handle; /* handle to the mapping */
1655 unsigned int access; /* wanted access rights */
1657 mem_size_t size; /* mapping size */
1658 int protect; /* protection flags */
1659 int header_size; /* header size (for VPROT_IMAGE mapping) */
1660 client_ptr_t base; /* default base addr (for VPROT_IMAGE mapping) */
1661 obj_handle_t mapping; /* duplicate mapping handle unless removable */
1662 obj_handle_t shared_file; /* shared mapping file handle */
1666 /* Get a range of committed pages in a file mapping */
1667 @REQ(get_mapping_committed_range)
1668 obj_handle_t handle; /* handle to the mapping */
1669 file_pos_t offset; /* starting offset (page-aligned, in bytes) */
1671 mem_size_t size; /* size of range starting at offset (page-aligned, in bytes) */
1672 int committed; /* whether it is a committed range */
1676 /* Add a range to the committed pages in a file mapping */
1677 @REQ(add_mapping_committed_range)
1678 obj_handle_t handle; /* handle to the mapping */
1679 file_pos_t offset; /* starting offset (page-aligned, in bytes) */
1680 mem_size_t size; /* size to set (page-aligned, in bytes) or 0 if only retrieving */
1684 #define SNAP_PROCESS 0x00000001
1685 #define SNAP_THREAD 0x00000002
1686 /* Create a snapshot */
1687 @REQ(create_snapshot)
1688 unsigned int attributes; /* object attributes */
1689 unsigned int flags; /* snapshot flags (SNAP_*) */
1691 obj_handle_t handle; /* handle to the snapshot */
1695 /* Get the next process from a snapshot */
1697 obj_handle_t handle; /* handle to the snapshot */
1698 int reset; /* reset snapshot position? */
1700 int count; /* process usage count */
1701 process_id_t pid; /* process id */
1702 process_id_t ppid; /* parent process id */
1703 int threads; /* number of threads */
1704 int priority; /* process priority */
1705 int handles; /* number of handles */
1706 int unix_pid; /* Unix pid */
1707 VARARG(filename,unicode_str); /* file name of main exe */
1711 /* Get the next thread from a snapshot */
1713 obj_handle_t handle; /* handle to the snapshot */
1714 int reset; /* reset snapshot position? */
1716 int count; /* thread usage count */
1717 process_id_t pid; /* process id */
1718 thread_id_t tid; /* thread id */
1719 int base_pri; /* base priority */
1720 int delta_pri; /* delta priority */
1724 /* Wait for a debug event */
1725 @REQ(wait_debug_event)
1726 int get_handle; /* should we alloc a handle for waiting? */
1728 process_id_t pid; /* process id */
1729 thread_id_t tid; /* thread id */
1730 obj_handle_t wait; /* wait handle if no event ready */
1731 VARARG(event,debug_event); /* debug event data */
1735 /* Queue an exception event */
1736 @REQ(queue_exception_event)
1737 int first; /* first chance exception? */
1738 unsigned int code; /* exception code */
1739 unsigned int flags; /* exception flags */
1740 client_ptr_t record; /* exception record */
1741 client_ptr_t address; /* exception address */
1742 data_size_t len; /* size of parameters */
1743 VARARG(params,uints64,len);/* exception parameters */
1744 VARARG(context,context); /* thread context */
1746 obj_handle_t handle; /* handle to the queued event */
1750 /* Retrieve the status of an exception event */
1751 @REQ(get_exception_status)
1752 obj_handle_t handle; /* handle to the queued event */
1754 VARARG(context,context); /* modified thread context */
1758 /* Continue a debug event */
1759 @REQ(continue_debug_event)
1760 process_id_t pid; /* process id to continue */
1761 thread_id_t tid; /* thread id to continue */
1762 int status; /* continuation status */
1766 /* Start/stop debugging an existing process */
1768 process_id_t pid; /* id of the process to debug */
1769 int attach; /* 1=attaching / 0=detaching from the process */
1773 /* Simulate a breakpoint in a process */
1775 obj_handle_t handle; /* process handle */
1777 int self; /* was it the caller itself? */
1781 /* Set debugger kill on exit flag */
1782 @REQ(set_debugger_kill_on_exit)
1783 int kill_on_exit; /* 0=detach/1=kill debuggee when debugger dies */
1787 /* Read data from a process address space */
1788 @REQ(read_process_memory)
1789 obj_handle_t handle; /* process handle */
1790 client_ptr_t addr; /* addr to read from */
1792 VARARG(data,bytes); /* result data */
1796 /* Write data to a process address space */
1797 @REQ(write_process_memory)
1798 obj_handle_t handle; /* process handle */
1799 client_ptr_t addr; /* addr to write to */
1800 VARARG(data,bytes); /* data to write */
1804 /* Create a registry key */
1806 obj_handle_t parent; /* handle to the parent key */
1807 unsigned int access; /* desired access rights */
1808 unsigned int attributes; /* object attributes */
1809 unsigned int options; /* creation options */
1810 data_size_t namelen; /* length of key name in bytes */
1811 VARARG(name,unicode_str,namelen); /* key name */
1812 VARARG(class,unicode_str); /* class name */
1814 obj_handle_t hkey; /* handle to the created key */
1815 int created; /* has it been newly created? */
1818 /* Open a registry key */
1820 obj_handle_t parent; /* handle to the parent key */
1821 unsigned int access; /* desired access rights */
1822 unsigned int attributes; /* object attributes */
1823 VARARG(name,unicode_str); /* key name */
1825 obj_handle_t hkey; /* handle to the open key */
1829 /* Delete a registry key */
1831 obj_handle_t hkey; /* handle to the key */
1835 /* Flush a registry key */
1837 obj_handle_t hkey; /* handle to the key */
1841 /* Enumerate registry subkeys */
1843 obj_handle_t hkey; /* handle to registry key */
1844 int index; /* index of subkey (or -1 for current key) */
1845 int info_class; /* requested information class */
1847 int subkeys; /* number of subkeys */
1848 int max_subkey; /* longest subkey name */
1849 int max_class; /* longest class name */
1850 int values; /* number of values */
1851 int max_value; /* longest value name */
1852 int max_data; /* longest value data */
1853 timeout_t modif; /* last modification time */
1854 data_size_t total; /* total length needed for full name and class */
1855 data_size_t namelen; /* length of key name in bytes */
1856 VARARG(name,unicode_str,namelen); /* key name */
1857 VARARG(class,unicode_str); /* class name */
1861 /* Set a value of a registry key */
1863 obj_handle_t hkey; /* handle to registry key */
1864 int type; /* value type */
1865 data_size_t namelen; /* length of value name in bytes */
1866 VARARG(name,unicode_str,namelen); /* value name */
1867 VARARG(data,bytes); /* value data */
1871 /* Retrieve the value of a registry key */
1873 obj_handle_t hkey; /* handle to registry key */
1874 VARARG(name,unicode_str); /* value name */
1876 int type; /* value type */
1877 data_size_t total; /* total length needed for data */
1878 VARARG(data,bytes); /* value data */
1882 /* Enumerate a value of a registry key */
1883 @REQ(enum_key_value)
1884 obj_handle_t hkey; /* handle to registry key */
1885 int index; /* value index */
1886 int info_class; /* requested information class */
1888 int type; /* value type */
1889 data_size_t total; /* total length needed for full name and data */
1890 data_size_t namelen; /* length of value name in bytes */
1891 VARARG(name,unicode_str,namelen); /* value name */
1892 VARARG(data,bytes); /* value data */
1896 /* Delete a value of a registry key */
1897 @REQ(delete_key_value)
1898 obj_handle_t hkey; /* handle to registry key */
1899 VARARG(name,unicode_str); /* value name */
1903 /* Load a registry branch from a file */
1905 obj_handle_t hkey; /* root key to load to */
1906 obj_handle_t file; /* file to load from */
1907 VARARG(name,unicode_str); /* subkey name */
1911 /* UnLoad a registry branch from a file */
1912 @REQ(unload_registry)
1913 obj_handle_t hkey; /* root key to unload to */
1917 /* Save a registry branch to a file */
1919 obj_handle_t hkey; /* key to save */
1920 obj_handle_t file; /* file to save to */
1924 /* Add a registry key change notification */
1925 @REQ(set_registry_notification)
1926 obj_handle_t hkey; /* key to watch for changes */
1927 obj_handle_t event; /* event to set */
1928 int subtree; /* should we watch the whole subtree? */
1929 unsigned int filter; /* things to watch */
1933 /* Create a waitable timer */
1935 unsigned int access; /* wanted access rights */
1936 unsigned int attributes; /* object attributes */
1937 obj_handle_t rootdir; /* root directory */
1938 int manual; /* manual reset */
1939 VARARG(name,unicode_str); /* object name */
1941 obj_handle_t handle; /* handle to the timer */
1945 /* Open a waitable timer */
1947 unsigned int access; /* wanted access rights */
1948 unsigned int attributes; /* object attributes */
1949 obj_handle_t rootdir; /* root directory */
1950 VARARG(name,unicode_str); /* object name */
1952 obj_handle_t handle; /* handle to the timer */
1955 /* Set a waitable timer */
1957 obj_handle_t handle; /* handle to the timer */
1958 timeout_t expire; /* next expiration absolute time */
1959 client_ptr_t callback; /* callback function */
1960 client_ptr_t arg; /* callback argument */
1961 int period; /* timer period in ms */
1963 int signaled; /* was the timer signaled before this call ? */
1966 /* Cancel a waitable timer */
1968 obj_handle_t handle; /* handle to the timer */
1970 int signaled; /* was the timer signaled before this calltime ? */
1973 /* Get information on a waitable timer */
1974 @REQ(get_timer_info)
1975 obj_handle_t handle; /* handle to the timer */
1977 timeout_t when; /* absolute time when the timer next expires */
1978 int signaled; /* is the timer signaled? */
1982 /* Retrieve the current context of a thread */
1983 @REQ(get_thread_context)
1984 obj_handle_t handle; /* thread handle */
1985 unsigned int flags; /* context flags */
1986 int suspend; /* suspend the thread if needed */
1988 int self; /* was it a handle to the current thread? */
1989 VARARG(context,context); /* thread context */
1993 /* Set the current context of a thread */
1994 @REQ(set_thread_context)
1995 obj_handle_t handle; /* thread handle */
1996 int suspend; /* suspend the thread if needed */
1997 VARARG(context,context); /* thread context */
1999 int self; /* was it a handle to the current thread? */
2003 /* Fetch a selector entry for a thread */
2004 @REQ(get_selector_entry)
2005 obj_handle_t handle; /* thread handle */
2006 int entry; /* LDT entry */
2008 unsigned int base; /* selector base */
2009 unsigned int limit; /* selector limit */
2010 unsigned char flags; /* selector flags */
2016 obj_handle_t table; /* which table to add atom to */
2017 VARARG(name,unicode_str); /* atom name */
2019 atom_t atom; /* resulting atom */
2023 /* Delete an atom */
2025 obj_handle_t table; /* which table to delete atom from */
2026 atom_t atom; /* atom handle */
2032 obj_handle_t table; /* which table to find atom from */
2033 VARARG(name,unicode_str); /* atom name */
2035 atom_t atom; /* atom handle */
2039 /* Get information about an atom */
2040 @REQ(get_atom_information)
2041 obj_handle_t table; /* which table to find atom from */
2042 atom_t atom; /* atom handle */
2044 int count; /* atom lock count */
2045 int pinned; /* whether the atom has been pinned */
2046 data_size_t total; /* actual length of atom name */
2047 VARARG(name,unicode_str); /* atom name */
2051 /* Set information about an atom */
2052 @REQ(set_atom_information)
2053 obj_handle_t table; /* which table to find atom from */
2054 atom_t atom; /* atom handle */
2055 int pinned; /* whether to bump atom information */
2059 /* Empty an atom table */
2060 @REQ(empty_atom_table)
2061 obj_handle_t table; /* which table to find atom from */
2062 int if_pinned; /* whether to delete pinned atoms */
2066 /* Init an atom table */
2067 @REQ(init_atom_table)
2068 int entries; /* number of entries (only for local) */
2070 obj_handle_t table; /* handle to the atom table */
2074 /* Get the message queue of the current thread */
2077 obj_handle_t handle; /* handle to the queue */
2081 /* Set the file descriptor associated to the current thread queue */
2083 obj_handle_t handle; /* handle to the file descriptor */
2087 /* Set the current message queue wakeup mask */
2088 @REQ(set_queue_mask)
2089 unsigned int wake_mask; /* wakeup bits mask */
2090 unsigned int changed_mask; /* changed bits mask */
2091 int skip_wait; /* will we skip waiting if signaled? */
2093 unsigned int wake_bits; /* current wake bits */
2094 unsigned int changed_bits; /* current changed bits */
2098 /* Get the current message queue status */
2099 @REQ(get_queue_status)
2100 unsigned int clear_bits; /* should we clear the change bits? */
2102 unsigned int wake_bits; /* wake bits */
2103 unsigned int changed_bits; /* changed bits since last time */
2107 /* Retrieve the process idle event */
2108 @REQ(get_process_idle_event)
2109 obj_handle_t handle; /* process handle */
2111 obj_handle_t event; /* handle to idle event */
2115 /* Send a message to a thread queue */
2117 thread_id_t id; /* thread id */
2118 int type; /* message type (see below) */
2119 int flags; /* message flags (see below) */
2120 user_handle_t win; /* window handle */
2121 unsigned int msg; /* message code */
2122 lparam_t wparam; /* parameters */
2123 lparam_t lparam; /* parameters */
2124 timeout_t timeout; /* timeout for reply */
2125 VARARG(data,message_data); /* message data for sent messages */
2128 @REQ(post_quit_message)
2129 int exit_code; /* exit code to return */
2134 MSG_ASCII, /* Ascii message (from SendMessageA) */
2135 MSG_UNICODE, /* Unicode message (from SendMessageW) */
2136 MSG_NOTIFY, /* notify message (from SendNotifyMessageW), always Unicode */
2137 MSG_CALLBACK, /* callback message (from SendMessageCallbackW), always Unicode */
2138 MSG_CALLBACK_RESULT,/* result of a callback message */
2139 MSG_OTHER_PROCESS, /* sent from other process, may include vararg data, always Unicode */
2140 MSG_POSTED, /* posted message (from PostMessageW), always Unicode */
2141 MSG_HARDWARE, /* hardware message */
2142 MSG_WINEVENT, /* winevent message */
2143 MSG_HOOK_LL /* low-level hardware hook */
2145 #define SEND_MSG_ABORT_IF_HUNG 0x01
2148 /* Send a hardware message to a thread queue */
2149 @REQ(send_hardware_message)
2150 user_handle_t win; /* window handle */
2151 hw_input_t input; /* input data */
2152 unsigned int flags; /* flags (see below) */
2154 int wait; /* do we need to wait for a reply? */
2155 int prev_x; /* previous cursor position */
2157 int new_x; /* new cursor position */
2159 VARARG(keystate,bytes); /* global state array for all the keys */
2161 #define SEND_HWMSG_INJECTED 0x01
2164 /* Get a message from the current queue */
2166 unsigned int flags; /* PM_* flags */
2167 user_handle_t get_win; /* window handle to get */
2168 unsigned int get_first; /* first message code to get */
2169 unsigned int get_last; /* last message code to get */
2170 unsigned int hw_id; /* id of the previous hardware message (or 0) */
2171 unsigned int wake_mask; /* wakeup bits mask */
2172 unsigned int changed_mask; /* changed bits mask */
2174 user_handle_t win; /* window handle */
2175 unsigned int msg; /* message code */
2176 lparam_t wparam; /* parameters */
2177 lparam_t lparam; /* parameters */
2178 int type; /* message type */
2179 int x; /* message x position */
2180 int y; /* message y position */
2181 unsigned int time; /* message time */
2182 unsigned int active_hooks; /* active hooks bitmap */
2183 data_size_t total; /* total size of extra data */
2184 VARARG(data,message_data); /* message data for sent messages */
2188 /* Reply to a sent message */
2190 int remove; /* should we remove the message? */
2191 lparam_t result; /* message result */
2192 VARARG(data,bytes); /* message data for sent messages */
2196 /* Accept the current hardware message */
2197 @REQ(accept_hardware_message)
2198 unsigned int hw_id; /* id of the hardware message */
2199 int remove; /* should we remove the message? */
2203 /* Retrieve the reply for the last message sent */
2204 @REQ(get_message_reply)
2205 int cancel; /* cancel message if not ready? */
2207 lparam_t result; /* message result */
2208 VARARG(data,bytes); /* message data for sent messages */
2212 /* Set a window timer */
2214 user_handle_t win; /* window handle */
2215 unsigned int msg; /* message to post */
2216 unsigned int rate; /* timer rate in ms */
2217 lparam_t id; /* timer id */
2218 lparam_t lparam; /* message lparam (callback proc) */
2220 lparam_t id; /* timer id */
2224 /* Kill a window timer */
2225 @REQ(kill_win_timer)
2226 user_handle_t win; /* window handle */
2227 lparam_t id; /* timer id */
2228 unsigned int msg; /* message to post */
2232 /* check if the thread owning the window is hung */
2233 @REQ(is_window_hung)
2234 user_handle_t win; /* window handle */
2240 /* Retrieve info about a serial port */
2241 @REQ(get_serial_info)
2242 obj_handle_t handle; /* handle to comm port */
2245 unsigned int readinterval;
2246 unsigned int readconst;
2247 unsigned int readmult;
2248 unsigned int writeconst;
2249 unsigned int writemult;
2250 unsigned int eventmask;
2251 unsigned int cookie;
2252 unsigned int pending_write;
2256 /* Set info about a serial port */
2257 @REQ(set_serial_info)
2258 obj_handle_t handle; /* handle to comm port */
2259 int flags; /* bitmask to set values (see below) */
2260 unsigned int readinterval;
2261 unsigned int readconst;
2262 unsigned int readmult;
2263 unsigned int writeconst;
2264 unsigned int writemult;
2265 unsigned int eventmask;
2267 #define SERIALINFO_SET_TIMEOUTS 0x01
2268 #define SERIALINFO_SET_MASK 0x02
2269 #define SERIALINFO_PENDING_WRITE 0x04
2270 #define SERIALINFO_PENDING_WAIT 0x08
2273 /* Create an async I/O */
2274 @REQ(register_async)
2275 int type; /* type of queue to look after */
2276 async_data_t async; /* async I/O parameters */
2277 int count; /* count - usually # of bytes to be read/written */
2279 #define ASYNC_TYPE_READ 0x01
2280 #define ASYNC_TYPE_WRITE 0x02
2281 #define ASYNC_TYPE_WAIT 0x03
2284 /* Cancel all async op on a fd */
2286 obj_handle_t handle; /* handle to comm port, socket or file */
2287 client_ptr_t iosb; /* I/O status block (NULL=all) */
2288 int only_thread; /* cancel matching this thread */
2292 /* Perform a read on a file object */
2294 int blocking; /* whether it's a blocking read
*/
2295 async_data_t async
; /* async I
/O parameters
*/
2296 file_pos_t pos
; /* read position
*/
2298 obj_handle_t wait
; /* handle to wait on for blocking read
*/
2299 unsigned int options
; /* device open options
*/
2300 VARARG(data
,bytes
); /* read data
*/
2304 /* Perform a write on a file object
*/
2306 int blocking
; /* whether it
's a blocking write */
2307 async_data_t async; /* async I/O parameters */
2308 file_pos_t pos; /* write position */
2309 VARARG(data,bytes); /* write data */
2311 obj_handle_t wait; /* handle to wait on for blocking write */
2312 unsigned int options; /* device open options */
2313 data_size_t size; /* size written */
2317 /* Perform an ioctl on a file */
2319 ioctl_code_t code; /* ioctl code */
2320 async_data_t async; /* async I/O parameters */
2321 int blocking; /* whether it's a blocking ioctl
*/
2322 VARARG(in_data
,bytes
); /* ioctl input data
*/
2324 obj_handle_t wait
; /* handle to wait on for blocking ioctl
*/
2325 unsigned int options
; /* device open options
*/
2326 VARARG(out_data
,bytes
); /* ioctl output data
*/
2330 /* Store results of an async irp
*/
2331 @
REQ(set_irp_result
)
2332 obj_handle_t manager
; /* handle to the device manager
*/
2333 obj_handle_t handle
; /* handle to the irp
*/
2334 unsigned int status
; /* status of the irp
*/
2335 data_size_t size
; /* result
size (input or output depending on the operation
) */
2336 VARARG(data
,bytes
); /* output data of the irp
*/
2340 /* Retrieve results of an async irp
*/
2341 @
REQ(get_irp_result
)
2342 obj_handle_t handle
; /* handle to the device
*/
2343 client_ptr_t user_arg
; /* user arg used to identify the request
*/
2345 data_size_t size
; /* result
size (input or output depending on the operation
) */
2346 VARARG(out_data
,bytes
); /* irp output data
*/
2350 /* Create a named pipe
*/
2351 @
REQ(create_named_pipe
)
2352 unsigned int access
;
2353 unsigned int attributes
; /* object attributes
*/
2354 unsigned int options
;
2355 unsigned int sharing
;
2356 unsigned int maxinstances
;
2357 unsigned int outsize
;
2358 unsigned int insize
;
2361 VARARG(objattr
,object_attributes
); /* object attributes
*/
2363 obj_handle_t handle
; /* handle to the pipe
*/
2366 /* flags in create_named_pipe and get_named_pipe_info
*/
2367 #define NAMED_PIPE_MESSAGE_STREAM_WRITE
0x0001
2368 #define NAMED_PIPE_MESSAGE_STREAM_READ
0x0002
2369 #define NAMED_PIPE_NONBLOCKING_MODE
0x0004
2370 #define NAMED_PIPE_SERVER_END
0x8000
2372 /* Get named pipe information by handle
*/
2373 @
REQ(get_named_pipe_info
)
2374 obj_handle_t handle
;
2377 unsigned int sharing
;
2378 unsigned int maxinstances
;
2379 unsigned int instances
;
2380 unsigned int outsize
;
2381 unsigned int insize
;
2384 /* Set named pipe information by handle
*/
2385 @
REQ(set_named_pipe_info
)
2386 obj_handle_t handle
;
2390 /* Create a window
*/
2392 user_handle_t parent
; /* parent window
*/
2393 user_handle_t owner
; /* owner window
*/
2394 atom_t atom
; /* class atom
*/
2395 mod_handle_t instance
; /* module instance
*/
2396 VARARG(class
,unicode_str
); /* class name
*/
2398 user_handle_t handle
; /* created window
*/
2399 user_handle_t parent
; /* full handle of parent
*/
2400 user_handle_t owner
; /* full handle of owner
*/
2401 int extra
; /* number of extra bytes
*/
2402 client_ptr_t class_ptr
; /* pointer to class in client address space
*/
2406 /* Destroy a window
*/
2407 @
REQ(destroy_window
)
2408 user_handle_t handle
; /* handle to the window
*/
2412 /* Retrieve the desktop window for the current thread
*/
2413 @
REQ(get_desktop_window
)
2414 int force
; /* force creation if it doesn
't exist */
2416 user_handle_t top_window; /* handle to the desktop window */
2417 user_handle_t msg_window; /* handle to the top-level HWND_MESSAGE parent */
2421 /* Set a window owner */
2422 @REQ(set_window_owner)
2423 user_handle_t handle; /* handle to the window */
2424 user_handle_t owner; /* new owner */
2426 user_handle_t full_owner; /* full handle of new owner */
2427 user_handle_t prev_owner; /* full handle of previous owner */
2431 /* Get information from a window handle */
2432 @REQ(get_window_info)
2433 user_handle_t handle; /* handle to the window */
2435 user_handle_t full_handle; /* full 32-bit handle */
2436 user_handle_t last_active; /* last active popup */
2437 process_id_t pid; /* process owning the window */
2438 thread_id_t tid; /* thread owning the window */
2439 atom_t atom; /* class atom */
2440 int is_unicode; /* ANSI or unicode */
2444 /* Set some information in a window */
2445 @REQ(set_window_info)
2446 unsigned short flags; /* flags for fields to set (see below) */
2447 short int is_unicode; /* ANSI or unicode */
2448 user_handle_t handle; /* handle to the window */
2449 unsigned int style; /* window style */
2450 unsigned int ex_style; /* window extended style */
2451 unsigned int id; /* window id */
2452 mod_handle_t instance; /* creator instance */
2453 lparam_t user_data; /* user-specific data */
2454 int extra_offset; /* offset to set in extra bytes */
2455 data_size_t extra_size; /* size to set in extra bytes */
2456 lparam_t extra_value; /* value to set in extra bytes */
2458 unsigned int old_style; /* old window style */
2459 unsigned int old_ex_style; /* old window extended style */
2460 mod_handle_t old_instance; /* old creator instance */
2461 lparam_t old_user_data; /* old user-specific data */
2462 lparam_t old_extra_value; /* old value in extra bytes */
2463 unsigned int old_id; /* old window id */
2465 #define SET_WIN_STYLE 0x01
2466 #define SET_WIN_EXSTYLE 0x02
2467 #define SET_WIN_ID 0x04
2468 #define SET_WIN_INSTANCE 0x08
2469 #define SET_WIN_USERDATA 0x10
2470 #define SET_WIN_EXTRA 0x20
2471 #define SET_WIN_UNICODE 0x40
2474 /* Set the parent of a window */
2476 user_handle_t handle; /* handle to the window */
2477 user_handle_t parent; /* handle to the parent */
2479 user_handle_t old_parent; /* old parent window */
2480 user_handle_t full_parent; /* full handle of new parent */
2484 /* Get a list of the window parents, up to the root of the tree */
2485 @REQ(get_window_parents)
2486 user_handle_t handle; /* handle to the window */
2488 int count; /* total count of parents */
2489 VARARG(parents,user_handles); /* parent handles */
2493 /* Get a list of the window children */
2494 @REQ(get_window_children)
2495 obj_handle_t desktop; /* handle to desktop */
2496 user_handle_t parent; /* parent window */
2497 atom_t atom; /* class atom for the listed children */
2498 thread_id_t tid; /* thread owning the listed children */
2499 VARARG(class,unicode_str); /* class name */
2501 int count; /* total count of children */
2502 VARARG(children,user_handles); /* children handles */
2506 /* Get a list of the window children that contain a given point */
2507 @REQ(get_window_children_from_point)
2508 user_handle_t parent; /* parent window */
2509 int x; /* point in parent coordinates */
2512 int count; /* total count of children */
2513 VARARG(children,user_handles); /* children handles */
2517 /* Get window tree information from a window handle */
2518 @REQ(get_window_tree)
2519 user_handle_t handle; /* handle to the window */
2521 user_handle_t parent; /* parent window */
2522 user_handle_t owner; /* owner window */
2523 user_handle_t next_sibling; /* next sibling in Z-order */
2524 user_handle_t prev_sibling; /* prev sibling in Z-order */
2525 user_handle_t first_sibling; /* first sibling in Z-order */
2526 user_handle_t last_sibling; /* last sibling in Z-order */
2527 user_handle_t first_child; /* first child */
2528 user_handle_t last_child; /* last child */
2531 /* Set the position and Z order of a window */
2532 @REQ(set_window_pos)
2533 unsigned short swp_flags; /* SWP_* flags */
2534 unsigned short paint_flags; /* paint flags (see below) */
2535 user_handle_t handle; /* handle to the window */
2536 user_handle_t previous; /* previous window in Z order */
2537 rectangle_t window; /* window rectangle (in parent coords) */
2538 rectangle_t client; /* client rectangle (in parent coords) */
2539 VARARG(valid,rectangles); /* valid rectangles from WM_NCCALCSIZE (in parent coords) */
2541 unsigned int new_style; /* new window style */
2542 unsigned int new_ex_style; /* new window extended style */
2543 user_handle_t surface_win; /* window that needs a surface update */
2545 #define SET_WINPOS_PAINT_SURFACE 0x01 /* window has a paintable surface */
2546 #define SET_WINPOS_PIXEL_FORMAT 0x02 /* window has a custom pixel format */
2548 /* Get the window and client rectangles of a window */
2549 @REQ(get_window_rectangles)
2550 user_handle_t handle; /* handle to the window */
2551 int relative; /* coords relative to (see below) */
2553 rectangle_t window; /* window rectangle */
2554 rectangle_t visible; /* visible part of the window rectangle */
2555 rectangle_t client; /* client rectangle */
2557 enum coords_relative
2559 COORDS_CLIENT, /* relative to client area */
2560 COORDS_WINDOW, /* relative to whole window area */
2561 COORDS_PARENT, /* relative to parent's client area
*/
2562 COORDS_SCREEN
/* relative to screen origin
*/
2566 /* Get the window text
*/
2567 @
REQ(get_window_text
)
2568 user_handle_t handle
; /* handle to the window
*/
2570 VARARG(text
,unicode_str
); /* window text
*/
2574 /* Set the window text
*/
2575 @
REQ(set_window_text
)
2576 user_handle_t handle
; /* handle to the window
*/
2577 VARARG(text
,unicode_str
); /* window text
*/
2581 /* Get the coordinates offset between two windows
*/
2582 @
REQ(get_windows_offset
)
2583 user_handle_t from
; /* handle to the first window
*/
2584 user_handle_t to
; /* handle to the second window
*/
2586 int x
; /* x coordinate offset
*/
2587 int y
; /* y coordinate offset
*/
2588 int mirror
; /* whether to mirror the x coordinate
*/
2592 /* Get the visible region of a window
*/
2593 @
REQ(get_visible_region
)
2594 user_handle_t window
; /* handle to the window
*/
2595 unsigned int flags
; /* DCX flags
*/
2597 user_handle_t top_win
; /* top window to clip against
*/
2598 rectangle_t top_rect
; /* top window visible rect with screen coords
*/
2599 rectangle_t win_rect
; /* window rect in screen coords
*/
2600 unsigned int paint_flags
; /* paint
flags (from SET_WINPOS_
* flags
) */
2601 data_size_t total_size
; /* total size of the resulting region
*/
2602 VARARG(region
,rectangles
); /* list of rectangles for the
region (in screen coords
) */
2606 /* Get the visible surface region of a window
*/
2607 @
REQ(get_surface_region
)
2608 user_handle_t window
; /* handle to the window
*/
2610 rectangle_t visible_rect
; /* window visible rect in screen coords
*/
2611 data_size_t total_size
; /* total size of the resulting region
*/
2612 VARARG(region
,rectangles
); /* list of rectangles for the
region (in screen coords
) */
2616 /* Get the window region
*/
2617 @
REQ(get_window_region
)
2618 user_handle_t window
; /* handle to the window
*/
2620 data_size_t total_size
; /* total size of the resulting region
*/
2621 VARARG(region
,rectangles
); /* list of rectangles for the
region (in window coords
) */
2625 /* Set the window region
*/
2626 @
REQ(set_window_region
)
2627 user_handle_t window
; /* handle to the window
*/
2628 int redraw
; /* redraw the window?
*/
2629 VARARG(region
,rectangles
); /* list of rectangles for the
region (in window coords
) */
2633 /* Get the window update region
*/
2634 @
REQ(get_update_region
)
2635 user_handle_t window
; /* handle to the window
*/
2636 user_handle_t from_child
; /* child to start searching from
*/
2637 unsigned int flags
; /* update
flags (see below
) */
2639 user_handle_t child
; /* child to
repaint (or window itself
) */
2640 unsigned int flags
; /* resulting update
flags (see below
) */
2641 data_size_t total_size
; /* total size of the resulting region
*/
2642 VARARG(region
,rectangles
); /* list of rectangles for the
region (in screen coords
) */
2644 #define UPDATE_NONCLIENT
0x01 /* get region for repainting non
-client area
*/
2645 #define UPDATE_ERASE
0x02 /* get region for erasing client area
*/
2646 #define UPDATE_PAINT
0x04 /* get region for painting client area
*/
2647 #define UPDATE_INTERNALPAINT
0x08 /* get region if internal paint is pending
*/
2648 #define UPDATE_ALLCHILDREN
0x10 /* force repaint of all children
*/
2649 #define UPDATE_NOCHILDREN
0x20 /* don
't try to repaint any children */
2650 #define UPDATE_NOREGION 0x40 /* don't return a region
, only the flags
*/
2651 #define UPDATE_DELAYED_ERASE
0x80 /* still needs erase after BeginPaint
*/
2654 /* Update the z order of a window so that a given rectangle is fully visible
*/
2655 @
REQ(update_window_zorder
)
2656 user_handle_t window
; /* handle to the window
*/
2657 rectangle_t rect
; /* rectangle that must be
visible (in client coords
) */
2661 /* Mark parts of a window as needing a redraw
*/
2663 user_handle_t window
; /* handle to the window
*/
2664 unsigned int flags
; /* RDW_
* flags
*/
2665 VARARG(region
,rectangles
); /* list of rectangles for the
region (in window coords
) */
2669 /* Set a window property
*/
2670 @
REQ(set_window_property
)
2671 user_handle_t window
; /* handle to the window
*/
2672 lparam_t data
; /* data to store
*/
2673 atom_t atom
; /* property
atom (if no name specified
) */
2674 VARARG(name
,unicode_str
); /* property name
*/
2678 /* Remove a window property
*/
2679 @
REQ(remove_window_property
)
2680 user_handle_t window
; /* handle to the window
*/
2681 atom_t atom
; /* property
atom (if no name specified
) */
2682 VARARG(name
,unicode_str
); /* property name
*/
2684 lparam_t data
; /* data stored in property
*/
2688 /* Get a window property
*/
2689 @
REQ(get_window_property
)
2690 user_handle_t window
; /* handle to the window
*/
2691 atom_t atom
; /* property
atom (if no name specified
) */
2692 VARARG(name
,unicode_str
); /* property name
*/
2694 lparam_t data
; /* data stored in property
*/
2698 /* Get the list of properties of a window
*/
2699 @
REQ(get_window_properties
)
2700 user_handle_t window
; /* handle to the window
*/
2702 int total
; /* total number of properties
*/
2703 VARARG(props
,properties
); /* list of properties
*/
2707 /* Create a window station
*/
2708 @
REQ(create_winstation
)
2709 unsigned int flags
; /* window station flags
*/
2710 unsigned int access
; /* wanted access rights
*/
2711 unsigned int attributes
; /* object attributes
*/
2712 VARARG(name
,unicode_str
); /* object name
*/
2714 obj_handle_t handle
; /* handle to the window station
*/
2718 /* Open a handle to a window station
*/
2719 @
REQ(open_winstation
)
2720 unsigned int access
; /* wanted access rights
*/
2721 unsigned int attributes
; /* object attributes
*/
2722 VARARG(name
,unicode_str
); /* object name
*/
2724 obj_handle_t handle
; /* handle to the window station
*/
2728 /* Close a window station
*/
2729 @
REQ(close_winstation
)
2730 obj_handle_t handle
; /* handle to the window station
*/
2734 /* Get the process current window station
*/
2735 @
REQ(get_process_winstation
)
2737 obj_handle_t handle
; /* handle to the window station
*/
2741 /* Set the process current window station
*/
2742 @
REQ(set_process_winstation
)
2743 obj_handle_t handle
; /* handle to the window station
*/
2747 /* Enumerate window stations
*/
2748 @
REQ(enum_winstation
)
2749 unsigned int index
; /* current index
*/
2751 unsigned int next
; /* next index
*/
2752 VARARG(name
,unicode_str
); /* window station name
*/
2756 /* Create a desktop
*/
2757 @
REQ(create_desktop
)
2758 unsigned int flags
; /* desktop flags
*/
2759 unsigned int access
; /* wanted access rights
*/
2760 unsigned int attributes
; /* object attributes
*/
2761 VARARG(name
,unicode_str
); /* object name
*/
2763 obj_handle_t handle
; /* handle to the desktop
*/
2767 /* Open a handle to a desktop
*/
2769 obj_handle_t winsta
; /* window station to
open (null allowed
) */
2770 unsigned int flags
; /* desktop flags
*/
2771 unsigned int access
; /* wanted access rights
*/
2772 unsigned int attributes
; /* object attributes
*/
2773 VARARG(name
,unicode_str
); /* object name
*/
2775 obj_handle_t handle
; /* handle to the desktop
*/
2779 /* Open a handle to current input desktop
*/
2780 @
REQ(open_input_desktop
)
2781 unsigned int flags
; /* desktop flags
*/
2782 unsigned int access
; /* wanted access rights
*/
2783 unsigned int attributes
; /* object attributes
*/
2785 obj_handle_t handle
; /* handle to the desktop
*/
2789 /* Close a desktop
*/
2791 obj_handle_t handle
; /* handle to the desktop
*/
2795 /* Get the thread current desktop
*/
2796 @
REQ(get_thread_desktop
)
2797 thread_id_t tid
; /* thread id
*/
2799 obj_handle_t handle
; /* handle to the desktop
*/
2803 /* Set the thread current desktop
*/
2804 @
REQ(set_thread_desktop
)
2805 obj_handle_t handle
; /* handle to the desktop
*/
2809 /* Enumerate desktops
*/
2811 obj_handle_t winstation
; /* handle to the window station
*/
2812 unsigned int index
; /* current index
*/
2814 unsigned int next
; /* next index
*/
2815 VARARG(name
,unicode_str
); /* window station name
*/
2819 /* Get
/set information about a user
object (window station or desktop
) */
2820 @
REQ(set_user_object_info
)
2821 obj_handle_t handle
; /* handle to the object
*/
2822 unsigned int flags
; /* information to set
*/
2823 unsigned int obj_flags
; /* new object flags
*/
2825 int is_desktop
; /* is object a desktop?
*/
2826 unsigned int old_obj_flags
; /* old object flags
*/
2827 VARARG(name
,unicode_str
); /* object name
*/
2829 #define SET_USER_OBJECT_FLAGS
1
2832 /* Register a hotkey
*/
2833 @
REQ(register_hotkey
)
2834 user_handle_t window
; /* handle to the window
*/
2835 int id
; /* hotkey identifier
*/
2836 unsigned int flags
; /* modifier keys
*/
2837 unsigned int vkey
; /* virtual key code
*/
2839 int replaced
; /* did we replace an existing hotkey?
*/
2840 unsigned int flags
; /* flags of replaced hotkey
*/
2841 unsigned int vkey
; /* virtual key code of replaced hotkey
*/
2845 /* Unregister a hotkey
*/
2846 @
REQ(unregister_hotkey
)
2847 user_handle_t window
; /* handle to the window
*/
2848 int id
; /* hotkey identifier
*/
2850 unsigned int flags
; /* flags of removed hotkey
*/
2851 unsigned int vkey
; /* virtual key code of removed hotkey
*/
2855 /* Attach (or detach
) thread inputs
*/
2856 @
REQ(attach_thread_input
)
2857 thread_id_t tid_from
; /* thread to be attached
*/
2858 thread_id_t tid_to
; /* thread to which tid_from should be attached
*/
2859 int attach
; /* is it an attach?
*/
2863 /* Get input data for a given thread
*/
2864 @
REQ(get_thread_input
)
2865 thread_id_t tid
; /* id of thread
*/
2867 user_handle_t focus
; /* handle to the focus window
*/
2868 user_handle_t capture
; /* handle to the capture window
*/
2869 user_handle_t active
; /* handle to the active window
*/
2870 user_handle_t foreground
; /* handle to the global foreground window
*/
2871 user_handle_t menu_owner
; /* handle to the menu owner
*/
2872 user_handle_t move_size
; /* handle to the moving
/resizing window
*/
2873 user_handle_t caret
; /* handle to the caret window
*/
2874 user_handle_t cursor
; /* handle to the cursor
*/
2875 int show_count
; /* cursor show count
*/
2876 rectangle_t rect
; /* caret rectangle
*/
2880 /* Get the time of the last input event
*/
2881 @
REQ(get_last_input_time
)
2887 /* Retrieve queue keyboard state for a given thread
*/
2889 thread_id_t tid
; /* id of thread
*/
2890 int key
; /* optional key code or
-1 */
2892 unsigned char state
; /* state of specified key
*/
2893 VARARG(keystate
,bytes
); /* state array for all the keys
*/
2896 /* Set queue keyboard state for a given thread
*/
2898 thread_id_t tid
; /* id of thread
*/
2899 int async
; /* whether to change the async state too
*/
2900 VARARG(keystate
,bytes
); /* state array for all the keys
*/
2903 /* Set the system foreground window
*/
2904 @
REQ(set_foreground_window
)
2905 user_handle_t handle
; /* handle to the foreground window
*/
2907 user_handle_t previous
; /* handle to the previous foreground window
*/
2908 int send_msg_old
; /* whether we have to send a msg to the old window
*/
2909 int send_msg_new
; /* whether we have to send a msg to the new window
*/
2912 /* Set the current thread focus window
*/
2913 @
REQ(set_focus_window
)
2914 user_handle_t handle
; /* handle to the focus window
*/
2916 user_handle_t previous
; /* handle to the previous focus window
*/
2919 /* Set the current thread active window
*/
2920 @
REQ(set_active_window
)
2921 user_handle_t handle
; /* handle to the active window
*/
2923 user_handle_t previous
; /* handle to the previous active window
*/
2926 /* Set the current thread capture window
*/
2927 @
REQ(set_capture_window
)
2928 user_handle_t handle
; /* handle to the capture window
*/
2929 unsigned int flags
; /* capture
flags (see below
) */
2931 user_handle_t previous
; /* handle to the previous capture window
*/
2932 user_handle_t full_handle
; /* full
32-bit handle of new capture window
*/
2934 #define CAPTURE_MENU
0x01 /* capture is for a menu
*/
2935 #define CAPTURE_MOVESIZE
0x02 /* capture is for moving
/resizing
*/
2938 /* Set the current thread caret window
*/
2939 @
REQ(set_caret_window
)
2940 user_handle_t handle
; /* handle to the caret window
*/
2941 int width
; /* caret width
*/
2942 int height
; /* caret height
*/
2944 user_handle_t previous
; /* handle to the previous caret window
*/
2945 rectangle_t old_rect
; /* previous caret rectangle
*/
2946 int old_hide
; /* previous hide count
*/
2947 int old_state
; /* previous caret
state (1=on
, 0=off
) */
2951 /* Set the current thread caret information
*/
2952 @
REQ(set_caret_info
)
2953 unsigned int flags
; /* caret
flags (see below
) */
2954 user_handle_t handle
; /* handle to the caret window
*/
2955 int x
; /* caret x position
*/
2956 int y
; /* caret y position
*/
2957 int hide
; /* increment for hide
count (can be negative to show it
) */
2958 int state
; /* caret
state (1=on
, 0=off
, -1=toggle current state
) */
2960 user_handle_t full_handle
; /* handle to the current caret window
*/
2961 rectangle_t old_rect
; /* previous caret rectangle
*/
2962 int old_hide
; /* previous hide count
*/
2963 int old_state
; /* previous caret
state (1=on
, 0=off
) */
2965 #define SET_CARET_POS
0x01 /* set the caret position from x
,y
*/
2966 #define SET_CARET_HIDE
0x02 /* increment the caret hide count
*/
2967 #define SET_CARET_STATE
0x04 /* set the caret on
/off state
*/
2970 /* Set a window hook
*/
2972 int id
; /* id of the hook
*/
2973 process_id_t pid
; /* id of process to set the hook into
*/
2974 thread_id_t tid
; /* id of thread to set the hook into
*/
2977 client_ptr_t proc
; /* hook procedure
*/
2979 int unicode
; /* is it a unicode hook?
*/
2980 VARARG(module
,unicode_str
); /* module name
*/
2982 user_handle_t handle
; /* handle to the hook
*/
2983 unsigned int active_hooks
; /* active hooks bitmap
*/
2987 /* Remove a window hook
*/
2989 user_handle_t handle
; /* handle to the hook
*/
2990 client_ptr_t proc
; /* hook procedure if handle is
0 */
2991 int id
; /* id of the hook if handle is
0 */
2993 unsigned int active_hooks
; /* active hooks bitmap
*/
2997 /* Start calling a hook chain
*/
2998 @
REQ(start_hook_chain
)
2999 int id
; /* id of the hook
*/
3000 int event
; /* signalled event
*/
3001 user_handle_t window
; /* handle to the event window
*/
3002 int object_id
; /* object id for out of context winevent
*/
3003 int child_id
; /* child id for out of context winevent
*/
3005 user_handle_t handle
; /* handle to the next hook
*/
3006 process_id_t pid
; /* process id for low
-level keyboard
/mouse hooks
*/
3007 thread_id_t tid
; /* thread id for low
-level keyboard
/mouse hooks
*/
3008 int unicode
; /* is it a unicode hook?
*/
3009 client_ptr_t proc
; /* hook procedure
*/
3010 unsigned int active_hooks
; /* active hooks bitmap
*/
3011 VARARG(module
,unicode_str
); /* module name
*/
3015 /* Finished calling a hook chain
*/
3016 @
REQ(finish_hook_chain
)
3017 int id
; /* id of the hook
*/
3021 /* Get the hook information
*/
3023 user_handle_t handle
; /* handle to the current hook
*/
3024 int get_next
; /* do we want info about current or next hook?
*/
3025 int event
; /* signalled event
*/
3026 user_handle_t window
; /* handle to the event window
*/
3027 int object_id
; /* object id for out of context winevent
*/
3028 int child_id
; /* child id for out of context winevent
*/
3030 user_handle_t handle
; /* handle to the hook
*/
3031 int id
; /* id of the hook
*/
3032 process_id_t pid
; /* process id for low
-level keyboard
/mouse hooks
*/
3033 thread_id_t tid
; /* thread id for low
-level keyboard
/mouse hooks
*/
3034 client_ptr_t proc
; /* hook procedure
*/
3035 int unicode
; /* is it a unicode hook?
*/
3036 VARARG(module
,unicode_str
); /* module name
*/
3040 /* Create a window class
*/
3042 int local
; /* is it a local class?
*/
3043 atom_t atom
; /* class atom
*/
3044 unsigned int style
; /* class style
*/
3045 mod_handle_t instance
; /* module instance
*/
3046 int extra
; /* number of extra class bytes
*/
3047 int win_extra
; /* number of window extra bytes
*/
3048 client_ptr_t client_ptr
; /* pointer to class in client address space
*/
3049 VARARG(name
,unicode_str
); /* class name
*/
3051 atom_t atom
; /* resulting class atom
*/
3055 /* Destroy a window class
*/
3057 atom_t atom
; /* class atom
*/
3058 mod_handle_t instance
; /* module instance
*/
3059 VARARG(name
,unicode_str
); /* class name
*/
3061 client_ptr_t client_ptr
; /* pointer to class in client address space
*/
3065 /* Set some information in a class
*/
3066 @
REQ(set_class_info
)
3067 user_handle_t window
; /* handle to the window
*/
3068 unsigned int flags
; /* flags for info to
set (see below
) */
3069 atom_t atom
; /* class atom
*/
3070 unsigned int style
; /* class style
*/
3071 int win_extra
; /* number of window extra bytes
*/
3072 mod_handle_t instance
; /* module instance
*/
3073 int extra_offset
; /* offset to set in extra bytes
*/
3074 data_size_t extra_size
; /* size to set in extra bytes
*/
3075 lparam_t extra_value
; /* value to set in extra bytes
*/
3077 atom_t old_atom
; /* previous class atom
*/
3078 unsigned int old_style
; /* previous class style
*/
3079 int old_extra
; /* previous number of class extra bytes
*/
3080 int old_win_extra
; /* previous number of window extra bytes
*/
3081 mod_handle_t old_instance
; /* previous module instance
*/
3082 lparam_t old_extra_value
; /* old value in extra bytes
*/
3084 #define SET_CLASS_ATOM
0x0001
3085 #define SET_CLASS_STYLE
0x0002
3086 #define SET_CLASS_WINEXTRA
0x0004
3087 #define SET_CLASS_INSTANCE
0x0008
3088 #define SET_CLASS_EXTRA
0x0010
3091 /* Set
/get clipboard information
*/
3092 @
REQ(set_clipboard_info
)
3093 unsigned int flags
; /* flags for fields to
set (see below
) */
3094 user_handle_t clipboard
; /* clipboard window
*/
3095 user_handle_t owner
; /* clipboard owner
*/
3096 user_handle_t viewer
; /* first clipboard viewer
*/
3097 unsigned int seqno
; /* change sequence number
*/
3099 unsigned int flags
; /* status
flags (see below
) */
3100 user_handle_t old_clipboard
; /* old clipboard window
*/
3101 user_handle_t old_owner
; /* old clipboard owner
*/
3102 user_handle_t old_viewer
; /* old clipboard viewer
*/
3103 unsigned int seqno
; /* current sequence number
*/
3106 #define SET_CB_OPEN
0x001
3107 #define SET_CB_VIEWER
0x004
3108 #define SET_CB_SEQNO
0x008
3109 #define SET_CB_RELOWNER
0x010
3110 #define SET_CB_CLOSE
0x020
3111 #define CB_OPEN
0x040
3112 #define CB_OWNER
0x080
3113 #define CB_PROCESS
0x100
3116 /* Empty the clipboard and grab ownership
*/
3117 @
REQ(empty_clipboard
)
3121 /* Open a security token
*/
3123 obj_handle_t handle
; /* handle to the thread or process
*/
3124 unsigned int access
; /* access rights to the new token
*/
3125 unsigned int attributes
;/* object attributes
*/
3126 unsigned int flags
; /* flags (see below
) */
3128 obj_handle_t token
; /* handle to the token
*/
3130 #define OPEN_TOKEN_THREAD
1
3131 #define OPEN_TOKEN_AS_SELF
2
3134 /* Set
/get the global windows
*/
3135 @
REQ(set_global_windows
)
3136 unsigned int flags
; /* flags for fields to
set (see below
) */
3137 user_handle_t shell_window
; /* handle to the new shell window
*/
3138 user_handle_t shell_listview
; /* handle to the new shell listview window
*/
3139 user_handle_t progman_window
; /* handle to the new program manager window
*/
3140 user_handle_t taskman_window
; /* handle to the new task manager window
*/
3142 user_handle_t old_shell_window
; /* handle to the shell window
*/
3143 user_handle_t old_shell_listview
; /* handle to the shell listview window
*/
3144 user_handle_t old_progman_window
; /* handle to the new program manager window
*/
3145 user_handle_t old_taskman_window
; /* handle to the new task manager window
*/
3147 #define SET_GLOBAL_SHELL_WINDOWS
0x01 /* set both main shell and listview windows
*/
3148 #define SET_GLOBAL_PROGMAN_WINDOW
0x02
3149 #define SET_GLOBAL_TASKMAN_WINDOW
0x04
3151 /* Adjust the privileges held by a token
*/
3152 @
REQ(adjust_token_privileges
)
3153 obj_handle_t handle
; /* handle to the token
*/
3154 int disable_all
; /* disable all privileges?
*/
3155 int get_modified_state
; /* get modified privileges?
*/
3156 VARARG(privileges
,LUID_AND_ATTRIBUTES
); /* privileges to enable
/disable
/remove
*/
3158 unsigned int len
; /* total length in bytes required to store token privileges
*/
3159 VARARG(privileges
,LUID_AND_ATTRIBUTES
); /* modified privileges
*/
3162 /* Retrieves the set of privileges held by or available to a token
*/
3163 @
REQ(get_token_privileges
)
3164 obj_handle_t handle
; /* handle to the token
*/
3166 unsigned int len
; /* total length in bytes required to store token privileges
*/
3167 VARARG(privileges
,LUID_AND_ATTRIBUTES
); /* privileges held by or available to a token
*/
3170 /* Check the token has the required privileges
*/
3171 @
REQ(check_token_privileges
)
3172 obj_handle_t handle
; /* handle to the token
*/
3173 int all_required
; /* are all the privileges required for the check to succeed?
*/
3174 VARARG(privileges
,LUID_AND_ATTRIBUTES
); /* privileges to check
*/
3176 int has_privileges
; /* does the token have the required privileges?
*/
3177 VARARG(privileges
,LUID_AND_ATTRIBUTES
); /* privileges held by or available to a token
*/
3180 @
REQ(duplicate_token
)
3181 obj_handle_t handle
; /* handle to the token to duplicate
*/
3182 unsigned int access
; /* access rights to the new token
*/
3183 unsigned int attributes
; /* object attributes
*/
3184 int primary
; /* is the new token to be a primary one?
*/
3185 int impersonation_level
; /* impersonation level of the new token
*/
3187 obj_handle_t new_handle
; /* duplicated handle
*/
3191 obj_handle_t handle
; /* handle to the token
*/
3192 unsigned int desired_access
; /* desired access to the object
*/
3193 unsigned int mapping_read
; /* mapping from generic read to specific rights
*/
3194 unsigned int mapping_write
; /* mapping from generic write to specific rights
*/
3195 unsigned int mapping_execute
; /* mapping from generic execute to specific rights
*/
3196 unsigned int mapping_all
; /* mapping from generic all to specific rights
*/
3197 VARARG(sd
,security_descriptor
); /* security descriptor to check
*/
3199 unsigned int access_granted
; /* access rights actually granted
*/
3200 unsigned int access_status
; /* was access granted?
*/
3201 unsigned int privileges_len
; /* length needed to store privileges
*/
3202 VARARG(privileges
,LUID_AND_ATTRIBUTES
); /* privileges used during access check
*/
3206 obj_handle_t handle
; /* handle to the token
*/
3207 unsigned int which_sid
; /* which SID to retrieve from the token
*/
3209 data_size_t sid_len
; /* length needed to store sid
*/
3210 VARARG(sid
,SID
); /* the sid specified by which_sid from the token
*/
3213 @
REQ(get_token_groups
)
3214 obj_handle_t handle
; /* handle to the token
*/
3216 data_size_t user_len
; /* length needed to store user
*/
3217 VARARG(user
,token_groups
); /* groups the token
's user belongs to */
3220 @REQ(get_token_default_dacl)
3221 obj_handle_t handle; /* handle to the token */
3223 data_size_t acl_len; /* length needed to store access control list */
3224 VARARG(acl,ACL); /* access control list */
3227 @REQ(set_token_default_dacl)
3228 obj_handle_t handle; /* handle to the token */
3229 VARARG(acl,ACL); /* default dacl to set */
3232 @REQ(set_security_object)
3233 obj_handle_t handle; /* handle to the object */
3234 unsigned int security_info; /* which parts of security descriptor to set */
3235 VARARG(sd,security_descriptor); /* security descriptor to set */
3238 @REQ(get_security_object)
3239 obj_handle_t handle; /* handle to the object */
3240 unsigned int security_info; /* which parts of security descriptor to get */
3242 unsigned int sd_len; /* buffer size needed for sd */
3243 VARARG(sd,security_descriptor); /* retrieved security descriptor */
3246 /* Create a mailslot */
3247 @REQ(create_mailslot)
3248 unsigned int access; /* wanted access rights */
3249 unsigned int attributes; /* object attributes */
3250 obj_handle_t rootdir; /* root directory */
3251 timeout_t read_timeout;
3252 unsigned int max_msgsize;
3253 VARARG(name,unicode_str); /* mailslot name */
3255 obj_handle_t handle; /* handle to the mailslot */
3259 /* Set mailslot information */
3260 @REQ(set_mailslot_info)
3261 obj_handle_t handle; /* handle to the mailslot */
3262 timeout_t read_timeout;
3265 timeout_t read_timeout;
3266 unsigned int max_msgsize;
3268 #define MAILSLOT_SET_READ_TIMEOUT 1
3271 /* Create a directory object */
3272 @REQ(create_directory)
3273 unsigned int access; /* access flags */
3274 unsigned int attributes; /* object attributes */
3275 obj_handle_t rootdir; /* root directory */
3276 VARARG(directory_name,unicode_str); /* Directory name */
3278 obj_handle_t handle; /* handle to the directory */
3282 /* Open a directory object */
3283 @REQ(open_directory)
3284 unsigned int access; /* access flags */
3285 unsigned int attributes; /* object attributes */
3286 obj_handle_t rootdir; /* root directory */
3287 VARARG(directory_name,unicode_str); /* Directory name */
3289 obj_handle_t handle; /* handle to the directory */
3293 /* Get a directory entry by index */
3294 @REQ(get_directory_entry)
3295 obj_handle_t handle; /* handle to the directory */
3296 unsigned int index; /* entry index */
3298 data_size_t name_len; /* length of the entry name in bytes */
3299 VARARG(name,unicode_str,name_len); /* entry name */
3300 VARARG(type,unicode_str); /* entry type */
3304 /* Create a symbolic link object */
3305 @REQ(create_symlink)
3306 unsigned int access; /* access flags */
3307 unsigned int attributes; /* object attributes */
3308 obj_handle_t rootdir; /* root directory */
3309 data_size_t name_len; /* length of the symlink name in bytes */
3310 VARARG(name,unicode_str,name_len); /* symlink name */
3311 VARARG(target_name,unicode_str); /* target name */
3313 obj_handle_t handle; /* handle to the symlink */
3317 /* Open a symbolic link object */
3319 unsigned int access; /* access flags */
3320 unsigned int attributes; /* object attributes */
3321 obj_handle_t rootdir; /* root directory */
3322 VARARG(name,unicode_str); /* symlink name */
3324 obj_handle_t handle; /* handle to the symlink */
3328 /* Query a symbolic link object */
3330 obj_handle_t handle; /* handle to the symlink */
3332 data_size_t total; /* total needed size for name */
3333 VARARG(target_name,unicode_str); /* target name */
3337 /* Query basic object information */
3338 @REQ(get_object_info)
3339 obj_handle_t handle; /* handle to the object */
3341 unsigned int access; /* granted access mask */
3342 unsigned int ref_count; /* object ref count */
3343 unsigned int handle_count; /* object handle count */
3344 data_size_t total; /* total needed size for name */
3345 VARARG(name,unicode_str); /* object name */
3349 /* Query object type name information */
3350 @REQ(get_object_type)
3351 obj_handle_t handle; /* handle to the object */
3353 data_size_t total; /* needed size for type name */
3354 VARARG(type,unicode_str); /* type name */
3358 /* Unlink a named object */
3360 obj_handle_t handle; /* handle to the object */
3364 /* Query the impersonation level of an impersonation token */
3365 @REQ(get_token_impersonation_level)
3366 obj_handle_t handle; /* handle to the object */
3368 int impersonation_level; /* impersonation level of the impersonation token */
3371 /* Allocate a locally-unique identifier */
3372 @REQ(allocate_locally_unique_id)
3378 /* Create a device manager */
3379 @REQ(create_device_manager)
3380 unsigned int access; /* wanted access rights */
3381 unsigned int attributes; /* object attributes */
3383 obj_handle_t handle; /* handle to the device */
3387 /* Create a device */
3389 unsigned int access; /* wanted access rights */
3390 unsigned int attributes; /* object attributes */
3391 obj_handle_t rootdir; /* root directory */
3392 client_ptr_t user_ptr; /* opaque ptr for use by client */
3393 obj_handle_t manager; /* device manager */
3394 VARARG(name,unicode_str); /* object name */
3396 obj_handle_t handle; /* handle to the device */
3400 /* Delete a device */
3402 obj_handle_t handle; /* handle to the device */
3406 /* Retrieve the next pending device irp request */
3407 @REQ(get_next_device_request)
3408 obj_handle_t manager; /* handle to the device manager */
3409 obj_handle_t prev; /* handle to the previous irp */
3410 unsigned int status; /* status of the previous irp */
3412 irp_params_t params; /* irp parameters */
3413 obj_handle_t next; /* handle to the next irp */
3414 process_id_t client_pid; /* pid of process calling irp */
3415 thread_id_t client_tid; /* tid of thread calling irp */
3416 data_size_t in_size; /* total needed input size */
3417 data_size_t out_size; /* needed output size */
3418 VARARG(next_data,bytes); /* input data of the next irp */
3422 /* Make the current process a system process */
3423 @REQ(make_process_system)
3425 obj_handle_t event; /* event signaled when all user processes have exited */
3429 /* Get detailed fixed-size information about a token */
3430 @REQ(get_token_statistics)
3431 obj_handle_t handle; /* handle to the object */
3433 luid_t token_id; /* locally-unique identifier of the token */
3434 luid_t modified_id; /* locally-unique identifier of the modified version of the token */
3435 int primary; /* is the token primary or impersonation? */
3436 int impersonation_level; /* level of impersonation */
3437 int group_count; /* the number of groups the token is a member of */
3438 int privilege_count; /* the number of privileges the token has */
3442 /* Create I/O completion port */
3443 @REQ(create_completion)
3444 unsigned int access; /* desired access to a port */
3445 unsigned int attributes; /* object attributes */
3446 unsigned int concurrent; /* max number of concurrent active threads */
3447 obj_handle_t rootdir; /* root directory */
3448 VARARG(filename,unicode_str); /* port name */
3450 obj_handle_t handle; /* port handle */
3454 /* Open I/O completion port */
3455 @REQ(open_completion)
3456 unsigned int access; /* desired access to a port */
3457 unsigned int attributes; /* object attributes */
3458 obj_handle_t rootdir; /* root directory */
3459 VARARG(filename,unicode_str); /* port name */
3461 obj_handle_t handle; /* port handle */
3465 /* add completion to completion port */
3466 @REQ(add_completion)
3467 obj_handle_t handle; /* port handle */
3468 apc_param_t ckey; /* completion key */
3469 apc_param_t cvalue; /* completion value */
3470 apc_param_t information; /* IO_STATUS_BLOCK Information */
3471 unsigned int status; /* completion result */
3475 /* get completion from completion port queue */
3476 @REQ(remove_completion)
3477 obj_handle_t handle; /* port handle */
3479 apc_param_t ckey; /* completion key */
3480 apc_param_t cvalue; /* completion value */
3481 apc_param_t information; /* IO_STATUS_BLOCK Information */
3482 unsigned int status; /* completion result */
3486 /* get completion queue depth */
3487 @REQ(query_completion)
3488 obj_handle_t handle; /* port handle */
3490 unsigned int depth; /* completion queue depth */
3494 /* associate object with completion port */
3495 @REQ(set_completion_info)
3496 obj_handle_t handle; /* object handle */
3497 apc_param_t ckey; /* completion key */
3498 obj_handle_t chandle; /* port handle */
3502 /* check for associated completion and push msg */
3503 @REQ(add_fd_completion)
3504 obj_handle_t handle; /* async' object
*/
3505 apc_param_t cvalue
; /* completion value
*/
3506 apc_param_t information
; /* IO_STATUS_BLOCK Information
*/
3507 unsigned int status
; /* completion status
*/
3511 /* Retrieve layered info for a window
*/
3512 @
REQ(get_window_layered_info
)
3513 user_handle_t handle
; /* handle to the window
*/
3515 unsigned int color_key
; /* color key
*/
3516 unsigned int alpha
; /* alpha (0.
.255) */
3517 unsigned int flags
; /* LWA_
* flags
*/
3521 /* Set layered info for a window
*/
3522 @
REQ(set_window_layered_info
)
3523 user_handle_t handle
; /* handle to the window
*/
3524 unsigned int color_key
; /* color key
*/
3525 unsigned int alpha
; /* alpha (0.
.255) */
3526 unsigned int flags
; /* LWA_
* flags
*/
3530 /* Allocate an arbitrary user handle
*/
3531 @
REQ(alloc_user_handle
)
3533 user_handle_t handle
; /* allocated handle
*/
3537 /* Free an arbitrary user handle
*/
3538 @
REQ(free_user_handle
)
3539 user_handle_t handle
; /* handle to free
*/
3543 /* Set
/get the current cursor
*/
3545 unsigned int flags
; /* flags for fields to
set (see below
) */
3546 user_handle_t handle
; /* handle to the cursor
*/
3547 int show_count
; /* show count increment
/decrement
*/
3548 int x
; /* cursor position
*/
3550 rectangle_t clip
; /* cursor clip rectangle
*/
3551 unsigned int clip_msg
; /* message to post on cursor clip changes
*/
3553 user_handle_t prev_handle
; /* previous handle
*/
3554 int prev_count
; /* previous show count
*/
3555 int prev_x
; /* previous position
*/
3557 int new_x
; /* new position
*/
3559 rectangle_t new_clip
; /* new clip rectangle
*/
3560 unsigned int last_change
; /* time of last position change
*/
3562 #define SET_CURSOR_HANDLE
0x01
3563 #define SET_CURSOR_COUNT
0x02
3564 #define SET_CURSOR_POS
0x04
3565 #define SET_CURSOR_CLIP
0x08
3566 #define SET_CURSOR_NOCLIP
0x10
3569 /* Modify the list of registered rawinput devices
*/
3570 @
REQ(update_rawinput_devices
)
3571 VARARG(devices
,rawinput_devices
);
3575 /* Retrieve the suspended context of a thread
*/
3576 @
REQ(get_suspend_context
)
3578 VARARG(context
,context
); /* thread context
*/
3582 /* Store the suspend context of a thread
*/
3583 @
REQ(set_suspend_context
)
3584 VARARG(context
,context
); /* thread context
*/
3588 /* Create a new job object
*/
3590 unsigned int access
; /* wanted access rights
*/
3591 unsigned int attributes
; /* object attributes
*/
3592 VARARG(objattr
,object_attributes
); /* object attributes
*/
3594 obj_handle_t handle
; /* handle to the job
*/
3598 /* Assign a job object to a process
*/
3600 obj_handle_t job
; /* handle to the job
*/
3601 obj_handle_t process
; /* handle to the process
*/
3605 /* Check if a process is associated with a job
*/
3606 @
REQ(process_in_job
)
3607 obj_handle_t job
; /* handle to the job
*/
3608 obj_handle_t process
; /* handle to the process
*/
3612 /* Set limit flags on a job
*/
3613 @
REQ(set_job_limits
)
3614 obj_handle_t handle
; /* handle to the job
*/
3615 unsigned int limit_flags
; /* new limit flags
*/
3619 /* Set new completion port for a job
*/
3620 @
REQ(set_job_completion_port
)
3621 obj_handle_t job
; /* handle to the job
*/
3622 obj_handle_t port
; /* handle to the completion port
*/
3623 client_ptr_t key
; /* key to send with completion messages
*/
3627 /* Terminate all processes associated with the job
*/
3629 obj_handle_t handle
; /* handle to the job
*/
3630 int status
; /* process exit code
*/