msvcr120: Add [_]strtoimax[_l] and [_]strtoumax[_l].
[wine.git] / server / protocol.def
blob92290af701c8c5abd91c022b8ec807818b099860
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 /* appends a string to console's history */
1490 @REQ(append_console_input_history)
1491 obj_handle_t handle; /* handle to console input, or 0 for process' console */
1492 VARARG(line,unicode_str); /* line to add */
1493 @END
1496 /* appends a string to console's history */
1497 @REQ(get_console_input_history)
1498 obj_handle_t handle; /* handle to console input, or 0 for process' console */
1499 int index; /* index to get line from */
1500 @REPLY
1501 int total; /* total length of line in Unicode chars */
1502 VARARG(line,unicode_str); /* line to add */
1503 @END
1506 /* creates a new screen buffer on process' console */
1507 @REQ(create_console_output)
1508 obj_handle_t handle_in; /* handle to console input, or 0 for process' console */
1509 unsigned int access; /* wanted access rights */
1510 unsigned int attributes; /* object attributes */
1511 unsigned int share; /* sharing credentials */
1512 int fd; /* for bare consoles, fd the screen-buffer is attached to */
1513 @REPLY
1514 obj_handle_t handle_out; /* handle to the screen buffer */
1515 @END
1518 /* Retrieve the next pending console ioctl request */
1519 @REQ(get_next_console_request)
1520 obj_handle_t handle; /* console server handle */
1521 int signal; /* server signal state */
1522 int read; /* 1 if reporting result of blocked read ioctl */
1523 unsigned int status; /* status of previous ioctl */
1524 VARARG(out_data,bytes); /* out_data of previous ioctl */
1525 @REPLY
1526 unsigned int code; /* ioctl code */
1527 unsigned int output; /* output id or 0 for input */
1528 data_size_t out_size; /* ioctl output size */
1529 VARARG(in_data,bytes); /* ioctl in_data */
1530 @END
1533 /* enable directory change notifications */
1534 @REQ(read_directory_changes)
1535 unsigned int filter; /* notification filter */
1536 int subtree; /* watch the subtree? */
1537 int want_data; /* flag indicating whether change data should be collected */
1538 async_data_t async; /* async I/O parameters */
1539 @END
1542 @REQ(read_change)
1543 obj_handle_t handle;
1544 @REPLY
1545 VARARG(events,filesystem_event); /* collected filesystem events */
1546 @END
1549 /* Create a file mapping */
1550 @REQ(create_mapping)
1551 unsigned int access; /* wanted access rights */
1552 unsigned int flags; /* SEC_* flags */
1553 unsigned int file_access; /* file access rights */
1554 mem_size_t size; /* mapping size */
1555 obj_handle_t file_handle; /* file handle */
1556 VARARG(objattr,object_attributes); /* object attributes */
1557 @REPLY
1558 obj_handle_t handle; /* handle to the mapping */
1559 @END
1562 /* Open a mapping */
1563 @REQ(open_mapping)
1564 unsigned int access; /* wanted access rights */
1565 unsigned int attributes; /* object attributes */
1566 obj_handle_t rootdir; /* root directory */
1567 VARARG(name,unicode_str); /* object name */
1568 @REPLY
1569 obj_handle_t handle; /* handle to the mapping */
1570 @END
1573 /* Get information about a file mapping */
1574 @REQ(get_mapping_info)
1575 obj_handle_t handle; /* handle to the mapping */
1576 unsigned int access; /* wanted access rights */
1577 @REPLY
1578 mem_size_t size; /* mapping size */
1579 unsigned int flags; /* SEC_* flags */
1580 obj_handle_t shared_file; /* shared mapping file handle */
1581 VARARG(image,pe_image_info);/* image info for SEC_IMAGE mappings */
1582 @END
1585 /* Add a memory view in the current process */
1586 @REQ(map_view)
1587 obj_handle_t mapping; /* file mapping handle */
1588 unsigned int access; /* wanted access rights */
1589 client_ptr_t base; /* view base address (page-aligned) */
1590 mem_size_t size; /* view size */
1591 file_pos_t start; /* start offset in mapping */
1592 @END
1595 /* Unmap a memory view from the current process */
1596 @REQ(unmap_view)
1597 client_ptr_t base; /* view base address */
1598 @END
1601 /* Get a range of committed pages in a file mapping */
1602 @REQ(get_mapping_committed_range)
1603 client_ptr_t base; /* view base address */
1604 file_pos_t offset; /* starting offset (page-aligned, in bytes) */
1605 @REPLY
1606 mem_size_t size; /* size of range starting at offset (page-aligned, in bytes) */
1607 int committed; /* whether it is a committed range */
1608 @END
1611 /* Add a range to the committed pages in a file mapping */
1612 @REQ(add_mapping_committed_range)
1613 client_ptr_t base; /* view base address */
1614 file_pos_t offset; /* starting offset (page-aligned, in bytes) */
1615 mem_size_t size; /* size to set (page-aligned, in bytes) or 0 if only retrieving */
1616 @END
1619 /* Check if two memory maps are for the same file */
1620 @REQ(is_same_mapping)
1621 client_ptr_t base1; /* first view base address */
1622 client_ptr_t base2; /* second view base address */
1623 @END
1626 struct thread_info
1628 timeout_t start_time;
1629 thread_id_t tid;
1630 int base_priority;
1631 int current_priority;
1632 int unix_tid;
1635 struct process_info
1637 timeout_t start_time;
1638 data_size_t name_len;
1639 int thread_count;
1640 int priority;
1641 process_id_t pid;
1642 process_id_t parent_pid;
1643 int handle_count;
1644 int unix_pid;
1645 int __pad;
1646 /* VARARG(name,unicode_str,name_len); */
1647 /* VARARG(threads,struct thread_info,thread_count); */
1650 /* Get a list of processes and threads currently running */
1651 @REQ(list_processes)
1652 @REPLY
1653 data_size_t info_size;
1654 int process_count;
1655 VARARG(data,process_info,info_size);
1656 @END
1659 /* Wait for a debug event */
1660 @REQ(wait_debug_event)
1661 int get_handle; /* should we alloc a handle for waiting? */
1662 @REPLY
1663 process_id_t pid; /* process id */
1664 thread_id_t tid; /* thread id */
1665 obj_handle_t wait; /* wait handle if no event ready */
1666 VARARG(event,debug_event); /* debug event data */
1667 @END
1670 /* Queue an exception event */
1671 @REQ(queue_exception_event)
1672 int first; /* first chance exception? */
1673 unsigned int code; /* exception code */
1674 unsigned int flags; /* exception flags */
1675 client_ptr_t record; /* exception record */
1676 client_ptr_t address; /* exception address */
1677 data_size_t len; /* size of parameters */
1678 VARARG(params,uints64,len);/* exception parameters */
1679 @REPLY
1680 obj_handle_t handle; /* handle to the queued event */
1681 @END
1684 /* Retrieve the status of an exception event */
1685 @REQ(get_exception_status)
1686 obj_handle_t handle; /* handle to the queued event */
1687 @END
1690 /* Continue a debug event */
1691 @REQ(continue_debug_event)
1692 process_id_t pid; /* process id to continue */
1693 thread_id_t tid; /* thread id to continue */
1694 int status; /* continuation status */
1695 @END
1698 /* Start/stop debugging an existing process */
1699 @REQ(debug_process)
1700 process_id_t pid; /* id of the process to debug */
1701 int attach; /* 1=attaching / 0=detaching from the process */
1702 @END
1705 /* Set debugger kill on exit flag */
1706 @REQ(set_debugger_kill_on_exit)
1707 int kill_on_exit; /* 0=detach/1=kill debuggee when debugger dies */
1708 @END
1711 /* Read data from a process address space */
1712 @REQ(read_process_memory)
1713 obj_handle_t handle; /* process handle */
1714 client_ptr_t addr; /* addr to read from */
1715 @REPLY
1716 VARARG(data,bytes); /* result data */
1717 @END
1720 /* Write data to a process address space */
1721 @REQ(write_process_memory)
1722 obj_handle_t handle; /* process handle */
1723 client_ptr_t addr; /* addr to write to */
1724 VARARG(data,bytes); /* data to write */
1725 @END
1728 /* Create a registry key */
1729 @REQ(create_key)
1730 unsigned int access; /* desired access rights */
1731 unsigned int options; /* creation options */
1732 VARARG(objattr,object_attributes); /* object attributes */
1733 VARARG(class,unicode_str); /* class name */
1734 @REPLY
1735 obj_handle_t hkey; /* handle to the created key */
1736 int created; /* has it been newly created? */
1737 @END
1739 /* Open a registry key */
1740 @REQ(open_key)
1741 obj_handle_t parent; /* handle to the parent key */
1742 unsigned int access; /* desired access rights */
1743 unsigned int attributes; /* object attributes */
1744 VARARG(name,unicode_str); /* key name */
1745 @REPLY
1746 obj_handle_t hkey; /* handle to the open key */
1747 @END
1750 /* Delete a registry key */
1751 @REQ(delete_key)
1752 obj_handle_t hkey; /* handle to the key */
1753 @END
1756 /* Flush a registry key */
1757 @REQ(flush_key)
1758 obj_handle_t hkey; /* handle to the key */
1759 @END
1762 /* Enumerate registry subkeys */
1763 @REQ(enum_key)
1764 obj_handle_t hkey; /* handle to registry key */
1765 int index; /* index of subkey (or -1 for current key) */
1766 int info_class; /* requested information class */
1767 @REPLY
1768 int subkeys; /* number of subkeys */
1769 int max_subkey; /* longest subkey name */
1770 int max_class; /* longest class name */
1771 int values; /* number of values */
1772 int max_value; /* longest value name */
1773 int max_data; /* longest value data */
1774 timeout_t modif; /* last modification time */
1775 data_size_t total; /* total length needed for full name and class */
1776 data_size_t namelen; /* length of key name in bytes */
1777 VARARG(name,unicode_str,namelen); /* key name */
1778 VARARG(class,unicode_str); /* class name */
1779 @END
1782 /* Set a value of a registry key */
1783 @REQ(set_key_value)
1784 obj_handle_t hkey; /* handle to registry key */
1785 int type; /* value type */
1786 data_size_t namelen; /* length of value name in bytes */
1787 VARARG(name,unicode_str,namelen); /* value name */
1788 VARARG(data,bytes); /* value data */
1789 @END
1792 /* Retrieve the value of a registry key */
1793 @REQ(get_key_value)
1794 obj_handle_t hkey; /* handle to registry key */
1795 VARARG(name,unicode_str); /* value name */
1796 @REPLY
1797 int type; /* value type */
1798 data_size_t total; /* total length needed for data */
1799 VARARG(data,bytes); /* value data */
1800 @END
1803 /* Enumerate a value of a registry key */
1804 @REQ(enum_key_value)
1805 obj_handle_t hkey; /* handle to registry key */
1806 int index; /* value index */
1807 int info_class; /* requested information class */
1808 @REPLY
1809 int type; /* value type */
1810 data_size_t total; /* total length needed for full name and data */
1811 data_size_t namelen; /* length of value name in bytes */
1812 VARARG(name,unicode_str,namelen); /* value name */
1813 VARARG(data,bytes); /* value data */
1814 @END
1817 /* Delete a value of a registry key */
1818 @REQ(delete_key_value)
1819 obj_handle_t hkey; /* handle to registry key */
1820 VARARG(name,unicode_str); /* value name */
1821 @END
1824 /* Load a registry branch from a file */
1825 @REQ(load_registry)
1826 obj_handle_t file; /* file to load from */
1827 VARARG(objattr,object_attributes); /* object attributes */
1828 @END
1831 /* UnLoad a registry branch from a file */
1832 @REQ(unload_registry)
1833 obj_handle_t hkey; /* root key to unload to */
1834 @END
1837 /* Save a registry branch to a file */
1838 @REQ(save_registry)
1839 obj_handle_t hkey; /* key to save */
1840 obj_handle_t file; /* file to save to */
1841 @END
1844 /* Add a registry key change notification */
1845 @REQ(set_registry_notification)
1846 obj_handle_t hkey; /* key to watch for changes */
1847 obj_handle_t event; /* event to set */
1848 int subtree; /* should we watch the whole subtree? */
1849 unsigned int filter; /* things to watch */
1850 @END
1853 /* Create a waitable timer */
1854 @REQ(create_timer)
1855 unsigned int access; /* wanted access rights */
1856 int manual; /* manual reset */
1857 VARARG(objattr,object_attributes); /* object attributes */
1858 @REPLY
1859 obj_handle_t handle; /* handle to the timer */
1860 @END
1863 /* Open a waitable timer */
1864 @REQ(open_timer)
1865 unsigned int access; /* wanted access rights */
1866 unsigned int attributes; /* object attributes */
1867 obj_handle_t rootdir; /* root directory */
1868 VARARG(name,unicode_str); /* object name */
1869 @REPLY
1870 obj_handle_t handle; /* handle to the timer */
1871 @END
1873 /* Set a waitable timer */
1874 @REQ(set_timer)
1875 obj_handle_t handle; /* handle to the timer */
1876 timeout_t expire; /* next expiration absolute time */
1877 client_ptr_t callback; /* callback function */
1878 client_ptr_t arg; /* callback argument */
1879 int period; /* timer period in ms */
1880 @REPLY
1881 int signaled; /* was the timer signaled before this call ? */
1882 @END
1884 /* Cancel a waitable timer */
1885 @REQ(cancel_timer)
1886 obj_handle_t handle; /* handle to the timer */
1887 @REPLY
1888 int signaled; /* was the timer signaled before this calltime ? */
1889 @END
1891 /* Get information on a waitable timer */
1892 @REQ(get_timer_info)
1893 obj_handle_t handle; /* handle to the timer */
1894 @REPLY
1895 timeout_t when; /* absolute time when the timer next expires */
1896 int signaled; /* is the timer signaled? */
1897 @END
1900 /* Retrieve the current context of a thread */
1901 @REQ(get_thread_context)
1902 obj_handle_t handle; /* thread or context handle */
1903 unsigned int flags; /* context flags */
1904 @REPLY
1905 int self; /* was it a handle to the current thread? */
1906 obj_handle_t handle; /* pending context handle */
1907 VARARG(context,context); /* thread context */
1908 @END
1911 /* Set the current context of a thread */
1912 @REQ(set_thread_context)
1913 obj_handle_t handle; /* thread handle */
1914 VARARG(context,context); /* thread context */
1915 @REPLY
1916 int self; /* was it a handle to the current thread? */
1917 @END
1920 /* Fetch a selector entry for a thread */
1921 @REQ(get_selector_entry)
1922 obj_handle_t handle; /* thread handle */
1923 int entry; /* LDT entry */
1924 @REPLY
1925 unsigned int base; /* selector base */
1926 unsigned int limit; /* selector limit */
1927 unsigned char flags; /* selector flags */
1928 @END
1931 /* Add an atom */
1932 @REQ(add_atom)
1933 obj_handle_t table; /* which table to add atom to */
1934 VARARG(name,unicode_str); /* atom name */
1935 @REPLY
1936 atom_t atom; /* resulting atom */
1937 @END
1940 /* Delete an atom */
1941 @REQ(delete_atom)
1942 obj_handle_t table; /* which table to delete atom from */
1943 atom_t atom; /* atom handle */
1944 @END
1947 /* Find an atom */
1948 @REQ(find_atom)
1949 obj_handle_t table; /* which table to find atom from */
1950 VARARG(name,unicode_str); /* atom name */
1951 @REPLY
1952 atom_t atom; /* atom handle */
1953 @END
1956 /* Get information about an atom */
1957 @REQ(get_atom_information)
1958 obj_handle_t table; /* which table to find atom from */
1959 atom_t atom; /* atom handle */
1960 @REPLY
1961 int count; /* atom lock count */
1962 int pinned; /* whether the atom has been pinned */
1963 data_size_t total; /* actual length of atom name */
1964 VARARG(name,unicode_str); /* atom name */
1965 @END
1968 /* Set information about an atom */
1969 @REQ(set_atom_information)
1970 obj_handle_t table; /* which table to find atom from */
1971 atom_t atom; /* atom handle */
1972 int pinned; /* whether to bump atom information */
1973 @END
1976 /* Empty an atom table */
1977 @REQ(empty_atom_table)
1978 obj_handle_t table; /* which table to find atom from */
1979 int if_pinned; /* whether to delete pinned atoms */
1980 @END
1983 /* Init an atom table */
1984 @REQ(init_atom_table)
1985 int entries; /* number of entries (only for local) */
1986 @REPLY
1987 obj_handle_t table; /* handle to the atom table */
1988 @END
1991 /* Get the message queue of the current thread */
1992 @REQ(get_msg_queue)
1993 @REPLY
1994 obj_handle_t handle; /* handle to the queue */
1995 @END
1998 /* Set the file descriptor associated to the current thread queue */
1999 @REQ(set_queue_fd)
2000 obj_handle_t handle; /* handle to the file descriptor */
2001 @END
2004 /* Set the current message queue wakeup mask */
2005 @REQ(set_queue_mask)
2006 unsigned int wake_mask; /* wakeup bits mask */
2007 unsigned int changed_mask; /* changed bits mask */
2008 int skip_wait; /* will we skip waiting if signaled? */
2009 @REPLY
2010 unsigned int wake_bits; /* current wake bits */
2011 unsigned int changed_bits; /* current changed bits */
2012 @END
2015 /* Get the current message queue status */
2016 @REQ(get_queue_status)
2017 unsigned int clear_bits; /* should we clear the change bits? */
2018 @REPLY
2019 unsigned int wake_bits; /* wake bits */
2020 unsigned int changed_bits; /* changed bits since last time */
2021 @END
2024 /* Retrieve the process idle event */
2025 @REQ(get_process_idle_event)
2026 obj_handle_t handle; /* process handle */
2027 @REPLY
2028 obj_handle_t event; /* handle to idle event */
2029 @END
2032 /* Send a message to a thread queue */
2033 @REQ(send_message)
2034 thread_id_t id; /* thread id */
2035 int type; /* message type (see below) */
2036 int flags; /* message flags (see below) */
2037 user_handle_t win; /* window handle */
2038 unsigned int msg; /* message code */
2039 lparam_t wparam; /* parameters */
2040 lparam_t lparam; /* parameters */
2041 timeout_t timeout; /* timeout for reply */
2042 VARARG(data,message_data); /* message data for sent messages */
2043 @END
2045 @REQ(post_quit_message)
2046 int exit_code; /* exit code to return */
2047 @END
2049 enum message_type
2051 MSG_ASCII, /* Ascii message (from SendMessageA) */
2052 MSG_UNICODE, /* Unicode message (from SendMessageW) */
2053 MSG_NOTIFY, /* notify message (from SendNotifyMessageW), always Unicode */
2054 MSG_CALLBACK, /* callback message (from SendMessageCallbackW), always Unicode */
2055 MSG_CALLBACK_RESULT,/* result of a callback message */
2056 MSG_OTHER_PROCESS, /* sent from other process, may include vararg data, always Unicode */
2057 MSG_POSTED, /* posted message (from PostMessageW), always Unicode */
2058 MSG_HARDWARE, /* hardware message */
2059 MSG_WINEVENT, /* winevent message */
2060 MSG_HOOK_LL /* low-level hardware hook */
2062 #define SEND_MSG_ABORT_IF_HUNG 0x01
2065 /* Send a hardware message to a thread queue */
2066 @REQ(send_hardware_message)
2067 user_handle_t win; /* window handle */
2068 hw_input_t input; /* input data */
2069 unsigned int flags; /* flags (see below) */
2070 @REPLY
2071 int wait; /* do we need to wait for a reply? */
2072 int prev_x; /* previous cursor position */
2073 int prev_y;
2074 int new_x; /* new cursor position */
2075 int new_y;
2076 VARARG(keystate,bytes); /* global state array for all the keys */
2077 @END
2078 #define SEND_HWMSG_INJECTED 0x01
2081 /* Get a message from the current queue */
2082 @REQ(get_message)
2083 unsigned int flags; /* PM_* flags */
2084 user_handle_t get_win; /* window handle to get */
2085 unsigned int get_first; /* first message code to get */
2086 unsigned int get_last; /* last message code to get */
2087 unsigned int hw_id; /* id of the previous hardware message (or 0) */
2088 unsigned int wake_mask; /* wakeup bits mask */
2089 unsigned int changed_mask; /* changed bits mask */
2090 @REPLY
2091 user_handle_t win; /* window handle */
2092 unsigned int msg; /* message code */
2093 lparam_t wparam; /* parameters */
2094 lparam_t lparam; /* parameters */
2095 int type; /* message type */
2096 int x; /* message x position */
2097 int y; /* message y position */
2098 unsigned int time; /* message time */
2099 unsigned int active_hooks; /* active hooks bitmap */
2100 data_size_t total; /* total size of extra data */
2101 VARARG(data,message_data); /* message data for sent messages */
2102 @END
2105 /* Reply to a sent message */
2106 @REQ(reply_message)
2107 int remove; /* should we remove the message? */
2108 lparam_t result; /* message result */
2109 VARARG(data,bytes); /* message data for sent messages */
2110 @END
2113 /* Accept and remove the current hardware message */
2114 @REQ(accept_hardware_message)
2115 unsigned int hw_id; /* id of the hardware message */
2116 @END
2119 /* Retrieve the reply for the last message sent */
2120 @REQ(get_message_reply)
2121 int cancel; /* cancel message if not ready? */
2122 @REPLY
2123 lparam_t result; /* message result */
2124 VARARG(data,bytes); /* message data for sent messages */
2125 @END
2128 /* Set a window timer */
2129 @REQ(set_win_timer)
2130 user_handle_t win; /* window handle */
2131 unsigned int msg; /* message to post */
2132 unsigned int rate; /* timer rate in ms */
2133 lparam_t id; /* timer id */
2134 lparam_t lparam; /* message lparam (callback proc) */
2135 @REPLY
2136 lparam_t id; /* timer id */
2137 @END
2140 /* Kill a window timer */
2141 @REQ(kill_win_timer)
2142 user_handle_t win; /* window handle */
2143 lparam_t id; /* timer id */
2144 unsigned int msg; /* message to post */
2145 @END
2148 /* check if the thread owning the window is hung */
2149 @REQ(is_window_hung)
2150 user_handle_t win; /* window handle */
2151 @REPLY
2152 int is_hung;
2153 @END
2156 /* Retrieve info about a serial port */
2157 @REQ(get_serial_info)
2158 obj_handle_t handle; /* handle to comm port */
2159 int flags;
2160 @REPLY
2161 unsigned int eventmask;
2162 unsigned int cookie;
2163 unsigned int pending_write;
2164 @END
2167 /* Set info about a serial port */
2168 @REQ(set_serial_info)
2169 obj_handle_t handle; /* handle to comm port */
2170 int flags; /* bitmask to set values (see below) */
2171 @END
2172 #define SERIALINFO_PENDING_WRITE 0x04
2173 #define SERIALINFO_PENDING_WAIT 0x08
2176 /* Create an async I/O */
2177 @REQ(register_async)
2178 int type; /* type of queue to look after */
2179 async_data_t async; /* async I/O parameters */
2180 int count; /* count - usually # of bytes to be read/written */
2181 @END
2182 #define ASYNC_TYPE_READ 0x01
2183 #define ASYNC_TYPE_WRITE 0x02
2184 #define ASYNC_TYPE_WAIT 0x03
2187 /* Cancel all async op on a fd */
2188 @REQ(cancel_async)
2189 obj_handle_t handle; /* handle to comm port, socket or file */
2190 client_ptr_t iosb; /* I/O status block (NULL=all) */
2191 int only_thread; /* cancel matching this thread */
2192 @END
2195 /* Retrieve results of an async */
2196 @REQ(get_async_result)
2197 client_ptr_t user_arg; /* user arg used to identify async */
2198 @REPLY
2199 data_size_t size; /* result size (input or output depending on the operation) */
2200 VARARG(out_data,bytes); /* iosb output data */
2201 @END
2204 /* Perform a read on a file object */
2205 @REQ(read)
2206 async_data_t async; /* async I/O parameters */
2207 file_pos_t pos; /* read position */
2208 @REPLY
2209 obj_handle_t wait; /* handle to wait on for blocking read */
2210 unsigned int options; /* device open options */
2211 VARARG(data,bytes); /* read data */
2212 @END
2215 /* Perform a write on a file object */
2216 @REQ(write)
2217 async_data_t async; /* async I/O parameters */
2218 file_pos_t pos; /* write position */
2219 VARARG(data,bytes); /* write data */
2220 @REPLY
2221 obj_handle_t wait; /* handle to wait on for blocking write */
2222 unsigned int options; /* device open options */
2223 data_size_t size; /* size written */
2224 @END
2227 /* Perform an ioctl on a file */
2228 @REQ(ioctl)
2229 ioctl_code_t code; /* ioctl code */
2230 async_data_t async; /* async I/O parameters */
2231 VARARG(in_data,bytes); /* ioctl input data */
2232 @REPLY
2233 obj_handle_t wait; /* handle to wait on for blocking ioctl */
2234 unsigned int options; /* device open options */
2235 VARARG(out_data,bytes); /* ioctl output data */
2236 @END
2239 /* Store results of an async irp */
2240 @REQ(set_irp_result)
2241 obj_handle_t handle; /* handle to the irp */
2242 unsigned int status; /* status of the irp */
2243 data_size_t size; /* result size (input or output depending on the operation) */
2244 VARARG(data,bytes); /* output data of the irp */
2245 @END
2248 /* Create a named pipe */
2249 @REQ(create_named_pipe)
2250 unsigned int access;
2251 unsigned int options;
2252 unsigned int sharing;
2253 unsigned int maxinstances;
2254 unsigned int outsize;
2255 unsigned int insize;
2256 timeout_t timeout;
2257 unsigned int flags;
2258 VARARG(objattr,object_attributes); /* object attributes */
2259 @REPLY
2260 obj_handle_t handle; /* handle to the pipe */
2261 @END
2263 /* flags in create_named_pipe and get_named_pipe_info */
2264 #define NAMED_PIPE_MESSAGE_STREAM_WRITE 0x0001
2265 #define NAMED_PIPE_MESSAGE_STREAM_READ 0x0002
2266 #define NAMED_PIPE_NONBLOCKING_MODE 0x0004
2267 #define NAMED_PIPE_SERVER_END 0x8000
2269 /* Set named pipe information by handle */
2270 @REQ(set_named_pipe_info)
2271 obj_handle_t handle;
2272 unsigned int flags;
2273 @END
2275 /* Create a window */
2276 @REQ(create_window)
2277 user_handle_t parent; /* parent window */
2278 user_handle_t owner; /* owner window */
2279 atom_t atom; /* class atom */
2280 mod_handle_t instance; /* module instance */
2281 int dpi; /* system DPI */
2282 int awareness; /* thread DPI awareness */
2283 VARARG(class,unicode_str); /* class name */
2284 @REPLY
2285 user_handle_t handle; /* created window */
2286 user_handle_t parent; /* full handle of parent */
2287 user_handle_t owner; /* full handle of owner */
2288 int extra; /* number of extra bytes */
2289 client_ptr_t class_ptr; /* pointer to class in client address space */
2290 int dpi; /* window DPI if not per-monitor aware */
2291 int awareness; /* window DPI awareness */
2292 @END
2295 /* Destroy a window */
2296 @REQ(destroy_window)
2297 user_handle_t handle; /* handle to the window */
2298 @END
2301 /* Retrieve the desktop window for the current thread */
2302 @REQ(get_desktop_window)
2303 int force; /* force creation if it doesn't exist */
2304 @REPLY
2305 user_handle_t top_window; /* handle to the desktop window */
2306 user_handle_t msg_window; /* handle to the top-level HWND_MESSAGE parent */
2307 @END
2310 /* Set a window owner */
2311 @REQ(set_window_owner)
2312 user_handle_t handle; /* handle to the window */
2313 user_handle_t owner; /* new owner */
2314 @REPLY
2315 user_handle_t full_owner; /* full handle of new owner */
2316 user_handle_t prev_owner; /* full handle of previous owner */
2317 @END
2320 /* Get information from a window handle */
2321 @REQ(get_window_info)
2322 user_handle_t handle; /* handle to the window */
2323 @REPLY
2324 user_handle_t full_handle; /* full 32-bit handle */
2325 user_handle_t last_active; /* last active popup */
2326 process_id_t pid; /* process owning the window */
2327 thread_id_t tid; /* thread owning the window */
2328 atom_t atom; /* class atom */
2329 int is_unicode; /* ANSI or unicode */
2330 int dpi; /* window DPI */
2331 int awareness; /* DPI awareness */
2332 @END
2335 /* Set some information in a window */
2336 @REQ(set_window_info)
2337 unsigned short flags; /* flags for fields to set (see below) */
2338 short int is_unicode; /* ANSI or unicode */
2339 user_handle_t handle; /* handle to the window */
2340 unsigned int style; /* window style */
2341 unsigned int ex_style; /* window extended style */
2342 unsigned int id; /* window id */
2343 mod_handle_t instance; /* creator instance */
2344 lparam_t user_data; /* user-specific data */
2345 int extra_offset; /* offset to set in extra bytes */
2346 data_size_t extra_size; /* size to set in extra bytes */
2347 lparam_t extra_value; /* value to set in extra bytes */
2348 @REPLY
2349 unsigned int old_style; /* old window style */
2350 unsigned int old_ex_style; /* old window extended style */
2351 mod_handle_t old_instance; /* old creator instance */
2352 lparam_t old_user_data; /* old user-specific data */
2353 lparam_t old_extra_value; /* old value in extra bytes */
2354 unsigned int old_id; /* old window id */
2355 @END
2356 #define SET_WIN_STYLE 0x01
2357 #define SET_WIN_EXSTYLE 0x02
2358 #define SET_WIN_ID 0x04
2359 #define SET_WIN_INSTANCE 0x08
2360 #define SET_WIN_USERDATA 0x10
2361 #define SET_WIN_EXTRA 0x20
2362 #define SET_WIN_UNICODE 0x40
2365 /* Set the parent of a window */
2366 @REQ(set_parent)
2367 user_handle_t handle; /* handle to the window */
2368 user_handle_t parent; /* handle to the parent */
2369 @REPLY
2370 user_handle_t old_parent; /* old parent window */
2371 user_handle_t full_parent; /* full handle of new parent */
2372 int dpi; /* new window DPI if not per-monitor aware */
2373 int awareness; /* new DPI awareness */
2374 @END
2377 /* Get a list of the window parents, up to the root of the tree */
2378 @REQ(get_window_parents)
2379 user_handle_t handle; /* handle to the window */
2380 @REPLY
2381 int count; /* total count of parents */
2382 VARARG(parents,user_handles); /* parent handles */
2383 @END
2386 /* Get a list of the window children */
2387 @REQ(get_window_children)
2388 obj_handle_t desktop; /* handle to desktop */
2389 user_handle_t parent; /* parent window */
2390 atom_t atom; /* class atom for the listed children */
2391 thread_id_t tid; /* thread owning the listed children */
2392 VARARG(class,unicode_str); /* class name */
2393 @REPLY
2394 int count; /* total count of children */
2395 VARARG(children,user_handles); /* children handles */
2396 @END
2399 /* Get a list of the window children that contain a given point */
2400 @REQ(get_window_children_from_point)
2401 user_handle_t parent; /* parent window */
2402 int x; /* point in parent coordinates */
2403 int y;
2404 int dpi; /* dpi for the point coordinates */
2405 @REPLY
2406 int count; /* total count of children */
2407 VARARG(children,user_handles); /* children handles */
2408 @END
2411 /* Get window tree information from a window handle */
2412 @REQ(get_window_tree)
2413 user_handle_t handle; /* handle to the window */
2414 @REPLY
2415 user_handle_t parent; /* parent window */
2416 user_handle_t owner; /* owner window */
2417 user_handle_t next_sibling; /* next sibling in Z-order */
2418 user_handle_t prev_sibling; /* prev sibling in Z-order */
2419 user_handle_t first_sibling; /* first sibling in Z-order */
2420 user_handle_t last_sibling; /* last sibling in Z-order */
2421 user_handle_t first_child; /* first child */
2422 user_handle_t last_child; /* last child */
2423 @END
2425 /* Set the position and Z order of a window */
2426 @REQ(set_window_pos)
2427 unsigned short swp_flags; /* SWP_* flags */
2428 unsigned short paint_flags; /* paint flags (see below) */
2429 user_handle_t handle; /* handle to the window */
2430 user_handle_t previous; /* previous window in Z order */
2431 rectangle_t window; /* window rectangle (in parent coords) */
2432 rectangle_t client; /* client rectangle (in parent coords) */
2433 VARARG(valid,rectangles); /* valid rectangles from WM_NCCALCSIZE (in parent coords) */
2434 @REPLY
2435 unsigned int new_style; /* new window style */
2436 unsigned int new_ex_style; /* new window extended style */
2437 user_handle_t surface_win; /* parent window that holds the surface */
2438 int needs_update; /* whether the surface region needs an update */
2439 @END
2440 #define SET_WINPOS_PAINT_SURFACE 0x01 /* window has a paintable surface */
2441 #define SET_WINPOS_PIXEL_FORMAT 0x02 /* window has a custom pixel format */
2443 /* Get the window and client rectangles of a window */
2444 @REQ(get_window_rectangles)
2445 user_handle_t handle; /* handle to the window */
2446 int relative; /* coords relative to (see below) */
2447 int dpi; /* DPI to map to, or zero for per-monitor DPI */
2448 @REPLY
2449 rectangle_t window; /* window rectangle */
2450 rectangle_t client; /* client rectangle */
2451 @END
2452 enum coords_relative
2454 COORDS_CLIENT, /* relative to client area */
2455 COORDS_WINDOW, /* relative to whole window area */
2456 COORDS_PARENT, /* relative to parent's client area */
2457 COORDS_SCREEN /* relative to screen origin */
2461 /* Get the window text */
2462 @REQ(get_window_text)
2463 user_handle_t handle; /* handle to the window */
2464 @REPLY
2465 data_size_t length; /* total length in WCHARs */
2466 VARARG(text,unicode_str); /* window text */
2467 @END
2470 /* Set the window text */
2471 @REQ(set_window_text)
2472 user_handle_t handle; /* handle to the window */
2473 VARARG(text,unicode_str); /* window text */
2474 @END
2477 /* Get the coordinates offset between two windows */
2478 @REQ(get_windows_offset)
2479 user_handle_t from; /* handle to the first window */
2480 user_handle_t to; /* handle to the second window */
2481 int dpi; /* DPI to map to, or zero for per-monitor DPI */
2482 @REPLY
2483 int x; /* x coordinate offset */
2484 int y; /* y coordinate offset */
2485 int mirror; /* whether to mirror the x coordinate */
2486 @END
2489 /* Get the visible region of a window */
2490 @REQ(get_visible_region)
2491 user_handle_t window; /* handle to the window */
2492 unsigned int flags; /* DCX flags */
2493 @REPLY
2494 user_handle_t top_win; /* top window to clip against */
2495 rectangle_t top_rect; /* top window visible rect with screen coords */
2496 rectangle_t win_rect; /* window rect in screen coords */
2497 unsigned int paint_flags; /* paint flags (from SET_WINPOS_* flags) */
2498 data_size_t total_size; /* total size of the resulting region */
2499 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2500 @END
2503 /* Get the visible surface region of a window */
2504 @REQ(get_surface_region)
2505 user_handle_t window; /* handle to the window */
2506 @REPLY
2507 rectangle_t visible_rect; /* window visible rect in screen coords */
2508 data_size_t total_size; /* total size of the resulting region */
2509 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2510 @END
2513 /* Get the window region */
2514 @REQ(get_window_region)
2515 user_handle_t window; /* handle to the window */
2516 @REPLY
2517 data_size_t total_size; /* total size of the resulting region */
2518 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2519 @END
2522 /* Set the window region */
2523 @REQ(set_window_region)
2524 user_handle_t window; /* handle to the window */
2525 int redraw; /* redraw the window? */
2526 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2527 @END
2530 /* Get the window update region */
2531 @REQ(get_update_region)
2532 user_handle_t window; /* handle to the window */
2533 user_handle_t from_child; /* child to start searching from */
2534 unsigned int flags; /* update flags (see below) */
2535 @REPLY
2536 user_handle_t child; /* child to repaint (or window itself) */
2537 unsigned int flags; /* resulting update flags (see below) */
2538 data_size_t total_size; /* total size of the resulting region */
2539 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2540 @END
2541 #define UPDATE_NONCLIENT 0x001 /* get region for repainting non-client area */
2542 #define UPDATE_ERASE 0x002 /* get region for erasing client area */
2543 #define UPDATE_PAINT 0x004 /* get region for painting client area */
2544 #define UPDATE_INTERNALPAINT 0x008 /* get region if internal paint is pending */
2545 #define UPDATE_ALLCHILDREN 0x010 /* force repaint of all children */
2546 #define UPDATE_NOCHILDREN 0x020 /* don't try to repaint any children */
2547 #define UPDATE_NOREGION 0x040 /* don't return a region, only the flags */
2548 #define UPDATE_DELAYED_ERASE 0x080 /* still needs erase after BeginPaint */
2549 #define UPDATE_CLIPCHILDREN 0x100 /* remove clipped children from the update region */
2552 /* Update the z order of a window so that a given rectangle is fully visible */
2553 @REQ(update_window_zorder)
2554 user_handle_t window; /* handle to the window */
2555 rectangle_t rect; /* rectangle that must be visible (in client coords) */
2556 @END
2559 /* Mark parts of a window as needing a redraw */
2560 @REQ(redraw_window)
2561 user_handle_t window; /* handle to the window */
2562 unsigned int flags; /* RDW_* flags */
2563 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2564 @END
2567 /* Set a window property */
2568 @REQ(set_window_property)
2569 user_handle_t window; /* handle to the window */
2570 lparam_t data; /* data to store */
2571 atom_t atom; /* property atom (if no name specified) */
2572 VARARG(name,unicode_str); /* property name */
2573 @END
2576 /* Remove a window property */
2577 @REQ(remove_window_property)
2578 user_handle_t window; /* handle to the window */
2579 atom_t atom; /* property atom (if no name specified) */
2580 VARARG(name,unicode_str); /* property name */
2581 @REPLY
2582 lparam_t data; /* data stored in property */
2583 @END
2586 /* Get a window property */
2587 @REQ(get_window_property)
2588 user_handle_t window; /* handle to the window */
2589 atom_t atom; /* property atom (if no name specified) */
2590 VARARG(name,unicode_str); /* property name */
2591 @REPLY
2592 lparam_t data; /* data stored in property */
2593 @END
2596 /* Get the list of properties of a window */
2597 @REQ(get_window_properties)
2598 user_handle_t window; /* handle to the window */
2599 @REPLY
2600 int total; /* total number of properties */
2601 VARARG(props,properties); /* list of properties */
2602 @END
2605 /* Create a window station */
2606 @REQ(create_winstation)
2607 unsigned int flags; /* window station flags */
2608 unsigned int access; /* wanted access rights */
2609 unsigned int attributes; /* object attributes */
2610 obj_handle_t rootdir; /* root directory */
2611 VARARG(name,unicode_str); /* object name */
2612 @REPLY
2613 obj_handle_t handle; /* handle to the window station */
2614 @END
2617 /* Open a handle to a window station */
2618 @REQ(open_winstation)
2619 unsigned int access; /* wanted access rights */
2620 unsigned int attributes; /* object attributes */
2621 obj_handle_t rootdir; /* root directory */
2622 VARARG(name,unicode_str); /* object name */
2623 @REPLY
2624 obj_handle_t handle; /* handle to the window station */
2625 @END
2628 /* Close a window station */
2629 @REQ(close_winstation)
2630 obj_handle_t handle; /* handle to the window station */
2631 @END
2634 /* Get the process current window station */
2635 @REQ(get_process_winstation)
2636 @REPLY
2637 obj_handle_t handle; /* handle to the window station */
2638 @END
2641 /* Set the process current window station */
2642 @REQ(set_process_winstation)
2643 obj_handle_t handle; /* handle to the window station */
2644 @END
2647 /* Enumerate window stations */
2648 @REQ(enum_winstation)
2649 unsigned int index; /* current index */
2650 @REPLY
2651 unsigned int next; /* next index */
2652 VARARG(name,unicode_str); /* window station name */
2653 @END
2656 /* Create a desktop */
2657 @REQ(create_desktop)
2658 unsigned int flags; /* desktop flags */
2659 unsigned int access; /* wanted access rights */
2660 unsigned int attributes; /* object attributes */
2661 VARARG(name,unicode_str); /* object name */
2662 @REPLY
2663 obj_handle_t handle; /* handle to the desktop */
2664 @END
2667 /* Open a handle to a desktop */
2668 @REQ(open_desktop)
2669 obj_handle_t winsta; /* window station to open (null allowed) */
2670 unsigned int flags; /* desktop flags */
2671 unsigned int access; /* wanted access rights */
2672 unsigned int attributes; /* object attributes */
2673 VARARG(name,unicode_str); /* object name */
2674 @REPLY
2675 obj_handle_t handle; /* handle to the desktop */
2676 @END
2679 /* Open a handle to current input desktop */
2680 @REQ(open_input_desktop)
2681 unsigned int flags; /* desktop flags */
2682 unsigned int access; /* wanted access rights */
2683 unsigned int attributes; /* object attributes */
2684 @REPLY
2685 obj_handle_t handle; /* handle to the desktop */
2686 @END
2689 /* Close a desktop */
2690 @REQ(close_desktop)
2691 obj_handle_t handle; /* handle to the desktop */
2692 @END
2695 /* Get the thread current desktop */
2696 @REQ(get_thread_desktop)
2697 thread_id_t tid; /* thread id */
2698 @REPLY
2699 obj_handle_t handle; /* handle to the desktop */
2700 @END
2703 /* Set the thread current desktop */
2704 @REQ(set_thread_desktop)
2705 obj_handle_t handle; /* handle to the desktop */
2706 @END
2709 /* Enumerate desktops */
2710 @REQ(enum_desktop)
2711 obj_handle_t winstation; /* handle to the window station */
2712 unsigned int index; /* current index */
2713 @REPLY
2714 unsigned int next; /* next index */
2715 VARARG(name,unicode_str); /* window station name */
2716 @END
2719 /* Get/set information about a user object (window station or desktop) */
2720 @REQ(set_user_object_info)
2721 obj_handle_t handle; /* handle to the object */
2722 unsigned int flags; /* information to set/get */
2723 unsigned int obj_flags; /* new object flags */
2724 @REPLY
2725 int is_desktop; /* is object a desktop? */
2726 unsigned int old_obj_flags; /* old object flags */
2727 VARARG(name,unicode_str); /* object name */
2728 @END
2729 #define SET_USER_OBJECT_SET_FLAGS 1
2730 #define SET_USER_OBJECT_GET_FULL_NAME 2
2733 /* Register a hotkey */
2734 @REQ(register_hotkey)
2735 user_handle_t window; /* handle to the window */
2736 int id; /* hotkey identifier */
2737 unsigned int flags; /* modifier keys */
2738 unsigned int vkey; /* virtual key code */
2739 @REPLY
2740 int replaced; /* did we replace an existing hotkey? */
2741 unsigned int flags; /* flags of replaced hotkey */
2742 unsigned int vkey; /* virtual key code of replaced hotkey */
2743 @END
2746 /* Unregister a hotkey */
2747 @REQ(unregister_hotkey)
2748 user_handle_t window; /* handle to the window */
2749 int id; /* hotkey identifier */
2750 @REPLY
2751 unsigned int flags; /* flags of removed hotkey */
2752 unsigned int vkey; /* virtual key code of removed hotkey */
2753 @END
2756 /* Attach (or detach) thread inputs */
2757 @REQ(attach_thread_input)
2758 thread_id_t tid_from; /* thread to be attached */
2759 thread_id_t tid_to; /* thread to which tid_from should be attached */
2760 int attach; /* is it an attach? */
2761 @END
2764 /* Get input data for a given thread */
2765 @REQ(get_thread_input)
2766 thread_id_t tid; /* id of thread */
2767 @REPLY
2768 user_handle_t focus; /* handle to the focus window */
2769 user_handle_t capture; /* handle to the capture window */
2770 user_handle_t active; /* handle to the active window */
2771 user_handle_t foreground; /* handle to the global foreground window */
2772 user_handle_t menu_owner; /* handle to the menu owner */
2773 user_handle_t move_size; /* handle to the moving/resizing window */
2774 user_handle_t caret; /* handle to the caret window */
2775 user_handle_t cursor; /* handle to the cursor */
2776 int show_count; /* cursor show count */
2777 rectangle_t rect; /* caret rectangle */
2778 @END
2781 /* Get the time of the last input event */
2782 @REQ(get_last_input_time)
2783 @REPLY
2784 unsigned int time;
2785 @END
2788 /* Retrieve queue keyboard state for a given thread */
2789 @REQ(get_key_state)
2790 thread_id_t tid; /* id of thread */
2791 int key; /* optional key code or -1 */
2792 @REPLY
2793 unsigned char state; /* state of specified key */
2794 VARARG(keystate,bytes); /* state array for all the keys */
2795 @END
2797 /* Set queue keyboard state for a given thread */
2798 @REQ(set_key_state)
2799 thread_id_t tid; /* id of thread */
2800 int async; /* whether to change the async state too */
2801 VARARG(keystate,bytes); /* state array for all the keys */
2802 @END
2804 /* Set the system foreground window */
2805 @REQ(set_foreground_window)
2806 user_handle_t handle; /* handle to the foreground window */
2807 @REPLY
2808 user_handle_t previous; /* handle to the previous foreground window */
2809 int send_msg_old; /* whether we have to send a msg to the old window */
2810 int send_msg_new; /* whether we have to send a msg to the new window */
2811 @END
2813 /* Set the current thread focus window */
2814 @REQ(set_focus_window)
2815 user_handle_t handle; /* handle to the focus window */
2816 @REPLY
2817 user_handle_t previous; /* handle to the previous focus window */
2818 @END
2820 /* Set the current thread active window */
2821 @REQ(set_active_window)
2822 user_handle_t handle; /* handle to the active window */
2823 @REPLY
2824 user_handle_t previous; /* handle to the previous active window */
2825 @END
2827 /* Set the current thread capture window */
2828 @REQ(set_capture_window)
2829 user_handle_t handle; /* handle to the capture window */
2830 unsigned int flags; /* capture flags (see below) */
2831 @REPLY
2832 user_handle_t previous; /* handle to the previous capture window */
2833 user_handle_t full_handle; /* full 32-bit handle of new capture window */
2834 @END
2835 #define CAPTURE_MENU 0x01 /* capture is for a menu */
2836 #define CAPTURE_MOVESIZE 0x02 /* capture is for moving/resizing */
2839 /* Set the current thread caret window */
2840 @REQ(set_caret_window)
2841 user_handle_t handle; /* handle to the caret window */
2842 int width; /* caret width */
2843 int height; /* caret height */
2844 @REPLY
2845 user_handle_t previous; /* handle to the previous caret window */
2846 rectangle_t old_rect; /* previous caret rectangle */
2847 int old_hide; /* previous hide count */
2848 int old_state; /* previous caret state (1=on, 0=off) */
2849 @END
2852 /* Set the current thread caret information */
2853 @REQ(set_caret_info)
2854 unsigned int flags; /* caret flags (see below) */
2855 user_handle_t handle; /* handle to the caret window */
2856 int x; /* caret x position */
2857 int y; /* caret y position */
2858 int hide; /* increment for hide count (can be negative to show it) */
2859 int state; /* caret state (see below) */
2860 @REPLY
2861 user_handle_t full_handle; /* handle to the current caret window */
2862 rectangle_t old_rect; /* previous caret rectangle */
2863 int old_hide; /* previous hide count */
2864 int old_state; /* previous caret state (1=on, 0=off) */
2865 @END
2866 #define SET_CARET_POS 0x01 /* set the caret position from x,y */
2867 #define SET_CARET_HIDE 0x02 /* increment the caret hide count */
2868 #define SET_CARET_STATE 0x04 /* set the caret on/off state */
2869 enum caret_state
2871 CARET_STATE_OFF, /* off */
2872 CARET_STATE_ON, /* on */
2873 CARET_STATE_TOGGLE, /* toggle current state */
2874 CARET_STATE_ON_IF_MOVED /* on if the position differs, unchanged otherwise */
2878 /* Set a window hook */
2879 @REQ(set_hook)
2880 int id; /* id of the hook */
2881 process_id_t pid; /* id of process to set the hook into */
2882 thread_id_t tid; /* id of thread to set the hook into */
2883 int event_min;
2884 int event_max;
2885 client_ptr_t proc; /* hook procedure */
2886 int flags;
2887 int unicode; /* is it a unicode hook? */
2888 VARARG(module,unicode_str); /* module name */
2889 @REPLY
2890 user_handle_t handle; /* handle to the hook */
2891 unsigned int active_hooks; /* active hooks bitmap */
2892 @END
2895 /* Remove a window hook */
2896 @REQ(remove_hook)
2897 user_handle_t handle; /* handle to the hook */
2898 client_ptr_t proc; /* hook procedure if handle is 0 */
2899 int id; /* id of the hook if handle is 0 */
2900 @REPLY
2901 unsigned int active_hooks; /* active hooks bitmap */
2902 @END
2905 /* Start calling a hook chain */
2906 @REQ(start_hook_chain)
2907 int id; /* id of the hook */
2908 int event; /* signalled event */
2909 user_handle_t window; /* handle to the event window */
2910 int object_id; /* object id for out of context winevent */
2911 int child_id; /* child id for out of context winevent */
2912 @REPLY
2913 user_handle_t handle; /* handle to the next hook */
2914 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2915 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2916 int unicode; /* is it a unicode hook? */
2917 client_ptr_t proc; /* hook procedure */
2918 unsigned int active_hooks; /* active hooks bitmap */
2919 VARARG(module,unicode_str); /* module name */
2920 @END
2923 /* Finished calling a hook chain */
2924 @REQ(finish_hook_chain)
2925 int id; /* id of the hook */
2926 @END
2929 /* Get the hook information */
2930 @REQ(get_hook_info)
2931 user_handle_t handle; /* handle to the current hook */
2932 int get_next; /* do we want info about current or next hook? */
2933 int event; /* signalled event */
2934 user_handle_t window; /* handle to the event window */
2935 int object_id; /* object id for out of context winevent */
2936 int child_id; /* child id for out of context winevent */
2937 @REPLY
2938 user_handle_t handle; /* handle to the hook */
2939 int id; /* id of the hook */
2940 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2941 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2942 client_ptr_t proc; /* hook procedure */
2943 int unicode; /* is it a unicode hook? */
2944 VARARG(module,unicode_str); /* module name */
2945 @END
2948 /* Create a window class */
2949 @REQ(create_class)
2950 int local; /* is it a local class? */
2951 atom_t atom; /* class atom */
2952 unsigned int style; /* class style */
2953 mod_handle_t instance; /* module instance */
2954 int extra; /* number of extra class bytes */
2955 int win_extra; /* number of window extra bytes */
2956 client_ptr_t client_ptr; /* pointer to class in client address space */
2957 data_size_t name_offset; /* base class name offset for specified atom */
2958 VARARG(name,unicode_str); /* class name */
2959 @REPLY
2960 atom_t atom; /* resulting class atom */
2961 @END
2964 /* Destroy a window class */
2965 @REQ(destroy_class)
2966 atom_t atom; /* class atom */
2967 mod_handle_t instance; /* module instance */
2968 VARARG(name,unicode_str); /* class name */
2969 @REPLY
2970 client_ptr_t client_ptr; /* pointer to class in client address space */
2971 @END
2974 /* Set some information in a class */
2975 @REQ(set_class_info)
2976 user_handle_t window; /* handle to the window */
2977 unsigned int flags; /* flags for info to set (see below) */
2978 atom_t atom; /* class atom */
2979 unsigned int style; /* class style */
2980 int win_extra; /* number of window extra bytes */
2981 mod_handle_t instance; /* module instance */
2982 int extra_offset; /* offset to set in extra bytes */
2983 data_size_t extra_size; /* size to set in extra bytes */
2984 lparam_t extra_value; /* value to set in extra bytes */
2985 @REPLY
2986 atom_t old_atom; /* previous class atom */
2987 atom_t base_atom; /* base class atom */
2988 mod_handle_t old_instance; /* previous module instance */
2989 lparam_t old_extra_value; /* old value in extra bytes */
2990 unsigned int old_style; /* previous class style */
2991 int old_extra; /* previous number of class extra bytes */
2992 int old_win_extra; /* previous number of window extra bytes */
2993 @END
2994 #define SET_CLASS_ATOM 0x0001
2995 #define SET_CLASS_STYLE 0x0002
2996 #define SET_CLASS_WINEXTRA 0x0004
2997 #define SET_CLASS_INSTANCE 0x0008
2998 #define SET_CLASS_EXTRA 0x0010
3001 /* Open the clipboard */
3002 @REQ(open_clipboard)
3003 user_handle_t window; /* clipboard window */
3004 @REPLY
3005 user_handle_t owner; /* current clipboard owner */
3006 @END
3009 /* Close the clipboard */
3010 @REQ(close_clipboard)
3011 @REPLY
3012 user_handle_t viewer; /* first clipboard viewer */
3013 user_handle_t owner; /* current clipboard owner */
3014 @END
3017 /* Empty the clipboard and grab ownership */
3018 @REQ(empty_clipboard)
3019 @END
3022 /* Add a data format to the clipboard */
3023 @REQ(set_clipboard_data)
3024 unsigned int format; /* clipboard format of the data */
3025 unsigned int lcid; /* locale id to use for synthesizing text formats */
3026 VARARG(data,bytes); /* data contents */
3027 @REPLY
3028 unsigned int seqno; /* sequence number for the set data */
3029 @END
3032 /* Fetch a data format from the clipboard */
3033 @REQ(get_clipboard_data)
3034 unsigned int format; /* clipboard format of the data */
3035 int render; /* will we try to render it if missing? */
3036 int cached; /* do we already have it in the client-side cache? */
3037 unsigned int seqno; /* sequence number for the data in the cache */
3038 @REPLY
3039 unsigned int from; /* for synthesized data, format to generate it from */
3040 user_handle_t owner; /* clipboard owner for delayed-rendered formats */
3041 unsigned int seqno; /* sequence number for the originally set data */
3042 data_size_t total; /* total data size */
3043 VARARG(data,bytes); /* data contents */
3044 @END
3047 /* Retrieve a list of available formats */
3048 @REQ(get_clipboard_formats)
3049 unsigned int format; /* specific format to query, return all if 0 */
3050 @REPLY
3051 unsigned int count; /* count of available formats */
3052 VARARG(formats,uints); /* array of available formats */
3053 @END
3056 /* Retrieve the next available format */
3057 @REQ(enum_clipboard_formats)
3058 unsigned int previous; /* previous format, or first if 0 */
3059 @REPLY
3060 unsigned int format; /* next format */
3061 @END
3064 /* Release ownership of the clipboard */
3065 @REQ(release_clipboard)
3066 user_handle_t owner; /* clipboard owner to release */
3067 @REPLY
3068 user_handle_t viewer; /* first clipboard viewer */
3069 user_handle_t owner; /* current clipboard owner */
3070 @END
3073 /* Get clipboard information */
3074 @REQ(get_clipboard_info)
3075 @REPLY
3076 user_handle_t window; /* clipboard window */
3077 user_handle_t owner; /* clipboard owner */
3078 user_handle_t viewer; /* clipboard viewer */
3079 unsigned int seqno; /* current sequence number */
3080 @END
3083 /* Set the clipboard viewer window */
3084 @REQ(set_clipboard_viewer)
3085 user_handle_t viewer; /* clipboard viewer */
3086 user_handle_t previous; /* if non-zero, check that this was the previous viewer */
3087 @REPLY
3088 user_handle_t old_viewer; /* previous clipboard viewer */
3089 user_handle_t owner; /* clipboard owner */
3090 @END
3093 /* Add a clipboard listener window */
3094 @REQ(add_clipboard_listener)
3095 user_handle_t window; /* clipboard listener window */
3096 @END
3099 /* Remove a clipboard listener window */
3100 @REQ(remove_clipboard_listener)
3101 user_handle_t window; /* clipboard listener window */
3102 @END
3105 /* Open a security token */
3106 @REQ(open_token)
3107 obj_handle_t handle; /* handle to the thread or process */
3108 unsigned int access; /* access rights to the new token */
3109 unsigned int attributes;/* object attributes */
3110 unsigned int flags; /* flags (see below) */
3111 @REPLY
3112 obj_handle_t token; /* handle to the token */
3113 @END
3114 #define OPEN_TOKEN_THREAD 1
3115 #define OPEN_TOKEN_AS_SELF 2
3118 /* Set/get the global windows */
3119 @REQ(set_global_windows)
3120 unsigned int flags; /* flags for fields to set (see below) */
3121 user_handle_t shell_window; /* handle to the new shell window */
3122 user_handle_t shell_listview; /* handle to the new shell listview window */
3123 user_handle_t progman_window; /* handle to the new program manager window */
3124 user_handle_t taskman_window; /* handle to the new task manager window */
3125 @REPLY
3126 user_handle_t old_shell_window; /* handle to the shell window */
3127 user_handle_t old_shell_listview; /* handle to the shell listview window */
3128 user_handle_t old_progman_window; /* handle to the new program manager window */
3129 user_handle_t old_taskman_window; /* handle to the new task manager window */
3130 @END
3131 #define SET_GLOBAL_SHELL_WINDOWS 0x01 /* set both main shell and listview windows */
3132 #define SET_GLOBAL_PROGMAN_WINDOW 0x02
3133 #define SET_GLOBAL_TASKMAN_WINDOW 0x04
3135 /* Adjust the privileges held by a token */
3136 @REQ(adjust_token_privileges)
3137 obj_handle_t handle; /* handle to the token */
3138 int disable_all; /* disable all privileges? */
3139 int get_modified_state; /* get modified privileges? */
3140 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to enable/disable/remove */
3141 @REPLY
3142 unsigned int len; /* total length in bytes required to store token privileges */
3143 VARARG(privileges,LUID_AND_ATTRIBUTES); /* modified privileges */
3144 @END
3146 /* Retrieves the set of privileges held by or available to a token */
3147 @REQ(get_token_privileges)
3148 obj_handle_t handle; /* handle to the token */
3149 @REPLY
3150 unsigned int len; /* total length in bytes required to store token privileges */
3151 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
3152 @END
3154 /* Check the token has the required privileges */
3155 @REQ(check_token_privileges)
3156 obj_handle_t handle; /* handle to the token */
3157 int all_required; /* are all the privileges required for the check to succeed? */
3158 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to check */
3159 @REPLY
3160 int has_privileges; /* does the token have the required privileges? */
3161 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
3162 @END
3164 @REQ(duplicate_token)
3165 obj_handle_t handle; /* handle to the token to duplicate */
3166 unsigned int access; /* access rights to the new token */
3167 int primary; /* is the new token to be a primary one? */
3168 int impersonation_level; /* impersonation level of the new token */
3169 VARARG(objattr,object_attributes); /* object attributes */
3170 @REPLY
3171 obj_handle_t new_handle; /* duplicated handle */
3172 @END
3174 @REQ(access_check)
3175 obj_handle_t handle; /* handle to the token */
3176 unsigned int desired_access; /* desired access to the object */
3177 unsigned int mapping_read; /* mapping from generic read to specific rights */
3178 unsigned int mapping_write; /* mapping from generic write to specific rights */
3179 unsigned int mapping_execute; /* mapping from generic execute to specific rights */
3180 unsigned int mapping_all; /* mapping from generic all to specific rights */
3181 VARARG(sd,security_descriptor); /* security descriptor to check */
3182 @REPLY
3183 unsigned int access_granted; /* access rights actually granted */
3184 unsigned int access_status; /* was access granted? */
3185 unsigned int privileges_len; /* length needed to store privileges */
3186 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges used during access check */
3187 @END
3189 @REQ(get_token_sid)
3190 obj_handle_t handle; /* handle to the token */
3191 unsigned int which_sid; /* which SID to retrieve from the token */
3192 @REPLY
3193 data_size_t sid_len; /* length needed to store sid */
3194 VARARG(sid,SID); /* the sid specified by which_sid from the token */
3195 @END
3197 @REQ(get_token_groups)
3198 obj_handle_t handle; /* handle to the token */
3199 @REPLY
3200 data_size_t user_len; /* length needed to store user */
3201 VARARG(user,token_groups); /* groups the token's user belongs to */
3202 @END
3204 @REQ(get_token_default_dacl)
3205 obj_handle_t handle; /* handle to the token */
3206 @REPLY
3207 data_size_t acl_len; /* length needed to store access control list */
3208 VARARG(acl,ACL); /* access control list */
3209 @END
3211 @REQ(set_token_default_dacl)
3212 obj_handle_t handle; /* handle to the token */
3213 VARARG(acl,ACL); /* default dacl to set */
3214 @END
3216 @REQ(set_security_object)
3217 obj_handle_t handle; /* handle to the object */
3218 unsigned int security_info; /* which parts of security descriptor to set */
3219 VARARG(sd,security_descriptor); /* security descriptor to set */
3220 @END
3222 @REQ(get_security_object)
3223 obj_handle_t handle; /* handle to the object */
3224 unsigned int security_info; /* which parts of security descriptor to get */
3225 @REPLY
3226 unsigned int sd_len; /* buffer size needed for sd */
3227 VARARG(sd,security_descriptor); /* retrieved security descriptor */
3228 @END
3231 struct handle_info
3233 process_id_t owner;
3234 obj_handle_t handle;
3235 unsigned int access;
3238 /* Return a list of all opened handles */
3239 @REQ(get_system_handles)
3240 @REPLY
3241 unsigned int count; /* number of handles */
3242 VARARG(data,handle_infos); /* array of handle_infos */
3243 @END
3246 /* Create a mailslot */
3247 @REQ(create_mailslot)
3248 unsigned int access; /* wanted access rights */
3249 timeout_t read_timeout;
3250 unsigned int max_msgsize;
3251 VARARG(objattr,object_attributes); /* object attributes */
3252 @REPLY
3253 obj_handle_t handle; /* handle to the mailslot */
3254 @END
3257 /* Set mailslot information */
3258 @REQ(set_mailslot_info)
3259 obj_handle_t handle; /* handle to the mailslot */
3260 timeout_t read_timeout;
3261 unsigned int flags;
3262 @REPLY
3263 timeout_t read_timeout;
3264 unsigned int max_msgsize;
3265 @END
3266 #define MAILSLOT_SET_READ_TIMEOUT 1
3269 /* Create a directory object */
3270 @REQ(create_directory)
3271 unsigned int access; /* access flags */
3272 VARARG(objattr,object_attributes); /* object attributes */
3273 @REPLY
3274 obj_handle_t handle; /* handle to the directory */
3275 @END
3278 /* Open a directory object */
3279 @REQ(open_directory)
3280 unsigned int access; /* access flags */
3281 unsigned int attributes; /* object attributes */
3282 obj_handle_t rootdir; /* root directory */
3283 VARARG(directory_name,unicode_str); /* Directory name */
3284 @REPLY
3285 obj_handle_t handle; /* handle to the directory */
3286 @END
3289 /* Get a directory entry by index */
3290 @REQ(get_directory_entry)
3291 obj_handle_t handle; /* handle to the directory */
3292 unsigned int index; /* entry index */
3293 @REPLY
3294 data_size_t name_len; /* length of the entry name in bytes */
3295 VARARG(name,unicode_str,name_len); /* entry name */
3296 VARARG(type,unicode_str); /* entry type */
3297 @END
3300 /* Create a symbolic link object */
3301 @REQ(create_symlink)
3302 unsigned int access; /* access flags */
3303 VARARG(objattr,object_attributes); /* object attributes */
3304 VARARG(target_name,unicode_str); /* target name */
3305 @REPLY
3306 obj_handle_t handle; /* handle to the symlink */
3307 @END
3310 /* Open a symbolic link object */
3311 @REQ(open_symlink)
3312 unsigned int access; /* access flags */
3313 unsigned int attributes; /* object attributes */
3314 obj_handle_t rootdir; /* root directory */
3315 VARARG(name,unicode_str); /* symlink name */
3316 @REPLY
3317 obj_handle_t handle; /* handle to the symlink */
3318 @END
3321 /* Query a symbolic link object */
3322 @REQ(query_symlink)
3323 obj_handle_t handle; /* handle to the symlink */
3324 @REPLY
3325 data_size_t total; /* total needed size for name */
3326 VARARG(target_name,unicode_str); /* target name */
3327 @END
3330 /* Query basic object information */
3331 @REQ(get_object_info)
3332 obj_handle_t handle; /* handle to the object */
3333 @REPLY
3334 unsigned int access; /* granted access mask */
3335 unsigned int ref_count; /* object ref count */
3336 unsigned int handle_count; /* object handle count */
3337 data_size_t total; /* total needed size for name */
3338 VARARG(name,unicode_str); /* object name */
3339 @END
3342 /* Query object type name information */
3343 @REQ(get_object_type)
3344 obj_handle_t handle; /* handle to the object */
3345 @REPLY
3346 data_size_t total; /* needed size for type name */
3347 VARARG(type,unicode_str); /* type name */
3348 @END
3351 /* Query the impersonation level of an impersonation token */
3352 @REQ(get_token_impersonation_level)
3353 obj_handle_t handle; /* handle to the object */
3354 @REPLY
3355 int impersonation_level; /* impersonation level of the impersonation token */
3356 @END
3358 /* Allocate a locally-unique identifier */
3359 @REQ(allocate_locally_unique_id)
3360 @REPLY
3361 luid_t luid;
3362 @END
3365 /* Create a device manager */
3366 @REQ(create_device_manager)
3367 unsigned int access; /* wanted access rights */
3368 unsigned int attributes; /* object attributes */
3369 @REPLY
3370 obj_handle_t handle; /* handle to the device */
3371 @END
3374 /* Create a device */
3375 @REQ(create_device)
3376 obj_handle_t rootdir; /* root directory */
3377 client_ptr_t user_ptr; /* opaque ptr for use by client */
3378 obj_handle_t manager; /* device manager */
3379 VARARG(name,unicode_str); /* object name */
3380 @END
3383 /* Delete a device */
3384 @REQ(delete_device)
3385 obj_handle_t manager; /* handle to the device manager */
3386 client_ptr_t device; /* pointer to the device */
3387 @END
3390 /* Retrieve the next pending device irp request */
3391 @REQ(get_next_device_request)
3392 obj_handle_t manager; /* handle to the device manager */
3393 obj_handle_t prev; /* handle to the previous irp */
3394 unsigned int status; /* status of the previous irp */
3395 client_ptr_t user_ptr; /* user pointer of the previous irp */
3396 @REPLY
3397 irp_params_t params; /* irp parameters */
3398 obj_handle_t next; /* handle to the next irp */
3399 thread_id_t client_tid; /* tid of thread calling irp */
3400 client_ptr_t client_thread; /* pointer to thread object of calling irp */
3401 data_size_t in_size; /* total needed input size */
3402 VARARG(next_data,bytes); /* input data of the next irp */
3403 @END
3406 /* Get kernel pointer from server object */
3407 @REQ(get_kernel_object_ptr)
3408 obj_handle_t manager; /* handle to the device manager */
3409 obj_handle_t handle; /* object handle */
3410 @REPLY
3411 client_ptr_t user_ptr; /* kernel object pointer */
3412 @END
3415 /* Associate kernel pointer with server object */
3416 @REQ(set_kernel_object_ptr)
3417 obj_handle_t manager; /* handle to the device manager */
3418 obj_handle_t handle; /* object handle */
3419 client_ptr_t user_ptr; /* kernel object pointer */
3420 @END
3423 /* Grab server object reference from kernel object pointer */
3424 @REQ(grab_kernel_object)
3425 obj_handle_t manager; /* handle to the device manager */
3426 client_ptr_t user_ptr; /* kernel object pointer */
3427 @END
3430 /* Release server object reference from kernel object pointer */
3431 @REQ(release_kernel_object)
3432 obj_handle_t manager; /* handle to the device manager */
3433 client_ptr_t user_ptr; /* kernel object pointer */
3434 @END
3437 /* Get handle from kernel object pointer */
3438 @REQ(get_kernel_object_handle)
3439 obj_handle_t manager; /* handle to the device manager */
3440 client_ptr_t user_ptr; /* kernel object pointer */
3441 unsigned int access; /* wanted access rights */
3442 @REPLY
3443 obj_handle_t handle; /* kernel object handle */
3444 @END
3447 /* Make the current process a system process */
3448 @REQ(make_process_system)
3449 @REPLY
3450 obj_handle_t event; /* event signaled when all user processes have exited */
3451 @END
3454 /* Get detailed fixed-size information about a token */
3455 @REQ(get_token_statistics)
3456 obj_handle_t handle; /* handle to the object */
3457 @REPLY
3458 luid_t token_id; /* locally-unique identifier of the token */
3459 luid_t modified_id; /* locally-unique identifier of the modified version of the token */
3460 int primary; /* is the token primary or impersonation? */
3461 int impersonation_level; /* level of impersonation */
3462 int group_count; /* the number of groups the token is a member of */
3463 int privilege_count; /* the number of privileges the token has */
3464 @END
3467 /* Create I/O completion port */
3468 @REQ(create_completion)
3469 unsigned int access; /* desired access to a port */
3470 unsigned int concurrent; /* max number of concurrent active threads */
3471 VARARG(objattr,object_attributes); /* object attributes */
3472 @REPLY
3473 obj_handle_t handle; /* port handle */
3474 @END
3477 /* Open I/O completion port */
3478 @REQ(open_completion)
3479 unsigned int access; /* desired access to a port */
3480 unsigned int attributes; /* object attributes */
3481 obj_handle_t rootdir; /* root directory */
3482 VARARG(filename,unicode_str); /* port name */
3483 @REPLY
3484 obj_handle_t handle; /* port handle */
3485 @END
3488 /* add completion to completion port */
3489 @REQ(add_completion)
3490 obj_handle_t handle; /* port handle */
3491 apc_param_t ckey; /* completion key */
3492 apc_param_t cvalue; /* completion value */
3493 apc_param_t information; /* IO_STATUS_BLOCK Information */
3494 unsigned int status; /* completion result */
3495 @END
3498 /* get completion from completion port queue */
3499 @REQ(remove_completion)
3500 obj_handle_t handle; /* port handle */
3501 @REPLY
3502 apc_param_t ckey; /* completion key */
3503 apc_param_t cvalue; /* completion value */
3504 apc_param_t information; /* IO_STATUS_BLOCK Information */
3505 unsigned int status; /* completion result */
3506 @END
3509 /* get completion queue depth */
3510 @REQ(query_completion)
3511 obj_handle_t handle; /* port handle */
3512 @REPLY
3513 unsigned int depth; /* completion queue depth */
3514 @END
3517 /* associate object with completion port */
3518 @REQ(set_completion_info)
3519 obj_handle_t handle; /* object handle */
3520 apc_param_t ckey; /* completion key */
3521 obj_handle_t chandle; /* port handle */
3522 @END
3525 /* check for associated completion and push msg */
3526 @REQ(add_fd_completion)
3527 obj_handle_t handle; /* async' object */
3528 apc_param_t cvalue; /* completion value */
3529 apc_param_t information; /* IO_STATUS_BLOCK Information */
3530 unsigned int status; /* completion status */
3531 int async; /* completion is an async result */
3532 @END
3535 /* set fd completion information */
3536 @REQ(set_fd_completion_mode)
3537 obj_handle_t handle; /* handle to a file or directory */
3538 unsigned int flags; /* completion notification flags */
3539 @END
3542 /* set fd disposition information */
3543 @REQ(set_fd_disp_info)
3544 obj_handle_t handle; /* handle to a file or directory */
3545 int unlink; /* whether to unlink file on close */
3546 @END
3549 /* set fd name information */
3550 @REQ(set_fd_name_info)
3551 obj_handle_t handle; /* handle to a file or directory */
3552 obj_handle_t rootdir; /* root directory */
3553 int link; /* link instead of renaming */
3554 int replace; /* replace an existing file? */
3555 VARARG(filename,string); /* new file name */
3556 @END
3559 /* Retrieve layered info for a window */
3560 @REQ(get_window_layered_info)
3561 user_handle_t handle; /* handle to the window */
3562 @REPLY
3563 unsigned int color_key; /* color key */
3564 unsigned int alpha; /* alpha (0..255) */
3565 unsigned int flags; /* LWA_* flags */
3566 @END
3569 /* Set layered info for a window */
3570 @REQ(set_window_layered_info)
3571 user_handle_t handle; /* handle to the window */
3572 unsigned int color_key; /* color key */
3573 unsigned int alpha; /* alpha (0..255) */
3574 unsigned int flags; /* LWA_* flags */
3575 @END
3578 /* Allocate an arbitrary user handle */
3579 @REQ(alloc_user_handle)
3580 @REPLY
3581 user_handle_t handle; /* allocated handle */
3582 @END
3585 /* Free an arbitrary user handle */
3586 @REQ(free_user_handle)
3587 user_handle_t handle; /* handle to free*/
3588 @END
3591 /* Set/get the current cursor */
3592 @REQ(set_cursor)
3593 unsigned int flags; /* flags for fields to set (see below) */
3594 user_handle_t handle; /* handle to the cursor */
3595 int show_count; /* show count increment/decrement */
3596 int x; /* cursor position */
3597 int y;
3598 rectangle_t clip; /* cursor clip rectangle */
3599 unsigned int clip_msg; /* message to post on cursor clip changes */
3600 @REPLY
3601 user_handle_t prev_handle; /* previous handle */
3602 int prev_count; /* previous show count */
3603 int prev_x; /* previous position */
3604 int prev_y;
3605 int new_x; /* new position */
3606 int new_y;
3607 rectangle_t new_clip; /* new clip rectangle */
3608 unsigned int last_change; /* time of last position change */
3609 @END
3610 #define SET_CURSOR_HANDLE 0x01
3611 #define SET_CURSOR_COUNT 0x02
3612 #define SET_CURSOR_POS 0x04
3613 #define SET_CURSOR_CLIP 0x08
3614 #define SET_CURSOR_NOCLIP 0x10
3617 /* Batch read rawinput message data */
3618 @REQ(get_rawinput_buffer)
3619 data_size_t rawinput_size; /* size of RAWINPUT structure */
3620 data_size_t buffer_size; /* size of output buffer */
3621 @REPLY
3622 data_size_t next_size; /* minimum size to get next message data */
3623 unsigned int count;
3624 VARARG(data,bytes);
3625 @END
3627 /* Modify the list of registered rawinput devices */
3628 @REQ(update_rawinput_devices)
3629 VARARG(devices,rawinput_devices);
3630 @END
3632 /* Retrieve the list of registered rawinput devices */
3633 @REQ(get_rawinput_devices)
3634 @REPLY
3635 unsigned int device_count;
3636 VARARG(devices,rawinput_devices);
3637 @END
3639 /* Create a new job object */
3640 @REQ(create_job)
3641 unsigned int access; /* wanted access rights */
3642 VARARG(objattr,object_attributes); /* object attributes */
3643 @REPLY
3644 obj_handle_t handle; /* handle to the job */
3645 @END
3648 /* Open a job object */
3649 @REQ(open_job)
3650 unsigned int access; /* wanted access rights */
3651 unsigned int attributes; /* object attributes */
3652 obj_handle_t rootdir; /* root directory */
3653 VARARG(name,unicode_str); /* object name */
3654 @REPLY
3655 obj_handle_t handle; /* handle to the job */
3656 @END
3659 /* Assign a job object to a process */
3660 @REQ(assign_job)
3661 obj_handle_t job; /* handle to the job */
3662 obj_handle_t process; /* handle to the process */
3663 @END
3666 /* Check if a process is associated with a job */
3667 @REQ(process_in_job)
3668 obj_handle_t job; /* handle to the job */
3669 obj_handle_t process; /* handle to the process */
3670 @END
3673 /* Set limit flags on a job */
3674 @REQ(set_job_limits)
3675 obj_handle_t handle; /* handle to the job */
3676 unsigned int limit_flags; /* new limit flags */
3677 @END
3680 /* Set new completion port for a job */
3681 @REQ(set_job_completion_port)
3682 obj_handle_t job; /* handle to the job */
3683 obj_handle_t port; /* handle to the completion port */
3684 client_ptr_t key; /* key to send with completion messages */
3685 @END
3688 /* Retrieve information about a job */
3689 @REQ(get_job_info)
3690 obj_handle_t handle; /* handle to the job */
3691 @REPLY
3692 int total_processes; /* total count of processes */
3693 int active_processes; /* count of running processes */
3694 @END
3697 /* Terminate all processes associated with the job */
3698 @REQ(terminate_job)
3699 obj_handle_t handle; /* handle to the job */
3700 int status; /* process exit code */
3701 @END
3704 /* Suspend a process */
3705 @REQ(suspend_process)
3706 obj_handle_t handle; /* process handle */
3707 @END
3710 /* Resume a process */
3711 @REQ(resume_process)
3712 obj_handle_t handle; /* process handle */
3713 @END