comctl32: Fix Str_SetPtr[AW] spec file entries.
[wine.git] / server / protocol.def
blob6c44b2b43f5ea3636a2a68addfced8727b13d2d3
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 client_cpu_t;
140 /* context data */
141 typedef struct
143 client_cpu_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 { struct { unsigned __int64 low, high; } q[32]; 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,
469 APC_BREAK_PROCESS
472 typedef union
474 enum apc_type type;
475 struct
477 enum apc_type type; /* APC_USER */
478 int __pad;
479 client_ptr_t func; /* void (__stdcall *func)(ULONG_PTR,ULONG_PTR,ULONG_PTR); */
480 apc_param_t args[3]; /* arguments for user function */
481 } user;
482 struct
484 enum apc_type type; /* APC_TIMER */
485 int __pad;
486 client_ptr_t func; /* void (__stdcall *func)(void*, unsigned int, unsigned int); */
487 timeout_t time; /* absolute time of expiration */
488 client_ptr_t arg; /* user argument */
489 } timer;
490 struct
492 enum apc_type type; /* APC_ASYNC_IO */
493 unsigned int status; /* I/O status */
494 client_ptr_t user; /* user pointer */
495 client_ptr_t sb; /* status block */
496 } async_io;
497 struct
499 enum apc_type type; /* APC_VIRTUAL_ALLOC */
500 unsigned int op_type; /* type of operation */
501 client_ptr_t addr; /* requested address */
502 mem_size_t size; /* allocation size */
503 unsigned int zero_bits_64; /* number of zero high bits */
504 unsigned int prot; /* memory protection flags */
505 } virtual_alloc;
506 struct
508 enum apc_type type; /* APC_VIRTUAL_FREE */
509 unsigned int op_type; /* type of operation */
510 client_ptr_t addr; /* requested address */
511 mem_size_t size; /* allocation size */
512 } virtual_free;
513 struct
515 enum apc_type type; /* APC_VIRTUAL_QUERY */
516 int __pad;
517 client_ptr_t addr; /* requested address */
518 } virtual_query;
519 struct
521 enum apc_type type; /* APC_VIRTUAL_PROTECT */
522 unsigned int prot; /* new protection flags */
523 client_ptr_t addr; /* requested address */
524 mem_size_t size; /* requested size */
525 } virtual_protect;
526 struct
528 enum apc_type type; /* APC_VIRTUAL_FLUSH */
529 int __pad;
530 client_ptr_t addr; /* requested address */
531 mem_size_t size; /* requested size */
532 } virtual_flush;
533 struct
535 enum apc_type type; /* APC_VIRTUAL_LOCK */
536 int __pad;
537 client_ptr_t addr; /* requested address */
538 mem_size_t size; /* requested size */
539 } virtual_lock;
540 struct
542 enum apc_type type; /* APC_VIRTUAL_UNLOCK */
543 int __pad;
544 client_ptr_t addr; /* requested address */
545 mem_size_t size; /* requested size */
546 } virtual_unlock;
547 struct
549 enum apc_type type; /* APC_MAP_VIEW */
550 obj_handle_t handle; /* mapping handle */
551 client_ptr_t addr; /* requested address */
552 mem_size_t size; /* allocation size */
553 file_pos_t offset; /* file offset */
554 unsigned int alloc_type; /* allocation type */
555 unsigned short zero_bits_64; /* number of zero high bits */
556 unsigned short prot; /* memory protection flags */
557 } map_view;
558 struct
560 enum apc_type type; /* APC_UNMAP_VIEW */
561 int __pad;
562 client_ptr_t addr; /* view address */
563 } unmap_view;
564 struct
566 enum apc_type type; /* APC_CREATE_THREAD */
567 int suspend; /* suspended thread? */
568 client_ptr_t func; /* void (__stdcall *func)(void*); start function */
569 client_ptr_t arg; /* argument for start function */
570 mem_size_t reserve; /* reserve size for thread stack */
571 mem_size_t commit; /* commit size for thread stack */
572 } create_thread;
573 } apc_call_t;
575 typedef union
577 enum apc_type type;
578 struct
580 enum apc_type type; /* APC_ASYNC_IO */
581 unsigned int status; /* new status of async operation */
582 unsigned int total; /* bytes transferred */
583 } async_io;
584 struct
586 enum apc_type type; /* APC_VIRTUAL_ALLOC */
587 unsigned int status; /* status returned by call */
588 client_ptr_t addr; /* resulting address */
589 mem_size_t size; /* resulting size */
590 } virtual_alloc;
591 struct
593 enum apc_type type; /* APC_VIRTUAL_FREE */
594 unsigned int status; /* status returned by call */
595 client_ptr_t addr; /* resulting address */
596 mem_size_t size; /* resulting size */
597 } virtual_free;
598 struct
600 enum apc_type type; /* APC_VIRTUAL_QUERY */
601 unsigned int status; /* status returned by call */
602 client_ptr_t base; /* resulting base address */
603 client_ptr_t alloc_base;/* resulting allocation base */
604 mem_size_t size; /* resulting region size */
605 unsigned short state; /* resulting region state */
606 unsigned short prot; /* resulting region protection */
607 unsigned short alloc_prot;/* resulting allocation protection */
608 unsigned short alloc_type;/* resulting region allocation type */
609 } virtual_query;
610 struct
612 enum apc_type type; /* APC_VIRTUAL_PROTECT */
613 unsigned int status; /* status returned by call */
614 client_ptr_t addr; /* resulting address */
615 mem_size_t size; /* resulting size */
616 unsigned int prot; /* old protection flags */
617 } virtual_protect;
618 struct
620 enum apc_type type; /* APC_VIRTUAL_FLUSH */
621 unsigned int status; /* status returned by call */
622 client_ptr_t addr; /* resulting address */
623 mem_size_t size; /* resulting size */
624 } virtual_flush;
625 struct
627 enum apc_type type; /* APC_VIRTUAL_LOCK */
628 unsigned int status; /* status returned by call */
629 client_ptr_t addr; /* resulting address */
630 mem_size_t size; /* resulting size */
631 } virtual_lock;
632 struct
634 enum apc_type type; /* APC_VIRTUAL_UNLOCK */
635 unsigned int status; /* status returned by call */
636 client_ptr_t addr; /* resulting address */
637 mem_size_t size; /* resulting size */
638 } virtual_unlock;
639 struct
641 enum apc_type type; /* APC_MAP_VIEW */
642 unsigned int status; /* status returned by call */
643 client_ptr_t addr; /* resulting address */
644 mem_size_t size; /* resulting size */
645 } map_view;
646 struct
648 enum apc_type type; /* APC_MAP_VIEW */
649 unsigned int status; /* status returned by call */
650 } unmap_view;
651 struct
653 enum apc_type type; /* APC_CREATE_THREAD */
654 unsigned int status; /* status returned by call */
655 thread_id_t tid; /* thread id */
656 obj_handle_t handle; /* handle to new thread */
657 } create_thread;
658 struct
660 enum apc_type type; /* APC_BREAK_PROCESS */
661 unsigned int status; /* status returned by call */
662 } break_process;
663 } apc_result_t;
665 enum irp_type
667 IRP_CALL_NONE,
668 IRP_CALL_CREATE,
669 IRP_CALL_CLOSE,
670 IRP_CALL_READ,
671 IRP_CALL_WRITE,
672 IRP_CALL_FLUSH,
673 IRP_CALL_IOCTL,
674 IRP_CALL_FREE,
675 IRP_CALL_CANCEL
678 typedef union
680 enum irp_type type; /* irp call type */
681 struct
683 enum irp_type type; /* IRP_CALL_CREATE */
684 unsigned int access; /* access rights */
685 unsigned int sharing; /* sharing flags */
686 unsigned int options; /* file options */
687 client_ptr_t device; /* opaque ptr for the device */
688 obj_handle_t file; /* file handle */
689 } create;
690 struct
692 enum irp_type type; /* IRP_CALL_CLOSE */
693 int __pad;
694 client_ptr_t file; /* opaque ptr for the file object */
695 } close;
696 struct
698 enum irp_type type; /* IRP_CALL_READ */
699 unsigned int key; /* driver key */
700 data_size_t out_size; /* needed output size */
701 int __pad;
702 client_ptr_t file; /* opaque ptr for the file object */
703 file_pos_t pos; /* file position */
704 } read;
705 struct
707 enum irp_type type; /* IRP_CALL_WRITE */
708 unsigned int key; /* driver key */
709 client_ptr_t file; /* opaque ptr for the file object */
710 file_pos_t pos; /* file position */
711 } write;
712 struct
714 enum irp_type type; /* IRP_CALL_FLUSH */
715 int __pad;
716 client_ptr_t file; /* opaque ptr for the file object */
717 } flush;
718 struct
720 enum irp_type type; /* IRP_CALL_IOCTL */
721 ioctl_code_t code; /* ioctl code */
722 data_size_t out_size; /* needed output size */
723 int __pad;
724 client_ptr_t file; /* opaque ptr for the file object */
725 } ioctl;
726 struct
728 enum irp_type type; /* IRP_CALL_FREE */
729 int __pad;
730 client_ptr_t obj; /* opaque ptr for the freed object */
731 } free;
732 struct
734 enum irp_type type; /* IRP_CALL_CANCEL */
735 int __pad;
736 client_ptr_t irp; /* opaque ptr for canceled irp */
737 } cancel;
738 } irp_params_t;
740 /* information about a PE image mapping, roughly equivalent to SECTION_IMAGE_INFORMATION */
741 typedef struct
743 client_ptr_t base;
744 client_ptr_t entry_point;
745 mem_size_t map_size;
746 mem_size_t stack_size;
747 mem_size_t stack_commit;
748 unsigned int zerobits;
749 unsigned int subsystem;
750 unsigned short subsystem_low;
751 unsigned short subsystem_high;
752 unsigned int gp;
753 unsigned short image_charact;
754 unsigned short dll_charact;
755 unsigned short machine;
756 unsigned char contains_code;
757 unsigned char image_flags;
758 unsigned int loader_flags;
759 unsigned int header_size;
760 unsigned int file_size;
761 unsigned int checksum;
762 client_cpu_t cpu;
763 int __pad;
764 } pe_image_info_t;
765 #define IMAGE_FLAGS_ComPlusNativeReady 0x01
766 #define IMAGE_FLAGS_ComPlusILOnly 0x02
767 #define IMAGE_FLAGS_ImageDynamicallyRelocated 0x04
768 #define IMAGE_FLAGS_ImageMappedFlat 0x08
769 #define IMAGE_FLAGS_BaseBelow4gb 0x10
770 #define IMAGE_FLAGS_WineBuiltin 0x40
771 #define IMAGE_FLAGS_WineFakeDll 0x80
773 struct rawinput_device
775 unsigned short usage_page;
776 unsigned short usage;
777 unsigned int flags;
778 user_handle_t target;
781 /****************************************************************/
782 /* Request declarations */
784 /* Create a new process from the context of the parent */
785 @REQ(new_process)
786 obj_handle_t parent_process; /* parent process */
787 int inherit_all; /* inherit all handles from parent */
788 unsigned int create_flags; /* creation flags */
789 int socket_fd; /* file descriptor for process socket */
790 obj_handle_t exe_file; /* file handle for main exe */
791 unsigned int access; /* access rights for process object */
792 client_cpu_t cpu; /* CPU that the new process will use */
793 data_size_t info_size; /* size of startup info */
794 VARARG(objattr,object_attributes); /* object attributes */
795 VARARG(info,startup_info,info_size); /* startup information */
796 VARARG(env,unicode_str); /* environment for new process */
797 @REPLY
798 obj_handle_t info; /* new process info handle */
799 process_id_t pid; /* process id */
800 obj_handle_t handle; /* process handle (in the current process) */
801 @END
804 /* Execute a process, replacing the current one */
805 @REQ(exec_process)
806 int socket_fd; /* file descriptor for process socket */
807 client_cpu_t cpu; /* CPU that the new process will use */
808 @END
811 /* Retrieve information about a newly started process */
812 @REQ(get_new_process_info)
813 obj_handle_t info; /* info handle returned from new_process_request */
814 @REPLY
815 int success; /* did the process start successfully? */
816 int exit_code; /* process exit code if failed */
817 @END
820 /* Create a new thread */
821 @REQ(new_thread)
822 obj_handle_t process; /* process in which to create thread */
823 unsigned int access; /* wanted access rights */
824 int suspend; /* new thread should be suspended on creation */
825 int request_fd; /* fd for request pipe */
826 VARARG(objattr,object_attributes); /* object attributes */
827 @REPLY
828 thread_id_t tid; /* thread id */
829 obj_handle_t handle; /* thread handle (in the current process) */
830 @END
833 /* Retrieve the new process startup info */
834 @REQ(get_startup_info)
835 @REPLY
836 data_size_t info_size; /* size of startup info */
837 VARARG(info,startup_info,info_size); /* startup information */
838 VARARG(env,unicode_str); /* environment */
839 @END
842 /* Signal the end of the process initialization */
843 @REQ(init_process_done)
844 int gui; /* is it a GUI process? */
845 mod_handle_t module; /* main module base address */
846 client_ptr_t ldt_copy; /* address of LDT copy (in thread address space) */
847 client_ptr_t entry; /* process entry point */
848 @REPLY
849 int suspend; /* is process suspended? */
850 @END
853 /* Initialize a thread; called from the child after fork()/clone() */
854 @REQ(init_thread)
855 int unix_pid; /* Unix pid of new thread */
856 int unix_tid; /* Unix tid of new thread */
857 int debug_level; /* new debug level */
858 client_ptr_t teb; /* TEB of new thread (in thread address space) */
859 client_ptr_t entry; /* entry point or PEB if initial thread (in thread address space) */
860 int reply_fd; /* fd for reply pipe */
861 int wait_fd; /* fd for blocking calls pipe */
862 client_cpu_t cpu; /* CPU that this thread is running on */
863 @REPLY
864 process_id_t pid; /* process id of the new thread's process */
865 thread_id_t tid; /* thread id of the new thread */
866 timeout_t server_start; /* server start time */
867 data_size_t info_size; /* total size of startup info */
868 int version; /* protocol version */
869 unsigned int all_cpus; /* bitset of supported CPUs */
870 int suspend; /* is thread suspended? */
871 @END
874 /* Terminate a process */
875 @REQ(terminate_process)
876 obj_handle_t handle; /* process handle to terminate */
877 int exit_code; /* process exit code */
878 @REPLY
879 int self; /* suicide? */
880 @END
883 /* Terminate a thread */
884 @REQ(terminate_thread)
885 obj_handle_t handle; /* thread handle to terminate */
886 int exit_code; /* thread exit code */
887 @REPLY
888 int self; /* suicide? */
889 int last; /* last thread in this process? */
890 @END
893 /* Retrieve information about a process */
894 @REQ(get_process_info)
895 obj_handle_t handle; /* process handle */
896 @REPLY
897 process_id_t pid; /* server process id */
898 process_id_t ppid; /* server process id of parent */
899 affinity_t affinity; /* process affinity mask */
900 client_ptr_t peb; /* PEB address in process address space */
901 timeout_t start_time; /* process start time */
902 timeout_t end_time; /* process end time */
903 int exit_code; /* process exit code */
904 int priority; /* priority class */
905 client_cpu_t cpu; /* CPU that this process is running on */
906 short int debugger_present; /* process is being debugged */
907 short int debug_children; /* inherit debugger to child processes */
908 @END
911 /* Retrieve information about a process memory usage */
912 @REQ(get_process_vm_counters)
913 obj_handle_t handle; /* process handle */
914 @REPLY
915 mem_size_t peak_virtual_size; /* peak virtual memory in bytes */
916 mem_size_t virtual_size; /* virtual memory in bytes */
917 mem_size_t peak_working_set_size; /* peak real memory in bytes */
918 mem_size_t working_set_size; /* real memory in bytes */
919 mem_size_t pagefile_usage; /* commit charge in bytes */
920 mem_size_t peak_pagefile_usage; /* peak commit charge in bytes */
921 @END
924 /* Set a process information */
925 @REQ(set_process_info)
926 obj_handle_t handle; /* process handle */
927 int mask; /* setting mask (see below) */
928 int priority; /* priority class */
929 affinity_t affinity; /* affinity mask */
930 @END
931 #define SET_PROCESS_INFO_PRIORITY 0x01
932 #define SET_PROCESS_INFO_AFFINITY 0x02
935 /* Retrieve information about a thread */
936 @REQ(get_thread_info)
937 obj_handle_t handle; /* thread handle */
938 thread_id_t tid_in; /* thread id (optional) */
939 @REPLY
940 process_id_t pid; /* server process id */
941 thread_id_t tid; /* server thread id */
942 client_ptr_t teb; /* thread teb pointer */
943 client_ptr_t entry_point; /* thread entry point */
944 affinity_t affinity; /* thread affinity mask */
945 int exit_code; /* thread exit code */
946 int priority; /* thread priority level */
947 int last; /* last thread in process */
948 int suspend_count; /* thread suspend count */
949 data_size_t desc_len; /* description length in bytes */
950 VARARG(desc,unicode_str); /* description string */
951 @END
954 /* Retrieve information about thread times */
955 @REQ(get_thread_times)
956 obj_handle_t handle; /* thread handle */
957 @REPLY
958 timeout_t creation_time; /* thread creation time */
959 timeout_t exit_time; /* thread exit time */
960 @END
963 /* Set a thread information */
964 @REQ(set_thread_info)
965 obj_handle_t handle; /* thread handle */
966 int mask; /* setting mask (see below) */
967 int priority; /* priority class */
968 affinity_t affinity; /* affinity mask */
969 client_ptr_t entry_point; /* thread entry point */
970 obj_handle_t token; /* impersonation token */
971 VARARG(desc,unicode_str); /* description string */
972 @END
973 #define SET_THREAD_INFO_PRIORITY 0x01
974 #define SET_THREAD_INFO_AFFINITY 0x02
975 #define SET_THREAD_INFO_TOKEN 0x04
976 #define SET_THREAD_INFO_ENTRYPOINT 0x08
977 #define SET_THREAD_INFO_DESCRIPTION 0x10
980 /* Retrieve information about a module */
981 @REQ(get_dll_info)
982 obj_handle_t handle; /* process handle */
983 mod_handle_t base_address; /* base address of module */
984 @REPLY
985 client_ptr_t entry_point;
986 data_size_t filename_len; /* buffer len in bytes required to store filename */
987 VARARG(filename,unicode_str); /* file name of module */
988 @END
991 /* Suspend a thread */
992 @REQ(suspend_thread)
993 obj_handle_t handle; /* thread handle */
994 @REPLY
995 int count; /* new suspend count */
996 @END
999 /* Resume a thread */
1000 @REQ(resume_thread)
1001 obj_handle_t handle; /* thread handle */
1002 @REPLY
1003 int count; /* new suspend count */
1004 @END
1007 /* Notify the server that a dll has been loaded */
1008 @REQ(load_dll)
1009 data_size_t dbg_offset; /* debug info offset */
1010 mod_handle_t base; /* base address */
1011 client_ptr_t name; /* ptr to ptr to name (in process addr space) */
1012 data_size_t dbg_size; /* debug info size */
1013 VARARG(filename,unicode_str); /* file name of dll */
1014 @END
1017 /* Notify the server that a dll is being unloaded */
1018 @REQ(unload_dll)
1019 mod_handle_t base; /* base address */
1020 @END
1023 /* Queue an APC for a thread or process */
1024 @REQ(queue_apc)
1025 obj_handle_t handle; /* thread or process handle */
1026 apc_call_t call; /* call arguments */
1027 @REPLY
1028 obj_handle_t handle; /* APC handle */
1029 int self; /* run APC in caller itself? */
1030 @END
1033 /* Get the result of an APC call */
1034 @REQ(get_apc_result)
1035 obj_handle_t handle; /* handle to the APC */
1036 @REPLY
1037 apc_result_t result; /* result of the APC */
1038 @END
1041 /* Close a handle for the current process */
1042 @REQ(close_handle)
1043 obj_handle_t handle; /* handle to close */
1044 @END
1047 /* Set a handle information */
1048 @REQ(set_handle_info)
1049 obj_handle_t handle; /* handle we are interested in */
1050 int flags; /* new handle flags */
1051 int mask; /* mask for flags to set */
1052 @REPLY
1053 int old_flags; /* old flag value */
1054 @END
1057 /* Duplicate a handle */
1058 @REQ(dup_handle)
1059 obj_handle_t src_process; /* src process handle */
1060 obj_handle_t src_handle; /* src handle to duplicate */
1061 obj_handle_t dst_process; /* dst process handle */
1062 unsigned int access; /* wanted access rights */
1063 unsigned int attributes; /* object attributes */
1064 unsigned int options; /* duplicate options (see below) */
1065 @REPLY
1066 obj_handle_t handle; /* duplicated handle in dst process */
1067 int self; /* is the source the current process? */
1068 int closed; /* whether the source handle has been closed */
1069 @END
1070 #define DUP_HANDLE_CLOSE_SOURCE DUPLICATE_CLOSE_SOURCE
1071 #define DUP_HANDLE_SAME_ACCESS DUPLICATE_SAME_ACCESS
1072 #define DUP_HANDLE_MAKE_GLOBAL 0x80000000 /* Not a Windows flag */
1075 /* Open a handle to a process */
1076 @REQ(open_process)
1077 process_id_t pid; /* process id to open */
1078 unsigned int access; /* wanted access rights */
1079 unsigned int attributes; /* object attributes */
1080 @REPLY
1081 obj_handle_t handle; /* handle to the process */
1082 @END
1085 /* Open a handle to a thread */
1086 @REQ(open_thread)
1087 thread_id_t tid; /* thread id to open */
1088 unsigned int access; /* wanted access rights */
1089 unsigned int attributes; /* object attributes */
1090 @REPLY
1091 obj_handle_t handle; /* handle to the thread */
1092 @END
1095 /* Wait for handles */
1096 @REQ(select)
1097 int flags; /* wait flags (see below) */
1098 client_ptr_t cookie; /* magic cookie to return to client */
1099 timeout_t timeout; /* timeout */
1100 obj_handle_t prev_apc; /* handle to previous APC */
1101 VARARG(result,apc_result); /* result of previous APC */
1102 VARARG(data,select_op); /* operation-specific data */
1103 @REPLY
1104 timeout_t timeout; /* timeout converted to absolute */
1105 apc_call_t call; /* APC call arguments */
1106 obj_handle_t apc_handle; /* handle to next APC */
1107 @END
1108 #define SELECT_ALERTABLE 1
1109 #define SELECT_INTERRUPTIBLE 2
1112 /* Create an event */
1113 @REQ(create_event)
1114 unsigned int access; /* wanted access rights */
1115 int manual_reset; /* manual reset event */
1116 int initial_state; /* initial state of the event */
1117 VARARG(objattr,object_attributes); /* object attributes */
1118 @REPLY
1119 obj_handle_t handle; /* handle to the event */
1120 @END
1122 /* Event operation */
1123 @REQ(event_op)
1124 obj_handle_t handle; /* handle to event */
1125 int op; /* event operation (see below) */
1126 @REPLY
1127 int state; /* previous state */
1128 @END
1129 enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT };
1131 @REQ(query_event)
1132 obj_handle_t handle; /* handle to event */
1133 @REPLY
1134 int manual_reset; /* manual reset event */
1135 int state; /* current state of the event */
1136 @END
1138 /* Open an event */
1139 @REQ(open_event)
1140 unsigned int access; /* wanted access rights */
1141 unsigned int attributes; /* object attributes */
1142 obj_handle_t rootdir; /* root directory */
1143 VARARG(name,unicode_str); /* object name */
1144 @REPLY
1145 obj_handle_t handle; /* handle to the event */
1146 @END
1149 /* Create a keyed event */
1150 @REQ(create_keyed_event)
1151 unsigned int access; /* wanted access rights */
1152 VARARG(objattr,object_attributes); /* object attributes */
1153 @REPLY
1154 obj_handle_t handle; /* handle to the event */
1155 @END
1157 /* Open a keyed event */
1158 @REQ(open_keyed_event)
1159 unsigned int access; /* wanted access rights */
1160 unsigned int attributes; /* object attributes */
1161 obj_handle_t rootdir; /* root directory */
1162 VARARG(name,unicode_str); /* object name */
1163 @REPLY
1164 obj_handle_t handle; /* handle to the event */
1165 @END
1168 /* Create a mutex */
1169 @REQ(create_mutex)
1170 unsigned int access; /* wanted access rights */
1171 int owned; /* initially owned? */
1172 VARARG(objattr,object_attributes); /* object attributes */
1173 @REPLY
1174 obj_handle_t handle; /* handle to the mutex */
1175 @END
1178 /* Release a mutex */
1179 @REQ(release_mutex)
1180 obj_handle_t handle; /* handle to the mutex */
1181 @REPLY
1182 unsigned int prev_count; /* value of internal counter, before release */
1183 @END
1186 /* Open a mutex */
1187 @REQ(open_mutex)
1188 unsigned int access; /* wanted access rights */
1189 unsigned int attributes; /* object attributes */
1190 obj_handle_t rootdir; /* root directory */
1191 VARARG(name,unicode_str); /* object name */
1192 @REPLY
1193 obj_handle_t handle; /* handle to the mutex */
1194 @END
1197 /* Query a mutex */
1198 @REQ(query_mutex)
1199 obj_handle_t handle; /* handle to mutex */
1200 @REPLY
1201 unsigned int count; /* current count of mutex */
1202 int owned; /* true if owned by current thread */
1203 int abandoned; /* true if abandoned */
1204 @END
1207 /* Create a semaphore */
1208 @REQ(create_semaphore)
1209 unsigned int access; /* wanted access rights */
1210 unsigned int initial; /* initial count */
1211 unsigned int max; /* maximum count */
1212 VARARG(objattr,object_attributes); /* object attributes */
1213 @REPLY
1214 obj_handle_t handle; /* handle to the semaphore */
1215 @END
1218 /* Release a semaphore */
1219 @REQ(release_semaphore)
1220 obj_handle_t handle; /* handle to the semaphore */
1221 unsigned int count; /* count to add to semaphore */
1222 @REPLY
1223 unsigned int prev_count; /* previous semaphore count */
1224 @END
1226 @REQ(query_semaphore)
1227 obj_handle_t handle; /* handle to the semaphore */
1228 @REPLY
1229 unsigned int current; /* current count */
1230 unsigned int max; /* maximum count */
1231 @END
1233 /* Open a semaphore */
1234 @REQ(open_semaphore)
1235 unsigned int access; /* wanted access rights */
1236 unsigned int attributes; /* object attributes */
1237 obj_handle_t rootdir; /* root directory */
1238 VARARG(name,unicode_str); /* object name */
1239 @REPLY
1240 obj_handle_t handle; /* handle to the semaphore */
1241 @END
1244 /* Create a file */
1245 @REQ(create_file)
1246 unsigned int access; /* wanted access rights */
1247 unsigned int sharing; /* sharing flags */
1248 int create; /* file create action */
1249 unsigned int options; /* file options */
1250 unsigned int attrs; /* file attributes for creation */
1251 VARARG(objattr,object_attributes); /* object attributes */
1252 VARARG(filename,string); /* file name */
1253 @REPLY
1254 obj_handle_t handle; /* handle to the file */
1255 @END
1258 /* Open a file object */
1259 @REQ(open_file_object)
1260 unsigned int access; /* wanted access rights */
1261 unsigned int attributes; /* open attributes */
1262 obj_handle_t rootdir; /* root directory */
1263 unsigned int sharing; /* sharing flags */
1264 unsigned int options; /* file options */
1265 VARARG(filename,unicode_str); /* file name */
1266 @REPLY
1267 obj_handle_t handle; /* handle to the file */
1268 @END
1271 /* Allocate a file handle for a Unix fd */
1272 @REQ(alloc_file_handle)
1273 unsigned int access; /* wanted access rights */
1274 unsigned int attributes; /* object attributes */
1275 int fd; /* file descriptor on the client side */
1276 @REPLY
1277 obj_handle_t handle; /* handle to the file */
1278 @END
1281 /* Get the Unix name from a file handle */
1282 @REQ(get_handle_unix_name)
1283 obj_handle_t handle; /* file handle */
1284 @REPLY
1285 data_size_t name_len; /* unix name length */
1286 VARARG(name,string); /* unix name */
1287 @END
1290 /* Get a Unix fd to access a file */
1291 @REQ(get_handle_fd)
1292 obj_handle_t handle; /* handle to the file */
1293 @REPLY
1294 int type; /* file type (see below) */
1295 int cacheable; /* can fd be cached in the client? */
1296 unsigned int access; /* file access rights */
1297 unsigned int options; /* file open options */
1298 @END
1299 enum server_fd_type
1301 FD_TYPE_INVALID, /* invalid file (no associated fd) */
1302 FD_TYPE_FILE, /* regular file */
1303 FD_TYPE_DIR, /* directory */
1304 FD_TYPE_SOCKET, /* socket */
1305 FD_TYPE_SERIAL, /* serial port */
1306 FD_TYPE_PIPE, /* named pipe */
1307 FD_TYPE_MAILSLOT, /* mailslot */
1308 FD_TYPE_CHAR, /* unspecified char device */
1309 FD_TYPE_DEVICE, /* Windows device file */
1310 FD_TYPE_NB_TYPES
1314 /* Retrieve (or allocate) the client-side directory cache entry */
1315 @REQ(get_directory_cache_entry)
1316 obj_handle_t handle; /* handle to the directory */
1317 @REPLY
1318 int entry; /* cache entry on the client side */
1319 VARARG(free,ints); /* entries that can be freed */
1320 @END
1323 /* Flush a file buffers */
1324 @REQ(flush)
1325 async_data_t async; /* async I/O parameters */
1326 @REPLY
1327 obj_handle_t event; /* event set when finished */
1328 @END
1330 /* Query file information */
1331 @REQ(get_file_info)
1332 obj_handle_t handle; /* handle to the file */
1333 unsigned int info_class; /* queried information class */
1334 @REPLY
1335 VARARG(data,bytes); /* file info data */
1336 @END
1338 /* Query volume information */
1339 @REQ(get_volume_info)
1340 obj_handle_t handle; /* handle to the file */
1341 unsigned int info_class; /* queried information class */
1342 @REPLY
1343 VARARG(data,bytes); /* volume info data */
1344 @END
1346 /* Lock a region of a file */
1347 @REQ(lock_file)
1348 obj_handle_t handle; /* handle to the file */
1349 file_pos_t offset; /* offset of start of lock */
1350 file_pos_t count; /* count of bytes to lock */
1351 int shared; /* shared or exclusive lock? */
1352 int wait; /* do we want to wait? */
1353 @REPLY
1354 obj_handle_t handle; /* handle to wait on */
1355 int overlapped; /* is it an overlapped I/O handle? */
1356 @END
1359 /* Unlock a region of a file */
1360 @REQ(unlock_file)
1361 obj_handle_t handle; /* handle to the file */
1362 file_pos_t offset; /* offset of start of unlock */
1363 file_pos_t count; /* count of bytes to unlock */
1364 @END
1367 /* Create a socket */
1368 @REQ(create_socket)
1369 unsigned int access; /* wanted access rights */
1370 unsigned int attributes; /* object attributes */
1371 int family; /* family, see socket manpage */
1372 int type; /* type, see socket manpage */
1373 int protocol; /* protocol, see socket manpage */
1374 unsigned int flags; /* socket flags */
1375 @REPLY
1376 obj_handle_t handle; /* handle to the new socket */
1377 @END
1380 /* Accept a socket */
1381 @REQ(accept_socket)
1382 obj_handle_t lhandle; /* handle to the listening socket */
1383 unsigned int access; /* wanted access rights */
1384 unsigned int attributes; /* object attributes */
1385 @REPLY
1386 obj_handle_t handle; /* handle to the new socket */
1387 @END
1390 /* Accept into an initialized socket */
1391 @REQ(accept_into_socket)
1392 obj_handle_t lhandle; /* handle to the listening socket */
1393 obj_handle_t ahandle; /* handle to the accepting socket */
1394 @END
1397 /* Set socket event parameters */
1398 @REQ(set_socket_event)
1399 obj_handle_t handle; /* handle to the socket */
1400 unsigned int mask; /* event mask */
1401 obj_handle_t event; /* event object */
1402 user_handle_t window; /* window to send the message to */
1403 unsigned int msg; /* message to send */
1404 @END
1407 /* Get socket event parameters */
1408 @REQ(get_socket_event)
1409 obj_handle_t handle; /* handle to the socket */
1410 int service; /* clear pending? */
1411 obj_handle_t c_event; /* event to clear */
1412 @REPLY
1413 unsigned int mask; /* event mask */
1414 unsigned int pmask; /* pending events */
1415 unsigned int state; /* status bits */
1416 VARARG(errors,ints); /* event errors */
1417 @END
1420 /* Get socket info */
1421 @REQ(get_socket_info)
1422 obj_handle_t handle; /* handle to the socket */
1423 @REPLY
1424 int family; /* family, see socket manpage */
1425 int type; /* type, see socket manpage */
1426 int protocol; /* protocol, see socket manpage */
1427 @END
1430 /* Re-enable pending socket events */
1431 @REQ(enable_socket_event)
1432 obj_handle_t handle; /* handle to the socket */
1433 unsigned int mask; /* events to re-enable */
1434 unsigned int sstate; /* status bits to set */
1435 unsigned int cstate; /* status bits to clear */
1436 @END
1438 @REQ(set_socket_deferred)
1439 obj_handle_t handle; /* handle to the socket */
1440 obj_handle_t deferred; /* handle to the socket for which accept() is deferred */
1441 @END
1443 /* Allocate a console (only used by a console renderer) */
1444 @REQ(alloc_console)
1445 unsigned int access; /* wanted access rights */
1446 unsigned int attributes; /* object attributes */
1447 process_id_t pid; /* pid of process which shall be attached to the console */
1448 int input_fd; /* if pid=-1 (bare console to current process), fd for input */
1449 @REPLY
1450 obj_handle_t handle_in; /* handle to console input */
1451 obj_handle_t event; /* handle to renderer events change notification */
1452 @END
1455 /* Free the console of the current process */
1456 @REQ(free_console)
1457 @END
1460 #define CONSOLE_RENDERER_NONE_EVENT 0x00
1461 #define CONSOLE_RENDERER_TITLE_EVENT 0x01
1462 #define CONSOLE_RENDERER_ACTIVE_SB_EVENT 0x02
1463 #define CONSOLE_RENDERER_SB_RESIZE_EVENT 0x03
1464 #define CONSOLE_RENDERER_UPDATE_EVENT 0x04
1465 #define CONSOLE_RENDERER_CURSOR_POS_EVENT 0x05
1466 #define CONSOLE_RENDERER_CURSOR_GEOM_EVENT 0x06
1467 #define CONSOLE_RENDERER_DISPLAY_EVENT 0x07
1468 #define CONSOLE_RENDERER_EXIT_EVENT 0x08
1469 struct console_renderer_event
1471 short event;
1472 union
1474 struct
1476 short top;
1477 short bottom;
1478 } update;
1479 struct
1481 short width;
1482 short height;
1483 } resize;
1484 struct
1486 short x;
1487 short y;
1488 } cursor_pos;
1489 struct
1491 short visible;
1492 short size;
1493 } cursor_geom;
1494 struct
1496 short left;
1497 short top;
1498 short width;
1499 short height;
1500 } display;
1501 } u;
1504 /* retrieve console events for the renderer */
1505 @REQ(get_console_renderer_events)
1506 obj_handle_t handle; /* handle to console input events */
1507 @REPLY
1508 VARARG(data,bytes); /* the various console_renderer_events */
1509 @END
1512 /* Open a handle to the process console */
1513 @REQ(open_console)
1514 obj_handle_t from; /* 0 (resp 1) input (resp output) of current process console */
1515 /* otherwise console_in handle to get active screen buffer? */
1516 unsigned int access; /* wanted access rights */
1517 unsigned int attributes; /* object attributes */
1518 int share; /* share mask (only for output handles) */
1519 @REPLY
1520 obj_handle_t handle; /* handle to the console */
1521 @END
1524 /* Attach to a other process's console */
1525 @REQ(attach_console)
1526 process_id_t pid; /* pid of attached console process */
1527 @REPLY
1528 obj_handle_t std_in; /* attached stdin */
1529 obj_handle_t std_out; /* attached stdout */
1530 obj_handle_t std_err; /* attached stderr */
1531 @END
1534 /* Get the input queue wait event */
1535 @REQ(get_console_wait_event)
1536 obj_handle_t handle; /* handle to the console */
1537 @REPLY
1538 obj_handle_t event;
1539 @END
1541 /* Get a console mode (input or output) */
1542 @REQ(get_console_mode)
1543 obj_handle_t handle; /* handle to the console */
1544 @REPLY
1545 int mode; /* console mode */
1546 @END
1549 /* Set a console mode (input or output) */
1550 @REQ(set_console_mode)
1551 obj_handle_t handle; /* handle to the console */
1552 int mode; /* console mode */
1553 @END
1556 /* Set info about a console (input only) */
1557 @REQ(set_console_input_info)
1558 obj_handle_t handle; /* handle to console input, or 0 for process' console */
1559 int mask; /* setting mask (see below) */
1560 obj_handle_t active_sb; /* active screen buffer */
1561 int history_mode; /* whether we duplicate lines in history */
1562 int history_size; /* number of lines in history */
1563 int edition_mode; /* index to the edition mode flavors */
1564 int input_cp; /* console input codepage */
1565 int output_cp; /* console output codepage */
1566 user_handle_t win; /* console window if backend supports it */
1567 VARARG(title,unicode_str); /* console title */
1568 @END
1569 #define SET_CONSOLE_INPUT_INFO_ACTIVE_SB 0x01
1570 #define SET_CONSOLE_INPUT_INFO_TITLE 0x02
1571 #define SET_CONSOLE_INPUT_INFO_HISTORY_MODE 0x04
1572 #define SET_CONSOLE_INPUT_INFO_HISTORY_SIZE 0x08
1573 #define SET_CONSOLE_INPUT_INFO_EDITION_MODE 0x10
1574 #define SET_CONSOLE_INPUT_INFO_INPUT_CODEPAGE 0x20
1575 #define SET_CONSOLE_INPUT_INFO_OUTPUT_CODEPAGE 0x40
1576 #define SET_CONSOLE_INPUT_INFO_WIN 0x80
1579 /* Get info about a console (input only) */
1580 @REQ(get_console_input_info)
1581 obj_handle_t handle; /* handle to console input, or 0 for process' console */
1582 @REPLY
1583 int history_mode; /* whether we duplicate lines in history */
1584 int history_size; /* number of lines in history */
1585 int history_index; /* number of used lines in history */
1586 int edition_mode; /* index to the edition mode flavors */
1587 int input_cp; /* console input codepage */
1588 int output_cp; /* console output codepage */
1589 user_handle_t win; /* console window if backend supports it */
1590 VARARG(title,unicode_str); /* console title */
1591 @END
1594 /* appends a string to console's history */
1595 @REQ(append_console_input_history)
1596 obj_handle_t handle; /* handle to console input, or 0 for process' console */
1597 VARARG(line,unicode_str); /* line to add */
1598 @END
1601 /* appends a string to console's history */
1602 @REQ(get_console_input_history)
1603 obj_handle_t handle; /* handle to console input, or 0 for process' console */
1604 int index; /* index to get line from */
1605 @REPLY
1606 int total; /* total length of line in Unicode chars */
1607 VARARG(line,unicode_str); /* line to add */
1608 @END
1611 /* creates a new screen buffer on process' console */
1612 @REQ(create_console_output)
1613 obj_handle_t handle_in; /* handle to console input, or 0 for process' console */
1614 unsigned int access; /* wanted access rights */
1615 unsigned int attributes; /* object attributes */
1616 unsigned int share; /* sharing credentials */
1617 int fd; /* for bare consoles, fd the screen-buffer is attached to */
1618 @REPLY
1619 obj_handle_t handle_out; /* handle to the screen buffer */
1620 @END
1623 /* Set info about a console (output only) */
1624 @REQ(set_console_output_info)
1625 obj_handle_t handle; /* handle to the console */
1626 int mask; /* setting mask (see below) */
1627 short int cursor_size; /* size of cursor (percentage filled) */
1628 short int cursor_visible;/* cursor visibility flag */
1629 short int cursor_x; /* position of cursor (x, y) */
1630 short int cursor_y;
1631 short int width; /* width of the screen buffer */
1632 short int height; /* height of the screen buffer */
1633 short int attr; /* default fill attributes (screen colors) */
1634 short int popup_attr; /* pop-up color attributes */
1635 short int win_left; /* window actually displayed by renderer */
1636 short int win_top; /* the rect area is expressed within the */
1637 short int win_right; /* boundaries of the screen buffer */
1638 short int win_bottom;
1639 short int max_width; /* maximum size (width x height) for the window */
1640 short int max_height;
1641 short int font_width; /* font size (width x height) */
1642 short int font_height;
1643 short int font_weight; /* font weight */
1644 short int font_pitch_family; /* font pitch & family */
1645 VARARG(colors,uints,64); /* color table */
1646 VARARG(face_name,unicode_str); /* font face name */
1647 @END
1648 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_GEOM 0x0001
1649 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_POS 0x0002
1650 #define SET_CONSOLE_OUTPUT_INFO_SIZE 0x0004
1651 #define SET_CONSOLE_OUTPUT_INFO_ATTR 0x0008
1652 #define SET_CONSOLE_OUTPUT_INFO_DISPLAY_WINDOW 0x0010
1653 #define SET_CONSOLE_OUTPUT_INFO_MAX_SIZE 0x0020
1654 #define SET_CONSOLE_OUTPUT_INFO_FONT 0x0040
1655 #define SET_CONSOLE_OUTPUT_INFO_COLORTABLE 0x0080
1656 #define SET_CONSOLE_OUTPUT_INFO_POPUP_ATTR 0x0100
1659 /* Get info about a console (output only) */
1660 @REQ(get_console_output_info)
1661 obj_handle_t handle; /* handle to the console */
1662 @REPLY
1663 short int cursor_size; /* size of cursor (percentage filled) */
1664 short int cursor_visible;/* cursor visibility flag */
1665 short int cursor_x; /* position of cursor (x, y) */
1666 short int cursor_y;
1667 short int width; /* width of the screen buffer */
1668 short int height; /* height of the screen buffer */
1669 short int attr; /* default fill attributes (screen colors) */
1670 short int popup_attr; /* pop-up color attributes */
1671 short int win_left; /* window actually displayed by renderer */
1672 short int win_top; /* the rect area is expressed within the */
1673 short int win_right; /* boundaries of the screen buffer */
1674 short int win_bottom;
1675 short int max_width; /* maximum size (width x height) for the window */
1676 short int max_height;
1677 short int font_width; /* font size (width x height) */
1678 short int font_height;
1679 short int font_weight; /* font weight */
1680 short int font_pitch_family; /* font pitch & family */
1681 VARARG(colors,uints,64); /* color table */
1682 VARARG(face_name,unicode_str); /* font face name */
1683 @END
1685 /* Add input records to a console input queue */
1686 @REQ(write_console_input)
1687 obj_handle_t handle; /* handle to the console input */
1688 VARARG(rec,input_records); /* input records */
1689 @REPLY
1690 int written; /* number of records written */
1691 @END
1694 /* Fetch input records from a console input queue */
1695 @REQ(read_console_input)
1696 obj_handle_t handle; /* handle to the console input */
1697 int flush; /* flush the retrieved records from the queue? */
1698 @REPLY
1699 int read; /* number of records read */
1700 VARARG(rec,input_records); /* input records */
1701 @END
1704 /* write data (chars and/or attributes) in a screen buffer */
1705 @REQ(write_console_output)
1706 obj_handle_t handle; /* handle to the console output */
1707 int x; /* position where to start writing */
1708 int y;
1709 int mode; /* char info (see below) */
1710 int wrap; /* wrap around at end of line? */
1711 VARARG(data,bytes); /* info to write */
1712 @REPLY
1713 int written; /* number of char infos actually written */
1714 int width; /* width of screen buffer */
1715 int height; /* height of screen buffer */
1716 @END
1717 enum char_info_mode
1719 CHAR_INFO_MODE_TEXT, /* characters only */
1720 CHAR_INFO_MODE_ATTR, /* attributes only */
1721 CHAR_INFO_MODE_TEXTATTR, /* both characters and attributes */
1722 CHAR_INFO_MODE_TEXTSTDATTR /* characters but use standard attributes */
1726 /* fill a screen buffer with constant data (chars and/or attributes) */
1727 @REQ(fill_console_output)
1728 obj_handle_t handle; /* handle to the console output */
1729 int x; /* position where to start writing */
1730 int y;
1731 int mode; /* char info mode */
1732 int count; /* number to write */
1733 int wrap; /* wrap around at end of line? */
1734 char_info_t data; /* data to write */
1735 @REPLY
1736 int written; /* number of char infos actually written */
1737 @END
1740 /* read data (chars and/or attributes) from a screen buffer */
1741 @REQ(read_console_output)
1742 obj_handle_t handle; /* handle to the console output */
1743 int x; /* position (x,y) where to start reading */
1744 int y;
1745 int mode; /* char info mode */
1746 int wrap; /* wrap around at end of line? */
1747 @REPLY
1748 int width; /* width of screen buffer */
1749 int height; /* height of screen buffer */
1750 VARARG(data,bytes);
1751 @END
1754 /* move a rect (of data) in screen buffer content */
1755 @REQ(move_console_output)
1756 obj_handle_t handle; /* handle to the console output */
1757 short int x_src; /* position (x, y) of rect to start moving from */
1758 short int y_src;
1759 short int x_dst; /* position (x, y) of rect to move to */
1760 short int y_dst;
1761 short int w; /* size of the rect (width, height) to move */
1762 short int h;
1763 @END
1766 /* Sends a signal to a process group */
1767 @REQ(send_console_signal)
1768 int signal; /* the signal to send */
1769 process_id_t group_id; /* the group to send the signal to */
1770 @END
1773 /* enable directory change notifications */
1774 @REQ(read_directory_changes)
1775 unsigned int filter; /* notification filter */
1776 int subtree; /* watch the subtree? */
1777 int want_data; /* flag indicating whether change data should be collected */
1778 async_data_t async; /* async I/O parameters */
1779 @END
1782 @REQ(read_change)
1783 obj_handle_t handle;
1784 @REPLY
1785 VARARG(events,filesystem_event); /* collected filesystem events */
1786 @END
1789 /* Create a file mapping */
1790 @REQ(create_mapping)
1791 unsigned int access; /* wanted access rights */
1792 unsigned int flags; /* SEC_* flags */
1793 unsigned int file_access; /* file access rights */
1794 mem_size_t size; /* mapping size */
1795 obj_handle_t file_handle; /* file handle */
1796 VARARG(objattr,object_attributes); /* object attributes */
1797 @REPLY
1798 obj_handle_t handle; /* handle to the mapping */
1799 @END
1802 /* Open a mapping */
1803 @REQ(open_mapping)
1804 unsigned int access; /* wanted access rights */
1805 unsigned int attributes; /* object attributes */
1806 obj_handle_t rootdir; /* root directory */
1807 VARARG(name,unicode_str); /* object name */
1808 @REPLY
1809 obj_handle_t handle; /* handle to the mapping */
1810 @END
1813 /* Get information about a file mapping */
1814 @REQ(get_mapping_info)
1815 obj_handle_t handle; /* handle to the mapping */
1816 unsigned int access; /* wanted access rights */
1817 @REPLY
1818 mem_size_t size; /* mapping size */
1819 unsigned int flags; /* SEC_* flags */
1820 obj_handle_t shared_file; /* shared mapping file handle */
1821 VARARG(image,pe_image_info);/* image info for SEC_IMAGE mappings */
1822 @END
1825 /* Add a memory view in the current process */
1826 @REQ(map_view)
1827 obj_handle_t mapping; /* file mapping handle */
1828 unsigned int access; /* wanted access rights */
1829 client_ptr_t base; /* view base address (page-aligned) */
1830 mem_size_t size; /* view size */
1831 file_pos_t start; /* start offset in mapping */
1832 @END
1835 /* Unmap a memory view from the current process */
1836 @REQ(unmap_view)
1837 client_ptr_t base; /* view base address */
1838 @END
1841 /* Get a range of committed pages in a file mapping */
1842 @REQ(get_mapping_committed_range)
1843 client_ptr_t base; /* view base address */
1844 file_pos_t offset; /* starting offset (page-aligned, in bytes) */
1845 @REPLY
1846 mem_size_t size; /* size of range starting at offset (page-aligned, in bytes) */
1847 int committed; /* whether it is a committed range */
1848 @END
1851 /* Add a range to the committed pages in a file mapping */
1852 @REQ(add_mapping_committed_range)
1853 client_ptr_t base; /* view base address */
1854 file_pos_t offset; /* starting offset (page-aligned, in bytes) */
1855 mem_size_t size; /* size to set (page-aligned, in bytes) or 0 if only retrieving */
1856 @END
1859 /* Check if two memory maps are for the same file */
1860 @REQ(is_same_mapping)
1861 client_ptr_t base1; /* first view base address */
1862 client_ptr_t base2; /* second view base address */
1863 @END
1866 #define SNAP_PROCESS 0x00000001
1867 #define SNAP_THREAD 0x00000002
1868 /* Create a snapshot */
1869 @REQ(create_snapshot)
1870 unsigned int attributes; /* object attributes */
1871 unsigned int flags; /* snapshot flags (SNAP_*) */
1872 @REPLY
1873 obj_handle_t handle; /* handle to the snapshot */
1874 @END
1877 /* Get the next process from a snapshot */
1878 @REQ(next_process)
1879 obj_handle_t handle; /* handle to the snapshot */
1880 int reset; /* reset snapshot position? */
1881 @REPLY
1882 int count; /* process usage count */
1883 process_id_t pid; /* process id */
1884 process_id_t ppid; /* parent process id */
1885 int threads; /* number of threads */
1886 int priority; /* process priority */
1887 int handles; /* number of handles */
1888 int unix_pid; /* Unix pid */
1889 VARARG(filename,unicode_str); /* file name of main exe */
1890 @END
1893 /* Get the next thread from a snapshot */
1894 @REQ(next_thread)
1895 obj_handle_t handle; /* handle to the snapshot */
1896 int reset; /* reset snapshot position? */
1897 @REPLY
1898 int count; /* thread usage count */
1899 process_id_t pid; /* process id */
1900 thread_id_t tid; /* thread id */
1901 int base_pri; /* base priority */
1902 int delta_pri; /* delta priority */
1903 @END
1906 /* Wait for a debug event */
1907 @REQ(wait_debug_event)
1908 int get_handle; /* should we alloc a handle for waiting? */
1909 @REPLY
1910 process_id_t pid; /* process id */
1911 thread_id_t tid; /* thread id */
1912 obj_handle_t wait; /* wait handle if no event ready */
1913 VARARG(event,debug_event); /* debug event data */
1914 @END
1917 /* Queue an exception event */
1918 @REQ(queue_exception_event)
1919 int first; /* first chance exception? */
1920 unsigned int code; /* exception code */
1921 unsigned int flags; /* exception flags */
1922 client_ptr_t record; /* exception record */
1923 client_ptr_t address; /* exception address */
1924 data_size_t len; /* size of parameters */
1925 VARARG(params,uints64,len);/* exception parameters */
1926 VARARG(context,context); /* thread context */
1927 @REPLY
1928 obj_handle_t handle; /* handle to the queued event */
1929 @END
1932 /* Retrieve the status of an exception event */
1933 @REQ(get_exception_status)
1934 obj_handle_t handle; /* handle to the queued event */
1935 @REPLY
1936 VARARG(context,context); /* modified thread context */
1937 @END
1940 /* Continue a debug event */
1941 @REQ(continue_debug_event)
1942 process_id_t pid; /* process id to continue */
1943 thread_id_t tid; /* thread id to continue */
1944 int status; /* continuation status */
1945 @END
1948 /* Start/stop debugging an existing process */
1949 @REQ(debug_process)
1950 process_id_t pid; /* id of the process to debug */
1951 int attach; /* 1=attaching / 0=detaching from the process */
1952 @END
1955 /* Set debugger kill on exit flag */
1956 @REQ(set_debugger_kill_on_exit)
1957 int kill_on_exit; /* 0=detach/1=kill debuggee when debugger dies */
1958 @END
1961 /* Read data from a process address space */
1962 @REQ(read_process_memory)
1963 obj_handle_t handle; /* process handle */
1964 client_ptr_t addr; /* addr to read from */
1965 @REPLY
1966 VARARG(data,bytes); /* result data */
1967 @END
1970 /* Write data to a process address space */
1971 @REQ(write_process_memory)
1972 obj_handle_t handle; /* process handle */
1973 client_ptr_t addr; /* addr to write to */
1974 VARARG(data,bytes); /* data to write */
1975 @END
1978 /* Create a registry key */
1979 @REQ(create_key)
1980 unsigned int access; /* desired access rights */
1981 unsigned int options; /* creation options */
1982 VARARG(objattr,object_attributes); /* object attributes */
1983 VARARG(class,unicode_str); /* class name */
1984 @REPLY
1985 obj_handle_t hkey; /* handle to the created key */
1986 int created; /* has it been newly created? */
1987 @END
1989 /* Open a registry key */
1990 @REQ(open_key)
1991 obj_handle_t parent; /* handle to the parent key */
1992 unsigned int access; /* desired access rights */
1993 unsigned int attributes; /* object attributes */
1994 VARARG(name,unicode_str); /* key name */
1995 @REPLY
1996 obj_handle_t hkey; /* handle to the open key */
1997 @END
2000 /* Delete a registry key */
2001 @REQ(delete_key)
2002 obj_handle_t hkey; /* handle to the key */
2003 @END
2006 /* Flush a registry key */
2007 @REQ(flush_key)
2008 obj_handle_t hkey; /* handle to the key */
2009 @END
2012 /* Enumerate registry subkeys */
2013 @REQ(enum_key)
2014 obj_handle_t hkey; /* handle to registry key */
2015 int index; /* index of subkey (or -1 for current key) */
2016 int info_class; /* requested information class */
2017 @REPLY
2018 int subkeys; /* number of subkeys */
2019 int max_subkey; /* longest subkey name */
2020 int max_class; /* longest class name */
2021 int values; /* number of values */
2022 int max_value; /* longest value name */
2023 int max_data; /* longest value data */
2024 timeout_t modif; /* last modification time */
2025 data_size_t total; /* total length needed for full name and class */
2026 data_size_t namelen; /* length of key name in bytes */
2027 VARARG(name,unicode_str,namelen); /* key name */
2028 VARARG(class,unicode_str); /* class name */
2029 @END
2032 /* Set a value of a registry key */
2033 @REQ(set_key_value)
2034 obj_handle_t hkey; /* handle to registry key */
2035 int type; /* value type */
2036 data_size_t namelen; /* length of value name in bytes */
2037 VARARG(name,unicode_str,namelen); /* value name */
2038 VARARG(data,bytes); /* value data */
2039 @END
2042 /* Retrieve the value of a registry key */
2043 @REQ(get_key_value)
2044 obj_handle_t hkey; /* handle to registry key */
2045 VARARG(name,unicode_str); /* value name */
2046 @REPLY
2047 int type; /* value type */
2048 data_size_t total; /* total length needed for data */
2049 VARARG(data,bytes); /* value data */
2050 @END
2053 /* Enumerate a value of a registry key */
2054 @REQ(enum_key_value)
2055 obj_handle_t hkey; /* handle to registry key */
2056 int index; /* value index */
2057 int info_class; /* requested information class */
2058 @REPLY
2059 int type; /* value type */
2060 data_size_t total; /* total length needed for full name and data */
2061 data_size_t namelen; /* length of value name in bytes */
2062 VARARG(name,unicode_str,namelen); /* value name */
2063 VARARG(data,bytes); /* value data */
2064 @END
2067 /* Delete a value of a registry key */
2068 @REQ(delete_key_value)
2069 obj_handle_t hkey; /* handle to registry key */
2070 VARARG(name,unicode_str); /* value name */
2071 @END
2074 /* Load a registry branch from a file */
2075 @REQ(load_registry)
2076 obj_handle_t file; /* file to load from */
2077 VARARG(objattr,object_attributes); /* object attributes */
2078 @END
2081 /* UnLoad a registry branch from a file */
2082 @REQ(unload_registry)
2083 obj_handle_t hkey; /* root key to unload to */
2084 @END
2087 /* Save a registry branch to a file */
2088 @REQ(save_registry)
2089 obj_handle_t hkey; /* key to save */
2090 obj_handle_t file; /* file to save to */
2091 @END
2094 /* Add a registry key change notification */
2095 @REQ(set_registry_notification)
2096 obj_handle_t hkey; /* key to watch for changes */
2097 obj_handle_t event; /* event to set */
2098 int subtree; /* should we watch the whole subtree? */
2099 unsigned int filter; /* things to watch */
2100 @END
2103 /* Create a waitable timer */
2104 @REQ(create_timer)
2105 unsigned int access; /* wanted access rights */
2106 int manual; /* manual reset */
2107 VARARG(objattr,object_attributes); /* object attributes */
2108 @REPLY
2109 obj_handle_t handle; /* handle to the timer */
2110 @END
2113 /* Open a waitable timer */
2114 @REQ(open_timer)
2115 unsigned int access; /* wanted access rights */
2116 unsigned int attributes; /* object attributes */
2117 obj_handle_t rootdir; /* root directory */
2118 VARARG(name,unicode_str); /* object name */
2119 @REPLY
2120 obj_handle_t handle; /* handle to the timer */
2121 @END
2123 /* Set a waitable timer */
2124 @REQ(set_timer)
2125 obj_handle_t handle; /* handle to the timer */
2126 timeout_t expire; /* next expiration absolute time */
2127 client_ptr_t callback; /* callback function */
2128 client_ptr_t arg; /* callback argument */
2129 int period; /* timer period in ms */
2130 @REPLY
2131 int signaled; /* was the timer signaled before this call ? */
2132 @END
2134 /* Cancel a waitable timer */
2135 @REQ(cancel_timer)
2136 obj_handle_t handle; /* handle to the timer */
2137 @REPLY
2138 int signaled; /* was the timer signaled before this calltime ? */
2139 @END
2141 /* Get information on a waitable timer */
2142 @REQ(get_timer_info)
2143 obj_handle_t handle; /* handle to the timer */
2144 @REPLY
2145 timeout_t when; /* absolute time when the timer next expires */
2146 int signaled; /* is the timer signaled? */
2147 @END
2150 /* Retrieve the current context of a thread */
2151 @REQ(get_thread_context)
2152 obj_handle_t handle; /* thread handle */
2153 unsigned int flags; /* context flags */
2154 int suspend; /* suspend the thread if needed */
2155 @REPLY
2156 int self; /* was it a handle to the current thread? */
2157 VARARG(context,context); /* thread context */
2158 @END
2161 /* Set the current context of a thread */
2162 @REQ(set_thread_context)
2163 obj_handle_t handle; /* thread handle */
2164 int suspend; /* suspend the thread if needed */
2165 VARARG(context,context); /* thread context */
2166 @REPLY
2167 int self; /* was it a handle to the current thread? */
2168 @END
2171 /* Fetch a selector entry for a thread */
2172 @REQ(get_selector_entry)
2173 obj_handle_t handle; /* thread handle */
2174 int entry; /* LDT entry */
2175 @REPLY
2176 unsigned int base; /* selector base */
2177 unsigned int limit; /* selector limit */
2178 unsigned char flags; /* selector flags */
2179 @END
2182 /* Add an atom */
2183 @REQ(add_atom)
2184 obj_handle_t table; /* which table to add atom to */
2185 VARARG(name,unicode_str); /* atom name */
2186 @REPLY
2187 atom_t atom; /* resulting atom */
2188 @END
2191 /* Delete an atom */
2192 @REQ(delete_atom)
2193 obj_handle_t table; /* which table to delete atom from */
2194 atom_t atom; /* atom handle */
2195 @END
2198 /* Find an atom */
2199 @REQ(find_atom)
2200 obj_handle_t table; /* which table to find atom from */
2201 VARARG(name,unicode_str); /* atom name */
2202 @REPLY
2203 atom_t atom; /* atom handle */
2204 @END
2207 /* Get information about an atom */
2208 @REQ(get_atom_information)
2209 obj_handle_t table; /* which table to find atom from */
2210 atom_t atom; /* atom handle */
2211 @REPLY
2212 int count; /* atom lock count */
2213 int pinned; /* whether the atom has been pinned */
2214 data_size_t total; /* actual length of atom name */
2215 VARARG(name,unicode_str); /* atom name */
2216 @END
2219 /* Set information about an atom */
2220 @REQ(set_atom_information)
2221 obj_handle_t table; /* which table to find atom from */
2222 atom_t atom; /* atom handle */
2223 int pinned; /* whether to bump atom information */
2224 @END
2227 /* Empty an atom table */
2228 @REQ(empty_atom_table)
2229 obj_handle_t table; /* which table to find atom from */
2230 int if_pinned; /* whether to delete pinned atoms */
2231 @END
2234 /* Init an atom table */
2235 @REQ(init_atom_table)
2236 int entries; /* number of entries (only for local) */
2237 @REPLY
2238 obj_handle_t table; /* handle to the atom table */
2239 @END
2242 /* Get the message queue of the current thread */
2243 @REQ(get_msg_queue)
2244 @REPLY
2245 obj_handle_t handle; /* handle to the queue */
2246 @END
2249 /* Set the file descriptor associated to the current thread queue */
2250 @REQ(set_queue_fd)
2251 obj_handle_t handle; /* handle to the file descriptor */
2252 @END
2255 /* Set the current message queue wakeup mask */
2256 @REQ(set_queue_mask)
2257 unsigned int wake_mask; /* wakeup bits mask */
2258 unsigned int changed_mask; /* changed bits mask */
2259 int skip_wait; /* will we skip waiting if signaled? */
2260 @REPLY
2261 unsigned int wake_bits; /* current wake bits */
2262 unsigned int changed_bits; /* current changed bits */
2263 @END
2266 /* Get the current message queue status */
2267 @REQ(get_queue_status)
2268 unsigned int clear_bits; /* should we clear the change bits? */
2269 @REPLY
2270 unsigned int wake_bits; /* wake bits */
2271 unsigned int changed_bits; /* changed bits since last time */
2272 @END
2275 /* Retrieve the process idle event */
2276 @REQ(get_process_idle_event)
2277 obj_handle_t handle; /* process handle */
2278 @REPLY
2279 obj_handle_t event; /* handle to idle event */
2280 @END
2283 /* Send a message to a thread queue */
2284 @REQ(send_message)
2285 thread_id_t id; /* thread id */
2286 int type; /* message type (see below) */
2287 int flags; /* message flags (see below) */
2288 user_handle_t win; /* window handle */
2289 unsigned int msg; /* message code */
2290 lparam_t wparam; /* parameters */
2291 lparam_t lparam; /* parameters */
2292 timeout_t timeout; /* timeout for reply */
2293 VARARG(data,message_data); /* message data for sent messages */
2294 @END
2296 @REQ(post_quit_message)
2297 int exit_code; /* exit code to return */
2298 @END
2300 enum message_type
2302 MSG_ASCII, /* Ascii message (from SendMessageA) */
2303 MSG_UNICODE, /* Unicode message (from SendMessageW) */
2304 MSG_NOTIFY, /* notify message (from SendNotifyMessageW), always Unicode */
2305 MSG_CALLBACK, /* callback message (from SendMessageCallbackW), always Unicode */
2306 MSG_CALLBACK_RESULT,/* result of a callback message */
2307 MSG_OTHER_PROCESS, /* sent from other process, may include vararg data, always Unicode */
2308 MSG_POSTED, /* posted message (from PostMessageW), always Unicode */
2309 MSG_HARDWARE, /* hardware message */
2310 MSG_WINEVENT, /* winevent message */
2311 MSG_HOOK_LL /* low-level hardware hook */
2313 #define SEND_MSG_ABORT_IF_HUNG 0x01
2316 /* Send a hardware message to a thread queue */
2317 @REQ(send_hardware_message)
2318 user_handle_t win; /* window handle */
2319 hw_input_t input; /* input data */
2320 unsigned int flags; /* flags (see below) */
2321 @REPLY
2322 int wait; /* do we need to wait for a reply? */
2323 int prev_x; /* previous cursor position */
2324 int prev_y;
2325 int new_x; /* new cursor position */
2326 int new_y;
2327 VARARG(keystate,bytes); /* global state array for all the keys */
2328 @END
2329 #define SEND_HWMSG_INJECTED 0x01
2332 /* Get a message from the current queue */
2333 @REQ(get_message)
2334 unsigned int flags; /* PM_* flags */
2335 user_handle_t get_win; /* window handle to get */
2336 unsigned int get_first; /* first message code to get */
2337 unsigned int get_last; /* last message code to get */
2338 unsigned int hw_id; /* id of the previous hardware message (or 0) */
2339 unsigned int wake_mask; /* wakeup bits mask */
2340 unsigned int changed_mask; /* changed bits mask */
2341 @REPLY
2342 user_handle_t win; /* window handle */
2343 unsigned int msg; /* message code */
2344 lparam_t wparam; /* parameters */
2345 lparam_t lparam; /* parameters */
2346 int type; /* message type */
2347 int x; /* message x position */
2348 int y; /* message y position */
2349 unsigned int time; /* message time */
2350 unsigned int active_hooks; /* active hooks bitmap */
2351 data_size_t total; /* total size of extra data */
2352 VARARG(data,message_data); /* message data for sent messages */
2353 @END
2356 /* Reply to a sent message */
2357 @REQ(reply_message)
2358 int remove; /* should we remove the message? */
2359 lparam_t result; /* message result */
2360 VARARG(data,bytes); /* message data for sent messages */
2361 @END
2364 /* Accept the current hardware message */
2365 @REQ(accept_hardware_message)
2366 unsigned int hw_id; /* id of the hardware message */
2367 int remove; /* should we remove the message? */
2368 @END
2371 /* Retrieve the reply for the last message sent */
2372 @REQ(get_message_reply)
2373 int cancel; /* cancel message if not ready? */
2374 @REPLY
2375 lparam_t result; /* message result */
2376 VARARG(data,bytes); /* message data for sent messages */
2377 @END
2380 /* Set a window timer */
2381 @REQ(set_win_timer)
2382 user_handle_t win; /* window handle */
2383 unsigned int msg; /* message to post */
2384 unsigned int rate; /* timer rate in ms */
2385 lparam_t id; /* timer id */
2386 lparam_t lparam; /* message lparam (callback proc) */
2387 @REPLY
2388 lparam_t id; /* timer id */
2389 @END
2392 /* Kill a window timer */
2393 @REQ(kill_win_timer)
2394 user_handle_t win; /* window handle */
2395 lparam_t id; /* timer id */
2396 unsigned int msg; /* message to post */
2397 @END
2400 /* check if the thread owning the window is hung */
2401 @REQ(is_window_hung)
2402 user_handle_t win; /* window handle */
2403 @REPLY
2404 int is_hung;
2405 @END
2408 /* Retrieve info about a serial port */
2409 @REQ(get_serial_info)
2410 obj_handle_t handle; /* handle to comm port */
2411 int flags;
2412 @REPLY
2413 unsigned int eventmask;
2414 unsigned int cookie;
2415 unsigned int pending_write;
2416 @END
2419 /* Set info about a serial port */
2420 @REQ(set_serial_info)
2421 obj_handle_t handle; /* handle to comm port */
2422 int flags; /* bitmask to set values (see below) */
2423 @END
2424 #define SERIALINFO_PENDING_WRITE 0x04
2425 #define SERIALINFO_PENDING_WAIT 0x08
2428 /* Create an async I/O */
2429 @REQ(register_async)
2430 int type; /* type of queue to look after */
2431 async_data_t async; /* async I/O parameters */
2432 int count; /* count - usually # of bytes to be read/written */
2433 @END
2434 #define ASYNC_TYPE_READ 0x01
2435 #define ASYNC_TYPE_WRITE 0x02
2436 #define ASYNC_TYPE_WAIT 0x03
2439 /* Cancel all async op on a fd */
2440 @REQ(cancel_async)
2441 obj_handle_t handle; /* handle to comm port, socket or file */
2442 client_ptr_t iosb; /* I/O status block (NULL=all) */
2443 int only_thread; /* cancel matching this thread */
2444 @END
2447 /* Retrieve results of an async */
2448 @REQ(get_async_result)
2449 client_ptr_t user_arg; /* user arg used to identify async */
2450 @REPLY
2451 data_size_t size; /* result size (input or output depending on the operation) */
2452 VARARG(out_data,bytes); /* iosb output data */
2453 @END
2456 /* Perform a read on a file object */
2457 @REQ(read)
2458 async_data_t async; /* async I/O parameters */
2459 file_pos_t pos; /* read position */
2460 @REPLY
2461 obj_handle_t wait; /* handle to wait on for blocking read */
2462 unsigned int options; /* device open options */
2463 VARARG(data,bytes); /* read data */
2464 @END
2467 /* Perform a write on a file object */
2468 @REQ(write)
2469 async_data_t async; /* async I/O parameters */
2470 file_pos_t pos; /* write position */
2471 VARARG(data,bytes); /* write data */
2472 @REPLY
2473 obj_handle_t wait; /* handle to wait on for blocking write */
2474 unsigned int options; /* device open options */
2475 data_size_t size; /* size written */
2476 @END
2479 /* Perform an ioctl on a file */
2480 @REQ(ioctl)
2481 ioctl_code_t code; /* ioctl code */
2482 async_data_t async; /* async I/O parameters */
2483 VARARG(in_data,bytes); /* ioctl input data */
2484 @REPLY
2485 obj_handle_t wait; /* handle to wait on for blocking ioctl */
2486 unsigned int options; /* device open options */
2487 VARARG(out_data,bytes); /* ioctl output data */
2488 @END
2491 /* Store results of an async irp */
2492 @REQ(set_irp_result)
2493 obj_handle_t handle; /* handle to the irp */
2494 unsigned int status; /* status of the irp */
2495 data_size_t size; /* result size (input or output depending on the operation) */
2496 VARARG(data,bytes); /* output data of the irp */
2497 @END
2500 /* Create a named pipe */
2501 @REQ(create_named_pipe)
2502 unsigned int access;
2503 unsigned int options;
2504 unsigned int sharing;
2505 unsigned int maxinstances;
2506 unsigned int outsize;
2507 unsigned int insize;
2508 timeout_t timeout;
2509 unsigned int flags;
2510 VARARG(objattr,object_attributes); /* object attributes */
2511 @REPLY
2512 obj_handle_t handle; /* handle to the pipe */
2513 @END
2515 /* flags in create_named_pipe and get_named_pipe_info */
2516 #define NAMED_PIPE_MESSAGE_STREAM_WRITE 0x0001
2517 #define NAMED_PIPE_MESSAGE_STREAM_READ 0x0002
2518 #define NAMED_PIPE_NONBLOCKING_MODE 0x0004
2519 #define NAMED_PIPE_SERVER_END 0x8000
2521 /* Set named pipe information by handle */
2522 @REQ(set_named_pipe_info)
2523 obj_handle_t handle;
2524 unsigned int flags;
2525 @END
2527 /* Create a window */
2528 @REQ(create_window)
2529 user_handle_t parent; /* parent window */
2530 user_handle_t owner; /* owner window */
2531 atom_t atom; /* class atom */
2532 mod_handle_t instance; /* module instance */
2533 int dpi; /* system DPI */
2534 int awareness; /* thread DPI awareness */
2535 VARARG(class,unicode_str); /* class name */
2536 @REPLY
2537 user_handle_t handle; /* created window */
2538 user_handle_t parent; /* full handle of parent */
2539 user_handle_t owner; /* full handle of owner */
2540 int extra; /* number of extra bytes */
2541 client_ptr_t class_ptr; /* pointer to class in client address space */
2542 int dpi; /* window DPI if not per-monitor aware */
2543 int awareness; /* window DPI awareness */
2544 @END
2547 /* Destroy a window */
2548 @REQ(destroy_window)
2549 user_handle_t handle; /* handle to the window */
2550 @END
2553 /* Retrieve the desktop window for the current thread */
2554 @REQ(get_desktop_window)
2555 int force; /* force creation if it doesn't exist */
2556 @REPLY
2557 user_handle_t top_window; /* handle to the desktop window */
2558 user_handle_t msg_window; /* handle to the top-level HWND_MESSAGE parent */
2559 @END
2562 /* Set a window owner */
2563 @REQ(set_window_owner)
2564 user_handle_t handle; /* handle to the window */
2565 user_handle_t owner; /* new owner */
2566 @REPLY
2567 user_handle_t full_owner; /* full handle of new owner */
2568 user_handle_t prev_owner; /* full handle of previous owner */
2569 @END
2572 /* Get information from a window handle */
2573 @REQ(get_window_info)
2574 user_handle_t handle; /* handle to the window */
2575 @REPLY
2576 user_handle_t full_handle; /* full 32-bit handle */
2577 user_handle_t last_active; /* last active popup */
2578 process_id_t pid; /* process owning the window */
2579 thread_id_t tid; /* thread owning the window */
2580 atom_t atom; /* class atom */
2581 int is_unicode; /* ANSI or unicode */
2582 int dpi; /* window DPI */
2583 int awareness; /* DPI awareness */
2584 @END
2587 /* Set some information in a window */
2588 @REQ(set_window_info)
2589 unsigned short flags; /* flags for fields to set (see below) */
2590 short int is_unicode; /* ANSI or unicode */
2591 user_handle_t handle; /* handle to the window */
2592 unsigned int style; /* window style */
2593 unsigned int ex_style; /* window extended style */
2594 unsigned int id; /* window id */
2595 mod_handle_t instance; /* creator instance */
2596 lparam_t user_data; /* user-specific data */
2597 int extra_offset; /* offset to set in extra bytes */
2598 data_size_t extra_size; /* size to set in extra bytes */
2599 lparam_t extra_value; /* value to set in extra bytes */
2600 @REPLY
2601 unsigned int old_style; /* old window style */
2602 unsigned int old_ex_style; /* old window extended style */
2603 mod_handle_t old_instance; /* old creator instance */
2604 lparam_t old_user_data; /* old user-specific data */
2605 lparam_t old_extra_value; /* old value in extra bytes */
2606 unsigned int old_id; /* old window id */
2607 @END
2608 #define SET_WIN_STYLE 0x01
2609 #define SET_WIN_EXSTYLE 0x02
2610 #define SET_WIN_ID 0x04
2611 #define SET_WIN_INSTANCE 0x08
2612 #define SET_WIN_USERDATA 0x10
2613 #define SET_WIN_EXTRA 0x20
2614 #define SET_WIN_UNICODE 0x40
2617 /* Set the parent of a window */
2618 @REQ(set_parent)
2619 user_handle_t handle; /* handle to the window */
2620 user_handle_t parent; /* handle to the parent */
2621 @REPLY
2622 user_handle_t old_parent; /* old parent window */
2623 user_handle_t full_parent; /* full handle of new parent */
2624 int dpi; /* new window DPI if not per-monitor aware */
2625 int awareness; /* new DPI awareness */
2626 @END
2629 /* Get a list of the window parents, up to the root of the tree */
2630 @REQ(get_window_parents)
2631 user_handle_t handle; /* handle to the window */
2632 @REPLY
2633 int count; /* total count of parents */
2634 VARARG(parents,user_handles); /* parent handles */
2635 @END
2638 /* Get a list of the window children */
2639 @REQ(get_window_children)
2640 obj_handle_t desktop; /* handle to desktop */
2641 user_handle_t parent; /* parent window */
2642 atom_t atom; /* class atom for the listed children */
2643 thread_id_t tid; /* thread owning the listed children */
2644 VARARG(class,unicode_str); /* class name */
2645 @REPLY
2646 int count; /* total count of children */
2647 VARARG(children,user_handles); /* children handles */
2648 @END
2651 /* Get a list of the window children that contain a given point */
2652 @REQ(get_window_children_from_point)
2653 user_handle_t parent; /* parent window */
2654 int x; /* point in parent coordinates */
2655 int y;
2656 int dpi; /* dpi for the point coordinates */
2657 @REPLY
2658 int count; /* total count of children */
2659 VARARG(children,user_handles); /* children handles */
2660 @END
2663 /* Get window tree information from a window handle */
2664 @REQ(get_window_tree)
2665 user_handle_t handle; /* handle to the window */
2666 @REPLY
2667 user_handle_t parent; /* parent window */
2668 user_handle_t owner; /* owner window */
2669 user_handle_t next_sibling; /* next sibling in Z-order */
2670 user_handle_t prev_sibling; /* prev sibling in Z-order */
2671 user_handle_t first_sibling; /* first sibling in Z-order */
2672 user_handle_t last_sibling; /* last sibling in Z-order */
2673 user_handle_t first_child; /* first child */
2674 user_handle_t last_child; /* last child */
2675 @END
2677 /* Set the position and Z order of a window */
2678 @REQ(set_window_pos)
2679 unsigned short swp_flags; /* SWP_* flags */
2680 unsigned short paint_flags; /* paint flags (see below) */
2681 user_handle_t handle; /* handle to the window */
2682 user_handle_t previous; /* previous window in Z order */
2683 rectangle_t window; /* window rectangle (in parent coords) */
2684 rectangle_t client; /* client rectangle (in parent coords) */
2685 VARARG(valid,rectangles); /* valid rectangles from WM_NCCALCSIZE (in parent coords) */
2686 @REPLY
2687 unsigned int new_style; /* new window style */
2688 unsigned int new_ex_style; /* new window extended style */
2689 user_handle_t surface_win; /* parent window that holds the surface */
2690 int needs_update; /* whether the surface region needs an update */
2691 @END
2692 #define SET_WINPOS_PAINT_SURFACE 0x01 /* window has a paintable surface */
2693 #define SET_WINPOS_PIXEL_FORMAT 0x02 /* window has a custom pixel format */
2695 /* Get the window and client rectangles of a window */
2696 @REQ(get_window_rectangles)
2697 user_handle_t handle; /* handle to the window */
2698 int relative; /* coords relative to (see below) */
2699 int dpi; /* DPI to map to, or zero for per-monitor DPI */
2700 @REPLY
2701 rectangle_t window; /* window rectangle */
2702 rectangle_t client; /* client rectangle */
2703 @END
2704 enum coords_relative
2706 COORDS_CLIENT, /* relative to client area */
2707 COORDS_WINDOW, /* relative to whole window area */
2708 COORDS_PARENT, /* relative to parent's client area */
2709 COORDS_SCREEN /* relative to screen origin */
2713 /* Get the window text */
2714 @REQ(get_window_text)
2715 user_handle_t handle; /* handle to the window */
2716 @REPLY
2717 data_size_t length; /* total length in WCHARs */
2718 VARARG(text,unicode_str); /* window text */
2719 @END
2722 /* Set the window text */
2723 @REQ(set_window_text)
2724 user_handle_t handle; /* handle to the window */
2725 VARARG(text,unicode_str); /* window text */
2726 @END
2729 /* Get the coordinates offset between two windows */
2730 @REQ(get_windows_offset)
2731 user_handle_t from; /* handle to the first window */
2732 user_handle_t to; /* handle to the second window */
2733 int dpi; /* DPI to map to, or zero for per-monitor DPI */
2734 @REPLY
2735 int x; /* x coordinate offset */
2736 int y; /* y coordinate offset */
2737 int mirror; /* whether to mirror the x coordinate */
2738 @END
2741 /* Get the visible region of a window */
2742 @REQ(get_visible_region)
2743 user_handle_t window; /* handle to the window */
2744 unsigned int flags; /* DCX flags */
2745 @REPLY
2746 user_handle_t top_win; /* top window to clip against */
2747 rectangle_t top_rect; /* top window visible rect with screen coords */
2748 rectangle_t win_rect; /* window rect in screen coords */
2749 unsigned int paint_flags; /* paint flags (from SET_WINPOS_* flags) */
2750 data_size_t total_size; /* total size of the resulting region */
2751 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2752 @END
2755 /* Get the visible surface region of a window */
2756 @REQ(get_surface_region)
2757 user_handle_t window; /* handle to the window */
2758 @REPLY
2759 rectangle_t visible_rect; /* window visible rect in screen coords */
2760 data_size_t total_size; /* total size of the resulting region */
2761 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2762 @END
2765 /* Get the window region */
2766 @REQ(get_window_region)
2767 user_handle_t window; /* handle to the window */
2768 @REPLY
2769 data_size_t total_size; /* total size of the resulting region */
2770 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2771 @END
2774 /* Set the window region */
2775 @REQ(set_window_region)
2776 user_handle_t window; /* handle to the window */
2777 int redraw; /* redraw the window? */
2778 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2779 @END
2782 /* Get the window update region */
2783 @REQ(get_update_region)
2784 user_handle_t window; /* handle to the window */
2785 user_handle_t from_child; /* child to start searching from */
2786 unsigned int flags; /* update flags (see below) */
2787 @REPLY
2788 user_handle_t child; /* child to repaint (or window itself) */
2789 unsigned int flags; /* resulting update flags (see below) */
2790 data_size_t total_size; /* total size of the resulting region */
2791 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2792 @END
2793 #define UPDATE_NONCLIENT 0x001 /* get region for repainting non-client area */
2794 #define UPDATE_ERASE 0x002 /* get region for erasing client area */
2795 #define UPDATE_PAINT 0x004 /* get region for painting client area */
2796 #define UPDATE_INTERNALPAINT 0x008 /* get region if internal paint is pending */
2797 #define UPDATE_ALLCHILDREN 0x010 /* force repaint of all children */
2798 #define UPDATE_NOCHILDREN 0x020 /* don't try to repaint any children */
2799 #define UPDATE_NOREGION 0x040 /* don't return a region, only the flags */
2800 #define UPDATE_DELAYED_ERASE 0x080 /* still needs erase after BeginPaint */
2801 #define UPDATE_CLIPCHILDREN 0x100 /* remove clipped children from the update region */
2804 /* Update the z order of a window so that a given rectangle is fully visible */
2805 @REQ(update_window_zorder)
2806 user_handle_t window; /* handle to the window */
2807 rectangle_t rect; /* rectangle that must be visible (in client coords) */
2808 @END
2811 /* Mark parts of a window as needing a redraw */
2812 @REQ(redraw_window)
2813 user_handle_t window; /* handle to the window */
2814 unsigned int flags; /* RDW_* flags */
2815 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2816 @END
2819 /* Set a window property */
2820 @REQ(set_window_property)
2821 user_handle_t window; /* handle to the window */
2822 lparam_t data; /* data to store */
2823 atom_t atom; /* property atom (if no name specified) */
2824 VARARG(name,unicode_str); /* property name */
2825 @END
2828 /* Remove a window property */
2829 @REQ(remove_window_property)
2830 user_handle_t window; /* handle to the window */
2831 atom_t atom; /* property atom (if no name specified) */
2832 VARARG(name,unicode_str); /* property name */
2833 @REPLY
2834 lparam_t data; /* data stored in property */
2835 @END
2838 /* Get a window property */
2839 @REQ(get_window_property)
2840 user_handle_t window; /* handle to the window */
2841 atom_t atom; /* property atom (if no name specified) */
2842 VARARG(name,unicode_str); /* property name */
2843 @REPLY
2844 lparam_t data; /* data stored in property */
2845 @END
2848 /* Get the list of properties of a window */
2849 @REQ(get_window_properties)
2850 user_handle_t window; /* handle to the window */
2851 @REPLY
2852 int total; /* total number of properties */
2853 VARARG(props,properties); /* list of properties */
2854 @END
2857 /* Create a window station */
2858 @REQ(create_winstation)
2859 unsigned int flags; /* window station flags */
2860 unsigned int access; /* wanted access rights */
2861 unsigned int attributes; /* object attributes */
2862 obj_handle_t rootdir; /* root directory */
2863 VARARG(name,unicode_str); /* object name */
2864 @REPLY
2865 obj_handle_t handle; /* handle to the window station */
2866 @END
2869 /* Open a handle to a window station */
2870 @REQ(open_winstation)
2871 unsigned int access; /* wanted access rights */
2872 unsigned int attributes; /* object attributes */
2873 obj_handle_t rootdir; /* root directory */
2874 VARARG(name,unicode_str); /* object name */
2875 @REPLY
2876 obj_handle_t handle; /* handle to the window station */
2877 @END
2880 /* Close a window station */
2881 @REQ(close_winstation)
2882 obj_handle_t handle; /* handle to the window station */
2883 @END
2886 /* Get the process current window station */
2887 @REQ(get_process_winstation)
2888 @REPLY
2889 obj_handle_t handle; /* handle to the window station */
2890 @END
2893 /* Set the process current window station */
2894 @REQ(set_process_winstation)
2895 obj_handle_t handle; /* handle to the window station */
2896 @END
2899 /* Enumerate window stations */
2900 @REQ(enum_winstation)
2901 unsigned int index; /* current index */
2902 @REPLY
2903 unsigned int next; /* next index */
2904 VARARG(name,unicode_str); /* window station name */
2905 @END
2908 /* Create a desktop */
2909 @REQ(create_desktop)
2910 unsigned int flags; /* desktop flags */
2911 unsigned int access; /* wanted access rights */
2912 unsigned int attributes; /* object attributes */
2913 VARARG(name,unicode_str); /* object name */
2914 @REPLY
2915 obj_handle_t handle; /* handle to the desktop */
2916 @END
2919 /* Open a handle to a desktop */
2920 @REQ(open_desktop)
2921 obj_handle_t winsta; /* window station to open (null allowed) */
2922 unsigned int flags; /* desktop flags */
2923 unsigned int access; /* wanted access rights */
2924 unsigned int attributes; /* object attributes */
2925 VARARG(name,unicode_str); /* object name */
2926 @REPLY
2927 obj_handle_t handle; /* handle to the desktop */
2928 @END
2931 /* Open a handle to current input desktop */
2932 @REQ(open_input_desktop)
2933 unsigned int flags; /* desktop flags */
2934 unsigned int access; /* wanted access rights */
2935 unsigned int attributes; /* object attributes */
2936 @REPLY
2937 obj_handle_t handle; /* handle to the desktop */
2938 @END
2941 /* Close a desktop */
2942 @REQ(close_desktop)
2943 obj_handle_t handle; /* handle to the desktop */
2944 @END
2947 /* Get the thread current desktop */
2948 @REQ(get_thread_desktop)
2949 thread_id_t tid; /* thread id */
2950 @REPLY
2951 obj_handle_t handle; /* handle to the desktop */
2952 @END
2955 /* Set the thread current desktop */
2956 @REQ(set_thread_desktop)
2957 obj_handle_t handle; /* handle to the desktop */
2958 @END
2961 /* Enumerate desktops */
2962 @REQ(enum_desktop)
2963 obj_handle_t winstation; /* handle to the window station */
2964 unsigned int index; /* current index */
2965 @REPLY
2966 unsigned int next; /* next index */
2967 VARARG(name,unicode_str); /* window station name */
2968 @END
2971 /* Get/set information about a user object (window station or desktop) */
2972 @REQ(set_user_object_info)
2973 obj_handle_t handle; /* handle to the object */
2974 unsigned int flags; /* information to set/get */
2975 unsigned int obj_flags; /* new object flags */
2976 @REPLY
2977 int is_desktop; /* is object a desktop? */
2978 unsigned int old_obj_flags; /* old object flags */
2979 VARARG(name,unicode_str); /* object name */
2980 @END
2981 #define SET_USER_OBJECT_SET_FLAGS 1
2982 #define SET_USER_OBJECT_GET_FULL_NAME 2
2985 /* Register a hotkey */
2986 @REQ(register_hotkey)
2987 user_handle_t window; /* handle to the window */
2988 int id; /* hotkey identifier */
2989 unsigned int flags; /* modifier keys */
2990 unsigned int vkey; /* virtual key code */
2991 @REPLY
2992 int replaced; /* did we replace an existing hotkey? */
2993 unsigned int flags; /* flags of replaced hotkey */
2994 unsigned int vkey; /* virtual key code of replaced hotkey */
2995 @END
2998 /* Unregister a hotkey */
2999 @REQ(unregister_hotkey)
3000 user_handle_t window; /* handle to the window */
3001 int id; /* hotkey identifier */
3002 @REPLY
3003 unsigned int flags; /* flags of removed hotkey */
3004 unsigned int vkey; /* virtual key code of removed hotkey */
3005 @END
3008 /* Attach (or detach) thread inputs */
3009 @REQ(attach_thread_input)
3010 thread_id_t tid_from; /* thread to be attached */
3011 thread_id_t tid_to; /* thread to which tid_from should be attached */
3012 int attach; /* is it an attach? */
3013 @END
3016 /* Get input data for a given thread */
3017 @REQ(get_thread_input)
3018 thread_id_t tid; /* id of thread */
3019 @REPLY
3020 user_handle_t focus; /* handle to the focus window */
3021 user_handle_t capture; /* handle to the capture window */
3022 user_handle_t active; /* handle to the active window */
3023 user_handle_t foreground; /* handle to the global foreground window */
3024 user_handle_t menu_owner; /* handle to the menu owner */
3025 user_handle_t move_size; /* handle to the moving/resizing window */
3026 user_handle_t caret; /* handle to the caret window */
3027 user_handle_t cursor; /* handle to the cursor */
3028 int show_count; /* cursor show count */
3029 rectangle_t rect; /* caret rectangle */
3030 @END
3033 /* Get the time of the last input event */
3034 @REQ(get_last_input_time)
3035 @REPLY
3036 unsigned int time;
3037 @END
3040 /* Retrieve queue keyboard state for a given thread */
3041 @REQ(get_key_state)
3042 thread_id_t tid; /* id of thread */
3043 int key; /* optional key code or -1 */
3044 @REPLY
3045 unsigned char state; /* state of specified key */
3046 VARARG(keystate,bytes); /* state array for all the keys */
3047 @END
3049 /* Set queue keyboard state for a given thread */
3050 @REQ(set_key_state)
3051 thread_id_t tid; /* id of thread */
3052 int async; /* whether to change the async state too */
3053 VARARG(keystate,bytes); /* state array for all the keys */
3054 @END
3056 /* Set the system foreground window */
3057 @REQ(set_foreground_window)
3058 user_handle_t handle; /* handle to the foreground window */
3059 @REPLY
3060 user_handle_t previous; /* handle to the previous foreground window */
3061 int send_msg_old; /* whether we have to send a msg to the old window */
3062 int send_msg_new; /* whether we have to send a msg to the new window */
3063 @END
3065 /* Set the current thread focus window */
3066 @REQ(set_focus_window)
3067 user_handle_t handle; /* handle to the focus window */
3068 @REPLY
3069 user_handle_t previous; /* handle to the previous focus window */
3070 @END
3072 /* Set the current thread active window */
3073 @REQ(set_active_window)
3074 user_handle_t handle; /* handle to the active window */
3075 @REPLY
3076 user_handle_t previous; /* handle to the previous active window */
3077 @END
3079 /* Set the current thread capture window */
3080 @REQ(set_capture_window)
3081 user_handle_t handle; /* handle to the capture window */
3082 unsigned int flags; /* capture flags (see below) */
3083 @REPLY
3084 user_handle_t previous; /* handle to the previous capture window */
3085 user_handle_t full_handle; /* full 32-bit handle of new capture window */
3086 @END
3087 #define CAPTURE_MENU 0x01 /* capture is for a menu */
3088 #define CAPTURE_MOVESIZE 0x02 /* capture is for moving/resizing */
3091 /* Set the current thread caret window */
3092 @REQ(set_caret_window)
3093 user_handle_t handle; /* handle to the caret window */
3094 int width; /* caret width */
3095 int height; /* caret height */
3096 @REPLY
3097 user_handle_t previous; /* handle to the previous 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
3104 /* Set the current thread caret information */
3105 @REQ(set_caret_info)
3106 unsigned int flags; /* caret flags (see below) */
3107 user_handle_t handle; /* handle to the caret window */
3108 int x; /* caret x position */
3109 int y; /* caret y position */
3110 int hide; /* increment for hide count (can be negative to show it) */
3111 int state; /* caret state (see below) */
3112 @REPLY
3113 user_handle_t full_handle; /* handle to the current caret window */
3114 rectangle_t old_rect; /* previous caret rectangle */
3115 int old_hide; /* previous hide count */
3116 int old_state; /* previous caret state (1=on, 0=off) */
3117 @END
3118 #define SET_CARET_POS 0x01 /* set the caret position from x,y */
3119 #define SET_CARET_HIDE 0x02 /* increment the caret hide count */
3120 #define SET_CARET_STATE 0x04 /* set the caret on/off state */
3121 enum caret_state
3123 CARET_STATE_OFF, /* off */
3124 CARET_STATE_ON, /* on */
3125 CARET_STATE_TOGGLE, /* toggle current state */
3126 CARET_STATE_ON_IF_MOVED /* on if the position differs, unchanged otherwise */
3130 /* Set a window hook */
3131 @REQ(set_hook)
3132 int id; /* id of the hook */
3133 process_id_t pid; /* id of process to set the hook into */
3134 thread_id_t tid; /* id of thread to set the hook into */
3135 int event_min;
3136 int event_max;
3137 client_ptr_t proc; /* hook procedure */
3138 int flags;
3139 int unicode; /* is it a unicode hook? */
3140 VARARG(module,unicode_str); /* module name */
3141 @REPLY
3142 user_handle_t handle; /* handle to the hook */
3143 unsigned int active_hooks; /* active hooks bitmap */
3144 @END
3147 /* Remove a window hook */
3148 @REQ(remove_hook)
3149 user_handle_t handle; /* handle to the hook */
3150 client_ptr_t proc; /* hook procedure if handle is 0 */
3151 int id; /* id of the hook if handle is 0 */
3152 @REPLY
3153 unsigned int active_hooks; /* active hooks bitmap */
3154 @END
3157 /* Start calling a hook chain */
3158 @REQ(start_hook_chain)
3159 int id; /* id of the hook */
3160 int event; /* signalled event */
3161 user_handle_t window; /* handle to the event window */
3162 int object_id; /* object id for out of context winevent */
3163 int child_id; /* child id for out of context winevent */
3164 @REPLY
3165 user_handle_t handle; /* handle to the next hook */
3166 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
3167 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
3168 int unicode; /* is it a unicode hook? */
3169 client_ptr_t proc; /* hook procedure */
3170 unsigned int active_hooks; /* active hooks bitmap */
3171 VARARG(module,unicode_str); /* module name */
3172 @END
3175 /* Finished calling a hook chain */
3176 @REQ(finish_hook_chain)
3177 int id; /* id of the hook */
3178 @END
3181 /* Get the hook information */
3182 @REQ(get_hook_info)
3183 user_handle_t handle; /* handle to the current hook */
3184 int get_next; /* do we want info about current or next hook? */
3185 int event; /* signalled event */
3186 user_handle_t window; /* handle to the event window */
3187 int object_id; /* object id for out of context winevent */
3188 int child_id; /* child id for out of context winevent */
3189 @REPLY
3190 user_handle_t handle; /* handle to the hook */
3191 int id; /* id of the hook */
3192 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
3193 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
3194 client_ptr_t proc; /* hook procedure */
3195 int unicode; /* is it a unicode hook? */
3196 VARARG(module,unicode_str); /* module name */
3197 @END
3200 /* Create a window class */
3201 @REQ(create_class)
3202 int local; /* is it a local class? */
3203 atom_t atom; /* class atom */
3204 unsigned int style; /* class style */
3205 mod_handle_t instance; /* module instance */
3206 int extra; /* number of extra class bytes */
3207 int win_extra; /* number of window extra bytes */
3208 client_ptr_t client_ptr; /* pointer to class in client address space */
3209 data_size_t name_offset; /* base class name offset for specified atom */
3210 VARARG(name,unicode_str); /* class name */
3211 @REPLY
3212 atom_t atom; /* resulting class atom */
3213 @END
3216 /* Destroy a window class */
3217 @REQ(destroy_class)
3218 atom_t atom; /* class atom */
3219 mod_handle_t instance; /* module instance */
3220 VARARG(name,unicode_str); /* class name */
3221 @REPLY
3222 client_ptr_t client_ptr; /* pointer to class in client address space */
3223 @END
3226 /* Set some information in a class */
3227 @REQ(set_class_info)
3228 user_handle_t window; /* handle to the window */
3229 unsigned int flags; /* flags for info to set (see below) */
3230 atom_t atom; /* class atom */
3231 unsigned int style; /* class style */
3232 int win_extra; /* number of window extra bytes */
3233 mod_handle_t instance; /* module instance */
3234 int extra_offset; /* offset to set in extra bytes */
3235 data_size_t extra_size; /* size to set in extra bytes */
3236 lparam_t extra_value; /* value to set in extra bytes */
3237 @REPLY
3238 atom_t old_atom; /* previous class atom */
3239 atom_t base_atom; /* base class atom */
3240 mod_handle_t old_instance; /* previous module instance */
3241 lparam_t old_extra_value; /* old value in extra bytes */
3242 unsigned int old_style; /* previous class style */
3243 int old_extra; /* previous number of class extra bytes */
3244 int old_win_extra; /* previous number of window extra bytes */
3245 @END
3246 #define SET_CLASS_ATOM 0x0001
3247 #define SET_CLASS_STYLE 0x0002
3248 #define SET_CLASS_WINEXTRA 0x0004
3249 #define SET_CLASS_INSTANCE 0x0008
3250 #define SET_CLASS_EXTRA 0x0010
3253 /* Open the clipboard */
3254 @REQ(open_clipboard)
3255 user_handle_t window; /* clipboard window */
3256 @REPLY
3257 user_handle_t owner; /* current clipboard owner */
3258 @END
3261 /* Close the clipboard */
3262 @REQ(close_clipboard)
3263 @REPLY
3264 user_handle_t viewer; /* first clipboard viewer */
3265 user_handle_t owner; /* current clipboard owner */
3266 @END
3269 /* Empty the clipboard and grab ownership */
3270 @REQ(empty_clipboard)
3271 @END
3274 /* Add a data format to the clipboard */
3275 @REQ(set_clipboard_data)
3276 unsigned int format; /* clipboard format of the data */
3277 unsigned int lcid; /* locale id to use for synthesizing text formats */
3278 VARARG(data,bytes); /* data contents */
3279 @REPLY
3280 unsigned int seqno; /* sequence number for the set data */
3281 @END
3284 /* Fetch a data format from the clipboard */
3285 @REQ(get_clipboard_data)
3286 unsigned int format; /* clipboard format of the data */
3287 int render; /* will we try to render it if missing? */
3288 int cached; /* do we already have it in the client-side cache? */
3289 unsigned int seqno; /* sequence number for the data in the cache */
3290 @REPLY
3291 unsigned int from; /* for synthesized data, format to generate it from */
3292 user_handle_t owner; /* clipboard owner for delayed-rendered formats */
3293 unsigned int seqno; /* sequence number for the originally set data */
3294 data_size_t total; /* total data size */
3295 VARARG(data,bytes); /* data contents */
3296 @END
3299 /* Retrieve a list of available formats */
3300 @REQ(get_clipboard_formats)
3301 unsigned int format; /* specific format to query, return all if 0 */
3302 @REPLY
3303 unsigned int count; /* count of available formats */
3304 VARARG(formats,uints); /* array of available formats */
3305 @END
3308 /* Retrieve the next available format */
3309 @REQ(enum_clipboard_formats)
3310 unsigned int previous; /* previous format, or first if 0 */
3311 @REPLY
3312 unsigned int format; /* next format */
3313 @END
3316 /* Release ownership of the clipboard */
3317 @REQ(release_clipboard)
3318 user_handle_t owner; /* clipboard owner to release */
3319 @REPLY
3320 user_handle_t viewer; /* first clipboard viewer */
3321 user_handle_t owner; /* current clipboard owner */
3322 @END
3325 /* Get clipboard information */
3326 @REQ(get_clipboard_info)
3327 @REPLY
3328 user_handle_t window; /* clipboard window */
3329 user_handle_t owner; /* clipboard owner */
3330 user_handle_t viewer; /* clipboard viewer */
3331 unsigned int seqno; /* current sequence number */
3332 @END
3335 /* Set the clipboard viewer window */
3336 @REQ(set_clipboard_viewer)
3337 user_handle_t viewer; /* clipboard viewer */
3338 user_handle_t previous; /* if non-zero, check that this was the previous viewer */
3339 @REPLY
3340 user_handle_t old_viewer; /* previous clipboard viewer */
3341 user_handle_t owner; /* clipboard owner */
3342 @END
3345 /* Add a clipboard listener window */
3346 @REQ(add_clipboard_listener)
3347 user_handle_t window; /* clipboard listener window */
3348 @END
3351 /* Remove a clipboard listener window */
3352 @REQ(remove_clipboard_listener)
3353 user_handle_t window; /* clipboard listener window */
3354 @END
3357 /* Open a security token */
3358 @REQ(open_token)
3359 obj_handle_t handle; /* handle to the thread or process */
3360 unsigned int access; /* access rights to the new token */
3361 unsigned int attributes;/* object attributes */
3362 unsigned int flags; /* flags (see below) */
3363 @REPLY
3364 obj_handle_t token; /* handle to the token */
3365 @END
3366 #define OPEN_TOKEN_THREAD 1
3367 #define OPEN_TOKEN_AS_SELF 2
3370 /* Set/get the global windows */
3371 @REQ(set_global_windows)
3372 unsigned int flags; /* flags for fields to set (see below) */
3373 user_handle_t shell_window; /* handle to the new shell window */
3374 user_handle_t shell_listview; /* handle to the new shell listview window */
3375 user_handle_t progman_window; /* handle to the new program manager window */
3376 user_handle_t taskman_window; /* handle to the new task manager window */
3377 @REPLY
3378 user_handle_t old_shell_window; /* handle to the shell window */
3379 user_handle_t old_shell_listview; /* handle to the shell listview window */
3380 user_handle_t old_progman_window; /* handle to the new program manager window */
3381 user_handle_t old_taskman_window; /* handle to the new task manager window */
3382 @END
3383 #define SET_GLOBAL_SHELL_WINDOWS 0x01 /* set both main shell and listview windows */
3384 #define SET_GLOBAL_PROGMAN_WINDOW 0x02
3385 #define SET_GLOBAL_TASKMAN_WINDOW 0x04
3387 /* Adjust the privileges held by a token */
3388 @REQ(adjust_token_privileges)
3389 obj_handle_t handle; /* handle to the token */
3390 int disable_all; /* disable all privileges? */
3391 int get_modified_state; /* get modified privileges? */
3392 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to enable/disable/remove */
3393 @REPLY
3394 unsigned int len; /* total length in bytes required to store token privileges */
3395 VARARG(privileges,LUID_AND_ATTRIBUTES); /* modified privileges */
3396 @END
3398 /* Retrieves the set of privileges held by or available to a token */
3399 @REQ(get_token_privileges)
3400 obj_handle_t handle; /* handle to the token */
3401 @REPLY
3402 unsigned int len; /* total length in bytes required to store token privileges */
3403 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
3404 @END
3406 /* Check the token has the required privileges */
3407 @REQ(check_token_privileges)
3408 obj_handle_t handle; /* handle to the token */
3409 int all_required; /* are all the privileges required for the check to succeed? */
3410 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to check */
3411 @REPLY
3412 int has_privileges; /* does the token have the required privileges? */
3413 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
3414 @END
3416 @REQ(duplicate_token)
3417 obj_handle_t handle; /* handle to the token to duplicate */
3418 unsigned int access; /* access rights to the new token */
3419 int primary; /* is the new token to be a primary one? */
3420 int impersonation_level; /* impersonation level of the new token */
3421 VARARG(objattr,object_attributes); /* object attributes */
3422 @REPLY
3423 obj_handle_t new_handle; /* duplicated handle */
3424 @END
3426 @REQ(access_check)
3427 obj_handle_t handle; /* handle to the token */
3428 unsigned int desired_access; /* desired access to the object */
3429 unsigned int mapping_read; /* mapping from generic read to specific rights */
3430 unsigned int mapping_write; /* mapping from generic write to specific rights */
3431 unsigned int mapping_execute; /* mapping from generic execute to specific rights */
3432 unsigned int mapping_all; /* mapping from generic all to specific rights */
3433 VARARG(sd,security_descriptor); /* security descriptor to check */
3434 @REPLY
3435 unsigned int access_granted; /* access rights actually granted */
3436 unsigned int access_status; /* was access granted? */
3437 unsigned int privileges_len; /* length needed to store privileges */
3438 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges used during access check */
3439 @END
3441 @REQ(get_token_sid)
3442 obj_handle_t handle; /* handle to the token */
3443 unsigned int which_sid; /* which SID to retrieve from the token */
3444 @REPLY
3445 data_size_t sid_len; /* length needed to store sid */
3446 VARARG(sid,SID); /* the sid specified by which_sid from the token */
3447 @END
3449 @REQ(get_token_groups)
3450 obj_handle_t handle; /* handle to the token */
3451 @REPLY
3452 data_size_t user_len; /* length needed to store user */
3453 VARARG(user,token_groups); /* groups the token's user belongs to */
3454 @END
3456 @REQ(get_token_default_dacl)
3457 obj_handle_t handle; /* handle to the token */
3458 @REPLY
3459 data_size_t acl_len; /* length needed to store access control list */
3460 VARARG(acl,ACL); /* access control list */
3461 @END
3463 @REQ(set_token_default_dacl)
3464 obj_handle_t handle; /* handle to the token */
3465 VARARG(acl,ACL); /* default dacl to set */
3466 @END
3468 @REQ(set_security_object)
3469 obj_handle_t handle; /* handle to the object */
3470 unsigned int security_info; /* which parts of security descriptor to set */
3471 VARARG(sd,security_descriptor); /* security descriptor to set */
3472 @END
3474 @REQ(get_security_object)
3475 obj_handle_t handle; /* handle to the object */
3476 unsigned int security_info; /* which parts of security descriptor to get */
3477 @REPLY
3478 unsigned int sd_len; /* buffer size needed for sd */
3479 VARARG(sd,security_descriptor); /* retrieved security descriptor */
3480 @END
3483 struct handle_info
3485 process_id_t owner;
3486 obj_handle_t handle;
3487 unsigned int access;
3490 /* Return a list of all opened handles */
3491 @REQ(get_system_handles)
3492 @REPLY
3493 unsigned int count; /* number of handles */
3494 VARARG(data,handle_infos); /* array of handle_infos */
3495 @END
3498 /* Create a mailslot */
3499 @REQ(create_mailslot)
3500 unsigned int access; /* wanted access rights */
3501 timeout_t read_timeout;
3502 unsigned int max_msgsize;
3503 VARARG(objattr,object_attributes); /* object attributes */
3504 @REPLY
3505 obj_handle_t handle; /* handle to the mailslot */
3506 @END
3509 /* Set mailslot information */
3510 @REQ(set_mailslot_info)
3511 obj_handle_t handle; /* handle to the mailslot */
3512 timeout_t read_timeout;
3513 unsigned int flags;
3514 @REPLY
3515 timeout_t read_timeout;
3516 unsigned int max_msgsize;
3517 @END
3518 #define MAILSLOT_SET_READ_TIMEOUT 1
3521 /* Create a directory object */
3522 @REQ(create_directory)
3523 unsigned int access; /* access flags */
3524 VARARG(objattr,object_attributes); /* object attributes */
3525 @REPLY
3526 obj_handle_t handle; /* handle to the directory */
3527 @END
3530 /* Open a directory object */
3531 @REQ(open_directory)
3532 unsigned int access; /* access flags */
3533 unsigned int attributes; /* object attributes */
3534 obj_handle_t rootdir; /* root directory */
3535 VARARG(directory_name,unicode_str); /* Directory name */
3536 @REPLY
3537 obj_handle_t handle; /* handle to the directory */
3538 @END
3541 /* Get a directory entry by index */
3542 @REQ(get_directory_entry)
3543 obj_handle_t handle; /* handle to the directory */
3544 unsigned int index; /* entry index */
3545 @REPLY
3546 data_size_t name_len; /* length of the entry name in bytes */
3547 VARARG(name,unicode_str,name_len); /* entry name */
3548 VARARG(type,unicode_str); /* entry type */
3549 @END
3552 /* Create a symbolic link object */
3553 @REQ(create_symlink)
3554 unsigned int access; /* access flags */
3555 VARARG(objattr,object_attributes); /* object attributes */
3556 VARARG(target_name,unicode_str); /* target name */
3557 @REPLY
3558 obj_handle_t handle; /* handle to the symlink */
3559 @END
3562 /* Open a symbolic link object */
3563 @REQ(open_symlink)
3564 unsigned int access; /* access flags */
3565 unsigned int attributes; /* object attributes */
3566 obj_handle_t rootdir; /* root directory */
3567 VARARG(name,unicode_str); /* symlink name */
3568 @REPLY
3569 obj_handle_t handle; /* handle to the symlink */
3570 @END
3573 /* Query a symbolic link object */
3574 @REQ(query_symlink)
3575 obj_handle_t handle; /* handle to the symlink */
3576 @REPLY
3577 data_size_t total; /* total needed size for name */
3578 VARARG(target_name,unicode_str); /* target name */
3579 @END
3582 /* Query basic object information */
3583 @REQ(get_object_info)
3584 obj_handle_t handle; /* handle to the object */
3585 @REPLY
3586 unsigned int access; /* granted access mask */
3587 unsigned int ref_count; /* object ref count */
3588 unsigned int handle_count; /* object handle count */
3589 data_size_t total; /* total needed size for name */
3590 VARARG(name,unicode_str); /* object name */
3591 @END
3594 /* Query object type name information */
3595 @REQ(get_object_type)
3596 obj_handle_t handle; /* handle to the object */
3597 @REPLY
3598 data_size_t total; /* needed size for type name */
3599 VARARG(type,unicode_str); /* type name */
3600 @END
3603 /* Unlink a named object */
3604 @REQ(unlink_object)
3605 obj_handle_t handle; /* handle to the object */
3606 @END
3609 /* Query the impersonation level of an impersonation token */
3610 @REQ(get_token_impersonation_level)
3611 obj_handle_t handle; /* handle to the object */
3612 @REPLY
3613 int impersonation_level; /* impersonation level of the impersonation token */
3614 @END
3616 /* Allocate a locally-unique identifier */
3617 @REQ(allocate_locally_unique_id)
3618 @REPLY
3619 luid_t luid;
3620 @END
3623 /* Create a device manager */
3624 @REQ(create_device_manager)
3625 unsigned int access; /* wanted access rights */
3626 unsigned int attributes; /* object attributes */
3627 @REPLY
3628 obj_handle_t handle; /* handle to the device */
3629 @END
3632 /* Create a device */
3633 @REQ(create_device)
3634 obj_handle_t rootdir; /* root directory */
3635 client_ptr_t user_ptr; /* opaque ptr for use by client */
3636 obj_handle_t manager; /* device manager */
3637 VARARG(name,unicode_str); /* object name */
3638 @END
3641 /* Delete a device */
3642 @REQ(delete_device)
3643 obj_handle_t manager; /* handle to the device manager */
3644 client_ptr_t device; /* pointer to the device */
3645 @END
3648 /* Retrieve the next pending device irp request */
3649 @REQ(get_next_device_request)
3650 obj_handle_t manager; /* handle to the device manager */
3651 obj_handle_t prev; /* handle to the previous irp */
3652 unsigned int status; /* status of the previous irp */
3653 client_ptr_t user_ptr; /* user pointer of the previous irp */
3654 @REPLY
3655 irp_params_t params; /* irp parameters */
3656 obj_handle_t next; /* handle to the next irp */
3657 thread_id_t client_tid; /* tid of thread calling irp */
3658 client_ptr_t client_thread; /* pointer to thread object of calling irp */
3659 data_size_t in_size; /* total needed input size */
3660 VARARG(next_data,bytes); /* input data of the next irp */
3661 @END
3664 /* Get kernel pointer from server object */
3665 @REQ(get_kernel_object_ptr)
3666 obj_handle_t manager; /* handle to the device manager */
3667 obj_handle_t handle; /* object handle */
3668 @REPLY
3669 client_ptr_t user_ptr; /* kernel object pointer */
3670 @END
3673 /* Associate kernel pointer with server object */
3674 @REQ(set_kernel_object_ptr)
3675 obj_handle_t manager; /* handle to the device manager */
3676 obj_handle_t handle; /* object handle */
3677 client_ptr_t user_ptr; /* kernel object pointer */
3678 @END
3681 /* Grab server object reference from kernel object pointer */
3682 @REQ(grab_kernel_object)
3683 obj_handle_t manager; /* handle to the device manager */
3684 client_ptr_t user_ptr; /* kernel object pointer */
3685 @END
3688 /* Release server object reference from kernel object pointer */
3689 @REQ(release_kernel_object)
3690 obj_handle_t manager; /* handle to the device manager */
3691 client_ptr_t user_ptr; /* kernel object pointer */
3692 @END
3695 /* Get handle from kernel object pointer */
3696 @REQ(get_kernel_object_handle)
3697 obj_handle_t manager; /* handle to the device manager */
3698 client_ptr_t user_ptr; /* kernel object pointer */
3699 unsigned int access; /* wanted access rights */
3700 @REPLY
3701 obj_handle_t handle; /* kernel object handle */
3702 @END
3705 /* Make the current process a system process */
3706 @REQ(make_process_system)
3707 @REPLY
3708 obj_handle_t event; /* event signaled when all user processes have exited */
3709 @END
3712 /* Get detailed fixed-size information about a token */
3713 @REQ(get_token_statistics)
3714 obj_handle_t handle; /* handle to the object */
3715 @REPLY
3716 luid_t token_id; /* locally-unique identifier of the token */
3717 luid_t modified_id; /* locally-unique identifier of the modified version of the token */
3718 int primary; /* is the token primary or impersonation? */
3719 int impersonation_level; /* level of impersonation */
3720 int group_count; /* the number of groups the token is a member of */
3721 int privilege_count; /* the number of privileges the token has */
3722 @END
3725 /* Create I/O completion port */
3726 @REQ(create_completion)
3727 unsigned int access; /* desired access to a port */
3728 unsigned int concurrent; /* max number of concurrent active threads */
3729 VARARG(objattr,object_attributes); /* object attributes */
3730 @REPLY
3731 obj_handle_t handle; /* port handle */
3732 @END
3735 /* Open I/O completion port */
3736 @REQ(open_completion)
3737 unsigned int access; /* desired access to a port */
3738 unsigned int attributes; /* object attributes */
3739 obj_handle_t rootdir; /* root directory */
3740 VARARG(filename,unicode_str); /* port name */
3741 @REPLY
3742 obj_handle_t handle; /* port handle */
3743 @END
3746 /* add completion to completion port */
3747 @REQ(add_completion)
3748 obj_handle_t handle; /* port handle */
3749 apc_param_t ckey; /* completion key */
3750 apc_param_t cvalue; /* completion value */
3751 apc_param_t information; /* IO_STATUS_BLOCK Information */
3752 unsigned int status; /* completion result */
3753 @END
3756 /* get completion from completion port queue */
3757 @REQ(remove_completion)
3758 obj_handle_t handle; /* port handle */
3759 @REPLY
3760 apc_param_t ckey; /* completion key */
3761 apc_param_t cvalue; /* completion value */
3762 apc_param_t information; /* IO_STATUS_BLOCK Information */
3763 unsigned int status; /* completion result */
3764 @END
3767 /* get completion queue depth */
3768 @REQ(query_completion)
3769 obj_handle_t handle; /* port handle */
3770 @REPLY
3771 unsigned int depth; /* completion queue depth */
3772 @END
3775 /* associate object with completion port */
3776 @REQ(set_completion_info)
3777 obj_handle_t handle; /* object handle */
3778 apc_param_t ckey; /* completion key */
3779 obj_handle_t chandle; /* port handle */
3780 @END
3783 /* check for associated completion and push msg */
3784 @REQ(add_fd_completion)
3785 obj_handle_t handle; /* async' object */
3786 apc_param_t cvalue; /* completion value */
3787 apc_param_t information; /* IO_STATUS_BLOCK Information */
3788 unsigned int status; /* completion status */
3789 int async; /* completion is an async result */
3790 @END
3793 /* set fd completion information */
3794 @REQ(set_fd_completion_mode)
3795 obj_handle_t handle; /* handle to a file or directory */
3796 unsigned int flags; /* completion notification flags */
3797 @END
3800 /* set fd disposition information */
3801 @REQ(set_fd_disp_info)
3802 obj_handle_t handle; /* handle to a file or directory */
3803 int unlink; /* whether to unlink file on close */
3804 @END
3807 /* set fd name information */
3808 @REQ(set_fd_name_info)
3809 obj_handle_t handle; /* handle to a file or directory */
3810 obj_handle_t rootdir; /* root directory */
3811 int link; /* link instead of renaming */
3812 VARARG(filename,string); /* new file name */
3813 @END
3816 /* Retrieve layered info for a window */
3817 @REQ(get_window_layered_info)
3818 user_handle_t handle; /* handle to the window */
3819 @REPLY
3820 unsigned int color_key; /* color key */
3821 unsigned int alpha; /* alpha (0..255) */
3822 unsigned int flags; /* LWA_* flags */
3823 @END
3826 /* Set layered info for a window */
3827 @REQ(set_window_layered_info)
3828 user_handle_t handle; /* handle to the window */
3829 unsigned int color_key; /* color key */
3830 unsigned int alpha; /* alpha (0..255) */
3831 unsigned int flags; /* LWA_* flags */
3832 @END
3835 /* Allocate an arbitrary user handle */
3836 @REQ(alloc_user_handle)
3837 @REPLY
3838 user_handle_t handle; /* allocated handle */
3839 @END
3842 /* Free an arbitrary user handle */
3843 @REQ(free_user_handle)
3844 user_handle_t handle; /* handle to free*/
3845 @END
3848 /* Set/get the current cursor */
3849 @REQ(set_cursor)
3850 unsigned int flags; /* flags for fields to set (see below) */
3851 user_handle_t handle; /* handle to the cursor */
3852 int show_count; /* show count increment/decrement */
3853 int x; /* cursor position */
3854 int y;
3855 rectangle_t clip; /* cursor clip rectangle */
3856 unsigned int clip_msg; /* message to post on cursor clip changes */
3857 @REPLY
3858 user_handle_t prev_handle; /* previous handle */
3859 int prev_count; /* previous show count */
3860 int prev_x; /* previous position */
3861 int prev_y;
3862 int new_x; /* new position */
3863 int new_y;
3864 rectangle_t new_clip; /* new clip rectangle */
3865 unsigned int last_change; /* time of last position change */
3866 @END
3867 #define SET_CURSOR_HANDLE 0x01
3868 #define SET_CURSOR_COUNT 0x02
3869 #define SET_CURSOR_POS 0x04
3870 #define SET_CURSOR_CLIP 0x08
3871 #define SET_CURSOR_NOCLIP 0x10
3874 /* Modify the list of registered rawinput devices */
3875 @REQ(update_rawinput_devices)
3876 VARARG(devices,rawinput_devices);
3877 @END
3880 /* Retrieve the suspended context of a thread */
3881 @REQ(get_suspend_context)
3882 @REPLY
3883 VARARG(context,context); /* thread context */
3884 @END
3887 /* Store the suspend context of a thread */
3888 @REQ(set_suspend_context)
3889 VARARG(context,context); /* thread context */
3890 @END
3893 /* Create a new job object */
3894 @REQ(create_job)
3895 unsigned int access; /* wanted access rights */
3896 VARARG(objattr,object_attributes); /* object attributes */
3897 @REPLY
3898 obj_handle_t handle; /* handle to the job */
3899 @END
3902 /* Open a job object */
3903 @REQ(open_job)
3904 unsigned int access; /* wanted access rights */
3905 unsigned int attributes; /* object attributes */
3906 obj_handle_t rootdir; /* root directory */
3907 VARARG(name,unicode_str); /* object name */
3908 @REPLY
3909 obj_handle_t handle; /* handle to the job */
3910 @END
3913 /* Assign a job object to a process */
3914 @REQ(assign_job)
3915 obj_handle_t job; /* handle to the job */
3916 obj_handle_t process; /* handle to the process */
3917 @END
3920 /* Check if a process is associated with a job */
3921 @REQ(process_in_job)
3922 obj_handle_t job; /* handle to the job */
3923 obj_handle_t process; /* handle to the process */
3924 @END
3927 /* Set limit flags on a job */
3928 @REQ(set_job_limits)
3929 obj_handle_t handle; /* handle to the job */
3930 unsigned int limit_flags; /* new limit flags */
3931 @END
3934 /* Set new completion port for a job */
3935 @REQ(set_job_completion_port)
3936 obj_handle_t job; /* handle to the job */
3937 obj_handle_t port; /* handle to the completion port */
3938 client_ptr_t key; /* key to send with completion messages */
3939 @END
3942 /* Terminate all processes associated with the job */
3943 @REQ(terminate_job)
3944 obj_handle_t handle; /* handle to the job */
3945 int status; /* process exit code */
3946 @END
3949 /* Suspend a process */
3950 @REQ(suspend_process)
3951 obj_handle_t handle; /* process handle */
3952 @END
3955 /* Resume a process */
3956 @REQ(resume_process)
3957 obj_handle_t handle; /* process handle */
3958 @END