windowscodecs: Return correct error codes from BmpFrameEncode_GetMetadataQueryWriter().
[wine/zf.git] / server / protocol.def
blob45700c13e62e4363d81cab11e1bf44c9f4c15c68
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_minor;
760 unsigned short subsystem_major;
761 unsigned short osversion_major;
762 unsigned short osversion_minor;
763 unsigned short image_charact;
764 unsigned short dll_charact;
765 unsigned short machine;
766 unsigned char contains_code;
767 unsigned char image_flags;
768 unsigned int loader_flags;
769 unsigned int header_size;
770 unsigned int file_size;
771 unsigned int checksum;
772 client_cpu_t cpu;
773 int __pad;
774 } pe_image_info_t;
775 #define IMAGE_FLAGS_ComPlusNativeReady 0x01
776 #define IMAGE_FLAGS_ComPlusILOnly 0x02
777 #define IMAGE_FLAGS_ImageDynamicallyRelocated 0x04
778 #define IMAGE_FLAGS_ImageMappedFlat 0x08
779 #define IMAGE_FLAGS_BaseBelow4gb 0x10
780 #define IMAGE_FLAGS_ComPlusPrefer32bit 0x20
781 #define IMAGE_FLAGS_WineBuiltin 0x40
782 #define IMAGE_FLAGS_WineFakeDll 0x80
784 struct rawinput_device
786 unsigned short usage_page;
787 unsigned short usage;
788 unsigned int flags;
789 user_handle_t target;
792 typedef struct
794 int x;
795 int y;
796 unsigned int time;
797 int __pad;
798 lparam_t info;
799 } cursor_pos_t;
801 /****************************************************************/
802 /* Request declarations */
804 /* Create a new process from the context of the parent */
805 @REQ(new_process)
806 obj_handle_t token; /* process token */
807 obj_handle_t parent_process; /* parent process */
808 int inherit_all; /* inherit all handles from parent */
809 unsigned int create_flags; /* creation flags */
810 int socket_fd; /* file descriptor for process socket */
811 unsigned int access; /* access rights for process object */
812 client_cpu_t cpu; /* CPU that the new process will use */
813 data_size_t info_size; /* size of startup info */
814 data_size_t handles_size; /* length of explicit handles list */
815 VARARG(objattr,object_attributes); /* object attributes */
816 VARARG(handles,uints,handles_size); /* handles list */
817 VARARG(info,startup_info,info_size); /* startup information */
818 VARARG(env,unicode_str); /* environment for new process */
819 @REPLY
820 obj_handle_t info; /* new process info handle */
821 process_id_t pid; /* process id */
822 obj_handle_t handle; /* process handle (in the current process) */
823 @END
826 /* Execute a process, replacing the current one */
827 @REQ(exec_process)
828 int socket_fd; /* file descriptor for process socket */
829 client_cpu_t cpu; /* CPU that the new process will use */
830 @END
833 /* Retrieve information about a newly started process */
834 @REQ(get_new_process_info)
835 obj_handle_t info; /* info handle returned from new_process_request */
836 @REPLY
837 int success; /* did the process start successfully? */
838 int exit_code; /* process exit code if failed */
839 @END
842 /* Create a new thread */
843 @REQ(new_thread)
844 obj_handle_t process; /* process in which to create thread */
845 unsigned int access; /* wanted access rights */
846 int suspend; /* new thread should be suspended on creation */
847 int request_fd; /* fd for request pipe */
848 VARARG(objattr,object_attributes); /* object attributes */
849 @REPLY
850 thread_id_t tid; /* thread id */
851 obj_handle_t handle; /* thread handle (in the current process) */
852 @END
855 /* Retrieve the new process startup info */
856 @REQ(get_startup_info)
857 @REPLY
858 data_size_t info_size; /* size of startup info */
859 VARARG(info,startup_info,info_size); /* startup information */
860 VARARG(env,unicode_str); /* environment */
861 @END
864 /* Signal the end of the process initialization */
865 @REQ(init_process_done)
866 int gui; /* is it a GUI process? */
867 mod_handle_t module; /* main module base address */
868 client_ptr_t ldt_copy; /* address of LDT copy (in thread address space) */
869 client_ptr_t entry; /* process entry point */
870 @REPLY
871 int suspend; /* is process suspended? */
872 @END
875 /* Initialize a thread; called from the child after fork()/clone() */
876 @REQ(init_thread)
877 int unix_pid; /* Unix pid of new thread */
878 int unix_tid; /* Unix tid of new thread */
879 int debug_level; /* new debug level */
880 client_ptr_t teb; /* TEB of new thread (in thread address space) */
881 client_ptr_t entry; /* entry point or PEB if initial thread (in thread address space) */
882 int reply_fd; /* fd for reply pipe */
883 int wait_fd; /* fd for blocking calls pipe */
884 client_cpu_t cpu; /* CPU that this thread is running on */
885 @REPLY
886 process_id_t pid; /* process id of the new thread's process */
887 thread_id_t tid; /* thread id of the new thread */
888 timeout_t server_start; /* server start time */
889 data_size_t info_size; /* total size of startup info */
890 int version; /* protocol version */
891 unsigned int all_cpus; /* bitset of supported CPUs */
892 int suspend; /* is thread suspended? */
893 @END
896 /* Terminate a process */
897 @REQ(terminate_process)
898 obj_handle_t handle; /* process handle to terminate */
899 int exit_code; /* process exit code */
900 @REPLY
901 int self; /* suicide? */
902 @END
905 /* Terminate a thread */
906 @REQ(terminate_thread)
907 obj_handle_t handle; /* thread handle to terminate */
908 int exit_code; /* thread exit code */
909 @REPLY
910 int self; /* suicide? */
911 @END
914 /* Retrieve information about a process */
915 @REQ(get_process_info)
916 obj_handle_t handle; /* process handle */
917 @REPLY
918 process_id_t pid; /* server process id */
919 process_id_t ppid; /* server process id of parent */
920 affinity_t affinity; /* process affinity mask */
921 client_ptr_t peb; /* PEB address in process address space */
922 timeout_t start_time; /* process start time */
923 timeout_t end_time; /* process end time */
924 int exit_code; /* process exit code */
925 int priority; /* priority class */
926 client_cpu_t cpu; /* CPU that this process is running on */
927 short int debugger_present; /* process is being debugged */
928 short int debug_children; /* inherit debugger to child processes */
929 VARARG(image,pe_image_info); /* image info for main exe */
930 @END
933 /* Retrieve information about a process memory usage */
934 @REQ(get_process_vm_counters)
935 obj_handle_t handle; /* process handle */
936 @REPLY
937 mem_size_t peak_virtual_size; /* peak virtual memory in bytes */
938 mem_size_t virtual_size; /* virtual memory in bytes */
939 mem_size_t peak_working_set_size; /* peak real memory in bytes */
940 mem_size_t working_set_size; /* real memory in bytes */
941 mem_size_t pagefile_usage; /* commit charge in bytes */
942 mem_size_t peak_pagefile_usage; /* peak commit charge in bytes */
943 @END
946 /* Set a process information */
947 @REQ(set_process_info)
948 obj_handle_t handle; /* process handle */
949 int mask; /* setting mask (see below) */
950 int priority; /* priority class */
951 affinity_t affinity; /* affinity mask */
952 @END
953 #define SET_PROCESS_INFO_PRIORITY 0x01
954 #define SET_PROCESS_INFO_AFFINITY 0x02
957 /* Retrieve information about a thread */
958 @REQ(get_thread_info)
959 obj_handle_t handle; /* thread handle */
960 unsigned int access; /* required access rights */
961 @REPLY
962 process_id_t pid; /* server process id */
963 thread_id_t tid; /* server thread id */
964 client_ptr_t teb; /* thread teb pointer */
965 client_ptr_t entry_point; /* thread entry point */
966 affinity_t affinity; /* thread affinity mask */
967 int exit_code; /* thread exit code */
968 int priority; /* thread priority level */
969 int last; /* last thread in process */
970 int suspend_count; /* thread suspend count */
971 int dbg_hidden; /* thread hidden from debugger */
972 data_size_t desc_len; /* description length in bytes */
973 VARARG(desc,unicode_str); /* description string */
974 @END
977 /* Retrieve information about thread times */
978 @REQ(get_thread_times)
979 obj_handle_t handle; /* thread handle */
980 @REPLY
981 timeout_t creation_time; /* thread creation time */
982 timeout_t exit_time; /* thread exit time */
983 int unix_pid; /* thread native pid */
984 int unix_tid; /* thread native pid */
985 @END
988 /* Set a thread information */
989 @REQ(set_thread_info)
990 obj_handle_t handle; /* thread handle */
991 int mask; /* setting mask (see below) */
992 int priority; /* priority class */
993 affinity_t affinity; /* affinity mask */
994 client_ptr_t entry_point; /* thread entry point */
995 obj_handle_t token; /* impersonation token */
996 VARARG(desc,unicode_str); /* description string */
997 @END
998 #define SET_THREAD_INFO_PRIORITY 0x01
999 #define SET_THREAD_INFO_AFFINITY 0x02
1000 #define SET_THREAD_INFO_TOKEN 0x04
1001 #define SET_THREAD_INFO_ENTRYPOINT 0x08
1002 #define SET_THREAD_INFO_DESCRIPTION 0x10
1003 #define SET_THREAD_INFO_DBG_HIDDEN 0x20
1006 /* Retrieve information about a module */
1007 @REQ(get_dll_info)
1008 obj_handle_t handle; /* process handle */
1009 mod_handle_t base_address; /* base address of module */
1010 @REPLY
1011 client_ptr_t entry_point;
1012 data_size_t filename_len; /* buffer len in bytes required to store filename */
1013 VARARG(filename,unicode_str); /* file name of module */
1014 @END
1017 /* Suspend a thread */
1018 @REQ(suspend_thread)
1019 obj_handle_t handle; /* thread handle */
1020 @REPLY
1021 int count; /* new suspend count */
1022 @END
1025 /* Resume a thread */
1026 @REQ(resume_thread)
1027 obj_handle_t handle; /* thread handle */
1028 @REPLY
1029 int count; /* new suspend count */
1030 @END
1033 /* Notify the server that a dll has been loaded */
1034 @REQ(load_dll)
1035 data_size_t dbg_offset; /* debug info offset */
1036 mod_handle_t base; /* base address */
1037 client_ptr_t name; /* ptr to ptr to name (in process addr space) */
1038 data_size_t dbg_size; /* debug info size */
1039 VARARG(filename,unicode_str); /* file name of dll */
1040 @END
1043 /* Notify the server that a dll is being unloaded */
1044 @REQ(unload_dll)
1045 mod_handle_t base; /* base address */
1046 @END
1049 /* Queue an APC for a thread or process */
1050 @REQ(queue_apc)
1051 obj_handle_t handle; /* thread or process handle */
1052 apc_call_t call; /* call arguments */
1053 @REPLY
1054 obj_handle_t handle; /* APC handle */
1055 int self; /* run APC in caller itself? */
1056 @END
1059 /* Get the result of an APC call */
1060 @REQ(get_apc_result)
1061 obj_handle_t handle; /* handle to the APC */
1062 @REPLY
1063 apc_result_t result; /* result of the APC */
1064 @END
1067 /* Close a handle for the current process */
1068 @REQ(close_handle)
1069 obj_handle_t handle; /* handle to close */
1070 @END
1073 /* Set a handle information */
1074 @REQ(set_handle_info)
1075 obj_handle_t handle; /* handle we are interested in */
1076 int flags; /* new handle flags */
1077 int mask; /* mask for flags to set */
1078 @REPLY
1079 int old_flags; /* old flag value */
1080 @END
1083 /* Duplicate a handle */
1084 @REQ(dup_handle)
1085 obj_handle_t src_process; /* src process handle */
1086 obj_handle_t src_handle; /* src handle to duplicate */
1087 obj_handle_t dst_process; /* dst process handle */
1088 unsigned int access; /* wanted access rights */
1089 unsigned int attributes; /* object attributes */
1090 unsigned int options; /* duplicate options (see below) */
1091 @REPLY
1092 obj_handle_t handle; /* duplicated handle in dst process */
1093 int self; /* is the source the current process? */
1094 int closed; /* whether the source handle has been closed */
1095 @END
1096 #define DUP_HANDLE_CLOSE_SOURCE DUPLICATE_CLOSE_SOURCE
1097 #define DUP_HANDLE_SAME_ACCESS DUPLICATE_SAME_ACCESS
1098 #define DUP_HANDLE_MAKE_GLOBAL 0x80000000 /* Not a Windows flag */
1101 /* Make an object temporary */
1102 @REQ(make_temporary)
1103 obj_handle_t handle; /* handle to the object */
1104 @END
1107 /* Open a handle to a process */
1108 @REQ(open_process)
1109 process_id_t pid; /* process id to open */
1110 unsigned int access; /* wanted access rights */
1111 unsigned int attributes; /* object attributes */
1112 @REPLY
1113 obj_handle_t handle; /* handle to the process */
1114 @END
1117 /* Open a handle to a thread */
1118 @REQ(open_thread)
1119 thread_id_t tid; /* thread id to open */
1120 unsigned int access; /* wanted access rights */
1121 unsigned int attributes; /* object attributes */
1122 @REPLY
1123 obj_handle_t handle; /* handle to the thread */
1124 @END
1127 /* Wait for handles */
1128 @REQ(select)
1129 int flags; /* wait flags (see below) */
1130 client_ptr_t cookie; /* magic cookie to return to client */
1131 abstime_t timeout; /* timeout */
1132 data_size_t size; /* size of select_op */
1133 obj_handle_t prev_apc; /* handle to previous APC */
1134 VARARG(result,apc_result); /* result of previous APC */
1135 VARARG(data,select_op,size); /* operation-specific data */
1136 VARARG(context,context); /* suspend context */
1137 @REPLY
1138 apc_call_t call; /* APC call arguments */
1139 obj_handle_t apc_handle; /* handle to next APC */
1140 VARARG(context,context); /* suspend context */
1141 @END
1142 #define SELECT_ALERTABLE 1
1143 #define SELECT_INTERRUPTIBLE 2
1146 /* Create an event */
1147 @REQ(create_event)
1148 unsigned int access; /* wanted access rights */
1149 int manual_reset; /* manual reset event */
1150 int initial_state; /* initial state of the event */
1151 VARARG(objattr,object_attributes); /* object attributes */
1152 @REPLY
1153 obj_handle_t handle; /* handle to the event */
1154 @END
1156 /* Event operation */
1157 @REQ(event_op)
1158 obj_handle_t handle; /* handle to event */
1159 int op; /* event operation (see below) */
1160 @REPLY
1161 int state; /* previous state */
1162 @END
1163 enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT };
1165 @REQ(query_event)
1166 obj_handle_t handle; /* handle to event */
1167 @REPLY
1168 int manual_reset; /* manual reset event */
1169 int state; /* current state of the event */
1170 @END
1172 /* Open an event */
1173 @REQ(open_event)
1174 unsigned int access; /* wanted access rights */
1175 unsigned int attributes; /* object attributes */
1176 obj_handle_t rootdir; /* root directory */
1177 VARARG(name,unicode_str); /* object name */
1178 @REPLY
1179 obj_handle_t handle; /* handle to the event */
1180 @END
1183 /* Create a keyed event */
1184 @REQ(create_keyed_event)
1185 unsigned int access; /* wanted access rights */
1186 VARARG(objattr,object_attributes); /* object attributes */
1187 @REPLY
1188 obj_handle_t handle; /* handle to the event */
1189 @END
1191 /* Open a keyed event */
1192 @REQ(open_keyed_event)
1193 unsigned int access; /* wanted access rights */
1194 unsigned int attributes; /* object attributes */
1195 obj_handle_t rootdir; /* root directory */
1196 VARARG(name,unicode_str); /* object name */
1197 @REPLY
1198 obj_handle_t handle; /* handle to the event */
1199 @END
1202 /* Create a mutex */
1203 @REQ(create_mutex)
1204 unsigned int access; /* wanted access rights */
1205 int owned; /* initially owned? */
1206 VARARG(objattr,object_attributes); /* object attributes */
1207 @REPLY
1208 obj_handle_t handle; /* handle to the mutex */
1209 @END
1212 /* Release a mutex */
1213 @REQ(release_mutex)
1214 obj_handle_t handle; /* handle to the mutex */
1215 @REPLY
1216 unsigned int prev_count; /* value of internal counter, before release */
1217 @END
1220 /* Open a mutex */
1221 @REQ(open_mutex)
1222 unsigned int access; /* wanted access rights */
1223 unsigned int attributes; /* object attributes */
1224 obj_handle_t rootdir; /* root directory */
1225 VARARG(name,unicode_str); /* object name */
1226 @REPLY
1227 obj_handle_t handle; /* handle to the mutex */
1228 @END
1231 /* Query a mutex */
1232 @REQ(query_mutex)
1233 obj_handle_t handle; /* handle to mutex */
1234 @REPLY
1235 unsigned int count; /* current count of mutex */
1236 int owned; /* true if owned by current thread */
1237 int abandoned; /* true if abandoned */
1238 @END
1241 /* Create a semaphore */
1242 @REQ(create_semaphore)
1243 unsigned int access; /* wanted access rights */
1244 unsigned int initial; /* initial count */
1245 unsigned int max; /* maximum count */
1246 VARARG(objattr,object_attributes); /* object attributes */
1247 @REPLY
1248 obj_handle_t handle; /* handle to the semaphore */
1249 @END
1252 /* Release a semaphore */
1253 @REQ(release_semaphore)
1254 obj_handle_t handle; /* handle to the semaphore */
1255 unsigned int count; /* count to add to semaphore */
1256 @REPLY
1257 unsigned int prev_count; /* previous semaphore count */
1258 @END
1260 @REQ(query_semaphore)
1261 obj_handle_t handle; /* handle to the semaphore */
1262 @REPLY
1263 unsigned int current; /* current count */
1264 unsigned int max; /* maximum count */
1265 @END
1267 /* Open a semaphore */
1268 @REQ(open_semaphore)
1269 unsigned int access; /* wanted access rights */
1270 unsigned int attributes; /* object attributes */
1271 obj_handle_t rootdir; /* root directory */
1272 VARARG(name,unicode_str); /* object name */
1273 @REPLY
1274 obj_handle_t handle; /* handle to the semaphore */
1275 @END
1278 /* Create a file */
1279 @REQ(create_file)
1280 unsigned int access; /* wanted access rights */
1281 unsigned int sharing; /* sharing flags */
1282 int create; /* file create action */
1283 unsigned int options; /* file options */
1284 unsigned int attrs; /* file attributes for creation */
1285 VARARG(objattr,object_attributes); /* object attributes */
1286 VARARG(filename,string); /* file name */
1287 @REPLY
1288 obj_handle_t handle; /* handle to the file */
1289 @END
1292 /* Open a file object */
1293 @REQ(open_file_object)
1294 unsigned int access; /* wanted access rights */
1295 unsigned int attributes; /* open attributes */
1296 obj_handle_t rootdir; /* root directory */
1297 unsigned int sharing; /* sharing flags */
1298 unsigned int options; /* file options */
1299 VARARG(filename,unicode_str); /* file name */
1300 @REPLY
1301 obj_handle_t handle; /* handle to the file */
1302 @END
1305 /* Allocate a file handle for a Unix fd */
1306 @REQ(alloc_file_handle)
1307 unsigned int access; /* wanted access rights */
1308 unsigned int attributes; /* object attributes */
1309 int fd; /* file descriptor on the client side */
1310 @REPLY
1311 obj_handle_t handle; /* handle to the file */
1312 @END
1315 /* Get the Unix name from a file handle */
1316 @REQ(get_handle_unix_name)
1317 obj_handle_t handle; /* file handle */
1318 @REPLY
1319 data_size_t name_len; /* unix name length */
1320 VARARG(name,string); /* unix name */
1321 @END
1324 /* Get a Unix fd to access a file */
1325 @REQ(get_handle_fd)
1326 obj_handle_t handle; /* handle to the file */
1327 @REPLY
1328 int type; /* file type (see below) */
1329 int cacheable; /* can fd be cached in the client? */
1330 unsigned int access; /* file access rights */
1331 unsigned int options; /* file open options */
1332 @END
1333 enum server_fd_type
1335 FD_TYPE_INVALID, /* invalid file (no associated fd) */
1336 FD_TYPE_FILE, /* regular file */
1337 FD_TYPE_DIR, /* directory */
1338 FD_TYPE_SOCKET, /* socket */
1339 FD_TYPE_SERIAL, /* serial port */
1340 FD_TYPE_PIPE, /* named pipe */
1341 FD_TYPE_MAILSLOT, /* mailslot */
1342 FD_TYPE_CHAR, /* unspecified char device */
1343 FD_TYPE_DEVICE, /* Windows device file */
1344 FD_TYPE_NB_TYPES
1348 /* Retrieve (or allocate) the client-side directory cache entry */
1349 @REQ(get_directory_cache_entry)
1350 obj_handle_t handle; /* handle to the directory */
1351 @REPLY
1352 int entry; /* cache entry on the client side */
1353 VARARG(free,ints); /* entries that can be freed */
1354 @END
1357 /* Flush a file buffers */
1358 @REQ(flush)
1359 async_data_t async; /* async I/O parameters */
1360 @REPLY
1361 obj_handle_t event; /* event set when finished */
1362 @END
1364 /* Query file information */
1365 @REQ(get_file_info)
1366 obj_handle_t handle; /* handle to the file */
1367 unsigned int info_class; /* queried information class */
1368 @REPLY
1369 VARARG(data,bytes); /* file info data */
1370 @END
1372 /* Query volume information */
1373 @REQ(get_volume_info)
1374 obj_handle_t handle; /* handle to the file */
1375 unsigned int info_class; /* queried information class */
1376 @REPLY
1377 VARARG(data,bytes); /* volume info data */
1378 @END
1380 /* Lock a region of a file */
1381 @REQ(lock_file)
1382 obj_handle_t handle; /* handle to the file */
1383 file_pos_t offset; /* offset of start of lock */
1384 file_pos_t count; /* count of bytes to lock */
1385 int shared; /* shared or exclusive lock? */
1386 int wait; /* do we want to wait? */
1387 @REPLY
1388 obj_handle_t handle; /* handle to wait on */
1389 int overlapped; /* is it an overlapped I/O handle? */
1390 @END
1393 /* Unlock a region of a file */
1394 @REQ(unlock_file)
1395 obj_handle_t handle; /* handle to the file */
1396 file_pos_t offset; /* offset of start of unlock */
1397 file_pos_t count; /* count of bytes to unlock */
1398 @END
1401 /* Set socket event parameters */
1402 @REQ(set_socket_event)
1403 obj_handle_t handle; /* handle to the socket */
1404 unsigned int mask; /* event mask */
1405 obj_handle_t event; /* event object */
1406 user_handle_t window; /* window to send the message to */
1407 unsigned int msg; /* message to send */
1408 @END
1411 /* Get socket event parameters */
1412 @REQ(get_socket_event)
1413 obj_handle_t handle; /* handle to the socket */
1414 int service; /* clear pending? */
1415 obj_handle_t c_event; /* event to clear */
1416 @REPLY
1417 unsigned int mask; /* event mask */
1418 unsigned int pmask; /* pending events */
1419 unsigned int state; /* status bits */
1420 VARARG(errors,ints); /* event errors */
1421 @END
1424 /* Get socket info */
1425 @REQ(get_socket_info)
1426 obj_handle_t handle; /* handle to the socket */
1427 @REPLY
1428 int family; /* family, see socket manpage */
1429 int type; /* type, see socket manpage */
1430 int protocol; /* protocol, see socket manpage */
1431 @END
1434 /* Re-enable pending socket events */
1435 @REQ(enable_socket_event)
1436 obj_handle_t handle; /* handle to the socket */
1437 unsigned int mask; /* events to re-enable */
1438 unsigned int sstate; /* status bits to set */
1439 unsigned int cstate; /* status bits to clear */
1440 @END
1442 @REQ(set_socket_deferred)
1443 obj_handle_t handle; /* handle to the socket */
1444 obj_handle_t deferred; /* handle to the socket for which accept() is deferred */
1445 @END
1448 /* Retrieve the next pending console ioctl request */
1449 @REQ(get_next_console_request)
1450 obj_handle_t handle; /* console server handle */
1451 int signal; /* server signal state */
1452 int read; /* 1 if reporting result of blocked read ioctl */
1453 unsigned int status; /* status of previous ioctl */
1454 VARARG(out_data,bytes); /* out_data of previous ioctl */
1455 @REPLY
1456 unsigned int code; /* ioctl code */
1457 unsigned int output; /* output id or 0 for input */
1458 data_size_t out_size; /* ioctl output size */
1459 VARARG(in_data,bytes); /* ioctl in_data */
1460 @END
1463 /* enable directory change notifications */
1464 @REQ(read_directory_changes)
1465 unsigned int filter; /* notification filter */
1466 int subtree; /* watch the subtree? */
1467 int want_data; /* flag indicating whether change data should be collected */
1468 async_data_t async; /* async I/O parameters */
1469 @END
1472 @REQ(read_change)
1473 obj_handle_t handle;
1474 @REPLY
1475 VARARG(events,filesystem_event); /* collected filesystem events */
1476 @END
1479 /* Create a file mapping */
1480 @REQ(create_mapping)
1481 unsigned int access; /* wanted access rights */
1482 unsigned int flags; /* SEC_* flags */
1483 unsigned int file_access; /* file access rights */
1484 mem_size_t size; /* mapping size */
1485 obj_handle_t file_handle; /* file handle */
1486 VARARG(objattr,object_attributes); /* object attributes */
1487 @REPLY
1488 obj_handle_t handle; /* handle to the mapping */
1489 @END
1492 /* Open a mapping */
1493 @REQ(open_mapping)
1494 unsigned int access; /* wanted access rights */
1495 unsigned int attributes; /* object attributes */
1496 obj_handle_t rootdir; /* root directory */
1497 VARARG(name,unicode_str); /* object name */
1498 @REPLY
1499 obj_handle_t handle; /* handle to the mapping */
1500 @END
1503 /* Get information about a file mapping */
1504 @REQ(get_mapping_info)
1505 obj_handle_t handle; /* handle to the mapping */
1506 unsigned int access; /* wanted access rights */
1507 @REPLY
1508 mem_size_t size; /* mapping size */
1509 unsigned int flags; /* SEC_* flags */
1510 obj_handle_t shared_file; /* shared mapping file handle */
1511 VARARG(image,pe_image_info);/* image info for SEC_IMAGE mappings */
1512 @END
1515 /* Add a memory view in the current process */
1516 @REQ(map_view)
1517 obj_handle_t mapping; /* file mapping handle, or 0 for .so builtin */
1518 unsigned int access; /* wanted access rights */
1519 client_ptr_t base; /* view base address (page-aligned) */
1520 mem_size_t size; /* view size */
1521 file_pos_t start; /* start offset in mapping */
1522 VARARG(image,pe_image_info);/* image info for .so builtins */
1523 @END
1526 /* Unmap a memory view from the current process */
1527 @REQ(unmap_view)
1528 client_ptr_t base; /* view base address */
1529 @END
1532 /* Get a range of committed pages in a file mapping */
1533 @REQ(get_mapping_committed_range)
1534 client_ptr_t base; /* view base address */
1535 file_pos_t offset; /* starting offset (page-aligned, in bytes) */
1536 @REPLY
1537 mem_size_t size; /* size of range starting at offset (page-aligned, in bytes) */
1538 int committed; /* whether it is a committed range */
1539 @END
1542 /* Add a range to the committed pages in a file mapping */
1543 @REQ(add_mapping_committed_range)
1544 client_ptr_t base; /* view base address */
1545 file_pos_t offset; /* starting offset (page-aligned, in bytes) */
1546 mem_size_t size; /* size to set (page-aligned, in bytes) or 0 if only retrieving */
1547 @END
1550 /* Check if two memory maps are for the same file */
1551 @REQ(is_same_mapping)
1552 client_ptr_t base1; /* first view base address */
1553 client_ptr_t base2; /* second view base address */
1554 @END
1557 struct thread_info
1559 timeout_t start_time;
1560 thread_id_t tid;
1561 int base_priority;
1562 int current_priority;
1563 int unix_tid;
1566 struct process_info
1568 timeout_t start_time;
1569 data_size_t name_len;
1570 int thread_count;
1571 int priority;
1572 process_id_t pid;
1573 process_id_t parent_pid;
1574 int handle_count;
1575 int unix_pid;
1576 int __pad;
1577 /* VARARG(name,unicode_str,name_len); */
1578 /* VARARG(threads,struct thread_info,thread_count); */
1581 /* Get a list of processes and threads currently running */
1582 @REQ(list_processes)
1583 @REPLY
1584 data_size_t info_size;
1585 int process_count;
1586 VARARG(data,process_info,info_size);
1587 @END
1590 /* Create a debug object */
1591 @REQ(create_debug_obj)
1592 unsigned int access; /* wanted access rights */
1593 VARARG(objattr,object_attributes); /* object attributes */
1594 @REPLY
1595 obj_handle_t handle; /* handle to the debug object */
1596 @END
1599 /* Wait for a debug event */
1600 @REQ(wait_debug_event)
1601 int get_handle; /* should we alloc a handle for waiting? */
1602 @REPLY
1603 process_id_t pid; /* process id */
1604 thread_id_t tid; /* thread id */
1605 obj_handle_t wait; /* wait handle if no event ready */
1606 VARARG(event,debug_event); /* debug event data */
1607 @END
1610 /* Queue an exception event */
1611 @REQ(queue_exception_event)
1612 int first; /* first chance exception? */
1613 unsigned int code; /* exception code */
1614 unsigned int flags; /* exception flags */
1615 client_ptr_t record; /* exception record */
1616 client_ptr_t address; /* exception address */
1617 data_size_t len; /* size of parameters */
1618 VARARG(params,uints64,len);/* exception parameters */
1619 @REPLY
1620 obj_handle_t handle; /* handle to the queued event */
1621 @END
1624 /* Retrieve the status of an exception event */
1625 @REQ(get_exception_status)
1626 obj_handle_t handle; /* handle to the queued event */
1627 @END
1630 /* Continue a debug event */
1631 @REQ(continue_debug_event)
1632 process_id_t pid; /* process id to continue */
1633 thread_id_t tid; /* thread id to continue */
1634 int status; /* continuation status */
1635 @END
1638 /* Start/stop debugging an existing process */
1639 @REQ(debug_process)
1640 process_id_t pid; /* id of the process to debug */
1641 int attach; /* 1=attaching / 0=detaching from the process */
1642 @END
1645 /* Set debugger kill on exit flag */
1646 @REQ(set_debugger_kill_on_exit)
1647 int kill_on_exit; /* 0=detach/1=kill debuggee when debugger dies */
1648 @END
1651 /* Read data from a process address space */
1652 @REQ(read_process_memory)
1653 obj_handle_t handle; /* process handle */
1654 client_ptr_t addr; /* addr to read from */
1655 @REPLY
1656 VARARG(data,bytes); /* result data */
1657 @END
1660 /* Write data to a process address space */
1661 @REQ(write_process_memory)
1662 obj_handle_t handle; /* process handle */
1663 client_ptr_t addr; /* addr to write to */
1664 VARARG(data,bytes); /* data to write */
1665 @END
1668 /* Create a registry key */
1669 @REQ(create_key)
1670 unsigned int access; /* desired access rights */
1671 unsigned int options; /* creation options */
1672 VARARG(objattr,object_attributes); /* object attributes */
1673 VARARG(class,unicode_str); /* class name */
1674 @REPLY
1675 obj_handle_t hkey; /* handle to the created key */
1676 int created; /* has it been newly created? */
1677 @END
1679 /* Open a registry key */
1680 @REQ(open_key)
1681 obj_handle_t parent; /* handle to the parent key */
1682 unsigned int access; /* desired access rights */
1683 unsigned int attributes; /* object attributes */
1684 VARARG(name,unicode_str); /* key name */
1685 @REPLY
1686 obj_handle_t hkey; /* handle to the open key */
1687 @END
1690 /* Delete a registry key */
1691 @REQ(delete_key)
1692 obj_handle_t hkey; /* handle to the key */
1693 @END
1696 /* Flush a registry key */
1697 @REQ(flush_key)
1698 obj_handle_t hkey; /* handle to the key */
1699 @END
1702 /* Enumerate registry subkeys */
1703 @REQ(enum_key)
1704 obj_handle_t hkey; /* handle to registry key */
1705 int index; /* index of subkey (or -1 for current key) */
1706 int info_class; /* requested information class */
1707 @REPLY
1708 int subkeys; /* number of subkeys */
1709 int max_subkey; /* longest subkey name */
1710 int max_class; /* longest class name */
1711 int values; /* number of values */
1712 int max_value; /* longest value name */
1713 int max_data; /* longest value data */
1714 timeout_t modif; /* last modification time */
1715 data_size_t total; /* total length needed for full name and class */
1716 data_size_t namelen; /* length of key name in bytes */
1717 VARARG(name,unicode_str,namelen); /* key name */
1718 VARARG(class,unicode_str); /* class name */
1719 @END
1722 /* Set a value of a registry key */
1723 @REQ(set_key_value)
1724 obj_handle_t hkey; /* handle to registry key */
1725 int type; /* value type */
1726 data_size_t namelen; /* length of value name in bytes */
1727 VARARG(name,unicode_str,namelen); /* value name */
1728 VARARG(data,bytes); /* value data */
1729 @END
1732 /* Retrieve the value of a registry key */
1733 @REQ(get_key_value)
1734 obj_handle_t hkey; /* handle to registry key */
1735 VARARG(name,unicode_str); /* value name */
1736 @REPLY
1737 int type; /* value type */
1738 data_size_t total; /* total length needed for data */
1739 VARARG(data,bytes); /* value data */
1740 @END
1743 /* Enumerate a value of a registry key */
1744 @REQ(enum_key_value)
1745 obj_handle_t hkey; /* handle to registry key */
1746 int index; /* value index */
1747 int info_class; /* requested information class */
1748 @REPLY
1749 int type; /* value type */
1750 data_size_t total; /* total length needed for full name and data */
1751 data_size_t namelen; /* length of value name in bytes */
1752 VARARG(name,unicode_str,namelen); /* value name */
1753 VARARG(data,bytes); /* value data */
1754 @END
1757 /* Delete a value of a registry key */
1758 @REQ(delete_key_value)
1759 obj_handle_t hkey; /* handle to registry key */
1760 VARARG(name,unicode_str); /* value name */
1761 @END
1764 /* Load a registry branch from a file */
1765 @REQ(load_registry)
1766 obj_handle_t file; /* file to load from */
1767 VARARG(objattr,object_attributes); /* object attributes */
1768 @END
1771 /* UnLoad a registry branch from a file */
1772 @REQ(unload_registry)
1773 obj_handle_t hkey; /* root key to unload to */
1774 @END
1777 /* Save a registry branch to a file */
1778 @REQ(save_registry)
1779 obj_handle_t hkey; /* key to save */
1780 obj_handle_t file; /* file to save to */
1781 @END
1784 /* Add a registry key change notification */
1785 @REQ(set_registry_notification)
1786 obj_handle_t hkey; /* key to watch for changes */
1787 obj_handle_t event; /* event to set */
1788 int subtree; /* should we watch the whole subtree? */
1789 unsigned int filter; /* things to watch */
1790 @END
1793 /* Create a waitable timer */
1794 @REQ(create_timer)
1795 unsigned int access; /* wanted access rights */
1796 int manual; /* manual reset */
1797 VARARG(objattr,object_attributes); /* object attributes */
1798 @REPLY
1799 obj_handle_t handle; /* handle to the timer */
1800 @END
1803 /* Open a waitable timer */
1804 @REQ(open_timer)
1805 unsigned int access; /* wanted access rights */
1806 unsigned int attributes; /* object attributes */
1807 obj_handle_t rootdir; /* root directory */
1808 VARARG(name,unicode_str); /* object name */
1809 @REPLY
1810 obj_handle_t handle; /* handle to the timer */
1811 @END
1813 /* Set a waitable timer */
1814 @REQ(set_timer)
1815 obj_handle_t handle; /* handle to the timer */
1816 timeout_t expire; /* next expiration absolute time */
1817 client_ptr_t callback; /* callback function */
1818 client_ptr_t arg; /* callback argument */
1819 int period; /* timer period in ms */
1820 @REPLY
1821 int signaled; /* was the timer signaled before this call ? */
1822 @END
1824 /* Cancel a waitable timer */
1825 @REQ(cancel_timer)
1826 obj_handle_t handle; /* handle to the timer */
1827 @REPLY
1828 int signaled; /* was the timer signaled before this calltime ? */
1829 @END
1831 /* Get information on a waitable timer */
1832 @REQ(get_timer_info)
1833 obj_handle_t handle; /* handle to the timer */
1834 @REPLY
1835 timeout_t when; /* absolute time when the timer next expires */
1836 int signaled; /* is the timer signaled? */
1837 @END
1840 /* Retrieve the current context of a thread */
1841 @REQ(get_thread_context)
1842 obj_handle_t handle; /* thread or context handle */
1843 unsigned int flags; /* context flags */
1844 @REPLY
1845 int self; /* was it a handle to the current thread? */
1846 obj_handle_t handle; /* pending context handle */
1847 VARARG(context,context); /* thread context */
1848 @END
1851 /* Set the current context of a thread */
1852 @REQ(set_thread_context)
1853 obj_handle_t handle; /* thread handle */
1854 VARARG(context,context); /* thread context */
1855 @REPLY
1856 int self; /* was it a handle to the current thread? */
1857 @END
1860 /* Fetch a selector entry for a thread */
1861 @REQ(get_selector_entry)
1862 obj_handle_t handle; /* thread handle */
1863 int entry; /* LDT entry */
1864 @REPLY
1865 unsigned int base; /* selector base */
1866 unsigned int limit; /* selector limit */
1867 unsigned char flags; /* selector flags */
1868 @END
1871 /* Add an atom */
1872 @REQ(add_atom)
1873 obj_handle_t table; /* which table to add atom to */
1874 VARARG(name,unicode_str); /* atom name */
1875 @REPLY
1876 atom_t atom; /* resulting atom */
1877 @END
1880 /* Delete an atom */
1881 @REQ(delete_atom)
1882 obj_handle_t table; /* which table to delete atom from */
1883 atom_t atom; /* atom handle */
1884 @END
1887 /* Find an atom */
1888 @REQ(find_atom)
1889 obj_handle_t table; /* which table to find atom from */
1890 VARARG(name,unicode_str); /* atom name */
1891 @REPLY
1892 atom_t atom; /* atom handle */
1893 @END
1896 /* Get information about an atom */
1897 @REQ(get_atom_information)
1898 obj_handle_t table; /* which table to find atom from */
1899 atom_t atom; /* atom handle */
1900 @REPLY
1901 int count; /* atom lock count */
1902 int pinned; /* whether the atom has been pinned */
1903 data_size_t total; /* actual length of atom name */
1904 VARARG(name,unicode_str); /* atom name */
1905 @END
1908 /* Set information about an atom */
1909 @REQ(set_atom_information)
1910 obj_handle_t table; /* which table to find atom from */
1911 atom_t atom; /* atom handle */
1912 int pinned; /* whether to bump atom information */
1913 @END
1916 /* Empty an atom table */
1917 @REQ(empty_atom_table)
1918 obj_handle_t table; /* which table to find atom from */
1919 int if_pinned; /* whether to delete pinned atoms */
1920 @END
1923 /* Init an atom table */
1924 @REQ(init_atom_table)
1925 int entries; /* number of entries (only for local) */
1926 @REPLY
1927 obj_handle_t table; /* handle to the atom table */
1928 @END
1931 /* Get the message queue of the current thread */
1932 @REQ(get_msg_queue)
1933 @REPLY
1934 obj_handle_t handle; /* handle to the queue */
1935 @END
1938 /* Set the file descriptor associated to the current thread queue */
1939 @REQ(set_queue_fd)
1940 obj_handle_t handle; /* handle to the file descriptor */
1941 @END
1944 /* Set the current message queue wakeup mask */
1945 @REQ(set_queue_mask)
1946 unsigned int wake_mask; /* wakeup bits mask */
1947 unsigned int changed_mask; /* changed bits mask */
1948 int skip_wait; /* will we skip waiting if signaled? */
1949 @REPLY
1950 unsigned int wake_bits; /* current wake bits */
1951 unsigned int changed_bits; /* current changed bits */
1952 @END
1955 /* Get the current message queue status */
1956 @REQ(get_queue_status)
1957 unsigned int clear_bits; /* should we clear the change bits? */
1958 @REPLY
1959 unsigned int wake_bits; /* wake bits */
1960 unsigned int changed_bits; /* changed bits since last time */
1961 @END
1964 /* Retrieve the process idle event */
1965 @REQ(get_process_idle_event)
1966 obj_handle_t handle; /* process handle */
1967 @REPLY
1968 obj_handle_t event; /* handle to idle event */
1969 @END
1972 /* Send a message to a thread queue */
1973 @REQ(send_message)
1974 thread_id_t id; /* thread id */
1975 int type; /* message type (see below) */
1976 int flags; /* message flags (see below) */
1977 user_handle_t win; /* window handle */
1978 unsigned int msg; /* message code */
1979 lparam_t wparam; /* parameters */
1980 lparam_t lparam; /* parameters */
1981 timeout_t timeout; /* timeout for reply */
1982 VARARG(data,message_data); /* message data for sent messages */
1983 @END
1985 @REQ(post_quit_message)
1986 int exit_code; /* exit code to return */
1987 @END
1989 enum message_type
1991 MSG_ASCII, /* Ascii message (from SendMessageA) */
1992 MSG_UNICODE, /* Unicode message (from SendMessageW) */
1993 MSG_NOTIFY, /* notify message (from SendNotifyMessageW), always Unicode */
1994 MSG_CALLBACK, /* callback message (from SendMessageCallbackW), always Unicode */
1995 MSG_CALLBACK_RESULT,/* result of a callback message */
1996 MSG_OTHER_PROCESS, /* sent from other process, may include vararg data, always Unicode */
1997 MSG_POSTED, /* posted message (from PostMessageW), always Unicode */
1998 MSG_HARDWARE, /* hardware message */
1999 MSG_WINEVENT, /* winevent message */
2000 MSG_HOOK_LL /* low-level hardware hook */
2002 #define SEND_MSG_ABORT_IF_HUNG 0x01
2005 /* Send a hardware message to a thread queue */
2006 @REQ(send_hardware_message)
2007 user_handle_t win; /* window handle */
2008 hw_input_t input; /* input data */
2009 unsigned int flags; /* flags (see below) */
2010 @REPLY
2011 int wait; /* do we need to wait for a reply? */
2012 int prev_x; /* previous cursor position */
2013 int prev_y;
2014 int new_x; /* new cursor position */
2015 int new_y;
2016 VARARG(keystate,bytes); /* global state array for all the keys */
2017 @END
2018 #define SEND_HWMSG_INJECTED 0x01
2021 /* Get a message from the current queue */
2022 @REQ(get_message)
2023 unsigned int flags; /* PM_* flags */
2024 user_handle_t get_win; /* window handle to get */
2025 unsigned int get_first; /* first message code to get */
2026 unsigned int get_last; /* last message code to get */
2027 unsigned int hw_id; /* id of the previous hardware message (or 0) */
2028 unsigned int wake_mask; /* wakeup bits mask */
2029 unsigned int changed_mask; /* changed bits mask */
2030 @REPLY
2031 user_handle_t win; /* window handle */
2032 unsigned int msg; /* message code */
2033 lparam_t wparam; /* parameters */
2034 lparam_t lparam; /* parameters */
2035 int type; /* message type */
2036 int x; /* message x position */
2037 int y; /* message y position */
2038 unsigned int time; /* message time */
2039 unsigned int active_hooks; /* active hooks bitmap */
2040 data_size_t total; /* total size of extra data */
2041 VARARG(data,message_data); /* message data for sent messages */
2042 @END
2045 /* Reply to a sent message */
2046 @REQ(reply_message)
2047 int remove; /* should we remove the message? */
2048 lparam_t result; /* message result */
2049 VARARG(data,bytes); /* message data for sent messages */
2050 @END
2053 /* Accept and remove the current hardware message */
2054 @REQ(accept_hardware_message)
2055 unsigned int hw_id; /* id of the hardware message */
2056 @END
2059 /* Retrieve the reply for the last message sent */
2060 @REQ(get_message_reply)
2061 int cancel; /* cancel message if not ready? */
2062 @REPLY
2063 lparam_t result; /* message result */
2064 VARARG(data,bytes); /* message data for sent messages */
2065 @END
2068 /* Set a window timer */
2069 @REQ(set_win_timer)
2070 user_handle_t win; /* window handle */
2071 unsigned int msg; /* message to post */
2072 unsigned int rate; /* timer rate in ms */
2073 lparam_t id; /* timer id */
2074 lparam_t lparam; /* message lparam (callback proc) */
2075 @REPLY
2076 lparam_t id; /* timer id */
2077 @END
2080 /* Kill a window timer */
2081 @REQ(kill_win_timer)
2082 user_handle_t win; /* window handle */
2083 lparam_t id; /* timer id */
2084 unsigned int msg; /* message to post */
2085 @END
2088 /* check if the thread owning the window is hung */
2089 @REQ(is_window_hung)
2090 user_handle_t win; /* window handle */
2091 @REPLY
2092 int is_hung;
2093 @END
2096 /* Retrieve info about a serial port */
2097 @REQ(get_serial_info)
2098 obj_handle_t handle; /* handle to comm port */
2099 int flags;
2100 @REPLY
2101 unsigned int eventmask;
2102 unsigned int cookie;
2103 unsigned int pending_write;
2104 @END
2107 /* Set info about a serial port */
2108 @REQ(set_serial_info)
2109 obj_handle_t handle; /* handle to comm port */
2110 int flags; /* bitmask to set values (see below) */
2111 @END
2112 #define SERIALINFO_PENDING_WRITE 0x04
2113 #define SERIALINFO_PENDING_WAIT 0x08
2116 /* Create an async I/O */
2117 @REQ(register_async)
2118 int type; /* type of queue to look after */
2119 async_data_t async; /* async I/O parameters */
2120 int count; /* count - usually # of bytes to be read/written */
2121 @END
2122 #define ASYNC_TYPE_READ 0x01
2123 #define ASYNC_TYPE_WRITE 0x02
2124 #define ASYNC_TYPE_WAIT 0x03
2127 /* Cancel all async op on a fd */
2128 @REQ(cancel_async)
2129 obj_handle_t handle; /* handle to comm port, socket or file */
2130 client_ptr_t iosb; /* I/O status block (NULL=all) */
2131 int only_thread; /* cancel matching this thread */
2132 @END
2135 /* Retrieve results of an async */
2136 @REQ(get_async_result)
2137 client_ptr_t user_arg; /* user arg used to identify async */
2138 @REPLY
2139 data_size_t size; /* result size (input or output depending on the operation) */
2140 VARARG(out_data,bytes); /* iosb output data */
2141 @END
2144 /* Perform a read on a file object */
2145 @REQ(read)
2146 async_data_t async; /* async I/O parameters */
2147 file_pos_t pos; /* read position */
2148 @REPLY
2149 obj_handle_t wait; /* handle to wait on for blocking read */
2150 unsigned int options; /* device open options */
2151 VARARG(data,bytes); /* read data */
2152 @END
2155 /* Perform a write on a file object */
2156 @REQ(write)
2157 async_data_t async; /* async I/O parameters */
2158 file_pos_t pos; /* write position */
2159 VARARG(data,bytes); /* write data */
2160 @REPLY
2161 obj_handle_t wait; /* handle to wait on for blocking write */
2162 unsigned int options; /* device open options */
2163 data_size_t size; /* size written */
2164 @END
2167 /* Perform an ioctl on a file */
2168 @REQ(ioctl)
2169 ioctl_code_t code; /* ioctl code */
2170 async_data_t async; /* async I/O parameters */
2171 VARARG(in_data,bytes); /* ioctl input data */
2172 @REPLY
2173 obj_handle_t wait; /* handle to wait on for blocking ioctl */
2174 unsigned int options; /* device open options */
2175 VARARG(out_data,bytes); /* ioctl output data */
2176 @END
2179 /* Store results of an async irp */
2180 @REQ(set_irp_result)
2181 obj_handle_t handle; /* handle to the irp */
2182 unsigned int status; /* status of the irp */
2183 data_size_t size; /* result size (input or output depending on the operation) */
2184 VARARG(data,bytes); /* output data of the irp */
2185 @END
2188 /* Create a named pipe */
2189 @REQ(create_named_pipe)
2190 unsigned int access;
2191 unsigned int options;
2192 unsigned int sharing;
2193 unsigned int maxinstances;
2194 unsigned int outsize;
2195 unsigned int insize;
2196 timeout_t timeout;
2197 unsigned int flags;
2198 VARARG(objattr,object_attributes); /* object attributes */
2199 @REPLY
2200 obj_handle_t handle; /* handle to the pipe */
2201 @END
2203 /* flags in create_named_pipe and get_named_pipe_info */
2204 #define NAMED_PIPE_MESSAGE_STREAM_WRITE 0x0001
2205 #define NAMED_PIPE_MESSAGE_STREAM_READ 0x0002
2206 #define NAMED_PIPE_NONBLOCKING_MODE 0x0004
2207 #define NAMED_PIPE_SERVER_END 0x8000
2209 /* Set named pipe information by handle */
2210 @REQ(set_named_pipe_info)
2211 obj_handle_t handle;
2212 unsigned int flags;
2213 @END
2215 /* Create a window */
2216 @REQ(create_window)
2217 user_handle_t parent; /* parent window */
2218 user_handle_t owner; /* owner window */
2219 atom_t atom; /* class atom */
2220 mod_handle_t instance; /* module instance */
2221 int dpi; /* system DPI */
2222 int awareness; /* thread DPI awareness */
2223 VARARG(class,unicode_str); /* class name */
2224 @REPLY
2225 user_handle_t handle; /* created window */
2226 user_handle_t parent; /* full handle of parent */
2227 user_handle_t owner; /* full handle of owner */
2228 int extra; /* number of extra bytes */
2229 client_ptr_t class_ptr; /* pointer to class in client address space */
2230 int dpi; /* window DPI if not per-monitor aware */
2231 int awareness; /* window DPI awareness */
2232 @END
2235 /* Destroy a window */
2236 @REQ(destroy_window)
2237 user_handle_t handle; /* handle to the window */
2238 @END
2241 /* Retrieve the desktop window for the current thread */
2242 @REQ(get_desktop_window)
2243 int force; /* force creation if it doesn't exist */
2244 @REPLY
2245 user_handle_t top_window; /* handle to the desktop window */
2246 user_handle_t msg_window; /* handle to the top-level HWND_MESSAGE parent */
2247 @END
2250 /* Set a window owner */
2251 @REQ(set_window_owner)
2252 user_handle_t handle; /* handle to the window */
2253 user_handle_t owner; /* new owner */
2254 @REPLY
2255 user_handle_t full_owner; /* full handle of new owner */
2256 user_handle_t prev_owner; /* full handle of previous owner */
2257 @END
2260 /* Get information from a window handle */
2261 @REQ(get_window_info)
2262 user_handle_t handle; /* handle to the window */
2263 @REPLY
2264 user_handle_t full_handle; /* full 32-bit handle */
2265 user_handle_t last_active; /* last active popup */
2266 process_id_t pid; /* process owning the window */
2267 thread_id_t tid; /* thread owning the window */
2268 atom_t atom; /* class atom */
2269 int is_unicode; /* ANSI or unicode */
2270 int dpi; /* window DPI */
2271 int awareness; /* DPI awareness */
2272 @END
2275 /* Set some information in a window */
2276 @REQ(set_window_info)
2277 unsigned short flags; /* flags for fields to set (see below) */
2278 short int is_unicode; /* ANSI or unicode */
2279 user_handle_t handle; /* handle to the window */
2280 unsigned int style; /* window style */
2281 unsigned int ex_style; /* window extended style */
2282 unsigned int id; /* window id */
2283 mod_handle_t instance; /* creator instance */
2284 lparam_t user_data; /* user-specific data */
2285 int extra_offset; /* offset to set in extra bytes */
2286 data_size_t extra_size; /* size to set in extra bytes */
2287 lparam_t extra_value; /* value to set in extra bytes */
2288 @REPLY
2289 unsigned int old_style; /* old window style */
2290 unsigned int old_ex_style; /* old window extended style */
2291 mod_handle_t old_instance; /* old creator instance */
2292 lparam_t old_user_data; /* old user-specific data */
2293 lparam_t old_extra_value; /* old value in extra bytes */
2294 unsigned int old_id; /* old window id */
2295 @END
2296 #define SET_WIN_STYLE 0x01
2297 #define SET_WIN_EXSTYLE 0x02
2298 #define SET_WIN_ID 0x04
2299 #define SET_WIN_INSTANCE 0x08
2300 #define SET_WIN_USERDATA 0x10
2301 #define SET_WIN_EXTRA 0x20
2302 #define SET_WIN_UNICODE 0x40
2305 /* Set the parent of a window */
2306 @REQ(set_parent)
2307 user_handle_t handle; /* handle to the window */
2308 user_handle_t parent; /* handle to the parent */
2309 @REPLY
2310 user_handle_t old_parent; /* old parent window */
2311 user_handle_t full_parent; /* full handle of new parent */
2312 int dpi; /* new window DPI if not per-monitor aware */
2313 int awareness; /* new DPI awareness */
2314 @END
2317 /* Get a list of the window parents, up to the root of the tree */
2318 @REQ(get_window_parents)
2319 user_handle_t handle; /* handle to the window */
2320 @REPLY
2321 int count; /* total count of parents */
2322 VARARG(parents,user_handles); /* parent handles */
2323 @END
2326 /* Get a list of the window children */
2327 @REQ(get_window_children)
2328 obj_handle_t desktop; /* handle to desktop */
2329 user_handle_t parent; /* parent window */
2330 atom_t atom; /* class atom for the listed children */
2331 thread_id_t tid; /* thread owning the listed children */
2332 VARARG(class,unicode_str); /* class name */
2333 @REPLY
2334 int count; /* total count of children */
2335 VARARG(children,user_handles); /* children handles */
2336 @END
2339 /* Get a list of the window children that contain a given point */
2340 @REQ(get_window_children_from_point)
2341 user_handle_t parent; /* parent window */
2342 int x; /* point in parent coordinates */
2343 int y;
2344 int dpi; /* dpi for the point coordinates */
2345 @REPLY
2346 int count; /* total count of children */
2347 VARARG(children,user_handles); /* children handles */
2348 @END
2351 /* Get window tree information from a window handle */
2352 @REQ(get_window_tree)
2353 user_handle_t handle; /* handle to the window */
2354 @REPLY
2355 user_handle_t parent; /* parent window */
2356 user_handle_t owner; /* owner window */
2357 user_handle_t next_sibling; /* next sibling in Z-order */
2358 user_handle_t prev_sibling; /* prev sibling in Z-order */
2359 user_handle_t first_sibling; /* first sibling in Z-order */
2360 user_handle_t last_sibling; /* last sibling in Z-order */
2361 user_handle_t first_child; /* first child */
2362 user_handle_t last_child; /* last child */
2363 @END
2365 /* Set the position and Z order of a window */
2366 @REQ(set_window_pos)
2367 unsigned short swp_flags; /* SWP_* flags */
2368 unsigned short paint_flags; /* paint flags (see below) */
2369 user_handle_t handle; /* handle to the window */
2370 user_handle_t previous; /* previous window in Z order */
2371 rectangle_t window; /* window rectangle (in parent coords) */
2372 rectangle_t client; /* client rectangle (in parent coords) */
2373 VARARG(valid,rectangles); /* valid rectangles from WM_NCCALCSIZE (in parent coords) */
2374 @REPLY
2375 unsigned int new_style; /* new window style */
2376 unsigned int new_ex_style; /* new window extended style */
2377 user_handle_t surface_win; /* parent window that holds the surface */
2378 int needs_update; /* whether the surface region needs an update */
2379 @END
2380 #define SET_WINPOS_PAINT_SURFACE 0x01 /* window has a paintable surface */
2381 #define SET_WINPOS_PIXEL_FORMAT 0x02 /* window has a custom pixel format */
2383 /* Get the window and client rectangles of a window */
2384 @REQ(get_window_rectangles)
2385 user_handle_t handle; /* handle to the window */
2386 int relative; /* coords relative to (see below) */
2387 int dpi; /* DPI to map to, or zero for per-monitor DPI */
2388 @REPLY
2389 rectangle_t window; /* window rectangle */
2390 rectangle_t client; /* client rectangle */
2391 @END
2392 enum coords_relative
2394 COORDS_CLIENT, /* relative to client area */
2395 COORDS_WINDOW, /* relative to whole window area */
2396 COORDS_PARENT, /* relative to parent's client area */
2397 COORDS_SCREEN /* relative to screen origin */
2401 /* Get the window text */
2402 @REQ(get_window_text)
2403 user_handle_t handle; /* handle to the window */
2404 @REPLY
2405 data_size_t length; /* total length in WCHARs */
2406 VARARG(text,unicode_str); /* window text */
2407 @END
2410 /* Set the window text */
2411 @REQ(set_window_text)
2412 user_handle_t handle; /* handle to the window */
2413 VARARG(text,unicode_str); /* window text */
2414 @END
2417 /* Get the coordinates offset between two windows */
2418 @REQ(get_windows_offset)
2419 user_handle_t from; /* handle to the first window */
2420 user_handle_t to; /* handle to the second window */
2421 int dpi; /* DPI to map to, or zero for per-monitor DPI */
2422 @REPLY
2423 int x; /* x coordinate offset */
2424 int y; /* y coordinate offset */
2425 int mirror; /* whether to mirror the x coordinate */
2426 @END
2429 /* Get the visible region of a window */
2430 @REQ(get_visible_region)
2431 user_handle_t window; /* handle to the window */
2432 unsigned int flags; /* DCX flags */
2433 @REPLY
2434 user_handle_t top_win; /* top window to clip against */
2435 rectangle_t top_rect; /* top window visible rect with screen coords */
2436 rectangle_t win_rect; /* window rect in screen coords */
2437 unsigned int paint_flags; /* paint flags (from SET_WINPOS_* flags) */
2438 data_size_t total_size; /* total size of the resulting region */
2439 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2440 @END
2443 /* Get the visible surface region of a window */
2444 @REQ(get_surface_region)
2445 user_handle_t window; /* handle to the window */
2446 @REPLY
2447 rectangle_t visible_rect; /* window visible rect in screen coords */
2448 data_size_t total_size; /* total size of the resulting region */
2449 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2450 @END
2453 /* Get the window region */
2454 @REQ(get_window_region)
2455 user_handle_t window; /* handle to the window */
2456 @REPLY
2457 data_size_t total_size; /* total size of the resulting region */
2458 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2459 @END
2462 /* Set the window region */
2463 @REQ(set_window_region)
2464 user_handle_t window; /* handle to the window */
2465 int redraw; /* redraw the window? */
2466 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2467 @END
2470 /* Get the window update region */
2471 @REQ(get_update_region)
2472 user_handle_t window; /* handle to the window */
2473 user_handle_t from_child; /* child to start searching from */
2474 unsigned int flags; /* update flags (see below) */
2475 @REPLY
2476 user_handle_t child; /* child to repaint (or window itself) */
2477 unsigned int flags; /* resulting update flags (see below) */
2478 data_size_t total_size; /* total size of the resulting region */
2479 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2480 @END
2481 #define UPDATE_NONCLIENT 0x001 /* get region for repainting non-client area */
2482 #define UPDATE_ERASE 0x002 /* get region for erasing client area */
2483 #define UPDATE_PAINT 0x004 /* get region for painting client area */
2484 #define UPDATE_INTERNALPAINT 0x008 /* get region if internal paint is pending */
2485 #define UPDATE_ALLCHILDREN 0x010 /* force repaint of all children */
2486 #define UPDATE_NOCHILDREN 0x020 /* don't try to repaint any children */
2487 #define UPDATE_NOREGION 0x040 /* don't return a region, only the flags */
2488 #define UPDATE_DELAYED_ERASE 0x080 /* still needs erase after BeginPaint */
2489 #define UPDATE_CLIPCHILDREN 0x100 /* remove clipped children from the update region */
2492 /* Update the z order of a window so that a given rectangle is fully visible */
2493 @REQ(update_window_zorder)
2494 user_handle_t window; /* handle to the window */
2495 rectangle_t rect; /* rectangle that must be visible (in client coords) */
2496 @END
2499 /* Mark parts of a window as needing a redraw */
2500 @REQ(redraw_window)
2501 user_handle_t window; /* handle to the window */
2502 unsigned int flags; /* RDW_* flags */
2503 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2504 @END
2507 /* Set a window property */
2508 @REQ(set_window_property)
2509 user_handle_t window; /* handle to the window */
2510 lparam_t data; /* data to store */
2511 atom_t atom; /* property atom (if no name specified) */
2512 VARARG(name,unicode_str); /* property name */
2513 @END
2516 /* Remove a window property */
2517 @REQ(remove_window_property)
2518 user_handle_t window; /* handle to the window */
2519 atom_t atom; /* property atom (if no name specified) */
2520 VARARG(name,unicode_str); /* property name */
2521 @REPLY
2522 lparam_t data; /* data stored in property */
2523 @END
2526 /* Get a window property */
2527 @REQ(get_window_property)
2528 user_handle_t window; /* handle to the window */
2529 atom_t atom; /* property atom (if no name specified) */
2530 VARARG(name,unicode_str); /* property name */
2531 @REPLY
2532 lparam_t data; /* data stored in property */
2533 @END
2536 /* Get the list of properties of a window */
2537 @REQ(get_window_properties)
2538 user_handle_t window; /* handle to the window */
2539 @REPLY
2540 int total; /* total number of properties */
2541 VARARG(props,properties); /* list of properties */
2542 @END
2545 /* Create a window station */
2546 @REQ(create_winstation)
2547 unsigned int flags; /* window station flags */
2548 unsigned int access; /* wanted access rights */
2549 unsigned int attributes; /* object attributes */
2550 obj_handle_t rootdir; /* root directory */
2551 VARARG(name,unicode_str); /* object name */
2552 @REPLY
2553 obj_handle_t handle; /* handle to the window station */
2554 @END
2557 /* Open a handle to a window station */
2558 @REQ(open_winstation)
2559 unsigned int access; /* wanted access rights */
2560 unsigned int attributes; /* object attributes */
2561 obj_handle_t rootdir; /* root directory */
2562 VARARG(name,unicode_str); /* object name */
2563 @REPLY
2564 obj_handle_t handle; /* handle to the window station */
2565 @END
2568 /* Close a window station */
2569 @REQ(close_winstation)
2570 obj_handle_t handle; /* handle to the window station */
2571 @END
2574 /* Get the process current window station */
2575 @REQ(get_process_winstation)
2576 @REPLY
2577 obj_handle_t handle; /* handle to the window station */
2578 @END
2581 /* Set the process current window station */
2582 @REQ(set_process_winstation)
2583 obj_handle_t handle; /* handle to the window station */
2584 @END
2587 /* Enumerate window stations */
2588 @REQ(enum_winstation)
2589 unsigned int index; /* current index */
2590 @REPLY
2591 unsigned int next; /* next index */
2592 VARARG(name,unicode_str); /* window station name */
2593 @END
2596 /* Create a desktop */
2597 @REQ(create_desktop)
2598 unsigned int flags; /* desktop flags */
2599 unsigned int access; /* wanted access rights */
2600 unsigned int attributes; /* object attributes */
2601 VARARG(name,unicode_str); /* object name */
2602 @REPLY
2603 obj_handle_t handle; /* handle to the desktop */
2604 @END
2607 /* Open a handle to a desktop */
2608 @REQ(open_desktop)
2609 obj_handle_t winsta; /* window station to open (null allowed) */
2610 unsigned int flags; /* desktop flags */
2611 unsigned int access; /* wanted access rights */
2612 unsigned int attributes; /* object attributes */
2613 VARARG(name,unicode_str); /* object name */
2614 @REPLY
2615 obj_handle_t handle; /* handle to the desktop */
2616 @END
2619 /* Open a handle to current input desktop */
2620 @REQ(open_input_desktop)
2621 unsigned int flags; /* desktop flags */
2622 unsigned int access; /* wanted access rights */
2623 unsigned int attributes; /* object attributes */
2624 @REPLY
2625 obj_handle_t handle; /* handle to the desktop */
2626 @END
2629 /* Close a desktop */
2630 @REQ(close_desktop)
2631 obj_handle_t handle; /* handle to the desktop */
2632 @END
2635 /* Get the thread current desktop */
2636 @REQ(get_thread_desktop)
2637 thread_id_t tid; /* thread id */
2638 @REPLY
2639 obj_handle_t handle; /* handle to the desktop */
2640 @END
2643 /* Set the thread current desktop */
2644 @REQ(set_thread_desktop)
2645 obj_handle_t handle; /* handle to the desktop */
2646 @END
2649 /* Enumerate desktops */
2650 @REQ(enum_desktop)
2651 obj_handle_t winstation; /* handle to the window station */
2652 unsigned int index; /* current index */
2653 @REPLY
2654 unsigned int next; /* next index */
2655 VARARG(name,unicode_str); /* window station name */
2656 @END
2659 /* Get/set information about a user object (window station or desktop) */
2660 @REQ(set_user_object_info)
2661 obj_handle_t handle; /* handle to the object */
2662 unsigned int flags; /* information to set/get */
2663 unsigned int obj_flags; /* new object flags */
2664 @REPLY
2665 int is_desktop; /* is object a desktop? */
2666 unsigned int old_obj_flags; /* old object flags */
2667 VARARG(name,unicode_str); /* object name */
2668 @END
2669 #define SET_USER_OBJECT_SET_FLAGS 1
2670 #define SET_USER_OBJECT_GET_FULL_NAME 2
2673 /* Register a hotkey */
2674 @REQ(register_hotkey)
2675 user_handle_t window; /* handle to the window */
2676 int id; /* hotkey identifier */
2677 unsigned int flags; /* modifier keys */
2678 unsigned int vkey; /* virtual key code */
2679 @REPLY
2680 int replaced; /* did we replace an existing hotkey? */
2681 unsigned int flags; /* flags of replaced hotkey */
2682 unsigned int vkey; /* virtual key code of replaced hotkey */
2683 @END
2686 /* Unregister a hotkey */
2687 @REQ(unregister_hotkey)
2688 user_handle_t window; /* handle to the window */
2689 int id; /* hotkey identifier */
2690 @REPLY
2691 unsigned int flags; /* flags of removed hotkey */
2692 unsigned int vkey; /* virtual key code of removed hotkey */
2693 @END
2696 /* Attach (or detach) thread inputs */
2697 @REQ(attach_thread_input)
2698 thread_id_t tid_from; /* thread to be attached */
2699 thread_id_t tid_to; /* thread to which tid_from should be attached */
2700 int attach; /* is it an attach? */
2701 @END
2704 /* Get input data for a given thread */
2705 @REQ(get_thread_input)
2706 thread_id_t tid; /* id of thread */
2707 @REPLY
2708 user_handle_t focus; /* handle to the focus window */
2709 user_handle_t capture; /* handle to the capture window */
2710 user_handle_t active; /* handle to the active window */
2711 user_handle_t foreground; /* handle to the global foreground window */
2712 user_handle_t menu_owner; /* handle to the menu owner */
2713 user_handle_t move_size; /* handle to the moving/resizing window */
2714 user_handle_t caret; /* handle to the caret window */
2715 user_handle_t cursor; /* handle to the cursor */
2716 int show_count; /* cursor show count */
2717 rectangle_t rect; /* caret rectangle */
2718 @END
2721 /* Get the time of the last input event */
2722 @REQ(get_last_input_time)
2723 @REPLY
2724 unsigned int time;
2725 @END
2728 /* Retrieve queue keyboard state for a given thread */
2729 @REQ(get_key_state)
2730 thread_id_t tid; /* id of thread */
2731 int key; /* optional key code or -1 */
2732 @REPLY
2733 unsigned char state; /* state of specified key */
2734 VARARG(keystate,bytes); /* state array for all the keys */
2735 @END
2737 /* Set queue keyboard state for a given thread */
2738 @REQ(set_key_state)
2739 thread_id_t tid; /* id of thread */
2740 int async; /* whether to change the async state too */
2741 VARARG(keystate,bytes); /* state array for all the keys */
2742 @END
2744 /* Set the system foreground window */
2745 @REQ(set_foreground_window)
2746 user_handle_t handle; /* handle to the foreground window */
2747 @REPLY
2748 user_handle_t previous; /* handle to the previous foreground window */
2749 int send_msg_old; /* whether we have to send a msg to the old window */
2750 int send_msg_new; /* whether we have to send a msg to the new window */
2751 @END
2753 /* Set the current thread focus window */
2754 @REQ(set_focus_window)
2755 user_handle_t handle; /* handle to the focus window */
2756 @REPLY
2757 user_handle_t previous; /* handle to the previous focus window */
2758 @END
2760 /* Set the current thread active window */
2761 @REQ(set_active_window)
2762 user_handle_t handle; /* handle to the active window */
2763 @REPLY
2764 user_handle_t previous; /* handle to the previous active window */
2765 @END
2767 /* Set the current thread capture window */
2768 @REQ(set_capture_window)
2769 user_handle_t handle; /* handle to the capture window */
2770 unsigned int flags; /* capture flags (see below) */
2771 @REPLY
2772 user_handle_t previous; /* handle to the previous capture window */
2773 user_handle_t full_handle; /* full 32-bit handle of new capture window */
2774 @END
2775 #define CAPTURE_MENU 0x01 /* capture is for a menu */
2776 #define CAPTURE_MOVESIZE 0x02 /* capture is for moving/resizing */
2779 /* Set the current thread caret window */
2780 @REQ(set_caret_window)
2781 user_handle_t handle; /* handle to the caret window */
2782 int width; /* caret width */
2783 int height; /* caret height */
2784 @REPLY
2785 user_handle_t previous; /* handle to the previous caret window */
2786 rectangle_t old_rect; /* previous caret rectangle */
2787 int old_hide; /* previous hide count */
2788 int old_state; /* previous caret state (1=on, 0=off) */
2789 @END
2792 /* Set the current thread caret information */
2793 @REQ(set_caret_info)
2794 unsigned int flags; /* caret flags (see below) */
2795 user_handle_t handle; /* handle to the caret window */
2796 int x; /* caret x position */
2797 int y; /* caret y position */
2798 int hide; /* increment for hide count (can be negative to show it) */
2799 int state; /* caret state (see below) */
2800 @REPLY
2801 user_handle_t full_handle; /* handle to the current caret window */
2802 rectangle_t old_rect; /* previous caret rectangle */
2803 int old_hide; /* previous hide count */
2804 int old_state; /* previous caret state (1=on, 0=off) */
2805 @END
2806 #define SET_CARET_POS 0x01 /* set the caret position from x,y */
2807 #define SET_CARET_HIDE 0x02 /* increment the caret hide count */
2808 #define SET_CARET_STATE 0x04 /* set the caret on/off state */
2809 enum caret_state
2811 CARET_STATE_OFF, /* off */
2812 CARET_STATE_ON, /* on */
2813 CARET_STATE_TOGGLE, /* toggle current state */
2814 CARET_STATE_ON_IF_MOVED /* on if the position differs, unchanged otherwise */
2818 /* Set a window hook */
2819 @REQ(set_hook)
2820 int id; /* id of the hook */
2821 process_id_t pid; /* id of process to set the hook into */
2822 thread_id_t tid; /* id of thread to set the hook into */
2823 int event_min;
2824 int event_max;
2825 client_ptr_t proc; /* hook procedure */
2826 int flags;
2827 int unicode; /* is it a unicode hook? */
2828 VARARG(module,unicode_str); /* module name */
2829 @REPLY
2830 user_handle_t handle; /* handle to the hook */
2831 unsigned int active_hooks; /* active hooks bitmap */
2832 @END
2835 /* Remove a window hook */
2836 @REQ(remove_hook)
2837 user_handle_t handle; /* handle to the hook */
2838 client_ptr_t proc; /* hook procedure if handle is 0 */
2839 int id; /* id of the hook if handle is 0 */
2840 @REPLY
2841 unsigned int active_hooks; /* active hooks bitmap */
2842 @END
2845 /* Start calling a hook chain */
2846 @REQ(start_hook_chain)
2847 int id; /* id of the hook */
2848 int event; /* signalled event */
2849 user_handle_t window; /* handle to the event window */
2850 int object_id; /* object id for out of context winevent */
2851 int child_id; /* child id for out of context winevent */
2852 @REPLY
2853 user_handle_t handle; /* handle to the next hook */
2854 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2855 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2856 int unicode; /* is it a unicode hook? */
2857 client_ptr_t proc; /* hook procedure */
2858 unsigned int active_hooks; /* active hooks bitmap */
2859 VARARG(module,unicode_str); /* module name */
2860 @END
2863 /* Finished calling a hook chain */
2864 @REQ(finish_hook_chain)
2865 int id; /* id of the hook */
2866 @END
2869 /* Get the hook information */
2870 @REQ(get_hook_info)
2871 user_handle_t handle; /* handle to the current hook */
2872 int get_next; /* do we want info about current or next hook? */
2873 int event; /* signalled event */
2874 user_handle_t window; /* handle to the event window */
2875 int object_id; /* object id for out of context winevent */
2876 int child_id; /* child id for out of context winevent */
2877 @REPLY
2878 user_handle_t handle; /* handle to the hook */
2879 int id; /* id of the hook */
2880 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2881 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2882 client_ptr_t proc; /* hook procedure */
2883 int unicode; /* is it a unicode hook? */
2884 VARARG(module,unicode_str); /* module name */
2885 @END
2888 /* Create a window class */
2889 @REQ(create_class)
2890 int local; /* is it a local class? */
2891 atom_t atom; /* class atom */
2892 unsigned int style; /* class style */
2893 mod_handle_t instance; /* module instance */
2894 int extra; /* number of extra class bytes */
2895 int win_extra; /* number of window extra bytes */
2896 client_ptr_t client_ptr; /* pointer to class in client address space */
2897 data_size_t name_offset; /* base class name offset for specified atom */
2898 VARARG(name,unicode_str); /* class name */
2899 @REPLY
2900 atom_t atom; /* resulting class atom */
2901 @END
2904 /* Destroy a window class */
2905 @REQ(destroy_class)
2906 atom_t atom; /* class atom */
2907 mod_handle_t instance; /* module instance */
2908 VARARG(name,unicode_str); /* class name */
2909 @REPLY
2910 client_ptr_t client_ptr; /* pointer to class in client address space */
2911 @END
2914 /* Set some information in a class */
2915 @REQ(set_class_info)
2916 user_handle_t window; /* handle to the window */
2917 unsigned int flags; /* flags for info to set (see below) */
2918 atom_t atom; /* class atom */
2919 unsigned int style; /* class style */
2920 int win_extra; /* number of window extra bytes */
2921 mod_handle_t instance; /* module instance */
2922 int extra_offset; /* offset to set in extra bytes */
2923 data_size_t extra_size; /* size to set in extra bytes */
2924 lparam_t extra_value; /* value to set in extra bytes */
2925 @REPLY
2926 atom_t old_atom; /* previous class atom */
2927 atom_t base_atom; /* base class atom */
2928 mod_handle_t old_instance; /* previous module instance */
2929 lparam_t old_extra_value; /* old value in extra bytes */
2930 unsigned int old_style; /* previous class style */
2931 int old_extra; /* previous number of class extra bytes */
2932 int old_win_extra; /* previous number of window extra bytes */
2933 @END
2934 #define SET_CLASS_ATOM 0x0001
2935 #define SET_CLASS_STYLE 0x0002
2936 #define SET_CLASS_WINEXTRA 0x0004
2937 #define SET_CLASS_INSTANCE 0x0008
2938 #define SET_CLASS_EXTRA 0x0010
2941 /* Open the clipboard */
2942 @REQ(open_clipboard)
2943 user_handle_t window; /* clipboard window */
2944 @REPLY
2945 user_handle_t owner; /* current clipboard owner */
2946 @END
2949 /* Close the clipboard */
2950 @REQ(close_clipboard)
2951 @REPLY
2952 user_handle_t viewer; /* first clipboard viewer */
2953 user_handle_t owner; /* current clipboard owner */
2954 @END
2957 /* Empty the clipboard and grab ownership */
2958 @REQ(empty_clipboard)
2959 @END
2962 /* Add a data format to the clipboard */
2963 @REQ(set_clipboard_data)
2964 unsigned int format; /* clipboard format of the data */
2965 unsigned int lcid; /* locale id to use for synthesizing text formats */
2966 VARARG(data,bytes); /* data contents */
2967 @REPLY
2968 unsigned int seqno; /* sequence number for the set data */
2969 @END
2972 /* Fetch a data format from the clipboard */
2973 @REQ(get_clipboard_data)
2974 unsigned int format; /* clipboard format of the data */
2975 int render; /* will we try to render it if missing? */
2976 int cached; /* do we already have it in the client-side cache? */
2977 unsigned int seqno; /* sequence number for the data in the cache */
2978 @REPLY
2979 unsigned int from; /* for synthesized data, format to generate it from */
2980 user_handle_t owner; /* clipboard owner for delayed-rendered formats */
2981 unsigned int seqno; /* sequence number for the originally set data */
2982 data_size_t total; /* total data size */
2983 VARARG(data,bytes); /* data contents */
2984 @END
2987 /* Retrieve a list of available formats */
2988 @REQ(get_clipboard_formats)
2989 unsigned int format; /* specific format to query, return all if 0 */
2990 @REPLY
2991 unsigned int count; /* count of available formats */
2992 VARARG(formats,uints); /* array of available formats */
2993 @END
2996 /* Retrieve the next available format */
2997 @REQ(enum_clipboard_formats)
2998 unsigned int previous; /* previous format, or first if 0 */
2999 @REPLY
3000 unsigned int format; /* next format */
3001 @END
3004 /* Release ownership of the clipboard */
3005 @REQ(release_clipboard)
3006 user_handle_t owner; /* clipboard owner to release */
3007 @REPLY
3008 user_handle_t viewer; /* first clipboard viewer */
3009 user_handle_t owner; /* current clipboard owner */
3010 @END
3013 /* Get clipboard information */
3014 @REQ(get_clipboard_info)
3015 @REPLY
3016 user_handle_t window; /* clipboard window */
3017 user_handle_t owner; /* clipboard owner */
3018 user_handle_t viewer; /* clipboard viewer */
3019 unsigned int seqno; /* current sequence number */
3020 @END
3023 /* Set the clipboard viewer window */
3024 @REQ(set_clipboard_viewer)
3025 user_handle_t viewer; /* clipboard viewer */
3026 user_handle_t previous; /* if non-zero, check that this was the previous viewer */
3027 @REPLY
3028 user_handle_t old_viewer; /* previous clipboard viewer */
3029 user_handle_t owner; /* clipboard owner */
3030 @END
3033 /* Add a clipboard listener window */
3034 @REQ(add_clipboard_listener)
3035 user_handle_t window; /* clipboard listener window */
3036 @END
3039 /* Remove a clipboard listener window */
3040 @REQ(remove_clipboard_listener)
3041 user_handle_t window; /* clipboard listener window */
3042 @END
3045 /* Open a security token */
3046 @REQ(open_token)
3047 obj_handle_t handle; /* handle to the thread or process */
3048 unsigned int access; /* access rights to the new token */
3049 unsigned int attributes;/* object attributes */
3050 unsigned int flags; /* flags (see below) */
3051 @REPLY
3052 obj_handle_t token; /* handle to the token */
3053 @END
3054 #define OPEN_TOKEN_THREAD 1
3055 #define OPEN_TOKEN_AS_SELF 2
3058 /* Set/get the global windows */
3059 @REQ(set_global_windows)
3060 unsigned int flags; /* flags for fields to set (see below) */
3061 user_handle_t shell_window; /* handle to the new shell window */
3062 user_handle_t shell_listview; /* handle to the new shell listview window */
3063 user_handle_t progman_window; /* handle to the new program manager window */
3064 user_handle_t taskman_window; /* handle to the new task manager window */
3065 @REPLY
3066 user_handle_t old_shell_window; /* handle to the shell window */
3067 user_handle_t old_shell_listview; /* handle to the shell listview window */
3068 user_handle_t old_progman_window; /* handle to the new program manager window */
3069 user_handle_t old_taskman_window; /* handle to the new task manager window */
3070 @END
3071 #define SET_GLOBAL_SHELL_WINDOWS 0x01 /* set both main shell and listview windows */
3072 #define SET_GLOBAL_PROGMAN_WINDOW 0x02
3073 #define SET_GLOBAL_TASKMAN_WINDOW 0x04
3075 /* Adjust the privileges held by a token */
3076 @REQ(adjust_token_privileges)
3077 obj_handle_t handle; /* handle to the token */
3078 int disable_all; /* disable all privileges? */
3079 int get_modified_state; /* get modified privileges? */
3080 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to enable/disable/remove */
3081 @REPLY
3082 unsigned int len; /* total length in bytes required to store token privileges */
3083 VARARG(privileges,LUID_AND_ATTRIBUTES); /* modified privileges */
3084 @END
3086 /* Retrieves the set of privileges held by or available to a token */
3087 @REQ(get_token_privileges)
3088 obj_handle_t handle; /* handle to the token */
3089 @REPLY
3090 unsigned int len; /* total length in bytes required to store token privileges */
3091 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
3092 @END
3094 /* Check the token has the required privileges */
3095 @REQ(check_token_privileges)
3096 obj_handle_t handle; /* handle to the token */
3097 int all_required; /* are all the privileges required for the check to succeed? */
3098 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to check */
3099 @REPLY
3100 int has_privileges; /* does the token have the required privileges? */
3101 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
3102 @END
3104 @REQ(duplicate_token)
3105 obj_handle_t handle; /* handle to the token to duplicate */
3106 unsigned int access; /* access rights to the new token */
3107 int primary; /* is the new token to be a primary one? */
3108 int impersonation_level; /* impersonation level of the new token */
3109 VARARG(objattr,object_attributes); /* object attributes */
3110 @REPLY
3111 obj_handle_t new_handle; /* duplicated handle */
3112 @END
3114 @REQ(filter_token)
3115 obj_handle_t handle; /* handle to the token to duplicate */
3116 unsigned int flags; /* flags */
3117 data_size_t privileges_size; /* size of privileges */
3118 VARARG(privileges,LUID_AND_ATTRIBUTES,privileges_size); /* privileges to remove from new token */
3119 VARARG(disable_sids,SID); /* array of groups to remove from new token */
3120 @REPLY
3121 obj_handle_t new_handle; /* filtered handle */
3122 @END
3124 @REQ(access_check)
3125 obj_handle_t handle; /* handle to the token */
3126 unsigned int desired_access; /* desired access to the object */
3127 unsigned int mapping_read; /* mapping from generic read to specific rights */
3128 unsigned int mapping_write; /* mapping from generic write to specific rights */
3129 unsigned int mapping_execute; /* mapping from generic execute to specific rights */
3130 unsigned int mapping_all; /* mapping from generic all to specific rights */
3131 VARARG(sd,security_descriptor); /* security descriptor to check */
3132 @REPLY
3133 unsigned int access_granted; /* access rights actually granted */
3134 unsigned int access_status; /* was access granted? */
3135 unsigned int privileges_len; /* length needed to store privileges */
3136 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges used during access check */
3137 @END
3139 @REQ(get_token_sid)
3140 obj_handle_t handle; /* handle to the token */
3141 unsigned int which_sid; /* which SID to retrieve from the token */
3142 @REPLY
3143 data_size_t sid_len; /* length needed to store sid */
3144 VARARG(sid,SID); /* the sid specified by which_sid from the token */
3145 @END
3147 @REQ(get_token_groups)
3148 obj_handle_t handle; /* handle to the token */
3149 @REPLY
3150 data_size_t user_len; /* length needed to store user */
3151 VARARG(user,token_groups); /* groups the token's user belongs to */
3152 @END
3154 @REQ(get_token_default_dacl)
3155 obj_handle_t handle; /* handle to the token */
3156 @REPLY
3157 data_size_t acl_len; /* length needed to store access control list */
3158 VARARG(acl,ACL); /* access control list */
3159 @END
3161 @REQ(set_token_default_dacl)
3162 obj_handle_t handle; /* handle to the token */
3163 VARARG(acl,ACL); /* default dacl to set */
3164 @END
3166 @REQ(set_security_object)
3167 obj_handle_t handle; /* handle to the object */
3168 unsigned int security_info; /* which parts of security descriptor to set */
3169 VARARG(sd,security_descriptor); /* security descriptor to set */
3170 @END
3172 @REQ(get_security_object)
3173 obj_handle_t handle; /* handle to the object */
3174 unsigned int security_info; /* which parts of security descriptor to get */
3175 @REPLY
3176 unsigned int sd_len; /* buffer size needed for sd */
3177 VARARG(sd,security_descriptor); /* retrieved security descriptor */
3178 @END
3181 struct handle_info
3183 process_id_t owner;
3184 obj_handle_t handle;
3185 unsigned int access;
3188 /* Return a list of all opened handles */
3189 @REQ(get_system_handles)
3190 @REPLY
3191 unsigned int count; /* number of handles */
3192 VARARG(data,handle_infos); /* array of handle_infos */
3193 @END
3196 /* Create a mailslot */
3197 @REQ(create_mailslot)
3198 unsigned int access; /* wanted access rights */
3199 timeout_t read_timeout;
3200 unsigned int max_msgsize;
3201 VARARG(objattr,object_attributes); /* object attributes */
3202 @REPLY
3203 obj_handle_t handle; /* handle to the mailslot */
3204 @END
3207 /* Set mailslot information */
3208 @REQ(set_mailslot_info)
3209 obj_handle_t handle; /* handle to the mailslot */
3210 timeout_t read_timeout;
3211 unsigned int flags;
3212 @REPLY
3213 timeout_t read_timeout;
3214 unsigned int max_msgsize;
3215 @END
3216 #define MAILSLOT_SET_READ_TIMEOUT 1
3219 /* Create a directory object */
3220 @REQ(create_directory)
3221 unsigned int access; /* access flags */
3222 VARARG(objattr,object_attributes); /* object attributes */
3223 @REPLY
3224 obj_handle_t handle; /* handle to the directory */
3225 @END
3228 /* Open a directory object */
3229 @REQ(open_directory)
3230 unsigned int access; /* access flags */
3231 unsigned int attributes; /* object attributes */
3232 obj_handle_t rootdir; /* root directory */
3233 VARARG(directory_name,unicode_str); /* Directory name */
3234 @REPLY
3235 obj_handle_t handle; /* handle to the directory */
3236 @END
3239 /* Get a directory entry by index */
3240 @REQ(get_directory_entry)
3241 obj_handle_t handle; /* handle to the directory */
3242 unsigned int index; /* entry index */
3243 @REPLY
3244 data_size_t name_len; /* length of the entry name in bytes */
3245 VARARG(name,unicode_str,name_len); /* entry name */
3246 VARARG(type,unicode_str); /* entry type */
3247 @END
3250 /* Create a symbolic link object */
3251 @REQ(create_symlink)
3252 unsigned int access; /* access flags */
3253 VARARG(objattr,object_attributes); /* object attributes */
3254 VARARG(target_name,unicode_str); /* target name */
3255 @REPLY
3256 obj_handle_t handle; /* handle to the symlink */
3257 @END
3260 /* Open a symbolic link object */
3261 @REQ(open_symlink)
3262 unsigned int access; /* access flags */
3263 unsigned int attributes; /* object attributes */
3264 obj_handle_t rootdir; /* root directory */
3265 VARARG(name,unicode_str); /* symlink name */
3266 @REPLY
3267 obj_handle_t handle; /* handle to the symlink */
3268 @END
3271 /* Query a symbolic link object */
3272 @REQ(query_symlink)
3273 obj_handle_t handle; /* handle to the symlink */
3274 @REPLY
3275 data_size_t total; /* total needed size for name */
3276 VARARG(target_name,unicode_str); /* target name */
3277 @END
3280 /* Query basic object information */
3281 @REQ(get_object_info)
3282 obj_handle_t handle; /* handle to the object */
3283 @REPLY
3284 unsigned int access; /* granted access mask */
3285 unsigned int ref_count; /* object ref count */
3286 unsigned int handle_count; /* object handle count */
3287 data_size_t total; /* total needed size for name */
3288 VARARG(name,unicode_str); /* object name */
3289 @END
3292 /* Query object type name information */
3293 @REQ(get_object_type)
3294 obj_handle_t handle; /* handle to the object */
3295 @REPLY
3296 data_size_t total; /* needed size for type name */
3297 VARARG(type,unicode_str); /* type name */
3298 @END
3301 /* Query the impersonation level of an impersonation token */
3302 @REQ(get_token_impersonation_level)
3303 obj_handle_t handle; /* handle to the object */
3304 @REPLY
3305 int impersonation_level; /* impersonation level of the impersonation token */
3306 @END
3308 /* Allocate a locally-unique identifier */
3309 @REQ(allocate_locally_unique_id)
3310 @REPLY
3311 luid_t luid;
3312 @END
3315 /* Create a device manager */
3316 @REQ(create_device_manager)
3317 unsigned int access; /* wanted access rights */
3318 unsigned int attributes; /* object attributes */
3319 @REPLY
3320 obj_handle_t handle; /* handle to the device */
3321 @END
3324 /* Create a device */
3325 @REQ(create_device)
3326 obj_handle_t rootdir; /* root directory */
3327 client_ptr_t user_ptr; /* opaque ptr for use by client */
3328 obj_handle_t manager; /* device manager */
3329 VARARG(name,unicode_str); /* object name */
3330 @END
3333 /* Delete a device */
3334 @REQ(delete_device)
3335 obj_handle_t manager; /* handle to the device manager */
3336 client_ptr_t device; /* pointer to the device */
3337 @END
3340 /* Retrieve the next pending device irp request */
3341 @REQ(get_next_device_request)
3342 obj_handle_t manager; /* handle to the device manager */
3343 obj_handle_t prev; /* handle to the previous irp */
3344 unsigned int status; /* status of the previous irp */
3345 client_ptr_t user_ptr; /* user pointer of the previous irp */
3346 @REPLY
3347 irp_params_t params; /* irp parameters */
3348 obj_handle_t next; /* handle to the next irp */
3349 thread_id_t client_tid; /* tid of thread calling irp */
3350 client_ptr_t client_thread; /* pointer to thread object of calling irp */
3351 data_size_t in_size; /* total needed input size */
3352 VARARG(next_data,bytes); /* input data of the next irp */
3353 @END
3356 /* Get kernel pointer from server object */
3357 @REQ(get_kernel_object_ptr)
3358 obj_handle_t manager; /* handle to the device manager */
3359 obj_handle_t handle; /* object handle */
3360 @REPLY
3361 client_ptr_t user_ptr; /* kernel object pointer */
3362 @END
3365 /* Associate kernel pointer with server object */
3366 @REQ(set_kernel_object_ptr)
3367 obj_handle_t manager; /* handle to the device manager */
3368 obj_handle_t handle; /* object handle */
3369 client_ptr_t user_ptr; /* kernel object pointer */
3370 @END
3373 /* Grab server object reference from kernel object pointer */
3374 @REQ(grab_kernel_object)
3375 obj_handle_t manager; /* handle to the device manager */
3376 client_ptr_t user_ptr; /* kernel object pointer */
3377 @END
3380 /* Release server object reference from kernel object pointer */
3381 @REQ(release_kernel_object)
3382 obj_handle_t manager; /* handle to the device manager */
3383 client_ptr_t user_ptr; /* kernel object pointer */
3384 @END
3387 /* Get handle from kernel object pointer */
3388 @REQ(get_kernel_object_handle)
3389 obj_handle_t manager; /* handle to the device manager */
3390 client_ptr_t user_ptr; /* kernel object pointer */
3391 unsigned int access; /* wanted access rights */
3392 @REPLY
3393 obj_handle_t handle; /* kernel object handle */
3394 @END
3397 /* Make the current process a system process */
3398 @REQ(make_process_system)
3399 @REPLY
3400 obj_handle_t event; /* event signaled when all user processes have exited */
3401 @END
3404 /* Get detailed fixed-size information about a token */
3405 @REQ(get_token_statistics)
3406 obj_handle_t handle; /* handle to the object */
3407 @REPLY
3408 luid_t token_id; /* locally-unique identifier of the token */
3409 luid_t modified_id; /* locally-unique identifier of the modified version of the token */
3410 int primary; /* is the token primary or impersonation? */
3411 int impersonation_level; /* level of impersonation */
3412 int group_count; /* the number of groups the token is a member of */
3413 int privilege_count; /* the number of privileges the token has */
3414 @END
3417 /* Create I/O completion port */
3418 @REQ(create_completion)
3419 unsigned int access; /* desired access to a port */
3420 unsigned int concurrent; /* max number of concurrent active threads */
3421 VARARG(objattr,object_attributes); /* object attributes */
3422 @REPLY
3423 obj_handle_t handle; /* port handle */
3424 @END
3427 /* Open I/O completion port */
3428 @REQ(open_completion)
3429 unsigned int access; /* desired access to a port */
3430 unsigned int attributes; /* object attributes */
3431 obj_handle_t rootdir; /* root directory */
3432 VARARG(filename,unicode_str); /* port name */
3433 @REPLY
3434 obj_handle_t handle; /* port handle */
3435 @END
3438 /* add completion to completion port */
3439 @REQ(add_completion)
3440 obj_handle_t handle; /* port handle */
3441 apc_param_t ckey; /* completion key */
3442 apc_param_t cvalue; /* completion value */
3443 apc_param_t information; /* IO_STATUS_BLOCK Information */
3444 unsigned int status; /* completion result */
3445 @END
3448 /* get completion from completion port queue */
3449 @REQ(remove_completion)
3450 obj_handle_t handle; /* port handle */
3451 @REPLY
3452 apc_param_t ckey; /* completion key */
3453 apc_param_t cvalue; /* completion value */
3454 apc_param_t information; /* IO_STATUS_BLOCK Information */
3455 unsigned int status; /* completion result */
3456 @END
3459 /* get completion queue depth */
3460 @REQ(query_completion)
3461 obj_handle_t handle; /* port handle */
3462 @REPLY
3463 unsigned int depth; /* completion queue depth */
3464 @END
3467 /* associate object with completion port */
3468 @REQ(set_completion_info)
3469 obj_handle_t handle; /* object handle */
3470 apc_param_t ckey; /* completion key */
3471 obj_handle_t chandle; /* port handle */
3472 @END
3475 /* check for associated completion and push msg */
3476 @REQ(add_fd_completion)
3477 obj_handle_t handle; /* async' object */
3478 apc_param_t cvalue; /* completion value */
3479 apc_param_t information; /* IO_STATUS_BLOCK Information */
3480 unsigned int status; /* completion status */
3481 int async; /* completion is an async result */
3482 @END
3485 /* set fd completion information */
3486 @REQ(set_fd_completion_mode)
3487 obj_handle_t handle; /* handle to a file or directory */
3488 unsigned int flags; /* completion notification flags */
3489 @END
3492 /* set fd disposition information */
3493 @REQ(set_fd_disp_info)
3494 obj_handle_t handle; /* handle to a file or directory */
3495 int unlink; /* whether to unlink file on close */
3496 @END
3499 /* set fd name information */
3500 @REQ(set_fd_name_info)
3501 obj_handle_t handle; /* handle to a file or directory */
3502 obj_handle_t rootdir; /* root directory */
3503 int link; /* link instead of renaming */
3504 int replace; /* replace an existing file? */
3505 VARARG(filename,string); /* new file name */
3506 @END
3509 /* Retrieve layered info for a window */
3510 @REQ(get_window_layered_info)
3511 user_handle_t handle; /* handle to the window */
3512 @REPLY
3513 unsigned int color_key; /* color key */
3514 unsigned int alpha; /* alpha (0..255) */
3515 unsigned int flags; /* LWA_* flags */
3516 @END
3519 /* Set layered info for a window */
3520 @REQ(set_window_layered_info)
3521 user_handle_t handle; /* handle to the window */
3522 unsigned int color_key; /* color key */
3523 unsigned int alpha; /* alpha (0..255) */
3524 unsigned int flags; /* LWA_* flags */
3525 @END
3528 /* Allocate an arbitrary user handle */
3529 @REQ(alloc_user_handle)
3530 @REPLY
3531 user_handle_t handle; /* allocated handle */
3532 @END
3535 /* Free an arbitrary user handle */
3536 @REQ(free_user_handle)
3537 user_handle_t handle; /* handle to free*/
3538 @END
3541 /* Set/get the current cursor */
3542 @REQ(set_cursor)
3543 unsigned int flags; /* flags for fields to set (see below) */
3544 user_handle_t handle; /* handle to the cursor */
3545 int show_count; /* show count increment/decrement */
3546 int x; /* cursor position */
3547 int y;
3548 rectangle_t clip; /* cursor clip rectangle */
3549 unsigned int clip_msg; /* message to post on cursor clip changes */
3550 @REPLY
3551 user_handle_t prev_handle; /* previous handle */
3552 int prev_count; /* previous show count */
3553 int prev_x; /* previous position */
3554 int prev_y;
3555 int new_x; /* new position */
3556 int new_y;
3557 rectangle_t new_clip; /* new clip rectangle */
3558 unsigned int last_change; /* time of last position change */
3559 @END
3560 #define SET_CURSOR_HANDLE 0x01
3561 #define SET_CURSOR_COUNT 0x02
3562 #define SET_CURSOR_POS 0x04
3563 #define SET_CURSOR_CLIP 0x08
3564 #define SET_CURSOR_NOCLIP 0x10
3566 /* Get the history of the 64 last cursor positions */
3567 @REQ(get_cursor_history)
3568 @REPLY
3569 VARARG(history,cursor_positions);
3570 @END
3573 /* Batch read rawinput message data */
3574 @REQ(get_rawinput_buffer)
3575 data_size_t rawinput_size; /* size of RAWINPUT structure */
3576 data_size_t buffer_size; /* size of output buffer */
3577 @REPLY
3578 data_size_t next_size; /* minimum size to get next message data */
3579 unsigned int count;
3580 VARARG(data,bytes);
3581 @END
3583 /* Modify the list of registered rawinput devices */
3584 @REQ(update_rawinput_devices)
3585 VARARG(devices,rawinput_devices);
3586 @END
3588 /* Retrieve the list of registered rawinput devices */
3589 @REQ(get_rawinput_devices)
3590 @REPLY
3591 unsigned int device_count;
3592 VARARG(devices,rawinput_devices);
3593 @END
3595 /* Create a new job object */
3596 @REQ(create_job)
3597 unsigned int access; /* wanted access rights */
3598 VARARG(objattr,object_attributes); /* object attributes */
3599 @REPLY
3600 obj_handle_t handle; /* handle to the job */
3601 @END
3604 /* Open a job object */
3605 @REQ(open_job)
3606 unsigned int access; /* wanted access rights */
3607 unsigned int attributes; /* object attributes */
3608 obj_handle_t rootdir; /* root directory */
3609 VARARG(name,unicode_str); /* object name */
3610 @REPLY
3611 obj_handle_t handle; /* handle to the job */
3612 @END
3615 /* Assign a job object to a process */
3616 @REQ(assign_job)
3617 obj_handle_t job; /* handle to the job */
3618 obj_handle_t process; /* handle to the process */
3619 @END
3622 /* Check if a process is associated with a job */
3623 @REQ(process_in_job)
3624 obj_handle_t job; /* handle to the job */
3625 obj_handle_t process; /* handle to the process */
3626 @END
3629 /* Set limit flags on a job */
3630 @REQ(set_job_limits)
3631 obj_handle_t handle; /* handle to the job */
3632 unsigned int limit_flags; /* new limit flags */
3633 @END
3636 /* Set new completion port for a job */
3637 @REQ(set_job_completion_port)
3638 obj_handle_t job; /* handle to the job */
3639 obj_handle_t port; /* handle to the completion port */
3640 client_ptr_t key; /* key to send with completion messages */
3641 @END
3644 /* Retrieve information about a job */
3645 @REQ(get_job_info)
3646 obj_handle_t handle; /* handle to the job */
3647 @REPLY
3648 int total_processes; /* total count of processes */
3649 int active_processes; /* count of running processes */
3650 @END
3653 /* Terminate all processes associated with the job */
3654 @REQ(terminate_job)
3655 obj_handle_t handle; /* handle to the job */
3656 int status; /* process exit code */
3657 @END
3660 /* Suspend a process */
3661 @REQ(suspend_process)
3662 obj_handle_t handle; /* process handle */
3663 @END
3666 /* Resume a process */
3667 @REQ(resume_process)
3668 obj_handle_t handle; /* process handle */
3669 @END