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 int code
; /* OUTPUT_DEBUG_STRING_EVENT
*/
134 data_size_t length
; /* string length
*/
135 client_ptr_t string
; /* string to
display (in debugged process address space
) */
139 int code
; /* RIP_EVENT
*/
145 /* supported CPU types
*/
148 CPU_x86
, CPU_x86_64
, CPU_POWERPC
, CPU_ARM
, CPU_ARM64
150 typedef int cpu_type_t
;
155 cpu_type_t cpu
; /* cpu type
*/
156 unsigned int flags
; /* SERVER_CTX_
* flags
*/
159 struct
{ unsigned int eip
, ebp
, esp
, eflags
, cs
, ss
; } i386_regs
;
160 struct
{ unsigned __int64 rip
, rbp
, rsp
;
161 unsigned int cs
, ss
, flags
, __pad
; } x86_64_regs
;
162 struct
{ unsigned int iar
, msr
, ctr
, lr
, dar
, dsisr
, trap
, __pad
; } powerpc_regs
;
163 struct
{ unsigned int sp
, lr
, pc
, cpsr
; } arm_regs
;
164 struct
{ unsigned __int64 sp
, pc
, pstate
; } arm64_regs
;
165 } ctl
; /* selected by SERVER_CTX_CONTROL
*/
168 struct
{ unsigned int eax
, ebx
, ecx
, edx
, esi
, edi
; } i386_regs
;
169 struct
{ unsigned __int64 rax
,rbx
, rcx
, rdx
, rsi
, rdi
,
170 r8
, r9
, r10
, r11
, r12
, r13
, r14
, r15
; } x86_64_regs
;
171 struct
{ unsigned int gpr
[32], cr
, xer
; } powerpc_regs
;
172 struct
{ unsigned int r
[13]; } arm_regs
;
173 struct
{ unsigned __int64 x
[31]; } arm64_regs
;
174 } integer
; /* selected by SERVER_CTX_INTEGER
*/
177 struct
{ unsigned int ds
, es
, fs
, gs
; } i386_regs
;
178 struct
{ unsigned int ds
, es
, fs
, gs
; } x86_64_regs
;
179 } seg
; /* selected by SERVER_CTX_SEGMENTS
*/
182 struct
{ unsigned int ctrl
, status
, tag
, err_off
, err_sel
, data_off
, data_sel
, cr0npx
;
183 unsigned char regs
[80]; } i386_regs
;
184 struct
{ struct
{ unsigned __int64 low
, high
; } fpregs
[32]; } x86_64_regs
;
185 struct
{ double fpr
[32], fpscr
; } powerpc_regs
;
186 } fp
; /* selected by SERVER_CTX_FLOATING_POINT
*/
189 struct
{ unsigned int dr0
, dr1
, dr2
, dr3
, dr6
, dr7
; } i386_regs
;
190 struct
{ unsigned __int64 dr0
, dr1
, dr2
, dr3
, dr6
, dr7
; } x86_64_regs
;
191 struct
{ unsigned int dr
[8]; } powerpc_regs
;
192 } debug
; /* selected by SERVER_CTX_DEBUG_REGISTERS
*/
195 unsigned char i386_regs
[512];
196 } ext
; /* selected by SERVER_CTX_EXTENDED_REGISTERS
*/
199 #define SERVER_CTX_CONTROL
0x01
200 #define SERVER_CTX_INTEGER
0x02
201 #define SERVER_CTX_SEGMENTS
0x04
202 #define SERVER_CTX_FLOATING_POINT
0x08
203 #define SERVER_CTX_DEBUG_REGISTERS
0x10
204 #define SERVER_CTX_EXTENDED_REGISTERS
0x20
206 /* structure used in sending an fd from client to server
*/
209 thread_id_t tid
; /* thread id
*/
210 int fd
; /* file descriptor on client
-side
*/
213 /* structure sent by the server on the wait fifo
*/
216 client_ptr_t cookie
; /* magic cookie that was passed in select_request
*/
217 int signaled
; /* wait result
*/
221 /* NT
-style timeout
, in
100ns units
, negative means relative timeout
*/
222 typedef __int64 timeout_t
;
223 #define
TIMEOUT_INFINITE (((timeout_t
)0x7fffffff) << 32 |
0xffffffff)
225 /* structure for process startup info
*/
228 unsigned int debug_flags
;
229 unsigned int console_flags
;
230 obj_handle_t console
;
232 obj_handle_t hstdout
;
233 obj_handle_t hstderr
;
240 unsigned int attribute
;
243 data_size_t curdir_len
;
244 data_size_t dllpath_len
;
245 data_size_t imagepath_len
;
246 data_size_t cmdline_len
;
247 data_size_t title_len
;
248 data_size_t desktop_len
;
249 data_size_t shellinfo_len
;
250 data_size_t runtime_len
;
251 /* VARARG(curdir
,unicode_str
,curdir_len
); */
252 /* VARARG(dllpath
,unicode_str
,dllpath_len
); */
253 /* VARARG(imagepath
,unicode_str
,imagepath_len
); */
254 /* VARARG(cmdline
,unicode_str
,cmdline_len
); */
255 /* VARARG(title
,unicode_str
,title_len
); */
256 /* VARARG(desktop
,unicode_str
,desktop_len
); */
257 /* VARARG(shellinfo
,unicode_str
,shellinfo_len
); */
258 /* VARARG(runtime
,unicode_str
,runtime_len
); */
261 /* structure returned in the list of window properties
*/
264 atom_t atom
; /* property atom
*/
265 int string
; /* was atom a string originally?
*/
266 lparam_t data
; /* data stored in property
*/
269 /* structure to specify window rectangles
*/
278 /* structure for parameters of async I
/O calls
*/
281 obj_handle_t handle
; /* object to perform I
/O on
*/
282 obj_handle_t event
; /* event to signal when done
*/
283 client_ptr_t callback
; /* client
-side callback to call upon end of async
*/
284 client_ptr_t iosb
; /* I
/O status block in client addr space
*/
285 client_ptr_t arg
; /* opaque user data to pass to callback
*/
286 apc_param_t cvalue
; /* completion value to use for completion events
*/
289 /* structures for extra message data
*/
291 struct hardware_msg_data
293 lparam_t info
; /* extra info
*/
294 int x
; /* x position
*/
295 int y
; /* y position
*/
296 unsigned int hw_id
; /* unique id
*/
297 unsigned int flags
; /* hook flags
*/
303 int type
; /* RIM_TYPEKEYBOARD
*/
304 unsigned int message
; /* message generated by this rawinput event
*/
305 unsigned short vkey
; /* virtual key code
*/
306 unsigned short scan
; /* scan code
*/
310 int type
; /* RIM_TYPEMOUSE
*/
311 int x
; /* x coordinate
*/
312 int y
; /* y coordinate
*/
313 unsigned int data
; /* mouse data
*/
318 struct callback_msg_data
320 client_ptr_t callback
; /* callback function
*/
321 lparam_t data
; /* user data for callback
*/
322 lparam_t result
; /* message result
*/
325 struct winevent_msg_data
327 user_handle_t hook
; /* hook handle
*/
328 thread_id_t tid
; /* thread id
*/
329 client_ptr_t hook_proc
; /* hook proc address
*/
330 /* followed by module name if any
*/
338 int type
; /* INPUT_KEYBOARD
*/
339 unsigned short vkey
; /* virtual key code
*/
340 unsigned short scan
; /* scan code
*/
341 unsigned int flags
; /* event flags
*/
342 unsigned int time
; /* event time
*/
343 lparam_t info
; /* extra info
*/
347 int type
; /* INPUT_MOUSE
*/
348 int x
; /* coordinates
*/
350 unsigned int data
; /* mouse data
*/
351 unsigned int flags
; /* event flags
*/
352 unsigned int time
; /* event time
*/
353 lparam_t info
; /* extra info
*/
357 int type
; /* INPUT_HARDWARE
*/
358 unsigned int msg
; /* message code
*/
359 lparam_t lparam
; /* message param
*/
365 unsigned char bytes
[1]; /* raw data for sent messages
*/
366 struct hardware_msg_data hardware
;
367 struct callback_msg_data callback
;
368 struct winevent_msg_data winevent
;
371 /* structure for console char
/attribute info
*/
378 /* structure returned in filesystem events
*/
379 struct filesystem_event
388 unsigned int low_part
;
392 #define MAX_ACL_LEN
65535
394 struct security_descriptor
396 unsigned int control
; /* SE_ flags
*/
397 data_size_t owner_len
;
398 data_size_t group_len
;
399 data_size_t sacl_len
;
400 data_size_t dacl_len
;
401 /* VARARG(owner
,SID
); */
402 /* VARARG(group
,SID
); */
403 /* VARARG(sacl
,ACL
); */
404 /* VARARG(dacl
,ACL
); */
407 struct object_attributes
409 obj_handle_t rootdir
; /* root directory
*/
410 data_size_t sd_len
; /* length of security_descriptor data. may be
0 */
411 data_size_t name_len
; /* length of the name string. may be
0 */
412 /* VARARG(sd
,security_descriptor
); */
413 /* VARARG(name
,unicode_str
); */
419 /* unsigned int attributes
[count
]; */
420 /* VARARG(sids
,SID
); */
428 SELECT_SIGNAL_AND_WAIT
,
429 SELECT_KEYED_EVENT_WAIT
,
430 SELECT_KEYED_EVENT_RELEASE
438 enum select_op op
; /* SELECT_WAIT or SELECT_WAIT_ALL
*/
439 obj_handle_t handles
[MAXIMUM_WAIT_OBJECTS
];
443 enum select_op op
; /* SELECT_SIGNAL_AND_WAIT
*/
445 obj_handle_t signal
; /* must be last in the structure so we can remove it on retries
*/
449 enum select_op op
; /* SELECT_KEYED_EVENT_WAIT or SELECT_KEYED_EVENT_RELEASE
*/
478 enum apc_type type
; /* APC_USER
*/
480 client_ptr_t func
; /* void (__stdcall
*func
)(ULONG_PTR
,ULONG_PTR
,ULONG_PTR
); */
481 apc_param_t args
[3]; /* arguments for user function
*/
485 enum apc_type type
; /* APC_TIMER
*/
487 client_ptr_t func
; /* void (__stdcall
*func
)(void
*, unsigned int
, unsigned int
); */
488 timeout_t time
; /* absolute time of expiration
*/
489 client_ptr_t arg
; /* user argument
*/
493 enum apc_type type
; /* APC_ASYNC_IO
*/
494 unsigned int status
; /* I
/O status
*/
495 client_ptr_t func
; /* unsigned
int (*func)(void*, void*, unsigned int, void **); */
496 client_ptr_t user
; /* user pointer
*/
497 client_ptr_t sb
; /* status block
*/
501 enum apc_type type
; /* APC_VIRTUAL_ALLOC
*/
502 unsigned int op_type
; /* type of operation
*/
503 client_ptr_t addr
; /* requested address
*/
504 mem_size_t size
; /* allocation size
*/
505 unsigned int zero_bits
; /* allocation alignment
*/
506 unsigned int prot
; /* memory protection flags
*/
510 enum apc_type type
; /* APC_VIRTUAL_FREE
*/
511 unsigned int op_type
; /* type of operation
*/
512 client_ptr_t addr
; /* requested address
*/
513 mem_size_t size
; /* allocation size
*/
517 enum apc_type type
; /* APC_VIRTUAL_QUERY
*/
519 client_ptr_t addr
; /* requested address
*/
523 enum apc_type type
; /* APC_VIRTUAL_PROTECT
*/
524 unsigned int prot
; /* new protection flags
*/
525 client_ptr_t addr
; /* requested address
*/
526 mem_size_t size
; /* requested size
*/
530 enum apc_type type
; /* APC_VIRTUAL_FLUSH
*/
532 client_ptr_t addr
; /* requested address
*/
533 mem_size_t size
; /* requested size
*/
537 enum apc_type type
; /* APC_VIRTUAL_LOCK
*/
539 client_ptr_t addr
; /* requested address
*/
540 mem_size_t size
; /* requested size
*/
544 enum apc_type type
; /* APC_VIRTUAL_UNLOCK
*/
546 client_ptr_t addr
; /* requested address
*/
547 mem_size_t size
; /* requested size
*/
551 enum apc_type type
; /* APC_MAP_VIEW
*/
552 obj_handle_t handle
; /* mapping handle
*/
553 client_ptr_t addr
; /* requested address
*/
554 mem_size_t size
; /* allocation size
*/
555 file_pos_t offset
; /* file offset
*/
556 unsigned int alloc_type
;/* allocation type
*/
557 unsigned short zero_bits
; /* allocation alignment
*/
558 unsigned short prot
; /* memory protection flags
*/
562 enum apc_type type
; /* APC_UNMAP_VIEW
*/
564 client_ptr_t addr
; /* view address
*/
568 enum apc_type type
; /* APC_CREATE_THREAD
*/
569 int suspend
; /* suspended thread?
*/
570 client_ptr_t func
; /* void (__stdcall
*func
)(void*)
; start function
*/
571 client_ptr_t arg
; /* argument for start function
*/
572 mem_size_t reserve
; /* reserve size for thread stack
*/
573 mem_size_t commit
; /* commit size for thread stack
*/
582 enum apc_type type
; /* APC_ASYNC_IO
*/
583 unsigned int status
; /* new status of async operation
*/
584 client_ptr_t apc
; /* user APC to call
*/
585 unsigned int total
; /* bytes transferred
*/
589 enum apc_type type
; /* APC_VIRTUAL_ALLOC
*/
590 unsigned int status
; /* status returned by call
*/
591 client_ptr_t addr
; /* resulting address
*/
592 mem_size_t size
; /* resulting size
*/
596 enum apc_type type
; /* APC_VIRTUAL_FREE
*/
597 unsigned int status
; /* status returned by call
*/
598 client_ptr_t addr
; /* resulting address
*/
599 mem_size_t size
; /* resulting size
*/
603 enum apc_type type
; /* APC_VIRTUAL_QUERY
*/
604 unsigned int status
; /* status returned by call
*/
605 client_ptr_t base
; /* resulting base address
*/
606 client_ptr_t alloc_base
;/* resulting allocation base
*/
607 mem_size_t size
; /* resulting region size
*/
608 unsigned short state
; /* resulting region state
*/
609 unsigned short prot
; /* resulting region protection
*/
610 unsigned short alloc_prot
;/* resulting allocation protection
*/
611 unsigned short alloc_type
;/* resulting region allocation type
*/
615 enum apc_type type
; /* APC_VIRTUAL_PROTECT
*/
616 unsigned int status
; /* status returned by call
*/
617 client_ptr_t addr
; /* resulting address
*/
618 mem_size_t size
; /* resulting size
*/
619 unsigned int prot
; /* old protection flags
*/
623 enum apc_type type
; /* APC_VIRTUAL_FLUSH
*/
624 unsigned int status
; /* status returned by call
*/
625 client_ptr_t addr
; /* resulting address
*/
626 mem_size_t size
; /* resulting size
*/
630 enum apc_type type
; /* APC_VIRTUAL_LOCK
*/
631 unsigned int status
; /* status returned by call
*/
632 client_ptr_t addr
; /* resulting address
*/
633 mem_size_t size
; /* resulting size
*/
637 enum apc_type type
; /* APC_VIRTUAL_UNLOCK
*/
638 unsigned int status
; /* status returned by call
*/
639 client_ptr_t addr
; /* resulting address
*/
640 mem_size_t size
; /* resulting size
*/
644 enum apc_type type
; /* APC_MAP_VIEW
*/
645 unsigned int status
; /* status returned by call
*/
646 client_ptr_t addr
; /* resulting address
*/
647 mem_size_t size
; /* resulting size
*/
651 enum apc_type type
; /* APC_MAP_VIEW
*/
652 unsigned int status
; /* status returned by call
*/
656 enum apc_type type
; /* APC_CREATE_THREAD
*/
657 unsigned int status
; /* status returned by call
*/
658 thread_id_t tid
; /* thread id
*/
659 obj_handle_t handle
; /* handle to new thread
*/
663 struct rawinput_device
665 unsigned short usage_page
;
666 unsigned short usage
;
668 user_handle_t target
;
671 /****************************************************************/
672 /* Request declarations
*/
674 /* Create a new process from the context of the parent
*/
676 int inherit_all
; /* inherit all handles from parent
*/
677 unsigned int create_flags
; /* creation flags
*/
678 int socket_fd
; /* file descriptor for process socket
*/
679 obj_handle_t exe_file
; /* file handle for main exe
*/
680 unsigned int process_access
; /* access rights for process object
*/
681 unsigned int process_attr
; /* attributes for process object
*/
682 unsigned int thread_access
; /* access rights for thread object
*/
683 unsigned int thread_attr
; /* attributes for thread object
*/
684 cpu_type_t cpu
; /* CPU that the new process will use
*/
685 data_size_t info_size
; /* size of startup info
*/
686 VARARG(info
,startup_info
,info_size
); /* startup information
*/
687 VARARG(env
,unicode_str
); /* environment for new process
*/
689 obj_handle_t info
; /* new process info handle
*/
690 process_id_t pid
; /* process id
*/
691 obj_handle_t phandle
; /* process
handle (in the current process
) */
692 thread_id_t tid
; /* thread id
*/
693 obj_handle_t thandle
; /* thread
handle (in the current process
) */
697 /* Retrieve information about a newly started process
*/
698 @
REQ(get_new_process_info
)
699 obj_handle_t info
; /* info handle returned from new_process_request
*/
701 int success
; /* did the process start successfully?
*/
702 int exit_code
; /* process exit code if failed
*/
706 /* Create a new thread from the context of the parent
*/
708 unsigned int access
; /* wanted access rights
*/
709 unsigned int attributes
; /* object attributes
*/
710 int suspend
; /* new thread should be suspended on creation
*/
711 int request_fd
; /* fd for request pipe
*/
713 thread_id_t tid
; /* thread id
*/
714 obj_handle_t handle
; /* thread
handle (in the current process
) */
718 /* Retrieve the new process startup info
*/
719 @
REQ(get_startup_info
)
721 obj_handle_t exe_file
; /* file handle for main exe
*/
722 data_size_t info_size
; /* size of startup info
*/
723 VARARG(info
,startup_info
,info_size
); /* startup information
*/
724 VARARG(env
,unicode_str
); /* environment
*/
728 /* Signal the end of the process initialization
*/
729 @
REQ(init_process_done
)
730 int gui
; /* is it a GUI process?
*/
731 mod_handle_t module
; /* main module base address
*/
732 client_ptr_t ldt_copy
; /* address of LDT
copy (in thread address space
) */
733 client_ptr_t entry
; /* process entry point
*/
737 /* Initialize a thread
; called from the child after
fork()/clone() */
739 int unix_pid
; /* Unix pid of new thread
*/
740 int unix_tid
; /* Unix tid of new thread
*/
741 int debug_level
; /* new debug level
*/
742 client_ptr_t teb
; /* TEB of new
thread (in thread address space
) */
743 client_ptr_t entry
; /* entry point or PEB if initial
thread (in thread address space
) */
744 int reply_fd
; /* fd for reply pipe
*/
745 int wait_fd
; /* fd for blocking calls pipe
*/
746 cpu_type_t cpu
; /* CPU that this thread is running on
*/
748 process_id_t pid
; /* process id of the new thread
's process */
749 thread_id_t tid; /* thread id of the new thread */
750 timeout_t server_start; /* server start time */
751 data_size_t info_size; /* total size of startup info */
752 int version; /* protocol version */
753 unsigned int all_cpus; /* bitset of supported CPUs */
757 /* Terminate a process */
758 @REQ(terminate_process)
759 obj_handle_t handle; /* process handle to terminate */
760 int exit_code; /* process exit code */
762 int self; /* suicide? */
766 /* Terminate a thread */
767 @REQ(terminate_thread)
768 obj_handle_t handle; /* thread handle to terminate */
769 int exit_code; /* thread exit code */
771 int self; /* suicide? */
772 int last; /* last thread in this process? */
776 /* Retrieve information about a process */
777 @REQ(get_process_info)
778 obj_handle_t handle; /* process handle */
780 process_id_t pid; /* server process id */
781 process_id_t ppid; /* server process id of parent */
782 affinity_t affinity; /* process affinity mask */
783 client_ptr_t peb; /* PEB address in process address space */
784 timeout_t start_time; /* process start time */
785 timeout_t end_time; /* process end time */
786 int exit_code; /* process exit code */
787 int priority; /* priority class */
788 cpu_type_t cpu; /* CPU that this process is running on */
789 int debugger_present; /* process is being debugged */
793 /* Set a process information */
794 @REQ(set_process_info)
795 obj_handle_t handle; /* process handle */
796 int mask; /* setting mask (see below) */
797 int priority; /* priority class */
798 affinity_t affinity; /* affinity mask */
800 #define SET_PROCESS_INFO_PRIORITY 0x01
801 #define SET_PROCESS_INFO_AFFINITY 0x02
804 /* Retrieve information about a thread */
805 @REQ(get_thread_info)
806 obj_handle_t handle; /* thread handle */
807 thread_id_t tid_in; /* thread id (optional) */
809 process_id_t pid; /* server process id */
810 thread_id_t tid; /* server thread id */
811 client_ptr_t teb; /* thread teb pointer */
812 affinity_t affinity; /* thread affinity mask */
813 timeout_t creation_time; /* thread creation time */
814 timeout_t exit_time; /* thread exit time */
815 int exit_code; /* thread exit code */
816 int priority; /* thread priority level */
817 int last; /* last thread in process */
821 /* Set a thread information */
822 @REQ(set_thread_info)
823 obj_handle_t handle; /* thread handle */
824 int mask; /* setting mask (see below) */
825 int priority; /* priority class */
826 affinity_t affinity; /* affinity mask */
827 obj_handle_t token; /* impersonation token */
829 #define SET_THREAD_INFO_PRIORITY 0x01
830 #define SET_THREAD_INFO_AFFINITY 0x02
831 #define SET_THREAD_INFO_TOKEN 0x04
834 /* Retrieve information about a module */
836 obj_handle_t handle; /* process handle */
837 mod_handle_t base_address; /* base address of module */
839 client_ptr_t entry_point;
840 data_size_t size; /* module size */
841 data_size_t filename_len; /* buffer len in bytes required to store filename */
842 VARARG(filename,unicode_str); /* file name of module */
846 /* Suspend a thread */
848 obj_handle_t handle; /* thread handle */
850 int count; /* new suspend count */
854 /* Resume a thread */
856 obj_handle_t handle; /* thread handle */
858 int count; /* new suspend count */
862 /* Notify the server that a dll has been loaded */
864 obj_handle_t mapping; /* file mapping handle */
865 mod_handle_t base; /* base address */
866 client_ptr_t name; /* ptr to ptr to name (in process addr space) */
867 data_size_t size; /* dll size */
868 int dbg_offset; /* debug info offset */
869 int dbg_size; /* debug info size */
870 VARARG(filename,unicode_str); /* file name of dll */
874 /* Notify the server that a dll is being unloaded */
876 mod_handle_t base; /* base address */
880 /* Queue an APC for a thread or process */
882 obj_handle_t handle; /* thread or process handle */
883 apc_call_t call; /* call arguments */
885 obj_handle_t handle; /* APC handle */
886 int self; /* run APC in caller itself? */
890 /* Get the result of an APC call */
892 obj_handle_t handle; /* handle to the APC */
894 apc_result_t result; /* result of the APC */
898 /* Close a handle for the current process */
900 obj_handle_t handle; /* handle to close */
904 /* Set a handle information */
905 @REQ(set_handle_info)
906 obj_handle_t handle; /* handle we are interested in */
907 int flags; /* new handle flags */
908 int mask; /* mask for flags to set */
910 int old_flags; /* old flag value */
914 /* Duplicate a handle */
916 obj_handle_t src_process; /* src process handle */
917 obj_handle_t src_handle; /* src handle to duplicate */
918 obj_handle_t dst_process; /* dst process handle */
919 unsigned int access; /* wanted access rights */
920 unsigned int attributes; /* object attributes */
921 unsigned int options; /* duplicate options (see below) */
923 obj_handle_t handle; /* duplicated handle in dst process */
924 int self; /* is the source the current process? */
925 int closed; /* whether the source handle has been closed */
927 #define DUP_HANDLE_CLOSE_SOURCE DUPLICATE_CLOSE_SOURCE
928 #define DUP_HANDLE_SAME_ACCESS DUPLICATE_SAME_ACCESS
929 #define DUP_HANDLE_MAKE_GLOBAL 0x80000000 /* Not a Windows flag */
932 /* Open a handle to a process */
934 process_id_t pid; /* process id to open */
935 unsigned int access; /* wanted access rights */
936 unsigned int attributes; /* object attributes */
938 obj_handle_t handle; /* handle to the process */
942 /* Open a handle to a thread */
944 thread_id_t tid; /* thread id to open */
945 unsigned int access; /* wanted access rights */
946 unsigned int attributes; /* object attributes */
948 obj_handle_t handle; /* handle to the thread */
952 /* Wait for handles */
954 int flags; /* wait flags (see below) */
955 client_ptr_t cookie; /* magic cookie to return to client */
956 timeout_t timeout; /* timeout */
957 obj_handle_t prev_apc; /* handle to previous APC */
958 VARARG(result,apc_result); /* result of previous APC */
959 VARARG(data,select_op); /* operation-specific data */
961 timeout_t timeout; /* timeout converted to absolute */
962 apc_call_t call; /* APC call arguments */
963 obj_handle_t apc_handle; /* handle to next APC */
965 #define SELECT_ALERTABLE 1
966 #define SELECT_INTERRUPTIBLE 2
969 /* Create an event */
971 unsigned int access; /* wanted access rights */
972 unsigned int attributes; /* object attributes */
973 int manual_reset; /* manual reset event */
974 int initial_state; /* initial state of the event */
975 VARARG(objattr,object_attributes); /* object attributes */
977 obj_handle_t handle; /* handle to the event */
980 /* Event operation */
982 obj_handle_t handle; /* handle to event */
983 int op; /* event operation (see below) */
985 enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT };
988 obj_handle_t handle; /* handle to event */
990 int manual_reset; /* manual reset event */
991 int state; /* current state of the event */
996 unsigned int access; /* wanted access rights */
997 unsigned int attributes; /* object attributes */
998 obj_handle_t rootdir; /* root directory */
999 VARARG(name,unicode_str); /* object name */
1001 obj_handle_t handle; /* handle to the event */
1005 /* Create a keyed event */
1006 @REQ(create_keyed_event)
1007 unsigned int access; /* wanted access rights */
1008 unsigned int attributes; /* object attributes */
1009 VARARG(objattr,object_attributes); /* object attributes */
1011 obj_handle_t handle; /* handle to the event */
1014 /* Open a keyed event */
1015 @REQ(open_keyed_event)
1016 unsigned int access; /* wanted access rights */
1017 unsigned int attributes; /* object attributes */
1018 obj_handle_t rootdir; /* root directory */
1019 VARARG(name,unicode_str); /* object name */
1021 obj_handle_t handle; /* handle to the event */
1025 /* Create a mutex */
1027 unsigned int access; /* wanted access rights */
1028 unsigned int attributes; /* object attributes */
1029 int owned; /* initially owned? */
1030 VARARG(objattr,object_attributes); /* object attributes */
1032 obj_handle_t handle; /* handle to the mutex */
1036 /* Release a mutex */
1038 obj_handle_t handle; /* handle to the mutex */
1040 unsigned int prev_count; /* value of internal counter, before release */
1046 unsigned int access; /* wanted access rights */
1047 unsigned int attributes; /* object attributes */
1048 obj_handle_t rootdir; /* root directory */
1049 VARARG(name,unicode_str); /* object name */
1051 obj_handle_t handle; /* handle to the mutex */
1055 /* Create a semaphore */
1056 @REQ(create_semaphore)
1057 unsigned int access; /* wanted access rights */
1058 unsigned int attributes; /* object attributes */
1059 unsigned int initial; /* initial count */
1060 unsigned int max; /* maximum count */
1061 VARARG(objattr,object_attributes); /* object attributes */
1063 obj_handle_t handle; /* handle to the semaphore */
1067 /* Release a semaphore */
1068 @REQ(release_semaphore)
1069 obj_handle_t handle; /* handle to the semaphore */
1070 unsigned int count; /* count to add to semaphore */
1072 unsigned int prev_count; /* previous semaphore count */
1075 @REQ(query_semaphore)
1076 obj_handle_t handle; /* handle to the semaphore */
1078 unsigned int current; /* current count */
1079 unsigned int max; /* maximum count */
1082 /* Open a semaphore */
1083 @REQ(open_semaphore)
1084 unsigned int access; /* wanted access rights */
1085 unsigned int attributes; /* object attributes */
1086 obj_handle_t rootdir; /* root directory */
1087 VARARG(name,unicode_str); /* object name */
1089 obj_handle_t handle; /* handle to the semaphore */
1095 unsigned int access; /* wanted access rights */
1096 unsigned int attributes; /* object attributes */
1097 unsigned int sharing; /* sharing flags */
1098 int create; /* file create action */
1099 unsigned int options; /* file options */
1100 unsigned int attrs; /* file attributes for creation */
1101 VARARG(objattr,object_attributes); /* object attributes */
1102 VARARG(filename,string); /* file name */
1104 obj_handle_t handle; /* handle to the file */
1108 /* Open a file object */
1109 @REQ(open_file_object)
1110 unsigned int access; /* wanted access rights */
1111 unsigned int attributes; /* open attributes */
1112 obj_handle_t rootdir; /* root directory */
1113 unsigned int sharing; /* sharing flags */
1114 unsigned int options; /* file options */
1115 VARARG(filename,unicode_str); /* file name */
1117 obj_handle_t handle; /* handle to the file */
1121 /* Allocate a file handle for a Unix fd */
1122 @REQ(alloc_file_handle)
1123 unsigned int access; /* wanted access rights */
1124 unsigned int attributes; /* object attributes */
1125 int fd; /* file descriptor on the client side */
1127 obj_handle_t handle; /* handle to the file */
1131 /* Get the Unix name from a file handle */
1132 @REQ(get_handle_unix_name)
1133 obj_handle_t handle; /* file handle */
1135 data_size_t name_len; /* unix name length */
1136 VARARG(name,string); /* unix name */
1140 /* Get a Unix fd to access a file */
1142 obj_handle_t handle; /* handle to the file */
1144 int type; /* file type (see below) */
1145 int cacheable; /* can fd be cached in the client? */
1146 unsigned int access; /* file access rights */
1147 unsigned int options; /* file open options */
1151 FD_TYPE_INVALID, /* invalid file (no associated fd) */
1152 FD_TYPE_FILE, /* regular file */
1153 FD_TYPE_DIR, /* directory */
1154 FD_TYPE_SOCKET, /* socket */
1155 FD_TYPE_SERIAL, /* serial port */
1156 FD_TYPE_PIPE, /* named pipe */
1157 FD_TYPE_MAILSLOT, /* mailslot */
1158 FD_TYPE_CHAR, /* unspecified char device */
1159 FD_TYPE_DEVICE, /* Windows device file */
1164 /* Flush a file buffers */
1166 obj_handle_t handle; /* handle to the file */
1168 obj_handle_t event; /* event set when finished */
1172 /* Lock a region of a file */
1174 obj_handle_t handle; /* handle to the file */
1175 file_pos_t offset; /* offset of start of lock */
1176 file_pos_t count; /* count of bytes to lock */
1177 int shared; /* shared or exclusive lock? */
1178 int wait; /* do we want to wait? */
1180 obj_handle_t handle; /* handle to wait on */
1181 int overlapped; /* is it an overlapped I/O handle? */
1185 /* Unlock a region of a file */
1187 obj_handle_t handle; /* handle to the file */
1188 file_pos_t offset; /* offset of start of unlock */
1189 file_pos_t count; /* count of bytes to unlock */
1193 /* Create a socket */
1195 unsigned int access; /* wanted access rights */
1196 unsigned int attributes; /* object attributes */
1197 int family; /* family, see socket manpage */
1198 int type; /* type, see socket manpage */
1199 int protocol; /* protocol, see socket manpage */
1200 unsigned int flags; /* socket flags */
1202 obj_handle_t handle; /* handle to the new socket */
1206 /* Accept a socket */
1208 obj_handle_t lhandle; /* handle to the listening socket */
1209 unsigned int access; /* wanted access rights */
1210 unsigned int attributes; /* object attributes */
1212 obj_handle_t handle; /* handle to the new socket */
1216 /* Accept into an initialized socket */
1217 @REQ(accept_into_socket)
1218 obj_handle_t lhandle; /* handle to the listening socket */
1219 obj_handle_t ahandle; /* handle to the accepting socket */
1223 /* Set socket event parameters */
1224 @REQ(set_socket_event)
1225 obj_handle_t handle; /* handle to the socket */
1226 unsigned int mask; /* event mask */
1227 obj_handle_t event; /* event object */
1228 user_handle_t window; /* window to send the message to */
1229 unsigned int msg; /* message to send */
1233 /* Get socket event parameters */
1234 @REQ(get_socket_event)
1235 obj_handle_t handle; /* handle to the socket */
1236 int service; /* clear pending? */
1237 obj_handle_t c_event; /* event to clear */
1239 unsigned int mask; /* event mask */
1240 unsigned int pmask; /* pending events */
1241 unsigned int state; /* status bits */
1242 VARARG(errors,ints); /* event errors */
1246 /* Get socket info */
1247 @REQ(get_socket_info)
1248 obj_handle_t handle; /* handle to the socket */
1250 int family; /* family, see socket manpage */
1251 int type; /* type, see socket manpage */
1252 int protocol; /* protocol, see socket manpage */
1256 /* Re-enable pending socket events */
1257 @REQ(enable_socket_event)
1258 obj_handle_t handle; /* handle to the socket */
1259 unsigned int mask; /* events to re-enable */
1260 unsigned int sstate; /* status bits to set */
1261 unsigned int cstate; /* status bits to clear */
1264 @REQ(set_socket_deferred)
1265 obj_handle_t handle; /* handle to the socket */
1266 obj_handle_t deferred; /* handle to the socket for which accept() is deferred */
1269 /* Allocate a console (only used by a console renderer) */
1271 unsigned int access; /* wanted access rights */
1272 unsigned int attributes; /* object attributes */
1273 process_id_t pid; /* pid of process which shall be attached to the console */
1274 int input_fd; /* if pid=-1 (bare console to current process), fd for input */
1276 obj_handle_t handle_in; /* handle to console input */
1277 obj_handle_t event; /* handle to renderer events change notification */
1281 /* Free the console of the current process */
1286 #define CONSOLE_RENDERER_NONE_EVENT 0x00
1287 #define CONSOLE_RENDERER_TITLE_EVENT 0x01
1288 #define CONSOLE_RENDERER_ACTIVE_SB_EVENT 0x02
1289 #define CONSOLE_RENDERER_SB_RESIZE_EVENT 0x03
1290 #define CONSOLE_RENDERER_UPDATE_EVENT 0x04
1291 #define CONSOLE_RENDERER_CURSOR_POS_EVENT 0x05
1292 #define CONSOLE_RENDERER_CURSOR_GEOM_EVENT 0x06
1293 #define CONSOLE_RENDERER_DISPLAY_EVENT 0x07
1294 #define CONSOLE_RENDERER_EXIT_EVENT 0x08
1295 struct console_renderer_event
1330 /* retrieve console events for the renderer */
1331 @REQ(get_console_renderer_events)
1332 obj_handle_t handle; /* handle to console input events */
1334 VARARG(data,bytes); /* the various console_renderer_events */
1338 /* Open a handle to the process console */
1340 obj_handle_t from; /* 0 (resp 1) input (resp output) of current process console */
1341 /* otherwise console_in handle to get active screen buffer? */
1342 unsigned int access; /* wanted access rights */
1343 unsigned int attributes; /* object attributes */
1344 int share; /* share mask (only for output handles) */
1346 obj_handle_t handle; /* handle to the console */
1350 /* Get the input queue wait event */
1351 @REQ(get_console_wait_event)
1353 obj_handle_t handle;
1356 /* Get a console mode (input or output) */
1357 @REQ(get_console_mode)
1358 obj_handle_t handle; /* handle to the console */
1360 int mode; /* console mode */
1364 /* Set a console mode (input or output) */
1365 @REQ(set_console_mode)
1366 obj_handle_t handle; /* handle to the console */
1367 int mode; /* console mode */
1371 /* Set info about a console (input only) */
1372 @REQ(set_console_input_info)
1373 obj_handle_t handle; /* handle to console input, or 0 for process' console
*/
1374 int mask
; /* setting
mask (see below
) */
1375 obj_handle_t active_sb
; /* active screen buffer
*/
1376 int history_mode
; /* whether we duplicate lines in history
*/
1377 int history_size
; /* number of lines in history
*/
1378 int edition_mode
; /* index to the edition mode flavors
*/
1379 int input_cp
; /* console input codepage
*/
1380 int output_cp
; /* console output codepage
*/
1381 user_handle_t win
; /* console window if backend supports it
*/
1382 VARARG(title
,unicode_str
); /* console title
*/
1384 #define SET_CONSOLE_INPUT_INFO_ACTIVE_SB
0x01
1385 #define SET_CONSOLE_INPUT_INFO_TITLE
0x02
1386 #define SET_CONSOLE_INPUT_INFO_HISTORY_MODE
0x04
1387 #define SET_CONSOLE_INPUT_INFO_HISTORY_SIZE
0x08
1388 #define SET_CONSOLE_INPUT_INFO_EDITION_MODE
0x10
1389 #define SET_CONSOLE_INPUT_INFO_INPUT_CODEPAGE
0x20
1390 #define SET_CONSOLE_INPUT_INFO_OUTPUT_CODEPAGE
0x40
1391 #define SET_CONSOLE_INPUT_INFO_WIN
0x80
1394 /* Get info about a
console (input only
) */
1395 @
REQ(get_console_input_info
)
1396 obj_handle_t handle
; /* handle to console input
, or
0 for process
' console */
1398 int history_mode; /* whether we duplicate lines in history */
1399 int history_size; /* number of lines in history */
1400 int history_index; /* number of used lines in history */
1401 int edition_mode; /* index to the edition mode flavors */
1402 int input_cp; /* console input codepage */
1403 int output_cp; /* console output codepage */
1404 user_handle_t win; /* console window if backend supports it */
1405 VARARG(title,unicode_str); /* console title */
1409 /* appends a string to console's history
*/
1410 @
REQ(append_console_input_history
)
1411 obj_handle_t handle
; /* handle to console input
, or
0 for process
' console */
1412 VARARG(line,unicode_str); /* line to add */
1416 /* appends a string to console's history
*/
1417 @
REQ(get_console_input_history
)
1418 obj_handle_t handle
; /* handle to console input
, or
0 for process
' console */
1419 int index; /* index to get line from */
1421 int total; /* total length of line in Unicode chars */
1422 VARARG(line,unicode_str); /* line to add */
1426 /* creates a new screen buffer on process' console
*/
1427 @
REQ(create_console_output
)
1428 obj_handle_t handle_in
; /* handle to console input
, or
0 for process
' console */
1429 unsigned int access; /* wanted access rights */
1430 unsigned int attributes; /* object attributes */
1431 unsigned int share; /* sharing credentials */
1432 int fd; /* for bare consoles, fd the screen-buffer is attached to */
1434 obj_handle_t handle_out; /* handle to the screen buffer */
1438 /* Set info about a console (output only) */
1439 @REQ(set_console_output_info)
1440 obj_handle_t handle; /* handle to the console */
1441 int mask; /* setting mask (see below) */
1442 short int cursor_size; /* size of cursor (percentage filled) */
1443 short int cursor_visible;/* cursor visibility flag */
1444 short int cursor_x; /* position of cursor (x, y) */
1446 short int width; /* width of the screen buffer */
1447 short int height; /* height of the screen buffer */
1448 short int attr; /* default attribute */
1449 short int win_left; /* window actually displayed by renderer */
1450 short int win_top; /* the rect area is expressed within the */
1451 short int win_right; /* boundaries of the screen buffer */
1452 short int win_bottom;
1453 short int max_width; /* maximum size (width x height) for the window */
1454 short int max_height;
1456 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_GEOM 0x01
1457 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_POS 0x02
1458 #define SET_CONSOLE_OUTPUT_INFO_SIZE 0x04
1459 #define SET_CONSOLE_OUTPUT_INFO_ATTR 0x08
1460 #define SET_CONSOLE_OUTPUT_INFO_DISPLAY_WINDOW 0x10
1461 #define SET_CONSOLE_OUTPUT_INFO_MAX_SIZE 0x20
1464 /* Get info about a console (output only) */
1465 @REQ(get_console_output_info)
1466 obj_handle_t handle; /* handle to the console */
1468 short int cursor_size; /* size of cursor (percentage filled) */
1469 short int cursor_visible;/* cursor visibility flag */
1470 short int cursor_x; /* position of cursor (x, y) */
1472 short int width; /* width of the screen buffer */
1473 short int height; /* height of the screen buffer */
1474 short int attr; /* default attribute */
1475 short int win_left; /* window actually displayed by renderer */
1476 short int win_top; /* the rect area is expressed within the */
1477 short int win_right; /* boundaries of the screen buffer */
1478 short int win_bottom;
1479 short int max_width; /* maximum size (width x height) for the window */
1480 short int max_height;
1483 /* Add input records to a console input queue */
1484 @REQ(write_console_input)
1485 obj_handle_t handle; /* handle to the console input */
1486 VARARG(rec,input_records); /* input records */
1488 int written; /* number of records written */
1492 /* Fetch input records from a console input queue */
1493 @REQ(read_console_input)
1494 obj_handle_t handle; /* handle to the console input */
1495 int flush; /* flush the retrieved records from the queue? */
1497 int read; /* number of records read */
1498 VARARG(rec,input_records); /* input records */
1502 /* write data (chars and/or attributes) in a screen buffer */
1503 @REQ(write_console_output)
1504 obj_handle_t handle; /* handle to the console output */
1505 int x; /* position where to start writing */
1507 int mode; /* char info (see below) */
1508 int wrap; /* wrap around at end of line? */
1509 VARARG(data,bytes); /* info to write */
1511 int written; /* number of char infos actually written */
1512 int width; /* width of screen buffer */
1513 int height; /* height of screen buffer */
1517 CHAR_INFO_MODE_TEXT, /* characters only */
1518 CHAR_INFO_MODE_ATTR, /* attributes only */
1519 CHAR_INFO_MODE_TEXTATTR, /* both characters and attributes */
1520 CHAR_INFO_MODE_TEXTSTDATTR /* characters but use standard attributes */
1524 /* fill a screen buffer with constant data (chars and/or attributes) */
1525 @REQ(fill_console_output)
1526 obj_handle_t handle; /* handle to the console output */
1527 int x; /* position where to start writing */
1529 int mode; /* char info mode */
1530 int count; /* number to write */
1531 int wrap; /* wrap around at end of line? */
1532 char_info_t data; /* data to write */
1534 int written; /* number of char infos actually written */
1538 /* read data (chars and/or attributes) from a screen buffer */
1539 @REQ(read_console_output)
1540 obj_handle_t handle; /* handle to the console output */
1541 int x; /* position (x,y) where to start reading */
1543 int mode; /* char info mode */
1544 int wrap; /* wrap around at end of line? */
1546 int width; /* width of screen buffer */
1547 int height; /* height of screen buffer */
1552 /* move a rect (of data) in screen buffer content */
1553 @REQ(move_console_output)
1554 obj_handle_t handle; /* handle to the console output */
1555 short int x_src; /* position (x, y) of rect to start moving from */
1557 short int x_dst; /* position (x, y) of rect to move to */
1559 short int w; /* size of the rect (width, height) to move */
1564 /* Sends a signal to a process group */
1565 @REQ(send_console_signal)
1566 int signal; /* the signal to send */
1567 process_id_t group_id; /* the group to send the signal to */
1571 /* enable directory change notifications */
1572 @REQ(read_directory_changes)
1573 unsigned int filter; /* notification filter */
1574 int subtree; /* watch the subtree? */
1575 int want_data; /* flag indicating whether change data should be collected */
1576 async_data_t async; /* async I/O parameters */
1581 obj_handle_t handle;
1583 VARARG(events,filesystem_event); /* collected filesystem events */
1587 /* Create a file mapping */
1588 @REQ(create_mapping)
1589 unsigned int access; /* wanted access rights */
1590 unsigned int attributes; /* object attributes */
1591 unsigned int protect; /* protection flags (see below) */
1592 mem_size_t size; /* mapping size */
1593 obj_handle_t file_handle; /* file handle */
1594 VARARG(objattr,object_attributes); /* object attributes */
1596 obj_handle_t handle; /* handle to the mapping */
1598 /* per-page protection flags */
1599 #define VPROT_READ 0x01
1600 #define VPROT_WRITE 0x02
1601 #define VPROT_EXEC 0x04
1602 #define VPROT_WRITECOPY 0x08
1603 #define VPROT_GUARD 0x10
1604 #define VPROT_NOCACHE 0x20
1605 #define VPROT_COMMITTED 0x40
1606 #define VPROT_WRITEWATCH 0x80
1607 /* per-mapping protection flags */
1608 #define VPROT_IMAGE 0x0100 /* mapping for an exe image */
1609 #define VPROT_SYSTEM 0x0200 /* system view (underlying mmap not under our control) */
1610 #define VPROT_VALLOC 0x0400 /* allocated by VirtualAlloc */
1611 #define VPROT_NOEXEC 0x0800 /* don't force exec permission
*/
1614 /* Open a mapping
*/
1616 unsigned int access
; /* wanted access rights
*/
1617 unsigned int attributes
; /* object attributes
*/
1618 obj_handle_t rootdir
; /* root directory
*/
1619 VARARG(name
,unicode_str
); /* object name
*/
1621 obj_handle_t handle
; /* handle to the mapping
*/
1625 /* Get information about a file mapping
*/
1626 @
REQ(get_mapping_info
)
1627 obj_handle_t handle
; /* handle to the mapping
*/
1628 unsigned int access
; /* wanted access rights
*/
1630 mem_size_t size
; /* mapping size
*/
1631 int protect
; /* protection flags
*/
1632 int header_size
; /* header
size (for VPROT_IMAGE mapping
) */
1633 client_ptr_t base
; /* default base
addr (for VPROT_IMAGE mapping
) */
1634 obj_handle_t mapping
; /* duplicate mapping handle unless removable
*/
1635 obj_handle_t shared_file
; /* shared mapping file handle
*/
1639 /* Get a range of committed pages in a file mapping
*/
1640 @
REQ(get_mapping_committed_range
)
1641 obj_handle_t handle
; /* handle to the mapping
*/
1642 file_pos_t offset
; /* starting
offset (page
-aligned
, in bytes
) */
1644 mem_size_t size
; /* size of range starting at
offset (page
-aligned
, in bytes
) */
1645 int committed
; /* whether it is a committed range
*/
1649 /* Add a range to the committed pages in a file mapping
*/
1650 @
REQ(add_mapping_committed_range
)
1651 obj_handle_t handle
; /* handle to the mapping
*/
1652 file_pos_t offset
; /* starting
offset (page
-aligned
, in bytes
) */
1653 mem_size_t size
; /* size to
set (page
-aligned
, in bytes
) or
0 if only retrieving
*/
1657 #define SNAP_PROCESS
0x00000001
1658 #define SNAP_THREAD
0x00000002
1659 /* Create a snapshot
*/
1660 @
REQ(create_snapshot
)
1661 unsigned int attributes
; /* object attributes
*/
1662 unsigned int flags
; /* snapshot
flags (SNAP_*)
*/
1664 obj_handle_t handle
; /* handle to the snapshot
*/
1668 /* Get the next process from a snapshot
*/
1670 obj_handle_t handle
; /* handle to the snapshot
*/
1671 int reset
; /* reset snapshot position?
*/
1673 int count
; /* process usage count
*/
1674 process_id_t pid
; /* process id
*/
1675 process_id_t ppid
; /* parent process id
*/
1676 int threads
; /* number of threads
*/
1677 int priority
; /* process priority
*/
1678 int handles
; /* number of handles
*/
1679 int unix_pid
; /* Unix pid
*/
1680 VARARG(filename
,unicode_str
); /* file name of main exe
*/
1684 /* Get the next thread from a snapshot
*/
1686 obj_handle_t handle
; /* handle to the snapshot
*/
1687 int reset
; /* reset snapshot position?
*/
1689 int count
; /* thread usage count
*/
1690 process_id_t pid
; /* process id
*/
1691 thread_id_t tid
; /* thread id
*/
1692 int base_pri
; /* base priority
*/
1693 int delta_pri
; /* delta priority
*/
1697 /* Wait for a debug event
*/
1698 @
REQ(wait_debug_event
)
1699 int get_handle
; /* should we alloc a handle for waiting?
*/
1701 process_id_t pid
; /* process id
*/
1702 thread_id_t tid
; /* thread id
*/
1703 obj_handle_t wait
; /* wait handle if no event ready
*/
1704 VARARG(event
,debug_event
); /* debug event data
*/
1708 /* Queue an exception event
*/
1709 @
REQ(queue_exception_event
)
1710 int first
; /* first chance exception?
*/
1711 unsigned int code
; /* exception code
*/
1712 unsigned int flags
; /* exception flags
*/
1713 client_ptr_t record
; /* exception record
*/
1714 client_ptr_t address
; /* exception address
*/
1715 data_size_t len
; /* size of parameters
*/
1716 VARARG(params
,uints64
,len
);/* exception parameters
*/
1717 VARARG(context
,context
); /* thread context
*/
1719 obj_handle_t handle
; /* handle to the queued event
*/
1723 /* Retrieve the status of an exception event
*/
1724 @
REQ(get_exception_status
)
1725 obj_handle_t handle
; /* handle to the queued event
*/
1727 VARARG(context
,context
); /* modified thread context
*/
1731 /* Send an output string to the debugger
*/
1732 @
REQ(output_debug_string
)
1733 data_size_t length
; /* string length
*/
1734 client_ptr_t string
; /* string to
display (in debugged process address space
) */
1738 /* Continue a debug event
*/
1739 @
REQ(continue_debug_event
)
1740 process_id_t pid
; /* process id to continue
*/
1741 thread_id_t tid
; /* thread id to continue
*/
1742 int status
; /* continuation status
*/
1746 /* Start
/stop debugging an existing process
*/
1748 process_id_t pid
; /* id of the process to debug
*/
1749 int attach
; /* 1=attaching
/ 0=detaching from the process
*/
1753 /* Simulate a breakpoint in a process
*/
1755 obj_handle_t handle
; /* process handle
*/
1757 int self
; /* was it the caller itself?
*/
1761 /* Set debugger kill on exit flag
*/
1762 @
REQ(set_debugger_kill_on_exit
)
1763 int kill_on_exit
; /* 0=detach
/1=kill debuggee when debugger dies
*/
1767 /* Read data from a process address space
*/
1768 @
REQ(read_process_memory
)
1769 obj_handle_t handle
; /* process handle
*/
1770 client_ptr_t addr
; /* addr to read from
*/
1772 VARARG(data
,bytes
); /* result data
*/
1776 /* Write data to a process address space
*/
1777 @
REQ(write_process_memory
)
1778 obj_handle_t handle
; /* process handle
*/
1779 client_ptr_t addr
; /* addr to write to
*/
1780 VARARG(data
,bytes
); /* data to write
*/
1784 /* Create a registry key
*/
1786 obj_handle_t parent
; /* handle to the parent key
*/
1787 unsigned int access
; /* desired access rights
*/
1788 unsigned int attributes
; /* object attributes
*/
1789 unsigned int options
; /* creation options
*/
1790 data_size_t namelen
; /* length of key name in bytes
*/
1791 VARARG(name
,unicode_str
,namelen
); /* key name
*/
1792 VARARG(class
,unicode_str
); /* class name
*/
1794 obj_handle_t hkey
; /* handle to the created key
*/
1795 int created
; /* has it been newly created?
*/
1798 /* Open a registry key
*/
1800 obj_handle_t parent
; /* handle to the parent key
*/
1801 unsigned int access
; /* desired access rights
*/
1802 unsigned int attributes
; /* object attributes
*/
1803 VARARG(name
,unicode_str
); /* key name
*/
1805 obj_handle_t hkey
; /* handle to the open key
*/
1809 /* Delete a registry key
*/
1811 obj_handle_t hkey
; /* handle to the key
*/
1815 /* Flush a registry key
*/
1817 obj_handle_t hkey
; /* handle to the key
*/
1821 /* Enumerate registry subkeys
*/
1823 obj_handle_t hkey
; /* handle to registry key
*/
1824 int index
; /* index of
subkey (or
-1 for current key
) */
1825 int info_class
; /* requested information class
*/
1827 int subkeys
; /* number of subkeys
*/
1828 int max_subkey
; /* longest subkey name
*/
1829 int max_class
; /* longest class name
*/
1830 int values
; /* number of values
*/
1831 int max_value
; /* longest value name
*/
1832 int max_data
; /* longest value data
*/
1833 timeout_t modif
; /* last modification time
*/
1834 data_size_t total
; /* total length needed for full name and class
*/
1835 data_size_t namelen
; /* length of key name in bytes
*/
1836 VARARG(name
,unicode_str
,namelen
); /* key name
*/
1837 VARARG(class
,unicode_str
); /* class name
*/
1841 /* Set a value of a registry key
*/
1843 obj_handle_t hkey
; /* handle to registry key
*/
1844 int type
; /* value type
*/
1845 data_size_t namelen
; /* length of value name in bytes
*/
1846 VARARG(name
,unicode_str
,namelen
); /* value name
*/
1847 VARARG(data
,bytes
); /* value data
*/
1851 /* Retrieve the value of a registry key
*/
1853 obj_handle_t hkey
; /* handle to registry key
*/
1854 VARARG(name
,unicode_str
); /* value name
*/
1856 int type
; /* value type
*/
1857 data_size_t total
; /* total length needed for data
*/
1858 VARARG(data
,bytes
); /* value data
*/
1862 /* Enumerate a value of a registry key
*/
1863 @
REQ(enum_key_value
)
1864 obj_handle_t hkey
; /* handle to registry key
*/
1865 int index
; /* value index
*/
1866 int info_class
; /* requested information class
*/
1868 int type
; /* value type
*/
1869 data_size_t total
; /* total length needed for full name and data
*/
1870 data_size_t namelen
; /* length of value name in bytes
*/
1871 VARARG(name
,unicode_str
,namelen
); /* value name
*/
1872 VARARG(data
,bytes
); /* value data
*/
1876 /* Delete a value of a registry key
*/
1877 @
REQ(delete_key_value
)
1878 obj_handle_t hkey
; /* handle to registry key
*/
1879 VARARG(name
,unicode_str
); /* value name
*/
1883 /* Load a registry branch from a file
*/
1885 obj_handle_t hkey
; /* root key to load to
*/
1886 obj_handle_t file
; /* file to load from
*/
1887 VARARG(name
,unicode_str
); /* subkey name
*/
1891 /* UnLoad a registry branch from a file
*/
1892 @
REQ(unload_registry
)
1893 obj_handle_t hkey
; /* root key to unload to
*/
1897 /* Save a registry branch to a file
*/
1899 obj_handle_t hkey
; /* key to save
*/
1900 obj_handle_t file
; /* file to save to
*/
1904 /* Add a registry key change notification
*/
1905 @
REQ(set_registry_notification
)
1906 obj_handle_t hkey
; /* key to watch for changes
*/
1907 obj_handle_t event
; /* event to set
*/
1908 int subtree
; /* should we watch the whole subtree?
*/
1909 unsigned int filter
; /* things to watch
*/
1913 /* Create a waitable timer
*/
1915 unsigned int access
; /* wanted access rights
*/
1916 unsigned int attributes
; /* object attributes
*/
1917 obj_handle_t rootdir
; /* root directory
*/
1918 int manual
; /* manual reset
*/
1919 VARARG(name
,unicode_str
); /* object name
*/
1921 obj_handle_t handle
; /* handle to the timer
*/
1925 /* Open a waitable timer
*/
1927 unsigned int access
; /* wanted access rights
*/
1928 unsigned int attributes
; /* object attributes
*/
1929 obj_handle_t rootdir
; /* root directory
*/
1930 VARARG(name
,unicode_str
); /* object name
*/
1932 obj_handle_t handle
; /* handle to the timer
*/
1935 /* Set a waitable timer
*/
1937 obj_handle_t handle
; /* handle to the timer
*/
1938 timeout_t expire
; /* next expiration absolute time
*/
1939 client_ptr_t callback
; /* callback function
*/
1940 client_ptr_t arg
; /* callback argument
*/
1941 int period
; /* timer period in ms
*/
1943 int signaled
; /* was the timer signaled before this call ?
*/
1946 /* Cancel a waitable timer
*/
1948 obj_handle_t handle
; /* handle to the timer
*/
1950 int signaled
; /* was the timer signaled before this calltime ?
*/
1953 /* Get information on a waitable timer
*/
1954 @
REQ(get_timer_info
)
1955 obj_handle_t handle
; /* handle to the timer
*/
1957 timeout_t when
; /* absolute time when the timer next expires
*/
1958 int signaled
; /* is the timer signaled?
*/
1962 /* Retrieve the current context of a thread
*/
1963 @
REQ(get_thread_context
)
1964 obj_handle_t handle
; /* thread handle
*/
1965 unsigned int flags
; /* context flags
*/
1966 int suspend
; /* suspend the thread if needed
*/
1968 int self
; /* was it a handle to the current thread?
*/
1969 VARARG(context
,context
); /* thread context
*/
1973 /* Set the current context of a thread
*/
1974 @
REQ(set_thread_context
)
1975 obj_handle_t handle
; /* thread handle
*/
1976 int suspend
; /* suspend the thread if needed
*/
1977 VARARG(context
,context
); /* thread context
*/
1979 int self
; /* was it a handle to the current thread?
*/
1983 /* Fetch a selector entry for a thread
*/
1984 @
REQ(get_selector_entry
)
1985 obj_handle_t handle
; /* thread handle
*/
1986 int entry
; /* LDT entry
*/
1988 unsigned int base
; /* selector base
*/
1989 unsigned int limit
; /* selector limit
*/
1990 unsigned char flags
; /* selector flags
*/
1996 obj_handle_t table
; /* which table to add atom to
*/
1997 VARARG(name
,unicode_str
); /* atom name
*/
1999 atom_t atom
; /* resulting atom
*/
2003 /* Delete an atom
*/
2005 obj_handle_t table
; /* which table to delete atom from
*/
2006 atom_t atom
; /* atom handle
*/
2012 obj_handle_t table
; /* which table to find atom from
*/
2013 VARARG(name
,unicode_str
); /* atom name
*/
2015 atom_t atom
; /* atom handle
*/
2019 /* Get information about an atom
*/
2020 @
REQ(get_atom_information
)
2021 obj_handle_t table
; /* which table to find atom from
*/
2022 atom_t atom
; /* atom handle
*/
2024 int count
; /* atom lock count
*/
2025 int pinned
; /* whether the atom has been pinned
*/
2026 data_size_t total
; /* actual length of atom name
*/
2027 VARARG(name
,unicode_str
); /* atom name
*/
2031 /* Set information about an atom
*/
2032 @
REQ(set_atom_information
)
2033 obj_handle_t table
; /* which table to find atom from
*/
2034 atom_t atom
; /* atom handle
*/
2035 int pinned
; /* whether to bump atom information
*/
2039 /* Empty an atom table
*/
2040 @
REQ(empty_atom_table
)
2041 obj_handle_t table
; /* which table to find atom from
*/
2042 int if_pinned
; /* whether to delete pinned atoms
*/
2046 /* Init an atom table
*/
2047 @
REQ(init_atom_table
)
2048 int entries
; /* number of
entries (only for local
) */
2050 obj_handle_t table
; /* handle to the atom table
*/
2054 /* Get the message queue of the current thread
*/
2057 obj_handle_t handle
; /* handle to the queue
*/
2061 /* Set the file descriptor associated to the current thread queue
*/
2063 obj_handle_t handle
; /* handle to the file descriptor
*/
2067 /* Set the current message queue wakeup mask
*/
2068 @
REQ(set_queue_mask
)
2069 unsigned int wake_mask
; /* wakeup bits mask
*/
2070 unsigned int changed_mask
; /* changed bits mask
*/
2071 int skip_wait
; /* will we skip waiting if signaled?
*/
2073 unsigned int wake_bits
; /* current wake bits
*/
2074 unsigned int changed_bits
; /* current changed bits
*/
2078 /* Get the current message queue status
*/
2079 @
REQ(get_queue_status
)
2080 int clear
; /* should we clear the change bits?
*/
2082 unsigned int wake_bits
; /* wake bits
*/
2083 unsigned int changed_bits
; /* changed bits since last time
*/
2087 /* Retrieve the process idle event
*/
2088 @
REQ(get_process_idle_event
)
2089 obj_handle_t handle
; /* process handle
*/
2091 obj_handle_t event
; /* handle to idle event
*/
2095 /* Send a message to a thread queue
*/
2097 thread_id_t id
; /* thread id
*/
2098 int type
; /* message
type (see below
) */
2099 int flags
; /* message
flags (see below
) */
2100 user_handle_t win
; /* window handle
*/
2101 unsigned int msg
; /* message code
*/
2102 lparam_t wparam
; /* parameters
*/
2103 lparam_t lparam
; /* parameters
*/
2104 timeout_t timeout
; /* timeout for reply
*/
2105 VARARG(data
,message_data
); /* message data for sent messages
*/
2108 @
REQ(post_quit_message
)
2109 int exit_code
; /* exit code to return
*/
2114 MSG_ASCII
, /* Ascii
message (from SendMessageA
) */
2115 MSG_UNICODE
, /* Unicode
message (from SendMessageW
) */
2116 MSG_NOTIFY
, /* notify
message (from SendNotifyMessageW
), always Unicode
*/
2117 MSG_CALLBACK
, /* callback
message (from SendMessageCallbackW
), always Unicode
*/
2118 MSG_CALLBACK_RESULT
,/* result of a callback message
*/
2119 MSG_OTHER_PROCESS
, /* sent from other process
, may include vararg data
, always Unicode
*/
2120 MSG_POSTED
, /* posted
message (from PostMessageW
), always Unicode
*/
2121 MSG_HARDWARE
, /* hardware message
*/
2122 MSG_WINEVENT
, /* winevent message
*/
2123 MSG_HOOK_LL
/* low
-level hardware hook
*/
2125 #define SEND_MSG_ABORT_IF_HUNG
0x01
2128 /* Send a hardware message to a thread queue
*/
2129 @
REQ(send_hardware_message
)
2130 user_handle_t win
; /* window handle
*/
2131 hw_input_t input
; /* input data
*/
2132 unsigned int flags
; /* flags (see below
) */
2134 int wait
; /* do we need to wait for a reply?
*/
2135 int prev_x
; /* previous cursor position
*/
2137 int new_x
; /* new cursor position
*/
2139 VARARG(keystate
,bytes
); /* global state array for all the keys
*/
2141 #define SEND_HWMSG_INJECTED
0x01
2144 /* Get a message from the current queue
*/
2146 unsigned int flags
; /* PM_
* flags
*/
2147 user_handle_t get_win
; /* window handle to get
*/
2148 unsigned int get_first
; /* first message code to get
*/
2149 unsigned int get_last
; /* last message code to get
*/
2150 unsigned int hw_id
; /* id of the previous hardware
message (or
0) */
2151 unsigned int wake_mask
; /* wakeup bits mask
*/
2152 unsigned int changed_mask
; /* changed bits mask
*/
2154 user_handle_t win
; /* window handle
*/
2155 unsigned int msg
; /* message code
*/
2156 lparam_t wparam
; /* parameters
*/
2157 lparam_t lparam
; /* parameters
*/
2158 int type
; /* message type
*/
2159 unsigned int time
; /* message time
*/
2160 unsigned int active_hooks
; /* active hooks bitmap
*/
2161 data_size_t total
; /* total size of extra data
*/
2162 VARARG(data
,message_data
); /* message data for sent messages
*/
2166 /* Reply to a sent message
*/
2168 int remove
; /* should we remove the message?
*/
2169 lparam_t result
; /* message result
*/
2170 VARARG(data
,bytes
); /* message data for sent messages
*/
2174 /* Accept the current hardware message
*/
2175 @
REQ(accept_hardware_message
)
2176 unsigned int hw_id
; /* id of the hardware message
*/
2177 int remove
; /* should we remove the message?
*/
2178 user_handle_t new_win
; /* new destination window for current message
*/
2182 /* Retrieve the reply for the last message sent
*/
2183 @
REQ(get_message_reply
)
2184 int cancel
; /* cancel message if not ready?
*/
2186 lparam_t result
; /* message result
*/
2187 VARARG(data
,bytes
); /* message data for sent messages
*/
2191 /* Set a window timer
*/
2193 user_handle_t win
; /* window handle
*/
2194 unsigned int msg
; /* message to post
*/
2195 unsigned int rate
; /* timer rate in ms
*/
2196 lparam_t id
; /* timer id
*/
2197 lparam_t lparam
; /* message
lparam (callback proc
) */
2199 lparam_t id
; /* timer id
*/
2203 /* Kill a window timer
*/
2204 @
REQ(kill_win_timer
)
2205 user_handle_t win
; /* window handle
*/
2206 lparam_t id
; /* timer id
*/
2207 unsigned int msg
; /* message to post
*/
2211 /* check if the thread owning the window is hung
*/
2212 @
REQ(is_window_hung
)
2213 user_handle_t win
; /* window handle
*/
2219 /* Retrieve info about a serial port
*/
2220 @
REQ(get_serial_info
)
2221 obj_handle_t handle
; /* handle to comm port
*/
2224 unsigned int readinterval
;
2225 unsigned int readconst
;
2226 unsigned int readmult
;
2227 unsigned int writeconst
;
2228 unsigned int writemult
;
2229 unsigned int eventmask
;
2230 unsigned int cookie
;
2231 unsigned int pending_write
;
2235 /* Set info about a serial port
*/
2236 @
REQ(set_serial_info
)
2237 obj_handle_t handle
; /* handle to comm port
*/
2238 int flags
; /* bitmask to set
values (see below
) */
2239 unsigned int readinterval
;
2240 unsigned int readconst
;
2241 unsigned int readmult
;
2242 unsigned int writeconst
;
2243 unsigned int writemult
;
2244 unsigned int eventmask
;
2246 #define SERIALINFO_SET_TIMEOUTS
0x01
2247 #define SERIALINFO_SET_MASK
0x02
2248 #define SERIALINFO_PENDING_WRITE
0x04
2249 #define SERIALINFO_PENDING_WAIT
0x08
2252 /* Create an async I
/O
*/
2253 @
REQ(register_async
)
2254 int type
; /* type of queue to look after
*/
2255 async_data_t async
; /* async I
/O parameters
*/
2256 int count
; /* count
- usually # of bytes to be read
/written
*/
2258 #define ASYNC_TYPE_READ
0x01
2259 #define ASYNC_TYPE_WRITE
0x02
2260 #define ASYNC_TYPE_WAIT
0x03
2263 /* Cancel all async op on a fd
*/
2265 obj_handle_t handle
; /* handle to comm port
, socket or file
*/
2266 client_ptr_t iosb
; /* I
/O status
block (NULL
=all
) */
2267 int only_thread
; /* cancel matching this thread
*/
2271 /* Perform an ioctl on a file
*/
2273 ioctl_code_t code
; /* ioctl code
*/
2274 async_data_t async
; /* async I
/O parameters
*/
2275 int blocking
; /* whether it
's a blocking ioctl */
2276 VARARG(in_data,bytes); /* ioctl input data */
2278 obj_handle_t wait; /* handle to wait on for blocking ioctl */
2279 unsigned int options; /* device open options */
2280 VARARG(out_data,bytes); /* ioctl output data */
2284 /* Retrieve results of an async ioctl */
2285 @REQ(get_ioctl_result)
2286 obj_handle_t handle; /* handle to the device */
2287 client_ptr_t user_arg; /* user arg used to identify the request */
2289 VARARG(out_data,bytes); /* ioctl output data */
2293 /* Create a named pipe */
2294 @REQ(create_named_pipe)
2295 unsigned int access;
2296 unsigned int attributes; /* object attributes */
2297 obj_handle_t rootdir; /* root directory */
2298 unsigned int options;
2299 unsigned int sharing;
2300 unsigned int maxinstances;
2301 unsigned int outsize;
2302 unsigned int insize;
2305 VARARG(name,unicode_str); /* pipe name */
2307 obj_handle_t handle; /* handle to the pipe */
2310 /* flags in create_named_pipe and get_named_pipe_info */
2311 #define NAMED_PIPE_MESSAGE_STREAM_WRITE 0x0001
2312 #define NAMED_PIPE_MESSAGE_STREAM_READ 0x0002
2313 #define NAMED_PIPE_NONBLOCKING_MODE 0x0004
2314 #define NAMED_PIPE_SERVER_END 0x8000
2317 @REQ(get_named_pipe_info)
2318 obj_handle_t handle;
2321 unsigned int sharing;
2322 unsigned int maxinstances;
2323 unsigned int instances;
2324 unsigned int outsize;
2325 unsigned int insize;
2329 /* Create a window */
2331 user_handle_t parent; /* parent window */
2332 user_handle_t owner; /* owner window */
2333 atom_t atom; /* class atom */
2334 mod_handle_t instance; /* module instance */
2335 VARARG(class,unicode_str); /* class name */
2337 user_handle_t handle; /* created window */
2338 user_handle_t parent; /* full handle of parent */
2339 user_handle_t owner; /* full handle of owner */
2340 int extra; /* number of extra bytes */
2341 client_ptr_t class_ptr; /* pointer to class in client address space */
2345 /* Destroy a window */
2346 @REQ(destroy_window)
2347 user_handle_t handle; /* handle to the window */
2351 /* Retrieve the desktop window for the current thread */
2352 @REQ(get_desktop_window)
2353 int force; /* force creation if it doesn't exist
*/
2355 user_handle_t top_window
; /* handle to the desktop window
*/
2356 user_handle_t msg_window
; /* handle to the top
-level HWND_MESSAGE parent
*/
2360 /* Set a window owner
*/
2361 @
REQ(set_window_owner
)
2362 user_handle_t handle
; /* handle to the window
*/
2363 user_handle_t owner
; /* new owner
*/
2365 user_handle_t full_owner
; /* full handle of new owner
*/
2366 user_handle_t prev_owner
; /* full handle of previous owner
*/
2370 /* Get information from a window handle
*/
2371 @
REQ(get_window_info
)
2372 user_handle_t handle
; /* handle to the window
*/
2374 user_handle_t full_handle
; /* full
32-bit handle
*/
2375 user_handle_t last_active
; /* last active popup
*/
2376 process_id_t pid
; /* process owning the window
*/
2377 thread_id_t tid
; /* thread owning the window
*/
2378 atom_t atom
; /* class atom
*/
2379 int is_unicode
; /* ANSI or unicode
*/
2383 /* Set some information in a window
*/
2384 @
REQ(set_window_info
)
2385 unsigned short flags
; /* flags for fields to
set (see below
) */
2386 short int is_unicode
; /* ANSI or unicode
*/
2387 user_handle_t handle
; /* handle to the window
*/
2388 unsigned int style
; /* window style
*/
2389 unsigned int ex_style
; /* window extended style
*/
2390 unsigned int id
; /* window id
*/
2391 mod_handle_t instance
; /* creator instance
*/
2392 lparam_t user_data
; /* user
-specific data
*/
2393 int extra_offset
; /* offset to set in extra bytes
*/
2394 data_size_t extra_size
; /* size to set in extra bytes
*/
2395 lparam_t extra_value
; /* value to set in extra bytes
*/
2397 unsigned int old_style
; /* old window style
*/
2398 unsigned int old_ex_style
; /* old window extended style
*/
2399 mod_handle_t old_instance
; /* old creator instance
*/
2400 lparam_t old_user_data
; /* old user
-specific data
*/
2401 lparam_t old_extra_value
; /* old value in extra bytes
*/
2402 unsigned int old_id
; /* old window id
*/
2404 #define SET_WIN_STYLE
0x01
2405 #define SET_WIN_EXSTYLE
0x02
2406 #define SET_WIN_ID
0x04
2407 #define SET_WIN_INSTANCE
0x08
2408 #define SET_WIN_USERDATA
0x10
2409 #define SET_WIN_EXTRA
0x20
2410 #define SET_WIN_UNICODE
0x40
2413 /* Set the parent of a window
*/
2415 user_handle_t handle
; /* handle to the window
*/
2416 user_handle_t parent
; /* handle to the parent
*/
2418 user_handle_t old_parent
; /* old parent window
*/
2419 user_handle_t full_parent
; /* full handle of new parent
*/
2423 /* Get a list of the window parents
, up to the root of the tree
*/
2424 @
REQ(get_window_parents
)
2425 user_handle_t handle
; /* handle to the window
*/
2427 int count
; /* total count of parents
*/
2428 VARARG(parents
,user_handles
); /* parent handles
*/
2432 /* Get a list of the window children
*/
2433 @
REQ(get_window_children
)
2434 obj_handle_t desktop
; /* handle to desktop
*/
2435 user_handle_t parent
; /* parent window
*/
2436 atom_t atom
; /* class atom for the listed children
*/
2437 thread_id_t tid
; /* thread owning the listed children
*/
2438 VARARG(class
,unicode_str
); /* class name
*/
2440 int count
; /* total count of children
*/
2441 VARARG(children
,user_handles
); /* children handles
*/
2445 /* Get a list of the window children that contain a given point
*/
2446 @
REQ(get_window_children_from_point
)
2447 user_handle_t parent
; /* parent window
*/
2448 int x
; /* point in parent coordinates
*/
2451 int count
; /* total count of children
*/
2452 VARARG(children
,user_handles
); /* children handles
*/
2456 /* Get window tree information from a window handle
*/
2457 @
REQ(get_window_tree
)
2458 user_handle_t handle
; /* handle to the window
*/
2460 user_handle_t parent
; /* parent window
*/
2461 user_handle_t owner
; /* owner window
*/
2462 user_handle_t next_sibling
; /* next sibling in Z
-order
*/
2463 user_handle_t prev_sibling
; /* prev sibling in Z
-order
*/
2464 user_handle_t first_sibling
; /* first sibling in Z
-order
*/
2465 user_handle_t last_sibling
; /* last sibling in Z
-order
*/
2466 user_handle_t first_child
; /* first child
*/
2467 user_handle_t last_child
; /* last child
*/
2470 /* Set the position and Z order of a window
*/
2471 @
REQ(set_window_pos
)
2472 unsigned short swp_flags
; /* SWP_
* flags
*/
2473 unsigned short paint_flags
; /* paint
flags (see below
) */
2474 user_handle_t handle
; /* handle to the window
*/
2475 user_handle_t previous
; /* previous window in Z order
*/
2476 rectangle_t window
; /* window
rectangle (in parent coords
) */
2477 rectangle_t client
; /* client
rectangle (in parent coords
) */
2478 VARARG(valid
,rectangles
); /* valid rectangles from
WM_NCCALCSIZE (in parent coords
) */
2480 unsigned int new_style
; /* new window style
*/
2481 unsigned int new_ex_style
; /* new window extended style
*/
2482 user_handle_t surface_win
; /* window that needs a surface update
*/
2484 #define SET_WINPOS_PAINT_SURFACE
0x01 /* window has a paintable surface
*/
2485 #define SET_WINPOS_PIXEL_FORMAT
0x02 /* window has a custom pixel format
*/
2487 /* Get the window and client rectangles of a window
*/
2488 @
REQ(get_window_rectangles
)
2489 user_handle_t handle
; /* handle to the window
*/
2490 int relative
; /* coords relative
to (see below
) */
2492 rectangle_t window
; /* window rectangle
*/
2493 rectangle_t visible
; /* visible part of the window rectangle
*/
2494 rectangle_t client
; /* client rectangle
*/
2496 enum coords_relative
2498 COORDS_CLIENT
, /* relative to client area
*/
2499 COORDS_WINDOW
, /* relative to whole window area
*/
2500 COORDS_PARENT
, /* relative to parent
's client area */
2501 COORDS_SCREEN /* relative to screen origin */
2505 /* Get the window text */
2506 @REQ(get_window_text)
2507 user_handle_t handle; /* handle to the window */
2509 VARARG(text,unicode_str); /* window text */
2513 /* Set the window text */
2514 @REQ(set_window_text)
2515 user_handle_t handle; /* handle to the window */
2516 VARARG(text,unicode_str); /* window text */
2520 /* Get the coordinates offset between two windows */
2521 @REQ(get_windows_offset)
2522 user_handle_t from; /* handle to the first window */
2523 user_handle_t to; /* handle to the second window */
2525 int x; /* x coordinate offset */
2526 int y; /* y coordinate offset */
2527 int mirror; /* whether to mirror the x coordinate */
2531 /* Get the visible region of a window */
2532 @REQ(get_visible_region)
2533 user_handle_t window; /* handle to the window */
2534 unsigned int flags; /* DCX flags */
2536 user_handle_t top_win; /* top window to clip against */
2537 rectangle_t top_rect; /* top window visible rect with screen coords */
2538 rectangle_t win_rect; /* window rect in screen coords */
2539 unsigned int paint_flags; /* paint flags (from SET_WINPOS_* flags) */
2540 data_size_t total_size; /* total size of the resulting region */
2541 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2545 /* Get the visible surface region of a window */
2546 @REQ(get_surface_region)
2547 user_handle_t window; /* handle to the window */
2549 rectangle_t visible_rect; /* window visible rect in screen coords */
2550 data_size_t total_size; /* total size of the resulting region */
2551 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2555 /* Get the window region */
2556 @REQ(get_window_region)
2557 user_handle_t window; /* handle to the window */
2559 data_size_t total_size; /* total size of the resulting region */
2560 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2564 /* Set the window region */
2565 @REQ(set_window_region)
2566 user_handle_t window; /* handle to the window */
2567 int redraw; /* redraw the window? */
2568 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2572 /* Get the window update region */
2573 @REQ(get_update_region)
2574 user_handle_t window; /* handle to the window */
2575 user_handle_t from_child; /* child to start searching from */
2576 unsigned int flags; /* update flags (see below) */
2578 user_handle_t child; /* child to repaint (or window itself) */
2579 unsigned int flags; /* resulting update flags (see below) */
2580 data_size_t total_size; /* total size of the resulting region */
2581 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2583 #define UPDATE_NONCLIENT 0x01 /* get region for repainting non-client area */
2584 #define UPDATE_ERASE 0x02 /* get region for erasing client area */
2585 #define UPDATE_PAINT 0x04 /* get region for painting client area */
2586 #define UPDATE_INTERNALPAINT 0x08 /* get region if internal paint is pending */
2587 #define UPDATE_ALLCHILDREN 0x10 /* force repaint of all children */
2588 #define UPDATE_NOCHILDREN 0x20 /* don't try to repaint any children
*/
2589 #define UPDATE_NOREGION
0x40 /* don
't return a region, only the flags */
2590 #define UPDATE_DELAYED_ERASE 0x80 /* still needs erase after BeginPaint */
2593 /* Update the z order of a window so that a given rectangle is fully visible */
2594 @REQ(update_window_zorder)
2595 user_handle_t window; /* handle to the window */
2596 rectangle_t rect; /* rectangle that must be visible (in client coords) */
2600 /* Mark parts of a window as needing a redraw */
2602 user_handle_t window; /* handle to the window */
2603 unsigned int flags; /* RDW_* flags */
2604 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2608 /* Set a window property */
2609 @REQ(set_window_property)
2610 user_handle_t window; /* handle to the window */
2611 lparam_t data; /* data to store */
2612 atom_t atom; /* property atom (if no name specified) */
2613 VARARG(name,unicode_str); /* property name */
2617 /* Remove a window property */
2618 @REQ(remove_window_property)
2619 user_handle_t window; /* handle to the window */
2620 atom_t atom; /* property atom (if no name specified) */
2621 VARARG(name,unicode_str); /* property name */
2623 lparam_t data; /* data stored in property */
2627 /* Get a window property */
2628 @REQ(get_window_property)
2629 user_handle_t window; /* handle to the window */
2630 atom_t atom; /* property atom (if no name specified) */
2631 VARARG(name,unicode_str); /* property name */
2633 lparam_t data; /* data stored in property */
2637 /* Get the list of properties of a window */
2638 @REQ(get_window_properties)
2639 user_handle_t window; /* handle to the window */
2641 int total; /* total number of properties */
2642 VARARG(props,properties); /* list of properties */
2646 /* Create a window station */
2647 @REQ(create_winstation)
2648 unsigned int flags; /* window station flags */
2649 unsigned int access; /* wanted access rights */
2650 unsigned int attributes; /* object attributes */
2651 VARARG(name,unicode_str); /* object name */
2653 obj_handle_t handle; /* handle to the window station */
2657 /* Open a handle to a window station */
2658 @REQ(open_winstation)
2659 unsigned int access; /* wanted access rights */
2660 unsigned int attributes; /* object attributes */
2661 VARARG(name,unicode_str); /* object name */
2663 obj_handle_t handle; /* handle to the window station */
2667 /* Close a window station */
2668 @REQ(close_winstation)
2669 obj_handle_t handle; /* handle to the window station */
2673 /* Get the process current window station */
2674 @REQ(get_process_winstation)
2676 obj_handle_t handle; /* handle to the window station */
2680 /* Set the process current window station */
2681 @REQ(set_process_winstation)
2682 obj_handle_t handle; /* handle to the window station */
2686 /* Enumerate window stations */
2687 @REQ(enum_winstation)
2688 unsigned int index; /* current index */
2690 unsigned int next; /* next index */
2691 VARARG(name,unicode_str); /* window station name */
2695 /* Create a desktop */
2696 @REQ(create_desktop)
2697 unsigned int flags; /* desktop flags */
2698 unsigned int access; /* wanted access rights */
2699 unsigned int attributes; /* object attributes */
2700 VARARG(name,unicode_str); /* object name */
2702 obj_handle_t handle; /* handle to the desktop */
2706 /* Open a handle to a desktop */
2708 obj_handle_t winsta; /* window station to open (null allowed) */
2709 unsigned int flags; /* desktop flags */
2710 unsigned int access; /* wanted access rights */
2711 unsigned int attributes; /* object attributes */
2712 VARARG(name,unicode_str); /* object name */
2714 obj_handle_t handle; /* handle to the desktop */
2718 /* Open a handle to current input desktop */
2719 @REQ(open_input_desktop)
2720 unsigned int flags; /* desktop flags */
2721 unsigned int access; /* wanted access rights */
2722 unsigned int attributes; /* object attributes */
2724 obj_handle_t handle; /* handle to the desktop */
2728 /* Close a desktop */
2730 obj_handle_t handle; /* handle to the desktop */
2734 /* Get the thread current desktop */
2735 @REQ(get_thread_desktop)
2736 thread_id_t tid; /* thread id */
2738 obj_handle_t handle; /* handle to the desktop */
2742 /* Set the thread current desktop */
2743 @REQ(set_thread_desktop)
2744 obj_handle_t handle; /* handle to the desktop */
2748 /* Enumerate desktops */
2750 obj_handle_t winstation; /* handle to the window station */
2751 unsigned int index; /* current index */
2753 unsigned int next; /* next index */
2754 VARARG(name,unicode_str); /* window station name */
2758 /* Get/set information about a user object (window station or desktop) */
2759 @REQ(set_user_object_info)
2760 obj_handle_t handle; /* handle to the object */
2761 unsigned int flags; /* information to set */
2762 unsigned int obj_flags; /* new object flags */
2764 int is_desktop; /* is object a desktop? */
2765 unsigned int old_obj_flags; /* old object flags */
2766 VARARG(name,unicode_str); /* object name */
2768 #define SET_USER_OBJECT_FLAGS 1
2771 /* Register a hotkey */
2772 @REQ(register_hotkey)
2773 user_handle_t window; /* handle to the window */
2774 int id; /* hotkey identifier */
2775 unsigned int flags; /* modifier keys */
2776 unsigned int vkey; /* virtual key code */
2778 int replaced; /* did we replace an existing hotkey? */
2779 unsigned int flags; /* flags of replaced hotkey */
2780 unsigned int vkey; /* virtual key code of replaced hotkey */
2784 /* Unregister a hotkey */
2785 @REQ(unregister_hotkey)
2786 user_handle_t window; /* handle to the window */
2787 int id; /* hotkey identifier */
2789 unsigned int flags; /* flags of removed hotkey */
2790 unsigned int vkey; /* virtual key code of removed hotkey */
2794 /* Attach (or detach) thread inputs */
2795 @REQ(attach_thread_input)
2796 thread_id_t tid_from; /* thread to be attached */
2797 thread_id_t tid_to; /* thread to which tid_from should be attached */
2798 int attach; /* is it an attach? */
2802 /* Get input data for a given thread */
2803 @REQ(get_thread_input)
2804 thread_id_t tid; /* id of thread */
2806 user_handle_t focus; /* handle to the focus window */
2807 user_handle_t capture; /* handle to the capture window */
2808 user_handle_t active; /* handle to the active window */
2809 user_handle_t foreground; /* handle to the global foreground window */
2810 user_handle_t menu_owner; /* handle to the menu owner */
2811 user_handle_t move_size; /* handle to the moving/resizing window */
2812 user_handle_t caret; /* handle to the caret window */
2813 user_handle_t cursor; /* handle to the cursor */
2814 int show_count; /* cursor show count */
2815 rectangle_t rect; /* caret rectangle */
2819 /* Get the time of the last input event */
2820 @REQ(get_last_input_time)
2826 /* Retrieve queue keyboard state for a given thread */
2828 thread_id_t tid; /* id of thread */
2829 int key; /* optional key code or -1 */
2831 unsigned char state; /* state of specified key */
2832 VARARG(keystate,bytes); /* state array for all the keys */
2835 /* Set queue keyboard state for a given thread */
2837 thread_id_t tid; /* id of thread */
2838 int async; /* whether to change the async state too */
2839 VARARG(keystate,bytes); /* state array for all the keys */
2842 /* Set the system foreground window */
2843 @REQ(set_foreground_window)
2844 user_handle_t handle; /* handle to the foreground window */
2846 user_handle_t previous; /* handle to the previous foreground window */
2847 int send_msg_old; /* whether we have to send a msg to the old window */
2848 int send_msg_new; /* whether we have to send a msg to the new window */
2851 /* Set the current thread focus window */
2852 @REQ(set_focus_window)
2853 user_handle_t handle; /* handle to the focus window */
2855 user_handle_t previous; /* handle to the previous focus window */
2858 /* Set the current thread active window */
2859 @REQ(set_active_window)
2860 user_handle_t handle; /* handle to the active window */
2862 user_handle_t previous; /* handle to the previous active window */
2865 /* Set the current thread capture window */
2866 @REQ(set_capture_window)
2867 user_handle_t handle; /* handle to the capture window */
2868 unsigned int flags; /* capture flags (see below) */
2870 user_handle_t previous; /* handle to the previous capture window */
2871 user_handle_t full_handle; /* full 32-bit handle of new capture window */
2873 #define CAPTURE_MENU 0x01 /* capture is for a menu */
2874 #define CAPTURE_MOVESIZE 0x02 /* capture is for moving/resizing */
2877 /* Set the current thread caret window */
2878 @REQ(set_caret_window)
2879 user_handle_t handle; /* handle to the caret window */
2880 int width; /* caret width */
2881 int height; /* caret height */
2883 user_handle_t previous; /* handle to the previous caret window */
2884 rectangle_t old_rect; /* previous caret rectangle */
2885 int old_hide; /* previous hide count */
2886 int old_state; /* previous caret state (1=on, 0=off) */
2890 /* Set the current thread caret information */
2891 @REQ(set_caret_info)
2892 unsigned int flags; /* caret flags (see below) */
2893 user_handle_t handle; /* handle to the caret window */
2894 int x; /* caret x position */
2895 int y; /* caret y position */
2896 int hide; /* increment for hide count (can be negative to show it) */
2897 int state; /* caret state (1=on, 0=off, -1=toggle current state) */
2899 user_handle_t full_handle; /* handle to the current caret window */
2900 rectangle_t old_rect; /* previous caret rectangle */
2901 int old_hide; /* previous hide count */
2902 int old_state; /* previous caret state (1=on, 0=off) */
2904 #define SET_CARET_POS 0x01 /* set the caret position from x,y */
2905 #define SET_CARET_HIDE 0x02 /* increment the caret hide count */
2906 #define SET_CARET_STATE 0x04 /* set the caret on/off state */
2909 /* Set a window hook */
2911 int id; /* id of the hook */
2912 process_id_t pid; /* id of process to set the hook into */
2913 thread_id_t tid; /* id of thread to set the hook into */
2916 client_ptr_t proc; /* hook procedure */
2918 int unicode; /* is it a unicode hook? */
2919 VARARG(module,unicode_str); /* module name */
2921 user_handle_t handle; /* handle to the hook */
2922 unsigned int active_hooks; /* active hooks bitmap */
2926 /* Remove a window hook */
2928 user_handle_t handle; /* handle to the hook */
2929 client_ptr_t proc; /* hook procedure if handle is 0 */
2930 int id; /* id of the hook if handle is 0 */
2932 unsigned int active_hooks; /* active hooks bitmap */
2936 /* Start calling a hook chain */
2937 @REQ(start_hook_chain)
2938 int id; /* id of the hook */
2939 int event; /* signalled event */
2940 user_handle_t window; /* handle to the event window */
2941 int object_id; /* object id for out of context winevent */
2942 int child_id; /* child id for out of context winevent */
2944 user_handle_t handle; /* handle to the next hook */
2945 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2946 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2947 int unicode; /* is it a unicode hook? */
2948 client_ptr_t proc; /* hook procedure */
2949 unsigned int active_hooks; /* active hooks bitmap */
2950 VARARG(module,unicode_str); /* module name */
2954 /* Finished calling a hook chain */
2955 @REQ(finish_hook_chain)
2956 int id; /* id of the hook */
2960 /* Get the hook information */
2962 user_handle_t handle; /* handle to the current hook */
2963 int get_next; /* do we want info about current or next hook? */
2964 int event; /* signalled event */
2965 user_handle_t window; /* handle to the event window */
2966 int object_id; /* object id for out of context winevent */
2967 int child_id; /* child id for out of context winevent */
2969 user_handle_t handle; /* handle to the hook */
2970 int id; /* id of the hook */
2971 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2972 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2973 client_ptr_t proc; /* hook procedure */
2974 int unicode; /* is it a unicode hook? */
2975 VARARG(module,unicode_str); /* module name */
2979 /* Create a window class */
2981 int local; /* is it a local class? */
2982 atom_t atom; /* class atom */
2983 unsigned int style; /* class style */
2984 mod_handle_t instance; /* module instance */
2985 int extra; /* number of extra class bytes */
2986 int win_extra; /* number of window extra bytes */
2987 client_ptr_t client_ptr; /* pointer to class in client address space */
2988 VARARG(name,unicode_str); /* class name */
2990 atom_t atom; /* resulting class atom */
2994 /* Destroy a window class */
2996 atom_t atom; /* class atom */
2997 mod_handle_t instance; /* module instance */
2998 VARARG(name,unicode_str); /* class name */
3000 client_ptr_t client_ptr; /* pointer to class in client address space */
3004 /* Set some information in a class */
3005 @REQ(set_class_info)
3006 user_handle_t window; /* handle to the window */
3007 unsigned int flags; /* flags for info to set (see below) */
3008 atom_t atom; /* class atom */
3009 unsigned int style; /* class style */
3010 int win_extra; /* number of window extra bytes */
3011 mod_handle_t instance; /* module instance */
3012 int extra_offset; /* offset to set in extra bytes */
3013 data_size_t extra_size; /* size to set in extra bytes */
3014 lparam_t extra_value; /* value to set in extra bytes */
3016 atom_t old_atom; /* previous class atom */
3017 unsigned int old_style; /* previous class style */
3018 int old_extra; /* previous number of class extra bytes */
3019 int old_win_extra; /* previous number of window extra bytes */
3020 mod_handle_t old_instance; /* previous module instance */
3021 lparam_t old_extra_value; /* old value in extra bytes */
3023 #define SET_CLASS_ATOM 0x0001
3024 #define SET_CLASS_STYLE 0x0002
3025 #define SET_CLASS_WINEXTRA 0x0004
3026 #define SET_CLASS_INSTANCE 0x0008
3027 #define SET_CLASS_EXTRA 0x0010
3030 /* Set/get clipboard information */
3031 @REQ(set_clipboard_info)
3032 unsigned int flags; /* flags for fields to set (see below) */
3033 user_handle_t clipboard; /* clipboard window */
3034 user_handle_t owner; /* clipboard owner */
3035 user_handle_t viewer; /* first clipboard viewer */
3036 unsigned int seqno; /* change sequence number */
3038 unsigned int flags; /* status flags (see below) */
3039 user_handle_t old_clipboard; /* old clipboard window */
3040 user_handle_t old_owner; /* old clipboard owner */
3041 user_handle_t old_viewer; /* old clipboard viewer */
3042 unsigned int seqno; /* current sequence number */
3045 #define SET_CB_OPEN 0x001
3046 #define SET_CB_OWNER 0x002
3047 #define SET_CB_VIEWER 0x004
3048 #define SET_CB_SEQNO 0x008
3049 #define SET_CB_RELOWNER 0x010
3050 #define SET_CB_CLOSE 0x020
3051 #define CB_OPEN 0x040
3052 #define CB_OWNER 0x080
3053 #define CB_PROCESS 0x100
3056 /* Open a security token */
3058 obj_handle_t handle; /* handle to the thread or process */
3059 unsigned int access; /* access rights to the new token */
3060 unsigned int attributes;/* object attributes */
3061 unsigned int flags; /* flags (see below) */
3063 obj_handle_t token; /* handle to the token */
3065 #define OPEN_TOKEN_THREAD 1
3066 #define OPEN_TOKEN_AS_SELF 2
3069 /* Set/get the global windows */
3070 @REQ(set_global_windows)
3071 unsigned int flags; /* flags for fields to set (see below) */
3072 user_handle_t shell_window; /* handle to the new shell window */
3073 user_handle_t shell_listview; /* handle to the new shell listview window */
3074 user_handle_t progman_window; /* handle to the new program manager window */
3075 user_handle_t taskman_window; /* handle to the new task manager window */
3077 user_handle_t old_shell_window; /* handle to the shell window */
3078 user_handle_t old_shell_listview; /* handle to the shell listview window */
3079 user_handle_t old_progman_window; /* handle to the new program manager window */
3080 user_handle_t old_taskman_window; /* handle to the new task manager window */
3082 #define SET_GLOBAL_SHELL_WINDOWS 0x01 /* set both main shell and listview windows */
3083 #define SET_GLOBAL_PROGMAN_WINDOW 0x02
3084 #define SET_GLOBAL_TASKMAN_WINDOW 0x04
3086 /* Adjust the privileges held by a token */
3087 @REQ(adjust_token_privileges)
3088 obj_handle_t handle; /* handle to the token */
3089 int disable_all; /* disable all privileges? */
3090 int get_modified_state; /* get modified privileges? */
3091 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to enable/disable/remove */
3093 unsigned int len; /* total length in bytes required to store token privileges */
3094 VARARG(privileges,LUID_AND_ATTRIBUTES); /* modified privileges */
3097 /* Retrieves the set of privileges held by or available to a token */
3098 @REQ(get_token_privileges)
3099 obj_handle_t handle; /* handle to the token */
3101 unsigned int len; /* total length in bytes required to store token privileges */
3102 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
3105 /* Check the token has the required privileges */
3106 @REQ(check_token_privileges)
3107 obj_handle_t handle; /* handle to the token */
3108 int all_required; /* are all the privileges required for the check to succeed? */
3109 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to check */
3111 int has_privileges; /* does the token have the required privileges? */
3112 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
3115 @REQ(duplicate_token)
3116 obj_handle_t handle; /* handle to the token to duplicate */
3117 unsigned int access; /* access rights to the new token */
3118 unsigned int attributes; /* object attributes */
3119 int primary; /* is the new token to be a primary one? */
3120 int impersonation_level; /* impersonation level of the new token */
3122 obj_handle_t new_handle; /* duplicated handle */
3126 obj_handle_t handle; /* handle to the token */
3127 unsigned int desired_access; /* desired access to the object */
3128 unsigned int mapping_read; /* mapping from generic read to specific rights */
3129 unsigned int mapping_write; /* mapping from generic write to specific rights */
3130 unsigned int mapping_execute; /* mapping from generic execute to specific rights */
3131 unsigned int mapping_all; /* mapping from generic all to specific rights */
3132 VARARG(sd,security_descriptor); /* security descriptor to check */
3134 unsigned int access_granted; /* access rights actually granted */
3135 unsigned int access_status; /* was access granted? */
3136 unsigned int privileges_len; /* length needed to store privileges */
3137 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges used during access check */
3141 obj_handle_t handle; /* handle to the token */
3142 unsigned int which_sid; /* which SID to retrieve from the token */
3144 data_size_t sid_len; /* length needed to store sid */
3145 VARARG(sid,SID); /* the sid specified by which_sid from the token */
3148 @REQ(get_token_groups)
3149 obj_handle_t handle; /* handle to the token */
3151 data_size_t user_len; /* length needed to store user */
3152 VARARG(user,token_groups); /* groups the token's user belongs to
*/
3155 @
REQ(get_token_default_dacl
)
3156 obj_handle_t handle
; /* handle to the token
*/
3158 data_size_t acl_len
; /* length needed to store access control list
*/
3159 VARARG(acl
,ACL
); /* access control list
*/
3162 @
REQ(set_token_default_dacl
)
3163 obj_handle_t handle
; /* handle to the token
*/
3164 VARARG(acl
,ACL
); /* default dacl to set
*/
3167 @
REQ(set_security_object
)
3168 obj_handle_t handle
; /* handle to the object
*/
3169 unsigned int security_info
; /* which parts of security descriptor to set
*/
3170 VARARG(sd
,security_descriptor
); /* security descriptor to set
*/
3173 @
REQ(get_security_object
)
3174 obj_handle_t handle
; /* handle to the object
*/
3175 unsigned int security_info
; /* which parts of security descriptor to get
*/
3177 unsigned int sd_len
; /* buffer size needed for sd
*/
3178 VARARG(sd
,security_descriptor
); /* retrieved security descriptor
*/
3181 /* Create a mailslot
*/
3182 @
REQ(create_mailslot
)
3183 unsigned int access
; /* wanted access rights
*/
3184 unsigned int attributes
; /* object attributes
*/
3185 obj_handle_t rootdir
; /* root directory
*/
3186 timeout_t read_timeout
;
3187 unsigned int max_msgsize
;
3188 VARARG(name
,unicode_str
); /* mailslot name
*/
3190 obj_handle_t handle
; /* handle to the mailslot
*/
3194 /* Set mailslot information
*/
3195 @
REQ(set_mailslot_info
)
3196 obj_handle_t handle
; /* handle to the mailslot
*/
3197 timeout_t read_timeout
;
3200 timeout_t read_timeout
;
3201 unsigned int max_msgsize
;
3203 #define MAILSLOT_SET_READ_TIMEOUT
1
3206 /* Create a directory object
*/
3207 @
REQ(create_directory
)
3208 unsigned int access
; /* access flags
*/
3209 unsigned int attributes
; /* object attributes
*/
3210 obj_handle_t rootdir
; /* root directory
*/
3211 VARARG(directory_name
,unicode_str
); /* Directory name
*/
3213 obj_handle_t handle
; /* handle to the directory
*/
3217 /* Open a directory object
*/
3218 @
REQ(open_directory
)
3219 unsigned int access
; /* access flags
*/
3220 unsigned int attributes
; /* object attributes
*/
3221 obj_handle_t rootdir
; /* root directory
*/
3222 VARARG(directory_name
,unicode_str
); /* Directory name
*/
3224 obj_handle_t handle
; /* handle to the directory
*/
3228 /* Get a directory entry by index
*/
3229 @
REQ(get_directory_entry
)
3230 obj_handle_t handle
; /* handle to the directory
*/
3231 unsigned int index
; /* entry index
*/
3233 data_size_t name_len
; /* length of the entry name in bytes
*/
3234 VARARG(name
,unicode_str
,name_len
); /* entry name
*/
3235 VARARG(type
,unicode_str
); /* entry type
*/
3239 /* Create a symbolic link object
*/
3240 @
REQ(create_symlink
)
3241 unsigned int access
; /* access flags
*/
3242 unsigned int attributes
; /* object attributes
*/
3243 obj_handle_t rootdir
; /* root directory
*/
3244 data_size_t name_len
; /* length of the symlink name in bytes
*/
3245 VARARG(name
,unicode_str
,name_len
); /* symlink name
*/
3246 VARARG(target_name
,unicode_str
); /* target name
*/
3248 obj_handle_t handle
; /* handle to the symlink
*/
3252 /* Open a symbolic link object
*/
3254 unsigned int access
; /* access flags
*/
3255 unsigned int attributes
; /* object attributes
*/
3256 obj_handle_t rootdir
; /* root directory
*/
3257 VARARG(name
,unicode_str
); /* symlink name
*/
3259 obj_handle_t handle
; /* handle to the symlink
*/
3263 /* Query a symbolic link object
*/
3265 obj_handle_t handle
; /* handle to the symlink
*/
3267 data_size_t total
; /* total needed size for name
*/
3268 VARARG(target_name
,unicode_str
); /* target name
*/
3272 /* Query basic object information
*/
3273 @
REQ(get_object_info
)
3274 obj_handle_t handle
; /* handle to the object
*/
3276 unsigned int access
; /* granted access mask
*/
3277 unsigned int ref_count
; /* object ref count
*/
3278 data_size_t total
; /* total needed size for name
*/
3279 VARARG(name
,unicode_str
); /* object name
*/
3283 /* Unlink a named object
*/
3285 obj_handle_t handle
; /* handle to the object
*/
3289 /* Query the impersonation level of an impersonation token
*/
3290 @
REQ(get_token_impersonation_level
)
3291 obj_handle_t handle
; /* handle to the object
*/
3293 int impersonation_level
; /* impersonation level of the impersonation token
*/
3296 /* Allocate a locally
-unique identifier
*/
3297 @
REQ(allocate_locally_unique_id
)
3303 /* Create a device manager
*/
3304 @
REQ(create_device_manager
)
3305 unsigned int access
; /* wanted access rights
*/
3306 unsigned int attributes
; /* object attributes
*/
3308 obj_handle_t handle
; /* handle to the device
*/
3312 /* Create a device
*/
3314 unsigned int access
; /* wanted access rights
*/
3315 unsigned int attributes
; /* object attributes
*/
3316 obj_handle_t rootdir
; /* root directory
*/
3317 client_ptr_t user_ptr
; /* opaque ptr for use by client
*/
3318 obj_handle_t manager
; /* device manager
*/
3319 VARARG(name
,unicode_str
); /* object name
*/
3321 obj_handle_t handle
; /* handle to the device
*/
3325 /* Delete a device
*/
3327 obj_handle_t handle
; /* handle to the device
*/
3331 /* Retrieve the next pending device ioctl request
*/
3332 @
REQ(get_next_device_request
)
3333 obj_handle_t manager
; /* handle to the device manager
*/
3334 obj_handle_t prev
; /* handle to the previous ioctl
*/
3335 unsigned int status
; /* status of the previous ioctl
*/
3336 VARARG(prev_data
,bytes
); /* output data of the previous ioctl
*/
3338 obj_handle_t next
; /* handle to the next ioctl
*/
3339 ioctl_code_t code
; /* ioctl code
*/
3340 client_ptr_t user_ptr
; /* opaque ptr for the device
*/
3341 process_id_t client_pid
; /* pid of process calling ioctl
*/
3342 thread_id_t client_tid
; /* tid of thread calling ioctl
*/
3343 data_size_t in_size
; /* total needed input size
*/
3344 data_size_t out_size
; /* needed output size
*/
3345 VARARG(next_data
,bytes
); /* input data of the next ioctl
*/
3349 /* Make the current process a system process
*/
3350 @
REQ(make_process_system
)
3352 obj_handle_t event
; /* event signaled when all user processes have exited
*/
3356 /* Get detailed fixed
-size information about a token
*/
3357 @
REQ(get_token_statistics
)
3358 obj_handle_t handle
; /* handle to the object
*/
3360 luid_t token_id
; /* locally
-unique identifier of the token
*/
3361 luid_t modified_id
; /* locally
-unique identifier of the modified version of the token
*/
3362 int primary
; /* is the token primary or impersonation?
*/
3363 int impersonation_level
; /* level of impersonation
*/
3364 int group_count
; /* the number of groups the token is a member of
*/
3365 int privilege_count
; /* the number of privileges the token has
*/
3369 /* Create I
/O completion port
*/
3370 @
REQ(create_completion
)
3371 unsigned int access
; /* desired access to a port
*/
3372 unsigned int attributes
; /* object attributes
*/
3373 unsigned int concurrent
; /* max number of concurrent active threads
*/
3374 obj_handle_t rootdir
; /* root directory
*/
3375 VARARG(filename
,string
); /* port name
*/
3377 obj_handle_t handle
; /* port handle
*/
3381 /* Open I
/O completion port
*/
3382 @
REQ(open_completion
)
3383 unsigned int access
; /* desired access to a port
*/
3384 unsigned int attributes
; /* object attributes
*/
3385 obj_handle_t rootdir
; /* root directory
*/
3386 VARARG(filename
,string
); /* port name
*/
3388 obj_handle_t handle
; /* port handle
*/
3392 /* add completion to completion port
*/
3393 @
REQ(add_completion
)
3394 obj_handle_t handle
; /* port handle
*/
3395 apc_param_t ckey
; /* completion key
*/
3396 apc_param_t cvalue
; /* completion value
*/
3397 apc_param_t information
; /* IO_STATUS_BLOCK Information
*/
3398 unsigned int status
; /* completion result
*/
3402 /* get completion from completion port queue
*/
3403 @
REQ(remove_completion
)
3404 obj_handle_t handle
; /* port handle
*/
3406 apc_param_t ckey
; /* completion key
*/
3407 apc_param_t cvalue
; /* completion value
*/
3408 apc_param_t information
; /* IO_STATUS_BLOCK Information
*/
3409 unsigned int status
; /* completion result
*/
3413 /* get completion queue depth
*/
3414 @
REQ(query_completion
)
3415 obj_handle_t handle
; /* port handle
*/
3417 unsigned int depth
; /* completion queue depth
*/
3421 /* associate object with completion port
*/
3422 @
REQ(set_completion_info
)
3423 obj_handle_t handle
; /* object handle
*/
3424 apc_param_t ckey
; /* completion key
*/
3425 obj_handle_t chandle
; /* port handle
*/
3429 /* check for associated completion and push msg
*/
3430 @
REQ(add_fd_completion
)
3431 obj_handle_t handle
; /* async
' object */
3432 apc_param_t cvalue; /* completion value */
3433 apc_param_t information; /* IO_STATUS_BLOCK Information */
3434 unsigned int status; /* completion status */
3438 /* Retrieve layered info for a window */
3439 @REQ(get_window_layered_info)
3440 user_handle_t handle; /* handle to the window */
3442 unsigned int color_key; /* color key */
3443 unsigned int alpha; /* alpha (0..255) */
3444 unsigned int flags; /* LWA_* flags */
3448 /* Set layered info for a window */
3449 @REQ(set_window_layered_info)
3450 user_handle_t handle; /* handle to the window */
3451 unsigned int color_key; /* color key */
3452 unsigned int alpha; /* alpha (0..255) */
3453 unsigned int flags; /* LWA_* flags */
3457 /* Allocate an arbitrary user handle */
3458 @REQ(alloc_user_handle)
3460 user_handle_t handle; /* allocated handle */
3464 /* Free an arbitrary user handle */
3465 @REQ(free_user_handle)
3466 user_handle_t handle; /* handle to free*/
3470 /* Set/get the current cursor */
3472 unsigned int flags; /* flags for fields to set (see below) */
3473 user_handle_t handle; /* handle to the cursor */
3474 int show_count; /* show count increment/decrement */
3475 int x; /* cursor position */
3477 rectangle_t clip; /* cursor clip rectangle */
3478 unsigned int clip_msg; /* message to post on cursor clip changes */
3480 user_handle_t prev_handle; /* previous handle */
3481 int prev_count; /* previous show count */
3482 int prev_x; /* previous position */
3484 int new_x; /* new position */
3486 rectangle_t new_clip; /* new clip rectangle */
3487 unsigned int last_change; /* time of last position change */
3489 #define SET_CURSOR_HANDLE 0x01
3490 #define SET_CURSOR_COUNT 0x02
3491 #define SET_CURSOR_POS 0x04
3492 #define SET_CURSOR_CLIP 0x08
3493 #define SET_CURSOR_NOCLIP 0x10
3496 /* Modify the list of registered rawinput devices */
3497 @REQ(update_rawinput_devices)
3498 VARARG(devices,rawinput_devices);
3502 /* Retrieve the suspended context of a thread */
3503 @REQ(get_suspend_context)
3505 VARARG(context,context); /* thread context */
3509 /* Store the suspend context of a thread */
3510 @REQ(set_suspend_context)
3511 VARARG(context,context); /* thread context */