user32: Implement GetMouseMovePointsEx().
[wine.git] / server / protocol.def
blob846d2e15602b1ad988bed46318ea05bae9990cfb
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 union
191 struct { struct { unsigned __int64 low, high; } ymm_high[16]; } ymm_high_regs;
192 } ymm; /* selected by SERVER_CTX_YMM_REGISTERS */
193 } context_t;
195 #define SERVER_CTX_CONTROL 0x01
196 #define SERVER_CTX_INTEGER 0x02
197 #define SERVER_CTX_SEGMENTS 0x04
198 #define SERVER_CTX_FLOATING_POINT 0x08
199 #define SERVER_CTX_DEBUG_REGISTERS 0x10
200 #define SERVER_CTX_EXTENDED_REGISTERS 0x20
201 #define SERVER_CTX_YMM_REGISTERS 0x40
203 /* structure used in sending an fd from client to server */
204 struct send_fd
206 thread_id_t tid; /* thread id */
207 int fd; /* file descriptor on client-side */
210 /* structure sent by the server on the wait fifo */
211 struct wake_up_reply
213 client_ptr_t cookie; /* magic cookie that was passed in select_request */
214 int signaled; /* wait result */
215 int __pad;
218 /* NT-style timeout, in 100ns units, negative means relative timeout */
219 typedef __int64 timeout_t;
220 #define TIMEOUT_INFINITE (((timeout_t)0x7fffffff) << 32 | 0xffffffff)
222 /* absolute timeout, negative means that monotonic clock is used */
223 typedef __int64 abstime_t;
225 /* structure for process startup info */
226 typedef struct
228 unsigned int debug_flags;
229 unsigned int console_flags;
230 obj_handle_t console;
231 obj_handle_t hstdin;
232 obj_handle_t hstdout;
233 obj_handle_t hstderr;
234 unsigned int x;
235 unsigned int y;
236 unsigned int xsize;
237 unsigned int ysize;
238 unsigned int xchars;
239 unsigned int ychars;
240 unsigned int attribute;
241 unsigned int flags;
242 unsigned int show;
243 data_size_t curdir_len;
244 data_size_t dllpath_len;
245 data_size_t imagepath_len;
246 data_size_t cmdline_len;
247 data_size_t title_len;
248 data_size_t desktop_len;
249 data_size_t shellinfo_len;
250 data_size_t runtime_len;
251 /* VARARG(curdir,unicode_str,curdir_len); */
252 /* VARARG(dllpath,unicode_str,dllpath_len); */
253 /* VARARG(imagepath,unicode_str,imagepath_len); */
254 /* VARARG(cmdline,unicode_str,cmdline_len); */
255 /* VARARG(title,unicode_str,title_len); */
256 /* VARARG(desktop,unicode_str,desktop_len); */
257 /* VARARG(shellinfo,unicode_str,shellinfo_len); */
258 /* VARARG(runtime,unicode_str,runtime_len); */
259 } startup_info_t;
261 /* structure returned in the list of window properties */
262 typedef struct
264 atom_t atom; /* property atom */
265 int string; /* was atom a string originally? */
266 lparam_t data; /* data stored in property */
267 } property_data_t;
269 /* structure to specify window rectangles */
270 typedef struct
272 int left;
273 int top;
274 int right;
275 int bottom;
276 } rectangle_t;
278 /* structure for parameters of async I/O calls */
279 typedef struct
281 obj_handle_t handle; /* object to perform I/O on */
282 obj_handle_t event; /* event to signal when done */
283 client_ptr_t iosb; /* I/O status block in client addr space */
284 client_ptr_t user; /* opaque user data containing callback pointer and async-specific data */
285 client_ptr_t apc; /* user APC to call */
286 apc_param_t apc_context; /* user APC context or completion value */
287 } async_data_t;
289 /* structures for extra message data */
291 struct hw_msg_source
293 unsigned int device; /* source device (IMDT_* values) */
294 unsigned int origin; /* source origin (IMO_* values) */
297 struct hardware_msg_data
299 lparam_t info; /* extra info */
300 unsigned int hw_id; /* unique id */
301 unsigned int flags; /* hook flags */
302 struct hw_msg_source source; /* message source */
303 union
305 int type;
306 struct
308 int type; /* RIM_TYPEKEYBOARD */
309 unsigned int message; /* message generated by this rawinput event */
310 unsigned short vkey; /* virtual key code */
311 unsigned short scan; /* scan code */
312 } kbd;
313 struct
315 int type; /* RIM_TYPEMOUSE */
316 int x; /* x coordinate */
317 int y; /* y coordinate */
318 unsigned int data; /* mouse data */
319 } mouse;
320 } rawinput;
323 struct callback_msg_data
325 client_ptr_t callback; /* callback function */
326 lparam_t data; /* user data for callback */
327 lparam_t result; /* message result */
330 struct winevent_msg_data
332 user_handle_t hook; /* hook handle */
333 thread_id_t tid; /* thread id */
334 client_ptr_t hook_proc; /* hook proc address */
335 /* followed by module name if any */
338 typedef union
340 int type;
341 struct
343 int type; /* INPUT_KEYBOARD */
344 unsigned short vkey; /* virtual key code */
345 unsigned short scan; /* scan code */
346 unsigned int flags; /* event flags */
347 unsigned int time; /* event time */
348 lparam_t info; /* extra info */
349 } kbd;
350 struct
352 int type; /* INPUT_MOUSE */
353 int x; /* coordinates */
354 int y;
355 unsigned int data; /* mouse data */
356 unsigned int flags; /* event flags */
357 unsigned int time; /* event time */
358 lparam_t info; /* extra info */
359 } mouse;
360 struct
362 int type; /* INPUT_HARDWARE */
363 unsigned int msg; /* message code */
364 lparam_t lparam; /* message param */
365 } hw;
366 } hw_input_t;
368 typedef union
370 unsigned char bytes[1]; /* raw data for sent messages */
371 struct hardware_msg_data hardware;
372 struct callback_msg_data callback;
373 struct winevent_msg_data winevent;
374 } message_data_t;
376 /* structure returned in filesystem events */
377 struct filesystem_event
379 int action;
380 data_size_t len;
381 char name[1];
384 typedef struct
386 unsigned int low_part;
387 int high_part;
388 } luid_t;
390 #define MAX_ACL_LEN 65535
392 struct security_descriptor
394 unsigned int control; /* SE_ flags */
395 data_size_t owner_len;
396 data_size_t group_len;
397 data_size_t sacl_len;
398 data_size_t dacl_len;
399 /* VARARG(owner,SID); */
400 /* VARARG(group,SID); */
401 /* VARARG(sacl,ACL); */
402 /* VARARG(dacl,ACL); */
405 struct object_attributes
407 obj_handle_t rootdir; /* root directory */
408 unsigned int attributes; /* object attributes */
409 data_size_t sd_len; /* length of security_descriptor data. may be 0 */
410 data_size_t name_len; /* length of the name string. may be 0 */
411 /* VARARG(sd,security_descriptor); */
412 /* VARARG(name,unicode_str); */
415 struct token_groups
417 unsigned int count;
418 /* unsigned int attributes[count]; */
419 /* VARARG(sids,SID); */
422 enum select_op
424 SELECT_NONE,
425 SELECT_WAIT,
426 SELECT_WAIT_ALL,
427 SELECT_SIGNAL_AND_WAIT,
428 SELECT_KEYED_EVENT_WAIT,
429 SELECT_KEYED_EVENT_RELEASE
432 typedef union
434 enum select_op op;
435 struct
437 enum select_op op; /* SELECT_WAIT or SELECT_WAIT_ALL */
438 obj_handle_t handles[MAXIMUM_WAIT_OBJECTS];
439 } wait;
440 struct
442 enum select_op op; /* SELECT_SIGNAL_AND_WAIT */
443 obj_handle_t wait;
444 obj_handle_t signal; /* must be last in the structure so we can remove it on retries */
445 } signal_and_wait;
446 struct
448 enum select_op op; /* SELECT_KEYED_EVENT_WAIT or SELECT_KEYED_EVENT_RELEASE */
449 obj_handle_t handle;
450 client_ptr_t key;
451 } keyed_event;
452 } select_op_t;
454 enum apc_type
456 APC_NONE,
457 APC_USER,
458 APC_TIMER,
459 APC_ASYNC_IO,
460 APC_VIRTUAL_ALLOC,
461 APC_VIRTUAL_FREE,
462 APC_VIRTUAL_QUERY,
463 APC_VIRTUAL_PROTECT,
464 APC_VIRTUAL_FLUSH,
465 APC_VIRTUAL_LOCK,
466 APC_VIRTUAL_UNLOCK,
467 APC_MAP_VIEW,
468 APC_UNMAP_VIEW,
469 APC_CREATE_THREAD,
470 APC_BREAK_PROCESS
473 typedef union
475 enum apc_type type;
476 struct
478 enum apc_type type; /* APC_USER */
479 int __pad;
480 client_ptr_t func; /* void (__stdcall *func)(ULONG_PTR,ULONG_PTR,ULONG_PTR); */
481 apc_param_t args[3]; /* arguments for user function */
482 } user;
483 struct
485 enum apc_type type; /* APC_TIMER */
486 int __pad;
487 client_ptr_t func; /* void (__stdcall *func)(void*, unsigned int, unsigned int); */
488 abstime_t time; /* time of expiration */
489 client_ptr_t arg; /* user argument */
490 } timer;
491 } user_apc_t;
493 typedef union
495 enum apc_type type;
496 user_apc_t user;
497 struct
499 enum apc_type type; /* APC_ASYNC_IO */
500 unsigned int status; /* I/O status */
501 client_ptr_t user; /* user pointer */
502 client_ptr_t sb; /* status block */
503 } async_io;
504 struct
506 enum apc_type type; /* APC_VIRTUAL_ALLOC */
507 unsigned int op_type; /* type of operation */
508 client_ptr_t addr; /* requested address */
509 mem_size_t size; /* allocation size */
510 mem_size_t zero_bits; /* number of zero high bits */
511 unsigned int prot; /* memory protection flags */
512 } virtual_alloc;
513 struct
515 enum apc_type type; /* APC_VIRTUAL_FREE */
516 unsigned int op_type; /* type of operation */
517 client_ptr_t addr; /* requested address */
518 mem_size_t size; /* allocation size */
519 } virtual_free;
520 struct
522 enum apc_type type; /* APC_VIRTUAL_QUERY */
523 int __pad;
524 client_ptr_t addr; /* requested address */
525 } virtual_query;
526 struct
528 enum apc_type type; /* APC_VIRTUAL_PROTECT */
529 unsigned int prot; /* new protection flags */
530 client_ptr_t addr; /* requested address */
531 mem_size_t size; /* requested size */
532 } virtual_protect;
533 struct
535 enum apc_type type; /* APC_VIRTUAL_FLUSH */
536 int __pad;
537 client_ptr_t addr; /* requested address */
538 mem_size_t size; /* requested size */
539 } virtual_flush;
540 struct
542 enum apc_type type; /* APC_VIRTUAL_LOCK */
543 int __pad;
544 client_ptr_t addr; /* requested address */
545 mem_size_t size; /* requested size */
546 } virtual_lock;
547 struct
549 enum apc_type type; /* APC_VIRTUAL_UNLOCK */
550 int __pad;
551 client_ptr_t addr; /* requested address */
552 mem_size_t size; /* requested size */
553 } virtual_unlock;
554 struct
556 enum apc_type type; /* APC_MAP_VIEW */
557 obj_handle_t handle; /* mapping handle */
558 client_ptr_t addr; /* requested address */
559 mem_size_t size; /* allocation size */
560 file_pos_t offset; /* file offset */
561 mem_size_t zero_bits; /* number of zero high bits */
562 unsigned int alloc_type; /* allocation type */
563 unsigned int prot; /* memory protection flags */
564 } map_view;
565 struct
567 enum apc_type type; /* APC_UNMAP_VIEW */
568 int __pad;
569 client_ptr_t addr; /* view address */
570 } unmap_view;
571 struct
573 enum apc_type type; /* APC_CREATE_THREAD */
574 unsigned int flags; /* creation flags */
575 client_ptr_t func; /* void (__stdcall *func)(void*); start function */
576 client_ptr_t arg; /* argument for start function */
577 mem_size_t reserve; /* reserve size for thread stack */
578 mem_size_t commit; /* commit size for thread stack */
579 } create_thread;
580 } apc_call_t;
582 typedef union
584 enum apc_type type;
585 struct
587 enum apc_type type; /* APC_ASYNC_IO */
588 unsigned int status; /* new status of async operation */
589 unsigned int total; /* bytes transferred */
590 } async_io;
591 struct
593 enum apc_type type; /* APC_VIRTUAL_ALLOC */
594 unsigned int status; /* status returned by call */
595 client_ptr_t addr; /* resulting address */
596 mem_size_t size; /* resulting size */
597 } virtual_alloc;
598 struct
600 enum apc_type type; /* APC_VIRTUAL_FREE */
601 unsigned int status; /* status returned by call */
602 client_ptr_t addr; /* resulting address */
603 mem_size_t size; /* resulting size */
604 } virtual_free;
605 struct
607 enum apc_type type; /* APC_VIRTUAL_QUERY */
608 unsigned int status; /* status returned by call */
609 client_ptr_t base; /* resulting base address */
610 client_ptr_t alloc_base;/* resulting allocation base */
611 mem_size_t size; /* resulting region size */
612 unsigned short state; /* resulting region state */
613 unsigned short prot; /* resulting region protection */
614 unsigned short alloc_prot;/* resulting allocation protection */
615 unsigned short alloc_type;/* resulting region allocation type */
616 } virtual_query;
617 struct
619 enum apc_type type; /* APC_VIRTUAL_PROTECT */
620 unsigned int status; /* status returned by call */
621 client_ptr_t addr; /* resulting address */
622 mem_size_t size; /* resulting size */
623 unsigned int prot; /* old protection flags */
624 } virtual_protect;
625 struct
627 enum apc_type type; /* APC_VIRTUAL_FLUSH */
628 unsigned int status; /* status returned by call */
629 client_ptr_t addr; /* resulting address */
630 mem_size_t size; /* resulting size */
631 } virtual_flush;
632 struct
634 enum apc_type type; /* APC_VIRTUAL_LOCK */
635 unsigned int status; /* status returned by call */
636 client_ptr_t addr; /* resulting address */
637 mem_size_t size; /* resulting size */
638 } virtual_lock;
639 struct
641 enum apc_type type; /* APC_VIRTUAL_UNLOCK */
642 unsigned int status; /* status returned by call */
643 client_ptr_t addr; /* resulting address */
644 mem_size_t size; /* resulting size */
645 } virtual_unlock;
646 struct
648 enum apc_type type; /* APC_MAP_VIEW */
649 unsigned int status; /* status returned by call */
650 client_ptr_t addr; /* resulting address */
651 mem_size_t size; /* resulting size */
652 } map_view;
653 struct
655 enum apc_type type; /* APC_MAP_VIEW */
656 unsigned int status; /* status returned by call */
657 } unmap_view;
658 struct
660 enum apc_type type; /* APC_CREATE_THREAD */
661 unsigned int status; /* status returned by call */
662 process_id_t pid; /* process id */
663 thread_id_t tid; /* thread id */
664 client_ptr_t teb; /* thread teb (in process address space) */
665 obj_handle_t handle; /* handle to new thread */
666 } create_thread;
667 struct
669 enum apc_type type; /* APC_BREAK_PROCESS */
670 unsigned int status; /* status returned by call */
671 } break_process;
672 } apc_result_t;
674 enum irp_type
676 IRP_CALL_NONE,
677 IRP_CALL_CREATE,
678 IRP_CALL_CLOSE,
679 IRP_CALL_READ,
680 IRP_CALL_WRITE,
681 IRP_CALL_FLUSH,
682 IRP_CALL_IOCTL,
683 IRP_CALL_FREE,
684 IRP_CALL_CANCEL
687 typedef union
689 enum irp_type type; /* irp call type */
690 struct
692 enum irp_type type; /* IRP_CALL_CREATE */
693 unsigned int access; /* access rights */
694 unsigned int sharing; /* sharing flags */
695 unsigned int options; /* file options */
696 client_ptr_t device; /* opaque ptr for the device */
697 obj_handle_t file; /* file handle */
698 } create;
699 struct
701 enum irp_type type; /* IRP_CALL_CLOSE */
702 int __pad;
703 client_ptr_t file; /* opaque ptr for the file object */
704 } close;
705 struct
707 enum irp_type type; /* IRP_CALL_READ */
708 unsigned int key; /* driver key */
709 data_size_t out_size; /* needed output size */
710 int __pad;
711 client_ptr_t file; /* opaque ptr for the file object */
712 file_pos_t pos; /* file position */
713 } read;
714 struct
716 enum irp_type type; /* IRP_CALL_WRITE */
717 unsigned int key; /* driver key */
718 client_ptr_t file; /* opaque ptr for the file object */
719 file_pos_t pos; /* file position */
720 } write;
721 struct
723 enum irp_type type; /* IRP_CALL_FLUSH */
724 int __pad;
725 client_ptr_t file; /* opaque ptr for the file object */
726 } flush;
727 struct
729 enum irp_type type; /* IRP_CALL_IOCTL */
730 ioctl_code_t code; /* ioctl code */
731 data_size_t out_size; /* needed output size */
732 int __pad;
733 client_ptr_t file; /* opaque ptr for the file object */
734 } ioctl;
735 struct
737 enum irp_type type; /* IRP_CALL_FREE */
738 int __pad;
739 client_ptr_t obj; /* opaque ptr for the freed object */
740 } free;
741 struct
743 enum irp_type type; /* IRP_CALL_CANCEL */
744 int __pad;
745 client_ptr_t irp; /* opaque ptr for canceled irp */
746 } cancel;
747 } irp_params_t;
749 /* information about a PE image mapping, roughly equivalent to SECTION_IMAGE_INFORMATION */
750 typedef struct
752 client_ptr_t base;
753 client_ptr_t entry_point;
754 mem_size_t map_size;
755 mem_size_t stack_size;
756 mem_size_t stack_commit;
757 unsigned int zerobits;
758 unsigned int subsystem;
759 unsigned short subsystem_low;
760 unsigned short subsystem_high;
761 unsigned int gp;
762 unsigned short image_charact;
763 unsigned short dll_charact;
764 unsigned short machine;
765 unsigned char contains_code;
766 unsigned char image_flags;
767 unsigned int loader_flags;
768 unsigned int header_size;
769 unsigned int file_size;
770 unsigned int checksum;
771 client_cpu_t cpu;
772 int __pad;
773 } pe_image_info_t;
774 #define IMAGE_FLAGS_ComPlusNativeReady 0x01
775 #define IMAGE_FLAGS_ComPlusILOnly 0x02
776 #define IMAGE_FLAGS_ImageDynamicallyRelocated 0x04
777 #define IMAGE_FLAGS_ImageMappedFlat 0x08
778 #define IMAGE_FLAGS_BaseBelow4gb 0x10
779 #define IMAGE_FLAGS_WineBuiltin 0x40
780 #define IMAGE_FLAGS_WineFakeDll 0x80
782 struct rawinput_device
784 unsigned short usage_page;
785 unsigned short usage;
786 unsigned int flags;
787 user_handle_t target;
790 typedef struct
792 int x;
793 int y;
794 unsigned int time;
795 int __pad;
796 lparam_t info;
797 } cursor_pos_t;
799 /****************************************************************/
800 /* Request declarations */
802 /* Create a new process from the context of the parent */
803 @REQ(new_process)
804 obj_handle_t token; /* process token */
805 obj_handle_t parent_process; /* parent process */
806 int inherit_all; /* inherit all handles from parent */
807 unsigned int create_flags; /* creation flags */
808 int socket_fd; /* file descriptor for process socket */
809 obj_handle_t exe_file; /* file handle for main exe */
810 unsigned int access; /* access rights for process object */
811 client_cpu_t cpu; /* CPU that the new process will use */
812 data_size_t info_size; /* size of startup info */
813 data_size_t handles_size; /* length of explicit handles list */
814 VARARG(objattr,object_attributes); /* object attributes */
815 VARARG(handles,uints,handles_size); /* handles list */
816 VARARG(info,startup_info,info_size); /* startup information */
817 VARARG(env,unicode_str); /* environment for new process */
818 @REPLY
819 obj_handle_t info; /* new process info handle */
820 process_id_t pid; /* process id */
821 obj_handle_t handle; /* process handle (in the current process) */
822 @END
825 /* Execute a process, replacing the current one */
826 @REQ(exec_process)
827 int socket_fd; /* file descriptor for process socket */
828 client_cpu_t cpu; /* CPU that the new process will use */
829 @END
832 /* Retrieve information about a newly started process */
833 @REQ(get_new_process_info)
834 obj_handle_t info; /* info handle returned from new_process_request */
835 @REPLY
836 int success; /* did the process start successfully? */
837 int exit_code; /* process exit code if failed */
838 @END
841 /* Create a new thread */
842 @REQ(new_thread)
843 obj_handle_t process; /* process in which to create thread */
844 unsigned int access; /* wanted access rights */
845 int suspend; /* new thread should be suspended on creation */
846 int request_fd; /* fd for request pipe */
847 VARARG(objattr,object_attributes); /* object attributes */
848 @REPLY
849 thread_id_t tid; /* thread id */
850 obj_handle_t handle; /* thread handle (in the current process) */
851 @END
854 /* Retrieve the new process startup info */
855 @REQ(get_startup_info)
856 @REPLY
857 data_size_t info_size; /* size of startup info */
858 VARARG(info,startup_info,info_size); /* startup information */
859 VARARG(env,unicode_str); /* environment */
860 @END
863 /* Signal the end of the process initialization */
864 @REQ(init_process_done)
865 int gui; /* is it a GUI process? */
866 mod_handle_t module; /* main module base address */
867 client_ptr_t ldt_copy; /* address of LDT copy (in thread address space) */
868 client_ptr_t entry; /* process entry point */
869 @REPLY
870 int suspend; /* is process suspended? */
871 @END
874 /* Initialize a thread; called from the child after fork()/clone() */
875 @REQ(init_thread)
876 int unix_pid; /* Unix pid of new thread */
877 int unix_tid; /* Unix tid of new thread */
878 int debug_level; /* new debug level */
879 client_ptr_t teb; /* TEB of new thread (in thread address space) */
880 client_ptr_t entry; /* entry point or PEB if initial thread (in thread address space) */
881 int reply_fd; /* fd for reply pipe */
882 int wait_fd; /* fd for blocking calls pipe */
883 client_cpu_t cpu; /* CPU that this thread is running on */
884 @REPLY
885 process_id_t pid; /* process id of the new thread's process */
886 thread_id_t tid; /* thread id of the new thread */
887 timeout_t server_start; /* server start time */
888 data_size_t info_size; /* total size of startup info */
889 int version; /* protocol version */
890 unsigned int all_cpus; /* bitset of supported CPUs */
891 int suspend; /* is thread suspended? */
892 @END
895 /* Terminate a process */
896 @REQ(terminate_process)
897 obj_handle_t handle; /* process handle to terminate */
898 int exit_code; /* process exit code */
899 @REPLY
900 int self; /* suicide? */
901 @END
904 /* Terminate a thread */
905 @REQ(terminate_thread)
906 obj_handle_t handle; /* thread handle to terminate */
907 int exit_code; /* thread exit code */
908 @REPLY
909 int self; /* suicide? */
910 @END
913 /* Retrieve information about a process */
914 @REQ(get_process_info)
915 obj_handle_t handle; /* process handle */
916 @REPLY
917 process_id_t pid; /* server process id */
918 process_id_t ppid; /* server process id of parent */
919 affinity_t affinity; /* process affinity mask */
920 client_ptr_t peb; /* PEB address in process address space */
921 timeout_t start_time; /* process start time */
922 timeout_t end_time; /* process end time */
923 int exit_code; /* process exit code */
924 int priority; /* priority class */
925 client_cpu_t cpu; /* CPU that this process is running on */
926 short int debugger_present; /* process is being debugged */
927 short int debug_children; /* inherit debugger to child processes */
928 VARARG(image,pe_image_info); /* image info for main exe */
929 @END
932 /* Retrieve information about a process memory usage */
933 @REQ(get_process_vm_counters)
934 obj_handle_t handle; /* process handle */
935 @REPLY
936 mem_size_t peak_virtual_size; /* peak virtual memory in bytes */
937 mem_size_t virtual_size; /* virtual memory in bytes */
938 mem_size_t peak_working_set_size; /* peak real memory in bytes */
939 mem_size_t working_set_size; /* real memory in bytes */
940 mem_size_t pagefile_usage; /* commit charge in bytes */
941 mem_size_t peak_pagefile_usage; /* peak commit charge in bytes */
942 @END
945 /* Set a process information */
946 @REQ(set_process_info)
947 obj_handle_t handle; /* process handle */
948 int mask; /* setting mask (see below) */
949 int priority; /* priority class */
950 affinity_t affinity; /* affinity mask */
951 @END
952 #define SET_PROCESS_INFO_PRIORITY 0x01
953 #define SET_PROCESS_INFO_AFFINITY 0x02
956 /* Retrieve information about a thread */
957 @REQ(get_thread_info)
958 obj_handle_t handle; /* thread handle */
959 unsigned int access; /* required access rights */
960 @REPLY
961 process_id_t pid; /* server process id */
962 thread_id_t tid; /* server thread id */
963 client_ptr_t teb; /* thread teb pointer */
964 client_ptr_t entry_point; /* thread entry point */
965 affinity_t affinity; /* thread affinity mask */
966 int exit_code; /* thread exit code */
967 int priority; /* thread priority level */
968 int last; /* last thread in process */
969 int suspend_count; /* thread suspend count */
970 int dbg_hidden; /* thread hidden from debugger */
971 data_size_t desc_len; /* description length in bytes */
972 VARARG(desc,unicode_str); /* description string */
973 @END
976 /* Retrieve information about thread times */
977 @REQ(get_thread_times)
978 obj_handle_t handle; /* thread handle */
979 @REPLY
980 timeout_t creation_time; /* thread creation time */
981 timeout_t exit_time; /* thread exit time */
982 int unix_pid; /* thread native pid */
983 int unix_tid; /* thread native pid */
984 @END
987 /* Set a thread information */
988 @REQ(set_thread_info)
989 obj_handle_t handle; /* thread handle */
990 int mask; /* setting mask (see below) */
991 int priority; /* priority class */
992 affinity_t affinity; /* affinity mask */
993 client_ptr_t entry_point; /* thread entry point */
994 obj_handle_t token; /* impersonation token */
995 VARARG(desc,unicode_str); /* description string */
996 @END
997 #define SET_THREAD_INFO_PRIORITY 0x01
998 #define SET_THREAD_INFO_AFFINITY 0x02
999 #define SET_THREAD_INFO_TOKEN 0x04
1000 #define SET_THREAD_INFO_ENTRYPOINT 0x08
1001 #define SET_THREAD_INFO_DESCRIPTION 0x10
1002 #define SET_THREAD_INFO_DBG_HIDDEN 0x20
1005 /* Retrieve information about a module */
1006 @REQ(get_dll_info)
1007 obj_handle_t handle; /* process handle */
1008 mod_handle_t base_address; /* base address of module */
1009 @REPLY
1010 client_ptr_t entry_point;
1011 data_size_t filename_len; /* buffer len in bytes required to store filename */
1012 VARARG(filename,unicode_str); /* file name of module */
1013 @END
1016 /* Suspend a thread */
1017 @REQ(suspend_thread)
1018 obj_handle_t handle; /* thread handle */
1019 @REPLY
1020 int count; /* new suspend count */
1021 @END
1024 /* Resume a thread */
1025 @REQ(resume_thread)
1026 obj_handle_t handle; /* thread handle */
1027 @REPLY
1028 int count; /* new suspend count */
1029 @END
1032 /* Notify the server that a dll has been loaded */
1033 @REQ(load_dll)
1034 data_size_t dbg_offset; /* debug info offset */
1035 mod_handle_t base; /* base address */
1036 client_ptr_t name; /* ptr to ptr to name (in process addr space) */
1037 data_size_t dbg_size; /* debug info size */
1038 VARARG(filename,unicode_str); /* file name of dll */
1039 @END
1042 /* Notify the server that a dll is being unloaded */
1043 @REQ(unload_dll)
1044 mod_handle_t base; /* base address */
1045 @END
1048 /* Queue an APC for a thread or process */
1049 @REQ(queue_apc)
1050 obj_handle_t handle; /* thread or process handle */
1051 apc_call_t call; /* call arguments */
1052 @REPLY
1053 obj_handle_t handle; /* APC handle */
1054 int self; /* run APC in caller itself? */
1055 @END
1058 /* Get the result of an APC call */
1059 @REQ(get_apc_result)
1060 obj_handle_t handle; /* handle to the APC */
1061 @REPLY
1062 apc_result_t result; /* result of the APC */
1063 @END
1066 /* Close a handle for the current process */
1067 @REQ(close_handle)
1068 obj_handle_t handle; /* handle to close */
1069 @END
1072 /* Set a handle information */
1073 @REQ(set_handle_info)
1074 obj_handle_t handle; /* handle we are interested in */
1075 int flags; /* new handle flags */
1076 int mask; /* mask for flags to set */
1077 @REPLY
1078 int old_flags; /* old flag value */
1079 @END
1082 /* Duplicate a handle */
1083 @REQ(dup_handle)
1084 obj_handle_t src_process; /* src process handle */
1085 obj_handle_t src_handle; /* src handle to duplicate */
1086 obj_handle_t dst_process; /* dst process handle */
1087 unsigned int access; /* wanted access rights */
1088 unsigned int attributes; /* object attributes */
1089 unsigned int options; /* duplicate options (see below) */
1090 @REPLY
1091 obj_handle_t handle; /* duplicated handle in dst process */
1092 int self; /* is the source the current process? */
1093 int closed; /* whether the source handle has been closed */
1094 @END
1095 #define DUP_HANDLE_CLOSE_SOURCE DUPLICATE_CLOSE_SOURCE
1096 #define DUP_HANDLE_SAME_ACCESS DUPLICATE_SAME_ACCESS
1097 #define DUP_HANDLE_MAKE_GLOBAL 0x80000000 /* Not a Windows flag */
1100 /* Make an object temporary */
1101 @REQ(make_temporary)
1102 obj_handle_t handle; /* handle to the object */
1103 @END
1106 /* Open a handle to a process */
1107 @REQ(open_process)
1108 process_id_t pid; /* process id to open */
1109 unsigned int access; /* wanted access rights */
1110 unsigned int attributes; /* object attributes */
1111 @REPLY
1112 obj_handle_t handle; /* handle to the process */
1113 @END
1116 /* Open a handle to a thread */
1117 @REQ(open_thread)
1118 thread_id_t tid; /* thread id to open */
1119 unsigned int access; /* wanted access rights */
1120 unsigned int attributes; /* object attributes */
1121 @REPLY
1122 obj_handle_t handle; /* handle to the thread */
1123 @END
1126 /* Wait for handles */
1127 @REQ(select)
1128 int flags; /* wait flags (see below) */
1129 client_ptr_t cookie; /* magic cookie to return to client */
1130 abstime_t timeout; /* timeout */
1131 data_size_t size; /* size of select_op */
1132 obj_handle_t prev_apc; /* handle to previous APC */
1133 VARARG(result,apc_result); /* result of previous APC */
1134 VARARG(data,select_op,size); /* operation-specific data */
1135 VARARG(context,context); /* suspend context */
1136 @REPLY
1137 apc_call_t call; /* APC call arguments */
1138 obj_handle_t apc_handle; /* handle to next APC */
1139 VARARG(context,context); /* suspend context */
1140 @END
1141 #define SELECT_ALERTABLE 1
1142 #define SELECT_INTERRUPTIBLE 2
1145 /* Create an event */
1146 @REQ(create_event)
1147 unsigned int access; /* wanted access rights */
1148 int manual_reset; /* manual reset event */
1149 int initial_state; /* initial state of the event */
1150 VARARG(objattr,object_attributes); /* object attributes */
1151 @REPLY
1152 obj_handle_t handle; /* handle to the event */
1153 @END
1155 /* Event operation */
1156 @REQ(event_op)
1157 obj_handle_t handle; /* handle to event */
1158 int op; /* event operation (see below) */
1159 @REPLY
1160 int state; /* previous state */
1161 @END
1162 enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT };
1164 @REQ(query_event)
1165 obj_handle_t handle; /* handle to event */
1166 @REPLY
1167 int manual_reset; /* manual reset event */
1168 int state; /* current state of the event */
1169 @END
1171 /* Open an event */
1172 @REQ(open_event)
1173 unsigned int access; /* wanted access rights */
1174 unsigned int attributes; /* object attributes */
1175 obj_handle_t rootdir; /* root directory */
1176 VARARG(name,unicode_str); /* object name */
1177 @REPLY
1178 obj_handle_t handle; /* handle to the event */
1179 @END
1182 /* Create a keyed event */
1183 @REQ(create_keyed_event)
1184 unsigned int access; /* wanted access rights */
1185 VARARG(objattr,object_attributes); /* object attributes */
1186 @REPLY
1187 obj_handle_t handle; /* handle to the event */
1188 @END
1190 /* Open a keyed event */
1191 @REQ(open_keyed_event)
1192 unsigned int access; /* wanted access rights */
1193 unsigned int attributes; /* object attributes */
1194 obj_handle_t rootdir; /* root directory */
1195 VARARG(name,unicode_str); /* object name */
1196 @REPLY
1197 obj_handle_t handle; /* handle to the event */
1198 @END
1201 /* Create a mutex */
1202 @REQ(create_mutex)
1203 unsigned int access; /* wanted access rights */
1204 int owned; /* initially owned? */
1205 VARARG(objattr,object_attributes); /* object attributes */
1206 @REPLY
1207 obj_handle_t handle; /* handle to the mutex */
1208 @END
1211 /* Release a mutex */
1212 @REQ(release_mutex)
1213 obj_handle_t handle; /* handle to the mutex */
1214 @REPLY
1215 unsigned int prev_count; /* value of internal counter, before release */
1216 @END
1219 /* Open a mutex */
1220 @REQ(open_mutex)
1221 unsigned int access; /* wanted access rights */
1222 unsigned int attributes; /* object attributes */
1223 obj_handle_t rootdir; /* root directory */
1224 VARARG(name,unicode_str); /* object name */
1225 @REPLY
1226 obj_handle_t handle; /* handle to the mutex */
1227 @END
1230 /* Query a mutex */
1231 @REQ(query_mutex)
1232 obj_handle_t handle; /* handle to mutex */
1233 @REPLY
1234 unsigned int count; /* current count of mutex */
1235 int owned; /* true if owned by current thread */
1236 int abandoned; /* true if abandoned */
1237 @END
1240 /* Create a semaphore */
1241 @REQ(create_semaphore)
1242 unsigned int access; /* wanted access rights */
1243 unsigned int initial; /* initial count */
1244 unsigned int max; /* maximum count */
1245 VARARG(objattr,object_attributes); /* object attributes */
1246 @REPLY
1247 obj_handle_t handle; /* handle to the semaphore */
1248 @END
1251 /* Release a semaphore */
1252 @REQ(release_semaphore)
1253 obj_handle_t handle; /* handle to the semaphore */
1254 unsigned int count; /* count to add to semaphore */
1255 @REPLY
1256 unsigned int prev_count; /* previous semaphore count */
1257 @END
1259 @REQ(query_semaphore)
1260 obj_handle_t handle; /* handle to the semaphore */
1261 @REPLY
1262 unsigned int current; /* current count */
1263 unsigned int max; /* maximum count */
1264 @END
1266 /* Open a semaphore */
1267 @REQ(open_semaphore)
1268 unsigned int access; /* wanted access rights */
1269 unsigned int attributes; /* object attributes */
1270 obj_handle_t rootdir; /* root directory */
1271 VARARG(name,unicode_str); /* object name */
1272 @REPLY
1273 obj_handle_t handle; /* handle to the semaphore */
1274 @END
1277 /* Create a file */
1278 @REQ(create_file)
1279 unsigned int access; /* wanted access rights */
1280 unsigned int sharing; /* sharing flags */
1281 int create; /* file create action */
1282 unsigned int options; /* file options */
1283 unsigned int attrs; /* file attributes for creation */
1284 VARARG(objattr,object_attributes); /* object attributes */
1285 VARARG(filename,string); /* file name */
1286 @REPLY
1287 obj_handle_t handle; /* handle to the file */
1288 @END
1291 /* Open a file object */
1292 @REQ(open_file_object)
1293 unsigned int access; /* wanted access rights */
1294 unsigned int attributes; /* open attributes */
1295 obj_handle_t rootdir; /* root directory */
1296 unsigned int sharing; /* sharing flags */
1297 unsigned int options; /* file options */
1298 VARARG(filename,unicode_str); /* file name */
1299 @REPLY
1300 obj_handle_t handle; /* handle to the file */
1301 @END
1304 /* Allocate a file handle for a Unix fd */
1305 @REQ(alloc_file_handle)
1306 unsigned int access; /* wanted access rights */
1307 unsigned int attributes; /* object attributes */
1308 int fd; /* file descriptor on the client side */
1309 @REPLY
1310 obj_handle_t handle; /* handle to the file */
1311 @END
1314 /* Get the Unix name from a file handle */
1315 @REQ(get_handle_unix_name)
1316 obj_handle_t handle; /* file handle */
1317 @REPLY
1318 data_size_t name_len; /* unix name length */
1319 VARARG(name,string); /* unix name */
1320 @END
1323 /* Get a Unix fd to access a file */
1324 @REQ(get_handle_fd)
1325 obj_handle_t handle; /* handle to the file */
1326 @REPLY
1327 int type; /* file type (see below) */
1328 int cacheable; /* can fd be cached in the client? */
1329 unsigned int access; /* file access rights */
1330 unsigned int options; /* file open options */
1331 @END
1332 enum server_fd_type
1334 FD_TYPE_INVALID, /* invalid file (no associated fd) */
1335 FD_TYPE_FILE, /* regular file */
1336 FD_TYPE_DIR, /* directory */
1337 FD_TYPE_SOCKET, /* socket */
1338 FD_TYPE_SERIAL, /* serial port */
1339 FD_TYPE_PIPE, /* named pipe */
1340 FD_TYPE_MAILSLOT, /* mailslot */
1341 FD_TYPE_CHAR, /* unspecified char device */
1342 FD_TYPE_DEVICE, /* Windows device file */
1343 FD_TYPE_NB_TYPES
1347 /* Retrieve (or allocate) the client-side directory cache entry */
1348 @REQ(get_directory_cache_entry)
1349 obj_handle_t handle; /* handle to the directory */
1350 @REPLY
1351 int entry; /* cache entry on the client side */
1352 VARARG(free,ints); /* entries that can be freed */
1353 @END
1356 /* Flush a file buffers */
1357 @REQ(flush)
1358 async_data_t async; /* async I/O parameters */
1359 @REPLY
1360 obj_handle_t event; /* event set when finished */
1361 @END
1363 /* Query file information */
1364 @REQ(get_file_info)
1365 obj_handle_t handle; /* handle to the file */
1366 unsigned int info_class; /* queried information class */
1367 @REPLY
1368 VARARG(data,bytes); /* file info data */
1369 @END
1371 /* Query volume information */
1372 @REQ(get_volume_info)
1373 obj_handle_t handle; /* handle to the file */
1374 unsigned int info_class; /* queried information class */
1375 @REPLY
1376 VARARG(data,bytes); /* volume info data */
1377 @END
1379 /* Lock a region of a file */
1380 @REQ(lock_file)
1381 obj_handle_t handle; /* handle to the file */
1382 file_pos_t offset; /* offset of start of lock */
1383 file_pos_t count; /* count of bytes to lock */
1384 int shared; /* shared or exclusive lock? */
1385 int wait; /* do we want to wait? */
1386 @REPLY
1387 obj_handle_t handle; /* handle to wait on */
1388 int overlapped; /* is it an overlapped I/O handle? */
1389 @END
1392 /* Unlock a region of a file */
1393 @REQ(unlock_file)
1394 obj_handle_t handle; /* handle to the file */
1395 file_pos_t offset; /* offset of start of unlock */
1396 file_pos_t count; /* count of bytes to unlock */
1397 @END
1400 /* Set socket event parameters */
1401 @REQ(set_socket_event)
1402 obj_handle_t handle; /* handle to the socket */
1403 unsigned int mask; /* event mask */
1404 obj_handle_t event; /* event object */
1405 user_handle_t window; /* window to send the message to */
1406 unsigned int msg; /* message to send */
1407 @END
1410 /* Get socket event parameters */
1411 @REQ(get_socket_event)
1412 obj_handle_t handle; /* handle to the socket */
1413 int service; /* clear pending? */
1414 obj_handle_t c_event; /* event to clear */
1415 @REPLY
1416 unsigned int mask; /* event mask */
1417 unsigned int pmask; /* pending events */
1418 unsigned int state; /* status bits */
1419 VARARG(errors,ints); /* event errors */
1420 @END
1423 /* Get socket info */
1424 @REQ(get_socket_info)
1425 obj_handle_t handle; /* handle to the socket */
1426 @REPLY
1427 int family; /* family, see socket manpage */
1428 int type; /* type, see socket manpage */
1429 int protocol; /* protocol, see socket manpage */
1430 @END
1433 /* Re-enable pending socket events */
1434 @REQ(enable_socket_event)
1435 obj_handle_t handle; /* handle to the socket */
1436 unsigned int mask; /* events to re-enable */
1437 unsigned int sstate; /* status bits to set */
1438 unsigned int cstate; /* status bits to clear */
1439 @END
1441 @REQ(set_socket_deferred)
1442 obj_handle_t handle; /* handle to the socket */
1443 obj_handle_t deferred; /* handle to the socket for which accept() is deferred */
1444 @END
1447 /* Get the input queue wait event */
1448 @REQ(get_console_wait_event)
1449 obj_handle_t handle; /* handle to the console */
1450 @REPLY
1451 obj_handle_t event;
1452 @END
1455 /* Retrieve the next pending console ioctl request */
1456 @REQ(get_next_console_request)
1457 obj_handle_t handle; /* console server handle */
1458 int signal; /* server signal state */
1459 int read; /* 1 if reporting result of blocked read ioctl */
1460 unsigned int status; /* status of previous ioctl */
1461 VARARG(out_data,bytes); /* out_data of previous ioctl */
1462 @REPLY
1463 unsigned int code; /* ioctl code */
1464 unsigned int output; /* output id or 0 for input */
1465 data_size_t out_size; /* ioctl output size */
1466 VARARG(in_data,bytes); /* ioctl in_data */
1467 @END
1470 /* enable directory change notifications */
1471 @REQ(read_directory_changes)
1472 unsigned int filter; /* notification filter */
1473 int subtree; /* watch the subtree? */
1474 int want_data; /* flag indicating whether change data should be collected */
1475 async_data_t async; /* async I/O parameters */
1476 @END
1479 @REQ(read_change)
1480 obj_handle_t handle;
1481 @REPLY
1482 VARARG(events,filesystem_event); /* collected filesystem events */
1483 @END
1486 /* Create a file mapping */
1487 @REQ(create_mapping)
1488 unsigned int access; /* wanted access rights */
1489 unsigned int flags; /* SEC_* flags */
1490 unsigned int file_access; /* file access rights */
1491 mem_size_t size; /* mapping size */
1492 obj_handle_t file_handle; /* file handle */
1493 VARARG(objattr,object_attributes); /* object attributes */
1494 @REPLY
1495 obj_handle_t handle; /* handle to the mapping */
1496 @END
1499 /* Open a mapping */
1500 @REQ(open_mapping)
1501 unsigned int access; /* wanted access rights */
1502 unsigned int attributes; /* object attributes */
1503 obj_handle_t rootdir; /* root directory */
1504 VARARG(name,unicode_str); /* object name */
1505 @REPLY
1506 obj_handle_t handle; /* handle to the mapping */
1507 @END
1510 /* Get information about a file mapping */
1511 @REQ(get_mapping_info)
1512 obj_handle_t handle; /* handle to the mapping */
1513 unsigned int access; /* wanted access rights */
1514 @REPLY
1515 mem_size_t size; /* mapping size */
1516 unsigned int flags; /* SEC_* flags */
1517 obj_handle_t shared_file; /* shared mapping file handle */
1518 VARARG(image,pe_image_info);/* image info for SEC_IMAGE mappings */
1519 @END
1522 /* Add a memory view in the current process */
1523 @REQ(map_view)
1524 obj_handle_t mapping; /* file mapping handle */
1525 unsigned int access; /* wanted access rights */
1526 client_ptr_t base; /* view base address (page-aligned) */
1527 mem_size_t size; /* view size */
1528 file_pos_t start; /* start offset in mapping */
1529 @END
1532 /* Unmap a memory view from the current process */
1533 @REQ(unmap_view)
1534 client_ptr_t base; /* view base address */
1535 @END
1538 /* Get a range of committed pages in a file mapping */
1539 @REQ(get_mapping_committed_range)
1540 client_ptr_t base; /* view base address */
1541 file_pos_t offset; /* starting offset (page-aligned, in bytes) */
1542 @REPLY
1543 mem_size_t size; /* size of range starting at offset (page-aligned, in bytes) */
1544 int committed; /* whether it is a committed range */
1545 @END
1548 /* Add a range to the committed pages in a file mapping */
1549 @REQ(add_mapping_committed_range)
1550 client_ptr_t base; /* view base address */
1551 file_pos_t offset; /* starting offset (page-aligned, in bytes) */
1552 mem_size_t size; /* size to set (page-aligned, in bytes) or 0 if only retrieving */
1553 @END
1556 /* Check if two memory maps are for the same file */
1557 @REQ(is_same_mapping)
1558 client_ptr_t base1; /* first view base address */
1559 client_ptr_t base2; /* second view base address */
1560 @END
1563 struct thread_info
1565 timeout_t start_time;
1566 thread_id_t tid;
1567 int base_priority;
1568 int current_priority;
1569 int unix_tid;
1572 struct process_info
1574 timeout_t start_time;
1575 data_size_t name_len;
1576 int thread_count;
1577 int priority;
1578 process_id_t pid;
1579 process_id_t parent_pid;
1580 int handle_count;
1581 int unix_pid;
1582 int __pad;
1583 /* VARARG(name,unicode_str,name_len); */
1584 /* VARARG(threads,struct thread_info,thread_count); */
1587 /* Get a list of processes and threads currently running */
1588 @REQ(list_processes)
1589 @REPLY
1590 data_size_t info_size;
1591 int process_count;
1592 VARARG(data,process_info,info_size);
1593 @END
1596 /* Wait for a debug event */
1597 @REQ(wait_debug_event)
1598 int get_handle; /* should we alloc a handle for waiting? */
1599 @REPLY
1600 process_id_t pid; /* process id */
1601 thread_id_t tid; /* thread id */
1602 obj_handle_t wait; /* wait handle if no event ready */
1603 VARARG(event,debug_event); /* debug event data */
1604 @END
1607 /* Queue an exception event */
1608 @REQ(queue_exception_event)
1609 int first; /* first chance exception? */
1610 unsigned int code; /* exception code */
1611 unsigned int flags; /* exception flags */
1612 client_ptr_t record; /* exception record */
1613 client_ptr_t address; /* exception address */
1614 data_size_t len; /* size of parameters */
1615 VARARG(params,uints64,len);/* exception parameters */
1616 @REPLY
1617 obj_handle_t handle; /* handle to the queued event */
1618 @END
1621 /* Retrieve the status of an exception event */
1622 @REQ(get_exception_status)
1623 obj_handle_t handle; /* handle to the queued event */
1624 @END
1627 /* Continue a debug event */
1628 @REQ(continue_debug_event)
1629 process_id_t pid; /* process id to continue */
1630 thread_id_t tid; /* thread id to continue */
1631 int status; /* continuation status */
1632 @END
1635 /* Start/stop debugging an existing process */
1636 @REQ(debug_process)
1637 process_id_t pid; /* id of the process to debug */
1638 int attach; /* 1=attaching / 0=detaching from the process */
1639 @END
1642 /* Set debugger kill on exit flag */
1643 @REQ(set_debugger_kill_on_exit)
1644 int kill_on_exit; /* 0=detach/1=kill debuggee when debugger dies */
1645 @END
1648 /* Read data from a process address space */
1649 @REQ(read_process_memory)
1650 obj_handle_t handle; /* process handle */
1651 client_ptr_t addr; /* addr to read from */
1652 @REPLY
1653 VARARG(data,bytes); /* result data */
1654 @END
1657 /* Write data to a process address space */
1658 @REQ(write_process_memory)
1659 obj_handle_t handle; /* process handle */
1660 client_ptr_t addr; /* addr to write to */
1661 VARARG(data,bytes); /* data to write */
1662 @END
1665 /* Create a registry key */
1666 @REQ(create_key)
1667 unsigned int access; /* desired access rights */
1668 unsigned int options; /* creation options */
1669 VARARG(objattr,object_attributes); /* object attributes */
1670 VARARG(class,unicode_str); /* class name */
1671 @REPLY
1672 obj_handle_t hkey; /* handle to the created key */
1673 int created; /* has it been newly created? */
1674 @END
1676 /* Open a registry key */
1677 @REQ(open_key)
1678 obj_handle_t parent; /* handle to the parent key */
1679 unsigned int access; /* desired access rights */
1680 unsigned int attributes; /* object attributes */
1681 VARARG(name,unicode_str); /* key name */
1682 @REPLY
1683 obj_handle_t hkey; /* handle to the open key */
1684 @END
1687 /* Delete a registry key */
1688 @REQ(delete_key)
1689 obj_handle_t hkey; /* handle to the key */
1690 @END
1693 /* Flush a registry key */
1694 @REQ(flush_key)
1695 obj_handle_t hkey; /* handle to the key */
1696 @END
1699 /* Enumerate registry subkeys */
1700 @REQ(enum_key)
1701 obj_handle_t hkey; /* handle to registry key */
1702 int index; /* index of subkey (or -1 for current key) */
1703 int info_class; /* requested information class */
1704 @REPLY
1705 int subkeys; /* number of subkeys */
1706 int max_subkey; /* longest subkey name */
1707 int max_class; /* longest class name */
1708 int values; /* number of values */
1709 int max_value; /* longest value name */
1710 int max_data; /* longest value data */
1711 timeout_t modif; /* last modification time */
1712 data_size_t total; /* total length needed for full name and class */
1713 data_size_t namelen; /* length of key name in bytes */
1714 VARARG(name,unicode_str,namelen); /* key name */
1715 VARARG(class,unicode_str); /* class name */
1716 @END
1719 /* Set a value of a registry key */
1720 @REQ(set_key_value)
1721 obj_handle_t hkey; /* handle to registry key */
1722 int type; /* value type */
1723 data_size_t namelen; /* length of value name in bytes */
1724 VARARG(name,unicode_str,namelen); /* value name */
1725 VARARG(data,bytes); /* value data */
1726 @END
1729 /* Retrieve the value of a registry key */
1730 @REQ(get_key_value)
1731 obj_handle_t hkey; /* handle to registry key */
1732 VARARG(name,unicode_str); /* value name */
1733 @REPLY
1734 int type; /* value type */
1735 data_size_t total; /* total length needed for data */
1736 VARARG(data,bytes); /* value data */
1737 @END
1740 /* Enumerate a value of a registry key */
1741 @REQ(enum_key_value)
1742 obj_handle_t hkey; /* handle to registry key */
1743 int index; /* value index */
1744 int info_class; /* requested information class */
1745 @REPLY
1746 int type; /* value type */
1747 data_size_t total; /* total length needed for full name and data */
1748 data_size_t namelen; /* length of value name in bytes */
1749 VARARG(name,unicode_str,namelen); /* value name */
1750 VARARG(data,bytes); /* value data */
1751 @END
1754 /* Delete a value of a registry key */
1755 @REQ(delete_key_value)
1756 obj_handle_t hkey; /* handle to registry key */
1757 VARARG(name,unicode_str); /* value name */
1758 @END
1761 /* Load a registry branch from a file */
1762 @REQ(load_registry)
1763 obj_handle_t file; /* file to load from */
1764 VARARG(objattr,object_attributes); /* object attributes */
1765 @END
1768 /* UnLoad a registry branch from a file */
1769 @REQ(unload_registry)
1770 obj_handle_t hkey; /* root key to unload to */
1771 @END
1774 /* Save a registry branch to a file */
1775 @REQ(save_registry)
1776 obj_handle_t hkey; /* key to save */
1777 obj_handle_t file; /* file to save to */
1778 @END
1781 /* Add a registry key change notification */
1782 @REQ(set_registry_notification)
1783 obj_handle_t hkey; /* key to watch for changes */
1784 obj_handle_t event; /* event to set */
1785 int subtree; /* should we watch the whole subtree? */
1786 unsigned int filter; /* things to watch */
1787 @END
1790 /* Create a waitable timer */
1791 @REQ(create_timer)
1792 unsigned int access; /* wanted access rights */
1793 int manual; /* manual reset */
1794 VARARG(objattr,object_attributes); /* object attributes */
1795 @REPLY
1796 obj_handle_t handle; /* handle to the timer */
1797 @END
1800 /* Open a waitable timer */
1801 @REQ(open_timer)
1802 unsigned int access; /* wanted access rights */
1803 unsigned int attributes; /* object attributes */
1804 obj_handle_t rootdir; /* root directory */
1805 VARARG(name,unicode_str); /* object name */
1806 @REPLY
1807 obj_handle_t handle; /* handle to the timer */
1808 @END
1810 /* Set a waitable timer */
1811 @REQ(set_timer)
1812 obj_handle_t handle; /* handle to the timer */
1813 timeout_t expire; /* next expiration absolute time */
1814 client_ptr_t callback; /* callback function */
1815 client_ptr_t arg; /* callback argument */
1816 int period; /* timer period in ms */
1817 @REPLY
1818 int signaled; /* was the timer signaled before this call ? */
1819 @END
1821 /* Cancel a waitable timer */
1822 @REQ(cancel_timer)
1823 obj_handle_t handle; /* handle to the timer */
1824 @REPLY
1825 int signaled; /* was the timer signaled before this calltime ? */
1826 @END
1828 /* Get information on a waitable timer */
1829 @REQ(get_timer_info)
1830 obj_handle_t handle; /* handle to the timer */
1831 @REPLY
1832 timeout_t when; /* absolute time when the timer next expires */
1833 int signaled; /* is the timer signaled? */
1834 @END
1837 /* Retrieve the current context of a thread */
1838 @REQ(get_thread_context)
1839 obj_handle_t handle; /* thread or context handle */
1840 unsigned int flags; /* context flags */
1841 @REPLY
1842 int self; /* was it a handle to the current thread? */
1843 obj_handle_t handle; /* pending context handle */
1844 VARARG(context,context); /* thread context */
1845 @END
1848 /* Set the current context of a thread */
1849 @REQ(set_thread_context)
1850 obj_handle_t handle; /* thread handle */
1851 VARARG(context,context); /* thread context */
1852 @REPLY
1853 int self; /* was it a handle to the current thread? */
1854 @END
1857 /* Fetch a selector entry for a thread */
1858 @REQ(get_selector_entry)
1859 obj_handle_t handle; /* thread handle */
1860 int entry; /* LDT entry */
1861 @REPLY
1862 unsigned int base; /* selector base */
1863 unsigned int limit; /* selector limit */
1864 unsigned char flags; /* selector flags */
1865 @END
1868 /* Add an atom */
1869 @REQ(add_atom)
1870 obj_handle_t table; /* which table to add atom to */
1871 VARARG(name,unicode_str); /* atom name */
1872 @REPLY
1873 atom_t atom; /* resulting atom */
1874 @END
1877 /* Delete an atom */
1878 @REQ(delete_atom)
1879 obj_handle_t table; /* which table to delete atom from */
1880 atom_t atom; /* atom handle */
1881 @END
1884 /* Find an atom */
1885 @REQ(find_atom)
1886 obj_handle_t table; /* which table to find atom from */
1887 VARARG(name,unicode_str); /* atom name */
1888 @REPLY
1889 atom_t atom; /* atom handle */
1890 @END
1893 /* Get information about an atom */
1894 @REQ(get_atom_information)
1895 obj_handle_t table; /* which table to find atom from */
1896 atom_t atom; /* atom handle */
1897 @REPLY
1898 int count; /* atom lock count */
1899 int pinned; /* whether the atom has been pinned */
1900 data_size_t total; /* actual length of atom name */
1901 VARARG(name,unicode_str); /* atom name */
1902 @END
1905 /* Set information about an atom */
1906 @REQ(set_atom_information)
1907 obj_handle_t table; /* which table to find atom from */
1908 atom_t atom; /* atom handle */
1909 int pinned; /* whether to bump atom information */
1910 @END
1913 /* Empty an atom table */
1914 @REQ(empty_atom_table)
1915 obj_handle_t table; /* which table to find atom from */
1916 int if_pinned; /* whether to delete pinned atoms */
1917 @END
1920 /* Init an atom table */
1921 @REQ(init_atom_table)
1922 int entries; /* number of entries (only for local) */
1923 @REPLY
1924 obj_handle_t table; /* handle to the atom table */
1925 @END
1928 /* Get the message queue of the current thread */
1929 @REQ(get_msg_queue)
1930 @REPLY
1931 obj_handle_t handle; /* handle to the queue */
1932 @END
1935 /* Set the file descriptor associated to the current thread queue */
1936 @REQ(set_queue_fd)
1937 obj_handle_t handle; /* handle to the file descriptor */
1938 @END
1941 /* Set the current message queue wakeup mask */
1942 @REQ(set_queue_mask)
1943 unsigned int wake_mask; /* wakeup bits mask */
1944 unsigned int changed_mask; /* changed bits mask */
1945 int skip_wait; /* will we skip waiting if signaled? */
1946 @REPLY
1947 unsigned int wake_bits; /* current wake bits */
1948 unsigned int changed_bits; /* current changed bits */
1949 @END
1952 /* Get the current message queue status */
1953 @REQ(get_queue_status)
1954 unsigned int clear_bits; /* should we clear the change bits? */
1955 @REPLY
1956 unsigned int wake_bits; /* wake bits */
1957 unsigned int changed_bits; /* changed bits since last time */
1958 @END
1961 /* Retrieve the process idle event */
1962 @REQ(get_process_idle_event)
1963 obj_handle_t handle; /* process handle */
1964 @REPLY
1965 obj_handle_t event; /* handle to idle event */
1966 @END
1969 /* Send a message to a thread queue */
1970 @REQ(send_message)
1971 thread_id_t id; /* thread id */
1972 int type; /* message type (see below) */
1973 int flags; /* message flags (see below) */
1974 user_handle_t win; /* window handle */
1975 unsigned int msg; /* message code */
1976 lparam_t wparam; /* parameters */
1977 lparam_t lparam; /* parameters */
1978 timeout_t timeout; /* timeout for reply */
1979 VARARG(data,message_data); /* message data for sent messages */
1980 @END
1982 @REQ(post_quit_message)
1983 int exit_code; /* exit code to return */
1984 @END
1986 enum message_type
1988 MSG_ASCII, /* Ascii message (from SendMessageA) */
1989 MSG_UNICODE, /* Unicode message (from SendMessageW) */
1990 MSG_NOTIFY, /* notify message (from SendNotifyMessageW), always Unicode */
1991 MSG_CALLBACK, /* callback message (from SendMessageCallbackW), always Unicode */
1992 MSG_CALLBACK_RESULT,/* result of a callback message */
1993 MSG_OTHER_PROCESS, /* sent from other process, may include vararg data, always Unicode */
1994 MSG_POSTED, /* posted message (from PostMessageW), always Unicode */
1995 MSG_HARDWARE, /* hardware message */
1996 MSG_WINEVENT, /* winevent message */
1997 MSG_HOOK_LL /* low-level hardware hook */
1999 #define SEND_MSG_ABORT_IF_HUNG 0x01
2002 /* Send a hardware message to a thread queue */
2003 @REQ(send_hardware_message)
2004 user_handle_t win; /* window handle */
2005 hw_input_t input; /* input data */
2006 unsigned int flags; /* flags (see below) */
2007 @REPLY
2008 int wait; /* do we need to wait for a reply? */
2009 int prev_x; /* previous cursor position */
2010 int prev_y;
2011 int new_x; /* new cursor position */
2012 int new_y;
2013 VARARG(keystate,bytes); /* global state array for all the keys */
2014 @END
2015 #define SEND_HWMSG_INJECTED 0x01
2018 /* Get a message from the current queue */
2019 @REQ(get_message)
2020 unsigned int flags; /* PM_* flags */
2021 user_handle_t get_win; /* window handle to get */
2022 unsigned int get_first; /* first message code to get */
2023 unsigned int get_last; /* last message code to get */
2024 unsigned int hw_id; /* id of the previous hardware message (or 0) */
2025 unsigned int wake_mask; /* wakeup bits mask */
2026 unsigned int changed_mask; /* changed bits mask */
2027 @REPLY
2028 user_handle_t win; /* window handle */
2029 unsigned int msg; /* message code */
2030 lparam_t wparam; /* parameters */
2031 lparam_t lparam; /* parameters */
2032 int type; /* message type */
2033 int x; /* message x position */
2034 int y; /* message y position */
2035 unsigned int time; /* message time */
2036 unsigned int active_hooks; /* active hooks bitmap */
2037 data_size_t total; /* total size of extra data */
2038 VARARG(data,message_data); /* message data for sent messages */
2039 @END
2042 /* Reply to a sent message */
2043 @REQ(reply_message)
2044 int remove; /* should we remove the message? */
2045 lparam_t result; /* message result */
2046 VARARG(data,bytes); /* message data for sent messages */
2047 @END
2050 /* Accept and remove the current hardware message */
2051 @REQ(accept_hardware_message)
2052 unsigned int hw_id; /* id of the hardware message */
2053 @END
2056 /* Retrieve the reply for the last message sent */
2057 @REQ(get_message_reply)
2058 int cancel; /* cancel message if not ready? */
2059 @REPLY
2060 lparam_t result; /* message result */
2061 VARARG(data,bytes); /* message data for sent messages */
2062 @END
2065 /* Set a window timer */
2066 @REQ(set_win_timer)
2067 user_handle_t win; /* window handle */
2068 unsigned int msg; /* message to post */
2069 unsigned int rate; /* timer rate in ms */
2070 lparam_t id; /* timer id */
2071 lparam_t lparam; /* message lparam (callback proc) */
2072 @REPLY
2073 lparam_t id; /* timer id */
2074 @END
2077 /* Kill a window timer */
2078 @REQ(kill_win_timer)
2079 user_handle_t win; /* window handle */
2080 lparam_t id; /* timer id */
2081 unsigned int msg; /* message to post */
2082 @END
2085 /* check if the thread owning the window is hung */
2086 @REQ(is_window_hung)
2087 user_handle_t win; /* window handle */
2088 @REPLY
2089 int is_hung;
2090 @END
2093 /* Retrieve info about a serial port */
2094 @REQ(get_serial_info)
2095 obj_handle_t handle; /* handle to comm port */
2096 int flags;
2097 @REPLY
2098 unsigned int eventmask;
2099 unsigned int cookie;
2100 unsigned int pending_write;
2101 @END
2104 /* Set info about a serial port */
2105 @REQ(set_serial_info)
2106 obj_handle_t handle; /* handle to comm port */
2107 int flags; /* bitmask to set values (see below) */
2108 @END
2109 #define SERIALINFO_PENDING_WRITE 0x04
2110 #define SERIALINFO_PENDING_WAIT 0x08
2113 /* Create an async I/O */
2114 @REQ(register_async)
2115 int type; /* type of queue to look after */
2116 async_data_t async; /* async I/O parameters */
2117 int count; /* count - usually # of bytes to be read/written */
2118 @END
2119 #define ASYNC_TYPE_READ 0x01
2120 #define ASYNC_TYPE_WRITE 0x02
2121 #define ASYNC_TYPE_WAIT 0x03
2124 /* Cancel all async op on a fd */
2125 @REQ(cancel_async)
2126 obj_handle_t handle; /* handle to comm port, socket or file */
2127 client_ptr_t iosb; /* I/O status block (NULL=all) */
2128 int only_thread; /* cancel matching this thread */
2129 @END
2132 /* Retrieve results of an async */
2133 @REQ(get_async_result)
2134 client_ptr_t user_arg; /* user arg used to identify async */
2135 @REPLY
2136 data_size_t size; /* result size (input or output depending on the operation) */
2137 VARARG(out_data,bytes); /* iosb output data */
2138 @END
2141 /* Perform a read on a file object */
2142 @REQ(read)
2143 async_data_t async; /* async I/O parameters */
2144 file_pos_t pos; /* read position */
2145 @REPLY
2146 obj_handle_t wait; /* handle to wait on for blocking read */
2147 unsigned int options; /* device open options */
2148 VARARG(data,bytes); /* read data */
2149 @END
2152 /* Perform a write on a file object */
2153 @REQ(write)
2154 async_data_t async; /* async I/O parameters */
2155 file_pos_t pos; /* write position */
2156 VARARG(data,bytes); /* write data */
2157 @REPLY
2158 obj_handle_t wait; /* handle to wait on for blocking write */
2159 unsigned int options; /* device open options */
2160 data_size_t size; /* size written */
2161 @END
2164 /* Perform an ioctl on a file */
2165 @REQ(ioctl)
2166 ioctl_code_t code; /* ioctl code */
2167 async_data_t async; /* async I/O parameters */
2168 VARARG(in_data,bytes); /* ioctl input data */
2169 @REPLY
2170 obj_handle_t wait; /* handle to wait on for blocking ioctl */
2171 unsigned int options; /* device open options */
2172 VARARG(out_data,bytes); /* ioctl output data */
2173 @END
2176 /* Store results of an async irp */
2177 @REQ(set_irp_result)
2178 obj_handle_t handle; /* handle to the irp */
2179 unsigned int status; /* status of the irp */
2180 data_size_t size; /* result size (input or output depending on the operation) */
2181 VARARG(data,bytes); /* output data of the irp */
2182 @END
2185 /* Create a named pipe */
2186 @REQ(create_named_pipe)
2187 unsigned int access;
2188 unsigned int options;
2189 unsigned int sharing;
2190 unsigned int maxinstances;
2191 unsigned int outsize;
2192 unsigned int insize;
2193 timeout_t timeout;
2194 unsigned int flags;
2195 VARARG(objattr,object_attributes); /* object attributes */
2196 @REPLY
2197 obj_handle_t handle; /* handle to the pipe */
2198 @END
2200 /* flags in create_named_pipe and get_named_pipe_info */
2201 #define NAMED_PIPE_MESSAGE_STREAM_WRITE 0x0001
2202 #define NAMED_PIPE_MESSAGE_STREAM_READ 0x0002
2203 #define NAMED_PIPE_NONBLOCKING_MODE 0x0004
2204 #define NAMED_PIPE_SERVER_END 0x8000
2206 /* Set named pipe information by handle */
2207 @REQ(set_named_pipe_info)
2208 obj_handle_t handle;
2209 unsigned int flags;
2210 @END
2212 /* Create a window */
2213 @REQ(create_window)
2214 user_handle_t parent; /* parent window */
2215 user_handle_t owner; /* owner window */
2216 atom_t atom; /* class atom */
2217 mod_handle_t instance; /* module instance */
2218 int dpi; /* system DPI */
2219 int awareness; /* thread DPI awareness */
2220 VARARG(class,unicode_str); /* class name */
2221 @REPLY
2222 user_handle_t handle; /* created window */
2223 user_handle_t parent; /* full handle of parent */
2224 user_handle_t owner; /* full handle of owner */
2225 int extra; /* number of extra bytes */
2226 client_ptr_t class_ptr; /* pointer to class in client address space */
2227 int dpi; /* window DPI if not per-monitor aware */
2228 int awareness; /* window DPI awareness */
2229 @END
2232 /* Destroy a window */
2233 @REQ(destroy_window)
2234 user_handle_t handle; /* handle to the window */
2235 @END
2238 /* Retrieve the desktop window for the current thread */
2239 @REQ(get_desktop_window)
2240 int force; /* force creation if it doesn't exist */
2241 @REPLY
2242 user_handle_t top_window; /* handle to the desktop window */
2243 user_handle_t msg_window; /* handle to the top-level HWND_MESSAGE parent */
2244 @END
2247 /* Set a window owner */
2248 @REQ(set_window_owner)
2249 user_handle_t handle; /* handle to the window */
2250 user_handle_t owner; /* new owner */
2251 @REPLY
2252 user_handle_t full_owner; /* full handle of new owner */
2253 user_handle_t prev_owner; /* full handle of previous owner */
2254 @END
2257 /* Get information from a window handle */
2258 @REQ(get_window_info)
2259 user_handle_t handle; /* handle to the window */
2260 @REPLY
2261 user_handle_t full_handle; /* full 32-bit handle */
2262 user_handle_t last_active; /* last active popup */
2263 process_id_t pid; /* process owning the window */
2264 thread_id_t tid; /* thread owning the window */
2265 atom_t atom; /* class atom */
2266 int is_unicode; /* ANSI or unicode */
2267 int dpi; /* window DPI */
2268 int awareness; /* DPI awareness */
2269 @END
2272 /* Set some information in a window */
2273 @REQ(set_window_info)
2274 unsigned short flags; /* flags for fields to set (see below) */
2275 short int is_unicode; /* ANSI or unicode */
2276 user_handle_t handle; /* handle to the window */
2277 unsigned int style; /* window style */
2278 unsigned int ex_style; /* window extended style */
2279 unsigned int id; /* window id */
2280 mod_handle_t instance; /* creator instance */
2281 lparam_t user_data; /* user-specific data */
2282 int extra_offset; /* offset to set in extra bytes */
2283 data_size_t extra_size; /* size to set in extra bytes */
2284 lparam_t extra_value; /* value to set in extra bytes */
2285 @REPLY
2286 unsigned int old_style; /* old window style */
2287 unsigned int old_ex_style; /* old window extended style */
2288 mod_handle_t old_instance; /* old creator instance */
2289 lparam_t old_user_data; /* old user-specific data */
2290 lparam_t old_extra_value; /* old value in extra bytes */
2291 unsigned int old_id; /* old window id */
2292 @END
2293 #define SET_WIN_STYLE 0x01
2294 #define SET_WIN_EXSTYLE 0x02
2295 #define SET_WIN_ID 0x04
2296 #define SET_WIN_INSTANCE 0x08
2297 #define SET_WIN_USERDATA 0x10
2298 #define SET_WIN_EXTRA 0x20
2299 #define SET_WIN_UNICODE 0x40
2302 /* Set the parent of a window */
2303 @REQ(set_parent)
2304 user_handle_t handle; /* handle to the window */
2305 user_handle_t parent; /* handle to the parent */
2306 @REPLY
2307 user_handle_t old_parent; /* old parent window */
2308 user_handle_t full_parent; /* full handle of new parent */
2309 int dpi; /* new window DPI if not per-monitor aware */
2310 int awareness; /* new DPI awareness */
2311 @END
2314 /* Get a list of the window parents, up to the root of the tree */
2315 @REQ(get_window_parents)
2316 user_handle_t handle; /* handle to the window */
2317 @REPLY
2318 int count; /* total count of parents */
2319 VARARG(parents,user_handles); /* parent handles */
2320 @END
2323 /* Get a list of the window children */
2324 @REQ(get_window_children)
2325 obj_handle_t desktop; /* handle to desktop */
2326 user_handle_t parent; /* parent window */
2327 atom_t atom; /* class atom for the listed children */
2328 thread_id_t tid; /* thread owning the listed children */
2329 VARARG(class,unicode_str); /* class name */
2330 @REPLY
2331 int count; /* total count of children */
2332 VARARG(children,user_handles); /* children handles */
2333 @END
2336 /* Get a list of the window children that contain a given point */
2337 @REQ(get_window_children_from_point)
2338 user_handle_t parent; /* parent window */
2339 int x; /* point in parent coordinates */
2340 int y;
2341 int dpi; /* dpi for the point coordinates */
2342 @REPLY
2343 int count; /* total count of children */
2344 VARARG(children,user_handles); /* children handles */
2345 @END
2348 /* Get window tree information from a window handle */
2349 @REQ(get_window_tree)
2350 user_handle_t handle; /* handle to the window */
2351 @REPLY
2352 user_handle_t parent; /* parent window */
2353 user_handle_t owner; /* owner window */
2354 user_handle_t next_sibling; /* next sibling in Z-order */
2355 user_handle_t prev_sibling; /* prev sibling in Z-order */
2356 user_handle_t first_sibling; /* first sibling in Z-order */
2357 user_handle_t last_sibling; /* last sibling in Z-order */
2358 user_handle_t first_child; /* first child */
2359 user_handle_t last_child; /* last child */
2360 @END
2362 /* Set the position and Z order of a window */
2363 @REQ(set_window_pos)
2364 unsigned short swp_flags; /* SWP_* flags */
2365 unsigned short paint_flags; /* paint flags (see below) */
2366 user_handle_t handle; /* handle to the window */
2367 user_handle_t previous; /* previous window in Z order */
2368 rectangle_t window; /* window rectangle (in parent coords) */
2369 rectangle_t client; /* client rectangle (in parent coords) */
2370 VARARG(valid,rectangles); /* valid rectangles from WM_NCCALCSIZE (in parent coords) */
2371 @REPLY
2372 unsigned int new_style; /* new window style */
2373 unsigned int new_ex_style; /* new window extended style */
2374 user_handle_t surface_win; /* parent window that holds the surface */
2375 int needs_update; /* whether the surface region needs an update */
2376 @END
2377 #define SET_WINPOS_PAINT_SURFACE 0x01 /* window has a paintable surface */
2378 #define SET_WINPOS_PIXEL_FORMAT 0x02 /* window has a custom pixel format */
2380 /* Get the window and client rectangles of a window */
2381 @REQ(get_window_rectangles)
2382 user_handle_t handle; /* handle to the window */
2383 int relative; /* coords relative to (see below) */
2384 int dpi; /* DPI to map to, or zero for per-monitor DPI */
2385 @REPLY
2386 rectangle_t window; /* window rectangle */
2387 rectangle_t client; /* client rectangle */
2388 @END
2389 enum coords_relative
2391 COORDS_CLIENT, /* relative to client area */
2392 COORDS_WINDOW, /* relative to whole window area */
2393 COORDS_PARENT, /* relative to parent's client area */
2394 COORDS_SCREEN /* relative to screen origin */
2398 /* Get the window text */
2399 @REQ(get_window_text)
2400 user_handle_t handle; /* handle to the window */
2401 @REPLY
2402 data_size_t length; /* total length in WCHARs */
2403 VARARG(text,unicode_str); /* window text */
2404 @END
2407 /* Set the window text */
2408 @REQ(set_window_text)
2409 user_handle_t handle; /* handle to the window */
2410 VARARG(text,unicode_str); /* window text */
2411 @END
2414 /* Get the coordinates offset between two windows */
2415 @REQ(get_windows_offset)
2416 user_handle_t from; /* handle to the first window */
2417 user_handle_t to; /* handle to the second window */
2418 int dpi; /* DPI to map to, or zero for per-monitor DPI */
2419 @REPLY
2420 int x; /* x coordinate offset */
2421 int y; /* y coordinate offset */
2422 int mirror; /* whether to mirror the x coordinate */
2423 @END
2426 /* Get the visible region of a window */
2427 @REQ(get_visible_region)
2428 user_handle_t window; /* handle to the window */
2429 unsigned int flags; /* DCX flags */
2430 @REPLY
2431 user_handle_t top_win; /* top window to clip against */
2432 rectangle_t top_rect; /* top window visible rect with screen coords */
2433 rectangle_t win_rect; /* window rect in screen coords */
2434 unsigned int paint_flags; /* paint flags (from SET_WINPOS_* flags) */
2435 data_size_t total_size; /* total size of the resulting region */
2436 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2437 @END
2440 /* Get the visible surface region of a window */
2441 @REQ(get_surface_region)
2442 user_handle_t window; /* handle to the window */
2443 @REPLY
2444 rectangle_t visible_rect; /* window visible rect in screen coords */
2445 data_size_t total_size; /* total size of the resulting region */
2446 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2447 @END
2450 /* Get the window region */
2451 @REQ(get_window_region)
2452 user_handle_t window; /* handle to the window */
2453 @REPLY
2454 data_size_t total_size; /* total size of the resulting region */
2455 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2456 @END
2459 /* Set the window region */
2460 @REQ(set_window_region)
2461 user_handle_t window; /* handle to the window */
2462 int redraw; /* redraw the window? */
2463 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2464 @END
2467 /* Get the window update region */
2468 @REQ(get_update_region)
2469 user_handle_t window; /* handle to the window */
2470 user_handle_t from_child; /* child to start searching from */
2471 unsigned int flags; /* update flags (see below) */
2472 @REPLY
2473 user_handle_t child; /* child to repaint (or window itself) */
2474 unsigned int flags; /* resulting update flags (see below) */
2475 data_size_t total_size; /* total size of the resulting region */
2476 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2477 @END
2478 #define UPDATE_NONCLIENT 0x001 /* get region for repainting non-client area */
2479 #define UPDATE_ERASE 0x002 /* get region for erasing client area */
2480 #define UPDATE_PAINT 0x004 /* get region for painting client area */
2481 #define UPDATE_INTERNALPAINT 0x008 /* get region if internal paint is pending */
2482 #define UPDATE_ALLCHILDREN 0x010 /* force repaint of all children */
2483 #define UPDATE_NOCHILDREN 0x020 /* don't try to repaint any children */
2484 #define UPDATE_NOREGION 0x040 /* don't return a region, only the flags */
2485 #define UPDATE_DELAYED_ERASE 0x080 /* still needs erase after BeginPaint */
2486 #define UPDATE_CLIPCHILDREN 0x100 /* remove clipped children from the update region */
2489 /* Update the z order of a window so that a given rectangle is fully visible */
2490 @REQ(update_window_zorder)
2491 user_handle_t window; /* handle to the window */
2492 rectangle_t rect; /* rectangle that must be visible (in client coords) */
2493 @END
2496 /* Mark parts of a window as needing a redraw */
2497 @REQ(redraw_window)
2498 user_handle_t window; /* handle to the window */
2499 unsigned int flags; /* RDW_* flags */
2500 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2501 @END
2504 /* Set a window property */
2505 @REQ(set_window_property)
2506 user_handle_t window; /* handle to the window */
2507 lparam_t data; /* data to store */
2508 atom_t atom; /* property atom (if no name specified) */
2509 VARARG(name,unicode_str); /* property name */
2510 @END
2513 /* Remove a window property */
2514 @REQ(remove_window_property)
2515 user_handle_t window; /* handle to the window */
2516 atom_t atom; /* property atom (if no name specified) */
2517 VARARG(name,unicode_str); /* property name */
2518 @REPLY
2519 lparam_t data; /* data stored in property */
2520 @END
2523 /* Get a window property */
2524 @REQ(get_window_property)
2525 user_handle_t window; /* handle to the window */
2526 atom_t atom; /* property atom (if no name specified) */
2527 VARARG(name,unicode_str); /* property name */
2528 @REPLY
2529 lparam_t data; /* data stored in property */
2530 @END
2533 /* Get the list of properties of a window */
2534 @REQ(get_window_properties)
2535 user_handle_t window; /* handle to the window */
2536 @REPLY
2537 int total; /* total number of properties */
2538 VARARG(props,properties); /* list of properties */
2539 @END
2542 /* Create a window station */
2543 @REQ(create_winstation)
2544 unsigned int flags; /* window station flags */
2545 unsigned int access; /* wanted access rights */
2546 unsigned int attributes; /* object attributes */
2547 obj_handle_t rootdir; /* root directory */
2548 VARARG(name,unicode_str); /* object name */
2549 @REPLY
2550 obj_handle_t handle; /* handle to the window station */
2551 @END
2554 /* Open a handle to a window station */
2555 @REQ(open_winstation)
2556 unsigned int access; /* wanted access rights */
2557 unsigned int attributes; /* object attributes */
2558 obj_handle_t rootdir; /* root directory */
2559 VARARG(name,unicode_str); /* object name */
2560 @REPLY
2561 obj_handle_t handle; /* handle to the window station */
2562 @END
2565 /* Close a window station */
2566 @REQ(close_winstation)
2567 obj_handle_t handle; /* handle to the window station */
2568 @END
2571 /* Get the process current window station */
2572 @REQ(get_process_winstation)
2573 @REPLY
2574 obj_handle_t handle; /* handle to the window station */
2575 @END
2578 /* Set the process current window station */
2579 @REQ(set_process_winstation)
2580 obj_handle_t handle; /* handle to the window station */
2581 @END
2584 /* Enumerate window stations */
2585 @REQ(enum_winstation)
2586 unsigned int index; /* current index */
2587 @REPLY
2588 unsigned int next; /* next index */
2589 VARARG(name,unicode_str); /* window station name */
2590 @END
2593 /* Create a desktop */
2594 @REQ(create_desktop)
2595 unsigned int flags; /* desktop flags */
2596 unsigned int access; /* wanted access rights */
2597 unsigned int attributes; /* object attributes */
2598 VARARG(name,unicode_str); /* object name */
2599 @REPLY
2600 obj_handle_t handle; /* handle to the desktop */
2601 @END
2604 /* Open a handle to a desktop */
2605 @REQ(open_desktop)
2606 obj_handle_t winsta; /* window station to open (null allowed) */
2607 unsigned int flags; /* desktop flags */
2608 unsigned int access; /* wanted access rights */
2609 unsigned int attributes; /* object attributes */
2610 VARARG(name,unicode_str); /* object name */
2611 @REPLY
2612 obj_handle_t handle; /* handle to the desktop */
2613 @END
2616 /* Open a handle to current input desktop */
2617 @REQ(open_input_desktop)
2618 unsigned int flags; /* desktop flags */
2619 unsigned int access; /* wanted access rights */
2620 unsigned int attributes; /* object attributes */
2621 @REPLY
2622 obj_handle_t handle; /* handle to the desktop */
2623 @END
2626 /* Close a desktop */
2627 @REQ(close_desktop)
2628 obj_handle_t handle; /* handle to the desktop */
2629 @END
2632 /* Get the thread current desktop */
2633 @REQ(get_thread_desktop)
2634 thread_id_t tid; /* thread id */
2635 @REPLY
2636 obj_handle_t handle; /* handle to the desktop */
2637 @END
2640 /* Set the thread current desktop */
2641 @REQ(set_thread_desktop)
2642 obj_handle_t handle; /* handle to the desktop */
2643 @END
2646 /* Enumerate desktops */
2647 @REQ(enum_desktop)
2648 obj_handle_t winstation; /* handle to the window station */
2649 unsigned int index; /* current index */
2650 @REPLY
2651 unsigned int next; /* next index */
2652 VARARG(name,unicode_str); /* window station name */
2653 @END
2656 /* Get/set information about a user object (window station or desktop) */
2657 @REQ(set_user_object_info)
2658 obj_handle_t handle; /* handle to the object */
2659 unsigned int flags; /* information to set/get */
2660 unsigned int obj_flags; /* new object flags */
2661 @REPLY
2662 int is_desktop; /* is object a desktop? */
2663 unsigned int old_obj_flags; /* old object flags */
2664 VARARG(name,unicode_str); /* object name */
2665 @END
2666 #define SET_USER_OBJECT_SET_FLAGS 1
2667 #define SET_USER_OBJECT_GET_FULL_NAME 2
2670 /* Register a hotkey */
2671 @REQ(register_hotkey)
2672 user_handle_t window; /* handle to the window */
2673 int id; /* hotkey identifier */
2674 unsigned int flags; /* modifier keys */
2675 unsigned int vkey; /* virtual key code */
2676 @REPLY
2677 int replaced; /* did we replace an existing hotkey? */
2678 unsigned int flags; /* flags of replaced hotkey */
2679 unsigned int vkey; /* virtual key code of replaced hotkey */
2680 @END
2683 /* Unregister a hotkey */
2684 @REQ(unregister_hotkey)
2685 user_handle_t window; /* handle to the window */
2686 int id; /* hotkey identifier */
2687 @REPLY
2688 unsigned int flags; /* flags of removed hotkey */
2689 unsigned int vkey; /* virtual key code of removed hotkey */
2690 @END
2693 /* Attach (or detach) thread inputs */
2694 @REQ(attach_thread_input)
2695 thread_id_t tid_from; /* thread to be attached */
2696 thread_id_t tid_to; /* thread to which tid_from should be attached */
2697 int attach; /* is it an attach? */
2698 @END
2701 /* Get input data for a given thread */
2702 @REQ(get_thread_input)
2703 thread_id_t tid; /* id of thread */
2704 @REPLY
2705 user_handle_t focus; /* handle to the focus window */
2706 user_handle_t capture; /* handle to the capture window */
2707 user_handle_t active; /* handle to the active window */
2708 user_handle_t foreground; /* handle to the global foreground window */
2709 user_handle_t menu_owner; /* handle to the menu owner */
2710 user_handle_t move_size; /* handle to the moving/resizing window */
2711 user_handle_t caret; /* handle to the caret window */
2712 user_handle_t cursor; /* handle to the cursor */
2713 int show_count; /* cursor show count */
2714 rectangle_t rect; /* caret rectangle */
2715 @END
2718 /* Get the time of the last input event */
2719 @REQ(get_last_input_time)
2720 @REPLY
2721 unsigned int time;
2722 @END
2725 /* Retrieve queue keyboard state for a given thread */
2726 @REQ(get_key_state)
2727 thread_id_t tid; /* id of thread */
2728 int key; /* optional key code or -1 */
2729 @REPLY
2730 unsigned char state; /* state of specified key */
2731 VARARG(keystate,bytes); /* state array for all the keys */
2732 @END
2734 /* Set queue keyboard state for a given thread */
2735 @REQ(set_key_state)
2736 thread_id_t tid; /* id of thread */
2737 int async; /* whether to change the async state too */
2738 VARARG(keystate,bytes); /* state array for all the keys */
2739 @END
2741 /* Set the system foreground window */
2742 @REQ(set_foreground_window)
2743 user_handle_t handle; /* handle to the foreground window */
2744 @REPLY
2745 user_handle_t previous; /* handle to the previous foreground window */
2746 int send_msg_old; /* whether we have to send a msg to the old window */
2747 int send_msg_new; /* whether we have to send a msg to the new window */
2748 @END
2750 /* Set the current thread focus window */
2751 @REQ(set_focus_window)
2752 user_handle_t handle; /* handle to the focus window */
2753 @REPLY
2754 user_handle_t previous; /* handle to the previous focus window */
2755 @END
2757 /* Set the current thread active window */
2758 @REQ(set_active_window)
2759 user_handle_t handle; /* handle to the active window */
2760 @REPLY
2761 user_handle_t previous; /* handle to the previous active window */
2762 @END
2764 /* Set the current thread capture window */
2765 @REQ(set_capture_window)
2766 user_handle_t handle; /* handle to the capture window */
2767 unsigned int flags; /* capture flags (see below) */
2768 @REPLY
2769 user_handle_t previous; /* handle to the previous capture window */
2770 user_handle_t full_handle; /* full 32-bit handle of new capture window */
2771 @END
2772 #define CAPTURE_MENU 0x01 /* capture is for a menu */
2773 #define CAPTURE_MOVESIZE 0x02 /* capture is for moving/resizing */
2776 /* Set the current thread caret window */
2777 @REQ(set_caret_window)
2778 user_handle_t handle; /* handle to the caret window */
2779 int width; /* caret width */
2780 int height; /* caret height */
2781 @REPLY
2782 user_handle_t previous; /* handle to the previous caret window */
2783 rectangle_t old_rect; /* previous caret rectangle */
2784 int old_hide; /* previous hide count */
2785 int old_state; /* previous caret state (1=on, 0=off) */
2786 @END
2789 /* Set the current thread caret information */
2790 @REQ(set_caret_info)
2791 unsigned int flags; /* caret flags (see below) */
2792 user_handle_t handle; /* handle to the caret window */
2793 int x; /* caret x position */
2794 int y; /* caret y position */
2795 int hide; /* increment for hide count (can be negative to show it) */
2796 int state; /* caret state (see below) */
2797 @REPLY
2798 user_handle_t full_handle; /* handle to the current caret window */
2799 rectangle_t old_rect; /* previous caret rectangle */
2800 int old_hide; /* previous hide count */
2801 int old_state; /* previous caret state (1=on, 0=off) */
2802 @END
2803 #define SET_CARET_POS 0x01 /* set the caret position from x,y */
2804 #define SET_CARET_HIDE 0x02 /* increment the caret hide count */
2805 #define SET_CARET_STATE 0x04 /* set the caret on/off state */
2806 enum caret_state
2808 CARET_STATE_OFF, /* off */
2809 CARET_STATE_ON, /* on */
2810 CARET_STATE_TOGGLE, /* toggle current state */
2811 CARET_STATE_ON_IF_MOVED /* on if the position differs, unchanged otherwise */
2815 /* Set a window hook */
2816 @REQ(set_hook)
2817 int id; /* id of the hook */
2818 process_id_t pid; /* id of process to set the hook into */
2819 thread_id_t tid; /* id of thread to set the hook into */
2820 int event_min;
2821 int event_max;
2822 client_ptr_t proc; /* hook procedure */
2823 int flags;
2824 int unicode; /* is it a unicode hook? */
2825 VARARG(module,unicode_str); /* module name */
2826 @REPLY
2827 user_handle_t handle; /* handle to the hook */
2828 unsigned int active_hooks; /* active hooks bitmap */
2829 @END
2832 /* Remove a window hook */
2833 @REQ(remove_hook)
2834 user_handle_t handle; /* handle to the hook */
2835 client_ptr_t proc; /* hook procedure if handle is 0 */
2836 int id; /* id of the hook if handle is 0 */
2837 @REPLY
2838 unsigned int active_hooks; /* active hooks bitmap */
2839 @END
2842 /* Start calling a hook chain */
2843 @REQ(start_hook_chain)
2844 int id; /* id of the hook */
2845 int event; /* signalled event */
2846 user_handle_t window; /* handle to the event window */
2847 int object_id; /* object id for out of context winevent */
2848 int child_id; /* child id for out of context winevent */
2849 @REPLY
2850 user_handle_t handle; /* handle to the next hook */
2851 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2852 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2853 int unicode; /* is it a unicode hook? */
2854 client_ptr_t proc; /* hook procedure */
2855 unsigned int active_hooks; /* active hooks bitmap */
2856 VARARG(module,unicode_str); /* module name */
2857 @END
2860 /* Finished calling a hook chain */
2861 @REQ(finish_hook_chain)
2862 int id; /* id of the hook */
2863 @END
2866 /* Get the hook information */
2867 @REQ(get_hook_info)
2868 user_handle_t handle; /* handle to the current hook */
2869 int get_next; /* do we want info about current or next hook? */
2870 int event; /* signalled event */
2871 user_handle_t window; /* handle to the event window */
2872 int object_id; /* object id for out of context winevent */
2873 int child_id; /* child id for out of context winevent */
2874 @REPLY
2875 user_handle_t handle; /* handle to the hook */
2876 int id; /* id of the hook */
2877 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2878 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2879 client_ptr_t proc; /* hook procedure */
2880 int unicode; /* is it a unicode hook? */
2881 VARARG(module,unicode_str); /* module name */
2882 @END
2885 /* Create a window class */
2886 @REQ(create_class)
2887 int local; /* is it a local class? */
2888 atom_t atom; /* class atom */
2889 unsigned int style; /* class style */
2890 mod_handle_t instance; /* module instance */
2891 int extra; /* number of extra class bytes */
2892 int win_extra; /* number of window extra bytes */
2893 client_ptr_t client_ptr; /* pointer to class in client address space */
2894 data_size_t name_offset; /* base class name offset for specified atom */
2895 VARARG(name,unicode_str); /* class name */
2896 @REPLY
2897 atom_t atom; /* resulting class atom */
2898 @END
2901 /* Destroy a window class */
2902 @REQ(destroy_class)
2903 atom_t atom; /* class atom */
2904 mod_handle_t instance; /* module instance */
2905 VARARG(name,unicode_str); /* class name */
2906 @REPLY
2907 client_ptr_t client_ptr; /* pointer to class in client address space */
2908 @END
2911 /* Set some information in a class */
2912 @REQ(set_class_info)
2913 user_handle_t window; /* handle to the window */
2914 unsigned int flags; /* flags for info to set (see below) */
2915 atom_t atom; /* class atom */
2916 unsigned int style; /* class style */
2917 int win_extra; /* number of window extra bytes */
2918 mod_handle_t instance; /* module instance */
2919 int extra_offset; /* offset to set in extra bytes */
2920 data_size_t extra_size; /* size to set in extra bytes */
2921 lparam_t extra_value; /* value to set in extra bytes */
2922 @REPLY
2923 atom_t old_atom; /* previous class atom */
2924 atom_t base_atom; /* base class atom */
2925 mod_handle_t old_instance; /* previous module instance */
2926 lparam_t old_extra_value; /* old value in extra bytes */
2927 unsigned int old_style; /* previous class style */
2928 int old_extra; /* previous number of class extra bytes */
2929 int old_win_extra; /* previous number of window extra bytes */
2930 @END
2931 #define SET_CLASS_ATOM 0x0001
2932 #define SET_CLASS_STYLE 0x0002
2933 #define SET_CLASS_WINEXTRA 0x0004
2934 #define SET_CLASS_INSTANCE 0x0008
2935 #define SET_CLASS_EXTRA 0x0010
2938 /* Open the clipboard */
2939 @REQ(open_clipboard)
2940 user_handle_t window; /* clipboard window */
2941 @REPLY
2942 user_handle_t owner; /* current clipboard owner */
2943 @END
2946 /* Close the clipboard */
2947 @REQ(close_clipboard)
2948 @REPLY
2949 user_handle_t viewer; /* first clipboard viewer */
2950 user_handle_t owner; /* current clipboard owner */
2951 @END
2954 /* Empty the clipboard and grab ownership */
2955 @REQ(empty_clipboard)
2956 @END
2959 /* Add a data format to the clipboard */
2960 @REQ(set_clipboard_data)
2961 unsigned int format; /* clipboard format of the data */
2962 unsigned int lcid; /* locale id to use for synthesizing text formats */
2963 VARARG(data,bytes); /* data contents */
2964 @REPLY
2965 unsigned int seqno; /* sequence number for the set data */
2966 @END
2969 /* Fetch a data format from the clipboard */
2970 @REQ(get_clipboard_data)
2971 unsigned int format; /* clipboard format of the data */
2972 int render; /* will we try to render it if missing? */
2973 int cached; /* do we already have it in the client-side cache? */
2974 unsigned int seqno; /* sequence number for the data in the cache */
2975 @REPLY
2976 unsigned int from; /* for synthesized data, format to generate it from */
2977 user_handle_t owner; /* clipboard owner for delayed-rendered formats */
2978 unsigned int seqno; /* sequence number for the originally set data */
2979 data_size_t total; /* total data size */
2980 VARARG(data,bytes); /* data contents */
2981 @END
2984 /* Retrieve a list of available formats */
2985 @REQ(get_clipboard_formats)
2986 unsigned int format; /* specific format to query, return all if 0 */
2987 @REPLY
2988 unsigned int count; /* count of available formats */
2989 VARARG(formats,uints); /* array of available formats */
2990 @END
2993 /* Retrieve the next available format */
2994 @REQ(enum_clipboard_formats)
2995 unsigned int previous; /* previous format, or first if 0 */
2996 @REPLY
2997 unsigned int format; /* next format */
2998 @END
3001 /* Release ownership of the clipboard */
3002 @REQ(release_clipboard)
3003 user_handle_t owner; /* clipboard owner to release */
3004 @REPLY
3005 user_handle_t viewer; /* first clipboard viewer */
3006 user_handle_t owner; /* current clipboard owner */
3007 @END
3010 /* Get clipboard information */
3011 @REQ(get_clipboard_info)
3012 @REPLY
3013 user_handle_t window; /* clipboard window */
3014 user_handle_t owner; /* clipboard owner */
3015 user_handle_t viewer; /* clipboard viewer */
3016 unsigned int seqno; /* current sequence number */
3017 @END
3020 /* Set the clipboard viewer window */
3021 @REQ(set_clipboard_viewer)
3022 user_handle_t viewer; /* clipboard viewer */
3023 user_handle_t previous; /* if non-zero, check that this was the previous viewer */
3024 @REPLY
3025 user_handle_t old_viewer; /* previous clipboard viewer */
3026 user_handle_t owner; /* clipboard owner */
3027 @END
3030 /* Add a clipboard listener window */
3031 @REQ(add_clipboard_listener)
3032 user_handle_t window; /* clipboard listener window */
3033 @END
3036 /* Remove a clipboard listener window */
3037 @REQ(remove_clipboard_listener)
3038 user_handle_t window; /* clipboard listener window */
3039 @END
3042 /* Open a security token */
3043 @REQ(open_token)
3044 obj_handle_t handle; /* handle to the thread or process */
3045 unsigned int access; /* access rights to the new token */
3046 unsigned int attributes;/* object attributes */
3047 unsigned int flags; /* flags (see below) */
3048 @REPLY
3049 obj_handle_t token; /* handle to the token */
3050 @END
3051 #define OPEN_TOKEN_THREAD 1
3052 #define OPEN_TOKEN_AS_SELF 2
3055 /* Set/get the global windows */
3056 @REQ(set_global_windows)
3057 unsigned int flags; /* flags for fields to set (see below) */
3058 user_handle_t shell_window; /* handle to the new shell window */
3059 user_handle_t shell_listview; /* handle to the new shell listview window */
3060 user_handle_t progman_window; /* handle to the new program manager window */
3061 user_handle_t taskman_window; /* handle to the new task manager window */
3062 @REPLY
3063 user_handle_t old_shell_window; /* handle to the shell window */
3064 user_handle_t old_shell_listview; /* handle to the shell listview window */
3065 user_handle_t old_progman_window; /* handle to the new program manager window */
3066 user_handle_t old_taskman_window; /* handle to the new task manager window */
3067 @END
3068 #define SET_GLOBAL_SHELL_WINDOWS 0x01 /* set both main shell and listview windows */
3069 #define SET_GLOBAL_PROGMAN_WINDOW 0x02
3070 #define SET_GLOBAL_TASKMAN_WINDOW 0x04
3072 /* Adjust the privileges held by a token */
3073 @REQ(adjust_token_privileges)
3074 obj_handle_t handle; /* handle to the token */
3075 int disable_all; /* disable all privileges? */
3076 int get_modified_state; /* get modified privileges? */
3077 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to enable/disable/remove */
3078 @REPLY
3079 unsigned int len; /* total length in bytes required to store token privileges */
3080 VARARG(privileges,LUID_AND_ATTRIBUTES); /* modified privileges */
3081 @END
3083 /* Retrieves the set of privileges held by or available to a token */
3084 @REQ(get_token_privileges)
3085 obj_handle_t handle; /* handle to the token */
3086 @REPLY
3087 unsigned int len; /* total length in bytes required to store token privileges */
3088 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
3089 @END
3091 /* Check the token has the required privileges */
3092 @REQ(check_token_privileges)
3093 obj_handle_t handle; /* handle to the token */
3094 int all_required; /* are all the privileges required for the check to succeed? */
3095 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to check */
3096 @REPLY
3097 int has_privileges; /* does the token have the required privileges? */
3098 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
3099 @END
3101 @REQ(duplicate_token)
3102 obj_handle_t handle; /* handle to the token to duplicate */
3103 unsigned int access; /* access rights to the new token */
3104 int primary; /* is the new token to be a primary one? */
3105 int impersonation_level; /* impersonation level of the new token */
3106 VARARG(objattr,object_attributes); /* object attributes */
3107 @REPLY
3108 obj_handle_t new_handle; /* duplicated handle */
3109 @END
3111 @REQ(filter_token)
3112 obj_handle_t handle; /* handle to the token to duplicate */
3113 unsigned int flags; /* flags */
3114 data_size_t privileges_size; /* size of privileges */
3115 VARARG(privileges,LUID_AND_ATTRIBUTES,privileges_size); /* privileges to remove from new token */
3116 VARARG(disable_sids,SID); /* array of groups to remove from new token */
3117 @REPLY
3118 obj_handle_t new_handle; /* filtered handle */
3119 @END
3121 @REQ(access_check)
3122 obj_handle_t handle; /* handle to the token */
3123 unsigned int desired_access; /* desired access to the object */
3124 unsigned int mapping_read; /* mapping from generic read to specific rights */
3125 unsigned int mapping_write; /* mapping from generic write to specific rights */
3126 unsigned int mapping_execute; /* mapping from generic execute to specific rights */
3127 unsigned int mapping_all; /* mapping from generic all to specific rights */
3128 VARARG(sd,security_descriptor); /* security descriptor to check */
3129 @REPLY
3130 unsigned int access_granted; /* access rights actually granted */
3131 unsigned int access_status; /* was access granted? */
3132 unsigned int privileges_len; /* length needed to store privileges */
3133 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges used during access check */
3134 @END
3136 @REQ(get_token_sid)
3137 obj_handle_t handle; /* handle to the token */
3138 unsigned int which_sid; /* which SID to retrieve from the token */
3139 @REPLY
3140 data_size_t sid_len; /* length needed to store sid */
3141 VARARG(sid,SID); /* the sid specified by which_sid from the token */
3142 @END
3144 @REQ(get_token_groups)
3145 obj_handle_t handle; /* handle to the token */
3146 @REPLY
3147 data_size_t user_len; /* length needed to store user */
3148 VARARG(user,token_groups); /* groups the token's user belongs to */
3149 @END
3151 @REQ(get_token_default_dacl)
3152 obj_handle_t handle; /* handle to the token */
3153 @REPLY
3154 data_size_t acl_len; /* length needed to store access control list */
3155 VARARG(acl,ACL); /* access control list */
3156 @END
3158 @REQ(set_token_default_dacl)
3159 obj_handle_t handle; /* handle to the token */
3160 VARARG(acl,ACL); /* default dacl to set */
3161 @END
3163 @REQ(set_security_object)
3164 obj_handle_t handle; /* handle to the object */
3165 unsigned int security_info; /* which parts of security descriptor to set */
3166 VARARG(sd,security_descriptor); /* security descriptor to set */
3167 @END
3169 @REQ(get_security_object)
3170 obj_handle_t handle; /* handle to the object */
3171 unsigned int security_info; /* which parts of security descriptor to get */
3172 @REPLY
3173 unsigned int sd_len; /* buffer size needed for sd */
3174 VARARG(sd,security_descriptor); /* retrieved security descriptor */
3175 @END
3178 struct handle_info
3180 process_id_t owner;
3181 obj_handle_t handle;
3182 unsigned int access;
3185 /* Return a list of all opened handles */
3186 @REQ(get_system_handles)
3187 @REPLY
3188 unsigned int count; /* number of handles */
3189 VARARG(data,handle_infos); /* array of handle_infos */
3190 @END
3193 /* Create a mailslot */
3194 @REQ(create_mailslot)
3195 unsigned int access; /* wanted access rights */
3196 timeout_t read_timeout;
3197 unsigned int max_msgsize;
3198 VARARG(objattr,object_attributes); /* object attributes */
3199 @REPLY
3200 obj_handle_t handle; /* handle to the mailslot */
3201 @END
3204 /* Set mailslot information */
3205 @REQ(set_mailslot_info)
3206 obj_handle_t handle; /* handle to the mailslot */
3207 timeout_t read_timeout;
3208 unsigned int flags;
3209 @REPLY
3210 timeout_t read_timeout;
3211 unsigned int max_msgsize;
3212 @END
3213 #define MAILSLOT_SET_READ_TIMEOUT 1
3216 /* Create a directory object */
3217 @REQ(create_directory)
3218 unsigned int access; /* access flags */
3219 VARARG(objattr,object_attributes); /* object attributes */
3220 @REPLY
3221 obj_handle_t handle; /* handle to the directory */
3222 @END
3225 /* Open a directory object */
3226 @REQ(open_directory)
3227 unsigned int access; /* access flags */
3228 unsigned int attributes; /* object attributes */
3229 obj_handle_t rootdir; /* root directory */
3230 VARARG(directory_name,unicode_str); /* Directory name */
3231 @REPLY
3232 obj_handle_t handle; /* handle to the directory */
3233 @END
3236 /* Get a directory entry by index */
3237 @REQ(get_directory_entry)
3238 obj_handle_t handle; /* handle to the directory */
3239 unsigned int index; /* entry index */
3240 @REPLY
3241 data_size_t name_len; /* length of the entry name in bytes */
3242 VARARG(name,unicode_str,name_len); /* entry name */
3243 VARARG(type,unicode_str); /* entry type */
3244 @END
3247 /* Create a symbolic link object */
3248 @REQ(create_symlink)
3249 unsigned int access; /* access flags */
3250 VARARG(objattr,object_attributes); /* object attributes */
3251 VARARG(target_name,unicode_str); /* target name */
3252 @REPLY
3253 obj_handle_t handle; /* handle to the symlink */
3254 @END
3257 /* Open a symbolic link object */
3258 @REQ(open_symlink)
3259 unsigned int access; /* access flags */
3260 unsigned int attributes; /* object attributes */
3261 obj_handle_t rootdir; /* root directory */
3262 VARARG(name,unicode_str); /* symlink name */
3263 @REPLY
3264 obj_handle_t handle; /* handle to the symlink */
3265 @END
3268 /* Query a symbolic link object */
3269 @REQ(query_symlink)
3270 obj_handle_t handle; /* handle to the symlink */
3271 @REPLY
3272 data_size_t total; /* total needed size for name */
3273 VARARG(target_name,unicode_str); /* target name */
3274 @END
3277 /* Query basic object information */
3278 @REQ(get_object_info)
3279 obj_handle_t handle; /* handle to the object */
3280 @REPLY
3281 unsigned int access; /* granted access mask */
3282 unsigned int ref_count; /* object ref count */
3283 unsigned int handle_count; /* object handle count */
3284 data_size_t total; /* total needed size for name */
3285 VARARG(name,unicode_str); /* object name */
3286 @END
3289 /* Query object type name information */
3290 @REQ(get_object_type)
3291 obj_handle_t handle; /* handle to the object */
3292 @REPLY
3293 data_size_t total; /* needed size for type name */
3294 VARARG(type,unicode_str); /* type name */
3295 @END
3298 /* Query the impersonation level of an impersonation token */
3299 @REQ(get_token_impersonation_level)
3300 obj_handle_t handle; /* handle to the object */
3301 @REPLY
3302 int impersonation_level; /* impersonation level of the impersonation token */
3303 @END
3305 /* Allocate a locally-unique identifier */
3306 @REQ(allocate_locally_unique_id)
3307 @REPLY
3308 luid_t luid;
3309 @END
3312 /* Create a device manager */
3313 @REQ(create_device_manager)
3314 unsigned int access; /* wanted access rights */
3315 unsigned int attributes; /* object attributes */
3316 @REPLY
3317 obj_handle_t handle; /* handle to the device */
3318 @END
3321 /* Create a device */
3322 @REQ(create_device)
3323 obj_handle_t rootdir; /* root directory */
3324 client_ptr_t user_ptr; /* opaque ptr for use by client */
3325 obj_handle_t manager; /* device manager */
3326 VARARG(name,unicode_str); /* object name */
3327 @END
3330 /* Delete a device */
3331 @REQ(delete_device)
3332 obj_handle_t manager; /* handle to the device manager */
3333 client_ptr_t device; /* pointer to the device */
3334 @END
3337 /* Retrieve the next pending device irp request */
3338 @REQ(get_next_device_request)
3339 obj_handle_t manager; /* handle to the device manager */
3340 obj_handle_t prev; /* handle to the previous irp */
3341 unsigned int status; /* status of the previous irp */
3342 client_ptr_t user_ptr; /* user pointer of the previous irp */
3343 @REPLY
3344 irp_params_t params; /* irp parameters */
3345 obj_handle_t next; /* handle to the next irp */
3346 thread_id_t client_tid; /* tid of thread calling irp */
3347 client_ptr_t client_thread; /* pointer to thread object of calling irp */
3348 data_size_t in_size; /* total needed input size */
3349 VARARG(next_data,bytes); /* input data of the next irp */
3350 @END
3353 /* Get kernel pointer from server object */
3354 @REQ(get_kernel_object_ptr)
3355 obj_handle_t manager; /* handle to the device manager */
3356 obj_handle_t handle; /* object handle */
3357 @REPLY
3358 client_ptr_t user_ptr; /* kernel object pointer */
3359 @END
3362 /* Associate kernel pointer with server object */
3363 @REQ(set_kernel_object_ptr)
3364 obj_handle_t manager; /* handle to the device manager */
3365 obj_handle_t handle; /* object handle */
3366 client_ptr_t user_ptr; /* kernel object pointer */
3367 @END
3370 /* Grab server object reference from kernel object pointer */
3371 @REQ(grab_kernel_object)
3372 obj_handle_t manager; /* handle to the device manager */
3373 client_ptr_t user_ptr; /* kernel object pointer */
3374 @END
3377 /* Release server object reference from kernel object pointer */
3378 @REQ(release_kernel_object)
3379 obj_handle_t manager; /* handle to the device manager */
3380 client_ptr_t user_ptr; /* kernel object pointer */
3381 @END
3384 /* Get handle from kernel object pointer */
3385 @REQ(get_kernel_object_handle)
3386 obj_handle_t manager; /* handle to the device manager */
3387 client_ptr_t user_ptr; /* kernel object pointer */
3388 unsigned int access; /* wanted access rights */
3389 @REPLY
3390 obj_handle_t handle; /* kernel object handle */
3391 @END
3394 /* Make the current process a system process */
3395 @REQ(make_process_system)
3396 @REPLY
3397 obj_handle_t event; /* event signaled when all user processes have exited */
3398 @END
3401 /* Get detailed fixed-size information about a token */
3402 @REQ(get_token_statistics)
3403 obj_handle_t handle; /* handle to the object */
3404 @REPLY
3405 luid_t token_id; /* locally-unique identifier of the token */
3406 luid_t modified_id; /* locally-unique identifier of the modified version of the token */
3407 int primary; /* is the token primary or impersonation? */
3408 int impersonation_level; /* level of impersonation */
3409 int group_count; /* the number of groups the token is a member of */
3410 int privilege_count; /* the number of privileges the token has */
3411 @END
3414 /* Create I/O completion port */
3415 @REQ(create_completion)
3416 unsigned int access; /* desired access to a port */
3417 unsigned int concurrent; /* max number of concurrent active threads */
3418 VARARG(objattr,object_attributes); /* object attributes */
3419 @REPLY
3420 obj_handle_t handle; /* port handle */
3421 @END
3424 /* Open I/O completion port */
3425 @REQ(open_completion)
3426 unsigned int access; /* desired access to a port */
3427 unsigned int attributes; /* object attributes */
3428 obj_handle_t rootdir; /* root directory */
3429 VARARG(filename,unicode_str); /* port name */
3430 @REPLY
3431 obj_handle_t handle; /* port handle */
3432 @END
3435 /* add completion to completion port */
3436 @REQ(add_completion)
3437 obj_handle_t handle; /* port handle */
3438 apc_param_t ckey; /* completion key */
3439 apc_param_t cvalue; /* completion value */
3440 apc_param_t information; /* IO_STATUS_BLOCK Information */
3441 unsigned int status; /* completion result */
3442 @END
3445 /* get completion from completion port queue */
3446 @REQ(remove_completion)
3447 obj_handle_t handle; /* port handle */
3448 @REPLY
3449 apc_param_t ckey; /* completion key */
3450 apc_param_t cvalue; /* completion value */
3451 apc_param_t information; /* IO_STATUS_BLOCK Information */
3452 unsigned int status; /* completion result */
3453 @END
3456 /* get completion queue depth */
3457 @REQ(query_completion)
3458 obj_handle_t handle; /* port handle */
3459 @REPLY
3460 unsigned int depth; /* completion queue depth */
3461 @END
3464 /* associate object with completion port */
3465 @REQ(set_completion_info)
3466 obj_handle_t handle; /* object handle */
3467 apc_param_t ckey; /* completion key */
3468 obj_handle_t chandle; /* port handle */
3469 @END
3472 /* check for associated completion and push msg */
3473 @REQ(add_fd_completion)
3474 obj_handle_t handle; /* async' object */
3475 apc_param_t cvalue; /* completion value */
3476 apc_param_t information; /* IO_STATUS_BLOCK Information */
3477 unsigned int status; /* completion status */
3478 int async; /* completion is an async result */
3479 @END
3482 /* set fd completion information */
3483 @REQ(set_fd_completion_mode)
3484 obj_handle_t handle; /* handle to a file or directory */
3485 unsigned int flags; /* completion notification flags */
3486 @END
3489 /* set fd disposition information */
3490 @REQ(set_fd_disp_info)
3491 obj_handle_t handle; /* handle to a file or directory */
3492 int unlink; /* whether to unlink file on close */
3493 @END
3496 /* set fd name information */
3497 @REQ(set_fd_name_info)
3498 obj_handle_t handle; /* handle to a file or directory */
3499 obj_handle_t rootdir; /* root directory */
3500 int link; /* link instead of renaming */
3501 int replace; /* replace an existing file? */
3502 VARARG(filename,string); /* new file name */
3503 @END
3506 /* Retrieve layered info for a window */
3507 @REQ(get_window_layered_info)
3508 user_handle_t handle; /* handle to the window */
3509 @REPLY
3510 unsigned int color_key; /* color key */
3511 unsigned int alpha; /* alpha (0..255) */
3512 unsigned int flags; /* LWA_* flags */
3513 @END
3516 /* Set layered info for a window */
3517 @REQ(set_window_layered_info)
3518 user_handle_t handle; /* handle to the window */
3519 unsigned int color_key; /* color key */
3520 unsigned int alpha; /* alpha (0..255) */
3521 unsigned int flags; /* LWA_* flags */
3522 @END
3525 /* Allocate an arbitrary user handle */
3526 @REQ(alloc_user_handle)
3527 @REPLY
3528 user_handle_t handle; /* allocated handle */
3529 @END
3532 /* Free an arbitrary user handle */
3533 @REQ(free_user_handle)
3534 user_handle_t handle; /* handle to free*/
3535 @END
3538 /* Set/get the current cursor */
3539 @REQ(set_cursor)
3540 unsigned int flags; /* flags for fields to set (see below) */
3541 user_handle_t handle; /* handle to the cursor */
3542 int show_count; /* show count increment/decrement */
3543 int x; /* cursor position */
3544 int y;
3545 rectangle_t clip; /* cursor clip rectangle */
3546 unsigned int clip_msg; /* message to post on cursor clip changes */
3547 @REPLY
3548 user_handle_t prev_handle; /* previous handle */
3549 int prev_count; /* previous show count */
3550 int prev_x; /* previous position */
3551 int prev_y;
3552 int new_x; /* new position */
3553 int new_y;
3554 rectangle_t new_clip; /* new clip rectangle */
3555 unsigned int last_change; /* time of last position change */
3556 @END
3557 #define SET_CURSOR_HANDLE 0x01
3558 #define SET_CURSOR_COUNT 0x02
3559 #define SET_CURSOR_POS 0x04
3560 #define SET_CURSOR_CLIP 0x08
3561 #define SET_CURSOR_NOCLIP 0x10
3563 /* Get the history of the 64 last cursor positions */
3564 @REQ(get_cursor_history)
3565 @REPLY
3566 VARARG(history,cursor_positions);
3567 @END
3570 /* Batch read rawinput message data */
3571 @REQ(get_rawinput_buffer)
3572 data_size_t rawinput_size; /* size of RAWINPUT structure */
3573 data_size_t buffer_size; /* size of output buffer */
3574 @REPLY
3575 data_size_t next_size; /* minimum size to get next message data */
3576 unsigned int count;
3577 VARARG(data,bytes);
3578 @END
3580 /* Modify the list of registered rawinput devices */
3581 @REQ(update_rawinput_devices)
3582 VARARG(devices,rawinput_devices);
3583 @END
3585 /* Retrieve the list of registered rawinput devices */
3586 @REQ(get_rawinput_devices)
3587 @REPLY
3588 unsigned int device_count;
3589 VARARG(devices,rawinput_devices);
3590 @END
3592 /* Create a new job object */
3593 @REQ(create_job)
3594 unsigned int access; /* wanted access rights */
3595 VARARG(objattr,object_attributes); /* object attributes */
3596 @REPLY
3597 obj_handle_t handle; /* handle to the job */
3598 @END
3601 /* Open a job object */
3602 @REQ(open_job)
3603 unsigned int access; /* wanted access rights */
3604 unsigned int attributes; /* object attributes */
3605 obj_handle_t rootdir; /* root directory */
3606 VARARG(name,unicode_str); /* object name */
3607 @REPLY
3608 obj_handle_t handle; /* handle to the job */
3609 @END
3612 /* Assign a job object to a process */
3613 @REQ(assign_job)
3614 obj_handle_t job; /* handle to the job */
3615 obj_handle_t process; /* handle to the process */
3616 @END
3619 /* Check if a process is associated with a job */
3620 @REQ(process_in_job)
3621 obj_handle_t job; /* handle to the job */
3622 obj_handle_t process; /* handle to the process */
3623 @END
3626 /* Set limit flags on a job */
3627 @REQ(set_job_limits)
3628 obj_handle_t handle; /* handle to the job */
3629 unsigned int limit_flags; /* new limit flags */
3630 @END
3633 /* Set new completion port for a job */
3634 @REQ(set_job_completion_port)
3635 obj_handle_t job; /* handle to the job */
3636 obj_handle_t port; /* handle to the completion port */
3637 client_ptr_t key; /* key to send with completion messages */
3638 @END
3641 /* Retrieve information about a job */
3642 @REQ(get_job_info)
3643 obj_handle_t handle; /* handle to the job */
3644 @REPLY
3645 int total_processes; /* total count of processes */
3646 int active_processes; /* count of running processes */
3647 @END
3650 /* Terminate all processes associated with the job */
3651 @REQ(terminate_job)
3652 obj_handle_t handle; /* handle to the job */
3653 int status; /* process exit code */
3654 @END
3657 /* Suspend a process */
3658 @REQ(suspend_process)
3659 obj_handle_t handle; /* process handle */
3660 @END
3663 /* Resume a process */
3664 @REQ(resume_process)
3665 obj_handle_t handle; /* process handle */
3666 @END