3 * Wine server protocol definition
5 * Copyright (C
) 2001 Alexandre Julliard
7 * This file is used by tools
/make_requests to build the
8 * protocol structures in include
/wine
/server_protocol.h
10 * This library is free software
; you can redistribute it and
/or
11 * modify it under the terms of the GNU Lesser General Public
12 * License as published by the Free Software Foundation
; either
13 * version
2.1 of the License
, or (at your option
) any later version.
15 * This library is distributed in the hope that it will be useful
,
16 * but WITHOUT ANY WARRANTY
; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU
18 * Lesser General Public License for more details.
20 * You should have received a copy of the GNU Lesser General Public
21 * License along with this library
; if not
, write to the Free Software
22 * Foundation
, Inc.
, 51 Franklin St
, Fifth Floor
, Boston
, MA
02110-1301, USA
25 @HEADER
/* start of C declarations
*/
34 typedef unsigned int obj_handle_t
;
35 typedef unsigned int user_handle_t
;
36 typedef unsigned int atom_t
;
37 typedef unsigned int process_id_t
;
38 typedef unsigned int thread_id_t
;
39 typedef unsigned int data_size_t
;
40 typedef unsigned int ioctl_code_t
;
41 typedef unsigned __int64 lparam_t
;
42 typedef unsigned __int64 apc_param_t
;
43 typedef unsigned __int64 mem_size_t
;
44 typedef unsigned __int64 file_pos_t
;
45 typedef unsigned __int64 client_ptr_t
;
46 typedef unsigned __int64 affinity_t
;
47 typedef client_ptr_t mod_handle_t
;
51 int req
; /* request code
*/
52 data_size_t request_size
; /* request variable part size
*/
53 data_size_t reply_size
; /* reply variable part maximum size
*/
58 unsigned int error
; /* error result
*/
59 data_size_t reply_size
; /* reply variable part size
*/
62 /* placeholder structure for the maximum allowed request size
*/
63 /* this is used to construct the generic_request union
*/
64 struct request_max_size
66 int pad
[16]; /* the max request size is
16 ints
*/
69 #define FIRST_USER_HANDLE
0x0020 /* first possible value for low word of user handle
*/
70 #define LAST_USER_HANDLE
0xffef /* last possible value for low word of user handle
*/
73 /* debug event data
*/
76 int code
; /* event code
*/
79 int code
; /* EXCEPTION_DEBUG_EVENT
*/
80 int first
; /* first chance exception?
*/
81 unsigned int exc_code
; /* exception code
*/
82 unsigned int flags
; /* exception flags
*/
83 client_ptr_t record
; /* exception record
*/
84 client_ptr_t address
; /* exception address
*/
85 int nb_params
; /* number of parameters
*/
87 client_ptr_t params
[15]; /* parameters
*/
91 int code
; /* CREATE_THREAD_DEBUG_EVENT
*/
92 obj_handle_t handle
; /* handle to the new thread
*/
93 client_ptr_t teb
; /* thread
teb (in debugged process address space
) */
94 client_ptr_t start
; /* thread startup routine
*/
98 int code
; /* CREATE_PROCESS_DEBUG_EVENT
*/
99 obj_handle_t file
; /* handle to the process exe file
*/
100 obj_handle_t process
; /* handle to the new process
*/
101 obj_handle_t thread
; /* handle to the new thread
*/
102 mod_handle_t base
; /* base of executable image
*/
103 int dbg_offset
; /* offset of debug info in file
*/
104 int dbg_size
; /* size of debug info
*/
105 client_ptr_t teb
; /* thread
teb (in debugged process address space
) */
106 client_ptr_t start
; /* thread startup routine
*/
107 client_ptr_t name
; /* image
name (optional
) */
108 int unicode
; /* is it Unicode?
*/
112 int code
; /* EXIT_THREAD_DEBUG_EVENT
/EXIT_PROCESS_DEBUG_EVENT
*/
113 int exit_code
; /* thread or process exit code
*/
117 int code
; /* LOAD_DLL_DEBUG_EVENT
*/
118 obj_handle_t handle
; /* file handle for the dll
*/
119 mod_handle_t base
; /* base address of the dll
*/
120 int dbg_offset
; /* offset of debug info in file
*/
121 int dbg_size
; /* size of debug info
*/
122 client_ptr_t name
; /* image
name (optional
) */
123 int unicode
; /* is it Unicode?
*/
127 int code
; /* UNLOAD_DLL_DEBUG_EVENT
*/
129 mod_handle_t base
; /* base address of the dll
*/
133 int code
; /* OUTPUT_DEBUG_STRING_EVENT
*/
134 data_size_t length
; /* string length
*/
135 client_ptr_t string
; /* string to
display (in debugged process address space
) */
139 int code
; /* RIP_EVENT
*/
145 /* supported CPU types
*/
148 CPU_x86
, CPU_x86_64
, CPU_POWERPC
, CPU_ARM
, CPU_SPARC
150 typedef int cpu_type_t
;
155 cpu_type_t cpu
; /* cpu type
*/
156 unsigned int flags
; /* SERVER_CTX_
* flags
*/
159 struct
{ unsigned int eip
, ebp
, esp
, eflags
, cs
, ss
; } i386_regs
;
160 struct
{ unsigned __int64 rip
, rbp
, rsp
;
161 unsigned int cs
, ss
, flags
, __pad
; } x86_64_regs
;
162 struct
{ unsigned int iar
, msr
, ctr
, lr
, dar
, dsisr
, trap
, __pad
; } powerpc_regs
;
163 struct
{ unsigned int sp
, lr
, pc
, cpsr
; } arm_regs
;
164 struct
{ unsigned int psr
, pc
, npc
, y
, wim
, tbr
; } sparc_regs
;
165 } ctl
; /* selected by SERVER_CTX_CONTROL
*/
168 struct
{ unsigned int eax
, ebx
, ecx
, edx
, esi
, edi
; } i386_regs
;
169 struct
{ unsigned __int64 rax
,rbx
, rcx
, rdx
, rsi
, rdi
,
170 r8
, r9
, r10
, r11
, r12
, r13
, r14
, r15
; } x86_64_regs
;
171 struct
{ unsigned int gpr
[32], cr
, xer
; } powerpc_regs
;
172 struct
{ unsigned int r
[13]; } arm_regs
;
173 struct
{ unsigned int g
[8], o
[8], l
[8], i
[8]; } sparc_regs
;
174 } integer
; /* selected by SERVER_CTX_INTEGER
*/
177 struct
{ unsigned int ds
, es
, fs
, gs
; } i386_regs
;
178 struct
{ unsigned int ds
, es
, fs
, gs
; } x86_64_regs
;
179 } seg
; /* selected by SERVER_CTX_SEGMENTS
*/
182 struct
{ unsigned int ctrl
, status
, tag
, err_off
, err_sel
, data_off
, data_sel
, cr0npx
;
183 unsigned char regs
[80]; } i386_regs
;
184 struct
{ struct
{ unsigned __int64 low
, high
; } fpregs
[32]; } x86_64_regs
;
185 struct
{ double fpr
[32], fpscr
; } powerpc_regs
;
186 } fp
; /* selected by SERVER_CTX_FLOATING_POINT
*/
189 struct
{ unsigned int dr0
, dr1
, dr2
, dr3
, dr6
, dr7
; } i386_regs
;
190 struct
{ unsigned __int64 dr0
, dr1
, dr2
, dr3
, dr6
, dr7
; } x86_64_regs
;
191 struct
{ unsigned int dr
[8]; } powerpc_regs
;
192 } debug
; /* selected by SERVER_CTX_DEBUG_REGISTERS
*/
195 unsigned char i386_regs
[512];
196 } ext
; /* selected by SERVER_CTX_EXTENDED_REGISTERS
*/
199 #define SERVER_CTX_CONTROL
0x01
200 #define SERVER_CTX_INTEGER
0x02
201 #define SERVER_CTX_SEGMENTS
0x04
202 #define SERVER_CTX_FLOATING_POINT
0x08
203 #define SERVER_CTX_DEBUG_REGISTERS
0x10
204 #define SERVER_CTX_EXTENDED_REGISTERS
0x20
206 /* structure used in sending an fd from client to server
*/
209 thread_id_t tid
; /* thread id
*/
210 int fd
; /* file descriptor on client
-side
*/
213 /* structure sent by the server on the wait fifo
*/
216 client_ptr_t cookie
; /* magic cookie that was passed in select_request
*/
217 int signaled
; /* wait result
*/
221 /* NT
-style timeout
, in
100ns units
, negative means relative timeout
*/
222 typedef __int64 timeout_t
;
223 #define
TIMEOUT_INFINITE (((timeout_t
)0x7fffffff) << 32 |
0xffffffff)
225 /* structure for process startup info
*/
228 unsigned int debug_flags
;
229 unsigned int console_flags
;
230 obj_handle_t console
;
232 obj_handle_t hstdout
;
233 obj_handle_t hstderr
;
240 unsigned int attribute
;
243 data_size_t curdir_len
;
244 data_size_t dllpath_len
;
245 data_size_t imagepath_len
;
246 data_size_t cmdline_len
;
247 data_size_t title_len
;
248 data_size_t desktop_len
;
249 data_size_t shellinfo_len
;
250 data_size_t runtime_len
;
251 /* VARARG(curdir
,unicode_str
,curdir_len
); */
252 /* VARARG(dllpath
,unicode_str
,dllpath_len
); */
253 /* VARARG(imagepath
,unicode_str
,imagepath_len
); */
254 /* VARARG(cmdline
,unicode_str
,cmdline_len
); */
255 /* VARARG(title
,unicode_str
,title_len
); */
256 /* VARARG(desktop
,unicode_str
,desktop_len
); */
257 /* VARARG(shellinfo
,unicode_str
,shellinfo_len
); */
258 /* VARARG(runtime
,unicode_str
,runtime_len
); */
261 /* structure returned in the list of window properties
*/
264 atom_t atom
; /* property atom
*/
265 int string
; /* was atom a string originally?
*/
266 lparam_t data
; /* data stored in property
*/
269 /* structure to specify window rectangles
*/
278 /* structure for parameters of async I
/O calls
*/
281 obj_handle_t handle
; /* object to perform I
/O on
*/
282 obj_handle_t event
; /* event to signal when done
*/
283 client_ptr_t callback
; /* client
-side callback to call upon end of async
*/
284 client_ptr_t iosb
; /* I
/O status block in client addr space
*/
285 client_ptr_t arg
; /* opaque user data to pass to callback
*/
286 apc_param_t cvalue
; /* completion value to use for completion events
*/
289 /* structures for extra message data
*/
291 struct hardware_msg_data
293 lparam_t info
; /* extra info
*/
294 int x
; /* x position
*/
295 int y
; /* y position
*/
296 unsigned int hw_id
; /* unique id
*/
297 unsigned int flags
; /* hook flags
*/
303 int type
; /* RIM_TYPEMOUSE
*/
304 int x
; /* x coordinate
*/
305 int y
; /* y coordinate
*/
306 unsigned int data
; /* mouse data
*/
311 struct callback_msg_data
313 client_ptr_t callback
; /* callback function
*/
314 lparam_t data
; /* user data for callback
*/
315 lparam_t result
; /* message result
*/
318 struct winevent_msg_data
320 user_handle_t hook
; /* hook handle
*/
321 thread_id_t tid
; /* thread id
*/
322 client_ptr_t hook_proc
; /* hook proc address
*/
323 /* followed by module name if any
*/
331 int type
; /* INPUT_KEYBOARD
*/
332 unsigned short vkey
; /* virtual key code
*/
333 unsigned short scan
; /* scan code
*/
334 unsigned int flags
; /* event flags
*/
335 unsigned int time
; /* event time
*/
336 lparam_t info
; /* extra info
*/
340 int type
; /* INPUT_MOUSE
*/
341 int x
; /* coordinates
*/
343 unsigned int data
; /* mouse data
*/
344 unsigned int flags
; /* event flags
*/
345 unsigned int time
; /* event time
*/
346 lparam_t info
; /* extra info
*/
350 int type
; /* INPUT_HARDWARE
*/
351 unsigned int msg
; /* message code
*/
352 lparam_t lparam
; /* message param
*/
358 unsigned char bytes
[1]; /* raw data for sent messages
*/
359 struct hardware_msg_data hardware
;
360 struct callback_msg_data callback
;
361 struct winevent_msg_data winevent
;
364 /* structure for console char
/attribute info
*/
371 /* structure returned in filesystem events
*/
372 struct filesystem_event
381 unsigned int low_part
;
385 #define MAX_ACL_LEN
65535
387 struct security_descriptor
389 unsigned int control
; /* SE_ flags
*/
390 data_size_t owner_len
;
391 data_size_t group_len
;
392 data_size_t sacl_len
;
393 data_size_t dacl_len
;
394 /* VARARG(owner
,SID
); */
395 /* VARARG(group
,SID
); */
396 /* VARARG(sacl
,ACL
); */
397 /* VARARG(dacl
,ACL
); */
400 struct object_attributes
402 obj_handle_t rootdir
; /* root directory
*/
403 data_size_t sd_len
; /* length of security_descriptor data. may be
0 */
404 data_size_t name_len
; /* length of the name string. may be
0 */
405 /* VARARG(sd
,security_descriptor
); */
406 /* VARARG(name
,unicode_str
); */
412 /* unsigned int attributes
[count
]; */
413 /* VARARG(sids
,SID
); */
439 enum apc_type type
; /* APC_USER
*/
441 client_ptr_t func
; /* void (__stdcall
*func
)(ULONG_PTR
,ULONG_PTR
,ULONG_PTR
); */
442 apc_param_t args
[3]; /* arguments for user function
*/
446 enum apc_type type
; /* APC_TIMER
*/
448 client_ptr_t func
; /* void (__stdcall
*func
)(void
*, unsigned int
, unsigned int
); */
449 timeout_t time
; /* absolute time of expiration
*/
450 client_ptr_t arg
; /* user argument
*/
454 enum apc_type type
; /* APC_ASYNC_IO
*/
455 unsigned int status
; /* I
/O status
*/
456 client_ptr_t func
; /* unsigned
int (*func)(void*, void*, unsigned int, void **); */
457 client_ptr_t user
; /* user pointer
*/
458 client_ptr_t sb
; /* status block
*/
462 enum apc_type type
; /* APC_VIRTUAL_ALLOC
*/
463 unsigned int op_type
; /* type of operation
*/
464 client_ptr_t addr
; /* requested address
*/
465 mem_size_t size
; /* allocation size
*/
466 unsigned int zero_bits
; /* allocation alignment
*/
467 unsigned int prot
; /* memory protection flags
*/
471 enum apc_type type
; /* APC_VIRTUAL_FREE
*/
472 unsigned int op_type
; /* type of operation
*/
473 client_ptr_t addr
; /* requested address
*/
474 mem_size_t size
; /* allocation size
*/
478 enum apc_type type
; /* APC_VIRTUAL_QUERY
*/
480 client_ptr_t addr
; /* requested address
*/
484 enum apc_type type
; /* APC_VIRTUAL_PROTECT
*/
485 unsigned int prot
; /* new protection flags
*/
486 client_ptr_t addr
; /* requested address
*/
487 mem_size_t size
; /* requested size
*/
491 enum apc_type type
; /* APC_VIRTUAL_FLUSH
*/
493 client_ptr_t addr
; /* requested address
*/
494 mem_size_t size
; /* requested size
*/
498 enum apc_type type
; /* APC_VIRTUAL_LOCK
*/
500 client_ptr_t addr
; /* requested address
*/
501 mem_size_t size
; /* requested size
*/
505 enum apc_type type
; /* APC_VIRTUAL_UNLOCK
*/
507 client_ptr_t addr
; /* requested address
*/
508 mem_size_t size
; /* requested size
*/
512 enum apc_type type
; /* APC_MAP_VIEW
*/
513 obj_handle_t handle
; /* mapping handle
*/
514 client_ptr_t addr
; /* requested address
*/
515 mem_size_t size
; /* allocation size
*/
516 file_pos_t offset
; /* file offset
*/
517 unsigned int alloc_type
;/* allocation type
*/
518 unsigned short zero_bits
; /* allocation alignment
*/
519 unsigned short prot
; /* memory protection flags
*/
523 enum apc_type type
; /* APC_UNMAP_VIEW
*/
525 client_ptr_t addr
; /* view address
*/
529 enum apc_type type
; /* APC_CREATE_THREAD
*/
530 int suspend
; /* suspended thread?
*/
531 client_ptr_t func
; /* void (__stdcall
*func
)(void*)
; start function
*/
532 client_ptr_t arg
; /* argument for start function
*/
533 mem_size_t reserve
; /* reserve size for thread stack
*/
534 mem_size_t commit
; /* commit size for thread stack
*/
543 enum apc_type type
; /* APC_ASYNC_IO
*/
544 unsigned int status
; /* new status of async operation
*/
545 client_ptr_t apc
; /* user APC to call
*/
546 unsigned int total
; /* bytes transferred
*/
550 enum apc_type type
; /* APC_VIRTUAL_ALLOC
*/
551 unsigned int status
; /* status returned by call
*/
552 client_ptr_t addr
; /* resulting address
*/
553 mem_size_t size
; /* resulting size
*/
557 enum apc_type type
; /* APC_VIRTUAL_FREE
*/
558 unsigned int status
; /* status returned by call
*/
559 client_ptr_t addr
; /* resulting address
*/
560 mem_size_t size
; /* resulting size
*/
564 enum apc_type type
; /* APC_VIRTUAL_QUERY
*/
565 unsigned int status
; /* status returned by call
*/
566 client_ptr_t base
; /* resulting base address
*/
567 client_ptr_t alloc_base
;/* resulting allocation base
*/
568 mem_size_t size
; /* resulting region size
*/
569 unsigned short state
; /* resulting region state
*/
570 unsigned short prot
; /* resulting region protection
*/
571 unsigned short alloc_prot
;/* resulting allocation protection
*/
572 unsigned short alloc_type
;/* resulting region allocation type
*/
576 enum apc_type type
; /* APC_VIRTUAL_PROTECT
*/
577 unsigned int status
; /* status returned by call
*/
578 client_ptr_t addr
; /* resulting address
*/
579 mem_size_t size
; /* resulting size
*/
580 unsigned int prot
; /* old protection flags
*/
584 enum apc_type type
; /* APC_VIRTUAL_FLUSH
*/
585 unsigned int status
; /* status returned by call
*/
586 client_ptr_t addr
; /* resulting address
*/
587 mem_size_t size
; /* resulting size
*/
591 enum apc_type type
; /* APC_VIRTUAL_LOCK
*/
592 unsigned int status
; /* status returned by call
*/
593 client_ptr_t addr
; /* resulting address
*/
594 mem_size_t size
; /* resulting size
*/
598 enum apc_type type
; /* APC_VIRTUAL_UNLOCK
*/
599 unsigned int status
; /* status returned by call
*/
600 client_ptr_t addr
; /* resulting address
*/
601 mem_size_t size
; /* resulting size
*/
605 enum apc_type type
; /* APC_MAP_VIEW
*/
606 unsigned int status
; /* status returned by call
*/
607 client_ptr_t addr
; /* resulting address
*/
608 mem_size_t size
; /* resulting size
*/
612 enum apc_type type
; /* APC_MAP_VIEW
*/
613 unsigned int status
; /* status returned by call
*/
617 enum apc_type type
; /* APC_CREATE_THREAD
*/
618 unsigned int status
; /* status returned by call
*/
619 thread_id_t tid
; /* thread id
*/
620 obj_handle_t handle
; /* handle to new thread
*/
624 struct rawinput_device
626 unsigned short usage_page
;
627 unsigned short usage
;
629 user_handle_t target
;
632 /****************************************************************/
633 /* Request declarations
*/
635 /* Create a new process from the context of the parent
*/
637 int inherit_all
; /* inherit all handles from parent
*/
638 unsigned int create_flags
; /* creation flags
*/
639 int socket_fd
; /* file descriptor for process socket
*/
640 obj_handle_t exe_file
; /* file handle for main exe
*/
641 unsigned int process_access
; /* access rights for process object
*/
642 unsigned int process_attr
; /* attributes for process object
*/
643 unsigned int thread_access
; /* access rights for thread object
*/
644 unsigned int thread_attr
; /* attributes for thread object
*/
645 data_size_t info_size
; /* size of startup info
*/
646 VARARG(info
,startup_info
,info_size
); /* startup information
*/
647 VARARG(env
,unicode_str
); /* environment for new process
*/
649 obj_handle_t info
; /* new process info handle
*/
650 process_id_t pid
; /* process id
*/
651 obj_handle_t phandle
; /* process
handle (in the current process
) */
652 thread_id_t tid
; /* thread id
*/
653 obj_handle_t thandle
; /* thread
handle (in the current process
) */
657 /* Retrieve information about a newly started process
*/
658 @
REQ(get_new_process_info
)
659 obj_handle_t info
; /* info handle returned from new_process_request
*/
661 int success
; /* did the process start successfully?
*/
662 int exit_code
; /* process exit code if failed
*/
666 /* Create a new thread from the context of the parent
*/
668 unsigned int access
; /* wanted access rights
*/
669 unsigned int attributes
; /* object attributes
*/
670 int suspend
; /* new thread should be suspended on creation
*/
671 int request_fd
; /* fd for request pipe
*/
673 thread_id_t tid
; /* thread id
*/
674 obj_handle_t handle
; /* thread
handle (in the current process
) */
678 /* Retrieve the new process startup info
*/
679 @
REQ(get_startup_info
)
681 obj_handle_t exe_file
; /* file handle for main exe
*/
682 data_size_t info_size
; /* size of startup info
*/
683 VARARG(info
,startup_info
,info_size
); /* startup information
*/
684 VARARG(env
,unicode_str
); /* environment
*/
688 /* Signal the end of the process initialization
*/
689 @
REQ(init_process_done
)
690 int gui
; /* is it a GUI process?
*/
691 mod_handle_t module
; /* main module base address
*/
692 client_ptr_t ldt_copy
; /* address of LDT
copy (in thread address space
) */
693 client_ptr_t entry
; /* process entry point
*/
697 /* Initialize a thread
; called from the child after
fork()/clone() */
699 int unix_pid
; /* Unix pid of new thread
*/
700 int unix_tid
; /* Unix tid of new thread
*/
701 int debug_level
; /* new debug level
*/
702 client_ptr_t teb
; /* TEB of new
thread (in thread address space
) */
703 client_ptr_t entry
; /* entry point or PEB if initial
thread (in thread address space
) */
704 int reply_fd
; /* fd for reply pipe
*/
705 int wait_fd
; /* fd for blocking calls pipe
*/
706 cpu_type_t cpu
; /* CPU that this thread is running on
*/
708 process_id_t pid
; /* process id of the new thread
's process */
709 thread_id_t tid; /* thread id of the new thread */
710 timeout_t server_start; /* server start time */
711 data_size_t info_size; /* total size of startup info */
712 int version; /* protocol version */
713 unsigned int all_cpus; /* bitset of supported CPUs */
717 /* Terminate a process */
718 @REQ(terminate_process)
719 obj_handle_t handle; /* process handle to terminate */
720 int exit_code; /* process exit code */
722 int self; /* suicide? */
726 /* Terminate a thread */
727 @REQ(terminate_thread)
728 obj_handle_t handle; /* thread handle to terminate */
729 int exit_code; /* thread exit code */
731 int self; /* suicide? */
732 int last; /* last thread in this process? */
736 /* Retrieve information about a process */
737 @REQ(get_process_info)
738 obj_handle_t handle; /* process handle */
740 process_id_t pid; /* server process id */
741 process_id_t ppid; /* server process id of parent */
742 affinity_t affinity; /* process affinity mask */
743 client_ptr_t peb; /* PEB address in process address space */
744 timeout_t start_time; /* process start time */
745 timeout_t end_time; /* process end time */
746 int exit_code; /* process exit code */
747 int priority; /* priority class */
748 cpu_type_t cpu; /* CPU that this process is running on */
749 int debugger_present; /* process is being debugged */
753 /* Set a process information */
754 @REQ(set_process_info)
755 obj_handle_t handle; /* process handle */
756 int mask; /* setting mask (see below) */
757 int priority; /* priority class */
758 affinity_t affinity; /* affinity mask */
760 #define SET_PROCESS_INFO_PRIORITY 0x01
761 #define SET_PROCESS_INFO_AFFINITY 0x02
764 /* Retrieve information about a thread */
765 @REQ(get_thread_info)
766 obj_handle_t handle; /* thread handle */
767 thread_id_t tid_in; /* thread id (optional) */
769 process_id_t pid; /* server process id */
770 thread_id_t tid; /* server thread id */
771 client_ptr_t teb; /* thread teb pointer */
772 affinity_t affinity; /* thread affinity mask */
773 timeout_t creation_time; /* thread creation time */
774 timeout_t exit_time; /* thread exit time */
775 int exit_code; /* thread exit code */
776 int priority; /* thread priority level */
777 int last; /* last thread in process */
781 /* Set a thread information */
782 @REQ(set_thread_info)
783 obj_handle_t handle; /* thread handle */
784 int mask; /* setting mask (see below) */
785 int priority; /* priority class */
786 affinity_t affinity; /* affinity mask */
787 obj_handle_t token; /* impersonation token */
789 #define SET_THREAD_INFO_PRIORITY 0x01
790 #define SET_THREAD_INFO_AFFINITY 0x02
791 #define SET_THREAD_INFO_TOKEN 0x04
794 /* Retrieve information about a module */
796 obj_handle_t handle; /* process handle */
797 mod_handle_t base_address; /* base address of module */
799 client_ptr_t entry_point;
800 data_size_t size; /* module size */
801 data_size_t filename_len; /* buffer len in bytes required to store filename */
802 VARARG(filename,unicode_str); /* file name of module */
806 /* Suspend a thread */
808 obj_handle_t handle; /* thread handle */
810 int count; /* new suspend count */
814 /* Resume a thread */
816 obj_handle_t handle; /* thread handle */
818 int count; /* new suspend count */
822 /* Notify the server that a dll has been loaded */
824 obj_handle_t mapping; /* file mapping handle */
825 mod_handle_t base; /* base address */
826 client_ptr_t name; /* ptr to ptr to name (in process addr space) */
827 data_size_t size; /* dll size */
828 int dbg_offset; /* debug info offset */
829 int dbg_size; /* debug info size */
830 VARARG(filename,unicode_str); /* file name of dll */
834 /* Notify the server that a dll is being unloaded */
836 mod_handle_t base; /* base address */
840 /* Queue an APC for a thread or process */
842 obj_handle_t handle; /* thread or process handle */
843 apc_call_t call; /* call arguments */
845 obj_handle_t handle; /* APC handle */
846 int self; /* run APC in caller itself? */
850 /* Get the result of an APC call */
852 obj_handle_t handle; /* handle to the APC */
854 apc_result_t result; /* result of the APC */
858 /* Close a handle for the current process */
860 obj_handle_t handle; /* handle to close */
864 /* Set a handle information */
865 @REQ(set_handle_info)
866 obj_handle_t handle; /* handle we are interested in */
867 int flags; /* new handle flags */
868 int mask; /* mask for flags to set */
870 int old_flags; /* old flag value */
874 /* Duplicate a handle */
876 obj_handle_t src_process; /* src process handle */
877 obj_handle_t src_handle; /* src handle to duplicate */
878 obj_handle_t dst_process; /* dst process handle */
879 unsigned int access; /* wanted access rights */
880 unsigned int attributes; /* object attributes */
881 unsigned int options; /* duplicate options (see below) */
883 obj_handle_t handle; /* duplicated handle in dst process */
884 int self; /* is the source the current process? */
885 int closed; /* whether the source handle has been closed */
887 #define DUP_HANDLE_CLOSE_SOURCE DUPLICATE_CLOSE_SOURCE
888 #define DUP_HANDLE_SAME_ACCESS DUPLICATE_SAME_ACCESS
889 #define DUP_HANDLE_MAKE_GLOBAL 0x80000000 /* Not a Windows flag */
892 /* Open a handle to a process */
894 process_id_t pid; /* process id to open */
895 unsigned int access; /* wanted access rights */
896 unsigned int attributes; /* object attributes */
898 obj_handle_t handle; /* handle to the process */
902 /* Open a handle to a thread */
904 thread_id_t tid; /* thread id to open */
905 unsigned int access; /* wanted access rights */
906 unsigned int attributes; /* object attributes */
908 obj_handle_t handle; /* handle to the thread */
912 /* Wait for handles */
914 int flags; /* wait flags (see below) */
915 client_ptr_t cookie; /* magic cookie to return to client */
916 obj_handle_t signal; /* object to signal (0 if none) */
917 obj_handle_t prev_apc; /* handle to previous APC */
918 timeout_t timeout; /* timeout */
919 VARARG(result,apc_result); /* result of previous APC */
920 VARARG(handles,handles); /* handles to select on */
922 timeout_t timeout; /* timeout converted to absolute */
923 apc_call_t call; /* APC call arguments */
924 obj_handle_t apc_handle; /* handle to next APC */
927 #define SELECT_ALERTABLE 2
928 #define SELECT_INTERRUPTIBLE 4
931 /* Create an event */
933 unsigned int access; /* wanted access rights */
934 unsigned int attributes; /* object attributes */
935 int manual_reset; /* manual reset event */
936 int initial_state; /* initial state of the event */
937 VARARG(objattr,object_attributes); /* object attributes */
939 obj_handle_t handle; /* handle to the event */
942 /* Event operation */
944 obj_handle_t handle; /* handle to event */
945 int op; /* event operation (see below) */
947 enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT };
952 unsigned int access; /* wanted access rights */
953 unsigned int attributes; /* object attributes */
954 obj_handle_t rootdir; /* root directory */
955 VARARG(name,unicode_str); /* object name */
957 obj_handle_t handle; /* handle to the event */
963 unsigned int access; /* wanted access rights */
964 unsigned int attributes; /* object attributes */
965 int owned; /* initially owned? */
966 VARARG(objattr,object_attributes); /* object attributes */
968 obj_handle_t handle; /* handle to the mutex */
972 /* Release a mutex */
974 obj_handle_t handle; /* handle to the mutex */
976 unsigned int prev_count; /* value of internal counter, before release */
982 unsigned int access; /* wanted access rights */
983 unsigned int attributes; /* object attributes */
984 obj_handle_t rootdir; /* root directory */
985 VARARG(name,unicode_str); /* object name */
987 obj_handle_t handle; /* handle to the mutex */
991 /* Create a semaphore */
992 @REQ(create_semaphore)
993 unsigned int access; /* wanted access rights */
994 unsigned int attributes; /* object attributes */
995 unsigned int initial; /* initial count */
996 unsigned int max; /* maximum count */
997 VARARG(objattr,object_attributes); /* object attributes */
999 obj_handle_t handle; /* handle to the semaphore */
1003 /* Release a semaphore */
1004 @REQ(release_semaphore)
1005 obj_handle_t handle; /* handle to the semaphore */
1006 unsigned int count; /* count to add to semaphore */
1008 unsigned int prev_count; /* previous semaphore count */
1012 /* Open a semaphore */
1013 @REQ(open_semaphore)
1014 unsigned int access; /* wanted access rights */
1015 unsigned int attributes; /* object attributes */
1016 obj_handle_t rootdir; /* root directory */
1017 VARARG(name,unicode_str); /* object name */
1019 obj_handle_t handle; /* handle to the semaphore */
1025 unsigned int access; /* wanted access rights */
1026 unsigned int attributes; /* object attributes */
1027 unsigned int sharing; /* sharing flags */
1028 int create; /* file create action */
1029 unsigned int options; /* file options */
1030 unsigned int attrs; /* file attributes for creation */
1031 VARARG(objattr,object_attributes); /* object attributes */
1032 VARARG(filename,string); /* file name */
1034 obj_handle_t handle; /* handle to the file */
1038 /* Open a file object */
1039 @REQ(open_file_object)
1040 unsigned int access; /* wanted access rights */
1041 unsigned int attributes; /* open attributes */
1042 obj_handle_t rootdir; /* root directory */
1043 unsigned int sharing; /* sharing flags */
1044 unsigned int options; /* file options */
1045 VARARG(filename,unicode_str); /* file name */
1047 obj_handle_t handle; /* handle to the file */
1051 /* Allocate a file handle for a Unix fd */
1052 @REQ(alloc_file_handle)
1053 unsigned int access; /* wanted access rights */
1054 unsigned int attributes; /* object attributes */
1055 int fd; /* file descriptor on the client side */
1057 obj_handle_t handle; /* handle to the file */
1061 /* Get the Unix name from a file handle */
1062 @REQ(get_handle_unix_name)
1063 obj_handle_t handle; /* file handle */
1065 data_size_t name_len; /* unix name length */
1066 VARARG(name,string); /* unix name */
1070 /* Get a Unix fd to access a file */
1072 obj_handle_t handle; /* handle to the file */
1074 int type; /* file type (see below) */
1075 int cacheable; /* can fd be cached in the client? */
1076 unsigned int access; /* file access rights */
1077 unsigned int options; /* file open options */
1081 FD_TYPE_INVALID, /* invalid file (no associated fd) */
1082 FD_TYPE_FILE, /* regular file */
1083 FD_TYPE_DIR, /* directory */
1084 FD_TYPE_SOCKET, /* socket */
1085 FD_TYPE_SERIAL, /* serial port */
1086 FD_TYPE_PIPE, /* named pipe */
1087 FD_TYPE_MAILSLOT, /* mailslot */
1088 FD_TYPE_CHAR, /* unspecified char device */
1089 FD_TYPE_DEVICE, /* Windows device file */
1094 /* Flush a file buffers */
1096 obj_handle_t handle; /* handle to the file */
1098 obj_handle_t event; /* event set when finished */
1102 /* Lock a region of a file */
1104 obj_handle_t handle; /* handle to the file */
1105 file_pos_t offset; /* offset of start of lock */
1106 file_pos_t count; /* count of bytes to lock */
1107 int shared; /* shared or exclusive lock? */
1108 int wait; /* do we want to wait? */
1110 obj_handle_t handle; /* handle to wait on */
1111 int overlapped; /* is it an overlapped I/O handle? */
1115 /* Unlock a region of a file */
1117 obj_handle_t handle; /* handle to the file */
1118 file_pos_t offset; /* offset of start of unlock */
1119 file_pos_t count; /* count of bytes to unlock */
1123 /* Create a socket */
1125 unsigned int access; /* wanted access rights */
1126 unsigned int attributes; /* object attributes */
1127 int family; /* family, see socket manpage */
1128 int type; /* type, see socket manpage */
1129 int protocol; /* protocol, see socket manpage */
1130 unsigned int flags; /* socket flags */
1132 obj_handle_t handle; /* handle to the new socket */
1136 /* Accept a socket */
1138 obj_handle_t lhandle; /* handle to the listening socket */
1139 unsigned int access; /* wanted access rights */
1140 unsigned int attributes; /* object attributes */
1142 obj_handle_t handle; /* handle to the new socket */
1146 /* Accept into an initialized socket */
1147 @REQ(accept_into_socket)
1148 obj_handle_t lhandle; /* handle to the listening socket */
1149 obj_handle_t ahandle; /* handle to the accepting socket */
1153 /* Set socket event parameters */
1154 @REQ(set_socket_event)
1155 obj_handle_t handle; /* handle to the socket */
1156 unsigned int mask; /* event mask */
1157 obj_handle_t event; /* event object */
1158 user_handle_t window; /* window to send the message to */
1159 unsigned int msg; /* message to send */
1163 /* Get socket event parameters */
1164 @REQ(get_socket_event)
1165 obj_handle_t handle; /* handle to the socket */
1166 int service; /* clear pending? */
1167 obj_handle_t c_event; /* event to clear */
1169 unsigned int mask; /* event mask */
1170 unsigned int pmask; /* pending events */
1171 unsigned int state; /* status bits */
1172 VARARG(errors,ints); /* event errors */
1176 /* Re-enable pending socket events */
1177 @REQ(enable_socket_event)
1178 obj_handle_t handle; /* handle to the socket */
1179 unsigned int mask; /* events to re-enable */
1180 unsigned int sstate; /* status bits to set */
1181 unsigned int cstate; /* status bits to clear */
1184 @REQ(set_socket_deferred)
1185 obj_handle_t handle; /* handle to the socket */
1186 obj_handle_t deferred; /* handle to the socket for which accept() is deferred */
1189 /* Allocate a console (only used by a console renderer) */
1191 unsigned int access; /* wanted access rights */
1192 unsigned int attributes; /* object attributes */
1193 process_id_t pid; /* pid of process which shall be attached to the console */
1194 int input_fd; /* if pid=-1 (bare console to current process), fd for input */
1196 obj_handle_t handle_in; /* handle to console input */
1197 obj_handle_t event; /* handle to renderer events change notification */
1201 /* Free the console of the current process */
1206 #define CONSOLE_RENDERER_NONE_EVENT 0x00
1207 #define CONSOLE_RENDERER_TITLE_EVENT 0x01
1208 #define CONSOLE_RENDERER_ACTIVE_SB_EVENT 0x02
1209 #define CONSOLE_RENDERER_SB_RESIZE_EVENT 0x03
1210 #define CONSOLE_RENDERER_UPDATE_EVENT 0x04
1211 #define CONSOLE_RENDERER_CURSOR_POS_EVENT 0x05
1212 #define CONSOLE_RENDERER_CURSOR_GEOM_EVENT 0x06
1213 #define CONSOLE_RENDERER_DISPLAY_EVENT 0x07
1214 #define CONSOLE_RENDERER_EXIT_EVENT 0x08
1215 struct console_renderer_event
1250 /* retrieve console events for the renderer */
1251 @REQ(get_console_renderer_events)
1252 obj_handle_t handle; /* handle to console input events */
1254 VARARG(data,bytes); /* the various console_renderer_events */
1258 /* Open a handle to the process console */
1260 obj_handle_t from; /* 0 (resp 1) input (resp output) of current process console */
1261 /* otherwise console_in handle to get active screen buffer? */
1262 unsigned int access; /* wanted access rights */
1263 unsigned int attributes; /* object attributes */
1264 int share; /* share mask (only for output handles) */
1266 obj_handle_t handle; /* handle to the console */
1270 /* Get the input queue wait event */
1271 @REQ(get_console_wait_event)
1273 obj_handle_t handle;
1276 /* Get a console mode (input or output) */
1277 @REQ(get_console_mode)
1278 obj_handle_t handle; /* handle to the console */
1280 int mode; /* console mode */
1284 /* Set a console mode (input or output) */
1285 @REQ(set_console_mode)
1286 obj_handle_t handle; /* handle to the console */
1287 int mode; /* console mode */
1291 /* Set info about a console (input only) */
1292 @REQ(set_console_input_info)
1293 obj_handle_t handle; /* handle to console input, or 0 for process' console
*/
1294 int mask
; /* setting
mask (see below
) */
1295 obj_handle_t active_sb
; /* active screen buffer
*/
1296 int history_mode
; /* whether we duplicate lines in history
*/
1297 int history_size
; /* number of lines in history
*/
1298 int edition_mode
; /* index to the edition mode flavors
*/
1299 int input_cp
; /* console input codepage
*/
1300 int output_cp
; /* console output codepage
*/
1301 user_handle_t win
; /* console window if backend supports it
*/
1302 VARARG(title
,unicode_str
); /* console title
*/
1304 #define SET_CONSOLE_INPUT_INFO_ACTIVE_SB
0x01
1305 #define SET_CONSOLE_INPUT_INFO_TITLE
0x02
1306 #define SET_CONSOLE_INPUT_INFO_HISTORY_MODE
0x04
1307 #define SET_CONSOLE_INPUT_INFO_HISTORY_SIZE
0x08
1308 #define SET_CONSOLE_INPUT_INFO_EDITION_MODE
0x10
1309 #define SET_CONSOLE_INPUT_INFO_INPUT_CODEPAGE
0x20
1310 #define SET_CONSOLE_INPUT_INFO_OUTPUT_CODEPAGE
0x40
1311 #define SET_CONSOLE_INPUT_INFO_WIN
0x80
1314 /* Get info about a
console (input only
) */
1315 @
REQ(get_console_input_info
)
1316 obj_handle_t handle
; /* handle to console input
, or
0 for process
' console */
1318 int history_mode; /* whether we duplicate lines in history */
1319 int history_size; /* number of lines in history */
1320 int history_index; /* number of used lines in history */
1321 int edition_mode; /* index to the edition mode flavors */
1322 int input_cp; /* console input codepage */
1323 int output_cp; /* console output codepage */
1324 user_handle_t win; /* console window if backend supports it */
1325 VARARG(title,unicode_str); /* console title */
1329 /* appends a string to console's history
*/
1330 @
REQ(append_console_input_history
)
1331 obj_handle_t handle
; /* handle to console input
, or
0 for process
' console */
1332 VARARG(line,unicode_str); /* line to add */
1336 /* appends a string to console's history
*/
1337 @
REQ(get_console_input_history
)
1338 obj_handle_t handle
; /* handle to console input
, or
0 for process
' console */
1339 int index; /* index to get line from */
1341 int total; /* total length of line in Unicode chars */
1342 VARARG(line,unicode_str); /* line to add */
1346 /* creates a new screen buffer on process' console
*/
1347 @
REQ(create_console_output
)
1348 obj_handle_t handle_in
; /* handle to console input
, or
0 for process
' console */
1349 unsigned int access; /* wanted access rights */
1350 unsigned int attributes; /* object attributes */
1351 unsigned int share; /* sharing credentials */
1352 int fd; /* for bare consoles, fd the screen-buffer is attached to */
1354 obj_handle_t handle_out; /* handle to the screen buffer */
1358 /* Set info about a console (output only) */
1359 @REQ(set_console_output_info)
1360 obj_handle_t handle; /* handle to the console */
1361 int mask; /* setting mask (see below) */
1362 short int cursor_size; /* size of cursor (percentage filled) */
1363 short int cursor_visible;/* cursor visibility flag */
1364 short int cursor_x; /* position of cursor (x, y) */
1366 short int width; /* width of the screen buffer */
1367 short int height; /* height of the screen buffer */
1368 short int attr; /* default attribute */
1369 short int win_left; /* window actually displayed by renderer */
1370 short int win_top; /* the rect area is expressed within the */
1371 short int win_right; /* boundaries of the screen buffer */
1372 short int win_bottom;
1373 short int max_width; /* maximum size (width x height) for the window */
1374 short int max_height;
1376 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_GEOM 0x01
1377 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_POS 0x02
1378 #define SET_CONSOLE_OUTPUT_INFO_SIZE 0x04
1379 #define SET_CONSOLE_OUTPUT_INFO_ATTR 0x08
1380 #define SET_CONSOLE_OUTPUT_INFO_DISPLAY_WINDOW 0x10
1381 #define SET_CONSOLE_OUTPUT_INFO_MAX_SIZE 0x20
1384 /* Get info about a console (output only) */
1385 @REQ(get_console_output_info)
1386 obj_handle_t handle; /* handle to the console */
1388 short int cursor_size; /* size of cursor (percentage filled) */
1389 short int cursor_visible;/* cursor visibility flag */
1390 short int cursor_x; /* position of cursor (x, y) */
1392 short int width; /* width of the screen buffer */
1393 short int height; /* height of the screen buffer */
1394 short int attr; /* default attribute */
1395 short int win_left; /* window actually displayed by renderer */
1396 short int win_top; /* the rect area is expressed within the */
1397 short int win_right; /* boundaries of the screen buffer */
1398 short int win_bottom;
1399 short int max_width; /* maximum size (width x height) for the window */
1400 short int max_height;
1403 /* Add input records to a console input queue */
1404 @REQ(write_console_input)
1405 obj_handle_t handle; /* handle to the console input */
1406 VARARG(rec,input_records); /* input records */
1408 int written; /* number of records written */
1412 /* Fetch input records from a console input queue */
1413 @REQ(read_console_input)
1414 obj_handle_t handle; /* handle to the console input */
1415 int flush; /* flush the retrieved records from the queue? */
1417 int read; /* number of records read */
1418 VARARG(rec,input_records); /* input records */
1422 /* write data (chars and/or attributes) in a screen buffer */
1423 @REQ(write_console_output)
1424 obj_handle_t handle; /* handle to the console output */
1425 int x; /* position where to start writing */
1427 int mode; /* char info (see below) */
1428 int wrap; /* wrap around at end of line? */
1429 VARARG(data,bytes); /* info to write */
1431 int written; /* number of char infos actually written */
1432 int width; /* width of screen buffer */
1433 int height; /* height of screen buffer */
1437 CHAR_INFO_MODE_TEXT, /* characters only */
1438 CHAR_INFO_MODE_ATTR, /* attributes only */
1439 CHAR_INFO_MODE_TEXTATTR, /* both characters and attributes */
1440 CHAR_INFO_MODE_TEXTSTDATTR /* characters but use standard attributes */
1444 /* fill a screen buffer with constant data (chars and/or attributes) */
1445 @REQ(fill_console_output)
1446 obj_handle_t handle; /* handle to the console output */
1447 int x; /* position where to start writing */
1449 int mode; /* char info mode */
1450 int count; /* number to write */
1451 int wrap; /* wrap around at end of line? */
1452 char_info_t data; /* data to write */
1454 int written; /* number of char infos actually written */
1458 /* read data (chars and/or attributes) from a screen buffer */
1459 @REQ(read_console_output)
1460 obj_handle_t handle; /* handle to the console output */
1461 int x; /* position (x,y) where to start reading */
1463 int mode; /* char info mode */
1464 int wrap; /* wrap around at end of line? */
1466 int width; /* width of screen buffer */
1467 int height; /* height of screen buffer */
1472 /* move a rect (of data) in screen buffer content */
1473 @REQ(move_console_output)
1474 obj_handle_t handle; /* handle to the console output */
1475 short int x_src; /* position (x, y) of rect to start moving from */
1477 short int x_dst; /* position (x, y) of rect to move to */
1479 short int w; /* size of the rect (width, height) to move */
1484 /* Sends a signal to a process group */
1485 @REQ(send_console_signal)
1486 int signal; /* the signal to send */
1487 process_id_t group_id; /* the group to send the signal to */
1491 /* enable directory change notifications */
1492 @REQ(read_directory_changes)
1493 unsigned int filter; /* notification filter */
1494 int subtree; /* watch the subtree? */
1495 int want_data; /* flag indicating whether change data should be collected */
1496 async_data_t async; /* async I/O parameters */
1501 obj_handle_t handle;
1503 VARARG(events,filesystem_event); /* collected filesystem events */
1507 /* Create a file mapping */
1508 @REQ(create_mapping)
1509 unsigned int access; /* wanted access rights */
1510 unsigned int attributes; /* object attributes */
1511 unsigned int protect; /* protection flags (see below) */
1512 mem_size_t size; /* mapping size */
1513 obj_handle_t file_handle; /* file handle */
1514 VARARG(objattr,object_attributes); /* object attributes */
1516 obj_handle_t handle; /* handle to the mapping */
1518 /* per-page protection flags */
1519 #define VPROT_READ 0x01
1520 #define VPROT_WRITE 0x02
1521 #define VPROT_EXEC 0x04
1522 #define VPROT_WRITECOPY 0x08
1523 #define VPROT_GUARD 0x10
1524 #define VPROT_NOCACHE 0x20
1525 #define VPROT_COMMITTED 0x40
1526 #define VPROT_WRITEWATCH 0x80
1527 /* per-mapping protection flags */
1528 #define VPROT_IMAGE 0x0100 /* mapping for an exe image */
1529 #define VPROT_SYSTEM 0x0200 /* system view (underlying mmap not under our control) */
1530 #define VPROT_VALLOC 0x0400 /* allocated by VirtualAlloc */
1531 #define VPROT_NOEXEC 0x0800 /* don't force exec permission
*/
1534 /* Open a mapping
*/
1536 unsigned int access
; /* wanted access rights
*/
1537 unsigned int attributes
; /* object attributes
*/
1538 obj_handle_t rootdir
; /* root directory
*/
1539 VARARG(name
,unicode_str
); /* object name
*/
1541 obj_handle_t handle
; /* handle to the mapping
*/
1545 /* Get information about a file mapping
*/
1546 @
REQ(get_mapping_info
)
1547 obj_handle_t handle
; /* handle to the mapping
*/
1548 unsigned int access
; /* wanted access rights
*/
1550 mem_size_t size
; /* mapping size
*/
1551 int protect
; /* protection flags
*/
1552 int header_size
; /* header
size (for VPROT_IMAGE mapping
) */
1553 client_ptr_t base
; /* default base
addr (for VPROT_IMAGE mapping
) */
1554 obj_handle_t mapping
; /* duplicate mapping handle unless removable
*/
1555 obj_handle_t shared_file
; /* shared mapping file handle
*/
1559 /* Get a range of committed pages in a file mapping
*/
1560 @
REQ(get_mapping_committed_range
)
1561 obj_handle_t handle
; /* handle to the mapping
*/
1562 file_pos_t offset
; /* starting
offset (page
-aligned
, in bytes
) */
1564 mem_size_t size
; /* size of range starting at
offset (page
-aligned
, in bytes
) */
1565 int committed
; /* whether it is a committed range
*/
1569 /* Add a range to the committed pages in a file mapping
*/
1570 @
REQ(add_mapping_committed_range
)
1571 obj_handle_t handle
; /* handle to the mapping
*/
1572 file_pos_t offset
; /* starting
offset (page
-aligned
, in bytes
) */
1573 mem_size_t size
; /* size to
set (page
-aligned
, in bytes
) or
0 if only retrieving
*/
1577 #define SNAP_PROCESS
0x00000001
1578 #define SNAP_THREAD
0x00000002
1579 /* Create a snapshot
*/
1580 @
REQ(create_snapshot
)
1581 unsigned int attributes
; /* object attributes
*/
1582 unsigned int flags
; /* snapshot
flags (SNAP_*)
*/
1584 obj_handle_t handle
; /* handle to the snapshot
*/
1588 /* Get the next process from a snapshot
*/
1590 obj_handle_t handle
; /* handle to the snapshot
*/
1591 int reset
; /* reset snapshot position?
*/
1593 int count
; /* process usage count
*/
1594 process_id_t pid
; /* process id
*/
1595 process_id_t ppid
; /* parent process id
*/
1596 int threads
; /* number of threads
*/
1597 int priority
; /* process priority
*/
1598 int handles
; /* number of handles
*/
1599 int unix_pid
; /* Unix pid
*/
1600 VARARG(filename
,unicode_str
); /* file name of main exe
*/
1604 /* Get the next thread from a snapshot
*/
1606 obj_handle_t handle
; /* handle to the snapshot
*/
1607 int reset
; /* reset snapshot position?
*/
1609 int count
; /* thread usage count
*/
1610 process_id_t pid
; /* process id
*/
1611 thread_id_t tid
; /* thread id
*/
1612 int base_pri
; /* base priority
*/
1613 int delta_pri
; /* delta priority
*/
1617 /* Wait for a debug event
*/
1618 @
REQ(wait_debug_event
)
1619 int get_handle
; /* should we alloc a handle for waiting?
*/
1621 process_id_t pid
; /* process id
*/
1622 thread_id_t tid
; /* thread id
*/
1623 obj_handle_t wait
; /* wait handle if no event ready
*/
1624 VARARG(event
,debug_event
); /* debug event data
*/
1628 /* Queue an exception event
*/
1629 @
REQ(queue_exception_event
)
1630 int first
; /* first chance exception?
*/
1631 unsigned int code
; /* exception code
*/
1632 unsigned int flags
; /* exception flags
*/
1633 client_ptr_t record
; /* exception record
*/
1634 client_ptr_t address
; /* exception address
*/
1635 data_size_t len
; /* size of parameters
*/
1636 VARARG(params
,uints64
,len
);/* exception parameters
*/
1637 VARARG(context
,context
); /* thread context
*/
1639 obj_handle_t handle
; /* handle to the queued event
*/
1643 /* Retrieve the status of an exception event
*/
1644 @
REQ(get_exception_status
)
1645 obj_handle_t handle
; /* handle to the queued event
*/
1647 VARARG(context
,context
); /* modified thread context
*/
1651 /* Send an output string to the debugger
*/
1652 @
REQ(output_debug_string
)
1653 data_size_t length
; /* string length
*/
1654 client_ptr_t string
; /* string to
display (in debugged process address space
) */
1658 /* Continue a debug event
*/
1659 @
REQ(continue_debug_event
)
1660 process_id_t pid
; /* process id to continue
*/
1661 thread_id_t tid
; /* thread id to continue
*/
1662 int status
; /* continuation status
*/
1666 /* Start
/stop debugging an existing process
*/
1668 process_id_t pid
; /* id of the process to debug
*/
1669 int attach
; /* 1=attaching
/ 0=detaching from the process
*/
1673 /* Simulate a breakpoint in a process
*/
1675 obj_handle_t handle
; /* process handle
*/
1677 int self
; /* was it the caller itself?
*/
1681 /* Set debugger kill on exit flag
*/
1682 @
REQ(set_debugger_kill_on_exit
)
1683 int kill_on_exit
; /* 0=detach
/1=kill debuggee when debugger dies
*/
1687 /* Read data from a process address space
*/
1688 @
REQ(read_process_memory
)
1689 obj_handle_t handle
; /* process handle
*/
1690 client_ptr_t addr
; /* addr to read from
*/
1692 VARARG(data
,bytes
); /* result data
*/
1696 /* Write data to a process address space
*/
1697 @
REQ(write_process_memory
)
1698 obj_handle_t handle
; /* process handle
*/
1699 client_ptr_t addr
; /* addr to write to
*/
1700 VARARG(data
,bytes
); /* data to write
*/
1704 /* Create a registry key
*/
1706 obj_handle_t parent
; /* handle to the parent key
*/
1707 unsigned int access
; /* desired access rights
*/
1708 unsigned int attributes
; /* object attributes
*/
1709 unsigned int options
; /* creation options
*/
1710 data_size_t namelen
; /* length of key name in bytes
*/
1711 VARARG(name
,unicode_str
,namelen
); /* key name
*/
1712 VARARG(class
,unicode_str
); /* class name
*/
1714 obj_handle_t hkey
; /* handle to the created key
*/
1715 int created
; /* has it been newly created?
*/
1718 /* Open a registry key
*/
1720 obj_handle_t parent
; /* handle to the parent key
*/
1721 unsigned int access
; /* desired access rights
*/
1722 unsigned int attributes
; /* object attributes
*/
1723 VARARG(name
,unicode_str
); /* key name
*/
1725 obj_handle_t hkey
; /* handle to the open key
*/
1729 /* Delete a registry key
*/
1731 obj_handle_t hkey
; /* handle to the key
*/
1735 /* Flush a registry key
*/
1737 obj_handle_t hkey
; /* handle to the key
*/
1741 /* Enumerate registry subkeys
*/
1743 obj_handle_t hkey
; /* handle to registry key
*/
1744 int index
; /* index of
subkey (or
-1 for current key
) */
1745 int info_class
; /* requested information class
*/
1747 int subkeys
; /* number of subkeys
*/
1748 int max_subkey
; /* longest subkey name
*/
1749 int max_class
; /* longest class name
*/
1750 int values
; /* number of values
*/
1751 int max_value
; /* longest value name
*/
1752 int max_data
; /* longest value data
*/
1753 timeout_t modif
; /* last modification time
*/
1754 data_size_t total
; /* total length needed for full name and class
*/
1755 data_size_t namelen
; /* length of key name in bytes
*/
1756 VARARG(name
,unicode_str
,namelen
); /* key name
*/
1757 VARARG(class
,unicode_str
); /* class name
*/
1761 /* Set a value of a registry key
*/
1763 obj_handle_t hkey
; /* handle to registry key
*/
1764 int type
; /* value type
*/
1765 data_size_t namelen
; /* length of value name in bytes
*/
1766 VARARG(name
,unicode_str
,namelen
); /* value name
*/
1767 VARARG(data
,bytes
); /* value data
*/
1771 /* Retrieve the value of a registry key
*/
1773 obj_handle_t hkey
; /* handle to registry key
*/
1774 VARARG(name
,unicode_str
); /* value name
*/
1776 int type
; /* value type
*/
1777 data_size_t total
; /* total length needed for data
*/
1778 VARARG(data
,bytes
); /* value data
*/
1782 /* Enumerate a value of a registry key
*/
1783 @
REQ(enum_key_value
)
1784 obj_handle_t hkey
; /* handle to registry key
*/
1785 int index
; /* value index
*/
1786 int info_class
; /* requested information class
*/
1788 int type
; /* value type
*/
1789 data_size_t total
; /* total length needed for full name and data
*/
1790 data_size_t namelen
; /* length of value name in bytes
*/
1791 VARARG(name
,unicode_str
,namelen
); /* value name
*/
1792 VARARG(data
,bytes
); /* value data
*/
1796 /* Delete a value of a registry key
*/
1797 @
REQ(delete_key_value
)
1798 obj_handle_t hkey
; /* handle to registry key
*/
1799 VARARG(name
,unicode_str
); /* value name
*/
1803 /* Load a registry branch from a file
*/
1805 obj_handle_t hkey
; /* root key to load to
*/
1806 obj_handle_t file
; /* file to load from
*/
1807 VARARG(name
,unicode_str
); /* subkey name
*/
1811 /* UnLoad a registry branch from a file
*/
1812 @
REQ(unload_registry
)
1813 obj_handle_t hkey
; /* root key to unload to
*/
1817 /* Save a registry branch to a file
*/
1819 obj_handle_t hkey
; /* key to save
*/
1820 obj_handle_t file
; /* file to save to
*/
1824 /* Add a registry key change notification
*/
1825 @
REQ(set_registry_notification
)
1826 obj_handle_t hkey
; /* key to watch for changes
*/
1827 obj_handle_t event
; /* event to set
*/
1828 int subtree
; /* should we watch the whole subtree?
*/
1829 unsigned int filter
; /* things to watch
*/
1833 /* Create a waitable timer
*/
1835 unsigned int access
; /* wanted access rights
*/
1836 unsigned int attributes
; /* object attributes
*/
1837 obj_handle_t rootdir
; /* root directory
*/
1838 int manual
; /* manual reset
*/
1839 VARARG(name
,unicode_str
); /* object name
*/
1841 obj_handle_t handle
; /* handle to the timer
*/
1845 /* Open a waitable timer
*/
1847 unsigned int access
; /* wanted access rights
*/
1848 unsigned int attributes
; /* object attributes
*/
1849 obj_handle_t rootdir
; /* root directory
*/
1850 VARARG(name
,unicode_str
); /* object name
*/
1852 obj_handle_t handle
; /* handle to the timer
*/
1855 /* Set a waitable timer
*/
1857 obj_handle_t handle
; /* handle to the timer
*/
1858 timeout_t expire
; /* next expiration absolute time
*/
1859 client_ptr_t callback
; /* callback function
*/
1860 client_ptr_t arg
; /* callback argument
*/
1861 int period
; /* timer period in ms
*/
1863 int signaled
; /* was the timer signaled before this call ?
*/
1866 /* Cancel a waitable timer
*/
1868 obj_handle_t handle
; /* handle to the timer
*/
1870 int signaled
; /* was the timer signaled before this calltime ?
*/
1873 /* Get information on a waitable timer
*/
1874 @
REQ(get_timer_info
)
1875 obj_handle_t handle
; /* handle to the timer
*/
1877 timeout_t when
; /* absolute time when the timer next expires
*/
1878 int signaled
; /* is the timer signaled?
*/
1882 /* Retrieve the current context of a thread
*/
1883 @
REQ(get_thread_context
)
1884 obj_handle_t handle
; /* thread handle
*/
1885 unsigned int flags
; /* context flags
*/
1886 int suspend
; /* suspend the thread if needed
*/
1888 int self
; /* was it a handle to the current thread?
*/
1889 VARARG(context
,context
); /* thread context
*/
1893 /* Set the current context of a thread
*/
1894 @
REQ(set_thread_context
)
1895 obj_handle_t handle
; /* thread handle
*/
1896 int suspend
; /* suspend the thread if needed
*/
1897 VARARG(context
,context
); /* thread context
*/
1899 int self
; /* was it a handle to the current thread?
*/
1903 /* Fetch a selector entry for a thread
*/
1904 @
REQ(get_selector_entry
)
1905 obj_handle_t handle
; /* thread handle
*/
1906 int entry
; /* LDT entry
*/
1908 unsigned int base
; /* selector base
*/
1909 unsigned int limit
; /* selector limit
*/
1910 unsigned char flags
; /* selector flags
*/
1916 obj_handle_t table
; /* which table to add atom to
*/
1917 VARARG(name
,unicode_str
); /* atom name
*/
1919 atom_t atom
; /* resulting atom
*/
1923 /* Delete an atom
*/
1925 obj_handle_t table
; /* which table to delete atom from
*/
1926 atom_t atom
; /* atom handle
*/
1932 obj_handle_t table
; /* which table to find atom from
*/
1933 VARARG(name
,unicode_str
); /* atom name
*/
1935 atom_t atom
; /* atom handle
*/
1939 /* Get information about an atom
*/
1940 @
REQ(get_atom_information
)
1941 obj_handle_t table
; /* which table to find atom from
*/
1942 atom_t atom
; /* atom handle
*/
1944 int count
; /* atom lock count
*/
1945 int pinned
; /* whether the atom has been pinned
*/
1946 data_size_t total
; /* actual length of atom name
*/
1947 VARARG(name
,unicode_str
); /* atom name
*/
1951 /* Set information about an atom
*/
1952 @
REQ(set_atom_information
)
1953 obj_handle_t table
; /* which table to find atom from
*/
1954 atom_t atom
; /* atom handle
*/
1955 int pinned
; /* whether to bump atom information
*/
1959 /* Empty an atom table
*/
1960 @
REQ(empty_atom_table
)
1961 obj_handle_t table
; /* which table to find atom from
*/
1962 int if_pinned
; /* whether to delete pinned atoms
*/
1966 /* Init an atom table
*/
1967 @
REQ(init_atom_table
)
1968 int entries
; /* number of
entries (only for local
) */
1970 obj_handle_t table
; /* handle to the atom table
*/
1974 /* Get the message queue of the current thread
*/
1977 obj_handle_t handle
; /* handle to the queue
*/
1981 /* Set the file descriptor associated to the current thread queue
*/
1983 obj_handle_t handle
; /* handle to the file descriptor
*/
1987 /* Set the current message queue wakeup mask
*/
1988 @
REQ(set_queue_mask
)
1989 unsigned int wake_mask
; /* wakeup bits mask
*/
1990 unsigned int changed_mask
; /* changed bits mask
*/
1991 int skip_wait
; /* will we skip waiting if signaled?
*/
1993 unsigned int wake_bits
; /* current wake bits
*/
1994 unsigned int changed_bits
; /* current changed bits
*/
1998 /* Get the current message queue status
*/
1999 @
REQ(get_queue_status
)
2000 int clear
; /* should we clear the change bits?
*/
2002 unsigned int wake_bits
; /* wake bits
*/
2003 unsigned int changed_bits
; /* changed bits since last time
*/
2007 /* Retrieve the process idle event
*/
2008 @
REQ(get_process_idle_event
)
2009 obj_handle_t handle
; /* process handle
*/
2011 obj_handle_t event
; /* handle to idle event
*/
2015 /* Send a message to a thread queue
*/
2017 thread_id_t id
; /* thread id
*/
2018 int type
; /* message
type (see below
) */
2019 int flags
; /* message
flags (see below
) */
2020 user_handle_t win
; /* window handle
*/
2021 unsigned int msg
; /* message code
*/
2022 lparam_t wparam
; /* parameters
*/
2023 lparam_t lparam
; /* parameters
*/
2024 timeout_t timeout
; /* timeout for reply
*/
2025 VARARG(data
,message_data
); /* message data for sent messages
*/
2028 @
REQ(post_quit_message
)
2029 int exit_code
; /* exit code to return
*/
2034 MSG_ASCII
, /* Ascii
message (from SendMessageA
) */
2035 MSG_UNICODE
, /* Unicode
message (from SendMessageW
) */
2036 MSG_NOTIFY
, /* notify
message (from SendNotifyMessageW
), always Unicode
*/
2037 MSG_CALLBACK
, /* callback
message (from SendMessageCallbackW
), always Unicode
*/
2038 MSG_CALLBACK_RESULT
,/* result of a callback message
*/
2039 MSG_OTHER_PROCESS
, /* sent from other process
, may include vararg data
, always Unicode
*/
2040 MSG_POSTED
, /* posted
message (from PostMessageW
), always Unicode
*/
2041 MSG_HARDWARE
, /* hardware message
*/
2042 MSG_WINEVENT
, /* winevent message
*/
2043 MSG_HOOK_LL
/* low
-level hardware hook
*/
2045 #define SEND_MSG_ABORT_IF_HUNG
0x01
2048 /* Send a hardware message to a thread queue
*/
2049 @
REQ(send_hardware_message
)
2050 user_handle_t win
; /* window handle
*/
2051 hw_input_t input
; /* input data
*/
2052 unsigned int flags
; /* flags (see below
) */
2054 int wait
; /* do we need to wait for a reply?
*/
2055 int prev_x
; /* previous cursor position
*/
2057 int new_x
; /* new cursor position
*/
2059 VARARG(keystate
,bytes
); /* global state array for all the keys
*/
2061 #define SEND_HWMSG_INJECTED
0x01
2064 /* Get a message from the current queue
*/
2066 unsigned int flags
; /* PM_
* flags
*/
2067 user_handle_t get_win
; /* window handle to get
*/
2068 unsigned int get_first
; /* first message code to get
*/
2069 unsigned int get_last
; /* last message code to get
*/
2070 unsigned int hw_id
; /* id of the previous hardware
message (or
0) */
2071 unsigned int wake_mask
; /* wakeup bits mask
*/
2072 unsigned int changed_mask
; /* changed bits mask
*/
2074 user_handle_t win
; /* window handle
*/
2075 unsigned int msg
; /* message code
*/
2076 lparam_t wparam
; /* parameters
*/
2077 lparam_t lparam
; /* parameters
*/
2078 int type
; /* message type
*/
2079 unsigned int time
; /* message time
*/
2080 unsigned int active_hooks
; /* active hooks bitmap
*/
2081 data_size_t total
; /* total size of extra data
*/
2082 VARARG(data
,message_data
); /* message data for sent messages
*/
2086 /* Reply to a sent message
*/
2088 int remove
; /* should we remove the message?
*/
2089 lparam_t result
; /* message result
*/
2090 VARARG(data
,bytes
); /* message data for sent messages
*/
2094 /* Accept the current hardware message
*/
2095 @
REQ(accept_hardware_message
)
2096 unsigned int hw_id
; /* id of the hardware message
*/
2097 int remove
; /* should we remove the message?
*/
2098 user_handle_t new_win
; /* new destination window for current message
*/
2102 /* Retrieve the reply for the last message sent
*/
2103 @
REQ(get_message_reply
)
2104 int cancel
; /* cancel message if not ready?
*/
2106 lparam_t result
; /* message result
*/
2107 VARARG(data
,bytes
); /* message data for sent messages
*/
2111 /* Set a window timer
*/
2113 user_handle_t win
; /* window handle
*/
2114 unsigned int msg
; /* message to post
*/
2115 unsigned int rate
; /* timer rate in ms
*/
2116 lparam_t id
; /* timer id
*/
2117 lparam_t lparam
; /* message
lparam (callback proc
) */
2119 lparam_t id
; /* timer id
*/
2123 /* Kill a window timer
*/
2124 @
REQ(kill_win_timer
)
2125 user_handle_t win
; /* window handle
*/
2126 lparam_t id
; /* timer id
*/
2127 unsigned int msg
; /* message to post
*/
2131 /* check if the thread owning the window is hung
*/
2132 @
REQ(is_window_hung
)
2133 user_handle_t win
; /* window handle
*/
2139 /* Retrieve info about a serial port
*/
2140 @
REQ(get_serial_info
)
2141 obj_handle_t handle
; /* handle to comm port
*/
2143 unsigned int readinterval
;
2144 unsigned int readconst
;
2145 unsigned int readmult
;
2146 unsigned int writeconst
;
2147 unsigned int writemult
;
2148 unsigned int eventmask
;
2152 /* Set info about a serial port
*/
2153 @
REQ(set_serial_info
)
2154 obj_handle_t handle
; /* handle to comm port
*/
2155 int flags
; /* bitmask to set
values (see below
) */
2156 unsigned int readinterval
;
2157 unsigned int readconst
;
2158 unsigned int readmult
;
2159 unsigned int writeconst
;
2160 unsigned int writemult
;
2161 unsigned int eventmask
;
2163 #define SERIALINFO_SET_TIMEOUTS
0x01
2164 #define SERIALINFO_SET_MASK
0x02
2167 /* Create an async I
/O
*/
2168 @
REQ(register_async
)
2169 int type
; /* type of queue to look after
*/
2170 async_data_t async
; /* async I
/O parameters
*/
2171 int count
; /* count
- usually # of bytes to be read
/written
*/
2173 #define ASYNC_TYPE_READ
0x01
2174 #define ASYNC_TYPE_WRITE
0x02
2175 #define ASYNC_TYPE_WAIT
0x03
2178 /* Cancel all async op on a fd
*/
2180 obj_handle_t handle
; /* handle to comm port
, socket or file
*/
2181 client_ptr_t iosb
; /* I
/O status
block (NULL
=all
) */
2182 int only_thread
; /* cancel matching this thread
*/
2186 /* Perform an ioctl on a file
*/
2188 ioctl_code_t code
; /* ioctl code
*/
2189 async_data_t async
; /* async I
/O parameters
*/
2190 int blocking
; /* whether it
's a blocking ioctl */
2191 VARARG(in_data,bytes); /* ioctl input data */
2193 obj_handle_t wait; /* handle to wait on for blocking ioctl */
2194 unsigned int options; /* device open options */
2195 VARARG(out_data,bytes); /* ioctl output data */
2199 /* Retrieve results of an async ioctl */
2200 @REQ(get_ioctl_result)
2201 obj_handle_t handle; /* handle to the device */
2202 client_ptr_t user_arg; /* user arg used to identify the request */
2204 VARARG(out_data,bytes); /* ioctl output data */
2208 /* Create a named pipe */
2209 @REQ(create_named_pipe)
2210 unsigned int access;
2211 unsigned int attributes; /* object attributes */
2212 obj_handle_t rootdir; /* root directory */
2213 unsigned int options;
2214 unsigned int sharing;
2215 unsigned int maxinstances;
2216 unsigned int outsize;
2217 unsigned int insize;
2220 VARARG(name,unicode_str); /* pipe name */
2222 obj_handle_t handle; /* handle to the pipe */
2225 /* flags in create_named_pipe and get_named_pipe_info */
2226 #define NAMED_PIPE_MESSAGE_STREAM_WRITE 0x0001
2227 #define NAMED_PIPE_MESSAGE_STREAM_READ 0x0002
2228 #define NAMED_PIPE_NONBLOCKING_MODE 0x0004
2229 #define NAMED_PIPE_SERVER_END 0x8000
2232 @REQ(get_named_pipe_info)
2233 obj_handle_t handle;
2236 unsigned int sharing;
2237 unsigned int maxinstances;
2238 unsigned int instances;
2239 unsigned int outsize;
2240 unsigned int insize;
2244 /* Create a window */
2246 user_handle_t parent; /* parent window */
2247 user_handle_t owner; /* owner window */
2248 atom_t atom; /* class atom */
2249 mod_handle_t instance; /* module instance */
2250 VARARG(class,unicode_str); /* class name */
2252 user_handle_t handle; /* created window */
2253 user_handle_t parent; /* full handle of parent */
2254 user_handle_t owner; /* full handle of owner */
2255 int extra; /* number of extra bytes */
2256 client_ptr_t class_ptr; /* pointer to class in client address space */
2260 /* Destroy a window */
2261 @REQ(destroy_window)
2262 user_handle_t handle; /* handle to the window */
2266 /* Retrieve the desktop window for the current thread */
2267 @REQ(get_desktop_window)
2268 int force; /* force creation if it doesn't exist
*/
2270 user_handle_t top_window
; /* handle to the desktop window
*/
2271 user_handle_t msg_window
; /* handle to the top
-level HWND_MESSAGE parent
*/
2275 /* Set a window owner
*/
2276 @
REQ(set_window_owner
)
2277 user_handle_t handle
; /* handle to the window
*/
2278 user_handle_t owner
; /* new owner
*/
2280 user_handle_t full_owner
; /* full handle of new owner
*/
2281 user_handle_t prev_owner
; /* full handle of previous owner
*/
2285 /* Get information from a window handle
*/
2286 @
REQ(get_window_info
)
2287 user_handle_t handle
; /* handle to the window
*/
2289 user_handle_t full_handle
; /* full
32-bit handle
*/
2290 user_handle_t last_active
; /* last active popup
*/
2291 process_id_t pid
; /* process owning the window
*/
2292 thread_id_t tid
; /* thread owning the window
*/
2293 atom_t atom
; /* class atom
*/
2294 int is_unicode
; /* ANSI or unicode
*/
2298 /* Set some information in a window
*/
2299 @
REQ(set_window_info
)
2300 unsigned short flags
; /* flags for fields to
set (see below
) */
2301 short int is_unicode
; /* ANSI or unicode
*/
2302 user_handle_t handle
; /* handle to the window
*/
2303 unsigned int style
; /* window style
*/
2304 unsigned int ex_style
; /* window extended style
*/
2305 unsigned int id
; /* window id
*/
2306 mod_handle_t instance
; /* creator instance
*/
2307 lparam_t user_data
; /* user
-specific data
*/
2308 int extra_offset
; /* offset to set in extra bytes
*/
2309 data_size_t extra_size
; /* size to set in extra bytes
*/
2310 lparam_t extra_value
; /* value to set in extra bytes
*/
2312 unsigned int old_style
; /* old window style
*/
2313 unsigned int old_ex_style
; /* old window extended style
*/
2314 mod_handle_t old_instance
; /* old creator instance
*/
2315 lparam_t old_user_data
; /* old user
-specific data
*/
2316 lparam_t old_extra_value
; /* old value in extra bytes
*/
2317 unsigned int old_id
; /* old window id
*/
2319 #define SET_WIN_STYLE
0x01
2320 #define SET_WIN_EXSTYLE
0x02
2321 #define SET_WIN_ID
0x04
2322 #define SET_WIN_INSTANCE
0x08
2323 #define SET_WIN_USERDATA
0x10
2324 #define SET_WIN_EXTRA
0x20
2325 #define SET_WIN_UNICODE
0x40
2328 /* Set the parent of a window
*/
2330 user_handle_t handle
; /* handle to the window
*/
2331 user_handle_t parent
; /* handle to the parent
*/
2333 user_handle_t old_parent
; /* old parent window
*/
2334 user_handle_t full_parent
; /* full handle of new parent
*/
2338 /* Get a list of the window parents
, up to the root of the tree
*/
2339 @
REQ(get_window_parents
)
2340 user_handle_t handle
; /* handle to the window
*/
2342 int count
; /* total count of parents
*/
2343 VARARG(parents
,user_handles
); /* parent handles
*/
2347 /* Get a list of the window children
*/
2348 @
REQ(get_window_children
)
2349 obj_handle_t desktop
; /* handle to desktop
*/
2350 user_handle_t parent
; /* parent window
*/
2351 atom_t atom
; /* class atom for the listed children
*/
2352 thread_id_t tid
; /* thread owning the listed children
*/
2353 VARARG(class
,unicode_str
); /* class name
*/
2355 int count
; /* total count of children
*/
2356 VARARG(children
,user_handles
); /* children handles
*/
2360 /* Get a list of the window children that contain a given point
*/
2361 @
REQ(get_window_children_from_point
)
2362 user_handle_t parent
; /* parent window
*/
2363 int x
; /* point in parent coordinates
*/
2366 int count
; /* total count of children
*/
2367 VARARG(children
,user_handles
); /* children handles
*/
2371 /* Get window tree information from a window handle
*/
2372 @
REQ(get_window_tree
)
2373 user_handle_t handle
; /* handle to the window
*/
2375 user_handle_t parent
; /* parent window
*/
2376 user_handle_t owner
; /* owner window
*/
2377 user_handle_t next_sibling
; /* next sibling in Z
-order
*/
2378 user_handle_t prev_sibling
; /* prev sibling in Z
-order
*/
2379 user_handle_t first_sibling
; /* first sibling in Z
-order
*/
2380 user_handle_t last_sibling
; /* last sibling in Z
-order
*/
2381 user_handle_t first_child
; /* first child
*/
2382 user_handle_t last_child
; /* last child
*/
2385 /* Set the position and Z order of a window
*/
2386 @
REQ(set_window_pos
)
2387 unsigned int flags
; /* SWP_
* flags
*/
2388 user_handle_t handle
; /* handle to the window
*/
2389 user_handle_t previous
; /* previous window in Z order
*/
2390 rectangle_t window
; /* window
rectangle (in parent coords
) */
2391 rectangle_t client
; /* client
rectangle (in parent coords
) */
2392 VARARG(valid
,rectangles
); /* valid rectangles from
WM_NCCALCSIZE (in parent coords
) */
2394 unsigned int new_style
; /* new window style
*/
2395 unsigned int new_ex_style
; /* new window extended style
*/
2399 /* Get the window and client rectangles of a window
*/
2400 @
REQ(get_window_rectangles
)
2401 user_handle_t handle
; /* handle to the window
*/
2402 int relative
; /* coords relative
to (see below
) */
2404 rectangle_t window
; /* window rectangle
*/
2405 rectangle_t visible
; /* visible part of the window rectangle
*/
2406 rectangle_t client
; /* client rectangle
*/
2408 enum coords_relative
2410 COORDS_CLIENT
, /* relative to client area
*/
2411 COORDS_WINDOW
, /* relative to whole window area
*/
2412 COORDS_PARENT
, /* relative to parent
's client area */
2413 COORDS_SCREEN /* relative to screen origin */
2417 /* Get the window text */
2418 @REQ(get_window_text)
2419 user_handle_t handle; /* handle to the window */
2421 VARARG(text,unicode_str); /* window text */
2425 /* Set the window text */
2426 @REQ(set_window_text)
2427 user_handle_t handle; /* handle to the window */
2428 VARARG(text,unicode_str); /* window text */
2432 /* Get the coordinates offset between two windows */
2433 @REQ(get_windows_offset)
2434 user_handle_t from; /* handle to the first window */
2435 user_handle_t to; /* handle to the second window */
2437 int x; /* x coordinate offset */
2438 int y; /* y coordinate offset */
2439 int mirror; /* whether to mirror the x coordinate */
2443 /* Get the visible region of a window */
2444 @REQ(get_visible_region)
2445 user_handle_t window; /* handle to the window */
2446 unsigned int flags; /* DCX flags */
2448 user_handle_t top_win; /* top window to clip against */
2449 rectangle_t top_rect; /* top window visible rect with screen coords */
2450 rectangle_t win_rect; /* window rect in screen coords */
2451 data_size_t total_size; /* total size of the resulting region */
2452 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2456 /* Get the window region */
2457 @REQ(get_window_region)
2458 user_handle_t window; /* handle to the window */
2460 data_size_t total_size; /* total size of the resulting region */
2461 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2465 /* Set the window region */
2466 @REQ(set_window_region)
2467 user_handle_t window; /* handle to the window */
2468 int redraw; /* redraw the window? */
2469 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2473 /* Get the window update region */
2474 @REQ(get_update_region)
2475 user_handle_t window; /* handle to the window */
2476 user_handle_t from_child; /* child to start searching from */
2477 unsigned int flags; /* update flags (see below) */
2479 user_handle_t child; /* child to repaint (or window itself) */
2480 unsigned int flags; /* resulting update flags (see below) */
2481 data_size_t total_size; /* total size of the resulting region */
2482 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2484 #define UPDATE_NONCLIENT 0x01 /* get region for repainting non-client area */
2485 #define UPDATE_ERASE 0x02 /* get region for erasing client area */
2486 #define UPDATE_PAINT 0x04 /* get region for painting client area */
2487 #define UPDATE_INTERNALPAINT 0x08 /* get region if internal paint is pending */
2488 #define UPDATE_ALLCHILDREN 0x10 /* force repaint of all children */
2489 #define UPDATE_NOCHILDREN 0x20 /* don't try to repaint any children
*/
2490 #define UPDATE_NOREGION
0x40 /* don
't return a region, only the flags */
2491 #define UPDATE_DELAYED_ERASE 0x80 /* still needs erase after BeginPaint */
2494 /* Update the z order of a window so that a given rectangle is fully visible */
2495 @REQ(update_window_zorder)
2496 user_handle_t window; /* handle to the window */
2497 rectangle_t rect; /* rectangle that must be visible (in client coords) */
2501 /* Mark parts of a window as needing a redraw */
2503 user_handle_t window; /* handle to the window */
2504 unsigned int flags; /* RDW_* flags */
2505 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2509 /* Set a window property */
2510 @REQ(set_window_property)
2511 user_handle_t window; /* handle to the window */
2512 lparam_t data; /* data to store */
2513 atom_t atom; /* property atom (if no name specified) */
2514 VARARG(name,unicode_str); /* property name */
2518 /* Remove a window property */
2519 @REQ(remove_window_property)
2520 user_handle_t window; /* handle to the window */
2521 atom_t atom; /* property atom (if no name specified) */
2522 VARARG(name,unicode_str); /* property name */
2524 lparam_t data; /* data stored in property */
2528 /* Get a window property */
2529 @REQ(get_window_property)
2530 user_handle_t window; /* handle to the window */
2531 atom_t atom; /* property atom (if no name specified) */
2532 VARARG(name,unicode_str); /* property name */
2534 lparam_t data; /* data stored in property */
2538 /* Get the list of properties of a window */
2539 @REQ(get_window_properties)
2540 user_handle_t window; /* handle to the window */
2542 int total; /* total number of properties */
2543 VARARG(props,properties); /* list of properties */
2547 /* Create a window station */
2548 @REQ(create_winstation)
2549 unsigned int flags; /* window station flags */
2550 unsigned int access; /* wanted access rights */
2551 unsigned int attributes; /* object attributes */
2552 VARARG(name,unicode_str); /* object name */
2554 obj_handle_t handle; /* handle to the window station */
2558 /* Open a handle to a window station */
2559 @REQ(open_winstation)
2560 unsigned int access; /* wanted access rights */
2561 unsigned int attributes; /* object attributes */
2562 VARARG(name,unicode_str); /* object name */
2564 obj_handle_t handle; /* handle to the window station */
2568 /* Close a window station */
2569 @REQ(close_winstation)
2570 obj_handle_t handle; /* handle to the window station */
2574 /* Get the process current window station */
2575 @REQ(get_process_winstation)
2577 obj_handle_t handle; /* handle to the window station */
2581 /* Set the process current window station */
2582 @REQ(set_process_winstation)
2583 obj_handle_t handle; /* handle to the window station */
2587 /* Enumerate window stations */
2588 @REQ(enum_winstation)
2589 unsigned int index; /* current index */
2591 unsigned int next; /* next index */
2592 VARARG(name,unicode_str); /* window station name */
2596 /* Create a desktop */
2597 @REQ(create_desktop)
2598 unsigned int flags; /* desktop flags */
2599 unsigned int access; /* wanted access rights */
2600 unsigned int attributes; /* object attributes */
2601 VARARG(name,unicode_str); /* object name */
2603 obj_handle_t handle; /* handle to the desktop */
2607 /* Open a handle to a desktop */
2609 obj_handle_t winsta; /* window station to open (null allowed) */
2610 unsigned int flags; /* desktop flags */
2611 unsigned int access; /* wanted access rights */
2612 unsigned int attributes; /* object attributes */
2613 VARARG(name,unicode_str); /* object name */
2615 obj_handle_t handle; /* handle to the desktop */
2619 /* Close a desktop */
2621 obj_handle_t handle; /* handle to the desktop */
2625 /* Get the thread current desktop */
2626 @REQ(get_thread_desktop)
2627 thread_id_t tid; /* thread id */
2629 obj_handle_t handle; /* handle to the desktop */
2633 /* Set the thread current desktop */
2634 @REQ(set_thread_desktop)
2635 obj_handle_t handle; /* handle to the desktop */
2639 /* Enumerate desktops */
2641 obj_handle_t winstation; /* handle to the window station */
2642 unsigned int index; /* current index */
2644 unsigned int next; /* next index */
2645 VARARG(name,unicode_str); /* window station name */
2649 /* Get/set information about a user object (window station or desktop) */
2650 @REQ(set_user_object_info)
2651 obj_handle_t handle; /* handle to the object */
2652 unsigned int flags; /* information to set */
2653 unsigned int obj_flags; /* new object flags */
2655 int is_desktop; /* is object a desktop? */
2656 unsigned int old_obj_flags; /* old object flags */
2657 VARARG(name,unicode_str); /* object name */
2659 #define SET_USER_OBJECT_FLAGS 1
2662 /* Register a hotkey */
2663 @REQ(register_hotkey)
2664 user_handle_t window; /* handle to the window */
2665 int id; /* hotkey identifier */
2666 unsigned int flags; /* modifier keys */
2667 unsigned int vkey; /* virtual key code */
2669 int replaced; /* did we replace an existing hotkey? */
2670 unsigned int flags; /* flags of replaced hotkey */
2671 unsigned int vkey; /* virtual key code of replaced hotkey */
2675 /* Unregister a hotkey */
2676 @REQ(unregister_hotkey)
2677 user_handle_t window; /* handle to the window */
2678 int id; /* hotkey identifier */
2680 unsigned int flags; /* flags of removed hotkey */
2681 unsigned int vkey; /* virtual key code of removed hotkey */
2685 /* Attach (or detach) thread inputs */
2686 @REQ(attach_thread_input)
2687 thread_id_t tid_from; /* thread to be attached */
2688 thread_id_t tid_to; /* thread to which tid_from should be attached */
2689 int attach; /* is it an attach? */
2693 /* Get input data for a given thread */
2694 @REQ(get_thread_input)
2695 thread_id_t tid; /* id of thread */
2697 user_handle_t focus; /* handle to the focus window */
2698 user_handle_t capture; /* handle to the capture window */
2699 user_handle_t active; /* handle to the active window */
2700 user_handle_t foreground; /* handle to the global foreground window */
2701 user_handle_t menu_owner; /* handle to the menu owner */
2702 user_handle_t move_size; /* handle to the moving/resizing window */
2703 user_handle_t caret; /* handle to the caret window */
2704 user_handle_t cursor; /* handle to the cursor */
2705 int show_count; /* cursor show count */
2706 rectangle_t rect; /* caret rectangle */
2710 /* Get the time of the last input event */
2711 @REQ(get_last_input_time)
2717 /* Retrieve queue keyboard state for a given thread */
2719 thread_id_t tid; /* id of thread */
2720 int key; /* optional key code or -1 */
2722 unsigned char state; /* state of specified key */
2723 VARARG(keystate,bytes); /* state array for all the keys */
2726 /* Set queue keyboard state for a given thread */
2728 thread_id_t tid; /* id of thread */
2729 int async; /* whether to change the async state too */
2730 VARARG(keystate,bytes); /* state array for all the keys */
2733 /* Set the system foreground window */
2734 @REQ(set_foreground_window)
2735 user_handle_t handle; /* handle to the foreground window */
2737 user_handle_t previous; /* handle to the previous foreground window */
2738 int send_msg_old; /* whether we have to send a msg to the old window */
2739 int send_msg_new; /* whether we have to send a msg to the new window */
2742 /* Set the current thread focus window */
2743 @REQ(set_focus_window)
2744 user_handle_t handle; /* handle to the focus window */
2746 user_handle_t previous; /* handle to the previous focus window */
2749 /* Set the current thread active window */
2750 @REQ(set_active_window)
2751 user_handle_t handle; /* handle to the active window */
2753 user_handle_t previous; /* handle to the previous active window */
2756 /* Set the current thread capture window */
2757 @REQ(set_capture_window)
2758 user_handle_t handle; /* handle to the capture window */
2759 unsigned int flags; /* capture flags (see below) */
2761 user_handle_t previous; /* handle to the previous capture window */
2762 user_handle_t full_handle; /* full 32-bit handle of new capture window */
2764 #define CAPTURE_MENU 0x01 /* capture is for a menu */
2765 #define CAPTURE_MOVESIZE 0x02 /* capture is for moving/resizing */
2768 /* Set the current thread caret window */
2769 @REQ(set_caret_window)
2770 user_handle_t handle; /* handle to the caret window */
2771 int width; /* caret width */
2772 int height; /* caret height */
2774 user_handle_t previous; /* handle to the previous caret window */
2775 rectangle_t old_rect; /* previous caret rectangle */
2776 int old_hide; /* previous hide count */
2777 int old_state; /* previous caret state (1=on, 0=off) */
2781 /* Set the current thread caret information */
2782 @REQ(set_caret_info)
2783 unsigned int flags; /* caret flags (see below) */
2784 user_handle_t handle; /* handle to the caret window */
2785 int x; /* caret x position */
2786 int y; /* caret y position */
2787 int hide; /* increment for hide count (can be negative to show it) */
2788 int state; /* caret state (1=on, 0=off, -1=toggle current state) */
2790 user_handle_t full_handle; /* handle to the current caret window */
2791 rectangle_t old_rect; /* previous caret rectangle */
2792 int old_hide; /* previous hide count */
2793 int old_state; /* previous caret state (1=on, 0=off) */
2795 #define SET_CARET_POS 0x01 /* set the caret position from x,y */
2796 #define SET_CARET_HIDE 0x02 /* increment the caret hide count */
2797 #define SET_CARET_STATE 0x04 /* set the caret on/off state */
2800 /* Set a window hook */
2802 int id; /* id of the hook */
2803 process_id_t pid; /* id of process to set the hook into */
2804 thread_id_t tid; /* id of thread to set the hook into */
2807 client_ptr_t proc; /* hook procedure */
2809 int unicode; /* is it a unicode hook? */
2810 VARARG(module,unicode_str); /* module name */
2812 user_handle_t handle; /* handle to the hook */
2813 unsigned int active_hooks; /* active hooks bitmap */
2817 /* Remove a window hook */
2819 user_handle_t handle; /* handle to the hook */
2820 client_ptr_t proc; /* hook procedure if handle is 0 */
2821 int id; /* id of the hook if handle is 0 */
2823 unsigned int active_hooks; /* active hooks bitmap */
2827 /* Start calling a hook chain */
2828 @REQ(start_hook_chain)
2829 int id; /* id of the hook */
2830 int event; /* signalled event */
2831 user_handle_t window; /* handle to the event window */
2832 int object_id; /* object id for out of context winevent */
2833 int child_id; /* child id for out of context winevent */
2835 user_handle_t handle; /* handle to the next hook */
2836 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2837 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2838 int unicode; /* is it a unicode hook? */
2839 client_ptr_t proc; /* hook procedure */
2840 unsigned int active_hooks; /* active hooks bitmap */
2841 VARARG(module,unicode_str); /* module name */
2845 /* Finished calling a hook chain */
2846 @REQ(finish_hook_chain)
2847 int id; /* id of the hook */
2851 /* Get the hook information */
2853 user_handle_t handle; /* handle to the current hook */
2854 int get_next; /* do we want info about current or next hook? */
2855 int event; /* signalled event */
2856 user_handle_t window; /* handle to the event window */
2857 int object_id; /* object id for out of context winevent */
2858 int child_id; /* child id for out of context winevent */
2860 user_handle_t handle; /* handle to the hook */
2861 int id; /* id of the hook */
2862 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2863 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2864 client_ptr_t proc; /* hook procedure */
2865 int unicode; /* is it a unicode hook? */
2866 VARARG(module,unicode_str); /* module name */
2870 /* Create a window class */
2872 int local; /* is it a local class? */
2873 atom_t atom; /* class atom */
2874 unsigned int style; /* class style */
2875 mod_handle_t instance; /* module instance */
2876 int extra; /* number of extra class bytes */
2877 int win_extra; /* number of window extra bytes */
2878 client_ptr_t client_ptr; /* pointer to class in client address space */
2879 VARARG(name,unicode_str); /* class name */
2881 atom_t atom; /* resulting class atom */
2885 /* Destroy a window class */
2887 atom_t atom; /* class atom */
2888 mod_handle_t instance; /* module instance */
2889 VARARG(name,unicode_str); /* class name */
2891 client_ptr_t client_ptr; /* pointer to class in client address space */
2895 /* Set some information in a class */
2896 @REQ(set_class_info)
2897 user_handle_t window; /* handle to the window */
2898 unsigned int flags; /* flags for info to set (see below) */
2899 atom_t atom; /* class atom */
2900 unsigned int style; /* class style */
2901 int win_extra; /* number of window extra bytes */
2902 mod_handle_t instance; /* module instance */
2903 int extra_offset; /* offset to set in extra bytes */
2904 data_size_t extra_size; /* size to set in extra bytes */
2905 lparam_t extra_value; /* value to set in extra bytes */
2907 atom_t old_atom; /* previous class atom */
2908 unsigned int old_style; /* previous class style */
2909 int old_extra; /* previous number of class extra bytes */
2910 int old_win_extra; /* previous number of window extra bytes */
2911 mod_handle_t old_instance; /* previous module instance */
2912 lparam_t old_extra_value; /* old value in extra bytes */
2914 #define SET_CLASS_ATOM 0x0001
2915 #define SET_CLASS_STYLE 0x0002
2916 #define SET_CLASS_WINEXTRA 0x0004
2917 #define SET_CLASS_INSTANCE 0x0008
2918 #define SET_CLASS_EXTRA 0x0010
2921 /* Set/get clipboard information */
2922 @REQ(set_clipboard_info)
2923 unsigned int flags; /* flags for fields to set (see below) */
2924 user_handle_t clipboard; /* clipboard window */
2925 user_handle_t owner; /* clipboard owner */
2926 user_handle_t viewer; /* first clipboard viewer */
2927 unsigned int seqno; /* change sequence number */
2929 unsigned int flags; /* status flags (see below) */
2930 user_handle_t old_clipboard; /* old clipboard window */
2931 user_handle_t old_owner; /* old clipboard owner */
2932 user_handle_t old_viewer; /* old clipboard viewer */
2933 unsigned int seqno; /* current sequence number */
2936 #define SET_CB_OPEN 0x001
2937 #define SET_CB_OWNER 0x002
2938 #define SET_CB_VIEWER 0x004
2939 #define SET_CB_SEQNO 0x008
2940 #define SET_CB_RELOWNER 0x010
2941 #define SET_CB_CLOSE 0x020
2942 #define CB_OPEN 0x040
2943 #define CB_OWNER 0x080
2944 #define CB_PROCESS 0x100
2947 /* Open a security token */
2949 obj_handle_t handle; /* handle to the thread or process */
2950 unsigned int access; /* access rights to the new token */
2951 unsigned int attributes;/* object attributes */
2952 unsigned int flags; /* flags (see below) */
2954 obj_handle_t token; /* handle to the token */
2956 #define OPEN_TOKEN_THREAD 1
2957 #define OPEN_TOKEN_AS_SELF 2
2960 /* Set/get the global windows */
2961 @REQ(set_global_windows)
2962 unsigned int flags; /* flags for fields to set (see below) */
2963 user_handle_t shell_window; /* handle to the new shell window */
2964 user_handle_t shell_listview; /* handle to the new shell listview window */
2965 user_handle_t progman_window; /* handle to the new program manager window */
2966 user_handle_t taskman_window; /* handle to the new task manager window */
2968 user_handle_t old_shell_window; /* handle to the shell window */
2969 user_handle_t old_shell_listview; /* handle to the shell listview window */
2970 user_handle_t old_progman_window; /* handle to the new program manager window */
2971 user_handle_t old_taskman_window; /* handle to the new task manager window */
2973 #define SET_GLOBAL_SHELL_WINDOWS 0x01 /* set both main shell and listview windows */
2974 #define SET_GLOBAL_PROGMAN_WINDOW 0x02
2975 #define SET_GLOBAL_TASKMAN_WINDOW 0x04
2977 /* Adjust the privileges held by a token */
2978 @REQ(adjust_token_privileges)
2979 obj_handle_t handle; /* handle to the token */
2980 int disable_all; /* disable all privileges? */
2981 int get_modified_state; /* get modified privileges? */
2982 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to enable/disable/remove */
2984 unsigned int len; /* total length in bytes required to store token privileges */
2985 VARARG(privileges,LUID_AND_ATTRIBUTES); /* modified privileges */
2988 /* Retrieves the set of privileges held by or available to a token */
2989 @REQ(get_token_privileges)
2990 obj_handle_t handle; /* handle to the token */
2992 unsigned int len; /* total length in bytes required to store token privileges */
2993 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
2996 /* Check the token has the required privileges */
2997 @REQ(check_token_privileges)
2998 obj_handle_t handle; /* handle to the token */
2999 int all_required; /* are all the privileges required for the check to succeed? */
3000 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to check */
3002 int has_privileges; /* does the token have the required privileges? */
3003 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
3006 @REQ(duplicate_token)
3007 obj_handle_t handle; /* handle to the token to duplicate */
3008 unsigned int access; /* access rights to the new token */
3009 unsigned int attributes; /* object attributes */
3010 int primary; /* is the new token to be a primary one? */
3011 int impersonation_level; /* impersonation level of the new token */
3013 obj_handle_t new_handle; /* duplicated handle */
3017 obj_handle_t handle; /* handle to the token */
3018 unsigned int desired_access; /* desired access to the object */
3019 unsigned int mapping_read; /* mapping from generic read to specific rights */
3020 unsigned int mapping_write; /* mapping from generic write to specific rights */
3021 unsigned int mapping_execute; /* mapping from generic execute to specific rights */
3022 unsigned int mapping_all; /* mapping from generic all to specific rights */
3023 VARARG(sd,security_descriptor); /* security descriptor to check */
3025 unsigned int access_granted; /* access rights actually granted */
3026 unsigned int access_status; /* was access granted? */
3027 unsigned int privileges_len; /* length needed to store privileges */
3028 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges used during access check */
3032 obj_handle_t handle; /* handle to the token */
3033 unsigned int which_sid; /* which SID to retrieve from the token */
3035 data_size_t sid_len; /* length needed to store sid */
3036 VARARG(sid,SID); /* the sid specified by which_sid from the token */
3039 @REQ(get_token_groups)
3040 obj_handle_t handle; /* handle to the token */
3042 data_size_t user_len; /* length needed to store user */
3043 VARARG(user,token_groups); /* groups the token's user belongs to
*/
3046 @
REQ(get_token_default_dacl
)
3047 obj_handle_t handle
; /* handle to the token
*/
3049 data_size_t acl_len
; /* length needed to store access control list
*/
3050 VARARG(acl
,ACL
); /* access control list
*/
3053 @
REQ(set_token_default_dacl
)
3054 obj_handle_t handle
; /* handle to the token
*/
3055 VARARG(acl
,ACL
); /* default dacl to set
*/
3058 @
REQ(set_security_object
)
3059 obj_handle_t handle
; /* handle to the object
*/
3060 unsigned int security_info
; /* which parts of security descriptor to set
*/
3061 VARARG(sd
,security_descriptor
); /* security descriptor to set
*/
3064 @
REQ(get_security_object
)
3065 obj_handle_t handle
; /* handle to the object
*/
3066 unsigned int security_info
; /* which parts of security descriptor to get
*/
3068 unsigned int sd_len
; /* buffer size needed for sd
*/
3069 VARARG(sd
,security_descriptor
); /* retrieved security descriptor
*/
3072 /* Create a mailslot
*/
3073 @
REQ(create_mailslot
)
3074 unsigned int access
; /* wanted access rights
*/
3075 unsigned int attributes
; /* object attributes
*/
3076 obj_handle_t rootdir
; /* root directory
*/
3077 timeout_t read_timeout
;
3078 unsigned int max_msgsize
;
3079 VARARG(name
,unicode_str
); /* mailslot name
*/
3081 obj_handle_t handle
; /* handle to the mailslot
*/
3085 /* Set mailslot information
*/
3086 @
REQ(set_mailslot_info
)
3087 obj_handle_t handle
; /* handle to the mailslot
*/
3088 timeout_t read_timeout
;
3091 timeout_t read_timeout
;
3092 unsigned int max_msgsize
;
3094 #define MAILSLOT_SET_READ_TIMEOUT
1
3097 /* Create a directory object
*/
3098 @
REQ(create_directory
)
3099 unsigned int access
; /* access flags
*/
3100 unsigned int attributes
; /* object attributes
*/
3101 obj_handle_t rootdir
; /* root directory
*/
3102 VARARG(directory_name
,unicode_str
); /* Directory name
*/
3104 obj_handle_t handle
; /* handle to the directory
*/
3108 /* Open a directory object
*/
3109 @
REQ(open_directory
)
3110 unsigned int access
; /* access flags
*/
3111 unsigned int attributes
; /* object attributes
*/
3112 obj_handle_t rootdir
; /* root directory
*/
3113 VARARG(directory_name
,unicode_str
); /* Directory name
*/
3115 obj_handle_t handle
; /* handle to the directory
*/
3119 /* Get a directory entry by index
*/
3120 @
REQ(get_directory_entry
)
3121 obj_handle_t handle
; /* handle to the directory
*/
3122 unsigned int index
; /* entry index
*/
3124 data_size_t name_len
; /* length of the entry name in bytes
*/
3125 VARARG(name
,unicode_str
,name_len
); /* entry name
*/
3126 VARARG(type
,unicode_str
); /* entry type
*/
3130 /* Create a symbolic link object
*/
3131 @
REQ(create_symlink
)
3132 unsigned int access
; /* access flags
*/
3133 unsigned int attributes
; /* object attributes
*/
3134 obj_handle_t rootdir
; /* root directory
*/
3135 data_size_t name_len
; /* length of the symlink name in bytes
*/
3136 VARARG(name
,unicode_str
,name_len
); /* symlink name
*/
3137 VARARG(target_name
,unicode_str
); /* target name
*/
3139 obj_handle_t handle
; /* handle to the symlink
*/
3143 /* Open a symbolic link object
*/
3145 unsigned int access
; /* access flags
*/
3146 unsigned int attributes
; /* object attributes
*/
3147 obj_handle_t rootdir
; /* root directory
*/
3148 VARARG(name
,unicode_str
); /* symlink name
*/
3150 obj_handle_t handle
; /* handle to the symlink
*/
3154 /* Query a symbolic link object
*/
3156 obj_handle_t handle
; /* handle to the symlink
*/
3158 data_size_t total
; /* total needed size for name
*/
3159 VARARG(target_name
,unicode_str
); /* target name
*/
3163 /* Query basic object information
*/
3164 @
REQ(get_object_info
)
3165 obj_handle_t handle
; /* handle to the object
*/
3167 unsigned int access
; /* granted access mask
*/
3168 unsigned int ref_count
; /* object ref count
*/
3169 data_size_t total
; /* total needed size for name
*/
3170 VARARG(name
,unicode_str
); /* object name
*/
3174 /* Unlink a named object
*/
3176 obj_handle_t handle
; /* handle to the object
*/
3180 /* Query the impersonation level of an impersonation token
*/
3181 @
REQ(get_token_impersonation_level
)
3182 obj_handle_t handle
; /* handle to the object
*/
3184 int impersonation_level
; /* impersonation level of the impersonation token
*/
3187 /* Allocate a locally
-unique identifier
*/
3188 @
REQ(allocate_locally_unique_id
)
3194 /* Create a device manager
*/
3195 @
REQ(create_device_manager
)
3196 unsigned int access
; /* wanted access rights
*/
3197 unsigned int attributes
; /* object attributes
*/
3199 obj_handle_t handle
; /* handle to the device
*/
3203 /* Create a device
*/
3205 unsigned int access
; /* wanted access rights
*/
3206 unsigned int attributes
; /* object attributes
*/
3207 obj_handle_t rootdir
; /* root directory
*/
3208 client_ptr_t user_ptr
; /* opaque ptr for use by client
*/
3209 obj_handle_t manager
; /* device manager
*/
3210 VARARG(name
,unicode_str
); /* object name
*/
3212 obj_handle_t handle
; /* handle to the device
*/
3216 /* Delete a device
*/
3218 obj_handle_t handle
; /* handle to the device
*/
3222 /* Retrieve the next pending device ioctl request
*/
3223 @
REQ(get_next_device_request
)
3224 obj_handle_t manager
; /* handle to the device manager
*/
3225 obj_handle_t prev
; /* handle to the previous ioctl
*/
3226 unsigned int status
; /* status of the previous ioctl
*/
3227 VARARG(prev_data
,bytes
); /* output data of the previous ioctl
*/
3229 obj_handle_t next
; /* handle to the next ioctl
*/
3230 ioctl_code_t code
; /* ioctl code
*/
3231 client_ptr_t user_ptr
; /* opaque ptr for the device
*/
3232 process_id_t client_pid
; /* pid of process calling ioctl
*/
3233 thread_id_t client_tid
; /* tid of thread calling ioctl
*/
3234 data_size_t in_size
; /* total needed input size
*/
3235 data_size_t out_size
; /* needed output size
*/
3236 VARARG(next_data
,bytes
); /* input data of the next ioctl
*/
3240 /* Make the current process a system process
*/
3241 @
REQ(make_process_system
)
3243 obj_handle_t event
; /* event signaled when all user processes have exited
*/
3247 /* Get detailed fixed
-size information about a token
*/
3248 @
REQ(get_token_statistics
)
3249 obj_handle_t handle
; /* handle to the object
*/
3251 luid_t token_id
; /* locally
-unique identifier of the token
*/
3252 luid_t modified_id
; /* locally
-unique identifier of the modified version of the token
*/
3253 int primary
; /* is the token primary or impersonation?
*/
3254 int impersonation_level
; /* level of impersonation
*/
3255 int group_count
; /* the number of groups the token is a member of
*/
3256 int privilege_count
; /* the number of privileges the token has
*/
3260 /* Create I
/O completion port
*/
3261 @
REQ(create_completion
)
3262 unsigned int access
; /* desired access to a port
*/
3263 unsigned int attributes
; /* object attributes
*/
3264 unsigned int concurrent
; /* max number of concurrent active threads
*/
3265 obj_handle_t rootdir
; /* root directory
*/
3266 VARARG(filename
,string
); /* port name
*/
3268 obj_handle_t handle
; /* port handle
*/
3272 /* Open I
/O completion port
*/
3273 @
REQ(open_completion
)
3274 unsigned int access
; /* desired access to a port
*/
3275 unsigned int attributes
; /* object attributes
*/
3276 obj_handle_t rootdir
; /* root directory
*/
3277 VARARG(filename
,string
); /* port name
*/
3279 obj_handle_t handle
; /* port handle
*/
3283 /* add completion to completion port
*/
3284 @
REQ(add_completion
)
3285 obj_handle_t handle
; /* port handle
*/
3286 apc_param_t ckey
; /* completion key
*/
3287 apc_param_t cvalue
; /* completion value
*/
3288 unsigned int information
; /* IO_STATUS_BLOCK Information
*/
3289 unsigned int status
; /* completion result
*/
3293 /* get completion from completion port queue
*/
3294 @
REQ(remove_completion
)
3295 obj_handle_t handle
; /* port handle
*/
3297 apc_param_t ckey
; /* completion key
*/
3298 apc_param_t cvalue
; /* completion value
*/
3299 unsigned int information
; /* IO_STATUS_BLOCK Information
*/
3300 unsigned int status
; /* completion result
*/
3304 /* get completion queue depth
*/
3305 @
REQ(query_completion
)
3306 obj_handle_t handle
; /* port handle
*/
3308 unsigned int depth
; /* completion queue depth
*/
3312 /* associate object with completion port
*/
3313 @
REQ(set_completion_info
)
3314 obj_handle_t handle
; /* object handle
*/
3315 apc_param_t ckey
; /* completion key
*/
3316 obj_handle_t chandle
; /* port handle
*/
3320 /* check for associated completion and push msg
*/
3321 @
REQ(add_fd_completion
)
3322 obj_handle_t handle
; /* async
' object */
3323 apc_param_t cvalue; /* completion value */
3324 unsigned int status; /* completion status */
3325 unsigned int information; /* IO_STATUS_BLOCK Information */
3329 /* Retrieve layered info for a window */
3330 @REQ(get_window_layered_info)
3331 user_handle_t handle; /* handle to the window */
3333 unsigned int color_key; /* color key */
3334 unsigned int alpha; /* alpha (0..255) */
3335 unsigned int flags; /* LWA_* flags */
3339 /* Set layered info for a window */
3340 @REQ(set_window_layered_info)
3341 user_handle_t handle; /* handle to the window */
3342 unsigned int color_key; /* color key */
3343 unsigned int alpha; /* alpha (0..255) */
3344 unsigned int flags; /* LWA_* flags */
3348 /* Allocate an arbitrary user handle */
3349 @REQ(alloc_user_handle)
3351 user_handle_t handle; /* allocated handle */
3355 /* Free an arbitrary user handle */
3356 @REQ(free_user_handle)
3357 user_handle_t handle; /* handle to free*/
3361 /* Set/get the current cursor */
3363 unsigned int flags; /* flags for fields to set (see below) */
3364 user_handle_t handle; /* handle to the cursor */
3365 int show_count; /* show count increment/decrement */
3366 int x; /* cursor position */
3368 rectangle_t clip; /* cursor clip rectangle */
3369 unsigned int clip_msg; /* message to post on cursor clip changes */
3371 user_handle_t prev_handle; /* previous handle */
3372 int prev_count; /* previous show count */
3373 int prev_x; /* previous position */
3375 int new_x; /* new position */
3377 rectangle_t new_clip; /* new clip rectangle */
3378 unsigned int last_change; /* time of last position change */
3380 #define SET_CURSOR_HANDLE 0x01
3381 #define SET_CURSOR_COUNT 0x02
3382 #define SET_CURSOR_POS 0x04
3383 #define SET_CURSOR_CLIP 0x08
3384 #define SET_CURSOR_NOCLIP 0x10
3387 /* Modify the list of registered rawinput devices */
3388 @REQ(update_rawinput_devices)
3389 VARARG(devices,rawinput_devices);
3393 /* Retrieve the suspended context of a thread */
3394 @REQ(get_suspend_context)
3396 VARARG(context,context); /* thread context */
3400 /* Store the suspend context of a thread */
3401 @REQ(set_suspend_context)
3402 VARARG(context,context); /* thread context */