wtsapi32: Implement WTSEnumerateProcessesW().
[wine.git] / server / protocol.def
blobf0a9107cfbe096f0e1a2fb7cb8b7f8131896fa25
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; /* DbgExceptionStateChange */
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; /* DbgCreateThreadStateChange */
92 obj_handle_t handle; /* handle to the new thread */
93 client_ptr_t start; /* thread startup routine */
94 } create_thread;
95 struct
97 int code; /* DbgCreateProcessStateChange */
98 obj_handle_t file; /* handle to the process exe file */
99 obj_handle_t process; /* handle to the new process */
100 obj_handle_t thread; /* handle to the new thread */
101 mod_handle_t base; /* base of executable image */
102 int dbg_offset; /* offset of debug info in file */
103 int dbg_size; /* size of debug info */
104 client_ptr_t start; /* thread startup routine */
105 } create_process;
106 struct
108 int code; /* DbgExitThreadStateChange/DbgExitProcessStateChange */
109 int exit_code; /* thread or process exit code */
110 } exit;
111 struct
113 int code; /* DbgLoadDllStateChange */
114 obj_handle_t handle; /* file handle for the dll */
115 mod_handle_t base; /* base address of the dll */
116 int dbg_offset; /* offset of debug info in file */
117 int dbg_size; /* size of debug info */
118 client_ptr_t name; /* image name (optional) */
119 } load_dll;
120 struct
122 int code; /* DbgUnloadDllStateChange */
123 int __pad;
124 mod_handle_t base; /* base address of the dll */
125 } unload_dll;
126 } debug_event_t;
128 /* context data */
129 typedef struct
131 unsigned int machine; /* machine type */
132 unsigned int flags; /* SERVER_CTX_* flags */
133 union
135 struct { unsigned int eip, ebp, esp, eflags, cs, ss; } i386_regs;
136 struct { unsigned __int64 rip, rbp, rsp;
137 unsigned int cs, ss, flags, __pad; } x86_64_regs;
138 struct { unsigned int sp, lr, pc, cpsr; } arm_regs;
139 struct { unsigned __int64 sp, pc, pstate; } arm64_regs;
140 } ctl; /* selected by SERVER_CTX_CONTROL */
141 union
143 struct { unsigned int eax, ebx, ecx, edx, esi, edi; } i386_regs;
144 struct { unsigned __int64 rax,rbx, rcx, rdx, rsi, rdi,
145 r8, r9, r10, r11, r12, r13, r14, r15; } x86_64_regs;
146 struct { unsigned int r[13]; } arm_regs;
147 struct { unsigned __int64 x[31]; } arm64_regs;
148 } integer; /* selected by SERVER_CTX_INTEGER */
149 union
151 struct { unsigned int ds, es, fs, gs; } i386_regs;
152 struct { unsigned int ds, es, fs, gs; } x86_64_regs;
153 } seg; /* selected by SERVER_CTX_SEGMENTS */
154 union
156 struct { unsigned int ctrl, status, tag, err_off, err_sel, data_off, data_sel, cr0npx;
157 unsigned char regs[80]; } i386_regs;
158 struct { struct { unsigned __int64 low, high; } fpregs[32]; } x86_64_regs;
159 struct { unsigned __int64 d[32]; unsigned int fpscr; } arm_regs;
160 struct { struct { unsigned __int64 low, high; } q[32]; unsigned int fpcr, fpsr; } arm64_regs;
161 } fp; /* selected by SERVER_CTX_FLOATING_POINT */
162 union
164 struct { unsigned int dr0, dr1, dr2, dr3, dr6, dr7; } i386_regs;
165 struct { unsigned __int64 dr0, dr1, dr2, dr3, dr6, dr7; } x86_64_regs;
166 struct { unsigned int bvr[8], bcr[8], wvr[1], wcr[1]; } arm_regs;
167 struct { unsigned __int64 bvr[8], wvr[2]; unsigned int bcr[8], wcr[2]; } arm64_regs;
168 } debug; /* selected by SERVER_CTX_DEBUG_REGISTERS */
169 union
171 unsigned char i386_regs[512];
172 } ext; /* selected by SERVER_CTX_EXTENDED_REGISTERS */
173 union
175 struct { struct { unsigned __int64 low, high; } ymm_high[16]; } ymm_high_regs;
176 } ymm; /* selected by SERVER_CTX_YMM_REGISTERS */
177 } context_t;
179 #define SERVER_CTX_CONTROL 0x01
180 #define SERVER_CTX_INTEGER 0x02
181 #define SERVER_CTX_SEGMENTS 0x04
182 #define SERVER_CTX_FLOATING_POINT 0x08
183 #define SERVER_CTX_DEBUG_REGISTERS 0x10
184 #define SERVER_CTX_EXTENDED_REGISTERS 0x20
185 #define SERVER_CTX_YMM_REGISTERS 0x40
187 /* structure used in sending an fd from client to server */
188 struct send_fd
190 thread_id_t tid; /* thread id */
191 int fd; /* file descriptor on client-side */
194 /* structure sent by the server on the wait fifo */
195 struct wake_up_reply
197 client_ptr_t cookie; /* magic cookie that was passed in select_request */
198 int signaled; /* wait result */
199 int __pad;
202 /* NT-style timeout, in 100ns units, negative means relative timeout */
203 typedef __int64 timeout_t;
204 #define TIMEOUT_INFINITE (((timeout_t)0x7fffffff) << 32 | 0xffffffff)
206 /* absolute timeout, negative means that monotonic clock is used */
207 typedef __int64 abstime_t;
209 /* structure for process startup info */
210 typedef struct
212 unsigned int debug_flags;
213 unsigned int console_flags;
214 obj_handle_t console;
215 obj_handle_t hstdin;
216 obj_handle_t hstdout;
217 obj_handle_t hstderr;
218 unsigned int x;
219 unsigned int y;
220 unsigned int xsize;
221 unsigned int ysize;
222 unsigned int xchars;
223 unsigned int ychars;
224 unsigned int attribute;
225 unsigned int flags;
226 unsigned int show;
227 data_size_t curdir_len;
228 data_size_t dllpath_len;
229 data_size_t imagepath_len;
230 data_size_t cmdline_len;
231 data_size_t title_len;
232 data_size_t desktop_len;
233 data_size_t shellinfo_len;
234 data_size_t runtime_len;
235 /* VARARG(curdir,unicode_str,curdir_len); */
236 /* VARARG(dllpath,unicode_str,dllpath_len); */
237 /* VARARG(imagepath,unicode_str,imagepath_len); */
238 /* VARARG(cmdline,unicode_str,cmdline_len); */
239 /* VARARG(title,unicode_str,title_len); */
240 /* VARARG(desktop,unicode_str,desktop_len); */
241 /* VARARG(shellinfo,unicode_str,shellinfo_len); */
242 /* VARARG(runtime,unicode_str,runtime_len); */
243 } startup_info_t;
245 /* structure returned in the list of window properties */
246 typedef struct
248 atom_t atom; /* property atom */
249 int string; /* was atom a string originally? */
250 lparam_t data; /* data stored in property */
251 } property_data_t;
253 /* structure to specify window rectangles */
254 typedef struct
256 int left;
257 int top;
258 int right;
259 int bottom;
260 } rectangle_t;
262 /* structure for parameters of async I/O calls */
263 typedef struct
265 obj_handle_t handle; /* object to perform I/O on */
266 obj_handle_t event; /* event to signal when done */
267 client_ptr_t iosb; /* I/O status block in client addr space */
268 client_ptr_t user; /* opaque user data containing callback pointer and async-specific data */
269 client_ptr_t apc; /* user APC to call */
270 apc_param_t apc_context; /* user APC context or completion value */
271 } async_data_t;
273 /* structures for extra message data */
275 struct hw_msg_source
277 unsigned int device; /* source device (IMDT_* values) */
278 unsigned int origin; /* source origin (IMO_* values) */
281 union rawinput
283 int type;
284 struct
286 int type; /* RIM_TYPEKEYBOARD */
287 unsigned int message; /* message generated by this rawinput event */
288 unsigned short vkey; /* virtual key code */
289 unsigned short scan; /* scan code */
290 } kbd;
291 struct
293 int type; /* RIM_TYPEMOUSE */
294 int x; /* x coordinate */
295 int y; /* y coordinate */
296 unsigned int data; /* mouse data */
297 } mouse;
298 struct
300 int type; /* RIM_TYPEHID */
301 unsigned int device; /* rawinput device index */
302 unsigned int param; /* rawinput message param */
303 unsigned short usage_page;/* HID usage page */
304 unsigned short usage; /* HID usage */
305 } hid;
308 struct hardware_msg_data
310 lparam_t info; /* extra info */
311 unsigned int hw_id; /* unique id */
312 unsigned int flags; /* hook flags */
313 struct hw_msg_source source; /* message source */
314 union rawinput rawinput; /* rawinput message data */
317 struct callback_msg_data
319 client_ptr_t callback; /* callback function */
320 lparam_t data; /* user data for callback */
321 lparam_t result; /* message result */
324 struct winevent_msg_data
326 user_handle_t hook; /* hook handle */
327 thread_id_t tid; /* thread id */
328 client_ptr_t hook_proc; /* hook proc address */
329 /* followed by module name if any */
332 typedef union
334 int type;
335 struct
337 int type; /* INPUT_KEYBOARD */
338 unsigned short vkey; /* virtual key code */
339 unsigned short scan; /* scan code */
340 unsigned int flags; /* event flags */
341 unsigned int time; /* event time */
342 lparam_t info; /* extra info */
343 } kbd;
344 struct
346 int type; /* INPUT_MOUSE */
347 int x; /* coordinates */
348 int y;
349 unsigned int data; /* mouse data */
350 unsigned int flags; /* event flags */
351 unsigned int time; /* event time */
352 lparam_t info; /* extra info */
353 } mouse;
354 struct
356 int type; /* INPUT_HARDWARE */
357 unsigned int msg; /* message code */
358 lparam_t lparam; /* message param */
359 union rawinput rawinput;/* rawinput message data */
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 typedef struct
387 unsigned int read;
388 unsigned int write;
389 unsigned int exec;
390 unsigned int all;
391 } generic_map_t;
393 #define MAX_ACL_LEN 65535
395 struct security_descriptor
397 unsigned int control; /* SE_ flags */
398 data_size_t owner_len;
399 data_size_t group_len;
400 data_size_t sacl_len;
401 data_size_t dacl_len;
402 /* VARARG(owner,SID); */
403 /* VARARG(group,SID); */
404 /* VARARG(sacl,ACL); */
405 /* VARARG(dacl,ACL); */
408 struct object_attributes
410 obj_handle_t rootdir; /* root directory */
411 unsigned int attributes; /* object attributes */
412 data_size_t sd_len; /* length of security_descriptor data. may be 0 */
413 data_size_t name_len; /* length of the name string. may be 0 */
414 /* VARARG(sd,security_descriptor); */
415 /* VARARG(name,unicode_str); */
418 struct object_type_info
420 data_size_t name_len; /* length of the name string */
421 unsigned int index; /* type index in global table */
422 unsigned int obj_count; /* count of objects of this type */
423 unsigned int handle_count; /* count of handles of this type */
424 unsigned int obj_max; /* max count of objects of this type */
425 unsigned int handle_max; /* max count of handles of this type */
426 unsigned int valid_access; /* mask for valid access bits */
427 generic_map_t mapping; /* generic access mappings */
428 /* VARARG(name,unicode_str); */
431 struct token_groups
433 unsigned int count;
434 /* unsigned int attributes[count]; */
435 /* VARARG(sids,SID); */
438 enum select_op
440 SELECT_NONE,
441 SELECT_WAIT,
442 SELECT_WAIT_ALL,
443 SELECT_SIGNAL_AND_WAIT,
444 SELECT_KEYED_EVENT_WAIT,
445 SELECT_KEYED_EVENT_RELEASE
448 typedef union
450 enum select_op op;
451 struct
453 enum select_op op; /* SELECT_WAIT or SELECT_WAIT_ALL */
454 obj_handle_t handles[MAXIMUM_WAIT_OBJECTS];
455 } wait;
456 struct
458 enum select_op op; /* SELECT_SIGNAL_AND_WAIT */
459 obj_handle_t wait;
460 obj_handle_t signal; /* must be last in the structure so we can remove it on retries */
461 } signal_and_wait;
462 struct
464 enum select_op op; /* SELECT_KEYED_EVENT_WAIT or SELECT_KEYED_EVENT_RELEASE */
465 obj_handle_t handle;
466 client_ptr_t key;
467 } keyed_event;
468 } select_op_t;
470 enum apc_type
472 APC_NONE,
473 APC_USER,
474 APC_ASYNC_IO,
475 APC_VIRTUAL_ALLOC,
476 APC_VIRTUAL_FREE,
477 APC_VIRTUAL_QUERY,
478 APC_VIRTUAL_PROTECT,
479 APC_VIRTUAL_FLUSH,
480 APC_VIRTUAL_LOCK,
481 APC_VIRTUAL_UNLOCK,
482 APC_MAP_VIEW,
483 APC_UNMAP_VIEW,
484 APC_CREATE_THREAD,
485 APC_DUP_HANDLE,
486 APC_BREAK_PROCESS
489 typedef struct
491 enum apc_type type; /* APC_USER */
492 int __pad;
493 client_ptr_t func; /* void (__stdcall *func)(ULONG_PTR,ULONG_PTR,ULONG_PTR); */
494 apc_param_t args[3]; /* arguments for user function */
495 } user_apc_t;
497 typedef union
499 enum apc_type type;
500 user_apc_t user;
501 struct
503 enum apc_type type; /* APC_ASYNC_IO */
504 unsigned int status; /* I/O status */
505 client_ptr_t user; /* user pointer */
506 client_ptr_t sb; /* status block */
507 } async_io;
508 struct
510 enum apc_type type; /* APC_VIRTUAL_ALLOC */
511 unsigned int op_type; /* type of operation */
512 client_ptr_t addr; /* requested address */
513 mem_size_t size; /* allocation size */
514 mem_size_t zero_bits; /* number of zero high bits */
515 unsigned int prot; /* memory protection flags */
516 } virtual_alloc;
517 struct
519 enum apc_type type; /* APC_VIRTUAL_FREE */
520 unsigned int op_type; /* type of operation */
521 client_ptr_t addr; /* requested address */
522 mem_size_t size; /* allocation size */
523 } virtual_free;
524 struct
526 enum apc_type type; /* APC_VIRTUAL_QUERY */
527 int __pad;
528 client_ptr_t addr; /* requested address */
529 } virtual_query;
530 struct
532 enum apc_type type; /* APC_VIRTUAL_PROTECT */
533 unsigned int prot; /* new protection flags */
534 client_ptr_t addr; /* requested address */
535 mem_size_t size; /* requested size */
536 } virtual_protect;
537 struct
539 enum apc_type type; /* APC_VIRTUAL_FLUSH */
540 int __pad;
541 client_ptr_t addr; /* requested address */
542 mem_size_t size; /* requested size */
543 } virtual_flush;
544 struct
546 enum apc_type type; /* APC_VIRTUAL_LOCK */
547 int __pad;
548 client_ptr_t addr; /* requested address */
549 mem_size_t size; /* requested size */
550 } virtual_lock;
551 struct
553 enum apc_type type; /* APC_VIRTUAL_UNLOCK */
554 int __pad;
555 client_ptr_t addr; /* requested address */
556 mem_size_t size; /* requested size */
557 } virtual_unlock;
558 struct
560 enum apc_type type; /* APC_MAP_VIEW */
561 obj_handle_t handle; /* mapping handle */
562 client_ptr_t addr; /* requested address */
563 mem_size_t size; /* allocation size */
564 file_pos_t offset; /* file offset */
565 mem_size_t zero_bits; /* number of zero high bits */
566 unsigned int alloc_type; /* allocation type */
567 unsigned int prot; /* memory protection flags */
568 } map_view;
569 struct
571 enum apc_type type; /* APC_UNMAP_VIEW */
572 int __pad;
573 client_ptr_t addr; /* view address */
574 } unmap_view;
575 struct
577 enum apc_type type; /* APC_CREATE_THREAD */
578 unsigned int flags; /* creation flags */
579 client_ptr_t func; /* void (__stdcall *func)(void*); start function */
580 client_ptr_t arg; /* argument for start function */
581 mem_size_t zero_bits; /* number of zero high bits for thread stack */
582 mem_size_t reserve; /* reserve size for thread stack */
583 mem_size_t commit; /* commit size for thread stack */
584 } create_thread;
585 struct
587 enum apc_type type; /* APC_DUP_HANDLE */
588 obj_handle_t src_handle; /* src handle to duplicate */
589 obj_handle_t dst_process; /* dst process handle */
590 unsigned int access; /* wanted access rights */
591 unsigned int attributes; /* object attributes */
592 unsigned int options; /* duplicate options */
593 } dup_handle;
594 } apc_call_t;
596 typedef union
598 enum apc_type type;
599 struct
601 enum apc_type type; /* APC_ASYNC_IO */
602 unsigned int status; /* new status of async operation */
603 unsigned int total; /* bytes transferred */
604 } async_io;
605 struct
607 enum apc_type type; /* APC_VIRTUAL_ALLOC */
608 unsigned int status; /* status returned by call */
609 client_ptr_t addr; /* resulting address */
610 mem_size_t size; /* resulting size */
611 } virtual_alloc;
612 struct
614 enum apc_type type; /* APC_VIRTUAL_FREE */
615 unsigned int status; /* status returned by call */
616 client_ptr_t addr; /* resulting address */
617 mem_size_t size; /* resulting size */
618 } virtual_free;
619 struct
621 enum apc_type type; /* APC_VIRTUAL_QUERY */
622 unsigned int status; /* status returned by call */
623 client_ptr_t base; /* resulting base address */
624 client_ptr_t alloc_base;/* resulting allocation base */
625 mem_size_t size; /* resulting region size */
626 unsigned short state; /* resulting region state */
627 unsigned short prot; /* resulting region protection */
628 unsigned short alloc_prot;/* resulting allocation protection */
629 unsigned short alloc_type;/* resulting region allocation type */
630 } virtual_query;
631 struct
633 enum apc_type type; /* APC_VIRTUAL_PROTECT */
634 unsigned int status; /* status returned by call */
635 client_ptr_t addr; /* resulting address */
636 mem_size_t size; /* resulting size */
637 unsigned int prot; /* old protection flags */
638 } virtual_protect;
639 struct
641 enum apc_type type; /* APC_VIRTUAL_FLUSH */
642 unsigned int status; /* status returned by call */
643 client_ptr_t addr; /* resulting address */
644 mem_size_t size; /* resulting size */
645 } virtual_flush;
646 struct
648 enum apc_type type; /* APC_VIRTUAL_LOCK */
649 unsigned int status; /* status returned by call */
650 client_ptr_t addr; /* resulting address */
651 mem_size_t size; /* resulting size */
652 } virtual_lock;
653 struct
655 enum apc_type type; /* APC_VIRTUAL_UNLOCK */
656 unsigned int status; /* status returned by call */
657 client_ptr_t addr; /* resulting address */
658 mem_size_t size; /* resulting size */
659 } virtual_unlock;
660 struct
662 enum apc_type type; /* APC_MAP_VIEW */
663 unsigned int status; /* status returned by call */
664 client_ptr_t addr; /* resulting address */
665 mem_size_t size; /* resulting size */
666 } map_view;
667 struct
669 enum apc_type type; /* APC_UNMAP_VIEW */
670 unsigned int status; /* status returned by call */
671 } unmap_view;
672 struct
674 enum apc_type type; /* APC_CREATE_THREAD */
675 unsigned int status; /* status returned by call */
676 process_id_t pid; /* process id */
677 thread_id_t tid; /* thread id */
678 client_ptr_t teb; /* thread teb (in process address space) */
679 obj_handle_t handle; /* handle to new thread */
680 } create_thread;
681 struct
683 enum apc_type type; /* APC_DUP_HANDLE */
684 unsigned int status; /* status returned by call */
685 obj_handle_t handle; /* duplicated handle in dst process */
686 } dup_handle;
687 struct
689 enum apc_type type; /* APC_BREAK_PROCESS */
690 unsigned int status; /* status returned by call */
691 } break_process;
692 } apc_result_t;
694 enum irp_type
696 IRP_CALL_NONE,
697 IRP_CALL_CREATE,
698 IRP_CALL_CLOSE,
699 IRP_CALL_READ,
700 IRP_CALL_WRITE,
701 IRP_CALL_FLUSH,
702 IRP_CALL_IOCTL,
703 IRP_CALL_VOLUME,
704 IRP_CALL_FREE,
705 IRP_CALL_CANCEL
708 typedef union
710 enum irp_type type; /* irp call type */
711 struct
713 enum irp_type type; /* IRP_CALL_CREATE */
714 unsigned int access; /* access rights */
715 unsigned int sharing; /* sharing flags */
716 unsigned int options; /* file options */
717 client_ptr_t device; /* opaque ptr for the device */
718 obj_handle_t file; /* file handle */
719 } create;
720 struct
722 enum irp_type type; /* IRP_CALL_CLOSE */
723 int __pad;
724 client_ptr_t file; /* opaque ptr for the file object */
725 } close;
726 struct
728 enum irp_type type; /* IRP_CALL_READ */
729 unsigned int key; /* driver key */
730 data_size_t out_size; /* needed output size */
731 int __pad;
732 client_ptr_t file; /* opaque ptr for the file object */
733 file_pos_t pos; /* file position */
734 } read;
735 struct
737 enum irp_type type; /* IRP_CALL_WRITE */
738 unsigned int key; /* driver key */
739 client_ptr_t file; /* opaque ptr for the file object */
740 file_pos_t pos; /* file position */
741 } write;
742 struct
744 enum irp_type type; /* IRP_CALL_FLUSH */
745 int __pad;
746 client_ptr_t file; /* opaque ptr for the file object */
747 } flush;
748 struct
750 enum irp_type type; /* IRP_CALL_IOCTL */
751 ioctl_code_t code; /* ioctl code */
752 data_size_t out_size; /* needed output size */
753 int __pad;
754 client_ptr_t file; /* opaque ptr for the file object */
755 } ioctl;
756 struct
758 enum irp_type type; /* IRP_CALL_VOLUME */
759 unsigned int info_class;/* information class */
760 data_size_t out_size; /* needed output size */
761 int __pad;
762 client_ptr_t file; /* opaque ptr for the file object */
763 } volume;
764 struct
766 enum irp_type type; /* IRP_CALL_FREE */
767 int __pad;
768 client_ptr_t obj; /* opaque ptr for the freed object */
769 } free;
770 struct
772 enum irp_type type; /* IRP_CALL_CANCEL */
773 int __pad;
774 client_ptr_t irp; /* opaque ptr for canceled irp */
775 } cancel;
776 } irp_params_t;
778 /* information about a PE image mapping, roughly equivalent to SECTION_IMAGE_INFORMATION */
779 typedef struct
781 client_ptr_t base;
782 client_ptr_t entry_point;
783 mem_size_t map_size;
784 mem_size_t stack_size;
785 mem_size_t stack_commit;
786 unsigned int zerobits;
787 unsigned int subsystem;
788 unsigned short subsystem_minor;
789 unsigned short subsystem_major;
790 unsigned short osversion_major;
791 unsigned short osversion_minor;
792 unsigned short image_charact;
793 unsigned short dll_charact;
794 unsigned short machine;
795 unsigned char contains_code;
796 unsigned char image_flags;
797 unsigned int loader_flags;
798 unsigned int header_size;
799 unsigned int file_size;
800 unsigned int checksum;
801 unsigned int dbg_offset;
802 unsigned int dbg_size;
803 } pe_image_info_t;
804 #define IMAGE_FLAGS_ComPlusNativeReady 0x01
805 #define IMAGE_FLAGS_ComPlusILOnly 0x02
806 #define IMAGE_FLAGS_ImageDynamicallyRelocated 0x04
807 #define IMAGE_FLAGS_ImageMappedFlat 0x08
808 #define IMAGE_FLAGS_BaseBelow4gb 0x10
809 #define IMAGE_FLAGS_ComPlusPrefer32bit 0x20
810 #define IMAGE_FLAGS_WineBuiltin 0x40
811 #define IMAGE_FLAGS_WineFakeDll 0x80
813 struct rawinput_device
815 unsigned short usage_page;
816 unsigned short usage;
817 unsigned int flags;
818 user_handle_t target;
821 typedef struct
823 int x;
824 int y;
825 unsigned int time;
826 int __pad;
827 lparam_t info;
828 } cursor_pos_t;
830 /****************************************************************/
831 /* Request declarations */
833 /* Create a new process from the context of the parent */
834 @REQ(new_process)
835 obj_handle_t token; /* process token */
836 obj_handle_t debug; /* process debug object */
837 obj_handle_t parent_process; /* parent process */
838 unsigned int flags; /* process creation flags */
839 int socket_fd; /* file descriptor for process socket */
840 unsigned int access; /* access rights for process object */
841 unsigned short machine; /* architecture that the new process will use */
842 data_size_t info_size; /* size of startup info */
843 data_size_t handles_size; /* length of explicit handles list */
844 data_size_t jobs_size; /* length of jobs list */
845 VARARG(objattr,object_attributes); /* object attributes */
846 VARARG(handles,uints,handles_size); /* handles list */
847 VARARG(jobs,uints,jobs_size); /* jobs list */
848 VARARG(info,startup_info,info_size); /* startup information */
849 VARARG(env,unicode_str); /* environment for new process */
850 @REPLY
851 obj_handle_t info; /* new process info handle */
852 process_id_t pid; /* process id */
853 obj_handle_t handle; /* process handle (in the current process) */
854 @END
857 /* Retrieve information about a newly started process */
858 @REQ(get_new_process_info)
859 obj_handle_t info; /* info handle returned from new_process_request */
860 @REPLY
861 int success; /* did the process start successfully? */
862 int exit_code; /* process exit code if failed */
863 @END
866 /* Create a new thread */
867 @REQ(new_thread)
868 obj_handle_t process; /* process in which to create thread */
869 unsigned int access; /* wanted access rights */
870 int suspend; /* new thread should be suspended on creation */
871 int request_fd; /* fd for request pipe */
872 VARARG(objattr,object_attributes); /* object attributes */
873 @REPLY
874 thread_id_t tid; /* thread id */
875 obj_handle_t handle; /* thread handle (in the current process) */
876 @END
879 /* Retrieve the new process startup info */
880 @REQ(get_startup_info)
881 @REPLY
882 data_size_t info_size; /* size of startup info */
883 VARARG(info,startup_info,info_size); /* startup information */
884 VARARG(env,unicode_str); /* environment */
885 @END
888 /* Signal the end of the process initialization */
889 @REQ(init_process_done)
890 client_ptr_t teb; /* TEB of new thread (in process address space) */
891 client_ptr_t peb; /* PEB of new process (in process address space) */
892 client_ptr_t ldt_copy; /* address of LDT copy (in process address space) */
893 @REPLY
894 client_ptr_t entry; /* process entry point */
895 int suspend; /* is process suspended? */
896 @END
899 /* Initialize the first thread of a new process */
900 @REQ(init_first_thread)
901 int unix_pid; /* Unix pid of new process */
902 int unix_tid; /* Unix tid of new thread */
903 int debug_level; /* new debug level */
904 int reply_fd; /* fd for reply pipe */
905 int wait_fd; /* fd for blocking calls pipe */
906 @REPLY
907 process_id_t pid; /* process id of the new thread's process */
908 thread_id_t tid; /* thread id of the new thread */
909 timeout_t server_start; /* server start time */
910 data_size_t info_size; /* total size of startup info */
911 VARARG(machines,ushorts); /* array of supported machines */
912 @END
915 /* Initialize a new thread; called from the child after pthread_create() */
916 @REQ(init_thread)
917 int unix_tid; /* Unix tid of new thread */
918 int reply_fd; /* fd for reply pipe */
919 int wait_fd; /* fd for blocking calls pipe */
920 client_ptr_t teb; /* TEB of new thread (in thread address space) */
921 client_ptr_t entry; /* entry point (in thread address space) */
922 @REPLY
923 process_id_t pid; /* process id of the new thread's process */
924 thread_id_t tid; /* thread id of the new thread */
925 int suspend; /* is thread suspended? */
926 @END
929 /* Terminate a process */
930 @REQ(terminate_process)
931 obj_handle_t handle; /* process handle to terminate */
932 int exit_code; /* process exit code */
933 @REPLY
934 int self; /* suicide? */
935 @END
938 /* Terminate a thread */
939 @REQ(terminate_thread)
940 obj_handle_t handle; /* thread handle to terminate */
941 int exit_code; /* thread exit code */
942 @REPLY
943 int self; /* suicide? */
944 @END
947 /* Retrieve information about a process */
948 @REQ(get_process_info)
949 obj_handle_t handle; /* process handle */
950 @REPLY
951 process_id_t pid; /* server process id */
952 process_id_t ppid; /* server process id of parent */
953 affinity_t affinity; /* process affinity mask */
954 client_ptr_t peb; /* PEB address in process address space */
955 timeout_t start_time; /* process start time */
956 timeout_t end_time; /* process end time */
957 int exit_code; /* process exit code */
958 int priority; /* priority class */
959 unsigned short machine; /* process architecture */
960 VARARG(image,pe_image_info); /* image info for main exe */
961 @END
964 /* Retrieve debug information about a process */
965 @REQ(get_process_debug_info)
966 obj_handle_t handle; /* process handle */
967 @REPLY
968 obj_handle_t debug; /* handle to debug port */
969 int debug_children; /* inherit debugger to child processes */
970 VARARG(image,pe_image_info); /* image info for main exe */
971 @END
974 /* Fetch the name of the process image */
975 @REQ(get_process_image_name)
976 obj_handle_t handle; /* process handle */
977 int win32; /* return a win32 filename? */
978 @REPLY
979 data_size_t len; /* len in bytes required to store filename */
980 VARARG(name,unicode_str); /* image name for main exe */
981 @END
984 /* Retrieve information about a process memory usage */
985 @REQ(get_process_vm_counters)
986 obj_handle_t handle; /* process handle */
987 @REPLY
988 mem_size_t peak_virtual_size; /* peak virtual memory in bytes */
989 mem_size_t virtual_size; /* virtual memory in bytes */
990 mem_size_t peak_working_set_size; /* peak real memory in bytes */
991 mem_size_t working_set_size; /* real memory in bytes */
992 mem_size_t pagefile_usage; /* commit charge in bytes */
993 mem_size_t peak_pagefile_usage; /* peak commit charge in bytes */
994 @END
997 /* Set a process information */
998 @REQ(set_process_info)
999 obj_handle_t handle; /* process handle */
1000 int mask; /* setting mask (see below) */
1001 int priority; /* priority class */
1002 affinity_t affinity; /* affinity mask */
1003 @END
1004 #define SET_PROCESS_INFO_PRIORITY 0x01
1005 #define SET_PROCESS_INFO_AFFINITY 0x02
1008 /* Retrieve information about a thread */
1009 @REQ(get_thread_info)
1010 obj_handle_t handle; /* thread handle */
1011 unsigned int access; /* required access rights */
1012 @REPLY
1013 process_id_t pid; /* server process id */
1014 thread_id_t tid; /* server thread id */
1015 client_ptr_t teb; /* thread teb pointer */
1016 client_ptr_t entry_point; /* thread entry point */
1017 affinity_t affinity; /* thread affinity mask */
1018 int exit_code; /* thread exit code */
1019 int priority; /* thread priority level */
1020 int last; /* last thread in process */
1021 int suspend_count; /* thread suspend count */
1022 int dbg_hidden; /* thread hidden from debugger */
1023 data_size_t desc_len; /* description length in bytes */
1024 VARARG(desc,unicode_str); /* description string */
1025 @END
1028 /* Retrieve information about thread times */
1029 @REQ(get_thread_times)
1030 obj_handle_t handle; /* thread handle */
1031 @REPLY
1032 timeout_t creation_time; /* thread creation time */
1033 timeout_t exit_time; /* thread exit time */
1034 int unix_pid; /* thread native pid */
1035 int unix_tid; /* thread native pid */
1036 @END
1039 /* Set a thread information */
1040 @REQ(set_thread_info)
1041 obj_handle_t handle; /* thread handle */
1042 int mask; /* setting mask (see below) */
1043 int priority; /* priority class */
1044 affinity_t affinity; /* affinity mask */
1045 client_ptr_t entry_point; /* thread entry point */
1046 obj_handle_t token; /* impersonation token */
1047 VARARG(desc,unicode_str); /* description string */
1048 @END
1049 #define SET_THREAD_INFO_PRIORITY 0x01
1050 #define SET_THREAD_INFO_AFFINITY 0x02
1051 #define SET_THREAD_INFO_TOKEN 0x04
1052 #define SET_THREAD_INFO_ENTRYPOINT 0x08
1053 #define SET_THREAD_INFO_DESCRIPTION 0x10
1054 #define SET_THREAD_INFO_DBG_HIDDEN 0x20
1057 /* Suspend a thread */
1058 @REQ(suspend_thread)
1059 obj_handle_t handle; /* thread handle */
1060 @REPLY
1061 int count; /* new suspend count */
1062 @END
1065 /* Resume a thread */
1066 @REQ(resume_thread)
1067 obj_handle_t handle; /* thread handle */
1068 @REPLY
1069 int count; /* new suspend count */
1070 @END
1073 /* Queue an APC for a thread or process */
1074 @REQ(queue_apc)
1075 obj_handle_t handle; /* thread or process handle */
1076 apc_call_t call; /* call arguments */
1077 @REPLY
1078 obj_handle_t handle; /* APC handle */
1079 int self; /* run APC in caller itself? */
1080 @END
1083 /* Get the result of an APC call */
1084 @REQ(get_apc_result)
1085 obj_handle_t handle; /* handle to the APC */
1086 @REPLY
1087 apc_result_t result; /* result of the APC */
1088 @END
1091 /* Close a handle for the current process */
1092 @REQ(close_handle)
1093 obj_handle_t handle; /* handle to close */
1094 @END
1097 /* Set a handle information */
1098 @REQ(set_handle_info)
1099 obj_handle_t handle; /* handle we are interested in */
1100 int flags; /* new handle flags */
1101 int mask; /* mask for flags to set */
1102 @REPLY
1103 int old_flags; /* old flag value */
1104 @END
1107 /* Duplicate a handle */
1108 @REQ(dup_handle)
1109 obj_handle_t src_process; /* src process handle */
1110 obj_handle_t src_handle; /* src handle to duplicate */
1111 obj_handle_t dst_process; /* dst process handle */
1112 unsigned int access; /* wanted access rights */
1113 unsigned int attributes; /* object attributes */
1114 unsigned int options; /* duplicate options */
1115 @REPLY
1116 obj_handle_t handle; /* duplicated handle in dst process */
1117 @END
1120 /* Make an object temporary */
1121 @REQ(make_temporary)
1122 obj_handle_t handle; /* handle to the object */
1123 @END
1126 /* Open a handle to a process */
1127 @REQ(open_process)
1128 process_id_t pid; /* process id to open */
1129 unsigned int access; /* wanted access rights */
1130 unsigned int attributes; /* object attributes */
1131 @REPLY
1132 obj_handle_t handle; /* handle to the process */
1133 @END
1136 /* Open a handle to a thread */
1137 @REQ(open_thread)
1138 thread_id_t tid; /* thread id to open */
1139 unsigned int access; /* wanted access rights */
1140 unsigned int attributes; /* object attributes */
1141 @REPLY
1142 obj_handle_t handle; /* handle to the thread */
1143 @END
1146 /* Wait for handles */
1147 @REQ(select)
1148 int flags; /* wait flags (see below) */
1149 client_ptr_t cookie; /* magic cookie to return to client */
1150 abstime_t timeout; /* timeout */
1151 data_size_t size; /* size of select_op */
1152 obj_handle_t prev_apc; /* handle to previous APC */
1153 VARARG(result,apc_result); /* result of previous APC */
1154 VARARG(data,select_op,size); /* operation-specific data */
1155 VARARG(context,context); /* suspend context */
1156 @REPLY
1157 apc_call_t call; /* APC call arguments */
1158 obj_handle_t apc_handle; /* handle to next APC */
1159 VARARG(context,context); /* suspend context */
1160 @END
1161 #define SELECT_ALERTABLE 1
1162 #define SELECT_INTERRUPTIBLE 2
1165 /* Create an event */
1166 @REQ(create_event)
1167 unsigned int access; /* wanted access rights */
1168 int manual_reset; /* manual reset event */
1169 int initial_state; /* initial state of the event */
1170 VARARG(objattr,object_attributes); /* object attributes */
1171 @REPLY
1172 obj_handle_t handle; /* handle to the event */
1173 @END
1175 /* Event operation */
1176 @REQ(event_op)
1177 obj_handle_t handle; /* handle to event */
1178 int op; /* event operation (see below) */
1179 @REPLY
1180 int state; /* previous state */
1181 @END
1182 enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT };
1184 @REQ(query_event)
1185 obj_handle_t handle; /* handle to event */
1186 @REPLY
1187 int manual_reset; /* manual reset event */
1188 int state; /* current state of the event */
1189 @END
1191 /* Open an event */
1192 @REQ(open_event)
1193 unsigned int access; /* wanted access rights */
1194 unsigned int attributes; /* object attributes */
1195 obj_handle_t rootdir; /* root directory */
1196 VARARG(name,unicode_str); /* object name */
1197 @REPLY
1198 obj_handle_t handle; /* handle to the event */
1199 @END
1202 /* Create a keyed event */
1203 @REQ(create_keyed_event)
1204 unsigned int access; /* wanted access rights */
1205 VARARG(objattr,object_attributes); /* object attributes */
1206 @REPLY
1207 obj_handle_t handle; /* handle to the event */
1208 @END
1210 /* Open a keyed event */
1211 @REQ(open_keyed_event)
1212 unsigned int access; /* wanted access rights */
1213 unsigned int attributes; /* object attributes */
1214 obj_handle_t rootdir; /* root directory */
1215 VARARG(name,unicode_str); /* object name */
1216 @REPLY
1217 obj_handle_t handle; /* handle to the event */
1218 @END
1221 /* Create a mutex */
1222 @REQ(create_mutex)
1223 unsigned int access; /* wanted access rights */
1224 int owned; /* initially owned? */
1225 VARARG(objattr,object_attributes); /* object attributes */
1226 @REPLY
1227 obj_handle_t handle; /* handle to the mutex */
1228 @END
1231 /* Release a mutex */
1232 @REQ(release_mutex)
1233 obj_handle_t handle; /* handle to the mutex */
1234 @REPLY
1235 unsigned int prev_count; /* value of internal counter, before release */
1236 @END
1239 /* Open a mutex */
1240 @REQ(open_mutex)
1241 unsigned int access; /* wanted access rights */
1242 unsigned int attributes; /* object attributes */
1243 obj_handle_t rootdir; /* root directory */
1244 VARARG(name,unicode_str); /* object name */
1245 @REPLY
1246 obj_handle_t handle; /* handle to the mutex */
1247 @END
1250 /* Query a mutex */
1251 @REQ(query_mutex)
1252 obj_handle_t handle; /* handle to mutex */
1253 @REPLY
1254 unsigned int count; /* current count of mutex */
1255 int owned; /* true if owned by current thread */
1256 int abandoned; /* true if abandoned */
1257 @END
1260 /* Create a semaphore */
1261 @REQ(create_semaphore)
1262 unsigned int access; /* wanted access rights */
1263 unsigned int initial; /* initial count */
1264 unsigned int max; /* maximum count */
1265 VARARG(objattr,object_attributes); /* object attributes */
1266 @REPLY
1267 obj_handle_t handle; /* handle to the semaphore */
1268 @END
1271 /* Release a semaphore */
1272 @REQ(release_semaphore)
1273 obj_handle_t handle; /* handle to the semaphore */
1274 unsigned int count; /* count to add to semaphore */
1275 @REPLY
1276 unsigned int prev_count; /* previous semaphore count */
1277 @END
1279 @REQ(query_semaphore)
1280 obj_handle_t handle; /* handle to the semaphore */
1281 @REPLY
1282 unsigned int current; /* current count */
1283 unsigned int max; /* maximum count */
1284 @END
1286 /* Open a semaphore */
1287 @REQ(open_semaphore)
1288 unsigned int access; /* wanted access rights */
1289 unsigned int attributes; /* object attributes */
1290 obj_handle_t rootdir; /* root directory */
1291 VARARG(name,unicode_str); /* object name */
1292 @REPLY
1293 obj_handle_t handle; /* handle to the semaphore */
1294 @END
1297 /* Create a file */
1298 @REQ(create_file)
1299 unsigned int access; /* wanted access rights */
1300 unsigned int sharing; /* sharing flags */
1301 int create; /* file create action */
1302 unsigned int options; /* file options */
1303 unsigned int attrs; /* file attributes for creation */
1304 VARARG(objattr,object_attributes); /* object attributes */
1305 VARARG(filename,string); /* file name */
1306 @REPLY
1307 obj_handle_t handle; /* handle to the file */
1308 @END
1311 /* Open a file object */
1312 @REQ(open_file_object)
1313 unsigned int access; /* wanted access rights */
1314 unsigned int attributes; /* open attributes */
1315 obj_handle_t rootdir; /* root directory */
1316 unsigned int sharing; /* sharing flags */
1317 unsigned int options; /* file options */
1318 VARARG(filename,unicode_str); /* file name */
1319 @REPLY
1320 obj_handle_t handle; /* handle to the file */
1321 @END
1324 /* Allocate a file handle for a Unix fd */
1325 @REQ(alloc_file_handle)
1326 unsigned int access; /* wanted access rights */
1327 unsigned int attributes; /* object attributes */
1328 int fd; /* file descriptor on the client side */
1329 @REPLY
1330 obj_handle_t handle; /* handle to the file */
1331 @END
1334 /* Get the Unix name from a file handle */
1335 @REQ(get_handle_unix_name)
1336 obj_handle_t handle; /* file handle */
1337 @REPLY
1338 data_size_t name_len; /* unix name length */
1339 VARARG(name,string); /* unix name */
1340 @END
1343 /* Get a Unix fd to access a file */
1344 @REQ(get_handle_fd)
1345 obj_handle_t handle; /* handle to the file */
1346 @REPLY
1347 int type; /* file type (see below) */
1348 int cacheable; /* can fd be cached in the client? */
1349 unsigned int access; /* file access rights */
1350 unsigned int options; /* file open options */
1351 @END
1352 enum server_fd_type
1354 FD_TYPE_INVALID, /* invalid file (no associated fd) */
1355 FD_TYPE_FILE, /* regular file */
1356 FD_TYPE_DIR, /* directory */
1357 FD_TYPE_SOCKET, /* socket */
1358 FD_TYPE_SERIAL, /* serial port */
1359 FD_TYPE_PIPE, /* named pipe */
1360 FD_TYPE_MAILSLOT, /* mailslot */
1361 FD_TYPE_CHAR, /* unspecified char device */
1362 FD_TYPE_DEVICE, /* Windows device file */
1363 FD_TYPE_NB_TYPES
1367 /* Retrieve (or allocate) the client-side directory cache entry */
1368 @REQ(get_directory_cache_entry)
1369 obj_handle_t handle; /* handle to the directory */
1370 @REPLY
1371 int entry; /* cache entry on the client side */
1372 VARARG(free,ints); /* entries that can be freed */
1373 @END
1376 /* Flush a file buffers */
1377 @REQ(flush)
1378 async_data_t async; /* async I/O parameters */
1379 @REPLY
1380 obj_handle_t event; /* event set when finished */
1381 @END
1383 /* Query file information */
1384 @REQ(get_file_info)
1385 obj_handle_t handle; /* handle to the file */
1386 unsigned int info_class; /* queried information class */
1387 @REPLY
1388 VARARG(data,bytes); /* file info data */
1389 @END
1391 /* Query volume information */
1392 @REQ(get_volume_info)
1393 obj_handle_t handle; /* handle to the file */
1394 async_data_t async; /* async I/O parameters */
1395 unsigned int info_class; /* queried information class */
1396 @REPLY
1397 obj_handle_t wait; /* handle to wait on for blocking read */
1398 VARARG(data,bytes); /* volume info data */
1399 @END
1401 /* Lock a region of a file */
1402 @REQ(lock_file)
1403 obj_handle_t handle; /* handle to the file */
1404 file_pos_t offset; /* offset of start of lock */
1405 file_pos_t count; /* count of bytes to lock */
1406 int shared; /* shared or exclusive lock? */
1407 int wait; /* do we want to wait? */
1408 @REPLY
1409 obj_handle_t handle; /* handle to wait on */
1410 int overlapped; /* is it an overlapped I/O handle? */
1411 @END
1414 /* Unlock a region of a file */
1415 @REQ(unlock_file)
1416 obj_handle_t handle; /* handle to the file */
1417 file_pos_t offset; /* offset of start of unlock */
1418 file_pos_t count; /* count of bytes to unlock */
1419 @END
1422 /* Set socket event parameters */
1423 @REQ(set_socket_event)
1424 obj_handle_t handle; /* handle to the socket */
1425 unsigned int mask; /* event mask */
1426 obj_handle_t event; /* event object */
1427 user_handle_t window; /* window to send the message to */
1428 unsigned int msg; /* message to send */
1429 @END
1432 /* Get socket event parameters */
1433 @REQ(get_socket_event)
1434 obj_handle_t handle; /* handle to the socket */
1435 int service; /* clear pending? */
1436 obj_handle_t c_event; /* event to clear */
1437 @REPLY
1438 unsigned int mask; /* event mask */
1439 unsigned int pmask; /* pending events */
1440 unsigned int state; /* status bits */
1441 VARARG(errors,ints); /* event errors */
1442 @END
1445 /* Get socket info */
1446 @REQ(get_socket_info)
1447 obj_handle_t handle; /* handle to the socket */
1448 @REPLY
1449 int family; /* family, see socket manpage */
1450 int type; /* type, see socket manpage */
1451 int protocol; /* protocol, see socket manpage */
1452 @END
1455 /* Re-enable pending socket events */
1456 @REQ(enable_socket_event)
1457 obj_handle_t handle; /* handle to the socket */
1458 unsigned int mask; /* events to re-enable */
1459 unsigned int sstate; /* status bits to set */
1460 unsigned int cstate; /* status bits to clear */
1461 @END
1463 @REQ(set_socket_deferred)
1464 obj_handle_t handle; /* handle to the socket */
1465 obj_handle_t deferred; /* handle to the socket for which accept() is deferred */
1466 @END
1469 /* Perform a recv on a socket */
1470 @REQ(recv_socket)
1471 async_data_t async; /* async I/O parameters */
1472 unsigned int status; /* status of initial call */
1473 unsigned int total; /* number of bytes already read */
1474 @REPLY
1475 obj_handle_t wait; /* handle to wait on for blocking recv */
1476 unsigned int options; /* device open options */
1477 @END
1480 struct poll_socket_input
1482 obj_handle_t socket; /* socket handle */
1483 int flags; /* events to poll for */
1486 struct poll_socket_output
1488 int flags; /* events signaled */
1489 unsigned int status; /* socket status */
1492 /* Perform an async poll on a socket */
1493 @REQ(poll_socket)
1494 async_data_t async; /* async I/O parameters */
1495 timeout_t timeout; /* timeout */
1496 VARARG(sockets,poll_socket_input); /* list of sockets to poll */
1497 @REPLY
1498 obj_handle_t wait; /* handle to wait on for blocking poll */
1499 unsigned int options; /* file open options */
1500 VARARG(sockets,poll_socket_output); /* data returned */
1501 @END
1504 /* Retrieve the next pending console ioctl request */
1505 @REQ(get_next_console_request)
1506 obj_handle_t handle; /* console server handle */
1507 int signal; /* server signal state */
1508 int read; /* 1 if reporting result of blocked read ioctl */
1509 unsigned int status; /* status of previous ioctl */
1510 VARARG(out_data,bytes); /* out_data of previous ioctl */
1511 @REPLY
1512 unsigned int code; /* ioctl code */
1513 unsigned int output; /* output id or 0 for input */
1514 data_size_t out_size; /* ioctl output size */
1515 VARARG(in_data,bytes); /* ioctl in_data */
1516 @END
1519 /* enable directory change notifications */
1520 @REQ(read_directory_changes)
1521 unsigned int filter; /* notification filter */
1522 int subtree; /* watch the subtree? */
1523 int want_data; /* flag indicating whether change data should be collected */
1524 async_data_t async; /* async I/O parameters */
1525 @END
1528 @REQ(read_change)
1529 obj_handle_t handle;
1530 @REPLY
1531 VARARG(events,filesystem_event); /* collected filesystem events */
1532 @END
1535 /* Create a file mapping */
1536 @REQ(create_mapping)
1537 unsigned int access; /* wanted access rights */
1538 unsigned int flags; /* SEC_* flags */
1539 unsigned int file_access; /* file access rights */
1540 mem_size_t size; /* mapping size */
1541 obj_handle_t file_handle; /* file handle */
1542 VARARG(objattr,object_attributes); /* object attributes */
1543 @REPLY
1544 obj_handle_t handle; /* handle to the mapping */
1545 @END
1548 /* Open a mapping */
1549 @REQ(open_mapping)
1550 unsigned int access; /* wanted access rights */
1551 unsigned int attributes; /* object attributes */
1552 obj_handle_t rootdir; /* root directory */
1553 VARARG(name,unicode_str); /* object name */
1554 @REPLY
1555 obj_handle_t handle; /* handle to the mapping */
1556 @END
1559 /* Get information about a file mapping */
1560 @REQ(get_mapping_info)
1561 obj_handle_t handle; /* handle to the mapping */
1562 unsigned int access; /* wanted access rights */
1563 @REPLY
1564 mem_size_t size; /* mapping size */
1565 unsigned int flags; /* SEC_* flags */
1566 obj_handle_t shared_file; /* shared mapping file handle */
1567 data_size_t total; /* total required buffer size in bytes */
1568 VARARG(image,pe_image_info);/* image info for SEC_IMAGE mappings */
1569 VARARG(name,unicode_str); /* filename for SEC_IMAGE mappings */
1570 @END
1573 /* Add a memory view in the current process */
1574 @REQ(map_view)
1575 obj_handle_t mapping; /* file mapping handle, or 0 for .so builtin */
1576 unsigned int access; /* wanted access rights */
1577 client_ptr_t base; /* view base address (page-aligned) */
1578 mem_size_t size; /* view size */
1579 file_pos_t start; /* start offset in mapping */
1580 VARARG(image,pe_image_info);/* image info for .so builtins */
1581 VARARG(name,unicode_str); /* image filename for .so builtins */
1582 @END
1585 /* Unmap a memory view from the current process */
1586 @REQ(unmap_view)
1587 client_ptr_t base; /* view base address */
1588 @END
1591 /* Get a range of committed pages in a file mapping */
1592 @REQ(get_mapping_committed_range)
1593 client_ptr_t base; /* view base address */
1594 file_pos_t offset; /* starting offset (page-aligned, in bytes) */
1595 @REPLY
1596 mem_size_t size; /* size of range starting at offset (page-aligned, in bytes) */
1597 int committed; /* whether it is a committed range */
1598 @END
1601 /* Add a range to the committed pages in a file mapping */
1602 @REQ(add_mapping_committed_range)
1603 client_ptr_t base; /* view base address */
1604 file_pos_t offset; /* starting offset (page-aligned, in bytes) */
1605 mem_size_t size; /* size to set (page-aligned, in bytes) or 0 if only retrieving */
1606 @END
1609 /* Check if two memory maps are for the same file */
1610 @REQ(is_same_mapping)
1611 client_ptr_t base1; /* first view base address */
1612 client_ptr_t base2; /* second view base address */
1613 @END
1616 /* Get the filename of a mapping */
1617 @REQ(get_mapping_filename)
1618 obj_handle_t process; /* process handle */
1619 client_ptr_t addr; /* address inside mapped view (in process address space) */
1620 @REPLY
1621 data_size_t len; /* total filename length in bytes */
1622 VARARG(filename,unicode_str); /* filename in NT format */
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 /* Create a debug object */
1660 @REQ(create_debug_obj)
1661 unsigned int access; /* wanted access rights */
1662 unsigned int flags; /* object flags */
1663 VARARG(objattr,object_attributes); /* object attributes */
1664 @REPLY
1665 obj_handle_t handle; /* handle to the debug object */
1666 @END
1669 /* Wait for a debug event */
1670 @REQ(wait_debug_event)
1671 obj_handle_t debug; /* debug object */
1672 @REPLY
1673 process_id_t pid; /* process id */
1674 thread_id_t tid; /* thread id */
1675 VARARG(event,debug_event); /* debug event data */
1676 @END
1679 /* Queue an exception event */
1680 @REQ(queue_exception_event)
1681 int first; /* first chance exception? */
1682 unsigned int code; /* exception code */
1683 unsigned int flags; /* exception flags */
1684 client_ptr_t record; /* exception record */
1685 client_ptr_t address; /* exception address */
1686 data_size_t len; /* size of parameters */
1687 VARARG(params,uints64,len);/* exception parameters */
1688 @REPLY
1689 obj_handle_t handle; /* handle to the queued event */
1690 @END
1693 /* Retrieve the status of an exception event */
1694 @REQ(get_exception_status)
1695 obj_handle_t handle; /* handle to the queued event */
1696 @END
1699 /* Continue a debug event */
1700 @REQ(continue_debug_event)
1701 obj_handle_t debug; /* debug object */
1702 process_id_t pid; /* process id to continue */
1703 thread_id_t tid; /* thread id to continue */
1704 unsigned int status; /* continuation status */
1705 @END
1708 /* Start or stop debugging an existing process */
1709 @REQ(debug_process)
1710 obj_handle_t handle; /* process handle */
1711 obj_handle_t debug; /* debug object to attach to the process */
1712 int attach; /* 1=attaching / 0=detaching from the process */
1713 @END
1716 /* Set debug object information */
1717 @REQ(set_debug_obj_info)
1718 obj_handle_t debug; /* debug object */
1719 unsigned int flags; /* object flags */
1720 @END
1723 /* Read data from a process address space */
1724 @REQ(read_process_memory)
1725 obj_handle_t handle; /* process handle */
1726 client_ptr_t addr; /* addr to read from */
1727 @REPLY
1728 VARARG(data,bytes); /* result data */
1729 @END
1732 /* Write data to a process address space */
1733 @REQ(write_process_memory)
1734 obj_handle_t handle; /* process handle */
1735 client_ptr_t addr; /* addr to write to */
1736 VARARG(data,bytes); /* data to write */
1737 @END
1740 /* Create a registry key */
1741 @REQ(create_key)
1742 unsigned int access; /* desired access rights */
1743 unsigned int options; /* creation options */
1744 VARARG(objattr,object_attributes); /* object attributes */
1745 VARARG(class,unicode_str); /* class name */
1746 @REPLY
1747 obj_handle_t hkey; /* handle to the created key */
1748 int created; /* has it been newly created? */
1749 @END
1751 /* Open a registry key */
1752 @REQ(open_key)
1753 obj_handle_t parent; /* handle to the parent key */
1754 unsigned int access; /* desired access rights */
1755 unsigned int attributes; /* object attributes */
1756 VARARG(name,unicode_str); /* key name */
1757 @REPLY
1758 obj_handle_t hkey; /* handle to the open key */
1759 @END
1762 /* Delete a registry key */
1763 @REQ(delete_key)
1764 obj_handle_t hkey; /* handle to the key */
1765 @END
1768 /* Flush a registry key */
1769 @REQ(flush_key)
1770 obj_handle_t hkey; /* handle to the key */
1771 @END
1774 /* Enumerate registry subkeys */
1775 @REQ(enum_key)
1776 obj_handle_t hkey; /* handle to registry key */
1777 int index; /* index of subkey (or -1 for current key) */
1778 int info_class; /* requested information class */
1779 @REPLY
1780 int subkeys; /* number of subkeys */
1781 int max_subkey; /* longest subkey name */
1782 int max_class; /* longest class name */
1783 int values; /* number of values */
1784 int max_value; /* longest value name */
1785 int max_data; /* longest value data */
1786 timeout_t modif; /* last modification time */
1787 data_size_t total; /* total length needed for full name and class */
1788 data_size_t namelen; /* length of key name in bytes */
1789 VARARG(name,unicode_str,namelen); /* key name */
1790 VARARG(class,unicode_str); /* class name */
1791 @END
1794 /* Set a value of a registry key */
1795 @REQ(set_key_value)
1796 obj_handle_t hkey; /* handle to registry key */
1797 int type; /* value type */
1798 data_size_t namelen; /* length of value name in bytes */
1799 VARARG(name,unicode_str,namelen); /* value name */
1800 VARARG(data,bytes); /* value data */
1801 @END
1804 /* Retrieve the value of a registry key */
1805 @REQ(get_key_value)
1806 obj_handle_t hkey; /* handle to registry key */
1807 VARARG(name,unicode_str); /* value name */
1808 @REPLY
1809 int type; /* value type */
1810 data_size_t total; /* total length needed for data */
1811 VARARG(data,bytes); /* value data */
1812 @END
1815 /* Enumerate a value of a registry key */
1816 @REQ(enum_key_value)
1817 obj_handle_t hkey; /* handle to registry key */
1818 int index; /* value index */
1819 int info_class; /* requested information class */
1820 @REPLY
1821 int type; /* value type */
1822 data_size_t total; /* total length needed for full name and data */
1823 data_size_t namelen; /* length of value name in bytes */
1824 VARARG(name,unicode_str,namelen); /* value name */
1825 VARARG(data,bytes); /* value data */
1826 @END
1829 /* Delete a value of a registry key */
1830 @REQ(delete_key_value)
1831 obj_handle_t hkey; /* handle to registry key */
1832 VARARG(name,unicode_str); /* value name */
1833 @END
1836 /* Load a registry branch from a file */
1837 @REQ(load_registry)
1838 obj_handle_t file; /* file to load from */
1839 VARARG(objattr,object_attributes); /* object attributes */
1840 @END
1843 /* UnLoad a registry branch from a file */
1844 @REQ(unload_registry)
1845 obj_handle_t parent; /* handle to the parent key */
1846 unsigned int attributes; /* object attributes */
1847 VARARG(name,unicode_str); /* key name */
1848 @END
1851 /* Save a registry branch to a file */
1852 @REQ(save_registry)
1853 obj_handle_t hkey; /* key to save */
1854 obj_handle_t file; /* file to save to */
1855 @END
1858 /* Add a registry key change notification */
1859 @REQ(set_registry_notification)
1860 obj_handle_t hkey; /* key to watch for changes */
1861 obj_handle_t event; /* event to set */
1862 int subtree; /* should we watch the whole subtree? */
1863 unsigned int filter; /* things to watch */
1864 @END
1867 /* Create a waitable timer */
1868 @REQ(create_timer)
1869 unsigned int access; /* wanted access rights */
1870 int manual; /* manual reset */
1871 VARARG(objattr,object_attributes); /* object attributes */
1872 @REPLY
1873 obj_handle_t handle; /* handle to the timer */
1874 @END
1877 /* Open a waitable timer */
1878 @REQ(open_timer)
1879 unsigned int access; /* wanted access rights */
1880 unsigned int attributes; /* object attributes */
1881 obj_handle_t rootdir; /* root directory */
1882 VARARG(name,unicode_str); /* object name */
1883 @REPLY
1884 obj_handle_t handle; /* handle to the timer */
1885 @END
1887 /* Set a waitable timer */
1888 @REQ(set_timer)
1889 obj_handle_t handle; /* handle to the timer */
1890 timeout_t expire; /* next expiration absolute time */
1891 client_ptr_t callback; /* callback function */
1892 client_ptr_t arg; /* callback argument */
1893 int period; /* timer period in ms */
1894 @REPLY
1895 int signaled; /* was the timer signaled before this call ? */
1896 @END
1898 /* Cancel a waitable timer */
1899 @REQ(cancel_timer)
1900 obj_handle_t handle; /* handle to the timer */
1901 @REPLY
1902 int signaled; /* was the timer signaled before this calltime ? */
1903 @END
1905 /* Get information on a waitable timer */
1906 @REQ(get_timer_info)
1907 obj_handle_t handle; /* handle to the timer */
1908 @REPLY
1909 timeout_t when; /* absolute time when the timer next expires */
1910 int signaled; /* is the timer signaled? */
1911 @END
1914 /* Retrieve the current context of a thread */
1915 @REQ(get_thread_context)
1916 obj_handle_t handle; /* thread or context handle */
1917 unsigned int flags; /* context flags */
1918 @REPLY
1919 int self; /* was it a handle to the current thread? */
1920 obj_handle_t handle; /* pending context handle */
1921 VARARG(context,context); /* thread context */
1922 @END
1925 /* Set the current context of a thread */
1926 @REQ(set_thread_context)
1927 obj_handle_t handle; /* thread handle */
1928 VARARG(context,context); /* thread context */
1929 @REPLY
1930 int self; /* was it a handle to the current thread? */
1931 @END
1934 /* Fetch a selector entry for a thread */
1935 @REQ(get_selector_entry)
1936 obj_handle_t handle; /* thread handle */
1937 int entry; /* LDT entry */
1938 @REPLY
1939 unsigned int base; /* selector base */
1940 unsigned int limit; /* selector limit */
1941 unsigned char flags; /* selector flags */
1942 @END
1945 /* Add an atom */
1946 @REQ(add_atom)
1947 VARARG(name,unicode_str); /* atom name */
1948 @REPLY
1949 atom_t atom; /* resulting atom */
1950 @END
1953 /* Delete an atom */
1954 @REQ(delete_atom)
1955 atom_t atom; /* atom handle */
1956 @END
1959 /* Find an atom */
1960 @REQ(find_atom)
1961 VARARG(name,unicode_str); /* atom name */
1962 @REPLY
1963 atom_t atom; /* atom handle */
1964 @END
1967 /* Get information about an atom */
1968 @REQ(get_atom_information)
1969 atom_t atom; /* atom handle */
1970 @REPLY
1971 int count; /* atom lock count */
1972 int pinned; /* whether the atom has been pinned */
1973 data_size_t total; /* actual length of atom name */
1974 VARARG(name,unicode_str); /* atom name */
1975 @END
1978 /* Get the message queue of the current thread */
1979 @REQ(get_msg_queue)
1980 @REPLY
1981 obj_handle_t handle; /* handle to the queue */
1982 @END
1985 /* Set the file descriptor associated to the current thread queue */
1986 @REQ(set_queue_fd)
1987 obj_handle_t handle; /* handle to the file descriptor */
1988 @END
1991 /* Set the current message queue wakeup mask */
1992 @REQ(set_queue_mask)
1993 unsigned int wake_mask; /* wakeup bits mask */
1994 unsigned int changed_mask; /* changed bits mask */
1995 int skip_wait; /* will we skip waiting if signaled? */
1996 @REPLY
1997 unsigned int wake_bits; /* current wake bits */
1998 unsigned int changed_bits; /* current changed bits */
1999 @END
2002 /* Get the current message queue status */
2003 @REQ(get_queue_status)
2004 unsigned int clear_bits; /* should we clear the change bits? */
2005 @REPLY
2006 unsigned int wake_bits; /* wake bits */
2007 unsigned int changed_bits; /* changed bits since last time */
2008 @END
2011 /* Retrieve the process idle event */
2012 @REQ(get_process_idle_event)
2013 obj_handle_t handle; /* process handle */
2014 @REPLY
2015 obj_handle_t event; /* handle to idle event */
2016 @END
2019 /* Send a message to a thread queue */
2020 @REQ(send_message)
2021 thread_id_t id; /* thread id */
2022 int type; /* message type (see below) */
2023 int flags; /* message flags (see below) */
2024 user_handle_t win; /* window handle */
2025 unsigned int msg; /* message code */
2026 lparam_t wparam; /* parameters */
2027 lparam_t lparam; /* parameters */
2028 timeout_t timeout; /* timeout for reply */
2029 VARARG(data,message_data); /* message data for sent messages */
2030 @END
2032 @REQ(post_quit_message)
2033 int exit_code; /* exit code to return */
2034 @END
2036 enum message_type
2038 MSG_ASCII, /* Ascii message (from SendMessageA) */
2039 MSG_UNICODE, /* Unicode message (from SendMessageW) */
2040 MSG_NOTIFY, /* notify message (from SendNotifyMessageW), always Unicode */
2041 MSG_CALLBACK, /* callback message (from SendMessageCallbackW), always Unicode */
2042 MSG_CALLBACK_RESULT,/* result of a callback message */
2043 MSG_OTHER_PROCESS, /* sent from other process, may include vararg data, always Unicode */
2044 MSG_POSTED, /* posted message (from PostMessageW), always Unicode */
2045 MSG_HARDWARE, /* hardware message */
2046 MSG_WINEVENT, /* winevent message */
2047 MSG_HOOK_LL /* low-level hardware hook */
2049 #define SEND_MSG_ABORT_IF_HUNG 0x01
2052 /* Send a hardware message to a thread queue */
2053 @REQ(send_hardware_message)
2054 user_handle_t win; /* window handle */
2055 hw_input_t input; /* input data */
2056 unsigned int flags; /* flags (see below) */
2057 @REPLY
2058 int wait; /* do we need to wait for a reply? */
2059 int prev_x; /* previous cursor position */
2060 int prev_y;
2061 int new_x; /* new cursor position */
2062 int new_y;
2063 VARARG(keystate,bytes); /* global state array for all the keys */
2064 @END
2065 #define SEND_HWMSG_INJECTED 0x01
2068 /* Get a message from the current queue */
2069 @REQ(get_message)
2070 unsigned int flags; /* PM_* flags */
2071 user_handle_t get_win; /* window handle to get */
2072 unsigned int get_first; /* first message code to get */
2073 unsigned int get_last; /* last message code to get */
2074 unsigned int hw_id; /* id of the previous hardware message (or 0) */
2075 unsigned int wake_mask; /* wakeup bits mask */
2076 unsigned int changed_mask; /* changed bits mask */
2077 @REPLY
2078 user_handle_t win; /* window handle */
2079 unsigned int msg; /* message code */
2080 lparam_t wparam; /* parameters */
2081 lparam_t lparam; /* parameters */
2082 int type; /* message type */
2083 int x; /* message x position */
2084 int y; /* message y position */
2085 unsigned int time; /* message time */
2086 unsigned int active_hooks; /* active hooks bitmap */
2087 data_size_t total; /* total size of extra data */
2088 VARARG(data,message_data); /* message data for sent messages */
2089 @END
2092 /* Reply to a sent message */
2093 @REQ(reply_message)
2094 int remove; /* should we remove the message? */
2095 lparam_t result; /* message result */
2096 VARARG(data,bytes); /* message data for sent messages */
2097 @END
2100 /* Accept and remove the current hardware message */
2101 @REQ(accept_hardware_message)
2102 unsigned int hw_id; /* id of the hardware message */
2103 @END
2106 /* Retrieve the reply for the last message sent */
2107 @REQ(get_message_reply)
2108 int cancel; /* cancel message if not ready? */
2109 @REPLY
2110 lparam_t result; /* message result */
2111 VARARG(data,bytes); /* message data for sent messages */
2112 @END
2115 /* Set a window timer */
2116 @REQ(set_win_timer)
2117 user_handle_t win; /* window handle */
2118 unsigned int msg; /* message to post */
2119 unsigned int rate; /* timer rate in ms */
2120 lparam_t id; /* timer id */
2121 lparam_t lparam; /* message lparam (callback proc) */
2122 @REPLY
2123 lparam_t id; /* timer id */
2124 @END
2127 /* Kill a window timer */
2128 @REQ(kill_win_timer)
2129 user_handle_t win; /* window handle */
2130 lparam_t id; /* timer id */
2131 unsigned int msg; /* message to post */
2132 @END
2135 /* check if the thread owning the window is hung */
2136 @REQ(is_window_hung)
2137 user_handle_t win; /* window handle */
2138 @REPLY
2139 int is_hung;
2140 @END
2143 /* Retrieve info about a serial port */
2144 @REQ(get_serial_info)
2145 obj_handle_t handle; /* handle to comm port */
2146 int flags;
2147 @REPLY
2148 unsigned int eventmask;
2149 unsigned int cookie;
2150 unsigned int pending_write;
2151 @END
2154 /* Set info about a serial port */
2155 @REQ(set_serial_info)
2156 obj_handle_t handle; /* handle to comm port */
2157 int flags; /* bitmask to set values (see below) */
2158 @END
2159 #define SERIALINFO_PENDING_WRITE 0x04
2160 #define SERIALINFO_PENDING_WAIT 0x08
2163 /* Create an async I/O */
2164 @REQ(register_async)
2165 int type; /* type of queue to look after */
2166 async_data_t async; /* async I/O parameters */
2167 int count; /* count - usually # of bytes to be read/written */
2168 @END
2169 #define ASYNC_TYPE_READ 0x01
2170 #define ASYNC_TYPE_WRITE 0x02
2171 #define ASYNC_TYPE_WAIT 0x03
2174 /* Cancel all async op on a fd */
2175 @REQ(cancel_async)
2176 obj_handle_t handle; /* handle to comm port, socket or file */
2177 client_ptr_t iosb; /* I/O status block (NULL=all) */
2178 int only_thread; /* cancel matching this thread */
2179 @END
2182 /* Retrieve results of an async */
2183 @REQ(get_async_result)
2184 client_ptr_t user_arg; /* user arg used to identify async */
2185 @REPLY
2186 data_size_t size; /* result size (input or output depending on the operation) */
2187 VARARG(out_data,bytes); /* iosb output data */
2188 @END
2191 /* Perform a read on a file object */
2192 @REQ(read)
2193 async_data_t async; /* async I/O parameters */
2194 file_pos_t pos; /* read position */
2195 @REPLY
2196 obj_handle_t wait; /* handle to wait on for blocking read */
2197 unsigned int options; /* device open options */
2198 VARARG(data,bytes); /* read data */
2199 @END
2202 /* Perform a write on a file object */
2203 @REQ(write)
2204 async_data_t async; /* async I/O parameters */
2205 file_pos_t pos; /* write position */
2206 VARARG(data,bytes); /* write data */
2207 @REPLY
2208 obj_handle_t wait; /* handle to wait on for blocking write */
2209 unsigned int options; /* device open options */
2210 data_size_t size; /* size written */
2211 @END
2214 /* Perform an ioctl on a file */
2215 @REQ(ioctl)
2216 ioctl_code_t code; /* ioctl code */
2217 async_data_t async; /* async I/O parameters */
2218 VARARG(in_data,bytes); /* ioctl input data */
2219 @REPLY
2220 obj_handle_t wait; /* handle to wait on for blocking ioctl */
2221 unsigned int options; /* device open options */
2222 VARARG(out_data,bytes); /* ioctl output data */
2223 @END
2226 /* Store results of an async irp */
2227 @REQ(set_irp_result)
2228 obj_handle_t handle; /* handle to the irp */
2229 unsigned int status; /* status of the irp */
2230 data_size_t size; /* result size (input or output depending on the operation) */
2231 VARARG(data,bytes); /* output data of the irp */
2232 @END
2235 /* Create a named pipe */
2236 @REQ(create_named_pipe)
2237 unsigned int access;
2238 unsigned int options;
2239 unsigned int sharing;
2240 unsigned int maxinstances;
2241 unsigned int outsize;
2242 unsigned int insize;
2243 timeout_t timeout;
2244 unsigned int flags;
2245 VARARG(objattr,object_attributes); /* object attributes */
2246 @REPLY
2247 obj_handle_t handle; /* handle to the pipe */
2248 @END
2250 /* flags in create_named_pipe and get_named_pipe_info */
2251 #define NAMED_PIPE_MESSAGE_STREAM_WRITE 0x0001
2252 #define NAMED_PIPE_MESSAGE_STREAM_READ 0x0002
2253 #define NAMED_PIPE_NONBLOCKING_MODE 0x0004
2254 #define NAMED_PIPE_SERVER_END 0x8000
2256 /* Set named pipe information by handle */
2257 @REQ(set_named_pipe_info)
2258 obj_handle_t handle;
2259 unsigned int flags;
2260 @END
2262 /* Create a window */
2263 @REQ(create_window)
2264 user_handle_t parent; /* parent window */
2265 user_handle_t owner; /* owner window */
2266 atom_t atom; /* class atom */
2267 mod_handle_t instance; /* module instance */
2268 int dpi; /* system DPI */
2269 int awareness; /* thread DPI awareness */
2270 VARARG(class,unicode_str); /* class name */
2271 @REPLY
2272 user_handle_t handle; /* created window */
2273 user_handle_t parent; /* full handle of parent */
2274 user_handle_t owner; /* full handle of owner */
2275 int extra; /* number of extra bytes */
2276 client_ptr_t class_ptr; /* pointer to class in client address space */
2277 int dpi; /* window DPI if not per-monitor aware */
2278 int awareness; /* window DPI awareness */
2279 @END
2282 /* Destroy a window */
2283 @REQ(destroy_window)
2284 user_handle_t handle; /* handle to the window */
2285 @END
2288 /* Retrieve the desktop window for the current thread */
2289 @REQ(get_desktop_window)
2290 int force; /* force creation if it doesn't exist */
2291 @REPLY
2292 user_handle_t top_window; /* handle to the desktop window */
2293 user_handle_t msg_window; /* handle to the top-level HWND_MESSAGE parent */
2294 @END
2297 /* Set a window owner */
2298 @REQ(set_window_owner)
2299 user_handle_t handle; /* handle to the window */
2300 user_handle_t owner; /* new owner */
2301 @REPLY
2302 user_handle_t full_owner; /* full handle of new owner */
2303 user_handle_t prev_owner; /* full handle of previous owner */
2304 @END
2307 /* Get information from a window handle */
2308 @REQ(get_window_info)
2309 user_handle_t handle; /* handle to the window */
2310 @REPLY
2311 user_handle_t full_handle; /* full 32-bit handle */
2312 user_handle_t last_active; /* last active popup */
2313 process_id_t pid; /* process owning the window */
2314 thread_id_t tid; /* thread owning the window */
2315 atom_t atom; /* class atom */
2316 int is_unicode; /* ANSI or unicode */
2317 int dpi; /* window DPI */
2318 int awareness; /* DPI awareness */
2319 @END
2322 /* Set some information in a window */
2323 @REQ(set_window_info)
2324 unsigned short flags; /* flags for fields to set (see below) */
2325 short int is_unicode; /* ANSI or unicode */
2326 user_handle_t handle; /* handle to the window */
2327 unsigned int style; /* window style */
2328 unsigned int ex_style; /* window extended style */
2329 unsigned int id; /* window id */
2330 mod_handle_t instance; /* creator instance */
2331 lparam_t user_data; /* user-specific data */
2332 int extra_offset; /* offset to set in extra bytes */
2333 data_size_t extra_size; /* size to set in extra bytes */
2334 lparam_t extra_value; /* value to set in extra bytes */
2335 @REPLY
2336 unsigned int old_style; /* old window style */
2337 unsigned int old_ex_style; /* old window extended style */
2338 mod_handle_t old_instance; /* old creator instance */
2339 lparam_t old_user_data; /* old user-specific data */
2340 lparam_t old_extra_value; /* old value in extra bytes */
2341 unsigned int old_id; /* old window id */
2342 @END
2343 #define SET_WIN_STYLE 0x01
2344 #define SET_WIN_EXSTYLE 0x02
2345 #define SET_WIN_ID 0x04
2346 #define SET_WIN_INSTANCE 0x08
2347 #define SET_WIN_USERDATA 0x10
2348 #define SET_WIN_EXTRA 0x20
2349 #define SET_WIN_UNICODE 0x40
2352 /* Set the parent of a window */
2353 @REQ(set_parent)
2354 user_handle_t handle; /* handle to the window */
2355 user_handle_t parent; /* handle to the parent */
2356 @REPLY
2357 user_handle_t old_parent; /* old parent window */
2358 user_handle_t full_parent; /* full handle of new parent */
2359 int dpi; /* new window DPI if not per-monitor aware */
2360 int awareness; /* new DPI awareness */
2361 @END
2364 /* Get a list of the window parents, up to the root of the tree */
2365 @REQ(get_window_parents)
2366 user_handle_t handle; /* handle to the window */
2367 @REPLY
2368 int count; /* total count of parents */
2369 VARARG(parents,user_handles); /* parent handles */
2370 @END
2373 /* Get a list of the window children */
2374 @REQ(get_window_children)
2375 obj_handle_t desktop; /* handle to desktop */
2376 user_handle_t parent; /* parent window */
2377 atom_t atom; /* class atom for the listed children */
2378 thread_id_t tid; /* thread owning the listed children */
2379 VARARG(class,unicode_str); /* class name */
2380 @REPLY
2381 int count; /* total count of children */
2382 VARARG(children,user_handles); /* children handles */
2383 @END
2386 /* Get a list of the window children that contain a given point */
2387 @REQ(get_window_children_from_point)
2388 user_handle_t parent; /* parent window */
2389 int x; /* point in parent coordinates */
2390 int y;
2391 int dpi; /* dpi for the point coordinates */
2392 @REPLY
2393 int count; /* total count of children */
2394 VARARG(children,user_handles); /* children handles */
2395 @END
2398 /* Get window tree information from a window handle */
2399 @REQ(get_window_tree)
2400 user_handle_t handle; /* handle to the window */
2401 @REPLY
2402 user_handle_t parent; /* parent window */
2403 user_handle_t owner; /* owner window */
2404 user_handle_t next_sibling; /* next sibling in Z-order */
2405 user_handle_t prev_sibling; /* prev sibling in Z-order */
2406 user_handle_t first_sibling; /* first sibling in Z-order */
2407 user_handle_t last_sibling; /* last sibling in Z-order */
2408 user_handle_t first_child; /* first child */
2409 user_handle_t last_child; /* last child */
2410 @END
2412 /* Set the position and Z order of a window */
2413 @REQ(set_window_pos)
2414 unsigned short swp_flags; /* SWP_* flags */
2415 unsigned short paint_flags; /* paint flags (see below) */
2416 user_handle_t handle; /* handle to the window */
2417 user_handle_t previous; /* previous window in Z order */
2418 rectangle_t window; /* window rectangle (in parent coords) */
2419 rectangle_t client; /* client rectangle (in parent coords) */
2420 VARARG(valid,rectangles); /* valid rectangles from WM_NCCALCSIZE (in parent coords) */
2421 @REPLY
2422 unsigned int new_style; /* new window style */
2423 unsigned int new_ex_style; /* new window extended style */
2424 user_handle_t surface_win; /* parent window that holds the surface */
2425 int needs_update; /* whether the surface region needs an update */
2426 @END
2427 #define SET_WINPOS_PAINT_SURFACE 0x01 /* window has a paintable surface */
2428 #define SET_WINPOS_PIXEL_FORMAT 0x02 /* window has a custom pixel format */
2430 /* Get the window and client rectangles of a window */
2431 @REQ(get_window_rectangles)
2432 user_handle_t handle; /* handle to the window */
2433 int relative; /* coords relative to (see below) */
2434 int dpi; /* DPI to map to, or zero for per-monitor DPI */
2435 @REPLY
2436 rectangle_t window; /* window rectangle */
2437 rectangle_t client; /* client rectangle */
2438 @END
2439 enum coords_relative
2441 COORDS_CLIENT, /* relative to client area */
2442 COORDS_WINDOW, /* relative to whole window area */
2443 COORDS_PARENT, /* relative to parent's client area */
2444 COORDS_SCREEN /* relative to screen origin */
2448 /* Get the window text */
2449 @REQ(get_window_text)
2450 user_handle_t handle; /* handle to the window */
2451 @REPLY
2452 data_size_t length; /* total length in WCHARs */
2453 VARARG(text,unicode_str); /* window text */
2454 @END
2457 /* Set the window text */
2458 @REQ(set_window_text)
2459 user_handle_t handle; /* handle to the window */
2460 VARARG(text,unicode_str); /* window text */
2461 @END
2464 /* Get the coordinates offset between two windows */
2465 @REQ(get_windows_offset)
2466 user_handle_t from; /* handle to the first window */
2467 user_handle_t to; /* handle to the second window */
2468 int dpi; /* DPI to map to, or zero for per-monitor DPI */
2469 @REPLY
2470 int x; /* x coordinate offset */
2471 int y; /* y coordinate offset */
2472 int mirror; /* whether to mirror the x coordinate */
2473 @END
2476 /* Get the visible region of a window */
2477 @REQ(get_visible_region)
2478 user_handle_t window; /* handle to the window */
2479 unsigned int flags; /* DCX flags */
2480 @REPLY
2481 user_handle_t top_win; /* top window to clip against */
2482 rectangle_t top_rect; /* top window visible rect with screen coords */
2483 rectangle_t win_rect; /* window rect in screen coords */
2484 unsigned int paint_flags; /* paint flags (from SET_WINPOS_* flags) */
2485 data_size_t total_size; /* total size of the resulting region */
2486 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2487 @END
2490 /* Get the visible surface region of a window */
2491 @REQ(get_surface_region)
2492 user_handle_t window; /* handle to the window */
2493 @REPLY
2494 rectangle_t visible_rect; /* window visible rect in screen coords */
2495 data_size_t total_size; /* total size of the resulting region */
2496 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2497 @END
2500 /* Get the window region */
2501 @REQ(get_window_region)
2502 user_handle_t window; /* handle to the window */
2503 @REPLY
2504 data_size_t total_size; /* total size of the resulting region */
2505 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2506 @END
2509 /* Set the window region */
2510 @REQ(set_window_region)
2511 user_handle_t window; /* handle to the window */
2512 int redraw; /* redraw the window? */
2513 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2514 @END
2517 /* Get the window update region */
2518 @REQ(get_update_region)
2519 user_handle_t window; /* handle to the window */
2520 user_handle_t from_child; /* child to start searching from */
2521 unsigned int flags; /* update flags (see below) */
2522 @REPLY
2523 user_handle_t child; /* child to repaint (or window itself) */
2524 unsigned int flags; /* resulting update flags (see below) */
2525 data_size_t total_size; /* total size of the resulting region */
2526 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2527 @END
2528 #define UPDATE_NONCLIENT 0x001 /* get region for repainting non-client area */
2529 #define UPDATE_ERASE 0x002 /* get region for erasing client area */
2530 #define UPDATE_PAINT 0x004 /* get region for painting client area */
2531 #define UPDATE_INTERNALPAINT 0x008 /* get region if internal paint is pending */
2532 #define UPDATE_ALLCHILDREN 0x010 /* force repaint of all children */
2533 #define UPDATE_NOCHILDREN 0x020 /* don't try to repaint any children */
2534 #define UPDATE_NOREGION 0x040 /* don't return a region, only the flags */
2535 #define UPDATE_DELAYED_ERASE 0x080 /* still needs erase after BeginPaint */
2536 #define UPDATE_CLIPCHILDREN 0x100 /* remove clipped children from the update region */
2539 /* Update the z order of a window so that a given rectangle is fully visible */
2540 @REQ(update_window_zorder)
2541 user_handle_t window; /* handle to the window */
2542 rectangle_t rect; /* rectangle that must be visible (in client coords) */
2543 @END
2546 /* Mark parts of a window as needing a redraw */
2547 @REQ(redraw_window)
2548 user_handle_t window; /* handle to the window */
2549 unsigned int flags; /* RDW_* flags */
2550 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2551 @END
2554 /* Set a window property */
2555 @REQ(set_window_property)
2556 user_handle_t window; /* handle to the window */
2557 lparam_t data; /* data to store */
2558 atom_t atom; /* property atom (if no name specified) */
2559 VARARG(name,unicode_str); /* property name */
2560 @END
2563 /* Remove a window property */
2564 @REQ(remove_window_property)
2565 user_handle_t window; /* handle to the window */
2566 atom_t atom; /* property atom (if no name specified) */
2567 VARARG(name,unicode_str); /* property name */
2568 @REPLY
2569 lparam_t data; /* data stored in property */
2570 @END
2573 /* Get a window property */
2574 @REQ(get_window_property)
2575 user_handle_t window; /* handle to the window */
2576 atom_t atom; /* property atom (if no name specified) */
2577 VARARG(name,unicode_str); /* property name */
2578 @REPLY
2579 lparam_t data; /* data stored in property */
2580 @END
2583 /* Get the list of properties of a window */
2584 @REQ(get_window_properties)
2585 user_handle_t window; /* handle to the window */
2586 @REPLY
2587 int total; /* total number of properties */
2588 VARARG(props,properties); /* list of properties */
2589 @END
2592 /* Create a window station */
2593 @REQ(create_winstation)
2594 unsigned int flags; /* window station flags */
2595 unsigned int access; /* wanted access rights */
2596 unsigned int attributes; /* object attributes */
2597 obj_handle_t rootdir; /* root directory */
2598 VARARG(name,unicode_str); /* object name */
2599 @REPLY
2600 obj_handle_t handle; /* handle to the window station */
2601 @END
2604 /* Open a handle to a window station */
2605 @REQ(open_winstation)
2606 unsigned int access; /* wanted access rights */
2607 unsigned int attributes; /* object attributes */
2608 obj_handle_t rootdir; /* root directory */
2609 VARARG(name,unicode_str); /* object name */
2610 @REPLY
2611 obj_handle_t handle; /* handle to the window station */
2612 @END
2615 /* Close a window station */
2616 @REQ(close_winstation)
2617 obj_handle_t handle; /* handle to the window station */
2618 @END
2621 /* Get the process current window station */
2622 @REQ(get_process_winstation)
2623 @REPLY
2624 obj_handle_t handle; /* handle to the window station */
2625 @END
2628 /* Set the process current window station */
2629 @REQ(set_process_winstation)
2630 obj_handle_t handle; /* handle to the window station */
2631 @END
2634 /* Enumerate window stations */
2635 @REQ(enum_winstation)
2636 unsigned int index; /* current index */
2637 @REPLY
2638 unsigned int next; /* next index */
2639 VARARG(name,unicode_str); /* window station name */
2640 @END
2643 /* Create a desktop */
2644 @REQ(create_desktop)
2645 unsigned int flags; /* desktop flags */
2646 unsigned int access; /* wanted access rights */
2647 unsigned int attributes; /* object attributes */
2648 VARARG(name,unicode_str); /* object name */
2649 @REPLY
2650 obj_handle_t handle; /* handle to the desktop */
2651 @END
2654 /* Open a handle to a desktop */
2655 @REQ(open_desktop)
2656 obj_handle_t winsta; /* window station to open (null allowed) */
2657 unsigned int flags; /* desktop flags */
2658 unsigned int access; /* wanted access rights */
2659 unsigned int attributes; /* object attributes */
2660 VARARG(name,unicode_str); /* object name */
2661 @REPLY
2662 obj_handle_t handle; /* handle to the desktop */
2663 @END
2666 /* Open a handle to current input desktop */
2667 @REQ(open_input_desktop)
2668 unsigned int flags; /* desktop flags */
2669 unsigned int access; /* wanted access rights */
2670 unsigned int attributes; /* object attributes */
2671 @REPLY
2672 obj_handle_t handle; /* handle to the desktop */
2673 @END
2676 /* Close a desktop */
2677 @REQ(close_desktop)
2678 obj_handle_t handle; /* handle to the desktop */
2679 @END
2682 /* Get the thread current desktop */
2683 @REQ(get_thread_desktop)
2684 thread_id_t tid; /* thread id */
2685 @REPLY
2686 obj_handle_t handle; /* handle to the desktop */
2687 @END
2690 /* Set the thread current desktop */
2691 @REQ(set_thread_desktop)
2692 obj_handle_t handle; /* handle to the desktop */
2693 @END
2696 /* Enumerate desktops */
2697 @REQ(enum_desktop)
2698 obj_handle_t winstation; /* handle to the window station */
2699 unsigned int index; /* current index */
2700 @REPLY
2701 unsigned int next; /* next index */
2702 VARARG(name,unicode_str); /* window station name */
2703 @END
2706 /* Get/set information about a user object (window station or desktop) */
2707 @REQ(set_user_object_info)
2708 obj_handle_t handle; /* handle to the object */
2709 unsigned int flags; /* information to set/get */
2710 unsigned int obj_flags; /* new object flags */
2711 @REPLY
2712 int is_desktop; /* is object a desktop? */
2713 unsigned int old_obj_flags; /* old object flags */
2714 VARARG(name,unicode_str); /* object name */
2715 @END
2716 #define SET_USER_OBJECT_SET_FLAGS 1
2717 #define SET_USER_OBJECT_GET_FULL_NAME 2
2720 /* Register a hotkey */
2721 @REQ(register_hotkey)
2722 user_handle_t window; /* handle to the window */
2723 int id; /* hotkey identifier */
2724 unsigned int flags; /* modifier keys */
2725 unsigned int vkey; /* virtual key code */
2726 @REPLY
2727 int replaced; /* did we replace an existing hotkey? */
2728 unsigned int flags; /* flags of replaced hotkey */
2729 unsigned int vkey; /* virtual key code of replaced hotkey */
2730 @END
2733 /* Unregister a hotkey */
2734 @REQ(unregister_hotkey)
2735 user_handle_t window; /* handle to the window */
2736 int id; /* hotkey identifier */
2737 @REPLY
2738 unsigned int flags; /* flags of removed hotkey */
2739 unsigned int vkey; /* virtual key code of removed hotkey */
2740 @END
2743 /* Attach (or detach) thread inputs */
2744 @REQ(attach_thread_input)
2745 thread_id_t tid_from; /* thread to be attached */
2746 thread_id_t tid_to; /* thread to which tid_from should be attached */
2747 int attach; /* is it an attach? */
2748 @END
2751 /* Get input data for a given thread */
2752 @REQ(get_thread_input)
2753 thread_id_t tid; /* id of thread */
2754 @REPLY
2755 user_handle_t focus; /* handle to the focus window */
2756 user_handle_t capture; /* handle to the capture window */
2757 user_handle_t active; /* handle to the active window */
2758 user_handle_t foreground; /* handle to the global foreground window */
2759 user_handle_t menu_owner; /* handle to the menu owner */
2760 user_handle_t move_size; /* handle to the moving/resizing window */
2761 user_handle_t caret; /* handle to the caret window */
2762 user_handle_t cursor; /* handle to the cursor */
2763 int show_count; /* cursor show count */
2764 rectangle_t rect; /* caret rectangle */
2765 @END
2768 /* Get the time of the last input event */
2769 @REQ(get_last_input_time)
2770 @REPLY
2771 unsigned int time;
2772 @END
2775 /* Retrieve queue keyboard state for current thread or global async state */
2776 @REQ(get_key_state)
2777 int async; /* whether to query the async state */
2778 int key; /* optional key code or -1 */
2779 @REPLY
2780 unsigned char state; /* state of specified key */
2781 VARARG(keystate,bytes); /* state array for all the keys */
2782 @END
2784 /* Set queue keyboard state for current thread */
2785 @REQ(set_key_state)
2786 int async; /* whether to change the async state too */
2787 VARARG(keystate,bytes); /* state array for all the keys */
2788 @END
2790 /* Set the system foreground window */
2791 @REQ(set_foreground_window)
2792 user_handle_t handle; /* handle to the foreground window */
2793 @REPLY
2794 user_handle_t previous; /* handle to the previous foreground window */
2795 int send_msg_old; /* whether we have to send a msg to the old window */
2796 int send_msg_new; /* whether we have to send a msg to the new window */
2797 @END
2799 /* Set the current thread focus window */
2800 @REQ(set_focus_window)
2801 user_handle_t handle; /* handle to the focus window */
2802 @REPLY
2803 user_handle_t previous; /* handle to the previous focus window */
2804 @END
2806 /* Set the current thread active window */
2807 @REQ(set_active_window)
2808 user_handle_t handle; /* handle to the active window */
2809 @REPLY
2810 user_handle_t previous; /* handle to the previous active window */
2811 @END
2813 /* Set the current thread capture window */
2814 @REQ(set_capture_window)
2815 user_handle_t handle; /* handle to the capture window */
2816 unsigned int flags; /* capture flags (see below) */
2817 @REPLY
2818 user_handle_t previous; /* handle to the previous capture window */
2819 user_handle_t full_handle; /* full 32-bit handle of new capture window */
2820 @END
2821 #define CAPTURE_MENU 0x01 /* capture is for a menu */
2822 #define CAPTURE_MOVESIZE 0x02 /* capture is for moving/resizing */
2825 /* Set the current thread caret window */
2826 @REQ(set_caret_window)
2827 user_handle_t handle; /* handle to the caret window */
2828 int width; /* caret width */
2829 int height; /* caret height */
2830 @REPLY
2831 user_handle_t previous; /* handle to the previous caret window */
2832 rectangle_t old_rect; /* previous caret rectangle */
2833 int old_hide; /* previous hide count */
2834 int old_state; /* previous caret state (1=on, 0=off) */
2835 @END
2838 /* Set the current thread caret information */
2839 @REQ(set_caret_info)
2840 unsigned int flags; /* caret flags (see below) */
2841 user_handle_t handle; /* handle to the caret window */
2842 int x; /* caret x position */
2843 int y; /* caret y position */
2844 int hide; /* increment for hide count (can be negative to show it) */
2845 int state; /* caret state (see below) */
2846 @REPLY
2847 user_handle_t full_handle; /* handle to the current caret window */
2848 rectangle_t old_rect; /* previous caret rectangle */
2849 int old_hide; /* previous hide count */
2850 int old_state; /* previous caret state (1=on, 0=off) */
2851 @END
2852 #define SET_CARET_POS 0x01 /* set the caret position from x,y */
2853 #define SET_CARET_HIDE 0x02 /* increment the caret hide count */
2854 #define SET_CARET_STATE 0x04 /* set the caret on/off state */
2855 enum caret_state
2857 CARET_STATE_OFF, /* off */
2858 CARET_STATE_ON, /* on */
2859 CARET_STATE_TOGGLE, /* toggle current state */
2860 CARET_STATE_ON_IF_MOVED /* on if the position differs, unchanged otherwise */
2864 /* Set a window hook */
2865 @REQ(set_hook)
2866 int id; /* id of the hook */
2867 process_id_t pid; /* id of process to set the hook into */
2868 thread_id_t tid; /* id of thread to set the hook into */
2869 int event_min;
2870 int event_max;
2871 client_ptr_t proc; /* hook procedure */
2872 int flags;
2873 int unicode; /* is it a unicode hook? */
2874 VARARG(module,unicode_str); /* module name */
2875 @REPLY
2876 user_handle_t handle; /* handle to the hook */
2877 unsigned int active_hooks; /* active hooks bitmap */
2878 @END
2881 /* Remove a window hook */
2882 @REQ(remove_hook)
2883 user_handle_t handle; /* handle to the hook */
2884 client_ptr_t proc; /* hook procedure if handle is 0 */
2885 int id; /* id of the hook if handle is 0 */
2886 @REPLY
2887 unsigned int active_hooks; /* active hooks bitmap */
2888 @END
2891 /* Start calling a hook chain */
2892 @REQ(start_hook_chain)
2893 int id; /* id of the hook */
2894 int event; /* signalled event */
2895 user_handle_t window; /* handle to the event window */
2896 int object_id; /* object id for out of context winevent */
2897 int child_id; /* child id for out of context winevent */
2898 @REPLY
2899 user_handle_t handle; /* handle to the next hook */
2900 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2901 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2902 int unicode; /* is it a unicode hook? */
2903 client_ptr_t proc; /* hook procedure */
2904 unsigned int active_hooks; /* active hooks bitmap */
2905 VARARG(module,unicode_str); /* module name */
2906 @END
2909 /* Finished calling a hook chain */
2910 @REQ(finish_hook_chain)
2911 int id; /* id of the hook */
2912 @END
2915 /* Get the hook information */
2916 @REQ(get_hook_info)
2917 user_handle_t handle; /* handle to the current hook */
2918 int get_next; /* do we want info about current or next hook? */
2919 int event; /* signalled event */
2920 user_handle_t window; /* handle to the event window */
2921 int object_id; /* object id for out of context winevent */
2922 int child_id; /* child id for out of context winevent */
2923 @REPLY
2924 user_handle_t handle; /* handle to the hook */
2925 int id; /* id of the hook */
2926 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2927 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2928 client_ptr_t proc; /* hook procedure */
2929 int unicode; /* is it a unicode hook? */
2930 VARARG(module,unicode_str); /* module name */
2931 @END
2934 /* Create a window class */
2935 @REQ(create_class)
2936 int local; /* is it a local class? */
2937 atom_t atom; /* class atom */
2938 unsigned int style; /* class style */
2939 mod_handle_t instance; /* module instance */
2940 int extra; /* number of extra class bytes */
2941 int win_extra; /* number of window extra bytes */
2942 client_ptr_t client_ptr; /* pointer to class in client address space */
2943 data_size_t name_offset; /* base class name offset for specified atom */
2944 VARARG(name,unicode_str); /* class name */
2945 @REPLY
2946 atom_t atom; /* resulting class atom */
2947 @END
2950 /* Destroy a window class */
2951 @REQ(destroy_class)
2952 atom_t atom; /* class atom */
2953 mod_handle_t instance; /* module instance */
2954 VARARG(name,unicode_str); /* class name */
2955 @REPLY
2956 client_ptr_t client_ptr; /* pointer to class in client address space */
2957 @END
2960 /* Set some information in a class */
2961 @REQ(set_class_info)
2962 user_handle_t window; /* handle to the window */
2963 unsigned int flags; /* flags for info to set (see below) */
2964 atom_t atom; /* class atom */
2965 unsigned int style; /* class style */
2966 int win_extra; /* number of window extra bytes */
2967 mod_handle_t instance; /* module instance */
2968 int extra_offset; /* offset to set in extra bytes */
2969 data_size_t extra_size; /* size to set in extra bytes */
2970 lparam_t extra_value; /* value to set in extra bytes */
2971 @REPLY
2972 atom_t old_atom; /* previous class atom */
2973 atom_t base_atom; /* base class atom */
2974 mod_handle_t old_instance; /* previous module instance */
2975 lparam_t old_extra_value; /* old value in extra bytes */
2976 unsigned int old_style; /* previous class style */
2977 int old_extra; /* previous number of class extra bytes */
2978 int old_win_extra; /* previous number of window extra bytes */
2979 @END
2980 #define SET_CLASS_ATOM 0x0001
2981 #define SET_CLASS_STYLE 0x0002
2982 #define SET_CLASS_WINEXTRA 0x0004
2983 #define SET_CLASS_INSTANCE 0x0008
2984 #define SET_CLASS_EXTRA 0x0010
2987 /* Open the clipboard */
2988 @REQ(open_clipboard)
2989 user_handle_t window; /* clipboard window */
2990 @REPLY
2991 user_handle_t owner; /* current clipboard owner */
2992 @END
2995 /* Close the clipboard */
2996 @REQ(close_clipboard)
2997 @REPLY
2998 user_handle_t viewer; /* first clipboard viewer */
2999 user_handle_t owner; /* current clipboard owner */
3000 @END
3003 /* Empty the clipboard and grab ownership */
3004 @REQ(empty_clipboard)
3005 @END
3008 /* Add a data format to the clipboard */
3009 @REQ(set_clipboard_data)
3010 unsigned int format; /* clipboard format of the data */
3011 unsigned int lcid; /* locale id to use for synthesizing text formats */
3012 VARARG(data,bytes); /* data contents */
3013 @REPLY
3014 unsigned int seqno; /* sequence number for the set data */
3015 @END
3018 /* Fetch a data format from the clipboard */
3019 @REQ(get_clipboard_data)
3020 unsigned int format; /* clipboard format of the data */
3021 int render; /* will we try to render it if missing? */
3022 int cached; /* do we already have it in the client-side cache? */
3023 unsigned int seqno; /* sequence number for the data in the cache */
3024 @REPLY
3025 unsigned int from; /* for synthesized data, format to generate it from */
3026 user_handle_t owner; /* clipboard owner for delayed-rendered formats */
3027 unsigned int seqno; /* sequence number for the originally set data */
3028 data_size_t total; /* total data size */
3029 VARARG(data,bytes); /* data contents */
3030 @END
3033 /* Retrieve a list of available formats */
3034 @REQ(get_clipboard_formats)
3035 unsigned int format; /* specific format to query, return all if 0 */
3036 @REPLY
3037 unsigned int count; /* count of available formats */
3038 VARARG(formats,uints); /* array of available formats */
3039 @END
3042 /* Retrieve the next available format */
3043 @REQ(enum_clipboard_formats)
3044 unsigned int previous; /* previous format, or first if 0 */
3045 @REPLY
3046 unsigned int format; /* next format */
3047 @END
3050 /* Release ownership of the clipboard */
3051 @REQ(release_clipboard)
3052 user_handle_t owner; /* clipboard owner to release */
3053 @REPLY
3054 user_handle_t viewer; /* first clipboard viewer */
3055 user_handle_t owner; /* current clipboard owner */
3056 @END
3059 /* Get clipboard information */
3060 @REQ(get_clipboard_info)
3061 @REPLY
3062 user_handle_t window; /* clipboard window */
3063 user_handle_t owner; /* clipboard owner */
3064 user_handle_t viewer; /* clipboard viewer */
3065 unsigned int seqno; /* current sequence number */
3066 @END
3069 /* Set the clipboard viewer window */
3070 @REQ(set_clipboard_viewer)
3071 user_handle_t viewer; /* clipboard viewer */
3072 user_handle_t previous; /* if non-zero, check that this was the previous viewer */
3073 @REPLY
3074 user_handle_t old_viewer; /* previous clipboard viewer */
3075 user_handle_t owner; /* clipboard owner */
3076 @END
3079 /* Add a clipboard listener window */
3080 @REQ(add_clipboard_listener)
3081 user_handle_t window; /* clipboard listener window */
3082 @END
3085 /* Remove a clipboard listener window */
3086 @REQ(remove_clipboard_listener)
3087 user_handle_t window; /* clipboard listener window */
3088 @END
3091 /* Open a security token */
3092 @REQ(open_token)
3093 obj_handle_t handle; /* handle to the thread or process */
3094 unsigned int access; /* access rights to the new token */
3095 unsigned int attributes;/* object attributes */
3096 unsigned int flags; /* flags (see below) */
3097 @REPLY
3098 obj_handle_t token; /* handle to the token */
3099 @END
3100 #define OPEN_TOKEN_THREAD 1
3101 #define OPEN_TOKEN_AS_SELF 2
3104 /* Set/get the global windows */
3105 @REQ(set_global_windows)
3106 unsigned int flags; /* flags for fields to set (see below) */
3107 user_handle_t shell_window; /* handle to the new shell window */
3108 user_handle_t shell_listview; /* handle to the new shell listview window */
3109 user_handle_t progman_window; /* handle to the new program manager window */
3110 user_handle_t taskman_window; /* handle to the new task manager window */
3111 @REPLY
3112 user_handle_t old_shell_window; /* handle to the shell window */
3113 user_handle_t old_shell_listview; /* handle to the shell listview window */
3114 user_handle_t old_progman_window; /* handle to the new program manager window */
3115 user_handle_t old_taskman_window; /* handle to the new task manager window */
3116 @END
3117 #define SET_GLOBAL_SHELL_WINDOWS 0x01 /* set both main shell and listview windows */
3118 #define SET_GLOBAL_PROGMAN_WINDOW 0x02
3119 #define SET_GLOBAL_TASKMAN_WINDOW 0x04
3121 /* Adjust the privileges held by a token */
3122 @REQ(adjust_token_privileges)
3123 obj_handle_t handle; /* handle to the token */
3124 int disable_all; /* disable all privileges? */
3125 int get_modified_state; /* get modified privileges? */
3126 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to enable/disable/remove */
3127 @REPLY
3128 unsigned int len; /* total length in bytes required to store token privileges */
3129 VARARG(privileges,LUID_AND_ATTRIBUTES); /* modified privileges */
3130 @END
3132 /* Retrieves the set of privileges held by or available to a token */
3133 @REQ(get_token_privileges)
3134 obj_handle_t handle; /* handle to the token */
3135 @REPLY
3136 unsigned int len; /* total length in bytes required to store token privileges */
3137 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
3138 @END
3140 /* Check the token has the required privileges */
3141 @REQ(check_token_privileges)
3142 obj_handle_t handle; /* handle to the token */
3143 int all_required; /* are all the privileges required for the check to succeed? */
3144 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to check */
3145 @REPLY
3146 int has_privileges; /* does the token have the required privileges? */
3147 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
3148 @END
3150 @REQ(duplicate_token)
3151 obj_handle_t handle; /* handle to the token to duplicate */
3152 unsigned int access; /* access rights to the new token */
3153 int primary; /* is the new token to be a primary one? */
3154 int impersonation_level; /* impersonation level of the new token */
3155 VARARG(objattr,object_attributes); /* object attributes */
3156 @REPLY
3157 obj_handle_t new_handle; /* duplicated handle */
3158 @END
3160 @REQ(filter_token)
3161 obj_handle_t handle; /* handle to the token to duplicate */
3162 unsigned int flags; /* flags */
3163 data_size_t privileges_size; /* size of privileges */
3164 VARARG(privileges,LUID_AND_ATTRIBUTES,privileges_size); /* privileges to remove from new token */
3165 VARARG(disable_sids,SID); /* array of groups to remove from new token */
3166 @REPLY
3167 obj_handle_t new_handle; /* filtered handle */
3168 @END
3170 @REQ(access_check)
3171 obj_handle_t handle; /* handle to the token */
3172 unsigned int desired_access; /* desired access to the object */
3173 generic_map_t mapping; /* mapping to specific rights */
3174 VARARG(sd,security_descriptor); /* security descriptor to check */
3175 @REPLY
3176 unsigned int access_granted; /* access rights actually granted */
3177 unsigned int access_status; /* was access granted? */
3178 unsigned int privileges_len; /* length needed to store privileges */
3179 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges used during access check */
3180 @END
3182 @REQ(get_token_sid)
3183 obj_handle_t handle; /* handle to the token */
3184 unsigned int which_sid; /* which SID to retrieve from the token */
3185 @REPLY
3186 data_size_t sid_len; /* length needed to store sid */
3187 VARARG(sid,SID); /* the sid specified by which_sid from the token */
3188 @END
3190 @REQ(get_token_groups)
3191 obj_handle_t handle; /* handle to the token */
3192 @REPLY
3193 data_size_t user_len; /* length needed to store user */
3194 VARARG(user,token_groups); /* groups the token's user belongs to */
3195 @END
3197 @REQ(get_token_default_dacl)
3198 obj_handle_t handle; /* handle to the token */
3199 @REPLY
3200 data_size_t acl_len; /* length needed to store access control list */
3201 VARARG(acl,ACL); /* access control list */
3202 @END
3204 @REQ(set_token_default_dacl)
3205 obj_handle_t handle; /* handle to the token */
3206 VARARG(acl,ACL); /* default dacl to set */
3207 @END
3209 @REQ(set_security_object)
3210 obj_handle_t handle; /* handle to the object */
3211 unsigned int security_info; /* which parts of security descriptor to set */
3212 VARARG(sd,security_descriptor); /* security descriptor to set */
3213 @END
3215 @REQ(get_security_object)
3216 obj_handle_t handle; /* handle to the object */
3217 unsigned int security_info; /* which parts of security descriptor to get */
3218 @REPLY
3219 unsigned int sd_len; /* buffer size needed for sd */
3220 VARARG(sd,security_descriptor); /* retrieved security descriptor */
3221 @END
3224 struct handle_info
3226 process_id_t owner;
3227 obj_handle_t handle;
3228 unsigned int access;
3229 unsigned int attributes;
3230 unsigned int type;
3233 /* Return a list of all opened handles */
3234 @REQ(get_system_handles)
3235 @REPLY
3236 unsigned int count; /* number of handles */
3237 VARARG(data,handle_infos); /* array of handle_infos */
3238 @END
3241 /* Create a mailslot */
3242 @REQ(create_mailslot)
3243 unsigned int access; /* wanted access rights */
3244 timeout_t read_timeout;
3245 unsigned int max_msgsize;
3246 VARARG(objattr,object_attributes); /* object attributes */
3247 @REPLY
3248 obj_handle_t handle; /* handle to the mailslot */
3249 @END
3252 /* Set mailslot information */
3253 @REQ(set_mailslot_info)
3254 obj_handle_t handle; /* handle to the mailslot */
3255 timeout_t read_timeout;
3256 unsigned int flags;
3257 @REPLY
3258 timeout_t read_timeout;
3259 unsigned int max_msgsize;
3260 @END
3261 #define MAILSLOT_SET_READ_TIMEOUT 1
3264 /* Create a directory object */
3265 @REQ(create_directory)
3266 unsigned int access; /* access flags */
3267 VARARG(objattr,object_attributes); /* object attributes */
3268 @REPLY
3269 obj_handle_t handle; /* handle to the directory */
3270 @END
3273 /* Open a directory object */
3274 @REQ(open_directory)
3275 unsigned int access; /* access flags */
3276 unsigned int attributes; /* object attributes */
3277 obj_handle_t rootdir; /* root directory */
3278 VARARG(directory_name,unicode_str); /* Directory name */
3279 @REPLY
3280 obj_handle_t handle; /* handle to the directory */
3281 @END
3284 /* Get a directory entry by index */
3285 @REQ(get_directory_entry)
3286 obj_handle_t handle; /* handle to the directory */
3287 unsigned int index; /* entry index */
3288 @REPLY
3289 data_size_t name_len; /* length of the entry name in bytes */
3290 VARARG(name,unicode_str,name_len); /* entry name */
3291 VARARG(type,unicode_str); /* entry type */
3292 @END
3295 /* Create a symbolic link object */
3296 @REQ(create_symlink)
3297 unsigned int access; /* access flags */
3298 VARARG(objattr,object_attributes); /* object attributes */
3299 VARARG(target_name,unicode_str); /* target name */
3300 @REPLY
3301 obj_handle_t handle; /* handle to the symlink */
3302 @END
3305 /* Open a symbolic link object */
3306 @REQ(open_symlink)
3307 unsigned int access; /* access flags */
3308 unsigned int attributes; /* object attributes */
3309 obj_handle_t rootdir; /* root directory */
3310 VARARG(name,unicode_str); /* symlink name */
3311 @REPLY
3312 obj_handle_t handle; /* handle to the symlink */
3313 @END
3316 /* Query a symbolic link object */
3317 @REQ(query_symlink)
3318 obj_handle_t handle; /* handle to the symlink */
3319 @REPLY
3320 data_size_t total; /* total needed size for name */
3321 VARARG(target_name,unicode_str); /* target name */
3322 @END
3325 /* Query basic object information */
3326 @REQ(get_object_info)
3327 obj_handle_t handle; /* handle to the object */
3328 @REPLY
3329 unsigned int access; /* granted access mask */
3330 unsigned int ref_count; /* object ref count */
3331 unsigned int handle_count; /* object handle count */
3332 data_size_t total; /* total needed size for name */
3333 VARARG(name,unicode_str); /* object name */
3334 @END
3337 /* Query object type name information */
3338 @REQ(get_object_type)
3339 obj_handle_t handle; /* handle to the object */
3340 @REPLY
3341 VARARG(info,object_type_info); /* type information */
3342 @END
3345 /* Query type information for all types */
3346 @REQ(get_object_types)
3347 @REPLY
3348 int count; /* total count of object types */
3349 VARARG(info,object_types_info); /* type information */
3350 @END
3353 /* Allocate a locally-unique identifier */
3354 @REQ(allocate_locally_unique_id)
3355 @REPLY
3356 luid_t luid;
3357 @END
3360 /* Create a device manager */
3361 @REQ(create_device_manager)
3362 unsigned int access; /* wanted access rights */
3363 unsigned int attributes; /* object attributes */
3364 @REPLY
3365 obj_handle_t handle; /* handle to the device */
3366 @END
3369 /* Create a device */
3370 @REQ(create_device)
3371 obj_handle_t rootdir; /* root directory */
3372 client_ptr_t user_ptr; /* opaque ptr for use by client */
3373 obj_handle_t manager; /* device manager */
3374 VARARG(name,unicode_str); /* object name */
3375 @END
3378 /* Delete a device */
3379 @REQ(delete_device)
3380 obj_handle_t manager; /* handle to the device manager */
3381 client_ptr_t device; /* pointer to the device */
3382 @END
3385 /* Retrieve the next pending device irp request */
3386 @REQ(get_next_device_request)
3387 obj_handle_t manager; /* handle to the device manager */
3388 obj_handle_t prev; /* handle to the previous irp */
3389 unsigned int status; /* status of the previous irp */
3390 client_ptr_t user_ptr; /* user pointer of the previous irp */
3391 @REPLY
3392 irp_params_t params; /* irp parameters */
3393 obj_handle_t next; /* handle to the next irp */
3394 thread_id_t client_tid; /* tid of thread calling irp */
3395 client_ptr_t client_thread; /* pointer to thread object of calling irp */
3396 data_size_t in_size; /* total needed input size */
3397 VARARG(next_data,bytes); /* input data of the next irp */
3398 @END
3401 /* Get kernel pointer from server object */
3402 @REQ(get_kernel_object_ptr)
3403 obj_handle_t manager; /* handle to the device manager */
3404 obj_handle_t handle; /* object handle */
3405 @REPLY
3406 client_ptr_t user_ptr; /* kernel object pointer */
3407 @END
3410 /* Associate kernel pointer with server object */
3411 @REQ(set_kernel_object_ptr)
3412 obj_handle_t manager; /* handle to the device manager */
3413 obj_handle_t handle; /* object handle */
3414 client_ptr_t user_ptr; /* kernel object pointer */
3415 @END
3418 /* Grab server object reference from kernel object pointer */
3419 @REQ(grab_kernel_object)
3420 obj_handle_t manager; /* handle to the device manager */
3421 client_ptr_t user_ptr; /* kernel object pointer */
3422 @END
3425 /* Release server object reference from kernel object pointer */
3426 @REQ(release_kernel_object)
3427 obj_handle_t manager; /* handle to the device manager */
3428 client_ptr_t user_ptr; /* kernel object pointer */
3429 @END
3432 /* Get handle from kernel object pointer */
3433 @REQ(get_kernel_object_handle)
3434 obj_handle_t manager; /* handle to the device manager */
3435 client_ptr_t user_ptr; /* kernel object pointer */
3436 unsigned int access; /* wanted access rights */
3437 @REPLY
3438 obj_handle_t handle; /* kernel object handle */
3439 @END
3442 /* Make the current process a system process */
3443 @REQ(make_process_system)
3444 obj_handle_t handle; /* handle to the process */
3445 @REPLY
3446 obj_handle_t event; /* event signaled when all user processes have exited */
3447 @END
3450 /* Get detailed fixed-size information about a token */
3451 @REQ(get_token_info)
3452 obj_handle_t handle; /* handle to the object */
3453 @REPLY
3454 luid_t token_id; /* locally-unique identifier of the token */
3455 luid_t modified_id; /* locally-unique identifier of the modified version of the token */
3456 int primary; /* is the token primary or impersonation? */
3457 int impersonation_level; /* level of impersonation */
3458 int elevation; /* elevation type */
3459 int group_count; /* the number of groups the token is a member of */
3460 int privilege_count; /* the number of privileges the token has */
3461 @END
3464 /* Create a token which is an elevation counterpart to this token */
3465 @REQ(create_linked_token)
3466 obj_handle_t handle; /* handle to the token */
3467 @REPLY
3468 obj_handle_t linked; /* handle to the linked token */
3469 @END
3472 /* Create I/O completion port */
3473 @REQ(create_completion)
3474 unsigned int access; /* desired access to a port */
3475 unsigned int concurrent; /* max number of concurrent active threads */
3476 VARARG(objattr,object_attributes); /* object attributes */
3477 @REPLY
3478 obj_handle_t handle; /* port handle */
3479 @END
3482 /* Open I/O completion port */
3483 @REQ(open_completion)
3484 unsigned int access; /* desired access to a port */
3485 unsigned int attributes; /* object attributes */
3486 obj_handle_t rootdir; /* root directory */
3487 VARARG(filename,unicode_str); /* port name */
3488 @REPLY
3489 obj_handle_t handle; /* port handle */
3490 @END
3493 /* add completion to completion port */
3494 @REQ(add_completion)
3495 obj_handle_t handle; /* port handle */
3496 apc_param_t ckey; /* completion key */
3497 apc_param_t cvalue; /* completion value */
3498 apc_param_t information; /* IO_STATUS_BLOCK Information */
3499 unsigned int status; /* completion result */
3500 @END
3503 /* get completion from completion port queue */
3504 @REQ(remove_completion)
3505 obj_handle_t handle; /* port handle */
3506 @REPLY
3507 apc_param_t ckey; /* completion key */
3508 apc_param_t cvalue; /* completion value */
3509 apc_param_t information; /* IO_STATUS_BLOCK Information */
3510 unsigned int status; /* completion result */
3511 @END
3514 /* get completion queue depth */
3515 @REQ(query_completion)
3516 obj_handle_t handle; /* port handle */
3517 @REPLY
3518 unsigned int depth; /* completion queue depth */
3519 @END
3522 /* associate object with completion port */
3523 @REQ(set_completion_info)
3524 obj_handle_t handle; /* object handle */
3525 apc_param_t ckey; /* completion key */
3526 obj_handle_t chandle; /* port handle */
3527 @END
3530 /* check for associated completion and push msg */
3531 @REQ(add_fd_completion)
3532 obj_handle_t handle; /* async' object */
3533 apc_param_t cvalue; /* completion value */
3534 apc_param_t information; /* IO_STATUS_BLOCK Information */
3535 unsigned int status; /* completion status */
3536 int async; /* completion is an async result */
3537 @END
3540 /* set fd completion information */
3541 @REQ(set_fd_completion_mode)
3542 obj_handle_t handle; /* handle to a file or directory */
3543 unsigned int flags; /* completion notification flags */
3544 @END
3547 /* set fd disposition information */
3548 @REQ(set_fd_disp_info)
3549 obj_handle_t handle; /* handle to a file or directory */
3550 int unlink; /* whether to unlink file on close */
3551 @END
3554 /* set fd name information */
3555 @REQ(set_fd_name_info)
3556 obj_handle_t handle; /* handle to a file or directory */
3557 obj_handle_t rootdir; /* root directory */
3558 data_size_t namelen; /* length of NT name in bytes */
3559 int link; /* link instead of renaming */
3560 int replace; /* replace an existing file? */
3561 VARARG(name,unicode_str,namelen); /* NT name */
3562 VARARG(filename,string); /* new file name */
3563 @END
3566 /* Retrieve layered info for a window */
3567 @REQ(get_window_layered_info)
3568 user_handle_t handle; /* handle to the window */
3569 @REPLY
3570 unsigned int color_key; /* color key */
3571 unsigned int alpha; /* alpha (0..255) */
3572 unsigned int flags; /* LWA_* flags */
3573 @END
3576 /* Set layered info for a window */
3577 @REQ(set_window_layered_info)
3578 user_handle_t handle; /* handle to the window */
3579 unsigned int color_key; /* color key */
3580 unsigned int alpha; /* alpha (0..255) */
3581 unsigned int flags; /* LWA_* flags */
3582 @END
3585 /* Allocate an arbitrary user handle */
3586 @REQ(alloc_user_handle)
3587 @REPLY
3588 user_handle_t handle; /* allocated handle */
3589 @END
3592 /* Free an arbitrary user handle */
3593 @REQ(free_user_handle)
3594 user_handle_t handle; /* handle to free*/
3595 @END
3598 /* Set/get the current cursor */
3599 @REQ(set_cursor)
3600 unsigned int flags; /* flags for fields to set (see below) */
3601 user_handle_t handle; /* handle to the cursor */
3602 int show_count; /* show count increment/decrement */
3603 int x; /* cursor position */
3604 int y;
3605 rectangle_t clip; /* cursor clip rectangle */
3606 unsigned int clip_msg; /* message to post on cursor clip changes */
3607 @REPLY
3608 user_handle_t prev_handle; /* previous handle */
3609 int prev_count; /* previous show count */
3610 int prev_x; /* previous position */
3611 int prev_y;
3612 int new_x; /* new position */
3613 int new_y;
3614 rectangle_t new_clip; /* new clip rectangle */
3615 unsigned int last_change; /* time of last position change */
3616 @END
3617 #define SET_CURSOR_HANDLE 0x01
3618 #define SET_CURSOR_COUNT 0x02
3619 #define SET_CURSOR_POS 0x04
3620 #define SET_CURSOR_CLIP 0x08
3621 #define SET_CURSOR_NOCLIP 0x10
3623 /* Get the history of the 64 last cursor positions */
3624 @REQ(get_cursor_history)
3625 @REPLY
3626 VARARG(history,cursor_positions);
3627 @END
3630 /* Batch read rawinput message data */
3631 @REQ(get_rawinput_buffer)
3632 data_size_t rawinput_size; /* size of RAWINPUT structure */
3633 data_size_t buffer_size; /* size of output buffer */
3634 @REPLY
3635 data_size_t next_size; /* minimum size to get next message data */
3636 unsigned int count;
3637 VARARG(data,bytes);
3638 @END
3640 /* Modify the list of registered rawinput devices */
3641 @REQ(update_rawinput_devices)
3642 VARARG(devices,rawinput_devices);
3643 @END
3645 /* Retrieve the list of registered rawinput devices */
3646 @REQ(get_rawinput_devices)
3647 @REPLY
3648 unsigned int device_count;
3649 VARARG(devices,rawinput_devices);
3650 @END
3652 /* Create a new job object */
3653 @REQ(create_job)
3654 unsigned int access; /* wanted access rights */
3655 VARARG(objattr,object_attributes); /* object attributes */
3656 @REPLY
3657 obj_handle_t handle; /* handle to the job */
3658 @END
3661 /* Open a job object */
3662 @REQ(open_job)
3663 unsigned int access; /* wanted access rights */
3664 unsigned int attributes; /* object attributes */
3665 obj_handle_t rootdir; /* root directory */
3666 VARARG(name,unicode_str); /* object name */
3667 @REPLY
3668 obj_handle_t handle; /* handle to the job */
3669 @END
3672 /* Assign a job object to a process */
3673 @REQ(assign_job)
3674 obj_handle_t job; /* handle to the job */
3675 obj_handle_t process; /* handle to the process */
3676 @END
3679 /* Check if a process is associated with a job */
3680 @REQ(process_in_job)
3681 obj_handle_t job; /* handle to the job */
3682 obj_handle_t process; /* handle to the process */
3683 @END
3686 /* Set limit flags on a job */
3687 @REQ(set_job_limits)
3688 obj_handle_t handle; /* handle to the job */
3689 unsigned int limit_flags; /* new limit flags */
3690 @END
3693 /* Set new completion port for a job */
3694 @REQ(set_job_completion_port)
3695 obj_handle_t job; /* handle to the job */
3696 obj_handle_t port; /* handle to the completion port */
3697 client_ptr_t key; /* key to send with completion messages */
3698 @END
3701 /* Retrieve information about a job */
3702 @REQ(get_job_info)
3703 obj_handle_t handle; /* handle to the job */
3704 @REPLY
3705 int total_processes; /* total count of processes */
3706 int active_processes; /* count of running processes */
3707 @END
3710 /* Terminate all processes associated with the job */
3711 @REQ(terminate_job)
3712 obj_handle_t handle; /* handle to the job */
3713 int status; /* process exit code */
3714 @END
3717 /* Suspend a process */
3718 @REQ(suspend_process)
3719 obj_handle_t handle; /* process handle */
3720 @END
3723 /* Resume a process */
3724 @REQ(resume_process)
3725 obj_handle_t handle; /* process handle */
3726 @END
3729 /* Iterate thread list for process */
3730 @REQ(get_next_thread)
3731 obj_handle_t process; /* process handle */
3732 obj_handle_t last; /* thread handle to start with */
3733 unsigned int access; /* desired access for returned handle */
3734 unsigned int attributes; /* returned handle attributes */
3735 unsigned int flags; /* controls iteration direction */
3736 @REPLY
3737 obj_handle_t handle; /* next thread handle */
3738 @END