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_ALPHA
, CPU_POWERPC
, 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
; } x86_64_regs
;
162 struct
{ unsigned __int64 fir
;
163 unsigned int psr
; } alpha_regs
;
164 struct
{ unsigned int iar
, msr
, ctr
, lr
, dar
, dsisr
, trap
; } powerpc_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 __int64 v0
, t0
, t1
, t2
, t3
, t4
, t5
, t6
, t7
, t8
, t9
, t10
, t11
, t12
,
173 s0
, s1
, s2
, s3
, s4
, s5
, s6
, a0
, a1
, a2
, a3
, a4
, a5
, at
; } alpha_regs
;
174 struct
{ unsigned int gpr
[32], cr
, xer
; } powerpc_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
{ unsigned __int64 f
[32], fpcr
, softfpcr
; } alpha_regs
;
188 struct
{ double fpr
[32], fpscr
; } powerpc_regs
;
189 } fp
; /* selected by SERVER_CTX_FLOATING_POINT
*/
192 struct
{ unsigned int dr0
, dr1
, dr2
, dr3
, dr6
, dr7
; } i386_regs
;
193 struct
{ unsigned __int64 dr0
, dr1
, dr2
, dr3
, dr6
, dr7
; } x86_64_regs
;
194 struct
{ unsigned int dr
[8]; } powerpc_regs
;
195 } debug
; /* selected by SERVER_CTX_DEBUG_REGISTERS
*/
198 unsigned char i386_regs
[512];
199 } ext
; /* selected by SERVER_CTX_EXTENDED_REGISTERS
*/
202 #define SERVER_CTX_CONTROL
0x01
203 #define SERVER_CTX_INTEGER
0x02
204 #define SERVER_CTX_SEGMENTS
0x04
205 #define SERVER_CTX_FLOATING_POINT
0x08
206 #define SERVER_CTX_DEBUG_REGISTERS
0x10
207 #define SERVER_CTX_EXTENDED_REGISTERS
0x20
209 /* structure used in sending an fd from client to server
*/
212 thread_id_t tid
; /* thread id
*/
213 int fd
; /* file descriptor on client
-side
*/
216 /* structure sent by the server on the wait fifo
*/
219 client_ptr_t cookie
; /* magic cookie that was passed in select_request
*/
220 int signaled
; /* wait result
*/
224 /* NT
-style timeout
, in
100ns units
, negative means relative timeout
*/
225 typedef __int64 timeout_t
;
226 #define
TIMEOUT_INFINITE (((timeout_t
)0x7fffffff) << 32 |
0xffffffff)
228 /* structure for process startup info
*/
231 unsigned int debug_flags
;
232 unsigned int console_flags
;
233 obj_handle_t console
;
235 obj_handle_t hstdout
;
236 obj_handle_t hstderr
;
243 unsigned int attribute
;
246 data_size_t curdir_len
;
247 data_size_t dllpath_len
;
248 data_size_t imagepath_len
;
249 data_size_t cmdline_len
;
250 data_size_t title_len
;
251 data_size_t desktop_len
;
252 data_size_t shellinfo_len
;
253 data_size_t runtime_len
;
254 /* VARARG(curdir
,unicode_str
,curdir_len
); */
255 /* VARARG(dllpath
,unicode_str
,dllpath_len
); */
256 /* VARARG(imagepath
,unicode_str
,imagepath_len
); */
257 /* VARARG(cmdline
,unicode_str
,cmdline_len
); */
258 /* VARARG(title
,unicode_str
,title_len
); */
259 /* VARARG(desktop
,unicode_str
,desktop_len
); */
260 /* VARARG(shellinfo
,unicode_str
,shellinfo_len
); */
261 /* VARARG(runtime
,unicode_str
,runtime_len
); */
264 /* structure returned in the list of window properties
*/
267 atom_t atom
; /* property atom
*/
268 int string
; /* was atom a string originally?
*/
269 lparam_t data
; /* data stored in property
*/
272 /* structure to specify window rectangles
*/
281 /* structure for parameters of async I
/O calls
*/
284 obj_handle_t handle
; /* object to perform I
/O on
*/
285 obj_handle_t event
; /* event to signal when done
*/
286 client_ptr_t callback
; /* client
-side callback to call upon end of async
*/
287 client_ptr_t iosb
; /* I
/O status block in client addr space
*/
288 client_ptr_t arg
; /* opaque user data to pass to callback
*/
289 apc_param_t cvalue
; /* completion value to use for completion events
*/
292 /* structures for extra message data
*/
294 struct hardware_msg_data
296 lparam_t info
; /* extra info
*/
297 int x
; /* x position
*/
298 int y
; /* y position
*/
299 unsigned int hw_id
; /* unique id
*/
303 struct callback_msg_data
305 client_ptr_t callback
; /* callback function
*/
306 lparam_t data
; /* user data for callback
*/
307 lparam_t result
; /* message result
*/
310 struct winevent_msg_data
312 user_handle_t hook
; /* hook handle
*/
313 thread_id_t tid
; /* thread id
*/
314 client_ptr_t hook_proc
; /* hook proc address
*/
315 /* followed by module name if any
*/
320 unsigned char bytes
[1]; /* raw data for sent messages
*/
321 struct hardware_msg_data hardware
;
322 struct callback_msg_data callback
;
323 struct winevent_msg_data winevent
;
326 /* structure for console char
/attribute info
*/
335 unsigned int low_part
;
339 #define MAX_ACL_LEN
65535
341 struct security_descriptor
343 unsigned int control
; /* SE_ flags
*/
344 data_size_t owner_len
;
345 data_size_t group_len
;
346 data_size_t sacl_len
;
347 data_size_t dacl_len
;
348 /* VARARG(owner
,SID
); */
349 /* VARARG(group
,SID
); */
350 /* VARARG(sacl
,ACL
); */
351 /* VARARG(dacl
,ACL
); */
354 struct object_attributes
356 obj_handle_t rootdir
; /* root directory
*/
357 data_size_t sd_len
; /* length of security_descriptor data. may be
0 */
358 data_size_t name_len
; /* length of the name string. may be
0 */
359 /* VARARG(sd
,security_descriptor
); */
360 /* VARARG(name
,unicode_str
); */
366 /* unsigned int attributes
[count
]; */
367 /* VARARG(sids
,SID
); */
393 enum apc_type type
; /* APC_USER
*/
395 client_ptr_t func
; /* void (__stdcall
*func
)(ULONG_PTR
,ULONG_PTR
,ULONG_PTR
); */
396 apc_param_t args
[3]; /* arguments for user function
*/
400 enum apc_type type
; /* APC_TIMER
*/
402 client_ptr_t func
; /* void (__stdcall
*func
)(void
*, unsigned int
, unsigned int
); */
403 timeout_t time
; /* absolute time of expiration
*/
404 client_ptr_t arg
; /* user argument
*/
408 enum apc_type type
; /* APC_ASYNC_IO
*/
409 unsigned int status
; /* I
/O status
*/
410 client_ptr_t func
; /* unsigned
int (*func)(void*, void*, unsigned int, void **); */
411 client_ptr_t user
; /* user pointer
*/
412 client_ptr_t sb
; /* status block
*/
416 enum apc_type type
; /* APC_VIRTUAL_ALLOC
*/
417 unsigned int op_type
; /* type of operation
*/
418 client_ptr_t addr
; /* requested address
*/
419 mem_size_t size
; /* allocation size
*/
420 unsigned int zero_bits
; /* allocation alignment
*/
421 unsigned int prot
; /* memory protection flags
*/
425 enum apc_type type
; /* APC_VIRTUAL_FREE
*/
426 unsigned int op_type
; /* type of operation
*/
427 client_ptr_t addr
; /* requested address
*/
428 mem_size_t size
; /* allocation size
*/
432 enum apc_type type
; /* APC_VIRTUAL_QUERY
*/
434 client_ptr_t addr
; /* requested address
*/
438 enum apc_type type
; /* APC_VIRTUAL_PROTECT
*/
439 unsigned int prot
; /* new protection flags
*/
440 client_ptr_t addr
; /* requested address
*/
441 mem_size_t size
; /* requested size
*/
445 enum apc_type type
; /* APC_VIRTUAL_FLUSH
*/
447 client_ptr_t addr
; /* requested address
*/
448 mem_size_t size
; /* requested size
*/
452 enum apc_type type
; /* APC_VIRTUAL_LOCK
*/
454 client_ptr_t addr
; /* requested address
*/
455 mem_size_t size
; /* requested size
*/
459 enum apc_type type
; /* APC_VIRTUAL_UNLOCK
*/
461 client_ptr_t addr
; /* requested address
*/
462 mem_size_t size
; /* requested size
*/
466 enum apc_type type
; /* APC_MAP_VIEW
*/
467 obj_handle_t handle
; /* mapping handle
*/
468 client_ptr_t addr
; /* requested address
*/
469 mem_size_t size
; /* allocation size
*/
470 file_pos_t offset
; /* file offset
*/
471 unsigned int alloc_type
;/* allocation type
*/
472 unsigned short zero_bits
; /* allocation alignment
*/
473 unsigned short prot
; /* memory protection flags
*/
477 enum apc_type type
; /* APC_UNMAP_VIEW
*/
479 client_ptr_t addr
; /* view address
*/
483 enum apc_type type
; /* APC_CREATE_THREAD
*/
484 int suspend
; /* suspended thread?
*/
485 client_ptr_t func
; /* void (__stdcall
*func
)(void*)
; start function
*/
486 client_ptr_t arg
; /* argument for start function
*/
487 mem_size_t reserve
; /* reserve size for thread stack
*/
488 mem_size_t commit
; /* commit size for thread stack
*/
497 enum apc_type type
; /* APC_ASYNC_IO
*/
498 unsigned int status
; /* new status of async operation
*/
499 client_ptr_t apc
; /* user APC to call
*/
500 unsigned int total
; /* bytes transferred
*/
504 enum apc_type type
; /* APC_VIRTUAL_ALLOC
*/
505 unsigned int status
; /* status returned by call
*/
506 client_ptr_t addr
; /* resulting address
*/
507 mem_size_t size
; /* resulting size
*/
511 enum apc_type type
; /* APC_VIRTUAL_FREE
*/
512 unsigned int status
; /* status returned by call
*/
513 client_ptr_t addr
; /* resulting address
*/
514 mem_size_t size
; /* resulting size
*/
518 enum apc_type type
; /* APC_VIRTUAL_QUERY
*/
519 unsigned int status
; /* status returned by call
*/
520 client_ptr_t base
; /* resulting base address
*/
521 client_ptr_t alloc_base
;/* resulting allocation base
*/
522 mem_size_t size
; /* resulting region size
*/
523 unsigned short state
; /* resulting region state
*/
524 unsigned short prot
; /* resulting region protection
*/
525 unsigned short alloc_prot
;/* resulting allocation protection
*/
526 unsigned short alloc_type
;/* resulting region allocation type
*/
530 enum apc_type type
; /* APC_VIRTUAL_PROTECT
*/
531 unsigned int status
; /* status returned by call
*/
532 client_ptr_t addr
; /* resulting address
*/
533 mem_size_t size
; /* resulting size
*/
534 unsigned int prot
; /* old protection flags
*/
538 enum apc_type type
; /* APC_VIRTUAL_FLUSH
*/
539 unsigned int status
; /* status returned by call
*/
540 client_ptr_t addr
; /* resulting address
*/
541 mem_size_t size
; /* resulting size
*/
545 enum apc_type type
; /* APC_VIRTUAL_LOCK
*/
546 unsigned int status
; /* status returned by call
*/
547 client_ptr_t addr
; /* resulting address
*/
548 mem_size_t size
; /* resulting size
*/
552 enum apc_type type
; /* APC_VIRTUAL_UNLOCK
*/
553 unsigned int status
; /* status returned by call
*/
554 client_ptr_t addr
; /* resulting address
*/
555 mem_size_t size
; /* resulting size
*/
559 enum apc_type type
; /* APC_MAP_VIEW
*/
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_MAP_VIEW
*/
567 unsigned int status
; /* status returned by call
*/
571 enum apc_type type
; /* APC_CREATE_THREAD
*/
572 unsigned int status
; /* status returned by call
*/
573 thread_id_t tid
; /* thread id
*/
574 obj_handle_t handle
; /* handle to new thread
*/
578 /****************************************************************/
579 /* Request declarations
*/
581 /* Create a new process from the context of the parent
*/
583 int inherit_all
; /* inherit all handles from parent
*/
584 unsigned int create_flags
; /* creation flags
*/
585 int socket_fd
; /* file descriptor for process socket
*/
586 obj_handle_t exe_file
; /* file handle for main exe
*/
587 unsigned int process_access
; /* access rights for process object
*/
588 unsigned int process_attr
; /* attributes for process object
*/
589 unsigned int thread_access
; /* access rights for thread object
*/
590 unsigned int thread_attr
; /* attributes for thread object
*/
591 data_size_t info_size
; /* size of startup info
*/
592 VARARG(info
,startup_info
,info_size
); /* startup information
*/
593 VARARG(env
,unicode_str
); /* environment for new process
*/
595 obj_handle_t info
; /* new process info handle
*/
596 process_id_t pid
; /* process id
*/
597 obj_handle_t phandle
; /* process
handle (in the current process
) */
598 thread_id_t tid
; /* thread id
*/
599 obj_handle_t thandle
; /* thread
handle (in the current process
) */
603 /* Retrieve information about a newly started process
*/
604 @
REQ(get_new_process_info
)
605 obj_handle_t info
; /* info handle returned from new_process_request
*/
607 int success
; /* did the process start successfully?
*/
608 int exit_code
; /* process exit code if failed
*/
612 /* Create a new thread from the context of the parent
*/
614 unsigned int access
; /* wanted access rights
*/
615 unsigned int attributes
; /* object attributes
*/
616 int suspend
; /* new thread should be suspended on creation
*/
617 int request_fd
; /* fd for request pipe
*/
619 thread_id_t tid
; /* thread id
*/
620 obj_handle_t handle
; /* thread
handle (in the current process
) */
624 /* Retrieve the new process startup info
*/
625 @
REQ(get_startup_info
)
627 obj_handle_t exe_file
; /* file handle for main exe
*/
628 data_size_t info_size
; /* size of startup info
*/
629 VARARG(info
,startup_info
,info_size
); /* startup information
*/
630 VARARG(env
,unicode_str
); /* environment
*/
634 /* Signal the end of the process initialization
*/
635 @
REQ(init_process_done
)
636 int gui
; /* is it a GUI process?
*/
637 mod_handle_t module
; /* main module base address
*/
638 client_ptr_t ldt_copy
; /* address of LDT
copy (in thread address space
) */
639 client_ptr_t entry
; /* process entry point
*/
643 /* Initialize a thread
; called from the child after
fork()/clone() */
645 int unix_pid
; /* Unix pid of new thread
*/
646 int unix_tid
; /* Unix tid of new thread
*/
647 int debug_level
; /* new debug level
*/
648 client_ptr_t teb
; /* TEB of new
thread (in thread address space
) */
649 client_ptr_t entry
; /* entry point or PEB if initial
thread (in thread address space
) */
650 int reply_fd
; /* fd for reply pipe
*/
651 int wait_fd
; /* fd for blocking calls pipe
*/
652 cpu_type_t cpu
; /* CPU that this thread is running on
*/
654 process_id_t pid
; /* process id of the new thread
's process */
655 thread_id_t tid; /* thread id of the new thread */
656 timeout_t server_start; /* server start time */
657 data_size_t info_size; /* total size of startup info */
658 int version; /* protocol version */
659 unsigned int all_cpus; /* bitset of supported CPUs */
663 /* Terminate a process */
664 @REQ(terminate_process)
665 obj_handle_t handle; /* process handle to terminate */
666 int exit_code; /* process exit code */
668 int self; /* suicide? */
672 /* Terminate a thread */
673 @REQ(terminate_thread)
674 obj_handle_t handle; /* thread handle to terminate */
675 int exit_code; /* thread exit code */
677 int self; /* suicide? */
678 int last; /* last thread in this process? */
682 /* Retrieve information about a process */
683 @REQ(get_process_info)
684 obj_handle_t handle; /* process handle */
686 process_id_t pid; /* server process id */
687 process_id_t ppid; /* server process id of parent */
688 affinity_t affinity; /* process affinity mask */
689 client_ptr_t peb; /* PEB address in process address space */
690 timeout_t start_time; /* process start time */
691 timeout_t end_time; /* process end time */
692 int exit_code; /* process exit code */
693 int priority; /* priority class */
694 cpu_type_t cpu; /* CPU that this process is running on */
698 /* Set a process informations */
699 @REQ(set_process_info)
700 obj_handle_t handle; /* process handle */
701 int mask; /* setting mask (see below) */
702 int priority; /* priority class */
703 affinity_t affinity; /* affinity mask */
705 #define SET_PROCESS_INFO_PRIORITY 0x01
706 #define SET_PROCESS_INFO_AFFINITY 0x02
709 /* Retrieve information about a thread */
710 @REQ(get_thread_info)
711 obj_handle_t handle; /* thread handle */
712 thread_id_t tid_in; /* thread id (optional) */
714 process_id_t pid; /* server process id */
715 thread_id_t tid; /* server thread id */
716 client_ptr_t teb; /* thread teb pointer */
717 affinity_t affinity; /* thread affinity mask */
718 timeout_t creation_time; /* thread creation time */
719 timeout_t exit_time; /* thread exit time */
720 int exit_code; /* thread exit code */
721 int priority; /* thread priority level */
722 int last; /* last thread in process */
726 /* Set a thread informations */
727 @REQ(set_thread_info)
728 obj_handle_t handle; /* thread handle */
729 int mask; /* setting mask (see below) */
730 int priority; /* priority class */
731 affinity_t affinity; /* affinity mask */
732 obj_handle_t token; /* impersonation token */
734 #define SET_THREAD_INFO_PRIORITY 0x01
735 #define SET_THREAD_INFO_AFFINITY 0x02
736 #define SET_THREAD_INFO_TOKEN 0x04
739 /* Retrieve information about a module */
741 obj_handle_t handle; /* process handle */
742 mod_handle_t base_address; /* base address of module */
744 client_ptr_t entry_point;
745 data_size_t size; /* module size */
746 data_size_t filename_len; /* buffer len in bytes required to store filename */
747 VARARG(filename,unicode_str); /* file name of module */
751 /* Suspend a thread */
753 obj_handle_t handle; /* thread handle */
755 int count; /* new suspend count */
759 /* Resume a thread */
761 obj_handle_t handle; /* thread handle */
763 int count; /* new suspend count */
767 /* Notify the server that a dll has been loaded */
769 obj_handle_t handle; /* file handle */
770 mod_handle_t base; /* base address */
771 client_ptr_t name; /* ptr to ptr to name (in process addr space) */
772 data_size_t size; /* dll size */
773 int dbg_offset; /* debug info offset */
774 int dbg_size; /* debug info size */
775 VARARG(filename,unicode_str); /* file name of dll */
779 /* Notify the server that a dll is being unloaded */
781 mod_handle_t base; /* base address */
785 /* Queue an APC for a thread or process */
787 obj_handle_t handle; /* thread or process handle */
788 apc_call_t call; /* call arguments */
790 obj_handle_t handle; /* APC handle */
791 int self; /* run APC in caller itself? */
795 /* Get the result of an APC call */
797 obj_handle_t handle; /* handle to the APC */
799 apc_result_t result; /* result of the APC */
803 /* Close a handle for the current process */
805 obj_handle_t handle; /* handle to close */
809 /* Set a handle information */
810 @REQ(set_handle_info)
811 obj_handle_t handle; /* handle we are interested in */
812 int flags; /* new handle flags */
813 int mask; /* mask for flags to set */
815 int old_flags; /* old flag value */
819 /* Duplicate a handle */
821 obj_handle_t src_process; /* src process handle */
822 obj_handle_t src_handle; /* src handle to duplicate */
823 obj_handle_t dst_process; /* dst process handle */
824 unsigned int access; /* wanted access rights */
825 unsigned int attributes; /* object attributes */
826 unsigned int options; /* duplicate options (see below) */
828 obj_handle_t handle; /* duplicated handle in dst process */
829 int self; /* is the source the current process? */
830 int closed; /* whether the source handle has been closed */
832 #define DUP_HANDLE_CLOSE_SOURCE DUPLICATE_CLOSE_SOURCE
833 #define DUP_HANDLE_SAME_ACCESS DUPLICATE_SAME_ACCESS
834 #define DUP_HANDLE_MAKE_GLOBAL 0x80000000 /* Not a Windows flag */
837 /* Open a handle to a process */
839 process_id_t pid; /* process id to open */
840 unsigned int access; /* wanted access rights */
841 unsigned int attributes; /* object attributes */
843 obj_handle_t handle; /* handle to the process */
847 /* Open a handle to a thread */
849 thread_id_t tid; /* thread id to open */
850 unsigned int access; /* wanted access rights */
851 unsigned int attributes; /* object attributes */
853 obj_handle_t handle; /* handle to the thread */
857 /* Wait for handles */
859 int flags; /* wait flags (see below) */
860 client_ptr_t cookie; /* magic cookie to return to client */
861 obj_handle_t signal; /* object to signal (0 if none) */
862 obj_handle_t prev_apc; /* handle to previous APC */
863 timeout_t timeout; /* timeout */
864 VARARG(result,apc_result); /* result of previous APC */
865 VARARG(handles,handles); /* handles to select on */
867 timeout_t timeout; /* timeout converted to absolute */
868 apc_call_t call; /* APC call arguments */
869 obj_handle_t apc_handle; /* handle to next APC */
872 #define SELECT_ALERTABLE 2
873 #define SELECT_INTERRUPTIBLE 4
876 /* Create an event */
878 unsigned int access; /* wanted access rights */
879 unsigned int attributes; /* object attributes */
880 int manual_reset; /* manual reset event */
881 int initial_state; /* initial state of the event */
882 VARARG(objattr,object_attributes); /* object attributes */
884 obj_handle_t handle; /* handle to the event */
887 /* Event operation */
889 obj_handle_t handle; /* handle to event */
890 int op; /* event operation (see below) */
892 enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT };
897 unsigned int access; /* wanted access rights */
898 unsigned int attributes; /* object attributes */
899 obj_handle_t rootdir; /* root directory */
900 VARARG(name,unicode_str); /* object name */
902 obj_handle_t handle; /* handle to the event */
908 unsigned int access; /* wanted access rights */
909 unsigned int attributes; /* object attributes */
910 int owned; /* initially owned? */
911 VARARG(objattr,object_attributes); /* object attributes */
913 obj_handle_t handle; /* handle to the mutex */
917 /* Release a mutex */
919 obj_handle_t handle; /* handle to the mutex */
921 unsigned int prev_count; /* value of internal counter, before release */
927 unsigned int access; /* wanted access rights */
928 unsigned int attributes; /* object attributes */
929 obj_handle_t rootdir; /* root directory */
930 VARARG(name,unicode_str); /* object name */
932 obj_handle_t handle; /* handle to the mutex */
936 /* Create a semaphore */
937 @REQ(create_semaphore)
938 unsigned int access; /* wanted access rights */
939 unsigned int attributes; /* object attributes */
940 unsigned int initial; /* initial count */
941 unsigned int max; /* maximum count */
942 VARARG(objattr,object_attributes); /* object attributes */
944 obj_handle_t handle; /* handle to the semaphore */
948 /* Release a semaphore */
949 @REQ(release_semaphore)
950 obj_handle_t handle; /* handle to the semaphore */
951 unsigned int count; /* count to add to semaphore */
953 unsigned int prev_count; /* previous semaphore count */
957 /* Open a semaphore */
959 unsigned int access; /* wanted access rights */
960 unsigned int attributes; /* object attributes */
961 obj_handle_t rootdir; /* root directory */
962 VARARG(name,unicode_str); /* object name */
964 obj_handle_t handle; /* handle to the semaphore */
970 unsigned int access; /* wanted access rights */
971 unsigned int attributes; /* object attributes */
972 unsigned int sharing; /* sharing flags */
973 int create; /* file create action */
974 unsigned int options; /* file options */
975 unsigned int attrs; /* file attributes for creation */
976 VARARG(objattr,object_attributes); /* object attributes */
977 VARARG(filename,string); /* file name */
979 obj_handle_t handle; /* handle to the file */
983 /* Open a file object */
984 @REQ(open_file_object)
985 unsigned int access; /* wanted access rights */
986 unsigned int attributes; /* open attributes */
987 obj_handle_t rootdir; /* root directory */
988 unsigned int sharing; /* sharing flags */
989 unsigned int options; /* file options */
990 VARARG(filename,unicode_str); /* file name */
992 obj_handle_t handle; /* handle to the file */
996 /* Allocate a file handle for a Unix fd */
997 @REQ(alloc_file_handle)
998 unsigned int access; /* wanted access rights */
999 unsigned int attributes; /* object attributes */
1000 int fd; /* file descriptor on the client side */
1002 obj_handle_t handle; /* handle to the file */
1006 /* Get the Unix name from a file handle */
1007 @REQ(get_handle_unix_name)
1008 obj_handle_t handle; /* file handle */
1010 data_size_t name_len; /* unix name length */
1011 VARARG(name,string); /* unix name */
1015 /* Get a Unix fd to access a file */
1017 obj_handle_t handle; /* handle to the file */
1019 int type; /* file type (see below) */
1020 int removable; /* is file removable? */
1021 unsigned int access; /* file access rights */
1022 unsigned int options; /* file open options */
1026 FD_TYPE_INVALID, /* invalid file (no associated fd) */
1027 FD_TYPE_FILE, /* regular file */
1028 FD_TYPE_DIR, /* directory */
1029 FD_TYPE_SOCKET, /* socket */
1030 FD_TYPE_SERIAL, /* serial port */
1031 FD_TYPE_PIPE, /* named pipe */
1032 FD_TYPE_MAILSLOT, /* mailslot */
1033 FD_TYPE_CHAR, /* unspecified char device */
1034 FD_TYPE_DEVICE, /* Windows device file */
1039 /* Flush a file buffers */
1041 obj_handle_t handle; /* handle to the file */
1043 obj_handle_t event; /* event set when finished */
1047 /* Lock a region of a file */
1049 obj_handle_t handle; /* handle to the file */
1050 file_pos_t offset; /* offset of start of lock */
1051 file_pos_t count; /* count of bytes to lock */
1052 int shared; /* shared or exclusive lock? */
1053 int wait; /* do we want to wait? */
1055 obj_handle_t handle; /* handle to wait on */
1056 int overlapped; /* is it an overlapped I/O handle? */
1060 /* Unlock a region of a file */
1062 obj_handle_t handle; /* handle to the file */
1063 file_pos_t offset; /* offset of start of unlock */
1064 file_pos_t count; /* count of bytes to unlock */
1068 /* Create a socket */
1070 unsigned int access; /* wanted access rights */
1071 unsigned int attributes; /* object attributes */
1072 int family; /* family, see socket manpage */
1073 int type; /* type, see socket manpage */
1074 int protocol; /* protocol, see socket manpage */
1075 unsigned int flags; /* socket flags */
1077 obj_handle_t handle; /* handle to the new socket */
1081 /* Accept a socket */
1083 obj_handle_t lhandle; /* handle to the listening socket */
1084 unsigned int access; /* wanted access rights */
1085 unsigned int attributes; /* object attributes */
1087 obj_handle_t handle; /* handle to the new socket */
1091 /* Set socket event parameters */
1092 @REQ(set_socket_event)
1093 obj_handle_t handle; /* handle to the socket */
1094 unsigned int mask; /* event mask */
1095 obj_handle_t event; /* event object */
1096 user_handle_t window; /* window to send the message to */
1097 unsigned int msg; /* message to send */
1101 /* Get socket event parameters */
1102 @REQ(get_socket_event)
1103 obj_handle_t handle; /* handle to the socket */
1104 int service; /* clear pending? */
1105 obj_handle_t c_event; /* event to clear */
1107 unsigned int mask; /* event mask */
1108 unsigned int pmask; /* pending events */
1109 unsigned int state; /* status bits */
1110 VARARG(errors,ints); /* event errors */
1114 /* Reenable pending socket events */
1115 @REQ(enable_socket_event)
1116 obj_handle_t handle; /* handle to the socket */
1117 unsigned int mask; /* events to re-enable */
1118 unsigned int sstate; /* status bits to set */
1119 unsigned int cstate; /* status bits to clear */
1122 @REQ(set_socket_deferred)
1123 obj_handle_t handle; /* handle to the socket */
1124 obj_handle_t deferred; /* handle to the socket for which accept() is deferred */
1127 /* Allocate a console (only used by a console renderer) */
1129 unsigned int access; /* wanted access rights */
1130 unsigned int attributes; /* object attributes */
1131 process_id_t pid; /* pid of process which shall be attached to the console */
1133 obj_handle_t handle_in; /* handle to console input */
1134 obj_handle_t event; /* handle to renderer events change notification */
1138 /* Free the console of the current process */
1143 #define CONSOLE_RENDERER_NONE_EVENT 0x00
1144 #define CONSOLE_RENDERER_TITLE_EVENT 0x01
1145 #define CONSOLE_RENDERER_ACTIVE_SB_EVENT 0x02
1146 #define CONSOLE_RENDERER_SB_RESIZE_EVENT 0x03
1147 #define CONSOLE_RENDERER_UPDATE_EVENT 0x04
1148 #define CONSOLE_RENDERER_CURSOR_POS_EVENT 0x05
1149 #define CONSOLE_RENDERER_CURSOR_GEOM_EVENT 0x06
1150 #define CONSOLE_RENDERER_DISPLAY_EVENT 0x07
1151 #define CONSOLE_RENDERER_EXIT_EVENT 0x08
1152 struct console_renderer_event
1187 /* retrieve console events for the renderer */
1188 @REQ(get_console_renderer_events)
1189 obj_handle_t handle; /* handle to console input events */
1191 VARARG(data,bytes); /* the various console_renderer_events */
1195 /* Open a handle to the process console */
1197 obj_handle_t from; /* 0 (resp 1) input (resp output) of current process console */
1198 /* otherwise console_in handle to get active screen buffer? */
1199 unsigned int access; /* wanted access rights */
1200 unsigned int attributes; /* object attributes */
1201 int share; /* share mask (only for output handles) */
1203 obj_handle_t handle; /* handle to the console */
1207 /* Get the input queue wait event */
1208 @REQ(get_console_wait_event)
1210 obj_handle_t handle;
1213 /* Get a console mode (input or output) */
1214 @REQ(get_console_mode)
1215 obj_handle_t handle; /* handle to the console */
1217 int mode; /* console mode */
1221 /* Set a console mode (input or output) */
1222 @REQ(set_console_mode)
1223 obj_handle_t handle; /* handle to the console */
1224 int mode; /* console mode */
1228 /* Set info about a console (input only) */
1229 @REQ(set_console_input_info)
1230 obj_handle_t handle; /* handle to console input, or 0 for process' console
*/
1231 int mask
; /* setting
mask (see below
) */
1232 obj_handle_t active_sb
; /* active screen buffer
*/
1233 int history_mode
; /* whether we duplicate lines in history
*/
1234 int history_size
; /* number of lines in history
*/
1235 int edition_mode
; /* index to the edition mode flavors
*/
1236 int input_cp
; /* console input codepage
*/
1237 int output_cp
; /* console output codepage
*/
1238 user_handle_t win
; /* console window if backend supports it
*/
1239 VARARG(title
,unicode_str
); /* console title
*/
1241 #define SET_CONSOLE_INPUT_INFO_ACTIVE_SB
0x01
1242 #define SET_CONSOLE_INPUT_INFO_TITLE
0x02
1243 #define SET_CONSOLE_INPUT_INFO_HISTORY_MODE
0x04
1244 #define SET_CONSOLE_INPUT_INFO_HISTORY_SIZE
0x08
1245 #define SET_CONSOLE_INPUT_INFO_EDITION_MODE
0x10
1246 #define SET_CONSOLE_INPUT_INFO_INPUT_CODEPAGE
0x20
1247 #define SET_CONSOLE_INPUT_INFO_OUTPUT_CODEPAGE
0x40
1248 #define SET_CONSOLE_INPUT_INFO_WIN
0x80
1251 /* Get info about a
console (input only
) */
1252 @
REQ(get_console_input_info
)
1253 obj_handle_t handle
; /* handle to console input
, or
0 for process
' console */
1255 int history_mode; /* whether we duplicate lines in history */
1256 int history_size; /* number of lines in history */
1257 int history_index; /* number of used lines in history */
1258 int edition_mode; /* index to the edition mode flavors */
1259 int input_cp; /* console input codepage */
1260 int output_cp; /* console output codepage */
1261 user_handle_t win; /* console window if backend supports it */
1262 VARARG(title,unicode_str); /* console title */
1266 /* appends a string to console's history
*/
1267 @
REQ(append_console_input_history
)
1268 obj_handle_t handle
; /* handle to console input
, or
0 for process
' console */
1269 VARARG(line,unicode_str); /* line to add */
1273 /* appends a string to console's history
*/
1274 @
REQ(get_console_input_history
)
1275 obj_handle_t handle
; /* handle to console input
, or
0 for process
' console */
1276 int index; /* index to get line from */
1278 int total; /* total length of line in Unicode chars */
1279 VARARG(line,unicode_str); /* line to add */
1283 /* creates a new screen buffer on process' console
*/
1284 @
REQ(create_console_output
)
1285 obj_handle_t handle_in
; /* handle to console input
, or
0 for process
' console */
1286 unsigned int access; /* wanted access rights */
1287 unsigned int attributes; /* object attributes */
1288 unsigned int share; /* sharing credentials */
1290 obj_handle_t handle_out; /* handle to the screen buffer */
1294 /* Set info about a console (output only) */
1295 @REQ(set_console_output_info)
1296 obj_handle_t handle; /* handle to the console */
1297 int mask; /* setting mask (see below) */
1298 short int cursor_size; /* size of cursor (percentage filled) */
1299 short int cursor_visible;/* cursor visibility flag */
1300 short int cursor_x; /* position of cursor (x, y) */
1302 short int width; /* width of the screen buffer */
1303 short int height; /* height of the screen buffer */
1304 short int attr; /* default attribute */
1305 short int win_left; /* window actually displayed by renderer */
1306 short int win_top; /* the rect area is expressed withing the */
1307 short int win_right; /* boundaries of the screen buffer */
1308 short int win_bottom;
1309 short int max_width; /* maximum size (width x height) for the window */
1310 short int max_height;
1312 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_GEOM 0x01
1313 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_POS 0x02
1314 #define SET_CONSOLE_OUTPUT_INFO_SIZE 0x04
1315 #define SET_CONSOLE_OUTPUT_INFO_ATTR 0x08
1316 #define SET_CONSOLE_OUTPUT_INFO_DISPLAY_WINDOW 0x10
1317 #define SET_CONSOLE_OUTPUT_INFO_MAX_SIZE 0x20
1320 /* Get info about a console (output only) */
1321 @REQ(get_console_output_info)
1322 obj_handle_t handle; /* handle to the console */
1324 short int cursor_size; /* size of cursor (percentage filled) */
1325 short int cursor_visible;/* cursor visibility flag */
1326 short int cursor_x; /* position of cursor (x, y) */
1328 short int width; /* width of the screen buffer */
1329 short int height; /* height of the screen buffer */
1330 short int attr; /* default attribute */
1331 short int win_left; /* window actually displayed by renderer */
1332 short int win_top; /* the rect area is expressed withing the */
1333 short int win_right; /* boundaries of the screen buffer */
1334 short int win_bottom;
1335 short int max_width; /* maximum size (width x height) for the window */
1336 short int max_height;
1339 /* Add input records to a console input queue */
1340 @REQ(write_console_input)
1341 obj_handle_t handle; /* handle to the console input */
1342 VARARG(rec,input_records); /* input records */
1344 int written; /* number of records written */
1348 /* Fetch input records from a console input queue */
1349 @REQ(read_console_input)
1350 obj_handle_t handle; /* handle to the console input */
1351 int flush; /* flush the retrieved records from the queue? */
1353 int read; /* number of records read */
1354 VARARG(rec,input_records); /* input records */
1358 /* write data (chars and/or attributes) in a screen buffer */
1359 @REQ(write_console_output)
1360 obj_handle_t handle; /* handle to the console output */
1361 int x; /* position where to start writing */
1363 int mode; /* char info (see below) */
1364 int wrap; /* wrap around at end of line? */
1365 VARARG(data,bytes); /* info to write */
1367 int written; /* number of char infos actually written */
1368 int width; /* width of screen buffer */
1369 int height; /* height of screen buffer */
1373 CHAR_INFO_MODE_TEXT, /* characters only */
1374 CHAR_INFO_MODE_ATTR, /* attributes only */
1375 CHAR_INFO_MODE_TEXTATTR, /* both characters and attributes */
1376 CHAR_INFO_MODE_TEXTSTDATTR /* characters but use standard attributes */
1380 /* fill a screen buffer with constant data (chars and/or attributes) */
1381 @REQ(fill_console_output)
1382 obj_handle_t handle; /* handle to the console output */
1383 int x; /* position where to start writing */
1385 int mode; /* char info mode */
1386 int count; /* number to write */
1387 int wrap; /* wrap around at end of line? */
1388 char_info_t data; /* data to write */
1390 int written; /* number of char infos actually written */
1394 /* read data (chars and/or attributes) from a screen buffer */
1395 @REQ(read_console_output)
1396 obj_handle_t handle; /* handle to the console output */
1397 int x; /* position (x,y) where to start reading */
1399 int mode; /* char info mode */
1400 int wrap; /* wrap around at end of line? */
1402 int width; /* width of screen buffer */
1403 int height; /* height of screen buffer */
1408 /* move a rect (of data) in screen buffer content */
1409 @REQ(move_console_output)
1410 obj_handle_t handle; /* handle to the console output */
1411 short int x_src; /* position (x, y) of rect to start moving from */
1413 short int x_dst; /* position (x, y) of rect to move to */
1415 short int w; /* size of the rect (width, height) to move */
1420 /* Sends a signal to a process group */
1421 @REQ(send_console_signal)
1422 int signal; /* the signal to send */
1423 process_id_t group_id; /* the group to send the signal to */
1427 /* enable directory change notifications */
1428 @REQ(read_directory_changes)
1429 unsigned int filter; /* notification filter */
1430 int subtree; /* watch the subtree? */
1431 int want_data; /* flag indicating whether change data should be collected */
1432 async_data_t async; /* async I/O parameters */
1437 obj_handle_t handle;
1439 int action; /* type of change */
1440 VARARG(name,string); /* name of directory entry that changed */
1444 /* Create a file mapping */
1445 @REQ(create_mapping)
1446 unsigned int access; /* wanted access rights */
1447 unsigned int attributes; /* object attributes */
1448 unsigned int protect; /* protection flags (see below) */
1449 mem_size_t size; /* mapping size */
1450 obj_handle_t file_handle; /* file handle */
1451 VARARG(objattr,object_attributes); /* object attributes */
1453 obj_handle_t handle; /* handle to the mapping */
1455 /* per-page protection flags */
1456 #define VPROT_READ 0x01
1457 #define VPROT_WRITE 0x02
1458 #define VPROT_EXEC 0x04
1459 #define VPROT_WRITECOPY 0x08
1460 #define VPROT_GUARD 0x10
1461 #define VPROT_NOCACHE 0x20
1462 #define VPROT_COMMITTED 0x40
1463 #define VPROT_WRITEWATCH 0x80
1464 /* per-mapping protection flags */
1465 #define VPROT_IMAGE 0x0100 /* mapping for an exe image */
1466 #define VPROT_SYSTEM 0x0200 /* system view (underlying mmap not under our control) */
1467 #define VPROT_VALLOC 0x0400 /* allocated by VirtualAlloc */
1468 #define VPROT_NOEXEC 0x0800 /* don't force exec permission
*/
1471 /* Open a mapping
*/
1473 unsigned int access
; /* wanted access rights
*/
1474 unsigned int attributes
; /* object attributes
*/
1475 obj_handle_t rootdir
; /* root directory
*/
1476 VARARG(name
,unicode_str
); /* object name
*/
1478 obj_handle_t handle
; /* handle to the mapping
*/
1482 /* Get information about a file mapping
*/
1483 @
REQ(get_mapping_info
)
1484 obj_handle_t handle
; /* handle to the mapping
*/
1485 unsigned int access
; /* wanted access rights
*/
1487 mem_size_t size
; /* mapping size
*/
1488 int protect
; /* protection flags
*/
1489 int header_size
; /* header
size (for VPROT_IMAGE mapping
) */
1490 client_ptr_t base
; /* default base
addr (for VPROT_IMAGE mapping
) */
1491 obj_handle_t mapping
; /* duplicate mapping handle unless removable
*/
1492 obj_handle_t shared_file
; /* shared mapping file handle
*/
1496 /* Get a range of committed pages in a file mapping
*/
1497 @
REQ(get_mapping_committed_range
)
1498 obj_handle_t handle
; /* handle to the mapping
*/
1499 file_pos_t offset
; /* starting
offset (page
-aligned
, in bytes
) */
1501 mem_size_t size
; /* size of range starting at
offset (page
-aligned
, in bytes
) */
1502 int committed
; /* whether it is a committed range
*/
1506 /* Add a range to the committed pages in a file mapping
*/
1507 @
REQ(add_mapping_committed_range
)
1508 obj_handle_t handle
; /* handle to the mapping
*/
1509 file_pos_t offset
; /* starting
offset (page
-aligned
, in bytes
) */
1510 mem_size_t size
; /* size to
set (page
-aligned
, in bytes
) or
0 if only retrieving
*/
1514 #define SNAP_PROCESS
0x00000001
1515 #define SNAP_THREAD
0x00000002
1516 /* Create a snapshot
*/
1517 @
REQ(create_snapshot
)
1518 unsigned int attributes
; /* object attributes
*/
1519 unsigned int flags
; /* snapshot
flags (SNAP_*)
*/
1521 obj_handle_t handle
; /* handle to the snapshot
*/
1525 /* Get the next process from a snapshot
*/
1527 obj_handle_t handle
; /* handle to the snapshot
*/
1528 int reset
; /* reset snapshot position?
*/
1530 int count
; /* process usage count
*/
1531 process_id_t pid
; /* process id
*/
1532 process_id_t ppid
; /* parent process id
*/
1533 int threads
; /* number of threads
*/
1534 int priority
; /* process priority
*/
1535 int handles
; /* number of handles
*/
1536 VARARG(filename
,unicode_str
); /* file name of main exe
*/
1540 /* Get the next thread from a snapshot
*/
1542 obj_handle_t handle
; /* handle to the snapshot
*/
1543 int reset
; /* reset snapshot position?
*/
1545 int count
; /* thread usage count
*/
1546 process_id_t pid
; /* process id
*/
1547 thread_id_t tid
; /* thread id
*/
1548 int base_pri
; /* base priority
*/
1549 int delta_pri
; /* delta priority
*/
1553 /* Wait for a debug event
*/
1554 @
REQ(wait_debug_event
)
1555 int get_handle
; /* should we alloc a handle for waiting?
*/
1557 process_id_t pid
; /* process id
*/
1558 thread_id_t tid
; /* thread id
*/
1559 obj_handle_t wait
; /* wait handle if no event ready
*/
1560 VARARG(event
,debug_event
); /* debug event data
*/
1564 /* Queue an exception event
*/
1565 @
REQ(queue_exception_event
)
1566 int first
; /* first chance exception?
*/
1567 unsigned int code
; /* exception code
*/
1568 unsigned int flags
; /* exception flags
*/
1569 client_ptr_t record
; /* exception record
*/
1570 client_ptr_t address
; /* exception address
*/
1571 data_size_t len
; /* size of parameters
*/
1572 VARARG(params
,uints64
,len
);/* exception parameters
*/
1573 VARARG(context
,context
); /* thread context
*/
1575 obj_handle_t handle
; /* handle to the queued event
*/
1579 /* Retrieve the status of an exception event
*/
1580 @
REQ(get_exception_status
)
1581 obj_handle_t handle
; /* handle to the queued event
*/
1583 VARARG(context
,context
); /* modified thread context
*/
1587 /* Send an output string to the debugger
*/
1588 @
REQ(output_debug_string
)
1589 data_size_t length
; /* string length
*/
1590 client_ptr_t string
; /* string to
display (in debugged process address space
) */
1594 /* Continue a debug event
*/
1595 @
REQ(continue_debug_event
)
1596 process_id_t pid
; /* process id to continue
*/
1597 thread_id_t tid
; /* thread id to continue
*/
1598 int status
; /* continuation status
*/
1602 /* Start
/stop debugging an existing process
*/
1604 process_id_t pid
; /* id of the process to debug
*/
1605 int attach
; /* 1=attaching
/ 0=detaching from the process
*/
1609 /* Simulate a breakpoint in a process
*/
1611 obj_handle_t handle
; /* process handle
*/
1613 int self
; /* was it the caller itself?
*/
1617 /* Set debugger kill on exit flag
*/
1618 @
REQ(set_debugger_kill_on_exit
)
1619 int kill_on_exit
; /* 0=detach
/1=kill debuggee when debugger dies
*/
1623 /* Read data from a process address space
*/
1624 @
REQ(read_process_memory
)
1625 obj_handle_t handle
; /* process handle
*/
1626 client_ptr_t addr
; /* addr to read from
*/
1628 VARARG(data
,bytes
); /* result data
*/
1632 /* Write data to a process address space
*/
1633 @
REQ(write_process_memory
)
1634 obj_handle_t handle
; /* process handle
*/
1635 client_ptr_t addr
; /* addr to write to
*/
1636 VARARG(data
,bytes
); /* data to write
*/
1640 /* Create a registry key
*/
1642 obj_handle_t parent
; /* handle to the parent key
*/
1643 unsigned int access
; /* desired access rights
*/
1644 unsigned int attributes
; /* object attributes
*/
1645 unsigned int options
; /* creation options
*/
1646 data_size_t namelen
; /* length of key name in bytes
*/
1647 VARARG(name
,unicode_str
,namelen
); /* key name
*/
1648 VARARG(class
,unicode_str
); /* class name
*/
1650 obj_handle_t hkey
; /* handle to the created key
*/
1651 int created
; /* has it been newly created?
*/
1654 /* Open a registry key
*/
1656 obj_handle_t parent
; /* handle to the parent key
*/
1657 unsigned int access
; /* desired access rights
*/
1658 unsigned int attributes
; /* object attributes
*/
1659 VARARG(name
,unicode_str
); /* key name
*/
1661 obj_handle_t hkey
; /* handle to the open key
*/
1665 /* Delete a registry key
*/
1667 obj_handle_t hkey
; /* handle to the key
*/
1671 /* Flush a registry key
*/
1673 obj_handle_t hkey
; /* handle to the key
*/
1677 /* Enumerate registry subkeys
*/
1679 obj_handle_t hkey
; /* handle to registry key
*/
1680 int index
; /* index of
subkey (or
-1 for current key
) */
1681 int info_class
; /* requested information class
*/
1683 int subkeys
; /* number of subkeys
*/
1684 int max_subkey
; /* longest subkey name
*/
1685 int max_class
; /* longest class name
*/
1686 int values
; /* number of values
*/
1687 int max_value
; /* longest value name
*/
1688 int max_data
; /* longest value data
*/
1689 timeout_t modif
; /* last modification time
*/
1690 data_size_t total
; /* total length needed for full name and class
*/
1691 data_size_t namelen
; /* length of key name in bytes
*/
1692 VARARG(name
,unicode_str
,namelen
); /* key name
*/
1693 VARARG(class
,unicode_str
); /* class name
*/
1697 /* Set a value of a registry key
*/
1699 obj_handle_t hkey
; /* handle to registry key
*/
1700 int type
; /* value type
*/
1701 data_size_t namelen
; /* length of value name in bytes
*/
1702 VARARG(name
,unicode_str
,namelen
); /* value name
*/
1703 VARARG(data
,bytes
); /* value data
*/
1707 /* Retrieve the value of a registry key
*/
1709 obj_handle_t hkey
; /* handle to registry key
*/
1710 VARARG(name
,unicode_str
); /* value name
*/
1712 int type
; /* value type
*/
1713 data_size_t total
; /* total length needed for data
*/
1714 VARARG(data
,bytes
); /* value data
*/
1718 /* Enumerate a value of a registry key
*/
1719 @
REQ(enum_key_value
)
1720 obj_handle_t hkey
; /* handle to registry key
*/
1721 int index
; /* value index
*/
1722 int info_class
; /* requested information class
*/
1724 int type
; /* value type
*/
1725 data_size_t total
; /* total length needed for full name and data
*/
1726 data_size_t namelen
; /* length of value name in bytes
*/
1727 VARARG(name
,unicode_str
,namelen
); /* value name
*/
1728 VARARG(data
,bytes
); /* value data
*/
1732 /* Delete a value of a registry key
*/
1733 @
REQ(delete_key_value
)
1734 obj_handle_t hkey
; /* handle to registry key
*/
1735 VARARG(name
,unicode_str
); /* value name
*/
1739 /* Load a registry branch from a file
*/
1741 obj_handle_t hkey
; /* root key to load to
*/
1742 obj_handle_t file
; /* file to load from
*/
1743 VARARG(name
,unicode_str
); /* subkey name
*/
1747 /* UnLoad a registry branch from a file
*/
1748 @
REQ(unload_registry
)
1749 obj_handle_t hkey
; /* root key to unload to
*/
1753 /* Save a registry branch to a file
*/
1755 obj_handle_t hkey
; /* key to save
*/
1756 obj_handle_t file
; /* file to save to
*/
1760 /* Add a registry key change notification
*/
1761 @
REQ(set_registry_notification
)
1762 obj_handle_t hkey
; /* key to watch for changes
*/
1763 obj_handle_t event
; /* event to set
*/
1764 int subtree
; /* should we watch the whole subtree?
*/
1765 unsigned int filter
; /* things to watch
*/
1769 /* Create a waitable timer
*/
1771 unsigned int access
; /* wanted access rights
*/
1772 unsigned int attributes
; /* object attributes
*/
1773 obj_handle_t rootdir
; /* root directory
*/
1774 int manual
; /* manual reset
*/
1775 VARARG(name
,unicode_str
); /* object name
*/
1777 obj_handle_t handle
; /* handle to the timer
*/
1781 /* Open a waitable timer
*/
1783 unsigned int access
; /* wanted access rights
*/
1784 unsigned int attributes
; /* object attributes
*/
1785 obj_handle_t rootdir
; /* root directory
*/
1786 VARARG(name
,unicode_str
); /* object name
*/
1788 obj_handle_t handle
; /* handle to the timer
*/
1791 /* Set a waitable timer
*/
1793 obj_handle_t handle
; /* handle to the timer
*/
1794 timeout_t expire
; /* next expiration absolute time
*/
1795 client_ptr_t callback
; /* callback function
*/
1796 client_ptr_t arg
; /* callback argument
*/
1797 int period
; /* timer period in ms
*/
1799 int signaled
; /* was the timer signaled before this call ?
*/
1802 /* Cancel a waitable timer
*/
1804 obj_handle_t handle
; /* handle to the timer
*/
1806 int signaled
; /* was the timer signaled before this calltime ?
*/
1809 /* Get information on a waitable timer
*/
1810 @
REQ(get_timer_info
)
1811 obj_handle_t handle
; /* handle to the timer
*/
1813 timeout_t when
; /* absolute time when the timer next expires
*/
1814 int signaled
; /* is the timer signaled?
*/
1818 /* Retrieve the current context of a thread
*/
1819 @
REQ(get_thread_context
)
1820 obj_handle_t handle
; /* thread handle
*/
1821 unsigned int flags
; /* context flags
*/
1822 int suspend
; /* if getting context during suspend
*/
1824 int self
; /* was it a handle to the current thread?
*/
1825 VARARG(context
,context
); /* thread context
*/
1829 /* Set the current context of a thread
*/
1830 @
REQ(set_thread_context
)
1831 obj_handle_t handle
; /* thread handle
*/
1832 int suspend
; /* if setting context during suspend
*/
1833 VARARG(context
,context
); /* thread context
*/
1835 int self
; /* was it a handle to the current thread?
*/
1839 /* Fetch a selector entry for a thread
*/
1840 @
REQ(get_selector_entry
)
1841 obj_handle_t handle
; /* thread handle
*/
1842 int entry
; /* LDT entry
*/
1844 unsigned int base
; /* selector base
*/
1845 unsigned int limit
; /* selector limit
*/
1846 unsigned char flags
; /* selector flags
*/
1852 obj_handle_t table
; /* which table to add atom to
*/
1853 VARARG(name
,unicode_str
); /* atom name
*/
1855 atom_t atom
; /* resulting atom
*/
1859 /* Delete an atom
*/
1861 obj_handle_t table
; /* which table to delete atom from
*/
1862 atom_t atom
; /* atom handle
*/
1868 obj_handle_t table
; /* which table to find atom from
*/
1869 VARARG(name
,unicode_str
); /* atom name
*/
1871 atom_t atom
; /* atom handle
*/
1875 /* Get information about an atom
*/
1876 @
REQ(get_atom_information
)
1877 obj_handle_t table
; /* which table to find atom from
*/
1878 atom_t atom
; /* atom handle
*/
1880 int count
; /* atom lock count
*/
1881 int pinned
; /* whether the atom has been pinned
*/
1882 data_size_t total
; /* actual length of atom name
*/
1883 VARARG(name
,unicode_str
); /* atom name
*/
1887 /* Set information about an atom
*/
1888 @
REQ(set_atom_information
)
1889 obj_handle_t table
; /* which table to find atom from
*/
1890 atom_t atom
; /* atom handle
*/
1891 int pinned
; /* whether to bump atom information
*/
1895 /* Empty an atom table
*/
1896 @
REQ(empty_atom_table
)
1897 obj_handle_t table
; /* which table to find atom from
*/
1898 int if_pinned
; /* whether to delete pinned atoms
*/
1902 /* Init an atom table
*/
1903 @
REQ(init_atom_table
)
1904 int entries
; /* number of
entries (only for local
) */
1906 obj_handle_t table
; /* handle to the atom table
*/
1910 /* Get the message queue of the current thread
*/
1913 obj_handle_t handle
; /* handle to the queue
*/
1917 /* Set the file descriptor associated to the current thread queue
*/
1919 obj_handle_t handle
; /* handle to the file descriptor
*/
1923 /* Set the current message queue wakeup mask
*/
1924 @
REQ(set_queue_mask
)
1925 unsigned int wake_mask
; /* wakeup bits mask
*/
1926 unsigned int changed_mask
; /* changed bits mask
*/
1927 int skip_wait
; /* will we skip waiting if signaled?
*/
1929 unsigned int wake_bits
; /* current wake bits
*/
1930 unsigned int changed_bits
; /* current changed bits
*/
1934 /* Get the current message queue status
*/
1935 @
REQ(get_queue_status
)
1936 int clear
; /* should we clear the change bits?
*/
1938 unsigned int wake_bits
; /* wake bits
*/
1939 unsigned int changed_bits
; /* changed bits since last time
*/
1943 /* Retrieve the process idle event
*/
1944 @
REQ(get_process_idle_event
)
1945 obj_handle_t handle
; /* process handle
*/
1947 obj_handle_t event
; /* handle to idle event
*/
1951 /* Send a message to a thread queue
*/
1953 thread_id_t id
; /* thread id
*/
1954 int type
; /* message
type (see below
) */
1955 int flags
; /* message
flags (see below
) */
1956 user_handle_t win
; /* window handle
*/
1957 unsigned int msg
; /* message code
*/
1958 lparam_t wparam
; /* parameters
*/
1959 lparam_t lparam
; /* parameters
*/
1960 timeout_t timeout
; /* timeout for reply
*/
1961 VARARG(data
,message_data
); /* message data for sent messages
*/
1964 @
REQ(post_quit_message
)
1965 int exit_code
; /* exit code to return
*/
1970 MSG_ASCII
, /* Ascii
message (from SendMessageA
) */
1971 MSG_UNICODE
, /* Unicode
message (from SendMessageW
) */
1972 MSG_NOTIFY
, /* notify
message (from SendNotifyMessageW
), always Unicode
*/
1973 MSG_CALLBACK
, /* callback
message (from SendMessageCallbackW
), always Unicode
*/
1974 MSG_CALLBACK_RESULT
,/* result of a callback message
*/
1975 MSG_OTHER_PROCESS
, /* sent from other process
, may include vararg data
, always Unicode
*/
1976 MSG_POSTED
, /* posted
message (from PostMessageW
), always Unicode
*/
1977 MSG_HARDWARE
, /* hardware message
*/
1978 MSG_WINEVENT
/* winevent message
*/
1980 #define SEND_MSG_ABORT_IF_HUNG
0x01
1983 /* Send a hardware message to a thread queue
*/
1984 @
REQ(send_hardware_message
)
1985 thread_id_t id
; /* thread id
*/
1986 user_handle_t win
; /* window handle
*/
1987 unsigned int msg
; /* message code
*/
1988 lparam_t wparam
; /* parameters
*/
1989 lparam_t lparam
; /* parameters
*/
1990 lparam_t info
; /* extra info
*/
1991 int x
; /* x position
*/
1992 int y
; /* y position
*/
1993 unsigned int time
; /* message time
*/
1997 /* Get a message from the current queue
*/
1999 unsigned int flags
; /* PM_
* flags
*/
2000 user_handle_t get_win
; /* window handle to get
*/
2001 unsigned int get_first
; /* first message code to get
*/
2002 unsigned int get_last
; /* last message code to get
*/
2003 unsigned int hw_id
; /* id of the previous hardware
message (or
0) */
2004 unsigned int wake_mask
; /* wakeup bits mask
*/
2005 unsigned int changed_mask
; /* changed bits mask
*/
2007 user_handle_t win
; /* window handle
*/
2008 unsigned int msg
; /* message code
*/
2009 lparam_t wparam
; /* parameters
*/
2010 lparam_t lparam
; /* parameters
*/
2011 int type
; /* message type
*/
2012 unsigned int time
; /* message time
*/
2013 unsigned int active_hooks
; /* active hooks bitmap
*/
2014 data_size_t total
; /* total size of extra data
*/
2015 VARARG(data
,message_data
); /* message data for sent messages
*/
2019 /* Reply to a sent message
*/
2021 int remove
; /* should we remove the message?
*/
2022 lparam_t result
; /* message result
*/
2023 VARARG(data
,bytes
); /* message data for sent messages
*/
2027 /* Accept the current hardware message
*/
2028 @
REQ(accept_hardware_message
)
2029 unsigned int hw_id
; /* id of the hardware message
*/
2030 int remove
; /* should we remove the message?
*/
2031 user_handle_t new_win
; /* new destination window for current message
*/
2035 /* Retrieve the reply for the last message sent
*/
2036 @
REQ(get_message_reply
)
2037 int cancel
; /* cancel message if not ready?
*/
2039 lparam_t result
; /* message result
*/
2040 VARARG(data
,bytes
); /* message data for sent messages
*/
2044 /* Set a window timer
*/
2046 user_handle_t win
; /* window handle
*/
2047 unsigned int msg
; /* message to post
*/
2048 unsigned int rate
; /* timer rate in ms
*/
2049 lparam_t id
; /* timer id
*/
2050 lparam_t lparam
; /* message
lparam (callback proc
) */
2052 lparam_t id
; /* timer id
*/
2056 /* Kill a window timer
*/
2057 @
REQ(kill_win_timer
)
2058 user_handle_t win
; /* window handle
*/
2059 lparam_t id
; /* timer id
*/
2060 unsigned int msg
; /* message to post
*/
2064 /* check if the thread owning the window is hung
*/
2065 @
REQ(is_window_hung
)
2066 user_handle_t win
; /* window handle
*/
2072 /* Retrieve info about a serial port
*/
2073 @
REQ(get_serial_info
)
2074 obj_handle_t handle
; /* handle to comm port
*/
2076 unsigned int readinterval
;
2077 unsigned int readconst
;
2078 unsigned int readmult
;
2079 unsigned int writeconst
;
2080 unsigned int writemult
;
2081 unsigned int eventmask
;
2085 /* Set info about a serial port
*/
2086 @
REQ(set_serial_info
)
2087 obj_handle_t handle
; /* handle to comm port
*/
2088 int flags
; /* bitmask to set
values (see below
) */
2089 unsigned int readinterval
;
2090 unsigned int readconst
;
2091 unsigned int readmult
;
2092 unsigned int writeconst
;
2093 unsigned int writemult
;
2094 unsigned int eventmask
;
2096 #define SERIALINFO_SET_TIMEOUTS
0x01
2097 #define SERIALINFO_SET_MASK
0x02
2100 /* Create an async I
/O
*/
2101 @
REQ(register_async
)
2102 int type
; /* type of queue to look after
*/
2103 async_data_t async
; /* async I
/O parameters
*/
2104 int count
; /* count
- usually # of bytes to be read
/written
*/
2106 #define ASYNC_TYPE_READ
0x01
2107 #define ASYNC_TYPE_WRITE
0x02
2108 #define ASYNC_TYPE_WAIT
0x03
2111 /* Cancel all async op on a fd
*/
2113 obj_handle_t handle
; /* handle to comm port
, socket or file
*/
2114 client_ptr_t iosb
; /* I
/O status
block (NULL
=all
) */
2115 int only_thread
; /* cancel matching this thread
*/
2119 /* Perform an ioctl on a file
*/
2121 ioctl_code_t code
; /* ioctl code
*/
2122 async_data_t async
; /* async I
/O parameters
*/
2123 int blocking
; /* whether it
's a blocking ioctl */
2124 VARARG(in_data,bytes); /* ioctl input data */
2126 obj_handle_t wait; /* handle to wait on for blocking ioctl */
2127 unsigned int options; /* device open options */
2128 VARARG(out_data,bytes); /* ioctl output data */
2132 /* Retrieve results of an async ioctl */
2133 @REQ(get_ioctl_result)
2134 obj_handle_t handle; /* handle to the device */
2135 client_ptr_t user_arg; /* user arg used to identify the request */
2137 VARARG(out_data,bytes); /* ioctl output data */
2141 /* Create a named pipe */
2142 @REQ(create_named_pipe)
2143 unsigned int access;
2144 unsigned int attributes; /* object attributes */
2145 obj_handle_t rootdir; /* root directory */
2146 unsigned int options;
2147 unsigned int maxinstances;
2148 unsigned int outsize;
2149 unsigned int insize;
2152 VARARG(name,unicode_str); /* pipe name */
2154 obj_handle_t handle; /* handle to the pipe */
2157 /* flags in create_named_pipe and get_named_pipe_info */
2158 #define NAMED_PIPE_MESSAGE_STREAM_WRITE 0x0001
2159 #define NAMED_PIPE_MESSAGE_STREAM_READ 0x0002
2160 #define NAMED_PIPE_NONBLOCKING_MODE 0x0004
2161 #define NAMED_PIPE_SERVER_END 0x8000
2164 @REQ(get_named_pipe_info)
2165 obj_handle_t handle;
2168 unsigned int maxinstances;
2169 unsigned int instances;
2170 unsigned int outsize;
2171 unsigned int insize;
2175 /* Create a window */
2177 user_handle_t parent; /* parent window */
2178 user_handle_t owner; /* owner window */
2179 atom_t atom; /* class atom */
2180 mod_handle_t instance; /* module instance */
2181 VARARG(class,unicode_str); /* class name */
2183 user_handle_t handle; /* created window */
2184 user_handle_t parent; /* full handle of parent */
2185 user_handle_t owner; /* full handle of owner */
2186 int extra; /* number of extra bytes */
2187 client_ptr_t class_ptr; /* pointer to class in client address space */
2191 /* Destroy a window */
2192 @REQ(destroy_window)
2193 user_handle_t handle; /* handle to the window */
2197 /* Retrieve the desktop window for the current thread */
2198 @REQ(get_desktop_window)
2199 int force; /* force creation if it doesn't exist
*/
2201 user_handle_t top_window
; /* handle to the desktop window
*/
2202 user_handle_t msg_window
; /* handle to the top
-level HWND_MESSAGE parent
*/
2206 /* Set a window owner
*/
2207 @
REQ(set_window_owner
)
2208 user_handle_t handle
; /* handle to the window
*/
2209 user_handle_t owner
; /* new owner
*/
2211 user_handle_t full_owner
; /* full handle of new owner
*/
2212 user_handle_t prev_owner
; /* full handle of previous owner
*/
2216 /* Get information from a window handle
*/
2217 @
REQ(get_window_info
)
2218 user_handle_t handle
; /* handle to the window
*/
2220 user_handle_t full_handle
; /* full
32-bit handle
*/
2221 user_handle_t last_active
; /* last active popup
*/
2222 process_id_t pid
; /* process owning the window
*/
2223 thread_id_t tid
; /* thread owning the window
*/
2224 atom_t atom
; /* class atom
*/
2225 int is_unicode
; /* ANSI or unicode
*/
2229 /* Set some information in a window
*/
2230 @
REQ(set_window_info
)
2231 unsigned short flags
; /* flags for fields to
set (see below
) */
2232 short int is_unicode
; /* ANSI or unicode
*/
2233 user_handle_t handle
; /* handle to the window
*/
2234 unsigned int style
; /* window style
*/
2235 unsigned int ex_style
; /* window extended style
*/
2236 unsigned int id
; /* window id
*/
2237 mod_handle_t instance
; /* creator instance
*/
2238 lparam_t user_data
; /* user
-specific data
*/
2239 int extra_offset
; /* offset to set in extra bytes
*/
2240 data_size_t extra_size
; /* size to set in extra bytes
*/
2241 lparam_t extra_value
; /* value to set in extra bytes
*/
2243 unsigned int old_style
; /* old window style
*/
2244 unsigned int old_ex_style
; /* old window extended style
*/
2245 mod_handle_t old_instance
; /* old creator instance
*/
2246 lparam_t old_user_data
; /* old user
-specific data
*/
2247 lparam_t old_extra_value
; /* old value in extra bytes
*/
2248 unsigned int old_id
; /* old window id
*/
2250 #define SET_WIN_STYLE
0x01
2251 #define SET_WIN_EXSTYLE
0x02
2252 #define SET_WIN_ID
0x04
2253 #define SET_WIN_INSTANCE
0x08
2254 #define SET_WIN_USERDATA
0x10
2255 #define SET_WIN_EXTRA
0x20
2256 #define SET_WIN_UNICODE
0x40
2259 /* Set the parent of a window
*/
2261 user_handle_t handle
; /* handle to the window
*/
2262 user_handle_t parent
; /* handle to the parent
*/
2264 user_handle_t old_parent
; /* old parent window
*/
2265 user_handle_t full_parent
; /* full handle of new parent
*/
2269 /* Get a list of the window parents
, up to the root of the tree
*/
2270 @
REQ(get_window_parents
)
2271 user_handle_t handle
; /* handle to the window
*/
2273 int count
; /* total count of parents
*/
2274 VARARG(parents
,user_handles
); /* parent handles
*/
2278 /* Get a list of the window children
*/
2279 @
REQ(get_window_children
)
2280 obj_handle_t desktop
; /* handle to desktop
*/
2281 user_handle_t parent
; /* parent window
*/
2282 atom_t atom
; /* class atom for the listed children
*/
2283 thread_id_t tid
; /* thread owning the listed children
*/
2284 VARARG(class
,unicode_str
); /* class name
*/
2286 int count
; /* total count of children
*/
2287 VARARG(children
,user_handles
); /* children handles
*/
2291 /* Get a list of the window children that contain a given point
*/
2292 @
REQ(get_window_children_from_point
)
2293 user_handle_t parent
; /* parent window
*/
2294 int x
; /* point in parent coordinates
*/
2297 int count
; /* total count of children
*/
2298 VARARG(children
,user_handles
); /* children handles
*/
2302 /* Get window tree information from a window handle
*/
2303 @
REQ(get_window_tree
)
2304 user_handle_t handle
; /* handle to the window
*/
2306 user_handle_t parent
; /* parent window
*/
2307 user_handle_t owner
; /* owner window
*/
2308 user_handle_t next_sibling
; /* next sibling in Z
-order
*/
2309 user_handle_t prev_sibling
; /* prev sibling in Z
-order
*/
2310 user_handle_t first_sibling
; /* first sibling in Z
-order
*/
2311 user_handle_t last_sibling
; /* last sibling in Z
-order
*/
2312 user_handle_t first_child
; /* first child
*/
2313 user_handle_t last_child
; /* last child
*/
2316 /* Set the position and Z order of a window
*/
2317 @
REQ(set_window_pos
)
2318 unsigned int flags
; /* SWP_
* flags
*/
2319 user_handle_t handle
; /* handle to the window
*/
2320 user_handle_t previous
; /* previous window in Z order
*/
2321 rectangle_t window
; /* window rectangle
*/
2322 rectangle_t client
; /* client rectangle
*/
2323 VARARG(valid
,rectangles
); /* valid rectangles from WM_NCCALCSIZE
*/
2325 unsigned int new_style
; /* new window style
*/
2326 unsigned int new_ex_style
; /* new window extended style
*/
2330 /* Get the window and client rectangles of a window
*/
2331 @
REQ(get_window_rectangles
)
2332 user_handle_t handle
; /* handle to the window
*/
2334 rectangle_t window
; /* window rectangle
*/
2335 rectangle_t visible
; /* visible part of the window rectangle
*/
2336 rectangle_t client
; /* client rectangle
*/
2340 /* Get the window text
*/
2341 @
REQ(get_window_text
)
2342 user_handle_t handle
; /* handle to the window
*/
2344 VARARG(text
,unicode_str
); /* window text
*/
2348 /* Set the window text
*/
2349 @
REQ(set_window_text
)
2350 user_handle_t handle
; /* handle to the window
*/
2351 VARARG(text
,unicode_str
); /* window text
*/
2355 /* Get the coordinates offset between two windows
*/
2356 @
REQ(get_windows_offset
)
2357 user_handle_t from
; /* handle to the first window
*/
2358 user_handle_t to
; /* handle to the second window
*/
2360 int x
; /* x coordinate offset
*/
2361 int y
; /* y coordinate offset
*/
2365 /* Get the visible region of a window
*/
2366 @
REQ(get_visible_region
)
2367 user_handle_t window
; /* handle to the window
*/
2368 unsigned int flags
; /* DCX flags
*/
2370 user_handle_t top_win
; /* top window to clip against
*/
2371 rectangle_t top_rect
; /* top window visible rect with screen coords
*/
2372 rectangle_t win_rect
; /* window rect in screen coords
*/
2373 data_size_t total_size
; /* total size of the resulting region
*/
2374 VARARG(region
,rectangles
); /* list of rectangles for the
region (in screen coords
) */
2378 /* Get the window region
*/
2379 @
REQ(get_window_region
)
2380 user_handle_t window
; /* handle to the window
*/
2382 data_size_t total_size
; /* total size of the resulting region
*/
2383 VARARG(region
,rectangles
); /* list of rectangles for the region
*/
2387 /* Set the window region
*/
2388 @
REQ(set_window_region
)
2389 user_handle_t window
; /* handle to the window
*/
2390 int redraw
; /* redraw the window?
*/
2391 VARARG(region
,rectangles
); /* list of rectangles for the region
*/
2395 /* Get the window update region
*/
2396 @
REQ(get_update_region
)
2397 user_handle_t window
; /* handle to the window
*/
2398 user_handle_t from_child
; /* child to start searching from
*/
2399 unsigned int flags
; /* update
flags (see below
) */
2401 user_handle_t child
; /* child to
repaint (or window itself
) */
2402 unsigned int flags
; /* resulting update
flags (see below
) */
2403 data_size_t total_size
; /* total size of the resulting region
*/
2404 VARARG(region
,rectangles
); /* list of rectangles for the region
*/
2406 #define UPDATE_NONCLIENT
0x01 /* get region for repainting non
-client area
*/
2407 #define UPDATE_ERASE
0x02 /* get region for erasing client area
*/
2408 #define UPDATE_PAINT
0x04 /* get region for painting client area
*/
2409 #define UPDATE_INTERNALPAINT
0x08 /* get region if internal paint is pending
*/
2410 #define UPDATE_ALLCHILDREN
0x10 /* force repaint of all children
*/
2411 #define UPDATE_NOCHILDREN
0x20 /* don
't try to repaint any children */
2412 #define UPDATE_NOREGION 0x40 /* don't return a region
, only the flags
*/
2413 #define UPDATE_DELAYED_ERASE
0x80 /* still needs erase after BeginPaint
*/
2416 /* Update the z order of a window so that a given rectangle is fully visible
*/
2417 @
REQ(update_window_zorder
)
2418 user_handle_t window
; /* handle to the window
*/
2419 rectangle_t rect
; /* rectangle that must be visible
*/
2423 /* Mark parts of a window as needing a redraw
*/
2425 user_handle_t window
; /* handle to the window
*/
2426 unsigned int flags
; /* RDW_
* flags
*/
2427 VARARG(region
,rectangles
); /* list of rectangles for the region
*/
2431 /* Set a window property
*/
2432 @
REQ(set_window_property
)
2433 user_handle_t window
; /* handle to the window
*/
2434 lparam_t data
; /* data to store
*/
2435 atom_t atom
; /* property
atom (if no name specified
) */
2436 VARARG(name
,unicode_str
); /* property name
*/
2440 /* Remove a window property
*/
2441 @
REQ(remove_window_property
)
2442 user_handle_t window
; /* handle to the window
*/
2443 atom_t atom
; /* property
atom (if no name specified
) */
2444 VARARG(name
,unicode_str
); /* property name
*/
2446 lparam_t data
; /* data stored in property
*/
2450 /* Get a window property
*/
2451 @
REQ(get_window_property
)
2452 user_handle_t window
; /* handle to the window
*/
2453 atom_t atom
; /* property
atom (if no name specified
) */
2454 VARARG(name
,unicode_str
); /* property name
*/
2456 lparam_t data
; /* data stored in property
*/
2460 /* Get the list of properties of a window
*/
2461 @
REQ(get_window_properties
)
2462 user_handle_t window
; /* handle to the window
*/
2464 int total
; /* total number of properties
*/
2465 VARARG(props
,properties
); /* list of properties
*/
2469 /* Create a window station
*/
2470 @
REQ(create_winstation
)
2471 unsigned int flags
; /* window station flags
*/
2472 unsigned int access
; /* wanted access rights
*/
2473 unsigned int attributes
; /* object attributes
*/
2474 VARARG(name
,unicode_str
); /* object name
*/
2476 obj_handle_t handle
; /* handle to the window station
*/
2480 /* Open a handle to a window station
*/
2481 @
REQ(open_winstation
)
2482 unsigned int access
; /* wanted access rights
*/
2483 unsigned int attributes
; /* object attributes
*/
2484 VARARG(name
,unicode_str
); /* object name
*/
2486 obj_handle_t handle
; /* handle to the window station
*/
2490 /* Close a window station
*/
2491 @
REQ(close_winstation
)
2492 obj_handle_t handle
; /* handle to the window station
*/
2496 /* Get the process current window station
*/
2497 @
REQ(get_process_winstation
)
2499 obj_handle_t handle
; /* handle to the window station
*/
2503 /* Set the process current window station
*/
2504 @
REQ(set_process_winstation
)
2505 obj_handle_t handle
; /* handle to the window station
*/
2509 /* Enumerate window stations
*/
2510 @
REQ(enum_winstation
)
2511 unsigned int index
; /* current index
*/
2513 unsigned int next
; /* next index
*/
2514 VARARG(name
,unicode_str
); /* window station name
*/
2518 /* Create a desktop
*/
2519 @
REQ(create_desktop
)
2520 unsigned int flags
; /* desktop flags
*/
2521 unsigned int access
; /* wanted access rights
*/
2522 unsigned int attributes
; /* object attributes
*/
2523 VARARG(name
,unicode_str
); /* object name
*/
2525 obj_handle_t handle
; /* handle to the desktop
*/
2529 /* Open a handle to a desktop
*/
2531 obj_handle_t winsta
; /* window station to
open (null allowed
) */
2532 unsigned int flags
; /* desktop flags
*/
2533 unsigned int access
; /* wanted access rights
*/
2534 unsigned int attributes
; /* object attributes
*/
2535 VARARG(name
,unicode_str
); /* object name
*/
2537 obj_handle_t handle
; /* handle to the desktop
*/
2541 /* Close a desktop
*/
2543 obj_handle_t handle
; /* handle to the desktop
*/
2547 /* Get the thread current desktop
*/
2548 @
REQ(get_thread_desktop
)
2549 thread_id_t tid
; /* thread id
*/
2551 obj_handle_t handle
; /* handle to the desktop
*/
2555 /* Set the thread current desktop
*/
2556 @
REQ(set_thread_desktop
)
2557 obj_handle_t handle
; /* handle to the desktop
*/
2561 /* Enumerate desktops
*/
2563 obj_handle_t winstation
; /* handle to the window station
*/
2564 unsigned int index
; /* current index
*/
2566 unsigned int next
; /* next index
*/
2567 VARARG(name
,unicode_str
); /* window station name
*/
2571 /* Get
/set information about a user
object (window station or desktop
) */
2572 @
REQ(set_user_object_info
)
2573 obj_handle_t handle
; /* handle to the object
*/
2574 unsigned int flags
; /* information to set
*/
2575 unsigned int obj_flags
; /* new object flags
*/
2577 int is_desktop
; /* is object a desktop?
*/
2578 unsigned int old_obj_flags
; /* old object flags
*/
2579 VARARG(name
,unicode_str
); /* object name
*/
2581 #define SET_USER_OBJECT_FLAGS
1
2584 /* Attach (or detach
) thread inputs
*/
2585 @
REQ(attach_thread_input
)
2586 thread_id_t tid_from
; /* thread to be attached
*/
2587 thread_id_t tid_to
; /* thread to which tid_from should be attached
*/
2588 int attach
; /* is it an attach?
*/
2592 /* Get input data for a given thread
*/
2593 @
REQ(get_thread_input
)
2594 thread_id_t tid
; /* id of thread
*/
2596 user_handle_t focus
; /* handle to the focus window
*/
2597 user_handle_t capture
; /* handle to the capture window
*/
2598 user_handle_t active
; /* handle to the active window
*/
2599 user_handle_t foreground
; /* handle to the global foreground window
*/
2600 user_handle_t menu_owner
; /* handle to the menu owner
*/
2601 user_handle_t move_size
; /* handle to the moving
/resizing window
*/
2602 user_handle_t caret
; /* handle to the caret window
*/
2603 rectangle_t rect
; /* caret rectangle
*/
2607 /* Get the time of the last input event
*/
2608 @
REQ(get_last_input_time
)
2614 /* Retrieve queue keyboard state for a given thread
*/
2616 thread_id_t tid
; /* id of thread
*/
2617 int key
; /* optional key code or
-1 */
2619 unsigned char state
; /* state of specified key
*/
2620 VARARG(keystate
,bytes
); /* state array for all the keys
*/
2623 /* Set queue keyboard state for a given thread
*/
2625 thread_id_t tid
; /* id of thread
*/
2626 VARARG(keystate
,bytes
); /* state array for all the keys
*/
2629 /* Set the system foreground window
*/
2630 @
REQ(set_foreground_window
)
2631 user_handle_t handle
; /* handle to the foreground window
*/
2633 user_handle_t previous
; /* handle to the previous foreground window
*/
2634 int send_msg_old
; /* whether we have to send a msg to the old window
*/
2635 int send_msg_new
; /* whether we have to send a msg to the new window
*/
2638 /* Set the current thread focus window
*/
2639 @
REQ(set_focus_window
)
2640 user_handle_t handle
; /* handle to the focus window
*/
2642 user_handle_t previous
; /* handle to the previous focus window
*/
2645 /* Set the current thread active window
*/
2646 @
REQ(set_active_window
)
2647 user_handle_t handle
; /* handle to the active window
*/
2649 user_handle_t previous
; /* handle to the previous active window
*/
2652 /* Set the current thread capture window
*/
2653 @
REQ(set_capture_window
)
2654 user_handle_t handle
; /* handle to the capture window
*/
2655 unsigned int flags
; /* capture
flags (see below
) */
2657 user_handle_t previous
; /* handle to the previous capture window
*/
2658 user_handle_t full_handle
; /* full
32-bit handle of new capture window
*/
2660 #define CAPTURE_MENU
0x01 /* capture is for a menu
*/
2661 #define CAPTURE_MOVESIZE
0x02 /* capture is for moving
/resizing
*/
2664 /* Set the current thread caret window
*/
2665 @
REQ(set_caret_window
)
2666 user_handle_t handle
; /* handle to the caret window
*/
2667 int width
; /* caret width
*/
2668 int height
; /* caret height
*/
2670 user_handle_t previous
; /* handle to the previous caret window
*/
2671 rectangle_t old_rect
; /* previous caret rectangle
*/
2672 int old_hide
; /* previous hide count
*/
2673 int old_state
; /* previous caret
state (1=on
, 0=off
) */
2677 /* Set the current thread caret information
*/
2678 @
REQ(set_caret_info
)
2679 unsigned int flags
; /* caret
flags (see below
) */
2680 user_handle_t handle
; /* handle to the caret window
*/
2681 int x
; /* caret x position
*/
2682 int y
; /* caret y position
*/
2683 int hide
; /* increment for hide
count (can be negative to show it
) */
2684 int state
; /* caret
state (1=on
, 0=off
, -1=toggle current state
) */
2686 user_handle_t full_handle
; /* handle to the current caret window
*/
2687 rectangle_t old_rect
; /* previous caret rectangle
*/
2688 int old_hide
; /* previous hide count
*/
2689 int old_state
; /* previous caret
state (1=on
, 0=off
) */
2691 #define SET_CARET_POS
0x01 /* set the caret position from x
,y
*/
2692 #define SET_CARET_HIDE
0x02 /* increment the caret hide count
*/
2693 #define SET_CARET_STATE
0x04 /* set the caret on
/off state
*/
2696 /* Set a window hook
*/
2698 int id
; /* id of the hook
*/
2699 process_id_t pid
; /* id of process to set the hook into
*/
2700 thread_id_t tid
; /* id of thread to set the hook into
*/
2703 client_ptr_t proc
; /* hook procedure
*/
2705 int unicode
; /* is it a unicode hook?
*/
2706 VARARG(module
,unicode_str
); /* module name
*/
2708 user_handle_t handle
; /* handle to the hook
*/
2709 unsigned int active_hooks
; /* active hooks bitmap
*/
2713 /* Remove a window hook
*/
2715 user_handle_t handle
; /* handle to the hook
*/
2716 client_ptr_t proc
; /* hook procedure if handle is
0 */
2717 int id
; /* id of the hook if handle is
0 */
2719 unsigned int active_hooks
; /* active hooks bitmap
*/
2723 /* Start calling a hook chain
*/
2724 @
REQ(start_hook_chain
)
2725 int id
; /* id of the hook
*/
2726 int event
; /* signalled event
*/
2727 user_handle_t window
; /* handle to the event window
*/
2728 int object_id
; /* object id for out of context winevent
*/
2729 int child_id
; /* child id for out of context winevent
*/
2731 user_handle_t handle
; /* handle to the next hook
*/
2732 process_id_t pid
; /* process id for low
-level keyboard
/mouse hooks
*/
2733 thread_id_t tid
; /* thread id for low
-level keyboard
/mouse hooks
*/
2734 int unicode
; /* is it a unicode hook?
*/
2735 client_ptr_t proc
; /* hook procedure
*/
2736 unsigned int active_hooks
; /* active hooks bitmap
*/
2737 VARARG(module
,unicode_str
); /* module name
*/
2741 /* Finished calling a hook chain
*/
2742 @
REQ(finish_hook_chain
)
2743 int id
; /* id of the hook
*/
2747 /* Get the hook information
*/
2749 user_handle_t handle
; /* handle to the current hook
*/
2750 int get_next
; /* do we want info about current or next hook?
*/
2751 int event
; /* signalled event
*/
2752 user_handle_t window
; /* handle to the event window
*/
2753 int object_id
; /* object id for out of context winevent
*/
2754 int child_id
; /* child id for out of context winevent
*/
2756 user_handle_t handle
; /* handle to the hook
*/
2757 int id
; /* id of the hook
*/
2758 process_id_t pid
; /* process id for low
-level keyboard
/mouse hooks
*/
2759 thread_id_t tid
; /* thread id for low
-level keyboard
/mouse hooks
*/
2760 client_ptr_t proc
; /* hook procedure
*/
2761 int unicode
; /* is it a unicode hook?
*/
2762 VARARG(module
,unicode_str
); /* module name
*/
2766 /* Create a window class
*/
2768 int local
; /* is it a local class?
*/
2769 atom_t atom
; /* class atom
*/
2770 unsigned int style
; /* class style
*/
2771 mod_handle_t instance
; /* module instance
*/
2772 int extra
; /* number of extra class bytes
*/
2773 int win_extra
; /* number of window extra bytes
*/
2774 client_ptr_t client_ptr
; /* pointer to class in client address space
*/
2775 VARARG(name
,unicode_str
); /* class name
*/
2777 atom_t atom
; /* resulting class atom
*/
2781 /* Destroy a window class
*/
2783 atom_t atom
; /* class atom
*/
2784 mod_handle_t instance
; /* module instance
*/
2785 VARARG(name
,unicode_str
); /* class name
*/
2787 client_ptr_t client_ptr
; /* pointer to class in client address space
*/
2791 /* Set some information in a class
*/
2792 @
REQ(set_class_info
)
2793 user_handle_t window
; /* handle to the window
*/
2794 unsigned int flags
; /* flags for info to
set (see below
) */
2795 atom_t atom
; /* class atom
*/
2796 unsigned int style
; /* class style
*/
2797 int win_extra
; /* number of window extra bytes
*/
2798 mod_handle_t instance
; /* module instance
*/
2799 int extra_offset
; /* offset to set in extra bytes
*/
2800 data_size_t extra_size
; /* size to set in extra bytes
*/
2801 lparam_t extra_value
; /* value to set in extra bytes
*/
2803 atom_t old_atom
; /* previous class atom
*/
2804 unsigned int old_style
; /* previous class style
*/
2805 int old_extra
; /* previous number of class extra bytes
*/
2806 int old_win_extra
; /* previous number of window extra bytes
*/
2807 mod_handle_t old_instance
; /* previous module instance
*/
2808 lparam_t old_extra_value
; /* old value in extra bytes
*/
2810 #define SET_CLASS_ATOM
0x0001
2811 #define SET_CLASS_STYLE
0x0002
2812 #define SET_CLASS_WINEXTRA
0x0004
2813 #define SET_CLASS_INSTANCE
0x0008
2814 #define SET_CLASS_EXTRA
0x0010
2817 /* Set
/get clipboard information
*/
2818 @
REQ(set_clipboard_info
)
2819 unsigned int flags
; /* flags for fields to
set (see below
) */
2820 user_handle_t clipboard
; /* clipboard window
*/
2821 user_handle_t owner
; /* clipboard owner
*/
2822 user_handle_t viewer
; /* first clipboard viewer
*/
2823 unsigned int seqno
; /* change sequence number
*/
2825 unsigned int flags
; /* status
flags (see below
) */
2826 user_handle_t old_clipboard
; /* old clipboard window
*/
2827 user_handle_t old_owner
; /* old clipboard owner
*/
2828 user_handle_t old_viewer
; /* old clipboard viewer
*/
2829 unsigned int seqno
; /* current sequence number
*/
2832 #define SET_CB_OPEN
0x001
2833 #define SET_CB_OWNER
0x002
2834 #define SET_CB_VIEWER
0x004
2835 #define SET_CB_SEQNO
0x008
2836 #define SET_CB_RELOWNER
0x010
2837 #define SET_CB_CLOSE
0x020
2838 #define CB_OPEN
0x040
2839 #define CB_OWNER
0x080
2840 #define CB_PROCESS
0x100
2843 /* Open a security token
*/
2845 obj_handle_t handle
; /* handle to the thread or process
*/
2846 unsigned int access
; /* access rights to the new token
*/
2847 unsigned int attributes
;/* object attributes
*/
2848 unsigned int flags
; /* flags (see below
) */
2850 obj_handle_t token
; /* handle to the token
*/
2852 #define OPEN_TOKEN_THREAD
1
2853 #define OPEN_TOKEN_AS_SELF
2
2856 /* Set
/get the global windows
*/
2857 @
REQ(set_global_windows
)
2858 unsigned int flags
; /* flags for fields to
set (see below
) */
2859 user_handle_t shell_window
; /* handle to the new shell window
*/
2860 user_handle_t shell_listview
; /* handle to the new shell listview window
*/
2861 user_handle_t progman_window
; /* handle to the new program manager window
*/
2862 user_handle_t taskman_window
; /* handle to the new task manager window
*/
2864 user_handle_t old_shell_window
; /* handle to the shell window
*/
2865 user_handle_t old_shell_listview
; /* handle to the shell listview window
*/
2866 user_handle_t old_progman_window
; /* handle to the new program manager window
*/
2867 user_handle_t old_taskman_window
; /* handle to the new task manager window
*/
2869 #define SET_GLOBAL_SHELL_WINDOWS
0x01 /* set both main shell and listview windows
*/
2870 #define SET_GLOBAL_PROGMAN_WINDOW
0x02
2871 #define SET_GLOBAL_TASKMAN_WINDOW
0x04
2873 /* Adjust the privileges held by a token
*/
2874 @
REQ(adjust_token_privileges
)
2875 obj_handle_t handle
; /* handle to the token
*/
2876 int disable_all
; /* disable all privileges?
*/
2877 int get_modified_state
; /* get modified privileges?
*/
2878 VARARG(privileges
,LUID_AND_ATTRIBUTES
); /* privileges to enable
/disable
/remove
*/
2880 unsigned int len
; /* total length in bytes required to store token privileges
*/
2881 VARARG(privileges
,LUID_AND_ATTRIBUTES
); /* modified privileges
*/
2884 /* Retrieves the set of privileges held by or available to a token
*/
2885 @
REQ(get_token_privileges
)
2886 obj_handle_t handle
; /* handle to the token
*/
2888 unsigned int len
; /* total length in bytes required to store token privileges
*/
2889 VARARG(privileges
,LUID_AND_ATTRIBUTES
); /* privileges held by or available to a token
*/
2892 /* Check the token has the required privileges
*/
2893 @
REQ(check_token_privileges
)
2894 obj_handle_t handle
; /* handle to the token
*/
2895 int all_required
; /* are all the privileges required for the check to succeed?
*/
2896 VARARG(privileges
,LUID_AND_ATTRIBUTES
); /* privileges to check
*/
2898 int has_privileges
; /* does the token have the required privileges?
*/
2899 VARARG(privileges
,LUID_AND_ATTRIBUTES
); /* privileges held by or available to a token
*/
2902 @
REQ(duplicate_token
)
2903 obj_handle_t handle
; /* handle to the token to duplicate
*/
2904 unsigned int access
; /* access rights to the new token
*/
2905 unsigned int attributes
; /* object attributes
*/
2906 int primary
; /* is the new token to be a primary one?
*/
2907 int impersonation_level
; /* impersonation level of the new token
*/
2909 obj_handle_t new_handle
; /* duplicated handle
*/
2913 obj_handle_t handle
; /* handle to the token
*/
2914 unsigned int desired_access
; /* desired access to the object
*/
2915 unsigned int mapping_read
; /* mapping from generic read to specific rights
*/
2916 unsigned int mapping_write
; /* mapping from generic write to specific rights
*/
2917 unsigned int mapping_execute
; /* mapping from generic execute to specific rights
*/
2918 unsigned int mapping_all
; /* mapping from generic all to specific rights
*/
2919 VARARG(sd
,security_descriptor
); /* security descriptor to check
*/
2921 unsigned int access_granted
; /* access rights actually granted
*/
2922 unsigned int access_status
; /* was access granted?
*/
2923 unsigned int privileges_len
; /* length needed to store privileges
*/
2924 VARARG(privileges
,LUID_AND_ATTRIBUTES
); /* privileges used during access check
*/
2927 @
REQ(get_token_user
)
2928 obj_handle_t handle
; /* handle to the token
*/
2930 data_size_t user_len
; /* length needed to store user
*/
2931 VARARG(user
,SID
); /* sid of the user the token represents
*/
2934 @
REQ(get_token_groups
)
2935 obj_handle_t handle
; /* handle to the token
*/
2937 data_size_t user_len
; /* length needed to store user
*/
2938 VARARG(user
,token_groups
); /* groups the token
's user belongs to */
2941 @REQ(get_token_default_dacl)
2942 obj_handle_t handle; /* handle to the token */
2944 data_size_t acl_len; /* length needed to store access control list */
2945 VARARG(acl,ACL); /* access control list */
2948 @REQ(set_token_default_dacl)
2949 obj_handle_t handle; /* handle to the token */
2950 VARARG(acl,ACL); /* default dacl to set */
2953 @REQ(set_security_object)
2954 obj_handle_t handle; /* handle to the object */
2955 unsigned int security_info; /* which parts of security descriptor to set */
2956 VARARG(sd,security_descriptor); /* security descriptor to set */
2959 @REQ(get_security_object)
2960 obj_handle_t handle; /* handle to the object */
2961 unsigned int security_info; /* which parts of security descriptor to get */
2963 unsigned int sd_len; /* buffer size needed for sd */
2964 VARARG(sd,security_descriptor); /* retrieved security descriptor */
2967 /* Create a mailslot */
2968 @REQ(create_mailslot)
2969 unsigned int access; /* wanted access rights */
2970 unsigned int attributes; /* object attributes */
2971 obj_handle_t rootdir; /* root directory */
2972 timeout_t read_timeout;
2973 unsigned int max_msgsize;
2974 VARARG(name,unicode_str); /* mailslot name */
2976 obj_handle_t handle; /* handle to the mailslot */
2980 /* Set mailslot information */
2981 @REQ(set_mailslot_info)
2982 obj_handle_t handle; /* handle to the mailslot */
2983 timeout_t read_timeout;
2986 timeout_t read_timeout;
2987 unsigned int max_msgsize;
2989 #define MAILSLOT_SET_READ_TIMEOUT 1
2992 /* Create a directory object */
2993 @REQ(create_directory)
2994 unsigned int access; /* access flags */
2995 unsigned int attributes; /* object attributes */
2996 obj_handle_t rootdir; /* root directory */
2997 VARARG(directory_name,unicode_str); /* Directory name */
2999 obj_handle_t handle; /* handle to the directory */
3003 /* Open a directory object */
3004 @REQ(open_directory)
3005 unsigned int access; /* access flags */
3006 unsigned int attributes; /* object attributes */
3007 obj_handle_t rootdir; /* root directory */
3008 VARARG(directory_name,unicode_str); /* Directory name */
3010 obj_handle_t handle; /* handle to the directory */
3014 /* Get a directory entry by index */
3015 @REQ(get_directory_entry)
3016 obj_handle_t handle; /* handle to the directory */
3017 unsigned int index; /* entry index */
3019 data_size_t name_len; /* length of the entry name in bytes */
3020 VARARG(name,unicode_str,name_len); /* entry name */
3021 VARARG(type,unicode_str); /* entry type */
3025 /* Create a symbolic link object */
3026 @REQ(create_symlink)
3027 unsigned int access; /* access flags */
3028 unsigned int attributes; /* object attributes */
3029 obj_handle_t rootdir; /* root directory */
3030 data_size_t name_len; /* length of the symlink name in bytes */
3031 VARARG(name,unicode_str,name_len); /* symlink name */
3032 VARARG(target_name,unicode_str); /* target name */
3034 obj_handle_t handle; /* handle to the symlink */
3038 /* Open a symbolic link object */
3040 unsigned int access; /* access flags */
3041 unsigned int attributes; /* object attributes */
3042 obj_handle_t rootdir; /* root directory */
3043 VARARG(name,unicode_str); /* symlink name */
3045 obj_handle_t handle; /* handle to the symlink */
3049 /* Query a symbolic link object */
3051 obj_handle_t handle; /* handle to the symlink */
3053 VARARG(target_name,unicode_str); /* target name */
3057 /* Query basic object information */
3058 @REQ(get_object_info)
3059 obj_handle_t handle; /* handle to the object */
3061 unsigned int access; /* granted access mask */
3062 unsigned int ref_count; /* object ref count */
3066 /* Unlink a named object */
3068 obj_handle_t handle; /* handle to the object */
3072 /* Query the impersonation level of an impersonation token */
3073 @REQ(get_token_impersonation_level)
3074 obj_handle_t handle; /* handle to the object */
3076 int impersonation_level; /* impersonation level of the impersonation token */
3079 /* Allocate a locally-unique identifier */
3080 @REQ(allocate_locally_unique_id)
3086 /* Create a device manager */
3087 @REQ(create_device_manager)
3088 unsigned int access; /* wanted access rights */
3089 unsigned int attributes; /* object attributes */
3091 obj_handle_t handle; /* handle to the device */
3095 /* Create a device */
3097 unsigned int access; /* wanted access rights */
3098 unsigned int attributes; /* object attributes */
3099 obj_handle_t rootdir; /* root directory */
3100 client_ptr_t user_ptr; /* opaque ptr for use by client */
3101 obj_handle_t manager; /* device manager */
3102 VARARG(name,unicode_str); /* object name */
3104 obj_handle_t handle; /* handle to the device */
3108 /* Delete a device */
3110 obj_handle_t handle; /* handle to the device */
3114 /* Retrieve the next pending device ioctl request */
3115 @REQ(get_next_device_request)
3116 obj_handle_t manager; /* handle to the device manager */
3117 obj_handle_t prev; /* handle to the previous ioctl */
3118 unsigned int status; /* status of the previous ioctl */
3119 VARARG(prev_data,bytes); /* output data of the previous ioctl */
3121 obj_handle_t next; /* handle to the next ioctl */
3122 ioctl_code_t code; /* ioctl code */
3123 client_ptr_t user_ptr; /* opaque ptr for the device */
3124 data_size_t in_size; /* total needed input size */
3125 data_size_t out_size; /* needed output size */
3126 VARARG(next_data,bytes); /* input data of the next ioctl */
3130 /* Make the current process a system process */
3131 @REQ(make_process_system)
3133 obj_handle_t event; /* event signaled when all user processes have exited */
3137 /* Get detailed fixed-size information about a token */
3138 @REQ(get_token_statistics)
3139 obj_handle_t handle; /* handle to the object */
3141 luid_t token_id; /* locally-unique identifier of the token */
3142 luid_t modified_id; /* locally-unique identifier of the modified version of the token */
3143 int primary; /* is the token primary or impersonation? */
3144 int impersonation_level; /* level of impersonation */
3145 int group_count; /* the number of groups the token is a member of */
3146 int privilege_count; /* the number of privileges the token has */
3150 /* Create I/O completion port */
3151 @REQ(create_completion)
3152 unsigned int access; /* desired access to a port */
3153 unsigned int attributes; /* object attributes */
3154 unsigned int concurrent; /* max number of concurrent active threads */
3155 obj_handle_t rootdir; /* root directory */
3156 VARARG(filename,string); /* port name */
3158 obj_handle_t handle; /* port handle */
3162 /* Open I/O completion port */
3163 @REQ(open_completion)
3164 unsigned int access; /* desired access to a port */
3165 unsigned int attributes; /* object attributes */
3166 obj_handle_t rootdir; /* root directory */
3167 VARARG(filename,string); /* port name */
3169 obj_handle_t handle; /* port handle */
3173 /* add completion to completion port */
3174 @REQ(add_completion)
3175 obj_handle_t handle; /* port handle */
3176 apc_param_t ckey; /* completion key */
3177 apc_param_t cvalue; /* completion value */
3178 unsigned int information; /* IO_STATUS_BLOCK Information */
3179 unsigned int status; /* completion result */
3183 /* get completion from completion port queue */
3184 @REQ(remove_completion)
3185 obj_handle_t handle; /* port handle */
3187 apc_param_t ckey; /* completion key */
3188 apc_param_t cvalue; /* completion value */
3189 unsigned int information; /* IO_STATUS_BLOCK Information */
3190 unsigned int status; /* completion result */
3194 /* get completion queue depth */
3195 @REQ(query_completion)
3196 obj_handle_t handle; /* port handle */
3198 unsigned int depth; /* completion queue depth */
3202 /* associate object with completion port */
3203 @REQ(set_completion_info)
3204 obj_handle_t handle; /* object handle */
3205 apc_param_t ckey; /* completion key */
3206 obj_handle_t chandle; /* port handle */
3210 /* check for associated completion and push msg */
3211 @REQ(add_fd_completion)
3212 obj_handle_t handle; /* async' object
*/
3213 apc_param_t cvalue
; /* completion value
*/
3214 unsigned int status
; /* completion status
*/
3215 unsigned int information
; /* IO_STATUS_BLOCK Information
*/
3219 /* Retrieve layered info for a window
*/
3220 @
REQ(get_window_layered_info
)
3221 user_handle_t handle
; /* handle to the window
*/
3223 unsigned int color_key
; /* color key
*/
3224 unsigned int alpha
; /* alpha (0.
.255) */
3225 unsigned int flags
; /* LWA_
* flags
*/
3229 /* Set layered info for a window
*/
3230 @
REQ(set_window_layered_info
)
3231 user_handle_t handle
; /* handle to the window
*/
3232 unsigned int color_key
; /* color key
*/
3233 unsigned int alpha
; /* alpha (0.
.255) */
3234 unsigned int flags
; /* LWA_
* flags
*/
3238 /* Allocate an arbitrary user handle
*/
3239 @
REQ(alloc_user_handle
)
3241 user_handle_t handle
; /* allocated handle
*/
3245 /* Free an arbitrary user handle
*/
3246 @
REQ(free_user_handle
)
3247 user_handle_t handle
; /* handle to free
*/