po: Update Norwegian translation.
[wine.git] / server / protocol.def
blob6e02fbc501450b83414a0b19dc7469cc568073bf
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 struct { unsigned __int64 d[32]; unsigned int fpscr; } arm_regs;
175 struct { unsigned __int64 d[64]; unsigned int fpcr, fpsr; } arm64_regs;
176 } fp; /* selected by SERVER_CTX_FLOATING_POINT */
177 union
179 struct { unsigned int dr0, dr1, dr2, dr3, dr6, dr7; } i386_regs;
180 struct { unsigned __int64 dr0, dr1, dr2, dr3, dr6, dr7; } x86_64_regs;
181 struct { unsigned int dr[8]; } powerpc_regs;
182 struct { unsigned int bvr[8], bcr[8], wvr[1], wcr[1]; } arm_regs;
183 struct { unsigned __int64 bvr[8], wvr[2]; unsigned int bcr[8], wcr[2]; } arm64_regs;
184 } debug; /* selected by SERVER_CTX_DEBUG_REGISTERS */
185 union
187 unsigned char i386_regs[512];
188 } ext; /* selected by SERVER_CTX_EXTENDED_REGISTERS */
189 } context_t;
191 #define SERVER_CTX_CONTROL 0x01
192 #define SERVER_CTX_INTEGER 0x02
193 #define SERVER_CTX_SEGMENTS 0x04
194 #define SERVER_CTX_FLOATING_POINT 0x08
195 #define SERVER_CTX_DEBUG_REGISTERS 0x10
196 #define SERVER_CTX_EXTENDED_REGISTERS 0x20
198 /* structure used in sending an fd from client to server */
199 struct send_fd
201 thread_id_t tid; /* thread id */
202 int fd; /* file descriptor on client-side */
205 /* structure sent by the server on the wait fifo */
206 struct wake_up_reply
208 client_ptr_t cookie; /* magic cookie that was passed in select_request */
209 int signaled; /* wait result */
210 int __pad;
213 /* NT-style timeout, in 100ns units, negative means relative timeout */
214 typedef __int64 timeout_t;
215 #define TIMEOUT_INFINITE (((timeout_t)0x7fffffff) << 32 | 0xffffffff)
217 /* structure for process startup info */
218 typedef struct
220 unsigned int debug_flags;
221 unsigned int console_flags;
222 obj_handle_t console;
223 obj_handle_t hstdin;
224 obj_handle_t hstdout;
225 obj_handle_t hstderr;
226 unsigned int x;
227 unsigned int y;
228 unsigned int xsize;
229 unsigned int ysize;
230 unsigned int xchars;
231 unsigned int ychars;
232 unsigned int attribute;
233 unsigned int flags;
234 unsigned int show;
235 data_size_t curdir_len;
236 data_size_t dllpath_len;
237 data_size_t imagepath_len;
238 data_size_t cmdline_len;
239 data_size_t title_len;
240 data_size_t desktop_len;
241 data_size_t shellinfo_len;
242 data_size_t runtime_len;
243 /* VARARG(curdir,unicode_str,curdir_len); */
244 /* VARARG(dllpath,unicode_str,dllpath_len); */
245 /* VARARG(imagepath,unicode_str,imagepath_len); */
246 /* VARARG(cmdline,unicode_str,cmdline_len); */
247 /* VARARG(title,unicode_str,title_len); */
248 /* VARARG(desktop,unicode_str,desktop_len); */
249 /* VARARG(shellinfo,unicode_str,shellinfo_len); */
250 /* VARARG(runtime,unicode_str,runtime_len); */
251 } startup_info_t;
253 /* structure returned in the list of window properties */
254 typedef struct
256 atom_t atom; /* property atom */
257 int string; /* was atom a string originally? */
258 lparam_t data; /* data stored in property */
259 } property_data_t;
261 /* structure to specify window rectangles */
262 typedef struct
264 int left;
265 int top;
266 int right;
267 int bottom;
268 } rectangle_t;
270 /* structure for parameters of async I/O calls */
271 typedef struct
273 obj_handle_t handle; /* object to perform I/O on */
274 obj_handle_t event; /* event to signal when done */
275 client_ptr_t iosb; /* I/O status block in client addr space */
276 client_ptr_t user; /* opaque user data containing callback pointer and async-specific data */
277 client_ptr_t apc; /* user APC to call */
278 apc_param_t apc_context; /* user APC context or completion value */
279 } async_data_t;
281 /* structures for extra message data */
283 struct hardware_msg_data
285 lparam_t info; /* extra info */
286 unsigned int hw_id; /* unique id */
287 unsigned int flags; /* hook flags */
288 union
290 int type;
291 struct
293 int type; /* RIM_TYPEKEYBOARD */
294 unsigned int message; /* message generated by this rawinput event */
295 unsigned short vkey; /* virtual key code */
296 unsigned short scan; /* scan code */
297 } kbd;
298 struct
300 int type; /* RIM_TYPEMOUSE */
301 int x; /* x coordinate */
302 int y; /* y coordinate */
303 unsigned int data; /* mouse data */
304 } mouse;
305 } rawinput;
308 struct callback_msg_data
310 client_ptr_t callback; /* callback function */
311 lparam_t data; /* user data for callback */
312 lparam_t result; /* message result */
315 struct winevent_msg_data
317 user_handle_t hook; /* hook handle */
318 thread_id_t tid; /* thread id */
319 client_ptr_t hook_proc; /* hook proc address */
320 /* followed by module name if any */
323 typedef union
325 int type;
326 struct
328 int type; /* INPUT_KEYBOARD */
329 unsigned short vkey; /* virtual key code */
330 unsigned short scan; /* scan code */
331 unsigned int flags; /* event flags */
332 unsigned int time; /* event time */
333 lparam_t info; /* extra info */
334 } kbd;
335 struct
337 int type; /* INPUT_MOUSE */
338 int x; /* coordinates */
339 int y;
340 unsigned int data; /* mouse data */
341 unsigned int flags; /* event flags */
342 unsigned int time; /* event time */
343 lparam_t info; /* extra info */
344 } mouse;
345 struct
347 int type; /* INPUT_HARDWARE */
348 unsigned int msg; /* message code */
349 lparam_t lparam; /* message param */
350 } hw;
351 } hw_input_t;
353 typedef union
355 unsigned char bytes[1]; /* raw data for sent messages */
356 struct hardware_msg_data hardware;
357 struct callback_msg_data callback;
358 struct winevent_msg_data winevent;
359 } message_data_t;
361 /* structure for console char/attribute info */
362 typedef struct
364 WCHAR ch;
365 unsigned short attr;
366 } char_info_t;
368 /* structure returned in filesystem events */
369 struct filesystem_event
371 int action;
372 data_size_t len;
373 char name[1];
376 typedef struct
378 unsigned int low_part;
379 int high_part;
380 } luid_t;
382 #define MAX_ACL_LEN 65535
384 struct security_descriptor
386 unsigned int control; /* SE_ flags */
387 data_size_t owner_len;
388 data_size_t group_len;
389 data_size_t sacl_len;
390 data_size_t dacl_len;
391 /* VARARG(owner,SID); */
392 /* VARARG(group,SID); */
393 /* VARARG(sacl,ACL); */
394 /* VARARG(dacl,ACL); */
397 struct object_attributes
399 obj_handle_t rootdir; /* root directory */
400 unsigned int attributes; /* object attributes */
401 data_size_t sd_len; /* length of security_descriptor data. may be 0 */
402 data_size_t name_len; /* length of the name string. may be 0 */
403 /* VARARG(sd,security_descriptor); */
404 /* VARARG(name,unicode_str); */
407 struct token_groups
409 unsigned int count;
410 /* unsigned int attributes[count]; */
411 /* VARARG(sids,SID); */
414 enum select_op
416 SELECT_NONE,
417 SELECT_WAIT,
418 SELECT_WAIT_ALL,
419 SELECT_SIGNAL_AND_WAIT,
420 SELECT_KEYED_EVENT_WAIT,
421 SELECT_KEYED_EVENT_RELEASE
424 typedef union
426 enum select_op op;
427 struct
429 enum select_op op; /* SELECT_WAIT or SELECT_WAIT_ALL */
430 obj_handle_t handles[MAXIMUM_WAIT_OBJECTS];
431 } wait;
432 struct
434 enum select_op op; /* SELECT_SIGNAL_AND_WAIT */
435 obj_handle_t wait;
436 obj_handle_t signal; /* must be last in the structure so we can remove it on retries */
437 } signal_and_wait;
438 struct
440 enum select_op op; /* SELECT_KEYED_EVENT_WAIT or SELECT_KEYED_EVENT_RELEASE */
441 obj_handle_t handle;
442 client_ptr_t key;
443 } keyed_event;
444 } select_op_t;
446 enum apc_type
448 APC_NONE,
449 APC_USER,
450 APC_TIMER,
451 APC_ASYNC_IO,
452 APC_VIRTUAL_ALLOC,
453 APC_VIRTUAL_FREE,
454 APC_VIRTUAL_QUERY,
455 APC_VIRTUAL_PROTECT,
456 APC_VIRTUAL_FLUSH,
457 APC_VIRTUAL_LOCK,
458 APC_VIRTUAL_UNLOCK,
459 APC_MAP_VIEW,
460 APC_UNMAP_VIEW,
461 APC_CREATE_THREAD
464 typedef union
466 enum apc_type type;
467 struct
469 enum apc_type type; /* APC_USER */
470 int __pad;
471 client_ptr_t func; /* void (__stdcall *func)(ULONG_PTR,ULONG_PTR,ULONG_PTR); */
472 apc_param_t args[3]; /* arguments for user function */
473 } user;
474 struct
476 enum apc_type type; /* APC_TIMER */
477 int __pad;
478 client_ptr_t func; /* void (__stdcall *func)(void*, unsigned int, unsigned int); */
479 timeout_t time; /* absolute time of expiration */
480 client_ptr_t arg; /* user argument */
481 } timer;
482 struct
484 enum apc_type type; /* APC_ASYNC_IO */
485 unsigned int status; /* I/O status */
486 client_ptr_t user; /* user pointer */
487 client_ptr_t sb; /* status block */
488 } async_io;
489 struct
491 enum apc_type type; /* APC_VIRTUAL_ALLOC */
492 unsigned int op_type; /* type of operation */
493 client_ptr_t addr; /* requested address */
494 mem_size_t size; /* allocation size */
495 unsigned int zero_bits; /* allocation alignment */
496 unsigned int prot; /* memory protection flags */
497 } virtual_alloc;
498 struct
500 enum apc_type type; /* APC_VIRTUAL_FREE */
501 unsigned int op_type; /* type of operation */
502 client_ptr_t addr; /* requested address */
503 mem_size_t size; /* allocation size */
504 } virtual_free;
505 struct
507 enum apc_type type; /* APC_VIRTUAL_QUERY */
508 int __pad;
509 client_ptr_t addr; /* requested address */
510 } virtual_query;
511 struct
513 enum apc_type type; /* APC_VIRTUAL_PROTECT */
514 unsigned int prot; /* new protection flags */
515 client_ptr_t addr; /* requested address */
516 mem_size_t size; /* requested size */
517 } virtual_protect;
518 struct
520 enum apc_type type; /* APC_VIRTUAL_FLUSH */
521 int __pad;
522 client_ptr_t addr; /* requested address */
523 mem_size_t size; /* requested size */
524 } virtual_flush;
525 struct
527 enum apc_type type; /* APC_VIRTUAL_LOCK */
528 int __pad;
529 client_ptr_t addr; /* requested address */
530 mem_size_t size; /* requested size */
531 } virtual_lock;
532 struct
534 enum apc_type type; /* APC_VIRTUAL_UNLOCK */
535 int __pad;
536 client_ptr_t addr; /* requested address */
537 mem_size_t size; /* requested size */
538 } virtual_unlock;
539 struct
541 enum apc_type type; /* APC_MAP_VIEW */
542 obj_handle_t handle; /* mapping handle */
543 client_ptr_t addr; /* requested address */
544 mem_size_t size; /* allocation size */
545 file_pos_t offset; /* file offset */
546 unsigned int alloc_type;/* allocation type */
547 unsigned short zero_bits; /* allocation alignment */
548 unsigned short prot; /* memory protection flags */
549 } map_view;
550 struct
552 enum apc_type type; /* APC_UNMAP_VIEW */
553 int __pad;
554 client_ptr_t addr; /* view address */
555 } unmap_view;
556 struct
558 enum apc_type type; /* APC_CREATE_THREAD */
559 int suspend; /* suspended thread? */
560 client_ptr_t func; /* void (__stdcall *func)(void*); start function */
561 client_ptr_t arg; /* argument for start function */
562 mem_size_t reserve; /* reserve size for thread stack */
563 mem_size_t commit; /* commit size for thread stack */
564 } create_thread;
565 } apc_call_t;
567 typedef union
569 enum apc_type type;
570 struct
572 enum apc_type type; /* APC_ASYNC_IO */
573 unsigned int status; /* new status of async operation */
574 unsigned int total; /* bytes transferred */
575 } async_io;
576 struct
578 enum apc_type type; /* APC_VIRTUAL_ALLOC */
579 unsigned int status; /* status returned by call */
580 client_ptr_t addr; /* resulting address */
581 mem_size_t size; /* resulting size */
582 } virtual_alloc;
583 struct
585 enum apc_type type; /* APC_VIRTUAL_FREE */
586 unsigned int status; /* status returned by call */
587 client_ptr_t addr; /* resulting address */
588 mem_size_t size; /* resulting size */
589 } virtual_free;
590 struct
592 enum apc_type type; /* APC_VIRTUAL_QUERY */
593 unsigned int status; /* status returned by call */
594 client_ptr_t base; /* resulting base address */
595 client_ptr_t alloc_base;/* resulting allocation base */
596 mem_size_t size; /* resulting region size */
597 unsigned short state; /* resulting region state */
598 unsigned short prot; /* resulting region protection */
599 unsigned short alloc_prot;/* resulting allocation protection */
600 unsigned short alloc_type;/* resulting region allocation type */
601 } virtual_query;
602 struct
604 enum apc_type type; /* APC_VIRTUAL_PROTECT */
605 unsigned int status; /* status returned by call */
606 client_ptr_t addr; /* resulting address */
607 mem_size_t size; /* resulting size */
608 unsigned int prot; /* old protection flags */
609 } virtual_protect;
610 struct
612 enum apc_type type; /* APC_VIRTUAL_FLUSH */
613 unsigned int status; /* status returned by call */
614 client_ptr_t addr; /* resulting address */
615 mem_size_t size; /* resulting size */
616 } virtual_flush;
617 struct
619 enum apc_type type; /* APC_VIRTUAL_LOCK */
620 unsigned int status; /* status returned by call */
621 client_ptr_t addr; /* resulting address */
622 mem_size_t size; /* resulting size */
623 } virtual_lock;
624 struct
626 enum apc_type type; /* APC_VIRTUAL_UNLOCK */
627 unsigned int status; /* status returned by call */
628 client_ptr_t addr; /* resulting address */
629 mem_size_t size; /* resulting size */
630 } virtual_unlock;
631 struct
633 enum apc_type type; /* APC_MAP_VIEW */
634 unsigned int status; /* status returned by call */
635 client_ptr_t addr; /* resulting address */
636 mem_size_t size; /* resulting size */
637 } map_view;
638 struct
640 enum apc_type type; /* APC_MAP_VIEW */
641 unsigned int status; /* status returned by call */
642 } unmap_view;
643 struct
645 enum apc_type type; /* APC_CREATE_THREAD */
646 unsigned int status; /* status returned by call */
647 thread_id_t tid; /* thread id */
648 obj_handle_t handle; /* handle to new thread */
649 } create_thread;
650 } apc_result_t;
652 typedef union
654 unsigned int major; /* irp major function */
655 struct
657 unsigned int major; /* IRP_MJ_CREATE */
658 unsigned int access; /* access rights */
659 unsigned int sharing; /* sharing flags */
660 unsigned int options; /* file options */
661 client_ptr_t device; /* opaque ptr for the device */
662 } create;
663 struct
665 unsigned int major; /* IRP_MJ_CLOSE */
666 int __pad;
667 client_ptr_t file; /* opaque ptr for the file object */
668 } close;
669 struct
671 unsigned int major; /* IRP_MJ_READ */
672 unsigned int key; /* driver key */
673 client_ptr_t file; /* opaque ptr for the file object */
674 file_pos_t pos; /* file position */
675 } read;
676 struct
678 unsigned int major; /* IRP_MJ_WRITE */
679 unsigned int key; /* driver key */
680 client_ptr_t file; /* opaque ptr for the file object */
681 file_pos_t pos; /* file position */
682 } write;
683 struct
685 unsigned int major; /* IRP_MJ_FLUSH_BUFFERS */
686 int __pad;
687 client_ptr_t file; /* opaque ptr for the file object */
688 } flush;
689 struct
691 unsigned int major; /* IRP_MJ_DEVICE_CONTROL */
692 ioctl_code_t code; /* ioctl code */
693 client_ptr_t file; /* opaque ptr for the file object */
694 } ioctl;
695 } irp_params_t;
697 /* information about a PE image mapping, roughly equivalent to SECTION_IMAGE_INFORMATION */
698 typedef struct
700 client_ptr_t base;
701 client_ptr_t entry_point;
702 mem_size_t map_size;
703 mem_size_t stack_size;
704 mem_size_t stack_commit;
705 unsigned int zerobits;
706 unsigned int subsystem;
707 unsigned short subsystem_low;
708 unsigned short subsystem_high;
709 unsigned int gp;
710 unsigned short image_charact;
711 unsigned short dll_charact;
712 unsigned short machine;
713 unsigned char contains_code;
714 unsigned char image_flags;
715 unsigned int loader_flags;
716 unsigned int header_size;
717 unsigned int file_size;
718 unsigned int checksum;
719 cpu_type_t cpu;
720 } pe_image_info_t;
721 #define IMAGE_FLAGS_ComPlusNativeReady 0x01
722 #define IMAGE_FLAGS_ComPlusILOnly 0x02
723 #define IMAGE_FLAGS_ImageDynamicallyRelocated 0x04
724 #define IMAGE_FLAGS_ImageMappedFlat 0x08
725 #define IMAGE_FLAGS_BaseBelow4gb 0x10
727 struct rawinput_device
729 unsigned short usage_page;
730 unsigned short usage;
731 unsigned int flags;
732 user_handle_t target;
735 /****************************************************************/
736 /* Request declarations */
738 /* Create a new process from the context of the parent */
739 @REQ(new_process)
740 int inherit_all; /* inherit all handles from parent */
741 unsigned int create_flags; /* creation flags */
742 int socket_fd; /* file descriptor for process socket */
743 obj_handle_t exe_file; /* file handle for main exe */
744 unsigned int access; /* access rights for process object */
745 cpu_type_t cpu; /* CPU that the new process will use */
746 data_size_t info_size; /* size of startup info */
747 VARARG(objattr,object_attributes); /* object attributes */
748 VARARG(info,startup_info,info_size); /* startup information */
749 VARARG(env,unicode_str); /* environment for new process */
750 @REPLY
751 obj_handle_t info; /* new process info handle */
752 process_id_t pid; /* process id */
753 obj_handle_t handle; /* process handle (in the current process) */
754 @END
757 /* Execute a process, replacing the current one */
758 @REQ(exec_process)
759 int socket_fd; /* file descriptor for process socket */
760 obj_handle_t exe_file; /* file handle for main exe */
761 cpu_type_t cpu; /* CPU that the new process will use */
762 @END
765 /* Retrieve information about a newly started process */
766 @REQ(get_new_process_info)
767 obj_handle_t info; /* info handle returned from new_process_request */
768 @REPLY
769 int success; /* did the process start successfully? */
770 int exit_code; /* process exit code if failed */
771 @END
774 /* Create a new thread */
775 @REQ(new_thread)
776 obj_handle_t process; /* process in which to create thread */
777 unsigned int access; /* wanted access rights */
778 int suspend; /* new thread should be suspended on creation */
779 int request_fd; /* fd for request pipe */
780 VARARG(objattr,object_attributes); /* object attributes */
781 @REPLY
782 thread_id_t tid; /* thread id */
783 obj_handle_t handle; /* thread handle (in the current process) */
784 @END
787 /* Retrieve the new process startup info */
788 @REQ(get_startup_info)
789 @REPLY
790 data_size_t info_size; /* size of startup info */
791 VARARG(info,startup_info,info_size); /* startup information */
792 VARARG(env,unicode_str); /* environment */
793 @END
796 /* Signal the end of the process initialization */
797 @REQ(init_process_done)
798 int gui; /* is it a GUI process? */
799 mod_handle_t module; /* main module base address */
800 client_ptr_t ldt_copy; /* address of LDT copy (in thread address space) */
801 client_ptr_t entry; /* process entry point */
802 @REPLY
803 int suspend; /* is process suspended? */
804 @END
807 /* Initialize a thread; called from the child after fork()/clone() */
808 @REQ(init_thread)
809 int unix_pid; /* Unix pid of new thread */
810 int unix_tid; /* Unix tid of new thread */
811 int debug_level; /* new debug level */
812 client_ptr_t teb; /* TEB of new thread (in thread address space) */
813 client_ptr_t entry; /* entry point or PEB if initial thread (in thread address space) */
814 int reply_fd; /* fd for reply pipe */
815 int wait_fd; /* fd for blocking calls pipe */
816 cpu_type_t cpu; /* CPU that this thread is running on */
817 @REPLY
818 process_id_t pid; /* process id of the new thread's process */
819 thread_id_t tid; /* thread id of the new thread */
820 timeout_t server_start; /* server start time */
821 data_size_t info_size; /* total size of startup info */
822 int version; /* protocol version */
823 unsigned int all_cpus; /* bitset of supported CPUs */
824 int suspend; /* is thread suspended? */
825 @END
828 /* Terminate a process */
829 @REQ(terminate_process)
830 obj_handle_t handle; /* process handle to terminate */
831 int exit_code; /* process exit code */
832 @REPLY
833 int self; /* suicide? */
834 @END
837 /* Terminate a thread */
838 @REQ(terminate_thread)
839 obj_handle_t handle; /* thread handle to terminate */
840 int exit_code; /* thread exit code */
841 @REPLY
842 int self; /* suicide? */
843 int last; /* last thread in this process? */
844 @END
847 /* Retrieve information about a process */
848 @REQ(get_process_info)
849 obj_handle_t handle; /* process handle */
850 @REPLY
851 process_id_t pid; /* server process id */
852 process_id_t ppid; /* server process id of parent */
853 affinity_t affinity; /* process affinity mask */
854 client_ptr_t peb; /* PEB address in process address space */
855 timeout_t start_time; /* process start time */
856 timeout_t end_time; /* process end time */
857 int exit_code; /* process exit code */
858 int priority; /* priority class */
859 cpu_type_t cpu; /* CPU that this process is running on */
860 short int debugger_present; /* process is being debugged */
861 short int debug_children; /* inherit debugger to child processes */
862 @END
865 /* Retrieve information about a process memory usage */
866 @REQ(get_process_vm_counters)
867 obj_handle_t handle; /* process handle */
868 @REPLY
869 mem_size_t peak_virtual_size; /* peak virtual memory in bytes */
870 mem_size_t virtual_size; /* virtual memory in bytes */
871 mem_size_t peak_working_set_size; /* peak real memory in bytes */
872 mem_size_t working_set_size; /* real memory in bytes */
873 mem_size_t pagefile_usage; /* commit charge in bytes */
874 mem_size_t peak_pagefile_usage; /* peak commit charge in bytes */
875 @END
878 /* Set a process information */
879 @REQ(set_process_info)
880 obj_handle_t handle; /* process handle */
881 int mask; /* setting mask (see below) */
882 int priority; /* priority class */
883 affinity_t affinity; /* affinity mask */
884 @END
885 #define SET_PROCESS_INFO_PRIORITY 0x01
886 #define SET_PROCESS_INFO_AFFINITY 0x02
889 /* Retrieve information about a thread */
890 @REQ(get_thread_info)
891 obj_handle_t handle; /* thread handle */
892 thread_id_t tid_in; /* thread id (optional) */
893 @REPLY
894 process_id_t pid; /* server process id */
895 thread_id_t tid; /* server thread id */
896 client_ptr_t teb; /* thread teb pointer */
897 client_ptr_t entry_point; /* thread entry point */
898 affinity_t affinity; /* thread affinity mask */
899 int exit_code; /* thread exit code */
900 int priority; /* thread priority level */
901 int last; /* last thread in process */
902 @END
905 /* Retrieve information about thread times */
906 @REQ(get_thread_times)
907 obj_handle_t handle; /* thread handle */
908 @REPLY
909 timeout_t creation_time; /* thread creation time */
910 timeout_t exit_time; /* thread exit time */
911 @END
914 /* Set a thread information */
915 @REQ(set_thread_info)
916 obj_handle_t handle; /* thread handle */
917 int mask; /* setting mask (see below) */
918 int priority; /* priority class */
919 affinity_t affinity; /* affinity mask */
920 client_ptr_t entry_point; /* thread entry point */
921 obj_handle_t token; /* impersonation token */
922 @END
923 #define SET_THREAD_INFO_PRIORITY 0x01
924 #define SET_THREAD_INFO_AFFINITY 0x02
925 #define SET_THREAD_INFO_TOKEN 0x04
926 #define SET_THREAD_INFO_ENTRYPOINT 0x08
929 /* Retrieve information about a module */
930 @REQ(get_dll_info)
931 obj_handle_t handle; /* process handle */
932 mod_handle_t base_address; /* base address of module */
933 @REPLY
934 client_ptr_t entry_point;
935 data_size_t filename_len; /* buffer len in bytes required to store filename */
936 VARARG(filename,unicode_str); /* file name of module */
937 @END
940 /* Suspend a thread */
941 @REQ(suspend_thread)
942 obj_handle_t handle; /* thread handle */
943 @REPLY
944 int count; /* new suspend count */
945 @END
948 /* Resume a thread */
949 @REQ(resume_thread)
950 obj_handle_t handle; /* thread handle */
951 @REPLY
952 int count; /* new suspend count */
953 @END
956 /* Notify the server that a dll has been loaded */
957 @REQ(load_dll)
958 data_size_t dbg_offset; /* debug info offset */
959 mod_handle_t base; /* base address */
960 client_ptr_t name; /* ptr to ptr to name (in process addr space) */
961 data_size_t dbg_size; /* debug info size */
962 VARARG(filename,unicode_str); /* file name of dll */
963 @END
966 /* Notify the server that a dll is being unloaded */
967 @REQ(unload_dll)
968 mod_handle_t base; /* base address */
969 @END
972 /* Queue an APC for a thread or process */
973 @REQ(queue_apc)
974 obj_handle_t handle; /* thread or process handle */
975 apc_call_t call; /* call arguments */
976 @REPLY
977 obj_handle_t handle; /* APC handle */
978 int self; /* run APC in caller itself? */
979 @END
982 /* Get the result of an APC call */
983 @REQ(get_apc_result)
984 obj_handle_t handle; /* handle to the APC */
985 @REPLY
986 apc_result_t result; /* result of the APC */
987 @END
990 /* Close a handle for the current process */
991 @REQ(close_handle)
992 obj_handle_t handle; /* handle to close */
993 @END
996 /* Set a handle information */
997 @REQ(set_handle_info)
998 obj_handle_t handle; /* handle we are interested in */
999 int flags; /* new handle flags */
1000 int mask; /* mask for flags to set */
1001 @REPLY
1002 int old_flags; /* old flag value */
1003 @END
1006 /* Duplicate a handle */
1007 @REQ(dup_handle)
1008 obj_handle_t src_process; /* src process handle */
1009 obj_handle_t src_handle; /* src handle to duplicate */
1010 obj_handle_t dst_process; /* dst process handle */
1011 unsigned int access; /* wanted access rights */
1012 unsigned int attributes; /* object attributes */
1013 unsigned int options; /* duplicate options (see below) */
1014 @REPLY
1015 obj_handle_t handle; /* duplicated handle in dst process */
1016 int self; /* is the source the current process? */
1017 int closed; /* whether the source handle has been closed */
1018 @END
1019 #define DUP_HANDLE_CLOSE_SOURCE DUPLICATE_CLOSE_SOURCE
1020 #define DUP_HANDLE_SAME_ACCESS DUPLICATE_SAME_ACCESS
1021 #define DUP_HANDLE_MAKE_GLOBAL 0x80000000 /* Not a Windows flag */
1024 /* Open a handle to a process */
1025 @REQ(open_process)
1026 process_id_t pid; /* process id to open */
1027 unsigned int access; /* wanted access rights */
1028 unsigned int attributes; /* object attributes */
1029 @REPLY
1030 obj_handle_t handle; /* handle to the process */
1031 @END
1034 /* Open a handle to a thread */
1035 @REQ(open_thread)
1036 thread_id_t tid; /* thread id to open */
1037 unsigned int access; /* wanted access rights */
1038 unsigned int attributes; /* object attributes */
1039 @REPLY
1040 obj_handle_t handle; /* handle to the thread */
1041 @END
1044 /* Wait for handles */
1045 @REQ(select)
1046 int flags; /* wait flags (see below) */
1047 client_ptr_t cookie; /* magic cookie to return to client */
1048 timeout_t timeout; /* timeout */
1049 obj_handle_t prev_apc; /* handle to previous APC */
1050 VARARG(result,apc_result); /* result of previous APC */
1051 VARARG(data,select_op); /* operation-specific data */
1052 @REPLY
1053 timeout_t timeout; /* timeout converted to absolute */
1054 apc_call_t call; /* APC call arguments */
1055 obj_handle_t apc_handle; /* handle to next APC */
1056 @END
1057 #define SELECT_ALERTABLE 1
1058 #define SELECT_INTERRUPTIBLE 2
1061 /* Create an event */
1062 @REQ(create_event)
1063 unsigned int access; /* wanted access rights */
1064 int manual_reset; /* manual reset event */
1065 int initial_state; /* initial state of the event */
1066 VARARG(objattr,object_attributes); /* object attributes */
1067 @REPLY
1068 obj_handle_t handle; /* handle to the event */
1069 @END
1071 /* Event operation */
1072 @REQ(event_op)
1073 obj_handle_t handle; /* handle to event */
1074 int op; /* event operation (see below) */
1075 @END
1076 enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT };
1078 @REQ(query_event)
1079 obj_handle_t handle; /* handle to event */
1080 @REPLY
1081 int manual_reset; /* manual reset event */
1082 int state; /* current state of the event */
1083 @END
1085 /* Open an event */
1086 @REQ(open_event)
1087 unsigned int access; /* wanted access rights */
1088 unsigned int attributes; /* object attributes */
1089 obj_handle_t rootdir; /* root directory */
1090 VARARG(name,unicode_str); /* object name */
1091 @REPLY
1092 obj_handle_t handle; /* handle to the event */
1093 @END
1096 /* Create a keyed event */
1097 @REQ(create_keyed_event)
1098 unsigned int access; /* wanted access rights */
1099 VARARG(objattr,object_attributes); /* object attributes */
1100 @REPLY
1101 obj_handle_t handle; /* handle to the event */
1102 @END
1104 /* Open a keyed event */
1105 @REQ(open_keyed_event)
1106 unsigned int access; /* wanted access rights */
1107 unsigned int attributes; /* object attributes */
1108 obj_handle_t rootdir; /* root directory */
1109 VARARG(name,unicode_str); /* object name */
1110 @REPLY
1111 obj_handle_t handle; /* handle to the event */
1112 @END
1115 /* Create a mutex */
1116 @REQ(create_mutex)
1117 unsigned int access; /* wanted access rights */
1118 int owned; /* initially owned? */
1119 VARARG(objattr,object_attributes); /* object attributes */
1120 @REPLY
1121 obj_handle_t handle; /* handle to the mutex */
1122 @END
1125 /* Release a mutex */
1126 @REQ(release_mutex)
1127 obj_handle_t handle; /* handle to the mutex */
1128 @REPLY
1129 unsigned int prev_count; /* value of internal counter, before release */
1130 @END
1133 /* Open a mutex */
1134 @REQ(open_mutex)
1135 unsigned int access; /* wanted access rights */
1136 unsigned int attributes; /* object attributes */
1137 obj_handle_t rootdir; /* root directory */
1138 VARARG(name,unicode_str); /* object name */
1139 @REPLY
1140 obj_handle_t handle; /* handle to the mutex */
1141 @END
1144 /* Query a mutex */
1145 @REQ(query_mutex)
1146 obj_handle_t handle; /* handle to mutex */
1147 @REPLY
1148 unsigned int count; /* current count of mutex */
1149 int owned; /* true if owned by current thread */
1150 int abandoned; /* true if abandoned */
1151 @END
1154 /* Create a semaphore */
1155 @REQ(create_semaphore)
1156 unsigned int access; /* wanted access rights */
1157 unsigned int initial; /* initial count */
1158 unsigned int max; /* maximum count */
1159 VARARG(objattr,object_attributes); /* object attributes */
1160 @REPLY
1161 obj_handle_t handle; /* handle to the semaphore */
1162 @END
1165 /* Release a semaphore */
1166 @REQ(release_semaphore)
1167 obj_handle_t handle; /* handle to the semaphore */
1168 unsigned int count; /* count to add to semaphore */
1169 @REPLY
1170 unsigned int prev_count; /* previous semaphore count */
1171 @END
1173 @REQ(query_semaphore)
1174 obj_handle_t handle; /* handle to the semaphore */
1175 @REPLY
1176 unsigned int current; /* current count */
1177 unsigned int max; /* maximum count */
1178 @END
1180 /* Open a semaphore */
1181 @REQ(open_semaphore)
1182 unsigned int access; /* wanted access rights */
1183 unsigned int attributes; /* object attributes */
1184 obj_handle_t rootdir; /* root directory */
1185 VARARG(name,unicode_str); /* object name */
1186 @REPLY
1187 obj_handle_t handle; /* handle to the semaphore */
1188 @END
1191 /* Create a file */
1192 @REQ(create_file)
1193 unsigned int access; /* wanted access rights */
1194 unsigned int sharing; /* sharing flags */
1195 int create; /* file create action */
1196 unsigned int options; /* file options */
1197 unsigned int attrs; /* file attributes for creation */
1198 VARARG(objattr,object_attributes); /* object attributes */
1199 VARARG(filename,string); /* file name */
1200 @REPLY
1201 obj_handle_t handle; /* handle to the file */
1202 @END
1205 /* Open a file object */
1206 @REQ(open_file_object)
1207 unsigned int access; /* wanted access rights */
1208 unsigned int attributes; /* open attributes */
1209 obj_handle_t rootdir; /* root directory */
1210 unsigned int sharing; /* sharing flags */
1211 unsigned int options; /* file options */
1212 VARARG(filename,unicode_str); /* file name */
1213 @REPLY
1214 obj_handle_t handle; /* handle to the file */
1215 @END
1218 /* Allocate a file handle for a Unix fd */
1219 @REQ(alloc_file_handle)
1220 unsigned int access; /* wanted access rights */
1221 unsigned int attributes; /* object attributes */
1222 int fd; /* file descriptor on the client side */
1223 @REPLY
1224 obj_handle_t handle; /* handle to the file */
1225 @END
1228 /* Get the Unix name from a file handle */
1229 @REQ(get_handle_unix_name)
1230 obj_handle_t handle; /* file handle */
1231 @REPLY
1232 data_size_t name_len; /* unix name length */
1233 VARARG(name,string); /* unix name */
1234 @END
1237 /* Get a Unix fd to access a file */
1238 @REQ(get_handle_fd)
1239 obj_handle_t handle; /* handle to the file */
1240 @REPLY
1241 int type; /* file type (see below) */
1242 int cacheable; /* can fd be cached in the client? */
1243 unsigned int access; /* file access rights */
1244 unsigned int options; /* file open options */
1245 @END
1246 enum server_fd_type
1248 FD_TYPE_INVALID, /* invalid file (no associated fd) */
1249 FD_TYPE_FILE, /* regular file */
1250 FD_TYPE_DIR, /* directory */
1251 FD_TYPE_SOCKET, /* socket */
1252 FD_TYPE_SERIAL, /* serial port */
1253 FD_TYPE_PIPE, /* named pipe */
1254 FD_TYPE_MAILSLOT, /* mailslot */
1255 FD_TYPE_CHAR, /* unspecified char device */
1256 FD_TYPE_DEVICE, /* Windows device file */
1257 FD_TYPE_NB_TYPES
1261 /* Retrieve (or allocate) the client-side directory cache entry */
1262 @REQ(get_directory_cache_entry)
1263 obj_handle_t handle; /* handle to the directory */
1264 @REPLY
1265 int entry; /* cache entry on the client side */
1266 VARARG(free,ints); /* entries that can be freed */
1267 @END
1270 /* Flush a file buffers */
1271 @REQ(flush)
1272 async_data_t async; /* async I/O parameters */
1273 @REPLY
1274 obj_handle_t event; /* event set when finished */
1275 @END
1277 /* Query file information */
1278 @REQ(get_file_info)
1279 obj_handle_t handle; /* handle to the file */
1280 unsigned int info_class; /* queried information class */
1281 @REPLY
1282 VARARG(data,bytes); /* file info data */
1283 @END
1285 /* Query volume information */
1286 @REQ(get_volume_info)
1287 obj_handle_t handle; /* handle to the file */
1288 unsigned int info_class; /* queried information class */
1289 @REPLY
1290 VARARG(data,bytes); /* volume info data */
1291 @END
1293 /* Lock a region of a file */
1294 @REQ(lock_file)
1295 obj_handle_t handle; /* handle to the file */
1296 file_pos_t offset; /* offset of start of lock */
1297 file_pos_t count; /* count of bytes to lock */
1298 int shared; /* shared or exclusive lock? */
1299 int wait; /* do we want to wait? */
1300 @REPLY
1301 obj_handle_t handle; /* handle to wait on */
1302 int overlapped; /* is it an overlapped I/O handle? */
1303 @END
1306 /* Unlock a region of a file */
1307 @REQ(unlock_file)
1308 obj_handle_t handle; /* handle to the file */
1309 file_pos_t offset; /* offset of start of unlock */
1310 file_pos_t count; /* count of bytes to unlock */
1311 @END
1314 /* Create a socket */
1315 @REQ(create_socket)
1316 unsigned int access; /* wanted access rights */
1317 unsigned int attributes; /* object attributes */
1318 int family; /* family, see socket manpage */
1319 int type; /* type, see socket manpage */
1320 int protocol; /* protocol, see socket manpage */
1321 unsigned int flags; /* socket flags */
1322 @REPLY
1323 obj_handle_t handle; /* handle to the new socket */
1324 @END
1327 /* Accept a socket */
1328 @REQ(accept_socket)
1329 obj_handle_t lhandle; /* handle to the listening socket */
1330 unsigned int access; /* wanted access rights */
1331 unsigned int attributes; /* object attributes */
1332 @REPLY
1333 obj_handle_t handle; /* handle to the new socket */
1334 @END
1337 /* Accept into an initialized socket */
1338 @REQ(accept_into_socket)
1339 obj_handle_t lhandle; /* handle to the listening socket */
1340 obj_handle_t ahandle; /* handle to the accepting socket */
1341 @END
1344 /* Set socket event parameters */
1345 @REQ(set_socket_event)
1346 obj_handle_t handle; /* handle to the socket */
1347 unsigned int mask; /* event mask */
1348 obj_handle_t event; /* event object */
1349 user_handle_t window; /* window to send the message to */
1350 unsigned int msg; /* message to send */
1351 @END
1354 /* Get socket event parameters */
1355 @REQ(get_socket_event)
1356 obj_handle_t handle; /* handle to the socket */
1357 int service; /* clear pending? */
1358 obj_handle_t c_event; /* event to clear */
1359 @REPLY
1360 unsigned int mask; /* event mask */
1361 unsigned int pmask; /* pending events */
1362 unsigned int state; /* status bits */
1363 VARARG(errors,ints); /* event errors */
1364 @END
1367 /* Get socket info */
1368 @REQ(get_socket_info)
1369 obj_handle_t handle; /* handle to the socket */
1370 @REPLY
1371 int family; /* family, see socket manpage */
1372 int type; /* type, see socket manpage */
1373 int protocol; /* protocol, see socket manpage */
1374 @END
1377 /* Re-enable pending socket events */
1378 @REQ(enable_socket_event)
1379 obj_handle_t handle; /* handle to the socket */
1380 unsigned int mask; /* events to re-enable */
1381 unsigned int sstate; /* status bits to set */
1382 unsigned int cstate; /* status bits to clear */
1383 @END
1385 @REQ(set_socket_deferred)
1386 obj_handle_t handle; /* handle to the socket */
1387 obj_handle_t deferred; /* handle to the socket for which accept() is deferred */
1388 @END
1390 /* Allocate a console (only used by a console renderer) */
1391 @REQ(alloc_console)
1392 unsigned int access; /* wanted access rights */
1393 unsigned int attributes; /* object attributes */
1394 process_id_t pid; /* pid of process which shall be attached to the console */
1395 int input_fd; /* if pid=-1 (bare console to current process), fd for input */
1396 @REPLY
1397 obj_handle_t handle_in; /* handle to console input */
1398 obj_handle_t event; /* handle to renderer events change notification */
1399 @END
1402 /* Free the console of the current process */
1403 @REQ(free_console)
1404 @END
1407 #define CONSOLE_RENDERER_NONE_EVENT 0x00
1408 #define CONSOLE_RENDERER_TITLE_EVENT 0x01
1409 #define CONSOLE_RENDERER_ACTIVE_SB_EVENT 0x02
1410 #define CONSOLE_RENDERER_SB_RESIZE_EVENT 0x03
1411 #define CONSOLE_RENDERER_UPDATE_EVENT 0x04
1412 #define CONSOLE_RENDERER_CURSOR_POS_EVENT 0x05
1413 #define CONSOLE_RENDERER_CURSOR_GEOM_EVENT 0x06
1414 #define CONSOLE_RENDERER_DISPLAY_EVENT 0x07
1415 #define CONSOLE_RENDERER_EXIT_EVENT 0x08
1416 struct console_renderer_event
1418 short event;
1419 union
1421 struct
1423 short top;
1424 short bottom;
1425 } update;
1426 struct
1428 short width;
1429 short height;
1430 } resize;
1431 struct
1433 short x;
1434 short y;
1435 } cursor_pos;
1436 struct
1438 short visible;
1439 short size;
1440 } cursor_geom;
1441 struct
1443 short left;
1444 short top;
1445 short width;
1446 short height;
1447 } display;
1448 } u;
1451 /* retrieve console events for the renderer */
1452 @REQ(get_console_renderer_events)
1453 obj_handle_t handle; /* handle to console input events */
1454 @REPLY
1455 VARARG(data,bytes); /* the various console_renderer_events */
1456 @END
1459 /* Open a handle to the process console */
1460 @REQ(open_console)
1461 obj_handle_t from; /* 0 (resp 1) input (resp output) of current process console */
1462 /* otherwise console_in handle to get active screen buffer? */
1463 unsigned int access; /* wanted access rights */
1464 unsigned int attributes; /* object attributes */
1465 int share; /* share mask (only for output handles) */
1466 @REPLY
1467 obj_handle_t handle; /* handle to the console */
1468 @END
1471 /* Attach to a other process's console */
1472 @REQ(attach_console)
1473 process_id_t pid; /* pid of attached console process */
1474 @REPLY
1475 obj_handle_t std_in; /* attached stdin */
1476 obj_handle_t std_out; /* attached stdout */
1477 obj_handle_t std_err; /* attached stderr */
1478 @END
1481 /* Get the input queue wait event */
1482 @REQ(get_console_wait_event)
1483 @REPLY
1484 obj_handle_t handle;
1485 @END
1487 /* Get a console mode (input or output) */
1488 @REQ(get_console_mode)
1489 obj_handle_t handle; /* handle to the console */
1490 @REPLY
1491 int mode; /* console mode */
1492 @END
1495 /* Set a console mode (input or output) */
1496 @REQ(set_console_mode)
1497 obj_handle_t handle; /* handle to the console */
1498 int mode; /* console mode */
1499 @END
1502 /* Set info about a console (input only) */
1503 @REQ(set_console_input_info)
1504 obj_handle_t handle; /* handle to console input, or 0 for process' console */
1505 int mask; /* setting mask (see below) */
1506 obj_handle_t active_sb; /* active screen buffer */
1507 int history_mode; /* whether we duplicate lines in history */
1508 int history_size; /* number of lines in history */
1509 int edition_mode; /* index to the edition mode flavors */
1510 int input_cp; /* console input codepage */
1511 int output_cp; /* console output codepage */
1512 user_handle_t win; /* console window if backend supports it */
1513 VARARG(title,unicode_str); /* console title */
1514 @END
1515 #define SET_CONSOLE_INPUT_INFO_ACTIVE_SB 0x01
1516 #define SET_CONSOLE_INPUT_INFO_TITLE 0x02
1517 #define SET_CONSOLE_INPUT_INFO_HISTORY_MODE 0x04
1518 #define SET_CONSOLE_INPUT_INFO_HISTORY_SIZE 0x08
1519 #define SET_CONSOLE_INPUT_INFO_EDITION_MODE 0x10
1520 #define SET_CONSOLE_INPUT_INFO_INPUT_CODEPAGE 0x20
1521 #define SET_CONSOLE_INPUT_INFO_OUTPUT_CODEPAGE 0x40
1522 #define SET_CONSOLE_INPUT_INFO_WIN 0x80
1525 /* Get info about a console (input only) */
1526 @REQ(get_console_input_info)
1527 obj_handle_t handle; /* handle to console input, or 0 for process' console */
1528 @REPLY
1529 int history_mode; /* whether we duplicate lines in history */
1530 int history_size; /* number of lines in history */
1531 int history_index; /* number of used lines in history */
1532 int edition_mode; /* index to the edition mode flavors */
1533 int input_cp; /* console input codepage */
1534 int output_cp; /* console output codepage */
1535 user_handle_t win; /* console window if backend supports it */
1536 VARARG(title,unicode_str); /* console title */
1537 @END
1540 /* appends a string to console's history */
1541 @REQ(append_console_input_history)
1542 obj_handle_t handle; /* handle to console input, or 0 for process' console */
1543 VARARG(line,unicode_str); /* line to add */
1544 @END
1547 /* appends a string to console's history */
1548 @REQ(get_console_input_history)
1549 obj_handle_t handle; /* handle to console input, or 0 for process' console */
1550 int index; /* index to get line from */
1551 @REPLY
1552 int total; /* total length of line in Unicode chars */
1553 VARARG(line,unicode_str); /* line to add */
1554 @END
1557 /* creates a new screen buffer on process' console */
1558 @REQ(create_console_output)
1559 obj_handle_t handle_in; /* handle to console input, or 0 for process' console */
1560 unsigned int access; /* wanted access rights */
1561 unsigned int attributes; /* object attributes */
1562 unsigned int share; /* sharing credentials */
1563 int fd; /* for bare consoles, fd the screen-buffer is attached to */
1564 @REPLY
1565 obj_handle_t handle_out; /* handle to the screen buffer */
1566 @END
1569 /* Set info about a console (output only) */
1570 @REQ(set_console_output_info)
1571 obj_handle_t handle; /* handle to the console */
1572 int mask; /* setting mask (see below) */
1573 short int cursor_size; /* size of cursor (percentage filled) */
1574 short int cursor_visible;/* cursor visibility flag */
1575 short int cursor_x; /* position of cursor (x, y) */
1576 short int cursor_y;
1577 short int width; /* width of the screen buffer */
1578 short int height; /* height of the screen buffer */
1579 short int attr; /* default fill attributes (screen colors) */
1580 short int popup_attr; /* pop-up color attributes */
1581 short int win_left; /* window actually displayed by renderer */
1582 short int win_top; /* the rect area is expressed within the */
1583 short int win_right; /* boundaries of the screen buffer */
1584 short int win_bottom;
1585 short int max_width; /* maximum size (width x height) for the window */
1586 short int max_height;
1587 short int font_width; /* font size (width x height) */
1588 short int font_height;
1589 VARARG(colors,uints); /* color table */
1590 @END
1591 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_GEOM 0x0001
1592 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_POS 0x0002
1593 #define SET_CONSOLE_OUTPUT_INFO_SIZE 0x0004
1594 #define SET_CONSOLE_OUTPUT_INFO_ATTR 0x0008
1595 #define SET_CONSOLE_OUTPUT_INFO_DISPLAY_WINDOW 0x0010
1596 #define SET_CONSOLE_OUTPUT_INFO_MAX_SIZE 0x0020
1597 #define SET_CONSOLE_OUTPUT_INFO_FONT 0x0040
1598 #define SET_CONSOLE_OUTPUT_INFO_COLORTABLE 0x0080
1599 #define SET_CONSOLE_OUTPUT_INFO_POPUP_ATTR 0x0100
1602 /* Get info about a console (output only) */
1603 @REQ(get_console_output_info)
1604 obj_handle_t handle; /* handle to the console */
1605 @REPLY
1606 short int cursor_size; /* size of cursor (percentage filled) */
1607 short int cursor_visible;/* cursor visibility flag */
1608 short int cursor_x; /* position of cursor (x, y) */
1609 short int cursor_y;
1610 short int width; /* width of the screen buffer */
1611 short int height; /* height of the screen buffer */
1612 short int attr; /* default fill attributes (screen colors) */
1613 short int popup_attr; /* pop-up color attributes */
1614 short int win_left; /* window actually displayed by renderer */
1615 short int win_top; /* the rect area is expressed within the */
1616 short int win_right; /* boundaries of the screen buffer */
1617 short int win_bottom;
1618 short int max_width; /* maximum size (width x height) for the window */
1619 short int max_height;
1620 short int font_width; /* font size (width x height) */
1621 short int font_height;
1622 VARARG(colors,uints); /* color table */
1623 @END
1625 /* Add input records to a console input queue */
1626 @REQ(write_console_input)
1627 obj_handle_t handle; /* handle to the console input */
1628 VARARG(rec,input_records); /* input records */
1629 @REPLY
1630 int written; /* number of records written */
1631 @END
1634 /* Fetch input records from a console input queue */
1635 @REQ(read_console_input)
1636 obj_handle_t handle; /* handle to the console input */
1637 int flush; /* flush the retrieved records from the queue? */
1638 @REPLY
1639 int read; /* number of records read */
1640 VARARG(rec,input_records); /* input records */
1641 @END
1644 /* write data (chars and/or attributes) in a screen buffer */
1645 @REQ(write_console_output)
1646 obj_handle_t handle; /* handle to the console output */
1647 int x; /* position where to start writing */
1648 int y;
1649 int mode; /* char info (see below) */
1650 int wrap; /* wrap around at end of line? */
1651 VARARG(data,bytes); /* info to write */
1652 @REPLY
1653 int written; /* number of char infos actually written */
1654 int width; /* width of screen buffer */
1655 int height; /* height of screen buffer */
1656 @END
1657 enum char_info_mode
1659 CHAR_INFO_MODE_TEXT, /* characters only */
1660 CHAR_INFO_MODE_ATTR, /* attributes only */
1661 CHAR_INFO_MODE_TEXTATTR, /* both characters and attributes */
1662 CHAR_INFO_MODE_TEXTSTDATTR /* characters but use standard attributes */
1666 /* fill a screen buffer with constant data (chars and/or attributes) */
1667 @REQ(fill_console_output)
1668 obj_handle_t handle; /* handle to the console output */
1669 int x; /* position where to start writing */
1670 int y;
1671 int mode; /* char info mode */
1672 int count; /* number to write */
1673 int wrap; /* wrap around at end of line? */
1674 char_info_t data; /* data to write */
1675 @REPLY
1676 int written; /* number of char infos actually written */
1677 @END
1680 /* read data (chars and/or attributes) from a screen buffer */
1681 @REQ(read_console_output)
1682 obj_handle_t handle; /* handle to the console output */
1683 int x; /* position (x,y) where to start reading */
1684 int y;
1685 int mode; /* char info mode */
1686 int wrap; /* wrap around at end of line? */
1687 @REPLY
1688 int width; /* width of screen buffer */
1689 int height; /* height of screen buffer */
1690 VARARG(data,bytes);
1691 @END
1694 /* move a rect (of data) in screen buffer content */
1695 @REQ(move_console_output)
1696 obj_handle_t handle; /* handle to the console output */
1697 short int x_src; /* position (x, y) of rect to start moving from */
1698 short int y_src;
1699 short int x_dst; /* position (x, y) of rect to move to */
1700 short int y_dst;
1701 short int w; /* size of the rect (width, height) to move */
1702 short int h;
1703 @END
1706 /* Sends a signal to a process group */
1707 @REQ(send_console_signal)
1708 int signal; /* the signal to send */
1709 process_id_t group_id; /* the group to send the signal to */
1710 @END
1713 /* enable directory change notifications */
1714 @REQ(read_directory_changes)
1715 unsigned int filter; /* notification filter */
1716 int subtree; /* watch the subtree? */
1717 int want_data; /* flag indicating whether change data should be collected */
1718 async_data_t async; /* async I/O parameters */
1719 @END
1722 @REQ(read_change)
1723 obj_handle_t handle;
1724 @REPLY
1725 VARARG(events,filesystem_event); /* collected filesystem events */
1726 @END
1729 /* Create a file mapping */
1730 @REQ(create_mapping)
1731 unsigned int access; /* wanted access rights */
1732 unsigned int flags; /* SEC_* flags */
1733 unsigned int file_access; /* file access rights */
1734 mem_size_t size; /* mapping size */
1735 obj_handle_t file_handle; /* file handle */
1736 VARARG(objattr,object_attributes); /* object attributes */
1737 @REPLY
1738 obj_handle_t handle; /* handle to the mapping */
1739 @END
1742 /* Open a mapping */
1743 @REQ(open_mapping)
1744 unsigned int access; /* wanted access rights */
1745 unsigned int attributes; /* object attributes */
1746 obj_handle_t rootdir; /* root directory */
1747 VARARG(name,unicode_str); /* object name */
1748 @REPLY
1749 obj_handle_t handle; /* handle to the mapping */
1750 @END
1753 /* Get information about a file mapping */
1754 @REQ(get_mapping_info)
1755 obj_handle_t handle; /* handle to the mapping */
1756 unsigned int access; /* wanted access rights */
1757 @REPLY
1758 mem_size_t size; /* mapping size */
1759 unsigned int flags; /* SEC_* flags */
1760 obj_handle_t shared_file; /* shared mapping file handle */
1761 VARARG(image,pe_image_info);/* image info for SEC_IMAGE mappings */
1762 @END
1765 /* Add a memory view in the current process */
1766 @REQ(map_view)
1767 obj_handle_t mapping; /* file mapping handle */
1768 unsigned int access; /* wanted access rights */
1769 client_ptr_t base; /* view base address (page-aligned) */
1770 mem_size_t size; /* view size */
1771 file_pos_t start; /* start offset in mapping */
1772 @END
1775 /* Unmap a memory view from the current process */
1776 @REQ(unmap_view)
1777 client_ptr_t base; /* view base address */
1778 @END
1781 /* Get a range of committed pages in a file mapping */
1782 @REQ(get_mapping_committed_range)
1783 client_ptr_t base; /* view base address */
1784 file_pos_t offset; /* starting offset (page-aligned, in bytes) */
1785 @REPLY
1786 mem_size_t size; /* size of range starting at offset (page-aligned, in bytes) */
1787 int committed; /* whether it is a committed range */
1788 @END
1791 /* Add a range to the committed pages in a file mapping */
1792 @REQ(add_mapping_committed_range)
1793 client_ptr_t base; /* view base address */
1794 file_pos_t offset; /* starting offset (page-aligned, in bytes) */
1795 mem_size_t size; /* size to set (page-aligned, in bytes) or 0 if only retrieving */
1796 @END
1799 /* Check if two memory maps are for the same file */
1800 @REQ(is_same_mapping)
1801 client_ptr_t base1; /* first view base address */
1802 client_ptr_t base2; /* second view base address */
1803 @END
1806 #define SNAP_PROCESS 0x00000001
1807 #define SNAP_THREAD 0x00000002
1808 /* Create a snapshot */
1809 @REQ(create_snapshot)
1810 unsigned int attributes; /* object attributes */
1811 unsigned int flags; /* snapshot flags (SNAP_*) */
1812 @REPLY
1813 obj_handle_t handle; /* handle to the snapshot */
1814 @END
1817 /* Get the next process from a snapshot */
1818 @REQ(next_process)
1819 obj_handle_t handle; /* handle to the snapshot */
1820 int reset; /* reset snapshot position? */
1821 @REPLY
1822 int count; /* process usage count */
1823 process_id_t pid; /* process id */
1824 process_id_t ppid; /* parent process id */
1825 int threads; /* number of threads */
1826 int priority; /* process priority */
1827 int handles; /* number of handles */
1828 int unix_pid; /* Unix pid */
1829 VARARG(filename,unicode_str); /* file name of main exe */
1830 @END
1833 /* Get the next thread from a snapshot */
1834 @REQ(next_thread)
1835 obj_handle_t handle; /* handle to the snapshot */
1836 int reset; /* reset snapshot position? */
1837 @REPLY
1838 int count; /* thread usage count */
1839 process_id_t pid; /* process id */
1840 thread_id_t tid; /* thread id */
1841 int base_pri; /* base priority */
1842 int delta_pri; /* delta priority */
1843 @END
1846 /* Wait for a debug event */
1847 @REQ(wait_debug_event)
1848 int get_handle; /* should we alloc a handle for waiting? */
1849 @REPLY
1850 process_id_t pid; /* process id */
1851 thread_id_t tid; /* thread id */
1852 obj_handle_t wait; /* wait handle if no event ready */
1853 VARARG(event,debug_event); /* debug event data */
1854 @END
1857 /* Queue an exception event */
1858 @REQ(queue_exception_event)
1859 int first; /* first chance exception? */
1860 unsigned int code; /* exception code */
1861 unsigned int flags; /* exception flags */
1862 client_ptr_t record; /* exception record */
1863 client_ptr_t address; /* exception address */
1864 data_size_t len; /* size of parameters */
1865 VARARG(params,uints64,len);/* exception parameters */
1866 VARARG(context,context); /* thread context */
1867 @REPLY
1868 obj_handle_t handle; /* handle to the queued event */
1869 @END
1872 /* Retrieve the status of an exception event */
1873 @REQ(get_exception_status)
1874 obj_handle_t handle; /* handle to the queued event */
1875 @REPLY
1876 VARARG(context,context); /* modified thread context */
1877 @END
1880 /* Continue a debug event */
1881 @REQ(continue_debug_event)
1882 process_id_t pid; /* process id to continue */
1883 thread_id_t tid; /* thread id to continue */
1884 int status; /* continuation status */
1885 @END
1888 /* Start/stop debugging an existing process */
1889 @REQ(debug_process)
1890 process_id_t pid; /* id of the process to debug */
1891 int attach; /* 1=attaching / 0=detaching from the process */
1892 @END
1895 /* Simulate a breakpoint in a process */
1896 @REQ(debug_break)
1897 obj_handle_t handle; /* process handle */
1898 @REPLY
1899 int self; /* was it the caller itself? */
1900 @END
1903 /* Set debugger kill on exit flag */
1904 @REQ(set_debugger_kill_on_exit)
1905 int kill_on_exit; /* 0=detach/1=kill debuggee when debugger dies */
1906 @END
1909 /* Read data from a process address space */
1910 @REQ(read_process_memory)
1911 obj_handle_t handle; /* process handle */
1912 client_ptr_t addr; /* addr to read from */
1913 @REPLY
1914 VARARG(data,bytes); /* result data */
1915 @END
1918 /* Write data to a process address space */
1919 @REQ(write_process_memory)
1920 obj_handle_t handle; /* process handle */
1921 client_ptr_t addr; /* addr to write to */
1922 VARARG(data,bytes); /* data to write */
1923 @END
1926 /* Create a registry key */
1927 @REQ(create_key)
1928 unsigned int access; /* desired access rights */
1929 unsigned int options; /* creation options */
1930 VARARG(objattr,object_attributes); /* object attributes */
1931 VARARG(class,unicode_str); /* class name */
1932 @REPLY
1933 obj_handle_t hkey; /* handle to the created key */
1934 int created; /* has it been newly created? */
1935 @END
1937 /* Open a registry key */
1938 @REQ(open_key)
1939 obj_handle_t parent; /* handle to the parent key */
1940 unsigned int access; /* desired access rights */
1941 unsigned int attributes; /* object attributes */
1942 VARARG(name,unicode_str); /* key name */
1943 @REPLY
1944 obj_handle_t hkey; /* handle to the open key */
1945 @END
1948 /* Delete a registry key */
1949 @REQ(delete_key)
1950 obj_handle_t hkey; /* handle to the key */
1951 @END
1954 /* Flush a registry key */
1955 @REQ(flush_key)
1956 obj_handle_t hkey; /* handle to the key */
1957 @END
1960 /* Enumerate registry subkeys */
1961 @REQ(enum_key)
1962 obj_handle_t hkey; /* handle to registry key */
1963 int index; /* index of subkey (or -1 for current key) */
1964 int info_class; /* requested information class */
1965 @REPLY
1966 int subkeys; /* number of subkeys */
1967 int max_subkey; /* longest subkey name */
1968 int max_class; /* longest class name */
1969 int values; /* number of values */
1970 int max_value; /* longest value name */
1971 int max_data; /* longest value data */
1972 timeout_t modif; /* last modification time */
1973 data_size_t total; /* total length needed for full name and class */
1974 data_size_t namelen; /* length of key name in bytes */
1975 VARARG(name,unicode_str,namelen); /* key name */
1976 VARARG(class,unicode_str); /* class name */
1977 @END
1980 /* Set a value of a registry key */
1981 @REQ(set_key_value)
1982 obj_handle_t hkey; /* handle to registry key */
1983 int type; /* value type */
1984 data_size_t namelen; /* length of value name in bytes */
1985 VARARG(name,unicode_str,namelen); /* value name */
1986 VARARG(data,bytes); /* value data */
1987 @END
1990 /* Retrieve the value of a registry key */
1991 @REQ(get_key_value)
1992 obj_handle_t hkey; /* handle to registry key */
1993 VARARG(name,unicode_str); /* value name */
1994 @REPLY
1995 int type; /* value type */
1996 data_size_t total; /* total length needed for data */
1997 VARARG(data,bytes); /* value data */
1998 @END
2001 /* Enumerate a value of a registry key */
2002 @REQ(enum_key_value)
2003 obj_handle_t hkey; /* handle to registry key */
2004 int index; /* value index */
2005 int info_class; /* requested information class */
2006 @REPLY
2007 int type; /* value type */
2008 data_size_t total; /* total length needed for full name and data */
2009 data_size_t namelen; /* length of value name in bytes */
2010 VARARG(name,unicode_str,namelen); /* value name */
2011 VARARG(data,bytes); /* value data */
2012 @END
2015 /* Delete a value of a registry key */
2016 @REQ(delete_key_value)
2017 obj_handle_t hkey; /* handle to registry key */
2018 VARARG(name,unicode_str); /* value name */
2019 @END
2022 /* Load a registry branch from a file */
2023 @REQ(load_registry)
2024 obj_handle_t file; /* file to load from */
2025 VARARG(objattr,object_attributes); /* object attributes */
2026 @END
2029 /* UnLoad a registry branch from a file */
2030 @REQ(unload_registry)
2031 obj_handle_t hkey; /* root key to unload to */
2032 @END
2035 /* Save a registry branch to a file */
2036 @REQ(save_registry)
2037 obj_handle_t hkey; /* key to save */
2038 obj_handle_t file; /* file to save to */
2039 @END
2042 /* Add a registry key change notification */
2043 @REQ(set_registry_notification)
2044 obj_handle_t hkey; /* key to watch for changes */
2045 obj_handle_t event; /* event to set */
2046 int subtree; /* should we watch the whole subtree? */
2047 unsigned int filter; /* things to watch */
2048 @END
2051 /* Create a waitable timer */
2052 @REQ(create_timer)
2053 unsigned int access; /* wanted access rights */
2054 int manual; /* manual reset */
2055 VARARG(objattr,object_attributes); /* object attributes */
2056 @REPLY
2057 obj_handle_t handle; /* handle to the timer */
2058 @END
2061 /* Open a waitable timer */
2062 @REQ(open_timer)
2063 unsigned int access; /* wanted access rights */
2064 unsigned int attributes; /* object attributes */
2065 obj_handle_t rootdir; /* root directory */
2066 VARARG(name,unicode_str); /* object name */
2067 @REPLY
2068 obj_handle_t handle; /* handle to the timer */
2069 @END
2071 /* Set a waitable timer */
2072 @REQ(set_timer)
2073 obj_handle_t handle; /* handle to the timer */
2074 timeout_t expire; /* next expiration absolute time */
2075 client_ptr_t callback; /* callback function */
2076 client_ptr_t arg; /* callback argument */
2077 int period; /* timer period in ms */
2078 @REPLY
2079 int signaled; /* was the timer signaled before this call ? */
2080 @END
2082 /* Cancel a waitable timer */
2083 @REQ(cancel_timer)
2084 obj_handle_t handle; /* handle to the timer */
2085 @REPLY
2086 int signaled; /* was the timer signaled before this calltime ? */
2087 @END
2089 /* Get information on a waitable timer */
2090 @REQ(get_timer_info)
2091 obj_handle_t handle; /* handle to the timer */
2092 @REPLY
2093 timeout_t when; /* absolute time when the timer next expires */
2094 int signaled; /* is the timer signaled? */
2095 @END
2098 /* Retrieve the current context of a thread */
2099 @REQ(get_thread_context)
2100 obj_handle_t handle; /* thread handle */
2101 unsigned int flags; /* context flags */
2102 int suspend; /* suspend the thread if needed */
2103 @REPLY
2104 int self; /* was it a handle to the current thread? */
2105 VARARG(context,context); /* thread context */
2106 @END
2109 /* Set the current context of a thread */
2110 @REQ(set_thread_context)
2111 obj_handle_t handle; /* thread handle */
2112 int suspend; /* suspend the thread if needed */
2113 VARARG(context,context); /* thread context */
2114 @REPLY
2115 int self; /* was it a handle to the current thread? */
2116 @END
2119 /* Fetch a selector entry for a thread */
2120 @REQ(get_selector_entry)
2121 obj_handle_t handle; /* thread handle */
2122 int entry; /* LDT entry */
2123 @REPLY
2124 unsigned int base; /* selector base */
2125 unsigned int limit; /* selector limit */
2126 unsigned char flags; /* selector flags */
2127 @END
2130 /* Add an atom */
2131 @REQ(add_atom)
2132 obj_handle_t table; /* which table to add atom to */
2133 VARARG(name,unicode_str); /* atom name */
2134 @REPLY
2135 atom_t atom; /* resulting atom */
2136 @END
2139 /* Delete an atom */
2140 @REQ(delete_atom)
2141 obj_handle_t table; /* which table to delete atom from */
2142 atom_t atom; /* atom handle */
2143 @END
2146 /* Find an atom */
2147 @REQ(find_atom)
2148 obj_handle_t table; /* which table to find atom from */
2149 VARARG(name,unicode_str); /* atom name */
2150 @REPLY
2151 atom_t atom; /* atom handle */
2152 @END
2155 /* Get information about an atom */
2156 @REQ(get_atom_information)
2157 obj_handle_t table; /* which table to find atom from */
2158 atom_t atom; /* atom handle */
2159 @REPLY
2160 int count; /* atom lock count */
2161 int pinned; /* whether the atom has been pinned */
2162 data_size_t total; /* actual length of atom name */
2163 VARARG(name,unicode_str); /* atom name */
2164 @END
2167 /* Set information about an atom */
2168 @REQ(set_atom_information)
2169 obj_handle_t table; /* which table to find atom from */
2170 atom_t atom; /* atom handle */
2171 int pinned; /* whether to bump atom information */
2172 @END
2175 /* Empty an atom table */
2176 @REQ(empty_atom_table)
2177 obj_handle_t table; /* which table to find atom from */
2178 int if_pinned; /* whether to delete pinned atoms */
2179 @END
2182 /* Init an atom table */
2183 @REQ(init_atom_table)
2184 int entries; /* number of entries (only for local) */
2185 @REPLY
2186 obj_handle_t table; /* handle to the atom table */
2187 @END
2190 /* Get the message queue of the current thread */
2191 @REQ(get_msg_queue)
2192 @REPLY
2193 obj_handle_t handle; /* handle to the queue */
2194 @END
2197 /* Set the file descriptor associated to the current thread queue */
2198 @REQ(set_queue_fd)
2199 obj_handle_t handle; /* handle to the file descriptor */
2200 @END
2203 /* Set the current message queue wakeup mask */
2204 @REQ(set_queue_mask)
2205 unsigned int wake_mask; /* wakeup bits mask */
2206 unsigned int changed_mask; /* changed bits mask */
2207 int skip_wait; /* will we skip waiting if signaled? */
2208 @REPLY
2209 unsigned int wake_bits; /* current wake bits */
2210 unsigned int changed_bits; /* current changed bits */
2211 @END
2214 /* Get the current message queue status */
2215 @REQ(get_queue_status)
2216 unsigned int clear_bits; /* should we clear the change bits? */
2217 @REPLY
2218 unsigned int wake_bits; /* wake bits */
2219 unsigned int changed_bits; /* changed bits since last time */
2220 @END
2223 /* Retrieve the process idle event */
2224 @REQ(get_process_idle_event)
2225 obj_handle_t handle; /* process handle */
2226 @REPLY
2227 obj_handle_t event; /* handle to idle event */
2228 @END
2231 /* Send a message to a thread queue */
2232 @REQ(send_message)
2233 thread_id_t id; /* thread id */
2234 int type; /* message type (see below) */
2235 int flags; /* message flags (see below) */
2236 user_handle_t win; /* window handle */
2237 unsigned int msg; /* message code */
2238 lparam_t wparam; /* parameters */
2239 lparam_t lparam; /* parameters */
2240 timeout_t timeout; /* timeout for reply */
2241 VARARG(data,message_data); /* message data for sent messages */
2242 @END
2244 @REQ(post_quit_message)
2245 int exit_code; /* exit code to return */
2246 @END
2248 enum message_type
2250 MSG_ASCII, /* Ascii message (from SendMessageA) */
2251 MSG_UNICODE, /* Unicode message (from SendMessageW) */
2252 MSG_NOTIFY, /* notify message (from SendNotifyMessageW), always Unicode */
2253 MSG_CALLBACK, /* callback message (from SendMessageCallbackW), always Unicode */
2254 MSG_CALLBACK_RESULT,/* result of a callback message */
2255 MSG_OTHER_PROCESS, /* sent from other process, may include vararg data, always Unicode */
2256 MSG_POSTED, /* posted message (from PostMessageW), always Unicode */
2257 MSG_HARDWARE, /* hardware message */
2258 MSG_WINEVENT, /* winevent message */
2259 MSG_HOOK_LL /* low-level hardware hook */
2261 #define SEND_MSG_ABORT_IF_HUNG 0x01
2264 /* Send a hardware message to a thread queue */
2265 @REQ(send_hardware_message)
2266 user_handle_t win; /* window handle */
2267 hw_input_t input; /* input data */
2268 unsigned int flags; /* flags (see below) */
2269 @REPLY
2270 int wait; /* do we need to wait for a reply? */
2271 int prev_x; /* previous cursor position */
2272 int prev_y;
2273 int new_x; /* new cursor position */
2274 int new_y;
2275 VARARG(keystate,bytes); /* global state array for all the keys */
2276 @END
2277 #define SEND_HWMSG_INJECTED 0x01
2280 /* Get a message from the current queue */
2281 @REQ(get_message)
2282 unsigned int flags; /* PM_* flags */
2283 user_handle_t get_win; /* window handle to get */
2284 unsigned int get_first; /* first message code to get */
2285 unsigned int get_last; /* last message code to get */
2286 unsigned int hw_id; /* id of the previous hardware message (or 0) */
2287 unsigned int wake_mask; /* wakeup bits mask */
2288 unsigned int changed_mask; /* changed bits mask */
2289 @REPLY
2290 user_handle_t win; /* window handle */
2291 unsigned int msg; /* message code */
2292 lparam_t wparam; /* parameters */
2293 lparam_t lparam; /* parameters */
2294 int type; /* message type */
2295 int x; /* message x position */
2296 int y; /* message y position */
2297 unsigned int time; /* message time */
2298 unsigned int active_hooks; /* active hooks bitmap */
2299 data_size_t total; /* total size of extra data */
2300 VARARG(data,message_data); /* message data for sent messages */
2301 @END
2304 /* Reply to a sent message */
2305 @REQ(reply_message)
2306 int remove; /* should we remove the message? */
2307 lparam_t result; /* message result */
2308 VARARG(data,bytes); /* message data for sent messages */
2309 @END
2312 /* Accept the current hardware message */
2313 @REQ(accept_hardware_message)
2314 unsigned int hw_id; /* id of the hardware message */
2315 int remove; /* should we remove the message? */
2316 @END
2319 /* Retrieve the reply for the last message sent */
2320 @REQ(get_message_reply)
2321 int cancel; /* cancel message if not ready? */
2322 @REPLY
2323 lparam_t result; /* message result */
2324 VARARG(data,bytes); /* message data for sent messages */
2325 @END
2328 /* Set a window timer */
2329 @REQ(set_win_timer)
2330 user_handle_t win; /* window handle */
2331 unsigned int msg; /* message to post */
2332 unsigned int rate; /* timer rate in ms */
2333 lparam_t id; /* timer id */
2334 lparam_t lparam; /* message lparam (callback proc) */
2335 @REPLY
2336 lparam_t id; /* timer id */
2337 @END
2340 /* Kill a window timer */
2341 @REQ(kill_win_timer)
2342 user_handle_t win; /* window handle */
2343 lparam_t id; /* timer id */
2344 unsigned int msg; /* message to post */
2345 @END
2348 /* check if the thread owning the window is hung */
2349 @REQ(is_window_hung)
2350 user_handle_t win; /* window handle */
2351 @REPLY
2352 int is_hung;
2353 @END
2356 /* Retrieve info about a serial port */
2357 @REQ(get_serial_info)
2358 obj_handle_t handle; /* handle to comm port */
2359 int flags;
2360 @REPLY
2361 unsigned int eventmask;
2362 unsigned int cookie;
2363 unsigned int pending_write;
2364 @END
2367 /* Set info about a serial port */
2368 @REQ(set_serial_info)
2369 obj_handle_t handle; /* handle to comm port */
2370 int flags; /* bitmask to set values (see below) */
2371 @END
2372 #define SERIALINFO_PENDING_WRITE 0x04
2373 #define SERIALINFO_PENDING_WAIT 0x08
2376 /* Create an async I/O */
2377 @REQ(register_async)
2378 int type; /* type of queue to look after */
2379 async_data_t async; /* async I/O parameters */
2380 int count; /* count - usually # of bytes to be read/written */
2381 @END
2382 #define ASYNC_TYPE_READ 0x01
2383 #define ASYNC_TYPE_WRITE 0x02
2384 #define ASYNC_TYPE_WAIT 0x03
2387 /* Cancel all async op on a fd */
2388 @REQ(cancel_async)
2389 obj_handle_t handle; /* handle to comm port, socket or file */
2390 client_ptr_t iosb; /* I/O status block (NULL=all) */
2391 int only_thread; /* cancel matching this thread */
2392 @END
2395 /* Retrieve results of an async */
2396 @REQ(get_async_result)
2397 client_ptr_t user_arg; /* user arg used to identify async */
2398 @REPLY
2399 data_size_t size; /* result size (input or output depending on the operation) */
2400 VARARG(out_data,bytes); /* iosb output data */
2401 @END
2404 /* Perform a read on a file object */
2405 @REQ(read)
2406 async_data_t async; /* async I/O parameters */
2407 file_pos_t pos; /* read position */
2408 @REPLY
2409 obj_handle_t wait; /* handle to wait on for blocking read */
2410 unsigned int options; /* device open options */
2411 VARARG(data,bytes); /* read data */
2412 @END
2415 /* Perform a write on a file object */
2416 @REQ(write)
2417 async_data_t async; /* async I/O parameters */
2418 file_pos_t pos; /* write position */
2419 VARARG(data,bytes); /* write data */
2420 @REPLY
2421 obj_handle_t wait; /* handle to wait on for blocking write */
2422 unsigned int options; /* device open options */
2423 data_size_t size; /* size written */
2424 @END
2427 /* Perform an ioctl on a file */
2428 @REQ(ioctl)
2429 ioctl_code_t code; /* ioctl code */
2430 async_data_t async; /* async I/O parameters */
2431 VARARG(in_data,bytes); /* ioctl input data */
2432 @REPLY
2433 obj_handle_t wait; /* handle to wait on for blocking ioctl */
2434 unsigned int options; /* device open options */
2435 VARARG(out_data,bytes); /* ioctl output data */
2436 @END
2439 /* Store results of an async irp */
2440 @REQ(set_irp_result)
2441 obj_handle_t handle; /* handle to the irp */
2442 unsigned int status; /* status of the irp */
2443 data_size_t size; /* result size (input or output depending on the operation) */
2444 client_ptr_t file_ptr; /* opaque pointer to the file object */
2445 VARARG(data,bytes); /* output data of the irp */
2446 @END
2449 /* Create a named pipe */
2450 @REQ(create_named_pipe)
2451 unsigned int access;
2452 unsigned int options;
2453 unsigned int sharing;
2454 unsigned int maxinstances;
2455 unsigned int outsize;
2456 unsigned int insize;
2457 timeout_t timeout;
2458 unsigned int flags;
2459 VARARG(objattr,object_attributes); /* object attributes */
2460 @REPLY
2461 obj_handle_t handle; /* handle to the pipe */
2462 @END
2464 /* flags in create_named_pipe and get_named_pipe_info */
2465 #define NAMED_PIPE_MESSAGE_STREAM_WRITE 0x0001
2466 #define NAMED_PIPE_MESSAGE_STREAM_READ 0x0002
2467 #define NAMED_PIPE_NONBLOCKING_MODE 0x0004
2468 #define NAMED_PIPE_SERVER_END 0x8000
2470 /* Set named pipe information by handle */
2471 @REQ(set_named_pipe_info)
2472 obj_handle_t handle;
2473 unsigned int flags;
2474 @END
2476 /* Create a window */
2477 @REQ(create_window)
2478 user_handle_t parent; /* parent window */
2479 user_handle_t owner; /* owner window */
2480 atom_t atom; /* class atom */
2481 mod_handle_t instance; /* module instance */
2482 int dpi; /* system DPI */
2483 int awareness; /* thread DPI awareness */
2484 VARARG(class,unicode_str); /* class name */
2485 @REPLY
2486 user_handle_t handle; /* created window */
2487 user_handle_t parent; /* full handle of parent */
2488 user_handle_t owner; /* full handle of owner */
2489 int extra; /* number of extra bytes */
2490 client_ptr_t class_ptr; /* pointer to class in client address space */
2491 int dpi; /* window DPI if not per-monitor aware */
2492 int awareness; /* window DPI awareness */
2493 @END
2496 /* Destroy a window */
2497 @REQ(destroy_window)
2498 user_handle_t handle; /* handle to the window */
2499 @END
2502 /* Retrieve the desktop window for the current thread */
2503 @REQ(get_desktop_window)
2504 int force; /* force creation if it doesn't exist */
2505 @REPLY
2506 user_handle_t top_window; /* handle to the desktop window */
2507 user_handle_t msg_window; /* handle to the top-level HWND_MESSAGE parent */
2508 @END
2511 /* Set a window owner */
2512 @REQ(set_window_owner)
2513 user_handle_t handle; /* handle to the window */
2514 user_handle_t owner; /* new owner */
2515 @REPLY
2516 user_handle_t full_owner; /* full handle of new owner */
2517 user_handle_t prev_owner; /* full handle of previous owner */
2518 @END
2521 /* Get information from a window handle */
2522 @REQ(get_window_info)
2523 user_handle_t handle; /* handle to the window */
2524 @REPLY
2525 user_handle_t full_handle; /* full 32-bit handle */
2526 user_handle_t last_active; /* last active popup */
2527 process_id_t pid; /* process owning the window */
2528 thread_id_t tid; /* thread owning the window */
2529 atom_t atom; /* class atom */
2530 int is_unicode; /* ANSI or unicode */
2531 int dpi; /* window DPI */
2532 int awareness; /* DPI awareness */
2533 @END
2536 /* Set some information in a window */
2537 @REQ(set_window_info)
2538 unsigned short flags; /* flags for fields to set (see below) */
2539 short int is_unicode; /* ANSI or unicode */
2540 user_handle_t handle; /* handle to the window */
2541 unsigned int style; /* window style */
2542 unsigned int ex_style; /* window extended style */
2543 unsigned int id; /* window id */
2544 mod_handle_t instance; /* creator instance */
2545 lparam_t user_data; /* user-specific data */
2546 int extra_offset; /* offset to set in extra bytes */
2547 data_size_t extra_size; /* size to set in extra bytes */
2548 lparam_t extra_value; /* value to set in extra bytes */
2549 @REPLY
2550 unsigned int old_style; /* old window style */
2551 unsigned int old_ex_style; /* old window extended style */
2552 mod_handle_t old_instance; /* old creator instance */
2553 lparam_t old_user_data; /* old user-specific data */
2554 lparam_t old_extra_value; /* old value in extra bytes */
2555 unsigned int old_id; /* old window id */
2556 @END
2557 #define SET_WIN_STYLE 0x01
2558 #define SET_WIN_EXSTYLE 0x02
2559 #define SET_WIN_ID 0x04
2560 #define SET_WIN_INSTANCE 0x08
2561 #define SET_WIN_USERDATA 0x10
2562 #define SET_WIN_EXTRA 0x20
2563 #define SET_WIN_UNICODE 0x40
2566 /* Set the parent of a window */
2567 @REQ(set_parent)
2568 user_handle_t handle; /* handle to the window */
2569 user_handle_t parent; /* handle to the parent */
2570 @REPLY
2571 user_handle_t old_parent; /* old parent window */
2572 user_handle_t full_parent; /* full handle of new parent */
2573 int dpi; /* new window DPI if not per-monitor aware */
2574 int awareness; /* new DPI awareness */
2575 @END
2578 /* Get a list of the window parents, up to the root of the tree */
2579 @REQ(get_window_parents)
2580 user_handle_t handle; /* handle to the window */
2581 @REPLY
2582 int count; /* total count of parents */
2583 VARARG(parents,user_handles); /* parent handles */
2584 @END
2587 /* Get a list of the window children */
2588 @REQ(get_window_children)
2589 obj_handle_t desktop; /* handle to desktop */
2590 user_handle_t parent; /* parent window */
2591 atom_t atom; /* class atom for the listed children */
2592 thread_id_t tid; /* thread owning the listed children */
2593 VARARG(class,unicode_str); /* class name */
2594 @REPLY
2595 int count; /* total count of children */
2596 VARARG(children,user_handles); /* children handles */
2597 @END
2600 /* Get a list of the window children that contain a given point */
2601 @REQ(get_window_children_from_point)
2602 user_handle_t parent; /* parent window */
2603 int x; /* point in parent coordinates */
2604 int y;
2605 int dpi; /* dpi for the point coordinates */
2606 @REPLY
2607 int count; /* total count of children */
2608 VARARG(children,user_handles); /* children handles */
2609 @END
2612 /* Get window tree information from a window handle */
2613 @REQ(get_window_tree)
2614 user_handle_t handle; /* handle to the window */
2615 @REPLY
2616 user_handle_t parent; /* parent window */
2617 user_handle_t owner; /* owner window */
2618 user_handle_t next_sibling; /* next sibling in Z-order */
2619 user_handle_t prev_sibling; /* prev sibling in Z-order */
2620 user_handle_t first_sibling; /* first sibling in Z-order */
2621 user_handle_t last_sibling; /* last sibling in Z-order */
2622 user_handle_t first_child; /* first child */
2623 user_handle_t last_child; /* last child */
2624 @END
2626 /* Set the position and Z order of a window */
2627 @REQ(set_window_pos)
2628 unsigned short swp_flags; /* SWP_* flags */
2629 unsigned short paint_flags; /* paint flags (see below) */
2630 user_handle_t handle; /* handle to the window */
2631 user_handle_t previous; /* previous window in Z order */
2632 rectangle_t window; /* window rectangle (in parent coords) */
2633 rectangle_t client; /* client rectangle (in parent coords) */
2634 VARARG(valid,rectangles); /* valid rectangles from WM_NCCALCSIZE (in parent coords) */
2635 @REPLY
2636 unsigned int new_style; /* new window style */
2637 unsigned int new_ex_style; /* new window extended style */
2638 user_handle_t surface_win; /* parent window that holds the surface */
2639 int needs_update; /* whether the surface region needs an update */
2640 @END
2641 #define SET_WINPOS_PAINT_SURFACE 0x01 /* window has a paintable surface */
2642 #define SET_WINPOS_PIXEL_FORMAT 0x02 /* window has a custom pixel format */
2644 /* Get the window and client rectangles of a window */
2645 @REQ(get_window_rectangles)
2646 user_handle_t handle; /* handle to the window */
2647 int relative; /* coords relative to (see below) */
2648 int dpi; /* DPI to map to, or zero for per-monitor DPI */
2649 @REPLY
2650 rectangle_t window; /* window rectangle */
2651 rectangle_t client; /* client rectangle */
2652 @END
2653 enum coords_relative
2655 COORDS_CLIENT, /* relative to client area */
2656 COORDS_WINDOW, /* relative to whole window area */
2657 COORDS_PARENT, /* relative to parent's client area */
2658 COORDS_SCREEN /* relative to screen origin */
2662 /* Get the window text */
2663 @REQ(get_window_text)
2664 user_handle_t handle; /* handle to the window */
2665 @REPLY
2666 data_size_t length; /* total length in WCHARs */
2667 VARARG(text,unicode_str); /* window text */
2668 @END
2671 /* Set the window text */
2672 @REQ(set_window_text)
2673 user_handle_t handle; /* handle to the window */
2674 VARARG(text,unicode_str); /* window text */
2675 @END
2678 /* Get the coordinates offset between two windows */
2679 @REQ(get_windows_offset)
2680 user_handle_t from; /* handle to the first window */
2681 user_handle_t to; /* handle to the second window */
2682 int dpi; /* DPI to map to, or zero for per-monitor DPI */
2683 @REPLY
2684 int x; /* x coordinate offset */
2685 int y; /* y coordinate offset */
2686 int mirror; /* whether to mirror the x coordinate */
2687 @END
2690 /* Get the visible region of a window */
2691 @REQ(get_visible_region)
2692 user_handle_t window; /* handle to the window */
2693 unsigned int flags; /* DCX flags */
2694 @REPLY
2695 user_handle_t top_win; /* top window to clip against */
2696 rectangle_t top_rect; /* top window visible rect with screen coords */
2697 rectangle_t win_rect; /* window rect in screen coords */
2698 unsigned int paint_flags; /* paint flags (from SET_WINPOS_* flags) */
2699 data_size_t total_size; /* total size of the resulting region */
2700 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2701 @END
2704 /* Get the visible surface region of a window */
2705 @REQ(get_surface_region)
2706 user_handle_t window; /* handle to the window */
2707 @REPLY
2708 rectangle_t visible_rect; /* window visible rect in screen coords */
2709 data_size_t total_size; /* total size of the resulting region */
2710 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2711 @END
2714 /* Get the window region */
2715 @REQ(get_window_region)
2716 user_handle_t window; /* handle to the window */
2717 @REPLY
2718 data_size_t total_size; /* total size of the resulting region */
2719 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2720 @END
2723 /* Set the window region */
2724 @REQ(set_window_region)
2725 user_handle_t window; /* handle to the window */
2726 int redraw; /* redraw the window? */
2727 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2728 @END
2731 /* Get the window update region */
2732 @REQ(get_update_region)
2733 user_handle_t window; /* handle to the window */
2734 user_handle_t from_child; /* child to start searching from */
2735 unsigned int flags; /* update flags (see below) */
2736 @REPLY
2737 user_handle_t child; /* child to repaint (or window itself) */
2738 unsigned int flags; /* resulting update flags (see below) */
2739 data_size_t total_size; /* total size of the resulting region */
2740 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2741 @END
2742 #define UPDATE_NONCLIENT 0x001 /* get region for repainting non-client area */
2743 #define UPDATE_ERASE 0x002 /* get region for erasing client area */
2744 #define UPDATE_PAINT 0x004 /* get region for painting client area */
2745 #define UPDATE_INTERNALPAINT 0x008 /* get region if internal paint is pending */
2746 #define UPDATE_ALLCHILDREN 0x010 /* force repaint of all children */
2747 #define UPDATE_NOCHILDREN 0x020 /* don't try to repaint any children */
2748 #define UPDATE_NOREGION 0x040 /* don't return a region, only the flags */
2749 #define UPDATE_DELAYED_ERASE 0x080 /* still needs erase after BeginPaint */
2750 #define UPDATE_CLIPCHILDREN 0x100 /* remove clipped children from the update region */
2753 /* Update the z order of a window so that a given rectangle is fully visible */
2754 @REQ(update_window_zorder)
2755 user_handle_t window; /* handle to the window */
2756 rectangle_t rect; /* rectangle that must be visible (in client coords) */
2757 @END
2760 /* Mark parts of a window as needing a redraw */
2761 @REQ(redraw_window)
2762 user_handle_t window; /* handle to the window */
2763 unsigned int flags; /* RDW_* flags */
2764 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2765 @END
2768 /* Set a window property */
2769 @REQ(set_window_property)
2770 user_handle_t window; /* handle to the window */
2771 lparam_t data; /* data to store */
2772 atom_t atom; /* property atom (if no name specified) */
2773 VARARG(name,unicode_str); /* property name */
2774 @END
2777 /* Remove a window property */
2778 @REQ(remove_window_property)
2779 user_handle_t window; /* handle to the window */
2780 atom_t atom; /* property atom (if no name specified) */
2781 VARARG(name,unicode_str); /* property name */
2782 @REPLY
2783 lparam_t data; /* data stored in property */
2784 @END
2787 /* Get a window property */
2788 @REQ(get_window_property)
2789 user_handle_t window; /* handle to the window */
2790 atom_t atom; /* property atom (if no name specified) */
2791 VARARG(name,unicode_str); /* property name */
2792 @REPLY
2793 lparam_t data; /* data stored in property */
2794 @END
2797 /* Get the list of properties of a window */
2798 @REQ(get_window_properties)
2799 user_handle_t window; /* handle to the window */
2800 @REPLY
2801 int total; /* total number of properties */
2802 VARARG(props,properties); /* list of properties */
2803 @END
2806 /* Create a window station */
2807 @REQ(create_winstation)
2808 unsigned int flags; /* window station flags */
2809 unsigned int access; /* wanted access rights */
2810 unsigned int attributes; /* object attributes */
2811 obj_handle_t rootdir; /* root directory */
2812 VARARG(name,unicode_str); /* object name */
2813 @REPLY
2814 obj_handle_t handle; /* handle to the window station */
2815 @END
2818 /* Open a handle to a window station */
2819 @REQ(open_winstation)
2820 unsigned int access; /* wanted access rights */
2821 unsigned int attributes; /* object attributes */
2822 obj_handle_t rootdir; /* root directory */
2823 VARARG(name,unicode_str); /* object name */
2824 @REPLY
2825 obj_handle_t handle; /* handle to the window station */
2826 @END
2829 /* Close a window station */
2830 @REQ(close_winstation)
2831 obj_handle_t handle; /* handle to the window station */
2832 @END
2835 /* Get the process current window station */
2836 @REQ(get_process_winstation)
2837 @REPLY
2838 obj_handle_t handle; /* handle to the window station */
2839 @END
2842 /* Set the process current window station */
2843 @REQ(set_process_winstation)
2844 obj_handle_t handle; /* handle to the window station */
2845 @END
2848 /* Enumerate window stations */
2849 @REQ(enum_winstation)
2850 unsigned int index; /* current index */
2851 @REPLY
2852 unsigned int next; /* next index */
2853 VARARG(name,unicode_str); /* window station name */
2854 @END
2857 /* Create a desktop */
2858 @REQ(create_desktop)
2859 unsigned int flags; /* desktop flags */
2860 unsigned int access; /* wanted access rights */
2861 unsigned int attributes; /* object attributes */
2862 VARARG(name,unicode_str); /* object name */
2863 @REPLY
2864 obj_handle_t handle; /* handle to the desktop */
2865 @END
2868 /* Open a handle to a desktop */
2869 @REQ(open_desktop)
2870 obj_handle_t winsta; /* window station to open (null allowed) */
2871 unsigned int flags; /* desktop flags */
2872 unsigned int access; /* wanted access rights */
2873 unsigned int attributes; /* object attributes */
2874 VARARG(name,unicode_str); /* object name */
2875 @REPLY
2876 obj_handle_t handle; /* handle to the desktop */
2877 @END
2880 /* Open a handle to current input desktop */
2881 @REQ(open_input_desktop)
2882 unsigned int flags; /* desktop flags */
2883 unsigned int access; /* wanted access rights */
2884 unsigned int attributes; /* object attributes */
2885 @REPLY
2886 obj_handle_t handle; /* handle to the desktop */
2887 @END
2890 /* Close a desktop */
2891 @REQ(close_desktop)
2892 obj_handle_t handle; /* handle to the desktop */
2893 @END
2896 /* Get the thread current desktop */
2897 @REQ(get_thread_desktop)
2898 thread_id_t tid; /* thread id */
2899 @REPLY
2900 obj_handle_t handle; /* handle to the desktop */
2901 @END
2904 /* Set the thread current desktop */
2905 @REQ(set_thread_desktop)
2906 obj_handle_t handle; /* handle to the desktop */
2907 @END
2910 /* Enumerate desktops */
2911 @REQ(enum_desktop)
2912 obj_handle_t winstation; /* handle to the window station */
2913 unsigned int index; /* current index */
2914 @REPLY
2915 unsigned int next; /* next index */
2916 VARARG(name,unicode_str); /* window station name */
2917 @END
2920 /* Get/set information about a user object (window station or desktop) */
2921 @REQ(set_user_object_info)
2922 obj_handle_t handle; /* handle to the object */
2923 unsigned int flags; /* information to set/get */
2924 unsigned int obj_flags; /* new object flags */
2925 @REPLY
2926 int is_desktop; /* is object a desktop? */
2927 unsigned int old_obj_flags; /* old object flags */
2928 VARARG(name,unicode_str); /* object name */
2929 @END
2930 #define SET_USER_OBJECT_SET_FLAGS 1
2931 #define SET_USER_OBJECT_GET_FULL_NAME 2
2934 /* Register a hotkey */
2935 @REQ(register_hotkey)
2936 user_handle_t window; /* handle to the window */
2937 int id; /* hotkey identifier */
2938 unsigned int flags; /* modifier keys */
2939 unsigned int vkey; /* virtual key code */
2940 @REPLY
2941 int replaced; /* did we replace an existing hotkey? */
2942 unsigned int flags; /* flags of replaced hotkey */
2943 unsigned int vkey; /* virtual key code of replaced hotkey */
2944 @END
2947 /* Unregister a hotkey */
2948 @REQ(unregister_hotkey)
2949 user_handle_t window; /* handle to the window */
2950 int id; /* hotkey identifier */
2951 @REPLY
2952 unsigned int flags; /* flags of removed hotkey */
2953 unsigned int vkey; /* virtual key code of removed hotkey */
2954 @END
2957 /* Attach (or detach) thread inputs */
2958 @REQ(attach_thread_input)
2959 thread_id_t tid_from; /* thread to be attached */
2960 thread_id_t tid_to; /* thread to which tid_from should be attached */
2961 int attach; /* is it an attach? */
2962 @END
2965 /* Get input data for a given thread */
2966 @REQ(get_thread_input)
2967 thread_id_t tid; /* id of thread */
2968 @REPLY
2969 user_handle_t focus; /* handle to the focus window */
2970 user_handle_t capture; /* handle to the capture window */
2971 user_handle_t active; /* handle to the active window */
2972 user_handle_t foreground; /* handle to the global foreground window */
2973 user_handle_t menu_owner; /* handle to the menu owner */
2974 user_handle_t move_size; /* handle to the moving/resizing window */
2975 user_handle_t caret; /* handle to the caret window */
2976 user_handle_t cursor; /* handle to the cursor */
2977 int show_count; /* cursor show count */
2978 rectangle_t rect; /* caret rectangle */
2979 @END
2982 /* Get the time of the last input event */
2983 @REQ(get_last_input_time)
2984 @REPLY
2985 unsigned int time;
2986 @END
2989 /* Retrieve queue keyboard state for a given thread */
2990 @REQ(get_key_state)
2991 thread_id_t tid; /* id of thread */
2992 int key; /* optional key code or -1 */
2993 @REPLY
2994 unsigned char state; /* state of specified key */
2995 VARARG(keystate,bytes); /* state array for all the keys */
2996 @END
2998 /* Set queue keyboard state for a given thread */
2999 @REQ(set_key_state)
3000 thread_id_t tid; /* id of thread */
3001 int async; /* whether to change the async state too */
3002 VARARG(keystate,bytes); /* state array for all the keys */
3003 @END
3005 /* Set the system foreground window */
3006 @REQ(set_foreground_window)
3007 user_handle_t handle; /* handle to the foreground window */
3008 @REPLY
3009 user_handle_t previous; /* handle to the previous foreground window */
3010 int send_msg_old; /* whether we have to send a msg to the old window */
3011 int send_msg_new; /* whether we have to send a msg to the new window */
3012 @END
3014 /* Set the current thread focus window */
3015 @REQ(set_focus_window)
3016 user_handle_t handle; /* handle to the focus window */
3017 @REPLY
3018 user_handle_t previous; /* handle to the previous focus window */
3019 @END
3021 /* Set the current thread active window */
3022 @REQ(set_active_window)
3023 user_handle_t handle; /* handle to the active window */
3024 @REPLY
3025 user_handle_t previous; /* handle to the previous active window */
3026 @END
3028 /* Set the current thread capture window */
3029 @REQ(set_capture_window)
3030 user_handle_t handle; /* handle to the capture window */
3031 unsigned int flags; /* capture flags (see below) */
3032 @REPLY
3033 user_handle_t previous; /* handle to the previous capture window */
3034 user_handle_t full_handle; /* full 32-bit handle of new capture window */
3035 @END
3036 #define CAPTURE_MENU 0x01 /* capture is for a menu */
3037 #define CAPTURE_MOVESIZE 0x02 /* capture is for moving/resizing */
3040 /* Set the current thread caret window */
3041 @REQ(set_caret_window)
3042 user_handle_t handle; /* handle to the caret window */
3043 int width; /* caret width */
3044 int height; /* caret height */
3045 @REPLY
3046 user_handle_t previous; /* handle to the previous caret window */
3047 rectangle_t old_rect; /* previous caret rectangle */
3048 int old_hide; /* previous hide count */
3049 int old_state; /* previous caret state (1=on, 0=off) */
3050 @END
3053 /* Set the current thread caret information */
3054 @REQ(set_caret_info)
3055 unsigned int flags; /* caret flags (see below) */
3056 user_handle_t handle; /* handle to the caret window */
3057 int x; /* caret x position */
3058 int y; /* caret y position */
3059 int hide; /* increment for hide count (can be negative to show it) */
3060 int state; /* caret state (see below) */
3061 @REPLY
3062 user_handle_t full_handle; /* handle to the current caret window */
3063 rectangle_t old_rect; /* previous caret rectangle */
3064 int old_hide; /* previous hide count */
3065 int old_state; /* previous caret state (1=on, 0=off) */
3066 @END
3067 #define SET_CARET_POS 0x01 /* set the caret position from x,y */
3068 #define SET_CARET_HIDE 0x02 /* increment the caret hide count */
3069 #define SET_CARET_STATE 0x04 /* set the caret on/off state */
3070 enum caret_state
3072 CARET_STATE_OFF, /* off */
3073 CARET_STATE_ON, /* on */
3074 CARET_STATE_TOGGLE, /* toggle current state */
3075 CARET_STATE_ON_IF_MOVED /* on if the position differs, unchanged otherwise */
3079 /* Set a window hook */
3080 @REQ(set_hook)
3081 int id; /* id of the hook */
3082 process_id_t pid; /* id of process to set the hook into */
3083 thread_id_t tid; /* id of thread to set the hook into */
3084 int event_min;
3085 int event_max;
3086 client_ptr_t proc; /* hook procedure */
3087 int flags;
3088 int unicode; /* is it a unicode hook? */
3089 VARARG(module,unicode_str); /* module name */
3090 @REPLY
3091 user_handle_t handle; /* handle to the hook */
3092 unsigned int active_hooks; /* active hooks bitmap */
3093 @END
3096 /* Remove a window hook */
3097 @REQ(remove_hook)
3098 user_handle_t handle; /* handle to the hook */
3099 client_ptr_t proc; /* hook procedure if handle is 0 */
3100 int id; /* id of the hook if handle is 0 */
3101 @REPLY
3102 unsigned int active_hooks; /* active hooks bitmap */
3103 @END
3106 /* Start calling a hook chain */
3107 @REQ(start_hook_chain)
3108 int id; /* id of the hook */
3109 int event; /* signalled event */
3110 user_handle_t window; /* handle to the event window */
3111 int object_id; /* object id for out of context winevent */
3112 int child_id; /* child id for out of context winevent */
3113 @REPLY
3114 user_handle_t handle; /* handle to the next hook */
3115 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
3116 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
3117 int unicode; /* is it a unicode hook? */
3118 client_ptr_t proc; /* hook procedure */
3119 unsigned int active_hooks; /* active hooks bitmap */
3120 VARARG(module,unicode_str); /* module name */
3121 @END
3124 /* Finished calling a hook chain */
3125 @REQ(finish_hook_chain)
3126 int id; /* id of the hook */
3127 @END
3130 /* Get the hook information */
3131 @REQ(get_hook_info)
3132 user_handle_t handle; /* handle to the current hook */
3133 int get_next; /* do we want info about current or next hook? */
3134 int event; /* signalled event */
3135 user_handle_t window; /* handle to the event window */
3136 int object_id; /* object id for out of context winevent */
3137 int child_id; /* child id for out of context winevent */
3138 @REPLY
3139 user_handle_t handle; /* handle to the hook */
3140 int id; /* id of the hook */
3141 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
3142 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
3143 client_ptr_t proc; /* hook procedure */
3144 int unicode; /* is it a unicode hook? */
3145 VARARG(module,unicode_str); /* module name */
3146 @END
3149 /* Create a window class */
3150 @REQ(create_class)
3151 int local; /* is it a local class? */
3152 atom_t atom; /* class atom */
3153 unsigned int style; /* class style */
3154 mod_handle_t instance; /* module instance */
3155 int extra; /* number of extra class bytes */
3156 int win_extra; /* number of window extra bytes */
3157 client_ptr_t client_ptr; /* pointer to class in client address space */
3158 data_size_t name_offset; /* base class name offset for specified atom */
3159 VARARG(name,unicode_str); /* class name */
3160 @REPLY
3161 atom_t atom; /* resulting class atom */
3162 @END
3165 /* Destroy a window class */
3166 @REQ(destroy_class)
3167 atom_t atom; /* class atom */
3168 mod_handle_t instance; /* module instance */
3169 VARARG(name,unicode_str); /* class name */
3170 @REPLY
3171 client_ptr_t client_ptr; /* pointer to class in client address space */
3172 @END
3175 /* Set some information in a class */
3176 @REQ(set_class_info)
3177 user_handle_t window; /* handle to the window */
3178 unsigned int flags; /* flags for info to set (see below) */
3179 atom_t atom; /* class atom */
3180 unsigned int style; /* class style */
3181 int win_extra; /* number of window extra bytes */
3182 mod_handle_t instance; /* module instance */
3183 int extra_offset; /* offset to set in extra bytes */
3184 data_size_t extra_size; /* size to set in extra bytes */
3185 lparam_t extra_value; /* value to set in extra bytes */
3186 @REPLY
3187 atom_t old_atom; /* previous class atom */
3188 atom_t base_atom; /* base class atom */
3189 mod_handle_t old_instance; /* previous module instance */
3190 lparam_t old_extra_value; /* old value in extra bytes */
3191 unsigned int old_style; /* previous class style */
3192 int old_extra; /* previous number of class extra bytes */
3193 int old_win_extra; /* previous number of window extra bytes */
3194 @END
3195 #define SET_CLASS_ATOM 0x0001
3196 #define SET_CLASS_STYLE 0x0002
3197 #define SET_CLASS_WINEXTRA 0x0004
3198 #define SET_CLASS_INSTANCE 0x0008
3199 #define SET_CLASS_EXTRA 0x0010
3202 /* Open the clipboard */
3203 @REQ(open_clipboard)
3204 user_handle_t window; /* clipboard window */
3205 @REPLY
3206 user_handle_t owner; /* current clipboard owner */
3207 @END
3210 /* Close the clipboard */
3211 @REQ(close_clipboard)
3212 @REPLY
3213 user_handle_t viewer; /* first clipboard viewer */
3214 user_handle_t owner; /* current clipboard owner */
3215 @END
3218 /* Empty the clipboard and grab ownership */
3219 @REQ(empty_clipboard)
3220 @END
3223 /* Add a data format to the clipboard */
3224 @REQ(set_clipboard_data)
3225 unsigned int format; /* clipboard format of the data */
3226 unsigned int lcid; /* locale id to use for synthesizing text formats */
3227 VARARG(data,bytes); /* data contents */
3228 @REPLY
3229 unsigned int seqno; /* sequence number for the set data */
3230 @END
3233 /* Fetch a data format from the clipboard */
3234 @REQ(get_clipboard_data)
3235 unsigned int format; /* clipboard format of the data */
3236 int render; /* will we try to render it if missing? */
3237 int cached; /* do we already have it in the client-side cache? */
3238 unsigned int seqno; /* sequence number for the data in the cache */
3239 @REPLY
3240 unsigned int from; /* for synthesized data, format to generate it from */
3241 user_handle_t owner; /* clipboard owner for delayed-rendered formats */
3242 unsigned int seqno; /* sequence number for the originally set data */
3243 data_size_t total; /* total data size */
3244 VARARG(data,bytes); /* data contents */
3245 @END
3248 /* Retrieve a list of available formats */
3249 @REQ(get_clipboard_formats)
3250 unsigned int format; /* specific format to query, return all if 0 */
3251 @REPLY
3252 unsigned int count; /* count of available formats */
3253 VARARG(formats,uints); /* array of available formats */
3254 @END
3257 /* Retrieve the next available format */
3258 @REQ(enum_clipboard_formats)
3259 unsigned int previous; /* previous format, or first if 0 */
3260 @REPLY
3261 unsigned int format; /* next format */
3262 @END
3265 /* Release ownership of the clipboard */
3266 @REQ(release_clipboard)
3267 user_handle_t owner; /* clipboard owner to release */
3268 @REPLY
3269 user_handle_t viewer; /* first clipboard viewer */
3270 user_handle_t owner; /* current clipboard owner */
3271 @END
3274 /* Get clipboard information */
3275 @REQ(get_clipboard_info)
3276 @REPLY
3277 user_handle_t window; /* clipboard window */
3278 user_handle_t owner; /* clipboard owner */
3279 user_handle_t viewer; /* clipboard viewer */
3280 unsigned int seqno; /* current sequence number */
3281 @END
3284 /* Set the clipboard viewer window */
3285 @REQ(set_clipboard_viewer)
3286 user_handle_t viewer; /* clipboard viewer */
3287 user_handle_t previous; /* if non-zero, check that this was the previous viewer */
3288 @REPLY
3289 user_handle_t old_viewer; /* previous clipboard viewer */
3290 user_handle_t owner; /* clipboard owner */
3291 @END
3294 /* Add a clipboard listener window */
3295 @REQ(add_clipboard_listener)
3296 user_handle_t window; /* clipboard listener window */
3297 @END
3300 /* Remove a clipboard listener window */
3301 @REQ(remove_clipboard_listener)
3302 user_handle_t window; /* clipboard listener window */
3303 @END
3306 /* Open a security token */
3307 @REQ(open_token)
3308 obj_handle_t handle; /* handle to the thread or process */
3309 unsigned int access; /* access rights to the new token */
3310 unsigned int attributes;/* object attributes */
3311 unsigned int flags; /* flags (see below) */
3312 @REPLY
3313 obj_handle_t token; /* handle to the token */
3314 @END
3315 #define OPEN_TOKEN_THREAD 1
3316 #define OPEN_TOKEN_AS_SELF 2
3319 /* Set/get the global windows */
3320 @REQ(set_global_windows)
3321 unsigned int flags; /* flags for fields to set (see below) */
3322 user_handle_t shell_window; /* handle to the new shell window */
3323 user_handle_t shell_listview; /* handle to the new shell listview window */
3324 user_handle_t progman_window; /* handle to the new program manager window */
3325 user_handle_t taskman_window; /* handle to the new task manager window */
3326 @REPLY
3327 user_handle_t old_shell_window; /* handle to the shell window */
3328 user_handle_t old_shell_listview; /* handle to the shell listview window */
3329 user_handle_t old_progman_window; /* handle to the new program manager window */
3330 user_handle_t old_taskman_window; /* handle to the new task manager window */
3331 @END
3332 #define SET_GLOBAL_SHELL_WINDOWS 0x01 /* set both main shell and listview windows */
3333 #define SET_GLOBAL_PROGMAN_WINDOW 0x02
3334 #define SET_GLOBAL_TASKMAN_WINDOW 0x04
3336 /* Adjust the privileges held by a token */
3337 @REQ(adjust_token_privileges)
3338 obj_handle_t handle; /* handle to the token */
3339 int disable_all; /* disable all privileges? */
3340 int get_modified_state; /* get modified privileges? */
3341 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to enable/disable/remove */
3342 @REPLY
3343 unsigned int len; /* total length in bytes required to store token privileges */
3344 VARARG(privileges,LUID_AND_ATTRIBUTES); /* modified privileges */
3345 @END
3347 /* Retrieves the set of privileges held by or available to a token */
3348 @REQ(get_token_privileges)
3349 obj_handle_t handle; /* handle to the token */
3350 @REPLY
3351 unsigned int len; /* total length in bytes required to store token privileges */
3352 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
3353 @END
3355 /* Check the token has the required privileges */
3356 @REQ(check_token_privileges)
3357 obj_handle_t handle; /* handle to the token */
3358 int all_required; /* are all the privileges required for the check to succeed? */
3359 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to check */
3360 @REPLY
3361 int has_privileges; /* does the token have the required privileges? */
3362 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
3363 @END
3365 @REQ(duplicate_token)
3366 obj_handle_t handle; /* handle to the token to duplicate */
3367 unsigned int access; /* access rights to the new token */
3368 int primary; /* is the new token to be a primary one? */
3369 int impersonation_level; /* impersonation level of the new token */
3370 VARARG(objattr,object_attributes); /* object attributes */
3371 @REPLY
3372 obj_handle_t new_handle; /* duplicated handle */
3373 @END
3375 @REQ(access_check)
3376 obj_handle_t handle; /* handle to the token */
3377 unsigned int desired_access; /* desired access to the object */
3378 unsigned int mapping_read; /* mapping from generic read to specific rights */
3379 unsigned int mapping_write; /* mapping from generic write to specific rights */
3380 unsigned int mapping_execute; /* mapping from generic execute to specific rights */
3381 unsigned int mapping_all; /* mapping from generic all to specific rights */
3382 VARARG(sd,security_descriptor); /* security descriptor to check */
3383 @REPLY
3384 unsigned int access_granted; /* access rights actually granted */
3385 unsigned int access_status; /* was access granted? */
3386 unsigned int privileges_len; /* length needed to store privileges */
3387 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges used during access check */
3388 @END
3390 @REQ(get_token_sid)
3391 obj_handle_t handle; /* handle to the token */
3392 unsigned int which_sid; /* which SID to retrieve from the token */
3393 @REPLY
3394 data_size_t sid_len; /* length needed to store sid */
3395 VARARG(sid,SID); /* the sid specified by which_sid from the token */
3396 @END
3398 @REQ(get_token_groups)
3399 obj_handle_t handle; /* handle to the token */
3400 @REPLY
3401 data_size_t user_len; /* length needed to store user */
3402 VARARG(user,token_groups); /* groups the token's user belongs to */
3403 @END
3405 @REQ(get_token_default_dacl)
3406 obj_handle_t handle; /* handle to the token */
3407 @REPLY
3408 data_size_t acl_len; /* length needed to store access control list */
3409 VARARG(acl,ACL); /* access control list */
3410 @END
3412 @REQ(set_token_default_dacl)
3413 obj_handle_t handle; /* handle to the token */
3414 VARARG(acl,ACL); /* default dacl to set */
3415 @END
3417 @REQ(set_security_object)
3418 obj_handle_t handle; /* handle to the object */
3419 unsigned int security_info; /* which parts of security descriptor to set */
3420 VARARG(sd,security_descriptor); /* security descriptor to set */
3421 @END
3423 @REQ(get_security_object)
3424 obj_handle_t handle; /* handle to the object */
3425 unsigned int security_info; /* which parts of security descriptor to get */
3426 @REPLY
3427 unsigned int sd_len; /* buffer size needed for sd */
3428 VARARG(sd,security_descriptor); /* retrieved security descriptor */
3429 @END
3432 struct handle_info
3434 process_id_t owner;
3435 obj_handle_t handle;
3436 unsigned int access;
3439 /* Return a list of all opened handles */
3440 @REQ(get_system_handles)
3441 @REPLY
3442 unsigned int count; /* number of handles */
3443 VARARG(data,handle_infos); /* array of handle_infos */
3444 @END
3447 /* Create a mailslot */
3448 @REQ(create_mailslot)
3449 unsigned int access; /* wanted access rights */
3450 timeout_t read_timeout;
3451 unsigned int max_msgsize;
3452 VARARG(objattr,object_attributes); /* object attributes */
3453 @REPLY
3454 obj_handle_t handle; /* handle to the mailslot */
3455 @END
3458 /* Set mailslot information */
3459 @REQ(set_mailslot_info)
3460 obj_handle_t handle; /* handle to the mailslot */
3461 timeout_t read_timeout;
3462 unsigned int flags;
3463 @REPLY
3464 timeout_t read_timeout;
3465 unsigned int max_msgsize;
3466 @END
3467 #define MAILSLOT_SET_READ_TIMEOUT 1
3470 /* Create a directory object */
3471 @REQ(create_directory)
3472 unsigned int access; /* access flags */
3473 VARARG(objattr,object_attributes); /* object attributes */
3474 @REPLY
3475 obj_handle_t handle; /* handle to the directory */
3476 @END
3479 /* Open a directory object */
3480 @REQ(open_directory)
3481 unsigned int access; /* access flags */
3482 unsigned int attributes; /* object attributes */
3483 obj_handle_t rootdir; /* root directory */
3484 VARARG(directory_name,unicode_str); /* Directory name */
3485 @REPLY
3486 obj_handle_t handle; /* handle to the directory */
3487 @END
3490 /* Get a directory entry by index */
3491 @REQ(get_directory_entry)
3492 obj_handle_t handle; /* handle to the directory */
3493 unsigned int index; /* entry index */
3494 @REPLY
3495 data_size_t name_len; /* length of the entry name in bytes */
3496 VARARG(name,unicode_str,name_len); /* entry name */
3497 VARARG(type,unicode_str); /* entry type */
3498 @END
3501 /* Create a symbolic link object */
3502 @REQ(create_symlink)
3503 unsigned int access; /* access flags */
3504 VARARG(objattr,object_attributes); /* object attributes */
3505 VARARG(target_name,unicode_str); /* target name */
3506 @REPLY
3507 obj_handle_t handle; /* handle to the symlink */
3508 @END
3511 /* Open a symbolic link object */
3512 @REQ(open_symlink)
3513 unsigned int access; /* access flags */
3514 unsigned int attributes; /* object attributes */
3515 obj_handle_t rootdir; /* root directory */
3516 VARARG(name,unicode_str); /* symlink name */
3517 @REPLY
3518 obj_handle_t handle; /* handle to the symlink */
3519 @END
3522 /* Query a symbolic link object */
3523 @REQ(query_symlink)
3524 obj_handle_t handle; /* handle to the symlink */
3525 @REPLY
3526 data_size_t total; /* total needed size for name */
3527 VARARG(target_name,unicode_str); /* target name */
3528 @END
3531 /* Query basic object information */
3532 @REQ(get_object_info)
3533 obj_handle_t handle; /* handle to the object */
3534 @REPLY
3535 unsigned int access; /* granted access mask */
3536 unsigned int ref_count; /* object ref count */
3537 unsigned int handle_count; /* object handle count */
3538 data_size_t total; /* total needed size for name */
3539 VARARG(name,unicode_str); /* object name */
3540 @END
3543 /* Query object type name information */
3544 @REQ(get_object_type)
3545 obj_handle_t handle; /* handle to the object */
3546 @REPLY
3547 data_size_t total; /* needed size for type name */
3548 VARARG(type,unicode_str); /* type name */
3549 @END
3552 /* Unlink a named object */
3553 @REQ(unlink_object)
3554 obj_handle_t handle; /* handle to the object */
3555 @END
3558 /* Query the impersonation level of an impersonation token */
3559 @REQ(get_token_impersonation_level)
3560 obj_handle_t handle; /* handle to the object */
3561 @REPLY
3562 int impersonation_level; /* impersonation level of the impersonation token */
3563 @END
3565 /* Allocate a locally-unique identifier */
3566 @REQ(allocate_locally_unique_id)
3567 @REPLY
3568 luid_t luid;
3569 @END
3572 /* Create a device manager */
3573 @REQ(create_device_manager)
3574 unsigned int access; /* wanted access rights */
3575 unsigned int attributes; /* object attributes */
3576 @REPLY
3577 obj_handle_t handle; /* handle to the device */
3578 @END
3581 /* Create a device */
3582 @REQ(create_device)
3583 unsigned int access; /* wanted access rights */
3584 unsigned int attributes; /* object attributes */
3585 obj_handle_t rootdir; /* root directory */
3586 client_ptr_t user_ptr; /* opaque ptr for use by client */
3587 obj_handle_t manager; /* device manager */
3588 VARARG(name,unicode_str); /* object name */
3589 @REPLY
3590 obj_handle_t handle; /* handle to the device */
3591 @END
3594 /* Delete a device */
3595 @REQ(delete_device)
3596 obj_handle_t handle; /* handle to the device */
3597 @END
3600 /* Retrieve the next pending device irp request */
3601 @REQ(get_next_device_request)
3602 obj_handle_t manager; /* handle to the device manager */
3603 obj_handle_t prev; /* handle to the previous irp */
3604 unsigned int status; /* status of the previous irp */
3605 @REPLY
3606 irp_params_t params; /* irp parameters */
3607 obj_handle_t next; /* handle to the next irp */
3608 process_id_t client_pid; /* pid of process calling irp */
3609 thread_id_t client_tid; /* tid of thread calling irp */
3610 data_size_t in_size; /* total needed input size */
3611 data_size_t out_size; /* needed output size */
3612 VARARG(next_data,bytes); /* input data of the next irp */
3613 @END
3616 /* Make the current process a system process */
3617 @REQ(make_process_system)
3618 @REPLY
3619 obj_handle_t event; /* event signaled when all user processes have exited */
3620 @END
3623 /* Get detailed fixed-size information about a token */
3624 @REQ(get_token_statistics)
3625 obj_handle_t handle; /* handle to the object */
3626 @REPLY
3627 luid_t token_id; /* locally-unique identifier of the token */
3628 luid_t modified_id; /* locally-unique identifier of the modified version of the token */
3629 int primary; /* is the token primary or impersonation? */
3630 int impersonation_level; /* level of impersonation */
3631 int group_count; /* the number of groups the token is a member of */
3632 int privilege_count; /* the number of privileges the token has */
3633 @END
3636 /* Create I/O completion port */
3637 @REQ(create_completion)
3638 unsigned int access; /* desired access to a port */
3639 unsigned int concurrent; /* max number of concurrent active threads */
3640 VARARG(objattr,object_attributes); /* object attributes */
3641 @REPLY
3642 obj_handle_t handle; /* port handle */
3643 @END
3646 /* Open I/O completion port */
3647 @REQ(open_completion)
3648 unsigned int access; /* desired access to a port */
3649 unsigned int attributes; /* object attributes */
3650 obj_handle_t rootdir; /* root directory */
3651 VARARG(filename,unicode_str); /* port name */
3652 @REPLY
3653 obj_handle_t handle; /* port handle */
3654 @END
3657 /* add completion to completion port */
3658 @REQ(add_completion)
3659 obj_handle_t handle; /* port handle */
3660 apc_param_t ckey; /* completion key */
3661 apc_param_t cvalue; /* completion value */
3662 apc_param_t information; /* IO_STATUS_BLOCK Information */
3663 unsigned int status; /* completion result */
3664 @END
3667 /* get completion from completion port queue */
3668 @REQ(remove_completion)
3669 obj_handle_t handle; /* port handle */
3670 @REPLY
3671 apc_param_t ckey; /* completion key */
3672 apc_param_t cvalue; /* completion value */
3673 apc_param_t information; /* IO_STATUS_BLOCK Information */
3674 unsigned int status; /* completion result */
3675 @END
3678 /* get completion queue depth */
3679 @REQ(query_completion)
3680 obj_handle_t handle; /* port handle */
3681 @REPLY
3682 unsigned int depth; /* completion queue depth */
3683 @END
3686 /* associate object with completion port */
3687 @REQ(set_completion_info)
3688 obj_handle_t handle; /* object handle */
3689 apc_param_t ckey; /* completion key */
3690 obj_handle_t chandle; /* port handle */
3691 @END
3694 /* check for associated completion and push msg */
3695 @REQ(add_fd_completion)
3696 obj_handle_t handle; /* async' object */
3697 apc_param_t cvalue; /* completion value */
3698 apc_param_t information; /* IO_STATUS_BLOCK Information */
3699 unsigned int status; /* completion status */
3700 int async; /* completion is an async result */
3701 @END
3704 /* set fd completion information */
3705 @REQ(set_fd_completion_mode)
3706 obj_handle_t handle; /* handle to a file or directory */
3707 unsigned int flags; /* completion notification flags */
3708 @END
3711 /* set fd disposition information */
3712 @REQ(set_fd_disp_info)
3713 obj_handle_t handle; /* handle to a file or directory */
3714 int unlink; /* whether to unlink file on close */
3715 @END
3718 /* set fd name information */
3719 @REQ(set_fd_name_info)
3720 obj_handle_t handle; /* handle to a file or directory */
3721 obj_handle_t rootdir; /* root directory */
3722 int link; /* link instead of renaming */
3723 VARARG(filename,string); /* new file name */
3724 @END
3727 /* Retrieve layered info for a window */
3728 @REQ(get_window_layered_info)
3729 user_handle_t handle; /* handle to the window */
3730 @REPLY
3731 unsigned int color_key; /* color key */
3732 unsigned int alpha; /* alpha (0..255) */
3733 unsigned int flags; /* LWA_* flags */
3734 @END
3737 /* Set layered info for a window */
3738 @REQ(set_window_layered_info)
3739 user_handle_t handle; /* handle to the window */
3740 unsigned int color_key; /* color key */
3741 unsigned int alpha; /* alpha (0..255) */
3742 unsigned int flags; /* LWA_* flags */
3743 @END
3746 /* Allocate an arbitrary user handle */
3747 @REQ(alloc_user_handle)
3748 @REPLY
3749 user_handle_t handle; /* allocated handle */
3750 @END
3753 /* Free an arbitrary user handle */
3754 @REQ(free_user_handle)
3755 user_handle_t handle; /* handle to free*/
3756 @END
3759 /* Set/get the current cursor */
3760 @REQ(set_cursor)
3761 unsigned int flags; /* flags for fields to set (see below) */
3762 user_handle_t handle; /* handle to the cursor */
3763 int show_count; /* show count increment/decrement */
3764 int x; /* cursor position */
3765 int y;
3766 rectangle_t clip; /* cursor clip rectangle */
3767 unsigned int clip_msg; /* message to post on cursor clip changes */
3768 @REPLY
3769 user_handle_t prev_handle; /* previous handle */
3770 int prev_count; /* previous show count */
3771 int prev_x; /* previous position */
3772 int prev_y;
3773 int new_x; /* new position */
3774 int new_y;
3775 rectangle_t new_clip; /* new clip rectangle */
3776 unsigned int last_change; /* time of last position change */
3777 @END
3778 #define SET_CURSOR_HANDLE 0x01
3779 #define SET_CURSOR_COUNT 0x02
3780 #define SET_CURSOR_POS 0x04
3781 #define SET_CURSOR_CLIP 0x08
3782 #define SET_CURSOR_NOCLIP 0x10
3785 /* Modify the list of registered rawinput devices */
3786 @REQ(update_rawinput_devices)
3787 VARARG(devices,rawinput_devices);
3788 @END
3791 /* Retrieve the suspended context of a thread */
3792 @REQ(get_suspend_context)
3793 @REPLY
3794 VARARG(context,context); /* thread context */
3795 @END
3798 /* Store the suspend context of a thread */
3799 @REQ(set_suspend_context)
3800 VARARG(context,context); /* thread context */
3801 @END
3804 /* Create a new job object */
3805 @REQ(create_job)
3806 unsigned int access; /* wanted access rights */
3807 VARARG(objattr,object_attributes); /* object attributes */
3808 @REPLY
3809 obj_handle_t handle; /* handle to the job */
3810 @END
3813 /* Open a job object */
3814 @REQ(open_job)
3815 unsigned int access; /* wanted access rights */
3816 unsigned int attributes; /* object attributes */
3817 obj_handle_t rootdir; /* root directory */
3818 VARARG(name,unicode_str); /* object name */
3819 @REPLY
3820 obj_handle_t handle; /* handle to the job */
3821 @END
3824 /* Assign a job object to a process */
3825 @REQ(assign_job)
3826 obj_handle_t job; /* handle to the job */
3827 obj_handle_t process; /* handle to the process */
3828 @END
3831 /* Check if a process is associated with a job */
3832 @REQ(process_in_job)
3833 obj_handle_t job; /* handle to the job */
3834 obj_handle_t process; /* handle to the process */
3835 @END
3838 /* Set limit flags on a job */
3839 @REQ(set_job_limits)
3840 obj_handle_t handle; /* handle to the job */
3841 unsigned int limit_flags; /* new limit flags */
3842 @END
3845 /* Set new completion port for a job */
3846 @REQ(set_job_completion_port)
3847 obj_handle_t job; /* handle to the job */
3848 obj_handle_t port; /* handle to the completion port */
3849 client_ptr_t key; /* key to send with completion messages */
3850 @END
3853 /* Terminate all processes associated with the job */
3854 @REQ(terminate_job)
3855 obj_handle_t handle; /* handle to the job */
3856 int status; /* process exit code */
3857 @END