ddrawex: Add a test for the permanent DC function.
[wine/multimedia.git] / server / protocol.def
blob6d6be5bdc5c5ebcc3a77c42106bcbf6425ed0c72
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 client_ptr_t mod_handle_t;
48 struct request_header
50 int req; /* request code */
51 data_size_t request_size; /* request variable part size */
52 data_size_t reply_size; /* reply variable part maximum size */
55 struct reply_header
57 unsigned int error; /* error result */
58 data_size_t reply_size; /* reply variable part size */
61 /* placeholder structure for the maximum allowed request size */
62 /* this is used to construct the generic_request union */
63 struct request_max_size
65 int pad[16]; /* the max request size is 16 ints */
68 #define FIRST_USER_HANDLE 0x0020 /* first possible value for low word of user handle */
69 #define LAST_USER_HANDLE 0xffef /* last possible value for low word of user handle */
72 /* debug event data */
73 typedef union
75 int code; /* event code */
76 struct
78 int code; /* EXCEPTION_DEBUG_EVENT */
79 int first; /* first chance exception? */
80 unsigned int exc_code; /* exception code */
81 unsigned int flags; /* exception flags */
82 client_ptr_t record; /* exception record */
83 client_ptr_t address; /* exception address */
84 int nb_params; /* number of parameters */
85 int __pad;
86 client_ptr_t params[15]; /* parameters */
87 } exception;
88 struct
90 int code; /* CREATE_THREAD_DEBUG_EVENT */
91 obj_handle_t handle; /* handle to the new thread */
92 client_ptr_t teb; /* thread teb (in debugged process address space) */
93 client_ptr_t start; /* thread startup routine */
94 } create_thread;
95 struct
97 int code; /* CREATE_PROCESS_DEBUG_EVENT */
98 obj_handle_t file; /* handle to the process exe file */
99 obj_handle_t process; /* handle to the new process */
100 obj_handle_t thread; /* handle to the new thread */
101 mod_handle_t base; /* base of executable image */
102 int dbg_offset; /* offset of debug info in file */
103 int dbg_size; /* size of debug info */
104 client_ptr_t teb; /* thread teb (in debugged process address space) */
105 client_ptr_t start; /* thread startup routine */
106 client_ptr_t name; /* image name (optional) */
107 int unicode; /* is it Unicode? */
108 } create_process;
109 struct
111 int code; /* EXIT_THREAD_DEBUG_EVENT/EXIT_PROCESS_DEBUG_EVENT */
112 int exit_code; /* thread or process exit code */
113 } exit;
114 struct
116 int code; /* LOAD_DLL_DEBUG_EVENT */
117 obj_handle_t handle; /* file handle for the dll */
118 mod_handle_t base; /* base address of the dll */
119 int dbg_offset; /* offset of debug info in file */
120 int dbg_size; /* size of debug info */
121 client_ptr_t name; /* image name (optional) */
122 int unicode; /* is it Unicode? */
123 } load_dll;
124 struct
126 int code; /* UNLOAD_DLL_DEBUG_EVENT */
127 int __pad;
128 mod_handle_t base; /* base address of the dll */
129 } unload_dll;
130 struct
132 int code; /* OUTPUT_DEBUG_STRING_EVENT */
133 int unicode; /* is it Unicode? */
134 client_ptr_t string; /* string to display (in debugged process address space) */
135 data_size_t length; /* string length */
136 } output_string;
137 struct
139 int code; /* RIP_EVENT */
140 int error; /* ??? */
141 int type; /* ??? */
142 } rip_info;
143 } debug_event_t;
145 /* structure used in sending an fd from client to server */
146 struct send_fd
148 thread_id_t tid; /* thread id */
149 int fd; /* file descriptor on client-side */
152 /* structure sent by the server on the wait fifo */
153 struct wake_up_reply
155 client_ptr_t cookie; /* magic cookie that was passed in select_request */
156 int signaled; /* wait result */
157 int __pad;
160 /* NT-style timeout, in 100ns units, negative means relative timeout */
161 typedef __int64 timeout_t;
162 #define TIMEOUT_INFINITE (((timeout_t)0x7fffffff) << 32 | 0xffffffff)
164 /* structure returned in the list of window properties */
165 typedef struct
167 atom_t atom; /* property atom */
168 int string; /* was atom a string originally? */
169 lparam_t data; /* data stored in property */
170 } property_data_t;
172 /* structure to specify window rectangles */
173 typedef struct
175 int left;
176 int top;
177 int right;
178 int bottom;
179 } rectangle_t;
181 /* structure for parameters of async I/O calls */
182 typedef struct
184 obj_handle_t handle; /* object to perform I/O on */
185 obj_handle_t event; /* event to signal when done */
186 client_ptr_t callback; /* client-side callback to call upon end of async */
187 client_ptr_t iosb; /* I/O status block in client addr space */
188 client_ptr_t arg; /* opaque user data to pass to callback */
189 apc_param_t cvalue; /* completion value to use for completion events */
190 } async_data_t;
192 /* structures for extra message data */
194 struct hardware_msg_data
196 lparam_t info; /* extra info */
197 int x; /* x position */
198 int y; /* y position */
199 unsigned int hw_id; /* unique id */
200 int __pad;
203 struct callback_msg_data
205 client_ptr_t callback; /* callback function */
206 lparam_t data; /* user data for callback */
207 lparam_t result; /* message result */
210 struct winevent_msg_data
212 user_handle_t hook; /* hook handle */
213 thread_id_t tid; /* thread id */
214 client_ptr_t hook_proc; /* hook proc address */
215 /* followed by module name if any */
218 typedef union
220 unsigned char bytes[1]; /* raw data for sent messages */
221 struct callback_msg_data callback;
222 struct winevent_msg_data winevent;
223 } message_data_t;
225 /* structure for console char/attribute info */
226 typedef struct
228 WCHAR ch;
229 unsigned short attr;
230 } char_info_t;
232 typedef struct
234 unsigned int low_part;
235 int high_part;
236 } luid_t;
238 #define MAX_ACL_LEN 65535
240 struct security_descriptor
242 unsigned int control; /* SE_ flags */
243 data_size_t owner_len;
244 data_size_t group_len;
245 data_size_t sacl_len;
246 data_size_t dacl_len;
247 /* VARARG(owner,SID); */
248 /* VARARG(group,SID); */
249 /* VARARG(sacl,ACL); */
250 /* VARARG(dacl,ACL); */
253 struct object_attributes
255 obj_handle_t rootdir; /* root directory */
256 data_size_t sd_len; /* length of security_descriptor data. may be 0 */
257 data_size_t name_len; /* length of the name string. may be 0 */
258 /* VARARG(sd,security_descriptor); */
259 /* VARARG(name,unicode_str); */
262 struct token_groups
264 unsigned int count;
265 /* unsigned int attributes[count]; */
266 /* VARARG(sids,SID); */
269 enum apc_type
271 APC_NONE,
272 APC_USER,
273 APC_TIMER,
274 APC_ASYNC_IO,
275 APC_VIRTUAL_ALLOC,
276 APC_VIRTUAL_FREE,
277 APC_VIRTUAL_QUERY,
278 APC_VIRTUAL_PROTECT,
279 APC_VIRTUAL_FLUSH,
280 APC_VIRTUAL_LOCK,
281 APC_VIRTUAL_UNLOCK,
282 APC_MAP_VIEW,
283 APC_UNMAP_VIEW,
284 APC_CREATE_THREAD
287 typedef union
289 enum apc_type type;
290 struct
292 enum apc_type type; /* APC_USER */
293 int __pad;
294 client_ptr_t func; /* void (__stdcall *func)(ULONG_PTR,ULONG_PTR,ULONG_PTR); */
295 apc_param_t args[3]; /* arguments for user function */
296 } user;
297 struct
299 enum apc_type type; /* APC_TIMER */
300 int __pad;
301 client_ptr_t func; /* void (__stdcall *func)(void*, unsigned int, unsigned int); */
302 timeout_t time; /* absolute time of expiration */
303 client_ptr_t arg; /* user argument */
304 } timer;
305 struct
307 enum apc_type type; /* APC_ASYNC_IO */
308 unsigned int status; /* I/O status */
309 client_ptr_t func; /* unsigned int (*func)(void*, void*, unsigned int, void **); */
310 client_ptr_t user; /* user pointer */
311 client_ptr_t sb; /* status block */
312 } async_io;
313 struct
315 enum apc_type type; /* APC_VIRTUAL_ALLOC */
316 unsigned int op_type; /* type of operation */
317 client_ptr_t addr; /* requested address */
318 mem_size_t size; /* allocation size */
319 unsigned int zero_bits; /* allocation alignment */
320 unsigned int prot; /* memory protection flags */
321 } virtual_alloc;
322 struct
324 enum apc_type type; /* APC_VIRTUAL_FREE */
325 unsigned int op_type; /* type of operation */
326 client_ptr_t addr; /* requested address */
327 mem_size_t size; /* allocation size */
328 } virtual_free;
329 struct
331 enum apc_type type; /* APC_VIRTUAL_QUERY */
332 int __pad;
333 client_ptr_t addr; /* requested address */
334 } virtual_query;
335 struct
337 enum apc_type type; /* APC_VIRTUAL_PROTECT */
338 unsigned int prot; /* new protection flags */
339 client_ptr_t addr; /* requested address */
340 mem_size_t size; /* requested size */
341 } virtual_protect;
342 struct
344 enum apc_type type; /* APC_VIRTUAL_FLUSH */
345 int __pad;
346 client_ptr_t addr; /* requested address */
347 mem_size_t size; /* requested size */
348 } virtual_flush;
349 struct
351 enum apc_type type; /* APC_VIRTUAL_LOCK */
352 int __pad;
353 client_ptr_t addr; /* requested address */
354 mem_size_t size; /* requested size */
355 } virtual_lock;
356 struct
358 enum apc_type type; /* APC_VIRTUAL_UNLOCK */
359 int __pad;
360 client_ptr_t addr; /* requested address */
361 mem_size_t size; /* requested size */
362 } virtual_unlock;
363 struct
365 enum apc_type type; /* APC_MAP_VIEW */
366 obj_handle_t handle; /* mapping handle */
367 client_ptr_t addr; /* requested address */
368 mem_size_t size; /* allocation size */
369 file_pos_t offset; /* file offset */
370 unsigned int alloc_type;/* allocation type */
371 unsigned short zero_bits; /* allocation alignment */
372 unsigned short prot; /* memory protection flags */
373 } map_view;
374 struct
376 enum apc_type type; /* APC_UNMAP_VIEW */
377 int __pad;
378 client_ptr_t addr; /* view address */
379 } unmap_view;
380 struct
382 enum apc_type type; /* APC_CREATE_THREAD */
383 int suspend; /* suspended thread? */
384 client_ptr_t func; /* void (__stdcall *func)(void*); start function */
385 client_ptr_t arg; /* argument for start function */
386 mem_size_t reserve; /* reserve size for thread stack */
387 mem_size_t commit; /* commit size for thread stack */
388 } create_thread;
389 } apc_call_t;
391 typedef union
393 enum apc_type type;
394 struct
396 enum apc_type type; /* APC_ASYNC_IO */
397 unsigned int status; /* new status of async operation */
398 client_ptr_t apc; /* user APC to call */
399 unsigned int total; /* bytes transferred */
400 } async_io;
401 struct
403 enum apc_type type; /* APC_VIRTUAL_ALLOC */
404 unsigned int status; /* status returned by call */
405 client_ptr_t addr; /* resulting address */
406 mem_size_t size; /* resulting size */
407 } virtual_alloc;
408 struct
410 enum apc_type type; /* APC_VIRTUAL_FREE */
411 unsigned int status; /* status returned by call */
412 client_ptr_t addr; /* resulting address */
413 mem_size_t size; /* resulting size */
414 } virtual_free;
415 struct
417 enum apc_type type; /* APC_VIRTUAL_QUERY */
418 unsigned int status; /* status returned by call */
419 client_ptr_t base; /* resulting base address */
420 client_ptr_t alloc_base;/* resulting allocation base */
421 mem_size_t size; /* resulting region size */
422 unsigned short state; /* resulting region state */
423 unsigned short prot; /* resulting region protection */
424 unsigned short alloc_prot;/* resulting allocation protection */
425 unsigned short alloc_type;/* resulting region allocation type */
426 } virtual_query;
427 struct
429 enum apc_type type; /* APC_VIRTUAL_PROTECT */
430 unsigned int status; /* status returned by call */
431 client_ptr_t addr; /* resulting address */
432 mem_size_t size; /* resulting size */
433 unsigned int prot; /* old protection flags */
434 } virtual_protect;
435 struct
437 enum apc_type type; /* APC_VIRTUAL_FLUSH */
438 unsigned int status; /* status returned by call */
439 client_ptr_t addr; /* resulting address */
440 mem_size_t size; /* resulting size */
441 } virtual_flush;
442 struct
444 enum apc_type type; /* APC_VIRTUAL_LOCK */
445 unsigned int status; /* status returned by call */
446 client_ptr_t addr; /* resulting address */
447 mem_size_t size; /* resulting size */
448 } virtual_lock;
449 struct
451 enum apc_type type; /* APC_VIRTUAL_UNLOCK */
452 unsigned int status; /* status returned by call */
453 client_ptr_t addr; /* resulting address */
454 mem_size_t size; /* resulting size */
455 } virtual_unlock;
456 struct
458 enum apc_type type; /* APC_MAP_VIEW */
459 unsigned int status; /* status returned by call */
460 client_ptr_t addr; /* resulting address */
461 mem_size_t size; /* resulting size */
462 } map_view;
463 struct
465 enum apc_type type; /* APC_MAP_VIEW */
466 unsigned int status; /* status returned by call */
467 } unmap_view;
468 struct
470 enum apc_type type; /* APC_CREATE_THREAD */
471 unsigned int status; /* status returned by call */
472 thread_id_t tid; /* thread id */
473 obj_handle_t handle; /* handle to new thread */
474 } create_thread;
475 } apc_result_t;
477 /****************************************************************/
478 /* Request declarations */
480 /* Create a new process from the context of the parent */
481 @REQ(new_process)
482 int inherit_all; /* inherit all handles from parent */
483 unsigned int create_flags; /* creation flags */
484 int socket_fd; /* file descriptor for process socket */
485 obj_handle_t exe_file; /* file handle for main exe */
486 obj_handle_t hstdin; /* handle for stdin */
487 obj_handle_t hstdout; /* handle for stdout */
488 obj_handle_t hstderr; /* handle for stderr */
489 unsigned int process_access; /* access rights for process object */
490 unsigned int process_attr; /* attributes for process object */
491 unsigned int thread_access; /* access rights for thread object */
492 unsigned int thread_attr; /* attributes for thread object */
493 VARARG(info,startup_info); /* startup information */
494 VARARG(env,unicode_str); /* environment for new process */
495 @REPLY
496 obj_handle_t info; /* new process info handle */
497 process_id_t pid; /* process id */
498 obj_handle_t phandle; /* process handle (in the current process) */
499 thread_id_t tid; /* thread id */
500 obj_handle_t thandle; /* thread handle (in the current process) */
501 @END
504 /* Retrieve information about a newly started process */
505 @REQ(get_new_process_info)
506 obj_handle_t info; /* info handle returned from new_process_request */
507 @REPLY
508 int success; /* did the process start successfully? */
509 int exit_code; /* process exit code if failed */
510 @END
513 /* Create a new thread from the context of the parent */
514 @REQ(new_thread)
515 unsigned int access; /* wanted access rights */
516 unsigned int attributes; /* object attributes */
517 int suspend; /* new thread should be suspended on creation */
518 int request_fd; /* fd for request pipe */
519 @REPLY
520 thread_id_t tid; /* thread id */
521 obj_handle_t handle; /* thread handle (in the current process) */
522 @END
525 /* Retrieve the new process startup info */
526 @REQ(get_startup_info)
527 @REPLY
528 obj_handle_t exe_file; /* file handle for main exe */
529 obj_handle_t hstdin; /* handle for stdin */
530 obj_handle_t hstdout; /* handle for stdout */
531 obj_handle_t hstderr; /* handle for stderr */
532 VARARG(info,startup_info); /* startup information */
533 VARARG(env,unicode_str); /* environment */
534 @END
537 /* Signal the end of the process initialization */
538 @REQ(init_process_done)
539 int gui; /* is it a GUI process? */
540 mod_handle_t module; /* main module base address */
541 client_ptr_t ldt_copy; /* address of LDT copy (in thread address space) */
542 client_ptr_t entry; /* process entry point */
543 @END
546 /* Initialize a thread; called from the child after fork()/clone() */
547 @REQ(init_thread)
548 int unix_pid; /* Unix pid of new thread */
549 int unix_tid; /* Unix tid of new thread */
550 int debug_level; /* new debug level */
551 client_ptr_t teb; /* TEB of new thread (in thread address space) */
552 client_ptr_t entry; /* thread entry point (in thread address space) */
553 int reply_fd; /* fd for reply pipe */
554 int wait_fd; /* fd for blocking calls pipe */
555 client_ptr_t peb; /* address of PEB (in thread address space) */
556 @REPLY
557 process_id_t pid; /* process id of the new thread's process */
558 thread_id_t tid; /* thread id of the new thread */
559 timeout_t server_start; /* server start time */
560 data_size_t info_size; /* total size of startup info */
561 int version; /* protocol version */
562 @END
565 /* Terminate a process */
566 @REQ(terminate_process)
567 obj_handle_t handle; /* process handle to terminate */
568 int exit_code; /* process exit code */
569 @REPLY
570 int self; /* suicide? */
571 @END
574 /* Terminate a thread */
575 @REQ(terminate_thread)
576 obj_handle_t handle; /* thread handle to terminate */
577 int exit_code; /* thread exit code */
578 @REPLY
579 int self; /* suicide? */
580 int last; /* last thread in this process? */
581 @END
584 /* Retrieve information about a process */
585 @REQ(get_process_info)
586 obj_handle_t handle; /* process handle */
587 @REPLY
588 process_id_t pid; /* server process id */
589 process_id_t ppid; /* server process id of parent */
590 int priority; /* priority class */
591 unsigned int affinity; /* process affinity mask */
592 client_ptr_t peb; /* PEB address in process address space */
593 timeout_t start_time; /* process start time */
594 timeout_t end_time; /* process end time */
595 int exit_code; /* process exit code */
596 @END
599 /* Set a process informations */
600 @REQ(set_process_info)
601 obj_handle_t handle; /* process handle */
602 int mask; /* setting mask (see below) */
603 int priority; /* priority class */
604 unsigned int affinity; /* affinity mask */
605 @END
606 #define SET_PROCESS_INFO_PRIORITY 0x01
607 #define SET_PROCESS_INFO_AFFINITY 0x02
610 /* Retrieve information about a thread */
611 @REQ(get_thread_info)
612 obj_handle_t handle; /* thread handle */
613 thread_id_t tid_in; /* thread id (optional) */
614 @REPLY
615 process_id_t pid; /* server process id */
616 thread_id_t tid; /* server thread id */
617 client_ptr_t teb; /* thread teb pointer */
618 int priority; /* thread priority level */
619 unsigned int affinity; /* thread affinity mask */
620 timeout_t creation_time; /* thread creation time */
621 timeout_t exit_time; /* thread exit time */
622 int exit_code; /* thread exit code */
623 int last; /* last thread in process */
624 @END
627 /* Set a thread informations */
628 @REQ(set_thread_info)
629 obj_handle_t handle; /* thread handle */
630 int mask; /* setting mask (see below) */
631 int priority; /* priority class */
632 unsigned int affinity; /* affinity mask */
633 obj_handle_t token; /* impersonation token */
634 @END
635 #define SET_THREAD_INFO_PRIORITY 0x01
636 #define SET_THREAD_INFO_AFFINITY 0x02
637 #define SET_THREAD_INFO_TOKEN 0x04
640 /* Retrieve information about a module */
641 @REQ(get_dll_info)
642 obj_handle_t handle; /* process handle */
643 mod_handle_t base_address; /* base address of module */
644 @REPLY
645 client_ptr_t entry_point;
646 data_size_t size; /* module size */
647 data_size_t filename_len; /* buffer len in bytes required to store filename */
648 VARARG(filename,unicode_str); /* file name of module */
649 @END
652 /* Suspend a thread */
653 @REQ(suspend_thread)
654 obj_handle_t handle; /* thread handle */
655 @REPLY
656 int count; /* new suspend count */
657 @END
660 /* Resume a thread */
661 @REQ(resume_thread)
662 obj_handle_t handle; /* thread handle */
663 @REPLY
664 int count; /* new suspend count */
665 @END
668 /* Notify the server that a dll has been loaded */
669 @REQ(load_dll)
670 obj_handle_t handle; /* file handle */
671 mod_handle_t base; /* base address */
672 client_ptr_t name; /* ptr to ptr to name (in process addr space) */
673 data_size_t size; /* dll size */
674 int dbg_offset; /* debug info offset */
675 int dbg_size; /* debug info size */
676 VARARG(filename,unicode_str); /* file name of dll */
677 @END
680 /* Notify the server that a dll is being unloaded */
681 @REQ(unload_dll)
682 int __pad;
683 mod_handle_t base; /* base address */
684 @END
687 /* Queue an APC for a thread or process */
688 @REQ(queue_apc)
689 obj_handle_t handle; /* thread or process handle */
690 apc_call_t call; /* call arguments */
691 @REPLY
692 obj_handle_t handle; /* APC handle */
693 int self; /* run APC in caller itself? */
694 @END
697 /* Get the result of an APC call */
698 @REQ(get_apc_result)
699 obj_handle_t handle; /* handle to the APC */
700 @REPLY
701 apc_result_t result; /* result of the APC */
702 @END
705 /* Close a handle for the current process */
706 @REQ(close_handle)
707 obj_handle_t handle; /* handle to close */
708 @END
711 /* Set a handle information */
712 @REQ(set_handle_info)
713 obj_handle_t handle; /* handle we are interested in */
714 int flags; /* new handle flags */
715 int mask; /* mask for flags to set */
716 @REPLY
717 int old_flags; /* old flag value */
718 @END
721 /* Duplicate a handle */
722 @REQ(dup_handle)
723 obj_handle_t src_process; /* src process handle */
724 obj_handle_t src_handle; /* src handle to duplicate */
725 obj_handle_t dst_process; /* dst process handle */
726 unsigned int access; /* wanted access rights */
727 unsigned int attributes; /* object attributes */
728 unsigned int options; /* duplicate options (see below) */
729 @REPLY
730 obj_handle_t handle; /* duplicated handle in dst process */
731 int self; /* is the source the current process? */
732 int closed; /* whether the source handle has been closed */
733 @END
734 #define DUP_HANDLE_CLOSE_SOURCE DUPLICATE_CLOSE_SOURCE
735 #define DUP_HANDLE_SAME_ACCESS DUPLICATE_SAME_ACCESS
736 #define DUP_HANDLE_MAKE_GLOBAL 0x80000000 /* Not a Windows flag */
739 /* Open a handle to a process */
740 @REQ(open_process)
741 process_id_t pid; /* process id to open */
742 unsigned int access; /* wanted access rights */
743 unsigned int attributes; /* object attributes */
744 @REPLY
745 obj_handle_t handle; /* handle to the process */
746 @END
749 /* Open a handle to a thread */
750 @REQ(open_thread)
751 thread_id_t tid; /* thread id to open */
752 unsigned int access; /* wanted access rights */
753 unsigned int attributes; /* object attributes */
754 @REPLY
755 obj_handle_t handle; /* handle to the thread */
756 @END
759 /* Wait for handles */
760 @REQ(select)
761 int flags; /* wait flags (see below) */
762 client_ptr_t cookie; /* magic cookie to return to client */
763 obj_handle_t signal; /* object to signal (0 if none) */
764 obj_handle_t prev_apc; /* handle to previous APC */
765 timeout_t timeout; /* timeout */
766 VARARG(result,apc_result); /* result of previous APC */
767 VARARG(handles,handles); /* handles to select on */
768 @REPLY
769 timeout_t timeout; /* timeout converted to absolute */
770 apc_call_t call; /* APC call arguments */
771 obj_handle_t apc_handle; /* handle to next APC */
772 @END
773 #define SELECT_ALL 1
774 #define SELECT_ALERTABLE 2
775 #define SELECT_INTERRUPTIBLE 4
778 /* Create an event */
779 @REQ(create_event)
780 unsigned int access; /* wanted access rights */
781 unsigned int attributes; /* object attributes */
782 int manual_reset; /* manual reset event */
783 int initial_state; /* initial state of the event */
784 VARARG(objattr,object_attributes); /* object attributes */
785 @REPLY
786 obj_handle_t handle; /* handle to the event */
787 @END
789 /* Event operation */
790 @REQ(event_op)
791 obj_handle_t handle; /* handle to event */
792 int op; /* event operation (see below) */
793 @END
794 enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT };
797 /* Open an event */
798 @REQ(open_event)
799 unsigned int access; /* wanted access rights */
800 unsigned int attributes; /* object attributes */
801 obj_handle_t rootdir; /* root directory */
802 VARARG(name,unicode_str); /* object name */
803 @REPLY
804 obj_handle_t handle; /* handle to the event */
805 @END
808 /* Create a mutex */
809 @REQ(create_mutex)
810 unsigned int access; /* wanted access rights */
811 unsigned int attributes; /* object attributes */
812 int owned; /* initially owned? */
813 VARARG(objattr,object_attributes); /* object attributes */
814 @REPLY
815 obj_handle_t handle; /* handle to the mutex */
816 @END
819 /* Release a mutex */
820 @REQ(release_mutex)
821 obj_handle_t handle; /* handle to the mutex */
822 @REPLY
823 unsigned int prev_count; /* value of internal counter, before release */
824 @END
827 /* Open a mutex */
828 @REQ(open_mutex)
829 unsigned int access; /* wanted access rights */
830 unsigned int attributes; /* object attributes */
831 obj_handle_t rootdir; /* root directory */
832 VARARG(name,unicode_str); /* object name */
833 @REPLY
834 obj_handle_t handle; /* handle to the mutex */
835 @END
838 /* Create a semaphore */
839 @REQ(create_semaphore)
840 unsigned int access; /* wanted access rights */
841 unsigned int attributes; /* object attributes */
842 unsigned int initial; /* initial count */
843 unsigned int max; /* maximum count */
844 VARARG(objattr,object_attributes); /* object attributes */
845 @REPLY
846 obj_handle_t handle; /* handle to the semaphore */
847 @END
850 /* Release a semaphore */
851 @REQ(release_semaphore)
852 obj_handle_t handle; /* handle to the semaphore */
853 unsigned int count; /* count to add to semaphore */
854 @REPLY
855 unsigned int prev_count; /* previous semaphore count */
856 @END
859 /* Open a semaphore */
860 @REQ(open_semaphore)
861 unsigned int access; /* wanted access rights */
862 unsigned int attributes; /* object attributes */
863 obj_handle_t rootdir; /* root directory */
864 VARARG(name,unicode_str); /* object name */
865 @REPLY
866 obj_handle_t handle; /* handle to the semaphore */
867 @END
870 /* Create a file */
871 @REQ(create_file)
872 unsigned int access; /* wanted access rights */
873 unsigned int attributes; /* object attributes */
874 unsigned int sharing; /* sharing flags */
875 int create; /* file create action */
876 unsigned int options; /* file options */
877 unsigned int attrs; /* file attributes for creation */
878 VARARG(objattr,object_attributes); /* object attributes */
879 VARARG(filename,string); /* file name */
880 @REPLY
881 obj_handle_t handle; /* handle to the file */
882 @END
885 /* Open a file object */
886 @REQ(open_file_object)
887 unsigned int access; /* wanted access rights */
888 unsigned int attributes; /* open attributes */
889 obj_handle_t rootdir; /* root directory */
890 unsigned int sharing; /* sharing flags */
891 unsigned int options; /* file options */
892 VARARG(filename,unicode_str); /* file name */
893 @REPLY
894 obj_handle_t handle; /* handle to the file */
895 @END
898 /* Allocate a file handle for a Unix fd */
899 @REQ(alloc_file_handle)
900 unsigned int access; /* wanted access rights */
901 unsigned int attributes; /* object attributes */
902 int fd; /* file descriptor on the client side */
903 @REPLY
904 obj_handle_t handle; /* handle to the file */
905 @END
908 /* Get a Unix fd to access a file */
909 @REQ(get_handle_fd)
910 obj_handle_t handle; /* handle to the file */
911 @REPLY
912 int type; /* file type (see below) */
913 int removable; /* is file removable? */
914 unsigned int access; /* file access rights */
915 unsigned int options; /* file open options */
916 @END
917 enum server_fd_type
919 FD_TYPE_INVALID, /* invalid file (no associated fd) */
920 FD_TYPE_FILE, /* regular file */
921 FD_TYPE_DIR, /* directory */
922 FD_TYPE_SOCKET, /* socket */
923 FD_TYPE_SERIAL, /* serial port */
924 FD_TYPE_PIPE, /* named pipe */
925 FD_TYPE_MAILSLOT, /* mailslot */
926 FD_TYPE_CHAR, /* unspecified char device */
927 FD_TYPE_DEVICE, /* Windows device file */
928 FD_TYPE_NB_TYPES
932 /* Flush a file buffers */
933 @REQ(flush_file)
934 obj_handle_t handle; /* handle to the file */
935 @REPLY
936 obj_handle_t event; /* event set when finished */
937 @END
940 /* Lock a region of a file */
941 @REQ(lock_file)
942 obj_handle_t handle; /* handle to the file */
943 file_pos_t offset; /* offset of start of lock */
944 file_pos_t count; /* count of bytes to lock */
945 int shared; /* shared or exclusive lock? */
946 int wait; /* do we want to wait? */
947 @REPLY
948 obj_handle_t handle; /* handle to wait on */
949 int overlapped; /* is it an overlapped I/O handle? */
950 @END
953 /* Unlock a region of a file */
954 @REQ(unlock_file)
955 obj_handle_t handle; /* handle to the file */
956 file_pos_t offset; /* offset of start of unlock */
957 file_pos_t count; /* count of bytes to unlock */
958 @END
961 /* Create a socket */
962 @REQ(create_socket)
963 unsigned int access; /* wanted access rights */
964 unsigned int attributes; /* object attributes */
965 int family; /* family, see socket manpage */
966 int type; /* type, see socket manpage */
967 int protocol; /* protocol, see socket manpage */
968 unsigned int flags; /* socket flags */
969 @REPLY
970 obj_handle_t handle; /* handle to the new socket */
971 @END
974 /* Accept a socket */
975 @REQ(accept_socket)
976 obj_handle_t lhandle; /* handle to the listening socket */
977 unsigned int access; /* wanted access rights */
978 unsigned int attributes; /* object attributes */
979 @REPLY
980 obj_handle_t handle; /* handle to the new socket */
981 @END
984 /* Set socket event parameters */
985 @REQ(set_socket_event)
986 obj_handle_t handle; /* handle to the socket */
987 unsigned int mask; /* event mask */
988 obj_handle_t event; /* event object */
989 user_handle_t window; /* window to send the message to */
990 unsigned int msg; /* message to send */
991 @END
994 /* Get socket event parameters */
995 @REQ(get_socket_event)
996 obj_handle_t handle; /* handle to the socket */
997 int service; /* clear pending? */
998 obj_handle_t c_event; /* event to clear */
999 @REPLY
1000 unsigned int mask; /* event mask */
1001 unsigned int pmask; /* pending events */
1002 unsigned int state; /* status bits */
1003 VARARG(errors,ints); /* event errors */
1004 @END
1007 /* Reenable pending socket events */
1008 @REQ(enable_socket_event)
1009 obj_handle_t handle; /* handle to the socket */
1010 unsigned int mask; /* events to re-enable */
1011 unsigned int sstate; /* status bits to set */
1012 unsigned int cstate; /* status bits to clear */
1013 @END
1015 @REQ(set_socket_deferred)
1016 obj_handle_t handle; /* handle to the socket */
1017 obj_handle_t deferred; /* handle to the socket for which accept() is deferred */
1018 @END
1020 /* Allocate a console (only used by a console renderer) */
1021 @REQ(alloc_console)
1022 unsigned int access; /* wanted access rights */
1023 unsigned int attributes; /* object attributes */
1024 process_id_t pid; /* pid of process which shall be attached to the console */
1025 @REPLY
1026 obj_handle_t handle_in; /* handle to console input */
1027 obj_handle_t event; /* handle to renderer events change notification */
1028 @END
1031 /* Free the console of the current process */
1032 @REQ(free_console)
1033 @END
1036 #define CONSOLE_RENDERER_NONE_EVENT 0x00
1037 #define CONSOLE_RENDERER_TITLE_EVENT 0x01
1038 #define CONSOLE_RENDERER_ACTIVE_SB_EVENT 0x02
1039 #define CONSOLE_RENDERER_SB_RESIZE_EVENT 0x03
1040 #define CONSOLE_RENDERER_UPDATE_EVENT 0x04
1041 #define CONSOLE_RENDERER_CURSOR_POS_EVENT 0x05
1042 #define CONSOLE_RENDERER_CURSOR_GEOM_EVENT 0x06
1043 #define CONSOLE_RENDERER_DISPLAY_EVENT 0x07
1044 #define CONSOLE_RENDERER_EXIT_EVENT 0x08
1045 struct console_renderer_event
1047 short event;
1048 union
1050 struct update
1052 short top;
1053 short bottom;
1054 } update;
1055 struct resize
1057 short width;
1058 short height;
1059 } resize;
1060 struct cursor_pos
1062 short x;
1063 short y;
1064 } cursor_pos;
1065 struct cursor_geom
1067 short visible;
1068 short size;
1069 } cursor_geom;
1070 struct display
1072 short left;
1073 short top;
1074 short width;
1075 short height;
1076 } display;
1077 } u;
1080 /* retrieve console events for the renderer */
1081 @REQ(get_console_renderer_events)
1082 obj_handle_t handle; /* handle to console input events */
1083 @REPLY
1084 VARARG(data,bytes); /* the various console_renderer_events */
1085 @END
1088 /* Open a handle to the process console */
1089 @REQ(open_console)
1090 obj_handle_t from; /* 0 (resp 1) input (resp output) of current process console */
1091 /* otherwise console_in handle to get active screen buffer? */
1092 unsigned int access; /* wanted access rights */
1093 unsigned int attributes; /* object attributes */
1094 int share; /* share mask (only for output handles) */
1095 @REPLY
1096 obj_handle_t handle; /* handle to the console */
1097 @END
1100 /* Get the input queue wait event */
1101 @REQ(get_console_wait_event)
1102 @REPLY
1103 obj_handle_t handle;
1104 @END
1106 /* Get a console mode (input or output) */
1107 @REQ(get_console_mode)
1108 obj_handle_t handle; /* handle to the console */
1109 @REPLY
1110 int mode; /* console mode */
1111 @END
1114 /* Set a console mode (input or output) */
1115 @REQ(set_console_mode)
1116 obj_handle_t handle; /* handle to the console */
1117 int mode; /* console mode */
1118 @END
1121 /* Set info about a console (input only) */
1122 @REQ(set_console_input_info)
1123 obj_handle_t handle; /* handle to console input, or 0 for process' console */
1124 int mask; /* setting mask (see below) */
1125 obj_handle_t active_sb; /* active screen buffer */
1126 int history_mode; /* whether we duplicate lines in history */
1127 int history_size; /* number of lines in history */
1128 int edition_mode; /* index to the edition mode flavors */
1129 int input_cp; /* console input codepage */
1130 int output_cp; /* console output codepage */
1131 user_handle_t win; /* console window if backend supports it */
1132 VARARG(title,unicode_str); /* console title */
1133 @END
1134 #define SET_CONSOLE_INPUT_INFO_ACTIVE_SB 0x01
1135 #define SET_CONSOLE_INPUT_INFO_TITLE 0x02
1136 #define SET_CONSOLE_INPUT_INFO_HISTORY_MODE 0x04
1137 #define SET_CONSOLE_INPUT_INFO_HISTORY_SIZE 0x08
1138 #define SET_CONSOLE_INPUT_INFO_EDITION_MODE 0x10
1139 #define SET_CONSOLE_INPUT_INFO_INPUT_CODEPAGE 0x20
1140 #define SET_CONSOLE_INPUT_INFO_OUTPUT_CODEPAGE 0x40
1141 #define SET_CONSOLE_INPUT_INFO_WIN 0x80
1144 /* Get info about a console (input only) */
1145 @REQ(get_console_input_info)
1146 obj_handle_t handle; /* handle to console input, or 0 for process' console */
1147 @REPLY
1148 int history_mode; /* whether we duplicate lines in history */
1149 int history_size; /* number of lines in history */
1150 int history_index; /* number of used lines in history */
1151 int edition_mode; /* index to the edition mode flavors */
1152 int input_cp; /* console input codepage */
1153 int output_cp; /* console output codepage */
1154 user_handle_t win; /* console window if backend supports it */
1155 VARARG(title,unicode_str); /* console title */
1156 @END
1159 /* appends a string to console's history */
1160 @REQ(append_console_input_history)
1161 obj_handle_t handle; /* handle to console input, or 0 for process' console */
1162 VARARG(line,unicode_str); /* line to add */
1163 @END
1166 /* appends a string to console's history */
1167 @REQ(get_console_input_history)
1168 obj_handle_t handle; /* handle to console input, or 0 for process' console */
1169 int index; /* index to get line from */
1170 @REPLY
1171 int total; /* total length of line in Unicode chars */
1172 VARARG(line,unicode_str); /* line to add */
1173 @END
1176 /* creates a new screen buffer on process' console */
1177 @REQ(create_console_output)
1178 obj_handle_t handle_in; /* handle to console input, or 0 for process' console */
1179 unsigned int access; /* wanted access rights */
1180 unsigned int attributes; /* object attributes */
1181 unsigned int share; /* sharing credentials */
1182 @REPLY
1183 obj_handle_t handle_out; /* handle to the screen buffer */
1184 @END
1187 /* Set info about a console (output only) */
1188 @REQ(set_console_output_info)
1189 obj_handle_t handle; /* handle to the console */
1190 int mask; /* setting mask (see below) */
1191 short int cursor_size; /* size of cursor (percentage filled) */
1192 short int cursor_visible;/* cursor visibility flag */
1193 short int cursor_x; /* position of cursor (x, y) */
1194 short int cursor_y;
1195 short int width; /* width of the screen buffer */
1196 short int height; /* height of the screen buffer */
1197 short int attr; /* default attribute */
1198 short int win_left; /* window actually displayed by renderer */
1199 short int win_top; /* the rect area is expressed withing the */
1200 short int win_right; /* boundaries of the screen buffer */
1201 short int win_bottom;
1202 short int max_width; /* maximum size (width x height) for the window */
1203 short int max_height;
1204 @END
1205 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_GEOM 0x01
1206 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_POS 0x02
1207 #define SET_CONSOLE_OUTPUT_INFO_SIZE 0x04
1208 #define SET_CONSOLE_OUTPUT_INFO_ATTR 0x08
1209 #define SET_CONSOLE_OUTPUT_INFO_DISPLAY_WINDOW 0x10
1210 #define SET_CONSOLE_OUTPUT_INFO_MAX_SIZE 0x20
1213 /* Get info about a console (output only) */
1214 @REQ(get_console_output_info)
1215 obj_handle_t handle; /* handle to the console */
1216 @REPLY
1217 short int cursor_size; /* size of cursor (percentage filled) */
1218 short int cursor_visible;/* cursor visibility flag */
1219 short int cursor_x; /* position of cursor (x, y) */
1220 short int cursor_y;
1221 short int width; /* width of the screen buffer */
1222 short int height; /* height of the screen buffer */
1223 short int attr; /* default attribute */
1224 short int win_left; /* window actually displayed by renderer */
1225 short int win_top; /* the rect area is expressed withing the */
1226 short int win_right; /* boundaries of the screen buffer */
1227 short int win_bottom;
1228 short int max_width; /* maximum size (width x height) for the window */
1229 short int max_height;
1230 @END
1232 /* Add input records to a console input queue */
1233 @REQ(write_console_input)
1234 obj_handle_t handle; /* handle to the console input */
1235 VARARG(rec,input_records); /* input records */
1236 @REPLY
1237 int written; /* number of records written */
1238 @END
1241 /* Fetch input records from a console input queue */
1242 @REQ(read_console_input)
1243 obj_handle_t handle; /* handle to the console input */
1244 int flush; /* flush the retrieved records from the queue? */
1245 @REPLY
1246 int read; /* number of records read */
1247 VARARG(rec,input_records); /* input records */
1248 @END
1251 /* write data (chars and/or attributes) in a screen buffer */
1252 @REQ(write_console_output)
1253 obj_handle_t handle; /* handle to the console output */
1254 int x; /* position where to start writing */
1255 int y;
1256 int mode; /* char info (see below) */
1257 int wrap; /* wrap around at end of line? */
1258 VARARG(data,bytes); /* info to write */
1259 @REPLY
1260 int written; /* number of char infos actually written */
1261 int width; /* width of screen buffer */
1262 int height; /* height of screen buffer */
1263 @END
1264 enum char_info_mode
1266 CHAR_INFO_MODE_TEXT, /* characters only */
1267 CHAR_INFO_MODE_ATTR, /* attributes only */
1268 CHAR_INFO_MODE_TEXTATTR, /* both characters and attributes */
1269 CHAR_INFO_MODE_TEXTSTDATTR /* characters but use standard attributes */
1273 /* fill a screen buffer with constant data (chars and/or attributes) */
1274 @REQ(fill_console_output)
1275 obj_handle_t handle; /* handle to the console output */
1276 int x; /* position where to start writing */
1277 int y;
1278 int mode; /* char info mode */
1279 int count; /* number to write */
1280 int wrap; /* wrap around at end of line? */
1281 char_info_t data; /* data to write */
1282 @REPLY
1283 int written; /* number of char infos actually written */
1284 @END
1287 /* read data (chars and/or attributes) from a screen buffer */
1288 @REQ(read_console_output)
1289 obj_handle_t handle; /* handle to the console output */
1290 int x; /* position (x,y) where to start reading */
1291 int y;
1292 int mode; /* char info mode */
1293 int wrap; /* wrap around at end of line? */
1294 @REPLY
1295 int width; /* width of screen buffer */
1296 int height; /* height of screen buffer */
1297 VARARG(data,bytes);
1298 @END
1301 /* move a rect (of data) in screen buffer content */
1302 @REQ(move_console_output)
1303 obj_handle_t handle; /* handle to the console output */
1304 short int x_src; /* position (x, y) of rect to start moving from */
1305 short int y_src;
1306 short int x_dst; /* position (x, y) of rect to move to */
1307 short int y_dst;
1308 short int w; /* size of the rect (width, height) to move */
1309 short int h;
1310 @END
1313 /* Sends a signal to a process group */
1314 @REQ(send_console_signal)
1315 int signal; /* the signal to send */
1316 process_id_t group_id; /* the group to send the signal to */
1317 @END
1320 /* enable directory change notifications */
1321 @REQ(read_directory_changes)
1322 unsigned int filter; /* notification filter */
1323 int subtree; /* watch the subtree? */
1324 int want_data; /* flag indicating whether change data should be collected */
1325 async_data_t async; /* async I/O parameters */
1326 @END
1329 @REQ(read_change)
1330 obj_handle_t handle;
1331 @REPLY
1332 int action; /* type of change */
1333 VARARG(name,string); /* name of directory entry that changed */
1334 @END
1337 /* Create a file mapping */
1338 @REQ(create_mapping)
1339 unsigned int access; /* wanted access rights */
1340 unsigned int attributes; /* object attributes */
1341 unsigned int protect; /* protection flags (see below) */
1342 mem_size_t size; /* mapping size */
1343 obj_handle_t file_handle; /* file handle */
1344 VARARG(objattr,object_attributes); /* object attributes */
1345 @REPLY
1346 obj_handle_t handle; /* handle to the mapping */
1347 @END
1348 /* per-page protection flags */
1349 #define VPROT_READ 0x01
1350 #define VPROT_WRITE 0x02
1351 #define VPROT_EXEC 0x04
1352 #define VPROT_WRITECOPY 0x08
1353 #define VPROT_GUARD 0x10
1354 #define VPROT_NOCACHE 0x20
1355 #define VPROT_COMMITTED 0x40
1356 #define VPROT_WRITEWATCH 0x80
1357 /* per-mapping protection flags */
1358 #define VPROT_IMAGE 0x0100 /* mapping for an exe image */
1359 #define VPROT_SYSTEM 0x0200 /* system view (underlying mmap not under our control) */
1360 #define VPROT_VALLOC 0x0400 /* allocated by VirtualAlloc */
1361 #define VPROT_NOEXEC 0x0800 /* don't force exec permission */
1364 /* Open a mapping */
1365 @REQ(open_mapping)
1366 unsigned int access; /* wanted access rights */
1367 unsigned int attributes; /* object attributes */
1368 obj_handle_t rootdir; /* root directory */
1369 VARARG(name,unicode_str); /* object name */
1370 @REPLY
1371 obj_handle_t handle; /* handle to the mapping */
1372 @END
1375 /* Get information about a file mapping */
1376 @REQ(get_mapping_info)
1377 obj_handle_t handle; /* handle to the mapping */
1378 unsigned int access; /* wanted access rights */
1379 @REPLY
1380 mem_size_t size; /* mapping size */
1381 int protect; /* protection flags */
1382 int header_size; /* header size (for VPROT_IMAGE mapping) */
1383 client_ptr_t base; /* default base addr (for VPROT_IMAGE mapping) */
1384 obj_handle_t mapping; /* duplicate mapping handle unless removable */
1385 obj_handle_t shared_file; /* shared mapping file handle */
1386 @END
1389 /* Get a range of committed pages in a file mapping */
1390 @REQ(get_mapping_committed_range)
1391 obj_handle_t handle; /* handle to the mapping */
1392 file_pos_t offset; /* starting offset (page-aligned, in bytes) */
1393 @REPLY
1394 mem_size_t size; /* size of range starting at offset (page-aligned, in bytes) */
1395 int committed; /* whether it is a committed range */
1396 @END
1399 /* Add a range to the committed pages in a file mapping */
1400 @REQ(add_mapping_committed_range)
1401 obj_handle_t handle; /* handle to the mapping */
1402 file_pos_t offset; /* starting offset (page-aligned, in bytes) */
1403 mem_size_t size; /* size to set (page-aligned, in bytes) or 0 if only retrieving */
1404 @END
1407 #define SNAP_PROCESS 0x00000001
1408 #define SNAP_THREAD 0x00000002
1409 /* Create a snapshot */
1410 @REQ(create_snapshot)
1411 unsigned int attributes; /* object attributes */
1412 unsigned int flags; /* snapshot flags (SNAP_*) */
1413 @REPLY
1414 obj_handle_t handle; /* handle to the snapshot */
1415 @END
1418 /* Get the next process from a snapshot */
1419 @REQ(next_process)
1420 obj_handle_t handle; /* handle to the snapshot */
1421 int reset; /* reset snapshot position? */
1422 @REPLY
1423 int count; /* process usage count */
1424 process_id_t pid; /* process id */
1425 process_id_t ppid; /* parent process id */
1426 int threads; /* number of threads */
1427 int priority; /* process priority */
1428 int handles; /* number of handles */
1429 VARARG(filename,unicode_str); /* file name of main exe */
1430 @END
1433 /* Get the next thread from a snapshot */
1434 @REQ(next_thread)
1435 obj_handle_t handle; /* handle to the snapshot */
1436 int reset; /* reset snapshot position? */
1437 @REPLY
1438 int count; /* thread usage count */
1439 process_id_t pid; /* process id */
1440 thread_id_t tid; /* thread id */
1441 int base_pri; /* base priority */
1442 int delta_pri; /* delta priority */
1443 @END
1446 /* Wait for a debug event */
1447 @REQ(wait_debug_event)
1448 int get_handle; /* should we alloc a handle for waiting? */
1449 @REPLY
1450 process_id_t pid; /* process id */
1451 thread_id_t tid; /* thread id */
1452 obj_handle_t wait; /* wait handle if no event ready */
1453 VARARG(event,debug_event); /* debug event data */
1454 @END
1457 /* Queue an exception event */
1458 @REQ(queue_exception_event)
1459 int first; /* first chance exception? */
1460 unsigned int code; /* exception code */
1461 unsigned int flags; /* exception flags */
1462 client_ptr_t record; /* exception record */
1463 client_ptr_t address; /* exception address */
1464 data_size_t len; /* size of parameters */
1465 VARARG(params,uints64,len);/* exception parameters */
1466 VARARG(context,context); /* thread context */
1467 @REPLY
1468 obj_handle_t handle; /* handle to the queued event */
1469 @END
1472 /* Retrieve the status of an exception event */
1473 @REQ(get_exception_status)
1474 obj_handle_t handle; /* handle to the queued event */
1475 @REPLY
1476 VARARG(context,context); /* modified thread context */
1477 @END
1480 /* Send an output string to the debugger */
1481 @REQ(output_debug_string)
1482 data_size_t length; /* string length */
1483 client_ptr_t string; /* string to display (in debugged process address space) */
1484 int unicode; /* is it Unicode? */
1485 @END
1488 /* Continue a debug event */
1489 @REQ(continue_debug_event)
1490 process_id_t pid; /* process id to continue */
1491 thread_id_t tid; /* thread id to continue */
1492 int status; /* continuation status */
1493 @END
1496 /* Start/stop debugging an existing process */
1497 @REQ(debug_process)
1498 process_id_t pid; /* id of the process to debug */
1499 int attach; /* 1=attaching / 0=detaching from the process */
1500 @END
1503 /* Simulate a breakpoint in a process */
1504 @REQ(debug_break)
1505 obj_handle_t handle; /* process handle */
1506 @REPLY
1507 int self; /* was it the caller itself? */
1508 @END
1511 /* Set debugger kill on exit flag */
1512 @REQ(set_debugger_kill_on_exit)
1513 int kill_on_exit; /* 0=detach/1=kill debuggee when debugger dies */
1514 @END
1517 /* Read data from a process address space */
1518 @REQ(read_process_memory)
1519 obj_handle_t handle; /* process handle */
1520 client_ptr_t addr; /* addr to read from */
1521 @REPLY
1522 VARARG(data,bytes); /* result data */
1523 @END
1526 /* Write data to a process address space */
1527 @REQ(write_process_memory)
1528 obj_handle_t handle; /* process handle */
1529 client_ptr_t addr; /* addr to write to */
1530 VARARG(data,bytes); /* data to write */
1531 @END
1534 /* Create a registry key */
1535 @REQ(create_key)
1536 obj_handle_t parent; /* handle to the parent key */
1537 unsigned int access; /* desired access rights */
1538 unsigned int attributes; /* object attributes */
1539 unsigned int options; /* creation options */
1540 data_size_t namelen; /* length of key name in bytes */
1541 VARARG(name,unicode_str,namelen); /* key name */
1542 VARARG(class,unicode_str); /* class name */
1543 @REPLY
1544 obj_handle_t hkey; /* handle to the created key */
1545 int created; /* has it been newly created? */
1546 @END
1548 /* Open a registry key */
1549 @REQ(open_key)
1550 obj_handle_t parent; /* handle to the parent key */
1551 unsigned int access; /* desired access rights */
1552 unsigned int attributes; /* object attributes */
1553 VARARG(name,unicode_str); /* key name */
1554 @REPLY
1555 obj_handle_t hkey; /* handle to the open key */
1556 @END
1559 /* Delete a registry key */
1560 @REQ(delete_key)
1561 obj_handle_t hkey; /* handle to the key */
1562 @END
1565 /* Flush a registry key */
1566 @REQ(flush_key)
1567 obj_handle_t hkey; /* handle to the key */
1568 @END
1571 /* Enumerate registry subkeys */
1572 @REQ(enum_key)
1573 obj_handle_t hkey; /* handle to registry key */
1574 int index; /* index of subkey (or -1 for current key) */
1575 int info_class; /* requested information class */
1576 @REPLY
1577 int subkeys; /* number of subkeys */
1578 int max_subkey; /* longest subkey name */
1579 int max_class; /* longest class name */
1580 int values; /* number of values */
1581 int max_value; /* longest value name */
1582 int max_data; /* longest value data */
1583 timeout_t modif; /* last modification time */
1584 data_size_t total; /* total length needed for full name and class */
1585 data_size_t namelen; /* length of key name in bytes */
1586 VARARG(name,unicode_str,namelen); /* key name */
1587 VARARG(class,unicode_str); /* class name */
1588 @END
1591 /* Set a value of a registry key */
1592 @REQ(set_key_value)
1593 obj_handle_t hkey; /* handle to registry key */
1594 int type; /* value type */
1595 data_size_t namelen; /* length of value name in bytes */
1596 VARARG(name,unicode_str,namelen); /* value name */
1597 VARARG(data,bytes); /* value data */
1598 @END
1601 /* Retrieve the value of a registry key */
1602 @REQ(get_key_value)
1603 obj_handle_t hkey; /* handle to registry key */
1604 VARARG(name,unicode_str); /* value name */
1605 @REPLY
1606 int type; /* value type */
1607 data_size_t total; /* total length needed for data */
1608 VARARG(data,bytes); /* value data */
1609 @END
1612 /* Enumerate a value of a registry key */
1613 @REQ(enum_key_value)
1614 obj_handle_t hkey; /* handle to registry key */
1615 int index; /* value index */
1616 int info_class; /* requested information class */
1617 @REPLY
1618 int type; /* value type */
1619 data_size_t total; /* total length needed for full name and data */
1620 data_size_t namelen; /* length of value name in bytes */
1621 VARARG(name,unicode_str,namelen); /* value name */
1622 VARARG(data,bytes); /* value data */
1623 @END
1626 /* Delete a value of a registry key */
1627 @REQ(delete_key_value)
1628 obj_handle_t hkey; /* handle to registry key */
1629 VARARG(name,unicode_str); /* value name */
1630 @END
1633 /* Load a registry branch from a file */
1634 @REQ(load_registry)
1635 obj_handle_t hkey; /* root key to load to */
1636 obj_handle_t file; /* file to load from */
1637 VARARG(name,unicode_str); /* subkey name */
1638 @END
1641 /* UnLoad a registry branch from a file */
1642 @REQ(unload_registry)
1643 obj_handle_t hkey; /* root key to unload to */
1644 @END
1647 /* Save a registry branch to a file */
1648 @REQ(save_registry)
1649 obj_handle_t hkey; /* key to save */
1650 obj_handle_t file; /* file to save to */
1651 @END
1654 /* Add a registry key change notification */
1655 @REQ(set_registry_notification)
1656 obj_handle_t hkey; /* key to watch for changes */
1657 obj_handle_t event; /* event to set */
1658 int subtree; /* should we watch the whole subtree? */
1659 unsigned int filter; /* things to watch */
1660 @END
1663 /* Create a waitable timer */
1664 @REQ(create_timer)
1665 unsigned int access; /* wanted access rights */
1666 unsigned int attributes; /* object attributes */
1667 obj_handle_t rootdir; /* root directory */
1668 int manual; /* manual reset */
1669 VARARG(name,unicode_str); /* object name */
1670 @REPLY
1671 obj_handle_t handle; /* handle to the timer */
1672 @END
1675 /* Open a waitable timer */
1676 @REQ(open_timer)
1677 unsigned int access; /* wanted access rights */
1678 unsigned int attributes; /* object attributes */
1679 obj_handle_t rootdir; /* root directory */
1680 VARARG(name,unicode_str); /* object name */
1681 @REPLY
1682 obj_handle_t handle; /* handle to the timer */
1683 @END
1685 /* Set a waitable timer */
1686 @REQ(set_timer)
1687 obj_handle_t handle; /* handle to the timer */
1688 timeout_t expire; /* next expiration absolute time */
1689 client_ptr_t callback; /* callback function */
1690 client_ptr_t arg; /* callback argument */
1691 int period; /* timer period in ms */
1692 @REPLY
1693 int signaled; /* was the timer signaled before this call ? */
1694 @END
1696 /* Cancel a waitable timer */
1697 @REQ(cancel_timer)
1698 obj_handle_t handle; /* handle to the timer */
1699 @REPLY
1700 int signaled; /* was the timer signaled before this calltime ? */
1701 @END
1703 /* Get information on a waitable timer */
1704 @REQ(get_timer_info)
1705 obj_handle_t handle; /* handle to the timer */
1706 @REPLY
1707 timeout_t when; /* absolute time when the timer next expires */
1708 int signaled; /* is the timer signaled? */
1709 @END
1712 /* Retrieve the current context of a thread */
1713 @REQ(get_thread_context)
1714 obj_handle_t handle; /* thread handle */
1715 unsigned int flags; /* context flags */
1716 int suspend; /* if getting context during suspend */
1717 @REPLY
1718 int self; /* was it a handle to the current thread? */
1719 VARARG(context,context); /* thread context */
1720 @END
1723 /* Set the current context of a thread */
1724 @REQ(set_thread_context)
1725 obj_handle_t handle; /* thread handle */
1726 unsigned int flags; /* context flags */
1727 int suspend; /* if setting context during suspend */
1728 VARARG(context,context); /* thread context */
1729 @REPLY
1730 int self; /* was it a handle to the current thread? */
1731 @END
1734 /* Fetch a selector entry for a thread */
1735 @REQ(get_selector_entry)
1736 obj_handle_t handle; /* thread handle */
1737 int entry; /* LDT entry */
1738 @REPLY
1739 unsigned int base; /* selector base */
1740 unsigned int limit; /* selector limit */
1741 unsigned char flags; /* selector flags */
1742 @END
1745 /* Add an atom */
1746 @REQ(add_atom)
1747 obj_handle_t table; /* which table to add atom to */
1748 VARARG(name,unicode_str); /* atom name */
1749 @REPLY
1750 atom_t atom; /* resulting atom */
1751 @END
1754 /* Delete an atom */
1755 @REQ(delete_atom)
1756 obj_handle_t table; /* which table to delete atom from */
1757 atom_t atom; /* atom handle */
1758 @END
1761 /* Find an atom */
1762 @REQ(find_atom)
1763 obj_handle_t table; /* which table to find atom from */
1764 VARARG(name,unicode_str); /* atom name */
1765 @REPLY
1766 atom_t atom; /* atom handle */
1767 @END
1770 /* Get information about an atom */
1771 @REQ(get_atom_information)
1772 obj_handle_t table; /* which table to find atom from */
1773 atom_t atom; /* atom handle */
1774 @REPLY
1775 int count; /* atom lock count */
1776 int pinned; /* whether the atom has been pinned */
1777 data_size_t total; /* actual length of atom name */
1778 VARARG(name,unicode_str); /* atom name */
1779 @END
1782 /* Set information about an atom */
1783 @REQ(set_atom_information)
1784 obj_handle_t table; /* which table to find atom from */
1785 atom_t atom; /* atom handle */
1786 int pinned; /* whether to bump atom information */
1787 @END
1790 /* Empty an atom table */
1791 @REQ(empty_atom_table)
1792 obj_handle_t table; /* which table to find atom from */
1793 int if_pinned; /* whether to delete pinned atoms */
1794 @END
1797 /* Init an atom table */
1798 @REQ(init_atom_table)
1799 int entries; /* number of entries (only for local) */
1800 @REPLY
1801 obj_handle_t table; /* handle to the atom table */
1802 @END
1805 /* Get the message queue of the current thread */
1806 @REQ(get_msg_queue)
1807 @REPLY
1808 obj_handle_t handle; /* handle to the queue */
1809 @END
1812 /* Set the file descriptor associated to the current thread queue */
1813 @REQ(set_queue_fd)
1814 obj_handle_t handle; /* handle to the file descriptor */
1815 @END
1818 /* Set the current message queue wakeup mask */
1819 @REQ(set_queue_mask)
1820 unsigned int wake_mask; /* wakeup bits mask */
1821 unsigned int changed_mask; /* changed bits mask */
1822 int skip_wait; /* will we skip waiting if signaled? */
1823 @REPLY
1824 unsigned int wake_bits; /* current wake bits */
1825 unsigned int changed_bits; /* current changed bits */
1826 @END
1829 /* Get the current message queue status */
1830 @REQ(get_queue_status)
1831 int clear; /* should we clear the change bits? */
1832 @REPLY
1833 unsigned int wake_bits; /* wake bits */
1834 unsigned int changed_bits; /* changed bits since last time */
1835 @END
1838 /* Retrieve the process idle event */
1839 @REQ(get_process_idle_event)
1840 obj_handle_t handle; /* process handle */
1841 @REPLY
1842 obj_handle_t event; /* handle to idle event */
1843 @END
1846 /* Send a message to a thread queue */
1847 @REQ(send_message)
1848 thread_id_t id; /* thread id */
1849 int type; /* message type (see below) */
1850 int flags; /* message flags (see below) */
1851 user_handle_t win; /* window handle */
1852 unsigned int msg; /* message code */
1853 lparam_t wparam; /* parameters */
1854 lparam_t lparam; /* parameters */
1855 timeout_t timeout; /* timeout for reply */
1856 VARARG(data,message_data); /* message data for sent messages */
1857 @END
1859 @REQ(post_quit_message)
1860 int exit_code; /* exit code to return */
1861 @END
1863 enum message_type
1865 MSG_ASCII, /* Ascii message (from SendMessageA) */
1866 MSG_UNICODE, /* Unicode message (from SendMessageW) */
1867 MSG_NOTIFY, /* notify message (from SendNotifyMessageW), always Unicode */
1868 MSG_CALLBACK, /* callback message (from SendMessageCallbackW), always Unicode */
1869 MSG_CALLBACK_RESULT,/* result of a callback message */
1870 MSG_OTHER_PROCESS, /* sent from other process, may include vararg data, always Unicode */
1871 MSG_POSTED, /* posted message (from PostMessageW), always Unicode */
1872 MSG_HARDWARE, /* hardware message */
1873 MSG_WINEVENT /* winevent message */
1875 #define SEND_MSG_ABORT_IF_HUNG 0x01
1878 /* Send a hardware message to a thread queue */
1879 @REQ(send_hardware_message)
1880 thread_id_t id; /* thread id */
1881 user_handle_t win; /* window handle */
1882 unsigned int msg; /* message code */
1883 lparam_t wparam; /* parameters */
1884 lparam_t lparam; /* parameters */
1885 lparam_t info; /* extra info */
1886 int x; /* x position */
1887 int y; /* y position */
1888 unsigned int time; /* message time */
1889 @END
1892 /* Get a message from the current queue */
1893 @REQ(get_message)
1894 unsigned int flags; /* PM_* flags */
1895 user_handle_t get_win; /* window handle to get */
1896 unsigned int get_first; /* first message code to get */
1897 unsigned int get_last; /* last message code to get */
1898 unsigned int hw_id; /* id of the previous hardware message (or 0) */
1899 unsigned int wake_mask; /* wakeup bits mask */
1900 unsigned int changed_mask; /* changed bits mask */
1901 @REPLY
1902 user_handle_t win; /* window handle */
1903 unsigned int msg; /* message code */
1904 lparam_t wparam; /* parameters */
1905 lparam_t lparam; /* parameters */
1906 int type; /* message type */
1907 unsigned int time; /* message time */
1908 unsigned int active_hooks; /* active hooks bitmap */
1909 data_size_t total; /* total size of extra data */
1910 VARARG(data,message_data); /* message data for sent messages */
1911 @END
1914 /* Reply to a sent message */
1915 @REQ(reply_message)
1916 int remove; /* should we remove the message? */
1917 lparam_t result; /* message result */
1918 VARARG(data,bytes); /* message data for sent messages */
1919 @END
1922 /* Accept the current hardware message */
1923 @REQ(accept_hardware_message)
1924 unsigned int hw_id; /* id of the hardware message */
1925 int remove; /* should we remove the message? */
1926 user_handle_t new_win; /* new destination window for current message */
1927 @END
1930 /* Retrieve the reply for the last message sent */
1931 @REQ(get_message_reply)
1932 int cancel; /* cancel message if not ready? */
1933 @REPLY
1934 lparam_t result; /* message result */
1935 VARARG(data,bytes); /* message data for sent messages */
1936 @END
1939 /* Set a window timer */
1940 @REQ(set_win_timer)
1941 user_handle_t win; /* window handle */
1942 unsigned int msg; /* message to post */
1943 unsigned int rate; /* timer rate in ms */
1944 lparam_t id; /* timer id */
1945 lparam_t lparam; /* message lparam (callback proc) */
1946 @REPLY
1947 lparam_t id; /* timer id */
1948 @END
1951 /* Kill a window timer */
1952 @REQ(kill_win_timer)
1953 user_handle_t win; /* window handle */
1954 lparam_t id; /* timer id */
1955 unsigned int msg; /* message to post */
1956 @END
1959 /* check if the thread owning the window is hung */
1960 @REQ(is_window_hung)
1961 user_handle_t win; /* window handle */
1962 @REPLY
1963 int is_hung;
1964 @END
1967 /* Retrieve info about a serial port */
1968 @REQ(get_serial_info)
1969 obj_handle_t handle; /* handle to comm port */
1970 @REPLY
1971 unsigned int readinterval;
1972 unsigned int readconst;
1973 unsigned int readmult;
1974 unsigned int writeconst;
1975 unsigned int writemult;
1976 unsigned int eventmask;
1977 @END
1980 /* Set info about a serial port */
1981 @REQ(set_serial_info)
1982 obj_handle_t handle; /* handle to comm port */
1983 int flags; /* bitmask to set values (see below) */
1984 unsigned int readinterval;
1985 unsigned int readconst;
1986 unsigned int readmult;
1987 unsigned int writeconst;
1988 unsigned int writemult;
1989 unsigned int eventmask;
1990 @END
1991 #define SERIALINFO_SET_TIMEOUTS 0x01
1992 #define SERIALINFO_SET_MASK 0x02
1995 /* Create an async I/O */
1996 @REQ(register_async)
1997 int type; /* type of queue to look after */
1998 async_data_t async; /* async I/O parameters */
1999 int count; /* count - usually # of bytes to be read/written */
2000 @END
2001 #define ASYNC_TYPE_READ 0x01
2002 #define ASYNC_TYPE_WRITE 0x02
2003 #define ASYNC_TYPE_WAIT 0x03
2006 /* Cancel all async op on a fd */
2007 @REQ(cancel_async)
2008 obj_handle_t handle; /* handle to comm port, socket or file */
2009 @END
2012 /* Perform an ioctl on a file */
2013 @REQ(ioctl)
2014 ioctl_code_t code; /* ioctl code */
2015 async_data_t async; /* async I/O parameters */
2016 int blocking; /* whether it's a blocking ioctl */
2017 VARARG(in_data,bytes); /* ioctl input data */
2018 @REPLY
2019 obj_handle_t wait; /* handle to wait on for blocking ioctl */
2020 unsigned int options; /* device open options */
2021 VARARG(out_data,bytes); /* ioctl output data */
2022 @END
2025 /* Retrieve results of an async ioctl */
2026 @REQ(get_ioctl_result)
2027 obj_handle_t handle; /* handle to the device */
2028 client_ptr_t user_arg; /* user arg used to identify the request */
2029 @REPLY
2030 VARARG(out_data,bytes); /* ioctl output data */
2031 @END
2034 /* Create a named pipe */
2035 @REQ(create_named_pipe)
2036 unsigned int access;
2037 unsigned int attributes; /* object attributes */
2038 obj_handle_t rootdir; /* root directory */
2039 unsigned int options;
2040 unsigned int maxinstances;
2041 unsigned int outsize;
2042 unsigned int insize;
2043 timeout_t timeout;
2044 unsigned int flags;
2045 VARARG(name,unicode_str); /* pipe name */
2046 @REPLY
2047 obj_handle_t handle; /* handle to the pipe */
2048 @END
2050 /* flags in create_named_pipe and get_named_pipe_info */
2051 #define NAMED_PIPE_MESSAGE_STREAM_WRITE 0x0001
2052 #define NAMED_PIPE_MESSAGE_STREAM_READ 0x0002
2053 #define NAMED_PIPE_NONBLOCKING_MODE 0x0004
2054 #define NAMED_PIPE_SERVER_END 0x8000
2057 @REQ(get_named_pipe_info)
2058 obj_handle_t handle;
2059 @REPLY
2060 unsigned int flags;
2061 unsigned int maxinstances;
2062 unsigned int instances;
2063 unsigned int outsize;
2064 unsigned int insize;
2065 @END
2068 /* Create a window */
2069 @REQ(create_window)
2070 user_handle_t parent; /* parent window */
2071 user_handle_t owner; /* owner window */
2072 atom_t atom; /* class atom */
2073 mod_handle_t instance; /* module instance */
2074 VARARG(class,unicode_str); /* class name */
2075 @REPLY
2076 user_handle_t handle; /* created window */
2077 user_handle_t parent; /* full handle of parent */
2078 user_handle_t owner; /* full handle of owner */
2079 int extra; /* number of extra bytes */
2080 client_ptr_t class_ptr; /* pointer to class in client address space */
2081 @END
2084 /* Destroy a window */
2085 @REQ(destroy_window)
2086 user_handle_t handle; /* handle to the window */
2087 @END
2090 /* Retrieve the desktop window for the current thread */
2091 @REQ(get_desktop_window)
2092 int force; /* force creation if it doesn't exist */
2093 @REPLY
2094 user_handle_t top_window; /* handle to the desktop window */
2095 user_handle_t msg_window; /* handle to the top-level HWND_MESSAGE parent */
2096 @END
2099 /* Set a window owner */
2100 @REQ(set_window_owner)
2101 user_handle_t handle; /* handle to the window */
2102 user_handle_t owner; /* new owner */
2103 @REPLY
2104 user_handle_t full_owner; /* full handle of new owner */
2105 user_handle_t prev_owner; /* full handle of previous owner */
2106 @END
2109 /* Get information from a window handle */
2110 @REQ(get_window_info)
2111 user_handle_t handle; /* handle to the window */
2112 @REPLY
2113 user_handle_t full_handle; /* full 32-bit handle */
2114 user_handle_t last_active; /* last active popup */
2115 process_id_t pid; /* process owning the window */
2116 thread_id_t tid; /* thread owning the window */
2117 atom_t atom; /* class atom */
2118 int is_unicode; /* ANSI or unicode */
2119 @END
2122 /* Set some information in a window */
2123 @REQ(set_window_info)
2124 unsigned short flags; /* flags for fields to set (see below) */
2125 short int is_unicode; /* ANSI or unicode */
2126 user_handle_t handle; /* handle to the window */
2127 unsigned int style; /* window style */
2128 unsigned int ex_style; /* window extended style */
2129 unsigned int id; /* window id */
2130 mod_handle_t instance; /* creator instance */
2131 lparam_t user_data; /* user-specific data */
2132 int extra_offset; /* offset to set in extra bytes */
2133 data_size_t extra_size; /* size to set in extra bytes */
2134 lparam_t extra_value; /* value to set in extra bytes */
2135 @REPLY
2136 unsigned int old_style; /* old window style */
2137 unsigned int old_ex_style; /* old window extended style */
2138 mod_handle_t old_instance; /* old creator instance */
2139 lparam_t old_user_data; /* old user-specific data */
2140 lparam_t old_extra_value; /* old value in extra bytes */
2141 unsigned int old_id; /* old window id */
2142 @END
2143 #define SET_WIN_STYLE 0x01
2144 #define SET_WIN_EXSTYLE 0x02
2145 #define SET_WIN_ID 0x04
2146 #define SET_WIN_INSTANCE 0x08
2147 #define SET_WIN_USERDATA 0x10
2148 #define SET_WIN_EXTRA 0x20
2149 #define SET_WIN_UNICODE 0x40
2152 /* Set the parent of a window */
2153 @REQ(set_parent)
2154 user_handle_t handle; /* handle to the window */
2155 user_handle_t parent; /* handle to the parent */
2156 @REPLY
2157 user_handle_t old_parent; /* old parent window */
2158 user_handle_t full_parent; /* full handle of new parent */
2159 @END
2162 /* Get a list of the window parents, up to the root of the tree */
2163 @REQ(get_window_parents)
2164 user_handle_t handle; /* handle to the window */
2165 @REPLY
2166 int count; /* total count of parents */
2167 VARARG(parents,user_handles); /* parent handles */
2168 @END
2171 /* Get a list of the window children */
2172 @REQ(get_window_children)
2173 obj_handle_t desktop; /* handle to desktop */
2174 user_handle_t parent; /* parent window */
2175 atom_t atom; /* class atom for the listed children */
2176 thread_id_t tid; /* thread owning the listed children */
2177 VARARG(class,unicode_str); /* class name */
2178 @REPLY
2179 int count; /* total count of children */
2180 VARARG(children,user_handles); /* children handles */
2181 @END
2184 /* Get a list of the window children that contain a given point */
2185 @REQ(get_window_children_from_point)
2186 user_handle_t parent; /* parent window */
2187 int x; /* point in parent coordinates */
2188 int y;
2189 @REPLY
2190 int count; /* total count of children */
2191 VARARG(children,user_handles); /* children handles */
2192 @END
2195 /* Get window tree information from a window handle */
2196 @REQ(get_window_tree)
2197 user_handle_t handle; /* handle to the window */
2198 @REPLY
2199 user_handle_t parent; /* parent window */
2200 user_handle_t owner; /* owner window */
2201 user_handle_t next_sibling; /* next sibling in Z-order */
2202 user_handle_t prev_sibling; /* prev sibling in Z-order */
2203 user_handle_t first_sibling; /* first sibling in Z-order */
2204 user_handle_t last_sibling; /* last sibling in Z-order */
2205 user_handle_t first_child; /* first child */
2206 user_handle_t last_child; /* last child */
2207 @END
2209 /* Set the position and Z order of a window */
2210 @REQ(set_window_pos)
2211 unsigned int flags; /* SWP_* flags */
2212 user_handle_t handle; /* handle to the window */
2213 user_handle_t previous; /* previous window in Z order */
2214 rectangle_t window; /* window rectangle */
2215 rectangle_t client; /* client rectangle */
2216 VARARG(valid,rectangles); /* valid rectangles from WM_NCCALCSIZE */
2217 @REPLY
2218 unsigned int new_style; /* new window style */
2219 unsigned int new_ex_style; /* new window extended style */
2220 @END
2223 /* Get the window and client rectangles of a window */
2224 @REQ(get_window_rectangles)
2225 user_handle_t handle; /* handle to the window */
2226 @REPLY
2227 rectangle_t window; /* window rectangle */
2228 rectangle_t visible; /* visible part of the window rectangle */
2229 rectangle_t client; /* client rectangle */
2230 @END
2233 /* Get the window text */
2234 @REQ(get_window_text)
2235 user_handle_t handle; /* handle to the window */
2236 @REPLY
2237 VARARG(text,unicode_str); /* window text */
2238 @END
2241 /* Set the window text */
2242 @REQ(set_window_text)
2243 user_handle_t handle; /* handle to the window */
2244 VARARG(text,unicode_str); /* window text */
2245 @END
2248 /* Get the coordinates offset between two windows */
2249 @REQ(get_windows_offset)
2250 user_handle_t from; /* handle to the first window */
2251 user_handle_t to; /* handle to the second window */
2252 @REPLY
2253 int x; /* x coordinate offset */
2254 int y; /* y coordinate offset */
2255 @END
2258 /* Get the visible region of a window */
2259 @REQ(get_visible_region)
2260 user_handle_t window; /* handle to the window */
2261 unsigned int flags; /* DCX flags */
2262 @REPLY
2263 user_handle_t top_win; /* top window to clip against */
2264 rectangle_t top_rect; /* top window visible rect with screen coords */
2265 rectangle_t win_rect; /* window rect in screen coords */
2266 data_size_t total_size; /* total size of the resulting region */
2267 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2268 @END
2271 /* Get the window region */
2272 @REQ(get_window_region)
2273 user_handle_t window; /* handle to the window */
2274 @REPLY
2275 data_size_t total_size; /* total size of the resulting region */
2276 VARARG(region,rectangles); /* list of rectangles for the region */
2277 @END
2280 /* Set the window region */
2281 @REQ(set_window_region)
2282 user_handle_t window; /* handle to the window */
2283 int redraw; /* redraw the window? */
2284 VARARG(region,rectangles); /* list of rectangles for the region */
2285 @END
2288 /* Get the window update region */
2289 @REQ(get_update_region)
2290 user_handle_t window; /* handle to the window */
2291 user_handle_t from_child; /* child to start searching from */
2292 unsigned int flags; /* update flags (see below) */
2293 @REPLY
2294 user_handle_t child; /* child to repaint (or window itself) */
2295 unsigned int flags; /* resulting update flags (see below) */
2296 data_size_t total_size; /* total size of the resulting region */
2297 VARARG(region,rectangles); /* list of rectangles for the region */
2298 @END
2299 #define UPDATE_NONCLIENT 0x01 /* get region for repainting non-client area */
2300 #define UPDATE_ERASE 0x02 /* get region for erasing client area */
2301 #define UPDATE_PAINT 0x04 /* get region for painting client area */
2302 #define UPDATE_INTERNALPAINT 0x08 /* get region if internal paint is pending */
2303 #define UPDATE_ALLCHILDREN 0x10 /* force repaint of all children */
2304 #define UPDATE_NOCHILDREN 0x20 /* don't try to repaint any children */
2305 #define UPDATE_NOREGION 0x40 /* don't return a region, only the flags */
2306 #define UPDATE_DELAYED_ERASE 0x80 /* still needs erase after BeginPaint */
2309 /* Update the z order of a window so that a given rectangle is fully visible */
2310 @REQ(update_window_zorder)
2311 user_handle_t window; /* handle to the window */
2312 rectangle_t rect; /* rectangle that must be visible */
2313 @END
2316 /* Mark parts of a window as needing a redraw */
2317 @REQ(redraw_window)
2318 user_handle_t window; /* handle to the window */
2319 unsigned int flags; /* RDW_* flags */
2320 VARARG(region,rectangles); /* list of rectangles for the region */
2321 @END
2324 /* Set a window property */
2325 @REQ(set_window_property)
2326 user_handle_t window; /* handle to the window */
2327 lparam_t data; /* data to store */
2328 atom_t atom; /* property atom (if no name specified) */
2329 VARARG(name,unicode_str); /* property name */
2330 @END
2333 /* Remove a window property */
2334 @REQ(remove_window_property)
2335 user_handle_t window; /* handle to the window */
2336 atom_t atom; /* property atom (if no name specified) */
2337 VARARG(name,unicode_str); /* property name */
2338 @REPLY
2339 lparam_t data; /* data stored in property */
2340 @END
2343 /* Get a window property */
2344 @REQ(get_window_property)
2345 user_handle_t window; /* handle to the window */
2346 atom_t atom; /* property atom (if no name specified) */
2347 VARARG(name,unicode_str); /* property name */
2348 @REPLY
2349 lparam_t data; /* data stored in property */
2350 @END
2353 /* Get the list of properties of a window */
2354 @REQ(get_window_properties)
2355 user_handle_t window; /* handle to the window */
2356 @REPLY
2357 int total; /* total number of properties */
2358 VARARG(props,properties); /* list of properties */
2359 @END
2362 /* Create a window station */
2363 @REQ(create_winstation)
2364 unsigned int flags; /* window station flags */
2365 unsigned int access; /* wanted access rights */
2366 unsigned int attributes; /* object attributes */
2367 VARARG(name,unicode_str); /* object name */
2368 @REPLY
2369 obj_handle_t handle; /* handle to the window station */
2370 @END
2373 /* Open a handle to a window station */
2374 @REQ(open_winstation)
2375 unsigned int access; /* wanted access rights */
2376 unsigned int attributes; /* object attributes */
2377 VARARG(name,unicode_str); /* object name */
2378 @REPLY
2379 obj_handle_t handle; /* handle to the window station */
2380 @END
2383 /* Close a window station */
2384 @REQ(close_winstation)
2385 obj_handle_t handle; /* handle to the window station */
2386 @END
2389 /* Get the process current window station */
2390 @REQ(get_process_winstation)
2391 @REPLY
2392 obj_handle_t handle; /* handle to the window station */
2393 @END
2396 /* Set the process current window station */
2397 @REQ(set_process_winstation)
2398 obj_handle_t handle; /* handle to the window station */
2399 @END
2402 /* Enumerate window stations */
2403 @REQ(enum_winstation)
2404 unsigned int index; /* current index */
2405 @REPLY
2406 unsigned int next; /* next index */
2407 VARARG(name,unicode_str); /* window station name */
2408 @END
2411 /* Create a desktop */
2412 @REQ(create_desktop)
2413 unsigned int flags; /* desktop flags */
2414 unsigned int access; /* wanted access rights */
2415 unsigned int attributes; /* object attributes */
2416 VARARG(name,unicode_str); /* object name */
2417 @REPLY
2418 obj_handle_t handle; /* handle to the desktop */
2419 @END
2422 /* Open a handle to a desktop */
2423 @REQ(open_desktop)
2424 obj_handle_t winsta; /* window station to open (null allowed) */
2425 unsigned int flags; /* desktop flags */
2426 unsigned int access; /* wanted access rights */
2427 unsigned int attributes; /* object attributes */
2428 VARARG(name,unicode_str); /* object name */
2429 @REPLY
2430 obj_handle_t handle; /* handle to the desktop */
2431 @END
2434 /* Close a desktop */
2435 @REQ(close_desktop)
2436 obj_handle_t handle; /* handle to the desktop */
2437 @END
2440 /* Get the thread current desktop */
2441 @REQ(get_thread_desktop)
2442 thread_id_t tid; /* thread id */
2443 @REPLY
2444 obj_handle_t handle; /* handle to the desktop */
2445 @END
2448 /* Set the thread current desktop */
2449 @REQ(set_thread_desktop)
2450 obj_handle_t handle; /* handle to the desktop */
2451 @END
2454 /* Enumerate desktops */
2455 @REQ(enum_desktop)
2456 obj_handle_t winstation; /* handle to the window station */
2457 unsigned int index; /* current index */
2458 @REPLY
2459 unsigned int next; /* next index */
2460 VARARG(name,unicode_str); /* window station name */
2461 @END
2464 /* Get/set information about a user object (window station or desktop) */
2465 @REQ(set_user_object_info)
2466 obj_handle_t handle; /* handle to the object */
2467 unsigned int flags; /* information to set */
2468 unsigned int obj_flags; /* new object flags */
2469 @REPLY
2470 int is_desktop; /* is object a desktop? */
2471 unsigned int old_obj_flags; /* old object flags */
2472 VARARG(name,unicode_str); /* object name */
2473 @END
2474 #define SET_USER_OBJECT_FLAGS 1
2477 /* Attach (or detach) thread inputs */
2478 @REQ(attach_thread_input)
2479 thread_id_t tid_from; /* thread to be attached */
2480 thread_id_t tid_to; /* thread to which tid_from should be attached */
2481 int attach; /* is it an attach? */
2482 @END
2485 /* Get input data for a given thread */
2486 @REQ(get_thread_input)
2487 thread_id_t tid; /* id of thread */
2488 @REPLY
2489 user_handle_t focus; /* handle to the focus window */
2490 user_handle_t capture; /* handle to the capture window */
2491 user_handle_t active; /* handle to the active window */
2492 user_handle_t foreground; /* handle to the global foreground window */
2493 user_handle_t menu_owner; /* handle to the menu owner */
2494 user_handle_t move_size; /* handle to the moving/resizing window */
2495 user_handle_t caret; /* handle to the caret window */
2496 rectangle_t rect; /* caret rectangle */
2497 @END
2500 /* Get the time of the last input event */
2501 @REQ(get_last_input_time)
2502 @REPLY
2503 unsigned int time;
2504 @END
2507 /* Retrieve queue keyboard state for a given thread */
2508 @REQ(get_key_state)
2509 thread_id_t tid; /* id of thread */
2510 int key; /* optional key code or -1 */
2511 @REPLY
2512 unsigned char state; /* state of specified key */
2513 VARARG(keystate,bytes); /* state array for all the keys */
2514 @END
2516 /* Set queue keyboard state for a given thread */
2517 @REQ(set_key_state)
2518 thread_id_t tid; /* id of thread */
2519 VARARG(keystate,bytes); /* state array for all the keys */
2520 @END
2522 /* Set the system foreground window */
2523 @REQ(set_foreground_window)
2524 user_handle_t handle; /* handle to the foreground window */
2525 @REPLY
2526 user_handle_t previous; /* handle to the previous foreground window */
2527 int send_msg_old; /* whether we have to send a msg to the old window */
2528 int send_msg_new; /* whether we have to send a msg to the new window */
2529 @END
2531 /* Set the current thread focus window */
2532 @REQ(set_focus_window)
2533 user_handle_t handle; /* handle to the focus window */
2534 @REPLY
2535 user_handle_t previous; /* handle to the previous focus window */
2536 @END
2538 /* Set the current thread active window */
2539 @REQ(set_active_window)
2540 user_handle_t handle; /* handle to the active window */
2541 @REPLY
2542 user_handle_t previous; /* handle to the previous active window */
2543 @END
2545 /* Set the current thread capture window */
2546 @REQ(set_capture_window)
2547 user_handle_t handle; /* handle to the capture window */
2548 unsigned int flags; /* capture flags (see below) */
2549 @REPLY
2550 user_handle_t previous; /* handle to the previous capture window */
2551 user_handle_t full_handle; /* full 32-bit handle of new capture window */
2552 @END
2553 #define CAPTURE_MENU 0x01 /* capture is for a menu */
2554 #define CAPTURE_MOVESIZE 0x02 /* capture is for moving/resizing */
2557 /* Set the current thread caret window */
2558 @REQ(set_caret_window)
2559 user_handle_t handle; /* handle to the caret window */
2560 int width; /* caret width */
2561 int height; /* caret height */
2562 @REPLY
2563 user_handle_t previous; /* handle to the previous caret window */
2564 rectangle_t old_rect; /* previous caret rectangle */
2565 int old_hide; /* previous hide count */
2566 int old_state; /* previous caret state (1=on, 0=off) */
2567 @END
2570 /* Set the current thread caret information */
2571 @REQ(set_caret_info)
2572 unsigned int flags; /* caret flags (see below) */
2573 user_handle_t handle; /* handle to the caret window */
2574 int x; /* caret x position */
2575 int y; /* caret y position */
2576 int hide; /* increment for hide count (can be negative to show it) */
2577 int state; /* caret state (1=on, 0=off, -1=toggle current state) */
2578 @REPLY
2579 user_handle_t full_handle; /* handle to the current caret window */
2580 rectangle_t old_rect; /* previous caret rectangle */
2581 int old_hide; /* previous hide count */
2582 int old_state; /* previous caret state (1=on, 0=off) */
2583 @END
2584 #define SET_CARET_POS 0x01 /* set the caret position from x,y */
2585 #define SET_CARET_HIDE 0x02 /* increment the caret hide count */
2586 #define SET_CARET_STATE 0x04 /* set the caret on/off state */
2589 /* Set a window hook */
2590 @REQ(set_hook)
2591 int id; /* id of the hook */
2592 process_id_t pid; /* id of process to set the hook into */
2593 thread_id_t tid; /* id of thread to set the hook into */
2594 int event_min;
2595 int event_max;
2596 client_ptr_t proc; /* hook procedure */
2597 int flags;
2598 int unicode; /* is it a unicode hook? */
2599 VARARG(module,unicode_str); /* module name */
2600 @REPLY
2601 user_handle_t handle; /* handle to the hook */
2602 unsigned int active_hooks; /* active hooks bitmap */
2603 @END
2606 /* Remove a window hook */
2607 @REQ(remove_hook)
2608 user_handle_t handle; /* handle to the hook */
2609 client_ptr_t proc; /* hook procedure if handle is 0 */
2610 int id; /* id of the hook if handle is 0 */
2611 @REPLY
2612 unsigned int active_hooks; /* active hooks bitmap */
2613 @END
2616 /* Start calling a hook chain */
2617 @REQ(start_hook_chain)
2618 int id; /* id of the hook */
2619 int event; /* signalled event */
2620 user_handle_t window; /* handle to the event window */
2621 int object_id; /* object id for out of context winevent */
2622 int child_id; /* child id for out of context winevent */
2623 @REPLY
2624 user_handle_t handle; /* handle to the next hook */
2625 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2626 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2627 int unicode; /* is it a unicode hook? */
2628 client_ptr_t proc; /* hook procedure */
2629 unsigned int active_hooks; /* active hooks bitmap */
2630 VARARG(module,unicode_str); /* module name */
2631 @END
2634 /* Finished calling a hook chain */
2635 @REQ(finish_hook_chain)
2636 int id; /* id of the hook */
2637 @END
2640 /* Get the hook information */
2641 @REQ(get_hook_info)
2642 user_handle_t handle; /* handle to the current hook */
2643 int get_next; /* do we want info about current or next hook? */
2644 int event; /* signalled event */
2645 user_handle_t window; /* handle to the event window */
2646 int object_id; /* object id for out of context winevent */
2647 int child_id; /* child id for out of context winevent */
2648 @REPLY
2649 user_handle_t handle; /* handle to the hook */
2650 int id; /* id of the hook */
2651 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2652 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2653 client_ptr_t proc; /* hook procedure */
2654 int unicode; /* is it a unicode hook? */
2655 VARARG(module,unicode_str); /* module name */
2656 @END
2659 /* Create a window class */
2660 @REQ(create_class)
2661 int local; /* is it a local class? */
2662 atom_t atom; /* class atom */
2663 unsigned int style; /* class style */
2664 mod_handle_t instance; /* module instance */
2665 int extra; /* number of extra class bytes */
2666 int win_extra; /* number of window extra bytes */
2667 client_ptr_t client_ptr; /* pointer to class in client address space */
2668 VARARG(name,unicode_str); /* class name */
2669 @REPLY
2670 atom_t atom; /* resulting class atom */
2671 @END
2674 /* Destroy a window class */
2675 @REQ(destroy_class)
2676 atom_t atom; /* class atom */
2677 mod_handle_t instance; /* module instance */
2678 VARARG(name,unicode_str); /* class name */
2679 @REPLY
2680 client_ptr_t client_ptr; /* pointer to class in client address space */
2681 @END
2684 /* Set some information in a class */
2685 @REQ(set_class_info)
2686 user_handle_t window; /* handle to the window */
2687 unsigned int flags; /* flags for info to set (see below) */
2688 atom_t atom; /* class atom */
2689 unsigned int style; /* class style */
2690 int win_extra; /* number of window extra bytes */
2691 mod_handle_t instance; /* module instance */
2692 int extra_offset; /* offset to set in extra bytes */
2693 data_size_t extra_size; /* size to set in extra bytes */
2694 lparam_t extra_value; /* value to set in extra bytes */
2695 @REPLY
2696 atom_t old_atom; /* previous class atom */
2697 unsigned int old_style; /* previous class style */
2698 int old_extra; /* previous number of class extra bytes */
2699 int old_win_extra; /* previous number of window extra bytes */
2700 mod_handle_t old_instance; /* previous module instance */
2701 lparam_t old_extra_value; /* old value in extra bytes */
2702 @END
2703 #define SET_CLASS_ATOM 0x0001
2704 #define SET_CLASS_STYLE 0x0002
2705 #define SET_CLASS_WINEXTRA 0x0004
2706 #define SET_CLASS_INSTANCE 0x0008
2707 #define SET_CLASS_EXTRA 0x0010
2710 /* Set/get clipboard information */
2711 @REQ(set_clipboard_info)
2712 unsigned int flags; /* flags for fields to set (see below) */
2713 user_handle_t clipboard; /* clipboard window */
2714 user_handle_t owner; /* clipboard owner */
2715 user_handle_t viewer; /* first clipboard viewer */
2716 unsigned int seqno; /* change sequence number */
2717 @REPLY
2718 unsigned int flags; /* status flags (see below) */
2719 user_handle_t old_clipboard; /* old clipboard window */
2720 user_handle_t old_owner; /* old clipboard owner */
2721 user_handle_t old_viewer; /* old clipboard viewer */
2722 unsigned int seqno; /* current sequence number */
2723 @END
2725 #define SET_CB_OPEN 0x001
2726 #define SET_CB_OWNER 0x002
2727 #define SET_CB_VIEWER 0x004
2728 #define SET_CB_SEQNO 0x008
2729 #define SET_CB_RELOWNER 0x010
2730 #define SET_CB_CLOSE 0x020
2731 #define CB_OPEN 0x040
2732 #define CB_OWNER 0x080
2733 #define CB_PROCESS 0x100
2736 /* Open a security token */
2737 @REQ(open_token)
2738 obj_handle_t handle; /* handle to the thread or process */
2739 unsigned int access; /* access rights to the new token */
2740 unsigned int attributes;/* object attributes */
2741 unsigned int flags; /* flags (see below) */
2742 @REPLY
2743 obj_handle_t token; /* handle to the token */
2744 @END
2745 #define OPEN_TOKEN_THREAD 1
2746 #define OPEN_TOKEN_AS_SELF 2
2749 /* Set/get the global windows */
2750 @REQ(set_global_windows)
2751 unsigned int flags; /* flags for fields to set (see below) */
2752 user_handle_t shell_window; /* handle to the new shell window */
2753 user_handle_t shell_listview; /* handle to the new shell listview window */
2754 user_handle_t progman_window; /* handle to the new program manager window */
2755 user_handle_t taskman_window; /* handle to the new task manager window */
2756 @REPLY
2757 user_handle_t old_shell_window; /* handle to the shell window */
2758 user_handle_t old_shell_listview; /* handle to the shell listview window */
2759 user_handle_t old_progman_window; /* handle to the new program manager window */
2760 user_handle_t old_taskman_window; /* handle to the new task manager window */
2761 @END
2762 #define SET_GLOBAL_SHELL_WINDOWS 0x01 /* set both main shell and listview windows */
2763 #define SET_GLOBAL_PROGMAN_WINDOW 0x02
2764 #define SET_GLOBAL_TASKMAN_WINDOW 0x04
2766 /* Adjust the privileges held by a token */
2767 @REQ(adjust_token_privileges)
2768 obj_handle_t handle; /* handle to the token */
2769 int disable_all; /* disable all privileges? */
2770 int get_modified_state; /* get modified privileges? */
2771 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to enable/disable/remove */
2772 @REPLY
2773 unsigned int len; /* total length in bytes required to store token privileges */
2774 VARARG(privileges,LUID_AND_ATTRIBUTES); /* modified privileges */
2775 @END
2777 /* Retrieves the set of privileges held by or available to a token */
2778 @REQ(get_token_privileges)
2779 obj_handle_t handle; /* handle to the token */
2780 @REPLY
2781 unsigned int len; /* total length in bytes required to store token privileges */
2782 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
2783 @END
2785 /* Check the token has the required privileges */
2786 @REQ(check_token_privileges)
2787 obj_handle_t handle; /* handle to the token */
2788 int all_required; /* are all the privileges required for the check to succeed? */
2789 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to check */
2790 @REPLY
2791 int has_privileges; /* does the token have the required privileges? */
2792 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
2793 @END
2795 @REQ(duplicate_token)
2796 obj_handle_t handle; /* handle to the token to duplicate */
2797 unsigned int access; /* access rights to the new token */
2798 unsigned int attributes; /* object attributes */
2799 int primary; /* is the new token to be a primary one? */
2800 int impersonation_level; /* impersonation level of the new token */
2801 @REPLY
2802 obj_handle_t new_handle; /* duplicated handle */
2803 @END
2805 @REQ(access_check)
2806 obj_handle_t handle; /* handle to the token */
2807 unsigned int desired_access; /* desired access to the object */
2808 unsigned int mapping_read; /* mapping from generic read to specific rights */
2809 unsigned int mapping_write; /* mapping from generic write to specific rights */
2810 unsigned int mapping_execute; /* mapping from generic execute to specific rights */
2811 unsigned int mapping_all; /* mapping from generic all to specific rights */
2812 VARARG(sd,security_descriptor); /* security descriptor to check */
2813 @REPLY
2814 unsigned int access_granted; /* access rights actually granted */
2815 unsigned int access_status; /* was access granted? */
2816 unsigned int privileges_len; /* length needed to store privileges */
2817 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges used during access check */
2818 @END
2820 @REQ(get_token_user)
2821 obj_handle_t handle; /* handle to the token */
2822 @REPLY
2823 data_size_t user_len; /* length needed to store user */
2824 VARARG(user,SID); /* sid of the user the token represents */
2825 @END
2827 @REQ(get_token_groups)
2828 obj_handle_t handle; /* handle to the token */
2829 @REPLY
2830 data_size_t user_len; /* length needed to store user */
2831 VARARG(user,token_groups); /* groups the token's user belongs to */
2832 @END
2834 @REQ(set_security_object)
2835 obj_handle_t handle; /* handle to the object */
2836 unsigned int security_info; /* which parts of security descriptor to set */
2837 VARARG(sd,security_descriptor); /* security descriptor to set */
2838 @END
2840 @REQ(get_security_object)
2841 obj_handle_t handle; /* handle to the object */
2842 unsigned int security_info; /* which parts of security descriptor to get */
2843 @REPLY
2844 unsigned int sd_len; /* buffer size needed for sd */
2845 VARARG(sd,security_descriptor); /* retrieved security descriptor */
2846 @END
2848 /* Create a mailslot */
2849 @REQ(create_mailslot)
2850 unsigned int access; /* wanted access rights */
2851 unsigned int attributes; /* object attributes */
2852 obj_handle_t rootdir; /* root directory */
2853 timeout_t read_timeout;
2854 unsigned int max_msgsize;
2855 VARARG(name,unicode_str); /* mailslot name */
2856 @REPLY
2857 obj_handle_t handle; /* handle to the mailslot */
2858 @END
2861 /* Set mailslot information */
2862 @REQ(set_mailslot_info)
2863 obj_handle_t handle; /* handle to the mailslot */
2864 timeout_t read_timeout;
2865 unsigned int flags;
2866 @REPLY
2867 timeout_t read_timeout;
2868 unsigned int max_msgsize;
2869 @END
2870 #define MAILSLOT_SET_READ_TIMEOUT 1
2873 /* Create a directory object */
2874 @REQ(create_directory)
2875 unsigned int access; /* access flags */
2876 unsigned int attributes; /* object attributes */
2877 obj_handle_t rootdir; /* root directory */
2878 VARARG(directory_name,unicode_str); /* Directory name */
2879 @REPLY
2880 obj_handle_t handle; /* handle to the directory */
2881 @END
2884 /* Open a directory object */
2885 @REQ(open_directory)
2886 unsigned int access; /* access flags */
2887 unsigned int attributes; /* object attributes */
2888 obj_handle_t rootdir; /* root directory */
2889 VARARG(directory_name,unicode_str); /* Directory name */
2890 @REPLY
2891 obj_handle_t handle; /* handle to the directory */
2892 @END
2895 /* Get a directory entry by index */
2896 @REQ(get_directory_entry)
2897 obj_handle_t handle; /* handle to the directory */
2898 unsigned int index; /* entry index */
2899 @REPLY
2900 data_size_t name_len; /* length of the entry name in bytes */
2901 VARARG(name,unicode_str,name_len); /* entry name */
2902 VARARG(type,unicode_str); /* entry type */
2903 @END
2906 /* Create a symbolic link object */
2907 @REQ(create_symlink)
2908 unsigned int access; /* access flags */
2909 unsigned int attributes; /* object attributes */
2910 obj_handle_t rootdir; /* root directory */
2911 data_size_t name_len; /* length of the symlink name in bytes */
2912 VARARG(name,unicode_str,name_len); /* symlink name */
2913 VARARG(target_name,unicode_str); /* target name */
2914 @REPLY
2915 obj_handle_t handle; /* handle to the symlink */
2916 @END
2919 /* Open a symbolic link object */
2920 @REQ(open_symlink)
2921 unsigned int access; /* access flags */
2922 unsigned int attributes; /* object attributes */
2923 obj_handle_t rootdir; /* root directory */
2924 VARARG(name,unicode_str); /* symlink name */
2925 @REPLY
2926 obj_handle_t handle; /* handle to the symlink */
2927 @END
2930 /* Query a symbolic link object */
2931 @REQ(query_symlink)
2932 obj_handle_t handle; /* handle to the symlink */
2933 @REPLY
2934 VARARG(target_name,unicode_str); /* target name */
2935 @END
2938 /* Query basic object information */
2939 @REQ(get_object_info)
2940 obj_handle_t handle; /* handle to the object */
2941 @REPLY
2942 unsigned int access; /* granted access mask */
2943 unsigned int ref_count; /* object ref count */
2944 @END
2947 /* Unlink a named object */
2948 @REQ(unlink_object)
2949 obj_handle_t handle; /* handle to the object */
2950 @END
2953 /* Query the impersonation level of an impersonation token */
2954 @REQ(get_token_impersonation_level)
2955 obj_handle_t handle; /* handle to the object */
2956 @REPLY
2957 int impersonation_level; /* impersonation level of the impersonation token */
2958 @END
2960 /* Allocate a locally-unique identifier */
2961 @REQ(allocate_locally_unique_id)
2962 @REPLY
2963 luid_t luid;
2964 @END
2967 /* Create a device manager */
2968 @REQ(create_device_manager)
2969 unsigned int access; /* wanted access rights */
2970 unsigned int attributes; /* object attributes */
2971 @REPLY
2972 obj_handle_t handle; /* handle to the device */
2973 @END
2976 /* Create a device */
2977 @REQ(create_device)
2978 unsigned int access; /* wanted access rights */
2979 unsigned int attributes; /* object attributes */
2980 obj_handle_t rootdir; /* root directory */
2981 client_ptr_t user_ptr; /* opaque ptr for use by client */
2982 obj_handle_t manager; /* device manager */
2983 VARARG(name,unicode_str); /* object name */
2984 @REPLY
2985 obj_handle_t handle; /* handle to the device */
2986 @END
2989 /* Delete a device */
2990 @REQ(delete_device)
2991 obj_handle_t handle; /* handle to the device */
2992 @END
2995 /* Retrieve the next pending device ioctl request */
2996 @REQ(get_next_device_request)
2997 obj_handle_t manager; /* handle to the device manager */
2998 obj_handle_t prev; /* handle to the previous ioctl */
2999 unsigned int status; /* status of the previous ioctl */
3000 VARARG(prev_data,bytes); /* output data of the previous ioctl */
3001 @REPLY
3002 obj_handle_t next; /* handle to the next ioctl */
3003 ioctl_code_t code; /* ioctl code */
3004 client_ptr_t user_ptr; /* opaque ptr for the device */
3005 data_size_t in_size; /* total needed input size */
3006 data_size_t out_size; /* needed output size */
3007 VARARG(next_data,bytes); /* input data of the next ioctl */
3008 @END
3011 /* Make the current process a system process */
3012 @REQ(make_process_system)
3013 @REPLY
3014 obj_handle_t event; /* event signaled when all user processes have exited */
3015 @END
3018 /* Get detailed fixed-size information about a token */
3019 @REQ(get_token_statistics)
3020 obj_handle_t handle; /* handle to the object */
3021 @REPLY
3022 luid_t token_id; /* locally-unique identifier of the token */
3023 luid_t modified_id; /* locally-unique identifier of the modified version of the token */
3024 int primary; /* is the token primary or impersonation? */
3025 int impersonation_level; /* level of impersonation */
3026 int group_count; /* the number of groups the token is a member of */
3027 int privilege_count; /* the number of privileges the token has */
3028 @END
3031 /* Create I/O completion port */
3032 @REQ(create_completion)
3033 unsigned int access; /* desired access to a port */
3034 unsigned int attributes; /* object attributes */
3035 unsigned int concurrent; /* max number of concurrent active threads */
3036 obj_handle_t rootdir; /* root directory */
3037 VARARG(filename,string); /* port name */
3038 @REPLY
3039 obj_handle_t handle; /* port handle */
3040 @END
3043 /* Open I/O completion port */
3044 @REQ(open_completion)
3045 unsigned int access; /* desired access to a port */
3046 unsigned int attributes; /* object attributes */
3047 obj_handle_t rootdir; /* root directory */
3048 VARARG(filename,string); /* port name */
3049 @REPLY
3050 obj_handle_t handle; /* port handle */
3051 @END
3054 /* add completion to completion port */
3055 @REQ(add_completion)
3056 obj_handle_t handle; /* port handle */
3057 apc_param_t ckey; /* completion key */
3058 apc_param_t cvalue; /* completion value */
3059 unsigned int information; /* IO_STATUS_BLOCK Information */
3060 unsigned int status; /* completion result */
3061 @END
3064 /* get completion from completion port queue */
3065 @REQ(remove_completion)
3066 obj_handle_t handle; /* port handle */
3067 @REPLY
3068 apc_param_t ckey; /* completion key */
3069 apc_param_t cvalue; /* completion value */
3070 unsigned int information; /* IO_STATUS_BLOCK Information */
3071 unsigned int status; /* completion result */
3072 @END
3075 /* get completion queue depth */
3076 @REQ(query_completion)
3077 obj_handle_t handle; /* port handle */
3078 @REPLY
3079 unsigned int depth; /* completion queue depth */
3080 @END
3083 /* associate object with completion port */
3084 @REQ(set_completion_info)
3085 obj_handle_t handle; /* object handle */
3086 apc_param_t ckey; /* completion key */
3087 obj_handle_t chandle; /* port handle */
3088 @END
3091 /* check for associated completion and push msg */
3092 @REQ(add_fd_completion)
3093 obj_handle_t handle; /* async' object */
3094 apc_param_t cvalue; /* completion value */
3095 unsigned int status; /* completion status */
3096 unsigned int information; /* IO_STATUS_BLOCK Information */
3097 @END
3100 /* Retrieve layered info for a window */
3101 @REQ(get_window_layered_info)
3102 user_handle_t handle; /* handle to the window */
3103 @REPLY
3104 unsigned int color_key; /* color key */
3105 unsigned int alpha; /* alpha (0..255) */
3106 unsigned int flags; /* LWA_* flags */
3107 @END
3110 /* Set layered info for a window */
3111 @REQ(set_window_layered_info)
3112 user_handle_t handle; /* handle to the window */
3113 unsigned int color_key; /* color key */
3114 unsigned int alpha; /* alpha (0..255) */
3115 unsigned int flags; /* LWA_* flags */
3116 @END