xmllite: Reset resume state when text node is parsed.
[wine.git] / server / protocol.def
bloba7c54788d5e9a48e2a1639160a6d935e2e2a0c2e
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 @REPLY
2216 unsigned int readinterval;
2217 unsigned int readconst;
2218 unsigned int readmult;
2219 unsigned int writeconst;
2220 unsigned int writemult;
2221 unsigned int eventmask;
2222 unsigned int cookie;
2223 @END
2226 /* Set info about a serial port */
2227 @REQ(set_serial_info)
2228 obj_handle_t handle; /* handle to comm port */
2229 int flags; /* bitmask to set values (see below) */
2230 unsigned int readinterval;
2231 unsigned int readconst;
2232 unsigned int readmult;
2233 unsigned int writeconst;
2234 unsigned int writemult;
2235 unsigned int eventmask;
2236 @END
2237 #define SERIALINFO_SET_TIMEOUTS 0x01
2238 #define SERIALINFO_SET_MASK 0x02
2241 /* Create an async I/O */
2242 @REQ(register_async)
2243 int type; /* type of queue to look after */
2244 async_data_t async; /* async I/O parameters */
2245 int count; /* count - usually # of bytes to be read/written */
2246 @END
2247 #define ASYNC_TYPE_READ 0x01
2248 #define ASYNC_TYPE_WRITE 0x02
2249 #define ASYNC_TYPE_WAIT 0x03
2252 /* Cancel all async op on a fd */
2253 @REQ(cancel_async)
2254 obj_handle_t handle; /* handle to comm port, socket or file */
2255 client_ptr_t iosb; /* I/O status block (NULL=all) */
2256 int only_thread; /* cancel matching this thread */
2257 @END
2260 /* Perform an ioctl on a file */
2261 @REQ(ioctl)
2262 ioctl_code_t code; /* ioctl code */
2263 async_data_t async; /* async I/O parameters */
2264 int blocking; /* whether it's a blocking ioctl */
2265 VARARG(in_data,bytes); /* ioctl input data */
2266 @REPLY
2267 obj_handle_t wait; /* handle to wait on for blocking ioctl */
2268 unsigned int options; /* device open options */
2269 VARARG(out_data,bytes); /* ioctl output data */
2270 @END
2273 /* Retrieve results of an async ioctl */
2274 @REQ(get_ioctl_result)
2275 obj_handle_t handle; /* handle to the device */
2276 client_ptr_t user_arg; /* user arg used to identify the request */
2277 @REPLY
2278 VARARG(out_data,bytes); /* ioctl output data */
2279 @END
2282 /* Create a named pipe */
2283 @REQ(create_named_pipe)
2284 unsigned int access;
2285 unsigned int attributes; /* object attributes */
2286 obj_handle_t rootdir; /* root directory */
2287 unsigned int options;
2288 unsigned int sharing;
2289 unsigned int maxinstances;
2290 unsigned int outsize;
2291 unsigned int insize;
2292 timeout_t timeout;
2293 unsigned int flags;
2294 VARARG(name,unicode_str); /* pipe name */
2295 @REPLY
2296 obj_handle_t handle; /* handle to the pipe */
2297 @END
2299 /* flags in create_named_pipe and get_named_pipe_info */
2300 #define NAMED_PIPE_MESSAGE_STREAM_WRITE 0x0001
2301 #define NAMED_PIPE_MESSAGE_STREAM_READ 0x0002
2302 #define NAMED_PIPE_NONBLOCKING_MODE 0x0004
2303 #define NAMED_PIPE_SERVER_END 0x8000
2306 @REQ(get_named_pipe_info)
2307 obj_handle_t handle;
2308 @REPLY
2309 unsigned int flags;
2310 unsigned int sharing;
2311 unsigned int maxinstances;
2312 unsigned int instances;
2313 unsigned int outsize;
2314 unsigned int insize;
2315 @END
2318 /* Create a window */
2319 @REQ(create_window)
2320 user_handle_t parent; /* parent window */
2321 user_handle_t owner; /* owner window */
2322 atom_t atom; /* class atom */
2323 mod_handle_t instance; /* module instance */
2324 VARARG(class,unicode_str); /* class name */
2325 @REPLY
2326 user_handle_t handle; /* created window */
2327 user_handle_t parent; /* full handle of parent */
2328 user_handle_t owner; /* full handle of owner */
2329 int extra; /* number of extra bytes */
2330 client_ptr_t class_ptr; /* pointer to class in client address space */
2331 @END
2334 /* Destroy a window */
2335 @REQ(destroy_window)
2336 user_handle_t handle; /* handle to the window */
2337 @END
2340 /* Retrieve the desktop window for the current thread */
2341 @REQ(get_desktop_window)
2342 int force; /* force creation if it doesn't exist */
2343 @REPLY
2344 user_handle_t top_window; /* handle to the desktop window */
2345 user_handle_t msg_window; /* handle to the top-level HWND_MESSAGE parent */
2346 @END
2349 /* Set a window owner */
2350 @REQ(set_window_owner)
2351 user_handle_t handle; /* handle to the window */
2352 user_handle_t owner; /* new owner */
2353 @REPLY
2354 user_handle_t full_owner; /* full handle of new owner */
2355 user_handle_t prev_owner; /* full handle of previous owner */
2356 @END
2359 /* Get information from a window handle */
2360 @REQ(get_window_info)
2361 user_handle_t handle; /* handle to the window */
2362 @REPLY
2363 user_handle_t full_handle; /* full 32-bit handle */
2364 user_handle_t last_active; /* last active popup */
2365 process_id_t pid; /* process owning the window */
2366 thread_id_t tid; /* thread owning the window */
2367 atom_t atom; /* class atom */
2368 int is_unicode; /* ANSI or unicode */
2369 @END
2372 /* Set some information in a window */
2373 @REQ(set_window_info)
2374 unsigned short flags; /* flags for fields to set (see below) */
2375 short int is_unicode; /* ANSI or unicode */
2376 user_handle_t handle; /* handle to the window */
2377 unsigned int style; /* window style */
2378 unsigned int ex_style; /* window extended style */
2379 unsigned int id; /* window id */
2380 mod_handle_t instance; /* creator instance */
2381 lparam_t user_data; /* user-specific data */
2382 int extra_offset; /* offset to set in extra bytes */
2383 data_size_t extra_size; /* size to set in extra bytes */
2384 lparam_t extra_value; /* value to set in extra bytes */
2385 @REPLY
2386 unsigned int old_style; /* old window style */
2387 unsigned int old_ex_style; /* old window extended style */
2388 mod_handle_t old_instance; /* old creator instance */
2389 lparam_t old_user_data; /* old user-specific data */
2390 lparam_t old_extra_value; /* old value in extra bytes */
2391 unsigned int old_id; /* old window id */
2392 @END
2393 #define SET_WIN_STYLE 0x01
2394 #define SET_WIN_EXSTYLE 0x02
2395 #define SET_WIN_ID 0x04
2396 #define SET_WIN_INSTANCE 0x08
2397 #define SET_WIN_USERDATA 0x10
2398 #define SET_WIN_EXTRA 0x20
2399 #define SET_WIN_UNICODE 0x40
2402 /* Set the parent of a window */
2403 @REQ(set_parent)
2404 user_handle_t handle; /* handle to the window */
2405 user_handle_t parent; /* handle to the parent */
2406 @REPLY
2407 user_handle_t old_parent; /* old parent window */
2408 user_handle_t full_parent; /* full handle of new parent */
2409 @END
2412 /* Get a list of the window parents, up to the root of the tree */
2413 @REQ(get_window_parents)
2414 user_handle_t handle; /* handle to the window */
2415 @REPLY
2416 int count; /* total count of parents */
2417 VARARG(parents,user_handles); /* parent handles */
2418 @END
2421 /* Get a list of the window children */
2422 @REQ(get_window_children)
2423 obj_handle_t desktop; /* handle to desktop */
2424 user_handle_t parent; /* parent window */
2425 atom_t atom; /* class atom for the listed children */
2426 thread_id_t tid; /* thread owning the listed children */
2427 VARARG(class,unicode_str); /* class name */
2428 @REPLY
2429 int count; /* total count of children */
2430 VARARG(children,user_handles); /* children handles */
2431 @END
2434 /* Get a list of the window children that contain a given point */
2435 @REQ(get_window_children_from_point)
2436 user_handle_t parent; /* parent window */
2437 int x; /* point in parent coordinates */
2438 int y;
2439 @REPLY
2440 int count; /* total count of children */
2441 VARARG(children,user_handles); /* children handles */
2442 @END
2445 /* Get window tree information from a window handle */
2446 @REQ(get_window_tree)
2447 user_handle_t handle; /* handle to the window */
2448 @REPLY
2449 user_handle_t parent; /* parent window */
2450 user_handle_t owner; /* owner window */
2451 user_handle_t next_sibling; /* next sibling in Z-order */
2452 user_handle_t prev_sibling; /* prev sibling in Z-order */
2453 user_handle_t first_sibling; /* first sibling in Z-order */
2454 user_handle_t last_sibling; /* last sibling in Z-order */
2455 user_handle_t first_child; /* first child */
2456 user_handle_t last_child; /* last child */
2457 @END
2459 /* Set the position and Z order of a window */
2460 @REQ(set_window_pos)
2461 unsigned short swp_flags; /* SWP_* flags */
2462 unsigned short paint_flags; /* paint flags (see below) */
2463 user_handle_t handle; /* handle to the window */
2464 user_handle_t previous; /* previous window in Z order */
2465 rectangle_t window; /* window rectangle (in parent coords) */
2466 rectangle_t client; /* client rectangle (in parent coords) */
2467 VARARG(valid,rectangles); /* valid rectangles from WM_NCCALCSIZE (in parent coords) */
2468 @REPLY
2469 unsigned int new_style; /* new window style */
2470 unsigned int new_ex_style; /* new window extended style */
2471 user_handle_t surface_win; /* window that needs a surface update */
2472 @END
2473 #define SET_WINPOS_PAINT_SURFACE 0x01 /* window has a paintable surface */
2474 #define SET_WINPOS_PIXEL_FORMAT 0x02 /* window has a custom pixel format */
2476 /* Get the window and client rectangles of a window */
2477 @REQ(get_window_rectangles)
2478 user_handle_t handle; /* handle to the window */
2479 int relative; /* coords relative to (see below) */
2480 @REPLY
2481 rectangle_t window; /* window rectangle */
2482 rectangle_t visible; /* visible part of the window rectangle */
2483 rectangle_t client; /* client rectangle */
2484 @END
2485 enum coords_relative
2487 COORDS_CLIENT, /* relative to client area */
2488 COORDS_WINDOW, /* relative to whole window area */
2489 COORDS_PARENT, /* relative to parent's client area */
2490 COORDS_SCREEN /* relative to screen origin */
2494 /* Get the window text */
2495 @REQ(get_window_text)
2496 user_handle_t handle; /* handle to the window */
2497 @REPLY
2498 VARARG(text,unicode_str); /* window text */
2499 @END
2502 /* Set the window text */
2503 @REQ(set_window_text)
2504 user_handle_t handle; /* handle to the window */
2505 VARARG(text,unicode_str); /* window text */
2506 @END
2509 /* Get the coordinates offset between two windows */
2510 @REQ(get_windows_offset)
2511 user_handle_t from; /* handle to the first window */
2512 user_handle_t to; /* handle to the second window */
2513 @REPLY
2514 int x; /* x coordinate offset */
2515 int y; /* y coordinate offset */
2516 int mirror; /* whether to mirror the x coordinate */
2517 @END
2520 /* Get the visible region of a window */
2521 @REQ(get_visible_region)
2522 user_handle_t window; /* handle to the window */
2523 unsigned int flags; /* DCX flags */
2524 @REPLY
2525 user_handle_t top_win; /* top window to clip against */
2526 rectangle_t top_rect; /* top window visible rect with screen coords */
2527 rectangle_t win_rect; /* window rect in screen coords */
2528 unsigned int paint_flags; /* paint flags (from SET_WINPOS_* flags) */
2529 data_size_t total_size; /* total size of the resulting region */
2530 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2531 @END
2534 /* Get the visible surface region of a window */
2535 @REQ(get_surface_region)
2536 user_handle_t window; /* handle to the window */
2537 @REPLY
2538 rectangle_t visible_rect; /* window visible rect in screen coords */
2539 data_size_t total_size; /* total size of the resulting region */
2540 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2541 @END
2544 /* Get the window region */
2545 @REQ(get_window_region)
2546 user_handle_t window; /* handle to the window */
2547 @REPLY
2548 data_size_t total_size; /* total size of the resulting region */
2549 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2550 @END
2553 /* Set the window region */
2554 @REQ(set_window_region)
2555 user_handle_t window; /* handle to the window */
2556 int redraw; /* redraw the window? */
2557 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2558 @END
2561 /* Get the window update region */
2562 @REQ(get_update_region)
2563 user_handle_t window; /* handle to the window */
2564 user_handle_t from_child; /* child to start searching from */
2565 unsigned int flags; /* update flags (see below) */
2566 @REPLY
2567 user_handle_t child; /* child to repaint (or window itself) */
2568 unsigned int flags; /* resulting update flags (see below) */
2569 data_size_t total_size; /* total size of the resulting region */
2570 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2571 @END
2572 #define UPDATE_NONCLIENT 0x01 /* get region for repainting non-client area */
2573 #define UPDATE_ERASE 0x02 /* get region for erasing client area */
2574 #define UPDATE_PAINT 0x04 /* get region for painting client area */
2575 #define UPDATE_INTERNALPAINT 0x08 /* get region if internal paint is pending */
2576 #define UPDATE_ALLCHILDREN 0x10 /* force repaint of all children */
2577 #define UPDATE_NOCHILDREN 0x20 /* don't try to repaint any children */
2578 #define UPDATE_NOREGION 0x40 /* don't return a region, only the flags */
2579 #define UPDATE_DELAYED_ERASE 0x80 /* still needs erase after BeginPaint */
2582 /* Update the z order of a window so that a given rectangle is fully visible */
2583 @REQ(update_window_zorder)
2584 user_handle_t window; /* handle to the window */
2585 rectangle_t rect; /* rectangle that must be visible (in client coords) */
2586 @END
2589 /* Mark parts of a window as needing a redraw */
2590 @REQ(redraw_window)
2591 user_handle_t window; /* handle to the window */
2592 unsigned int flags; /* RDW_* flags */
2593 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2594 @END
2597 /* Set a window property */
2598 @REQ(set_window_property)
2599 user_handle_t window; /* handle to the window */
2600 lparam_t data; /* data to store */
2601 atom_t atom; /* property atom (if no name specified) */
2602 VARARG(name,unicode_str); /* property name */
2603 @END
2606 /* Remove a window property */
2607 @REQ(remove_window_property)
2608 user_handle_t window; /* handle to the window */
2609 atom_t atom; /* property atom (if no name specified) */
2610 VARARG(name,unicode_str); /* property name */
2611 @REPLY
2612 lparam_t data; /* data stored in property */
2613 @END
2616 /* Get a window property */
2617 @REQ(get_window_property)
2618 user_handle_t window; /* handle to the window */
2619 atom_t atom; /* property atom (if no name specified) */
2620 VARARG(name,unicode_str); /* property name */
2621 @REPLY
2622 lparam_t data; /* data stored in property */
2623 @END
2626 /* Get the list of properties of a window */
2627 @REQ(get_window_properties)
2628 user_handle_t window; /* handle to the window */
2629 @REPLY
2630 int total; /* total number of properties */
2631 VARARG(props,properties); /* list of properties */
2632 @END
2635 /* Create a window station */
2636 @REQ(create_winstation)
2637 unsigned int flags; /* window station flags */
2638 unsigned int access; /* wanted access rights */
2639 unsigned int attributes; /* object attributes */
2640 VARARG(name,unicode_str); /* object name */
2641 @REPLY
2642 obj_handle_t handle; /* handle to the window station */
2643 @END
2646 /* Open a handle to a window station */
2647 @REQ(open_winstation)
2648 unsigned int access; /* wanted access rights */
2649 unsigned int attributes; /* object attributes */
2650 VARARG(name,unicode_str); /* object name */
2651 @REPLY
2652 obj_handle_t handle; /* handle to the window station */
2653 @END
2656 /* Close a window station */
2657 @REQ(close_winstation)
2658 obj_handle_t handle; /* handle to the window station */
2659 @END
2662 /* Get the process current window station */
2663 @REQ(get_process_winstation)
2664 @REPLY
2665 obj_handle_t handle; /* handle to the window station */
2666 @END
2669 /* Set the process current window station */
2670 @REQ(set_process_winstation)
2671 obj_handle_t handle; /* handle to the window station */
2672 @END
2675 /* Enumerate window stations */
2676 @REQ(enum_winstation)
2677 unsigned int index; /* current index */
2678 @REPLY
2679 unsigned int next; /* next index */
2680 VARARG(name,unicode_str); /* window station name */
2681 @END
2684 /* Create a desktop */
2685 @REQ(create_desktop)
2686 unsigned int flags; /* desktop flags */
2687 unsigned int access; /* wanted access rights */
2688 unsigned int attributes; /* object attributes */
2689 VARARG(name,unicode_str); /* object name */
2690 @REPLY
2691 obj_handle_t handle; /* handle to the desktop */
2692 @END
2695 /* Open a handle to a desktop */
2696 @REQ(open_desktop)
2697 obj_handle_t winsta; /* window station to open (null allowed) */
2698 unsigned int flags; /* desktop flags */
2699 unsigned int access; /* wanted access rights */
2700 unsigned int attributes; /* object attributes */
2701 VARARG(name,unicode_str); /* object name */
2702 @REPLY
2703 obj_handle_t handle; /* handle to the desktop */
2704 @END
2707 /* Close a desktop */
2708 @REQ(close_desktop)
2709 obj_handle_t handle; /* handle to the desktop */
2710 @END
2713 /* Get the thread current desktop */
2714 @REQ(get_thread_desktop)
2715 thread_id_t tid; /* thread id */
2716 @REPLY
2717 obj_handle_t handle; /* handle to the desktop */
2718 @END
2721 /* Set the thread current desktop */
2722 @REQ(set_thread_desktop)
2723 obj_handle_t handle; /* handle to the desktop */
2724 @END
2727 /* Enumerate desktops */
2728 @REQ(enum_desktop)
2729 obj_handle_t winstation; /* handle to the window station */
2730 unsigned int index; /* current index */
2731 @REPLY
2732 unsigned int next; /* next index */
2733 VARARG(name,unicode_str); /* window station name */
2734 @END
2737 /* Get/set information about a user object (window station or desktop) */
2738 @REQ(set_user_object_info)
2739 obj_handle_t handle; /* handle to the object */
2740 unsigned int flags; /* information to set */
2741 unsigned int obj_flags; /* new object flags */
2742 @REPLY
2743 int is_desktop; /* is object a desktop? */
2744 unsigned int old_obj_flags; /* old object flags */
2745 VARARG(name,unicode_str); /* object name */
2746 @END
2747 #define SET_USER_OBJECT_FLAGS 1
2750 /* Register a hotkey */
2751 @REQ(register_hotkey)
2752 user_handle_t window; /* handle to the window */
2753 int id; /* hotkey identifier */
2754 unsigned int flags; /* modifier keys */
2755 unsigned int vkey; /* virtual key code */
2756 @REPLY
2757 int replaced; /* did we replace an existing hotkey? */
2758 unsigned int flags; /* flags of replaced hotkey */
2759 unsigned int vkey; /* virtual key code of replaced hotkey */
2760 @END
2763 /* Unregister a hotkey */
2764 @REQ(unregister_hotkey)
2765 user_handle_t window; /* handle to the window */
2766 int id; /* hotkey identifier */
2767 @REPLY
2768 unsigned int flags; /* flags of removed hotkey */
2769 unsigned int vkey; /* virtual key code of removed hotkey */
2770 @END
2773 /* Attach (or detach) thread inputs */
2774 @REQ(attach_thread_input)
2775 thread_id_t tid_from; /* thread to be attached */
2776 thread_id_t tid_to; /* thread to which tid_from should be attached */
2777 int attach; /* is it an attach? */
2778 @END
2781 /* Get input data for a given thread */
2782 @REQ(get_thread_input)
2783 thread_id_t tid; /* id of thread */
2784 @REPLY
2785 user_handle_t focus; /* handle to the focus window */
2786 user_handle_t capture; /* handle to the capture window */
2787 user_handle_t active; /* handle to the active window */
2788 user_handle_t foreground; /* handle to the global foreground window */
2789 user_handle_t menu_owner; /* handle to the menu owner */
2790 user_handle_t move_size; /* handle to the moving/resizing window */
2791 user_handle_t caret; /* handle to the caret window */
2792 user_handle_t cursor; /* handle to the cursor */
2793 int show_count; /* cursor show count */
2794 rectangle_t rect; /* caret rectangle */
2795 @END
2798 /* Get the time of the last input event */
2799 @REQ(get_last_input_time)
2800 @REPLY
2801 unsigned int time;
2802 @END
2805 /* Retrieve queue keyboard state for a given thread */
2806 @REQ(get_key_state)
2807 thread_id_t tid; /* id of thread */
2808 int key; /* optional key code or -1 */
2809 @REPLY
2810 unsigned char state; /* state of specified key */
2811 VARARG(keystate,bytes); /* state array for all the keys */
2812 @END
2814 /* Set queue keyboard state for a given thread */
2815 @REQ(set_key_state)
2816 thread_id_t tid; /* id of thread */
2817 int async; /* whether to change the async state too */
2818 VARARG(keystate,bytes); /* state array for all the keys */
2819 @END
2821 /* Set the system foreground window */
2822 @REQ(set_foreground_window)
2823 user_handle_t handle; /* handle to the foreground window */
2824 @REPLY
2825 user_handle_t previous; /* handle to the previous foreground window */
2826 int send_msg_old; /* whether we have to send a msg to the old window */
2827 int send_msg_new; /* whether we have to send a msg to the new window */
2828 @END
2830 /* Set the current thread focus window */
2831 @REQ(set_focus_window)
2832 user_handle_t handle; /* handle to the focus window */
2833 @REPLY
2834 user_handle_t previous; /* handle to the previous focus window */
2835 @END
2837 /* Set the current thread active window */
2838 @REQ(set_active_window)
2839 user_handle_t handle; /* handle to the active window */
2840 @REPLY
2841 user_handle_t previous; /* handle to the previous active window */
2842 @END
2844 /* Set the current thread capture window */
2845 @REQ(set_capture_window)
2846 user_handle_t handle; /* handle to the capture window */
2847 unsigned int flags; /* capture flags (see below) */
2848 @REPLY
2849 user_handle_t previous; /* handle to the previous capture window */
2850 user_handle_t full_handle; /* full 32-bit handle of new capture window */
2851 @END
2852 #define CAPTURE_MENU 0x01 /* capture is for a menu */
2853 #define CAPTURE_MOVESIZE 0x02 /* capture is for moving/resizing */
2856 /* Set the current thread caret window */
2857 @REQ(set_caret_window)
2858 user_handle_t handle; /* handle to the caret window */
2859 int width; /* caret width */
2860 int height; /* caret height */
2861 @REPLY
2862 user_handle_t previous; /* handle to the previous caret window */
2863 rectangle_t old_rect; /* previous caret rectangle */
2864 int old_hide; /* previous hide count */
2865 int old_state; /* previous caret state (1=on, 0=off) */
2866 @END
2869 /* Set the current thread caret information */
2870 @REQ(set_caret_info)
2871 unsigned int flags; /* caret flags (see below) */
2872 user_handle_t handle; /* handle to the caret window */
2873 int x; /* caret x position */
2874 int y; /* caret y position */
2875 int hide; /* increment for hide count (can be negative to show it) */
2876 int state; /* caret state (1=on, 0=off, -1=toggle current state) */
2877 @REPLY
2878 user_handle_t full_handle; /* handle to the current caret window */
2879 rectangle_t old_rect; /* previous caret rectangle */
2880 int old_hide; /* previous hide count */
2881 int old_state; /* previous caret state (1=on, 0=off) */
2882 @END
2883 #define SET_CARET_POS 0x01 /* set the caret position from x,y */
2884 #define SET_CARET_HIDE 0x02 /* increment the caret hide count */
2885 #define SET_CARET_STATE 0x04 /* set the caret on/off state */
2888 /* Set a window hook */
2889 @REQ(set_hook)
2890 int id; /* id of the hook */
2891 process_id_t pid; /* id of process to set the hook into */
2892 thread_id_t tid; /* id of thread to set the hook into */
2893 int event_min;
2894 int event_max;
2895 client_ptr_t proc; /* hook procedure */
2896 int flags;
2897 int unicode; /* is it a unicode hook? */
2898 VARARG(module,unicode_str); /* module name */
2899 @REPLY
2900 user_handle_t handle; /* handle to the hook */
2901 unsigned int active_hooks; /* active hooks bitmap */
2902 @END
2905 /* Remove a window hook */
2906 @REQ(remove_hook)
2907 user_handle_t handle; /* handle to the hook */
2908 client_ptr_t proc; /* hook procedure if handle is 0 */
2909 int id; /* id of the hook if handle is 0 */
2910 @REPLY
2911 unsigned int active_hooks; /* active hooks bitmap */
2912 @END
2915 /* Start calling a hook chain */
2916 @REQ(start_hook_chain)
2917 int id; /* id of the hook */
2918 int event; /* signalled event */
2919 user_handle_t window; /* handle to the event window */
2920 int object_id; /* object id for out of context winevent */
2921 int child_id; /* child id for out of context winevent */
2922 @REPLY
2923 user_handle_t handle; /* handle to the next hook */
2924 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2925 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2926 int unicode; /* is it a unicode hook? */
2927 client_ptr_t proc; /* hook procedure */
2928 unsigned int active_hooks; /* active hooks bitmap */
2929 VARARG(module,unicode_str); /* module name */
2930 @END
2933 /* Finished calling a hook chain */
2934 @REQ(finish_hook_chain)
2935 int id; /* id of the hook */
2936 @END
2939 /* Get the hook information */
2940 @REQ(get_hook_info)
2941 user_handle_t handle; /* handle to the current hook */
2942 int get_next; /* do we want info about current or next hook? */
2943 int event; /* signalled event */
2944 user_handle_t window; /* handle to the event window */
2945 int object_id; /* object id for out of context winevent */
2946 int child_id; /* child id for out of context winevent */
2947 @REPLY
2948 user_handle_t handle; /* handle to the hook */
2949 int id; /* id of the hook */
2950 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2951 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2952 client_ptr_t proc; /* hook procedure */
2953 int unicode; /* is it a unicode hook? */
2954 VARARG(module,unicode_str); /* module name */
2955 @END
2958 /* Create a window class */
2959 @REQ(create_class)
2960 int local; /* is it a local class? */
2961 atom_t atom; /* class atom */
2962 unsigned int style; /* class style */
2963 mod_handle_t instance; /* module instance */
2964 int extra; /* number of extra class bytes */
2965 int win_extra; /* number of window extra bytes */
2966 client_ptr_t client_ptr; /* pointer to class in client address space */
2967 VARARG(name,unicode_str); /* class name */
2968 @REPLY
2969 atom_t atom; /* resulting class atom */
2970 @END
2973 /* Destroy a window class */
2974 @REQ(destroy_class)
2975 atom_t atom; /* class atom */
2976 mod_handle_t instance; /* module instance */
2977 VARARG(name,unicode_str); /* class name */
2978 @REPLY
2979 client_ptr_t client_ptr; /* pointer to class in client address space */
2980 @END
2983 /* Set some information in a class */
2984 @REQ(set_class_info)
2985 user_handle_t window; /* handle to the window */
2986 unsigned int flags; /* flags for info to set (see below) */
2987 atom_t atom; /* class atom */
2988 unsigned int style; /* class style */
2989 int win_extra; /* number of window extra bytes */
2990 mod_handle_t instance; /* module instance */
2991 int extra_offset; /* offset to set in extra bytes */
2992 data_size_t extra_size; /* size to set in extra bytes */
2993 lparam_t extra_value; /* value to set in extra bytes */
2994 @REPLY
2995 atom_t old_atom; /* previous class atom */
2996 unsigned int old_style; /* previous class style */
2997 int old_extra; /* previous number of class extra bytes */
2998 int old_win_extra; /* previous number of window extra bytes */
2999 mod_handle_t old_instance; /* previous module instance */
3000 lparam_t old_extra_value; /* old value in extra bytes */
3001 @END
3002 #define SET_CLASS_ATOM 0x0001
3003 #define SET_CLASS_STYLE 0x0002
3004 #define SET_CLASS_WINEXTRA 0x0004
3005 #define SET_CLASS_INSTANCE 0x0008
3006 #define SET_CLASS_EXTRA 0x0010
3009 /* Set/get clipboard information */
3010 @REQ(set_clipboard_info)
3011 unsigned int flags; /* flags for fields to set (see below) */
3012 user_handle_t clipboard; /* clipboard window */
3013 user_handle_t owner; /* clipboard owner */
3014 user_handle_t viewer; /* first clipboard viewer */
3015 unsigned int seqno; /* change sequence number */
3016 @REPLY
3017 unsigned int flags; /* status flags (see below) */
3018 user_handle_t old_clipboard; /* old clipboard window */
3019 user_handle_t old_owner; /* old clipboard owner */
3020 user_handle_t old_viewer; /* old clipboard viewer */
3021 unsigned int seqno; /* current sequence number */
3022 @END
3024 #define SET_CB_OPEN 0x001
3025 #define SET_CB_OWNER 0x002
3026 #define SET_CB_VIEWER 0x004
3027 #define SET_CB_SEQNO 0x008
3028 #define SET_CB_RELOWNER 0x010
3029 #define SET_CB_CLOSE 0x020
3030 #define CB_OPEN 0x040
3031 #define CB_OWNER 0x080
3032 #define CB_PROCESS 0x100
3035 /* Open a security token */
3036 @REQ(open_token)
3037 obj_handle_t handle; /* handle to the thread or process */
3038 unsigned int access; /* access rights to the new token */
3039 unsigned int attributes;/* object attributes */
3040 unsigned int flags; /* flags (see below) */
3041 @REPLY
3042 obj_handle_t token; /* handle to the token */
3043 @END
3044 #define OPEN_TOKEN_THREAD 1
3045 #define OPEN_TOKEN_AS_SELF 2
3048 /* Set/get the global windows */
3049 @REQ(set_global_windows)
3050 unsigned int flags; /* flags for fields to set (see below) */
3051 user_handle_t shell_window; /* handle to the new shell window */
3052 user_handle_t shell_listview; /* handle to the new shell listview window */
3053 user_handle_t progman_window; /* handle to the new program manager window */
3054 user_handle_t taskman_window; /* handle to the new task manager window */
3055 @REPLY
3056 user_handle_t old_shell_window; /* handle to the shell window */
3057 user_handle_t old_shell_listview; /* handle to the shell listview window */
3058 user_handle_t old_progman_window; /* handle to the new program manager window */
3059 user_handle_t old_taskman_window; /* handle to the new task manager window */
3060 @END
3061 #define SET_GLOBAL_SHELL_WINDOWS 0x01 /* set both main shell and listview windows */
3062 #define SET_GLOBAL_PROGMAN_WINDOW 0x02
3063 #define SET_GLOBAL_TASKMAN_WINDOW 0x04
3065 /* Adjust the privileges held by a token */
3066 @REQ(adjust_token_privileges)
3067 obj_handle_t handle; /* handle to the token */
3068 int disable_all; /* disable all privileges? */
3069 int get_modified_state; /* get modified privileges? */
3070 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to enable/disable/remove */
3071 @REPLY
3072 unsigned int len; /* total length in bytes required to store token privileges */
3073 VARARG(privileges,LUID_AND_ATTRIBUTES); /* modified privileges */
3074 @END
3076 /* Retrieves the set of privileges held by or available to a token */
3077 @REQ(get_token_privileges)
3078 obj_handle_t handle; /* handle to the token */
3079 @REPLY
3080 unsigned int len; /* total length in bytes required to store token privileges */
3081 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
3082 @END
3084 /* Check the token has the required privileges */
3085 @REQ(check_token_privileges)
3086 obj_handle_t handle; /* handle to the token */
3087 int all_required; /* are all the privileges required for the check to succeed? */
3088 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to check */
3089 @REPLY
3090 int has_privileges; /* does the token have the required privileges? */
3091 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
3092 @END
3094 @REQ(duplicate_token)
3095 obj_handle_t handle; /* handle to the token to duplicate */
3096 unsigned int access; /* access rights to the new token */
3097 unsigned int attributes; /* object attributes */
3098 int primary; /* is the new token to be a primary one? */
3099 int impersonation_level; /* impersonation level of the new token */
3100 @REPLY
3101 obj_handle_t new_handle; /* duplicated handle */
3102 @END
3104 @REQ(access_check)
3105 obj_handle_t handle; /* handle to the token */
3106 unsigned int desired_access; /* desired access to the object */
3107 unsigned int mapping_read; /* mapping from generic read to specific rights */
3108 unsigned int mapping_write; /* mapping from generic write to specific rights */
3109 unsigned int mapping_execute; /* mapping from generic execute to specific rights */
3110 unsigned int mapping_all; /* mapping from generic all to specific rights */
3111 VARARG(sd,security_descriptor); /* security descriptor to check */
3112 @REPLY
3113 unsigned int access_granted; /* access rights actually granted */
3114 unsigned int access_status; /* was access granted? */
3115 unsigned int privileges_len; /* length needed to store privileges */
3116 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges used during access check */
3117 @END
3119 @REQ(get_token_sid)
3120 obj_handle_t handle; /* handle to the token */
3121 unsigned int which_sid; /* which SID to retrieve from the token */
3122 @REPLY
3123 data_size_t sid_len; /* length needed to store sid */
3124 VARARG(sid,SID); /* the sid specified by which_sid from the token */
3125 @END
3127 @REQ(get_token_groups)
3128 obj_handle_t handle; /* handle to the token */
3129 @REPLY
3130 data_size_t user_len; /* length needed to store user */
3131 VARARG(user,token_groups); /* groups the token's user belongs to */
3132 @END
3134 @REQ(get_token_default_dacl)
3135 obj_handle_t handle; /* handle to the token */
3136 @REPLY
3137 data_size_t acl_len; /* length needed to store access control list */
3138 VARARG(acl,ACL); /* access control list */
3139 @END
3141 @REQ(set_token_default_dacl)
3142 obj_handle_t handle; /* handle to the token */
3143 VARARG(acl,ACL); /* default dacl to set */
3144 @END
3146 @REQ(set_security_object)
3147 obj_handle_t handle; /* handle to the object */
3148 unsigned int security_info; /* which parts of security descriptor to set */
3149 VARARG(sd,security_descriptor); /* security descriptor to set */
3150 @END
3152 @REQ(get_security_object)
3153 obj_handle_t handle; /* handle to the object */
3154 unsigned int security_info; /* which parts of security descriptor to get */
3155 @REPLY
3156 unsigned int sd_len; /* buffer size needed for sd */
3157 VARARG(sd,security_descriptor); /* retrieved security descriptor */
3158 @END
3160 /* Create a mailslot */
3161 @REQ(create_mailslot)
3162 unsigned int access; /* wanted access rights */
3163 unsigned int attributes; /* object attributes */
3164 obj_handle_t rootdir; /* root directory */
3165 timeout_t read_timeout;
3166 unsigned int max_msgsize;
3167 VARARG(name,unicode_str); /* mailslot name */
3168 @REPLY
3169 obj_handle_t handle; /* handle to the mailslot */
3170 @END
3173 /* Set mailslot information */
3174 @REQ(set_mailslot_info)
3175 obj_handle_t handle; /* handle to the mailslot */
3176 timeout_t read_timeout;
3177 unsigned int flags;
3178 @REPLY
3179 timeout_t read_timeout;
3180 unsigned int max_msgsize;
3181 @END
3182 #define MAILSLOT_SET_READ_TIMEOUT 1
3185 /* Create a directory object */
3186 @REQ(create_directory)
3187 unsigned int access; /* access flags */
3188 unsigned int attributes; /* object attributes */
3189 obj_handle_t rootdir; /* root directory */
3190 VARARG(directory_name,unicode_str); /* Directory name */
3191 @REPLY
3192 obj_handle_t handle; /* handle to the directory */
3193 @END
3196 /* Open a directory object */
3197 @REQ(open_directory)
3198 unsigned int access; /* access flags */
3199 unsigned int attributes; /* object attributes */
3200 obj_handle_t rootdir; /* root directory */
3201 VARARG(directory_name,unicode_str); /* Directory name */
3202 @REPLY
3203 obj_handle_t handle; /* handle to the directory */
3204 @END
3207 /* Get a directory entry by index */
3208 @REQ(get_directory_entry)
3209 obj_handle_t handle; /* handle to the directory */
3210 unsigned int index; /* entry index */
3211 @REPLY
3212 data_size_t name_len; /* length of the entry name in bytes */
3213 VARARG(name,unicode_str,name_len); /* entry name */
3214 VARARG(type,unicode_str); /* entry type */
3215 @END
3218 /* Create a symbolic link object */
3219 @REQ(create_symlink)
3220 unsigned int access; /* access flags */
3221 unsigned int attributes; /* object attributes */
3222 obj_handle_t rootdir; /* root directory */
3223 data_size_t name_len; /* length of the symlink name in bytes */
3224 VARARG(name,unicode_str,name_len); /* symlink name */
3225 VARARG(target_name,unicode_str); /* target name */
3226 @REPLY
3227 obj_handle_t handle; /* handle to the symlink */
3228 @END
3231 /* Open a symbolic link object */
3232 @REQ(open_symlink)
3233 unsigned int access; /* access flags */
3234 unsigned int attributes; /* object attributes */
3235 obj_handle_t rootdir; /* root directory */
3236 VARARG(name,unicode_str); /* symlink name */
3237 @REPLY
3238 obj_handle_t handle; /* handle to the symlink */
3239 @END
3242 /* Query a symbolic link object */
3243 @REQ(query_symlink)
3244 obj_handle_t handle; /* handle to the symlink */
3245 @REPLY
3246 data_size_t total; /* total needed size for name */
3247 VARARG(target_name,unicode_str); /* target name */
3248 @END
3251 /* Query basic object information */
3252 @REQ(get_object_info)
3253 obj_handle_t handle; /* handle to the object */
3254 @REPLY
3255 unsigned int access; /* granted access mask */
3256 unsigned int ref_count; /* object ref count */
3257 data_size_t total; /* total needed size for name */
3258 VARARG(name,unicode_str); /* object name */
3259 @END
3262 /* Unlink a named object */
3263 @REQ(unlink_object)
3264 obj_handle_t handle; /* handle to the object */
3265 @END
3268 /* Query the impersonation level of an impersonation token */
3269 @REQ(get_token_impersonation_level)
3270 obj_handle_t handle; /* handle to the object */
3271 @REPLY
3272 int impersonation_level; /* impersonation level of the impersonation token */
3273 @END
3275 /* Allocate a locally-unique identifier */
3276 @REQ(allocate_locally_unique_id)
3277 @REPLY
3278 luid_t luid;
3279 @END
3282 /* Create a device manager */
3283 @REQ(create_device_manager)
3284 unsigned int access; /* wanted access rights */
3285 unsigned int attributes; /* object attributes */
3286 @REPLY
3287 obj_handle_t handle; /* handle to the device */
3288 @END
3291 /* Create a device */
3292 @REQ(create_device)
3293 unsigned int access; /* wanted access rights */
3294 unsigned int attributes; /* object attributes */
3295 obj_handle_t rootdir; /* root directory */
3296 client_ptr_t user_ptr; /* opaque ptr for use by client */
3297 obj_handle_t manager; /* device manager */
3298 VARARG(name,unicode_str); /* object name */
3299 @REPLY
3300 obj_handle_t handle; /* handle to the device */
3301 @END
3304 /* Delete a device */
3305 @REQ(delete_device)
3306 obj_handle_t handle; /* handle to the device */
3307 @END
3310 /* Retrieve the next pending device ioctl request */
3311 @REQ(get_next_device_request)
3312 obj_handle_t manager; /* handle to the device manager */
3313 obj_handle_t prev; /* handle to the previous ioctl */
3314 unsigned int status; /* status of the previous ioctl */
3315 VARARG(prev_data,bytes); /* output data of the previous ioctl */
3316 @REPLY
3317 obj_handle_t next; /* handle to the next ioctl */
3318 ioctl_code_t code; /* ioctl code */
3319 client_ptr_t user_ptr; /* opaque ptr for the device */
3320 process_id_t client_pid; /* pid of process calling ioctl */
3321 thread_id_t client_tid; /* tid of thread calling ioctl */
3322 data_size_t in_size; /* total needed input size */
3323 data_size_t out_size; /* needed output size */
3324 VARARG(next_data,bytes); /* input data of the next ioctl */
3325 @END
3328 /* Make the current process a system process */
3329 @REQ(make_process_system)
3330 @REPLY
3331 obj_handle_t event; /* event signaled when all user processes have exited */
3332 @END
3335 /* Get detailed fixed-size information about a token */
3336 @REQ(get_token_statistics)
3337 obj_handle_t handle; /* handle to the object */
3338 @REPLY
3339 luid_t token_id; /* locally-unique identifier of the token */
3340 luid_t modified_id; /* locally-unique identifier of the modified version of the token */
3341 int primary; /* is the token primary or impersonation? */
3342 int impersonation_level; /* level of impersonation */
3343 int group_count; /* the number of groups the token is a member of */
3344 int privilege_count; /* the number of privileges the token has */
3345 @END
3348 /* Create I/O completion port */
3349 @REQ(create_completion)
3350 unsigned int access; /* desired access to a port */
3351 unsigned int attributes; /* object attributes */
3352 unsigned int concurrent; /* max number of concurrent active threads */
3353 obj_handle_t rootdir; /* root directory */
3354 VARARG(filename,string); /* port name */
3355 @REPLY
3356 obj_handle_t handle; /* port handle */
3357 @END
3360 /* Open I/O completion port */
3361 @REQ(open_completion)
3362 unsigned int access; /* desired access to a port */
3363 unsigned int attributes; /* object attributes */
3364 obj_handle_t rootdir; /* root directory */
3365 VARARG(filename,string); /* port name */
3366 @REPLY
3367 obj_handle_t handle; /* port handle */
3368 @END
3371 /* add completion to completion port */
3372 @REQ(add_completion)
3373 obj_handle_t handle; /* port handle */
3374 apc_param_t ckey; /* completion key */
3375 apc_param_t cvalue; /* completion value */
3376 apc_param_t information; /* IO_STATUS_BLOCK Information */
3377 unsigned int status; /* completion result */
3378 @END
3381 /* get completion from completion port queue */
3382 @REQ(remove_completion)
3383 obj_handle_t handle; /* port handle */
3384 @REPLY
3385 apc_param_t ckey; /* completion key */
3386 apc_param_t cvalue; /* completion value */
3387 apc_param_t information; /* IO_STATUS_BLOCK Information */
3388 unsigned int status; /* completion result */
3389 @END
3392 /* get completion queue depth */
3393 @REQ(query_completion)
3394 obj_handle_t handle; /* port handle */
3395 @REPLY
3396 unsigned int depth; /* completion queue depth */
3397 @END
3400 /* associate object with completion port */
3401 @REQ(set_completion_info)
3402 obj_handle_t handle; /* object handle */
3403 apc_param_t ckey; /* completion key */
3404 obj_handle_t chandle; /* port handle */
3405 @END
3408 /* check for associated completion and push msg */
3409 @REQ(add_fd_completion)
3410 obj_handle_t handle; /* async' object */
3411 apc_param_t cvalue; /* completion value */
3412 apc_param_t information; /* IO_STATUS_BLOCK Information */
3413 unsigned int status; /* completion status */
3414 @END
3417 /* Retrieve layered info for a window */
3418 @REQ(get_window_layered_info)
3419 user_handle_t handle; /* handle to the window */
3420 @REPLY
3421 unsigned int color_key; /* color key */
3422 unsigned int alpha; /* alpha (0..255) */
3423 unsigned int flags; /* LWA_* flags */
3424 @END
3427 /* Set layered info for a window */
3428 @REQ(set_window_layered_info)
3429 user_handle_t handle; /* handle to the window */
3430 unsigned int color_key; /* color key */
3431 unsigned int alpha; /* alpha (0..255) */
3432 unsigned int flags; /* LWA_* flags */
3433 @END
3436 /* Allocate an arbitrary user handle */
3437 @REQ(alloc_user_handle)
3438 @REPLY
3439 user_handle_t handle; /* allocated handle */
3440 @END
3443 /* Free an arbitrary user handle */
3444 @REQ(free_user_handle)
3445 user_handle_t handle; /* handle to free*/
3446 @END
3449 /* Set/get the current cursor */
3450 @REQ(set_cursor)
3451 unsigned int flags; /* flags for fields to set (see below) */
3452 user_handle_t handle; /* handle to the cursor */
3453 int show_count; /* show count increment/decrement */
3454 int x; /* cursor position */
3455 int y;
3456 rectangle_t clip; /* cursor clip rectangle */
3457 unsigned int clip_msg; /* message to post on cursor clip changes */
3458 @REPLY
3459 user_handle_t prev_handle; /* previous handle */
3460 int prev_count; /* previous show count */
3461 int prev_x; /* previous position */
3462 int prev_y;
3463 int new_x; /* new position */
3464 int new_y;
3465 rectangle_t new_clip; /* new clip rectangle */
3466 unsigned int last_change; /* time of last position change */
3467 @END
3468 #define SET_CURSOR_HANDLE 0x01
3469 #define SET_CURSOR_COUNT 0x02
3470 #define SET_CURSOR_POS 0x04
3471 #define SET_CURSOR_CLIP 0x08
3472 #define SET_CURSOR_NOCLIP 0x10
3475 /* Modify the list of registered rawinput devices */
3476 @REQ(update_rawinput_devices)
3477 VARARG(devices,rawinput_devices);
3478 @END
3481 /* Retrieve the suspended context of a thread */
3482 @REQ(get_suspend_context)
3483 @REPLY
3484 VARARG(context,context); /* thread context */
3485 @END
3488 /* Store the suspend context of a thread */
3489 @REQ(set_suspend_context)
3490 VARARG(context,context); /* thread context */
3491 @END