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_READ
*/
656 unsigned int key
; /* driver key
*/
657 file_pos_t pos
; /* file position
*/
661 unsigned int major
; /* IRP_MJ_WRITE
*/
662 unsigned int key
; /* driver key
*/
663 file_pos_t pos
; /* file position
*/
667 unsigned int major
; /* IRP_MJ_DEVICE_CONTROL
*/
668 ioctl_code_t code
; /* ioctl code
*/
672 struct rawinput_device
674 unsigned short usage_page
;
675 unsigned short usage
;
677 user_handle_t target
;
680 /****************************************************************/
681 /* Request declarations
*/
683 /* Create a new process from the context of the parent
*/
685 int inherit_all
; /* inherit all handles from parent
*/
686 unsigned int create_flags
; /* creation flags
*/
687 int socket_fd
; /* file descriptor for process socket
*/
688 obj_handle_t exe_file
; /* file handle for main exe
*/
689 unsigned int process_access
; /* access rights for process object
*/
690 unsigned int process_attr
; /* attributes for process object
*/
691 unsigned int thread_access
; /* access rights for thread object
*/
692 unsigned int thread_attr
; /* attributes for thread object
*/
693 cpu_type_t cpu
; /* CPU that the new process will use
*/
694 data_size_t info_size
; /* size of startup info
*/
695 VARARG(info
,startup_info
,info_size
); /* startup information
*/
696 VARARG(env
,unicode_str
); /* environment for new process
*/
698 obj_handle_t info
; /* new process info handle
*/
699 process_id_t pid
; /* process id
*/
700 obj_handle_t phandle
; /* process
handle (in the current process
) */
701 thread_id_t tid
; /* thread id
*/
702 obj_handle_t thandle
; /* thread
handle (in the current process
) */
706 /* Retrieve information about a newly started process
*/
707 @
REQ(get_new_process_info
)
708 obj_handle_t info
; /* info handle returned from new_process_request
*/
710 int success
; /* did the process start successfully?
*/
711 int exit_code
; /* process exit code if failed
*/
715 /* Create a new thread from the context of the parent
*/
717 unsigned int access
; /* wanted access rights
*/
718 unsigned int attributes
; /* object attributes
*/
719 int suspend
; /* new thread should be suspended on creation
*/
720 int request_fd
; /* fd for request pipe
*/
722 thread_id_t tid
; /* thread id
*/
723 obj_handle_t handle
; /* thread
handle (in the current process
) */
727 /* Retrieve the new process startup info
*/
728 @
REQ(get_startup_info
)
730 obj_handle_t exe_file
; /* file handle for main exe
*/
731 data_size_t info_size
; /* size of startup info
*/
732 VARARG(info
,startup_info
,info_size
); /* startup information
*/
733 VARARG(env
,unicode_str
); /* environment
*/
737 /* Signal the end of the process initialization
*/
738 @
REQ(init_process_done
)
739 int gui
; /* is it a GUI process?
*/
740 mod_handle_t module
; /* main module base address
*/
741 client_ptr_t ldt_copy
; /* address of LDT
copy (in thread address space
) */
742 client_ptr_t entry
; /* process entry point
*/
746 /* Initialize a thread
; called from the child after
fork()/clone() */
748 int unix_pid
; /* Unix pid of new thread
*/
749 int unix_tid
; /* Unix tid of new thread
*/
750 int debug_level
; /* new debug level
*/
751 client_ptr_t teb
; /* TEB of new
thread (in thread address space
) */
752 client_ptr_t entry
; /* entry point or PEB if initial
thread (in thread address space
) */
753 int reply_fd
; /* fd for reply pipe
*/
754 int wait_fd
; /* fd for blocking calls pipe
*/
755 cpu_type_t cpu
; /* CPU that this thread is running on
*/
757 process_id_t pid
; /* process id of the new thread
's process */
758 thread_id_t tid; /* thread id of the new thread */
759 timeout_t server_start; /* server start time */
760 data_size_t info_size; /* total size of startup info */
761 int version; /* protocol version */
762 unsigned int all_cpus; /* bitset of supported CPUs */
766 /* Terminate a process */
767 @REQ(terminate_process)
768 obj_handle_t handle; /* process handle to terminate */
769 int exit_code; /* process exit code */
771 int self; /* suicide? */
775 /* Terminate a thread */
776 @REQ(terminate_thread)
777 obj_handle_t handle; /* thread handle to terminate */
778 int exit_code; /* thread exit code */
780 int self; /* suicide? */
781 int last; /* last thread in this process? */
785 /* Retrieve information about a process */
786 @REQ(get_process_info)
787 obj_handle_t handle; /* process handle */
789 process_id_t pid; /* server process id */
790 process_id_t ppid; /* server process id of parent */
791 affinity_t affinity; /* process affinity mask */
792 client_ptr_t peb; /* PEB address in process address space */
793 timeout_t start_time; /* process start time */
794 timeout_t end_time; /* process end time */
795 int exit_code; /* process exit code */
796 int priority; /* priority class */
797 cpu_type_t cpu; /* CPU that this process is running on */
798 int debugger_present; /* process is being debugged */
802 /* Set a process information */
803 @REQ(set_process_info)
804 obj_handle_t handle; /* process handle */
805 int mask; /* setting mask (see below) */
806 int priority; /* priority class */
807 affinity_t affinity; /* affinity mask */
809 #define SET_PROCESS_INFO_PRIORITY 0x01
810 #define SET_PROCESS_INFO_AFFINITY 0x02
813 /* Retrieve information about a thread */
814 @REQ(get_thread_info)
815 obj_handle_t handle; /* thread handle */
816 thread_id_t tid_in; /* thread id (optional) */
818 process_id_t pid; /* server process id */
819 thread_id_t tid; /* server thread id */
820 client_ptr_t teb; /* thread teb pointer */
821 affinity_t affinity; /* thread affinity mask */
822 timeout_t creation_time; /* thread creation time */
823 timeout_t exit_time; /* thread exit time */
824 int exit_code; /* thread exit code */
825 int priority; /* thread priority level */
826 int last; /* last thread in process */
830 /* Set a thread information */
831 @REQ(set_thread_info)
832 obj_handle_t handle; /* thread handle */
833 int mask; /* setting mask (see below) */
834 int priority; /* priority class */
835 affinity_t affinity; /* affinity mask */
836 obj_handle_t token; /* impersonation token */
838 #define SET_THREAD_INFO_PRIORITY 0x01
839 #define SET_THREAD_INFO_AFFINITY 0x02
840 #define SET_THREAD_INFO_TOKEN 0x04
843 /* Retrieve information about a module */
845 obj_handle_t handle; /* process handle */
846 mod_handle_t base_address; /* base address of module */
848 client_ptr_t entry_point;
849 data_size_t size; /* module size */
850 data_size_t filename_len; /* buffer len in bytes required to store filename */
851 VARARG(filename,unicode_str); /* file name of module */
855 /* Suspend a thread */
857 obj_handle_t handle; /* thread handle */
859 int count; /* new suspend count */
863 /* Resume a thread */
865 obj_handle_t handle; /* thread handle */
867 int count; /* new suspend count */
871 /* Notify the server that a dll has been loaded */
873 obj_handle_t mapping; /* file mapping handle */
874 mod_handle_t base; /* base address */
875 client_ptr_t name; /* ptr to ptr to name (in process addr space) */
876 data_size_t size; /* dll size */
877 int dbg_offset; /* debug info offset */
878 int dbg_size; /* debug info size */
879 VARARG(filename,unicode_str); /* file name of dll */
883 /* Notify the server that a dll is being unloaded */
885 mod_handle_t base; /* base address */
889 /* Queue an APC for a thread or process */
891 obj_handle_t handle; /* thread or process handle */
892 apc_call_t call; /* call arguments */
894 obj_handle_t handle; /* APC handle */
895 int self; /* run APC in caller itself? */
899 /* Get the result of an APC call */
901 obj_handle_t handle; /* handle to the APC */
903 apc_result_t result; /* result of the APC */
907 /* Close a handle for the current process */
909 obj_handle_t handle; /* handle to close */
913 /* Set a handle information */
914 @REQ(set_handle_info)
915 obj_handle_t handle; /* handle we are interested in */
916 int flags; /* new handle flags */
917 int mask; /* mask for flags to set */
919 int old_flags; /* old flag value */
923 /* Duplicate a handle */
925 obj_handle_t src_process; /* src process handle */
926 obj_handle_t src_handle; /* src handle to duplicate */
927 obj_handle_t dst_process; /* dst process handle */
928 unsigned int access; /* wanted access rights */
929 unsigned int attributes; /* object attributes */
930 unsigned int options; /* duplicate options (see below) */
932 obj_handle_t handle; /* duplicated handle in dst process */
933 int self; /* is the source the current process? */
934 int closed; /* whether the source handle has been closed */
936 #define DUP_HANDLE_CLOSE_SOURCE DUPLICATE_CLOSE_SOURCE
937 #define DUP_HANDLE_SAME_ACCESS DUPLICATE_SAME_ACCESS
938 #define DUP_HANDLE_MAKE_GLOBAL 0x80000000 /* Not a Windows flag */
941 /* Open a handle to a process */
943 process_id_t pid; /* process id to open */
944 unsigned int access; /* wanted access rights */
945 unsigned int attributes; /* object attributes */
947 obj_handle_t handle; /* handle to the process */
951 /* Open a handle to a thread */
953 thread_id_t tid; /* thread id to open */
954 unsigned int access; /* wanted access rights */
955 unsigned int attributes; /* object attributes */
957 obj_handle_t handle; /* handle to the thread */
961 /* Wait for handles */
963 int flags; /* wait flags (see below) */
964 client_ptr_t cookie; /* magic cookie to return to client */
965 timeout_t timeout; /* timeout */
966 obj_handle_t prev_apc; /* handle to previous APC */
967 VARARG(result,apc_result); /* result of previous APC */
968 VARARG(data,select_op); /* operation-specific data */
970 timeout_t timeout; /* timeout converted to absolute */
971 apc_call_t call; /* APC call arguments */
972 obj_handle_t apc_handle; /* handle to next APC */
974 #define SELECT_ALERTABLE 1
975 #define SELECT_INTERRUPTIBLE 2
978 /* Create an event */
980 unsigned int access; /* wanted access rights */
981 unsigned int attributes; /* object attributes */
982 int manual_reset; /* manual reset event */
983 int initial_state; /* initial state of the event */
984 VARARG(objattr,object_attributes); /* object attributes */
986 obj_handle_t handle; /* handle to the event */
989 /* Event operation */
991 obj_handle_t handle; /* handle to event */
992 int op; /* event operation (see below) */
994 enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT };
997 obj_handle_t handle; /* handle to event */
999 int manual_reset; /* manual reset event */
1000 int state; /* current state of the event */
1005 unsigned int access; /* wanted access rights */
1006 unsigned int attributes; /* object attributes */
1007 obj_handle_t rootdir; /* root directory */
1008 VARARG(name,unicode_str); /* object name */
1010 obj_handle_t handle; /* handle to the event */
1014 /* Create a keyed event */
1015 @REQ(create_keyed_event)
1016 unsigned int access; /* wanted access rights */
1017 unsigned int attributes; /* object attributes */
1018 VARARG(objattr,object_attributes); /* object attributes */
1020 obj_handle_t handle; /* handle to the event */
1023 /* Open a keyed event */
1024 @REQ(open_keyed_event)
1025 unsigned int access; /* wanted access rights */
1026 unsigned int attributes; /* object attributes */
1027 obj_handle_t rootdir; /* root directory */
1028 VARARG(name,unicode_str); /* object name */
1030 obj_handle_t handle; /* handle to the event */
1034 /* Create a mutex */
1036 unsigned int access; /* wanted access rights */
1037 unsigned int attributes; /* object attributes */
1038 int owned; /* initially owned? */
1039 VARARG(objattr,object_attributes); /* object attributes */
1041 obj_handle_t handle; /* handle to the mutex */
1045 /* Release a mutex */
1047 obj_handle_t handle; /* handle to the mutex */
1049 unsigned int prev_count; /* value of internal counter, before release */
1055 unsigned int access; /* wanted access rights */
1056 unsigned int attributes; /* object attributes */
1057 obj_handle_t rootdir; /* root directory */
1058 VARARG(name,unicode_str); /* object name */
1060 obj_handle_t handle; /* handle to the mutex */
1064 /* Create a semaphore */
1065 @REQ(create_semaphore)
1066 unsigned int access; /* wanted access rights */
1067 unsigned int attributes; /* object attributes */
1068 unsigned int initial; /* initial count */
1069 unsigned int max; /* maximum count */
1070 VARARG(objattr,object_attributes); /* object attributes */
1072 obj_handle_t handle; /* handle to the semaphore */
1076 /* Release a semaphore */
1077 @REQ(release_semaphore)
1078 obj_handle_t handle; /* handle to the semaphore */
1079 unsigned int count; /* count to add to semaphore */
1081 unsigned int prev_count; /* previous semaphore count */
1084 @REQ(query_semaphore)
1085 obj_handle_t handle; /* handle to the semaphore */
1087 unsigned int current; /* current count */
1088 unsigned int max; /* maximum count */
1091 /* Open a semaphore */
1092 @REQ(open_semaphore)
1093 unsigned int access; /* wanted access rights */
1094 unsigned int attributes; /* object attributes */
1095 obj_handle_t rootdir; /* root directory */
1096 VARARG(name,unicode_str); /* object name */
1098 obj_handle_t handle; /* handle to the semaphore */
1104 unsigned int access; /* wanted access rights */
1105 unsigned int attributes; /* object attributes */
1106 unsigned int sharing; /* sharing flags */
1107 int create; /* file create action */
1108 unsigned int options; /* file options */
1109 unsigned int attrs; /* file attributes for creation */
1110 VARARG(objattr,object_attributes); /* object attributes */
1111 VARARG(filename,string); /* file name */
1113 obj_handle_t handle; /* handle to the file */
1117 /* Open a file object */
1118 @REQ(open_file_object)
1119 unsigned int access; /* wanted access rights */
1120 unsigned int attributes; /* open attributes */
1121 obj_handle_t rootdir; /* root directory */
1122 unsigned int sharing; /* sharing flags */
1123 unsigned int options; /* file options */
1124 VARARG(filename,unicode_str); /* file name */
1126 obj_handle_t handle; /* handle to the file */
1130 /* Allocate a file handle for a Unix fd */
1131 @REQ(alloc_file_handle)
1132 unsigned int access; /* wanted access rights */
1133 unsigned int attributes; /* object attributes */
1134 int fd; /* file descriptor on the client side */
1136 obj_handle_t handle; /* handle to the file */
1140 /* Get the Unix name from a file handle */
1141 @REQ(get_handle_unix_name)
1142 obj_handle_t handle; /* file handle */
1144 data_size_t name_len; /* unix name length */
1145 VARARG(name,string); /* unix name */
1149 /* Get a Unix fd to access a file */
1151 obj_handle_t handle; /* handle to the file */
1153 int type; /* file type (see below) */
1154 int cacheable; /* can fd be cached in the client? */
1155 unsigned int access; /* file access rights */
1156 unsigned int options; /* file open options */
1160 FD_TYPE_INVALID, /* invalid file (no associated fd) */
1161 FD_TYPE_FILE, /* regular file */
1162 FD_TYPE_DIR, /* directory */
1163 FD_TYPE_SOCKET, /* socket */
1164 FD_TYPE_SERIAL, /* serial port */
1165 FD_TYPE_PIPE, /* named pipe */
1166 FD_TYPE_MAILSLOT, /* mailslot */
1167 FD_TYPE_CHAR, /* unspecified char device */
1168 FD_TYPE_DEVICE, /* Windows device file */
1173 /* Flush a file buffers */
1175 int blocking; /* whether it's a blocking flush
*/
1176 async_data_t async
; /* async I
/O parameters
*/
1178 obj_handle_t event
; /* event set when finished
*/
1182 /* Lock a region of a file
*/
1184 obj_handle_t handle
; /* handle to the file
*/
1185 file_pos_t offset
; /* offset of start of lock
*/
1186 file_pos_t count
; /* count of bytes to lock
*/
1187 int shared
; /* shared or exclusive lock?
*/
1188 int wait
; /* do we want to wait?
*/
1190 obj_handle_t handle
; /* handle to wait on
*/
1191 int overlapped
; /* is it an overlapped I
/O handle?
*/
1195 /* Unlock a region of a file
*/
1197 obj_handle_t handle
; /* handle to the file
*/
1198 file_pos_t offset
; /* offset of start of unlock
*/
1199 file_pos_t count
; /* count of bytes to unlock
*/
1203 /* Create a socket
*/
1205 unsigned int access
; /* wanted access rights
*/
1206 unsigned int attributes
; /* object attributes
*/
1207 int family
; /* family
, see socket manpage
*/
1208 int type
; /* type
, see socket manpage
*/
1209 int protocol
; /* protocol
, see socket manpage
*/
1210 unsigned int flags
; /* socket flags
*/
1212 obj_handle_t handle
; /* handle to the new socket
*/
1216 /* Accept a socket
*/
1218 obj_handle_t lhandle
; /* handle to the listening socket
*/
1219 unsigned int access
; /* wanted access rights
*/
1220 unsigned int attributes
; /* object attributes
*/
1222 obj_handle_t handle
; /* handle to the new socket
*/
1226 /* Accept into an initialized socket
*/
1227 @
REQ(accept_into_socket
)
1228 obj_handle_t lhandle
; /* handle to the listening socket
*/
1229 obj_handle_t ahandle
; /* handle to the accepting socket
*/
1233 /* Set socket event parameters
*/
1234 @
REQ(set_socket_event
)
1235 obj_handle_t handle
; /* handle to the socket
*/
1236 unsigned int mask
; /* event mask
*/
1237 obj_handle_t event
; /* event object
*/
1238 user_handle_t window
; /* window to send the message to
*/
1239 unsigned int msg
; /* message to send
*/
1243 /* Get socket event parameters
*/
1244 @
REQ(get_socket_event
)
1245 obj_handle_t handle
; /* handle to the socket
*/
1246 int service
; /* clear pending?
*/
1247 obj_handle_t c_event
; /* event to clear
*/
1249 unsigned int mask
; /* event mask
*/
1250 unsigned int pmask
; /* pending events
*/
1251 unsigned int state
; /* status bits
*/
1252 VARARG(errors
,ints
); /* event errors
*/
1256 /* Get socket info
*/
1257 @
REQ(get_socket_info
)
1258 obj_handle_t handle
; /* handle to the socket
*/
1260 int family
; /* family
, see socket manpage
*/
1261 int type
; /* type
, see socket manpage
*/
1262 int protocol
; /* protocol
, see socket manpage
*/
1266 /* Re
-enable pending socket events
*/
1267 @
REQ(enable_socket_event
)
1268 obj_handle_t handle
; /* handle to the socket
*/
1269 unsigned int mask
; /* events to re
-enable
*/
1270 unsigned int sstate
; /* status bits to set
*/
1271 unsigned int cstate
; /* status bits to clear
*/
1274 @
REQ(set_socket_deferred
)
1275 obj_handle_t handle
; /* handle to the socket
*/
1276 obj_handle_t deferred
; /* handle to the socket for which
accept() is deferred
*/
1279 /* Allocate a
console (only used by a console renderer
) */
1281 unsigned int access
; /* wanted access rights
*/
1282 unsigned int attributes
; /* object attributes
*/
1283 process_id_t pid
; /* pid of process which shall be attached to the console
*/
1284 int input_fd
; /* if pid
=-1 (bare console to current process
), fd for input
*/
1286 obj_handle_t handle_in
; /* handle to console input
*/
1287 obj_handle_t event
; /* handle to renderer events change notification
*/
1291 /* Free the console of the current process
*/
1296 #define CONSOLE_RENDERER_NONE_EVENT
0x00
1297 #define CONSOLE_RENDERER_TITLE_EVENT
0x01
1298 #define CONSOLE_RENDERER_ACTIVE_SB_EVENT
0x02
1299 #define CONSOLE_RENDERER_SB_RESIZE_EVENT
0x03
1300 #define CONSOLE_RENDERER_UPDATE_EVENT
0x04
1301 #define CONSOLE_RENDERER_CURSOR_POS_EVENT
0x05
1302 #define CONSOLE_RENDERER_CURSOR_GEOM_EVENT
0x06
1303 #define CONSOLE_RENDERER_DISPLAY_EVENT
0x07
1304 #define CONSOLE_RENDERER_EXIT_EVENT
0x08
1305 struct console_renderer_event
1340 /* retrieve console events for the renderer
*/
1341 @
REQ(get_console_renderer_events
)
1342 obj_handle_t handle
; /* handle to console input events
*/
1344 VARARG(data
,bytes
); /* the various console_renderer_events
*/
1348 /* Open a handle to the process console
*/
1350 obj_handle_t from
; /* 0 (resp
1) input (resp output
) of current process console
*/
1351 /* otherwise console_in handle to get active screen buffer?
*/
1352 unsigned int access
; /* wanted access rights
*/
1353 unsigned int attributes
; /* object attributes
*/
1354 int share
; /* share
mask (only for output handles
) */
1356 obj_handle_t handle
; /* handle to the console
*/
1360 /* Get the input queue wait event
*/
1361 @
REQ(get_console_wait_event
)
1363 obj_handle_t handle
;
1366 /* Get a console
mode (input or output
) */
1367 @
REQ(get_console_mode
)
1368 obj_handle_t handle
; /* handle to the console
*/
1370 int mode
; /* console mode
*/
1374 /* Set a console
mode (input or output
) */
1375 @
REQ(set_console_mode
)
1376 obj_handle_t handle
; /* handle to the console
*/
1377 int mode
; /* console mode
*/
1381 /* Set info about a
console (input only
) */
1382 @
REQ(set_console_input_info
)
1383 obj_handle_t handle
; /* handle to console input
, or
0 for process
' console */
1384 int mask; /* setting mask (see below) */
1385 obj_handle_t active_sb; /* active screen buffer */
1386 int history_mode; /* whether we duplicate lines in history */
1387 int history_size; /* number of lines in history */
1388 int edition_mode; /* index to the edition mode flavors */
1389 int input_cp; /* console input codepage */
1390 int output_cp; /* console output codepage */
1391 user_handle_t win; /* console window if backend supports it */
1392 VARARG(title,unicode_str); /* console title */
1394 #define SET_CONSOLE_INPUT_INFO_ACTIVE_SB 0x01
1395 #define SET_CONSOLE_INPUT_INFO_TITLE 0x02
1396 #define SET_CONSOLE_INPUT_INFO_HISTORY_MODE 0x04
1397 #define SET_CONSOLE_INPUT_INFO_HISTORY_SIZE 0x08
1398 #define SET_CONSOLE_INPUT_INFO_EDITION_MODE 0x10
1399 #define SET_CONSOLE_INPUT_INFO_INPUT_CODEPAGE 0x20
1400 #define SET_CONSOLE_INPUT_INFO_OUTPUT_CODEPAGE 0x40
1401 #define SET_CONSOLE_INPUT_INFO_WIN 0x80
1404 /* Get info about a console (input only) */
1405 @REQ(get_console_input_info)
1406 obj_handle_t handle; /* handle to console input, or 0 for process' console
*/
1408 int history_mode
; /* whether we duplicate lines in history
*/
1409 int history_size
; /* number of lines in history
*/
1410 int history_index
; /* number of used lines in history
*/
1411 int edition_mode
; /* index to the edition mode flavors
*/
1412 int input_cp
; /* console input codepage
*/
1413 int output_cp
; /* console output codepage
*/
1414 user_handle_t win
; /* console window if backend supports it
*/
1415 VARARG(title
,unicode_str
); /* console title
*/
1419 /* appends a string to console
's history */
1420 @REQ(append_console_input_history)
1421 obj_handle_t handle; /* handle to console input, or 0 for process' console
*/
1422 VARARG(line
,unicode_str
); /* line to add
*/
1426 /* appends a string to console
's history */
1427 @REQ(get_console_input_history)
1428 obj_handle_t handle; /* handle to console input, or 0 for process' console
*/
1429 int index
; /* index to get line from
*/
1431 int total
; /* total length of line in Unicode chars
*/
1432 VARARG(line
,unicode_str
); /* line to add
*/
1436 /* creates a new screen buffer on process
' console */
1437 @REQ(create_console_output)
1438 obj_handle_t handle_in; /* handle to console input, or 0 for process' console
*/
1439 unsigned int access
; /* wanted access rights
*/
1440 unsigned int attributes
; /* object attributes
*/
1441 unsigned int share
; /* sharing credentials
*/
1442 int fd
; /* for bare consoles
, fd the screen
-buffer is attached to
*/
1444 obj_handle_t handle_out
; /* handle to the screen buffer
*/
1448 /* Set info about a
console (output only
) */
1449 @
REQ(set_console_output_info
)
1450 obj_handle_t handle
; /* handle to the console
*/
1451 int mask
; /* setting
mask (see below
) */
1452 short int cursor_size
; /* size of
cursor (percentage filled
) */
1453 short int cursor_visible
;/* cursor visibility flag
*/
1454 short int cursor_x
; /* position of
cursor (x
, y
) */
1456 short int width
; /* width of the screen buffer
*/
1457 short int height
; /* height of the screen buffer
*/
1458 short int attr
; /* default attribute
*/
1459 short int win_left
; /* window actually displayed by renderer
*/
1460 short int win_top
; /* the rect area is expressed within the
*/
1461 short int win_right
; /* boundaries of the screen buffer
*/
1462 short int win_bottom
;
1463 short int max_width
; /* maximum
size (width x height
) for the window
*/
1464 short int max_height
;
1466 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_GEOM
0x01
1467 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_POS
0x02
1468 #define SET_CONSOLE_OUTPUT_INFO_SIZE
0x04
1469 #define SET_CONSOLE_OUTPUT_INFO_ATTR
0x08
1470 #define SET_CONSOLE_OUTPUT_INFO_DISPLAY_WINDOW
0x10
1471 #define SET_CONSOLE_OUTPUT_INFO_MAX_SIZE
0x20
1474 /* Get info about a
console (output only
) */
1475 @
REQ(get_console_output_info
)
1476 obj_handle_t handle
; /* handle to the console
*/
1478 short int cursor_size
; /* size of
cursor (percentage filled
) */
1479 short int cursor_visible
;/* cursor visibility flag
*/
1480 short int cursor_x
; /* position of
cursor (x
, y
) */
1482 short int width
; /* width of the screen buffer
*/
1483 short int height
; /* height of the screen buffer
*/
1484 short int attr
; /* default attribute
*/
1485 short int win_left
; /* window actually displayed by renderer
*/
1486 short int win_top
; /* the rect area is expressed within the
*/
1487 short int win_right
; /* boundaries of the screen buffer
*/
1488 short int win_bottom
;
1489 short int max_width
; /* maximum
size (width x height
) for the window
*/
1490 short int max_height
;
1493 /* Add input records to a console input queue
*/
1494 @
REQ(write_console_input
)
1495 obj_handle_t handle
; /* handle to the console input
*/
1496 VARARG(rec
,input_records
); /* input records
*/
1498 int written
; /* number of records written
*/
1502 /* Fetch input records from a console input queue
*/
1503 @
REQ(read_console_input
)
1504 obj_handle_t handle
; /* handle to the console input
*/
1505 int flush
; /* flush the retrieved records from the queue?
*/
1507 int read
; /* number of records read
*/
1508 VARARG(rec
,input_records
); /* input records
*/
1512 /* write
data (chars and
/or attributes
) in a screen buffer
*/
1513 @
REQ(write_console_output
)
1514 obj_handle_t handle
; /* handle to the console output
*/
1515 int x
; /* position where to start writing
*/
1517 int mode
; /* char
info (see below
) */
1518 int wrap
; /* wrap around at end of line?
*/
1519 VARARG(data
,bytes
); /* info to write
*/
1521 int written
; /* number of char infos actually written
*/
1522 int width
; /* width of screen buffer
*/
1523 int height
; /* height of screen buffer
*/
1527 CHAR_INFO_MODE_TEXT
, /* characters only
*/
1528 CHAR_INFO_MODE_ATTR
, /* attributes only
*/
1529 CHAR_INFO_MODE_TEXTATTR
, /* both characters and attributes
*/
1530 CHAR_INFO_MODE_TEXTSTDATTR
/* characters but use standard attributes
*/
1534 /* fill a screen buffer with constant
data (chars and
/or attributes
) */
1535 @
REQ(fill_console_output
)
1536 obj_handle_t handle
; /* handle to the console output
*/
1537 int x
; /* position where to start writing
*/
1539 int mode
; /* char info mode
*/
1540 int count
; /* number to write
*/
1541 int wrap
; /* wrap around at end of line?
*/
1542 char_info_t data
; /* data to write
*/
1544 int written
; /* number of char infos actually written
*/
1548 /* read
data (chars and
/or attributes
) from a screen buffer
*/
1549 @
REQ(read_console_output
)
1550 obj_handle_t handle
; /* handle to the console output
*/
1551 int x
; /* position (x
,y
) where to start reading
*/
1553 int mode
; /* char info mode
*/
1554 int wrap
; /* wrap around at end of line?
*/
1556 int width
; /* width of screen buffer
*/
1557 int height
; /* height of screen buffer
*/
1562 /* move a
rect (of data
) in screen buffer content
*/
1563 @
REQ(move_console_output
)
1564 obj_handle_t handle
; /* handle to the console output
*/
1565 short int x_src
; /* position (x
, y
) of rect to start moving from
*/
1567 short int x_dst
; /* position (x
, y
) of rect to move to
*/
1569 short int w
; /* size of the
rect (width
, height
) to move
*/
1574 /* Sends a signal to a process group
*/
1575 @
REQ(send_console_signal
)
1576 int signal
; /* the signal to send
*/
1577 process_id_t group_id
; /* the group to send the signal to
*/
1581 /* enable directory change notifications
*/
1582 @
REQ(read_directory_changes
)
1583 unsigned int filter
; /* notification filter
*/
1584 int subtree
; /* watch the subtree?
*/
1585 int want_data
; /* flag indicating whether change data should be collected
*/
1586 async_data_t async
; /* async I
/O parameters
*/
1591 obj_handle_t handle
;
1593 VARARG(events
,filesystem_event
); /* collected filesystem events
*/
1597 /* Create a file mapping
*/
1598 @
REQ(create_mapping
)
1599 unsigned int access
; /* wanted access rights
*/
1600 unsigned int attributes
; /* object attributes
*/
1601 unsigned int protect
; /* protection
flags (see below
) */
1602 mem_size_t size
; /* mapping size
*/
1603 obj_handle_t file_handle
; /* file handle
*/
1604 VARARG(objattr
,object_attributes
); /* object attributes
*/
1606 obj_handle_t handle
; /* handle to the mapping
*/
1608 /* per
-page protection flags
*/
1609 #define VPROT_READ
0x01
1610 #define VPROT_WRITE
0x02
1611 #define VPROT_EXEC
0x04
1612 #define VPROT_WRITECOPY
0x08
1613 #define VPROT_GUARD
0x10
1614 #define VPROT_NOCACHE
0x20
1615 #define VPROT_COMMITTED
0x40
1616 #define VPROT_WRITEWATCH
0x80
1617 /* per
-mapping protection flags
*/
1618 #define VPROT_IMAGE
0x0100 /* mapping for an exe image
*/
1619 #define VPROT_SYSTEM
0x0200 /* system
view (underlying mmap not under our control
) */
1620 #define VPROT_VALLOC
0x0400 /* allocated by VirtualAlloc
*/
1621 #define VPROT_NOEXEC
0x0800 /* don
't force exec permission */
1624 /* Open a mapping */
1626 unsigned int access; /* wanted access rights */
1627 unsigned int attributes; /* object attributes */
1628 obj_handle_t rootdir; /* root directory */
1629 VARARG(name,unicode_str); /* object name */
1631 obj_handle_t handle; /* handle to the mapping */
1635 /* Get information about a file mapping */
1636 @REQ(get_mapping_info)
1637 obj_handle_t handle; /* handle to the mapping */
1638 unsigned int access; /* wanted access rights */
1640 mem_size_t size; /* mapping size */
1641 int protect; /* protection flags */
1642 int header_size; /* header size (for VPROT_IMAGE mapping) */
1643 client_ptr_t base; /* default base addr (for VPROT_IMAGE mapping) */
1644 obj_handle_t mapping; /* duplicate mapping handle unless removable */
1645 obj_handle_t shared_file; /* shared mapping file handle */
1649 /* Get a range of committed pages in a file mapping */
1650 @REQ(get_mapping_committed_range)
1651 obj_handle_t handle; /* handle to the mapping */
1652 file_pos_t offset; /* starting offset (page-aligned, in bytes) */
1654 mem_size_t size; /* size of range starting at offset (page-aligned, in bytes) */
1655 int committed; /* whether it is a committed range */
1659 /* Add a range to the committed pages in a file mapping */
1660 @REQ(add_mapping_committed_range)
1661 obj_handle_t handle; /* handle to the mapping */
1662 file_pos_t offset; /* starting offset (page-aligned, in bytes) */
1663 mem_size_t size; /* size to set (page-aligned, in bytes) or 0 if only retrieving */
1667 #define SNAP_PROCESS 0x00000001
1668 #define SNAP_THREAD 0x00000002
1669 /* Create a snapshot */
1670 @REQ(create_snapshot)
1671 unsigned int attributes; /* object attributes */
1672 unsigned int flags; /* snapshot flags (SNAP_*) */
1674 obj_handle_t handle; /* handle to the snapshot */
1678 /* Get the next process from a snapshot */
1680 obj_handle_t handle; /* handle to the snapshot */
1681 int reset; /* reset snapshot position? */
1683 int count; /* process usage count */
1684 process_id_t pid; /* process id */
1685 process_id_t ppid; /* parent process id */
1686 int threads; /* number of threads */
1687 int priority; /* process priority */
1688 int handles; /* number of handles */
1689 int unix_pid; /* Unix pid */
1690 VARARG(filename,unicode_str); /* file name of main exe */
1694 /* Get the next thread from a snapshot */
1696 obj_handle_t handle; /* handle to the snapshot */
1697 int reset; /* reset snapshot position? */
1699 int count; /* thread usage count */
1700 process_id_t pid; /* process id */
1701 thread_id_t tid; /* thread id */
1702 int base_pri; /* base priority */
1703 int delta_pri; /* delta priority */
1707 /* Wait for a debug event */
1708 @REQ(wait_debug_event)
1709 int get_handle; /* should we alloc a handle for waiting? */
1711 process_id_t pid; /* process id */
1712 thread_id_t tid; /* thread id */
1713 obj_handle_t wait; /* wait handle if no event ready */
1714 VARARG(event,debug_event); /* debug event data */
1718 /* Queue an exception event */
1719 @REQ(queue_exception_event)
1720 int first; /* first chance exception? */
1721 unsigned int code; /* exception code */
1722 unsigned int flags; /* exception flags */
1723 client_ptr_t record; /* exception record */
1724 client_ptr_t address; /* exception address */
1725 data_size_t len; /* size of parameters */
1726 VARARG(params,uints64,len);/* exception parameters */
1727 VARARG(context,context); /* thread context */
1729 obj_handle_t handle; /* handle to the queued event */
1733 /* Retrieve the status of an exception event */
1734 @REQ(get_exception_status)
1735 obj_handle_t handle; /* handle to the queued event */
1737 VARARG(context,context); /* modified thread context */
1741 /* Continue a debug event */
1742 @REQ(continue_debug_event)
1743 process_id_t pid; /* process id to continue */
1744 thread_id_t tid; /* thread id to continue */
1745 int status; /* continuation status */
1749 /* Start/stop debugging an existing process */
1751 process_id_t pid; /* id of the process to debug */
1752 int attach; /* 1=attaching / 0=detaching from the process */
1756 /* Simulate a breakpoint in a process */
1758 obj_handle_t handle; /* process handle */
1760 int self; /* was it the caller itself? */
1764 /* Set debugger kill on exit flag */
1765 @REQ(set_debugger_kill_on_exit)
1766 int kill_on_exit; /* 0=detach/1=kill debuggee when debugger dies */
1770 /* Read data from a process address space */
1771 @REQ(read_process_memory)
1772 obj_handle_t handle; /* process handle */
1773 client_ptr_t addr; /* addr to read from */
1775 VARARG(data,bytes); /* result data */
1779 /* Write data to a process address space */
1780 @REQ(write_process_memory)
1781 obj_handle_t handle; /* process handle */
1782 client_ptr_t addr; /* addr to write to */
1783 VARARG(data,bytes); /* data to write */
1787 /* Create a registry key */
1789 obj_handle_t parent; /* handle to the parent key */
1790 unsigned int access; /* desired access rights */
1791 unsigned int attributes; /* object attributes */
1792 unsigned int options; /* creation options */
1793 data_size_t namelen; /* length of key name in bytes */
1794 VARARG(name,unicode_str,namelen); /* key name */
1795 VARARG(class,unicode_str); /* class name */
1797 obj_handle_t hkey; /* handle to the created key */
1798 int created; /* has it been newly created? */
1801 /* Open a registry key */
1803 obj_handle_t parent; /* handle to the parent key */
1804 unsigned int access; /* desired access rights */
1805 unsigned int attributes; /* object attributes */
1806 VARARG(name,unicode_str); /* key name */
1808 obj_handle_t hkey; /* handle to the open key */
1812 /* Delete a registry key */
1814 obj_handle_t hkey; /* handle to the key */
1818 /* Flush a registry key */
1820 obj_handle_t hkey; /* handle to the key */
1824 /* Enumerate registry subkeys */
1826 obj_handle_t hkey; /* handle to registry key */
1827 int index; /* index of subkey (or -1 for current key) */
1828 int info_class; /* requested information class */
1830 int subkeys; /* number of subkeys */
1831 int max_subkey; /* longest subkey name */
1832 int max_class; /* longest class name */
1833 int values; /* number of values */
1834 int max_value; /* longest value name */
1835 int max_data; /* longest value data */
1836 timeout_t modif; /* last modification time */
1837 data_size_t total; /* total length needed for full name and class */
1838 data_size_t namelen; /* length of key name in bytes */
1839 VARARG(name,unicode_str,namelen); /* key name */
1840 VARARG(class,unicode_str); /* class name */
1844 /* Set a value of a registry key */
1846 obj_handle_t hkey; /* handle to registry key */
1847 int type; /* value type */
1848 data_size_t namelen; /* length of value name in bytes */
1849 VARARG(name,unicode_str,namelen); /* value name */
1850 VARARG(data,bytes); /* value data */
1854 /* Retrieve the value of a registry key */
1856 obj_handle_t hkey; /* handle to registry key */
1857 VARARG(name,unicode_str); /* value name */
1859 int type; /* value type */
1860 data_size_t total; /* total length needed for data */
1861 VARARG(data,bytes); /* value data */
1865 /* Enumerate a value of a registry key */
1866 @REQ(enum_key_value)
1867 obj_handle_t hkey; /* handle to registry key */
1868 int index; /* value index */
1869 int info_class; /* requested information class */
1871 int type; /* value type */
1872 data_size_t total; /* total length needed for full name and data */
1873 data_size_t namelen; /* length of value name in bytes */
1874 VARARG(name,unicode_str,namelen); /* value name */
1875 VARARG(data,bytes); /* value data */
1879 /* Delete a value of a registry key */
1880 @REQ(delete_key_value)
1881 obj_handle_t hkey; /* handle to registry key */
1882 VARARG(name,unicode_str); /* value name */
1886 /* Load a registry branch from a file */
1888 obj_handle_t hkey; /* root key to load to */
1889 obj_handle_t file; /* file to load from */
1890 VARARG(name,unicode_str); /* subkey name */
1894 /* UnLoad a registry branch from a file */
1895 @REQ(unload_registry)
1896 obj_handle_t hkey; /* root key to unload to */
1900 /* Save a registry branch to a file */
1902 obj_handle_t hkey; /* key to save */
1903 obj_handle_t file; /* file to save to */
1907 /* Add a registry key change notification */
1908 @REQ(set_registry_notification)
1909 obj_handle_t hkey; /* key to watch for changes */
1910 obj_handle_t event; /* event to set */
1911 int subtree; /* should we watch the whole subtree? */
1912 unsigned int filter; /* things to watch */
1916 /* Create a waitable timer */
1918 unsigned int access; /* wanted access rights */
1919 unsigned int attributes; /* object attributes */
1920 obj_handle_t rootdir; /* root directory */
1921 int manual; /* manual reset */
1922 VARARG(name,unicode_str); /* object name */
1924 obj_handle_t handle; /* handle to the timer */
1928 /* Open a waitable timer */
1930 unsigned int access; /* wanted access rights */
1931 unsigned int attributes; /* object attributes */
1932 obj_handle_t rootdir; /* root directory */
1933 VARARG(name,unicode_str); /* object name */
1935 obj_handle_t handle; /* handle to the timer */
1938 /* Set a waitable timer */
1940 obj_handle_t handle; /* handle to the timer */
1941 timeout_t expire; /* next expiration absolute time */
1942 client_ptr_t callback; /* callback function */
1943 client_ptr_t arg; /* callback argument */
1944 int period; /* timer period in ms */
1946 int signaled; /* was the timer signaled before this call ? */
1949 /* Cancel a waitable timer */
1951 obj_handle_t handle; /* handle to the timer */
1953 int signaled; /* was the timer signaled before this calltime ? */
1956 /* Get information on a waitable timer */
1957 @REQ(get_timer_info)
1958 obj_handle_t handle; /* handle to the timer */
1960 timeout_t when; /* absolute time when the timer next expires */
1961 int signaled; /* is the timer signaled? */
1965 /* Retrieve the current context of a thread */
1966 @REQ(get_thread_context)
1967 obj_handle_t handle; /* thread handle */
1968 unsigned int flags; /* context flags */
1969 int suspend; /* suspend the thread if needed */
1971 int self; /* was it a handle to the current thread? */
1972 VARARG(context,context); /* thread context */
1976 /* Set the current context of a thread */
1977 @REQ(set_thread_context)
1978 obj_handle_t handle; /* thread handle */
1979 int suspend; /* suspend the thread if needed */
1980 VARARG(context,context); /* thread context */
1982 int self; /* was it a handle to the current thread? */
1986 /* Fetch a selector entry for a thread */
1987 @REQ(get_selector_entry)
1988 obj_handle_t handle; /* thread handle */
1989 int entry; /* LDT entry */
1991 unsigned int base; /* selector base */
1992 unsigned int limit; /* selector limit */
1993 unsigned char flags; /* selector flags */
1999 obj_handle_t table; /* which table to add atom to */
2000 VARARG(name,unicode_str); /* atom name */
2002 atom_t atom; /* resulting atom */
2006 /* Delete an atom */
2008 obj_handle_t table; /* which table to delete atom from */
2009 atom_t atom; /* atom handle */
2015 obj_handle_t table; /* which table to find atom from */
2016 VARARG(name,unicode_str); /* atom name */
2018 atom_t atom; /* atom handle */
2022 /* Get information about an atom */
2023 @REQ(get_atom_information)
2024 obj_handle_t table; /* which table to find atom from */
2025 atom_t atom; /* atom handle */
2027 int count; /* atom lock count */
2028 int pinned; /* whether the atom has been pinned */
2029 data_size_t total; /* actual length of atom name */
2030 VARARG(name,unicode_str); /* atom name */
2034 /* Set information about an atom */
2035 @REQ(set_atom_information)
2036 obj_handle_t table; /* which table to find atom from */
2037 atom_t atom; /* atom handle */
2038 int pinned; /* whether to bump atom information */
2042 /* Empty an atom table */
2043 @REQ(empty_atom_table)
2044 obj_handle_t table; /* which table to find atom from */
2045 int if_pinned; /* whether to delete pinned atoms */
2049 /* Init an atom table */
2050 @REQ(init_atom_table)
2051 int entries; /* number of entries (only for local) */
2053 obj_handle_t table; /* handle to the atom table */
2057 /* Get the message queue of the current thread */
2060 obj_handle_t handle; /* handle to the queue */
2064 /* Set the file descriptor associated to the current thread queue */
2066 obj_handle_t handle; /* handle to the file descriptor */
2070 /* Set the current message queue wakeup mask */
2071 @REQ(set_queue_mask)
2072 unsigned int wake_mask; /* wakeup bits mask */
2073 unsigned int changed_mask; /* changed bits mask */
2074 int skip_wait; /* will we skip waiting if signaled? */
2076 unsigned int wake_bits; /* current wake bits */
2077 unsigned int changed_bits; /* current changed bits */
2081 /* Get the current message queue status */
2082 @REQ(get_queue_status)
2083 unsigned int clear_bits; /* should we clear the change bits? */
2085 unsigned int wake_bits; /* wake bits */
2086 unsigned int changed_bits; /* changed bits since last time */
2090 /* Retrieve the process idle event */
2091 @REQ(get_process_idle_event)
2092 obj_handle_t handle; /* process handle */
2094 obj_handle_t event; /* handle to idle event */
2098 /* Send a message to a thread queue */
2100 thread_id_t id; /* thread id */
2101 int type; /* message type (see below) */
2102 int flags; /* message flags (see below) */
2103 user_handle_t win; /* window handle */
2104 unsigned int msg; /* message code */
2105 lparam_t wparam; /* parameters */
2106 lparam_t lparam; /* parameters */
2107 timeout_t timeout; /* timeout for reply */
2108 VARARG(data,message_data); /* message data for sent messages */
2111 @REQ(post_quit_message)
2112 int exit_code; /* exit code to return */
2117 MSG_ASCII, /* Ascii message (from SendMessageA) */
2118 MSG_UNICODE, /* Unicode message (from SendMessageW) */
2119 MSG_NOTIFY, /* notify message (from SendNotifyMessageW), always Unicode */
2120 MSG_CALLBACK, /* callback message (from SendMessageCallbackW), always Unicode */
2121 MSG_CALLBACK_RESULT,/* result of a callback message */
2122 MSG_OTHER_PROCESS, /* sent from other process, may include vararg data, always Unicode */
2123 MSG_POSTED, /* posted message (from PostMessageW), always Unicode */
2124 MSG_HARDWARE, /* hardware message */
2125 MSG_WINEVENT, /* winevent message */
2126 MSG_HOOK_LL /* low-level hardware hook */
2128 #define SEND_MSG_ABORT_IF_HUNG 0x01
2131 /* Send a hardware message to a thread queue */
2132 @REQ(send_hardware_message)
2133 user_handle_t win; /* window handle */
2134 hw_input_t input; /* input data */
2135 unsigned int flags; /* flags (see below) */
2137 int wait; /* do we need to wait for a reply? */
2138 int prev_x; /* previous cursor position */
2140 int new_x; /* new cursor position */
2142 VARARG(keystate,bytes); /* global state array for all the keys */
2144 #define SEND_HWMSG_INJECTED 0x01
2147 /* Get a message from the current queue */
2149 unsigned int flags; /* PM_* flags */
2150 user_handle_t get_win; /* window handle to get */
2151 unsigned int get_first; /* first message code to get */
2152 unsigned int get_last; /* last message code to get */
2153 unsigned int hw_id; /* id of the previous hardware message (or 0) */
2154 unsigned int wake_mask; /* wakeup bits mask */
2155 unsigned int changed_mask; /* changed bits mask */
2157 user_handle_t win; /* window handle */
2158 unsigned int msg; /* message code */
2159 lparam_t wparam; /* parameters */
2160 lparam_t lparam; /* parameters */
2161 int type; /* message type */
2162 int x; /* message x position */
2163 int y; /* message y position */
2164 unsigned int time; /* message time */
2165 unsigned int active_hooks; /* active hooks bitmap */
2166 data_size_t total; /* total size of extra data */
2167 VARARG(data,message_data); /* message data for sent messages */
2171 /* Reply to a sent message */
2173 int remove; /* should we remove the message? */
2174 lparam_t result; /* message result */
2175 VARARG(data,bytes); /* message data for sent messages */
2179 /* Accept the current hardware message */
2180 @REQ(accept_hardware_message)
2181 unsigned int hw_id; /* id of the hardware message */
2182 int remove; /* should we remove the message? */
2186 /* Retrieve the reply for the last message sent */
2187 @REQ(get_message_reply)
2188 int cancel; /* cancel message if not ready? */
2190 lparam_t result; /* message result */
2191 VARARG(data,bytes); /* message data for sent messages */
2195 /* Set a window timer */
2197 user_handle_t win; /* window handle */
2198 unsigned int msg; /* message to post */
2199 unsigned int rate; /* timer rate in ms */
2200 lparam_t id; /* timer id */
2201 lparam_t lparam; /* message lparam (callback proc) */
2203 lparam_t id; /* timer id */
2207 /* Kill a window timer */
2208 @REQ(kill_win_timer)
2209 user_handle_t win; /* window handle */
2210 lparam_t id; /* timer id */
2211 unsigned int msg; /* message to post */
2215 /* check if the thread owning the window is hung */
2216 @REQ(is_window_hung)
2217 user_handle_t win; /* window handle */
2223 /* Retrieve info about a serial port */
2224 @REQ(get_serial_info)
2225 obj_handle_t handle; /* handle to comm port */
2228 unsigned int readinterval;
2229 unsigned int readconst;
2230 unsigned int readmult;
2231 unsigned int writeconst;
2232 unsigned int writemult;
2233 unsigned int eventmask;
2234 unsigned int cookie;
2235 unsigned int pending_write;
2239 /* Set info about a serial port */
2240 @REQ(set_serial_info)
2241 obj_handle_t handle; /* handle to comm port */
2242 int flags; /* bitmask to set values (see below) */
2243 unsigned int readinterval;
2244 unsigned int readconst;
2245 unsigned int readmult;
2246 unsigned int writeconst;
2247 unsigned int writemult;
2248 unsigned int eventmask;
2250 #define SERIALINFO_SET_TIMEOUTS 0x01
2251 #define SERIALINFO_SET_MASK 0x02
2252 #define SERIALINFO_PENDING_WRITE 0x04
2253 #define SERIALINFO_PENDING_WAIT 0x08
2256 /* Create an async I/O */
2257 @REQ(register_async)
2258 int type; /* type of queue to look after */
2259 async_data_t async; /* async I/O parameters */
2260 int count; /* count - usually # of bytes to be read/written */
2262 #define ASYNC_TYPE_READ 0x01
2263 #define ASYNC_TYPE_WRITE 0x02
2264 #define ASYNC_TYPE_WAIT 0x03
2267 /* Cancel all async op on a fd */
2269 obj_handle_t handle; /* handle to comm port, socket or file */
2270 client_ptr_t iosb; /* I/O status block (NULL=all) */
2271 int only_thread; /* cancel matching this thread */
2275 /* Perform a read on a file object */
2277 int blocking; /* whether it's a blocking read
*/
2278 async_data_t async
; /* async I
/O parameters
*/
2279 file_pos_t pos
; /* read position
*/
2281 obj_handle_t wait
; /* handle to wait on for blocking read
*/
2282 unsigned int options
; /* device open options
*/
2283 VARARG(data
,bytes
); /* read data
*/
2287 /* Perform a write on a file object
*/
2289 int blocking
; /* whether it
's a blocking write */
2290 async_data_t async; /* async I/O parameters */
2291 file_pos_t pos; /* write position */
2292 VARARG(data,bytes); /* write data */
2294 obj_handle_t wait; /* handle to wait on for blocking write */
2295 unsigned int options; /* device open options */
2296 data_size_t size; /* size written */
2300 /* Perform an ioctl on a file */
2302 ioctl_code_t code; /* ioctl code */
2303 async_data_t async; /* async I/O parameters */
2304 int blocking; /* whether it's a blocking ioctl
*/
2305 VARARG(in_data
,bytes
); /* ioctl input data
*/
2307 obj_handle_t wait
; /* handle to wait on for blocking ioctl
*/
2308 unsigned int options
; /* device open options
*/
2309 VARARG(out_data
,bytes
); /* ioctl output data
*/
2313 /* Store results of an async irp
*/
2314 @
REQ(set_irp_result
)
2315 obj_handle_t manager
; /* handle to the device manager
*/
2316 obj_handle_t handle
; /* handle to the irp
*/
2317 unsigned int status
; /* status of the irp
*/
2318 data_size_t size
; /* result
size (input or output depending on the operation
) */
2319 VARARG(data
,bytes
); /* output data of the irp
*/
2323 /* Retrieve results of an async irp
*/
2324 @
REQ(get_irp_result
)
2325 obj_handle_t handle
; /* handle to the device
*/
2326 client_ptr_t user_arg
; /* user arg used to identify the request
*/
2328 data_size_t size
; /* result
size (input or output depending on the operation
) */
2329 VARARG(out_data
,bytes
); /* irp output data
*/
2333 /* Create a named pipe
*/
2334 @
REQ(create_named_pipe
)
2335 unsigned int access
;
2336 unsigned int attributes
; /* object attributes
*/
2337 unsigned int options
;
2338 unsigned int sharing
;
2339 unsigned int maxinstances
;
2340 unsigned int outsize
;
2341 unsigned int insize
;
2344 VARARG(objattr
,object_attributes
); /* object attributes
*/
2346 obj_handle_t handle
; /* handle to the pipe
*/
2349 /* flags in create_named_pipe and get_named_pipe_info
*/
2350 #define NAMED_PIPE_MESSAGE_STREAM_WRITE
0x0001
2351 #define NAMED_PIPE_MESSAGE_STREAM_READ
0x0002
2352 #define NAMED_PIPE_NONBLOCKING_MODE
0x0004
2353 #define NAMED_PIPE_SERVER_END
0x8000
2355 /* Get named pipe information by handle
*/
2356 @
REQ(get_named_pipe_info
)
2357 obj_handle_t handle
;
2360 unsigned int sharing
;
2361 unsigned int maxinstances
;
2362 unsigned int instances
;
2363 unsigned int outsize
;
2364 unsigned int insize
;
2367 /* Set named pipe information by handle
*/
2368 @
REQ(set_named_pipe_info
)
2369 obj_handle_t handle
;
2373 /* Create a window
*/
2375 user_handle_t parent
; /* parent window
*/
2376 user_handle_t owner
; /* owner window
*/
2377 atom_t atom
; /* class atom
*/
2378 mod_handle_t instance
; /* module instance
*/
2379 VARARG(class
,unicode_str
); /* class name
*/
2381 user_handle_t handle
; /* created window
*/
2382 user_handle_t parent
; /* full handle of parent
*/
2383 user_handle_t owner
; /* full handle of owner
*/
2384 int extra
; /* number of extra bytes
*/
2385 client_ptr_t class_ptr
; /* pointer to class in client address space
*/
2389 /* Destroy a window
*/
2390 @
REQ(destroy_window
)
2391 user_handle_t handle
; /* handle to the window
*/
2395 /* Retrieve the desktop window for the current thread
*/
2396 @
REQ(get_desktop_window
)
2397 int force
; /* force creation if it doesn
't exist */
2399 user_handle_t top_window; /* handle to the desktop window */
2400 user_handle_t msg_window; /* handle to the top-level HWND_MESSAGE parent */
2404 /* Set a window owner */
2405 @REQ(set_window_owner)
2406 user_handle_t handle; /* handle to the window */
2407 user_handle_t owner; /* new owner */
2409 user_handle_t full_owner; /* full handle of new owner */
2410 user_handle_t prev_owner; /* full handle of previous owner */
2414 /* Get information from a window handle */
2415 @REQ(get_window_info)
2416 user_handle_t handle; /* handle to the window */
2418 user_handle_t full_handle; /* full 32-bit handle */
2419 user_handle_t last_active; /* last active popup */
2420 process_id_t pid; /* process owning the window */
2421 thread_id_t tid; /* thread owning the window */
2422 atom_t atom; /* class atom */
2423 int is_unicode; /* ANSI or unicode */
2427 /* Set some information in a window */
2428 @REQ(set_window_info)
2429 unsigned short flags; /* flags for fields to set (see below) */
2430 short int is_unicode; /* ANSI or unicode */
2431 user_handle_t handle; /* handle to the window */
2432 unsigned int style; /* window style */
2433 unsigned int ex_style; /* window extended style */
2434 unsigned int id; /* window id */
2435 mod_handle_t instance; /* creator instance */
2436 lparam_t user_data; /* user-specific data */
2437 int extra_offset; /* offset to set in extra bytes */
2438 data_size_t extra_size; /* size to set in extra bytes */
2439 lparam_t extra_value; /* value to set in extra bytes */
2441 unsigned int old_style; /* old window style */
2442 unsigned int old_ex_style; /* old window extended style */
2443 mod_handle_t old_instance; /* old creator instance */
2444 lparam_t old_user_data; /* old user-specific data */
2445 lparam_t old_extra_value; /* old value in extra bytes */
2446 unsigned int old_id; /* old window id */
2448 #define SET_WIN_STYLE 0x01
2449 #define SET_WIN_EXSTYLE 0x02
2450 #define SET_WIN_ID 0x04
2451 #define SET_WIN_INSTANCE 0x08
2452 #define SET_WIN_USERDATA 0x10
2453 #define SET_WIN_EXTRA 0x20
2454 #define SET_WIN_UNICODE 0x40
2457 /* Set the parent of a window */
2459 user_handle_t handle; /* handle to the window */
2460 user_handle_t parent; /* handle to the parent */
2462 user_handle_t old_parent; /* old parent window */
2463 user_handle_t full_parent; /* full handle of new parent */
2467 /* Get a list of the window parents, up to the root of the tree */
2468 @REQ(get_window_parents)
2469 user_handle_t handle; /* handle to the window */
2471 int count; /* total count of parents */
2472 VARARG(parents,user_handles); /* parent handles */
2476 /* Get a list of the window children */
2477 @REQ(get_window_children)
2478 obj_handle_t desktop; /* handle to desktop */
2479 user_handle_t parent; /* parent window */
2480 atom_t atom; /* class atom for the listed children */
2481 thread_id_t tid; /* thread owning the listed children */
2482 VARARG(class,unicode_str); /* class name */
2484 int count; /* total count of children */
2485 VARARG(children,user_handles); /* children handles */
2489 /* Get a list of the window children that contain a given point */
2490 @REQ(get_window_children_from_point)
2491 user_handle_t parent; /* parent window */
2492 int x; /* point in parent coordinates */
2495 int count; /* total count of children */
2496 VARARG(children,user_handles); /* children handles */
2500 /* Get window tree information from a window handle */
2501 @REQ(get_window_tree)
2502 user_handle_t handle; /* handle to the window */
2504 user_handle_t parent; /* parent window */
2505 user_handle_t owner; /* owner window */
2506 user_handle_t next_sibling; /* next sibling in Z-order */
2507 user_handle_t prev_sibling; /* prev sibling in Z-order */
2508 user_handle_t first_sibling; /* first sibling in Z-order */
2509 user_handle_t last_sibling; /* last sibling in Z-order */
2510 user_handle_t first_child; /* first child */
2511 user_handle_t last_child; /* last child */
2514 /* Set the position and Z order of a window */
2515 @REQ(set_window_pos)
2516 unsigned short swp_flags; /* SWP_* flags */
2517 unsigned short paint_flags; /* paint flags (see below) */
2518 user_handle_t handle; /* handle to the window */
2519 user_handle_t previous; /* previous window in Z order */
2520 rectangle_t window; /* window rectangle (in parent coords) */
2521 rectangle_t client; /* client rectangle (in parent coords) */
2522 VARARG(valid,rectangles); /* valid rectangles from WM_NCCALCSIZE (in parent coords) */
2524 unsigned int new_style; /* new window style */
2525 unsigned int new_ex_style; /* new window extended style */
2526 user_handle_t surface_win; /* window that needs a surface update */
2528 #define SET_WINPOS_PAINT_SURFACE 0x01 /* window has a paintable surface */
2529 #define SET_WINPOS_PIXEL_FORMAT 0x02 /* window has a custom pixel format */
2531 /* Get the window and client rectangles of a window */
2532 @REQ(get_window_rectangles)
2533 user_handle_t handle; /* handle to the window */
2534 int relative; /* coords relative to (see below) */
2536 rectangle_t window; /* window rectangle */
2537 rectangle_t visible; /* visible part of the window rectangle */
2538 rectangle_t client; /* client rectangle */
2540 enum coords_relative
2542 COORDS_CLIENT, /* relative to client area */
2543 COORDS_WINDOW, /* relative to whole window area */
2544 COORDS_PARENT, /* relative to parent's client area
*/
2545 COORDS_SCREEN
/* relative to screen origin
*/
2549 /* Get the window text
*/
2550 @
REQ(get_window_text
)
2551 user_handle_t handle
; /* handle to the window
*/
2553 VARARG(text
,unicode_str
); /* window text
*/
2557 /* Set the window text
*/
2558 @
REQ(set_window_text
)
2559 user_handle_t handle
; /* handle to the window
*/
2560 VARARG(text
,unicode_str
); /* window text
*/
2564 /* Get the coordinates offset between two windows
*/
2565 @
REQ(get_windows_offset
)
2566 user_handle_t from
; /* handle to the first window
*/
2567 user_handle_t to
; /* handle to the second window
*/
2569 int x
; /* x coordinate offset
*/
2570 int y
; /* y coordinate offset
*/
2571 int mirror
; /* whether to mirror the x coordinate
*/
2575 /* Get the visible region of a window
*/
2576 @
REQ(get_visible_region
)
2577 user_handle_t window
; /* handle to the window
*/
2578 unsigned int flags
; /* DCX flags
*/
2580 user_handle_t top_win
; /* top window to clip against
*/
2581 rectangle_t top_rect
; /* top window visible rect with screen coords
*/
2582 rectangle_t win_rect
; /* window rect in screen coords
*/
2583 unsigned int paint_flags
; /* paint
flags (from SET_WINPOS_
* flags
) */
2584 data_size_t total_size
; /* total size of the resulting region
*/
2585 VARARG(region
,rectangles
); /* list of rectangles for the
region (in screen coords
) */
2589 /* Get the visible surface region of a window
*/
2590 @
REQ(get_surface_region
)
2591 user_handle_t window
; /* handle to the window
*/
2593 rectangle_t visible_rect
; /* window visible rect in screen coords
*/
2594 data_size_t total_size
; /* total size of the resulting region
*/
2595 VARARG(region
,rectangles
); /* list of rectangles for the
region (in screen coords
) */
2599 /* Get the window region
*/
2600 @
REQ(get_window_region
)
2601 user_handle_t window
; /* handle to the window
*/
2603 data_size_t total_size
; /* total size of the resulting region
*/
2604 VARARG(region
,rectangles
); /* list of rectangles for the
region (in window coords
) */
2608 /* Set the window region
*/
2609 @
REQ(set_window_region
)
2610 user_handle_t window
; /* handle to the window
*/
2611 int redraw
; /* redraw the window?
*/
2612 VARARG(region
,rectangles
); /* list of rectangles for the
region (in window coords
) */
2616 /* Get the window update region
*/
2617 @
REQ(get_update_region
)
2618 user_handle_t window
; /* handle to the window
*/
2619 user_handle_t from_child
; /* child to start searching from
*/
2620 unsigned int flags
; /* update
flags (see below
) */
2622 user_handle_t child
; /* child to
repaint (or window itself
) */
2623 unsigned int flags
; /* resulting update
flags (see below
) */
2624 data_size_t total_size
; /* total size of the resulting region
*/
2625 VARARG(region
,rectangles
); /* list of rectangles for the
region (in screen coords
) */
2627 #define UPDATE_NONCLIENT
0x01 /* get region for repainting non
-client area
*/
2628 #define UPDATE_ERASE
0x02 /* get region for erasing client area
*/
2629 #define UPDATE_PAINT
0x04 /* get region for painting client area
*/
2630 #define UPDATE_INTERNALPAINT
0x08 /* get region if internal paint is pending
*/
2631 #define UPDATE_ALLCHILDREN
0x10 /* force repaint of all children
*/
2632 #define UPDATE_NOCHILDREN
0x20 /* don
't try to repaint any children */
2633 #define UPDATE_NOREGION 0x40 /* don't return a region
, only the flags
*/
2634 #define UPDATE_DELAYED_ERASE
0x80 /* still needs erase after BeginPaint
*/
2637 /* Update the z order of a window so that a given rectangle is fully visible
*/
2638 @
REQ(update_window_zorder
)
2639 user_handle_t window
; /* handle to the window
*/
2640 rectangle_t rect
; /* rectangle that must be
visible (in client coords
) */
2644 /* Mark parts of a window as needing a redraw
*/
2646 user_handle_t window
; /* handle to the window
*/
2647 unsigned int flags
; /* RDW_
* flags
*/
2648 VARARG(region
,rectangles
); /* list of rectangles for the
region (in window coords
) */
2652 /* Set a window property
*/
2653 @
REQ(set_window_property
)
2654 user_handle_t window
; /* handle to the window
*/
2655 lparam_t data
; /* data to store
*/
2656 atom_t atom
; /* property
atom (if no name specified
) */
2657 VARARG(name
,unicode_str
); /* property name
*/
2661 /* Remove a window property
*/
2662 @
REQ(remove_window_property
)
2663 user_handle_t window
; /* handle to the window
*/
2664 atom_t atom
; /* property
atom (if no name specified
) */
2665 VARARG(name
,unicode_str
); /* property name
*/
2667 lparam_t data
; /* data stored in property
*/
2671 /* Get a window property
*/
2672 @
REQ(get_window_property
)
2673 user_handle_t window
; /* handle to the window
*/
2674 atom_t atom
; /* property
atom (if no name specified
) */
2675 VARARG(name
,unicode_str
); /* property name
*/
2677 lparam_t data
; /* data stored in property
*/
2681 /* Get the list of properties of a window
*/
2682 @
REQ(get_window_properties
)
2683 user_handle_t window
; /* handle to the window
*/
2685 int total
; /* total number of properties
*/
2686 VARARG(props
,properties
); /* list of properties
*/
2690 /* Create a window station
*/
2691 @
REQ(create_winstation
)
2692 unsigned int flags
; /* window station flags
*/
2693 unsigned int access
; /* wanted access rights
*/
2694 unsigned int attributes
; /* object attributes
*/
2695 VARARG(name
,unicode_str
); /* object name
*/
2697 obj_handle_t handle
; /* handle to the window station
*/
2701 /* Open a handle to a window station
*/
2702 @
REQ(open_winstation
)
2703 unsigned int access
; /* wanted access rights
*/
2704 unsigned int attributes
; /* object attributes
*/
2705 VARARG(name
,unicode_str
); /* object name
*/
2707 obj_handle_t handle
; /* handle to the window station
*/
2711 /* Close a window station
*/
2712 @
REQ(close_winstation
)
2713 obj_handle_t handle
; /* handle to the window station
*/
2717 /* Get the process current window station
*/
2718 @
REQ(get_process_winstation
)
2720 obj_handle_t handle
; /* handle to the window station
*/
2724 /* Set the process current window station
*/
2725 @
REQ(set_process_winstation
)
2726 obj_handle_t handle
; /* handle to the window station
*/
2730 /* Enumerate window stations
*/
2731 @
REQ(enum_winstation
)
2732 unsigned int index
; /* current index
*/
2734 unsigned int next
; /* next index
*/
2735 VARARG(name
,unicode_str
); /* window station name
*/
2739 /* Create a desktop
*/
2740 @
REQ(create_desktop
)
2741 unsigned int flags
; /* desktop flags
*/
2742 unsigned int access
; /* wanted access rights
*/
2743 unsigned int attributes
; /* object attributes
*/
2744 VARARG(name
,unicode_str
); /* object name
*/
2746 obj_handle_t handle
; /* handle to the desktop
*/
2750 /* Open a handle to a desktop
*/
2752 obj_handle_t winsta
; /* window station to
open (null allowed
) */
2753 unsigned int flags
; /* desktop flags
*/
2754 unsigned int access
; /* wanted access rights
*/
2755 unsigned int attributes
; /* object attributes
*/
2756 VARARG(name
,unicode_str
); /* object name
*/
2758 obj_handle_t handle
; /* handle to the desktop
*/
2762 /* Open a handle to current input desktop
*/
2763 @
REQ(open_input_desktop
)
2764 unsigned int flags
; /* desktop flags
*/
2765 unsigned int access
; /* wanted access rights
*/
2766 unsigned int attributes
; /* object attributes
*/
2768 obj_handle_t handle
; /* handle to the desktop
*/
2772 /* Close a desktop
*/
2774 obj_handle_t handle
; /* handle to the desktop
*/
2778 /* Get the thread current desktop
*/
2779 @
REQ(get_thread_desktop
)
2780 thread_id_t tid
; /* thread id
*/
2782 obj_handle_t handle
; /* handle to the desktop
*/
2786 /* Set the thread current desktop
*/
2787 @
REQ(set_thread_desktop
)
2788 obj_handle_t handle
; /* handle to the desktop
*/
2792 /* Enumerate desktops
*/
2794 obj_handle_t winstation
; /* handle to the window station
*/
2795 unsigned int index
; /* current index
*/
2797 unsigned int next
; /* next index
*/
2798 VARARG(name
,unicode_str
); /* window station name
*/
2802 /* Get
/set information about a user
object (window station or desktop
) */
2803 @
REQ(set_user_object_info
)
2804 obj_handle_t handle
; /* handle to the object
*/
2805 unsigned int flags
; /* information to set
*/
2806 unsigned int obj_flags
; /* new object flags
*/
2808 int is_desktop
; /* is object a desktop?
*/
2809 unsigned int old_obj_flags
; /* old object flags
*/
2810 VARARG(name
,unicode_str
); /* object name
*/
2812 #define SET_USER_OBJECT_FLAGS
1
2815 /* Register a hotkey
*/
2816 @
REQ(register_hotkey
)
2817 user_handle_t window
; /* handle to the window
*/
2818 int id
; /* hotkey identifier
*/
2819 unsigned int flags
; /* modifier keys
*/
2820 unsigned int vkey
; /* virtual key code
*/
2822 int replaced
; /* did we replace an existing hotkey?
*/
2823 unsigned int flags
; /* flags of replaced hotkey
*/
2824 unsigned int vkey
; /* virtual key code of replaced hotkey
*/
2828 /* Unregister a hotkey
*/
2829 @
REQ(unregister_hotkey
)
2830 user_handle_t window
; /* handle to the window
*/
2831 int id
; /* hotkey identifier
*/
2833 unsigned int flags
; /* flags of removed hotkey
*/
2834 unsigned int vkey
; /* virtual key code of removed hotkey
*/
2838 /* Attach (or detach
) thread inputs
*/
2839 @
REQ(attach_thread_input
)
2840 thread_id_t tid_from
; /* thread to be attached
*/
2841 thread_id_t tid_to
; /* thread to which tid_from should be attached
*/
2842 int attach
; /* is it an attach?
*/
2846 /* Get input data for a given thread
*/
2847 @
REQ(get_thread_input
)
2848 thread_id_t tid
; /* id of thread
*/
2850 user_handle_t focus
; /* handle to the focus window
*/
2851 user_handle_t capture
; /* handle to the capture window
*/
2852 user_handle_t active
; /* handle to the active window
*/
2853 user_handle_t foreground
; /* handle to the global foreground window
*/
2854 user_handle_t menu_owner
; /* handle to the menu owner
*/
2855 user_handle_t move_size
; /* handle to the moving
/resizing window
*/
2856 user_handle_t caret
; /* handle to the caret window
*/
2857 user_handle_t cursor
; /* handle to the cursor
*/
2858 int show_count
; /* cursor show count
*/
2859 rectangle_t rect
; /* caret rectangle
*/
2863 /* Get the time of the last input event
*/
2864 @
REQ(get_last_input_time
)
2870 /* Retrieve queue keyboard state for a given thread
*/
2872 thread_id_t tid
; /* id of thread
*/
2873 int key
; /* optional key code or
-1 */
2875 unsigned char state
; /* state of specified key
*/
2876 VARARG(keystate
,bytes
); /* state array for all the keys
*/
2879 /* Set queue keyboard state for a given thread
*/
2881 thread_id_t tid
; /* id of thread
*/
2882 int async
; /* whether to change the async state too
*/
2883 VARARG(keystate
,bytes
); /* state array for all the keys
*/
2886 /* Set the system foreground window
*/
2887 @
REQ(set_foreground_window
)
2888 user_handle_t handle
; /* handle to the foreground window
*/
2890 user_handle_t previous
; /* handle to the previous foreground window
*/
2891 int send_msg_old
; /* whether we have to send a msg to the old window
*/
2892 int send_msg_new
; /* whether we have to send a msg to the new window
*/
2895 /* Set the current thread focus window
*/
2896 @
REQ(set_focus_window
)
2897 user_handle_t handle
; /* handle to the focus window
*/
2899 user_handle_t previous
; /* handle to the previous focus window
*/
2902 /* Set the current thread active window
*/
2903 @
REQ(set_active_window
)
2904 user_handle_t handle
; /* handle to the active window
*/
2906 user_handle_t previous
; /* handle to the previous active window
*/
2909 /* Set the current thread capture window
*/
2910 @
REQ(set_capture_window
)
2911 user_handle_t handle
; /* handle to the capture window
*/
2912 unsigned int flags
; /* capture
flags (see below
) */
2914 user_handle_t previous
; /* handle to the previous capture window
*/
2915 user_handle_t full_handle
; /* full
32-bit handle of new capture window
*/
2917 #define CAPTURE_MENU
0x01 /* capture is for a menu
*/
2918 #define CAPTURE_MOVESIZE
0x02 /* capture is for moving
/resizing
*/
2921 /* Set the current thread caret window
*/
2922 @
REQ(set_caret_window
)
2923 user_handle_t handle
; /* handle to the caret window
*/
2924 int width
; /* caret width
*/
2925 int height
; /* caret height
*/
2927 user_handle_t previous
; /* handle to the previous caret window
*/
2928 rectangle_t old_rect
; /* previous caret rectangle
*/
2929 int old_hide
; /* previous hide count
*/
2930 int old_state
; /* previous caret
state (1=on
, 0=off
) */
2934 /* Set the current thread caret information
*/
2935 @
REQ(set_caret_info
)
2936 unsigned int flags
; /* caret
flags (see below
) */
2937 user_handle_t handle
; /* handle to the caret window
*/
2938 int x
; /* caret x position
*/
2939 int y
; /* caret y position
*/
2940 int hide
; /* increment for hide
count (can be negative to show it
) */
2941 int state
; /* caret
state (1=on
, 0=off
, -1=toggle current state
) */
2943 user_handle_t full_handle
; /* handle to the current caret window
*/
2944 rectangle_t old_rect
; /* previous caret rectangle
*/
2945 int old_hide
; /* previous hide count
*/
2946 int old_state
; /* previous caret
state (1=on
, 0=off
) */
2948 #define SET_CARET_POS
0x01 /* set the caret position from x
,y
*/
2949 #define SET_CARET_HIDE
0x02 /* increment the caret hide count
*/
2950 #define SET_CARET_STATE
0x04 /* set the caret on
/off state
*/
2953 /* Set a window hook
*/
2955 int id
; /* id of the hook
*/
2956 process_id_t pid
; /* id of process to set the hook into
*/
2957 thread_id_t tid
; /* id of thread to set the hook into
*/
2960 client_ptr_t proc
; /* hook procedure
*/
2962 int unicode
; /* is it a unicode hook?
*/
2963 VARARG(module
,unicode_str
); /* module name
*/
2965 user_handle_t handle
; /* handle to the hook
*/
2966 unsigned int active_hooks
; /* active hooks bitmap
*/
2970 /* Remove a window hook
*/
2972 user_handle_t handle
; /* handle to the hook
*/
2973 client_ptr_t proc
; /* hook procedure if handle is
0 */
2974 int id
; /* id of the hook if handle is
0 */
2976 unsigned int active_hooks
; /* active hooks bitmap
*/
2980 /* Start calling a hook chain
*/
2981 @
REQ(start_hook_chain
)
2982 int id
; /* id of the hook
*/
2983 int event
; /* signalled event
*/
2984 user_handle_t window
; /* handle to the event window
*/
2985 int object_id
; /* object id for out of context winevent
*/
2986 int child_id
; /* child id for out of context winevent
*/
2988 user_handle_t handle
; /* handle to the next hook
*/
2989 process_id_t pid
; /* process id for low
-level keyboard
/mouse hooks
*/
2990 thread_id_t tid
; /* thread id for low
-level keyboard
/mouse hooks
*/
2991 int unicode
; /* is it a unicode hook?
*/
2992 client_ptr_t proc
; /* hook procedure
*/
2993 unsigned int active_hooks
; /* active hooks bitmap
*/
2994 VARARG(module
,unicode_str
); /* module name
*/
2998 /* Finished calling a hook chain
*/
2999 @
REQ(finish_hook_chain
)
3000 int id
; /* id of the hook
*/
3004 /* Get the hook information
*/
3006 user_handle_t handle
; /* handle to the current hook
*/
3007 int get_next
; /* do we want info about current or next hook?
*/
3008 int event
; /* signalled event
*/
3009 user_handle_t window
; /* handle to the event window
*/
3010 int object_id
; /* object id for out of context winevent
*/
3011 int child_id
; /* child id for out of context winevent
*/
3013 user_handle_t handle
; /* handle to the hook
*/
3014 int id
; /* id of the hook
*/
3015 process_id_t pid
; /* process id for low
-level keyboard
/mouse hooks
*/
3016 thread_id_t tid
; /* thread id for low
-level keyboard
/mouse hooks
*/
3017 client_ptr_t proc
; /* hook procedure
*/
3018 int unicode
; /* is it a unicode hook?
*/
3019 VARARG(module
,unicode_str
); /* module name
*/
3023 /* Create a window class
*/
3025 int local
; /* is it a local class?
*/
3026 atom_t atom
; /* class atom
*/
3027 unsigned int style
; /* class style
*/
3028 mod_handle_t instance
; /* module instance
*/
3029 int extra
; /* number of extra class bytes
*/
3030 int win_extra
; /* number of window extra bytes
*/
3031 client_ptr_t client_ptr
; /* pointer to class in client address space
*/
3032 VARARG(name
,unicode_str
); /* class name
*/
3034 atom_t atom
; /* resulting class atom
*/
3038 /* Destroy a window class
*/
3040 atom_t atom
; /* class atom
*/
3041 mod_handle_t instance
; /* module instance
*/
3042 VARARG(name
,unicode_str
); /* class name
*/
3044 client_ptr_t client_ptr
; /* pointer to class in client address space
*/
3048 /* Set some information in a class
*/
3049 @
REQ(set_class_info
)
3050 user_handle_t window
; /* handle to the window
*/
3051 unsigned int flags
; /* flags for info to
set (see below
) */
3052 atom_t atom
; /* class atom
*/
3053 unsigned int style
; /* class style
*/
3054 int win_extra
; /* number of window extra bytes
*/
3055 mod_handle_t instance
; /* module instance
*/
3056 int extra_offset
; /* offset to set in extra bytes
*/
3057 data_size_t extra_size
; /* size to set in extra bytes
*/
3058 lparam_t extra_value
; /* value to set in extra bytes
*/
3060 atom_t old_atom
; /* previous class atom
*/
3061 unsigned int old_style
; /* previous class style
*/
3062 int old_extra
; /* previous number of class extra bytes
*/
3063 int old_win_extra
; /* previous number of window extra bytes
*/
3064 mod_handle_t old_instance
; /* previous module instance
*/
3065 lparam_t old_extra_value
; /* old value in extra bytes
*/
3067 #define SET_CLASS_ATOM
0x0001
3068 #define SET_CLASS_STYLE
0x0002
3069 #define SET_CLASS_WINEXTRA
0x0004
3070 #define SET_CLASS_INSTANCE
0x0008
3071 #define SET_CLASS_EXTRA
0x0010
3074 /* Set
/get clipboard information
*/
3075 @
REQ(set_clipboard_info
)
3076 unsigned int flags
; /* flags for fields to
set (see below
) */
3077 user_handle_t clipboard
; /* clipboard window
*/
3078 user_handle_t owner
; /* clipboard owner
*/
3079 user_handle_t viewer
; /* first clipboard viewer
*/
3080 unsigned int seqno
; /* change sequence number
*/
3082 unsigned int flags
; /* status
flags (see below
) */
3083 user_handle_t old_clipboard
; /* old clipboard window
*/
3084 user_handle_t old_owner
; /* old clipboard owner
*/
3085 user_handle_t old_viewer
; /* old clipboard viewer
*/
3086 unsigned int seqno
; /* current sequence number
*/
3089 #define SET_CB_OPEN
0x001
3090 #define SET_CB_VIEWER
0x004
3091 #define SET_CB_SEQNO
0x008
3092 #define SET_CB_RELOWNER
0x010
3093 #define SET_CB_CLOSE
0x020
3094 #define CB_OPEN
0x040
3095 #define CB_OWNER
0x080
3096 #define CB_PROCESS
0x100
3099 /* Empty the clipboard and grab ownership
*/
3100 @
REQ(empty_clipboard
)
3104 /* Open a security token
*/
3106 obj_handle_t handle
; /* handle to the thread or process
*/
3107 unsigned int access
; /* access rights to the new token
*/
3108 unsigned int attributes
;/* object attributes
*/
3109 unsigned int flags
; /* flags (see below
) */
3111 obj_handle_t token
; /* handle to the token
*/
3113 #define OPEN_TOKEN_THREAD
1
3114 #define OPEN_TOKEN_AS_SELF
2
3117 /* Set
/get the global windows
*/
3118 @
REQ(set_global_windows
)
3119 unsigned int flags
; /* flags for fields to
set (see below
) */
3120 user_handle_t shell_window
; /* handle to the new shell window
*/
3121 user_handle_t shell_listview
; /* handle to the new shell listview window
*/
3122 user_handle_t progman_window
; /* handle to the new program manager window
*/
3123 user_handle_t taskman_window
; /* handle to the new task manager window
*/
3125 user_handle_t old_shell_window
; /* handle to the shell window
*/
3126 user_handle_t old_shell_listview
; /* handle to the shell listview window
*/
3127 user_handle_t old_progman_window
; /* handle to the new program manager window
*/
3128 user_handle_t old_taskman_window
; /* handle to the new task manager window
*/
3130 #define SET_GLOBAL_SHELL_WINDOWS
0x01 /* set both main shell and listview windows
*/
3131 #define SET_GLOBAL_PROGMAN_WINDOW
0x02
3132 #define SET_GLOBAL_TASKMAN_WINDOW
0x04
3134 /* Adjust the privileges held by a token
*/
3135 @
REQ(adjust_token_privileges
)
3136 obj_handle_t handle
; /* handle to the token
*/
3137 int disable_all
; /* disable all privileges?
*/
3138 int get_modified_state
; /* get modified privileges?
*/
3139 VARARG(privileges
,LUID_AND_ATTRIBUTES
); /* privileges to enable
/disable
/remove
*/
3141 unsigned int len
; /* total length in bytes required to store token privileges
*/
3142 VARARG(privileges
,LUID_AND_ATTRIBUTES
); /* modified privileges
*/
3145 /* Retrieves the set of privileges held by or available to a token
*/
3146 @
REQ(get_token_privileges
)
3147 obj_handle_t handle
; /* handle to the token
*/
3149 unsigned int len
; /* total length in bytes required to store token privileges
*/
3150 VARARG(privileges
,LUID_AND_ATTRIBUTES
); /* privileges held by or available to a token
*/
3153 /* Check the token has the required privileges
*/
3154 @
REQ(check_token_privileges
)
3155 obj_handle_t handle
; /* handle to the token
*/
3156 int all_required
; /* are all the privileges required for the check to succeed?
*/
3157 VARARG(privileges
,LUID_AND_ATTRIBUTES
); /* privileges to check
*/
3159 int has_privileges
; /* does the token have the required privileges?
*/
3160 VARARG(privileges
,LUID_AND_ATTRIBUTES
); /* privileges held by or available to a token
*/
3163 @
REQ(duplicate_token
)
3164 obj_handle_t handle
; /* handle to the token to duplicate
*/
3165 unsigned int access
; /* access rights to the new token
*/
3166 unsigned int attributes
; /* object attributes
*/
3167 int primary
; /* is the new token to be a primary one?
*/
3168 int impersonation_level
; /* impersonation level of the new token
*/
3170 obj_handle_t new_handle
; /* duplicated handle
*/
3174 obj_handle_t handle
; /* handle to the token
*/
3175 unsigned int desired_access
; /* desired access to the object
*/
3176 unsigned int mapping_read
; /* mapping from generic read to specific rights
*/
3177 unsigned int mapping_write
; /* mapping from generic write to specific rights
*/
3178 unsigned int mapping_execute
; /* mapping from generic execute to specific rights
*/
3179 unsigned int mapping_all
; /* mapping from generic all to specific rights
*/
3180 VARARG(sd
,security_descriptor
); /* security descriptor to check
*/
3182 unsigned int access_granted
; /* access rights actually granted
*/
3183 unsigned int access_status
; /* was access granted?
*/
3184 unsigned int privileges_len
; /* length needed to store privileges
*/
3185 VARARG(privileges
,LUID_AND_ATTRIBUTES
); /* privileges used during access check
*/
3189 obj_handle_t handle
; /* handle to the token
*/
3190 unsigned int which_sid
; /* which SID to retrieve from the token
*/
3192 data_size_t sid_len
; /* length needed to store sid
*/
3193 VARARG(sid
,SID
); /* the sid specified by which_sid from the token
*/
3196 @
REQ(get_token_groups
)
3197 obj_handle_t handle
; /* handle to the token
*/
3199 data_size_t user_len
; /* length needed to store user
*/
3200 VARARG(user
,token_groups
); /* groups the token
's user belongs to */
3203 @REQ(get_token_default_dacl)
3204 obj_handle_t handle; /* handle to the token */
3206 data_size_t acl_len; /* length needed to store access control list */
3207 VARARG(acl,ACL); /* access control list */
3210 @REQ(set_token_default_dacl)
3211 obj_handle_t handle; /* handle to the token */
3212 VARARG(acl,ACL); /* default dacl to set */
3215 @REQ(set_security_object)
3216 obj_handle_t handle; /* handle to the object */
3217 unsigned int security_info; /* which parts of security descriptor to set */
3218 VARARG(sd,security_descriptor); /* security descriptor to set */
3221 @REQ(get_security_object)
3222 obj_handle_t handle; /* handle to the object */
3223 unsigned int security_info; /* which parts of security descriptor to get */
3225 unsigned int sd_len; /* buffer size needed for sd */
3226 VARARG(sd,security_descriptor); /* retrieved security descriptor */
3229 /* Create a mailslot */
3230 @REQ(create_mailslot)
3231 unsigned int access; /* wanted access rights */
3232 unsigned int attributes; /* object attributes */
3233 obj_handle_t rootdir; /* root directory */
3234 timeout_t read_timeout;
3235 unsigned int max_msgsize;
3236 VARARG(name,unicode_str); /* mailslot name */
3238 obj_handle_t handle; /* handle to the mailslot */
3242 /* Set mailslot information */
3243 @REQ(set_mailslot_info)
3244 obj_handle_t handle; /* handle to the mailslot */
3245 timeout_t read_timeout;
3248 timeout_t read_timeout;
3249 unsigned int max_msgsize;
3251 #define MAILSLOT_SET_READ_TIMEOUT 1
3254 /* Create a directory object */
3255 @REQ(create_directory)
3256 unsigned int access; /* access flags */
3257 unsigned int attributes; /* object attributes */
3258 obj_handle_t rootdir; /* root directory */
3259 VARARG(directory_name,unicode_str); /* Directory name */
3261 obj_handle_t handle; /* handle to the directory */
3265 /* Open a directory object */
3266 @REQ(open_directory)
3267 unsigned int access; /* access flags */
3268 unsigned int attributes; /* object attributes */
3269 obj_handle_t rootdir; /* root directory */
3270 VARARG(directory_name,unicode_str); /* Directory name */
3272 obj_handle_t handle; /* handle to the directory */
3276 /* Get a directory entry by index */
3277 @REQ(get_directory_entry)
3278 obj_handle_t handle; /* handle to the directory */
3279 unsigned int index; /* entry index */
3281 data_size_t name_len; /* length of the entry name in bytes */
3282 VARARG(name,unicode_str,name_len); /* entry name */
3283 VARARG(type,unicode_str); /* entry type */
3287 /* Create a symbolic link object */
3288 @REQ(create_symlink)
3289 unsigned int access; /* access flags */
3290 unsigned int attributes; /* object attributes */
3291 obj_handle_t rootdir; /* root directory */
3292 data_size_t name_len; /* length of the symlink name in bytes */
3293 VARARG(name,unicode_str,name_len); /* symlink name */
3294 VARARG(target_name,unicode_str); /* target name */
3296 obj_handle_t handle; /* handle to the symlink */
3300 /* Open a symbolic link object */
3302 unsigned int access; /* access flags */
3303 unsigned int attributes; /* object attributes */
3304 obj_handle_t rootdir; /* root directory */
3305 VARARG(name,unicode_str); /* symlink name */
3307 obj_handle_t handle; /* handle to the symlink */
3311 /* Query a symbolic link object */
3313 obj_handle_t handle; /* handle to the symlink */
3315 data_size_t total; /* total needed size for name */
3316 VARARG(target_name,unicode_str); /* target name */
3320 /* Query basic object information */
3321 @REQ(get_object_info)
3322 obj_handle_t handle; /* handle to the object */
3324 unsigned int access; /* granted access mask */
3325 unsigned int ref_count; /* object ref count */
3326 unsigned int handle_count; /* object handle count */
3327 data_size_t total; /* total needed size for name */
3328 VARARG(name,unicode_str); /* object name */
3332 /* Query object type name information */
3333 @REQ(get_object_type)
3334 obj_handle_t handle; /* handle to the object */
3336 data_size_t total; /* needed size for type name */
3337 VARARG(type,unicode_str); /* type name */
3341 /* Unlink a named object */
3343 obj_handle_t handle; /* handle to the object */
3347 /* Query the impersonation level of an impersonation token */
3348 @REQ(get_token_impersonation_level)
3349 obj_handle_t handle; /* handle to the object */
3351 int impersonation_level; /* impersonation level of the impersonation token */
3354 /* Allocate a locally-unique identifier */
3355 @REQ(allocate_locally_unique_id)
3361 /* Create a device manager */
3362 @REQ(create_device_manager)
3363 unsigned int access; /* wanted access rights */
3364 unsigned int attributes; /* object attributes */
3366 obj_handle_t handle; /* handle to the device */
3370 /* Create a device */
3372 unsigned int access; /* wanted access rights */
3373 unsigned int attributes; /* object attributes */
3374 obj_handle_t rootdir; /* root directory */
3375 client_ptr_t user_ptr; /* opaque ptr for use by client */
3376 obj_handle_t manager; /* device manager */
3377 VARARG(name,unicode_str); /* object name */
3379 obj_handle_t handle; /* handle to the device */
3383 /* Delete a device */
3385 obj_handle_t handle; /* handle to the device */
3389 /* Retrieve the next pending device irp request */
3390 @REQ(get_next_device_request)
3391 obj_handle_t manager; /* handle to the device manager */
3392 obj_handle_t prev; /* handle to the previous irp */
3393 unsigned int status; /* status of the previous irp */
3395 client_ptr_t user_ptr; /* opaque ptr for the device */
3396 irp_params_t params; /* irp parameters */
3397 obj_handle_t next; /* handle to the next irp */
3398 process_id_t client_pid; /* pid of process calling irp */
3399 thread_id_t client_tid; /* tid of thread calling irp */
3400 data_size_t in_size; /* total needed input size */
3401 data_size_t out_size; /* needed output size */
3402 VARARG(next_data,bytes); /* input data of the next irp */
3406 /* Make the current process a system process */
3407 @REQ(make_process_system)
3409 obj_handle_t event; /* event signaled when all user processes have exited */
3413 /* Get detailed fixed-size information about a token */
3414 @REQ(get_token_statistics)
3415 obj_handle_t handle; /* handle to the object */
3417 luid_t token_id; /* locally-unique identifier of the token */
3418 luid_t modified_id; /* locally-unique identifier of the modified version of the token */
3419 int primary; /* is the token primary or impersonation? */
3420 int impersonation_level; /* level of impersonation */
3421 int group_count; /* the number of groups the token is a member of */
3422 int privilege_count; /* the number of privileges the token has */
3426 /* Create I/O completion port */
3427 @REQ(create_completion)
3428 unsigned int access; /* desired access to a port */
3429 unsigned int attributes; /* object attributes */
3430 unsigned int concurrent; /* max number of concurrent active threads */
3431 obj_handle_t rootdir; /* root directory */
3432 VARARG(filename,unicode_str); /* port name */
3434 obj_handle_t handle; /* port handle */
3438 /* Open I/O completion port */
3439 @REQ(open_completion)
3440 unsigned int access; /* desired access to a port */
3441 unsigned int attributes; /* object attributes */
3442 obj_handle_t rootdir; /* root directory */
3443 VARARG(filename,unicode_str); /* port name */
3445 obj_handle_t handle; /* port handle */
3449 /* add completion to completion port */
3450 @REQ(add_completion)
3451 obj_handle_t handle; /* port handle */
3452 apc_param_t ckey; /* completion key */
3453 apc_param_t cvalue; /* completion value */
3454 apc_param_t information; /* IO_STATUS_BLOCK Information */
3455 unsigned int status; /* completion result */
3459 /* get completion from completion port queue */
3460 @REQ(remove_completion)
3461 obj_handle_t handle; /* port handle */
3463 apc_param_t ckey; /* completion key */
3464 apc_param_t cvalue; /* completion value */
3465 apc_param_t information; /* IO_STATUS_BLOCK Information */
3466 unsigned int status; /* completion result */
3470 /* get completion queue depth */
3471 @REQ(query_completion)
3472 obj_handle_t handle; /* port handle */
3474 unsigned int depth; /* completion queue depth */
3478 /* associate object with completion port */
3479 @REQ(set_completion_info)
3480 obj_handle_t handle; /* object handle */
3481 apc_param_t ckey; /* completion key */
3482 obj_handle_t chandle; /* port handle */
3486 /* check for associated completion and push msg */
3487 @REQ(add_fd_completion)
3488 obj_handle_t handle; /* async' object
*/
3489 apc_param_t cvalue
; /* completion value
*/
3490 apc_param_t information
; /* IO_STATUS_BLOCK Information
*/
3491 unsigned int status
; /* completion status
*/
3495 /* Retrieve layered info for a window
*/
3496 @
REQ(get_window_layered_info
)
3497 user_handle_t handle
; /* handle to the window
*/
3499 unsigned int color_key
; /* color key
*/
3500 unsigned int alpha
; /* alpha (0.
.255) */
3501 unsigned int flags
; /* LWA_
* flags
*/
3505 /* Set layered info for a window
*/
3506 @
REQ(set_window_layered_info
)
3507 user_handle_t handle
; /* handle to the window
*/
3508 unsigned int color_key
; /* color key
*/
3509 unsigned int alpha
; /* alpha (0.
.255) */
3510 unsigned int flags
; /* LWA_
* flags
*/
3514 /* Allocate an arbitrary user handle
*/
3515 @
REQ(alloc_user_handle
)
3517 user_handle_t handle
; /* allocated handle
*/
3521 /* Free an arbitrary user handle
*/
3522 @
REQ(free_user_handle
)
3523 user_handle_t handle
; /* handle to free
*/
3527 /* Set
/get the current cursor
*/
3529 unsigned int flags
; /* flags for fields to
set (see below
) */
3530 user_handle_t handle
; /* handle to the cursor
*/
3531 int show_count
; /* show count increment
/decrement
*/
3532 int x
; /* cursor position
*/
3534 rectangle_t clip
; /* cursor clip rectangle
*/
3535 unsigned int clip_msg
; /* message to post on cursor clip changes
*/
3537 user_handle_t prev_handle
; /* previous handle
*/
3538 int prev_count
; /* previous show count
*/
3539 int prev_x
; /* previous position
*/
3541 int new_x
; /* new position
*/
3543 rectangle_t new_clip
; /* new clip rectangle
*/
3544 unsigned int last_change
; /* time of last position change
*/
3546 #define SET_CURSOR_HANDLE
0x01
3547 #define SET_CURSOR_COUNT
0x02
3548 #define SET_CURSOR_POS
0x04
3549 #define SET_CURSOR_CLIP
0x08
3550 #define SET_CURSOR_NOCLIP
0x10
3553 /* Modify the list of registered rawinput devices
*/
3554 @
REQ(update_rawinput_devices
)
3555 VARARG(devices
,rawinput_devices
);
3559 /* Retrieve the suspended context of a thread
*/
3560 @
REQ(get_suspend_context
)
3562 VARARG(context
,context
); /* thread context
*/
3566 /* Store the suspend context of a thread
*/
3567 @
REQ(set_suspend_context
)
3568 VARARG(context
,context
); /* thread context
*/
3572 /* Create a new job object
*/
3574 unsigned int access
; /* wanted access rights
*/
3575 unsigned int attributes
; /* object attributes
*/
3576 VARARG(objattr
,object_attributes
); /* object attributes
*/
3578 obj_handle_t handle
; /* handle to the job
*/
3582 /* Assign a job object to a process
*/
3584 obj_handle_t job
; /* handle to the job
*/
3585 obj_handle_t process
; /* handle to the process
*/
3589 /* Check if a process is associated with a job
*/
3590 @
REQ(process_in_job
)
3591 obj_handle_t job
; /* handle to the job
*/
3592 obj_handle_t process
; /* handle to the process
*/
3596 /* Set limit flags on a job
*/
3597 @
REQ(set_job_limits
)
3598 obj_handle_t handle
; /* handle to the job
*/
3599 unsigned int limit_flags
; /* new limit flags
*/
3603 /* Set new completion port for a job
*/
3604 @
REQ(set_job_completion_port
)
3605 obj_handle_t job
; /* handle to the job
*/
3606 obj_handle_t port
; /* handle to the completion port
*/
3607 client_ptr_t key
; /* key to send with completion messages
*/
3611 /* Terminate all processes associated with the job
*/
3613 obj_handle_t handle
; /* handle to the job
*/
3614 int status
; /* process exit code
*/