amstream: Increase parent IAMMediaStream refcount in IDirectDrawMediaStream::CreateSa...
[wine.git] / server / protocol.def
blob1bbc8c5008fc720884abf890463ed2587794146f
1 /* -*- C -*-
3 * Wine server protocol definition
5 * Copyright (C) 2001 Alexandre Julliard
7 * This file is used by tools/make_requests to build the
8 * protocol structures in include/wine/server_protocol.h
10 * This library is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU Lesser General Public
12 * License as published by the Free Software Foundation; either
13 * version 2.1 of the License, or (at your option) any later version.
15 * This library is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 * Lesser General Public License for more details.
20 * You should have received a copy of the GNU Lesser General Public
21 * License along with this library; if not, write to the Free Software
22 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
25 @HEADER /* start of C declarations */
27 #include <stdarg.h>
28 #include <stdlib.h>
29 #include <time.h>
31 #include <windef.h>
32 #include <winbase.h>
34 typedef unsigned int obj_handle_t;
35 typedef unsigned int user_handle_t;
36 typedef unsigned int atom_t;
37 typedef unsigned int process_id_t;
38 typedef unsigned int thread_id_t;
39 typedef unsigned int data_size_t;
40 typedef unsigned int ioctl_code_t;
41 typedef unsigned __int64 lparam_t;
42 typedef unsigned __int64 apc_param_t;
43 typedef unsigned __int64 mem_size_t;
44 typedef unsigned __int64 file_pos_t;
45 typedef unsigned __int64 client_ptr_t;
46 typedef unsigned __int64 affinity_t;
47 typedef client_ptr_t mod_handle_t;
49 struct request_header
51 int req; /* request code */
52 data_size_t request_size; /* request variable part size */
53 data_size_t reply_size; /* reply variable part maximum size */
56 struct reply_header
58 unsigned int error; /* error result */
59 data_size_t reply_size; /* reply variable part size */
62 /* placeholder structure for the maximum allowed request size */
63 /* this is used to construct the generic_request union */
64 struct request_max_size
66 int pad[16]; /* the max request size is 16 ints */
69 #define FIRST_USER_HANDLE 0x0020 /* first possible value for low word of user handle */
70 #define LAST_USER_HANDLE 0xffef /* last possible value for low word of user handle */
73 /* debug event data */
74 typedef union
76 int code; /* event code */
77 struct
79 int code; /* EXCEPTION_DEBUG_EVENT */
80 int first; /* first chance exception? */
81 unsigned int exc_code; /* exception code */
82 unsigned int flags; /* exception flags */
83 client_ptr_t record; /* exception record */
84 client_ptr_t address; /* exception address */
85 int nb_params; /* number of parameters */
86 int __pad;
87 client_ptr_t params[15]; /* parameters */
88 } exception;
89 struct
91 int code; /* CREATE_THREAD_DEBUG_EVENT */
92 obj_handle_t handle; /* handle to the new thread */
93 client_ptr_t teb; /* thread teb (in debugged process address space) */
94 client_ptr_t start; /* thread startup routine */
95 } create_thread;
96 struct
98 int code; /* CREATE_PROCESS_DEBUG_EVENT */
99 obj_handle_t file; /* handle to the process exe file */
100 obj_handle_t process; /* handle to the new process */
101 obj_handle_t thread; /* handle to the new thread */
102 mod_handle_t base; /* base of executable image */
103 int dbg_offset; /* offset of debug info in file */
104 int dbg_size; /* size of debug info */
105 client_ptr_t teb; /* thread teb (in debugged process address space) */
106 client_ptr_t start; /* thread startup routine */
107 client_ptr_t name; /* image name (optional) */
108 int unicode; /* is it Unicode? */
109 } create_process;
110 struct
112 int code; /* EXIT_THREAD_DEBUG_EVENT/EXIT_PROCESS_DEBUG_EVENT */
113 int exit_code; /* thread or process exit code */
114 } exit;
115 struct
117 int code; /* LOAD_DLL_DEBUG_EVENT */
118 obj_handle_t handle; /* file handle for the dll */
119 mod_handle_t base; /* base address of the dll */
120 int dbg_offset; /* offset of debug info in file */
121 int dbg_size; /* size of debug info */
122 client_ptr_t name; /* image name (optional) */
123 int unicode; /* is it Unicode? */
124 } load_dll;
125 struct
127 int code; /* UNLOAD_DLL_DEBUG_EVENT */
128 int __pad;
129 mod_handle_t base; /* base address of the dll */
130 } unload_dll;
131 } debug_event_t;
133 /* supported CPU types */
134 enum cpu_type
136 CPU_x86, CPU_x86_64, CPU_POWERPC, CPU_ARM, CPU_ARM64
138 typedef int client_cpu_t;
140 /* context data */
141 typedef struct
143 client_cpu_t cpu; /* cpu type */
144 unsigned int flags; /* SERVER_CTX_* flags */
145 union
147 struct { unsigned int eip, ebp, esp, eflags, cs, ss; } i386_regs;
148 struct { unsigned __int64 rip, rbp, rsp;
149 unsigned int cs, ss, flags, __pad; } x86_64_regs;
150 struct { unsigned int iar, msr, ctr, lr, dar, dsisr, trap, __pad; } powerpc_regs;
151 struct { unsigned int sp, lr, pc, cpsr; } arm_regs;
152 struct { unsigned __int64 sp, pc, pstate; } arm64_regs;
153 } ctl; /* selected by SERVER_CTX_CONTROL */
154 union
156 struct { unsigned int eax, ebx, ecx, edx, esi, edi; } i386_regs;
157 struct { unsigned __int64 rax,rbx, rcx, rdx, rsi, rdi,
158 r8, r9, r10, r11, r12, r13, r14, r15; } x86_64_regs;
159 struct { unsigned int gpr[32], cr, xer; } powerpc_regs;
160 struct { unsigned int r[13]; } arm_regs;
161 struct { unsigned __int64 x[31]; } arm64_regs;
162 } integer; /* selected by SERVER_CTX_INTEGER */
163 union
165 struct { unsigned int ds, es, fs, gs; } i386_regs;
166 struct { unsigned int ds, es, fs, gs; } x86_64_regs;
167 } seg; /* selected by SERVER_CTX_SEGMENTS */
168 union
170 struct { unsigned int ctrl, status, tag, err_off, err_sel, data_off, data_sel, cr0npx;
171 unsigned char regs[80]; } i386_regs;
172 struct { struct { unsigned __int64 low, high; } fpregs[32]; } x86_64_regs;
173 struct { double fpr[32], fpscr; } powerpc_regs;
174 struct { unsigned __int64 d[32]; unsigned int fpscr; } arm_regs;
175 struct { struct { unsigned __int64 low, high; } q[32]; unsigned int fpcr, fpsr; } arm64_regs;
176 } fp; /* selected by SERVER_CTX_FLOATING_POINT */
177 union
179 struct { unsigned int dr0, dr1, dr2, dr3, dr6, dr7; } i386_regs;
180 struct { unsigned __int64 dr0, dr1, dr2, dr3, dr6, dr7; } x86_64_regs;
181 struct { unsigned int dr[8]; } powerpc_regs;
182 struct { unsigned int bvr[8], bcr[8], wvr[1], wcr[1]; } arm_regs;
183 struct { unsigned __int64 bvr[8], wvr[2]; unsigned int bcr[8], wcr[2]; } arm64_regs;
184 } debug; /* selected by SERVER_CTX_DEBUG_REGISTERS */
185 union
187 unsigned char i386_regs[512];
188 } ext; /* selected by SERVER_CTX_EXTENDED_REGISTERS */
189 } context_t;
191 #define SERVER_CTX_CONTROL 0x01
192 #define SERVER_CTX_INTEGER 0x02
193 #define SERVER_CTX_SEGMENTS 0x04
194 #define SERVER_CTX_FLOATING_POINT 0x08
195 #define SERVER_CTX_DEBUG_REGISTERS 0x10
196 #define SERVER_CTX_EXTENDED_REGISTERS 0x20
198 /* structure used in sending an fd from client to server */
199 struct send_fd
201 thread_id_t tid; /* thread id */
202 int fd; /* file descriptor on client-side */
205 /* structure sent by the server on the wait fifo */
206 struct wake_up_reply
208 client_ptr_t cookie; /* magic cookie that was passed in select_request */
209 int signaled; /* wait result */
210 int __pad;
213 /* NT-style timeout, in 100ns units, negative means relative timeout */
214 typedef __int64 timeout_t;
215 #define TIMEOUT_INFINITE (((timeout_t)0x7fffffff) << 32 | 0xffffffff)
217 /* absolute timeout, negative means that monotonic clock is used */
218 typedef __int64 abstime_t;
220 /* structure for process startup info */
221 typedef struct
223 unsigned int debug_flags;
224 unsigned int console_flags;
225 obj_handle_t console;
226 obj_handle_t hstdin;
227 obj_handle_t hstdout;
228 obj_handle_t hstderr;
229 unsigned int x;
230 unsigned int y;
231 unsigned int xsize;
232 unsigned int ysize;
233 unsigned int xchars;
234 unsigned int ychars;
235 unsigned int attribute;
236 unsigned int flags;
237 unsigned int show;
238 data_size_t curdir_len;
239 data_size_t dllpath_len;
240 data_size_t imagepath_len;
241 data_size_t cmdline_len;
242 data_size_t title_len;
243 data_size_t desktop_len;
244 data_size_t shellinfo_len;
245 data_size_t runtime_len;
246 /* VARARG(curdir,unicode_str,curdir_len); */
247 /* VARARG(dllpath,unicode_str,dllpath_len); */
248 /* VARARG(imagepath,unicode_str,imagepath_len); */
249 /* VARARG(cmdline,unicode_str,cmdline_len); */
250 /* VARARG(title,unicode_str,title_len); */
251 /* VARARG(desktop,unicode_str,desktop_len); */
252 /* VARARG(shellinfo,unicode_str,shellinfo_len); */
253 /* VARARG(runtime,unicode_str,runtime_len); */
254 } startup_info_t;
256 /* structure returned in the list of window properties */
257 typedef struct
259 atom_t atom; /* property atom */
260 int string; /* was atom a string originally? */
261 lparam_t data; /* data stored in property */
262 } property_data_t;
264 /* structure to specify window rectangles */
265 typedef struct
267 int left;
268 int top;
269 int right;
270 int bottom;
271 } rectangle_t;
273 /* structure for parameters of async I/O calls */
274 typedef struct
276 obj_handle_t handle; /* object to perform I/O on */
277 obj_handle_t event; /* event to signal when done */
278 client_ptr_t iosb; /* I/O status block in client addr space */
279 client_ptr_t user; /* opaque user data containing callback pointer and async-specific data */
280 client_ptr_t apc; /* user APC to call */
281 apc_param_t apc_context; /* user APC context or completion value */
282 } async_data_t;
284 /* structures for extra message data */
286 struct hw_msg_source
288 unsigned int device; /* source device (IMDT_* values) */
289 unsigned int origin; /* source origin (IMO_* values) */
292 struct hardware_msg_data
294 lparam_t info; /* extra info */
295 unsigned int hw_id; /* unique id */
296 unsigned int flags; /* hook flags */
297 struct hw_msg_source source; /* message source */
298 union
300 int type;
301 struct
303 int type; /* RIM_TYPEKEYBOARD */
304 unsigned int message; /* message generated by this rawinput event */
305 unsigned short vkey; /* virtual key code */
306 unsigned short scan; /* scan code */
307 } kbd;
308 struct
310 int type; /* RIM_TYPEMOUSE */
311 int x; /* x coordinate */
312 int y; /* y coordinate */
313 unsigned int data; /* mouse data */
314 } mouse;
315 } rawinput;
318 struct callback_msg_data
320 client_ptr_t callback; /* callback function */
321 lparam_t data; /* user data for callback */
322 lparam_t result; /* message result */
325 struct winevent_msg_data
327 user_handle_t hook; /* hook handle */
328 thread_id_t tid; /* thread id */
329 client_ptr_t hook_proc; /* hook proc address */
330 /* followed by module name if any */
333 typedef union
335 int type;
336 struct
338 int type; /* INPUT_KEYBOARD */
339 unsigned short vkey; /* virtual key code */
340 unsigned short scan; /* scan code */
341 unsigned int flags; /* event flags */
342 unsigned int time; /* event time */
343 lparam_t info; /* extra info */
344 } kbd;
345 struct
347 int type; /* INPUT_MOUSE */
348 int x; /* coordinates */
349 int y;
350 unsigned int data; /* mouse data */
351 unsigned int flags; /* event flags */
352 unsigned int time; /* event time */
353 lparam_t info; /* extra info */
354 } mouse;
355 struct
357 int type; /* INPUT_HARDWARE */
358 unsigned int msg; /* message code */
359 lparam_t lparam; /* message param */
360 } hw;
361 } hw_input_t;
363 typedef union
365 unsigned char bytes[1]; /* raw data for sent messages */
366 struct hardware_msg_data hardware;
367 struct callback_msg_data callback;
368 struct winevent_msg_data winevent;
369 } message_data_t;
371 /* structure returned in filesystem events */
372 struct filesystem_event
374 int action;
375 data_size_t len;
376 char name[1];
379 typedef struct
381 unsigned int low_part;
382 int high_part;
383 } luid_t;
385 #define MAX_ACL_LEN 65535
387 struct security_descriptor
389 unsigned int control; /* SE_ flags */
390 data_size_t owner_len;
391 data_size_t group_len;
392 data_size_t sacl_len;
393 data_size_t dacl_len;
394 /* VARARG(owner,SID); */
395 /* VARARG(group,SID); */
396 /* VARARG(sacl,ACL); */
397 /* VARARG(dacl,ACL); */
400 struct object_attributes
402 obj_handle_t rootdir; /* root directory */
403 unsigned int attributes; /* object attributes */
404 data_size_t sd_len; /* length of security_descriptor data. may be 0 */
405 data_size_t name_len; /* length of the name string. may be 0 */
406 /* VARARG(sd,security_descriptor); */
407 /* VARARG(name,unicode_str); */
410 struct token_groups
412 unsigned int count;
413 /* unsigned int attributes[count]; */
414 /* VARARG(sids,SID); */
417 enum select_op
419 SELECT_NONE,
420 SELECT_WAIT,
421 SELECT_WAIT_ALL,
422 SELECT_SIGNAL_AND_WAIT,
423 SELECT_KEYED_EVENT_WAIT,
424 SELECT_KEYED_EVENT_RELEASE
427 typedef union
429 enum select_op op;
430 struct
432 enum select_op op; /* SELECT_WAIT or SELECT_WAIT_ALL */
433 obj_handle_t handles[MAXIMUM_WAIT_OBJECTS];
434 } wait;
435 struct
437 enum select_op op; /* SELECT_SIGNAL_AND_WAIT */
438 obj_handle_t wait;
439 obj_handle_t signal; /* must be last in the structure so we can remove it on retries */
440 } signal_and_wait;
441 struct
443 enum select_op op; /* SELECT_KEYED_EVENT_WAIT or SELECT_KEYED_EVENT_RELEASE */
444 obj_handle_t handle;
445 client_ptr_t key;
446 } keyed_event;
447 } select_op_t;
449 enum apc_type
451 APC_NONE,
452 APC_USER,
453 APC_TIMER,
454 APC_ASYNC_IO,
455 APC_VIRTUAL_ALLOC,
456 APC_VIRTUAL_FREE,
457 APC_VIRTUAL_QUERY,
458 APC_VIRTUAL_PROTECT,
459 APC_VIRTUAL_FLUSH,
460 APC_VIRTUAL_LOCK,
461 APC_VIRTUAL_UNLOCK,
462 APC_MAP_VIEW,
463 APC_UNMAP_VIEW,
464 APC_CREATE_THREAD,
465 APC_BREAK_PROCESS
468 typedef union
470 enum apc_type type;
471 struct
473 enum apc_type type; /* APC_USER */
474 int __pad;
475 client_ptr_t func; /* void (__stdcall *func)(ULONG_PTR,ULONG_PTR,ULONG_PTR); */
476 apc_param_t args[3]; /* arguments for user function */
477 } user;
478 struct
480 enum apc_type type; /* APC_TIMER */
481 int __pad;
482 client_ptr_t func; /* void (__stdcall *func)(void*, unsigned int, unsigned int); */
483 abstime_t time; /* time of expiration */
484 client_ptr_t arg; /* user argument */
485 } timer;
486 } user_apc_t;
488 typedef union
490 enum apc_type type;
491 user_apc_t user;
492 struct
494 enum apc_type type; /* APC_ASYNC_IO */
495 unsigned int status; /* I/O status */
496 client_ptr_t user; /* user pointer */
497 client_ptr_t sb; /* status block */
498 } async_io;
499 struct
501 enum apc_type type; /* APC_VIRTUAL_ALLOC */
502 unsigned int op_type; /* type of operation */
503 client_ptr_t addr; /* requested address */
504 mem_size_t size; /* allocation size */
505 mem_size_t zero_bits; /* number of zero high bits */
506 unsigned int prot; /* memory protection flags */
507 } virtual_alloc;
508 struct
510 enum apc_type type; /* APC_VIRTUAL_FREE */
511 unsigned int op_type; /* type of operation */
512 client_ptr_t addr; /* requested address */
513 mem_size_t size; /* allocation size */
514 } virtual_free;
515 struct
517 enum apc_type type; /* APC_VIRTUAL_QUERY */
518 int __pad;
519 client_ptr_t addr; /* requested address */
520 } virtual_query;
521 struct
523 enum apc_type type; /* APC_VIRTUAL_PROTECT */
524 unsigned int prot; /* new protection flags */
525 client_ptr_t addr; /* requested address */
526 mem_size_t size; /* requested size */
527 } virtual_protect;
528 struct
530 enum apc_type type; /* APC_VIRTUAL_FLUSH */
531 int __pad;
532 client_ptr_t addr; /* requested address */
533 mem_size_t size; /* requested size */
534 } virtual_flush;
535 struct
537 enum apc_type type; /* APC_VIRTUAL_LOCK */
538 int __pad;
539 client_ptr_t addr; /* requested address */
540 mem_size_t size; /* requested size */
541 } virtual_lock;
542 struct
544 enum apc_type type; /* APC_VIRTUAL_UNLOCK */
545 int __pad;
546 client_ptr_t addr; /* requested address */
547 mem_size_t size; /* requested size */
548 } virtual_unlock;
549 struct
551 enum apc_type type; /* APC_MAP_VIEW */
552 obj_handle_t handle; /* mapping handle */
553 client_ptr_t addr; /* requested address */
554 mem_size_t size; /* allocation size */
555 file_pos_t offset; /* file offset */
556 mem_size_t zero_bits; /* number of zero high bits */
557 unsigned int alloc_type; /* allocation type */
558 unsigned int prot; /* memory protection flags */
559 } map_view;
560 struct
562 enum apc_type type; /* APC_UNMAP_VIEW */
563 int __pad;
564 client_ptr_t addr; /* view address */
565 } unmap_view;
566 struct
568 enum apc_type type; /* APC_CREATE_THREAD */
569 unsigned int flags; /* creation flags */
570 client_ptr_t func; /* void (__stdcall *func)(void*); start function */
571 client_ptr_t arg; /* argument for start function */
572 mem_size_t reserve; /* reserve size for thread stack */
573 mem_size_t commit; /* commit size for thread stack */
574 } create_thread;
575 } apc_call_t;
577 typedef union
579 enum apc_type type;
580 struct
582 enum apc_type type; /* APC_ASYNC_IO */
583 unsigned int status; /* new status of async operation */
584 unsigned int total; /* bytes transferred */
585 } async_io;
586 struct
588 enum apc_type type; /* APC_VIRTUAL_ALLOC */
589 unsigned int status; /* status returned by call */
590 client_ptr_t addr; /* resulting address */
591 mem_size_t size; /* resulting size */
592 } virtual_alloc;
593 struct
595 enum apc_type type; /* APC_VIRTUAL_FREE */
596 unsigned int status; /* status returned by call */
597 client_ptr_t addr; /* resulting address */
598 mem_size_t size; /* resulting size */
599 } virtual_free;
600 struct
602 enum apc_type type; /* APC_VIRTUAL_QUERY */
603 unsigned int status; /* status returned by call */
604 client_ptr_t base; /* resulting base address */
605 client_ptr_t alloc_base;/* resulting allocation base */
606 mem_size_t size; /* resulting region size */
607 unsigned short state; /* resulting region state */
608 unsigned short prot; /* resulting region protection */
609 unsigned short alloc_prot;/* resulting allocation protection */
610 unsigned short alloc_type;/* resulting region allocation type */
611 } virtual_query;
612 struct
614 enum apc_type type; /* APC_VIRTUAL_PROTECT */
615 unsigned int status; /* status returned by call */
616 client_ptr_t addr; /* resulting address */
617 mem_size_t size; /* resulting size */
618 unsigned int prot; /* old protection flags */
619 } virtual_protect;
620 struct
622 enum apc_type type; /* APC_VIRTUAL_FLUSH */
623 unsigned int status; /* status returned by call */
624 client_ptr_t addr; /* resulting address */
625 mem_size_t size; /* resulting size */
626 } virtual_flush;
627 struct
629 enum apc_type type; /* APC_VIRTUAL_LOCK */
630 unsigned int status; /* status returned by call */
631 client_ptr_t addr; /* resulting address */
632 mem_size_t size; /* resulting size */
633 } virtual_lock;
634 struct
636 enum apc_type type; /* APC_VIRTUAL_UNLOCK */
637 unsigned int status; /* status returned by call */
638 client_ptr_t addr; /* resulting address */
639 mem_size_t size; /* resulting size */
640 } virtual_unlock;
641 struct
643 enum apc_type type; /* APC_MAP_VIEW */
644 unsigned int status; /* status returned by call */
645 client_ptr_t addr; /* resulting address */
646 mem_size_t size; /* resulting size */
647 } map_view;
648 struct
650 enum apc_type type; /* APC_MAP_VIEW */
651 unsigned int status; /* status returned by call */
652 } unmap_view;
653 struct
655 enum apc_type type; /* APC_CREATE_THREAD */
656 unsigned int status; /* status returned by call */
657 process_id_t pid; /* process id */
658 thread_id_t tid; /* thread id */
659 client_ptr_t teb; /* thread teb (in process address space) */
660 obj_handle_t handle; /* handle to new thread */
661 } create_thread;
662 struct
664 enum apc_type type; /* APC_BREAK_PROCESS */
665 unsigned int status; /* status returned by call */
666 } break_process;
667 } apc_result_t;
669 enum irp_type
671 IRP_CALL_NONE,
672 IRP_CALL_CREATE,
673 IRP_CALL_CLOSE,
674 IRP_CALL_READ,
675 IRP_CALL_WRITE,
676 IRP_CALL_FLUSH,
677 IRP_CALL_IOCTL,
678 IRP_CALL_FREE,
679 IRP_CALL_CANCEL
682 typedef union
684 enum irp_type type; /* irp call type */
685 struct
687 enum irp_type type; /* IRP_CALL_CREATE */
688 unsigned int access; /* access rights */
689 unsigned int sharing; /* sharing flags */
690 unsigned int options; /* file options */
691 client_ptr_t device; /* opaque ptr for the device */
692 obj_handle_t file; /* file handle */
693 } create;
694 struct
696 enum irp_type type; /* IRP_CALL_CLOSE */
697 int __pad;
698 client_ptr_t file; /* opaque ptr for the file object */
699 } close;
700 struct
702 enum irp_type type; /* IRP_CALL_READ */
703 unsigned int key; /* driver key */
704 data_size_t out_size; /* needed output size */
705 int __pad;
706 client_ptr_t file; /* opaque ptr for the file object */
707 file_pos_t pos; /* file position */
708 } read;
709 struct
711 enum irp_type type; /* IRP_CALL_WRITE */
712 unsigned int key; /* driver key */
713 client_ptr_t file; /* opaque ptr for the file object */
714 file_pos_t pos; /* file position */
715 } write;
716 struct
718 enum irp_type type; /* IRP_CALL_FLUSH */
719 int __pad;
720 client_ptr_t file; /* opaque ptr for the file object */
721 } flush;
722 struct
724 enum irp_type type; /* IRP_CALL_IOCTL */
725 ioctl_code_t code; /* ioctl code */
726 data_size_t out_size; /* needed output size */
727 int __pad;
728 client_ptr_t file; /* opaque ptr for the file object */
729 } ioctl;
730 struct
732 enum irp_type type; /* IRP_CALL_FREE */
733 int __pad;
734 client_ptr_t obj; /* opaque ptr for the freed object */
735 } free;
736 struct
738 enum irp_type type; /* IRP_CALL_CANCEL */
739 int __pad;
740 client_ptr_t irp; /* opaque ptr for canceled irp */
741 } cancel;
742 } irp_params_t;
744 /* information about a PE image mapping, roughly equivalent to SECTION_IMAGE_INFORMATION */
745 typedef struct
747 client_ptr_t base;
748 client_ptr_t entry_point;
749 mem_size_t map_size;
750 mem_size_t stack_size;
751 mem_size_t stack_commit;
752 unsigned int zerobits;
753 unsigned int subsystem;
754 unsigned short subsystem_low;
755 unsigned short subsystem_high;
756 unsigned int gp;
757 unsigned short image_charact;
758 unsigned short dll_charact;
759 unsigned short machine;
760 unsigned char contains_code;
761 unsigned char image_flags;
762 unsigned int loader_flags;
763 unsigned int header_size;
764 unsigned int file_size;
765 unsigned int checksum;
766 client_cpu_t cpu;
767 int __pad;
768 } pe_image_info_t;
769 #define IMAGE_FLAGS_ComPlusNativeReady 0x01
770 #define IMAGE_FLAGS_ComPlusILOnly 0x02
771 #define IMAGE_FLAGS_ImageDynamicallyRelocated 0x04
772 #define IMAGE_FLAGS_ImageMappedFlat 0x08
773 #define IMAGE_FLAGS_BaseBelow4gb 0x10
774 #define IMAGE_FLAGS_WineBuiltin 0x40
775 #define IMAGE_FLAGS_WineFakeDll 0x80
777 struct rawinput_device
779 unsigned short usage_page;
780 unsigned short usage;
781 unsigned int flags;
782 user_handle_t target;
785 /****************************************************************/
786 /* Request declarations */
788 /* Create a new process from the context of the parent */
789 @REQ(new_process)
790 obj_handle_t parent_process; /* parent process */
791 int inherit_all; /* inherit all handles from parent */
792 unsigned int create_flags; /* creation flags */
793 int socket_fd; /* file descriptor for process socket */
794 obj_handle_t exe_file; /* file handle for main exe */
795 unsigned int access; /* access rights for process object */
796 client_cpu_t cpu; /* CPU that the new process will use */
797 data_size_t info_size; /* size of startup info */
798 VARARG(objattr,object_attributes); /* object attributes */
799 VARARG(info,startup_info,info_size); /* startup information */
800 VARARG(env,unicode_str); /* environment for new process */
801 @REPLY
802 obj_handle_t info; /* new process info handle */
803 process_id_t pid; /* process id */
804 obj_handle_t handle; /* process handle (in the current process) */
805 @END
808 /* Execute a process, replacing the current one */
809 @REQ(exec_process)
810 int socket_fd; /* file descriptor for process socket */
811 client_cpu_t cpu; /* CPU that the new process will use */
812 @END
815 /* Retrieve information about a newly started process */
816 @REQ(get_new_process_info)
817 obj_handle_t info; /* info handle returned from new_process_request */
818 @REPLY
819 int success; /* did the process start successfully? */
820 int exit_code; /* process exit code if failed */
821 @END
824 /* Create a new thread */
825 @REQ(new_thread)
826 obj_handle_t process; /* process in which to create thread */
827 unsigned int access; /* wanted access rights */
828 int suspend; /* new thread should be suspended on creation */
829 int request_fd; /* fd for request pipe */
830 VARARG(objattr,object_attributes); /* object attributes */
831 @REPLY
832 thread_id_t tid; /* thread id */
833 obj_handle_t handle; /* thread handle (in the current process) */
834 @END
837 /* Retrieve the new process startup info */
838 @REQ(get_startup_info)
839 @REPLY
840 data_size_t info_size; /* size of startup info */
841 VARARG(info,startup_info,info_size); /* startup information */
842 VARARG(env,unicode_str); /* environment */
843 @END
846 /* Signal the end of the process initialization */
847 @REQ(init_process_done)
848 int gui; /* is it a GUI process? */
849 mod_handle_t module; /* main module base address */
850 client_ptr_t ldt_copy; /* address of LDT copy (in thread address space) */
851 client_ptr_t entry; /* process entry point */
852 @REPLY
853 int suspend; /* is process suspended? */
854 @END
857 /* Initialize a thread; called from the child after fork()/clone() */
858 @REQ(init_thread)
859 int unix_pid; /* Unix pid of new thread */
860 int unix_tid; /* Unix tid of new thread */
861 int debug_level; /* new debug level */
862 client_ptr_t teb; /* TEB of new thread (in thread address space) */
863 client_ptr_t entry; /* entry point or PEB if initial thread (in thread address space) */
864 int reply_fd; /* fd for reply pipe */
865 int wait_fd; /* fd for blocking calls pipe */
866 client_cpu_t cpu; /* CPU that this thread is running on */
867 @REPLY
868 process_id_t pid; /* process id of the new thread's process */
869 thread_id_t tid; /* thread id of the new thread */
870 timeout_t server_start; /* server start time */
871 data_size_t info_size; /* total size of startup info */
872 int version; /* protocol version */
873 unsigned int all_cpus; /* bitset of supported CPUs */
874 int suspend; /* is thread suspended? */
875 @END
878 /* Terminate a process */
879 @REQ(terminate_process)
880 obj_handle_t handle; /* process handle to terminate */
881 int exit_code; /* process exit code */
882 @REPLY
883 int self; /* suicide? */
884 @END
887 /* Terminate a thread */
888 @REQ(terminate_thread)
889 obj_handle_t handle; /* thread handle to terminate */
890 int exit_code; /* thread exit code */
891 @REPLY
892 int self; /* suicide? */
893 @END
896 /* Retrieve information about a process */
897 @REQ(get_process_info)
898 obj_handle_t handle; /* process handle */
899 @REPLY
900 process_id_t pid; /* server process id */
901 process_id_t ppid; /* server process id of parent */
902 affinity_t affinity; /* process affinity mask */
903 client_ptr_t peb; /* PEB address in process address space */
904 timeout_t start_time; /* process start time */
905 timeout_t end_time; /* process end time */
906 int exit_code; /* process exit code */
907 int priority; /* priority class */
908 client_cpu_t cpu; /* CPU that this process is running on */
909 short int debugger_present; /* process is being debugged */
910 short int debug_children; /* inherit debugger to child processes */
911 VARARG(image,pe_image_info); /* image info for main exe */
912 @END
915 /* Retrieve information about a process memory usage */
916 @REQ(get_process_vm_counters)
917 obj_handle_t handle; /* process handle */
918 @REPLY
919 mem_size_t peak_virtual_size; /* peak virtual memory in bytes */
920 mem_size_t virtual_size; /* virtual memory in bytes */
921 mem_size_t peak_working_set_size; /* peak real memory in bytes */
922 mem_size_t working_set_size; /* real memory in bytes */
923 mem_size_t pagefile_usage; /* commit charge in bytes */
924 mem_size_t peak_pagefile_usage; /* peak commit charge in bytes */
925 @END
928 /* Set a process information */
929 @REQ(set_process_info)
930 obj_handle_t handle; /* process handle */
931 int mask; /* setting mask (see below) */
932 int priority; /* priority class */
933 affinity_t affinity; /* affinity mask */
934 @END
935 #define SET_PROCESS_INFO_PRIORITY 0x01
936 #define SET_PROCESS_INFO_AFFINITY 0x02
939 /* Retrieve information about a thread */
940 @REQ(get_thread_info)
941 obj_handle_t handle; /* thread handle */
942 unsigned int access; /* required access rights */
943 @REPLY
944 process_id_t pid; /* server process id */
945 thread_id_t tid; /* server thread id */
946 client_ptr_t teb; /* thread teb pointer */
947 client_ptr_t entry_point; /* thread entry point */
948 affinity_t affinity; /* thread affinity mask */
949 int exit_code; /* thread exit code */
950 int priority; /* thread priority level */
951 int last; /* last thread in process */
952 int suspend_count; /* thread suspend count */
953 int dbg_hidden; /* thread hidden from debugger */
954 data_size_t desc_len; /* description length in bytes */
955 VARARG(desc,unicode_str); /* description string */
956 @END
959 /* Retrieve information about thread times */
960 @REQ(get_thread_times)
961 obj_handle_t handle; /* thread handle */
962 @REPLY
963 timeout_t creation_time; /* thread creation time */
964 timeout_t exit_time; /* thread exit time */
965 int unix_pid; /* thread native pid */
966 int unix_tid; /* thread native pid */
967 @END
970 /* Set a thread information */
971 @REQ(set_thread_info)
972 obj_handle_t handle; /* thread handle */
973 int mask; /* setting mask (see below) */
974 int priority; /* priority class */
975 affinity_t affinity; /* affinity mask */
976 client_ptr_t entry_point; /* thread entry point */
977 obj_handle_t token; /* impersonation token */
978 VARARG(desc,unicode_str); /* description string */
979 @END
980 #define SET_THREAD_INFO_PRIORITY 0x01
981 #define SET_THREAD_INFO_AFFINITY 0x02
982 #define SET_THREAD_INFO_TOKEN 0x04
983 #define SET_THREAD_INFO_ENTRYPOINT 0x08
984 #define SET_THREAD_INFO_DESCRIPTION 0x10
985 #define SET_THREAD_INFO_DBG_HIDDEN 0x20
988 /* Retrieve information about a module */
989 @REQ(get_dll_info)
990 obj_handle_t handle; /* process handle */
991 mod_handle_t base_address; /* base address of module */
992 @REPLY
993 client_ptr_t entry_point;
994 data_size_t filename_len; /* buffer len in bytes required to store filename */
995 VARARG(filename,unicode_str); /* file name of module */
996 @END
999 /* Suspend a thread */
1000 @REQ(suspend_thread)
1001 obj_handle_t handle; /* thread handle */
1002 @REPLY
1003 int count; /* new suspend count */
1004 @END
1007 /* Resume a thread */
1008 @REQ(resume_thread)
1009 obj_handle_t handle; /* thread handle */
1010 @REPLY
1011 int count; /* new suspend count */
1012 @END
1015 /* Notify the server that a dll has been loaded */
1016 @REQ(load_dll)
1017 data_size_t dbg_offset; /* debug info offset */
1018 mod_handle_t base; /* base address */
1019 client_ptr_t name; /* ptr to ptr to name (in process addr space) */
1020 data_size_t dbg_size; /* debug info size */
1021 VARARG(filename,unicode_str); /* file name of dll */
1022 @END
1025 /* Notify the server that a dll is being unloaded */
1026 @REQ(unload_dll)
1027 mod_handle_t base; /* base address */
1028 @END
1031 /* Queue an APC for a thread or process */
1032 @REQ(queue_apc)
1033 obj_handle_t handle; /* thread or process handle */
1034 apc_call_t call; /* call arguments */
1035 @REPLY
1036 obj_handle_t handle; /* APC handle */
1037 int self; /* run APC in caller itself? */
1038 @END
1041 /* Get the result of an APC call */
1042 @REQ(get_apc_result)
1043 obj_handle_t handle; /* handle to the APC */
1044 @REPLY
1045 apc_result_t result; /* result of the APC */
1046 @END
1049 /* Close a handle for the current process */
1050 @REQ(close_handle)
1051 obj_handle_t handle; /* handle to close */
1052 @END
1055 /* Set a handle information */
1056 @REQ(set_handle_info)
1057 obj_handle_t handle; /* handle we are interested in */
1058 int flags; /* new handle flags */
1059 int mask; /* mask for flags to set */
1060 @REPLY
1061 int old_flags; /* old flag value */
1062 @END
1065 /* Duplicate a handle */
1066 @REQ(dup_handle)
1067 obj_handle_t src_process; /* src process handle */
1068 obj_handle_t src_handle; /* src handle to duplicate */
1069 obj_handle_t dst_process; /* dst process handle */
1070 unsigned int access; /* wanted access rights */
1071 unsigned int attributes; /* object attributes */
1072 unsigned int options; /* duplicate options (see below) */
1073 @REPLY
1074 obj_handle_t handle; /* duplicated handle in dst process */
1075 int self; /* is the source the current process? */
1076 int closed; /* whether the source handle has been closed */
1077 @END
1078 #define DUP_HANDLE_CLOSE_SOURCE DUPLICATE_CLOSE_SOURCE
1079 #define DUP_HANDLE_SAME_ACCESS DUPLICATE_SAME_ACCESS
1080 #define DUP_HANDLE_MAKE_GLOBAL 0x80000000 /* Not a Windows flag */
1083 /* Make an object temporary */
1084 @REQ(make_temporary)
1085 obj_handle_t handle; /* handle to the object */
1086 @END
1089 /* Open a handle to a process */
1090 @REQ(open_process)
1091 process_id_t pid; /* process id to open */
1092 unsigned int access; /* wanted access rights */
1093 unsigned int attributes; /* object attributes */
1094 @REPLY
1095 obj_handle_t handle; /* handle to the process */
1096 @END
1099 /* Open a handle to a thread */
1100 @REQ(open_thread)
1101 thread_id_t tid; /* thread id to open */
1102 unsigned int access; /* wanted access rights */
1103 unsigned int attributes; /* object attributes */
1104 @REPLY
1105 obj_handle_t handle; /* handle to the thread */
1106 @END
1109 /* Wait for handles */
1110 @REQ(select)
1111 int flags; /* wait flags (see below) */
1112 client_ptr_t cookie; /* magic cookie to return to client */
1113 abstime_t timeout; /* timeout */
1114 data_size_t size; /* size of select_op */
1115 obj_handle_t prev_apc; /* handle to previous APC */
1116 VARARG(result,apc_result); /* result of previous APC */
1117 VARARG(data,select_op,size); /* operation-specific data */
1118 VARARG(context,context); /* suspend context */
1119 @REPLY
1120 apc_call_t call; /* APC call arguments */
1121 obj_handle_t apc_handle; /* handle to next APC */
1122 VARARG(context,context); /* suspend context */
1123 @END
1124 #define SELECT_ALERTABLE 1
1125 #define SELECT_INTERRUPTIBLE 2
1128 /* Create an event */
1129 @REQ(create_event)
1130 unsigned int access; /* wanted access rights */
1131 int manual_reset; /* manual reset event */
1132 int initial_state; /* initial state of the event */
1133 VARARG(objattr,object_attributes); /* object attributes */
1134 @REPLY
1135 obj_handle_t handle; /* handle to the event */
1136 @END
1138 /* Event operation */
1139 @REQ(event_op)
1140 obj_handle_t handle; /* handle to event */
1141 int op; /* event operation (see below) */
1142 @REPLY
1143 int state; /* previous state */
1144 @END
1145 enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT };
1147 @REQ(query_event)
1148 obj_handle_t handle; /* handle to event */
1149 @REPLY
1150 int manual_reset; /* manual reset event */
1151 int state; /* current state of the event */
1152 @END
1154 /* Open an event */
1155 @REQ(open_event)
1156 unsigned int access; /* wanted access rights */
1157 unsigned int attributes; /* object attributes */
1158 obj_handle_t rootdir; /* root directory */
1159 VARARG(name,unicode_str); /* object name */
1160 @REPLY
1161 obj_handle_t handle; /* handle to the event */
1162 @END
1165 /* Create a keyed event */
1166 @REQ(create_keyed_event)
1167 unsigned int access; /* wanted access rights */
1168 VARARG(objattr,object_attributes); /* object attributes */
1169 @REPLY
1170 obj_handle_t handle; /* handle to the event */
1171 @END
1173 /* Open a keyed event */
1174 @REQ(open_keyed_event)
1175 unsigned int access; /* wanted access rights */
1176 unsigned int attributes; /* object attributes */
1177 obj_handle_t rootdir; /* root directory */
1178 VARARG(name,unicode_str); /* object name */
1179 @REPLY
1180 obj_handle_t handle; /* handle to the event */
1181 @END
1184 /* Create a mutex */
1185 @REQ(create_mutex)
1186 unsigned int access; /* wanted access rights */
1187 int owned; /* initially owned? */
1188 VARARG(objattr,object_attributes); /* object attributes */
1189 @REPLY
1190 obj_handle_t handle; /* handle to the mutex */
1191 @END
1194 /* Release a mutex */
1195 @REQ(release_mutex)
1196 obj_handle_t handle; /* handle to the mutex */
1197 @REPLY
1198 unsigned int prev_count; /* value of internal counter, before release */
1199 @END
1202 /* Open a mutex */
1203 @REQ(open_mutex)
1204 unsigned int access; /* wanted access rights */
1205 unsigned int attributes; /* object attributes */
1206 obj_handle_t rootdir; /* root directory */
1207 VARARG(name,unicode_str); /* object name */
1208 @REPLY
1209 obj_handle_t handle; /* handle to the mutex */
1210 @END
1213 /* Query a mutex */
1214 @REQ(query_mutex)
1215 obj_handle_t handle; /* handle to mutex */
1216 @REPLY
1217 unsigned int count; /* current count of mutex */
1218 int owned; /* true if owned by current thread */
1219 int abandoned; /* true if abandoned */
1220 @END
1223 /* Create a semaphore */
1224 @REQ(create_semaphore)
1225 unsigned int access; /* wanted access rights */
1226 unsigned int initial; /* initial count */
1227 unsigned int max; /* maximum count */
1228 VARARG(objattr,object_attributes); /* object attributes */
1229 @REPLY
1230 obj_handle_t handle; /* handle to the semaphore */
1231 @END
1234 /* Release a semaphore */
1235 @REQ(release_semaphore)
1236 obj_handle_t handle; /* handle to the semaphore */
1237 unsigned int count; /* count to add to semaphore */
1238 @REPLY
1239 unsigned int prev_count; /* previous semaphore count */
1240 @END
1242 @REQ(query_semaphore)
1243 obj_handle_t handle; /* handle to the semaphore */
1244 @REPLY
1245 unsigned int current; /* current count */
1246 unsigned int max; /* maximum count */
1247 @END
1249 /* Open a semaphore */
1250 @REQ(open_semaphore)
1251 unsigned int access; /* wanted access rights */
1252 unsigned int attributes; /* object attributes */
1253 obj_handle_t rootdir; /* root directory */
1254 VARARG(name,unicode_str); /* object name */
1255 @REPLY
1256 obj_handle_t handle; /* handle to the semaphore */
1257 @END
1260 /* Create a file */
1261 @REQ(create_file)
1262 unsigned int access; /* wanted access rights */
1263 unsigned int sharing; /* sharing flags */
1264 int create; /* file create action */
1265 unsigned int options; /* file options */
1266 unsigned int attrs; /* file attributes for creation */
1267 VARARG(objattr,object_attributes); /* object attributes */
1268 VARARG(filename,string); /* file name */
1269 @REPLY
1270 obj_handle_t handle; /* handle to the file */
1271 @END
1274 /* Open a file object */
1275 @REQ(open_file_object)
1276 unsigned int access; /* wanted access rights */
1277 unsigned int attributes; /* open attributes */
1278 obj_handle_t rootdir; /* root directory */
1279 unsigned int sharing; /* sharing flags */
1280 unsigned int options; /* file options */
1281 VARARG(filename,unicode_str); /* file name */
1282 @REPLY
1283 obj_handle_t handle; /* handle to the file */
1284 @END
1287 /* Allocate a file handle for a Unix fd */
1288 @REQ(alloc_file_handle)
1289 unsigned int access; /* wanted access rights */
1290 unsigned int attributes; /* object attributes */
1291 int fd; /* file descriptor on the client side */
1292 @REPLY
1293 obj_handle_t handle; /* handle to the file */
1294 @END
1297 /* Get the Unix name from a file handle */
1298 @REQ(get_handle_unix_name)
1299 obj_handle_t handle; /* file handle */
1300 @REPLY
1301 data_size_t name_len; /* unix name length */
1302 VARARG(name,string); /* unix name */
1303 @END
1306 /* Get a Unix fd to access a file */
1307 @REQ(get_handle_fd)
1308 obj_handle_t handle; /* handle to the file */
1309 @REPLY
1310 int type; /* file type (see below) */
1311 int cacheable; /* can fd be cached in the client? */
1312 unsigned int access; /* file access rights */
1313 unsigned int options; /* file open options */
1314 @END
1315 enum server_fd_type
1317 FD_TYPE_INVALID, /* invalid file (no associated fd) */
1318 FD_TYPE_FILE, /* regular file */
1319 FD_TYPE_DIR, /* directory */
1320 FD_TYPE_SOCKET, /* socket */
1321 FD_TYPE_SERIAL, /* serial port */
1322 FD_TYPE_PIPE, /* named pipe */
1323 FD_TYPE_MAILSLOT, /* mailslot */
1324 FD_TYPE_CHAR, /* unspecified char device */
1325 FD_TYPE_DEVICE, /* Windows device file */
1326 FD_TYPE_NB_TYPES
1330 /* Retrieve (or allocate) the client-side directory cache entry */
1331 @REQ(get_directory_cache_entry)
1332 obj_handle_t handle; /* handle to the directory */
1333 @REPLY
1334 int entry; /* cache entry on the client side */
1335 VARARG(free,ints); /* entries that can be freed */
1336 @END
1339 /* Flush a file buffers */
1340 @REQ(flush)
1341 async_data_t async; /* async I/O parameters */
1342 @REPLY
1343 obj_handle_t event; /* event set when finished */
1344 @END
1346 /* Query file information */
1347 @REQ(get_file_info)
1348 obj_handle_t handle; /* handle to the file */
1349 unsigned int info_class; /* queried information class */
1350 @REPLY
1351 VARARG(data,bytes); /* file info data */
1352 @END
1354 /* Query volume information */
1355 @REQ(get_volume_info)
1356 obj_handle_t handle; /* handle to the file */
1357 unsigned int info_class; /* queried information class */
1358 @REPLY
1359 VARARG(data,bytes); /* volume info data */
1360 @END
1362 /* Lock a region of a file */
1363 @REQ(lock_file)
1364 obj_handle_t handle; /* handle to the file */
1365 file_pos_t offset; /* offset of start of lock */
1366 file_pos_t count; /* count of bytes to lock */
1367 int shared; /* shared or exclusive lock? */
1368 int wait; /* do we want to wait? */
1369 @REPLY
1370 obj_handle_t handle; /* handle to wait on */
1371 int overlapped; /* is it an overlapped I/O handle? */
1372 @END
1375 /* Unlock a region of a file */
1376 @REQ(unlock_file)
1377 obj_handle_t handle; /* handle to the file */
1378 file_pos_t offset; /* offset of start of unlock */
1379 file_pos_t count; /* count of bytes to unlock */
1380 @END
1383 /* Create a socket */
1384 @REQ(create_socket)
1385 unsigned int access; /* wanted access rights */
1386 unsigned int attributes; /* object attributes */
1387 int family; /* family, see socket manpage */
1388 int type; /* type, see socket manpage */
1389 int protocol; /* protocol, see socket manpage */
1390 unsigned int flags; /* socket flags */
1391 @REPLY
1392 obj_handle_t handle; /* handle to the new socket */
1393 @END
1396 /* Accept a socket */
1397 @REQ(accept_socket)
1398 obj_handle_t lhandle; /* handle to the listening socket */
1399 unsigned int access; /* wanted access rights */
1400 unsigned int attributes; /* object attributes */
1401 @REPLY
1402 obj_handle_t handle; /* handle to the new socket */
1403 @END
1406 /* Accept into an initialized socket */
1407 @REQ(accept_into_socket)
1408 obj_handle_t lhandle; /* handle to the listening socket */
1409 obj_handle_t ahandle; /* handle to the accepting socket */
1410 @END
1413 /* Set socket event parameters */
1414 @REQ(set_socket_event)
1415 obj_handle_t handle; /* handle to the socket */
1416 unsigned int mask; /* event mask */
1417 obj_handle_t event; /* event object */
1418 user_handle_t window; /* window to send the message to */
1419 unsigned int msg; /* message to send */
1420 @END
1423 /* Get socket event parameters */
1424 @REQ(get_socket_event)
1425 obj_handle_t handle; /* handle to the socket */
1426 int service; /* clear pending? */
1427 obj_handle_t c_event; /* event to clear */
1428 @REPLY
1429 unsigned int mask; /* event mask */
1430 unsigned int pmask; /* pending events */
1431 unsigned int state; /* status bits */
1432 VARARG(errors,ints); /* event errors */
1433 @END
1436 /* Get socket info */
1437 @REQ(get_socket_info)
1438 obj_handle_t handle; /* handle to the socket */
1439 @REPLY
1440 int family; /* family, see socket manpage */
1441 int type; /* type, see socket manpage */
1442 int protocol; /* protocol, see socket manpage */
1443 @END
1446 /* Re-enable pending socket events */
1447 @REQ(enable_socket_event)
1448 obj_handle_t handle; /* handle to the socket */
1449 unsigned int mask; /* events to re-enable */
1450 unsigned int sstate; /* status bits to set */
1451 unsigned int cstate; /* status bits to clear */
1452 @END
1454 @REQ(set_socket_deferred)
1455 obj_handle_t handle; /* handle to the socket */
1456 obj_handle_t deferred; /* handle to the socket for which accept() is deferred */
1457 @END
1459 /* Allocate a console (only used by a console renderer) */
1460 @REQ(alloc_console)
1461 unsigned int access; /* wanted access rights */
1462 unsigned int attributes; /* object attributes */
1463 process_id_t pid; /* pid of process which shall be attached to the console */
1464 int input_fd; /* if pid=-1 (bare console to current process), fd for input */
1465 @REPLY
1466 obj_handle_t handle_in; /* handle to console input */
1467 @END
1470 /* Free the console of the current process */
1471 @REQ(free_console)
1472 @END
1475 /* Attach to a other process's console */
1476 @REQ(attach_console)
1477 process_id_t pid; /* pid of attached console process */
1478 @END
1481 /* Get the input queue wait event */
1482 @REQ(get_console_wait_event)
1483 obj_handle_t handle; /* handle to the console */
1484 @REPLY
1485 obj_handle_t event;
1486 @END
1489 /* Set info about a console (input only) */
1490 @REQ(set_console_input_info)
1491 obj_handle_t handle; /* handle to console input, or 0 for process' console */
1492 int mask; /* setting mask (see below) */
1493 obj_handle_t active_sb; /* active screen buffer */
1494 int history_mode; /* whether we duplicate lines in history */
1495 int history_size; /* number of lines in history */
1496 int edition_mode; /* index to the edition mode flavors */
1497 int input_cp; /* console input codepage */
1498 int output_cp; /* console output codepage */
1499 user_handle_t win; /* console window if backend supports it */
1500 VARARG(title,unicode_str); /* console title */
1501 @END
1502 #define SET_CONSOLE_INPUT_INFO_TITLE 0x02
1503 #define SET_CONSOLE_INPUT_INFO_HISTORY_MODE 0x04
1504 #define SET_CONSOLE_INPUT_INFO_HISTORY_SIZE 0x08
1505 #define SET_CONSOLE_INPUT_INFO_EDITION_MODE 0x10
1506 #define SET_CONSOLE_INPUT_INFO_INPUT_CODEPAGE 0x20
1507 #define SET_CONSOLE_INPUT_INFO_OUTPUT_CODEPAGE 0x40
1508 #define SET_CONSOLE_INPUT_INFO_WIN 0x80
1511 /* Get info about a console (input only) */
1512 @REQ(get_console_input_info)
1513 obj_handle_t handle; /* handle to console input, or 0 for process' console */
1514 @REPLY
1515 int history_mode; /* whether we duplicate lines in history */
1516 int history_size; /* number of lines in history */
1517 int history_index; /* number of used lines in history */
1518 int edition_mode; /* index to the edition mode flavors */
1519 int input_cp; /* console input codepage */
1520 int output_cp; /* console output codepage */
1521 user_handle_t win; /* console window if backend supports it */
1522 VARARG(title,unicode_str); /* console title */
1523 @END
1526 /* appends a string to console's history */
1527 @REQ(append_console_input_history)
1528 obj_handle_t handle; /* handle to console input, or 0 for process' console */
1529 VARARG(line,unicode_str); /* line to add */
1530 @END
1533 /* appends a string to console's history */
1534 @REQ(get_console_input_history)
1535 obj_handle_t handle; /* handle to console input, or 0 for process' console */
1536 int index; /* index to get line from */
1537 @REPLY
1538 int total; /* total length of line in Unicode chars */
1539 VARARG(line,unicode_str); /* line to add */
1540 @END
1543 /* creates a new screen buffer on process' console */
1544 @REQ(create_console_output)
1545 obj_handle_t handle_in; /* handle to console input, or 0 for process' console */
1546 unsigned int access; /* wanted access rights */
1547 unsigned int attributes; /* object attributes */
1548 unsigned int share; /* sharing credentials */
1549 int fd; /* for bare consoles, fd the screen-buffer is attached to */
1550 @REPLY
1551 obj_handle_t handle_out; /* handle to the screen buffer */
1552 @END
1555 /* Sends a signal to a process group */
1556 @REQ(send_console_signal)
1557 int signal; /* the signal to send */
1558 process_id_t group_id; /* the group to send the signal to */
1559 @END
1562 /* enable directory change notifications */
1563 @REQ(read_directory_changes)
1564 unsigned int filter; /* notification filter */
1565 int subtree; /* watch the subtree? */
1566 int want_data; /* flag indicating whether change data should be collected */
1567 async_data_t async; /* async I/O parameters */
1568 @END
1571 @REQ(read_change)
1572 obj_handle_t handle;
1573 @REPLY
1574 VARARG(events,filesystem_event); /* collected filesystem events */
1575 @END
1578 /* Create a file mapping */
1579 @REQ(create_mapping)
1580 unsigned int access; /* wanted access rights */
1581 unsigned int flags; /* SEC_* flags */
1582 unsigned int file_access; /* file access rights */
1583 mem_size_t size; /* mapping size */
1584 obj_handle_t file_handle; /* file handle */
1585 VARARG(objattr,object_attributes); /* object attributes */
1586 @REPLY
1587 obj_handle_t handle; /* handle to the mapping */
1588 @END
1591 /* Open a mapping */
1592 @REQ(open_mapping)
1593 unsigned int access; /* wanted access rights */
1594 unsigned int attributes; /* object attributes */
1595 obj_handle_t rootdir; /* root directory */
1596 VARARG(name,unicode_str); /* object name */
1597 @REPLY
1598 obj_handle_t handle; /* handle to the mapping */
1599 @END
1602 /* Get information about a file mapping */
1603 @REQ(get_mapping_info)
1604 obj_handle_t handle; /* handle to the mapping */
1605 unsigned int access; /* wanted access rights */
1606 @REPLY
1607 mem_size_t size; /* mapping size */
1608 unsigned int flags; /* SEC_* flags */
1609 obj_handle_t shared_file; /* shared mapping file handle */
1610 VARARG(image,pe_image_info);/* image info for SEC_IMAGE mappings */
1611 @END
1614 /* Add a memory view in the current process */
1615 @REQ(map_view)
1616 obj_handle_t mapping; /* file mapping handle */
1617 unsigned int access; /* wanted access rights */
1618 client_ptr_t base; /* view base address (page-aligned) */
1619 mem_size_t size; /* view size */
1620 file_pos_t start; /* start offset in mapping */
1621 @END
1624 /* Unmap a memory view from the current process */
1625 @REQ(unmap_view)
1626 client_ptr_t base; /* view base address */
1627 @END
1630 /* Get a range of committed pages in a file mapping */
1631 @REQ(get_mapping_committed_range)
1632 client_ptr_t base; /* view base address */
1633 file_pos_t offset; /* starting offset (page-aligned, in bytes) */
1634 @REPLY
1635 mem_size_t size; /* size of range starting at offset (page-aligned, in bytes) */
1636 int committed; /* whether it is a committed range */
1637 @END
1640 /* Add a range to the committed pages in a file mapping */
1641 @REQ(add_mapping_committed_range)
1642 client_ptr_t base; /* view base address */
1643 file_pos_t offset; /* starting offset (page-aligned, in bytes) */
1644 mem_size_t size; /* size to set (page-aligned, in bytes) or 0 if only retrieving */
1645 @END
1648 /* Check if two memory maps are for the same file */
1649 @REQ(is_same_mapping)
1650 client_ptr_t base1; /* first view base address */
1651 client_ptr_t base2; /* second view base address */
1652 @END
1655 struct thread_info
1657 timeout_t start_time;
1658 thread_id_t tid;
1659 int base_priority;
1660 int current_priority;
1661 int unix_tid;
1664 struct process_info
1666 timeout_t start_time;
1667 data_size_t name_len;
1668 int thread_count;
1669 int priority;
1670 process_id_t pid;
1671 process_id_t parent_pid;
1672 int handle_count;
1673 int unix_pid;
1674 int __pad;
1675 /* VARARG(name,unicode_str,name_len); */
1676 /* VARARG(threads,struct thread_info,thread_count); */
1679 /* Get a list of processes and threads currently running */
1680 @REQ(list_processes)
1681 @REPLY
1682 data_size_t info_size;
1683 int process_count;
1684 VARARG(data,process_info,info_size);
1685 @END
1688 /* Wait for a debug event */
1689 @REQ(wait_debug_event)
1690 int get_handle; /* should we alloc a handle for waiting? */
1691 @REPLY
1692 process_id_t pid; /* process id */
1693 thread_id_t tid; /* thread id */
1694 obj_handle_t wait; /* wait handle if no event ready */
1695 VARARG(event,debug_event); /* debug event data */
1696 @END
1699 /* Queue an exception event */
1700 @REQ(queue_exception_event)
1701 int first; /* first chance exception? */
1702 unsigned int code; /* exception code */
1703 unsigned int flags; /* exception flags */
1704 client_ptr_t record; /* exception record */
1705 client_ptr_t address; /* exception address */
1706 data_size_t len; /* size of parameters */
1707 VARARG(params,uints64,len);/* exception parameters */
1708 @REPLY
1709 obj_handle_t handle; /* handle to the queued event */
1710 @END
1713 /* Retrieve the status of an exception event */
1714 @REQ(get_exception_status)
1715 obj_handle_t handle; /* handle to the queued event */
1716 @END
1719 /* Continue a debug event */
1720 @REQ(continue_debug_event)
1721 process_id_t pid; /* process id to continue */
1722 thread_id_t tid; /* thread id to continue */
1723 int status; /* continuation status */
1724 @END
1727 /* Start/stop debugging an existing process */
1728 @REQ(debug_process)
1729 process_id_t pid; /* id of the process to debug */
1730 int attach; /* 1=attaching / 0=detaching from the process */
1731 @END
1734 /* Set debugger kill on exit flag */
1735 @REQ(set_debugger_kill_on_exit)
1736 int kill_on_exit; /* 0=detach/1=kill debuggee when debugger dies */
1737 @END
1740 /* Read data from a process address space */
1741 @REQ(read_process_memory)
1742 obj_handle_t handle; /* process handle */
1743 client_ptr_t addr; /* addr to read from */
1744 @REPLY
1745 VARARG(data,bytes); /* result data */
1746 @END
1749 /* Write data to a process address space */
1750 @REQ(write_process_memory)
1751 obj_handle_t handle; /* process handle */
1752 client_ptr_t addr; /* addr to write to */
1753 VARARG(data,bytes); /* data to write */
1754 @END
1757 /* Create a registry key */
1758 @REQ(create_key)
1759 unsigned int access; /* desired access rights */
1760 unsigned int options; /* creation options */
1761 VARARG(objattr,object_attributes); /* object attributes */
1762 VARARG(class,unicode_str); /* class name */
1763 @REPLY
1764 obj_handle_t hkey; /* handle to the created key */
1765 int created; /* has it been newly created? */
1766 @END
1768 /* Open a registry key */
1769 @REQ(open_key)
1770 obj_handle_t parent; /* handle to the parent key */
1771 unsigned int access; /* desired access rights */
1772 unsigned int attributes; /* object attributes */
1773 VARARG(name,unicode_str); /* key name */
1774 @REPLY
1775 obj_handle_t hkey; /* handle to the open key */
1776 @END
1779 /* Delete a registry key */
1780 @REQ(delete_key)
1781 obj_handle_t hkey; /* handle to the key */
1782 @END
1785 /* Flush a registry key */
1786 @REQ(flush_key)
1787 obj_handle_t hkey; /* handle to the key */
1788 @END
1791 /* Enumerate registry subkeys */
1792 @REQ(enum_key)
1793 obj_handle_t hkey; /* handle to registry key */
1794 int index; /* index of subkey (or -1 for current key) */
1795 int info_class; /* requested information class */
1796 @REPLY
1797 int subkeys; /* number of subkeys */
1798 int max_subkey; /* longest subkey name */
1799 int max_class; /* longest class name */
1800 int values; /* number of values */
1801 int max_value; /* longest value name */
1802 int max_data; /* longest value data */
1803 timeout_t modif; /* last modification time */
1804 data_size_t total; /* total length needed for full name and class */
1805 data_size_t namelen; /* length of key name in bytes */
1806 VARARG(name,unicode_str,namelen); /* key name */
1807 VARARG(class,unicode_str); /* class name */
1808 @END
1811 /* Set a value of a registry key */
1812 @REQ(set_key_value)
1813 obj_handle_t hkey; /* handle to registry key */
1814 int type; /* value type */
1815 data_size_t namelen; /* length of value name in bytes */
1816 VARARG(name,unicode_str,namelen); /* value name */
1817 VARARG(data,bytes); /* value data */
1818 @END
1821 /* Retrieve the value of a registry key */
1822 @REQ(get_key_value)
1823 obj_handle_t hkey; /* handle to registry key */
1824 VARARG(name,unicode_str); /* value name */
1825 @REPLY
1826 int type; /* value type */
1827 data_size_t total; /* total length needed for data */
1828 VARARG(data,bytes); /* value data */
1829 @END
1832 /* Enumerate a value of a registry key */
1833 @REQ(enum_key_value)
1834 obj_handle_t hkey; /* handle to registry key */
1835 int index; /* value index */
1836 int info_class; /* requested information class */
1837 @REPLY
1838 int type; /* value type */
1839 data_size_t total; /* total length needed for full name and data */
1840 data_size_t namelen; /* length of value name in bytes */
1841 VARARG(name,unicode_str,namelen); /* value name */
1842 VARARG(data,bytes); /* value data */
1843 @END
1846 /* Delete a value of a registry key */
1847 @REQ(delete_key_value)
1848 obj_handle_t hkey; /* handle to registry key */
1849 VARARG(name,unicode_str); /* value name */
1850 @END
1853 /* Load a registry branch from a file */
1854 @REQ(load_registry)
1855 obj_handle_t file; /* file to load from */
1856 VARARG(objattr,object_attributes); /* object attributes */
1857 @END
1860 /* UnLoad a registry branch from a file */
1861 @REQ(unload_registry)
1862 obj_handle_t hkey; /* root key to unload to */
1863 @END
1866 /* Save a registry branch to a file */
1867 @REQ(save_registry)
1868 obj_handle_t hkey; /* key to save */
1869 obj_handle_t file; /* file to save to */
1870 @END
1873 /* Add a registry key change notification */
1874 @REQ(set_registry_notification)
1875 obj_handle_t hkey; /* key to watch for changes */
1876 obj_handle_t event; /* event to set */
1877 int subtree; /* should we watch the whole subtree? */
1878 unsigned int filter; /* things to watch */
1879 @END
1882 /* Create a waitable timer */
1883 @REQ(create_timer)
1884 unsigned int access; /* wanted access rights */
1885 int manual; /* manual reset */
1886 VARARG(objattr,object_attributes); /* object attributes */
1887 @REPLY
1888 obj_handle_t handle; /* handle to the timer */
1889 @END
1892 /* Open a waitable timer */
1893 @REQ(open_timer)
1894 unsigned int access; /* wanted access rights */
1895 unsigned int attributes; /* object attributes */
1896 obj_handle_t rootdir; /* root directory */
1897 VARARG(name,unicode_str); /* object name */
1898 @REPLY
1899 obj_handle_t handle; /* handle to the timer */
1900 @END
1902 /* Set a waitable timer */
1903 @REQ(set_timer)
1904 obj_handle_t handle; /* handle to the timer */
1905 timeout_t expire; /* next expiration absolute time */
1906 client_ptr_t callback; /* callback function */
1907 client_ptr_t arg; /* callback argument */
1908 int period; /* timer period in ms */
1909 @REPLY
1910 int signaled; /* was the timer signaled before this call ? */
1911 @END
1913 /* Cancel a waitable timer */
1914 @REQ(cancel_timer)
1915 obj_handle_t handle; /* handle to the timer */
1916 @REPLY
1917 int signaled; /* was the timer signaled before this calltime ? */
1918 @END
1920 /* Get information on a waitable timer */
1921 @REQ(get_timer_info)
1922 obj_handle_t handle; /* handle to the timer */
1923 @REPLY
1924 timeout_t when; /* absolute time when the timer next expires */
1925 int signaled; /* is the timer signaled? */
1926 @END
1929 /* Retrieve the current context of a thread */
1930 @REQ(get_thread_context)
1931 obj_handle_t handle; /* thread or context handle */
1932 unsigned int flags; /* context flags */
1933 @REPLY
1934 int self; /* was it a handle to the current thread? */
1935 obj_handle_t handle; /* pending context handle */
1936 VARARG(context,context); /* thread context */
1937 @END
1940 /* Set the current context of a thread */
1941 @REQ(set_thread_context)
1942 obj_handle_t handle; /* thread handle */
1943 VARARG(context,context); /* thread context */
1944 @REPLY
1945 int self; /* was it a handle to the current thread? */
1946 @END
1949 /* Fetch a selector entry for a thread */
1950 @REQ(get_selector_entry)
1951 obj_handle_t handle; /* thread handle */
1952 int entry; /* LDT entry */
1953 @REPLY
1954 unsigned int base; /* selector base */
1955 unsigned int limit; /* selector limit */
1956 unsigned char flags; /* selector flags */
1957 @END
1960 /* Add an atom */
1961 @REQ(add_atom)
1962 obj_handle_t table; /* which table to add atom to */
1963 VARARG(name,unicode_str); /* atom name */
1964 @REPLY
1965 atom_t atom; /* resulting atom */
1966 @END
1969 /* Delete an atom */
1970 @REQ(delete_atom)
1971 obj_handle_t table; /* which table to delete atom from */
1972 atom_t atom; /* atom handle */
1973 @END
1976 /* Find an atom */
1977 @REQ(find_atom)
1978 obj_handle_t table; /* which table to find atom from */
1979 VARARG(name,unicode_str); /* atom name */
1980 @REPLY
1981 atom_t atom; /* atom handle */
1982 @END
1985 /* Get information about an atom */
1986 @REQ(get_atom_information)
1987 obj_handle_t table; /* which table to find atom from */
1988 atom_t atom; /* atom handle */
1989 @REPLY
1990 int count; /* atom lock count */
1991 int pinned; /* whether the atom has been pinned */
1992 data_size_t total; /* actual length of atom name */
1993 VARARG(name,unicode_str); /* atom name */
1994 @END
1997 /* Set information about an atom */
1998 @REQ(set_atom_information)
1999 obj_handle_t table; /* which table to find atom from */
2000 atom_t atom; /* atom handle */
2001 int pinned; /* whether to bump atom information */
2002 @END
2005 /* Empty an atom table */
2006 @REQ(empty_atom_table)
2007 obj_handle_t table; /* which table to find atom from */
2008 int if_pinned; /* whether to delete pinned atoms */
2009 @END
2012 /* Init an atom table */
2013 @REQ(init_atom_table)
2014 int entries; /* number of entries (only for local) */
2015 @REPLY
2016 obj_handle_t table; /* handle to the atom table */
2017 @END
2020 /* Get the message queue of the current thread */
2021 @REQ(get_msg_queue)
2022 @REPLY
2023 obj_handle_t handle; /* handle to the queue */
2024 @END
2027 /* Set the file descriptor associated to the current thread queue */
2028 @REQ(set_queue_fd)
2029 obj_handle_t handle; /* handle to the file descriptor */
2030 @END
2033 /* Set the current message queue wakeup mask */
2034 @REQ(set_queue_mask)
2035 unsigned int wake_mask; /* wakeup bits mask */
2036 unsigned int changed_mask; /* changed bits mask */
2037 int skip_wait; /* will we skip waiting if signaled? */
2038 @REPLY
2039 unsigned int wake_bits; /* current wake bits */
2040 unsigned int changed_bits; /* current changed bits */
2041 @END
2044 /* Get the current message queue status */
2045 @REQ(get_queue_status)
2046 unsigned int clear_bits; /* should we clear the change bits? */
2047 @REPLY
2048 unsigned int wake_bits; /* wake bits */
2049 unsigned int changed_bits; /* changed bits since last time */
2050 @END
2053 /* Retrieve the process idle event */
2054 @REQ(get_process_idle_event)
2055 obj_handle_t handle; /* process handle */
2056 @REPLY
2057 obj_handle_t event; /* handle to idle event */
2058 @END
2061 /* Send a message to a thread queue */
2062 @REQ(send_message)
2063 thread_id_t id; /* thread id */
2064 int type; /* message type (see below) */
2065 int flags; /* message flags (see below) */
2066 user_handle_t win; /* window handle */
2067 unsigned int msg; /* message code */
2068 lparam_t wparam; /* parameters */
2069 lparam_t lparam; /* parameters */
2070 timeout_t timeout; /* timeout for reply */
2071 VARARG(data,message_data); /* message data for sent messages */
2072 @END
2074 @REQ(post_quit_message)
2075 int exit_code; /* exit code to return */
2076 @END
2078 enum message_type
2080 MSG_ASCII, /* Ascii message (from SendMessageA) */
2081 MSG_UNICODE, /* Unicode message (from SendMessageW) */
2082 MSG_NOTIFY, /* notify message (from SendNotifyMessageW), always Unicode */
2083 MSG_CALLBACK, /* callback message (from SendMessageCallbackW), always Unicode */
2084 MSG_CALLBACK_RESULT,/* result of a callback message */
2085 MSG_OTHER_PROCESS, /* sent from other process, may include vararg data, always Unicode */
2086 MSG_POSTED, /* posted message (from PostMessageW), always Unicode */
2087 MSG_HARDWARE, /* hardware message */
2088 MSG_WINEVENT, /* winevent message */
2089 MSG_HOOK_LL /* low-level hardware hook */
2091 #define SEND_MSG_ABORT_IF_HUNG 0x01
2094 /* Send a hardware message to a thread queue */
2095 @REQ(send_hardware_message)
2096 user_handle_t win; /* window handle */
2097 hw_input_t input; /* input data */
2098 unsigned int flags; /* flags (see below) */
2099 @REPLY
2100 int wait; /* do we need to wait for a reply? */
2101 int prev_x; /* previous cursor position */
2102 int prev_y;
2103 int new_x; /* new cursor position */
2104 int new_y;
2105 VARARG(keystate,bytes); /* global state array for all the keys */
2106 @END
2107 #define SEND_HWMSG_INJECTED 0x01
2110 /* Get a message from the current queue */
2111 @REQ(get_message)
2112 unsigned int flags; /* PM_* flags */
2113 user_handle_t get_win; /* window handle to get */
2114 unsigned int get_first; /* first message code to get */
2115 unsigned int get_last; /* last message code to get */
2116 unsigned int hw_id; /* id of the previous hardware message (or 0) */
2117 unsigned int wake_mask; /* wakeup bits mask */
2118 unsigned int changed_mask; /* changed bits mask */
2119 @REPLY
2120 user_handle_t win; /* window handle */
2121 unsigned int msg; /* message code */
2122 lparam_t wparam; /* parameters */
2123 lparam_t lparam; /* parameters */
2124 int type; /* message type */
2125 int x; /* message x position */
2126 int y; /* message y position */
2127 unsigned int time; /* message time */
2128 unsigned int active_hooks; /* active hooks bitmap */
2129 data_size_t total; /* total size of extra data */
2130 VARARG(data,message_data); /* message data for sent messages */
2131 @END
2134 /* Reply to a sent message */
2135 @REQ(reply_message)
2136 int remove; /* should we remove the message? */
2137 lparam_t result; /* message result */
2138 VARARG(data,bytes); /* message data for sent messages */
2139 @END
2142 /* Accept and remove the current hardware message */
2143 @REQ(accept_hardware_message)
2144 unsigned int hw_id; /* id of the hardware message */
2145 @END
2148 /* Retrieve the reply for the last message sent */
2149 @REQ(get_message_reply)
2150 int cancel; /* cancel message if not ready? */
2151 @REPLY
2152 lparam_t result; /* message result */
2153 VARARG(data,bytes); /* message data for sent messages */
2154 @END
2157 /* Set a window timer */
2158 @REQ(set_win_timer)
2159 user_handle_t win; /* window handle */
2160 unsigned int msg; /* message to post */
2161 unsigned int rate; /* timer rate in ms */
2162 lparam_t id; /* timer id */
2163 lparam_t lparam; /* message lparam (callback proc) */
2164 @REPLY
2165 lparam_t id; /* timer id */
2166 @END
2169 /* Kill a window timer */
2170 @REQ(kill_win_timer)
2171 user_handle_t win; /* window handle */
2172 lparam_t id; /* timer id */
2173 unsigned int msg; /* message to post */
2174 @END
2177 /* check if the thread owning the window is hung */
2178 @REQ(is_window_hung)
2179 user_handle_t win; /* window handle */
2180 @REPLY
2181 int is_hung;
2182 @END
2185 /* Retrieve info about a serial port */
2186 @REQ(get_serial_info)
2187 obj_handle_t handle; /* handle to comm port */
2188 int flags;
2189 @REPLY
2190 unsigned int eventmask;
2191 unsigned int cookie;
2192 unsigned int pending_write;
2193 @END
2196 /* Set info about a serial port */
2197 @REQ(set_serial_info)
2198 obj_handle_t handle; /* handle to comm port */
2199 int flags; /* bitmask to set values (see below) */
2200 @END
2201 #define SERIALINFO_PENDING_WRITE 0x04
2202 #define SERIALINFO_PENDING_WAIT 0x08
2205 /* Create an async I/O */
2206 @REQ(register_async)
2207 int type; /* type of queue to look after */
2208 async_data_t async; /* async I/O parameters */
2209 int count; /* count - usually # of bytes to be read/written */
2210 @END
2211 #define ASYNC_TYPE_READ 0x01
2212 #define ASYNC_TYPE_WRITE 0x02
2213 #define ASYNC_TYPE_WAIT 0x03
2216 /* Cancel all async op on a fd */
2217 @REQ(cancel_async)
2218 obj_handle_t handle; /* handle to comm port, socket or file */
2219 client_ptr_t iosb; /* I/O status block (NULL=all) */
2220 int only_thread; /* cancel matching this thread */
2221 @END
2224 /* Retrieve results of an async */
2225 @REQ(get_async_result)
2226 client_ptr_t user_arg; /* user arg used to identify async */
2227 @REPLY
2228 data_size_t size; /* result size (input or output depending on the operation) */
2229 VARARG(out_data,bytes); /* iosb output data */
2230 @END
2233 /* Perform a read on a file object */
2234 @REQ(read)
2235 async_data_t async; /* async I/O parameters */
2236 file_pos_t pos; /* read position */
2237 @REPLY
2238 obj_handle_t wait; /* handle to wait on for blocking read */
2239 unsigned int options; /* device open options */
2240 VARARG(data,bytes); /* read data */
2241 @END
2244 /* Perform a write on a file object */
2245 @REQ(write)
2246 async_data_t async; /* async I/O parameters */
2247 file_pos_t pos; /* write position */
2248 VARARG(data,bytes); /* write data */
2249 @REPLY
2250 obj_handle_t wait; /* handle to wait on for blocking write */
2251 unsigned int options; /* device open options */
2252 data_size_t size; /* size written */
2253 @END
2256 /* Perform an ioctl on a file */
2257 @REQ(ioctl)
2258 ioctl_code_t code; /* ioctl code */
2259 async_data_t async; /* async I/O parameters */
2260 VARARG(in_data,bytes); /* ioctl input data */
2261 @REPLY
2262 obj_handle_t wait; /* handle to wait on for blocking ioctl */
2263 unsigned int options; /* device open options */
2264 VARARG(out_data,bytes); /* ioctl output data */
2265 @END
2268 /* Store results of an async irp */
2269 @REQ(set_irp_result)
2270 obj_handle_t handle; /* handle to the irp */
2271 unsigned int status; /* status of the irp */
2272 data_size_t size; /* result size (input or output depending on the operation) */
2273 VARARG(data,bytes); /* output data of the irp */
2274 @END
2277 /* Create a named pipe */
2278 @REQ(create_named_pipe)
2279 unsigned int access;
2280 unsigned int options;
2281 unsigned int sharing;
2282 unsigned int maxinstances;
2283 unsigned int outsize;
2284 unsigned int insize;
2285 timeout_t timeout;
2286 unsigned int flags;
2287 VARARG(objattr,object_attributes); /* object attributes */
2288 @REPLY
2289 obj_handle_t handle; /* handle to the pipe */
2290 @END
2292 /* flags in create_named_pipe and get_named_pipe_info */
2293 #define NAMED_PIPE_MESSAGE_STREAM_WRITE 0x0001
2294 #define NAMED_PIPE_MESSAGE_STREAM_READ 0x0002
2295 #define NAMED_PIPE_NONBLOCKING_MODE 0x0004
2296 #define NAMED_PIPE_SERVER_END 0x8000
2298 /* Set named pipe information by handle */
2299 @REQ(set_named_pipe_info)
2300 obj_handle_t handle;
2301 unsigned int flags;
2302 @END
2304 /* Create a window */
2305 @REQ(create_window)
2306 user_handle_t parent; /* parent window */
2307 user_handle_t owner; /* owner window */
2308 atom_t atom; /* class atom */
2309 mod_handle_t instance; /* module instance */
2310 int dpi; /* system DPI */
2311 int awareness; /* thread DPI awareness */
2312 VARARG(class,unicode_str); /* class name */
2313 @REPLY
2314 user_handle_t handle; /* created window */
2315 user_handle_t parent; /* full handle of parent */
2316 user_handle_t owner; /* full handle of owner */
2317 int extra; /* number of extra bytes */
2318 client_ptr_t class_ptr; /* pointer to class in client address space */
2319 int dpi; /* window DPI if not per-monitor aware */
2320 int awareness; /* window DPI awareness */
2321 @END
2324 /* Destroy a window */
2325 @REQ(destroy_window)
2326 user_handle_t handle; /* handle to the window */
2327 @END
2330 /* Retrieve the desktop window for the current thread */
2331 @REQ(get_desktop_window)
2332 int force; /* force creation if it doesn't exist */
2333 @REPLY
2334 user_handle_t top_window; /* handle to the desktop window */
2335 user_handle_t msg_window; /* handle to the top-level HWND_MESSAGE parent */
2336 @END
2339 /* Set a window owner */
2340 @REQ(set_window_owner)
2341 user_handle_t handle; /* handle to the window */
2342 user_handle_t owner; /* new owner */
2343 @REPLY
2344 user_handle_t full_owner; /* full handle of new owner */
2345 user_handle_t prev_owner; /* full handle of previous owner */
2346 @END
2349 /* Get information from a window handle */
2350 @REQ(get_window_info)
2351 user_handle_t handle; /* handle to the window */
2352 @REPLY
2353 user_handle_t full_handle; /* full 32-bit handle */
2354 user_handle_t last_active; /* last active popup */
2355 process_id_t pid; /* process owning the window */
2356 thread_id_t tid; /* thread owning the window */
2357 atom_t atom; /* class atom */
2358 int is_unicode; /* ANSI or unicode */
2359 int dpi; /* window DPI */
2360 int awareness; /* DPI awareness */
2361 @END
2364 /* Set some information in a window */
2365 @REQ(set_window_info)
2366 unsigned short flags; /* flags for fields to set (see below) */
2367 short int is_unicode; /* ANSI or unicode */
2368 user_handle_t handle; /* handle to the window */
2369 unsigned int style; /* window style */
2370 unsigned int ex_style; /* window extended style */
2371 unsigned int id; /* window id */
2372 mod_handle_t instance; /* creator instance */
2373 lparam_t user_data; /* user-specific data */
2374 int extra_offset; /* offset to set in extra bytes */
2375 data_size_t extra_size; /* size to set in extra bytes */
2376 lparam_t extra_value; /* value to set in extra bytes */
2377 @REPLY
2378 unsigned int old_style; /* old window style */
2379 unsigned int old_ex_style; /* old window extended style */
2380 mod_handle_t old_instance; /* old creator instance */
2381 lparam_t old_user_data; /* old user-specific data */
2382 lparam_t old_extra_value; /* old value in extra bytes */
2383 unsigned int old_id; /* old window id */
2384 @END
2385 #define SET_WIN_STYLE 0x01
2386 #define SET_WIN_EXSTYLE 0x02
2387 #define SET_WIN_ID 0x04
2388 #define SET_WIN_INSTANCE 0x08
2389 #define SET_WIN_USERDATA 0x10
2390 #define SET_WIN_EXTRA 0x20
2391 #define SET_WIN_UNICODE 0x40
2394 /* Set the parent of a window */
2395 @REQ(set_parent)
2396 user_handle_t handle; /* handle to the window */
2397 user_handle_t parent; /* handle to the parent */
2398 @REPLY
2399 user_handle_t old_parent; /* old parent window */
2400 user_handle_t full_parent; /* full handle of new parent */
2401 int dpi; /* new window DPI if not per-monitor aware */
2402 int awareness; /* new DPI awareness */
2403 @END
2406 /* Get a list of the window parents, up to the root of the tree */
2407 @REQ(get_window_parents)
2408 user_handle_t handle; /* handle to the window */
2409 @REPLY
2410 int count; /* total count of parents */
2411 VARARG(parents,user_handles); /* parent handles */
2412 @END
2415 /* Get a list of the window children */
2416 @REQ(get_window_children)
2417 obj_handle_t desktop; /* handle to desktop */
2418 user_handle_t parent; /* parent window */
2419 atom_t atom; /* class atom for the listed children */
2420 thread_id_t tid; /* thread owning the listed children */
2421 VARARG(class,unicode_str); /* class name */
2422 @REPLY
2423 int count; /* total count of children */
2424 VARARG(children,user_handles); /* children handles */
2425 @END
2428 /* Get a list of the window children that contain a given point */
2429 @REQ(get_window_children_from_point)
2430 user_handle_t parent; /* parent window */
2431 int x; /* point in parent coordinates */
2432 int y;
2433 int dpi; /* dpi for the point coordinates */
2434 @REPLY
2435 int count; /* total count of children */
2436 VARARG(children,user_handles); /* children handles */
2437 @END
2440 /* Get window tree information from a window handle */
2441 @REQ(get_window_tree)
2442 user_handle_t handle; /* handle to the window */
2443 @REPLY
2444 user_handle_t parent; /* parent window */
2445 user_handle_t owner; /* owner window */
2446 user_handle_t next_sibling; /* next sibling in Z-order */
2447 user_handle_t prev_sibling; /* prev sibling in Z-order */
2448 user_handle_t first_sibling; /* first sibling in Z-order */
2449 user_handle_t last_sibling; /* last sibling in Z-order */
2450 user_handle_t first_child; /* first child */
2451 user_handle_t last_child; /* last child */
2452 @END
2454 /* Set the position and Z order of a window */
2455 @REQ(set_window_pos)
2456 unsigned short swp_flags; /* SWP_* flags */
2457 unsigned short paint_flags; /* paint flags (see below) */
2458 user_handle_t handle; /* handle to the window */
2459 user_handle_t previous; /* previous window in Z order */
2460 rectangle_t window; /* window rectangle (in parent coords) */
2461 rectangle_t client; /* client rectangle (in parent coords) */
2462 VARARG(valid,rectangles); /* valid rectangles from WM_NCCALCSIZE (in parent coords) */
2463 @REPLY
2464 unsigned int new_style; /* new window style */
2465 unsigned int new_ex_style; /* new window extended style */
2466 user_handle_t surface_win; /* parent window that holds the surface */
2467 int needs_update; /* whether the surface region needs an update */
2468 @END
2469 #define SET_WINPOS_PAINT_SURFACE 0x01 /* window has a paintable surface */
2470 #define SET_WINPOS_PIXEL_FORMAT 0x02 /* window has a custom pixel format */
2472 /* Get the window and client rectangles of a window */
2473 @REQ(get_window_rectangles)
2474 user_handle_t handle; /* handle to the window */
2475 int relative; /* coords relative to (see below) */
2476 int dpi; /* DPI to map to, or zero for per-monitor DPI */
2477 @REPLY
2478 rectangle_t window; /* window rectangle */
2479 rectangle_t client; /* client rectangle */
2480 @END
2481 enum coords_relative
2483 COORDS_CLIENT, /* relative to client area */
2484 COORDS_WINDOW, /* relative to whole window area */
2485 COORDS_PARENT, /* relative to parent's client area */
2486 COORDS_SCREEN /* relative to screen origin */
2490 /* Get the window text */
2491 @REQ(get_window_text)
2492 user_handle_t handle; /* handle to the window */
2493 @REPLY
2494 data_size_t length; /* total length in WCHARs */
2495 VARARG(text,unicode_str); /* window text */
2496 @END
2499 /* Set the window text */
2500 @REQ(set_window_text)
2501 user_handle_t handle; /* handle to the window */
2502 VARARG(text,unicode_str); /* window text */
2503 @END
2506 /* Get the coordinates offset between two windows */
2507 @REQ(get_windows_offset)
2508 user_handle_t from; /* handle to the first window */
2509 user_handle_t to; /* handle to the second window */
2510 int dpi; /* DPI to map to, or zero for per-monitor DPI */
2511 @REPLY
2512 int x; /* x coordinate offset */
2513 int y; /* y coordinate offset */
2514 int mirror; /* whether to mirror the x coordinate */
2515 @END
2518 /* Get the visible region of a window */
2519 @REQ(get_visible_region)
2520 user_handle_t window; /* handle to the window */
2521 unsigned int flags; /* DCX flags */
2522 @REPLY
2523 user_handle_t top_win; /* top window to clip against */
2524 rectangle_t top_rect; /* top window visible rect with screen coords */
2525 rectangle_t win_rect; /* window rect in screen coords */
2526 unsigned int paint_flags; /* paint flags (from SET_WINPOS_* flags) */
2527 data_size_t total_size; /* total size of the resulting region */
2528 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2529 @END
2532 /* Get the visible surface region of a window */
2533 @REQ(get_surface_region)
2534 user_handle_t window; /* handle to the window */
2535 @REPLY
2536 rectangle_t visible_rect; /* window visible rect in screen coords */
2537 data_size_t total_size; /* total size of the resulting region */
2538 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2539 @END
2542 /* Get the window region */
2543 @REQ(get_window_region)
2544 user_handle_t window; /* handle to the window */
2545 @REPLY
2546 data_size_t total_size; /* total size of the resulting region */
2547 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2548 @END
2551 /* Set the window region */
2552 @REQ(set_window_region)
2553 user_handle_t window; /* handle to the window */
2554 int redraw; /* redraw the window? */
2555 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2556 @END
2559 /* Get the window update region */
2560 @REQ(get_update_region)
2561 user_handle_t window; /* handle to the window */
2562 user_handle_t from_child; /* child to start searching from */
2563 unsigned int flags; /* update flags (see below) */
2564 @REPLY
2565 user_handle_t child; /* child to repaint (or window itself) */
2566 unsigned int flags; /* resulting update flags (see below) */
2567 data_size_t total_size; /* total size of the resulting region */
2568 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2569 @END
2570 #define UPDATE_NONCLIENT 0x001 /* get region for repainting non-client area */
2571 #define UPDATE_ERASE 0x002 /* get region for erasing client area */
2572 #define UPDATE_PAINT 0x004 /* get region for painting client area */
2573 #define UPDATE_INTERNALPAINT 0x008 /* get region if internal paint is pending */
2574 #define UPDATE_ALLCHILDREN 0x010 /* force repaint of all children */
2575 #define UPDATE_NOCHILDREN 0x020 /* don't try to repaint any children */
2576 #define UPDATE_NOREGION 0x040 /* don't return a region, only the flags */
2577 #define UPDATE_DELAYED_ERASE 0x080 /* still needs erase after BeginPaint */
2578 #define UPDATE_CLIPCHILDREN 0x100 /* remove clipped children from the update region */
2581 /* Update the z order of a window so that a given rectangle is fully visible */
2582 @REQ(update_window_zorder)
2583 user_handle_t window; /* handle to the window */
2584 rectangle_t rect; /* rectangle that must be visible (in client coords) */
2585 @END
2588 /* Mark parts of a window as needing a redraw */
2589 @REQ(redraw_window)
2590 user_handle_t window; /* handle to the window */
2591 unsigned int flags; /* RDW_* flags */
2592 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2593 @END
2596 /* Set a window property */
2597 @REQ(set_window_property)
2598 user_handle_t window; /* handle to the window */
2599 lparam_t data; /* data to store */
2600 atom_t atom; /* property atom (if no name specified) */
2601 VARARG(name,unicode_str); /* property name */
2602 @END
2605 /* Remove a window property */
2606 @REQ(remove_window_property)
2607 user_handle_t window; /* handle to the window */
2608 atom_t atom; /* property atom (if no name specified) */
2609 VARARG(name,unicode_str); /* property name */
2610 @REPLY
2611 lparam_t data; /* data stored in property */
2612 @END
2615 /* Get a window property */
2616 @REQ(get_window_property)
2617 user_handle_t window; /* handle to the window */
2618 atom_t atom; /* property atom (if no name specified) */
2619 VARARG(name,unicode_str); /* property name */
2620 @REPLY
2621 lparam_t data; /* data stored in property */
2622 @END
2625 /* Get the list of properties of a window */
2626 @REQ(get_window_properties)
2627 user_handle_t window; /* handle to the window */
2628 @REPLY
2629 int total; /* total number of properties */
2630 VARARG(props,properties); /* list of properties */
2631 @END
2634 /* Create a window station */
2635 @REQ(create_winstation)
2636 unsigned int flags; /* window station flags */
2637 unsigned int access; /* wanted access rights */
2638 unsigned int attributes; /* object attributes */
2639 obj_handle_t rootdir; /* root directory */
2640 VARARG(name,unicode_str); /* object name */
2641 @REPLY
2642 obj_handle_t handle; /* handle to the window station */
2643 @END
2646 /* Open a handle to a window station */
2647 @REQ(open_winstation)
2648 unsigned int access; /* wanted access rights */
2649 unsigned int attributes; /* object attributes */
2650 obj_handle_t rootdir; /* root directory */
2651 VARARG(name,unicode_str); /* object name */
2652 @REPLY
2653 obj_handle_t handle; /* handle to the window station */
2654 @END
2657 /* Close a window station */
2658 @REQ(close_winstation)
2659 obj_handle_t handle; /* handle to the window station */
2660 @END
2663 /* Get the process current window station */
2664 @REQ(get_process_winstation)
2665 @REPLY
2666 obj_handle_t handle; /* handle to the window station */
2667 @END
2670 /* Set the process current window station */
2671 @REQ(set_process_winstation)
2672 obj_handle_t handle; /* handle to the window station */
2673 @END
2676 /* Enumerate window stations */
2677 @REQ(enum_winstation)
2678 unsigned int index; /* current index */
2679 @REPLY
2680 unsigned int next; /* next index */
2681 VARARG(name,unicode_str); /* window station name */
2682 @END
2685 /* Create a desktop */
2686 @REQ(create_desktop)
2687 unsigned int flags; /* desktop flags */
2688 unsigned int access; /* wanted access rights */
2689 unsigned int attributes; /* object attributes */
2690 VARARG(name,unicode_str); /* object name */
2691 @REPLY
2692 obj_handle_t handle; /* handle to the desktop */
2693 @END
2696 /* Open a handle to a desktop */
2697 @REQ(open_desktop)
2698 obj_handle_t winsta; /* window station to open (null allowed) */
2699 unsigned int flags; /* desktop flags */
2700 unsigned int access; /* wanted access rights */
2701 unsigned int attributes; /* object attributes */
2702 VARARG(name,unicode_str); /* object name */
2703 @REPLY
2704 obj_handle_t handle; /* handle to the desktop */
2705 @END
2708 /* Open a handle to current input desktop */
2709 @REQ(open_input_desktop)
2710 unsigned int flags; /* desktop flags */
2711 unsigned int access; /* wanted access rights */
2712 unsigned int attributes; /* object attributes */
2713 @REPLY
2714 obj_handle_t handle; /* handle to the desktop */
2715 @END
2718 /* Close a desktop */
2719 @REQ(close_desktop)
2720 obj_handle_t handle; /* handle to the desktop */
2721 @END
2724 /* Get the thread current desktop */
2725 @REQ(get_thread_desktop)
2726 thread_id_t tid; /* thread id */
2727 @REPLY
2728 obj_handle_t handle; /* handle to the desktop */
2729 @END
2732 /* Set the thread current desktop */
2733 @REQ(set_thread_desktop)
2734 obj_handle_t handle; /* handle to the desktop */
2735 @END
2738 /* Enumerate desktops */
2739 @REQ(enum_desktop)
2740 obj_handle_t winstation; /* handle to the window station */
2741 unsigned int index; /* current index */
2742 @REPLY
2743 unsigned int next; /* next index */
2744 VARARG(name,unicode_str); /* window station name */
2745 @END
2748 /* Get/set information about a user object (window station or desktop) */
2749 @REQ(set_user_object_info)
2750 obj_handle_t handle; /* handle to the object */
2751 unsigned int flags; /* information to set/get */
2752 unsigned int obj_flags; /* new object flags */
2753 @REPLY
2754 int is_desktop; /* is object a desktop? */
2755 unsigned int old_obj_flags; /* old object flags */
2756 VARARG(name,unicode_str); /* object name */
2757 @END
2758 #define SET_USER_OBJECT_SET_FLAGS 1
2759 #define SET_USER_OBJECT_GET_FULL_NAME 2
2762 /* Register a hotkey */
2763 @REQ(register_hotkey)
2764 user_handle_t window; /* handle to the window */
2765 int id; /* hotkey identifier */
2766 unsigned int flags; /* modifier keys */
2767 unsigned int vkey; /* virtual key code */
2768 @REPLY
2769 int replaced; /* did we replace an existing hotkey? */
2770 unsigned int flags; /* flags of replaced hotkey */
2771 unsigned int vkey; /* virtual key code of replaced hotkey */
2772 @END
2775 /* Unregister a hotkey */
2776 @REQ(unregister_hotkey)
2777 user_handle_t window; /* handle to the window */
2778 int id; /* hotkey identifier */
2779 @REPLY
2780 unsigned int flags; /* flags of removed hotkey */
2781 unsigned int vkey; /* virtual key code of removed hotkey */
2782 @END
2785 /* Attach (or detach) thread inputs */
2786 @REQ(attach_thread_input)
2787 thread_id_t tid_from; /* thread to be attached */
2788 thread_id_t tid_to; /* thread to which tid_from should be attached */
2789 int attach; /* is it an attach? */
2790 @END
2793 /* Get input data for a given thread */
2794 @REQ(get_thread_input)
2795 thread_id_t tid; /* id of thread */
2796 @REPLY
2797 user_handle_t focus; /* handle to the focus window */
2798 user_handle_t capture; /* handle to the capture window */
2799 user_handle_t active; /* handle to the active window */
2800 user_handle_t foreground; /* handle to the global foreground window */
2801 user_handle_t menu_owner; /* handle to the menu owner */
2802 user_handle_t move_size; /* handle to the moving/resizing window */
2803 user_handle_t caret; /* handle to the caret window */
2804 user_handle_t cursor; /* handle to the cursor */
2805 int show_count; /* cursor show count */
2806 rectangle_t rect; /* caret rectangle */
2807 @END
2810 /* Get the time of the last input event */
2811 @REQ(get_last_input_time)
2812 @REPLY
2813 unsigned int time;
2814 @END
2817 /* Retrieve queue keyboard state for a given thread */
2818 @REQ(get_key_state)
2819 thread_id_t tid; /* id of thread */
2820 int key; /* optional key code or -1 */
2821 @REPLY
2822 unsigned char state; /* state of specified key */
2823 VARARG(keystate,bytes); /* state array for all the keys */
2824 @END
2826 /* Set queue keyboard state for a given thread */
2827 @REQ(set_key_state)
2828 thread_id_t tid; /* id of thread */
2829 int async; /* whether to change the async state too */
2830 VARARG(keystate,bytes); /* state array for all the keys */
2831 @END
2833 /* Set the system foreground window */
2834 @REQ(set_foreground_window)
2835 user_handle_t handle; /* handle to the foreground window */
2836 @REPLY
2837 user_handle_t previous; /* handle to the previous foreground window */
2838 int send_msg_old; /* whether we have to send a msg to the old window */
2839 int send_msg_new; /* whether we have to send a msg to the new window */
2840 @END
2842 /* Set the current thread focus window */
2843 @REQ(set_focus_window)
2844 user_handle_t handle; /* handle to the focus window */
2845 @REPLY
2846 user_handle_t previous; /* handle to the previous focus window */
2847 @END
2849 /* Set the current thread active window */
2850 @REQ(set_active_window)
2851 user_handle_t handle; /* handle to the active window */
2852 @REPLY
2853 user_handle_t previous; /* handle to the previous active window */
2854 @END
2856 /* Set the current thread capture window */
2857 @REQ(set_capture_window)
2858 user_handle_t handle; /* handle to the capture window */
2859 unsigned int flags; /* capture flags (see below) */
2860 @REPLY
2861 user_handle_t previous; /* handle to the previous capture window */
2862 user_handle_t full_handle; /* full 32-bit handle of new capture window */
2863 @END
2864 #define CAPTURE_MENU 0x01 /* capture is for a menu */
2865 #define CAPTURE_MOVESIZE 0x02 /* capture is for moving/resizing */
2868 /* Set the current thread caret window */
2869 @REQ(set_caret_window)
2870 user_handle_t handle; /* handle to the caret window */
2871 int width; /* caret width */
2872 int height; /* caret height */
2873 @REPLY
2874 user_handle_t previous; /* handle to the previous caret window */
2875 rectangle_t old_rect; /* previous caret rectangle */
2876 int old_hide; /* previous hide count */
2877 int old_state; /* previous caret state (1=on, 0=off) */
2878 @END
2881 /* Set the current thread caret information */
2882 @REQ(set_caret_info)
2883 unsigned int flags; /* caret flags (see below) */
2884 user_handle_t handle; /* handle to the caret window */
2885 int x; /* caret x position */
2886 int y; /* caret y position */
2887 int hide; /* increment for hide count (can be negative to show it) */
2888 int state; /* caret state (see below) */
2889 @REPLY
2890 user_handle_t full_handle; /* handle to the current caret window */
2891 rectangle_t old_rect; /* previous caret rectangle */
2892 int old_hide; /* previous hide count */
2893 int old_state; /* previous caret state (1=on, 0=off) */
2894 @END
2895 #define SET_CARET_POS 0x01 /* set the caret position from x,y */
2896 #define SET_CARET_HIDE 0x02 /* increment the caret hide count */
2897 #define SET_CARET_STATE 0x04 /* set the caret on/off state */
2898 enum caret_state
2900 CARET_STATE_OFF, /* off */
2901 CARET_STATE_ON, /* on */
2902 CARET_STATE_TOGGLE, /* toggle current state */
2903 CARET_STATE_ON_IF_MOVED /* on if the position differs, unchanged otherwise */
2907 /* Set a window hook */
2908 @REQ(set_hook)
2909 int id; /* id of the hook */
2910 process_id_t pid; /* id of process to set the hook into */
2911 thread_id_t tid; /* id of thread to set the hook into */
2912 int event_min;
2913 int event_max;
2914 client_ptr_t proc; /* hook procedure */
2915 int flags;
2916 int unicode; /* is it a unicode hook? */
2917 VARARG(module,unicode_str); /* module name */
2918 @REPLY
2919 user_handle_t handle; /* handle to the hook */
2920 unsigned int active_hooks; /* active hooks bitmap */
2921 @END
2924 /* Remove a window hook */
2925 @REQ(remove_hook)
2926 user_handle_t handle; /* handle to the hook */
2927 client_ptr_t proc; /* hook procedure if handle is 0 */
2928 int id; /* id of the hook if handle is 0 */
2929 @REPLY
2930 unsigned int active_hooks; /* active hooks bitmap */
2931 @END
2934 /* Start calling a hook chain */
2935 @REQ(start_hook_chain)
2936 int id; /* id of the hook */
2937 int event; /* signalled event */
2938 user_handle_t window; /* handle to the event window */
2939 int object_id; /* object id for out of context winevent */
2940 int child_id; /* child id for out of context winevent */
2941 @REPLY
2942 user_handle_t handle; /* handle to the next hook */
2943 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2944 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2945 int unicode; /* is it a unicode hook? */
2946 client_ptr_t proc; /* hook procedure */
2947 unsigned int active_hooks; /* active hooks bitmap */
2948 VARARG(module,unicode_str); /* module name */
2949 @END
2952 /* Finished calling a hook chain */
2953 @REQ(finish_hook_chain)
2954 int id; /* id of the hook */
2955 @END
2958 /* Get the hook information */
2959 @REQ(get_hook_info)
2960 user_handle_t handle; /* handle to the current hook */
2961 int get_next; /* do we want info about current or next hook? */
2962 int event; /* signalled event */
2963 user_handle_t window; /* handle to the event window */
2964 int object_id; /* object id for out of context winevent */
2965 int child_id; /* child id for out of context winevent */
2966 @REPLY
2967 user_handle_t handle; /* handle to the hook */
2968 int id; /* id of the hook */
2969 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2970 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2971 client_ptr_t proc; /* hook procedure */
2972 int unicode; /* is it a unicode hook? */
2973 VARARG(module,unicode_str); /* module name */
2974 @END
2977 /* Create a window class */
2978 @REQ(create_class)
2979 int local; /* is it a local class? */
2980 atom_t atom; /* class atom */
2981 unsigned int style; /* class style */
2982 mod_handle_t instance; /* module instance */
2983 int extra; /* number of extra class bytes */
2984 int win_extra; /* number of window extra bytes */
2985 client_ptr_t client_ptr; /* pointer to class in client address space */
2986 data_size_t name_offset; /* base class name offset for specified atom */
2987 VARARG(name,unicode_str); /* class name */
2988 @REPLY
2989 atom_t atom; /* resulting class atom */
2990 @END
2993 /* Destroy a window class */
2994 @REQ(destroy_class)
2995 atom_t atom; /* class atom */
2996 mod_handle_t instance; /* module instance */
2997 VARARG(name,unicode_str); /* class name */
2998 @REPLY
2999 client_ptr_t client_ptr; /* pointer to class in client address space */
3000 @END
3003 /* Set some information in a class */
3004 @REQ(set_class_info)
3005 user_handle_t window; /* handle to the window */
3006 unsigned int flags; /* flags for info to set (see below) */
3007 atom_t atom; /* class atom */
3008 unsigned int style; /* class style */
3009 int win_extra; /* number of window extra bytes */
3010 mod_handle_t instance; /* module instance */
3011 int extra_offset; /* offset to set in extra bytes */
3012 data_size_t extra_size; /* size to set in extra bytes */
3013 lparam_t extra_value; /* value to set in extra bytes */
3014 @REPLY
3015 atom_t old_atom; /* previous class atom */
3016 atom_t base_atom; /* base class atom */
3017 mod_handle_t old_instance; /* previous module instance */
3018 lparam_t old_extra_value; /* old value in extra bytes */
3019 unsigned int old_style; /* previous class style */
3020 int old_extra; /* previous number of class extra bytes */
3021 int old_win_extra; /* previous number of window extra bytes */
3022 @END
3023 #define SET_CLASS_ATOM 0x0001
3024 #define SET_CLASS_STYLE 0x0002
3025 #define SET_CLASS_WINEXTRA 0x0004
3026 #define SET_CLASS_INSTANCE 0x0008
3027 #define SET_CLASS_EXTRA 0x0010
3030 /* Open the clipboard */
3031 @REQ(open_clipboard)
3032 user_handle_t window; /* clipboard window */
3033 @REPLY
3034 user_handle_t owner; /* current clipboard owner */
3035 @END
3038 /* Close the clipboard */
3039 @REQ(close_clipboard)
3040 @REPLY
3041 user_handle_t viewer; /* first clipboard viewer */
3042 user_handle_t owner; /* current clipboard owner */
3043 @END
3046 /* Empty the clipboard and grab ownership */
3047 @REQ(empty_clipboard)
3048 @END
3051 /* Add a data format to the clipboard */
3052 @REQ(set_clipboard_data)
3053 unsigned int format; /* clipboard format of the data */
3054 unsigned int lcid; /* locale id to use for synthesizing text formats */
3055 VARARG(data,bytes); /* data contents */
3056 @REPLY
3057 unsigned int seqno; /* sequence number for the set data */
3058 @END
3061 /* Fetch a data format from the clipboard */
3062 @REQ(get_clipboard_data)
3063 unsigned int format; /* clipboard format of the data */
3064 int render; /* will we try to render it if missing? */
3065 int cached; /* do we already have it in the client-side cache? */
3066 unsigned int seqno; /* sequence number for the data in the cache */
3067 @REPLY
3068 unsigned int from; /* for synthesized data, format to generate it from */
3069 user_handle_t owner; /* clipboard owner for delayed-rendered formats */
3070 unsigned int seqno; /* sequence number for the originally set data */
3071 data_size_t total; /* total data size */
3072 VARARG(data,bytes); /* data contents */
3073 @END
3076 /* Retrieve a list of available formats */
3077 @REQ(get_clipboard_formats)
3078 unsigned int format; /* specific format to query, return all if 0 */
3079 @REPLY
3080 unsigned int count; /* count of available formats */
3081 VARARG(formats,uints); /* array of available formats */
3082 @END
3085 /* Retrieve the next available format */
3086 @REQ(enum_clipboard_formats)
3087 unsigned int previous; /* previous format, or first if 0 */
3088 @REPLY
3089 unsigned int format; /* next format */
3090 @END
3093 /* Release ownership of the clipboard */
3094 @REQ(release_clipboard)
3095 user_handle_t owner; /* clipboard owner to release */
3096 @REPLY
3097 user_handle_t viewer; /* first clipboard viewer */
3098 user_handle_t owner; /* current clipboard owner */
3099 @END
3102 /* Get clipboard information */
3103 @REQ(get_clipboard_info)
3104 @REPLY
3105 user_handle_t window; /* clipboard window */
3106 user_handle_t owner; /* clipboard owner */
3107 user_handle_t viewer; /* clipboard viewer */
3108 unsigned int seqno; /* current sequence number */
3109 @END
3112 /* Set the clipboard viewer window */
3113 @REQ(set_clipboard_viewer)
3114 user_handle_t viewer; /* clipboard viewer */
3115 user_handle_t previous; /* if non-zero, check that this was the previous viewer */
3116 @REPLY
3117 user_handle_t old_viewer; /* previous clipboard viewer */
3118 user_handle_t owner; /* clipboard owner */
3119 @END
3122 /* Add a clipboard listener window */
3123 @REQ(add_clipboard_listener)
3124 user_handle_t window; /* clipboard listener window */
3125 @END
3128 /* Remove a clipboard listener window */
3129 @REQ(remove_clipboard_listener)
3130 user_handle_t window; /* clipboard listener window */
3131 @END
3134 /* Open a security token */
3135 @REQ(open_token)
3136 obj_handle_t handle; /* handle to the thread or process */
3137 unsigned int access; /* access rights to the new token */
3138 unsigned int attributes;/* object attributes */
3139 unsigned int flags; /* flags (see below) */
3140 @REPLY
3141 obj_handle_t token; /* handle to the token */
3142 @END
3143 #define OPEN_TOKEN_THREAD 1
3144 #define OPEN_TOKEN_AS_SELF 2
3147 /* Set/get the global windows */
3148 @REQ(set_global_windows)
3149 unsigned int flags; /* flags for fields to set (see below) */
3150 user_handle_t shell_window; /* handle to the new shell window */
3151 user_handle_t shell_listview; /* handle to the new shell listview window */
3152 user_handle_t progman_window; /* handle to the new program manager window */
3153 user_handle_t taskman_window; /* handle to the new task manager window */
3154 @REPLY
3155 user_handle_t old_shell_window; /* handle to the shell window */
3156 user_handle_t old_shell_listview; /* handle to the shell listview window */
3157 user_handle_t old_progman_window; /* handle to the new program manager window */
3158 user_handle_t old_taskman_window; /* handle to the new task manager window */
3159 @END
3160 #define SET_GLOBAL_SHELL_WINDOWS 0x01 /* set both main shell and listview windows */
3161 #define SET_GLOBAL_PROGMAN_WINDOW 0x02
3162 #define SET_GLOBAL_TASKMAN_WINDOW 0x04
3164 /* Adjust the privileges held by a token */
3165 @REQ(adjust_token_privileges)
3166 obj_handle_t handle; /* handle to the token */
3167 int disable_all; /* disable all privileges? */
3168 int get_modified_state; /* get modified privileges? */
3169 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to enable/disable/remove */
3170 @REPLY
3171 unsigned int len; /* total length in bytes required to store token privileges */
3172 VARARG(privileges,LUID_AND_ATTRIBUTES); /* modified privileges */
3173 @END
3175 /* Retrieves the set of privileges held by or available to a token */
3176 @REQ(get_token_privileges)
3177 obj_handle_t handle; /* handle to the token */
3178 @REPLY
3179 unsigned int len; /* total length in bytes required to store token privileges */
3180 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
3181 @END
3183 /* Check the token has the required privileges */
3184 @REQ(check_token_privileges)
3185 obj_handle_t handle; /* handle to the token */
3186 int all_required; /* are all the privileges required for the check to succeed? */
3187 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to check */
3188 @REPLY
3189 int has_privileges; /* does the token have the required privileges? */
3190 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
3191 @END
3193 @REQ(duplicate_token)
3194 obj_handle_t handle; /* handle to the token to duplicate */
3195 unsigned int access; /* access rights to the new token */
3196 int primary; /* is the new token to be a primary one? */
3197 int impersonation_level; /* impersonation level of the new token */
3198 VARARG(objattr,object_attributes); /* object attributes */
3199 @REPLY
3200 obj_handle_t new_handle; /* duplicated handle */
3201 @END
3203 @REQ(access_check)
3204 obj_handle_t handle; /* handle to the token */
3205 unsigned int desired_access; /* desired access to the object */
3206 unsigned int mapping_read; /* mapping from generic read to specific rights */
3207 unsigned int mapping_write; /* mapping from generic write to specific rights */
3208 unsigned int mapping_execute; /* mapping from generic execute to specific rights */
3209 unsigned int mapping_all; /* mapping from generic all to specific rights */
3210 VARARG(sd,security_descriptor); /* security descriptor to check */
3211 @REPLY
3212 unsigned int access_granted; /* access rights actually granted */
3213 unsigned int access_status; /* was access granted? */
3214 unsigned int privileges_len; /* length needed to store privileges */
3215 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges used during access check */
3216 @END
3218 @REQ(get_token_sid)
3219 obj_handle_t handle; /* handle to the token */
3220 unsigned int which_sid; /* which SID to retrieve from the token */
3221 @REPLY
3222 data_size_t sid_len; /* length needed to store sid */
3223 VARARG(sid,SID); /* the sid specified by which_sid from the token */
3224 @END
3226 @REQ(get_token_groups)
3227 obj_handle_t handle; /* handle to the token */
3228 @REPLY
3229 data_size_t user_len; /* length needed to store user */
3230 VARARG(user,token_groups); /* groups the token's user belongs to */
3231 @END
3233 @REQ(get_token_default_dacl)
3234 obj_handle_t handle; /* handle to the token */
3235 @REPLY
3236 data_size_t acl_len; /* length needed to store access control list */
3237 VARARG(acl,ACL); /* access control list */
3238 @END
3240 @REQ(set_token_default_dacl)
3241 obj_handle_t handle; /* handle to the token */
3242 VARARG(acl,ACL); /* default dacl to set */
3243 @END
3245 @REQ(set_security_object)
3246 obj_handle_t handle; /* handle to the object */
3247 unsigned int security_info; /* which parts of security descriptor to set */
3248 VARARG(sd,security_descriptor); /* security descriptor to set */
3249 @END
3251 @REQ(get_security_object)
3252 obj_handle_t handle; /* handle to the object */
3253 unsigned int security_info; /* which parts of security descriptor to get */
3254 @REPLY
3255 unsigned int sd_len; /* buffer size needed for sd */
3256 VARARG(sd,security_descriptor); /* retrieved security descriptor */
3257 @END
3260 struct handle_info
3262 process_id_t owner;
3263 obj_handle_t handle;
3264 unsigned int access;
3267 /* Return a list of all opened handles */
3268 @REQ(get_system_handles)
3269 @REPLY
3270 unsigned int count; /* number of handles */
3271 VARARG(data,handle_infos); /* array of handle_infos */
3272 @END
3275 /* Create a mailslot */
3276 @REQ(create_mailslot)
3277 unsigned int access; /* wanted access rights */
3278 timeout_t read_timeout;
3279 unsigned int max_msgsize;
3280 VARARG(objattr,object_attributes); /* object attributes */
3281 @REPLY
3282 obj_handle_t handle; /* handle to the mailslot */
3283 @END
3286 /* Set mailslot information */
3287 @REQ(set_mailslot_info)
3288 obj_handle_t handle; /* handle to the mailslot */
3289 timeout_t read_timeout;
3290 unsigned int flags;
3291 @REPLY
3292 timeout_t read_timeout;
3293 unsigned int max_msgsize;
3294 @END
3295 #define MAILSLOT_SET_READ_TIMEOUT 1
3298 /* Create a directory object */
3299 @REQ(create_directory)
3300 unsigned int access; /* access flags */
3301 VARARG(objattr,object_attributes); /* object attributes */
3302 @REPLY
3303 obj_handle_t handle; /* handle to the directory */
3304 @END
3307 /* Open a directory object */
3308 @REQ(open_directory)
3309 unsigned int access; /* access flags */
3310 unsigned int attributes; /* object attributes */
3311 obj_handle_t rootdir; /* root directory */
3312 VARARG(directory_name,unicode_str); /* Directory name */
3313 @REPLY
3314 obj_handle_t handle; /* handle to the directory */
3315 @END
3318 /* Get a directory entry by index */
3319 @REQ(get_directory_entry)
3320 obj_handle_t handle; /* handle to the directory */
3321 unsigned int index; /* entry index */
3322 @REPLY
3323 data_size_t name_len; /* length of the entry name in bytes */
3324 VARARG(name,unicode_str,name_len); /* entry name */
3325 VARARG(type,unicode_str); /* entry type */
3326 @END
3329 /* Create a symbolic link object */
3330 @REQ(create_symlink)
3331 unsigned int access; /* access flags */
3332 VARARG(objattr,object_attributes); /* object attributes */
3333 VARARG(target_name,unicode_str); /* target name */
3334 @REPLY
3335 obj_handle_t handle; /* handle to the symlink */
3336 @END
3339 /* Open a symbolic link object */
3340 @REQ(open_symlink)
3341 unsigned int access; /* access flags */
3342 unsigned int attributes; /* object attributes */
3343 obj_handle_t rootdir; /* root directory */
3344 VARARG(name,unicode_str); /* symlink name */
3345 @REPLY
3346 obj_handle_t handle; /* handle to the symlink */
3347 @END
3350 /* Query a symbolic link object */
3351 @REQ(query_symlink)
3352 obj_handle_t handle; /* handle to the symlink */
3353 @REPLY
3354 data_size_t total; /* total needed size for name */
3355 VARARG(target_name,unicode_str); /* target name */
3356 @END
3359 /* Query basic object information */
3360 @REQ(get_object_info)
3361 obj_handle_t handle; /* handle to the object */
3362 @REPLY
3363 unsigned int access; /* granted access mask */
3364 unsigned int ref_count; /* object ref count */
3365 unsigned int handle_count; /* object handle count */
3366 data_size_t total; /* total needed size for name */
3367 VARARG(name,unicode_str); /* object name */
3368 @END
3371 /* Query object type name information */
3372 @REQ(get_object_type)
3373 obj_handle_t handle; /* handle to the object */
3374 @REPLY
3375 data_size_t total; /* needed size for type name */
3376 VARARG(type,unicode_str); /* type name */
3377 @END
3380 /* Query the impersonation level of an impersonation token */
3381 @REQ(get_token_impersonation_level)
3382 obj_handle_t handle; /* handle to the object */
3383 @REPLY
3384 int impersonation_level; /* impersonation level of the impersonation token */
3385 @END
3387 /* Allocate a locally-unique identifier */
3388 @REQ(allocate_locally_unique_id)
3389 @REPLY
3390 luid_t luid;
3391 @END
3394 /* Create a device manager */
3395 @REQ(create_device_manager)
3396 unsigned int access; /* wanted access rights */
3397 unsigned int attributes; /* object attributes */
3398 @REPLY
3399 obj_handle_t handle; /* handle to the device */
3400 @END
3403 /* Create a device */
3404 @REQ(create_device)
3405 obj_handle_t rootdir; /* root directory */
3406 client_ptr_t user_ptr; /* opaque ptr for use by client */
3407 obj_handle_t manager; /* device manager */
3408 VARARG(name,unicode_str); /* object name */
3409 @END
3412 /* Delete a device */
3413 @REQ(delete_device)
3414 obj_handle_t manager; /* handle to the device manager */
3415 client_ptr_t device; /* pointer to the device */
3416 @END
3419 /* Retrieve the next pending device irp request */
3420 @REQ(get_next_device_request)
3421 obj_handle_t manager; /* handle to the device manager */
3422 obj_handle_t prev; /* handle to the previous irp */
3423 unsigned int status; /* status of the previous irp */
3424 client_ptr_t user_ptr; /* user pointer of the previous irp */
3425 @REPLY
3426 irp_params_t params; /* irp parameters */
3427 obj_handle_t next; /* handle to the next irp */
3428 thread_id_t client_tid; /* tid of thread calling irp */
3429 client_ptr_t client_thread; /* pointer to thread object of calling irp */
3430 data_size_t in_size; /* total needed input size */
3431 VARARG(next_data,bytes); /* input data of the next irp */
3432 @END
3435 /* Get kernel pointer from server object */
3436 @REQ(get_kernel_object_ptr)
3437 obj_handle_t manager; /* handle to the device manager */
3438 obj_handle_t handle; /* object handle */
3439 @REPLY
3440 client_ptr_t user_ptr; /* kernel object pointer */
3441 @END
3444 /* Associate kernel pointer with server object */
3445 @REQ(set_kernel_object_ptr)
3446 obj_handle_t manager; /* handle to the device manager */
3447 obj_handle_t handle; /* object handle */
3448 client_ptr_t user_ptr; /* kernel object pointer */
3449 @END
3452 /* Grab server object reference from kernel object pointer */
3453 @REQ(grab_kernel_object)
3454 obj_handle_t manager; /* handle to the device manager */
3455 client_ptr_t user_ptr; /* kernel object pointer */
3456 @END
3459 /* Release server object reference from kernel object pointer */
3460 @REQ(release_kernel_object)
3461 obj_handle_t manager; /* handle to the device manager */
3462 client_ptr_t user_ptr; /* kernel object pointer */
3463 @END
3466 /* Get handle from kernel object pointer */
3467 @REQ(get_kernel_object_handle)
3468 obj_handle_t manager; /* handle to the device manager */
3469 client_ptr_t user_ptr; /* kernel object pointer */
3470 unsigned int access; /* wanted access rights */
3471 @REPLY
3472 obj_handle_t handle; /* kernel object handle */
3473 @END
3476 /* Make the current process a system process */
3477 @REQ(make_process_system)
3478 @REPLY
3479 obj_handle_t event; /* event signaled when all user processes have exited */
3480 @END
3483 /* Get detailed fixed-size information about a token */
3484 @REQ(get_token_statistics)
3485 obj_handle_t handle; /* handle to the object */
3486 @REPLY
3487 luid_t token_id; /* locally-unique identifier of the token */
3488 luid_t modified_id; /* locally-unique identifier of the modified version of the token */
3489 int primary; /* is the token primary or impersonation? */
3490 int impersonation_level; /* level of impersonation */
3491 int group_count; /* the number of groups the token is a member of */
3492 int privilege_count; /* the number of privileges the token has */
3493 @END
3496 /* Create I/O completion port */
3497 @REQ(create_completion)
3498 unsigned int access; /* desired access to a port */
3499 unsigned int concurrent; /* max number of concurrent active threads */
3500 VARARG(objattr,object_attributes); /* object attributes */
3501 @REPLY
3502 obj_handle_t handle; /* port handle */
3503 @END
3506 /* Open I/O completion port */
3507 @REQ(open_completion)
3508 unsigned int access; /* desired access to a port */
3509 unsigned int attributes; /* object attributes */
3510 obj_handle_t rootdir; /* root directory */
3511 VARARG(filename,unicode_str); /* port name */
3512 @REPLY
3513 obj_handle_t handle; /* port handle */
3514 @END
3517 /* add completion to completion port */
3518 @REQ(add_completion)
3519 obj_handle_t handle; /* port handle */
3520 apc_param_t ckey; /* completion key */
3521 apc_param_t cvalue; /* completion value */
3522 apc_param_t information; /* IO_STATUS_BLOCK Information */
3523 unsigned int status; /* completion result */
3524 @END
3527 /* get completion from completion port queue */
3528 @REQ(remove_completion)
3529 obj_handle_t handle; /* port handle */
3530 @REPLY
3531 apc_param_t ckey; /* completion key */
3532 apc_param_t cvalue; /* completion value */
3533 apc_param_t information; /* IO_STATUS_BLOCK Information */
3534 unsigned int status; /* completion result */
3535 @END
3538 /* get completion queue depth */
3539 @REQ(query_completion)
3540 obj_handle_t handle; /* port handle */
3541 @REPLY
3542 unsigned int depth; /* completion queue depth */
3543 @END
3546 /* associate object with completion port */
3547 @REQ(set_completion_info)
3548 obj_handle_t handle; /* object handle */
3549 apc_param_t ckey; /* completion key */
3550 obj_handle_t chandle; /* port handle */
3551 @END
3554 /* check for associated completion and push msg */
3555 @REQ(add_fd_completion)
3556 obj_handle_t handle; /* async' object */
3557 apc_param_t cvalue; /* completion value */
3558 apc_param_t information; /* IO_STATUS_BLOCK Information */
3559 unsigned int status; /* completion status */
3560 int async; /* completion is an async result */
3561 @END
3564 /* set fd completion information */
3565 @REQ(set_fd_completion_mode)
3566 obj_handle_t handle; /* handle to a file or directory */
3567 unsigned int flags; /* completion notification flags */
3568 @END
3571 /* set fd disposition information */
3572 @REQ(set_fd_disp_info)
3573 obj_handle_t handle; /* handle to a file or directory */
3574 int unlink; /* whether to unlink file on close */
3575 @END
3578 /* set fd name information */
3579 @REQ(set_fd_name_info)
3580 obj_handle_t handle; /* handle to a file or directory */
3581 obj_handle_t rootdir; /* root directory */
3582 int link; /* link instead of renaming */
3583 int replace; /* replace an existing file? */
3584 VARARG(filename,string); /* new file name */
3585 @END
3588 /* Retrieve layered info for a window */
3589 @REQ(get_window_layered_info)
3590 user_handle_t handle; /* handle to the window */
3591 @REPLY
3592 unsigned int color_key; /* color key */
3593 unsigned int alpha; /* alpha (0..255) */
3594 unsigned int flags; /* LWA_* flags */
3595 @END
3598 /* Set layered info for a window */
3599 @REQ(set_window_layered_info)
3600 user_handle_t handle; /* handle to the window */
3601 unsigned int color_key; /* color key */
3602 unsigned int alpha; /* alpha (0..255) */
3603 unsigned int flags; /* LWA_* flags */
3604 @END
3607 /* Allocate an arbitrary user handle */
3608 @REQ(alloc_user_handle)
3609 @REPLY
3610 user_handle_t handle; /* allocated handle */
3611 @END
3614 /* Free an arbitrary user handle */
3615 @REQ(free_user_handle)
3616 user_handle_t handle; /* handle to free*/
3617 @END
3620 /* Set/get the current cursor */
3621 @REQ(set_cursor)
3622 unsigned int flags; /* flags for fields to set (see below) */
3623 user_handle_t handle; /* handle to the cursor */
3624 int show_count; /* show count increment/decrement */
3625 int x; /* cursor position */
3626 int y;
3627 rectangle_t clip; /* cursor clip rectangle */
3628 unsigned int clip_msg; /* message to post on cursor clip changes */
3629 @REPLY
3630 user_handle_t prev_handle; /* previous handle */
3631 int prev_count; /* previous show count */
3632 int prev_x; /* previous position */
3633 int prev_y;
3634 int new_x; /* new position */
3635 int new_y;
3636 rectangle_t new_clip; /* new clip rectangle */
3637 unsigned int last_change; /* time of last position change */
3638 @END
3639 #define SET_CURSOR_HANDLE 0x01
3640 #define SET_CURSOR_COUNT 0x02
3641 #define SET_CURSOR_POS 0x04
3642 #define SET_CURSOR_CLIP 0x08
3643 #define SET_CURSOR_NOCLIP 0x10
3646 /* Batch read rawinput message data */
3647 @REQ(get_rawinput_buffer)
3648 data_size_t rawinput_size; /* size of RAWINPUT structure */
3649 data_size_t buffer_size; /* size of output buffer */
3650 @REPLY
3651 data_size_t next_size; /* minimum size to get next message data */
3652 unsigned int count;
3653 VARARG(data,bytes);
3654 @END
3656 /* Modify the list of registered rawinput devices */
3657 @REQ(update_rawinput_devices)
3658 VARARG(devices,rawinput_devices);
3659 @END
3662 /* Create a new job object */
3663 @REQ(create_job)
3664 unsigned int access; /* wanted access rights */
3665 VARARG(objattr,object_attributes); /* object attributes */
3666 @REPLY
3667 obj_handle_t handle; /* handle to the job */
3668 @END
3671 /* Open a job object */
3672 @REQ(open_job)
3673 unsigned int access; /* wanted access rights */
3674 unsigned int attributes; /* object attributes */
3675 obj_handle_t rootdir; /* root directory */
3676 VARARG(name,unicode_str); /* object name */
3677 @REPLY
3678 obj_handle_t handle; /* handle to the job */
3679 @END
3682 /* Assign a job object to a process */
3683 @REQ(assign_job)
3684 obj_handle_t job; /* handle to the job */
3685 obj_handle_t process; /* handle to the process */
3686 @END
3689 /* Check if a process is associated with a job */
3690 @REQ(process_in_job)
3691 obj_handle_t job; /* handle to the job */
3692 obj_handle_t process; /* handle to the process */
3693 @END
3696 /* Set limit flags on a job */
3697 @REQ(set_job_limits)
3698 obj_handle_t handle; /* handle to the job */
3699 unsigned int limit_flags; /* new limit flags */
3700 @END
3703 /* Set new completion port for a job */
3704 @REQ(set_job_completion_port)
3705 obj_handle_t job; /* handle to the job */
3706 obj_handle_t port; /* handle to the completion port */
3707 client_ptr_t key; /* key to send with completion messages */
3708 @END
3711 /* Retrieve information about a job */
3712 @REQ(get_job_info)
3713 obj_handle_t handle; /* handle to the job */
3714 @REPLY
3715 int total_processes; /* total count of processes */
3716 int active_processes; /* count of running processes */
3717 @END
3720 /* Terminate all processes associated with the job */
3721 @REQ(terminate_job)
3722 obj_handle_t handle; /* handle to the job */
3723 int status; /* process exit code */
3724 @END
3727 /* Suspend a process */
3728 @REQ(suspend_process)
3729 obj_handle_t handle; /* process handle */
3730 @END
3733 /* Resume a process */
3734 @REQ(resume_process)
3735 obj_handle_t handle; /* process handle */
3736 @END