DIB Engine: implement AlphaBlend
[wine/hacks.git] / server / protocol.def
blobe381196bc26873bc6fae72b262eb794d5d4bcbaf
1 /* -*- C -*-
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 */
27 #include <stdarg.h>
28 #include <stdlib.h>
29 #include <time.h>
31 #include <windef.h>
32 #include <winbase.h>
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;
49 struct request_header
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 */
56 struct reply_header
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 */
74 typedef union
76 int code; /* event code */
77 struct
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 */
86 int __pad;
87 client_ptr_t params[15]; /* parameters */
88 } exception;
89 struct
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 */
95 } create_thread;
96 struct
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? */
109 } create_process;
110 struct
112 int code; /* EXIT_THREAD_DEBUG_EVENT/EXIT_PROCESS_DEBUG_EVENT */
113 int exit_code; /* thread or process exit code */
114 } exit;
115 struct
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? */
124 } load_dll;
125 struct
127 int code; /* UNLOAD_DLL_DEBUG_EVENT */
128 int __pad;
129 mod_handle_t base; /* base address of the dll */
130 } unload_dll;
131 struct
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) */
136 } output_string;
137 struct
139 int code; /* RIP_EVENT */
140 int error; /* ??? */
141 int type; /* ??? */
142 } rip_info;
143 } debug_event_t;
145 /* supported CPU types */
146 enum cpu_type
148 CPU_x86, CPU_x86_64, CPU_ALPHA, CPU_POWERPC, CPU_SPARC
150 typedef int cpu_type_t;
152 /* context data */
153 typedef struct
155 cpu_type_t cpu; /* cpu type */
156 unsigned int flags; /* SERVER_CTX_* flags */
157 union
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 __int64 fir;
163 unsigned int psr, __pad; } alpha_regs;
164 struct { unsigned int iar, msr, ctr, lr, dar, dsisr, trap, __pad; } powerpc_regs;
165 struct { unsigned int psr, pc, npc, y, wim, tbr; } sparc_regs;
166 } ctl; /* selected by SERVER_CTX_CONTROL */
167 union
169 struct { unsigned int eax, ebx, ecx, edx, esi, edi; } i386_regs;
170 struct { unsigned __int64 rax,rbx, rcx, rdx, rsi, rdi,
171 r8, r9, r10, r11, r12, r13, r14, r15; } x86_64_regs;
172 struct { unsigned __int64 v0, t0, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12,
173 s0, s1, s2, s3, s4, s5, s6, a0, a1, a2, a3, a4, a5, at; } alpha_regs;
174 struct { unsigned int gpr[32], cr, xer; } powerpc_regs;
175 struct { unsigned int g[8], o[8], l[8], i[8]; } sparc_regs;
176 } integer; /* selected by SERVER_CTX_INTEGER */
177 union
179 struct { unsigned int ds, es, fs, gs; } i386_regs;
180 struct { unsigned int ds, es, fs, gs; } x86_64_regs;
181 } seg; /* selected by SERVER_CTX_SEGMENTS */
182 union
184 struct { unsigned int ctrl, status, tag, err_off, err_sel, data_off, data_sel, cr0npx;
185 unsigned char regs[80]; } i386_regs;
186 struct { struct { unsigned __int64 low, high; } fpregs[32]; } x86_64_regs;
187 struct { unsigned __int64 f[32], fpcr, softfpcr; } alpha_regs;
188 struct { double fpr[32], fpscr; } powerpc_regs;
189 } fp; /* selected by SERVER_CTX_FLOATING_POINT */
190 union
192 struct { unsigned int dr0, dr1, dr2, dr3, dr6, dr7; } i386_regs;
193 struct { unsigned __int64 dr0, dr1, dr2, dr3, dr6, dr7; } x86_64_regs;
194 struct { unsigned int dr[8]; } powerpc_regs;
195 } debug; /* selected by SERVER_CTX_DEBUG_REGISTERS */
196 union
198 unsigned char i386_regs[512];
199 } ext; /* selected by SERVER_CTX_EXTENDED_REGISTERS */
200 } context_t;
202 #define SERVER_CTX_CONTROL 0x01
203 #define SERVER_CTX_INTEGER 0x02
204 #define SERVER_CTX_SEGMENTS 0x04
205 #define SERVER_CTX_FLOATING_POINT 0x08
206 #define SERVER_CTX_DEBUG_REGISTERS 0x10
207 #define SERVER_CTX_EXTENDED_REGISTERS 0x20
209 /* structure used in sending an fd from client to server */
210 struct send_fd
212 thread_id_t tid; /* thread id */
213 int fd; /* file descriptor on client-side */
216 /* structure sent by the server on the wait fifo */
217 struct wake_up_reply
219 client_ptr_t cookie; /* magic cookie that was passed in select_request */
220 int signaled; /* wait result */
221 int __pad;
224 /* NT-style timeout, in 100ns units, negative means relative timeout */
225 typedef __int64 timeout_t;
226 #define TIMEOUT_INFINITE (((timeout_t)0x7fffffff) << 32 | 0xffffffff)
228 /* structure for process startup info */
229 typedef struct
231 unsigned int debug_flags;
232 unsigned int console_flags;
233 obj_handle_t console;
234 obj_handle_t hstdin;
235 obj_handle_t hstdout;
236 obj_handle_t hstderr;
237 unsigned int x;
238 unsigned int y;
239 unsigned int xsize;
240 unsigned int ysize;
241 unsigned int xchars;
242 unsigned int ychars;
243 unsigned int attribute;
244 unsigned int flags;
245 unsigned int show;
246 data_size_t curdir_len;
247 data_size_t dllpath_len;
248 data_size_t imagepath_len;
249 data_size_t cmdline_len;
250 data_size_t title_len;
251 data_size_t desktop_len;
252 data_size_t shellinfo_len;
253 data_size_t runtime_len;
254 /* VARARG(curdir,unicode_str,curdir_len); */
255 /* VARARG(dllpath,unicode_str,dllpath_len); */
256 /* VARARG(imagepath,unicode_str,imagepath_len); */
257 /* VARARG(cmdline,unicode_str,cmdline_len); */
258 /* VARARG(title,unicode_str,title_len); */
259 /* VARARG(desktop,unicode_str,desktop_len); */
260 /* VARARG(shellinfo,unicode_str,shellinfo_len); */
261 /* VARARG(runtime,unicode_str,runtime_len); */
262 } startup_info_t;
264 /* structure returned in the list of window properties */
265 typedef struct
267 atom_t atom; /* property atom */
268 int string; /* was atom a string originally? */
269 lparam_t data; /* data stored in property */
270 } property_data_t;
272 /* structure to specify window rectangles */
273 typedef struct
275 int left;
276 int top;
277 int right;
278 int bottom;
279 } rectangle_t;
281 /* structure for parameters of async I/O calls */
282 typedef struct
284 obj_handle_t handle; /* object to perform I/O on */
285 obj_handle_t event; /* event to signal when done */
286 client_ptr_t callback; /* client-side callback to call upon end of async */
287 client_ptr_t iosb; /* I/O status block in client addr space */
288 client_ptr_t arg; /* opaque user data to pass to callback */
289 apc_param_t cvalue; /* completion value to use for completion events */
290 } async_data_t;
292 /* structures for extra message data */
294 struct hardware_msg_data
296 lparam_t info; /* extra info */
297 int x; /* x position */
298 int y; /* y position */
299 unsigned int hw_id; /* unique id */
300 int __pad;
303 struct callback_msg_data
305 client_ptr_t callback; /* callback function */
306 lparam_t data; /* user data for callback */
307 lparam_t result; /* message result */
310 struct winevent_msg_data
312 user_handle_t hook; /* hook handle */
313 thread_id_t tid; /* thread id */
314 client_ptr_t hook_proc; /* hook proc address */
315 /* followed by module name if any */
318 typedef union
320 unsigned char bytes[1]; /* raw data for sent messages */
321 struct hardware_msg_data hardware;
322 struct callback_msg_data callback;
323 struct winevent_msg_data winevent;
324 } message_data_t;
326 /* structure for console char/attribute info */
327 typedef struct
329 WCHAR ch;
330 unsigned short attr;
331 } char_info_t;
333 typedef struct
335 unsigned int low_part;
336 int high_part;
337 } luid_t;
339 #define MAX_ACL_LEN 65535
341 struct security_descriptor
343 unsigned int control; /* SE_ flags */
344 data_size_t owner_len;
345 data_size_t group_len;
346 data_size_t sacl_len;
347 data_size_t dacl_len;
348 /* VARARG(owner,SID); */
349 /* VARARG(group,SID); */
350 /* VARARG(sacl,ACL); */
351 /* VARARG(dacl,ACL); */
354 struct object_attributes
356 obj_handle_t rootdir; /* root directory */
357 data_size_t sd_len; /* length of security_descriptor data. may be 0 */
358 data_size_t name_len; /* length of the name string. may be 0 */
359 /* VARARG(sd,security_descriptor); */
360 /* VARARG(name,unicode_str); */
363 struct token_groups
365 unsigned int count;
366 /* unsigned int attributes[count]; */
367 /* VARARG(sids,SID); */
370 enum apc_type
372 APC_NONE,
373 APC_USER,
374 APC_TIMER,
375 APC_ASYNC_IO,
376 APC_VIRTUAL_ALLOC,
377 APC_VIRTUAL_FREE,
378 APC_VIRTUAL_QUERY,
379 APC_VIRTUAL_PROTECT,
380 APC_VIRTUAL_FLUSH,
381 APC_VIRTUAL_LOCK,
382 APC_VIRTUAL_UNLOCK,
383 APC_MAP_VIEW,
384 APC_UNMAP_VIEW,
385 APC_CREATE_THREAD
388 typedef union
390 enum apc_type type;
391 struct
393 enum apc_type type; /* APC_USER */
394 int __pad;
395 client_ptr_t func; /* void (__stdcall *func)(ULONG_PTR,ULONG_PTR,ULONG_PTR); */
396 apc_param_t args[3]; /* arguments for user function */
397 } user;
398 struct
400 enum apc_type type; /* APC_TIMER */
401 int __pad;
402 client_ptr_t func; /* void (__stdcall *func)(void*, unsigned int, unsigned int); */
403 timeout_t time; /* absolute time of expiration */
404 client_ptr_t arg; /* user argument */
405 } timer;
406 struct
408 enum apc_type type; /* APC_ASYNC_IO */
409 unsigned int status; /* I/O status */
410 client_ptr_t func; /* unsigned int (*func)(void*, void*, unsigned int, void **); */
411 client_ptr_t user; /* user pointer */
412 client_ptr_t sb; /* status block */
413 } async_io;
414 struct
416 enum apc_type type; /* APC_VIRTUAL_ALLOC */
417 unsigned int op_type; /* type of operation */
418 client_ptr_t addr; /* requested address */
419 mem_size_t size; /* allocation size */
420 unsigned int zero_bits; /* allocation alignment */
421 unsigned int prot; /* memory protection flags */
422 } virtual_alloc;
423 struct
425 enum apc_type type; /* APC_VIRTUAL_FREE */
426 unsigned int op_type; /* type of operation */
427 client_ptr_t addr; /* requested address */
428 mem_size_t size; /* allocation size */
429 } virtual_free;
430 struct
432 enum apc_type type; /* APC_VIRTUAL_QUERY */
433 int __pad;
434 client_ptr_t addr; /* requested address */
435 } virtual_query;
436 struct
438 enum apc_type type; /* APC_VIRTUAL_PROTECT */
439 unsigned int prot; /* new protection flags */
440 client_ptr_t addr; /* requested address */
441 mem_size_t size; /* requested size */
442 } virtual_protect;
443 struct
445 enum apc_type type; /* APC_VIRTUAL_FLUSH */
446 int __pad;
447 client_ptr_t addr; /* requested address */
448 mem_size_t size; /* requested size */
449 } virtual_flush;
450 struct
452 enum apc_type type; /* APC_VIRTUAL_LOCK */
453 int __pad;
454 client_ptr_t addr; /* requested address */
455 mem_size_t size; /* requested size */
456 } virtual_lock;
457 struct
459 enum apc_type type; /* APC_VIRTUAL_UNLOCK */
460 int __pad;
461 client_ptr_t addr; /* requested address */
462 mem_size_t size; /* requested size */
463 } virtual_unlock;
464 struct
466 enum apc_type type; /* APC_MAP_VIEW */
467 obj_handle_t handle; /* mapping handle */
468 client_ptr_t addr; /* requested address */
469 mem_size_t size; /* allocation size */
470 file_pos_t offset; /* file offset */
471 unsigned int alloc_type;/* allocation type */
472 unsigned short zero_bits; /* allocation alignment */
473 unsigned short prot; /* memory protection flags */
474 } map_view;
475 struct
477 enum apc_type type; /* APC_UNMAP_VIEW */
478 int __pad;
479 client_ptr_t addr; /* view address */
480 } unmap_view;
481 struct
483 enum apc_type type; /* APC_CREATE_THREAD */
484 int suspend; /* suspended thread? */
485 client_ptr_t func; /* void (__stdcall *func)(void*); start function */
486 client_ptr_t arg; /* argument for start function */
487 mem_size_t reserve; /* reserve size for thread stack */
488 mem_size_t commit; /* commit size for thread stack */
489 } create_thread;
490 } apc_call_t;
492 typedef union
494 enum apc_type type;
495 struct
497 enum apc_type type; /* APC_ASYNC_IO */
498 unsigned int status; /* new status of async operation */
499 client_ptr_t apc; /* user APC to call */
500 unsigned int total; /* bytes transferred */
501 } async_io;
502 struct
504 enum apc_type type; /* APC_VIRTUAL_ALLOC */
505 unsigned int status; /* status returned by call */
506 client_ptr_t addr; /* resulting address */
507 mem_size_t size; /* resulting size */
508 } virtual_alloc;
509 struct
511 enum apc_type type; /* APC_VIRTUAL_FREE */
512 unsigned int status; /* status returned by call */
513 client_ptr_t addr; /* resulting address */
514 mem_size_t size; /* resulting size */
515 } virtual_free;
516 struct
518 enum apc_type type; /* APC_VIRTUAL_QUERY */
519 unsigned int status; /* status returned by call */
520 client_ptr_t base; /* resulting base address */
521 client_ptr_t alloc_base;/* resulting allocation base */
522 mem_size_t size; /* resulting region size */
523 unsigned short state; /* resulting region state */
524 unsigned short prot; /* resulting region protection */
525 unsigned short alloc_prot;/* resulting allocation protection */
526 unsigned short alloc_type;/* resulting region allocation type */
527 } virtual_query;
528 struct
530 enum apc_type type; /* APC_VIRTUAL_PROTECT */
531 unsigned int status; /* status returned by call */
532 client_ptr_t addr; /* resulting address */
533 mem_size_t size; /* resulting size */
534 unsigned int prot; /* old protection flags */
535 } virtual_protect;
536 struct
538 enum apc_type type; /* APC_VIRTUAL_FLUSH */
539 unsigned int status; /* status returned by call */
540 client_ptr_t addr; /* resulting address */
541 mem_size_t size; /* resulting size */
542 } virtual_flush;
543 struct
545 enum apc_type type; /* APC_VIRTUAL_LOCK */
546 unsigned int status; /* status returned by call */
547 client_ptr_t addr; /* resulting address */
548 mem_size_t size; /* resulting size */
549 } virtual_lock;
550 struct
552 enum apc_type type; /* APC_VIRTUAL_UNLOCK */
553 unsigned int status; /* status returned by call */
554 client_ptr_t addr; /* resulting address */
555 mem_size_t size; /* resulting size */
556 } virtual_unlock;
557 struct
559 enum apc_type type; /* APC_MAP_VIEW */
560 unsigned int status; /* status returned by call */
561 client_ptr_t addr; /* resulting address */
562 mem_size_t size; /* resulting size */
563 } map_view;
564 struct
566 enum apc_type type; /* APC_MAP_VIEW */
567 unsigned int status; /* status returned by call */
568 } unmap_view;
569 struct
571 enum apc_type type; /* APC_CREATE_THREAD */
572 unsigned int status; /* status returned by call */
573 thread_id_t tid; /* thread id */
574 obj_handle_t handle; /* handle to new thread */
575 } create_thread;
576 } apc_result_t;
578 /****************************************************************/
579 /* Request declarations */
581 /* Create a new process from the context of the parent */
582 @REQ(new_process)
583 int inherit_all; /* inherit all handles from parent */
584 unsigned int create_flags; /* creation flags */
585 int socket_fd; /* file descriptor for process socket */
586 obj_handle_t exe_file; /* file handle for main exe */
587 unsigned int process_access; /* access rights for process object */
588 unsigned int process_attr; /* attributes for process object */
589 unsigned int thread_access; /* access rights for thread object */
590 unsigned int thread_attr; /* attributes for thread object */
591 data_size_t info_size; /* size of startup info */
592 VARARG(info,startup_info,info_size); /* startup information */
593 VARARG(env,unicode_str); /* environment for new process */
594 @REPLY
595 obj_handle_t info; /* new process info handle */
596 process_id_t pid; /* process id */
597 obj_handle_t phandle; /* process handle (in the current process) */
598 thread_id_t tid; /* thread id */
599 obj_handle_t thandle; /* thread handle (in the current process) */
600 @END
603 /* Retrieve information about a newly started process */
604 @REQ(get_new_process_info)
605 obj_handle_t info; /* info handle returned from new_process_request */
606 @REPLY
607 int success; /* did the process start successfully? */
608 int exit_code; /* process exit code if failed */
609 @END
612 /* Create a new thread from the context of the parent */
613 @REQ(new_thread)
614 unsigned int access; /* wanted access rights */
615 unsigned int attributes; /* object attributes */
616 int suspend; /* new thread should be suspended on creation */
617 int request_fd; /* fd for request pipe */
618 @REPLY
619 thread_id_t tid; /* thread id */
620 obj_handle_t handle; /* thread handle (in the current process) */
621 @END
624 /* Retrieve the new process startup info */
625 @REQ(get_startup_info)
626 @REPLY
627 obj_handle_t exe_file; /* file handle for main exe */
628 data_size_t info_size; /* size of startup info */
629 VARARG(info,startup_info,info_size); /* startup information */
630 VARARG(env,unicode_str); /* environment */
631 @END
634 /* Signal the end of the process initialization */
635 @REQ(init_process_done)
636 int gui; /* is it a GUI process? */
637 mod_handle_t module; /* main module base address */
638 client_ptr_t ldt_copy; /* address of LDT copy (in thread address space) */
639 client_ptr_t entry; /* process entry point */
640 @END
643 /* Initialize a thread; called from the child after fork()/clone() */
644 @REQ(init_thread)
645 int unix_pid; /* Unix pid of new thread */
646 int unix_tid; /* Unix tid of new thread */
647 int debug_level; /* new debug level */
648 client_ptr_t teb; /* TEB of new thread (in thread address space) */
649 client_ptr_t entry; /* entry point or PEB if initial thread (in thread address space) */
650 int reply_fd; /* fd for reply pipe */
651 int wait_fd; /* fd for blocking calls pipe */
652 cpu_type_t cpu; /* CPU that this thread is running on */
653 @REPLY
654 process_id_t pid; /* process id of the new thread's process */
655 thread_id_t tid; /* thread id of the new thread */
656 timeout_t server_start; /* server start time */
657 data_size_t info_size; /* total size of startup info */
658 int version; /* protocol version */
659 unsigned int all_cpus; /* bitset of supported CPUs */
660 @END
663 /* Terminate a process */
664 @REQ(terminate_process)
665 obj_handle_t handle; /* process handle to terminate */
666 int exit_code; /* process exit code */
667 @REPLY
668 int self; /* suicide? */
669 @END
672 /* Terminate a thread */
673 @REQ(terminate_thread)
674 obj_handle_t handle; /* thread handle to terminate */
675 int exit_code; /* thread exit code */
676 @REPLY
677 int self; /* suicide? */
678 int last; /* last thread in this process? */
679 @END
682 /* Retrieve information about a process */
683 @REQ(get_process_info)
684 obj_handle_t handle; /* process handle */
685 @REPLY
686 process_id_t pid; /* server process id */
687 process_id_t ppid; /* server process id of parent */
688 affinity_t affinity; /* process affinity mask */
689 client_ptr_t peb; /* PEB address in process address space */
690 timeout_t start_time; /* process start time */
691 timeout_t end_time; /* process end time */
692 int exit_code; /* process exit code */
693 int priority; /* priority class */
694 cpu_type_t cpu; /* CPU that this process is running on */
695 int debugger_present; /* process is being debugged */
696 @END
699 /* Set a process informations */
700 @REQ(set_process_info)
701 obj_handle_t handle; /* process handle */
702 int mask; /* setting mask (see below) */
703 int priority; /* priority class */
704 affinity_t affinity; /* affinity mask */
705 @END
706 #define SET_PROCESS_INFO_PRIORITY 0x01
707 #define SET_PROCESS_INFO_AFFINITY 0x02
710 /* Retrieve information about a thread */
711 @REQ(get_thread_info)
712 obj_handle_t handle; /* thread handle */
713 thread_id_t tid_in; /* thread id (optional) */
714 @REPLY
715 process_id_t pid; /* server process id */
716 thread_id_t tid; /* server thread id */
717 client_ptr_t teb; /* thread teb pointer */
718 affinity_t affinity; /* thread affinity mask */
719 timeout_t creation_time; /* thread creation time */
720 timeout_t exit_time; /* thread exit time */
721 int exit_code; /* thread exit code */
722 int priority; /* thread priority level */
723 int last; /* last thread in process */
724 @END
727 /* Set a thread informations */
728 @REQ(set_thread_info)
729 obj_handle_t handle; /* thread handle */
730 int mask; /* setting mask (see below) */
731 int priority; /* priority class */
732 affinity_t affinity; /* affinity mask */
733 obj_handle_t token; /* impersonation token */
734 @END
735 #define SET_THREAD_INFO_PRIORITY 0x01
736 #define SET_THREAD_INFO_AFFINITY 0x02
737 #define SET_THREAD_INFO_TOKEN 0x04
740 /* Retrieve information about a module */
741 @REQ(get_dll_info)
742 obj_handle_t handle; /* process handle */
743 mod_handle_t base_address; /* base address of module */
744 @REPLY
745 client_ptr_t entry_point;
746 data_size_t size; /* module size */
747 data_size_t filename_len; /* buffer len in bytes required to store filename */
748 VARARG(filename,unicode_str); /* file name of module */
749 @END
752 /* Suspend a thread */
753 @REQ(suspend_thread)
754 obj_handle_t handle; /* thread handle */
755 @REPLY
756 int count; /* new suspend count */
757 @END
760 /* Resume a thread */
761 @REQ(resume_thread)
762 obj_handle_t handle; /* thread handle */
763 @REPLY
764 int count; /* new suspend count */
765 @END
768 /* Notify the server that a dll has been loaded */
769 @REQ(load_dll)
770 obj_handle_t handle; /* file handle */
771 mod_handle_t base; /* base address */
772 client_ptr_t name; /* ptr to ptr to name (in process addr space) */
773 data_size_t size; /* dll size */
774 int dbg_offset; /* debug info offset */
775 int dbg_size; /* debug info size */
776 VARARG(filename,unicode_str); /* file name of dll */
777 @END
780 /* Notify the server that a dll is being unloaded */
781 @REQ(unload_dll)
782 mod_handle_t base; /* base address */
783 @END
786 /* Queue an APC for a thread or process */
787 @REQ(queue_apc)
788 obj_handle_t handle; /* thread or process handle */
789 apc_call_t call; /* call arguments */
790 @REPLY
791 obj_handle_t handle; /* APC handle */
792 int self; /* run APC in caller itself? */
793 @END
796 /* Get the result of an APC call */
797 @REQ(get_apc_result)
798 obj_handle_t handle; /* handle to the APC */
799 @REPLY
800 apc_result_t result; /* result of the APC */
801 @END
804 /* Close a handle for the current process */
805 @REQ(close_handle)
806 obj_handle_t handle; /* handle to close */
807 @END
810 /* Set a handle information */
811 @REQ(set_handle_info)
812 obj_handle_t handle; /* handle we are interested in */
813 int flags; /* new handle flags */
814 int mask; /* mask for flags to set */
815 @REPLY
816 int old_flags; /* old flag value */
817 @END
820 /* Duplicate a handle */
821 @REQ(dup_handle)
822 obj_handle_t src_process; /* src process handle */
823 obj_handle_t src_handle; /* src handle to duplicate */
824 obj_handle_t dst_process; /* dst process handle */
825 unsigned int access; /* wanted access rights */
826 unsigned int attributes; /* object attributes */
827 unsigned int options; /* duplicate options (see below) */
828 @REPLY
829 obj_handle_t handle; /* duplicated handle in dst process */
830 int self; /* is the source the current process? */
831 int closed; /* whether the source handle has been closed */
832 @END
833 #define DUP_HANDLE_CLOSE_SOURCE DUPLICATE_CLOSE_SOURCE
834 #define DUP_HANDLE_SAME_ACCESS DUPLICATE_SAME_ACCESS
835 #define DUP_HANDLE_MAKE_GLOBAL 0x80000000 /* Not a Windows flag */
838 /* Open a handle to a process */
839 @REQ(open_process)
840 process_id_t pid; /* process id to open */
841 unsigned int access; /* wanted access rights */
842 unsigned int attributes; /* object attributes */
843 @REPLY
844 obj_handle_t handle; /* handle to the process */
845 @END
848 /* Open a handle to a thread */
849 @REQ(open_thread)
850 thread_id_t tid; /* thread id to open */
851 unsigned int access; /* wanted access rights */
852 unsigned int attributes; /* object attributes */
853 @REPLY
854 obj_handle_t handle; /* handle to the thread */
855 @END
858 /* Wait for handles */
859 @REQ(select)
860 int flags; /* wait flags (see below) */
861 client_ptr_t cookie; /* magic cookie to return to client */
862 obj_handle_t signal; /* object to signal (0 if none) */
863 obj_handle_t prev_apc; /* handle to previous APC */
864 timeout_t timeout; /* timeout */
865 VARARG(result,apc_result); /* result of previous APC */
866 VARARG(handles,handles); /* handles to select on */
867 @REPLY
868 timeout_t timeout; /* timeout converted to absolute */
869 apc_call_t call; /* APC call arguments */
870 obj_handle_t apc_handle; /* handle to next APC */
871 @END
872 #define SELECT_ALL 1
873 #define SELECT_ALERTABLE 2
874 #define SELECT_INTERRUPTIBLE 4
877 /* Create an event */
878 @REQ(create_event)
879 unsigned int access; /* wanted access rights */
880 unsigned int attributes; /* object attributes */
881 int manual_reset; /* manual reset event */
882 int initial_state; /* initial state of the event */
883 VARARG(objattr,object_attributes); /* object attributes */
884 @REPLY
885 obj_handle_t handle; /* handle to the event */
886 @END
888 /* Event operation */
889 @REQ(event_op)
890 obj_handle_t handle; /* handle to event */
891 int op; /* event operation (see below) */
892 @END
893 enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT };
896 /* Open an event */
897 @REQ(open_event)
898 unsigned int access; /* wanted access rights */
899 unsigned int attributes; /* object attributes */
900 obj_handle_t rootdir; /* root directory */
901 VARARG(name,unicode_str); /* object name */
902 @REPLY
903 obj_handle_t handle; /* handle to the event */
904 @END
907 /* Create a mutex */
908 @REQ(create_mutex)
909 unsigned int access; /* wanted access rights */
910 unsigned int attributes; /* object attributes */
911 int owned; /* initially owned? */
912 VARARG(objattr,object_attributes); /* object attributes */
913 @REPLY
914 obj_handle_t handle; /* handle to the mutex */
915 @END
918 /* Release a mutex */
919 @REQ(release_mutex)
920 obj_handle_t handle; /* handle to the mutex */
921 @REPLY
922 unsigned int prev_count; /* value of internal counter, before release */
923 @END
926 /* Open a mutex */
927 @REQ(open_mutex)
928 unsigned int access; /* wanted access rights */
929 unsigned int attributes; /* object attributes */
930 obj_handle_t rootdir; /* root directory */
931 VARARG(name,unicode_str); /* object name */
932 @REPLY
933 obj_handle_t handle; /* handle to the mutex */
934 @END
937 /* Create a semaphore */
938 @REQ(create_semaphore)
939 unsigned int access; /* wanted access rights */
940 unsigned int attributes; /* object attributes */
941 unsigned int initial; /* initial count */
942 unsigned int max; /* maximum count */
943 VARARG(objattr,object_attributes); /* object attributes */
944 @REPLY
945 obj_handle_t handle; /* handle to the semaphore */
946 @END
949 /* Release a semaphore */
950 @REQ(release_semaphore)
951 obj_handle_t handle; /* handle to the semaphore */
952 unsigned int count; /* count to add to semaphore */
953 @REPLY
954 unsigned int prev_count; /* previous semaphore count */
955 @END
958 /* Open a semaphore */
959 @REQ(open_semaphore)
960 unsigned int access; /* wanted access rights */
961 unsigned int attributes; /* object attributes */
962 obj_handle_t rootdir; /* root directory */
963 VARARG(name,unicode_str); /* object name */
964 @REPLY
965 obj_handle_t handle; /* handle to the semaphore */
966 @END
969 /* Create a file */
970 @REQ(create_file)
971 unsigned int access; /* wanted access rights */
972 unsigned int attributes; /* object attributes */
973 unsigned int sharing; /* sharing flags */
974 int create; /* file create action */
975 unsigned int options; /* file options */
976 unsigned int attrs; /* file attributes for creation */
977 VARARG(objattr,object_attributes); /* object attributes */
978 VARARG(filename,string); /* file name */
979 @REPLY
980 obj_handle_t handle; /* handle to the file */
981 @END
984 /* Open a file object */
985 @REQ(open_file_object)
986 unsigned int access; /* wanted access rights */
987 unsigned int attributes; /* open attributes */
988 obj_handle_t rootdir; /* root directory */
989 unsigned int sharing; /* sharing flags */
990 unsigned int options; /* file options */
991 VARARG(filename,unicode_str); /* file name */
992 @REPLY
993 obj_handle_t handle; /* handle to the file */
994 @END
997 /* Allocate a file handle for a Unix fd */
998 @REQ(alloc_file_handle)
999 unsigned int access; /* wanted access rights */
1000 unsigned int attributes; /* object attributes */
1001 int fd; /* file descriptor on the client side */
1002 @REPLY
1003 obj_handle_t handle; /* handle to the file */
1004 @END
1007 /* Get the Unix name from a file handle */
1008 @REQ(get_handle_unix_name)
1009 obj_handle_t handle; /* file handle */
1010 @REPLY
1011 data_size_t name_len; /* unix name length */
1012 VARARG(name,string); /* unix name */
1013 @END
1016 /* Get a Unix fd to access a file */
1017 @REQ(get_handle_fd)
1018 obj_handle_t handle; /* handle to the file */
1019 @REPLY
1020 int type; /* file type (see below) */
1021 int removable; /* is this fd removable? */
1022 unsigned int access; /* file access rights */
1023 unsigned int options; /* file open options */
1024 @END
1025 enum server_fd_type
1027 FD_TYPE_INVALID, /* invalid file (no associated fd) */
1028 FD_TYPE_FILE, /* regular file */
1029 FD_TYPE_DIR, /* directory */
1030 FD_TYPE_SOCKET, /* socket */
1031 FD_TYPE_SERIAL, /* serial port */
1032 FD_TYPE_PIPE, /* named pipe */
1033 FD_TYPE_MAILSLOT, /* mailslot */
1034 FD_TYPE_CHAR, /* unspecified char device */
1035 FD_TYPE_DEVICE, /* Windows device file */
1036 FD_TYPE_NB_TYPES
1040 /* Flush a file buffers */
1041 @REQ(flush_file)
1042 obj_handle_t handle; /* handle to the file */
1043 @REPLY
1044 obj_handle_t event; /* event set when finished */
1045 @END
1048 /* Lock a region of a file */
1049 @REQ(lock_file)
1050 obj_handle_t handle; /* handle to the file */
1051 file_pos_t offset; /* offset of start of lock */
1052 file_pos_t count; /* count of bytes to lock */
1053 int shared; /* shared or exclusive lock? */
1054 int wait; /* do we want to wait? */
1055 @REPLY
1056 obj_handle_t handle; /* handle to wait on */
1057 int overlapped; /* is it an overlapped I/O handle? */
1058 @END
1061 /* Unlock a region of a file */
1062 @REQ(unlock_file)
1063 obj_handle_t handle; /* handle to the file */
1064 file_pos_t offset; /* offset of start of unlock */
1065 file_pos_t count; /* count of bytes to unlock */
1066 @END
1069 /* Create a socket */
1070 @REQ(create_socket)
1071 unsigned int access; /* wanted access rights */
1072 unsigned int attributes; /* object attributes */
1073 int family; /* family, see socket manpage */
1074 int type; /* type, see socket manpage */
1075 int protocol; /* protocol, see socket manpage */
1076 unsigned int flags; /* socket flags */
1077 @REPLY
1078 obj_handle_t handle; /* handle to the new socket */
1079 @END
1082 /* Accept a socket */
1083 @REQ(accept_socket)
1084 obj_handle_t lhandle; /* handle to the listening socket */
1085 unsigned int access; /* wanted access rights */
1086 unsigned int attributes; /* object attributes */
1087 @REPLY
1088 obj_handle_t handle; /* handle to the new socket */
1089 @END
1092 /* Register an accept listener */
1093 @REQ(register_accept_async)
1094 async_data_t data; /* async I/O parameters for listener */
1095 obj_handle_t ahandle; /* handle to the future accepting socket */
1096 @END
1099 /* Set socket event parameters */
1100 @REQ(set_socket_event)
1101 obj_handle_t handle; /* handle to the socket */
1102 unsigned int mask; /* event mask */
1103 obj_handle_t event; /* event object */
1104 user_handle_t window; /* window to send the message to */
1105 unsigned int msg; /* message to send */
1106 @END
1109 /* Get socket event parameters */
1110 @REQ(get_socket_event)
1111 obj_handle_t handle; /* handle to the socket */
1112 int service; /* clear pending? */
1113 obj_handle_t c_event; /* event to clear */
1114 @REPLY
1115 unsigned int mask; /* event mask */
1116 unsigned int pmask; /* pending events */
1117 unsigned int state; /* status bits */
1118 VARARG(errors,ints); /* event errors */
1119 @END
1122 /* Reenable pending socket events */
1123 @REQ(enable_socket_event)
1124 obj_handle_t handle; /* handle to the socket */
1125 unsigned int mask; /* events to re-enable */
1126 unsigned int sstate; /* status bits to set */
1127 unsigned int cstate; /* status bits to clear */
1128 @END
1130 @REQ(set_socket_deferred)
1131 obj_handle_t handle; /* handle to the socket */
1132 obj_handle_t deferred; /* handle to the socket for which accept() is deferred */
1133 @END
1135 /* Allocate a console (only used by a console renderer) */
1136 @REQ(alloc_console)
1137 unsigned int access; /* wanted access rights */
1138 unsigned int attributes; /* object attributes */
1139 process_id_t pid; /* pid of process which shall be attached to the console */
1140 @REPLY
1141 obj_handle_t handle_in; /* handle to console input */
1142 obj_handle_t event; /* handle to renderer events change notification */
1143 @END
1146 /* Free the console of the current process */
1147 @REQ(free_console)
1148 @END
1151 #define CONSOLE_RENDERER_NONE_EVENT 0x00
1152 #define CONSOLE_RENDERER_TITLE_EVENT 0x01
1153 #define CONSOLE_RENDERER_ACTIVE_SB_EVENT 0x02
1154 #define CONSOLE_RENDERER_SB_RESIZE_EVENT 0x03
1155 #define CONSOLE_RENDERER_UPDATE_EVENT 0x04
1156 #define CONSOLE_RENDERER_CURSOR_POS_EVENT 0x05
1157 #define CONSOLE_RENDERER_CURSOR_GEOM_EVENT 0x06
1158 #define CONSOLE_RENDERER_DISPLAY_EVENT 0x07
1159 #define CONSOLE_RENDERER_EXIT_EVENT 0x08
1160 struct console_renderer_event
1162 short event;
1163 union
1165 struct update
1167 short top;
1168 short bottom;
1169 } update;
1170 struct resize
1172 short width;
1173 short height;
1174 } resize;
1175 struct cursor_pos
1177 short x;
1178 short y;
1179 } cursor_pos;
1180 struct cursor_geom
1182 short visible;
1183 short size;
1184 } cursor_geom;
1185 struct display
1187 short left;
1188 short top;
1189 short width;
1190 short height;
1191 } display;
1192 } u;
1195 /* retrieve console events for the renderer */
1196 @REQ(get_console_renderer_events)
1197 obj_handle_t handle; /* handle to console input events */
1198 @REPLY
1199 VARARG(data,bytes); /* the various console_renderer_events */
1200 @END
1203 /* Open a handle to the process console */
1204 @REQ(open_console)
1205 obj_handle_t from; /* 0 (resp 1) input (resp output) of current process console */
1206 /* otherwise console_in handle to get active screen buffer? */
1207 unsigned int access; /* wanted access rights */
1208 unsigned int attributes; /* object attributes */
1209 int share; /* share mask (only for output handles) */
1210 @REPLY
1211 obj_handle_t handle; /* handle to the console */
1212 @END
1215 /* Get the input queue wait event */
1216 @REQ(get_console_wait_event)
1217 @REPLY
1218 obj_handle_t handle;
1219 @END
1221 /* Get a console mode (input or output) */
1222 @REQ(get_console_mode)
1223 obj_handle_t handle; /* handle to the console */
1224 @REPLY
1225 int mode; /* console mode */
1226 @END
1229 /* Set a console mode (input or output) */
1230 @REQ(set_console_mode)
1231 obj_handle_t handle; /* handle to the console */
1232 int mode; /* console mode */
1233 @END
1236 /* Set info about a console (input only) */
1237 @REQ(set_console_input_info)
1238 obj_handle_t handle; /* handle to console input, or 0 for process' console */
1239 int mask; /* setting mask (see below) */
1240 obj_handle_t active_sb; /* active screen buffer */
1241 int history_mode; /* whether we duplicate lines in history */
1242 int history_size; /* number of lines in history */
1243 int edition_mode; /* index to the edition mode flavors */
1244 int input_cp; /* console input codepage */
1245 int output_cp; /* console output codepage */
1246 user_handle_t win; /* console window if backend supports it */
1247 VARARG(title,unicode_str); /* console title */
1248 @END
1249 #define SET_CONSOLE_INPUT_INFO_ACTIVE_SB 0x01
1250 #define SET_CONSOLE_INPUT_INFO_TITLE 0x02
1251 #define SET_CONSOLE_INPUT_INFO_HISTORY_MODE 0x04
1252 #define SET_CONSOLE_INPUT_INFO_HISTORY_SIZE 0x08
1253 #define SET_CONSOLE_INPUT_INFO_EDITION_MODE 0x10
1254 #define SET_CONSOLE_INPUT_INFO_INPUT_CODEPAGE 0x20
1255 #define SET_CONSOLE_INPUT_INFO_OUTPUT_CODEPAGE 0x40
1256 #define SET_CONSOLE_INPUT_INFO_WIN 0x80
1259 /* Get info about a console (input only) */
1260 @REQ(get_console_input_info)
1261 obj_handle_t handle; /* handle to console input, or 0 for process' console */
1262 @REPLY
1263 int history_mode; /* whether we duplicate lines in history */
1264 int history_size; /* number of lines in history */
1265 int history_index; /* number of used lines in history */
1266 int edition_mode; /* index to the edition mode flavors */
1267 int input_cp; /* console input codepage */
1268 int output_cp; /* console output codepage */
1269 user_handle_t win; /* console window if backend supports it */
1270 VARARG(title,unicode_str); /* console title */
1271 @END
1274 /* appends a string to console's history */
1275 @REQ(append_console_input_history)
1276 obj_handle_t handle; /* handle to console input, or 0 for process' console */
1277 VARARG(line,unicode_str); /* line to add */
1278 @END
1281 /* appends a string to console's history */
1282 @REQ(get_console_input_history)
1283 obj_handle_t handle; /* handle to console input, or 0 for process' console */
1284 int index; /* index to get line from */
1285 @REPLY
1286 int total; /* total length of line in Unicode chars */
1287 VARARG(line,unicode_str); /* line to add */
1288 @END
1291 /* creates a new screen buffer on process' console */
1292 @REQ(create_console_output)
1293 obj_handle_t handle_in; /* handle to console input, or 0 for process' console */
1294 unsigned int access; /* wanted access rights */
1295 unsigned int attributes; /* object attributes */
1296 unsigned int share; /* sharing credentials */
1297 @REPLY
1298 obj_handle_t handle_out; /* handle to the screen buffer */
1299 @END
1302 /* Set info about a console (output only) */
1303 @REQ(set_console_output_info)
1304 obj_handle_t handle; /* handle to the console */
1305 int mask; /* setting mask (see below) */
1306 short int cursor_size; /* size of cursor (percentage filled) */
1307 short int cursor_visible;/* cursor visibility flag */
1308 short int cursor_x; /* position of cursor (x, y) */
1309 short int cursor_y;
1310 short int width; /* width of the screen buffer */
1311 short int height; /* height of the screen buffer */
1312 short int attr; /* default attribute */
1313 short int win_left; /* window actually displayed by renderer */
1314 short int win_top; /* the rect area is expressed withing the */
1315 short int win_right; /* boundaries of the screen buffer */
1316 short int win_bottom;
1317 short int max_width; /* maximum size (width x height) for the window */
1318 short int max_height;
1319 @END
1320 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_GEOM 0x01
1321 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_POS 0x02
1322 #define SET_CONSOLE_OUTPUT_INFO_SIZE 0x04
1323 #define SET_CONSOLE_OUTPUT_INFO_ATTR 0x08
1324 #define SET_CONSOLE_OUTPUT_INFO_DISPLAY_WINDOW 0x10
1325 #define SET_CONSOLE_OUTPUT_INFO_MAX_SIZE 0x20
1328 /* Get info about a console (output only) */
1329 @REQ(get_console_output_info)
1330 obj_handle_t handle; /* handle to the console */
1331 @REPLY
1332 short int cursor_size; /* size of cursor (percentage filled) */
1333 short int cursor_visible;/* cursor visibility flag */
1334 short int cursor_x; /* position of cursor (x, y) */
1335 short int cursor_y;
1336 short int width; /* width of the screen buffer */
1337 short int height; /* height of the screen buffer */
1338 short int attr; /* default attribute */
1339 short int win_left; /* window actually displayed by renderer */
1340 short int win_top; /* the rect area is expressed withing the */
1341 short int win_right; /* boundaries of the screen buffer */
1342 short int win_bottom;
1343 short int max_width; /* maximum size (width x height) for the window */
1344 short int max_height;
1345 @END
1347 /* Add input records to a console input queue */
1348 @REQ(write_console_input)
1349 obj_handle_t handle; /* handle to the console input */
1350 VARARG(rec,input_records); /* input records */
1351 @REPLY
1352 int written; /* number of records written */
1353 @END
1356 /* Fetch input records from a console input queue */
1357 @REQ(read_console_input)
1358 obj_handle_t handle; /* handle to the console input */
1359 int flush; /* flush the retrieved records from the queue? */
1360 @REPLY
1361 int read; /* number of records read */
1362 VARARG(rec,input_records); /* input records */
1363 @END
1366 /* write data (chars and/or attributes) in a screen buffer */
1367 @REQ(write_console_output)
1368 obj_handle_t handle; /* handle to the console output */
1369 int x; /* position where to start writing */
1370 int y;
1371 int mode; /* char info (see below) */
1372 int wrap; /* wrap around at end of line? */
1373 VARARG(data,bytes); /* info to write */
1374 @REPLY
1375 int written; /* number of char infos actually written */
1376 int width; /* width of screen buffer */
1377 int height; /* height of screen buffer */
1378 @END
1379 enum char_info_mode
1381 CHAR_INFO_MODE_TEXT, /* characters only */
1382 CHAR_INFO_MODE_ATTR, /* attributes only */
1383 CHAR_INFO_MODE_TEXTATTR, /* both characters and attributes */
1384 CHAR_INFO_MODE_TEXTSTDATTR /* characters but use standard attributes */
1388 /* fill a screen buffer with constant data (chars and/or attributes) */
1389 @REQ(fill_console_output)
1390 obj_handle_t handle; /* handle to the console output */
1391 int x; /* position where to start writing */
1392 int y;
1393 int mode; /* char info mode */
1394 int count; /* number to write */
1395 int wrap; /* wrap around at end of line? */
1396 char_info_t data; /* data to write */
1397 @REPLY
1398 int written; /* number of char infos actually written */
1399 @END
1402 /* read data (chars and/or attributes) from a screen buffer */
1403 @REQ(read_console_output)
1404 obj_handle_t handle; /* handle to the console output */
1405 int x; /* position (x,y) where to start reading */
1406 int y;
1407 int mode; /* char info mode */
1408 int wrap; /* wrap around at end of line? */
1409 @REPLY
1410 int width; /* width of screen buffer */
1411 int height; /* height of screen buffer */
1412 VARARG(data,bytes);
1413 @END
1416 /* move a rect (of data) in screen buffer content */
1417 @REQ(move_console_output)
1418 obj_handle_t handle; /* handle to the console output */
1419 short int x_src; /* position (x, y) of rect to start moving from */
1420 short int y_src;
1421 short int x_dst; /* position (x, y) of rect to move to */
1422 short int y_dst;
1423 short int w; /* size of the rect (width, height) to move */
1424 short int h;
1425 @END
1428 /* Sends a signal to a process group */
1429 @REQ(send_console_signal)
1430 int signal; /* the signal to send */
1431 process_id_t group_id; /* the group to send the signal to */
1432 @END
1435 /* enable directory change notifications */
1436 @REQ(read_directory_changes)
1437 unsigned int filter; /* notification filter */
1438 int subtree; /* watch the subtree? */
1439 int want_data; /* flag indicating whether change data should be collected */
1440 async_data_t async; /* async I/O parameters */
1441 @END
1444 @REQ(read_change)
1445 obj_handle_t handle;
1446 @REPLY
1447 int action; /* type of change */
1448 VARARG(name,string); /* name of directory entry that changed */
1449 @END
1452 /* Create a file mapping */
1453 @REQ(create_mapping)
1454 unsigned int access; /* wanted access rights */
1455 unsigned int attributes; /* object attributes */
1456 unsigned int protect; /* protection flags (see below) */
1457 mem_size_t size; /* mapping size */
1458 obj_handle_t file_handle; /* file handle */
1459 VARARG(objattr,object_attributes); /* object attributes */
1460 @REPLY
1461 obj_handle_t handle; /* handle to the mapping */
1462 @END
1463 /* per-page protection flags */
1464 #define VPROT_READ 0x01
1465 #define VPROT_WRITE 0x02
1466 #define VPROT_EXEC 0x04
1467 #define VPROT_WRITECOPY 0x08
1468 #define VPROT_GUARD 0x10
1469 #define VPROT_NOCACHE 0x20
1470 #define VPROT_COMMITTED 0x40
1471 #define VPROT_WRITEWATCH 0x80
1472 /* per-mapping protection flags */
1473 #define VPROT_IMAGE 0x0100 /* mapping for an exe image */
1474 #define VPROT_SYSTEM 0x0200 /* system view (underlying mmap not under our control) */
1475 #define VPROT_VALLOC 0x0400 /* allocated by VirtualAlloc */
1476 #define VPROT_NOEXEC 0x0800 /* don't force exec permission */
1479 /* Open a mapping */
1480 @REQ(open_mapping)
1481 unsigned int access; /* wanted access rights */
1482 unsigned int attributes; /* object attributes */
1483 obj_handle_t rootdir; /* root directory */
1484 VARARG(name,unicode_str); /* object name */
1485 @REPLY
1486 obj_handle_t handle; /* handle to the mapping */
1487 @END
1490 /* Get information about a file mapping */
1491 @REQ(get_mapping_info)
1492 obj_handle_t handle; /* handle to the mapping */
1493 unsigned int access; /* wanted access rights */
1494 @REPLY
1495 mem_size_t size; /* mapping size */
1496 int protect; /* protection flags */
1497 int header_size; /* header size (for VPROT_IMAGE mapping) */
1498 client_ptr_t base; /* default base addr (for VPROT_IMAGE mapping) */
1499 obj_handle_t mapping; /* duplicate mapping handle unless removable */
1500 obj_handle_t shared_file; /* shared mapping file handle */
1501 @END
1504 /* Get a range of committed pages in a file mapping */
1505 @REQ(get_mapping_committed_range)
1506 obj_handle_t handle; /* handle to the mapping */
1507 file_pos_t offset; /* starting offset (page-aligned, in bytes) */
1508 @REPLY
1509 mem_size_t size; /* size of range starting at offset (page-aligned, in bytes) */
1510 int committed; /* whether it is a committed range */
1511 @END
1514 /* Add a range to the committed pages in a file mapping */
1515 @REQ(add_mapping_committed_range)
1516 obj_handle_t handle; /* handle to the mapping */
1517 file_pos_t offset; /* starting offset (page-aligned, in bytes) */
1518 mem_size_t size; /* size to set (page-aligned, in bytes) or 0 if only retrieving */
1519 @END
1522 #define SNAP_PROCESS 0x00000001
1523 #define SNAP_THREAD 0x00000002
1524 /* Create a snapshot */
1525 @REQ(create_snapshot)
1526 unsigned int attributes; /* object attributes */
1527 unsigned int flags; /* snapshot flags (SNAP_*) */
1528 @REPLY
1529 obj_handle_t handle; /* handle to the snapshot */
1530 @END
1533 /* Get the next process from a snapshot */
1534 @REQ(next_process)
1535 obj_handle_t handle; /* handle to the snapshot */
1536 int reset; /* reset snapshot position? */
1537 @REPLY
1538 int count; /* process usage count */
1539 process_id_t pid; /* process id */
1540 process_id_t ppid; /* parent process id */
1541 int threads; /* number of threads */
1542 int priority; /* process priority */
1543 int handles; /* number of handles */
1544 VARARG(filename,unicode_str); /* file name of main exe */
1545 @END
1548 /* Get the next thread from a snapshot */
1549 @REQ(next_thread)
1550 obj_handle_t handle; /* handle to the snapshot */
1551 int reset; /* reset snapshot position? */
1552 @REPLY
1553 int count; /* thread usage count */
1554 process_id_t pid; /* process id */
1555 thread_id_t tid; /* thread id */
1556 int base_pri; /* base priority */
1557 int delta_pri; /* delta priority */
1558 @END
1561 /* Wait for a debug event */
1562 @REQ(wait_debug_event)
1563 int get_handle; /* should we alloc a handle for waiting? */
1564 @REPLY
1565 process_id_t pid; /* process id */
1566 thread_id_t tid; /* thread id */
1567 obj_handle_t wait; /* wait handle if no event ready */
1568 VARARG(event,debug_event); /* debug event data */
1569 @END
1572 /* Queue an exception event */
1573 @REQ(queue_exception_event)
1574 int first; /* first chance exception? */
1575 unsigned int code; /* exception code */
1576 unsigned int flags; /* exception flags */
1577 client_ptr_t record; /* exception record */
1578 client_ptr_t address; /* exception address */
1579 data_size_t len; /* size of parameters */
1580 VARARG(params,uints64,len);/* exception parameters */
1581 VARARG(context,context); /* thread context */
1582 @REPLY
1583 obj_handle_t handle; /* handle to the queued event */
1584 @END
1587 /* Retrieve the status of an exception event */
1588 @REQ(get_exception_status)
1589 obj_handle_t handle; /* handle to the queued event */
1590 @REPLY
1591 VARARG(context,context); /* modified thread context */
1592 @END
1595 /* Send an output string to the debugger */
1596 @REQ(output_debug_string)
1597 data_size_t length; /* string length */
1598 client_ptr_t string; /* string to display (in debugged process address space) */
1599 @END
1602 /* Continue a debug event */
1603 @REQ(continue_debug_event)
1604 process_id_t pid; /* process id to continue */
1605 thread_id_t tid; /* thread id to continue */
1606 int status; /* continuation status */
1607 @END
1610 /* Start/stop debugging an existing process */
1611 @REQ(debug_process)
1612 process_id_t pid; /* id of the process to debug */
1613 int attach; /* 1=attaching / 0=detaching from the process */
1614 @END
1617 /* Simulate a breakpoint in a process */
1618 @REQ(debug_break)
1619 obj_handle_t handle; /* process handle */
1620 @REPLY
1621 int self; /* was it the caller itself? */
1622 @END
1625 /* Set debugger kill on exit flag */
1626 @REQ(set_debugger_kill_on_exit)
1627 int kill_on_exit; /* 0=detach/1=kill debuggee when debugger dies */
1628 @END
1631 /* Read data from a process address space */
1632 @REQ(read_process_memory)
1633 obj_handle_t handle; /* process handle */
1634 client_ptr_t addr; /* addr to read from */
1635 @REPLY
1636 VARARG(data,bytes); /* result data */
1637 @END
1640 /* Write data to a process address space */
1641 @REQ(write_process_memory)
1642 obj_handle_t handle; /* process handle */
1643 client_ptr_t addr; /* addr to write to */
1644 VARARG(data,bytes); /* data to write */
1645 @END
1648 /* Create a registry key */
1649 @REQ(create_key)
1650 obj_handle_t parent; /* handle to the parent key */
1651 unsigned int access; /* desired access rights */
1652 unsigned int attributes; /* object attributes */
1653 unsigned int options; /* creation options */
1654 data_size_t namelen; /* length of key name in bytes */
1655 VARARG(name,unicode_str,namelen); /* key name */
1656 VARARG(class,unicode_str); /* class name */
1657 @REPLY
1658 obj_handle_t hkey; /* handle to the created key */
1659 int created; /* has it been newly created? */
1660 @END
1662 /* Open a registry key */
1663 @REQ(open_key)
1664 obj_handle_t parent; /* handle to the parent key */
1665 unsigned int access; /* desired access rights */
1666 unsigned int attributes; /* object attributes */
1667 VARARG(name,unicode_str); /* key name */
1668 @REPLY
1669 obj_handle_t hkey; /* handle to the open key */
1670 @END
1673 /* Delete a registry key */
1674 @REQ(delete_key)
1675 obj_handle_t hkey; /* handle to the key */
1676 @END
1679 /* Flush a registry key */
1680 @REQ(flush_key)
1681 obj_handle_t hkey; /* handle to the key */
1682 @END
1685 /* Enumerate registry subkeys */
1686 @REQ(enum_key)
1687 obj_handle_t hkey; /* handle to registry key */
1688 int index; /* index of subkey (or -1 for current key) */
1689 int info_class; /* requested information class */
1690 @REPLY
1691 int subkeys; /* number of subkeys */
1692 int max_subkey; /* longest subkey name */
1693 int max_class; /* longest class name */
1694 int values; /* number of values */
1695 int max_value; /* longest value name */
1696 int max_data; /* longest value data */
1697 timeout_t modif; /* last modification time */
1698 data_size_t total; /* total length needed for full name and class */
1699 data_size_t namelen; /* length of key name in bytes */
1700 VARARG(name,unicode_str,namelen); /* key name */
1701 VARARG(class,unicode_str); /* class name */
1702 @END
1705 /* Set a value of a registry key */
1706 @REQ(set_key_value)
1707 obj_handle_t hkey; /* handle to registry key */
1708 int type; /* value type */
1709 data_size_t namelen; /* length of value name in bytes */
1710 VARARG(name,unicode_str,namelen); /* value name */
1711 VARARG(data,bytes); /* value data */
1712 @END
1715 /* Retrieve the value of a registry key */
1716 @REQ(get_key_value)
1717 obj_handle_t hkey; /* handle to registry key */
1718 VARARG(name,unicode_str); /* value name */
1719 @REPLY
1720 int type; /* value type */
1721 data_size_t total; /* total length needed for data */
1722 VARARG(data,bytes); /* value data */
1723 @END
1726 /* Enumerate a value of a registry key */
1727 @REQ(enum_key_value)
1728 obj_handle_t hkey; /* handle to registry key */
1729 int index; /* value index */
1730 int info_class; /* requested information class */
1731 @REPLY
1732 int type; /* value type */
1733 data_size_t total; /* total length needed for full name and data */
1734 data_size_t namelen; /* length of value name in bytes */
1735 VARARG(name,unicode_str,namelen); /* value name */
1736 VARARG(data,bytes); /* value data */
1737 @END
1740 /* Delete a value of a registry key */
1741 @REQ(delete_key_value)
1742 obj_handle_t hkey; /* handle to registry key */
1743 VARARG(name,unicode_str); /* value name */
1744 @END
1747 /* Load a registry branch from a file */
1748 @REQ(load_registry)
1749 obj_handle_t hkey; /* root key to load to */
1750 obj_handle_t file; /* file to load from */
1751 VARARG(name,unicode_str); /* subkey name */
1752 @END
1755 /* UnLoad a registry branch from a file */
1756 @REQ(unload_registry)
1757 obj_handle_t hkey; /* root key to unload to */
1758 @END
1761 /* Save a registry branch to a file */
1762 @REQ(save_registry)
1763 obj_handle_t hkey; /* key to save */
1764 obj_handle_t file; /* file to save to */
1765 @END
1768 /* Add a registry key change notification */
1769 @REQ(set_registry_notification)
1770 obj_handle_t hkey; /* key to watch for changes */
1771 obj_handle_t event; /* event to set */
1772 int subtree; /* should we watch the whole subtree? */
1773 unsigned int filter; /* things to watch */
1774 @END
1777 /* Create a waitable timer */
1778 @REQ(create_timer)
1779 unsigned int access; /* wanted access rights */
1780 unsigned int attributes; /* object attributes */
1781 obj_handle_t rootdir; /* root directory */
1782 int manual; /* manual reset */
1783 VARARG(name,unicode_str); /* object name */
1784 @REPLY
1785 obj_handle_t handle; /* handle to the timer */
1786 @END
1789 /* Open a waitable timer */
1790 @REQ(open_timer)
1791 unsigned int access; /* wanted access rights */
1792 unsigned int attributes; /* object attributes */
1793 obj_handle_t rootdir; /* root directory */
1794 VARARG(name,unicode_str); /* object name */
1795 @REPLY
1796 obj_handle_t handle; /* handle to the timer */
1797 @END
1799 /* Set a waitable timer */
1800 @REQ(set_timer)
1801 obj_handle_t handle; /* handle to the timer */
1802 timeout_t expire; /* next expiration absolute time */
1803 client_ptr_t callback; /* callback function */
1804 client_ptr_t arg; /* callback argument */
1805 int period; /* timer period in ms */
1806 @REPLY
1807 int signaled; /* was the timer signaled before this call ? */
1808 @END
1810 /* Cancel a waitable timer */
1811 @REQ(cancel_timer)
1812 obj_handle_t handle; /* handle to the timer */
1813 @REPLY
1814 int signaled; /* was the timer signaled before this calltime ? */
1815 @END
1817 /* Get information on a waitable timer */
1818 @REQ(get_timer_info)
1819 obj_handle_t handle; /* handle to the timer */
1820 @REPLY
1821 timeout_t when; /* absolute time when the timer next expires */
1822 int signaled; /* is the timer signaled? */
1823 @END
1826 /* Retrieve the current context of a thread */
1827 @REQ(get_thread_context)
1828 obj_handle_t handle; /* thread handle */
1829 unsigned int flags; /* context flags */
1830 int suspend; /* if getting context during suspend */
1831 @REPLY
1832 int self; /* was it a handle to the current thread? */
1833 VARARG(context,context); /* thread context */
1834 @END
1837 /* Set the current context of a thread */
1838 @REQ(set_thread_context)
1839 obj_handle_t handle; /* thread handle */
1840 int suspend; /* if setting context during suspend */
1841 VARARG(context,context); /* thread context */
1842 @REPLY
1843 int self; /* was it a handle to the current thread? */
1844 @END
1847 /* Fetch a selector entry for a thread */
1848 @REQ(get_selector_entry)
1849 obj_handle_t handle; /* thread handle */
1850 int entry; /* LDT entry */
1851 @REPLY
1852 unsigned int base; /* selector base */
1853 unsigned int limit; /* selector limit */
1854 unsigned char flags; /* selector flags */
1855 @END
1858 /* Add an atom */
1859 @REQ(add_atom)
1860 obj_handle_t table; /* which table to add atom to */
1861 VARARG(name,unicode_str); /* atom name */
1862 @REPLY
1863 atom_t atom; /* resulting atom */
1864 @END
1867 /* Delete an atom */
1868 @REQ(delete_atom)
1869 obj_handle_t table; /* which table to delete atom from */
1870 atom_t atom; /* atom handle */
1871 @END
1874 /* Find an atom */
1875 @REQ(find_atom)
1876 obj_handle_t table; /* which table to find atom from */
1877 VARARG(name,unicode_str); /* atom name */
1878 @REPLY
1879 atom_t atom; /* atom handle */
1880 @END
1883 /* Get information about an atom */
1884 @REQ(get_atom_information)
1885 obj_handle_t table; /* which table to find atom from */
1886 atom_t atom; /* atom handle */
1887 @REPLY
1888 int count; /* atom lock count */
1889 int pinned; /* whether the atom has been pinned */
1890 data_size_t total; /* actual length of atom name */
1891 VARARG(name,unicode_str); /* atom name */
1892 @END
1895 /* Set information about an atom */
1896 @REQ(set_atom_information)
1897 obj_handle_t table; /* which table to find atom from */
1898 atom_t atom; /* atom handle */
1899 int pinned; /* whether to bump atom information */
1900 @END
1903 /* Empty an atom table */
1904 @REQ(empty_atom_table)
1905 obj_handle_t table; /* which table to find atom from */
1906 int if_pinned; /* whether to delete pinned atoms */
1907 @END
1910 /* Init an atom table */
1911 @REQ(init_atom_table)
1912 int entries; /* number of entries (only for local) */
1913 @REPLY
1914 obj_handle_t table; /* handle to the atom table */
1915 @END
1918 /* Get the message queue of the current thread */
1919 @REQ(get_msg_queue)
1920 @REPLY
1921 obj_handle_t handle; /* handle to the queue */
1922 @END
1925 /* Set the file descriptor associated to the current thread queue */
1926 @REQ(set_queue_fd)
1927 obj_handle_t handle; /* handle to the file descriptor */
1928 @END
1931 /* Set the current message queue wakeup mask */
1932 @REQ(set_queue_mask)
1933 unsigned int wake_mask; /* wakeup bits mask */
1934 unsigned int changed_mask; /* changed bits mask */
1935 int skip_wait; /* will we skip waiting if signaled? */
1936 @REPLY
1937 unsigned int wake_bits; /* current wake bits */
1938 unsigned int changed_bits; /* current changed bits */
1939 @END
1942 /* Get the current message queue status */
1943 @REQ(get_queue_status)
1944 int clear; /* should we clear the change bits? */
1945 @REPLY
1946 unsigned int wake_bits; /* wake bits */
1947 unsigned int changed_bits; /* changed bits since last time */
1948 @END
1951 /* Retrieve the process idle event */
1952 @REQ(get_process_idle_event)
1953 obj_handle_t handle; /* process handle */
1954 @REPLY
1955 obj_handle_t event; /* handle to idle event */
1956 @END
1959 /* Send a message to a thread queue */
1960 @REQ(send_message)
1961 thread_id_t id; /* thread id */
1962 int type; /* message type (see below) */
1963 int flags; /* message flags (see below) */
1964 user_handle_t win; /* window handle */
1965 unsigned int msg; /* message code */
1966 lparam_t wparam; /* parameters */
1967 lparam_t lparam; /* parameters */
1968 timeout_t timeout; /* timeout for reply */
1969 VARARG(data,message_data); /* message data for sent messages */
1970 @END
1972 @REQ(post_quit_message)
1973 int exit_code; /* exit code to return */
1974 @END
1976 enum message_type
1978 MSG_ASCII, /* Ascii message (from SendMessageA) */
1979 MSG_UNICODE, /* Unicode message (from SendMessageW) */
1980 MSG_NOTIFY, /* notify message (from SendNotifyMessageW), always Unicode */
1981 MSG_CALLBACK, /* callback message (from SendMessageCallbackW), always Unicode */
1982 MSG_CALLBACK_RESULT,/* result of a callback message */
1983 MSG_OTHER_PROCESS, /* sent from other process, may include vararg data, always Unicode */
1984 MSG_POSTED, /* posted message (from PostMessageW), always Unicode */
1985 MSG_HARDWARE, /* hardware message */
1986 MSG_WINEVENT /* winevent message */
1988 #define SEND_MSG_ABORT_IF_HUNG 0x01
1991 /* Send a hardware message to a thread queue */
1992 @REQ(send_hardware_message)
1993 thread_id_t id; /* thread id */
1994 user_handle_t win; /* window handle */
1995 unsigned int msg; /* message code */
1996 lparam_t wparam; /* parameters */
1997 lparam_t lparam; /* parameters */
1998 lparam_t info; /* extra info */
1999 int x; /* x position */
2000 int y; /* y position */
2001 unsigned int time; /* message time */
2002 @REPLY
2003 user_handle_t cursor; /* current cursor for the target thread input */
2004 int count; /* current cursor count */
2005 @END
2008 /* Get a message from the current queue */
2009 @REQ(get_message)
2010 unsigned int flags; /* PM_* flags */
2011 user_handle_t get_win; /* window handle to get */
2012 unsigned int get_first; /* first message code to get */
2013 unsigned int get_last; /* last message code to get */
2014 unsigned int hw_id; /* id of the previous hardware message (or 0) */
2015 unsigned int wake_mask; /* wakeup bits mask */
2016 unsigned int changed_mask; /* changed bits mask */
2017 @REPLY
2018 user_handle_t win; /* window handle */
2019 unsigned int msg; /* message code */
2020 lparam_t wparam; /* parameters */
2021 lparam_t lparam; /* parameters */
2022 int type; /* message type */
2023 unsigned int time; /* message time */
2024 unsigned int active_hooks; /* active hooks bitmap */
2025 data_size_t total; /* total size of extra data */
2026 VARARG(data,message_data); /* message data for sent messages */
2027 @END
2030 /* Reply to a sent message */
2031 @REQ(reply_message)
2032 int remove; /* should we remove the message? */
2033 lparam_t result; /* message result */
2034 VARARG(data,bytes); /* message data for sent messages */
2035 @END
2038 /* Accept the current hardware message */
2039 @REQ(accept_hardware_message)
2040 unsigned int hw_id; /* id of the hardware message */
2041 int remove; /* should we remove the message? */
2042 user_handle_t new_win; /* new destination window for current message */
2043 @END
2046 /* Retrieve the reply for the last message sent */
2047 @REQ(get_message_reply)
2048 int cancel; /* cancel message if not ready? */
2049 @REPLY
2050 lparam_t result; /* message result */
2051 VARARG(data,bytes); /* message data for sent messages */
2052 @END
2055 /* Set a window timer */
2056 @REQ(set_win_timer)
2057 user_handle_t win; /* window handle */
2058 unsigned int msg; /* message to post */
2059 unsigned int rate; /* timer rate in ms */
2060 lparam_t id; /* timer id */
2061 lparam_t lparam; /* message lparam (callback proc) */
2062 @REPLY
2063 lparam_t id; /* timer id */
2064 @END
2067 /* Kill a window timer */
2068 @REQ(kill_win_timer)
2069 user_handle_t win; /* window handle */
2070 lparam_t id; /* timer id */
2071 unsigned int msg; /* message to post */
2072 @END
2075 /* check if the thread owning the window is hung */
2076 @REQ(is_window_hung)
2077 user_handle_t win; /* window handle */
2078 @REPLY
2079 int is_hung;
2080 @END
2083 /* Retrieve info about a serial port */
2084 @REQ(get_serial_info)
2085 obj_handle_t handle; /* handle to comm port */
2086 @REPLY
2087 unsigned int readinterval;
2088 unsigned int readconst;
2089 unsigned int readmult;
2090 unsigned int writeconst;
2091 unsigned int writemult;
2092 unsigned int eventmask;
2093 @END
2096 /* Set info about a serial port */
2097 @REQ(set_serial_info)
2098 obj_handle_t handle; /* handle to comm port */
2099 int flags; /* bitmask to set values (see below) */
2100 unsigned int readinterval;
2101 unsigned int readconst;
2102 unsigned int readmult;
2103 unsigned int writeconst;
2104 unsigned int writemult;
2105 unsigned int eventmask;
2106 @END
2107 #define SERIALINFO_SET_TIMEOUTS 0x01
2108 #define SERIALINFO_SET_MASK 0x02
2111 /* Create an async I/O */
2112 @REQ(register_async)
2113 int type; /* type of queue to look after */
2114 async_data_t async; /* async I/O parameters */
2115 int count; /* count - usually # of bytes to be read/written */
2116 @END
2117 #define ASYNC_TYPE_READ 0x01
2118 #define ASYNC_TYPE_WRITE 0x02
2119 #define ASYNC_TYPE_WAIT 0x03
2122 /* Cancel all async op on a fd */
2123 @REQ(cancel_async)
2124 obj_handle_t handle; /* handle to comm port, socket or file */
2125 client_ptr_t iosb; /* I/O status block (NULL=all) */
2126 int only_thread; /* cancel matching this thread */
2127 @END
2130 /* Perform an ioctl on a file */
2131 @REQ(ioctl)
2132 ioctl_code_t code; /* ioctl code */
2133 async_data_t async; /* async I/O parameters */
2134 int blocking; /* whether it's a blocking ioctl */
2135 VARARG(in_data,bytes); /* ioctl input data */
2136 @REPLY
2137 obj_handle_t wait; /* handle to wait on for blocking ioctl */
2138 unsigned int options; /* device open options */
2139 VARARG(out_data,bytes); /* ioctl output data */
2140 @END
2143 /* Retrieve results of an async ioctl */
2144 @REQ(get_ioctl_result)
2145 obj_handle_t handle; /* handle to the device */
2146 client_ptr_t user_arg; /* user arg used to identify the request */
2147 @REPLY
2148 VARARG(out_data,bytes); /* ioctl output data */
2149 @END
2152 /* Create a named pipe */
2153 @REQ(create_named_pipe)
2154 unsigned int access;
2155 unsigned int attributes; /* object attributes */
2156 obj_handle_t rootdir; /* root directory */
2157 unsigned int options;
2158 unsigned int maxinstances;
2159 unsigned int outsize;
2160 unsigned int insize;
2161 timeout_t timeout;
2162 unsigned int flags;
2163 VARARG(name,unicode_str); /* pipe name */
2164 @REPLY
2165 obj_handle_t handle; /* handle to the pipe */
2166 @END
2168 /* flags in create_named_pipe and get_named_pipe_info */
2169 #define NAMED_PIPE_MESSAGE_STREAM_WRITE 0x0001
2170 #define NAMED_PIPE_MESSAGE_STREAM_READ 0x0002
2171 #define NAMED_PIPE_NONBLOCKING_MODE 0x0004
2172 #define NAMED_PIPE_SERVER_END 0x8000
2175 @REQ(get_named_pipe_info)
2176 obj_handle_t handle;
2177 @REPLY
2178 unsigned int flags;
2179 unsigned int maxinstances;
2180 unsigned int instances;
2181 unsigned int outsize;
2182 unsigned int insize;
2183 @END
2186 /* Create a window */
2187 @REQ(create_window)
2188 user_handle_t parent; /* parent window */
2189 user_handle_t owner; /* owner window */
2190 atom_t atom; /* class atom */
2191 mod_handle_t instance; /* module instance */
2192 VARARG(class,unicode_str); /* class name */
2193 @REPLY
2194 user_handle_t handle; /* created window */
2195 user_handle_t parent; /* full handle of parent */
2196 user_handle_t owner; /* full handle of owner */
2197 int extra; /* number of extra bytes */
2198 client_ptr_t class_ptr; /* pointer to class in client address space */
2199 @END
2202 /* Destroy a window */
2203 @REQ(destroy_window)
2204 user_handle_t handle; /* handle to the window */
2205 @END
2208 /* Retrieve the desktop window for the current thread */
2209 @REQ(get_desktop_window)
2210 int force; /* force creation if it doesn't exist */
2211 @REPLY
2212 user_handle_t top_window; /* handle to the desktop window */
2213 user_handle_t msg_window; /* handle to the top-level HWND_MESSAGE parent */
2214 @END
2217 /* Set a window owner */
2218 @REQ(set_window_owner)
2219 user_handle_t handle; /* handle to the window */
2220 user_handle_t owner; /* new owner */
2221 @REPLY
2222 user_handle_t full_owner; /* full handle of new owner */
2223 user_handle_t prev_owner; /* full handle of previous owner */
2224 @END
2227 /* Get information from a window handle */
2228 @REQ(get_window_info)
2229 user_handle_t handle; /* handle to the window */
2230 @REPLY
2231 user_handle_t full_handle; /* full 32-bit handle */
2232 user_handle_t last_active; /* last active popup */
2233 process_id_t pid; /* process owning the window */
2234 thread_id_t tid; /* thread owning the window */
2235 atom_t atom; /* class atom */
2236 int is_unicode; /* ANSI or unicode */
2237 @END
2240 /* Set some information in a window */
2241 @REQ(set_window_info)
2242 unsigned short flags; /* flags for fields to set (see below) */
2243 short int is_unicode; /* ANSI or unicode */
2244 user_handle_t handle; /* handle to the window */
2245 unsigned int style; /* window style */
2246 unsigned int ex_style; /* window extended style */
2247 unsigned int id; /* window id */
2248 mod_handle_t instance; /* creator instance */
2249 lparam_t user_data; /* user-specific data */
2250 int extra_offset; /* offset to set in extra bytes */
2251 data_size_t extra_size; /* size to set in extra bytes */
2252 lparam_t extra_value; /* value to set in extra bytes */
2253 @REPLY
2254 unsigned int old_style; /* old window style */
2255 unsigned int old_ex_style; /* old window extended style */
2256 mod_handle_t old_instance; /* old creator instance */
2257 lparam_t old_user_data; /* old user-specific data */
2258 lparam_t old_extra_value; /* old value in extra bytes */
2259 unsigned int old_id; /* old window id */
2260 @END
2261 #define SET_WIN_STYLE 0x01
2262 #define SET_WIN_EXSTYLE 0x02
2263 #define SET_WIN_ID 0x04
2264 #define SET_WIN_INSTANCE 0x08
2265 #define SET_WIN_USERDATA 0x10
2266 #define SET_WIN_EXTRA 0x20
2267 #define SET_WIN_UNICODE 0x40
2270 /* Set the parent of a window */
2271 @REQ(set_parent)
2272 user_handle_t handle; /* handle to the window */
2273 user_handle_t parent; /* handle to the parent */
2274 @REPLY
2275 user_handle_t old_parent; /* old parent window */
2276 user_handle_t full_parent; /* full handle of new parent */
2277 @END
2280 /* Get a list of the window parents, up to the root of the tree */
2281 @REQ(get_window_parents)
2282 user_handle_t handle; /* handle to the window */
2283 @REPLY
2284 int count; /* total count of parents */
2285 VARARG(parents,user_handles); /* parent handles */
2286 @END
2289 /* Get a list of the window children */
2290 @REQ(get_window_children)
2291 obj_handle_t desktop; /* handle to desktop */
2292 user_handle_t parent; /* parent window */
2293 atom_t atom; /* class atom for the listed children */
2294 thread_id_t tid; /* thread owning the listed children */
2295 VARARG(class,unicode_str); /* class name */
2296 @REPLY
2297 int count; /* total count of children */
2298 VARARG(children,user_handles); /* children handles */
2299 @END
2302 /* Get a list of the window children that contain a given point */
2303 @REQ(get_window_children_from_point)
2304 user_handle_t parent; /* parent window */
2305 int x; /* point in parent coordinates */
2306 int y;
2307 @REPLY
2308 int count; /* total count of children */
2309 VARARG(children,user_handles); /* children handles */
2310 @END
2313 /* Get window tree information from a window handle */
2314 @REQ(get_window_tree)
2315 user_handle_t handle; /* handle to the window */
2316 @REPLY
2317 user_handle_t parent; /* parent window */
2318 user_handle_t owner; /* owner window */
2319 user_handle_t next_sibling; /* next sibling in Z-order */
2320 user_handle_t prev_sibling; /* prev sibling in Z-order */
2321 user_handle_t first_sibling; /* first sibling in Z-order */
2322 user_handle_t last_sibling; /* last sibling in Z-order */
2323 user_handle_t first_child; /* first child */
2324 user_handle_t last_child; /* last child */
2325 @END
2327 /* Set the position and Z order of a window */
2328 @REQ(set_window_pos)
2329 unsigned int flags; /* SWP_* flags */
2330 user_handle_t handle; /* handle to the window */
2331 user_handle_t previous; /* previous window in Z order */
2332 rectangle_t window; /* window rectangle */
2333 rectangle_t client; /* client rectangle */
2334 VARARG(valid,rectangles); /* valid rectangles from WM_NCCALCSIZE */
2335 @REPLY
2336 unsigned int new_style; /* new window style */
2337 unsigned int new_ex_style; /* new window extended style */
2338 @END
2341 /* Get the window and client rectangles of a window */
2342 @REQ(get_window_rectangles)
2343 user_handle_t handle; /* handle to the window */
2344 @REPLY
2345 rectangle_t window; /* window rectangle */
2346 rectangle_t visible; /* visible part of the window rectangle */
2347 rectangle_t client; /* client rectangle */
2348 @END
2351 /* Get the window text */
2352 @REQ(get_window_text)
2353 user_handle_t handle; /* handle to the window */
2354 @REPLY
2355 VARARG(text,unicode_str); /* window text */
2356 @END
2359 /* Set the window text */
2360 @REQ(set_window_text)
2361 user_handle_t handle; /* handle to the window */
2362 VARARG(text,unicode_str); /* window text */
2363 @END
2366 /* Get the coordinates offset between two windows */
2367 @REQ(get_windows_offset)
2368 user_handle_t from; /* handle to the first window */
2369 user_handle_t to; /* handle to the second window */
2370 @REPLY
2371 int x; /* x coordinate offset */
2372 int y; /* y coordinate offset */
2373 @END
2376 /* Get the visible region of a window */
2377 @REQ(get_visible_region)
2378 user_handle_t window; /* handle to the window */
2379 unsigned int flags; /* DCX flags */
2380 @REPLY
2381 user_handle_t top_win; /* top window to clip against */
2382 rectangle_t top_rect; /* top window visible rect with screen coords */
2383 rectangle_t win_rect; /* window rect in screen coords */
2384 data_size_t total_size; /* total size of the resulting region */
2385 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2386 @END
2389 /* Get the window region */
2390 @REQ(get_window_region)
2391 user_handle_t window; /* handle to the window */
2392 @REPLY
2393 data_size_t total_size; /* total size of the resulting region */
2394 VARARG(region,rectangles); /* list of rectangles for the region */
2395 @END
2398 /* Set the window region */
2399 @REQ(set_window_region)
2400 user_handle_t window; /* handle to the window */
2401 int redraw; /* redraw the window? */
2402 VARARG(region,rectangles); /* list of rectangles for the region */
2403 @END
2406 /* Get the window update region */
2407 @REQ(get_update_region)
2408 user_handle_t window; /* handle to the window */
2409 user_handle_t from_child; /* child to start searching from */
2410 unsigned int flags; /* update flags (see below) */
2411 @REPLY
2412 user_handle_t child; /* child to repaint (or window itself) */
2413 unsigned int flags; /* resulting update flags (see below) */
2414 data_size_t total_size; /* total size of the resulting region */
2415 VARARG(region,rectangles); /* list of rectangles for the region */
2416 @END
2417 #define UPDATE_NONCLIENT 0x01 /* get region for repainting non-client area */
2418 #define UPDATE_ERASE 0x02 /* get region for erasing client area */
2419 #define UPDATE_PAINT 0x04 /* get region for painting client area */
2420 #define UPDATE_INTERNALPAINT 0x08 /* get region if internal paint is pending */
2421 #define UPDATE_ALLCHILDREN 0x10 /* force repaint of all children */
2422 #define UPDATE_NOCHILDREN 0x20 /* don't try to repaint any children */
2423 #define UPDATE_NOREGION 0x40 /* don't return a region, only the flags */
2424 #define UPDATE_DELAYED_ERASE 0x80 /* still needs erase after BeginPaint */
2427 /* Update the z order of a window so that a given rectangle is fully visible */
2428 @REQ(update_window_zorder)
2429 user_handle_t window; /* handle to the window */
2430 rectangle_t rect; /* rectangle that must be visible */
2431 @END
2434 /* Mark parts of a window as needing a redraw */
2435 @REQ(redraw_window)
2436 user_handle_t window; /* handle to the window */
2437 unsigned int flags; /* RDW_* flags */
2438 VARARG(region,rectangles); /* list of rectangles for the region */
2439 @END
2442 /* Set a window property */
2443 @REQ(set_window_property)
2444 user_handle_t window; /* handle to the window */
2445 lparam_t data; /* data to store */
2446 atom_t atom; /* property atom (if no name specified) */
2447 VARARG(name,unicode_str); /* property name */
2448 @END
2451 /* Remove a window property */
2452 @REQ(remove_window_property)
2453 user_handle_t window; /* handle to the window */
2454 atom_t atom; /* property atom (if no name specified) */
2455 VARARG(name,unicode_str); /* property name */
2456 @REPLY
2457 lparam_t data; /* data stored in property */
2458 @END
2461 /* Get a window property */
2462 @REQ(get_window_property)
2463 user_handle_t window; /* handle to the window */
2464 atom_t atom; /* property atom (if no name specified) */
2465 VARARG(name,unicode_str); /* property name */
2466 @REPLY
2467 lparam_t data; /* data stored in property */
2468 @END
2471 /* Get the list of properties of a window */
2472 @REQ(get_window_properties)
2473 user_handle_t window; /* handle to the window */
2474 @REPLY
2475 int total; /* total number of properties */
2476 VARARG(props,properties); /* list of properties */
2477 @END
2480 /* Create a window station */
2481 @REQ(create_winstation)
2482 unsigned int flags; /* window station flags */
2483 unsigned int access; /* wanted access rights */
2484 unsigned int attributes; /* object attributes */
2485 VARARG(name,unicode_str); /* object name */
2486 @REPLY
2487 obj_handle_t handle; /* handle to the window station */
2488 @END
2491 /* Open a handle to a window station */
2492 @REQ(open_winstation)
2493 unsigned int access; /* wanted access rights */
2494 unsigned int attributes; /* object attributes */
2495 VARARG(name,unicode_str); /* object name */
2496 @REPLY
2497 obj_handle_t handle; /* handle to the window station */
2498 @END
2501 /* Close a window station */
2502 @REQ(close_winstation)
2503 obj_handle_t handle; /* handle to the window station */
2504 @END
2507 /* Get the process current window station */
2508 @REQ(get_process_winstation)
2509 @REPLY
2510 obj_handle_t handle; /* handle to the window station */
2511 @END
2514 /* Set the process current window station */
2515 @REQ(set_process_winstation)
2516 obj_handle_t handle; /* handle to the window station */
2517 @END
2520 /* Enumerate window stations */
2521 @REQ(enum_winstation)
2522 unsigned int index; /* current index */
2523 @REPLY
2524 unsigned int next; /* next index */
2525 VARARG(name,unicode_str); /* window station name */
2526 @END
2529 /* Create a desktop */
2530 @REQ(create_desktop)
2531 unsigned int flags; /* desktop flags */
2532 unsigned int access; /* wanted access rights */
2533 unsigned int attributes; /* object attributes */
2534 VARARG(name,unicode_str); /* object name */
2535 @REPLY
2536 obj_handle_t handle; /* handle to the desktop */
2537 @END
2540 /* Open a handle to a desktop */
2541 @REQ(open_desktop)
2542 obj_handle_t winsta; /* window station to open (null allowed) */
2543 unsigned int flags; /* desktop flags */
2544 unsigned int access; /* wanted access rights */
2545 unsigned int attributes; /* object attributes */
2546 VARARG(name,unicode_str); /* object name */
2547 @REPLY
2548 obj_handle_t handle; /* handle to the desktop */
2549 @END
2552 /* Close a desktop */
2553 @REQ(close_desktop)
2554 obj_handle_t handle; /* handle to the desktop */
2555 @END
2558 /* Get the thread current desktop */
2559 @REQ(get_thread_desktop)
2560 thread_id_t tid; /* thread id */
2561 @REPLY
2562 obj_handle_t handle; /* handle to the desktop */
2563 @END
2566 /* Set the thread current desktop */
2567 @REQ(set_thread_desktop)
2568 obj_handle_t handle; /* handle to the desktop */
2569 @END
2572 /* Enumerate desktops */
2573 @REQ(enum_desktop)
2574 obj_handle_t winstation; /* handle to the window station */
2575 unsigned int index; /* current index */
2576 @REPLY
2577 unsigned int next; /* next index */
2578 VARARG(name,unicode_str); /* window station name */
2579 @END
2582 /* Get/set information about a user object (window station or desktop) */
2583 @REQ(set_user_object_info)
2584 obj_handle_t handle; /* handle to the object */
2585 unsigned int flags; /* information to set */
2586 unsigned int obj_flags; /* new object flags */
2587 @REPLY
2588 int is_desktop; /* is object a desktop? */
2589 unsigned int old_obj_flags; /* old object flags */
2590 VARARG(name,unicode_str); /* object name */
2591 @END
2592 #define SET_USER_OBJECT_FLAGS 1
2595 /* Attach (or detach) thread inputs */
2596 @REQ(attach_thread_input)
2597 thread_id_t tid_from; /* thread to be attached */
2598 thread_id_t tid_to; /* thread to which tid_from should be attached */
2599 int attach; /* is it an attach? */
2600 @END
2603 /* Get input data for a given thread */
2604 @REQ(get_thread_input)
2605 thread_id_t tid; /* id of thread */
2606 @REPLY
2607 user_handle_t focus; /* handle to the focus window */
2608 user_handle_t capture; /* handle to the capture window */
2609 user_handle_t active; /* handle to the active window */
2610 user_handle_t foreground; /* handle to the global foreground window */
2611 user_handle_t menu_owner; /* handle to the menu owner */
2612 user_handle_t move_size; /* handle to the moving/resizing window */
2613 user_handle_t caret; /* handle to the caret window */
2614 user_handle_t cursor; /* handle to the cursor */
2615 int show_count; /* cursor show count */
2616 rectangle_t rect; /* caret rectangle */
2617 @END
2620 /* Get the time of the last input event */
2621 @REQ(get_last_input_time)
2622 @REPLY
2623 unsigned int time;
2624 @END
2627 /* Retrieve queue keyboard state for a given thread */
2628 @REQ(get_key_state)
2629 thread_id_t tid; /* id of thread */
2630 int key; /* optional key code or -1 */
2631 @REPLY
2632 unsigned char state; /* state of specified key */
2633 VARARG(keystate,bytes); /* state array for all the keys */
2634 @END
2636 /* Set queue keyboard state for a given thread */
2637 @REQ(set_key_state)
2638 thread_id_t tid; /* id of thread */
2639 VARARG(keystate,bytes); /* state array for all the keys */
2640 @END
2642 /* Set the system foreground window */
2643 @REQ(set_foreground_window)
2644 user_handle_t handle; /* handle to the foreground window */
2645 @REPLY
2646 user_handle_t previous; /* handle to the previous foreground window */
2647 int send_msg_old; /* whether we have to send a msg to the old window */
2648 int send_msg_new; /* whether we have to send a msg to the new window */
2649 @END
2651 /* Set the current thread focus window */
2652 @REQ(set_focus_window)
2653 user_handle_t handle; /* handle to the focus window */
2654 @REPLY
2655 user_handle_t previous; /* handle to the previous focus window */
2656 @END
2658 /* Set the current thread active window */
2659 @REQ(set_active_window)
2660 user_handle_t handle; /* handle to the active window */
2661 @REPLY
2662 user_handle_t previous; /* handle to the previous active window */
2663 @END
2665 /* Set the current thread capture window */
2666 @REQ(set_capture_window)
2667 user_handle_t handle; /* handle to the capture window */
2668 unsigned int flags; /* capture flags (see below) */
2669 @REPLY
2670 user_handle_t previous; /* handle to the previous capture window */
2671 user_handle_t full_handle; /* full 32-bit handle of new capture window */
2672 @END
2673 #define CAPTURE_MENU 0x01 /* capture is for a menu */
2674 #define CAPTURE_MOVESIZE 0x02 /* capture is for moving/resizing */
2677 /* Set the current thread caret window */
2678 @REQ(set_caret_window)
2679 user_handle_t handle; /* handle to the caret window */
2680 int width; /* caret width */
2681 int height; /* caret height */
2682 @REPLY
2683 user_handle_t previous; /* handle to the previous caret window */
2684 rectangle_t old_rect; /* previous caret rectangle */
2685 int old_hide; /* previous hide count */
2686 int old_state; /* previous caret state (1=on, 0=off) */
2687 @END
2690 /* Set the current thread caret information */
2691 @REQ(set_caret_info)
2692 unsigned int flags; /* caret flags (see below) */
2693 user_handle_t handle; /* handle to the caret window */
2694 int x; /* caret x position */
2695 int y; /* caret y position */
2696 int hide; /* increment for hide count (can be negative to show it) */
2697 int state; /* caret state (1=on, 0=off, -1=toggle current state) */
2698 @REPLY
2699 user_handle_t full_handle; /* handle to the current caret window */
2700 rectangle_t old_rect; /* previous caret rectangle */
2701 int old_hide; /* previous hide count */
2702 int old_state; /* previous caret state (1=on, 0=off) */
2703 @END
2704 #define SET_CARET_POS 0x01 /* set the caret position from x,y */
2705 #define SET_CARET_HIDE 0x02 /* increment the caret hide count */
2706 #define SET_CARET_STATE 0x04 /* set the caret on/off state */
2709 /* Set a window hook */
2710 @REQ(set_hook)
2711 int id; /* id of the hook */
2712 process_id_t pid; /* id of process to set the hook into */
2713 thread_id_t tid; /* id of thread to set the hook into */
2714 int event_min;
2715 int event_max;
2716 client_ptr_t proc; /* hook procedure */
2717 int flags;
2718 int unicode; /* is it a unicode hook? */
2719 VARARG(module,unicode_str); /* module name */
2720 @REPLY
2721 user_handle_t handle; /* handle to the hook */
2722 unsigned int active_hooks; /* active hooks bitmap */
2723 @END
2726 /* Remove a window hook */
2727 @REQ(remove_hook)
2728 user_handle_t handle; /* handle to the hook */
2729 client_ptr_t proc; /* hook procedure if handle is 0 */
2730 int id; /* id of the hook if handle is 0 */
2731 @REPLY
2732 unsigned int active_hooks; /* active hooks bitmap */
2733 @END
2736 /* Start calling a hook chain */
2737 @REQ(start_hook_chain)
2738 int id; /* id of the hook */
2739 int event; /* signalled event */
2740 user_handle_t window; /* handle to the event window */
2741 int object_id; /* object id for out of context winevent */
2742 int child_id; /* child id for out of context winevent */
2743 @REPLY
2744 user_handle_t handle; /* handle to the next hook */
2745 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2746 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2747 int unicode; /* is it a unicode hook? */
2748 client_ptr_t proc; /* hook procedure */
2749 unsigned int active_hooks; /* active hooks bitmap */
2750 VARARG(module,unicode_str); /* module name */
2751 @END
2754 /* Finished calling a hook chain */
2755 @REQ(finish_hook_chain)
2756 int id; /* id of the hook */
2757 @END
2760 /* Get the hook information */
2761 @REQ(get_hook_info)
2762 user_handle_t handle; /* handle to the current hook */
2763 int get_next; /* do we want info about current or next hook? */
2764 int event; /* signalled event */
2765 user_handle_t window; /* handle to the event window */
2766 int object_id; /* object id for out of context winevent */
2767 int child_id; /* child id for out of context winevent */
2768 @REPLY
2769 user_handle_t handle; /* handle to the hook */
2770 int id; /* id of the hook */
2771 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2772 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2773 client_ptr_t proc; /* hook procedure */
2774 int unicode; /* is it a unicode hook? */
2775 VARARG(module,unicode_str); /* module name */
2776 @END
2779 /* Create a window class */
2780 @REQ(create_class)
2781 int local; /* is it a local class? */
2782 atom_t atom; /* class atom */
2783 unsigned int style; /* class style */
2784 mod_handle_t instance; /* module instance */
2785 int extra; /* number of extra class bytes */
2786 int win_extra; /* number of window extra bytes */
2787 client_ptr_t client_ptr; /* pointer to class in client address space */
2788 VARARG(name,unicode_str); /* class name */
2789 @REPLY
2790 atom_t atom; /* resulting class atom */
2791 @END
2794 /* Destroy a window class */
2795 @REQ(destroy_class)
2796 atom_t atom; /* class atom */
2797 mod_handle_t instance; /* module instance */
2798 VARARG(name,unicode_str); /* class name */
2799 @REPLY
2800 client_ptr_t client_ptr; /* pointer to class in client address space */
2801 @END
2804 /* Set some information in a class */
2805 @REQ(set_class_info)
2806 user_handle_t window; /* handle to the window */
2807 unsigned int flags; /* flags for info to set (see below) */
2808 atom_t atom; /* class atom */
2809 unsigned int style; /* class style */
2810 int win_extra; /* number of window extra bytes */
2811 mod_handle_t instance; /* module instance */
2812 int extra_offset; /* offset to set in extra bytes */
2813 data_size_t extra_size; /* size to set in extra bytes */
2814 lparam_t extra_value; /* value to set in extra bytes */
2815 @REPLY
2816 atom_t old_atom; /* previous class atom */
2817 unsigned int old_style; /* previous class style */
2818 int old_extra; /* previous number of class extra bytes */
2819 int old_win_extra; /* previous number of window extra bytes */
2820 mod_handle_t old_instance; /* previous module instance */
2821 lparam_t old_extra_value; /* old value in extra bytes */
2822 @END
2823 #define SET_CLASS_ATOM 0x0001
2824 #define SET_CLASS_STYLE 0x0002
2825 #define SET_CLASS_WINEXTRA 0x0004
2826 #define SET_CLASS_INSTANCE 0x0008
2827 #define SET_CLASS_EXTRA 0x0010
2830 /* Set/get clipboard information */
2831 @REQ(set_clipboard_info)
2832 unsigned int flags; /* flags for fields to set (see below) */
2833 user_handle_t clipboard; /* clipboard window */
2834 user_handle_t owner; /* clipboard owner */
2835 user_handle_t viewer; /* first clipboard viewer */
2836 unsigned int seqno; /* change sequence number */
2837 @REPLY
2838 unsigned int flags; /* status flags (see below) */
2839 user_handle_t old_clipboard; /* old clipboard window */
2840 user_handle_t old_owner; /* old clipboard owner */
2841 user_handle_t old_viewer; /* old clipboard viewer */
2842 unsigned int seqno; /* current sequence number */
2843 @END
2845 #define SET_CB_OPEN 0x001
2846 #define SET_CB_OWNER 0x002
2847 #define SET_CB_VIEWER 0x004
2848 #define SET_CB_SEQNO 0x008
2849 #define SET_CB_RELOWNER 0x010
2850 #define SET_CB_CLOSE 0x020
2851 #define CB_OPEN 0x040
2852 #define CB_OWNER 0x080
2853 #define CB_PROCESS 0x100
2856 /* Open a security token */
2857 @REQ(open_token)
2858 obj_handle_t handle; /* handle to the thread or process */
2859 unsigned int access; /* access rights to the new token */
2860 unsigned int attributes;/* object attributes */
2861 unsigned int flags; /* flags (see below) */
2862 @REPLY
2863 obj_handle_t token; /* handle to the token */
2864 @END
2865 #define OPEN_TOKEN_THREAD 1
2866 #define OPEN_TOKEN_AS_SELF 2
2869 /* Set/get the global windows */
2870 @REQ(set_global_windows)
2871 unsigned int flags; /* flags for fields to set (see below) */
2872 user_handle_t shell_window; /* handle to the new shell window */
2873 user_handle_t shell_listview; /* handle to the new shell listview window */
2874 user_handle_t progman_window; /* handle to the new program manager window */
2875 user_handle_t taskman_window; /* handle to the new task manager window */
2876 @REPLY
2877 user_handle_t old_shell_window; /* handle to the shell window */
2878 user_handle_t old_shell_listview; /* handle to the shell listview window */
2879 user_handle_t old_progman_window; /* handle to the new program manager window */
2880 user_handle_t old_taskman_window; /* handle to the new task manager window */
2881 @END
2882 #define SET_GLOBAL_SHELL_WINDOWS 0x01 /* set both main shell and listview windows */
2883 #define SET_GLOBAL_PROGMAN_WINDOW 0x02
2884 #define SET_GLOBAL_TASKMAN_WINDOW 0x04
2886 /* Adjust the privileges held by a token */
2887 @REQ(adjust_token_privileges)
2888 obj_handle_t handle; /* handle to the token */
2889 int disable_all; /* disable all privileges? */
2890 int get_modified_state; /* get modified privileges? */
2891 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to enable/disable/remove */
2892 @REPLY
2893 unsigned int len; /* total length in bytes required to store token privileges */
2894 VARARG(privileges,LUID_AND_ATTRIBUTES); /* modified privileges */
2895 @END
2897 /* Retrieves the set of privileges held by or available to a token */
2898 @REQ(get_token_privileges)
2899 obj_handle_t handle; /* handle to the token */
2900 @REPLY
2901 unsigned int len; /* total length in bytes required to store token privileges */
2902 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
2903 @END
2905 /* Check the token has the required privileges */
2906 @REQ(check_token_privileges)
2907 obj_handle_t handle; /* handle to the token */
2908 int all_required; /* are all the privileges required for the check to succeed? */
2909 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to check */
2910 @REPLY
2911 int has_privileges; /* does the token have the required privileges? */
2912 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
2913 @END
2915 @REQ(duplicate_token)
2916 obj_handle_t handle; /* handle to the token to duplicate */
2917 unsigned int access; /* access rights to the new token */
2918 unsigned int attributes; /* object attributes */
2919 int primary; /* is the new token to be a primary one? */
2920 int impersonation_level; /* impersonation level of the new token */
2921 @REPLY
2922 obj_handle_t new_handle; /* duplicated handle */
2923 @END
2925 @REQ(access_check)
2926 obj_handle_t handle; /* handle to the token */
2927 unsigned int desired_access; /* desired access to the object */
2928 unsigned int mapping_read; /* mapping from generic read to specific rights */
2929 unsigned int mapping_write; /* mapping from generic write to specific rights */
2930 unsigned int mapping_execute; /* mapping from generic execute to specific rights */
2931 unsigned int mapping_all; /* mapping from generic all to specific rights */
2932 VARARG(sd,security_descriptor); /* security descriptor to check */
2933 @REPLY
2934 unsigned int access_granted; /* access rights actually granted */
2935 unsigned int access_status; /* was access granted? */
2936 unsigned int privileges_len; /* length needed to store privileges */
2937 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges used during access check */
2938 @END
2940 @REQ(get_token_sid)
2941 obj_handle_t handle; /* handle to the token */
2942 unsigned int which_sid; /* which SID to retrieve from the token */
2943 @REPLY
2944 data_size_t sid_len; /* length needed to store sid */
2945 VARARG(sid,SID); /* the sid specified by which_sid from the token */
2946 @END
2948 @REQ(get_token_groups)
2949 obj_handle_t handle; /* handle to the token */
2950 @REPLY
2951 data_size_t user_len; /* length needed to store user */
2952 VARARG(user,token_groups); /* groups the token's user belongs to */
2953 @END
2955 @REQ(get_token_default_dacl)
2956 obj_handle_t handle; /* handle to the token */
2957 @REPLY
2958 data_size_t acl_len; /* length needed to store access control list */
2959 VARARG(acl,ACL); /* access control list */
2960 @END
2962 @REQ(set_token_default_dacl)
2963 obj_handle_t handle; /* handle to the token */
2964 VARARG(acl,ACL); /* default dacl to set */
2965 @END
2967 @REQ(set_security_object)
2968 obj_handle_t handle; /* handle to the object */
2969 unsigned int security_info; /* which parts of security descriptor to set */
2970 VARARG(sd,security_descriptor); /* security descriptor to set */
2971 @END
2973 @REQ(get_security_object)
2974 obj_handle_t handle; /* handle to the object */
2975 unsigned int security_info; /* which parts of security descriptor to get */
2976 @REPLY
2977 unsigned int sd_len; /* buffer size needed for sd */
2978 VARARG(sd,security_descriptor); /* retrieved security descriptor */
2979 @END
2981 /* Create a mailslot */
2982 @REQ(create_mailslot)
2983 unsigned int access; /* wanted access rights */
2984 unsigned int attributes; /* object attributes */
2985 obj_handle_t rootdir; /* root directory */
2986 timeout_t read_timeout;
2987 unsigned int max_msgsize;
2988 VARARG(name,unicode_str); /* mailslot name */
2989 @REPLY
2990 obj_handle_t handle; /* handle to the mailslot */
2991 @END
2994 /* Set mailslot information */
2995 @REQ(set_mailslot_info)
2996 obj_handle_t handle; /* handle to the mailslot */
2997 timeout_t read_timeout;
2998 unsigned int flags;
2999 @REPLY
3000 timeout_t read_timeout;
3001 unsigned int max_msgsize;
3002 @END
3003 #define MAILSLOT_SET_READ_TIMEOUT 1
3006 /* Create a directory object */
3007 @REQ(create_directory)
3008 unsigned int access; /* access flags */
3009 unsigned int attributes; /* object attributes */
3010 obj_handle_t rootdir; /* root directory */
3011 VARARG(directory_name,unicode_str); /* Directory name */
3012 @REPLY
3013 obj_handle_t handle; /* handle to the directory */
3014 @END
3017 /* Open a directory object */
3018 @REQ(open_directory)
3019 unsigned int access; /* access flags */
3020 unsigned int attributes; /* object attributes */
3021 obj_handle_t rootdir; /* root directory */
3022 VARARG(directory_name,unicode_str); /* Directory name */
3023 @REPLY
3024 obj_handle_t handle; /* handle to the directory */
3025 @END
3028 /* Get a directory entry by index */
3029 @REQ(get_directory_entry)
3030 obj_handle_t handle; /* handle to the directory */
3031 unsigned int index; /* entry index */
3032 @REPLY
3033 data_size_t name_len; /* length of the entry name in bytes */
3034 VARARG(name,unicode_str,name_len); /* entry name */
3035 VARARG(type,unicode_str); /* entry type */
3036 @END
3039 /* Create a symbolic link object */
3040 @REQ(create_symlink)
3041 unsigned int access; /* access flags */
3042 unsigned int attributes; /* object attributes */
3043 obj_handle_t rootdir; /* root directory */
3044 data_size_t name_len; /* length of the symlink name in bytes */
3045 VARARG(name,unicode_str,name_len); /* symlink name */
3046 VARARG(target_name,unicode_str); /* target name */
3047 @REPLY
3048 obj_handle_t handle; /* handle to the symlink */
3049 @END
3052 /* Open a symbolic link object */
3053 @REQ(open_symlink)
3054 unsigned int access; /* access flags */
3055 unsigned int attributes; /* object attributes */
3056 obj_handle_t rootdir; /* root directory */
3057 VARARG(name,unicode_str); /* symlink name */
3058 @REPLY
3059 obj_handle_t handle; /* handle to the symlink */
3060 @END
3063 /* Query a symbolic link object */
3064 @REQ(query_symlink)
3065 obj_handle_t handle; /* handle to the symlink */
3066 @REPLY
3067 data_size_t total; /* total needed size for name */
3068 VARARG(target_name,unicode_str); /* target name */
3069 @END
3072 /* Query basic object information */
3073 @REQ(get_object_info)
3074 obj_handle_t handle; /* handle to the object */
3075 @REPLY
3076 unsigned int access; /* granted access mask */
3077 unsigned int ref_count; /* object ref count */
3078 data_size_t total; /* total needed size for name */
3079 VARARG(name,unicode_str); /* object name */
3080 @END
3083 /* Unlink a named object */
3084 @REQ(unlink_object)
3085 obj_handle_t handle; /* handle to the object */
3086 @END
3089 /* Query the impersonation level of an impersonation token */
3090 @REQ(get_token_impersonation_level)
3091 obj_handle_t handle; /* handle to the object */
3092 @REPLY
3093 int impersonation_level; /* impersonation level of the impersonation token */
3094 @END
3096 /* Allocate a locally-unique identifier */
3097 @REQ(allocate_locally_unique_id)
3098 @REPLY
3099 luid_t luid;
3100 @END
3103 /* Create a device manager */
3104 @REQ(create_device_manager)
3105 unsigned int access; /* wanted access rights */
3106 unsigned int attributes; /* object attributes */
3107 @REPLY
3108 obj_handle_t handle; /* handle to the device */
3109 @END
3112 /* Create a device */
3113 @REQ(create_device)
3114 unsigned int access; /* wanted access rights */
3115 unsigned int attributes; /* object attributes */
3116 obj_handle_t rootdir; /* root directory */
3117 client_ptr_t user_ptr; /* opaque ptr for use by client */
3118 obj_handle_t manager; /* device manager */
3119 VARARG(name,unicode_str); /* object name */
3120 @REPLY
3121 obj_handle_t handle; /* handle to the device */
3122 @END
3125 /* Delete a device */
3126 @REQ(delete_device)
3127 obj_handle_t handle; /* handle to the device */
3128 @END
3131 /* Retrieve the next pending device ioctl request */
3132 @REQ(get_next_device_request)
3133 obj_handle_t manager; /* handle to the device manager */
3134 obj_handle_t prev; /* handle to the previous ioctl */
3135 unsigned int status; /* status of the previous ioctl */
3136 VARARG(prev_data,bytes); /* output data of the previous ioctl */
3137 @REPLY
3138 obj_handle_t next; /* handle to the next ioctl */
3139 ioctl_code_t code; /* ioctl code */
3140 client_ptr_t user_ptr; /* opaque ptr for the device */
3141 data_size_t in_size; /* total needed input size */
3142 data_size_t out_size; /* needed output size */
3143 VARARG(next_data,bytes); /* input data of the next ioctl */
3144 @END
3147 /* Make the current process a system process */
3148 @REQ(make_process_system)
3149 @REPLY
3150 obj_handle_t event; /* event signaled when all user processes have exited */
3151 @END
3154 /* Get detailed fixed-size information about a token */
3155 @REQ(get_token_statistics)
3156 obj_handle_t handle; /* handle to the object */
3157 @REPLY
3158 luid_t token_id; /* locally-unique identifier of the token */
3159 luid_t modified_id; /* locally-unique identifier of the modified version of the token */
3160 int primary; /* is the token primary or impersonation? */
3161 int impersonation_level; /* level of impersonation */
3162 int group_count; /* the number of groups the token is a member of */
3163 int privilege_count; /* the number of privileges the token has */
3164 @END
3167 /* Create I/O completion port */
3168 @REQ(create_completion)
3169 unsigned int access; /* desired access to a port */
3170 unsigned int attributes; /* object attributes */
3171 unsigned int concurrent; /* max number of concurrent active threads */
3172 obj_handle_t rootdir; /* root directory */
3173 VARARG(filename,string); /* port name */
3174 @REPLY
3175 obj_handle_t handle; /* port handle */
3176 @END
3179 /* Open I/O completion port */
3180 @REQ(open_completion)
3181 unsigned int access; /* desired access to a port */
3182 unsigned int attributes; /* object attributes */
3183 obj_handle_t rootdir; /* root directory */
3184 VARARG(filename,string); /* port name */
3185 @REPLY
3186 obj_handle_t handle; /* port handle */
3187 @END
3190 /* add completion to completion port */
3191 @REQ(add_completion)
3192 obj_handle_t handle; /* port handle */
3193 apc_param_t ckey; /* completion key */
3194 apc_param_t cvalue; /* completion value */
3195 unsigned int information; /* IO_STATUS_BLOCK Information */
3196 unsigned int status; /* completion result */
3197 @END
3200 /* get completion from completion port queue */
3201 @REQ(remove_completion)
3202 obj_handle_t handle; /* port handle */
3203 @REPLY
3204 apc_param_t ckey; /* completion key */
3205 apc_param_t cvalue; /* completion value */
3206 unsigned int information; /* IO_STATUS_BLOCK Information */
3207 unsigned int status; /* completion result */
3208 @END
3211 /* get completion queue depth */
3212 @REQ(query_completion)
3213 obj_handle_t handle; /* port handle */
3214 @REPLY
3215 unsigned int depth; /* completion queue depth */
3216 @END
3219 /* associate object with completion port */
3220 @REQ(set_completion_info)
3221 obj_handle_t handle; /* object handle */
3222 apc_param_t ckey; /* completion key */
3223 obj_handle_t chandle; /* port handle */
3224 @END
3227 /* check for associated completion and push msg */
3228 @REQ(add_fd_completion)
3229 obj_handle_t handle; /* async' object */
3230 apc_param_t cvalue; /* completion value */
3231 unsigned int status; /* completion status */
3232 unsigned int information; /* IO_STATUS_BLOCK Information */
3233 @END
3236 /* Retrieve layered info for a window */
3237 @REQ(get_window_layered_info)
3238 user_handle_t handle; /* handle to the window */
3239 @REPLY
3240 unsigned int color_key; /* color key */
3241 unsigned int alpha; /* alpha (0..255) */
3242 unsigned int flags; /* LWA_* flags */
3243 @END
3246 /* Set layered info for a window */
3247 @REQ(set_window_layered_info)
3248 user_handle_t handle; /* handle to the window */
3249 unsigned int color_key; /* color key */
3250 unsigned int alpha; /* alpha (0..255) */
3251 unsigned int flags; /* LWA_* flags */
3252 @END
3255 /* Allocate an arbitrary user handle */
3256 @REQ(alloc_user_handle)
3257 @REPLY
3258 user_handle_t handle; /* allocated handle */
3259 @END
3262 /* Free an arbitrary user handle */
3263 @REQ(free_user_handle)
3264 user_handle_t handle; /* handle to free*/
3265 @END
3268 /* Set/get the current cursor */
3269 @REQ(set_cursor)
3270 unsigned int flags; /* flags for fields to set (see below) */
3271 user_handle_t handle; /* handle to the cursor */
3272 int show_count; /* show count increment/decrement */
3273 @REPLY
3274 user_handle_t prev_handle; /* previous handle */
3275 int prev_count; /* previous show count */
3276 @END
3277 #define SET_CURSOR_HANDLE 0x01
3278 #define SET_CURSOR_COUNT 0x02