server: Implement NtAreMappedFilesTheSame functionality on the server side.
[wine.git] / server / protocol.def
blobdd180313e7c737d5a589106743a32c8085111a94
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 iosb; /* I/O status block in client addr space */
272 client_ptr_t user; /* opaque user data containing callback pointer and async-specific data */
273 client_ptr_t apc; /* user APC to call */
274 apc_param_t apc_context; /* user APC context or completion value */
275 } async_data_t;
277 /* structures for extra message data */
279 struct hardware_msg_data
281 lparam_t info; /* extra info */
282 unsigned int hw_id; /* unique id */
283 unsigned int flags; /* hook flags */
284 union
286 int type;
287 struct
289 int type; /* RIM_TYPEKEYBOARD */
290 unsigned int message; /* message generated by this rawinput event */
291 unsigned short vkey; /* virtual key code */
292 unsigned short scan; /* scan code */
293 } kbd;
294 struct
296 int type; /* RIM_TYPEMOUSE */
297 int x; /* x coordinate */
298 int y; /* y coordinate */
299 unsigned int data; /* mouse data */
300 } mouse;
301 } rawinput;
304 struct callback_msg_data
306 client_ptr_t callback; /* callback function */
307 lparam_t data; /* user data for callback */
308 lparam_t result; /* message result */
311 struct winevent_msg_data
313 user_handle_t hook; /* hook handle */
314 thread_id_t tid; /* thread id */
315 client_ptr_t hook_proc; /* hook proc address */
316 /* followed by module name if any */
319 typedef union
321 int type;
322 struct
324 int type; /* INPUT_KEYBOARD */
325 unsigned short vkey; /* virtual key code */
326 unsigned short scan; /* scan code */
327 unsigned int flags; /* event flags */
328 unsigned int time; /* event time */
329 lparam_t info; /* extra info */
330 } kbd;
331 struct
333 int type; /* INPUT_MOUSE */
334 int x; /* coordinates */
335 int y;
336 unsigned int data; /* mouse data */
337 unsigned int flags; /* event flags */
338 unsigned int time; /* event time */
339 lparam_t info; /* extra info */
340 } mouse;
341 struct
343 int type; /* INPUT_HARDWARE */
344 unsigned int msg; /* message code */
345 lparam_t lparam; /* message param */
346 } hw;
347 } hw_input_t;
349 typedef union
351 unsigned char bytes[1]; /* raw data for sent messages */
352 struct hardware_msg_data hardware;
353 struct callback_msg_data callback;
354 struct winevent_msg_data winevent;
355 } message_data_t;
357 /* structure for console char/attribute info */
358 typedef struct
360 WCHAR ch;
361 unsigned short attr;
362 } char_info_t;
364 /* structure returned in filesystem events */
365 struct filesystem_event
367 int action;
368 data_size_t len;
369 char name[1];
372 typedef struct
374 unsigned int low_part;
375 int high_part;
376 } luid_t;
378 #define MAX_ACL_LEN 65535
380 struct security_descriptor
382 unsigned int control; /* SE_ flags */
383 data_size_t owner_len;
384 data_size_t group_len;
385 data_size_t sacl_len;
386 data_size_t dacl_len;
387 /* VARARG(owner,SID); */
388 /* VARARG(group,SID); */
389 /* VARARG(sacl,ACL); */
390 /* VARARG(dacl,ACL); */
393 struct object_attributes
395 obj_handle_t rootdir; /* root directory */
396 unsigned int attributes; /* object attributes */
397 data_size_t sd_len; /* length of security_descriptor data. may be 0 */
398 data_size_t name_len; /* length of the name string. may be 0 */
399 /* VARARG(sd,security_descriptor); */
400 /* VARARG(name,unicode_str); */
403 struct token_groups
405 unsigned int count;
406 /* unsigned int attributes[count]; */
407 /* VARARG(sids,SID); */
410 enum select_op
412 SELECT_NONE,
413 SELECT_WAIT,
414 SELECT_WAIT_ALL,
415 SELECT_SIGNAL_AND_WAIT,
416 SELECT_KEYED_EVENT_WAIT,
417 SELECT_KEYED_EVENT_RELEASE
420 typedef union
422 enum select_op op;
423 struct
425 enum select_op op; /* SELECT_WAIT or SELECT_WAIT_ALL */
426 obj_handle_t handles[MAXIMUM_WAIT_OBJECTS];
427 } wait;
428 struct
430 enum select_op op; /* SELECT_SIGNAL_AND_WAIT */
431 obj_handle_t wait;
432 obj_handle_t signal; /* must be last in the structure so we can remove it on retries */
433 } signal_and_wait;
434 struct
436 enum select_op op; /* SELECT_KEYED_EVENT_WAIT or SELECT_KEYED_EVENT_RELEASE */
437 obj_handle_t handle;
438 client_ptr_t key;
439 } keyed_event;
440 } select_op_t;
442 enum apc_type
444 APC_NONE,
445 APC_USER,
446 APC_TIMER,
447 APC_ASYNC_IO,
448 APC_VIRTUAL_ALLOC,
449 APC_VIRTUAL_FREE,
450 APC_VIRTUAL_QUERY,
451 APC_VIRTUAL_PROTECT,
452 APC_VIRTUAL_FLUSH,
453 APC_VIRTUAL_LOCK,
454 APC_VIRTUAL_UNLOCK,
455 APC_MAP_VIEW,
456 APC_UNMAP_VIEW,
457 APC_CREATE_THREAD
460 typedef union
462 enum apc_type type;
463 struct
465 enum apc_type type; /* APC_USER */
466 int __pad;
467 client_ptr_t func; /* void (__stdcall *func)(ULONG_PTR,ULONG_PTR,ULONG_PTR); */
468 apc_param_t args[3]; /* arguments for user function */
469 } user;
470 struct
472 enum apc_type type; /* APC_TIMER */
473 int __pad;
474 client_ptr_t func; /* void (__stdcall *func)(void*, unsigned int, unsigned int); */
475 timeout_t time; /* absolute time of expiration */
476 client_ptr_t arg; /* user argument */
477 } timer;
478 struct
480 enum apc_type type; /* APC_ASYNC_IO */
481 unsigned int status; /* I/O status */
482 client_ptr_t 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 unsigned int total; /* bytes transferred */
571 } async_io;
572 struct
574 enum apc_type type; /* APC_VIRTUAL_ALLOC */
575 unsigned int status; /* status returned by call */
576 client_ptr_t addr; /* resulting address */
577 mem_size_t size; /* resulting size */
578 } virtual_alloc;
579 struct
581 enum apc_type type; /* APC_VIRTUAL_FREE */
582 unsigned int status; /* status returned by call */
583 client_ptr_t addr; /* resulting address */
584 mem_size_t size; /* resulting size */
585 } virtual_free;
586 struct
588 enum apc_type type; /* APC_VIRTUAL_QUERY */
589 unsigned int status; /* status returned by call */
590 client_ptr_t base; /* resulting base address */
591 client_ptr_t alloc_base;/* resulting allocation base */
592 mem_size_t size; /* resulting region size */
593 unsigned short state; /* resulting region state */
594 unsigned short prot; /* resulting region protection */
595 unsigned short alloc_prot;/* resulting allocation protection */
596 unsigned short alloc_type;/* resulting region allocation type */
597 } virtual_query;
598 struct
600 enum apc_type type; /* APC_VIRTUAL_PROTECT */
601 unsigned int status; /* status returned by call */
602 client_ptr_t addr; /* resulting address */
603 mem_size_t size; /* resulting size */
604 unsigned int prot; /* old protection flags */
605 } virtual_protect;
606 struct
608 enum apc_type type; /* APC_VIRTUAL_FLUSH */
609 unsigned int status; /* status returned by call */
610 client_ptr_t addr; /* resulting address */
611 mem_size_t size; /* resulting size */
612 } virtual_flush;
613 struct
615 enum apc_type type; /* APC_VIRTUAL_LOCK */
616 unsigned int status; /* status returned by call */
617 client_ptr_t addr; /* resulting address */
618 mem_size_t size; /* resulting size */
619 } virtual_lock;
620 struct
622 enum apc_type type; /* APC_VIRTUAL_UNLOCK */
623 unsigned int status; /* status returned by call */
624 client_ptr_t addr; /* resulting address */
625 mem_size_t size; /* resulting size */
626 } virtual_unlock;
627 struct
629 enum apc_type type; /* APC_MAP_VIEW */
630 unsigned int status; /* status returned by call */
631 client_ptr_t addr; /* resulting address */
632 mem_size_t size; /* resulting size */
633 } map_view;
634 struct
636 enum apc_type type; /* APC_MAP_VIEW */
637 unsigned int status; /* status returned by call */
638 } unmap_view;
639 struct
641 enum apc_type type; /* APC_CREATE_THREAD */
642 unsigned int status; /* status returned by call */
643 thread_id_t tid; /* thread id */
644 obj_handle_t handle; /* handle to new thread */
645 } create_thread;
646 } apc_result_t;
648 typedef union
650 unsigned int major; /* irp major function */
651 struct
653 unsigned int major; /* IRP_MJ_CREATE */
654 unsigned int access; /* access rights */
655 unsigned int sharing; /* sharing flags */
656 unsigned int options; /* file options */
657 client_ptr_t device; /* opaque ptr for the device */
658 } create;
659 struct
661 unsigned int major; /* IRP_MJ_CLOSE */
662 int __pad;
663 client_ptr_t file; /* opaque ptr for the file object */
664 } close;
665 struct
667 unsigned int major; /* IRP_MJ_READ */
668 unsigned int key; /* driver key */
669 client_ptr_t file; /* opaque ptr for the file object */
670 file_pos_t pos; /* file position */
671 } read;
672 struct
674 unsigned int major; /* IRP_MJ_WRITE */
675 unsigned int key; /* driver key */
676 client_ptr_t file; /* opaque ptr for the file object */
677 file_pos_t pos; /* file position */
678 } write;
679 struct
681 unsigned int major; /* IRP_MJ_FLUSH_BUFFERS */
682 int __pad;
683 client_ptr_t file; /* opaque ptr for the file object */
684 } flush;
685 struct
687 unsigned int major; /* IRP_MJ_DEVICE_CONTROL */
688 ioctl_code_t code; /* ioctl code */
689 client_ptr_t file; /* opaque ptr for the file object */
690 } ioctl;
691 } irp_params_t;
693 /* information about a PE image mapping, roughly equivalent to SECTION_IMAGE_INFORMATION */
694 typedef struct
696 client_ptr_t base;
697 client_ptr_t entry_point;
698 mem_size_t map_size;
699 mem_size_t stack_size;
700 mem_size_t stack_commit;
701 unsigned int zerobits;
702 unsigned int subsystem;
703 unsigned short subsystem_low;
704 unsigned short subsystem_high;
705 unsigned int gp;
706 unsigned short image_charact;
707 unsigned short dll_charact;
708 unsigned short machine;
709 unsigned char contains_code;
710 unsigned char image_flags;
711 unsigned int loader_flags;
712 unsigned int header_size;
713 unsigned int file_size;
714 unsigned int checksum;
715 } pe_image_info_t;
717 struct rawinput_device
719 unsigned short usage_page;
720 unsigned short usage;
721 unsigned int flags;
722 user_handle_t target;
725 /****************************************************************/
726 /* Request declarations */
728 /* Create a new process from the context of the parent */
729 @REQ(new_process)
730 int inherit_all; /* inherit all handles from parent */
731 unsigned int create_flags; /* creation flags */
732 int socket_fd; /* file descriptor for process socket */
733 obj_handle_t exe_file; /* file handle for main exe */
734 unsigned int process_access; /* access rights for process object */
735 unsigned int process_attr; /* attributes for process object */
736 unsigned int thread_access; /* access rights for thread object */
737 unsigned int thread_attr; /* attributes for thread object */
738 cpu_type_t cpu; /* CPU that the new process will use */
739 data_size_t info_size; /* size of startup info */
740 VARARG(info,startup_info,info_size); /* startup information */
741 VARARG(env,unicode_str); /* environment for new process */
742 @REPLY
743 obj_handle_t info; /* new process info handle */
744 process_id_t pid; /* process id */
745 obj_handle_t phandle; /* process handle (in the current process) */
746 thread_id_t tid; /* thread id */
747 obj_handle_t thandle; /* thread handle (in the current process) */
748 @END
751 /* Retrieve information about a newly started process */
752 @REQ(get_new_process_info)
753 obj_handle_t info; /* info handle returned from new_process_request */
754 @REPLY
755 int success; /* did the process start successfully? */
756 int exit_code; /* process exit code if failed */
757 @END
760 /* Create a new thread from the context of the parent */
761 @REQ(new_thread)
762 unsigned int access; /* wanted access rights */
763 unsigned int attributes; /* object attributes */
764 int suspend; /* new thread should be suspended on creation */
765 int request_fd; /* fd for request pipe */
766 @REPLY
767 thread_id_t tid; /* thread id */
768 obj_handle_t handle; /* thread handle (in the current process) */
769 @END
772 /* Retrieve the new process startup info */
773 @REQ(get_startup_info)
774 @REPLY
775 obj_handle_t exe_file; /* file handle for main exe */
776 data_size_t info_size; /* size of startup info */
777 VARARG(info,startup_info,info_size); /* startup information */
778 VARARG(env,unicode_str); /* environment */
779 @END
782 /* Signal the end of the process initialization */
783 @REQ(init_process_done)
784 int gui; /* is it a GUI process? */
785 mod_handle_t module; /* main module base address */
786 client_ptr_t ldt_copy; /* address of LDT copy (in thread address space) */
787 client_ptr_t entry; /* process entry point */
788 @REPLY
789 int suspend; /* is process suspended? */
790 @END
793 /* Initialize a thread; called from the child after fork()/clone() */
794 @REQ(init_thread)
795 int unix_pid; /* Unix pid of new thread */
796 int unix_tid; /* Unix tid of new thread */
797 int debug_level; /* new debug level */
798 client_ptr_t teb; /* TEB of new thread (in thread address space) */
799 client_ptr_t entry; /* entry point or PEB if initial thread (in thread address space) */
800 int reply_fd; /* fd for reply pipe */
801 int wait_fd; /* fd for blocking calls pipe */
802 cpu_type_t cpu; /* CPU that this thread is running on */
803 @REPLY
804 process_id_t pid; /* process id of the new thread's process */
805 thread_id_t tid; /* thread id of the new thread */
806 timeout_t server_start; /* server start time */
807 data_size_t info_size; /* total size of startup info */
808 int version; /* protocol version */
809 unsigned int all_cpus; /* bitset of supported CPUs */
810 @END
813 /* Terminate a process */
814 @REQ(terminate_process)
815 obj_handle_t handle; /* process handle to terminate */
816 int exit_code; /* process exit code */
817 @REPLY
818 int self; /* suicide? */
819 @END
822 /* Terminate a thread */
823 @REQ(terminate_thread)
824 obj_handle_t handle; /* thread handle to terminate */
825 int exit_code; /* thread exit code */
826 @REPLY
827 int self; /* suicide? */
828 int last; /* last thread in this process? */
829 @END
832 /* Retrieve information about a process */
833 @REQ(get_process_info)
834 obj_handle_t handle; /* process handle */
835 @REPLY
836 process_id_t pid; /* server process id */
837 process_id_t ppid; /* server process id of parent */
838 affinity_t affinity; /* process affinity mask */
839 client_ptr_t peb; /* PEB address in process address space */
840 timeout_t start_time; /* process start time */
841 timeout_t end_time; /* process end time */
842 int exit_code; /* process exit code */
843 int priority; /* priority class */
844 cpu_type_t cpu; /* CPU that this process is running on */
845 short int debugger_present; /* process is being debugged */
846 short int debug_children; /* inherit debugger to child processes */
847 @END
850 /* Retrieve information about a process memory usage */
851 @REQ(get_process_vm_counters)
852 obj_handle_t handle; /* process handle */
853 @REPLY
854 mem_size_t peak_virtual_size; /* peak virtual memory in bytes */
855 mem_size_t virtual_size; /* virtual memory in bytes */
856 mem_size_t peak_working_set_size; /* peak real memory in bytes */
857 mem_size_t working_set_size; /* real memory in bytes */
858 mem_size_t pagefile_usage; /* commit charge in bytes */
859 mem_size_t peak_pagefile_usage; /* peak commit charge in bytes */
860 @END
863 /* Set a process information */
864 @REQ(set_process_info)
865 obj_handle_t handle; /* process handle */
866 int mask; /* setting mask (see below) */
867 int priority; /* priority class */
868 affinity_t affinity; /* affinity mask */
869 @END
870 #define SET_PROCESS_INFO_PRIORITY 0x01
871 #define SET_PROCESS_INFO_AFFINITY 0x02
874 /* Retrieve information about a thread */
875 @REQ(get_thread_info)
876 obj_handle_t handle; /* thread handle */
877 thread_id_t tid_in; /* thread id (optional) */
878 @REPLY
879 process_id_t pid; /* server process id */
880 thread_id_t tid; /* server thread id */
881 client_ptr_t teb; /* thread teb pointer */
882 client_ptr_t entry_point; /* thread entry point */
883 affinity_t affinity; /* thread affinity mask */
884 int exit_code; /* thread exit code */
885 int priority; /* thread priority level */
886 int last; /* last thread in process */
887 @END
890 /* Retrieve information about thread times */
891 @REQ(get_thread_times)
892 obj_handle_t handle; /* thread handle */
893 @REPLY
894 timeout_t creation_time; /* thread creation time */
895 timeout_t exit_time; /* thread exit time */
896 @END
899 /* Set a thread information */
900 @REQ(set_thread_info)
901 obj_handle_t handle; /* thread handle */
902 int mask; /* setting mask (see below) */
903 int priority; /* priority class */
904 affinity_t affinity; /* affinity mask */
905 client_ptr_t entry_point; /* thread entry point */
906 obj_handle_t token; /* impersonation token */
907 @END
908 #define SET_THREAD_INFO_PRIORITY 0x01
909 #define SET_THREAD_INFO_AFFINITY 0x02
910 #define SET_THREAD_INFO_TOKEN 0x04
911 #define SET_THREAD_INFO_ENTRYPOINT 0x08
914 /* Retrieve information about a module */
915 @REQ(get_dll_info)
916 obj_handle_t handle; /* process handle */
917 mod_handle_t base_address; /* base address of module */
918 @REPLY
919 client_ptr_t entry_point;
920 data_size_t size; /* module size */
921 data_size_t filename_len; /* buffer len in bytes required to store filename */
922 VARARG(filename,unicode_str); /* file name of module */
923 @END
926 /* Suspend a thread */
927 @REQ(suspend_thread)
928 obj_handle_t handle; /* thread handle */
929 @REPLY
930 int count; /* new suspend count */
931 @END
934 /* Resume a thread */
935 @REQ(resume_thread)
936 obj_handle_t handle; /* thread handle */
937 @REPLY
938 int count; /* new suspend count */
939 @END
942 /* Notify the server that a dll has been loaded */
943 @REQ(load_dll)
944 obj_handle_t mapping; /* file mapping handle */
945 mod_handle_t base; /* base address */
946 client_ptr_t name; /* ptr to ptr to name (in process addr space) */
947 data_size_t size; /* dll size */
948 int dbg_offset; /* debug info offset */
949 int dbg_size; /* debug info size */
950 VARARG(filename,unicode_str); /* file name of dll */
951 @END
954 /* Notify the server that a dll is being unloaded */
955 @REQ(unload_dll)
956 mod_handle_t base; /* base address */
957 @END
960 /* Queue an APC for a thread or process */
961 @REQ(queue_apc)
962 obj_handle_t handle; /* thread or process handle */
963 apc_call_t call; /* call arguments */
964 @REPLY
965 obj_handle_t handle; /* APC handle */
966 int self; /* run APC in caller itself? */
967 @END
970 /* Get the result of an APC call */
971 @REQ(get_apc_result)
972 obj_handle_t handle; /* handle to the APC */
973 @REPLY
974 apc_result_t result; /* result of the APC */
975 @END
978 /* Close a handle for the current process */
979 @REQ(close_handle)
980 obj_handle_t handle; /* handle to close */
981 @END
984 /* Set a handle information */
985 @REQ(set_handle_info)
986 obj_handle_t handle; /* handle we are interested in */
987 int flags; /* new handle flags */
988 int mask; /* mask for flags to set */
989 @REPLY
990 int old_flags; /* old flag value */
991 @END
994 /* Duplicate a handle */
995 @REQ(dup_handle)
996 obj_handle_t src_process; /* src process handle */
997 obj_handle_t src_handle; /* src handle to duplicate */
998 obj_handle_t dst_process; /* dst process handle */
999 unsigned int access; /* wanted access rights */
1000 unsigned int attributes; /* object attributes */
1001 unsigned int options; /* duplicate options (see below) */
1002 @REPLY
1003 obj_handle_t handle; /* duplicated handle in dst process */
1004 int self; /* is the source the current process? */
1005 int closed; /* whether the source handle has been closed */
1006 @END
1007 #define DUP_HANDLE_CLOSE_SOURCE DUPLICATE_CLOSE_SOURCE
1008 #define DUP_HANDLE_SAME_ACCESS DUPLICATE_SAME_ACCESS
1009 #define DUP_HANDLE_MAKE_GLOBAL 0x80000000 /* Not a Windows flag */
1012 /* Open a handle to a process */
1013 @REQ(open_process)
1014 process_id_t pid; /* process id to open */
1015 unsigned int access; /* wanted access rights */
1016 unsigned int attributes; /* object attributes */
1017 @REPLY
1018 obj_handle_t handle; /* handle to the process */
1019 @END
1022 /* Open a handle to a thread */
1023 @REQ(open_thread)
1024 thread_id_t tid; /* thread id to open */
1025 unsigned int access; /* wanted access rights */
1026 unsigned int attributes; /* object attributes */
1027 @REPLY
1028 obj_handle_t handle; /* handle to the thread */
1029 @END
1032 /* Wait for handles */
1033 @REQ(select)
1034 int flags; /* wait flags (see below) */
1035 client_ptr_t cookie; /* magic cookie to return to client */
1036 timeout_t timeout; /* timeout */
1037 obj_handle_t prev_apc; /* handle to previous APC */
1038 VARARG(result,apc_result); /* result of previous APC */
1039 VARARG(data,select_op); /* operation-specific data */
1040 @REPLY
1041 timeout_t timeout; /* timeout converted to absolute */
1042 apc_call_t call; /* APC call arguments */
1043 obj_handle_t apc_handle; /* handle to next APC */
1044 @END
1045 #define SELECT_ALERTABLE 1
1046 #define SELECT_INTERRUPTIBLE 2
1049 /* Create an event */
1050 @REQ(create_event)
1051 unsigned int access; /* wanted access rights */
1052 int manual_reset; /* manual reset event */
1053 int initial_state; /* initial state of the event */
1054 VARARG(objattr,object_attributes); /* object attributes */
1055 @REPLY
1056 obj_handle_t handle; /* handle to the event */
1057 @END
1059 /* Event operation */
1060 @REQ(event_op)
1061 obj_handle_t handle; /* handle to event */
1062 int op; /* event operation (see below) */
1063 @END
1064 enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT };
1066 @REQ(query_event)
1067 obj_handle_t handle; /* handle to event */
1068 @REPLY
1069 int manual_reset; /* manual reset event */
1070 int state; /* current state of the event */
1071 @END
1073 /* Open an event */
1074 @REQ(open_event)
1075 unsigned int access; /* wanted access rights */
1076 unsigned int attributes; /* object attributes */
1077 obj_handle_t rootdir; /* root directory */
1078 VARARG(name,unicode_str); /* object name */
1079 @REPLY
1080 obj_handle_t handle; /* handle to the event */
1081 @END
1084 /* Create a keyed event */
1085 @REQ(create_keyed_event)
1086 unsigned int access; /* wanted access rights */
1087 VARARG(objattr,object_attributes); /* object attributes */
1088 @REPLY
1089 obj_handle_t handle; /* handle to the event */
1090 @END
1092 /* Open a keyed event */
1093 @REQ(open_keyed_event)
1094 unsigned int access; /* wanted access rights */
1095 unsigned int attributes; /* object attributes */
1096 obj_handle_t rootdir; /* root directory */
1097 VARARG(name,unicode_str); /* object name */
1098 @REPLY
1099 obj_handle_t handle; /* handle to the event */
1100 @END
1103 /* Create a mutex */
1104 @REQ(create_mutex)
1105 unsigned int access; /* wanted access rights */
1106 int owned; /* initially owned? */
1107 VARARG(objattr,object_attributes); /* object attributes */
1108 @REPLY
1109 obj_handle_t handle; /* handle to the mutex */
1110 @END
1113 /* Release a mutex */
1114 @REQ(release_mutex)
1115 obj_handle_t handle; /* handle to the mutex */
1116 @REPLY
1117 unsigned int prev_count; /* value of internal counter, before release */
1118 @END
1121 /* Open a mutex */
1122 @REQ(open_mutex)
1123 unsigned int access; /* wanted access rights */
1124 unsigned int attributes; /* object attributes */
1125 obj_handle_t rootdir; /* root directory */
1126 VARARG(name,unicode_str); /* object name */
1127 @REPLY
1128 obj_handle_t handle; /* handle to the mutex */
1129 @END
1132 /* Query a mutex */
1133 @REQ(query_mutex)
1134 obj_handle_t handle; /* handle to mutex */
1135 @REPLY
1136 unsigned int count; /* current count of mutex */
1137 int owned; /* true if owned by current thread */
1138 int abandoned; /* true if abandoned */
1139 @END
1142 /* Create a semaphore */
1143 @REQ(create_semaphore)
1144 unsigned int access; /* wanted access rights */
1145 unsigned int initial; /* initial count */
1146 unsigned int max; /* maximum count */
1147 VARARG(objattr,object_attributes); /* object attributes */
1148 @REPLY
1149 obj_handle_t handle; /* handle to the semaphore */
1150 @END
1153 /* Release a semaphore */
1154 @REQ(release_semaphore)
1155 obj_handle_t handle; /* handle to the semaphore */
1156 unsigned int count; /* count to add to semaphore */
1157 @REPLY
1158 unsigned int prev_count; /* previous semaphore count */
1159 @END
1161 @REQ(query_semaphore)
1162 obj_handle_t handle; /* handle to the semaphore */
1163 @REPLY
1164 unsigned int current; /* current count */
1165 unsigned int max; /* maximum count */
1166 @END
1168 /* Open a semaphore */
1169 @REQ(open_semaphore)
1170 unsigned int access; /* wanted access rights */
1171 unsigned int attributes; /* object attributes */
1172 obj_handle_t rootdir; /* root directory */
1173 VARARG(name,unicode_str); /* object name */
1174 @REPLY
1175 obj_handle_t handle; /* handle to the semaphore */
1176 @END
1179 /* Create a file */
1180 @REQ(create_file)
1181 unsigned int access; /* wanted access rights */
1182 unsigned int sharing; /* sharing flags */
1183 int create; /* file create action */
1184 unsigned int options; /* file options */
1185 unsigned int attrs; /* file attributes for creation */
1186 VARARG(objattr,object_attributes); /* object attributes */
1187 VARARG(filename,string); /* file name */
1188 @REPLY
1189 obj_handle_t handle; /* handle to the file */
1190 @END
1193 /* Open a file object */
1194 @REQ(open_file_object)
1195 unsigned int access; /* wanted access rights */
1196 unsigned int attributes; /* open attributes */
1197 obj_handle_t rootdir; /* root directory */
1198 unsigned int sharing; /* sharing flags */
1199 unsigned int options; /* file options */
1200 VARARG(filename,unicode_str); /* file name */
1201 @REPLY
1202 obj_handle_t handle; /* handle to the file */
1203 @END
1206 /* Allocate a file handle for a Unix fd */
1207 @REQ(alloc_file_handle)
1208 unsigned int access; /* wanted access rights */
1209 unsigned int attributes; /* object attributes */
1210 int fd; /* file descriptor on the client side */
1211 @REPLY
1212 obj_handle_t handle; /* handle to the file */
1213 @END
1216 /* Get the Unix name from a file handle */
1217 @REQ(get_handle_unix_name)
1218 obj_handle_t handle; /* file handle */
1219 @REPLY
1220 data_size_t name_len; /* unix name length */
1221 VARARG(name,string); /* unix name */
1222 @END
1225 /* Get a Unix fd to access a file */
1226 @REQ(get_handle_fd)
1227 obj_handle_t handle; /* handle to the file */
1228 @REPLY
1229 int type; /* file type (see below) */
1230 int cacheable; /* can fd be cached in the client? */
1231 unsigned int access; /* file access rights */
1232 unsigned int options; /* file open options */
1233 @END
1234 enum server_fd_type
1236 FD_TYPE_INVALID, /* invalid file (no associated fd) */
1237 FD_TYPE_FILE, /* regular file */
1238 FD_TYPE_DIR, /* directory */
1239 FD_TYPE_SOCKET, /* socket */
1240 FD_TYPE_SERIAL, /* serial port */
1241 FD_TYPE_PIPE, /* named pipe */
1242 FD_TYPE_MAILSLOT, /* mailslot */
1243 FD_TYPE_CHAR, /* unspecified char device */
1244 FD_TYPE_DEVICE, /* Windows device file */
1245 FD_TYPE_NB_TYPES
1249 /* Retrieve (or allocate) the client-side directory cache entry */
1250 @REQ(get_directory_cache_entry)
1251 obj_handle_t handle; /* handle to the directory */
1252 @REPLY
1253 int entry; /* cache entry on the client side */
1254 VARARG(free,ints); /* entries that can be freed */
1255 @END
1258 /* Flush a file buffers */
1259 @REQ(flush)
1260 async_data_t async; /* async I/O parameters */
1261 @REPLY
1262 obj_handle_t event; /* event set when finished */
1263 @END
1266 /* Lock a region of a file */
1267 @REQ(lock_file)
1268 obj_handle_t handle; /* handle to the file */
1269 file_pos_t offset; /* offset of start of lock */
1270 file_pos_t count; /* count of bytes to lock */
1271 int shared; /* shared or exclusive lock? */
1272 int wait; /* do we want to wait? */
1273 @REPLY
1274 obj_handle_t handle; /* handle to wait on */
1275 int overlapped; /* is it an overlapped I/O handle? */
1276 @END
1279 /* Unlock a region of a file */
1280 @REQ(unlock_file)
1281 obj_handle_t handle; /* handle to the file */
1282 file_pos_t offset; /* offset of start of unlock */
1283 file_pos_t count; /* count of bytes to unlock */
1284 @END
1287 /* Create a socket */
1288 @REQ(create_socket)
1289 unsigned int access; /* wanted access rights */
1290 unsigned int attributes; /* object attributes */
1291 int family; /* family, see socket manpage */
1292 int type; /* type, see socket manpage */
1293 int protocol; /* protocol, see socket manpage */
1294 unsigned int flags; /* socket flags */
1295 @REPLY
1296 obj_handle_t handle; /* handle to the new socket */
1297 @END
1300 /* Accept a socket */
1301 @REQ(accept_socket)
1302 obj_handle_t lhandle; /* handle to the listening socket */
1303 unsigned int access; /* wanted access rights */
1304 unsigned int attributes; /* object attributes */
1305 @REPLY
1306 obj_handle_t handle; /* handle to the new socket */
1307 @END
1310 /* Accept into an initialized socket */
1311 @REQ(accept_into_socket)
1312 obj_handle_t lhandle; /* handle to the listening socket */
1313 obj_handle_t ahandle; /* handle to the accepting socket */
1314 @END
1317 /* Set socket event parameters */
1318 @REQ(set_socket_event)
1319 obj_handle_t handle; /* handle to the socket */
1320 unsigned int mask; /* event mask */
1321 obj_handle_t event; /* event object */
1322 user_handle_t window; /* window to send the message to */
1323 unsigned int msg; /* message to send */
1324 @END
1327 /* Get socket event parameters */
1328 @REQ(get_socket_event)
1329 obj_handle_t handle; /* handle to the socket */
1330 int service; /* clear pending? */
1331 obj_handle_t c_event; /* event to clear */
1332 @REPLY
1333 unsigned int mask; /* event mask */
1334 unsigned int pmask; /* pending events */
1335 unsigned int state; /* status bits */
1336 VARARG(errors,ints); /* event errors */
1337 @END
1340 /* Get socket info */
1341 @REQ(get_socket_info)
1342 obj_handle_t handle; /* handle to the socket */
1343 @REPLY
1344 int family; /* family, see socket manpage */
1345 int type; /* type, see socket manpage */
1346 int protocol; /* protocol, see socket manpage */
1347 @END
1350 /* Re-enable pending socket events */
1351 @REQ(enable_socket_event)
1352 obj_handle_t handle; /* handle to the socket */
1353 unsigned int mask; /* events to re-enable */
1354 unsigned int sstate; /* status bits to set */
1355 unsigned int cstate; /* status bits to clear */
1356 @END
1358 @REQ(set_socket_deferred)
1359 obj_handle_t handle; /* handle to the socket */
1360 obj_handle_t deferred; /* handle to the socket for which accept() is deferred */
1361 @END
1363 /* Allocate a console (only used by a console renderer) */
1364 @REQ(alloc_console)
1365 unsigned int access; /* wanted access rights */
1366 unsigned int attributes; /* object attributes */
1367 process_id_t pid; /* pid of process which shall be attached to the console */
1368 int input_fd; /* if pid=-1 (bare console to current process), fd for input */
1369 @REPLY
1370 obj_handle_t handle_in; /* handle to console input */
1371 obj_handle_t event; /* handle to renderer events change notification */
1372 @END
1375 /* Free the console of the current process */
1376 @REQ(free_console)
1377 @END
1380 #define CONSOLE_RENDERER_NONE_EVENT 0x00
1381 #define CONSOLE_RENDERER_TITLE_EVENT 0x01
1382 #define CONSOLE_RENDERER_ACTIVE_SB_EVENT 0x02
1383 #define CONSOLE_RENDERER_SB_RESIZE_EVENT 0x03
1384 #define CONSOLE_RENDERER_UPDATE_EVENT 0x04
1385 #define CONSOLE_RENDERER_CURSOR_POS_EVENT 0x05
1386 #define CONSOLE_RENDERER_CURSOR_GEOM_EVENT 0x06
1387 #define CONSOLE_RENDERER_DISPLAY_EVENT 0x07
1388 #define CONSOLE_RENDERER_EXIT_EVENT 0x08
1389 struct console_renderer_event
1391 short event;
1392 union
1394 struct update
1396 short top;
1397 short bottom;
1398 } update;
1399 struct resize
1401 short width;
1402 short height;
1403 } resize;
1404 struct cursor_pos
1406 short x;
1407 short y;
1408 } cursor_pos;
1409 struct cursor_geom
1411 short visible;
1412 short size;
1413 } cursor_geom;
1414 struct display
1416 short left;
1417 short top;
1418 short width;
1419 short height;
1420 } display;
1421 } u;
1424 /* retrieve console events for the renderer */
1425 @REQ(get_console_renderer_events)
1426 obj_handle_t handle; /* handle to console input events */
1427 @REPLY
1428 VARARG(data,bytes); /* the various console_renderer_events */
1429 @END
1432 /* Open a handle to the process console */
1433 @REQ(open_console)
1434 obj_handle_t from; /* 0 (resp 1) input (resp output) of current process console */
1435 /* otherwise console_in handle to get active screen buffer? */
1436 unsigned int access; /* wanted access rights */
1437 unsigned int attributes; /* object attributes */
1438 int share; /* share mask (only for output handles) */
1439 @REPLY
1440 obj_handle_t handle; /* handle to the console */
1441 @END
1444 /* Get the input queue wait event */
1445 @REQ(get_console_wait_event)
1446 @REPLY
1447 obj_handle_t handle;
1448 @END
1450 /* Get a console mode (input or output) */
1451 @REQ(get_console_mode)
1452 obj_handle_t handle; /* handle to the console */
1453 @REPLY
1454 int mode; /* console mode */
1455 @END
1458 /* Set a console mode (input or output) */
1459 @REQ(set_console_mode)
1460 obj_handle_t handle; /* handle to the console */
1461 int mode; /* console mode */
1462 @END
1465 /* Set info about a console (input only) */
1466 @REQ(set_console_input_info)
1467 obj_handle_t handle; /* handle to console input, or 0 for process' console */
1468 int mask; /* setting mask (see below) */
1469 obj_handle_t active_sb; /* active screen buffer */
1470 int history_mode; /* whether we duplicate lines in history */
1471 int history_size; /* number of lines in history */
1472 int edition_mode; /* index to the edition mode flavors */
1473 int input_cp; /* console input codepage */
1474 int output_cp; /* console output codepage */
1475 user_handle_t win; /* console window if backend supports it */
1476 VARARG(title,unicode_str); /* console title */
1477 @END
1478 #define SET_CONSOLE_INPUT_INFO_ACTIVE_SB 0x01
1479 #define SET_CONSOLE_INPUT_INFO_TITLE 0x02
1480 #define SET_CONSOLE_INPUT_INFO_HISTORY_MODE 0x04
1481 #define SET_CONSOLE_INPUT_INFO_HISTORY_SIZE 0x08
1482 #define SET_CONSOLE_INPUT_INFO_EDITION_MODE 0x10
1483 #define SET_CONSOLE_INPUT_INFO_INPUT_CODEPAGE 0x20
1484 #define SET_CONSOLE_INPUT_INFO_OUTPUT_CODEPAGE 0x40
1485 #define SET_CONSOLE_INPUT_INFO_WIN 0x80
1488 /* Get info about a console (input only) */
1489 @REQ(get_console_input_info)
1490 obj_handle_t handle; /* handle to console input, or 0 for process' console */
1491 @REPLY
1492 int history_mode; /* whether we duplicate lines in history */
1493 int history_size; /* number of lines in history */
1494 int history_index; /* number of used lines in history */
1495 int edition_mode; /* index to the edition mode flavors */
1496 int input_cp; /* console input codepage */
1497 int output_cp; /* console output codepage */
1498 user_handle_t win; /* console window if backend supports it */
1499 VARARG(title,unicode_str); /* console title */
1500 @END
1503 /* appends a string to console's history */
1504 @REQ(append_console_input_history)
1505 obj_handle_t handle; /* handle to console input, or 0 for process' console */
1506 VARARG(line,unicode_str); /* line to add */
1507 @END
1510 /* appends a string to console's history */
1511 @REQ(get_console_input_history)
1512 obj_handle_t handle; /* handle to console input, or 0 for process' console */
1513 int index; /* index to get line from */
1514 @REPLY
1515 int total; /* total length of line in Unicode chars */
1516 VARARG(line,unicode_str); /* line to add */
1517 @END
1520 /* creates a new screen buffer on process' console */
1521 @REQ(create_console_output)
1522 obj_handle_t handle_in; /* handle to console input, or 0 for process' console */
1523 unsigned int access; /* wanted access rights */
1524 unsigned int attributes; /* object attributes */
1525 unsigned int share; /* sharing credentials */
1526 int fd; /* for bare consoles, fd the screen-buffer is attached to */
1527 @REPLY
1528 obj_handle_t handle_out; /* handle to the screen buffer */
1529 @END
1532 /* Set info about a console (output only) */
1533 @REQ(set_console_output_info)
1534 obj_handle_t handle; /* handle to the console */
1535 int mask; /* setting mask (see below) */
1536 short int cursor_size; /* size of cursor (percentage filled) */
1537 short int cursor_visible;/* cursor visibility flag */
1538 short int cursor_x; /* position of cursor (x, y) */
1539 short int cursor_y;
1540 short int width; /* width of the screen buffer */
1541 short int height; /* height of the screen buffer */
1542 short int attr; /* default fill attributes (screen colors) */
1543 short int popup_attr; /* pop-up color attributes */
1544 short int win_left; /* window actually displayed by renderer */
1545 short int win_top; /* the rect area is expressed within the */
1546 short int win_right; /* boundaries of the screen buffer */
1547 short int win_bottom;
1548 short int max_width; /* maximum size (width x height) for the window */
1549 short int max_height;
1550 short int font_width; /* font size (width x height) */
1551 short int font_height;
1552 VARARG(colors,uints); /* color table */
1553 @END
1554 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_GEOM 0x0001
1555 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_POS 0x0002
1556 #define SET_CONSOLE_OUTPUT_INFO_SIZE 0x0004
1557 #define SET_CONSOLE_OUTPUT_INFO_ATTR 0x0008
1558 #define SET_CONSOLE_OUTPUT_INFO_DISPLAY_WINDOW 0x0010
1559 #define SET_CONSOLE_OUTPUT_INFO_MAX_SIZE 0x0020
1560 #define SET_CONSOLE_OUTPUT_INFO_FONT 0x0040
1561 #define SET_CONSOLE_OUTPUT_INFO_COLORTABLE 0x0080
1562 #define SET_CONSOLE_OUTPUT_INFO_POPUP_ATTR 0x0100
1565 /* Get info about a console (output only) */
1566 @REQ(get_console_output_info)
1567 obj_handle_t handle; /* handle to the console */
1568 @REPLY
1569 short int cursor_size; /* size of cursor (percentage filled) */
1570 short int cursor_visible;/* cursor visibility flag */
1571 short int cursor_x; /* position of cursor (x, y) */
1572 short int cursor_y;
1573 short int width; /* width of the screen buffer */
1574 short int height; /* height of the screen buffer */
1575 short int attr; /* default fill attributes (screen colors) */
1576 short int popup_attr; /* pop-up color attributes */
1577 short int win_left; /* window actually displayed by renderer */
1578 short int win_top; /* the rect area is expressed within the */
1579 short int win_right; /* boundaries of the screen buffer */
1580 short int win_bottom;
1581 short int max_width; /* maximum size (width x height) for the window */
1582 short int max_height;
1583 short int font_width; /* font size (width x height) */
1584 short int font_height;
1585 VARARG(colors,uints); /* color table */
1586 @END
1588 /* Add input records to a console input queue */
1589 @REQ(write_console_input)
1590 obj_handle_t handle; /* handle to the console input */
1591 VARARG(rec,input_records); /* input records */
1592 @REPLY
1593 int written; /* number of records written */
1594 @END
1597 /* Fetch input records from a console input queue */
1598 @REQ(read_console_input)
1599 obj_handle_t handle; /* handle to the console input */
1600 int flush; /* flush the retrieved records from the queue? */
1601 @REPLY
1602 int read; /* number of records read */
1603 VARARG(rec,input_records); /* input records */
1604 @END
1607 /* write data (chars and/or attributes) in a screen buffer */
1608 @REQ(write_console_output)
1609 obj_handle_t handle; /* handle to the console output */
1610 int x; /* position where to start writing */
1611 int y;
1612 int mode; /* char info (see below) */
1613 int wrap; /* wrap around at end of line? */
1614 VARARG(data,bytes); /* info to write */
1615 @REPLY
1616 int written; /* number of char infos actually written */
1617 int width; /* width of screen buffer */
1618 int height; /* height of screen buffer */
1619 @END
1620 enum char_info_mode
1622 CHAR_INFO_MODE_TEXT, /* characters only */
1623 CHAR_INFO_MODE_ATTR, /* attributes only */
1624 CHAR_INFO_MODE_TEXTATTR, /* both characters and attributes */
1625 CHAR_INFO_MODE_TEXTSTDATTR /* characters but use standard attributes */
1629 /* fill a screen buffer with constant data (chars and/or attributes) */
1630 @REQ(fill_console_output)
1631 obj_handle_t handle; /* handle to the console output */
1632 int x; /* position where to start writing */
1633 int y;
1634 int mode; /* char info mode */
1635 int count; /* number to write */
1636 int wrap; /* wrap around at end of line? */
1637 char_info_t data; /* data to write */
1638 @REPLY
1639 int written; /* number of char infos actually written */
1640 @END
1643 /* read data (chars and/or attributes) from a screen buffer */
1644 @REQ(read_console_output)
1645 obj_handle_t handle; /* handle to the console output */
1646 int x; /* position (x,y) where to start reading */
1647 int y;
1648 int mode; /* char info mode */
1649 int wrap; /* wrap around at end of line? */
1650 @REPLY
1651 int width; /* width of screen buffer */
1652 int height; /* height of screen buffer */
1653 VARARG(data,bytes);
1654 @END
1657 /* move a rect (of data) in screen buffer content */
1658 @REQ(move_console_output)
1659 obj_handle_t handle; /* handle to the console output */
1660 short int x_src; /* position (x, y) of rect to start moving from */
1661 short int y_src;
1662 short int x_dst; /* position (x, y) of rect to move to */
1663 short int y_dst;
1664 short int w; /* size of the rect (width, height) to move */
1665 short int h;
1666 @END
1669 /* Sends a signal to a process group */
1670 @REQ(send_console_signal)
1671 int signal; /* the signal to send */
1672 process_id_t group_id; /* the group to send the signal to */
1673 @END
1676 /* enable directory change notifications */
1677 @REQ(read_directory_changes)
1678 unsigned int filter; /* notification filter */
1679 int subtree; /* watch the subtree? */
1680 int want_data; /* flag indicating whether change data should be collected */
1681 async_data_t async; /* async I/O parameters */
1682 @END
1685 @REQ(read_change)
1686 obj_handle_t handle;
1687 @REPLY
1688 VARARG(events,filesystem_event); /* collected filesystem events */
1689 @END
1692 /* Create a file mapping */
1693 @REQ(create_mapping)
1694 unsigned int access; /* wanted access rights */
1695 unsigned int flags; /* SEC_* flags */
1696 unsigned int file_access; /* file access rights */
1697 mem_size_t size; /* mapping size */
1698 obj_handle_t file_handle; /* file handle */
1699 VARARG(objattr,object_attributes); /* object attributes */
1700 @REPLY
1701 obj_handle_t handle; /* handle to the mapping */
1702 @END
1705 /* Open a mapping */
1706 @REQ(open_mapping)
1707 unsigned int access; /* wanted access rights */
1708 unsigned int attributes; /* object attributes */
1709 obj_handle_t rootdir; /* root directory */
1710 VARARG(name,unicode_str); /* object name */
1711 @REPLY
1712 obj_handle_t handle; /* handle to the mapping */
1713 @END
1716 /* Get information about a file mapping */
1717 @REQ(get_mapping_info)
1718 obj_handle_t handle; /* handle to the mapping */
1719 unsigned int access; /* wanted access rights */
1720 @REPLY
1721 mem_size_t size; /* mapping size */
1722 unsigned int flags; /* SEC_* flags */
1723 obj_handle_t mapping; /* duplicate mapping handle unless removable */
1724 obj_handle_t shared_file; /* shared mapping file handle */
1725 VARARG(image,pe_image_info);/* image info for SEC_IMAGE mappings */
1726 @END
1729 /* Add a memory view in the current process */
1730 @REQ(map_view)
1731 obj_handle_t mapping; /* file mapping handle */
1732 unsigned int access; /* wanted access rights */
1733 client_ptr_t base; /* view base address (page-aligned) */
1734 mem_size_t size; /* view size */
1735 file_pos_t start; /* start offset in mapping */
1736 @END
1739 /* Unmap a memory view from the current process */
1740 @REQ(unmap_view)
1741 client_ptr_t base; /* view base address */
1742 @END
1745 /* Get a range of committed pages in a file mapping */
1746 @REQ(get_mapping_committed_range)
1747 client_ptr_t base; /* view base address */
1748 file_pos_t offset; /* starting offset (page-aligned, in bytes) */
1749 @REPLY
1750 mem_size_t size; /* size of range starting at offset (page-aligned, in bytes) */
1751 int committed; /* whether it is a committed range */
1752 @END
1755 /* Add a range to the committed pages in a file mapping */
1756 @REQ(add_mapping_committed_range)
1757 client_ptr_t base; /* view base address */
1758 file_pos_t offset; /* starting offset (page-aligned, in bytes) */
1759 mem_size_t size; /* size to set (page-aligned, in bytes) or 0 if only retrieving */
1760 @END
1763 /* Check if two memory maps are for the same file */
1764 @REQ(is_same_mapping)
1765 client_ptr_t base1; /* first view base address */
1766 client_ptr_t base2; /* second view base address */
1767 @END
1770 #define SNAP_PROCESS 0x00000001
1771 #define SNAP_THREAD 0x00000002
1772 /* Create a snapshot */
1773 @REQ(create_snapshot)
1774 unsigned int attributes; /* object attributes */
1775 unsigned int flags; /* snapshot flags (SNAP_*) */
1776 @REPLY
1777 obj_handle_t handle; /* handle to the snapshot */
1778 @END
1781 /* Get the next process from a snapshot */
1782 @REQ(next_process)
1783 obj_handle_t handle; /* handle to the snapshot */
1784 int reset; /* reset snapshot position? */
1785 @REPLY
1786 int count; /* process usage count */
1787 process_id_t pid; /* process id */
1788 process_id_t ppid; /* parent process id */
1789 int threads; /* number of threads */
1790 int priority; /* process priority */
1791 int handles; /* number of handles */
1792 int unix_pid; /* Unix pid */
1793 VARARG(filename,unicode_str); /* file name of main exe */
1794 @END
1797 /* Get the next thread from a snapshot */
1798 @REQ(next_thread)
1799 obj_handle_t handle; /* handle to the snapshot */
1800 int reset; /* reset snapshot position? */
1801 @REPLY
1802 int count; /* thread usage count */
1803 process_id_t pid; /* process id */
1804 thread_id_t tid; /* thread id */
1805 int base_pri; /* base priority */
1806 int delta_pri; /* delta priority */
1807 @END
1810 /* Wait for a debug event */
1811 @REQ(wait_debug_event)
1812 int get_handle; /* should we alloc a handle for waiting? */
1813 @REPLY
1814 process_id_t pid; /* process id */
1815 thread_id_t tid; /* thread id */
1816 obj_handle_t wait; /* wait handle if no event ready */
1817 VARARG(event,debug_event); /* debug event data */
1818 @END
1821 /* Queue an exception event */
1822 @REQ(queue_exception_event)
1823 int first; /* first chance exception? */
1824 unsigned int code; /* exception code */
1825 unsigned int flags; /* exception flags */
1826 client_ptr_t record; /* exception record */
1827 client_ptr_t address; /* exception address */
1828 data_size_t len; /* size of parameters */
1829 VARARG(params,uints64,len);/* exception parameters */
1830 VARARG(context,context); /* thread context */
1831 @REPLY
1832 obj_handle_t handle; /* handle to the queued event */
1833 @END
1836 /* Retrieve the status of an exception event */
1837 @REQ(get_exception_status)
1838 obj_handle_t handle; /* handle to the queued event */
1839 @REPLY
1840 VARARG(context,context); /* modified thread context */
1841 @END
1844 /* Continue a debug event */
1845 @REQ(continue_debug_event)
1846 process_id_t pid; /* process id to continue */
1847 thread_id_t tid; /* thread id to continue */
1848 int status; /* continuation status */
1849 @END
1852 /* Start/stop debugging an existing process */
1853 @REQ(debug_process)
1854 process_id_t pid; /* id of the process to debug */
1855 int attach; /* 1=attaching / 0=detaching from the process */
1856 @END
1859 /* Simulate a breakpoint in a process */
1860 @REQ(debug_break)
1861 obj_handle_t handle; /* process handle */
1862 @REPLY
1863 int self; /* was it the caller itself? */
1864 @END
1867 /* Set debugger kill on exit flag */
1868 @REQ(set_debugger_kill_on_exit)
1869 int kill_on_exit; /* 0=detach/1=kill debuggee when debugger dies */
1870 @END
1873 /* Read data from a process address space */
1874 @REQ(read_process_memory)
1875 obj_handle_t handle; /* process handle */
1876 client_ptr_t addr; /* addr to read from */
1877 @REPLY
1878 VARARG(data,bytes); /* result data */
1879 @END
1882 /* Write data to a process address space */
1883 @REQ(write_process_memory)
1884 obj_handle_t handle; /* process handle */
1885 client_ptr_t addr; /* addr to write to */
1886 VARARG(data,bytes); /* data to write */
1887 @END
1890 /* Create a registry key */
1891 @REQ(create_key)
1892 unsigned int access; /* desired access rights */
1893 unsigned int options; /* creation options */
1894 VARARG(objattr,object_attributes); /* object attributes */
1895 VARARG(class,unicode_str); /* class name */
1896 @REPLY
1897 obj_handle_t hkey; /* handle to the created key */
1898 int created; /* has it been newly created? */
1899 @END
1901 /* Open a registry key */
1902 @REQ(open_key)
1903 obj_handle_t parent; /* handle to the parent key */
1904 unsigned int access; /* desired access rights */
1905 unsigned int attributes; /* object attributes */
1906 VARARG(name,unicode_str); /* key name */
1907 @REPLY
1908 obj_handle_t hkey; /* handle to the open key */
1909 @END
1912 /* Delete a registry key */
1913 @REQ(delete_key)
1914 obj_handle_t hkey; /* handle to the key */
1915 @END
1918 /* Flush a registry key */
1919 @REQ(flush_key)
1920 obj_handle_t hkey; /* handle to the key */
1921 @END
1924 /* Enumerate registry subkeys */
1925 @REQ(enum_key)
1926 obj_handle_t hkey; /* handle to registry key */
1927 int index; /* index of subkey (or -1 for current key) */
1928 int info_class; /* requested information class */
1929 @REPLY
1930 int subkeys; /* number of subkeys */
1931 int max_subkey; /* longest subkey name */
1932 int max_class; /* longest class name */
1933 int values; /* number of values */
1934 int max_value; /* longest value name */
1935 int max_data; /* longest value data */
1936 timeout_t modif; /* last modification time */
1937 data_size_t total; /* total length needed for full name and class */
1938 data_size_t namelen; /* length of key name in bytes */
1939 VARARG(name,unicode_str,namelen); /* key name */
1940 VARARG(class,unicode_str); /* class name */
1941 @END
1944 /* Set a value of a registry key */
1945 @REQ(set_key_value)
1946 obj_handle_t hkey; /* handle to registry key */
1947 int type; /* value type */
1948 data_size_t namelen; /* length of value name in bytes */
1949 VARARG(name,unicode_str,namelen); /* value name */
1950 VARARG(data,bytes); /* value data */
1951 @END
1954 /* Retrieve the value of a registry key */
1955 @REQ(get_key_value)
1956 obj_handle_t hkey; /* handle to registry key */
1957 VARARG(name,unicode_str); /* value name */
1958 @REPLY
1959 int type; /* value type */
1960 data_size_t total; /* total length needed for data */
1961 VARARG(data,bytes); /* value data */
1962 @END
1965 /* Enumerate a value of a registry key */
1966 @REQ(enum_key_value)
1967 obj_handle_t hkey; /* handle to registry key */
1968 int index; /* value index */
1969 int info_class; /* requested information class */
1970 @REPLY
1971 int type; /* value type */
1972 data_size_t total; /* total length needed for full name and data */
1973 data_size_t namelen; /* length of value name in bytes */
1974 VARARG(name,unicode_str,namelen); /* value name */
1975 VARARG(data,bytes); /* value data */
1976 @END
1979 /* Delete a value of a registry key */
1980 @REQ(delete_key_value)
1981 obj_handle_t hkey; /* handle to registry key */
1982 VARARG(name,unicode_str); /* value name */
1983 @END
1986 /* Load a registry branch from a file */
1987 @REQ(load_registry)
1988 obj_handle_t file; /* file to load from */
1989 VARARG(objattr,object_attributes); /* object attributes */
1990 @END
1993 /* UnLoad a registry branch from a file */
1994 @REQ(unload_registry)
1995 obj_handle_t hkey; /* root key to unload to */
1996 @END
1999 /* Save a registry branch to a file */
2000 @REQ(save_registry)
2001 obj_handle_t hkey; /* key to save */
2002 obj_handle_t file; /* file to save to */
2003 @END
2006 /* Add a registry key change notification */
2007 @REQ(set_registry_notification)
2008 obj_handle_t hkey; /* key to watch for changes */
2009 obj_handle_t event; /* event to set */
2010 int subtree; /* should we watch the whole subtree? */
2011 unsigned int filter; /* things to watch */
2012 @END
2015 /* Create a waitable timer */
2016 @REQ(create_timer)
2017 unsigned int access; /* wanted access rights */
2018 int manual; /* manual reset */
2019 VARARG(objattr,object_attributes); /* object attributes */
2020 @REPLY
2021 obj_handle_t handle; /* handle to the timer */
2022 @END
2025 /* Open a waitable timer */
2026 @REQ(open_timer)
2027 unsigned int access; /* wanted access rights */
2028 unsigned int attributes; /* object attributes */
2029 obj_handle_t rootdir; /* root directory */
2030 VARARG(name,unicode_str); /* object name */
2031 @REPLY
2032 obj_handle_t handle; /* handle to the timer */
2033 @END
2035 /* Set a waitable timer */
2036 @REQ(set_timer)
2037 obj_handle_t handle; /* handle to the timer */
2038 timeout_t expire; /* next expiration absolute time */
2039 client_ptr_t callback; /* callback function */
2040 client_ptr_t arg; /* callback argument */
2041 int period; /* timer period in ms */
2042 @REPLY
2043 int signaled; /* was the timer signaled before this call ? */
2044 @END
2046 /* Cancel a waitable timer */
2047 @REQ(cancel_timer)
2048 obj_handle_t handle; /* handle to the timer */
2049 @REPLY
2050 int signaled; /* was the timer signaled before this calltime ? */
2051 @END
2053 /* Get information on a waitable timer */
2054 @REQ(get_timer_info)
2055 obj_handle_t handle; /* handle to the timer */
2056 @REPLY
2057 timeout_t when; /* absolute time when the timer next expires */
2058 int signaled; /* is the timer signaled? */
2059 @END
2062 /* Retrieve the current context of a thread */
2063 @REQ(get_thread_context)
2064 obj_handle_t handle; /* thread handle */
2065 unsigned int flags; /* context flags */
2066 int suspend; /* suspend the thread if needed */
2067 @REPLY
2068 int self; /* was it a handle to the current thread? */
2069 VARARG(context,context); /* thread context */
2070 @END
2073 /* Set the current context of a thread */
2074 @REQ(set_thread_context)
2075 obj_handle_t handle; /* thread handle */
2076 int suspend; /* suspend the thread if needed */
2077 VARARG(context,context); /* thread context */
2078 @REPLY
2079 int self; /* was it a handle to the current thread? */
2080 @END
2083 /* Fetch a selector entry for a thread */
2084 @REQ(get_selector_entry)
2085 obj_handle_t handle; /* thread handle */
2086 int entry; /* LDT entry */
2087 @REPLY
2088 unsigned int base; /* selector base */
2089 unsigned int limit; /* selector limit */
2090 unsigned char flags; /* selector flags */
2091 @END
2094 /* Add an atom */
2095 @REQ(add_atom)
2096 obj_handle_t table; /* which table to add atom to */
2097 VARARG(name,unicode_str); /* atom name */
2098 @REPLY
2099 atom_t atom; /* resulting atom */
2100 @END
2103 /* Delete an atom */
2104 @REQ(delete_atom)
2105 obj_handle_t table; /* which table to delete atom from */
2106 atom_t atom; /* atom handle */
2107 @END
2110 /* Find an atom */
2111 @REQ(find_atom)
2112 obj_handle_t table; /* which table to find atom from */
2113 VARARG(name,unicode_str); /* atom name */
2114 @REPLY
2115 atom_t atom; /* atom handle */
2116 @END
2119 /* Get information about an atom */
2120 @REQ(get_atom_information)
2121 obj_handle_t table; /* which table to find atom from */
2122 atom_t atom; /* atom handle */
2123 @REPLY
2124 int count; /* atom lock count */
2125 int pinned; /* whether the atom has been pinned */
2126 data_size_t total; /* actual length of atom name */
2127 VARARG(name,unicode_str); /* atom name */
2128 @END
2131 /* Set information about an atom */
2132 @REQ(set_atom_information)
2133 obj_handle_t table; /* which table to find atom from */
2134 atom_t atom; /* atom handle */
2135 int pinned; /* whether to bump atom information */
2136 @END
2139 /* Empty an atom table */
2140 @REQ(empty_atom_table)
2141 obj_handle_t table; /* which table to find atom from */
2142 int if_pinned; /* whether to delete pinned atoms */
2143 @END
2146 /* Init an atom table */
2147 @REQ(init_atom_table)
2148 int entries; /* number of entries (only for local) */
2149 @REPLY
2150 obj_handle_t table; /* handle to the atom table */
2151 @END
2154 /* Get the message queue of the current thread */
2155 @REQ(get_msg_queue)
2156 @REPLY
2157 obj_handle_t handle; /* handle to the queue */
2158 @END
2161 /* Set the file descriptor associated to the current thread queue */
2162 @REQ(set_queue_fd)
2163 obj_handle_t handle; /* handle to the file descriptor */
2164 @END
2167 /* Set the current message queue wakeup mask */
2168 @REQ(set_queue_mask)
2169 unsigned int wake_mask; /* wakeup bits mask */
2170 unsigned int changed_mask; /* changed bits mask */
2171 int skip_wait; /* will we skip waiting if signaled? */
2172 @REPLY
2173 unsigned int wake_bits; /* current wake bits */
2174 unsigned int changed_bits; /* current changed bits */
2175 @END
2178 /* Get the current message queue status */
2179 @REQ(get_queue_status)
2180 unsigned int clear_bits; /* should we clear the change bits? */
2181 @REPLY
2182 unsigned int wake_bits; /* wake bits */
2183 unsigned int changed_bits; /* changed bits since last time */
2184 @END
2187 /* Retrieve the process idle event */
2188 @REQ(get_process_idle_event)
2189 obj_handle_t handle; /* process handle */
2190 @REPLY
2191 obj_handle_t event; /* handle to idle event */
2192 @END
2195 /* Send a message to a thread queue */
2196 @REQ(send_message)
2197 thread_id_t id; /* thread id */
2198 int type; /* message type (see below) */
2199 int flags; /* message flags (see below) */
2200 user_handle_t win; /* window handle */
2201 unsigned int msg; /* message code */
2202 lparam_t wparam; /* parameters */
2203 lparam_t lparam; /* parameters */
2204 timeout_t timeout; /* timeout for reply */
2205 VARARG(data,message_data); /* message data for sent messages */
2206 @END
2208 @REQ(post_quit_message)
2209 int exit_code; /* exit code to return */
2210 @END
2212 enum message_type
2214 MSG_ASCII, /* Ascii message (from SendMessageA) */
2215 MSG_UNICODE, /* Unicode message (from SendMessageW) */
2216 MSG_NOTIFY, /* notify message (from SendNotifyMessageW), always Unicode */
2217 MSG_CALLBACK, /* callback message (from SendMessageCallbackW), always Unicode */
2218 MSG_CALLBACK_RESULT,/* result of a callback message */
2219 MSG_OTHER_PROCESS, /* sent from other process, may include vararg data, always Unicode */
2220 MSG_POSTED, /* posted message (from PostMessageW), always Unicode */
2221 MSG_HARDWARE, /* hardware message */
2222 MSG_WINEVENT, /* winevent message */
2223 MSG_HOOK_LL /* low-level hardware hook */
2225 #define SEND_MSG_ABORT_IF_HUNG 0x01
2228 /* Send a hardware message to a thread queue */
2229 @REQ(send_hardware_message)
2230 user_handle_t win; /* window handle */
2231 hw_input_t input; /* input data */
2232 unsigned int flags; /* flags (see below) */
2233 @REPLY
2234 int wait; /* do we need to wait for a reply? */
2235 int prev_x; /* previous cursor position */
2236 int prev_y;
2237 int new_x; /* new cursor position */
2238 int new_y;
2239 VARARG(keystate,bytes); /* global state array for all the keys */
2240 @END
2241 #define SEND_HWMSG_INJECTED 0x01
2244 /* Get a message from the current queue */
2245 @REQ(get_message)
2246 unsigned int flags; /* PM_* flags */
2247 user_handle_t get_win; /* window handle to get */
2248 unsigned int get_first; /* first message code to get */
2249 unsigned int get_last; /* last message code to get */
2250 unsigned int hw_id; /* id of the previous hardware message (or 0) */
2251 unsigned int wake_mask; /* wakeup bits mask */
2252 unsigned int changed_mask; /* changed bits mask */
2253 @REPLY
2254 user_handle_t win; /* window handle */
2255 unsigned int msg; /* message code */
2256 lparam_t wparam; /* parameters */
2257 lparam_t lparam; /* parameters */
2258 int type; /* message type */
2259 int x; /* message x position */
2260 int y; /* message y position */
2261 unsigned int time; /* message time */
2262 unsigned int active_hooks; /* active hooks bitmap */
2263 data_size_t total; /* total size of extra data */
2264 VARARG(data,message_data); /* message data for sent messages */
2265 @END
2268 /* Reply to a sent message */
2269 @REQ(reply_message)
2270 int remove; /* should we remove the message? */
2271 lparam_t result; /* message result */
2272 VARARG(data,bytes); /* message data for sent messages */
2273 @END
2276 /* Accept the current hardware message */
2277 @REQ(accept_hardware_message)
2278 unsigned int hw_id; /* id of the hardware message */
2279 int remove; /* should we remove the message? */
2280 @END
2283 /* Retrieve the reply for the last message sent */
2284 @REQ(get_message_reply)
2285 int cancel; /* cancel message if not ready? */
2286 @REPLY
2287 lparam_t result; /* message result */
2288 VARARG(data,bytes); /* message data for sent messages */
2289 @END
2292 /* Set a window timer */
2293 @REQ(set_win_timer)
2294 user_handle_t win; /* window handle */
2295 unsigned int msg; /* message to post */
2296 unsigned int rate; /* timer rate in ms */
2297 lparam_t id; /* timer id */
2298 lparam_t lparam; /* message lparam (callback proc) */
2299 @REPLY
2300 lparam_t id; /* timer id */
2301 @END
2304 /* Kill a window timer */
2305 @REQ(kill_win_timer)
2306 user_handle_t win; /* window handle */
2307 lparam_t id; /* timer id */
2308 unsigned int msg; /* message to post */
2309 @END
2312 /* check if the thread owning the window is hung */
2313 @REQ(is_window_hung)
2314 user_handle_t win; /* window handle */
2315 @REPLY
2316 int is_hung;
2317 @END
2320 /* Retrieve info about a serial port */
2321 @REQ(get_serial_info)
2322 obj_handle_t handle; /* handle to comm port */
2323 int flags;
2324 @REPLY
2325 unsigned int eventmask;
2326 unsigned int cookie;
2327 unsigned int pending_write;
2328 @END
2331 /* Set info about a serial port */
2332 @REQ(set_serial_info)
2333 obj_handle_t handle; /* handle to comm port */
2334 int flags; /* bitmask to set values (see below) */
2335 @END
2336 #define SERIALINFO_PENDING_WRITE 0x04
2337 #define SERIALINFO_PENDING_WAIT 0x08
2340 /* Create an async I/O */
2341 @REQ(register_async)
2342 int type; /* type of queue to look after */
2343 async_data_t async; /* async I/O parameters */
2344 int count; /* count - usually # of bytes to be read/written */
2345 @END
2346 #define ASYNC_TYPE_READ 0x01
2347 #define ASYNC_TYPE_WRITE 0x02
2348 #define ASYNC_TYPE_WAIT 0x03
2351 /* Cancel all async op on a fd */
2352 @REQ(cancel_async)
2353 obj_handle_t handle; /* handle to comm port, socket or file */
2354 client_ptr_t iosb; /* I/O status block (NULL=all) */
2355 int only_thread; /* cancel matching this thread */
2356 @END
2359 /* Retrieve results of an async */
2360 @REQ(get_async_result)
2361 client_ptr_t user_arg; /* user arg used to identify async */
2362 @REPLY
2363 data_size_t size; /* result size (input or output depending on the operation) */
2364 VARARG(out_data,bytes); /* iosb output data */
2365 @END
2368 /* Perform a read on a file object */
2369 @REQ(read)
2370 async_data_t async; /* async I/O parameters */
2371 file_pos_t pos; /* read position */
2372 @REPLY
2373 obj_handle_t wait; /* handle to wait on for blocking read */
2374 unsigned int options; /* device open options */
2375 VARARG(data,bytes); /* read data */
2376 @END
2379 /* Perform a write on a file object */
2380 @REQ(write)
2381 async_data_t async; /* async I/O parameters */
2382 file_pos_t pos; /* write position */
2383 VARARG(data,bytes); /* write data */
2384 @REPLY
2385 obj_handle_t wait; /* handle to wait on for blocking write */
2386 unsigned int options; /* device open options */
2387 data_size_t size; /* size written */
2388 @END
2391 /* Perform an ioctl on a file */
2392 @REQ(ioctl)
2393 ioctl_code_t code; /* ioctl code */
2394 async_data_t async; /* async I/O parameters */
2395 VARARG(in_data,bytes); /* ioctl input data */
2396 @REPLY
2397 obj_handle_t wait; /* handle to wait on for blocking ioctl */
2398 unsigned int options; /* device open options */
2399 VARARG(out_data,bytes); /* ioctl output data */
2400 @END
2403 /* Store results of an async irp */
2404 @REQ(set_irp_result)
2405 obj_handle_t handle; /* handle to the irp */
2406 unsigned int status; /* status of the irp */
2407 data_size_t size; /* result size (input or output depending on the operation) */
2408 client_ptr_t file_ptr; /* opaque pointer to the file object */
2409 VARARG(data,bytes); /* output data of the irp */
2410 @END
2413 /* Create a named pipe */
2414 @REQ(create_named_pipe)
2415 unsigned int access;
2416 unsigned int options;
2417 unsigned int sharing;
2418 unsigned int maxinstances;
2419 unsigned int outsize;
2420 unsigned int insize;
2421 timeout_t timeout;
2422 unsigned int flags;
2423 VARARG(objattr,object_attributes); /* object attributes */
2424 @REPLY
2425 obj_handle_t handle; /* handle to the pipe */
2426 @END
2428 /* flags in create_named_pipe and get_named_pipe_info */
2429 #define NAMED_PIPE_MESSAGE_STREAM_WRITE 0x0001
2430 #define NAMED_PIPE_MESSAGE_STREAM_READ 0x0002
2431 #define NAMED_PIPE_NONBLOCKING_MODE 0x0004
2432 #define NAMED_PIPE_SERVER_END 0x8000
2434 /* Get named pipe information by handle */
2435 @REQ(get_named_pipe_info)
2436 obj_handle_t handle;
2437 @REPLY
2438 unsigned int flags;
2439 unsigned int sharing;
2440 unsigned int maxinstances;
2441 unsigned int instances;
2442 unsigned int outsize;
2443 unsigned int insize;
2444 @END
2446 /* Set named pipe information by handle */
2447 @REQ(set_named_pipe_info)
2448 obj_handle_t handle;
2449 unsigned int flags;
2450 @END
2452 /* Create a window */
2453 @REQ(create_window)
2454 user_handle_t parent; /* parent window */
2455 user_handle_t owner; /* owner window */
2456 atom_t atom; /* class atom */
2457 mod_handle_t instance; /* module instance */
2458 VARARG(class,unicode_str); /* class name */
2459 @REPLY
2460 user_handle_t handle; /* created window */
2461 user_handle_t parent; /* full handle of parent */
2462 user_handle_t owner; /* full handle of owner */
2463 int extra; /* number of extra bytes */
2464 client_ptr_t class_ptr; /* pointer to class in client address space */
2465 @END
2468 /* Destroy a window */
2469 @REQ(destroy_window)
2470 user_handle_t handle; /* handle to the window */
2471 @END
2474 /* Retrieve the desktop window for the current thread */
2475 @REQ(get_desktop_window)
2476 int force; /* force creation if it doesn't exist */
2477 @REPLY
2478 user_handle_t top_window; /* handle to the desktop window */
2479 user_handle_t msg_window; /* handle to the top-level HWND_MESSAGE parent */
2480 @END
2483 /* Set a window owner */
2484 @REQ(set_window_owner)
2485 user_handle_t handle; /* handle to the window */
2486 user_handle_t owner; /* new owner */
2487 @REPLY
2488 user_handle_t full_owner; /* full handle of new owner */
2489 user_handle_t prev_owner; /* full handle of previous owner */
2490 @END
2493 /* Get information from a window handle */
2494 @REQ(get_window_info)
2495 user_handle_t handle; /* handle to the window */
2496 @REPLY
2497 user_handle_t full_handle; /* full 32-bit handle */
2498 user_handle_t last_active; /* last active popup */
2499 process_id_t pid; /* process owning the window */
2500 thread_id_t tid; /* thread owning the window */
2501 atom_t atom; /* class atom */
2502 int is_unicode; /* ANSI or unicode */
2503 @END
2506 /* Set some information in a window */
2507 @REQ(set_window_info)
2508 unsigned short flags; /* flags for fields to set (see below) */
2509 short int is_unicode; /* ANSI or unicode */
2510 user_handle_t handle; /* handle to the window */
2511 unsigned int style; /* window style */
2512 unsigned int ex_style; /* window extended style */
2513 unsigned int id; /* window id */
2514 mod_handle_t instance; /* creator instance */
2515 lparam_t user_data; /* user-specific data */
2516 int extra_offset; /* offset to set in extra bytes */
2517 data_size_t extra_size; /* size to set in extra bytes */
2518 lparam_t extra_value; /* value to set in extra bytes */
2519 @REPLY
2520 unsigned int old_style; /* old window style */
2521 unsigned int old_ex_style; /* old window extended style */
2522 mod_handle_t old_instance; /* old creator instance */
2523 lparam_t old_user_data; /* old user-specific data */
2524 lparam_t old_extra_value; /* old value in extra bytes */
2525 unsigned int old_id; /* old window id */
2526 @END
2527 #define SET_WIN_STYLE 0x01
2528 #define SET_WIN_EXSTYLE 0x02
2529 #define SET_WIN_ID 0x04
2530 #define SET_WIN_INSTANCE 0x08
2531 #define SET_WIN_USERDATA 0x10
2532 #define SET_WIN_EXTRA 0x20
2533 #define SET_WIN_UNICODE 0x40
2536 /* Set the parent of a window */
2537 @REQ(set_parent)
2538 user_handle_t handle; /* handle to the window */
2539 user_handle_t parent; /* handle to the parent */
2540 @REPLY
2541 user_handle_t old_parent; /* old parent window */
2542 user_handle_t full_parent; /* full handle of new parent */
2543 @END
2546 /* Get a list of the window parents, up to the root of the tree */
2547 @REQ(get_window_parents)
2548 user_handle_t handle; /* handle to the window */
2549 @REPLY
2550 int count; /* total count of parents */
2551 VARARG(parents,user_handles); /* parent handles */
2552 @END
2555 /* Get a list of the window children */
2556 @REQ(get_window_children)
2557 obj_handle_t desktop; /* handle to desktop */
2558 user_handle_t parent; /* parent window */
2559 atom_t atom; /* class atom for the listed children */
2560 thread_id_t tid; /* thread owning the listed children */
2561 VARARG(class,unicode_str); /* class name */
2562 @REPLY
2563 int count; /* total count of children */
2564 VARARG(children,user_handles); /* children handles */
2565 @END
2568 /* Get a list of the window children that contain a given point */
2569 @REQ(get_window_children_from_point)
2570 user_handle_t parent; /* parent window */
2571 int x; /* point in parent coordinates */
2572 int y;
2573 @REPLY
2574 int count; /* total count of children */
2575 VARARG(children,user_handles); /* children handles */
2576 @END
2579 /* Get window tree information from a window handle */
2580 @REQ(get_window_tree)
2581 user_handle_t handle; /* handle to the window */
2582 @REPLY
2583 user_handle_t parent; /* parent window */
2584 user_handle_t owner; /* owner window */
2585 user_handle_t next_sibling; /* next sibling in Z-order */
2586 user_handle_t prev_sibling; /* prev sibling in Z-order */
2587 user_handle_t first_sibling; /* first sibling in Z-order */
2588 user_handle_t last_sibling; /* last sibling in Z-order */
2589 user_handle_t first_child; /* first child */
2590 user_handle_t last_child; /* last child */
2591 @END
2593 /* Set the position and Z order of a window */
2594 @REQ(set_window_pos)
2595 unsigned short swp_flags; /* SWP_* flags */
2596 unsigned short paint_flags; /* paint flags (see below) */
2597 user_handle_t handle; /* handle to the window */
2598 user_handle_t previous; /* previous window in Z order */
2599 rectangle_t window; /* window rectangle (in parent coords) */
2600 rectangle_t client; /* client rectangle (in parent coords) */
2601 VARARG(valid,rectangles); /* valid rectangles from WM_NCCALCSIZE (in parent coords) */
2602 @REPLY
2603 unsigned int new_style; /* new window style */
2604 unsigned int new_ex_style; /* new window extended style */
2605 user_handle_t surface_win; /* parent window that holds the surface */
2606 int needs_update; /* whether the surface region needs an update */
2607 @END
2608 #define SET_WINPOS_PAINT_SURFACE 0x01 /* window has a paintable surface */
2609 #define SET_WINPOS_PIXEL_FORMAT 0x02 /* window has a custom pixel format */
2611 /* Get the window and client rectangles of a window */
2612 @REQ(get_window_rectangles)
2613 user_handle_t handle; /* handle to the window */
2614 int relative; /* coords relative to (see below) */
2615 @REPLY
2616 rectangle_t window; /* window rectangle */
2617 rectangle_t visible; /* visible part of the window rectangle */
2618 rectangle_t client; /* client rectangle */
2619 @END
2620 enum coords_relative
2622 COORDS_CLIENT, /* relative to client area */
2623 COORDS_WINDOW, /* relative to whole window area */
2624 COORDS_PARENT, /* relative to parent's client area */
2625 COORDS_SCREEN /* relative to screen origin */
2629 /* Get the window text */
2630 @REQ(get_window_text)
2631 user_handle_t handle; /* handle to the window */
2632 @REPLY
2633 VARARG(text,unicode_str); /* window text */
2634 @END
2637 /* Set the window text */
2638 @REQ(set_window_text)
2639 user_handle_t handle; /* handle to the window */
2640 VARARG(text,unicode_str); /* window text */
2641 @END
2644 /* Get the coordinates offset between two windows */
2645 @REQ(get_windows_offset)
2646 user_handle_t from; /* handle to the first window */
2647 user_handle_t to; /* handle to the second window */
2648 @REPLY
2649 int x; /* x coordinate offset */
2650 int y; /* y coordinate offset */
2651 int mirror; /* whether to mirror the x coordinate */
2652 @END
2655 /* Get the visible region of a window */
2656 @REQ(get_visible_region)
2657 user_handle_t window; /* handle to the window */
2658 unsigned int flags; /* DCX flags */
2659 @REPLY
2660 user_handle_t top_win; /* top window to clip against */
2661 rectangle_t top_rect; /* top window visible rect with screen coords */
2662 rectangle_t win_rect; /* window rect in screen coords */
2663 unsigned int paint_flags; /* paint flags (from SET_WINPOS_* flags) */
2664 data_size_t total_size; /* total size of the resulting region */
2665 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2666 @END
2669 /* Get the visible surface region of a window */
2670 @REQ(get_surface_region)
2671 user_handle_t window; /* handle to the window */
2672 @REPLY
2673 rectangle_t visible_rect; /* window visible rect in screen coords */
2674 data_size_t total_size; /* total size of the resulting region */
2675 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2676 @END
2679 /* Get the window region */
2680 @REQ(get_window_region)
2681 user_handle_t window; /* handle to the window */
2682 @REPLY
2683 data_size_t total_size; /* total size of the resulting region */
2684 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2685 @END
2688 /* Set the window region */
2689 @REQ(set_window_region)
2690 user_handle_t window; /* handle to the window */
2691 int redraw; /* redraw the window? */
2692 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2693 @END
2696 /* Get the window update region */
2697 @REQ(get_update_region)
2698 user_handle_t window; /* handle to the window */
2699 user_handle_t from_child; /* child to start searching from */
2700 unsigned int flags; /* update flags (see below) */
2701 @REPLY
2702 user_handle_t child; /* child to repaint (or window itself) */
2703 unsigned int flags; /* resulting update flags (see below) */
2704 data_size_t total_size; /* total size of the resulting region */
2705 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2706 @END
2707 #define UPDATE_NONCLIENT 0x001 /* get region for repainting non-client area */
2708 #define UPDATE_ERASE 0x002 /* get region for erasing client area */
2709 #define UPDATE_PAINT 0x004 /* get region for painting client area */
2710 #define UPDATE_INTERNALPAINT 0x008 /* get region if internal paint is pending */
2711 #define UPDATE_ALLCHILDREN 0x010 /* force repaint of all children */
2712 #define UPDATE_NOCHILDREN 0x020 /* don't try to repaint any children */
2713 #define UPDATE_NOREGION 0x040 /* don't return a region, only the flags */
2714 #define UPDATE_DELAYED_ERASE 0x080 /* still needs erase after BeginPaint */
2715 #define UPDATE_CLIPCHILDREN 0x100 /* remove clipped children from the update region */
2718 /* Update the z order of a window so that a given rectangle is fully visible */
2719 @REQ(update_window_zorder)
2720 user_handle_t window; /* handle to the window */
2721 rectangle_t rect; /* rectangle that must be visible (in client coords) */
2722 @END
2725 /* Mark parts of a window as needing a redraw */
2726 @REQ(redraw_window)
2727 user_handle_t window; /* handle to the window */
2728 unsigned int flags; /* RDW_* flags */
2729 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2730 @END
2733 /* Set a window property */
2734 @REQ(set_window_property)
2735 user_handle_t window; /* handle to the window */
2736 lparam_t data; /* data to store */
2737 atom_t atom; /* property atom (if no name specified) */
2738 VARARG(name,unicode_str); /* property name */
2739 @END
2742 /* Remove a window property */
2743 @REQ(remove_window_property)
2744 user_handle_t window; /* handle to the window */
2745 atom_t atom; /* property atom (if no name specified) */
2746 VARARG(name,unicode_str); /* property name */
2747 @REPLY
2748 lparam_t data; /* data stored in property */
2749 @END
2752 /* Get a window property */
2753 @REQ(get_window_property)
2754 user_handle_t window; /* handle to the window */
2755 atom_t atom; /* property atom (if no name specified) */
2756 VARARG(name,unicode_str); /* property name */
2757 @REPLY
2758 lparam_t data; /* data stored in property */
2759 @END
2762 /* Get the list of properties of a window */
2763 @REQ(get_window_properties)
2764 user_handle_t window; /* handle to the window */
2765 @REPLY
2766 int total; /* total number of properties */
2767 VARARG(props,properties); /* list of properties */
2768 @END
2771 /* Create a window station */
2772 @REQ(create_winstation)
2773 unsigned int flags; /* window station flags */
2774 unsigned int access; /* wanted access rights */
2775 unsigned int attributes; /* object attributes */
2776 obj_handle_t rootdir; /* root directory */
2777 VARARG(name,unicode_str); /* object name */
2778 @REPLY
2779 obj_handle_t handle; /* handle to the window station */
2780 @END
2783 /* Open a handle to a window station */
2784 @REQ(open_winstation)
2785 unsigned int access; /* wanted access rights */
2786 unsigned int attributes; /* object attributes */
2787 obj_handle_t rootdir; /* root directory */
2788 VARARG(name,unicode_str); /* object name */
2789 @REPLY
2790 obj_handle_t handle; /* handle to the window station */
2791 @END
2794 /* Close a window station */
2795 @REQ(close_winstation)
2796 obj_handle_t handle; /* handle to the window station */
2797 @END
2800 /* Get the process current window station */
2801 @REQ(get_process_winstation)
2802 @REPLY
2803 obj_handle_t handle; /* handle to the window station */
2804 @END
2807 /* Set the process current window station */
2808 @REQ(set_process_winstation)
2809 obj_handle_t handle; /* handle to the window station */
2810 @END
2813 /* Enumerate window stations */
2814 @REQ(enum_winstation)
2815 unsigned int index; /* current index */
2816 @REPLY
2817 unsigned int next; /* next index */
2818 VARARG(name,unicode_str); /* window station name */
2819 @END
2822 /* Create a desktop */
2823 @REQ(create_desktop)
2824 unsigned int flags; /* desktop flags */
2825 unsigned int access; /* wanted access rights */
2826 unsigned int attributes; /* object attributes */
2827 VARARG(name,unicode_str); /* object name */
2828 @REPLY
2829 obj_handle_t handle; /* handle to the desktop */
2830 @END
2833 /* Open a handle to a desktop */
2834 @REQ(open_desktop)
2835 obj_handle_t winsta; /* window station to open (null allowed) */
2836 unsigned int flags; /* desktop flags */
2837 unsigned int access; /* wanted access rights */
2838 unsigned int attributes; /* object attributes */
2839 VARARG(name,unicode_str); /* object name */
2840 @REPLY
2841 obj_handle_t handle; /* handle to the desktop */
2842 @END
2845 /* Open a handle to current input desktop */
2846 @REQ(open_input_desktop)
2847 unsigned int flags; /* desktop flags */
2848 unsigned int access; /* wanted access rights */
2849 unsigned int attributes; /* object attributes */
2850 @REPLY
2851 obj_handle_t handle; /* handle to the desktop */
2852 @END
2855 /* Close a desktop */
2856 @REQ(close_desktop)
2857 obj_handle_t handle; /* handle to the desktop */
2858 @END
2861 /* Get the thread current desktop */
2862 @REQ(get_thread_desktop)
2863 thread_id_t tid; /* thread id */
2864 @REPLY
2865 obj_handle_t handle; /* handle to the desktop */
2866 @END
2869 /* Set the thread current desktop */
2870 @REQ(set_thread_desktop)
2871 obj_handle_t handle; /* handle to the desktop */
2872 @END
2875 /* Enumerate desktops */
2876 @REQ(enum_desktop)
2877 obj_handle_t winstation; /* handle to the window station */
2878 unsigned int index; /* current index */
2879 @REPLY
2880 unsigned int next; /* next index */
2881 VARARG(name,unicode_str); /* window station name */
2882 @END
2885 /* Get/set information about a user object (window station or desktop) */
2886 @REQ(set_user_object_info)
2887 obj_handle_t handle; /* handle to the object */
2888 unsigned int flags; /* information to set/get */
2889 unsigned int obj_flags; /* new object flags */
2890 @REPLY
2891 int is_desktop; /* is object a desktop? */
2892 unsigned int old_obj_flags; /* old object flags */
2893 VARARG(name,unicode_str); /* object name */
2894 @END
2895 #define SET_USER_OBJECT_SET_FLAGS 1
2896 #define SET_USER_OBJECT_GET_FULL_NAME 2
2899 /* Register a hotkey */
2900 @REQ(register_hotkey)
2901 user_handle_t window; /* handle to the window */
2902 int id; /* hotkey identifier */
2903 unsigned int flags; /* modifier keys */
2904 unsigned int vkey; /* virtual key code */
2905 @REPLY
2906 int replaced; /* did we replace an existing hotkey? */
2907 unsigned int flags; /* flags of replaced hotkey */
2908 unsigned int vkey; /* virtual key code of replaced hotkey */
2909 @END
2912 /* Unregister a hotkey */
2913 @REQ(unregister_hotkey)
2914 user_handle_t window; /* handle to the window */
2915 int id; /* hotkey identifier */
2916 @REPLY
2917 unsigned int flags; /* flags of removed hotkey */
2918 unsigned int vkey; /* virtual key code of removed hotkey */
2919 @END
2922 /* Attach (or detach) thread inputs */
2923 @REQ(attach_thread_input)
2924 thread_id_t tid_from; /* thread to be attached */
2925 thread_id_t tid_to; /* thread to which tid_from should be attached */
2926 int attach; /* is it an attach? */
2927 @END
2930 /* Get input data for a given thread */
2931 @REQ(get_thread_input)
2932 thread_id_t tid; /* id of thread */
2933 @REPLY
2934 user_handle_t focus; /* handle to the focus window */
2935 user_handle_t capture; /* handle to the capture window */
2936 user_handle_t active; /* handle to the active window */
2937 user_handle_t foreground; /* handle to the global foreground window */
2938 user_handle_t menu_owner; /* handle to the menu owner */
2939 user_handle_t move_size; /* handle to the moving/resizing window */
2940 user_handle_t caret; /* handle to the caret window */
2941 user_handle_t cursor; /* handle to the cursor */
2942 int show_count; /* cursor show count */
2943 rectangle_t rect; /* caret rectangle */
2944 @END
2947 /* Get the time of the last input event */
2948 @REQ(get_last_input_time)
2949 @REPLY
2950 unsigned int time;
2951 @END
2954 /* Retrieve queue keyboard state for a given thread */
2955 @REQ(get_key_state)
2956 thread_id_t tid; /* id of thread */
2957 int key; /* optional key code or -1 */
2958 @REPLY
2959 unsigned char state; /* state of specified key */
2960 VARARG(keystate,bytes); /* state array for all the keys */
2961 @END
2963 /* Set queue keyboard state for a given thread */
2964 @REQ(set_key_state)
2965 thread_id_t tid; /* id of thread */
2966 int async; /* whether to change the async state too */
2967 VARARG(keystate,bytes); /* state array for all the keys */
2968 @END
2970 /* Set the system foreground window */
2971 @REQ(set_foreground_window)
2972 user_handle_t handle; /* handle to the foreground window */
2973 @REPLY
2974 user_handle_t previous; /* handle to the previous foreground window */
2975 int send_msg_old; /* whether we have to send a msg to the old window */
2976 int send_msg_new; /* whether we have to send a msg to the new window */
2977 @END
2979 /* Set the current thread focus window */
2980 @REQ(set_focus_window)
2981 user_handle_t handle; /* handle to the focus window */
2982 @REPLY
2983 user_handle_t previous; /* handle to the previous focus window */
2984 @END
2986 /* Set the current thread active window */
2987 @REQ(set_active_window)
2988 user_handle_t handle; /* handle to the active window */
2989 @REPLY
2990 user_handle_t previous; /* handle to the previous active window */
2991 @END
2993 /* Set the current thread capture window */
2994 @REQ(set_capture_window)
2995 user_handle_t handle; /* handle to the capture window */
2996 unsigned int flags; /* capture flags (see below) */
2997 @REPLY
2998 user_handle_t previous; /* handle to the previous capture window */
2999 user_handle_t full_handle; /* full 32-bit handle of new capture window */
3000 @END
3001 #define CAPTURE_MENU 0x01 /* capture is for a menu */
3002 #define CAPTURE_MOVESIZE 0x02 /* capture is for moving/resizing */
3005 /* Set the current thread caret window */
3006 @REQ(set_caret_window)
3007 user_handle_t handle; /* handle to the caret window */
3008 int width; /* caret width */
3009 int height; /* caret height */
3010 @REPLY
3011 user_handle_t previous; /* handle to the previous caret window */
3012 rectangle_t old_rect; /* previous caret rectangle */
3013 int old_hide; /* previous hide count */
3014 int old_state; /* previous caret state (1=on, 0=off) */
3015 @END
3018 /* Set the current thread caret information */
3019 @REQ(set_caret_info)
3020 unsigned int flags; /* caret flags (see below) */
3021 user_handle_t handle; /* handle to the caret window */
3022 int x; /* caret x position */
3023 int y; /* caret y position */
3024 int hide; /* increment for hide count (can be negative to show it) */
3025 int state; /* caret state (see below) */
3026 @REPLY
3027 user_handle_t full_handle; /* handle to the current caret window */
3028 rectangle_t old_rect; /* previous caret rectangle */
3029 int old_hide; /* previous hide count */
3030 int old_state; /* previous caret state (1=on, 0=off) */
3031 @END
3032 #define SET_CARET_POS 0x01 /* set the caret position from x,y */
3033 #define SET_CARET_HIDE 0x02 /* increment the caret hide count */
3034 #define SET_CARET_STATE 0x04 /* set the caret on/off state */
3035 enum caret_state
3037 CARET_STATE_OFF, /* off */
3038 CARET_STATE_ON, /* on */
3039 CARET_STATE_TOGGLE, /* toggle current state */
3040 CARET_STATE_ON_IF_MOVED /* on if the position differs, unchanged otherwise */
3044 /* Set a window hook */
3045 @REQ(set_hook)
3046 int id; /* id of the hook */
3047 process_id_t pid; /* id of process to set the hook into */
3048 thread_id_t tid; /* id of thread to set the hook into */
3049 int event_min;
3050 int event_max;
3051 client_ptr_t proc; /* hook procedure */
3052 int flags;
3053 int unicode; /* is it a unicode hook? */
3054 VARARG(module,unicode_str); /* module name */
3055 @REPLY
3056 user_handle_t handle; /* handle to the hook */
3057 unsigned int active_hooks; /* active hooks bitmap */
3058 @END
3061 /* Remove a window hook */
3062 @REQ(remove_hook)
3063 user_handle_t handle; /* handle to the hook */
3064 client_ptr_t proc; /* hook procedure if handle is 0 */
3065 int id; /* id of the hook if handle is 0 */
3066 @REPLY
3067 unsigned int active_hooks; /* active hooks bitmap */
3068 @END
3071 /* Start calling a hook chain */
3072 @REQ(start_hook_chain)
3073 int id; /* id of the hook */
3074 int event; /* signalled event */
3075 user_handle_t window; /* handle to the event window */
3076 int object_id; /* object id for out of context winevent */
3077 int child_id; /* child id for out of context winevent */
3078 @REPLY
3079 user_handle_t handle; /* handle to the next hook */
3080 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
3081 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
3082 int unicode; /* is it a unicode hook? */
3083 client_ptr_t proc; /* hook procedure */
3084 unsigned int active_hooks; /* active hooks bitmap */
3085 VARARG(module,unicode_str); /* module name */
3086 @END
3089 /* Finished calling a hook chain */
3090 @REQ(finish_hook_chain)
3091 int id; /* id of the hook */
3092 @END
3095 /* Get the hook information */
3096 @REQ(get_hook_info)
3097 user_handle_t handle; /* handle to the current hook */
3098 int get_next; /* do we want info about current or next hook? */
3099 int event; /* signalled event */
3100 user_handle_t window; /* handle to the event window */
3101 int object_id; /* object id for out of context winevent */
3102 int child_id; /* child id for out of context winevent */
3103 @REPLY
3104 user_handle_t handle; /* handle to the hook */
3105 int id; /* id of the hook */
3106 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
3107 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
3108 client_ptr_t proc; /* hook procedure */
3109 int unicode; /* is it a unicode hook? */
3110 VARARG(module,unicode_str); /* module name */
3111 @END
3114 /* Create a window class */
3115 @REQ(create_class)
3116 int local; /* is it a local class? */
3117 atom_t atom; /* class atom */
3118 unsigned int style; /* class style */
3119 mod_handle_t instance; /* module instance */
3120 int extra; /* number of extra class bytes */
3121 int win_extra; /* number of window extra bytes */
3122 client_ptr_t client_ptr; /* pointer to class in client address space */
3123 VARARG(name,unicode_str); /* class name */
3124 @REPLY
3125 atom_t atom; /* resulting class atom */
3126 @END
3129 /* Destroy a window class */
3130 @REQ(destroy_class)
3131 atom_t atom; /* class atom */
3132 mod_handle_t instance; /* module instance */
3133 VARARG(name,unicode_str); /* class name */
3134 @REPLY
3135 client_ptr_t client_ptr; /* pointer to class in client address space */
3136 @END
3139 /* Set some information in a class */
3140 @REQ(set_class_info)
3141 user_handle_t window; /* handle to the window */
3142 unsigned int flags; /* flags for info to set (see below) */
3143 atom_t atom; /* class atom */
3144 unsigned int style; /* class style */
3145 int win_extra; /* number of window extra bytes */
3146 mod_handle_t instance; /* module instance */
3147 int extra_offset; /* offset to set in extra bytes */
3148 data_size_t extra_size; /* size to set in extra bytes */
3149 lparam_t extra_value; /* value to set in extra bytes */
3150 @REPLY
3151 atom_t old_atom; /* previous class atom */
3152 unsigned int old_style; /* previous class style */
3153 int old_extra; /* previous number of class extra bytes */
3154 int old_win_extra; /* previous number of window extra bytes */
3155 mod_handle_t old_instance; /* previous module instance */
3156 lparam_t old_extra_value; /* old value in extra bytes */
3157 @END
3158 #define SET_CLASS_ATOM 0x0001
3159 #define SET_CLASS_STYLE 0x0002
3160 #define SET_CLASS_WINEXTRA 0x0004
3161 #define SET_CLASS_INSTANCE 0x0008
3162 #define SET_CLASS_EXTRA 0x0010
3165 /* Open the clipboard */
3166 @REQ(open_clipboard)
3167 user_handle_t window; /* clipboard window */
3168 @REPLY
3169 user_handle_t owner; /* current clipboard owner */
3170 @END
3173 /* Close the clipboard */
3174 @REQ(close_clipboard)
3175 @REPLY
3176 user_handle_t viewer; /* first clipboard viewer */
3177 user_handle_t owner; /* current clipboard owner */
3178 @END
3181 /* Empty the clipboard and grab ownership */
3182 @REQ(empty_clipboard)
3183 @END
3186 /* Add a data format to the clipboard */
3187 @REQ(set_clipboard_data)
3188 unsigned int format; /* clipboard format of the data */
3189 unsigned int lcid; /* locale id to use for synthesizing text formats */
3190 VARARG(data,bytes); /* data contents */
3191 @REPLY
3192 unsigned int seqno; /* sequence number for the set data */
3193 @END
3196 /* Fetch a data format from the clipboard */
3197 @REQ(get_clipboard_data)
3198 unsigned int format; /* clipboard format of the data */
3199 int render; /* will we try to render it if missing? */
3200 int cached; /* do we already have it in the client-side cache? */
3201 unsigned int seqno; /* sequence number for the data in the cache */
3202 @REPLY
3203 unsigned int from; /* for synthesized data, format to generate it from */
3204 user_handle_t owner; /* clipboard owner for delayed-rendered formats */
3205 unsigned int seqno; /* sequence number for the originally set data */
3206 data_size_t total; /* total data size */
3207 VARARG(data,bytes); /* data contents */
3208 @END
3211 /* Retrieve a list of available formats */
3212 @REQ(get_clipboard_formats)
3213 unsigned int format; /* specific format to query, return all if 0 */
3214 @REPLY
3215 unsigned int count; /* count of available formats */
3216 VARARG(formats,uints); /* array of available formats */
3217 @END
3220 /* Retrieve the next available format */
3221 @REQ(enum_clipboard_formats)
3222 unsigned int previous; /* previous format, or first if 0 */
3223 @REPLY
3224 unsigned int format; /* next format */
3225 @END
3228 /* Release ownership of the clipboard */
3229 @REQ(release_clipboard)
3230 user_handle_t owner; /* clipboard owner to release */
3231 @REPLY
3232 user_handle_t viewer; /* first clipboard viewer */
3233 user_handle_t owner; /* current clipboard owner */
3234 @END
3237 /* Get clipboard information */
3238 @REQ(get_clipboard_info)
3239 @REPLY
3240 user_handle_t window; /* clipboard window */
3241 user_handle_t owner; /* clipboard owner */
3242 user_handle_t viewer; /* clipboard viewer */
3243 unsigned int seqno; /* current sequence number */
3244 @END
3247 /* Set the clipboard viewer window */
3248 @REQ(set_clipboard_viewer)
3249 user_handle_t viewer; /* clipboard viewer */
3250 user_handle_t previous; /* if non-zero, check that this was the previous viewer */
3251 @REPLY
3252 user_handle_t old_viewer; /* previous clipboard viewer */
3253 user_handle_t owner; /* clipboard owner */
3254 @END
3257 /* Add a clipboard listener window */
3258 @REQ(add_clipboard_listener)
3259 user_handle_t window; /* clipboard listener window */
3260 @END
3263 /* Remove a clipboard listener window */
3264 @REQ(remove_clipboard_listener)
3265 user_handle_t window; /* clipboard listener window */
3266 @END
3269 /* Open a security token */
3270 @REQ(open_token)
3271 obj_handle_t handle; /* handle to the thread or process */
3272 unsigned int access; /* access rights to the new token */
3273 unsigned int attributes;/* object attributes */
3274 unsigned int flags; /* flags (see below) */
3275 @REPLY
3276 obj_handle_t token; /* handle to the token */
3277 @END
3278 #define OPEN_TOKEN_THREAD 1
3279 #define OPEN_TOKEN_AS_SELF 2
3282 /* Set/get the global windows */
3283 @REQ(set_global_windows)
3284 unsigned int flags; /* flags for fields to set (see below) */
3285 user_handle_t shell_window; /* handle to the new shell window */
3286 user_handle_t shell_listview; /* handle to the new shell listview window */
3287 user_handle_t progman_window; /* handle to the new program manager window */
3288 user_handle_t taskman_window; /* handle to the new task manager window */
3289 @REPLY
3290 user_handle_t old_shell_window; /* handle to the shell window */
3291 user_handle_t old_shell_listview; /* handle to the shell listview window */
3292 user_handle_t old_progman_window; /* handle to the new program manager window */
3293 user_handle_t old_taskman_window; /* handle to the new task manager window */
3294 @END
3295 #define SET_GLOBAL_SHELL_WINDOWS 0x01 /* set both main shell and listview windows */
3296 #define SET_GLOBAL_PROGMAN_WINDOW 0x02
3297 #define SET_GLOBAL_TASKMAN_WINDOW 0x04
3299 /* Adjust the privileges held by a token */
3300 @REQ(adjust_token_privileges)
3301 obj_handle_t handle; /* handle to the token */
3302 int disable_all; /* disable all privileges? */
3303 int get_modified_state; /* get modified privileges? */
3304 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to enable/disable/remove */
3305 @REPLY
3306 unsigned int len; /* total length in bytes required to store token privileges */
3307 VARARG(privileges,LUID_AND_ATTRIBUTES); /* modified privileges */
3308 @END
3310 /* Retrieves the set of privileges held by or available to a token */
3311 @REQ(get_token_privileges)
3312 obj_handle_t handle; /* handle to the token */
3313 @REPLY
3314 unsigned int len; /* total length in bytes required to store token privileges */
3315 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
3316 @END
3318 /* Check the token has the required privileges */
3319 @REQ(check_token_privileges)
3320 obj_handle_t handle; /* handle to the token */
3321 int all_required; /* are all the privileges required for the check to succeed? */
3322 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to check */
3323 @REPLY
3324 int has_privileges; /* does the token have the required privileges? */
3325 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
3326 @END
3328 @REQ(duplicate_token)
3329 obj_handle_t handle; /* handle to the token to duplicate */
3330 unsigned int access; /* access rights to the new token */
3331 int primary; /* is the new token to be a primary one? */
3332 int impersonation_level; /* impersonation level of the new token */
3333 VARARG(objattr,object_attributes); /* object attributes */
3334 @REPLY
3335 obj_handle_t new_handle; /* duplicated handle */
3336 @END
3338 @REQ(access_check)
3339 obj_handle_t handle; /* handle to the token */
3340 unsigned int desired_access; /* desired access to the object */
3341 unsigned int mapping_read; /* mapping from generic read to specific rights */
3342 unsigned int mapping_write; /* mapping from generic write to specific rights */
3343 unsigned int mapping_execute; /* mapping from generic execute to specific rights */
3344 unsigned int mapping_all; /* mapping from generic all to specific rights */
3345 VARARG(sd,security_descriptor); /* security descriptor to check */
3346 @REPLY
3347 unsigned int access_granted; /* access rights actually granted */
3348 unsigned int access_status; /* was access granted? */
3349 unsigned int privileges_len; /* length needed to store privileges */
3350 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges used during access check */
3351 @END
3353 @REQ(get_token_sid)
3354 obj_handle_t handle; /* handle to the token */
3355 unsigned int which_sid; /* which SID to retrieve from the token */
3356 @REPLY
3357 data_size_t sid_len; /* length needed to store sid */
3358 VARARG(sid,SID); /* the sid specified by which_sid from the token */
3359 @END
3361 @REQ(get_token_groups)
3362 obj_handle_t handle; /* handle to the token */
3363 @REPLY
3364 data_size_t user_len; /* length needed to store user */
3365 VARARG(user,token_groups); /* groups the token's user belongs to */
3366 @END
3368 @REQ(get_token_default_dacl)
3369 obj_handle_t handle; /* handle to the token */
3370 @REPLY
3371 data_size_t acl_len; /* length needed to store access control list */
3372 VARARG(acl,ACL); /* access control list */
3373 @END
3375 @REQ(set_token_default_dacl)
3376 obj_handle_t handle; /* handle to the token */
3377 VARARG(acl,ACL); /* default dacl to set */
3378 @END
3380 @REQ(set_security_object)
3381 obj_handle_t handle; /* handle to the object */
3382 unsigned int security_info; /* which parts of security descriptor to set */
3383 VARARG(sd,security_descriptor); /* security descriptor to set */
3384 @END
3386 @REQ(get_security_object)
3387 obj_handle_t handle; /* handle to the object */
3388 unsigned int security_info; /* which parts of security descriptor to get */
3389 @REPLY
3390 unsigned int sd_len; /* buffer size needed for sd */
3391 VARARG(sd,security_descriptor); /* retrieved security descriptor */
3392 @END
3395 struct handle_info
3397 process_id_t owner;
3398 obj_handle_t handle;
3399 unsigned int access;
3402 /* Return a list of all opened handles */
3403 @REQ(get_system_handles)
3404 @REPLY
3405 unsigned int count; /* number of handles */
3406 VARARG(data,handle_infos); /* array of handle_infos */
3407 @END
3410 /* Create a mailslot */
3411 @REQ(create_mailslot)
3412 unsigned int access; /* wanted access rights */
3413 timeout_t read_timeout;
3414 unsigned int max_msgsize;
3415 VARARG(objattr,object_attributes); /* object attributes */
3416 @REPLY
3417 obj_handle_t handle; /* handle to the mailslot */
3418 @END
3421 /* Set mailslot information */
3422 @REQ(set_mailslot_info)
3423 obj_handle_t handle; /* handle to the mailslot */
3424 timeout_t read_timeout;
3425 unsigned int flags;
3426 @REPLY
3427 timeout_t read_timeout;
3428 unsigned int max_msgsize;
3429 @END
3430 #define MAILSLOT_SET_READ_TIMEOUT 1
3433 /* Create a directory object */
3434 @REQ(create_directory)
3435 unsigned int access; /* access flags */
3436 VARARG(objattr,object_attributes); /* object attributes */
3437 @REPLY
3438 obj_handle_t handle; /* handle to the directory */
3439 @END
3442 /* Open a directory object */
3443 @REQ(open_directory)
3444 unsigned int access; /* access flags */
3445 unsigned int attributes; /* object attributes */
3446 obj_handle_t rootdir; /* root directory */
3447 VARARG(directory_name,unicode_str); /* Directory name */
3448 @REPLY
3449 obj_handle_t handle; /* handle to the directory */
3450 @END
3453 /* Get a directory entry by index */
3454 @REQ(get_directory_entry)
3455 obj_handle_t handle; /* handle to the directory */
3456 unsigned int index; /* entry index */
3457 @REPLY
3458 data_size_t name_len; /* length of the entry name in bytes */
3459 VARARG(name,unicode_str,name_len); /* entry name */
3460 VARARG(type,unicode_str); /* entry type */
3461 @END
3464 /* Create a symbolic link object */
3465 @REQ(create_symlink)
3466 unsigned int access; /* access flags */
3467 VARARG(objattr,object_attributes); /* object attributes */
3468 VARARG(target_name,unicode_str); /* target name */
3469 @REPLY
3470 obj_handle_t handle; /* handle to the symlink */
3471 @END
3474 /* Open a symbolic link object */
3475 @REQ(open_symlink)
3476 unsigned int access; /* access flags */
3477 unsigned int attributes; /* object attributes */
3478 obj_handle_t rootdir; /* root directory */
3479 VARARG(name,unicode_str); /* symlink name */
3480 @REPLY
3481 obj_handle_t handle; /* handle to the symlink */
3482 @END
3485 /* Query a symbolic link object */
3486 @REQ(query_symlink)
3487 obj_handle_t handle; /* handle to the symlink */
3488 @REPLY
3489 data_size_t total; /* total needed size for name */
3490 VARARG(target_name,unicode_str); /* target name */
3491 @END
3494 /* Query basic object information */
3495 @REQ(get_object_info)
3496 obj_handle_t handle; /* handle to the object */
3497 @REPLY
3498 unsigned int access; /* granted access mask */
3499 unsigned int ref_count; /* object ref count */
3500 unsigned int handle_count; /* object handle count */
3501 data_size_t total; /* total needed size for name */
3502 VARARG(name,unicode_str); /* object name */
3503 @END
3506 /* Query object type name information */
3507 @REQ(get_object_type)
3508 obj_handle_t handle; /* handle to the object */
3509 @REPLY
3510 data_size_t total; /* needed size for type name */
3511 VARARG(type,unicode_str); /* type name */
3512 @END
3515 /* Unlink a named object */
3516 @REQ(unlink_object)
3517 obj_handle_t handle; /* handle to the object */
3518 @END
3521 /* Query the impersonation level of an impersonation token */
3522 @REQ(get_token_impersonation_level)
3523 obj_handle_t handle; /* handle to the object */
3524 @REPLY
3525 int impersonation_level; /* impersonation level of the impersonation token */
3526 @END
3528 /* Allocate a locally-unique identifier */
3529 @REQ(allocate_locally_unique_id)
3530 @REPLY
3531 luid_t luid;
3532 @END
3535 /* Create a device manager */
3536 @REQ(create_device_manager)
3537 unsigned int access; /* wanted access rights */
3538 unsigned int attributes; /* object attributes */
3539 @REPLY
3540 obj_handle_t handle; /* handle to the device */
3541 @END
3544 /* Create a device */
3545 @REQ(create_device)
3546 unsigned int access; /* wanted access rights */
3547 unsigned int attributes; /* object attributes */
3548 obj_handle_t rootdir; /* root directory */
3549 client_ptr_t user_ptr; /* opaque ptr for use by client */
3550 obj_handle_t manager; /* device manager */
3551 VARARG(name,unicode_str); /* object name */
3552 @REPLY
3553 obj_handle_t handle; /* handle to the device */
3554 @END
3557 /* Delete a device */
3558 @REQ(delete_device)
3559 obj_handle_t handle; /* handle to the device */
3560 @END
3563 /* Retrieve the next pending device irp request */
3564 @REQ(get_next_device_request)
3565 obj_handle_t manager; /* handle to the device manager */
3566 obj_handle_t prev; /* handle to the previous irp */
3567 unsigned int status; /* status of the previous irp */
3568 @REPLY
3569 irp_params_t params; /* irp parameters */
3570 obj_handle_t next; /* handle to the next irp */
3571 process_id_t client_pid; /* pid of process calling irp */
3572 thread_id_t client_tid; /* tid of thread calling irp */
3573 data_size_t in_size; /* total needed input size */
3574 data_size_t out_size; /* needed output size */
3575 VARARG(next_data,bytes); /* input data of the next irp */
3576 @END
3579 /* Make the current process a system process */
3580 @REQ(make_process_system)
3581 @REPLY
3582 obj_handle_t event; /* event signaled when all user processes have exited */
3583 @END
3586 /* Get detailed fixed-size information about a token */
3587 @REQ(get_token_statistics)
3588 obj_handle_t handle; /* handle to the object */
3589 @REPLY
3590 luid_t token_id; /* locally-unique identifier of the token */
3591 luid_t modified_id; /* locally-unique identifier of the modified version of the token */
3592 int primary; /* is the token primary or impersonation? */
3593 int impersonation_level; /* level of impersonation */
3594 int group_count; /* the number of groups the token is a member of */
3595 int privilege_count; /* the number of privileges the token has */
3596 @END
3599 /* Create I/O completion port */
3600 @REQ(create_completion)
3601 unsigned int access; /* desired access to a port */
3602 unsigned int concurrent; /* max number of concurrent active threads */
3603 VARARG(objattr,object_attributes); /* object attributes */
3604 @REPLY
3605 obj_handle_t handle; /* port handle */
3606 @END
3609 /* Open I/O completion port */
3610 @REQ(open_completion)
3611 unsigned int access; /* desired access to a port */
3612 unsigned int attributes; /* object attributes */
3613 obj_handle_t rootdir; /* root directory */
3614 VARARG(filename,unicode_str); /* port name */
3615 @REPLY
3616 obj_handle_t handle; /* port handle */
3617 @END
3620 /* add completion to completion port */
3621 @REQ(add_completion)
3622 obj_handle_t handle; /* port handle */
3623 apc_param_t ckey; /* completion key */
3624 apc_param_t cvalue; /* completion value */
3625 apc_param_t information; /* IO_STATUS_BLOCK Information */
3626 unsigned int status; /* completion result */
3627 @END
3630 /* get completion from completion port queue */
3631 @REQ(remove_completion)
3632 obj_handle_t handle; /* port handle */
3633 @REPLY
3634 apc_param_t ckey; /* completion key */
3635 apc_param_t cvalue; /* completion value */
3636 apc_param_t information; /* IO_STATUS_BLOCK Information */
3637 unsigned int status; /* completion result */
3638 @END
3641 /* get completion queue depth */
3642 @REQ(query_completion)
3643 obj_handle_t handle; /* port handle */
3644 @REPLY
3645 unsigned int depth; /* completion queue depth */
3646 @END
3649 /* associate object with completion port */
3650 @REQ(set_completion_info)
3651 obj_handle_t handle; /* object handle */
3652 apc_param_t ckey; /* completion key */
3653 obj_handle_t chandle; /* port handle */
3654 @END
3657 /* check for associated completion and push msg */
3658 @REQ(add_fd_completion)
3659 obj_handle_t handle; /* async' object */
3660 apc_param_t cvalue; /* completion value */
3661 apc_param_t information; /* IO_STATUS_BLOCK Information */
3662 unsigned int status; /* completion status */
3663 @END
3666 /* set fd disposition information */
3667 @REQ(set_fd_disp_info)
3668 obj_handle_t handle; /* handle to a file or directory */
3669 int unlink; /* whether to unlink file on close */
3670 @END
3673 /* set fd name information */
3674 @REQ(set_fd_name_info)
3675 obj_handle_t handle; /* handle to a file or directory */
3676 obj_handle_t rootdir; /* root directory */
3677 int link; /* link instead of renaming */
3678 VARARG(filename,string); /* new file name */
3679 @END
3682 /* Retrieve layered info for a window */
3683 @REQ(get_window_layered_info)
3684 user_handle_t handle; /* handle to the window */
3685 @REPLY
3686 unsigned int color_key; /* color key */
3687 unsigned int alpha; /* alpha (0..255) */
3688 unsigned int flags; /* LWA_* flags */
3689 @END
3692 /* Set layered info for a window */
3693 @REQ(set_window_layered_info)
3694 user_handle_t handle; /* handle to the window */
3695 unsigned int color_key; /* color key */
3696 unsigned int alpha; /* alpha (0..255) */
3697 unsigned int flags; /* LWA_* flags */
3698 @END
3701 /* Allocate an arbitrary user handle */
3702 @REQ(alloc_user_handle)
3703 @REPLY
3704 user_handle_t handle; /* allocated handle */
3705 @END
3708 /* Free an arbitrary user handle */
3709 @REQ(free_user_handle)
3710 user_handle_t handle; /* handle to free*/
3711 @END
3714 /* Set/get the current cursor */
3715 @REQ(set_cursor)
3716 unsigned int flags; /* flags for fields to set (see below) */
3717 user_handle_t handle; /* handle to the cursor */
3718 int show_count; /* show count increment/decrement */
3719 int x; /* cursor position */
3720 int y;
3721 rectangle_t clip; /* cursor clip rectangle */
3722 unsigned int clip_msg; /* message to post on cursor clip changes */
3723 @REPLY
3724 user_handle_t prev_handle; /* previous handle */
3725 int prev_count; /* previous show count */
3726 int prev_x; /* previous position */
3727 int prev_y;
3728 int new_x; /* new position */
3729 int new_y;
3730 rectangle_t new_clip; /* new clip rectangle */
3731 unsigned int last_change; /* time of last position change */
3732 @END
3733 #define SET_CURSOR_HANDLE 0x01
3734 #define SET_CURSOR_COUNT 0x02
3735 #define SET_CURSOR_POS 0x04
3736 #define SET_CURSOR_CLIP 0x08
3737 #define SET_CURSOR_NOCLIP 0x10
3740 /* Modify the list of registered rawinput devices */
3741 @REQ(update_rawinput_devices)
3742 VARARG(devices,rawinput_devices);
3743 @END
3746 /* Retrieve the suspended context of a thread */
3747 @REQ(get_suspend_context)
3748 @REPLY
3749 VARARG(context,context); /* thread context */
3750 @END
3753 /* Store the suspend context of a thread */
3754 @REQ(set_suspend_context)
3755 VARARG(context,context); /* thread context */
3756 @END
3759 /* Create a new job object */
3760 @REQ(create_job)
3761 unsigned int access; /* wanted access rights */
3762 VARARG(objattr,object_attributes); /* object attributes */
3763 @REPLY
3764 obj_handle_t handle; /* handle to the job */
3765 @END
3768 /* Open a job object */
3769 @REQ(open_job)
3770 unsigned int access; /* wanted access rights */
3771 unsigned int attributes; /* object attributes */
3772 obj_handle_t rootdir; /* root directory */
3773 VARARG(name,unicode_str); /* object name */
3774 @REPLY
3775 obj_handle_t handle; /* handle to the job */
3776 @END
3779 /* Assign a job object to a process */
3780 @REQ(assign_job)
3781 obj_handle_t job; /* handle to the job */
3782 obj_handle_t process; /* handle to the process */
3783 @END
3786 /* Check if a process is associated with a job */
3787 @REQ(process_in_job)
3788 obj_handle_t job; /* handle to the job */
3789 obj_handle_t process; /* handle to the process */
3790 @END
3793 /* Set limit flags on a job */
3794 @REQ(set_job_limits)
3795 obj_handle_t handle; /* handle to the job */
3796 unsigned int limit_flags; /* new limit flags */
3797 @END
3800 /* Set new completion port for a job */
3801 @REQ(set_job_completion_port)
3802 obj_handle_t job; /* handle to the job */
3803 obj_handle_t port; /* handle to the completion port */
3804 client_ptr_t key; /* key to send with completion messages */
3805 @END
3808 /* Terminate all processes associated with the job */
3809 @REQ(terminate_job)
3810 obj_handle_t handle; /* handle to the job */
3811 int status; /* process exit code */
3812 @END