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
, CPU_SPARC
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 struct
{ unsigned int psr
, pc
, npc
, y
, wim
, tbr
; } sparc_regs
;
166 } ctl
; /* selected by SERVER_CTX_CONTROL
*/
169 struct
{ unsigned int eax
, ebx
, ecx
, edx
, esi
, edi
; } i386_regs
;
170 struct
{ unsigned __int64 rax
,rbx
, rcx
, rdx
, rsi
, rdi
,
171 r8
, r9
, r10
, r11
, r12
, r13
, r14
, r15
; } x86_64_regs
;
172 struct
{ unsigned int gpr
[32], cr
, xer
; } powerpc_regs
;
173 struct
{ unsigned int r
[13]; } arm_regs
;
174 struct
{ unsigned __int64 x
[31]; } arm64_regs
;
175 struct
{ unsigned int g
[8], o
[8], l
[8], i
[8]; } sparc_regs
;
176 } integer
; /* selected by SERVER_CTX_INTEGER
*/
179 struct
{ unsigned int ds
, es
, fs
, gs
; } i386_regs
;
180 struct
{ unsigned int ds
, es
, fs
, gs
; } x86_64_regs
;
181 } seg
; /* selected by SERVER_CTX_SEGMENTS
*/
184 struct
{ unsigned int ctrl
, status
, tag
, err_off
, err_sel
, data_off
, data_sel
, cr0npx
;
185 unsigned char regs
[80]; } i386_regs
;
186 struct
{ struct
{ unsigned __int64 low
, high
; } fpregs
[32]; } x86_64_regs
;
187 struct
{ double fpr
[32], fpscr
; } powerpc_regs
;
188 } fp
; /* selected by SERVER_CTX_FLOATING_POINT
*/
191 struct
{ unsigned int dr0
, dr1
, dr2
, dr3
, dr6
, dr7
; } i386_regs
;
192 struct
{ unsigned __int64 dr0
, dr1
, dr2
, dr3
, dr6
, dr7
; } x86_64_regs
;
193 struct
{ unsigned int dr
[8]; } powerpc_regs
;
194 } debug
; /* selected by SERVER_CTX_DEBUG_REGISTERS
*/
197 unsigned char i386_regs
[512];
198 } ext
; /* selected by SERVER_CTX_EXTENDED_REGISTERS
*/
201 #define SERVER_CTX_CONTROL
0x01
202 #define SERVER_CTX_INTEGER
0x02
203 #define SERVER_CTX_SEGMENTS
0x04
204 #define SERVER_CTX_FLOATING_POINT
0x08
205 #define SERVER_CTX_DEBUG_REGISTERS
0x10
206 #define SERVER_CTX_EXTENDED_REGISTERS
0x20
208 /* structure used in sending an fd from client to server
*/
211 thread_id_t tid
; /* thread id
*/
212 int fd
; /* file descriptor on client
-side
*/
215 /* structure sent by the server on the wait fifo
*/
218 client_ptr_t cookie
; /* magic cookie that was passed in select_request
*/
219 int signaled
; /* wait result
*/
223 /* NT
-style timeout
, in
100ns units
, negative means relative timeout
*/
224 typedef __int64 timeout_t
;
225 #define
TIMEOUT_INFINITE (((timeout_t
)0x7fffffff) << 32 |
0xffffffff)
227 /* structure for process startup info
*/
230 unsigned int debug_flags
;
231 unsigned int console_flags
;
232 obj_handle_t console
;
234 obj_handle_t hstdout
;
235 obj_handle_t hstderr
;
242 unsigned int attribute
;
245 data_size_t curdir_len
;
246 data_size_t dllpath_len
;
247 data_size_t imagepath_len
;
248 data_size_t cmdline_len
;
249 data_size_t title_len
;
250 data_size_t desktop_len
;
251 data_size_t shellinfo_len
;
252 data_size_t runtime_len
;
253 /* VARARG(curdir
,unicode_str
,curdir_len
); */
254 /* VARARG(dllpath
,unicode_str
,dllpath_len
); */
255 /* VARARG(imagepath
,unicode_str
,imagepath_len
); */
256 /* VARARG(cmdline
,unicode_str
,cmdline_len
); */
257 /* VARARG(title
,unicode_str
,title_len
); */
258 /* VARARG(desktop
,unicode_str
,desktop_len
); */
259 /* VARARG(shellinfo
,unicode_str
,shellinfo_len
); */
260 /* VARARG(runtime
,unicode_str
,runtime_len
); */
263 /* structure returned in the list of window properties
*/
266 atom_t atom
; /* property atom
*/
267 int string
; /* was atom a string originally?
*/
268 lparam_t data
; /* data stored in property
*/
271 /* structure to specify window rectangles
*/
280 /* structure for parameters of async I
/O calls
*/
283 obj_handle_t handle
; /* object to perform I
/O on
*/
284 obj_handle_t event
; /* event to signal when done
*/
285 client_ptr_t callback
; /* client
-side callback to call upon end of async
*/
286 client_ptr_t iosb
; /* I
/O status block in client addr space
*/
287 client_ptr_t arg
; /* opaque user data to pass to callback
*/
288 apc_param_t cvalue
; /* completion value to use for completion events
*/
291 /* structures for extra message data
*/
293 struct hardware_msg_data
295 lparam_t info
; /* extra info
*/
296 int x
; /* x position
*/
297 int y
; /* y position
*/
298 unsigned int hw_id
; /* unique id
*/
299 unsigned int flags
; /* hook flags
*/
305 int type
; /* RIM_TYPEKEYBOARD
*/
306 unsigned int message
; /* message generated by this rawinput event
*/
307 unsigned short vkey
; /* virtual key code
*/
308 unsigned short scan
; /* scan code
*/
312 int type
; /* RIM_TYPEMOUSE
*/
313 int x
; /* x coordinate
*/
314 int y
; /* y coordinate
*/
315 unsigned int data
; /* mouse data
*/
320 struct callback_msg_data
322 client_ptr_t callback
; /* callback function
*/
323 lparam_t data
; /* user data for callback
*/
324 lparam_t result
; /* message result
*/
327 struct winevent_msg_data
329 user_handle_t hook
; /* hook handle
*/
330 thread_id_t tid
; /* thread id
*/
331 client_ptr_t hook_proc
; /* hook proc address
*/
332 /* followed by module name if any
*/
340 int type
; /* INPUT_KEYBOARD
*/
341 unsigned short vkey
; /* virtual key code
*/
342 unsigned short scan
; /* scan code
*/
343 unsigned int flags
; /* event flags
*/
344 unsigned int time
; /* event time
*/
345 lparam_t info
; /* extra info
*/
349 int type
; /* INPUT_MOUSE
*/
350 int x
; /* coordinates
*/
352 unsigned int data
; /* mouse data
*/
353 unsigned int flags
; /* event flags
*/
354 unsigned int time
; /* event time
*/
355 lparam_t info
; /* extra info
*/
359 int type
; /* INPUT_HARDWARE
*/
360 unsigned int msg
; /* message code
*/
361 lparam_t lparam
; /* message param
*/
367 unsigned char bytes
[1]; /* raw data for sent messages
*/
368 struct hardware_msg_data hardware
;
369 struct callback_msg_data callback
;
370 struct winevent_msg_data winevent
;
373 /* structure for console char
/attribute info
*/
380 /* structure returned in filesystem events
*/
381 struct filesystem_event
390 unsigned int low_part
;
394 #define MAX_ACL_LEN
65535
396 struct security_descriptor
398 unsigned int control
; /* SE_ flags
*/
399 data_size_t owner_len
;
400 data_size_t group_len
;
401 data_size_t sacl_len
;
402 data_size_t dacl_len
;
403 /* VARARG(owner
,SID
); */
404 /* VARARG(group
,SID
); */
405 /* VARARG(sacl
,ACL
); */
406 /* VARARG(dacl
,ACL
); */
409 struct object_attributes
411 obj_handle_t rootdir
; /* root directory
*/
412 data_size_t sd_len
; /* length of security_descriptor data. may be
0 */
413 data_size_t name_len
; /* length of the name string. may be
0 */
414 /* VARARG(sd
,security_descriptor
); */
415 /* VARARG(name
,unicode_str
); */
421 /* unsigned int attributes
[count
]; */
422 /* VARARG(sids
,SID
); */
448 enum apc_type type
; /* APC_USER
*/
450 client_ptr_t func
; /* void (__stdcall
*func
)(ULONG_PTR
,ULONG_PTR
,ULONG_PTR
); */
451 apc_param_t args
[3]; /* arguments for user function
*/
455 enum apc_type type
; /* APC_TIMER
*/
457 client_ptr_t func
; /* void (__stdcall
*func
)(void
*, unsigned int
, unsigned int
); */
458 timeout_t time
; /* absolute time of expiration
*/
459 client_ptr_t arg
; /* user argument
*/
463 enum apc_type type
; /* APC_ASYNC_IO
*/
464 unsigned int status
; /* I
/O status
*/
465 client_ptr_t func
; /* unsigned
int (*func)(void*, void*, unsigned int, void **); */
466 client_ptr_t user
; /* user pointer
*/
467 client_ptr_t sb
; /* status block
*/
471 enum apc_type type
; /* APC_VIRTUAL_ALLOC
*/
472 unsigned int op_type
; /* type of operation
*/
473 client_ptr_t addr
; /* requested address
*/
474 mem_size_t size
; /* allocation size
*/
475 unsigned int zero_bits
; /* allocation alignment
*/
476 unsigned int prot
; /* memory protection flags
*/
480 enum apc_type type
; /* APC_VIRTUAL_FREE
*/
481 unsigned int op_type
; /* type of operation
*/
482 client_ptr_t addr
; /* requested address
*/
483 mem_size_t size
; /* allocation size
*/
487 enum apc_type type
; /* APC_VIRTUAL_QUERY
*/
489 client_ptr_t addr
; /* requested address
*/
493 enum apc_type type
; /* APC_VIRTUAL_PROTECT
*/
494 unsigned int prot
; /* new protection flags
*/
495 client_ptr_t addr
; /* requested address
*/
496 mem_size_t size
; /* requested size
*/
500 enum apc_type type
; /* APC_VIRTUAL_FLUSH
*/
502 client_ptr_t addr
; /* requested address
*/
503 mem_size_t size
; /* requested size
*/
507 enum apc_type type
; /* APC_VIRTUAL_LOCK
*/
509 client_ptr_t addr
; /* requested address
*/
510 mem_size_t size
; /* requested size
*/
514 enum apc_type type
; /* APC_VIRTUAL_UNLOCK
*/
516 client_ptr_t addr
; /* requested address
*/
517 mem_size_t size
; /* requested size
*/
521 enum apc_type type
; /* APC_MAP_VIEW
*/
522 obj_handle_t handle
; /* mapping handle
*/
523 client_ptr_t addr
; /* requested address
*/
524 mem_size_t size
; /* allocation size
*/
525 file_pos_t offset
; /* file offset
*/
526 unsigned int alloc_type
;/* allocation type
*/
527 unsigned short zero_bits
; /* allocation alignment
*/
528 unsigned short prot
; /* memory protection flags
*/
532 enum apc_type type
; /* APC_UNMAP_VIEW
*/
534 client_ptr_t addr
; /* view address
*/
538 enum apc_type type
; /* APC_CREATE_THREAD
*/
539 int suspend
; /* suspended thread?
*/
540 client_ptr_t func
; /* void (__stdcall
*func
)(void*)
; start function
*/
541 client_ptr_t arg
; /* argument for start function
*/
542 mem_size_t reserve
; /* reserve size for thread stack
*/
543 mem_size_t commit
; /* commit size for thread stack
*/
552 enum apc_type type
; /* APC_ASYNC_IO
*/
553 unsigned int status
; /* new status of async operation
*/
554 client_ptr_t apc
; /* user APC to call
*/
555 unsigned int total
; /* bytes transferred
*/
559 enum apc_type type
; /* APC_VIRTUAL_ALLOC
*/
560 unsigned int status
; /* status returned by call
*/
561 client_ptr_t addr
; /* resulting address
*/
562 mem_size_t size
; /* resulting size
*/
566 enum apc_type type
; /* APC_VIRTUAL_FREE
*/
567 unsigned int status
; /* status returned by call
*/
568 client_ptr_t addr
; /* resulting address
*/
569 mem_size_t size
; /* resulting size
*/
573 enum apc_type type
; /* APC_VIRTUAL_QUERY
*/
574 unsigned int status
; /* status returned by call
*/
575 client_ptr_t base
; /* resulting base address
*/
576 client_ptr_t alloc_base
;/* resulting allocation base
*/
577 mem_size_t size
; /* resulting region size
*/
578 unsigned short state
; /* resulting region state
*/
579 unsigned short prot
; /* resulting region protection
*/
580 unsigned short alloc_prot
;/* resulting allocation protection
*/
581 unsigned short alloc_type
;/* resulting region allocation type
*/
585 enum apc_type type
; /* APC_VIRTUAL_PROTECT
*/
586 unsigned int status
; /* status returned by call
*/
587 client_ptr_t addr
; /* resulting address
*/
588 mem_size_t size
; /* resulting size
*/
589 unsigned int prot
; /* old protection flags
*/
593 enum apc_type type
; /* APC_VIRTUAL_FLUSH
*/
594 unsigned int status
; /* status returned by call
*/
595 client_ptr_t addr
; /* resulting address
*/
596 mem_size_t size
; /* resulting size
*/
600 enum apc_type type
; /* APC_VIRTUAL_LOCK
*/
601 unsigned int status
; /* status returned by call
*/
602 client_ptr_t addr
; /* resulting address
*/
603 mem_size_t size
; /* resulting size
*/
607 enum apc_type type
; /* APC_VIRTUAL_UNLOCK
*/
608 unsigned int status
; /* status returned by call
*/
609 client_ptr_t addr
; /* resulting address
*/
610 mem_size_t size
; /* resulting size
*/
614 enum apc_type type
; /* APC_MAP_VIEW
*/
615 unsigned int status
; /* status returned by call
*/
616 client_ptr_t addr
; /* resulting address
*/
617 mem_size_t size
; /* resulting size
*/
621 enum apc_type type
; /* APC_MAP_VIEW
*/
622 unsigned int status
; /* status returned by call
*/
626 enum apc_type type
; /* APC_CREATE_THREAD
*/
627 unsigned int status
; /* status returned by call
*/
628 thread_id_t tid
; /* thread id
*/
629 obj_handle_t handle
; /* handle to new thread
*/
633 struct rawinput_device
635 unsigned short usage_page
;
636 unsigned short usage
;
638 user_handle_t target
;
641 /****************************************************************/
642 /* Request declarations
*/
644 /* Create a new process from the context of the parent
*/
646 int inherit_all
; /* inherit all handles from parent
*/
647 unsigned int create_flags
; /* creation flags
*/
648 int socket_fd
; /* file descriptor for process socket
*/
649 obj_handle_t exe_file
; /* file handle for main exe
*/
650 unsigned int process_access
; /* access rights for process object
*/
651 unsigned int process_attr
; /* attributes for process object
*/
652 unsigned int thread_access
; /* access rights for thread object
*/
653 unsigned int thread_attr
; /* attributes for thread object
*/
654 data_size_t info_size
; /* size of startup info
*/
655 VARARG(info
,startup_info
,info_size
); /* startup information
*/
656 VARARG(env
,unicode_str
); /* environment for new process
*/
658 obj_handle_t info
; /* new process info handle
*/
659 process_id_t pid
; /* process id
*/
660 obj_handle_t phandle
; /* process
handle (in the current process
) */
661 thread_id_t tid
; /* thread id
*/
662 obj_handle_t thandle
; /* thread
handle (in the current process
) */
666 /* Retrieve information about a newly started process
*/
667 @
REQ(get_new_process_info
)
668 obj_handle_t info
; /* info handle returned from new_process_request
*/
670 int success
; /* did the process start successfully?
*/
671 int exit_code
; /* process exit code if failed
*/
675 /* Create a new thread from the context of the parent
*/
677 unsigned int access
; /* wanted access rights
*/
678 unsigned int attributes
; /* object attributes
*/
679 int suspend
; /* new thread should be suspended on creation
*/
680 int request_fd
; /* fd for request pipe
*/
682 thread_id_t tid
; /* thread id
*/
683 obj_handle_t handle
; /* thread
handle (in the current process
) */
687 /* Retrieve the new process startup info
*/
688 @
REQ(get_startup_info
)
690 obj_handle_t exe_file
; /* file handle for main exe
*/
691 data_size_t info_size
; /* size of startup info
*/
692 VARARG(info
,startup_info
,info_size
); /* startup information
*/
693 VARARG(env
,unicode_str
); /* environment
*/
697 /* Signal the end of the process initialization
*/
698 @
REQ(init_process_done
)
699 int gui
; /* is it a GUI process?
*/
700 mod_handle_t module
; /* main module base address
*/
701 client_ptr_t ldt_copy
; /* address of LDT
copy (in thread address space
) */
702 client_ptr_t entry
; /* process entry point
*/
706 /* Initialize a thread
; called from the child after
fork()/clone() */
708 int unix_pid
; /* Unix pid of new thread
*/
709 int unix_tid
; /* Unix tid of new thread
*/
710 int debug_level
; /* new debug level
*/
711 client_ptr_t teb
; /* TEB of new
thread (in thread address space
) */
712 client_ptr_t entry
; /* entry point or PEB if initial
thread (in thread address space
) */
713 int reply_fd
; /* fd for reply pipe
*/
714 int wait_fd
; /* fd for blocking calls pipe
*/
715 cpu_type_t cpu
; /* CPU that this thread is running on
*/
717 process_id_t pid
; /* process id of the new thread
's process */
718 thread_id_t tid; /* thread id of the new thread */
719 timeout_t server_start; /* server start time */
720 data_size_t info_size; /* total size of startup info */
721 int version; /* protocol version */
722 unsigned int all_cpus; /* bitset of supported CPUs */
726 /* Terminate a process */
727 @REQ(terminate_process)
728 obj_handle_t handle; /* process handle to terminate */
729 int exit_code; /* process exit code */
731 int self; /* suicide? */
735 /* Terminate a thread */
736 @REQ(terminate_thread)
737 obj_handle_t handle; /* thread handle to terminate */
738 int exit_code; /* thread exit code */
740 int self; /* suicide? */
741 int last; /* last thread in this process? */
745 /* Retrieve information about a process */
746 @REQ(get_process_info)
747 obj_handle_t handle; /* process handle */
749 process_id_t pid; /* server process id */
750 process_id_t ppid; /* server process id of parent */
751 affinity_t affinity; /* process affinity mask */
752 client_ptr_t peb; /* PEB address in process address space */
753 timeout_t start_time; /* process start time */
754 timeout_t end_time; /* process end time */
755 int exit_code; /* process exit code */
756 int priority; /* priority class */
757 cpu_type_t cpu; /* CPU that this process is running on */
758 int debugger_present; /* process is being debugged */
762 /* Set a process information */
763 @REQ(set_process_info)
764 obj_handle_t handle; /* process handle */
765 int mask; /* setting mask (see below) */
766 int priority; /* priority class */
767 affinity_t affinity; /* affinity mask */
769 #define SET_PROCESS_INFO_PRIORITY 0x01
770 #define SET_PROCESS_INFO_AFFINITY 0x02
773 /* Retrieve information about a thread */
774 @REQ(get_thread_info)
775 obj_handle_t handle; /* thread handle */
776 thread_id_t tid_in; /* thread id (optional) */
778 process_id_t pid; /* server process id */
779 thread_id_t tid; /* server thread id */
780 client_ptr_t teb; /* thread teb pointer */
781 affinity_t affinity; /* thread affinity mask */
782 timeout_t creation_time; /* thread creation time */
783 timeout_t exit_time; /* thread exit time */
784 int exit_code; /* thread exit code */
785 int priority; /* thread priority level */
786 int last; /* last thread in process */
790 /* Set a thread information */
791 @REQ(set_thread_info)
792 obj_handle_t handle; /* thread handle */
793 int mask; /* setting mask (see below) */
794 int priority; /* priority class */
795 affinity_t affinity; /* affinity mask */
796 obj_handle_t token; /* impersonation token */
798 #define SET_THREAD_INFO_PRIORITY 0x01
799 #define SET_THREAD_INFO_AFFINITY 0x02
800 #define SET_THREAD_INFO_TOKEN 0x04
803 /* Retrieve information about a module */
805 obj_handle_t handle; /* process handle */
806 mod_handle_t base_address; /* base address of module */
808 client_ptr_t entry_point;
809 data_size_t size; /* module size */
810 data_size_t filename_len; /* buffer len in bytes required to store filename */
811 VARARG(filename,unicode_str); /* file name of module */
815 /* Suspend a thread */
817 obj_handle_t handle; /* thread handle */
819 int count; /* new suspend count */
823 /* Resume a thread */
825 obj_handle_t handle; /* thread handle */
827 int count; /* new suspend count */
831 /* Notify the server that a dll has been loaded */
833 obj_handle_t mapping; /* file mapping handle */
834 mod_handle_t base; /* base address */
835 client_ptr_t name; /* ptr to ptr to name (in process addr space) */
836 data_size_t size; /* dll size */
837 int dbg_offset; /* debug info offset */
838 int dbg_size; /* debug info size */
839 VARARG(filename,unicode_str); /* file name of dll */
843 /* Notify the server that a dll is being unloaded */
845 mod_handle_t base; /* base address */
849 /* Queue an APC for a thread or process */
851 obj_handle_t handle; /* thread or process handle */
852 apc_call_t call; /* call arguments */
854 obj_handle_t handle; /* APC handle */
855 int self; /* run APC in caller itself? */
859 /* Get the result of an APC call */
861 obj_handle_t handle; /* handle to the APC */
863 apc_result_t result; /* result of the APC */
867 /* Close a handle for the current process */
869 obj_handle_t handle; /* handle to close */
873 /* Set a handle information */
874 @REQ(set_handle_info)
875 obj_handle_t handle; /* handle we are interested in */
876 int flags; /* new handle flags */
877 int mask; /* mask for flags to set */
879 int old_flags; /* old flag value */
883 /* Duplicate a handle */
885 obj_handle_t src_process; /* src process handle */
886 obj_handle_t src_handle; /* src handle to duplicate */
887 obj_handle_t dst_process; /* dst process handle */
888 unsigned int access; /* wanted access rights */
889 unsigned int attributes; /* object attributes */
890 unsigned int options; /* duplicate options (see below) */
892 obj_handle_t handle; /* duplicated handle in dst process */
893 int self; /* is the source the current process? */
894 int closed; /* whether the source handle has been closed */
896 #define DUP_HANDLE_CLOSE_SOURCE DUPLICATE_CLOSE_SOURCE
897 #define DUP_HANDLE_SAME_ACCESS DUPLICATE_SAME_ACCESS
898 #define DUP_HANDLE_MAKE_GLOBAL 0x80000000 /* Not a Windows flag */
901 /* Open a handle to a process */
903 process_id_t pid; /* process id to open */
904 unsigned int access; /* wanted access rights */
905 unsigned int attributes; /* object attributes */
907 obj_handle_t handle; /* handle to the process */
911 /* Open a handle to a thread */
913 thread_id_t tid; /* thread id to open */
914 unsigned int access; /* wanted access rights */
915 unsigned int attributes; /* object attributes */
917 obj_handle_t handle; /* handle to the thread */
921 /* Wait for handles */
923 int flags; /* wait flags (see below) */
924 client_ptr_t cookie; /* magic cookie to return to client */
925 obj_handle_t signal; /* object to signal (0 if none) */
926 obj_handle_t prev_apc; /* handle to previous APC */
927 timeout_t timeout; /* timeout */
928 VARARG(result,apc_result); /* result of previous APC */
929 VARARG(handles,handles); /* handles to select on */
931 timeout_t timeout; /* timeout converted to absolute */
932 apc_call_t call; /* APC call arguments */
933 obj_handle_t apc_handle; /* handle to next APC */
936 #define SELECT_ALERTABLE 2
937 #define SELECT_INTERRUPTIBLE 4
940 /* Create an event */
942 unsigned int access; /* wanted access rights */
943 unsigned int attributes; /* object attributes */
944 int manual_reset; /* manual reset event */
945 int initial_state; /* initial state of the event */
946 VARARG(objattr,object_attributes); /* object attributes */
948 obj_handle_t handle; /* handle to the event */
951 /* Event operation */
953 obj_handle_t handle; /* handle to event */
954 int op; /* event operation (see below) */
956 enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT };
961 unsigned int access; /* wanted access rights */
962 unsigned int attributes; /* object attributes */
963 obj_handle_t rootdir; /* root directory */
964 VARARG(name,unicode_str); /* object name */
966 obj_handle_t handle; /* handle to the event */
972 unsigned int access; /* wanted access rights */
973 unsigned int attributes; /* object attributes */
974 int owned; /* initially owned? */
975 VARARG(objattr,object_attributes); /* object attributes */
977 obj_handle_t handle; /* handle to the mutex */
981 /* Release a mutex */
983 obj_handle_t handle; /* handle to the mutex */
985 unsigned int prev_count; /* value of internal counter, before release */
991 unsigned int access; /* wanted access rights */
992 unsigned int attributes; /* object attributes */
993 obj_handle_t rootdir; /* root directory */
994 VARARG(name,unicode_str); /* object name */
996 obj_handle_t handle; /* handle to the mutex */
1000 /* Create a semaphore */
1001 @REQ(create_semaphore)
1002 unsigned int access; /* wanted access rights */
1003 unsigned int attributes; /* object attributes */
1004 unsigned int initial; /* initial count */
1005 unsigned int max; /* maximum count */
1006 VARARG(objattr,object_attributes); /* object attributes */
1008 obj_handle_t handle; /* handle to the semaphore */
1012 /* Release a semaphore */
1013 @REQ(release_semaphore)
1014 obj_handle_t handle; /* handle to the semaphore */
1015 unsigned int count; /* count to add to semaphore */
1017 unsigned int prev_count; /* previous semaphore count */
1021 /* Open a semaphore */
1022 @REQ(open_semaphore)
1023 unsigned int access; /* wanted access rights */
1024 unsigned int attributes; /* object attributes */
1025 obj_handle_t rootdir; /* root directory */
1026 VARARG(name,unicode_str); /* object name */
1028 obj_handle_t handle; /* handle to the semaphore */
1034 unsigned int access; /* wanted access rights */
1035 unsigned int attributes; /* object attributes */
1036 unsigned int sharing; /* sharing flags */
1037 int create; /* file create action */
1038 unsigned int options; /* file options */
1039 unsigned int attrs; /* file attributes for creation */
1040 VARARG(objattr,object_attributes); /* object attributes */
1041 VARARG(filename,string); /* file name */
1043 obj_handle_t handle; /* handle to the file */
1047 /* Open a file object */
1048 @REQ(open_file_object)
1049 unsigned int access; /* wanted access rights */
1050 unsigned int attributes; /* open attributes */
1051 obj_handle_t rootdir; /* root directory */
1052 unsigned int sharing; /* sharing flags */
1053 unsigned int options; /* file options */
1054 VARARG(filename,unicode_str); /* file name */
1056 obj_handle_t handle; /* handle to the file */
1060 /* Allocate a file handle for a Unix fd */
1061 @REQ(alloc_file_handle)
1062 unsigned int access; /* wanted access rights */
1063 unsigned int attributes; /* object attributes */
1064 int fd; /* file descriptor on the client side */
1066 obj_handle_t handle; /* handle to the file */
1070 /* Get the Unix name from a file handle */
1071 @REQ(get_handle_unix_name)
1072 obj_handle_t handle; /* file handle */
1074 data_size_t name_len; /* unix name length */
1075 VARARG(name,string); /* unix name */
1079 /* Get a Unix fd to access a file */
1081 obj_handle_t handle; /* handle to the file */
1083 int type; /* file type (see below) */
1084 int cacheable; /* can fd be cached in the client? */
1085 unsigned int access; /* file access rights */
1086 unsigned int options; /* file open options */
1090 FD_TYPE_INVALID, /* invalid file (no associated fd) */
1091 FD_TYPE_FILE, /* regular file */
1092 FD_TYPE_DIR, /* directory */
1093 FD_TYPE_SOCKET, /* socket */
1094 FD_TYPE_SERIAL, /* serial port */
1095 FD_TYPE_PIPE, /* named pipe */
1096 FD_TYPE_MAILSLOT, /* mailslot */
1097 FD_TYPE_CHAR, /* unspecified char device */
1098 FD_TYPE_DEVICE, /* Windows device file */
1103 /* Flush a file buffers */
1105 obj_handle_t handle; /* handle to the file */
1107 obj_handle_t event; /* event set when finished */
1111 /* Lock a region of a file */
1113 obj_handle_t handle; /* handle to the file */
1114 file_pos_t offset; /* offset of start of lock */
1115 file_pos_t count; /* count of bytes to lock */
1116 int shared; /* shared or exclusive lock? */
1117 int wait; /* do we want to wait? */
1119 obj_handle_t handle; /* handle to wait on */
1120 int overlapped; /* is it an overlapped I/O handle? */
1124 /* Unlock a region of a file */
1126 obj_handle_t handle; /* handle to the file */
1127 file_pos_t offset; /* offset of start of unlock */
1128 file_pos_t count; /* count of bytes to unlock */
1132 /* Create a socket */
1134 unsigned int access; /* wanted access rights */
1135 unsigned int attributes; /* object attributes */
1136 int family; /* family, see socket manpage */
1137 int type; /* type, see socket manpage */
1138 int protocol; /* protocol, see socket manpage */
1139 unsigned int flags; /* socket flags */
1141 obj_handle_t handle; /* handle to the new socket */
1145 /* Accept a socket */
1147 obj_handle_t lhandle; /* handle to the listening socket */
1148 unsigned int access; /* wanted access rights */
1149 unsigned int attributes; /* object attributes */
1151 obj_handle_t handle; /* handle to the new socket */
1155 /* Accept into an initialized socket */
1156 @REQ(accept_into_socket)
1157 obj_handle_t lhandle; /* handle to the listening socket */
1158 obj_handle_t ahandle; /* handle to the accepting socket */
1162 /* Set socket event parameters */
1163 @REQ(set_socket_event)
1164 obj_handle_t handle; /* handle to the socket */
1165 unsigned int mask; /* event mask */
1166 obj_handle_t event; /* event object */
1167 user_handle_t window; /* window to send the message to */
1168 unsigned int msg; /* message to send */
1172 /* Get socket event parameters */
1173 @REQ(get_socket_event)
1174 obj_handle_t handle; /* handle to the socket */
1175 int service; /* clear pending? */
1176 obj_handle_t c_event; /* event to clear */
1178 unsigned int mask; /* event mask */
1179 unsigned int pmask; /* pending events */
1180 unsigned int state; /* status bits */
1181 VARARG(errors,ints); /* event errors */
1185 /* Re-enable pending socket events */
1186 @REQ(enable_socket_event)
1187 obj_handle_t handle; /* handle to the socket */
1188 unsigned int mask; /* events to re-enable */
1189 unsigned int sstate; /* status bits to set */
1190 unsigned int cstate; /* status bits to clear */
1193 @REQ(set_socket_deferred)
1194 obj_handle_t handle; /* handle to the socket */
1195 obj_handle_t deferred; /* handle to the socket for which accept() is deferred */
1198 /* Allocate a console (only used by a console renderer) */
1200 unsigned int access; /* wanted access rights */
1201 unsigned int attributes; /* object attributes */
1202 process_id_t pid; /* pid of process which shall be attached to the console */
1203 int input_fd; /* if pid=-1 (bare console to current process), fd for input */
1205 obj_handle_t handle_in; /* handle to console input */
1206 obj_handle_t event; /* handle to renderer events change notification */
1210 /* Free the console of the current process */
1215 #define CONSOLE_RENDERER_NONE_EVENT 0x00
1216 #define CONSOLE_RENDERER_TITLE_EVENT 0x01
1217 #define CONSOLE_RENDERER_ACTIVE_SB_EVENT 0x02
1218 #define CONSOLE_RENDERER_SB_RESIZE_EVENT 0x03
1219 #define CONSOLE_RENDERER_UPDATE_EVENT 0x04
1220 #define CONSOLE_RENDERER_CURSOR_POS_EVENT 0x05
1221 #define CONSOLE_RENDERER_CURSOR_GEOM_EVENT 0x06
1222 #define CONSOLE_RENDERER_DISPLAY_EVENT 0x07
1223 #define CONSOLE_RENDERER_EXIT_EVENT 0x08
1224 struct console_renderer_event
1259 /* retrieve console events for the renderer */
1260 @REQ(get_console_renderer_events)
1261 obj_handle_t handle; /* handle to console input events */
1263 VARARG(data,bytes); /* the various console_renderer_events */
1267 /* Open a handle to the process console */
1269 obj_handle_t from; /* 0 (resp 1) input (resp output) of current process console */
1270 /* otherwise console_in handle to get active screen buffer? */
1271 unsigned int access; /* wanted access rights */
1272 unsigned int attributes; /* object attributes */
1273 int share; /* share mask (only for output handles) */
1275 obj_handle_t handle; /* handle to the console */
1279 /* Get the input queue wait event */
1280 @REQ(get_console_wait_event)
1282 obj_handle_t handle;
1285 /* Get a console mode (input or output) */
1286 @REQ(get_console_mode)
1287 obj_handle_t handle; /* handle to the console */
1289 int mode; /* console mode */
1293 /* Set a console mode (input or output) */
1294 @REQ(set_console_mode)
1295 obj_handle_t handle; /* handle to the console */
1296 int mode; /* console mode */
1300 /* Set info about a console (input only) */
1301 @REQ(set_console_input_info)
1302 obj_handle_t handle; /* handle to console input, or 0 for process' console
*/
1303 int mask
; /* setting
mask (see below
) */
1304 obj_handle_t active_sb
; /* active screen buffer
*/
1305 int history_mode
; /* whether we duplicate lines in history
*/
1306 int history_size
; /* number of lines in history
*/
1307 int edition_mode
; /* index to the edition mode flavors
*/
1308 int input_cp
; /* console input codepage
*/
1309 int output_cp
; /* console output codepage
*/
1310 user_handle_t win
; /* console window if backend supports it
*/
1311 VARARG(title
,unicode_str
); /* console title
*/
1313 #define SET_CONSOLE_INPUT_INFO_ACTIVE_SB
0x01
1314 #define SET_CONSOLE_INPUT_INFO_TITLE
0x02
1315 #define SET_CONSOLE_INPUT_INFO_HISTORY_MODE
0x04
1316 #define SET_CONSOLE_INPUT_INFO_HISTORY_SIZE
0x08
1317 #define SET_CONSOLE_INPUT_INFO_EDITION_MODE
0x10
1318 #define SET_CONSOLE_INPUT_INFO_INPUT_CODEPAGE
0x20
1319 #define SET_CONSOLE_INPUT_INFO_OUTPUT_CODEPAGE
0x40
1320 #define SET_CONSOLE_INPUT_INFO_WIN
0x80
1323 /* Get info about a
console (input only
) */
1324 @
REQ(get_console_input_info
)
1325 obj_handle_t handle
; /* handle to console input
, or
0 for process
' console */
1327 int history_mode; /* whether we duplicate lines in history */
1328 int history_size; /* number of lines in history */
1329 int history_index; /* number of used lines in history */
1330 int edition_mode; /* index to the edition mode flavors */
1331 int input_cp; /* console input codepage */
1332 int output_cp; /* console output codepage */
1333 user_handle_t win; /* console window if backend supports it */
1334 VARARG(title,unicode_str); /* console title */
1338 /* appends a string to console's history
*/
1339 @
REQ(append_console_input_history
)
1340 obj_handle_t handle
; /* handle to console input
, or
0 for process
' console */
1341 VARARG(line,unicode_str); /* line to add */
1345 /* appends a string to console's history
*/
1346 @
REQ(get_console_input_history
)
1347 obj_handle_t handle
; /* handle to console input
, or
0 for process
' console */
1348 int index; /* index to get line from */
1350 int total; /* total length of line in Unicode chars */
1351 VARARG(line,unicode_str); /* line to add */
1355 /* creates a new screen buffer on process' console
*/
1356 @
REQ(create_console_output
)
1357 obj_handle_t handle_in
; /* handle to console input
, or
0 for process
' console */
1358 unsigned int access; /* wanted access rights */
1359 unsigned int attributes; /* object attributes */
1360 unsigned int share; /* sharing credentials */
1361 int fd; /* for bare consoles, fd the screen-buffer is attached to */
1363 obj_handle_t handle_out; /* handle to the screen buffer */
1367 /* Set info about a console (output only) */
1368 @REQ(set_console_output_info)
1369 obj_handle_t handle; /* handle to the console */
1370 int mask; /* setting mask (see below) */
1371 short int cursor_size; /* size of cursor (percentage filled) */
1372 short int cursor_visible;/* cursor visibility flag */
1373 short int cursor_x; /* position of cursor (x, y) */
1375 short int width; /* width of the screen buffer */
1376 short int height; /* height of the screen buffer */
1377 short int attr; /* default attribute */
1378 short int win_left; /* window actually displayed by renderer */
1379 short int win_top; /* the rect area is expressed within the */
1380 short int win_right; /* boundaries of the screen buffer */
1381 short int win_bottom;
1382 short int max_width; /* maximum size (width x height) for the window */
1383 short int max_height;
1385 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_GEOM 0x01
1386 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_POS 0x02
1387 #define SET_CONSOLE_OUTPUT_INFO_SIZE 0x04
1388 #define SET_CONSOLE_OUTPUT_INFO_ATTR 0x08
1389 #define SET_CONSOLE_OUTPUT_INFO_DISPLAY_WINDOW 0x10
1390 #define SET_CONSOLE_OUTPUT_INFO_MAX_SIZE 0x20
1393 /* Get info about a console (output only) */
1394 @REQ(get_console_output_info)
1395 obj_handle_t handle; /* handle to the console */
1397 short int cursor_size; /* size of cursor (percentage filled) */
1398 short int cursor_visible;/* cursor visibility flag */
1399 short int cursor_x; /* position of cursor (x, y) */
1401 short int width; /* width of the screen buffer */
1402 short int height; /* height of the screen buffer */
1403 short int attr; /* default attribute */
1404 short int win_left; /* window actually displayed by renderer */
1405 short int win_top; /* the rect area is expressed within the */
1406 short int win_right; /* boundaries of the screen buffer */
1407 short int win_bottom;
1408 short int max_width; /* maximum size (width x height) for the window */
1409 short int max_height;
1412 /* Add input records to a console input queue */
1413 @REQ(write_console_input)
1414 obj_handle_t handle; /* handle to the console input */
1415 VARARG(rec,input_records); /* input records */
1417 int written; /* number of records written */
1421 /* Fetch input records from a console input queue */
1422 @REQ(read_console_input)
1423 obj_handle_t handle; /* handle to the console input */
1424 int flush; /* flush the retrieved records from the queue? */
1426 int read; /* number of records read */
1427 VARARG(rec,input_records); /* input records */
1431 /* write data (chars and/or attributes) in a screen buffer */
1432 @REQ(write_console_output)
1433 obj_handle_t handle; /* handle to the console output */
1434 int x; /* position where to start writing */
1436 int mode; /* char info (see below) */
1437 int wrap; /* wrap around at end of line? */
1438 VARARG(data,bytes); /* info to write */
1440 int written; /* number of char infos actually written */
1441 int width; /* width of screen buffer */
1442 int height; /* height of screen buffer */
1446 CHAR_INFO_MODE_TEXT, /* characters only */
1447 CHAR_INFO_MODE_ATTR, /* attributes only */
1448 CHAR_INFO_MODE_TEXTATTR, /* both characters and attributes */
1449 CHAR_INFO_MODE_TEXTSTDATTR /* characters but use standard attributes */
1453 /* fill a screen buffer with constant data (chars and/or attributes) */
1454 @REQ(fill_console_output)
1455 obj_handle_t handle; /* handle to the console output */
1456 int x; /* position where to start writing */
1458 int mode; /* char info mode */
1459 int count; /* number to write */
1460 int wrap; /* wrap around at end of line? */
1461 char_info_t data; /* data to write */
1463 int written; /* number of char infos actually written */
1467 /* read data (chars and/or attributes) from a screen buffer */
1468 @REQ(read_console_output)
1469 obj_handle_t handle; /* handle to the console output */
1470 int x; /* position (x,y) where to start reading */
1472 int mode; /* char info mode */
1473 int wrap; /* wrap around at end of line? */
1475 int width; /* width of screen buffer */
1476 int height; /* height of screen buffer */
1481 /* move a rect (of data) in screen buffer content */
1482 @REQ(move_console_output)
1483 obj_handle_t handle; /* handle to the console output */
1484 short int x_src; /* position (x, y) of rect to start moving from */
1486 short int x_dst; /* position (x, y) of rect to move to */
1488 short int w; /* size of the rect (width, height) to move */
1493 /* Sends a signal to a process group */
1494 @REQ(send_console_signal)
1495 int signal; /* the signal to send */
1496 process_id_t group_id; /* the group to send the signal to */
1500 /* enable directory change notifications */
1501 @REQ(read_directory_changes)
1502 unsigned int filter; /* notification filter */
1503 int subtree; /* watch the subtree? */
1504 int want_data; /* flag indicating whether change data should be collected */
1505 async_data_t async; /* async I/O parameters */
1510 obj_handle_t handle;
1512 VARARG(events,filesystem_event); /* collected filesystem events */
1516 /* Create a file mapping */
1517 @REQ(create_mapping)
1518 unsigned int access; /* wanted access rights */
1519 unsigned int attributes; /* object attributes */
1520 unsigned int protect; /* protection flags (see below) */
1521 mem_size_t size; /* mapping size */
1522 obj_handle_t file_handle; /* file handle */
1523 VARARG(objattr,object_attributes); /* object attributes */
1525 obj_handle_t handle; /* handle to the mapping */
1527 /* per-page protection flags */
1528 #define VPROT_READ 0x01
1529 #define VPROT_WRITE 0x02
1530 #define VPROT_EXEC 0x04
1531 #define VPROT_WRITECOPY 0x08
1532 #define VPROT_GUARD 0x10
1533 #define VPROT_NOCACHE 0x20
1534 #define VPROT_COMMITTED 0x40
1535 #define VPROT_WRITEWATCH 0x80
1536 /* per-mapping protection flags */
1537 #define VPROT_IMAGE 0x0100 /* mapping for an exe image */
1538 #define VPROT_SYSTEM 0x0200 /* system view (underlying mmap not under our control) */
1539 #define VPROT_VALLOC 0x0400 /* allocated by VirtualAlloc */
1540 #define VPROT_NOEXEC 0x0800 /* don't force exec permission
*/
1543 /* Open a mapping
*/
1545 unsigned int access
; /* wanted access rights
*/
1546 unsigned int attributes
; /* object attributes
*/
1547 obj_handle_t rootdir
; /* root directory
*/
1548 VARARG(name
,unicode_str
); /* object name
*/
1550 obj_handle_t handle
; /* handle to the mapping
*/
1554 /* Get information about a file mapping
*/
1555 @
REQ(get_mapping_info
)
1556 obj_handle_t handle
; /* handle to the mapping
*/
1557 unsigned int access
; /* wanted access rights
*/
1559 mem_size_t size
; /* mapping size
*/
1560 int protect
; /* protection flags
*/
1561 int header_size
; /* header
size (for VPROT_IMAGE mapping
) */
1562 client_ptr_t base
; /* default base
addr (for VPROT_IMAGE mapping
) */
1563 obj_handle_t mapping
; /* duplicate mapping handle unless removable
*/
1564 obj_handle_t shared_file
; /* shared mapping file handle
*/
1568 /* Get a range of committed pages in a file mapping
*/
1569 @
REQ(get_mapping_committed_range
)
1570 obj_handle_t handle
; /* handle to the mapping
*/
1571 file_pos_t offset
; /* starting
offset (page
-aligned
, in bytes
) */
1573 mem_size_t size
; /* size of range starting at
offset (page
-aligned
, in bytes
) */
1574 int committed
; /* whether it is a committed range
*/
1578 /* Add a range to the committed pages in a file mapping
*/
1579 @
REQ(add_mapping_committed_range
)
1580 obj_handle_t handle
; /* handle to the mapping
*/
1581 file_pos_t offset
; /* starting
offset (page
-aligned
, in bytes
) */
1582 mem_size_t size
; /* size to
set (page
-aligned
, in bytes
) or
0 if only retrieving
*/
1586 #define SNAP_PROCESS
0x00000001
1587 #define SNAP_THREAD
0x00000002
1588 /* Create a snapshot
*/
1589 @
REQ(create_snapshot
)
1590 unsigned int attributes
; /* object attributes
*/
1591 unsigned int flags
; /* snapshot
flags (SNAP_*)
*/
1593 obj_handle_t handle
; /* handle to the snapshot
*/
1597 /* Get the next process from a snapshot
*/
1599 obj_handle_t handle
; /* handle to the snapshot
*/
1600 int reset
; /* reset snapshot position?
*/
1602 int count
; /* process usage count
*/
1603 process_id_t pid
; /* process id
*/
1604 process_id_t ppid
; /* parent process id
*/
1605 int threads
; /* number of threads
*/
1606 int priority
; /* process priority
*/
1607 int handles
; /* number of handles
*/
1608 int unix_pid
; /* Unix pid
*/
1609 VARARG(filename
,unicode_str
); /* file name of main exe
*/
1613 /* Get the next thread from a snapshot
*/
1615 obj_handle_t handle
; /* handle to the snapshot
*/
1616 int reset
; /* reset snapshot position?
*/
1618 int count
; /* thread usage count
*/
1619 process_id_t pid
; /* process id
*/
1620 thread_id_t tid
; /* thread id
*/
1621 int base_pri
; /* base priority
*/
1622 int delta_pri
; /* delta priority
*/
1626 /* Wait for a debug event
*/
1627 @
REQ(wait_debug_event
)
1628 int get_handle
; /* should we alloc a handle for waiting?
*/
1630 process_id_t pid
; /* process id
*/
1631 thread_id_t tid
; /* thread id
*/
1632 obj_handle_t wait
; /* wait handle if no event ready
*/
1633 VARARG(event
,debug_event
); /* debug event data
*/
1637 /* Queue an exception event
*/
1638 @
REQ(queue_exception_event
)
1639 int first
; /* first chance exception?
*/
1640 unsigned int code
; /* exception code
*/
1641 unsigned int flags
; /* exception flags
*/
1642 client_ptr_t record
; /* exception record
*/
1643 client_ptr_t address
; /* exception address
*/
1644 data_size_t len
; /* size of parameters
*/
1645 VARARG(params
,uints64
,len
);/* exception parameters
*/
1646 VARARG(context
,context
); /* thread context
*/
1648 obj_handle_t handle
; /* handle to the queued event
*/
1652 /* Retrieve the status of an exception event
*/
1653 @
REQ(get_exception_status
)
1654 obj_handle_t handle
; /* handle to the queued event
*/
1656 VARARG(context
,context
); /* modified thread context
*/
1660 /* Send an output string to the debugger
*/
1661 @
REQ(output_debug_string
)
1662 data_size_t length
; /* string length
*/
1663 client_ptr_t string
; /* string to
display (in debugged process address space
) */
1667 /* Continue a debug event
*/
1668 @
REQ(continue_debug_event
)
1669 process_id_t pid
; /* process id to continue
*/
1670 thread_id_t tid
; /* thread id to continue
*/
1671 int status
; /* continuation status
*/
1675 /* Start
/stop debugging an existing process
*/
1677 process_id_t pid
; /* id of the process to debug
*/
1678 int attach
; /* 1=attaching
/ 0=detaching from the process
*/
1682 /* Simulate a breakpoint in a process
*/
1684 obj_handle_t handle
; /* process handle
*/
1686 int self
; /* was it the caller itself?
*/
1690 /* Set debugger kill on exit flag
*/
1691 @
REQ(set_debugger_kill_on_exit
)
1692 int kill_on_exit
; /* 0=detach
/1=kill debuggee when debugger dies
*/
1696 /* Read data from a process address space
*/
1697 @
REQ(read_process_memory
)
1698 obj_handle_t handle
; /* process handle
*/
1699 client_ptr_t addr
; /* addr to read from
*/
1701 VARARG(data
,bytes
); /* result data
*/
1705 /* Write data to a process address space
*/
1706 @
REQ(write_process_memory
)
1707 obj_handle_t handle
; /* process handle
*/
1708 client_ptr_t addr
; /* addr to write to
*/
1709 VARARG(data
,bytes
); /* data to write
*/
1713 /* Create a registry key
*/
1715 obj_handle_t parent
; /* handle to the parent key
*/
1716 unsigned int access
; /* desired access rights
*/
1717 unsigned int attributes
; /* object attributes
*/
1718 unsigned int options
; /* creation options
*/
1719 data_size_t namelen
; /* length of key name in bytes
*/
1720 VARARG(name
,unicode_str
,namelen
); /* key name
*/
1721 VARARG(class
,unicode_str
); /* class name
*/
1723 obj_handle_t hkey
; /* handle to the created key
*/
1724 int created
; /* has it been newly created?
*/
1727 /* Open a registry key
*/
1729 obj_handle_t parent
; /* handle to the parent key
*/
1730 unsigned int access
; /* desired access rights
*/
1731 unsigned int attributes
; /* object attributes
*/
1732 VARARG(name
,unicode_str
); /* key name
*/
1734 obj_handle_t hkey
; /* handle to the open key
*/
1738 /* Delete a registry key
*/
1740 obj_handle_t hkey
; /* handle to the key
*/
1744 /* Flush a registry key
*/
1746 obj_handle_t hkey
; /* handle to the key
*/
1750 /* Enumerate registry subkeys
*/
1752 obj_handle_t hkey
; /* handle to registry key
*/
1753 int index
; /* index of
subkey (or
-1 for current key
) */
1754 int info_class
; /* requested information class
*/
1756 int subkeys
; /* number of subkeys
*/
1757 int max_subkey
; /* longest subkey name
*/
1758 int max_class
; /* longest class name
*/
1759 int values
; /* number of values
*/
1760 int max_value
; /* longest value name
*/
1761 int max_data
; /* longest value data
*/
1762 timeout_t modif
; /* last modification time
*/
1763 data_size_t total
; /* total length needed for full name and class
*/
1764 data_size_t namelen
; /* length of key name in bytes
*/
1765 VARARG(name
,unicode_str
,namelen
); /* key name
*/
1766 VARARG(class
,unicode_str
); /* class name
*/
1770 /* Set a value of a registry key
*/
1772 obj_handle_t hkey
; /* handle to registry key
*/
1773 int type
; /* value type
*/
1774 data_size_t namelen
; /* length of value name in bytes
*/
1775 VARARG(name
,unicode_str
,namelen
); /* value name
*/
1776 VARARG(data
,bytes
); /* value data
*/
1780 /* Retrieve the value of a registry key
*/
1782 obj_handle_t hkey
; /* handle to registry key
*/
1783 VARARG(name
,unicode_str
); /* value name
*/
1785 int type
; /* value type
*/
1786 data_size_t total
; /* total length needed for data
*/
1787 VARARG(data
,bytes
); /* value data
*/
1791 /* Enumerate a value of a registry key
*/
1792 @
REQ(enum_key_value
)
1793 obj_handle_t hkey
; /* handle to registry key
*/
1794 int index
; /* value index
*/
1795 int info_class
; /* requested information class
*/
1797 int type
; /* value type
*/
1798 data_size_t total
; /* total length needed for full name and data
*/
1799 data_size_t namelen
; /* length of value name in bytes
*/
1800 VARARG(name
,unicode_str
,namelen
); /* value name
*/
1801 VARARG(data
,bytes
); /* value data
*/
1805 /* Delete a value of a registry key
*/
1806 @
REQ(delete_key_value
)
1807 obj_handle_t hkey
; /* handle to registry key
*/
1808 VARARG(name
,unicode_str
); /* value name
*/
1812 /* Load a registry branch from a file
*/
1814 obj_handle_t hkey
; /* root key to load to
*/
1815 obj_handle_t file
; /* file to load from
*/
1816 VARARG(name
,unicode_str
); /* subkey name
*/
1820 /* UnLoad a registry branch from a file
*/
1821 @
REQ(unload_registry
)
1822 obj_handle_t hkey
; /* root key to unload to
*/
1826 /* Save a registry branch to a file
*/
1828 obj_handle_t hkey
; /* key to save
*/
1829 obj_handle_t file
; /* file to save to
*/
1833 /* Add a registry key change notification
*/
1834 @
REQ(set_registry_notification
)
1835 obj_handle_t hkey
; /* key to watch for changes
*/
1836 obj_handle_t event
; /* event to set
*/
1837 int subtree
; /* should we watch the whole subtree?
*/
1838 unsigned int filter
; /* things to watch
*/
1842 /* Create a waitable timer
*/
1844 unsigned int access
; /* wanted access rights
*/
1845 unsigned int attributes
; /* object attributes
*/
1846 obj_handle_t rootdir
; /* root directory
*/
1847 int manual
; /* manual reset
*/
1848 VARARG(name
,unicode_str
); /* object name
*/
1850 obj_handle_t handle
; /* handle to the timer
*/
1854 /* Open a waitable timer
*/
1856 unsigned int access
; /* wanted access rights
*/
1857 unsigned int attributes
; /* object attributes
*/
1858 obj_handle_t rootdir
; /* root directory
*/
1859 VARARG(name
,unicode_str
); /* object name
*/
1861 obj_handle_t handle
; /* handle to the timer
*/
1864 /* Set a waitable timer
*/
1866 obj_handle_t handle
; /* handle to the timer
*/
1867 timeout_t expire
; /* next expiration absolute time
*/
1868 client_ptr_t callback
; /* callback function
*/
1869 client_ptr_t arg
; /* callback argument
*/
1870 int period
; /* timer period in ms
*/
1872 int signaled
; /* was the timer signaled before this call ?
*/
1875 /* Cancel a waitable timer
*/
1877 obj_handle_t handle
; /* handle to the timer
*/
1879 int signaled
; /* was the timer signaled before this calltime ?
*/
1882 /* Get information on a waitable timer
*/
1883 @
REQ(get_timer_info
)
1884 obj_handle_t handle
; /* handle to the timer
*/
1886 timeout_t when
; /* absolute time when the timer next expires
*/
1887 int signaled
; /* is the timer signaled?
*/
1891 /* Retrieve the current context of a thread
*/
1892 @
REQ(get_thread_context
)
1893 obj_handle_t handle
; /* thread handle
*/
1894 unsigned int flags
; /* context flags
*/
1895 int suspend
; /* suspend the thread if needed
*/
1897 int self
; /* was it a handle to the current thread?
*/
1898 VARARG(context
,context
); /* thread context
*/
1902 /* Set the current context of a thread
*/
1903 @
REQ(set_thread_context
)
1904 obj_handle_t handle
; /* thread handle
*/
1905 int suspend
; /* suspend the thread if needed
*/
1906 VARARG(context
,context
); /* thread context
*/
1908 int self
; /* was it a handle to the current thread?
*/
1912 /* Fetch a selector entry for a thread
*/
1913 @
REQ(get_selector_entry
)
1914 obj_handle_t handle
; /* thread handle
*/
1915 int entry
; /* LDT entry
*/
1917 unsigned int base
; /* selector base
*/
1918 unsigned int limit
; /* selector limit
*/
1919 unsigned char flags
; /* selector flags
*/
1925 obj_handle_t table
; /* which table to add atom to
*/
1926 VARARG(name
,unicode_str
); /* atom name
*/
1928 atom_t atom
; /* resulting atom
*/
1932 /* Delete an atom
*/
1934 obj_handle_t table
; /* which table to delete atom from
*/
1935 atom_t atom
; /* atom handle
*/
1941 obj_handle_t table
; /* which table to find atom from
*/
1942 VARARG(name
,unicode_str
); /* atom name
*/
1944 atom_t atom
; /* atom handle
*/
1948 /* Get information about an atom
*/
1949 @
REQ(get_atom_information
)
1950 obj_handle_t table
; /* which table to find atom from
*/
1951 atom_t atom
; /* atom handle
*/
1953 int count
; /* atom lock count
*/
1954 int pinned
; /* whether the atom has been pinned
*/
1955 data_size_t total
; /* actual length of atom name
*/
1956 VARARG(name
,unicode_str
); /* atom name
*/
1960 /* Set information about an atom
*/
1961 @
REQ(set_atom_information
)
1962 obj_handle_t table
; /* which table to find atom from
*/
1963 atom_t atom
; /* atom handle
*/
1964 int pinned
; /* whether to bump atom information
*/
1968 /* Empty an atom table
*/
1969 @
REQ(empty_atom_table
)
1970 obj_handle_t table
; /* which table to find atom from
*/
1971 int if_pinned
; /* whether to delete pinned atoms
*/
1975 /* Init an atom table
*/
1976 @
REQ(init_atom_table
)
1977 int entries
; /* number of
entries (only for local
) */
1979 obj_handle_t table
; /* handle to the atom table
*/
1983 /* Get the message queue of the current thread
*/
1986 obj_handle_t handle
; /* handle to the queue
*/
1990 /* Set the file descriptor associated to the current thread queue
*/
1992 obj_handle_t handle
; /* handle to the file descriptor
*/
1996 /* Set the current message queue wakeup mask
*/
1997 @
REQ(set_queue_mask
)
1998 unsigned int wake_mask
; /* wakeup bits mask
*/
1999 unsigned int changed_mask
; /* changed bits mask
*/
2000 int skip_wait
; /* will we skip waiting if signaled?
*/
2002 unsigned int wake_bits
; /* current wake bits
*/
2003 unsigned int changed_bits
; /* current changed bits
*/
2007 /* Get the current message queue status
*/
2008 @
REQ(get_queue_status
)
2009 int clear
; /* should we clear the change bits?
*/
2011 unsigned int wake_bits
; /* wake bits
*/
2012 unsigned int changed_bits
; /* changed bits since last time
*/
2016 /* Retrieve the process idle event
*/
2017 @
REQ(get_process_idle_event
)
2018 obj_handle_t handle
; /* process handle
*/
2020 obj_handle_t event
; /* handle to idle event
*/
2024 /* Send a message to a thread queue
*/
2026 thread_id_t id
; /* thread id
*/
2027 int type
; /* message
type (see below
) */
2028 int flags
; /* message
flags (see below
) */
2029 user_handle_t win
; /* window handle
*/
2030 unsigned int msg
; /* message code
*/
2031 lparam_t wparam
; /* parameters
*/
2032 lparam_t lparam
; /* parameters
*/
2033 timeout_t timeout
; /* timeout for reply
*/
2034 VARARG(data
,message_data
); /* message data for sent messages
*/
2037 @
REQ(post_quit_message
)
2038 int exit_code
; /* exit code to return
*/
2043 MSG_ASCII
, /* Ascii
message (from SendMessageA
) */
2044 MSG_UNICODE
, /* Unicode
message (from SendMessageW
) */
2045 MSG_NOTIFY
, /* notify
message (from SendNotifyMessageW
), always Unicode
*/
2046 MSG_CALLBACK
, /* callback
message (from SendMessageCallbackW
), always Unicode
*/
2047 MSG_CALLBACK_RESULT
,/* result of a callback message
*/
2048 MSG_OTHER_PROCESS
, /* sent from other process
, may include vararg data
, always Unicode
*/
2049 MSG_POSTED
, /* posted
message (from PostMessageW
), always Unicode
*/
2050 MSG_HARDWARE
, /* hardware message
*/
2051 MSG_WINEVENT
, /* winevent message
*/
2052 MSG_HOOK_LL
/* low
-level hardware hook
*/
2054 #define SEND_MSG_ABORT_IF_HUNG
0x01
2057 /* Send a hardware message to a thread queue
*/
2058 @
REQ(send_hardware_message
)
2059 user_handle_t win
; /* window handle
*/
2060 hw_input_t input
; /* input data
*/
2061 unsigned int flags
; /* flags (see below
) */
2063 int wait
; /* do we need to wait for a reply?
*/
2064 int prev_x
; /* previous cursor position
*/
2066 int new_x
; /* new cursor position
*/
2068 VARARG(keystate
,bytes
); /* global state array for all the keys
*/
2070 #define SEND_HWMSG_INJECTED
0x01
2073 /* Get a message from the current queue
*/
2075 unsigned int flags
; /* PM_
* flags
*/
2076 user_handle_t get_win
; /* window handle to get
*/
2077 unsigned int get_first
; /* first message code to get
*/
2078 unsigned int get_last
; /* last message code to get
*/
2079 unsigned int hw_id
; /* id of the previous hardware
message (or
0) */
2080 unsigned int wake_mask
; /* wakeup bits mask
*/
2081 unsigned int changed_mask
; /* changed bits mask
*/
2083 user_handle_t win
; /* window handle
*/
2084 unsigned int msg
; /* message code
*/
2085 lparam_t wparam
; /* parameters
*/
2086 lparam_t lparam
; /* parameters
*/
2087 int type
; /* message type
*/
2088 unsigned int time
; /* message time
*/
2089 unsigned int active_hooks
; /* active hooks bitmap
*/
2090 data_size_t total
; /* total size of extra data
*/
2091 VARARG(data
,message_data
); /* message data for sent messages
*/
2095 /* Reply to a sent message
*/
2097 int remove
; /* should we remove the message?
*/
2098 lparam_t result
; /* message result
*/
2099 VARARG(data
,bytes
); /* message data for sent messages
*/
2103 /* Accept the current hardware message
*/
2104 @
REQ(accept_hardware_message
)
2105 unsigned int hw_id
; /* id of the hardware message
*/
2106 int remove
; /* should we remove the message?
*/
2107 user_handle_t new_win
; /* new destination window for current message
*/
2111 /* Retrieve the reply for the last message sent
*/
2112 @
REQ(get_message_reply
)
2113 int cancel
; /* cancel message if not ready?
*/
2115 lparam_t result
; /* message result
*/
2116 VARARG(data
,bytes
); /* message data for sent messages
*/
2120 /* Set a window timer
*/
2122 user_handle_t win
; /* window handle
*/
2123 unsigned int msg
; /* message to post
*/
2124 unsigned int rate
; /* timer rate in ms
*/
2125 lparam_t id
; /* timer id
*/
2126 lparam_t lparam
; /* message
lparam (callback proc
) */
2128 lparam_t id
; /* timer id
*/
2132 /* Kill a window timer
*/
2133 @
REQ(kill_win_timer
)
2134 user_handle_t win
; /* window handle
*/
2135 lparam_t id
; /* timer id
*/
2136 unsigned int msg
; /* message to post
*/
2140 /* check if the thread owning the window is hung
*/
2141 @
REQ(is_window_hung
)
2142 user_handle_t win
; /* window handle
*/
2148 /* Retrieve info about a serial port
*/
2149 @
REQ(get_serial_info
)
2150 obj_handle_t handle
; /* handle to comm port
*/
2152 unsigned int readinterval
;
2153 unsigned int readconst
;
2154 unsigned int readmult
;
2155 unsigned int writeconst
;
2156 unsigned int writemult
;
2157 unsigned int eventmask
;
2161 /* Set info about a serial port
*/
2162 @
REQ(set_serial_info
)
2163 obj_handle_t handle
; /* handle to comm port
*/
2164 int flags
; /* bitmask to set
values (see below
) */
2165 unsigned int readinterval
;
2166 unsigned int readconst
;
2167 unsigned int readmult
;
2168 unsigned int writeconst
;
2169 unsigned int writemult
;
2170 unsigned int eventmask
;
2172 #define SERIALINFO_SET_TIMEOUTS
0x01
2173 #define SERIALINFO_SET_MASK
0x02
2176 /* Create an async I
/O
*/
2177 @
REQ(register_async
)
2178 int type
; /* type of queue to look after
*/
2179 async_data_t async
; /* async I
/O parameters
*/
2180 int count
; /* count
- usually # of bytes to be read
/written
*/
2182 #define ASYNC_TYPE_READ
0x01
2183 #define ASYNC_TYPE_WRITE
0x02
2184 #define ASYNC_TYPE_WAIT
0x03
2187 /* Cancel all async op on a fd
*/
2189 obj_handle_t handle
; /* handle to comm port
, socket or file
*/
2190 client_ptr_t iosb
; /* I
/O status
block (NULL
=all
) */
2191 int only_thread
; /* cancel matching this thread
*/
2195 /* Perform an ioctl on a file
*/
2197 ioctl_code_t code
; /* ioctl code
*/
2198 async_data_t async
; /* async I
/O parameters
*/
2199 int blocking
; /* whether it
's a blocking ioctl */
2200 VARARG(in_data,bytes); /* ioctl input data */
2202 obj_handle_t wait; /* handle to wait on for blocking ioctl */
2203 unsigned int options; /* device open options */
2204 VARARG(out_data,bytes); /* ioctl output data */
2208 /* Retrieve results of an async ioctl */
2209 @REQ(get_ioctl_result)
2210 obj_handle_t handle; /* handle to the device */
2211 client_ptr_t user_arg; /* user arg used to identify the request */
2213 VARARG(out_data,bytes); /* ioctl output data */
2217 /* Create a named pipe */
2218 @REQ(create_named_pipe)
2219 unsigned int access;
2220 unsigned int attributes; /* object attributes */
2221 obj_handle_t rootdir; /* root directory */
2222 unsigned int options;
2223 unsigned int sharing;
2224 unsigned int maxinstances;
2225 unsigned int outsize;
2226 unsigned int insize;
2229 VARARG(name,unicode_str); /* pipe name */
2231 obj_handle_t handle; /* handle to the pipe */
2234 /* flags in create_named_pipe and get_named_pipe_info */
2235 #define NAMED_PIPE_MESSAGE_STREAM_WRITE 0x0001
2236 #define NAMED_PIPE_MESSAGE_STREAM_READ 0x0002
2237 #define NAMED_PIPE_NONBLOCKING_MODE 0x0004
2238 #define NAMED_PIPE_SERVER_END 0x8000
2241 @REQ(get_named_pipe_info)
2242 obj_handle_t handle;
2245 unsigned int sharing;
2246 unsigned int maxinstances;
2247 unsigned int instances;
2248 unsigned int outsize;
2249 unsigned int insize;
2253 /* Create a window */
2255 user_handle_t parent; /* parent window */
2256 user_handle_t owner; /* owner window */
2257 atom_t atom; /* class atom */
2258 mod_handle_t instance; /* module instance */
2259 VARARG(class,unicode_str); /* class name */
2261 user_handle_t handle; /* created window */
2262 user_handle_t parent; /* full handle of parent */
2263 user_handle_t owner; /* full handle of owner */
2264 int extra; /* number of extra bytes */
2265 client_ptr_t class_ptr; /* pointer to class in client address space */
2269 /* Destroy a window */
2270 @REQ(destroy_window)
2271 user_handle_t handle; /* handle to the window */
2275 /* Retrieve the desktop window for the current thread */
2276 @REQ(get_desktop_window)
2277 int force; /* force creation if it doesn't exist
*/
2279 user_handle_t top_window
; /* handle to the desktop window
*/
2280 user_handle_t msg_window
; /* handle to the top
-level HWND_MESSAGE parent
*/
2284 /* Set a window owner
*/
2285 @
REQ(set_window_owner
)
2286 user_handle_t handle
; /* handle to the window
*/
2287 user_handle_t owner
; /* new owner
*/
2289 user_handle_t full_owner
; /* full handle of new owner
*/
2290 user_handle_t prev_owner
; /* full handle of previous owner
*/
2294 /* Get information from a window handle
*/
2295 @
REQ(get_window_info
)
2296 user_handle_t handle
; /* handle to the window
*/
2298 user_handle_t full_handle
; /* full
32-bit handle
*/
2299 user_handle_t last_active
; /* last active popup
*/
2300 process_id_t pid
; /* process owning the window
*/
2301 thread_id_t tid
; /* thread owning the window
*/
2302 atom_t atom
; /* class atom
*/
2303 int is_unicode
; /* ANSI or unicode
*/
2307 /* Set some information in a window
*/
2308 @
REQ(set_window_info
)
2309 unsigned short flags
; /* flags for fields to
set (see below
) */
2310 short int is_unicode
; /* ANSI or unicode
*/
2311 user_handle_t handle
; /* handle to the window
*/
2312 unsigned int style
; /* window style
*/
2313 unsigned int ex_style
; /* window extended style
*/
2314 unsigned int id
; /* window id
*/
2315 mod_handle_t instance
; /* creator instance
*/
2316 lparam_t user_data
; /* user
-specific data
*/
2317 int extra_offset
; /* offset to set in extra bytes
*/
2318 data_size_t extra_size
; /* size to set in extra bytes
*/
2319 lparam_t extra_value
; /* value to set in extra bytes
*/
2321 unsigned int old_style
; /* old window style
*/
2322 unsigned int old_ex_style
; /* old window extended style
*/
2323 mod_handle_t old_instance
; /* old creator instance
*/
2324 lparam_t old_user_data
; /* old user
-specific data
*/
2325 lparam_t old_extra_value
; /* old value in extra bytes
*/
2326 unsigned int old_id
; /* old window id
*/
2328 #define SET_WIN_STYLE
0x01
2329 #define SET_WIN_EXSTYLE
0x02
2330 #define SET_WIN_ID
0x04
2331 #define SET_WIN_INSTANCE
0x08
2332 #define SET_WIN_USERDATA
0x10
2333 #define SET_WIN_EXTRA
0x20
2334 #define SET_WIN_UNICODE
0x40
2337 /* Set the parent of a window
*/
2339 user_handle_t handle
; /* handle to the window
*/
2340 user_handle_t parent
; /* handle to the parent
*/
2342 user_handle_t old_parent
; /* old parent window
*/
2343 user_handle_t full_parent
; /* full handle of new parent
*/
2347 /* Get a list of the window parents
, up to the root of the tree
*/
2348 @
REQ(get_window_parents
)
2349 user_handle_t handle
; /* handle to the window
*/
2351 int count
; /* total count of parents
*/
2352 VARARG(parents
,user_handles
); /* parent handles
*/
2356 /* Get a list of the window children
*/
2357 @
REQ(get_window_children
)
2358 obj_handle_t desktop
; /* handle to desktop
*/
2359 user_handle_t parent
; /* parent window
*/
2360 atom_t atom
; /* class atom for the listed children
*/
2361 thread_id_t tid
; /* thread owning the listed children
*/
2362 VARARG(class
,unicode_str
); /* class name
*/
2364 int count
; /* total count of children
*/
2365 VARARG(children
,user_handles
); /* children handles
*/
2369 /* Get a list of the window children that contain a given point
*/
2370 @
REQ(get_window_children_from_point
)
2371 user_handle_t parent
; /* parent window
*/
2372 int x
; /* point in parent coordinates
*/
2375 int count
; /* total count of children
*/
2376 VARARG(children
,user_handles
); /* children handles
*/
2380 /* Get window tree information from a window handle
*/
2381 @
REQ(get_window_tree
)
2382 user_handle_t handle
; /* handle to the window
*/
2384 user_handle_t parent
; /* parent window
*/
2385 user_handle_t owner
; /* owner window
*/
2386 user_handle_t next_sibling
; /* next sibling in Z
-order
*/
2387 user_handle_t prev_sibling
; /* prev sibling in Z
-order
*/
2388 user_handle_t first_sibling
; /* first sibling in Z
-order
*/
2389 user_handle_t last_sibling
; /* last sibling in Z
-order
*/
2390 user_handle_t first_child
; /* first child
*/
2391 user_handle_t last_child
; /* last child
*/
2394 /* Set the position and Z order of a window
*/
2395 @
REQ(set_window_pos
)
2396 unsigned short swp_flags
; /* SWP_
* flags
*/
2397 unsigned short paint_flags
; /* paint
flags (see below
) */
2398 user_handle_t handle
; /* handle to the window
*/
2399 user_handle_t previous
; /* previous window in Z order
*/
2400 rectangle_t window
; /* window
rectangle (in parent coords
) */
2401 rectangle_t client
; /* client
rectangle (in parent coords
) */
2402 VARARG(valid
,rectangles
); /* valid rectangles from
WM_NCCALCSIZE (in parent coords
) */
2404 unsigned int new_style
; /* new window style
*/
2405 unsigned int new_ex_style
; /* new window extended style
*/
2406 user_handle_t surface_win
; /* window that needs a surface update
*/
2408 #define SET_WINPOS_PAINT_SURFACE
0x01 /* window has a paintable surface
*/
2409 #define SET_WINPOS_PIXEL_FORMAT
0x02 /* window has a custom pixel format
*/
2411 /* Get the window and client rectangles of a window
*/
2412 @
REQ(get_window_rectangles
)
2413 user_handle_t handle
; /* handle to the window
*/
2414 int relative
; /* coords relative
to (see below
) */
2416 rectangle_t window
; /* window rectangle
*/
2417 rectangle_t visible
; /* visible part of the window rectangle
*/
2418 rectangle_t client
; /* client rectangle
*/
2420 enum coords_relative
2422 COORDS_CLIENT
, /* relative to client area
*/
2423 COORDS_WINDOW
, /* relative to whole window area
*/
2424 COORDS_PARENT
, /* relative to parent
's client area */
2425 COORDS_SCREEN /* relative to screen origin */
2429 /* Get the window text */
2430 @REQ(get_window_text)
2431 user_handle_t handle; /* handle to the window */
2433 VARARG(text,unicode_str); /* window text */
2437 /* Set the window text */
2438 @REQ(set_window_text)
2439 user_handle_t handle; /* handle to the window */
2440 VARARG(text,unicode_str); /* window text */
2444 /* Get the coordinates offset between two windows */
2445 @REQ(get_windows_offset)
2446 user_handle_t from; /* handle to the first window */
2447 user_handle_t to; /* handle to the second window */
2449 int x; /* x coordinate offset */
2450 int y; /* y coordinate offset */
2451 int mirror; /* whether to mirror the x coordinate */
2455 /* Get the visible region of a window */
2456 @REQ(get_visible_region)
2457 user_handle_t window; /* handle to the window */
2458 unsigned int flags; /* DCX flags */
2460 user_handle_t top_win; /* top window to clip against */
2461 rectangle_t top_rect; /* top window visible rect with screen coords */
2462 rectangle_t win_rect; /* window rect in screen coords */
2463 unsigned int paint_flags; /* paint flags (from SET_WINPOS_* flags) */
2464 data_size_t total_size; /* total size of the resulting region */
2465 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2469 /* Get the visible surface region of a window */
2470 @REQ(get_surface_region)
2471 user_handle_t window; /* handle to the window */
2473 rectangle_t visible_rect; /* window visible rect in screen coords */
2474 data_size_t total_size; /* total size of the resulting region */
2475 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2479 /* Get the window region */
2480 @REQ(get_window_region)
2481 user_handle_t window; /* handle to the window */
2483 data_size_t total_size; /* total size of the resulting region */
2484 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2488 /* Set the window region */
2489 @REQ(set_window_region)
2490 user_handle_t window; /* handle to the window */
2491 int redraw; /* redraw the window? */
2492 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2496 /* Get the window update region */
2497 @REQ(get_update_region)
2498 user_handle_t window; /* handle to the window */
2499 user_handle_t from_child; /* child to start searching from */
2500 unsigned int flags; /* update flags (see below) */
2502 user_handle_t child; /* child to repaint (or window itself) */
2503 unsigned int flags; /* resulting update flags (see below) */
2504 data_size_t total_size; /* total size of the resulting region */
2505 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2507 #define UPDATE_NONCLIENT 0x01 /* get region for repainting non-client area */
2508 #define UPDATE_ERASE 0x02 /* get region for erasing client area */
2509 #define UPDATE_PAINT 0x04 /* get region for painting client area */
2510 #define UPDATE_INTERNALPAINT 0x08 /* get region if internal paint is pending */
2511 #define UPDATE_ALLCHILDREN 0x10 /* force repaint of all children */
2512 #define UPDATE_NOCHILDREN 0x20 /* don't try to repaint any children
*/
2513 #define UPDATE_NOREGION
0x40 /* don
't return a region, only the flags */
2514 #define UPDATE_DELAYED_ERASE 0x80 /* still needs erase after BeginPaint */
2517 /* Update the z order of a window so that a given rectangle is fully visible */
2518 @REQ(update_window_zorder)
2519 user_handle_t window; /* handle to the window */
2520 rectangle_t rect; /* rectangle that must be visible (in client coords) */
2524 /* Mark parts of a window as needing a redraw */
2526 user_handle_t window; /* handle to the window */
2527 unsigned int flags; /* RDW_* flags */
2528 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2532 /* Set a window property */
2533 @REQ(set_window_property)
2534 user_handle_t window; /* handle to the window */
2535 lparam_t data; /* data to store */
2536 atom_t atom; /* property atom (if no name specified) */
2537 VARARG(name,unicode_str); /* property name */
2541 /* Remove a window property */
2542 @REQ(remove_window_property)
2543 user_handle_t window; /* handle to the window */
2544 atom_t atom; /* property atom (if no name specified) */
2545 VARARG(name,unicode_str); /* property name */
2547 lparam_t data; /* data stored in property */
2551 /* Get a window property */
2552 @REQ(get_window_property)
2553 user_handle_t window; /* handle to the window */
2554 atom_t atom; /* property atom (if no name specified) */
2555 VARARG(name,unicode_str); /* property name */
2557 lparam_t data; /* data stored in property */
2561 /* Get the list of properties of a window */
2562 @REQ(get_window_properties)
2563 user_handle_t window; /* handle to the window */
2565 int total; /* total number of properties */
2566 VARARG(props,properties); /* list of properties */
2570 /* Create a window station */
2571 @REQ(create_winstation)
2572 unsigned int flags; /* window station flags */
2573 unsigned int access; /* wanted access rights */
2574 unsigned int attributes; /* object attributes */
2575 VARARG(name,unicode_str); /* object name */
2577 obj_handle_t handle; /* handle to the window station */
2581 /* Open a handle to a window station */
2582 @REQ(open_winstation)
2583 unsigned int access; /* wanted access rights */
2584 unsigned int attributes; /* object attributes */
2585 VARARG(name,unicode_str); /* object name */
2587 obj_handle_t handle; /* handle to the window station */
2591 /* Close a window station */
2592 @REQ(close_winstation)
2593 obj_handle_t handle; /* handle to the window station */
2597 /* Get the process current window station */
2598 @REQ(get_process_winstation)
2600 obj_handle_t handle; /* handle to the window station */
2604 /* Set the process current window station */
2605 @REQ(set_process_winstation)
2606 obj_handle_t handle; /* handle to the window station */
2610 /* Enumerate window stations */
2611 @REQ(enum_winstation)
2612 unsigned int index; /* current index */
2614 unsigned int next; /* next index */
2615 VARARG(name,unicode_str); /* window station name */
2619 /* Create a desktop */
2620 @REQ(create_desktop)
2621 unsigned int flags; /* desktop flags */
2622 unsigned int access; /* wanted access rights */
2623 unsigned int attributes; /* object attributes */
2624 VARARG(name,unicode_str); /* object name */
2626 obj_handle_t handle; /* handle to the desktop */
2630 /* Open a handle to a desktop */
2632 obj_handle_t winsta; /* window station to open (null allowed) */
2633 unsigned int flags; /* desktop flags */
2634 unsigned int access; /* wanted access rights */
2635 unsigned int attributes; /* object attributes */
2636 VARARG(name,unicode_str); /* object name */
2638 obj_handle_t handle; /* handle to the desktop */
2642 /* Close a desktop */
2644 obj_handle_t handle; /* handle to the desktop */
2648 /* Get the thread current desktop */
2649 @REQ(get_thread_desktop)
2650 thread_id_t tid; /* thread id */
2652 obj_handle_t handle; /* handle to the desktop */
2656 /* Set the thread current desktop */
2657 @REQ(set_thread_desktop)
2658 obj_handle_t handle; /* handle to the desktop */
2662 /* Enumerate desktops */
2664 obj_handle_t winstation; /* handle to the window station */
2665 unsigned int index; /* current index */
2667 unsigned int next; /* next index */
2668 VARARG(name,unicode_str); /* window station name */
2672 /* Get/set information about a user object (window station or desktop) */
2673 @REQ(set_user_object_info)
2674 obj_handle_t handle; /* handle to the object */
2675 unsigned int flags; /* information to set */
2676 unsigned int obj_flags; /* new object flags */
2678 int is_desktop; /* is object a desktop? */
2679 unsigned int old_obj_flags; /* old object flags */
2680 VARARG(name,unicode_str); /* object name */
2682 #define SET_USER_OBJECT_FLAGS 1
2685 /* Register a hotkey */
2686 @REQ(register_hotkey)
2687 user_handle_t window; /* handle to the window */
2688 int id; /* hotkey identifier */
2689 unsigned int flags; /* modifier keys */
2690 unsigned int vkey; /* virtual key code */
2692 int replaced; /* did we replace an existing hotkey? */
2693 unsigned int flags; /* flags of replaced hotkey */
2694 unsigned int vkey; /* virtual key code of replaced hotkey */
2698 /* Unregister a hotkey */
2699 @REQ(unregister_hotkey)
2700 user_handle_t window; /* handle to the window */
2701 int id; /* hotkey identifier */
2703 unsigned int flags; /* flags of removed hotkey */
2704 unsigned int vkey; /* virtual key code of removed hotkey */
2708 /* Attach (or detach) thread inputs */
2709 @REQ(attach_thread_input)
2710 thread_id_t tid_from; /* thread to be attached */
2711 thread_id_t tid_to; /* thread to which tid_from should be attached */
2712 int attach; /* is it an attach? */
2716 /* Get input data for a given thread */
2717 @REQ(get_thread_input)
2718 thread_id_t tid; /* id of thread */
2720 user_handle_t focus; /* handle to the focus window */
2721 user_handle_t capture; /* handle to the capture window */
2722 user_handle_t active; /* handle to the active window */
2723 user_handle_t foreground; /* handle to the global foreground window */
2724 user_handle_t menu_owner; /* handle to the menu owner */
2725 user_handle_t move_size; /* handle to the moving/resizing window */
2726 user_handle_t caret; /* handle to the caret window */
2727 user_handle_t cursor; /* handle to the cursor */
2728 int show_count; /* cursor show count */
2729 rectangle_t rect; /* caret rectangle */
2733 /* Get the time of the last input event */
2734 @REQ(get_last_input_time)
2740 /* Retrieve queue keyboard state for a given thread */
2742 thread_id_t tid; /* id of thread */
2743 int key; /* optional key code or -1 */
2745 unsigned char state; /* state of specified key */
2746 VARARG(keystate,bytes); /* state array for all the keys */
2749 /* Set queue keyboard state for a given thread */
2751 thread_id_t tid; /* id of thread */
2752 int async; /* whether to change the async state too */
2753 VARARG(keystate,bytes); /* state array for all the keys */
2756 /* Set the system foreground window */
2757 @REQ(set_foreground_window)
2758 user_handle_t handle; /* handle to the foreground window */
2760 user_handle_t previous; /* handle to the previous foreground window */
2761 int send_msg_old; /* whether we have to send a msg to the old window */
2762 int send_msg_new; /* whether we have to send a msg to the new window */
2765 /* Set the current thread focus window */
2766 @REQ(set_focus_window)
2767 user_handle_t handle; /* handle to the focus window */
2769 user_handle_t previous; /* handle to the previous focus window */
2772 /* Set the current thread active window */
2773 @REQ(set_active_window)
2774 user_handle_t handle; /* handle to the active window */
2776 user_handle_t previous; /* handle to the previous active window */
2779 /* Set the current thread capture window */
2780 @REQ(set_capture_window)
2781 user_handle_t handle; /* handle to the capture window */
2782 unsigned int flags; /* capture flags (see below) */
2784 user_handle_t previous; /* handle to the previous capture window */
2785 user_handle_t full_handle; /* full 32-bit handle of new capture window */
2787 #define CAPTURE_MENU 0x01 /* capture is for a menu */
2788 #define CAPTURE_MOVESIZE 0x02 /* capture is for moving/resizing */
2791 /* Set the current thread caret window */
2792 @REQ(set_caret_window)
2793 user_handle_t handle; /* handle to the caret window */
2794 int width; /* caret width */
2795 int height; /* caret height */
2797 user_handle_t previous; /* handle to the previous caret window */
2798 rectangle_t old_rect; /* previous caret rectangle */
2799 int old_hide; /* previous hide count */
2800 int old_state; /* previous caret state (1=on, 0=off) */
2804 /* Set the current thread caret information */
2805 @REQ(set_caret_info)
2806 unsigned int flags; /* caret flags (see below) */
2807 user_handle_t handle; /* handle to the caret window */
2808 int x; /* caret x position */
2809 int y; /* caret y position */
2810 int hide; /* increment for hide count (can be negative to show it) */
2811 int state; /* caret state (1=on, 0=off, -1=toggle current state) */
2813 user_handle_t full_handle; /* handle to the current caret window */
2814 rectangle_t old_rect; /* previous caret rectangle */
2815 int old_hide; /* previous hide count */
2816 int old_state; /* previous caret state (1=on, 0=off) */
2818 #define SET_CARET_POS 0x01 /* set the caret position from x,y */
2819 #define SET_CARET_HIDE 0x02 /* increment the caret hide count */
2820 #define SET_CARET_STATE 0x04 /* set the caret on/off state */
2823 /* Set a window hook */
2825 int id; /* id of the hook */
2826 process_id_t pid; /* id of process to set the hook into */
2827 thread_id_t tid; /* id of thread to set the hook into */
2830 client_ptr_t proc; /* hook procedure */
2832 int unicode; /* is it a unicode hook? */
2833 VARARG(module,unicode_str); /* module name */
2835 user_handle_t handle; /* handle to the hook */
2836 unsigned int active_hooks; /* active hooks bitmap */
2840 /* Remove a window hook */
2842 user_handle_t handle; /* handle to the hook */
2843 client_ptr_t proc; /* hook procedure if handle is 0 */
2844 int id; /* id of the hook if handle is 0 */
2846 unsigned int active_hooks; /* active hooks bitmap */
2850 /* Start calling a hook chain */
2851 @REQ(start_hook_chain)
2852 int id; /* id of the hook */
2853 int event; /* signalled event */
2854 user_handle_t window; /* handle to the event window */
2855 int object_id; /* object id for out of context winevent */
2856 int child_id; /* child id for out of context winevent */
2858 user_handle_t handle; /* handle to the next hook */
2859 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2860 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2861 int unicode; /* is it a unicode hook? */
2862 client_ptr_t proc; /* hook procedure */
2863 unsigned int active_hooks; /* active hooks bitmap */
2864 VARARG(module,unicode_str); /* module name */
2868 /* Finished calling a hook chain */
2869 @REQ(finish_hook_chain)
2870 int id; /* id of the hook */
2874 /* Get the hook information */
2876 user_handle_t handle; /* handle to the current hook */
2877 int get_next; /* do we want info about current or next hook? */
2878 int event; /* signalled event */
2879 user_handle_t window; /* handle to the event window */
2880 int object_id; /* object id for out of context winevent */
2881 int child_id; /* child id for out of context winevent */
2883 user_handle_t handle; /* handle to the hook */
2884 int id; /* id of the hook */
2885 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2886 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2887 client_ptr_t proc; /* hook procedure */
2888 int unicode; /* is it a unicode hook? */
2889 VARARG(module,unicode_str); /* module name */
2893 /* Create a window class */
2895 int local; /* is it a local class? */
2896 atom_t atom; /* class atom */
2897 unsigned int style; /* class style */
2898 mod_handle_t instance; /* module instance */
2899 int extra; /* number of extra class bytes */
2900 int win_extra; /* number of window extra bytes */
2901 client_ptr_t client_ptr; /* pointer to class in client address space */
2902 VARARG(name,unicode_str); /* class name */
2904 atom_t atom; /* resulting class atom */
2908 /* Destroy a window class */
2910 atom_t atom; /* class atom */
2911 mod_handle_t instance; /* module instance */
2912 VARARG(name,unicode_str); /* class name */
2914 client_ptr_t client_ptr; /* pointer to class in client address space */
2918 /* Set some information in a class */
2919 @REQ(set_class_info)
2920 user_handle_t window; /* handle to the window */
2921 unsigned int flags; /* flags for info to set (see below) */
2922 atom_t atom; /* class atom */
2923 unsigned int style; /* class style */
2924 int win_extra; /* number of window extra bytes */
2925 mod_handle_t instance; /* module instance */
2926 int extra_offset; /* offset to set in extra bytes */
2927 data_size_t extra_size; /* size to set in extra bytes */
2928 lparam_t extra_value; /* value to set in extra bytes */
2930 atom_t old_atom; /* previous class atom */
2931 unsigned int old_style; /* previous class style */
2932 int old_extra; /* previous number of class extra bytes */
2933 int old_win_extra; /* previous number of window extra bytes */
2934 mod_handle_t old_instance; /* previous module instance */
2935 lparam_t old_extra_value; /* old value in extra bytes */
2937 #define SET_CLASS_ATOM 0x0001
2938 #define SET_CLASS_STYLE 0x0002
2939 #define SET_CLASS_WINEXTRA 0x0004
2940 #define SET_CLASS_INSTANCE 0x0008
2941 #define SET_CLASS_EXTRA 0x0010
2944 /* Set/get clipboard information */
2945 @REQ(set_clipboard_info)
2946 unsigned int flags; /* flags for fields to set (see below) */
2947 user_handle_t clipboard; /* clipboard window */
2948 user_handle_t owner; /* clipboard owner */
2949 user_handle_t viewer; /* first clipboard viewer */
2950 unsigned int seqno; /* change sequence number */
2952 unsigned int flags; /* status flags (see below) */
2953 user_handle_t old_clipboard; /* old clipboard window */
2954 user_handle_t old_owner; /* old clipboard owner */
2955 user_handle_t old_viewer; /* old clipboard viewer */
2956 unsigned int seqno; /* current sequence number */
2959 #define SET_CB_OPEN 0x001
2960 #define SET_CB_OWNER 0x002
2961 #define SET_CB_VIEWER 0x004
2962 #define SET_CB_SEQNO 0x008
2963 #define SET_CB_RELOWNER 0x010
2964 #define SET_CB_CLOSE 0x020
2965 #define CB_OPEN 0x040
2966 #define CB_OWNER 0x080
2967 #define CB_PROCESS 0x100
2970 /* Open a security token */
2972 obj_handle_t handle; /* handle to the thread or process */
2973 unsigned int access; /* access rights to the new token */
2974 unsigned int attributes;/* object attributes */
2975 unsigned int flags; /* flags (see below) */
2977 obj_handle_t token; /* handle to the token */
2979 #define OPEN_TOKEN_THREAD 1
2980 #define OPEN_TOKEN_AS_SELF 2
2983 /* Set/get the global windows */
2984 @REQ(set_global_windows)
2985 unsigned int flags; /* flags for fields to set (see below) */
2986 user_handle_t shell_window; /* handle to the new shell window */
2987 user_handle_t shell_listview; /* handle to the new shell listview window */
2988 user_handle_t progman_window; /* handle to the new program manager window */
2989 user_handle_t taskman_window; /* handle to the new task manager window */
2991 user_handle_t old_shell_window; /* handle to the shell window */
2992 user_handle_t old_shell_listview; /* handle to the shell listview window */
2993 user_handle_t old_progman_window; /* handle to the new program manager window */
2994 user_handle_t old_taskman_window; /* handle to the new task manager window */
2996 #define SET_GLOBAL_SHELL_WINDOWS 0x01 /* set both main shell and listview windows */
2997 #define SET_GLOBAL_PROGMAN_WINDOW 0x02
2998 #define SET_GLOBAL_TASKMAN_WINDOW 0x04
3000 /* Adjust the privileges held by a token */
3001 @REQ(adjust_token_privileges)
3002 obj_handle_t handle; /* handle to the token */
3003 int disable_all; /* disable all privileges? */
3004 int get_modified_state; /* get modified privileges? */
3005 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to enable/disable/remove */
3007 unsigned int len; /* total length in bytes required to store token privileges */
3008 VARARG(privileges,LUID_AND_ATTRIBUTES); /* modified privileges */
3011 /* Retrieves the set of privileges held by or available to a token */
3012 @REQ(get_token_privileges)
3013 obj_handle_t handle; /* handle to the token */
3015 unsigned int len; /* total length in bytes required to store token privileges */
3016 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
3019 /* Check the token has the required privileges */
3020 @REQ(check_token_privileges)
3021 obj_handle_t handle; /* handle to the token */
3022 int all_required; /* are all the privileges required for the check to succeed? */
3023 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to check */
3025 int has_privileges; /* does the token have the required privileges? */
3026 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
3029 @REQ(duplicate_token)
3030 obj_handle_t handle; /* handle to the token to duplicate */
3031 unsigned int access; /* access rights to the new token */
3032 unsigned int attributes; /* object attributes */
3033 int primary; /* is the new token to be a primary one? */
3034 int impersonation_level; /* impersonation level of the new token */
3036 obj_handle_t new_handle; /* duplicated handle */
3040 obj_handle_t handle; /* handle to the token */
3041 unsigned int desired_access; /* desired access to the object */
3042 unsigned int mapping_read; /* mapping from generic read to specific rights */
3043 unsigned int mapping_write; /* mapping from generic write to specific rights */
3044 unsigned int mapping_execute; /* mapping from generic execute to specific rights */
3045 unsigned int mapping_all; /* mapping from generic all to specific rights */
3046 VARARG(sd,security_descriptor); /* security descriptor to check */
3048 unsigned int access_granted; /* access rights actually granted */
3049 unsigned int access_status; /* was access granted? */
3050 unsigned int privileges_len; /* length needed to store privileges */
3051 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges used during access check */
3055 obj_handle_t handle; /* handle to the token */
3056 unsigned int which_sid; /* which SID to retrieve from the token */
3058 data_size_t sid_len; /* length needed to store sid */
3059 VARARG(sid,SID); /* the sid specified by which_sid from the token */
3062 @REQ(get_token_groups)
3063 obj_handle_t handle; /* handle to the token */
3065 data_size_t user_len; /* length needed to store user */
3066 VARARG(user,token_groups); /* groups the token's user belongs to
*/
3069 @
REQ(get_token_default_dacl
)
3070 obj_handle_t handle
; /* handle to the token
*/
3072 data_size_t acl_len
; /* length needed to store access control list
*/
3073 VARARG(acl
,ACL
); /* access control list
*/
3076 @
REQ(set_token_default_dacl
)
3077 obj_handle_t handle
; /* handle to the token
*/
3078 VARARG(acl
,ACL
); /* default dacl to set
*/
3081 @
REQ(set_security_object
)
3082 obj_handle_t handle
; /* handle to the object
*/
3083 unsigned int security_info
; /* which parts of security descriptor to set
*/
3084 VARARG(sd
,security_descriptor
); /* security descriptor to set
*/
3087 @
REQ(get_security_object
)
3088 obj_handle_t handle
; /* handle to the object
*/
3089 unsigned int security_info
; /* which parts of security descriptor to get
*/
3091 unsigned int sd_len
; /* buffer size needed for sd
*/
3092 VARARG(sd
,security_descriptor
); /* retrieved security descriptor
*/
3095 /* Create a mailslot
*/
3096 @
REQ(create_mailslot
)
3097 unsigned int access
; /* wanted access rights
*/
3098 unsigned int attributes
; /* object attributes
*/
3099 obj_handle_t rootdir
; /* root directory
*/
3100 timeout_t read_timeout
;
3101 unsigned int max_msgsize
;
3102 VARARG(name
,unicode_str
); /* mailslot name
*/
3104 obj_handle_t handle
; /* handle to the mailslot
*/
3108 /* Set mailslot information
*/
3109 @
REQ(set_mailslot_info
)
3110 obj_handle_t handle
; /* handle to the mailslot
*/
3111 timeout_t read_timeout
;
3114 timeout_t read_timeout
;
3115 unsigned int max_msgsize
;
3117 #define MAILSLOT_SET_READ_TIMEOUT
1
3120 /* Create a directory object
*/
3121 @
REQ(create_directory
)
3122 unsigned int access
; /* access flags
*/
3123 unsigned int attributes
; /* object attributes
*/
3124 obj_handle_t rootdir
; /* root directory
*/
3125 VARARG(directory_name
,unicode_str
); /* Directory name
*/
3127 obj_handle_t handle
; /* handle to the directory
*/
3131 /* Open a directory object
*/
3132 @
REQ(open_directory
)
3133 unsigned int access
; /* access flags
*/
3134 unsigned int attributes
; /* object attributes
*/
3135 obj_handle_t rootdir
; /* root directory
*/
3136 VARARG(directory_name
,unicode_str
); /* Directory name
*/
3138 obj_handle_t handle
; /* handle to the directory
*/
3142 /* Get a directory entry by index
*/
3143 @
REQ(get_directory_entry
)
3144 obj_handle_t handle
; /* handle to the directory
*/
3145 unsigned int index
; /* entry index
*/
3147 data_size_t name_len
; /* length of the entry name in bytes
*/
3148 VARARG(name
,unicode_str
,name_len
); /* entry name
*/
3149 VARARG(type
,unicode_str
); /* entry type
*/
3153 /* Create a symbolic link object
*/
3154 @
REQ(create_symlink
)
3155 unsigned int access
; /* access flags
*/
3156 unsigned int attributes
; /* object attributes
*/
3157 obj_handle_t rootdir
; /* root directory
*/
3158 data_size_t name_len
; /* length of the symlink name in bytes
*/
3159 VARARG(name
,unicode_str
,name_len
); /* symlink name
*/
3160 VARARG(target_name
,unicode_str
); /* target name
*/
3162 obj_handle_t handle
; /* handle to the symlink
*/
3166 /* Open a symbolic link object
*/
3168 unsigned int access
; /* access flags
*/
3169 unsigned int attributes
; /* object attributes
*/
3170 obj_handle_t rootdir
; /* root directory
*/
3171 VARARG(name
,unicode_str
); /* symlink name
*/
3173 obj_handle_t handle
; /* handle to the symlink
*/
3177 /* Query a symbolic link object
*/
3179 obj_handle_t handle
; /* handle to the symlink
*/
3181 data_size_t total
; /* total needed size for name
*/
3182 VARARG(target_name
,unicode_str
); /* target name
*/
3186 /* Query basic object information
*/
3187 @
REQ(get_object_info
)
3188 obj_handle_t handle
; /* handle to the object
*/
3190 unsigned int access
; /* granted access mask
*/
3191 unsigned int ref_count
; /* object ref count
*/
3192 data_size_t total
; /* total needed size for name
*/
3193 VARARG(name
,unicode_str
); /* object name
*/
3197 /* Unlink a named object
*/
3199 obj_handle_t handle
; /* handle to the object
*/
3203 /* Query the impersonation level of an impersonation token
*/
3204 @
REQ(get_token_impersonation_level
)
3205 obj_handle_t handle
; /* handle to the object
*/
3207 int impersonation_level
; /* impersonation level of the impersonation token
*/
3210 /* Allocate a locally
-unique identifier
*/
3211 @
REQ(allocate_locally_unique_id
)
3217 /* Create a device manager
*/
3218 @
REQ(create_device_manager
)
3219 unsigned int access
; /* wanted access rights
*/
3220 unsigned int attributes
; /* object attributes
*/
3222 obj_handle_t handle
; /* handle to the device
*/
3226 /* Create a device
*/
3228 unsigned int access
; /* wanted access rights
*/
3229 unsigned int attributes
; /* object attributes
*/
3230 obj_handle_t rootdir
; /* root directory
*/
3231 client_ptr_t user_ptr
; /* opaque ptr for use by client
*/
3232 obj_handle_t manager
; /* device manager
*/
3233 VARARG(name
,unicode_str
); /* object name
*/
3235 obj_handle_t handle
; /* handle to the device
*/
3239 /* Delete a device
*/
3241 obj_handle_t handle
; /* handle to the device
*/
3245 /* Retrieve the next pending device ioctl request
*/
3246 @
REQ(get_next_device_request
)
3247 obj_handle_t manager
; /* handle to the device manager
*/
3248 obj_handle_t prev
; /* handle to the previous ioctl
*/
3249 unsigned int status
; /* status of the previous ioctl
*/
3250 VARARG(prev_data
,bytes
); /* output data of the previous ioctl
*/
3252 obj_handle_t next
; /* handle to the next ioctl
*/
3253 ioctl_code_t code
; /* ioctl code
*/
3254 client_ptr_t user_ptr
; /* opaque ptr for the device
*/
3255 process_id_t client_pid
; /* pid of process calling ioctl
*/
3256 thread_id_t client_tid
; /* tid of thread calling ioctl
*/
3257 data_size_t in_size
; /* total needed input size
*/
3258 data_size_t out_size
; /* needed output size
*/
3259 VARARG(next_data
,bytes
); /* input data of the next ioctl
*/
3263 /* Make the current process a system process
*/
3264 @
REQ(make_process_system
)
3266 obj_handle_t event
; /* event signaled when all user processes have exited
*/
3270 /* Get detailed fixed
-size information about a token
*/
3271 @
REQ(get_token_statistics
)
3272 obj_handle_t handle
; /* handle to the object
*/
3274 luid_t token_id
; /* locally
-unique identifier of the token
*/
3275 luid_t modified_id
; /* locally
-unique identifier of the modified version of the token
*/
3276 int primary
; /* is the token primary or impersonation?
*/
3277 int impersonation_level
; /* level of impersonation
*/
3278 int group_count
; /* the number of groups the token is a member of
*/
3279 int privilege_count
; /* the number of privileges the token has
*/
3283 /* Create I
/O completion port
*/
3284 @
REQ(create_completion
)
3285 unsigned int access
; /* desired access to a port
*/
3286 unsigned int attributes
; /* object attributes
*/
3287 unsigned int concurrent
; /* max number of concurrent active threads
*/
3288 obj_handle_t rootdir
; /* root directory
*/
3289 VARARG(filename
,string
); /* port name
*/
3291 obj_handle_t handle
; /* port handle
*/
3295 /* Open I
/O completion port
*/
3296 @
REQ(open_completion
)
3297 unsigned int access
; /* desired access to a port
*/
3298 unsigned int attributes
; /* object attributes
*/
3299 obj_handle_t rootdir
; /* root directory
*/
3300 VARARG(filename
,string
); /* port name
*/
3302 obj_handle_t handle
; /* port handle
*/
3306 /* add completion to completion port
*/
3307 @
REQ(add_completion
)
3308 obj_handle_t handle
; /* port handle
*/
3309 apc_param_t ckey
; /* completion key
*/
3310 apc_param_t cvalue
; /* completion value
*/
3311 unsigned int information
; /* IO_STATUS_BLOCK Information
*/
3312 unsigned int status
; /* completion result
*/
3316 /* get completion from completion port queue
*/
3317 @
REQ(remove_completion
)
3318 obj_handle_t handle
; /* port handle
*/
3320 apc_param_t ckey
; /* completion key
*/
3321 apc_param_t cvalue
; /* completion value
*/
3322 unsigned int information
; /* IO_STATUS_BLOCK Information
*/
3323 unsigned int status
; /* completion result
*/
3327 /* get completion queue depth
*/
3328 @
REQ(query_completion
)
3329 obj_handle_t handle
; /* port handle
*/
3331 unsigned int depth
; /* completion queue depth
*/
3335 /* associate object with completion port
*/
3336 @
REQ(set_completion_info
)
3337 obj_handle_t handle
; /* object handle
*/
3338 apc_param_t ckey
; /* completion key
*/
3339 obj_handle_t chandle
; /* port handle
*/
3343 /* check for associated completion and push msg
*/
3344 @
REQ(add_fd_completion
)
3345 obj_handle_t handle
; /* async
' object */
3346 apc_param_t cvalue; /* completion value */
3347 unsigned int status; /* completion status */
3348 unsigned int information; /* IO_STATUS_BLOCK Information */
3352 /* Retrieve layered info for a window */
3353 @REQ(get_window_layered_info)
3354 user_handle_t handle; /* handle to the window */
3356 unsigned int color_key; /* color key */
3357 unsigned int alpha; /* alpha (0..255) */
3358 unsigned int flags; /* LWA_* flags */
3362 /* Set layered info for a window */
3363 @REQ(set_window_layered_info)
3364 user_handle_t handle; /* handle to the window */
3365 unsigned int color_key; /* color key */
3366 unsigned int alpha; /* alpha (0..255) */
3367 unsigned int flags; /* LWA_* flags */
3371 /* Allocate an arbitrary user handle */
3372 @REQ(alloc_user_handle)
3374 user_handle_t handle; /* allocated handle */
3378 /* Free an arbitrary user handle */
3379 @REQ(free_user_handle)
3380 user_handle_t handle; /* handle to free*/
3384 /* Set/get the current cursor */
3386 unsigned int flags; /* flags for fields to set (see below) */
3387 user_handle_t handle; /* handle to the cursor */
3388 int show_count; /* show count increment/decrement */
3389 int x; /* cursor position */
3391 rectangle_t clip; /* cursor clip rectangle */
3392 unsigned int clip_msg; /* message to post on cursor clip changes */
3394 user_handle_t prev_handle; /* previous handle */
3395 int prev_count; /* previous show count */
3396 int prev_x; /* previous position */
3398 int new_x; /* new position */
3400 rectangle_t new_clip; /* new clip rectangle */
3401 unsigned int last_change; /* time of last position change */
3403 #define SET_CURSOR_HANDLE 0x01
3404 #define SET_CURSOR_COUNT 0x02
3405 #define SET_CURSOR_POS 0x04
3406 #define SET_CURSOR_CLIP 0x08
3407 #define SET_CURSOR_NOCLIP 0x10
3410 /* Modify the list of registered rawinput devices */
3411 @REQ(update_rawinput_devices)
3412 VARARG(devices,rawinput_devices);
3416 /* Retrieve the suspended context of a thread */
3417 @REQ(get_suspend_context)
3419 VARARG(context,context); /* thread context */
3423 /* Store the suspend context of a thread */
3424 @REQ(set_suspend_context)
3425 VARARG(context,context); /* thread context */