server: Queue an IRP_MJ_CREATE request on file creation.
[wine/multimedia.git] / server / protocol.def
blob5372c52361c8a7ae45b9d23060ae69276411bd5e
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 data_size_t sd_len; /* length of security_descriptor data. may be 0 */
397 data_size_t name_len; /* length of the name string. may be 0 */
398 /* VARARG(sd,security_descriptor); */
399 /* VARARG(name,unicode_str); */
402 struct token_groups
404 unsigned int count;
405 /* unsigned int attributes[count]; */
406 /* VARARG(sids,SID); */
409 enum select_op
411 SELECT_NONE,
412 SELECT_WAIT,
413 SELECT_WAIT_ALL,
414 SELECT_SIGNAL_AND_WAIT,
415 SELECT_KEYED_EVENT_WAIT,
416 SELECT_KEYED_EVENT_RELEASE
419 typedef union
421 enum select_op op;
422 struct
424 enum select_op op; /* SELECT_WAIT or SELECT_WAIT_ALL */
425 obj_handle_t handles[MAXIMUM_WAIT_OBJECTS];
426 } wait;
427 struct
429 enum select_op op; /* SELECT_SIGNAL_AND_WAIT */
430 obj_handle_t wait;
431 obj_handle_t signal; /* must be last in the structure so we can remove it on retries */
432 } signal_and_wait;
433 struct
435 enum select_op op; /* SELECT_KEYED_EVENT_WAIT or SELECT_KEYED_EVENT_RELEASE */
436 obj_handle_t handle;
437 client_ptr_t key;
438 } keyed_event;
439 } select_op_t;
441 enum apc_type
443 APC_NONE,
444 APC_USER,
445 APC_TIMER,
446 APC_ASYNC_IO,
447 APC_VIRTUAL_ALLOC,
448 APC_VIRTUAL_FREE,
449 APC_VIRTUAL_QUERY,
450 APC_VIRTUAL_PROTECT,
451 APC_VIRTUAL_FLUSH,
452 APC_VIRTUAL_LOCK,
453 APC_VIRTUAL_UNLOCK,
454 APC_MAP_VIEW,
455 APC_UNMAP_VIEW,
456 APC_CREATE_THREAD
459 typedef union
461 enum apc_type type;
462 struct
464 enum apc_type type; /* APC_USER */
465 int __pad;
466 client_ptr_t func; /* void (__stdcall *func)(ULONG_PTR,ULONG_PTR,ULONG_PTR); */
467 apc_param_t args[3]; /* arguments for user function */
468 } user;
469 struct
471 enum apc_type type; /* APC_TIMER */
472 int __pad;
473 client_ptr_t func; /* void (__stdcall *func)(void*, unsigned int, unsigned int); */
474 timeout_t time; /* absolute time of expiration */
475 client_ptr_t arg; /* user argument */
476 } timer;
477 struct
479 enum apc_type type; /* APC_ASYNC_IO */
480 unsigned int status; /* I/O status */
481 client_ptr_t func; /* unsigned int (*func)(void*, void*, unsigned int, void**, void**); */
482 client_ptr_t user; /* user pointer */
483 client_ptr_t sb; /* status block */
484 } async_io;
485 struct
487 enum apc_type type; /* APC_VIRTUAL_ALLOC */
488 unsigned int op_type; /* type of operation */
489 client_ptr_t addr; /* requested address */
490 mem_size_t size; /* allocation size */
491 unsigned int zero_bits; /* allocation alignment */
492 unsigned int prot; /* memory protection flags */
493 } virtual_alloc;
494 struct
496 enum apc_type type; /* APC_VIRTUAL_FREE */
497 unsigned int op_type; /* type of operation */
498 client_ptr_t addr; /* requested address */
499 mem_size_t size; /* allocation size */
500 } virtual_free;
501 struct
503 enum apc_type type; /* APC_VIRTUAL_QUERY */
504 int __pad;
505 client_ptr_t addr; /* requested address */
506 } virtual_query;
507 struct
509 enum apc_type type; /* APC_VIRTUAL_PROTECT */
510 unsigned int prot; /* new protection flags */
511 client_ptr_t addr; /* requested address */
512 mem_size_t size; /* requested size */
513 } virtual_protect;
514 struct
516 enum apc_type type; /* APC_VIRTUAL_FLUSH */
517 int __pad;
518 client_ptr_t addr; /* requested address */
519 mem_size_t size; /* requested size */
520 } virtual_flush;
521 struct
523 enum apc_type type; /* APC_VIRTUAL_LOCK */
524 int __pad;
525 client_ptr_t addr; /* requested address */
526 mem_size_t size; /* requested size */
527 } virtual_lock;
528 struct
530 enum apc_type type; /* APC_VIRTUAL_UNLOCK */
531 int __pad;
532 client_ptr_t addr; /* requested address */
533 mem_size_t size; /* requested size */
534 } virtual_unlock;
535 struct
537 enum apc_type type; /* APC_MAP_VIEW */
538 obj_handle_t handle; /* mapping handle */
539 client_ptr_t addr; /* requested address */
540 mem_size_t size; /* allocation size */
541 file_pos_t offset; /* file offset */
542 unsigned int alloc_type;/* allocation type */
543 unsigned short zero_bits; /* allocation alignment */
544 unsigned short prot; /* memory protection flags */
545 } map_view;
546 struct
548 enum apc_type type; /* APC_UNMAP_VIEW */
549 int __pad;
550 client_ptr_t addr; /* view address */
551 } unmap_view;
552 struct
554 enum apc_type type; /* APC_CREATE_THREAD */
555 int suspend; /* suspended thread? */
556 client_ptr_t func; /* void (__stdcall *func)(void*); start function */
557 client_ptr_t arg; /* argument for start function */
558 mem_size_t reserve; /* reserve size for thread stack */
559 mem_size_t commit; /* commit size for thread stack */
560 } create_thread;
561 } apc_call_t;
563 typedef union
565 enum apc_type type;
566 struct
568 enum apc_type type; /* APC_ASYNC_IO */
569 unsigned int status; /* new status of async operation */
570 client_ptr_t apc; /* user APC to call */
571 client_ptr_t arg; /* user APC argument */
572 unsigned int total; /* bytes transferred */
573 } async_io;
574 struct
576 enum apc_type type; /* APC_VIRTUAL_ALLOC */
577 unsigned int status; /* status returned by call */
578 client_ptr_t addr; /* resulting address */
579 mem_size_t size; /* resulting size */
580 } virtual_alloc;
581 struct
583 enum apc_type type; /* APC_VIRTUAL_FREE */
584 unsigned int status; /* status returned by call */
585 client_ptr_t addr; /* resulting address */
586 mem_size_t size; /* resulting size */
587 } virtual_free;
588 struct
590 enum apc_type type; /* APC_VIRTUAL_QUERY */
591 unsigned int status; /* status returned by call */
592 client_ptr_t base; /* resulting base address */
593 client_ptr_t alloc_base;/* resulting allocation base */
594 mem_size_t size; /* resulting region size */
595 unsigned short state; /* resulting region state */
596 unsigned short prot; /* resulting region protection */
597 unsigned short alloc_prot;/* resulting allocation protection */
598 unsigned short alloc_type;/* resulting region allocation type */
599 } virtual_query;
600 struct
602 enum apc_type type; /* APC_VIRTUAL_PROTECT */
603 unsigned int status; /* status returned by call */
604 client_ptr_t addr; /* resulting address */
605 mem_size_t size; /* resulting size */
606 unsigned int prot; /* old protection flags */
607 } virtual_protect;
608 struct
610 enum apc_type type; /* APC_VIRTUAL_FLUSH */
611 unsigned int status; /* status returned by call */
612 client_ptr_t addr; /* resulting address */
613 mem_size_t size; /* resulting size */
614 } virtual_flush;
615 struct
617 enum apc_type type; /* APC_VIRTUAL_LOCK */
618 unsigned int status; /* status returned by call */
619 client_ptr_t addr; /* resulting address */
620 mem_size_t size; /* resulting size */
621 } virtual_lock;
622 struct
624 enum apc_type type; /* APC_VIRTUAL_UNLOCK */
625 unsigned int status; /* status returned by call */
626 client_ptr_t addr; /* resulting address */
627 mem_size_t size; /* resulting size */
628 } virtual_unlock;
629 struct
631 enum apc_type type; /* APC_MAP_VIEW */
632 unsigned int status; /* status returned by call */
633 client_ptr_t addr; /* resulting address */
634 mem_size_t size; /* resulting size */
635 } map_view;
636 struct
638 enum apc_type type; /* APC_MAP_VIEW */
639 unsigned int status; /* status returned by call */
640 } unmap_view;
641 struct
643 enum apc_type type; /* APC_CREATE_THREAD */
644 unsigned int status; /* status returned by call */
645 thread_id_t tid; /* thread id */
646 obj_handle_t handle; /* handle to new thread */
647 } create_thread;
648 } apc_result_t;
650 typedef union
652 unsigned int major; /* irp major function */
653 struct
655 unsigned int major; /* IRP_MJ_CREATE */
656 unsigned int access; /* access rights */
657 unsigned int sharing; /* sharing flags */
658 unsigned int options; /* file options */
659 client_ptr_t device; /* opaque ptr for the device */
660 } create;
661 struct
663 unsigned int major; /* IRP_MJ_READ */
664 unsigned int key; /* driver key */
665 client_ptr_t device; /* opaque ptr for the device */
666 file_pos_t pos; /* file position */
667 } read;
668 struct
670 unsigned int major; /* IRP_MJ_WRITE */
671 unsigned int key; /* driver key */
672 client_ptr_t device; /* opaque ptr for the device */
673 file_pos_t pos; /* file position */
674 } write;
675 struct
677 unsigned int major; /* IRP_MJ_FLUSH_BUFFERS */
678 int __pad;
679 client_ptr_t device; /* opaque ptr for the device */
680 } flush;
681 struct
683 unsigned int major; /* IRP_MJ_DEVICE_CONTROL */
684 ioctl_code_t code; /* ioctl code */
685 client_ptr_t device; /* opaque ptr for the device */
686 } ioctl;
687 } irp_params_t;
689 struct rawinput_device
691 unsigned short usage_page;
692 unsigned short usage;
693 unsigned int flags;
694 user_handle_t target;
697 /****************************************************************/
698 /* Request declarations */
700 /* Create a new process from the context of the parent */
701 @REQ(new_process)
702 int inherit_all; /* inherit all handles from parent */
703 unsigned int create_flags; /* creation flags */
704 int socket_fd; /* file descriptor for process socket */
705 obj_handle_t exe_file; /* file handle for main exe */
706 unsigned int process_access; /* access rights for process object */
707 unsigned int process_attr; /* attributes for process object */
708 unsigned int thread_access; /* access rights for thread object */
709 unsigned int thread_attr; /* attributes for thread object */
710 cpu_type_t cpu; /* CPU that the new process will use */
711 data_size_t info_size; /* size of startup info */
712 VARARG(info,startup_info,info_size); /* startup information */
713 VARARG(env,unicode_str); /* environment for new process */
714 @REPLY
715 obj_handle_t info; /* new process info handle */
716 process_id_t pid; /* process id */
717 obj_handle_t phandle; /* process handle (in the current process) */
718 thread_id_t tid; /* thread id */
719 obj_handle_t thandle; /* thread handle (in the current process) */
720 @END
723 /* Retrieve information about a newly started process */
724 @REQ(get_new_process_info)
725 obj_handle_t info; /* info handle returned from new_process_request */
726 @REPLY
727 int success; /* did the process start successfully? */
728 int exit_code; /* process exit code if failed */
729 @END
732 /* Create a new thread from the context of the parent */
733 @REQ(new_thread)
734 unsigned int access; /* wanted access rights */
735 unsigned int attributes; /* object attributes */
736 int suspend; /* new thread should be suspended on creation */
737 int request_fd; /* fd for request pipe */
738 @REPLY
739 thread_id_t tid; /* thread id */
740 obj_handle_t handle; /* thread handle (in the current process) */
741 @END
744 /* Retrieve the new process startup info */
745 @REQ(get_startup_info)
746 @REPLY
747 obj_handle_t exe_file; /* file handle for main exe */
748 data_size_t info_size; /* size of startup info */
749 VARARG(info,startup_info,info_size); /* startup information */
750 VARARG(env,unicode_str); /* environment */
751 @END
754 /* Signal the end of the process initialization */
755 @REQ(init_process_done)
756 int gui; /* is it a GUI process? */
757 mod_handle_t module; /* main module base address */
758 client_ptr_t ldt_copy; /* address of LDT copy (in thread address space) */
759 client_ptr_t entry; /* process entry point */
760 @END
763 /* Initialize a thread; called from the child after fork()/clone() */
764 @REQ(init_thread)
765 int unix_pid; /* Unix pid of new thread */
766 int unix_tid; /* Unix tid of new thread */
767 int debug_level; /* new debug level */
768 client_ptr_t teb; /* TEB of new thread (in thread address space) */
769 client_ptr_t entry; /* entry point or PEB if initial thread (in thread address space) */
770 int reply_fd; /* fd for reply pipe */
771 int wait_fd; /* fd for blocking calls pipe */
772 cpu_type_t cpu; /* CPU that this thread is running on */
773 @REPLY
774 process_id_t pid; /* process id of the new thread's process */
775 thread_id_t tid; /* thread id of the new thread */
776 timeout_t server_start; /* server start time */
777 data_size_t info_size; /* total size of startup info */
778 int version; /* protocol version */
779 unsigned int all_cpus; /* bitset of supported CPUs */
780 @END
783 /* Terminate a process */
784 @REQ(terminate_process)
785 obj_handle_t handle; /* process handle to terminate */
786 int exit_code; /* process exit code */
787 @REPLY
788 int self; /* suicide? */
789 @END
792 /* Terminate a thread */
793 @REQ(terminate_thread)
794 obj_handle_t handle; /* thread handle to terminate */
795 int exit_code; /* thread exit code */
796 @REPLY
797 int self; /* suicide? */
798 int last; /* last thread in this process? */
799 @END
802 /* Retrieve information about a process */
803 @REQ(get_process_info)
804 obj_handle_t handle; /* process handle */
805 @REPLY
806 process_id_t pid; /* server process id */
807 process_id_t ppid; /* server process id of parent */
808 affinity_t affinity; /* process affinity mask */
809 client_ptr_t peb; /* PEB address in process address space */
810 timeout_t start_time; /* process start time */
811 timeout_t end_time; /* process end time */
812 int exit_code; /* process exit code */
813 int priority; /* priority class */
814 cpu_type_t cpu; /* CPU that this process is running on */
815 int debugger_present; /* process is being debugged */
816 @END
819 /* Set a process information */
820 @REQ(set_process_info)
821 obj_handle_t handle; /* process handle */
822 int mask; /* setting mask (see below) */
823 int priority; /* priority class */
824 affinity_t affinity; /* affinity mask */
825 @END
826 #define SET_PROCESS_INFO_PRIORITY 0x01
827 #define SET_PROCESS_INFO_AFFINITY 0x02
830 /* Retrieve information about a thread */
831 @REQ(get_thread_info)
832 obj_handle_t handle; /* thread handle */
833 thread_id_t tid_in; /* thread id (optional) */
834 @REPLY
835 process_id_t pid; /* server process id */
836 thread_id_t tid; /* server thread id */
837 client_ptr_t teb; /* thread teb pointer */
838 affinity_t affinity; /* thread affinity mask */
839 timeout_t creation_time; /* thread creation time */
840 timeout_t exit_time; /* thread exit time */
841 int exit_code; /* thread exit code */
842 int priority; /* thread priority level */
843 int last; /* last thread in process */
844 @END
847 /* Set a thread information */
848 @REQ(set_thread_info)
849 obj_handle_t handle; /* thread handle */
850 int mask; /* setting mask (see below) */
851 int priority; /* priority class */
852 affinity_t affinity; /* affinity mask */
853 obj_handle_t token; /* impersonation token */
854 @END
855 #define SET_THREAD_INFO_PRIORITY 0x01
856 #define SET_THREAD_INFO_AFFINITY 0x02
857 #define SET_THREAD_INFO_TOKEN 0x04
860 /* Retrieve information about a module */
861 @REQ(get_dll_info)
862 obj_handle_t handle; /* process handle */
863 mod_handle_t base_address; /* base address of module */
864 @REPLY
865 client_ptr_t entry_point;
866 data_size_t size; /* module size */
867 data_size_t filename_len; /* buffer len in bytes required to store filename */
868 VARARG(filename,unicode_str); /* file name of module */
869 @END
872 /* Suspend a thread */
873 @REQ(suspend_thread)
874 obj_handle_t handle; /* thread handle */
875 @REPLY
876 int count; /* new suspend count */
877 @END
880 /* Resume a thread */
881 @REQ(resume_thread)
882 obj_handle_t handle; /* thread handle */
883 @REPLY
884 int count; /* new suspend count */
885 @END
888 /* Notify the server that a dll has been loaded */
889 @REQ(load_dll)
890 obj_handle_t mapping; /* file mapping handle */
891 mod_handle_t base; /* base address */
892 client_ptr_t name; /* ptr to ptr to name (in process addr space) */
893 data_size_t size; /* dll size */
894 int dbg_offset; /* debug info offset */
895 int dbg_size; /* debug info size */
896 VARARG(filename,unicode_str); /* file name of dll */
897 @END
900 /* Notify the server that a dll is being unloaded */
901 @REQ(unload_dll)
902 mod_handle_t base; /* base address */
903 @END
906 /* Queue an APC for a thread or process */
907 @REQ(queue_apc)
908 obj_handle_t handle; /* thread or process handle */
909 apc_call_t call; /* call arguments */
910 @REPLY
911 obj_handle_t handle; /* APC handle */
912 int self; /* run APC in caller itself? */
913 @END
916 /* Get the result of an APC call */
917 @REQ(get_apc_result)
918 obj_handle_t handle; /* handle to the APC */
919 @REPLY
920 apc_result_t result; /* result of the APC */
921 @END
924 /* Close a handle for the current process */
925 @REQ(close_handle)
926 obj_handle_t handle; /* handle to close */
927 @END
930 /* Set a handle information */
931 @REQ(set_handle_info)
932 obj_handle_t handle; /* handle we are interested in */
933 int flags; /* new handle flags */
934 int mask; /* mask for flags to set */
935 @REPLY
936 int old_flags; /* old flag value */
937 @END
940 /* Duplicate a handle */
941 @REQ(dup_handle)
942 obj_handle_t src_process; /* src process handle */
943 obj_handle_t src_handle; /* src handle to duplicate */
944 obj_handle_t dst_process; /* dst process handle */
945 unsigned int access; /* wanted access rights */
946 unsigned int attributes; /* object attributes */
947 unsigned int options; /* duplicate options (see below) */
948 @REPLY
949 obj_handle_t handle; /* duplicated handle in dst process */
950 int self; /* is the source the current process? */
951 int closed; /* whether the source handle has been closed */
952 @END
953 #define DUP_HANDLE_CLOSE_SOURCE DUPLICATE_CLOSE_SOURCE
954 #define DUP_HANDLE_SAME_ACCESS DUPLICATE_SAME_ACCESS
955 #define DUP_HANDLE_MAKE_GLOBAL 0x80000000 /* Not a Windows flag */
958 /* Open a handle to a process */
959 @REQ(open_process)
960 process_id_t pid; /* process id to open */
961 unsigned int access; /* wanted access rights */
962 unsigned int attributes; /* object attributes */
963 @REPLY
964 obj_handle_t handle; /* handle to the process */
965 @END
968 /* Open a handle to a thread */
969 @REQ(open_thread)
970 thread_id_t tid; /* thread id to open */
971 unsigned int access; /* wanted access rights */
972 unsigned int attributes; /* object attributes */
973 @REPLY
974 obj_handle_t handle; /* handle to the thread */
975 @END
978 /* Wait for handles */
979 @REQ(select)
980 int flags; /* wait flags (see below) */
981 client_ptr_t cookie; /* magic cookie to return to client */
982 timeout_t timeout; /* timeout */
983 obj_handle_t prev_apc; /* handle to previous APC */
984 VARARG(result,apc_result); /* result of previous APC */
985 VARARG(data,select_op); /* operation-specific data */
986 @REPLY
987 timeout_t timeout; /* timeout converted to absolute */
988 apc_call_t call; /* APC call arguments */
989 obj_handle_t apc_handle; /* handle to next APC */
990 @END
991 #define SELECT_ALERTABLE 1
992 #define SELECT_INTERRUPTIBLE 2
995 /* Create an event */
996 @REQ(create_event)
997 unsigned int access; /* wanted access rights */
998 unsigned int attributes; /* object attributes */
999 int manual_reset; /* manual reset event */
1000 int initial_state; /* initial state of the event */
1001 VARARG(objattr,object_attributes); /* object attributes */
1002 @REPLY
1003 obj_handle_t handle; /* handle to the event */
1004 @END
1006 /* Event operation */
1007 @REQ(event_op)
1008 obj_handle_t handle; /* handle to event */
1009 int op; /* event operation (see below) */
1010 @END
1011 enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT };
1013 @REQ(query_event)
1014 obj_handle_t handle; /* handle to event */
1015 @REPLY
1016 int manual_reset; /* manual reset event */
1017 int state; /* current state of the event */
1018 @END
1020 /* Open an event */
1021 @REQ(open_event)
1022 unsigned int access; /* wanted access rights */
1023 unsigned int attributes; /* object attributes */
1024 obj_handle_t rootdir; /* root directory */
1025 VARARG(name,unicode_str); /* object name */
1026 @REPLY
1027 obj_handle_t handle; /* handle to the event */
1028 @END
1031 /* Create a keyed event */
1032 @REQ(create_keyed_event)
1033 unsigned int access; /* wanted access rights */
1034 unsigned int attributes; /* object attributes */
1035 VARARG(objattr,object_attributes); /* object attributes */
1036 @REPLY
1037 obj_handle_t handle; /* handle to the event */
1038 @END
1040 /* Open a keyed event */
1041 @REQ(open_keyed_event)
1042 unsigned int access; /* wanted access rights */
1043 unsigned int attributes; /* object attributes */
1044 obj_handle_t rootdir; /* root directory */
1045 VARARG(name,unicode_str); /* object name */
1046 @REPLY
1047 obj_handle_t handle; /* handle to the event */
1048 @END
1051 /* Create a mutex */
1052 @REQ(create_mutex)
1053 unsigned int access; /* wanted access rights */
1054 unsigned int attributes; /* object attributes */
1055 int owned; /* initially owned? */
1056 VARARG(objattr,object_attributes); /* object attributes */
1057 @REPLY
1058 obj_handle_t handle; /* handle to the mutex */
1059 @END
1062 /* Release a mutex */
1063 @REQ(release_mutex)
1064 obj_handle_t handle; /* handle to the mutex */
1065 @REPLY
1066 unsigned int prev_count; /* value of internal counter, before release */
1067 @END
1070 /* Open a mutex */
1071 @REQ(open_mutex)
1072 unsigned int access; /* wanted access rights */
1073 unsigned int attributes; /* object attributes */
1074 obj_handle_t rootdir; /* root directory */
1075 VARARG(name,unicode_str); /* object name */
1076 @REPLY
1077 obj_handle_t handle; /* handle to the mutex */
1078 @END
1081 /* Create a semaphore */
1082 @REQ(create_semaphore)
1083 unsigned int access; /* wanted access rights */
1084 unsigned int attributes; /* object attributes */
1085 unsigned int initial; /* initial count */
1086 unsigned int max; /* maximum count */
1087 VARARG(objattr,object_attributes); /* object attributes */
1088 @REPLY
1089 obj_handle_t handle; /* handle to the semaphore */
1090 @END
1093 /* Release a semaphore */
1094 @REQ(release_semaphore)
1095 obj_handle_t handle; /* handle to the semaphore */
1096 unsigned int count; /* count to add to semaphore */
1097 @REPLY
1098 unsigned int prev_count; /* previous semaphore count */
1099 @END
1101 @REQ(query_semaphore)
1102 obj_handle_t handle; /* handle to the semaphore */
1103 @REPLY
1104 unsigned int current; /* current count */
1105 unsigned int max; /* maximum count */
1106 @END
1108 /* Open a semaphore */
1109 @REQ(open_semaphore)
1110 unsigned int access; /* wanted access rights */
1111 unsigned int attributes; /* object attributes */
1112 obj_handle_t rootdir; /* root directory */
1113 VARARG(name,unicode_str); /* object name */
1114 @REPLY
1115 obj_handle_t handle; /* handle to the semaphore */
1116 @END
1119 /* Create a file */
1120 @REQ(create_file)
1121 unsigned int access; /* wanted access rights */
1122 unsigned int attributes; /* object attributes */
1123 unsigned int sharing; /* sharing flags */
1124 int create; /* file create action */
1125 unsigned int options; /* file options */
1126 unsigned int attrs; /* file attributes for creation */
1127 VARARG(objattr,object_attributes); /* object attributes */
1128 VARARG(filename,string); /* file name */
1129 @REPLY
1130 obj_handle_t handle; /* handle to the file */
1131 @END
1134 /* Open a file object */
1135 @REQ(open_file_object)
1136 unsigned int access; /* wanted access rights */
1137 unsigned int attributes; /* open attributes */
1138 obj_handle_t rootdir; /* root directory */
1139 unsigned int sharing; /* sharing flags */
1140 unsigned int options; /* file options */
1141 VARARG(filename,unicode_str); /* file name */
1142 @REPLY
1143 obj_handle_t handle; /* handle to the file */
1144 @END
1147 /* Allocate a file handle for a Unix fd */
1148 @REQ(alloc_file_handle)
1149 unsigned int access; /* wanted access rights */
1150 unsigned int attributes; /* object attributes */
1151 int fd; /* file descriptor on the client side */
1152 @REPLY
1153 obj_handle_t handle; /* handle to the file */
1154 @END
1157 /* Get the Unix name from a file handle */
1158 @REQ(get_handle_unix_name)
1159 obj_handle_t handle; /* file handle */
1160 @REPLY
1161 data_size_t name_len; /* unix name length */
1162 VARARG(name,string); /* unix name */
1163 @END
1166 /* Get a Unix fd to access a file */
1167 @REQ(get_handle_fd)
1168 obj_handle_t handle; /* handle to the file */
1169 @REPLY
1170 int type; /* file type (see below) */
1171 int cacheable; /* can fd be cached in the client? */
1172 unsigned int access; /* file access rights */
1173 unsigned int options; /* file open options */
1174 @END
1175 enum server_fd_type
1177 FD_TYPE_INVALID, /* invalid file (no associated fd) */
1178 FD_TYPE_FILE, /* regular file */
1179 FD_TYPE_DIR, /* directory */
1180 FD_TYPE_SOCKET, /* socket */
1181 FD_TYPE_SERIAL, /* serial port */
1182 FD_TYPE_PIPE, /* named pipe */
1183 FD_TYPE_MAILSLOT, /* mailslot */
1184 FD_TYPE_CHAR, /* unspecified char device */
1185 FD_TYPE_DEVICE, /* Windows device file */
1186 FD_TYPE_NB_TYPES
1190 /* Flush a file buffers */
1191 @REQ(flush)
1192 int blocking; /* whether it's a blocking flush */
1193 async_data_t async; /* async I/O parameters */
1194 @REPLY
1195 obj_handle_t event; /* event set when finished */
1196 @END
1199 /* Lock a region of a file */
1200 @REQ(lock_file)
1201 obj_handle_t handle; /* handle to the file */
1202 file_pos_t offset; /* offset of start of lock */
1203 file_pos_t count; /* count of bytes to lock */
1204 int shared; /* shared or exclusive lock? */
1205 int wait; /* do we want to wait? */
1206 @REPLY
1207 obj_handle_t handle; /* handle to wait on */
1208 int overlapped; /* is it an overlapped I/O handle? */
1209 @END
1212 /* Unlock a region of a file */
1213 @REQ(unlock_file)
1214 obj_handle_t handle; /* handle to the file */
1215 file_pos_t offset; /* offset of start of unlock */
1216 file_pos_t count; /* count of bytes to unlock */
1217 @END
1220 /* Create a socket */
1221 @REQ(create_socket)
1222 unsigned int access; /* wanted access rights */
1223 unsigned int attributes; /* object attributes */
1224 int family; /* family, see socket manpage */
1225 int type; /* type, see socket manpage */
1226 int protocol; /* protocol, see socket manpage */
1227 unsigned int flags; /* socket flags */
1228 @REPLY
1229 obj_handle_t handle; /* handle to the new socket */
1230 @END
1233 /* Accept a socket */
1234 @REQ(accept_socket)
1235 obj_handle_t lhandle; /* handle to the listening socket */
1236 unsigned int access; /* wanted access rights */
1237 unsigned int attributes; /* object attributes */
1238 @REPLY
1239 obj_handle_t handle; /* handle to the new socket */
1240 @END
1243 /* Accept into an initialized socket */
1244 @REQ(accept_into_socket)
1245 obj_handle_t lhandle; /* handle to the listening socket */
1246 obj_handle_t ahandle; /* handle to the accepting socket */
1247 @END
1250 /* Set socket event parameters */
1251 @REQ(set_socket_event)
1252 obj_handle_t handle; /* handle to the socket */
1253 unsigned int mask; /* event mask */
1254 obj_handle_t event; /* event object */
1255 user_handle_t window; /* window to send the message to */
1256 unsigned int msg; /* message to send */
1257 @END
1260 /* Get socket event parameters */
1261 @REQ(get_socket_event)
1262 obj_handle_t handle; /* handle to the socket */
1263 int service; /* clear pending? */
1264 obj_handle_t c_event; /* event to clear */
1265 @REPLY
1266 unsigned int mask; /* event mask */
1267 unsigned int pmask; /* pending events */
1268 unsigned int state; /* status bits */
1269 VARARG(errors,ints); /* event errors */
1270 @END
1273 /* Get socket info */
1274 @REQ(get_socket_info)
1275 obj_handle_t handle; /* handle to the socket */
1276 @REPLY
1277 int family; /* family, see socket manpage */
1278 int type; /* type, see socket manpage */
1279 int protocol; /* protocol, see socket manpage */
1280 @END
1283 /* Re-enable pending socket events */
1284 @REQ(enable_socket_event)
1285 obj_handle_t handle; /* handle to the socket */
1286 unsigned int mask; /* events to re-enable */
1287 unsigned int sstate; /* status bits to set */
1288 unsigned int cstate; /* status bits to clear */
1289 @END
1291 @REQ(set_socket_deferred)
1292 obj_handle_t handle; /* handle to the socket */
1293 obj_handle_t deferred; /* handle to the socket for which accept() is deferred */
1294 @END
1296 /* Allocate a console (only used by a console renderer) */
1297 @REQ(alloc_console)
1298 unsigned int access; /* wanted access rights */
1299 unsigned int attributes; /* object attributes */
1300 process_id_t pid; /* pid of process which shall be attached to the console */
1301 int input_fd; /* if pid=-1 (bare console to current process), fd for input */
1302 @REPLY
1303 obj_handle_t handle_in; /* handle to console input */
1304 obj_handle_t event; /* handle to renderer events change notification */
1305 @END
1308 /* Free the console of the current process */
1309 @REQ(free_console)
1310 @END
1313 #define CONSOLE_RENDERER_NONE_EVENT 0x00
1314 #define CONSOLE_RENDERER_TITLE_EVENT 0x01
1315 #define CONSOLE_RENDERER_ACTIVE_SB_EVENT 0x02
1316 #define CONSOLE_RENDERER_SB_RESIZE_EVENT 0x03
1317 #define CONSOLE_RENDERER_UPDATE_EVENT 0x04
1318 #define CONSOLE_RENDERER_CURSOR_POS_EVENT 0x05
1319 #define CONSOLE_RENDERER_CURSOR_GEOM_EVENT 0x06
1320 #define CONSOLE_RENDERER_DISPLAY_EVENT 0x07
1321 #define CONSOLE_RENDERER_EXIT_EVENT 0x08
1322 struct console_renderer_event
1324 short event;
1325 union
1327 struct update
1329 short top;
1330 short bottom;
1331 } update;
1332 struct resize
1334 short width;
1335 short height;
1336 } resize;
1337 struct cursor_pos
1339 short x;
1340 short y;
1341 } cursor_pos;
1342 struct cursor_geom
1344 short visible;
1345 short size;
1346 } cursor_geom;
1347 struct display
1349 short left;
1350 short top;
1351 short width;
1352 short height;
1353 } display;
1354 } u;
1357 /* retrieve console events for the renderer */
1358 @REQ(get_console_renderer_events)
1359 obj_handle_t handle; /* handle to console input events */
1360 @REPLY
1361 VARARG(data,bytes); /* the various console_renderer_events */
1362 @END
1365 /* Open a handle to the process console */
1366 @REQ(open_console)
1367 obj_handle_t from; /* 0 (resp 1) input (resp output) of current process console */
1368 /* otherwise console_in handle to get active screen buffer? */
1369 unsigned int access; /* wanted access rights */
1370 unsigned int attributes; /* object attributes */
1371 int share; /* share mask (only for output handles) */
1372 @REPLY
1373 obj_handle_t handle; /* handle to the console */
1374 @END
1377 /* Get the input queue wait event */
1378 @REQ(get_console_wait_event)
1379 @REPLY
1380 obj_handle_t handle;
1381 @END
1383 /* Get a console mode (input or output) */
1384 @REQ(get_console_mode)
1385 obj_handle_t handle; /* handle to the console */
1386 @REPLY
1387 int mode; /* console mode */
1388 @END
1391 /* Set a console mode (input or output) */
1392 @REQ(set_console_mode)
1393 obj_handle_t handle; /* handle to the console */
1394 int mode; /* console mode */
1395 @END
1398 /* Set info about a console (input only) */
1399 @REQ(set_console_input_info)
1400 obj_handle_t handle; /* handle to console input, or 0 for process' console */
1401 int mask; /* setting mask (see below) */
1402 obj_handle_t active_sb; /* active screen buffer */
1403 int history_mode; /* whether we duplicate lines in history */
1404 int history_size; /* number of lines in history */
1405 int edition_mode; /* index to the edition mode flavors */
1406 int input_cp; /* console input codepage */
1407 int output_cp; /* console output codepage */
1408 user_handle_t win; /* console window if backend supports it */
1409 VARARG(title,unicode_str); /* console title */
1410 @END
1411 #define SET_CONSOLE_INPUT_INFO_ACTIVE_SB 0x01
1412 #define SET_CONSOLE_INPUT_INFO_TITLE 0x02
1413 #define SET_CONSOLE_INPUT_INFO_HISTORY_MODE 0x04
1414 #define SET_CONSOLE_INPUT_INFO_HISTORY_SIZE 0x08
1415 #define SET_CONSOLE_INPUT_INFO_EDITION_MODE 0x10
1416 #define SET_CONSOLE_INPUT_INFO_INPUT_CODEPAGE 0x20
1417 #define SET_CONSOLE_INPUT_INFO_OUTPUT_CODEPAGE 0x40
1418 #define SET_CONSOLE_INPUT_INFO_WIN 0x80
1421 /* Get info about a console (input only) */
1422 @REQ(get_console_input_info)
1423 obj_handle_t handle; /* handle to console input, or 0 for process' console */
1424 @REPLY
1425 int history_mode; /* whether we duplicate lines in history */
1426 int history_size; /* number of lines in history */
1427 int history_index; /* number of used lines in history */
1428 int edition_mode; /* index to the edition mode flavors */
1429 int input_cp; /* console input codepage */
1430 int output_cp; /* console output codepage */
1431 user_handle_t win; /* console window if backend supports it */
1432 VARARG(title,unicode_str); /* console title */
1433 @END
1436 /* appends a string to console's history */
1437 @REQ(append_console_input_history)
1438 obj_handle_t handle; /* handle to console input, or 0 for process' console */
1439 VARARG(line,unicode_str); /* line to add */
1440 @END
1443 /* appends a string to console's history */
1444 @REQ(get_console_input_history)
1445 obj_handle_t handle; /* handle to console input, or 0 for process' console */
1446 int index; /* index to get line from */
1447 @REPLY
1448 int total; /* total length of line in Unicode chars */
1449 VARARG(line,unicode_str); /* line to add */
1450 @END
1453 /* creates a new screen buffer on process' console */
1454 @REQ(create_console_output)
1455 obj_handle_t handle_in; /* handle to console input, or 0 for process' console */
1456 unsigned int access; /* wanted access rights */
1457 unsigned int attributes; /* object attributes */
1458 unsigned int share; /* sharing credentials */
1459 int fd; /* for bare consoles, fd the screen-buffer is attached to */
1460 @REPLY
1461 obj_handle_t handle_out; /* handle to the screen buffer */
1462 @END
1465 /* Set info about a console (output only) */
1466 @REQ(set_console_output_info)
1467 obj_handle_t handle; /* handle to the console */
1468 int mask; /* setting mask (see below) */
1469 short int cursor_size; /* size of cursor (percentage filled) */
1470 short int cursor_visible;/* cursor visibility flag */
1471 short int cursor_x; /* position of cursor (x, y) */
1472 short int cursor_y;
1473 short int width; /* width of the screen buffer */
1474 short int height; /* height of the screen buffer */
1475 short int attr; /* default attribute */
1476 short int win_left; /* window actually displayed by renderer */
1477 short int win_top; /* the rect area is expressed within the */
1478 short int win_right; /* boundaries of the screen buffer */
1479 short int win_bottom;
1480 short int max_width; /* maximum size (width x height) for the window */
1481 short int max_height;
1482 @END
1483 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_GEOM 0x01
1484 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_POS 0x02
1485 #define SET_CONSOLE_OUTPUT_INFO_SIZE 0x04
1486 #define SET_CONSOLE_OUTPUT_INFO_ATTR 0x08
1487 #define SET_CONSOLE_OUTPUT_INFO_DISPLAY_WINDOW 0x10
1488 #define SET_CONSOLE_OUTPUT_INFO_MAX_SIZE 0x20
1491 /* Get info about a console (output only) */
1492 @REQ(get_console_output_info)
1493 obj_handle_t handle; /* handle to the console */
1494 @REPLY
1495 short int cursor_size; /* size of cursor (percentage filled) */
1496 short int cursor_visible;/* cursor visibility flag */
1497 short int cursor_x; /* position of cursor (x, y) */
1498 short int cursor_y;
1499 short int width; /* width of the screen buffer */
1500 short int height; /* height of the screen buffer */
1501 short int attr; /* default attribute */
1502 short int win_left; /* window actually displayed by renderer */
1503 short int win_top; /* the rect area is expressed within the */
1504 short int win_right; /* boundaries of the screen buffer */
1505 short int win_bottom;
1506 short int max_width; /* maximum size (width x height) for the window */
1507 short int max_height;
1508 @END
1510 /* Add input records to a console input queue */
1511 @REQ(write_console_input)
1512 obj_handle_t handle; /* handle to the console input */
1513 VARARG(rec,input_records); /* input records */
1514 @REPLY
1515 int written; /* number of records written */
1516 @END
1519 /* Fetch input records from a console input queue */
1520 @REQ(read_console_input)
1521 obj_handle_t handle; /* handle to the console input */
1522 int flush; /* flush the retrieved records from the queue? */
1523 @REPLY
1524 int read; /* number of records read */
1525 VARARG(rec,input_records); /* input records */
1526 @END
1529 /* write data (chars and/or attributes) in a screen buffer */
1530 @REQ(write_console_output)
1531 obj_handle_t handle; /* handle to the console output */
1532 int x; /* position where to start writing */
1533 int y;
1534 int mode; /* char info (see below) */
1535 int wrap; /* wrap around at end of line? */
1536 VARARG(data,bytes); /* info to write */
1537 @REPLY
1538 int written; /* number of char infos actually written */
1539 int width; /* width of screen buffer */
1540 int height; /* height of screen buffer */
1541 @END
1542 enum char_info_mode
1544 CHAR_INFO_MODE_TEXT, /* characters only */
1545 CHAR_INFO_MODE_ATTR, /* attributes only */
1546 CHAR_INFO_MODE_TEXTATTR, /* both characters and attributes */
1547 CHAR_INFO_MODE_TEXTSTDATTR /* characters but use standard attributes */
1551 /* fill a screen buffer with constant data (chars and/or attributes) */
1552 @REQ(fill_console_output)
1553 obj_handle_t handle; /* handle to the console output */
1554 int x; /* position where to start writing */
1555 int y;
1556 int mode; /* char info mode */
1557 int count; /* number to write */
1558 int wrap; /* wrap around at end of line? */
1559 char_info_t data; /* data to write */
1560 @REPLY
1561 int written; /* number of char infos actually written */
1562 @END
1565 /* read data (chars and/or attributes) from a screen buffer */
1566 @REQ(read_console_output)
1567 obj_handle_t handle; /* handle to the console output */
1568 int x; /* position (x,y) where to start reading */
1569 int y;
1570 int mode; /* char info mode */
1571 int wrap; /* wrap around at end of line? */
1572 @REPLY
1573 int width; /* width of screen buffer */
1574 int height; /* height of screen buffer */
1575 VARARG(data,bytes);
1576 @END
1579 /* move a rect (of data) in screen buffer content */
1580 @REQ(move_console_output)
1581 obj_handle_t handle; /* handle to the console output */
1582 short int x_src; /* position (x, y) of rect to start moving from */
1583 short int y_src;
1584 short int x_dst; /* position (x, y) of rect to move to */
1585 short int y_dst;
1586 short int w; /* size of the rect (width, height) to move */
1587 short int h;
1588 @END
1591 /* Sends a signal to a process group */
1592 @REQ(send_console_signal)
1593 int signal; /* the signal to send */
1594 process_id_t group_id; /* the group to send the signal to */
1595 @END
1598 /* enable directory change notifications */
1599 @REQ(read_directory_changes)
1600 unsigned int filter; /* notification filter */
1601 int subtree; /* watch the subtree? */
1602 int want_data; /* flag indicating whether change data should be collected */
1603 async_data_t async; /* async I/O parameters */
1604 @END
1607 @REQ(read_change)
1608 obj_handle_t handle;
1609 @REPLY
1610 VARARG(events,filesystem_event); /* collected filesystem events */
1611 @END
1614 /* Create a file mapping */
1615 @REQ(create_mapping)
1616 unsigned int access; /* wanted access rights */
1617 unsigned int attributes; /* object attributes */
1618 unsigned int protect; /* protection flags (see below) */
1619 mem_size_t size; /* mapping size */
1620 obj_handle_t file_handle; /* file handle */
1621 VARARG(objattr,object_attributes); /* object attributes */
1622 @REPLY
1623 obj_handle_t handle; /* handle to the mapping */
1624 @END
1625 /* per-page protection flags */
1626 #define VPROT_READ 0x01
1627 #define VPROT_WRITE 0x02
1628 #define VPROT_EXEC 0x04
1629 #define VPROT_WRITECOPY 0x08
1630 #define VPROT_GUARD 0x10
1631 #define VPROT_NOCACHE 0x20
1632 #define VPROT_COMMITTED 0x40
1633 #define VPROT_WRITEWATCH 0x80
1634 /* per-mapping protection flags */
1635 #define VPROT_IMAGE 0x0100 /* mapping for an exe image */
1636 #define VPROT_SYSTEM 0x0200 /* system view (underlying mmap not under our control) */
1637 #define VPROT_VALLOC 0x0400 /* allocated by VirtualAlloc */
1638 #define VPROT_NOEXEC 0x0800 /* don't force exec permission */
1641 /* Open a mapping */
1642 @REQ(open_mapping)
1643 unsigned int access; /* wanted access rights */
1644 unsigned int attributes; /* object attributes */
1645 obj_handle_t rootdir; /* root directory */
1646 VARARG(name,unicode_str); /* object name */
1647 @REPLY
1648 obj_handle_t handle; /* handle to the mapping */
1649 @END
1652 /* Get information about a file mapping */
1653 @REQ(get_mapping_info)
1654 obj_handle_t handle; /* handle to the mapping */
1655 unsigned int access; /* wanted access rights */
1656 @REPLY
1657 mem_size_t size; /* mapping size */
1658 int protect; /* protection flags */
1659 int header_size; /* header size (for VPROT_IMAGE mapping) */
1660 client_ptr_t base; /* default base addr (for VPROT_IMAGE mapping) */
1661 obj_handle_t mapping; /* duplicate mapping handle unless removable */
1662 obj_handle_t shared_file; /* shared mapping file handle */
1663 @END
1666 /* Get a range of committed pages in a file mapping */
1667 @REQ(get_mapping_committed_range)
1668 obj_handle_t handle; /* handle to the mapping */
1669 file_pos_t offset; /* starting offset (page-aligned, in bytes) */
1670 @REPLY
1671 mem_size_t size; /* size of range starting at offset (page-aligned, in bytes) */
1672 int committed; /* whether it is a committed range */
1673 @END
1676 /* Add a range to the committed pages in a file mapping */
1677 @REQ(add_mapping_committed_range)
1678 obj_handle_t handle; /* handle to the mapping */
1679 file_pos_t offset; /* starting offset (page-aligned, in bytes) */
1680 mem_size_t size; /* size to set (page-aligned, in bytes) or 0 if only retrieving */
1681 @END
1684 #define SNAP_PROCESS 0x00000001
1685 #define SNAP_THREAD 0x00000002
1686 /* Create a snapshot */
1687 @REQ(create_snapshot)
1688 unsigned int attributes; /* object attributes */
1689 unsigned int flags; /* snapshot flags (SNAP_*) */
1690 @REPLY
1691 obj_handle_t handle; /* handle to the snapshot */
1692 @END
1695 /* Get the next process from a snapshot */
1696 @REQ(next_process)
1697 obj_handle_t handle; /* handle to the snapshot */
1698 int reset; /* reset snapshot position? */
1699 @REPLY
1700 int count; /* process usage count */
1701 process_id_t pid; /* process id */
1702 process_id_t ppid; /* parent process id */
1703 int threads; /* number of threads */
1704 int priority; /* process priority */
1705 int handles; /* number of handles */
1706 int unix_pid; /* Unix pid */
1707 VARARG(filename,unicode_str); /* file name of main exe */
1708 @END
1711 /* Get the next thread from a snapshot */
1712 @REQ(next_thread)
1713 obj_handle_t handle; /* handle to the snapshot */
1714 int reset; /* reset snapshot position? */
1715 @REPLY
1716 int count; /* thread usage count */
1717 process_id_t pid; /* process id */
1718 thread_id_t tid; /* thread id */
1719 int base_pri; /* base priority */
1720 int delta_pri; /* delta priority */
1721 @END
1724 /* Wait for a debug event */
1725 @REQ(wait_debug_event)
1726 int get_handle; /* should we alloc a handle for waiting? */
1727 @REPLY
1728 process_id_t pid; /* process id */
1729 thread_id_t tid; /* thread id */
1730 obj_handle_t wait; /* wait handle if no event ready */
1731 VARARG(event,debug_event); /* debug event data */
1732 @END
1735 /* Queue an exception event */
1736 @REQ(queue_exception_event)
1737 int first; /* first chance exception? */
1738 unsigned int code; /* exception code */
1739 unsigned int flags; /* exception flags */
1740 client_ptr_t record; /* exception record */
1741 client_ptr_t address; /* exception address */
1742 data_size_t len; /* size of parameters */
1743 VARARG(params,uints64,len);/* exception parameters */
1744 VARARG(context,context); /* thread context */
1745 @REPLY
1746 obj_handle_t handle; /* handle to the queued event */
1747 @END
1750 /* Retrieve the status of an exception event */
1751 @REQ(get_exception_status)
1752 obj_handle_t handle; /* handle to the queued event */
1753 @REPLY
1754 VARARG(context,context); /* modified thread context */
1755 @END
1758 /* Continue a debug event */
1759 @REQ(continue_debug_event)
1760 process_id_t pid; /* process id to continue */
1761 thread_id_t tid; /* thread id to continue */
1762 int status; /* continuation status */
1763 @END
1766 /* Start/stop debugging an existing process */
1767 @REQ(debug_process)
1768 process_id_t pid; /* id of the process to debug */
1769 int attach; /* 1=attaching / 0=detaching from the process */
1770 @END
1773 /* Simulate a breakpoint in a process */
1774 @REQ(debug_break)
1775 obj_handle_t handle; /* process handle */
1776 @REPLY
1777 int self; /* was it the caller itself? */
1778 @END
1781 /* Set debugger kill on exit flag */
1782 @REQ(set_debugger_kill_on_exit)
1783 int kill_on_exit; /* 0=detach/1=kill debuggee when debugger dies */
1784 @END
1787 /* Read data from a process address space */
1788 @REQ(read_process_memory)
1789 obj_handle_t handle; /* process handle */
1790 client_ptr_t addr; /* addr to read from */
1791 @REPLY
1792 VARARG(data,bytes); /* result data */
1793 @END
1796 /* Write data to a process address space */
1797 @REQ(write_process_memory)
1798 obj_handle_t handle; /* process handle */
1799 client_ptr_t addr; /* addr to write to */
1800 VARARG(data,bytes); /* data to write */
1801 @END
1804 /* Create a registry key */
1805 @REQ(create_key)
1806 obj_handle_t parent; /* handle to the parent key */
1807 unsigned int access; /* desired access rights */
1808 unsigned int attributes; /* object attributes */
1809 unsigned int options; /* creation options */
1810 data_size_t namelen; /* length of key name in bytes */
1811 VARARG(name,unicode_str,namelen); /* key name */
1812 VARARG(class,unicode_str); /* class name */
1813 @REPLY
1814 obj_handle_t hkey; /* handle to the created key */
1815 int created; /* has it been newly created? */
1816 @END
1818 /* Open a registry key */
1819 @REQ(open_key)
1820 obj_handle_t parent; /* handle to the parent key */
1821 unsigned int access; /* desired access rights */
1822 unsigned int attributes; /* object attributes */
1823 VARARG(name,unicode_str); /* key name */
1824 @REPLY
1825 obj_handle_t hkey; /* handle to the open key */
1826 @END
1829 /* Delete a registry key */
1830 @REQ(delete_key)
1831 obj_handle_t hkey; /* handle to the key */
1832 @END
1835 /* Flush a registry key */
1836 @REQ(flush_key)
1837 obj_handle_t hkey; /* handle to the key */
1838 @END
1841 /* Enumerate registry subkeys */
1842 @REQ(enum_key)
1843 obj_handle_t hkey; /* handle to registry key */
1844 int index; /* index of subkey (or -1 for current key) */
1845 int info_class; /* requested information class */
1846 @REPLY
1847 int subkeys; /* number of subkeys */
1848 int max_subkey; /* longest subkey name */
1849 int max_class; /* longest class name */
1850 int values; /* number of values */
1851 int max_value; /* longest value name */
1852 int max_data; /* longest value data */
1853 timeout_t modif; /* last modification time */
1854 data_size_t total; /* total length needed for full name and class */
1855 data_size_t namelen; /* length of key name in bytes */
1856 VARARG(name,unicode_str,namelen); /* key name */
1857 VARARG(class,unicode_str); /* class name */
1858 @END
1861 /* Set a value of a registry key */
1862 @REQ(set_key_value)
1863 obj_handle_t hkey; /* handle to registry key */
1864 int type; /* value type */
1865 data_size_t namelen; /* length of value name in bytes */
1866 VARARG(name,unicode_str,namelen); /* value name */
1867 VARARG(data,bytes); /* value data */
1868 @END
1871 /* Retrieve the value of a registry key */
1872 @REQ(get_key_value)
1873 obj_handle_t hkey; /* handle to registry key */
1874 VARARG(name,unicode_str); /* value name */
1875 @REPLY
1876 int type; /* value type */
1877 data_size_t total; /* total length needed for data */
1878 VARARG(data,bytes); /* value data */
1879 @END
1882 /* Enumerate a value of a registry key */
1883 @REQ(enum_key_value)
1884 obj_handle_t hkey; /* handle to registry key */
1885 int index; /* value index */
1886 int info_class; /* requested information class */
1887 @REPLY
1888 int type; /* value type */
1889 data_size_t total; /* total length needed for full name and data */
1890 data_size_t namelen; /* length of value name in bytes */
1891 VARARG(name,unicode_str,namelen); /* value name */
1892 VARARG(data,bytes); /* value data */
1893 @END
1896 /* Delete a value of a registry key */
1897 @REQ(delete_key_value)
1898 obj_handle_t hkey; /* handle to registry key */
1899 VARARG(name,unicode_str); /* value name */
1900 @END
1903 /* Load a registry branch from a file */
1904 @REQ(load_registry)
1905 obj_handle_t hkey; /* root key to load to */
1906 obj_handle_t file; /* file to load from */
1907 VARARG(name,unicode_str); /* subkey name */
1908 @END
1911 /* UnLoad a registry branch from a file */
1912 @REQ(unload_registry)
1913 obj_handle_t hkey; /* root key to unload to */
1914 @END
1917 /* Save a registry branch to a file */
1918 @REQ(save_registry)
1919 obj_handle_t hkey; /* key to save */
1920 obj_handle_t file; /* file to save to */
1921 @END
1924 /* Add a registry key change notification */
1925 @REQ(set_registry_notification)
1926 obj_handle_t hkey; /* key to watch for changes */
1927 obj_handle_t event; /* event to set */
1928 int subtree; /* should we watch the whole subtree? */
1929 unsigned int filter; /* things to watch */
1930 @END
1933 /* Create a waitable timer */
1934 @REQ(create_timer)
1935 unsigned int access; /* wanted access rights */
1936 unsigned int attributes; /* object attributes */
1937 obj_handle_t rootdir; /* root directory */
1938 int manual; /* manual reset */
1939 VARARG(name,unicode_str); /* object name */
1940 @REPLY
1941 obj_handle_t handle; /* handle to the timer */
1942 @END
1945 /* Open a waitable timer */
1946 @REQ(open_timer)
1947 unsigned int access; /* wanted access rights */
1948 unsigned int attributes; /* object attributes */
1949 obj_handle_t rootdir; /* root directory */
1950 VARARG(name,unicode_str); /* object name */
1951 @REPLY
1952 obj_handle_t handle; /* handle to the timer */
1953 @END
1955 /* Set a waitable timer */
1956 @REQ(set_timer)
1957 obj_handle_t handle; /* handle to the timer */
1958 timeout_t expire; /* next expiration absolute time */
1959 client_ptr_t callback; /* callback function */
1960 client_ptr_t arg; /* callback argument */
1961 int period; /* timer period in ms */
1962 @REPLY
1963 int signaled; /* was the timer signaled before this call ? */
1964 @END
1966 /* Cancel a waitable timer */
1967 @REQ(cancel_timer)
1968 obj_handle_t handle; /* handle to the timer */
1969 @REPLY
1970 int signaled; /* was the timer signaled before this calltime ? */
1971 @END
1973 /* Get information on a waitable timer */
1974 @REQ(get_timer_info)
1975 obj_handle_t handle; /* handle to the timer */
1976 @REPLY
1977 timeout_t when; /* absolute time when the timer next expires */
1978 int signaled; /* is the timer signaled? */
1979 @END
1982 /* Retrieve the current context of a thread */
1983 @REQ(get_thread_context)
1984 obj_handle_t handle; /* thread handle */
1985 unsigned int flags; /* context flags */
1986 int suspend; /* suspend the thread if needed */
1987 @REPLY
1988 int self; /* was it a handle to the current thread? */
1989 VARARG(context,context); /* thread context */
1990 @END
1993 /* Set the current context of a thread */
1994 @REQ(set_thread_context)
1995 obj_handle_t handle; /* thread handle */
1996 int suspend; /* suspend the thread if needed */
1997 VARARG(context,context); /* thread context */
1998 @REPLY
1999 int self; /* was it a handle to the current thread? */
2000 @END
2003 /* Fetch a selector entry for a thread */
2004 @REQ(get_selector_entry)
2005 obj_handle_t handle; /* thread handle */
2006 int entry; /* LDT entry */
2007 @REPLY
2008 unsigned int base; /* selector base */
2009 unsigned int limit; /* selector limit */
2010 unsigned char flags; /* selector flags */
2011 @END
2014 /* Add an atom */
2015 @REQ(add_atom)
2016 obj_handle_t table; /* which table to add atom to */
2017 VARARG(name,unicode_str); /* atom name */
2018 @REPLY
2019 atom_t atom; /* resulting atom */
2020 @END
2023 /* Delete an atom */
2024 @REQ(delete_atom)
2025 obj_handle_t table; /* which table to delete atom from */
2026 atom_t atom; /* atom handle */
2027 @END
2030 /* Find an atom */
2031 @REQ(find_atom)
2032 obj_handle_t table; /* which table to find atom from */
2033 VARARG(name,unicode_str); /* atom name */
2034 @REPLY
2035 atom_t atom; /* atom handle */
2036 @END
2039 /* Get information about an atom */
2040 @REQ(get_atom_information)
2041 obj_handle_t table; /* which table to find atom from */
2042 atom_t atom; /* atom handle */
2043 @REPLY
2044 int count; /* atom lock count */
2045 int pinned; /* whether the atom has been pinned */
2046 data_size_t total; /* actual length of atom name */
2047 VARARG(name,unicode_str); /* atom name */
2048 @END
2051 /* Set information about an atom */
2052 @REQ(set_atom_information)
2053 obj_handle_t table; /* which table to find atom from */
2054 atom_t atom; /* atom handle */
2055 int pinned; /* whether to bump atom information */
2056 @END
2059 /* Empty an atom table */
2060 @REQ(empty_atom_table)
2061 obj_handle_t table; /* which table to find atom from */
2062 int if_pinned; /* whether to delete pinned atoms */
2063 @END
2066 /* Init an atom table */
2067 @REQ(init_atom_table)
2068 int entries; /* number of entries (only for local) */
2069 @REPLY
2070 obj_handle_t table; /* handle to the atom table */
2071 @END
2074 /* Get the message queue of the current thread */
2075 @REQ(get_msg_queue)
2076 @REPLY
2077 obj_handle_t handle; /* handle to the queue */
2078 @END
2081 /* Set the file descriptor associated to the current thread queue */
2082 @REQ(set_queue_fd)
2083 obj_handle_t handle; /* handle to the file descriptor */
2084 @END
2087 /* Set the current message queue wakeup mask */
2088 @REQ(set_queue_mask)
2089 unsigned int wake_mask; /* wakeup bits mask */
2090 unsigned int changed_mask; /* changed bits mask */
2091 int skip_wait; /* will we skip waiting if signaled? */
2092 @REPLY
2093 unsigned int wake_bits; /* current wake bits */
2094 unsigned int changed_bits; /* current changed bits */
2095 @END
2098 /* Get the current message queue status */
2099 @REQ(get_queue_status)
2100 unsigned int clear_bits; /* should we clear the change bits? */
2101 @REPLY
2102 unsigned int wake_bits; /* wake bits */
2103 unsigned int changed_bits; /* changed bits since last time */
2104 @END
2107 /* Retrieve the process idle event */
2108 @REQ(get_process_idle_event)
2109 obj_handle_t handle; /* process handle */
2110 @REPLY
2111 obj_handle_t event; /* handle to idle event */
2112 @END
2115 /* Send a message to a thread queue */
2116 @REQ(send_message)
2117 thread_id_t id; /* thread id */
2118 int type; /* message type (see below) */
2119 int flags; /* message flags (see below) */
2120 user_handle_t win; /* window handle */
2121 unsigned int msg; /* message code */
2122 lparam_t wparam; /* parameters */
2123 lparam_t lparam; /* parameters */
2124 timeout_t timeout; /* timeout for reply */
2125 VARARG(data,message_data); /* message data for sent messages */
2126 @END
2128 @REQ(post_quit_message)
2129 int exit_code; /* exit code to return */
2130 @END
2132 enum message_type
2134 MSG_ASCII, /* Ascii message (from SendMessageA) */
2135 MSG_UNICODE, /* Unicode message (from SendMessageW) */
2136 MSG_NOTIFY, /* notify message (from SendNotifyMessageW), always Unicode */
2137 MSG_CALLBACK, /* callback message (from SendMessageCallbackW), always Unicode */
2138 MSG_CALLBACK_RESULT,/* result of a callback message */
2139 MSG_OTHER_PROCESS, /* sent from other process, may include vararg data, always Unicode */
2140 MSG_POSTED, /* posted message (from PostMessageW), always Unicode */
2141 MSG_HARDWARE, /* hardware message */
2142 MSG_WINEVENT, /* winevent message */
2143 MSG_HOOK_LL /* low-level hardware hook */
2145 #define SEND_MSG_ABORT_IF_HUNG 0x01
2148 /* Send a hardware message to a thread queue */
2149 @REQ(send_hardware_message)
2150 user_handle_t win; /* window handle */
2151 hw_input_t input; /* input data */
2152 unsigned int flags; /* flags (see below) */
2153 @REPLY
2154 int wait; /* do we need to wait for a reply? */
2155 int prev_x; /* previous cursor position */
2156 int prev_y;
2157 int new_x; /* new cursor position */
2158 int new_y;
2159 VARARG(keystate,bytes); /* global state array for all the keys */
2160 @END
2161 #define SEND_HWMSG_INJECTED 0x01
2164 /* Get a message from the current queue */
2165 @REQ(get_message)
2166 unsigned int flags; /* PM_* flags */
2167 user_handle_t get_win; /* window handle to get */
2168 unsigned int get_first; /* first message code to get */
2169 unsigned int get_last; /* last message code to get */
2170 unsigned int hw_id; /* id of the previous hardware message (or 0) */
2171 unsigned int wake_mask; /* wakeup bits mask */
2172 unsigned int changed_mask; /* changed bits mask */
2173 @REPLY
2174 user_handle_t win; /* window handle */
2175 unsigned int msg; /* message code */
2176 lparam_t wparam; /* parameters */
2177 lparam_t lparam; /* parameters */
2178 int type; /* message type */
2179 int x; /* message x position */
2180 int y; /* message y position */
2181 unsigned int time; /* message time */
2182 unsigned int active_hooks; /* active hooks bitmap */
2183 data_size_t total; /* total size of extra data */
2184 VARARG(data,message_data); /* message data for sent messages */
2185 @END
2188 /* Reply to a sent message */
2189 @REQ(reply_message)
2190 int remove; /* should we remove the message? */
2191 lparam_t result; /* message result */
2192 VARARG(data,bytes); /* message data for sent messages */
2193 @END
2196 /* Accept the current hardware message */
2197 @REQ(accept_hardware_message)
2198 unsigned int hw_id; /* id of the hardware message */
2199 int remove; /* should we remove the message? */
2200 @END
2203 /* Retrieve the reply for the last message sent */
2204 @REQ(get_message_reply)
2205 int cancel; /* cancel message if not ready? */
2206 @REPLY
2207 lparam_t result; /* message result */
2208 VARARG(data,bytes); /* message data for sent messages */
2209 @END
2212 /* Set a window timer */
2213 @REQ(set_win_timer)
2214 user_handle_t win; /* window handle */
2215 unsigned int msg; /* message to post */
2216 unsigned int rate; /* timer rate in ms */
2217 lparam_t id; /* timer id */
2218 lparam_t lparam; /* message lparam (callback proc) */
2219 @REPLY
2220 lparam_t id; /* timer id */
2221 @END
2224 /* Kill a window timer */
2225 @REQ(kill_win_timer)
2226 user_handle_t win; /* window handle */
2227 lparam_t id; /* timer id */
2228 unsigned int msg; /* message to post */
2229 @END
2232 /* check if the thread owning the window is hung */
2233 @REQ(is_window_hung)
2234 user_handle_t win; /* window handle */
2235 @REPLY
2236 int is_hung;
2237 @END
2240 /* Retrieve info about a serial port */
2241 @REQ(get_serial_info)
2242 obj_handle_t handle; /* handle to comm port */
2243 int flags;
2244 @REPLY
2245 unsigned int readinterval;
2246 unsigned int readconst;
2247 unsigned int readmult;
2248 unsigned int writeconst;
2249 unsigned int writemult;
2250 unsigned int eventmask;
2251 unsigned int cookie;
2252 unsigned int pending_write;
2253 @END
2256 /* Set info about a serial port */
2257 @REQ(set_serial_info)
2258 obj_handle_t handle; /* handle to comm port */
2259 int flags; /* bitmask to set values (see below) */
2260 unsigned int readinterval;
2261 unsigned int readconst;
2262 unsigned int readmult;
2263 unsigned int writeconst;
2264 unsigned int writemult;
2265 unsigned int eventmask;
2266 @END
2267 #define SERIALINFO_SET_TIMEOUTS 0x01
2268 #define SERIALINFO_SET_MASK 0x02
2269 #define SERIALINFO_PENDING_WRITE 0x04
2270 #define SERIALINFO_PENDING_WAIT 0x08
2273 /* Create an async I/O */
2274 @REQ(register_async)
2275 int type; /* type of queue to look after */
2276 async_data_t async; /* async I/O parameters */
2277 int count; /* count - usually # of bytes to be read/written */
2278 @END
2279 #define ASYNC_TYPE_READ 0x01
2280 #define ASYNC_TYPE_WRITE 0x02
2281 #define ASYNC_TYPE_WAIT 0x03
2284 /* Cancel all async op on a fd */
2285 @REQ(cancel_async)
2286 obj_handle_t handle; /* handle to comm port, socket or file */
2287 client_ptr_t iosb; /* I/O status block (NULL=all) */
2288 int only_thread; /* cancel matching this thread */
2289 @END
2292 /* Perform a read on a file object */
2293 @REQ(read)
2294 int blocking; /* whether it's a blocking read */
2295 async_data_t async; /* async I/O parameters */
2296 file_pos_t pos; /* read position */
2297 @REPLY
2298 obj_handle_t wait; /* handle to wait on for blocking read */
2299 unsigned int options; /* device open options */
2300 VARARG(data,bytes); /* read data */
2301 @END
2304 /* Perform a write on a file object */
2305 @REQ(write)
2306 int blocking; /* whether it's a blocking write */
2307 async_data_t async; /* async I/O parameters */
2308 file_pos_t pos; /* write position */
2309 VARARG(data,bytes); /* write data */
2310 @REPLY
2311 obj_handle_t wait; /* handle to wait on for blocking write */
2312 unsigned int options; /* device open options */
2313 data_size_t size; /* size written */
2314 @END
2317 /* Perform an ioctl on a file */
2318 @REQ(ioctl)
2319 ioctl_code_t code; /* ioctl code */
2320 async_data_t async; /* async I/O parameters */
2321 int blocking; /* whether it's a blocking ioctl */
2322 VARARG(in_data,bytes); /* ioctl input data */
2323 @REPLY
2324 obj_handle_t wait; /* handle to wait on for blocking ioctl */
2325 unsigned int options; /* device open options */
2326 VARARG(out_data,bytes); /* ioctl output data */
2327 @END
2330 /* Store results of an async irp */
2331 @REQ(set_irp_result)
2332 obj_handle_t manager; /* handle to the device manager */
2333 obj_handle_t handle; /* handle to the irp */
2334 unsigned int status; /* status of the irp */
2335 data_size_t size; /* result size (input or output depending on the operation) */
2336 VARARG(data,bytes); /* output data of the irp */
2337 @END
2340 /* Retrieve results of an async irp */
2341 @REQ(get_irp_result)
2342 obj_handle_t handle; /* handle to the device */
2343 client_ptr_t user_arg; /* user arg used to identify the request */
2344 @REPLY
2345 data_size_t size; /* result size (input or output depending on the operation) */
2346 VARARG(out_data,bytes); /* irp output data */
2347 @END
2350 /* Create a named pipe */
2351 @REQ(create_named_pipe)
2352 unsigned int access;
2353 unsigned int attributes; /* object attributes */
2354 unsigned int options;
2355 unsigned int sharing;
2356 unsigned int maxinstances;
2357 unsigned int outsize;
2358 unsigned int insize;
2359 timeout_t timeout;
2360 unsigned int flags;
2361 VARARG(objattr,object_attributes); /* object attributes */
2362 @REPLY
2363 obj_handle_t handle; /* handle to the pipe */
2364 @END
2366 /* flags in create_named_pipe and get_named_pipe_info */
2367 #define NAMED_PIPE_MESSAGE_STREAM_WRITE 0x0001
2368 #define NAMED_PIPE_MESSAGE_STREAM_READ 0x0002
2369 #define NAMED_PIPE_NONBLOCKING_MODE 0x0004
2370 #define NAMED_PIPE_SERVER_END 0x8000
2372 /* Get named pipe information by handle */
2373 @REQ(get_named_pipe_info)
2374 obj_handle_t handle;
2375 @REPLY
2376 unsigned int flags;
2377 unsigned int sharing;
2378 unsigned int maxinstances;
2379 unsigned int instances;
2380 unsigned int outsize;
2381 unsigned int insize;
2382 @END
2384 /* Set named pipe information by handle */
2385 @REQ(set_named_pipe_info)
2386 obj_handle_t handle;
2387 unsigned int flags;
2388 @END
2390 /* Create a window */
2391 @REQ(create_window)
2392 user_handle_t parent; /* parent window */
2393 user_handle_t owner; /* owner window */
2394 atom_t atom; /* class atom */
2395 mod_handle_t instance; /* module instance */
2396 VARARG(class,unicode_str); /* class name */
2397 @REPLY
2398 user_handle_t handle; /* created window */
2399 user_handle_t parent; /* full handle of parent */
2400 user_handle_t owner; /* full handle of owner */
2401 int extra; /* number of extra bytes */
2402 client_ptr_t class_ptr; /* pointer to class in client address space */
2403 @END
2406 /* Destroy a window */
2407 @REQ(destroy_window)
2408 user_handle_t handle; /* handle to the window */
2409 @END
2412 /* Retrieve the desktop window for the current thread */
2413 @REQ(get_desktop_window)
2414 int force; /* force creation if it doesn't exist */
2415 @REPLY
2416 user_handle_t top_window; /* handle to the desktop window */
2417 user_handle_t msg_window; /* handle to the top-level HWND_MESSAGE parent */
2418 @END
2421 /* Set a window owner */
2422 @REQ(set_window_owner)
2423 user_handle_t handle; /* handle to the window */
2424 user_handle_t owner; /* new owner */
2425 @REPLY
2426 user_handle_t full_owner; /* full handle of new owner */
2427 user_handle_t prev_owner; /* full handle of previous owner */
2428 @END
2431 /* Get information from a window handle */
2432 @REQ(get_window_info)
2433 user_handle_t handle; /* handle to the window */
2434 @REPLY
2435 user_handle_t full_handle; /* full 32-bit handle */
2436 user_handle_t last_active; /* last active popup */
2437 process_id_t pid; /* process owning the window */
2438 thread_id_t tid; /* thread owning the window */
2439 atom_t atom; /* class atom */
2440 int is_unicode; /* ANSI or unicode */
2441 @END
2444 /* Set some information in a window */
2445 @REQ(set_window_info)
2446 unsigned short flags; /* flags for fields to set (see below) */
2447 short int is_unicode; /* ANSI or unicode */
2448 user_handle_t handle; /* handle to the window */
2449 unsigned int style; /* window style */
2450 unsigned int ex_style; /* window extended style */
2451 unsigned int id; /* window id */
2452 mod_handle_t instance; /* creator instance */
2453 lparam_t user_data; /* user-specific data */
2454 int extra_offset; /* offset to set in extra bytes */
2455 data_size_t extra_size; /* size to set in extra bytes */
2456 lparam_t extra_value; /* value to set in extra bytes */
2457 @REPLY
2458 unsigned int old_style; /* old window style */
2459 unsigned int old_ex_style; /* old window extended style */
2460 mod_handle_t old_instance; /* old creator instance */
2461 lparam_t old_user_data; /* old user-specific data */
2462 lparam_t old_extra_value; /* old value in extra bytes */
2463 unsigned int old_id; /* old window id */
2464 @END
2465 #define SET_WIN_STYLE 0x01
2466 #define SET_WIN_EXSTYLE 0x02
2467 #define SET_WIN_ID 0x04
2468 #define SET_WIN_INSTANCE 0x08
2469 #define SET_WIN_USERDATA 0x10
2470 #define SET_WIN_EXTRA 0x20
2471 #define SET_WIN_UNICODE 0x40
2474 /* Set the parent of a window */
2475 @REQ(set_parent)
2476 user_handle_t handle; /* handle to the window */
2477 user_handle_t parent; /* handle to the parent */
2478 @REPLY
2479 user_handle_t old_parent; /* old parent window */
2480 user_handle_t full_parent; /* full handle of new parent */
2481 @END
2484 /* Get a list of the window parents, up to the root of the tree */
2485 @REQ(get_window_parents)
2486 user_handle_t handle; /* handle to the window */
2487 @REPLY
2488 int count; /* total count of parents */
2489 VARARG(parents,user_handles); /* parent handles */
2490 @END
2493 /* Get a list of the window children */
2494 @REQ(get_window_children)
2495 obj_handle_t desktop; /* handle to desktop */
2496 user_handle_t parent; /* parent window */
2497 atom_t atom; /* class atom for the listed children */
2498 thread_id_t tid; /* thread owning the listed children */
2499 VARARG(class,unicode_str); /* class name */
2500 @REPLY
2501 int count; /* total count of children */
2502 VARARG(children,user_handles); /* children handles */
2503 @END
2506 /* Get a list of the window children that contain a given point */
2507 @REQ(get_window_children_from_point)
2508 user_handle_t parent; /* parent window */
2509 int x; /* point in parent coordinates */
2510 int y;
2511 @REPLY
2512 int count; /* total count of children */
2513 VARARG(children,user_handles); /* children handles */
2514 @END
2517 /* Get window tree information from a window handle */
2518 @REQ(get_window_tree)
2519 user_handle_t handle; /* handle to the window */
2520 @REPLY
2521 user_handle_t parent; /* parent window */
2522 user_handle_t owner; /* owner window */
2523 user_handle_t next_sibling; /* next sibling in Z-order */
2524 user_handle_t prev_sibling; /* prev sibling in Z-order */
2525 user_handle_t first_sibling; /* first sibling in Z-order */
2526 user_handle_t last_sibling; /* last sibling in Z-order */
2527 user_handle_t first_child; /* first child */
2528 user_handle_t last_child; /* last child */
2529 @END
2531 /* Set the position and Z order of a window */
2532 @REQ(set_window_pos)
2533 unsigned short swp_flags; /* SWP_* flags */
2534 unsigned short paint_flags; /* paint flags (see below) */
2535 user_handle_t handle; /* handle to the window */
2536 user_handle_t previous; /* previous window in Z order */
2537 rectangle_t window; /* window rectangle (in parent coords) */
2538 rectangle_t client; /* client rectangle (in parent coords) */
2539 VARARG(valid,rectangles); /* valid rectangles from WM_NCCALCSIZE (in parent coords) */
2540 @REPLY
2541 unsigned int new_style; /* new window style */
2542 unsigned int new_ex_style; /* new window extended style */
2543 user_handle_t surface_win; /* window that needs a surface update */
2544 @END
2545 #define SET_WINPOS_PAINT_SURFACE 0x01 /* window has a paintable surface */
2546 #define SET_WINPOS_PIXEL_FORMAT 0x02 /* window has a custom pixel format */
2548 /* Get the window and client rectangles of a window */
2549 @REQ(get_window_rectangles)
2550 user_handle_t handle; /* handle to the window */
2551 int relative; /* coords relative to (see below) */
2552 @REPLY
2553 rectangle_t window; /* window rectangle */
2554 rectangle_t visible; /* visible part of the window rectangle */
2555 rectangle_t client; /* client rectangle */
2556 @END
2557 enum coords_relative
2559 COORDS_CLIENT, /* relative to client area */
2560 COORDS_WINDOW, /* relative to whole window area */
2561 COORDS_PARENT, /* relative to parent's client area */
2562 COORDS_SCREEN /* relative to screen origin */
2566 /* Get the window text */
2567 @REQ(get_window_text)
2568 user_handle_t handle; /* handle to the window */
2569 @REPLY
2570 VARARG(text,unicode_str); /* window text */
2571 @END
2574 /* Set the window text */
2575 @REQ(set_window_text)
2576 user_handle_t handle; /* handle to the window */
2577 VARARG(text,unicode_str); /* window text */
2578 @END
2581 /* Get the coordinates offset between two windows */
2582 @REQ(get_windows_offset)
2583 user_handle_t from; /* handle to the first window */
2584 user_handle_t to; /* handle to the second window */
2585 @REPLY
2586 int x; /* x coordinate offset */
2587 int y; /* y coordinate offset */
2588 int mirror; /* whether to mirror the x coordinate */
2589 @END
2592 /* Get the visible region of a window */
2593 @REQ(get_visible_region)
2594 user_handle_t window; /* handle to the window */
2595 unsigned int flags; /* DCX flags */
2596 @REPLY
2597 user_handle_t top_win; /* top window to clip against */
2598 rectangle_t top_rect; /* top window visible rect with screen coords */
2599 rectangle_t win_rect; /* window rect in screen coords */
2600 unsigned int paint_flags; /* paint flags (from SET_WINPOS_* flags) */
2601 data_size_t total_size; /* total size of the resulting region */
2602 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2603 @END
2606 /* Get the visible surface region of a window */
2607 @REQ(get_surface_region)
2608 user_handle_t window; /* handle to the window */
2609 @REPLY
2610 rectangle_t visible_rect; /* window visible rect in screen coords */
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 window region */
2617 @REQ(get_window_region)
2618 user_handle_t window; /* handle to the window */
2619 @REPLY
2620 data_size_t total_size; /* total size of the resulting region */
2621 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2622 @END
2625 /* Set the window region */
2626 @REQ(set_window_region)
2627 user_handle_t window; /* handle to the window */
2628 int redraw; /* redraw the window? */
2629 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2630 @END
2633 /* Get the window update region */
2634 @REQ(get_update_region)
2635 user_handle_t window; /* handle to the window */
2636 user_handle_t from_child; /* child to start searching from */
2637 unsigned int flags; /* update flags (see below) */
2638 @REPLY
2639 user_handle_t child; /* child to repaint (or window itself) */
2640 unsigned int flags; /* resulting update flags (see below) */
2641 data_size_t total_size; /* total size of the resulting region */
2642 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2643 @END
2644 #define UPDATE_NONCLIENT 0x01 /* get region for repainting non-client area */
2645 #define UPDATE_ERASE 0x02 /* get region for erasing client area */
2646 #define UPDATE_PAINT 0x04 /* get region for painting client area */
2647 #define UPDATE_INTERNALPAINT 0x08 /* get region if internal paint is pending */
2648 #define UPDATE_ALLCHILDREN 0x10 /* force repaint of all children */
2649 #define UPDATE_NOCHILDREN 0x20 /* don't try to repaint any children */
2650 #define UPDATE_NOREGION 0x40 /* don't return a region, only the flags */
2651 #define UPDATE_DELAYED_ERASE 0x80 /* still needs erase after BeginPaint */
2654 /* Update the z order of a window so that a given rectangle is fully visible */
2655 @REQ(update_window_zorder)
2656 user_handle_t window; /* handle to the window */
2657 rectangle_t rect; /* rectangle that must be visible (in client coords) */
2658 @END
2661 /* Mark parts of a window as needing a redraw */
2662 @REQ(redraw_window)
2663 user_handle_t window; /* handle to the window */
2664 unsigned int flags; /* RDW_* flags */
2665 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2666 @END
2669 /* Set a window property */
2670 @REQ(set_window_property)
2671 user_handle_t window; /* handle to the window */
2672 lparam_t data; /* data to store */
2673 atom_t atom; /* property atom (if no name specified) */
2674 VARARG(name,unicode_str); /* property name */
2675 @END
2678 /* Remove a window property */
2679 @REQ(remove_window_property)
2680 user_handle_t window; /* handle to the window */
2681 atom_t atom; /* property atom (if no name specified) */
2682 VARARG(name,unicode_str); /* property name */
2683 @REPLY
2684 lparam_t data; /* data stored in property */
2685 @END
2688 /* Get a window property */
2689 @REQ(get_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 the list of properties of a window */
2699 @REQ(get_window_properties)
2700 user_handle_t window; /* handle to the window */
2701 @REPLY
2702 int total; /* total number of properties */
2703 VARARG(props,properties); /* list of properties */
2704 @END
2707 /* Create a window station */
2708 @REQ(create_winstation)
2709 unsigned int flags; /* window station flags */
2710 unsigned int access; /* wanted access rights */
2711 unsigned int attributes; /* object attributes */
2712 VARARG(name,unicode_str); /* object name */
2713 @REPLY
2714 obj_handle_t handle; /* handle to the window station */
2715 @END
2718 /* Open a handle to a window station */
2719 @REQ(open_winstation)
2720 unsigned int access; /* wanted access rights */
2721 unsigned int attributes; /* object attributes */
2722 VARARG(name,unicode_str); /* object name */
2723 @REPLY
2724 obj_handle_t handle; /* handle to the window station */
2725 @END
2728 /* Close a window station */
2729 @REQ(close_winstation)
2730 obj_handle_t handle; /* handle to the window station */
2731 @END
2734 /* Get the process current window station */
2735 @REQ(get_process_winstation)
2736 @REPLY
2737 obj_handle_t handle; /* handle to the window station */
2738 @END
2741 /* Set the process current window station */
2742 @REQ(set_process_winstation)
2743 obj_handle_t handle; /* handle to the window station */
2744 @END
2747 /* Enumerate window stations */
2748 @REQ(enum_winstation)
2749 unsigned int index; /* current index */
2750 @REPLY
2751 unsigned int next; /* next index */
2752 VARARG(name,unicode_str); /* window station name */
2753 @END
2756 /* Create a desktop */
2757 @REQ(create_desktop)
2758 unsigned int flags; /* desktop flags */
2759 unsigned int access; /* wanted access rights */
2760 unsigned int attributes; /* object attributes */
2761 VARARG(name,unicode_str); /* object name */
2762 @REPLY
2763 obj_handle_t handle; /* handle to the desktop */
2764 @END
2767 /* Open a handle to a desktop */
2768 @REQ(open_desktop)
2769 obj_handle_t winsta; /* window station to open (null allowed) */
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 current input desktop */
2780 @REQ(open_input_desktop)
2781 unsigned int flags; /* desktop flags */
2782 unsigned int access; /* wanted access rights */
2783 unsigned int attributes; /* object attributes */
2784 @REPLY
2785 obj_handle_t handle; /* handle to the desktop */
2786 @END
2789 /* Close a desktop */
2790 @REQ(close_desktop)
2791 obj_handle_t handle; /* handle to the desktop */
2792 @END
2795 /* Get the thread current desktop */
2796 @REQ(get_thread_desktop)
2797 thread_id_t tid; /* thread id */
2798 @REPLY
2799 obj_handle_t handle; /* handle to the desktop */
2800 @END
2803 /* Set the thread current desktop */
2804 @REQ(set_thread_desktop)
2805 obj_handle_t handle; /* handle to the desktop */
2806 @END
2809 /* Enumerate desktops */
2810 @REQ(enum_desktop)
2811 obj_handle_t winstation; /* handle to the window station */
2812 unsigned int index; /* current index */
2813 @REPLY
2814 unsigned int next; /* next index */
2815 VARARG(name,unicode_str); /* window station name */
2816 @END
2819 /* Get/set information about a user object (window station or desktop) */
2820 @REQ(set_user_object_info)
2821 obj_handle_t handle; /* handle to the object */
2822 unsigned int flags; /* information to set */
2823 unsigned int obj_flags; /* new object flags */
2824 @REPLY
2825 int is_desktop; /* is object a desktop? */
2826 unsigned int old_obj_flags; /* old object flags */
2827 VARARG(name,unicode_str); /* object name */
2828 @END
2829 #define SET_USER_OBJECT_FLAGS 1
2832 /* Register a hotkey */
2833 @REQ(register_hotkey)
2834 user_handle_t window; /* handle to the window */
2835 int id; /* hotkey identifier */
2836 unsigned int flags; /* modifier keys */
2837 unsigned int vkey; /* virtual key code */
2838 @REPLY
2839 int replaced; /* did we replace an existing hotkey? */
2840 unsigned int flags; /* flags of replaced hotkey */
2841 unsigned int vkey; /* virtual key code of replaced hotkey */
2842 @END
2845 /* Unregister a hotkey */
2846 @REQ(unregister_hotkey)
2847 user_handle_t window; /* handle to the window */
2848 int id; /* hotkey identifier */
2849 @REPLY
2850 unsigned int flags; /* flags of removed hotkey */
2851 unsigned int vkey; /* virtual key code of removed hotkey */
2852 @END
2855 /* Attach (or detach) thread inputs */
2856 @REQ(attach_thread_input)
2857 thread_id_t tid_from; /* thread to be attached */
2858 thread_id_t tid_to; /* thread to which tid_from should be attached */
2859 int attach; /* is it an attach? */
2860 @END
2863 /* Get input data for a given thread */
2864 @REQ(get_thread_input)
2865 thread_id_t tid; /* id of thread */
2866 @REPLY
2867 user_handle_t focus; /* handle to the focus window */
2868 user_handle_t capture; /* handle to the capture window */
2869 user_handle_t active; /* handle to the active window */
2870 user_handle_t foreground; /* handle to the global foreground window */
2871 user_handle_t menu_owner; /* handle to the menu owner */
2872 user_handle_t move_size; /* handle to the moving/resizing window */
2873 user_handle_t caret; /* handle to the caret window */
2874 user_handle_t cursor; /* handle to the cursor */
2875 int show_count; /* cursor show count */
2876 rectangle_t rect; /* caret rectangle */
2877 @END
2880 /* Get the time of the last input event */
2881 @REQ(get_last_input_time)
2882 @REPLY
2883 unsigned int time;
2884 @END
2887 /* Retrieve queue keyboard state for a given thread */
2888 @REQ(get_key_state)
2889 thread_id_t tid; /* id of thread */
2890 int key; /* optional key code or -1 */
2891 @REPLY
2892 unsigned char state; /* state of specified key */
2893 VARARG(keystate,bytes); /* state array for all the keys */
2894 @END
2896 /* Set queue keyboard state for a given thread */
2897 @REQ(set_key_state)
2898 thread_id_t tid; /* id of thread */
2899 int async; /* whether to change the async state too */
2900 VARARG(keystate,bytes); /* state array for all the keys */
2901 @END
2903 /* Set the system foreground window */
2904 @REQ(set_foreground_window)
2905 user_handle_t handle; /* handle to the foreground window */
2906 @REPLY
2907 user_handle_t previous; /* handle to the previous foreground window */
2908 int send_msg_old; /* whether we have to send a msg to the old window */
2909 int send_msg_new; /* whether we have to send a msg to the new window */
2910 @END
2912 /* Set the current thread focus window */
2913 @REQ(set_focus_window)
2914 user_handle_t handle; /* handle to the focus window */
2915 @REPLY
2916 user_handle_t previous; /* handle to the previous focus window */
2917 @END
2919 /* Set the current thread active window */
2920 @REQ(set_active_window)
2921 user_handle_t handle; /* handle to the active window */
2922 @REPLY
2923 user_handle_t previous; /* handle to the previous active window */
2924 @END
2926 /* Set the current thread capture window */
2927 @REQ(set_capture_window)
2928 user_handle_t handle; /* handle to the capture window */
2929 unsigned int flags; /* capture flags (see below) */
2930 @REPLY
2931 user_handle_t previous; /* handle to the previous capture window */
2932 user_handle_t full_handle; /* full 32-bit handle of new capture window */
2933 @END
2934 #define CAPTURE_MENU 0x01 /* capture is for a menu */
2935 #define CAPTURE_MOVESIZE 0x02 /* capture is for moving/resizing */
2938 /* Set the current thread caret window */
2939 @REQ(set_caret_window)
2940 user_handle_t handle; /* handle to the caret window */
2941 int width; /* caret width */
2942 int height; /* caret height */
2943 @REPLY
2944 user_handle_t previous; /* handle to the previous caret window */
2945 rectangle_t old_rect; /* previous caret rectangle */
2946 int old_hide; /* previous hide count */
2947 int old_state; /* previous caret state (1=on, 0=off) */
2948 @END
2951 /* Set the current thread caret information */
2952 @REQ(set_caret_info)
2953 unsigned int flags; /* caret flags (see below) */
2954 user_handle_t handle; /* handle to the caret window */
2955 int x; /* caret x position */
2956 int y; /* caret y position */
2957 int hide; /* increment for hide count (can be negative to show it) */
2958 int state; /* caret state (1=on, 0=off, -1=toggle current state) */
2959 @REPLY
2960 user_handle_t full_handle; /* handle to the current caret window */
2961 rectangle_t old_rect; /* previous caret rectangle */
2962 int old_hide; /* previous hide count */
2963 int old_state; /* previous caret state (1=on, 0=off) */
2964 @END
2965 #define SET_CARET_POS 0x01 /* set the caret position from x,y */
2966 #define SET_CARET_HIDE 0x02 /* increment the caret hide count */
2967 #define SET_CARET_STATE 0x04 /* set the caret on/off state */
2970 /* Set a window hook */
2971 @REQ(set_hook)
2972 int id; /* id of the hook */
2973 process_id_t pid; /* id of process to set the hook into */
2974 thread_id_t tid; /* id of thread to set the hook into */
2975 int event_min;
2976 int event_max;
2977 client_ptr_t proc; /* hook procedure */
2978 int flags;
2979 int unicode; /* is it a unicode hook? */
2980 VARARG(module,unicode_str); /* module name */
2981 @REPLY
2982 user_handle_t handle; /* handle to the hook */
2983 unsigned int active_hooks; /* active hooks bitmap */
2984 @END
2987 /* Remove a window hook */
2988 @REQ(remove_hook)
2989 user_handle_t handle; /* handle to the hook */
2990 client_ptr_t proc; /* hook procedure if handle is 0 */
2991 int id; /* id of the hook if handle is 0 */
2992 @REPLY
2993 unsigned int active_hooks; /* active hooks bitmap */
2994 @END
2997 /* Start calling a hook chain */
2998 @REQ(start_hook_chain)
2999 int id; /* id of the hook */
3000 int event; /* signalled event */
3001 user_handle_t window; /* handle to the event window */
3002 int object_id; /* object id for out of context winevent */
3003 int child_id; /* child id for out of context winevent */
3004 @REPLY
3005 user_handle_t handle; /* handle to the next hook */
3006 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
3007 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
3008 int unicode; /* is it a unicode hook? */
3009 client_ptr_t proc; /* hook procedure */
3010 unsigned int active_hooks; /* active hooks bitmap */
3011 VARARG(module,unicode_str); /* module name */
3012 @END
3015 /* Finished calling a hook chain */
3016 @REQ(finish_hook_chain)
3017 int id; /* id of the hook */
3018 @END
3021 /* Get the hook information */
3022 @REQ(get_hook_info)
3023 user_handle_t handle; /* handle to the current hook */
3024 int get_next; /* do we want info about current or next hook? */
3025 int event; /* signalled event */
3026 user_handle_t window; /* handle to the event window */
3027 int object_id; /* object id for out of context winevent */
3028 int child_id; /* child id for out of context winevent */
3029 @REPLY
3030 user_handle_t handle; /* handle to the hook */
3031 int id; /* id of the hook */
3032 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
3033 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
3034 client_ptr_t proc; /* hook procedure */
3035 int unicode; /* is it a unicode hook? */
3036 VARARG(module,unicode_str); /* module name */
3037 @END
3040 /* Create a window class */
3041 @REQ(create_class)
3042 int local; /* is it a local class? */
3043 atom_t atom; /* class atom */
3044 unsigned int style; /* class style */
3045 mod_handle_t instance; /* module instance */
3046 int extra; /* number of extra class bytes */
3047 int win_extra; /* number of window extra bytes */
3048 client_ptr_t client_ptr; /* pointer to class in client address space */
3049 VARARG(name,unicode_str); /* class name */
3050 @REPLY
3051 atom_t atom; /* resulting class atom */
3052 @END
3055 /* Destroy a window class */
3056 @REQ(destroy_class)
3057 atom_t atom; /* class atom */
3058 mod_handle_t instance; /* module instance */
3059 VARARG(name,unicode_str); /* class name */
3060 @REPLY
3061 client_ptr_t client_ptr; /* pointer to class in client address space */
3062 @END
3065 /* Set some information in a class */
3066 @REQ(set_class_info)
3067 user_handle_t window; /* handle to the window */
3068 unsigned int flags; /* flags for info to set (see below) */
3069 atom_t atom; /* class atom */
3070 unsigned int style; /* class style */
3071 int win_extra; /* number of window extra bytes */
3072 mod_handle_t instance; /* module instance */
3073 int extra_offset; /* offset to set in extra bytes */
3074 data_size_t extra_size; /* size to set in extra bytes */
3075 lparam_t extra_value; /* value to set in extra bytes */
3076 @REPLY
3077 atom_t old_atom; /* previous class atom */
3078 unsigned int old_style; /* previous class style */
3079 int old_extra; /* previous number of class extra bytes */
3080 int old_win_extra; /* previous number of window extra bytes */
3081 mod_handle_t old_instance; /* previous module instance */
3082 lparam_t old_extra_value; /* old value in extra bytes */
3083 @END
3084 #define SET_CLASS_ATOM 0x0001
3085 #define SET_CLASS_STYLE 0x0002
3086 #define SET_CLASS_WINEXTRA 0x0004
3087 #define SET_CLASS_INSTANCE 0x0008
3088 #define SET_CLASS_EXTRA 0x0010
3091 /* Set/get clipboard information */
3092 @REQ(set_clipboard_info)
3093 unsigned int flags; /* flags for fields to set (see below) */
3094 user_handle_t clipboard; /* clipboard window */
3095 user_handle_t owner; /* clipboard owner */
3096 user_handle_t viewer; /* first clipboard viewer */
3097 unsigned int seqno; /* change sequence number */
3098 @REPLY
3099 unsigned int flags; /* status flags (see below) */
3100 user_handle_t old_clipboard; /* old clipboard window */
3101 user_handle_t old_owner; /* old clipboard owner */
3102 user_handle_t old_viewer; /* old clipboard viewer */
3103 unsigned int seqno; /* current sequence number */
3104 @END
3106 #define SET_CB_OPEN 0x001
3107 #define SET_CB_VIEWER 0x004
3108 #define SET_CB_SEQNO 0x008
3109 #define SET_CB_RELOWNER 0x010
3110 #define SET_CB_CLOSE 0x020
3111 #define CB_OPEN 0x040
3112 #define CB_OWNER 0x080
3113 #define CB_PROCESS 0x100
3116 /* Empty the clipboard and grab ownership */
3117 @REQ(empty_clipboard)
3118 @END
3121 /* Open a security token */
3122 @REQ(open_token)
3123 obj_handle_t handle; /* handle to the thread or process */
3124 unsigned int access; /* access rights to the new token */
3125 unsigned int attributes;/* object attributes */
3126 unsigned int flags; /* flags (see below) */
3127 @REPLY
3128 obj_handle_t token; /* handle to the token */
3129 @END
3130 #define OPEN_TOKEN_THREAD 1
3131 #define OPEN_TOKEN_AS_SELF 2
3134 /* Set/get the global windows */
3135 @REQ(set_global_windows)
3136 unsigned int flags; /* flags for fields to set (see below) */
3137 user_handle_t shell_window; /* handle to the new shell window */
3138 user_handle_t shell_listview; /* handle to the new shell listview window */
3139 user_handle_t progman_window; /* handle to the new program manager window */
3140 user_handle_t taskman_window; /* handle to the new task manager window */
3141 @REPLY
3142 user_handle_t old_shell_window; /* handle to the shell window */
3143 user_handle_t old_shell_listview; /* handle to the shell listview window */
3144 user_handle_t old_progman_window; /* handle to the new program manager window */
3145 user_handle_t old_taskman_window; /* handle to the new task manager window */
3146 @END
3147 #define SET_GLOBAL_SHELL_WINDOWS 0x01 /* set both main shell and listview windows */
3148 #define SET_GLOBAL_PROGMAN_WINDOW 0x02
3149 #define SET_GLOBAL_TASKMAN_WINDOW 0x04
3151 /* Adjust the privileges held by a token */
3152 @REQ(adjust_token_privileges)
3153 obj_handle_t handle; /* handle to the token */
3154 int disable_all; /* disable all privileges? */
3155 int get_modified_state; /* get modified privileges? */
3156 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to enable/disable/remove */
3157 @REPLY
3158 unsigned int len; /* total length in bytes required to store token privileges */
3159 VARARG(privileges,LUID_AND_ATTRIBUTES); /* modified privileges */
3160 @END
3162 /* Retrieves the set of privileges held by or available to a token */
3163 @REQ(get_token_privileges)
3164 obj_handle_t handle; /* handle to the token */
3165 @REPLY
3166 unsigned int len; /* total length in bytes required to store token privileges */
3167 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
3168 @END
3170 /* Check the token has the required privileges */
3171 @REQ(check_token_privileges)
3172 obj_handle_t handle; /* handle to the token */
3173 int all_required; /* are all the privileges required for the check to succeed? */
3174 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to check */
3175 @REPLY
3176 int has_privileges; /* does the token have the required privileges? */
3177 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
3178 @END
3180 @REQ(duplicate_token)
3181 obj_handle_t handle; /* handle to the token to duplicate */
3182 unsigned int access; /* access rights to the new token */
3183 unsigned int attributes; /* object attributes */
3184 int primary; /* is the new token to be a primary one? */
3185 int impersonation_level; /* impersonation level of the new token */
3186 @REPLY
3187 obj_handle_t new_handle; /* duplicated handle */
3188 @END
3190 @REQ(access_check)
3191 obj_handle_t handle; /* handle to the token */
3192 unsigned int desired_access; /* desired access to the object */
3193 unsigned int mapping_read; /* mapping from generic read to specific rights */
3194 unsigned int mapping_write; /* mapping from generic write to specific rights */
3195 unsigned int mapping_execute; /* mapping from generic execute to specific rights */
3196 unsigned int mapping_all; /* mapping from generic all to specific rights */
3197 VARARG(sd,security_descriptor); /* security descriptor to check */
3198 @REPLY
3199 unsigned int access_granted; /* access rights actually granted */
3200 unsigned int access_status; /* was access granted? */
3201 unsigned int privileges_len; /* length needed to store privileges */
3202 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges used during access check */
3203 @END
3205 @REQ(get_token_sid)
3206 obj_handle_t handle; /* handle to the token */
3207 unsigned int which_sid; /* which SID to retrieve from the token */
3208 @REPLY
3209 data_size_t sid_len; /* length needed to store sid */
3210 VARARG(sid,SID); /* the sid specified by which_sid from the token */
3211 @END
3213 @REQ(get_token_groups)
3214 obj_handle_t handle; /* handle to the token */
3215 @REPLY
3216 data_size_t user_len; /* length needed to store user */
3217 VARARG(user,token_groups); /* groups the token's user belongs to */
3218 @END
3220 @REQ(get_token_default_dacl)
3221 obj_handle_t handle; /* handle to the token */
3222 @REPLY
3223 data_size_t acl_len; /* length needed to store access control list */
3224 VARARG(acl,ACL); /* access control list */
3225 @END
3227 @REQ(set_token_default_dacl)
3228 obj_handle_t handle; /* handle to the token */
3229 VARARG(acl,ACL); /* default dacl to set */
3230 @END
3232 @REQ(set_security_object)
3233 obj_handle_t handle; /* handle to the object */
3234 unsigned int security_info; /* which parts of security descriptor to set */
3235 VARARG(sd,security_descriptor); /* security descriptor to set */
3236 @END
3238 @REQ(get_security_object)
3239 obj_handle_t handle; /* handle to the object */
3240 unsigned int security_info; /* which parts of security descriptor to get */
3241 @REPLY
3242 unsigned int sd_len; /* buffer size needed for sd */
3243 VARARG(sd,security_descriptor); /* retrieved security descriptor */
3244 @END
3246 /* Create a mailslot */
3247 @REQ(create_mailslot)
3248 unsigned int access; /* wanted access rights */
3249 unsigned int attributes; /* object attributes */
3250 obj_handle_t rootdir; /* root directory */
3251 timeout_t read_timeout;
3252 unsigned int max_msgsize;
3253 VARARG(name,unicode_str); /* mailslot name */
3254 @REPLY
3255 obj_handle_t handle; /* handle to the mailslot */
3256 @END
3259 /* Set mailslot information */
3260 @REQ(set_mailslot_info)
3261 obj_handle_t handle; /* handle to the mailslot */
3262 timeout_t read_timeout;
3263 unsigned int flags;
3264 @REPLY
3265 timeout_t read_timeout;
3266 unsigned int max_msgsize;
3267 @END
3268 #define MAILSLOT_SET_READ_TIMEOUT 1
3271 /* Create a directory object */
3272 @REQ(create_directory)
3273 unsigned int access; /* access flags */
3274 unsigned int attributes; /* object attributes */
3275 obj_handle_t rootdir; /* root directory */
3276 VARARG(directory_name,unicode_str); /* Directory name */
3277 @REPLY
3278 obj_handle_t handle; /* handle to the directory */
3279 @END
3282 /* Open a directory object */
3283 @REQ(open_directory)
3284 unsigned int access; /* access flags */
3285 unsigned int attributes; /* object attributes */
3286 obj_handle_t rootdir; /* root directory */
3287 VARARG(directory_name,unicode_str); /* Directory name */
3288 @REPLY
3289 obj_handle_t handle; /* handle to the directory */
3290 @END
3293 /* Get a directory entry by index */
3294 @REQ(get_directory_entry)
3295 obj_handle_t handle; /* handle to the directory */
3296 unsigned int index; /* entry index */
3297 @REPLY
3298 data_size_t name_len; /* length of the entry name in bytes */
3299 VARARG(name,unicode_str,name_len); /* entry name */
3300 VARARG(type,unicode_str); /* entry type */
3301 @END
3304 /* Create a symbolic link object */
3305 @REQ(create_symlink)
3306 unsigned int access; /* access flags */
3307 unsigned int attributes; /* object attributes */
3308 obj_handle_t rootdir; /* root directory */
3309 data_size_t name_len; /* length of the symlink name in bytes */
3310 VARARG(name,unicode_str,name_len); /* symlink name */
3311 VARARG(target_name,unicode_str); /* target name */
3312 @REPLY
3313 obj_handle_t handle; /* handle to the symlink */
3314 @END
3317 /* Open a symbolic link object */
3318 @REQ(open_symlink)
3319 unsigned int access; /* access flags */
3320 unsigned int attributes; /* object attributes */
3321 obj_handle_t rootdir; /* root directory */
3322 VARARG(name,unicode_str); /* symlink name */
3323 @REPLY
3324 obj_handle_t handle; /* handle to the symlink */
3325 @END
3328 /* Query a symbolic link object */
3329 @REQ(query_symlink)
3330 obj_handle_t handle; /* handle to the symlink */
3331 @REPLY
3332 data_size_t total; /* total needed size for name */
3333 VARARG(target_name,unicode_str); /* target name */
3334 @END
3337 /* Query basic object information */
3338 @REQ(get_object_info)
3339 obj_handle_t handle; /* handle to the object */
3340 @REPLY
3341 unsigned int access; /* granted access mask */
3342 unsigned int ref_count; /* object ref count */
3343 unsigned int handle_count; /* object handle count */
3344 data_size_t total; /* total needed size for name */
3345 VARARG(name,unicode_str); /* object name */
3346 @END
3349 /* Query object type name information */
3350 @REQ(get_object_type)
3351 obj_handle_t handle; /* handle to the object */
3352 @REPLY
3353 data_size_t total; /* needed size for type name */
3354 VARARG(type,unicode_str); /* type name */
3355 @END
3358 /* Unlink a named object */
3359 @REQ(unlink_object)
3360 obj_handle_t handle; /* handle to the object */
3361 @END
3364 /* Query the impersonation level of an impersonation token */
3365 @REQ(get_token_impersonation_level)
3366 obj_handle_t handle; /* handle to the object */
3367 @REPLY
3368 int impersonation_level; /* impersonation level of the impersonation token */
3369 @END
3371 /* Allocate a locally-unique identifier */
3372 @REQ(allocate_locally_unique_id)
3373 @REPLY
3374 luid_t luid;
3375 @END
3378 /* Create a device manager */
3379 @REQ(create_device_manager)
3380 unsigned int access; /* wanted access rights */
3381 unsigned int attributes; /* object attributes */
3382 @REPLY
3383 obj_handle_t handle; /* handle to the device */
3384 @END
3387 /* Create a device */
3388 @REQ(create_device)
3389 unsigned int access; /* wanted access rights */
3390 unsigned int attributes; /* object attributes */
3391 obj_handle_t rootdir; /* root directory */
3392 client_ptr_t user_ptr; /* opaque ptr for use by client */
3393 obj_handle_t manager; /* device manager */
3394 VARARG(name,unicode_str); /* object name */
3395 @REPLY
3396 obj_handle_t handle; /* handle to the device */
3397 @END
3400 /* Delete a device */
3401 @REQ(delete_device)
3402 obj_handle_t handle; /* handle to the device */
3403 @END
3406 /* Retrieve the next pending device irp request */
3407 @REQ(get_next_device_request)
3408 obj_handle_t manager; /* handle to the device manager */
3409 obj_handle_t prev; /* handle to the previous irp */
3410 unsigned int status; /* status of the previous irp */
3411 @REPLY
3412 irp_params_t params; /* irp parameters */
3413 obj_handle_t next; /* handle to the next irp */
3414 process_id_t client_pid; /* pid of process calling irp */
3415 thread_id_t client_tid; /* tid of thread calling irp */
3416 data_size_t in_size; /* total needed input size */
3417 data_size_t out_size; /* needed output size */
3418 VARARG(next_data,bytes); /* input data of the next irp */
3419 @END
3422 /* Make the current process a system process */
3423 @REQ(make_process_system)
3424 @REPLY
3425 obj_handle_t event; /* event signaled when all user processes have exited */
3426 @END
3429 /* Get detailed fixed-size information about a token */
3430 @REQ(get_token_statistics)
3431 obj_handle_t handle; /* handle to the object */
3432 @REPLY
3433 luid_t token_id; /* locally-unique identifier of the token */
3434 luid_t modified_id; /* locally-unique identifier of the modified version of the token */
3435 int primary; /* is the token primary or impersonation? */
3436 int impersonation_level; /* level of impersonation */
3437 int group_count; /* the number of groups the token is a member of */
3438 int privilege_count; /* the number of privileges the token has */
3439 @END
3442 /* Create I/O completion port */
3443 @REQ(create_completion)
3444 unsigned int access; /* desired access to a port */
3445 unsigned int attributes; /* object attributes */
3446 unsigned int concurrent; /* max number of concurrent active threads */
3447 obj_handle_t rootdir; /* root directory */
3448 VARARG(filename,unicode_str); /* port name */
3449 @REPLY
3450 obj_handle_t handle; /* port handle */
3451 @END
3454 /* Open I/O completion port */
3455 @REQ(open_completion)
3456 unsigned int access; /* desired access to a port */
3457 unsigned int attributes; /* object attributes */
3458 obj_handle_t rootdir; /* root directory */
3459 VARARG(filename,unicode_str); /* port name */
3460 @REPLY
3461 obj_handle_t handle; /* port handle */
3462 @END
3465 /* add completion to completion port */
3466 @REQ(add_completion)
3467 obj_handle_t handle; /* port handle */
3468 apc_param_t ckey; /* completion key */
3469 apc_param_t cvalue; /* completion value */
3470 apc_param_t information; /* IO_STATUS_BLOCK Information */
3471 unsigned int status; /* completion result */
3472 @END
3475 /* get completion from completion port queue */
3476 @REQ(remove_completion)
3477 obj_handle_t handle; /* port handle */
3478 @REPLY
3479 apc_param_t ckey; /* completion key */
3480 apc_param_t cvalue; /* completion value */
3481 apc_param_t information; /* IO_STATUS_BLOCK Information */
3482 unsigned int status; /* completion result */
3483 @END
3486 /* get completion queue depth */
3487 @REQ(query_completion)
3488 obj_handle_t handle; /* port handle */
3489 @REPLY
3490 unsigned int depth; /* completion queue depth */
3491 @END
3494 /* associate object with completion port */
3495 @REQ(set_completion_info)
3496 obj_handle_t handle; /* object handle */
3497 apc_param_t ckey; /* completion key */
3498 obj_handle_t chandle; /* port handle */
3499 @END
3502 /* check for associated completion and push msg */
3503 @REQ(add_fd_completion)
3504 obj_handle_t handle; /* async' object */
3505 apc_param_t cvalue; /* completion value */
3506 apc_param_t information; /* IO_STATUS_BLOCK Information */
3507 unsigned int status; /* completion status */
3508 @END
3511 /* Retrieve layered info for a window */
3512 @REQ(get_window_layered_info)
3513 user_handle_t handle; /* handle to the window */
3514 @REPLY
3515 unsigned int color_key; /* color key */
3516 unsigned int alpha; /* alpha (0..255) */
3517 unsigned int flags; /* LWA_* flags */
3518 @END
3521 /* Set layered info for a window */
3522 @REQ(set_window_layered_info)
3523 user_handle_t handle; /* handle to the window */
3524 unsigned int color_key; /* color key */
3525 unsigned int alpha; /* alpha (0..255) */
3526 unsigned int flags; /* LWA_* flags */
3527 @END
3530 /* Allocate an arbitrary user handle */
3531 @REQ(alloc_user_handle)
3532 @REPLY
3533 user_handle_t handle; /* allocated handle */
3534 @END
3537 /* Free an arbitrary user handle */
3538 @REQ(free_user_handle)
3539 user_handle_t handle; /* handle to free*/
3540 @END
3543 /* Set/get the current cursor */
3544 @REQ(set_cursor)
3545 unsigned int flags; /* flags for fields to set (see below) */
3546 user_handle_t handle; /* handle to the cursor */
3547 int show_count; /* show count increment/decrement */
3548 int x; /* cursor position */
3549 int y;
3550 rectangle_t clip; /* cursor clip rectangle */
3551 unsigned int clip_msg; /* message to post on cursor clip changes */
3552 @REPLY
3553 user_handle_t prev_handle; /* previous handle */
3554 int prev_count; /* previous show count */
3555 int prev_x; /* previous position */
3556 int prev_y;
3557 int new_x; /* new position */
3558 int new_y;
3559 rectangle_t new_clip; /* new clip rectangle */
3560 unsigned int last_change; /* time of last position change */
3561 @END
3562 #define SET_CURSOR_HANDLE 0x01
3563 #define SET_CURSOR_COUNT 0x02
3564 #define SET_CURSOR_POS 0x04
3565 #define SET_CURSOR_CLIP 0x08
3566 #define SET_CURSOR_NOCLIP 0x10
3569 /* Modify the list of registered rawinput devices */
3570 @REQ(update_rawinput_devices)
3571 VARARG(devices,rawinput_devices);
3572 @END
3575 /* Retrieve the suspended context of a thread */
3576 @REQ(get_suspend_context)
3577 @REPLY
3578 VARARG(context,context); /* thread context */
3579 @END
3582 /* Store the suspend context of a thread */
3583 @REQ(set_suspend_context)
3584 VARARG(context,context); /* thread context */
3585 @END
3588 /* Create a new job object */
3589 @REQ(create_job)
3590 unsigned int access; /* wanted access rights */
3591 unsigned int attributes; /* object attributes */
3592 VARARG(objattr,object_attributes); /* object attributes */
3593 @REPLY
3594 obj_handle_t handle; /* handle to the job */
3595 @END
3598 /* Assign a job object to a process */
3599 @REQ(assign_job)
3600 obj_handle_t job; /* handle to the job */
3601 obj_handle_t process; /* handle to the process */
3602 @END
3605 /* Check if a process is associated with a job */
3606 @REQ(process_in_job)
3607 obj_handle_t job; /* handle to the job */
3608 obj_handle_t process; /* handle to the process */
3609 @END
3612 /* Set limit flags on a job */
3613 @REQ(set_job_limits)
3614 obj_handle_t handle; /* handle to the job */
3615 unsigned int limit_flags; /* new limit flags */
3616 @END
3619 /* Set new completion port for a job */
3620 @REQ(set_job_completion_port)
3621 obj_handle_t job; /* handle to the job */
3622 obj_handle_t port; /* handle to the completion port */
3623 client_ptr_t key; /* key to send with completion messages */
3624 @END
3627 /* Terminate all processes associated with the job */
3628 @REQ(terminate_job)
3629 obj_handle_t handle; /* handle to the job */
3630 int status; /* process exit code */
3631 @END