dlls: Fix va_list -> ms_va_list for variadic api calls
[wine/wine64.git] / server / protocol.def
bloba4c154c333b1ea878cbbb74cd3e99f6d3b078955
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 short 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;
46 struct request_header
48 int req; /* request code */
49 data_size_t request_size; /* request variable part size */
50 data_size_t reply_size; /* reply variable part maximum size */
53 struct reply_header
55 unsigned int error; /* error result */
56 data_size_t reply_size; /* reply variable part size */
59 /* placeholder structure for the maximum allowed request size */
60 /* this is used to construct the generic_request union */
61 struct request_max_size
63 int pad[16]; /* the max request size is 16 ints */
66 #define FIRST_USER_HANDLE 0x0020 /* first possible value for low word of user handle */
67 #define LAST_USER_HANDLE 0xffef /* last possible value for low word of user handle */
70 /* definitions of the event data depending on the event code */
71 struct debug_event_exception
73 EXCEPTION_RECORD record; /* exception record */
74 int first; /* first chance exception? */
76 struct debug_event_create_thread
78 obj_handle_t handle; /* handle to the new thread */
79 void *teb; /* thread teb (in debugged process address space) */
80 void *start; /* thread startup routine */
82 struct debug_event_create_process
84 obj_handle_t file; /* handle to the process exe file */
85 obj_handle_t process; /* handle to the new process */
86 obj_handle_t thread; /* handle to the new thread */
87 void *base; /* base of executable image */
88 int dbg_offset; /* offset of debug info in file */
89 int dbg_size; /* size of debug info */
90 void *teb; /* thread teb (in debugged process address space) */
91 void *start; /* thread startup routine */
92 void *name; /* image name (optional) */
93 int unicode; /* is it Unicode? */
95 struct debug_event_exit
97 int exit_code; /* thread or process exit code */
99 struct debug_event_load_dll
101 obj_handle_t handle; /* file handle for the dll */
102 void *base; /* base address of the dll */
103 int dbg_offset; /* offset of debug info in file */
104 int dbg_size; /* size of debug info */
105 void *name; /* image name (optional) */
106 int unicode; /* is it Unicode? */
108 struct debug_event_unload_dll
110 void *base; /* base address of the dll */
112 struct debug_event_output_string
114 void *string; /* string to display (in debugged process address space) */
115 int unicode; /* is it Unicode? */
116 int length; /* string length */
118 struct debug_event_rip_info
120 int error; /* ??? */
121 int type; /* ??? */
123 union debug_event_data
125 struct debug_event_exception exception;
126 struct debug_event_create_thread create_thread;
127 struct debug_event_create_process create_process;
128 struct debug_event_exit exit;
129 struct debug_event_load_dll load_dll;
130 struct debug_event_unload_dll unload_dll;
131 struct debug_event_output_string output_string;
132 struct debug_event_rip_info rip_info;
135 /* debug event data */
136 typedef struct
138 int code; /* event code */
139 union debug_event_data info; /* event information */
140 } debug_event_t;
142 /* structure used in sending an fd from client to server */
143 struct send_fd
145 thread_id_t tid; /* thread id */
146 int fd; /* file descriptor on client-side */
149 /* structure sent by the server on the wait fifo */
150 struct wake_up_reply
152 void *cookie; /* magic cookie that was passed in select_request */
153 int signaled; /* wait result */
156 /* NT-style timeout, in 100ns units, negative means relative timeout */
157 typedef __int64 timeout_t;
158 #define TIMEOUT_INFINITE (((timeout_t)0x7fffffff) << 32 | 0xffffffff)
160 /* structure returned in the list of window properties */
161 typedef struct
163 atom_t atom; /* property atom */
164 short string; /* was atom a string originally? */
165 lparam_t data; /* data stored in property */
166 } property_data_t;
168 /* structure to specify window rectangles */
169 typedef struct
171 int left;
172 int top;
173 int right;
174 int bottom;
175 } rectangle_t;
177 /* structure for parameters of async I/O calls */
178 typedef struct
180 obj_handle_t handle; /* object to perform I/O on */
181 obj_handle_t event; /* event to signal when done */
182 void *callback; /* client-side callback to call upon end of async */
183 void *iosb; /* I/O status block in client addr space */
184 void *arg; /* opaque user data to pass to callback */
185 void *apc; /* user apc to call */
186 apc_param_t cvalue; /* completion value to use for completion events */
187 } async_data_t;
189 /* structures for extra message data */
191 struct hardware_msg_data
193 lparam_t info; /* extra info */
194 int x; /* x position */
195 int y; /* y position */
196 unsigned int hw_id; /* unique id */
199 struct callback_msg_data
201 void *callback; /* callback function */
202 lparam_t data; /* user data for callback */
203 lparam_t result; /* message result */
206 struct winevent_msg_data
208 user_handle_t hook; /* hook handle */
209 thread_id_t tid; /* thread id */
210 void *hook_proc; /* hook proc address */
211 /* followed by module name if any */
214 typedef union
216 unsigned char bytes[1]; /* raw data for sent messages */
217 struct callback_msg_data callback;
218 struct winevent_msg_data winevent;
219 } message_data_t;
221 /* structure for console char/attribute info */
222 typedef struct
224 WCHAR ch;
225 unsigned short attr;
226 } char_info_t;
228 typedef struct
230 unsigned int low_part;
231 int high_part;
232 } luid_t;
234 #define MAX_ACL_LEN 65535
236 struct security_descriptor
238 unsigned int control; /* SE_ flags */
239 data_size_t owner_len;
240 data_size_t group_len;
241 data_size_t sacl_len;
242 data_size_t dacl_len;
243 /* VARARG(owner,SID); */
244 /* VARARG(group,SID); */
245 /* VARARG(sacl,ACL); */
246 /* VARARG(dacl,ACL); */
249 struct object_attributes
251 obj_handle_t rootdir; /* root directory */
252 data_size_t sd_len; /* length of security_descriptor data. may be 0 */
253 data_size_t name_len; /* length of the name string. may be 0 */
254 /* VARARG(sd,security_descriptor); */
255 /* VARARG(name,unicode_str); */
258 struct token_groups
260 unsigned int count;
261 /* unsigned int attributes[count]; */
262 /* VARARG(sids,SID); */
265 enum apc_type
267 APC_NONE,
268 APC_USER,
269 APC_TIMER,
270 APC_ASYNC_IO,
271 APC_VIRTUAL_ALLOC,
272 APC_VIRTUAL_FREE,
273 APC_VIRTUAL_QUERY,
274 APC_VIRTUAL_PROTECT,
275 APC_VIRTUAL_FLUSH,
276 APC_VIRTUAL_LOCK,
277 APC_VIRTUAL_UNLOCK,
278 APC_MAP_VIEW,
279 APC_UNMAP_VIEW,
280 APC_CREATE_THREAD
283 typedef union
285 enum apc_type type;
286 struct
288 enum apc_type type; /* APC_USER */
289 void (__stdcall *func)(unsigned long,unsigned long,unsigned long);
290 apc_param_t args[3]; /* arguments for user function */
291 } user;
292 struct
294 enum apc_type type; /* APC_TIMER */
295 void (__stdcall *func)(void*, unsigned int, unsigned int);
296 timeout_t time; /* absolute time of expiration */
297 void *arg; /* user argument */
298 } timer;
299 struct
301 enum apc_type type; /* APC_ASYNC_IO */
302 unsigned int (*func)(void*, void*, unsigned int, unsigned int *);
303 void *user; /* user pointer */
304 void *sb; /* status block */
305 unsigned int status; /* I/O status */
306 } async_io;
307 struct
309 enum apc_type type; /* APC_VIRTUAL_ALLOC */
310 void *addr; /* requested address */
311 mem_size_t size; /* allocation size */
312 unsigned int zero_bits; /* allocation alignment */
313 unsigned int op_type; /* type of operation */
314 unsigned int prot; /* memory protection flags */
315 } virtual_alloc;
316 struct
318 enum apc_type type; /* APC_VIRTUAL_FREE */
319 void *addr; /* requested address */
320 mem_size_t size; /* allocation size */
321 unsigned int op_type; /* type of operation */
322 } virtual_free;
323 struct
325 enum apc_type type; /* APC_VIRTUAL_QUERY */
326 const void *addr; /* requested address */
327 } virtual_query;
328 struct
330 enum apc_type type; /* APC_VIRTUAL_PROTECT */
331 void *addr; /* requested address */
332 mem_size_t size; /* requested size */
333 unsigned int prot; /* new protection flags */
334 } virtual_protect;
335 struct
337 enum apc_type type; /* APC_VIRTUAL_FLUSH */
338 const void *addr; /* requested address */
339 mem_size_t size; /* requested size */
340 } virtual_flush;
341 struct
343 enum apc_type type; /* APC_VIRTUAL_LOCK */
344 void *addr; /* requested address */
345 mem_size_t size; /* requested size */
346 } virtual_lock;
347 struct
349 enum apc_type type; /* APC_VIRTUAL_UNLOCK */
350 void *addr; /* requested address */
351 mem_size_t size; /* requested size */
352 } virtual_unlock;
353 struct
355 enum apc_type type; /* APC_MAP_VIEW */
356 obj_handle_t handle; /* mapping handle */
357 void *addr; /* requested address */
358 mem_size_t size; /* allocation size */
359 file_pos_t offset; /* file offset */
360 unsigned int zero_bits; /* allocation alignment */
361 unsigned int alloc_type;/* allocation type */
362 unsigned int prot; /* memory protection flags */
363 } map_view;
364 struct
366 enum apc_type type; /* APC_UNMAP_VIEW */
367 void *addr; /* view address */
368 } unmap_view;
369 struct
371 enum apc_type type; /* APC_CREATE_THREAD */
372 void (__stdcall *func)(void*); /* start function */
373 void *arg; /* argument for start function */
374 mem_size_t reserve; /* reserve size for thread stack */
375 mem_size_t commit; /* commit size for thread stack */
376 int suspend; /* suspended thread? */
377 } create_thread;
378 } apc_call_t;
380 typedef union
382 enum apc_type type;
383 struct
385 enum apc_type type; /* APC_ASYNC_IO */
386 unsigned int status; /* new status of async operation */
387 unsigned int total; /* bytes transferred */
388 } async_io;
389 struct
391 enum apc_type type; /* APC_VIRTUAL_ALLOC */
392 unsigned int status; /* status returned by call */
393 void *addr; /* resulting address */
394 mem_size_t size; /* resulting size */
395 } virtual_alloc;
396 struct
398 enum apc_type type; /* APC_VIRTUAL_FREE */
399 unsigned int status; /* status returned by call */
400 void *addr; /* resulting address */
401 mem_size_t size; /* resulting size */
402 } virtual_free;
403 struct
405 enum apc_type type; /* APC_VIRTUAL_QUERY */
406 unsigned int status; /* status returned by call */
407 void *base; /* resulting base address */
408 void *alloc_base;/* resulting allocation base */
409 mem_size_t size; /* resulting region size */
410 unsigned int state; /* resulting region state */
411 unsigned int prot; /* resulting region protection */
412 unsigned int alloc_prot;/* resulting allocation protection */
413 unsigned int alloc_type;/* resulting region allocation type */
414 } virtual_query;
415 struct
417 enum apc_type type; /* APC_VIRTUAL_PROTECT */
418 unsigned int status; /* status returned by call */
419 void *addr; /* resulting address */
420 mem_size_t size; /* resulting size */
421 unsigned int prot; /* old protection flags */
422 } virtual_protect;
423 struct
425 enum apc_type type; /* APC_VIRTUAL_FLUSH */
426 unsigned int status; /* status returned by call */
427 const void *addr; /* resulting address */
428 mem_size_t size; /* resulting size */
429 } virtual_flush;
430 struct
432 enum apc_type type; /* APC_VIRTUAL_LOCK */
433 unsigned int status; /* status returned by call */
434 void *addr; /* resulting address */
435 mem_size_t size; /* resulting size */
436 } virtual_lock;
437 struct
439 enum apc_type type; /* APC_VIRTUAL_UNLOCK */
440 unsigned int status; /* status returned by call */
441 void *addr; /* resulting address */
442 mem_size_t size; /* resulting size */
443 } virtual_unlock;
444 struct
446 enum apc_type type; /* APC_MAP_VIEW */
447 unsigned int status; /* status returned by call */
448 void *addr; /* resulting address */
449 mem_size_t size; /* resulting size */
450 } map_view;
451 struct
453 enum apc_type type; /* APC_MAP_VIEW */
454 unsigned int status; /* status returned by call */
455 } unmap_view;
456 struct
458 enum apc_type type; /* APC_CREATE_THREAD */
459 unsigned int status; /* status returned by call */
460 thread_id_t tid; /* thread id */
461 obj_handle_t handle; /* handle to new thread */
462 } create_thread;
463 } apc_result_t;
465 /****************************************************************/
466 /* Request declarations */
468 /* Create a new process from the context of the parent */
469 @REQ(new_process)
470 int inherit_all; /* inherit all handles from parent */
471 unsigned int create_flags; /* creation flags */
472 int socket_fd; /* file descriptor for process socket */
473 obj_handle_t exe_file; /* file handle for main exe */
474 obj_handle_t hstdin; /* handle for stdin */
475 obj_handle_t hstdout; /* handle for stdout */
476 obj_handle_t hstderr; /* handle for stderr */
477 unsigned int process_access; /* access rights for process object */
478 unsigned int process_attr; /* attributes for process object */
479 unsigned int thread_access; /* access rights for thread object */
480 unsigned int thread_attr; /* attributes for thread object */
481 VARARG(info,startup_info); /* startup information */
482 VARARG(env,unicode_str); /* environment for new process */
483 @REPLY
484 obj_handle_t info; /* new process info handle */
485 process_id_t pid; /* process id */
486 obj_handle_t phandle; /* process handle (in the current process) */
487 thread_id_t tid; /* thread id */
488 obj_handle_t thandle; /* thread handle (in the current process) */
489 @END
492 /* Retrieve information about a newly started process */
493 @REQ(get_new_process_info)
494 obj_handle_t info; /* info handle returned from new_process_request */
495 @REPLY
496 int success; /* did the process start successfully? */
497 int exit_code; /* process exit code if failed */
498 @END
501 /* Create a new thread from the context of the parent */
502 @REQ(new_thread)
503 unsigned int access; /* wanted access rights */
504 unsigned int attributes; /* object attributes */
505 int suspend; /* new thread should be suspended on creation */
506 int request_fd; /* fd for request pipe */
507 @REPLY
508 thread_id_t tid; /* thread id */
509 obj_handle_t handle; /* thread handle (in the current process) */
510 @END
513 /* Retrieve the new process startup info */
514 @REQ(get_startup_info)
515 @REPLY
516 obj_handle_t exe_file; /* file handle for main exe */
517 obj_handle_t hstdin; /* handle for stdin */
518 obj_handle_t hstdout; /* handle for stdout */
519 obj_handle_t hstderr; /* handle for stderr */
520 VARARG(info,startup_info); /* startup information */
521 VARARG(env,unicode_str); /* environment */
522 @END
525 /* Signal the end of the process initialization */
526 @REQ(init_process_done)
527 void* module; /* main module base address */
528 void* entry; /* process entry point */
529 int gui; /* is it a GUI process? */
530 @END
533 /* Initialize a thread; called from the child after fork()/clone() */
534 @REQ(init_thread)
535 int unix_pid; /* Unix pid of new thread */
536 int unix_tid; /* Unix tid of new thread */
537 int debug_level; /* new debug level */
538 void* teb; /* TEB of new thread (in thread address space) */
539 void* peb; /* address of PEB (in thread address space) */
540 void* entry; /* thread entry point (in thread address space) */
541 void* ldt_copy; /* address of LDT copy (in thread address space) */
542 int reply_fd; /* fd for reply pipe */
543 int wait_fd; /* fd for blocking calls pipe */
544 @REPLY
545 process_id_t pid; /* process id of the new thread's process */
546 thread_id_t tid; /* thread id of the new thread */
547 data_size_t info_size; /* total size of startup info */
548 timeout_t server_start; /* server start time */
549 int version; /* protocol version */
550 @END
553 /* Terminate a process */
554 @REQ(terminate_process)
555 obj_handle_t handle; /* process handle to terminate */
556 int exit_code; /* process exit code */
557 @REPLY
558 int self; /* suicide? */
559 @END
562 /* Terminate a thread */
563 @REQ(terminate_thread)
564 obj_handle_t handle; /* thread handle to terminate */
565 int exit_code; /* thread exit code */
566 @REPLY
567 int self; /* suicide? */
568 int last; /* last thread in this process? */
569 @END
572 /* Retrieve information about a process */
573 @REQ(get_process_info)
574 obj_handle_t handle; /* process handle */
575 @REPLY
576 process_id_t pid; /* server process id */
577 process_id_t ppid; /* server process id of parent */
578 int exit_code; /* process exit code */
579 int priority; /* priority class */
580 unsigned int affinity; /* process affinity mask */
581 void* peb; /* PEB address in process address space */
582 timeout_t start_time; /* process start time */
583 timeout_t end_time; /* process end time */
584 @END
587 /* Set a process informations */
588 @REQ(set_process_info)
589 obj_handle_t handle; /* process handle */
590 int mask; /* setting mask (see below) */
591 int priority; /* priority class */
592 unsigned int affinity; /* affinity mask */
593 @END
594 #define SET_PROCESS_INFO_PRIORITY 0x01
595 #define SET_PROCESS_INFO_AFFINITY 0x02
598 /* Retrieve information about a thread */
599 @REQ(get_thread_info)
600 obj_handle_t handle; /* thread handle */
601 thread_id_t tid_in; /* thread id (optional) */
602 @REPLY
603 process_id_t pid; /* server process id */
604 thread_id_t tid; /* server thread id */
605 void* teb; /* thread teb pointer */
606 int exit_code; /* thread exit code */
607 int priority; /* thread priority level */
608 unsigned int affinity; /* thread affinity mask */
609 timeout_t creation_time; /* thread creation time */
610 timeout_t exit_time; /* thread exit time */
611 int last; /* last thread in process */
612 @END
615 /* Set a thread informations */
616 @REQ(set_thread_info)
617 obj_handle_t handle; /* thread handle */
618 int mask; /* setting mask (see below) */
619 int priority; /* priority class */
620 unsigned int affinity; /* affinity mask */
621 obj_handle_t token; /* impersonation token */
622 @END
623 #define SET_THREAD_INFO_PRIORITY 0x01
624 #define SET_THREAD_INFO_AFFINITY 0x02
625 #define SET_THREAD_INFO_TOKEN 0x04
628 /* Retrieve information about a module */
629 @REQ(get_dll_info)
630 obj_handle_t handle; /* process handle */
631 void* base_address; /* base address of module */
632 @REPLY
633 void* entry_point;
634 data_size_t size; /* module size */
635 data_size_t filename_len; /* buffer len in bytes required to store filename */
636 VARARG(filename,unicode_str); /* file name of module */
637 @END
640 /* Suspend a thread */
641 @REQ(suspend_thread)
642 obj_handle_t handle; /* thread handle */
643 @REPLY
644 int count; /* new suspend count */
645 @END
648 /* Resume a thread */
649 @REQ(resume_thread)
650 obj_handle_t handle; /* thread handle */
651 @REPLY
652 int count; /* new suspend count */
653 @END
656 /* Notify the server that a dll has been loaded */
657 @REQ(load_dll)
658 obj_handle_t handle; /* file handle */
659 void* base; /* base address */
660 void* name; /* ptr to ptr to name (in process addr space) */
661 data_size_t size; /* dll size */
662 int dbg_offset; /* debug info offset */
663 int dbg_size; /* debug info size */
664 VARARG(filename,unicode_str); /* file name of dll */
665 @END
668 /* Notify the server that a dll is being unloaded */
669 @REQ(unload_dll)
670 void* base; /* base address */
671 @END
674 /* Queue an APC for a thread or process */
675 @REQ(queue_apc)
676 obj_handle_t handle; /* thread or process handle */
677 apc_call_t call; /* call arguments */
678 @REPLY
679 obj_handle_t handle; /* APC handle */
680 int self; /* run APC in caller itself? */
681 @END
684 /* Get the result of an APC call */
685 @REQ(get_apc_result)
686 obj_handle_t handle; /* handle to the APC */
687 @REPLY
688 apc_result_t result; /* result of the APC */
689 @END
692 /* Close a handle for the current process */
693 @REQ(close_handle)
694 obj_handle_t handle; /* handle to close */
695 @END
698 /* Set a handle information */
699 @REQ(set_handle_info)
700 obj_handle_t handle; /* handle we are interested in */
701 int flags; /* new handle flags */
702 int mask; /* mask for flags to set */
703 @REPLY
704 int old_flags; /* old flag value */
705 @END
708 /* Duplicate a handle */
709 @REQ(dup_handle)
710 obj_handle_t src_process; /* src process handle */
711 obj_handle_t src_handle; /* src handle to duplicate */
712 obj_handle_t dst_process; /* dst process handle */
713 unsigned int access; /* wanted access rights */
714 unsigned int attributes; /* object attributes */
715 unsigned int options; /* duplicate options (see below) */
716 @REPLY
717 obj_handle_t handle; /* duplicated handle in dst process */
718 int self; /* is the source the current process? */
719 int closed; /* whether the source handle has been closed */
720 @END
721 #define DUP_HANDLE_CLOSE_SOURCE DUPLICATE_CLOSE_SOURCE
722 #define DUP_HANDLE_SAME_ACCESS DUPLICATE_SAME_ACCESS
723 #define DUP_HANDLE_MAKE_GLOBAL 0x80000000 /* Not a Windows flag */
726 /* Open a handle to a process */
727 @REQ(open_process)
728 process_id_t pid; /* process id to open */
729 unsigned int access; /* wanted access rights */
730 unsigned int attributes; /* object attributes */
731 @REPLY
732 obj_handle_t handle; /* handle to the process */
733 @END
736 /* Open a handle to a thread */
737 @REQ(open_thread)
738 thread_id_t tid; /* thread id to open */
739 unsigned int access; /* wanted access rights */
740 unsigned int attributes; /* object attributes */
741 @REPLY
742 obj_handle_t handle; /* handle to the thread */
743 @END
746 /* Wait for handles */
747 @REQ(select)
748 int flags; /* wait flags (see below) */
749 void* cookie; /* magic cookie to return to client */
750 obj_handle_t signal; /* object to signal (0 if none) */
751 obj_handle_t prev_apc; /* handle to previous APC */
752 timeout_t timeout; /* timeout */
753 VARARG(result,apc_result); /* result of previous APC */
754 VARARG(handles,handles); /* handles to select on */
755 @REPLY
756 obj_handle_t apc_handle; /* handle to next APC */
757 timeout_t timeout; /* timeout converted to absolute */
758 apc_call_t call; /* APC call arguments */
759 @END
760 #define SELECT_ALL 1
761 #define SELECT_ALERTABLE 2
762 #define SELECT_INTERRUPTIBLE 4
765 /* Create an event */
766 @REQ(create_event)
767 unsigned int access; /* wanted access rights */
768 unsigned int attributes; /* object attributes */
769 int manual_reset; /* manual reset event */
770 int initial_state; /* initial state of the event */
771 VARARG(objattr,object_attributes); /* object attributes */
772 @REPLY
773 obj_handle_t handle; /* handle to the event */
774 @END
776 /* Event operation */
777 @REQ(event_op)
778 obj_handle_t handle; /* handle to event */
779 int op; /* event operation (see below) */
780 @END
781 enum event_op { PULSE_EVENT, SET_EVENT, RESET_EVENT };
784 /* Open an event */
785 @REQ(open_event)
786 unsigned int access; /* wanted access rights */
787 unsigned int attributes; /* object attributes */
788 obj_handle_t rootdir; /* root directory */
789 VARARG(name,unicode_str); /* object name */
790 @REPLY
791 obj_handle_t handle; /* handle to the event */
792 @END
795 /* Create a mutex */
796 @REQ(create_mutex)
797 unsigned int access; /* wanted access rights */
798 unsigned int attributes; /* object attributes */
799 int owned; /* initially owned? */
800 VARARG(objattr,object_attributes); /* object attributes */
801 @REPLY
802 obj_handle_t handle; /* handle to the mutex */
803 @END
806 /* Release a mutex */
807 @REQ(release_mutex)
808 obj_handle_t handle; /* handle to the mutex */
809 @REPLY
810 unsigned int prev_count; /* value of internal counter, before release */
811 @END
814 /* Open a mutex */
815 @REQ(open_mutex)
816 unsigned int access; /* wanted access rights */
817 unsigned int attributes; /* object attributes */
818 obj_handle_t rootdir; /* root directory */
819 VARARG(name,unicode_str); /* object name */
820 @REPLY
821 obj_handle_t handle; /* handle to the mutex */
822 @END
825 /* Create a semaphore */
826 @REQ(create_semaphore)
827 unsigned int access; /* wanted access rights */
828 unsigned int attributes; /* object attributes */
829 unsigned int initial; /* initial count */
830 unsigned int max; /* maximum count */
831 VARARG(objattr,object_attributes); /* object attributes */
832 @REPLY
833 obj_handle_t handle; /* handle to the semaphore */
834 @END
837 /* Release a semaphore */
838 @REQ(release_semaphore)
839 obj_handle_t handle; /* handle to the semaphore */
840 unsigned int count; /* count to add to semaphore */
841 @REPLY
842 unsigned int prev_count; /* previous semaphore count */
843 @END
846 /* Open a semaphore */
847 @REQ(open_semaphore)
848 unsigned int access; /* wanted access rights */
849 unsigned int attributes; /* object attributes */
850 obj_handle_t rootdir; /* root directory */
851 VARARG(name,unicode_str); /* object name */
852 @REPLY
853 obj_handle_t handle; /* handle to the semaphore */
854 @END
857 /* Create a file */
858 @REQ(create_file)
859 unsigned int access; /* wanted access rights */
860 unsigned int attributes; /* object attributes */
861 unsigned int sharing; /* sharing flags */
862 int create; /* file create action */
863 unsigned int options; /* file options */
864 unsigned int attrs; /* file attributes for creation */
865 VARARG(objattr,object_attributes); /* object attributes */
866 VARARG(filename,string); /* file name */
867 @REPLY
868 obj_handle_t handle; /* handle to the file */
869 @END
872 /* Open a file object */
873 @REQ(open_file_object)
874 unsigned int access; /* wanted access rights */
875 unsigned int attributes; /* open attributes */
876 obj_handle_t rootdir; /* root directory */
877 unsigned int sharing; /* sharing flags */
878 unsigned int options; /* file options */
879 VARARG(filename,unicode_str); /* file name */
880 @REPLY
881 obj_handle_t handle; /* handle to the file */
882 @END
885 /* Allocate a file handle for a Unix fd */
886 @REQ(alloc_file_handle)
887 unsigned int access; /* wanted access rights */
888 unsigned int attributes; /* object attributes */
889 int fd; /* file descriptor on the client side */
890 @REPLY
891 obj_handle_t handle; /* handle to the file */
892 @END
895 /* Get a Unix fd to access a file */
896 @REQ(get_handle_fd)
897 obj_handle_t handle; /* handle to the file */
898 @REPLY
899 int type; /* file type (see below) */
900 int removable; /* is file removable? */
901 unsigned int access; /* file access rights */
902 unsigned int options; /* file open options */
903 @END
904 enum server_fd_type
906 FD_TYPE_INVALID, /* invalid file (no associated fd) */
907 FD_TYPE_FILE, /* regular file */
908 FD_TYPE_DIR, /* directory */
909 FD_TYPE_SOCKET, /* socket */
910 FD_TYPE_SERIAL, /* serial port */
911 FD_TYPE_PIPE, /* named pipe */
912 FD_TYPE_MAILSLOT, /* mailslot */
913 FD_TYPE_CHAR, /* unspecified char device */
914 FD_TYPE_DEVICE, /* Windows device file */
915 FD_TYPE_NB_TYPES
919 /* Flush a file buffers */
920 @REQ(flush_file)
921 obj_handle_t handle; /* handle to the file */
922 @REPLY
923 obj_handle_t event; /* event set when finished */
924 @END
927 /* Lock a region of a file */
928 @REQ(lock_file)
929 obj_handle_t handle; /* handle to the file */
930 file_pos_t offset; /* offset of start of lock */
931 file_pos_t count; /* count of bytes to lock */
932 int shared; /* shared or exclusive lock? */
933 int wait; /* do we want to wait? */
934 @REPLY
935 obj_handle_t handle; /* handle to wait on */
936 int overlapped; /* is it an overlapped I/O handle? */
937 @END
940 /* Unlock a region of a file */
941 @REQ(unlock_file)
942 obj_handle_t handle; /* handle to the file */
943 file_pos_t offset; /* offset of start of unlock */
944 file_pos_t count; /* count of bytes to unlock */
945 @END
948 /* Create a socket */
949 @REQ(create_socket)
950 unsigned int access; /* wanted access rights */
951 unsigned int attributes; /* object attributes */
952 int family; /* family, see socket manpage */
953 int type; /* type, see socket manpage */
954 int protocol; /* protocol, see socket manpage */
955 unsigned int flags; /* socket flags */
956 @REPLY
957 obj_handle_t handle; /* handle to the new socket */
958 @END
961 /* Accept a socket */
962 @REQ(accept_socket)
963 obj_handle_t lhandle; /* handle to the listening socket */
964 unsigned int access; /* wanted access rights */
965 unsigned int attributes; /* object attributes */
966 @REPLY
967 obj_handle_t handle; /* handle to the new socket */
968 @END
971 /* Set socket event parameters */
972 @REQ(set_socket_event)
973 obj_handle_t handle; /* handle to the socket */
974 unsigned int mask; /* event mask */
975 obj_handle_t event; /* event object */
976 user_handle_t window; /* window to send the message to */
977 unsigned int msg; /* message to send */
978 @END
981 /* Get socket event parameters */
982 @REQ(get_socket_event)
983 obj_handle_t handle; /* handle to the socket */
984 int service; /* clear pending? */
985 obj_handle_t c_event; /* event to clear */
986 @REPLY
987 unsigned int mask; /* event mask */
988 unsigned int pmask; /* pending events */
989 unsigned int state; /* status bits */
990 VARARG(errors,ints); /* event errors */
991 @END
994 /* Reenable pending socket events */
995 @REQ(enable_socket_event)
996 obj_handle_t handle; /* handle to the socket */
997 unsigned int mask; /* events to re-enable */
998 unsigned int sstate; /* status bits to set */
999 unsigned int cstate; /* status bits to clear */
1000 @END
1002 @REQ(set_socket_deferred)
1003 obj_handle_t handle; /* handle to the socket */
1004 obj_handle_t deferred; /* handle to the socket for which accept() is deferred */
1005 @END
1007 /* Allocate a console (only used by a console renderer) */
1008 @REQ(alloc_console)
1009 unsigned int access; /* wanted access rights */
1010 unsigned int attributes; /* object attributes */
1011 process_id_t pid; /* pid of process which shall be attached to the console */
1012 @REPLY
1013 obj_handle_t handle_in; /* handle to console input */
1014 obj_handle_t event; /* handle to renderer events change notification */
1015 @END
1018 /* Free the console of the current process */
1019 @REQ(free_console)
1020 @END
1023 #define CONSOLE_RENDERER_NONE_EVENT 0x00
1024 #define CONSOLE_RENDERER_TITLE_EVENT 0x01
1025 #define CONSOLE_RENDERER_ACTIVE_SB_EVENT 0x02
1026 #define CONSOLE_RENDERER_SB_RESIZE_EVENT 0x03
1027 #define CONSOLE_RENDERER_UPDATE_EVENT 0x04
1028 #define CONSOLE_RENDERER_CURSOR_POS_EVENT 0x05
1029 #define CONSOLE_RENDERER_CURSOR_GEOM_EVENT 0x06
1030 #define CONSOLE_RENDERER_DISPLAY_EVENT 0x07
1031 #define CONSOLE_RENDERER_EXIT_EVENT 0x08
1032 struct console_renderer_event
1034 short event;
1035 union
1037 struct update
1039 short top;
1040 short bottom;
1041 } update;
1042 struct resize
1044 short width;
1045 short height;
1046 } resize;
1047 struct cursor_pos
1049 short x;
1050 short y;
1051 } cursor_pos;
1052 struct cursor_geom
1054 short visible;
1055 short size;
1056 } cursor_geom;
1057 struct display
1059 short left;
1060 short top;
1061 short width;
1062 short height;
1063 } display;
1064 } u;
1067 /* retrieve console events for the renderer */
1068 @REQ(get_console_renderer_events)
1069 obj_handle_t handle; /* handle to console input events */
1070 @REPLY
1071 VARARG(data,bytes); /* the various console_renderer_events */
1072 @END
1075 /* Open a handle to the process console */
1076 @REQ(open_console)
1077 obj_handle_t from; /* 0 (resp 1) input (resp output) of current process console */
1078 /* otherwise console_in handle to get active screen buffer? */
1079 unsigned int access; /* wanted access rights */
1080 unsigned int attributes; /* object attributes */
1081 int share; /* share mask (only for output handles) */
1082 @REPLY
1083 obj_handle_t handle; /* handle to the console */
1084 @END
1087 /* Get the input queue wait event */
1088 @REQ(get_console_wait_event)
1089 @REPLY
1090 obj_handle_t handle;
1091 @END
1093 /* Get a console mode (input or output) */
1094 @REQ(get_console_mode)
1095 obj_handle_t handle; /* handle to the console */
1096 @REPLY
1097 int mode; /* console mode */
1098 @END
1101 /* Set a console mode (input or output) */
1102 @REQ(set_console_mode)
1103 obj_handle_t handle; /* handle to the console */
1104 int mode; /* console mode */
1105 @END
1108 /* Set info about a console (input only) */
1109 @REQ(set_console_input_info)
1110 obj_handle_t handle; /* handle to console input, or 0 for process' console */
1111 int mask; /* setting mask (see below) */
1112 obj_handle_t active_sb; /* active screen buffer */
1113 int history_mode; /* whether we duplicate lines in history */
1114 int history_size; /* number of lines in history */
1115 int edition_mode; /* index to the edition mode flavors */
1116 int input_cp; /* console input codepage */
1117 int output_cp; /* console output codepage */
1118 user_handle_t win; /* console window if backend supports it */
1119 VARARG(title,unicode_str); /* console title */
1120 @END
1121 #define SET_CONSOLE_INPUT_INFO_ACTIVE_SB 0x01
1122 #define SET_CONSOLE_INPUT_INFO_TITLE 0x02
1123 #define SET_CONSOLE_INPUT_INFO_HISTORY_MODE 0x04
1124 #define SET_CONSOLE_INPUT_INFO_HISTORY_SIZE 0x08
1125 #define SET_CONSOLE_INPUT_INFO_EDITION_MODE 0x10
1126 #define SET_CONSOLE_INPUT_INFO_INPUT_CODEPAGE 0x20
1127 #define SET_CONSOLE_INPUT_INFO_OUTPUT_CODEPAGE 0x40
1128 #define SET_CONSOLE_INPUT_INFO_WIN 0x80
1131 /* Get info about a console (input only) */
1132 @REQ(get_console_input_info)
1133 obj_handle_t handle; /* handle to console input, or 0 for process' console */
1134 @REPLY
1135 int history_mode; /* whether we duplicate lines in history */
1136 int history_size; /* number of lines in history */
1137 int history_index; /* number of used lines in history */
1138 int edition_mode; /* index to the edition mode flavors */
1139 int input_cp; /* console input codepage */
1140 int output_cp; /* console output codepage */
1141 user_handle_t win; /* console window if backend supports it */
1142 VARARG(title,unicode_str); /* console title */
1143 @END
1146 /* appends a string to console's history */
1147 @REQ(append_console_input_history)
1148 obj_handle_t handle; /* handle to console input, or 0 for process' console */
1149 VARARG(line,unicode_str); /* line to add */
1150 @END
1153 /* appends a string to console's history */
1154 @REQ(get_console_input_history)
1155 obj_handle_t handle; /* handle to console input, or 0 for process' console */
1156 int index; /* index to get line from */
1157 @REPLY
1158 int total; /* total length of line in Unicode chars */
1159 VARARG(line,unicode_str); /* line to add */
1160 @END
1163 /* creates a new screen buffer on process' console */
1164 @REQ(create_console_output)
1165 obj_handle_t handle_in; /* handle to console input, or 0 for process' console */
1166 unsigned int access; /* wanted access rights */
1167 unsigned int attributes; /* object attributes */
1168 unsigned int share; /* sharing credentials */
1169 @REPLY
1170 obj_handle_t handle_out; /* handle to the screen buffer */
1171 @END
1174 /* Set info about a console (output only) */
1175 @REQ(set_console_output_info)
1176 obj_handle_t handle; /* handle to the console */
1177 int mask; /* setting mask (see below) */
1178 short int cursor_size; /* size of cursor (percentage filled) */
1179 short int cursor_visible;/* cursor visibility flag */
1180 short int cursor_x; /* position of cursor (x, y) */
1181 short int cursor_y;
1182 short int width; /* width of the screen buffer */
1183 short int height; /* height of the screen buffer */
1184 short int attr; /* default attribute */
1185 short int win_left; /* window actually displayed by renderer */
1186 short int win_top; /* the rect area is expressed withing the */
1187 short int win_right; /* boundaries of the screen buffer */
1188 short int win_bottom;
1189 short int max_width; /* maximum size (width x height) for the window */
1190 short int max_height;
1191 @END
1192 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_GEOM 0x01
1193 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_POS 0x02
1194 #define SET_CONSOLE_OUTPUT_INFO_SIZE 0x04
1195 #define SET_CONSOLE_OUTPUT_INFO_ATTR 0x08
1196 #define SET_CONSOLE_OUTPUT_INFO_DISPLAY_WINDOW 0x10
1197 #define SET_CONSOLE_OUTPUT_INFO_MAX_SIZE 0x20
1200 /* Get info about a console (output only) */
1201 @REQ(get_console_output_info)
1202 obj_handle_t handle; /* handle to the console */
1203 @REPLY
1204 short int cursor_size; /* size of cursor (percentage filled) */
1205 short int cursor_visible;/* cursor visibility flag */
1206 short int cursor_x; /* position of cursor (x, y) */
1207 short int cursor_y;
1208 short int width; /* width of the screen buffer */
1209 short int height; /* height of the screen buffer */
1210 short int attr; /* default attribute */
1211 short int win_left; /* window actually displayed by renderer */
1212 short int win_top; /* the rect area is expressed withing the */
1213 short int win_right; /* boundaries of the screen buffer */
1214 short int win_bottom;
1215 short int max_width; /* maximum size (width x height) for the window */
1216 short int max_height;
1217 @END
1219 /* Add input records to a console input queue */
1220 @REQ(write_console_input)
1221 obj_handle_t handle; /* handle to the console input */
1222 VARARG(rec,input_records); /* input records */
1223 @REPLY
1224 int written; /* number of records written */
1225 @END
1228 /* Fetch input records from a console input queue */
1229 @REQ(read_console_input)
1230 obj_handle_t handle; /* handle to the console input */
1231 int flush; /* flush the retrieved records from the queue? */
1232 @REPLY
1233 int read; /* number of records read */
1234 VARARG(rec,input_records); /* input records */
1235 @END
1238 /* write data (chars and/or attributes) in a screen buffer */
1239 @REQ(write_console_output)
1240 obj_handle_t handle; /* handle to the console output */
1241 int x; /* position where to start writing */
1242 int y;
1243 int mode; /* char info (see below) */
1244 int wrap; /* wrap around at end of line? */
1245 VARARG(data,bytes); /* info to write */
1246 @REPLY
1247 int written; /* number of char infos actually written */
1248 int width; /* width of screen buffer */
1249 int height; /* height of screen buffer */
1250 @END
1251 enum char_info_mode
1253 CHAR_INFO_MODE_TEXT, /* characters only */
1254 CHAR_INFO_MODE_ATTR, /* attributes only */
1255 CHAR_INFO_MODE_TEXTATTR, /* both characters and attributes */
1256 CHAR_INFO_MODE_TEXTSTDATTR /* characters but use standard attributes */
1260 /* fill a screen buffer with constant data (chars and/or attributes) */
1261 @REQ(fill_console_output)
1262 obj_handle_t handle; /* handle to the console output */
1263 int x; /* position where to start writing */
1264 int y;
1265 int mode; /* char info mode */
1266 int count; /* number to write */
1267 int wrap; /* wrap around at end of line? */
1268 char_info_t data; /* data to write */
1269 @REPLY
1270 int written; /* number of char infos actually written */
1271 @END
1274 /* read data (chars and/or attributes) from a screen buffer */
1275 @REQ(read_console_output)
1276 obj_handle_t handle; /* handle to the console output */
1277 int x; /* position (x,y) where to start reading */
1278 int y;
1279 int mode; /* char info mode */
1280 int wrap; /* wrap around at end of line? */
1281 @REPLY
1282 int width; /* width of screen buffer */
1283 int height; /* height of screen buffer */
1284 VARARG(data,bytes);
1285 @END
1288 /* move a rect (of data) in screen buffer content */
1289 @REQ(move_console_output)
1290 obj_handle_t handle; /* handle to the console output */
1291 short int x_src; /* position (x, y) of rect to start moving from */
1292 short int y_src;
1293 short int x_dst; /* position (x, y) of rect to move to */
1294 short int y_dst;
1295 short int w; /* size of the rect (width, height) to move */
1296 short int h;
1297 @END
1300 /* Sends a signal to a process group */
1301 @REQ(send_console_signal)
1302 int signal; /* the signal to send */
1303 process_id_t group_id; /* the group to send the signal to */
1304 @END
1307 /* enable directory change notifications */
1308 @REQ(read_directory_changes)
1309 unsigned int filter; /* notification filter */
1310 int subtree; /* watch the subtree? */
1311 int want_data; /* flag indicating whether change data should be collected */
1312 async_data_t async; /* async I/O parameters */
1313 @END
1316 @REQ(read_change)
1317 obj_handle_t handle;
1318 @REPLY
1319 int action; /* type of change */
1320 VARARG(name,string); /* name of directory entry that changed */
1321 @END
1324 /* Create a file mapping */
1325 @REQ(create_mapping)
1326 unsigned int access; /* wanted access rights */
1327 unsigned int attributes; /* object attributes */
1328 mem_size_t size; /* mapping size */
1329 unsigned int protect; /* protection flags (see below) */
1330 obj_handle_t file_handle; /* file handle */
1331 VARARG(objattr,object_attributes); /* object attributes */
1332 @REPLY
1333 obj_handle_t handle; /* handle to the mapping */
1334 @END
1335 /* per-page protection flags */
1336 #define VPROT_READ 0x01
1337 #define VPROT_WRITE 0x02
1338 #define VPROT_EXEC 0x04
1339 #define VPROT_WRITECOPY 0x08
1340 #define VPROT_GUARD 0x10
1341 #define VPROT_NOCACHE 0x20
1342 #define VPROT_COMMITTED 0x40
1343 #define VPROT_WRITEWATCH 0x80
1344 /* per-mapping protection flags */
1345 #define VPROT_IMAGE 0x0100 /* mapping for an exe image */
1346 #define VPROT_SYSTEM 0x0200 /* system view (underlying mmap not under our control) */
1347 #define VPROT_VALLOC 0x0400 /* allocated by VirtualAlloc */
1348 #define VPROT_NOEXEC 0x0800 /* don't force exec permission */
1351 /* Open a mapping */
1352 @REQ(open_mapping)
1353 unsigned int access; /* wanted access rights */
1354 unsigned int attributes; /* object attributes */
1355 obj_handle_t rootdir; /* root directory */
1356 VARARG(name,unicode_str); /* object name */
1357 @REPLY
1358 obj_handle_t handle; /* handle to the mapping */
1359 @END
1362 /* Get information about a file mapping */
1363 @REQ(get_mapping_info)
1364 obj_handle_t handle; /* handle to the mapping */
1365 unsigned int access; /* wanted access rights */
1366 @REPLY
1367 mem_size_t size; /* mapping size */
1368 int protect; /* protection flags */
1369 int header_size; /* header size (for VPROT_IMAGE mapping) */
1370 void* base; /* default base addr (for VPROT_IMAGE mapping) */
1371 obj_handle_t mapping; /* duplicate mapping handle unless removable */
1372 obj_handle_t shared_file; /* shared mapping file handle */
1373 @END
1376 /* Get a range of committed pages in a file mapping */
1377 @REQ(get_mapping_committed_range)
1378 obj_handle_t handle; /* handle to the mapping */
1379 file_pos_t offset; /* starting offset (page-aligned, in bytes) */
1380 @REPLY
1381 mem_size_t size; /* size of range starting at offset (page-aligned, in bytes) */
1382 int committed; /* whether it is a committed range */
1383 @END
1386 /* Add a range to the committed pages in a file mapping */
1387 @REQ(add_mapping_committed_range)
1388 obj_handle_t handle; /* handle to the mapping */
1389 file_pos_t offset; /* starting offset (page-aligned, in bytes) */
1390 mem_size_t size; /* size to set (page-aligned, in bytes) or 0 if only retrieving */
1391 @END
1394 #define SNAP_PROCESS 0x00000001
1395 #define SNAP_THREAD 0x00000002
1396 /* Create a snapshot */
1397 @REQ(create_snapshot)
1398 unsigned int attributes; /* object attributes */
1399 unsigned int flags; /* snapshot flags (SNAP_*) */
1400 @REPLY
1401 obj_handle_t handle; /* handle to the snapshot */
1402 @END
1405 /* Get the next process from a snapshot */
1406 @REQ(next_process)
1407 obj_handle_t handle; /* handle to the snapshot */
1408 int reset; /* reset snapshot position? */
1409 @REPLY
1410 int count; /* process usage count */
1411 process_id_t pid; /* process id */
1412 process_id_t ppid; /* parent process id */
1413 int threads; /* number of threads */
1414 int priority; /* process priority */
1415 int handles; /* number of handles */
1416 VARARG(filename,unicode_str); /* file name of main exe */
1417 @END
1420 /* Get the next thread from a snapshot */
1421 @REQ(next_thread)
1422 obj_handle_t handle; /* handle to the snapshot */
1423 int reset; /* reset snapshot position? */
1424 @REPLY
1425 int count; /* thread usage count */
1426 process_id_t pid; /* process id */
1427 thread_id_t tid; /* thread id */
1428 int base_pri; /* base priority */
1429 int delta_pri; /* delta priority */
1430 @END
1433 /* Wait for a debug event */
1434 @REQ(wait_debug_event)
1435 int get_handle; /* should we alloc a handle for waiting? */
1436 @REPLY
1437 process_id_t pid; /* process id */
1438 thread_id_t tid; /* thread id */
1439 obj_handle_t wait; /* wait handle if no event ready */
1440 VARARG(event,debug_event); /* debug event data */
1441 @END
1444 /* Queue an exception event */
1445 @REQ(queue_exception_event)
1446 int first; /* first chance exception? */
1447 VARARG(record,exc_event); /* thread context followed by exception record */
1448 @REPLY
1449 obj_handle_t handle; /* handle to the queued event */
1450 @END
1453 /* Retrieve the status of an exception event */
1454 @REQ(get_exception_status)
1455 obj_handle_t handle; /* handle to the queued event */
1456 @REPLY
1457 VARARG(context,context); /* modified thread context */
1458 @END
1461 /* Send an output string to the debugger */
1462 @REQ(output_debug_string)
1463 void* string; /* string to display (in debugged process address space) */
1464 int unicode; /* is it Unicode? */
1465 int length; /* string length */
1466 @END
1469 /* Continue a debug event */
1470 @REQ(continue_debug_event)
1471 process_id_t pid; /* process id to continue */
1472 thread_id_t tid; /* thread id to continue */
1473 int status; /* continuation status */
1474 @END
1477 /* Start/stop debugging an existing process */
1478 @REQ(debug_process)
1479 process_id_t pid; /* id of the process to debug */
1480 int attach; /* 1=attaching / 0=detaching from the process */
1481 @END
1484 /* Simulate a breakpoint in a process */
1485 @REQ(debug_break)
1486 obj_handle_t handle; /* process handle */
1487 @REPLY
1488 int self; /* was it the caller itself? */
1489 @END
1492 /* Set debugger kill on exit flag */
1493 @REQ(set_debugger_kill_on_exit)
1494 int kill_on_exit; /* 0=detach/1=kill debuggee when debugger dies */
1495 @END
1498 /* Read data from a process address space */
1499 @REQ(read_process_memory)
1500 obj_handle_t handle; /* process handle */
1501 void* addr; /* addr to read from */
1502 @REPLY
1503 VARARG(data,bytes); /* result data */
1504 @END
1507 /* Write data to a process address space */
1508 @REQ(write_process_memory)
1509 obj_handle_t handle; /* process handle */
1510 void* addr; /* addr to write to */
1511 VARARG(data,bytes); /* data to write */
1512 @END
1515 /* Create a registry key */
1516 @REQ(create_key)
1517 obj_handle_t parent; /* handle to the parent key */
1518 unsigned int access; /* desired access rights */
1519 unsigned int attributes; /* object attributes */
1520 unsigned int options; /* creation options */
1521 data_size_t namelen; /* length of key name in bytes */
1522 VARARG(name,unicode_str,namelen); /* key name */
1523 VARARG(class,unicode_str); /* class name */
1524 @REPLY
1525 obj_handle_t hkey; /* handle to the created key */
1526 int created; /* has it been newly created? */
1527 @END
1529 /* Open a registry key */
1530 @REQ(open_key)
1531 obj_handle_t parent; /* handle to the parent key */
1532 unsigned int access; /* desired access rights */
1533 unsigned int attributes; /* object attributes */
1534 VARARG(name,unicode_str); /* key name */
1535 @REPLY
1536 obj_handle_t hkey; /* handle to the open key */
1537 @END
1540 /* Delete a registry key */
1541 @REQ(delete_key)
1542 obj_handle_t hkey; /* handle to the key */
1543 @END
1546 /* Flush a registry key */
1547 @REQ(flush_key)
1548 obj_handle_t hkey; /* handle to the key */
1549 @END
1552 /* Enumerate registry subkeys */
1553 @REQ(enum_key)
1554 obj_handle_t hkey; /* handle to registry key */
1555 int index; /* index of subkey (or -1 for current key) */
1556 int info_class; /* requested information class */
1557 @REPLY
1558 int subkeys; /* number of subkeys */
1559 int max_subkey; /* longest subkey name */
1560 int max_class; /* longest class name */
1561 int values; /* number of values */
1562 int max_value; /* longest value name */
1563 int max_data; /* longest value data */
1564 timeout_t modif; /* last modification time */
1565 data_size_t total; /* total length needed for full name and class */
1566 data_size_t namelen; /* length of key name in bytes */
1567 VARARG(name,unicode_str,namelen); /* key name */
1568 VARARG(class,unicode_str); /* class name */
1569 @END
1572 /* Set a value of a registry key */
1573 @REQ(set_key_value)
1574 obj_handle_t hkey; /* handle to registry key */
1575 int type; /* value type */
1576 data_size_t namelen; /* length of value name in bytes */
1577 VARARG(name,unicode_str,namelen); /* value name */
1578 VARARG(data,bytes); /* value data */
1579 @END
1582 /* Retrieve the value of a registry key */
1583 @REQ(get_key_value)
1584 obj_handle_t hkey; /* handle to registry key */
1585 VARARG(name,unicode_str); /* value name */
1586 @REPLY
1587 int type; /* value type */
1588 data_size_t total; /* total length needed for data */
1589 VARARG(data,bytes); /* value data */
1590 @END
1593 /* Enumerate a value of a registry key */
1594 @REQ(enum_key_value)
1595 obj_handle_t hkey; /* handle to registry key */
1596 int index; /* value index */
1597 int info_class; /* requested information class */
1598 @REPLY
1599 int type; /* value type */
1600 data_size_t total; /* total length needed for full name and data */
1601 data_size_t namelen; /* length of value name in bytes */
1602 VARARG(name,unicode_str,namelen); /* value name */
1603 VARARG(data,bytes); /* value data */
1604 @END
1607 /* Delete a value of a registry key */
1608 @REQ(delete_key_value)
1609 obj_handle_t hkey; /* handle to registry key */
1610 VARARG(name,unicode_str); /* value name */
1611 @END
1614 /* Load a registry branch from a file */
1615 @REQ(load_registry)
1616 obj_handle_t hkey; /* root key to load to */
1617 obj_handle_t file; /* file to load from */
1618 VARARG(name,unicode_str); /* subkey name */
1619 @END
1622 /* UnLoad a registry branch from a file */
1623 @REQ(unload_registry)
1624 obj_handle_t hkey; /* root key to unload to */
1625 @END
1628 /* Save a registry branch to a file */
1629 @REQ(save_registry)
1630 obj_handle_t hkey; /* key to save */
1631 obj_handle_t file; /* file to save to */
1632 @END
1635 /* Add a registry key change notification */
1636 @REQ(set_registry_notification)
1637 obj_handle_t hkey; /* key to watch for changes */
1638 obj_handle_t event; /* event to set */
1639 int subtree; /* should we watch the whole subtree? */
1640 unsigned int filter; /* things to watch */
1641 @END
1644 /* Create a waitable timer */
1645 @REQ(create_timer)
1646 unsigned int access; /* wanted access rights */
1647 unsigned int attributes; /* object attributes */
1648 obj_handle_t rootdir; /* root directory */
1649 int manual; /* manual reset */
1650 VARARG(name,unicode_str); /* object name */
1651 @REPLY
1652 obj_handle_t handle; /* handle to the timer */
1653 @END
1656 /* Open a waitable timer */
1657 @REQ(open_timer)
1658 unsigned int access; /* wanted access rights */
1659 unsigned int attributes; /* object attributes */
1660 obj_handle_t rootdir; /* root directory */
1661 VARARG(name,unicode_str); /* object name */
1662 @REPLY
1663 obj_handle_t handle; /* handle to the timer */
1664 @END
1666 /* Set a waitable timer */
1667 @REQ(set_timer)
1668 obj_handle_t handle; /* handle to the timer */
1669 timeout_t expire; /* next expiration absolute time */
1670 int period; /* timer period in ms */
1671 void* callback; /* callback function */
1672 void* arg; /* callback argument */
1673 @REPLY
1674 int signaled; /* was the timer signaled before this call ? */
1675 @END
1677 /* Cancel a waitable timer */
1678 @REQ(cancel_timer)
1679 obj_handle_t handle; /* handle to the timer */
1680 @REPLY
1681 int signaled; /* was the timer signaled before this calltime ? */
1682 @END
1684 /* Get information on a waitable timer */
1685 @REQ(get_timer_info)
1686 obj_handle_t handle; /* handle to the timer */
1687 @REPLY
1688 timeout_t when; /* absolute time when the timer next expires */
1689 int signaled; /* is the timer signaled? */
1690 @END
1693 /* Retrieve the current context of a thread */
1694 @REQ(get_thread_context)
1695 obj_handle_t handle; /* thread handle */
1696 unsigned int flags; /* context flags */
1697 int suspend; /* if getting context during suspend */
1698 @REPLY
1699 int self; /* was it a handle to the current thread? */
1700 VARARG(context,context); /* thread context */
1701 @END
1704 /* Set the current context of a thread */
1705 @REQ(set_thread_context)
1706 obj_handle_t handle; /* thread handle */
1707 unsigned int flags; /* context flags */
1708 int suspend; /* if setting context during suspend */
1709 VARARG(context,context); /* thread context */
1710 @REPLY
1711 int self; /* was it a handle to the current thread? */
1712 @END
1715 /* Fetch a selector entry for a thread */
1716 @REQ(get_selector_entry)
1717 obj_handle_t handle; /* thread handle */
1718 int entry; /* LDT entry */
1719 @REPLY
1720 unsigned int base; /* selector base */
1721 unsigned int limit; /* selector limit */
1722 unsigned char flags; /* selector flags */
1723 @END
1726 /* Add an atom */
1727 @REQ(add_atom)
1728 obj_handle_t table; /* which table to add atom to */
1729 VARARG(name,unicode_str); /* atom name */
1730 @REPLY
1731 atom_t atom; /* resulting atom */
1732 @END
1735 /* Delete an atom */
1736 @REQ(delete_atom)
1737 obj_handle_t table; /* which table to delete atom from */
1738 atom_t atom; /* atom handle */
1739 @END
1742 /* Find an atom */
1743 @REQ(find_atom)
1744 obj_handle_t table; /* which table to find atom from */
1745 VARARG(name,unicode_str); /* atom name */
1746 @REPLY
1747 atom_t atom; /* atom handle */
1748 @END
1751 /* Get information about an atom */
1752 @REQ(get_atom_information)
1753 obj_handle_t table; /* which table to find atom from */
1754 atom_t atom; /* atom handle */
1755 @REPLY
1756 int count; /* atom lock count */
1757 int pinned; /* whether the atom has been pinned */
1758 data_size_t total; /* actual length of atom name */
1759 VARARG(name,unicode_str); /* atom name */
1760 @END
1763 /* Set information about an atom */
1764 @REQ(set_atom_information)
1765 obj_handle_t table; /* which table to find atom from */
1766 atom_t atom; /* atom handle */
1767 int pinned; /* whether to bump atom information */
1768 @END
1771 /* Empty an atom table */
1772 @REQ(empty_atom_table)
1773 obj_handle_t table; /* which table to find atom from */
1774 int if_pinned; /* whether to delete pinned atoms */
1775 @END
1778 /* Init an atom table */
1779 @REQ(init_atom_table)
1780 int entries; /* number of entries (only for local) */
1781 @REPLY
1782 obj_handle_t table; /* handle to the atom table */
1783 @END
1786 /* Get the message queue of the current thread */
1787 @REQ(get_msg_queue)
1788 @REPLY
1789 obj_handle_t handle; /* handle to the queue */
1790 @END
1793 /* Set the file descriptor associated to the current thread queue */
1794 @REQ(set_queue_fd)
1795 obj_handle_t handle; /* handle to the file descriptor */
1796 @END
1799 /* Set the current message queue wakeup mask */
1800 @REQ(set_queue_mask)
1801 unsigned int wake_mask; /* wakeup bits mask */
1802 unsigned int changed_mask; /* changed bits mask */
1803 int skip_wait; /* will we skip waiting if signaled? */
1804 @REPLY
1805 unsigned int wake_bits; /* current wake bits */
1806 unsigned int changed_bits; /* current changed bits */
1807 @END
1810 /* Get the current message queue status */
1811 @REQ(get_queue_status)
1812 int clear; /* should we clear the change bits? */
1813 @REPLY
1814 unsigned int wake_bits; /* wake bits */
1815 unsigned int changed_bits; /* changed bits since last time */
1816 @END
1819 /* Retrieve the process idle event */
1820 @REQ(get_process_idle_event)
1821 obj_handle_t handle; /* process handle */
1822 @REPLY
1823 obj_handle_t event; /* handle to idle event */
1824 @END
1827 /* Send a message to a thread queue */
1828 @REQ(send_message)
1829 thread_id_t id; /* thread id */
1830 int type; /* message type (see below) */
1831 int flags; /* message flags (see below) */
1832 user_handle_t win; /* window handle */
1833 unsigned int msg; /* message code */
1834 lparam_t wparam; /* parameters */
1835 lparam_t lparam; /* parameters */
1836 timeout_t timeout; /* timeout for reply */
1837 VARARG(data,message_data); /* message data for sent messages */
1838 @END
1840 @REQ(post_quit_message)
1841 int exit_code; /* exit code to return */
1842 @END
1844 enum message_type
1846 MSG_ASCII, /* Ascii message (from SendMessageA) */
1847 MSG_UNICODE, /* Unicode message (from SendMessageW) */
1848 MSG_NOTIFY, /* notify message (from SendNotifyMessageW), always Unicode */
1849 MSG_CALLBACK, /* callback message (from SendMessageCallbackW), always Unicode */
1850 MSG_CALLBACK_RESULT,/* result of a callback message */
1851 MSG_OTHER_PROCESS, /* sent from other process, may include vararg data, always Unicode */
1852 MSG_POSTED, /* posted message (from PostMessageW), always Unicode */
1853 MSG_HARDWARE, /* hardware message */
1854 MSG_WINEVENT /* winevent message */
1856 #define SEND_MSG_ABORT_IF_HUNG 0x01
1859 /* Send a hardware message to a thread queue */
1860 @REQ(send_hardware_message)
1861 thread_id_t id; /* thread id */
1862 user_handle_t win; /* window handle */
1863 unsigned int msg; /* message code */
1864 lparam_t wparam; /* parameters */
1865 lparam_t lparam; /* parameters */
1866 lparam_t info; /* extra info */
1867 int x; /* x position */
1868 int y; /* y position */
1869 unsigned int time; /* message time */
1870 @END
1873 /* Get a message from the current queue */
1874 @REQ(get_message)
1875 unsigned int flags; /* PM_* flags */
1876 user_handle_t get_win; /* window handle to get */
1877 unsigned int get_first; /* first message code to get */
1878 unsigned int get_last; /* last message code to get */
1879 unsigned int hw_id; /* id of the previous hardware message (or 0) */
1880 unsigned int wake_mask; /* wakeup bits mask */
1881 unsigned int changed_mask; /* changed bits mask */
1882 @REPLY
1883 user_handle_t win; /* window handle */
1884 unsigned int msg; /* message code */
1885 lparam_t wparam; /* parameters */
1886 lparam_t lparam; /* parameters */
1887 int type; /* message type */
1888 unsigned int time; /* message time */
1889 unsigned int active_hooks; /* active hooks bitmap */
1890 data_size_t total; /* total size of extra data */
1891 VARARG(data,message_data); /* message data for sent messages */
1892 @END
1895 /* Reply to a sent message */
1896 @REQ(reply_message)
1897 int remove; /* should we remove the message? */
1898 lparam_t result; /* message result */
1899 VARARG(data,bytes); /* message data for sent messages */
1900 @END
1903 /* Accept the current hardware message */
1904 @REQ(accept_hardware_message)
1905 unsigned int hw_id; /* id of the hardware message */
1906 int remove; /* should we remove the message? */
1907 user_handle_t new_win; /* new destination window for current message */
1908 @END
1911 /* Retrieve the reply for the last message sent */
1912 @REQ(get_message_reply)
1913 int cancel; /* cancel message if not ready? */
1914 @REPLY
1915 lparam_t result; /* message result */
1916 VARARG(data,bytes); /* message data for sent messages */
1917 @END
1920 /* Set a window timer */
1921 @REQ(set_win_timer)
1922 user_handle_t win; /* window handle */
1923 unsigned int msg; /* message to post */
1924 unsigned int rate; /* timer rate in ms */
1925 lparam_t id; /* timer id */
1926 lparam_t lparam; /* message lparam (callback proc) */
1927 @REPLY
1928 lparam_t id; /* timer id */
1929 @END
1932 /* Kill a window timer */
1933 @REQ(kill_win_timer)
1934 user_handle_t win; /* window handle */
1935 lparam_t id; /* timer id */
1936 unsigned int msg; /* message to post */
1937 @END
1940 /* check if the thread owning the window is hung */
1941 @REQ(is_window_hung)
1942 user_handle_t win; /* window handle */
1943 @REPLY
1944 int is_hung;
1945 @END
1948 /* Retrieve info about a serial port */
1949 @REQ(get_serial_info)
1950 obj_handle_t handle; /* handle to comm port */
1951 @REPLY
1952 unsigned int readinterval;
1953 unsigned int readconst;
1954 unsigned int readmult;
1955 unsigned int writeconst;
1956 unsigned int writemult;
1957 unsigned int eventmask;
1958 @END
1961 /* Set info about a serial port */
1962 @REQ(set_serial_info)
1963 obj_handle_t handle; /* handle to comm port */
1964 int flags; /* bitmask to set values (see below) */
1965 unsigned int readinterval;
1966 unsigned int readconst;
1967 unsigned int readmult;
1968 unsigned int writeconst;
1969 unsigned int writemult;
1970 unsigned int eventmask;
1971 @END
1972 #define SERIALINFO_SET_TIMEOUTS 0x01
1973 #define SERIALINFO_SET_MASK 0x02
1976 /* Create an async I/O */
1977 @REQ(register_async)
1978 int type; /* type of queue to look after */
1979 int count; /* count - usually # of bytes to be read/written */
1980 async_data_t async; /* async I/O parameters */
1981 @END
1982 #define ASYNC_TYPE_READ 0x01
1983 #define ASYNC_TYPE_WRITE 0x02
1984 #define ASYNC_TYPE_WAIT 0x03
1987 /* Cancel all async op on a fd */
1988 @REQ(cancel_async)
1989 obj_handle_t handle; /* handle to comm port, socket or file */
1990 @END
1993 /* Perform an ioctl on a file */
1994 @REQ(ioctl)
1995 ioctl_code_t code; /* ioctl code */
1996 async_data_t async; /* async I/O parameters */
1997 VARARG(in_data,bytes); /* ioctl input data */
1998 @REPLY
1999 obj_handle_t wait; /* handle to wait on for blocking ioctl */
2000 unsigned int options; /* device open options */
2001 VARARG(out_data,bytes); /* ioctl output data */
2002 @END
2005 /* Retrieve results of an async ioctl */
2006 @REQ(get_ioctl_result)
2007 obj_handle_t handle; /* handle to the device */
2008 void* user_arg; /* user arg used to identify the request */
2009 @REPLY
2010 VARARG(out_data,bytes); /* ioctl output data */
2011 @END
2014 /* Create a named pipe */
2015 @REQ(create_named_pipe)
2016 unsigned int access;
2017 unsigned int attributes; /* object attributes */
2018 obj_handle_t rootdir; /* root directory */
2019 unsigned int options;
2020 unsigned int flags;
2021 unsigned int maxinstances;
2022 unsigned int outsize;
2023 unsigned int insize;
2024 timeout_t timeout;
2025 VARARG(name,unicode_str); /* pipe name */
2026 @REPLY
2027 obj_handle_t handle; /* handle to the pipe */
2028 @END
2030 /* flags in create_named_pipe and get_named_pipe_info */
2031 #define NAMED_PIPE_MESSAGE_STREAM_WRITE 0x0001
2032 #define NAMED_PIPE_MESSAGE_STREAM_READ 0x0002
2033 #define NAMED_PIPE_NONBLOCKING_MODE 0x0004
2034 #define NAMED_PIPE_SERVER_END 0x8000
2037 @REQ(get_named_pipe_info)
2038 obj_handle_t handle;
2039 @REPLY
2040 unsigned int flags;
2041 unsigned int maxinstances;
2042 unsigned int instances;
2043 unsigned int outsize;
2044 unsigned int insize;
2045 @END
2048 /* Create a window */
2049 @REQ(create_window)
2050 user_handle_t parent; /* parent window */
2051 user_handle_t owner; /* owner window */
2052 atom_t atom; /* class atom */
2053 void* instance; /* module instance */
2054 VARARG(class,unicode_str); /* class name */
2055 @REPLY
2056 user_handle_t handle; /* created window */
2057 user_handle_t parent; /* full handle of parent */
2058 user_handle_t owner; /* full handle of owner */
2059 int extra; /* number of extra bytes */
2060 void* class_ptr; /* pointer to class in client address space */
2061 @END
2064 /* Destroy a window */
2065 @REQ(destroy_window)
2066 user_handle_t handle; /* handle to the window */
2067 @END
2070 /* Retrieve the desktop window for the current thread */
2071 @REQ(get_desktop_window)
2072 int force; /* force creation if it doesn't exist */
2073 @REPLY
2074 user_handle_t top_window; /* handle to the desktop window */
2075 user_handle_t msg_window; /* handle to the top-level HWND_MESSAGE parent */
2076 @END
2079 /* Set a window owner */
2080 @REQ(set_window_owner)
2081 user_handle_t handle; /* handle to the window */
2082 user_handle_t owner; /* new owner */
2083 @REPLY
2084 user_handle_t full_owner; /* full handle of new owner */
2085 user_handle_t prev_owner; /* full handle of previous owner */
2086 @END
2089 /* Get information from a window handle */
2090 @REQ(get_window_info)
2091 user_handle_t handle; /* handle to the window */
2092 @REPLY
2093 user_handle_t full_handle; /* full 32-bit handle */
2094 user_handle_t last_active; /* last active popup */
2095 process_id_t pid; /* process owning the window */
2096 thread_id_t tid; /* thread owning the window */
2097 atom_t atom; /* class atom */
2098 int is_unicode; /* ANSI or unicode */
2099 @END
2102 /* Set some information in a window */
2103 @REQ(set_window_info)
2104 unsigned int flags; /* flags for fields to set (see below) */
2105 user_handle_t handle; /* handle to the window */
2106 unsigned int style; /* window style */
2107 unsigned int ex_style; /* window extended style */
2108 unsigned int id; /* window id */
2109 int is_unicode; /* ANSI or unicode */
2110 void* instance; /* creator instance */
2111 lparam_t user_data; /* user-specific data */
2112 int extra_offset; /* offset to set in extra bytes */
2113 data_size_t extra_size; /* size to set in extra bytes */
2114 lparam_t extra_value; /* value to set in extra bytes */
2115 @REPLY
2116 unsigned int old_style; /* old window style */
2117 unsigned int old_ex_style; /* old window extended style */
2118 unsigned int old_id; /* old window id */
2119 void* old_instance; /* old creator instance */
2120 lparam_t old_user_data; /* old user-specific data */
2121 lparam_t old_extra_value; /* old value in extra bytes */
2122 @END
2123 #define SET_WIN_STYLE 0x01
2124 #define SET_WIN_EXSTYLE 0x02
2125 #define SET_WIN_ID 0x04
2126 #define SET_WIN_INSTANCE 0x08
2127 #define SET_WIN_USERDATA 0x10
2128 #define SET_WIN_EXTRA 0x20
2129 #define SET_WIN_UNICODE 0x40
2132 /* Set the parent of a window */
2133 @REQ(set_parent)
2134 user_handle_t handle; /* handle to the window */
2135 user_handle_t parent; /* handle to the parent */
2136 @REPLY
2137 user_handle_t old_parent; /* old parent window */
2138 user_handle_t full_parent; /* full handle of new parent */
2139 @END
2142 /* Get a list of the window parents, up to the root of the tree */
2143 @REQ(get_window_parents)
2144 user_handle_t handle; /* handle to the window */
2145 @REPLY
2146 int count; /* total count of parents */
2147 VARARG(parents,user_handles); /* parent handles */
2148 @END
2151 /* Get a list of the window children */
2152 @REQ(get_window_children)
2153 obj_handle_t desktop; /* handle to desktop */
2154 user_handle_t parent; /* parent window */
2155 atom_t atom; /* class atom for the listed children */
2156 thread_id_t tid; /* thread owning the listed children */
2157 VARARG(class,unicode_str); /* class name */
2158 @REPLY
2159 int count; /* total count of children */
2160 VARARG(children,user_handles); /* children handles */
2161 @END
2164 /* Get a list of the window children that contain a given point */
2165 @REQ(get_window_children_from_point)
2166 user_handle_t parent; /* parent window */
2167 int x; /* point in parent coordinates */
2168 int y;
2169 @REPLY
2170 int count; /* total count of children */
2171 VARARG(children,user_handles); /* children handles */
2172 @END
2175 /* Get window tree information from a window handle */
2176 @REQ(get_window_tree)
2177 user_handle_t handle; /* handle to the window */
2178 @REPLY
2179 user_handle_t parent; /* parent window */
2180 user_handle_t owner; /* owner window */
2181 user_handle_t next_sibling; /* next sibling in Z-order */
2182 user_handle_t prev_sibling; /* prev sibling in Z-order */
2183 user_handle_t first_sibling; /* first sibling in Z-order */
2184 user_handle_t last_sibling; /* last sibling in Z-order */
2185 user_handle_t first_child; /* first child */
2186 user_handle_t last_child; /* last child */
2187 @END
2189 /* Set the position and Z order of a window */
2190 @REQ(set_window_pos)
2191 unsigned int flags; /* SWP_* flags */
2192 user_handle_t handle; /* handle to the window */
2193 user_handle_t previous; /* previous window in Z order */
2194 rectangle_t window; /* window rectangle */
2195 rectangle_t client; /* client rectangle */
2196 VARARG(valid,rectangles); /* valid rectangles from WM_NCCALCSIZE */
2197 @REPLY
2198 unsigned int new_style; /* new window style */
2199 unsigned int new_ex_style; /* new window extended style */
2200 @END
2203 /* Get the window and client rectangles of a window */
2204 @REQ(get_window_rectangles)
2205 user_handle_t handle; /* handle to the window */
2206 @REPLY
2207 rectangle_t window; /* window rectangle */
2208 rectangle_t visible; /* visible part of the window rectangle */
2209 rectangle_t client; /* client rectangle */
2210 @END
2213 /* Get the window text */
2214 @REQ(get_window_text)
2215 user_handle_t handle; /* handle to the window */
2216 @REPLY
2217 VARARG(text,unicode_str); /* window text */
2218 @END
2221 /* Set the window text */
2222 @REQ(set_window_text)
2223 user_handle_t handle; /* handle to the window */
2224 VARARG(text,unicode_str); /* window text */
2225 @END
2228 /* Get the coordinates offset between two windows */
2229 @REQ(get_windows_offset)
2230 user_handle_t from; /* handle to the first window */
2231 user_handle_t to; /* handle to the second window */
2232 @REPLY
2233 int x; /* x coordinate offset */
2234 int y; /* y coordinate offset */
2235 @END
2238 /* Get the visible region of a window */
2239 @REQ(get_visible_region)
2240 user_handle_t window; /* handle to the window */
2241 unsigned int flags; /* DCX flags */
2242 @REPLY
2243 user_handle_t top_win; /* top window to clip against */
2244 rectangle_t top_rect; /* top window visible rect with screen coords */
2245 rectangle_t win_rect; /* window rect in screen coords */
2246 data_size_t total_size; /* total size of the resulting region */
2247 VARARG(region,rectangles); /* list of rectangles for the region (in screen coords) */
2248 @END
2251 /* Get the window region */
2252 @REQ(get_window_region)
2253 user_handle_t window; /* handle to the window */
2254 @REPLY
2255 data_size_t total_size; /* total size of the resulting region */
2256 VARARG(region,rectangles); /* list of rectangles for the region */
2257 @END
2260 /* Set the window region */
2261 @REQ(set_window_region)
2262 user_handle_t window; /* handle to the window */
2263 int redraw; /* redraw the window? */
2264 VARARG(region,rectangles); /* list of rectangles for the region */
2265 @END
2268 /* Get the window update region */
2269 @REQ(get_update_region)
2270 user_handle_t window; /* handle to the window */
2271 user_handle_t from_child; /* child to start searching from */
2272 unsigned int flags; /* update flags (see below) */
2273 @REPLY
2274 user_handle_t child; /* child to repaint (or window itself) */
2275 unsigned int flags; /* resulting update flags (see below) */
2276 data_size_t total_size; /* total size of the resulting region */
2277 VARARG(region,rectangles); /* list of rectangles for the region */
2278 @END
2279 #define UPDATE_NONCLIENT 0x01 /* get region for repainting non-client area */
2280 #define UPDATE_ERASE 0x02 /* get region for erasing client area */
2281 #define UPDATE_PAINT 0x04 /* get region for painting client area */
2282 #define UPDATE_INTERNALPAINT 0x08 /* get region if internal paint is pending */
2283 #define UPDATE_ALLCHILDREN 0x10 /* force repaint of all children */
2284 #define UPDATE_NOCHILDREN 0x20 /* don't try to repaint any children */
2285 #define UPDATE_NOREGION 0x40 /* don't return a region, only the flags */
2286 #define UPDATE_DELAYED_ERASE 0x80 /* still needs erase after BeginPaint */
2289 /* Update the z order of a window so that a given rectangle is fully visible */
2290 @REQ(update_window_zorder)
2291 user_handle_t window; /* handle to the window */
2292 rectangle_t rect; /* rectangle that must be visible */
2293 @END
2296 /* Mark parts of a window as needing a redraw */
2297 @REQ(redraw_window)
2298 user_handle_t window; /* handle to the window */
2299 unsigned int flags; /* RDW_* flags */
2300 VARARG(region,rectangles); /* list of rectangles for the region */
2301 @END
2304 /* Set a window property */
2305 @REQ(set_window_property)
2306 user_handle_t window; /* handle to the window */
2307 lparam_t data; /* data to store */
2308 atom_t atom; /* property atom (if no name specified) */
2309 VARARG(name,unicode_str); /* property name */
2310 @END
2313 /* Remove a window property */
2314 @REQ(remove_window_property)
2315 user_handle_t window; /* handle to the window */
2316 atom_t atom; /* property atom (if no name specified) */
2317 VARARG(name,unicode_str); /* property name */
2318 @REPLY
2319 lparam_t data; /* data stored in property */
2320 @END
2323 /* Get a window property */
2324 @REQ(get_window_property)
2325 user_handle_t window; /* handle to the window */
2326 atom_t atom; /* property atom (if no name specified) */
2327 VARARG(name,unicode_str); /* property name */
2328 @REPLY
2329 lparam_t data; /* data stored in property */
2330 @END
2333 /* Get the list of properties of a window */
2334 @REQ(get_window_properties)
2335 user_handle_t window; /* handle to the window */
2336 @REPLY
2337 int total; /* total number of properties */
2338 VARARG(props,properties); /* list of properties */
2339 @END
2342 /* Create a window station */
2343 @REQ(create_winstation)
2344 unsigned int flags; /* window station flags */
2345 unsigned int access; /* wanted access rights */
2346 unsigned int attributes; /* object attributes */
2347 VARARG(name,unicode_str); /* object name */
2348 @REPLY
2349 obj_handle_t handle; /* handle to the window station */
2350 @END
2353 /* Open a handle to a window station */
2354 @REQ(open_winstation)
2355 unsigned int access; /* wanted access rights */
2356 unsigned int attributes; /* object attributes */
2357 VARARG(name,unicode_str); /* object name */
2358 @REPLY
2359 obj_handle_t handle; /* handle to the window station */
2360 @END
2363 /* Close a window station */
2364 @REQ(close_winstation)
2365 obj_handle_t handle; /* handle to the window station */
2366 @END
2369 /* Get the process current window station */
2370 @REQ(get_process_winstation)
2371 @REPLY
2372 obj_handle_t handle; /* handle to the window station */
2373 @END
2376 /* Set the process current window station */
2377 @REQ(set_process_winstation)
2378 obj_handle_t handle; /* handle to the window station */
2379 @END
2382 /* Enumerate window stations */
2383 @REQ(enum_winstation)
2384 unsigned int index; /* current index */
2385 @REPLY
2386 unsigned int next; /* next index */
2387 VARARG(name,unicode_str); /* window station name */
2388 @END
2391 /* Create a desktop */
2392 @REQ(create_desktop)
2393 unsigned int flags; /* desktop flags */
2394 unsigned int access; /* wanted access rights */
2395 unsigned int attributes; /* object attributes */
2396 VARARG(name,unicode_str); /* object name */
2397 @REPLY
2398 obj_handle_t handle; /* handle to the desktop */
2399 @END
2402 /* Open a handle to a desktop */
2403 @REQ(open_desktop)
2404 obj_handle_t winsta; /* window station to open (null allowed) */
2405 unsigned int flags; /* desktop flags */
2406 unsigned int access; /* wanted access rights */
2407 unsigned int attributes; /* object attributes */
2408 VARARG(name,unicode_str); /* object name */
2409 @REPLY
2410 obj_handle_t handle; /* handle to the desktop */
2411 @END
2414 /* Close a desktop */
2415 @REQ(close_desktop)
2416 obj_handle_t handle; /* handle to the desktop */
2417 @END
2420 /* Get the thread current desktop */
2421 @REQ(get_thread_desktop)
2422 thread_id_t tid; /* thread id */
2423 @REPLY
2424 obj_handle_t handle; /* handle to the desktop */
2425 @END
2428 /* Set the thread current desktop */
2429 @REQ(set_thread_desktop)
2430 obj_handle_t handle; /* handle to the desktop */
2431 @END
2434 /* Enumerate desktops */
2435 @REQ(enum_desktop)
2436 obj_handle_t winstation; /* handle to the window station */
2437 unsigned int index; /* current index */
2438 @REPLY
2439 unsigned int next; /* next index */
2440 VARARG(name,unicode_str); /* window station name */
2441 @END
2444 /* Get/set information about a user object (window station or desktop) */
2445 @REQ(set_user_object_info)
2446 obj_handle_t handle; /* handle to the object */
2447 unsigned int flags; /* information to set */
2448 unsigned int obj_flags; /* new object flags */
2449 @REPLY
2450 int is_desktop; /* is object a desktop? */
2451 unsigned int old_obj_flags; /* old object flags */
2452 VARARG(name,unicode_str); /* object name */
2453 @END
2454 #define SET_USER_OBJECT_FLAGS 1
2457 /* Attach (or detach) thread inputs */
2458 @REQ(attach_thread_input)
2459 thread_id_t tid_from; /* thread to be attached */
2460 thread_id_t tid_to; /* thread to which tid_from should be attached */
2461 int attach; /* is it an attach? */
2462 @END
2465 /* Get input data for a given thread */
2466 @REQ(get_thread_input)
2467 thread_id_t tid; /* id of thread */
2468 @REPLY
2469 user_handle_t focus; /* handle to the focus window */
2470 user_handle_t capture; /* handle to the capture window */
2471 user_handle_t active; /* handle to the active window */
2472 user_handle_t foreground; /* handle to the global foreground window */
2473 user_handle_t menu_owner; /* handle to the menu owner */
2474 user_handle_t move_size; /* handle to the moving/resizing window */
2475 user_handle_t caret; /* handle to the caret window */
2476 rectangle_t rect; /* caret rectangle */
2477 @END
2480 /* Get the time of the last input event */
2481 @REQ(get_last_input_time)
2482 @REPLY
2483 unsigned int time;
2484 @END
2487 /* Retrieve queue keyboard state for a given thread */
2488 @REQ(get_key_state)
2489 thread_id_t tid; /* id of thread */
2490 int key; /* optional key code or -1 */
2491 @REPLY
2492 unsigned char state; /* state of specified key */
2493 VARARG(keystate,bytes); /* state array for all the keys */
2494 @END
2496 /* Set queue keyboard state for a given thread */
2497 @REQ(set_key_state)
2498 thread_id_t tid; /* id of thread */
2499 VARARG(keystate,bytes); /* state array for all the keys */
2500 @END
2502 /* Set the system foreground window */
2503 @REQ(set_foreground_window)
2504 user_handle_t handle; /* handle to the foreground window */
2505 @REPLY
2506 user_handle_t previous; /* handle to the previous foreground window */
2507 int send_msg_old; /* whether we have to send a msg to the old window */
2508 int send_msg_new; /* whether we have to send a msg to the new window */
2509 @END
2511 /* Set the current thread focus window */
2512 @REQ(set_focus_window)
2513 user_handle_t handle; /* handle to the focus window */
2514 @REPLY
2515 user_handle_t previous; /* handle to the previous focus window */
2516 @END
2518 /* Set the current thread active window */
2519 @REQ(set_active_window)
2520 user_handle_t handle; /* handle to the active window */
2521 @REPLY
2522 user_handle_t previous; /* handle to the previous active window */
2523 @END
2525 /* Set the current thread capture window */
2526 @REQ(set_capture_window)
2527 user_handle_t handle; /* handle to the capture window */
2528 unsigned int flags; /* capture flags (see below) */
2529 @REPLY
2530 user_handle_t previous; /* handle to the previous capture window */
2531 user_handle_t full_handle; /* full 32-bit handle of new capture window */
2532 @END
2533 #define CAPTURE_MENU 0x01 /* capture is for a menu */
2534 #define CAPTURE_MOVESIZE 0x02 /* capture is for moving/resizing */
2537 /* Set the current thread caret window */
2538 @REQ(set_caret_window)
2539 user_handle_t handle; /* handle to the caret window */
2540 int width; /* caret width */
2541 int height; /* caret height */
2542 @REPLY
2543 user_handle_t previous; /* handle to the previous caret window */
2544 rectangle_t old_rect; /* previous caret rectangle */
2545 int old_hide; /* previous hide count */
2546 int old_state; /* previous caret state (1=on, 0=off) */
2547 @END
2550 /* Set the current thread caret information */
2551 @REQ(set_caret_info)
2552 unsigned int flags; /* caret flags (see below) */
2553 user_handle_t handle; /* handle to the caret window */
2554 int x; /* caret x position */
2555 int y; /* caret y position */
2556 int hide; /* increment for hide count (can be negative to show it) */
2557 int state; /* caret state (1=on, 0=off, -1=toggle current state) */
2558 @REPLY
2559 user_handle_t full_handle; /* handle to the current caret window */
2560 rectangle_t old_rect; /* previous caret rectangle */
2561 int old_hide; /* previous hide count */
2562 int old_state; /* previous caret state (1=on, 0=off) */
2563 @END
2564 #define SET_CARET_POS 0x01 /* set the caret position from x,y */
2565 #define SET_CARET_HIDE 0x02 /* increment the caret hide count */
2566 #define SET_CARET_STATE 0x04 /* set the caret on/off state */
2569 /* Set a window hook */
2570 @REQ(set_hook)
2571 int id; /* id of the hook */
2572 process_id_t pid; /* id of process to set the hook into */
2573 thread_id_t tid; /* id of thread to set the hook into */
2574 int event_min;
2575 int event_max;
2576 int flags;
2577 void* proc; /* hook procedure */
2578 int unicode; /* is it a unicode hook? */
2579 VARARG(module,unicode_str); /* module name */
2580 @REPLY
2581 user_handle_t handle; /* handle to the hook */
2582 unsigned int active_hooks; /* active hooks bitmap */
2583 @END
2586 /* Remove a window hook */
2587 @REQ(remove_hook)
2588 user_handle_t handle; /* handle to the hook */
2589 int id; /* id of the hook if handle is 0 */
2590 void* proc; /* hook procedure if handle is 0 */
2591 @REPLY
2592 unsigned int active_hooks; /* active hooks bitmap */
2593 @END
2596 /* Start calling a hook chain */
2597 @REQ(start_hook_chain)
2598 int id; /* id of the hook */
2599 int event; /* signalled event */
2600 user_handle_t window; /* handle to the event window */
2601 int object_id; /* object id for out of context winevent */
2602 int child_id; /* child id for out of context winevent */
2603 @REPLY
2604 user_handle_t handle; /* handle to the next hook */
2605 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2606 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2607 void* proc; /* hook procedure */
2608 int unicode; /* is it a unicode hook? */
2609 unsigned int active_hooks; /* active hooks bitmap */
2610 VARARG(module,unicode_str); /* module name */
2611 @END
2614 /* Finished calling a hook chain */
2615 @REQ(finish_hook_chain)
2616 int id; /* id of the hook */
2617 @END
2620 /* Get the hook information */
2621 @REQ(get_hook_info)
2622 user_handle_t handle; /* handle to the current hook */
2623 int get_next; /* do we want info about current or next hook? */
2624 int event; /* signalled event */
2625 user_handle_t window; /* handle to the event window */
2626 int object_id; /* object id for out of context winevent */
2627 int child_id; /* child id for out of context winevent */
2628 @REPLY
2629 user_handle_t handle; /* handle to the hook */
2630 int id; /* id of the hook */
2631 process_id_t pid; /* process id for low-level keyboard/mouse hooks */
2632 thread_id_t tid; /* thread id for low-level keyboard/mouse hooks */
2633 void* proc; /* hook procedure */
2634 int unicode; /* is it a unicode hook? */
2635 VARARG(module,unicode_str); /* module name */
2636 @END
2639 /* Create a window class */
2640 @REQ(create_class)
2641 int local; /* is it a local class? */
2642 atom_t atom; /* class atom */
2643 unsigned int style; /* class style */
2644 void* instance; /* module instance */
2645 int extra; /* number of extra class bytes */
2646 int win_extra; /* number of window extra bytes */
2647 void* client_ptr; /* pointer to class in client address space */
2648 VARARG(name,unicode_str); /* class name */
2649 @REPLY
2650 atom_t atom; /* resulting class atom */
2651 @END
2654 /* Destroy a window class */
2655 @REQ(destroy_class)
2656 atom_t atom; /* class atom */
2657 void* instance; /* module instance */
2658 VARARG(name,unicode_str); /* class name */
2659 @REPLY
2660 void* client_ptr; /* pointer to class in client address space */
2661 @END
2664 /* Set some information in a class */
2665 @REQ(set_class_info)
2666 user_handle_t window; /* handle to the window */
2667 unsigned int flags; /* flags for info to set (see below) */
2668 atom_t atom; /* class atom */
2669 unsigned int style; /* class style */
2670 int win_extra; /* number of window extra bytes */
2671 void* instance; /* module instance */
2672 int extra_offset; /* offset to set in extra bytes */
2673 data_size_t extra_size; /* size to set in extra bytes */
2674 lparam_t extra_value; /* value to set in extra bytes */
2675 @REPLY
2676 atom_t old_atom; /* previous class atom */
2677 unsigned int old_style; /* previous class style */
2678 int old_extra; /* previous number of class extra bytes */
2679 int old_win_extra; /* previous number of window extra bytes */
2680 void* old_instance; /* previous module instance */
2681 lparam_t old_extra_value; /* old value in extra bytes */
2682 @END
2683 #define SET_CLASS_ATOM 0x0001
2684 #define SET_CLASS_STYLE 0x0002
2685 #define SET_CLASS_WINEXTRA 0x0004
2686 #define SET_CLASS_INSTANCE 0x0008
2687 #define SET_CLASS_EXTRA 0x0010
2690 /* Set/get clipboard information */
2691 @REQ(set_clipboard_info)
2692 unsigned int flags; /* flags for fields to set (see below) */
2693 user_handle_t clipboard; /* clipboard window */
2694 user_handle_t owner; /* clipboard owner */
2695 user_handle_t viewer; /* first clipboard viewer */
2696 unsigned int seqno; /* change sequence number */
2697 @REPLY
2698 unsigned int flags; /* status flags (see below) */
2699 user_handle_t old_clipboard; /* old clipboard window */
2700 user_handle_t old_owner; /* old clipboard owner */
2701 user_handle_t old_viewer; /* old clipboard viewer */
2702 unsigned int seqno; /* current sequence number */
2703 @END
2705 #define SET_CB_OPEN 0x001
2706 #define SET_CB_OWNER 0x002
2707 #define SET_CB_VIEWER 0x004
2708 #define SET_CB_SEQNO 0x008
2709 #define SET_CB_RELOWNER 0x010
2710 #define SET_CB_CLOSE 0x020
2711 #define CB_OPEN 0x040
2712 #define CB_OWNER 0x080
2713 #define CB_PROCESS 0x100
2716 /* Open a security token */
2717 @REQ(open_token)
2718 obj_handle_t handle; /* handle to the thread or process */
2719 unsigned int access; /* access rights to the new token */
2720 unsigned int attributes;/* object attributes */
2721 unsigned int flags; /* flags (see below) */
2722 @REPLY
2723 obj_handle_t token; /* handle to the token */
2724 @END
2725 #define OPEN_TOKEN_THREAD 1
2726 #define OPEN_TOKEN_AS_SELF 2
2729 /* Set/get the global windows */
2730 @REQ(set_global_windows)
2731 unsigned int flags; /* flags for fields to set (see below) */
2732 user_handle_t shell_window; /* handle to the new shell window */
2733 user_handle_t shell_listview; /* handle to the new shell listview window */
2734 user_handle_t progman_window; /* handle to the new program manager window */
2735 user_handle_t taskman_window; /* handle to the new task manager window */
2736 @REPLY
2737 user_handle_t old_shell_window; /* handle to the shell window */
2738 user_handle_t old_shell_listview; /* handle to the shell listview window */
2739 user_handle_t old_progman_window; /* handle to the new program manager window */
2740 user_handle_t old_taskman_window; /* handle to the new task manager window */
2741 @END
2742 #define SET_GLOBAL_SHELL_WINDOWS 0x01 /* set both main shell and listview windows */
2743 #define SET_GLOBAL_PROGMAN_WINDOW 0x02
2744 #define SET_GLOBAL_TASKMAN_WINDOW 0x04
2746 /* Adjust the privileges held by a token */
2747 @REQ(adjust_token_privileges)
2748 obj_handle_t handle; /* handle to the token */
2749 int disable_all; /* disable all privileges? */
2750 int get_modified_state; /* get modified privileges? */
2751 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to enable/disable/remove */
2752 @REPLY
2753 unsigned int len; /* total length in bytes required to store token privileges */
2754 VARARG(privileges,LUID_AND_ATTRIBUTES); /* modified privileges */
2755 @END
2757 /* Retrieves the set of privileges held by or available to a token */
2758 @REQ(get_token_privileges)
2759 obj_handle_t handle; /* handle to the token */
2760 @REPLY
2761 unsigned int len; /* total length in bytes required to store token privileges */
2762 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
2763 @END
2765 /* Check the token has the required privileges */
2766 @REQ(check_token_privileges)
2767 obj_handle_t handle; /* handle to the token */
2768 int all_required; /* are all the privileges required for the check to succeed? */
2769 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges to check */
2770 @REPLY
2771 int has_privileges; /* does the token have the required privileges? */
2772 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges held by or available to a token */
2773 @END
2775 @REQ(duplicate_token)
2776 obj_handle_t handle; /* handle to the token to duplicate */
2777 unsigned int access; /* access rights to the new token */
2778 unsigned int attributes; /* object attributes */
2779 int primary; /* is the new token to be a primary one? */
2780 int impersonation_level; /* impersonation level of the new token */
2781 @REPLY
2782 obj_handle_t new_handle; /* duplicated handle */
2783 @END
2785 @REQ(access_check)
2786 obj_handle_t handle; /* handle to the token */
2787 unsigned int desired_access; /* desired access to the object */
2788 unsigned int mapping_read; /* mapping from generic read to specific rights */
2789 unsigned int mapping_write; /* mapping from generic write to specific rights */
2790 unsigned int mapping_execute; /* mapping from generic execute to specific rights */
2791 unsigned int mapping_all; /* mapping from generic all to specific rights */
2792 VARARG(sd,security_descriptor); /* security descriptor to check */
2793 @REPLY
2794 unsigned int access_granted; /* access rights actually granted */
2795 unsigned int access_status; /* was access granted? */
2796 unsigned int privileges_len; /* length needed to store privileges */
2797 VARARG(privileges,LUID_AND_ATTRIBUTES); /* privileges used during access check */
2798 @END
2800 @REQ(get_token_user)
2801 obj_handle_t handle; /* handle to the token */
2802 @REPLY
2803 data_size_t user_len; /* length needed to store user */
2804 VARARG(user,SID); /* sid of the user the token represents */
2805 @END
2807 @REQ(get_token_groups)
2808 obj_handle_t handle; /* handle to the token */
2809 @REPLY
2810 data_size_t user_len; /* length needed to store user */
2811 VARARG(user,token_groups); /* groups the token's user belongs to */
2812 @END
2814 @REQ(set_security_object)
2815 obj_handle_t handle; /* handle to the object */
2816 unsigned int security_info; /* which parts of security descriptor to set */
2817 VARARG(sd,security_descriptor); /* security descriptor to set */
2818 @END
2820 @REQ(get_security_object)
2821 obj_handle_t handle; /* handle to the object */
2822 unsigned int security_info; /* which parts of security descriptor to get */
2823 @REPLY
2824 unsigned int sd_len; /* buffer size needed for sd */
2825 VARARG(sd,security_descriptor); /* retrieved security descriptor */
2826 @END
2828 /* Create a mailslot */
2829 @REQ(create_mailslot)
2830 unsigned int access; /* wanted access rights */
2831 unsigned int attributes; /* object attributes */
2832 obj_handle_t rootdir; /* root directory */
2833 unsigned int max_msgsize;
2834 timeout_t read_timeout;
2835 VARARG(name,unicode_str); /* mailslot name */
2836 @REPLY
2837 obj_handle_t handle; /* handle to the mailslot */
2838 @END
2841 /* Set mailslot information */
2842 @REQ(set_mailslot_info)
2843 obj_handle_t handle; /* handle to the mailslot */
2844 unsigned int flags;
2845 timeout_t read_timeout;
2846 @REPLY
2847 unsigned int max_msgsize;
2848 timeout_t read_timeout;
2849 @END
2850 #define MAILSLOT_SET_READ_TIMEOUT 1
2853 /* Create a directory object */
2854 @REQ(create_directory)
2855 unsigned int access; /* access flags */
2856 unsigned int attributes; /* object attributes */
2857 obj_handle_t rootdir; /* root directory */
2858 VARARG(directory_name,unicode_str); /* Directory name */
2859 @REPLY
2860 obj_handle_t handle; /* handle to the directory */
2861 @END
2864 /* Open a directory object */
2865 @REQ(open_directory)
2866 unsigned int access; /* access flags */
2867 unsigned int attributes; /* object attributes */
2868 obj_handle_t rootdir; /* root directory */
2869 VARARG(directory_name,unicode_str); /* Directory name */
2870 @REPLY
2871 obj_handle_t handle; /* handle to the directory */
2872 @END
2875 /* Get a directory entry by index */
2876 @REQ(get_directory_entry)
2877 obj_handle_t handle; /* handle to the directory */
2878 unsigned int index; /* entry index */
2879 @REPLY
2880 data_size_t name_len; /* length of the entry name in bytes */
2881 VARARG(name,unicode_str,name_len); /* entry name */
2882 VARARG(type,unicode_str); /* entry type */
2883 @END
2886 /* Create a symbolic link object */
2887 @REQ(create_symlink)
2888 unsigned int access; /* access flags */
2889 unsigned int attributes; /* object attributes */
2890 obj_handle_t rootdir; /* root directory */
2891 data_size_t name_len; /* length of the symlink name in bytes */
2892 VARARG(name,unicode_str,name_len); /* symlink name */
2893 VARARG(target_name,unicode_str); /* target name */
2894 @REPLY
2895 obj_handle_t handle; /* handle to the symlink */
2896 @END
2899 /* Open a symbolic link object */
2900 @REQ(open_symlink)
2901 unsigned int access; /* access flags */
2902 unsigned int attributes; /* object attributes */
2903 obj_handle_t rootdir; /* root directory */
2904 VARARG(name,unicode_str); /* symlink name */
2905 @REPLY
2906 obj_handle_t handle; /* handle to the symlink */
2907 @END
2910 /* Query a symbolic link object */
2911 @REQ(query_symlink)
2912 obj_handle_t handle; /* handle to the symlink */
2913 @REPLY
2914 VARARG(target_name,unicode_str); /* target name */
2915 @END
2918 /* Query basic object information */
2919 @REQ(get_object_info)
2920 obj_handle_t handle; /* handle to the object */
2921 @REPLY
2922 unsigned int access; /* granted access mask */
2923 unsigned int ref_count; /* object ref count */
2924 @END
2927 /* Unlink a named object */
2928 @REQ(unlink_object)
2929 obj_handle_t handle; /* handle to the object */
2930 @END
2933 /* Query the impersonation level of an impersonation token */
2934 @REQ(get_token_impersonation_level)
2935 obj_handle_t handle; /* handle to the object */
2936 @REPLY
2937 int impersonation_level; /* impersonation level of the impersonation token */
2938 @END
2940 /* Allocate a locally-unique identifier */
2941 @REQ(allocate_locally_unique_id)
2942 @REPLY
2943 luid_t luid;
2944 @END
2947 /* Create a device manager */
2948 @REQ(create_device_manager)
2949 unsigned int access; /* wanted access rights */
2950 unsigned int attributes; /* object attributes */
2951 @REPLY
2952 obj_handle_t handle; /* handle to the device */
2953 @END
2956 /* Create a device */
2957 @REQ(create_device)
2958 unsigned int access; /* wanted access rights */
2959 unsigned int attributes; /* object attributes */
2960 obj_handle_t rootdir; /* root directory */
2961 obj_handle_t manager; /* device manager */
2962 void* user_ptr; /* opaque ptr for use by client */
2963 VARARG(name,unicode_str); /* object name */
2964 @REPLY
2965 obj_handle_t handle; /* handle to the device */
2966 @END
2969 /* Delete a device */
2970 @REQ(delete_device)
2971 obj_handle_t handle; /* handle to the device */
2972 @END
2975 /* Retrieve the next pending device ioctl request */
2976 @REQ(get_next_device_request)
2977 obj_handle_t manager; /* handle to the device manager */
2978 obj_handle_t prev; /* handle to the previous ioctl */
2979 unsigned int status; /* status of the previous ioctl */
2980 VARARG(prev_data,bytes); /* output data of the previous ioctl */
2981 @REPLY
2982 obj_handle_t next; /* handle to the next ioctl */
2983 ioctl_code_t code; /* ioctl code */
2984 void* user_ptr; /* opaque ptr for the device */
2985 data_size_t in_size; /* total needed input size */
2986 data_size_t out_size; /* needed output size */
2987 VARARG(next_data,bytes); /* input data of the next ioctl */
2988 @END
2991 /* Make the current process a system process */
2992 @REQ(make_process_system)
2993 @REPLY
2994 obj_handle_t event; /* event signaled when all user processes have exited */
2995 @END
2998 /* Get detailed fixed-size information about a token */
2999 @REQ(get_token_statistics)
3000 obj_handle_t handle; /* handle to the object */
3001 @REPLY
3002 luid_t token_id; /* locally-unique identifier of the token */
3003 luid_t modified_id; /* locally-unique identifier of the modified version of the token */
3004 int primary; /* is the token primary or impersonation? */
3005 int impersonation_level; /* level of impersonation */
3006 int group_count; /* the number of groups the token is a member of */
3007 int privilege_count; /* the number of privileges the token has */
3008 @END
3011 /* Create I/O completion port */
3012 @REQ(create_completion)
3013 unsigned int access; /* desired access to a port */
3014 unsigned int attributes; /* object attributes */
3015 unsigned int concurrent; /* max number of concurrent active threads */
3016 obj_handle_t rootdir; /* root directory */
3017 VARARG(filename,string); /* port name */
3018 @REPLY
3019 obj_handle_t handle; /* port handle */
3020 @END
3023 /* Open I/O completion port */
3024 @REQ(open_completion)
3025 unsigned int access; /* desired access to a port */
3026 unsigned int attributes; /* object attributes */
3027 obj_handle_t rootdir; /* root directory */
3028 VARARG(filename,string); /* port name */
3029 @REPLY
3030 obj_handle_t handle; /* port handle */
3031 @END
3034 /* add completion to completion port */
3035 @REQ(add_completion)
3036 obj_handle_t handle; /* port handle */
3037 apc_param_t ckey; /* completion key */
3038 apc_param_t cvalue; /* completion value */
3039 unsigned int information; /* IO_STATUS_BLOCK Information */
3040 unsigned int status; /* completion result */
3041 @END
3044 /* get completion from completion port queue */
3045 @REQ(remove_completion)
3046 obj_handle_t handle; /* port handle */
3047 @REPLY
3048 apc_param_t ckey; /* completion key */
3049 apc_param_t cvalue; /* completion value */
3050 unsigned int information; /* IO_STATUS_BLOCK Information */
3051 unsigned int status; /* completion result */
3052 @END
3055 /* get completion queue depth */
3056 @REQ(query_completion)
3057 obj_handle_t handle; /* port handle */
3058 @REPLY
3059 unsigned int depth; /* completion queue depth */
3060 @END
3063 /* associate object with completion port */
3064 @REQ(set_completion_info)
3065 obj_handle_t handle; /* object handle */
3066 obj_handle_t chandle; /* port handle */
3067 apc_param_t ckey; /* completion key */
3068 @END
3071 /* check for associated completion and push msg */
3072 @REQ(add_fd_completion)
3073 obj_handle_t handle; /* async' object */
3074 apc_param_t cvalue; /* completion value */
3075 unsigned int status; /* completion status */
3076 unsigned int information; /* IO_STATUS_BLOCK Information */
3077 @END
3080 /* Retrieve layered info for a window */
3081 @REQ(get_window_layered_info)
3082 user_handle_t handle; /* handle to the window */
3083 @REPLY
3084 unsigned int color_key; /* color key */
3085 unsigned int alpha; /* alpha (0..255) */
3086 unsigned int flags; /* LWA_* flags */
3087 @END
3090 /* Set layered info for a window */
3091 @REQ(set_window_layered_info)
3092 user_handle_t handle; /* handle to the window */
3093 unsigned int color_key; /* color key */
3094 unsigned int alpha; /* alpha (0..255) */
3095 unsigned int flags; /* LWA_* flags */
3096 @END