po: Update German translation.
[wine/multimedia.git] / server / protocol.def
blob95d79948f0d5fcc32c3c20777ddb9697aabcda10
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_POWERPC, CPU_ARM, CPU_ARM64
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 int iar, msr, ctr, lr, dar, dsisr, trap, __pad; } powerpc_regs;
163 struct { unsigned int sp, lr, pc, cpsr; } arm_regs;
164 struct { unsigned __int64 sp, pc, pstate; } arm64_regs;
165 } ctl; /* selected by SERVER_CTX_CONTROL */
166 union
168 struct { unsigned int eax, ebx, ecx, edx, esi, edi; } i386_regs;
169 struct { unsigned __int64 rax,rbx, rcx, rdx, rsi, rdi,
170 r8, r9, r10, r11, r12, r13, r14, r15; } x86_64_regs;
171 struct { unsigned int gpr[32], cr, xer; } powerpc_regs;
172 struct { unsigned int r[13]; } arm_regs;
173 struct { unsigned __int64 x[31]; } arm64_regs;
174 } integer; /* selected by SERVER_CTX_INTEGER */
175 union
177 struct { unsigned int ds, es, fs, gs; } i386_regs;
178 struct { unsigned int ds, es, fs, gs; } x86_64_regs;
179 } seg; /* selected by SERVER_CTX_SEGMENTS */
180 union
182 struct { unsigned int ctrl, status, tag, err_off, err_sel, data_off, data_sel, cr0npx;
183 unsigned char regs[80]; } i386_regs;
184 struct { struct { unsigned __int64 low, high; } fpregs[32]; } x86_64_regs;
185 struct { double fpr[32], fpscr; } powerpc_regs;
186 } fp; /* selected by SERVER_CTX_FLOATING_POINT */
187 union
189 struct { unsigned int dr0, dr1, dr2, dr3, dr6, dr7; } i386_regs;
190 struct { unsigned __int64 dr0, dr1, dr2, dr3, dr6, dr7; } x86_64_regs;
191 struct { unsigned int dr[8]; } powerpc_regs;
192 } debug; /* selected by SERVER_CTX_DEBUG_REGISTERS */
193 union
195 unsigned char i386_regs[512];
196 } ext; /* selected by SERVER_CTX_EXTENDED_REGISTERS */
197 } context_t;
199 #define SERVER_CTX_CONTROL 0x01
200 #define SERVER_CTX_INTEGER 0x02
201 #define SERVER_CTX_SEGMENTS 0x04
202 #define SERVER_CTX_FLOATING_POINT 0x08
203 #define SERVER_CTX_DEBUG_REGISTERS 0x10
204 #define SERVER_CTX_EXTENDED_REGISTERS 0x20
206 /* structure used in sending an fd from client to server */
207 struct send_fd
209 thread_id_t tid; /* thread id */
210 int fd; /* file descriptor on client-side */
213 /* structure sent by the server on the wait fifo */
214 struct wake_up_reply
216 client_ptr_t cookie; /* magic cookie that was passed in select_request */
217 int signaled; /* wait result */
218 int __pad;
221 /* NT-style timeout, in 100ns units, negative means relative timeout */
222 typedef __int64 timeout_t;
223 #define TIMEOUT_INFINITE (((timeout_t)0x7fffffff) << 32 | 0xffffffff)
225 /* structure for process startup info */
226 typedef struct
228 unsigned int debug_flags;
229 unsigned int console_flags;
230 obj_handle_t console;
231 obj_handle_t hstdin;
232 obj_handle_t hstdout;
233 obj_handle_t hstderr;
234 unsigned int x;
235 unsigned int y;
236 unsigned int xsize;
237 unsigned int ysize;
238 unsigned int xchars;
239 unsigned int ychars;
240 unsigned int attribute;
241 unsigned int flags;
242 unsigned int show;
243 data_size_t curdir_len;
244 data_size_t dllpath_len;
245 data_size_t imagepath_len;
246 data_size_t cmdline_len;
247 data_size_t title_len;
248 data_size_t desktop_len;
249 data_size_t shellinfo_len;
250 data_size_t runtime_len;
251 /* VARARG(curdir,unicode_str,curdir_len); */
252 /* VARARG(dllpath,unicode_str,dllpath_len); */
253 /* VARARG(imagepath,unicode_str,imagepath_len); */
254 /* VARARG(cmdline,unicode_str,cmdline_len); */
255 /* VARARG(title,unicode_str,title_len); */
256 /* VARARG(desktop,unicode_str,desktop_len); */
257 /* VARARG(shellinfo,unicode_str,shellinfo_len); */
258 /* VARARG(runtime,unicode_str,runtime_len); */
259 } startup_info_t;
261 /* structure returned in the list of window properties */
262 typedef struct
264 atom_t atom; /* property atom */
265 int string; /* was atom a string originally? */
266 lparam_t data; /* data stored in property */
267 } property_data_t;
269 /* structure to specify window rectangles */
270 typedef struct
272 int left;
273 int top;
274 int right;
275 int bottom;
276 } rectangle_t;
278 /* structure for parameters of async I/O calls */
279 typedef struct
281 obj_handle_t handle; /* object to perform I/O on */
282 obj_handle_t event; /* event to signal when done */
283 client_ptr_t callback; /* client-side callback to call upon end of async */
284 client_ptr_t iosb; /* I/O status block in client addr space */
285 client_ptr_t arg; /* opaque user data to pass to callback */
286 apc_param_t cvalue; /* completion value to use for completion events */
287 } async_data_t;
289 /* structures for extra message data */
291 struct hardware_msg_data
293 lparam_t info; /* extra info */
294 int x; /* x position */
295 int y; /* y position */
296 unsigned int hw_id; /* unique id */
297 unsigned int flags; /* hook flags */
298 union
300 int type;
301 struct
303 int type; /* RIM_TYPEKEYBOARD */
304 unsigned int message; /* message generated by this rawinput event */
305 unsigned short vkey; /* virtual key code */
306 unsigned short scan; /* scan code */
307 } kbd;
308 struct
310 int type; /* RIM_TYPEMOUSE */
311 int x; /* x coordinate */
312 int y; /* y coordinate */
313 unsigned int data; /* mouse data */
314 } mouse;
315 } rawinput;
318 struct callback_msg_data
320 client_ptr_t callback; /* callback function */
321 lparam_t data; /* user data for callback */
322 lparam_t result; /* message result */
325 struct winevent_msg_data
327 user_handle_t hook; /* hook handle */
328 thread_id_t tid; /* thread id */
329 client_ptr_t hook_proc; /* hook proc address */
330 /* followed by module name if any */
333 typedef union
335 int type;
336 struct
338 int type; /* INPUT_KEYBOARD */
339 unsigned short vkey; /* virtual key code */
340 unsigned short scan; /* scan code */
341 unsigned int flags; /* event flags */
342 unsigned int time; /* event time */
343 lparam_t info; /* extra info */
344 } kbd;
345 struct
347 int type; /* INPUT_MOUSE */
348 int x; /* coordinates */
349 int y;
350 unsigned int data; /* mouse data */
351 unsigned int flags; /* event flags */
352 unsigned int time; /* event time */
353 lparam_t info; /* extra info */
354 } mouse;
355 struct
357 int type; /* INPUT_HARDWARE */
358 unsigned int msg; /* message code */
359 lparam_t lparam; /* message param */
360 } hw;
361 } hw_input_t;
363 typedef union
365 unsigned char bytes[1]; /* raw data for sent messages */
366 struct hardware_msg_data hardware;
367 struct callback_msg_data callback;
368 struct winevent_msg_data winevent;
369 } message_data_t;
371 /* structure for console char/attribute info */
372 typedef struct
374 WCHAR ch;
375 unsigned short attr;
376 } char_info_t;
378 /* structure returned in filesystem events */
379 struct filesystem_event
381 int action;
382 data_size_t len;
383 char name[1];
386 typedef struct
388 unsigned int low_part;
389 int high_part;
390 } luid_t;
392 #define MAX_ACL_LEN 65535
394 struct security_descriptor
396 unsigned int control; /* SE_ flags */
397 data_size_t owner_len;
398 data_size_t group_len;
399 data_size_t sacl_len;
400 data_size_t dacl_len;
401 /* VARARG(owner,SID); */
402 /* VARARG(group,SID); */
403 /* VARARG(sacl,ACL); */
404 /* VARARG(dacl,ACL); */
407 struct object_attributes
409 obj_handle_t rootdir; /* root directory */
410 data_size_t sd_len; /* length of security_descriptor data. may be 0 */
411 data_size_t name_len; /* length of the name string. may be 0 */
412 /* VARARG(sd,security_descriptor); */
413 /* VARARG(name,unicode_str); */
416 struct token_groups
418 unsigned int count;
419 /* unsigned int attributes[count]; */
420 /* VARARG(sids,SID); */
423 enum select_op
425 SELECT_NONE,
426 SELECT_WAIT,
427 SELECT_WAIT_ALL,
428 SELECT_SIGNAL_AND_WAIT,
429 SELECT_KEYED_EVENT_WAIT,
430 SELECT_KEYED_EVENT_RELEASE
433 typedef union
435 enum select_op op;
436 struct
438 enum select_op op; /* SELECT_WAIT or SELECT_WAIT_ALL */
439 obj_handle_t handles[MAXIMUM_WAIT_OBJECTS];
440 } wait;
441 struct
443 enum select_op op; /* SELECT_SIGNAL_AND_WAIT */
444 obj_handle_t wait;
445 obj_handle_t signal; /* must be last in the structure so we can remove it on retries */
446 } signal_and_wait;
447 struct
449 enum select_op op; /* SELECT_KEYED_EVENT_WAIT or SELECT_KEYED_EVENT_RELEASE */
450 obj_handle_t handle;
451 client_ptr_t key;
452 } keyed_event;
453 } select_op_t;
455 enum apc_type
457 APC_NONE,
458 APC_USER,
459 APC_TIMER,
460 APC_ASYNC_IO,
461 APC_VIRTUAL_ALLOC,
462 APC_VIRTUAL_FREE,
463 APC_VIRTUAL_QUERY,
464 APC_VIRTUAL_PROTECT,
465 APC_VIRTUAL_FLUSH,
466 APC_VIRTUAL_LOCK,
467 APC_VIRTUAL_UNLOCK,
468 APC_MAP_VIEW,
469 APC_UNMAP_VIEW,
470 APC_CREATE_THREAD
473 typedef union
475 enum apc_type type;
476 struct
478 enum apc_type type; /* APC_USER */
479 int __pad;
480 client_ptr_t func; /* void (__stdcall *func)(ULONG_PTR,ULONG_PTR,ULONG_PTR); */
481 apc_param_t args[3]; /* arguments for user function */
482 } user;
483 struct
485 enum apc_type type; /* APC_TIMER */
486 int __pad;
487 client_ptr_t func; /* void (__stdcall *func)(void*, unsigned int, unsigned int); */
488 timeout_t time; /* absolute time of expiration */
489 client_ptr_t arg; /* user argument */
490 } timer;
491 struct
493 enum apc_type type; /* APC_ASYNC_IO */
494 unsigned int status; /* I/O status */
495 client_ptr_t func; /* unsigned int (*func)(void*, void*, unsigned int, void **); */
496 client_ptr_t user; /* user pointer */
497 client_ptr_t sb; /* status block */
498 } async_io;
499 struct
501 enum apc_type type; /* APC_VIRTUAL_ALLOC */
502 unsigned int op_type; /* type of operation */
503 client_ptr_t addr; /* requested address */
504 mem_size_t size; /* allocation size */
505 unsigned int zero_bits; /* allocation alignment */
506 unsigned int prot; /* memory protection flags */
507 } virtual_alloc;
508 struct
510 enum apc_type type; /* APC_VIRTUAL_FREE */
511 unsigned int op_type; /* type of operation */
512 client_ptr_t addr; /* requested address */
513 mem_size_t size; /* allocation size */
514 } virtual_free;
515 struct
517 enum apc_type type; /* APC_VIRTUAL_QUERY */
518 int __pad;
519 client_ptr_t addr; /* requested address */
520 } virtual_query;
521 struct
523 enum apc_type type; /* APC_VIRTUAL_PROTECT */
524 unsigned int prot; /* new protection flags */
525 client_ptr_t addr; /* requested address */
526 mem_size_t size; /* requested size */
527 } virtual_protect;
528 struct
530 enum apc_type type; /* APC_VIRTUAL_FLUSH */
531 int __pad;
532 client_ptr_t addr; /* requested address */
533 mem_size_t size; /* requested size */
534 } virtual_flush;
535 struct
537 enum apc_type type; /* APC_VIRTUAL_LOCK */
538 int __pad;
539 client_ptr_t addr; /* requested address */
540 mem_size_t size; /* requested size */
541 } virtual_lock;
542 struct
544 enum apc_type type; /* APC_VIRTUAL_UNLOCK */
545 int __pad;
546 client_ptr_t addr; /* requested address */
547 mem_size_t size; /* requested size */
548 } virtual_unlock;
549 struct
551 enum apc_type type; /* APC_MAP_VIEW */
552 obj_handle_t handle; /* mapping handle */
553 client_ptr_t addr; /* requested address */
554 mem_size_t size; /* allocation size */
555 file_pos_t offset; /* file offset */
556 unsigned int alloc_type;/* allocation type */
557 unsigned short zero_bits; /* allocation alignment */
558 unsigned short prot; /* memory protection flags */
559 } map_view;
560 struct
562 enum apc_type type; /* APC_UNMAP_VIEW */
563 int __pad;
564 client_ptr_t addr; /* view address */
565 } unmap_view;
566 struct
568 enum apc_type type; /* APC_CREATE_THREAD */
569 int suspend; /* suspended thread? */
570 client_ptr_t func; /* void (__stdcall *func)(void*); start function */
571 client_ptr_t arg; /* argument for start function */
572 mem_size_t reserve; /* reserve size for thread stack */
573 mem_size_t commit; /* commit size for thread stack */
574 } create_thread;
575 } apc_call_t;
577 typedef union
579 enum apc_type type;
580 struct
582 enum apc_type type; /* APC_ASYNC_IO */
583 unsigned int status; /* new status of async operation */
584 client_ptr_t apc; /* user APC to call */
585 unsigned int total; /* bytes transferred */
586 } async_io;
587 struct
589 enum apc_type type; /* APC_VIRTUAL_ALLOC */
590 unsigned int status; /* status returned by call */
591 client_ptr_t addr; /* resulting address */
592 mem_size_t size; /* resulting size */
593 } virtual_alloc;
594 struct
596 enum apc_type type; /* APC_VIRTUAL_FREE */
597 unsigned int status; /* status returned by call */
598 client_ptr_t addr; /* resulting address */
599 mem_size_t size; /* resulting size */
600 } virtual_free;
601 struct
603 enum apc_type type; /* APC_VIRTUAL_QUERY */
604 unsigned int status; /* status returned by call */
605 client_ptr_t base; /* resulting base address */
606 client_ptr_t alloc_base;/* resulting allocation base */
607 mem_size_t size; /* resulting region size */
608 unsigned short state; /* resulting region state */
609 unsigned short prot; /* resulting region protection */
610 unsigned short alloc_prot;/* resulting allocation protection */
611 unsigned short alloc_type;/* resulting region allocation type */
612 } virtual_query;
613 struct
615 enum apc_type type; /* APC_VIRTUAL_PROTECT */
616 unsigned int status; /* status returned by call */
617 client_ptr_t addr; /* resulting address */
618 mem_size_t size; /* resulting size */
619 unsigned int prot; /* old protection flags */
620 } virtual_protect;
621 struct
623 enum apc_type type; /* APC_VIRTUAL_FLUSH */
624 unsigned int status; /* status returned by call */
625 client_ptr_t addr; /* resulting address */
626 mem_size_t size; /* resulting size */
627 } virtual_flush;
628 struct
630 enum apc_type type; /* APC_VIRTUAL_LOCK */
631 unsigned int status; /* status returned by call */
632 client_ptr_t addr; /* resulting address */
633 mem_size_t size; /* resulting size */
634 } virtual_lock;
635 struct
637 enum apc_type type; /* APC_VIRTUAL_UNLOCK */
638 unsigned int status; /* status returned by call */
639 client_ptr_t addr; /* resulting address */
640 mem_size_t size; /* resulting size */
641 } virtual_unlock;
642 struct
644 enum apc_type type; /* APC_MAP_VIEW */
645 unsigned int status; /* status returned by call */
646 client_ptr_t addr; /* resulting address */
647 mem_size_t size; /* resulting size */
648 } map_view;
649 struct
651 enum apc_type type; /* APC_MAP_VIEW */
652 unsigned int status; /* status returned by call */
653 } unmap_view;
654 struct
656 enum apc_type type; /* APC_CREATE_THREAD */
657 unsigned int status; /* status returned by call */
658 thread_id_t tid; /* thread id */
659 obj_handle_t handle; /* handle to new thread */
660 } create_thread;
661 } apc_result_t;
663 struct rawinput_device
665 unsigned short usage_page;
666 unsigned short usage;
667 unsigned int flags;
668 user_handle_t target;
671 /****************************************************************/
672 /* Request declarations */
674 /* Create a new process from the context of the parent */
675 @REQ(new_process)
676 int inherit_all; /* inherit all handles from parent */
677 unsigned int create_flags; /* creation flags */
678 int socket_fd; /* file descriptor for process socket */
679 obj_handle_t exe_file; /* file handle for main exe */
680 unsigned int process_access; /* access rights for process object */
681 unsigned int process_attr; /* attributes for process object */
682 unsigned int thread_access; /* access rights for thread object */
683 unsigned int thread_attr; /* attributes for thread object */
684 data_size_t info_size; /* size of startup info */
685 VARARG(info,startup_info,info_size); /* startup information */
686 VARARG(env,unicode_str); /* environment for new process */
687 @REPLY
688 obj_handle_t info; /* new process info handle */
689 process_id_t pid; /* process id */
690 obj_handle_t phandle; /* process handle (in the current process) */
691 thread_id_t tid; /* thread id */
692 obj_handle_t thandle; /* thread handle (in the current process) */
693 @END
696 /* Retrieve information about a newly started process */
697 @REQ(get_new_process_info)
698 obj_handle_t info; /* info handle returned from new_process_request */
699 @REPLY
700 int success; /* did the process start successfully? */
701 int exit_code; /* process exit code if failed */
702 @END
705 /* Create a new thread from the context of the parent */
706 @REQ(new_thread)
707 unsigned int access; /* wanted access rights */
708 unsigned int attributes; /* object attributes */
709 int suspend; /* new thread should be suspended on creation */
710 int request_fd; /* fd for request pipe */
711 @REPLY
712 thread_id_t tid; /* thread id */
713 obj_handle_t handle; /* thread handle (in the current process) */
714 @END
717 /* Retrieve the new process startup info */
718 @REQ(get_startup_info)
719 @REPLY
720 obj_handle_t exe_file; /* file handle for main exe */
721 data_size_t info_size; /* size of startup info */
722 VARARG(info,startup_info,info_size); /* startup information */
723 VARARG(env,unicode_str); /* environment */
724 @END
727 /* Signal the end of the process initialization */
728 @REQ(init_process_done)
729 int gui; /* is it a GUI process? */
730 mod_handle_t module; /* main module base address */
731 client_ptr_t ldt_copy; /* address of LDT copy (in thread address space) */
732 client_ptr_t entry; /* process entry point */
733 @END
736 /* Initialize a thread; called from the child after fork()/clone() */
737 @REQ(init_thread)
738 int unix_pid; /* Unix pid of new thread */
739 int unix_tid; /* Unix tid of new thread */
740 int debug_level; /* new debug level */
741 client_ptr_t teb; /* TEB of new thread (in thread address space) */
742 client_ptr_t entry; /* entry point or PEB if initial thread (in thread address space) */
743 int reply_fd; /* fd for reply pipe */
744 int wait_fd; /* fd for blocking calls pipe */
745 cpu_type_t cpu; /* CPU that this thread is running on */
746 @REPLY
747 process_id_t pid; /* process id of the new thread's process */
748 thread_id_t tid; /* thread id of the new thread */
749 timeout_t server_start; /* server start time */
750 data_size_t info_size; /* total size of startup info */
751 int version; /* protocol version */
752 unsigned int all_cpus; /* bitset of supported CPUs */
753 @END
756 /* Terminate a process */
757 @REQ(terminate_process)
758 obj_handle_t handle; /* process handle to terminate */
759 int exit_code; /* process exit code */
760 @REPLY
761 int self; /* suicide? */
762 @END
765 /* Terminate a thread */
766 @REQ(terminate_thread)
767 obj_handle_t handle; /* thread handle to terminate */
768 int exit_code; /* thread exit code */
769 @REPLY
770 int self; /* suicide? */
771 int last; /* last thread in this process? */
772 @END
775 /* Retrieve information about a process */
776 @REQ(get_process_info)
777 obj_handle_t handle; /* process handle */
778 @REPLY
779 process_id_t pid; /* server process id */
780 process_id_t ppid; /* server process id of parent */
781 affinity_t affinity; /* process affinity mask */
782 client_ptr_t peb; /* PEB address in process address space */
783 timeout_t start_time; /* process start time */
784 timeout_t end_time; /* process end time */
785 int exit_code; /* process exit code */
786 int priority; /* priority class */
787 cpu_type_t cpu; /* CPU that this process is running on */
788 int debugger_present; /* process is being debugged */
789 @END
792 /* Set a process information */
793 @REQ(set_process_info)
794 obj_handle_t handle; /* process handle */
795 int mask; /* setting mask (see below) */
796 int priority; /* priority class */
797 affinity_t affinity; /* affinity mask */
798 @END
799 #define SET_PROCESS_INFO_PRIORITY 0x01
800 #define SET_PROCESS_INFO_AFFINITY 0x02
803 /* Retrieve information about a thread */
804 @REQ(get_thread_info)
805 obj_handle_t handle; /* thread handle */
806 thread_id_t tid_in; /* thread id (optional) */
807 @REPLY
808 process_id_t pid; /* server process id */
809 thread_id_t tid; /* server thread id */
810 client_ptr_t teb; /* thread teb pointer */
811 affinity_t affinity; /* thread affinity mask */
812 timeout_t creation_time; /* thread creation time */
813 timeout_t exit_time; /* thread exit time */
814 int exit_code; /* thread exit code */
815 int priority; /* thread priority level */
816 int last; /* last thread in process */
817 @END
820 /* Set a thread information */
821 @REQ(set_thread_info)
822 obj_handle_t handle; /* thread handle */
823 int mask; /* setting mask (see below) */
824 int priority; /* priority class */
825 affinity_t affinity; /* affinity mask */
826 obj_handle_t token; /* impersonation token */
827 @END
828 #define SET_THREAD_INFO_PRIORITY 0x01
829 #define SET_THREAD_INFO_AFFINITY 0x02
830 #define SET_THREAD_INFO_TOKEN 0x04
833 /* Retrieve information about a module */
834 @REQ(get_dll_info)
835 obj_handle_t handle; /* process handle */
836 mod_handle_t base_address; /* base address of module */
837 @REPLY
838 client_ptr_t entry_point;
839 data_size_t size; /* module size */
840 data_size_t filename_len; /* buffer len in bytes required to store filename */
841 VARARG(filename,unicode_str); /* file name of module */
842 @END
845 /* Suspend a thread */
846 @REQ(suspend_thread)
847 obj_handle_t handle; /* thread handle */
848 @REPLY
849 int count; /* new suspend count */
850 @END
853 /* Resume a thread */
854 @REQ(resume_thread)
855 obj_handle_t handle; /* thread handle */
856 @REPLY
857 int count; /* new suspend count */
858 @END
861 /* Notify the server that a dll has been loaded */
862 @REQ(load_dll)
863 obj_handle_t mapping; /* file mapping handle */
864 mod_handle_t base; /* base address */
865 client_ptr_t name; /* ptr to ptr to name (in process addr space) */
866 data_size_t size; /* dll size */
867 int dbg_offset; /* debug info offset */
868 int dbg_size; /* debug info size */
869 VARARG(filename,unicode_str); /* file name of dll */
870 @END
873 /* Notify the server that a dll is being unloaded */
874 @REQ(unload_dll)
875 mod_handle_t base; /* base address */
876 @END
879 /* Queue an APC for a thread or process */
880 @REQ(queue_apc)
881 obj_handle_t handle; /* thread or process handle */
882 apc_call_t call; /* call arguments */
883 @REPLY
884 obj_handle_t handle; /* APC handle */
885 int self; /* run APC in caller itself? */
886 @END
889 /* Get the result of an APC call */
890 @REQ(get_apc_result)
891 obj_handle_t handle; /* handle to the APC */
892 @REPLY
893 apc_result_t result; /* result of the APC */
894 @END
897 /* Close a handle for the current process */
898 @REQ(close_handle)
899 obj_handle_t handle; /* handle to close */
900 @END
903 /* Set a handle information */
904 @REQ(set_handle_info)
905 obj_handle_t handle; /* handle we are interested in */
906 int flags; /* new handle flags */
907 int mask; /* mask for flags to set */
908 @REPLY
909 int old_flags; /* old flag value */
910 @END
913 /* Duplicate a handle */
914 @REQ(dup_handle)
915 obj_handle_t src_process; /* src process handle */
916 obj_handle_t src_handle; /* src handle to duplicate */
917 obj_handle_t dst_process; /* dst process handle */
918 unsigned int access; /* wanted access rights */
919 unsigned int attributes; /* object attributes */
920 unsigned int options; /* duplicate options (see below) */
921 @REPLY
922 obj_handle_t handle; /* duplicated handle in dst process */
923 int self; /* is the source the current process? */
924 int closed; /* whether the source handle has been closed */
925 @END
926 #define DUP_HANDLE_CLOSE_SOURCE DUPLICATE_CLOSE_SOURCE
927 #define DUP_HANDLE_SAME_ACCESS DUPLICATE_SAME_ACCESS
928 #define DUP_HANDLE_MAKE_GLOBAL 0x80000000 /* Not a Windows flag */
931 /* Open a handle to a process */
932 @REQ(open_process)
933 process_id_t pid; /* process id to open */
934 unsigned int access; /* wanted access rights */
935 unsigned int attributes; /* object attributes */
936 @REPLY
937 obj_handle_t handle; /* handle to the process */
938 @END
941 /* Open a handle to a thread */
942 @REQ(open_thread)
943 thread_id_t tid; /* thread id to open */
944 unsigned int access; /* wanted access rights */
945 unsigned int attributes; /* object attributes */
946 @REPLY
947 obj_handle_t handle; /* handle to the thread */
948 @END
951 /* Wait for handles */
952 @REQ(select)
953 int flags; /* wait flags (see below) */
954 client_ptr_t cookie; /* magic cookie to return to client */
955 timeout_t timeout; /* timeout */
956 obj_handle_t prev_apc; /* handle to previous APC */
957 VARARG(result,apc_result); /* result of previous APC */
958 VARARG(data,select_op); /* operation-specific data */
959 @REPLY
960 timeout_t timeout; /* timeout converted to absolute */
961 apc_call_t call; /* APC call arguments */
962 obj_handle_t apc_handle; /* handle to next APC */
963 @END
964 #define SELECT_ALERTABLE 1
965 #define SELECT_INTERRUPTIBLE 2
968 /* Create an event */
969 @REQ(create_event)
970 unsigned int access; /* wanted access rights */
971 unsigned int attributes; /* object attributes */
972 int manual_reset; /* manual reset event */
973 int initial_state; /* initial state of the event */
974 VARARG(objattr,object_attributes); /* object attributes */
975 @REPLY
976 obj_handle_t handle; /* handle to the event */
977 @END
979 /* Event operation */
980 @REQ(event_op)
981 obj_handle_t handle; /* handle to event */
982 int op; /* event operation (see below) */
983 @END
984 enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT };
986 @REQ(query_event)
987 obj_handle_t handle; /* handle to event */
988 @REPLY
989 int manual_reset; /* manual reset event */
990 int state; /* current state of the event */
991 @END
993 /* Open an event */
994 @REQ(open_event)
995 unsigned int access; /* wanted access rights */
996 unsigned int attributes; /* object attributes */
997 obj_handle_t rootdir; /* root directory */
998 VARARG(name,unicode_str); /* object name */
999 @REPLY
1000 obj_handle_t handle; /* handle to the event */
1001 @END
1004 /* Create a keyed event */
1005 @REQ(create_keyed_event)
1006 unsigned int access; /* wanted access rights */
1007 unsigned int attributes; /* object attributes */
1008 VARARG(objattr,object_attributes); /* object attributes */
1009 @REPLY
1010 obj_handle_t handle; /* handle to the event */
1011 @END
1013 /* Open a keyed event */
1014 @REQ(open_keyed_event)
1015 unsigned int access; /* wanted access rights */
1016 unsigned int attributes; /* object attributes */
1017 obj_handle_t rootdir; /* root directory */
1018 VARARG(name,unicode_str); /* object name */
1019 @REPLY
1020 obj_handle_t handle; /* handle to the event */
1021 @END
1024 /* Create a mutex */
1025 @REQ(create_mutex)
1026 unsigned int access; /* wanted access rights */
1027 unsigned int attributes; /* object attributes */
1028 int owned; /* initially owned? */
1029 VARARG(objattr,object_attributes); /* object attributes */
1030 @REPLY
1031 obj_handle_t handle; /* handle to the mutex */
1032 @END
1035 /* Release a mutex */
1036 @REQ(release_mutex)
1037 obj_handle_t handle; /* handle to the mutex */
1038 @REPLY
1039 unsigned int prev_count; /* value of internal counter, before release */
1040 @END
1043 /* Open a mutex */
1044 @REQ(open_mutex)
1045 unsigned int access; /* wanted access rights */
1046 unsigned int attributes; /* object attributes */
1047 obj_handle_t rootdir; /* root directory */
1048 VARARG(name,unicode_str); /* object name */
1049 @REPLY
1050 obj_handle_t handle; /* handle to the mutex */
1051 @END
1054 /* Create a semaphore */
1055 @REQ(create_semaphore)
1056 unsigned int access; /* wanted access rights */
1057 unsigned int attributes; /* object attributes */
1058 unsigned int initial; /* initial count */
1059 unsigned int max; /* maximum count */
1060 VARARG(objattr,object_attributes); /* object attributes */
1061 @REPLY
1062 obj_handle_t handle; /* handle to the semaphore */
1063 @END
1066 /* Release a semaphore */
1067 @REQ(release_semaphore)
1068 obj_handle_t handle; /* handle to the semaphore */
1069 unsigned int count; /* count to add to semaphore */
1070 @REPLY
1071 unsigned int prev_count; /* previous semaphore count */
1072 @END
1075 /* Open a semaphore */
1076 @REQ(open_semaphore)
1077 unsigned int access; /* wanted access rights */
1078 unsigned int attributes; /* object attributes */
1079 obj_handle_t rootdir; /* root directory */
1080 VARARG(name,unicode_str); /* object name */
1081 @REPLY
1082 obj_handle_t handle; /* handle to the semaphore */
1083 @END
1086 /* Create a file */
1087 @REQ(create_file)
1088 unsigned int access; /* wanted access rights */
1089 unsigned int attributes; /* object attributes */
1090 unsigned int sharing; /* sharing flags */
1091 int create; /* file create action */
1092 unsigned int options; /* file options */
1093 unsigned int attrs; /* file attributes for creation */
1094 VARARG(objattr,object_attributes); /* object attributes */
1095 VARARG(filename,string); /* file name */
1096 @REPLY
1097 obj_handle_t handle; /* handle to the file */
1098 @END
1101 /* Open a file object */
1102 @REQ(open_file_object)
1103 unsigned int access; /* wanted access rights */
1104 unsigned int attributes; /* open attributes */
1105 obj_handle_t rootdir; /* root directory */
1106 unsigned int sharing; /* sharing flags */
1107 unsigned int options; /* file options */
1108 VARARG(filename,unicode_str); /* file name */
1109 @REPLY
1110 obj_handle_t handle; /* handle to the file */
1111 @END
1114 /* Allocate a file handle for a Unix fd */
1115 @REQ(alloc_file_handle)
1116 unsigned int access; /* wanted access rights */
1117 unsigned int attributes; /* object attributes */
1118 int fd; /* file descriptor on the client side */
1119 @REPLY
1120 obj_handle_t handle; /* handle to the file */
1121 @END
1124 /* Get the Unix name from a file handle */
1125 @REQ(get_handle_unix_name)
1126 obj_handle_t handle; /* file handle */
1127 @REPLY
1128 data_size_t name_len; /* unix name length */
1129 VARARG(name,string); /* unix name */
1130 @END
1133 /* Get a Unix fd to access a file */
1134 @REQ(get_handle_fd)
1135 obj_handle_t handle; /* handle to the file */
1136 @REPLY
1137 int type; /* file type (see below) */
1138 int cacheable; /* can fd be cached in the client? */
1139 unsigned int access; /* file access rights */
1140 unsigned int options; /* file open options */
1141 @END
1142 enum server_fd_type
1144 FD_TYPE_INVALID, /* invalid file (no associated fd) */
1145 FD_TYPE_FILE, /* regular file */
1146 FD_TYPE_DIR, /* directory */
1147 FD_TYPE_SOCKET, /* socket */
1148 FD_TYPE_SERIAL, /* serial port */
1149 FD_TYPE_PIPE, /* named pipe */
1150 FD_TYPE_MAILSLOT, /* mailslot */
1151 FD_TYPE_CHAR, /* unspecified char device */
1152 FD_TYPE_DEVICE, /* Windows device file */
1153 FD_TYPE_NB_TYPES
1157 /* Flush a file buffers */
1158 @REQ(flush_file)
1159 obj_handle_t handle; /* handle to the file */
1160 @REPLY
1161 obj_handle_t event; /* event set when finished */
1162 @END
1165 /* Lock a region of a file */
1166 @REQ(lock_file)
1167 obj_handle_t handle; /* handle to the file */
1168 file_pos_t offset; /* offset of start of lock */
1169 file_pos_t count; /* count of bytes to lock */
1170 int shared; /* shared or exclusive lock? */
1171 int wait; /* do we want to wait? */
1172 @REPLY
1173 obj_handle_t handle; /* handle to wait on */
1174 int overlapped; /* is it an overlapped I/O handle? */
1175 @END
1178 /* Unlock a region of a file */
1179 @REQ(unlock_file)
1180 obj_handle_t handle; /* handle to the file */
1181 file_pos_t offset; /* offset of start of unlock */
1182 file_pos_t count; /* count of bytes to unlock */
1183 @END
1186 /* Create a socket */
1187 @REQ(create_socket)
1188 unsigned int access; /* wanted access rights */
1189 unsigned int attributes; /* object attributes */
1190 int family; /* family, see socket manpage */
1191 int type; /* type, see socket manpage */
1192 int protocol; /* protocol, see socket manpage */
1193 unsigned int flags; /* socket flags */
1194 @REPLY
1195 obj_handle_t handle; /* handle to the new socket */
1196 @END
1199 /* Accept a socket */
1200 @REQ(accept_socket)
1201 obj_handle_t lhandle; /* handle to the listening socket */
1202 unsigned int access; /* wanted access rights */
1203 unsigned int attributes; /* object attributes */
1204 @REPLY
1205 obj_handle_t handle; /* handle to the new socket */
1206 @END
1209 /* Accept into an initialized socket */
1210 @REQ(accept_into_socket)
1211 obj_handle_t lhandle; /* handle to the listening socket */
1212 obj_handle_t ahandle; /* handle to the accepting socket */
1213 @END
1216 /* Set socket event parameters */
1217 @REQ(set_socket_event)
1218 obj_handle_t handle; /* handle to the socket */
1219 unsigned int mask; /* event mask */
1220 obj_handle_t event; /* event object */
1221 user_handle_t window; /* window to send the message to */
1222 unsigned int msg; /* message to send */
1223 @END
1226 /* Get socket event parameters */
1227 @REQ(get_socket_event)
1228 obj_handle_t handle; /* handle to the socket */
1229 int service; /* clear pending? */
1230 obj_handle_t c_event; /* event to clear */
1231 @REPLY
1232 unsigned int mask; /* event mask */
1233 unsigned int pmask; /* pending events */
1234 unsigned int state; /* status bits */
1235 VARARG(errors,ints); /* event errors */
1236 @END
1239 /* Get socket info */
1240 @REQ(get_socket_info)
1241 obj_handle_t handle; /* handle to the socket */
1242 @REPLY
1243 int family; /* family, see socket manpage */
1244 int type; /* type, see socket manpage */
1245 int protocol; /* protocol, see socket manpage */
1246 @END
1249 /* Re-enable pending socket events */
1250 @REQ(enable_socket_event)
1251 obj_handle_t handle; /* handle to the socket */
1252 unsigned int mask; /* events to re-enable */
1253 unsigned int sstate; /* status bits to set */
1254 unsigned int cstate; /* status bits to clear */
1255 @END
1257 @REQ(set_socket_deferred)
1258 obj_handle_t handle; /* handle to the socket */
1259 obj_handle_t deferred; /* handle to the socket for which accept() is deferred */
1260 @END
1262 /* Allocate a console (only used by a console renderer) */
1263 @REQ(alloc_console)
1264 unsigned int access; /* wanted access rights */
1265 unsigned int attributes; /* object attributes */
1266 process_id_t pid; /* pid of process which shall be attached to the console */
1267 int input_fd; /* if pid=-1 (bare console to current process), fd for input */
1268 @REPLY
1269 obj_handle_t handle_in; /* handle to console input */
1270 obj_handle_t event; /* handle to renderer events change notification */
1271 @END
1274 /* Free the console of the current process */
1275 @REQ(free_console)
1276 @END
1279 #define CONSOLE_RENDERER_NONE_EVENT 0x00
1280 #define CONSOLE_RENDERER_TITLE_EVENT 0x01
1281 #define CONSOLE_RENDERER_ACTIVE_SB_EVENT 0x02
1282 #define CONSOLE_RENDERER_SB_RESIZE_EVENT 0x03
1283 #define CONSOLE_RENDERER_UPDATE_EVENT 0x04
1284 #define CONSOLE_RENDERER_CURSOR_POS_EVENT 0x05
1285 #define CONSOLE_RENDERER_CURSOR_GEOM_EVENT 0x06
1286 #define CONSOLE_RENDERER_DISPLAY_EVENT 0x07
1287 #define CONSOLE_RENDERER_EXIT_EVENT 0x08
1288 struct console_renderer_event
1290 short event;
1291 union
1293 struct update
1295 short top;
1296 short bottom;
1297 } update;
1298 struct resize
1300 short width;
1301 short height;
1302 } resize;
1303 struct cursor_pos
1305 short x;
1306 short y;
1307 } cursor_pos;
1308 struct cursor_geom
1310 short visible;
1311 short size;
1312 } cursor_geom;
1313 struct display
1315 short left;
1316 short top;
1317 short width;
1318 short height;
1319 } display;
1320 } u;
1323 /* retrieve console events for the renderer */
1324 @REQ(get_console_renderer_events)
1325 obj_handle_t handle; /* handle to console input events */
1326 @REPLY
1327 VARARG(data,bytes); /* the various console_renderer_events */
1328 @END
1331 /* Open a handle to the process console */
1332 @REQ(open_console)
1333 obj_handle_t from; /* 0 (resp 1) input (resp output) of current process console */
1334 /* otherwise console_in handle to get active screen buffer? */
1335 unsigned int access; /* wanted access rights */
1336 unsigned int attributes; /* object attributes */
1337 int share; /* share mask (only for output handles) */
1338 @REPLY
1339 obj_handle_t handle; /* handle to the console */
1340 @END
1343 /* Get the input queue wait event */
1344 @REQ(get_console_wait_event)
1345 @REPLY
1346 obj_handle_t handle;
1347 @END
1349 /* Get a console mode (input or output) */
1350 @REQ(get_console_mode)
1351 obj_handle_t handle; /* handle to the console */
1352 @REPLY
1353 int mode; /* console mode */
1354 @END
1357 /* Set a console mode (input or output) */
1358 @REQ(set_console_mode)
1359 obj_handle_t handle; /* handle to the console */
1360 int mode; /* console mode */
1361 @END
1364 /* Set info about a console (input only) */
1365 @REQ(set_console_input_info)
1366 obj_handle_t handle; /* handle to console input, or 0 for process' console */
1367 int mask; /* setting mask (see below) */
1368 obj_handle_t active_sb; /* active screen buffer */
1369 int history_mode; /* whether we duplicate lines in history */
1370 int history_size; /* number of lines in history */
1371 int edition_mode; /* index to the edition mode flavors */
1372 int input_cp; /* console input codepage */
1373 int output_cp; /* console output codepage */
1374 user_handle_t win; /* console window if backend supports it */
1375 VARARG(title,unicode_str); /* console title */
1376 @END
1377 #define SET_CONSOLE_INPUT_INFO_ACTIVE_SB 0x01
1378 #define SET_CONSOLE_INPUT_INFO_TITLE 0x02
1379 #define SET_CONSOLE_INPUT_INFO_HISTORY_MODE 0x04
1380 #define SET_CONSOLE_INPUT_INFO_HISTORY_SIZE 0x08
1381 #define SET_CONSOLE_INPUT_INFO_EDITION_MODE 0x10
1382 #define SET_CONSOLE_INPUT_INFO_INPUT_CODEPAGE 0x20
1383 #define SET_CONSOLE_INPUT_INFO_OUTPUT_CODEPAGE 0x40
1384 #define SET_CONSOLE_INPUT_INFO_WIN 0x80
1387 /* Get info about a console (input only) */
1388 @REQ(get_console_input_info)
1389 obj_handle_t handle; /* handle to console input, or 0 for process' console */
1390 @REPLY
1391 int history_mode; /* whether we duplicate lines in history */
1392 int history_size; /* number of lines in history */
1393 int history_index; /* number of used lines in history */
1394 int edition_mode; /* index to the edition mode flavors */
1395 int input_cp; /* console input codepage */
1396 int output_cp; /* console output codepage */
1397 user_handle_t win; /* console window if backend supports it */
1398 VARARG(title,unicode_str); /* console title */
1399 @END
1402 /* appends a string to console's history */
1403 @REQ(append_console_input_history)
1404 obj_handle_t handle; /* handle to console input, or 0 for process' console */
1405 VARARG(line,unicode_str); /* line to add */
1406 @END
1409 /* appends a string to console's history */
1410 @REQ(get_console_input_history)
1411 obj_handle_t handle; /* handle to console input, or 0 for process' console */
1412 int index; /* index to get line from */
1413 @REPLY
1414 int total; /* total length of line in Unicode chars */
1415 VARARG(line,unicode_str); /* line to add */
1416 @END
1419 /* creates a new screen buffer on process' console */
1420 @REQ(create_console_output)
1421 obj_handle_t handle_in; /* handle to console input, or 0 for process' console */
1422 unsigned int access; /* wanted access rights */
1423 unsigned int attributes; /* object attributes */
1424 unsigned int share; /* sharing credentials */
1425 int fd; /* for bare consoles, fd the screen-buffer is attached to */
1426 @REPLY
1427 obj_handle_t handle_out; /* handle to the screen buffer */
1428 @END
1431 /* Set info about a console (output only) */
1432 @REQ(set_console_output_info)
1433 obj_handle_t handle; /* handle to the console */
1434 int mask; /* setting mask (see below) */
1435 short int cursor_size; /* size of cursor (percentage filled) */
1436 short int cursor_visible;/* cursor visibility flag */
1437 short int cursor_x; /* position of cursor (x, y) */
1438 short int cursor_y;
1439 short int width; /* width of the screen buffer */
1440 short int height; /* height of the screen buffer */
1441 short int attr; /* default attribute */
1442 short int win_left; /* window actually displayed by renderer */
1443 short int win_top; /* the rect area is expressed within the */
1444 short int win_right; /* boundaries of the screen buffer */
1445 short int win_bottom;
1446 short int max_width; /* maximum size (width x height) for the window */
1447 short int max_height;
1448 @END
1449 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_GEOM 0x01
1450 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_POS 0x02
1451 #define SET_CONSOLE_OUTPUT_INFO_SIZE 0x04
1452 #define SET_CONSOLE_OUTPUT_INFO_ATTR 0x08
1453 #define SET_CONSOLE_OUTPUT_INFO_DISPLAY_WINDOW 0x10
1454 #define SET_CONSOLE_OUTPUT_INFO_MAX_SIZE 0x20
1457 /* Get info about a console (output only) */
1458 @REQ(get_console_output_info)
1459 obj_handle_t handle; /* handle to the console */
1460 @REPLY
1461 short int cursor_size; /* size of cursor (percentage filled) */
1462 short int cursor_visible;/* cursor visibility flag */
1463 short int cursor_x; /* position of cursor (x, y) */
1464 short int cursor_y;
1465 short int width; /* width of the screen buffer */
1466 short int height; /* height of the screen buffer */
1467 short int attr; /* default attribute */
1468 short int win_left; /* window actually displayed by renderer */
1469 short int win_top; /* the rect area is expressed within the */
1470 short int win_right; /* boundaries of the screen buffer */
1471 short int win_bottom;
1472 short int max_width; /* maximum size (width x height) for the window */
1473 short int max_height;
1474 @END
1476 /* Add input records to a console input queue */
1477 @REQ(write_console_input)
1478 obj_handle_t handle; /* handle to the console input */
1479 VARARG(rec,input_records); /* input records */
1480 @REPLY
1481 int written; /* number of records written */
1482 @END
1485 /* Fetch input records from a console input queue */
1486 @REQ(read_console_input)
1487 obj_handle_t handle; /* handle to the console input */
1488 int flush; /* flush the retrieved records from the queue? */
1489 @REPLY
1490 int read; /* number of records read */
1491 VARARG(rec,input_records); /* input records */
1492 @END
1495 /* write data (chars and/or attributes) in a screen buffer */
1496 @REQ(write_console_output)
1497 obj_handle_t handle; /* handle to the console output */
1498 int x; /* position where to start writing */
1499 int y;
1500 int mode; /* char info (see below) */
1501 int wrap; /* wrap around at end of line? */
1502 VARARG(data,bytes); /* info to write */
1503 @REPLY
1504 int written; /* number of char infos actually written */
1505 int width; /* width of screen buffer */
1506 int height; /* height of screen buffer */
1507 @END
1508 enum char_info_mode
1510 CHAR_INFO_MODE_TEXT, /* characters only */
1511 CHAR_INFO_MODE_ATTR, /* attributes only */
1512 CHAR_INFO_MODE_TEXTATTR, /* both characters and attributes */
1513 CHAR_INFO_MODE_TEXTSTDATTR /* characters but use standard attributes */
1517 /* fill a screen buffer with constant data (chars and/or attributes) */
1518 @REQ(fill_console_output)
1519 obj_handle_t handle; /* handle to the console output */
1520 int x; /* position where to start writing */
1521 int y;
1522 int mode; /* char info mode */
1523 int count; /* number to write */
1524 int wrap; /* wrap around at end of line? */
1525 char_info_t data; /* data to write */
1526 @REPLY
1527 int written; /* number of char infos actually written */
1528 @END
1531 /* read data (chars and/or attributes) from a screen buffer */
1532 @REQ(read_console_output)
1533 obj_handle_t handle; /* handle to the console output */
1534 int x; /* position (x,y) where to start reading */
1535 int y;
1536 int mode; /* char info mode */
1537 int wrap; /* wrap around at end of line? */
1538 @REPLY
1539 int width; /* width of screen buffer */
1540 int height; /* height of screen buffer */
1541 VARARG(data,bytes);
1542 @END
1545 /* move a rect (of data) in screen buffer content */
1546 @REQ(move_console_output)
1547 obj_handle_t handle; /* handle to the console output */
1548 short int x_src; /* position (x, y) of rect to start moving from */
1549 short int y_src;
1550 short int x_dst; /* position (x, y) of rect to move to */
1551 short int y_dst;
1552 short int w; /* size of the rect (width, height) to move */
1553 short int h;
1554 @END
1557 /* Sends a signal to a process group */
1558 @REQ(send_console_signal)
1559 int signal; /* the signal to send */
1560 process_id_t group_id; /* the group to send the signal to */
1561 @END
1564 /* enable directory change notifications */
1565 @REQ(read_directory_changes)
1566 unsigned int filter; /* notification filter */
1567 int subtree; /* watch the subtree? */
1568 int want_data; /* flag indicating whether change data should be collected */
1569 async_data_t async; /* async I/O parameters */
1570 @END
1573 @REQ(read_change)
1574 obj_handle_t handle;
1575 @REPLY
1576 VARARG(events,filesystem_event); /* collected filesystem events */
1577 @END
1580 /* Create a file mapping */
1581 @REQ(create_mapping)
1582 unsigned int access; /* wanted access rights */
1583 unsigned int attributes; /* object attributes */
1584 unsigned int protect; /* protection flags (see below) */
1585 mem_size_t size; /* mapping size */
1586 obj_handle_t file_handle; /* file handle */
1587 VARARG(objattr,object_attributes); /* object attributes */
1588 @REPLY
1589 obj_handle_t handle; /* handle to the mapping */
1590 @END
1591 /* per-page protection flags */
1592 #define VPROT_READ 0x01
1593 #define VPROT_WRITE 0x02
1594 #define VPROT_EXEC 0x04
1595 #define VPROT_WRITECOPY 0x08
1596 #define VPROT_GUARD 0x10
1597 #define VPROT_NOCACHE 0x20
1598 #define VPROT_COMMITTED 0x40
1599 #define VPROT_WRITEWATCH 0x80
1600 /* per-mapping protection flags */
1601 #define VPROT_IMAGE 0x0100 /* mapping for an exe image */
1602 #define VPROT_SYSTEM 0x0200 /* system view (underlying mmap not under our control) */
1603 #define VPROT_VALLOC 0x0400 /* allocated by VirtualAlloc */
1604 #define VPROT_NOEXEC 0x0800 /* don't force exec permission */
1607 /* Open a mapping */
1608 @REQ(open_mapping)
1609 unsigned int access; /* wanted access rights */
1610 unsigned int attributes; /* object attributes */
1611 obj_handle_t rootdir; /* root directory */
1612 VARARG(name,unicode_str); /* object name */
1613 @REPLY
1614 obj_handle_t handle; /* handle to the mapping */
1615 @END
1618 /* Get information about a file mapping */
1619 @REQ(get_mapping_info)
1620 obj_handle_t handle; /* handle to the mapping */
1621 unsigned int access; /* wanted access rights */
1622 @REPLY
1623 mem_size_t size; /* mapping size */
1624 int protect; /* protection flags */
1625 int header_size; /* header size (for VPROT_IMAGE mapping) */
1626 client_ptr_t base; /* default base addr (for VPROT_IMAGE mapping) */
1627 obj_handle_t mapping; /* duplicate mapping handle unless removable */
1628 obj_handle_t shared_file; /* shared mapping file handle */
1629 @END
1632 /* Get a range of committed pages in a file mapping */
1633 @REQ(get_mapping_committed_range)
1634 obj_handle_t handle; /* handle to the mapping */
1635 file_pos_t offset; /* starting offset (page-aligned, in bytes) */
1636 @REPLY
1637 mem_size_t size; /* size of range starting at offset (page-aligned, in bytes) */
1638 int committed; /* whether it is a committed range */
1639 @END
1642 /* Add a range to the committed pages in a file mapping */
1643 @REQ(add_mapping_committed_range)
1644 obj_handle_t handle; /* handle to the mapping */
1645 file_pos_t offset; /* starting offset (page-aligned, in bytes) */
1646 mem_size_t size; /* size to set (page-aligned, in bytes) or 0 if only retrieving */
1647 @END
1650 #define SNAP_PROCESS 0x00000001
1651 #define SNAP_THREAD 0x00000002
1652 /* Create a snapshot */
1653 @REQ(create_snapshot)
1654 unsigned int attributes; /* object attributes */
1655 unsigned int flags; /* snapshot flags (SNAP_*) */
1656 @REPLY
1657 obj_handle_t handle; /* handle to the snapshot */
1658 @END
1661 /* Get the next process from a snapshot */
1662 @REQ(next_process)
1663 obj_handle_t handle; /* handle to the snapshot */
1664 int reset; /* reset snapshot position? */
1665 @REPLY
1666 int count; /* process usage count */
1667 process_id_t pid; /* process id */
1668 process_id_t ppid; /* parent process id */
1669 int threads; /* number of threads */
1670 int priority; /* process priority */
1671 int handles; /* number of handles */
1672 int unix_pid; /* Unix pid */
1673 VARARG(filename,unicode_str); /* file name of main exe */
1674 @END
1677 /* Get the next thread from a snapshot */
1678 @REQ(next_thread)
1679 obj_handle_t handle; /* handle to the snapshot */
1680 int reset; /* reset snapshot position? */
1681 @REPLY
1682 int count; /* thread usage count */
1683 process_id_t pid; /* process id */
1684 thread_id_t tid; /* thread id */
1685 int base_pri; /* base priority */
1686 int delta_pri; /* delta priority */
1687 @END
1690 /* Wait for a debug event */
1691 @REQ(wait_debug_event)
1692 int get_handle; /* should we alloc a handle for waiting? */
1693 @REPLY
1694 process_id_t pid; /* process id */
1695 thread_id_t tid; /* thread id */
1696 obj_handle_t wait; /* wait handle if no event ready */
1697 VARARG(event,debug_event); /* debug event data */
1698 @END
1701 /* Queue an exception event */
1702 @REQ(queue_exception_event)
1703 int first; /* first chance exception? */
1704 unsigned int code; /* exception code */
1705 unsigned int flags; /* exception flags */
1706 client_ptr_t record; /* exception record */
1707 client_ptr_t address; /* exception address */
1708 data_size_t len; /* size of parameters */
1709 VARARG(params,uints64,len);/* exception parameters */
1710 VARARG(context,context); /* thread context */
1711 @REPLY
1712 obj_handle_t handle; /* handle to the queued event */
1713 @END
1716 /* Retrieve the status of an exception event */
1717 @REQ(get_exception_status)
1718 obj_handle_t handle; /* handle to the queued event */
1719 @REPLY
1720 VARARG(context,context); /* modified thread context */
1721 @END
1724 /* Send an output string to the debugger */
1725 @REQ(output_debug_string)
1726 data_size_t length; /* string length */
1727 client_ptr_t string; /* string to display (in debugged process address space) */
1728 @END
1731 /* Continue a debug event */
1732 @REQ(continue_debug_event)
1733 process_id_t pid; /* process id to continue */
1734 thread_id_t tid; /* thread id to continue */
1735 int status; /* continuation status */
1736 @END
1739 /* Start/stop debugging an existing process */
1740 @REQ(debug_process)
1741 process_id_t pid; /* id of the process to debug */
1742 int attach; /* 1=attaching / 0=detaching from the process */
1743 @END
1746 /* Simulate a breakpoint in a process */
1747 @REQ(debug_break)
1748 obj_handle_t handle; /* process handle */
1749 @REPLY
1750 int self; /* was it the caller itself? */
1751 @END
1754 /* Set debugger kill on exit flag */
1755 @REQ(set_debugger_kill_on_exit)
1756 int kill_on_exit; /* 0=detach/1=kill debuggee when debugger dies */
1757 @END
1760 /* Read data from a process address space */
1761 @REQ(read_process_memory)
1762 obj_handle_t handle; /* process handle */
1763 client_ptr_t addr; /* addr to read from */
1764 @REPLY
1765 VARARG(data,bytes); /* result data */
1766 @END
1769 /* Write data to a process address space */
1770 @REQ(write_process_memory)
1771 obj_handle_t handle; /* process handle */
1772 client_ptr_t addr; /* addr to write to */
1773 VARARG(data,bytes); /* data to write */
1774 @END
1777 /* Create a registry key */
1778 @REQ(create_key)
1779 obj_handle_t parent; /* handle to the parent key */
1780 unsigned int access; /* desired access rights */
1781 unsigned int attributes; /* object attributes */
1782 unsigned int options; /* creation options */
1783 data_size_t namelen; /* length of key name in bytes */
1784 VARARG(name,unicode_str,namelen); /* key name */
1785 VARARG(class,unicode_str); /* class name */
1786 @REPLY
1787 obj_handle_t hkey; /* handle to the created key */
1788 int created; /* has it been newly created? */
1789 @END
1791 /* Open a registry key */
1792 @REQ(open_key)
1793 obj_handle_t parent; /* handle to the parent key */
1794 unsigned int access; /* desired access rights */
1795 unsigned int attributes; /* object attributes */
1796 VARARG(name,unicode_str); /* key name */
1797 @REPLY
1798 obj_handle_t hkey; /* handle to the open key */
1799 @END
1802 /* Delete a registry key */
1803 @REQ(delete_key)
1804 obj_handle_t hkey; /* handle to the key */
1805 @END
1808 /* Flush a registry key */
1809 @REQ(flush_key)
1810 obj_handle_t hkey; /* handle to the key */
1811 @END
1814 /* Enumerate registry subkeys */
1815 @REQ(enum_key)
1816 obj_handle_t hkey; /* handle to registry key */
1817 int index; /* index of subkey (or -1 for current key) */
1818 int info_class; /* requested information class */
1819 @REPLY
1820 int subkeys; /* number of subkeys */
1821 int max_subkey; /* longest subkey name */
1822 int max_class; /* longest class name */
1823 int values; /* number of values */
1824 int max_value; /* longest value name */
1825 int max_data; /* longest value data */
1826 timeout_t modif; /* last modification time */
1827 data_size_t total; /* total length needed for full name and class */
1828 data_size_t namelen; /* length of key name in bytes */
1829 VARARG(name,unicode_str,namelen); /* key name */
1830 VARARG(class,unicode_str); /* class name */
1831 @END
1834 /* Set a value of a registry key */
1835 @REQ(set_key_value)
1836 obj_handle_t hkey; /* handle to registry key */
1837 int type; /* value type */
1838 data_size_t namelen; /* length of value name in bytes */
1839 VARARG(name,unicode_str,namelen); /* value name */
1840 VARARG(data,bytes); /* value data */
1841 @END
1844 /* Retrieve the value of a registry key */
1845 @REQ(get_key_value)
1846 obj_handle_t hkey; /* handle to registry key */
1847 VARARG(name,unicode_str); /* value name */
1848 @REPLY
1849 int type; /* value type */
1850 data_size_t total; /* total length needed for data */
1851 VARARG(data,bytes); /* value data */
1852 @END
1855 /* Enumerate a value of a registry key */
1856 @REQ(enum_key_value)
1857 obj_handle_t hkey; /* handle to registry key */
1858 int index; /* value index */
1859 int info_class; /* requested information class */
1860 @REPLY
1861 int type; /* value type */
1862 data_size_t total; /* total length needed for full name and data */
1863 data_size_t namelen; /* length of value name in bytes */
1864 VARARG(name,unicode_str,namelen); /* value name */
1865 VARARG(data,bytes); /* value data */
1866 @END
1869 /* Delete a value of a registry key */
1870 @REQ(delete_key_value)
1871 obj_handle_t hkey; /* handle to registry key */
1872 VARARG(name,unicode_str); /* value name */
1873 @END
1876 /* Load a registry branch from a file */
1877 @REQ(load_registry)
1878 obj_handle_t hkey; /* root key to load to */
1879 obj_handle_t file; /* file to load from */
1880 VARARG(name,unicode_str); /* subkey name */
1881 @END
1884 /* UnLoad a registry branch from a file */
1885 @REQ(unload_registry)
1886 obj_handle_t hkey; /* root key to unload to */
1887 @END
1890 /* Save a registry branch to a file */
1891 @REQ(save_registry)
1892 obj_handle_t hkey; /* key to save */
1893 obj_handle_t file; /* file to save to */
1894 @END
1897 /* Add a registry key change notification */
1898 @REQ(set_registry_notification)
1899 obj_handle_t hkey; /* key to watch for changes */
1900 obj_handle_t event; /* event to set */
1901 int subtree; /* should we watch the whole subtree? */
1902 unsigned int filter; /* things to watch */
1903 @END
1906 /* Create a waitable timer */
1907 @REQ(create_timer)
1908 unsigned int access; /* wanted access rights */
1909 unsigned int attributes; /* object attributes */
1910 obj_handle_t rootdir; /* root directory */
1911 int manual; /* manual reset */
1912 VARARG(name,unicode_str); /* object name */
1913 @REPLY
1914 obj_handle_t handle; /* handle to the timer */
1915 @END
1918 /* Open a waitable timer */
1919 @REQ(open_timer)
1920 unsigned int access; /* wanted access rights */
1921 unsigned int attributes; /* object attributes */
1922 obj_handle_t rootdir; /* root directory */
1923 VARARG(name,unicode_str); /* object name */
1924 @REPLY
1925 obj_handle_t handle; /* handle to the timer */
1926 @END
1928 /* Set a waitable timer */
1929 @REQ(set_timer)
1930 obj_handle_t handle; /* handle to the timer */
1931 timeout_t expire; /* next expiration absolute time */
1932 client_ptr_t callback; /* callback function */
1933 client_ptr_t arg; /* callback argument */
1934 int period; /* timer period in ms */
1935 @REPLY
1936 int signaled; /* was the timer signaled before this call ? */
1937 @END
1939 /* Cancel a waitable timer */
1940 @REQ(cancel_timer)
1941 obj_handle_t handle; /* handle to the timer */
1942 @REPLY
1943 int signaled; /* was the timer signaled before this calltime ? */
1944 @END
1946 /* Get information on a waitable timer */
1947 @REQ(get_timer_info)
1948 obj_handle_t handle; /* handle to the timer */
1949 @REPLY
1950 timeout_t when; /* absolute time when the timer next expires */
1951 int signaled; /* is the timer signaled? */
1952 @END
1955 /* Retrieve the current context of a thread */
1956 @REQ(get_thread_context)
1957 obj_handle_t handle; /* thread handle */
1958 unsigned int flags; /* context flags */
1959 int suspend; /* suspend the thread if needed */
1960 @REPLY
1961 int self; /* was it a handle to the current thread? */
1962 VARARG(context,context); /* thread context */
1963 @END
1966 /* Set the current context of a thread */
1967 @REQ(set_thread_context)
1968 obj_handle_t handle; /* thread handle */
1969 int suspend; /* suspend the thread if needed */
1970 VARARG(context,context); /* thread context */
1971 @REPLY
1972 int self; /* was it a handle to the current thread? */
1973 @END
1976 /* Fetch a selector entry for a thread */
1977 @REQ(get_selector_entry)
1978 obj_handle_t handle; /* thread handle */
1979 int entry; /* LDT entry */
1980 @REPLY
1981 unsigned int base; /* selector base */
1982 unsigned int limit; /* selector limit */
1983 unsigned char flags; /* selector flags */
1984 @END
1987 /* Add an atom */
1988 @REQ(add_atom)
1989 obj_handle_t table; /* which table to add atom to */
1990 VARARG(name,unicode_str); /* atom name */
1991 @REPLY
1992 atom_t atom; /* resulting atom */
1993 @END
1996 /* Delete an atom */
1997 @REQ(delete_atom)
1998 obj_handle_t table; /* which table to delete atom from */
1999 atom_t atom; /* atom handle */
2000 @END
2003 /* Find an atom */
2004 @REQ(find_atom)
2005 obj_handle_t table; /* which table to find atom from */
2006 VARARG(name,unicode_str); /* atom name */
2007 @REPLY
2008 atom_t atom; /* atom handle */
2009 @END
2012 /* Get information about an atom */
2013 @REQ(get_atom_information)
2014 obj_handle_t table; /* which table to find atom from */
2015 atom_t atom; /* atom handle */
2016 @REPLY
2017 int count; /* atom lock count */
2018 int pinned; /* whether the atom has been pinned */
2019 data_size_t total; /* actual length of atom name */
2020 VARARG(name,unicode_str); /* atom name */
2021 @END
2024 /* Set information about an atom */
2025 @REQ(set_atom_information)
2026 obj_handle_t table; /* which table to find atom from */
2027 atom_t atom; /* atom handle */
2028 int pinned; /* whether to bump atom information */
2029 @END
2032 /* Empty an atom table */
2033 @REQ(empty_atom_table)
2034 obj_handle_t table; /* which table to find atom from */
2035 int if_pinned; /* whether to delete pinned atoms */
2036 @END
2039 /* Init an atom table */
2040 @REQ(init_atom_table)
2041 int entries; /* number of entries (only for local) */
2042 @REPLY
2043 obj_handle_t table; /* handle to the atom table */
2044 @END
2047 /* Get the message queue of the current thread */
2048 @REQ(get_msg_queue)
2049 @REPLY
2050 obj_handle_t handle; /* handle to the queue */
2051 @END
2054 /* Set the file descriptor associated to the current thread queue */
2055 @REQ(set_queue_fd)
2056 obj_handle_t handle; /* handle to the file descriptor */
2057 @END
2060 /* Set the current message queue wakeup mask */
2061 @REQ(set_queue_mask)
2062 unsigned int wake_mask; /* wakeup bits mask */
2063 unsigned int changed_mask; /* changed bits mask */
2064 int skip_wait; /* will we skip waiting if signaled? */
2065 @REPLY
2066 unsigned int wake_bits; /* current wake bits */
2067 unsigned int changed_bits; /* current changed bits */
2068 @END
2071 /* Get the current message queue status */
2072 @REQ(get_queue_status)
2073 int clear; /* should we clear the change bits? */
2074 @REPLY
2075 unsigned int wake_bits; /* wake bits */
2076 unsigned int changed_bits; /* changed bits since last time */
2077 @END
2080 /* Retrieve the process idle event */
2081 @REQ(get_process_idle_event)
2082 obj_handle_t handle; /* process handle */
2083 @REPLY
2084 obj_handle_t event; /* handle to idle event */
2085 @END
2088 /* Send a message to a thread queue */
2089 @REQ(send_message)
2090 thread_id_t id; /* thread id */
2091 int type; /* message type (see below) */
2092 int flags; /* message flags (see below) */
2093 user_handle_t win; /* window handle */
2094 unsigned int msg; /* message code */
2095 lparam_t wparam; /* parameters */
2096 lparam_t lparam; /* parameters */
2097 timeout_t timeout; /* timeout for reply */
2098 VARARG(data,message_data); /* message data for sent messages */
2099 @END
2101 @REQ(post_quit_message)
2102 int exit_code; /* exit code to return */
2103 @END
2105 enum message_type
2107 MSG_ASCII, /* Ascii message (from SendMessageA) */
2108 MSG_UNICODE, /* Unicode message (from SendMessageW) */
2109 MSG_NOTIFY, /* notify message (from SendNotifyMessageW), always Unicode */
2110 MSG_CALLBACK, /* callback message (from SendMessageCallbackW), always Unicode */
2111 MSG_CALLBACK_RESULT,/* result of a callback message */
2112 MSG_OTHER_PROCESS, /* sent from other process, may include vararg data, always Unicode */
2113 MSG_POSTED, /* posted message (from PostMessageW), always Unicode */
2114 MSG_HARDWARE, /* hardware message */
2115 MSG_WINEVENT, /* winevent message */
2116 MSG_HOOK_LL /* low-level hardware hook */
2118 #define SEND_MSG_ABORT_IF_HUNG 0x01
2121 /* Send a hardware message to a thread queue */
2122 @REQ(send_hardware_message)
2123 user_handle_t win; /* window handle */
2124 hw_input_t input; /* input data */
2125 unsigned int flags; /* flags (see below) */
2126 @REPLY
2127 int wait; /* do we need to wait for a reply? */
2128 int prev_x; /* previous cursor position */
2129 int prev_y;
2130 int new_x; /* new cursor position */
2131 int new_y;
2132 VARARG(keystate,bytes); /* global state array for all the keys */
2133 @END
2134 #define SEND_HWMSG_INJECTED 0x01
2137 /* Get a message from the current queue */
2138 @REQ(get_message)
2139 unsigned int flags; /* PM_* flags */
2140 user_handle_t get_win; /* window handle to get */
2141 unsigned int get_first; /* first message code to get */
2142 unsigned int get_last; /* last message code to get */
2143 unsigned int hw_id; /* id of the previous hardware message (or 0) */
2144 unsigned int wake_mask; /* wakeup bits mask */
2145 unsigned int changed_mask; /* changed bits mask */
2146 @REPLY
2147 user_handle_t win; /* window handle */
2148 unsigned int msg; /* message code */
2149 lparam_t wparam; /* parameters */
2150 lparam_t lparam; /* parameters */
2151 int type; /* message type */
2152 unsigned int time; /* message time */
2153 unsigned int active_hooks; /* active hooks bitmap */
2154 data_size_t total; /* total size of extra data */
2155 VARARG(data,message_data); /* message data for sent messages */
2156 @END
2159 /* Reply to a sent message */
2160 @REQ(reply_message)
2161 int remove; /* should we remove the message? */
2162 lparam_t result; /* message result */
2163 VARARG(data,bytes); /* message data for sent messages */
2164 @END
2167 /* Accept the current hardware message */
2168 @REQ(accept_hardware_message)
2169 unsigned int hw_id; /* id of the hardware message */
2170 int remove; /* should we remove the message? */
2171 user_handle_t new_win; /* new destination window for current message */
2172 @END
2175 /* Retrieve the reply for the last message sent */
2176 @REQ(get_message_reply)
2177 int cancel; /* cancel message if not ready? */
2178 @REPLY
2179 lparam_t result; /* message result */
2180 VARARG(data,bytes); /* message data for sent messages */
2181 @END
2184 /* Set a window timer */
2185 @REQ(set_win_timer)
2186 user_handle_t win; /* window handle */
2187 unsigned int msg; /* message to post */
2188 unsigned int rate; /* timer rate in ms */
2189 lparam_t id; /* timer id */
2190 lparam_t lparam; /* message lparam (callback proc) */
2191 @REPLY
2192 lparam_t id; /* timer id */
2193 @END
2196 /* Kill a window timer */
2197 @REQ(kill_win_timer)
2198 user_handle_t win; /* window handle */
2199 lparam_t id; /* timer id */
2200 unsigned int msg; /* message to post */
2201 @END
2204 /* check if the thread owning the window is hung */
2205 @REQ(is_window_hung)
2206 user_handle_t win; /* window handle */
2207 @REPLY
2208 int is_hung;
2209 @END
2212 /* Retrieve info about a serial port */
2213 @REQ(get_serial_info)
2214 obj_handle_t handle; /* handle to comm port */
2215 int flags;
2216 @REPLY
2217 unsigned int readinterval;
2218 unsigned int readconst;
2219 unsigned int readmult;
2220 unsigned int writeconst;
2221 unsigned int writemult;
2222 unsigned int eventmask;
2223 unsigned int cookie;
2224 unsigned int pending_write;
2225 @END
2228 /* Set info about a serial port */
2229 @REQ(set_serial_info)
2230 obj_handle_t handle; /* handle to comm port */
2231 int flags; /* bitmask to set values (see below) */
2232 unsigned int readinterval;
2233 unsigned int readconst;
2234 unsigned int readmult;
2235 unsigned int writeconst;
2236 unsigned int writemult;
2237 unsigned int eventmask;
2238 @END
2239 #define SERIALINFO_SET_TIMEOUTS 0x01
2240 #define SERIALINFO_SET_MASK 0x02
2241 #define SERIALINFO_PENDING_WRITE 0x04
2244 /* Create an async I/O */
2245 @REQ(register_async)
2246 int type; /* type of queue to look after */
2247 async_data_t async; /* async I/O parameters */
2248 int count; /* count - usually # of bytes to be read/written */
2249 @END
2250 #define ASYNC_TYPE_READ 0x01
2251 #define ASYNC_TYPE_WRITE 0x02
2252 #define ASYNC_TYPE_WAIT 0x03
2255 /* Cancel all async op on a fd */
2256 @REQ(cancel_async)
2257 obj_handle_t handle; /* handle to comm port, socket or file */
2258 client_ptr_t iosb; /* I/O status block (NULL=all) */
2259 int only_thread; /* cancel matching this thread */
2260 @END
2263 /* Perform an ioctl on a file */
2264 @REQ(ioctl)
2265 ioctl_code_t code; /* ioctl code */
2266 async_data_t async; /* async I/O parameters */
2267 int blocking; /* whether it's a blocking ioctl */
2268 VARARG(in_data,bytes); /* ioctl input data */
2269 @REPLY
2270 obj_handle_t wait; /* handle to wait on for blocking ioctl */
2271 unsigned int options; /* device open options */
2272 VARARG(out_data,bytes); /* ioctl output data */
2273 @END
2276 /* Retrieve results of an async ioctl */
2277 @REQ(get_ioctl_result)
2278 obj_handle_t handle; /* handle to the device */
2279 client_ptr_t user_arg; /* user arg used to identify the request */
2280 @REPLY
2281 VARARG(out_data,bytes); /* ioctl output data */
2282 @END
2285 /* Create a named pipe */
2286 @REQ(create_named_pipe)
2287 unsigned int access;
2288 unsigned int attributes; /* object attributes */
2289 obj_handle_t rootdir; /* root directory */
2290 unsigned int options;
2291 unsigned int sharing;
2292 unsigned int maxinstances;
2293 unsigned int outsize;
2294 unsigned int insize;
2295 timeout_t timeout;
2296 unsigned int flags;
2297 VARARG(name,unicode_str); /* pipe name */
2298 @REPLY
2299 obj_handle_t handle; /* handle to the pipe */
2300 @END
2302 /* flags in create_named_pipe and get_named_pipe_info */
2303 #define NAMED_PIPE_MESSAGE_STREAM_WRITE 0x0001
2304 #define NAMED_PIPE_MESSAGE_STREAM_READ 0x0002
2305 #define NAMED_PIPE_NONBLOCKING_MODE 0x0004
2306 #define NAMED_PIPE_SERVER_END 0x8000
2309 @REQ(get_named_pipe_info)
2310 obj_handle_t handle;
2311 @REPLY
2312 unsigned int flags;
2313 unsigned int sharing;
2314 unsigned int maxinstances;
2315 unsigned int instances;
2316 unsigned int outsize;
2317 unsigned int insize;
2318 @END
2321 /* Create a window */
2322 @REQ(create_window)
2323 user_handle_t parent; /* parent window */
2324 user_handle_t owner; /* owner window */
2325 atom_t atom; /* class atom */
2326 mod_handle_t instance; /* module instance */
2327 VARARG(class,unicode_str); /* class name */
2328 @REPLY
2329 user_handle_t handle; /* created window */
2330 user_handle_t parent; /* full handle of parent */
2331 user_handle_t owner; /* full handle of owner */
2332 int extra; /* number of extra bytes */
2333 client_ptr_t class_ptr; /* pointer to class in client address space */
2334 @END
2337 /* Destroy a window */
2338 @REQ(destroy_window)
2339 user_handle_t handle; /* handle to the window */
2340 @END
2343 /* Retrieve the desktop window for the current thread */
2344 @REQ(get_desktop_window)
2345 int force; /* force creation if it doesn't exist */
2346 @REPLY
2347 user_handle_t top_window; /* handle to the desktop window */
2348 user_handle_t msg_window; /* handle to the top-level HWND_MESSAGE parent */
2349 @END
2352 /* Set a window owner */
2353 @REQ(set_window_owner)
2354 user_handle_t handle; /* handle to the window */
2355 user_handle_t owner; /* new owner */
2356 @REPLY
2357 user_handle_t full_owner; /* full handle of new owner */
2358 user_handle_t prev_owner; /* full handle of previous owner */
2359 @END
2362 /* Get information from a window handle */
2363 @REQ(get_window_info)
2364 user_handle_t handle; /* handle to the window */
2365 @REPLY
2366 user_handle_t full_handle; /* full 32-bit handle */
2367 user_handle_t last_active; /* last active popup */
2368 process_id_t pid; /* process owning the window */
2369 thread_id_t tid; /* thread owning the window */
2370 atom_t atom; /* class atom */
2371 int is_unicode; /* ANSI or unicode */
2372 @END
2375 /* Set some information in a window */
2376 @REQ(set_window_info)
2377 unsigned short flags; /* flags for fields to set (see below) */
2378 short int is_unicode; /* ANSI or unicode */
2379 user_handle_t handle; /* handle to the window */
2380 unsigned int style; /* window style */
2381 unsigned int ex_style; /* window extended style */
2382 unsigned int id; /* window id */
2383 mod_handle_t instance; /* creator instance */
2384 lparam_t user_data; /* user-specific data */
2385 int extra_offset; /* offset to set in extra bytes */
2386 data_size_t extra_size; /* size to set in extra bytes */
2387 lparam_t extra_value; /* value to set in extra bytes */
2388 @REPLY
2389 unsigned int old_style; /* old window style */
2390 unsigned int old_ex_style; /* old window extended style */
2391 mod_handle_t old_instance; /* old creator instance */
2392 lparam_t old_user_data; /* old user-specific data */
2393 lparam_t old_extra_value; /* old value in extra bytes */
2394 unsigned int old_id; /* old window id */
2395 @END
2396 #define SET_WIN_STYLE 0x01
2397 #define SET_WIN_EXSTYLE 0x02
2398 #define SET_WIN_ID 0x04
2399 #define SET_WIN_INSTANCE 0x08
2400 #define SET_WIN_USERDATA 0x10
2401 #define SET_WIN_EXTRA 0x20
2402 #define SET_WIN_UNICODE 0x40
2405 /* Set the parent of a window */
2406 @REQ(set_parent)
2407 user_handle_t handle; /* handle to the window */
2408 user_handle_t parent; /* handle to the parent */
2409 @REPLY
2410 user_handle_t old_parent; /* old parent window */
2411 user_handle_t full_parent; /* full handle of new parent */
2412 @END
2415 /* Get a list of the window parents, up to the root of the tree */
2416 @REQ(get_window_parents)
2417 user_handle_t handle; /* handle to the window */
2418 @REPLY
2419 int count; /* total count of parents */
2420 VARARG(parents,user_handles); /* parent handles */
2421 @END
2424 /* Get a list of the window children */
2425 @REQ(get_window_children)
2426 obj_handle_t desktop; /* handle to desktop */
2427 user_handle_t parent; /* parent window */
2428 atom_t atom; /* class atom for the listed children */
2429 thread_id_t tid; /* thread owning the listed children */
2430 VARARG(class,unicode_str); /* class name */
2431 @REPLY
2432 int count; /* total count of children */
2433 VARARG(children,user_handles); /* children handles */
2434 @END
2437 /* Get a list of the window children that contain a given point */
2438 @REQ(get_window_children_from_point)
2439 user_handle_t parent; /* parent window */
2440 int x; /* point in parent coordinates */
2441 int y;
2442 @REPLY
2443 int count; /* total count of children */
2444 VARARG(children,user_handles); /* children handles */
2445 @END
2448 /* Get window tree information from a window handle */
2449 @REQ(get_window_tree)
2450 user_handle_t handle; /* handle to the window */
2451 @REPLY
2452 user_handle_t parent; /* parent window */
2453 user_handle_t owner; /* owner window */
2454 user_handle_t next_sibling; /* next sibling in Z-order */
2455 user_handle_t prev_sibling; /* prev sibling in Z-order */
2456 user_handle_t first_sibling; /* first sibling in Z-order */
2457 user_handle_t last_sibling; /* last sibling in Z-order */
2458 user_handle_t first_child; /* first child */
2459 user_handle_t last_child; /* last child */
2460 @END
2462 /* Set the position and Z order of a window */
2463 @REQ(set_window_pos)
2464 unsigned short swp_flags; /* SWP_* flags */
2465 unsigned short paint_flags; /* paint flags (see below) */
2466 user_handle_t handle; /* handle to the window */
2467 user_handle_t previous; /* previous window in Z order */
2468 rectangle_t window; /* window rectangle (in parent coords) */
2469 rectangle_t client; /* client rectangle (in parent coords) */
2470 VARARG(valid,rectangles); /* valid rectangles from WM_NCCALCSIZE (in parent coords) */
2471 @REPLY
2472 unsigned int new_style; /* new window style */
2473 unsigned int new_ex_style; /* new window extended style */
2474 user_handle_t surface_win; /* window that needs a surface update */
2475 @END
2476 #define SET_WINPOS_PAINT_SURFACE 0x01 /* window has a paintable surface */
2477 #define SET_WINPOS_PIXEL_FORMAT 0x02 /* window has a custom pixel format */
2479 /* Get the window and client rectangles of a window */
2480 @REQ(get_window_rectangles)
2481 user_handle_t handle; /* handle to the window */
2482 int relative; /* coords relative to (see below) */
2483 @REPLY
2484 rectangle_t window; /* window rectangle */
2485 rectangle_t visible; /* visible part of the window rectangle */
2486 rectangle_t client; /* client rectangle */
2487 @END
2488 enum coords_relative
2490 COORDS_CLIENT, /* relative to client area */
2491 COORDS_WINDOW, /* relative to whole window area */
2492 COORDS_PARENT, /* relative to parent's client area */
2493 COORDS_SCREEN /* relative to screen origin */
2497 /* Get the window text */
2498 @REQ(get_window_text)
2499 user_handle_t handle; /* handle to the window */
2500 @REPLY
2501 VARARG(text,unicode_str); /* window text */
2502 @END
2505 /* Set the window text */
2506 @REQ(set_window_text)
2507 user_handle_t handle; /* handle to the window */
2508 VARARG(text,unicode_str); /* window text */
2509 @END
2512 /* Get the coordinates offset between two windows */
2513 @REQ(get_windows_offset)
2514 user_handle_t from; /* handle to the first window */
2515 user_handle_t to; /* handle to the second window */
2516 @REPLY
2517 int x; /* x coordinate offset */
2518 int y; /* y coordinate offset */
2519 int mirror; /* whether to mirror the x coordinate */
2520 @END
2523 /* Get the visible region of a window */
2524 @REQ(get_visible_region)
2525 user_handle_t window; /* handle to the window */
2526 unsigned int flags; /* DCX flags */
2527 @REPLY
2528 user_handle_t top_win; /* top window to clip against */
2529 rectangle_t top_rect; /* top window visible rect with screen coords */
2530 rectangle_t win_rect; /* window rect in screen coords */
2531 unsigned int paint_flags; /* paint flags (from SET_WINPOS_* flags) */
2532 data_size_t total_size; /* total size of the resulting region */
2533 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2534 @END
2537 /* Get the visible surface region of a window */
2538 @REQ(get_surface_region)
2539 user_handle_t window; /* handle to the window */
2540 @REPLY
2541 rectangle_t visible_rect; /* window visible rect in screen coords */
2542 data_size_t total_size; /* total size of the resulting region */
2543 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2544 @END
2547 /* Get the window region */
2548 @REQ(get_window_region)
2549 user_handle_t window; /* handle to the window */
2550 @REPLY
2551 data_size_t total_size; /* total size of the resulting region */
2552 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2553 @END
2556 /* Set the window region */
2557 @REQ(set_window_region)
2558 user_handle_t window; /* handle to the window */
2559 int redraw; /* redraw the window? */
2560 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2561 @END
2564 /* Get the window update region */
2565 @REQ(get_update_region)
2566 user_handle_t window; /* handle to the window */
2567 user_handle_t from_child; /* child to start searching from */
2568 unsigned int flags; /* update flags (see below) */
2569 @REPLY
2570 user_handle_t child; /* child to repaint (or window itself) */
2571 unsigned int flags; /* resulting update flags (see below) */
2572 data_size_t total_size; /* total size of the resulting region */
2573 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2574 @END
2575 #define UPDATE_NONCLIENT 0x01 /* get region for repainting non-client area */
2576 #define UPDATE_ERASE 0x02 /* get region for erasing client area */
2577 #define UPDATE_PAINT 0x04 /* get region for painting client area */
2578 #define UPDATE_INTERNALPAINT 0x08 /* get region if internal paint is pending */
2579 #define UPDATE_ALLCHILDREN 0x10 /* force repaint of all children */
2580 #define UPDATE_NOCHILDREN 0x20 /* don't try to repaint any children */
2581 #define UPDATE_NOREGION 0x40 /* don't return a region, only the flags */
2582 #define UPDATE_DELAYED_ERASE 0x80 /* still needs erase after BeginPaint */
2585 /* Update the z order of a window so that a given rectangle is fully visible */
2586 @REQ(update_window_zorder)
2587 user_handle_t window; /* handle to the window */
2588 rectangle_t rect; /* rectangle that must be visible (in client coords) */
2589 @END
2592 /* Mark parts of a window as needing a redraw */
2593 @REQ(redraw_window)
2594 user_handle_t window; /* handle to the window */
2595 unsigned int flags; /* RDW_* flags */
2596 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2597 @END
2600 /* Set a window property */
2601 @REQ(set_window_property)
2602 user_handle_t window; /* handle to the window */
2603 lparam_t data; /* data to store */
2604 atom_t atom; /* property atom (if no name specified) */
2605 VARARG(name,unicode_str); /* property name */
2606 @END
2609 /* Remove a window property */
2610 @REQ(remove_window_property)
2611 user_handle_t window; /* handle to the window */
2612 atom_t atom; /* property atom (if no name specified) */
2613 VARARG(name,unicode_str); /* property name */
2614 @REPLY
2615 lparam_t data; /* data stored in property */
2616 @END
2619 /* Get a window property */
2620 @REQ(get_window_property)
2621 user_handle_t window; /* handle to the window */
2622 atom_t atom; /* property atom (if no name specified) */
2623 VARARG(name,unicode_str); /* property name */
2624 @REPLY
2625 lparam_t data; /* data stored in property */
2626 @END
2629 /* Get the list of properties of a window */
2630 @REQ(get_window_properties)
2631 user_handle_t window; /* handle to the window */
2632 @REPLY
2633 int total; /* total number of properties */
2634 VARARG(props,properties); /* list of properties */
2635 @END
2638 /* Create a window station */
2639 @REQ(create_winstation)
2640 unsigned int flags; /* window station flags */
2641 unsigned int access; /* wanted access rights */
2642 unsigned int attributes; /* object attributes */
2643 VARARG(name,unicode_str); /* object name */
2644 @REPLY
2645 obj_handle_t handle; /* handle to the window station */
2646 @END
2649 /* Open a handle to a window station */
2650 @REQ(open_winstation)
2651 unsigned int access; /* wanted access rights */
2652 unsigned int attributes; /* object attributes */
2653 VARARG(name,unicode_str); /* object name */
2654 @REPLY
2655 obj_handle_t handle; /* handle to the window station */
2656 @END
2659 /* Close a window station */
2660 @REQ(close_winstation)
2661 obj_handle_t handle; /* handle to the window station */
2662 @END
2665 /* Get the process current window station */
2666 @REQ(get_process_winstation)
2667 @REPLY
2668 obj_handle_t handle; /* handle to the window station */
2669 @END
2672 /* Set the process current window station */
2673 @REQ(set_process_winstation)
2674 obj_handle_t handle; /* handle to the window station */
2675 @END
2678 /* Enumerate window stations */
2679 @REQ(enum_winstation)
2680 unsigned int index; /* current index */
2681 @REPLY
2682 unsigned int next; /* next index */
2683 VARARG(name,unicode_str); /* window station name */
2684 @END
2687 /* Create a desktop */
2688 @REQ(create_desktop)
2689 unsigned int flags; /* desktop flags */
2690 unsigned int access; /* wanted access rights */
2691 unsigned int attributes; /* object attributes */
2692 VARARG(name,unicode_str); /* object name */
2693 @REPLY
2694 obj_handle_t handle; /* handle to the desktop */
2695 @END
2698 /* Open a handle to a desktop */
2699 @REQ(open_desktop)
2700 obj_handle_t winsta; /* window station to open (null allowed) */
2701 unsigned int flags; /* desktop flags */
2702 unsigned int access; /* wanted access rights */
2703 unsigned int attributes; /* object attributes */
2704 VARARG(name,unicode_str); /* object name */
2705 @REPLY
2706 obj_handle_t handle; /* handle to the desktop */
2707 @END
2710 /* Close a desktop */
2711 @REQ(close_desktop)
2712 obj_handle_t handle; /* handle to the desktop */
2713 @END
2716 /* Get the thread current desktop */
2717 @REQ(get_thread_desktop)
2718 thread_id_t tid; /* thread id */
2719 @REPLY
2720 obj_handle_t handle; /* handle to the desktop */
2721 @END
2724 /* Set the thread current desktop */
2725 @REQ(set_thread_desktop)
2726 obj_handle_t handle; /* handle to the desktop */
2727 @END
2730 /* Enumerate desktops */
2731 @REQ(enum_desktop)
2732 obj_handle_t winstation; /* handle to the window station */
2733 unsigned int index; /* current index */
2734 @REPLY
2735 unsigned int next; /* next index */
2736 VARARG(name,unicode_str); /* window station name */
2737 @END
2740 /* Get/set information about a user object (window station or desktop) */
2741 @REQ(set_user_object_info)
2742 obj_handle_t handle; /* handle to the object */
2743 unsigned int flags; /* information to set */
2744 unsigned int obj_flags; /* new object flags */
2745 @REPLY
2746 int is_desktop; /* is object a desktop? */
2747 unsigned int old_obj_flags; /* old object flags */
2748 VARARG(name,unicode_str); /* object name */
2749 @END
2750 #define SET_USER_OBJECT_FLAGS 1
2753 /* Register a hotkey */
2754 @REQ(register_hotkey)
2755 user_handle_t window; /* handle to the window */
2756 int id; /* hotkey identifier */
2757 unsigned int flags; /* modifier keys */
2758 unsigned int vkey; /* virtual key code */
2759 @REPLY
2760 int replaced; /* did we replace an existing hotkey? */
2761 unsigned int flags; /* flags of replaced hotkey */
2762 unsigned int vkey; /* virtual key code of replaced hotkey */
2763 @END
2766 /* Unregister a hotkey */
2767 @REQ(unregister_hotkey)
2768 user_handle_t window; /* handle to the window */
2769 int id; /* hotkey identifier */
2770 @REPLY
2771 unsigned int flags; /* flags of removed hotkey */
2772 unsigned int vkey; /* virtual key code of removed hotkey */
2773 @END
2776 /* Attach (or detach) thread inputs */
2777 @REQ(attach_thread_input)
2778 thread_id_t tid_from; /* thread to be attached */
2779 thread_id_t tid_to; /* thread to which tid_from should be attached */
2780 int attach; /* is it an attach? */
2781 @END
2784 /* Get input data for a given thread */
2785 @REQ(get_thread_input)
2786 thread_id_t tid; /* id of thread */
2787 @REPLY
2788 user_handle_t focus; /* handle to the focus window */
2789 user_handle_t capture; /* handle to the capture window */
2790 user_handle_t active; /* handle to the active window */
2791 user_handle_t foreground; /* handle to the global foreground window */
2792 user_handle_t menu_owner; /* handle to the menu owner */
2793 user_handle_t move_size; /* handle to the moving/resizing window */
2794 user_handle_t caret; /* handle to the caret window */
2795 user_handle_t cursor; /* handle to the cursor */
2796 int show_count; /* cursor show count */
2797 rectangle_t rect; /* caret rectangle */
2798 @END
2801 /* Get the time of the last input event */
2802 @REQ(get_last_input_time)
2803 @REPLY
2804 unsigned int time;
2805 @END
2808 /* Retrieve queue keyboard state for a given thread */
2809 @REQ(get_key_state)
2810 thread_id_t tid; /* id of thread */
2811 int key; /* optional key code or -1 */
2812 @REPLY
2813 unsigned char state; /* state of specified key */
2814 VARARG(keystate,bytes); /* state array for all the keys */
2815 @END
2817 /* Set queue keyboard state for a given thread */
2818 @REQ(set_key_state)
2819 thread_id_t tid; /* id of thread */
2820 int async; /* whether to change the async state too */
2821 VARARG(keystate,bytes); /* state array for all the keys */
2822 @END
2824 /* Set the system foreground window */
2825 @REQ(set_foreground_window)
2826 user_handle_t handle; /* handle to the foreground window */
2827 @REPLY
2828 user_handle_t previous; /* handle to the previous foreground window */
2829 int send_msg_old; /* whether we have to send a msg to the old window */
2830 int send_msg_new; /* whether we have to send a msg to the new window */
2831 @END
2833 /* Set the current thread focus window */
2834 @REQ(set_focus_window)
2835 user_handle_t handle; /* handle to the focus window */
2836 @REPLY
2837 user_handle_t previous; /* handle to the previous focus window */
2838 @END
2840 /* Set the current thread active window */
2841 @REQ(set_active_window)
2842 user_handle_t handle; /* handle to the active window */
2843 @REPLY
2844 user_handle_t previous; /* handle to the previous active window */
2845 @END
2847 /* Set the current thread capture window */
2848 @REQ(set_capture_window)
2849 user_handle_t handle; /* handle to the capture window */
2850 unsigned int flags; /* capture flags (see below) */
2851 @REPLY
2852 user_handle_t previous; /* handle to the previous capture window */
2853 user_handle_t full_handle; /* full 32-bit handle of new capture window */
2854 @END
2855 #define CAPTURE_MENU 0x01 /* capture is for a menu */
2856 #define CAPTURE_MOVESIZE 0x02 /* capture is for moving/resizing */
2859 /* Set the current thread caret window */
2860 @REQ(set_caret_window)
2861 user_handle_t handle; /* handle to the caret window */
2862 int width; /* caret width */
2863 int height; /* caret height */
2864 @REPLY
2865 user_handle_t previous; /* handle to the previous caret window */
2866 rectangle_t old_rect; /* previous caret rectangle */
2867 int old_hide; /* previous hide count */
2868 int old_state; /* previous caret state (1=on, 0=off) */
2869 @END
2872 /* Set the current thread caret information */
2873 @REQ(set_caret_info)
2874 unsigned int flags; /* caret flags (see below) */
2875 user_handle_t handle; /* handle to the caret window */
2876 int x; /* caret x position */
2877 int y; /* caret y position */
2878 int hide; /* increment for hide count (can be negative to show it) */
2879 int state; /* caret state (1=on, 0=off, -1=toggle current state) */
2880 @REPLY
2881 user_handle_t full_handle; /* handle to the current caret window */
2882 rectangle_t old_rect; /* previous caret rectangle */
2883 int old_hide; /* previous hide count */
2884 int old_state; /* previous caret state (1=on, 0=off) */
2885 @END
2886 #define SET_CARET_POS 0x01 /* set the caret position from x,y */
2887 #define SET_CARET_HIDE 0x02 /* increment the caret hide count */
2888 #define SET_CARET_STATE 0x04 /* set the caret on/off state */
2891 /* Set a window hook */
2892 @REQ(set_hook)
2893 int id; /* id of the hook */
2894 process_id_t pid; /* id of process to set the hook into */
2895 thread_id_t tid; /* id of thread to set the hook into */
2896 int event_min;
2897 int event_max;
2898 client_ptr_t proc; /* hook procedure */
2899 int flags;
2900 int unicode; /* is it a unicode hook? */
2901 VARARG(module,unicode_str); /* module name */
2902 @REPLY
2903 user_handle_t handle; /* handle to the hook */
2904 unsigned int active_hooks; /* active hooks bitmap */
2905 @END
2908 /* Remove a window hook */
2909 @REQ(remove_hook)
2910 user_handle_t handle; /* handle to the hook */
2911 client_ptr_t proc; /* hook procedure if handle is 0 */
2912 int id; /* id of the hook if handle is 0 */
2913 @REPLY
2914 unsigned int active_hooks; /* active hooks bitmap */
2915 @END
2918 /* Start calling a hook chain */
2919 @REQ(start_hook_chain)
2920 int id; /* id of the hook */
2921 int event; /* signalled event */
2922 user_handle_t window; /* handle to the event window */
2923 int object_id; /* object id for out of context winevent */
2924 int child_id; /* child id for out of context winevent */
2925 @REPLY
2926 user_handle_t handle; /* handle to the next hook */
2927 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2928 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2929 int unicode; /* is it a unicode hook? */
2930 client_ptr_t proc; /* hook procedure */
2931 unsigned int active_hooks; /* active hooks bitmap */
2932 VARARG(module,unicode_str); /* module name */
2933 @END
2936 /* Finished calling a hook chain */
2937 @REQ(finish_hook_chain)
2938 int id; /* id of the hook */
2939 @END
2942 /* Get the hook information */
2943 @REQ(get_hook_info)
2944 user_handle_t handle; /* handle to the current hook */
2945 int get_next; /* do we want info about current or next hook? */
2946 int event; /* signalled event */
2947 user_handle_t window; /* handle to the event window */
2948 int object_id; /* object id for out of context winevent */
2949 int child_id; /* child id for out of context winevent */
2950 @REPLY
2951 user_handle_t handle; /* handle to the hook */
2952 int id; /* id of the hook */
2953 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2954 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2955 client_ptr_t proc; /* hook procedure */
2956 int unicode; /* is it a unicode hook? */
2957 VARARG(module,unicode_str); /* module name */
2958 @END
2961 /* Create a window class */
2962 @REQ(create_class)
2963 int local; /* is it a local class? */
2964 atom_t atom; /* class atom */
2965 unsigned int style; /* class style */
2966 mod_handle_t instance; /* module instance */
2967 int extra; /* number of extra class bytes */
2968 int win_extra; /* number of window extra bytes */
2969 client_ptr_t client_ptr; /* pointer to class in client address space */
2970 VARARG(name,unicode_str); /* class name */
2971 @REPLY
2972 atom_t atom; /* resulting class atom */
2973 @END
2976 /* Destroy a window class */
2977 @REQ(destroy_class)
2978 atom_t atom; /* class atom */
2979 mod_handle_t instance; /* module instance */
2980 VARARG(name,unicode_str); /* class name */
2981 @REPLY
2982 client_ptr_t client_ptr; /* pointer to class in client address space */
2983 @END
2986 /* Set some information in a class */
2987 @REQ(set_class_info)
2988 user_handle_t window; /* handle to the window */
2989 unsigned int flags; /* flags for info to set (see below) */
2990 atom_t atom; /* class atom */
2991 unsigned int style; /* class style */
2992 int win_extra; /* number of window extra bytes */
2993 mod_handle_t instance; /* module instance */
2994 int extra_offset; /* offset to set in extra bytes */
2995 data_size_t extra_size; /* size to set in extra bytes */
2996 lparam_t extra_value; /* value to set in extra bytes */
2997 @REPLY
2998 atom_t old_atom; /* previous class atom */
2999 unsigned int old_style; /* previous class style */
3000 int old_extra; /* previous number of class extra bytes */
3001 int old_win_extra; /* previous number of window extra bytes */
3002 mod_handle_t old_instance; /* previous module instance */
3003 lparam_t old_extra_value; /* old value in extra bytes */
3004 @END
3005 #define SET_CLASS_ATOM 0x0001
3006 #define SET_CLASS_STYLE 0x0002
3007 #define SET_CLASS_WINEXTRA 0x0004
3008 #define SET_CLASS_INSTANCE 0x0008
3009 #define SET_CLASS_EXTRA 0x0010
3012 /* Set/get clipboard information */
3013 @REQ(set_clipboard_info)
3014 unsigned int flags; /* flags for fields to set (see below) */
3015 user_handle_t clipboard; /* clipboard window */
3016 user_handle_t owner; /* clipboard owner */
3017 user_handle_t viewer; /* first clipboard viewer */
3018 unsigned int seqno; /* change sequence number */
3019 @REPLY
3020 unsigned int flags; /* status flags (see below) */
3021 user_handle_t old_clipboard; /* old clipboard window */
3022 user_handle_t old_owner; /* old clipboard owner */
3023 user_handle_t old_viewer; /* old clipboard viewer */
3024 unsigned int seqno; /* current sequence number */
3025 @END
3027 #define SET_CB_OPEN 0x001
3028 #define SET_CB_OWNER 0x002
3029 #define SET_CB_VIEWER 0x004
3030 #define SET_CB_SEQNO 0x008
3031 #define SET_CB_RELOWNER 0x010
3032 #define SET_CB_CLOSE 0x020
3033 #define CB_OPEN 0x040
3034 #define CB_OWNER 0x080
3035 #define CB_PROCESS 0x100
3038 /* Open a security token */
3039 @REQ(open_token)
3040 obj_handle_t handle; /* handle to the thread or process */
3041 unsigned int access; /* access rights to the new token */
3042 unsigned int attributes;/* object attributes */
3043 unsigned int flags; /* flags (see below) */
3044 @REPLY
3045 obj_handle_t token; /* handle to the token */
3046 @END
3047 #define OPEN_TOKEN_THREAD 1
3048 #define OPEN_TOKEN_AS_SELF 2
3051 /* Set/get the global windows */
3052 @REQ(set_global_windows)
3053 unsigned int flags; /* flags for fields to set (see below) */
3054 user_handle_t shell_window; /* handle to the new shell window */
3055 user_handle_t shell_listview; /* handle to the new shell listview window */
3056 user_handle_t progman_window; /* handle to the new program manager window */
3057 user_handle_t taskman_window; /* handle to the new task manager window */
3058 @REPLY
3059 user_handle_t old_shell_window; /* handle to the shell window */
3060 user_handle_t old_shell_listview; /* handle to the shell listview window */
3061 user_handle_t old_progman_window; /* handle to the new program manager window */
3062 user_handle_t old_taskman_window; /* handle to the new task manager window */
3063 @END
3064 #define SET_GLOBAL_SHELL_WINDOWS 0x01 /* set both main shell and listview windows */
3065 #define SET_GLOBAL_PROGMAN_WINDOW 0x02
3066 #define SET_GLOBAL_TASKMAN_WINDOW 0x04
3068 /* Adjust the privileges held by a token */
3069 @REQ(adjust_token_privileges)
3070 obj_handle_t handle; /* handle to the token */
3071 int disable_all; /* disable all privileges? */
3072 int get_modified_state; /* get modified privileges? */
3073 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to enable/disable/remove */
3074 @REPLY
3075 unsigned int len; /* total length in bytes required to store token privileges */
3076 VARARG(privileges,LUID_AND_ATTRIBUTES); /* modified privileges */
3077 @END
3079 /* Retrieves the set of privileges held by or available to a token */
3080 @REQ(get_token_privileges)
3081 obj_handle_t handle; /* handle to the token */
3082 @REPLY
3083 unsigned int len; /* total length in bytes required to store token privileges */
3084 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
3085 @END
3087 /* Check the token has the required privileges */
3088 @REQ(check_token_privileges)
3089 obj_handle_t handle; /* handle to the token */
3090 int all_required; /* are all the privileges required for the check to succeed? */
3091 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to check */
3092 @REPLY
3093 int has_privileges; /* does the token have the required privileges? */
3094 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
3095 @END
3097 @REQ(duplicate_token)
3098 obj_handle_t handle; /* handle to the token to duplicate */
3099 unsigned int access; /* access rights to the new token */
3100 unsigned int attributes; /* object attributes */
3101 int primary; /* is the new token to be a primary one? */
3102 int impersonation_level; /* impersonation level of the new token */
3103 @REPLY
3104 obj_handle_t new_handle; /* duplicated handle */
3105 @END
3107 @REQ(access_check)
3108 obj_handle_t handle; /* handle to the token */
3109 unsigned int desired_access; /* desired access to the object */
3110 unsigned int mapping_read; /* mapping from generic read to specific rights */
3111 unsigned int mapping_write; /* mapping from generic write to specific rights */
3112 unsigned int mapping_execute; /* mapping from generic execute to specific rights */
3113 unsigned int mapping_all; /* mapping from generic all to specific rights */
3114 VARARG(sd,security_descriptor); /* security descriptor to check */
3115 @REPLY
3116 unsigned int access_granted; /* access rights actually granted */
3117 unsigned int access_status; /* was access granted? */
3118 unsigned int privileges_len; /* length needed to store privileges */
3119 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges used during access check */
3120 @END
3122 @REQ(get_token_sid)
3123 obj_handle_t handle; /* handle to the token */
3124 unsigned int which_sid; /* which SID to retrieve from the token */
3125 @REPLY
3126 data_size_t sid_len; /* length needed to store sid */
3127 VARARG(sid,SID); /* the sid specified by which_sid from the token */
3128 @END
3130 @REQ(get_token_groups)
3131 obj_handle_t handle; /* handle to the token */
3132 @REPLY
3133 data_size_t user_len; /* length needed to store user */
3134 VARARG(user,token_groups); /* groups the token's user belongs to */
3135 @END
3137 @REQ(get_token_default_dacl)
3138 obj_handle_t handle; /* handle to the token */
3139 @REPLY
3140 data_size_t acl_len; /* length needed to store access control list */
3141 VARARG(acl,ACL); /* access control list */
3142 @END
3144 @REQ(set_token_default_dacl)
3145 obj_handle_t handle; /* handle to the token */
3146 VARARG(acl,ACL); /* default dacl to set */
3147 @END
3149 @REQ(set_security_object)
3150 obj_handle_t handle; /* handle to the object */
3151 unsigned int security_info; /* which parts of security descriptor to set */
3152 VARARG(sd,security_descriptor); /* security descriptor to set */
3153 @END
3155 @REQ(get_security_object)
3156 obj_handle_t handle; /* handle to the object */
3157 unsigned int security_info; /* which parts of security descriptor to get */
3158 @REPLY
3159 unsigned int sd_len; /* buffer size needed for sd */
3160 VARARG(sd,security_descriptor); /* retrieved security descriptor */
3161 @END
3163 /* Create a mailslot */
3164 @REQ(create_mailslot)
3165 unsigned int access; /* wanted access rights */
3166 unsigned int attributes; /* object attributes */
3167 obj_handle_t rootdir; /* root directory */
3168 timeout_t read_timeout;
3169 unsigned int max_msgsize;
3170 VARARG(name,unicode_str); /* mailslot name */
3171 @REPLY
3172 obj_handle_t handle; /* handle to the mailslot */
3173 @END
3176 /* Set mailslot information */
3177 @REQ(set_mailslot_info)
3178 obj_handle_t handle; /* handle to the mailslot */
3179 timeout_t read_timeout;
3180 unsigned int flags;
3181 @REPLY
3182 timeout_t read_timeout;
3183 unsigned int max_msgsize;
3184 @END
3185 #define MAILSLOT_SET_READ_TIMEOUT 1
3188 /* Create a directory object */
3189 @REQ(create_directory)
3190 unsigned int access; /* access flags */
3191 unsigned int attributes; /* object attributes */
3192 obj_handle_t rootdir; /* root directory */
3193 VARARG(directory_name,unicode_str); /* Directory name */
3194 @REPLY
3195 obj_handle_t handle; /* handle to the directory */
3196 @END
3199 /* Open a directory object */
3200 @REQ(open_directory)
3201 unsigned int access; /* access flags */
3202 unsigned int attributes; /* object attributes */
3203 obj_handle_t rootdir; /* root directory */
3204 VARARG(directory_name,unicode_str); /* Directory name */
3205 @REPLY
3206 obj_handle_t handle; /* handle to the directory */
3207 @END
3210 /* Get a directory entry by index */
3211 @REQ(get_directory_entry)
3212 obj_handle_t handle; /* handle to the directory */
3213 unsigned int index; /* entry index */
3214 @REPLY
3215 data_size_t name_len; /* length of the entry name in bytes */
3216 VARARG(name,unicode_str,name_len); /* entry name */
3217 VARARG(type,unicode_str); /* entry type */
3218 @END
3221 /* Create a symbolic link object */
3222 @REQ(create_symlink)
3223 unsigned int access; /* access flags */
3224 unsigned int attributes; /* object attributes */
3225 obj_handle_t rootdir; /* root directory */
3226 data_size_t name_len; /* length of the symlink name in bytes */
3227 VARARG(name,unicode_str,name_len); /* symlink name */
3228 VARARG(target_name,unicode_str); /* target name */
3229 @REPLY
3230 obj_handle_t handle; /* handle to the symlink */
3231 @END
3234 /* Open a symbolic link object */
3235 @REQ(open_symlink)
3236 unsigned int access; /* access flags */
3237 unsigned int attributes; /* object attributes */
3238 obj_handle_t rootdir; /* root directory */
3239 VARARG(name,unicode_str); /* symlink name */
3240 @REPLY
3241 obj_handle_t handle; /* handle to the symlink */
3242 @END
3245 /* Query a symbolic link object */
3246 @REQ(query_symlink)
3247 obj_handle_t handle; /* handle to the symlink */
3248 @REPLY
3249 data_size_t total; /* total needed size for name */
3250 VARARG(target_name,unicode_str); /* target name */
3251 @END
3254 /* Query basic object information */
3255 @REQ(get_object_info)
3256 obj_handle_t handle; /* handle to the object */
3257 @REPLY
3258 unsigned int access; /* granted access mask */
3259 unsigned int ref_count; /* object ref count */
3260 data_size_t total; /* total needed size for name */
3261 VARARG(name,unicode_str); /* object name */
3262 @END
3265 /* Unlink a named object */
3266 @REQ(unlink_object)
3267 obj_handle_t handle; /* handle to the object */
3268 @END
3271 /* Query the impersonation level of an impersonation token */
3272 @REQ(get_token_impersonation_level)
3273 obj_handle_t handle; /* handle to the object */
3274 @REPLY
3275 int impersonation_level; /* impersonation level of the impersonation token */
3276 @END
3278 /* Allocate a locally-unique identifier */
3279 @REQ(allocate_locally_unique_id)
3280 @REPLY
3281 luid_t luid;
3282 @END
3285 /* Create a device manager */
3286 @REQ(create_device_manager)
3287 unsigned int access; /* wanted access rights */
3288 unsigned int attributes; /* object attributes */
3289 @REPLY
3290 obj_handle_t handle; /* handle to the device */
3291 @END
3294 /* Create a device */
3295 @REQ(create_device)
3296 unsigned int access; /* wanted access rights */
3297 unsigned int attributes; /* object attributes */
3298 obj_handle_t rootdir; /* root directory */
3299 client_ptr_t user_ptr; /* opaque ptr for use by client */
3300 obj_handle_t manager; /* device manager */
3301 VARARG(name,unicode_str); /* object name */
3302 @REPLY
3303 obj_handle_t handle; /* handle to the device */
3304 @END
3307 /* Delete a device */
3308 @REQ(delete_device)
3309 obj_handle_t handle; /* handle to the device */
3310 @END
3313 /* Retrieve the next pending device ioctl request */
3314 @REQ(get_next_device_request)
3315 obj_handle_t manager; /* handle to the device manager */
3316 obj_handle_t prev; /* handle to the previous ioctl */
3317 unsigned int status; /* status of the previous ioctl */
3318 VARARG(prev_data,bytes); /* output data of the previous ioctl */
3319 @REPLY
3320 obj_handle_t next; /* handle to the next ioctl */
3321 ioctl_code_t code; /* ioctl code */
3322 client_ptr_t user_ptr; /* opaque ptr for the device */
3323 process_id_t client_pid; /* pid of process calling ioctl */
3324 thread_id_t client_tid; /* tid of thread calling ioctl */
3325 data_size_t in_size; /* total needed input size */
3326 data_size_t out_size; /* needed output size */
3327 VARARG(next_data,bytes); /* input data of the next ioctl */
3328 @END
3331 /* Make the current process a system process */
3332 @REQ(make_process_system)
3333 @REPLY
3334 obj_handle_t event; /* event signaled when all user processes have exited */
3335 @END
3338 /* Get detailed fixed-size information about a token */
3339 @REQ(get_token_statistics)
3340 obj_handle_t handle; /* handle to the object */
3341 @REPLY
3342 luid_t token_id; /* locally-unique identifier of the token */
3343 luid_t modified_id; /* locally-unique identifier of the modified version of the token */
3344 int primary; /* is the token primary or impersonation? */
3345 int impersonation_level; /* level of impersonation */
3346 int group_count; /* the number of groups the token is a member of */
3347 int privilege_count; /* the number of privileges the token has */
3348 @END
3351 /* Create I/O completion port */
3352 @REQ(create_completion)
3353 unsigned int access; /* desired access to a port */
3354 unsigned int attributes; /* object attributes */
3355 unsigned int concurrent; /* max number of concurrent active threads */
3356 obj_handle_t rootdir; /* root directory */
3357 VARARG(filename,string); /* port name */
3358 @REPLY
3359 obj_handle_t handle; /* port handle */
3360 @END
3363 /* Open I/O completion port */
3364 @REQ(open_completion)
3365 unsigned int access; /* desired access to a port */
3366 unsigned int attributes; /* object attributes */
3367 obj_handle_t rootdir; /* root directory */
3368 VARARG(filename,string); /* port name */
3369 @REPLY
3370 obj_handle_t handle; /* port handle */
3371 @END
3374 /* add completion to completion port */
3375 @REQ(add_completion)
3376 obj_handle_t handle; /* port handle */
3377 apc_param_t ckey; /* completion key */
3378 apc_param_t cvalue; /* completion value */
3379 apc_param_t information; /* IO_STATUS_BLOCK Information */
3380 unsigned int status; /* completion result */
3381 @END
3384 /* get completion from completion port queue */
3385 @REQ(remove_completion)
3386 obj_handle_t handle; /* port handle */
3387 @REPLY
3388 apc_param_t ckey; /* completion key */
3389 apc_param_t cvalue; /* completion value */
3390 apc_param_t information; /* IO_STATUS_BLOCK Information */
3391 unsigned int status; /* completion result */
3392 @END
3395 /* get completion queue depth */
3396 @REQ(query_completion)
3397 obj_handle_t handle; /* port handle */
3398 @REPLY
3399 unsigned int depth; /* completion queue depth */
3400 @END
3403 /* associate object with completion port */
3404 @REQ(set_completion_info)
3405 obj_handle_t handle; /* object handle */
3406 apc_param_t ckey; /* completion key */
3407 obj_handle_t chandle; /* port handle */
3408 @END
3411 /* check for associated completion and push msg */
3412 @REQ(add_fd_completion)
3413 obj_handle_t handle; /* async' object */
3414 apc_param_t cvalue; /* completion value */
3415 apc_param_t information; /* IO_STATUS_BLOCK Information */
3416 unsigned int status; /* completion status */
3417 @END
3420 /* Retrieve layered info for a window */
3421 @REQ(get_window_layered_info)
3422 user_handle_t handle; /* handle to the window */
3423 @REPLY
3424 unsigned int color_key; /* color key */
3425 unsigned int alpha; /* alpha (0..255) */
3426 unsigned int flags; /* LWA_* flags */
3427 @END
3430 /* Set layered info for a window */
3431 @REQ(set_window_layered_info)
3432 user_handle_t handle; /* handle to the window */
3433 unsigned int color_key; /* color key */
3434 unsigned int alpha; /* alpha (0..255) */
3435 unsigned int flags; /* LWA_* flags */
3436 @END
3439 /* Allocate an arbitrary user handle */
3440 @REQ(alloc_user_handle)
3441 @REPLY
3442 user_handle_t handle; /* allocated handle */
3443 @END
3446 /* Free an arbitrary user handle */
3447 @REQ(free_user_handle)
3448 user_handle_t handle; /* handle to free*/
3449 @END
3452 /* Set/get the current cursor */
3453 @REQ(set_cursor)
3454 unsigned int flags; /* flags for fields to set (see below) */
3455 user_handle_t handle; /* handle to the cursor */
3456 int show_count; /* show count increment/decrement */
3457 int x; /* cursor position */
3458 int y;
3459 rectangle_t clip; /* cursor clip rectangle */
3460 unsigned int clip_msg; /* message to post on cursor clip changes */
3461 @REPLY
3462 user_handle_t prev_handle; /* previous handle */
3463 int prev_count; /* previous show count */
3464 int prev_x; /* previous position */
3465 int prev_y;
3466 int new_x; /* new position */
3467 int new_y;
3468 rectangle_t new_clip; /* new clip rectangle */
3469 unsigned int last_change; /* time of last position change */
3470 @END
3471 #define SET_CURSOR_HANDLE 0x01
3472 #define SET_CURSOR_COUNT 0x02
3473 #define SET_CURSOR_POS 0x04
3474 #define SET_CURSOR_CLIP 0x08
3475 #define SET_CURSOR_NOCLIP 0x10
3478 /* Modify the list of registered rawinput devices */
3479 @REQ(update_rawinput_devices)
3480 VARARG(devices,rawinput_devices);
3481 @END
3484 /* Retrieve the suspended context of a thread */
3485 @REQ(get_suspend_context)
3486 @REPLY
3487 VARARG(context,context); /* thread context */
3488 @END
3491 /* Store the suspend context of a thread */
3492 @REQ(set_suspend_context)
3493 VARARG(context,context); /* thread context */
3494 @END