shlwapi: SHMapHandle should not set error when NULL is passed as hShared.
[wine.git] / server / protocol.def
blob6cdd59fa84a4b64442d566db30bfb57be6e0abdd
1 /* -*- C -*-
3 * Wine server protocol definition
5 * Copyright (C) 2001 Alexandre Julliard
7 * This file is used by tools/make_requests to build the
8 * protocol structures in include/wine/server_protocol.h
10 * This library is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU Lesser General Public
12 * License as published by the Free Software Foundation; either
13 * version 2.1 of the License, or (at your option) any later version.
15 * This library is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 * Lesser General Public License for more details.
20 * You should have received a copy of the GNU Lesser General Public
21 * License along with this library; if not, write to the Free Software
22 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
25 @HEADER /* start of C declarations */
27 #include <stdarg.h>
28 #include <stdlib.h>
29 #include <time.h>
31 #include <windef.h>
32 #include <winbase.h>
34 typedef unsigned int obj_handle_t;
35 typedef unsigned int user_handle_t;
36 typedef unsigned int atom_t;
37 typedef unsigned int process_id_t;
38 typedef unsigned int thread_id_t;
39 typedef unsigned int data_size_t;
40 typedef unsigned int ioctl_code_t;
41 typedef unsigned __int64 lparam_t;
42 typedef unsigned __int64 apc_param_t;
43 typedef unsigned __int64 mem_size_t;
44 typedef unsigned __int64 file_pos_t;
45 typedef unsigned __int64 client_ptr_t;
46 typedef unsigned __int64 affinity_t;
47 typedef client_ptr_t mod_handle_t;
49 struct request_header
51 int req; /* request code */
52 data_size_t request_size; /* request variable part size */
53 data_size_t reply_size; /* reply variable part maximum size */
56 struct reply_header
58 unsigned int error; /* error result */
59 data_size_t reply_size; /* reply variable part size */
62 /* placeholder structure for the maximum allowed request size */
63 /* this is used to construct the generic_request union */
64 struct request_max_size
66 int pad[16]; /* the max request size is 16 ints */
69 #define FIRST_USER_HANDLE 0x0020 /* first possible value for low word of user handle */
70 #define LAST_USER_HANDLE 0xffef /* last possible value for low word of user handle */
73 /* debug event data */
74 typedef union
76 int code; /* event code */
77 struct
79 int code; /* EXCEPTION_DEBUG_EVENT */
80 int first; /* first chance exception? */
81 unsigned int exc_code; /* exception code */
82 unsigned int flags; /* exception flags */
83 client_ptr_t record; /* exception record */
84 client_ptr_t address; /* exception address */
85 int nb_params; /* number of parameters */
86 int __pad;
87 client_ptr_t params[15]; /* parameters */
88 } exception;
89 struct
91 int code; /* CREATE_THREAD_DEBUG_EVENT */
92 obj_handle_t handle; /* handle to the new thread */
93 client_ptr_t teb; /* thread teb (in debugged process address space) */
94 client_ptr_t start; /* thread startup routine */
95 } create_thread;
96 struct
98 int code; /* CREATE_PROCESS_DEBUG_EVENT */
99 obj_handle_t file; /* handle to the process exe file */
100 obj_handle_t process; /* handle to the new process */
101 obj_handle_t thread; /* handle to the new thread */
102 mod_handle_t base; /* base of executable image */
103 int dbg_offset; /* offset of debug info in file */
104 int dbg_size; /* size of debug info */
105 client_ptr_t teb; /* thread teb (in debugged process address space) */
106 client_ptr_t start; /* thread startup routine */
107 client_ptr_t name; /* image name (optional) */
108 int unicode; /* is it Unicode? */
109 } create_process;
110 struct
112 int code; /* EXIT_THREAD_DEBUG_EVENT/EXIT_PROCESS_DEBUG_EVENT */
113 int exit_code; /* thread or process exit code */
114 } exit;
115 struct
117 int code; /* LOAD_DLL_DEBUG_EVENT */
118 obj_handle_t handle; /* file handle for the dll */
119 mod_handle_t base; /* base address of the dll */
120 int dbg_offset; /* offset of debug info in file */
121 int dbg_size; /* size of debug info */
122 client_ptr_t name; /* image name (optional) */
123 int unicode; /* is it Unicode? */
124 } load_dll;
125 struct
127 int code; /* UNLOAD_DLL_DEBUG_EVENT */
128 int __pad;
129 mod_handle_t base; /* base address of the dll */
130 } unload_dll;
131 } debug_event_t;
133 /* supported CPU types */
134 enum cpu_type
136 CPU_x86, CPU_x86_64, CPU_POWERPC, CPU_ARM, CPU_ARM64
138 typedef int cpu_type_t;
140 /* context data */
141 typedef struct
143 cpu_type_t cpu; /* cpu type */
144 unsigned int flags; /* SERVER_CTX_* flags */
145 union
147 struct { unsigned int eip, ebp, esp, eflags, cs, ss; } i386_regs;
148 struct { unsigned __int64 rip, rbp, rsp;
149 unsigned int cs, ss, flags, __pad; } x86_64_regs;
150 struct { unsigned int iar, msr, ctr, lr, dar, dsisr, trap, __pad; } powerpc_regs;
151 struct { unsigned int sp, lr, pc, cpsr; } arm_regs;
152 struct { unsigned __int64 sp, pc, pstate; } arm64_regs;
153 } ctl; /* selected by SERVER_CTX_CONTROL */
154 union
156 struct { unsigned int eax, ebx, ecx, edx, esi, edi; } i386_regs;
157 struct { unsigned __int64 rax,rbx, rcx, rdx, rsi, rdi,
158 r8, r9, r10, r11, r12, r13, r14, r15; } x86_64_regs;
159 struct { unsigned int gpr[32], cr, xer; } powerpc_regs;
160 struct { unsigned int r[13]; } arm_regs;
161 struct { unsigned __int64 x[31]; } arm64_regs;
162 } integer; /* selected by SERVER_CTX_INTEGER */
163 union
165 struct { unsigned int ds, es, fs, gs; } i386_regs;
166 struct { unsigned int ds, es, fs, gs; } x86_64_regs;
167 } seg; /* selected by SERVER_CTX_SEGMENTS */
168 union
170 struct { unsigned int ctrl, status, tag, err_off, err_sel, data_off, data_sel, cr0npx;
171 unsigned char regs[80]; } i386_regs;
172 struct { struct { unsigned __int64 low, high; } fpregs[32]; } x86_64_regs;
173 struct { double fpr[32], fpscr; } powerpc_regs;
174 struct { unsigned __int64 d[32]; unsigned int fpscr; } arm_regs;
175 struct { unsigned __int64 d[64]; unsigned int fpcr, fpsr; } arm64_regs;
176 } fp; /* selected by SERVER_CTX_FLOATING_POINT */
177 union
179 struct { unsigned int dr0, dr1, dr2, dr3, dr6, dr7; } i386_regs;
180 struct { unsigned __int64 dr0, dr1, dr2, dr3, dr6, dr7; } x86_64_regs;
181 struct { unsigned int dr[8]; } powerpc_regs;
182 struct { unsigned int bvr[8], bcr[8], wvr[1], wcr[1]; } arm_regs;
183 struct { unsigned __int64 bvr[8], wvr[2]; unsigned int bcr[8], wcr[2]; } arm64_regs;
184 } debug; /* selected by SERVER_CTX_DEBUG_REGISTERS */
185 union
187 unsigned char i386_regs[512];
188 } ext; /* selected by SERVER_CTX_EXTENDED_REGISTERS */
189 } context_t;
191 #define SERVER_CTX_CONTROL 0x01
192 #define SERVER_CTX_INTEGER 0x02
193 #define SERVER_CTX_SEGMENTS 0x04
194 #define SERVER_CTX_FLOATING_POINT 0x08
195 #define SERVER_CTX_DEBUG_REGISTERS 0x10
196 #define SERVER_CTX_EXTENDED_REGISTERS 0x20
198 /* structure used in sending an fd from client to server */
199 struct send_fd
201 thread_id_t tid; /* thread id */
202 int fd; /* file descriptor on client-side */
205 /* structure sent by the server on the wait fifo */
206 struct wake_up_reply
208 client_ptr_t cookie; /* magic cookie that was passed in select_request */
209 int signaled; /* wait result */
210 int __pad;
213 /* NT-style timeout, in 100ns units, negative means relative timeout */
214 typedef __int64 timeout_t;
215 #define TIMEOUT_INFINITE (((timeout_t)0x7fffffff) << 32 | 0xffffffff)
217 /* structure for process startup info */
218 typedef struct
220 unsigned int debug_flags;
221 unsigned int console_flags;
222 obj_handle_t console;
223 obj_handle_t hstdin;
224 obj_handle_t hstdout;
225 obj_handle_t hstderr;
226 unsigned int x;
227 unsigned int y;
228 unsigned int xsize;
229 unsigned int ysize;
230 unsigned int xchars;
231 unsigned int ychars;
232 unsigned int attribute;
233 unsigned int flags;
234 unsigned int show;
235 data_size_t curdir_len;
236 data_size_t dllpath_len;
237 data_size_t imagepath_len;
238 data_size_t cmdline_len;
239 data_size_t title_len;
240 data_size_t desktop_len;
241 data_size_t shellinfo_len;
242 data_size_t runtime_len;
243 /* VARARG(curdir,unicode_str,curdir_len); */
244 /* VARARG(dllpath,unicode_str,dllpath_len); */
245 /* VARARG(imagepath,unicode_str,imagepath_len); */
246 /* VARARG(cmdline,unicode_str,cmdline_len); */
247 /* VARARG(title,unicode_str,title_len); */
248 /* VARARG(desktop,unicode_str,desktop_len); */
249 /* VARARG(shellinfo,unicode_str,shellinfo_len); */
250 /* VARARG(runtime,unicode_str,runtime_len); */
251 } startup_info_t;
253 /* structure returned in the list of window properties */
254 typedef struct
256 atom_t atom; /* property atom */
257 int string; /* was atom a string originally? */
258 lparam_t data; /* data stored in property */
259 } property_data_t;
261 /* structure to specify window rectangles */
262 typedef struct
264 int left;
265 int top;
266 int right;
267 int bottom;
268 } rectangle_t;
270 /* structure for parameters of async I/O calls */
271 typedef struct
273 obj_handle_t handle; /* object to perform I/O on */
274 obj_handle_t event; /* event to signal when done */
275 client_ptr_t iosb; /* I/O status block in client addr space */
276 client_ptr_t user; /* opaque user data containing callback pointer and async-specific data */
277 client_ptr_t apc; /* user APC to call */
278 apc_param_t apc_context; /* user APC context or completion value */
279 } async_data_t;
281 /* structures for extra message data */
283 struct hw_msg_source
285 unsigned int device; /* source device (IMDT_* values) */
286 unsigned int origin; /* source origin (IMO_* values) */
289 struct hardware_msg_data
291 lparam_t info; /* extra info */
292 unsigned int hw_id; /* unique id */
293 unsigned int flags; /* hook flags */
294 struct hw_msg_source source; /* message source */
295 union
297 int type;
298 struct
300 int type; /* RIM_TYPEKEYBOARD */
301 unsigned int message; /* message generated by this rawinput event */
302 unsigned short vkey; /* virtual key code */
303 unsigned short scan; /* scan code */
304 } kbd;
305 struct
307 int type; /* RIM_TYPEMOUSE */
308 int x; /* x coordinate */
309 int y; /* y coordinate */
310 unsigned int data; /* mouse data */
311 } mouse;
312 } rawinput;
315 struct callback_msg_data
317 client_ptr_t callback; /* callback function */
318 lparam_t data; /* user data for callback */
319 lparam_t result; /* message result */
322 struct winevent_msg_data
324 user_handle_t hook; /* hook handle */
325 thread_id_t tid; /* thread id */
326 client_ptr_t hook_proc; /* hook proc address */
327 /* followed by module name if any */
330 typedef union
332 int type;
333 struct
335 int type; /* INPUT_KEYBOARD */
336 unsigned short vkey; /* virtual key code */
337 unsigned short scan; /* scan code */
338 unsigned int flags; /* event flags */
339 unsigned int time; /* event time */
340 lparam_t info; /* extra info */
341 } kbd;
342 struct
344 int type; /* INPUT_MOUSE */
345 int x; /* coordinates */
346 int y;
347 unsigned int data; /* mouse data */
348 unsigned int flags; /* event flags */
349 unsigned int time; /* event time */
350 lparam_t info; /* extra info */
351 } mouse;
352 struct
354 int type; /* INPUT_HARDWARE */
355 unsigned int msg; /* message code */
356 lparam_t lparam; /* message param */
357 } hw;
358 } hw_input_t;
360 typedef union
362 unsigned char bytes[1]; /* raw data for sent messages */
363 struct hardware_msg_data hardware;
364 struct callback_msg_data callback;
365 struct winevent_msg_data winevent;
366 } message_data_t;
368 /* structure for console char/attribute info */
369 typedef struct
371 WCHAR ch;
372 unsigned short attr;
373 } char_info_t;
375 /* structure returned in filesystem events */
376 struct filesystem_event
378 int action;
379 data_size_t len;
380 char name[1];
383 typedef struct
385 unsigned int low_part;
386 int high_part;
387 } luid_t;
389 #define MAX_ACL_LEN 65535
391 struct security_descriptor
393 unsigned int control; /* SE_ flags */
394 data_size_t owner_len;
395 data_size_t group_len;
396 data_size_t sacl_len;
397 data_size_t dacl_len;
398 /* VARARG(owner,SID); */
399 /* VARARG(group,SID); */
400 /* VARARG(sacl,ACL); */
401 /* VARARG(dacl,ACL); */
404 struct object_attributes
406 obj_handle_t rootdir; /* root directory */
407 unsigned int attributes; /* object attributes */
408 data_size_t sd_len; /* length of security_descriptor data. may be 0 */
409 data_size_t name_len; /* length of the name string. may be 0 */
410 /* VARARG(sd,security_descriptor); */
411 /* VARARG(name,unicode_str); */
414 struct token_groups
416 unsigned int count;
417 /* unsigned int attributes[count]; */
418 /* VARARG(sids,SID); */
421 enum select_op
423 SELECT_NONE,
424 SELECT_WAIT,
425 SELECT_WAIT_ALL,
426 SELECT_SIGNAL_AND_WAIT,
427 SELECT_KEYED_EVENT_WAIT,
428 SELECT_KEYED_EVENT_RELEASE
431 typedef union
433 enum select_op op;
434 struct
436 enum select_op op; /* SELECT_WAIT or SELECT_WAIT_ALL */
437 obj_handle_t handles[MAXIMUM_WAIT_OBJECTS];
438 } wait;
439 struct
441 enum select_op op; /* SELECT_SIGNAL_AND_WAIT */
442 obj_handle_t wait;
443 obj_handle_t signal; /* must be last in the structure so we can remove it on retries */
444 } signal_and_wait;
445 struct
447 enum select_op op; /* SELECT_KEYED_EVENT_WAIT or SELECT_KEYED_EVENT_RELEASE */
448 obj_handle_t handle;
449 client_ptr_t key;
450 } keyed_event;
451 } select_op_t;
453 enum apc_type
455 APC_NONE,
456 APC_USER,
457 APC_TIMER,
458 APC_ASYNC_IO,
459 APC_VIRTUAL_ALLOC,
460 APC_VIRTUAL_FREE,
461 APC_VIRTUAL_QUERY,
462 APC_VIRTUAL_PROTECT,
463 APC_VIRTUAL_FLUSH,
464 APC_VIRTUAL_LOCK,
465 APC_VIRTUAL_UNLOCK,
466 APC_MAP_VIEW,
467 APC_UNMAP_VIEW,
468 APC_CREATE_THREAD
471 typedef union
473 enum apc_type type;
474 struct
476 enum apc_type type; /* APC_USER */
477 int __pad;
478 client_ptr_t func; /* void (__stdcall *func)(ULONG_PTR,ULONG_PTR,ULONG_PTR); */
479 apc_param_t args[3]; /* arguments for user function */
480 } user;
481 struct
483 enum apc_type type; /* APC_TIMER */
484 int __pad;
485 client_ptr_t func; /* void (__stdcall *func)(void*, unsigned int, unsigned int); */
486 timeout_t time; /* absolute time of expiration */
487 client_ptr_t arg; /* user argument */
488 } timer;
489 struct
491 enum apc_type type; /* APC_ASYNC_IO */
492 unsigned int status; /* I/O status */
493 client_ptr_t user; /* user pointer */
494 client_ptr_t sb; /* status block */
495 } async_io;
496 struct
498 enum apc_type type; /* APC_VIRTUAL_ALLOC */
499 unsigned int op_type; /* type of operation */
500 client_ptr_t addr; /* requested address */
501 mem_size_t size; /* allocation size */
502 unsigned int zero_bits; /* allocation alignment */
503 unsigned int prot; /* memory protection flags */
504 } virtual_alloc;
505 struct
507 enum apc_type type; /* APC_VIRTUAL_FREE */
508 unsigned int op_type; /* type of operation */
509 client_ptr_t addr; /* requested address */
510 mem_size_t size; /* allocation size */
511 } virtual_free;
512 struct
514 enum apc_type type; /* APC_VIRTUAL_QUERY */
515 int __pad;
516 client_ptr_t addr; /* requested address */
517 } virtual_query;
518 struct
520 enum apc_type type; /* APC_VIRTUAL_PROTECT */
521 unsigned int prot; /* new protection flags */
522 client_ptr_t addr; /* requested address */
523 mem_size_t size; /* requested size */
524 } virtual_protect;
525 struct
527 enum apc_type type; /* APC_VIRTUAL_FLUSH */
528 int __pad;
529 client_ptr_t addr; /* requested address */
530 mem_size_t size; /* requested size */
531 } virtual_flush;
532 struct
534 enum apc_type type; /* APC_VIRTUAL_LOCK */
535 int __pad;
536 client_ptr_t addr; /* requested address */
537 mem_size_t size; /* requested size */
538 } virtual_lock;
539 struct
541 enum apc_type type; /* APC_VIRTUAL_UNLOCK */
542 int __pad;
543 client_ptr_t addr; /* requested address */
544 mem_size_t size; /* requested size */
545 } virtual_unlock;
546 struct
548 enum apc_type type; /* APC_MAP_VIEW */
549 obj_handle_t handle; /* mapping handle */
550 client_ptr_t addr; /* requested address */
551 mem_size_t size; /* allocation size */
552 file_pos_t offset; /* file offset */
553 unsigned int alloc_type;/* allocation type */
554 unsigned short zero_bits; /* allocation alignment */
555 unsigned short prot; /* memory protection flags */
556 } map_view;
557 struct
559 enum apc_type type; /* APC_UNMAP_VIEW */
560 int __pad;
561 client_ptr_t addr; /* view address */
562 } unmap_view;
563 struct
565 enum apc_type type; /* APC_CREATE_THREAD */
566 int suspend; /* suspended thread? */
567 client_ptr_t func; /* void (__stdcall *func)(void*); start function */
568 client_ptr_t arg; /* argument for start function */
569 mem_size_t reserve; /* reserve size for thread stack */
570 mem_size_t commit; /* commit size for thread stack */
571 } create_thread;
572 } apc_call_t;
574 typedef union
576 enum apc_type type;
577 struct
579 enum apc_type type; /* APC_ASYNC_IO */
580 unsigned int status; /* new status of async operation */
581 unsigned int total; /* bytes transferred */
582 } async_io;
583 struct
585 enum apc_type type; /* APC_VIRTUAL_ALLOC */
586 unsigned int status; /* status returned by call */
587 client_ptr_t addr; /* resulting address */
588 mem_size_t size; /* resulting size */
589 } virtual_alloc;
590 struct
592 enum apc_type type; /* APC_VIRTUAL_FREE */
593 unsigned int status; /* status returned by call */
594 client_ptr_t addr; /* resulting address */
595 mem_size_t size; /* resulting size */
596 } virtual_free;
597 struct
599 enum apc_type type; /* APC_VIRTUAL_QUERY */
600 unsigned int status; /* status returned by call */
601 client_ptr_t base; /* resulting base address */
602 client_ptr_t alloc_base;/* resulting allocation base */
603 mem_size_t size; /* resulting region size */
604 unsigned short state; /* resulting region state */
605 unsigned short prot; /* resulting region protection */
606 unsigned short alloc_prot;/* resulting allocation protection */
607 unsigned short alloc_type;/* resulting region allocation type */
608 } virtual_query;
609 struct
611 enum apc_type type; /* APC_VIRTUAL_PROTECT */
612 unsigned int status; /* status returned by call */
613 client_ptr_t addr; /* resulting address */
614 mem_size_t size; /* resulting size */
615 unsigned int prot; /* old protection flags */
616 } virtual_protect;
617 struct
619 enum apc_type type; /* APC_VIRTUAL_FLUSH */
620 unsigned int status; /* status returned by call */
621 client_ptr_t addr; /* resulting address */
622 mem_size_t size; /* resulting size */
623 } virtual_flush;
624 struct
626 enum apc_type type; /* APC_VIRTUAL_LOCK */
627 unsigned int status; /* status returned by call */
628 client_ptr_t addr; /* resulting address */
629 mem_size_t size; /* resulting size */
630 } virtual_lock;
631 struct
633 enum apc_type type; /* APC_VIRTUAL_UNLOCK */
634 unsigned int status; /* status returned by call */
635 client_ptr_t addr; /* resulting address */
636 mem_size_t size; /* resulting size */
637 } virtual_unlock;
638 struct
640 enum apc_type type; /* APC_MAP_VIEW */
641 unsigned int status; /* status returned by call */
642 client_ptr_t addr; /* resulting address */
643 mem_size_t size; /* resulting size */
644 } map_view;
645 struct
647 enum apc_type type; /* APC_MAP_VIEW */
648 unsigned int status; /* status returned by call */
649 } unmap_view;
650 struct
652 enum apc_type type; /* APC_CREATE_THREAD */
653 unsigned int status; /* status returned by call */
654 thread_id_t tid; /* thread id */
655 obj_handle_t handle; /* handle to new thread */
656 } create_thread;
657 } apc_result_t;
659 typedef union
661 unsigned int major; /* irp major function */
662 struct
664 unsigned int major; /* IRP_MJ_CREATE */
665 unsigned int access; /* access rights */
666 unsigned int sharing; /* sharing flags */
667 unsigned int options; /* file options */
668 client_ptr_t device; /* opaque ptr for the device */
669 } create;
670 struct
672 unsigned int major; /* IRP_MJ_CLOSE */
673 int __pad;
674 client_ptr_t file; /* opaque ptr for the file object */
675 } close;
676 struct
678 unsigned int major; /* IRP_MJ_READ */
679 unsigned int key; /* driver key */
680 client_ptr_t file; /* opaque ptr for the file object */
681 file_pos_t pos; /* file position */
682 } read;
683 struct
685 unsigned int major; /* IRP_MJ_WRITE */
686 unsigned int key; /* driver key */
687 client_ptr_t file; /* opaque ptr for the file object */
688 file_pos_t pos; /* file position */
689 } write;
690 struct
692 unsigned int major; /* IRP_MJ_FLUSH_BUFFERS */
693 int __pad;
694 client_ptr_t file; /* opaque ptr for the file object */
695 } flush;
696 struct
698 unsigned int major; /* IRP_MJ_DEVICE_CONTROL */
699 ioctl_code_t code; /* ioctl code */
700 client_ptr_t file; /* opaque ptr for the file object */
701 } ioctl;
702 struct
704 unsigned int major; /* IRP_MJ_DEVICE_CLEANUP */
705 int __pad;
706 client_ptr_t obj; /* opaque ptr for the freed object */
707 } cleanup;
708 } irp_params_t;
710 /* information about a PE image mapping, roughly equivalent to SECTION_IMAGE_INFORMATION */
711 typedef struct
713 client_ptr_t base;
714 client_ptr_t entry_point;
715 mem_size_t map_size;
716 mem_size_t stack_size;
717 mem_size_t stack_commit;
718 unsigned int zerobits;
719 unsigned int subsystem;
720 unsigned short subsystem_low;
721 unsigned short subsystem_high;
722 unsigned int gp;
723 unsigned short image_charact;
724 unsigned short dll_charact;
725 unsigned short machine;
726 unsigned char contains_code;
727 unsigned char image_flags;
728 unsigned int loader_flags;
729 unsigned int header_size;
730 unsigned int file_size;
731 unsigned int checksum;
732 cpu_type_t cpu;
733 } pe_image_info_t;
734 #define IMAGE_FLAGS_ComPlusNativeReady 0x01
735 #define IMAGE_FLAGS_ComPlusILOnly 0x02
736 #define IMAGE_FLAGS_ImageDynamicallyRelocated 0x04
737 #define IMAGE_FLAGS_ImageMappedFlat 0x08
738 #define IMAGE_FLAGS_BaseBelow4gb 0x10
739 #define IMAGE_FLAGS_WineFakeDll 0x80
741 struct rawinput_device
743 unsigned short usage_page;
744 unsigned short usage;
745 unsigned int flags;
746 user_handle_t target;
749 /****************************************************************/
750 /* Request declarations */
752 /* Create a new process from the context of the parent */
753 @REQ(new_process)
754 int inherit_all; /* inherit all handles from parent */
755 unsigned int create_flags; /* creation flags */
756 int socket_fd; /* file descriptor for process socket */
757 obj_handle_t exe_file; /* file handle for main exe */
758 unsigned int access; /* access rights for process object */
759 cpu_type_t cpu; /* CPU that the new process will use */
760 data_size_t info_size; /* size of startup info */
761 VARARG(objattr,object_attributes); /* object attributes */
762 VARARG(info,startup_info,info_size); /* startup information */
763 VARARG(env,unicode_str); /* environment for new process */
764 @REPLY
765 obj_handle_t info; /* new process info handle */
766 process_id_t pid; /* process id */
767 obj_handle_t handle; /* process handle (in the current process) */
768 @END
771 /* Execute a process, replacing the current one */
772 @REQ(exec_process)
773 int socket_fd; /* file descriptor for process socket */
774 obj_handle_t exe_file; /* file handle for main exe */
775 cpu_type_t cpu; /* CPU that the new process will use */
776 @END
779 /* Retrieve information about a newly started process */
780 @REQ(get_new_process_info)
781 obj_handle_t info; /* info handle returned from new_process_request */
782 @REPLY
783 int success; /* did the process start successfully? */
784 int exit_code; /* process exit code if failed */
785 @END
788 /* Create a new thread */
789 @REQ(new_thread)
790 obj_handle_t process; /* process in which to create thread */
791 unsigned int access; /* wanted access rights */
792 int suspend; /* new thread should be suspended on creation */
793 int request_fd; /* fd for request pipe */
794 VARARG(objattr,object_attributes); /* object attributes */
795 @REPLY
796 thread_id_t tid; /* thread id */
797 obj_handle_t handle; /* thread handle (in the current process) */
798 @END
801 /* Retrieve the new process startup info */
802 @REQ(get_startup_info)
803 @REPLY
804 data_size_t info_size; /* size of startup info */
805 VARARG(info,startup_info,info_size); /* startup information */
806 VARARG(env,unicode_str); /* environment */
807 @END
810 /* Signal the end of the process initialization */
811 @REQ(init_process_done)
812 int gui; /* is it a GUI process? */
813 mod_handle_t module; /* main module base address */
814 client_ptr_t ldt_copy; /* address of LDT copy (in thread address space) */
815 client_ptr_t entry; /* process entry point */
816 @REPLY
817 int suspend; /* is process suspended? */
818 @END
821 /* Initialize a thread; called from the child after fork()/clone() */
822 @REQ(init_thread)
823 int unix_pid; /* Unix pid of new thread */
824 int unix_tid; /* Unix tid of new thread */
825 int debug_level; /* new debug level */
826 client_ptr_t teb; /* TEB of new thread (in thread address space) */
827 client_ptr_t entry; /* entry point or PEB if initial thread (in thread address space) */
828 int reply_fd; /* fd for reply pipe */
829 int wait_fd; /* fd for blocking calls pipe */
830 cpu_type_t cpu; /* CPU that this thread is running on */
831 @REPLY
832 process_id_t pid; /* process id of the new thread's process */
833 thread_id_t tid; /* thread id of the new thread */
834 timeout_t server_start; /* server start time */
835 data_size_t info_size; /* total size of startup info */
836 int version; /* protocol version */
837 unsigned int all_cpus; /* bitset of supported CPUs */
838 int suspend; /* is thread suspended? */
839 @END
842 /* Terminate a process */
843 @REQ(terminate_process)
844 obj_handle_t handle; /* process handle to terminate */
845 int exit_code; /* process exit code */
846 @REPLY
847 int self; /* suicide? */
848 @END
851 /* Terminate a thread */
852 @REQ(terminate_thread)
853 obj_handle_t handle; /* thread handle to terminate */
854 int exit_code; /* thread exit code */
855 @REPLY
856 int self; /* suicide? */
857 int last; /* last thread in this process? */
858 @END
861 /* Retrieve information about a process */
862 @REQ(get_process_info)
863 obj_handle_t handle; /* process handle */
864 @REPLY
865 process_id_t pid; /* server process id */
866 process_id_t ppid; /* server process id of parent */
867 affinity_t affinity; /* process affinity mask */
868 client_ptr_t peb; /* PEB address in process address space */
869 timeout_t start_time; /* process start time */
870 timeout_t end_time; /* process end time */
871 int exit_code; /* process exit code */
872 int priority; /* priority class */
873 cpu_type_t cpu; /* CPU that this process is running on */
874 short int debugger_present; /* process is being debugged */
875 short int debug_children; /* inherit debugger to child processes */
876 @END
879 /* Retrieve information about a process memory usage */
880 @REQ(get_process_vm_counters)
881 obj_handle_t handle; /* process handle */
882 @REPLY
883 mem_size_t peak_virtual_size; /* peak virtual memory in bytes */
884 mem_size_t virtual_size; /* virtual memory in bytes */
885 mem_size_t peak_working_set_size; /* peak real memory in bytes */
886 mem_size_t working_set_size; /* real memory in bytes */
887 mem_size_t pagefile_usage; /* commit charge in bytes */
888 mem_size_t peak_pagefile_usage; /* peak commit charge in bytes */
889 @END
892 /* Set a process information */
893 @REQ(set_process_info)
894 obj_handle_t handle; /* process handle */
895 int mask; /* setting mask (see below) */
896 int priority; /* priority class */
897 affinity_t affinity; /* affinity mask */
898 @END
899 #define SET_PROCESS_INFO_PRIORITY 0x01
900 #define SET_PROCESS_INFO_AFFINITY 0x02
903 /* Retrieve information about a thread */
904 @REQ(get_thread_info)
905 obj_handle_t handle; /* thread handle */
906 thread_id_t tid_in; /* thread id (optional) */
907 @REPLY
908 process_id_t pid; /* server process id */
909 thread_id_t tid; /* server thread id */
910 client_ptr_t teb; /* thread teb pointer */
911 client_ptr_t entry_point; /* thread entry point */
912 affinity_t affinity; /* thread affinity mask */
913 int exit_code; /* thread exit code */
914 int priority; /* thread priority level */
915 int last; /* last thread in process */
916 @END
919 /* Retrieve information about thread times */
920 @REQ(get_thread_times)
921 obj_handle_t handle; /* thread handle */
922 @REPLY
923 timeout_t creation_time; /* thread creation time */
924 timeout_t exit_time; /* thread exit time */
925 @END
928 /* Set a thread information */
929 @REQ(set_thread_info)
930 obj_handle_t handle; /* thread handle */
931 int mask; /* setting mask (see below) */
932 int priority; /* priority class */
933 affinity_t affinity; /* affinity mask */
934 client_ptr_t entry_point; /* thread entry point */
935 obj_handle_t token; /* impersonation token */
936 @END
937 #define SET_THREAD_INFO_PRIORITY 0x01
938 #define SET_THREAD_INFO_AFFINITY 0x02
939 #define SET_THREAD_INFO_TOKEN 0x04
940 #define SET_THREAD_INFO_ENTRYPOINT 0x08
943 /* Retrieve information about a module */
944 @REQ(get_dll_info)
945 obj_handle_t handle; /* process handle */
946 mod_handle_t base_address; /* base address of module */
947 @REPLY
948 client_ptr_t entry_point;
949 data_size_t filename_len; /* buffer len in bytes required to store filename */
950 VARARG(filename,unicode_str); /* file name of module */
951 @END
954 /* Suspend a thread */
955 @REQ(suspend_thread)
956 obj_handle_t handle; /* thread handle */
957 @REPLY
958 int count; /* new suspend count */
959 @END
962 /* Resume a thread */
963 @REQ(resume_thread)
964 obj_handle_t handle; /* thread handle */
965 @REPLY
966 int count; /* new suspend count */
967 @END
970 /* Notify the server that a dll has been loaded */
971 @REQ(load_dll)
972 data_size_t dbg_offset; /* debug info offset */
973 mod_handle_t base; /* base address */
974 client_ptr_t name; /* ptr to ptr to name (in process addr space) */
975 data_size_t dbg_size; /* debug info size */
976 VARARG(filename,unicode_str); /* file name of dll */
977 @END
980 /* Notify the server that a dll is being unloaded */
981 @REQ(unload_dll)
982 mod_handle_t base; /* base address */
983 @END
986 /* Queue an APC for a thread or process */
987 @REQ(queue_apc)
988 obj_handle_t handle; /* thread or process handle */
989 apc_call_t call; /* call arguments */
990 @REPLY
991 obj_handle_t handle; /* APC handle */
992 int self; /* run APC in caller itself? */
993 @END
996 /* Get the result of an APC call */
997 @REQ(get_apc_result)
998 obj_handle_t handle; /* handle to the APC */
999 @REPLY
1000 apc_result_t result; /* result of the APC */
1001 @END
1004 /* Close a handle for the current process */
1005 @REQ(close_handle)
1006 obj_handle_t handle; /* handle to close */
1007 @END
1010 /* Set a handle information */
1011 @REQ(set_handle_info)
1012 obj_handle_t handle; /* handle we are interested in */
1013 int flags; /* new handle flags */
1014 int mask; /* mask for flags to set */
1015 @REPLY
1016 int old_flags; /* old flag value */
1017 @END
1020 /* Duplicate a handle */
1021 @REQ(dup_handle)
1022 obj_handle_t src_process; /* src process handle */
1023 obj_handle_t src_handle; /* src handle to duplicate */
1024 obj_handle_t dst_process; /* dst process handle */
1025 unsigned int access; /* wanted access rights */
1026 unsigned int attributes; /* object attributes */
1027 unsigned int options; /* duplicate options (see below) */
1028 @REPLY
1029 obj_handle_t handle; /* duplicated handle in dst process */
1030 int self; /* is the source the current process? */
1031 int closed; /* whether the source handle has been closed */
1032 @END
1033 #define DUP_HANDLE_CLOSE_SOURCE DUPLICATE_CLOSE_SOURCE
1034 #define DUP_HANDLE_SAME_ACCESS DUPLICATE_SAME_ACCESS
1035 #define DUP_HANDLE_MAKE_GLOBAL 0x80000000 /* Not a Windows flag */
1038 /* Open a handle to a process */
1039 @REQ(open_process)
1040 process_id_t pid; /* process id to open */
1041 unsigned int access; /* wanted access rights */
1042 unsigned int attributes; /* object attributes */
1043 @REPLY
1044 obj_handle_t handle; /* handle to the process */
1045 @END
1048 /* Open a handle to a thread */
1049 @REQ(open_thread)
1050 thread_id_t tid; /* thread id to open */
1051 unsigned int access; /* wanted access rights */
1052 unsigned int attributes; /* object attributes */
1053 @REPLY
1054 obj_handle_t handle; /* handle to the thread */
1055 @END
1058 /* Wait for handles */
1059 @REQ(select)
1060 int flags; /* wait flags (see below) */
1061 client_ptr_t cookie; /* magic cookie to return to client */
1062 timeout_t timeout; /* timeout */
1063 obj_handle_t prev_apc; /* handle to previous APC */
1064 VARARG(result,apc_result); /* result of previous APC */
1065 VARARG(data,select_op); /* operation-specific data */
1066 @REPLY
1067 timeout_t timeout; /* timeout converted to absolute */
1068 apc_call_t call; /* APC call arguments */
1069 obj_handle_t apc_handle; /* handle to next APC */
1070 @END
1071 #define SELECT_ALERTABLE 1
1072 #define SELECT_INTERRUPTIBLE 2
1075 /* Create an event */
1076 @REQ(create_event)
1077 unsigned int access; /* wanted access rights */
1078 int manual_reset; /* manual reset event */
1079 int initial_state; /* initial state of the event */
1080 VARARG(objattr,object_attributes); /* object attributes */
1081 @REPLY
1082 obj_handle_t handle; /* handle to the event */
1083 @END
1085 /* Event operation */
1086 @REQ(event_op)
1087 obj_handle_t handle; /* handle to event */
1088 int op; /* event operation (see below) */
1089 @REPLY
1090 int state; /* previous state */
1091 @END
1092 enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT };
1094 @REQ(query_event)
1095 obj_handle_t handle; /* handle to event */
1096 @REPLY
1097 int manual_reset; /* manual reset event */
1098 int state; /* current state of the event */
1099 @END
1101 /* Open an event */
1102 @REQ(open_event)
1103 unsigned int access; /* wanted access rights */
1104 unsigned int attributes; /* object attributes */
1105 obj_handle_t rootdir; /* root directory */
1106 VARARG(name,unicode_str); /* object name */
1107 @REPLY
1108 obj_handle_t handle; /* handle to the event */
1109 @END
1112 /* Create a keyed event */
1113 @REQ(create_keyed_event)
1114 unsigned int access; /* wanted access rights */
1115 VARARG(objattr,object_attributes); /* object attributes */
1116 @REPLY
1117 obj_handle_t handle; /* handle to the event */
1118 @END
1120 /* Open a keyed event */
1121 @REQ(open_keyed_event)
1122 unsigned int access; /* wanted access rights */
1123 unsigned int attributes; /* object attributes */
1124 obj_handle_t rootdir; /* root directory */
1125 VARARG(name,unicode_str); /* object name */
1126 @REPLY
1127 obj_handle_t handle; /* handle to the event */
1128 @END
1131 /* Create a mutex */
1132 @REQ(create_mutex)
1133 unsigned int access; /* wanted access rights */
1134 int owned; /* initially owned? */
1135 VARARG(objattr,object_attributes); /* object attributes */
1136 @REPLY
1137 obj_handle_t handle; /* handle to the mutex */
1138 @END
1141 /* Release a mutex */
1142 @REQ(release_mutex)
1143 obj_handle_t handle; /* handle to the mutex */
1144 @REPLY
1145 unsigned int prev_count; /* value of internal counter, before release */
1146 @END
1149 /* Open a mutex */
1150 @REQ(open_mutex)
1151 unsigned int access; /* wanted access rights */
1152 unsigned int attributes; /* object attributes */
1153 obj_handle_t rootdir; /* root directory */
1154 VARARG(name,unicode_str); /* object name */
1155 @REPLY
1156 obj_handle_t handle; /* handle to the mutex */
1157 @END
1160 /* Query a mutex */
1161 @REQ(query_mutex)
1162 obj_handle_t handle; /* handle to mutex */
1163 @REPLY
1164 unsigned int count; /* current count of mutex */
1165 int owned; /* true if owned by current thread */
1166 int abandoned; /* true if abandoned */
1167 @END
1170 /* Create a semaphore */
1171 @REQ(create_semaphore)
1172 unsigned int access; /* wanted access rights */
1173 unsigned int initial; /* initial count */
1174 unsigned int max; /* maximum count */
1175 VARARG(objattr,object_attributes); /* object attributes */
1176 @REPLY
1177 obj_handle_t handle; /* handle to the semaphore */
1178 @END
1181 /* Release a semaphore */
1182 @REQ(release_semaphore)
1183 obj_handle_t handle; /* handle to the semaphore */
1184 unsigned int count; /* count to add to semaphore */
1185 @REPLY
1186 unsigned int prev_count; /* previous semaphore count */
1187 @END
1189 @REQ(query_semaphore)
1190 obj_handle_t handle; /* handle to the semaphore */
1191 @REPLY
1192 unsigned int current; /* current count */
1193 unsigned int max; /* maximum count */
1194 @END
1196 /* Open a semaphore */
1197 @REQ(open_semaphore)
1198 unsigned int access; /* wanted access rights */
1199 unsigned int attributes; /* object attributes */
1200 obj_handle_t rootdir; /* root directory */
1201 VARARG(name,unicode_str); /* object name */
1202 @REPLY
1203 obj_handle_t handle; /* handle to the semaphore */
1204 @END
1207 /* Create a file */
1208 @REQ(create_file)
1209 unsigned int access; /* wanted access rights */
1210 unsigned int sharing; /* sharing flags */
1211 int create; /* file create action */
1212 unsigned int options; /* file options */
1213 unsigned int attrs; /* file attributes for creation */
1214 VARARG(objattr,object_attributes); /* object attributes */
1215 VARARG(filename,string); /* file name */
1216 @REPLY
1217 obj_handle_t handle; /* handle to the file */
1218 @END
1221 /* Open a file object */
1222 @REQ(open_file_object)
1223 unsigned int access; /* wanted access rights */
1224 unsigned int attributes; /* open attributes */
1225 obj_handle_t rootdir; /* root directory */
1226 unsigned int sharing; /* sharing flags */
1227 unsigned int options; /* file options */
1228 VARARG(filename,unicode_str); /* file name */
1229 @REPLY
1230 obj_handle_t handle; /* handle to the file */
1231 @END
1234 /* Allocate a file handle for a Unix fd */
1235 @REQ(alloc_file_handle)
1236 unsigned int access; /* wanted access rights */
1237 unsigned int attributes; /* object attributes */
1238 int fd; /* file descriptor on the client side */
1239 @REPLY
1240 obj_handle_t handle; /* handle to the file */
1241 @END
1244 /* Get the Unix name from a file handle */
1245 @REQ(get_handle_unix_name)
1246 obj_handle_t handle; /* file handle */
1247 @REPLY
1248 data_size_t name_len; /* unix name length */
1249 VARARG(name,string); /* unix name */
1250 @END
1253 /* Get a Unix fd to access a file */
1254 @REQ(get_handle_fd)
1255 obj_handle_t handle; /* handle to the file */
1256 @REPLY
1257 int type; /* file type (see below) */
1258 int cacheable; /* can fd be cached in the client? */
1259 unsigned int access; /* file access rights */
1260 unsigned int options; /* file open options */
1261 @END
1262 enum server_fd_type
1264 FD_TYPE_INVALID, /* invalid file (no associated fd) */
1265 FD_TYPE_FILE, /* regular file */
1266 FD_TYPE_DIR, /* directory */
1267 FD_TYPE_SOCKET, /* socket */
1268 FD_TYPE_SERIAL, /* serial port */
1269 FD_TYPE_PIPE, /* named pipe */
1270 FD_TYPE_MAILSLOT, /* mailslot */
1271 FD_TYPE_CHAR, /* unspecified char device */
1272 FD_TYPE_DEVICE, /* Windows device file */
1273 FD_TYPE_NB_TYPES
1277 /* Retrieve (or allocate) the client-side directory cache entry */
1278 @REQ(get_directory_cache_entry)
1279 obj_handle_t handle; /* handle to the directory */
1280 @REPLY
1281 int entry; /* cache entry on the client side */
1282 VARARG(free,ints); /* entries that can be freed */
1283 @END
1286 /* Flush a file buffers */
1287 @REQ(flush)
1288 async_data_t async; /* async I/O parameters */
1289 @REPLY
1290 obj_handle_t event; /* event set when finished */
1291 @END
1293 /* Query file information */
1294 @REQ(get_file_info)
1295 obj_handle_t handle; /* handle to the file */
1296 unsigned int info_class; /* queried information class */
1297 @REPLY
1298 VARARG(data,bytes); /* file info data */
1299 @END
1301 /* Query volume information */
1302 @REQ(get_volume_info)
1303 obj_handle_t handle; /* handle to the file */
1304 unsigned int info_class; /* queried information class */
1305 @REPLY
1306 VARARG(data,bytes); /* volume info data */
1307 @END
1309 /* Lock a region of a file */
1310 @REQ(lock_file)
1311 obj_handle_t handle; /* handle to the file */
1312 file_pos_t offset; /* offset of start of lock */
1313 file_pos_t count; /* count of bytes to lock */
1314 int shared; /* shared or exclusive lock? */
1315 int wait; /* do we want to wait? */
1316 @REPLY
1317 obj_handle_t handle; /* handle to wait on */
1318 int overlapped; /* is it an overlapped I/O handle? */
1319 @END
1322 /* Unlock a region of a file */
1323 @REQ(unlock_file)
1324 obj_handle_t handle; /* handle to the file */
1325 file_pos_t offset; /* offset of start of unlock */
1326 file_pos_t count; /* count of bytes to unlock */
1327 @END
1330 /* Create a socket */
1331 @REQ(create_socket)
1332 unsigned int access; /* wanted access rights */
1333 unsigned int attributes; /* object attributes */
1334 int family; /* family, see socket manpage */
1335 int type; /* type, see socket manpage */
1336 int protocol; /* protocol, see socket manpage */
1337 unsigned int flags; /* socket flags */
1338 @REPLY
1339 obj_handle_t handle; /* handle to the new socket */
1340 @END
1343 /* Accept a socket */
1344 @REQ(accept_socket)
1345 obj_handle_t lhandle; /* handle to the listening socket */
1346 unsigned int access; /* wanted access rights */
1347 unsigned int attributes; /* object attributes */
1348 @REPLY
1349 obj_handle_t handle; /* handle to the new socket */
1350 @END
1353 /* Accept into an initialized socket */
1354 @REQ(accept_into_socket)
1355 obj_handle_t lhandle; /* handle to the listening socket */
1356 obj_handle_t ahandle; /* handle to the accepting socket */
1357 @END
1360 /* Set socket event parameters */
1361 @REQ(set_socket_event)
1362 obj_handle_t handle; /* handle to the socket */
1363 unsigned int mask; /* event mask */
1364 obj_handle_t event; /* event object */
1365 user_handle_t window; /* window to send the message to */
1366 unsigned int msg; /* message to send */
1367 @END
1370 /* Get socket event parameters */
1371 @REQ(get_socket_event)
1372 obj_handle_t handle; /* handle to the socket */
1373 int service; /* clear pending? */
1374 obj_handle_t c_event; /* event to clear */
1375 @REPLY
1376 unsigned int mask; /* event mask */
1377 unsigned int pmask; /* pending events */
1378 unsigned int state; /* status bits */
1379 VARARG(errors,ints); /* event errors */
1380 @END
1383 /* Get socket info */
1384 @REQ(get_socket_info)
1385 obj_handle_t handle; /* handle to the socket */
1386 @REPLY
1387 int family; /* family, see socket manpage */
1388 int type; /* type, see socket manpage */
1389 int protocol; /* protocol, see socket manpage */
1390 @END
1393 /* Re-enable pending socket events */
1394 @REQ(enable_socket_event)
1395 obj_handle_t handle; /* handle to the socket */
1396 unsigned int mask; /* events to re-enable */
1397 unsigned int sstate; /* status bits to set */
1398 unsigned int cstate; /* status bits to clear */
1399 @END
1401 @REQ(set_socket_deferred)
1402 obj_handle_t handle; /* handle to the socket */
1403 obj_handle_t deferred; /* handle to the socket for which accept() is deferred */
1404 @END
1406 /* Allocate a console (only used by a console renderer) */
1407 @REQ(alloc_console)
1408 unsigned int access; /* wanted access rights */
1409 unsigned int attributes; /* object attributes */
1410 process_id_t pid; /* pid of process which shall be attached to the console */
1411 int input_fd; /* if pid=-1 (bare console to current process), fd for input */
1412 @REPLY
1413 obj_handle_t handle_in; /* handle to console input */
1414 obj_handle_t event; /* handle to renderer events change notification */
1415 @END
1418 /* Free the console of the current process */
1419 @REQ(free_console)
1420 @END
1423 #define CONSOLE_RENDERER_NONE_EVENT 0x00
1424 #define CONSOLE_RENDERER_TITLE_EVENT 0x01
1425 #define CONSOLE_RENDERER_ACTIVE_SB_EVENT 0x02
1426 #define CONSOLE_RENDERER_SB_RESIZE_EVENT 0x03
1427 #define CONSOLE_RENDERER_UPDATE_EVENT 0x04
1428 #define CONSOLE_RENDERER_CURSOR_POS_EVENT 0x05
1429 #define CONSOLE_RENDERER_CURSOR_GEOM_EVENT 0x06
1430 #define CONSOLE_RENDERER_DISPLAY_EVENT 0x07
1431 #define CONSOLE_RENDERER_EXIT_EVENT 0x08
1432 struct console_renderer_event
1434 short event;
1435 union
1437 struct
1439 short top;
1440 short bottom;
1441 } update;
1442 struct
1444 short width;
1445 short height;
1446 } resize;
1447 struct
1449 short x;
1450 short y;
1451 } cursor_pos;
1452 struct
1454 short visible;
1455 short size;
1456 } cursor_geom;
1457 struct
1459 short left;
1460 short top;
1461 short width;
1462 short height;
1463 } display;
1464 } u;
1467 /* retrieve console events for the renderer */
1468 @REQ(get_console_renderer_events)
1469 obj_handle_t handle; /* handle to console input events */
1470 @REPLY
1471 VARARG(data,bytes); /* the various console_renderer_events */
1472 @END
1475 /* Open a handle to the process console */
1476 @REQ(open_console)
1477 obj_handle_t from; /* 0 (resp 1) input (resp output) of current process console */
1478 /* otherwise console_in handle to get active screen buffer? */
1479 unsigned int access; /* wanted access rights */
1480 unsigned int attributes; /* object attributes */
1481 int share; /* share mask (only for output handles) */
1482 @REPLY
1483 obj_handle_t handle; /* handle to the console */
1484 @END
1487 /* Attach to a other process's console */
1488 @REQ(attach_console)
1489 process_id_t pid; /* pid of attached console process */
1490 @REPLY
1491 obj_handle_t std_in; /* attached stdin */
1492 obj_handle_t std_out; /* attached stdout */
1493 obj_handle_t std_err; /* attached stderr */
1494 @END
1497 /* Get the input queue wait event */
1498 @REQ(get_console_wait_event)
1499 @REPLY
1500 obj_handle_t handle;
1501 @END
1503 /* Get a console mode (input or output) */
1504 @REQ(get_console_mode)
1505 obj_handle_t handle; /* handle to the console */
1506 @REPLY
1507 int mode; /* console mode */
1508 @END
1511 /* Set a console mode (input or output) */
1512 @REQ(set_console_mode)
1513 obj_handle_t handle; /* handle to the console */
1514 int mode; /* console mode */
1515 @END
1518 /* Set info about a console (input only) */
1519 @REQ(set_console_input_info)
1520 obj_handle_t handle; /* handle to console input, or 0 for process' console */
1521 int mask; /* setting mask (see below) */
1522 obj_handle_t active_sb; /* active screen buffer */
1523 int history_mode; /* whether we duplicate lines in history */
1524 int history_size; /* number of lines in history */
1525 int edition_mode; /* index to the edition mode flavors */
1526 int input_cp; /* console input codepage */
1527 int output_cp; /* console output codepage */
1528 user_handle_t win; /* console window if backend supports it */
1529 VARARG(title,unicode_str); /* console title */
1530 @END
1531 #define SET_CONSOLE_INPUT_INFO_ACTIVE_SB 0x01
1532 #define SET_CONSOLE_INPUT_INFO_TITLE 0x02
1533 #define SET_CONSOLE_INPUT_INFO_HISTORY_MODE 0x04
1534 #define SET_CONSOLE_INPUT_INFO_HISTORY_SIZE 0x08
1535 #define SET_CONSOLE_INPUT_INFO_EDITION_MODE 0x10
1536 #define SET_CONSOLE_INPUT_INFO_INPUT_CODEPAGE 0x20
1537 #define SET_CONSOLE_INPUT_INFO_OUTPUT_CODEPAGE 0x40
1538 #define SET_CONSOLE_INPUT_INFO_WIN 0x80
1541 /* Get info about a console (input only) */
1542 @REQ(get_console_input_info)
1543 obj_handle_t handle; /* handle to console input, or 0 for process' console */
1544 @REPLY
1545 int history_mode; /* whether we duplicate lines in history */
1546 int history_size; /* number of lines in history */
1547 int history_index; /* number of used lines in history */
1548 int edition_mode; /* index to the edition mode flavors */
1549 int input_cp; /* console input codepage */
1550 int output_cp; /* console output codepage */
1551 user_handle_t win; /* console window if backend supports it */
1552 VARARG(title,unicode_str); /* console title */
1553 @END
1556 /* appends a string to console's history */
1557 @REQ(append_console_input_history)
1558 obj_handle_t handle; /* handle to console input, or 0 for process' console */
1559 VARARG(line,unicode_str); /* line to add */
1560 @END
1563 /* appends a string to console's history */
1564 @REQ(get_console_input_history)
1565 obj_handle_t handle; /* handle to console input, or 0 for process' console */
1566 int index; /* index to get line from */
1567 @REPLY
1568 int total; /* total length of line in Unicode chars */
1569 VARARG(line,unicode_str); /* line to add */
1570 @END
1573 /* creates a new screen buffer on process' console */
1574 @REQ(create_console_output)
1575 obj_handle_t handle_in; /* handle to console input, or 0 for process' console */
1576 unsigned int access; /* wanted access rights */
1577 unsigned int attributes; /* object attributes */
1578 unsigned int share; /* sharing credentials */
1579 int fd; /* for bare consoles, fd the screen-buffer is attached to */
1580 @REPLY
1581 obj_handle_t handle_out; /* handle to the screen buffer */
1582 @END
1585 /* Set info about a console (output only) */
1586 @REQ(set_console_output_info)
1587 obj_handle_t handle; /* handle to the console */
1588 int mask; /* setting mask (see below) */
1589 short int cursor_size; /* size of cursor (percentage filled) */
1590 short int cursor_visible;/* cursor visibility flag */
1591 short int cursor_x; /* position of cursor (x, y) */
1592 short int cursor_y;
1593 short int width; /* width of the screen buffer */
1594 short int height; /* height of the screen buffer */
1595 short int attr; /* default fill attributes (screen colors) */
1596 short int popup_attr; /* pop-up color attributes */
1597 short int win_left; /* window actually displayed by renderer */
1598 short int win_top; /* the rect area is expressed within the */
1599 short int win_right; /* boundaries of the screen buffer */
1600 short int win_bottom;
1601 short int max_width; /* maximum size (width x height) for the window */
1602 short int max_height;
1603 short int font_width; /* font size (width x height) */
1604 short int font_height;
1605 VARARG(colors,uints); /* color table */
1606 @END
1607 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_GEOM 0x0001
1608 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_POS 0x0002
1609 #define SET_CONSOLE_OUTPUT_INFO_SIZE 0x0004
1610 #define SET_CONSOLE_OUTPUT_INFO_ATTR 0x0008
1611 #define SET_CONSOLE_OUTPUT_INFO_DISPLAY_WINDOW 0x0010
1612 #define SET_CONSOLE_OUTPUT_INFO_MAX_SIZE 0x0020
1613 #define SET_CONSOLE_OUTPUT_INFO_FONT 0x0040
1614 #define SET_CONSOLE_OUTPUT_INFO_COLORTABLE 0x0080
1615 #define SET_CONSOLE_OUTPUT_INFO_POPUP_ATTR 0x0100
1618 /* Get info about a console (output only) */
1619 @REQ(get_console_output_info)
1620 obj_handle_t handle; /* handle to the console */
1621 @REPLY
1622 short int cursor_size; /* size of cursor (percentage filled) */
1623 short int cursor_visible;/* cursor visibility flag */
1624 short int cursor_x; /* position of cursor (x, y) */
1625 short int cursor_y;
1626 short int width; /* width of the screen buffer */
1627 short int height; /* height of the screen buffer */
1628 short int attr; /* default fill attributes (screen colors) */
1629 short int popup_attr; /* pop-up color attributes */
1630 short int win_left; /* window actually displayed by renderer */
1631 short int win_top; /* the rect area is expressed within the */
1632 short int win_right; /* boundaries of the screen buffer */
1633 short int win_bottom;
1634 short int max_width; /* maximum size (width x height) for the window */
1635 short int max_height;
1636 short int font_width; /* font size (width x height) */
1637 short int font_height;
1638 VARARG(colors,uints); /* color table */
1639 @END
1641 /* Add input records to a console input queue */
1642 @REQ(write_console_input)
1643 obj_handle_t handle; /* handle to the console input */
1644 VARARG(rec,input_records); /* input records */
1645 @REPLY
1646 int written; /* number of records written */
1647 @END
1650 /* Fetch input records from a console input queue */
1651 @REQ(read_console_input)
1652 obj_handle_t handle; /* handle to the console input */
1653 int flush; /* flush the retrieved records from the queue? */
1654 @REPLY
1655 int read; /* number of records read */
1656 VARARG(rec,input_records); /* input records */
1657 @END
1660 /* write data (chars and/or attributes) in a screen buffer */
1661 @REQ(write_console_output)
1662 obj_handle_t handle; /* handle to the console output */
1663 int x; /* position where to start writing */
1664 int y;
1665 int mode; /* char info (see below) */
1666 int wrap; /* wrap around at end of line? */
1667 VARARG(data,bytes); /* info to write */
1668 @REPLY
1669 int written; /* number of char infos actually written */
1670 int width; /* width of screen buffer */
1671 int height; /* height of screen buffer */
1672 @END
1673 enum char_info_mode
1675 CHAR_INFO_MODE_TEXT, /* characters only */
1676 CHAR_INFO_MODE_ATTR, /* attributes only */
1677 CHAR_INFO_MODE_TEXTATTR, /* both characters and attributes */
1678 CHAR_INFO_MODE_TEXTSTDATTR /* characters but use standard attributes */
1682 /* fill a screen buffer with constant data (chars and/or attributes) */
1683 @REQ(fill_console_output)
1684 obj_handle_t handle; /* handle to the console output */
1685 int x; /* position where to start writing */
1686 int y;
1687 int mode; /* char info mode */
1688 int count; /* number to write */
1689 int wrap; /* wrap around at end of line? */
1690 char_info_t data; /* data to write */
1691 @REPLY
1692 int written; /* number of char infos actually written */
1693 @END
1696 /* read data (chars and/or attributes) from a screen buffer */
1697 @REQ(read_console_output)
1698 obj_handle_t handle; /* handle to the console output */
1699 int x; /* position (x,y) where to start reading */
1700 int y;
1701 int mode; /* char info mode */
1702 int wrap; /* wrap around at end of line? */
1703 @REPLY
1704 int width; /* width of screen buffer */
1705 int height; /* height of screen buffer */
1706 VARARG(data,bytes);
1707 @END
1710 /* move a rect (of data) in screen buffer content */
1711 @REQ(move_console_output)
1712 obj_handle_t handle; /* handle to the console output */
1713 short int x_src; /* position (x, y) of rect to start moving from */
1714 short int y_src;
1715 short int x_dst; /* position (x, y) of rect to move to */
1716 short int y_dst;
1717 short int w; /* size of the rect (width, height) to move */
1718 short int h;
1719 @END
1722 /* Sends a signal to a process group */
1723 @REQ(send_console_signal)
1724 int signal; /* the signal to send */
1725 process_id_t group_id; /* the group to send the signal to */
1726 @END
1729 /* enable directory change notifications */
1730 @REQ(read_directory_changes)
1731 unsigned int filter; /* notification filter */
1732 int subtree; /* watch the subtree? */
1733 int want_data; /* flag indicating whether change data should be collected */
1734 async_data_t async; /* async I/O parameters */
1735 @END
1738 @REQ(read_change)
1739 obj_handle_t handle;
1740 @REPLY
1741 VARARG(events,filesystem_event); /* collected filesystem events */
1742 @END
1745 /* Create a file mapping */
1746 @REQ(create_mapping)
1747 unsigned int access; /* wanted access rights */
1748 unsigned int flags; /* SEC_* flags */
1749 unsigned int file_access; /* file access rights */
1750 mem_size_t size; /* mapping size */
1751 obj_handle_t file_handle; /* file handle */
1752 VARARG(objattr,object_attributes); /* object attributes */
1753 @REPLY
1754 obj_handle_t handle; /* handle to the mapping */
1755 @END
1758 /* Open a mapping */
1759 @REQ(open_mapping)
1760 unsigned int access; /* wanted access rights */
1761 unsigned int attributes; /* object attributes */
1762 obj_handle_t rootdir; /* root directory */
1763 VARARG(name,unicode_str); /* object name */
1764 @REPLY
1765 obj_handle_t handle; /* handle to the mapping */
1766 @END
1769 /* Get information about a file mapping */
1770 @REQ(get_mapping_info)
1771 obj_handle_t handle; /* handle to the mapping */
1772 unsigned int access; /* wanted access rights */
1773 @REPLY
1774 mem_size_t size; /* mapping size */
1775 unsigned int flags; /* SEC_* flags */
1776 obj_handle_t shared_file; /* shared mapping file handle */
1777 VARARG(image,pe_image_info);/* image info for SEC_IMAGE mappings */
1778 @END
1781 /* Add a memory view in the current process */
1782 @REQ(map_view)
1783 obj_handle_t mapping; /* file mapping handle */
1784 unsigned int access; /* wanted access rights */
1785 client_ptr_t base; /* view base address (page-aligned) */
1786 mem_size_t size; /* view size */
1787 file_pos_t start; /* start offset in mapping */
1788 @END
1791 /* Unmap a memory view from the current process */
1792 @REQ(unmap_view)
1793 client_ptr_t base; /* view base address */
1794 @END
1797 /* Get a range of committed pages in a file mapping */
1798 @REQ(get_mapping_committed_range)
1799 client_ptr_t base; /* view base address */
1800 file_pos_t offset; /* starting offset (page-aligned, in bytes) */
1801 @REPLY
1802 mem_size_t size; /* size of range starting at offset (page-aligned, in bytes) */
1803 int committed; /* whether it is a committed range */
1804 @END
1807 /* Add a range to the committed pages in a file mapping */
1808 @REQ(add_mapping_committed_range)
1809 client_ptr_t base; /* view base address */
1810 file_pos_t offset; /* starting offset (page-aligned, in bytes) */
1811 mem_size_t size; /* size to set (page-aligned, in bytes) or 0 if only retrieving */
1812 @END
1815 /* Check if two memory maps are for the same file */
1816 @REQ(is_same_mapping)
1817 client_ptr_t base1; /* first view base address */
1818 client_ptr_t base2; /* second view base address */
1819 @END
1822 #define SNAP_PROCESS 0x00000001
1823 #define SNAP_THREAD 0x00000002
1824 /* Create a snapshot */
1825 @REQ(create_snapshot)
1826 unsigned int attributes; /* object attributes */
1827 unsigned int flags; /* snapshot flags (SNAP_*) */
1828 @REPLY
1829 obj_handle_t handle; /* handle to the snapshot */
1830 @END
1833 /* Get the next process from a snapshot */
1834 @REQ(next_process)
1835 obj_handle_t handle; /* handle to the snapshot */
1836 int reset; /* reset snapshot position? */
1837 @REPLY
1838 int count; /* process usage count */
1839 process_id_t pid; /* process id */
1840 process_id_t ppid; /* parent process id */
1841 int threads; /* number of threads */
1842 int priority; /* process priority */
1843 int handles; /* number of handles */
1844 int unix_pid; /* Unix pid */
1845 VARARG(filename,unicode_str); /* file name of main exe */
1846 @END
1849 /* Get the next thread from a snapshot */
1850 @REQ(next_thread)
1851 obj_handle_t handle; /* handle to the snapshot */
1852 int reset; /* reset snapshot position? */
1853 @REPLY
1854 int count; /* thread usage count */
1855 process_id_t pid; /* process id */
1856 thread_id_t tid; /* thread id */
1857 int base_pri; /* base priority */
1858 int delta_pri; /* delta priority */
1859 @END
1862 /* Wait for a debug event */
1863 @REQ(wait_debug_event)
1864 int get_handle; /* should we alloc a handle for waiting? */
1865 @REPLY
1866 process_id_t pid; /* process id */
1867 thread_id_t tid; /* thread id */
1868 obj_handle_t wait; /* wait handle if no event ready */
1869 VARARG(event,debug_event); /* debug event data */
1870 @END
1873 /* Queue an exception event */
1874 @REQ(queue_exception_event)
1875 int first; /* first chance exception? */
1876 unsigned int code; /* exception code */
1877 unsigned int flags; /* exception flags */
1878 client_ptr_t record; /* exception record */
1879 client_ptr_t address; /* exception address */
1880 data_size_t len; /* size of parameters */
1881 VARARG(params,uints64,len);/* exception parameters */
1882 VARARG(context,context); /* thread context */
1883 @REPLY
1884 obj_handle_t handle; /* handle to the queued event */
1885 @END
1888 /* Retrieve the status of an exception event */
1889 @REQ(get_exception_status)
1890 obj_handle_t handle; /* handle to the queued event */
1891 @REPLY
1892 VARARG(context,context); /* modified thread context */
1893 @END
1896 /* Continue a debug event */
1897 @REQ(continue_debug_event)
1898 process_id_t pid; /* process id to continue */
1899 thread_id_t tid; /* thread id to continue */
1900 int status; /* continuation status */
1901 @END
1904 /* Start/stop debugging an existing process */
1905 @REQ(debug_process)
1906 process_id_t pid; /* id of the process to debug */
1907 int attach; /* 1=attaching / 0=detaching from the process */
1908 @END
1911 /* Simulate a breakpoint in a process */
1912 @REQ(debug_break)
1913 obj_handle_t handle; /* process handle */
1914 @REPLY
1915 int self; /* was it the caller itself? */
1916 @END
1919 /* Set debugger kill on exit flag */
1920 @REQ(set_debugger_kill_on_exit)
1921 int kill_on_exit; /* 0=detach/1=kill debuggee when debugger dies */
1922 @END
1925 /* Read data from a process address space */
1926 @REQ(read_process_memory)
1927 obj_handle_t handle; /* process handle */
1928 client_ptr_t addr; /* addr to read from */
1929 @REPLY
1930 VARARG(data,bytes); /* result data */
1931 @END
1934 /* Write data to a process address space */
1935 @REQ(write_process_memory)
1936 obj_handle_t handle; /* process handle */
1937 client_ptr_t addr; /* addr to write to */
1938 VARARG(data,bytes); /* data to write */
1939 @END
1942 /* Create a registry key */
1943 @REQ(create_key)
1944 unsigned int access; /* desired access rights */
1945 unsigned int options; /* creation options */
1946 VARARG(objattr,object_attributes); /* object attributes */
1947 VARARG(class,unicode_str); /* class name */
1948 @REPLY
1949 obj_handle_t hkey; /* handle to the created key */
1950 int created; /* has it been newly created? */
1951 @END
1953 /* Open a registry key */
1954 @REQ(open_key)
1955 obj_handle_t parent; /* handle to the parent key */
1956 unsigned int access; /* desired access rights */
1957 unsigned int attributes; /* object attributes */
1958 VARARG(name,unicode_str); /* key name */
1959 @REPLY
1960 obj_handle_t hkey; /* handle to the open key */
1961 @END
1964 /* Delete a registry key */
1965 @REQ(delete_key)
1966 obj_handle_t hkey; /* handle to the key */
1967 @END
1970 /* Flush a registry key */
1971 @REQ(flush_key)
1972 obj_handle_t hkey; /* handle to the key */
1973 @END
1976 /* Enumerate registry subkeys */
1977 @REQ(enum_key)
1978 obj_handle_t hkey; /* handle to registry key */
1979 int index; /* index of subkey (or -1 for current key) */
1980 int info_class; /* requested information class */
1981 @REPLY
1982 int subkeys; /* number of subkeys */
1983 int max_subkey; /* longest subkey name */
1984 int max_class; /* longest class name */
1985 int values; /* number of values */
1986 int max_value; /* longest value name */
1987 int max_data; /* longest value data */
1988 timeout_t modif; /* last modification time */
1989 data_size_t total; /* total length needed for full name and class */
1990 data_size_t namelen; /* length of key name in bytes */
1991 VARARG(name,unicode_str,namelen); /* key name */
1992 VARARG(class,unicode_str); /* class name */
1993 @END
1996 /* Set a value of a registry key */
1997 @REQ(set_key_value)
1998 obj_handle_t hkey; /* handle to registry key */
1999 int type; /* value type */
2000 data_size_t namelen; /* length of value name in bytes */
2001 VARARG(name,unicode_str,namelen); /* value name */
2002 VARARG(data,bytes); /* value data */
2003 @END
2006 /* Retrieve the value of a registry key */
2007 @REQ(get_key_value)
2008 obj_handle_t hkey; /* handle to registry key */
2009 VARARG(name,unicode_str); /* value name */
2010 @REPLY
2011 int type; /* value type */
2012 data_size_t total; /* total length needed for data */
2013 VARARG(data,bytes); /* value data */
2014 @END
2017 /* Enumerate a value of a registry key */
2018 @REQ(enum_key_value)
2019 obj_handle_t hkey; /* handle to registry key */
2020 int index; /* value index */
2021 int info_class; /* requested information class */
2022 @REPLY
2023 int type; /* value type */
2024 data_size_t total; /* total length needed for full name and data */
2025 data_size_t namelen; /* length of value name in bytes */
2026 VARARG(name,unicode_str,namelen); /* value name */
2027 VARARG(data,bytes); /* value data */
2028 @END
2031 /* Delete a value of a registry key */
2032 @REQ(delete_key_value)
2033 obj_handle_t hkey; /* handle to registry key */
2034 VARARG(name,unicode_str); /* value name */
2035 @END
2038 /* Load a registry branch from a file */
2039 @REQ(load_registry)
2040 obj_handle_t file; /* file to load from */
2041 VARARG(objattr,object_attributes); /* object attributes */
2042 @END
2045 /* UnLoad a registry branch from a file */
2046 @REQ(unload_registry)
2047 obj_handle_t hkey; /* root key to unload to */
2048 @END
2051 /* Save a registry branch to a file */
2052 @REQ(save_registry)
2053 obj_handle_t hkey; /* key to save */
2054 obj_handle_t file; /* file to save to */
2055 @END
2058 /* Add a registry key change notification */
2059 @REQ(set_registry_notification)
2060 obj_handle_t hkey; /* key to watch for changes */
2061 obj_handle_t event; /* event to set */
2062 int subtree; /* should we watch the whole subtree? */
2063 unsigned int filter; /* things to watch */
2064 @END
2067 /* Create a waitable timer */
2068 @REQ(create_timer)
2069 unsigned int access; /* wanted access rights */
2070 int manual; /* manual reset */
2071 VARARG(objattr,object_attributes); /* object attributes */
2072 @REPLY
2073 obj_handle_t handle; /* handle to the timer */
2074 @END
2077 /* Open a waitable timer */
2078 @REQ(open_timer)
2079 unsigned int access; /* wanted access rights */
2080 unsigned int attributes; /* object attributes */
2081 obj_handle_t rootdir; /* root directory */
2082 VARARG(name,unicode_str); /* object name */
2083 @REPLY
2084 obj_handle_t handle; /* handle to the timer */
2085 @END
2087 /* Set a waitable timer */
2088 @REQ(set_timer)
2089 obj_handle_t handle; /* handle to the timer */
2090 timeout_t expire; /* next expiration absolute time */
2091 client_ptr_t callback; /* callback function */
2092 client_ptr_t arg; /* callback argument */
2093 int period; /* timer period in ms */
2094 @REPLY
2095 int signaled; /* was the timer signaled before this call ? */
2096 @END
2098 /* Cancel a waitable timer */
2099 @REQ(cancel_timer)
2100 obj_handle_t handle; /* handle to the timer */
2101 @REPLY
2102 int signaled; /* was the timer signaled before this calltime ? */
2103 @END
2105 /* Get information on a waitable timer */
2106 @REQ(get_timer_info)
2107 obj_handle_t handle; /* handle to the timer */
2108 @REPLY
2109 timeout_t when; /* absolute time when the timer next expires */
2110 int signaled; /* is the timer signaled? */
2111 @END
2114 /* Retrieve the current context of a thread */
2115 @REQ(get_thread_context)
2116 obj_handle_t handle; /* thread handle */
2117 unsigned int flags; /* context flags */
2118 int suspend; /* suspend the thread if needed */
2119 @REPLY
2120 int self; /* was it a handle to the current thread? */
2121 VARARG(context,context); /* thread context */
2122 @END
2125 /* Set the current context of a thread */
2126 @REQ(set_thread_context)
2127 obj_handle_t handle; /* thread handle */
2128 int suspend; /* suspend the thread if needed */
2129 VARARG(context,context); /* thread context */
2130 @REPLY
2131 int self; /* was it a handle to the current thread? */
2132 @END
2135 /* Fetch a selector entry for a thread */
2136 @REQ(get_selector_entry)
2137 obj_handle_t handle; /* thread handle */
2138 int entry; /* LDT entry */
2139 @REPLY
2140 unsigned int base; /* selector base */
2141 unsigned int limit; /* selector limit */
2142 unsigned char flags; /* selector flags */
2143 @END
2146 /* Add an atom */
2147 @REQ(add_atom)
2148 obj_handle_t table; /* which table to add atom to */
2149 VARARG(name,unicode_str); /* atom name */
2150 @REPLY
2151 atom_t atom; /* resulting atom */
2152 @END
2155 /* Delete an atom */
2156 @REQ(delete_atom)
2157 obj_handle_t table; /* which table to delete atom from */
2158 atom_t atom; /* atom handle */
2159 @END
2162 /* Find an atom */
2163 @REQ(find_atom)
2164 obj_handle_t table; /* which table to find atom from */
2165 VARARG(name,unicode_str); /* atom name */
2166 @REPLY
2167 atom_t atom; /* atom handle */
2168 @END
2171 /* Get information about an atom */
2172 @REQ(get_atom_information)
2173 obj_handle_t table; /* which table to find atom from */
2174 atom_t atom; /* atom handle */
2175 @REPLY
2176 int count; /* atom lock count */
2177 int pinned; /* whether the atom has been pinned */
2178 data_size_t total; /* actual length of atom name */
2179 VARARG(name,unicode_str); /* atom name */
2180 @END
2183 /* Set information about an atom */
2184 @REQ(set_atom_information)
2185 obj_handle_t table; /* which table to find atom from */
2186 atom_t atom; /* atom handle */
2187 int pinned; /* whether to bump atom information */
2188 @END
2191 /* Empty an atom table */
2192 @REQ(empty_atom_table)
2193 obj_handle_t table; /* which table to find atom from */
2194 int if_pinned; /* whether to delete pinned atoms */
2195 @END
2198 /* Init an atom table */
2199 @REQ(init_atom_table)
2200 int entries; /* number of entries (only for local) */
2201 @REPLY
2202 obj_handle_t table; /* handle to the atom table */
2203 @END
2206 /* Get the message queue of the current thread */
2207 @REQ(get_msg_queue)
2208 @REPLY
2209 obj_handle_t handle; /* handle to the queue */
2210 @END
2213 /* Set the file descriptor associated to the current thread queue */
2214 @REQ(set_queue_fd)
2215 obj_handle_t handle; /* handle to the file descriptor */
2216 @END
2219 /* Set the current message queue wakeup mask */
2220 @REQ(set_queue_mask)
2221 unsigned int wake_mask; /* wakeup bits mask */
2222 unsigned int changed_mask; /* changed bits mask */
2223 int skip_wait; /* will we skip waiting if signaled? */
2224 @REPLY
2225 unsigned int wake_bits; /* current wake bits */
2226 unsigned int changed_bits; /* current changed bits */
2227 @END
2230 /* Get the current message queue status */
2231 @REQ(get_queue_status)
2232 unsigned int clear_bits; /* should we clear the change bits? */
2233 @REPLY
2234 unsigned int wake_bits; /* wake bits */
2235 unsigned int changed_bits; /* changed bits since last time */
2236 @END
2239 /* Retrieve the process idle event */
2240 @REQ(get_process_idle_event)
2241 obj_handle_t handle; /* process handle */
2242 @REPLY
2243 obj_handle_t event; /* handle to idle event */
2244 @END
2247 /* Send a message to a thread queue */
2248 @REQ(send_message)
2249 thread_id_t id; /* thread id */
2250 int type; /* message type (see below) */
2251 int flags; /* message flags (see below) */
2252 user_handle_t win; /* window handle */
2253 unsigned int msg; /* message code */
2254 lparam_t wparam; /* parameters */
2255 lparam_t lparam; /* parameters */
2256 timeout_t timeout; /* timeout for reply */
2257 VARARG(data,message_data); /* message data for sent messages */
2258 @END
2260 @REQ(post_quit_message)
2261 int exit_code; /* exit code to return */
2262 @END
2264 enum message_type
2266 MSG_ASCII, /* Ascii message (from SendMessageA) */
2267 MSG_UNICODE, /* Unicode message (from SendMessageW) */
2268 MSG_NOTIFY, /* notify message (from SendNotifyMessageW), always Unicode */
2269 MSG_CALLBACK, /* callback message (from SendMessageCallbackW), always Unicode */
2270 MSG_CALLBACK_RESULT,/* result of a callback message */
2271 MSG_OTHER_PROCESS, /* sent from other process, may include vararg data, always Unicode */
2272 MSG_POSTED, /* posted message (from PostMessageW), always Unicode */
2273 MSG_HARDWARE, /* hardware message */
2274 MSG_WINEVENT, /* winevent message */
2275 MSG_HOOK_LL /* low-level hardware hook */
2277 #define SEND_MSG_ABORT_IF_HUNG 0x01
2280 /* Send a hardware message to a thread queue */
2281 @REQ(send_hardware_message)
2282 user_handle_t win; /* window handle */
2283 hw_input_t input; /* input data */
2284 unsigned int flags; /* flags (see below) */
2285 @REPLY
2286 int wait; /* do we need to wait for a reply? */
2287 int prev_x; /* previous cursor position */
2288 int prev_y;
2289 int new_x; /* new cursor position */
2290 int new_y;
2291 VARARG(keystate,bytes); /* global state array for all the keys */
2292 @END
2293 #define SEND_HWMSG_INJECTED 0x01
2296 /* Get a message from the current queue */
2297 @REQ(get_message)
2298 unsigned int flags; /* PM_* flags */
2299 user_handle_t get_win; /* window handle to get */
2300 unsigned int get_first; /* first message code to get */
2301 unsigned int get_last; /* last message code to get */
2302 unsigned int hw_id; /* id of the previous hardware message (or 0) */
2303 unsigned int wake_mask; /* wakeup bits mask */
2304 unsigned int changed_mask; /* changed bits mask */
2305 @REPLY
2306 user_handle_t win; /* window handle */
2307 unsigned int msg; /* message code */
2308 lparam_t wparam; /* parameters */
2309 lparam_t lparam; /* parameters */
2310 int type; /* message type */
2311 int x; /* message x position */
2312 int y; /* message y position */
2313 unsigned int time; /* message time */
2314 unsigned int active_hooks; /* active hooks bitmap */
2315 data_size_t total; /* total size of extra data */
2316 VARARG(data,message_data); /* message data for sent messages */
2317 @END
2320 /* Reply to a sent message */
2321 @REQ(reply_message)
2322 int remove; /* should we remove the message? */
2323 lparam_t result; /* message result */
2324 VARARG(data,bytes); /* message data for sent messages */
2325 @END
2328 /* Accept the current hardware message */
2329 @REQ(accept_hardware_message)
2330 unsigned int hw_id; /* id of the hardware message */
2331 int remove; /* should we remove the message? */
2332 @END
2335 /* Retrieve the reply for the last message sent */
2336 @REQ(get_message_reply)
2337 int cancel; /* cancel message if not ready? */
2338 @REPLY
2339 lparam_t result; /* message result */
2340 VARARG(data,bytes); /* message data for sent messages */
2341 @END
2344 /* Set a window timer */
2345 @REQ(set_win_timer)
2346 user_handle_t win; /* window handle */
2347 unsigned int msg; /* message to post */
2348 unsigned int rate; /* timer rate in ms */
2349 lparam_t id; /* timer id */
2350 lparam_t lparam; /* message lparam (callback proc) */
2351 @REPLY
2352 lparam_t id; /* timer id */
2353 @END
2356 /* Kill a window timer */
2357 @REQ(kill_win_timer)
2358 user_handle_t win; /* window handle */
2359 lparam_t id; /* timer id */
2360 unsigned int msg; /* message to post */
2361 @END
2364 /* check if the thread owning the window is hung */
2365 @REQ(is_window_hung)
2366 user_handle_t win; /* window handle */
2367 @REPLY
2368 int is_hung;
2369 @END
2372 /* Retrieve info about a serial port */
2373 @REQ(get_serial_info)
2374 obj_handle_t handle; /* handle to comm port */
2375 int flags;
2376 @REPLY
2377 unsigned int eventmask;
2378 unsigned int cookie;
2379 unsigned int pending_write;
2380 @END
2383 /* Set info about a serial port */
2384 @REQ(set_serial_info)
2385 obj_handle_t handle; /* handle to comm port */
2386 int flags; /* bitmask to set values (see below) */
2387 @END
2388 #define SERIALINFO_PENDING_WRITE 0x04
2389 #define SERIALINFO_PENDING_WAIT 0x08
2392 /* Create an async I/O */
2393 @REQ(register_async)
2394 int type; /* type of queue to look after */
2395 async_data_t async; /* async I/O parameters */
2396 int count; /* count - usually # of bytes to be read/written */
2397 @END
2398 #define ASYNC_TYPE_READ 0x01
2399 #define ASYNC_TYPE_WRITE 0x02
2400 #define ASYNC_TYPE_WAIT 0x03
2403 /* Cancel all async op on a fd */
2404 @REQ(cancel_async)
2405 obj_handle_t handle; /* handle to comm port, socket or file */
2406 client_ptr_t iosb; /* I/O status block (NULL=all) */
2407 int only_thread; /* cancel matching this thread */
2408 @END
2411 /* Retrieve results of an async */
2412 @REQ(get_async_result)
2413 client_ptr_t user_arg; /* user arg used to identify async */
2414 @REPLY
2415 data_size_t size; /* result size (input or output depending on the operation) */
2416 VARARG(out_data,bytes); /* iosb output data */
2417 @END
2420 /* Perform a read on a file object */
2421 @REQ(read)
2422 async_data_t async; /* async I/O parameters */
2423 file_pos_t pos; /* read position */
2424 @REPLY
2425 obj_handle_t wait; /* handle to wait on for blocking read */
2426 unsigned int options; /* device open options */
2427 VARARG(data,bytes); /* read data */
2428 @END
2431 /* Perform a write on a file object */
2432 @REQ(write)
2433 async_data_t async; /* async I/O parameters */
2434 file_pos_t pos; /* write position */
2435 VARARG(data,bytes); /* write data */
2436 @REPLY
2437 obj_handle_t wait; /* handle to wait on for blocking write */
2438 unsigned int options; /* device open options */
2439 data_size_t size; /* size written */
2440 @END
2443 /* Perform an ioctl on a file */
2444 @REQ(ioctl)
2445 ioctl_code_t code; /* ioctl code */
2446 async_data_t async; /* async I/O parameters */
2447 VARARG(in_data,bytes); /* ioctl input data */
2448 @REPLY
2449 obj_handle_t wait; /* handle to wait on for blocking ioctl */
2450 unsigned int options; /* device open options */
2451 VARARG(out_data,bytes); /* ioctl output data */
2452 @END
2455 /* Store results of an async irp */
2456 @REQ(set_irp_result)
2457 obj_handle_t handle; /* handle to the irp */
2458 unsigned int status; /* status of the irp */
2459 data_size_t size; /* result size (input or output depending on the operation) */
2460 client_ptr_t file_ptr; /* opaque pointer to the file object */
2461 VARARG(data,bytes); /* output data of the irp */
2462 @END
2465 /* Create a named pipe */
2466 @REQ(create_named_pipe)
2467 unsigned int access;
2468 unsigned int options;
2469 unsigned int sharing;
2470 unsigned int maxinstances;
2471 unsigned int outsize;
2472 unsigned int insize;
2473 timeout_t timeout;
2474 unsigned int flags;
2475 VARARG(objattr,object_attributes); /* object attributes */
2476 @REPLY
2477 obj_handle_t handle; /* handle to the pipe */
2478 @END
2480 /* flags in create_named_pipe and get_named_pipe_info */
2481 #define NAMED_PIPE_MESSAGE_STREAM_WRITE 0x0001
2482 #define NAMED_PIPE_MESSAGE_STREAM_READ 0x0002
2483 #define NAMED_PIPE_NONBLOCKING_MODE 0x0004
2484 #define NAMED_PIPE_SERVER_END 0x8000
2486 /* Set named pipe information by handle */
2487 @REQ(set_named_pipe_info)
2488 obj_handle_t handle;
2489 unsigned int flags;
2490 @END
2492 /* Create a window */
2493 @REQ(create_window)
2494 user_handle_t parent; /* parent window */
2495 user_handle_t owner; /* owner window */
2496 atom_t atom; /* class atom */
2497 mod_handle_t instance; /* module instance */
2498 int dpi; /* system DPI */
2499 int awareness; /* thread DPI awareness */
2500 VARARG(class,unicode_str); /* class name */
2501 @REPLY
2502 user_handle_t handle; /* created window */
2503 user_handle_t parent; /* full handle of parent */
2504 user_handle_t owner; /* full handle of owner */
2505 int extra; /* number of extra bytes */
2506 client_ptr_t class_ptr; /* pointer to class in client address space */
2507 int dpi; /* window DPI if not per-monitor aware */
2508 int awareness; /* window DPI awareness */
2509 @END
2512 /* Destroy a window */
2513 @REQ(destroy_window)
2514 user_handle_t handle; /* handle to the window */
2515 @END
2518 /* Retrieve the desktop window for the current thread */
2519 @REQ(get_desktop_window)
2520 int force; /* force creation if it doesn't exist */
2521 @REPLY
2522 user_handle_t top_window; /* handle to the desktop window */
2523 user_handle_t msg_window; /* handle to the top-level HWND_MESSAGE parent */
2524 @END
2527 /* Set a window owner */
2528 @REQ(set_window_owner)
2529 user_handle_t handle; /* handle to the window */
2530 user_handle_t owner; /* new owner */
2531 @REPLY
2532 user_handle_t full_owner; /* full handle of new owner */
2533 user_handle_t prev_owner; /* full handle of previous owner */
2534 @END
2537 /* Get information from a window handle */
2538 @REQ(get_window_info)
2539 user_handle_t handle; /* handle to the window */
2540 @REPLY
2541 user_handle_t full_handle; /* full 32-bit handle */
2542 user_handle_t last_active; /* last active popup */
2543 process_id_t pid; /* process owning the window */
2544 thread_id_t tid; /* thread owning the window */
2545 atom_t atom; /* class atom */
2546 int is_unicode; /* ANSI or unicode */
2547 int dpi; /* window DPI */
2548 int awareness; /* DPI awareness */
2549 @END
2552 /* Set some information in a window */
2553 @REQ(set_window_info)
2554 unsigned short flags; /* flags for fields to set (see below) */
2555 short int is_unicode; /* ANSI or unicode */
2556 user_handle_t handle; /* handle to the window */
2557 unsigned int style; /* window style */
2558 unsigned int ex_style; /* window extended style */
2559 unsigned int id; /* window id */
2560 mod_handle_t instance; /* creator instance */
2561 lparam_t user_data; /* user-specific data */
2562 int extra_offset; /* offset to set in extra bytes */
2563 data_size_t extra_size; /* size to set in extra bytes */
2564 lparam_t extra_value; /* value to set in extra bytes */
2565 @REPLY
2566 unsigned int old_style; /* old window style */
2567 unsigned int old_ex_style; /* old window extended style */
2568 mod_handle_t old_instance; /* old creator instance */
2569 lparam_t old_user_data; /* old user-specific data */
2570 lparam_t old_extra_value; /* old value in extra bytes */
2571 unsigned int old_id; /* old window id */
2572 @END
2573 #define SET_WIN_STYLE 0x01
2574 #define SET_WIN_EXSTYLE 0x02
2575 #define SET_WIN_ID 0x04
2576 #define SET_WIN_INSTANCE 0x08
2577 #define SET_WIN_USERDATA 0x10
2578 #define SET_WIN_EXTRA 0x20
2579 #define SET_WIN_UNICODE 0x40
2582 /* Set the parent of a window */
2583 @REQ(set_parent)
2584 user_handle_t handle; /* handle to the window */
2585 user_handle_t parent; /* handle to the parent */
2586 @REPLY
2587 user_handle_t old_parent; /* old parent window */
2588 user_handle_t full_parent; /* full handle of new parent */
2589 int dpi; /* new window DPI if not per-monitor aware */
2590 int awareness; /* new DPI awareness */
2591 @END
2594 /* Get a list of the window parents, up to the root of the tree */
2595 @REQ(get_window_parents)
2596 user_handle_t handle; /* handle to the window */
2597 @REPLY
2598 int count; /* total count of parents */
2599 VARARG(parents,user_handles); /* parent handles */
2600 @END
2603 /* Get a list of the window children */
2604 @REQ(get_window_children)
2605 obj_handle_t desktop; /* handle to desktop */
2606 user_handle_t parent; /* parent window */
2607 atom_t atom; /* class atom for the listed children */
2608 thread_id_t tid; /* thread owning the listed children */
2609 VARARG(class,unicode_str); /* class name */
2610 @REPLY
2611 int count; /* total count of children */
2612 VARARG(children,user_handles); /* children handles */
2613 @END
2616 /* Get a list of the window children that contain a given point */
2617 @REQ(get_window_children_from_point)
2618 user_handle_t parent; /* parent window */
2619 int x; /* point in parent coordinates */
2620 int y;
2621 int dpi; /* dpi for the point coordinates */
2622 @REPLY
2623 int count; /* total count of children */
2624 VARARG(children,user_handles); /* children handles */
2625 @END
2628 /* Get window tree information from a window handle */
2629 @REQ(get_window_tree)
2630 user_handle_t handle; /* handle to the window */
2631 @REPLY
2632 user_handle_t parent; /* parent window */
2633 user_handle_t owner; /* owner window */
2634 user_handle_t next_sibling; /* next sibling in Z-order */
2635 user_handle_t prev_sibling; /* prev sibling in Z-order */
2636 user_handle_t first_sibling; /* first sibling in Z-order */
2637 user_handle_t last_sibling; /* last sibling in Z-order */
2638 user_handle_t first_child; /* first child */
2639 user_handle_t last_child; /* last child */
2640 @END
2642 /* Set the position and Z order of a window */
2643 @REQ(set_window_pos)
2644 unsigned short swp_flags; /* SWP_* flags */
2645 unsigned short paint_flags; /* paint flags (see below) */
2646 user_handle_t handle; /* handle to the window */
2647 user_handle_t previous; /* previous window in Z order */
2648 rectangle_t window; /* window rectangle (in parent coords) */
2649 rectangle_t client; /* client rectangle (in parent coords) */
2650 VARARG(valid,rectangles); /* valid rectangles from WM_NCCALCSIZE (in parent coords) */
2651 @REPLY
2652 unsigned int new_style; /* new window style */
2653 unsigned int new_ex_style; /* new window extended style */
2654 user_handle_t surface_win; /* parent window that holds the surface */
2655 int needs_update; /* whether the surface region needs an update */
2656 @END
2657 #define SET_WINPOS_PAINT_SURFACE 0x01 /* window has a paintable surface */
2658 #define SET_WINPOS_PIXEL_FORMAT 0x02 /* window has a custom pixel format */
2660 /* Get the window and client rectangles of a window */
2661 @REQ(get_window_rectangles)
2662 user_handle_t handle; /* handle to the window */
2663 int relative; /* coords relative to (see below) */
2664 int dpi; /* DPI to map to, or zero for per-monitor DPI */
2665 @REPLY
2666 rectangle_t window; /* window rectangle */
2667 rectangle_t client; /* client rectangle */
2668 @END
2669 enum coords_relative
2671 COORDS_CLIENT, /* relative to client area */
2672 COORDS_WINDOW, /* relative to whole window area */
2673 COORDS_PARENT, /* relative to parent's client area */
2674 COORDS_SCREEN /* relative to screen origin */
2678 /* Get the window text */
2679 @REQ(get_window_text)
2680 user_handle_t handle; /* handle to the window */
2681 @REPLY
2682 data_size_t length; /* total length in WCHARs */
2683 VARARG(text,unicode_str); /* window text */
2684 @END
2687 /* Set the window text */
2688 @REQ(set_window_text)
2689 user_handle_t handle; /* handle to the window */
2690 VARARG(text,unicode_str); /* window text */
2691 @END
2694 /* Get the coordinates offset between two windows */
2695 @REQ(get_windows_offset)
2696 user_handle_t from; /* handle to the first window */
2697 user_handle_t to; /* handle to the second window */
2698 int dpi; /* DPI to map to, or zero for per-monitor DPI */
2699 @REPLY
2700 int x; /* x coordinate offset */
2701 int y; /* y coordinate offset */
2702 int mirror; /* whether to mirror the x coordinate */
2703 @END
2706 /* Get the visible region of a window */
2707 @REQ(get_visible_region)
2708 user_handle_t window; /* handle to the window */
2709 unsigned int flags; /* DCX flags */
2710 @REPLY
2711 user_handle_t top_win; /* top window to clip against */
2712 rectangle_t top_rect; /* top window visible rect with screen coords */
2713 rectangle_t win_rect; /* window rect in screen coords */
2714 unsigned int paint_flags; /* paint flags (from SET_WINPOS_* flags) */
2715 data_size_t total_size; /* total size of the resulting region */
2716 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2717 @END
2720 /* Get the visible surface region of a window */
2721 @REQ(get_surface_region)
2722 user_handle_t window; /* handle to the window */
2723 @REPLY
2724 rectangle_t visible_rect; /* window visible rect in screen coords */
2725 data_size_t total_size; /* total size of the resulting region */
2726 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2727 @END
2730 /* Get the window region */
2731 @REQ(get_window_region)
2732 user_handle_t window; /* handle to the window */
2733 @REPLY
2734 data_size_t total_size; /* total size of the resulting region */
2735 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2736 @END
2739 /* Set the window region */
2740 @REQ(set_window_region)
2741 user_handle_t window; /* handle to the window */
2742 int redraw; /* redraw the window? */
2743 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2744 @END
2747 /* Get the window update region */
2748 @REQ(get_update_region)
2749 user_handle_t window; /* handle to the window */
2750 user_handle_t from_child; /* child to start searching from */
2751 unsigned int flags; /* update flags (see below) */
2752 @REPLY
2753 user_handle_t child; /* child to repaint (or window itself) */
2754 unsigned int flags; /* resulting update flags (see below) */
2755 data_size_t total_size; /* total size of the resulting region */
2756 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2757 @END
2758 #define UPDATE_NONCLIENT 0x001 /* get region for repainting non-client area */
2759 #define UPDATE_ERASE 0x002 /* get region for erasing client area */
2760 #define UPDATE_PAINT 0x004 /* get region for painting client area */
2761 #define UPDATE_INTERNALPAINT 0x008 /* get region if internal paint is pending */
2762 #define UPDATE_ALLCHILDREN 0x010 /* force repaint of all children */
2763 #define UPDATE_NOCHILDREN 0x020 /* don't try to repaint any children */
2764 #define UPDATE_NOREGION 0x040 /* don't return a region, only the flags */
2765 #define UPDATE_DELAYED_ERASE 0x080 /* still needs erase after BeginPaint */
2766 #define UPDATE_CLIPCHILDREN 0x100 /* remove clipped children from the update region */
2769 /* Update the z order of a window so that a given rectangle is fully visible */
2770 @REQ(update_window_zorder)
2771 user_handle_t window; /* handle to the window */
2772 rectangle_t rect; /* rectangle that must be visible (in client coords) */
2773 @END
2776 /* Mark parts of a window as needing a redraw */
2777 @REQ(redraw_window)
2778 user_handle_t window; /* handle to the window */
2779 unsigned int flags; /* RDW_* flags */
2780 VARARG(region,rectangles); /* list of rectangles for the region (in window coords) */
2781 @END
2784 /* Set a window property */
2785 @REQ(set_window_property)
2786 user_handle_t window; /* handle to the window */
2787 lparam_t data; /* data to store */
2788 atom_t atom; /* property atom (if no name specified) */
2789 VARARG(name,unicode_str); /* property name */
2790 @END
2793 /* Remove a window property */
2794 @REQ(remove_window_property)
2795 user_handle_t window; /* handle to the window */
2796 atom_t atom; /* property atom (if no name specified) */
2797 VARARG(name,unicode_str); /* property name */
2798 @REPLY
2799 lparam_t data; /* data stored in property */
2800 @END
2803 /* Get a window property */
2804 @REQ(get_window_property)
2805 user_handle_t window; /* handle to the window */
2806 atom_t atom; /* property atom (if no name specified) */
2807 VARARG(name,unicode_str); /* property name */
2808 @REPLY
2809 lparam_t data; /* data stored in property */
2810 @END
2813 /* Get the list of properties of a window */
2814 @REQ(get_window_properties)
2815 user_handle_t window; /* handle to the window */
2816 @REPLY
2817 int total; /* total number of properties */
2818 VARARG(props,properties); /* list of properties */
2819 @END
2822 /* Create a window station */
2823 @REQ(create_winstation)
2824 unsigned int flags; /* window station flags */
2825 unsigned int access; /* wanted access rights */
2826 unsigned int attributes; /* object attributes */
2827 obj_handle_t rootdir; /* root directory */
2828 VARARG(name,unicode_str); /* object name */
2829 @REPLY
2830 obj_handle_t handle; /* handle to the window station */
2831 @END
2834 /* Open a handle to a window station */
2835 @REQ(open_winstation)
2836 unsigned int access; /* wanted access rights */
2837 unsigned int attributes; /* object attributes */
2838 obj_handle_t rootdir; /* root directory */
2839 VARARG(name,unicode_str); /* object name */
2840 @REPLY
2841 obj_handle_t handle; /* handle to the window station */
2842 @END
2845 /* Close a window station */
2846 @REQ(close_winstation)
2847 obj_handle_t handle; /* handle to the window station */
2848 @END
2851 /* Get the process current window station */
2852 @REQ(get_process_winstation)
2853 @REPLY
2854 obj_handle_t handle; /* handle to the window station */
2855 @END
2858 /* Set the process current window station */
2859 @REQ(set_process_winstation)
2860 obj_handle_t handle; /* handle to the window station */
2861 @END
2864 /* Enumerate window stations */
2865 @REQ(enum_winstation)
2866 unsigned int index; /* current index */
2867 @REPLY
2868 unsigned int next; /* next index */
2869 VARARG(name,unicode_str); /* window station name */
2870 @END
2873 /* Create a desktop */
2874 @REQ(create_desktop)
2875 unsigned int flags; /* desktop flags */
2876 unsigned int access; /* wanted access rights */
2877 unsigned int attributes; /* object attributes */
2878 VARARG(name,unicode_str); /* object name */
2879 @REPLY
2880 obj_handle_t handle; /* handle to the desktop */
2881 @END
2884 /* Open a handle to a desktop */
2885 @REQ(open_desktop)
2886 obj_handle_t winsta; /* window station to open (null allowed) */
2887 unsigned int flags; /* desktop flags */
2888 unsigned int access; /* wanted access rights */
2889 unsigned int attributes; /* object attributes */
2890 VARARG(name,unicode_str); /* object name */
2891 @REPLY
2892 obj_handle_t handle; /* handle to the desktop */
2893 @END
2896 /* Open a handle to current input desktop */
2897 @REQ(open_input_desktop)
2898 unsigned int flags; /* desktop flags */
2899 unsigned int access; /* wanted access rights */
2900 unsigned int attributes; /* object attributes */
2901 @REPLY
2902 obj_handle_t handle; /* handle to the desktop */
2903 @END
2906 /* Close a desktop */
2907 @REQ(close_desktop)
2908 obj_handle_t handle; /* handle to the desktop */
2909 @END
2912 /* Get the thread current desktop */
2913 @REQ(get_thread_desktop)
2914 thread_id_t tid; /* thread id */
2915 @REPLY
2916 obj_handle_t handle; /* handle to the desktop */
2917 @END
2920 /* Set the thread current desktop */
2921 @REQ(set_thread_desktop)
2922 obj_handle_t handle; /* handle to the desktop */
2923 @END
2926 /* Enumerate desktops */
2927 @REQ(enum_desktop)
2928 obj_handle_t winstation; /* handle to the window station */
2929 unsigned int index; /* current index */
2930 @REPLY
2931 unsigned int next; /* next index */
2932 VARARG(name,unicode_str); /* window station name */
2933 @END
2936 /* Get/set information about a user object (window station or desktop) */
2937 @REQ(set_user_object_info)
2938 obj_handle_t handle; /* handle to the object */
2939 unsigned int flags; /* information to set/get */
2940 unsigned int obj_flags; /* new object flags */
2941 @REPLY
2942 int is_desktop; /* is object a desktop? */
2943 unsigned int old_obj_flags; /* old object flags */
2944 VARARG(name,unicode_str); /* object name */
2945 @END
2946 #define SET_USER_OBJECT_SET_FLAGS 1
2947 #define SET_USER_OBJECT_GET_FULL_NAME 2
2950 /* Register a hotkey */
2951 @REQ(register_hotkey)
2952 user_handle_t window; /* handle to the window */
2953 int id; /* hotkey identifier */
2954 unsigned int flags; /* modifier keys */
2955 unsigned int vkey; /* virtual key code */
2956 @REPLY
2957 int replaced; /* did we replace an existing hotkey? */
2958 unsigned int flags; /* flags of replaced hotkey */
2959 unsigned int vkey; /* virtual key code of replaced hotkey */
2960 @END
2963 /* Unregister a hotkey */
2964 @REQ(unregister_hotkey)
2965 user_handle_t window; /* handle to the window */
2966 int id; /* hotkey identifier */
2967 @REPLY
2968 unsigned int flags; /* flags of removed hotkey */
2969 unsigned int vkey; /* virtual key code of removed hotkey */
2970 @END
2973 /* Attach (or detach) thread inputs */
2974 @REQ(attach_thread_input)
2975 thread_id_t tid_from; /* thread to be attached */
2976 thread_id_t tid_to; /* thread to which tid_from should be attached */
2977 int attach; /* is it an attach? */
2978 @END
2981 /* Get input data for a given thread */
2982 @REQ(get_thread_input)
2983 thread_id_t tid; /* id of thread */
2984 @REPLY
2985 user_handle_t focus; /* handle to the focus window */
2986 user_handle_t capture; /* handle to the capture window */
2987 user_handle_t active; /* handle to the active window */
2988 user_handle_t foreground; /* handle to the global foreground window */
2989 user_handle_t menu_owner; /* handle to the menu owner */
2990 user_handle_t move_size; /* handle to the moving/resizing window */
2991 user_handle_t caret; /* handle to the caret window */
2992 user_handle_t cursor; /* handle to the cursor */
2993 int show_count; /* cursor show count */
2994 rectangle_t rect; /* caret rectangle */
2995 @END
2998 /* Get the time of the last input event */
2999 @REQ(get_last_input_time)
3000 @REPLY
3001 unsigned int time;
3002 @END
3005 /* Retrieve queue keyboard state for a given thread */
3006 @REQ(get_key_state)
3007 thread_id_t tid; /* id of thread */
3008 int key; /* optional key code or -1 */
3009 @REPLY
3010 unsigned char state; /* state of specified key */
3011 VARARG(keystate,bytes); /* state array for all the keys */
3012 @END
3014 /* Set queue keyboard state for a given thread */
3015 @REQ(set_key_state)
3016 thread_id_t tid; /* id of thread */
3017 int async; /* whether to change the async state too */
3018 VARARG(keystate,bytes); /* state array for all the keys */
3019 @END
3021 /* Set the system foreground window */
3022 @REQ(set_foreground_window)
3023 user_handle_t handle; /* handle to the foreground window */
3024 @REPLY
3025 user_handle_t previous; /* handle to the previous foreground window */
3026 int send_msg_old; /* whether we have to send a msg to the old window */
3027 int send_msg_new; /* whether we have to send a msg to the new window */
3028 @END
3030 /* Set the current thread focus window */
3031 @REQ(set_focus_window)
3032 user_handle_t handle; /* handle to the focus window */
3033 @REPLY
3034 user_handle_t previous; /* handle to the previous focus window */
3035 @END
3037 /* Set the current thread active window */
3038 @REQ(set_active_window)
3039 user_handle_t handle; /* handle to the active window */
3040 @REPLY
3041 user_handle_t previous; /* handle to the previous active window */
3042 @END
3044 /* Set the current thread capture window */
3045 @REQ(set_capture_window)
3046 user_handle_t handle; /* handle to the capture window */
3047 unsigned int flags; /* capture flags (see below) */
3048 @REPLY
3049 user_handle_t previous; /* handle to the previous capture window */
3050 user_handle_t full_handle; /* full 32-bit handle of new capture window */
3051 @END
3052 #define CAPTURE_MENU 0x01 /* capture is for a menu */
3053 #define CAPTURE_MOVESIZE 0x02 /* capture is for moving/resizing */
3056 /* Set the current thread caret window */
3057 @REQ(set_caret_window)
3058 user_handle_t handle; /* handle to the caret window */
3059 int width; /* caret width */
3060 int height; /* caret height */
3061 @REPLY
3062 user_handle_t previous; /* handle to the previous caret window */
3063 rectangle_t old_rect; /* previous caret rectangle */
3064 int old_hide; /* previous hide count */
3065 int old_state; /* previous caret state (1=on, 0=off) */
3066 @END
3069 /* Set the current thread caret information */
3070 @REQ(set_caret_info)
3071 unsigned int flags; /* caret flags (see below) */
3072 user_handle_t handle; /* handle to the caret window */
3073 int x; /* caret x position */
3074 int y; /* caret y position */
3075 int hide; /* increment for hide count (can be negative to show it) */
3076 int state; /* caret state (see below) */
3077 @REPLY
3078 user_handle_t full_handle; /* handle to the current caret window */
3079 rectangle_t old_rect; /* previous caret rectangle */
3080 int old_hide; /* previous hide count */
3081 int old_state; /* previous caret state (1=on, 0=off) */
3082 @END
3083 #define SET_CARET_POS 0x01 /* set the caret position from x,y */
3084 #define SET_CARET_HIDE 0x02 /* increment the caret hide count */
3085 #define SET_CARET_STATE 0x04 /* set the caret on/off state */
3086 enum caret_state
3088 CARET_STATE_OFF, /* off */
3089 CARET_STATE_ON, /* on */
3090 CARET_STATE_TOGGLE, /* toggle current state */
3091 CARET_STATE_ON_IF_MOVED /* on if the position differs, unchanged otherwise */
3095 /* Set a window hook */
3096 @REQ(set_hook)
3097 int id; /* id of the hook */
3098 process_id_t pid; /* id of process to set the hook into */
3099 thread_id_t tid; /* id of thread to set the hook into */
3100 int event_min;
3101 int event_max;
3102 client_ptr_t proc; /* hook procedure */
3103 int flags;
3104 int unicode; /* is it a unicode hook? */
3105 VARARG(module,unicode_str); /* module name */
3106 @REPLY
3107 user_handle_t handle; /* handle to the hook */
3108 unsigned int active_hooks; /* active hooks bitmap */
3109 @END
3112 /* Remove a window hook */
3113 @REQ(remove_hook)
3114 user_handle_t handle; /* handle to the hook */
3115 client_ptr_t proc; /* hook procedure if handle is 0 */
3116 int id; /* id of the hook if handle is 0 */
3117 @REPLY
3118 unsigned int active_hooks; /* active hooks bitmap */
3119 @END
3122 /* Start calling a hook chain */
3123 @REQ(start_hook_chain)
3124 int id; /* id of the hook */
3125 int event; /* signalled event */
3126 user_handle_t window; /* handle to the event window */
3127 int object_id; /* object id for out of context winevent */
3128 int child_id; /* child id for out of context winevent */
3129 @REPLY
3130 user_handle_t handle; /* handle to the next hook */
3131 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
3132 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
3133 int unicode; /* is it a unicode hook? */
3134 client_ptr_t proc; /* hook procedure */
3135 unsigned int active_hooks; /* active hooks bitmap */
3136 VARARG(module,unicode_str); /* module name */
3137 @END
3140 /* Finished calling a hook chain */
3141 @REQ(finish_hook_chain)
3142 int id; /* id of the hook */
3143 @END
3146 /* Get the hook information */
3147 @REQ(get_hook_info)
3148 user_handle_t handle; /* handle to the current hook */
3149 int get_next; /* do we want info about current or next hook? */
3150 int event; /* signalled event */
3151 user_handle_t window; /* handle to the event window */
3152 int object_id; /* object id for out of context winevent */
3153 int child_id; /* child id for out of context winevent */
3154 @REPLY
3155 user_handle_t handle; /* handle to the hook */
3156 int id; /* id of the hook */
3157 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
3158 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
3159 client_ptr_t proc; /* hook procedure */
3160 int unicode; /* is it a unicode hook? */
3161 VARARG(module,unicode_str); /* module name */
3162 @END
3165 /* Create a window class */
3166 @REQ(create_class)
3167 int local; /* is it a local class? */
3168 atom_t atom; /* class atom */
3169 unsigned int style; /* class style */
3170 mod_handle_t instance; /* module instance */
3171 int extra; /* number of extra class bytes */
3172 int win_extra; /* number of window extra bytes */
3173 client_ptr_t client_ptr; /* pointer to class in client address space */
3174 data_size_t name_offset; /* base class name offset for specified atom */
3175 VARARG(name,unicode_str); /* class name */
3176 @REPLY
3177 atom_t atom; /* resulting class atom */
3178 @END
3181 /* Destroy a window class */
3182 @REQ(destroy_class)
3183 atom_t atom; /* class atom */
3184 mod_handle_t instance; /* module instance */
3185 VARARG(name,unicode_str); /* class name */
3186 @REPLY
3187 client_ptr_t client_ptr; /* pointer to class in client address space */
3188 @END
3191 /* Set some information in a class */
3192 @REQ(set_class_info)
3193 user_handle_t window; /* handle to the window */
3194 unsigned int flags; /* flags for info to set (see below) */
3195 atom_t atom; /* class atom */
3196 unsigned int style; /* class style */
3197 int win_extra; /* number of window extra bytes */
3198 mod_handle_t instance; /* module instance */
3199 int extra_offset; /* offset to set in extra bytes */
3200 data_size_t extra_size; /* size to set in extra bytes */
3201 lparam_t extra_value; /* value to set in extra bytes */
3202 @REPLY
3203 atom_t old_atom; /* previous class atom */
3204 atom_t base_atom; /* base class atom */
3205 mod_handle_t old_instance; /* previous module instance */
3206 lparam_t old_extra_value; /* old value in extra bytes */
3207 unsigned int old_style; /* previous class style */
3208 int old_extra; /* previous number of class extra bytes */
3209 int old_win_extra; /* previous number of window extra bytes */
3210 @END
3211 #define SET_CLASS_ATOM 0x0001
3212 #define SET_CLASS_STYLE 0x0002
3213 #define SET_CLASS_WINEXTRA 0x0004
3214 #define SET_CLASS_INSTANCE 0x0008
3215 #define SET_CLASS_EXTRA 0x0010
3218 /* Open the clipboard */
3219 @REQ(open_clipboard)
3220 user_handle_t window; /* clipboard window */
3221 @REPLY
3222 user_handle_t owner; /* current clipboard owner */
3223 @END
3226 /* Close the clipboard */
3227 @REQ(close_clipboard)
3228 @REPLY
3229 user_handle_t viewer; /* first clipboard viewer */
3230 user_handle_t owner; /* current clipboard owner */
3231 @END
3234 /* Empty the clipboard and grab ownership */
3235 @REQ(empty_clipboard)
3236 @END
3239 /* Add a data format to the clipboard */
3240 @REQ(set_clipboard_data)
3241 unsigned int format; /* clipboard format of the data */
3242 unsigned int lcid; /* locale id to use for synthesizing text formats */
3243 VARARG(data,bytes); /* data contents */
3244 @REPLY
3245 unsigned int seqno; /* sequence number for the set data */
3246 @END
3249 /* Fetch a data format from the clipboard */
3250 @REQ(get_clipboard_data)
3251 unsigned int format; /* clipboard format of the data */
3252 int render; /* will we try to render it if missing? */
3253 int cached; /* do we already have it in the client-side cache? */
3254 unsigned int seqno; /* sequence number for the data in the cache */
3255 @REPLY
3256 unsigned int from; /* for synthesized data, format to generate it from */
3257 user_handle_t owner; /* clipboard owner for delayed-rendered formats */
3258 unsigned int seqno; /* sequence number for the originally set data */
3259 data_size_t total; /* total data size */
3260 VARARG(data,bytes); /* data contents */
3261 @END
3264 /* Retrieve a list of available formats */
3265 @REQ(get_clipboard_formats)
3266 unsigned int format; /* specific format to query, return all if 0 */
3267 @REPLY
3268 unsigned int count; /* count of available formats */
3269 VARARG(formats,uints); /* array of available formats */
3270 @END
3273 /* Retrieve the next available format */
3274 @REQ(enum_clipboard_formats)
3275 unsigned int previous; /* previous format, or first if 0 */
3276 @REPLY
3277 unsigned int format; /* next format */
3278 @END
3281 /* Release ownership of the clipboard */
3282 @REQ(release_clipboard)
3283 user_handle_t owner; /* clipboard owner to release */
3284 @REPLY
3285 user_handle_t viewer; /* first clipboard viewer */
3286 user_handle_t owner; /* current clipboard owner */
3287 @END
3290 /* Get clipboard information */
3291 @REQ(get_clipboard_info)
3292 @REPLY
3293 user_handle_t window; /* clipboard window */
3294 user_handle_t owner; /* clipboard owner */
3295 user_handle_t viewer; /* clipboard viewer */
3296 unsigned int seqno; /* current sequence number */
3297 @END
3300 /* Set the clipboard viewer window */
3301 @REQ(set_clipboard_viewer)
3302 user_handle_t viewer; /* clipboard viewer */
3303 user_handle_t previous; /* if non-zero, check that this was the previous viewer */
3304 @REPLY
3305 user_handle_t old_viewer; /* previous clipboard viewer */
3306 user_handle_t owner; /* clipboard owner */
3307 @END
3310 /* Add a clipboard listener window */
3311 @REQ(add_clipboard_listener)
3312 user_handle_t window; /* clipboard listener window */
3313 @END
3316 /* Remove a clipboard listener window */
3317 @REQ(remove_clipboard_listener)
3318 user_handle_t window; /* clipboard listener window */
3319 @END
3322 /* Open a security token */
3323 @REQ(open_token)
3324 obj_handle_t handle; /* handle to the thread or process */
3325 unsigned int access; /* access rights to the new token */
3326 unsigned int attributes;/* object attributes */
3327 unsigned int flags; /* flags (see below) */
3328 @REPLY
3329 obj_handle_t token; /* handle to the token */
3330 @END
3331 #define OPEN_TOKEN_THREAD 1
3332 #define OPEN_TOKEN_AS_SELF 2
3335 /* Set/get the global windows */
3336 @REQ(set_global_windows)
3337 unsigned int flags; /* flags for fields to set (see below) */
3338 user_handle_t shell_window; /* handle to the new shell window */
3339 user_handle_t shell_listview; /* handle to the new shell listview window */
3340 user_handle_t progman_window; /* handle to the new program manager window */
3341 user_handle_t taskman_window; /* handle to the new task manager window */
3342 @REPLY
3343 user_handle_t old_shell_window; /* handle to the shell window */
3344 user_handle_t old_shell_listview; /* handle to the shell listview window */
3345 user_handle_t old_progman_window; /* handle to the new program manager window */
3346 user_handle_t old_taskman_window; /* handle to the new task manager window */
3347 @END
3348 #define SET_GLOBAL_SHELL_WINDOWS 0x01 /* set both main shell and listview windows */
3349 #define SET_GLOBAL_PROGMAN_WINDOW 0x02
3350 #define SET_GLOBAL_TASKMAN_WINDOW 0x04
3352 /* Adjust the privileges held by a token */
3353 @REQ(adjust_token_privileges)
3354 obj_handle_t handle; /* handle to the token */
3355 int disable_all; /* disable all privileges? */
3356 int get_modified_state; /* get modified privileges? */
3357 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to enable/disable/remove */
3358 @REPLY
3359 unsigned int len; /* total length in bytes required to store token privileges */
3360 VARARG(privileges,LUID_AND_ATTRIBUTES); /* modified privileges */
3361 @END
3363 /* Retrieves the set of privileges held by or available to a token */
3364 @REQ(get_token_privileges)
3365 obj_handle_t handle; /* handle to the token */
3366 @REPLY
3367 unsigned int len; /* total length in bytes required to store token privileges */
3368 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
3369 @END
3371 /* Check the token has the required privileges */
3372 @REQ(check_token_privileges)
3373 obj_handle_t handle; /* handle to the token */
3374 int all_required; /* are all the privileges required for the check to succeed? */
3375 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to check */
3376 @REPLY
3377 int has_privileges; /* does the token have the required privileges? */
3378 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
3379 @END
3381 @REQ(duplicate_token)
3382 obj_handle_t handle; /* handle to the token to duplicate */
3383 unsigned int access; /* access rights to the new token */
3384 int primary; /* is the new token to be a primary one? */
3385 int impersonation_level; /* impersonation level of the new token */
3386 VARARG(objattr,object_attributes); /* object attributes */
3387 @REPLY
3388 obj_handle_t new_handle; /* duplicated handle */
3389 @END
3391 @REQ(access_check)
3392 obj_handle_t handle; /* handle to the token */
3393 unsigned int desired_access; /* desired access to the object */
3394 unsigned int mapping_read; /* mapping from generic read to specific rights */
3395 unsigned int mapping_write; /* mapping from generic write to specific rights */
3396 unsigned int mapping_execute; /* mapping from generic execute to specific rights */
3397 unsigned int mapping_all; /* mapping from generic all to specific rights */
3398 VARARG(sd,security_descriptor); /* security descriptor to check */
3399 @REPLY
3400 unsigned int access_granted; /* access rights actually granted */
3401 unsigned int access_status; /* was access granted? */
3402 unsigned int privileges_len; /* length needed to store privileges */
3403 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges used during access check */
3404 @END
3406 @REQ(get_token_sid)
3407 obj_handle_t handle; /* handle to the token */
3408 unsigned int which_sid; /* which SID to retrieve from the token */
3409 @REPLY
3410 data_size_t sid_len; /* length needed to store sid */
3411 VARARG(sid,SID); /* the sid specified by which_sid from the token */
3412 @END
3414 @REQ(get_token_groups)
3415 obj_handle_t handle; /* handle to the token */
3416 @REPLY
3417 data_size_t user_len; /* length needed to store user */
3418 VARARG(user,token_groups); /* groups the token's user belongs to */
3419 @END
3421 @REQ(get_token_default_dacl)
3422 obj_handle_t handle; /* handle to the token */
3423 @REPLY
3424 data_size_t acl_len; /* length needed to store access control list */
3425 VARARG(acl,ACL); /* access control list */
3426 @END
3428 @REQ(set_token_default_dacl)
3429 obj_handle_t handle; /* handle to the token */
3430 VARARG(acl,ACL); /* default dacl to set */
3431 @END
3433 @REQ(set_security_object)
3434 obj_handle_t handle; /* handle to the object */
3435 unsigned int security_info; /* which parts of security descriptor to set */
3436 VARARG(sd,security_descriptor); /* security descriptor to set */
3437 @END
3439 @REQ(get_security_object)
3440 obj_handle_t handle; /* handle to the object */
3441 unsigned int security_info; /* which parts of security descriptor to get */
3442 @REPLY
3443 unsigned int sd_len; /* buffer size needed for sd */
3444 VARARG(sd,security_descriptor); /* retrieved security descriptor */
3445 @END
3448 struct handle_info
3450 process_id_t owner;
3451 obj_handle_t handle;
3452 unsigned int access;
3455 /* Return a list of all opened handles */
3456 @REQ(get_system_handles)
3457 @REPLY
3458 unsigned int count; /* number of handles */
3459 VARARG(data,handle_infos); /* array of handle_infos */
3460 @END
3463 /* Create a mailslot */
3464 @REQ(create_mailslot)
3465 unsigned int access; /* wanted access rights */
3466 timeout_t read_timeout;
3467 unsigned int max_msgsize;
3468 VARARG(objattr,object_attributes); /* object attributes */
3469 @REPLY
3470 obj_handle_t handle; /* handle to the mailslot */
3471 @END
3474 /* Set mailslot information */
3475 @REQ(set_mailslot_info)
3476 obj_handle_t handle; /* handle to the mailslot */
3477 timeout_t read_timeout;
3478 unsigned int flags;
3479 @REPLY
3480 timeout_t read_timeout;
3481 unsigned int max_msgsize;
3482 @END
3483 #define MAILSLOT_SET_READ_TIMEOUT 1
3486 /* Create a directory object */
3487 @REQ(create_directory)
3488 unsigned int access; /* access flags */
3489 VARARG(objattr,object_attributes); /* object attributes */
3490 @REPLY
3491 obj_handle_t handle; /* handle to the directory */
3492 @END
3495 /* Open a directory object */
3496 @REQ(open_directory)
3497 unsigned int access; /* access flags */
3498 unsigned int attributes; /* object attributes */
3499 obj_handle_t rootdir; /* root directory */
3500 VARARG(directory_name,unicode_str); /* Directory name */
3501 @REPLY
3502 obj_handle_t handle; /* handle to the directory */
3503 @END
3506 /* Get a directory entry by index */
3507 @REQ(get_directory_entry)
3508 obj_handle_t handle; /* handle to the directory */
3509 unsigned int index; /* entry index */
3510 @REPLY
3511 data_size_t name_len; /* length of the entry name in bytes */
3512 VARARG(name,unicode_str,name_len); /* entry name */
3513 VARARG(type,unicode_str); /* entry type */
3514 @END
3517 /* Create a symbolic link object */
3518 @REQ(create_symlink)
3519 unsigned int access; /* access flags */
3520 VARARG(objattr,object_attributes); /* object attributes */
3521 VARARG(target_name,unicode_str); /* target name */
3522 @REPLY
3523 obj_handle_t handle; /* handle to the symlink */
3524 @END
3527 /* Open a symbolic link object */
3528 @REQ(open_symlink)
3529 unsigned int access; /* access flags */
3530 unsigned int attributes; /* object attributes */
3531 obj_handle_t rootdir; /* root directory */
3532 VARARG(name,unicode_str); /* symlink name */
3533 @REPLY
3534 obj_handle_t handle; /* handle to the symlink */
3535 @END
3538 /* Query a symbolic link object */
3539 @REQ(query_symlink)
3540 obj_handle_t handle; /* handle to the symlink */
3541 @REPLY
3542 data_size_t total; /* total needed size for name */
3543 VARARG(target_name,unicode_str); /* target name */
3544 @END
3547 /* Query basic object information */
3548 @REQ(get_object_info)
3549 obj_handle_t handle; /* handle to the object */
3550 @REPLY
3551 unsigned int access; /* granted access mask */
3552 unsigned int ref_count; /* object ref count */
3553 unsigned int handle_count; /* object handle count */
3554 data_size_t total; /* total needed size for name */
3555 VARARG(name,unicode_str); /* object name */
3556 @END
3559 /* Query object type name information */
3560 @REQ(get_object_type)
3561 obj_handle_t handle; /* handle to the object */
3562 @REPLY
3563 data_size_t total; /* needed size for type name */
3564 VARARG(type,unicode_str); /* type name */
3565 @END
3568 /* Unlink a named object */
3569 @REQ(unlink_object)
3570 obj_handle_t handle; /* handle to the object */
3571 @END
3574 /* Query the impersonation level of an impersonation token */
3575 @REQ(get_token_impersonation_level)
3576 obj_handle_t handle; /* handle to the object */
3577 @REPLY
3578 int impersonation_level; /* impersonation level of the impersonation token */
3579 @END
3581 /* Allocate a locally-unique identifier */
3582 @REQ(allocate_locally_unique_id)
3583 @REPLY
3584 luid_t luid;
3585 @END
3588 /* Create a device manager */
3589 @REQ(create_device_manager)
3590 unsigned int access; /* wanted access rights */
3591 unsigned int attributes; /* object attributes */
3592 @REPLY
3593 obj_handle_t handle; /* handle to the device */
3594 @END
3597 /* Create a device */
3598 @REQ(create_device)
3599 unsigned int access; /* wanted access rights */
3600 unsigned int attributes; /* object attributes */
3601 obj_handle_t rootdir; /* root directory */
3602 client_ptr_t user_ptr; /* opaque ptr for use by client */
3603 obj_handle_t manager; /* device manager */
3604 VARARG(name,unicode_str); /* object name */
3605 @REPLY
3606 obj_handle_t handle; /* handle to the device */
3607 @END
3610 /* Delete a device */
3611 @REQ(delete_device)
3612 obj_handle_t handle; /* handle to the device */
3613 @END
3616 /* Retrieve the next pending device irp request */
3617 @REQ(get_next_device_request)
3618 obj_handle_t manager; /* handle to the device manager */
3619 obj_handle_t prev; /* handle to the previous irp */
3620 unsigned int status; /* status of the previous irp */
3621 @REPLY
3622 irp_params_t params; /* irp parameters */
3623 obj_handle_t next; /* handle to the next irp */
3624 process_id_t client_pid; /* pid of process calling irp */
3625 thread_id_t client_tid; /* tid of thread calling irp */
3626 data_size_t in_size; /* total needed input size */
3627 data_size_t out_size; /* needed output size */
3628 VARARG(next_data,bytes); /* input data of the next irp */
3629 @END
3632 /* Get kernel pointer from server object */
3633 @REQ(get_kernel_object_ptr)
3634 obj_handle_t manager; /* handle to the device manager */
3635 obj_handle_t handle; /* object handle */
3636 @REPLY
3637 client_ptr_t user_ptr; /* kernel object pointer */
3638 @END
3641 /* Associate kernel pointer with server object */
3642 @REQ(set_kernel_object_ptr)
3643 obj_handle_t manager; /* handle to the device manager */
3644 obj_handle_t handle; /* object handle */
3645 client_ptr_t user_ptr; /* kernel object pointer */
3646 @END
3649 /* Grab server object reference from kernel object pointer */
3650 @REQ(grab_kernel_object)
3651 obj_handle_t manager; /* handle to the device manager */
3652 client_ptr_t user_ptr; /* kernel object pointer */
3653 @END
3656 /* Release server object reference from kernel object pointer */
3657 @REQ(release_kernel_object)
3658 obj_handle_t manager; /* handle to the device manager */
3659 client_ptr_t user_ptr; /* kernel object pointer */
3660 @END
3663 /* Get handle from kernel object pointer */
3664 @REQ(get_kernel_object_handle)
3665 obj_handle_t manager; /* handle to the device manager */
3666 client_ptr_t user_ptr; /* kernel object pointer */
3667 unsigned int access; /* wanted access rights */
3668 @REPLY
3669 obj_handle_t handle; /* kernel object handle */
3670 @END
3673 /* Make the current process a system process */
3674 @REQ(make_process_system)
3675 @REPLY
3676 obj_handle_t event; /* event signaled when all user processes have exited */
3677 @END
3680 /* Get detailed fixed-size information about a token */
3681 @REQ(get_token_statistics)
3682 obj_handle_t handle; /* handle to the object */
3683 @REPLY
3684 luid_t token_id; /* locally-unique identifier of the token */
3685 luid_t modified_id; /* locally-unique identifier of the modified version of the token */
3686 int primary; /* is the token primary or impersonation? */
3687 int impersonation_level; /* level of impersonation */
3688 int group_count; /* the number of groups the token is a member of */
3689 int privilege_count; /* the number of privileges the token has */
3690 @END
3693 /* Create I/O completion port */
3694 @REQ(create_completion)
3695 unsigned int access; /* desired access to a port */
3696 unsigned int concurrent; /* max number of concurrent active threads */
3697 VARARG(objattr,object_attributes); /* object attributes */
3698 @REPLY
3699 obj_handle_t handle; /* port handle */
3700 @END
3703 /* Open I/O completion port */
3704 @REQ(open_completion)
3705 unsigned int access; /* desired access to a port */
3706 unsigned int attributes; /* object attributes */
3707 obj_handle_t rootdir; /* root directory */
3708 VARARG(filename,unicode_str); /* port name */
3709 @REPLY
3710 obj_handle_t handle; /* port handle */
3711 @END
3714 /* add completion to completion port */
3715 @REQ(add_completion)
3716 obj_handle_t handle; /* port handle */
3717 apc_param_t ckey; /* completion key */
3718 apc_param_t cvalue; /* completion value */
3719 apc_param_t information; /* IO_STATUS_BLOCK Information */
3720 unsigned int status; /* completion result */
3721 @END
3724 /* get completion from completion port queue */
3725 @REQ(remove_completion)
3726 obj_handle_t handle; /* port handle */
3727 @REPLY
3728 apc_param_t ckey; /* completion key */
3729 apc_param_t cvalue; /* completion value */
3730 apc_param_t information; /* IO_STATUS_BLOCK Information */
3731 unsigned int status; /* completion result */
3732 @END
3735 /* get completion queue depth */
3736 @REQ(query_completion)
3737 obj_handle_t handle; /* port handle */
3738 @REPLY
3739 unsigned int depth; /* completion queue depth */
3740 @END
3743 /* associate object with completion port */
3744 @REQ(set_completion_info)
3745 obj_handle_t handle; /* object handle */
3746 apc_param_t ckey; /* completion key */
3747 obj_handle_t chandle; /* port handle */
3748 @END
3751 /* check for associated completion and push msg */
3752 @REQ(add_fd_completion)
3753 obj_handle_t handle; /* async' object */
3754 apc_param_t cvalue; /* completion value */
3755 apc_param_t information; /* IO_STATUS_BLOCK Information */
3756 unsigned int status; /* completion status */
3757 int async; /* completion is an async result */
3758 @END
3761 /* set fd completion information */
3762 @REQ(set_fd_completion_mode)
3763 obj_handle_t handle; /* handle to a file or directory */
3764 unsigned int flags; /* completion notification flags */
3765 @END
3768 /* set fd disposition information */
3769 @REQ(set_fd_disp_info)
3770 obj_handle_t handle; /* handle to a file or directory */
3771 int unlink; /* whether to unlink file on close */
3772 @END
3775 /* set fd name information */
3776 @REQ(set_fd_name_info)
3777 obj_handle_t handle; /* handle to a file or directory */
3778 obj_handle_t rootdir; /* root directory */
3779 int link; /* link instead of renaming */
3780 VARARG(filename,string); /* new file name */
3781 @END
3784 /* Retrieve layered info for a window */
3785 @REQ(get_window_layered_info)
3786 user_handle_t handle; /* handle to the window */
3787 @REPLY
3788 unsigned int color_key; /* color key */
3789 unsigned int alpha; /* alpha (0..255) */
3790 unsigned int flags; /* LWA_* flags */
3791 @END
3794 /* Set layered info for a window */
3795 @REQ(set_window_layered_info)
3796 user_handle_t handle; /* handle to the window */
3797 unsigned int color_key; /* color key */
3798 unsigned int alpha; /* alpha (0..255) */
3799 unsigned int flags; /* LWA_* flags */
3800 @END
3803 /* Allocate an arbitrary user handle */
3804 @REQ(alloc_user_handle)
3805 @REPLY
3806 user_handle_t handle; /* allocated handle */
3807 @END
3810 /* Free an arbitrary user handle */
3811 @REQ(free_user_handle)
3812 user_handle_t handle; /* handle to free*/
3813 @END
3816 /* Set/get the current cursor */
3817 @REQ(set_cursor)
3818 unsigned int flags; /* flags for fields to set (see below) */
3819 user_handle_t handle; /* handle to the cursor */
3820 int show_count; /* show count increment/decrement */
3821 int x; /* cursor position */
3822 int y;
3823 rectangle_t clip; /* cursor clip rectangle */
3824 unsigned int clip_msg; /* message to post on cursor clip changes */
3825 @REPLY
3826 user_handle_t prev_handle; /* previous handle */
3827 int prev_count; /* previous show count */
3828 int prev_x; /* previous position */
3829 int prev_y;
3830 int new_x; /* new position */
3831 int new_y;
3832 rectangle_t new_clip; /* new clip rectangle */
3833 unsigned int last_change; /* time of last position change */
3834 @END
3835 #define SET_CURSOR_HANDLE 0x01
3836 #define SET_CURSOR_COUNT 0x02
3837 #define SET_CURSOR_POS 0x04
3838 #define SET_CURSOR_CLIP 0x08
3839 #define SET_CURSOR_NOCLIP 0x10
3842 /* Modify the list of registered rawinput devices */
3843 @REQ(update_rawinput_devices)
3844 VARARG(devices,rawinput_devices);
3845 @END
3848 /* Retrieve the suspended context of a thread */
3849 @REQ(get_suspend_context)
3850 @REPLY
3851 VARARG(context,context); /* thread context */
3852 @END
3855 /* Store the suspend context of a thread */
3856 @REQ(set_suspend_context)
3857 VARARG(context,context); /* thread context */
3858 @END
3861 /* Create a new job object */
3862 @REQ(create_job)
3863 unsigned int access; /* wanted access rights */
3864 VARARG(objattr,object_attributes); /* object attributes */
3865 @REPLY
3866 obj_handle_t handle; /* handle to the job */
3867 @END
3870 /* Open a job object */
3871 @REQ(open_job)
3872 unsigned int access; /* wanted access rights */
3873 unsigned int attributes; /* object attributes */
3874 obj_handle_t rootdir; /* root directory */
3875 VARARG(name,unicode_str); /* object name */
3876 @REPLY
3877 obj_handle_t handle; /* handle to the job */
3878 @END
3881 /* Assign a job object to a process */
3882 @REQ(assign_job)
3883 obj_handle_t job; /* handle to the job */
3884 obj_handle_t process; /* handle to the process */
3885 @END
3888 /* Check if a process is associated with a job */
3889 @REQ(process_in_job)
3890 obj_handle_t job; /* handle to the job */
3891 obj_handle_t process; /* handle to the process */
3892 @END
3895 /* Set limit flags on a job */
3896 @REQ(set_job_limits)
3897 obj_handle_t handle; /* handle to the job */
3898 unsigned int limit_flags; /* new limit flags */
3899 @END
3902 /* Set new completion port for a job */
3903 @REQ(set_job_completion_port)
3904 obj_handle_t job; /* handle to the job */
3905 obj_handle_t port; /* handle to the completion port */
3906 client_ptr_t key; /* key to send with completion messages */
3907 @END
3910 /* Terminate all processes associated with the job */
3911 @REQ(terminate_job)
3912 obj_handle_t handle; /* handle to the job */
3913 int status; /* process exit code */
3914 @END