server: Pass file object handle in IRP_CALL_CREATE request.
[wine.git] / server / protocol.def
blobfc7c4d0af4e6e3ef683ae59f3fca20c060259c95
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 hw_msg_source
285 unsigned int device; /* source device (IMDT_* values) */
286 unsigned int origin; /* source origin (IMO_* values) */
289 struct hardware_msg_data
291 lparam_t info; /* extra info */
292 unsigned int hw_id; /* unique id */
293 unsigned int flags; /* hook flags */
294 struct hw_msg_source source; /* message source */
295 union
297 int type;
298 struct
300 int type; /* RIM_TYPEKEYBOARD */
301 unsigned int message; /* message generated by this rawinput event */
302 unsigned short vkey; /* virtual key code */
303 unsigned short scan; /* scan code */
304 } kbd;
305 struct
307 int type; /* RIM_TYPEMOUSE */
308 int x; /* x coordinate */
309 int y; /* y coordinate */
310 unsigned int data; /* mouse data */
311 } mouse;
312 } rawinput;
315 struct callback_msg_data
317 client_ptr_t callback; /* callback function */
318 lparam_t data; /* user data for callback */
319 lparam_t result; /* message result */
322 struct winevent_msg_data
324 user_handle_t hook; /* hook handle */
325 thread_id_t tid; /* thread id */
326 client_ptr_t hook_proc; /* hook proc address */
327 /* followed by module name if any */
330 typedef union
332 int type;
333 struct
335 int type; /* INPUT_KEYBOARD */
336 unsigned short vkey; /* virtual key code */
337 unsigned short scan; /* scan code */
338 unsigned int flags; /* event flags */
339 unsigned int time; /* event time */
340 lparam_t info; /* extra info */
341 } kbd;
342 struct
344 int type; /* INPUT_MOUSE */
345 int x; /* coordinates */
346 int y;
347 unsigned int data; /* mouse data */
348 unsigned int flags; /* event flags */
349 unsigned int time; /* event time */
350 lparam_t info; /* extra info */
351 } mouse;
352 struct
354 int type; /* INPUT_HARDWARE */
355 unsigned int msg; /* message code */
356 lparam_t lparam; /* message param */
357 } hw;
358 } hw_input_t;
360 typedef union
362 unsigned char bytes[1]; /* raw data for sent messages */
363 struct hardware_msg_data hardware;
364 struct callback_msg_data callback;
365 struct winevent_msg_data winevent;
366 } message_data_t;
368 /* structure for console char/attribute info */
369 typedef struct
371 WCHAR ch;
372 unsigned short attr;
373 } char_info_t;
375 /* structure returned in filesystem events */
376 struct filesystem_event
378 int action;
379 data_size_t len;
380 char name[1];
383 typedef struct
385 unsigned int low_part;
386 int high_part;
387 } luid_t;
389 #define MAX_ACL_LEN 65535
391 struct security_descriptor
393 unsigned int control; /* SE_ flags */
394 data_size_t owner_len;
395 data_size_t group_len;
396 data_size_t sacl_len;
397 data_size_t dacl_len;
398 /* VARARG(owner,SID); */
399 /* VARARG(group,SID); */
400 /* VARARG(sacl,ACL); */
401 /* VARARG(dacl,ACL); */
404 struct object_attributes
406 obj_handle_t rootdir; /* root directory */
407 unsigned int attributes; /* object attributes */
408 data_size_t sd_len; /* length of security_descriptor data. may be 0 */
409 data_size_t name_len; /* length of the name string. may be 0 */
410 /* VARARG(sd,security_descriptor); */
411 /* VARARG(name,unicode_str); */
414 struct token_groups
416 unsigned int count;
417 /* unsigned int attributes[count]; */
418 /* VARARG(sids,SID); */
421 enum select_op
423 SELECT_NONE,
424 SELECT_WAIT,
425 SELECT_WAIT_ALL,
426 SELECT_SIGNAL_AND_WAIT,
427 SELECT_KEYED_EVENT_WAIT,
428 SELECT_KEYED_EVENT_RELEASE
431 typedef union
433 enum select_op op;
434 struct
436 enum select_op op; /* SELECT_WAIT or SELECT_WAIT_ALL */
437 obj_handle_t handles[MAXIMUM_WAIT_OBJECTS];
438 } wait;
439 struct
441 enum select_op op; /* SELECT_SIGNAL_AND_WAIT */
442 obj_handle_t wait;
443 obj_handle_t signal; /* must be last in the structure so we can remove it on retries */
444 } signal_and_wait;
445 struct
447 enum select_op op; /* SELECT_KEYED_EVENT_WAIT or SELECT_KEYED_EVENT_RELEASE */
448 obj_handle_t handle;
449 client_ptr_t key;
450 } keyed_event;
451 } select_op_t;
453 enum apc_type
455 APC_NONE,
456 APC_USER,
457 APC_TIMER,
458 APC_ASYNC_IO,
459 APC_VIRTUAL_ALLOC,
460 APC_VIRTUAL_FREE,
461 APC_VIRTUAL_QUERY,
462 APC_VIRTUAL_PROTECT,
463 APC_VIRTUAL_FLUSH,
464 APC_VIRTUAL_LOCK,
465 APC_VIRTUAL_UNLOCK,
466 APC_MAP_VIEW,
467 APC_UNMAP_VIEW,
468 APC_CREATE_THREAD
471 typedef union
473 enum apc_type type;
474 struct
476 enum apc_type type; /* APC_USER */
477 int __pad;
478 client_ptr_t func; /* void (__stdcall *func)(ULONG_PTR,ULONG_PTR,ULONG_PTR); */
479 apc_param_t args[3]; /* arguments for user function */
480 } user;
481 struct
483 enum apc_type type; /* APC_TIMER */
484 int __pad;
485 client_ptr_t func; /* void (__stdcall *func)(void*, unsigned int, unsigned int); */
486 timeout_t time; /* absolute time of expiration */
487 client_ptr_t arg; /* user argument */
488 } timer;
489 struct
491 enum apc_type type; /* APC_ASYNC_IO */
492 unsigned int status; /* I/O status */
493 client_ptr_t user; /* user pointer */
494 client_ptr_t sb; /* status block */
495 } async_io;
496 struct
498 enum apc_type type; /* APC_VIRTUAL_ALLOC */
499 unsigned int op_type; /* type of operation */
500 client_ptr_t addr; /* requested address */
501 mem_size_t size; /* allocation size */
502 unsigned int zero_bits; /* allocation alignment */
503 unsigned int prot; /* memory protection flags */
504 } virtual_alloc;
505 struct
507 enum apc_type type; /* APC_VIRTUAL_FREE */
508 unsigned int op_type; /* type of operation */
509 client_ptr_t addr; /* requested address */
510 mem_size_t size; /* allocation size */
511 } virtual_free;
512 struct
514 enum apc_type type; /* APC_VIRTUAL_QUERY */
515 int __pad;
516 client_ptr_t addr; /* requested address */
517 } virtual_query;
518 struct
520 enum apc_type type; /* APC_VIRTUAL_PROTECT */
521 unsigned int prot; /* new protection flags */
522 client_ptr_t addr; /* requested address */
523 mem_size_t size; /* requested size */
524 } virtual_protect;
525 struct
527 enum apc_type type; /* APC_VIRTUAL_FLUSH */
528 int __pad;
529 client_ptr_t addr; /* requested address */
530 mem_size_t size; /* requested size */
531 } virtual_flush;
532 struct
534 enum apc_type type; /* APC_VIRTUAL_LOCK */
535 int __pad;
536 client_ptr_t addr; /* requested address */
537 mem_size_t size; /* requested size */
538 } virtual_lock;
539 struct
541 enum apc_type type; /* APC_VIRTUAL_UNLOCK */
542 int __pad;
543 client_ptr_t addr; /* requested address */
544 mem_size_t size; /* requested size */
545 } virtual_unlock;
546 struct
548 enum apc_type type; /* APC_MAP_VIEW */
549 obj_handle_t handle; /* mapping handle */
550 client_ptr_t addr; /* requested address */
551 mem_size_t size; /* allocation size */
552 file_pos_t offset; /* file offset */
553 unsigned int alloc_type;/* allocation type */
554 unsigned short zero_bits; /* allocation alignment */
555 unsigned short prot; /* memory protection flags */
556 } map_view;
557 struct
559 enum apc_type type; /* APC_UNMAP_VIEW */
560 int __pad;
561 client_ptr_t addr; /* view address */
562 } unmap_view;
563 struct
565 enum apc_type type; /* APC_CREATE_THREAD */
566 int suspend; /* suspended thread? */
567 client_ptr_t func; /* void (__stdcall *func)(void*); start function */
568 client_ptr_t arg; /* argument for start function */
569 mem_size_t reserve; /* reserve size for thread stack */
570 mem_size_t commit; /* commit size for thread stack */
571 } create_thread;
572 } apc_call_t;
574 typedef union
576 enum apc_type type;
577 struct
579 enum apc_type type; /* APC_ASYNC_IO */
580 unsigned int status; /* new status of async operation */
581 unsigned int total; /* bytes transferred */
582 } async_io;
583 struct
585 enum apc_type type; /* APC_VIRTUAL_ALLOC */
586 unsigned int status; /* status returned by call */
587 client_ptr_t addr; /* resulting address */
588 mem_size_t size; /* resulting size */
589 } virtual_alloc;
590 struct
592 enum apc_type type; /* APC_VIRTUAL_FREE */
593 unsigned int status; /* status returned by call */
594 client_ptr_t addr; /* resulting address */
595 mem_size_t size; /* resulting size */
596 } virtual_free;
597 struct
599 enum apc_type type; /* APC_VIRTUAL_QUERY */
600 unsigned int status; /* status returned by call */
601 client_ptr_t base; /* resulting base address */
602 client_ptr_t alloc_base;/* resulting allocation base */
603 mem_size_t size; /* resulting region size */
604 unsigned short state; /* resulting region state */
605 unsigned short prot; /* resulting region protection */
606 unsigned short alloc_prot;/* resulting allocation protection */
607 unsigned short alloc_type;/* resulting region allocation type */
608 } virtual_query;
609 struct
611 enum apc_type type; /* APC_VIRTUAL_PROTECT */
612 unsigned int status; /* status returned by call */
613 client_ptr_t addr; /* resulting address */
614 mem_size_t size; /* resulting size */
615 unsigned int prot; /* old protection flags */
616 } virtual_protect;
617 struct
619 enum apc_type type; /* APC_VIRTUAL_FLUSH */
620 unsigned int status; /* status returned by call */
621 client_ptr_t addr; /* resulting address */
622 mem_size_t size; /* resulting size */
623 } virtual_flush;
624 struct
626 enum apc_type type; /* APC_VIRTUAL_LOCK */
627 unsigned int status; /* status returned by call */
628 client_ptr_t addr; /* resulting address */
629 mem_size_t size; /* resulting size */
630 } virtual_lock;
631 struct
633 enum apc_type type; /* APC_VIRTUAL_UNLOCK */
634 unsigned int status; /* status returned by call */
635 client_ptr_t addr; /* resulting address */
636 mem_size_t size; /* resulting size */
637 } virtual_unlock;
638 struct
640 enum apc_type type; /* APC_MAP_VIEW */
641 unsigned int status; /* status returned by call */
642 client_ptr_t addr; /* resulting address */
643 mem_size_t size; /* resulting size */
644 } map_view;
645 struct
647 enum apc_type type; /* APC_MAP_VIEW */
648 unsigned int status; /* status returned by call */
649 } unmap_view;
650 struct
652 enum apc_type type; /* APC_CREATE_THREAD */
653 unsigned int status; /* status returned by call */
654 thread_id_t tid; /* thread id */
655 obj_handle_t handle; /* handle to new thread */
656 } create_thread;
657 } apc_result_t;
659 enum irp_type
661 IRP_CALL_NONE,
662 IRP_CALL_CREATE,
663 IRP_CALL_CLOSE,
664 IRP_CALL_READ,
665 IRP_CALL_WRITE,
666 IRP_CALL_FLUSH,
667 IRP_CALL_IOCTL,
668 IRP_CALL_FREE
671 typedef union
673 enum irp_type type; /* irp call type */
674 struct
676 enum irp_type type; /* IRP_CALL_CREATE */
677 unsigned int access; /* access rights */
678 unsigned int sharing; /* sharing flags */
679 unsigned int options; /* file options */
680 client_ptr_t device; /* opaque ptr for the device */
681 obj_handle_t file; /* file handle */
682 } create;
683 struct
685 enum irp_type type; /* IRP_CALL_CLOSE */
686 int __pad;
687 client_ptr_t file; /* opaque ptr for the file object */
688 } close;
689 struct
691 enum irp_type type; /* IRP_CALL_READ */
692 unsigned int key; /* driver key */
693 data_size_t out_size; /* needed output size */
694 int __pad;
695 client_ptr_t file; /* opaque ptr for the file object */
696 file_pos_t pos; /* file position */
697 } read;
698 struct
700 enum irp_type type; /* IRP_CALL_WRITE */
701 unsigned int key; /* driver key */
702 client_ptr_t file; /* opaque ptr for the file object */
703 file_pos_t pos; /* file position */
704 } write;
705 struct
707 enum irp_type type; /* IRP_CALL_FLUSH */
708 int __pad;
709 client_ptr_t file; /* opaque ptr for the file object */
710 } flush;
711 struct
713 enum irp_type type; /* IRP_CALL_IOCTL */
714 ioctl_code_t code; /* ioctl code */
715 data_size_t out_size; /* needed output size */
716 int __pad;
717 client_ptr_t file; /* opaque ptr for the file object */
718 } ioctl;
719 struct
721 enum irp_type type; /* IRP_CALL_FREE */
722 int __pad;
723 client_ptr_t obj; /* opaque ptr for the freed object */
724 } free;
725 } irp_params_t;
727 /* information about a PE image mapping, roughly equivalent to SECTION_IMAGE_INFORMATION */
728 typedef struct
730 client_ptr_t base;
731 client_ptr_t entry_point;
732 mem_size_t map_size;
733 mem_size_t stack_size;
734 mem_size_t stack_commit;
735 unsigned int zerobits;
736 unsigned int subsystem;
737 unsigned short subsystem_low;
738 unsigned short subsystem_high;
739 unsigned int gp;
740 unsigned short image_charact;
741 unsigned short dll_charact;
742 unsigned short machine;
743 unsigned char contains_code;
744 unsigned char image_flags;
745 unsigned int loader_flags;
746 unsigned int header_size;
747 unsigned int file_size;
748 unsigned int checksum;
749 cpu_type_t cpu;
750 int __pad;
751 } pe_image_info_t;
752 #define IMAGE_FLAGS_ComPlusNativeReady 0x01
753 #define IMAGE_FLAGS_ComPlusILOnly 0x02
754 #define IMAGE_FLAGS_ImageDynamicallyRelocated 0x04
755 #define IMAGE_FLAGS_ImageMappedFlat 0x08
756 #define IMAGE_FLAGS_BaseBelow4gb 0x10
757 #define IMAGE_FLAGS_WineBuiltin 0x40
758 #define IMAGE_FLAGS_WineFakeDll 0x80
760 struct rawinput_device
762 unsigned short usage_page;
763 unsigned short usage;
764 unsigned int flags;
765 user_handle_t target;
768 /****************************************************************/
769 /* Request declarations */
771 /* Create a new process from the context of the parent */
772 @REQ(new_process)
773 int inherit_all; /* inherit all handles from parent */
774 unsigned int create_flags; /* creation flags */
775 int socket_fd; /* file descriptor for process socket */
776 obj_handle_t exe_file; /* file handle for main exe */
777 unsigned int access; /* access rights for process object */
778 cpu_type_t cpu; /* CPU that the new process will use */
779 data_size_t info_size; /* size of startup info */
780 VARARG(objattr,object_attributes); /* object attributes */
781 VARARG(info,startup_info,info_size); /* startup information */
782 VARARG(env,unicode_str); /* environment for new process */
783 @REPLY
784 obj_handle_t info; /* new process info handle */
785 process_id_t pid; /* process id */
786 obj_handle_t handle; /* process handle (in the current process) */
787 @END
790 /* Execute a process, replacing the current one */
791 @REQ(exec_process)
792 int socket_fd; /* file descriptor for process socket */
793 obj_handle_t exe_file; /* file handle for main exe */
794 cpu_type_t cpu; /* CPU that the new process will use */
795 @END
798 /* Retrieve information about a newly started process */
799 @REQ(get_new_process_info)
800 obj_handle_t info; /* info handle returned from new_process_request */
801 @REPLY
802 int success; /* did the process start successfully? */
803 int exit_code; /* process exit code if failed */
804 @END
807 /* Create a new thread */
808 @REQ(new_thread)
809 obj_handle_t process; /* process in which to create thread */
810 unsigned int access; /* wanted access rights */
811 int suspend; /* new thread should be suspended on creation */
812 int request_fd; /* fd for request pipe */
813 VARARG(objattr,object_attributes); /* object attributes */
814 @REPLY
815 thread_id_t tid; /* thread id */
816 obj_handle_t handle; /* thread handle (in the current process) */
817 @END
820 /* Retrieve the new process startup info */
821 @REQ(get_startup_info)
822 @REPLY
823 data_size_t info_size; /* size of startup info */
824 VARARG(info,startup_info,info_size); /* startup information */
825 VARARG(env,unicode_str); /* environment */
826 @END
829 /* Signal the end of the process initialization */
830 @REQ(init_process_done)
831 int gui; /* is it a GUI process? */
832 mod_handle_t module; /* main module base address */
833 client_ptr_t ldt_copy; /* address of LDT copy (in thread address space) */
834 client_ptr_t entry; /* process entry point */
835 @REPLY
836 int suspend; /* is process suspended? */
837 @END
840 /* Initialize a thread; called from the child after fork()/clone() */
841 @REQ(init_thread)
842 int unix_pid; /* Unix pid of new thread */
843 int unix_tid; /* Unix tid of new thread */
844 int debug_level; /* new debug level */
845 client_ptr_t teb; /* TEB of new thread (in thread address space) */
846 client_ptr_t entry; /* entry point or PEB if initial thread (in thread address space) */
847 int reply_fd; /* fd for reply pipe */
848 int wait_fd; /* fd for blocking calls pipe */
849 cpu_type_t cpu; /* CPU that this thread is running on */
850 @REPLY
851 process_id_t pid; /* process id of the new thread's process */
852 thread_id_t tid; /* thread id of the new thread */
853 timeout_t server_start; /* server start time */
854 data_size_t info_size; /* total size of startup info */
855 int version; /* protocol version */
856 unsigned int all_cpus; /* bitset of supported CPUs */
857 int suspend; /* is thread suspended? */
858 @END
861 /* Terminate a process */
862 @REQ(terminate_process)
863 obj_handle_t handle; /* process handle to terminate */
864 int exit_code; /* process exit code */
865 @REPLY
866 int self; /* suicide? */
867 @END
870 /* Terminate a thread */
871 @REQ(terminate_thread)
872 obj_handle_t handle; /* thread handle to terminate */
873 int exit_code; /* thread exit code */
874 @REPLY
875 int self; /* suicide? */
876 int last; /* last thread in this process? */
877 @END
880 /* Retrieve information about a process */
881 @REQ(get_process_info)
882 obj_handle_t handle; /* process handle */
883 @REPLY
884 process_id_t pid; /* server process id */
885 process_id_t ppid; /* server process id of parent */
886 affinity_t affinity; /* process affinity mask */
887 client_ptr_t peb; /* PEB address in process address space */
888 timeout_t start_time; /* process start time */
889 timeout_t end_time; /* process end time */
890 int exit_code; /* process exit code */
891 int priority; /* priority class */
892 cpu_type_t cpu; /* CPU that this process is running on */
893 short int debugger_present; /* process is being debugged */
894 short int debug_children; /* inherit debugger to child processes */
895 @END
898 /* Retrieve information about a process memory usage */
899 @REQ(get_process_vm_counters)
900 obj_handle_t handle; /* process handle */
901 @REPLY
902 mem_size_t peak_virtual_size; /* peak virtual memory in bytes */
903 mem_size_t virtual_size; /* virtual memory in bytes */
904 mem_size_t peak_working_set_size; /* peak real memory in bytes */
905 mem_size_t working_set_size; /* real memory in bytes */
906 mem_size_t pagefile_usage; /* commit charge in bytes */
907 mem_size_t peak_pagefile_usage; /* peak commit charge in bytes */
908 @END
911 /* Set a process information */
912 @REQ(set_process_info)
913 obj_handle_t handle; /* process handle */
914 int mask; /* setting mask (see below) */
915 int priority; /* priority class */
916 affinity_t affinity; /* affinity mask */
917 @END
918 #define SET_PROCESS_INFO_PRIORITY 0x01
919 #define SET_PROCESS_INFO_AFFINITY 0x02
922 /* Retrieve information about a thread */
923 @REQ(get_thread_info)
924 obj_handle_t handle; /* thread handle */
925 thread_id_t tid_in; /* thread id (optional) */
926 @REPLY
927 process_id_t pid; /* server process id */
928 thread_id_t tid; /* server thread id */
929 client_ptr_t teb; /* thread teb pointer */
930 client_ptr_t entry_point; /* thread entry point */
931 affinity_t affinity; /* thread affinity mask */
932 int exit_code; /* thread exit code */
933 int priority; /* thread priority level */
934 int last; /* last thread in process */
935 @END
938 /* Retrieve information about thread times */
939 @REQ(get_thread_times)
940 obj_handle_t handle; /* thread handle */
941 @REPLY
942 timeout_t creation_time; /* thread creation time */
943 timeout_t exit_time; /* thread exit time */
944 @END
947 /* Set a thread information */
948 @REQ(set_thread_info)
949 obj_handle_t handle; /* thread handle */
950 int mask; /* setting mask (see below) */
951 int priority; /* priority class */
952 affinity_t affinity; /* affinity mask */
953 client_ptr_t entry_point; /* thread entry point */
954 obj_handle_t token; /* impersonation token */
955 @END
956 #define SET_THREAD_INFO_PRIORITY 0x01
957 #define SET_THREAD_INFO_AFFINITY 0x02
958 #define SET_THREAD_INFO_TOKEN 0x04
959 #define SET_THREAD_INFO_ENTRYPOINT 0x08
962 /* Retrieve information about a module */
963 @REQ(get_dll_info)
964 obj_handle_t handle; /* process handle */
965 mod_handle_t base_address; /* base address of module */
966 @REPLY
967 client_ptr_t entry_point;
968 data_size_t filename_len; /* buffer len in bytes required to store filename */
969 VARARG(filename,unicode_str); /* file name of module */
970 @END
973 /* Suspend a thread */
974 @REQ(suspend_thread)
975 obj_handle_t handle; /* thread handle */
976 @REPLY
977 int count; /* new suspend count */
978 @END
981 /* Resume a thread */
982 @REQ(resume_thread)
983 obj_handle_t handle; /* thread handle */
984 @REPLY
985 int count; /* new suspend count */
986 @END
989 /* Notify the server that a dll has been loaded */
990 @REQ(load_dll)
991 data_size_t dbg_offset; /* debug info offset */
992 mod_handle_t base; /* base address */
993 client_ptr_t name; /* ptr to ptr to name (in process addr space) */
994 data_size_t dbg_size; /* debug info size */
995 VARARG(filename,unicode_str); /* file name of dll */
996 @END
999 /* Notify the server that a dll is being unloaded */
1000 @REQ(unload_dll)
1001 mod_handle_t base; /* base address */
1002 @END
1005 /* Queue an APC for a thread or process */
1006 @REQ(queue_apc)
1007 obj_handle_t handle; /* thread or process handle */
1008 apc_call_t call; /* call arguments */
1009 @REPLY
1010 obj_handle_t handle; /* APC handle */
1011 int self; /* run APC in caller itself? */
1012 @END
1015 /* Get the result of an APC call */
1016 @REQ(get_apc_result)
1017 obj_handle_t handle; /* handle to the APC */
1018 @REPLY
1019 apc_result_t result; /* result of the APC */
1020 @END
1023 /* Close a handle for the current process */
1024 @REQ(close_handle)
1025 obj_handle_t handle; /* handle to close */
1026 @END
1029 /* Set a handle information */
1030 @REQ(set_handle_info)
1031 obj_handle_t handle; /* handle we are interested in */
1032 int flags; /* new handle flags */
1033 int mask; /* mask for flags to set */
1034 @REPLY
1035 int old_flags; /* old flag value */
1036 @END
1039 /* Duplicate a handle */
1040 @REQ(dup_handle)
1041 obj_handle_t src_process; /* src process handle */
1042 obj_handle_t src_handle; /* src handle to duplicate */
1043 obj_handle_t dst_process; /* dst process handle */
1044 unsigned int access; /* wanted access rights */
1045 unsigned int attributes; /* object attributes */
1046 unsigned int options; /* duplicate options (see below) */
1047 @REPLY
1048 obj_handle_t handle; /* duplicated handle in dst process */
1049 int self; /* is the source the current process? */
1050 int closed; /* whether the source handle has been closed */
1051 @END
1052 #define DUP_HANDLE_CLOSE_SOURCE DUPLICATE_CLOSE_SOURCE
1053 #define DUP_HANDLE_SAME_ACCESS DUPLICATE_SAME_ACCESS
1054 #define DUP_HANDLE_MAKE_GLOBAL 0x80000000 /* Not a Windows flag */
1057 /* Open a handle to a process */
1058 @REQ(open_process)
1059 process_id_t pid; /* process id to open */
1060 unsigned int access; /* wanted access rights */
1061 unsigned int attributes; /* object attributes */
1062 @REPLY
1063 obj_handle_t handle; /* handle to the process */
1064 @END
1067 /* Open a handle to a thread */
1068 @REQ(open_thread)
1069 thread_id_t tid; /* thread id to open */
1070 unsigned int access; /* wanted access rights */
1071 unsigned int attributes; /* object attributes */
1072 @REPLY
1073 obj_handle_t handle; /* handle to the thread */
1074 @END
1077 /* Wait for handles */
1078 @REQ(select)
1079 int flags; /* wait flags (see below) */
1080 client_ptr_t cookie; /* magic cookie to return to client */
1081 timeout_t timeout; /* timeout */
1082 obj_handle_t prev_apc; /* handle to previous APC */
1083 VARARG(result,apc_result); /* result of previous APC */
1084 VARARG(data,select_op); /* operation-specific data */
1085 @REPLY
1086 timeout_t timeout; /* timeout converted to absolute */
1087 apc_call_t call; /* APC call arguments */
1088 obj_handle_t apc_handle; /* handle to next APC */
1089 @END
1090 #define SELECT_ALERTABLE 1
1091 #define SELECT_INTERRUPTIBLE 2
1094 /* Create an event */
1095 @REQ(create_event)
1096 unsigned int access; /* wanted access rights */
1097 int manual_reset; /* manual reset event */
1098 int initial_state; /* initial state of the event */
1099 VARARG(objattr,object_attributes); /* object attributes */
1100 @REPLY
1101 obj_handle_t handle; /* handle to the event */
1102 @END
1104 /* Event operation */
1105 @REQ(event_op)
1106 obj_handle_t handle; /* handle to event */
1107 int op; /* event operation (see below) */
1108 @REPLY
1109 int state; /* previous state */
1110 @END
1111 enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT };
1113 @REQ(query_event)
1114 obj_handle_t handle; /* handle to event */
1115 @REPLY
1116 int manual_reset; /* manual reset event */
1117 int state; /* current state of the event */
1118 @END
1120 /* Open an event */
1121 @REQ(open_event)
1122 unsigned int access; /* wanted access rights */
1123 unsigned int attributes; /* object attributes */
1124 obj_handle_t rootdir; /* root directory */
1125 VARARG(name,unicode_str); /* object name */
1126 @REPLY
1127 obj_handle_t handle; /* handle to the event */
1128 @END
1131 /* Create a keyed event */
1132 @REQ(create_keyed_event)
1133 unsigned int access; /* wanted access rights */
1134 VARARG(objattr,object_attributes); /* object attributes */
1135 @REPLY
1136 obj_handle_t handle; /* handle to the event */
1137 @END
1139 /* Open a keyed event */
1140 @REQ(open_keyed_event)
1141 unsigned int access; /* wanted access rights */
1142 unsigned int attributes; /* object attributes */
1143 obj_handle_t rootdir; /* root directory */
1144 VARARG(name,unicode_str); /* object name */
1145 @REPLY
1146 obj_handle_t handle; /* handle to the event */
1147 @END
1150 /* Create a mutex */
1151 @REQ(create_mutex)
1152 unsigned int access; /* wanted access rights */
1153 int owned; /* initially owned? */
1154 VARARG(objattr,object_attributes); /* object attributes */
1155 @REPLY
1156 obj_handle_t handle; /* handle to the mutex */
1157 @END
1160 /* Release a mutex */
1161 @REQ(release_mutex)
1162 obj_handle_t handle; /* handle to the mutex */
1163 @REPLY
1164 unsigned int prev_count; /* value of internal counter, before release */
1165 @END
1168 /* Open a mutex */
1169 @REQ(open_mutex)
1170 unsigned int access; /* wanted access rights */
1171 unsigned int attributes; /* object attributes */
1172 obj_handle_t rootdir; /* root directory */
1173 VARARG(name,unicode_str); /* object name */
1174 @REPLY
1175 obj_handle_t handle; /* handle to the mutex */
1176 @END
1179 /* Query a mutex */
1180 @REQ(query_mutex)
1181 obj_handle_t handle; /* handle to mutex */
1182 @REPLY
1183 unsigned int count; /* current count of mutex */
1184 int owned; /* true if owned by current thread */
1185 int abandoned; /* true if abandoned */
1186 @END
1189 /* Create a semaphore */
1190 @REQ(create_semaphore)
1191 unsigned int access; /* wanted access rights */
1192 unsigned int initial; /* initial count */
1193 unsigned int max; /* maximum count */
1194 VARARG(objattr,object_attributes); /* object attributes */
1195 @REPLY
1196 obj_handle_t handle; /* handle to the semaphore */
1197 @END
1200 /* Release a semaphore */
1201 @REQ(release_semaphore)
1202 obj_handle_t handle; /* handle to the semaphore */
1203 unsigned int count; /* count to add to semaphore */
1204 @REPLY
1205 unsigned int prev_count; /* previous semaphore count */
1206 @END
1208 @REQ(query_semaphore)
1209 obj_handle_t handle; /* handle to the semaphore */
1210 @REPLY
1211 unsigned int current; /* current count */
1212 unsigned int max; /* maximum count */
1213 @END
1215 /* Open a semaphore */
1216 @REQ(open_semaphore)
1217 unsigned int access; /* wanted access rights */
1218 unsigned int attributes; /* object attributes */
1219 obj_handle_t rootdir; /* root directory */
1220 VARARG(name,unicode_str); /* object name */
1221 @REPLY
1222 obj_handle_t handle; /* handle to the semaphore */
1223 @END
1226 /* Create a file */
1227 @REQ(create_file)
1228 unsigned int access; /* wanted access rights */
1229 unsigned int sharing; /* sharing flags */
1230 int create; /* file create action */
1231 unsigned int options; /* file options */
1232 unsigned int attrs; /* file attributes for creation */
1233 VARARG(objattr,object_attributes); /* object attributes */
1234 VARARG(filename,string); /* file name */
1235 @REPLY
1236 obj_handle_t handle; /* handle to the file */
1237 @END
1240 /* Open a file object */
1241 @REQ(open_file_object)
1242 unsigned int access; /* wanted access rights */
1243 unsigned int attributes; /* open attributes */
1244 obj_handle_t rootdir; /* root directory */
1245 unsigned int sharing; /* sharing flags */
1246 unsigned int options; /* file options */
1247 VARARG(filename,unicode_str); /* file name */
1248 @REPLY
1249 obj_handle_t handle; /* handle to the file */
1250 @END
1253 /* Allocate a file handle for a Unix fd */
1254 @REQ(alloc_file_handle)
1255 unsigned int access; /* wanted access rights */
1256 unsigned int attributes; /* object attributes */
1257 int fd; /* file descriptor on the client side */
1258 @REPLY
1259 obj_handle_t handle; /* handle to the file */
1260 @END
1263 /* Get the Unix name from a file handle */
1264 @REQ(get_handle_unix_name)
1265 obj_handle_t handle; /* file handle */
1266 @REPLY
1267 data_size_t name_len; /* unix name length */
1268 VARARG(name,string); /* unix name */
1269 @END
1272 /* Get a Unix fd to access a file */
1273 @REQ(get_handle_fd)
1274 obj_handle_t handle; /* handle to the file */
1275 @REPLY
1276 int type; /* file type (see below) */
1277 int cacheable; /* can fd be cached in the client? */
1278 unsigned int access; /* file access rights */
1279 unsigned int options; /* file open options */
1280 @END
1281 enum server_fd_type
1283 FD_TYPE_INVALID, /* invalid file (no associated fd) */
1284 FD_TYPE_FILE, /* regular file */
1285 FD_TYPE_DIR, /* directory */
1286 FD_TYPE_SOCKET, /* socket */
1287 FD_TYPE_SERIAL, /* serial port */
1288 FD_TYPE_PIPE, /* named pipe */
1289 FD_TYPE_MAILSLOT, /* mailslot */
1290 FD_TYPE_CHAR, /* unspecified char device */
1291 FD_TYPE_DEVICE, /* Windows device file */
1292 FD_TYPE_NB_TYPES
1296 /* Retrieve (or allocate) the client-side directory cache entry */
1297 @REQ(get_directory_cache_entry)
1298 obj_handle_t handle; /* handle to the directory */
1299 @REPLY
1300 int entry; /* cache entry on the client side */
1301 VARARG(free,ints); /* entries that can be freed */
1302 @END
1305 /* Flush a file buffers */
1306 @REQ(flush)
1307 async_data_t async; /* async I/O parameters */
1308 @REPLY
1309 obj_handle_t event; /* event set when finished */
1310 @END
1312 /* Query file information */
1313 @REQ(get_file_info)
1314 obj_handle_t handle; /* handle to the file */
1315 unsigned int info_class; /* queried information class */
1316 @REPLY
1317 VARARG(data,bytes); /* file info data */
1318 @END
1320 /* Query volume information */
1321 @REQ(get_volume_info)
1322 obj_handle_t handle; /* handle to the file */
1323 unsigned int info_class; /* queried information class */
1324 @REPLY
1325 VARARG(data,bytes); /* volume info data */
1326 @END
1328 /* Lock a region of a file */
1329 @REQ(lock_file)
1330 obj_handle_t handle; /* handle to the file */
1331 file_pos_t offset; /* offset of start of lock */
1332 file_pos_t count; /* count of bytes to lock */
1333 int shared; /* shared or exclusive lock? */
1334 int wait; /* do we want to wait? */
1335 @REPLY
1336 obj_handle_t handle; /* handle to wait on */
1337 int overlapped; /* is it an overlapped I/O handle? */
1338 @END
1341 /* Unlock a region of a file */
1342 @REQ(unlock_file)
1343 obj_handle_t handle; /* handle to the file */
1344 file_pos_t offset; /* offset of start of unlock */
1345 file_pos_t count; /* count of bytes to unlock */
1346 @END
1349 /* Create a socket */
1350 @REQ(create_socket)
1351 unsigned int access; /* wanted access rights */
1352 unsigned int attributes; /* object attributes */
1353 int family; /* family, see socket manpage */
1354 int type; /* type, see socket manpage */
1355 int protocol; /* protocol, see socket manpage */
1356 unsigned int flags; /* socket flags */
1357 @REPLY
1358 obj_handle_t handle; /* handle to the new socket */
1359 @END
1362 /* Accept a socket */
1363 @REQ(accept_socket)
1364 obj_handle_t lhandle; /* handle to the listening socket */
1365 unsigned int access; /* wanted access rights */
1366 unsigned int attributes; /* object attributes */
1367 @REPLY
1368 obj_handle_t handle; /* handle to the new socket */
1369 @END
1372 /* Accept into an initialized socket */
1373 @REQ(accept_into_socket)
1374 obj_handle_t lhandle; /* handle to the listening socket */
1375 obj_handle_t ahandle; /* handle to the accepting socket */
1376 @END
1379 /* Set socket event parameters */
1380 @REQ(set_socket_event)
1381 obj_handle_t handle; /* handle to the socket */
1382 unsigned int mask; /* event mask */
1383 obj_handle_t event; /* event object */
1384 user_handle_t window; /* window to send the message to */
1385 unsigned int msg; /* message to send */
1386 @END
1389 /* Get socket event parameters */
1390 @REQ(get_socket_event)
1391 obj_handle_t handle; /* handle to the socket */
1392 int service; /* clear pending? */
1393 obj_handle_t c_event; /* event to clear */
1394 @REPLY
1395 unsigned int mask; /* event mask */
1396 unsigned int pmask; /* pending events */
1397 unsigned int state; /* status bits */
1398 VARARG(errors,ints); /* event errors */
1399 @END
1402 /* Get socket info */
1403 @REQ(get_socket_info)
1404 obj_handle_t handle; /* handle to the socket */
1405 @REPLY
1406 int family; /* family, see socket manpage */
1407 int type; /* type, see socket manpage */
1408 int protocol; /* protocol, see socket manpage */
1409 @END
1412 /* Re-enable pending socket events */
1413 @REQ(enable_socket_event)
1414 obj_handle_t handle; /* handle to the socket */
1415 unsigned int mask; /* events to re-enable */
1416 unsigned int sstate; /* status bits to set */
1417 unsigned int cstate; /* status bits to clear */
1418 @END
1420 @REQ(set_socket_deferred)
1421 obj_handle_t handle; /* handle to the socket */
1422 obj_handle_t deferred; /* handle to the socket for which accept() is deferred */
1423 @END
1425 /* Allocate a console (only used by a console renderer) */
1426 @REQ(alloc_console)
1427 unsigned int access; /* wanted access rights */
1428 unsigned int attributes; /* object attributes */
1429 process_id_t pid; /* pid of process which shall be attached to the console */
1430 int input_fd; /* if pid=-1 (bare console to current process), fd for input */
1431 @REPLY
1432 obj_handle_t handle_in; /* handle to console input */
1433 obj_handle_t event; /* handle to renderer events change notification */
1434 @END
1437 /* Free the console of the current process */
1438 @REQ(free_console)
1439 @END
1442 #define CONSOLE_RENDERER_NONE_EVENT 0x00
1443 #define CONSOLE_RENDERER_TITLE_EVENT 0x01
1444 #define CONSOLE_RENDERER_ACTIVE_SB_EVENT 0x02
1445 #define CONSOLE_RENDERER_SB_RESIZE_EVENT 0x03
1446 #define CONSOLE_RENDERER_UPDATE_EVENT 0x04
1447 #define CONSOLE_RENDERER_CURSOR_POS_EVENT 0x05
1448 #define CONSOLE_RENDERER_CURSOR_GEOM_EVENT 0x06
1449 #define CONSOLE_RENDERER_DISPLAY_EVENT 0x07
1450 #define CONSOLE_RENDERER_EXIT_EVENT 0x08
1451 struct console_renderer_event
1453 short event;
1454 union
1456 struct
1458 short top;
1459 short bottom;
1460 } update;
1461 struct
1463 short width;
1464 short height;
1465 } resize;
1466 struct
1468 short x;
1469 short y;
1470 } cursor_pos;
1471 struct
1473 short visible;
1474 short size;
1475 } cursor_geom;
1476 struct
1478 short left;
1479 short top;
1480 short width;
1481 short height;
1482 } display;
1483 } u;
1486 /* retrieve console events for the renderer */
1487 @REQ(get_console_renderer_events)
1488 obj_handle_t handle; /* handle to console input events */
1489 @REPLY
1490 VARARG(data,bytes); /* the various console_renderer_events */
1491 @END
1494 /* Open a handle to the process console */
1495 @REQ(open_console)
1496 obj_handle_t from; /* 0 (resp 1) input (resp output) of current process console */
1497 /* otherwise console_in handle to get active screen buffer? */
1498 unsigned int access; /* wanted access rights */
1499 unsigned int attributes; /* object attributes */
1500 int share; /* share mask (only for output handles) */
1501 @REPLY
1502 obj_handle_t handle; /* handle to the console */
1503 @END
1506 /* Attach to a other process's console */
1507 @REQ(attach_console)
1508 process_id_t pid; /* pid of attached console process */
1509 @REPLY
1510 obj_handle_t std_in; /* attached stdin */
1511 obj_handle_t std_out; /* attached stdout */
1512 obj_handle_t std_err; /* attached stderr */
1513 @END
1516 /* Get the input queue wait event */
1517 @REQ(get_console_wait_event)
1518 @REPLY
1519 obj_handle_t handle;
1520 @END
1522 /* Get a console mode (input or output) */
1523 @REQ(get_console_mode)
1524 obj_handle_t handle; /* handle to the console */
1525 @REPLY
1526 int mode; /* console mode */
1527 @END
1530 /* Set a console mode (input or output) */
1531 @REQ(set_console_mode)
1532 obj_handle_t handle; /* handle to the console */
1533 int mode; /* console mode */
1534 @END
1537 /* Set info about a console (input only) */
1538 @REQ(set_console_input_info)
1539 obj_handle_t handle; /* handle to console input, or 0 for process' console */
1540 int mask; /* setting mask (see below) */
1541 obj_handle_t active_sb; /* active screen buffer */
1542 int history_mode; /* whether we duplicate lines in history */
1543 int history_size; /* number of lines in history */
1544 int edition_mode; /* index to the edition mode flavors */
1545 int input_cp; /* console input codepage */
1546 int output_cp; /* console output codepage */
1547 user_handle_t win; /* console window if backend supports it */
1548 VARARG(title,unicode_str); /* console title */
1549 @END
1550 #define SET_CONSOLE_INPUT_INFO_ACTIVE_SB 0x01
1551 #define SET_CONSOLE_INPUT_INFO_TITLE 0x02
1552 #define SET_CONSOLE_INPUT_INFO_HISTORY_MODE 0x04
1553 #define SET_CONSOLE_INPUT_INFO_HISTORY_SIZE 0x08
1554 #define SET_CONSOLE_INPUT_INFO_EDITION_MODE 0x10
1555 #define SET_CONSOLE_INPUT_INFO_INPUT_CODEPAGE 0x20
1556 #define SET_CONSOLE_INPUT_INFO_OUTPUT_CODEPAGE 0x40
1557 #define SET_CONSOLE_INPUT_INFO_WIN 0x80
1560 /* Get info about a console (input only) */
1561 @REQ(get_console_input_info)
1562 obj_handle_t handle; /* handle to console input, or 0 for process' console */
1563 @REPLY
1564 int history_mode; /* whether we duplicate lines in history */
1565 int history_size; /* number of lines in history */
1566 int history_index; /* number of used lines in history */
1567 int edition_mode; /* index to the edition mode flavors */
1568 int input_cp; /* console input codepage */
1569 int output_cp; /* console output codepage */
1570 user_handle_t win; /* console window if backend supports it */
1571 VARARG(title,unicode_str); /* console title */
1572 @END
1575 /* appends a string to console's history */
1576 @REQ(append_console_input_history)
1577 obj_handle_t handle; /* handle to console input, or 0 for process' console */
1578 VARARG(line,unicode_str); /* line to add */
1579 @END
1582 /* appends a string to console's history */
1583 @REQ(get_console_input_history)
1584 obj_handle_t handle; /* handle to console input, or 0 for process' console */
1585 int index; /* index to get line from */
1586 @REPLY
1587 int total; /* total length of line in Unicode chars */
1588 VARARG(line,unicode_str); /* line to add */
1589 @END
1592 /* creates a new screen buffer on process' console */
1593 @REQ(create_console_output)
1594 obj_handle_t handle_in; /* handle to console input, or 0 for process' console */
1595 unsigned int access; /* wanted access rights */
1596 unsigned int attributes; /* object attributes */
1597 unsigned int share; /* sharing credentials */
1598 int fd; /* for bare consoles, fd the screen-buffer is attached to */
1599 @REPLY
1600 obj_handle_t handle_out; /* handle to the screen buffer */
1601 @END
1604 /* Set info about a console (output only) */
1605 @REQ(set_console_output_info)
1606 obj_handle_t handle; /* handle to the console */
1607 int mask; /* setting mask (see below) */
1608 short int cursor_size; /* size of cursor (percentage filled) */
1609 short int cursor_visible;/* cursor visibility flag */
1610 short int cursor_x; /* position of cursor (x, y) */
1611 short int cursor_y;
1612 short int width; /* width of the screen buffer */
1613 short int height; /* height of the screen buffer */
1614 short int attr; /* default fill attributes (screen colors) */
1615 short int popup_attr; /* pop-up color attributes */
1616 short int win_left; /* window actually displayed by renderer */
1617 short int win_top; /* the rect area is expressed within the */
1618 short int win_right; /* boundaries of the screen buffer */
1619 short int win_bottom;
1620 short int max_width; /* maximum size (width x height) for the window */
1621 short int max_height;
1622 short int font_width; /* font size (width x height) */
1623 short int font_height;
1624 VARARG(colors,uints); /* color table */
1625 @END
1626 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_GEOM 0x0001
1627 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_POS 0x0002
1628 #define SET_CONSOLE_OUTPUT_INFO_SIZE 0x0004
1629 #define SET_CONSOLE_OUTPUT_INFO_ATTR 0x0008
1630 #define SET_CONSOLE_OUTPUT_INFO_DISPLAY_WINDOW 0x0010
1631 #define SET_CONSOLE_OUTPUT_INFO_MAX_SIZE 0x0020
1632 #define SET_CONSOLE_OUTPUT_INFO_FONT 0x0040
1633 #define SET_CONSOLE_OUTPUT_INFO_COLORTABLE 0x0080
1634 #define SET_CONSOLE_OUTPUT_INFO_POPUP_ATTR 0x0100
1637 /* Get info about a console (output only) */
1638 @REQ(get_console_output_info)
1639 obj_handle_t handle; /* handle to the console */
1640 @REPLY
1641 short int cursor_size; /* size of cursor (percentage filled) */
1642 short int cursor_visible;/* cursor visibility flag */
1643 short int cursor_x; /* position of cursor (x, y) */
1644 short int cursor_y;
1645 short int width; /* width of the screen buffer */
1646 short int height; /* height of the screen buffer */
1647 short int attr; /* default fill attributes (screen colors) */
1648 short int popup_attr; /* pop-up color attributes */
1649 short int win_left; /* window actually displayed by renderer */
1650 short int win_top; /* the rect area is expressed within the */
1651 short int win_right; /* boundaries of the screen buffer */
1652 short int win_bottom;
1653 short int max_width; /* maximum size (width x height) for the window */
1654 short int max_height;
1655 short int font_width; /* font size (width x height) */
1656 short int font_height;
1657 VARARG(colors,uints); /* color table */
1658 @END
1660 /* Add input records to a console input queue */
1661 @REQ(write_console_input)
1662 obj_handle_t handle; /* handle to the console input */
1663 VARARG(rec,input_records); /* input records */
1664 @REPLY
1665 int written; /* number of records written */
1666 @END
1669 /* Fetch input records from a console input queue */
1670 @REQ(read_console_input)
1671 obj_handle_t handle; /* handle to the console input */
1672 int flush; /* flush the retrieved records from the queue? */
1673 @REPLY
1674 int read; /* number of records read */
1675 VARARG(rec,input_records); /* input records */
1676 @END
1679 /* write data (chars and/or attributes) in a screen buffer */
1680 @REQ(write_console_output)
1681 obj_handle_t handle; /* handle to the console output */
1682 int x; /* position where to start writing */
1683 int y;
1684 int mode; /* char info (see below) */
1685 int wrap; /* wrap around at end of line? */
1686 VARARG(data,bytes); /* info to write */
1687 @REPLY
1688 int written; /* number of char infos actually written */
1689 int width; /* width of screen buffer */
1690 int height; /* height of screen buffer */
1691 @END
1692 enum char_info_mode
1694 CHAR_INFO_MODE_TEXT, /* characters only */
1695 CHAR_INFO_MODE_ATTR, /* attributes only */
1696 CHAR_INFO_MODE_TEXTATTR, /* both characters and attributes */
1697 CHAR_INFO_MODE_TEXTSTDATTR /* characters but use standard attributes */
1701 /* fill a screen buffer with constant data (chars and/or attributes) */
1702 @REQ(fill_console_output)
1703 obj_handle_t handle; /* handle to the console output */
1704 int x; /* position where to start writing */
1705 int y;
1706 int mode; /* char info mode */
1707 int count; /* number to write */
1708 int wrap; /* wrap around at end of line? */
1709 char_info_t data; /* data to write */
1710 @REPLY
1711 int written; /* number of char infos actually written */
1712 @END
1715 /* read data (chars and/or attributes) from a screen buffer */
1716 @REQ(read_console_output)
1717 obj_handle_t handle; /* handle to the console output */
1718 int x; /* position (x,y) where to start reading */
1719 int y;
1720 int mode; /* char info mode */
1721 int wrap; /* wrap around at end of line? */
1722 @REPLY
1723 int width; /* width of screen buffer */
1724 int height; /* height of screen buffer */
1725 VARARG(data,bytes);
1726 @END
1729 /* move a rect (of data) in screen buffer content */
1730 @REQ(move_console_output)
1731 obj_handle_t handle; /* handle to the console output */
1732 short int x_src; /* position (x, y) of rect to start moving from */
1733 short int y_src;
1734 short int x_dst; /* position (x, y) of rect to move to */
1735 short int y_dst;
1736 short int w; /* size of the rect (width, height) to move */
1737 short int h;
1738 @END
1741 /* Sends a signal to a process group */
1742 @REQ(send_console_signal)
1743 int signal; /* the signal to send */
1744 process_id_t group_id; /* the group to send the signal to */
1745 @END
1748 /* enable directory change notifications */
1749 @REQ(read_directory_changes)
1750 unsigned int filter; /* notification filter */
1751 int subtree; /* watch the subtree? */
1752 int want_data; /* flag indicating whether change data should be collected */
1753 async_data_t async; /* async I/O parameters */
1754 @END
1757 @REQ(read_change)
1758 obj_handle_t handle;
1759 @REPLY
1760 VARARG(events,filesystem_event); /* collected filesystem events */
1761 @END
1764 /* Create a file mapping */
1765 @REQ(create_mapping)
1766 unsigned int access; /* wanted access rights */
1767 unsigned int flags; /* SEC_* flags */
1768 unsigned int file_access; /* file access rights */
1769 mem_size_t size; /* mapping size */
1770 obj_handle_t file_handle; /* file handle */
1771 VARARG(objattr,object_attributes); /* object attributes */
1772 @REPLY
1773 obj_handle_t handle; /* handle to the mapping */
1774 @END
1777 /* Open a mapping */
1778 @REQ(open_mapping)
1779 unsigned int access; /* wanted access rights */
1780 unsigned int attributes; /* object attributes */
1781 obj_handle_t rootdir; /* root directory */
1782 VARARG(name,unicode_str); /* object name */
1783 @REPLY
1784 obj_handle_t handle; /* handle to the mapping */
1785 @END
1788 /* Get information about a file mapping */
1789 @REQ(get_mapping_info)
1790 obj_handle_t handle; /* handle to the mapping */
1791 unsigned int access; /* wanted access rights */
1792 @REPLY
1793 mem_size_t size; /* mapping size */
1794 unsigned int flags; /* SEC_* flags */
1795 obj_handle_t shared_file; /* shared mapping file handle */
1796 VARARG(image,pe_image_info);/* image info for SEC_IMAGE mappings */
1797 @END
1800 /* Add a memory view in the current process */
1801 @REQ(map_view)
1802 obj_handle_t mapping; /* file mapping handle */
1803 unsigned int access; /* wanted access rights */
1804 client_ptr_t base; /* view base address (page-aligned) */
1805 mem_size_t size; /* view size */
1806 file_pos_t start; /* start offset in mapping */
1807 @END
1810 /* Unmap a memory view from the current process */
1811 @REQ(unmap_view)
1812 client_ptr_t base; /* view base address */
1813 @END
1816 /* Get a range of committed pages in a file mapping */
1817 @REQ(get_mapping_committed_range)
1818 client_ptr_t base; /* view base address */
1819 file_pos_t offset; /* starting offset (page-aligned, in bytes) */
1820 @REPLY
1821 mem_size_t size; /* size of range starting at offset (page-aligned, in bytes) */
1822 int committed; /* whether it is a committed range */
1823 @END
1826 /* Add a range to the committed pages in a file mapping */
1827 @REQ(add_mapping_committed_range)
1828 client_ptr_t base; /* view base address */
1829 file_pos_t offset; /* starting offset (page-aligned, in bytes) */
1830 mem_size_t size; /* size to set (page-aligned, in bytes) or 0 if only retrieving */
1831 @END
1834 /* Check if two memory maps are for the same file */
1835 @REQ(is_same_mapping)
1836 client_ptr_t base1; /* first view base address */
1837 client_ptr_t base2; /* second view base address */
1838 @END
1841 #define SNAP_PROCESS 0x00000001
1842 #define SNAP_THREAD 0x00000002
1843 /* Create a snapshot */
1844 @REQ(create_snapshot)
1845 unsigned int attributes; /* object attributes */
1846 unsigned int flags; /* snapshot flags (SNAP_*) */
1847 @REPLY
1848 obj_handle_t handle; /* handle to the snapshot */
1849 @END
1852 /* Get the next process from a snapshot */
1853 @REQ(next_process)
1854 obj_handle_t handle; /* handle to the snapshot */
1855 int reset; /* reset snapshot position? */
1856 @REPLY
1857 int count; /* process usage count */
1858 process_id_t pid; /* process id */
1859 process_id_t ppid; /* parent process id */
1860 int threads; /* number of threads */
1861 int priority; /* process priority */
1862 int handles; /* number of handles */
1863 int unix_pid; /* Unix pid */
1864 VARARG(filename,unicode_str); /* file name of main exe */
1865 @END
1868 /* Get the next thread from a snapshot */
1869 @REQ(next_thread)
1870 obj_handle_t handle; /* handle to the snapshot */
1871 int reset; /* reset snapshot position? */
1872 @REPLY
1873 int count; /* thread usage count */
1874 process_id_t pid; /* process id */
1875 thread_id_t tid; /* thread id */
1876 int base_pri; /* base priority */
1877 int delta_pri; /* delta priority */
1878 @END
1881 /* Wait for a debug event */
1882 @REQ(wait_debug_event)
1883 int get_handle; /* should we alloc a handle for waiting? */
1884 @REPLY
1885 process_id_t pid; /* process id */
1886 thread_id_t tid; /* thread id */
1887 obj_handle_t wait; /* wait handle if no event ready */
1888 VARARG(event,debug_event); /* debug event data */
1889 @END
1892 /* Queue an exception event */
1893 @REQ(queue_exception_event)
1894 int first; /* first chance exception? */
1895 unsigned int code; /* exception code */
1896 unsigned int flags; /* exception flags */
1897 client_ptr_t record; /* exception record */
1898 client_ptr_t address; /* exception address */
1899 data_size_t len; /* size of parameters */
1900 VARARG(params,uints64,len);/* exception parameters */
1901 VARARG(context,context); /* thread context */
1902 @REPLY
1903 obj_handle_t handle; /* handle to the queued event */
1904 @END
1907 /* Retrieve the status of an exception event */
1908 @REQ(get_exception_status)
1909 obj_handle_t handle; /* handle to the queued event */
1910 @REPLY
1911 VARARG(context,context); /* modified thread context */
1912 @END
1915 /* Continue a debug event */
1916 @REQ(continue_debug_event)
1917 process_id_t pid; /* process id to continue */
1918 thread_id_t tid; /* thread id to continue */
1919 int status; /* continuation status */
1920 @END
1923 /* Start/stop debugging an existing process */
1924 @REQ(debug_process)
1925 process_id_t pid; /* id of the process to debug */
1926 int attach; /* 1=attaching / 0=detaching from the process */
1927 @END
1930 /* Simulate a breakpoint in a process */
1931 @REQ(debug_break)
1932 obj_handle_t handle; /* process handle */
1933 @REPLY
1934 int self; /* was it the caller itself? */
1935 @END
1938 /* Set debugger kill on exit flag */
1939 @REQ(set_debugger_kill_on_exit)
1940 int kill_on_exit; /* 0=detach/1=kill debuggee when debugger dies */
1941 @END
1944 /* Read data from a process address space */
1945 @REQ(read_process_memory)
1946 obj_handle_t handle; /* process handle */
1947 client_ptr_t addr; /* addr to read from */
1948 @REPLY
1949 VARARG(data,bytes); /* result data */
1950 @END
1953 /* Write data to a process address space */
1954 @REQ(write_process_memory)
1955 obj_handle_t handle; /* process handle */
1956 client_ptr_t addr; /* addr to write to */
1957 VARARG(data,bytes); /* data to write */
1958 @END
1961 /* Create a registry key */
1962 @REQ(create_key)
1963 unsigned int access; /* desired access rights */
1964 unsigned int options; /* creation options */
1965 VARARG(objattr,object_attributes); /* object attributes */
1966 VARARG(class,unicode_str); /* class name */
1967 @REPLY
1968 obj_handle_t hkey; /* handle to the created key */
1969 int created; /* has it been newly created? */
1970 @END
1972 /* Open a registry key */
1973 @REQ(open_key)
1974 obj_handle_t parent; /* handle to the parent key */
1975 unsigned int access; /* desired access rights */
1976 unsigned int attributes; /* object attributes */
1977 VARARG(name,unicode_str); /* key name */
1978 @REPLY
1979 obj_handle_t hkey; /* handle to the open key */
1980 @END
1983 /* Delete a registry key */
1984 @REQ(delete_key)
1985 obj_handle_t hkey; /* handle to the key */
1986 @END
1989 /* Flush a registry key */
1990 @REQ(flush_key)
1991 obj_handle_t hkey; /* handle to the key */
1992 @END
1995 /* Enumerate registry subkeys */
1996 @REQ(enum_key)
1997 obj_handle_t hkey; /* handle to registry key */
1998 int index; /* index of subkey (or -1 for current key) */
1999 int info_class; /* requested information class */
2000 @REPLY
2001 int subkeys; /* number of subkeys */
2002 int max_subkey; /* longest subkey name */
2003 int max_class; /* longest class name */
2004 int values; /* number of values */
2005 int max_value; /* longest value name */
2006 int max_data; /* longest value data */
2007 timeout_t modif; /* last modification time */
2008 data_size_t total; /* total length needed for full name and class */
2009 data_size_t namelen; /* length of key name in bytes */
2010 VARARG(name,unicode_str,namelen); /* key name */
2011 VARARG(class,unicode_str); /* class name */
2012 @END
2015 /* Set a value of a registry key */
2016 @REQ(set_key_value)
2017 obj_handle_t hkey; /* handle to registry key */
2018 int type; /* value type */
2019 data_size_t namelen; /* length of value name in bytes */
2020 VARARG(name,unicode_str,namelen); /* value name */
2021 VARARG(data,bytes); /* value data */
2022 @END
2025 /* Retrieve the value of a registry key */
2026 @REQ(get_key_value)
2027 obj_handle_t hkey; /* handle to registry key */
2028 VARARG(name,unicode_str); /* value name */
2029 @REPLY
2030 int type; /* value type */
2031 data_size_t total; /* total length needed for data */
2032 VARARG(data,bytes); /* value data */
2033 @END
2036 /* Enumerate a value of a registry key */
2037 @REQ(enum_key_value)
2038 obj_handle_t hkey; /* handle to registry key */
2039 int index; /* value index */
2040 int info_class; /* requested information class */
2041 @REPLY
2042 int type; /* value type */
2043 data_size_t total; /* total length needed for full name and data */
2044 data_size_t namelen; /* length of value name in bytes */
2045 VARARG(name,unicode_str,namelen); /* value name */
2046 VARARG(data,bytes); /* value data */
2047 @END
2050 /* Delete a value of a registry key */
2051 @REQ(delete_key_value)
2052 obj_handle_t hkey; /* handle to registry key */
2053 VARARG(name,unicode_str); /* value name */
2054 @END
2057 /* Load a registry branch from a file */
2058 @REQ(load_registry)
2059 obj_handle_t file; /* file to load from */
2060 VARARG(objattr,object_attributes); /* object attributes */
2061 @END
2064 /* UnLoad a registry branch from a file */
2065 @REQ(unload_registry)
2066 obj_handle_t hkey; /* root key to unload to */
2067 @END
2070 /* Save a registry branch to a file */
2071 @REQ(save_registry)
2072 obj_handle_t hkey; /* key to save */
2073 obj_handle_t file; /* file to save to */
2074 @END
2077 /* Add a registry key change notification */
2078 @REQ(set_registry_notification)
2079 obj_handle_t hkey; /* key to watch for changes */
2080 obj_handle_t event; /* event to set */
2081 int subtree; /* should we watch the whole subtree? */
2082 unsigned int filter; /* things to watch */
2083 @END
2086 /* Create a waitable timer */
2087 @REQ(create_timer)
2088 unsigned int access; /* wanted access rights */
2089 int manual; /* manual reset */
2090 VARARG(objattr,object_attributes); /* object attributes */
2091 @REPLY
2092 obj_handle_t handle; /* handle to the timer */
2093 @END
2096 /* Open a waitable timer */
2097 @REQ(open_timer)
2098 unsigned int access; /* wanted access rights */
2099 unsigned int attributes; /* object attributes */
2100 obj_handle_t rootdir; /* root directory */
2101 VARARG(name,unicode_str); /* object name */
2102 @REPLY
2103 obj_handle_t handle; /* handle to the timer */
2104 @END
2106 /* Set a waitable timer */
2107 @REQ(set_timer)
2108 obj_handle_t handle; /* handle to the timer */
2109 timeout_t expire; /* next expiration absolute time */
2110 client_ptr_t callback; /* callback function */
2111 client_ptr_t arg; /* callback argument */
2112 int period; /* timer period in ms */
2113 @REPLY
2114 int signaled; /* was the timer signaled before this call ? */
2115 @END
2117 /* Cancel a waitable timer */
2118 @REQ(cancel_timer)
2119 obj_handle_t handle; /* handle to the timer */
2120 @REPLY
2121 int signaled; /* was the timer signaled before this calltime ? */
2122 @END
2124 /* Get information on a waitable timer */
2125 @REQ(get_timer_info)
2126 obj_handle_t handle; /* handle to the timer */
2127 @REPLY
2128 timeout_t when; /* absolute time when the timer next expires */
2129 int signaled; /* is the timer signaled? */
2130 @END
2133 /* Retrieve the current context of a thread */
2134 @REQ(get_thread_context)
2135 obj_handle_t handle; /* thread handle */
2136 unsigned int flags; /* context flags */
2137 int suspend; /* suspend the thread if needed */
2138 @REPLY
2139 int self; /* was it a handle to the current thread? */
2140 VARARG(context,context); /* thread context */
2141 @END
2144 /* Set the current context of a thread */
2145 @REQ(set_thread_context)
2146 obj_handle_t handle; /* thread handle */
2147 int suspend; /* suspend the thread if needed */
2148 VARARG(context,context); /* thread context */
2149 @REPLY
2150 int self; /* was it a handle to the current thread? */
2151 @END
2154 /* Fetch a selector entry for a thread */
2155 @REQ(get_selector_entry)
2156 obj_handle_t handle; /* thread handle */
2157 int entry; /* LDT entry */
2158 @REPLY
2159 unsigned int base; /* selector base */
2160 unsigned int limit; /* selector limit */
2161 unsigned char flags; /* selector flags */
2162 @END
2165 /* Add an atom */
2166 @REQ(add_atom)
2167 obj_handle_t table; /* which table to add atom to */
2168 VARARG(name,unicode_str); /* atom name */
2169 @REPLY
2170 atom_t atom; /* resulting atom */
2171 @END
2174 /* Delete an atom */
2175 @REQ(delete_atom)
2176 obj_handle_t table; /* which table to delete atom from */
2177 atom_t atom; /* atom handle */
2178 @END
2181 /* Find an atom */
2182 @REQ(find_atom)
2183 obj_handle_t table; /* which table to find atom from */
2184 VARARG(name,unicode_str); /* atom name */
2185 @REPLY
2186 atom_t atom; /* atom handle */
2187 @END
2190 /* Get information about an atom */
2191 @REQ(get_atom_information)
2192 obj_handle_t table; /* which table to find atom from */
2193 atom_t atom; /* atom handle */
2194 @REPLY
2195 int count; /* atom lock count */
2196 int pinned; /* whether the atom has been pinned */
2197 data_size_t total; /* actual length of atom name */
2198 VARARG(name,unicode_str); /* atom name */
2199 @END
2202 /* Set information about an atom */
2203 @REQ(set_atom_information)
2204 obj_handle_t table; /* which table to find atom from */
2205 atom_t atom; /* atom handle */
2206 int pinned; /* whether to bump atom information */
2207 @END
2210 /* Empty an atom table */
2211 @REQ(empty_atom_table)
2212 obj_handle_t table; /* which table to find atom from */
2213 int if_pinned; /* whether to delete pinned atoms */
2214 @END
2217 /* Init an atom table */
2218 @REQ(init_atom_table)
2219 int entries; /* number of entries (only for local) */
2220 @REPLY
2221 obj_handle_t table; /* handle to the atom table */
2222 @END
2225 /* Get the message queue of the current thread */
2226 @REQ(get_msg_queue)
2227 @REPLY
2228 obj_handle_t handle; /* handle to the queue */
2229 @END
2232 /* Set the file descriptor associated to the current thread queue */
2233 @REQ(set_queue_fd)
2234 obj_handle_t handle; /* handle to the file descriptor */
2235 @END
2238 /* Set the current message queue wakeup mask */
2239 @REQ(set_queue_mask)
2240 unsigned int wake_mask; /* wakeup bits mask */
2241 unsigned int changed_mask; /* changed bits mask */
2242 int skip_wait; /* will we skip waiting if signaled? */
2243 @REPLY
2244 unsigned int wake_bits; /* current wake bits */
2245 unsigned int changed_bits; /* current changed bits */
2246 @END
2249 /* Get the current message queue status */
2250 @REQ(get_queue_status)
2251 unsigned int clear_bits; /* should we clear the change bits? */
2252 @REPLY
2253 unsigned int wake_bits; /* wake bits */
2254 unsigned int changed_bits; /* changed bits since last time */
2255 @END
2258 /* Retrieve the process idle event */
2259 @REQ(get_process_idle_event)
2260 obj_handle_t handle; /* process handle */
2261 @REPLY
2262 obj_handle_t event; /* handle to idle event */
2263 @END
2266 /* Send a message to a thread queue */
2267 @REQ(send_message)
2268 thread_id_t id; /* thread id */
2269 int type; /* message type (see below) */
2270 int flags; /* message flags (see below) */
2271 user_handle_t win; /* window handle */
2272 unsigned int msg; /* message code */
2273 lparam_t wparam; /* parameters */
2274 lparam_t lparam; /* parameters */
2275 timeout_t timeout; /* timeout for reply */
2276 VARARG(data,message_data); /* message data for sent messages */
2277 @END
2279 @REQ(post_quit_message)
2280 int exit_code; /* exit code to return */
2281 @END
2283 enum message_type
2285 MSG_ASCII, /* Ascii message (from SendMessageA) */
2286 MSG_UNICODE, /* Unicode message (from SendMessageW) */
2287 MSG_NOTIFY, /* notify message (from SendNotifyMessageW), always Unicode */
2288 MSG_CALLBACK, /* callback message (from SendMessageCallbackW), always Unicode */
2289 MSG_CALLBACK_RESULT,/* result of a callback message */
2290 MSG_OTHER_PROCESS, /* sent from other process, may include vararg data, always Unicode */
2291 MSG_POSTED, /* posted message (from PostMessageW), always Unicode */
2292 MSG_HARDWARE, /* hardware message */
2293 MSG_WINEVENT, /* winevent message */
2294 MSG_HOOK_LL /* low-level hardware hook */
2296 #define SEND_MSG_ABORT_IF_HUNG 0x01
2299 /* Send a hardware message to a thread queue */
2300 @REQ(send_hardware_message)
2301 user_handle_t win; /* window handle */
2302 hw_input_t input; /* input data */
2303 unsigned int flags; /* flags (see below) */
2304 @REPLY
2305 int wait; /* do we need to wait for a reply? */
2306 int prev_x; /* previous cursor position */
2307 int prev_y;
2308 int new_x; /* new cursor position */
2309 int new_y;
2310 VARARG(keystate,bytes); /* global state array for all the keys */
2311 @END
2312 #define SEND_HWMSG_INJECTED 0x01
2315 /* Get a message from the current queue */
2316 @REQ(get_message)
2317 unsigned int flags; /* PM_* flags */
2318 user_handle_t get_win; /* window handle to get */
2319 unsigned int get_first; /* first message code to get */
2320 unsigned int get_last; /* last message code to get */
2321 unsigned int hw_id; /* id of the previous hardware message (or 0) */
2322 unsigned int wake_mask; /* wakeup bits mask */
2323 unsigned int changed_mask; /* changed bits mask */
2324 @REPLY
2325 user_handle_t win; /* window handle */
2326 unsigned int msg; /* message code */
2327 lparam_t wparam; /* parameters */
2328 lparam_t lparam; /* parameters */
2329 int type; /* message type */
2330 int x; /* message x position */
2331 int y; /* message y position */
2332 unsigned int time; /* message time */
2333 unsigned int active_hooks; /* active hooks bitmap */
2334 data_size_t total; /* total size of extra data */
2335 VARARG(data,message_data); /* message data for sent messages */
2336 @END
2339 /* Reply to a sent message */
2340 @REQ(reply_message)
2341 int remove; /* should we remove the message? */
2342 lparam_t result; /* message result */
2343 VARARG(data,bytes); /* message data for sent messages */
2344 @END
2347 /* Accept the current hardware message */
2348 @REQ(accept_hardware_message)
2349 unsigned int hw_id; /* id of the hardware message */
2350 int remove; /* should we remove the message? */
2351 @END
2354 /* Retrieve the reply for the last message sent */
2355 @REQ(get_message_reply)
2356 int cancel; /* cancel message if not ready? */
2357 @REPLY
2358 lparam_t result; /* message result */
2359 VARARG(data,bytes); /* message data for sent messages */
2360 @END
2363 /* Set a window timer */
2364 @REQ(set_win_timer)
2365 user_handle_t win; /* window handle */
2366 unsigned int msg; /* message to post */
2367 unsigned int rate; /* timer rate in ms */
2368 lparam_t id; /* timer id */
2369 lparam_t lparam; /* message lparam (callback proc) */
2370 @REPLY
2371 lparam_t id; /* timer id */
2372 @END
2375 /* Kill a window timer */
2376 @REQ(kill_win_timer)
2377 user_handle_t win; /* window handle */
2378 lparam_t id; /* timer id */
2379 unsigned int msg; /* message to post */
2380 @END
2383 /* check if the thread owning the window is hung */
2384 @REQ(is_window_hung)
2385 user_handle_t win; /* window handle */
2386 @REPLY
2387 int is_hung;
2388 @END
2391 /* Retrieve info about a serial port */
2392 @REQ(get_serial_info)
2393 obj_handle_t handle; /* handle to comm port */
2394 int flags;
2395 @REPLY
2396 unsigned int eventmask;
2397 unsigned int cookie;
2398 unsigned int pending_write;
2399 @END
2402 /* Set info about a serial port */
2403 @REQ(set_serial_info)
2404 obj_handle_t handle; /* handle to comm port */
2405 int flags; /* bitmask to set values (see below) */
2406 @END
2407 #define SERIALINFO_PENDING_WRITE 0x04
2408 #define SERIALINFO_PENDING_WAIT 0x08
2411 /* Create an async I/O */
2412 @REQ(register_async)
2413 int type; /* type of queue to look after */
2414 async_data_t async; /* async I/O parameters */
2415 int count; /* count - usually # of bytes to be read/written */
2416 @END
2417 #define ASYNC_TYPE_READ 0x01
2418 #define ASYNC_TYPE_WRITE 0x02
2419 #define ASYNC_TYPE_WAIT 0x03
2422 /* Cancel all async op on a fd */
2423 @REQ(cancel_async)
2424 obj_handle_t handle; /* handle to comm port, socket or file */
2425 client_ptr_t iosb; /* I/O status block (NULL=all) */
2426 int only_thread; /* cancel matching this thread */
2427 @END
2430 /* Retrieve results of an async */
2431 @REQ(get_async_result)
2432 client_ptr_t user_arg; /* user arg used to identify async */
2433 @REPLY
2434 data_size_t size; /* result size (input or output depending on the operation) */
2435 VARARG(out_data,bytes); /* iosb output data */
2436 @END
2439 /* Perform a read on a file object */
2440 @REQ(read)
2441 async_data_t async; /* async I/O parameters */
2442 file_pos_t pos; /* read position */
2443 @REPLY
2444 obj_handle_t wait; /* handle to wait on for blocking read */
2445 unsigned int options; /* device open options */
2446 VARARG(data,bytes); /* read data */
2447 @END
2450 /* Perform a write on a file object */
2451 @REQ(write)
2452 async_data_t async; /* async I/O parameters */
2453 file_pos_t pos; /* write position */
2454 VARARG(data,bytes); /* write data */
2455 @REPLY
2456 obj_handle_t wait; /* handle to wait on for blocking write */
2457 unsigned int options; /* device open options */
2458 data_size_t size; /* size written */
2459 @END
2462 /* Perform an ioctl on a file */
2463 @REQ(ioctl)
2464 ioctl_code_t code; /* ioctl code */
2465 async_data_t async; /* async I/O parameters */
2466 VARARG(in_data,bytes); /* ioctl input data */
2467 @REPLY
2468 obj_handle_t wait; /* handle to wait on for blocking ioctl */
2469 unsigned int options; /* device open options */
2470 VARARG(out_data,bytes); /* ioctl output data */
2471 @END
2474 /* Store results of an async irp */
2475 @REQ(set_irp_result)
2476 obj_handle_t handle; /* handle to the irp */
2477 unsigned int status; /* status of the irp */
2478 data_size_t size; /* result size (input or output depending on the operation) */
2479 client_ptr_t file_ptr; /* opaque pointer to the file object */
2480 VARARG(data,bytes); /* output data of the irp */
2481 @END
2484 /* Create a named pipe */
2485 @REQ(create_named_pipe)
2486 unsigned int access;
2487 unsigned int options;
2488 unsigned int sharing;
2489 unsigned int maxinstances;
2490 unsigned int outsize;
2491 unsigned int insize;
2492 timeout_t timeout;
2493 unsigned int flags;
2494 VARARG(objattr,object_attributes); /* object attributes */
2495 @REPLY
2496 obj_handle_t handle; /* handle to the pipe */
2497 @END
2499 /* flags in create_named_pipe and get_named_pipe_info */
2500 #define NAMED_PIPE_MESSAGE_STREAM_WRITE 0x0001
2501 #define NAMED_PIPE_MESSAGE_STREAM_READ 0x0002
2502 #define NAMED_PIPE_NONBLOCKING_MODE 0x0004
2503 #define NAMED_PIPE_SERVER_END 0x8000
2505 /* Set named pipe information by handle */
2506 @REQ(set_named_pipe_info)
2507 obj_handle_t handle;
2508 unsigned int flags;
2509 @END
2511 /* Create a window */
2512 @REQ(create_window)
2513 user_handle_t parent; /* parent window */
2514 user_handle_t owner; /* owner window */
2515 atom_t atom; /* class atom */
2516 mod_handle_t instance; /* module instance */
2517 int dpi; /* system DPI */
2518 int awareness; /* thread DPI awareness */
2519 VARARG(class,unicode_str); /* class name */
2520 @REPLY
2521 user_handle_t handle; /* created window */
2522 user_handle_t parent; /* full handle of parent */
2523 user_handle_t owner; /* full handle of owner */
2524 int extra; /* number of extra bytes */
2525 client_ptr_t class_ptr; /* pointer to class in client address space */
2526 int dpi; /* window DPI if not per-monitor aware */
2527 int awareness; /* window DPI awareness */
2528 @END
2531 /* Destroy a window */
2532 @REQ(destroy_window)
2533 user_handle_t handle; /* handle to the window */
2534 @END
2537 /* Retrieve the desktop window for the current thread */
2538 @REQ(get_desktop_window)
2539 int force; /* force creation if it doesn't exist */
2540 @REPLY
2541 user_handle_t top_window; /* handle to the desktop window */
2542 user_handle_t msg_window; /* handle to the top-level HWND_MESSAGE parent */
2543 @END
2546 /* Set a window owner */
2547 @REQ(set_window_owner)
2548 user_handle_t handle; /* handle to the window */
2549 user_handle_t owner; /* new owner */
2550 @REPLY
2551 user_handle_t full_owner; /* full handle of new owner */
2552 user_handle_t prev_owner; /* full handle of previous owner */
2553 @END
2556 /* Get information from a window handle */
2557 @REQ(get_window_info)
2558 user_handle_t handle; /* handle to the window */
2559 @REPLY
2560 user_handle_t full_handle; /* full 32-bit handle */
2561 user_handle_t last_active; /* last active popup */
2562 process_id_t pid; /* process owning the window */
2563 thread_id_t tid; /* thread owning the window */
2564 atom_t atom; /* class atom */
2565 int is_unicode; /* ANSI or unicode */
2566 int dpi; /* window DPI */
2567 int awareness; /* DPI awareness */
2568 @END
2571 /* Set some information in a window */
2572 @REQ(set_window_info)
2573 unsigned short flags; /* flags for fields to set (see below) */
2574 short int is_unicode; /* ANSI or unicode */
2575 user_handle_t handle; /* handle to the window */
2576 unsigned int style; /* window style */
2577 unsigned int ex_style; /* window extended style */
2578 unsigned int id; /* window id */
2579 mod_handle_t instance; /* creator instance */
2580 lparam_t user_data; /* user-specific data */
2581 int extra_offset; /* offset to set in extra bytes */
2582 data_size_t extra_size; /* size to set in extra bytes */
2583 lparam_t extra_value; /* value to set in extra bytes */
2584 @REPLY
2585 unsigned int old_style; /* old window style */
2586 unsigned int old_ex_style; /* old window extended style */
2587 mod_handle_t old_instance; /* old creator instance */
2588 lparam_t old_user_data; /* old user-specific data */
2589 lparam_t old_extra_value; /* old value in extra bytes */
2590 unsigned int old_id; /* old window id */
2591 @END
2592 #define SET_WIN_STYLE 0x01
2593 #define SET_WIN_EXSTYLE 0x02
2594 #define SET_WIN_ID 0x04
2595 #define SET_WIN_INSTANCE 0x08
2596 #define SET_WIN_USERDATA 0x10
2597 #define SET_WIN_EXTRA 0x20
2598 #define SET_WIN_UNICODE 0x40
2601 /* Set the parent of a window */
2602 @REQ(set_parent)
2603 user_handle_t handle; /* handle to the window */
2604 user_handle_t parent; /* handle to the parent */
2605 @REPLY
2606 user_handle_t old_parent; /* old parent window */
2607 user_handle_t full_parent; /* full handle of new parent */
2608 int dpi; /* new window DPI if not per-monitor aware */
2609 int awareness; /* new DPI awareness */
2610 @END
2613 /* Get a list of the window parents, up to the root of the tree */
2614 @REQ(get_window_parents)
2615 user_handle_t handle; /* handle to the window */
2616 @REPLY
2617 int count; /* total count of parents */
2618 VARARG(parents,user_handles); /* parent handles */
2619 @END
2622 /* Get a list of the window children */
2623 @REQ(get_window_children)
2624 obj_handle_t desktop; /* handle to desktop */
2625 user_handle_t parent; /* parent window */
2626 atom_t atom; /* class atom for the listed children */
2627 thread_id_t tid; /* thread owning the listed children */
2628 VARARG(class,unicode_str); /* class name */
2629 @REPLY
2630 int count; /* total count of children */
2631 VARARG(children,user_handles); /* children handles */
2632 @END
2635 /* Get a list of the window children that contain a given point */
2636 @REQ(get_window_children_from_point)
2637 user_handle_t parent; /* parent window */
2638 int x; /* point in parent coordinates */
2639 int y;
2640 int dpi; /* dpi for the point coordinates */
2641 @REPLY
2642 int count; /* total count of children */
2643 VARARG(children,user_handles); /* children handles */
2644 @END
2647 /* Get window tree information from a window handle */
2648 @REQ(get_window_tree)
2649 user_handle_t handle; /* handle to the window */
2650 @REPLY
2651 user_handle_t parent; /* parent window */
2652 user_handle_t owner; /* owner window */
2653 user_handle_t next_sibling; /* next sibling in Z-order */
2654 user_handle_t prev_sibling; /* prev sibling in Z-order */
2655 user_handle_t first_sibling; /* first sibling in Z-order */
2656 user_handle_t last_sibling; /* last sibling in Z-order */
2657 user_handle_t first_child; /* first child */
2658 user_handle_t last_child; /* last child */
2659 @END
2661 /* Set the position and Z order of a window */
2662 @REQ(set_window_pos)
2663 unsigned short swp_flags; /* SWP_* flags */
2664 unsigned short paint_flags; /* paint flags (see below) */
2665 user_handle_t handle; /* handle to the window */
2666 user_handle_t previous; /* previous window in Z order */
2667 rectangle_t window; /* window rectangle (in parent coords) */
2668 rectangle_t client; /* client rectangle (in parent coords) */
2669 VARARG(valid,rectangles); /* valid rectangles from WM_NCCALCSIZE (in parent coords) */
2670 @REPLY
2671 unsigned int new_style; /* new window style */
2672 unsigned int new_ex_style; /* new window extended style */
2673 user_handle_t surface_win; /* parent window that holds the surface */
2674 int needs_update; /* whether the surface region needs an update */
2675 @END
2676 #define SET_WINPOS_PAINT_SURFACE 0x01 /* window has a paintable surface */
2677 #define SET_WINPOS_PIXEL_FORMAT 0x02 /* window has a custom pixel format */
2679 /* Get the window and client rectangles of a window */
2680 @REQ(get_window_rectangles)
2681 user_handle_t handle; /* handle to the window */
2682 int relative; /* coords relative to (see below) */
2683 int dpi; /* DPI to map to, or zero for per-monitor DPI */
2684 @REPLY
2685 rectangle_t window; /* window rectangle */
2686 rectangle_t client; /* client rectangle */
2687 @END
2688 enum coords_relative
2690 COORDS_CLIENT, /* relative to client area */
2691 COORDS_WINDOW, /* relative to whole window area */
2692 COORDS_PARENT, /* relative to parent's client area */
2693 COORDS_SCREEN /* relative to screen origin */
2697 /* Get the window text */
2698 @REQ(get_window_text)
2699 user_handle_t handle; /* handle to the window */
2700 @REPLY
2701 data_size_t length; /* total length in WCHARs */
2702 VARARG(text,unicode_str); /* window text */
2703 @END
2706 /* Set the window text */
2707 @REQ(set_window_text)
2708 user_handle_t handle; /* handle to the window */
2709 VARARG(text,unicode_str); /* window text */
2710 @END
2713 /* Get the coordinates offset between two windows */
2714 @REQ(get_windows_offset)
2715 user_handle_t from; /* handle to the first window */
2716 user_handle_t to; /* handle to the second window */
2717 int dpi; /* DPI to map to, or zero for per-monitor DPI */
2718 @REPLY
2719 int x; /* x coordinate offset */
2720 int y; /* y coordinate offset */
2721 int mirror; /* whether to mirror the x coordinate */
2722 @END
2725 /* Get the visible region of a window */
2726 @REQ(get_visible_region)
2727 user_handle_t window; /* handle to the window */
2728 unsigned int flags; /* DCX flags */
2729 @REPLY
2730 user_handle_t top_win; /* top window to clip against */
2731 rectangle_t top_rect; /* top window visible rect with screen coords */
2732 rectangle_t win_rect; /* window rect in screen coords */
2733 unsigned int paint_flags; /* paint flags (from SET_WINPOS_* flags) */
2734 data_size_t total_size; /* total size of the resulting region */
2735 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2736 @END
2739 /* Get the visible surface region of a window */
2740 @REQ(get_surface_region)
2741 user_handle_t window; /* handle to the window */
2742 @REPLY
2743 rectangle_t visible_rect; /* window visible rect in screen coords */
2744 data_size_t total_size; /* total size of the resulting region */
2745 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2746 @END
2749 /* Get the window region */
2750 @REQ(get_window_region)
2751 user_handle_t window; /* handle to the window */
2752 @REPLY
2753 data_size_t total_size; /* total size of the resulting region */
2754 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2755 @END
2758 /* Set the window region */
2759 @REQ(set_window_region)
2760 user_handle_t window; /* handle to the window */
2761 int redraw; /* redraw the window? */
2762 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2763 @END
2766 /* Get the window update region */
2767 @REQ(get_update_region)
2768 user_handle_t window; /* handle to the window */
2769 user_handle_t from_child; /* child to start searching from */
2770 unsigned int flags; /* update flags (see below) */
2771 @REPLY
2772 user_handle_t child; /* child to repaint (or window itself) */
2773 unsigned int flags; /* resulting update flags (see below) */
2774 data_size_t total_size; /* total size of the resulting region */
2775 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2776 @END
2777 #define UPDATE_NONCLIENT 0x001 /* get region for repainting non-client area */
2778 #define UPDATE_ERASE 0x002 /* get region for erasing client area */
2779 #define UPDATE_PAINT 0x004 /* get region for painting client area */
2780 #define UPDATE_INTERNALPAINT 0x008 /* get region if internal paint is pending */
2781 #define UPDATE_ALLCHILDREN 0x010 /* force repaint of all children */
2782 #define UPDATE_NOCHILDREN 0x020 /* don't try to repaint any children */
2783 #define UPDATE_NOREGION 0x040 /* don't return a region, only the flags */
2784 #define UPDATE_DELAYED_ERASE 0x080 /* still needs erase after BeginPaint */
2785 #define UPDATE_CLIPCHILDREN 0x100 /* remove clipped children from the update region */
2788 /* Update the z order of a window so that a given rectangle is fully visible */
2789 @REQ(update_window_zorder)
2790 user_handle_t window; /* handle to the window */
2791 rectangle_t rect; /* rectangle that must be visible (in client coords) */
2792 @END
2795 /* Mark parts of a window as needing a redraw */
2796 @REQ(redraw_window)
2797 user_handle_t window; /* handle to the window */
2798 unsigned int flags; /* RDW_* flags */
2799 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2800 @END
2803 /* Set a window property */
2804 @REQ(set_window_property)
2805 user_handle_t window; /* handle to the window */
2806 lparam_t data; /* data to store */
2807 atom_t atom; /* property atom (if no name specified) */
2808 VARARG(name,unicode_str); /* property name */
2809 @END
2812 /* Remove a window property */
2813 @REQ(remove_window_property)
2814 user_handle_t window; /* handle to the window */
2815 atom_t atom; /* property atom (if no name specified) */
2816 VARARG(name,unicode_str); /* property name */
2817 @REPLY
2818 lparam_t data; /* data stored in property */
2819 @END
2822 /* Get a window property */
2823 @REQ(get_window_property)
2824 user_handle_t window; /* handle to the window */
2825 atom_t atom; /* property atom (if no name specified) */
2826 VARARG(name,unicode_str); /* property name */
2827 @REPLY
2828 lparam_t data; /* data stored in property */
2829 @END
2832 /* Get the list of properties of a window */
2833 @REQ(get_window_properties)
2834 user_handle_t window; /* handle to the window */
2835 @REPLY
2836 int total; /* total number of properties */
2837 VARARG(props,properties); /* list of properties */
2838 @END
2841 /* Create a window station */
2842 @REQ(create_winstation)
2843 unsigned int flags; /* window station flags */
2844 unsigned int access; /* wanted access rights */
2845 unsigned int attributes; /* object attributes */
2846 obj_handle_t rootdir; /* root directory */
2847 VARARG(name,unicode_str); /* object name */
2848 @REPLY
2849 obj_handle_t handle; /* handle to the window station */
2850 @END
2853 /* Open a handle to a window station */
2854 @REQ(open_winstation)
2855 unsigned int access; /* wanted access rights */
2856 unsigned int attributes; /* object attributes */
2857 obj_handle_t rootdir; /* root directory */
2858 VARARG(name,unicode_str); /* object name */
2859 @REPLY
2860 obj_handle_t handle; /* handle to the window station */
2861 @END
2864 /* Close a window station */
2865 @REQ(close_winstation)
2866 obj_handle_t handle; /* handle to the window station */
2867 @END
2870 /* Get the process current window station */
2871 @REQ(get_process_winstation)
2872 @REPLY
2873 obj_handle_t handle; /* handle to the window station */
2874 @END
2877 /* Set the process current window station */
2878 @REQ(set_process_winstation)
2879 obj_handle_t handle; /* handle to the window station */
2880 @END
2883 /* Enumerate window stations */
2884 @REQ(enum_winstation)
2885 unsigned int index; /* current index */
2886 @REPLY
2887 unsigned int next; /* next index */
2888 VARARG(name,unicode_str); /* window station name */
2889 @END
2892 /* Create a desktop */
2893 @REQ(create_desktop)
2894 unsigned int flags; /* desktop flags */
2895 unsigned int access; /* wanted access rights */
2896 unsigned int attributes; /* object attributes */
2897 VARARG(name,unicode_str); /* object name */
2898 @REPLY
2899 obj_handle_t handle; /* handle to the desktop */
2900 @END
2903 /* Open a handle to a desktop */
2904 @REQ(open_desktop)
2905 obj_handle_t winsta; /* window station to open (null allowed) */
2906 unsigned int flags; /* desktop flags */
2907 unsigned int access; /* wanted access rights */
2908 unsigned int attributes; /* object attributes */
2909 VARARG(name,unicode_str); /* object name */
2910 @REPLY
2911 obj_handle_t handle; /* handle to the desktop */
2912 @END
2915 /* Open a handle to current input desktop */
2916 @REQ(open_input_desktop)
2917 unsigned int flags; /* desktop flags */
2918 unsigned int access; /* wanted access rights */
2919 unsigned int attributes; /* object attributes */
2920 @REPLY
2921 obj_handle_t handle; /* handle to the desktop */
2922 @END
2925 /* Close a desktop */
2926 @REQ(close_desktop)
2927 obj_handle_t handle; /* handle to the desktop */
2928 @END
2931 /* Get the thread current desktop */
2932 @REQ(get_thread_desktop)
2933 thread_id_t tid; /* thread id */
2934 @REPLY
2935 obj_handle_t handle; /* handle to the desktop */
2936 @END
2939 /* Set the thread current desktop */
2940 @REQ(set_thread_desktop)
2941 obj_handle_t handle; /* handle to the desktop */
2942 @END
2945 /* Enumerate desktops */
2946 @REQ(enum_desktop)
2947 obj_handle_t winstation; /* handle to the window station */
2948 unsigned int index; /* current index */
2949 @REPLY
2950 unsigned int next; /* next index */
2951 VARARG(name,unicode_str); /* window station name */
2952 @END
2955 /* Get/set information about a user object (window station or desktop) */
2956 @REQ(set_user_object_info)
2957 obj_handle_t handle; /* handle to the object */
2958 unsigned int flags; /* information to set/get */
2959 unsigned int obj_flags; /* new object flags */
2960 @REPLY
2961 int is_desktop; /* is object a desktop? */
2962 unsigned int old_obj_flags; /* old object flags */
2963 VARARG(name,unicode_str); /* object name */
2964 @END
2965 #define SET_USER_OBJECT_SET_FLAGS 1
2966 #define SET_USER_OBJECT_GET_FULL_NAME 2
2969 /* Register a hotkey */
2970 @REQ(register_hotkey)
2971 user_handle_t window; /* handle to the window */
2972 int id; /* hotkey identifier */
2973 unsigned int flags; /* modifier keys */
2974 unsigned int vkey; /* virtual key code */
2975 @REPLY
2976 int replaced; /* did we replace an existing hotkey? */
2977 unsigned int flags; /* flags of replaced hotkey */
2978 unsigned int vkey; /* virtual key code of replaced hotkey */
2979 @END
2982 /* Unregister a hotkey */
2983 @REQ(unregister_hotkey)
2984 user_handle_t window; /* handle to the window */
2985 int id; /* hotkey identifier */
2986 @REPLY
2987 unsigned int flags; /* flags of removed hotkey */
2988 unsigned int vkey; /* virtual key code of removed hotkey */
2989 @END
2992 /* Attach (or detach) thread inputs */
2993 @REQ(attach_thread_input)
2994 thread_id_t tid_from; /* thread to be attached */
2995 thread_id_t tid_to; /* thread to which tid_from should be attached */
2996 int attach; /* is it an attach? */
2997 @END
3000 /* Get input data for a given thread */
3001 @REQ(get_thread_input)
3002 thread_id_t tid; /* id of thread */
3003 @REPLY
3004 user_handle_t focus; /* handle to the focus window */
3005 user_handle_t capture; /* handle to the capture window */
3006 user_handle_t active; /* handle to the active window */
3007 user_handle_t foreground; /* handle to the global foreground window */
3008 user_handle_t menu_owner; /* handle to the menu owner */
3009 user_handle_t move_size; /* handle to the moving/resizing window */
3010 user_handle_t caret; /* handle to the caret window */
3011 user_handle_t cursor; /* handle to the cursor */
3012 int show_count; /* cursor show count */
3013 rectangle_t rect; /* caret rectangle */
3014 @END
3017 /* Get the time of the last input event */
3018 @REQ(get_last_input_time)
3019 @REPLY
3020 unsigned int time;
3021 @END
3024 /* Retrieve queue keyboard state for a given thread */
3025 @REQ(get_key_state)
3026 thread_id_t tid; /* id of thread */
3027 int key; /* optional key code or -1 */
3028 @REPLY
3029 unsigned char state; /* state of specified key */
3030 VARARG(keystate,bytes); /* state array for all the keys */
3031 @END
3033 /* Set queue keyboard state for a given thread */
3034 @REQ(set_key_state)
3035 thread_id_t tid; /* id of thread */
3036 int async; /* whether to change the async state too */
3037 VARARG(keystate,bytes); /* state array for all the keys */
3038 @END
3040 /* Set the system foreground window */
3041 @REQ(set_foreground_window)
3042 user_handle_t handle; /* handle to the foreground window */
3043 @REPLY
3044 user_handle_t previous; /* handle to the previous foreground window */
3045 int send_msg_old; /* whether we have to send a msg to the old window */
3046 int send_msg_new; /* whether we have to send a msg to the new window */
3047 @END
3049 /* Set the current thread focus window */
3050 @REQ(set_focus_window)
3051 user_handle_t handle; /* handle to the focus window */
3052 @REPLY
3053 user_handle_t previous; /* handle to the previous focus window */
3054 @END
3056 /* Set the current thread active window */
3057 @REQ(set_active_window)
3058 user_handle_t handle; /* handle to the active window */
3059 @REPLY
3060 user_handle_t previous; /* handle to the previous active window */
3061 @END
3063 /* Set the current thread capture window */
3064 @REQ(set_capture_window)
3065 user_handle_t handle; /* handle to the capture window */
3066 unsigned int flags; /* capture flags (see below) */
3067 @REPLY
3068 user_handle_t previous; /* handle to the previous capture window */
3069 user_handle_t full_handle; /* full 32-bit handle of new capture window */
3070 @END
3071 #define CAPTURE_MENU 0x01 /* capture is for a menu */
3072 #define CAPTURE_MOVESIZE 0x02 /* capture is for moving/resizing */
3075 /* Set the current thread caret window */
3076 @REQ(set_caret_window)
3077 user_handle_t handle; /* handle to the caret window */
3078 int width; /* caret width */
3079 int height; /* caret height */
3080 @REPLY
3081 user_handle_t previous; /* handle to the previous caret window */
3082 rectangle_t old_rect; /* previous caret rectangle */
3083 int old_hide; /* previous hide count */
3084 int old_state; /* previous caret state (1=on, 0=off) */
3085 @END
3088 /* Set the current thread caret information */
3089 @REQ(set_caret_info)
3090 unsigned int flags; /* caret flags (see below) */
3091 user_handle_t handle; /* handle to the caret window */
3092 int x; /* caret x position */
3093 int y; /* caret y position */
3094 int hide; /* increment for hide count (can be negative to show it) */
3095 int state; /* caret state (see below) */
3096 @REPLY
3097 user_handle_t full_handle; /* handle to the current caret window */
3098 rectangle_t old_rect; /* previous caret rectangle */
3099 int old_hide; /* previous hide count */
3100 int old_state; /* previous caret state (1=on, 0=off) */
3101 @END
3102 #define SET_CARET_POS 0x01 /* set the caret position from x,y */
3103 #define SET_CARET_HIDE 0x02 /* increment the caret hide count */
3104 #define SET_CARET_STATE 0x04 /* set the caret on/off state */
3105 enum caret_state
3107 CARET_STATE_OFF, /* off */
3108 CARET_STATE_ON, /* on */
3109 CARET_STATE_TOGGLE, /* toggle current state */
3110 CARET_STATE_ON_IF_MOVED /* on if the position differs, unchanged otherwise */
3114 /* Set a window hook */
3115 @REQ(set_hook)
3116 int id; /* id of the hook */
3117 process_id_t pid; /* id of process to set the hook into */
3118 thread_id_t tid; /* id of thread to set the hook into */
3119 int event_min;
3120 int event_max;
3121 client_ptr_t proc; /* hook procedure */
3122 int flags;
3123 int unicode; /* is it a unicode hook? */
3124 VARARG(module,unicode_str); /* module name */
3125 @REPLY
3126 user_handle_t handle; /* handle to the hook */
3127 unsigned int active_hooks; /* active hooks bitmap */
3128 @END
3131 /* Remove a window hook */
3132 @REQ(remove_hook)
3133 user_handle_t handle; /* handle to the hook */
3134 client_ptr_t proc; /* hook procedure if handle is 0 */
3135 int id; /* id of the hook if handle is 0 */
3136 @REPLY
3137 unsigned int active_hooks; /* active hooks bitmap */
3138 @END
3141 /* Start calling a hook chain */
3142 @REQ(start_hook_chain)
3143 int id; /* id of the hook */
3144 int event; /* signalled event */
3145 user_handle_t window; /* handle to the event window */
3146 int object_id; /* object id for out of context winevent */
3147 int child_id; /* child id for out of context winevent */
3148 @REPLY
3149 user_handle_t handle; /* handle to the next hook */
3150 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
3151 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
3152 int unicode; /* is it a unicode hook? */
3153 client_ptr_t proc; /* hook procedure */
3154 unsigned int active_hooks; /* active hooks bitmap */
3155 VARARG(module,unicode_str); /* module name */
3156 @END
3159 /* Finished calling a hook chain */
3160 @REQ(finish_hook_chain)
3161 int id; /* id of the hook */
3162 @END
3165 /* Get the hook information */
3166 @REQ(get_hook_info)
3167 user_handle_t handle; /* handle to the current hook */
3168 int get_next; /* do we want info about current or next hook? */
3169 int event; /* signalled event */
3170 user_handle_t window; /* handle to the event window */
3171 int object_id; /* object id for out of context winevent */
3172 int child_id; /* child id for out of context winevent */
3173 @REPLY
3174 user_handle_t handle; /* handle to the hook */
3175 int id; /* id of the hook */
3176 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
3177 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
3178 client_ptr_t proc; /* hook procedure */
3179 int unicode; /* is it a unicode hook? */
3180 VARARG(module,unicode_str); /* module name */
3181 @END
3184 /* Create a window class */
3185 @REQ(create_class)
3186 int local; /* is it a local class? */
3187 atom_t atom; /* class atom */
3188 unsigned int style; /* class style */
3189 mod_handle_t instance; /* module instance */
3190 int extra; /* number of extra class bytes */
3191 int win_extra; /* number of window extra bytes */
3192 client_ptr_t client_ptr; /* pointer to class in client address space */
3193 data_size_t name_offset; /* base class name offset for specified atom */
3194 VARARG(name,unicode_str); /* class name */
3195 @REPLY
3196 atom_t atom; /* resulting class atom */
3197 @END
3200 /* Destroy a window class */
3201 @REQ(destroy_class)
3202 atom_t atom; /* class atom */
3203 mod_handle_t instance; /* module instance */
3204 VARARG(name,unicode_str); /* class name */
3205 @REPLY
3206 client_ptr_t client_ptr; /* pointer to class in client address space */
3207 @END
3210 /* Set some information in a class */
3211 @REQ(set_class_info)
3212 user_handle_t window; /* handle to the window */
3213 unsigned int flags; /* flags for info to set (see below) */
3214 atom_t atom; /* class atom */
3215 unsigned int style; /* class style */
3216 int win_extra; /* number of window extra bytes */
3217 mod_handle_t instance; /* module instance */
3218 int extra_offset; /* offset to set in extra bytes */
3219 data_size_t extra_size; /* size to set in extra bytes */
3220 lparam_t extra_value; /* value to set in extra bytes */
3221 @REPLY
3222 atom_t old_atom; /* previous class atom */
3223 atom_t base_atom; /* base class atom */
3224 mod_handle_t old_instance; /* previous module instance */
3225 lparam_t old_extra_value; /* old value in extra bytes */
3226 unsigned int old_style; /* previous class style */
3227 int old_extra; /* previous number of class extra bytes */
3228 int old_win_extra; /* previous number of window extra bytes */
3229 @END
3230 #define SET_CLASS_ATOM 0x0001
3231 #define SET_CLASS_STYLE 0x0002
3232 #define SET_CLASS_WINEXTRA 0x0004
3233 #define SET_CLASS_INSTANCE 0x0008
3234 #define SET_CLASS_EXTRA 0x0010
3237 /* Open the clipboard */
3238 @REQ(open_clipboard)
3239 user_handle_t window; /* clipboard window */
3240 @REPLY
3241 user_handle_t owner; /* current clipboard owner */
3242 @END
3245 /* Close the clipboard */
3246 @REQ(close_clipboard)
3247 @REPLY
3248 user_handle_t viewer; /* first clipboard viewer */
3249 user_handle_t owner; /* current clipboard owner */
3250 @END
3253 /* Empty the clipboard and grab ownership */
3254 @REQ(empty_clipboard)
3255 @END
3258 /* Add a data format to the clipboard */
3259 @REQ(set_clipboard_data)
3260 unsigned int format; /* clipboard format of the data */
3261 unsigned int lcid; /* locale id to use for synthesizing text formats */
3262 VARARG(data,bytes); /* data contents */
3263 @REPLY
3264 unsigned int seqno; /* sequence number for the set data */
3265 @END
3268 /* Fetch a data format from the clipboard */
3269 @REQ(get_clipboard_data)
3270 unsigned int format; /* clipboard format of the data */
3271 int render; /* will we try to render it if missing? */
3272 int cached; /* do we already have it in the client-side cache? */
3273 unsigned int seqno; /* sequence number for the data in the cache */
3274 @REPLY
3275 unsigned int from; /* for synthesized data, format to generate it from */
3276 user_handle_t owner; /* clipboard owner for delayed-rendered formats */
3277 unsigned int seqno; /* sequence number for the originally set data */
3278 data_size_t total; /* total data size */
3279 VARARG(data,bytes); /* data contents */
3280 @END
3283 /* Retrieve a list of available formats */
3284 @REQ(get_clipboard_formats)
3285 unsigned int format; /* specific format to query, return all if 0 */
3286 @REPLY
3287 unsigned int count; /* count of available formats */
3288 VARARG(formats,uints); /* array of available formats */
3289 @END
3292 /* Retrieve the next available format */
3293 @REQ(enum_clipboard_formats)
3294 unsigned int previous; /* previous format, or first if 0 */
3295 @REPLY
3296 unsigned int format; /* next format */
3297 @END
3300 /* Release ownership of the clipboard */
3301 @REQ(release_clipboard)
3302 user_handle_t owner; /* clipboard owner to release */
3303 @REPLY
3304 user_handle_t viewer; /* first clipboard viewer */
3305 user_handle_t owner; /* current clipboard owner */
3306 @END
3309 /* Get clipboard information */
3310 @REQ(get_clipboard_info)
3311 @REPLY
3312 user_handle_t window; /* clipboard window */
3313 user_handle_t owner; /* clipboard owner */
3314 user_handle_t viewer; /* clipboard viewer */
3315 unsigned int seqno; /* current sequence number */
3316 @END
3319 /* Set the clipboard viewer window */
3320 @REQ(set_clipboard_viewer)
3321 user_handle_t viewer; /* clipboard viewer */
3322 user_handle_t previous; /* if non-zero, check that this was the previous viewer */
3323 @REPLY
3324 user_handle_t old_viewer; /* previous clipboard viewer */
3325 user_handle_t owner; /* clipboard owner */
3326 @END
3329 /* Add a clipboard listener window */
3330 @REQ(add_clipboard_listener)
3331 user_handle_t window; /* clipboard listener window */
3332 @END
3335 /* Remove a clipboard listener window */
3336 @REQ(remove_clipboard_listener)
3337 user_handle_t window; /* clipboard listener window */
3338 @END
3341 /* Open a security token */
3342 @REQ(open_token)
3343 obj_handle_t handle; /* handle to the thread or process */
3344 unsigned int access; /* access rights to the new token */
3345 unsigned int attributes;/* object attributes */
3346 unsigned int flags; /* flags (see below) */
3347 @REPLY
3348 obj_handle_t token; /* handle to the token */
3349 @END
3350 #define OPEN_TOKEN_THREAD 1
3351 #define OPEN_TOKEN_AS_SELF 2
3354 /* Set/get the global windows */
3355 @REQ(set_global_windows)
3356 unsigned int flags; /* flags for fields to set (see below) */
3357 user_handle_t shell_window; /* handle to the new shell window */
3358 user_handle_t shell_listview; /* handle to the new shell listview window */
3359 user_handle_t progman_window; /* handle to the new program manager window */
3360 user_handle_t taskman_window; /* handle to the new task manager window */
3361 @REPLY
3362 user_handle_t old_shell_window; /* handle to the shell window */
3363 user_handle_t old_shell_listview; /* handle to the shell listview window */
3364 user_handle_t old_progman_window; /* handle to the new program manager window */
3365 user_handle_t old_taskman_window; /* handle to the new task manager window */
3366 @END
3367 #define SET_GLOBAL_SHELL_WINDOWS 0x01 /* set both main shell and listview windows */
3368 #define SET_GLOBAL_PROGMAN_WINDOW 0x02
3369 #define SET_GLOBAL_TASKMAN_WINDOW 0x04
3371 /* Adjust the privileges held by a token */
3372 @REQ(adjust_token_privileges)
3373 obj_handle_t handle; /* handle to the token */
3374 int disable_all; /* disable all privileges? */
3375 int get_modified_state; /* get modified privileges? */
3376 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to enable/disable/remove */
3377 @REPLY
3378 unsigned int len; /* total length in bytes required to store token privileges */
3379 VARARG(privileges,LUID_AND_ATTRIBUTES); /* modified privileges */
3380 @END
3382 /* Retrieves the set of privileges held by or available to a token */
3383 @REQ(get_token_privileges)
3384 obj_handle_t handle; /* handle to the token */
3385 @REPLY
3386 unsigned int len; /* total length in bytes required to store token privileges */
3387 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
3388 @END
3390 /* Check the token has the required privileges */
3391 @REQ(check_token_privileges)
3392 obj_handle_t handle; /* handle to the token */
3393 int all_required; /* are all the privileges required for the check to succeed? */
3394 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to check */
3395 @REPLY
3396 int has_privileges; /* does the token have the required privileges? */
3397 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
3398 @END
3400 @REQ(duplicate_token)
3401 obj_handle_t handle; /* handle to the token to duplicate */
3402 unsigned int access; /* access rights to the new token */
3403 int primary; /* is the new token to be a primary one? */
3404 int impersonation_level; /* impersonation level of the new token */
3405 VARARG(objattr,object_attributes); /* object attributes */
3406 @REPLY
3407 obj_handle_t new_handle; /* duplicated handle */
3408 @END
3410 @REQ(access_check)
3411 obj_handle_t handle; /* handle to the token */
3412 unsigned int desired_access; /* desired access to the object */
3413 unsigned int mapping_read; /* mapping from generic read to specific rights */
3414 unsigned int mapping_write; /* mapping from generic write to specific rights */
3415 unsigned int mapping_execute; /* mapping from generic execute to specific rights */
3416 unsigned int mapping_all; /* mapping from generic all to specific rights */
3417 VARARG(sd,security_descriptor); /* security descriptor to check */
3418 @REPLY
3419 unsigned int access_granted; /* access rights actually granted */
3420 unsigned int access_status; /* was access granted? */
3421 unsigned int privileges_len; /* length needed to store privileges */
3422 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges used during access check */
3423 @END
3425 @REQ(get_token_sid)
3426 obj_handle_t handle; /* handle to the token */
3427 unsigned int which_sid; /* which SID to retrieve from the token */
3428 @REPLY
3429 data_size_t sid_len; /* length needed to store sid */
3430 VARARG(sid,SID); /* the sid specified by which_sid from the token */
3431 @END
3433 @REQ(get_token_groups)
3434 obj_handle_t handle; /* handle to the token */
3435 @REPLY
3436 data_size_t user_len; /* length needed to store user */
3437 VARARG(user,token_groups); /* groups the token's user belongs to */
3438 @END
3440 @REQ(get_token_default_dacl)
3441 obj_handle_t handle; /* handle to the token */
3442 @REPLY
3443 data_size_t acl_len; /* length needed to store access control list */
3444 VARARG(acl,ACL); /* access control list */
3445 @END
3447 @REQ(set_token_default_dacl)
3448 obj_handle_t handle; /* handle to the token */
3449 VARARG(acl,ACL); /* default dacl to set */
3450 @END
3452 @REQ(set_security_object)
3453 obj_handle_t handle; /* handle to the object */
3454 unsigned int security_info; /* which parts of security descriptor to set */
3455 VARARG(sd,security_descriptor); /* security descriptor to set */
3456 @END
3458 @REQ(get_security_object)
3459 obj_handle_t handle; /* handle to the object */
3460 unsigned int security_info; /* which parts of security descriptor to get */
3461 @REPLY
3462 unsigned int sd_len; /* buffer size needed for sd */
3463 VARARG(sd,security_descriptor); /* retrieved security descriptor */
3464 @END
3467 struct handle_info
3469 process_id_t owner;
3470 obj_handle_t handle;
3471 unsigned int access;
3474 /* Return a list of all opened handles */
3475 @REQ(get_system_handles)
3476 @REPLY
3477 unsigned int count; /* number of handles */
3478 VARARG(data,handle_infos); /* array of handle_infos */
3479 @END
3482 /* Create a mailslot */
3483 @REQ(create_mailslot)
3484 unsigned int access; /* wanted access rights */
3485 timeout_t read_timeout;
3486 unsigned int max_msgsize;
3487 VARARG(objattr,object_attributes); /* object attributes */
3488 @REPLY
3489 obj_handle_t handle; /* handle to the mailslot */
3490 @END
3493 /* Set mailslot information */
3494 @REQ(set_mailslot_info)
3495 obj_handle_t handle; /* handle to the mailslot */
3496 timeout_t read_timeout;
3497 unsigned int flags;
3498 @REPLY
3499 timeout_t read_timeout;
3500 unsigned int max_msgsize;
3501 @END
3502 #define MAILSLOT_SET_READ_TIMEOUT 1
3505 /* Create a directory object */
3506 @REQ(create_directory)
3507 unsigned int access; /* access flags */
3508 VARARG(objattr,object_attributes); /* object attributes */
3509 @REPLY
3510 obj_handle_t handle; /* handle to the directory */
3511 @END
3514 /* Open a directory object */
3515 @REQ(open_directory)
3516 unsigned int access; /* access flags */
3517 unsigned int attributes; /* object attributes */
3518 obj_handle_t rootdir; /* root directory */
3519 VARARG(directory_name,unicode_str); /* Directory name */
3520 @REPLY
3521 obj_handle_t handle; /* handle to the directory */
3522 @END
3525 /* Get a directory entry by index */
3526 @REQ(get_directory_entry)
3527 obj_handle_t handle; /* handle to the directory */
3528 unsigned int index; /* entry index */
3529 @REPLY
3530 data_size_t name_len; /* length of the entry name in bytes */
3531 VARARG(name,unicode_str,name_len); /* entry name */
3532 VARARG(type,unicode_str); /* entry type */
3533 @END
3536 /* Create a symbolic link object */
3537 @REQ(create_symlink)
3538 unsigned int access; /* access flags */
3539 VARARG(objattr,object_attributes); /* object attributes */
3540 VARARG(target_name,unicode_str); /* target name */
3541 @REPLY
3542 obj_handle_t handle; /* handle to the symlink */
3543 @END
3546 /* Open a symbolic link object */
3547 @REQ(open_symlink)
3548 unsigned int access; /* access flags */
3549 unsigned int attributes; /* object attributes */
3550 obj_handle_t rootdir; /* root directory */
3551 VARARG(name,unicode_str); /* symlink name */
3552 @REPLY
3553 obj_handle_t handle; /* handle to the symlink */
3554 @END
3557 /* Query a symbolic link object */
3558 @REQ(query_symlink)
3559 obj_handle_t handle; /* handle to the symlink */
3560 @REPLY
3561 data_size_t total; /* total needed size for name */
3562 VARARG(target_name,unicode_str); /* target name */
3563 @END
3566 /* Query basic object information */
3567 @REQ(get_object_info)
3568 obj_handle_t handle; /* handle to the object */
3569 @REPLY
3570 unsigned int access; /* granted access mask */
3571 unsigned int ref_count; /* object ref count */
3572 unsigned int handle_count; /* object handle count */
3573 data_size_t total; /* total needed size for name */
3574 VARARG(name,unicode_str); /* object name */
3575 @END
3578 /* Query object type name information */
3579 @REQ(get_object_type)
3580 obj_handle_t handle; /* handle to the object */
3581 @REPLY
3582 data_size_t total; /* needed size for type name */
3583 VARARG(type,unicode_str); /* type name */
3584 @END
3587 /* Unlink a named object */
3588 @REQ(unlink_object)
3589 obj_handle_t handle; /* handle to the object */
3590 @END
3593 /* Query the impersonation level of an impersonation token */
3594 @REQ(get_token_impersonation_level)
3595 obj_handle_t handle; /* handle to the object */
3596 @REPLY
3597 int impersonation_level; /* impersonation level of the impersonation token */
3598 @END
3600 /* Allocate a locally-unique identifier */
3601 @REQ(allocate_locally_unique_id)
3602 @REPLY
3603 luid_t luid;
3604 @END
3607 /* Create a device manager */
3608 @REQ(create_device_manager)
3609 unsigned int access; /* wanted access rights */
3610 unsigned int attributes; /* object attributes */
3611 @REPLY
3612 obj_handle_t handle; /* handle to the device */
3613 @END
3616 /* Create a device */
3617 @REQ(create_device)
3618 obj_handle_t rootdir; /* root directory */
3619 client_ptr_t user_ptr; /* opaque ptr for use by client */
3620 obj_handle_t manager; /* device manager */
3621 VARARG(name,unicode_str); /* object name */
3622 @END
3625 /* Delete a device */
3626 @REQ(delete_device)
3627 obj_handle_t manager; /* handle to the device manager */
3628 client_ptr_t device; /* pointer to the device */
3629 @END
3632 /* Retrieve the next pending device irp request */
3633 @REQ(get_next_device_request)
3634 obj_handle_t manager; /* handle to the device manager */
3635 obj_handle_t prev; /* handle to the previous irp */
3636 unsigned int status; /* status of the previous irp */
3637 @REPLY
3638 irp_params_t params; /* irp parameters */
3639 obj_handle_t next; /* handle to the next irp */
3640 thread_id_t client_tid; /* tid of thread calling irp */
3641 client_ptr_t client_thread; /* pointer to thread object of calling irp */
3642 data_size_t in_size; /* total needed input size */
3643 VARARG(next_data,bytes); /* input data of the next irp */
3644 @END
3647 /* Get kernel pointer from server object */
3648 @REQ(get_kernel_object_ptr)
3649 obj_handle_t manager; /* handle to the device manager */
3650 obj_handle_t handle; /* object handle */
3651 @REPLY
3652 client_ptr_t user_ptr; /* kernel object pointer */
3653 @END
3656 /* Associate kernel pointer with server object */
3657 @REQ(set_kernel_object_ptr)
3658 obj_handle_t manager; /* handle to the device manager */
3659 obj_handle_t handle; /* object handle */
3660 client_ptr_t user_ptr; /* kernel object pointer */
3661 @END
3664 /* Grab server object reference from kernel object pointer */
3665 @REQ(grab_kernel_object)
3666 obj_handle_t manager; /* handle to the device manager */
3667 client_ptr_t user_ptr; /* kernel object pointer */
3668 @END
3671 /* Release server object reference from kernel object pointer */
3672 @REQ(release_kernel_object)
3673 obj_handle_t manager; /* handle to the device manager */
3674 client_ptr_t user_ptr; /* kernel object pointer */
3675 @END
3678 /* Get handle from kernel object pointer */
3679 @REQ(get_kernel_object_handle)
3680 obj_handle_t manager; /* handle to the device manager */
3681 client_ptr_t user_ptr; /* kernel object pointer */
3682 unsigned int access; /* wanted access rights */
3683 @REPLY
3684 obj_handle_t handle; /* kernel object handle */
3685 @END
3688 /* Make the current process a system process */
3689 @REQ(make_process_system)
3690 @REPLY
3691 obj_handle_t event; /* event signaled when all user processes have exited */
3692 @END
3695 /* Get detailed fixed-size information about a token */
3696 @REQ(get_token_statistics)
3697 obj_handle_t handle; /* handle to the object */
3698 @REPLY
3699 luid_t token_id; /* locally-unique identifier of the token */
3700 luid_t modified_id; /* locally-unique identifier of the modified version of the token */
3701 int primary; /* is the token primary or impersonation? */
3702 int impersonation_level; /* level of impersonation */
3703 int group_count; /* the number of groups the token is a member of */
3704 int privilege_count; /* the number of privileges the token has */
3705 @END
3708 /* Create I/O completion port */
3709 @REQ(create_completion)
3710 unsigned int access; /* desired access to a port */
3711 unsigned int concurrent; /* max number of concurrent active threads */
3712 VARARG(objattr,object_attributes); /* object attributes */
3713 @REPLY
3714 obj_handle_t handle; /* port handle */
3715 @END
3718 /* Open I/O completion port */
3719 @REQ(open_completion)
3720 unsigned int access; /* desired access to a port */
3721 unsigned int attributes; /* object attributes */
3722 obj_handle_t rootdir; /* root directory */
3723 VARARG(filename,unicode_str); /* port name */
3724 @REPLY
3725 obj_handle_t handle; /* port handle */
3726 @END
3729 /* add completion to completion port */
3730 @REQ(add_completion)
3731 obj_handle_t handle; /* port handle */
3732 apc_param_t ckey; /* completion key */
3733 apc_param_t cvalue; /* completion value */
3734 apc_param_t information; /* IO_STATUS_BLOCK Information */
3735 unsigned int status; /* completion result */
3736 @END
3739 /* get completion from completion port queue */
3740 @REQ(remove_completion)
3741 obj_handle_t handle; /* port handle */
3742 @REPLY
3743 apc_param_t ckey; /* completion key */
3744 apc_param_t cvalue; /* completion value */
3745 apc_param_t information; /* IO_STATUS_BLOCK Information */
3746 unsigned int status; /* completion result */
3747 @END
3750 /* get completion queue depth */
3751 @REQ(query_completion)
3752 obj_handle_t handle; /* port handle */
3753 @REPLY
3754 unsigned int depth; /* completion queue depth */
3755 @END
3758 /* associate object with completion port */
3759 @REQ(set_completion_info)
3760 obj_handle_t handle; /* object handle */
3761 apc_param_t ckey; /* completion key */
3762 obj_handle_t chandle; /* port handle */
3763 @END
3766 /* check for associated completion and push msg */
3767 @REQ(add_fd_completion)
3768 obj_handle_t handle; /* async' object */
3769 apc_param_t cvalue; /* completion value */
3770 apc_param_t information; /* IO_STATUS_BLOCK Information */
3771 unsigned int status; /* completion status */
3772 int async; /* completion is an async result */
3773 @END
3776 /* set fd completion information */
3777 @REQ(set_fd_completion_mode)
3778 obj_handle_t handle; /* handle to a file or directory */
3779 unsigned int flags; /* completion notification flags */
3780 @END
3783 /* set fd disposition information */
3784 @REQ(set_fd_disp_info)
3785 obj_handle_t handle; /* handle to a file or directory */
3786 int unlink; /* whether to unlink file on close */
3787 @END
3790 /* set fd name information */
3791 @REQ(set_fd_name_info)
3792 obj_handle_t handle; /* handle to a file or directory */
3793 obj_handle_t rootdir; /* root directory */
3794 int link; /* link instead of renaming */
3795 VARARG(filename,string); /* new file name */
3796 @END
3799 /* Retrieve layered info for a window */
3800 @REQ(get_window_layered_info)
3801 user_handle_t handle; /* handle to the window */
3802 @REPLY
3803 unsigned int color_key; /* color key */
3804 unsigned int alpha; /* alpha (0..255) */
3805 unsigned int flags; /* LWA_* flags */
3806 @END
3809 /* Set layered info for a window */
3810 @REQ(set_window_layered_info)
3811 user_handle_t handle; /* handle to the window */
3812 unsigned int color_key; /* color key */
3813 unsigned int alpha; /* alpha (0..255) */
3814 unsigned int flags; /* LWA_* flags */
3815 @END
3818 /* Allocate an arbitrary user handle */
3819 @REQ(alloc_user_handle)
3820 @REPLY
3821 user_handle_t handle; /* allocated handle */
3822 @END
3825 /* Free an arbitrary user handle */
3826 @REQ(free_user_handle)
3827 user_handle_t handle; /* handle to free*/
3828 @END
3831 /* Set/get the current cursor */
3832 @REQ(set_cursor)
3833 unsigned int flags; /* flags for fields to set (see below) */
3834 user_handle_t handle; /* handle to the cursor */
3835 int show_count; /* show count increment/decrement */
3836 int x; /* cursor position */
3837 int y;
3838 rectangle_t clip; /* cursor clip rectangle */
3839 unsigned int clip_msg; /* message to post on cursor clip changes */
3840 @REPLY
3841 user_handle_t prev_handle; /* previous handle */
3842 int prev_count; /* previous show count */
3843 int prev_x; /* previous position */
3844 int prev_y;
3845 int new_x; /* new position */
3846 int new_y;
3847 rectangle_t new_clip; /* new clip rectangle */
3848 unsigned int last_change; /* time of last position change */
3849 @END
3850 #define SET_CURSOR_HANDLE 0x01
3851 #define SET_CURSOR_COUNT 0x02
3852 #define SET_CURSOR_POS 0x04
3853 #define SET_CURSOR_CLIP 0x08
3854 #define SET_CURSOR_NOCLIP 0x10
3857 /* Modify the list of registered rawinput devices */
3858 @REQ(update_rawinput_devices)
3859 VARARG(devices,rawinput_devices);
3860 @END
3863 /* Retrieve the suspended context of a thread */
3864 @REQ(get_suspend_context)
3865 @REPLY
3866 VARARG(context,context); /* thread context */
3867 @END
3870 /* Store the suspend context of a thread */
3871 @REQ(set_suspend_context)
3872 VARARG(context,context); /* thread context */
3873 @END
3876 /* Create a new job object */
3877 @REQ(create_job)
3878 unsigned int access; /* wanted access rights */
3879 VARARG(objattr,object_attributes); /* object attributes */
3880 @REPLY
3881 obj_handle_t handle; /* handle to the job */
3882 @END
3885 /* Open a job object */
3886 @REQ(open_job)
3887 unsigned int access; /* wanted access rights */
3888 unsigned int attributes; /* object attributes */
3889 obj_handle_t rootdir; /* root directory */
3890 VARARG(name,unicode_str); /* object name */
3891 @REPLY
3892 obj_handle_t handle; /* handle to the job */
3893 @END
3896 /* Assign a job object to a process */
3897 @REQ(assign_job)
3898 obj_handle_t job; /* handle to the job */
3899 obj_handle_t process; /* handle to the process */
3900 @END
3903 /* Check if a process is associated with a job */
3904 @REQ(process_in_job)
3905 obj_handle_t job; /* handle to the job */
3906 obj_handle_t process; /* handle to the process */
3907 @END
3910 /* Set limit flags on a job */
3911 @REQ(set_job_limits)
3912 obj_handle_t handle; /* handle to the job */
3913 unsigned int limit_flags; /* new limit flags */
3914 @END
3917 /* Set new completion port for a job */
3918 @REQ(set_job_completion_port)
3919 obj_handle_t job; /* handle to the job */
3920 obj_handle_t port; /* handle to the completion port */
3921 client_ptr_t key; /* key to send with completion messages */
3922 @END
3925 /* Terminate all processes associated with the job */
3926 @REQ(terminate_job)
3927 obj_handle_t handle; /* handle to the job */
3928 int status; /* process exit code */
3929 @END
3932 /* Suspend a process */
3933 @REQ(suspend_process)
3934 obj_handle_t handle; /* process handle */
3935 @END
3938 /* Resume a process */
3939 @REQ(resume_process)
3940 obj_handle_t handle; /* process handle */
3941 @END