d3d10core/tests: Remove dead code.
[wine.git] / server / protocol.def
bloba5a45eb6253a90e9212a9d345513e070e07c949a
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 } debug_event_t;
133 /* supported CPU types */
134 enum cpu_type
136 CPU_x86, CPU_x86_64, CPU_POWERPC, CPU_ARM, CPU_ARM64
138 typedef int cpu_type_t;
140 /* context data */
141 typedef struct
143 cpu_type_t cpu; /* cpu type */
144 unsigned int flags; /* SERVER_CTX_* flags */
145 union
147 struct { unsigned int eip, ebp, esp, eflags, cs, ss; } i386_regs;
148 struct { unsigned __int64 rip, rbp, rsp;
149 unsigned int cs, ss, flags, __pad; } x86_64_regs;
150 struct { unsigned int iar, msr, ctr, lr, dar, dsisr, trap, __pad; } powerpc_regs;
151 struct { unsigned int sp, lr, pc, cpsr; } arm_regs;
152 struct { unsigned __int64 sp, pc, pstate; } arm64_regs;
153 } ctl; /* selected by SERVER_CTX_CONTROL */
154 union
156 struct { unsigned int eax, ebx, ecx, edx, esi, edi; } i386_regs;
157 struct { unsigned __int64 rax,rbx, rcx, rdx, rsi, rdi,
158 r8, r9, r10, r11, r12, r13, r14, r15; } x86_64_regs;
159 struct { unsigned int gpr[32], cr, xer; } powerpc_regs;
160 struct { unsigned int r[13]; } arm_regs;
161 struct { unsigned __int64 x[31]; } arm64_regs;
162 } integer; /* selected by SERVER_CTX_INTEGER */
163 union
165 struct { unsigned int ds, es, fs, gs; } i386_regs;
166 struct { unsigned int ds, es, fs, gs; } x86_64_regs;
167 } seg; /* selected by SERVER_CTX_SEGMENTS */
168 union
170 struct { unsigned int ctrl, status, tag, err_off, err_sel, data_off, data_sel, cr0npx;
171 unsigned char regs[80]; } i386_regs;
172 struct { struct { unsigned __int64 low, high; } fpregs[32]; } x86_64_regs;
173 struct { double fpr[32], fpscr; } powerpc_regs;
174 } fp; /* selected by SERVER_CTX_FLOATING_POINT */
175 union
177 struct { unsigned int dr0, dr1, dr2, dr3, dr6, dr7; } i386_regs;
178 struct { unsigned __int64 dr0, dr1, dr2, dr3, dr6, dr7; } x86_64_regs;
179 struct { unsigned int dr[8]; } powerpc_regs;
180 } debug; /* selected by SERVER_CTX_DEBUG_REGISTERS */
181 union
183 unsigned char i386_regs[512];
184 } ext; /* selected by SERVER_CTX_EXTENDED_REGISTERS */
185 } context_t;
187 #define SERVER_CTX_CONTROL 0x01
188 #define SERVER_CTX_INTEGER 0x02
189 #define SERVER_CTX_SEGMENTS 0x04
190 #define SERVER_CTX_FLOATING_POINT 0x08
191 #define SERVER_CTX_DEBUG_REGISTERS 0x10
192 #define SERVER_CTX_EXTENDED_REGISTERS 0x20
194 /* structure used in sending an fd from client to server */
195 struct send_fd
197 thread_id_t tid; /* thread id */
198 int fd; /* file descriptor on client-side */
201 /* structure sent by the server on the wait fifo */
202 struct wake_up_reply
204 client_ptr_t cookie; /* magic cookie that was passed in select_request */
205 int signaled; /* wait result */
206 int __pad;
209 /* NT-style timeout, in 100ns units, negative means relative timeout */
210 typedef __int64 timeout_t;
211 #define TIMEOUT_INFINITE (((timeout_t)0x7fffffff) << 32 | 0xffffffff)
213 /* structure for process startup info */
214 typedef struct
216 unsigned int debug_flags;
217 unsigned int console_flags;
218 obj_handle_t console;
219 obj_handle_t hstdin;
220 obj_handle_t hstdout;
221 obj_handle_t hstderr;
222 unsigned int x;
223 unsigned int y;
224 unsigned int xsize;
225 unsigned int ysize;
226 unsigned int xchars;
227 unsigned int ychars;
228 unsigned int attribute;
229 unsigned int flags;
230 unsigned int show;
231 data_size_t curdir_len;
232 data_size_t dllpath_len;
233 data_size_t imagepath_len;
234 data_size_t cmdline_len;
235 data_size_t title_len;
236 data_size_t desktop_len;
237 data_size_t shellinfo_len;
238 data_size_t runtime_len;
239 /* VARARG(curdir,unicode_str,curdir_len); */
240 /* VARARG(dllpath,unicode_str,dllpath_len); */
241 /* VARARG(imagepath,unicode_str,imagepath_len); */
242 /* VARARG(cmdline,unicode_str,cmdline_len); */
243 /* VARARG(title,unicode_str,title_len); */
244 /* VARARG(desktop,unicode_str,desktop_len); */
245 /* VARARG(shellinfo,unicode_str,shellinfo_len); */
246 /* VARARG(runtime,unicode_str,runtime_len); */
247 } startup_info_t;
249 /* structure returned in the list of window properties */
250 typedef struct
252 atom_t atom; /* property atom */
253 int string; /* was atom a string originally? */
254 lparam_t data; /* data stored in property */
255 } property_data_t;
257 /* structure to specify window rectangles */
258 typedef struct
260 int left;
261 int top;
262 int right;
263 int bottom;
264 } rectangle_t;
266 /* structure for parameters of async I/O calls */
267 typedef struct
269 obj_handle_t handle; /* object to perform I/O on */
270 obj_handle_t event; /* event to signal when done */
271 client_ptr_t callback; /* client-side callback to call upon end of async */
272 client_ptr_t iosb; /* I/O status block in client addr space */
273 client_ptr_t arg; /* opaque user data to pass to callback */
274 apc_param_t cvalue; /* completion value to use for completion events */
275 } async_data_t;
277 /* structures for extra message data */
279 struct hardware_msg_data
281 lparam_t info; /* extra info */
282 unsigned int hw_id; /* unique id */
283 unsigned int flags; /* hook flags */
284 union
286 int type;
287 struct
289 int type; /* RIM_TYPEKEYBOARD */
290 unsigned int message; /* message generated by this rawinput event */
291 unsigned short vkey; /* virtual key code */
292 unsigned short scan; /* scan code */
293 } kbd;
294 struct
296 int type; /* RIM_TYPEMOUSE */
297 int x; /* x coordinate */
298 int y; /* y coordinate */
299 unsigned int data; /* mouse data */
300 } mouse;
301 } rawinput;
304 struct callback_msg_data
306 client_ptr_t callback; /* callback function */
307 lparam_t data; /* user data for callback */
308 lparam_t result; /* message result */
311 struct winevent_msg_data
313 user_handle_t hook; /* hook handle */
314 thread_id_t tid; /* thread id */
315 client_ptr_t hook_proc; /* hook proc address */
316 /* followed by module name if any */
319 typedef union
321 int type;
322 struct
324 int type; /* INPUT_KEYBOARD */
325 unsigned short vkey; /* virtual key code */
326 unsigned short scan; /* scan code */
327 unsigned int flags; /* event flags */
328 unsigned int time; /* event time */
329 lparam_t info; /* extra info */
330 } kbd;
331 struct
333 int type; /* INPUT_MOUSE */
334 int x; /* coordinates */
335 int y;
336 unsigned int data; /* mouse data */
337 unsigned int flags; /* event flags */
338 unsigned int time; /* event time */
339 lparam_t info; /* extra info */
340 } mouse;
341 struct
343 int type; /* INPUT_HARDWARE */
344 unsigned int msg; /* message code */
345 lparam_t lparam; /* message param */
346 } hw;
347 } hw_input_t;
349 typedef union
351 unsigned char bytes[1]; /* raw data for sent messages */
352 struct hardware_msg_data hardware;
353 struct callback_msg_data callback;
354 struct winevent_msg_data winevent;
355 } message_data_t;
357 /* structure for console char/attribute info */
358 typedef struct
360 WCHAR ch;
361 unsigned short attr;
362 } char_info_t;
364 /* structure returned in filesystem events */
365 struct filesystem_event
367 int action;
368 data_size_t len;
369 char name[1];
372 typedef struct
374 unsigned int low_part;
375 int high_part;
376 } luid_t;
378 #define MAX_ACL_LEN 65535
380 struct security_descriptor
382 unsigned int control; /* SE_ flags */
383 data_size_t owner_len;
384 data_size_t group_len;
385 data_size_t sacl_len;
386 data_size_t dacl_len;
387 /* VARARG(owner,SID); */
388 /* VARARG(group,SID); */
389 /* VARARG(sacl,ACL); */
390 /* VARARG(dacl,ACL); */
393 struct object_attributes
395 obj_handle_t rootdir; /* root directory */
396 unsigned int attributes; /* object attributes */
397 data_size_t sd_len; /* length of security_descriptor data. may be 0 */
398 data_size_t name_len; /* length of the name string. may be 0 */
399 /* VARARG(sd,security_descriptor); */
400 /* VARARG(name,unicode_str); */
403 struct token_groups
405 unsigned int count;
406 /* unsigned int attributes[count]; */
407 /* VARARG(sids,SID); */
410 enum select_op
412 SELECT_NONE,
413 SELECT_WAIT,
414 SELECT_WAIT_ALL,
415 SELECT_SIGNAL_AND_WAIT,
416 SELECT_KEYED_EVENT_WAIT,
417 SELECT_KEYED_EVENT_RELEASE
420 typedef union
422 enum select_op op;
423 struct
425 enum select_op op; /* SELECT_WAIT or SELECT_WAIT_ALL */
426 obj_handle_t handles[MAXIMUM_WAIT_OBJECTS];
427 } wait;
428 struct
430 enum select_op op; /* SELECT_SIGNAL_AND_WAIT */
431 obj_handle_t wait;
432 obj_handle_t signal; /* must be last in the structure so we can remove it on retries */
433 } signal_and_wait;
434 struct
436 enum select_op op; /* SELECT_KEYED_EVENT_WAIT or SELECT_KEYED_EVENT_RELEASE */
437 obj_handle_t handle;
438 client_ptr_t key;
439 } keyed_event;
440 } select_op_t;
442 enum apc_type
444 APC_NONE,
445 APC_USER,
446 APC_TIMER,
447 APC_ASYNC_IO,
448 APC_VIRTUAL_ALLOC,
449 APC_VIRTUAL_FREE,
450 APC_VIRTUAL_QUERY,
451 APC_VIRTUAL_PROTECT,
452 APC_VIRTUAL_FLUSH,
453 APC_VIRTUAL_LOCK,
454 APC_VIRTUAL_UNLOCK,
455 APC_MAP_VIEW,
456 APC_UNMAP_VIEW,
457 APC_CREATE_THREAD
460 typedef union
462 enum apc_type type;
463 struct
465 enum apc_type type; /* APC_USER */
466 int __pad;
467 client_ptr_t func; /* void (__stdcall *func)(ULONG_PTR,ULONG_PTR,ULONG_PTR); */
468 apc_param_t args[3]; /* arguments for user function */
469 } user;
470 struct
472 enum apc_type type; /* APC_TIMER */
473 int __pad;
474 client_ptr_t func; /* void (__stdcall *func)(void*, unsigned int, unsigned int); */
475 timeout_t time; /* absolute time of expiration */
476 client_ptr_t arg; /* user argument */
477 } timer;
478 struct
480 enum apc_type type; /* APC_ASYNC_IO */
481 unsigned int status; /* I/O status */
482 client_ptr_t func; /* unsigned int (*func)(void*, void*, unsigned int, void**, void**); */
483 client_ptr_t user; /* user pointer */
484 client_ptr_t sb; /* status block */
485 } async_io;
486 struct
488 enum apc_type type; /* APC_VIRTUAL_ALLOC */
489 unsigned int op_type; /* type of operation */
490 client_ptr_t addr; /* requested address */
491 mem_size_t size; /* allocation size */
492 unsigned int zero_bits; /* allocation alignment */
493 unsigned int prot; /* memory protection flags */
494 } virtual_alloc;
495 struct
497 enum apc_type type; /* APC_VIRTUAL_FREE */
498 unsigned int op_type; /* type of operation */
499 client_ptr_t addr; /* requested address */
500 mem_size_t size; /* allocation size */
501 } virtual_free;
502 struct
504 enum apc_type type; /* APC_VIRTUAL_QUERY */
505 int __pad;
506 client_ptr_t addr; /* requested address */
507 } virtual_query;
508 struct
510 enum apc_type type; /* APC_VIRTUAL_PROTECT */
511 unsigned int prot; /* new protection flags */
512 client_ptr_t addr; /* requested address */
513 mem_size_t size; /* requested size */
514 } virtual_protect;
515 struct
517 enum apc_type type; /* APC_VIRTUAL_FLUSH */
518 int __pad;
519 client_ptr_t addr; /* requested address */
520 mem_size_t size; /* requested size */
521 } virtual_flush;
522 struct
524 enum apc_type type; /* APC_VIRTUAL_LOCK */
525 int __pad;
526 client_ptr_t addr; /* requested address */
527 mem_size_t size; /* requested size */
528 } virtual_lock;
529 struct
531 enum apc_type type; /* APC_VIRTUAL_UNLOCK */
532 int __pad;
533 client_ptr_t addr; /* requested address */
534 mem_size_t size; /* requested size */
535 } virtual_unlock;
536 struct
538 enum apc_type type; /* APC_MAP_VIEW */
539 obj_handle_t handle; /* mapping handle */
540 client_ptr_t addr; /* requested address */
541 mem_size_t size; /* allocation size */
542 file_pos_t offset; /* file offset */
543 unsigned int alloc_type;/* allocation type */
544 unsigned short zero_bits; /* allocation alignment */
545 unsigned short prot; /* memory protection flags */
546 } map_view;
547 struct
549 enum apc_type type; /* APC_UNMAP_VIEW */
550 int __pad;
551 client_ptr_t addr; /* view address */
552 } unmap_view;
553 struct
555 enum apc_type type; /* APC_CREATE_THREAD */
556 int suspend; /* suspended thread? */
557 client_ptr_t func; /* void (__stdcall *func)(void*); start function */
558 client_ptr_t arg; /* argument for start function */
559 mem_size_t reserve; /* reserve size for thread stack */
560 mem_size_t commit; /* commit size for thread stack */
561 } create_thread;
562 } apc_call_t;
564 typedef union
566 enum apc_type type;
567 struct
569 enum apc_type type; /* APC_ASYNC_IO */
570 unsigned int status; /* new status of async operation */
571 client_ptr_t apc; /* user APC to call */
572 client_ptr_t arg; /* user APC argument */
573 unsigned int total; /* bytes transferred */
574 } async_io;
575 struct
577 enum apc_type type; /* APC_VIRTUAL_ALLOC */
578 unsigned int status; /* status returned by call */
579 client_ptr_t addr; /* resulting address */
580 mem_size_t size; /* resulting size */
581 } virtual_alloc;
582 struct
584 enum apc_type type; /* APC_VIRTUAL_FREE */
585 unsigned int status; /* status returned by call */
586 client_ptr_t addr; /* resulting address */
587 mem_size_t size; /* resulting size */
588 } virtual_free;
589 struct
591 enum apc_type type; /* APC_VIRTUAL_QUERY */
592 unsigned int status; /* status returned by call */
593 client_ptr_t base; /* resulting base address */
594 client_ptr_t alloc_base;/* resulting allocation base */
595 mem_size_t size; /* resulting region size */
596 unsigned short state; /* resulting region state */
597 unsigned short prot; /* resulting region protection */
598 unsigned short alloc_prot;/* resulting allocation protection */
599 unsigned short alloc_type;/* resulting region allocation type */
600 } virtual_query;
601 struct
603 enum apc_type type; /* APC_VIRTUAL_PROTECT */
604 unsigned int status; /* status returned by call */
605 client_ptr_t addr; /* resulting address */
606 mem_size_t size; /* resulting size */
607 unsigned int prot; /* old protection flags */
608 } virtual_protect;
609 struct
611 enum apc_type type; /* APC_VIRTUAL_FLUSH */
612 unsigned int status; /* status returned by call */
613 client_ptr_t addr; /* resulting address */
614 mem_size_t size; /* resulting size */
615 } virtual_flush;
616 struct
618 enum apc_type type; /* APC_VIRTUAL_LOCK */
619 unsigned int status; /* status returned by call */
620 client_ptr_t addr; /* resulting address */
621 mem_size_t size; /* resulting size */
622 } virtual_lock;
623 struct
625 enum apc_type type; /* APC_VIRTUAL_UNLOCK */
626 unsigned int status; /* status returned by call */
627 client_ptr_t addr; /* resulting address */
628 mem_size_t size; /* resulting size */
629 } virtual_unlock;
630 struct
632 enum apc_type type; /* APC_MAP_VIEW */
633 unsigned int status; /* status returned by call */
634 client_ptr_t addr; /* resulting address */
635 mem_size_t size; /* resulting size */
636 } map_view;
637 struct
639 enum apc_type type; /* APC_MAP_VIEW */
640 unsigned int status; /* status returned by call */
641 } unmap_view;
642 struct
644 enum apc_type type; /* APC_CREATE_THREAD */
645 unsigned int status; /* status returned by call */
646 thread_id_t tid; /* thread id */
647 obj_handle_t handle; /* handle to new thread */
648 } create_thread;
649 } apc_result_t;
651 typedef union
653 unsigned int major; /* irp major function */
654 struct
656 unsigned int major; /* IRP_MJ_CREATE */
657 unsigned int access; /* access rights */
658 unsigned int sharing; /* sharing flags */
659 unsigned int options; /* file options */
660 client_ptr_t device; /* opaque ptr for the device */
661 } create;
662 struct
664 unsigned int major; /* IRP_MJ_CLOSE */
665 int __pad;
666 client_ptr_t file; /* opaque ptr for the file object */
667 } close;
668 struct
670 unsigned int major; /* IRP_MJ_READ */
671 unsigned int key; /* driver key */
672 client_ptr_t file; /* opaque ptr for the file object */
673 file_pos_t pos; /* file position */
674 } read;
675 struct
677 unsigned int major; /* IRP_MJ_WRITE */
678 unsigned int key; /* driver key */
679 client_ptr_t file; /* opaque ptr for the file object */
680 file_pos_t pos; /* file position */
681 } write;
682 struct
684 unsigned int major; /* IRP_MJ_FLUSH_BUFFERS */
685 int __pad;
686 client_ptr_t file; /* opaque ptr for the file object */
687 } flush;
688 struct
690 unsigned int major; /* IRP_MJ_DEVICE_CONTROL */
691 ioctl_code_t code; /* ioctl code */
692 client_ptr_t file; /* opaque ptr for the file object */
693 } ioctl;
694 } irp_params_t;
696 struct rawinput_device
698 unsigned short usage_page;
699 unsigned short usage;
700 unsigned int flags;
701 user_handle_t target;
704 /****************************************************************/
705 /* Request declarations */
707 /* Create a new process from the context of the parent */
708 @REQ(new_process)
709 int inherit_all; /* inherit all handles from parent */
710 unsigned int create_flags; /* creation flags */
711 int socket_fd; /* file descriptor for process socket */
712 obj_handle_t exe_file; /* file handle for main exe */
713 unsigned int process_access; /* access rights for process object */
714 unsigned int process_attr; /* attributes for process object */
715 unsigned int thread_access; /* access rights for thread object */
716 unsigned int thread_attr; /* attributes for thread object */
717 cpu_type_t cpu; /* CPU that the new process will use */
718 data_size_t info_size; /* size of startup info */
719 VARARG(info,startup_info,info_size); /* startup information */
720 VARARG(env,unicode_str); /* environment for new process */
721 @REPLY
722 obj_handle_t info; /* new process info handle */
723 process_id_t pid; /* process id */
724 obj_handle_t phandle; /* process handle (in the current process) */
725 thread_id_t tid; /* thread id */
726 obj_handle_t thandle; /* thread handle (in the current process) */
727 @END
730 /* Retrieve information about a newly started process */
731 @REQ(get_new_process_info)
732 obj_handle_t info; /* info handle returned from new_process_request */
733 @REPLY
734 int success; /* did the process start successfully? */
735 int exit_code; /* process exit code if failed */
736 @END
739 /* Create a new thread from the context of the parent */
740 @REQ(new_thread)
741 unsigned int access; /* wanted access rights */
742 unsigned int attributes; /* object attributes */
743 int suspend; /* new thread should be suspended on creation */
744 int request_fd; /* fd for request pipe */
745 @REPLY
746 thread_id_t tid; /* thread id */
747 obj_handle_t handle; /* thread handle (in the current process) */
748 @END
751 /* Retrieve the new process startup info */
752 @REQ(get_startup_info)
753 @REPLY
754 obj_handle_t exe_file; /* file handle for main exe */
755 data_size_t info_size; /* size of startup info */
756 VARARG(info,startup_info,info_size); /* startup information */
757 VARARG(env,unicode_str); /* environment */
758 @END
761 /* Signal the end of the process initialization */
762 @REQ(init_process_done)
763 int gui; /* is it a GUI process? */
764 mod_handle_t module; /* main module base address */
765 client_ptr_t ldt_copy; /* address of LDT copy (in thread address space) */
766 client_ptr_t entry; /* process entry point */
767 @END
770 /* Initialize a thread; called from the child after fork()/clone() */
771 @REQ(init_thread)
772 int unix_pid; /* Unix pid of new thread */
773 int unix_tid; /* Unix tid of new thread */
774 int debug_level; /* new debug level */
775 client_ptr_t teb; /* TEB of new thread (in thread address space) */
776 client_ptr_t entry; /* entry point or PEB if initial thread (in thread address space) */
777 int reply_fd; /* fd for reply pipe */
778 int wait_fd; /* fd for blocking calls pipe */
779 cpu_type_t cpu; /* CPU that this thread is running on */
780 @REPLY
781 process_id_t pid; /* process id of the new thread's process */
782 thread_id_t tid; /* thread id of the new thread */
783 timeout_t server_start; /* server start time */
784 data_size_t info_size; /* total size of startup info */
785 int version; /* protocol version */
786 unsigned int all_cpus; /* bitset of supported CPUs */
787 @END
790 /* Terminate a process */
791 @REQ(terminate_process)
792 obj_handle_t handle; /* process handle to terminate */
793 int exit_code; /* process exit code */
794 @REPLY
795 int self; /* suicide? */
796 @END
799 /* Terminate a thread */
800 @REQ(terminate_thread)
801 obj_handle_t handle; /* thread handle to terminate */
802 int exit_code; /* thread exit code */
803 @REPLY
804 int self; /* suicide? */
805 int last; /* last thread in this process? */
806 @END
809 /* Retrieve information about a process */
810 @REQ(get_process_info)
811 obj_handle_t handle; /* process handle */
812 @REPLY
813 process_id_t pid; /* server process id */
814 process_id_t ppid; /* server process id of parent */
815 affinity_t affinity; /* process affinity mask */
816 client_ptr_t peb; /* PEB address in process address space */
817 timeout_t start_time; /* process start time */
818 timeout_t end_time; /* process end time */
819 int exit_code; /* process exit code */
820 int priority; /* priority class */
821 cpu_type_t cpu; /* CPU that this process is running on */
822 short int debugger_present; /* process is being debugged */
823 short int debug_children; /* inherit debugger to child processes */
824 @END
827 /* Set a process information */
828 @REQ(set_process_info)
829 obj_handle_t handle; /* process handle */
830 int mask; /* setting mask (see below) */
831 int priority; /* priority class */
832 affinity_t affinity; /* affinity mask */
833 @END
834 #define SET_PROCESS_INFO_PRIORITY 0x01
835 #define SET_PROCESS_INFO_AFFINITY 0x02
838 /* Retrieve information about a thread */
839 @REQ(get_thread_info)
840 obj_handle_t handle; /* thread handle */
841 thread_id_t tid_in; /* thread id (optional) */
842 @REPLY
843 process_id_t pid; /* server process id */
844 thread_id_t tid; /* server thread id */
845 client_ptr_t teb; /* thread teb pointer */
846 client_ptr_t entry_point; /* thread entry point */
847 affinity_t affinity; /* thread affinity mask */
848 int exit_code; /* thread exit code */
849 int priority; /* thread priority level */
850 int last; /* last thread in process */
851 @END
854 /* Retrieve information about thread times */
855 @REQ(get_thread_times)
856 obj_handle_t handle; /* thread handle */
857 @REPLY
858 timeout_t creation_time; /* thread creation time */
859 timeout_t exit_time; /* thread exit time */
860 @END
863 /* Set a thread information */
864 @REQ(set_thread_info)
865 obj_handle_t handle; /* thread handle */
866 int mask; /* setting mask (see below) */
867 int priority; /* priority class */
868 affinity_t affinity; /* affinity mask */
869 client_ptr_t entry_point; /* thread entry point */
870 obj_handle_t token; /* impersonation token */
871 @END
872 #define SET_THREAD_INFO_PRIORITY 0x01
873 #define SET_THREAD_INFO_AFFINITY 0x02
874 #define SET_THREAD_INFO_TOKEN 0x04
875 #define SET_THREAD_INFO_ENTRYPOINT 0x08
878 /* Retrieve information about a module */
879 @REQ(get_dll_info)
880 obj_handle_t handle; /* process handle */
881 mod_handle_t base_address; /* base address of module */
882 @REPLY
883 client_ptr_t entry_point;
884 data_size_t size; /* module size */
885 data_size_t filename_len; /* buffer len in bytes required to store filename */
886 VARARG(filename,unicode_str); /* file name of module */
887 @END
890 /* Suspend a thread */
891 @REQ(suspend_thread)
892 obj_handle_t handle; /* thread handle */
893 @REPLY
894 int count; /* new suspend count */
895 @END
898 /* Resume a thread */
899 @REQ(resume_thread)
900 obj_handle_t handle; /* thread handle */
901 @REPLY
902 int count; /* new suspend count */
903 @END
906 /* Notify the server that a dll has been loaded */
907 @REQ(load_dll)
908 obj_handle_t mapping; /* file mapping handle */
909 mod_handle_t base; /* base address */
910 client_ptr_t name; /* ptr to ptr to name (in process addr space) */
911 data_size_t size; /* dll size */
912 int dbg_offset; /* debug info offset */
913 int dbg_size; /* debug info size */
914 VARARG(filename,unicode_str); /* file name of dll */
915 @END
918 /* Notify the server that a dll is being unloaded */
919 @REQ(unload_dll)
920 mod_handle_t base; /* base address */
921 @END
924 /* Queue an APC for a thread or process */
925 @REQ(queue_apc)
926 obj_handle_t handle; /* thread or process handle */
927 apc_call_t call; /* call arguments */
928 @REPLY
929 obj_handle_t handle; /* APC handle */
930 int self; /* run APC in caller itself? */
931 @END
934 /* Get the result of an APC call */
935 @REQ(get_apc_result)
936 obj_handle_t handle; /* handle to the APC */
937 @REPLY
938 apc_result_t result; /* result of the APC */
939 @END
942 /* Close a handle for the current process */
943 @REQ(close_handle)
944 obj_handle_t handle; /* handle to close */
945 @END
948 /* Set a handle information */
949 @REQ(set_handle_info)
950 obj_handle_t handle; /* handle we are interested in */
951 int flags; /* new handle flags */
952 int mask; /* mask for flags to set */
953 @REPLY
954 int old_flags; /* old flag value */
955 @END
958 /* Duplicate a handle */
959 @REQ(dup_handle)
960 obj_handle_t src_process; /* src process handle */
961 obj_handle_t src_handle; /* src handle to duplicate */
962 obj_handle_t dst_process; /* dst process handle */
963 unsigned int access; /* wanted access rights */
964 unsigned int attributes; /* object attributes */
965 unsigned int options; /* duplicate options (see below) */
966 @REPLY
967 obj_handle_t handle; /* duplicated handle in dst process */
968 int self; /* is the source the current process? */
969 int closed; /* whether the source handle has been closed */
970 @END
971 #define DUP_HANDLE_CLOSE_SOURCE DUPLICATE_CLOSE_SOURCE
972 #define DUP_HANDLE_SAME_ACCESS DUPLICATE_SAME_ACCESS
973 #define DUP_HANDLE_MAKE_GLOBAL 0x80000000 /* Not a Windows flag */
976 /* Open a handle to a process */
977 @REQ(open_process)
978 process_id_t pid; /* process id to open */
979 unsigned int access; /* wanted access rights */
980 unsigned int attributes; /* object attributes */
981 @REPLY
982 obj_handle_t handle; /* handle to the process */
983 @END
986 /* Open a handle to a thread */
987 @REQ(open_thread)
988 thread_id_t tid; /* thread id to open */
989 unsigned int access; /* wanted access rights */
990 unsigned int attributes; /* object attributes */
991 @REPLY
992 obj_handle_t handle; /* handle to the thread */
993 @END
996 /* Wait for handles */
997 @REQ(select)
998 int flags; /* wait flags (see below) */
999 client_ptr_t cookie; /* magic cookie to return to client */
1000 timeout_t timeout; /* timeout */
1001 obj_handle_t prev_apc; /* handle to previous APC */
1002 VARARG(result,apc_result); /* result of previous APC */
1003 VARARG(data,select_op); /* operation-specific data */
1004 @REPLY
1005 timeout_t timeout; /* timeout converted to absolute */
1006 apc_call_t call; /* APC call arguments */
1007 obj_handle_t apc_handle; /* handle to next APC */
1008 @END
1009 #define SELECT_ALERTABLE 1
1010 #define SELECT_INTERRUPTIBLE 2
1013 /* Create an event */
1014 @REQ(create_event)
1015 unsigned int access; /* wanted access rights */
1016 int manual_reset; /* manual reset event */
1017 int initial_state; /* initial state of the event */
1018 VARARG(objattr,object_attributes); /* object attributes */
1019 @REPLY
1020 obj_handle_t handle; /* handle to the event */
1021 @END
1023 /* Event operation */
1024 @REQ(event_op)
1025 obj_handle_t handle; /* handle to event */
1026 int op; /* event operation (see below) */
1027 @END
1028 enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT };
1030 @REQ(query_event)
1031 obj_handle_t handle; /* handle to event */
1032 @REPLY
1033 int manual_reset; /* manual reset event */
1034 int state; /* current state of the event */
1035 @END
1037 /* Open an event */
1038 @REQ(open_event)
1039 unsigned int access; /* wanted access rights */
1040 unsigned int attributes; /* object attributes */
1041 obj_handle_t rootdir; /* root directory */
1042 VARARG(name,unicode_str); /* object name */
1043 @REPLY
1044 obj_handle_t handle; /* handle to the event */
1045 @END
1048 /* Create a keyed event */
1049 @REQ(create_keyed_event)
1050 unsigned int access; /* wanted access rights */
1051 VARARG(objattr,object_attributes); /* object attributes */
1052 @REPLY
1053 obj_handle_t handle; /* handle to the event */
1054 @END
1056 /* Open a keyed event */
1057 @REQ(open_keyed_event)
1058 unsigned int access; /* wanted access rights */
1059 unsigned int attributes; /* object attributes */
1060 obj_handle_t rootdir; /* root directory */
1061 VARARG(name,unicode_str); /* object name */
1062 @REPLY
1063 obj_handle_t handle; /* handle to the event */
1064 @END
1067 /* Create a mutex */
1068 @REQ(create_mutex)
1069 unsigned int access; /* wanted access rights */
1070 int owned; /* initially owned? */
1071 VARARG(objattr,object_attributes); /* object attributes */
1072 @REPLY
1073 obj_handle_t handle; /* handle to the mutex */
1074 @END
1077 /* Release a mutex */
1078 @REQ(release_mutex)
1079 obj_handle_t handle; /* handle to the mutex */
1080 @REPLY
1081 unsigned int prev_count; /* value of internal counter, before release */
1082 @END
1085 /* Open a mutex */
1086 @REQ(open_mutex)
1087 unsigned int access; /* wanted access rights */
1088 unsigned int attributes; /* object attributes */
1089 obj_handle_t rootdir; /* root directory */
1090 VARARG(name,unicode_str); /* object name */
1091 @REPLY
1092 obj_handle_t handle; /* handle to the mutex */
1093 @END
1096 /* Create a semaphore */
1097 @REQ(create_semaphore)
1098 unsigned int access; /* wanted access rights */
1099 unsigned int initial; /* initial count */
1100 unsigned int max; /* maximum count */
1101 VARARG(objattr,object_attributes); /* object attributes */
1102 @REPLY
1103 obj_handle_t handle; /* handle to the semaphore */
1104 @END
1107 /* Release a semaphore */
1108 @REQ(release_semaphore)
1109 obj_handle_t handle; /* handle to the semaphore */
1110 unsigned int count; /* count to add to semaphore */
1111 @REPLY
1112 unsigned int prev_count; /* previous semaphore count */
1113 @END
1115 @REQ(query_semaphore)
1116 obj_handle_t handle; /* handle to the semaphore */
1117 @REPLY
1118 unsigned int current; /* current count */
1119 unsigned int max; /* maximum count */
1120 @END
1122 /* Open a semaphore */
1123 @REQ(open_semaphore)
1124 unsigned int access; /* wanted access rights */
1125 unsigned int attributes; /* object attributes */
1126 obj_handle_t rootdir; /* root directory */
1127 VARARG(name,unicode_str); /* object name */
1128 @REPLY
1129 obj_handle_t handle; /* handle to the semaphore */
1130 @END
1133 /* Create a file */
1134 @REQ(create_file)
1135 unsigned int access; /* wanted access rights */
1136 unsigned int sharing; /* sharing flags */
1137 int create; /* file create action */
1138 unsigned int options; /* file options */
1139 unsigned int attrs; /* file attributes for creation */
1140 VARARG(objattr,object_attributes); /* object attributes */
1141 VARARG(filename,string); /* file name */
1142 @REPLY
1143 obj_handle_t handle; /* handle to the file */
1144 @END
1147 /* Open a file object */
1148 @REQ(open_file_object)
1149 unsigned int access; /* wanted access rights */
1150 unsigned int attributes; /* open attributes */
1151 obj_handle_t rootdir; /* root directory */
1152 unsigned int sharing; /* sharing flags */
1153 unsigned int options; /* file options */
1154 VARARG(filename,unicode_str); /* file name */
1155 @REPLY
1156 obj_handle_t handle; /* handle to the file */
1157 @END
1160 /* Allocate a file handle for a Unix fd */
1161 @REQ(alloc_file_handle)
1162 unsigned int access; /* wanted access rights */
1163 unsigned int attributes; /* object attributes */
1164 int fd; /* file descriptor on the client side */
1165 @REPLY
1166 obj_handle_t handle; /* handle to the file */
1167 @END
1170 /* Get the Unix name from a file handle */
1171 @REQ(get_handle_unix_name)
1172 obj_handle_t handle; /* file handle */
1173 @REPLY
1174 data_size_t name_len; /* unix name length */
1175 VARARG(name,string); /* unix name */
1176 @END
1179 /* Get a Unix fd to access a file */
1180 @REQ(get_handle_fd)
1181 obj_handle_t handle; /* handle to the file */
1182 @REPLY
1183 int type; /* file type (see below) */
1184 int cacheable; /* can fd be cached in the client? */
1185 unsigned int access; /* file access rights */
1186 unsigned int options; /* file open options */
1187 @END
1188 enum server_fd_type
1190 FD_TYPE_INVALID, /* invalid file (no associated fd) */
1191 FD_TYPE_FILE, /* regular file */
1192 FD_TYPE_DIR, /* directory */
1193 FD_TYPE_SOCKET, /* socket */
1194 FD_TYPE_SERIAL, /* serial port */
1195 FD_TYPE_PIPE, /* named pipe */
1196 FD_TYPE_MAILSLOT, /* mailslot */
1197 FD_TYPE_CHAR, /* unspecified char device */
1198 FD_TYPE_DEVICE, /* Windows device file */
1199 FD_TYPE_NB_TYPES
1203 /* Flush a file buffers */
1204 @REQ(flush)
1205 int blocking; /* whether it's a blocking flush */
1206 async_data_t async; /* async I/O parameters */
1207 @REPLY
1208 obj_handle_t event; /* event set when finished */
1209 @END
1212 /* Lock a region of a file */
1213 @REQ(lock_file)
1214 obj_handle_t handle; /* handle to the file */
1215 file_pos_t offset; /* offset of start of lock */
1216 file_pos_t count; /* count of bytes to lock */
1217 int shared; /* shared or exclusive lock? */
1218 int wait; /* do we want to wait? */
1219 @REPLY
1220 obj_handle_t handle; /* handle to wait on */
1221 int overlapped; /* is it an overlapped I/O handle? */
1222 @END
1225 /* Unlock a region of a file */
1226 @REQ(unlock_file)
1227 obj_handle_t handle; /* handle to the file */
1228 file_pos_t offset; /* offset of start of unlock */
1229 file_pos_t count; /* count of bytes to unlock */
1230 @END
1233 /* Create a socket */
1234 @REQ(create_socket)
1235 unsigned int access; /* wanted access rights */
1236 unsigned int attributes; /* object attributes */
1237 int family; /* family, see socket manpage */
1238 int type; /* type, see socket manpage */
1239 int protocol; /* protocol, see socket manpage */
1240 unsigned int flags; /* socket flags */
1241 @REPLY
1242 obj_handle_t handle; /* handle to the new socket */
1243 @END
1246 /* Accept a socket */
1247 @REQ(accept_socket)
1248 obj_handle_t lhandle; /* handle to the listening socket */
1249 unsigned int access; /* wanted access rights */
1250 unsigned int attributes; /* object attributes */
1251 @REPLY
1252 obj_handle_t handle; /* handle to the new socket */
1253 @END
1256 /* Accept into an initialized socket */
1257 @REQ(accept_into_socket)
1258 obj_handle_t lhandle; /* handle to the listening socket */
1259 obj_handle_t ahandle; /* handle to the accepting socket */
1260 @END
1263 /* Set socket event parameters */
1264 @REQ(set_socket_event)
1265 obj_handle_t handle; /* handle to the socket */
1266 unsigned int mask; /* event mask */
1267 obj_handle_t event; /* event object */
1268 user_handle_t window; /* window to send the message to */
1269 unsigned int msg; /* message to send */
1270 @END
1273 /* Get socket event parameters */
1274 @REQ(get_socket_event)
1275 obj_handle_t handle; /* handle to the socket */
1276 int service; /* clear pending? */
1277 obj_handle_t c_event; /* event to clear */
1278 @REPLY
1279 unsigned int mask; /* event mask */
1280 unsigned int pmask; /* pending events */
1281 unsigned int state; /* status bits */
1282 VARARG(errors,ints); /* event errors */
1283 @END
1286 /* Get socket info */
1287 @REQ(get_socket_info)
1288 obj_handle_t handle; /* handle to the socket */
1289 @REPLY
1290 int family; /* family, see socket manpage */
1291 int type; /* type, see socket manpage */
1292 int protocol; /* protocol, see socket manpage */
1293 @END
1296 /* Re-enable pending socket events */
1297 @REQ(enable_socket_event)
1298 obj_handle_t handle; /* handle to the socket */
1299 unsigned int mask; /* events to re-enable */
1300 unsigned int sstate; /* status bits to set */
1301 unsigned int cstate; /* status bits to clear */
1302 @END
1304 @REQ(set_socket_deferred)
1305 obj_handle_t handle; /* handle to the socket */
1306 obj_handle_t deferred; /* handle to the socket for which accept() is deferred */
1307 @END
1309 /* Allocate a console (only used by a console renderer) */
1310 @REQ(alloc_console)
1311 unsigned int access; /* wanted access rights */
1312 unsigned int attributes; /* object attributes */
1313 process_id_t pid; /* pid of process which shall be attached to the console */
1314 int input_fd; /* if pid=-1 (bare console to current process), fd for input */
1315 @REPLY
1316 obj_handle_t handle_in; /* handle to console input */
1317 obj_handle_t event; /* handle to renderer events change notification */
1318 @END
1321 /* Free the console of the current process */
1322 @REQ(free_console)
1323 @END
1326 #define CONSOLE_RENDERER_NONE_EVENT 0x00
1327 #define CONSOLE_RENDERER_TITLE_EVENT 0x01
1328 #define CONSOLE_RENDERER_ACTIVE_SB_EVENT 0x02
1329 #define CONSOLE_RENDERER_SB_RESIZE_EVENT 0x03
1330 #define CONSOLE_RENDERER_UPDATE_EVENT 0x04
1331 #define CONSOLE_RENDERER_CURSOR_POS_EVENT 0x05
1332 #define CONSOLE_RENDERER_CURSOR_GEOM_EVENT 0x06
1333 #define CONSOLE_RENDERER_DISPLAY_EVENT 0x07
1334 #define CONSOLE_RENDERER_EXIT_EVENT 0x08
1335 struct console_renderer_event
1337 short event;
1338 union
1340 struct update
1342 short top;
1343 short bottom;
1344 } update;
1345 struct resize
1347 short width;
1348 short height;
1349 } resize;
1350 struct cursor_pos
1352 short x;
1353 short y;
1354 } cursor_pos;
1355 struct cursor_geom
1357 short visible;
1358 short size;
1359 } cursor_geom;
1360 struct display
1362 short left;
1363 short top;
1364 short width;
1365 short height;
1366 } display;
1367 } u;
1370 /* retrieve console events for the renderer */
1371 @REQ(get_console_renderer_events)
1372 obj_handle_t handle; /* handle to console input events */
1373 @REPLY
1374 VARARG(data,bytes); /* the various console_renderer_events */
1375 @END
1378 /* Open a handle to the process console */
1379 @REQ(open_console)
1380 obj_handle_t from; /* 0 (resp 1) input (resp output) of current process console */
1381 /* otherwise console_in handle to get active screen buffer? */
1382 unsigned int access; /* wanted access rights */
1383 unsigned int attributes; /* object attributes */
1384 int share; /* share mask (only for output handles) */
1385 @REPLY
1386 obj_handle_t handle; /* handle to the console */
1387 @END
1390 /* Get the input queue wait event */
1391 @REQ(get_console_wait_event)
1392 @REPLY
1393 obj_handle_t handle;
1394 @END
1396 /* Get a console mode (input or output) */
1397 @REQ(get_console_mode)
1398 obj_handle_t handle; /* handle to the console */
1399 @REPLY
1400 int mode; /* console mode */
1401 @END
1404 /* Set a console mode (input or output) */
1405 @REQ(set_console_mode)
1406 obj_handle_t handle; /* handle to the console */
1407 int mode; /* console mode */
1408 @END
1411 /* Set info about a console (input only) */
1412 @REQ(set_console_input_info)
1413 obj_handle_t handle; /* handle to console input, or 0 for process' console */
1414 int mask; /* setting mask (see below) */
1415 obj_handle_t active_sb; /* active screen buffer */
1416 int history_mode; /* whether we duplicate lines in history */
1417 int history_size; /* number of lines in history */
1418 int edition_mode; /* index to the edition mode flavors */
1419 int input_cp; /* console input codepage */
1420 int output_cp; /* console output codepage */
1421 user_handle_t win; /* console window if backend supports it */
1422 VARARG(title,unicode_str); /* console title */
1423 @END
1424 #define SET_CONSOLE_INPUT_INFO_ACTIVE_SB 0x01
1425 #define SET_CONSOLE_INPUT_INFO_TITLE 0x02
1426 #define SET_CONSOLE_INPUT_INFO_HISTORY_MODE 0x04
1427 #define SET_CONSOLE_INPUT_INFO_HISTORY_SIZE 0x08
1428 #define SET_CONSOLE_INPUT_INFO_EDITION_MODE 0x10
1429 #define SET_CONSOLE_INPUT_INFO_INPUT_CODEPAGE 0x20
1430 #define SET_CONSOLE_INPUT_INFO_OUTPUT_CODEPAGE 0x40
1431 #define SET_CONSOLE_INPUT_INFO_WIN 0x80
1434 /* Get info about a console (input only) */
1435 @REQ(get_console_input_info)
1436 obj_handle_t handle; /* handle to console input, or 0 for process' console */
1437 @REPLY
1438 int history_mode; /* whether we duplicate lines in history */
1439 int history_size; /* number of lines in history */
1440 int history_index; /* number of used lines in history */
1441 int edition_mode; /* index to the edition mode flavors */
1442 int input_cp; /* console input codepage */
1443 int output_cp; /* console output codepage */
1444 user_handle_t win; /* console window if backend supports it */
1445 VARARG(title,unicode_str); /* console title */
1446 @END
1449 /* appends a string to console's history */
1450 @REQ(append_console_input_history)
1451 obj_handle_t handle; /* handle to console input, or 0 for process' console */
1452 VARARG(line,unicode_str); /* line to add */
1453 @END
1456 /* appends a string to console's history */
1457 @REQ(get_console_input_history)
1458 obj_handle_t handle; /* handle to console input, or 0 for process' console */
1459 int index; /* index to get line from */
1460 @REPLY
1461 int total; /* total length of line in Unicode chars */
1462 VARARG(line,unicode_str); /* line to add */
1463 @END
1466 /* creates a new screen buffer on process' console */
1467 @REQ(create_console_output)
1468 obj_handle_t handle_in; /* handle to console input, or 0 for process' console */
1469 unsigned int access; /* wanted access rights */
1470 unsigned int attributes; /* object attributes */
1471 unsigned int share; /* sharing credentials */
1472 int fd; /* for bare consoles, fd the screen-buffer is attached to */
1473 @REPLY
1474 obj_handle_t handle_out; /* handle to the screen buffer */
1475 @END
1478 /* Set info about a console (output only) */
1479 @REQ(set_console_output_info)
1480 obj_handle_t handle; /* handle to the console */
1481 int mask; /* setting mask (see below) */
1482 short int cursor_size; /* size of cursor (percentage filled) */
1483 short int cursor_visible;/* cursor visibility flag */
1484 short int cursor_x; /* position of cursor (x, y) */
1485 short int cursor_y;
1486 short int width; /* width of the screen buffer */
1487 short int height; /* height of the screen buffer */
1488 short int attr; /* default attribute */
1489 short int win_left; /* window actually displayed by renderer */
1490 short int win_top; /* the rect area is expressed within the */
1491 short int win_right; /* boundaries of the screen buffer */
1492 short int win_bottom;
1493 short int max_width; /* maximum size (width x height) for the window */
1494 short int max_height;
1495 short int font_width; /* font size (width x height) */
1496 short int font_height;
1497 @END
1498 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_GEOM 0x01
1499 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_POS 0x02
1500 #define SET_CONSOLE_OUTPUT_INFO_SIZE 0x04
1501 #define SET_CONSOLE_OUTPUT_INFO_ATTR 0x08
1502 #define SET_CONSOLE_OUTPUT_INFO_DISPLAY_WINDOW 0x10
1503 #define SET_CONSOLE_OUTPUT_INFO_MAX_SIZE 0x20
1504 #define SET_CONSOLE_OUTPUT_INFO_FONT 0x40
1507 /* Get info about a console (output only) */
1508 @REQ(get_console_output_info)
1509 obj_handle_t handle; /* handle to the console */
1510 @REPLY
1511 short int cursor_size; /* size of cursor (percentage filled) */
1512 short int cursor_visible;/* cursor visibility flag */
1513 short int cursor_x; /* position of cursor (x, y) */
1514 short int cursor_y;
1515 short int width; /* width of the screen buffer */
1516 short int height; /* height of the screen buffer */
1517 short int attr; /* default attribute */
1518 short int win_left; /* window actually displayed by renderer */
1519 short int win_top; /* the rect area is expressed within the */
1520 short int win_right; /* boundaries of the screen buffer */
1521 short int win_bottom;
1522 short int max_width; /* maximum size (width x height) for the window */
1523 short int max_height;
1524 short int font_width; /* font size (width x height) */
1525 short int font_height;
1526 @END
1528 /* Add input records to a console input queue */
1529 @REQ(write_console_input)
1530 obj_handle_t handle; /* handle to the console input */
1531 VARARG(rec,input_records); /* input records */
1532 @REPLY
1533 int written; /* number of records written */
1534 @END
1537 /* Fetch input records from a console input queue */
1538 @REQ(read_console_input)
1539 obj_handle_t handle; /* handle to the console input */
1540 int flush; /* flush the retrieved records from the queue? */
1541 @REPLY
1542 int read; /* number of records read */
1543 VARARG(rec,input_records); /* input records */
1544 @END
1547 /* write data (chars and/or attributes) in a screen buffer */
1548 @REQ(write_console_output)
1549 obj_handle_t handle; /* handle to the console output */
1550 int x; /* position where to start writing */
1551 int y;
1552 int mode; /* char info (see below) */
1553 int wrap; /* wrap around at end of line? */
1554 VARARG(data,bytes); /* info to write */
1555 @REPLY
1556 int written; /* number of char infos actually written */
1557 int width; /* width of screen buffer */
1558 int height; /* height of screen buffer */
1559 @END
1560 enum char_info_mode
1562 CHAR_INFO_MODE_TEXT, /* characters only */
1563 CHAR_INFO_MODE_ATTR, /* attributes only */
1564 CHAR_INFO_MODE_TEXTATTR, /* both characters and attributes */
1565 CHAR_INFO_MODE_TEXTSTDATTR /* characters but use standard attributes */
1569 /* fill a screen buffer with constant data (chars and/or attributes) */
1570 @REQ(fill_console_output)
1571 obj_handle_t handle; /* handle to the console output */
1572 int x; /* position where to start writing */
1573 int y;
1574 int mode; /* char info mode */
1575 int count; /* number to write */
1576 int wrap; /* wrap around at end of line? */
1577 char_info_t data; /* data to write */
1578 @REPLY
1579 int written; /* number of char infos actually written */
1580 @END
1583 /* read data (chars and/or attributes) from a screen buffer */
1584 @REQ(read_console_output)
1585 obj_handle_t handle; /* handle to the console output */
1586 int x; /* position (x,y) where to start reading */
1587 int y;
1588 int mode; /* char info mode */
1589 int wrap; /* wrap around at end of line? */
1590 @REPLY
1591 int width; /* width of screen buffer */
1592 int height; /* height of screen buffer */
1593 VARARG(data,bytes);
1594 @END
1597 /* move a rect (of data) in screen buffer content */
1598 @REQ(move_console_output)
1599 obj_handle_t handle; /* handle to the console output */
1600 short int x_src; /* position (x, y) of rect to start moving from */
1601 short int y_src;
1602 short int x_dst; /* position (x, y) of rect to move to */
1603 short int y_dst;
1604 short int w; /* size of the rect (width, height) to move */
1605 short int h;
1606 @END
1609 /* Sends a signal to a process group */
1610 @REQ(send_console_signal)
1611 int signal; /* the signal to send */
1612 process_id_t group_id; /* the group to send the signal to */
1613 @END
1616 /* enable directory change notifications */
1617 @REQ(read_directory_changes)
1618 unsigned int filter; /* notification filter */
1619 int subtree; /* watch the subtree? */
1620 int want_data; /* flag indicating whether change data should be collected */
1621 async_data_t async; /* async I/O parameters */
1622 @END
1625 @REQ(read_change)
1626 obj_handle_t handle;
1627 @REPLY
1628 VARARG(events,filesystem_event); /* collected filesystem events */
1629 @END
1632 /* Create a file mapping */
1633 @REQ(create_mapping)
1634 unsigned int access; /* wanted access rights */
1635 unsigned int protect; /* protection flags (see below) */
1636 mem_size_t size; /* mapping size */
1637 obj_handle_t file_handle; /* file handle */
1638 VARARG(objattr,object_attributes); /* object attributes */
1639 @REPLY
1640 obj_handle_t handle; /* handle to the mapping */
1641 @END
1642 /* per-page protection flags */
1643 #define VPROT_READ 0x01
1644 #define VPROT_WRITE 0x02
1645 #define VPROT_EXEC 0x04
1646 #define VPROT_WRITECOPY 0x08
1647 #define VPROT_GUARD 0x10
1648 #define VPROT_NOCACHE 0x20
1649 #define VPROT_COMMITTED 0x40
1650 #define VPROT_WRITEWATCH 0x80
1651 /* per-mapping protection flags */
1652 #define VPROT_IMAGE 0x0100 /* mapping for an exe image */
1653 #define VPROT_SYSTEM 0x0200 /* system view (underlying mmap not under our control) */
1654 #define VPROT_VALLOC 0x0400 /* allocated by VirtualAlloc */
1655 #define VPROT_NOEXEC 0x0800 /* don't force exec permission */
1658 /* Open a mapping */
1659 @REQ(open_mapping)
1660 unsigned int access; /* wanted access rights */
1661 unsigned int attributes; /* object attributes */
1662 obj_handle_t rootdir; /* root directory */
1663 VARARG(name,unicode_str); /* object name */
1664 @REPLY
1665 obj_handle_t handle; /* handle to the mapping */
1666 @END
1669 /* Get information about a file mapping */
1670 @REQ(get_mapping_info)
1671 obj_handle_t handle; /* handle to the mapping */
1672 unsigned int access; /* wanted access rights */
1673 @REPLY
1674 mem_size_t size; /* mapping size */
1675 int protect; /* protection flags */
1676 int header_size; /* header size (for VPROT_IMAGE mapping) */
1677 client_ptr_t base; /* default base addr (for VPROT_IMAGE mapping) */
1678 obj_handle_t mapping; /* duplicate mapping handle unless removable */
1679 obj_handle_t shared_file; /* shared mapping file handle */
1680 @END
1683 /* Get a range of committed pages in a file mapping */
1684 @REQ(get_mapping_committed_range)
1685 obj_handle_t handle; /* handle to the mapping */
1686 file_pos_t offset; /* starting offset (page-aligned, in bytes) */
1687 @REPLY
1688 mem_size_t size; /* size of range starting at offset (page-aligned, in bytes) */
1689 int committed; /* whether it is a committed range */
1690 @END
1693 /* Add a range to the committed pages in a file mapping */
1694 @REQ(add_mapping_committed_range)
1695 obj_handle_t handle; /* handle to the mapping */
1696 file_pos_t offset; /* starting offset (page-aligned, in bytes) */
1697 mem_size_t size; /* size to set (page-aligned, in bytes) or 0 if only retrieving */
1698 @END
1701 #define SNAP_PROCESS 0x00000001
1702 #define SNAP_THREAD 0x00000002
1703 /* Create a snapshot */
1704 @REQ(create_snapshot)
1705 unsigned int attributes; /* object attributes */
1706 unsigned int flags; /* snapshot flags (SNAP_*) */
1707 @REPLY
1708 obj_handle_t handle; /* handle to the snapshot */
1709 @END
1712 /* Get the next process from a snapshot */
1713 @REQ(next_process)
1714 obj_handle_t handle; /* handle to the snapshot */
1715 int reset; /* reset snapshot position? */
1716 @REPLY
1717 int count; /* process usage count */
1718 process_id_t pid; /* process id */
1719 process_id_t ppid; /* parent process id */
1720 int threads; /* number of threads */
1721 int priority; /* process priority */
1722 int handles; /* number of handles */
1723 int unix_pid; /* Unix pid */
1724 VARARG(filename,unicode_str); /* file name of main exe */
1725 @END
1728 /* Get the next thread from a snapshot */
1729 @REQ(next_thread)
1730 obj_handle_t handle; /* handle to the snapshot */
1731 int reset; /* reset snapshot position? */
1732 @REPLY
1733 int count; /* thread usage count */
1734 process_id_t pid; /* process id */
1735 thread_id_t tid; /* thread id */
1736 int base_pri; /* base priority */
1737 int delta_pri; /* delta priority */
1738 @END
1741 /* Wait for a debug event */
1742 @REQ(wait_debug_event)
1743 int get_handle; /* should we alloc a handle for waiting? */
1744 @REPLY
1745 process_id_t pid; /* process id */
1746 thread_id_t tid; /* thread id */
1747 obj_handle_t wait; /* wait handle if no event ready */
1748 VARARG(event,debug_event); /* debug event data */
1749 @END
1752 /* Queue an exception event */
1753 @REQ(queue_exception_event)
1754 int first; /* first chance exception? */
1755 unsigned int code; /* exception code */
1756 unsigned int flags; /* exception flags */
1757 client_ptr_t record; /* exception record */
1758 client_ptr_t address; /* exception address */
1759 data_size_t len; /* size of parameters */
1760 VARARG(params,uints64,len);/* exception parameters */
1761 VARARG(context,context); /* thread context */
1762 @REPLY
1763 obj_handle_t handle; /* handle to the queued event */
1764 @END
1767 /* Retrieve the status of an exception event */
1768 @REQ(get_exception_status)
1769 obj_handle_t handle; /* handle to the queued event */
1770 @REPLY
1771 VARARG(context,context); /* modified thread context */
1772 @END
1775 /* Continue a debug event */
1776 @REQ(continue_debug_event)
1777 process_id_t pid; /* process id to continue */
1778 thread_id_t tid; /* thread id to continue */
1779 int status; /* continuation status */
1780 @END
1783 /* Start/stop debugging an existing process */
1784 @REQ(debug_process)
1785 process_id_t pid; /* id of the process to debug */
1786 int attach; /* 1=attaching / 0=detaching from the process */
1787 @END
1790 /* Simulate a breakpoint in a process */
1791 @REQ(debug_break)
1792 obj_handle_t handle; /* process handle */
1793 @REPLY
1794 int self; /* was it the caller itself? */
1795 @END
1798 /* Set debugger kill on exit flag */
1799 @REQ(set_debugger_kill_on_exit)
1800 int kill_on_exit; /* 0=detach/1=kill debuggee when debugger dies */
1801 @END
1804 /* Read data from a process address space */
1805 @REQ(read_process_memory)
1806 obj_handle_t handle; /* process handle */
1807 client_ptr_t addr; /* addr to read from */
1808 @REPLY
1809 VARARG(data,bytes); /* result data */
1810 @END
1813 /* Write data to a process address space */
1814 @REQ(write_process_memory)
1815 obj_handle_t handle; /* process handle */
1816 client_ptr_t addr; /* addr to write to */
1817 VARARG(data,bytes); /* data to write */
1818 @END
1821 /* Create a registry key */
1822 @REQ(create_key)
1823 unsigned int access; /* desired access rights */
1824 unsigned int options; /* creation options */
1825 VARARG(objattr,object_attributes); /* object attributes */
1826 VARARG(class,unicode_str); /* class name */
1827 @REPLY
1828 obj_handle_t hkey; /* handle to the created key */
1829 int created; /* has it been newly created? */
1830 @END
1832 /* Open a registry key */
1833 @REQ(open_key)
1834 obj_handle_t parent; /* handle to the parent key */
1835 unsigned int access; /* desired access rights */
1836 unsigned int attributes; /* object attributes */
1837 VARARG(name,unicode_str); /* key name */
1838 @REPLY
1839 obj_handle_t hkey; /* handle to the open key */
1840 @END
1843 /* Delete a registry key */
1844 @REQ(delete_key)
1845 obj_handle_t hkey; /* handle to the key */
1846 @END
1849 /* Flush a registry key */
1850 @REQ(flush_key)
1851 obj_handle_t hkey; /* handle to the key */
1852 @END
1855 /* Enumerate registry subkeys */
1856 @REQ(enum_key)
1857 obj_handle_t hkey; /* handle to registry key */
1858 int index; /* index of subkey (or -1 for current key) */
1859 int info_class; /* requested information class */
1860 @REPLY
1861 int subkeys; /* number of subkeys */
1862 int max_subkey; /* longest subkey name */
1863 int max_class; /* longest class name */
1864 int values; /* number of values */
1865 int max_value; /* longest value name */
1866 int max_data; /* longest value data */
1867 timeout_t modif; /* last modification time */
1868 data_size_t total; /* total length needed for full name and class */
1869 data_size_t namelen; /* length of key name in bytes */
1870 VARARG(name,unicode_str,namelen); /* key name */
1871 VARARG(class,unicode_str); /* class name */
1872 @END
1875 /* Set a value of a registry key */
1876 @REQ(set_key_value)
1877 obj_handle_t hkey; /* handle to registry key */
1878 int type; /* value type */
1879 data_size_t namelen; /* length of value name in bytes */
1880 VARARG(name,unicode_str,namelen); /* value name */
1881 VARARG(data,bytes); /* value data */
1882 @END
1885 /* Retrieve the value of a registry key */
1886 @REQ(get_key_value)
1887 obj_handle_t hkey; /* handle to registry key */
1888 VARARG(name,unicode_str); /* value name */
1889 @REPLY
1890 int type; /* value type */
1891 data_size_t total; /* total length needed for data */
1892 VARARG(data,bytes); /* value data */
1893 @END
1896 /* Enumerate a value of a registry key */
1897 @REQ(enum_key_value)
1898 obj_handle_t hkey; /* handle to registry key */
1899 int index; /* value index */
1900 int info_class; /* requested information class */
1901 @REPLY
1902 int type; /* value type */
1903 data_size_t total; /* total length needed for full name and data */
1904 data_size_t namelen; /* length of value name in bytes */
1905 VARARG(name,unicode_str,namelen); /* value name */
1906 VARARG(data,bytes); /* value data */
1907 @END
1910 /* Delete a value of a registry key */
1911 @REQ(delete_key_value)
1912 obj_handle_t hkey; /* handle to registry key */
1913 VARARG(name,unicode_str); /* value name */
1914 @END
1917 /* Load a registry branch from a file */
1918 @REQ(load_registry)
1919 obj_handle_t file; /* file to load from */
1920 VARARG(objattr,object_attributes); /* object attributes */
1921 @END
1924 /* UnLoad a registry branch from a file */
1925 @REQ(unload_registry)
1926 obj_handle_t hkey; /* root key to unload to */
1927 @END
1930 /* Save a registry branch to a file */
1931 @REQ(save_registry)
1932 obj_handle_t hkey; /* key to save */
1933 obj_handle_t file; /* file to save to */
1934 @END
1937 /* Add a registry key change notification */
1938 @REQ(set_registry_notification)
1939 obj_handle_t hkey; /* key to watch for changes */
1940 obj_handle_t event; /* event to set */
1941 int subtree; /* should we watch the whole subtree? */
1942 unsigned int filter; /* things to watch */
1943 @END
1946 /* Create a waitable timer */
1947 @REQ(create_timer)
1948 unsigned int access; /* wanted access rights */
1949 int manual; /* manual reset */
1950 VARARG(objattr,object_attributes); /* object attributes */
1951 @REPLY
1952 obj_handle_t handle; /* handle to the timer */
1953 @END
1956 /* Open a waitable timer */
1957 @REQ(open_timer)
1958 unsigned int access; /* wanted access rights */
1959 unsigned int attributes; /* object attributes */
1960 obj_handle_t rootdir; /* root directory */
1961 VARARG(name,unicode_str); /* object name */
1962 @REPLY
1963 obj_handle_t handle; /* handle to the timer */
1964 @END
1966 /* Set a waitable timer */
1967 @REQ(set_timer)
1968 obj_handle_t handle; /* handle to the timer */
1969 timeout_t expire; /* next expiration absolute time */
1970 client_ptr_t callback; /* callback function */
1971 client_ptr_t arg; /* callback argument */
1972 int period; /* timer period in ms */
1973 @REPLY
1974 int signaled; /* was the timer signaled before this call ? */
1975 @END
1977 /* Cancel a waitable timer */
1978 @REQ(cancel_timer)
1979 obj_handle_t handle; /* handle to the timer */
1980 @REPLY
1981 int signaled; /* was the timer signaled before this calltime ? */
1982 @END
1984 /* Get information on a waitable timer */
1985 @REQ(get_timer_info)
1986 obj_handle_t handle; /* handle to the timer */
1987 @REPLY
1988 timeout_t when; /* absolute time when the timer next expires */
1989 int signaled; /* is the timer signaled? */
1990 @END
1993 /* Retrieve the current context of a thread */
1994 @REQ(get_thread_context)
1995 obj_handle_t handle; /* thread handle */
1996 unsigned int flags; /* context flags */
1997 int suspend; /* suspend the thread if needed */
1998 @REPLY
1999 int self; /* was it a handle to the current thread? */
2000 VARARG(context,context); /* thread context */
2001 @END
2004 /* Set the current context of a thread */
2005 @REQ(set_thread_context)
2006 obj_handle_t handle; /* thread handle */
2007 int suspend; /* suspend the thread if needed */
2008 VARARG(context,context); /* thread context */
2009 @REPLY
2010 int self; /* was it a handle to the current thread? */
2011 @END
2014 /* Fetch a selector entry for a thread */
2015 @REQ(get_selector_entry)
2016 obj_handle_t handle; /* thread handle */
2017 int entry; /* LDT entry */
2018 @REPLY
2019 unsigned int base; /* selector base */
2020 unsigned int limit; /* selector limit */
2021 unsigned char flags; /* selector flags */
2022 @END
2025 /* Add an atom */
2026 @REQ(add_atom)
2027 obj_handle_t table; /* which table to add atom to */
2028 VARARG(name,unicode_str); /* atom name */
2029 @REPLY
2030 atom_t atom; /* resulting atom */
2031 @END
2034 /* Delete an atom */
2035 @REQ(delete_atom)
2036 obj_handle_t table; /* which table to delete atom from */
2037 atom_t atom; /* atom handle */
2038 @END
2041 /* Find an atom */
2042 @REQ(find_atom)
2043 obj_handle_t table; /* which table to find atom from */
2044 VARARG(name,unicode_str); /* atom name */
2045 @REPLY
2046 atom_t atom; /* atom handle */
2047 @END
2050 /* Get information about an atom */
2051 @REQ(get_atom_information)
2052 obj_handle_t table; /* which table to find atom from */
2053 atom_t atom; /* atom handle */
2054 @REPLY
2055 int count; /* atom lock count */
2056 int pinned; /* whether the atom has been pinned */
2057 data_size_t total; /* actual length of atom name */
2058 VARARG(name,unicode_str); /* atom name */
2059 @END
2062 /* Set information about an atom */
2063 @REQ(set_atom_information)
2064 obj_handle_t table; /* which table to find atom from */
2065 atom_t atom; /* atom handle */
2066 int pinned; /* whether to bump atom information */
2067 @END
2070 /* Empty an atom table */
2071 @REQ(empty_atom_table)
2072 obj_handle_t table; /* which table to find atom from */
2073 int if_pinned; /* whether to delete pinned atoms */
2074 @END
2077 /* Init an atom table */
2078 @REQ(init_atom_table)
2079 int entries; /* number of entries (only for local) */
2080 @REPLY
2081 obj_handle_t table; /* handle to the atom table */
2082 @END
2085 /* Get the message queue of the current thread */
2086 @REQ(get_msg_queue)
2087 @REPLY
2088 obj_handle_t handle; /* handle to the queue */
2089 @END
2092 /* Set the file descriptor associated to the current thread queue */
2093 @REQ(set_queue_fd)
2094 obj_handle_t handle; /* handle to the file descriptor */
2095 @END
2098 /* Set the current message queue wakeup mask */
2099 @REQ(set_queue_mask)
2100 unsigned int wake_mask; /* wakeup bits mask */
2101 unsigned int changed_mask; /* changed bits mask */
2102 int skip_wait; /* will we skip waiting if signaled? */
2103 @REPLY
2104 unsigned int wake_bits; /* current wake bits */
2105 unsigned int changed_bits; /* current changed bits */
2106 @END
2109 /* Get the current message queue status */
2110 @REQ(get_queue_status)
2111 unsigned int clear_bits; /* should we clear the change bits? */
2112 @REPLY
2113 unsigned int wake_bits; /* wake bits */
2114 unsigned int changed_bits; /* changed bits since last time */
2115 @END
2118 /* Retrieve the process idle event */
2119 @REQ(get_process_idle_event)
2120 obj_handle_t handle; /* process handle */
2121 @REPLY
2122 obj_handle_t event; /* handle to idle event */
2123 @END
2126 /* Send a message to a thread queue */
2127 @REQ(send_message)
2128 thread_id_t id; /* thread id */
2129 int type; /* message type (see below) */
2130 int flags; /* message flags (see below) */
2131 user_handle_t win; /* window handle */
2132 unsigned int msg; /* message code */
2133 lparam_t wparam; /* parameters */
2134 lparam_t lparam; /* parameters */
2135 timeout_t timeout; /* timeout for reply */
2136 VARARG(data,message_data); /* message data for sent messages */
2137 @END
2139 @REQ(post_quit_message)
2140 int exit_code; /* exit code to return */
2141 @END
2143 enum message_type
2145 MSG_ASCII, /* Ascii message (from SendMessageA) */
2146 MSG_UNICODE, /* Unicode message (from SendMessageW) */
2147 MSG_NOTIFY, /* notify message (from SendNotifyMessageW), always Unicode */
2148 MSG_CALLBACK, /* callback message (from SendMessageCallbackW), always Unicode */
2149 MSG_CALLBACK_RESULT,/* result of a callback message */
2150 MSG_OTHER_PROCESS, /* sent from other process, may include vararg data, always Unicode */
2151 MSG_POSTED, /* posted message (from PostMessageW), always Unicode */
2152 MSG_HARDWARE, /* hardware message */
2153 MSG_WINEVENT, /* winevent message */
2154 MSG_HOOK_LL /* low-level hardware hook */
2156 #define SEND_MSG_ABORT_IF_HUNG 0x01
2159 /* Send a hardware message to a thread queue */
2160 @REQ(send_hardware_message)
2161 user_handle_t win; /* window handle */
2162 hw_input_t input; /* input data */
2163 unsigned int flags; /* flags (see below) */
2164 @REPLY
2165 int wait; /* do we need to wait for a reply? */
2166 int prev_x; /* previous cursor position */
2167 int prev_y;
2168 int new_x; /* new cursor position */
2169 int new_y;
2170 VARARG(keystate,bytes); /* global state array for all the keys */
2171 @END
2172 #define SEND_HWMSG_INJECTED 0x01
2175 /* Get a message from the current queue */
2176 @REQ(get_message)
2177 unsigned int flags; /* PM_* flags */
2178 user_handle_t get_win; /* window handle to get */
2179 unsigned int get_first; /* first message code to get */
2180 unsigned int get_last; /* last message code to get */
2181 unsigned int hw_id; /* id of the previous hardware message (or 0) */
2182 unsigned int wake_mask; /* wakeup bits mask */
2183 unsigned int changed_mask; /* changed bits mask */
2184 @REPLY
2185 user_handle_t win; /* window handle */
2186 unsigned int msg; /* message code */
2187 lparam_t wparam; /* parameters */
2188 lparam_t lparam; /* parameters */
2189 int type; /* message type */
2190 int x; /* message x position */
2191 int y; /* message y position */
2192 unsigned int time; /* message time */
2193 unsigned int active_hooks; /* active hooks bitmap */
2194 data_size_t total; /* total size of extra data */
2195 VARARG(data,message_data); /* message data for sent messages */
2196 @END
2199 /* Reply to a sent message */
2200 @REQ(reply_message)
2201 int remove; /* should we remove the message? */
2202 lparam_t result; /* message result */
2203 VARARG(data,bytes); /* message data for sent messages */
2204 @END
2207 /* Accept the current hardware message */
2208 @REQ(accept_hardware_message)
2209 unsigned int hw_id; /* id of the hardware message */
2210 int remove; /* should we remove the message? */
2211 @END
2214 /* Retrieve the reply for the last message sent */
2215 @REQ(get_message_reply)
2216 int cancel; /* cancel message if not ready? */
2217 @REPLY
2218 lparam_t result; /* message result */
2219 VARARG(data,bytes); /* message data for sent messages */
2220 @END
2223 /* Set a window timer */
2224 @REQ(set_win_timer)
2225 user_handle_t win; /* window handle */
2226 unsigned int msg; /* message to post */
2227 unsigned int rate; /* timer rate in ms */
2228 lparam_t id; /* timer id */
2229 lparam_t lparam; /* message lparam (callback proc) */
2230 @REPLY
2231 lparam_t id; /* timer id */
2232 @END
2235 /* Kill a window timer */
2236 @REQ(kill_win_timer)
2237 user_handle_t win; /* window handle */
2238 lparam_t id; /* timer id */
2239 unsigned int msg; /* message to post */
2240 @END
2243 /* check if the thread owning the window is hung */
2244 @REQ(is_window_hung)
2245 user_handle_t win; /* window handle */
2246 @REPLY
2247 int is_hung;
2248 @END
2251 /* Retrieve info about a serial port */
2252 @REQ(get_serial_info)
2253 obj_handle_t handle; /* handle to comm port */
2254 int flags;
2255 @REPLY
2256 unsigned int readinterval;
2257 unsigned int readconst;
2258 unsigned int readmult;
2259 unsigned int writeconst;
2260 unsigned int writemult;
2261 unsigned int eventmask;
2262 unsigned int cookie;
2263 unsigned int pending_write;
2264 @END
2267 /* Set info about a serial port */
2268 @REQ(set_serial_info)
2269 obj_handle_t handle; /* handle to comm port */
2270 int flags; /* bitmask to set values (see below) */
2271 unsigned int readinterval;
2272 unsigned int readconst;
2273 unsigned int readmult;
2274 unsigned int writeconst;
2275 unsigned int writemult;
2276 unsigned int eventmask;
2277 @END
2278 #define SERIALINFO_SET_TIMEOUTS 0x01
2279 #define SERIALINFO_SET_MASK 0x02
2280 #define SERIALINFO_PENDING_WRITE 0x04
2281 #define SERIALINFO_PENDING_WAIT 0x08
2284 /* Create an async I/O */
2285 @REQ(register_async)
2286 int type; /* type of queue to look after */
2287 async_data_t async; /* async I/O parameters */
2288 int count; /* count - usually # of bytes to be read/written */
2289 @END
2290 #define ASYNC_TYPE_READ 0x01
2291 #define ASYNC_TYPE_WRITE 0x02
2292 #define ASYNC_TYPE_WAIT 0x03
2295 /* Cancel all async op on a fd */
2296 @REQ(cancel_async)
2297 obj_handle_t handle; /* handle to comm port, socket or file */
2298 client_ptr_t iosb; /* I/O status block (NULL=all) */
2299 int only_thread; /* cancel matching this thread */
2300 @END
2303 /* Perform a read on a file object */
2304 @REQ(read)
2305 int blocking; /* whether it's a blocking read */
2306 async_data_t async; /* async I/O parameters */
2307 file_pos_t pos; /* read position */
2308 @REPLY
2309 obj_handle_t wait; /* handle to wait on for blocking read */
2310 unsigned int options; /* device open options */
2311 VARARG(data,bytes); /* read data */
2312 @END
2315 /* Perform a write on a file object */
2316 @REQ(write)
2317 int blocking; /* whether it's a blocking write */
2318 async_data_t async; /* async I/O parameters */
2319 file_pos_t pos; /* write position */
2320 VARARG(data,bytes); /* write data */
2321 @REPLY
2322 obj_handle_t wait; /* handle to wait on for blocking write */
2323 unsigned int options; /* device open options */
2324 data_size_t size; /* size written */
2325 @END
2328 /* Perform an ioctl on a file */
2329 @REQ(ioctl)
2330 ioctl_code_t code; /* ioctl code */
2331 async_data_t async; /* async I/O parameters */
2332 int blocking; /* whether it's a blocking ioctl */
2333 VARARG(in_data,bytes); /* ioctl input data */
2334 @REPLY
2335 obj_handle_t wait; /* handle to wait on for blocking ioctl */
2336 unsigned int options; /* device open options */
2337 VARARG(out_data,bytes); /* ioctl output data */
2338 @END
2341 /* Store results of an async irp */
2342 @REQ(set_irp_result)
2343 obj_handle_t handle; /* handle to the irp */
2344 unsigned int status; /* status of the irp */
2345 data_size_t size; /* result size (input or output depending on the operation) */
2346 client_ptr_t file_ptr; /* opaque pointer to the file object */
2347 VARARG(data,bytes); /* output data of the irp */
2348 @END
2351 /* Retrieve results of an async irp */
2352 @REQ(get_irp_result)
2353 obj_handle_t handle; /* handle to the device */
2354 client_ptr_t user_arg; /* user arg used to identify the request */
2355 @REPLY
2356 data_size_t size; /* result size (input or output depending on the operation) */
2357 VARARG(out_data,bytes); /* irp output data */
2358 @END
2361 /* Create a named pipe */
2362 @REQ(create_named_pipe)
2363 unsigned int access;
2364 unsigned int options;
2365 unsigned int sharing;
2366 unsigned int maxinstances;
2367 unsigned int outsize;
2368 unsigned int insize;
2369 timeout_t timeout;
2370 unsigned int flags;
2371 VARARG(objattr,object_attributes); /* object attributes */
2372 @REPLY
2373 obj_handle_t handle; /* handle to the pipe */
2374 @END
2376 /* flags in create_named_pipe and get_named_pipe_info */
2377 #define NAMED_PIPE_MESSAGE_STREAM_WRITE 0x0001
2378 #define NAMED_PIPE_MESSAGE_STREAM_READ 0x0002
2379 #define NAMED_PIPE_NONBLOCKING_MODE 0x0004
2380 #define NAMED_PIPE_SERVER_END 0x8000
2382 /* Get named pipe information by handle */
2383 @REQ(get_named_pipe_info)
2384 obj_handle_t handle;
2385 @REPLY
2386 unsigned int flags;
2387 unsigned int sharing;
2388 unsigned int maxinstances;
2389 unsigned int instances;
2390 unsigned int outsize;
2391 unsigned int insize;
2392 @END
2394 /* Set named pipe information by handle */
2395 @REQ(set_named_pipe_info)
2396 obj_handle_t handle;
2397 unsigned int flags;
2398 @END
2400 /* Create a window */
2401 @REQ(create_window)
2402 user_handle_t parent; /* parent window */
2403 user_handle_t owner; /* owner window */
2404 atom_t atom; /* class atom */
2405 mod_handle_t instance; /* module instance */
2406 VARARG(class,unicode_str); /* class name */
2407 @REPLY
2408 user_handle_t handle; /* created window */
2409 user_handle_t parent; /* full handle of parent */
2410 user_handle_t owner; /* full handle of owner */
2411 int extra; /* number of extra bytes */
2412 client_ptr_t class_ptr; /* pointer to class in client address space */
2413 @END
2416 /* Destroy a window */
2417 @REQ(destroy_window)
2418 user_handle_t handle; /* handle to the window */
2419 @END
2422 /* Retrieve the desktop window for the current thread */
2423 @REQ(get_desktop_window)
2424 int force; /* force creation if it doesn't exist */
2425 @REPLY
2426 user_handle_t top_window; /* handle to the desktop window */
2427 user_handle_t msg_window; /* handle to the top-level HWND_MESSAGE parent */
2428 @END
2431 /* Set a window owner */
2432 @REQ(set_window_owner)
2433 user_handle_t handle; /* handle to the window */
2434 user_handle_t owner; /* new owner */
2435 @REPLY
2436 user_handle_t full_owner; /* full handle of new owner */
2437 user_handle_t prev_owner; /* full handle of previous owner */
2438 @END
2441 /* Get information from a window handle */
2442 @REQ(get_window_info)
2443 user_handle_t handle; /* handle to the window */
2444 @REPLY
2445 user_handle_t full_handle; /* full 32-bit handle */
2446 user_handle_t last_active; /* last active popup */
2447 process_id_t pid; /* process owning the window */
2448 thread_id_t tid; /* thread owning the window */
2449 atom_t atom; /* class atom */
2450 int is_unicode; /* ANSI or unicode */
2451 @END
2454 /* Set some information in a window */
2455 @REQ(set_window_info)
2456 unsigned short flags; /* flags for fields to set (see below) */
2457 short int is_unicode; /* ANSI or unicode */
2458 user_handle_t handle; /* handle to the window */
2459 unsigned int style; /* window style */
2460 unsigned int ex_style; /* window extended style */
2461 unsigned int id; /* window id */
2462 mod_handle_t instance; /* creator instance */
2463 lparam_t user_data; /* user-specific data */
2464 int extra_offset; /* offset to set in extra bytes */
2465 data_size_t extra_size; /* size to set in extra bytes */
2466 lparam_t extra_value; /* value to set in extra bytes */
2467 @REPLY
2468 unsigned int old_style; /* old window style */
2469 unsigned int old_ex_style; /* old window extended style */
2470 mod_handle_t old_instance; /* old creator instance */
2471 lparam_t old_user_data; /* old user-specific data */
2472 lparam_t old_extra_value; /* old value in extra bytes */
2473 unsigned int old_id; /* old window id */
2474 @END
2475 #define SET_WIN_STYLE 0x01
2476 #define SET_WIN_EXSTYLE 0x02
2477 #define SET_WIN_ID 0x04
2478 #define SET_WIN_INSTANCE 0x08
2479 #define SET_WIN_USERDATA 0x10
2480 #define SET_WIN_EXTRA 0x20
2481 #define SET_WIN_UNICODE 0x40
2484 /* Set the parent of a window */
2485 @REQ(set_parent)
2486 user_handle_t handle; /* handle to the window */
2487 user_handle_t parent; /* handle to the parent */
2488 @REPLY
2489 user_handle_t old_parent; /* old parent window */
2490 user_handle_t full_parent; /* full handle of new parent */
2491 @END
2494 /* Get a list of the window parents, up to the root of the tree */
2495 @REQ(get_window_parents)
2496 user_handle_t handle; /* handle to the window */
2497 @REPLY
2498 int count; /* total count of parents */
2499 VARARG(parents,user_handles); /* parent handles */
2500 @END
2503 /* Get a list of the window children */
2504 @REQ(get_window_children)
2505 obj_handle_t desktop; /* handle to desktop */
2506 user_handle_t parent; /* parent window */
2507 atom_t atom; /* class atom for the listed children */
2508 thread_id_t tid; /* thread owning the listed children */
2509 VARARG(class,unicode_str); /* class name */
2510 @REPLY
2511 int count; /* total count of children */
2512 VARARG(children,user_handles); /* children handles */
2513 @END
2516 /* Get a list of the window children that contain a given point */
2517 @REQ(get_window_children_from_point)
2518 user_handle_t parent; /* parent window */
2519 int x; /* point in parent coordinates */
2520 int y;
2521 @REPLY
2522 int count; /* total count of children */
2523 VARARG(children,user_handles); /* children handles */
2524 @END
2527 /* Get window tree information from a window handle */
2528 @REQ(get_window_tree)
2529 user_handle_t handle; /* handle to the window */
2530 @REPLY
2531 user_handle_t parent; /* parent window */
2532 user_handle_t owner; /* owner window */
2533 user_handle_t next_sibling; /* next sibling in Z-order */
2534 user_handle_t prev_sibling; /* prev sibling in Z-order */
2535 user_handle_t first_sibling; /* first sibling in Z-order */
2536 user_handle_t last_sibling; /* last sibling in Z-order */
2537 user_handle_t first_child; /* first child */
2538 user_handle_t last_child; /* last child */
2539 @END
2541 /* Set the position and Z order of a window */
2542 @REQ(set_window_pos)
2543 unsigned short swp_flags; /* SWP_* flags */
2544 unsigned short paint_flags; /* paint flags (see below) */
2545 user_handle_t handle; /* handle to the window */
2546 user_handle_t previous; /* previous window in Z order */
2547 rectangle_t window; /* window rectangle (in parent coords) */
2548 rectangle_t client; /* client rectangle (in parent coords) */
2549 VARARG(valid,rectangles); /* valid rectangles from WM_NCCALCSIZE (in parent coords) */
2550 @REPLY
2551 unsigned int new_style; /* new window style */
2552 unsigned int new_ex_style; /* new window extended style */
2553 user_handle_t surface_win; /* window that needs a surface update */
2554 @END
2555 #define SET_WINPOS_PAINT_SURFACE 0x01 /* window has a paintable surface */
2556 #define SET_WINPOS_PIXEL_FORMAT 0x02 /* window has a custom pixel format */
2558 /* Get the window and client rectangles of a window */
2559 @REQ(get_window_rectangles)
2560 user_handle_t handle; /* handle to the window */
2561 int relative; /* coords relative to (see below) */
2562 @REPLY
2563 rectangle_t window; /* window rectangle */
2564 rectangle_t visible; /* visible part of the window rectangle */
2565 rectangle_t client; /* client rectangle */
2566 @END
2567 enum coords_relative
2569 COORDS_CLIENT, /* relative to client area */
2570 COORDS_WINDOW, /* relative to whole window area */
2571 COORDS_PARENT, /* relative to parent's client area */
2572 COORDS_SCREEN /* relative to screen origin */
2576 /* Get the window text */
2577 @REQ(get_window_text)
2578 user_handle_t handle; /* handle to the window */
2579 @REPLY
2580 VARARG(text,unicode_str); /* window text */
2581 @END
2584 /* Set the window text */
2585 @REQ(set_window_text)
2586 user_handle_t handle; /* handle to the window */
2587 VARARG(text,unicode_str); /* window text */
2588 @END
2591 /* Get the coordinates offset between two windows */
2592 @REQ(get_windows_offset)
2593 user_handle_t from; /* handle to the first window */
2594 user_handle_t to; /* handle to the second window */
2595 @REPLY
2596 int x; /* x coordinate offset */
2597 int y; /* y coordinate offset */
2598 int mirror; /* whether to mirror the x coordinate */
2599 @END
2602 /* Get the visible region of a window */
2603 @REQ(get_visible_region)
2604 user_handle_t window; /* handle to the window */
2605 unsigned int flags; /* DCX flags */
2606 @REPLY
2607 user_handle_t top_win; /* top window to clip against */
2608 rectangle_t top_rect; /* top window visible rect with screen coords */
2609 rectangle_t win_rect; /* window rect in screen coords */
2610 unsigned int paint_flags; /* paint flags (from SET_WINPOS_* flags) */
2611 data_size_t total_size; /* total size of the resulting region */
2612 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2613 @END
2616 /* Get the visible surface region of a window */
2617 @REQ(get_surface_region)
2618 user_handle_t window; /* handle to the window */
2619 @REPLY
2620 rectangle_t visible_rect; /* window visible rect in screen coords */
2621 data_size_t total_size; /* total size of the resulting region */
2622 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2623 @END
2626 /* Get the window region */
2627 @REQ(get_window_region)
2628 user_handle_t window; /* handle to the window */
2629 @REPLY
2630 data_size_t total_size; /* total size of the resulting region */
2631 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2632 @END
2635 /* Set the window region */
2636 @REQ(set_window_region)
2637 user_handle_t window; /* handle to the window */
2638 int redraw; /* redraw the window? */
2639 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2640 @END
2643 /* Get the window update region */
2644 @REQ(get_update_region)
2645 user_handle_t window; /* handle to the window */
2646 user_handle_t from_child; /* child to start searching from */
2647 unsigned int flags; /* update flags (see below) */
2648 @REPLY
2649 user_handle_t child; /* child to repaint (or window itself) */
2650 unsigned int flags; /* resulting update flags (see below) */
2651 data_size_t total_size; /* total size of the resulting region */
2652 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2653 @END
2654 #define UPDATE_NONCLIENT 0x01 /* get region for repainting non-client area */
2655 #define UPDATE_ERASE 0x02 /* get region for erasing client area */
2656 #define UPDATE_PAINT 0x04 /* get region for painting client area */
2657 #define UPDATE_INTERNALPAINT 0x08 /* get region if internal paint is pending */
2658 #define UPDATE_ALLCHILDREN 0x10 /* force repaint of all children */
2659 #define UPDATE_NOCHILDREN 0x20 /* don't try to repaint any children */
2660 #define UPDATE_NOREGION 0x40 /* don't return a region, only the flags */
2661 #define UPDATE_DELAYED_ERASE 0x80 /* still needs erase after BeginPaint */
2664 /* Update the z order of a window so that a given rectangle is fully visible */
2665 @REQ(update_window_zorder)
2666 user_handle_t window; /* handle to the window */
2667 rectangle_t rect; /* rectangle that must be visible (in client coords) */
2668 @END
2671 /* Mark parts of a window as needing a redraw */
2672 @REQ(redraw_window)
2673 user_handle_t window; /* handle to the window */
2674 unsigned int flags; /* RDW_* flags */
2675 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2676 @END
2679 /* Set a window property */
2680 @REQ(set_window_property)
2681 user_handle_t window; /* handle to the window */
2682 lparam_t data; /* data to store */
2683 atom_t atom; /* property atom (if no name specified) */
2684 VARARG(name,unicode_str); /* property name */
2685 @END
2688 /* Remove a window property */
2689 @REQ(remove_window_property)
2690 user_handle_t window; /* handle to the window */
2691 atom_t atom; /* property atom (if no name specified) */
2692 VARARG(name,unicode_str); /* property name */
2693 @REPLY
2694 lparam_t data; /* data stored in property */
2695 @END
2698 /* Get a window property */
2699 @REQ(get_window_property)
2700 user_handle_t window; /* handle to the window */
2701 atom_t atom; /* property atom (if no name specified) */
2702 VARARG(name,unicode_str); /* property name */
2703 @REPLY
2704 lparam_t data; /* data stored in property */
2705 @END
2708 /* Get the list of properties of a window */
2709 @REQ(get_window_properties)
2710 user_handle_t window; /* handle to the window */
2711 @REPLY
2712 int total; /* total number of properties */
2713 VARARG(props,properties); /* list of properties */
2714 @END
2717 /* Create a window station */
2718 @REQ(create_winstation)
2719 unsigned int flags; /* window station flags */
2720 unsigned int access; /* wanted access rights */
2721 unsigned int attributes; /* object attributes */
2722 obj_handle_t rootdir; /* root directory */
2723 VARARG(name,unicode_str); /* object name */
2724 @REPLY
2725 obj_handle_t handle; /* handle to the window station */
2726 @END
2729 /* Open a handle to a window station */
2730 @REQ(open_winstation)
2731 unsigned int access; /* wanted access rights */
2732 unsigned int attributes; /* object attributes */
2733 obj_handle_t rootdir; /* root directory */
2734 VARARG(name,unicode_str); /* object name */
2735 @REPLY
2736 obj_handle_t handle; /* handle to the window station */
2737 @END
2740 /* Close a window station */
2741 @REQ(close_winstation)
2742 obj_handle_t handle; /* handle to the window station */
2743 @END
2746 /* Get the process current window station */
2747 @REQ(get_process_winstation)
2748 @REPLY
2749 obj_handle_t handle; /* handle to the window station */
2750 @END
2753 /* Set the process current window station */
2754 @REQ(set_process_winstation)
2755 obj_handle_t handle; /* handle to the window station */
2756 @END
2759 /* Enumerate window stations */
2760 @REQ(enum_winstation)
2761 unsigned int index; /* current index */
2762 @REPLY
2763 unsigned int next; /* next index */
2764 VARARG(name,unicode_str); /* window station name */
2765 @END
2768 /* Create a desktop */
2769 @REQ(create_desktop)
2770 unsigned int flags; /* desktop flags */
2771 unsigned int access; /* wanted access rights */
2772 unsigned int attributes; /* object attributes */
2773 VARARG(name,unicode_str); /* object name */
2774 @REPLY
2775 obj_handle_t handle; /* handle to the desktop */
2776 @END
2779 /* Open a handle to a desktop */
2780 @REQ(open_desktop)
2781 obj_handle_t winsta; /* window station to open (null allowed) */
2782 unsigned int flags; /* desktop flags */
2783 unsigned int access; /* wanted access rights */
2784 unsigned int attributes; /* object attributes */
2785 VARARG(name,unicode_str); /* object name */
2786 @REPLY
2787 obj_handle_t handle; /* handle to the desktop */
2788 @END
2791 /* Open a handle to current input desktop */
2792 @REQ(open_input_desktop)
2793 unsigned int flags; /* desktop flags */
2794 unsigned int access; /* wanted access rights */
2795 unsigned int attributes; /* object attributes */
2796 @REPLY
2797 obj_handle_t handle; /* handle to the desktop */
2798 @END
2801 /* Close a desktop */
2802 @REQ(close_desktop)
2803 obj_handle_t handle; /* handle to the desktop */
2804 @END
2807 /* Get the thread current desktop */
2808 @REQ(get_thread_desktop)
2809 thread_id_t tid; /* thread id */
2810 @REPLY
2811 obj_handle_t handle; /* handle to the desktop */
2812 @END
2815 /* Set the thread current desktop */
2816 @REQ(set_thread_desktop)
2817 obj_handle_t handle; /* handle to the desktop */
2818 @END
2821 /* Enumerate desktops */
2822 @REQ(enum_desktop)
2823 obj_handle_t winstation; /* handle to the window station */
2824 unsigned int index; /* current index */
2825 @REPLY
2826 unsigned int next; /* next index */
2827 VARARG(name,unicode_str); /* window station name */
2828 @END
2831 /* Get/set information about a user object (window station or desktop) */
2832 @REQ(set_user_object_info)
2833 obj_handle_t handle; /* handle to the object */
2834 unsigned int flags; /* information to set/get */
2835 unsigned int obj_flags; /* new object flags */
2836 @REPLY
2837 int is_desktop; /* is object a desktop? */
2838 unsigned int old_obj_flags; /* old object flags */
2839 VARARG(name,unicode_str); /* object name */
2840 @END
2841 #define SET_USER_OBJECT_SET_FLAGS 1
2842 #define SET_USER_OBJECT_GET_FULL_NAME 2
2845 /* Register a hotkey */
2846 @REQ(register_hotkey)
2847 user_handle_t window; /* handle to the window */
2848 int id; /* hotkey identifier */
2849 unsigned int flags; /* modifier keys */
2850 unsigned int vkey; /* virtual key code */
2851 @REPLY
2852 int replaced; /* did we replace an existing hotkey? */
2853 unsigned int flags; /* flags of replaced hotkey */
2854 unsigned int vkey; /* virtual key code of replaced hotkey */
2855 @END
2858 /* Unregister a hotkey */
2859 @REQ(unregister_hotkey)
2860 user_handle_t window; /* handle to the window */
2861 int id; /* hotkey identifier */
2862 @REPLY
2863 unsigned int flags; /* flags of removed hotkey */
2864 unsigned int vkey; /* virtual key code of removed hotkey */
2865 @END
2868 /* Attach (or detach) thread inputs */
2869 @REQ(attach_thread_input)
2870 thread_id_t tid_from; /* thread to be attached */
2871 thread_id_t tid_to; /* thread to which tid_from should be attached */
2872 int attach; /* is it an attach? */
2873 @END
2876 /* Get input data for a given thread */
2877 @REQ(get_thread_input)
2878 thread_id_t tid; /* id of thread */
2879 @REPLY
2880 user_handle_t focus; /* handle to the focus window */
2881 user_handle_t capture; /* handle to the capture window */
2882 user_handle_t active; /* handle to the active window */
2883 user_handle_t foreground; /* handle to the global foreground window */
2884 user_handle_t menu_owner; /* handle to the menu owner */
2885 user_handle_t move_size; /* handle to the moving/resizing window */
2886 user_handle_t caret; /* handle to the caret window */
2887 user_handle_t cursor; /* handle to the cursor */
2888 int show_count; /* cursor show count */
2889 rectangle_t rect; /* caret rectangle */
2890 @END
2893 /* Get the time of the last input event */
2894 @REQ(get_last_input_time)
2895 @REPLY
2896 unsigned int time;
2897 @END
2900 /* Retrieve queue keyboard state for a given thread */
2901 @REQ(get_key_state)
2902 thread_id_t tid; /* id of thread */
2903 int key; /* optional key code or -1 */
2904 @REPLY
2905 unsigned char state; /* state of specified key */
2906 VARARG(keystate,bytes); /* state array for all the keys */
2907 @END
2909 /* Set queue keyboard state for a given thread */
2910 @REQ(set_key_state)
2911 thread_id_t tid; /* id of thread */
2912 int async; /* whether to change the async state too */
2913 VARARG(keystate,bytes); /* state array for all the keys */
2914 @END
2916 /* Set the system foreground window */
2917 @REQ(set_foreground_window)
2918 user_handle_t handle; /* handle to the foreground window */
2919 @REPLY
2920 user_handle_t previous; /* handle to the previous foreground window */
2921 int send_msg_old; /* whether we have to send a msg to the old window */
2922 int send_msg_new; /* whether we have to send a msg to the new window */
2923 @END
2925 /* Set the current thread focus window */
2926 @REQ(set_focus_window)
2927 user_handle_t handle; /* handle to the focus window */
2928 @REPLY
2929 user_handle_t previous; /* handle to the previous focus window */
2930 @END
2932 /* Set the current thread active window */
2933 @REQ(set_active_window)
2934 user_handle_t handle; /* handle to the active window */
2935 @REPLY
2936 user_handle_t previous; /* handle to the previous active window */
2937 @END
2939 /* Set the current thread capture window */
2940 @REQ(set_capture_window)
2941 user_handle_t handle; /* handle to the capture window */
2942 unsigned int flags; /* capture flags (see below) */
2943 @REPLY
2944 user_handle_t previous; /* handle to the previous capture window */
2945 user_handle_t full_handle; /* full 32-bit handle of new capture window */
2946 @END
2947 #define CAPTURE_MENU 0x01 /* capture is for a menu */
2948 #define CAPTURE_MOVESIZE 0x02 /* capture is for moving/resizing */
2951 /* Set the current thread caret window */
2952 @REQ(set_caret_window)
2953 user_handle_t handle; /* handle to the caret window */
2954 int width; /* caret width */
2955 int height; /* caret height */
2956 @REPLY
2957 user_handle_t previous; /* handle to the previous caret window */
2958 rectangle_t old_rect; /* previous caret rectangle */
2959 int old_hide; /* previous hide count */
2960 int old_state; /* previous caret state (1=on, 0=off) */
2961 @END
2964 /* Set the current thread caret information */
2965 @REQ(set_caret_info)
2966 unsigned int flags; /* caret flags (see below) */
2967 user_handle_t handle; /* handle to the caret window */
2968 int x; /* caret x position */
2969 int y; /* caret y position */
2970 int hide; /* increment for hide count (can be negative to show it) */
2971 int state; /* caret state (see below) */
2972 @REPLY
2973 user_handle_t full_handle; /* handle to the current caret window */
2974 rectangle_t old_rect; /* previous caret rectangle */
2975 int old_hide; /* previous hide count */
2976 int old_state; /* previous caret state (1=on, 0=off) */
2977 @END
2978 #define SET_CARET_POS 0x01 /* set the caret position from x,y */
2979 #define SET_CARET_HIDE 0x02 /* increment the caret hide count */
2980 #define SET_CARET_STATE 0x04 /* set the caret on/off state */
2981 enum caret_state
2983 CARET_STATE_OFF, /* off */
2984 CARET_STATE_ON, /* on */
2985 CARET_STATE_TOGGLE, /* toggle current state */
2986 CARET_STATE_ON_IF_MOVED /* on if the position differs, unchanged otherwise */
2990 /* Set a window hook */
2991 @REQ(set_hook)
2992 int id; /* id of the hook */
2993 process_id_t pid; /* id of process to set the hook into */
2994 thread_id_t tid; /* id of thread to set the hook into */
2995 int event_min;
2996 int event_max;
2997 client_ptr_t proc; /* hook procedure */
2998 int flags;
2999 int unicode; /* is it a unicode hook? */
3000 VARARG(module,unicode_str); /* module name */
3001 @REPLY
3002 user_handle_t handle; /* handle to the hook */
3003 unsigned int active_hooks; /* active hooks bitmap */
3004 @END
3007 /* Remove a window hook */
3008 @REQ(remove_hook)
3009 user_handle_t handle; /* handle to the hook */
3010 client_ptr_t proc; /* hook procedure if handle is 0 */
3011 int id; /* id of the hook if handle is 0 */
3012 @REPLY
3013 unsigned int active_hooks; /* active hooks bitmap */
3014 @END
3017 /* Start calling a hook chain */
3018 @REQ(start_hook_chain)
3019 int id; /* id of the hook */
3020 int event; /* signalled event */
3021 user_handle_t window; /* handle to the event window */
3022 int object_id; /* object id for out of context winevent */
3023 int child_id; /* child id for out of context winevent */
3024 @REPLY
3025 user_handle_t handle; /* handle to the next hook */
3026 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
3027 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
3028 int unicode; /* is it a unicode hook? */
3029 client_ptr_t proc; /* hook procedure */
3030 unsigned int active_hooks; /* active hooks bitmap */
3031 VARARG(module,unicode_str); /* module name */
3032 @END
3035 /* Finished calling a hook chain */
3036 @REQ(finish_hook_chain)
3037 int id; /* id of the hook */
3038 @END
3041 /* Get the hook information */
3042 @REQ(get_hook_info)
3043 user_handle_t handle; /* handle to the current hook */
3044 int get_next; /* do we want info about current or next hook? */
3045 int event; /* signalled event */
3046 user_handle_t window; /* handle to the event window */
3047 int object_id; /* object id for out of context winevent */
3048 int child_id; /* child id for out of context winevent */
3049 @REPLY
3050 user_handle_t handle; /* handle to the hook */
3051 int id; /* id of the hook */
3052 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
3053 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
3054 client_ptr_t proc; /* hook procedure */
3055 int unicode; /* is it a unicode hook? */
3056 VARARG(module,unicode_str); /* module name */
3057 @END
3060 /* Create a window class */
3061 @REQ(create_class)
3062 int local; /* is it a local class? */
3063 atom_t atom; /* class atom */
3064 unsigned int style; /* class style */
3065 mod_handle_t instance; /* module instance */
3066 int extra; /* number of extra class bytes */
3067 int win_extra; /* number of window extra bytes */
3068 client_ptr_t client_ptr; /* pointer to class in client address space */
3069 VARARG(name,unicode_str); /* class name */
3070 @REPLY
3071 atom_t atom; /* resulting class atom */
3072 @END
3075 /* Destroy a window class */
3076 @REQ(destroy_class)
3077 atom_t atom; /* class atom */
3078 mod_handle_t instance; /* module instance */
3079 VARARG(name,unicode_str); /* class name */
3080 @REPLY
3081 client_ptr_t client_ptr; /* pointer to class in client address space */
3082 @END
3085 /* Set some information in a class */
3086 @REQ(set_class_info)
3087 user_handle_t window; /* handle to the window */
3088 unsigned int flags; /* flags for info to set (see below) */
3089 atom_t atom; /* class atom */
3090 unsigned int style; /* class style */
3091 int win_extra; /* number of window extra bytes */
3092 mod_handle_t instance; /* module instance */
3093 int extra_offset; /* offset to set in extra bytes */
3094 data_size_t extra_size; /* size to set in extra bytes */
3095 lparam_t extra_value; /* value to set in extra bytes */
3096 @REPLY
3097 atom_t old_atom; /* previous class atom */
3098 unsigned int old_style; /* previous class style */
3099 int old_extra; /* previous number of class extra bytes */
3100 int old_win_extra; /* previous number of window extra bytes */
3101 mod_handle_t old_instance; /* previous module instance */
3102 lparam_t old_extra_value; /* old value in extra bytes */
3103 @END
3104 #define SET_CLASS_ATOM 0x0001
3105 #define SET_CLASS_STYLE 0x0002
3106 #define SET_CLASS_WINEXTRA 0x0004
3107 #define SET_CLASS_INSTANCE 0x0008
3108 #define SET_CLASS_EXTRA 0x0010
3111 /* Set/get clipboard information */
3112 @REQ(set_clipboard_info)
3113 unsigned int flags; /* flags for fields to set (see below) */
3114 user_handle_t clipboard; /* clipboard window */
3115 user_handle_t owner; /* clipboard owner */
3116 user_handle_t viewer; /* first clipboard viewer */
3117 unsigned int seqno; /* change sequence number */
3118 @REPLY
3119 unsigned int flags; /* status flags (see below) */
3120 user_handle_t old_clipboard; /* old clipboard window */
3121 user_handle_t old_owner; /* old clipboard owner */
3122 user_handle_t old_viewer; /* old clipboard viewer */
3123 unsigned int seqno; /* current sequence number */
3124 @END
3126 #define SET_CB_OPEN 0x001
3127 #define SET_CB_VIEWER 0x004
3128 #define SET_CB_SEQNO 0x008
3129 #define SET_CB_RELOWNER 0x010
3130 #define SET_CB_CLOSE 0x020
3131 #define CB_OPEN 0x040
3132 #define CB_OWNER 0x080
3133 #define CB_PROCESS 0x100
3136 /* Empty the clipboard and grab ownership */
3137 @REQ(empty_clipboard)
3138 @END
3141 /* Open a security token */
3142 @REQ(open_token)
3143 obj_handle_t handle; /* handle to the thread or process */
3144 unsigned int access; /* access rights to the new token */
3145 unsigned int attributes;/* object attributes */
3146 unsigned int flags; /* flags (see below) */
3147 @REPLY
3148 obj_handle_t token; /* handle to the token */
3149 @END
3150 #define OPEN_TOKEN_THREAD 1
3151 #define OPEN_TOKEN_AS_SELF 2
3154 /* Set/get the global windows */
3155 @REQ(set_global_windows)
3156 unsigned int flags; /* flags for fields to set (see below) */
3157 user_handle_t shell_window; /* handle to the new shell window */
3158 user_handle_t shell_listview; /* handle to the new shell listview window */
3159 user_handle_t progman_window; /* handle to the new program manager window */
3160 user_handle_t taskman_window; /* handle to the new task manager window */
3161 @REPLY
3162 user_handle_t old_shell_window; /* handle to the shell window */
3163 user_handle_t old_shell_listview; /* handle to the shell listview window */
3164 user_handle_t old_progman_window; /* handle to the new program manager window */
3165 user_handle_t old_taskman_window; /* handle to the new task manager window */
3166 @END
3167 #define SET_GLOBAL_SHELL_WINDOWS 0x01 /* set both main shell and listview windows */
3168 #define SET_GLOBAL_PROGMAN_WINDOW 0x02
3169 #define SET_GLOBAL_TASKMAN_WINDOW 0x04
3171 /* Adjust the privileges held by a token */
3172 @REQ(adjust_token_privileges)
3173 obj_handle_t handle; /* handle to the token */
3174 int disable_all; /* disable all privileges? */
3175 int get_modified_state; /* get modified privileges? */
3176 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to enable/disable/remove */
3177 @REPLY
3178 unsigned int len; /* total length in bytes required to store token privileges */
3179 VARARG(privileges,LUID_AND_ATTRIBUTES); /* modified privileges */
3180 @END
3182 /* Retrieves the set of privileges held by or available to a token */
3183 @REQ(get_token_privileges)
3184 obj_handle_t handle; /* handle to the token */
3185 @REPLY
3186 unsigned int len; /* total length in bytes required to store token privileges */
3187 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
3188 @END
3190 /* Check the token has the required privileges */
3191 @REQ(check_token_privileges)
3192 obj_handle_t handle; /* handle to the token */
3193 int all_required; /* are all the privileges required for the check to succeed? */
3194 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to check */
3195 @REPLY
3196 int has_privileges; /* does the token have the required privileges? */
3197 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
3198 @END
3200 @REQ(duplicate_token)
3201 obj_handle_t handle; /* handle to the token to duplicate */
3202 unsigned int access; /* access rights to the new token */
3203 unsigned int attributes; /* object attributes */
3204 int primary; /* is the new token to be a primary one? */
3205 int impersonation_level; /* impersonation level of the new token */
3206 @REPLY
3207 obj_handle_t new_handle; /* duplicated handle */
3208 @END
3210 @REQ(access_check)
3211 obj_handle_t handle; /* handle to the token */
3212 unsigned int desired_access; /* desired access to the object */
3213 unsigned int mapping_read; /* mapping from generic read to specific rights */
3214 unsigned int mapping_write; /* mapping from generic write to specific rights */
3215 unsigned int mapping_execute; /* mapping from generic execute to specific rights */
3216 unsigned int mapping_all; /* mapping from generic all to specific rights */
3217 VARARG(sd,security_descriptor); /* security descriptor to check */
3218 @REPLY
3219 unsigned int access_granted; /* access rights actually granted */
3220 unsigned int access_status; /* was access granted? */
3221 unsigned int privileges_len; /* length needed to store privileges */
3222 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges used during access check */
3223 @END
3225 @REQ(get_token_sid)
3226 obj_handle_t handle; /* handle to the token */
3227 unsigned int which_sid; /* which SID to retrieve from the token */
3228 @REPLY
3229 data_size_t sid_len; /* length needed to store sid */
3230 VARARG(sid,SID); /* the sid specified by which_sid from the token */
3231 @END
3233 @REQ(get_token_groups)
3234 obj_handle_t handle; /* handle to the token */
3235 @REPLY
3236 data_size_t user_len; /* length needed to store user */
3237 VARARG(user,token_groups); /* groups the token's user belongs to */
3238 @END
3240 @REQ(get_token_default_dacl)
3241 obj_handle_t handle; /* handle to the token */
3242 @REPLY
3243 data_size_t acl_len; /* length needed to store access control list */
3244 VARARG(acl,ACL); /* access control list */
3245 @END
3247 @REQ(set_token_default_dacl)
3248 obj_handle_t handle; /* handle to the token */
3249 VARARG(acl,ACL); /* default dacl to set */
3250 @END
3252 @REQ(set_security_object)
3253 obj_handle_t handle; /* handle to the object */
3254 unsigned int security_info; /* which parts of security descriptor to set */
3255 VARARG(sd,security_descriptor); /* security descriptor to set */
3256 @END
3258 @REQ(get_security_object)
3259 obj_handle_t handle; /* handle to the object */
3260 unsigned int security_info; /* which parts of security descriptor to get */
3261 @REPLY
3262 unsigned int sd_len; /* buffer size needed for sd */
3263 VARARG(sd,security_descriptor); /* retrieved security descriptor */
3264 @END
3267 struct handle_info
3269 process_id_t owner;
3270 obj_handle_t handle;
3271 unsigned int access;
3274 /* Return a list of all opened handles */
3275 @REQ(get_system_handles)
3276 @REPLY
3277 unsigned int count; /* number of handles */
3278 VARARG(data,handle_infos); /* array of handle_infos */
3279 @END
3282 /* Create a mailslot */
3283 @REQ(create_mailslot)
3284 unsigned int access; /* wanted access rights */
3285 timeout_t read_timeout;
3286 unsigned int max_msgsize;
3287 VARARG(objattr,object_attributes); /* object attributes */
3288 @REPLY
3289 obj_handle_t handle; /* handle to the mailslot */
3290 @END
3293 /* Set mailslot information */
3294 @REQ(set_mailslot_info)
3295 obj_handle_t handle; /* handle to the mailslot */
3296 timeout_t read_timeout;
3297 unsigned int flags;
3298 @REPLY
3299 timeout_t read_timeout;
3300 unsigned int max_msgsize;
3301 @END
3302 #define MAILSLOT_SET_READ_TIMEOUT 1
3305 /* Create a directory object */
3306 @REQ(create_directory)
3307 unsigned int access; /* access flags */
3308 VARARG(objattr,object_attributes); /* object attributes */
3309 @REPLY
3310 obj_handle_t handle; /* handle to the directory */
3311 @END
3314 /* Open a directory object */
3315 @REQ(open_directory)
3316 unsigned int access; /* access flags */
3317 unsigned int attributes; /* object attributes */
3318 obj_handle_t rootdir; /* root directory */
3319 VARARG(directory_name,unicode_str); /* Directory name */
3320 @REPLY
3321 obj_handle_t handle; /* handle to the directory */
3322 @END
3325 /* Get a directory entry by index */
3326 @REQ(get_directory_entry)
3327 obj_handle_t handle; /* handle to the directory */
3328 unsigned int index; /* entry index */
3329 @REPLY
3330 data_size_t name_len; /* length of the entry name in bytes */
3331 VARARG(name,unicode_str,name_len); /* entry name */
3332 VARARG(type,unicode_str); /* entry type */
3333 @END
3336 /* Create a symbolic link object */
3337 @REQ(create_symlink)
3338 unsigned int access; /* access flags */
3339 VARARG(objattr,object_attributes); /* object attributes */
3340 VARARG(target_name,unicode_str); /* target name */
3341 @REPLY
3342 obj_handle_t handle; /* handle to the symlink */
3343 @END
3346 /* Open a symbolic link object */
3347 @REQ(open_symlink)
3348 unsigned int access; /* access flags */
3349 unsigned int attributes; /* object attributes */
3350 obj_handle_t rootdir; /* root directory */
3351 VARARG(name,unicode_str); /* symlink name */
3352 @REPLY
3353 obj_handle_t handle; /* handle to the symlink */
3354 @END
3357 /* Query a symbolic link object */
3358 @REQ(query_symlink)
3359 obj_handle_t handle; /* handle to the symlink */
3360 @REPLY
3361 data_size_t total; /* total needed size for name */
3362 VARARG(target_name,unicode_str); /* target name */
3363 @END
3366 /* Query basic object information */
3367 @REQ(get_object_info)
3368 obj_handle_t handle; /* handle to the object */
3369 @REPLY
3370 unsigned int access; /* granted access mask */
3371 unsigned int ref_count; /* object ref count */
3372 unsigned int handle_count; /* object handle count */
3373 data_size_t total; /* total needed size for name */
3374 VARARG(name,unicode_str); /* object name */
3375 @END
3378 /* Query object type name information */
3379 @REQ(get_object_type)
3380 obj_handle_t handle; /* handle to the object */
3381 @REPLY
3382 data_size_t total; /* needed size for type name */
3383 VARARG(type,unicode_str); /* type name */
3384 @END
3387 /* Unlink a named object */
3388 @REQ(unlink_object)
3389 obj_handle_t handle; /* handle to the object */
3390 @END
3393 /* Query the impersonation level of an impersonation token */
3394 @REQ(get_token_impersonation_level)
3395 obj_handle_t handle; /* handle to the object */
3396 @REPLY
3397 int impersonation_level; /* impersonation level of the impersonation token */
3398 @END
3400 /* Allocate a locally-unique identifier */
3401 @REQ(allocate_locally_unique_id)
3402 @REPLY
3403 luid_t luid;
3404 @END
3407 /* Create a device manager */
3408 @REQ(create_device_manager)
3409 unsigned int access; /* wanted access rights */
3410 unsigned int attributes; /* object attributes */
3411 @REPLY
3412 obj_handle_t handle; /* handle to the device */
3413 @END
3416 /* Create a device */
3417 @REQ(create_device)
3418 unsigned int access; /* wanted access rights */
3419 unsigned int attributes; /* object attributes */
3420 obj_handle_t rootdir; /* root directory */
3421 client_ptr_t user_ptr; /* opaque ptr for use by client */
3422 obj_handle_t manager; /* device manager */
3423 VARARG(name,unicode_str); /* object name */
3424 @REPLY
3425 obj_handle_t handle; /* handle to the device */
3426 @END
3429 /* Delete a device */
3430 @REQ(delete_device)
3431 obj_handle_t handle; /* handle to the device */
3432 @END
3435 /* Retrieve the next pending device irp request */
3436 @REQ(get_next_device_request)
3437 obj_handle_t manager; /* handle to the device manager */
3438 obj_handle_t prev; /* handle to the previous irp */
3439 unsigned int status; /* status of the previous irp */
3440 @REPLY
3441 irp_params_t params; /* irp parameters */
3442 obj_handle_t next; /* handle to the next irp */
3443 process_id_t client_pid; /* pid of process calling irp */
3444 thread_id_t client_tid; /* tid of thread calling irp */
3445 data_size_t in_size; /* total needed input size */
3446 data_size_t out_size; /* needed output size */
3447 VARARG(next_data,bytes); /* input data of the next irp */
3448 @END
3451 /* Make the current process a system process */
3452 @REQ(make_process_system)
3453 @REPLY
3454 obj_handle_t event; /* event signaled when all user processes have exited */
3455 @END
3458 /* Get detailed fixed-size information about a token */
3459 @REQ(get_token_statistics)
3460 obj_handle_t handle; /* handle to the object */
3461 @REPLY
3462 luid_t token_id; /* locally-unique identifier of the token */
3463 luid_t modified_id; /* locally-unique identifier of the modified version of the token */
3464 int primary; /* is the token primary or impersonation? */
3465 int impersonation_level; /* level of impersonation */
3466 int group_count; /* the number of groups the token is a member of */
3467 int privilege_count; /* the number of privileges the token has */
3468 @END
3471 /* Create I/O completion port */
3472 @REQ(create_completion)
3473 unsigned int access; /* desired access to a port */
3474 unsigned int concurrent; /* max number of concurrent active threads */
3475 VARARG(objattr,object_attributes); /* object attributes */
3476 @REPLY
3477 obj_handle_t handle; /* port handle */
3478 @END
3481 /* Open I/O completion port */
3482 @REQ(open_completion)
3483 unsigned int access; /* desired access to a port */
3484 unsigned int attributes; /* object attributes */
3485 obj_handle_t rootdir; /* root directory */
3486 VARARG(filename,unicode_str); /* port name */
3487 @REPLY
3488 obj_handle_t handle; /* port handle */
3489 @END
3492 /* add completion to completion port */
3493 @REQ(add_completion)
3494 obj_handle_t handle; /* port handle */
3495 apc_param_t ckey; /* completion key */
3496 apc_param_t cvalue; /* completion value */
3497 apc_param_t information; /* IO_STATUS_BLOCK Information */
3498 unsigned int status; /* completion result */
3499 @END
3502 /* get completion from completion port queue */
3503 @REQ(remove_completion)
3504 obj_handle_t handle; /* port handle */
3505 @REPLY
3506 apc_param_t ckey; /* completion key */
3507 apc_param_t cvalue; /* completion value */
3508 apc_param_t information; /* IO_STATUS_BLOCK Information */
3509 unsigned int status; /* completion result */
3510 @END
3513 /* get completion queue depth */
3514 @REQ(query_completion)
3515 obj_handle_t handle; /* port handle */
3516 @REPLY
3517 unsigned int depth; /* completion queue depth */
3518 @END
3521 /* associate object with completion port */
3522 @REQ(set_completion_info)
3523 obj_handle_t handle; /* object handle */
3524 apc_param_t ckey; /* completion key */
3525 obj_handle_t chandle; /* port handle */
3526 @END
3529 /* check for associated completion and push msg */
3530 @REQ(add_fd_completion)
3531 obj_handle_t handle; /* async' object */
3532 apc_param_t cvalue; /* completion value */
3533 apc_param_t information; /* IO_STATUS_BLOCK Information */
3534 unsigned int status; /* completion status */
3535 @END
3538 /* set fd disposition information */
3539 @REQ(set_fd_disp_info)
3540 obj_handle_t handle; /* handle to a file or directory */
3541 int unlink; /* whether to unlink file on close */
3542 @END
3545 /* set fd name information */
3546 @REQ(set_fd_name_info)
3547 obj_handle_t handle; /* handle to a file or directory */
3548 obj_handle_t rootdir; /* root directory */
3549 int link; /* link instead of renaming */
3550 VARARG(filename,string); /* new file name */
3551 @END
3554 /* Retrieve layered info for a window */
3555 @REQ(get_window_layered_info)
3556 user_handle_t handle; /* handle to the window */
3557 @REPLY
3558 unsigned int color_key; /* color key */
3559 unsigned int alpha; /* alpha (0..255) */
3560 unsigned int flags; /* LWA_* flags */
3561 @END
3564 /* Set layered info for a window */
3565 @REQ(set_window_layered_info)
3566 user_handle_t handle; /* handle to the window */
3567 unsigned int color_key; /* color key */
3568 unsigned int alpha; /* alpha (0..255) */
3569 unsigned int flags; /* LWA_* flags */
3570 @END
3573 /* Allocate an arbitrary user handle */
3574 @REQ(alloc_user_handle)
3575 @REPLY
3576 user_handle_t handle; /* allocated handle */
3577 @END
3580 /* Free an arbitrary user handle */
3581 @REQ(free_user_handle)
3582 user_handle_t handle; /* handle to free*/
3583 @END
3586 /* Set/get the current cursor */
3587 @REQ(set_cursor)
3588 unsigned int flags; /* flags for fields to set (see below) */
3589 user_handle_t handle; /* handle to the cursor */
3590 int show_count; /* show count increment/decrement */
3591 int x; /* cursor position */
3592 int y;
3593 rectangle_t clip; /* cursor clip rectangle */
3594 unsigned int clip_msg; /* message to post on cursor clip changes */
3595 @REPLY
3596 user_handle_t prev_handle; /* previous handle */
3597 int prev_count; /* previous show count */
3598 int prev_x; /* previous position */
3599 int prev_y;
3600 int new_x; /* new position */
3601 int new_y;
3602 rectangle_t new_clip; /* new clip rectangle */
3603 unsigned int last_change; /* time of last position change */
3604 @END
3605 #define SET_CURSOR_HANDLE 0x01
3606 #define SET_CURSOR_COUNT 0x02
3607 #define SET_CURSOR_POS 0x04
3608 #define SET_CURSOR_CLIP 0x08
3609 #define SET_CURSOR_NOCLIP 0x10
3612 /* Modify the list of registered rawinput devices */
3613 @REQ(update_rawinput_devices)
3614 VARARG(devices,rawinput_devices);
3615 @END
3618 /* Retrieve the suspended context of a thread */
3619 @REQ(get_suspend_context)
3620 @REPLY
3621 VARARG(context,context); /* thread context */
3622 @END
3625 /* Store the suspend context of a thread */
3626 @REQ(set_suspend_context)
3627 VARARG(context,context); /* thread context */
3628 @END
3631 /* Create a new job object */
3632 @REQ(create_job)
3633 unsigned int access; /* wanted access rights */
3634 VARARG(objattr,object_attributes); /* object attributes */
3635 @REPLY
3636 obj_handle_t handle; /* handle to the job */
3637 @END
3640 /* Open a job object */
3641 @REQ(open_job)
3642 unsigned int access; /* wanted access rights */
3643 unsigned int attributes; /* object attributes */
3644 obj_handle_t rootdir; /* root directory */
3645 VARARG(name,unicode_str); /* object name */
3646 @REPLY
3647 obj_handle_t handle; /* handle to the job */
3648 @END
3651 /* Assign a job object to a process */
3652 @REQ(assign_job)
3653 obj_handle_t job; /* handle to the job */
3654 obj_handle_t process; /* handle to the process */
3655 @END
3658 /* Check if a process is associated with a job */
3659 @REQ(process_in_job)
3660 obj_handle_t job; /* handle to the job */
3661 obj_handle_t process; /* handle to the process */
3662 @END
3665 /* Set limit flags on a job */
3666 @REQ(set_job_limits)
3667 obj_handle_t handle; /* handle to the job */
3668 unsigned int limit_flags; /* new limit flags */
3669 @END
3672 /* Set new completion port for a job */
3673 @REQ(set_job_completion_port)
3674 obj_handle_t job; /* handle to the job */
3675 obj_handle_t port; /* handle to the completion port */
3676 client_ptr_t key; /* key to send with completion messages */
3677 @END
3680 /* Terminate all processes associated with the job */
3681 @REQ(terminate_job)
3682 obj_handle_t handle; /* handle to the job */
3683 int status; /* process exit code */
3684 @END